From 96b5ead5178e1a01171b4124415d8cb665ffced3 Mon Sep 17 00:00:00 2001
From: Peter Motschmann
Date: Tue, 6 Aug 2024 23:32:45 -0400
Subject: [PATCH] 1.3.13b
---
evolve/main.js | 56 +++++++++++++++++++++++-----------------------
src/vars.js | 2 +-
src/wiki/change.js | 10 +++++++++
wiki/wiki.js | 52 +++++++++++++++++++++---------------------
4 files changed, 65 insertions(+), 55 deletions(-)
diff --git a/evolve/main.js b/evolve/main.js
index 3d044aae9..33658687a 100644
--- a/evolve/main.js
+++ b/evolve/main.js
@@ -1,4 +1,4 @@
-(()=>{var Se=window.localStorage,e={seed:1,warseed:1,resource:{},evolution:{},tech:{},city:{},space:{},interstellar:{},portal:{},tauceti:{},civic:{},race:{},genes:{},blood:{},stats:{start:Date.now(),days:0,tdays:0},event:{t:200,l:!1},m_event:{t:499,l:!1}},Je={},v={c:{},p:{}},Ht={},k={},U={},bt={},we={},pa={},xt=0,Kl=0,Nl=0,Xa={t:0};function Uc(r){xt=r}function xn(r){Kl=r}function kn(r){Nl=r}var mr={},Ca={},rr={view:"all"},Oa=["all","progress","queue","building_queue","research_queue","combat","spy","events","major_events","minor_events","achievements","hell"];Math.rand=function(r,a){return Math.floor(Math.random()*(a-r))+r};e.seed=2;e.warseed=2;function J(r,a,i){a=a||1,r=r||0,e[i?"warseed":"seed"]=(e[i?"warseed":"seed"]*9301+49297)%233280;let s=e[i?"warseed":"seed"]/233280;return r+s*(a-r)}{let r=Se.getItem("evolved")||!1;if(r){let a=JSON.parse(LZString.decompressFromUTF16(r));a?e=a:Hc()}else Hc()}e.version||(e.version="0.2.0");be(e.version)<2060&&Object.keys(e.resource).forEach(function(r){e.resource[r].crates&&(e.resource[r].crates=Math.ceil(e.resource[r].crates/5)),e.resource[r].containers&&(e.resource[r].containers=Math.ceil(e.resource[r].containers/5))});if(be(e.version)<2062&&e.civic.taxes!==void 0)switch(Number(e.civic.taxes.tax_rate)){case 0:e.civic.taxes.tax_rate=0;break;case 1:e.civic.taxes.tax_rate=10;break;case 2:e.civic.taxes.tax_rate=20;break;case 3:e.civic.taxes.tax_rate=30;break;case 4:e.civic.taxes.tax_rate=40;break;case 5:e.civic.taxes.tax_rate=50;break}be(e.version)===2062&&e.civic.taxes!==void 0&&e.civic.taxes.tax_rate==2&&(e.civic.taxes.tax_rate=20);be(e.version)<2065&&e.race!==void 0&&e.race.species==="sporgar"&&(delete e.race.crafty,delete e.race.hydrophilic,e.race.infectious=1,e.race.parasite=1,!e.tech.military&&e.tech.primitive&&e.tech.primitive>=3&&(e.civic.garrison.display=!0,e.settings.showCivic=!0,e.city.garrison={count:0}));be(e.version)<3002&&e.space&&(e.tech.space&&e.tech.space>=4&&(e.space.living_quarters||(e.space.living_quarters={count:0,on:0}),e.space.garage||(e.space.garage={count:0}),e.space.red_mine||(e.space.red_mine={count:0,on:0}),e.space.fabrication||(e.space.fabrication={count:0,on:0}),e.space.laboratory||(e.space.laboratory={count:0,on:0})),e.tech.space&&e.tech.space>=3&&(e.space.iridium_mine||(e.space.iridium_mine={count:0,on:0}),e.space.helium_mine||(e.space.helium_mine={count:0,on:0})),e.tech.hell&&(e.space.geothermal||(e.space.geothermal={count:0,on:0})));be(e.version)<3004&&e.settings&&e.settings.space&&e.settings.space.belt&&(e.space.space_station={count:0,on:0,support:0,s_max:0});be(e.version)<4001&&e.city&&e.city.factory&&!e.city.factory.Nano&&(e.city.factory.Nano=0);be(e.version)<4003&&e.stats.achieve&&Object.keys(e.stats.achieve).forEach(function(r){e.stats.achieve[r]=1});be(e.version)<4010&&e.stats.achieve&&e.stats.achieve.doomed&&(e.stats.portals=1);be(e.version)<4028&&e.stats.achieve&&e.stats.achieve.genus_demonic&&(e.stats.achieve.biome_hellscape=e.stats.achieve.genus_demonic);if(be(e.version)<4029&&e.race.mutation&&e.race.mutation>0){e.resource.Genes={name:"Genes",display:!0,value:0,amount:0,crates:0,diff:0,delta:0,max:-2,rate:0};for(let r=0;r=3&&(e.tech.wind_plant=1,e.tech.hunting=2);let r=["Human","Humano","Elf","Elfo","Orc","Cath","Wolven","Centaur","Centauro","Kobold","Goblin","Gnome","Ogre","Ogro","Cyclops","Ciclope","Troll","Tortoisan","Gecko","Slitheryn","Arraak","Pterodacti","Dracnid","Ent","Cacti","Sporgar","Shroomi","Mantis","Scorpid","Antid","Sharkin","Octigoran","Balorg","Imp"];for(let a=0;a0){let r=1;e.race.no_trade&&r++,e.race.no_craft&&r++,e.race.no_crispr&&r++,e.race.weak_mastery&&r++,e.stats.achieve.cross={l:r,a:r}}be(e.version)<7e3&&(e.civic.govern||(e.civic.govern={type:"oligarchy",rev:0,fr:0}));if(be(e.version)<7004&&e.queue&&e.queue.queue)for(let r=0;r"u"&&(e.civic.foreign.gov0.anx=!1),typeof e.civic.foreign.gov1.anx>"u"&&(e.civic.foreign.gov1.anx=!1),typeof e.civic.foreign.gov2.anx>"u"&&(e.civic.foreign.gov2.anx=!1),typeof e.civic.foreign.gov0.buy>"u"&&(e.civic.foreign.gov0.buy=!1),typeof e.civic.foreign.gov1.buy>"u"&&(e.civic.foreign.gov1.buy=!1),typeof e.civic.foreign.gov2.buy>"u"&&(e.civic.foreign.gov2.buy=!1));be(e.version)<8e3&&e.settings&&e.settings.hasOwnProperty("tLabels")&&delete e.settings.tLabels;be(e.version)<8003&&e.stats.harmony&&e.stats.harmony>0&&(e.stats.harmony=parseFloat(e.stats.harmony.toFixed(2)),e.race.Harmony.count=parseFloat(e.race.Harmony.count.toFixed(2)));be(e.version)<8017&&e.city.garrison&&(e.city.garrison.on=e.city.garrison.count);be(e.version)<9e3&&e.settings&&e.settings.showCity&&(e.settings.showCiv=e.settings.showCity);be(e.version)<9005&&e.race.hasOwnProperty("terrifying")&&e.tech.hasOwnProperty("gambling")&&!e.space.hasOwnProperty("spc_casino")&&(e.space.spc_casino={count:0,on:0});be(e.version)<9009&&e.genes.hasOwnProperty("ancients")&&e.genes.ancients>=3&&(e.genes.ancients===4?e.genes.ancients=5:e.race.Plasmid.count+=300);be(e.version)<9010&&(["species","gods","old_gods"].forEach(r=>{e.race[r]==="orge"&&(e.race[r]="ogre")}),e.stats.hasOwnProperty("achieve")&&e.stats.achieve.hasOwnProperty("extinct_orge")&&(e.stats.achieve.extinct_ogre=e.stats.achieve.extinct_orge,delete e.stats.achieve.extinct_orge),e.resource.hasOwnProperty("orge")&&(e.resource.ogre=e.resource.orge,delete e.resource.orge),e.city&&e.city.factory&&!e.city.factory.Furs&&(e.city.factory.Furs=0));be(e.version)<9014&&(["seraph","unicorn","custom"].forEach(r=>{e.race.species===r&&(r==="custom"&&e.hasOwnProperty("custom")&&e.custom.race0.genus==="angelic"||r!=="custom")&&(e.race.holy=1)}),e.hasOwnProperty("arpa")&&e.arpa.hasOwnProperty("sequence")&&(e.arpa.sequence.labs=0));be(e.version)<1e5&&(delete e.city.lumber,delete e.city.stone,e.stats.dark=0,e.race.Dark&&(e.stats.dark=e.race.Dark.count),e.city.hasOwnProperty("smelter")&&(e.city.smelter.hasOwnProperty("Star")||(e.city.smelter.Star=0),e.city.smelter.hasOwnProperty("StarCap")||(e.city.smelter.StarCap=0),e.city.smelter.hasOwnProperty("Inferno")||(e.city.smelter.Inferno=0)),e.hasOwnProperty("warseed")||(e.warseed=e.seed+1,Math.war=e.hasOwnProperty("warseed")?e.warseed:e.seed),e.portal.hasOwnProperty("bireme")&&(e.portal.bireme.crew=0,e.portal.bireme.mil=0),e.portal.hasOwnProperty("transport")&&(e.portal.transport.crew=0,e.portal.transport.mil=0,e.portal.transport.cargo||(e.portal.transport.cargo={used:0,max:0,Crystal:0,Lumber:0,Stone:0,Furs:0,Copper:0,Iron:0,Aluminium:0,Cement:0,Coal:0,Oil:0,Uranium:0,Steel:0,Titanium:0,Alloy:0,Polymer:0,Iridium:0,Helium_3:0,Deuterium:0,Neutronium:0,Adamantite:0,Infernite:0,Elerium:0,Nano_Tube:0,Graphene:0,Stanene:0,Bolognium:0,Vitreloy:0,Orichalcum:0,Plywood:0,Brick:0,Wrought_Iron:0,Sheet_Metal:0,Mythril:0,Aerogel:0,Nanoweave:0,Scarletite:0})),e.hasOwnProperty("settings")&&e.settings.portal&&e.settings.portal.spire&&!e.portal.hasOwnProperty("purifier")&&(e.settings.portal.spire=!1),e.portal.hasOwnProperty("mechbay")&&!Array.isArray(e.portal.mechbay.mechs)&&(e.portal.mechbay.mechs=[]),e.portal.transport&&e.portal.transport.count>=1&&!e.tech.hell_spire&&(e.tech.hell_spire=1,e.settings.portal.spire=!0,e.settings.showCargo=!0,e.portal.purifier={count:0,on:0,support:0,s_max:0,supply:0,sup_max:100,diff:0},e.portal.port={count:0,on:0}),e.tech.hasOwnProperty("waygate")&&!e.portal.hasOwnProperty("waygate")&&delete e.tech.waygate,e.hasOwnProperty("blood")||(e.blood={}));be(e.version)<100013&&e.hasOwnProperty("settings")&&e.settings.hasOwnProperty("showPowerGrid")&&e.hasOwnProperty("race")&&e.race.infiltrator&&e.hasOwnProperty("tech")&&e.tech.hasOwnProperty("high_tech")&&e.tech.high_tech>=2&&(e.settings.showPowerGrid=!0);if(be(e.version)<100014&&(e.race.Dark&&(e.stats.dark=e.race.Dark.count),e.race.casting&&e.race.evil&&(e.race.casting.total-=e.race.casting.lumberjack,e.race.casting.lumberjack=0),e.queue&&e.queue.queue))for(let r=0;r=2,events:!0,major_events:!0,minor_events:!0,achievements:e.stats.achieve&&Object.keys(e.stats.achieve).length>0||e.stats.feat&&Object.keys(e.stats.feat).length>0,hell:e.settings.showPortal||e.stats.blackhole||e.stats.ascend||e.stats.descend}),e.race.hasOwnProperty("inflation")&&["supercollider","stock_exchange","launch_facility","monuments","railway","roid_eject","nexus","syphon"].forEach(function(r){e.tech.hasOwnProperty(r)&&(e.race.inflation+=e.tech[r]*10)}));be(e.version)<101012&&e.civic.garrison&&(e.civic.garrison.rate=0);if(be(e.version)<101014&&(e.hasOwnProperty("settings")&&e.settings.hasOwnProperty("msgFilters")&&Object.keys(e.settings.msgFilters).forEach(function(r){e.settings.msgFilters[r]={unlocked:!!e.settings.msgFilters[r],vis:!!e.settings.msgFilters[r],max:60,save:3}}),e.hasOwnProperty("lastMsg")&&e.lastMsg)){let r={};Oa.forEach(function(a){r[a]=[]}),e.lastMsg.forEach(function(a){a.t?a.t.forEach(function(i){r[i].push({m:a.m,c:a.c})}):r.all.push({m:a.m,c:a.c})}),e.lastMsg=r}be(e.version)<=101014&&!e.revision&&e.race.cataclysm&&e.race.universe&&e.race.universe==="magic"&&e.tech.magic&&e.tech.magic>=2&&(e.space.pylon={count:0});be(e.version)<101015&&e.hasOwnProperty("special")&&e.special.hasOwnProperty("trick")&&(e.special.trick[2020]=JSON.parse(JSON.stringify(e.special.trick)),delete e.special.trick.trick1,delete e.special.trick.trick2,delete e.special.trick.trick3,delete e.special.trick.trick4,delete e.special.trick.trick5,delete e.special.trick.trick6,delete e.special.trick.trick7,delete e.special.trick.trick8,delete e.special.trick.trick9,delete e.special.trick.trick10,delete e.special.trick.trick11,delete e.special.trick.trick12);be(e.version)<102e3&&(e.hasOwnProperty("portal")&&e.portal.hasOwnProperty("fortress")&&!e.portal.fortress.hasOwnProperty("nocrew")&&(e.portal.fortress.nocrew=!1),e.city.hasOwnProperty("smelter")&&!e.city.smelter.hasOwnProperty("Iridium")&&(e.city.smelter.Iridium=0),e.hasOwnProperty("portal")&&e.portal.hasOwnProperty("mechbay")&&!e.portal.mechbay.hasOwnProperty("active")&&(e.portal.mechbay.active=0,e.portal.mechbay.scouts=0));be(e.version)<102001&&(e.race.blood_thirst&&e.race.blood_thirst>3&&(e.race.blood_thirst=1),e.race.rainbow&&e.race.rainbow>3&&(e.race.rainbow=1));be(e.version)<102005&&!e.stats.cores&&e.race.hasOwnProperty("AICore")&&(e.stats.cores=e.race.AICore.count);be(e.version)<102006&&e.race.artifical&&(e.race.calm&&(e.resource.hasOwnProperty("Zen")&&(e.resource.Zen.display=!0),e.city.meditation={count:0}),e.race.cannibalize&&(e.city.s_alter={count:0,rage:0,mind:0,regen:0,mine:0,harvest:0}),e.race.magnificent&&(e.city.shrine={count:0,morale:0,metal:0,know:0,tax:0}));be(e.version)<102007&&e.stats.hasOwnProperty("achieve")&&delete e.stats.achieve.extinct_sludge;be(e.version)<102012&&(e.city.hasOwnProperty("ptrait")&&(e.city.ptrait=e.city.ptrait==="none"?[]:[e.city.ptrait]),e.tech.hell_ruins&&e.tech.hell_ruins>=3&&(e.tech.hell_vault=1));if(be(e.version)<102015){if(e.race.hasOwnProperty("governor")&&e.race.governor.hasOwnProperty("tasks"))for(let r in e.race.governor.tasks)e.race.governor.tasks[r]==="asssemble"&&(e.race.governor.tasks[r]="assemble");e.settings&&e.settings.hasOwnProperty("restoreCheck")&&delete e.settings.restoreCheck}be(e.version)<102017&&(e.portal.hasOwnProperty("fortress")&&(e.portal.observe={settings:{expanded:!1,average:!1,hyperSlow:!1,display:"game_days",dropKills:!0,dropGems:!0},stats:{total:{start:{year:e.city.calendar.year,day:e.city.calendar.day},days:0,wounded:0,died:0,revived:0,surveyors:0,sieges:0,kills:{drones:0,patrols:0,sieges:0,guns:0,soul_forge:0,turrets:0},gems:{patrols:0,guns:0,soul_forge:0,crafted:0,turrets:0}},period:{start:{year:e.city.calendar.year,day:e.city.calendar.day},days:0,wounded:0,died:0,revived:0,surveyors:0,sieges:0,kills:{drones:0,patrols:0,sieges:0,guns:0,soul_forge:0,turrets:0},gems:{patrols:0,guns:0,soul_forge:0,crafted:0,turrets:0}}},graphID:0,graphs:{}}),e.tech.hasOwnProperty("genetics")&&e.tech.genetics>1&&e.hasOwnProperty("arpa")&&(e.arpa.hasOwnProperty("sequence")||(e.arpa.sequence={max:5e4,progress:0,time:5e4,on:!1}),e.arpa.sequence.boost||(e.arpa.sequence.boost=!1),e.arpa.sequence.auto||(e.arpa.sequence.auto=!1),e.arpa.sequence.labs||(e.arpa.sequence.labs=0)));if(be(e.version)<102021&&e.hasOwnProperty("custom")&&!e.custom.hasOwnProperty("race0")){let r=e.race.hasOwnProperty("species")?e.race.species:"protoplasm";e.galaxy.hasOwnProperty("alien1")&&e.galaxy.alien1.id==="custom"&&(e.galaxy.alien1.id=r==="human"?"elven":"human"),e.galaxy.hasOwnProperty("alien2")&&e.galaxy.alien2.id==="custom"&&(e.galaxy.alien2.id=r==="orc"||e.galaxy.alien1.id==="orc"?"cath":"orc")}be(e.version)<103e3&&(e.hasOwnProperty("tauceti")||(e.tauceti={}),e.race.species==="protoplasm"&&(e.evolution.hasOwnProperty("sexual_reproduction")&&(e.tech.evo=e.evolution.sexual_reproduction.count>0?2:1,delete e.evolution.sexual_reproduction),[["phagocytosis",{evo:3,evo_animal:1}],["chloroplasts",{evo:3,evo_plant:1}],["chitin",{evo:3,evo_fungi:1}],["exterminate",{evo:7,evo_synthetic:2}],["multicellular",{evo:4}],["spores",{evo:5}],["poikilohydric",{evo:5}],["bilateral_symmetry",{evo:5,evo_insectoid:1,evo_mammals:1,evo_eggshell:1,evo_aquatic:1,evo_fey:1,evo_sand:1,evo_heat:1,evo_polar:1}],["bryophyte",{evo:7}],["athropods",{evo:7,evo_insectoid:2}],["mammals",{evo:6,evo_humanoid:1,evo_giant:1,evo_small:1,evo_animalism:1,evo_demonic:1,evo_angelic:1}],["humanoid",{evo:7,evo_humanoid:2}],["gigantism",{evo:7,evo_giant:2}],["dwarfism",{evo:7,evo_small:2}],["animalism",{evo:7,evo_animalism:2}],["carnivore",{evo_animalism:3,evo_carnivore:2}],["herbivore",{evo_animalism:3,evo_herbivore:2}],["omnivore",{evo_animalism:3,evo_omnivore:2}],["celestial",{evo:7,evo_angelic:2}],["demonic",{evo:7,evo_demonic:2}],["aquatic",{evo:7,evo_aquatic:2}],["fey",{evo:7,evo_fey:2}],["heat",{evo:7,evo_heat:2}],["polar",{evo:7,evo_polar:2}],["sand",{evo:7,evo_sand:2}],["eggshell",{evo:6,evo_eggshell:2}],["endothermic",{evo:7,evo_avian:2}],["ectothermic",{evo:7,evo_reptilian:2}],["bunker",{evo_challenge:1}]].forEach(function(r){if(e.evolution.hasOwnProperty(r[0])&&e.evolution[r[0]].count>0)for(let[a,i]of Object.entries(r[1]))e.tech[a]=i;delete e.evolution[r[0]]}),e.evolution.mloaded=1,e.evolution.gmloaded=1));be(e.version)<103001&&(e.hasOwnProperty("prestige")||(e.prestige={}),e.race.Plasmid&&e.race.Plasmid.hasOwnProperty("anti")&&(e.prestige.AntiPlasmid={count:e.race.Plasmid.anti}),["Plasmid","Phage","AICore","Dark","Harmony"].forEach(function(r){e.race.hasOwnProperty(r)&&(e.prestige[r]={count:e.race[r].count},delete e.race[r])}),["Artifact","Blood_Stone"].forEach(function(r){e.resource.hasOwnProperty(r)&&(e.prestige[r]={count:e.resource[r].amount},delete e.resource[r])}),!e.stats.hasOwnProperty("synth")&&e.race.hasOwnProperty("srace")&&(e.stats.synth={},e.stats.synth[e.race.srace]=!0),e.race.hasOwnProperty("governor")&&e.race.governor.hasOwnProperty("config")&&e.race.governor.config.hasOwnProperty("trash")&&["Infernite","Elerium","Copper","Iron"].forEach(function(r){e.race.governor.config.trash.hasOwnProperty(r)&&typeof e.race.governor.config.trash[r]=="number"&&(e.race.governor.config.trash[r]={v:e.race.governor.config.trash[r],s:!0})}));be(e.version)<103002&&e.portal.hasOwnProperty("observe")&&e.portal.observe.hasOwnProperty("stats")&&(e.portal.observe.stats.period.gems.surveyors=0,e.portal.observe.stats.total.gems.surveyors=0);be(e.version)<103011&&e.city.hasOwnProperty("slave_pen")&&e.city.slave_pen.hasOwnProperty("slaves")&&(e.resource.Slave.amount=e.city.slave_pen.slaves,delete e.city.slave_pen.slaves);be(e.version)<103014&&(e.race.cataclysm&&(e.civic.craftsman.display=!0),e.race.lone_survivor&&(e.tauceti.tau_factory&&e.tauceti.tau_factory.count>0||e.tauceti.womling_station&&e.tauceti.womling_station.count>0)&&(e.civic.craftsman.display=!0));e.version="1.3.13";e.revision="a";delete e.beta;e.hasOwnProperty("prestige")||(e.prestige={});["Plasmid","AntiPlasmid","Phage","Dark","Harmony","AICore","Artifact","Blood_Stone"].forEach(function(r){e.prestige.hasOwnProperty(r)||(e.prestige[r]={count:0})});e.hasOwnProperty("power")||(e.power=[]);e.hasOwnProperty("support")||(e.support={});["moon","red","belt","alpha","nebula","gateway","alien2","lake","spire","titan","enceladus","eris","tau_home","tau_red","tau_roid"].forEach(function(r){e.support.hasOwnProperty(r)||(e.support[r]=[])});e.civic.cement_worker&&e.civic.cement_worker.impact===.25&&(e.civic.cement_worker.impact=.4);e.settings||(e.settings={showEvolve:!0,showAchieve:!1,animated:!0,disableReset:!1,font:"standard",q_merge:"merge_nearby",cLabels:!0,theme:"gruvboxDark",locale:"en-US",icon:"star"});e.settings.space||(e.settings.space={});e.settings.space.hasOwnProperty("home")||(e.settings.space.home=!0);Wc(!1);e.settings.icon||(e.settings.icon="star");e.settings.showResources||(e.settings.showResources=e.settings.showMarket);e.settings.showStorage||(e.city.warehouse||e.city.storage_yard?e.settings.showStorage=!0:e.settings.showStorage=!1);e.settings.hasOwnProperty("touch")||(e.settings.touch=!1);e.settings.hasOwnProperty("lowPowerBalance")||(e.settings.lowPowerBalance=!1);e.queue||(e.queue={display:!1,queue:[]});e.r_queue||(e.r_queue={display:!1,queue:[]});e.queue.rename||(e.queue.rename=!1);e.queue.max||(e.queue.max=0);e.r_queue.max||(e.r_queue.max=0);e.queue.pause||(e.queue.pause=!1);e.r_queue.pause||(e.r_queue.pause=!1);e.lastMsg||(e.lastMsg={});e.settings.msgFilters||(e.settings.msgFilters={});["all","progress","events","major_events","minor_events"].forEach(function(r){e.settings.msgFilters[r]||(e.settings.msgFilters[r]={unlocked:!0,vis:!0,max:60,save:3})});Oa.forEach(function(r){e.lastMsg[r]||(e.lastMsg[r]=[]),e.settings.msgFilters[r]||(e.settings.msgFilters[r]={unlocked:!1,vis:!1,max:60,save:3})});e.settings.msgQueueHeight||(e.settings.msgQueueHeight=$("#msgQueue").outerHeight(),e.settings.buildQueueHeight=$("#buildQueue").outerHeight());e.space||(e.space={});e.starDock||(e.starDock={});e.interstellar||(e.interstellar={});e.galaxy||(e.galaxy={});e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Bolognium&&(e.interstellar.mass_ejector.Bolognium=0);e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Vitreloy&&(e.interstellar.mass_ejector.Vitreloy=0);e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Orichalcum&&(e.interstellar.mass_ejector.Orichalcum=0);e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Nanoweave&&(e.interstellar.mass_ejector.Nanoweave=0);e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Scarletite&&(e.interstellar.mass_ejector.Scarletite=0);e.hasOwnProperty("pillars")||(e.pillars={});e.settings.space.alpha||(e.settings.space.alpha=!1,e.settings.space.proxima=!1,e.settings.space.nebula=!1,e.settings.space.neutron=!1,e.settings.space.blackhole=!1);e.settings.showAchieve||(e.settings.showAchieve=!1);e.settings.locale||(e.settings.locale="en-US");typeof e.settings.pause>"u"&&(e.settings.pause=!1);typeof e.settings.mKeys>"u"&&(e.settings.mKeys=!0);typeof e.settings.keyMap>"u"&&(e.settings.keyMap={x10:"Control",x25:"Shift",x100:"Alt",q:"q"});typeof e.settings.keyMap.showCiv>"u"&&(e.settings.keyMap.showCiv="1",e.settings.keyMap.showCivic="2",e.settings.keyMap.showResearch="3",e.settings.keyMap.showResources="4",e.settings.keyMap.showGenetics="5",e.settings.keyMap.showAchieve="6",e.settings.keyMap.settings="7");delete e.settings.keyMap.d;typeof e.settings.qAny>"u"&&(e.settings.qAny=!1);typeof e.settings.sPackOn>"u"&&(e.settings.sPackOn=!0);typeof e.settings.qAny_res>"u"&&(e.settings.qAny_res=!1);typeof e.settings.sPackMsg>"u"&&(e.settings.sPackMsg=!1);typeof e.settings.expose>"u"&&(e.settings.expose=!1);typeof e.settings.alwaysPower>"u"&&(e.settings.alwaysPower=!1);typeof e.settings.tabLoad>"u"&&(e.settings.tabLoad=!1);typeof e.settings.boring>"u"&&(e.settings.boring=!1);e.settings.hasOwnProperty("mtorder")||(e.settings.mtorder=[]);function qn(){["reset","plasmid","antiplasmid","universes","phage","starved","tstarved","died","tdied","sac","tsac","know","tknow","portals","dkills","attacks","cfood","tfood","cstone","tstone","clumber","tlumber","mad","bioseed","cataclysm","blackhole","ascend","descend","terraform","aiappoc","matrix","retire","eden","geck","dark","harmony","blood","cores","artifact","cattle","tcattle","murders","tmurders","psykill","tpsykill"].forEach(function(r){e.stats.hasOwnProperty(r)||(e.stats[r]=0)}),e.stats.achieve||(e.stats.achieve={}),e.stats.feat||(e.stats.feat={}),e.stats.hasOwnProperty("womling")||(e.stats.womling={god:{l:0},lord:{l:0},friend:{l:0}}),e.stats.spire||(e.stats.spire={}),e.stats.synth||(e.stats.synth={}),e.stats.hasOwnProperty("banana")||(e.stats.banana={b1:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b2:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b3:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b4:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b5:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1}}),e.stats.hasOwnProperty("endless_hunger")||(e.stats.endless_hunger={b1:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b2:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b3:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b4:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b5:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1}})}qn();e.race.seeded||(e.race.seeded=!1);e.race.deterioration||(e.race.deterioration=0);e.race.gene_fortify||(e.race.gene_fortify=0);e.race.old_gods||(e.race.old_gods="none");e.race.universe||(e.race.universe="standard");e.genes.minor||(e.genes.minor={});e.race.minor||(e.race.minor={});e.hasOwnProperty("govern")||(e.govern={governor:{},candidate:[],policy:{}});e.settings.hasOwnProperty("showMil")||(e.settings.showMil=!0);e.settings.hasOwnProperty("showPowerGrid")||(e.settings.showPowerGrid=!!(e.hasOwnProperty("tech")&&e.tech.hasOwnProperty("high_tech")&&e.tech.high_tech>=2));e.settings.affix||(e.settings.affix="si");e.special||(e.special={});e.special.gift||(e.special.gift={});e.special.hasOwnProperty("egg")||(e.special.egg={});e.special.hasOwnProperty("trick")||(e.special.trick={trick1:!1,trick2:!1,trick3:!1,trick4:!1,trick5:!1,trick6:!1,trick7:!1,trick8:!1,trick9:!1,trick10:!1,trick11:!1,trick12:!1});e.civic.govern||(e.civic.govern={type:"oligarchy",rev:2e3,fr:0});e.civic.govern.fr=0;e.hasOwnProperty("custom")||(e.custom={});e.custom.hasOwnProperty("planet")&&e.custom.planet.hasOwnProperty("biome")&&delete e.custom.planet;e.city.hasOwnProperty("smelter")&&!e.city.smelter.hasOwnProperty("cap")&&(e.city.smelter.cap=0);e.civic.homeless||(e.civic.homeless=0);e.civic.foreign||(e.civic.foreign={gov0:{unrest:0,hstl:100,mil:100,eco:75,spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov1:{unrest:0,hstl:0,mil:150,eco:100,spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov2:{unrest:0,hstl:50,mil:250,eco:150,spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1}});typeof e.civic.foreign.gov0.trn>"u"&&(e.civic.foreign.gov0.trn=0,e.civic.foreign.gov1.trn=0,e.civic.foreign.gov2.trn=0,e.civic.foreign.gov0.sab=0,e.civic.foreign.gov1.sab=0,e.civic.foreign.gov2.sab=0,e.civic.foreign.gov0.act="none",e.civic.foreign.gov1.act="none",e.civic.foreign.gov2.act="none");typeof e.civic.foreign.gov0.name<"u"&&e.civic.foreign.gov0.name.s1==="evo_organism_title"&&(e.civic.foreign.gov0.name.s1="Northern");typeof e.civic.foreign.gov1.name<"u"&&e.civic.foreign.gov1.name.s1==="evo_organism_title"&&(e.civic.foreign.gov1.name.s1="Southern");typeof e.civic.foreign.gov2.name<"u"&&e.civic.foreign.gov2.name.s1==="evo_organism_title"&&(e.civic.foreign.gov2.name.s1="Divine");if(!e.race.evil&&e.race.immoral&&e.race!==void 0&&e.race.species!=="wendigo")delete e.race.immoral;else if(e.race!==void 0&&e.race.species==="wendigo"){let r=new Date;e.settings.hasOwnProperty("boring")&&!e.settings.boring&&r.getMonth()===11&&r.getDate()>=17&&(e.race.immoral=3)}if(e.hasOwnProperty("special")&&e.special.hasOwnProperty("gift")){let r=new Date(e.stats.start),a=new Date;Object.keys(e.special.gift).forEach(function(i){let s=Number(i.substring(1,5));(s=1?e.civic.d_job="farmer":e.civic.d_job="unemployed");e.settings.animated=!0;e.settings.disableReset=!1;e.arpa&&e.arpa.launch_facility&&e.arpa.launch_facility.rank>0&&!e.tech.space&&(e.tech.space=1);function Hc(){e.race={species:"protoplasm",gods:"none",old_gods:"none",seeded:!1},e.seed=Math.rand(0,1e4),e.warseed=Math.rand(0,1e4),e.new=!0}var kr={x10:!1,x25:!1,x100:!1,q:!1};function fe(){let r=1;return e.settings.mKeys&&(kr.x10&&(r*=10),kr.x25&&(r*=25),kr.x100&&(r*=100)),r}function be(r){let a=r.split(".",3);return a[0]*=1e5,a[1]*=1e3,Number(a[0])+Number(a[1])+Number(a[2])}function Ti(){if($(window).width()>=1400&&$("#msgQueue:not(.right)")){let r=$("#buildQueue").detach();r.addClass("right"),r.removeClass("has-text-info");let a=$("#msgQueue").detach();a.addClass("right"),a.removeClass("has-text-info"),a.css("resize","none"),$("#queueColumn").addClass("is-one-quarter"),$("#queueColumn").append(r),$("#queueColumn").append(a),$("#mainColumn").removeClass("is-three-quarters"),$("#mainColumn").addClass("is-half")}else if($(window).width()<1400&&$("#msgQueue").hasClass("right")){let r=$("#buildQueue").detach();r.removeClass("right"),r.addClass("has-text-info");let a=$("#msgQueue").detach();a.removeClass("right"),a.addClass("has-text-info"),a.css("resize","vertical"),$("#queueColumn").removeClass("is-one-quarter"),$("#sideQueue").append(r),$("#sideQueue").append(a),$("#mainColumn").removeClass("is-half"),$("#mainColumn").addClass("is-three-quarters")}}var Ya={si:["K","M","G","T","P","E","Z","Y"],sci:["e3","e6","e9","e12","e15","e18","e21","e24"],sln:["K","M","B","t","q","Q","s","S"]};function Ee(r,a,i){let s=0,n="",c=r<0;return c&&(r*=-1),r<=9999?s=+r.toFixed(a):r<1e6?(n=Ya[e.settings.affix][0],s=i?+(r/1e3).toFixed(1):Math.floor(r/100)/10):r<1e9?(n=Ya[e.settings.affix][1],s=i?+(r/1e6).toFixed(1):Math.floor(r/1e4)/100):r<1e12?(n=Ya[e.settings.affix][2],s=i?+(r/1e9).toFixed(1):Math.floor(r/1e7)/100):r<1e15?(n=Ya[e.settings.affix][3],s=i?+(r/1e12).toFixed(1):Math.floor(r/1e10)/100):r<1e18?(n=Ya[e.settings.affix][4],s=i?+(r/1e15).toFixed(1):Math.floor(r/1e13)/100):r<1e21?(n=Ya[e.settings.affix][5],s=i?+(r/1e18).toFixed(1):Math.floor(r/1e16)/100):r<1e24?(n=Ya[e.settings.affix][6],s=i?+(r/1e21).toFixed(1):Math.floor(r/1e19)/100):(n=Ya[e.settings.affix][7],s=i?+(r/1e24).toFixed(1):Math.floor(r/1e22)/100),s>=100&&(s=+s.toFixed(1)),c&&(s*=-1),s+n}$(window).resize(function(){Ti()});function ss(r,a){var i=document.createElement("div"),s="speak-"+Date.now();i.setAttribute("id",s),i.setAttribute("aria-live",a||"polite"),i.classList.add("sr-only"),document.body.appendChild(i),window.setTimeout(function(){document.getElementById(s).innerHTML=r},100),window.setTimeout(function(){document.body.removeChild(document.getElementById(s))},1e3)}window.soft_reset=function(a){try{a=a&&a==="replicator"?"replicator":"soft",gtag("event","reset",{end:a})}catch{}a||Kr();let i=e.race.hasOwnProperty("srace")?e.race.srace:!1,s=e.race.hasOwnProperty("geck")?e.race.geck:0;e.race.hasOwnProperty("gecked")&&(s+=e.race.gecked,e.stats.geck-=e.race.gecked);let n={species:"protoplasm",universe:e.race.universe,seeded:e.race.seeded,probes:e.race.probes,seed:e.race.seed,ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1,rejuvenated:e.race.hasOwnProperty("rejuvenated")?e.race.rejuvenated:!1};s>0&&(n.geck=s),i&&(n.srace=i),e.race.bigbang&&(n.bigbang=!0),e.race.gods&&(n.gods=e.race.gods),e.race.old_gods&&(n.old_gods=e.race.old_gods),e.race.rapid_mutation&&e.race.rapid_mutation>0&&(n.rapid_mutation=e.race.rapid_mutation),e.race.ancient_ruins&&e.race.ancient_ruins>0&&(n.ancient_ruins=e.race.ancient_ruins),e.race.bigbang&&(n.universe="bigbang"),e.race.hasOwnProperty("corruption")&&(n.corruption=e.race.corruption),e.race=n;let c=e.city.calendar.orbit,l=e.city.biome,o=e.city.ptrait,d=e.city.geology;e.city={calendar:{day:0,year:0,weather:2,temp:1,moon:0,wind:0,orbit:c},biome:l,ptrait:o,geology:d},e.tech.theology&&e.tech.theology>=1?e.tech={theology:1}:e.tech={},Mn(),e.new=!0,e.seed=Math.rand(0,1e4),e.warseed=Math.rand(0,1e4),e.stats.current=Date.now(),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()};var Pe={w:!1,s:!1,mt:250},Ka={};function Kr(){Oa.forEach(function(r){r!=="achievements"&&(e.lastMsg[r]=[])})}function Wc(r){let a={base:["showCiv","showCity","showIndustry","showPowerGrid","showMechLab","showShipYard","showResearch","showCivic","showMil","showResources","showMarket","showStorage","showGenetics","showSpace","showDeep","showGalactic","showPortal","showOuter","showTau","showEjector","showCargo","showAlchemy","showGovernor","arpa","showPsychic"],space:["moon","red","hell","sun","gas","gas_moon","belt","dwarf","alpha","proxima","nebula","neutron","blackhole","sirius","stargate","gateway","gorddon","alien1","alien2","chthonian","titan","enceladus","triton","eris","kuiper"],portal:["fortress","badlands","pit","ruins","gate","lake","spire"],tau:["home","red","roid","gas","gas2","star"]};Object.keys(a).forEach(function(i){i==="base"?a[i].forEach(function(s){(!e.settings.hasOwnProperty(s)||r)&&(e.settings[s]=!1)}):(e.settings.hasOwnProperty(i)||(e.settings[i]={}),a[i].forEach(function(s){(!e.settings[i].hasOwnProperty(s)||r)&&(e.settings[i][s]=!1)}))}),["civTabs","govTabs","govTabs2","hellTabs","resTabs","spaceTabs","marketTabs","statsTabs"].forEach(function(i){(!e.settings.hasOwnProperty(i)||r)&&(e.settings[i]=0)})}function Mn(){Pe.w&&Pe.w.terminate(),e.queue={display:!1,queue:[]},e.r_queue={display:!1,queue:[]},e.space={},e.interstellar={},e.galaxy={},e.portal={},e.starDock={},e.tauceti={},e.civic={new:0},e.civic.foreign={gov0:{unrest:0,hstl:Math.floor(J(80,100)),mil:Math.floor(J(75,125)),eco:Math.floor(J(60,90)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov1:{unrest:0,hstl:Math.floor(J(0,20)),mil:Math.floor(J(125,175)),eco:Math.floor(J(80,120)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov2:{unrest:0,hstl:Math.floor(J(40,60)),mil:Math.floor(J(200,300)),eco:Math.floor(J(130,170)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1}},e.genes.blood||(e.prestige.Blood_Stone.count=0),e.resource={},e.evolution={},e.event={t:100,l:!1},e.m_event={t:499,l:!1},e.stats.days=0,e.stats.know=0,e.stats.starved=0,e.stats.died=0,e.stats.attacks=0,e.stats.dkills=0,e.stats.cfood=0,e.stats.cstone=0,e.stats.clumber=0,e.stats.sac=0,e.stats.cattle=0,e.stats.murders=0,e.settings.at=0,e.settings.showEvolve=!0,e.settings.space.home=!0,Wc(!0),e.settings.disableReset=!1,e.settings.pause=!1,e.arpa={},delete e.race.hrt,e.genes.queue&&(e.tech.queue=1,e.queue.display=!0)}window.reset=function(){try{gtag("event","reset",{end:"hard"})}catch{}localStorage.removeItem("evolved"),e=null,Pe.w&&Pe.w.terminate(),window.location.reload()};var Pn;Dl(e.settings.locale);function t(r,a){let i=Pn[r];if(!i)return e.settings.expose&&(console.error(`string ${r} not found`),console.log(Pn)),r;if(a)if(a instanceof Array){for(let c=0;c{a=s}),r!="en-US"){let s;try{$.getJSON(`strings/strings.${r}.json`,c=>{s=c})}catch(c){console.error(c,c.stack)}let n=a.length;s&&Object.assign(a,s),a.length!=n&&e.settings.expose&&console.error(`string.${r}.json has extra keys.`)}let i=Se.getItem("string_pack")||!1;if(i&&e.settings.sPackOn){let s;try{s=JSON.parse(LZString.decompressFromUTF16(i))}catch(c){console.error(c,c.stack)}let n=a.length;s&&Object.assign(a,s),a.length!=n&&e.settings.expose&&console.error("string pack has extra keys.")}$.ajaxSetup({async:!0}),Pn=a}var ns={"en-US":"English (US)","es-ES":"Spanish (ESP)","pt-BR":"Portugu\xEAs (BR)","de-DE":"Deutsch","it-IT":"Italiano","ru-RU":"\u0420\u0443\u0441\u0441\u043A\u0438\u0439","cs-CZ":"\u010Ce\u0161tina","pl-PL":"Polski","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","ko-KR":"\uD55C\uAD6D\uC5B4","im-PL":"Igpay-Atinlay"};var Na={soldier:{name:t("governor_soldier"),desc:t("governor_soldier_desc"),title:[t("governor_soldier_t1"),t("governor_soldier_t2"),t("governor_soldier_t3")],traits:{tactician:1,militant:1}},criminal:{name:t("governor_criminal"),desc:t("governor_criminal_desc"),title:[t("governor_criminal_t1"),t("governor_criminal_t2"),{m:t("governor_criminal_t3m"),f:t("governor_criminal_t3f")}],traits:{noquestions:1,racketeer:1}},entrepreneur:{name:t("governor_entrepreneur"),desc:t("governor_entrepreneur_desc"),title:[t("governor_entrepreneur_t1"),t("governor_entrepreneur_t2"),{m:t("governor_entrepreneur_t3m"),f:t("governor_entrepreneur_t3f")}],traits:{dealmaker:1,risktaker:1}},educator:{name:t("governor_educator"),desc:t("governor_educator_desc"),title:[t("governor_educator_t1"),t("governor_educator_t2"),t("governor_educator_t3")],traits:{teacher:1,theorist:1}},spiritual:{name:t("governor_spiritual"),desc:t("governor_spiritual_desc"),title:[t("governor_spiritual_t1"),t("governor_spiritual_t2"),t("governor_spiritual_t3")],traits:{inspirational:1,pious:1}},bluecollar:{name:t("governor_bluecollar"),desc:t("governor_bluecollar_desc"),title:[{m:t("governor_bluecollar_t1m"),f:t("governor_bluecollar_t1f")},t("governor_bluecollar_t2"),{m:t("governor_bluecollar_t3m"),f:t("governor_bluecollar_t3f")}],traits:{pragmatist:1,dirty_jobs:1}},noble:{name:t("governor_noble"),desc:t("governor_noble_desc"),title:[{m:t("governor_noble_t1m"),f:t("governor_noble_t1f")},{m:t("governor_noble_t2m"),f:t("governor_noble_t2f")},{m:t("governor_noble_t3m"),f:t("governor_noble_t3f")},{m:t("governor_noble_t4m"),f:t("governor_noble_t4f")}],traits:{extravagant:1,aristocrat:1}},media:{name:t("governor_media"),desc:t("governor_media_desc"),title:[t("governor_media_t1"),{m:t("governor_media_t2m"),f:t("governor_media_t2f")},t("governor_media_t3")],traits:{gaslighter:1,muckraker:1}},sports:{name:t("governor_sports"),desc:t("governor_sports_desc"),title:[t("governor_sports_t1"),t("governor_sports_t2"),t("governor_sports_t3")],traits:{athleticism:1,nopain:1}},bureaucrat:{name:t("governor_bureaucrat"),desc:t("governor_bureaucrat_desc"),title:[t("governor_bureaucrat_t1"),{m:t("governor_bureaucrat_t2m"),f:t("governor_bureaucrat_t2f")},t("governor_bureaucrat_t3")],traits:{organizer:1}}},cs={tactician:{name:t("gov_trait_tactician"),effect(){return t("gov_trait_tactician_effect",[$(this)[0].vars()[0]])},vars(){return[25]}},militant:{name:t("gov_trait_militant"),effect(){return t("gov_trait_militant_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[25,10]}},noquestions:{name:t("gov_trait_noquestions"),effect(){return t("gov_trait_noquestions_effect",[$(this)[0].vars()[0]])},vars(){return[.005]}},racketeer:{name:t("gov_trait_racketeer"),effect(){return t("gov_trait_racketeer_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[20,35]}},dealmaker:{name:t("gov_trait_dealmaker"),effect(){return t("gov_trait_dealmaker_effect",[$(this)[0].vars()[0]])},vars(){return[125]}},risktaker:{name:t("gov_trait_risktaker"),effect(){return t("gov_trait_risktaker_effect",[$(this)[0].vars()[0]])},vars(){return[12]}},teacher:{name:t("gov_trait_teacher"),effect(){return t("gov_trait_teacher_effect",[$(this)[0].vars()[0]])},vars(){return[6]}},theorist:{name:t("gov_trait_theorist"),effect(){return t("gov_trait_theorist_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[50,4]}},inspirational:{name:t("gov_trait_inspirational"),effect(){return t("gov_trait_inspirational_effect",[$(this)[0].vars()[0]])},vars(){return[20]}},pious:{name:t("gov_trait_pious"),effect(){let r=$(this)[0].vars()[1],a=e.tech.monument&&e.tech.monument>=3&&k.s_gate?3:1;return r=(e.civic.govern.type==="corpocracy"?r*2:r)*a,t("gov_trait_pious_effect",[$(this)[0].vars()[0],r])},vars(){return[10,5]}},pragmatist:{name:t("gov_trait_pragmatist"),effect(){return t("gov_trait_pragmatist_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[50,2]}},dirty_jobs:{name:t("gov_trait_dirty_jobs"),effect(){return t("gov_trait_dirty_jobs_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars(){return[.015,1,10]}},extravagant:{name:t("gov_trait_extravagant"),effect(){return t("gov_trait_extravagant_effect",[$(this)[0].vars()[0],St("large",!0),$(this)[0].vars()[1],N($(this)[0].vars()[2]+5)])},vars(){return[10,1.25,1]}},aristocrat:{name:t("gov_trait_aristocrat"),effect(){return t("gov_trait_aristocrat_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars(){return[50,20,10]}},gaslighter:{name:t("gov_trait_gaslighter"),effect(){return t("gov_trait_gaslighter_effect",[$(this)[0].vars()[0],dr(),$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars(){return[1,1,.5]}},muckraker:{name:t("gov_trait_muckraker"),effect(){return t("gov_trait_muckraker_effect",[$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars(){return[8,12,3]}},athleticism:{name:t("gov_trait_athleticism"),effect(){return t("gov_trait_athleticism_effect",[$(this)[0].vars()[0],N($(this)[0].vars()[1]),$(this)[0].vars()[2],dr()])},vars(){return[1.5,2,4]}},nopain:{name:t("gov_trait_nopain"),effect(){return t("gov_trait_nopain_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[50,10]}},organizer:{name:t("gov_trait_organizer"),effect(){return t("gov_trait_organizer_effect",[$(this)[0].vars()[0]])},vars(){return[e.genes.governor&&e.genes.governor>=2?2:1]}}},Qc={humanoid:["Sanders","Smith","Geddon","Burgundy","Cristo","Crunch","Berg","Morros","Bower","Maximus"],carnivore:["Instinct","Prowl","Paws","Fluffy","Snarl","Claws","Fang","Stalker","Pounce","Sniff"],herbivore:["Sense","Grazer","Paws","Fluffy","Fern","Claws","Fang","Grass","Stampy","Sniff"],omnivore:["Pelt","Munchy","Paws","Fluffy","Snarl","Claws","Fang","Skavers","Pounce","Sniff"],small:["Bahgins","Banks","Shorty","Parte","Underfoot","Shrimp","Finkle","Littlefoot","Cub","Runt"],giant:["Slender","Titan","Colossus","Bean","Tower","Cloud","Bigfoot","Mountain","Crusher","Megaton"],reptilian:["Scale","Chimera","Ecto","Bask","Forks","Croc","Slither","Sunny","Coldfoot","Webtoe"],avian:["Sparrow","Soar","Shiney","Raven","Squaks","Eddy","Breeze","Flap","Kettle","Flock"],insectoid:["Compound","Centi","Hiver","Buzz","Carpace","Swarm","Devour","Carpi","Chitter","Burrow"],plant:["Grover","Blossom","Leaf","Sapper","Stem","Seed","Sprout","Greensly","Root","Fruit"],fungi:["Detritus","Psychedelic","Cap","Rotface","Patch","Spore","Infecto","Filament","Symbiote","Shade"],aquatic:["Seawolf","Finsley","Inko","Sucker","McBoatFace","Wave","Riptide","Shell","Coral","Pearl"],fey:["Whisper","Prank","Mischief","Flutter","Nature","Dirt","Story","Booker","Tales","Spirit"],heat:["Ash","Magnus","Pumice","Vulcano","Sweat","Flame","Lava","Ember","Smoke","Tinder","Spark"],polar:["Frosty","Snowball","Flake","Chiller","Frost","Cooler","Icecube","Arctic","Tundra","Avalanche"],sand:["Dune","Oasis","Sarlac","Spice","Quick","Grain","Spike","Storm","Glass","Castle"],demonic:["Yekun","Kesabel","Gadreel","Penemue","Abaddon","Azazyel","Leviathan","Samyaza","Kasyade","Typhon"],angelic:["Lightbringer","Illuminous","Sparks","Chrub","Halo","Star","Pompous","Radiant","Fluffy","Fabio"],synthetic:["HK47","D2R2","Bishop","Wally","Number5","Sunny","Data","Beta","Dot","Motoko"],eldritch:["Tentacle","Faceless","Horror","Darkness","Void","Dreamer","Mindflayer","Whisper","Paranoia","Empty"]};function Vc(r){let a=[],i=F[e.race.species].type,s=Object.keys(Na),n=JSON.parse(JSON.stringify(Qc[i]));r=r||s.length;for(let c=0;c=2&&(r.push(r.length),ge("organizer",0)&&r.push(r.length)),ge("organizer",0)&&r.push(r.length),r.forEach(function(a){_a[e.race.governor.tasks[`t${a}`]]&&_a[e.race.governor.tasks[`t${a}`]].req()&&_a[e.race.governor.tasks[`t${a}`]].task()})}}function Ot(){!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==0)||e.genes.governor&&e.tech.governor&&(le($("#r_govern1")),e.race.hasOwnProperty("governor")&&!e.race.governor.hasOwnProperty("candidates")?Gl():Rl())}function zs(){Object.keys(e.civic.foreign).forEach(function(r){let a=$(`#spyopConfig${r}`)[0];if(a){let i=Sortable.get(a);i&&i.destroy()}})}function Bl(r){let a=$(`#spyopConfig${r}`)[0];a&&Sortable.create(a,{onEnd(i){let s=e.race.governor.config.spyop[r];s.splice(i.newDraggableIndex,0,s.splice(i.oldDraggableIndex,1)[0]),e.race.governor.config.spyop[r]=s,Ot()}})}function Gl(){zs();let r=$('
');$("#r_govern1").append(r);let a=$('
');r.append(a);let i=$("
");i.append($(`${t("governor_office",[e.race.governor.g.n])}
`)),i.append($(`${t("governor_background")}: ${Na[e.race.governor.g.bg].name}
`)),a.append(i),a.append($(`${t("governor_fire")}
`));let s=[0,1,2];e.genes.governor&&e.genes.governor>=2&&(s.push(s.length),ge("organizer",0)&&s.push(s.length)),ge("organizer",0)&&s.push(s.length),s.forEach(function(c){let l=`{{ 'none' | label }} `;Object.keys(_a).forEach(function(o){_a[o].req()&&(l+=`{{ '${o}' | label }} `)}),r.append(`${t("gov_task",[c+1])}
+(()=>{var Se=window.localStorage,e={seed:1,warseed:1,resource:{},evolution:{},tech:{},city:{},space:{},interstellar:{},portal:{},tauceti:{},civic:{},race:{},genes:{},blood:{},stats:{start:Date.now(),days:0,tdays:0},event:{t:200,l:!1},m_event:{t:499,l:!1}},Je={},v={c:{},p:{}},Ht={},k={},U={},bt={},we={},pa={},xt=0,Kl=0,Nl=0,Xa={t:0};function Uc(r){xt=r}function xn(r){Kl=r}function kn(r){Nl=r}var mr={},Ca={},rr={view:"all"},Oa=["all","progress","queue","building_queue","research_queue","combat","spy","events","major_events","minor_events","achievements","hell"];Math.rand=function(r,a){return Math.floor(Math.random()*(a-r))+r};e.seed=2;e.warseed=2;function J(r,a,i){a=a||1,r=r||0,e[i?"warseed":"seed"]=(e[i?"warseed":"seed"]*9301+49297)%233280;let s=e[i?"warseed":"seed"]/233280;return r+s*(a-r)}{let r=Se.getItem("evolved")||!1;if(r){let a=JSON.parse(LZString.decompressFromUTF16(r));a?e=a:Hc()}else Hc()}e.version||(e.version="0.2.0");be(e.version)<2060&&Object.keys(e.resource).forEach(function(r){e.resource[r].crates&&(e.resource[r].crates=Math.ceil(e.resource[r].crates/5)),e.resource[r].containers&&(e.resource[r].containers=Math.ceil(e.resource[r].containers/5))});if(be(e.version)<2062&&e.civic.taxes!==void 0)switch(Number(e.civic.taxes.tax_rate)){case 0:e.civic.taxes.tax_rate=0;break;case 1:e.civic.taxes.tax_rate=10;break;case 2:e.civic.taxes.tax_rate=20;break;case 3:e.civic.taxes.tax_rate=30;break;case 4:e.civic.taxes.tax_rate=40;break;case 5:e.civic.taxes.tax_rate=50;break}be(e.version)===2062&&e.civic.taxes!==void 0&&e.civic.taxes.tax_rate==2&&(e.civic.taxes.tax_rate=20);be(e.version)<2065&&e.race!==void 0&&e.race.species==="sporgar"&&(delete e.race.crafty,delete e.race.hydrophilic,e.race.infectious=1,e.race.parasite=1,!e.tech.military&&e.tech.primitive&&e.tech.primitive>=3&&(e.civic.garrison.display=!0,e.settings.showCivic=!0,e.city.garrison={count:0}));be(e.version)<3002&&e.space&&(e.tech.space&&e.tech.space>=4&&(e.space.living_quarters||(e.space.living_quarters={count:0,on:0}),e.space.garage||(e.space.garage={count:0}),e.space.red_mine||(e.space.red_mine={count:0,on:0}),e.space.fabrication||(e.space.fabrication={count:0,on:0}),e.space.laboratory||(e.space.laboratory={count:0,on:0})),e.tech.space&&e.tech.space>=3&&(e.space.iridium_mine||(e.space.iridium_mine={count:0,on:0}),e.space.helium_mine||(e.space.helium_mine={count:0,on:0})),e.tech.hell&&(e.space.geothermal||(e.space.geothermal={count:0,on:0})));be(e.version)<3004&&e.settings&&e.settings.space&&e.settings.space.belt&&(e.space.space_station={count:0,on:0,support:0,s_max:0});be(e.version)<4001&&e.city&&e.city.factory&&!e.city.factory.Nano&&(e.city.factory.Nano=0);be(e.version)<4003&&e.stats.achieve&&Object.keys(e.stats.achieve).forEach(function(r){e.stats.achieve[r]=1});be(e.version)<4010&&e.stats.achieve&&e.stats.achieve.doomed&&(e.stats.portals=1);be(e.version)<4028&&e.stats.achieve&&e.stats.achieve.genus_demonic&&(e.stats.achieve.biome_hellscape=e.stats.achieve.genus_demonic);if(be(e.version)<4029&&e.race.mutation&&e.race.mutation>0){e.resource.Genes={name:"Genes",display:!0,value:0,amount:0,crates:0,diff:0,delta:0,max:-2,rate:0};for(let r=0;r=3&&(e.tech.wind_plant=1,e.tech.hunting=2);let r=["Human","Humano","Elf","Elfo","Orc","Cath","Wolven","Centaur","Centauro","Kobold","Goblin","Gnome","Ogre","Ogro","Cyclops","Ciclope","Troll","Tortoisan","Gecko","Slitheryn","Arraak","Pterodacti","Dracnid","Ent","Cacti","Sporgar","Shroomi","Mantis","Scorpid","Antid","Sharkin","Octigoran","Balorg","Imp"];for(let a=0;a0){let r=1;e.race.no_trade&&r++,e.race.no_craft&&r++,e.race.no_crispr&&r++,e.race.weak_mastery&&r++,e.stats.achieve.cross={l:r,a:r}}be(e.version)<7e3&&(e.civic.govern||(e.civic.govern={type:"oligarchy",rev:0,fr:0}));if(be(e.version)<7004&&e.queue&&e.queue.queue)for(let r=0;r"u"&&(e.civic.foreign.gov0.anx=!1),typeof e.civic.foreign.gov1.anx>"u"&&(e.civic.foreign.gov1.anx=!1),typeof e.civic.foreign.gov2.anx>"u"&&(e.civic.foreign.gov2.anx=!1),typeof e.civic.foreign.gov0.buy>"u"&&(e.civic.foreign.gov0.buy=!1),typeof e.civic.foreign.gov1.buy>"u"&&(e.civic.foreign.gov1.buy=!1),typeof e.civic.foreign.gov2.buy>"u"&&(e.civic.foreign.gov2.buy=!1));be(e.version)<8e3&&e.settings&&e.settings.hasOwnProperty("tLabels")&&delete e.settings.tLabels;be(e.version)<8003&&e.stats.harmony&&e.stats.harmony>0&&(e.stats.harmony=parseFloat(e.stats.harmony.toFixed(2)),e.race.Harmony.count=parseFloat(e.race.Harmony.count.toFixed(2)));be(e.version)<8017&&e.city.garrison&&(e.city.garrison.on=e.city.garrison.count);be(e.version)<9e3&&e.settings&&e.settings.showCity&&(e.settings.showCiv=e.settings.showCity);be(e.version)<9005&&e.race.hasOwnProperty("terrifying")&&e.tech.hasOwnProperty("gambling")&&!e.space.hasOwnProperty("spc_casino")&&(e.space.spc_casino={count:0,on:0});be(e.version)<9009&&e.genes.hasOwnProperty("ancients")&&e.genes.ancients>=3&&(e.genes.ancients===4?e.genes.ancients=5:e.race.Plasmid.count+=300);be(e.version)<9010&&(["species","gods","old_gods"].forEach(r=>{e.race[r]==="orge"&&(e.race[r]="ogre")}),e.stats.hasOwnProperty("achieve")&&e.stats.achieve.hasOwnProperty("extinct_orge")&&(e.stats.achieve.extinct_ogre=e.stats.achieve.extinct_orge,delete e.stats.achieve.extinct_orge),e.resource.hasOwnProperty("orge")&&(e.resource.ogre=e.resource.orge,delete e.resource.orge),e.city&&e.city.factory&&!e.city.factory.Furs&&(e.city.factory.Furs=0));be(e.version)<9014&&(["seraph","unicorn","custom"].forEach(r=>{e.race.species===r&&(r==="custom"&&e.hasOwnProperty("custom")&&e.custom.race0.genus==="angelic"||r!=="custom")&&(e.race.holy=1)}),e.hasOwnProperty("arpa")&&e.arpa.hasOwnProperty("sequence")&&(e.arpa.sequence.labs=0));be(e.version)<1e5&&(delete e.city.lumber,delete e.city.stone,e.stats.dark=0,e.race.Dark&&(e.stats.dark=e.race.Dark.count),e.city.hasOwnProperty("smelter")&&(e.city.smelter.hasOwnProperty("Star")||(e.city.smelter.Star=0),e.city.smelter.hasOwnProperty("StarCap")||(e.city.smelter.StarCap=0),e.city.smelter.hasOwnProperty("Inferno")||(e.city.smelter.Inferno=0)),e.hasOwnProperty("warseed")||(e.warseed=e.seed+1,Math.war=e.hasOwnProperty("warseed")?e.warseed:e.seed),e.portal.hasOwnProperty("bireme")&&(e.portal.bireme.crew=0,e.portal.bireme.mil=0),e.portal.hasOwnProperty("transport")&&(e.portal.transport.crew=0,e.portal.transport.mil=0,e.portal.transport.cargo||(e.portal.transport.cargo={used:0,max:0,Crystal:0,Lumber:0,Stone:0,Furs:0,Copper:0,Iron:0,Aluminium:0,Cement:0,Coal:0,Oil:0,Uranium:0,Steel:0,Titanium:0,Alloy:0,Polymer:0,Iridium:0,Helium_3:0,Deuterium:0,Neutronium:0,Adamantite:0,Infernite:0,Elerium:0,Nano_Tube:0,Graphene:0,Stanene:0,Bolognium:0,Vitreloy:0,Orichalcum:0,Plywood:0,Brick:0,Wrought_Iron:0,Sheet_Metal:0,Mythril:0,Aerogel:0,Nanoweave:0,Scarletite:0})),e.hasOwnProperty("settings")&&e.settings.portal&&e.settings.portal.spire&&!e.portal.hasOwnProperty("purifier")&&(e.settings.portal.spire=!1),e.portal.hasOwnProperty("mechbay")&&!Array.isArray(e.portal.mechbay.mechs)&&(e.portal.mechbay.mechs=[]),e.portal.transport&&e.portal.transport.count>=1&&!e.tech.hell_spire&&(e.tech.hell_spire=1,e.settings.portal.spire=!0,e.settings.showCargo=!0,e.portal.purifier={count:0,on:0,support:0,s_max:0,supply:0,sup_max:100,diff:0},e.portal.port={count:0,on:0}),e.tech.hasOwnProperty("waygate")&&!e.portal.hasOwnProperty("waygate")&&delete e.tech.waygate,e.hasOwnProperty("blood")||(e.blood={}));be(e.version)<100013&&e.hasOwnProperty("settings")&&e.settings.hasOwnProperty("showPowerGrid")&&e.hasOwnProperty("race")&&e.race.infiltrator&&e.hasOwnProperty("tech")&&e.tech.hasOwnProperty("high_tech")&&e.tech.high_tech>=2&&(e.settings.showPowerGrid=!0);if(be(e.version)<100014&&(e.race.Dark&&(e.stats.dark=e.race.Dark.count),e.race.casting&&e.race.evil&&(e.race.casting.total-=e.race.casting.lumberjack,e.race.casting.lumberjack=0),e.queue&&e.queue.queue))for(let r=0;r=2,events:!0,major_events:!0,minor_events:!0,achievements:e.stats.achieve&&Object.keys(e.stats.achieve).length>0||e.stats.feat&&Object.keys(e.stats.feat).length>0,hell:e.settings.showPortal||e.stats.blackhole||e.stats.ascend||e.stats.descend}),e.race.hasOwnProperty("inflation")&&["supercollider","stock_exchange","launch_facility","monuments","railway","roid_eject","nexus","syphon"].forEach(function(r){e.tech.hasOwnProperty(r)&&(e.race.inflation+=e.tech[r]*10)}));be(e.version)<101012&&e.civic.garrison&&(e.civic.garrison.rate=0);if(be(e.version)<101014&&(e.hasOwnProperty("settings")&&e.settings.hasOwnProperty("msgFilters")&&Object.keys(e.settings.msgFilters).forEach(function(r){e.settings.msgFilters[r]={unlocked:!!e.settings.msgFilters[r],vis:!!e.settings.msgFilters[r],max:60,save:3}}),e.hasOwnProperty("lastMsg")&&e.lastMsg)){let r={};Oa.forEach(function(a){r[a]=[]}),e.lastMsg.forEach(function(a){a.t?a.t.forEach(function(i){r[i].push({m:a.m,c:a.c})}):r.all.push({m:a.m,c:a.c})}),e.lastMsg=r}be(e.version)<=101014&&!e.revision&&e.race.cataclysm&&e.race.universe&&e.race.universe==="magic"&&e.tech.magic&&e.tech.magic>=2&&(e.space.pylon={count:0});be(e.version)<101015&&e.hasOwnProperty("special")&&e.special.hasOwnProperty("trick")&&(e.special.trick[2020]=JSON.parse(JSON.stringify(e.special.trick)),delete e.special.trick.trick1,delete e.special.trick.trick2,delete e.special.trick.trick3,delete e.special.trick.trick4,delete e.special.trick.trick5,delete e.special.trick.trick6,delete e.special.trick.trick7,delete e.special.trick.trick8,delete e.special.trick.trick9,delete e.special.trick.trick10,delete e.special.trick.trick11,delete e.special.trick.trick12);be(e.version)<102e3&&(e.hasOwnProperty("portal")&&e.portal.hasOwnProperty("fortress")&&!e.portal.fortress.hasOwnProperty("nocrew")&&(e.portal.fortress.nocrew=!1),e.city.hasOwnProperty("smelter")&&!e.city.smelter.hasOwnProperty("Iridium")&&(e.city.smelter.Iridium=0),e.hasOwnProperty("portal")&&e.portal.hasOwnProperty("mechbay")&&!e.portal.mechbay.hasOwnProperty("active")&&(e.portal.mechbay.active=0,e.portal.mechbay.scouts=0));be(e.version)<102001&&(e.race.blood_thirst&&e.race.blood_thirst>3&&(e.race.blood_thirst=1),e.race.rainbow&&e.race.rainbow>3&&(e.race.rainbow=1));be(e.version)<102005&&!e.stats.cores&&e.race.hasOwnProperty("AICore")&&(e.stats.cores=e.race.AICore.count);be(e.version)<102006&&e.race.artifical&&(e.race.calm&&(e.resource.hasOwnProperty("Zen")&&(e.resource.Zen.display=!0),e.city.meditation={count:0}),e.race.cannibalize&&(e.city.s_alter={count:0,rage:0,mind:0,regen:0,mine:0,harvest:0}),e.race.magnificent&&(e.city.shrine={count:0,morale:0,metal:0,know:0,tax:0}));be(e.version)<102007&&e.stats.hasOwnProperty("achieve")&&delete e.stats.achieve.extinct_sludge;be(e.version)<102012&&(e.city.hasOwnProperty("ptrait")&&(e.city.ptrait=e.city.ptrait==="none"?[]:[e.city.ptrait]),e.tech.hell_ruins&&e.tech.hell_ruins>=3&&(e.tech.hell_vault=1));if(be(e.version)<102015){if(e.race.hasOwnProperty("governor")&&e.race.governor.hasOwnProperty("tasks"))for(let r in e.race.governor.tasks)e.race.governor.tasks[r]==="asssemble"&&(e.race.governor.tasks[r]="assemble");e.settings&&e.settings.hasOwnProperty("restoreCheck")&&delete e.settings.restoreCheck}be(e.version)<102017&&(e.portal.hasOwnProperty("fortress")&&(e.portal.observe={settings:{expanded:!1,average:!1,hyperSlow:!1,display:"game_days",dropKills:!0,dropGems:!0},stats:{total:{start:{year:e.city.calendar.year,day:e.city.calendar.day},days:0,wounded:0,died:0,revived:0,surveyors:0,sieges:0,kills:{drones:0,patrols:0,sieges:0,guns:0,soul_forge:0,turrets:0},gems:{patrols:0,guns:0,soul_forge:0,crafted:0,turrets:0}},period:{start:{year:e.city.calendar.year,day:e.city.calendar.day},days:0,wounded:0,died:0,revived:0,surveyors:0,sieges:0,kills:{drones:0,patrols:0,sieges:0,guns:0,soul_forge:0,turrets:0},gems:{patrols:0,guns:0,soul_forge:0,crafted:0,turrets:0}}},graphID:0,graphs:{}}),e.tech.hasOwnProperty("genetics")&&e.tech.genetics>1&&e.hasOwnProperty("arpa")&&(e.arpa.hasOwnProperty("sequence")||(e.arpa.sequence={max:5e4,progress:0,time:5e4,on:!1}),e.arpa.sequence.boost||(e.arpa.sequence.boost=!1),e.arpa.sequence.auto||(e.arpa.sequence.auto=!1),e.arpa.sequence.labs||(e.arpa.sequence.labs=0)));if(be(e.version)<102021&&e.hasOwnProperty("custom")&&!e.custom.hasOwnProperty("race0")){let r=e.race.hasOwnProperty("species")?e.race.species:"protoplasm";e.galaxy.hasOwnProperty("alien1")&&e.galaxy.alien1.id==="custom"&&(e.galaxy.alien1.id=r==="human"?"elven":"human"),e.galaxy.hasOwnProperty("alien2")&&e.galaxy.alien2.id==="custom"&&(e.galaxy.alien2.id=r==="orc"||e.galaxy.alien1.id==="orc"?"cath":"orc")}be(e.version)<103e3&&(e.hasOwnProperty("tauceti")||(e.tauceti={}),e.race.species==="protoplasm"&&(e.evolution.hasOwnProperty("sexual_reproduction")&&(e.tech.evo=e.evolution.sexual_reproduction.count>0?2:1,delete e.evolution.sexual_reproduction),[["phagocytosis",{evo:3,evo_animal:1}],["chloroplasts",{evo:3,evo_plant:1}],["chitin",{evo:3,evo_fungi:1}],["exterminate",{evo:7,evo_synthetic:2}],["multicellular",{evo:4}],["spores",{evo:5}],["poikilohydric",{evo:5}],["bilateral_symmetry",{evo:5,evo_insectoid:1,evo_mammals:1,evo_eggshell:1,evo_aquatic:1,evo_fey:1,evo_sand:1,evo_heat:1,evo_polar:1}],["bryophyte",{evo:7}],["athropods",{evo:7,evo_insectoid:2}],["mammals",{evo:6,evo_humanoid:1,evo_giant:1,evo_small:1,evo_animalism:1,evo_demonic:1,evo_angelic:1}],["humanoid",{evo:7,evo_humanoid:2}],["gigantism",{evo:7,evo_giant:2}],["dwarfism",{evo:7,evo_small:2}],["animalism",{evo:7,evo_animalism:2}],["carnivore",{evo_animalism:3,evo_carnivore:2}],["herbivore",{evo_animalism:3,evo_herbivore:2}],["omnivore",{evo_animalism:3,evo_omnivore:2}],["celestial",{evo:7,evo_angelic:2}],["demonic",{evo:7,evo_demonic:2}],["aquatic",{evo:7,evo_aquatic:2}],["fey",{evo:7,evo_fey:2}],["heat",{evo:7,evo_heat:2}],["polar",{evo:7,evo_polar:2}],["sand",{evo:7,evo_sand:2}],["eggshell",{evo:6,evo_eggshell:2}],["endothermic",{evo:7,evo_avian:2}],["ectothermic",{evo:7,evo_reptilian:2}],["bunker",{evo_challenge:1}]].forEach(function(r){if(e.evolution.hasOwnProperty(r[0])&&e.evolution[r[0]].count>0)for(let[a,i]of Object.entries(r[1]))e.tech[a]=i;delete e.evolution[r[0]]}),e.evolution.mloaded=1,e.evolution.gmloaded=1));be(e.version)<103001&&(e.hasOwnProperty("prestige")||(e.prestige={}),e.race.Plasmid&&e.race.Plasmid.hasOwnProperty("anti")&&(e.prestige.AntiPlasmid={count:e.race.Plasmid.anti}),["Plasmid","Phage","AICore","Dark","Harmony"].forEach(function(r){e.race.hasOwnProperty(r)&&(e.prestige[r]={count:e.race[r].count},delete e.race[r])}),["Artifact","Blood_Stone"].forEach(function(r){e.resource.hasOwnProperty(r)&&(e.prestige[r]={count:e.resource[r].amount},delete e.resource[r])}),!e.stats.hasOwnProperty("synth")&&e.race.hasOwnProperty("srace")&&(e.stats.synth={},e.stats.synth[e.race.srace]=!0),e.race.hasOwnProperty("governor")&&e.race.governor.hasOwnProperty("config")&&e.race.governor.config.hasOwnProperty("trash")&&["Infernite","Elerium","Copper","Iron"].forEach(function(r){e.race.governor.config.trash.hasOwnProperty(r)&&typeof e.race.governor.config.trash[r]=="number"&&(e.race.governor.config.trash[r]={v:e.race.governor.config.trash[r],s:!0})}));be(e.version)<103002&&e.portal.hasOwnProperty("observe")&&e.portal.observe.hasOwnProperty("stats")&&(e.portal.observe.stats.period.gems.surveyors=0,e.portal.observe.stats.total.gems.surveyors=0);be(e.version)<103011&&e.city.hasOwnProperty("slave_pen")&&e.city.slave_pen.hasOwnProperty("slaves")&&(e.resource.Slave.amount=e.city.slave_pen.slaves,delete e.city.slave_pen.slaves);be(e.version)<103014&&(e.race.cataclysm&&!e.race.start_cataclysm&&(e.civic.craftsman.display=!0),e.race.lone_survivor&&(e.tauceti.tau_factory&&e.tauceti.tau_factory.count>0||e.tauceti.womling_station&&e.tauceti.womling_station.count>0)&&(e.civic.craftsman.display=!0));e.version="1.3.13";e.revision="b";delete e.beta;e.hasOwnProperty("prestige")||(e.prestige={});["Plasmid","AntiPlasmid","Phage","Dark","Harmony","AICore","Artifact","Blood_Stone"].forEach(function(r){e.prestige.hasOwnProperty(r)||(e.prestige[r]={count:0})});e.hasOwnProperty("power")||(e.power=[]);e.hasOwnProperty("support")||(e.support={});["moon","red","belt","alpha","nebula","gateway","alien2","lake","spire","titan","enceladus","eris","tau_home","tau_red","tau_roid"].forEach(function(r){e.support.hasOwnProperty(r)||(e.support[r]=[])});e.civic.cement_worker&&e.civic.cement_worker.impact===.25&&(e.civic.cement_worker.impact=.4);e.settings||(e.settings={showEvolve:!0,showAchieve:!1,animated:!0,disableReset:!1,font:"standard",q_merge:"merge_nearby",cLabels:!0,theme:"gruvboxDark",locale:"en-US",icon:"star"});e.settings.space||(e.settings.space={});e.settings.space.hasOwnProperty("home")||(e.settings.space.home=!0);Wc(!1);e.settings.icon||(e.settings.icon="star");e.settings.showResources||(e.settings.showResources=e.settings.showMarket);e.settings.showStorage||(e.city.warehouse||e.city.storage_yard?e.settings.showStorage=!0:e.settings.showStorage=!1);e.settings.hasOwnProperty("touch")||(e.settings.touch=!1);e.settings.hasOwnProperty("lowPowerBalance")||(e.settings.lowPowerBalance=!1);e.queue||(e.queue={display:!1,queue:[]});e.r_queue||(e.r_queue={display:!1,queue:[]});e.queue.rename||(e.queue.rename=!1);e.queue.max||(e.queue.max=0);e.r_queue.max||(e.r_queue.max=0);e.queue.pause||(e.queue.pause=!1);e.r_queue.pause||(e.r_queue.pause=!1);e.lastMsg||(e.lastMsg={});e.settings.msgFilters||(e.settings.msgFilters={});["all","progress","events","major_events","minor_events"].forEach(function(r){e.settings.msgFilters[r]||(e.settings.msgFilters[r]={unlocked:!0,vis:!0,max:60,save:3})});Oa.forEach(function(r){e.lastMsg[r]||(e.lastMsg[r]=[]),e.settings.msgFilters[r]||(e.settings.msgFilters[r]={unlocked:!1,vis:!1,max:60,save:3})});e.settings.msgQueueHeight||(e.settings.msgQueueHeight=$("#msgQueue").outerHeight(),e.settings.buildQueueHeight=$("#buildQueue").outerHeight());e.space||(e.space={});e.starDock||(e.starDock={});e.interstellar||(e.interstellar={});e.galaxy||(e.galaxy={});e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Bolognium&&(e.interstellar.mass_ejector.Bolognium=0);e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Vitreloy&&(e.interstellar.mass_ejector.Vitreloy=0);e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Orichalcum&&(e.interstellar.mass_ejector.Orichalcum=0);e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Nanoweave&&(e.interstellar.mass_ejector.Nanoweave=0);e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Scarletite&&(e.interstellar.mass_ejector.Scarletite=0);e.hasOwnProperty("pillars")||(e.pillars={});e.settings.space.alpha||(e.settings.space.alpha=!1,e.settings.space.proxima=!1,e.settings.space.nebula=!1,e.settings.space.neutron=!1,e.settings.space.blackhole=!1);e.settings.showAchieve||(e.settings.showAchieve=!1);e.settings.locale||(e.settings.locale="en-US");typeof e.settings.pause>"u"&&(e.settings.pause=!1);typeof e.settings.mKeys>"u"&&(e.settings.mKeys=!0);typeof e.settings.keyMap>"u"&&(e.settings.keyMap={x10:"Control",x25:"Shift",x100:"Alt",q:"q"});typeof e.settings.keyMap.showCiv>"u"&&(e.settings.keyMap.showCiv="1",e.settings.keyMap.showCivic="2",e.settings.keyMap.showResearch="3",e.settings.keyMap.showResources="4",e.settings.keyMap.showGenetics="5",e.settings.keyMap.showAchieve="6",e.settings.keyMap.settings="7");delete e.settings.keyMap.d;typeof e.settings.qAny>"u"&&(e.settings.qAny=!1);typeof e.settings.sPackOn>"u"&&(e.settings.sPackOn=!0);typeof e.settings.qAny_res>"u"&&(e.settings.qAny_res=!1);typeof e.settings.sPackMsg>"u"&&(e.settings.sPackMsg=!1);typeof e.settings.expose>"u"&&(e.settings.expose=!1);typeof e.settings.alwaysPower>"u"&&(e.settings.alwaysPower=!1);typeof e.settings.tabLoad>"u"&&(e.settings.tabLoad=!1);typeof e.settings.boring>"u"&&(e.settings.boring=!1);e.settings.hasOwnProperty("mtorder")||(e.settings.mtorder=[]);function qn(){["reset","plasmid","antiplasmid","universes","phage","starved","tstarved","died","tdied","sac","tsac","know","tknow","portals","dkills","attacks","cfood","tfood","cstone","tstone","clumber","tlumber","mad","bioseed","cataclysm","blackhole","ascend","descend","terraform","aiappoc","matrix","retire","eden","geck","dark","harmony","blood","cores","artifact","cattle","tcattle","murders","tmurders","psykill","tpsykill"].forEach(function(r){e.stats.hasOwnProperty(r)||(e.stats[r]=0)}),e.stats.achieve||(e.stats.achieve={}),e.stats.feat||(e.stats.feat={}),e.stats.hasOwnProperty("womling")||(e.stats.womling={god:{l:0},lord:{l:0},friend:{l:0}}),e.stats.spire||(e.stats.spire={}),e.stats.synth||(e.stats.synth={}),e.stats.hasOwnProperty("banana")||(e.stats.banana={b1:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b2:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b3:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b4:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b5:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1}}),e.stats.hasOwnProperty("endless_hunger")||(e.stats.endless_hunger={b1:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b2:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b3:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b4:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b5:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1}})}qn();e.race.seeded||(e.race.seeded=!1);e.race.deterioration||(e.race.deterioration=0);e.race.gene_fortify||(e.race.gene_fortify=0);e.race.old_gods||(e.race.old_gods="none");e.race.universe||(e.race.universe="standard");e.genes.minor||(e.genes.minor={});e.race.minor||(e.race.minor={});e.hasOwnProperty("govern")||(e.govern={governor:{},candidate:[],policy:{}});e.settings.hasOwnProperty("showMil")||(e.settings.showMil=!0);e.settings.hasOwnProperty("showPowerGrid")||(e.settings.showPowerGrid=!!(e.hasOwnProperty("tech")&&e.tech.hasOwnProperty("high_tech")&&e.tech.high_tech>=2));e.settings.affix||(e.settings.affix="si");e.special||(e.special={});e.special.gift||(e.special.gift={});e.special.hasOwnProperty("egg")||(e.special.egg={});e.special.hasOwnProperty("trick")||(e.special.trick={trick1:!1,trick2:!1,trick3:!1,trick4:!1,trick5:!1,trick6:!1,trick7:!1,trick8:!1,trick9:!1,trick10:!1,trick11:!1,trick12:!1});e.civic.govern||(e.civic.govern={type:"oligarchy",rev:2e3,fr:0});e.civic.govern.fr=0;e.hasOwnProperty("custom")||(e.custom={});e.custom.hasOwnProperty("planet")&&e.custom.planet.hasOwnProperty("biome")&&delete e.custom.planet;e.city.hasOwnProperty("smelter")&&!e.city.smelter.hasOwnProperty("cap")&&(e.city.smelter.cap=0);e.civic.homeless||(e.civic.homeless=0);e.civic.foreign||(e.civic.foreign={gov0:{unrest:0,hstl:100,mil:100,eco:75,spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov1:{unrest:0,hstl:0,mil:150,eco:100,spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov2:{unrest:0,hstl:50,mil:250,eco:150,spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1}});typeof e.civic.foreign.gov0.trn>"u"&&(e.civic.foreign.gov0.trn=0,e.civic.foreign.gov1.trn=0,e.civic.foreign.gov2.trn=0,e.civic.foreign.gov0.sab=0,e.civic.foreign.gov1.sab=0,e.civic.foreign.gov2.sab=0,e.civic.foreign.gov0.act="none",e.civic.foreign.gov1.act="none",e.civic.foreign.gov2.act="none");typeof e.civic.foreign.gov0.name<"u"&&e.civic.foreign.gov0.name.s1==="evo_organism_title"&&(e.civic.foreign.gov0.name.s1="Northern");typeof e.civic.foreign.gov1.name<"u"&&e.civic.foreign.gov1.name.s1==="evo_organism_title"&&(e.civic.foreign.gov1.name.s1="Southern");typeof e.civic.foreign.gov2.name<"u"&&e.civic.foreign.gov2.name.s1==="evo_organism_title"&&(e.civic.foreign.gov2.name.s1="Divine");if(!e.race.evil&&e.race.immoral&&e.race!==void 0&&e.race.species!=="wendigo")delete e.race.immoral;else if(e.race!==void 0&&e.race.species==="wendigo"){let r=new Date;e.settings.hasOwnProperty("boring")&&!e.settings.boring&&r.getMonth()===11&&r.getDate()>=17&&(e.race.immoral=3)}if(e.hasOwnProperty("special")&&e.special.hasOwnProperty("gift")){let r=new Date(e.stats.start),a=new Date;Object.keys(e.special.gift).forEach(function(i){let s=Number(i.substring(1,5));(s=1?e.civic.d_job="farmer":e.civic.d_job="unemployed");e.settings.animated=!0;e.settings.disableReset=!1;e.arpa&&e.arpa.launch_facility&&e.arpa.launch_facility.rank>0&&!e.tech.space&&(e.tech.space=1);function Hc(){e.race={species:"protoplasm",gods:"none",old_gods:"none",seeded:!1},e.seed=Math.rand(0,1e4),e.warseed=Math.rand(0,1e4),e.new=!0}var kr={x10:!1,x25:!1,x100:!1,q:!1};function fe(){let r=1;return e.settings.mKeys&&(kr.x10&&(r*=10),kr.x25&&(r*=25),kr.x100&&(r*=100)),r}function be(r){let a=r.split(".",3);return a[0]*=1e5,a[1]*=1e3,Number(a[0])+Number(a[1])+Number(a[2])}function Ti(){if($(window).width()>=1400&&$("#msgQueue:not(.right)")){let r=$("#buildQueue").detach();r.addClass("right"),r.removeClass("has-text-info");let a=$("#msgQueue").detach();a.addClass("right"),a.removeClass("has-text-info"),a.css("resize","none"),$("#queueColumn").addClass("is-one-quarter"),$("#queueColumn").append(r),$("#queueColumn").append(a),$("#mainColumn").removeClass("is-three-quarters"),$("#mainColumn").addClass("is-half")}else if($(window).width()<1400&&$("#msgQueue").hasClass("right")){let r=$("#buildQueue").detach();r.removeClass("right"),r.addClass("has-text-info");let a=$("#msgQueue").detach();a.removeClass("right"),a.addClass("has-text-info"),a.css("resize","vertical"),$("#queueColumn").removeClass("is-one-quarter"),$("#sideQueue").append(r),$("#sideQueue").append(a),$("#mainColumn").removeClass("is-half"),$("#mainColumn").addClass("is-three-quarters")}}var Ya={si:["K","M","G","T","P","E","Z","Y"],sci:["e3","e6","e9","e12","e15","e18","e21","e24"],sln:["K","M","B","t","q","Q","s","S"]};function Ee(r,a,i){let s=0,n="",c=r<0;return c&&(r*=-1),r<=9999?s=+r.toFixed(a):r<1e6?(n=Ya[e.settings.affix][0],s=i?+(r/1e3).toFixed(1):Math.floor(r/100)/10):r<1e9?(n=Ya[e.settings.affix][1],s=i?+(r/1e6).toFixed(1):Math.floor(r/1e4)/100):r<1e12?(n=Ya[e.settings.affix][2],s=i?+(r/1e9).toFixed(1):Math.floor(r/1e7)/100):r<1e15?(n=Ya[e.settings.affix][3],s=i?+(r/1e12).toFixed(1):Math.floor(r/1e10)/100):r<1e18?(n=Ya[e.settings.affix][4],s=i?+(r/1e15).toFixed(1):Math.floor(r/1e13)/100):r<1e21?(n=Ya[e.settings.affix][5],s=i?+(r/1e18).toFixed(1):Math.floor(r/1e16)/100):r<1e24?(n=Ya[e.settings.affix][6],s=i?+(r/1e21).toFixed(1):Math.floor(r/1e19)/100):(n=Ya[e.settings.affix][7],s=i?+(r/1e24).toFixed(1):Math.floor(r/1e22)/100),s>=100&&(s=+s.toFixed(1)),c&&(s*=-1),s+n}$(window).resize(function(){Ti()});function ss(r,a){var i=document.createElement("div"),s="speak-"+Date.now();i.setAttribute("id",s),i.setAttribute("aria-live",a||"polite"),i.classList.add("sr-only"),document.body.appendChild(i),window.setTimeout(function(){document.getElementById(s).innerHTML=r},100),window.setTimeout(function(){document.body.removeChild(document.getElementById(s))},1e3)}window.soft_reset=function(a){try{a=a&&a==="replicator"?"replicator":"soft",gtag("event","reset",{end:a})}catch{}a||Kr();let i=e.race.hasOwnProperty("srace")?e.race.srace:!1,s=e.race.hasOwnProperty("geck")?e.race.geck:0;e.race.hasOwnProperty("gecked")&&(s+=e.race.gecked,e.stats.geck-=e.race.gecked);let n={species:"protoplasm",universe:e.race.universe,seeded:e.race.seeded,probes:e.race.probes,seed:e.race.seed,ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1,rejuvenated:e.race.hasOwnProperty("rejuvenated")?e.race.rejuvenated:!1};s>0&&(n.geck=s),i&&(n.srace=i),e.race.bigbang&&(n.bigbang=!0),e.race.gods&&(n.gods=e.race.gods),e.race.old_gods&&(n.old_gods=e.race.old_gods),e.race.rapid_mutation&&e.race.rapid_mutation>0&&(n.rapid_mutation=e.race.rapid_mutation),e.race.ancient_ruins&&e.race.ancient_ruins>0&&(n.ancient_ruins=e.race.ancient_ruins),e.race.bigbang&&(n.universe="bigbang"),e.race.hasOwnProperty("corruption")&&(n.corruption=e.race.corruption),e.race=n;let c=e.city.calendar.orbit,l=e.city.biome,o=e.city.ptrait,d=e.city.geology;e.city={calendar:{day:0,year:0,weather:2,temp:1,moon:0,wind:0,orbit:c},biome:l,ptrait:o,geology:d},e.tech.theology&&e.tech.theology>=1?e.tech={theology:1}:e.tech={},Mn(),e.new=!0,e.seed=Math.rand(0,1e4),e.warseed=Math.rand(0,1e4),e.stats.current=Date.now(),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()};var Pe={w:!1,s:!1,mt:250},Ka={};function Kr(){Oa.forEach(function(r){r!=="achievements"&&(e.lastMsg[r]=[])})}function Wc(r){let a={base:["showCiv","showCity","showIndustry","showPowerGrid","showMechLab","showShipYard","showResearch","showCivic","showMil","showResources","showMarket","showStorage","showGenetics","showSpace","showDeep","showGalactic","showPortal","showOuter","showTau","showEjector","showCargo","showAlchemy","showGovernor","arpa","showPsychic"],space:["moon","red","hell","sun","gas","gas_moon","belt","dwarf","alpha","proxima","nebula","neutron","blackhole","sirius","stargate","gateway","gorddon","alien1","alien2","chthonian","titan","enceladus","triton","eris","kuiper"],portal:["fortress","badlands","pit","ruins","gate","lake","spire"],tau:["home","red","roid","gas","gas2","star"]};Object.keys(a).forEach(function(i){i==="base"?a[i].forEach(function(s){(!e.settings.hasOwnProperty(s)||r)&&(e.settings[s]=!1)}):(e.settings.hasOwnProperty(i)||(e.settings[i]={}),a[i].forEach(function(s){(!e.settings[i].hasOwnProperty(s)||r)&&(e.settings[i][s]=!1)}))}),["civTabs","govTabs","govTabs2","hellTabs","resTabs","spaceTabs","marketTabs","statsTabs"].forEach(function(i){(!e.settings.hasOwnProperty(i)||r)&&(e.settings[i]=0)})}function Mn(){Pe.w&&Pe.w.terminate(),e.queue={display:!1,queue:[]},e.r_queue={display:!1,queue:[]},e.space={},e.interstellar={},e.galaxy={},e.portal={},e.starDock={},e.tauceti={},e.civic={new:0},e.civic.foreign={gov0:{unrest:0,hstl:Math.floor(J(80,100)),mil:Math.floor(J(75,125)),eco:Math.floor(J(60,90)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov1:{unrest:0,hstl:Math.floor(J(0,20)),mil:Math.floor(J(125,175)),eco:Math.floor(J(80,120)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov2:{unrest:0,hstl:Math.floor(J(40,60)),mil:Math.floor(J(200,300)),eco:Math.floor(J(130,170)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1}},e.genes.blood||(e.prestige.Blood_Stone.count=0),e.resource={},e.evolution={},e.event={t:100,l:!1},e.m_event={t:499,l:!1},e.stats.days=0,e.stats.know=0,e.stats.starved=0,e.stats.died=0,e.stats.attacks=0,e.stats.dkills=0,e.stats.cfood=0,e.stats.cstone=0,e.stats.clumber=0,e.stats.sac=0,e.stats.cattle=0,e.stats.murders=0,e.settings.at=0,e.settings.showEvolve=!0,e.settings.space.home=!0,Wc(!0),e.settings.disableReset=!1,e.settings.pause=!1,e.arpa={},delete e.race.hrt,e.genes.queue&&(e.tech.queue=1,e.queue.display=!0)}window.reset=function(){try{gtag("event","reset",{end:"hard"})}catch{}localStorage.removeItem("evolved"),e=null,Pe.w&&Pe.w.terminate(),window.location.reload()};var Pn;Dl(e.settings.locale);function t(r,a){let i=Pn[r];if(!i)return e.settings.expose&&(console.error(`string ${r} not found`),console.log(Pn)),r;if(a)if(a instanceof Array){for(let c=0;c{a=s}),r!="en-US"){let s;try{$.getJSON(`strings/strings.${r}.json`,c=>{s=c})}catch(c){console.error(c,c.stack)}let n=a.length;s&&Object.assign(a,s),a.length!=n&&e.settings.expose&&console.error(`string.${r}.json has extra keys.`)}let i=Se.getItem("string_pack")||!1;if(i&&e.settings.sPackOn){let s;try{s=JSON.parse(LZString.decompressFromUTF16(i))}catch(c){console.error(c,c.stack)}let n=a.length;s&&Object.assign(a,s),a.length!=n&&e.settings.expose&&console.error("string pack has extra keys.")}$.ajaxSetup({async:!0}),Pn=a}var ns={"en-US":"English (US)","es-ES":"Spanish (ESP)","pt-BR":"Portugu\xEAs (BR)","de-DE":"Deutsch","it-IT":"Italiano","ru-RU":"\u0420\u0443\u0441\u0441\u043A\u0438\u0439","cs-CZ":"\u010Ce\u0161tina","pl-PL":"Polski","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","ko-KR":"\uD55C\uAD6D\uC5B4","im-PL":"Igpay-Atinlay"};var Na={soldier:{name:t("governor_soldier"),desc:t("governor_soldier_desc"),title:[t("governor_soldier_t1"),t("governor_soldier_t2"),t("governor_soldier_t3")],traits:{tactician:1,militant:1}},criminal:{name:t("governor_criminal"),desc:t("governor_criminal_desc"),title:[t("governor_criminal_t1"),t("governor_criminal_t2"),{m:t("governor_criminal_t3m"),f:t("governor_criminal_t3f")}],traits:{noquestions:1,racketeer:1}},entrepreneur:{name:t("governor_entrepreneur"),desc:t("governor_entrepreneur_desc"),title:[t("governor_entrepreneur_t1"),t("governor_entrepreneur_t2"),{m:t("governor_entrepreneur_t3m"),f:t("governor_entrepreneur_t3f")}],traits:{dealmaker:1,risktaker:1}},educator:{name:t("governor_educator"),desc:t("governor_educator_desc"),title:[t("governor_educator_t1"),t("governor_educator_t2"),t("governor_educator_t3")],traits:{teacher:1,theorist:1}},spiritual:{name:t("governor_spiritual"),desc:t("governor_spiritual_desc"),title:[t("governor_spiritual_t1"),t("governor_spiritual_t2"),t("governor_spiritual_t3")],traits:{inspirational:1,pious:1}},bluecollar:{name:t("governor_bluecollar"),desc:t("governor_bluecollar_desc"),title:[{m:t("governor_bluecollar_t1m"),f:t("governor_bluecollar_t1f")},t("governor_bluecollar_t2"),{m:t("governor_bluecollar_t3m"),f:t("governor_bluecollar_t3f")}],traits:{pragmatist:1,dirty_jobs:1}},noble:{name:t("governor_noble"),desc:t("governor_noble_desc"),title:[{m:t("governor_noble_t1m"),f:t("governor_noble_t1f")},{m:t("governor_noble_t2m"),f:t("governor_noble_t2f")},{m:t("governor_noble_t3m"),f:t("governor_noble_t3f")},{m:t("governor_noble_t4m"),f:t("governor_noble_t4f")}],traits:{extravagant:1,aristocrat:1}},media:{name:t("governor_media"),desc:t("governor_media_desc"),title:[t("governor_media_t1"),{m:t("governor_media_t2m"),f:t("governor_media_t2f")},t("governor_media_t3")],traits:{gaslighter:1,muckraker:1}},sports:{name:t("governor_sports"),desc:t("governor_sports_desc"),title:[t("governor_sports_t1"),t("governor_sports_t2"),t("governor_sports_t3")],traits:{athleticism:1,nopain:1}},bureaucrat:{name:t("governor_bureaucrat"),desc:t("governor_bureaucrat_desc"),title:[t("governor_bureaucrat_t1"),{m:t("governor_bureaucrat_t2m"),f:t("governor_bureaucrat_t2f")},t("governor_bureaucrat_t3")],traits:{organizer:1}}},cs={tactician:{name:t("gov_trait_tactician"),effect(){return t("gov_trait_tactician_effect",[$(this)[0].vars()[0]])},vars(){return[25]}},militant:{name:t("gov_trait_militant"),effect(){return t("gov_trait_militant_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[25,10]}},noquestions:{name:t("gov_trait_noquestions"),effect(){return t("gov_trait_noquestions_effect",[$(this)[0].vars()[0]])},vars(){return[.005]}},racketeer:{name:t("gov_trait_racketeer"),effect(){return t("gov_trait_racketeer_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[20,35]}},dealmaker:{name:t("gov_trait_dealmaker"),effect(){return t("gov_trait_dealmaker_effect",[$(this)[0].vars()[0]])},vars(){return[125]}},risktaker:{name:t("gov_trait_risktaker"),effect(){return t("gov_trait_risktaker_effect",[$(this)[0].vars()[0]])},vars(){return[12]}},teacher:{name:t("gov_trait_teacher"),effect(){return t("gov_trait_teacher_effect",[$(this)[0].vars()[0]])},vars(){return[6]}},theorist:{name:t("gov_trait_theorist"),effect(){return t("gov_trait_theorist_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[50,4]}},inspirational:{name:t("gov_trait_inspirational"),effect(){return t("gov_trait_inspirational_effect",[$(this)[0].vars()[0]])},vars(){return[20]}},pious:{name:t("gov_trait_pious"),effect(){let r=$(this)[0].vars()[1],a=e.tech.monument&&e.tech.monument>=3&&k.s_gate?3:1;return r=(e.civic.govern.type==="corpocracy"?r*2:r)*a,t("gov_trait_pious_effect",[$(this)[0].vars()[0],r])},vars(){return[10,5]}},pragmatist:{name:t("gov_trait_pragmatist"),effect(){return t("gov_trait_pragmatist_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[50,2]}},dirty_jobs:{name:t("gov_trait_dirty_jobs"),effect(){return t("gov_trait_dirty_jobs_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars(){return[.015,1,10]}},extravagant:{name:t("gov_trait_extravagant"),effect(){return t("gov_trait_extravagant_effect",[$(this)[0].vars()[0],St("large",!0),$(this)[0].vars()[1],N($(this)[0].vars()[2]+5)])},vars(){return[10,1.25,1]}},aristocrat:{name:t("gov_trait_aristocrat"),effect(){return t("gov_trait_aristocrat_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars(){return[50,20,10]}},gaslighter:{name:t("gov_trait_gaslighter"),effect(){return t("gov_trait_gaslighter_effect",[$(this)[0].vars()[0],dr(),$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars(){return[1,1,.5]}},muckraker:{name:t("gov_trait_muckraker"),effect(){return t("gov_trait_muckraker_effect",[$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars(){return[8,12,3]}},athleticism:{name:t("gov_trait_athleticism"),effect(){return t("gov_trait_athleticism_effect",[$(this)[0].vars()[0],N($(this)[0].vars()[1]),$(this)[0].vars()[2],dr()])},vars(){return[1.5,2,4]}},nopain:{name:t("gov_trait_nopain"),effect(){return t("gov_trait_nopain_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[50,10]}},organizer:{name:t("gov_trait_organizer"),effect(){return t("gov_trait_organizer_effect",[$(this)[0].vars()[0]])},vars(){return[e.genes.governor&&e.genes.governor>=2?2:1]}}},Qc={humanoid:["Sanders","Smith","Geddon","Burgundy","Cristo","Crunch","Berg","Morros","Bower","Maximus"],carnivore:["Instinct","Prowl","Paws","Fluffy","Snarl","Claws","Fang","Stalker","Pounce","Sniff"],herbivore:["Sense","Grazer","Paws","Fluffy","Fern","Claws","Fang","Grass","Stampy","Sniff"],omnivore:["Pelt","Munchy","Paws","Fluffy","Snarl","Claws","Fang","Skavers","Pounce","Sniff"],small:["Bahgins","Banks","Shorty","Parte","Underfoot","Shrimp","Finkle","Littlefoot","Cub","Runt"],giant:["Slender","Titan","Colossus","Bean","Tower","Cloud","Bigfoot","Mountain","Crusher","Megaton"],reptilian:["Scale","Chimera","Ecto","Bask","Forks","Croc","Slither","Sunny","Coldfoot","Webtoe"],avian:["Sparrow","Soar","Shiney","Raven","Squaks","Eddy","Breeze","Flap","Kettle","Flock"],insectoid:["Compound","Centi","Hiver","Buzz","Carpace","Swarm","Devour","Carpi","Chitter","Burrow"],plant:["Grover","Blossom","Leaf","Sapper","Stem","Seed","Sprout","Greensly","Root","Fruit"],fungi:["Detritus","Psychedelic","Cap","Rotface","Patch","Spore","Infecto","Filament","Symbiote","Shade"],aquatic:["Seawolf","Finsley","Inko","Sucker","McBoatFace","Wave","Riptide","Shell","Coral","Pearl"],fey:["Whisper","Prank","Mischief","Flutter","Nature","Dirt","Story","Booker","Tales","Spirit"],heat:["Ash","Magnus","Pumice","Vulcano","Sweat","Flame","Lava","Ember","Smoke","Tinder","Spark"],polar:["Frosty","Snowball","Flake","Chiller","Frost","Cooler","Icecube","Arctic","Tundra","Avalanche"],sand:["Dune","Oasis","Sarlac","Spice","Quick","Grain","Spike","Storm","Glass","Castle"],demonic:["Yekun","Kesabel","Gadreel","Penemue","Abaddon","Azazyel","Leviathan","Samyaza","Kasyade","Typhon"],angelic:["Lightbringer","Illuminous","Sparks","Chrub","Halo","Star","Pompous","Radiant","Fluffy","Fabio"],synthetic:["HK47","D2R2","Bishop","Wally","Number5","Sunny","Data","Beta","Dot","Motoko"],eldritch:["Tentacle","Faceless","Horror","Darkness","Void","Dreamer","Mindflayer","Whisper","Paranoia","Empty"]};function Vc(r){let a=[],i=A[e.race.species].type,s=Object.keys(Na),n=JSON.parse(JSON.stringify(Qc[i]));r=r||s.length;for(let c=0;c=2&&(r.push(r.length),ge("organizer",0)&&r.push(r.length)),ge("organizer",0)&&r.push(r.length),r.forEach(function(a){_a[e.race.governor.tasks[`t${a}`]]&&_a[e.race.governor.tasks[`t${a}`]].req()&&_a[e.race.governor.tasks[`t${a}`]].task()})}}function Ot(){!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==0)||e.genes.governor&&e.tech.governor&&(le($("#r_govern1")),e.race.hasOwnProperty("governor")&&!e.race.governor.hasOwnProperty("candidates")?Gl():Rl())}function zs(){Object.keys(e.civic.foreign).forEach(function(r){let a=$(`#spyopConfig${r}`)[0];if(a){let i=Sortable.get(a);i&&i.destroy()}})}function Bl(r){let a=$(`#spyopConfig${r}`)[0];a&&Sortable.create(a,{onEnd(i){let s=e.race.governor.config.spyop[r];s.splice(i.newDraggableIndex,0,s.splice(i.oldDraggableIndex,1)[0]),e.race.governor.config.spyop[r]=s,Ot()}})}function Gl(){zs();let r=$('
');$("#r_govern1").append(r);let a=$('
');r.append(a);let i=$("
");i.append($(`${t("governor_office",[e.race.governor.g.n])}
`)),i.append($(`${t("governor_background")}: ${Na[e.race.governor.g.bg].name}
`)),a.append(i),a.append($(`${t("governor_fire")}
`));let s=[0,1,2];e.genes.governor&&e.genes.governor>=2&&(s.push(s.length),ge("organizer",0)&&s.push(s.length)),ge("organizer",0)&&s.push(s.length),s.forEach(function(c){let l=`{{ 'none' | label }} `;Object.keys(_a).forEach(function(o){_a[o].req()&&(l+=`{{ '${o}' | label }} `)}),r.append(`${t("gov_task",[c+1])}
{{ t.t${c} | label }}
@@ -18,7 +18,7 @@
`);let d=$(`#spyopConfig${l}`);e.race.governor.config.spyop[l].forEach(function(h){d.append(`
${t("civics_spy_"+h)}
- `)})}})}{e.race.governor.config.hasOwnProperty("tax")||(e.race.governor.config.tax={min:20});let c=$(``);n.append(c);let l=$('
');c.append(l),l.append($(`${t("gov_task_tax_min")} `))}{e.race.governor.config.hasOwnProperty("slave")||(e.race.governor.config.slave={reserve:100});let c=$(``);n.append(c);let l=$('
');c.append(l),l.append($(`${t("gov_task_merc_reserve")} `))}{e.race.governor.config.hasOwnProperty("trash")||(e.race.governor.config.trash={}),["Infernite","Elerium","Copper","Iron"].forEach(function(o){(!e.race.governor.config.trash.hasOwnProperty(o)||typeof e.race.governor.config.trash[o]!="object"||e.race.governor.config.trash[o]===null)&&(e.race.governor.config.trash[o]={v:0,s:!0})});let c=$(``);n.append(c);let l=$('
');c.append(l),Object.keys(e.race.governor.config.trash).forEach(function(o){l.append($(`
`))})}{e.race.governor.config.hasOwnProperty("replicate")||(e.race.governor.config.replicate={}),e.race.governor.config.replicate.hasOwnProperty("pow")||(e.race.governor.config.replicate.pow={on:!1,cap:1e4,buffer:0}),e.race.governor.config.replicate.hasOwnProperty("res")||(e.race.governor.config.replicate.res={que:!0,neg:!0,cap:!0});let c=$(`${t("gov_task_replicate")}
`);n.append(c);let l=$('
');c.append(l),l.append($(`${t("gov_task_replicate_auto")}
`)),l.append($(`${t("gov_task_replicate_pmax")} `)),l.append($(`${t("gov_task_replicate_buff")} `));let o=$('
');c.append(o),o.append($(`${t("gov_task_replicate_que")}
`)),o.append($(`${t("gov_task_replicate_neg")}
`)),o.append($(`${t("gov_task_replicate_cap")}
`))}D({el:"#govOffice",data:{t:e.race.governor.tasks,c:e.race.governor.config,r:e.resource},methods:{setTask(c,l){e.race.governor.tasks[`t${l}`]=c,wt("govtask",{task:c}),D({el:"#race"},"update")},showTask(c){return Object.values(e.race.governor.tasks).includes(c)},activeTask(c){let l=[];return e.race.hasOwnProperty("governor")&&Object.keys(e.race.governor.tasks).forEach(function(o){e.race.governor.tasks[o]!=="none"&&l.push(e.race.governor.tasks[o])}),!l.includes(c)},showStrRes(c){return e.resource[c].display},bStrEx(){return e.race.governor.config.bal_storage.adv?"m":""},fire(){let l=(10+(e.race.governor.hasOwnProperty("f")?e.race.governor.f:0))**2-50,o=e.race.universe==="antimatter"?"AntiPlasmid":"Plasmid";e.prestige[o].count>=l&&(e.prestige[o].count-=l,e.race.governor.candidates=Vc(10),e.race.governor.hasOwnProperty("f")?e.race.governor.f++:e.race.governor.f=1,delete e.race.governor.g,delete e.race.governor.tasks,Qr(!1,["city-amphitheatre","city-apartment"]),zr(),ra(),Ot())},fireText(){let l=(10+(e.race.governor.hasOwnProperty("f")?e.race.governor.f:0))**2-50;return`${t("governor_fire")}
${l} ${t(e.race.universe==="antimatter"?"resource_AntiPlasmid_plural_name":"resource_Plasmid_plural_name")}
`},trashStrat(c){e.race.governor.config.trash[c].s=!e.race.governor.config.trash[c].s},trashLabel(c){return t(e.race.governor.config.trash[c].s?"gov_task_trash_max":"gov_task_trash_min",[e.resource[c].name])}},filters:{label(c){return _a[c]?typeof _a[c].name=="string"?_a[c].name:_a[c].name():t(`gov_task_${c}`)}}}),pe("govOffice",function(){let c="";return Object.keys(Na[e.race.governor.g.bg].traits).forEach(function(l){c+=(cs[l].hasOwnProperty("effect")?cs[l].effect():"")+" "}),c},{elm:"#govOffice .bg"}),Object.keys(e.civic.foreign).forEach(function(c){Bl(c)})}function Rl(){let r=$('
');$("#r_govern1").append(r),(!e.race.hasOwnProperty("governor")||!e.race.governor.hasOwnProperty("candidates"))&&(e.race.governor={candidates:Vc(10)}),r.append($(`
- `)}var Yt={spc_home:{info:{name(){return F[e.race.species].home},desc:t("space_home_info_desc"),zone:"inner",syndicate(){return!1}},test_launch:{id:"space-test_launch",title:t("space_home_test_launch_title"),desc:t("space_home_test_launch_desc"),reqs:{space:1},grant:["space",2],queue_complete(){return e.tech.space>=2?0:1},cost:{Money(){return 1e5},Oil(r,a){return Fe(7500,!1,a)}},effect:t("space_home_test_launch_effect"),action(){if(u($(this)[0])){if(e.race.truepath){let r=1;if(_r("gov0")||r++,_r("gov1")||r++,_r("gov2")||r++,Math.floor(J(0,r))!==0)return I(t("space_home_test_launch_action_fail"),"danger",!1,["progress"]),0}return e.space.satellite={count:0},I(t("space_home_test_launch_action"),"info",!1,["progress"]),!0}return!1}},satellite:{id:"space-satellite",title:t("space_home_satellite_title"),desc:t("space_home_satellite_desc"),reqs:{space:2},cost:{Money(r){return f("satellite",r,72e3,1.22)},Knowledge(r){return f("satellite",r,28e3,1.22)},Oil(r,a){return f("satellite",r,Fe(3200,!1,a),1.22)},Alloy(r){return f("satellite",r,8e3,1.22)}},effect(){let r=e.race.cataclysm||e.race.orbit_decayed?2e3:750;if((e.race.cataclysm||e.race.orbit_decayed)&&e.tech.supercollider){let n=e.tech.particles&&e.tech.particles>=3?5:10;r*=e.tech.supercollider/n+1}let a=e.race.cataclysm?t("space_moon_observatory_title"):e.race.orbit_decayed?t("city_university"):dr(),i=e.race.cataclysm?25:e.race.orbit_decayed?12:4,s=`${t("space_home_satellite_effect2",[a,i])}
`;return`${t("plus_max_resource",[r,t("resource_Knowledge_name")])}
${s}${t("space_home_satellite_effect3",[e.civic.scientist?e.civic.scientist.name:t("job_scientist")])}
`},action(){return u($(this)[0])?(ne("satellite"),e.resource.Knowledge.max+=750,!0):!1}},gps:{id:"space-gps",title:t("space_home_gps_title"),desc(){return e.space.hasOwnProperty("gps")&&e.space.gps.count<4?`${t("space_home_gps_desc")}
${t("space_home_gps_desc_req")}
`:`${t("space_home_gps_desc")}
`},reqs:{satellite:1},not_trait:["terrifying"],cost:{Money(r){return f("gps",r,75e3,1.18)},Knowledge(r){return f("gps",r,5e4,1.18)},Copper(r){return f("gps",r,6500,1.18)},Oil(r,a){return f("gps",r,Fe(3500,!1,a),1.18)},Titanium(r){return f("gps",r,8e3,1.18)}},effect(r){return(r||0)+(e.space.hasOwnProperty("gps")?e.space.gps.count:0)<4?t("space_home_gps_effect_req"):`${t("space_home_gps_effect")}
${t("space_home_gps_effect2",[2])}
`},action(){return u($(this)[0])?(ne("gps"),!0):!1}},propellant_depot:{id:"space-propellant_depot",title:t("space_home_propellant_depot_title"),desc:t("space_home_propellant_depot_desc"),reqs:{space_explore:1},cost:{Money(r){return f("propellant_depot",r,55e3,1.35)},Aluminium(r){return f("propellant_depot",r,22e3,1.35)},Oil(r,a){return f("propellant_depot",r,Fe(5500,!1,a),1.35)}},effect(){let r=H(1250)*(e.tech.world_control?1.5:1);if(e.resource.Helium_3.display){let a=H(1e3)*(e.tech.world_control?1.5:1);return`${t("plus_max_resource",[r,t("resource_Oil_name")])}
${t("plus_max_resource",[a,t("resource_Helium_3_name")])}
`}return`${t("plus_max_resource",[r,t("resource_Oil_name")])}
`},action(){return u($(this)[0])?(ne("propellant_depot"),e.resource.Oil.max+=H(1250)*(e.tech.world_control?1.5:1),e.resource.Helium_3.display&&(e.resource.Helium_3.max+=H(1e3)*(e.tech.world_control?1.5:1)),!0):!1}},nav_beacon:{id:"space-nav_beacon",title(){return e.race.orbit_decayed?t("space_home_broadcast_beacon_title"):t("space_home_nav_beacon_title")},desc:`${t("space_home_nav_beacon_desc")}
${t("requires_power")}
`,reqs:{luna:2},cost:{Money(r){return f("nav_beacon",r,75e3,1.32)},Copper(r){return f("nav_beacon",r,38e3,1.32)},Aluminium(r){return f("nav_beacon",r,44e3,1.32)},Oil(r,a){return f("nav_beacon",r,Fe(12500,!1,a),1.32)},Iridium(r){return f("nav_beacon",r,1200,1.32)}},powered(){return _e(2)},powerBalancer(){return e.tech.luna&&e.tech.luna>=3?[{s:e.space.moon_base.s_max-e.space.moon_base.support},{s:e.space.spaceport.s_max-e.space.spaceport.support}]:[{s:e.space.moon_base.s_max-e.space.moon_base.support}]},support(){return 1},effect(){let r="";e.race.orbit_decayed&&e.tech.broadcast&&(r=`${t("space_red_vr_center_effect1",[e.tech.broadcast/2])}
`);let a=e.race.orbit_decayed?"":`${t("space_home_nav_beacon_effect1")}
`,i=e.tech.luna>=3?`${t("space_red_spaceport_effect1",[W().red,1])}
`:"";return`${a}${i}${r}${t("space_home_nav_beacon_effect2",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("nav_beacon"),re($(this)[0]),!0):!1}}},spc_moon:{info:{name:t("space_moon_info_name"),desc(){let r=F[e.race.species].home;return t("space_moon_info_desc",[r])},support:"moon_base",zone:"inner",syndicate(){return!0}},moon_mission:{id:"space-moon_mission",title:t("space_moon_mission_title"),desc:t("space_moon_mission_desc"),reqs:{space:2,space_explore:2},grant:["space",3],queue_complete(){return e.tech.space>=3?0:1},cost:{Oil(r,a){return+Fe(12e3,!1,a).toFixed(0)}},effect:t("space_moon_mission_effect"),action(){return u($(this)[0])?(I(t("space_moon_mission_action"),"info",!1,["progress"]),e.space.iridium_mine={count:0,on:0},e.space.helium_mine={count:0,on:0},!0):!1}},moon_base:{id:"space-moon_base",title:t("space_moon_base_title"),desc(){return`${t("space_moon_base_desc")}
${t("requires_power_combo",[e.resource.Oil.name])}
`},reqs:{space:3},cost:{Money(r){return f("moon_base",r,22e3,1.32)},Cement(r){return f("moon_base",r,18e3,1.32)},Alloy(r){return f("moon_base",r,7800,1.32)},Polymer(r){return f("moon_base",r,12500,1.32)}},effect(r){let a=H(500),i=+Fe($(this)[0].support_fuel().a,!0,r).toFixed(2);return`${t("space_moon_base_effect1")}
${t("plus_max_resource",[a,t("resource_Iridium_name")])}
${t("space_moon_base_effect3",[i,$(this)[0].powered()])}
`},support(){return 2},support_fuel(){return{r:"Oil",a:2}},powered(){return _e(4)},powerBalancer(){return[{s:e.space.moon_base.s_max-e.space.moon_base.support}]},refresh:!0,action(){if(u($(this)[0])){if(ne("moon_base"),re($(this)[0]),e.space.moon_base.count===1&&(e.tech.moon=1),!e.tech.luna&&(e.tech.luna=1,e.race.truepath)){let r=t("space_moon_base_msg",[ut(3)]);e.civic.foreign.gov3.hstl<10?r=`${r} ${t("space_moon_base_msg_ally")}`:e.civic.foreign.gov3.hstl>60&&(r=`${r} ${t("space_moon_base_msg_hstl")}`),I(r,"info",!1,["progress"])}return e.race.orbit_decay&&e.race.orbit_decay>e.stats.days+2500&&(e.race.orbit_decay=e.stats.days+2500,I(t("evo_challenge_orbit_decayed_accelerated",[e.race.orbit_decay-e.stats.days]),"info",!1,["progress"])),!0}return!1}},iridium_mine:{id:"space-iridium_mine",title:t("space_moon_iridium_mine_title"),desc:`${t("space_moon_iridium_mine_desc")}
${t("space_support",[t("space_moon_info_name")])}
`,reqs:{space:3,luna:1},cost:{Money(r){return f("iridium_mine",r,42e3,1.35)},Lumber(r){return f("iridium_mine",r,9e3,1.35)},Titanium(r){return f("iridium_mine",r,17500,1.35)}},effect(){let r=T("iridium_mine","iridium"),a=+r.b.toFixed(3),i="";e.race.truepath&&(e.civic.foreign.gov3.hstl<10?i=`${t("space_rival_ally",[+(r.g*100).toFixed(1)])}
`:e.civic.foreign.gov3.hstl>60&&(i=`${t("space_rival_war",[+(r.g*100).toFixed(1)])}
`));let s=e.race.cataclysm?`${t("produce",[+T("iridium_mine","coal").toFixed(2),e.resource.Coal.name])}
`:"",n=e.race.cataclysm?`${t("produce",[+(T("iridium_mine","coal")/48).toFixed(3),e.resource.Uranium.name])}
`:"";return`${t("space_used_support",[t("space_moon_info_name")])}
${t("space_moon_iridium_mine_effect",[a])}
${i}${s}${n}`},s_type:"moon",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.resource.Iridium.display=!0,ne("iridium_mine"),e.resource.Mythril.display||(e.resource.Mythril.display=!0,Lt()),re($(this)[0]),!0):!1}},helium_mine:{id:"space-helium_mine",title:t("space_moon_helium_mine_title"),desc:`${t("space_moon_helium_mine_desc")}
${t("space_support",[t("space_moon_info_name")])}
`,reqs:{space:3,luna:1},cost:{Money(r){return f("helium_mine",r,38e3,1.35)},Aluminium(r){return f("helium_mine",r,9e3,1.35)},Steel(r){return f("helium_mine",r,17500,1.35)}},effect(){let r=H(100),a=T("helium_mine"),i=+a.b.toFixed(3),s="";return e.race.truepath&&(e.civic.foreign.gov3.hstl<10?s=`${t("space_rival_ally",[+(a.g*100).toFixed(1)])}
`:e.civic.foreign.gov3.hstl>60&&(s=`${t("space_rival_war",[+(a.g*100).toFixed(1)])}
`)),`${t("space_used_support",[t("space_moon_info_name")])}
${t("space_moon_helium_mine_effect",[i])}
${s}${t("plus_max_resource",[r,t("resource_Helium_3_name")])}
`},s_type:"moon",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.resource.Helium_3.display=!0,ne("helium_mine"),re($(this)[0]),!0):!1}},observatory:{id:"space-observatory",title:t("space_moon_observatory_title"),desc:`${t("space_moon_observatory_desc")}
${t("space_support",[t("space_moon_info_name")])}
`,reqs:{science:9,luna:1},cost:{Money(r){return f("observatory",r,2e5,1.28)},Knowledge(r){return f("observatory",r,69e3,1.28)},Stone(r){return f("observatory",r,125e3,1.28)},Iron(r){return f("observatory",r,65e3,1.28)},Iridium(r){return f("observatory",r,1250,1.28)}},effect(){let r="";e.race.cataclysm&&(r=`${t("city_university_effect",[N(1)])}
`);let a=5e3;e.race.cataclysm&&e.space.satellite&&e.space.satellite.count>0&&(a*=1+e.space.satellite.count*.25);let i=e.race.cataclysm?`${t("space_moon_observatory_cata_effect",[25])}
`:`${t("space_moon_observatory_effect",[5])}
`;return`${t("space_used_support",[t("space_moon_info_name")])}
${r}${t("plus_max_resource",[a,t("resource_Knowledge_name")])}
${i}`},s_type:"moon",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("observatory"),re($(this)[0]),!0):!1}}},spc_red:{info:{name(){return W().red},desc(){return t("space_red_info_desc",[W().red])},support:"spaceport",zone:"inner",syndicate(){return!0}},red_mission:{id:"space-red_mission",title(){return t("space_mission_title",[W().red])},desc(){return t("space_mission_desc",[W().red])},reqs:{space:3,space_explore:3},grant:["space",4],queue_complete(){return e.tech.space>=4?0:1},cost:{Helium_3(r,a){return+Fe(4500,!1,a).toFixed(0)}},effect(){return t("space_red_mission_effect",[W().red])},action(){return u($(this)[0])?(I(t("space_red_mission_action",[W().red]),"info",!1,["progress"]),e.space.living_quarters={count:0,on:0},e.space.garage={count:0},e.space.red_mine={count:0,on:0},e.space.fabrication={count:0,on:0},!0):!1}},spaceport:{id:"space-spaceport",title:t("space_red_spaceport_title"),desc(){return`${t("space_red_spaceport_desc")}
${t("requires_power_space",[e.resource.Food.name])}
`},reqs:{space:4},cost:{Money(r){return f("spaceport",r,47500,1.32)},Iridium(r){return f("spaceport",r,1750,1.32)},Mythril(r){return f("spaceport",r,25,1.32)},Titanium(r){return f("spaceport",r,22500,1.32)}},effect(r){let a=+Fe($(this)[0].support_fuel().a,!0,r).toFixed(2),i="";if(e.race.cataclysm||e.race.orbit_decayed){let s=H(Fr()*4);i=`${t("plus_max_resource",[`$${s}`,t("resource_Money_name")])}
`}return`${t("space_red_spaceport_effect1",[W().red,$(this)[0].support()])}
${i}${t("space_red_spaceport_effect2",[a,$(this)[0].powered()])}
${t("spend",[e.race.cataclysm?2:25,e.resource.Food.name])}
`},support(){let r=e.race.cataclysm||e.race.orbit_decayed?4:3;return e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=4&&r++,r},support_fuel(){return{r:"Helium_3",a:1.25}},powered(){return _e(5)},powerBalancer(){return[{s:e.space.spaceport.s_max-e.space.spaceport.support}]},refresh:!0,action(){if(u($(this)[0])){if(ne("spaceport"),re($(this)[0]),e.tech.mars||(e.tech.mars=1),e.race.orbit_decay&&e.race.orbit_decay>e.stats.days+1e3&&(e.race.orbit_decay=e.stats.days+1e3,I(t("evo_challenge_orbit_decayed_accelerated",[e.race.orbit_decay-e.stats.days]),"info",!1,["progress"])),e.race.fasting){let r=it();e.stats.endless_hunger.b1[r]=!0,r!=="m"&&r!=="l"&&(e.stats.endless_hunger.b1.l=!0)}return!0}return!1}},red_tower:{id:"space-red_tower",title:t("space_red_tower_title"),desc(){return`${t("space_red_tower_desc")}
${t("requires_power")}
`},reqs:{mars:3},cost:{Money(r){return f("red_tower",r,225e3,1.28)},Iron(r){return f("red_tower",r,22e3,1.28)},Cement(r){return f("red_tower",r,15e3,1.28)},Alloy(r){return f("red_tower",r,8e3,1.28)}},effect(){return`${t("space_red_spaceport_effect1",[W().red,e.race.cataclysm?2:1])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(2)},powerBalancer(){return[{s:e.space.spaceport.s_max-e.space.spaceport.support}]},support(){return e.race.cataclysm?2:1},action(){return u($(this)[0])?(ne("red_tower"),re($(this)[0]),!0):!1}},captive_housing:hr("captive_housing","space"),terraformer:{id:"space-terraformer",title:t("space_terraformer"),desc(r){return!e.space.hasOwnProperty("terraformer")||e.space.terraformer.count<100||r?`${t("space_terraformer")}
${t("requires_segments",[100])}
`+(e.space.hasOwnProperty("terraformer")&&e.space.terraformer.count>=100?`${t("requires_power")}
`:""):`${t("space_terraformer")}
`},reqs:{terraforming:1},condition(){return!(e.space.terraformer.count>=100)},queue_size:5,queue_complete(){return 100-e.space.terraformer.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?75e5:75e6:0},Alloy(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?25e4:75e4:0},Neutronium(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?125e3:0},Elerium(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?1e3:0},Bolognium(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?0:1e5:0},Orichalcum(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?12e3:25e4:0},Soul_Gem(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?0:1:0},Nanoweave(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?0:75e3:0},Quantium(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100&&e.race.truepath?75e3:0},Cipher(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100&&e.race.truepath?1e3:0}},effect(r){let a=(r?r.count:0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0);if(a<100){let i=100-a;return`${t("space_terraformer_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return Yt.spc_red.atmo_terraformer.effect(r)},action(){return u($(this)[0])&&e.space.terraformer.count<100?(ne("terraformer","space"),e.space.terraformer.count>=100&&(e.tech.terraforming=2,e.space.atmo_terraformer={count:1,on:0},Pt(),Ie()),!0):!1}},atmo_terraformer:{id:"space-atmo_terraformer",title:t("space_terraformer"),desc(){return`${t("space_terraformer")}
${t("requires_power")}
`},wiki:!1,reqs:{terraforming:2},condition(){return e.space.terraformer.count>=100},queue_complete(){return 0},cost:{},powered(r){return _e((r?r.truepath:e.race.truepath)?500:5e3)},postPower(r){r?setTimeout(function(){e.tech.terraforming=k.atmo_terraformer?3:2,Pt()},250):(e.tech.terraforming=2,Pt())},effect(r){let a=Eo(),i=$(this)[0].powered(r),s=i>0?`${t("minus_power",[i])}
`:"";return`${t("space_terraformer_effect2")}
${a}${s}`},action(){return!1}},terraform:{id:"space-terraform",title:t("space_terraform"),desc:t("space_terraform"),reqs:{terraforming:3},queue_complete(){return 0},no_multi:!0,cost:{},effect(){let r=Eo();return`${t("space_terraform_effect")}
${r}`},action(){return u($(this)[0])?(Jn(),!0):!1}},assembly:hr("assembly","space"),living_quarters:{id:"space-living_quarters",title:t("space_red_living_quarters_title"),desc(){return`${t("space_red_living_quarters_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:1},cost:{Money(r){return f("living_quarters",r,rc(38e3),1.28)},Steel(r){return f("living_quarters",r,rc(15e3),1.28)},Polymer(r){return f("living_quarters",r,rc(9500),1.28)},Horseshoe(){return e.race.hooved?2:0}},effect(){let r=$(this)[0].citizens(),a="";if(e.race.cataclysm||e.race.orbit_decayed){let i=H(e.tech.home_safe>=2?e.tech.home_safe>=3?"100000":"50000":"25000");a=`${t("plus_max_resource",[`$${i}`,t("resource_Money_name")])}
`}return`${t("space_used_support",[W().red])}
${a}${t("plus_max_resource",[N(1),e.race.truepath?t("job_colonist_tp",[W().red]):t("colonist")])}
${t("plus_max_resource",[r,t("citizen")])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){if(u($(this)[0])){if(ne("living_quarters"),e.civic.colonist.display=!0,re($(this)[0])){e.resource[e.race.species].max+=N(1);let r=N(1);e.civic.colonist.max+=r;let a=Math.min(r,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=a,e.civic.colonist.workers+=a}return!0}return!1},citizens(){let r=e.race.cataclysm||e.race.orbit_decayed?2:1;if(U.biodome){let a=e.tech.mars>=6?.1:.05;r+=a*U.biodome}return+N(r).toFixed(2)}},pylon:{id:"space-pylon",title:t("space_red_pylon"),desc:t("space_red_pylon"),reqs:{magic:2},condition(){return!!(e.race.cataclysm||e.race.orbit_decayed)},cost:{Money(r){return f("pylon",r,10,1.48)},Stone(r){return f("pylon",r,12,1.42)},Crystal(r){return f("pylon",r,8,1.42)-3}},effect(){let r=H(2),a=+(.005*ft("magic")).toFixed(3);return`${t("gain",[a,e.resource.Mana.name])}
${t("plus_max_resource",[r,e.resource.Mana.name])}
`},special(){return!!(e.tech.magic&&e.tech.magic>=3)},action(){return u($(this)[0])?(e.space.pylon.count++,e.resource.Mana.max+=H(2),!0):!1}},vr_center:{id:"space-vr_center",title:t("space_red_vr_center_title"),desc(){return`${t("space_red_vr_center_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:1,broadcast:3},cost:{Money(r){return f("vr_center",r,38e4,1.25)},Copper(r){return f("vr_center",r,55e3,1.25)},Stanene(r){return f("vr_center",r,1e5,1.25)},Soul_Gem(r){return f("vr_center",r,1,1.25)}},effect(){let r=ge("gaslighter",1),a=r?r+1:1;return e.race.orbit_decayed&&(a+=2),`${t("space_used_support",[W().red])}
${t("space_red_vr_center_effect1",[a])}
${t("space_red_vr_center_effect2",[2])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("vr_center"),re($(this)[0]),!0):!1}},garage:{id:"space-garage",title:t("space_red_garage_title"),desc(){return`${t("space_red_garage_desc")}
`},reqs:{mars:1},cost:{Money(r){return f("garage",r,75e3,1.28)},Iron(r){return f("garage",r,12e3,1.28)},Brick(r){return f("garage",r,3e3,1.28)},Sheet_Metal(r){return f("garage",r,1500,1.28)}},wide:!0,res(){let r=["Copper","Iron","Cement","Steel","Titanium","Alloy","Nano_Tube","Neutronium","Infernite"];return(e.race.cataclysm||e.race.orbit_decayed)&&(r.push("Polymer"),r.push("Coal"),r.push("Lumber"),r.push("Chrysotile"),r.push("Stone"),r.push("Furs")),r},heavy(r){return!!["Copper","Iron","Steel","Titanium","Neutronium","Infernite"].includes(r)},val(r){switch(r){case"Copper":return 6500;case"Iron":return 5500;case"Cement":return e.race.cataclysm?10500:6e3;case"Steel":return 4500;case"Titanium":return 3500;case"Alloy":return 2500;case"Nano_Tube":return 25e3;case"Neutronium":return 125;case"Infernite":return 75;case"Polymer":return 2500;case"Coal":return 1500;case"Lumber":return 7500;case"Chrysotile":return 7500;case"Stone":return 7500;case"Furs":return 2200;default:return 0}},multiplier(r){let a=e.tech.particles>=4?1+e.tech.supercollider/20:1;return(e.tech.world_control||e.race.cataclysm||e.race.orbit_decayed)&&(a*=2),e.tech.shelving&&e.tech.shelving>=3&&(a*=1.5),a*=e.stats.achieve.blackhole?1+e.stats.achieve.blackhole.l*.05:1,r&&e.tech.shelving&&e.tech.shelving>=2?a*3:a},effect(){let r=$(this)[0].multiplier(!1),a=$(this)[0].multiplier(!0),i=e.tech.particles>=4?20+e.tech.supercollider:20;(e.tech.world_control||e.race.cataclysm||e.race.orbit_decayed)&&(i+=10);let s=e.race.cataclysm||e.race.orbit_decayed?`${t("plus_max_resource",[i,t("resource_Crates_name")])} `:"",n='';n=n+`${t("plus_max_resource",[i,t("resource_Containers_name")])} ${s}`;for(let c of $(this)[0].res())if(e.resource[c].display){let l=$(this)[0].heavy(c),o=Ee(+(H($(this)[0].val(c))*(l?a:r)).toFixed(0),1);n=n+`${t("plus_max_resource",[o,e.resource[c].name])} `}return n=n+"
",n},action(){if(u($(this)[0])){ne("garage");let r=e.tech.particles>=4?20+e.tech.supercollider:20;(e.tech.world_control||e.race.cataclysm||e.race.orbit_decayed)&&(r+=10),e.resource.Containers.max+=r,e.resource.Containers.display||Yr();let a=$(this)[0].multiplier(!1),i=$(this)[0].multiplier(!0);for(let s of $(this)[0].res())if(e.resource[s].display){let n=$(this)[0].heavy(s);e.resource[s].max+=H($(this)[0].val(s))*(n?i:a)}return!0}return!1}},red_mine:{id:"space-red_mine",title:t("space_red_mine_title"),desc(){return`${t("space_red_mine_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:1},cost:{Money(r){return f("red_mine",r,5e4,1.32)},Lumber(r){return f("red_mine",r,65e3,1.32)},Iron(r){return f("red_mine",r,33e3,1.32)}},effect(){let r=T("red_mine","copper"),a=T("red_mine","titanium"),i=+r.b.toFixed(3),s=+a.b.toFixed(3),n="";e.race.truepath&&(e.civic.foreign.gov3.hstl<10?n=`${t("space_rival_ally",[+(r.g*100).toFixed(1)])}
`:e.civic.foreign.gov3.hstl>60&&(n=`${t("space_rival_war",[+(r.g*100).toFixed(1)])}
`));let c=e.race.orbit_decayed?`${t("city_mine_effect1",[N(1)])}
${t("city_coal_mine_effect1",[N(1)])}
`:"",l=(e.race.cataclysm||e.race.orbit_decayed)&&!e.race.sappy?`${t("space_red_mine_effect",[+T("red_mine","stone").toFixed(2),e.resource.Stone.name])}
`:"",o=(e.race.cataclysm||e.race.orbit_decayed)&&e.race.smoldering?`${t("space_red_mine_effect",[+T("red_mine","asbestos").toFixed(2),e.resource.Chrysotile.name])}
`:"",d=e.race.cataclysm||e.race.orbit_decayed?`${t("space_red_mine_effect",[+T("red_mine","aluminium").toFixed(2),e.resource.Aluminium.name])}
`:"";return`${t("space_used_support",[W().red])}
${c}${t("space_red_mine_effect",[i,e.resource.Copper.name])}
${t("space_red_mine_effect",[s,e.resource.Titanium.name])}
${n}${o}${l}${d}`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("red_mine"),re($(this)[0]),!0):!1}},fabrication:{id:"space-fabrication",title:t("space_red_fabrication_title"),desc(){return`${t("space_red_fabrication_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:1},cost:{Money(r){return f("fabrication",r,9e4,1.32)},Copper(r){return f("fabrication",r,25e3,1.32)},Cement(r){return f("fabrication",r,12e3,1.32)},Wrought_Iron(r){return f("fabrication",r,1200,1.32)}},effect(){let r=e.race.cataclysm&&!e.race.flier?`${t("city_cement_plant_effect1",[N(1)])}
`:"",a=e.race.cataclysm||e.race.orbit_decayed?5:2;return e.race.high_pop&&(a=xe(a)),`${t("space_used_support",[W().red])}
${t("space_red_fabrication_effect1",[N(1)])}
${r}${t("space_red_fabrication_effect2",[a])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("fabrication"),re($(this)[0])&&(e.civic.craftsman.max+=N(1)),!0):!1}},red_factory:{id:"space-red_factory",title:t("space_red_factory_title"),desc(){return`${t("space_red_factory_desc")}
${t("requires_power_combo",[e.resource.Helium_3.name])}
`},reqs:{mars:4},cost:{Money(r){return f("red_factory",r,75e3,1.32)},Brick(r){return f("red_factory",r,1e4,1.32)},Coal(r){return f("red_factory",r,7500,1.32)},Mythril(r){return f("red_factory",r,50,1.32)}},effect(r){let a=`${t("space_red_factory_effect1")}
`;e.tech.foundry>=7&&(a=a+`${t("space_red_factory_effect2")}
`),e.race.orbit_decayed&&!e.race.flier&&(a=a+`${t("city_cement_plant_effect1",[N(1)])}
`);let i=+Fe(1,!0,r).toFixed(2);return a=a+`${t("space_red_factory_effect3",[i,$(this)[0].powered()])}
`,a},powered(){return _e(3)},special:!0,action(){return u($(this)[0])?(e.space.red_factory.count++,re($(this)[0])&&e.city.factory.Alloy++,e.settings.showIndustry=!0,rt(),!0):!1}},nanite_factory:hr("nanite_factory","space"),biodome:{id:"space-biodome",title(){return e.race.artifical?t("space_red_signal_tower_title"):e.race.soul_eater?t("space_red_asphodel_title"):t("space_red_biodome_title")},desc(){let r;return e.race.artifical?r=`${t("space_red_signal_tower_title")}
`:e.race.soul_eater?r=`${t("space_red_asphodel_desc")}
`:e.race.carnivore?r=`${t("space_red_biodome_desc_carn")}
`:r=`${t("space_red_biodome_desc",[W().red])}
`,`${r}
${t("space_support",[W().red])}
`},reqs:{mars:2},cost:{Money(r){return f("biodome",r,45e3,1.28)},Lumber(r){return f("biodome",r,65e3,1.28)},Brick(r){return f("biodome",r,1e3,1.28)},Nanite(r){return e.race.deconstructor?f("biodome",r,75,1.28):0}},effect(){let r=+T("biodome","food").toFixed(2),a=e.race.cataclysm||e.race.orbit_decayed?`${t("produce",[+T("biodome","cat_food").toFixed(2),e.resource.Food.name])}
`:"",i=(e.race.cataclysm||e.race.orbit_decayed)&&!e.race.kindling_kindred&&!e.race.smoldering?`${t("space_red_mine_effect",[+T("biodome","lumber").toFixed(2),e.resource.Lumber.name])}
`:"",s=e.tech.mars>=6?.1:.05,n=e.race.artifical?t("city_transmitter_effect",[H(500)]):t("plus_max_resource",[H(100),t("resource_Food_name")]),c=e.race.artifical||e.race.orbit_decayed?`${n}
${t("space_used_support",[W().red])} ${a}${t("space_red_biodome_effect",[r,e.resource.Food.name])}
${t("space_red_biodome_effect2",[+N(s).toFixed(2)])}
${i}${c}`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("biodome"),e.race.cataclysm||(ie("colonist"),e.race.joyless&&(ie("joyless"),delete e.race.joyless,ue())),re($(this)[0]),!0):!1},flair(){return e.race.artifical?t("space_red_signal_tower_flair"):e.race.soul_eater?t("space_red_asphodel_flair"):e.race.carnivore?t("space_red_biodome_flair_carn"):t("space_red_biodome_flair")}},red_university:{id:"space-red_university",title:t("city_university"),desc(){return t("city_university_desc",[W().red])},reqs:{mars:1},trait:["orbit_decayed"],cost:{Money(r){return f("university",r,900,1.5,"city")-500},Lumber(r){return f("university",r,500,1.36,"city")-200},Stone(r){return f("university",r,750,1.36,"city")-350},Crystal(r){return e.race.universe==="magic"?f("university",r,5,1.36,"city"):0}},wiki:!1,effect(){return O.city.university.effect()},action(){if(u($(this)[0])){let r=e.tech.science&&e.tech.science>=8?700:500;if(e.tech.supercollider){let a=e.tech.particles&&e.tech.particles>=3?12.5:25;r*=e.tech.supercollider/a+1}return e.resource.Knowledge.max+=r,e.city.university.count++,e.space.red_university.count=e.city.university.count,e.civic.professor.display=!0,e.civic.professor.max=N(e.city.university.count),!0}return!1}},exotic_lab:{id:"space-exotic_lab",title:t("space_red_exotic_lab_title"),desc(){return`${t("space_red_exotic_lab_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:5},cost:{Money(r){return f("exotic_lab",r,75e4,1.28)},Steel(r){return f("exotic_lab",r,1e5,1.28)},Mythril(r){return f("exotic_lab",r,1e3,1.28)},Elerium(r){return f("exotic_lab",r,20,1.28)-4}},effect(){let r=500;e.tech.science>=13&&e.interstellar.laboratory&&bt.laboratory&&(r+=bt.laboratory*25),e.tech.ancient_study&&e.tech.ancient_study>=2&&(r+=e.space.ziggurat.count*15),e.tech.mass>=2&&k.mass_driver&&(r+=xe(k.mass_driver*e.civic.scientist.workers)),e.tech.science>=21&&(r*=1.45),e.race.high_pop&&(r=xe(r));let a=H(10),i="",s="";return(e.race.cataclysm||e.race.orbit_decayed)&&(i=`${t("city_wardenclyffe_effect1",[N(1),e.civic.scientist.name])}
`,r*=1+U.observatory*.25,e.tech.science>=15&&(s=`${t("city_wardenclyffe_effect4",[2])}
`)),`${t("space_used_support",[W().red])}
${i}${s}${t("space_red_exotic_lab_effect1",[+r.toFixed(0)])}
${t("plus_max_resource",[a,t("resource_Elerium_name")])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("exotic_lab"),re($(this)[0]),!0):!1},flair(){return`${t("space_red_exotic_lab_flair1")}
${t("space_red_exotic_lab_flair2")}
`}},ziggurat:{id:"space-ziggurat",title:t("space_red_ziggurat_title"),desc(){let r=e.race.old_gods!=="none"?F[e.race.old_gods.toLowerCase()].entity:F[e.race.species].entity;return`${t("space_red_ziggurat_desc",[r])}
`},reqs:{theology:4},cost:{Money(r){return f("ziggurat",r,6e5,1.28)},Stone(r){return f("ziggurat",r,25e4,1.28)},Aluminium(r){return f("ziggurat",r,7e4,1.28)},Mythril(r){return f("ziggurat",r,250,1.28)}},effect(){let r=e.tech.ancient_study?.6:.4;if(e.tech.ancient_deify&&e.tech.ancient_deify>=2&&U.exotic_lab&&(r+=.01*U.exotic_lab),e.civic.govern.type==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let s=.002;e.race.high_pop&&(s=xe(s)),r+=s*e.civic.priest.workers}e.race.ooze&&(r*=1-b.ooze.vars()[1]/100),e.race.high_pop&&(r=xe(r)),r=+r.toFixed(2);let a=e.race.truepath?[r,F[e.race.species].home]:[r],i=`${t(e.race.truepath?"space_red_ziggurat_effect_tp":"space_red_ziggurat_effect",a)}
`;return e.tech.ancient_study&&e.tech.ancient_study>=2&&(i=i+`${t("interstellar_laboratory_effect",[3])}
`),(e.race.cataclysm||e.race.orbit_decayed)&&(i=i+cc()),e.genes.ancients&&e.genes.ancients>=4&&(i=i+`${t("city_temple_effect6",[N(1)])}
`),i},action(){return u($(this)[0])?(ne("ziggurat"),e.genes.ancients&&e.genes.ancients>=4&&(e.civic.priest.display=!0,e.civic.priest.max+=N(1)),e.race.cataclysm&&ie("iron_will",!1,1),!0):!1}},space_barracks:{id:"space-space_barracks",title:t("space_red_space_barracks_title"),desc(){return`${t("space_red_space_barracks_desc")}
${t("space_red_space_barracks_desc_req")}
`},reqs:{marines:1},cost:{Money(r){return f("space_barracks",r,35e4,1.28)},Alloy(r){return f("space_barracks",r,65e3,1.28)},Iridium(r){return f("space_barracks",r,22500,1.28)},Wrought_Iron(r){return f("space_barracks",r,12500,1.28)},Horseshoe(){return e.race.hooved?2:0}},effect(r){let a=e.race.orbit_decayed?O.city.boot_camp.effect():"",i=+Fe(2,!0,r).toFixed(2),s=e.tech.marines>=2?N(4):N(2),n=e.race.cataclysm?"":`${t("space_red_space_barracks_effect3",[e.resource.Food.name])}
`;return`${t("plus_max_soldiers",[s])}
${a}${t("space_red_space_barracks_effect2",[i])}
${n}`},powered(){return 0},action(){return u($(this)[0])?(ne("space_barracks"),e.space.space_barracks.on++,!0):!1},flair(){return t("space_red_space_barracks_flair")}},bonfire:hr("bonfire","space"),horseshoe:hr("horseshoe","space")},spc_hell:{info:{name(){return W().hell},desc(){return t("space_hell_info_desc",[W().hell])},zone:"inner",syndicate(){return!1}},hell_mission:{id:"space-hell_mission",title(){return t("space_mission_title",[W().hell])},desc(){return t("space_mission_desc",[W().hell])},reqs:{space:3,space_explore:3},grant:["hell",1],queue_complete(){return e.tech.hell>=1?0:1},cost:{Helium_3(r,a){return+Fe(6500,!1,a).toFixed(0)}},effect(){return t("space_hell_mission_effect1",[W().hell])},action(){return u($(this)[0])?(I(t("space_hell_mission_action",[W().hell]),"info",!1,["progress"]),e.space.geothermal={count:0,on:0},!0):!1}},geothermal:{id:"space-geothermal",title:t("space_hell_geothermal_title"),desc(){return`${t("space_hell_geothermal_desc")}
${t("space_hell_geothermal_desc_req")}
`},reqs:{hell:1},cost:{Money(r){return f("geothermal",r,38e3,1.35)},Steel(r){return f("geothermal",r,15e3,1.35)},Polymer(r){return f("geothermal",r,9500,1.35)}},effect(r){let a=+Fe($(this)[0].p_fuel().a,!0,r).toFixed(2);return`${e.race.cataclysm||e.race.orbit_decayed?`${t("interstellar_stellar_forge_effect3",[1])}
`:""}${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])} , ${t("space_belt_station_effect3",[a])} `},special(){return!!(e.race.cataclysm||e.race.orbit_decayed)},powered(){let r=-8;return e.race.forge&&(r-=b.forge.vars()[0]),e.stats.achieve.failed_history&&e.stats.achieve.failed_history.l>=5&&(r-=2),dt(r)},p_fuel(){return{r:"Helium_3",a:.5}},action(){return u($(this)[0])?(ne("geothermal"),e.space.geothermal.on++,!0):!1}},hell_smelter:{id:"space-hell_smelter",title(){return t("space_hell_smelter_title",[W().hell])},desc(){return t("space_hell_smelter_title",[W().hell])},reqs:{hell:1,m_smelting:1},path:["truepath"],cost:{Money(r){return f("hell_smelter",r,25e4,1.24)},Adamantite(r){return f("hell_smelter",r,15e3,1.24)}},effect(){return`${t("interstellar_stellar_forge_effect3",[2])}
`},special:!0,action(){return u($(this)[0])?(ne("hell_smelter"),e.city.smelter.cap+=2,e.city.smelter.Steel+=2,e.city.smelter.Oil+=2,!0):!1}},spc_casino:{id:"space-spc_casino",title:t("city_casino"),desc:t("city_casino"),category:"commercial",reqs:{hell:1,gambling:1},condition(){return!!(e.race.cataclysm||e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=5)},cost:{Money(r){return f("spc_casino",r,4e5,1.35)},Furs(r){return f("spc_casino",r,75e3,1.35)},Cement(r){return f("spc_casino",r,1e5,1.35)},Plywood(r){return f("spc_casino",r,2e4,1.35)}},effect(){let r=ms();return r=r+`${t("minus_power",[$(this)[0].powered()])}
`,r},powered(){return _e(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=2?2:3)},action(){return u($(this)[0])?(e.space.spc_casino.count++,e.race.joyless||(e.civic.entertainer.max+=N(1),e.civic.entertainer.display=!0),re($(this)[0]),!0):!1},flair:t("city_casino_flair")},swarm_plant:{id:"space-swarm_plant",title:t("space_hell_swarm_plant_title"),desc(){return`${t("space_hell_swarm_plant_desc")}
`},reqs:{solar:4,hell:1},cost:{Money(r){return f("swarm_plant",r,$s(75e3),1.28)},Iron(r){return f("swarm_plant",r,$s(65e3),1.28)},Neutronium(r){return f("swarm_plant",r,$s(75),1.28)},Brick(r){return f("swarm_plant",r,$s(2500),1.28)},Mythril(r){return f("swarm_plant",r,$s(100),1.28)}},effect(){let r=e.tech.swarm?.88:.94;return e.tech.swarm>=3&&(r-=xt/100),r<.05&&(r=.05),r=+((1-r)*100).toFixed(2),t("space_hell_swarm_plant_effect1",[r])},action(){return u($(this)[0])?(ne("swarm_plant"),!0):!1}},firework:hr("firework","space")},spc_sun:{info:{name(){return t("space_sun_info_name")},desc(){return t("space_sun_info_desc",[F[e.race.species].home])},support:"swarm_control",zone:"inner",syndicate(){return!1}},sun_mission:{id:"space-sun_mission",title(){return t("space_sun_mission_title")},desc(){return t("space_sun_mission_desc")},reqs:{space_explore:4},grant:["solar",1],queue_complete(){return e.tech.solar>=1?0:1},cost:{Helium_3(r,a){return+Fe(15e3,!1,a).toFixed(0)}},effect(){return t("space_sun_mission_effect1")},action(){return!!u($(this)[0])}},swarm_control:{id:"space-swarm_control",title:t("space_sun_swarm_control_title"),desc(){return`${t("space_sun_swarm_control_desc")}
`},reqs:{solar:3},cost:{Money(r){return f("swarm_control",r,1e5,1.3)},Knowledge(r){return f("swarm_control",r,6e4,1.3)},Alloy(r){return f("swarm_control",r,7500,1.3)},Helium_3(r,a){return f("swarm_control",r,Fe(2e3,!1,a),1.3)},Mythril(r){return f("swarm_control",r,250,1.3)}},effect(){return t("space_sun_swarm_control_effect1",[$(this)[0].support()])},support(){return e.tech.swarm&&e.tech.swarm>=2?e.tech.high_tech>=11?11+Math.round(xt):12:10},action(){return u($(this)[0])?(ne("swarm_control"),e.space.swarm_control.s_max+=$(this)[0].support(),!0):!1}},swarm_satellite:{id:"space-swarm_satellite",title:t("space_sun_swarm_satellite_title"),desc(){return`${t("space_sun_swarm_satellite_desc")}
${t("space_sun_swarm_satellite_desc_req")}
`},reqs:{solar:3},cost:{Money(r){return f("swarm_satellite",r,Zs(5e3),1.1)},Copper(r){return f("swarm_satellite",r,Zs(2500),1.1)},Iridium(r){return f("swarm_satellite",r,Zs(150),1.1)},Helium_3(r,a){return f("swarm_satellite",r,Zs(Fe(50,!1,a)),1.1)}},effect(){let r=.35;return e.tech.swarm>=4&&(r+=.15*(e.tech.swarm-3)),e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=1&&(r+=.15),e.blood.illuminate&&(r+=.01*e.blood.illuminate),r=+r.toFixed(2),`${t("space_dwarf_reactor_effect1",[dt(r)])} , ${t("space_sun_swarm_satellite_effect1",[1])} `},support(){return-1},action(){return u($(this)[0])?(ne("swarm_satellite"),e.space.swarm_control.support++,!0):!1}},jump_gate:{id:"space-jump_gate",title:t("tau_jump_gate"),desc(r){return!e.space.hasOwnProperty("jump_gate")||e.space.jump_gate.count<100||r?`${t("tau_jump_gate")}
${t("requires_segments",[100])}
`:`${t("tau_jump_gate")}
`},reqs:{tauceti:3},path:["truepath"],queue_size:10,queue_complete(){return 100-e.space.jump_gate.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?1e6:0},Alloy(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?5e4:0},Adamantite(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?12500:0},Graphene(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?42e3:0},Orichalcum(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?35e3:0},Quantium(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?25e3:0}},effect(r){let a=(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0);if(a<100){let i=100-a;return`${t("tau_jump_gate_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return t("tau_jump_gate_effect")},action(){return u($(this)[0])&&e.space.jump_gate.count<100?(e.space.jump_gate.count++,!0):!1}}},spc_gas:{info:{name(){return W().gas},desc(){return t("space_gas_info_desc",[W().gas,F[e.race.species].home])},zone:"outer",syndicate(){return!0}},gas_mission:{id:"space-gas_mission",title(){return t("space_mission_title",[W().gas])},desc(){return t("space_mission_desc",[W().gas])},reqs:{space:4,space_explore:4},grant:["space",5],queue_complete(){return e.tech.space>=5?0:1},cost:{Helium_3(r,a){return+Fe(12500,!1,a).toFixed(0)}},effect(){return t("space_gas_mission_effect",[W().gas])},action(){return u($(this)[0])?(I(t("space_gas_mission_action",[W().gas]),"info",!1,["progress"]),e.settings.space.gas_moon=!0,e.settings.space.belt=!0,e.space.space_station={count:0,on:0,support:0,s_max:0},!0):!1}},gas_mining:{id:"space-gas_mining",title:t("space_gas_mining_title"),desc(){return`${t("space_gas_mining_desc")}
${t("requires_power")}
`},reqs:{gas_giant:1},cost:{Money(r){return f("gas_mining",r,25e4,1.32)},Uranium(r){return f("gas_mining",r,500,1.32)},Alloy(r){return f("gas_mining",r,1e4,1.32)},Helium_3(r,a){return f("gas_mining",r,Fe(2500,!1,a),1.32)},Mythril(r){return f("gas_mining",r,25,1.32)}},effect(){let r=+T("gas_mining").toFixed(2);return`${t("space_gas_mining_effect1",[r])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(2)},action(){return u($(this)[0])?(ne("gas_mining"),re($(this)[0]),!0):!1}},gas_storage:{id:"space-gas_storage",title(){return t("space_gas_storage_title",[W().gas])},desc(){return`${t("space_gas_storage_desc")}
`},reqs:{gas_giant:1},cost:{Money(r){return f("gas_storage",r,125e3,1.32)},Iridium(r){return f("gas_storage",r,3e3,1.32)},Sheet_Metal(r){return f("gas_storage",r,2e3,1.32)},Helium_3(r,a){return f("gas_storage",r,Fe(1e3,!1,a),1.32)}},effect(){let r=H(3500)*(e.tech.world_control?1.5:1),a=H(2500)*(e.tech.world_control?1.5:1),i=H(1e3)*(e.tech.world_control?1.5:1);return`${t("plus_max_resource",[r,t("resource_Oil_name")])}
${t("plus_max_resource",[a,t("resource_Helium_3_name")])}
${t("plus_max_resource",[i,t("resource_Uranium_name")])}
`},action(){return u($(this)[0])?(ne("gas_storage"),!0):!1}},star_dock:{id:"space-star_dock",title(){return t("space_gas_star_dock_title")},desc(){return`${t("space_gas_star_dock_title")}
${t("space_gas_star_dock_desc_req")}
`},reqs:{genesis:3},queue_complete(){return 1-e.space.star_dock.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?15e5:0},Steel(r){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?5e5:0},Helium_3(r,a){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?Math.round(Fe(e.race.gravity_well?25e3:1e4,!1,a)):0},Nano_Tube(r){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?25e4:0},Mythril(r){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?1e4:0}},effect(){return`${t("space_gas_star_dock_effect1")}
`},special:!0,action(){return e.space.star_dock.count===0&&u($(this)[0])?(ne("star_dock"),!0):!1}}},spc_gas_moon:{info:{name(){return W().gas_moon},desc(){return t("space_gas_moon_info_desc",[W().gas_moon,W().gas])},zone:"outer",syndicate(){return!0}},gas_moon_mission:{id:"space-gas_moon_mission",title(){return t("space_mission_title",[W().gas_moon])},desc(){return t("space_mission_desc",[W().gas_moon])},reqs:{space:5},grant:["space",6],queue_complete(){return e.tech.space>=6?0:1},cost:{Helium_3(r,a){return+Fe(3e4,!1,a).toFixed(0)}},effect(){return t("space_gas_moon_mission_effect",[W().gas_moon])},action(){return u($(this)[0])?(I(t("space_gas_moon_mission_action",[W().gas_moon]),"info",!1,["progress"]),e.space.outpost={count:0,on:0},e.tech.gas_moon=1,!0):!1}},outpost:{id:"space-outpost",title:t("space_gas_moon_outpost_title"),desc(){return`${t("space_gas_moon_outpost_desc")}
${t("requires_power_combo",[e.resource.Oil.name])}
`},reqs:{gas_moon:1},cost:{Money(r){return f("outpost",r,666e3,1.3)},Titanium(r){return f("outpost",r,18e3,1.3)},Iridium(r){return f("outpost",r,2500,1.3)},Helium_3(r,a){return f("outpost",r,Fe(6e3,!1,a),1.3)},Mythril(r){return f("outpost",r,300,1.3)}},effect(r){let a=+T("outpost").toFixed(3),i=H(500),s=+Fe(2,!0,r).toFixed(2);return`${t("space_gas_moon_outpost_effect1",[a])}
${t("plus_max_resource",[i,t("resource_Neutronium_name")])}
${t("space_gas_moon_outpost_effect3",[s,$(this)[0].powered()])}
`},powered(){return _e(3)},powerBalancer(){return[{r:"Neutronium",k:"lpmod"}]},action(){return u($(this)[0])?(ne("outpost"),e.resource.Neutronium.display=!0,re($(this)[0]),!0):!1}},drone:{id:"space-drone",title:t("space_gas_moon_drone_title"),desc(){return`${t("space_gas_moon_drone_desc")}
`},reqs:{gas_moon:1,drone:1},cost:{Money(r){return f("drone",r,25e4,1.3)},Steel(r){return f("drone",r,2e4,1.3)},Neutronium(r){return f("drone",r,500,1.3)},Elerium(r){return f("drone",r,25,1.3)},Nano_Tube(r){return f("drone",r,45e3,1.3)}},effect(){let r=e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=3?12:6;return`${t("space_gas_moon_drone_effect1",[r])}
`},action(){return u($(this)[0])?(ne("drone"),!0):!1}},oil_extractor:{id:"space-oil_extractor",title:t("space_gas_moon_oil_extractor_title"),desc(){return`${t("space_gas_moon_oil_extractor_title")}
${t("requires_power")}
`},reqs:{gas_moon:2},cost:{Money(r){return f("oil_extractor",r,666e3,1.3)},Polymer(r){return f("oil_extractor",r,7500,1.3)},Helium_3(r,a){return f("oil_extractor",r,Fe(2500,!1,a),1.3)},Wrought_Iron(r){return f("oil_extractor",r,5e3,1.3)}},effect(){let r=+T("oil_extractor").toFixed(2);return`${t("space_gas_moon_oil_extractor_effect1",[r])} , ${t("minus_power",[$(this)[0].powered()])} `},powered(){return _e(1)},powerBalancer(){return[{r:"Oil",k:"lpmod"}]},action(){return u($(this)[0])?(ne("oil_extractor"),re($(this)[0]),!0):!1}}},spc_belt:{info:{name(){return t("space_belt_info_name")},desc(){return e.space.space_station&&e.space.space_station.count>0?`${t("space_belt_info_desc",[W().red,W().gas])}
${t("space_belt_info_desc2")}
`:t("space_belt_info_desc",[W().red,W().gas])},support:"space_station",zone:"inner",syndicate(){return!0}},belt_mission:{id:"space-belt_mission",title(){return t("space_belt_mission_title")},desc(){return t("space_belt_mission_desc")},reqs:{space:5},grant:["asteroid",1],queue_complete(){return e.tech.asteroid>=1?0:1},cost:{Helium_3(r,a){return+Fe(25e3,!1,a).toFixed(0)}},effect(){return t("space_belt_mission_effect1")},action(){return u($(this)[0])?(I(t("space_belt_mission_action"),"info",!1,["progress"]),e.settings.space.dwarf=!0,!0):!1}},space_station:{id:"space-space_station",title:t("space_belt_station_title"),desc(){return`${t("space_belt_station_desc")}
${t("requires_power_space",[e.resource.Food.name])}
`},reqs:{asteroid:2},cost:{Money(r){return f("space_station",r,25e4,1.3)},Iron(r){return f("space_station",r,85e3,1.3)},Polymer(r){return f("space_station",r,18e3,1.3)},Iridium(r){return f("space_station",r,2800,1.28)},Helium_3(r,a){return f("space_station",r,Fe(2e3,!1,a),1.3)},Mythril(r){return f("space_station",r,75,1.25)}},effect(r){let a=+Fe(2.5,!0,r).toFixed(2),i=e.race.cataclysm?1:10,s=H(5),n=e.tech.asteroid>=5?`${t("plus_max_resource",[s,t("resource_Elerium_name")])}
`:"";return e.race.fasting?`${t("plus_max_space_miners",[N(3)])}
${n}${t("space_belt_station_effect5",[a,$(this)[0].powered()])}
`:`${t("plus_max_space_miners",[N(3)])}
${n}${t("space_belt_station_effect3",[a])}
${t("space_belt_station_effect4",[i,$(this)[0].powered(),e.resource.Food.name])}
`},support(){return N(3)},powered(){return _e(3)},refresh:!0,action(){if(u($(this)[0])){if(ne("space_station"),e.civic.space_miner.display=!0,e.tech.asteroid<3&&(e.tech.asteroid=3),re($(this)[0])){let r=N(3);e.civic.space_miner.max+=r;let a=Math.min(r,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=a,e.civic.space_miner.workers+=a}return e.race.orbit_decay&&e.race.orbit_decay>e.stats.days+1e3&&(e.race.orbit_decay=e.stats.days+1e3,I(t("evo_challenge_orbit_decayed_accelerated",[e.race.orbit_decay-e.stats.days]),"info",!1,["progress"])),!0}return!1}},elerium_ship:{id:"space-elerium_ship",title:t("space_belt_elerium_ship_title"),desc(){return t("space_belt_elerium_ship_title")},reqs:{asteroid:5},cost:{Money(r){return f("elerium_ship",r,5e5,1.3)},Uranium(r){return f("elerium_ship",r,2500,1.3)},Titanium(r){return f("elerium_ship",r,1e4,1.3)},Mythril(r){return f("elerium_ship",r,500,1.3)},Helium_3(r,a){return f("elerium_ship",r,Fe(5e3,!1,a),1.3)}},effect(){let r=+T("elerium_ship").toFixed(4);return`${t("space_belt_elerium_ship_effect1",[N(2)])}
${t("space_belt_elerium_ship_effect2",[r])}
`},s_type:"belt",support(){return N(-2)},powered(){return 0},action(){return u($(this)[0])?(ne("elerium_ship"),re($(this)[0]),!0):!1}},iridium_ship:{id:"space-iridium_ship",title:t("space_belt_iridium_ship_title"),desc(){return t("space_belt_iridium_ship_title")},reqs:{asteroid:3},cost:{Money(r){return f("iridium_ship",r,12e4,1.3)},Uranium(r){return f("iridium_ship",r,1e3,1.3)},Alloy(r){return f("iridium_ship",r,48e3,1.3)},Iridium(r){return f("iridium_ship",r,2800,1.3)},Helium_3(r,a){return f("iridium_ship",r,Fe(1800,!1,a),1.3)}},effect(){let r=+T("iridium_ship").toFixed(3);return`${t("space_belt_iridium_ship_effect1",[N(1)])}
${t("space_belt_iridium_ship_effect2",[r])}
`},s_type:"belt",support(){return N(-1)},powered(){return 0},action(){return u($(this)[0])?(ne("iridium_ship"),re($(this)[0]),!0):!1}},iron_ship:{id:"space-iron_ship",title:t("space_belt_iron_ship_title"),desc(){return t("space_belt_iron_ship_title")},reqs:{asteroid:3},cost:{Money(r){return f("iron_ship",r,8e4,1.3)},Steel(r){return f("iron_ship",r,42e3,1.3)},Aluminium(r){return f("iron_ship",r,38e3,1.3)},Polymer(r){return f("iron_ship",r,16e3,1.3)},Helium_3(r,a){return f("iron_ship",r,Fe(1200,!1,a),1.3)}},effect(){let r=+T("iron_ship").toFixed(2);return e.tech.solar&&e.tech.solar>=5?`${t("space_belt_iron_ship_effect1",[N(1)])}
${t("space_belt_iron_ship_effect2",[r])}
${t("space_belt_iron_ship_effect3")}
`:`${t("space_belt_iron_ship_effect1",[N(1)])}
${t("space_belt_iron_ship_effect2",[r])}
`},s_type:"belt",support(){return N(-1)},powered(){return 0},action(){return u($(this)[0])?(ne("iron_ship"),re($(this)[0]),!0):!1}}},spc_dwarf:{info:{name(){return W().dwarf},desc(){return t("space_dwarf_info_desc",[W().dwarf])},zone:"inner",syndicate(){return!1}},dwarf_mission:{id:"space-dwarf_mission",title(){return t("space_mission_title",[W().dwarf])},desc(){return t("space_mission_desc",[W().dwarf])},reqs:{asteroid:1,elerium:1},grant:["dwarf",1],queue_complete(){return e.tech.dwarf>=1?0:1},cost:{Helium_3(r,a){return+Fe(45e3,!1,a).toFixed(0)}},effect(){return t("space_dwarf_mission_effect1",[W().dwarf])},action(){return u($(this)[0])?(I(t("space_dwarf_mission_action",[W().dwarf]),"info",!1,["progress"]),e.space.elerium_contain={count:0,on:0},!0):!1}},elerium_contain:{id:"space-elerium_contain",title:t("space_dwarf_elerium_contain_title"),desc(){return`${t("space_dwarf_elerium_contain_title")}
${t("requires_power")}
`},reqs:{dwarf:1},cost:{Money(r){return f("elerium_contain",r,8e5,1.28)},Cement(r){return f("elerium_contain",r,12e4,1.28)},Iridium(r){return f("elerium_contain",r,5e4,1.28)},Neutronium(r){return f("elerium_contain",r,250,1.28)}},effect(){let r=H(100);return`${t("plus_max_resource",[r,t("resource_Elerium_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(6)},action(){return u($(this)[0])?(ne("elerium_contain"),re($(this)[0]),!0):!1}},e_reactor:{id:"space-e_reactor",title:t("space_dwarf_reactor_title"),desc(){return`${t("space_dwarf_reactor_title")}
${t("space_dwarf_reactor_desc_req")}
`},reqs:{elerium:2},cost:{Money(r){return f("e_reactor",r,125e4,1.28)},Steel(r){return f("e_reactor",r,35e4,1.28)},Neutronium(r){return f("e_reactor",r,1250,1.28)},Mythril(r){return f("e_reactor",r,2500,1.28)}},effect(){let r=$(this)[0].p_fuel().a,a=$(this)[0].powered()*-1;return`${t("space_dwarf_reactor_effect1",[a])}
${t("space_dwarf_reactor_effect2",[r])}
`},powered(){return dt(-25)},p_fuel(){return{r:"Elerium",a:.05}},action(){return u($(this)[0])?(ne("e_reactor"),e.space.e_reactor.on++,!0):!1}},world_collider:{id:"space-world_collider",title:t("space_dwarf_collider_title"),desc(r){if(!e.space.hasOwnProperty("world_collider")||e.space.world_collider.count<1859||r)return`${t("space_dwarf_collider_desc")}
${t("space_dwarf_collider_desc_req")}
`+(e.space.hasOwnProperty("world_collider")&&e.space.world_collider.count>=1859?`${t("requires_power")}
`:"")},reqs:{science:10},path:["standard"],condition(){return e.space.world_collider.count<1859},queue_size:100,queue_complete(){return 1859-e.space.world_collider.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?25e3:0},Copper(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?750:0},Alloy(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?125:0},Neutronium(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?12:0},Elerium(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?1:0},Mythril(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?10:0}},effect(r){let a=(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0);if(a<1859){let i=1859-a;return`${t("space_dwarf_collider_effect1")}
${t("space_dwarf_collider_effect2",[i])}
`}else return Yt.spc_dwarf.world_controller.effect()},action(){if(e.space.world_collider.count<1859&&u($(this)[0])){if(ne("world_collider"),e.space.world_collider.count>=1859){if(e.tech.science=11,e.space.world_controller={count:1,on:0},ue(),Pt(),e.race.banana){let r=it();e.stats.banana.b2[r]=!0,r!=="m"&&r!=="l"&&(e.stats.banana.b2.l=!0)}Ie()}return!0}return!1},flair:t("space_dwarf_collider_flair")},world_controller:{id:"space-world_controller",title:t("space_dwarf_collider_title"),desc(){return`${t("space_dwarf_collider_title")}
${t("requires_power")}
`},wiki:!1,reqs:{science:11},path:["standard"],condition(){return!(e.space.world_collider.count<1859)},queue_complete(){return 0},cost:{},effect(){let r=25;return e.interstellar.far_reach&&k.far_reach>0&&(r+=k.far_reach*1),e.tech.science>=19&&(r+=15),`${t("plus_max_resource",[r+"%",t("resource_Knowledge_name")])}
${t("space_dwarf_controller_effect3")}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(20)},action(){return!1},flair:t("space_dwarf_controller_flair")},shipyard:{id:"space-shipyard",title:t("outer_shipyard_title"),desc(){return`${t("outer_shipyard_title")}
${t("requires_power")}
`},reqs:{shipyard:1},path:["truepath"],cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?1e7:0},Aluminium(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?1e6:0},Titanium(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?65e4:0},Iridium(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?25e4:0},Neutronium(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?1e4:0},Mythril(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?5e5:0}},queue_complete(){return 1-e.space.shipyard.count},effect(){return`${t("outer_shipyard_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(50)},special:!0,sAction(){k.shipyard&&(e.settings.civTabs=2,e.settings.govTabs=5,e.settings.tabLoad||(gr("mTabCivic"),Ie("space-shipyard")))},action(){return e.space.shipyard.count<1&&u($(this)[0])?(ne("shipyard"),re($(this)[0])&&(e.settings.showShipYard=!0),e.tech.syard_class=2,e.tech.syard_armor=3,e.tech.syard_weapon=1,e.tech.syard_engine=2,e.tech.syard_power=3,e.tech.syard_sensor=3,!0):!1}},mass_relay:{id:"space-mass_relay",title:t("space_dwarf_mass_relay_title"),desc(r){if(!e.space.hasOwnProperty("mass_relay")||e.space.mass_relay.count<100||r)return`${t("space_dwarf_mass_relay_title")}
${t("requires_segments",[100])}
`},reqs:{outer:5},path:["truepath"],condition(){return e.space.mass_relay.count<100},queue_size:5,queue_complete(){return 100-e.space.mass_relay.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?1e7:0},Neutronium(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?7500:0},Adamantite(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?18e3:0},Elerium(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?125:0},Stanene(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?1e5:0},Quantium(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?25e3:0}},effect(r){let a=(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0);if(a<100){let i=100-a;return`${t("space_dwarf_mass_relay_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return Yt.spc_dwarf.m_relay.effect()},action(){return e.space.mass_relay.count<100&&u($(this)[0])?(e.space.mass_relay.count++,e.space.mass_relay.count>=100&&(e.tech.outer=6,e.space.m_relay={count:1,on:1,charged:0},ue(),Pt(),Ie()),!0):!1}},m_relay:{id:"space-m_relay",title:t("space_dwarf_mass_relay_title"),desc(){return`${t("space_dwarf_mass_relay_title")}
${t("requires_power")}
`},reqs:{outer:6},path:["truepath"],condition(){return e.space.mass_relay.count>=100},wiki:!1,queue_complete(){return 0},cost:{},powered(){return _e(100)},effect(){let r=Math.floor(e.space.m_relay.charged/10)/10;return`${t("space_dwarf_mass_relay_effect2",[W().dwarf])}
${t("minus_power",[$(this)[0].powered()])}
${t("space_dwarf_mass_relay_charged",[r])}
`},action(){return!1}}},spc_titan:Bi().spc_titan,spc_enceladus:Bi().spc_enceladus,spc_triton:Bi().spc_triton,spc_kuiper:Bi().spc_kuiper,spc_eris:Bi().spc_eris},Cr={int_alpha:{info:{name:t("interstellar_alpha_name"),desc(){return e.tech.alpha?t("interstellar_alpha_desc2",[F[e.race.species].home]):t("interstellar_alpha_desc1",[F[e.race.species].home])},support:"starport"},alpha_mission:{id:"interstellar-alpha_mission",title:t("space_mission_title",[t("interstellar_alpha_name")]),desc:t("space_mission_desc",[t("interstellar_alpha_name")]),reqs:{ftl:2},grant:["alpha",1],queue_complete(){return e.tech.alpha>=1?0:1},cost:{Helium_3(){return+ze(4e4).toFixed(0)}},effect:t("interstellar_alpha_mission_effect"),action(){return u($(this)[0])?(I(t("interstellar_alpha_mission_result"),"info",!1,["progress"]),e.interstellar.nexus={count:0,on:0,support:0,s_max:0},e.interstellar.warehouse={count:0},!0):!1}},starport:{id:"interstellar-starport",title:t("interstellar_alpha_starport_title"),desc(){return`${t("interstellar_alpha_starport_desc")}
${t("requires_power_space",[e.resource.Food.name])}
`},reqs:{alpha:1},cost:{Money(r){return f("starport",r,1e6,1.3,"interstellar")},Aluminium(r){return f("starport",r,4e5,1.3,"interstellar")},Neutronium(r){return f("starport",r,1e3,1.3,"interstellar")},Elerium(r){return f("starport",r,100,1.3,"interstellar")}},effect(){let r=+ze(5).toFixed(2),a=100;return`${t("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
${t("interstellar_alpha_starport_effect2",[r,$(this)[0].powered()])}
${t("interstellar_alpha_starport_effect3",[a,e.resource.Food.name])}
`},support(){return 5},powered(){return _e(10)},powerBalancer(){return[{s:e.interstellar.starport.s_max-e.interstellar.starport.support}]},refresh:!0,action(){return u($(this)[0])?(ne("starport","interstellar"),e.settings.space.proxima=!0,e.settings.space.nebula=!0,re($(this)[0]),e.tech.alpha===1&&(e.tech.alpha=2,e.interstellar.mining_droid={count:0,on:0,adam:0,uran:0,coal:0,alum:0}),e.race.orbit_decay&&e.race.orbit_decay>e.stats.days+100&&(e.race.orbit_decay=e.stats.days+100,I(t("evo_challenge_orbit_decayed_accelerated",[e.race.orbit_decay-e.stats.days]),"info",!1,["progress"])),!0):!1}},habitat:{id:"interstellar-habitat",title:t("interstellar_habitat_title"),desc:`${t("interstellar_habitat_desc")}
${t("requires_power")}
`,reqs:{alpha:3},cost:{Money(r){return f("habitat",r,8e5,1.25,"interstellar")},Furs(r){return f("habitat",r,38e3,1.25,"interstellar")},Adamantite(r){return e.race.fasting&&e.interstellar.habitat&&e.interstellar.habitat.count<5?0:f("habitat",r,3200,1.25,"interstellar")},Plywood(r){return f("habitat",r,1e4,1.25,"interstellar")},Horseshoe(){return e.race.hooved?1:0}},effect(){let r=$(this)[0].citizens();return`${t("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
${t("plus_max_citizens",[r])} , ${t("minus_power",[$(this)[0].powered()])}
`},support(){return 1},powered(){return _e(2)},powerBalancer(){return[{s:e.interstellar.starport.s_max-e.interstellar.starport.support}]},action(){return u($(this)[0])?(ne("habitat","interstellar"),re($(this)[0])&&(e.resource[e.race.species].max+=$(this)[0].citizens()),!0):!1},citizens(){let r=1;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},mining_droid:{id:"interstellar-mining_droid",title:t("interstellar_mining_droid_title"),desc:`${t("interstellar_mining_droid_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{alpha:2},cost:{Money(r){return f("mining_droid",r,65e4,1.28,"interstellar")},Steel(r){return f("mining_droid",r,12e4,1.28,"interstellar")},Nano_Tube(r){return f("mining_droid",r,75e3,1.28,"interstellar")},Elerium(r){return f("mining_droid",r,50,1.28,"interstellar")}},effect(){return`${t("space_used_support",[t("interstellar_alpha_name")])}
${t("interstellar_mining_droid_effect")}
`},s_type:"alpha",support(){return-1},powered(){return 0},special:!0,refresh:!0,action(){return u($(this)[0])?(ne("mining_droid","interstellar"),e.resource.Adamantite.display=!0,re($(this)[0])&&e.interstellar.mining_droid.adam++,e.tech.droids||(e.tech.droids=1,e.interstellar.processing={count:0,on:0}),e.settings.showIndustry=!0,rt(),!0):!1}},processing:{id:"interstellar-processing",title:t("interstellar_processing_title"),desc:`${t("interstellar_processing_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{droids:1},cost:{Money(r){return f("processing",r,35e4,1.28,"interstellar")},Iron(r){return f("processing",r,18e4,1.28,"interstellar")},Aluminium(r){return f("processing",r,6e4,1.28,"interstellar")},Iridium(r){return f("processing",r,5e3,1.28,"interstellar")}},effect(){let r=12;return e.tech.ai_core&&e.tech.ai_core>=2&&k.citadel>0&&(r+=k.citadel*2),`${t("space_used_support",[t("interstellar_alpha_name")])}
${t("interstellar_processing_effect",[r])}
`},s_type:"alpha",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("processing","interstellar"),re($(this)[0]),!0):!1}},fusion:{id:"interstellar-fusion",title:t("interstellar_fusion_title"),desc(){return`${t("interstellar_fusion_title")}
${t("requires_power_support_combo",[t("interstellar_alpha_name"),e.resource.Deuterium.name])}
`},reqs:{fusion:1},cost:{Money(r){return f("fusion",r,99e4,1.28,"interstellar")},Iridium(r){return f("fusion",r,44e3,1.28,"interstellar")},Infernite(r){return f("fusion",r,350,1.28,"interstellar")},Brick(r){return f("fusion",r,18e3,1.28,"interstellar")}},effect(){let r=1.25;return`${t("space_used_support",[t("interstellar_alpha_name")])}
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])} , ${t("interstellar_fusion_effect",[r])}
`},s_type:"alpha",support(){return-1},powered(){return dt(-22)},p_fuel(){return{r:"Deuterium",a:1.25}},action(){return u($(this)[0])?(ne("fusion","interstellar"),re($(this)[0]),!0):!1}},laboratory:{id:"interstellar-laboratory",title(){return e.race.universe==="magic"?t("tech_sanctum"):t("interstellar_laboratory_title")},desc:`${t(e.race.universe==="magic"?"tech_sanctum":"interstellar_laboratory_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{science:12},cost:{Money(r){return f("laboratory",r,75e4,1.28,"interstellar")},Crystal(r){return e.race.universe==="magic"?f("laboratory",r,1200,1.28,"interstellar"):0},Titanium(r){return f("laboratory",r,12e4,1.28,"interstellar")},Alloy(r){return f("laboratory",r,95e3,1.28,"interstellar")},Mythril(r){return f("laboratory",r,8500,1.28,"interstellar")}},effect(){let r=1e4;e.tech.science>=15&&(r*=1+(e.race.cataclysm||e.race.orbit_decayed?U.exotic_lab:e.city.wardenclyffe.count)*.02),(e.race.cataclysm||e.race.orbit_decayed)&&k.s_gate&&we.scavenger&&(r*=1+we.scavenger*+(kt("gxy_alien2")*.75).toFixed(1)),e.tech.science>=21&&(r*=1.45),r=Math.round(r);let a="";e.tech.science>=16&&(a=`${t("city_wardenclyffe_effect1",[N(1),e.civic.scientist.name])}
`);let i=`${t("space_used_support",[t("interstellar_alpha_name")])}
${a}${t("city_max_knowledge",[r])}
`;if(e.tech.science>=13&&(i=i+`${t("interstellar_laboratory_effect",[5])}
`),e.race.universe==="magic"){let s=H(12);i=i+`${t("plus_max_resource",[s,e.resource.Mana.name])}
`}return i},s_type:"alpha",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("laboratory","interstellar"),re($(this)[0])&&(e.resource.Knowledge.max+=1e4,e.tech.science>=16&&(e.civic.scientist.display=!0,e.civic.scientist.max+=N(1))),!0):!1}},exchange:{id:"interstellar-exchange",title:t("interstellar_exchange_title"),desc:`${t("interstellar_exchange_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{banking:12},cost:{Money(r){return f("exchange",r,68e4,1.28,"interstellar")},Stone(r){return f("exchange",r,115e3,1.28,"interstellar")},Adamantite(r){return f("exchange",r,55e3,1.28,"interstellar")},Graphene(r){return f("exchange",r,78e3,1.28,"interstellar")}},effect(){let r=e.race.cataclysm||e.race.orbit_decayed?k.spaceport:e.city.bank?e.city.bank.count:0,a=e.race.cataclysm||e.race.orbit_decayed?Fr()*4:Fr(),i=H(e.city.bank?a*r/18:0);return e.race.inflation&&(i*=2),e.tech.banking>=13&&(e.galaxy.freighter&&(i*=1+we.freighter*.03),e.galaxy.super_freighter&&(i*=1+we.super_freighter*.08)),i=+i.toFixed(0),`${t("space_used_support",[t("interstellar_alpha_name")])}
${t("plus_max_resource",[`$${i.toLocaleString()}`,t("resource_Money_name")])}
`},s_type:"alpha",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("exchange","interstellar"),re($(this)[0])&&(e.resource.Money.max+=+H(45e4).toFixed(0)),!0):!1}},g_factory:{id:"interstellar-g_factory",title:t("interstellar_g_factory_title"),desc:`${t("interstellar_g_factory_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{graphene:1},cost:{Money(r){return f("g_factory",r,95e4,1.28,"interstellar")},Copper(r){return f("g_factory",r,165e3,1.28,"interstellar")},Cement(r){return f("g_factory",r,22e4,1.28,"interstellar")},Infernite(r){return f("g_factory",r,750,1.28,"interstellar")}},effect(){return`${t("space_used_support",[t("interstellar_alpha_name")])}
${t("interstellar_g_factory_effect")}
`},s_type:"alpha",support(){return-1},powered(){return 0},special:!0,action(){return u($(this)[0])?(ne("g_factory","interstellar"),e.resource.Graphene.display=!0,re($(this)[0])&&(e.race.kindling_kindred||e.race.smoldering?e.interstellar.g_factory.Oil++:e.interstellar.g_factory.Lumber++),e.settings.showIndustry=!0,rt(),!0):!1}},int_factory:{id:"interstellar-int_factory",title:t("interstellar_int_factory_title"),desc(){return`${t("interstellar_int_factory_title")}
${t("requires_power_combo",[e.resource.Deuterium.name])}
`},reqs:{alpha:4},cost:{Money(r){return f("int_factory",r,25e6,1.26,"interstellar")},Coal(r){return f("int_factory",r,1e7,1.26,"interstellar")},Brick(r){return f("int_factory",r,75e4,1.26,"interstellar")},Bolognium(r){return f("int_factory",r,5e4,1.26,"interstellar")}},effect(){let r=+ze(5).toFixed(2);return`${t("interstellar_int_factory_effect")}
${t("city_crafted_mats",[10])}
${t("interstellar_fusion_effect",[r])} ${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(5)},special:!0,action(){return u($(this)[0])?(ne("int_factory","interstellar"),re($(this)[0])&&(e.city.factory.Alloy+=2,rt()),!0):!1}},luxury_condo:{id:"interstellar-luxury_condo",title:t("tech_luxury_condo"),desc:`${t("tech_luxury_condo")}
${t("requires_power")}
`,reqs:{alpha:5},cost:{Money(r){return f("luxury_condo",r,25e6,1.25,"interstellar")},Neutronium(r){return f("luxury_condo",r,75e3,1.25,"interstellar")},Stanene(r){return f("luxury_condo",r,23e4,1.25,"interstellar")},Orichalcum(r){return f("luxury_condo",r,65e3,1.25,"interstellar")},Nanoweave(r){return f("luxury_condo",r,12500,1.25,"interstellar")},Horseshoe(){return e.race.hooved?2:0}},effect(){let r=$(this)[0].citizens(),a=H(75e4);return`${t("plus_max_citizens",[r])} , ${t("minus_power",[$(this)[0].powered()])}
${t("plus_max_resource",[`$${a.toLocaleString()}`,t("resource_Money_name")])}
`},powered(){return _e(3)},action(){return u($(this)[0])?(ne("luxury_condo","interstellar"),re($(this)[0])&&(e.resource[e.race.species].max+=2),!0):!1},citizens(){let r=2;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},zoo:{id:"interstellar-zoo",title:t("tech_zoo"),desc(){return`${t("tech_zoo")}
${t("requires_power_support_combo",[t("interstellar_alpha_name"),e.resource.Food.name])}
`},reqs:{zoo:1},cost:{Money(r){return f("zoo",r,5e7,1.24,"interstellar")},Polymer(r){return f("zoo",r,6e6,1.24,"interstellar")},Infernite(r){return f("zoo",r,75e3,1.24,"interstellar")},Brick(r){return f("zoo",r,2e6,1.24,"interstellar")}},effect(){let r=5,a=2,i=12e3;return`${t("space_used_support",[t("interstellar_alpha_name")])}
${t("space_red_vr_center_effect1",[r])}
${t("space_red_vr_center_effect2",[a])}
${t("interstellar_alpha_starport_effect3",[i,e.resource.Food.name])}
`},powered(){return 0},s_type:"alpha",support(){return-1},action(){return u($(this)[0])?(ne("zoo","interstellar"),re($(this)[0]),!0):!1}},warehouse:{id:"interstellar-warehouse",title(){return e.tech.storage<=2?t("city_shed_title1"):e.tech.storage>=4?t("city_shed_title3"):t("city_shed_title2")},desc(){let r=e.tech.storage>=3?e.tech.storage>=4?t("city_shed_desc_size3"):t("city_shed_desc_size2"):t("city_shed_desc_size1");return t("city_shed_desc",[r])},reqs:{alpha:2},cost:{Money(r){return f("warehouse",r,175e3,1.28,"interstellar")},Lumber(r){return f("warehouse",r,1e5,1.28,"interstellar")},Aluminium(r){return f("warehouse",r,12e4,1.28,"interstellar")},Cement(r){return f("warehouse",r,45e3,1.28,"interstellar")}},res(){let r=["Lumber","Stone","Chrysotile","Furs","Copper","Iron","Aluminium","Cement","Coal","Nano_Tube","Neutronium","Adamantite","Infernite"];return e.tech.storage>=3&&e.resource.Steel.display&&r.push("Steel"),e.tech.storage>=4&&e.resource.Titanium.display&&r.push("Titanium"),r},val(r){switch(r){case"Lumber":return 750;case"Stone":return 750;case"Chrysotile":return 750;case"Furs":return 425;case"Copper":return 380;case"Iron":return 350;case"Aluminium":return 320;case"Cement":return 280;case"Coal":return 120;case"Steel":return 60;case"Titanium":return 40;case"Nano_Tube":return 30;case"Neutronium":return 8;case"Adamantite":return 18;case"Infernite":return 5;default:return 0}},wide:!0,effect(){let r='',a=ci();for(let i of $(this)[0].res())if(e.resource[i].display){let s=Ee(+(H($(this)[0].val(i))*a).toFixed(0),1);r=r+`${t("plus_max_resource",[s,e.resource[i].name])} `}return r=r+"
",r},action(){if(u($(this)[0])){ne("warehouse","interstellar");let r=ci();for(let a of $(this)[0].res())e.resource[a].display&&(e.resource[a].max+=H($(this)[0].val(a)*r));return!0}return!1}}},int_proxima:{info:{name:t("interstellar_proxima_name"),desc(){return e.tech.proxima?t("interstellar_proxima_desc2"):t("interstellar_proxima_desc1")}},proxima_mission:{id:"interstellar-proxima_mission",title:t("space_mission_title",[t("interstellar_proxima_name")]),desc:t("space_mission_desc",[t("interstellar_proxima_name")]),reqs:{alpha:1},grant:["proxima",1],queue_complete(){return e.tech.proxima>=1?0:1},cost:{Helium_3(){return+ze(42e3).toFixed(0)}},effect:t("interstellar_proxima_mission_effect"),action(){return u($(this)[0])?(e.interstellar.xfer_station={count:0,on:0},I(t("interstellar_proxima_mission_result"),"info",!1,["progress"]),!0):!1}},xfer_station:{id:"interstellar-xfer_station",title:t("interstellar_xfer_station_title"),desc(){return`${t("interstellar_xfer_station_desc")}
${t("requires_power_combo",[e.resource.Uranium.name])}
`},reqs:{proxima:1},cost:{Money(r){return f("xfer_station",r,12e5,1.28,"interstellar")},Neutronium(r){return f("xfer_station",r,1500,1.28,"interstellar")},Adamantite(r){return f("xfer_station",r,6e3,1.28,"interstellar")},Polymer(r){return f("xfer_station",r,12e3,1.28,"interstellar")},Wrought_Iron(r){return f("xfer_station",r,3500,1.28,"interstellar")}},effect(){let r=.28,a=H(5e3),i=H(4e3),s=H(2500),n="";return e.resource.Deuterium.display&&(n=`${t("plus_max_resource",[H(2e3),t("resource_Deuterium_name")])}
`),`${t("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
${t("plus_max_resource",[i,t("resource_Oil_name")])}
${t("plus_max_resource",[a,t("resource_Helium_3_name")])}
${t("plus_max_resource",[s,t("resource_Uranium_name")])}
${n}${t("city_fission_power_effect",[r])}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return 1},powered(){return _e(1)},powerBalancer(){return[{s:e.interstellar.starport.s_max-e.interstellar.starport.support}]},refresh:!0,action(){return u($(this)[0])?(ne("xfer_station","interstellar"),re($(this)[0])&&(e.resource.Uranium.max+=H(2500),e.resource.Helium_3.max+=H(5e3),e.resource.Oil.max+=H(4e3),e.resource.Deuterium.max+=H(2e3)),e.tech.proxima===1&&(e.tech.proxima=2,e.interstellar.cargo_yard={count:0}),!0):!1}},cargo_yard:{id:"interstellar-cargo_yard",title:t("interstellar_cargo_yard_title"),desc:t("interstellar_cargo_yard_title"),reqs:{proxima:2},cost:{Money(r){return f("cargo_yard",r,275e3,1.28,"interstellar")},Graphene(r){return f("cargo_yard",r,7500,1.28,"interstellar")},Mythril(r){return f("cargo_yard",r,6e3,1.28,"interstellar")}},effect(){let r=50,a=H(200),i=H(150),s=`${t("plus_max_resource",[r,t("resource_Crates_name")])}
${t("plus_max_resource",[r,t("resource_Containers_name")])}
`;if(s=s+`${t("plus_max_resource",[a,t("resource_Neutronium_name")])}
${t("plus_max_resource",[i,t("resource_Infernite_name")])}
`,e.tech.storage>=7){let n=+xt.toFixed(3);s=s+`${t("interstellar_cargo_yard_effect",[n])}
`}return s},action(){if(u($(this)[0])){ne("cargo_yard","interstellar");let r=50;return e.resource.Crates.max+=r,e.resource.Containers.max+=r,e.resource.Containers.display||Yr(),!0}return!1}},cruiser:{id:"interstellar-cruiser",title:t("interstellar_cruiser_title"),desc:t("interstellar_cruiser_title"),reqs:{cruiser:1},cost:{Money(r){return f("cruiser",r,875e3,1.28,"interstellar")},Aluminium(r){return f("cruiser",r,195e3,1.28,"interstellar")},Deuterium(r){return f("cruiser",r,+ze(1500).toFixed(0),1.28,"interstellar")},Neutronium(r){return f("cruiser",r,2e3,1.28,"interstellar")},Aerogel(r){return f("cruiser",r,250,1.28,"interstellar")},Horseshoe(){return e.race.hooved?3:0}},powered(){return 0},effect(){let r=+ze(6).toFixed(2),a=N(3);return`${t("plus_max_soldiers",[a])}
${t("space_belt_station_effect3",[r])}
`},action(){return u($(this)[0])?(ne("cruiser","interstellar"),e.interstellar.cruiser.on++,!0):!1}},dyson:{id:"interstellar-dyson",title:t("interstellar_dyson_title"),desc(r){return!e.interstellar.hasOwnProperty("dyson")||e.interstellar.dyson.count<100||r?`${t("interstellar_dyson_title")}
${t("requires_segments",[100])}
`:`${t("interstellar_dyson_title")}
`},reqs:{proxima:3},queue_size:10,queue_complete(){return 100-e.interstellar.dyson.count},condition(){return!(e.interstellar.dyson.count>=100&&e.tech.dyson)},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?25e4:0},Adamantite(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?1e4:0},Infernite(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?25:0},Stanene(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?1e5:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0);if(a<100){let i=a>0?`${t("space_dwarf_reactor_effect1",[dt(a*1.25)])}
`:"",s=100-a;return`${t("interstellar_dyson_effect")}
${i}${t("space_dwarf_collider_effect2",[s])}
`}else return t("interstellar_dyson_complete",[dt(175)])},action(){return u($(this)[0])&&e.interstellar.dyson.count<100?(ne("dyson","interstellar"),e.interstellar.dyson.count>=100&&ue(),!0):!1}},dyson_sphere:{id:"interstellar-dyson_sphere",title:t("interstellar_dyson_sphere_title"),desc(r){return!e.interstellar.hasOwnProperty("dyson_sphere")||e.interstellar.dyson_sphere.count<100||r?`${t("interstellar_dyson_sphere_title")}
${t("requires_segments",[100])}
`:`${t("interstellar_dyson_sphere_title")}
`},reqs:{proxima:3,dyson:1},queue_size:10,queue_complete(){return 100-e.interstellar.dyson_sphere.count},condition(){return!!(e.interstellar.dyson.count>=100&&e.tech.dyson&&e.tech.dyson===1)},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?5e6:0},Bolognium(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?25e3:0},Vitreloy(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?1250:0},Aerogel(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?75e3:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0);if(a<100){let i=175+a*5,s=100-a;return`${t("interstellar_dyson_sphere_effect")}
${t("space_dwarf_reactor_effect1",[dt(i)])}
${t("space_dwarf_collider_effect2",[s])}
`}else return t("interstellar_dyson_sphere_complete",[dt(750)])},action(){return u($(this)[0])&&e.interstellar.dyson_sphere.count<100?(ne("dyson_sphere","interstellar"),e.interstellar.dyson_sphere.count>=100&&ue(),!0):!1}},orichalcum_sphere:{id:"interstellar-orichalcum_sphere",title:t("interstellar_dyson_sphere_title"),desc(r){return!e.interstellar.hasOwnProperty("orichalcum_sphere")||e.interstellar.orichalcum_sphere.count<100||r?`${t("interstellar_orichalcum_sphere_desc")}
${t("requires_segments",[100])}
`:`${t("interstellar_orichalcum_sphere_desc")}
`},reqs:{proxima:3,dyson:2},queue_size:10,queue_complete(){return 100-e.interstellar.orichalcum_sphere.count},condition(){return!!(e.interstellar.dyson_sphere.count>=100&&e.tech.dyson&&e.tech.dyson===2)},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("orichalcum_sphere")?e.interstellar.orichalcum_sphere.count:0)<100?25e6:0},Orichalcum(r){return(r||0)+(e.interstellar.hasOwnProperty("orichalcum_sphere")?e.interstellar.orichalcum_sphere.count:0)<100?75e3:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("orichalcum_sphere")?e.interstellar.orichalcum_sphere.count:0);if(a<100){let i=750+a*8,s=100-a;return`${t("interstellar_orichalcum_sphere_effect")}
${t("space_dwarf_reactor_effect1",[dt(i)])}
${t("space_dwarf_collider_effect2",[s])}
`}else return t("interstellar_dyson_sphere_complete",[dt(1750)])},action(){return u($(this)[0])&&e.interstellar.orichalcum_sphere.count<100?(ne("orichalcum_sphere","interstellar"),e.interstellar.orichalcum_sphere.count>=100&&ie("blacken_the_sun"),!0):!1}}},int_nebula:{info:{name:t("interstellar_nebula_name"),desc(){return e.tech.nebula?t("interstellar_nebula_desc2"):t("interstellar_nebula_desc1")},support:"nexus"},nebula_mission:{id:"interstellar-nebula_mission",title:t("space_mission_title",[t("interstellar_nebula_name")]),desc:t("space_mission_desc",[t("interstellar_nebula_name")]),reqs:{alpha:1},grant:["nebula",1],queue_complete(){return e.tech.nebula>=1?0:1},cost:{Helium_3(){return+ze(55e3).toFixed(0)}},effect:t("interstellar_nebula_mission_effect"),action(){return u($(this)[0])?(I(t("interstellar_nebula_mission_result"),"info",!1,["progress"]),!0):!1}},nexus:{id:"interstellar-nexus",title:t("interstellar_nexus_title"),desc(){return`${t("interstellar_nexus_title")}
${t("requires_power_combo",[e.resource.Money.name])}
`},reqs:{nebula:1},cost:{Money(r){return f("nexus",r,9e5,1.24,"interstellar")},Adamantite(r){return f("nexus",r,7500,1.24,"interstellar")},Infernite(r){return f("nexus",r,250,1.24,"interstellar")},Sheet_Metal(r){return f("nexus",r,14e3,1.24,"interstellar")},Nano_Tube(r){return f("nexus",r,17500,1.24,"interstellar")}},effect(){let r=H(3500),a=H(4e3),i=H(3e3),s=H(25);return`${t("interstellar_nexus_effect1",[$(this)[0].support()])}
${t("plus_max_resource",[r,t("resource_Oil_name")])}
${t("plus_max_resource",[a,t("resource_Helium_3_name")])}
${t("plus_max_resource",[i,t("resource_Deuterium_name")])}
${t("plus_max_resource",[s,t("resource_Elerium_name")])}
${t("interstellar_nexus_effect2",[$(this)[0].powered(),350])}
`},support(){return 2},powered(){return _e(8)},powerBalancer(){return[{s:e.interstellar.nexus.s_max-e.interstellar.nexus.support}]},refresh:!0,action(){return u($(this)[0])?(ne("nexus","interstellar"),e.resource.Deuterium.display=!0,e.tech.nebula===1&&(e.interstellar.harvester={count:0,on:0},e.tech.nebula=2),re($(this)[0])&&(e.resource.Oil.max+=H(2500),e.resource.Helium_3.max+=H(4e3),e.resource.Deuterium.max+=H(3e3),e.resource.Elerium.max+=H(25)),!0):!1}},harvester:{id:"interstellar-harvester",title:t("interstellar_harvester_title"),desc:`${t("interstellar_harvester_title")}
${t("space_support",[t("interstellar_nebula_name")])}
`,reqs:{nebula:2},cost:{Money(r){return f("harvester",r,65e4,1.28,"interstellar")},Copper(r){return f("harvester",r,8e4,1.28,"interstellar")},Alloy(r){return f("harvester",r,45e3,1.28,"interstellar")},Iridium(r){return f("harvester",r,8e3,1.28,"interstellar")}},effect(){let r=+T("harvester","helium").toFixed(3),a=+T("harvester","deuterium").toFixed(3),i=e.tech.ram_scoop?`${t("interstellar_harvester_effect",[a])}
`:"";return`${t("space_used_support",[t("interstellar_nebula_name")])}
${t("space_gas_mining_effect1",[r])}
${i}`},s_type:"nebula",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("harvester","interstellar"),re($(this)[0]),!0):!1}},elerium_prospector:{id:"interstellar-elerium_prospector",title:t("interstellar_elerium_prospector_title"),desc:`${t("interstellar_elerium_prospector_title")}
${t("space_support",[t("interstellar_nebula_name")])}
`,reqs:{nebula:3},cost:{Money(r){return f("elerium_prospector",r,825e3,1.28,"interstellar")},Steel(r){return f("elerium_prospector",r,18e3,1.28,"interstellar")},Polymer(r){return f("elerium_prospector",r,22e3,1.28,"interstellar")},Graphene(r){return f("elerium_prospector",r,82e3,1.28,"interstellar")},Stanene(r){return f("elerium_prospector",r,57e3,1.28,"interstellar")}},effect(){let r=+T("elerium_prospector").toFixed(3);return`${t("space_used_support",[t("interstellar_nebula_name")])}
${t("space_belt_elerium_ship_effect2",[r])}
`},s_type:"nebula",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("elerium_prospector","interstellar"),re($(this)[0]),!0):!1}}},int_neutron:{info:{name:t("interstellar_neutron_name"),desc(){return e.tech.neutron?t("interstellar_neutron_desc2",[F[e.race.species].home]):t("interstellar_neutron_desc1")}},neutron_mission:{id:"interstellar-neutron_mission",title:t("space_mission_title",[t("interstellar_neutron_name")]),desc:t("space_mission_desc",[t("interstellar_neutron_name")]),reqs:{nebula:1,high_tech:14},grant:["neutron",1],queue_complete(){return e.tech.neutron>=1?0:1},cost:{Helium_3(){return+ze(6e4).toFixed(0)},Deuterium(){return+ze(1e4).toFixed(0)}},effect:t("interstellar_neutron_mission_effect"),action(){return u($(this)[0])?(e.interstellar.neutron_miner={count:0,on:0},I(t("interstellar_neutron_mission_result"),"info",!1,["progress"]),!0):!1}},neutron_miner:{id:"interstellar-neutron_miner",title:t("interstellar_neutron_miner_title"),desc(){return`${t("interstellar_neutron_miner_desc")}
${t("requires_power_combo",[e.resource.Helium_3.name])}
`},reqs:{neutron:1},cost:{Money(r){return f("neutron_miner",r,1e6,1.32,"interstellar")},Titanium(r){return f("neutron_miner",r,45e3,1.32,"interstellar")},Stanene(r){return f("neutron_miner",r,88e3,1.32,"interstellar")},Elerium(r){return f("neutron_miner",r,20,1.32,"interstellar")},Aerogel(r){return f("neutron_miner",r,50,1.32,"interstellar")}},effect(){let r=+T("neutron_miner").toFixed(3),a=H(500),i=+ze(3).toFixed(2);return`${t("space_gas_moon_outpost_effect1",[r])}
${t("plus_max_resource",[a,t("resource_Neutronium_name")])}
${t("interstellar_alpha_starport_effect2",[i,$(this)[0].powered()])}
`},powered(){return _e(6)},powerBalancer(){return[{r:"Neutronium",k:"lpmod"}]},action(){return u($(this)[0])?(ne("neutron_miner","interstellar"),re($(this)[0]),!0):!1}},citadel:{id:"interstellar-citadel",title:t("interstellar_citadel_title"),desc:`${t("interstellar_citadel_desc")}
${t("requires_power")}
`,reqs:{neutron:1,high_tech:15},cost:{Money(r){return f("citadel",r,5e6,1.25,"interstellar")},Knowledge(r){return f("citadel",r,15e5,1.15,"interstellar")},Graphene(r){return f("citadel",r,5e4,1.25,"interstellar")},Stanene(r){return f("citadel",r,1e5,1.25,"interstellar")},Elerium(r){return f("citadel",r,250,1.25,"interstellar")},Soul_Gem(r){return f("citadel",r,1,1.25,"interstellar")}},wide:!0,effect(){let r=`${t("interstellar_citadel_stat",[+xt.toFixed(1)])}
${t("interstellar_citadel_effect",[5])}
`;if(e.tech.ai_core){let a=+(xt/1.75).toFixed(1);if(e.race.flier||(r=r+`${t("interstellar_citadel_effect2",[a])}
`),e.tech.ai_core>=2&&(r=r+`${t("interstellar_citadel_effect3",[2])}
`),e.tech.ai_core>=3){let i=+(xt/5).toFixed(1);r=r+`${t("interstellar_citadel_effect4",[i])}
`}}return`${r}${t("interstellar_citadel_power",[$(this)[0].powered(),_e(2.5)])}
`},powered(){return k.citadel&&k.citadel>1?_e(30+(k.citadel-1)*2.5):_e(30)},action(){return u($(this)[0])?(ne("citadel","interstellar"),re($(this)[0]),!0):!1},flair(){return t("interstellar_citadel_flair")}},stellar_forge:{id:"interstellar-stellar_forge",title:t("interstellar_stellar_forge_title"),desc:`${t("interstellar_stellar_forge_title")}
${t("requires_power")}
`,reqs:{star_forge:1},cost:{Money(r){return f("stellar_forge",r,12e5,1.25,"interstellar")},Iridium(r){return f("stellar_forge",r,25e4,1.25,"interstellar")},Bolognium(r){return f("stellar_forge",r,35e3,1.25,"interstellar")},Aerogel(r){return f("stellar_forge",r,75e3,1.25,"interstellar")}},effect(){let r=`${t("city_foundry_effect1",[N(2)])}
${t("interstellar_stellar_forge_effect",[10])}
${t("interstellar_stellar_forge_effect2",[5])}
`;return e.tech.star_forge&&e.tech.star_forge>=2&&(r+=`${t("interstellar_stellar_forge_effect3",[2])}
`),`${r}${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(3)},special:!0,action(){return u($(this)[0])?(ne("stellar_forge","interstellar"),re($(this)[0])&&(e.civic.craftsman.max+=N(2),e.tech.star_forge>=2&&(e.city.smelter.cap+=2,e.city.smelter.Star+=2,e.city.smelter.StarCap+=2,e.city.smelter.Iron+=2)),!0):!1},flair(){return t("interstellar_stellar_forge_flair")}}},int_blackhole:{info:{name:t("interstellar_blackhole_name"),desc(){let r=F[e.race.species].home;if(e.tech.blackhole>=5){let a=+e.interstellar.stellar_engine.mass.toFixed(10),i=+e.interstellar.stellar_engine.exotic.toFixed(10);if(e.tech.roid_eject&&(a+=.225*e.tech.roid_eject*(1+e.tech.roid_eject/12)),e.tech.whitehole){let s=ot("bigbang"),n=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`${t("interstellar_blackhole_desc4",[r,a,i])}
${t("interstellar_blackhole_desc5",[s.plasmid,s.phage,s.dark,n])}
`}else return e.interstellar.stellar_engine.exotic>0?t("interstellar_blackhole_desc4",[r,a,i]):t("interstellar_blackhole_desc3",[r,a])}else return e.tech.blackhole?t("interstellar_blackhole_desc2",[r]):t("interstellar_blackhole_desc1",[r])}},blackhole_mission:{id:"interstellar-blackhole_mission",title:t("space_mission_title",[t("interstellar_blackhole_name")]),desc:t("space_mission_desc",[t("interstellar_blackhole_name")]),reqs:{nebula:1},grant:["blackhole",1],queue_complete(){return e.tech.blackhole>=1?0:1},cost:{Helium_3(){return+ze(75e3).toFixed(0)},Deuterium(){return+ze(25e3).toFixed(0)}},effect:t("interstellar_blackhole_mission_effect"),action(){return u($(this)[0])?(e.interstellar.far_reach={count:0,on:0},I(t("interstellar_blackhole_mission_result"),"info",!1,["progress"]),!0):!1}},far_reach:{id:"interstellar-far_reach",title:t("interstellar_far_reach"),desc:`${t("interstellar_far_reach_desc")}
${t("requires_power")}
`,reqs:{blackhole:1},cost:{Money(r){return f("far_reach",r,1e6,1.32,"interstellar")},Knowledge(r){return f("far_reach",r,1e5,1.32,"interstellar")},Neutronium(r){return f("far_reach",r,2500,1.32,"interstellar")},Elerium(r){return f("far_reach",r,100,1.32,"interstellar")},Aerogel(r){return f("far_reach",r,1e3,1.32,"interstellar")}},effect(){return`${t("interstellar_far_reach_effect",[1])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(5)},action(){return u($(this)[0])?(ne("far_reach","interstellar"),re($(this)[0]),e.tech.blackhole===1&&(e.tech.blackhole=2,ue()),!0):!1},flair:t("interstellar_far_reach_flair")},stellar_engine:{id:"interstellar-stellar_engine",title:t("interstellar_stellar_engine"),desc(r){return!e.interstellar.hasOwnProperty("stellar_engine")||e.interstellar.stellar_engine.count<100||r?`${t("interstellar_stellar_engine")}
${t("requires_segments",[100])}
`:`${t("interstellar_stellar_engine")}
`},reqs:{blackhole:3},queue_size:10,queue_complete(){return 100-e.interstellar.stellar_engine.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?5e5:0},Neutronium(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?450:0},Adamantite(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?17500:0},Infernite(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?225:0},Graphene(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?45e3:0},Mythril(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?250:0},Aerogel(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?75:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0);if(a<100){let i=100-a;return`${t("interstellar_stellar_engine_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else{let i=e.tech.gravity&&e.tech.gravity>=2?13.5:7.5,s=e.interstellar.stellar_engine?e.interstellar.stellar_engine.mass:8;e.tech.roid_eject&&(s+=.225*e.tech.roid_eject*(1+e.tech.roid_eject/12));let n=1+(e.stats.achieve.escape_velocity&&e.stats.achieve.escape_velocity.h?e.stats.achieve.escape_velocity.h*.02:0),c=dt((20+(s-8)*i+(e.interstellar.stellar_engine?e.interstellar.stellar_engine.exotic:0)*i*10).toFixed(2))*n;if(e.tech.blackhole>=5){let l=+e.interstellar.stellar_engine.exotic.toFixed(10),o=e.interstellar.stellar_engine.exotic>0?t("interstellar_stellar_engine_effect3",[s,l]):t("interstellar_stellar_engine_effect2",[s]);return`${t("interstellar_stellar_engine_complete",[c])}
${o}
`}else return t("interstellar_stellar_engine_complete",[c])}},action(){return u($(this)[0])&&e.interstellar.stellar_engine.count<100?(ne("stellar_engine","interstellar"),e.interstellar.stellar_engine.count>=100&&e.tech.blackhole===3&&(e.tech.blackhole=4,ue()),!0):!1}},mass_ejector:{id:"interstellar-mass_ejector",title:t("interstellar_mass_ejector"),desc:`${t("interstellar_mass_ejector")}
${t("requires_power")}
`,reqs:{blackhole:5},cost:{Money(r){return f("mass_ejector",r,75e4,1.25,"interstellar")},Adamantite(r){return f("mass_ejector",r,125e3,1.25,"interstellar")},Infernite(r){return f("mass_ejector",r,275,1.25,"interstellar")},Elerium(r){return f("mass_ejector",r,100,1.25,"interstellar")},Mythril(r){return f("mass_ejector",r,1e4,1.25,"interstellar")}},effect(){return`${t("interstellar_mass_ejector_effect")} , ${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(3)},special:!0,sAction(){e.settings.civTabs=4,e.settings.marketTabs=2,e.settings.tabLoad||(gr("mTabResource"),Ie("interstellar-mass_ejector"))},action(){return u($(this)[0])?(ne("mass_ejector","interstellar"),re($(this)[0]),e.interstellar.mass_ejector.count===1&&(I(t("interstellar_mass_ejector_msg"),"info",!1,["progress"]),e.settings.showEjector=!0,defineGovernor()),drawResourceTab("ejector"),!0):!1},flair(){return t("interstellar_mass_ejector_flair")}},jump_ship:{id:"interstellar-jump_ship",title:t("interstellar_jump_ship"),desc:t("interstellar_jump_ship_desc"),reqs:{stargate:1},grant:["stargate",2],queue_complete(){return e.tech.stargate>=2?0:1},cost:{Money(){return 2e7},Copper(){return 24e5},Aluminium(){return 4e6},Titanium(){return 125e4},Adamantite(){return 75e4},Stanene(){return 9e5},Aerogel(){return 1e5}},effect:t("interstellar_jump_ship_effect"),action(){return!!u($(this)[0])}},wormhole_mission:{id:"interstellar-wormhole_mission",title:t("space_mission_title",[t("interstellar_wormhole_name")]),desc:t("space_mission_desc",[t("interstellar_wormhole_name")]),reqs:{stargate:2},grant:["stargate",3],queue_complete(){return e.tech.stargate>=3?0:1},cost:{Helium_3(){return+ze(15e4).toFixed(0)},Deuterium(){return+ze(75e3).toFixed(0)}},effect:t("interstellar_wormhole_mission_effect"),action(){return u($(this)[0])?(e.interstellar.stargate={count:0},e.galaxy.gateway_station={count:0,on:0},I(t("interstellar_wormhole_mission_result"),"info",!1,["progress"]),!0):!1}},stargate:{id:"interstellar-stargate",title:t("interstellar_stargate"),desc(r){return!e.interstellar.hasOwnProperty("stargate")||e.interstellar.stargate.count<200||r?`${t("interstellar_stargate")}
${t("requires_segments",[200])}
`+(e.interstellar.hasOwnProperty("stargate")&&e.interstellar.stargate.count>=200?`${t("requires_power")}
`:""):`${t("interstellar_stargate")}
`},reqs:{stargate:3},condition(){return!(e.interstellar.stargate.count>=200)},queue_size:10,queue_complete(){return 200-e.interstellar.stargate.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?1e6:0},Neutronium(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?4800:0},Infernite(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?666:0},Elerium(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?75:0},Nano_Tube(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?12e3:0},Stanene(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?6e4:0},Mythril(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?3200:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0);if(a<200){let i=200-a;return`${t("interstellar_stargate_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return Cr.int_blackhole.s_gate.effect()},action(){return u($(this)[0])&&e.interstellar.stargate.count<200?(ne("stargate","interstellar"),e.interstellar.stargate.count>=200&&(e.tech.stargate=4,e.interstellar.s_gate={count:1,on:0},e.city.power>=Cr.int_blackhole.s_gate.powered()&&e.interstellar.s_gate.on++,qi(),Ie()),!0):!1}},s_gate:{id:"interstellar-s_gate",title:t("interstellar_stargate"),desc(){return`${t("interstellar_stargate")}
${t("requires_power")}
`},reqs:{stargate:4},condition(){return e.interstellar.stargate.count>=200},wiki:!1,queue_complete(){return 0},cost:{},powered(){return _e(250)},effect(){return`${t("interstellar_s_gate_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return!1}}},int_sirius:{info:{name(){return e.tech.ascension>=3?t("interstellar_sirius_b_name"):t("interstellar_sirius_name")},desc(){return e.tech.ascension>=3?t("interstellar_sirius_b_desc"):t("interstellar_sirius_desc",[F[e.race.species].home])}},sirius_mission:{id:"interstellar-sirius_mission",title:t("space_mission_title",[t("interstellar_sirius_name")]),desc:t("space_mission_desc",[t("interstellar_sirius_name")]),reqs:{ascension:2},grant:["ascension",3],queue_complete(){return e.tech.ascension>=3?0:1},cost:{Helium_3(){return+ze(48e4).toFixed(0)},Deuterium(){return+ze(225e3).toFixed(0)}},effect(){return t("interstellar_sirius_mission_effect",[tt("name"),F[e.race.species].home])},action(){return!!u($(this)[0])}},sirius_b:{id:"interstellar-sirius_b",title:t("interstellar_sirius_b"),desc:t("interstellar_sirius_b"),reqs:{ascension:3},grant:["ascension",4],queue_complete(){return e.tech.ascension>=4?0:1},cost:{Knowledge(){return 2e7}},effect(){return t("interstellar_sirius_b_effect")},action(){return u($(this)[0])?(e.interstellar.space_elevator={count:0},!0):!1}},space_elevator:{id:"interstellar-space_elevator",title:t("interstellar_space_elevator"),desc(r){return!e.interstellar.hasOwnProperty("space_elevator")||e.interstellar.space_elevator.count<100||r?`${t("interstellar_space_elevator")}
${t("requires_segments",[100])}
`:`${t("interstellar_space_elevator")}
`},reqs:{ascension:4},condition(){return!(e.interstellar.space_elevator.count>=100)},queue_size:5,queue_complete(){return 100-e.interstellar.space_elevator.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?2e7:0},Nano_Tube(r){return(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?5e5:0},Bolognium(r){return(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?1e5:0},Mythril(r){return(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?125e3:0}},effect(r){let a=`${t("interstellar_space_elevator_effect")}
`,i=(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0);if(i<100){let s=100-i;a+=`${t("space_dwarf_collider_effect2",[s])}
`}return a},action(){return u($(this)[0])&&e.interstellar.space_elevator.count<100?(ne("space_elevator","interstellar"),e.interstellar.space_elevator.count>=100&&(e.tech.ascension=5,e.interstellar.gravity_dome={count:0},qi(),Ie()),!0):!1}},gravity_dome:{id:"interstellar-gravity_dome",title:t("interstellar_gravity_dome"),desc(r){return!e.interstellar.hasOwnProperty("gravity_dome")||e.interstellar.gravity_dome.count<100||r?`${t("interstellar_gravity_dome")}
${t("requires_segments",[100])}
`:`${t("interstellar_gravity_dome")}
`},reqs:{ascension:5},condition(){return!(e.interstellar.gravity_dome.count>=100)},queue_size:5,queue_complete(){return 100-e.interstellar.gravity_dome.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?35e6:0},Cement(r){return(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?125e4:0},Adamantite(r){return(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?65e4:0},Aerogel(r){return(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?18e4:0}},effect(r){let a=`${t("interstellar_gravity_dome_effect",[F[e.race.species].home])}
`,i=(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0);if(i<100){let s=100-i;a+=`${t("space_dwarf_collider_effect2",[s])}
`}return a},action(){return u($(this)[0])&&e.interstellar.gravity_dome.count<100?(ne("gravity_dome","interstellar"),e.interstellar.gravity_dome.count>=100&&(e.tech.ascension=6,e.interstellar.ascension_machine={count:0},e.interstellar.thermal_collector={count:0},qi(),Ie()),!0):!1}},ascension_machine:{id:"interstellar-ascension_machine",title:t("interstellar_ascension_machine"),desc(r){return!e.interstellar.hasOwnProperty("ascension_machine")||e.interstellar.ascension_machine.count<100||r?`${t("interstellar_ascension_machine")}
${t("requires_segments",[100])}
`+(e.interstellar.hasOwnProperty("ascension_machine")&&e.interstellar.ascension_machine.count>=100?`${t("requires_power")}
`:""):`${t("interstellar_ascension_machine")}
`},reqs:{ascension:6},condition(){return!(e.interstellar.ascension_machine.count>=100)},queue_size:5,queue_complete(){return 100-e.interstellar.ascension_machine.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?75e6:0},Alloy(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?75e4:0},Neutronium(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?125e3:0},Elerium(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?1e3:0},Orichalcum(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?25e4:0},Nanoweave(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?75e3:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0);if(a<100){let i=100-a;return`${t("interstellar_ascension_machine_effect",[tt("name")])}
${t("space_dwarf_collider_effect2",[i])}
`}else return Cr.int_sirius.ascension_trigger.effect()},action(){return u($(this)[0])&&e.interstellar.ascension_machine.count<100?(ne("ascension_machine","interstellar"),e.interstellar.ascension_machine.count>=100&&(e.tech.ascension=7,e.interstellar.ascension_trigger={count:1,on:0},qi(),Ie()),!0):!1}},ascension_trigger:{id:"interstellar-ascension_trigger",title:t("interstellar_ascension_machine"),desc(){return`${t("interstellar_ascension_machine")}
${t("requires_power")}
`},wiki:!1,reqs:{ascension:7},condition(){return e.interstellar.ascension_machine.count>=100},queue_complete(){return 0},cost:{},powered(){let r=100;if(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=2){r+=e.stats.achieve.technophobe.l>=4?25:10;for(let i=1;i=5&&(r+=5)}let a=Math.round(_e(1e4)-r*(e.interstellar.hasOwnProperty("thermal_collector")?e.interstellar.thermal_collector.count:0));return a<0&&(a=0),a},postPower(r){r?setTimeout(function(){e.tech.ascension=k.ascension_trigger?8:7,qi()},250):(e.tech.ascension=7,qi())},effect(){let r=Ys(),a=$(this)[0].powered(),i=a>0?`${t("minus_power",[a])}
`:"";return`${t("interstellar_ascension_trigger_effect")}
${r}${i}`},action(){return!1}},ascend:{id:"interstellar-ascend",title:t("interstellar_ascend"),desc:t("interstellar_ascend"),reqs:{ascension:8},queue_complete(){return 0},no_multi:!0,cost:{},effect(){let r=Ys();return`${t("interstellar_ascend_effect")}
${r}`},action(){return u($(this)[0])?(vs(),!0):!1}},thermal_collector:{id:"interstellar-thermal_collector",title:t("interstellar_thermal_collector"),desc:t("interstellar_thermal_collector"),reqs:{ascension:6},cost:{Money(r){return f("thermal_collector",r,5e6,1.08,"interstellar")},Infernite(r){return f("thermal_collector",r,25e3,1.08,"interstellar")},Stanene(r){return f("thermal_collector",r,1e6,1.08,"interstellar")},Vitreloy(r){return f("thermal_collector",r,1e5,1.08,"interstellar")}},effect(){let r=100;if(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=2){r+=e.stats.achieve.technophobe.l>=4?25:10;for(let a=1;a=5&&(r+=5)}return t("interstellar_thermal_collector_effect",[r])},action(){return u($(this)[0])?(ne("thermal_collector","interstellar"),!0):!1}}}};function Ys(){let r=ot("ascend"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`${t("interstellar_ascension_trigger_effect2",[r.plasmid,a])}
${t("interstellar_ascension_trigger_effect2",[r.phage,t("resource_Phage_name")])}
${t("interstellar_ascension_trigger_effect2",[r.harmony,t("resource_Harmony_name")])}
${t("interstellar_ascension_trigger_effect3")}
`}function Eo(){let r=ot("terraform"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`${t("interstellar_ascension_trigger_effect2",[r.plasmid,a])}
${t("interstellar_ascension_trigger_effect2",[r.phage,t("resource_Phage_name")])}
${t("interstellar_ascension_trigger_effect2",[r.harmony,t("resource_Harmony_name")])}
${t("space_terraformer_effect3")}
`}var He={gxy_gateway:{info:{name:t("galaxy_gateway"),desc(){return t("galaxy_gateway_desc")},control(){return{name:tt("name"),color:"success"}},support:"starbase"},gateway_mission:{id:"galaxy-gateway_mission",title:t("galaxy_gateway_mission"),desc:t("galaxy_gateway_mission"),reqs:{gateway:1},grant:["gateway",2],queue_complete(){return e.tech.gateway>=2?0:1},cost:{Helium_3(){return+ze(212e3).toFixed(0)},Deuterium(){return+ze(11e4).toFixed(0)}},effect:t("galaxy_gateway_mission_effect"),action(){return u($(this)[0])?(Io(),e.galaxy.defense={gxy_stargate:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_gateway:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_gorddon:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_alien1:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_alien2:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_chthonian:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0}},!0):!1}},starbase:{id:"galaxy-starbase",title:t("galaxy_starbase"),desc(){return`${t("galaxy_starbase")}
${t("requires_power_space",[e.resource.Food.name])}
`},reqs:{gateway:2},cost:{Money(r){return f("starbase",r,42e5,1.25,"galaxy")},Elerium(r){return f("starbase",r,1e3,1.25,"galaxy")},Mythril(r){return f("starbase",r,9e4,1.25,"galaxy")},Graphene(r){return f("starbase",r,32e4,1.25,"galaxy")},Horseshoe(){return e.race.hooved?5:0}},effect(){let r=+ze(25).toFixed(2),a=250,i=e.tech.marines>=2?N(8):N(5);return`${t("galaxy_defense_platform_effect",[25])}
${t("galaxy_gateway_support",[$(this)[0].support()])}
${t("plus_max_soldiers",[i])}
${t("interstellar_alpha_starport_effect2",[r,$(this)[0].powered()])}
${t("interstellar_alpha_starport_effect3",[a,e.resource.Food.name])}
`},support(){return 2},powered(){return _e(k.s_gate?12:0)},powerBalancer(){return[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]},refresh:!0,action(){return u($(this)[0])?(ne("starbase","galaxy"),re($(this)[0]),e.tech.gateway===2&&(e.galaxy.bolognium_ship={count:0,on:0,crew:0},e.tech.gateway=3),!0):!1}},ship_dock:{id:"galaxy-ship_dock",title:t("galaxy_ship_dock"),desc:`${t("galaxy_ship_dock")}
${t("requires_power")}
`,reqs:{gateway:4},cost:{Money(r){return f("ship_dock",r,36e5,1.25,"galaxy")},Steel(r){return f("ship_dock",r,88e4,1.25,"galaxy")},Aluminium(r){return f("ship_dock",r,12e5,1.25,"galaxy")},Bolognium(r){return f("ship_dock",r,75e3,1.25,"galaxy")}},effect(){return e.race.fasting?`${t("galaxy_ship_dock_effect_fasting",[.1])}
${t("minus_power",[$(this)[0].powered()])}
`:`${t("galaxy_ship_dock_effect",[.25])}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return e.race.fasting?k.gateway_station?.1*k.gateway_station:0:k.starbase?.25*k.starbase:0},powered(){return _e(k.s_gate?4:0)},powerBalancer(){return e.race.fasting?[{s:e.galaxy.gateway_station.s_max-e.galaxy.gateway_station.support}]:[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]},action(){return u($(this)[0])?(ne("ship_dock","galaxy"),re($(this)[0]),!0):!1}},bolognium_ship:{id:"galaxy-bolognium_ship",title:t("galaxy_bolognium_ship"),desc(){return`${t("galaxy_bolognium_ship_desc")}
${t("galaxy_starbase_support",[t("resource_Helium_3_name")])}
`},reqs:{gateway:3},cost:{Money(r){return f("bolognium_ship",r,14e5,1.22,"galaxy")},Iron(r){return f("bolognium_ship",r,56e4,1.22,"galaxy")},Infernite(r){return f("bolognium_ship",r,1800,1.22,"galaxy")},Nano_Tube(r){return f("bolognium_ship",r,475e3,1.22,"galaxy")}},effect(){let r=+T("bolognium_ship").toFixed(3),a=+ze($(this)[0].ship.helium).toFixed(2);return`${t("gain",[r,t("resource_Bolognium_name")])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[a,e.resource.Helium_3.name])}
`},s_type:"gateway",support(){return-1},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*2:2},mil(){return 0},helium:5},powered(){return 0},action(){return u($(this)[0])?(ne("bolognium_ship","galaxy"),e.resource.Bolognium.display=!0,e.civic.crew.display=!0,re($(this)[0]),!0):!1}},scout_ship:{id:"galaxy-scout_ship",title:t("galaxy_scout_ship"),desc(){return`${t("galaxy_scout_ship")}
${t("galaxy_starbase_support",[t("resource_Helium_3_name")])}
`},reqs:{andromeda:1},cost:{Money(r){return f("scout_ship",r,16e5,1.25,"galaxy")},Titanium(r){return f("scout_ship",r,325e3,1.25,"galaxy")},Graphene(r){return f("scout_ship",r,118e3,1.25,"galaxy")},Soul_Gem(r){return f("scout_ship",r,1,1.02,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2),a=e.tech.science>=17?`${t("galaxy_scout_ship_effect2",[25])}
`:"";return`${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_scout_ship_effect")}
${a}${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},s_type:"gateway",support(){return-1},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},mil(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},helium:6,rating(){return e.race.banana?7:10}},powered(){return 0},action(){return u($(this)[0])?(ne("scout_ship","galaxy"),e.galaxy.defense.gxy_gateway.scout_ship++,re($(this)[0]),!0):!1}},corvette_ship:{id:"galaxy-corvette_ship",title:t("galaxy_corvette_ship"),desc(){return`${t("galaxy_corvette_ship")}
${t("galaxy_starbase_support",[t("resource_Helium_3_name")])}
`},reqs:{andromeda:2},cost:{Money(r){return f("corvette_ship",r,45e5,1.25,"galaxy")},Steel(r){return f("corvette_ship",r,175e4,1.25,"galaxy")},Infernite(r){return f("corvette_ship",r,16e3,1.25,"galaxy")},Bolognium(r){return f("corvette_ship",r,35e3,1.25,"galaxy")},Soul_Gem(r){return f("corvette_ship",r,1,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2);return`${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},s_type:"gateway",support(){return-1},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*2:2},mil(){return e.race.high_pop?b.high_pop.vars()[0]*3:3},helium:10,rating(){return e.race.banana?21:30}},powered(){return 0},action(){return u($(this)[0])?(ne("corvette_ship","galaxy"),e.galaxy.defense.gxy_gateway.corvette_ship++,re($(this)[0]),!0):!1}},frigate_ship:{id:"galaxy-frigate_ship",title:t("galaxy_frigate_ship"),desc(){return`${t("galaxy_frigate_ship")}
${t("galaxy_starbase_support",[t("resource_Helium_3_name")])}
`},reqs:{andromeda:3},cost:{Money(r){return f("frigate_ship",r,18e6,1.25,"galaxy")},Elerium(r){return f("frigate_ship",r,1250,1.25,"galaxy")},Mythril(r){return f("frigate_ship",r,35e4,1.25,"galaxy")},Sheet_Metal(r){return f("frigate_ship",r,8e5,1.25,"galaxy")},Soul_Gem(r){return f("frigate_ship",r,2,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2);return`${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},s_type:"gateway",support(){return-2},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*3:3},mil(){return e.race.high_pop?b.high_pop.vars()[0]*5:5},helium:25,rating(){return e.race.banana?56:80}},powered(){return 0},action(){return u($(this)[0])?(ne("frigate_ship","galaxy"),e.galaxy.defense.gxy_gateway.frigate_ship++,re($(this)[0]),!0):!1},flair:t("tech_frigate_ship_flair")},cruiser_ship:{id:"galaxy-cruiser_ship",title:t("galaxy_cruiser_ship"),desc(){return`${t("galaxy_cruiser_ship")}
${t("galaxy_starbase_support",[t("resource_Deuterium_name")])}
`},reqs:{andromeda:4},cost:{Money(r){return f("cruiser_ship",r,75e6,1.25,"galaxy")},Copper(r){return f("cruiser_ship",r,6e6,1.25,"galaxy")},Adamantite(r){return f("cruiser_ship",r,1e6,1.25,"galaxy")},Vitreloy(r){return f("cruiser_ship",r,75e4,1.25,"galaxy")},Elerium(r){return f("cruiser_ship",r,1800,1.25,"galaxy")},Soul_Gem(r){return f("cruiser_ship",r,5,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.deuterium).toFixed(2);return`${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Deuterium.name])}
`},s_type:"gateway",support(){return-3},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*6:6},mil(){return e.race.high_pop?b.high_pop.vars()[0]*10:10},deuterium:25,rating(){return e.race.banana?175:250}},powered(){return 0},action(){return u($(this)[0])?(ne("cruiser_ship","galaxy"),e.galaxy.defense.gxy_gateway.cruiser_ship++,re($(this)[0]),!0):!1}},dreadnought:{id:"galaxy-dreadnought",title:t("galaxy_dreadnought"),desc(){return`${t("galaxy_dreadnought")}
${t("galaxy_starbase_support",[t("resource_Deuterium_name")])}
`},reqs:{andromeda:5},cost:{Money(r){return f("dreadnought",r,225e6,1.25,"galaxy")},Neutronium(r){return f("dreadnought",r,25e4,1.25,"galaxy")},Bolognium(r){return f("dreadnought",r,15e5,1.25,"galaxy")},Vitreloy(r){return f("dreadnought",r,1e6,1.25,"galaxy")},Infernite(r){return f("dreadnought",r,4e5,1.25,"galaxy")},Aerogel(r){return f("dreadnought",r,8e5,1.25,"galaxy")},Soul_Gem(r){return f("dreadnought",r,25,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.deuterium).toFixed(2);return`${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Deuterium.name])}
`},s_type:"gateway",support(){return-5},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*10:10},mil(){return e.race.high_pop?b.high_pop.vars()[0]*20:20},deuterium:80,rating(){return e.race.banana?1260:1800}},powered(){return 0},action(){return u($(this)[0])?(ne("dreadnought","galaxy"),e.galaxy.defense.gxy_gateway.dreadnought++,re($(this)[0]),!0):!1}}},gxy_stargate:{info:{name:t("galaxy_stargate"),desc(){return e.tech.piracy?t("galaxy_stargate_desc_alt"):t("galaxy_stargate_desc")},control(){return{name:tt("name"),color:"success"}}},gateway_station:{id:"galaxy-gateway_station",title:t("galaxy_gateway_station"),desc(){return`${t("galaxy_gateway_station_desc")}
${t("requires_power")}
`},reqs:{stargate:4},cost:{Money(r){return f("gateway_station",r,5e6,1.25,"galaxy")},Aluminium(r){return f("gateway_station",r,52e4,1.25,"galaxy")},Polymer(r){return f("gateway_station",r,35e4,1.25,"galaxy")},Neutronium(r){return f("gateway_station",r,17500,1.25,"galaxy")}},effect(){let r=H(2e3),a=H(4500),i=H(50),s="";return e.tech.gateway&&e.tech.gateway>=2&&(s=`${t("galaxy_gateway_support",[$(this)[0].support()])}
`),`${s}${t("plus_max_resource",[r,t("resource_Helium_3_name")])}
${t("plus_max_resource",[a,t("resource_Deuterium_name")])}
${t("plus_max_resource",[i,t("resource_Elerium_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return .5},powered(){return _e(k.s_gate?4:0)},powerBalancer(){return e.galaxy.hasOwnProperty("starbase")?[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]:!1},refresh:!0,action(){return u($(this)[0])?(ne("gateway_station","galaxy"),e.resource.Helium_3.max+=H(2e3),e.resource.Deuterium.max+=H(4500),e.tech.stargate===4&&(e.galaxy.telemetry_beacon={count:0,on:0},e.tech.stargate=5),re($(this)[0]),!0):!1}},telemetry_beacon:{id:"galaxy-telemetry_beacon",title:t("galaxy_telemetry_beacon"),desc(){return`${t("galaxy_telemetry_beacon")}
${t("requires_power")}
`},reqs:{stargate:5},cost:{Money(r){return f("telemetry_beacon",r,225e4,1.25,"galaxy")},Copper(r){return f("telemetry_beacon",r,685e3,1.25,"galaxy")},Alloy(r){return f("telemetry_beacon",r,425e3,1.25,"galaxy")},Iridium(r){return f("telemetry_beacon",r,177e3,1.25,"galaxy")}},effect(){let r=e.tech.telemetry?1200:800;e.tech.science>=17&&(r+=we.scout_ship*25);let a=k.telemetry_beacon?r*k.telemetry_beacon:0,i="";return e.tech.gateway&&e.tech.gateway>=2&&(i=`${t("galaxy_gateway_support",[$(this)[0].support()])}
`),`${i}${t("galaxy_telemetry_beacon_effect1",[r])}
${t("galaxy_telemetry_beacon_effect2",[a])}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return e.tech.telemetry?.75:.5},powered(){return _e(k.s_gate?4:0)},powerBalancer(){return e.galaxy.hasOwnProperty("starbase")?[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]:!1},postPower(r){let a=r?k.telemetry_beacon+fe():k.telemetry_beacon-fe();a>e.galaxy.telemetry_beacon.count?a=e.galaxy.telemetry_beacon.count:a<0&&(a=0),k.telemetry_beacon=a,Ci($(this)[0],"galaxy","telemetry_beacon")},action(){return u($(this)[0])?(ne("telemetry_beacon","galaxy"),re($(this)[0])&&(e.resource.Knowledge.max+=1750),e.tech.gateway||(e.galaxy.starbase={count:0,on:0,support:0,s_max:0},e.settings.space.gateway=!0,e.tech.gateway=1,ac()),!0):!1}},gateway_depot:{id:"galaxy-gateway_depot",title:t("galaxy_gateway_depot"),desc:`${t("galaxy_gateway_depot")}
`,reqs:{gateway:5},cost:{Money(r){return f("gateway_depot",r,4e6,1.25,"galaxy")},Neutronium(r){return f("gateway_depot",r,8e4,1.25,"galaxy")},Stanene(r){return f("gateway_depot",r,5e5,1.25,"galaxy")},Vitreloy(r){return f("gateway_depot",r,2500,1.25,"galaxy")}},wide:!0,effect(){let r=e.tech.world_control?150:100,a=H(200),i=Xs(),s=Ee(+H(3e3*i).toFixed(0),1),n=Ee(+H(25e4*i).toFixed(0),1),c=Ee(+H(9001*i).toFixed(0),1),l=Ee(+H(6660*i).toFixed(0),1),o='';return o=o+`${t("plus_max_crates",[r])} ${t("plus_max_containers",[r])} `,o=o+`${t("plus_max_resource",[s,e.resource.Uranium.name])} `,o=o+`${t("plus_max_resource",[n,e.resource.Nano_Tube.name])} `,o=o+`${t("plus_max_resource",[c,e.resource.Neutronium.name])} `,o=o+`${t("plus_max_resource",[l,e.resource.Infernite.name])} `,o=o+"
",`${o}${t("galaxy_gateway_depot_effect",[a,t("resource_Elerium_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(k.s_gate?10:0)},action(){if(u($(this)[0])){ne("gateway_depot","galaxy");let r=e.tech.world_control?150:100;e.resource.Crates.max+=r,e.resource.Containers.max+=r,e.resource.Containers.display||Yr();let a=Xs();return e.resource.Uranium.max+=H(3e3*a),e.resource.Nano_Tube.max+=H(25e4*a),e.resource.Neutronium.max+=H(9001*a),e.resource.Infernite.max+=H(6660*a),re($(this)[0]),!0}return!1}},defense_platform:{id:"galaxy-defense_platform",title:t("galaxy_defense_platform"),desc(){return`${t("galaxy_defense_platform")}
${t("requires_power")}
`},reqs:{stargate:6},cost:{Money(r){return f("defense_platform",r,75e4,1.25,"galaxy")},Adamantite(r){return f("defense_platform",r,425e3,1.25,"galaxy")},Elerium(r){return f("defense_platform",r,800,1.25,"galaxy")},Vitreloy(r){return f("defense_platform",r,1250,1.25,"galaxy")},Wrought_Iron(r){return f("defense_platform",r,75e3,1.25,"galaxy")}},effect(){return`${t("galaxy_defense_platform_effect",[20])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(k.s_gate?5:0)},postPower(r){D({el:"#gxy_stargate"},"update")},action(){return u($(this)[0])?(ne("defense_platform","galaxy"),re($(this)[0]),!0):!1},post(){D({el:"#gxy_stargate"},"update")}}},gxy_gorddon:{info:{name:t("galaxy_gorddon"),desc(){return t("galaxy_gorddon_desc")},control(){return{name:F[e.galaxy.alien1.id].name,color:"advanced"}}},gorddon_mission:{id:"galaxy-gorddon_mission",title:t("galaxy_gorddon_mission"),desc:t("galaxy_gorddon_mission_desc"),reqs:{xeno:2},grant:["xeno",3],queue_complete(){return e.tech.xeno>=3?0:1},cost:{Structs(){return{galaxy:{scout_ship:{s:"gxy_gateway",count:2,on:2},corvette_ship:{s:"gxy_gateway",count:1,on:1}}}},Helium_3(){return+ze(23e4).toFixed(0)},Deuterium(){return+ze(125e3).toFixed(0)}},effect:t("galaxy_gorddon_mission_effect"),action(){if(u($(this)[0])){Io(),e.galaxy.defense.gxy_gateway.scout_ship-=2,e.galaxy.defense.gxy_gorddon.scout_ship+=2,e.galaxy.defense.gxy_gateway.corvette_ship--,e.galaxy.defense.gxy_gorddon.corvette_ship++;let r=F[e.galaxy.alien1.id].name,a=F[e.galaxy.alien1.id].entity,i=F[e.galaxy.alien2.id].name,s=F[e.galaxy.alien2.id].entity;return I(t("galaxy_gorddon_mission_result",[a,r,s,i]),"info",!1,["progress"]),!0}return!1}},embassy:{id:"galaxy-embassy",title:t("galaxy_embassy"),desc(){return`${t("galaxy_embassy")}
${t("requires_power_combo",[e.resource.Food.name])}
`},reqs:{xeno:4},queue_complete(){return 1-e.galaxy.embassy.count},cost:{Money(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?3e7:0},Lumber(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?38e6:0},Stone(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?32e6:0},Furs(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?18e6:0},Wrought_Iron(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?6e6:0}},effect(){let r=7500,a="";e.tech.xeno>=11&&(a=`${t("plus_max_citizens",[$(this)[0].citizens()])}
`);let i="";return e.race.fasting||(i=`${t("interstellar_alpha_starport_effect3",[r,e.resource.Food.name])}
`),`${t("galaxy_embassy_effect",[F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])}
${a}${i}${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(k.s_gate?25:0)},refresh:!0,action(){if(e.galaxy.embassy.count<1&&u($(this)[0])){if(ne("embassy","galaxy"),re($(this)[0]),e.tech.xeno===4&&(e.tech.xeno=5,e.galaxy.freighter={count:0,on:0,crew:0},e.galaxy.trade={max:0,cur:0,f0:0,f1:0,f2:0,f3:0,f4:0,f5:0,f6:0,f7:0,f8:0},I(t("galaxy_embassy_complete",[F[e.galaxy.alien1.id].name,F[e.galaxy.alien2.id].name]),"info",!1,["progress"])),e.race.fasting){let r=it();e.stats.endless_hunger.b1[r]=!0,r!=="m"&&r!=="l"&&(e.stats.endless_hunger.b1.l=!0)}return!0}return!1},citizens(){let r=20;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},dormitory:{id:"galaxy-dormitory",title:t("galaxy_dormitory"),desc(){return`${t("galaxy_dormitory")}
${t("requires_power")}
`},reqs:{xeno:6},cost:{Money(r){return f("dormitory",r,1e7,1.25,"galaxy")},Furs(r){return f("dormitory",r,7e5,1.25,"galaxy")},Cement(r){return f("dormitory",r,12e5,1.25,"galaxy")},Plywood(r){return f("dormitory",r,85e3,1.25,"galaxy")},Horseshoe(){return e.race.hooved?3:0}},effect(){return`${t("requires_res",[t("galaxy_embassy")])}
${t("plus_max_citizens",[$(this)[0].citizens()])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(3)},action(){return u($(this)[0])?(ne("dormitory","galaxy"),re($(this)[0]),!0):!1},citizens(){let r=3;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},symposium:{id:"galaxy-symposium",title:t("galaxy_symposium"),desc(){return`${t("galaxy_symposium")}
${t("requires_power")}
`},reqs:{xeno:6},cost:{Money(r){return f("symposium",r,8e6,1.25,"galaxy")},Food(r){return e.race.ravenous?0:f("symposium",r,e.race.artifical?45e3:125e3,1.25,"galaxy")},Lumber(r){return f("symposium",r,46e4,1.25,"galaxy")},Brick(r){return f("symposium",r,261600,1.25,"galaxy")}},effect(){let r="";return e.tech.xeno>=7&&(r=`${t("galaxy_symposium_effect3",[+xe(300).toFixed(2)])}
`),`${t("requires_res",[t("galaxy_embassy")])}
${t("galaxy_symposium_effect",[1750])}
${t("galaxy_symposium_effect2",[650])}
${r}${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(4)},action(){return u($(this)[0])?(ne("symposium","galaxy"),re($(this)[0]),!0):!1}},freighter:{id:"galaxy-freighter",title:t("galaxy_freighter"),desc(){return`${t("galaxy_freighter")}
${t("galaxy_crew_fuel",[t("resource_Helium_3_name")])}
`},reqs:{xeno:5},cost:{Money(r){return f("freighter",r,6e6,1.2,"galaxy")},Uranium(r){return f("freighter",r,1e4,1.2,"galaxy")},Adamantite(r){return f("freighter",r,46e4,1.2,"galaxy")},Stanene(r){return f("freighter",r,261600,1.2,"galaxy")},Bolognium(r){return f("freighter",r,66e3,1.2,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2),a="";return e.tech.banking>=13&&(a=`${t("interstellar_exchange_boost",[3])}
`),`${t("requires_res",[t("galaxy_embassy")])}
${t("galaxy_freighter_effect",[2,F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])}
${a}${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*3:3},mil(){return 0},helium:12},special:!0,powered(){return 0},action(){return u($(this)[0])?(ne("freighter","galaxy"),e.galaxy.freighter.on++,e.resource.Vitreloy.display=!0,!0):!1}}},gxy_alien1:{info:{name(){return t("galaxy_alien",[F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].home])},desc(){return t("galaxy_alien1_desc",[F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].home,F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])},control(){return{name:F[e.galaxy.alien1.id].name,color:"advanced"}}},consulate:{id:"galaxy-consulate",title:t("galaxy_consulate"),desc(){return t("galaxy_consulate_desc",[F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].home])},reqs:{xeno:8},queue_complete(){return 1-e.galaxy.consulate.count},cost:{Money(r){return(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?9e7:0},Stone(r){return(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?75e6:0},Furs(r){return(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?3e7:0},Iron(r){return(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?45e6:0},Horseshoe(r){return e.race.hooved&&(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?10:0}},effect(){return t("plus_max_citizens",[$(this)[0].citizens()])},refresh:!0,action(){return u($(this)[0])&&e.galaxy.consulate.count<1?(ne("consulate","galaxy"),e.galaxy.resort={count:0,on:0},e.galaxy.super_freighter={count:0,on:0,crew:0},e.tech.xeno=9,!0):!1},citizens(){let r=10;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},resort:{id:"galaxy-resort",title:t("galaxy_resort"),desc(){return`${t("galaxy_resort")}
${t("requires_power")}
`},reqs:{xeno:9},cost:{Money(r){return f("resort",r,33e6,1.25,"galaxy")},Stone(r){return f("resort",r,25e6,1.25,"galaxy")},Furs(r){return f("resort",r,1e7,1.25,"galaxy")},Oil(r){return f("resort",r,ze(125e3),1.25,"galaxy")}},effect(){let r=H(e.tech.world_control?1875e3:15e5),a=e.race.joyless?"":`${t("city_max_entertainer",[N(2)])}
`;return`${t("plus_max_resource",[`$${r.toLocaleString()}`,t("resource_Money_name")])}
${a}${t("space_red_vr_center_effect2",[2])}
`+`${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(5)},action(){return u($(this)[0])?(ne("resort","galaxy"),re($(this)[0])&&(e.race.joyless||(e.civic.entertainer.max+=N(2),e.civic.entertainer.display=!0)),!0):!1}},vitreloy_plant:{id:"galaxy-vitreloy_plant",title:t("galaxy_vitreloy_plant"),desc(){return`${t("galaxy_vitreloy_plant")}
${t("galaxy_vitreloy_plant_desc")}
`},reqs:{xeno:10},cost:{Money(r){return f("vitreloy_plant",r,35e6,1.25,"galaxy")},Cement(r){return f("vitreloy_plant",r,18e5,1.25,"galaxy")},Neutronium(r){return f("vitreloy_plant",r,25e4,1.25,"galaxy")},Iridium(r){return f("vitreloy_plant",r,85e4,1.25,"galaxy")},Aerogel(r){return f("vitreloy_plant",r,4e5,1.25,"galaxy")}},effect(){let r=+T("vitreloy_plant").toFixed(2),a=2.5,i=100,s=5e4;return`${t("galaxy_vitreloy_plant_effect",[r])}
${t("galaxy_vitreloy_plant_effect2",[a,i])}
${t("galaxy_vitreloy_plant_effect3",[s,$(this)[0].powered()])}
`},powered(){return _e(10)},action(){return u($(this)[0])?(ne("vitreloy_plant","galaxy"),re($(this)[0]),!0):!1}},super_freighter:{id:"galaxy-super_freighter",title:t("galaxy_super_freighter"),desc(){return`${t("galaxy_super_freighter")}
${t("galaxy_crew_fuel",[t("resource_Helium_3_name")])}
`},reqs:{xeno:9},cost:{Money(r){return f("super_freighter",r,28e6,1.2,"galaxy")},Aluminium(r){return f("super_freighter",r,35e5,1.2,"galaxy")},Alloy(r){return f("super_freighter",r,1e6,1.2,"galaxy")},Graphene(r){return f("super_freighter",r,75e4,1.2,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2),a="";return e.tech.banking>=13&&(a=`${t("interstellar_exchange_boost",[8])}
`),`${t("requires_res",[t("galaxy_embassy")])}
${t("galaxy_freighter_effect",[5,F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])}
${a}${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*5:5},mil(){return 0},helium:25},special:!0,powered(){return 0},action(){return u($(this)[0])?(ne("super_freighter","galaxy"),e.galaxy.super_freighter.on++,!0):!1}}},gxy_alien2:{info:{name(){return t("galaxy_alien",[F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])},desc(){return t("galaxy_alien2_desc",[F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red,F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},control(){return{name:F[e.galaxy.alien2.id].name,color:"danger"}},support:"foothold"},alien2_mission:{id:"galaxy-alien2_mission",title(){return t("galaxy_alien2_mission",[F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])},desc(){return t("galaxy_alien2_mission_desc",[F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])},reqs:{andromeda:4},grant:["conflict",1],queue_complete(){return e.tech.conflict>=1?0:1},cost:{Custom(){if(e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_alien2")){let r=0;return Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(a){r+=He.gxy_gateway[a].ship.rating()*e.galaxy.defense.gxy_alien2[a]}),{label:t("galaxy_fleet_rating",[`400 `]),met:!(r<400)}}return{label:t("galaxy_fleet_rating",['400 ']),met:!1}}},effect(){let r=0;e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_alien2")&&Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(i){r+=He.gxy_gateway[i].ship.rating()*e.galaxy.defense.gxy_alien2[i]});let a=r>=650?`${t("galaxy_piracy_low")} `:`${t("galaxy_piracy_avg")} `;return`${t("galaxy_alien2_mission_effect2",[r])}
${t("galaxy_alien2_mission_effect3",[a])}
${t("galaxy_alien2_mission_effect",[F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])}
`},action(){if(u($(this)[0])){let r=0;if(Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(a){r+=He.gxy_gateway[a].ship.rating()*e.galaxy.defense.gxy_alien2[a]}),r>=400){if(I(t("galaxy_alien2_mission_result2",[F[e.galaxy.alien2.id].solar.red]),"info",!1,["progress"]),r<650){let a=80;e.race.instinct&&(a/=2);let i=[];Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(s){for(let n=0;n0&&(a-=He.gxy_gateway[s].ship.rating(),i.push(s))}),I(t("galaxy_chthonian_mission_result_losses",[i.map(s=>t(`galaxy_${s}`)).join(", ")]),"danger",!1,["progress"]);for(let s=0;s${t("galaxy_foothold")} ${t("requires_power_combo",[e.resource.Elerium.name])}
`},reqs:{conflict:1},cost:{Money(r){return f("foothold",r,25e6,1.25,"galaxy")},Titanium(r){return f("foothold",r,3e6,1.25,"galaxy")},Polymer(r){return f("foothold",r,175e4,1.25,"galaxy")},Iridium(r){return f("foothold",r,9e5,1.25,"galaxy")},Bolognium(r){return f("foothold",r,5e4,1.25,"galaxy")}},effect(){let r=2.5;return`${t("galaxy_defense_platform_effect",[50])}
${t("galaxy_foothold_effect",[$(this)[0].support(),F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
${t("galaxy_foothold_effect2",[r,$(this)[0].powered()])}
`},support(){return 4},powered(){return _e(k.s_gate?20:0)},powerBalancer(){return[{s:e.galaxy.foothold.s_max-e.galaxy.foothold.support}]},action(){return u($(this)[0])?(ne("foothold","galaxy"),re($(this)[0]),e.tech.conflict===1&&(e.galaxy.armed_miner={count:0,on:0,crew:0,mil:0},e.tech.conflict=2,ac(),ue()),!0):!1}},armed_miner:{id:"galaxy-armed_miner",title:t("galaxy_armed_miner"),desc(){return`${t("galaxy_armed_miner")}
`},reqs:{conflict:2},cost:{Money(r){return f("armed_miner",r,5e6,1.25,"galaxy")},Steel(r){return f("armed_miner",r,18e5,1.25,"galaxy")},Stanene(r){return f("armed_miner",r,1975e3,1.25,"galaxy")},Vitreloy(r){return f("armed_miner",r,2e4,1.25,"galaxy")},Soul_Gem(r){return f("armed_miner",r,1,1.25,"galaxy")}},effect(){let r=.032,a=.23,i=.65,s=+ze($(this)[0].ship.helium).toFixed(2);return`${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("gain",[r,t("resource_Bolognium_name")])}
${t("gain",[a,t("resource_Adamantite_name")])}
${t("gain",[i,t("resource_Iridium_name")])}
${t("galaxy_alien2_support",[$(this)[0].support(),F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("spend",[s,e.resource.Helium_3.name])}
`},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*2:2},mil(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},helium:10,rating(){return e.race.banana?4:5}},s_type:"alien2",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("armed_miner","galaxy"),re($(this)[0]),!0):!1}},ore_processor:{id:"galaxy-ore_processor",title:t("galaxy_ore_processor"),desc(){return`${t("galaxy_ore_processor")}
`},reqs:{conflict:3},cost:{Money(r){return f("ore_processor",r,3e6,1.25,"galaxy")},Iron(r){return f("ore_processor",r,5e6,1.25,"galaxy")},Coal(r){return f("ore_processor",r,375e4,1.25,"galaxy")},Graphene(r){return f("ore_processor",r,225e4,1.25,"galaxy")}},effect(){return`${t("galaxy_ore_processor_effect",[10])}
${t("galaxy_alien2_support",[$(this)[0].support(),F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
`},s_type:"alien2",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("ore_processor","galaxy"),re($(this)[0]),!0):!1}},scavenger:{id:"galaxy-scavenger",title:t("galaxy_scavenger"),desc:t("galaxy_scavenger_desc"),reqs:{conflict:4},cost:{Money(r){return f("scavenger",r,75e5,1.25,"galaxy")},Alloy(r){return f("scavenger",r,125e4,1.25,"galaxy")},Aluminium(r){return f("scavenger",r,68e5,1.25,"galaxy")},Neutronium(r){return f("scavenger",r,75e3,1.25,"galaxy")},Elerium(r){return f("scavenger",r,750,1.25,"galaxy")}},effect(){let r=kt("gxy_alien2"),a=Math.round(r*25e3),i=+ze($(this)[0].ship.helium).toFixed(2),s=e.race.cataclysm?`${t("galaxy_scavenger_effect2_cata",[+(r*100*.75).toFixed(1)])}
`:`${t("galaxy_scavenger_effect2",[+(r*100/4).toFixed(1)])}
`;return`${t("galaxy_scavenger_effect",[a])}
${s}${t("galaxy_alien2_support",[$(this)[0].support(),F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("spend",[i,e.resource.Helium_3.name])}
`},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},mil(){return 0},helium:12},s_type:"alien2",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("scavenger","galaxy"),re($(this)[0]),!0):!1}}},gxy_chthonian:{info:{name(){return t("galaxy_chthonian")},desc(){return t("galaxy_chthonian_desc",[F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},control(){return{name:F[e.galaxy.alien2.id].name,color:"danger"}}},chthonian_mission:{id:"galaxy-chthonian_mission",title(){return t("galaxy_alien2_mission",[t("galaxy_chthonian")])},desc(){return t("galaxy_alien2_mission_desc",[t("galaxy_chthonian")])},reqs:{chthonian:1},grant:["chthonian",2],queue_complete(){return e.tech.chthonian>=2?0:1},cost:{Custom(){if(e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_chthonian")){let r=0;return Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(a){r+=He.gxy_gateway[a].ship.rating()*e.galaxy.defense.gxy_chthonian[a]}),{label:t("galaxy_fleet_rating",[`1250 `]),met:!(r<1250)}}return{label:t("galaxy_fleet_rating",['1250 ']),met:!1}}},effect(){let r=0;e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_chthonian")&&Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(i){r+=He.gxy_gateway[i].ship.rating()*e.galaxy.defense.gxy_chthonian[i]});let a=r>=4500?`${t("galaxy_piracy_low")} `:r>=2500?`${t("galaxy_piracy_avg")} `:`${t("galaxy_piracy_high")} `;return`${t("galaxy_alien2_mission_effect2",[r])}
${t("galaxy_alien2_mission_effect3",[a])}
${t("galaxy_alien2_mission_effect",[t("galaxy_chthonian")])}
`},action(){if(u($(this)[0])){let r=0;if(Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(a){r+=He.gxy_gateway[a].ship.rating()*e.galaxy.defense.gxy_chthonian[a]}),r>=1250){let a=500,i=[];I(t("galaxy_chthonian_mission_result"),"info",!1,["progress"]),r>=2500&&(a=r>=4500?80:160),e.race.instinct&&(a/=2),Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(s){for(let n=0;n0&&(a-=He.gxy_gateway[s].ship.rating(),i.push(s))}),I(t("galaxy_chthonian_mission_result_losses",[i.map(s=>t(`galaxy_${s}`)).join(", ")]),"danger",!1,["progress"]);for(let s=0;s${t("galaxy_minelayer")}`},reqs:{chthonian:2},cost:{Money(r){return f("minelayer",r,9e6,1.25,"galaxy")},Iron(r){return f("minelayer",r,48e5,1.25,"galaxy")},Nano_Tube(r){return f("minelayer",r,125e4,1.25,"galaxy")},Nanoweave(r){return f("minelayer",r,1e5,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2);return`${t("requires_res",[t("galaxy_starbase")])}
${t("galaxy_defense_platform_effect",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},ship:{civ(){return 0},mil(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},helium:8,rating(){return e.race.banana?35:50}},powered(){return 0},action(){return u($(this)[0])?(ne("minelayer","galaxy"),e.galaxy.minelayer.on++,!0):!1},postPower(){D({el:"#gxy_chthonian"},"update")},post(){D({el:"#gxy_chthonian"},"update")}},excavator:{id:"galaxy-excavator",title:t("galaxy_excavator"),desc(){return`${t("galaxy_excavator")}
`},reqs:{chthonian:3},cost:{Money(r){return f("excavator",r,12e6,1.25,"galaxy")},Polymer(r){return f("excavator",r,44e5,1.25,"galaxy")},Iridium(r){return f("excavator",r,36e5,1.25,"galaxy")},Mythril(r){return f("excavator",r,18e4,1.25,"galaxy")}},effect(){let r=+T("excavator").toFixed(3);return`${t("gain",[r,t("resource_Orichalcum_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(8)},powerBalancer(){return[{r:"Orichalcum",p:T("excavator")}]},action(){return u($(this)[0])?(ne("excavator","galaxy"),re($(this)[0]),!0):!1}},raider:{id:"galaxy-raider",title:t("galaxy_raider"),desc(){return`${t("galaxy_raider")}
`},reqs:{chthonian:3},cost:{Money(r){return f("raider",r,12e6,1.25,"galaxy")},Titanium(r){return f("raider",r,125e4,1.25,"galaxy")},Bolognium(r){return f("raider",r,6e5,1.25,"galaxy")},Vitreloy(r){return f("raider",r,125e3,1.25,"galaxy")},Stanene(r){return f("raider",r,825e3,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2),a=kt("gxy_chthonian"),i=.65,s=.05,n=2.3,c=.8;return`${t("requires_res",[t("galaxy_starbase")])}
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("gain",[i,t("resource_Deuterium_name")])}
${t("gain",[s,t("resource_Vitreloy_name")])}
${t("gain",[n,t("resource_Polymer_name")])}
${t("gain",[c,t("resource_Neutronium_name")])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},ship:{civ(){return 0},mil(){return e.race.high_pop?b.high_pop.vars()[0]*2:2},helium:18,rating(){return e.race.banana?9:12}},powered(){return 0},action(){return u($(this)[0])?(ne("raider","galaxy"),e.galaxy.raider.on++,!0):!1},postPower(){D({el:"#gxy_chthonian"},"update")},post(){D({el:"#gxy_chthonian"},"update")}}}};function ba(r){let a="space";return r.substr(0,4)==="int_"?a="interstellar":r.substr(0,5)==="prtl_"?a="portal":r.substr(0,4)==="gxy_"?a="galaxy":r.substr(0,4)==="tau_"&&(a="tauceti"),a}function kt(r,a,i){if(e.tech.piracy&&!e.race.truepath){let s=0,n=["dreadnought","cruiser_ship","frigate_ship","corvette_ship","scout_ship"];for(let o=0;oc?c:s;return((1-(c-o)/c)*l+(1-l))*(a?1:kt("gxy_stargate"))}else{let o=s>c?c:s;return(1-(c-o)/c)*l+(1-l)}}else return 1}function Io(){let r=["protoplasm",e.race.species];e.city.hasOwnProperty("surfaceDwellers")&&r.push(...e.city.surfaceDwellers),e.custom.hasOwnProperty("race0")||r.push("custom");let a=Object.keys(F).filter(function(n){return!["demonic","eldritch"].includes(F[n].type)&&!r.includes(n)}),i=xs(a);e.galaxy.alien1={id:a[i]},r.push(a[i]),a=Object.keys(F).filter(function(n){return!["angelic"].includes(F[n].type)&&!r.includes(n)});let s=xs(a);e.galaxy.alien2={id:a[s]}}function Xs(){let r=1;return e.race.pack_rat&&(r*=1.05),e.stats.achieve.blackhole&&(r*=1+e.stats.achieve.blackhole.l*.05),r*=e.tech.world_control?2:1,r}var xu={satellite:{count:0},propellant_depot:{count:0},gps:{count:0},nav_beacon:{count:0,on:0},moon_base:{count:0,on:0,support:0,s_max:0},iridium_mine:{count:0,on:0},helium_mine:{count:0,on:0},observatory:{count:0,on:0},spaceport:{count:0,on:0,support:0,s_max:0},red_tower:{count:0,on:0},living_quarters:{count:0,on:0},vr_center:{count:0,on:0},garage:{count:0},red_mine:{count:0,on:0},fabrication:{count:0,on:0},red_factory:{count:0,on:0},exotic_lab:{count:0,on:0},ziggurat:{count:0},space_barracks:{count:0,on:0},biodome:{count:0,on:0},laboratory:{count:0,on:0},geothermal:{count:0,on:0},swarm_plant:{count:0},swarm_control:{count:0,support:0,s_max:0},swarm_satellite:{count:0},gas_mining:{count:0,on:0},gas_storage:{count:0},star_dock:{count:0,ship:0,probe:0,template:"human"},outpost:{count:0,on:0},drone:{count:0},oil_extractor:{count:0,on:0},space_station:{count:0,on:0,support:0,s_max:0},iridium_ship:{count:0,on:0},elerium_ship:{count:0,on:0},elerium_prospector:{count:0,on:0},iron_ship:{count:0,on:0},elerium_contain:{count:0,on:0},e_reactor:{count:0,on:0},world_collider:{count:0},world_controller:{count:0,on:0},starport:{count:0,on:0,support:0,s_max:0},mining_droid:{count:0,on:0,adam:0,uran:0,coal:0,alum:0},processing:{count:0,on:0},habitat:{count:0,on:0},fusion:{count:0,on:0},exchange:{count:0,on:0},warehouse:{count:0},xfer_station:{count:0,on:0},cargo_yard:{count:0},cruiser:{count:0,on:0},dyson:{count:0},nexus:{count:0,on:0,support:0,s_max:0},harvester:{count:0,on:0},far_reach:{count:0,on:0},stellar_engine:{count:0,mass:8,exotic:0},mass_ejector:{count:0,on:0,total:0,mass:0,Food:0,Lumber:0,Chrysotile:0,Stone:0,Crystal:0,Furs:0,Copper:0,Iron:0,Aluminium:0,Cement:0,Coal:0,Oil:0,Uranium:0,Steel:0,Titanium:0,Alloy:0,Polymer:0,Iridium:0,Helium_3:0,Deuterium:0,Neutronium:0,Adamantite:0,Infernite:0,Elerium:0,Nano_Tube:0,Graphene:0,Stanene:0,Bolognium:0,Vitreloy:0,Orichalcum:0,Plywood:0,Brick:0,Wrought_Iron:0,Sheet_Metal:0,Mythril:0,Aerogel:0,Nanoweave:0,Scarletite:0},stargate:{count:0},gateway_station:{count:0,on:0},s_gate:{count:0,on:0},starbase:{count:0,on:0,support:0,s_max:0},bolognium_ship:{count:0,on:0,crew:0},scout_ship:{count:0,on:0,crew:0,mil:0},corvette_ship:{count:0,on:0,crew:0,mil:0},frigate_ship:{count:0,on:0,crew:0,mil:0},cruiser_ship:{count:0,on:0,crew:0,mil:0},dreadnought:{count:0,on:0,crew:0,mil:0},foothold:{count:0,on:0,support:0,s_max:0},turret:{count:0,on:0},carport:{count:0,damaged:0,repair:0},war_droid:{count:0,on:0},repair_droid:{count:0,on:0},war_drones:{count:0,on:0},sensor_drone:{count:0,on:0},attractor:{count:0,on:0}};function ne(r,a){a||(a="space"),e[a][r]||(e[a][r]=xu[r]),e[a][r].count++}function Hi(r,a){return r&&a?Yt[r][a]:Yt}function Ko(){return Cr}function No(){return He}function sc(r,a,i){switch(r){case"space":return Dr(Yt,a,i);case"interstellar":return Dr(Cr,a,i);case"galaxy":return Dr(He,a,i)}}function Dr(r,a,i){let s=e.race.truepath?"truepath":"standard";if(r[a][i].hasOwnProperty("path")&&!r[a][i].path.includes(s))return!1;var n=!0;return Object.keys(r[a][i].reqs).forEach(function(c){(!e.tech[c]||e.tech[c]=r[a][i].grant[1]&&(n=!1),n}function Pt(){!e.settings.tabLoad&&e.settings.civTabs!==1||(Lo("inner"),e.race.truepath&&Lo("outer"),qi(),ac())}function Lo(r){if(r||(r=e.settings.spaceTabs===5?"outer":"inner"),!e.settings.tabLoad&&(e.settings.civTabs!==1||![1,5].includes(e.settings.spaceTabs)||e.settings.civTabs===1&&e.settings.spaceTabs===1&&r!=="inner"||e.settings.spaceTabs===5&&r!=="outer"))return;let a=r==="inner"?$("#space"):$("#outerSol");if(le(a),a.append($(`${t(r==="inner"?"tab_space":"tab_outer_space")} `)),!e.settings.showSpace)return!1;let i=[];Object.keys(Yt).forEach(function(s){e.race.orbit_decayed||e.race.cataclysm?s!=="spc_home"&&(i.push(s),(e.race.orbit_decayed&&s==="spc_red"||e.race.cataclysm&&s==="spc_moon")&&i.push("spc_home")):i.push(s)}),i.forEach(function(s){let n=s.replace("spc_","");if(e.settings.space[`${n}`]){if(e.race.truepath&&Yt[s].info.zone!==r)return;let c=typeof Yt[s].info.name=="string"?Yt[s].info.name:Yt[s].info.name(),l=!!(e.race.orbit_decayed||e.race.cataclysm);if(l&&s!=="spc_home"||!l){if(Yt[s].info.support){let o=Yt[s].info.support;e.space[o].hasOwnProperty("support")||(e.space[o].support=0,e.space[o].s_max=0),a.append(`
${c} {{ support }}/{{ s_max }} `),D({el:`#sr${s}`,data:e.space[o]})}else a.append(``);e.race.truepath&&Yt[s].info.hasOwnProperty("syndicate")&&Yt[s].info.syndicate()&&e.tech.syndicate&&($(`#${s}`).append(`
`),$(`#${s}synd`).append(`${t("space_syndicate")} `),$(`#${s}synd`).append(`${t("space_scan_effectiveness")} `),$(`#${s}synd`).append(`${t("space_overkill")} `),D({el:`#${s}synd`,data:e.space.syndicate,methods:{threat(o){if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){let d=yt(o,!0);if(d.s>=10)return d.s>=50?d.r:Math.round(d.r*d.s*.02)}return"???"},scan(o){return e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")?+((yt(o,!0).s+25)/1.25).toFixed(1)+"%":t("galaxy_piracy_none")},overkill(o){if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){let d=yt(o,!0);return d.s>=100?d.o:0}return 0}}}),Yt[s].info.hasOwnProperty("extra")&&Yt[s].info.extra(s))}pe(s,function(){return typeof Yt[s].info.desc=="string"?Yt[s].info.desc:Yt[s].info.desc()},{elm:`#${s} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(Yt[s]).forEach(function(o){if(o!=="info"&&Dr(Yt,s,o)){let d=Yt[s][o];Br(d,r==="inner"?"space":"outerSol",o)}})}})}function qi(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==2))return;let r=$("#interstellar");if(le(r),r.append($(`${t("tab_interstellar")} `)),!e.settings.showDeep)return!1;Object.keys(Cr).forEach(function(a){let i=a.replace("int_","");if(e.settings.space[`${i}`]){let s=typeof Cr[a].info.name=="string"?Cr[a].info.name:Cr[a].info.name();if(Cr[a].info.support){let n=Cr[a].info.support;e.interstellar[n].hasOwnProperty("support")||(e.interstellar[n].support=0,e.interstellar[n].s_max=0),r.append(`
${s} {{ support }}/{{ s_max }} `),D({el:`#sr${a}`,data:e.interstellar[n]})}else r.append(``);pe(a,function(){return typeof Cr[a].info.desc=="string"?Cr[a].info.desc:Cr[a].info.desc()},{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(Cr[a]).forEach(function(n){if(n!=="info"&&Dr(Cr,a,n)){let c=Cr[a][n];Br(c,"interstellar",n)}})}})}function ac(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==3))return;let r=$("#galaxy");if(le(r),r.append($(`${t("tab_galactic")} `)),!e.settings.showGalactic)return!1;ku(r,"fleet"),Object.keys(He).forEach(function(a){let i=a.replace("gxy_","");if(e.galaxy.defense&&!e.galaxy.defense.hasOwnProperty(a)&&(e.galaxy.defense[a]={}),e.settings.space[`${i}`]){let s=typeof He[a].info.name=="string"?He[a].info.name:He[a].info.name(),n=$(`
`);r.append(n);let c=$(`${s} `);n.append(c),e.tech.xeno&&e.tech.xeno>=3&&n.append(`{{ r.control().name }} `);let l={el:`#${a}`,data:{r:He[a].info},methods:{threat(o){let d=e.race.infiltrator?1:2;if(e.galaxy.defense[o].scout_ship>=d){let h=(1-kt(o,!0))*100;return h=h<1?Math.ceil(h):Math.round(h),h===0?"has-text-success":h<=20?"has-text-advanced":h<=40?"has-text-info":h<=60?"has-text-warning":h<=80?"has-text-caution":"has-text-danger"}return"has-text-danger"}},filters:{pirate(o){let d=e.race.infiltrator?1:2;if(e.galaxy.defense[o].scout_ship>=d){let h=(1-kt(o,!0))*100;h=h<1?Math.ceil(h):Math.round(h);let _=e.race.infiltrator?3:4;return e.galaxy.defense[o].scout_ship>=_?`${h}%`:h===0?t("galaxy_piracy_none"):h<=20?t("galaxy_piracy_vlow"):h<=40?t("galaxy_piracy_low"):h<=60?t("galaxy_piracy_avg"):h<=80?t("galaxy_piracy_high"):t("galaxy_piracy_vhigh")}return"???"},defense(o){return kt(o,!0,!0)}}};if(He[a].info.support){let o=He[a].info.support;e.galaxy[o]&&(e.galaxy[o].hasOwnProperty("support")||(e.galaxy[o].support=0,e.galaxy[o].s_max=0),n.append('{{ s.support }}/{{ s.s_max%1 ? s.s_max.toFixed(2) : s.s_max }} '),l.data.s=e.galaxy[o])}e.tech.piracy&&n.append(`${t("galaxy_piracy_threat",[F[e.galaxy.alien2.id].name])} {{ '${a}' | pirate }} | ${t("galaxy_armada")} : {{ '${a}' | defense }}
`),D(l),pe(a,function(){return typeof He[a].info.desc=="string"?He[a].info.desc:He[a].info.desc()},{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),pe(a,function(){return t("galaxy_control",[He[a].info.control().name,s])},{elm:`#${a} .regionControl`,classes:"has-background-light has-text-dark"}),Object.keys(He[a]).forEach(function(o){if(o!=="info"&&Dr(He,a,o)){let d=He[a][o];Br(d,"galaxy",o)}})}})}function ku(r,a){if(e.tech.piracy&&!e.race.truepath){let i=$(`
${t("galaxy_armada")}
`);r.append(i);let s=e.tech.world_control?t("civics_garrison_peacekeepers"):t("civics_garrison_soldiers");i.append($("| ")),i.append($(`${s} {{ g.workers | stationed }} / {{ g.max | s_max }} `)),i.append($("| ")),i.append($(`${t("job_crew_mil")} {{ g.crew }} `)),i.append($("| ")),i.append($(`${t("job_crew_civ")} {{ c.workers }} / {{ c.max }} `)),D({el:`#h${a}`,data:{g:e.civic.garrison,c:e.civic.crew},filters:{stationed(o){return We()},s_max(o){return We(!0)}}}),["soldier","crew1","crew2"].forEach(function(o){pe(`h${a}${o}`,function(){switch(o){case"soldier":return Tn();case"crew1":return t("civics_garrison_crew_desc");case"crew2":return t("job_crew_desc")}},{elm:`#h${a} span.${o}`})});let n=$(`
`);r.append(n);let c=["scout_ship","corvette_ship","frigate_ship","cruiser_ship","dreadnought"],l=[];for(let o=0;o<6;o++){let d=$('
');l.push(d),n.append(d)}for(let o=0;o${He.gxy_gateway[c[o]].title}`);l[o+1].append(d)}l[0].append($(" ")),l[0].append($(`${He.gxy_gateway.info.name} `));for(let o=0;o{{ gateway.${c[o]} }}`);l[o+1].append(d)}Object.keys(e.galaxy.defense).forEach(function(o){let d=o.substring(4);if(e.settings.space[d]&&d!=="gateway"){let h=$(`${typeof He[o].info.name=="string"?He[o].info.name:He[o].info.name()} `);l[0].append(h);for(let _=0;_'),w=$(`« `),M=$(`{{ ${d}.${c[_]} }} `),A=$(`» `);l[_+1].append(m),m.append(w),m.append(M),m.append(A)}}}),D({el:`#${a}`,data:{stargate:e.galaxy.defense.gxy_stargate,gateway:e.galaxy.defense.gxy_gateway,gorddon:e.galaxy.defense.gxy_gorddon,alien1:e.galaxy.defense.gxy_alien1,alien2:e.galaxy.defense.gxy_alien2,chthonian:e.galaxy.defense.gxy_chthonian,t:e.tech},methods:{sub(o,d){if(e.galaxy.defense[o][d]>0){let h=fe();h>e.galaxy.defense[o][d]&&(h=e.galaxy.defense[o][d]),e.galaxy.defense.gxy_gateway[d]+=h,e.galaxy.defense[o][d]-=h}},add(o,d){if(e.galaxy.defense.gxy_gateway[d]>0){let h=fe();h>e.galaxy.defense.gxy_gateway[d]&&(h=e.galaxy.defense.gxy_gateway[d]),e.galaxy.defense.gxy_gateway[d]-=h,e.galaxy.defense[o][d]+=h}}}}),Object.keys(e.galaxy.defense).forEach(function(o){let d=o.substring(4);e.settings.space[d]&&pe(`armada${d}`,function(){return`${typeof He[o].info.desc=="string"?He[o].info.desc:He[o].info.desc()}
`})});for(let o=0;o=5&&U.iron_ship&&(r*=.95**U.iron_ship),r}function Zs(r){if(e.space.swarm_plant){let a=e.tech.swarm?.88:.94;e.tech.swarm>=3&&(a-=xt/100),a<.05&&(a=.05),r*=a**e.space.swarm_plant.count}return r}function Fe(r,a,i){if(i=i||{},e.race.universe==="heavy"&&(r*=1.25+.5*ft("heavy")),e.race.truepath&&(r*=a?2.5:1.25),e.city.mass_driver&&k.mass_driver){let s=e.race.truepath?.94:.95;r*=s**k.mass_driver}else i.mass_driver&&(r*=.95**i.mass_driver);return e.stats.achieve.heavyweight&&(r*=.96**e.stats.achieve.heavyweight.l),e.city.ptrait.includes("dense")&&(r*=Re.dense.vars()[2]),e.race.cataclysm&&(r*=.2),e.race.heavy&&(r*=1+b.heavy.vars()[0]/100),e.race.gravity_well&&(r*=1.35+9.65*ft("heavy")),Ve("launch_day")&&(r*=.95),r}function ze(r){return e.race.universe==="heavy"&&(r*=1.2+.3*ft("heavy")),e.stats.achieve.heavyweight&&(r*=.96**e.stats.achieve.heavyweight.l),e.race.heavy&&(r*=1+b.heavy.vars()[0]/100),Ve("launch_day")&&(r*=.95),r}function Do(){let r=1;if(e.space.ziggurat&&e.space.ziggurat.count>0){let a=e.tech.ancient_study?.006:.004;if(e.tech.ancient_deify&&e.tech.ancient_deify>=2&&U.exotic_lab&&(a+=1e-4*U.exotic_lab),e.civic.govern.type==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let i=2e-5;e.race.high_pop&&(i=xe(i)),a+=i*e.civic.priest.workers}e.race.ooze&&(a*=1-b.ooze.vars()[1]/100),e.race.high_pop&&(a=xe(a)),r+=e.space.ziggurat.count*e.civic.colonist.workers*a}return r}function W(){let r={red:F[e.race.species].solar.red,hell:F[e.race.species].solar.hell,gas:F[e.race.species].solar.gas,gas_moon:F[e.race.species].solar.gas_moon,dwarf:F[e.race.species].solar.dwarf,titan:Mi[F[e.race.species].type].solar.titan,enceladus:Mi[F[e.race.species].type].solar.enceladus,triton:Mi[F[e.race.species].type].solar.triton,eris:Mi[F[e.race.species].type].solar.eris};if(e.race.species==="custom")for(let a of["titan","enceladus","triton","eris"])e.custom.race0.hasOwnProperty(a)&&(r[a]=e.custom.race0[a]);return r}var Dt=["l","h","a","e","m","mg"],Rr={standard:{name:t("universe_standard"),desc:t("universe_standard_desc"),effect:t("universe_standard_effect")},heavy:{name:t("universe_heavy"),desc:t("universe_heavy_desc"),effect:t("universe_heavy_effect",[5])},antimatter:{name:t("universe_antimatter"),desc:t("universe_antimatter_desc"),effect:t("universe_antimatter_effect")},evil:{name:t("universe_evil"),desc:t("universe_evil_desc"),effect:t("universe_evil_effect")},micro:{name:t("universe_micro"),desc:t("universe_micro_desc"),effect:t("universe_micro_effect",[75])},magic:{name:t("universe_magic"),desc:t("universe_magic_desc"),effect:t("universe_magic_effect")}};function nc(){let r=[];if(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=4&&e.custom.hasOwnProperty("planet")&&Object.keys(Rr).forEach(function(a){let i=it(a);e.custom.planet.hasOwnProperty(i)&&e.custom.planet[i].s&&r.push(`${i}:s`)}),e.race.geck&&e.race.geck>0){let a=$(`${t("gecks_remaining")} : {{ geck }}
`);$("#evolution").append(a),D({el:"#geck",data:e.race})}if(e.race.probes===0)ic({custom:r});else{let a=!1;for(let i=0;i`),c=$(`${Rr[i].name} `);n.append(c),$("#evolution").append(n),$("#"+s).on("click",function(){e.race.universe=i,le($("#evolution")),nc(),Ie()}),pe(s,function(l){l.popper.append($(`${Rr[i].name}
`)),l.popper.append($(`${Rr[i].desc}
`)),l.popper.append($(`${Rr[i].effect}
`))},{classes:"has-background-light has-text-dark"})}}function vs(r){!r&&!e.race.noexport&&(Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ie(`biome_${e.city.biome}`),ie(`genus_${F[e.race.species].type}`),e.race.witch_hunter&&e.race.universe==="magic"?ie("soul_sponge"):(ie("ascended"),e.interstellar.thermal_collector.count===0&&De("energetic")),e.race.species==="junker"&&De("the_misery"),!e.race.modified&&e.race.junker&&e.race.species==="junker"&&De("garbage_pie"),e.race.emfield&&ie("technophobe"),e.race.cataclysm&&De("finish_line"),e.race.noexport="Race",le($("#city")),e.settings.showCity=!0,e.settings.showCivic=!1,e.settings.showResearch=!1,e.settings.showResources=!1,e.settings.showGenetics=!1,e.settings.showSpace=!1,e.settings.showDeep=!1,e.settings.showGalactic=!1,e.settings.showPortal=!1,e.settings.spaceTabs=0);let a=$('
'),i={ascended:{},technophobe:e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l?e.stats.achieve.technophobe.l:0};if(r?r.append(a):$("#city").append(a),a.append(`
${t("genelab_title")} - ${t("genelab_genes")} {{ g.genes }} - ${t("trait_untapped_name")}: {{ g.genes | untapped }} `),r){a.append(`
+ `)}var Yt={spc_home:{info:{name(){return A[e.race.species].home},desc:t("space_home_info_desc"),zone:"inner",syndicate(){return!1}},test_launch:{id:"space-test_launch",title:t("space_home_test_launch_title"),desc:t("space_home_test_launch_desc"),reqs:{space:1},grant:["space",2],queue_complete(){return e.tech.space>=2?0:1},cost:{Money(){return 1e5},Oil(r,a){return Ae(7500,!1,a)}},effect:t("space_home_test_launch_effect"),action(){if(u($(this)[0])){if(e.race.truepath){let r=1;if(_r("gov0")||r++,_r("gov1")||r++,_r("gov2")||r++,Math.floor(J(0,r))!==0)return I(t("space_home_test_launch_action_fail"),"danger",!1,["progress"]),0}return e.space.satellite={count:0},I(t("space_home_test_launch_action"),"info",!1,["progress"]),!0}return!1}},satellite:{id:"space-satellite",title:t("space_home_satellite_title"),desc:t("space_home_satellite_desc"),reqs:{space:2},cost:{Money(r){return f("satellite",r,72e3,1.22)},Knowledge(r){return f("satellite",r,28e3,1.22)},Oil(r,a){return f("satellite",r,Ae(3200,!1,a),1.22)},Alloy(r){return f("satellite",r,8e3,1.22)}},effect(){let r=e.race.cataclysm||e.race.orbit_decayed?2e3:750;if((e.race.cataclysm||e.race.orbit_decayed)&&e.tech.supercollider){let n=e.tech.particles&&e.tech.particles>=3?5:10;r*=e.tech.supercollider/n+1}let a=e.race.cataclysm?t("space_moon_observatory_title"):e.race.orbit_decayed?t("city_university"):dr(),i=e.race.cataclysm?25:e.race.orbit_decayed?12:4,s=`${t("space_home_satellite_effect2",[a,i])}
`;return`${t("plus_max_resource",[r,t("resource_Knowledge_name")])}
${s}${t("space_home_satellite_effect3",[e.civic.scientist?e.civic.scientist.name:t("job_scientist")])}
`},action(){return u($(this)[0])?(ne("satellite"),e.resource.Knowledge.max+=750,!0):!1}},gps:{id:"space-gps",title:t("space_home_gps_title"),desc(){return e.space.hasOwnProperty("gps")&&e.space.gps.count<4?`${t("space_home_gps_desc")}
${t("space_home_gps_desc_req")}
`:`${t("space_home_gps_desc")}
`},reqs:{satellite:1},not_trait:["terrifying"],cost:{Money(r){return f("gps",r,75e3,1.18)},Knowledge(r){return f("gps",r,5e4,1.18)},Copper(r){return f("gps",r,6500,1.18)},Oil(r,a){return f("gps",r,Ae(3500,!1,a),1.18)},Titanium(r){return f("gps",r,8e3,1.18)}},effect(r){return(r||0)+(e.space.hasOwnProperty("gps")?e.space.gps.count:0)<4?t("space_home_gps_effect_req"):`${t("space_home_gps_effect")}
${t("space_home_gps_effect2",[2])}
`},action(){return u($(this)[0])?(ne("gps"),!0):!1}},propellant_depot:{id:"space-propellant_depot",title:t("space_home_propellant_depot_title"),desc:t("space_home_propellant_depot_desc"),reqs:{space_explore:1},cost:{Money(r){return f("propellant_depot",r,55e3,1.35)},Aluminium(r){return f("propellant_depot",r,22e3,1.35)},Oil(r,a){return f("propellant_depot",r,Ae(5500,!1,a),1.35)}},effect(){let r=H(1250)*(e.tech.world_control?1.5:1);if(e.resource.Helium_3.display){let a=H(1e3)*(e.tech.world_control?1.5:1);return`${t("plus_max_resource",[r,t("resource_Oil_name")])}
${t("plus_max_resource",[a,t("resource_Helium_3_name")])}
`}return`${t("plus_max_resource",[r,t("resource_Oil_name")])}
`},action(){return u($(this)[0])?(ne("propellant_depot"),e.resource.Oil.max+=H(1250)*(e.tech.world_control?1.5:1),e.resource.Helium_3.display&&(e.resource.Helium_3.max+=H(1e3)*(e.tech.world_control?1.5:1)),!0):!1}},nav_beacon:{id:"space-nav_beacon",title(){return e.race.orbit_decayed?t("space_home_broadcast_beacon_title"):t("space_home_nav_beacon_title")},desc:`${t("space_home_nav_beacon_desc")}
${t("requires_power")}
`,reqs:{luna:2},cost:{Money(r){return f("nav_beacon",r,75e3,1.32)},Copper(r){return f("nav_beacon",r,38e3,1.32)},Aluminium(r){return f("nav_beacon",r,44e3,1.32)},Oil(r,a){return f("nav_beacon",r,Ae(12500,!1,a),1.32)},Iridium(r){return f("nav_beacon",r,1200,1.32)}},powered(){return _e(2)},powerBalancer(){return e.tech.luna&&e.tech.luna>=3?[{s:e.space.moon_base.s_max-e.space.moon_base.support},{s:e.space.spaceport.s_max-e.space.spaceport.support}]:[{s:e.space.moon_base.s_max-e.space.moon_base.support}]},support(){return 1},effect(){let r="";e.race.orbit_decayed&&e.tech.broadcast&&(r=`${t("space_red_vr_center_effect1",[e.tech.broadcast/2])}
`);let a=e.race.orbit_decayed?"":`${t("space_home_nav_beacon_effect1")}
`,i=e.tech.luna>=3?`${t("space_red_spaceport_effect1",[W().red,1])}
`:"";return`${a}${i}${r}${t("space_home_nav_beacon_effect2",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("nav_beacon"),re($(this)[0]),!0):!1}}},spc_moon:{info:{name:t("space_moon_info_name"),desc(){let r=A[e.race.species].home;return t("space_moon_info_desc",[r])},support:"moon_base",zone:"inner",syndicate(){return!0}},moon_mission:{id:"space-moon_mission",title:t("space_moon_mission_title"),desc:t("space_moon_mission_desc"),reqs:{space:2,space_explore:2},grant:["space",3],queue_complete(){return e.tech.space>=3?0:1},cost:{Oil(r,a){return+Ae(12e3,!1,a).toFixed(0)}},effect:t("space_moon_mission_effect"),action(){return u($(this)[0])?(I(t("space_moon_mission_action"),"info",!1,["progress"]),e.space.iridium_mine={count:0,on:0},e.space.helium_mine={count:0,on:0},!0):!1}},moon_base:{id:"space-moon_base",title:t("space_moon_base_title"),desc(){return`${t("space_moon_base_desc")}
${t("requires_power_combo",[e.resource.Oil.name])}
`},reqs:{space:3},cost:{Money(r){return f("moon_base",r,22e3,1.32)},Cement(r){return f("moon_base",r,18e3,1.32)},Alloy(r){return f("moon_base",r,7800,1.32)},Polymer(r){return f("moon_base",r,12500,1.32)}},effect(r){let a=H(500),i=+Ae($(this)[0].support_fuel().a,!0,r).toFixed(2);return`${t("space_moon_base_effect1")}
${t("plus_max_resource",[a,t("resource_Iridium_name")])}
${t("space_moon_base_effect3",[i,$(this)[0].powered()])}
`},support(){return 2},support_fuel(){return{r:"Oil",a:2}},powered(){return _e(4)},powerBalancer(){return[{s:e.space.moon_base.s_max-e.space.moon_base.support}]},refresh:!0,action(){if(u($(this)[0])){if(ne("moon_base"),re($(this)[0]),e.space.moon_base.count===1&&(e.tech.moon=1),!e.tech.luna&&(e.tech.luna=1,e.race.truepath)){let r=t("space_moon_base_msg",[ut(3)]);e.civic.foreign.gov3.hstl<10?r=`${r} ${t("space_moon_base_msg_ally")}`:e.civic.foreign.gov3.hstl>60&&(r=`${r} ${t("space_moon_base_msg_hstl")}`),I(r,"info",!1,["progress"])}return e.race.orbit_decay&&e.race.orbit_decay>e.stats.days+2500&&(e.race.orbit_decay=e.stats.days+2500,I(t("evo_challenge_orbit_decayed_accelerated",[e.race.orbit_decay-e.stats.days]),"info",!1,["progress"])),!0}return!1}},iridium_mine:{id:"space-iridium_mine",title:t("space_moon_iridium_mine_title"),desc:`${t("space_moon_iridium_mine_desc")}
${t("space_support",[t("space_moon_info_name")])}
`,reqs:{space:3,luna:1},cost:{Money(r){return f("iridium_mine",r,42e3,1.35)},Lumber(r){return f("iridium_mine",r,9e3,1.35)},Titanium(r){return f("iridium_mine",r,17500,1.35)}},effect(){let r=T("iridium_mine","iridium"),a=+r.b.toFixed(3),i="";e.race.truepath&&(e.civic.foreign.gov3.hstl<10?i=`${t("space_rival_ally",[+(r.g*100).toFixed(1)])}
`:e.civic.foreign.gov3.hstl>60&&(i=`${t("space_rival_war",[+(r.g*100).toFixed(1)])}
`));let s=e.race.cataclysm?`${t("produce",[+T("iridium_mine","coal").toFixed(2),e.resource.Coal.name])}
`:"",n=e.race.cataclysm?`${t("produce",[+(T("iridium_mine","coal")/48).toFixed(3),e.resource.Uranium.name])}
`:"";return`${t("space_used_support",[t("space_moon_info_name")])}
${t("space_moon_iridium_mine_effect",[a])}
${i}${s}${n}`},s_type:"moon",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.resource.Iridium.display=!0,ne("iridium_mine"),e.resource.Mythril.display||(e.resource.Mythril.display=!0,Lt()),re($(this)[0]),!0):!1}},helium_mine:{id:"space-helium_mine",title:t("space_moon_helium_mine_title"),desc:`${t("space_moon_helium_mine_desc")}
${t("space_support",[t("space_moon_info_name")])}
`,reqs:{space:3,luna:1},cost:{Money(r){return f("helium_mine",r,38e3,1.35)},Aluminium(r){return f("helium_mine",r,9e3,1.35)},Steel(r){return f("helium_mine",r,17500,1.35)}},effect(){let r=H(100),a=T("helium_mine"),i=+a.b.toFixed(3),s="";return e.race.truepath&&(e.civic.foreign.gov3.hstl<10?s=`${t("space_rival_ally",[+(a.g*100).toFixed(1)])}
`:e.civic.foreign.gov3.hstl>60&&(s=`${t("space_rival_war",[+(a.g*100).toFixed(1)])}
`)),`${t("space_used_support",[t("space_moon_info_name")])}
${t("space_moon_helium_mine_effect",[i])}
${s}${t("plus_max_resource",[r,t("resource_Helium_3_name")])}
`},s_type:"moon",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.resource.Helium_3.display=!0,ne("helium_mine"),re($(this)[0]),!0):!1}},observatory:{id:"space-observatory",title:t("space_moon_observatory_title"),desc:`${t("space_moon_observatory_desc")}
${t("space_support",[t("space_moon_info_name")])}
`,reqs:{science:9,luna:1},cost:{Money(r){return f("observatory",r,2e5,1.28)},Knowledge(r){return f("observatory",r,69e3,1.28)},Stone(r){return f("observatory",r,125e3,1.28)},Iron(r){return f("observatory",r,65e3,1.28)},Iridium(r){return f("observatory",r,1250,1.28)}},effect(){let r="";e.race.cataclysm&&(r=`${t("city_university_effect",[N(1)])}
`);let a=5e3;e.race.cataclysm&&e.space.satellite&&e.space.satellite.count>0&&(a*=1+e.space.satellite.count*.25);let i=e.race.cataclysm?`${t("space_moon_observatory_cata_effect",[25])}
`:`${t("space_moon_observatory_effect",[5])}
`;return`${t("space_used_support",[t("space_moon_info_name")])}
${r}${t("plus_max_resource",[a,t("resource_Knowledge_name")])}
${i}`},s_type:"moon",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("observatory"),re($(this)[0]),!0):!1}}},spc_red:{info:{name(){return W().red},desc(){return t("space_red_info_desc",[W().red])},support:"spaceport",zone:"inner",syndicate(){return!0}},red_mission:{id:"space-red_mission",title(){return t("space_mission_title",[W().red])},desc(){return t("space_mission_desc",[W().red])},reqs:{space:3,space_explore:3},grant:["space",4],queue_complete(){return e.tech.space>=4?0:1},cost:{Helium_3(r,a){return+Ae(4500,!1,a).toFixed(0)}},effect(){return t("space_red_mission_effect",[W().red])},action(){return u($(this)[0])?(I(t("space_red_mission_action",[W().red]),"info",!1,["progress"]),e.space.living_quarters={count:0,on:0},e.space.garage={count:0},e.space.red_mine={count:0,on:0},e.space.fabrication={count:0,on:0},!0):!1}},spaceport:{id:"space-spaceport",title:t("space_red_spaceport_title"),desc(){return`${t("space_red_spaceport_desc")}
${t("requires_power_space",[e.resource.Food.name])}
`},reqs:{space:4},cost:{Money(r){return f("spaceport",r,47500,1.32)},Iridium(r){return f("spaceport",r,1750,1.32)},Mythril(r){return f("spaceport",r,25,1.32)},Titanium(r){return f("spaceport",r,22500,1.32)}},effect(r){let a=+Ae($(this)[0].support_fuel().a,!0,r).toFixed(2),i="";if(e.race.cataclysm||e.race.orbit_decayed){let s=H(Ar()*4);i=`${t("plus_max_resource",[`$${s}`,t("resource_Money_name")])}
`}return`${t("space_red_spaceport_effect1",[W().red,$(this)[0].support()])}
${i}${t("space_red_spaceport_effect2",[a,$(this)[0].powered()])}
${t("spend",[e.race.cataclysm?2:25,e.resource.Food.name])}
`},support(){let r=e.race.cataclysm||e.race.orbit_decayed?4:3;return e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=4&&r++,r},support_fuel(){return{r:"Helium_3",a:1.25}},powered(){return _e(5)},powerBalancer(){return[{s:e.space.spaceport.s_max-e.space.spaceport.support}]},refresh:!0,action(){return u($(this)[0])?(ne("spaceport"),re($(this)[0]),e.tech.mars||(e.tech.mars=1),e.race.orbit_decay&&e.race.orbit_decay>e.stats.days+1e3&&(e.race.orbit_decay=e.stats.days+1e3,I(t("evo_challenge_orbit_decayed_accelerated",[e.race.orbit_decay-e.stats.days]),"info",!1,["progress"])),!0):!1}},red_tower:{id:"space-red_tower",title:t("space_red_tower_title"),desc(){return`${t("space_red_tower_desc")}
${t("requires_power")}
`},reqs:{mars:3},cost:{Money(r){return f("red_tower",r,225e3,1.28)},Iron(r){return f("red_tower",r,22e3,1.28)},Cement(r){return f("red_tower",r,15e3,1.28)},Alloy(r){return f("red_tower",r,8e3,1.28)}},effect(){return`${t("space_red_spaceport_effect1",[W().red,e.race.cataclysm?2:1])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(2)},powerBalancer(){return[{s:e.space.spaceport.s_max-e.space.spaceport.support}]},support(){return e.race.cataclysm?2:1},action(){return u($(this)[0])?(ne("red_tower"),re($(this)[0]),!0):!1}},captive_housing:hr("captive_housing","space"),terraformer:{id:"space-terraformer",title:t("space_terraformer"),desc(r){return!e.space.hasOwnProperty("terraformer")||e.space.terraformer.count<100||r?`${t("space_terraformer")}
${t("requires_segments",[100])}
`+(e.space.hasOwnProperty("terraformer")&&e.space.terraformer.count>=100?`${t("requires_power")}
`:""):`${t("space_terraformer")}
`},reqs:{terraforming:1},condition(){return!(e.space.terraformer.count>=100)},queue_size:5,queue_complete(){return 100-e.space.terraformer.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?75e5:75e6:0},Alloy(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?25e4:75e4:0},Neutronium(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?125e3:0},Elerium(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?1e3:0},Bolognium(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?0:1e5:0},Orichalcum(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?12e3:25e4:0},Soul_Gem(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?0:1:0},Nanoweave(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?0:75e3:0},Quantium(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100&&e.race.truepath?75e3:0},Cipher(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100&&e.race.truepath?1e3:0}},effect(r){let a=(r?r.count:0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0);if(a<100){let i=100-a;return`${t("space_terraformer_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return Yt.spc_red.atmo_terraformer.effect(r)},action(){return u($(this)[0])&&e.space.terraformer.count<100?(ne("terraformer","space"),e.space.terraformer.count>=100&&(e.tech.terraforming=2,e.space.atmo_terraformer={count:1,on:0},Pt(),Ie()),!0):!1}},atmo_terraformer:{id:"space-atmo_terraformer",title:t("space_terraformer"),desc(){return`${t("space_terraformer")}
${t("requires_power")}
`},wiki:!1,reqs:{terraforming:2},condition(){return e.space.terraformer.count>=100},queue_complete(){return 0},cost:{},powered(r){return _e((r?r.truepath:e.race.truepath)?500:5e3)},postPower(r){r?setTimeout(function(){e.tech.terraforming=k.atmo_terraformer?3:2,Pt()},250):(e.tech.terraforming=2,Pt())},effect(r){let a=Eo(),i=$(this)[0].powered(r),s=i>0?`${t("minus_power",[i])}
`:"";return`${t("space_terraformer_effect2")}
${a}${s}`},action(){return!1}},terraform:{id:"space-terraform",title:t("space_terraform"),desc:t("space_terraform"),reqs:{terraforming:3},queue_complete(){return 0},no_multi:!0,cost:{},effect(){let r=Eo();return`${t("space_terraform_effect")}
${r}`},action(){return u($(this)[0])?(Jn(),!0):!1}},assembly:hr("assembly","space"),living_quarters:{id:"space-living_quarters",title:t("space_red_living_quarters_title"),desc(){return`${t("space_red_living_quarters_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:1},cost:{Money(r){return f("living_quarters",r,rc(38e3),1.28)},Steel(r){return f("living_quarters",r,rc(15e3),1.28)},Polymer(r){return f("living_quarters",r,rc(9500),1.28)},Horseshoe(){return e.race.hooved?2:0}},effect(){let r=$(this)[0].citizens(),a="";if(e.race.cataclysm||e.race.orbit_decayed){let i=H(e.tech.home_safe>=2?e.tech.home_safe>=3?"100000":"50000":"25000");a=`${t("plus_max_resource",[`$${i}`,t("resource_Money_name")])}
`}return`${t("space_used_support",[W().red])}
${a}${t("plus_max_resource",[N(1),e.race.truepath?t("job_colonist_tp",[W().red]):t("colonist")])}
${t("plus_max_resource",[r,t("citizen")])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){if(u($(this)[0])){if(ne("living_quarters"),e.civic.colonist.display=!0,re($(this)[0])){e.resource[e.race.species].max+=N(1);let r=N(1);e.civic.colonist.max+=r;let a=Math.min(r,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=a,e.civic.colonist.workers+=a}return!0}return!1},citizens(){let r=e.race.cataclysm||e.race.orbit_decayed?2:1;if(U.biodome){let a=e.tech.mars>=6?.1:.05;r+=a*U.biodome}return+N(r).toFixed(2)}},pylon:{id:"space-pylon",title:t("space_red_pylon"),desc:t("space_red_pylon"),reqs:{magic:2},condition(){return!!(e.race.cataclysm||e.race.orbit_decayed)},cost:{Money(r){return f("pylon",r,10,1.48)},Stone(r){return f("pylon",r,12,1.42)},Crystal(r){return f("pylon",r,8,1.42)-3}},effect(){let r=H(2),a=+(.005*ft("magic")).toFixed(3);return`${t("gain",[a,e.resource.Mana.name])}
${t("plus_max_resource",[r,e.resource.Mana.name])}
`},special(){return!!(e.tech.magic&&e.tech.magic>=3)},action(){return u($(this)[0])?(e.space.pylon.count++,e.resource.Mana.max+=H(2),!0):!1}},vr_center:{id:"space-vr_center",title:t("space_red_vr_center_title"),desc(){return`${t("space_red_vr_center_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:1,broadcast:3},cost:{Money(r){return f("vr_center",r,38e4,1.25)},Copper(r){return f("vr_center",r,55e3,1.25)},Stanene(r){return f("vr_center",r,1e5,1.25)},Soul_Gem(r){return f("vr_center",r,1,1.25)}},effect(){let r=ge("gaslighter",1),a=r?r+1:1;return e.race.orbit_decayed&&(a+=2),`${t("space_used_support",[W().red])}
${t("space_red_vr_center_effect1",[a])}
${t("space_red_vr_center_effect2",[2])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("vr_center"),re($(this)[0]),!0):!1}},garage:{id:"space-garage",title:t("space_red_garage_title"),desc(){return`${t("space_red_garage_desc")}
`},reqs:{mars:1},cost:{Money(r){return f("garage",r,75e3,1.28)},Iron(r){return f("garage",r,12e3,1.28)},Brick(r){return f("garage",r,3e3,1.28)},Sheet_Metal(r){return f("garage",r,1500,1.28)}},wide:!0,res(){let r=["Copper","Iron","Cement","Steel","Titanium","Alloy","Nano_Tube","Neutronium","Infernite"];return(e.race.cataclysm||e.race.orbit_decayed)&&(r.push("Polymer"),r.push("Coal"),r.push("Lumber"),r.push("Chrysotile"),r.push("Stone"),r.push("Furs")),r},heavy(r){return!!["Copper","Iron","Steel","Titanium","Neutronium","Infernite"].includes(r)},val(r){switch(r){case"Copper":return 6500;case"Iron":return 5500;case"Cement":return e.race.cataclysm?10500:6e3;case"Steel":return 4500;case"Titanium":return 3500;case"Alloy":return 2500;case"Nano_Tube":return 25e3;case"Neutronium":return 125;case"Infernite":return 75;case"Polymer":return 2500;case"Coal":return 1500;case"Lumber":return 7500;case"Chrysotile":return 7500;case"Stone":return 7500;case"Furs":return 2200;default:return 0}},multiplier(r){let a=e.tech.particles>=4?1+e.tech.supercollider/20:1;return(e.tech.world_control||e.race.cataclysm||e.race.orbit_decayed)&&(a*=2),e.tech.shelving&&e.tech.shelving>=3&&(a*=1.5),a*=e.stats.achieve.blackhole?1+e.stats.achieve.blackhole.l*.05:1,r&&e.tech.shelving&&e.tech.shelving>=2?a*3:a},effect(){let r=$(this)[0].multiplier(!1),a=$(this)[0].multiplier(!0),i=e.tech.particles>=4?20+e.tech.supercollider:20;(e.tech.world_control||e.race.cataclysm||e.race.orbit_decayed)&&(i+=10);let s=e.race.cataclysm||e.race.orbit_decayed?`${t("plus_max_resource",[i,t("resource_Crates_name")])} `:"",n='';n=n+`${t("plus_max_resource",[i,t("resource_Containers_name")])} ${s}`;for(let c of $(this)[0].res())if(e.resource[c].display){let l=$(this)[0].heavy(c),o=Ee(+(H($(this)[0].val(c))*(l?a:r)).toFixed(0),1);n=n+`${t("plus_max_resource",[o,e.resource[c].name])} `}return n=n+"
",n},action(){if(u($(this)[0])){ne("garage");let r=e.tech.particles>=4?20+e.tech.supercollider:20;(e.tech.world_control||e.race.cataclysm||e.race.orbit_decayed)&&(r+=10),e.resource.Containers.max+=r,e.resource.Containers.display||Yr();let a=$(this)[0].multiplier(!1),i=$(this)[0].multiplier(!0);for(let s of $(this)[0].res())if(e.resource[s].display){let n=$(this)[0].heavy(s);e.resource[s].max+=H($(this)[0].val(s))*(n?i:a)}return!0}return!1}},red_mine:{id:"space-red_mine",title:t("space_red_mine_title"),desc(){return`${t("space_red_mine_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:1},cost:{Money(r){return f("red_mine",r,5e4,1.32)},Lumber(r){return f("red_mine",r,65e3,1.32)},Iron(r){return f("red_mine",r,33e3,1.32)}},effect(){let r=T("red_mine","copper"),a=T("red_mine","titanium"),i=+r.b.toFixed(3),s=+a.b.toFixed(3),n="";e.race.truepath&&(e.civic.foreign.gov3.hstl<10?n=`${t("space_rival_ally",[+(r.g*100).toFixed(1)])}
`:e.civic.foreign.gov3.hstl>60&&(n=`${t("space_rival_war",[+(r.g*100).toFixed(1)])}
`));let c=e.race.orbit_decayed?`${t("city_mine_effect1",[N(1)])}
${t("city_coal_mine_effect1",[N(1)])}
`:"",l=(e.race.cataclysm||e.race.orbit_decayed)&&!e.race.sappy?`${t("space_red_mine_effect",[+T("red_mine","stone").toFixed(2),e.resource.Stone.name])}
`:"",o=(e.race.cataclysm||e.race.orbit_decayed)&&e.race.smoldering?`${t("space_red_mine_effect",[+T("red_mine","asbestos").toFixed(2),e.resource.Chrysotile.name])}
`:"",d=e.race.cataclysm||e.race.orbit_decayed?`${t("space_red_mine_effect",[+T("red_mine","aluminium").toFixed(2),e.resource.Aluminium.name])}
`:"";return`${t("space_used_support",[W().red])}
${c}${t("space_red_mine_effect",[i,e.resource.Copper.name])}
${t("space_red_mine_effect",[s,e.resource.Titanium.name])}
${n}${o}${l}${d}`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("red_mine"),re($(this)[0]),!0):!1}},fabrication:{id:"space-fabrication",title:t("space_red_fabrication_title"),desc(){return`${t("space_red_fabrication_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:1},cost:{Money(r){return f("fabrication",r,9e4,1.32)},Copper(r){return f("fabrication",r,25e3,1.32)},Cement(r){return f("fabrication",r,12e3,1.32)},Wrought_Iron(r){return f("fabrication",r,1200,1.32)}},effect(){let r=e.race.cataclysm&&!e.race.flier?`${t("city_cement_plant_effect1",[N(1)])}
`:"",a=e.race.cataclysm||e.race.orbit_decayed?5:2;return e.race.high_pop&&(a=xe(a)),`${t("space_used_support",[W().red])}
${t("space_red_fabrication_effect1",[N(1)])}
${r}${t("space_red_fabrication_effect2",[a])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("fabrication"),re($(this)[0])&&(e.civic.craftsman.max+=N(1)),!0):!1}},red_factory:{id:"space-red_factory",title:t("space_red_factory_title"),desc(){return`${t("space_red_factory_desc")}
${t("requires_power_combo",[e.resource.Helium_3.name])}
`},reqs:{mars:4},cost:{Money(r){return f("red_factory",r,75e3,1.32)},Brick(r){return f("red_factory",r,1e4,1.32)},Coal(r){return f("red_factory",r,7500,1.32)},Mythril(r){return f("red_factory",r,50,1.32)}},effect(r){let a=`${t("space_red_factory_effect1")}
`;e.tech.foundry>=7&&(a=a+`${t("space_red_factory_effect2")}
`),e.race.orbit_decayed&&!e.race.flier&&(a=a+`${t("city_cement_plant_effect1",[N(1)])}
`);let i=+Ae(1,!0,r).toFixed(2);return a=a+`${t("space_red_factory_effect3",[i,$(this)[0].powered()])}
`,a},powered(){return _e(3)},special:!0,action(){return u($(this)[0])?(e.space.red_factory.count++,re($(this)[0])&&e.city.factory.Alloy++,e.settings.showIndustry=!0,rt(),!0):!1}},nanite_factory:hr("nanite_factory","space"),biodome:{id:"space-biodome",title(){return e.race.artifical?t("space_red_signal_tower_title"):e.race.soul_eater?t("space_red_asphodel_title"):t("space_red_biodome_title")},desc(){let r;return e.race.artifical?r=`${t("space_red_signal_tower_title")}
`:e.race.soul_eater?r=`${t("space_red_asphodel_desc")}
`:e.race.carnivore?r=`${t("space_red_biodome_desc_carn")}
`:r=`${t("space_red_biodome_desc",[W().red])}
`,`${r}
${t("space_support",[W().red])}
`},reqs:{mars:2},cost:{Money(r){return f("biodome",r,45e3,1.28)},Lumber(r){return f("biodome",r,65e3,1.28)},Brick(r){return f("biodome",r,1e3,1.28)},Nanite(r){return e.race.deconstructor?f("biodome",r,75,1.28):0}},effect(){let r=+T("biodome","food").toFixed(2),a=e.race.cataclysm||e.race.orbit_decayed?`${t("produce",[+T("biodome","cat_food").toFixed(2),e.resource.Food.name])}
`:"",i=(e.race.cataclysm||e.race.orbit_decayed)&&!e.race.kindling_kindred&&!e.race.smoldering?`${t("space_red_mine_effect",[+T("biodome","lumber").toFixed(2),e.resource.Lumber.name])}
`:"",s=e.tech.mars>=6?.1:.05,n=e.race.artifical?t("city_transmitter_effect",[H(500)]):t("plus_max_resource",[H(100),t("resource_Food_name")]),c=e.race.artifical||e.race.orbit_decayed?`${n}
${t("space_used_support",[W().red])}${a}${t("space_red_biodome_effect",[r,e.resource.Food.name])}
${t("space_red_biodome_effect2",[+N(s).toFixed(2)])}
${i}${c}`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("biodome"),e.race.cataclysm||(ie("colonist"),e.race.joyless&&(ie("joyless"),delete e.race.joyless,ue())),re($(this)[0]),!0):!1},flair(){return e.race.artifical?t("space_red_signal_tower_flair"):e.race.soul_eater?t("space_red_asphodel_flair"):e.race.carnivore?t("space_red_biodome_flair_carn"):t("space_red_biodome_flair")}},red_university:{id:"space-red_university",title:t("city_university"),desc(){return t("city_university_desc",[W().red])},reqs:{mars:1},trait:["orbit_decayed"],cost:{Money(r){return f("university",r,900,1.5,"city")-500},Lumber(r){return f("university",r,500,1.36,"city")-200},Stone(r){return f("university",r,750,1.36,"city")-350},Crystal(r){return e.race.universe==="magic"?f("university",r,5,1.36,"city"):0}},wiki:!1,effect(){return O.city.university.effect()},action(){if(u($(this)[0])){let r=e.tech.science&&e.tech.science>=8?700:500;if(e.tech.supercollider){let a=e.tech.particles&&e.tech.particles>=3?12.5:25;r*=e.tech.supercollider/a+1}return e.resource.Knowledge.max+=r,e.city.university.count++,e.space.red_university.count=e.city.university.count,e.civic.professor.display=!0,e.civic.professor.max=N(e.city.university.count),!0}return!1}},exotic_lab:{id:"space-exotic_lab",title:t("space_red_exotic_lab_title"),desc(){return`${t("space_red_exotic_lab_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:5},cost:{Money(r){return f("exotic_lab",r,75e4,1.28)},Steel(r){return f("exotic_lab",r,1e5,1.28)},Mythril(r){return f("exotic_lab",r,1e3,1.28)},Elerium(r){return f("exotic_lab",r,20,1.28)-4}},effect(){let r=500;e.tech.science>=13&&e.interstellar.laboratory&&bt.laboratory&&(r+=bt.laboratory*25),e.tech.ancient_study&&e.tech.ancient_study>=2&&(r+=e.space.ziggurat.count*15),e.tech.mass>=2&&k.mass_driver&&(r+=xe(k.mass_driver*e.civic.scientist.workers)),e.tech.science>=21&&(r*=1.45),e.race.high_pop&&(r=xe(r));let a=H(10),i="",s="";return(e.race.cataclysm||e.race.orbit_decayed)&&(i=`${t("city_wardenclyffe_effect1",[N(1),e.civic.scientist.name])}
`,r*=1+U.observatory*.25,e.tech.science>=15&&(s=`${t("city_wardenclyffe_effect4",[2])}
`)),`${t("space_used_support",[W().red])}
${i}${s}${t("space_red_exotic_lab_effect1",[+r.toFixed(0)])}
${t("plus_max_resource",[a,t("resource_Elerium_name")])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("exotic_lab"),re($(this)[0]),!0):!1},flair(){return`${t("space_red_exotic_lab_flair1")}
${t("space_red_exotic_lab_flair2")}
`}},ziggurat:{id:"space-ziggurat",title:t("space_red_ziggurat_title"),desc(){let r=e.race.old_gods!=="none"?A[e.race.old_gods.toLowerCase()].entity:A[e.race.species].entity;return`${t("space_red_ziggurat_desc",[r])}
`},reqs:{theology:4},cost:{Money(r){return f("ziggurat",r,6e5,1.28)},Stone(r){return f("ziggurat",r,25e4,1.28)},Aluminium(r){return f("ziggurat",r,7e4,1.28)},Mythril(r){return f("ziggurat",r,250,1.28)}},effect(){let r=e.tech.ancient_study?.6:.4;if(e.tech.ancient_deify&&e.tech.ancient_deify>=2&&U.exotic_lab&&(r+=.01*U.exotic_lab),e.civic.govern.type==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let s=.002;e.race.high_pop&&(s=xe(s)),r+=s*e.civic.priest.workers}e.race.ooze&&(r*=1-b.ooze.vars()[1]/100),e.race.high_pop&&(r=xe(r)),r=+r.toFixed(2);let a=e.race.truepath?[r,A[e.race.species].home]:[r],i=`${t(e.race.truepath?"space_red_ziggurat_effect_tp":"space_red_ziggurat_effect",a)}
`;return e.tech.ancient_study&&e.tech.ancient_study>=2&&(i=i+`${t("interstellar_laboratory_effect",[3])}
`),(e.race.cataclysm||e.race.orbit_decayed)&&(i=i+cc()),e.genes.ancients&&e.genes.ancients>=4&&(i=i+`${t("city_temple_effect6",[N(1)])}
`),i},action(){return u($(this)[0])?(ne("ziggurat"),e.genes.ancients&&e.genes.ancients>=4&&(e.civic.priest.display=!0,e.civic.priest.max+=N(1)),e.race.cataclysm&&ie("iron_will",!1,1),!0):!1}},space_barracks:{id:"space-space_barracks",title:t("space_red_space_barracks_title"),desc(){return`${t("space_red_space_barracks_desc")}
${t("space_red_space_barracks_desc_req")}
`},reqs:{marines:1},cost:{Money(r){return f("space_barracks",r,35e4,1.28)},Alloy(r){return f("space_barracks",r,65e3,1.28)},Iridium(r){return f("space_barracks",r,22500,1.28)},Wrought_Iron(r){return f("space_barracks",r,12500,1.28)},Horseshoe(){return e.race.hooved?2:0}},effect(r){let a=e.race.orbit_decayed?O.city.boot_camp.effect():"",i=+Ae(2,!0,r).toFixed(2),s=e.tech.marines>=2?N(4):N(2),n=e.race.cataclysm?"":`${t("space_red_space_barracks_effect3",[e.resource.Food.name])}
`;return`${t("plus_max_soldiers",[s])}
${a}${t("space_red_space_barracks_effect2",[i])}
${n}`},powered(){return 0},action(){return u($(this)[0])?(ne("space_barracks"),e.space.space_barracks.on++,!0):!1},flair(){return t("space_red_space_barracks_flair")}},bonfire:hr("bonfire","space"),horseshoe:hr("horseshoe","space")},spc_hell:{info:{name(){return W().hell},desc(){return t("space_hell_info_desc",[W().hell])},zone:"inner",syndicate(){return!1}},hell_mission:{id:"space-hell_mission",title(){return t("space_mission_title",[W().hell])},desc(){return t("space_mission_desc",[W().hell])},reqs:{space:3,space_explore:3},grant:["hell",1],queue_complete(){return e.tech.hell>=1?0:1},cost:{Helium_3(r,a){return+Ae(6500,!1,a).toFixed(0)}},effect(){return t("space_hell_mission_effect1",[W().hell])},action(){return u($(this)[0])?(I(t("space_hell_mission_action",[W().hell]),"info",!1,["progress"]),e.space.geothermal={count:0,on:0},!0):!1}},geothermal:{id:"space-geothermal",title:t("space_hell_geothermal_title"),desc(){return`${t("space_hell_geothermal_desc")}
${t("space_hell_geothermal_desc_req")}
`},reqs:{hell:1},cost:{Money(r){return f("geothermal",r,38e3,1.35)},Steel(r){return f("geothermal",r,15e3,1.35)},Polymer(r){return f("geothermal",r,9500,1.35)}},effect(r){let a=+Ae($(this)[0].p_fuel().a,!0,r).toFixed(2);return`${e.race.cataclysm||e.race.orbit_decayed?`${t("interstellar_stellar_forge_effect3",[1])}
`:""}${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])} , ${t("space_belt_station_effect3",[a])} `},special(){return!!(e.race.cataclysm||e.race.orbit_decayed)},powered(){let r=-8;return e.race.forge&&(r-=b.forge.vars()[0]),e.stats.achieve.failed_history&&e.stats.achieve.failed_history.l>=5&&(r-=2),dt(r)},p_fuel(){return{r:"Helium_3",a:.5}},action(){return u($(this)[0])?(ne("geothermal"),e.space.geothermal.on++,!0):!1}},hell_smelter:{id:"space-hell_smelter",title(){return t("space_hell_smelter_title",[W().hell])},desc(){return t("space_hell_smelter_title",[W().hell])},reqs:{hell:1,m_smelting:1},path:["truepath"],cost:{Money(r){return f("hell_smelter",r,25e4,1.24)},Adamantite(r){return f("hell_smelter",r,15e3,1.24)}},effect(){return`${t("interstellar_stellar_forge_effect3",[2])}
`},special:!0,action(){return u($(this)[0])?(ne("hell_smelter"),e.city.smelter.cap+=2,e.city.smelter.Steel+=2,e.city.smelter.Oil+=2,!0):!1}},spc_casino:{id:"space-spc_casino",title:t("city_casino"),desc:t("city_casino"),category:"commercial",reqs:{hell:1,gambling:1},condition(){return!!(e.race.cataclysm||e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=5)},cost:{Money(r){return f("spc_casino",r,4e5,1.35)},Furs(r){return f("spc_casino",r,75e3,1.35)},Cement(r){return f("spc_casino",r,1e5,1.35)},Plywood(r){return f("spc_casino",r,2e4,1.35)}},effect(){let r=ms();return r=r+`${t("minus_power",[$(this)[0].powered()])}
`,r},powered(){return _e(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=2?2:3)},action(){return u($(this)[0])?(e.space.spc_casino.count++,e.race.joyless||(e.civic.entertainer.max+=N(1),e.civic.entertainer.display=!0),re($(this)[0]),!0):!1},flair:t("city_casino_flair")},swarm_plant:{id:"space-swarm_plant",title:t("space_hell_swarm_plant_title"),desc(){return`${t("space_hell_swarm_plant_desc")}
`},reqs:{solar:4,hell:1},cost:{Money(r){return f("swarm_plant",r,$s(75e3),1.28)},Iron(r){return f("swarm_plant",r,$s(65e3),1.28)},Neutronium(r){return f("swarm_plant",r,$s(75),1.28)},Brick(r){return f("swarm_plant",r,$s(2500),1.28)},Mythril(r){return f("swarm_plant",r,$s(100),1.28)}},effect(){let r=e.tech.swarm?.88:.94;return e.tech.swarm>=3&&(r-=xt/100),r<.05&&(r=.05),r=+((1-r)*100).toFixed(2),t("space_hell_swarm_plant_effect1",[r])},action(){return u($(this)[0])?(ne("swarm_plant"),!0):!1}},firework:hr("firework","space")},spc_sun:{info:{name(){return t("space_sun_info_name")},desc(){return t("space_sun_info_desc",[A[e.race.species].home])},support:"swarm_control",zone:"inner",syndicate(){return!1}},sun_mission:{id:"space-sun_mission",title(){return t("space_sun_mission_title")},desc(){return t("space_sun_mission_desc")},reqs:{space_explore:4},grant:["solar",1],queue_complete(){return e.tech.solar>=1?0:1},cost:{Helium_3(r,a){return+Ae(15e3,!1,a).toFixed(0)}},effect(){return t("space_sun_mission_effect1")},action(){return!!u($(this)[0])}},swarm_control:{id:"space-swarm_control",title:t("space_sun_swarm_control_title"),desc(){return`${t("space_sun_swarm_control_desc")}
`},reqs:{solar:3},cost:{Money(r){return f("swarm_control",r,1e5,1.3)},Knowledge(r){return f("swarm_control",r,6e4,1.3)},Alloy(r){return f("swarm_control",r,7500,1.3)},Helium_3(r,a){return f("swarm_control",r,Ae(2e3,!1,a),1.3)},Mythril(r){return f("swarm_control",r,250,1.3)}},effect(){return t("space_sun_swarm_control_effect1",[$(this)[0].support()])},support(){return e.tech.swarm&&e.tech.swarm>=2?e.tech.high_tech>=11?11+Math.round(xt):12:10},action(){return u($(this)[0])?(ne("swarm_control"),e.space.swarm_control.s_max+=$(this)[0].support(),!0):!1}},swarm_satellite:{id:"space-swarm_satellite",title:t("space_sun_swarm_satellite_title"),desc(){return`${t("space_sun_swarm_satellite_desc")}
${t("space_sun_swarm_satellite_desc_req")}
`},reqs:{solar:3},cost:{Money(r){return f("swarm_satellite",r,Zs(5e3),1.1)},Copper(r){return f("swarm_satellite",r,Zs(2500),1.1)},Iridium(r){return f("swarm_satellite",r,Zs(150),1.1)},Helium_3(r,a){return f("swarm_satellite",r,Zs(Ae(50,!1,a)),1.1)}},effect(){let r=.35;return e.tech.swarm>=4&&(r+=.15*(e.tech.swarm-3)),e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=1&&(r+=.15),e.blood.illuminate&&(r+=.01*e.blood.illuminate),r=+r.toFixed(2),`${t("space_dwarf_reactor_effect1",[dt(r)])} , ${t("space_sun_swarm_satellite_effect1",[1])} `},support(){return-1},action(){return u($(this)[0])?(ne("swarm_satellite"),e.space.swarm_control.support++,!0):!1}},jump_gate:{id:"space-jump_gate",title:t("tau_jump_gate"),desc(r){return!e.space.hasOwnProperty("jump_gate")||e.space.jump_gate.count<100||r?`${t("tau_jump_gate")}
${t("requires_segments",[100])}
`:`${t("tau_jump_gate")}
`},reqs:{tauceti:3},path:["truepath"],queue_size:10,queue_complete(){return 100-e.space.jump_gate.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?1e6:0},Alloy(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?5e4:0},Adamantite(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?12500:0},Graphene(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?42e3:0},Orichalcum(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?35e3:0},Quantium(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?25e3:0}},effect(r){let a=(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0);if(a<100){let i=100-a;return`${t("tau_jump_gate_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return t("tau_jump_gate_effect")},action(){return u($(this)[0])&&e.space.jump_gate.count<100?(e.space.jump_gate.count++,!0):!1}}},spc_gas:{info:{name(){return W().gas},desc(){return t("space_gas_info_desc",[W().gas,A[e.race.species].home])},zone:"outer",syndicate(){return!0}},gas_mission:{id:"space-gas_mission",title(){return t("space_mission_title",[W().gas])},desc(){return t("space_mission_desc",[W().gas])},reqs:{space:4,space_explore:4},grant:["space",5],queue_complete(){return e.tech.space>=5?0:1},cost:{Helium_3(r,a){return+Ae(12500,!1,a).toFixed(0)}},effect(){return t("space_gas_mission_effect",[W().gas])},action(){return u($(this)[0])?(I(t("space_gas_mission_action",[W().gas]),"info",!1,["progress"]),e.settings.space.gas_moon=!0,e.settings.space.belt=!0,e.space.space_station={count:0,on:0,support:0,s_max:0},!0):!1}},gas_mining:{id:"space-gas_mining",title:t("space_gas_mining_title"),desc(){return`${t("space_gas_mining_desc")}
${t("requires_power")}
`},reqs:{gas_giant:1},cost:{Money(r){return f("gas_mining",r,25e4,1.32)},Uranium(r){return f("gas_mining",r,500,1.32)},Alloy(r){return f("gas_mining",r,1e4,1.32)},Helium_3(r,a){return f("gas_mining",r,Ae(2500,!1,a),1.32)},Mythril(r){return f("gas_mining",r,25,1.32)}},effect(){let r=+T("gas_mining").toFixed(2);return`${t("space_gas_mining_effect1",[r])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(2)},action(){return u($(this)[0])?(ne("gas_mining"),re($(this)[0]),!0):!1}},gas_storage:{id:"space-gas_storage",title(){return t("space_gas_storage_title",[W().gas])},desc(){return`${t("space_gas_storage_desc")}
`},reqs:{gas_giant:1},cost:{Money(r){return f("gas_storage",r,125e3,1.32)},Iridium(r){return f("gas_storage",r,3e3,1.32)},Sheet_Metal(r){return f("gas_storage",r,2e3,1.32)},Helium_3(r,a){return f("gas_storage",r,Ae(1e3,!1,a),1.32)}},effect(){let r=H(3500)*(e.tech.world_control?1.5:1),a=H(2500)*(e.tech.world_control?1.5:1),i=H(1e3)*(e.tech.world_control?1.5:1);return`${t("plus_max_resource",[r,t("resource_Oil_name")])}
${t("plus_max_resource",[a,t("resource_Helium_3_name")])}
${t("plus_max_resource",[i,t("resource_Uranium_name")])}
`},action(){return u($(this)[0])?(ne("gas_storage"),!0):!1}},star_dock:{id:"space-star_dock",title(){return t("space_gas_star_dock_title")},desc(){return`${t("space_gas_star_dock_title")}
${t("space_gas_star_dock_desc_req")}
`},reqs:{genesis:3},queue_complete(){return 1-e.space.star_dock.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?15e5:0},Steel(r){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?5e5:0},Helium_3(r,a){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?Math.round(Ae(e.race.gravity_well?25e3:1e4,!1,a)):0},Nano_Tube(r){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?25e4:0},Mythril(r){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?1e4:0}},effect(){return`${t("space_gas_star_dock_effect1")}
`},special:!0,action(){return e.space.star_dock.count===0&&u($(this)[0])?(ne("star_dock"),!0):!1}}},spc_gas_moon:{info:{name(){return W().gas_moon},desc(){return t("space_gas_moon_info_desc",[W().gas_moon,W().gas])},zone:"outer",syndicate(){return!0}},gas_moon_mission:{id:"space-gas_moon_mission",title(){return t("space_mission_title",[W().gas_moon])},desc(){return t("space_mission_desc",[W().gas_moon])},reqs:{space:5},grant:["space",6],queue_complete(){return e.tech.space>=6?0:1},cost:{Helium_3(r,a){return+Ae(3e4,!1,a).toFixed(0)}},effect(){return t("space_gas_moon_mission_effect",[W().gas_moon])},action(){return u($(this)[0])?(I(t("space_gas_moon_mission_action",[W().gas_moon]),"info",!1,["progress"]),e.space.outpost={count:0,on:0},e.tech.gas_moon=1,!0):!1}},outpost:{id:"space-outpost",title:t("space_gas_moon_outpost_title"),desc(){return`${t("space_gas_moon_outpost_desc")}
${t("requires_power_combo",[e.resource.Oil.name])}
`},reqs:{gas_moon:1},cost:{Money(r){return f("outpost",r,666e3,1.3)},Titanium(r){return f("outpost",r,18e3,1.3)},Iridium(r){return f("outpost",r,2500,1.3)},Helium_3(r,a){return f("outpost",r,Ae(6e3,!1,a),1.3)},Mythril(r){return f("outpost",r,300,1.3)}},effect(r){let a=+T("outpost").toFixed(3),i=H(500),s=+Ae(2,!0,r).toFixed(2);return`${t("space_gas_moon_outpost_effect1",[a])}
${t("plus_max_resource",[i,t("resource_Neutronium_name")])}
${t("space_gas_moon_outpost_effect3",[s,$(this)[0].powered()])}
`},powered(){return _e(3)},powerBalancer(){return[{r:"Neutronium",k:"lpmod"}]},action(){return u($(this)[0])?(ne("outpost"),e.resource.Neutronium.display=!0,re($(this)[0]),!0):!1}},drone:{id:"space-drone",title:t("space_gas_moon_drone_title"),desc(){return`${t("space_gas_moon_drone_desc")}
`},reqs:{gas_moon:1,drone:1},cost:{Money(r){return f("drone",r,25e4,1.3)},Steel(r){return f("drone",r,2e4,1.3)},Neutronium(r){return f("drone",r,500,1.3)},Elerium(r){return f("drone",r,25,1.3)},Nano_Tube(r){return f("drone",r,45e3,1.3)}},effect(){let r=e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=3?12:6;return`${t("space_gas_moon_drone_effect1",[r])}
`},action(){return u($(this)[0])?(ne("drone"),!0):!1}},oil_extractor:{id:"space-oil_extractor",title:t("space_gas_moon_oil_extractor_title"),desc(){return`${t("space_gas_moon_oil_extractor_title")}
${t("requires_power")}
`},reqs:{gas_moon:2},cost:{Money(r){return f("oil_extractor",r,666e3,1.3)},Polymer(r){return f("oil_extractor",r,7500,1.3)},Helium_3(r,a){return f("oil_extractor",r,Ae(2500,!1,a),1.3)},Wrought_Iron(r){return f("oil_extractor",r,5e3,1.3)}},effect(){let r=+T("oil_extractor").toFixed(2);return`${t("space_gas_moon_oil_extractor_effect1",[r])} , ${t("minus_power",[$(this)[0].powered()])} `},powered(){return _e(1)},powerBalancer(){return[{r:"Oil",k:"lpmod"}]},action(){return u($(this)[0])?(ne("oil_extractor"),re($(this)[0]),!0):!1}}},spc_belt:{info:{name(){return t("space_belt_info_name")},desc(){return e.space.space_station&&e.space.space_station.count>0?`${t("space_belt_info_desc",[W().red,W().gas])}
${t("space_belt_info_desc2")}
`:t("space_belt_info_desc",[W().red,W().gas])},support:"space_station",zone:"inner",syndicate(){return!0}},belt_mission:{id:"space-belt_mission",title(){return t("space_belt_mission_title")},desc(){return t("space_belt_mission_desc")},reqs:{space:5},grant:["asteroid",1],queue_complete(){return e.tech.asteroid>=1?0:1},cost:{Helium_3(r,a){return+Ae(25e3,!1,a).toFixed(0)}},effect(){return t("space_belt_mission_effect1")},action(){return u($(this)[0])?(I(t("space_belt_mission_action"),"info",!1,["progress"]),e.settings.space.dwarf=!0,!0):!1}},space_station:{id:"space-space_station",title:t("space_belt_station_title"),desc(){return`${t("space_belt_station_desc")}
${t("requires_power_space",[e.resource.Food.name])}
`},reqs:{asteroid:2},cost:{Money(r){return f("space_station",r,25e4,1.3)},Iron(r){return f("space_station",r,85e3,1.3)},Polymer(r){return f("space_station",r,18e3,1.3)},Iridium(r){return f("space_station",r,2800,1.28)},Helium_3(r,a){return f("space_station",r,Ae(2e3,!1,a),1.3)},Mythril(r){return f("space_station",r,75,1.25)}},effect(r){let a=+Ae(2.5,!0,r).toFixed(2),i=e.race.cataclysm?1:10,s=H(5),n=e.tech.asteroid>=5?`${t("plus_max_resource",[s,t("resource_Elerium_name")])}
`:"";return e.race.fasting?`${t("plus_max_space_miners",[N(3)])}
${n}${t("space_belt_station_effect5",[a,$(this)[0].powered()])}
`:`${t("plus_max_space_miners",[N(3)])}
${n}${t("space_belt_station_effect3",[a])}
${t("space_belt_station_effect4",[i,$(this)[0].powered(),e.resource.Food.name])}
`},support(){return N(3)},powered(){return _e(3)},refresh:!0,action(){if(u($(this)[0])){if(ne("space_station"),e.civic.space_miner.display=!0,e.tech.asteroid<3&&(e.tech.asteroid=3),re($(this)[0])){let r=N(3);e.civic.space_miner.max+=r;let a=Math.min(r,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=a,e.civic.space_miner.workers+=a}return e.race.orbit_decay&&e.race.orbit_decay>e.stats.days+1e3&&(e.race.orbit_decay=e.stats.days+1e3,I(t("evo_challenge_orbit_decayed_accelerated",[e.race.orbit_decay-e.stats.days]),"info",!1,["progress"])),!0}return!1}},elerium_ship:{id:"space-elerium_ship",title:t("space_belt_elerium_ship_title"),desc(){return t("space_belt_elerium_ship_title")},reqs:{asteroid:5},cost:{Money(r){return f("elerium_ship",r,5e5,1.3)},Uranium(r){return f("elerium_ship",r,2500,1.3)},Titanium(r){return f("elerium_ship",r,1e4,1.3)},Mythril(r){return f("elerium_ship",r,500,1.3)},Helium_3(r,a){return f("elerium_ship",r,Ae(5e3,!1,a),1.3)}},effect(){let r=+T("elerium_ship").toFixed(4);return`${t("space_belt_elerium_ship_effect1",[N(2)])}
${t("space_belt_elerium_ship_effect2",[r])}
`},s_type:"belt",support(){return N(-2)},powered(){return 0},action(){return u($(this)[0])?(ne("elerium_ship"),re($(this)[0]),!0):!1}},iridium_ship:{id:"space-iridium_ship",title:t("space_belt_iridium_ship_title"),desc(){return t("space_belt_iridium_ship_title")},reqs:{asteroid:3},cost:{Money(r){return f("iridium_ship",r,12e4,1.3)},Uranium(r){return f("iridium_ship",r,1e3,1.3)},Alloy(r){return f("iridium_ship",r,48e3,1.3)},Iridium(r){return f("iridium_ship",r,2800,1.3)},Helium_3(r,a){return f("iridium_ship",r,Ae(1800,!1,a),1.3)}},effect(){let r=+T("iridium_ship").toFixed(3);return`${t("space_belt_iridium_ship_effect1",[N(1)])}
${t("space_belt_iridium_ship_effect2",[r])}
`},s_type:"belt",support(){return N(-1)},powered(){return 0},action(){return u($(this)[0])?(ne("iridium_ship"),re($(this)[0]),!0):!1}},iron_ship:{id:"space-iron_ship",title:t("space_belt_iron_ship_title"),desc(){return t("space_belt_iron_ship_title")},reqs:{asteroid:3},cost:{Money(r){return f("iron_ship",r,8e4,1.3)},Steel(r){return f("iron_ship",r,42e3,1.3)},Aluminium(r){return f("iron_ship",r,38e3,1.3)},Polymer(r){return f("iron_ship",r,16e3,1.3)},Helium_3(r,a){return f("iron_ship",r,Ae(1200,!1,a),1.3)}},effect(){let r=+T("iron_ship").toFixed(2);return e.tech.solar&&e.tech.solar>=5?`${t("space_belt_iron_ship_effect1",[N(1)])}
${t("space_belt_iron_ship_effect2",[r])}
${t("space_belt_iron_ship_effect3")}
`:`${t("space_belt_iron_ship_effect1",[N(1)])}
${t("space_belt_iron_ship_effect2",[r])}
`},s_type:"belt",support(){return N(-1)},powered(){return 0},action(){return u($(this)[0])?(ne("iron_ship"),re($(this)[0]),!0):!1}}},spc_dwarf:{info:{name(){return W().dwarf},desc(){return t("space_dwarf_info_desc",[W().dwarf])},zone:"inner",syndicate(){return!1}},dwarf_mission:{id:"space-dwarf_mission",title(){return t("space_mission_title",[W().dwarf])},desc(){return t("space_mission_desc",[W().dwarf])},reqs:{asteroid:1,elerium:1},grant:["dwarf",1],queue_complete(){return e.tech.dwarf>=1?0:1},cost:{Helium_3(r,a){return+Ae(45e3,!1,a).toFixed(0)}},effect(){return t("space_dwarf_mission_effect1",[W().dwarf])},action(){return u($(this)[0])?(I(t("space_dwarf_mission_action",[W().dwarf]),"info",!1,["progress"]),e.space.elerium_contain={count:0,on:0},!0):!1}},elerium_contain:{id:"space-elerium_contain",title:t("space_dwarf_elerium_contain_title"),desc(){return`${t("space_dwarf_elerium_contain_title")}
${t("requires_power")}
`},reqs:{dwarf:1},cost:{Money(r){return f("elerium_contain",r,8e5,1.28)},Cement(r){return f("elerium_contain",r,12e4,1.28)},Iridium(r){return f("elerium_contain",r,5e4,1.28)},Neutronium(r){return f("elerium_contain",r,250,1.28)}},effect(){let r=H(100);return`${t("plus_max_resource",[r,t("resource_Elerium_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(6)},action(){return u($(this)[0])?(ne("elerium_contain"),re($(this)[0]),!0):!1}},e_reactor:{id:"space-e_reactor",title:t("space_dwarf_reactor_title"),desc(){return`${t("space_dwarf_reactor_title")}
${t("space_dwarf_reactor_desc_req")}
`},reqs:{elerium:2},cost:{Money(r){return f("e_reactor",r,125e4,1.28)},Steel(r){return f("e_reactor",r,35e4,1.28)},Neutronium(r){return f("e_reactor",r,1250,1.28)},Mythril(r){return f("e_reactor",r,2500,1.28)}},effect(){let r=$(this)[0].p_fuel().a,a=$(this)[0].powered()*-1;return`${t("space_dwarf_reactor_effect1",[a])}
${t("space_dwarf_reactor_effect2",[r])}
`},powered(){return dt(-25)},p_fuel(){return{r:"Elerium",a:.05}},action(){return u($(this)[0])?(ne("e_reactor"),e.space.e_reactor.on++,!0):!1}},world_collider:{id:"space-world_collider",title:t("space_dwarf_collider_title"),desc(r){if(!e.space.hasOwnProperty("world_collider")||e.space.world_collider.count<1859||r)return`${t("space_dwarf_collider_desc")}
${t("space_dwarf_collider_desc_req")}
`+(e.space.hasOwnProperty("world_collider")&&e.space.world_collider.count>=1859?`${t("requires_power")}
`:"")},reqs:{science:10},path:["standard"],condition(){return e.space.world_collider.count<1859},queue_size:100,queue_complete(){return 1859-e.space.world_collider.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?25e3:0},Copper(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?750:0},Alloy(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?125:0},Neutronium(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?12:0},Elerium(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?1:0},Mythril(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?10:0}},effect(r){let a=(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0);if(a<1859){let i=1859-a;return`${t("space_dwarf_collider_effect1")}
${t("space_dwarf_collider_effect2",[i])}
`}else return Yt.spc_dwarf.world_controller.effect()},action(){if(e.space.world_collider.count<1859&&u($(this)[0])){if(ne("world_collider"),e.space.world_collider.count>=1859){if(e.tech.science=11,e.space.world_controller={count:1,on:0},ue(),Pt(),e.race.banana){let r=ot();e.stats.banana.b2[r]=!0,r!=="m"&&r!=="l"&&(e.stats.banana.b2.l=!0)}Ie()}return!0}return!1},flair:t("space_dwarf_collider_flair")},world_controller:{id:"space-world_controller",title:t("space_dwarf_collider_title"),desc(){return`${t("space_dwarf_collider_title")}
${t("requires_power")}
`},wiki:!1,reqs:{science:11},path:["standard"],condition(){return!(e.space.world_collider.count<1859)},queue_complete(){return 0},cost:{},effect(){let r=25;return e.interstellar.far_reach&&k.far_reach>0&&(r+=k.far_reach*1),e.tech.science>=19&&(r+=15),`${t("plus_max_resource",[r+"%",t("resource_Knowledge_name")])}
${t("space_dwarf_controller_effect3")}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(20)},action(){return!1},flair:t("space_dwarf_controller_flair")},shipyard:{id:"space-shipyard",title:t("outer_shipyard_title"),desc(){return`${t("outer_shipyard_title")}
${t("requires_power")}
`},reqs:{shipyard:1},path:["truepath"],cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?1e7:0},Aluminium(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?1e6:0},Titanium(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?65e4:0},Iridium(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?25e4:0},Neutronium(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?1e4:0},Mythril(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?5e5:0}},queue_complete(){return 1-e.space.shipyard.count},effect(){return`${t("outer_shipyard_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(50)},special:!0,sAction(){k.shipyard&&(e.settings.civTabs=2,e.settings.govTabs=5,e.settings.tabLoad||(gr("mTabCivic"),Ie("space-shipyard")))},action(){return e.space.shipyard.count<1&&u($(this)[0])?(ne("shipyard"),re($(this)[0])&&(e.settings.showShipYard=!0),e.tech.syard_class=2,e.tech.syard_armor=3,e.tech.syard_weapon=1,e.tech.syard_engine=2,e.tech.syard_power=3,e.tech.syard_sensor=3,!0):!1}},mass_relay:{id:"space-mass_relay",title:t("space_dwarf_mass_relay_title"),desc(r){if(!e.space.hasOwnProperty("mass_relay")||e.space.mass_relay.count<100||r)return`${t("space_dwarf_mass_relay_title")}
${t("requires_segments",[100])}
`},reqs:{outer:5},path:["truepath"],condition(){return e.space.mass_relay.count<100},queue_size:5,queue_complete(){return 100-e.space.mass_relay.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?1e7:0},Neutronium(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?7500:0},Adamantite(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?18e3:0},Elerium(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?125:0},Stanene(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?1e5:0},Quantium(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?25e3:0}},effect(r){let a=(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0);if(a<100){let i=100-a;return`${t("space_dwarf_mass_relay_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return Yt.spc_dwarf.m_relay.effect()},action(){return e.space.mass_relay.count<100&&u($(this)[0])?(e.space.mass_relay.count++,e.space.mass_relay.count>=100&&(e.tech.outer=6,e.space.m_relay={count:1,on:1,charged:0},ue(),Pt(),Ie()),!0):!1}},m_relay:{id:"space-m_relay",title:t("space_dwarf_mass_relay_title"),desc(){return`${t("space_dwarf_mass_relay_title")}
${t("requires_power")}
`},reqs:{outer:6},path:["truepath"],condition(){return e.space.mass_relay.count>=100},wiki:!1,queue_complete(){return 0},cost:{},powered(){return _e(100)},effect(){let r=Math.floor(e.space.m_relay.charged/10)/10;return`${t("space_dwarf_mass_relay_effect2",[W().dwarf])}
${t("minus_power",[$(this)[0].powered()])}
${t("space_dwarf_mass_relay_charged",[r])}
`},action(){return!1}}},spc_titan:Bi().spc_titan,spc_enceladus:Bi().spc_enceladus,spc_triton:Bi().spc_triton,spc_kuiper:Bi().spc_kuiper,spc_eris:Bi().spc_eris},Cr={int_alpha:{info:{name:t("interstellar_alpha_name"),desc(){return e.tech.alpha?t("interstellar_alpha_desc2",[A[e.race.species].home]):t("interstellar_alpha_desc1",[A[e.race.species].home])},support:"starport"},alpha_mission:{id:"interstellar-alpha_mission",title:t("space_mission_title",[t("interstellar_alpha_name")]),desc:t("space_mission_desc",[t("interstellar_alpha_name")]),reqs:{ftl:2},grant:["alpha",1],queue_complete(){return e.tech.alpha>=1?0:1},cost:{Helium_3(){return+ze(4e4).toFixed(0)}},effect:t("interstellar_alpha_mission_effect"),action(){return u($(this)[0])?(I(t("interstellar_alpha_mission_result"),"info",!1,["progress"]),e.interstellar.nexus={count:0,on:0,support:0,s_max:0},e.interstellar.warehouse={count:0},!0):!1}},starport:{id:"interstellar-starport",title:t("interstellar_alpha_starport_title"),desc(){return`${t("interstellar_alpha_starport_desc")}
${t("requires_power_space",[e.resource.Food.name])}
`},reqs:{alpha:1},cost:{Money(r){return f("starport",r,1e6,1.3,"interstellar")},Aluminium(r){return f("starport",r,4e5,1.3,"interstellar")},Neutronium(r){return f("starport",r,1e3,1.3,"interstellar")},Elerium(r){return f("starport",r,100,1.3,"interstellar")}},effect(){let r=+ze(5).toFixed(2),a=100;return`${t("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
${t("interstellar_alpha_starport_effect2",[r,$(this)[0].powered()])}
${t("interstellar_alpha_starport_effect3",[a,e.resource.Food.name])}
`},support(){return 5},powered(){return _e(10)},powerBalancer(){return[{s:e.interstellar.starport.s_max-e.interstellar.starport.support}]},refresh:!0,action(){return u($(this)[0])?(ne("starport","interstellar"),e.settings.space.proxima=!0,e.settings.space.nebula=!0,re($(this)[0]),e.tech.alpha===1&&(e.tech.alpha=2,e.interstellar.mining_droid={count:0,on:0,adam:0,uran:0,coal:0,alum:0}),e.race.orbit_decay&&e.race.orbit_decay>e.stats.days+100&&(e.race.orbit_decay=e.stats.days+100,I(t("evo_challenge_orbit_decayed_accelerated",[e.race.orbit_decay-e.stats.days]),"info",!1,["progress"])),!0):!1}},habitat:{id:"interstellar-habitat",title:t("interstellar_habitat_title"),desc:`${t("interstellar_habitat_desc")}
${t("requires_power")}
`,reqs:{alpha:3},cost:{Money(r){return f("habitat",r,8e5,1.25,"interstellar")},Furs(r){return f("habitat",r,38e3,1.25,"interstellar")},Adamantite(r){return e.race.fasting&&e.interstellar.habitat&&e.interstellar.habitat.count<5?0:f("habitat",r,3200,1.25,"interstellar")},Plywood(r){return f("habitat",r,1e4,1.25,"interstellar")},Horseshoe(){return e.race.hooved?1:0}},effect(){let r=$(this)[0].citizens();return`${t("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
${t("plus_max_citizens",[r])} , ${t("minus_power",[$(this)[0].powered()])}
`},support(){return 1},powered(){return _e(2)},powerBalancer(){return[{s:e.interstellar.starport.s_max-e.interstellar.starport.support}]},action(){return u($(this)[0])?(ne("habitat","interstellar"),re($(this)[0])&&(e.resource[e.race.species].max+=$(this)[0].citizens()),!0):!1},citizens(){let r=1;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},mining_droid:{id:"interstellar-mining_droid",title:t("interstellar_mining_droid_title"),desc:`${t("interstellar_mining_droid_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{alpha:2},cost:{Money(r){return f("mining_droid",r,65e4,1.28,"interstellar")},Steel(r){return f("mining_droid",r,12e4,1.28,"interstellar")},Nano_Tube(r){return f("mining_droid",r,75e3,1.28,"interstellar")},Elerium(r){return f("mining_droid",r,50,1.28,"interstellar")}},effect(){return`${t("space_used_support",[t("interstellar_alpha_name")])}
${t("interstellar_mining_droid_effect")}
`},s_type:"alpha",support(){return-1},powered(){return 0},special:!0,refresh:!0,action(){return u($(this)[0])?(ne("mining_droid","interstellar"),e.resource.Adamantite.display=!0,re($(this)[0])&&e.interstellar.mining_droid.adam++,e.tech.droids||(e.tech.droids=1,e.interstellar.processing={count:0,on:0}),e.settings.showIndustry=!0,rt(),!0):!1}},processing:{id:"interstellar-processing",title:t("interstellar_processing_title"),desc:`${t("interstellar_processing_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{droids:1},cost:{Money(r){return f("processing",r,35e4,1.28,"interstellar")},Iron(r){return f("processing",r,18e4,1.28,"interstellar")},Aluminium(r){return f("processing",r,6e4,1.28,"interstellar")},Iridium(r){return f("processing",r,5e3,1.28,"interstellar")}},effect(){let r=12;return e.tech.ai_core&&e.tech.ai_core>=2&&k.citadel>0&&(r+=k.citadel*2),`${t("space_used_support",[t("interstellar_alpha_name")])}
${t("interstellar_processing_effect",[r])}
`},s_type:"alpha",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("processing","interstellar"),re($(this)[0]),!0):!1}},fusion:{id:"interstellar-fusion",title:t("interstellar_fusion_title"),desc(){return`${t("interstellar_fusion_title")}
${t("requires_power_support_combo",[t("interstellar_alpha_name"),e.resource.Deuterium.name])}
`},reqs:{fusion:1},cost:{Money(r){return f("fusion",r,99e4,1.28,"interstellar")},Iridium(r){return f("fusion",r,44e3,1.28,"interstellar")},Infernite(r){return f("fusion",r,350,1.28,"interstellar")},Brick(r){return f("fusion",r,18e3,1.28,"interstellar")}},effect(){let r=1.25;return`${t("space_used_support",[t("interstellar_alpha_name")])}
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])} , ${t("interstellar_fusion_effect",[r])}
`},s_type:"alpha",support(){return-1},powered(){return dt(-22)},p_fuel(){return{r:"Deuterium",a:1.25}},action(){return u($(this)[0])?(ne("fusion","interstellar"),re($(this)[0]),!0):!1}},laboratory:{id:"interstellar-laboratory",title(){return e.race.universe==="magic"?t("tech_sanctum"):t("interstellar_laboratory_title")},desc:`${t(e.race.universe==="magic"?"tech_sanctum":"interstellar_laboratory_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{science:12},cost:{Money(r){return f("laboratory",r,75e4,1.28,"interstellar")},Crystal(r){return e.race.universe==="magic"?f("laboratory",r,1200,1.28,"interstellar"):0},Titanium(r){return f("laboratory",r,12e4,1.28,"interstellar")},Alloy(r){return f("laboratory",r,95e3,1.28,"interstellar")},Mythril(r){return f("laboratory",r,8500,1.28,"interstellar")}},effect(){let r=1e4;e.tech.science>=15&&(r*=1+(e.race.cataclysm||e.race.orbit_decayed?U.exotic_lab:e.city.wardenclyffe.count)*.02),(e.race.cataclysm||e.race.orbit_decayed)&&k.s_gate&&we.scavenger&&(r*=1+we.scavenger*+(kt("gxy_alien2")*.75).toFixed(1)),e.tech.science>=21&&(r*=1.45),r=Math.round(r);let a="";e.tech.science>=16&&(a=`${t("city_wardenclyffe_effect1",[N(1),e.civic.scientist.name])}
`);let i=`${t("space_used_support",[t("interstellar_alpha_name")])}
${a}${t("city_max_knowledge",[r])}
`;if(e.tech.science>=13&&(i=i+`${t("interstellar_laboratory_effect",[5])}
`),e.race.universe==="magic"){let s=H(12);i=i+`${t("plus_max_resource",[s,e.resource.Mana.name])}
`}return i},s_type:"alpha",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("laboratory","interstellar"),re($(this)[0])&&(e.resource.Knowledge.max+=1e4,e.tech.science>=16&&(e.civic.scientist.display=!0,e.civic.scientist.max+=N(1))),!0):!1}},exchange:{id:"interstellar-exchange",title:t("interstellar_exchange_title"),desc:`${t("interstellar_exchange_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{banking:12},cost:{Money(r){return f("exchange",r,68e4,1.28,"interstellar")},Stone(r){return f("exchange",r,115e3,1.28,"interstellar")},Adamantite(r){return f("exchange",r,55e3,1.28,"interstellar")},Graphene(r){return f("exchange",r,78e3,1.28,"interstellar")}},effect(){let r=e.race.cataclysm||e.race.orbit_decayed?k.spaceport:e.city.bank?e.city.bank.count:0,a=e.race.cataclysm||e.race.orbit_decayed?Ar()*4:Ar(),i=H(e.city.bank?a*r/18:0);return e.race.inflation&&(i*=2),e.tech.banking>=13&&(e.galaxy.freighter&&(i*=1+we.freighter*.03),e.galaxy.super_freighter&&(i*=1+we.super_freighter*.08)),i=+i.toFixed(0),`${t("space_used_support",[t("interstellar_alpha_name")])}
${t("plus_max_resource",[`$${i.toLocaleString()}`,t("resource_Money_name")])}
`},s_type:"alpha",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("exchange","interstellar"),re($(this)[0])&&(e.resource.Money.max+=+H(45e4).toFixed(0)),!0):!1}},g_factory:{id:"interstellar-g_factory",title:t("interstellar_g_factory_title"),desc:`${t("interstellar_g_factory_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{graphene:1},cost:{Money(r){return f("g_factory",r,95e4,1.28,"interstellar")},Copper(r){return f("g_factory",r,165e3,1.28,"interstellar")},Cement(r){return f("g_factory",r,22e4,1.28,"interstellar")},Infernite(r){return f("g_factory",r,750,1.28,"interstellar")}},effect(){return`${t("space_used_support",[t("interstellar_alpha_name")])}
${t("interstellar_g_factory_effect")}
`},s_type:"alpha",support(){return-1},powered(){return 0},special:!0,action(){return u($(this)[0])?(ne("g_factory","interstellar"),e.resource.Graphene.display=!0,re($(this)[0])&&(e.race.kindling_kindred||e.race.smoldering?e.interstellar.g_factory.Oil++:e.interstellar.g_factory.Lumber++),e.settings.showIndustry=!0,rt(),!0):!1}},int_factory:{id:"interstellar-int_factory",title:t("interstellar_int_factory_title"),desc(){return`${t("interstellar_int_factory_title")}
${t("requires_power_combo",[e.resource.Deuterium.name])}
`},reqs:{alpha:4},cost:{Money(r){return f("int_factory",r,25e6,1.26,"interstellar")},Coal(r){return f("int_factory",r,1e7,1.26,"interstellar")},Brick(r){return f("int_factory",r,75e4,1.26,"interstellar")},Bolognium(r){return f("int_factory",r,5e4,1.26,"interstellar")}},effect(){let r=+ze(5).toFixed(2);return`${t("interstellar_int_factory_effect")}
${t("city_crafted_mats",[10])}
${t("interstellar_fusion_effect",[r])} ${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(5)},special:!0,action(){return u($(this)[0])?(ne("int_factory","interstellar"),re($(this)[0])&&(e.city.factory.Alloy+=2,rt()),!0):!1}},luxury_condo:{id:"interstellar-luxury_condo",title:t("tech_luxury_condo"),desc:`${t("tech_luxury_condo")}
${t("requires_power")}
`,reqs:{alpha:5},cost:{Money(r){return f("luxury_condo",r,25e6,1.25,"interstellar")},Neutronium(r){return f("luxury_condo",r,75e3,1.25,"interstellar")},Stanene(r){return f("luxury_condo",r,23e4,1.25,"interstellar")},Orichalcum(r){return f("luxury_condo",r,65e3,1.25,"interstellar")},Nanoweave(r){return f("luxury_condo",r,12500,1.25,"interstellar")},Horseshoe(){return e.race.hooved?2:0}},effect(){let r=$(this)[0].citizens(),a=H(75e4);return`${t("plus_max_citizens",[r])} , ${t("minus_power",[$(this)[0].powered()])}
${t("plus_max_resource",[`$${a.toLocaleString()}`,t("resource_Money_name")])}
`},powered(){return _e(3)},action(){return u($(this)[0])?(ne("luxury_condo","interstellar"),re($(this)[0])&&(e.resource[e.race.species].max+=2),!0):!1},citizens(){let r=2;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},zoo:{id:"interstellar-zoo",title:t("tech_zoo"),desc(){return`${t("tech_zoo")}
${t("requires_power_support_combo",[t("interstellar_alpha_name"),e.resource.Food.name])}
`},reqs:{zoo:1},cost:{Money(r){return f("zoo",r,5e7,1.24,"interstellar")},Polymer(r){return f("zoo",r,6e6,1.24,"interstellar")},Infernite(r){return f("zoo",r,75e3,1.24,"interstellar")},Brick(r){return f("zoo",r,2e6,1.24,"interstellar")}},effect(){let r=5,a=2,i=12e3;return`${t("space_used_support",[t("interstellar_alpha_name")])}
${t("space_red_vr_center_effect1",[r])}
${t("space_red_vr_center_effect2",[a])}
${t("interstellar_alpha_starport_effect3",[i,e.resource.Food.name])}
`},powered(){return 0},s_type:"alpha",support(){return-1},action(){return u($(this)[0])?(ne("zoo","interstellar"),re($(this)[0]),!0):!1}},warehouse:{id:"interstellar-warehouse",title(){return e.tech.storage<=2?t("city_shed_title1"):e.tech.storage>=4?t("city_shed_title3"):t("city_shed_title2")},desc(){let r=e.tech.storage>=3?e.tech.storage>=4?t("city_shed_desc_size3"):t("city_shed_desc_size2"):t("city_shed_desc_size1");return t("city_shed_desc",[r])},reqs:{alpha:2},cost:{Money(r){return f("warehouse",r,175e3,1.28,"interstellar")},Lumber(r){return f("warehouse",r,1e5,1.28,"interstellar")},Aluminium(r){return f("warehouse",r,12e4,1.28,"interstellar")},Cement(r){return f("warehouse",r,45e3,1.28,"interstellar")}},res(){let r=["Lumber","Stone","Chrysotile","Furs","Copper","Iron","Aluminium","Cement","Coal","Nano_Tube","Neutronium","Adamantite","Infernite"];return e.tech.storage>=3&&e.resource.Steel.display&&r.push("Steel"),e.tech.storage>=4&&e.resource.Titanium.display&&r.push("Titanium"),r},val(r){switch(r){case"Lumber":return 750;case"Stone":return 750;case"Chrysotile":return 750;case"Furs":return 425;case"Copper":return 380;case"Iron":return 350;case"Aluminium":return 320;case"Cement":return 280;case"Coal":return 120;case"Steel":return 60;case"Titanium":return 40;case"Nano_Tube":return 30;case"Neutronium":return 8;case"Adamantite":return 18;case"Infernite":return 5;default:return 0}},wide:!0,effect(){let r='',a=ci();for(let i of $(this)[0].res())if(e.resource[i].display){let s=Ee(+(H($(this)[0].val(i))*a).toFixed(0),1);r=r+`${t("plus_max_resource",[s,e.resource[i].name])} `}return r=r+"
",r},action(){if(u($(this)[0])){ne("warehouse","interstellar");let r=ci();for(let a of $(this)[0].res())e.resource[a].display&&(e.resource[a].max+=H($(this)[0].val(a)*r));return!0}return!1}}},int_proxima:{info:{name:t("interstellar_proxima_name"),desc(){return e.tech.proxima?t("interstellar_proxima_desc2"):t("interstellar_proxima_desc1")}},proxima_mission:{id:"interstellar-proxima_mission",title:t("space_mission_title",[t("interstellar_proxima_name")]),desc:t("space_mission_desc",[t("interstellar_proxima_name")]),reqs:{alpha:1},grant:["proxima",1],queue_complete(){return e.tech.proxima>=1?0:1},cost:{Helium_3(){return+ze(42e3).toFixed(0)}},effect:t("interstellar_proxima_mission_effect"),action(){return u($(this)[0])?(e.interstellar.xfer_station={count:0,on:0},I(t("interstellar_proxima_mission_result"),"info",!1,["progress"]),!0):!1}},xfer_station:{id:"interstellar-xfer_station",title:t("interstellar_xfer_station_title"),desc(){return`${t("interstellar_xfer_station_desc")}
${t("requires_power_combo",[e.resource.Uranium.name])}
`},reqs:{proxima:1},cost:{Money(r){return f("xfer_station",r,12e5,1.28,"interstellar")},Neutronium(r){return f("xfer_station",r,1500,1.28,"interstellar")},Adamantite(r){return f("xfer_station",r,6e3,1.28,"interstellar")},Polymer(r){return f("xfer_station",r,12e3,1.28,"interstellar")},Wrought_Iron(r){return f("xfer_station",r,3500,1.28,"interstellar")}},effect(){let r=.28,a=H(5e3),i=H(4e3),s=H(2500),n="";return e.resource.Deuterium.display&&(n=`${t("plus_max_resource",[H(2e3),t("resource_Deuterium_name")])}
`),`${t("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
${t("plus_max_resource",[i,t("resource_Oil_name")])}
${t("plus_max_resource",[a,t("resource_Helium_3_name")])}
${t("plus_max_resource",[s,t("resource_Uranium_name")])}
${n}${t("city_fission_power_effect",[r])}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return 1},powered(){return _e(1)},powerBalancer(){return[{s:e.interstellar.starport.s_max-e.interstellar.starport.support}]},refresh:!0,action(){return u($(this)[0])?(ne("xfer_station","interstellar"),re($(this)[0])&&(e.resource.Uranium.max+=H(2500),e.resource.Helium_3.max+=H(5e3),e.resource.Oil.max+=H(4e3),e.resource.Deuterium.max+=H(2e3)),e.tech.proxima===1&&(e.tech.proxima=2,e.interstellar.cargo_yard={count:0}),!0):!1}},cargo_yard:{id:"interstellar-cargo_yard",title:t("interstellar_cargo_yard_title"),desc:t("interstellar_cargo_yard_title"),reqs:{proxima:2},cost:{Money(r){return f("cargo_yard",r,275e3,1.28,"interstellar")},Graphene(r){return f("cargo_yard",r,7500,1.28,"interstellar")},Mythril(r){return f("cargo_yard",r,6e3,1.28,"interstellar")}},effect(){let r=50,a=H(200),i=H(150),s=`${t("plus_max_resource",[r,t("resource_Crates_name")])}
${t("plus_max_resource",[r,t("resource_Containers_name")])}
`;if(s=s+`${t("plus_max_resource",[a,t("resource_Neutronium_name")])}
${t("plus_max_resource",[i,t("resource_Infernite_name")])}
`,e.tech.storage>=7){let n=+xt.toFixed(3);s=s+`${t("interstellar_cargo_yard_effect",[n])}
`}return s},action(){if(u($(this)[0])){ne("cargo_yard","interstellar");let r=50;return e.resource.Crates.max+=r,e.resource.Containers.max+=r,e.resource.Containers.display||Yr(),!0}return!1}},cruiser:{id:"interstellar-cruiser",title:t("interstellar_cruiser_title"),desc:t("interstellar_cruiser_title"),reqs:{cruiser:1},cost:{Money(r){return f("cruiser",r,875e3,1.28,"interstellar")},Aluminium(r){return f("cruiser",r,195e3,1.28,"interstellar")},Deuterium(r){return f("cruiser",r,+ze(1500).toFixed(0),1.28,"interstellar")},Neutronium(r){return f("cruiser",r,2e3,1.28,"interstellar")},Aerogel(r){return f("cruiser",r,250,1.28,"interstellar")},Horseshoe(){return e.race.hooved?3:0}},powered(){return 0},effect(){let r=+ze(6).toFixed(2),a=N(3);return`${t("plus_max_soldiers",[a])}
${t("space_belt_station_effect3",[r])}
`},action(){return u($(this)[0])?(ne("cruiser","interstellar"),e.interstellar.cruiser.on++,!0):!1}},dyson:{id:"interstellar-dyson",title:t("interstellar_dyson_title"),desc(r){return!e.interstellar.hasOwnProperty("dyson")||e.interstellar.dyson.count<100||r?`${t("interstellar_dyson_title")}
${t("requires_segments",[100])}
`:`${t("interstellar_dyson_title")}
`},reqs:{proxima:3},queue_size:10,queue_complete(){return 100-e.interstellar.dyson.count},condition(){return!(e.interstellar.dyson.count>=100&&e.tech.dyson)},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?25e4:0},Adamantite(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?1e4:0},Infernite(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?25:0},Stanene(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?1e5:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0);if(a<100){let i=a>0?`${t("space_dwarf_reactor_effect1",[dt(a*1.25)])}
`:"",s=100-a;return`${t("interstellar_dyson_effect")}
${i}${t("space_dwarf_collider_effect2",[s])}
`}else return t("interstellar_dyson_complete",[dt(175)])},action(){return u($(this)[0])&&e.interstellar.dyson.count<100?(ne("dyson","interstellar"),e.interstellar.dyson.count>=100&&ue(),!0):!1}},dyson_sphere:{id:"interstellar-dyson_sphere",title:t("interstellar_dyson_sphere_title"),desc(r){return!e.interstellar.hasOwnProperty("dyson_sphere")||e.interstellar.dyson_sphere.count<100||r?`${t("interstellar_dyson_sphere_title")}
${t("requires_segments",[100])}
`:`${t("interstellar_dyson_sphere_title")}
`},reqs:{proxima:3,dyson:1},queue_size:10,queue_complete(){return 100-e.interstellar.dyson_sphere.count},condition(){return!!(e.interstellar.dyson.count>=100&&e.tech.dyson&&e.tech.dyson===1)},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?5e6:0},Bolognium(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?25e3:0},Vitreloy(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?1250:0},Aerogel(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?75e3:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0);if(a<100){let i=175+a*5,s=100-a;return`${t("interstellar_dyson_sphere_effect")}
${t("space_dwarf_reactor_effect1",[dt(i)])}
${t("space_dwarf_collider_effect2",[s])}
`}else return t("interstellar_dyson_sphere_complete",[dt(750)])},action(){return u($(this)[0])&&e.interstellar.dyson_sphere.count<100?(ne("dyson_sphere","interstellar"),e.interstellar.dyson_sphere.count>=100&&ue(),!0):!1}},orichalcum_sphere:{id:"interstellar-orichalcum_sphere",title:t("interstellar_dyson_sphere_title"),desc(r){return!e.interstellar.hasOwnProperty("orichalcum_sphere")||e.interstellar.orichalcum_sphere.count<100||r?`${t("interstellar_orichalcum_sphere_desc")}
${t("requires_segments",[100])}
`:`${t("interstellar_orichalcum_sphere_desc")}
`},reqs:{proxima:3,dyson:2},queue_size:10,queue_complete(){return 100-e.interstellar.orichalcum_sphere.count},condition(){return!!(e.interstellar.dyson_sphere.count>=100&&e.tech.dyson&&e.tech.dyson===2)},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("orichalcum_sphere")?e.interstellar.orichalcum_sphere.count:0)<100?25e6:0},Orichalcum(r){return(r||0)+(e.interstellar.hasOwnProperty("orichalcum_sphere")?e.interstellar.orichalcum_sphere.count:0)<100?75e3:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("orichalcum_sphere")?e.interstellar.orichalcum_sphere.count:0);if(a<100){let i=750+a*8,s=100-a;return`${t("interstellar_orichalcum_sphere_effect")}
${t("space_dwarf_reactor_effect1",[dt(i)])}
${t("space_dwarf_collider_effect2",[s])}
`}else return t("interstellar_dyson_sphere_complete",[dt(1750)])},action(){return u($(this)[0])&&e.interstellar.orichalcum_sphere.count<100?(ne("orichalcum_sphere","interstellar"),e.interstellar.orichalcum_sphere.count>=100&&ie("blacken_the_sun"),!0):!1}}},int_nebula:{info:{name:t("interstellar_nebula_name"),desc(){return e.tech.nebula?t("interstellar_nebula_desc2"):t("interstellar_nebula_desc1")},support:"nexus"},nebula_mission:{id:"interstellar-nebula_mission",title:t("space_mission_title",[t("interstellar_nebula_name")]),desc:t("space_mission_desc",[t("interstellar_nebula_name")]),reqs:{alpha:1},grant:["nebula",1],queue_complete(){return e.tech.nebula>=1?0:1},cost:{Helium_3(){return+ze(55e3).toFixed(0)}},effect:t("interstellar_nebula_mission_effect"),action(){return u($(this)[0])?(I(t("interstellar_nebula_mission_result"),"info",!1,["progress"]),!0):!1}},nexus:{id:"interstellar-nexus",title:t("interstellar_nexus_title"),desc(){return`${t("interstellar_nexus_title")}
${t("requires_power_combo",[e.resource.Money.name])}
`},reqs:{nebula:1},cost:{Money(r){return f("nexus",r,9e5,1.24,"interstellar")},Adamantite(r){return f("nexus",r,7500,1.24,"interstellar")},Infernite(r){return f("nexus",r,250,1.24,"interstellar")},Sheet_Metal(r){return f("nexus",r,14e3,1.24,"interstellar")},Nano_Tube(r){return f("nexus",r,17500,1.24,"interstellar")}},effect(){let r=H(3500),a=H(4e3),i=H(3e3),s=H(25);return`${t("interstellar_nexus_effect1",[$(this)[0].support()])}
${t("plus_max_resource",[r,t("resource_Oil_name")])}
${t("plus_max_resource",[a,t("resource_Helium_3_name")])}
${t("plus_max_resource",[i,t("resource_Deuterium_name")])}
${t("plus_max_resource",[s,t("resource_Elerium_name")])}
${t("interstellar_nexus_effect2",[$(this)[0].powered(),350])}
`},support(){return 2},powered(){return _e(8)},powerBalancer(){return[{s:e.interstellar.nexus.s_max-e.interstellar.nexus.support}]},refresh:!0,action(){return u($(this)[0])?(ne("nexus","interstellar"),e.resource.Deuterium.display=!0,e.tech.nebula===1&&(e.interstellar.harvester={count:0,on:0},e.tech.nebula=2),re($(this)[0])&&(e.resource.Oil.max+=H(2500),e.resource.Helium_3.max+=H(4e3),e.resource.Deuterium.max+=H(3e3),e.resource.Elerium.max+=H(25)),!0):!1}},harvester:{id:"interstellar-harvester",title:t("interstellar_harvester_title"),desc:`${t("interstellar_harvester_title")}
${t("space_support",[t("interstellar_nebula_name")])}
`,reqs:{nebula:2},cost:{Money(r){return f("harvester",r,65e4,1.28,"interstellar")},Copper(r){return f("harvester",r,8e4,1.28,"interstellar")},Alloy(r){return f("harvester",r,45e3,1.28,"interstellar")},Iridium(r){return f("harvester",r,8e3,1.28,"interstellar")}},effect(){let r=+T("harvester","helium").toFixed(3),a=+T("harvester","deuterium").toFixed(3),i=e.tech.ram_scoop?`${t("interstellar_harvester_effect",[a])}
`:"";return`${t("space_used_support",[t("interstellar_nebula_name")])}
${t("space_gas_mining_effect1",[r])}
${i}`},s_type:"nebula",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("harvester","interstellar"),re($(this)[0]),!0):!1}},elerium_prospector:{id:"interstellar-elerium_prospector",title:t("interstellar_elerium_prospector_title"),desc:`${t("interstellar_elerium_prospector_title")}
${t("space_support",[t("interstellar_nebula_name")])}
`,reqs:{nebula:3},cost:{Money(r){return f("elerium_prospector",r,825e3,1.28,"interstellar")},Steel(r){return f("elerium_prospector",r,18e3,1.28,"interstellar")},Polymer(r){return f("elerium_prospector",r,22e3,1.28,"interstellar")},Graphene(r){return f("elerium_prospector",r,82e3,1.28,"interstellar")},Stanene(r){return f("elerium_prospector",r,57e3,1.28,"interstellar")}},effect(){let r=+T("elerium_prospector").toFixed(3);return`${t("space_used_support",[t("interstellar_nebula_name")])}
${t("space_belt_elerium_ship_effect2",[r])}
`},s_type:"nebula",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("elerium_prospector","interstellar"),re($(this)[0]),!0):!1}}},int_neutron:{info:{name:t("interstellar_neutron_name"),desc(){return e.tech.neutron?t("interstellar_neutron_desc2",[A[e.race.species].home]):t("interstellar_neutron_desc1")}},neutron_mission:{id:"interstellar-neutron_mission",title:t("space_mission_title",[t("interstellar_neutron_name")]),desc:t("space_mission_desc",[t("interstellar_neutron_name")]),reqs:{nebula:1,high_tech:14},grant:["neutron",1],queue_complete(){return e.tech.neutron>=1?0:1},cost:{Helium_3(){return+ze(6e4).toFixed(0)},Deuterium(){return+ze(1e4).toFixed(0)}},effect:t("interstellar_neutron_mission_effect"),action(){return u($(this)[0])?(e.interstellar.neutron_miner={count:0,on:0},I(t("interstellar_neutron_mission_result"),"info",!1,["progress"]),!0):!1}},neutron_miner:{id:"interstellar-neutron_miner",title:t("interstellar_neutron_miner_title"),desc(){return`${t("interstellar_neutron_miner_desc")}
${t("requires_power_combo",[e.resource.Helium_3.name])}
`},reqs:{neutron:1},cost:{Money(r){return f("neutron_miner",r,1e6,1.32,"interstellar")},Titanium(r){return f("neutron_miner",r,45e3,1.32,"interstellar")},Stanene(r){return f("neutron_miner",r,88e3,1.32,"interstellar")},Elerium(r){return f("neutron_miner",r,20,1.32,"interstellar")},Aerogel(r){return f("neutron_miner",r,50,1.32,"interstellar")}},effect(){let r=+T("neutron_miner").toFixed(3),a=H(500),i=+ze(3).toFixed(2);return`${t("space_gas_moon_outpost_effect1",[r])}
${t("plus_max_resource",[a,t("resource_Neutronium_name")])}
${t("interstellar_alpha_starport_effect2",[i,$(this)[0].powered()])}
`},powered(){return _e(6)},powerBalancer(){return[{r:"Neutronium",k:"lpmod"}]},action(){return u($(this)[0])?(ne("neutron_miner","interstellar"),re($(this)[0]),!0):!1}},citadel:{id:"interstellar-citadel",title:t("interstellar_citadel_title"),desc:`${t("interstellar_citadel_desc")}
${t("requires_power")}
`,reqs:{neutron:1,high_tech:15},cost:{Money(r){return f("citadel",r,5e6,1.25,"interstellar")},Knowledge(r){return f("citadel",r,15e5,1.15,"interstellar")},Graphene(r){return f("citadel",r,5e4,1.25,"interstellar")},Stanene(r){return f("citadel",r,1e5,1.25,"interstellar")},Elerium(r){return f("citadel",r,250,1.25,"interstellar")},Soul_Gem(r){return f("citadel",r,1,1.25,"interstellar")}},wide:!0,effect(){let r=`${t("interstellar_citadel_stat",[+xt.toFixed(1)])}
${t("interstellar_citadel_effect",[5])}
`;if(e.tech.ai_core){let a=+(xt/1.75).toFixed(1);if(e.race.flier||(r=r+`${t("interstellar_citadel_effect2",[a])}
`),e.tech.ai_core>=2&&(r=r+`${t("interstellar_citadel_effect3",[2])}
`),e.tech.ai_core>=3){let i=+(xt/5).toFixed(1);r=r+`${t("interstellar_citadel_effect4",[i])}
`}}return`${r}${t("interstellar_citadel_power",[$(this)[0].powered(),_e(2.5)])}
`},powered(){return k.citadel&&k.citadel>1?_e(30+(k.citadel-1)*2.5):_e(30)},action(){return u($(this)[0])?(ne("citadel","interstellar"),re($(this)[0]),!0):!1},flair(){return t("interstellar_citadel_flair")}},stellar_forge:{id:"interstellar-stellar_forge",title:t("interstellar_stellar_forge_title"),desc:`${t("interstellar_stellar_forge_title")}
${t("requires_power")}
`,reqs:{star_forge:1},cost:{Money(r){return f("stellar_forge",r,12e5,1.25,"interstellar")},Iridium(r){return f("stellar_forge",r,25e4,1.25,"interstellar")},Bolognium(r){return f("stellar_forge",r,35e3,1.25,"interstellar")},Aerogel(r){return f("stellar_forge",r,75e3,1.25,"interstellar")}},effect(){let r=`${t("city_foundry_effect1",[N(2)])}
${t("interstellar_stellar_forge_effect",[10])}
${t("interstellar_stellar_forge_effect2",[5])}
`;return e.tech.star_forge&&e.tech.star_forge>=2&&(r+=`${t("interstellar_stellar_forge_effect3",[2])}
`),`${r}${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(3)},special:!0,action(){return u($(this)[0])?(ne("stellar_forge","interstellar"),re($(this)[0])&&(e.civic.craftsman.max+=N(2),e.tech.star_forge>=2&&(e.city.smelter.cap+=2,e.city.smelter.Star+=2,e.city.smelter.StarCap+=2,e.city.smelter.Iron+=2)),!0):!1},flair(){return t("interstellar_stellar_forge_flair")}}},int_blackhole:{info:{name:t("interstellar_blackhole_name"),desc(){let r=A[e.race.species].home;if(e.tech.blackhole>=5){let a=+e.interstellar.stellar_engine.mass.toFixed(10),i=+e.interstellar.stellar_engine.exotic.toFixed(10);if(e.tech.roid_eject&&(a+=.225*e.tech.roid_eject*(1+e.tech.roid_eject/12)),e.tech.whitehole){let s=ct("bigbang"),n=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`${t("interstellar_blackhole_desc4",[r,a,i])}
${t("interstellar_blackhole_desc5",[s.plasmid,s.phage,s.dark,n])}
`}else return e.interstellar.stellar_engine.exotic>0?t("interstellar_blackhole_desc4",[r,a,i]):t("interstellar_blackhole_desc3",[r,a])}else return e.tech.blackhole?t("interstellar_blackhole_desc2",[r]):t("interstellar_blackhole_desc1",[r])}},blackhole_mission:{id:"interstellar-blackhole_mission",title:t("space_mission_title",[t("interstellar_blackhole_name")]),desc:t("space_mission_desc",[t("interstellar_blackhole_name")]),reqs:{nebula:1},grant:["blackhole",1],queue_complete(){return e.tech.blackhole>=1?0:1},cost:{Helium_3(){return+ze(75e3).toFixed(0)},Deuterium(){return+ze(25e3).toFixed(0)}},effect:t("interstellar_blackhole_mission_effect"),action(){return u($(this)[0])?(e.interstellar.far_reach={count:0,on:0},I(t("interstellar_blackhole_mission_result"),"info",!1,["progress"]),!0):!1}},far_reach:{id:"interstellar-far_reach",title:t("interstellar_far_reach"),desc:`${t("interstellar_far_reach_desc")}
${t("requires_power")}
`,reqs:{blackhole:1},cost:{Money(r){return f("far_reach",r,1e6,1.32,"interstellar")},Knowledge(r){return f("far_reach",r,1e5,1.32,"interstellar")},Neutronium(r){return f("far_reach",r,2500,1.32,"interstellar")},Elerium(r){return f("far_reach",r,100,1.32,"interstellar")},Aerogel(r){return f("far_reach",r,1e3,1.32,"interstellar")}},effect(){return`${t("interstellar_far_reach_effect",[1])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(5)},action(){return u($(this)[0])?(ne("far_reach","interstellar"),re($(this)[0]),e.tech.blackhole===1&&(e.tech.blackhole=2,ue()),!0):!1},flair:t("interstellar_far_reach_flair")},stellar_engine:{id:"interstellar-stellar_engine",title:t("interstellar_stellar_engine"),desc(r){return!e.interstellar.hasOwnProperty("stellar_engine")||e.interstellar.stellar_engine.count<100||r?`${t("interstellar_stellar_engine")}
${t("requires_segments",[100])}
`:`${t("interstellar_stellar_engine")}
`},reqs:{blackhole:3},queue_size:10,queue_complete(){return 100-e.interstellar.stellar_engine.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?5e5:0},Neutronium(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?450:0},Adamantite(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?17500:0},Infernite(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?225:0},Graphene(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?45e3:0},Mythril(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?250:0},Aerogel(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?75:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0);if(a<100){let i=100-a;return`${t("interstellar_stellar_engine_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else{let i=e.tech.gravity&&e.tech.gravity>=2?13.5:7.5,s=e.interstellar.stellar_engine?e.interstellar.stellar_engine.mass:8;e.tech.roid_eject&&(s+=.225*e.tech.roid_eject*(1+e.tech.roid_eject/12));let n=1+(e.stats.achieve.escape_velocity&&e.stats.achieve.escape_velocity.h?e.stats.achieve.escape_velocity.h*.02:0),c=dt((20+(s-8)*i+(e.interstellar.stellar_engine?e.interstellar.stellar_engine.exotic:0)*i*10).toFixed(2))*n;if(e.tech.blackhole>=5){let l=+e.interstellar.stellar_engine.exotic.toFixed(10),o=e.interstellar.stellar_engine.exotic>0?t("interstellar_stellar_engine_effect3",[s,l]):t("interstellar_stellar_engine_effect2",[s]);return`${t("interstellar_stellar_engine_complete",[c])}
${o}
`}else return t("interstellar_stellar_engine_complete",[c])}},action(){return u($(this)[0])&&e.interstellar.stellar_engine.count<100?(ne("stellar_engine","interstellar"),e.interstellar.stellar_engine.count>=100&&e.tech.blackhole===3&&(e.tech.blackhole=4,ue()),!0):!1}},mass_ejector:{id:"interstellar-mass_ejector",title:t("interstellar_mass_ejector"),desc:`${t("interstellar_mass_ejector")}
${t("requires_power")}
`,reqs:{blackhole:5},cost:{Money(r){return f("mass_ejector",r,75e4,1.25,"interstellar")},Adamantite(r){return f("mass_ejector",r,125e3,1.25,"interstellar")},Infernite(r){return f("mass_ejector",r,275,1.25,"interstellar")},Elerium(r){return f("mass_ejector",r,100,1.25,"interstellar")},Mythril(r){return f("mass_ejector",r,1e4,1.25,"interstellar")}},effect(){return`${t("interstellar_mass_ejector_effect")} , ${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(3)},special:!0,sAction(){e.settings.civTabs=4,e.settings.marketTabs=2,e.settings.tabLoad||(gr("mTabResource"),Ie("interstellar-mass_ejector"))},action(){return u($(this)[0])?(ne("mass_ejector","interstellar"),re($(this)[0]),e.interstellar.mass_ejector.count===1&&(I(t("interstellar_mass_ejector_msg"),"info",!1,["progress"]),e.settings.showEjector=!0,defineGovernor()),drawResourceTab("ejector"),!0):!1},flair(){return t("interstellar_mass_ejector_flair")}},jump_ship:{id:"interstellar-jump_ship",title:t("interstellar_jump_ship"),desc:t("interstellar_jump_ship_desc"),reqs:{stargate:1},grant:["stargate",2],queue_complete(){return e.tech.stargate>=2?0:1},cost:{Money(){return 2e7},Copper(){return 24e5},Aluminium(){return 4e6},Titanium(){return 125e4},Adamantite(){return 75e4},Stanene(){return 9e5},Aerogel(){return 1e5}},effect:t("interstellar_jump_ship_effect"),action(){return!!u($(this)[0])}},wormhole_mission:{id:"interstellar-wormhole_mission",title:t("space_mission_title",[t("interstellar_wormhole_name")]),desc:t("space_mission_desc",[t("interstellar_wormhole_name")]),reqs:{stargate:2},grant:["stargate",3],queue_complete(){return e.tech.stargate>=3?0:1},cost:{Helium_3(){return+ze(15e4).toFixed(0)},Deuterium(){return+ze(75e3).toFixed(0)}},effect:t("interstellar_wormhole_mission_effect"),action(){return u($(this)[0])?(e.interstellar.stargate={count:0},e.galaxy.gateway_station={count:0,on:0},I(t("interstellar_wormhole_mission_result"),"info",!1,["progress"]),!0):!1}},stargate:{id:"interstellar-stargate",title:t("interstellar_stargate"),desc(r){return!e.interstellar.hasOwnProperty("stargate")||e.interstellar.stargate.count<200||r?`${t("interstellar_stargate")}
${t("requires_segments",[200])}
`+(e.interstellar.hasOwnProperty("stargate")&&e.interstellar.stargate.count>=200?`${t("requires_power")}
`:""):`${t("interstellar_stargate")}
`},reqs:{stargate:3},condition(){return!(e.interstellar.stargate.count>=200)},queue_size:10,queue_complete(){return 200-e.interstellar.stargate.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?1e6:0},Neutronium(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?4800:0},Infernite(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?666:0},Elerium(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?75:0},Nano_Tube(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?12e3:0},Stanene(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?6e4:0},Mythril(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?3200:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0);if(a<200){let i=200-a;return`${t("interstellar_stargate_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return Cr.int_blackhole.s_gate.effect()},action(){return u($(this)[0])&&e.interstellar.stargate.count<200?(ne("stargate","interstellar"),e.interstellar.stargate.count>=200&&(e.tech.stargate=4,e.interstellar.s_gate={count:1,on:0},e.city.power>=Cr.int_blackhole.s_gate.powered()&&e.interstellar.s_gate.on++,qi(),Ie()),!0):!1}},s_gate:{id:"interstellar-s_gate",title:t("interstellar_stargate"),desc(){return`${t("interstellar_stargate")}
${t("requires_power")}
`},reqs:{stargate:4},condition(){return e.interstellar.stargate.count>=200},wiki:!1,queue_complete(){return 0},cost:{},powered(){return _e(250)},effect(){return`${t("interstellar_s_gate_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return!1}}},int_sirius:{info:{name(){return e.tech.ascension>=3?t("interstellar_sirius_b_name"):t("interstellar_sirius_name")},desc(){return e.tech.ascension>=3?t("interstellar_sirius_b_desc"):t("interstellar_sirius_desc",[A[e.race.species].home])}},sirius_mission:{id:"interstellar-sirius_mission",title:t("space_mission_title",[t("interstellar_sirius_name")]),desc:t("space_mission_desc",[t("interstellar_sirius_name")]),reqs:{ascension:2},grant:["ascension",3],queue_complete(){return e.tech.ascension>=3?0:1},cost:{Helium_3(){return+ze(48e4).toFixed(0)},Deuterium(){return+ze(225e3).toFixed(0)}},effect(){return t("interstellar_sirius_mission_effect",[tt("name"),A[e.race.species].home])},action(){return!!u($(this)[0])}},sirius_b:{id:"interstellar-sirius_b",title:t("interstellar_sirius_b"),desc:t("interstellar_sirius_b"),reqs:{ascension:3},grant:["ascension",4],queue_complete(){return e.tech.ascension>=4?0:1},cost:{Knowledge(){return 2e7}},effect(){return t("interstellar_sirius_b_effect")},action(){return u($(this)[0])?(e.interstellar.space_elevator={count:0},!0):!1}},space_elevator:{id:"interstellar-space_elevator",title:t("interstellar_space_elevator"),desc(r){return!e.interstellar.hasOwnProperty("space_elevator")||e.interstellar.space_elevator.count<100||r?`${t("interstellar_space_elevator")}
${t("requires_segments",[100])}
`:`${t("interstellar_space_elevator")}
`},reqs:{ascension:4},condition(){return!(e.interstellar.space_elevator.count>=100)},queue_size:5,queue_complete(){return 100-e.interstellar.space_elevator.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?2e7:0},Nano_Tube(r){return(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?5e5:0},Bolognium(r){return(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?1e5:0},Mythril(r){return(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?125e3:0}},effect(r){let a=`${t("interstellar_space_elevator_effect")}
`,i=(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0);if(i<100){let s=100-i;a+=`${t("space_dwarf_collider_effect2",[s])}
`}return a},action(){return u($(this)[0])&&e.interstellar.space_elevator.count<100?(ne("space_elevator","interstellar"),e.interstellar.space_elevator.count>=100&&(e.tech.ascension=5,e.interstellar.gravity_dome={count:0},qi(),Ie()),!0):!1}},gravity_dome:{id:"interstellar-gravity_dome",title:t("interstellar_gravity_dome"),desc(r){return!e.interstellar.hasOwnProperty("gravity_dome")||e.interstellar.gravity_dome.count<100||r?`${t("interstellar_gravity_dome")}
${t("requires_segments",[100])}
`:`${t("interstellar_gravity_dome")}
`},reqs:{ascension:5},condition(){return!(e.interstellar.gravity_dome.count>=100)},queue_size:5,queue_complete(){return 100-e.interstellar.gravity_dome.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?35e6:0},Cement(r){return(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?125e4:0},Adamantite(r){return(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?65e4:0},Aerogel(r){return(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?18e4:0}},effect(r){let a=`${t("interstellar_gravity_dome_effect",[A[e.race.species].home])}
`,i=(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0);if(i<100){let s=100-i;a+=`${t("space_dwarf_collider_effect2",[s])}
`}return a},action(){return u($(this)[0])&&e.interstellar.gravity_dome.count<100?(ne("gravity_dome","interstellar"),e.interstellar.gravity_dome.count>=100&&(e.tech.ascension=6,e.interstellar.ascension_machine={count:0},e.interstellar.thermal_collector={count:0},qi(),Ie()),!0):!1}},ascension_machine:{id:"interstellar-ascension_machine",title:t("interstellar_ascension_machine"),desc(r){return!e.interstellar.hasOwnProperty("ascension_machine")||e.interstellar.ascension_machine.count<100||r?`${t("interstellar_ascension_machine")}
${t("requires_segments",[100])}
`+(e.interstellar.hasOwnProperty("ascension_machine")&&e.interstellar.ascension_machine.count>=100?`${t("requires_power")}
`:""):`${t("interstellar_ascension_machine")}
`},reqs:{ascension:6},condition(){return!(e.interstellar.ascension_machine.count>=100)},queue_size:5,queue_complete(){return 100-e.interstellar.ascension_machine.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?75e6:0},Alloy(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?75e4:0},Neutronium(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?125e3:0},Elerium(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?1e3:0},Orichalcum(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?25e4:0},Nanoweave(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?75e3:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0);if(a<100){let i=100-a;return`${t("interstellar_ascension_machine_effect",[tt("name")])}
${t("space_dwarf_collider_effect2",[i])}
`}else return Cr.int_sirius.ascension_trigger.effect()},action(){return u($(this)[0])&&e.interstellar.ascension_machine.count<100?(ne("ascension_machine","interstellar"),e.interstellar.ascension_machine.count>=100&&(e.tech.ascension=7,e.interstellar.ascension_trigger={count:1,on:0},qi(),Ie()),!0):!1}},ascension_trigger:{id:"interstellar-ascension_trigger",title:t("interstellar_ascension_machine"),desc(){return`${t("interstellar_ascension_machine")}
${t("requires_power")}
`},wiki:!1,reqs:{ascension:7},condition(){return e.interstellar.ascension_machine.count>=100},queue_complete(){return 0},cost:{},powered(){let r=100;if(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=2){r+=e.stats.achieve.technophobe.l>=4?25:10;for(let i=1;i=5&&(r+=5)}let a=Math.round(_e(1e4)-r*(e.interstellar.hasOwnProperty("thermal_collector")?e.interstellar.thermal_collector.count:0));return a<0&&(a=0),a},postPower(r){r?setTimeout(function(){e.tech.ascension=k.ascension_trigger?8:7,qi()},250):(e.tech.ascension=7,qi())},effect(){let r=Ys(),a=$(this)[0].powered(),i=a>0?`${t("minus_power",[a])}
`:"";return`${t("interstellar_ascension_trigger_effect")}
${r}${i}`},action(){return!1}},ascend:{id:"interstellar-ascend",title:t("interstellar_ascend"),desc:t("interstellar_ascend"),reqs:{ascension:8},queue_complete(){return 0},no_multi:!0,cost:{},effect(){let r=Ys();return`${t("interstellar_ascend_effect")}
${r}`},action(){return u($(this)[0])?(vs(),!0):!1}},thermal_collector:{id:"interstellar-thermal_collector",title:t("interstellar_thermal_collector"),desc:t("interstellar_thermal_collector"),reqs:{ascension:6},cost:{Money(r){return f("thermal_collector",r,5e6,1.08,"interstellar")},Infernite(r){return f("thermal_collector",r,25e3,1.08,"interstellar")},Stanene(r){return f("thermal_collector",r,1e6,1.08,"interstellar")},Vitreloy(r){return f("thermal_collector",r,1e5,1.08,"interstellar")}},effect(){let r=100;if(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=2){r+=e.stats.achieve.technophobe.l>=4?25:10;for(let a=1;a=5&&(r+=5)}return t("interstellar_thermal_collector_effect",[r])},action(){return u($(this)[0])?(ne("thermal_collector","interstellar"),!0):!1}}}};function Ys(){let r=ct("ascend"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`${t("interstellar_ascension_trigger_effect2",[r.plasmid,a])}
${t("interstellar_ascension_trigger_effect2",[r.phage,t("resource_Phage_name")])}
${t("interstellar_ascension_trigger_effect2",[r.harmony,t("resource_Harmony_name")])}
${t("interstellar_ascension_trigger_effect3")}
`}function Eo(){let r=ct("terraform"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`${t("interstellar_ascension_trigger_effect2",[r.plasmid,a])}
${t("interstellar_ascension_trigger_effect2",[r.phage,t("resource_Phage_name")])}
${t("interstellar_ascension_trigger_effect2",[r.harmony,t("resource_Harmony_name")])}
${t("space_terraformer_effect3")}
`}var He={gxy_gateway:{info:{name:t("galaxy_gateway"),desc(){return t("galaxy_gateway_desc")},control(){return{name:tt("name"),color:"success"}},support:"starbase"},gateway_mission:{id:"galaxy-gateway_mission",title:t("galaxy_gateway_mission"),desc:t("galaxy_gateway_mission"),reqs:{gateway:1},grant:["gateway",2],queue_complete(){return e.tech.gateway>=2?0:1},cost:{Helium_3(){return+ze(212e3).toFixed(0)},Deuterium(){return+ze(11e4).toFixed(0)}},effect:t("galaxy_gateway_mission_effect"),action(){return u($(this)[0])?(Io(),e.galaxy.defense={gxy_stargate:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_gateway:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_gorddon:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_alien1:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_alien2:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_chthonian:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0}},!0):!1}},starbase:{id:"galaxy-starbase",title:t("galaxy_starbase"),desc(){return`${t("galaxy_starbase")}
${t("requires_power_space",[e.resource.Food.name])}
`},reqs:{gateway:2},cost:{Money(r){return f("starbase",r,42e5,1.25,"galaxy")},Elerium(r){return f("starbase",r,1e3,1.25,"galaxy")},Mythril(r){return f("starbase",r,9e4,1.25,"galaxy")},Graphene(r){return f("starbase",r,32e4,1.25,"galaxy")},Horseshoe(){return e.race.hooved?5:0}},effect(){let r=+ze(25).toFixed(2),a=250,i=e.tech.marines>=2?N(8):N(5);return`${t("galaxy_defense_platform_effect",[25])}
${t("galaxy_gateway_support",[$(this)[0].support()])}
${t("plus_max_soldiers",[i])}
${t("interstellar_alpha_starport_effect2",[r,$(this)[0].powered()])}
${t("interstellar_alpha_starport_effect3",[a,e.resource.Food.name])}
`},support(){return 2},powered(){return _e(k.s_gate?12:0)},powerBalancer(){return[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]},refresh:!0,action(){return u($(this)[0])?(ne("starbase","galaxy"),re($(this)[0]),e.tech.gateway===2&&(e.galaxy.bolognium_ship={count:0,on:0,crew:0},e.tech.gateway=3),!0):!1}},ship_dock:{id:"galaxy-ship_dock",title:t("galaxy_ship_dock"),desc:`${t("galaxy_ship_dock")}
${t("requires_power")}
`,reqs:{gateway:4},cost:{Money(r){return f("ship_dock",r,36e5,1.25,"galaxy")},Steel(r){return f("ship_dock",r,88e4,1.25,"galaxy")},Aluminium(r){return f("ship_dock",r,12e5,1.25,"galaxy")},Bolognium(r){return f("ship_dock",r,75e3,1.25,"galaxy")}},effect(){return e.race.fasting?`${t("galaxy_ship_dock_effect_fasting",[.1])}
${t("minus_power",[$(this)[0].powered()])}
`:`${t("galaxy_ship_dock_effect",[.25])}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return e.race.fasting?k.gateway_station?.1*k.gateway_station:0:k.starbase?.25*k.starbase:0},powered(){return _e(k.s_gate?4:0)},powerBalancer(){return e.race.fasting?[{s:e.galaxy.gateway_station.s_max-e.galaxy.gateway_station.support}]:[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]},action(){return u($(this)[0])?(ne("ship_dock","galaxy"),re($(this)[0]),!0):!1}},bolognium_ship:{id:"galaxy-bolognium_ship",title:t("galaxy_bolognium_ship"),desc(){return`${t("galaxy_bolognium_ship_desc")}
${t("galaxy_starbase_support",[t("resource_Helium_3_name")])}
`},reqs:{gateway:3},cost:{Money(r){return f("bolognium_ship",r,14e5,1.22,"galaxy")},Iron(r){return f("bolognium_ship",r,56e4,1.22,"galaxy")},Infernite(r){return f("bolognium_ship",r,1800,1.22,"galaxy")},Nano_Tube(r){return f("bolognium_ship",r,475e3,1.22,"galaxy")}},effect(){let r=+T("bolognium_ship").toFixed(3),a=+ze($(this)[0].ship.helium).toFixed(2);return`${t("gain",[r,t("resource_Bolognium_name")])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[a,e.resource.Helium_3.name])}
`},s_type:"gateway",support(){return-1},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*2:2},mil(){return 0},helium:5},powered(){return 0},action(){return u($(this)[0])?(ne("bolognium_ship","galaxy"),e.resource.Bolognium.display=!0,e.civic.crew.display=!0,re($(this)[0]),!0):!1}},scout_ship:{id:"galaxy-scout_ship",title:t("galaxy_scout_ship"),desc(){return`${t("galaxy_scout_ship")}
${t("galaxy_starbase_support",[t("resource_Helium_3_name")])}
`},reqs:{andromeda:1},cost:{Money(r){return f("scout_ship",r,16e5,1.25,"galaxy")},Titanium(r){return f("scout_ship",r,325e3,1.25,"galaxy")},Graphene(r){return f("scout_ship",r,118e3,1.25,"galaxy")},Soul_Gem(r){return f("scout_ship",r,1,1.02,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2),a=e.tech.science>=17?`${t("galaxy_scout_ship_effect2",[25])}
`:"";return`${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_scout_ship_effect")}
${a}${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},s_type:"gateway",support(){return-1},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},mil(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},helium:6,rating(){return e.race.banana?7:10}},powered(){return 0},action(){return u($(this)[0])?(ne("scout_ship","galaxy"),e.galaxy.defense.gxy_gateway.scout_ship++,re($(this)[0]),!0):!1}},corvette_ship:{id:"galaxy-corvette_ship",title:t("galaxy_corvette_ship"),desc(){return`${t("galaxy_corvette_ship")}
${t("galaxy_starbase_support",[t("resource_Helium_3_name")])}
`},reqs:{andromeda:2},cost:{Money(r){return f("corvette_ship",r,45e5,1.25,"galaxy")},Steel(r){return f("corvette_ship",r,175e4,1.25,"galaxy")},Infernite(r){return f("corvette_ship",r,16e3,1.25,"galaxy")},Bolognium(r){return f("corvette_ship",r,35e3,1.25,"galaxy")},Soul_Gem(r){return f("corvette_ship",r,1,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2);return`${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},s_type:"gateway",support(){return-1},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*2:2},mil(){return e.race.high_pop?b.high_pop.vars()[0]*3:3},helium:10,rating(){return e.race.banana?21:30}},powered(){return 0},action(){return u($(this)[0])?(ne("corvette_ship","galaxy"),e.galaxy.defense.gxy_gateway.corvette_ship++,re($(this)[0]),!0):!1}},frigate_ship:{id:"galaxy-frigate_ship",title:t("galaxy_frigate_ship"),desc(){return`${t("galaxy_frigate_ship")}
${t("galaxy_starbase_support",[t("resource_Helium_3_name")])}
`},reqs:{andromeda:3},cost:{Money(r){return f("frigate_ship",r,18e6,1.25,"galaxy")},Elerium(r){return f("frigate_ship",r,1250,1.25,"galaxy")},Mythril(r){return f("frigate_ship",r,35e4,1.25,"galaxy")},Sheet_Metal(r){return f("frigate_ship",r,8e5,1.25,"galaxy")},Soul_Gem(r){return f("frigate_ship",r,2,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2);return`${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},s_type:"gateway",support(){return-2},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*3:3},mil(){return e.race.high_pop?b.high_pop.vars()[0]*5:5},helium:25,rating(){return e.race.banana?56:80}},powered(){return 0},action(){return u($(this)[0])?(ne("frigate_ship","galaxy"),e.galaxy.defense.gxy_gateway.frigate_ship++,re($(this)[0]),!0):!1},flair:t("tech_frigate_ship_flair")},cruiser_ship:{id:"galaxy-cruiser_ship",title:t("galaxy_cruiser_ship"),desc(){return`${t("galaxy_cruiser_ship")}
${t("galaxy_starbase_support",[t("resource_Deuterium_name")])}
`},reqs:{andromeda:4},cost:{Money(r){return f("cruiser_ship",r,75e6,1.25,"galaxy")},Copper(r){return f("cruiser_ship",r,6e6,1.25,"galaxy")},Adamantite(r){return f("cruiser_ship",r,1e6,1.25,"galaxy")},Vitreloy(r){return f("cruiser_ship",r,75e4,1.25,"galaxy")},Elerium(r){return f("cruiser_ship",r,1800,1.25,"galaxy")},Soul_Gem(r){return f("cruiser_ship",r,5,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.deuterium).toFixed(2);return`${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Deuterium.name])}
`},s_type:"gateway",support(){return-3},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*6:6},mil(){return e.race.high_pop?b.high_pop.vars()[0]*10:10},deuterium:25,rating(){return e.race.banana?175:250}},powered(){return 0},action(){return u($(this)[0])?(ne("cruiser_ship","galaxy"),e.galaxy.defense.gxy_gateway.cruiser_ship++,re($(this)[0]),!0):!1}},dreadnought:{id:"galaxy-dreadnought",title:t("galaxy_dreadnought"),desc(){return`${t("galaxy_dreadnought")}
${t("galaxy_starbase_support",[t("resource_Deuterium_name")])}
`},reqs:{andromeda:5},cost:{Money(r){return f("dreadnought",r,225e6,1.25,"galaxy")},Neutronium(r){return f("dreadnought",r,25e4,1.25,"galaxy")},Bolognium(r){return f("dreadnought",r,15e5,1.25,"galaxy")},Vitreloy(r){return f("dreadnought",r,1e6,1.25,"galaxy")},Infernite(r){return f("dreadnought",r,4e5,1.25,"galaxy")},Aerogel(r){return f("dreadnought",r,8e5,1.25,"galaxy")},Soul_Gem(r){return f("dreadnought",r,25,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.deuterium).toFixed(2);return`${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Deuterium.name])}
`},s_type:"gateway",support(){return-5},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*10:10},mil(){return e.race.high_pop?b.high_pop.vars()[0]*20:20},deuterium:80,rating(){return e.race.banana?1260:1800}},powered(){return 0},action(){return u($(this)[0])?(ne("dreadnought","galaxy"),e.galaxy.defense.gxy_gateway.dreadnought++,re($(this)[0]),!0):!1}}},gxy_stargate:{info:{name:t("galaxy_stargate"),desc(){return e.tech.piracy?t("galaxy_stargate_desc_alt"):t("galaxy_stargate_desc")},control(){return{name:tt("name"),color:"success"}}},gateway_station:{id:"galaxy-gateway_station",title:t("galaxy_gateway_station"),desc(){return`${t("galaxy_gateway_station_desc")}
${t("requires_power")}
`},reqs:{stargate:4},cost:{Money(r){return f("gateway_station",r,5e6,1.25,"galaxy")},Aluminium(r){return f("gateway_station",r,52e4,1.25,"galaxy")},Polymer(r){return f("gateway_station",r,35e4,1.25,"galaxy")},Neutronium(r){return f("gateway_station",r,17500,1.25,"galaxy")}},effect(){let r=H(2e3),a=H(4500),i=H(50),s="";return e.tech.gateway&&e.tech.gateway>=2&&(s=`${t("galaxy_gateway_support",[$(this)[0].support()])}
`),`${s}${t("plus_max_resource",[r,t("resource_Helium_3_name")])}
${t("plus_max_resource",[a,t("resource_Deuterium_name")])}
${t("plus_max_resource",[i,t("resource_Elerium_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return .5},powered(){return _e(k.s_gate?4:0)},powerBalancer(){return e.galaxy.hasOwnProperty("starbase")?[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]:!1},refresh:!0,action(){return u($(this)[0])?(ne("gateway_station","galaxy"),e.resource.Helium_3.max+=H(2e3),e.resource.Deuterium.max+=H(4500),e.tech.stargate===4&&(e.galaxy.telemetry_beacon={count:0,on:0},e.tech.stargate=5),re($(this)[0]),!0):!1}},telemetry_beacon:{id:"galaxy-telemetry_beacon",title:t("galaxy_telemetry_beacon"),desc(){return`${t("galaxy_telemetry_beacon")}
${t("requires_power")}
`},reqs:{stargate:5},cost:{Money(r){return f("telemetry_beacon",r,225e4,1.25,"galaxy")},Copper(r){return f("telemetry_beacon",r,685e3,1.25,"galaxy")},Alloy(r){return f("telemetry_beacon",r,425e3,1.25,"galaxy")},Iridium(r){return f("telemetry_beacon",r,177e3,1.25,"galaxy")}},effect(){let r=e.tech.telemetry?1200:800;e.tech.science>=17&&(r+=we.scout_ship*25);let a=k.telemetry_beacon?r*k.telemetry_beacon:0,i="";return e.tech.gateway&&e.tech.gateway>=2&&(i=`${t("galaxy_gateway_support",[$(this)[0].support()])}
`),`${i}${t("galaxy_telemetry_beacon_effect1",[r])}
${t("galaxy_telemetry_beacon_effect2",[a])}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return e.tech.telemetry?.75:.5},powered(){return _e(k.s_gate?4:0)},powerBalancer(){return e.galaxy.hasOwnProperty("starbase")?[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]:!1},postPower(r){let a=r?k.telemetry_beacon+fe():k.telemetry_beacon-fe();a>e.galaxy.telemetry_beacon.count?a=e.galaxy.telemetry_beacon.count:a<0&&(a=0),k.telemetry_beacon=a,Ci($(this)[0],"galaxy","telemetry_beacon")},action(){return u($(this)[0])?(ne("telemetry_beacon","galaxy"),re($(this)[0])&&(e.resource.Knowledge.max+=1750),e.tech.gateway||(e.galaxy.starbase={count:0,on:0,support:0,s_max:0},e.settings.space.gateway=!0,e.tech.gateway=1,ac()),!0):!1}},gateway_depot:{id:"galaxy-gateway_depot",title:t("galaxy_gateway_depot"),desc:`${t("galaxy_gateway_depot")}
`,reqs:{gateway:5},cost:{Money(r){return f("gateway_depot",r,4e6,1.25,"galaxy")},Neutronium(r){return f("gateway_depot",r,8e4,1.25,"galaxy")},Stanene(r){return f("gateway_depot",r,5e5,1.25,"galaxy")},Vitreloy(r){return f("gateway_depot",r,2500,1.25,"galaxy")}},wide:!0,effect(){let r=e.tech.world_control?150:100,a=H(200),i=Xs(),s=Ee(+H(3e3*i).toFixed(0),1),n=Ee(+H(25e4*i).toFixed(0),1),c=Ee(+H(9001*i).toFixed(0),1),l=Ee(+H(6660*i).toFixed(0),1),o='';return o=o+`${t("plus_max_crates",[r])} ${t("plus_max_containers",[r])} `,o=o+`${t("plus_max_resource",[s,e.resource.Uranium.name])} `,o=o+`${t("plus_max_resource",[n,e.resource.Nano_Tube.name])} `,o=o+`${t("plus_max_resource",[c,e.resource.Neutronium.name])} `,o=o+`${t("plus_max_resource",[l,e.resource.Infernite.name])} `,o=o+"
",`${o}${t("galaxy_gateway_depot_effect",[a,t("resource_Elerium_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(k.s_gate?10:0)},action(){if(u($(this)[0])){ne("gateway_depot","galaxy");let r=e.tech.world_control?150:100;e.resource.Crates.max+=r,e.resource.Containers.max+=r,e.resource.Containers.display||Yr();let a=Xs();return e.resource.Uranium.max+=H(3e3*a),e.resource.Nano_Tube.max+=H(25e4*a),e.resource.Neutronium.max+=H(9001*a),e.resource.Infernite.max+=H(6660*a),re($(this)[0]),!0}return!1}},defense_platform:{id:"galaxy-defense_platform",title:t("galaxy_defense_platform"),desc(){return`${t("galaxy_defense_platform")}
${t("requires_power")}
`},reqs:{stargate:6},cost:{Money(r){return f("defense_platform",r,75e4,1.25,"galaxy")},Adamantite(r){return f("defense_platform",r,425e3,1.25,"galaxy")},Elerium(r){return f("defense_platform",r,800,1.25,"galaxy")},Vitreloy(r){return f("defense_platform",r,1250,1.25,"galaxy")},Wrought_Iron(r){return f("defense_platform",r,75e3,1.25,"galaxy")}},effect(){return`${t("galaxy_defense_platform_effect",[20])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(k.s_gate?5:0)},postPower(r){D({el:"#gxy_stargate"},"update")},action(){return u($(this)[0])?(ne("defense_platform","galaxy"),re($(this)[0]),!0):!1},post(){D({el:"#gxy_stargate"},"update")}}},gxy_gorddon:{info:{name:t("galaxy_gorddon"),desc(){return t("galaxy_gorddon_desc")},control(){return{name:A[e.galaxy.alien1.id].name,color:"advanced"}}},gorddon_mission:{id:"galaxy-gorddon_mission",title:t("galaxy_gorddon_mission"),desc:t("galaxy_gorddon_mission_desc"),reqs:{xeno:2},grant:["xeno",3],queue_complete(){return e.tech.xeno>=3?0:1},cost:{Structs(){return{galaxy:{scout_ship:{s:"gxy_gateway",count:2,on:2},corvette_ship:{s:"gxy_gateway",count:1,on:1}}}},Helium_3(){return+ze(23e4).toFixed(0)},Deuterium(){return+ze(125e3).toFixed(0)}},effect:t("galaxy_gorddon_mission_effect"),action(){if(u($(this)[0])){Io(),e.galaxy.defense.gxy_gateway.scout_ship-=2,e.galaxy.defense.gxy_gorddon.scout_ship+=2,e.galaxy.defense.gxy_gateway.corvette_ship--,e.galaxy.defense.gxy_gorddon.corvette_ship++;let r=A[e.galaxy.alien1.id].name,a=A[e.galaxy.alien1.id].entity,i=A[e.galaxy.alien2.id].name,s=A[e.galaxy.alien2.id].entity;return I(t("galaxy_gorddon_mission_result",[a,r,s,i]),"info",!1,["progress"]),!0}return!1}},embassy:{id:"galaxy-embassy",title:t("galaxy_embassy"),desc(){return`${t("galaxy_embassy")}
${t("requires_power_combo",[e.resource.Food.name])}
`},reqs:{xeno:4},queue_complete(){return 1-e.galaxy.embassy.count},cost:{Money(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?3e7:0},Lumber(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?38e6:0},Stone(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?32e6:0},Furs(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?18e6:0},Wrought_Iron(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?6e6:0}},effect(){let r=7500,a="";e.tech.xeno>=11&&(a=`${t("plus_max_citizens",[$(this)[0].citizens()])}
`);let i="";return e.race.fasting||(i=`${t("interstellar_alpha_starport_effect3",[r,e.resource.Food.name])}
`),`${t("galaxy_embassy_effect",[A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])}
${a}${i}${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(k.s_gate?25:0)},refresh:!0,action(){if(e.galaxy.embassy.count<1&&u($(this)[0])){if(ne("embassy","galaxy"),re($(this)[0]),e.tech.xeno===4&&(e.tech.xeno=5,e.galaxy.freighter={count:0,on:0,crew:0},e.galaxy.trade={max:0,cur:0,f0:0,f1:0,f2:0,f3:0,f4:0,f5:0,f6:0,f7:0,f8:0},I(t("galaxy_embassy_complete",[A[e.galaxy.alien1.id].name,A[e.galaxy.alien2.id].name]),"info",!1,["progress"])),e.race.fasting){let r=ot();e.stats.endless_hunger.b1[r]=!0,r!=="m"&&r!=="l"&&(e.stats.endless_hunger.b1.l=!0)}return!0}return!1},citizens(){let r=20;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},dormitory:{id:"galaxy-dormitory",title:t("galaxy_dormitory"),desc(){return`${t("galaxy_dormitory")}
${t("requires_power")}
`},reqs:{xeno:6},cost:{Money(r){return f("dormitory",r,1e7,1.25,"galaxy")},Furs(r){return f("dormitory",r,7e5,1.25,"galaxy")},Cement(r){return f("dormitory",r,12e5,1.25,"galaxy")},Plywood(r){return f("dormitory",r,85e3,1.25,"galaxy")},Horseshoe(){return e.race.hooved?3:0}},effect(){return`${t("requires_res",[t("galaxy_embassy")])}
${t("plus_max_citizens",[$(this)[0].citizens()])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(3)},action(){return u($(this)[0])?(ne("dormitory","galaxy"),re($(this)[0]),!0):!1},citizens(){let r=3;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},symposium:{id:"galaxy-symposium",title:t("galaxy_symposium"),desc(){return`${t("galaxy_symposium")}
${t("requires_power")}
`},reqs:{xeno:6},cost:{Money(r){return f("symposium",r,8e6,1.25,"galaxy")},Food(r){return e.race.ravenous?0:f("symposium",r,e.race.artifical?45e3:125e3,1.25,"galaxy")},Lumber(r){return f("symposium",r,46e4,1.25,"galaxy")},Brick(r){return f("symposium",r,261600,1.25,"galaxy")}},effect(){let r="";return e.tech.xeno>=7&&(r=`${t("galaxy_symposium_effect3",[+xe(300).toFixed(2)])}
`),`${t("requires_res",[t("galaxy_embassy")])}
${t("galaxy_symposium_effect",[1750])}
${t("galaxy_symposium_effect2",[650])}
${r}${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(4)},action(){return u($(this)[0])?(ne("symposium","galaxy"),re($(this)[0]),!0):!1}},freighter:{id:"galaxy-freighter",title:t("galaxy_freighter"),desc(){return`${t("galaxy_freighter")}
${t("galaxy_crew_fuel",[t("resource_Helium_3_name")])}
`},reqs:{xeno:5},cost:{Money(r){return f("freighter",r,6e6,1.2,"galaxy")},Uranium(r){return f("freighter",r,1e4,1.2,"galaxy")},Adamantite(r){return f("freighter",r,46e4,1.2,"galaxy")},Stanene(r){return f("freighter",r,261600,1.2,"galaxy")},Bolognium(r){return f("freighter",r,66e3,1.2,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2),a="";return e.tech.banking>=13&&(a=`${t("interstellar_exchange_boost",[3])}
`),`${t("requires_res",[t("galaxy_embassy")])}
${t("galaxy_freighter_effect",[2,A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])}
${a}${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*3:3},mil(){return 0},helium:12},special:!0,powered(){return 0},action(){return u($(this)[0])?(ne("freighter","galaxy"),e.galaxy.freighter.on++,e.resource.Vitreloy.display=!0,!0):!1}}},gxy_alien1:{info:{name(){return t("galaxy_alien",[A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].home])},desc(){return t("galaxy_alien1_desc",[A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].home,A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])},control(){return{name:A[e.galaxy.alien1.id].name,color:"advanced"}}},consulate:{id:"galaxy-consulate",title:t("galaxy_consulate"),desc(){return t("galaxy_consulate_desc",[A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].home])},reqs:{xeno:8},queue_complete(){return 1-e.galaxy.consulate.count},cost:{Money(r){return(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?9e7:0},Stone(r){return(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?75e6:0},Furs(r){return(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?3e7:0},Iron(r){return(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?45e6:0},Horseshoe(r){return e.race.hooved&&(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?10:0}},effect(){return t("plus_max_citizens",[$(this)[0].citizens()])},refresh:!0,action(){return u($(this)[0])&&e.galaxy.consulate.count<1?(ne("consulate","galaxy"),e.galaxy.resort={count:0,on:0},e.galaxy.super_freighter={count:0,on:0,crew:0},e.tech.xeno=9,!0):!1},citizens(){let r=10;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},resort:{id:"galaxy-resort",title:t("galaxy_resort"),desc(){return`${t("galaxy_resort")}
${t("requires_power")}
`},reqs:{xeno:9},cost:{Money(r){return f("resort",r,33e6,1.25,"galaxy")},Stone(r){return f("resort",r,25e6,1.25,"galaxy")},Furs(r){return f("resort",r,1e7,1.25,"galaxy")},Oil(r){return f("resort",r,ze(125e3),1.25,"galaxy")}},effect(){let r=H(e.tech.world_control?1875e3:15e5),a=e.race.joyless?"":`${t("city_max_entertainer",[N(2)])}
`;return`${t("plus_max_resource",[`$${r.toLocaleString()}`,t("resource_Money_name")])}
${a}${t("space_red_vr_center_effect2",[2])}
`+`${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(5)},action(){return u($(this)[0])?(ne("resort","galaxy"),re($(this)[0])&&(e.race.joyless||(e.civic.entertainer.max+=N(2),e.civic.entertainer.display=!0)),!0):!1}},vitreloy_plant:{id:"galaxy-vitreloy_plant",title:t("galaxy_vitreloy_plant"),desc(){return`${t("galaxy_vitreloy_plant")}
${t("galaxy_vitreloy_plant_desc")}
`},reqs:{xeno:10},cost:{Money(r){return f("vitreloy_plant",r,35e6,1.25,"galaxy")},Cement(r){return f("vitreloy_plant",r,18e5,1.25,"galaxy")},Neutronium(r){return f("vitreloy_plant",r,25e4,1.25,"galaxy")},Iridium(r){return f("vitreloy_plant",r,85e4,1.25,"galaxy")},Aerogel(r){return f("vitreloy_plant",r,4e5,1.25,"galaxy")}},effect(){let r=+T("vitreloy_plant").toFixed(2),a=2.5,i=100,s=5e4;return`${t("galaxy_vitreloy_plant_effect",[r])}
${t("galaxy_vitreloy_plant_effect2",[a,i])}
${t("galaxy_vitreloy_plant_effect3",[s,$(this)[0].powered()])}
`},powered(){return _e(10)},action(){return u($(this)[0])?(ne("vitreloy_plant","galaxy"),re($(this)[0]),!0):!1}},super_freighter:{id:"galaxy-super_freighter",title:t("galaxy_super_freighter"),desc(){return`${t("galaxy_super_freighter")}
${t("galaxy_crew_fuel",[t("resource_Helium_3_name")])}
`},reqs:{xeno:9},cost:{Money(r){return f("super_freighter",r,28e6,1.2,"galaxy")},Aluminium(r){return f("super_freighter",r,35e5,1.2,"galaxy")},Alloy(r){return f("super_freighter",r,1e6,1.2,"galaxy")},Graphene(r){return f("super_freighter",r,75e4,1.2,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2),a="";return e.tech.banking>=13&&(a=`${t("interstellar_exchange_boost",[8])}
`),`${t("requires_res",[t("galaxy_embassy")])}
${t("galaxy_freighter_effect",[5,A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])}
${a}${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*5:5},mil(){return 0},helium:25},special:!0,powered(){return 0},action(){return u($(this)[0])?(ne("super_freighter","galaxy"),e.galaxy.super_freighter.on++,!0):!1}}},gxy_alien2:{info:{name(){return t("galaxy_alien",[A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])},desc(){return t("galaxy_alien2_desc",[A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red,A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},control(){return{name:A[e.galaxy.alien2.id].name,color:"danger"}},support:"foothold"},alien2_mission:{id:"galaxy-alien2_mission",title(){return t("galaxy_alien2_mission",[A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])},desc(){return t("galaxy_alien2_mission_desc",[A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])},reqs:{andromeda:4},grant:["conflict",1],queue_complete(){return e.tech.conflict>=1?0:1},cost:{Custom(){if(e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_alien2")){let r=0;return Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(a){r+=He.gxy_gateway[a].ship.rating()*e.galaxy.defense.gxy_alien2[a]}),{label:t("galaxy_fleet_rating",[`400 `]),met:!(r<400)}}return{label:t("galaxy_fleet_rating",['400 ']),met:!1}}},effect(){let r=0;e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_alien2")&&Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(i){r+=He.gxy_gateway[i].ship.rating()*e.galaxy.defense.gxy_alien2[i]});let a=r>=650?`${t("galaxy_piracy_low")} `:`${t("galaxy_piracy_avg")} `;return`${t("galaxy_alien2_mission_effect2",[r])}
${t("galaxy_alien2_mission_effect3",[a])}
${t("galaxy_alien2_mission_effect",[A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])}
`},action(){if(u($(this)[0])){let r=0;if(Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(a){r+=He.gxy_gateway[a].ship.rating()*e.galaxy.defense.gxy_alien2[a]}),r>=400){if(I(t("galaxy_alien2_mission_result2",[A[e.galaxy.alien2.id].solar.red]),"info",!1,["progress"]),r<650){let a=80;e.race.instinct&&(a/=2);let i=[];Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(s){for(let n=0;n0&&(a-=He.gxy_gateway[s].ship.rating(),i.push(s))}),I(t("galaxy_chthonian_mission_result_losses",[i.map(s=>t(`galaxy_${s}`)).join(", ")]),"danger",!1,["progress"]);for(let s=0;s${t("galaxy_foothold")}${t("requires_power_combo",[e.resource.Elerium.name])}
`},reqs:{conflict:1},cost:{Money(r){return f("foothold",r,25e6,1.25,"galaxy")},Titanium(r){return f("foothold",r,3e6,1.25,"galaxy")},Polymer(r){return f("foothold",r,175e4,1.25,"galaxy")},Iridium(r){return f("foothold",r,9e5,1.25,"galaxy")},Bolognium(r){return f("foothold",r,5e4,1.25,"galaxy")}},effect(){let r=2.5;return`${t("galaxy_defense_platform_effect",[50])}
${t("galaxy_foothold_effect",[$(this)[0].support(),A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
${t("galaxy_foothold_effect2",[r,$(this)[0].powered()])}
`},support(){return 4},powered(){return _e(k.s_gate?20:0)},powerBalancer(){return[{s:e.galaxy.foothold.s_max-e.galaxy.foothold.support}]},action(){return u($(this)[0])?(ne("foothold","galaxy"),re($(this)[0]),e.tech.conflict===1&&(e.galaxy.armed_miner={count:0,on:0,crew:0,mil:0},e.tech.conflict=2,ac(),ue()),!0):!1}},armed_miner:{id:"galaxy-armed_miner",title:t("galaxy_armed_miner"),desc(){return`${t("galaxy_armed_miner")}
`},reqs:{conflict:2},cost:{Money(r){return f("armed_miner",r,5e6,1.25,"galaxy")},Steel(r){return f("armed_miner",r,18e5,1.25,"galaxy")},Stanene(r){return f("armed_miner",r,1975e3,1.25,"galaxy")},Vitreloy(r){return f("armed_miner",r,2e4,1.25,"galaxy")},Soul_Gem(r){return f("armed_miner",r,1,1.25,"galaxy")}},effect(){let r=.032,a=.23,i=.65,s=+ze($(this)[0].ship.helium).toFixed(2);return`${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("gain",[r,t("resource_Bolognium_name")])}
${t("gain",[a,t("resource_Adamantite_name")])}
${t("gain",[i,t("resource_Iridium_name")])}
${t("galaxy_alien2_support",[$(this)[0].support(),A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("spend",[s,e.resource.Helium_3.name])}
`},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*2:2},mil(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},helium:10,rating(){return e.race.banana?4:5}},s_type:"alien2",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("armed_miner","galaxy"),re($(this)[0]),!0):!1}},ore_processor:{id:"galaxy-ore_processor",title:t("galaxy_ore_processor"),desc(){return`${t("galaxy_ore_processor")}
`},reqs:{conflict:3},cost:{Money(r){return f("ore_processor",r,3e6,1.25,"galaxy")},Iron(r){return f("ore_processor",r,5e6,1.25,"galaxy")},Coal(r){return f("ore_processor",r,375e4,1.25,"galaxy")},Graphene(r){return f("ore_processor",r,225e4,1.25,"galaxy")}},effect(){return`${t("galaxy_ore_processor_effect",[10])}
${t("galaxy_alien2_support",[$(this)[0].support(),A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
`},s_type:"alien2",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("ore_processor","galaxy"),re($(this)[0]),!0):!1}},scavenger:{id:"galaxy-scavenger",title:t("galaxy_scavenger"),desc:t("galaxy_scavenger_desc"),reqs:{conflict:4},cost:{Money(r){return f("scavenger",r,75e5,1.25,"galaxy")},Alloy(r){return f("scavenger",r,125e4,1.25,"galaxy")},Aluminium(r){return f("scavenger",r,68e5,1.25,"galaxy")},Neutronium(r){return f("scavenger",r,75e3,1.25,"galaxy")},Elerium(r){return f("scavenger",r,750,1.25,"galaxy")}},effect(){let r=kt("gxy_alien2"),a=Math.round(r*25e3),i=+ze($(this)[0].ship.helium).toFixed(2),s=e.race.cataclysm?`${t("galaxy_scavenger_effect2_cata",[+(r*100*.75).toFixed(1)])}
`:`${t("galaxy_scavenger_effect2",[+(r*100/4).toFixed(1)])}
`;return`${t("galaxy_scavenger_effect",[a])}
${s}${t("galaxy_alien2_support",[$(this)[0].support(),A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("spend",[i,e.resource.Helium_3.name])}
`},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},mil(){return 0},helium:12},s_type:"alien2",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("scavenger","galaxy"),re($(this)[0]),!0):!1}}},gxy_chthonian:{info:{name(){return t("galaxy_chthonian")},desc(){return t("galaxy_chthonian_desc",[A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},control(){return{name:A[e.galaxy.alien2.id].name,color:"danger"}}},chthonian_mission:{id:"galaxy-chthonian_mission",title(){return t("galaxy_alien2_mission",[t("galaxy_chthonian")])},desc(){return t("galaxy_alien2_mission_desc",[t("galaxy_chthonian")])},reqs:{chthonian:1},grant:["chthonian",2],queue_complete(){return e.tech.chthonian>=2?0:1},cost:{Custom(){if(e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_chthonian")){let r=0;return Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(a){r+=He.gxy_gateway[a].ship.rating()*e.galaxy.defense.gxy_chthonian[a]}),{label:t("galaxy_fleet_rating",[`1250 `]),met:!(r<1250)}}return{label:t("galaxy_fleet_rating",['1250 ']),met:!1}}},effect(){let r=0;e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_chthonian")&&Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(i){r+=He.gxy_gateway[i].ship.rating()*e.galaxy.defense.gxy_chthonian[i]});let a=r>=4500?`${t("galaxy_piracy_low")} `:r>=2500?`${t("galaxy_piracy_avg")} `:`${t("galaxy_piracy_high")} `;return`${t("galaxy_alien2_mission_effect2",[r])}
${t("galaxy_alien2_mission_effect3",[a])}
${t("galaxy_alien2_mission_effect",[t("galaxy_chthonian")])}
`},action(){if(u($(this)[0])){let r=0;if(Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(a){r+=He.gxy_gateway[a].ship.rating()*e.galaxy.defense.gxy_chthonian[a]}),r>=1250){let a=500,i=[];I(t("galaxy_chthonian_mission_result"),"info",!1,["progress"]),r>=2500&&(a=r>=4500?80:160),e.race.instinct&&(a/=2),Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(s){for(let n=0;n0&&(a-=He.gxy_gateway[s].ship.rating(),i.push(s))}),I(t("galaxy_chthonian_mission_result_losses",[i.map(s=>t(`galaxy_${s}`)).join(", ")]),"danger",!1,["progress"]);for(let s=0;s${t("galaxy_minelayer")}`},reqs:{chthonian:2},cost:{Money(r){return f("minelayer",r,9e6,1.25,"galaxy")},Iron(r){return f("minelayer",r,48e5,1.25,"galaxy")},Nano_Tube(r){return f("minelayer",r,125e4,1.25,"galaxy")},Nanoweave(r){return f("minelayer",r,1e5,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2);return`${t("requires_res",[t("galaxy_starbase")])}
${t("galaxy_defense_platform_effect",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},ship:{civ(){return 0},mil(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},helium:8,rating(){return e.race.banana?35:50}},powered(){return 0},action(){return u($(this)[0])?(ne("minelayer","galaxy"),e.galaxy.minelayer.on++,!0):!1},postPower(){D({el:"#gxy_chthonian"},"update")},post(){D({el:"#gxy_chthonian"},"update")}},excavator:{id:"galaxy-excavator",title:t("galaxy_excavator"),desc(){return`${t("galaxy_excavator")}
`},reqs:{chthonian:3},cost:{Money(r){return f("excavator",r,12e6,1.25,"galaxy")},Polymer(r){return f("excavator",r,44e5,1.25,"galaxy")},Iridium(r){return f("excavator",r,36e5,1.25,"galaxy")},Mythril(r){return f("excavator",r,18e4,1.25,"galaxy")}},effect(){let r=+T("excavator").toFixed(3);return`${t("gain",[r,t("resource_Orichalcum_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(8)},powerBalancer(){return[{r:"Orichalcum",p:T("excavator")}]},action(){return u($(this)[0])?(ne("excavator","galaxy"),re($(this)[0]),!0):!1}},raider:{id:"galaxy-raider",title:t("galaxy_raider"),desc(){return`${t("galaxy_raider")}
`},reqs:{chthonian:3},cost:{Money(r){return f("raider",r,12e6,1.25,"galaxy")},Titanium(r){return f("raider",r,125e4,1.25,"galaxy")},Bolognium(r){return f("raider",r,6e5,1.25,"galaxy")},Vitreloy(r){return f("raider",r,125e3,1.25,"galaxy")},Stanene(r){return f("raider",r,825e3,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2),a=kt("gxy_chthonian"),i=.65,s=.05,n=2.3,c=.8;return`${t("requires_res",[t("galaxy_starbase")])}
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("gain",[i,t("resource_Deuterium_name")])}
${t("gain",[s,t("resource_Vitreloy_name")])}
${t("gain",[n,t("resource_Polymer_name")])}
${t("gain",[c,t("resource_Neutronium_name")])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},ship:{civ(){return 0},mil(){return e.race.high_pop?b.high_pop.vars()[0]*2:2},helium:18,rating(){return e.race.banana?9:12}},powered(){return 0},action(){return u($(this)[0])?(ne("raider","galaxy"),e.galaxy.raider.on++,!0):!1},postPower(){D({el:"#gxy_chthonian"},"update")},post(){D({el:"#gxy_chthonian"},"update")}}}};function ba(r){let a="space";return r.substr(0,4)==="int_"?a="interstellar":r.substr(0,5)==="prtl_"?a="portal":r.substr(0,4)==="gxy_"?a="galaxy":r.substr(0,4)==="tau_"&&(a="tauceti"),a}function kt(r,a,i){if(e.tech.piracy&&!e.race.truepath){let s=0,n=["dreadnought","cruiser_ship","frigate_ship","corvette_ship","scout_ship"];for(let o=0;oc?c:s;return((1-(c-o)/c)*l+(1-l))*(a?1:kt("gxy_stargate"))}else{let o=s>c?c:s;return(1-(c-o)/c)*l+(1-l)}}else return 1}function Io(){let r=["protoplasm",e.race.species];e.city.hasOwnProperty("surfaceDwellers")&&r.push(...e.city.surfaceDwellers),e.custom.hasOwnProperty("race0")||r.push("custom");let a=Object.keys(A).filter(function(n){return!["demonic","eldritch"].includes(A[n].type)&&!r.includes(n)}),i=xs(a);e.galaxy.alien1={id:a[i]},r.push(a[i]),a=Object.keys(A).filter(function(n){return!["angelic"].includes(A[n].type)&&!r.includes(n)});let s=xs(a);e.galaxy.alien2={id:a[s]}}function Xs(){let r=1;return e.race.pack_rat&&(r*=1.05),e.stats.achieve.blackhole&&(r*=1+e.stats.achieve.blackhole.l*.05),r*=e.tech.world_control?2:1,r}var xu={satellite:{count:0},propellant_depot:{count:0},gps:{count:0},nav_beacon:{count:0,on:0},moon_base:{count:0,on:0,support:0,s_max:0},iridium_mine:{count:0,on:0},helium_mine:{count:0,on:0},observatory:{count:0,on:0},spaceport:{count:0,on:0,support:0,s_max:0},red_tower:{count:0,on:0},living_quarters:{count:0,on:0},vr_center:{count:0,on:0},garage:{count:0},red_mine:{count:0,on:0},fabrication:{count:0,on:0},red_factory:{count:0,on:0},exotic_lab:{count:0,on:0},ziggurat:{count:0},space_barracks:{count:0,on:0},biodome:{count:0,on:0},laboratory:{count:0,on:0},geothermal:{count:0,on:0},swarm_plant:{count:0},swarm_control:{count:0,support:0,s_max:0},swarm_satellite:{count:0},gas_mining:{count:0,on:0},gas_storage:{count:0},star_dock:{count:0,ship:0,probe:0,template:"human"},outpost:{count:0,on:0},drone:{count:0},oil_extractor:{count:0,on:0},space_station:{count:0,on:0,support:0,s_max:0},iridium_ship:{count:0,on:0},elerium_ship:{count:0,on:0},elerium_prospector:{count:0,on:0},iron_ship:{count:0,on:0},elerium_contain:{count:0,on:0},e_reactor:{count:0,on:0},world_collider:{count:0},world_controller:{count:0,on:0},starport:{count:0,on:0,support:0,s_max:0},mining_droid:{count:0,on:0,adam:0,uran:0,coal:0,alum:0},processing:{count:0,on:0},habitat:{count:0,on:0},fusion:{count:0,on:0},exchange:{count:0,on:0},warehouse:{count:0},xfer_station:{count:0,on:0},cargo_yard:{count:0},cruiser:{count:0,on:0},dyson:{count:0},nexus:{count:0,on:0,support:0,s_max:0},harvester:{count:0,on:0},far_reach:{count:0,on:0},stellar_engine:{count:0,mass:8,exotic:0},mass_ejector:{count:0,on:0,total:0,mass:0,Food:0,Lumber:0,Chrysotile:0,Stone:0,Crystal:0,Furs:0,Copper:0,Iron:0,Aluminium:0,Cement:0,Coal:0,Oil:0,Uranium:0,Steel:0,Titanium:0,Alloy:0,Polymer:0,Iridium:0,Helium_3:0,Deuterium:0,Neutronium:0,Adamantite:0,Infernite:0,Elerium:0,Nano_Tube:0,Graphene:0,Stanene:0,Bolognium:0,Vitreloy:0,Orichalcum:0,Plywood:0,Brick:0,Wrought_Iron:0,Sheet_Metal:0,Mythril:0,Aerogel:0,Nanoweave:0,Scarletite:0},stargate:{count:0},gateway_station:{count:0,on:0},s_gate:{count:0,on:0},starbase:{count:0,on:0,support:0,s_max:0},bolognium_ship:{count:0,on:0,crew:0},scout_ship:{count:0,on:0,crew:0,mil:0},corvette_ship:{count:0,on:0,crew:0,mil:0},frigate_ship:{count:0,on:0,crew:0,mil:0},cruiser_ship:{count:0,on:0,crew:0,mil:0},dreadnought:{count:0,on:0,crew:0,mil:0},foothold:{count:0,on:0,support:0,s_max:0},turret:{count:0,on:0},carport:{count:0,damaged:0,repair:0},war_droid:{count:0,on:0},repair_droid:{count:0,on:0},war_drones:{count:0,on:0},sensor_drone:{count:0,on:0},attractor:{count:0,on:0}};function ne(r,a){a||(a="space"),e[a][r]||(e[a][r]=xu[r]),e[a][r].count++}function Hi(r,a){return r&&a?Yt[r][a]:Yt}function Ko(){return Cr}function No(){return He}function sc(r,a,i){switch(r){case"space":return Dr(Yt,a,i);case"interstellar":return Dr(Cr,a,i);case"galaxy":return Dr(He,a,i)}}function Dr(r,a,i){let s=e.race.truepath?"truepath":"standard";if(r[a][i].hasOwnProperty("path")&&!r[a][i].path.includes(s))return!1;var n=!0;return Object.keys(r[a][i].reqs).forEach(function(c){(!e.tech[c]||e.tech[c]=r[a][i].grant[1]&&(n=!1),n}function Pt(){!e.settings.tabLoad&&e.settings.civTabs!==1||(Lo("inner"),e.race.truepath&&Lo("outer"),qi(),ac())}function Lo(r){if(r||(r=e.settings.spaceTabs===5?"outer":"inner"),!e.settings.tabLoad&&(e.settings.civTabs!==1||![1,5].includes(e.settings.spaceTabs)||e.settings.civTabs===1&&e.settings.spaceTabs===1&&r!=="inner"||e.settings.spaceTabs===5&&r!=="outer"))return;let a=r==="inner"?$("#space"):$("#outerSol");if(le(a),a.append($(`${t(r==="inner"?"tab_space":"tab_outer_space")} `)),!e.settings.showSpace)return!1;let i=[];Object.keys(Yt).forEach(function(s){e.race.orbit_decayed||e.race.cataclysm?s!=="spc_home"&&(i.push(s),(e.race.orbit_decayed&&s==="spc_red"||e.race.cataclysm&&s==="spc_moon")&&i.push("spc_home")):i.push(s)}),i.forEach(function(s){let n=s.replace("spc_","");if(e.settings.space[`${n}`]){if(e.race.truepath&&Yt[s].info.zone!==r)return;let c=typeof Yt[s].info.name=="string"?Yt[s].info.name:Yt[s].info.name(),l=!!(e.race.orbit_decayed||e.race.cataclysm);if(l&&s!=="spc_home"||!l){if(Yt[s].info.support){let o=Yt[s].info.support;e.space[o].hasOwnProperty("support")||(e.space[o].support=0,e.space[o].s_max=0),a.append(`
${c} {{ support }}/{{ s_max }} `),D({el:`#sr${s}`,data:e.space[o]})}else a.append(``);e.race.truepath&&Yt[s].info.hasOwnProperty("syndicate")&&Yt[s].info.syndicate()&&e.tech.syndicate&&($(`#${s}`).append(`
`),$(`#${s}synd`).append(`${t("space_syndicate")} `),$(`#${s}synd`).append(`${t("space_scan_effectiveness")} `),$(`#${s}synd`).append(`${t("space_overkill")} `),D({el:`#${s}synd`,data:e.space.syndicate,methods:{threat(o){if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){let d=yt(o,!0);if(d.s>=10)return d.s>=50?d.r:Math.round(d.r*d.s*.02)}return"???"},scan(o){return e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")?+((yt(o,!0).s+25)/1.25).toFixed(1)+"%":t("galaxy_piracy_none")},overkill(o){if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){let d=yt(o,!0);return d.s>=100?d.o:0}return 0}}}),Yt[s].info.hasOwnProperty("extra")&&Yt[s].info.extra(s))}pe(s,function(){return typeof Yt[s].info.desc=="string"?Yt[s].info.desc:Yt[s].info.desc()},{elm:`#${s} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(Yt[s]).forEach(function(o){if(o!=="info"&&Dr(Yt,s,o)){let d=Yt[s][o];Br(d,r==="inner"?"space":"outerSol",o)}})}})}function qi(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==2))return;let r=$("#interstellar");if(le(r),r.append($(`${t("tab_interstellar")} `)),!e.settings.showDeep)return!1;Object.keys(Cr).forEach(function(a){let i=a.replace("int_","");if(e.settings.space[`${i}`]){let s=typeof Cr[a].info.name=="string"?Cr[a].info.name:Cr[a].info.name();if(Cr[a].info.support){let n=Cr[a].info.support;e.interstellar[n].hasOwnProperty("support")||(e.interstellar[n].support=0,e.interstellar[n].s_max=0),r.append(`
${s} {{ support }}/{{ s_max }} `),D({el:`#sr${a}`,data:e.interstellar[n]})}else r.append(``);pe(a,function(){return typeof Cr[a].info.desc=="string"?Cr[a].info.desc:Cr[a].info.desc()},{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(Cr[a]).forEach(function(n){if(n!=="info"&&Dr(Cr,a,n)){let c=Cr[a][n];Br(c,"interstellar",n)}})}})}function ac(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==3))return;let r=$("#galaxy");if(le(r),r.append($(`${t("tab_galactic")} `)),!e.settings.showGalactic)return!1;ku(r,"fleet"),Object.keys(He).forEach(function(a){let i=a.replace("gxy_","");if(e.galaxy.defense&&!e.galaxy.defense.hasOwnProperty(a)&&(e.galaxy.defense[a]={}),e.settings.space[`${i}`]){let s=typeof He[a].info.name=="string"?He[a].info.name:He[a].info.name(),n=$(`
`);r.append(n);let c=$(`${s} `);n.append(c),e.tech.xeno&&e.tech.xeno>=3&&n.append(`{{ r.control().name }} `);let l={el:`#${a}`,data:{r:He[a].info},methods:{threat(o){let d=e.race.infiltrator?1:2;if(e.galaxy.defense[o].scout_ship>=d){let h=(1-kt(o,!0))*100;return h=h<1?Math.ceil(h):Math.round(h),h===0?"has-text-success":h<=20?"has-text-advanced":h<=40?"has-text-info":h<=60?"has-text-warning":h<=80?"has-text-caution":"has-text-danger"}return"has-text-danger"}},filters:{pirate(o){let d=e.race.infiltrator?1:2;if(e.galaxy.defense[o].scout_ship>=d){let h=(1-kt(o,!0))*100;h=h<1?Math.ceil(h):Math.round(h);let _=e.race.infiltrator?3:4;return e.galaxy.defense[o].scout_ship>=_?`${h}%`:h===0?t("galaxy_piracy_none"):h<=20?t("galaxy_piracy_vlow"):h<=40?t("galaxy_piracy_low"):h<=60?t("galaxy_piracy_avg"):h<=80?t("galaxy_piracy_high"):t("galaxy_piracy_vhigh")}return"???"},defense(o){return kt(o,!0,!0)}}};if(He[a].info.support){let o=He[a].info.support;e.galaxy[o]&&(e.galaxy[o].hasOwnProperty("support")||(e.galaxy[o].support=0,e.galaxy[o].s_max=0),n.append('{{ s.support }}/{{ s.s_max%1 ? s.s_max.toFixed(2) : s.s_max }} '),l.data.s=e.galaxy[o])}e.tech.piracy&&n.append(`${t("galaxy_piracy_threat",[A[e.galaxy.alien2.id].name])} {{ '${a}' | pirate }} | ${t("galaxy_armada")} : {{ '${a}' | defense }}
`),D(l),pe(a,function(){return typeof He[a].info.desc=="string"?He[a].info.desc:He[a].info.desc()},{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),pe(a,function(){return t("galaxy_control",[He[a].info.control().name,s])},{elm:`#${a} .regionControl`,classes:"has-background-light has-text-dark"}),Object.keys(He[a]).forEach(function(o){if(o!=="info"&&Dr(He,a,o)){let d=He[a][o];Br(d,"galaxy",o)}})}})}function ku(r,a){if(e.tech.piracy&&!e.race.truepath){let i=$(`
${t("galaxy_armada")} `);r.append(i);let s=e.tech.world_control?t("civics_garrison_peacekeepers"):t("civics_garrison_soldiers");i.append($("| ")),i.append($(`${s} {{ g.workers | stationed }} / {{ g.max | s_max }} `)),i.append($("| ")),i.append($(`${t("job_crew_mil")} {{ g.crew }} `)),i.append($("| ")),i.append($(`${t("job_crew_civ")} {{ c.workers }} / {{ c.max }} `)),D({el:`#h${a}`,data:{g:e.civic.garrison,c:e.civic.crew},filters:{stationed(o){return We()},s_max(o){return We(!0)}}}),["soldier","crew1","crew2"].forEach(function(o){pe(`h${a}${o}`,function(){switch(o){case"soldier":return Tn();case"crew1":return t("civics_garrison_crew_desc");case"crew2":return t("job_crew_desc")}},{elm:`#h${a} span.${o}`})});let n=$(`
`);r.append(n);let c=["scout_ship","corvette_ship","frigate_ship","cruiser_ship","dreadnought"],l=[];for(let o=0;o<6;o++){let d=$('
');l.push(d),n.append(d)}for(let o=0;o${He.gxy_gateway[c[o]].title}`);l[o+1].append(d)}l[0].append($(" ")),l[0].append($(`${He.gxy_gateway.info.name} `));for(let o=0;o{{ gateway.${c[o]} }}`);l[o+1].append(d)}Object.keys(e.galaxy.defense).forEach(function(o){let d=o.substring(4);if(e.settings.space[d]&&d!=="gateway"){let h=$(`${typeof He[o].info.name=="string"?He[o].info.name:He[o].info.name()} `);l[0].append(h);for(let _=0;_'),w=$(`« `),M=$(`{{ ${d}.${c[_]} }} `),F=$(`» `);l[_+1].append(m),m.append(w),m.append(M),m.append(F)}}}),D({el:`#${a}`,data:{stargate:e.galaxy.defense.gxy_stargate,gateway:e.galaxy.defense.gxy_gateway,gorddon:e.galaxy.defense.gxy_gorddon,alien1:e.galaxy.defense.gxy_alien1,alien2:e.galaxy.defense.gxy_alien2,chthonian:e.galaxy.defense.gxy_chthonian,t:e.tech},methods:{sub(o,d){if(e.galaxy.defense[o][d]>0){let h=fe();h>e.galaxy.defense[o][d]&&(h=e.galaxy.defense[o][d]),e.galaxy.defense.gxy_gateway[d]+=h,e.galaxy.defense[o][d]-=h}},add(o,d){if(e.galaxy.defense.gxy_gateway[d]>0){let h=fe();h>e.galaxy.defense.gxy_gateway[d]&&(h=e.galaxy.defense.gxy_gateway[d]),e.galaxy.defense.gxy_gateway[d]-=h,e.galaxy.defense[o][d]+=h}}}}),Object.keys(e.galaxy.defense).forEach(function(o){let d=o.substring(4);e.settings.space[d]&&pe(`armada${d}`,function(){return`${typeof He[o].info.desc=="string"?He[o].info.desc:He[o].info.desc()}
`})});for(let o=0;o=5&&U.iron_ship&&(r*=.95**U.iron_ship),r}function Zs(r){if(e.space.swarm_plant){let a=e.tech.swarm?.88:.94;e.tech.swarm>=3&&(a-=xt/100),a<.05&&(a=.05),r*=a**e.space.swarm_plant.count}return r}function Ae(r,a,i){if(i=i||{},e.race.universe==="heavy"&&(r*=1.25+.5*ft("heavy")),e.race.truepath&&(r*=a?2.5:1.25),e.city.mass_driver&&k.mass_driver){let s=e.race.truepath?.94:.95;r*=s**k.mass_driver}else i.mass_driver&&(r*=.95**i.mass_driver);return e.stats.achieve.heavyweight&&(r*=.96**e.stats.achieve.heavyweight.l),e.city.ptrait.includes("dense")&&(r*=Re.dense.vars()[2]),e.race.cataclysm&&(r*=.2),e.race.heavy&&(r*=1+b.heavy.vars()[0]/100),e.race.gravity_well&&(r*=1.35+9.65*ft("heavy")),Ve("launch_day")&&(r*=.95),r}function ze(r){return e.race.universe==="heavy"&&(r*=1.2+.3*ft("heavy")),e.stats.achieve.heavyweight&&(r*=.96**e.stats.achieve.heavyweight.l),e.race.heavy&&(r*=1+b.heavy.vars()[0]/100),Ve("launch_day")&&(r*=.95),r}function Do(){let r=1;if(e.space.ziggurat&&e.space.ziggurat.count>0){let a=e.tech.ancient_study?.006:.004;if(e.tech.ancient_deify&&e.tech.ancient_deify>=2&&U.exotic_lab&&(a+=1e-4*U.exotic_lab),e.civic.govern.type==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let i=2e-5;e.race.high_pop&&(i=xe(i)),a+=i*e.civic.priest.workers}e.race.ooze&&(a*=1-b.ooze.vars()[1]/100),e.race.high_pop&&(a=xe(a)),r+=e.space.ziggurat.count*e.civic.colonist.workers*a}return r}function W(){let r={red:A[e.race.species].solar.red,hell:A[e.race.species].solar.hell,gas:A[e.race.species].solar.gas,gas_moon:A[e.race.species].solar.gas_moon,dwarf:A[e.race.species].solar.dwarf,titan:Mi[A[e.race.species].type].solar.titan,enceladus:Mi[A[e.race.species].type].solar.enceladus,triton:Mi[A[e.race.species].type].solar.triton,eris:Mi[A[e.race.species].type].solar.eris};if(e.race.species==="custom")for(let a of["titan","enceladus","triton","eris"])e.custom.race0.hasOwnProperty(a)&&(r[a]=e.custom.race0[a]);return r}var Dt=["l","h","a","e","m","mg"],Rr={standard:{name:t("universe_standard"),desc:t("universe_standard_desc"),effect:t("universe_standard_effect")},heavy:{name:t("universe_heavy"),desc:t("universe_heavy_desc"),effect:t("universe_heavy_effect",[5])},antimatter:{name:t("universe_antimatter"),desc:t("universe_antimatter_desc"),effect:t("universe_antimatter_effect")},evil:{name:t("universe_evil"),desc:t("universe_evil_desc"),effect:t("universe_evil_effect")},micro:{name:t("universe_micro"),desc:t("universe_micro_desc"),effect:t("universe_micro_effect",[75])},magic:{name:t("universe_magic"),desc:t("universe_magic_desc"),effect:t("universe_magic_effect")}};function nc(){let r=[];if(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=4&&e.custom.hasOwnProperty("planet")&&Object.keys(Rr).forEach(function(a){let i=ot(a);e.custom.planet.hasOwnProperty(i)&&e.custom.planet[i].s&&r.push(`${i}:s`)}),e.race.geck&&e.race.geck>0){let a=$(`${t("gecks_remaining")} : {{ geck }}
`);$("#evolution").append(a),D({el:"#geck",data:e.race})}if(e.race.probes===0)ic({custom:r});else{let a=!1;for(let i=0;i`),c=$(`${Rr[i].name} `);n.append(c),$("#evolution").append(n),$("#"+s).on("click",function(){e.race.universe=i,le($("#evolution")),nc(),Ie()}),pe(s,function(l){l.popper.append($(`${Rr[i].name}
`)),l.popper.append($(`${Rr[i].desc}
`)),l.popper.append($(`${Rr[i].effect}
`))},{classes:"has-background-light has-text-dark"})}}function vs(r){!r&&!e.race.noexport&&(Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ie(`biome_${e.city.biome}`),ie(`genus_${A[e.race.species].type}`),e.race.witch_hunter&&e.race.universe==="magic"?ie("soul_sponge"):(ie("ascended"),e.interstellar.thermal_collector.count===0&&De("energetic")),e.race.species==="junker"&&De("the_misery"),!e.race.modified&&e.race.junker&&e.race.species==="junker"&&De("garbage_pie"),e.race.emfield&&ie("technophobe"),e.race.cataclysm&&De("finish_line"),e.race.noexport="Race",le($("#city")),e.settings.showCity=!0,e.settings.showCivic=!1,e.settings.showResearch=!1,e.settings.showResources=!1,e.settings.showGenetics=!1,e.settings.showSpace=!1,e.settings.showDeep=!1,e.settings.showGalactic=!1,e.settings.showPortal=!1,e.settings.spaceTabs=0);let a=$('
'),i={ascended:{},technophobe:e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l?e.stats.achieve.technophobe.l:0};if(r?r.append(a):$("#city").append(a),a.append(`
${t("genelab_title")} - ${t("genelab_genes")} {{ g.genes }} - ${t("trait_untapped_name")}: {{ g.genes | untapped }} `),r){a.append(`
${t("achieve_ascended_name")}
- `);let x=$("
");a.append(x),Object.keys(Rr).forEach(function(j){i.ascended[j]=e.stats.achieve.ascended&&e.stats.achieve.ascended.hasOwnProperty(it(j))?e.stats.achieve.ascended[it(j)]:0,x.append(`
+ `);let x=$("
");a.append(x),Object.keys(Rr).forEach(function(j){i.ascended[j]=e.stats.achieve.ascended&&e.stats.achieve.ascended.hasOwnProperty(ot(j))?e.stats.achieve.ascended[ot(j)]:0,x.append(`
${t("universe_"+j)}
`)}),a.append(`
${t("achieve_technophobe_name")}
@@ -513,7 +513,7 @@
${t("genelab_titan")}
${t("genelab_enceladus")}
${t("genelab_triton")}
- ${t("genelab_eris")}
`);a.append(c);let l=$('
');a.append(l);let o=!1,d=`${t("genelab_genus")}
`;Object.keys(Er).forEach(function(x){(r||e.stats.achieve[`genus_${x}`]&&e.stats.achieve[`genus_${x}`].l>0)&&(o||(o=x),d=d+`${t(`genelab_genus_${x}`)}
`)}),d=d+" ",l.append($(d));let h=`${t("genelab_traits")}
`,_="",m={};Object.keys(F).forEach(function(x){let j=F[x].type;(r||e.stats.achieve[`extinct_${x}`]&&e.stats.achieve[`extinct_${x}`].l>0||e.stats.achieve[`genus_${j}`]&&e.stats.achieve[`genus_${j}`].l>0)&&F[x].hasOwnProperty("traits")&&Object.keys(F[x].traits).forEach(function(B){B!=="ooze"&&(m[B]=!0)})}),Object.keys(m).sort().forEach(function(x){b.hasOwnProperty(x)&&b[x].type==="major"&&(b[x].val>=0?h=h+`${t(`trait_${x}_name`)} ({{ '${x}' | cost }} )
`:_=_+`${t(`trait_${x}_name`)} ({{ '${x}' | cost }} )
`)}),h=h+_+" ",l.append($(h));let w=`
+ ${t("genelab_eris")}
`);a.append(c);let l=$('
');a.append(l);let o=!1,d=`${t("genelab_genus")}
`;Object.keys(Er).forEach(function(x){(r||e.stats.achieve[`genus_${x}`]&&e.stats.achieve[`genus_${x}`].l>0)&&(o||(o=x),d=d+`${t(`genelab_genus_${x}`)}
`)}),d=d+" ",l.append($(d));let h=`${t("genelab_traits")}
`,_="",m={};Object.keys(A).forEach(function(x){let j=A[x].type;(r||e.stats.achieve[`extinct_${x}`]&&e.stats.achieve[`extinct_${x}`].l>0||e.stats.achieve[`genus_${j}`]&&e.stats.achieve[`genus_${j}`].l>0)&&A[x].hasOwnProperty("traits")&&Object.keys(A[x].traits).forEach(function(B){B!=="ooze"&&(m[B]=!0)})}),Object.keys(m).sort().forEach(function(x){b.hasOwnProperty(x)&&b[x].type==="major"&&(b[x].val>=0?h=h+`${t(`trait_${x}_name`)} ({{ '${x}' | cost }} )
`:_=_+`${t(`trait_${x}_name`)} ({{ '${x}' | cost }} )
`)}),h=h+_+" ",l.append($(h));let w=`
${t("genelab_reset")}
@@ -530,7 +530,7 @@
${t("genelab_create")}
- `),a.append(w);var M=e.hasOwnProperty("custom")&&e.custom.hasOwnProperty("race0")?{name:e.custom.race0.name,desc:e.custom.race0.desc,entity:e.custom.race0.entity,home:e.custom.race0.home,red:e.custom.race0.red,hell:e.custom.race0.hell,gas:e.custom.race0.gas,gas_moon:e.custom.race0.gas_moon,dwarf:e.custom.race0.dwarf,titan:e.custom.race0.titan||W().titan,enceladus:e.custom.race0.enceladus||W().enceladus,triton:e.custom.race0.triton||W().triton,eris:e.custom.race0.eris||W().eris,genes:0,genus:e.custom.race0.genus,traitlist:e.custom.race0.traits}:{name:"Zombie",desc:"Zombies aren't so much a species as they are the shambling remains of a race who succumbed to a nightmarish virus. Yet somehow they continue to drone on.",entity:"rotting bipedal creatures",home:"Grave",red:"Brains",hell:"Rigor Mortis",gas:"Decompose",gas_moon:"Bones",dwarf:"Double Tap",titan:"Necromancer",enceladus:"Skeleton",triton:"Rot",eris:"Zombieland",genes:10,genus:o,traitlist:[]};for(let x=M.traitlist.length-1;x>=0;x--)(!b.hasOwnProperty(M.traitlist[x])||b[M.traitlist[x]].type!=="major")&&M.traitlist.splice(x,1);M.genes=ni(M,r?i:!1);let A={msg:""};D({el:"#celestialLab",data:{g:M,w:i,err:A},methods:{val(x){x==="technophobe"?i.technophobe<0?i.technophobe=0:i.technophobe>5&&(i.technophobe=5):i.ascended[x]<0?i.ascended[x]=0:i.ascended[x]>5&&(i.ascended[x]=5)},geneEdit(){M.genes=ni(M,r?i:!1)},setRace(){ni(M)>=0&&M.name.length>0&&M.desc.length>0&&M.entity.length>0&&M.home.length>0&&M.red.length>0&&M.hell.length>0&&M.gas.length>0&&M.gas_moon.length>0&&M.dwarf.length>0&&(e.custom.race0={name:M.name,desc:M.desc,entity:M.entity,home:M.home,red:M.red,hell:M.hell,gas:M.gas,gas_moon:M.gas_moon,dwarf:M.dwarf,titan:M.titan,enceladus:M.enceladus,triton:M.triton,eris:M.eris,genus:M.genus,traits:M.traitlist},ao())},allowed(x){return M.genus!=="synthetic"&&["deconstructor","imitation"].includes(x)?(M.traitlist.includes(x)&&M.traitlist.splice(M.traitlist.indexOf(x),1),!0):!1},reset(){M.name="",M.desc="",M.entity="",M.home="",M.red="",M.hell="",M.gas="",M.gas_moon="",M.dwarf="",M.titan="",M.enceladus="",M.triton="",M.eris="",M.genus=o,M.traitlist=[],M.genes=ni(M,r?i:!1)},customImport(){let x=document.getElementById("customFile").files[0];if(x){let j=new FileReader;j.readAsText(x,"UTF-8"),j.onload=function(B){let S="";try{S=JSON.parse(B.target.result)}catch{A.msg=t("string_pack_error",[x.name]);return}let Q=!1;if(Object.keys(M).forEach(function(ce){if(S[ce]&&typeof M[ce]!=typeof S[ce]){Q=!0;return}}),Q){A.msg=t("string_pack_error",[x.name]),console.log("format fail");return}Object.keys(M).forEach(function(ce){S[ce]&&(M[ce]=S[ce])}),["name","home","red","hell","gas","gas_moon","dwarf","titan","enceladus","triton","eris"].forEach(function(ce){!S[ce]&&["titan","enceladus","triton","eris"].includes(ce)?M[ce]=t(`genus_${M.genus}_solar_${ce}`):M[ce].length>20&&(M[ce]=M[ce].substring(0,20))}),M.entity.length>40&&(M.entity=M.entity.substring(0,40)),M.desc.length>255&&(M.desc=M.desc.substring(0,255)),!r&&!(e.stats.achieve[`genus_${M.genus}`]&&e.stats.achieve[`genus_${M.genus}`].l>0)&&(M.genus=o);let V=[];for(let ce=0;ce{let Q=document.createElement("a"),V=new Blob([j],{type:S});Q.href=URL.createObjectURL(V),Q.download=B,Q.click(),URL.revokeObjectURL(Q.href)})(JSON.stringify(M,null,4),`evolve-custom-${M.name}.txt`,"text/plain")}},filters:{cost(x){if(b[x].val>=0){let j=2;r?j+=i.technophobe:e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=1&&(j+=e.stats.achieve.technophobe.l);let B=b[x].val,S=0;for(let Q=0;Q=0&&S++;return M.traitlist.includes(x)&&S--,S>j&&(B+=S-j),B}else return b[x].val},untapped(x){return`+${x>0?+((x/(x+20)/10+24e-5)*100).toFixed(3):0}%`}}}),Object.keys(Er).forEach(function(x){e.stats.achieve[`genus_${x}`]&&e.stats.achieve[`genus_${x}`].l>0&&pe(`celestialLabgenusSelection${x}`,function(){let j=$(`${t(`genelab_genus_${x}_desc`)}
`);return Object.keys(Er[x]).forEach(function(B){if(b[B]){let S=$("
");vi(S,B,{trank:1}),j.append(S)}}),j},{elm:`#celestialLab .genus_selection .${x}`,classes:"w30",wide:!0})}),Object.keys(m).sort().forEach(function(x){b.hasOwnProperty(x)&&b[x].type==="major"&&pe(`celestialLabtraitSelection${x}`,function(){let j=$("
");return vi(j,x,{trank:1}),j},{elm:`#celestialLab .trait_selection .t${x}`,classes:"w30",wide:!0})})}function Jn(r){!r&&!e.race.noexport&&(Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ie(`biome_${e.city.biome}`),ie(`genus_${F[e.race.species].type}`),ie("lamentis"),e.race.species==="junker"&&De("the_misery"),e.race.noexport="Planet",le($("#city")),e.settings.showCity=!0,e.settings.showCivic=!1,e.settings.showResearch=!1,e.settings.showResources=!1,e.settings.showGenetics=!1,e.settings.showSpace=!1,e.settings.showDeep=!1,e.settings.showGalactic=!1,e.settings.showPortal=!1,e.settings.spaceTabs=0);let a=$('
'),i={ascended:{},lamentis:e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l?e.stats.achieve.lamentis.l:0};r?r.append(a):$("#city").append(a),a.append(`
${t("planetlab_title")} - ${t("planetlab_points")} {{ p.pts }} `);let s=$('
');a.append(s);let n=!1,c=`${t("wiki_planet_biome")}
`;Object.keys(qe).forEach(function(w){(r||e.stats.achieve[`biome_${w}`]&&e.stats.achieve[`biome_${w}`].l>0)&&(n||(n=w),c=c+`${qe[w].label}
`)}),c=c+" ",s.append($(c));let l=`${t("wiki_planet_trait")}
`;Object.keys(Re).forEach(function(w){(r||e.stats.achieve[`atmo_${w}`]&&e.stats.achieve[`atmo_${w}`].l>0)&&(l=l+`${Re[w].label}
`)}),l=l+" ",s.append($(l));let o={},d=["Copper","Iron","Aluminium","Coal","Oil","Titanium","Uranium"];e.stats.achieve.whitehole&&d.push("Iridium");let h=`${t("planetlab_res")}
`;d.forEach(function(w){o[w]=0,h=h+`${e.resource[w].name}
`,h=h+`- `,h=h+` `,h=h+`+ `,h=h+"
"}),h=h+" ",s.append($(h));let _={biome:n,pts:0,traitlist:[],geology:o,orbit:e.city.calendar.orbit};if(e.custom.hasOwnProperty("planet")){let w=it();if(e.custom.planet.hasOwnProperty(w)){let M="s";e.custom.planet[w][M]&&(_=Ke(e.custom.planet[w][M]),_.orbit=e.city.calendar.orbit,d.forEach(function(A){_.geology.hasOwnProperty(A)?_.geology[A]*=100:_.geology[A]=0}))}}_.pts=Js(_,r?i:!1);let m=`
+ `),a.append(w);var M=e.hasOwnProperty("custom")&&e.custom.hasOwnProperty("race0")?{name:e.custom.race0.name,desc:e.custom.race0.desc,entity:e.custom.race0.entity,home:e.custom.race0.home,red:e.custom.race0.red,hell:e.custom.race0.hell,gas:e.custom.race0.gas,gas_moon:e.custom.race0.gas_moon,dwarf:e.custom.race0.dwarf,titan:e.custom.race0.titan||W().titan,enceladus:e.custom.race0.enceladus||W().enceladus,triton:e.custom.race0.triton||W().triton,eris:e.custom.race0.eris||W().eris,genes:0,genus:e.custom.race0.genus,traitlist:e.custom.race0.traits}:{name:"Zombie",desc:"Zombies aren't so much a species as they are the shambling remains of a race who succumbed to a nightmarish virus. Yet somehow they continue to drone on.",entity:"rotting bipedal creatures",home:"Grave",red:"Brains",hell:"Rigor Mortis",gas:"Decompose",gas_moon:"Bones",dwarf:"Double Tap",titan:"Necromancer",enceladus:"Skeleton",triton:"Rot",eris:"Zombieland",genes:10,genus:o,traitlist:[]};for(let x=M.traitlist.length-1;x>=0;x--)(!b.hasOwnProperty(M.traitlist[x])||b[M.traitlist[x]].type!=="major")&&M.traitlist.splice(x,1);M.genes=ni(M,r?i:!1);let F={msg:""};D({el:"#celestialLab",data:{g:M,w:i,err:F},methods:{val(x){x==="technophobe"?i.technophobe<0?i.technophobe=0:i.technophobe>5&&(i.technophobe=5):i.ascended[x]<0?i.ascended[x]=0:i.ascended[x]>5&&(i.ascended[x]=5)},geneEdit(){M.genes=ni(M,r?i:!1)},setRace(){ni(M)>=0&&M.name.length>0&&M.desc.length>0&&M.entity.length>0&&M.home.length>0&&M.red.length>0&&M.hell.length>0&&M.gas.length>0&&M.gas_moon.length>0&&M.dwarf.length>0&&(e.custom.race0={name:M.name,desc:M.desc,entity:M.entity,home:M.home,red:M.red,hell:M.hell,gas:M.gas,gas_moon:M.gas_moon,dwarf:M.dwarf,titan:M.titan,enceladus:M.enceladus,triton:M.triton,eris:M.eris,genus:M.genus,traits:M.traitlist},ao())},allowed(x){return M.genus!=="synthetic"&&["deconstructor","imitation"].includes(x)?(M.traitlist.includes(x)&&M.traitlist.splice(M.traitlist.indexOf(x),1),!0):!1},reset(){M.name="",M.desc="",M.entity="",M.home="",M.red="",M.hell="",M.gas="",M.gas_moon="",M.dwarf="",M.titan="",M.enceladus="",M.triton="",M.eris="",M.genus=o,M.traitlist=[],M.genes=ni(M,r?i:!1)},customImport(){let x=document.getElementById("customFile").files[0];if(x){let j=new FileReader;j.readAsText(x,"UTF-8"),j.onload=function(B){let S="";try{S=JSON.parse(B.target.result)}catch{F.msg=t("string_pack_error",[x.name]);return}let Q=!1;if(Object.keys(M).forEach(function(ce){if(S[ce]&&typeof M[ce]!=typeof S[ce]){Q=!0;return}}),Q){F.msg=t("string_pack_error",[x.name]),console.log("format fail");return}Object.keys(M).forEach(function(ce){S[ce]&&(M[ce]=S[ce])}),["name","home","red","hell","gas","gas_moon","dwarf","titan","enceladus","triton","eris"].forEach(function(ce){!S[ce]&&["titan","enceladus","triton","eris"].includes(ce)?M[ce]=t(`genus_${M.genus}_solar_${ce}`):M[ce].length>20&&(M[ce]=M[ce].substring(0,20))}),M.entity.length>40&&(M.entity=M.entity.substring(0,40)),M.desc.length>255&&(M.desc=M.desc.substring(0,255)),!r&&!(e.stats.achieve[`genus_${M.genus}`]&&e.stats.achieve[`genus_${M.genus}`].l>0)&&(M.genus=o);let V=[];for(let ce=0;ce
{let Q=document.createElement("a"),V=new Blob([j],{type:S});Q.href=URL.createObjectURL(V),Q.download=B,Q.click(),URL.revokeObjectURL(Q.href)})(JSON.stringify(M,null,4),`evolve-custom-${M.name}.txt`,"text/plain")}},filters:{cost(x){if(b[x].val>=0){let j=2;r?j+=i.technophobe:e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=1&&(j+=e.stats.achieve.technophobe.l);let B=b[x].val,S=0;for(let Q=0;Q=0&&S++;return M.traitlist.includes(x)&&S--,S>j&&(B+=S-j),B}else return b[x].val},untapped(x){return`+${x>0?+((x/(x+20)/10+24e-5)*100).toFixed(3):0}%`}}}),Object.keys(Er).forEach(function(x){e.stats.achieve[`genus_${x}`]&&e.stats.achieve[`genus_${x}`].l>0&&pe(`celestialLabgenusSelection${x}`,function(){let j=$(`${t(`genelab_genus_${x}_desc`)}
`);return Object.keys(Er[x]).forEach(function(B){if(b[B]){let S=$("
");vi(S,B,{trank:1}),j.append(S)}}),j},{elm:`#celestialLab .genus_selection .${x}`,classes:"w30",wide:!0})}),Object.keys(m).sort().forEach(function(x){b.hasOwnProperty(x)&&b[x].type==="major"&&pe(`celestialLabtraitSelection${x}`,function(){let j=$("
");return vi(j,x,{trank:1}),j},{elm:`#celestialLab .trait_selection .t${x}`,classes:"w30",wide:!0})})}function Jn(r){!r&&!e.race.noexport&&(Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ie(`biome_${e.city.biome}`),ie(`genus_${A[e.race.species].type}`),ie("lamentis"),e.race.species==="junker"&&De("the_misery"),e.race.noexport="Planet",le($("#city")),e.settings.showCity=!0,e.settings.showCivic=!1,e.settings.showResearch=!1,e.settings.showResources=!1,e.settings.showGenetics=!1,e.settings.showSpace=!1,e.settings.showDeep=!1,e.settings.showGalactic=!1,e.settings.showPortal=!1,e.settings.spaceTabs=0);let a=$('
'),i={ascended:{},lamentis:e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l?e.stats.achieve.lamentis.l:0};r?r.append(a):$("#city").append(a),a.append(`
${t("planetlab_title")} - ${t("planetlab_points")} {{ p.pts }} `);let s=$('
');a.append(s);let n=!1,c=`${t("wiki_planet_biome")}
`;Object.keys(qe).forEach(function(w){(r||e.stats.achieve[`biome_${w}`]&&e.stats.achieve[`biome_${w}`].l>0)&&(n||(n=w),c=c+`${qe[w].label}
`)}),c=c+" ",s.append($(c));let l=`${t("wiki_planet_trait")}
`;Object.keys(Re).forEach(function(w){(r||e.stats.achieve[`atmo_${w}`]&&e.stats.achieve[`atmo_${w}`].l>0)&&(l=l+`${Re[w].label}
`)}),l=l+" ",s.append($(l));let o={},d=["Copper","Iron","Aluminium","Coal","Oil","Titanium","Uranium"];e.stats.achieve.whitehole&&d.push("Iridium");let h=`${t("planetlab_res")}
`;d.forEach(function(w){o[w]=0,h=h+`${e.resource[w].name}
`,h=h+`- `,h=h+` `,h=h+`+ `,h=h+"
"}),h=h+" ",s.append($(h));let _={biome:n,pts:0,traitlist:[],geology:o,orbit:e.city.calendar.orbit};if(e.custom.hasOwnProperty("planet")){let w=ot();if(e.custom.planet.hasOwnProperty(w)){let M="s";e.custom.planet[w][M]&&(_=Ke(e.custom.planet[w][M]),_.orbit=e.city.calendar.orbit,d.forEach(function(F){_.geology.hasOwnProperty(F)?_.geology[F]*=100:_.geology[F]=0}))}}_.pts=Js(_,r?i:!1);let m=`",a.append(m),D({el:"#celestialLab",data:{p:_,w:i},methods:{pEdit(){_.pts=Js(_,r?i:!1)},setPlanet(){if(Js(_)>=0){Object.keys(_.geology).forEach(function(A){_.geology[A]===0?delete _.geology[A]:_.geology[A]/=100}),e.custom.hasOwnProperty("planet")||(e.custom.planet={});let w=it();e.custom.planet.hasOwnProperty(w)||(e.custom.planet[w]={s:!1});let M="s";e.custom.planet[w][M]=Ke(_),delete e.custom.planet[w][M].pts,io(_)}},reset(){_.traitlist=[],Object.keys(_.geology).forEach(function(w){_.geology[w]=0}),_.pts=Js(_,r?i:!1)},less(w){_.geology[w]-=fe(),_.geology[w]<-20&&(_.geology[w]=-20)},more(w){_.geology[w]+=fe();let M=30;e.stats.achieve.whitehole&&(M+=e.stats.achieve.whitehole.l*5),_.biome==="eden"&&(M+=5),_.geology[w]>M&&(_.geology[w]=M)}},filters:{res(w){return _.geology[w]}}})}function Js(r,a){let i=(r.biome==="eden"?0:10)+(e.stats.achieve.lamentis?e.stats.achieve.lamentis.l*10:0);e.race.truepath&&(i*=2),i-=r.traitlist.length**3;let s=0;return Object.keys(r.geology).forEach(function(n){r.geology[n]!==0&&(i-=r.geology[n],s++)}),s>3&&(i-=(s-3)**2),i}var si={unemployed:function(r){let a=t("job_unemployed_desc");return e.civic.d_job==="unemployed"&&!r&&(a=a+" "+t("job_default",[t("job_unemployed")])),a},hunter:function(r){let a=t("job_hunter_desc",[e.resource.Food.name]);return e.race.unfathomable&&(a=t("job_eld_hunter_desc")),e.race.artifical?a=e.race.soul_eater?t("job_art_demon_hunter_desc",[e.resource.Furs.name,e.resource.Lumber.name]):t("job_art_hunter_desc",[e.resource.Furs.name]):e.race.soul_eater&&e.race.species!=="wendigo"&&(a=t(e.race.evil?"job_evil_hunter_desc":"job_not_evil_hunter_desc",[e.resource.Food.name,e.resource.Lumber.name,e.resource.Furs.name])),e.civic.d_job==="hunter"&&!r&&(a=a+" "+t("job_default",[e.race.unfathomable?t("job_raider"):t("job_hunter")])),a},forager:function(r){let a=t("job_forager_desc");return e.civic.d_job==="forager"&&!r&&(a=a+" "+t("job_default",[t("job_forager")])),a},farmer:function(r){let a=+Oi(!0,r).toFixed(2),i=+Oi(!1,r).toFixed(2);r||(a=+ye(a,"farmer").toFixed(2),i=+ye(i,"farmer").toFixed(2));let s=e.race.high_pop&&!r?t("job_farmer_desc_hp",[a,e.resource.Food.name,N(1),i,N(1)*e.city.farm.count]):t("job_farmer_desc",[a,e.resource.Food.name,e.city.farm.count,i]);return e.civic.d_job==="farmer"&&!r&&(s=s+" "+t("job_default",[t("job_farmer")])),s},lumberjack:function(r){let a=r&&e.race.servants?e.race.servants.jobs.lumberjack:e.civic.lumberjack.workers,i=e.civic.lumberjack.impact;if(r||(a=+ye(a,"lumberjack").toFixed(2),i=+ye(i,"lumberjack").toFixed(2)),e.race.evil&&(!e.race.soul_eater||e.race.species==="wendigo")){let s=1;r||(s*=$t(a,"lumberjack"));let n=+(i*s).toFixed(2),c=+(i/4*s).toFixed(2),l=e.race.species==="wendigo"?t("job_reclaimer_desc2",[n]):t("job_reclaimer_desc",[n,c]);return e.civic.d_job==="lumberjack"&&!r&&(l=l+" "+t("job_default",[t("job_reclaimer")])),l}else{let s=(e.tech.axe&&e.tech.axe>0?(e.tech.axe-1)*.35:0)+1;r||(s*=$t(a,"lumberjack")),e.city.biome==="forest"&&(i*=qe.forest.vars()[0]),e.city.biome==="savanna"&&(i*=qe.savanna.vars()[2]),e.city.biome==="desert"&&(i*=qe.desert.vars()[2]),e.city.biome==="swamp"&&(i*=qe.swamp.vars()[2]),e.city.biome==="taiga"&&(i*=qe.taiga.vars()[0]);let n=+(i*s).toFixed(2),c=t("job_lumberjack_desc",[n,e.resource.Lumber.name]);return e.civic.d_job==="lumberjack"&&!r&&(c=c+" "+t("job_default",[t("job_lumberjack")])),c}},quarry_worker:function(r){let a=r&&e.race.servants?e.race.servants.jobs.quarry_worker:e.civic.quarry_worker.workers,i=e.civic.quarry_worker.impact;r||(a=+ye(a,"quarry_worker").toFixed(2),i=+ye(i,"quarry_worker").toFixed(2));let s=(e.tech.hammer&&e.tech.hammer>0?e.tech.hammer*.4:0)+1;r||(s*=$t(a,"miner")),e.city.biome==="desert"&&(s*=qe.desert.vars()[0]),e.city.biome==="swamp"&&(s*=qe.swamp.vars()[3]),e.tech.explosives&&e.tech.explosives>=2&&(s*=e.tech.explosives>=3?1.75:1.5);let n=+(i*s).toFixed(1),c=e.resource.Aluminium.display?t("job_quarry_worker_desc2",[n,e.resource.Stone.name,e.resource.Aluminium.name]):t("job_quarry_worker_desc1",[n,e.resource.Stone.name]);return e.race.smoldering&&(c=c+" "+t("job_quarry_worker_smoldering",[e.resource.Chrysotile.name])),e.civic.d_job==="quarry_worker"&&!r&&(c=c+" "+t("job_default",[t("job_quarry_worker")])),c},crystal_miner:function(r){let a=r&&e.race.servants?e.race.servants.jobs.crystal_miner:e.civic.crystal_miner.workers,i=e.civic.crystal_miner.impact,s=1;r||(a=+ye(a,"crystal_miner").toFixed(2),i=+ye(i,"crystal_miner").toFixed(2),s*=$t(a,"miner"));let n=+(i*s).toFixed(2),c=t("job_crystal_miner_desc",[n,e.resource.Crystal.name]);return e.civic.d_job==="crystal_miner"&&!r&&(c=c+" "+t("job_default",[t("job_crystal_miner")])),c},scavenger:function(r){let a=b.scavenger.vars()[0];e.city.ptrait.includes("trashed")&&e.race.scavenger&&(a*=1+b.scavenger.vars()[1]/100),e.race.high_pop&&!r&&(a*=b.high_pop.vars()[1]/100),r||(a=+ye(a,"scavenger").toFixed(2));let i=t("job_scavenger_desc",[F[e.race.species].home,a]);return e.civic.d_job==="scavenger"&&!r&&(i=i+" "+t("job_default",[t("job_scavenger")])),i},teamster:function(r){let a=t("job_teamster_desc",[En()]);return e.civic.d_job==="teamster"&&!r&&(a=a+" "+t("job_default",[t("job_teamster")])),a},meditator:function(r){let a=t("job_meditator_desc");return e.civic.d_job==="meditator"&&!r&&(a=a+" "+t("job_default",[t("job_meditator")])),a},torturer:function(){return t("job_torturer_desc")},miner:function(){return e.tech.mining>=3?e.race.sappy&&e.tech.alumina?t("job_miner_desc2_amber"):t("job_miner_desc2"):t("job_miner_desc1")},coal_miner:function(){return e.tech.uranium?t("job_coal_miner_desc2"):t("job_coal_miner_desc1")},craftsman:function(){return t("job_craftsman_desc")},cement_worker:function(){let r=e.race.high_pop?3/b.high_pop.vars()[0]:3;e.city.biome==="ashland"&&(r*=qe.ashland.vars()[1]),r=+ye(r,"cement_worker").toFixed(2);let a=+ye(e.civic.cement_worker.impact,"cement_worker").toFixed(2),i=e.tech.cement>=4?1.2:1,s=$t(e.civic.cement_worker.workers,"factory"),n=a*i*s;return e.city.biome==="ashland"&&(n*=qe.ashland.vars()[1]),n=+n.toFixed(2),e.race.sappy?t("job_cement_worker_amber_desc",[n]):t("job_cement_worker_desc",[n,r])},banker:function(){let r=+ye(e.civic.banker.impact,"banker").toFixed(2)*100;return e.tech.banking>=10&&(r+=2*e.tech.stock_exchange),e.race.truthful&&(r*=1-b.truthful.vars()[0]/100),e.civic.govern.type==="republic"&&(r*=1.25),e.race.high_pop&&(r*=b.high_pop.vars()[1]/100),r=+r.toFixed(0),t("job_banker_desc",[r])},entertainer:function(){let r=e.tech.theatre;e.race.musical&&(r+=b.musical.vars()[0]),e.race.emotionless&&(r*=1-b.emotionless.vars()[0]/100),e.race.high_pop&&(r*=b.high_pop.vars()[1]/100),r=+ye(r,"entertainer").toFixed(2);let a=e.race.high_pop?b.high_pop.vars()[1]/100:1;return a=+ye(a,"entertainer").toFixed(2),e.tech.superstar?t("job_entertainer_desc2",[r,a]):t("job_entertainer_desc",[+r.toFixed(2)])},priest:function(){let r="";return e.civic.govern.type==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display?r=t("job_priest_desc2"):r=t("job_priest_desc"),e.tech.cleric&&(r=r+` ${t("job_priest_desc3")}`),r},professor:function(){let r=+ye(1,"professor"),a=+(e.race.studious?e.civic.professor.impact+b.studious.vars()[0]:e.civic.professor.impact),i=ve("elven");return i>0&&(a+=b.studious.vars(1)[0]*i),r*=a,r*=e.race.pompous?1-b.pompous.vars()[0]/100:1,r*=$t(e.civic.professor.workers,"science"),e.tech.anthropology&&e.tech.anthropology>=3&&(r*=1+e.city.temple.count*.05),e.civic.govern.type==="theocracy"&&(r*=.75),r=+r.toFixed(2),t("job_professor_desc",[r])},scientist:function(){let r=+ye(e.civic.scientist.impact,"scientist").toFixed(2);return r*=$t(e.civic.scientist.workers,"science"),e.tech.science>=6&&e.city.wardenclyffe&&(r*=1+e.civic.professor.workers*e.city.wardenclyffe.on*.01),e.space.satellite&&(r*=1+e.space.satellite.count*.01),e.civic.govern.type==="theocracy"&&(r*=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?.75:.6:.5),r=+r.toFixed(2),e.race.universe==="magic"?t("job_wizard_desc",[r,+(.025*ft("magic")).toFixed(4)]):t("job_scientist_desc",[r])},colonist(){return t(e.race.truepath?"job_colonist_desc_tp":"job_colonist_desc",[W().red])},titan_colonist(){return t("job_colonist_desc_tp",[W().titan])},space_miner(){return t("job_space_miner_desc")},hell_surveyor(){return t("job_hell_surveyor_desc")},archaeologist(){let r=(k.arcology||0)*75,a=(mt(e.portal.guard_post.on,"hellArmy",0)+r)/5e3;a=a>1?1:a;let i=25e4;e.race.high_pop&&(i*=b.high_pop.vars()[1]/100);let s=Math.round(i*a);return t("job_archaeologist_desc",[s.toLocaleString()])},pit_miner(){return t("job_pit_miner_desc",[t("tau_planet",[F[e.race.species].home])])},crew(){return t("job_crew_desc")}};function $i(r){r||$("#civics").append($(`${t("civics_jobs")} `)),Ft("unemployed",r,0,0,"warning"),Ft("hunter",r,0,0),Ft("forager",r,0,0),Ft("farmer",r,.82,5),Ft("lumberjack",r,1,5),Ft("quarry_worker",r,1,5),Ft("crystal_miner",r,.1,5),Ft("scavenger",r,.12,5),Ft("teamster",r,1,e.tech.teamster?6:4),Ft("meditator",r,1,5),Ft("torturer",r,1,3,"advanced"),Ft("miner",r,1,4,"advanced"),Ft("coal_miner",r,.2,4,"advanced"),Ft("craftsman",r,1,5,"advanced"),Ft("cement_worker",r,.4,5,"advanced"),Ft("entertainer",r,1,10,"advanced"),Ft("priest",r,1,3,"advanced"),Ft("professor",r,.5,6,"advanced"),Ft("scientist",r,1,5,"advanced"),Ft("banker",r,.1,6,"advanced"),Ft("colonist",r,1,5,"advanced"),Ft("titan_colonist",r,1,5,"advanced"),Ft("space_miner",r,1,5,"advanced"),Ft("hell_surveyor",r,1,1,"advanced"),Ft("archaeologist",r,1,1,"advanced"),Ft("pit_miner",r,1,4.5,"advanced"),Ft("crew",r,1,4,"alert"),!r&&!e.race.start_cataclysm&&(Lt(),e.race.servants&&oc())}function ye(r,a){return e.race.strong&&["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].includes(a)&&(r*=b.strong.vars()[1]),(e.race.swift||e.race.living_tool)&&["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].includes(a)&&(r*=b.strong.vars(.25)[1]),e.race.lone_survivor&&(["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].includes(a)?r*=80:["craftsman"].includes(a)?r*=60:["miner","coal_miner","cement_worker","banker","entertainer","priest","pit_miner"].includes(a)?r*=45:["professor","scientist"].includes(a)&&(r*=125)),r}function N(r){return e.race.high_pop?r*b.high_pop.vars()[0]:r}function tn(r){let a="";e.race.unfathomable&&r==="hunter"?a=t("job_raider"):e.race.universe==="magic"&&r==="scientist"?a=t("job_wizard"):e.race.truepath&&r==="colonist"?a=t("job_colonist_tp",[W().red]):r==="titan_colonist"?a=t("job_colonist_tp",[W().titan]):a=r==="lumberjack"&&e.race.evil&&(!e.race.soul_eater||e.race.species==="wendigo")?t("job_reclaimer"):t("job_"+r),e.civic[r].name=a}function Ft(r,a,i,s,n){let c=!1;if(a==="servant"&&(c=!0,a=!1),e.civic[r]||(e.civic[r]={job:r,display:!1,workers:0,max:0,impact:i}),tn(r),e.civic[r].assigned||(e.civic[r].assigned=r==="craftsman"?0:e.civic[r].workers),c||(e.civic[r].stress=s,e.civic[r].impact=i),!(r==="craftsman"||a)){var l=c?"servant-"+r:"civ-"+r,o=$(`
`),d=c?$('
'):$(`
`);if(!n||r==="unemployed"){n=n||"info";let m=c?$(`
{{ civic.${r}.name }} {{ sjob.${r} }} `):$(``);o.append(m)}else{let m=$(`
{{ civic.${r}.name }} {{ civic.${r}.workers | adjust('${r}') }} / {{ civic.${r}.max | adjust('${r}') }} `);o.append(m)}if(o.append(d),$(c?"#servants":"#jobs").append(o),r!=="crew"){var h=$(`« `),_=$(`» `);d.append(h),d.append(_)}c?D({el:`#${l}`,data:{civic:e.civic,sjob:e.race.servants.jobs},methods:{showJob(m){return e.civic[m].display||m==="scavenger"&&e.race.servants.force_scavenger},add(){let m=fe();for(let w=0;we.race.servants.used;w++)e.race.servants.jobs[r]++,e.race.servants.used++},sub(){let m=fe();for(let w=0;w0;w++)e.race.servants.jobs[r]--,e.race.servants.used--}}}):D({el:`#${l}`,data:{civic:e.civic},methods:{showJob(m){return e.civic[m].display},add(){let m=fe();for(let w=0;w0);w++)e.civic[r].workers++,e.civic[e.civic.d_job].workers--,e.civic[r].assigned=e.civic[r].workers},sub(){let m=fe();for(let w=0;w0;w++)e.civic[r].workers--,e.civic[e.civic.d_job].workers++,e.civic[r].assigned=e.civic[r].workers},level(m){return e.civic[m].workers===0?"count has-text-danger":e.civic[m].workers===e.civic[m].max?"count has-text-success":e.civic[m].workers<=e.civic[m].max/3?"count has-text-caution":e.civic[m].workers<=e.civic[m].max*.66?"count has-text-warning":e.civic[m].workers0)return w}return m},adjust(m,w){return w==="titan_colonist"&&k.ai_colonist?m+N(k.ai_colonist):m}}}),pe(l,function(){return si[r](c)},{elm:`#${l} .job_label`,classes:"has-background-light has-text-dark"})}}function oc(){if(le($("#servants")),e.race.servants){var r=$(`{{ s.used }} / {{ s.max }}
`);$("#servants").append(r),["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].forEach(function(a){Ft(a,"servant")}),D({el:"#servantList",data:{s:e.race.servants},methods:{level(){return e.race.servants.used===0?"count has-text-danger":e.race.servants.used===e.race.servants.max?"count has-text-success":e.race.servants.used<=e.race.servants.max/3?"count has-text-caution":e.race.servants.used<=e.race.servants.max*.66?"count has-text-warning":e.race.servants.used=2?1.15:.65),e.race.living_tool&&!a?i*=1+b.living_tool.vars()[0]*(e.tech.science&&e.tech.science>0?e.tech.science/5:0):i*=1+(e.tech.hoe&&e.tech.hoe>0?e.tech.hoe/3:0),i*=e.city.biome==="grassland"?qe.grassland.vars()[0]:1,i*=e.city.biome==="savanna"?qe.savanna.vars()[0]:1,i*=e.city.biome==="ashland"?qe.ashland.vars()[0]:1,i*=e.city.biome==="volcanic"?qe.volcanic.vars()[0]:1,i*=e.city.biome==="hellscape"?qe.hellscape.vars()[0]:1,i*=e.city.ptrait.includes("trashed")?Re.trashed.vars()[0]:1,a?i*=pr(e.race.servants.jobs.farmer,"farmer"):i*=$t(e.civic.farmer.workers,"farmer"),i*=e.tech.agriculture>=7?1.1:1,i*=e.race.low_light?1-b.low_light.vars()[0]/100:1,i}function Lt(r){if(le($(r?"#skilledServants":"#foundry")),e.city.foundry&&e.city.foundry.count>0||e.race.cataclysm||e.race.orbit_decayed||e.tech.isolation){let a=$(r?"#skilledServants":"#foundry"),i=r?"{{ s.sused }} / {{ s.smax }}":"{{ f.crafting }} / {{ c.max }}",s=$(`
${t(r?"civics_skilled_servants":"craftsman_assigned")} ${i} `);a.append(s);let n=Ve("summer"),c=["Plywood","Brick","Wrought_Iron","Sheet_Metal","Mythril","Aerogel","Nanoweave"];r||(c.push("Scarletite"),c.push("Quantium")),n&&!r&&c.push("Thermite");for(let o=0;o ');a.append(_);let m=$('
'),w;if(d==="Scarletite"&&e.portal.hasOwnProperty("hell_forge"))w=$(`
${h} {{ f.${d} }} / {{ p.on | maxScar }} `);else if(d==="Quantium"&&(e.space.hasOwnProperty("zero_g_lab")||e.tauceti.hasOwnProperty("infectious_disease_lab")))w=$(`
${h} {{ f.${d} }} / {{ e.on | maxQuantium }} `);else{let x=r?`{{ s.sjobs.${d} }}`:`{{ f.${d} }}`,j=r?`scraft${d}`:`craft${d}`;w=$(`
${h} ${x} `)}_.append(w),_.append(m),a.append(_);let M=$(`« `),A=$(`» `);m.append(M),m.append(A)}}let l=e.portal.hasOwnProperty("hell_forge")?{c:e.civic.craftsman,p:e.portal.hell_forge}:{c:e.civic.craftsman,e:e.space.hasOwnProperty("zero_g_lab")||e.tauceti.hasOwnProperty("infectious_disease_lab")?e.tech.isolation?e.tauceti.infectious_disease_lab:e.space.zero_g_lab:{count:0,on:0}};r?l.s=e.race.servants:l.f=e.city.foundry,D({el:r?"#skilledServants":"#foundry",data:l,methods:{add(o){let d=fe(),h=-1;(o==="Scarletite"||o==="Quantium")&&(h=en(o));for(let _=0;_0&&(h===-1||h>e.city.foundry[o]))e.civic.craftsman.workers++,e.city.foundry.crafting++,e.city.foundry[o]++,e.civic[e.civic.d_job].workers--;else break},sub(o){let d=fe();for(let h=0;h0)e.race.servants.sjobs[o]--,e.race.servants.sused--;else break;else if(e.city.foundry[o]>0)e.city.foundry[o]--,e.civic.craftsman.workers--,e.city.foundry.crafting--,e.civic[e.civic.d_job].workers++;else break},level(){let o=r?e.race.servants.sused:e.civic.craftsman.workers,d=r?e.race.servants.smax:e.civic.craftsman.max;return o===0?"count has-text-danger":o===d?"count has-text-success":o<=d/3?"count has-text-caution":o<=d*.66?"count has-text-warning":o"),w=e.resource[d].name,A=Ua(d,"auto").multiplier,x=e.genes.crafty?2:1,j=+e.resource[d].diff.toFixed(2),B=+(A*100).toFixed(0);m.append($(`${t("craftsman_hover_bonus",[B.toLocaleString(),w])}
`)),m.append($(`${t("craftsman_hover_prod",[j.toLocaleString(),w])}
`));let S=wa();for(let Q=0;Q0&&(V-=b.resourceful.vars(1)[0]/100*ce);let Y=+(S[d][Q].a*e.city.foundry[d]*V*x/140).toFixed(2);m.append($(`${t("craftsman_hover_cost",[Y,e.resource[S[d][Q].r].name])}
`))}return m},_=r?`scraft${d}`:`craft${d}`;rn(_,d,"auto",h)}}r?pe("servantFoundry",function(){return t("civics_skilled_servants_desc")},{elm:"#skilledServants .foundry",classes:"has-background-light has-text-dark"}):pe("craftsmenFoundry",function(){return t("job_craftsman_hover")},{elm:"#foundry .foundry",classes:"has-background-light has-text-dark"}),e.race.servants&&!r&&e.race.servants.smax>0&&Lt(!0)}}var br={prtl_fortress:{info:{name:t("portal_fortress_name"),desc:t("portal_fortress_desc"),repair(){let r=200;return k.repair_droid&&(r*=.95**k.repair_droid),Math.round(r)}},turret:{id:"portal-turret",title(){let r=e.tech.turret?e.tech.turret>=2?"portal_turret_title3":"portal_turret_title2":"portal_turret_title1";return t(r)},desc(){let r=e.tech.turret?e.tech.turret>=2?"portal_turret_title3":"portal_turret_title2":"portal_turret_title1";return`
${t(r)}
${t("requires_power")}
`},reqs:{portal:2},cost:{Money(r){return f("turret",r,35e4,1.28,"portal")},Copper(r){return f("turret",r,5e4,1.28,"portal")},Adamantite(r){return f("turret",r,8e3,1.28,"portal")},Elerium(r){return f("turret",r,15,1.28,"portal")},Nano_Tube(r){return f("turret",r,28e3,1.28,"portal")}},powered(){return _e(e.tech.turret?4+e.tech.turret:4)},postPower(r){k.turret=e.portal.turret.on,D({el:"#fort"},"update")},effect(){let r=e.tech.turret?e.tech.turret>=2?70:50:35,a=$(this)[0].powered();return`
${t("portal_turret_effect",[r])}
${t("minus_power",[a])}
`},action(){return u($(this)[0])?(ne("turret","portal"),re($(this)[0])&&(k.turret++,D({el:"#fort"},"update")),!0):!1}},carport:{id:"portal-carport",title:t("portal_carport_title"),desc(){return t("portal_carport_desc",[1])},reqs:{portal:2},cost:{Money(r){return f("carport",r,25e4,1.3,"portal")},Cement(r){return f("carport",r,18e3,1.3,"portal")},Oil(r){return f("carport",r,6500,1.3,"portal")},Plywood(r){return f("carport",r,8500,1.3,"portal")}},repair(){let r=180;return k.repair_droid&&(r*=.92**k.repair_droid),Math.round(r)},effect(){return`${t("portal_carport_effect",[1])}`},action(){return u($(this)[0])?(ne("carport","portal"),e.civic.hell_surveyor.display=!0,e.civic.hell_surveyor.max+=N(1),e.resource.Infernite.display=!0,e.tech.infernite||(e.tech.infernite=1,ue()),!0):!1}},war_droid:{id:"portal-war_droid",title:t("portal_war_droid_title"),desc(){return`
${t("portal_war_droid_title")}
${t("requires_power")}
`},reqs:{portal:5},cost:{Money(r){return f("war_droid",r,495e3,1.26,"portal")},Neutronium(r){return f("war_droid",r,1250,1.26,"portal")},Elerium(r){return f("war_droid",r,18,1.26,"portal")},Stanene(r){return f("war_droid",r,37500,1.26,"portal")},Soul_Gem(r){return f("war_droid",r,1,1.26,"portal")}},powered(){return _e(2)},effect(){return`
${t("portal_war_droid_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("war_droid","portal"),re($(this)[0]),!0):!1},flair:t("portal_war_droid_flair")},repair_droid:{id:"portal-repair_droid",title:t("portal_repair_droid_title"),desc(){return`
${t("portal_repair_droid_title")}
${t("requires_power")}
`},reqs:{portal:6},cost:{Money(r){return f("repair_droid",r,444e3,1.26,"portal")},Iron(r){return f("repair_droid",r,88e3,1.26,"portal")},Iridium(r){return f("repair_droid",r,17616,1.26,"portal")},Infernite(r){return f("repair_droid",r,666,1.26,"portal")},Soul_Gem(r){return f("repair_droid",r,1,1.15,"portal")}},powered(){return _e(3)},effect(){return`
${t("portal_repair_droid_effect",[5])}
${t("portal_repair_droid_effect2",[8])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("repair_droid","portal"),re($(this)[0]),!0):!1},flair:t("portal_repair_droid_flair")}},prtl_badlands:{info:{name:t("portal_badlands_name"),desc:t("portal_badlands_desc")},war_drone:{id:"portal-war_drone",title:t("portal_war_drone_title"),desc(){return`
${t("portal_war_drone_title")}
${t("requires_power")}
`},reqs:{portal:3},powered(){return _e(5)},cost:{Money(r){return f("war_drone",r,65e4,1.28,"portal")},Alloy(r){return f("war_drone",r,6e4,1.28,"portal")},Graphene(r){return f("war_drone",r,1e5,1.28,"portal")},Elerium(r){return f("war_drone",r,25,1.28,"portal")},Soul_Gem(r){return f("war_drone",r,1,1.28,"portal")}},effect(){return`
${t("portal_war_drone_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("war_drone","portal"),re($(this)[0]),!0):!1},flair:t("portal_war_drone_flair")},sensor_drone:{id:"portal-sensor_drone",title:t("portal_sensor_drone_title"),desc(){return`
${t("portal_sensor_drone_title")}
${t("requires_power")}
`},reqs:{infernite:2},powered(){return _e(3)},cost:{Money(r){return f("sensor_drone",r,5e5,1.25,"portal")},Polymer(r){return f("sensor_drone",r,25e3,1.25,"portal")},Adamantite(r){return f("sensor_drone",r,12500,1.25,"portal")},Infernite(r){return f("sensor_drone",r,100,1.25,"portal")}},effect(){let r=e.tech.infernite>=4?e.tech.infernite>=6?50:20:10,a=e.tech.infernite>=6?2500:1e3,i=e.race.cataclysm?`
${t("space_moon_observatory_cata_effect",[2])}
`:`
${t("space_moon_observatory_effect",[2])}
${t("portal_sensor_drone_effect2",[2])}
`,s=e.tech.science>=14?`
${t("city_max_knowledge",[a])}
${i}`:"";return`
${t("portal_sensor_drone_effect",[r])}
${s}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("sensor_drone","portal"),re($(this)[0]),!0):!1}},attractor:{id:"portal-attractor",title:t("portal_attractor_title"),desc(){return`
${t("portal_attractor_title")}
${t("requires_power")}
`},reqs:{portal:4},powered(){return _e(3)},cost:{Money(r){return f("attractor",r,35e4,1.25,"portal")},Aluminium(r){return f("attractor",r,175e3,1.25,"portal")},Stanene(r){return f("attractor",r,9e4,1.25,"portal")}},effect(){return`
${t("portal_attractor_effect1")}
${t("portal_attractor_effect2",[e.resource.Soul_Gem.name])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("attractor","portal"),re($(this)[0]),!0):!1}}},prtl_pit:{info:{name:t("portal_pit_name"),desc:t("portal_pit_desc")},pit_mission:{id:"portal-pit_mission",title:t("portal_pit_mission_title"),desc:t("portal_pit_mission_title"),reqs:{hell_pit:1},grant:["hell_pit",2],queue_complete(){return e.tech.hell_pit>=2?0:1},cost:{Money(){return 5e6},Helium_3(){return 3e5},Deuterium(){return 2e5}},effect:t("portal_pit_mission_effect"),action(){return u($(this)[0])?(I(t("portal_pit_mission_result"),"info",!1,["progress","hell"]),!0):!1}},assault_forge:{id:"portal-assault_forge",title:t("portal_assault_forge_title"),desc:t("portal_assault_forge_title"),reqs:{hell_pit:2},grant:["hell_pit",3],queue_complete(){return e.tech.hell_pit>=3?0:1},cost:{Money(){return 1e7},HellArmy(){return Math.round(650/mt(1,"hellArmy"))},Cement(){return 1e7},Adamantite(){return 125e4},Elerium(){return 2400},Stanene(){return 9e5}},effect:t("portal_assault_forge_effect"),action(){return u($(this)[0])?(I(t("portal_assault_forge_result"),"info",!1,["progress","hell"]),!0):!1}},soul_forge:{id:"portal-soul_forge",title:t("portal_soul_forge_title"),desc(){return`
${t("portal_soul_forge_desc")}
${t("requires_power")}
`},reqs:{hell_pit:4},queue_complete(){return 1-e.portal.soul_forge.count},powered(){return _e(30)},postPower(r){D({el:"#fort"},"update")},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?25e6:0},Graphene(r){return(r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?15e5:0},Infernite(r){return(r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?25e3:0},Bolognium(r){return(r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?1e5:0}},effect(r){let a=`
${t("portal_soul_forge_effect",[e.resource.Soul_Gem.name])}
`;if((r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)>=1){let n=e.tech.hell_pit>=6?75e4:1e6;e.tech.hell_pit>=7&&k.soul_attractor>0&&(n*=.97**k.soul_attractor),a=a+`
${t("portal_soul_forge_effect2",[e.portal.soul_forge?e.portal.soul_forge.kills.toLocaleString():0,Math.round(n).toLocaleString()])}
`}let s=ji();return`${a}
${t("portal_soul_forge_soldiers",[s])} , ${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])&&e.portal.soul_forge.count<1?(ne("soul_forge","portal"),re($(this)[0]),!0):!1}},gun_emplacement:{id:"portal-gun_emplacement",title:t("portal_gun_emplacement_title"),desc(){return`
${t("portal_gun_emplacement_title")}
${t("requires_power")}
`},reqs:{hell_gun:1},powered(){return _e(3)},cost:{Money(r){return f("gun_emplacement",r,4e6,1.25,"portal")},Coal(r){return f("gun_emplacement",r,25e4,1.25,"portal")},Steel(r){return f("gun_emplacement",r,12e5,1.25,"portal")},Wrought_Iron(r){return f("gun_emplacement",r,2e5,1.25,"portal")}},effect(){let r=e.tech.hell_gun>=2?2:1,a=e.tech.hell_gun>=2?35:20,i=e.tech.hell_gun>=2?75:40;return`
${t("portal_gun_emplacement_effect",[r])}
${t("portal_gun_emplacement_effect2",[a,i])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("gun_emplacement","portal"),re($(this)[0]),!0):!1}},soul_attractor:{id:"portal-soul_attractor",title:t("portal_soul_attractor_title"),desc(){return`
${t("portal_soul_attractor_title")}
${t("requires_power")}
`},reqs:{hell_pit:5},powered(){return _e(4)},cost:{Money(r){return f("soul_attractor",r,12e6,1.25,"portal")},Stone(r){return f("soul_attractor",r,23e6,1.25,"portal")},Nano_Tube(r){return f("soul_attractor",r,314159,1.25,"portal")},Vitreloy(r){return f("soul_attractor",r,1618,1.25,"portal")},Aerogel(r){return f("soul_attractor",r,18e4,1.25,"portal")}},effect(){let r=e.tech.hell_pit>=7?`
${t("portal_soul_attractor_effect2",[3])}
`:"",a=e.blood.attract?e.blood.attract*5:0;return`
${t("portal_soul_attractor_effect",[40+a,120+a])}
${r}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("soul_attractor","portal"),re($(this)[0]),!0):!1}},soul_capacitor:{id:"portal-soul_capacitor",title:t("portal_soul_capacitor_title"),desc(){return`
${t("portal_soul_capacitor_desc")}
${t("requires_power")}
`},reqs:{forbidden:2},powered(){return _e(125)},queue_complete(){return 40-e.portal.soul_capacitor.count},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,75e7,1.01,"portal")},Crystal(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,125e4,1.01,"portal")},Adamantite(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,65e5,1.01,"portal")},Infernite(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,1e4,1.01,"portal")},Stanene(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,25e5,1.01,"portal")},Bolognium(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,1e6,1.01,"portal")},Soul_Gem(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,3,1.01,"portal")},Mythril(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,125e4,1.01,"portal")}},effect(){let r=25e5,a=e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.ecap:0,i=e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.energy:0,s=`
${t("portal_soul_capacitor_effect",[i.toLocaleString()])}
`;return s+=`
${t("portal_soul_capacitor_effect2",[a.toLocaleString()])}
`,s+=`
${t("portal_soul_capacitor_effect3",[r.toLocaleString()])}
`,s+=`
${t("minus_power",[$(this)[0].powered()])}
`,s},action(){return e.portal.soul_capacitor.count<40&&u($(this)[0])?(e.portal.soul_capacitor.count++,re($(this)[0]),!0):!1},postPower(){Ci($(this)[0],"portal","soul_capacitor")}},absorption_chamber:{id:"portal-absorption_chamber",title:t("portal_absorption_chamber_title"),desc(r){return!e.interstellar.hasOwnProperty("absorption_chamber")||e.portal.absorption_chamber.count<100||r?`
${t("portal_absorption_chamber_title")}
${t("requires_segments",[100])}
`:`
${t("portal_absorption_chamber_title")}
`},reqs:{forbidden:3},queue_size:5,queue_complete(){return 100-e.portal.absorption_chamber.count},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?75e6:0},Alloy(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?75e4:0},Neutronium(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?125e3:0},Elerium(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?1e3:0},Orichalcum(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?25e4:0},Nanoweave(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?75e3:0}},effect(r){let a=(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0);if(a<100){let i=100-a;return`
${t("portal_absorption_chamber_incomplete")}
${t("space_dwarf_collider_effect2",[i])}
`}else{if(e.tech.forbidden===5)return`
${t("portal_absorption_chamber_effect_eld",[1e8.toLocaleString()])}
${t("tech_demonic_infusion_effect2",[ot("descend").artifact])}
`;{let i=Ys();return`
${t("portal_absorption_chamber_effect",[1e8.toLocaleString()])}
${i}
`}}},action(){if(u($(this)[0])){if(e.portal.absorption_chamber.count<100)return ne("absorption_chamber","portal"),e.portal.absorption_chamber.count>=100&&(e.tech.forbidden=4),!0;if(e.portal.soul_capacitor.energy>=1e8)return e.tech.forbidden===5?Ts():vs(),!0}return!1}}},prtl_ruins:{info:{name:t("portal_ruins_name"),desc:t("portal_ruins_desc"),support:"guard_post",prop(){let r=` -
${t("portal_ruins_security")}: {{ on | filter('army') }} `;return r=r+` -
${t("portal_ruins_supressed")}: {{ on | filter('sup') }} `,r},filter(r,a){let i=Nr("ruins");switch(a){case"army":return Math.round(i.rating);case"sup":return`${+(i.supress*100).toFixed(2)}%`}}},ruins_mission:{id:"portal-ruins_mission",title:t("portal_ruins_mission_title"),desc:t("portal_ruins_mission_title"),reqs:{hell_ruins:1},grant:["hell_ruins",2],queue_complete(){return e.tech.hell_ruins>=2?0:1},cost:{Money(){return 1e8},Oil(){return 5e5},Helium_3(){return 5e5}},effect:t("portal_ruins_mission_effect"),action(){return u($(this)[0])?(I(t("portal_ruins_mission_result"),"info",!1,["progress","hell"]),e.portal.vault={count:0},e.portal.stonehedge={count:0},e.portal.archaeology={count:0,on:0},!0):!1}},guard_post:{id:"portal-guard_post",title:t("portal_guard_post_title"),desc(){return`
${t("portal_guard_post_title")}
${t("requires_soldiers")}
${t("requires_power")}
`},reqs:{hell_ruins:2},cost:{Money(r){return f("guard_post",r,8e6,1.06,"portal")},Lumber(r){return f("guard_post",r,65e5,1.06,"portal")},Sheet_Metal(r){return f("guard_post",r,3e5,1.06,"portal")}},powered(){return _e(5)},support(){return 1},effect(){let r=e.race.holy?1+b.holy.vars()[1]/100:1,a=ve("unicorn");a>0&&(r*=1+b.holy.vars(1)[1]/100*a);let i=Math.round(r*mt(N(1),"hellArmy",0));return`
${t("portal_guard_post_effect1",[i])}
${t("portal_guard_post_effect2",[N(1),$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("guard_post","portal"),e.portal.guard_post.on++,!0):!1},postPower(){D({el:"#srprtl_ruins"},"update"),D({el:"#srprtl_gate"},"update")}},vault:{id:"portal-vault",title:t("portal_vault_title"),desc:t("portal_vault_title"),reqs:{hell_ruins:2,hell_vault:1},condition(){return!(e.portal.vault.count>=2)},queue_complete(){return 2-e.portal.vault.count},cost:{Soul_Gem(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===0?100:0},Money(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===1?25e7:0},Adamantite(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===1?125e5:0},Orichalcum(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===1?3e7:0}},effect(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)<1?t("portal_vault_effect",[100]):t("portal_vault_effect2")},action(){if(e.portal.vault.count<2&&u($(this)[0])){if(ne("vault","portal"),e.portal.vault.count===2&&(e.tech.hell_ruins=3,e.resource.Codex.display=!0,e.resource.Codex.amount=1,I(t("portal_vault_result"),"info",!1,["progress","hell"]),e.race.fasting)){let r=it();e.stats.endless_hunger.b3[r]=!0,r!=="m"&&r!=="l"&&(e.stats.endless_hunger.b3.l=!0)}return!0}return!1},post(){e.portal.vault.count===2&&(ue(),ir(),Ie())}},archaeology:{id:"portal-archaeology",title:t("portal_archaeology_title"),desc(){return`
${t("portal_archaeology_title")}
${t("requires_security")}
${t("requires_power")}
`},reqs:{hell_ruins:2},cost:{Money(r){return f("archaeology",r,1e8,1.25,"portal")},Titanium(r){return f("archaeology",r,375e4,1.25,"portal")},Mythril(r){return f("archaeology",r,125e4,1.25,"portal")}},powered(){return _e(8)},effect(){return`
${t("portal_archaeology_effect",[N(2)])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){if(u($(this)[0])){if(ne("archaeology","portal"),e.civic.archaeologist.display=!0,re($(this)[0])){let r=N(2);e.civic.archaeologist.max+=r;let a=Math.min(r,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=a,e.civic.archaeologist.workers+=a}return!0}return!1}},arcology:{id:"portal-arcology",title:t("portal_arcology_title"),desc(){return`
${t("portal_arcology_title")}
${t("requires_security")}
${t("requires_power")}
`},reqs:{housing:4},cost:{Money(r){return f("arcology",r,18e7,1.22,"portal")},Graphene(r){return f("arcology",r,75e5,1.22,"portal")},Bolognium(r){return f("arcology",r,28e5,1.22,"portal")},Orichalcum(r){return f("arcology",r,55e5,1.22,"portal")},Nanoweave(r){return f("arcology",r,65e4,1.22,"portal")},Horseshoe(){return e.race.hooved?13:0}},powered(){return _e(25)},effect(){let r=Nr("ruins"),a=H(Fr()*8*r.supress);a=+a.toFixed(0);let i=Math.round(xt)*10,s=`
${t("plus_max_resource",[i,t("resource_Crates_name")])}
${t("plus_max_resource",[i,t("resource_Containers_name")])}
`;return`
${t("plus_max_resource",[`$${a.toLocaleString()}`,t("resource_Money_name")])}
${t("plus_max_citizens",[$(this)[0].citizens()])}
${t("plus_max_resource",[N(5),t("civics_garrison_soldiers")])}
${t("portal_guard_post_effect1",[75])}
${s}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("arcology","portal"),re($(this)[0])&&(e.resource[e.race.species].max+=8),e.resource.Containers.display||Yr(),!0):!1},post(){D({el:"#srprtl_ruins"},"update"),ue()},postPower(){D({el:"#srprtl_ruins"},"update"),D({el:"#srprtl_gate"},"update")},citizens(){let r=8;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},hell_forge:{id:"portal-hell_forge",title:t("portal_hell_forge_title"),desc(){return`
${t("portal_hell_forge_title")}
${t("requires_security")}
${t("requires_power")}
`},reqs:{scarletite:1},cost:{Money(r){return f("hell_forge",r,25e7,1.15,"portal")},Coal(r){return f("hell_forge",r,165e4,1.22,"portal")},Steel(r){return f("hell_forge",r,38e5,1.22,"portal")},Iridium(r){return f("hell_forge",r,12e5,1.22,"portal")},Neutronium(r){return f("hell_forge",r,28e4,1.22,"portal")},Soul_Gem(r){return f("hell_forge",r,5,1.22,"portal")}},powered(){return _e(12)},special:!0,effect(){let a=+(75*Nr("ruins").supress).toFixed(1),i=e.tech.inferno_power?`
${t("portal_hell_forge_effect2",[10,t("portal_inferno_power_title")])}
`:"";return`
${t("portal_hell_forge_effect",[N(1)])}
${i}
${t("interstellar_stellar_forge_effect3",[3])}
${t("interstellar_stellar_forge_effect",[a])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("hell_forge","portal"),re($(this)[0])&&(e.city.smelter.cap+=3,e.city.smelter.Oil+=3,e.city.smelter.Iron+=3),!0):!1},post(){Lt()},postPower(r){bi("Scarletite")}},inferno_power:{id:"portal-inferno_power",title:t("portal_inferno_power_title"),desc(){return`
${t("portal_inferno_power_title")}
`},reqs:{inferno_power:1},cost:{Money(r){return f("inferno_power",r,275e6,1.16,"portal")},Neutronium(r){return f("inferno_power",r,375e4,1.18,"portal")},Stanene(r){return f("inferno_power",r,12e6,1.18,"portal")},Bolognium(r){return f("inferno_power",r,8e6,1.18,"portal")}},powered(){let r=20;return k.hasOwnProperty("hell_forge")&&(r+=k.hell_forge*10),dt(-r)},fuel:{Infernite:5,Coal:100,Oil:80},effect(){let r=$(this)[0].fuel;return`
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}
${t("portal_inferno_power_effect",[r.Infernite,e.resource.Infernite.name,r.Coal,e.resource.Coal.name,r.Oil,e.resource.Oil.name])}
`},action(){return u($(this)[0])?(ne("inferno_power","portal"),e.portal.inferno_power.on++,!0):!1},post(){D({el:"#foundry"},"update")}},ancient_pillars:{id:"portal-ancient_pillars",title:t("portal_ancient_pillars_title"),desc:t("portal_ancient_pillars_desc"),reqs:{hell_ruins:2},queue_complete(){return e.tech.pillars&&e.tech.pillars===1&&e.race.universe!=="micro"?1:0},cost:{Harmony(r){return r!==void 0?r+Object.keys(e.pillars).length
=1?`${t("portal_ancient_pillars_effect2",[Object.keys(F).length-1,a])}
`:`${t("portal_ancient_pillars_effect",[Object.keys(F).length-1])}
`},action(){return e.tech.pillars&&e.tech.pillars===1&&e.race.universe!=="micro"&&u($(this)[0])?(e.pillars[e.race.species]=Jt(),e.tech.pillars=2,H(0,!1,!0),ea(!0),Wt(!0),ie("resonance"),D({el:"#portal-ancient_pillars"},"update"),!0):!1}}},prtl_gate:{info:{name:t("portal_gate_name"),desc(){return`${t("portal_gate_desc")} ${t(e.tech.wtower&&e.tech.etower?"portal_gate_open":"portal_gate_closed")}`},support:"guard_post",hide_support:!0,prop(){let r=` - ${t("portal_ruins_security")}: {{ on | filter('army') }} `;return r=r+` - ${t("portal_ruins_supressed")}: {{ on | filter('sup') }} `,r},filter(r,a){let i=Nr("gate");switch(a){case"army":return Math.round(i.rating);case"sup":return`${+(i.supress*100).toFixed(2)}%`}}},gate_mission:{id:"portal-gate_mission",title:t("portal_gate_mission_title"),desc:t("portal_gate_mission_title"),reqs:{high_tech:18},grant:["hell_gate",1],queue_complete(){return e.tech.hell_gate>=1?0:1},cost:{Money(){return 25e7},Knowledge(){return 275e5}},effect:t("portal_gate_mission_effect"),action(){return u($(this)[0])?(I(t("portal_gate_mission_result"),"info",!1,["progress","hell"]),!0):!1}},west_tower:{id:"portal-west_tower",title:t("portal_west_tower"),desc(r){let a=Wt();return!e.portal.hasOwnProperty("west_tower")||e.portal.west_tower.count${t("portal_west_tower")} ${t("requires_segments",[a])}
`:`
${t("portal_west_tower")}
`},reqs:{hell_gate:2},queue_size:25,queue_complete(){return Wt()-e.portal.west_tower.count},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("west_tower")?e.portal.west_tower.count:0)
${t("portal_tower_effect")} ${t("space_dwarf_collider_effect2",[s])}
${t("portal_tower_effect2")}
`}else return t("portal_tower_effect")},action(){return e.portal.west_tower.count=Wt()&&(e.tech.wtower=1,e.tech.wtower&&e.tech.etower&&!e.tech.hell_lake&&(e.tech.hell_lake=1,e.settings.portal.lake=!0,e.portal.harbour={count:0,on:0,support:0,s_max:0},I(t("portal_gate_open"),"info",!1,["progress","hell"]),ir()))}},east_tower:{id:"portal-east_tower",title:t("portal_east_tower"),desc(r){let a=Wt();return!e.portal.hasOwnProperty("east_tower")||e.portal.east_tower.count${t("portal_east_tower")}${t("requires_segments",[a])}
`:`${t("portal_east_tower")}
`},reqs:{hell_gate:2},queue_size:25,queue_complete(){return Wt()-e.portal.east_tower.count},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("east_tower")?e.portal.east_tower.count:0)${t("portal_tower_effect")}${t("space_dwarf_collider_effect2",[s])}
${t("portal_tower_effect2")}
`}else return t("portal_tower_effect")},action(){return e.portal.east_tower.count=Wt()&&(e.tech.etower=1,e.tech.wtower&&e.tech.etower&&!e.tech.hell_lake&&(e.tech.hell_lake=1,e.settings.portal.lake=!0,e.portal.harbour={count:0,on:0,support:0,s_max:0},I(t("portal_gate_open"),"info",!1,["progress","hell"]),ir()))}},gate_turret:{id:"portal-gate_turret",title:t("portal_gate_turret_title"),desc(){return`${t("portal_gate_turret_title")}
${t("requires_power")}
`},reqs:{hell_gate:3},powered(){return _e(6)},cost:{Money(r){return f("gate_turret",r,375e4,1.22,"portal")},Iron(r){return f("gate_turret",r,425e4,1.22,"portal")},Elerium(r){return f("gate_turret",r,275,1.22,"portal")},Stanene(r){return f("gate_turret",r,85e4,1.22,"portal")}},effect(){let r=100;e.race.holy&&(r*=1+b.holy.vars()[1]/100);let a=ve("unicorn");a>0&&(r*=1+b.holy.vars(1)[1]/100*a);let i=e.tech.hell_gun>=2?65:40,s=e.tech.hell_gun>=2?100:60;return`${t("portal_gate_turret_effect",[Math.round(r)])}
${t("portal_gate_turret_effect2",[i,s])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("gate_turret","portal"),re($(this)[0]),!0):!1},postPower(){D({el:"#srprtl_gate"},"update")}},infernite_mine:{id:"portal-infernite_mine",title:t("portal_infernite_mine_title"),desc(){return`${t("portal_infernite_mine_title")}
${t("requires_security")}
${t("requires_power")}
`},reqs:{hell_gate:4},powered(){return _e(5)},powerBalancer(){return[{r:"Infernite",k:"lpmod"}]},cost:{Money(r){return f("infernite_mine",r,75e6,1.26,"portal")},Alloy(r){return f("infernite_mine",r,245e4,1.26,"portal")},Orichalcum(r){return f("infernite_mine",r,165e4,1.26,"portal")},Wrought_Iron(r){return f("infernite_mine",r,68e4,1.26,"portal")}},effect(){let r=T("infernite_mine");return`${t("portal_infernite_mine_effect",[+r.toFixed(3)])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("infernite_mine","portal"),re($(this)[0]),!0):!1}}},prtl_lake:{info:{name:t("portal_lake_name"),desc:t("portal_lake_desc"),support:"harbour"},lake_mission:{id:"portal-lake_mission",title:t("portal_lake_mission_title"),desc:t("portal_lake_mission_title"),reqs:{hell_lake:1},grant:["hell_lake",2],queue_complete(){return e.tech.hell_lake>=2?0:1},cost:{Money(){return 5e8},Oil(){return 75e4},Helium_3(){return 6e5}},effect:t("portal_lake_mission_effect"),action(){return u($(this)[0])?(I(t("portal_lake_mission_result"),"info",!1,["progress","hell"]),!0):!1}},harbour:{id:"portal-harbour",title:t("portal_harbour_title"),desc(){return`${t("portal_harbour_title")}
${t("requires_power")}
`},reqs:{hell_lake:3},powered(){let r=k.cooling_tower||0;return+_e(500*.92**r).toFixed(2)},support(){return 1},cost:{Money(r){return f("harbour",r,225e6,$a(1.18),"portal")},Cement(r){return f("harbour",r,5e7,$a(1.18),"portal")},Iridium(r){return f("harbour",r,75e5,$a(1.18),"portal")},Infernite(r){return f("harbour",r,8e5,$a(1.18),"portal")},Stanene(r){return f("harbour",r,175e5,$a(1.18),"portal")}},wide:!0,res(){return["Oil","Alloy","Polymer","Iridium","Helium_3","Deuterium","Neutronium","Adamantite","Infernite","Nano_Tube","Graphene","Stanene","Bolognium","Orichalcum"]},val(r){switch(r){case"Oil":return 3e4;case"Alloy":return 25e4;case"Polymer":return 25e4;case"Iridium":return 2e5;case"Helium_3":return 18e3;case"Deuterium":return 12e3;case"Neutronium":return 18e4;case"Adamantite":return 15e4;case"Infernite":return 75e3;case"Nano_Tube":return 75e4;case"Graphene":return 12e5;case"Stanene":return 12e5;case"Bolognium":return 13e4;case"Orichalcum":return 13e4;default:return 0}},effect(){let r='';for(let a of $(this)[0].res())if(e.resource[a].display){let i=Ee(+H($(this)[0].val(a)).toFixed(0),1);r=r+`${t("plus_max_resource",[i,e.resource[a].name])} `}return r=r+"
",`${t("portal_harbour_effect",[1])}
${r}${t("minus_power",[$(this)[0].powered()])}
`},action(){if(u($(this)[0])){if(ne("harbour","portal"),re($(this)[0]))for(let r of $(this)[0].res())e.resource[r].display&&(e.resource[r].max+=H($(this)[0].val(r)));return!0}return!1}},cooling_tower:{id:"portal-cooling_tower",title:t("portal_cooling_tower_title"),desc(){return`${t("portal_cooling_tower_title")}
${t("requires_power")}
`},reqs:{hell_lake:6},powered(){return _e(10)},cost:{Money(r){return f("cooling_tower",r,25e7,1.2,"portal")},Polymer(r){return f("cooling_tower",r,12e6,1.2,"portal")},Orichalcum(r){return f("cooling_tower",r,85e5,1.2,"portal")},Brick(r){return f("cooling_tower",r,25e4,1.2,"portal")}},effect(){return`${t("portal_cooling_tower_effect",[8])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("cooling_tower","portal"),re($(this)[0]),!0):!1}},bireme:{id:"portal-bireme",title:t("portal_bireme_title"),desc(){return`${t("portal_bireme_title")}
${t("space_support",[t("lake")])}
`},reqs:{hell_lake:4},powered(){return 0},s_type:"lake",support(){return-1},cost:{Money(r){return f("bireme",r,19e7,1.24,"portal")},Helium_3(r){return f("bireme",r,225e3,1.24,"portal")},Adamantite(r){return f("bireme",r,15e6,1.24,"portal")},Nano_Tube(r){return f("bireme",r,18e6,1.24,"portal")},Soul_Gem(r){return f("bireme",r,10,1.24,"portal")},Scarletite(r){return f("bireme",r,125e3,1.24,"portal")}},effect(){let r=e.blood.spire&&e.blood.spire>=2?20:15;return`${t("space_used_support",[t("lake")])}
${t("portal_bireme_effect",[r])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
`},ship:{civ(){return 0},mil(){return e.race.high_pop?b.high_pop.vars()[0]*2:2}},action(){return u($(this)[0])?(ne("bireme","portal"),re($(this)[0]),!0):!1}},transport:{id:"portal-transport",title:t("portal_transport_title"),desc(){return`${t("portal_transport_title")}
${t("space_support",[t("lake")])}
`},reqs:{hell_lake:5},powered(){return 0},s_type:"lake",support(){return-1},cost:{Money(r){return f("transport",r,3e8,1.22,"portal")},Oil(r){return f("transport",r,18e4,1.22,"portal")},Alloy(r){return f("transport",r,18e6,1.22,"portal")},Graphene(r){return f("transport",r,125e5,1.22,"portal")},Soul_Gem(r){return f("transport",r,5,1.22,"portal")},Scarletite(r){return f("transport",r,25e4,1.22,"portal")}},effect(){let a=+((e.blood.spire&&e.blood.spire>=2?.8:.85)**(we.bireme||0)*100).toFixed(1);return`${t("space_used_support",[t("lake")])}
${t("portal_transport_effect",[5])}
${t("portal_transport_effect2",[a])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
`},special:!0,sAction(){e.settings.civTabs=4,e.settings.marketTabs=3,e.settings.tabLoad||(gr("mTabResource"),Ie("portal-transport"))},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*3:3},mil(){return 0}},action(){return u($(this)[0])?(ne("transport","portal"),re($(this)[0]),e.settings.portal.spire||(e.settings.portal.spire=!0,e.settings.showCargo=!0,e.tech.hell_spire=1,e.portal.purifier={count:0,on:0,support:0,s_max:0,supply:0,sup_max:100,diff:0},e.portal.port={count:0,on:0},I(t("portal_transport_unlocked"),"info",!1,["progress","hell"]),ir()),!0):!1}}},prtl_spire:{info:{name:t("portal_spire_name"),desc:t("portal_spire_desc"),support:"purifier",prop(){return` - ${t("portal_spire_supply")}: {{ supply | filter }} / {{ sup_max }} `+' (+{{ diff | filter(2) }}/s )'},filter(r,a){return a?+r.toFixed(a):Math.floor(r)}},spire_mission:{id:"portal-spire_mission",title:t("portal_spire_mission_title"),desc:t("portal_spire_mission_title"),reqs:{hell_spire:1},grant:["hell_spire",2],queue_complete(){return e.tech.hell_spire>=2?0:1},cost:{Species(){return Si(50)},Oil(){return 9e5},Helium_3(){return 75e4},Structs(){return{portal:{bireme:{s:"prtl_lake",count:1,on:1},transport:{s:"prtl_lake",count:1,on:1}}}}},effect:t("portal_spire_mission_effect"),action(){return u($(this)[0])?(I(t("portal_spire_mission_result"),"info",!1,["progress","hell"]),!0):!1},flair:t("portal_spire_mission_flair")},purifier:{id:"portal-purifier",title:t("portal_purifier_title"),desc(){return`${t("portal_purifier_desc")}
${t("requires_power")}
`},reqs:{hell_spire:3},cost:{Money(r){return f("purifier",r,85e6,$a(1.15),"portal")},Supply(r){return e.portal.purifier&&e.portal.purifier.count===0?100:f("purifier",r,4200,$a(1.2),"portal")}},powered(){return _e(125)},support(){return e.tech.b_stone&&e.tech.b_stone>=3?1.25:1},effect(){return`${t("portal_purifier_effect",[$(this)[0].support()])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("purifier","portal"),re($(this)[0]),!0):!1}},port:{id:"portal-port",title:t("portal_port_title"),desc(){return`${t("portal_port_title")}
${t("portal_spire_support")}
`},reqs:{hell_spire:3},cost:{Money(r){return f("port",r,135e6,$a(1.2),"portal")},Supply(r){return e.portal.hasOwnProperty("port")&&e.portal.port.count===0?100:f("port",r,6250,$a(1.2),"portal")}},powered(){return 0},s_type:"spire",support(){return-1},effect(){let r=1e4;return pa.base_camp&&(r*=1+pa.base_camp*.4),`${t("portal_port_effect1",[$(this)[0].support()])}
${t("portal_port_effect2",[Math.round(r)])}
`},action(){return u($(this)[0])?(ne("port","portal"),re($(this)[0]),e.tech.hell_spire===3&&(e.tech.hell_spire=4,e.portal.base_camp={count:0,on:0},ir()),!0):!1}},base_camp:{id:"portal-base_camp",title:t("portal_base_camp_title"),desc(){return`${t("portal_base_camp_title")}
${t("portal_spire_support")}
`},reqs:{hell_spire:4},cost:{Money(r){return f("base_camp",r,425e6,$a(1.2),"portal")},Supply(r){return f("base_camp",r,5e4,$a(1.2),"portal")}},powered(){return 0},s_type:"spire",support(){return-1},effect(){return`${t("portal_port_effect1",[$(this)[0].support()])}
${t("portal_base_camp_effect",[40])}
`},action(){return u($(this)[0])?(ne("base_camp","portal"),re($(this)[0]),e.tech.hell_spire===4&&(e.tech.hell_spire=5,e.portal.bridge={count:0},I(t("portal_spire_bridge_collapse"),"info",!1,["progress","hell"]),ir()),!0):!1}},bridge:{id:"portal-bridge",title:t("portal_bridge_title"),desc(r){return!e.portal.hasOwnProperty("bridge")||e.portal.bridge.count<10||r?`${t("portal_bridge_title")}
${t("requires_segments",[10])}
`:`${t("portal_bridge_title")}
`},reqs:{hell_spire:5},queue_size:1,queue_complete(){return 10-e.portal.bridge.count},cost:{Species(r){return(r||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0)<10?Si(10):0},Money(r){return(r||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0)<10?5e8:0},Supply(r){return(r||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0)<10?1e5:0}},effect(r){let a=10,i=(r||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0);if(i${t("portal_bridge_effect")}${t("space_dwarf_collider_effect2",[s])}
${t("portal_bridge_effect2")}
`}else return t("portal_bridge_complete")},action(){return e.portal.bridge.count<10&&u($(this)[0])?(ne("bridge","portal"),e.portal.bridge.count>=10&&(e.portal.sphinx={count:0},e.tech.hell_spire=6,ir()),!0):!1}},sphinx:{id:"portal-sphinx",title(){return e.tech.hell_spire===7?t("portal_sphinx_solve"):t("portal_sphinx_title")},desc:t("portal_sphinx_desc"),reqs:{hell_spire:6},queue_complete(){return 8-e.tech.hell_spire},cost:{Knowledge(r){let a=(r||0)+(!e.tech.hell_spire||e.tech.hell_spire<7?0:e.tech.hell_spire===7?1:2);return a===1?5e7:a===0?4e7:0}},effect(r){let a=(r||0)+(!e.tech.hell_spire||e.tech.hell_spire<7?0:e.tech.hell_spire===7?1:2);return a===1?t("portal_sphinx_effect2"):a===2?t("portal_sphinx_effect3"):t("portal_sphinx_effect")},action(){if(u($(this)[0])){if(e.tech.hell_spire===6)return e.tech.hell_spire=7,I(t("portal_sphinx_msg"),"info",!1,["progress","hell"]),ir(),!0;if(e.tech.hell_spire===7)return e.tech.hell_spire=8,ir(),I(t("portal_sphinx_answer_msg"),"info",!1,["progress","hell"]),!0}return!1}},bribe_sphinx:{id:"portal-bribe_sphinx",title:t("portal_sphinx_bribe"),desc:t("portal_sphinx_desc"),reqs:{hell_spire:7},condition(){return!!(e.tech.hell_spire&&e.tech.hell_spire===7&&!e.tech.sphinx_bribe)},cost:{Soul_Gem(){return 250},Supply(){return 5e5}},effect(){return t("portal_sphinx_bribe_effect")},action(){return u($(this)[0])&&e.tech.hell_spire===7&&!e.tech.sphinx_bribe?(e.tech.sphinx_bribe=1,e.resource.Codex.display=!0,e.resource.Codex.amount=1,I(t("portal_sphinx_bribe_msg"),"info",!1,["progress","hell"]),!0):!1},post(){e.tech.sphinx_bribe&&(ue(),ir(),Ie("portal-bribe_sphinx"))}},spire_survey:{id:"portal-spire_survey",title:t("portal_spire_survey_title"),desc:t("portal_spire_survey_title"),reqs:{hell_spire:8},grant:["hell_spire",9],queue_complete(){return e.tech.hell_spire>=9?0:1},cost:{Oil(){return 12e5},Helium_3(){return 9e5}},effect:t("portal_spire_survey_effect"),action(){return u($(this)[0])?(e.portal.mechbay={count:0,on:0,bay:0,max:0,active:0,scouts:0,mechs:[]},e.portal.spire={count:1,progress:0,boss:"",type:"",status:{}},nn(),I(t("portal_spire_survey_msg"),"info",!1,["progress","hell"]),!0):!1},post(){e.tech.hell_spire&&e.tech.hell_spire===9&&(ir(),Ie("portal-spire_survey"))}},mechbay:{id:"portal-mechbay",title:t("portal_mechbay_title"),desc(){return`${t("portal_mechbay_title")}
${t("portal_spire_support")}
`},reqs:{hell_spire:9},cost:{Money(r){return f("mechbay",r,1e8,1.2,"portal")},Supply(r){return f("mechbay",r,25e4,1.2,"portal")}},powered(){return 0},s_type:"spire",support(){return-1},special:!0,sAction(){e.settings.civTabs=2,e.settings.govTabs=4,e.settings.tabLoad||(gr("mTabCivic"),Ie("portal-mechbay"))},effect(){let r=e.portal.hasOwnProperty("mechbay")?e.portal.mechbay.bay:0,a=e.portal.hasOwnProperty("mechbay")?e.portal.mechbay.max:0;return`${t("portal_port_effect1",[$(this)[0].support()])}
${t("portal_mechbay_effect")}
${t("portal_mechbay_effect2",[r,a])}
`},action(){return u($(this)[0])?(ne("mechbay","portal"),re($(this)[0])&&(e.portal.mechbay.max+=25),e.settings.showMechLab=!0,e.portal.mechbay.count===1&&(I(t("portal_mechbay_unlocked"),"info",!1,["progress","hell"]),Ki(),Ot()),!0):!1},postPower(){sn()}},spire:{id:"portal-spire",title:t("portal_spire_title"),desc:t("portal_spire_title"),reqs:{hell_spire:9},queue_complete(){return 0},cost:{},effect(){let r=e.portal.hasOwnProperty("spire")?e.portal.spire.count:0,a=e.portal.hasOwnProperty("spire")?`${t(`portal_spire_type_${e.portal.spire.type}`)} `:"?",i="";e.portal.hasOwnProperty("spire")&&Object.keys(e.portal.spire.status).length>0&&(i=`${t("portal_spire_hazard",[Object.keys(e.portal.spire.status).map(_=>`${t(`portal_spire_status_${_}`)} `).join(", ")])}
`);let s=e.portal.hasOwnProperty("spire")?`${+e.portal.spire.progress.toFixed(3)}% `:"0%",n=`${t("portal_spire_effect",[r])}
${t("portal_spire_type",[a])}
${i}${t("portal_spire_progress",[s])}
`,c=e.portal.hasOwnProperty("spire")?e.portal.spire.boss:"crazed",l=`${t("portal_spire_mob",[`${t(`portal_mech_boss_${c}`)} `])}
`,o="???",d="???";if(e.stats.spire){let _=qu(c),m=$(this)[0].mscan();m>0&&(o=t(`portal_mech_weapon_${_.w}`)),m>=5&&(d=t(`portal_mech_weapon_${_.r}`))}let h=`${l}
${t("portal_spire_mob_weak",[`${o} `])}
${t("portal_spire_mob_resist",[`${d} `])}
`;return``},mscan(){let r=0;return Object.keys(e.stats.spire).forEach(function(a){let i=e.portal.hasOwnProperty("spire")?e.portal.spire.boss:"crazed";e.stats.spire.hasOwnProperty(a)&&e.stats.spire[a].hasOwnProperty(i)&&e.stats.spire[a][i]>r&&(r=e.stats.spire[a][i])}),r},wide:!0,action(){return!1}},waygate:{id:"portal-waygate",title:t("portal_waygate_title"),desc(r){return!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2||r?`${t("portal_waygate_title")}
${t("requires_segments",[10])}
`:`${t("portal_waygate_title")}
`},reqs:{waygate:1},queue_size:1,queue_complete(){return e.tech.waygate>=2?0:10-e.portal.waygate.count},cost:{Species(r){return r?r+(e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0)<10?Si(25):0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?Si(25):0},Money(r){return r?r+(e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0)<10?1e9:0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?1e9:0},Supply(r){return r?r+(e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0)<10?5e5:0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?5e5:0},Blood_Stone(r){return r?r+(e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0)<10?5:0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?5:0}},powered(){return e.portal.hasOwnProperty("waygate")&&e.portal.waygate.count>=10?1:0},power_reqs:{waygate:2},effect(r){let a=(r||0)+(e.tech.waygate&&e.tech.waygate>=2?10:e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0);if(a>=10){let i=e.portal.hasOwnProperty("waygate")?`${+e.portal.waygate.progress.toFixed(3)}% `:"0%";return`${t("portal_waygate_open")}
${t("portal_waygate_progress",[i])}
`}else{let s=10-a;return`${t("portal_waygate_effect")}
${t("space_dwarf_collider_effect2",[s])}
`}},action(){return e.portal.waygate.count<10&&e.tech.waygate&&e.tech.waygate===1&&u($(this)[0])?(ne("waygate","portal"),e.portal.waygate.count>=10&&(e.tech.waygate=2,e.portal.waygate.count=1,ir()),!0):!1}}}};function $a(r){let a=e.portal.hasOwnProperty("spire")&&e.blood.spire?r-(e.portal.spire.count-1)/2500:r;return a>=1.01?a:1.01}var Wt=function(){var r;return function(a){return r&&!a||(r=1e3,e.hasOwnProperty("pillars")&&Object.keys(e.pillars).forEach(function(i){e.pillars[i]&&(r-=12)})),r}}();function la(r){let a=Nr("gate");return Math.round(r/(a.supress>.01?a.supress:.01))}function ji(){let r=Math.round(650/mt(1,"hellArmy"));return k.gun_emplacement&&(r-=k.gun_emplacement*(e.tech.hell_gun>=2?2:1),r<0&&(r=0)),r}function an(){return br}function ir(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==4))return;let r=$("#portal");le(r),r.append($(`${t("tab_portal")} `)),!(!e.tech.portal||e.tech.portal<2)&&Object.keys(br).forEach(function(a){let i=a.replace("prtl_","");if(e.settings.portal[`${i}`]){let s=typeof br[a].info.name=="string"?br[a].info.name:br[a].info.name(),n="";if(br[a].info.hasOwnProperty("prop")&&(n=br[a].info.prop()),br[a].info.support){let c=br[a].info.support;br[a].info.hide_support?r.append(``):r.append(`
${s} {{ support }}/{{ s_max }} ${n} `),D({el:`#sr${a}`,data:e.portal[c],filters:{filter(){return br[a].info.filter(...arguments)}}})}else r.append(``);pe(a,function(){return typeof br[a].info.desc=="string"?br[a].info.desc:br[a].info.desc()},{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),a==="prtl_fortress"&&Us(r,!0),Object.keys(br[a]).forEach(function(c){if(c!=="info"&&Dr(br,a,c)){let l=br[a][c];Br(l,"portal",c)}})}})}function Jc(r,a){return Dr(br,r,a)}function Wi(r){switch(r){case"hostiles":return e.portal.fortress.threat>=2e3?`${t("fortress_threat",[e.portal.fortress.threat])} ${t("fortress_threat_high")}`:e.portal.fortress.threat<1e3?`${t("fortress_threat",[e.portal.fortress.threat])} ${t("fortress_threat_low")}`:`${t("fortress_threat",[e.portal.fortress.threat])} ${t("fortress_threat_medium")}`;case"threatLevel":{let a=e.portal.fortress.threat;return a<1e3?`${t("fortress_threat_level")} ${t("fortress_threat_level1")}`:a<1500?`${t("fortress_threat_level")} ${t("fortress_threat_level2")}`:a>=5e3?`${t("fortress_threat_level")} ${t("fortress_threat_level6")}`:a>=3e3?`${t("fortress_threat_level")} ${t("fortress_threat_level5")}`:a>=2e3?`${t("fortress_threat_level")} ${t("fortress_threat_level4")}`:`${t("fortress_threat_level")} ${t("fortress_threat_level3")}`}case"hireLabel":{let a=Math.round(vr("m_cost")).toLocaleString();return t("civics_garrison_hire_mercenary_cost",[a])}}}function Us(r,a){if(!e.settings.tabLoad)switch(e.settings.civTabs){case 1:if(e.settings.spaceTabs!==4)return;break;case 2:if(e.settings.govTabs!==3)return;break;default:return}if(!e.tech.portal||e.tech.portal<2)return;let i=a?"fort":"gFort",s=a?$(`
`):$("#gFort");a?r.append(s):(s.length>0?le(s):(s=$(`
`),r.append(s)),s.append(`
${t("portal_fortress_name")} ${t("hell_observation_button")} `));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($(`${t("civics_garrison_hire_mercenary")} `));var _=$('
');h.append(_),_.append($(`${t("civics_garrison")}: `));let m=e.tech.world_control&&!e.race.truepath?t("civics_garrison_peacekeepers"):t("civics_garrison_soldiers");_.append($(`${m} / {{ g.max | s_max }} | `)),_.append($(`${t("civics_garrison_crew")} {{ g.crew }} | `)),_.append($(`${t("civics_garrison_wounded")} {{ g.wounded }} `));let w=e.settings.theme==="light"?' type="is-light"':' type="is-dark"',M=$("
");h.append(M),M.append($(`${t("fortress_patrol_reports")} `)),M.append($(`${t("fortress_surv_reports")} `)),M.append($(`${t("fortress_nocrew")} `)),a&&s.append($(`${t("civics_garrison_training")} - ${t("arpa_to_complete")} {{ g.rate, g.progress | trainTime }} ${t("hell_observation_button")} {{ g.progress }}% `)),D({el:`#${i}`,data:{f:e.portal.fortress,g:e.civic.garrison,s:e.settings},methods:{defense(){return t("fortress_defense")},hostiles(){return Wi("hostiles")},threatLevel(){return Wi("threatLevel")},aNext(){let A=fe();e.portal.fortress.garrisone.civic.garrison.workers&&(e.portal.fortress.garrison=e.civic.garrison.workers),e.portal.fortress.assigned=e.portal.fortress.garrison,D({el:"#garrison"},"update"))},aLast(){let A=fe(),x=e.portal.fortress.patrols*e.portal.fortress.patrol_size;k.soul_forge&&(x+=ji()),e.portal.hasOwnProperty("guard_post")&&(x+=N(e.portal.guard_post.on)),e.portal.fortress.garrison>x&&(e.portal.fortress.garrison-=A,e.portal.fortress.garrison0&&(e.portal.fortress.patrols-=A,e.portal.fortress.patrols<0&&(e.portal.fortress.patrols=0))},patSizeInc(){let A=fe();e.portal.fortress.patrol_size1&&(e.portal.fortress.patrol_size-=A,e.portal.fortress.patrol_size<1&&(e.portal.fortress.patrol_size=1))},wall(){let A=e.portal.fortress.walls;return A>=75?"has-text-success":A<=25?"has-text-danger":"has-text-warning"},threaten(){let A=e.portal.fortress.threat;return A<1e3?"has-text-success":A>=2e3?"has-text-danger":"has-text-warning"},hire(){let A=fe(),x=!0;for(;x&&A>0;){let j=_s();e.civic.garrison.workers=j?(e.resource.Money.amount-=j,e.civic.garrison.workers++,e.civic.garrison.m_use++,e.portal.fortress.garrison++,e.portal.fortress.assigned=e.portal.fortress.garrison,D({el:"#garrison"},"update")):x=!1,A--}},hireLabel(){return Wi("hireLabel")},observation(){e.settings.civTabs=$("#mainTabs > nav ul li").length-1,e.settings.tabLoad||ys()}},filters:{defensive(A){return Ho(A)},patrolling(A){let x=A-e.portal.fortress.patrols*e.portal.fortress.patrol_size;if(k.soul_forge){let j=ji();j<=x&&(x-=j)}return e.portal.hasOwnProperty("guard_post")&&(x-=N(e.portal.guard_post.on)),x},threat(A){return A<1e3?t("fortress_threat_level1"):A<1500?t("fortress_threat_level2"):A>=5e3?t("fortress_threat_level6"):A>=3e3?t("fortress_threat_level5"):A>=2e3?t("fortress_threat_level4"):t("fortress_threat_level3")},trainTime(A,x){return A===0?At(-1):At((100-x)/(A*4))},stationed(){return We()},s_max(A){return We(!0)}}}),["hostiles","threatLevel","armyLabel","patLabel","patSizeLabel","hireLabel"].forEach(function(A){pe(`hf${i}${A}`,function(){switch(A){case"hostiles":return Wi("hostiles");case"threatLevel":return Wi("hostiles");case"armyLabel":return t("fortress_stationed");case"patLabel":return t("fortress_patrol_desc",[e.portal.fortress.patrols]);case"patSizeLabel":return t("fortress_patrol_size_desc",[e.portal.fortress.patrol_size]);case"hireLabel":return Wi("hireLabel")}},{elm:`#${i} span.${A}`})}),pe(`hf${i}observe`,function(){return t("hell_observation_tooltip")},{elm:`#${i} button.observe`})}function Ho(r){let a=r-e.portal.fortress.patrols*e.portal.fortress.patrol_size;if(k.soul_forge){let n=ji();n<=a&&(a-=n)}e.portal.hasOwnProperty("guard_post")&&(a-=N(e.portal.guard_post.on));let i=0;if(e.civic.garrison.wounded>e.civic.garrison.workers-e.portal.fortress.garrison&&(i=e.civic.garrison.wounded-(e.civic.garrison.workers-e.portal.fortress.garrison),i>a&&(i=a)),k.war_droid){let n=k.war_droid-e.portal.fortress.patrols>0?k.war_droid-e.portal.fortress.patrols:0;a+=e.tech.hdroid?N(n*2):N(n)}let s=e.tech.turret?e.tech.turret>=2?70:50:35;return Math.round(mt(a,"hellArmy",i))+(k.turret?k.turret*s:0)}function Go(r,a,i,s){let n=Math.round(Math.log2(r/e.portal.fortress.patrol_size/(a||1)))-Math.rand(0,a),c=0;if(n>0){n>e.portal.fortress.patrol_size&&(n=e.portal.fortress.patrol_size),n=Math.rand(i?1:0,n+1),c=Math.rand(0,n+1);let l=n-c;if(e.race.instinct){let o=Math.floor(c*(b.instinct.vars()[1]/100));c-=o,l+=o}s.wounded=l,s.died=c,e.civic.garrison.wounded+=l,e.civic.garrison.workers-=c,e.stats.died+=c}return c}function Uo(){let r={start:e.portal.fortress.threat,foundGems:0,stats:{wounded:0,died:0,revived:0,surveyors:0,sieges:0,kills:{drones:0,patrols:0,sieges:0,guns:0,soul_forge:0,turrets:0},gems:{patrols:0,guns:0,soul_forge:0,crafted:0,turrets:0,surveyors:0}}},a=e.tech.armor?e.tech.armor:0;e.race.armored&&(a+=b.armored.vars()[1]);let i=ve("tortoisan");i>0&&(a+=Math.floor(b.armored.vars(1)[1]*i)),e.race.scales&&(a+=b.scales.vars()[2]);let s=!1;if(k.soul_forge){let x=e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size;ji()<=x?(s=!0,$("#portal-soul_forge .on").removeClass("altwarn")):(s=!1,$("#portal-soul_forge .on").addClass("altwarn"))}else $("#portal-soul_forge .on").addClass("altwarn");let n=0;if(e.tech.portal>=3&&k.war_drone){r.drones={};for(let x=0;x=Math.rand(0,999)){let B=Math.rand(Math.floor(e.portal.fortress.threat/50),Math.floor(e.portal.fortress.threat/10)),S=e.tech.portal>=7?Math.rand(50,125):Math.rand(25,75);B=5?9e3:1e4)-e.portal.fortress.pity;if(e.race.universe==="evil"&&e.prestige.Dark.count>1){let x=e.prestige.Dark.count;e.prestige.Harmony.count>0&&(x*=1+e.prestige.Harmony.count*.01),l-=Math.round(Math.log2(x)*2)}e.tech.portal>=4&&k.attractor&&(l=Math.round(l*.948**k.attractor)),e.race.ghostly&&(l=Math.round(l*((100-b.ghostly.vars()[2])/100)));let o=ve("wendigo");o>0&&(l=Math.round(l*((100-b.ghostly.vars(1)[2]*o)/100))),l<12&&(l=12);let d=0,h=k.war_droid?k.war_droid:0,_=!1,m=0;e.civic.garrison.wounded>e.civic.garrison.workers-e.portal.fortress.garrison&&(m=e.civic.garrison.wounded-(e.civic.garrison.workers-e.portal.fortress.garrison),m>e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size?(m-=e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size,m/=e.portal.fortress.patrols):m=0);let w=+(m%1).toFixed(10);r.patrols={};for(let x=0;x1/e.portal.fortress.patrols*x?Math.ceil(m):Math.floor(m);if(Math.rand(0,e.portal.fortress.threat)>=Math.rand(0,999)){j.encounter=!0;let S=e.portal.fortress.patrol_size;h>0&&(j.droid=!0,S+=e.tech.hdroid?N(2):N(1),h--);let Q=Math.round(mt(S,"hellArmy",B)),V=Math.rand(Math.floor(e.portal.fortress.threat/50),Math.floor(e.portal.fortress.threat/10));e.race.blood_thirst&&(e.race.blood_thirst_count+=Math.rand(0,Math.ceil(V/10)),e.race.blood_thirst_count>b.blood_thirst.vars()[0]&&(e.race.blood_thirst_count=b.blood_thirst.vars()[0]));let ce=30+Math.max(e.race.chameleon?b.chameleon.vars()[1]:0,e.race.elusive?b.elusive.vars()[0]:0);if(Math.rand(0,ce)===0){j.ambush=!0,d+=Go(Math.round(V*(1+Math.random()*3)),0,!0,j);let Y=Math.round(Q/2);V0){let Ge=35-Math.floor(k.attractor/3);Ge<5&&(Ge=5);let Ce=Math.round(Y/Ge);for(let wr=0;wre.civic.garrison.workers&&(e.civic.garrison.wounded=e.civic.garrison.workers);let A=e.portal.fortress.nocrew?e.civic.garrison.workers-e.civic.garrison.crew:e.civic.garrison.workers;if(A0&&e.portal.fortress.notify==="Yes"&&(M>0?I(t("fortress_patrol_casualties_revive",[d,M]),!1,!1,["hell"]):I(t("fortress_patrol_casualties",[d]),!1,!1,["hell"])),e.portal.fortress.garrison>0&&e.portal.fortress.siege>0&&e.portal.fortress.siege--,e.portal.fortress.siege<=900&&e.portal.fortress.garrison>0&&1>Math.rand(0,e.portal.fortress.siege)){let x={destroyed:!1,damage:0,kills:0,surveyors:0,soldiers:0},j=Ho(e.portal.fortress.garrison),B=j/35>1?j/35:1,S=Math.round(e.portal.fortress.threat/2),Q=0,V=0,ce=!1;for(;S>0&&e.portal.fortress.walls>0;){let Y=Math.round(Math.rand(1,B+1));if(Y>S&&(Y=S),S-=Y,e.portal.fortress.threat-=Y,e.stats.dkills+=Y,s&&(e.portal.soul_forge.kills+=Y,oi(Y)),V+=Y,S>0&&(Q++,e.portal.fortress.walls--,e.portal.fortress.walls===0)){x.destroyed=!0,ce=!0;break}}x.damage=Q,x.kills=V,r.stats.kills.sieges=V,ce?(I(t("fortress_lost"),!1,!1,["hell"]),x.surveyors=e.civic.hell_surveyor.workers,e.resource[e.race.species].amount-=e.civic.hell_surveyor.workers,e.civic.hell_surveyor.workers=0,e.civic.hell_surveyor.assigned=0,x.soldiers=e.portal.fortress.garrison,r.stats.died+=e.portal.fortress.garrison,e.portal.fortress.patrols=0,e.stats.died+=e.portal.fortress.garrison,e.civic.garrison.workers-=e.portal.fortress.garrison,e.portal.fortress.garrison=0,e.portal.fortress.assigned=0):I(t("fortress_sieged",[V,Q]),!1,!1,["hell"]),e.portal.fortress.siege=999,r.stats.sieges++,r.siege=x}if(e.portal.fortress.threat<1e4){let x=(1e4-e.portal.fortress.threat)/2500+1;e.tech.portal>=4&&k.attractor&&(x*=1+k.attractor*.22);let j=Math.rand(Math.round(10*x),Math.round(50*x));e.portal.fortress.threat+=j,r.demons=j}if(e.civic.hell_surveyor.display&&e.civic.hell_surveyor.workers>0){let x=1e3,j=ge("nopain",1);j&&(x*=1+j/100),e.race.blurry&&(x*=1+b.blurry.vars()[0]/100);let B=ve("yeti");B>0&&(x*=1+b.blurry.vars(1)[0]/100*B),e.race.instinct&&(x*=1+b.instinct.vars()[0]/100),e.tech.infernite&&e.tech.infernite>=5&&(x+=250);let S=e.portal.fortress.threat/x,Q=e.civic.hell_surveyor.workers>10?10:e.civic.hell_surveyor.workers,V=10-Math.rand(0,Q+1);if(S>V){let ce=Math.round(S),Y=Math.rand(0,ce+1);Y>e.civic.hell_surveyor.workers&&(Y=e.civic.hell_surveyor.workers),Y===1&&e.portal.fortress.s_ntfy==="Yes"?I(t("fortress_killed"),!1,!1,["hell"]):Y>1&&e.portal.fortress.s_ntfy==="Yes"&&I(t("fortress_eviscerated",[Y]),!1,!1,["hell"]),Y>0&&(r.surveyors=Y,r.stats.surveyors=Y,e.civic.hell_surveyor.workers-=Y,e.civic.hell_surveyor.max-=Y,e.resource[e.race.species].amount-=Y,e.portal.carport.damaged+=Y)}if(r.surveyor_finds={},e.civic.hell_surveyor.workers>0&&n>0)for(let ce=0;ce100&&(Ge=100),Y.bodies=Ge,Ge>0){let Ce=25-Math.floor(k.attractor/5);Ce<5&&(Ce=5);let wr=Math.round(Ge/Ce);for(let Or=0;Or=1e6&&e.tech.gateway&&!e.tech.hell_pit&&(e.tech.hell_pit=1,e.settings.portal.pit=!0,I(t("portal_hell_pit_found"),"info",!1,["progress","hell"]),ir()),e.tech.hell_pit){if(s&&e.tech.hell_pit>=5&&k.soul_attractor){let j=e.blood.attract?e.blood.attract*5:0,B=k.soul_attractor*Math.rand(40+j,120+j);e.portal.soul_forge.kills+=B,r.soul_attractors=B,oi(B)}if(s&&e.tech.hell_gun&&k.gun_emplacement){r.gun_emplacements={};let j=0;for(let S=0;S=2?Math.rand(35,75):Math.rand(20,40);j+=Q,r.gun_emplacements[S+1].kills=Q}r.stats.kills.guns=j,e.portal.soul_forge.kills+=j,oi(j),e.stats.dkills+=j;let B=e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=5?6750:7500;e.tech.hell_pit>=7&&k.soul_attractor>0&&(B*=.94**k.soul_attractor);for(let S=0;S=5?4500:5e3;Math.rand(0,B)===0&&(r.soul_forge.gem=!0,r.stats.gems.soul_forge++,e.resource.Soul_Gem.amount++)}let x=e.tech.hell_pit>=6?75e4:1e6;if(e.tech.hell_pit>=7&&k.soul_attractor>0&&(x*=.97**k.soul_attractor),s&&e.portal.soul_forge.kills>=Math.round(x)){r.soul_forge.gem_craft=!0,e.portal.soul_forge.kills=0;let j=10-k.soul_attractor>0?10-k.soul_attractor:1;e.tech.high_tech>=16&&!e.tech.corrupt&&Math.rand(0,j+1)===0?(r.soul_forge.corrupt=!0,e.resource.Corrupt_Gem.amount++,e.resource.Corrupt_Gem.display=!0,I(t("portal_corrupt_gem"),"info",!1,["progress","hell"]),e.tech.corrupt=1,ue()):(e.resource.Soul_Gem.amount++,r.stats.gems.crafted++)}}if(e.tech.hell_gate&&e.tech.hell_gate>=3&&s&&k.gate_turret){r.gate_turrets={};let x=0,j=e.tech.hell_gun>=2?65:40,B=e.tech.hell_gun>=2?100:60;for(let Q=0;Q=5?2700:3e3;for(let Q=0;Q0&&(e.portal.soul_capacitor.energy+=r,e.portal.soul_capacitor.energy>e.portal.soul_capacitor.ecap&&(e.portal.soul_capacitor.energy=e.portal.soul_capacitor.ecap))}function Nr(r,a){switch(r){case"ruins":{let i=a||N(k.guard_post),s=(k.arcology||0)*75,n=mt(i,"hellArmy",0);e.race.holy&&(n*=1+b.holy.vars()[1]/100);let c=ve("unicorn");c>0&&(n*=1+b.holy.vars(1)[1]/100*c);let l=(n+s)/5e3;return{supress:l>1?1:l,rating:n+s}}case"gate":{let i=Nr("ruins",a),s=(k.gate_turret||0)*100;e.race.holy&&(s*=1+b.holy.vars()[1]/100);let n=ve("unicorn");n>0&&(s*=1+b.holy.vars(1)[1]/100*n);let c=(i.rating+s)/7500;return{supress:c>1?1:c,rating:i.rating+s}}default:return 0}}var xa={fire_elm:{weapon:{laser:1.05,flame:0,plasma:.25,kinetic:.5,missile:.5,sonic:1,shotgun:.75,tesla:.65},nozone:{freeze:!0,flooded:!0},amp:{hot:1.75,humid:.8,steam:.9}},water_elm:{weapon:{laser:.65,flame:.5,plasma:1,kinetic:.2,missile:.5,sonic:.5,shotgun:.25,tesla:.75},nozone:{hot:!0,freeze:!0},amp:{steam:1.5,river:1.1,flooded:2,rain:1.75,humid:1.25}},rock_golem:{weapon:{laser:1,flame:.5,plasma:1,kinetic:.65,missile:.95,sonic:.75,shotgun:.35,tesla:0},nozone:{},amp:{}},bone_golem:{weapon:{laser:.45,flame:.35,plasma:.55,kinetic:1,missile:1,sonic:.75,shotgun:.75,tesla:.15},nozone:{},amp:{}},mech_dino:{weapon:{laser:.85,flame:.05,plasma:.55,kinetic:.45,missile:.5,sonic:.35,shotgun:.5,tesla:1},nozone:{},amp:{}},plant:{weapon:{laser:.42,flame:1,plasma:.65,kinetic:.2,missile:.25,sonic:.75,shotgun:.35,tesla:.38},nozone:{},amp:{}},crazed:{weapon:{laser:.5,flame:.85,plasma:.65,kinetic:1,missile:.35,sonic:.15,shotgun:.95,tesla:.6},nozone:{},amp:{}},minotaur:{weapon:{laser:.32,flame:.5,plasma:.82,kinetic:.44,missile:1,sonic:.15,shotgun:.2,tesla:.35},nozone:{},amp:{}},ooze:{weapon:{laser:.2,flame:.65,plasma:1,kinetic:0,missile:0,sonic:.85,shotgun:0,tesla:.15},nozone:{},amp:{}},zombie:{weapon:{laser:.35,flame:1,plasma:.45,kinetic:.08,missile:.8,sonic:.18,shotgun:.95,tesla:.05},nozone:{},amp:{}},raptor:{weapon:{laser:.68,flame:.55,plasma:.85,kinetic:1,missile:.44,sonic:.22,shotgun:.33,tesla:.66},nozone:{},amp:{}},frost_giant:{weapon:{laser:.9,flame:.82,plasma:1,kinetic:.25,missile:.08,sonic:.45,shotgun:.28,tesla:.5},nozone:{hot:!0},amp:{freeze:2.5,hail:1.65}},swarm:{weapon:{laser:.02,flame:1,plasma:.04,kinetic:.01,missile:.08,sonic:.66,shotgun:.38,tesla:.45},nozone:{},amp:{}},dragon:{weapon:{laser:.18,flame:0,plasma:.12,kinetic:.35,missile:1,sonic:.22,shotgun:.65,tesla:.15},nozone:{},amp:{}},mech_dragon:{weapon:{laser:.84,flame:.1,plasma:.68,kinetic:.18,missile:.75,sonic:.22,shotgun:.28,tesla:1},nozone:{},amp:{}},construct:{weapon:{laser:.5,flame:.2,plasma:.6,kinetic:.34,missile:.9,sonic:.08,shotgun:.28,tesla:1},nozone:{},amp:{}},beholder:{weapon:{laser:.75,flame:.15,plasma:1,kinetic:.45,missile:.05,sonic:.01,shotgun:.12,tesla:.3},nozone:{},amp:{}},worm:{weapon:{laser:.55,flame:.38,plasma:.45,kinetic:.2,missile:.05,sonic:1,shotgun:.02,tesla:.01},nozone:{},amp:{}},hydra:{weapon:{laser:.85,flame:.75,plasma:.85,kinetic:.25,missile:.45,sonic:.5,shotgun:.6,tesla:.65},nozone:{},amp:{}},colossus:{weapon:{laser:1,flame:.05,plasma:.75,kinetic:.45,missile:1,sonic:.35,shotgun:.35,tesla:.5},nozone:{},amp:{}},lich:{weapon:{laser:.1,flame:.1,plasma:.1,kinetic:.45,missile:.75,sonic:.35,shotgun:.75,tesla:.5},nozone:{},amp:{}},ape:{weapon:{laser:1,flame:.95,plasma:.85,kinetic:.5,missile:.5,sonic:.05,shotgun:.35,tesla:.68},nozone:{},amp:{}},bandit:{weapon:{laser:.65,flame:.5,plasma:.85,kinetic:1,missile:.5,sonic:.25,shotgun:.75,tesla:.25},nozone:{},amp:{}},croc:{weapon:{laser:.65,flame:.05,plasma:.6,kinetic:.5,missile:.5,sonic:1,shotgun:.2,tesla:.75},nozone:{},amp:{}},djinni:{weapon:{laser:0,flame:.35,plasma:1,kinetic:.15,missile:0,sonic:.65,shotgun:.22,tesla:.4},nozone:{},amp:{}},snake:{weapon:{laser:.5,flame:.5,plasma:.5,kinetic:.5,missile:.5,sonic:.5,shotgun:.5,tesla:.5},nozone:{},amp:{}},centipede:{weapon:{laser:.5,flame:.85,plasma:.95,kinetic:.65,missile:.6,sonic:0,shotgun:.5,tesla:.01},nozone:{},amp:{}},spider:{weapon:{laser:.65,flame:1,plasma:.22,kinetic:.75,missile:.15,sonic:.38,shotgun:.9,tesla:.18},nozone:{},amp:{}},manticore:{weapon:{laser:.05,flame:.25,plasma:.95,kinetic:.5,missile:.15,sonic:.48,shotgun:.4,tesla:.6},nozone:{},amp:{}},fiend:{weapon:{laser:.75,flame:.25,plasma:.5,kinetic:.25,missile:.75,sonic:.25,shotgun:.5,tesla:.5},nozone:{},amp:{}},bat:{weapon:{laser:.16,flame:.18,plasma:.12,kinetic:.25,missile:.02,sonic:1,shotgun:.9,tesla:.58},nozone:{},amp:{}},medusa:{weapon:{laser:.35,flame:.1,plasma:.3,kinetic:.95,missile:1,sonic:.15,shotgun:.88,tesla:.26},nozone:{},amp:{}},ettin:{weapon:{laser:.5,flame:.35,plasma:.8,kinetic:.5,missile:.25,sonic:.3,shotgun:.6,tesla:.09},nozone:{},amp:{}},faceless:{weapon:{laser:.6,flame:.28,plasma:.6,kinetic:0,missile:.05,sonic:.8,shotgun:.15,tesla:1},nozone:{},amp:{}},enchanted:{weapon:{laser:1,flame:.02,plasma:.95,kinetic:.2,missile:.7,sonic:.05,shotgun:.65,tesla:.01},nozone:{},amp:{}},gargoyle:{weapon:{laser:.15,flame:.4,plasma:.3,kinetic:.5,missile:.5,sonic:.85,shotgun:1,tesla:.2},nozone:{},amp:{}},chimera:{weapon:{laser:.38,flame:.6,plasma:.42,kinetic:.85,missile:.35,sonic:.5,shotgun:.65,tesla:.8},nozone:{},amp:{}},gorgon:{weapon:{laser:.65,flame:.65,plasma:.65,kinetic:.65,missile:.65,sonic:.65,shotgun:.65,tesla:.65},nozone:{},amp:{}},kraken:{weapon:{laser:.75,flame:.35,plasma:.75,kinetic:.35,missile:.5,sonic:.18,shotgun:.05,tesla:.85},nozone:{},amp:{}},homunculus:{weapon:{laser:.05,flame:1,plasma:.1,kinetic:.85,missile:.65,sonic:.5,shotgun:.75,tesla:.2},nozone:{},amp:{}}};function ha(r,a){let i=9999,s=1e7;switch(r){case"small":{let n=e.blood.prepared&&e.blood.prepared>=2?5e4:75e3;s=a?n*2.5:n,i=a?20:1}break;case"medium":s=a?45e4:18e4,i=a?100:4;break;case"large":s=a?925e3:375e3,i=a?500:20;break;case"titan":s=a?15e5:75e4,i=a?1500:75;break;case"collector":{let n=e.blood.prepared&&e.blood.prepared>=2?8e3:1e4;s=a?n*2.5:n,i=1}break}return{s:i,c:s}}function qu(r){let a="laser",i="laser";return Object.keys(xa[r].weapon).forEach(function(s){xa[r].weapon[s]>xa[r].weapon[a]&&(a=s),xa[r].weapon[s]');r.append(a);let i=$(`${t("portal_mech_assembly")} - {{ b.size | slabel }} {{ b.chassis | clabel }}
`);a.append(i),i.append(` | ${t("portal_mech_bay_space")} : {{ m.bay }} / {{ m.max }} `),i.append(` | ${t("portal_mech_sup_avail")} : {{ p.supply | round }} / {{ p.sup_max }} `);let s=e.blood.prepared&&e.blood.prepared>=3?`${t("portal_mech_infernal")} (${t("portal_mech_infernal_effect",[25])}) `:"";a.append(`${t("portal_mech_space")} {{ b.size | bay }} | ${t("portal_mech_cost")} {{ b.size | price }} | ${t("portal_mech_soul",[e.resource.Soul_Gem.name])} {{ b.size | soul }} ${s}
`),a.append("{{ b.size | desc }}
");let n=$('
');a.append(n);let c="";["small","medium","large","titan","collector"].forEach(function(h,_){c+=`${t(`portal_mech_size_${h}`)} `}),n.append(`
+ `),m+="",a.append(m),D({el:"#celestialLab",data:{p:_,w:i},methods:{pEdit(){_.pts=Js(_,r?i:!1)},setPlanet(){if(Js(_)>=0){Object.keys(_.geology).forEach(function(F){_.geology[F]===0?delete _.geology[F]:_.geology[F]/=100}),e.custom.hasOwnProperty("planet")||(e.custom.planet={});let w=ot();e.custom.planet.hasOwnProperty(w)||(e.custom.planet[w]={s:!1});let M="s";e.custom.planet[w][M]=Ke(_),delete e.custom.planet[w][M].pts,io(_)}},reset(){_.traitlist=[],Object.keys(_.geology).forEach(function(w){_.geology[w]=0}),_.pts=Js(_,r?i:!1)},less(w){_.geology[w]-=fe(),_.geology[w]<-20&&(_.geology[w]=-20)},more(w){_.geology[w]+=fe();let M=30;e.stats.achieve.whitehole&&(M+=e.stats.achieve.whitehole.l*5),_.biome==="eden"&&(M+=5),_.geology[w]>M&&(_.geology[w]=M)}},filters:{res(w){return _.geology[w]}}})}function Js(r,a){let i=(r.biome==="eden"?0:10)+(e.stats.achieve.lamentis?e.stats.achieve.lamentis.l*10:0);e.race.truepath&&(i*=2),i-=r.traitlist.length**3;let s=0;return Object.keys(r.geology).forEach(function(n){r.geology[n]!==0&&(i-=r.geology[n],s++)}),s>3&&(i-=(s-3)**2),i}var si={unemployed:function(r){let a=t("job_unemployed_desc");return e.civic.d_job==="unemployed"&&!r&&(a=a+" "+t("job_default",[t("job_unemployed")])),a},hunter:function(r){let a=t("job_hunter_desc",[e.resource.Food.name]);return e.race.unfathomable&&(a=t("job_eld_hunter_desc")),e.race.artifical?a=e.race.soul_eater?t("job_art_demon_hunter_desc",[e.resource.Furs.name,e.resource.Lumber.name]):t("job_art_hunter_desc",[e.resource.Furs.name]):e.race.soul_eater&&e.race.species!=="wendigo"&&(a=t(e.race.evil?"job_evil_hunter_desc":"job_not_evil_hunter_desc",[e.resource.Food.name,e.resource.Lumber.name,e.resource.Furs.name])),e.civic.d_job==="hunter"&&!r&&(a=a+" "+t("job_default",[e.race.unfathomable?t("job_raider"):t("job_hunter")])),a},forager:function(r){let a=t("job_forager_desc");return e.civic.d_job==="forager"&&!r&&(a=a+" "+t("job_default",[t("job_forager")])),a},farmer:function(r){let a=+Oi(!0,r).toFixed(2),i=+Oi(!1,r).toFixed(2);r||(a=+ye(a,"farmer").toFixed(2),i=+ye(i,"farmer").toFixed(2));let s=e.race.high_pop&&!r?t("job_farmer_desc_hp",[a,e.resource.Food.name,N(1),i,N(1)*e.city.farm.count]):t("job_farmer_desc",[a,e.resource.Food.name,e.city.farm.count,i]);return e.civic.d_job==="farmer"&&!r&&(s=s+" "+t("job_default",[t("job_farmer")])),s},lumberjack:function(r){let a=r&&e.race.servants?e.race.servants.jobs.lumberjack:e.civic.lumberjack.workers,i=e.civic.lumberjack.impact;if(r||(a=+ye(a,"lumberjack").toFixed(2),i=+ye(i,"lumberjack").toFixed(2)),e.race.evil&&(!e.race.soul_eater||e.race.species==="wendigo")){let s=1;r||(s*=$t(a,"lumberjack"));let n=+(i*s).toFixed(2),c=+(i/4*s).toFixed(2),l=e.race.species==="wendigo"?t("job_reclaimer_desc2",[n]):t("job_reclaimer_desc",[n,c]);return e.civic.d_job==="lumberjack"&&!r&&(l=l+" "+t("job_default",[t("job_reclaimer")])),l}else{let s=(e.tech.axe&&e.tech.axe>0?(e.tech.axe-1)*.35:0)+1;r||(s*=$t(a,"lumberjack")),e.city.biome==="forest"&&(i*=qe.forest.vars()[0]),e.city.biome==="savanna"&&(i*=qe.savanna.vars()[2]),e.city.biome==="desert"&&(i*=qe.desert.vars()[2]),e.city.biome==="swamp"&&(i*=qe.swamp.vars()[2]),e.city.biome==="taiga"&&(i*=qe.taiga.vars()[0]);let n=+(i*s).toFixed(2),c=t("job_lumberjack_desc",[n,e.resource.Lumber.name]);return e.civic.d_job==="lumberjack"&&!r&&(c=c+" "+t("job_default",[t("job_lumberjack")])),c}},quarry_worker:function(r){let a=r&&e.race.servants?e.race.servants.jobs.quarry_worker:e.civic.quarry_worker.workers,i=e.civic.quarry_worker.impact;r||(a=+ye(a,"quarry_worker").toFixed(2),i=+ye(i,"quarry_worker").toFixed(2));let s=(e.tech.hammer&&e.tech.hammer>0?e.tech.hammer*.4:0)+1;r||(s*=$t(a,"miner")),e.city.biome==="desert"&&(s*=qe.desert.vars()[0]),e.city.biome==="swamp"&&(s*=qe.swamp.vars()[3]),e.tech.explosives&&e.tech.explosives>=2&&(s*=e.tech.explosives>=3?1.75:1.5);let n=+(i*s).toFixed(1),c=e.resource.Aluminium.display?t("job_quarry_worker_desc2",[n,e.resource.Stone.name,e.resource.Aluminium.name]):t("job_quarry_worker_desc1",[n,e.resource.Stone.name]);return e.race.smoldering&&(c=c+" "+t("job_quarry_worker_smoldering",[e.resource.Chrysotile.name])),e.civic.d_job==="quarry_worker"&&!r&&(c=c+" "+t("job_default",[t("job_quarry_worker")])),c},crystal_miner:function(r){let a=r&&e.race.servants?e.race.servants.jobs.crystal_miner:e.civic.crystal_miner.workers,i=e.civic.crystal_miner.impact,s=1;r||(a=+ye(a,"crystal_miner").toFixed(2),i=+ye(i,"crystal_miner").toFixed(2),s*=$t(a,"miner"));let n=+(i*s).toFixed(2),c=t("job_crystal_miner_desc",[n,e.resource.Crystal.name]);return e.civic.d_job==="crystal_miner"&&!r&&(c=c+" "+t("job_default",[t("job_crystal_miner")])),c},scavenger:function(r){let a=b.scavenger.vars()[0];e.city.ptrait.includes("trashed")&&e.race.scavenger&&(a*=1+b.scavenger.vars()[1]/100),e.race.high_pop&&!r&&(a*=b.high_pop.vars()[1]/100),r||(a=+ye(a,"scavenger").toFixed(2));let i=t("job_scavenger_desc",[A[e.race.species].home,a]);return e.civic.d_job==="scavenger"&&!r&&(i=i+" "+t("job_default",[t("job_scavenger")])),i},teamster:function(r){let a=t("job_teamster_desc",[En()]);return e.civic.d_job==="teamster"&&!r&&(a=a+" "+t("job_default",[t("job_teamster")])),a},meditator:function(r){let a=t("job_meditator_desc");return e.civic.d_job==="meditator"&&!r&&(a=a+" "+t("job_default",[t("job_meditator")])),a},torturer:function(){return t("job_torturer_desc")},miner:function(){return e.tech.mining>=3?e.race.sappy&&e.tech.alumina?t("job_miner_desc2_amber"):t("job_miner_desc2"):t("job_miner_desc1")},coal_miner:function(){return e.tech.uranium?t("job_coal_miner_desc2"):t("job_coal_miner_desc1")},craftsman:function(){return t("job_craftsman_desc")},cement_worker:function(){let r=e.race.high_pop?3/b.high_pop.vars()[0]:3;e.city.biome==="ashland"&&(r*=qe.ashland.vars()[1]),r=+ye(r,"cement_worker").toFixed(2);let a=+ye(e.civic.cement_worker.impact,"cement_worker").toFixed(2),i=e.tech.cement>=4?1.2:1,s=$t(e.civic.cement_worker.workers,"factory"),n=a*i*s;return e.city.biome==="ashland"&&(n*=qe.ashland.vars()[1]),n=+n.toFixed(2),e.race.sappy?t("job_cement_worker_amber_desc",[n]):t("job_cement_worker_desc",[n,r])},banker:function(){let r=+ye(e.civic.banker.impact,"banker").toFixed(2)*100;return e.tech.banking>=10&&(r+=2*e.tech.stock_exchange),e.race.truthful&&(r*=1-b.truthful.vars()[0]/100),e.civic.govern.type==="republic"&&(r*=1.25),e.race.high_pop&&(r*=b.high_pop.vars()[1]/100),r=+r.toFixed(0),t("job_banker_desc",[r])},entertainer:function(){let r=e.tech.theatre;e.race.musical&&(r+=b.musical.vars()[0]),e.race.emotionless&&(r*=1-b.emotionless.vars()[0]/100),e.race.high_pop&&(r*=b.high_pop.vars()[1]/100),r=+ye(r,"entertainer").toFixed(2);let a=e.race.high_pop?b.high_pop.vars()[1]/100:1;return a=+ye(a,"entertainer").toFixed(2),e.tech.superstar?t("job_entertainer_desc2",[r,a]):t("job_entertainer_desc",[+r.toFixed(2)])},priest:function(){let r="";return e.civic.govern.type==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display?r=t("job_priest_desc2"):r=t("job_priest_desc"),e.tech.cleric&&(r=r+` ${t("job_priest_desc3")}`),r},professor:function(){let r=+ye(1,"professor"),a=+(e.race.studious?e.civic.professor.impact+b.studious.vars()[0]:e.civic.professor.impact),i=ve("elven");return i>0&&(a+=b.studious.vars(1)[0]*i),r*=a,r*=e.race.pompous?1-b.pompous.vars()[0]/100:1,r*=$t(e.civic.professor.workers,"science"),e.tech.anthropology&&e.tech.anthropology>=3&&(r*=1+e.city.temple.count*.05),e.civic.govern.type==="theocracy"&&(r*=.75),r=+r.toFixed(2),t("job_professor_desc",[r])},scientist:function(){let r=+ye(e.civic.scientist.impact,"scientist").toFixed(2);return r*=$t(e.civic.scientist.workers,"science"),e.tech.science>=6&&e.city.wardenclyffe&&(r*=1+e.civic.professor.workers*e.city.wardenclyffe.on*.01),e.space.satellite&&(r*=1+e.space.satellite.count*.01),e.civic.govern.type==="theocracy"&&(r*=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?.75:.6:.5),r=+r.toFixed(2),e.race.universe==="magic"?t("job_wizard_desc",[r,+(.025*ft("magic")).toFixed(4)]):t("job_scientist_desc",[r])},colonist(){return t(e.race.truepath?"job_colonist_desc_tp":"job_colonist_desc",[W().red])},titan_colonist(){return t("job_colonist_desc_tp",[W().titan])},space_miner(){return t("job_space_miner_desc")},hell_surveyor(){return t("job_hell_surveyor_desc")},archaeologist(){let r=(k.arcology||0)*75,a=(mt(e.portal.guard_post.on,"hellArmy",0)+r)/5e3;a=a>1?1:a;let i=25e4;e.race.high_pop&&(i*=b.high_pop.vars()[1]/100);let s=Math.round(i*a);return t("job_archaeologist_desc",[s.toLocaleString()])},pit_miner(){return t("job_pit_miner_desc",[t("tau_planet",[A[e.race.species].home])])},crew(){return t("job_crew_desc")}};function $i(r){r||$("#civics").append($(`${t("civics_jobs")} `)),At("unemployed",r,0,0,"warning"),At("hunter",r,0,0),At("forager",r,0,0),At("farmer",r,.82,5),At("lumberjack",r,1,5),At("quarry_worker",r,1,5),At("crystal_miner",r,.1,5),At("scavenger",r,.12,5),At("teamster",r,1,e.tech.teamster?6:4),At("meditator",r,1,5),At("torturer",r,1,3,"advanced"),At("miner",r,1,4,"advanced"),At("coal_miner",r,.2,4,"advanced"),At("craftsman",r,1,5,"advanced"),At("cement_worker",r,.4,5,"advanced"),At("entertainer",r,1,10,"advanced"),At("priest",r,1,3,"advanced"),At("professor",r,.5,6,"advanced"),At("scientist",r,1,5,"advanced"),At("banker",r,.1,6,"advanced"),At("colonist",r,1,5,"advanced"),At("titan_colonist",r,1,5,"advanced"),At("space_miner",r,1,5,"advanced"),At("hell_surveyor",r,1,1,"advanced"),At("archaeologist",r,1,1,"advanced"),At("pit_miner",r,1,4.5,"advanced"),At("crew",r,1,4,"alert"),!r&&!e.race.start_cataclysm&&(Lt(),e.race.servants&&oc())}function ye(r,a){return e.race.strong&&["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].includes(a)&&(r*=b.strong.vars()[1]),(e.race.swift||e.race.living_tool)&&["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].includes(a)&&(r*=b.strong.vars(.25)[1]),e.race.lone_survivor&&(["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].includes(a)?r*=80:["craftsman"].includes(a)?r*=60:["miner","coal_miner","cement_worker","banker","entertainer","priest","pit_miner"].includes(a)?r*=45:["professor","scientist"].includes(a)&&(r*=125)),r}function N(r){return e.race.high_pop?r*b.high_pop.vars()[0]:r}function tn(r){let a="";e.race.unfathomable&&r==="hunter"?a=t("job_raider"):e.race.universe==="magic"&&r==="scientist"?a=t("job_wizard"):e.race.truepath&&r==="colonist"?a=t("job_colonist_tp",[W().red]):r==="titan_colonist"?a=t("job_colonist_tp",[W().titan]):a=r==="lumberjack"&&e.race.evil&&(!e.race.soul_eater||e.race.species==="wendigo")?t("job_reclaimer"):t("job_"+r),e.civic[r].name=a}function At(r,a,i,s,n){let c=!1;if(a==="servant"&&(c=!0,a=!1),e.civic[r]||(e.civic[r]={job:r,display:!1,workers:0,max:0,impact:i}),tn(r),e.civic[r].assigned||(e.civic[r].assigned=r==="craftsman"?0:e.civic[r].workers),c||(e.civic[r].stress=s,e.civic[r].impact=i),!(r==="craftsman"||a)){var l=c?"servant-"+r:"civ-"+r,o=$(`
`),d=c?$('
'):$(`
`);if(!n||r==="unemployed"){n=n||"info";let m=c?$(`
{{ civic.${r}.name }} {{ sjob.${r} }} `):$(``);o.append(m)}else{let m=$(`
{{ civic.${r}.name }} {{ civic.${r}.workers | adjust('${r}') }} / {{ civic.${r}.max | adjust('${r}') }} `);o.append(m)}if(o.append(d),$(c?"#servants":"#jobs").append(o),r!=="crew"){var h=$(`« `),_=$(`» `);d.append(h),d.append(_)}c?D({el:`#${l}`,data:{civic:e.civic,sjob:e.race.servants.jobs},methods:{showJob(m){return e.civic[m].display||m==="scavenger"&&e.race.servants.force_scavenger},add(){let m=fe();for(let w=0;we.race.servants.used;w++)e.race.servants.jobs[r]++,e.race.servants.used++},sub(){let m=fe();for(let w=0;w0;w++)e.race.servants.jobs[r]--,e.race.servants.used--}}}):D({el:`#${l}`,data:{civic:e.civic},methods:{showJob(m){return e.civic[m].display},add(){let m=fe();for(let w=0;w0);w++)e.civic[r].workers++,e.civic[e.civic.d_job].workers--,e.civic[r].assigned=e.civic[r].workers},sub(){let m=fe();for(let w=0;w0;w++)e.civic[r].workers--,e.civic[e.civic.d_job].workers++,e.civic[r].assigned=e.civic[r].workers},level(m){return e.civic[m].workers===0?"count has-text-danger":e.civic[m].workers===e.civic[m].max?"count has-text-success":e.civic[m].workers<=e.civic[m].max/3?"count has-text-caution":e.civic[m].workers<=e.civic[m].max*.66?"count has-text-warning":e.civic[m].workers0)return w}return m},adjust(m,w){return w==="titan_colonist"&&k.ai_colonist?m+N(k.ai_colonist):m}}}),pe(l,function(){return si[r](c)},{elm:`#${l} .job_label`,classes:"has-background-light has-text-dark"})}}function oc(){if(le($("#servants")),e.race.servants){var r=$(`{{ s.used }} / {{ s.max }}
`);$("#servants").append(r),["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].forEach(function(a){At(a,"servant")}),D({el:"#servantList",data:{s:e.race.servants},methods:{level(){return e.race.servants.used===0?"count has-text-danger":e.race.servants.used===e.race.servants.max?"count has-text-success":e.race.servants.used<=e.race.servants.max/3?"count has-text-caution":e.race.servants.used<=e.race.servants.max*.66?"count has-text-warning":e.race.servants.used=2?1.15:.65),e.race.living_tool&&!a?i*=1+b.living_tool.vars()[0]*(e.tech.science&&e.tech.science>0?e.tech.science/5:0):i*=1+(e.tech.hoe&&e.tech.hoe>0?e.tech.hoe/3:0),i*=e.city.biome==="grassland"?qe.grassland.vars()[0]:1,i*=e.city.biome==="savanna"?qe.savanna.vars()[0]:1,i*=e.city.biome==="ashland"?qe.ashland.vars()[0]:1,i*=e.city.biome==="volcanic"?qe.volcanic.vars()[0]:1,i*=e.city.biome==="hellscape"?qe.hellscape.vars()[0]:1,i*=e.city.ptrait.includes("trashed")?Re.trashed.vars()[0]:1,a?i*=pr(e.race.servants.jobs.farmer,"farmer"):i*=$t(e.civic.farmer.workers,"farmer"),i*=e.tech.agriculture>=7?1.1:1,i*=e.race.low_light?1-b.low_light.vars()[0]/100:1,i}function Lt(r){if(le($(r?"#skilledServants":"#foundry")),e.city.foundry&&e.city.foundry.count>0||e.race.cataclysm||e.race.orbit_decayed||e.tech.isolation){let a=$(r?"#skilledServants":"#foundry"),i=r?"{{ s.sused }} / {{ s.smax }}":"{{ f.crafting }} / {{ c.max }}",s=$(`
${t(r?"civics_skilled_servants":"craftsman_assigned")} ${i} `);a.append(s);let n=Ve("summer"),c=["Plywood","Brick","Wrought_Iron","Sheet_Metal","Mythril","Aerogel","Nanoweave"];r||(c.push("Scarletite"),c.push("Quantium")),n&&!r&&c.push("Thermite");for(let o=0;o');a.append(_);let m=$('
'),w;if(d==="Scarletite"&&e.portal.hasOwnProperty("hell_forge"))w=$(`
${h} {{ f.${d} }} / {{ p.on | maxScar }} `);else if(d==="Quantium"&&(e.space.hasOwnProperty("zero_g_lab")||e.tauceti.hasOwnProperty("infectious_disease_lab")))w=$(`
${h} {{ f.${d} }} / {{ e.on | maxQuantium }} `);else{let x=r?`{{ s.sjobs.${d} }}`:`{{ f.${d} }}`,j=r?`scraft${d}`:`craft${d}`;w=$(`
${h} ${x} `)}_.append(w),_.append(m),a.append(_);let M=$(`« `),F=$(`» `);m.append(M),m.append(F)}}let l=e.portal.hasOwnProperty("hell_forge")?{c:e.civic.craftsman,p:e.portal.hell_forge}:{c:e.civic.craftsman,e:e.space.hasOwnProperty("zero_g_lab")||e.tauceti.hasOwnProperty("infectious_disease_lab")?e.tech.isolation?e.tauceti.infectious_disease_lab:e.space.zero_g_lab:{count:0,on:0}};r?l.s=e.race.servants:l.f=e.city.foundry,D({el:r?"#skilledServants":"#foundry",data:l,methods:{add(o){let d=fe(),h=-1;(o==="Scarletite"||o==="Quantium")&&(h=en(o));for(let _=0;_0&&(h===-1||h>e.city.foundry[o]))e.civic.craftsman.workers++,e.city.foundry.crafting++,e.city.foundry[o]++,e.civic[e.civic.d_job].workers--;else break},sub(o){let d=fe();for(let h=0;h0)e.race.servants.sjobs[o]--,e.race.servants.sused--;else break;else if(e.city.foundry[o]>0)e.city.foundry[o]--,e.civic.craftsman.workers--,e.city.foundry.crafting--,e.civic[e.civic.d_job].workers++;else break},level(){let o=r?e.race.servants.sused:e.civic.craftsman.workers,d=r?e.race.servants.smax:e.civic.craftsman.max;return o===0?"count has-text-danger":o===d?"count has-text-success":o<=d/3?"count has-text-caution":o<=d*.66?"count has-text-warning":o"),w=e.resource[d].name,F=Ua(d,"auto").multiplier,x=e.genes.crafty?2:1,j=+e.resource[d].diff.toFixed(2),B=+(F*100).toFixed(0);m.append($(`${t("craftsman_hover_bonus",[B.toLocaleString(),w])}
`)),m.append($(`${t("craftsman_hover_prod",[j.toLocaleString(),w])}
`));let S=wa();for(let Q=0;Q0&&(V-=b.resourceful.vars(1)[0]/100*ce);let Y=+(S[d][Q].a*e.city.foundry[d]*V*x/140).toFixed(2);m.append($(`${t("craftsman_hover_cost",[Y,e.resource[S[d][Q].r].name])}
`))}return m},_=r?`scraft${d}`:`craft${d}`;rn(_,d,"auto",h)}}r?pe("servantFoundry",function(){return t("civics_skilled_servants_desc")},{elm:"#skilledServants .foundry",classes:"has-background-light has-text-dark"}):pe("craftsmenFoundry",function(){return t("job_craftsman_hover")},{elm:"#foundry .foundry",classes:"has-background-light has-text-dark"}),e.race.servants&&!r&&e.race.servants.smax>0&&Lt(!0)}}var br={prtl_fortress:{info:{name:t("portal_fortress_name"),desc:t("portal_fortress_desc"),repair(){let r=200;return k.repair_droid&&(r*=.95**k.repair_droid),Math.round(r)}},turret:{id:"portal-turret",title(){let r=e.tech.turret?e.tech.turret>=2?"portal_turret_title3":"portal_turret_title2":"portal_turret_title1";return t(r)},desc(){let r=e.tech.turret?e.tech.turret>=2?"portal_turret_title3":"portal_turret_title2":"portal_turret_title1";return`
${t(r)}
${t("requires_power")}
`},reqs:{portal:2},cost:{Money(r){return f("turret",r,35e4,1.28,"portal")},Copper(r){return f("turret",r,5e4,1.28,"portal")},Adamantite(r){return f("turret",r,8e3,1.28,"portal")},Elerium(r){return f("turret",r,15,1.28,"portal")},Nano_Tube(r){return f("turret",r,28e3,1.28,"portal")}},powered(){return _e(e.tech.turret?4+e.tech.turret:4)},postPower(r){k.turret=e.portal.turret.on,D({el:"#fort"},"update")},effect(){let r=e.tech.turret?e.tech.turret>=2?70:50:35,a=$(this)[0].powered();return`
${t("portal_turret_effect",[r])}
${t("minus_power",[a])}
`},action(){return u($(this)[0])?(ne("turret","portal"),re($(this)[0])&&(k.turret++,D({el:"#fort"},"update")),!0):!1}},carport:{id:"portal-carport",title:t("portal_carport_title"),desc(){return t("portal_carport_desc",[1])},reqs:{portal:2},cost:{Money(r){return f("carport",r,25e4,1.3,"portal")},Cement(r){return f("carport",r,18e3,1.3,"portal")},Oil(r){return f("carport",r,6500,1.3,"portal")},Plywood(r){return f("carport",r,8500,1.3,"portal")}},repair(){let r=180;return k.repair_droid&&(r*=.92**k.repair_droid),Math.round(r)},effect(){return`${t("portal_carport_effect",[1])}`},action(){return u($(this)[0])?(ne("carport","portal"),e.civic.hell_surveyor.display=!0,e.civic.hell_surveyor.max+=N(1),e.resource.Infernite.display=!0,e.tech.infernite||(e.tech.infernite=1,ue()),!0):!1}},war_droid:{id:"portal-war_droid",title:t("portal_war_droid_title"),desc(){return`
${t("portal_war_droid_title")}
${t("requires_power")}
`},reqs:{portal:5},cost:{Money(r){return f("war_droid",r,495e3,1.26,"portal")},Neutronium(r){return f("war_droid",r,1250,1.26,"portal")},Elerium(r){return f("war_droid",r,18,1.26,"portal")},Stanene(r){return f("war_droid",r,37500,1.26,"portal")},Soul_Gem(r){return f("war_droid",r,1,1.26,"portal")}},powered(){return _e(2)},effect(){return`
${t("portal_war_droid_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("war_droid","portal"),re($(this)[0]),!0):!1},flair:t("portal_war_droid_flair")},repair_droid:{id:"portal-repair_droid",title:t("portal_repair_droid_title"),desc(){return`
${t("portal_repair_droid_title")}
${t("requires_power")}
`},reqs:{portal:6},cost:{Money(r){return f("repair_droid",r,444e3,1.26,"portal")},Iron(r){return f("repair_droid",r,88e3,1.26,"portal")},Iridium(r){return f("repair_droid",r,17616,1.26,"portal")},Infernite(r){return f("repair_droid",r,666,1.26,"portal")},Soul_Gem(r){return f("repair_droid",r,1,1.15,"portal")}},powered(){return _e(3)},effect(){return`
${t("portal_repair_droid_effect",[5])}
${t("portal_repair_droid_effect2",[8])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("repair_droid","portal"),re($(this)[0]),!0):!1},flair:t("portal_repair_droid_flair")}},prtl_badlands:{info:{name:t("portal_badlands_name"),desc:t("portal_badlands_desc")},war_drone:{id:"portal-war_drone",title:t("portal_war_drone_title"),desc(){return`
${t("portal_war_drone_title")}
${t("requires_power")}
`},reqs:{portal:3},powered(){return _e(5)},cost:{Money(r){return f("war_drone",r,65e4,1.28,"portal")},Alloy(r){return f("war_drone",r,6e4,1.28,"portal")},Graphene(r){return f("war_drone",r,1e5,1.28,"portal")},Elerium(r){return f("war_drone",r,25,1.28,"portal")},Soul_Gem(r){return f("war_drone",r,1,1.28,"portal")}},effect(){return`
${t("portal_war_drone_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("war_drone","portal"),re($(this)[0]),!0):!1},flair:t("portal_war_drone_flair")},sensor_drone:{id:"portal-sensor_drone",title:t("portal_sensor_drone_title"),desc(){return`
${t("portal_sensor_drone_title")}
${t("requires_power")}
`},reqs:{infernite:2},powered(){return _e(3)},cost:{Money(r){return f("sensor_drone",r,5e5,1.25,"portal")},Polymer(r){return f("sensor_drone",r,25e3,1.25,"portal")},Adamantite(r){return f("sensor_drone",r,12500,1.25,"portal")},Infernite(r){return f("sensor_drone",r,100,1.25,"portal")}},effect(){let r=e.tech.infernite>=4?e.tech.infernite>=6?50:20:10,a=e.tech.infernite>=6?2500:1e3,i=e.race.cataclysm?`
${t("space_moon_observatory_cata_effect",[2])}
`:`
${t("space_moon_observatory_effect",[2])}
${t("portal_sensor_drone_effect2",[2])}
`,s=e.tech.science>=14?`
${t("city_max_knowledge",[a])}
${i}`:"";return`
${t("portal_sensor_drone_effect",[r])}
${s}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("sensor_drone","portal"),re($(this)[0]),!0):!1}},attractor:{id:"portal-attractor",title:t("portal_attractor_title"),desc(){return`
${t("portal_attractor_title")}
${t("requires_power")}
`},reqs:{portal:4},powered(){return _e(3)},cost:{Money(r){return f("attractor",r,35e4,1.25,"portal")},Aluminium(r){return f("attractor",r,175e3,1.25,"portal")},Stanene(r){return f("attractor",r,9e4,1.25,"portal")}},effect(){return`
${t("portal_attractor_effect1")}
${t("portal_attractor_effect2",[e.resource.Soul_Gem.name])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("attractor","portal"),re($(this)[0]),!0):!1}}},prtl_pit:{info:{name:t("portal_pit_name"),desc:t("portal_pit_desc")},pit_mission:{id:"portal-pit_mission",title:t("portal_pit_mission_title"),desc:t("portal_pit_mission_title"),reqs:{hell_pit:1},grant:["hell_pit",2],queue_complete(){return e.tech.hell_pit>=2?0:1},cost:{Money(){return 5e6},Helium_3(){return 3e5},Deuterium(){return 2e5}},effect:t("portal_pit_mission_effect"),action(){return u($(this)[0])?(I(t("portal_pit_mission_result"),"info",!1,["progress","hell"]),!0):!1}},assault_forge:{id:"portal-assault_forge",title:t("portal_assault_forge_title"),desc:t("portal_assault_forge_title"),reqs:{hell_pit:2},grant:["hell_pit",3],queue_complete(){return e.tech.hell_pit>=3?0:1},cost:{Money(){return 1e7},HellArmy(){return Math.round(650/mt(1,"hellArmy"))},Cement(){return 1e7},Adamantite(){return 125e4},Elerium(){return 2400},Stanene(){return 9e5}},effect:t("portal_assault_forge_effect"),action(){return u($(this)[0])?(I(t("portal_assault_forge_result"),"info",!1,["progress","hell"]),!0):!1}},soul_forge:{id:"portal-soul_forge",title:t("portal_soul_forge_title"),desc(){return`
${t("portal_soul_forge_desc")}
${t("requires_power")}
`},reqs:{hell_pit:4},queue_complete(){return 1-e.portal.soul_forge.count},powered(){return _e(30)},postPower(r){D({el:"#fort"},"update")},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?25e6:0},Graphene(r){return(r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?15e5:0},Infernite(r){return(r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?25e3:0},Bolognium(r){return(r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?1e5:0}},effect(r){let a=`
${t("portal_soul_forge_effect",[e.resource.Soul_Gem.name])}
`;if((r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)>=1){let n=e.tech.hell_pit>=6?75e4:1e6;e.tech.hell_pit>=7&&k.soul_attractor>0&&(n*=.97**k.soul_attractor),a=a+`
${t("portal_soul_forge_effect2",[e.portal.soul_forge?e.portal.soul_forge.kills.toLocaleString():0,Math.round(n).toLocaleString()])}
`}let s=ji();return`${a}
${t("portal_soul_forge_soldiers",[s])} , ${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])&&e.portal.soul_forge.count<1?(ne("soul_forge","portal"),re($(this)[0]),!0):!1}},gun_emplacement:{id:"portal-gun_emplacement",title:t("portal_gun_emplacement_title"),desc(){return`
${t("portal_gun_emplacement_title")}
${t("requires_power")}
`},reqs:{hell_gun:1},powered(){return _e(3)},cost:{Money(r){return f("gun_emplacement",r,4e6,1.25,"portal")},Coal(r){return f("gun_emplacement",r,25e4,1.25,"portal")},Steel(r){return f("gun_emplacement",r,12e5,1.25,"portal")},Wrought_Iron(r){return f("gun_emplacement",r,2e5,1.25,"portal")}},effect(){let r=e.tech.hell_gun>=2?2:1,a=e.tech.hell_gun>=2?35:20,i=e.tech.hell_gun>=2?75:40;return`
${t("portal_gun_emplacement_effect",[r])}
${t("portal_gun_emplacement_effect2",[a,i])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("gun_emplacement","portal"),re($(this)[0]),!0):!1}},soul_attractor:{id:"portal-soul_attractor",title:t("portal_soul_attractor_title"),desc(){return`
${t("portal_soul_attractor_title")}
${t("requires_power")}
`},reqs:{hell_pit:5},powered(){return _e(4)},cost:{Money(r){return f("soul_attractor",r,12e6,1.25,"portal")},Stone(r){return f("soul_attractor",r,23e6,1.25,"portal")},Nano_Tube(r){return f("soul_attractor",r,314159,1.25,"portal")},Vitreloy(r){return f("soul_attractor",r,1618,1.25,"portal")},Aerogel(r){return f("soul_attractor",r,18e4,1.25,"portal")}},effect(){let r=e.tech.hell_pit>=7?`
${t("portal_soul_attractor_effect2",[3])}
`:"",a=e.blood.attract?e.blood.attract*5:0;return`
${t("portal_soul_attractor_effect",[40+a,120+a])}
${r}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("soul_attractor","portal"),re($(this)[0]),!0):!1}},soul_capacitor:{id:"portal-soul_capacitor",title:t("portal_soul_capacitor_title"),desc(){return`
${t("portal_soul_capacitor_desc")}
${t("requires_power")}
`},reqs:{forbidden:2},powered(){return _e(125)},queue_complete(){return 40-e.portal.soul_capacitor.count},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,75e7,1.01,"portal")},Crystal(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,125e4,1.01,"portal")},Adamantite(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,65e5,1.01,"portal")},Infernite(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,1e4,1.01,"portal")},Stanene(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,25e5,1.01,"portal")},Bolognium(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,1e6,1.01,"portal")},Soul_Gem(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,3,1.01,"portal")},Mythril(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,125e4,1.01,"portal")}},effect(){let r=25e5,a=e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.ecap:0,i=e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.energy:0,s=`
${t("portal_soul_capacitor_effect",[i.toLocaleString()])}
`;return s+=`
${t("portal_soul_capacitor_effect2",[a.toLocaleString()])}
`,s+=`
${t("portal_soul_capacitor_effect3",[r.toLocaleString()])}
`,s+=`
${t("minus_power",[$(this)[0].powered()])}
`,s},action(){return e.portal.soul_capacitor.count<40&&u($(this)[0])?(e.portal.soul_capacitor.count++,re($(this)[0]),!0):!1},postPower(){Ci($(this)[0],"portal","soul_capacitor")}},absorption_chamber:{id:"portal-absorption_chamber",title:t("portal_absorption_chamber_title"),desc(r){return!e.interstellar.hasOwnProperty("absorption_chamber")||e.portal.absorption_chamber.count<100||r?`
${t("portal_absorption_chamber_title")}
${t("requires_segments",[100])}
`:`
${t("portal_absorption_chamber_title")}
`},reqs:{forbidden:3},queue_size:5,queue_complete(){return 100-e.portal.absorption_chamber.count},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?75e6:0},Alloy(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?75e4:0},Neutronium(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?125e3:0},Elerium(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?1e3:0},Orichalcum(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?25e4:0},Nanoweave(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?75e3:0}},effect(r){let a=(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0);if(a<100){let i=100-a;return`
${t("portal_absorption_chamber_incomplete")}
${t("space_dwarf_collider_effect2",[i])}
`}else{if(e.tech.forbidden===5)return`
${t("portal_absorption_chamber_effect_eld",[1e8.toLocaleString()])}
${t("tech_demonic_infusion_effect2",[ct("descend").artifact])}
`;{let i=Ys();return`
${t("portal_absorption_chamber_effect",[1e8.toLocaleString()])}
${i}
`}}},action(){if(u($(this)[0])){if(e.portal.absorption_chamber.count<100)return ne("absorption_chamber","portal"),e.portal.absorption_chamber.count>=100&&(e.tech.forbidden=4),!0;if(e.portal.soul_capacitor.energy>=1e8)return e.tech.forbidden===5?Ts():vs(),!0}return!1}}},prtl_ruins:{info:{name:t("portal_ruins_name"),desc:t("portal_ruins_desc"),support:"guard_post",prop(){let r=` -
${t("portal_ruins_security")}: {{ on | filter('army') }} `;return r=r+` -
${t("portal_ruins_supressed")}: {{ on | filter('sup') }} `,r},filter(r,a){let i=Nr("ruins");switch(a){case"army":return Math.round(i.rating);case"sup":return`${+(i.supress*100).toFixed(2)}%`}}},ruins_mission:{id:"portal-ruins_mission",title:t("portal_ruins_mission_title"),desc:t("portal_ruins_mission_title"),reqs:{hell_ruins:1},grant:["hell_ruins",2],queue_complete(){return e.tech.hell_ruins>=2?0:1},cost:{Money(){return 1e8},Oil(){return 5e5},Helium_3(){return 5e5}},effect:t("portal_ruins_mission_effect"),action(){return u($(this)[0])?(I(t("portal_ruins_mission_result"),"info",!1,["progress","hell"]),e.portal.vault={count:0},e.portal.stonehedge={count:0},e.portal.archaeology={count:0,on:0},!0):!1}},guard_post:{id:"portal-guard_post",title:t("portal_guard_post_title"),desc(){return`
${t("portal_guard_post_title")}
${t("requires_soldiers")}
${t("requires_power")}
`},reqs:{hell_ruins:2},cost:{Money(r){return f("guard_post",r,8e6,1.06,"portal")},Lumber(r){return f("guard_post",r,65e5,1.06,"portal")},Sheet_Metal(r){return f("guard_post",r,3e5,1.06,"portal")}},powered(){return _e(5)},support(){return 1},effect(){let r=e.race.holy?1+b.holy.vars()[1]/100:1,a=ve("unicorn");a>0&&(r*=1+b.holy.vars(1)[1]/100*a);let i=Math.round(r*mt(N(1),"hellArmy",0));return`
${t("portal_guard_post_effect1",[i])}
${t("portal_guard_post_effect2",[N(1),$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("guard_post","portal"),e.portal.guard_post.on++,!0):!1},postPower(){D({el:"#srprtl_ruins"},"update"),D({el:"#srprtl_gate"},"update")}},vault:{id:"portal-vault",title:t("portal_vault_title"),desc:t("portal_vault_title"),reqs:{hell_ruins:2,hell_vault:1},condition(){return!(e.portal.vault.count>=2)},queue_complete(){return 2-e.portal.vault.count},cost:{Soul_Gem(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===0?100:0},Money(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===1?25e7:0},Adamantite(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===1?125e5:0},Orichalcum(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===1?3e7:0}},effect(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)<1?t("portal_vault_effect",[100]):t("portal_vault_effect2")},action(){if(e.portal.vault.count<2&&u($(this)[0])){if(ne("vault","portal"),e.portal.vault.count===2&&(e.tech.hell_ruins=3,e.resource.Codex.display=!0,e.resource.Codex.amount=1,I(t("portal_vault_result"),"info",!1,["progress","hell"]),e.race.fasting)){let r=ot();e.stats.endless_hunger.b3[r]=!0,r!=="m"&&r!=="l"&&(e.stats.endless_hunger.b3.l=!0)}return!0}return!1},post(){e.portal.vault.count===2&&(ue(),ir(),Ie())}},archaeology:{id:"portal-archaeology",title:t("portal_archaeology_title"),desc(){return`
${t("portal_archaeology_title")}
${t("requires_security")}
${t("requires_power")}
`},reqs:{hell_ruins:2},cost:{Money(r){return f("archaeology",r,1e8,1.25,"portal")},Titanium(r){return f("archaeology",r,375e4,1.25,"portal")},Mythril(r){return f("archaeology",r,125e4,1.25,"portal")}},powered(){return _e(8)},effect(){return`
${t("portal_archaeology_effect",[N(2)])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){if(u($(this)[0])){if(ne("archaeology","portal"),e.civic.archaeologist.display=!0,re($(this)[0])){let r=N(2);e.civic.archaeologist.max+=r;let a=Math.min(r,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=a,e.civic.archaeologist.workers+=a}return!0}return!1}},arcology:{id:"portal-arcology",title:t("portal_arcology_title"),desc(){return`
${t("portal_arcology_title")}
${t("requires_security")}
${t("requires_power")}
`},reqs:{housing:4},cost:{Money(r){return f("arcology",r,18e7,1.22,"portal")},Graphene(r){return f("arcology",r,75e5,1.22,"portal")},Bolognium(r){return f("arcology",r,28e5,1.22,"portal")},Orichalcum(r){return f("arcology",r,55e5,1.22,"portal")},Nanoweave(r){return f("arcology",r,65e4,1.22,"portal")},Horseshoe(){return e.race.hooved?13:0}},powered(){return _e(25)},effect(){let r=Nr("ruins"),a=H(Ar()*8*r.supress);a=+a.toFixed(0);let i=Math.round(xt)*10,s=`
${t("plus_max_resource",[i,t("resource_Crates_name")])}
${t("plus_max_resource",[i,t("resource_Containers_name")])}
`;return`
${t("plus_max_resource",[`$${a.toLocaleString()}`,t("resource_Money_name")])}
${t("plus_max_citizens",[$(this)[0].citizens()])}
${t("plus_max_resource",[N(5),t("civics_garrison_soldiers")])}
${t("portal_guard_post_effect1",[75])}
${s}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("arcology","portal"),re($(this)[0])&&(e.resource[e.race.species].max+=8),e.resource.Containers.display||Yr(),!0):!1},post(){D({el:"#srprtl_ruins"},"update"),ue()},postPower(){D({el:"#srprtl_ruins"},"update"),D({el:"#srprtl_gate"},"update")},citizens(){let r=8;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},hell_forge:{id:"portal-hell_forge",title:t("portal_hell_forge_title"),desc(){return`
${t("portal_hell_forge_title")}
${t("requires_security")}
${t("requires_power")}
`},reqs:{scarletite:1},cost:{Money(r){return f("hell_forge",r,25e7,1.15,"portal")},Coal(r){return f("hell_forge",r,165e4,1.22,"portal")},Steel(r){return f("hell_forge",r,38e5,1.22,"portal")},Iridium(r){return f("hell_forge",r,12e5,1.22,"portal")},Neutronium(r){return f("hell_forge",r,28e4,1.22,"portal")},Soul_Gem(r){return f("hell_forge",r,5,1.22,"portal")}},powered(){return _e(12)},special:!0,effect(){let a=+(75*Nr("ruins").supress).toFixed(1),i=e.tech.inferno_power?`
${t("portal_hell_forge_effect2",[10,t("portal_inferno_power_title")])}
`:"";return`
${t("portal_hell_forge_effect",[N(1)])}
${i}
${t("interstellar_stellar_forge_effect3",[3])}
${t("interstellar_stellar_forge_effect",[a])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("hell_forge","portal"),re($(this)[0])&&(e.city.smelter.cap+=3,e.city.smelter.Oil+=3,e.city.smelter.Iron+=3),!0):!1},post(){Lt()},postPower(r){bi("Scarletite")}},inferno_power:{id:"portal-inferno_power",title:t("portal_inferno_power_title"),desc(){return`
${t("portal_inferno_power_title")}
`},reqs:{inferno_power:1},cost:{Money(r){return f("inferno_power",r,275e6,1.16,"portal")},Neutronium(r){return f("inferno_power",r,375e4,1.18,"portal")},Stanene(r){return f("inferno_power",r,12e6,1.18,"portal")},Bolognium(r){return f("inferno_power",r,8e6,1.18,"portal")}},powered(){let r=20;return k.hasOwnProperty("hell_forge")&&(r+=k.hell_forge*10),dt(-r)},fuel:{Infernite:5,Coal:100,Oil:80},effect(){let r=$(this)[0].fuel;return`
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}
${t("portal_inferno_power_effect",[r.Infernite,e.resource.Infernite.name,r.Coal,e.resource.Coal.name,r.Oil,e.resource.Oil.name])}
`},action(){return u($(this)[0])?(ne("inferno_power","portal"),e.portal.inferno_power.on++,!0):!1},post(){D({el:"#foundry"},"update")}},ancient_pillars:{id:"portal-ancient_pillars",title:t("portal_ancient_pillars_title"),desc:t("portal_ancient_pillars_desc"),reqs:{hell_ruins:2},queue_complete(){return e.tech.pillars&&e.tech.pillars===1&&e.race.universe!=="micro"?1:0},cost:{Harmony(r){return r!==void 0?r+Object.keys(e.pillars).length
=1?`${t("portal_ancient_pillars_effect2",[Object.keys(A).length-1,a])}
`:`${t("portal_ancient_pillars_effect",[Object.keys(A).length-1])}
`},action(){return e.tech.pillars&&e.tech.pillars===1&&e.race.universe!=="micro"&&u($(this)[0])?(e.pillars[e.race.species]=Jt(),e.tech.pillars=2,H(0,!1,!0),ea(!0),Wt(!0),ie("resonance"),D({el:"#portal-ancient_pillars"},"update"),!0):!1}}},prtl_gate:{info:{name:t("portal_gate_name"),desc(){return`${t("portal_gate_desc")} ${t(e.tech.wtower&&e.tech.etower?"portal_gate_open":"portal_gate_closed")}`},support:"guard_post",hide_support:!0,prop(){let r=` - ${t("portal_ruins_security")}: {{ on | filter('army') }} `;return r=r+` - ${t("portal_ruins_supressed")}: {{ on | filter('sup') }} `,r},filter(r,a){let i=Nr("gate");switch(a){case"army":return Math.round(i.rating);case"sup":return`${+(i.supress*100).toFixed(2)}%`}}},gate_mission:{id:"portal-gate_mission",title:t("portal_gate_mission_title"),desc:t("portal_gate_mission_title"),reqs:{high_tech:18},grant:["hell_gate",1],queue_complete(){return e.tech.hell_gate>=1?0:1},cost:{Money(){return 25e7},Knowledge(){return 275e5}},effect:t("portal_gate_mission_effect"),action(){return u($(this)[0])?(I(t("portal_gate_mission_result"),"info",!1,["progress","hell"]),!0):!1}},west_tower:{id:"portal-west_tower",title:t("portal_west_tower"),desc(r){let a=Wt();return!e.portal.hasOwnProperty("west_tower")||e.portal.west_tower.count${t("portal_west_tower")} ${t("requires_segments",[a])}
`:`
${t("portal_west_tower")}
`},reqs:{hell_gate:2},queue_size:25,queue_complete(){return Wt()-e.portal.west_tower.count},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("west_tower")?e.portal.west_tower.count:0)
${t("portal_tower_effect")} ${t("space_dwarf_collider_effect2",[s])}
${t("portal_tower_effect2")}
`}else return t("portal_tower_effect")},action(){return e.portal.west_tower.count=Wt()&&(e.tech.wtower=1,e.tech.wtower&&e.tech.etower&&!e.tech.hell_lake&&(e.tech.hell_lake=1,e.settings.portal.lake=!0,e.portal.harbour={count:0,on:0,support:0,s_max:0},I(t("portal_gate_open"),"info",!1,["progress","hell"]),ir()))}},east_tower:{id:"portal-east_tower",title:t("portal_east_tower"),desc(r){let a=Wt();return!e.portal.hasOwnProperty("east_tower")||e.portal.east_tower.count${t("portal_east_tower")}${t("requires_segments",[a])}
`:`${t("portal_east_tower")}
`},reqs:{hell_gate:2},queue_size:25,queue_complete(){return Wt()-e.portal.east_tower.count},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("east_tower")?e.portal.east_tower.count:0)${t("portal_tower_effect")}${t("space_dwarf_collider_effect2",[s])}
${t("portal_tower_effect2")}
`}else return t("portal_tower_effect")},action(){return e.portal.east_tower.count=Wt()&&(e.tech.etower=1,e.tech.wtower&&e.tech.etower&&!e.tech.hell_lake&&(e.tech.hell_lake=1,e.settings.portal.lake=!0,e.portal.harbour={count:0,on:0,support:0,s_max:0},I(t("portal_gate_open"),"info",!1,["progress","hell"]),ir()))}},gate_turret:{id:"portal-gate_turret",title:t("portal_gate_turret_title"),desc(){return`${t("portal_gate_turret_title")}
${t("requires_power")}
`},reqs:{hell_gate:3},powered(){return _e(6)},cost:{Money(r){return f("gate_turret",r,375e4,1.22,"portal")},Iron(r){return f("gate_turret",r,425e4,1.22,"portal")},Elerium(r){return f("gate_turret",r,275,1.22,"portal")},Stanene(r){return f("gate_turret",r,85e4,1.22,"portal")}},effect(){let r=100;e.race.holy&&(r*=1+b.holy.vars()[1]/100);let a=ve("unicorn");a>0&&(r*=1+b.holy.vars(1)[1]/100*a);let i=e.tech.hell_gun>=2?65:40,s=e.tech.hell_gun>=2?100:60;return`${t("portal_gate_turret_effect",[Math.round(r)])}
${t("portal_gate_turret_effect2",[i,s])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("gate_turret","portal"),re($(this)[0]),!0):!1},postPower(){D({el:"#srprtl_gate"},"update")}},infernite_mine:{id:"portal-infernite_mine",title:t("portal_infernite_mine_title"),desc(){return`${t("portal_infernite_mine_title")}
${t("requires_security")}
${t("requires_power")}
`},reqs:{hell_gate:4},powered(){return _e(5)},powerBalancer(){return[{r:"Infernite",k:"lpmod"}]},cost:{Money(r){return f("infernite_mine",r,75e6,1.26,"portal")},Alloy(r){return f("infernite_mine",r,245e4,1.26,"portal")},Orichalcum(r){return f("infernite_mine",r,165e4,1.26,"portal")},Wrought_Iron(r){return f("infernite_mine",r,68e4,1.26,"portal")}},effect(){let r=T("infernite_mine");return`${t("portal_infernite_mine_effect",[+r.toFixed(3)])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("infernite_mine","portal"),re($(this)[0]),!0):!1}}},prtl_lake:{info:{name:t("portal_lake_name"),desc:t("portal_lake_desc"),support:"harbour"},lake_mission:{id:"portal-lake_mission",title:t("portal_lake_mission_title"),desc:t("portal_lake_mission_title"),reqs:{hell_lake:1},grant:["hell_lake",2],queue_complete(){return e.tech.hell_lake>=2?0:1},cost:{Money(){return 5e8},Oil(){return 75e4},Helium_3(){return 6e5}},effect:t("portal_lake_mission_effect"),action(){return u($(this)[0])?(I(t("portal_lake_mission_result"),"info",!1,["progress","hell"]),!0):!1}},harbour:{id:"portal-harbour",title:t("portal_harbour_title"),desc(){return`${t("portal_harbour_title")}
${t("requires_power")}
`},reqs:{hell_lake:3},powered(){let r=k.cooling_tower||0;return+_e(500*.92**r).toFixed(2)},support(){return 1},cost:{Money(r){return f("harbour",r,225e6,$a(1.18),"portal")},Cement(r){return f("harbour",r,5e7,$a(1.18),"portal")},Iridium(r){return f("harbour",r,75e5,$a(1.18),"portal")},Infernite(r){return f("harbour",r,8e5,$a(1.18),"portal")},Stanene(r){return f("harbour",r,175e5,$a(1.18),"portal")}},wide:!0,res(){return["Oil","Alloy","Polymer","Iridium","Helium_3","Deuterium","Neutronium","Adamantite","Infernite","Nano_Tube","Graphene","Stanene","Bolognium","Orichalcum"]},val(r){switch(r){case"Oil":return 3e4;case"Alloy":return 25e4;case"Polymer":return 25e4;case"Iridium":return 2e5;case"Helium_3":return 18e3;case"Deuterium":return 12e3;case"Neutronium":return 18e4;case"Adamantite":return 15e4;case"Infernite":return 75e3;case"Nano_Tube":return 75e4;case"Graphene":return 12e5;case"Stanene":return 12e5;case"Bolognium":return 13e4;case"Orichalcum":return 13e4;default:return 0}},effect(){let r='';for(let a of $(this)[0].res())if(e.resource[a].display){let i=Ee(+H($(this)[0].val(a)).toFixed(0),1);r=r+`${t("plus_max_resource",[i,e.resource[a].name])} `}return r=r+"
",`${t("portal_harbour_effect",[1])}
${r}${t("minus_power",[$(this)[0].powered()])}
`},action(){if(u($(this)[0])){if(ne("harbour","portal"),re($(this)[0]))for(let r of $(this)[0].res())e.resource[r].display&&(e.resource[r].max+=H($(this)[0].val(r)));return!0}return!1}},cooling_tower:{id:"portal-cooling_tower",title:t("portal_cooling_tower_title"),desc(){return`${t("portal_cooling_tower_title")}
${t("requires_power")}
`},reqs:{hell_lake:6},powered(){return _e(10)},cost:{Money(r){return f("cooling_tower",r,25e7,1.2,"portal")},Polymer(r){return f("cooling_tower",r,12e6,1.2,"portal")},Orichalcum(r){return f("cooling_tower",r,85e5,1.2,"portal")},Brick(r){return f("cooling_tower",r,25e4,1.2,"portal")}},effect(){return`${t("portal_cooling_tower_effect",[8])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("cooling_tower","portal"),re($(this)[0]),!0):!1}},bireme:{id:"portal-bireme",title:t("portal_bireme_title"),desc(){return`${t("portal_bireme_title")}
${t("space_support",[t("lake")])}
`},reqs:{hell_lake:4},powered(){return 0},s_type:"lake",support(){return-1},cost:{Money(r){return f("bireme",r,19e7,1.24,"portal")},Helium_3(r){return f("bireme",r,225e3,1.24,"portal")},Adamantite(r){return f("bireme",r,15e6,1.24,"portal")},Nano_Tube(r){return f("bireme",r,18e6,1.24,"portal")},Soul_Gem(r){return f("bireme",r,10,1.24,"portal")},Scarletite(r){return f("bireme",r,125e3,1.24,"portal")}},effect(){let r=e.blood.spire&&e.blood.spire>=2?20:15;return`${t("space_used_support",[t("lake")])}
${t("portal_bireme_effect",[r])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
`},ship:{civ(){return 0},mil(){return e.race.high_pop?b.high_pop.vars()[0]*2:2}},action(){return u($(this)[0])?(ne("bireme","portal"),re($(this)[0]),!0):!1}},transport:{id:"portal-transport",title:t("portal_transport_title"),desc(){return`${t("portal_transport_title")}
${t("space_support",[t("lake")])}
`},reqs:{hell_lake:5},powered(){return 0},s_type:"lake",support(){return-1},cost:{Money(r){return f("transport",r,3e8,1.22,"portal")},Oil(r){return f("transport",r,18e4,1.22,"portal")},Alloy(r){return f("transport",r,18e6,1.22,"portal")},Graphene(r){return f("transport",r,125e5,1.22,"portal")},Soul_Gem(r){return f("transport",r,5,1.22,"portal")},Scarletite(r){return f("transport",r,25e4,1.22,"portal")}},effect(){let a=+((e.blood.spire&&e.blood.spire>=2?.8:.85)**(we.bireme||0)*100).toFixed(1);return`${t("space_used_support",[t("lake")])}
${t("portal_transport_effect",[5])}
${t("portal_transport_effect2",[a])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
`},special:!0,sAction(){e.settings.civTabs=4,e.settings.marketTabs=3,e.settings.tabLoad||(gr("mTabResource"),Ie("portal-transport"))},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*3:3},mil(){return 0}},action(){return u($(this)[0])?(ne("transport","portal"),re($(this)[0]),e.settings.portal.spire||(e.settings.portal.spire=!0,e.settings.showCargo=!0,e.tech.hell_spire=1,e.portal.purifier={count:0,on:0,support:0,s_max:0,supply:0,sup_max:100,diff:0},e.portal.port={count:0,on:0},I(t("portal_transport_unlocked"),"info",!1,["progress","hell"]),ir()),!0):!1}}},prtl_spire:{info:{name:t("portal_spire_name"),desc:t("portal_spire_desc"),support:"purifier",prop(){return` - ${t("portal_spire_supply")}: {{ supply | filter }} / {{ sup_max }} `+' (+{{ diff | filter(2) }}/s )'},filter(r,a){return a?+r.toFixed(a):Math.floor(r)}},spire_mission:{id:"portal-spire_mission",title:t("portal_spire_mission_title"),desc:t("portal_spire_mission_title"),reqs:{hell_spire:1},grant:["hell_spire",2],queue_complete(){return e.tech.hell_spire>=2?0:1},cost:{Species(){return Si(50)},Oil(){return 9e5},Helium_3(){return 75e4},Structs(){return{portal:{bireme:{s:"prtl_lake",count:1,on:1},transport:{s:"prtl_lake",count:1,on:1}}}}},effect:t("portal_spire_mission_effect"),action(){return u($(this)[0])?(I(t("portal_spire_mission_result"),"info",!1,["progress","hell"]),!0):!1},flair:t("portal_spire_mission_flair")},purifier:{id:"portal-purifier",title:t("portal_purifier_title"),desc(){return`${t("portal_purifier_desc")}
${t("requires_power")}
`},reqs:{hell_spire:3},cost:{Money(r){return f("purifier",r,85e6,$a(1.15),"portal")},Supply(r){return e.portal.purifier&&e.portal.purifier.count===0?100:f("purifier",r,4200,$a(1.2),"portal")}},powered(){return _e(125)},support(){return e.tech.b_stone&&e.tech.b_stone>=3?1.25:1},effect(){return`${t("portal_purifier_effect",[$(this)[0].support()])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("purifier","portal"),re($(this)[0]),!0):!1}},port:{id:"portal-port",title:t("portal_port_title"),desc(){return`${t("portal_port_title")}
${t("portal_spire_support")}
`},reqs:{hell_spire:3},cost:{Money(r){return f("port",r,135e6,$a(1.2),"portal")},Supply(r){return e.portal.hasOwnProperty("port")&&e.portal.port.count===0?100:f("port",r,6250,$a(1.2),"portal")}},powered(){return 0},s_type:"spire",support(){return-1},effect(){let r=1e4;return pa.base_camp&&(r*=1+pa.base_camp*.4),`${t("portal_port_effect1",[$(this)[0].support()])}
${t("portal_port_effect2",[Math.round(r)])}
`},action(){return u($(this)[0])?(ne("port","portal"),re($(this)[0]),e.tech.hell_spire===3&&(e.tech.hell_spire=4,e.portal.base_camp={count:0,on:0},ir()),!0):!1}},base_camp:{id:"portal-base_camp",title:t("portal_base_camp_title"),desc(){return`${t("portal_base_camp_title")}
${t("portal_spire_support")}
`},reqs:{hell_spire:4},cost:{Money(r){return f("base_camp",r,425e6,$a(1.2),"portal")},Supply(r){return f("base_camp",r,5e4,$a(1.2),"portal")}},powered(){return 0},s_type:"spire",support(){return-1},effect(){return`${t("portal_port_effect1",[$(this)[0].support()])}
${t("portal_base_camp_effect",[40])}
`},action(){return u($(this)[0])?(ne("base_camp","portal"),re($(this)[0]),e.tech.hell_spire===4&&(e.tech.hell_spire=5,e.portal.bridge={count:0},I(t("portal_spire_bridge_collapse"),"info",!1,["progress","hell"]),ir()),!0):!1}},bridge:{id:"portal-bridge",title:t("portal_bridge_title"),desc(r){return!e.portal.hasOwnProperty("bridge")||e.portal.bridge.count<10||r?`${t("portal_bridge_title")}
${t("requires_segments",[10])}
`:`${t("portal_bridge_title")}
`},reqs:{hell_spire:5},queue_size:1,queue_complete(){return 10-e.portal.bridge.count},cost:{Species(r){return(r||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0)<10?Si(10):0},Money(r){return(r||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0)<10?5e8:0},Supply(r){return(r||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0)<10?1e5:0}},effect(r){let a=10,i=(r||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0);if(i${t("portal_bridge_effect")}${t("space_dwarf_collider_effect2",[s])}
${t("portal_bridge_effect2")}
`}else return t("portal_bridge_complete")},action(){return e.portal.bridge.count<10&&u($(this)[0])?(ne("bridge","portal"),e.portal.bridge.count>=10&&(e.portal.sphinx={count:0},e.tech.hell_spire=6,ir()),!0):!1}},sphinx:{id:"portal-sphinx",title(){return e.tech.hell_spire===7?t("portal_sphinx_solve"):t("portal_sphinx_title")},desc:t("portal_sphinx_desc"),reqs:{hell_spire:6},queue_complete(){return 8-e.tech.hell_spire},cost:{Knowledge(r){let a=(r||0)+(!e.tech.hell_spire||e.tech.hell_spire<7?0:e.tech.hell_spire===7?1:2);return a===1?5e7:a===0?4e7:0}},effect(r){let a=(r||0)+(!e.tech.hell_spire||e.tech.hell_spire<7?0:e.tech.hell_spire===7?1:2);return a===1?t("portal_sphinx_effect2"):a===2?t("portal_sphinx_effect3"):t("portal_sphinx_effect")},action(){if(u($(this)[0])){if(e.tech.hell_spire===6)return e.tech.hell_spire=7,I(t("portal_sphinx_msg"),"info",!1,["progress","hell"]),ir(),!0;if(e.tech.hell_spire===7)return e.tech.hell_spire=8,ir(),I(t("portal_sphinx_answer_msg"),"info",!1,["progress","hell"]),!0}return!1}},bribe_sphinx:{id:"portal-bribe_sphinx",title:t("portal_sphinx_bribe"),desc:t("portal_sphinx_desc"),reqs:{hell_spire:7},condition(){return!!(e.tech.hell_spire&&e.tech.hell_spire===7&&!e.tech.sphinx_bribe)},cost:{Soul_Gem(){return 250},Supply(){return 5e5}},effect(){return t("portal_sphinx_bribe_effect")},action(){return u($(this)[0])&&e.tech.hell_spire===7&&!e.tech.sphinx_bribe?(e.tech.sphinx_bribe=1,e.resource.Codex.display=!0,e.resource.Codex.amount=1,I(t("portal_sphinx_bribe_msg"),"info",!1,["progress","hell"]),!0):!1},post(){e.tech.sphinx_bribe&&(ue(),ir(),Ie("portal-bribe_sphinx"))}},spire_survey:{id:"portal-spire_survey",title:t("portal_spire_survey_title"),desc:t("portal_spire_survey_title"),reqs:{hell_spire:8},grant:["hell_spire",9],queue_complete(){return e.tech.hell_spire>=9?0:1},cost:{Oil(){return 12e5},Helium_3(){return 9e5}},effect:t("portal_spire_survey_effect"),action(){return u($(this)[0])?(e.portal.mechbay={count:0,on:0,bay:0,max:0,active:0,scouts:0,mechs:[]},e.portal.spire={count:1,progress:0,boss:"",type:"",status:{}},nn(),I(t("portal_spire_survey_msg"),"info",!1,["progress","hell"]),!0):!1},post(){e.tech.hell_spire&&e.tech.hell_spire===9&&(ir(),Ie("portal-spire_survey"))}},mechbay:{id:"portal-mechbay",title:t("portal_mechbay_title"),desc(){return`${t("portal_mechbay_title")}
${t("portal_spire_support")}
`},reqs:{hell_spire:9},cost:{Money(r){return f("mechbay",r,1e8,1.2,"portal")},Supply(r){return f("mechbay",r,25e4,1.2,"portal")}},powered(){return 0},s_type:"spire",support(){return-1},special:!0,sAction(){e.settings.civTabs=2,e.settings.govTabs=4,e.settings.tabLoad||(gr("mTabCivic"),Ie("portal-mechbay"))},effect(){let r=e.portal.hasOwnProperty("mechbay")?e.portal.mechbay.bay:0,a=e.portal.hasOwnProperty("mechbay")?e.portal.mechbay.max:0;return`${t("portal_port_effect1",[$(this)[0].support()])}
${t("portal_mechbay_effect")}
${t("portal_mechbay_effect2",[r,a])}
`},action(){return u($(this)[0])?(ne("mechbay","portal"),re($(this)[0])&&(e.portal.mechbay.max+=25),e.settings.showMechLab=!0,e.portal.mechbay.count===1&&(I(t("portal_mechbay_unlocked"),"info",!1,["progress","hell"]),Ki(),Ot()),!0):!1},postPower(){sn()}},spire:{id:"portal-spire",title:t("portal_spire_title"),desc:t("portal_spire_title"),reqs:{hell_spire:9},queue_complete(){return 0},cost:{},effect(){let r=e.portal.hasOwnProperty("spire")?e.portal.spire.count:0,a=e.portal.hasOwnProperty("spire")?`${t(`portal_spire_type_${e.portal.spire.type}`)} `:"?",i="";e.portal.hasOwnProperty("spire")&&Object.keys(e.portal.spire.status).length>0&&(i=`${t("portal_spire_hazard",[Object.keys(e.portal.spire.status).map(_=>`${t(`portal_spire_status_${_}`)} `).join(", ")])}
`);let s=e.portal.hasOwnProperty("spire")?`${+e.portal.spire.progress.toFixed(3)}% `:"0%",n=`${t("portal_spire_effect",[r])}
${t("portal_spire_type",[a])}
${i}${t("portal_spire_progress",[s])}
`,c=e.portal.hasOwnProperty("spire")?e.portal.spire.boss:"crazed",l=`${t("portal_spire_mob",[`${t(`portal_mech_boss_${c}`)} `])}
`,o="???",d="???";if(e.stats.spire){let _=qu(c),m=$(this)[0].mscan();m>0&&(o=t(`portal_mech_weapon_${_.w}`)),m>=5&&(d=t(`portal_mech_weapon_${_.r}`))}let h=`${l}
${t("portal_spire_mob_weak",[`${o} `])}
${t("portal_spire_mob_resist",[`${d} `])}
`;return``},mscan(){let r=0;return Object.keys(e.stats.spire).forEach(function(a){let i=e.portal.hasOwnProperty("spire")?e.portal.spire.boss:"crazed";e.stats.spire.hasOwnProperty(a)&&e.stats.spire[a].hasOwnProperty(i)&&e.stats.spire[a][i]>r&&(r=e.stats.spire[a][i])}),r},wide:!0,action(){return!1}},waygate:{id:"portal-waygate",title:t("portal_waygate_title"),desc(r){return!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2||r?`${t("portal_waygate_title")}
${t("requires_segments",[10])}
`:`${t("portal_waygate_title")}
`},reqs:{waygate:1},queue_size:1,queue_complete(){return e.tech.waygate>=2?0:10-e.portal.waygate.count},cost:{Species(r){return r?r+(e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0)<10?Si(25):0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?Si(25):0},Money(r){return r?r+(e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0)<10?1e9:0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?1e9:0},Supply(r){return r?r+(e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0)<10?5e5:0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?5e5:0},Blood_Stone(r){return r?r+(e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0)<10?5:0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?5:0}},powered(){return e.portal.hasOwnProperty("waygate")&&e.portal.waygate.count>=10?1:0},power_reqs:{waygate:2},effect(r){let a=(r||0)+(e.tech.waygate&&e.tech.waygate>=2?10:e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0);if(a>=10){let i=e.portal.hasOwnProperty("waygate")?`${+e.portal.waygate.progress.toFixed(3)}% `:"0%";return`${t("portal_waygate_open")}
${t("portal_waygate_progress",[i])}
`}else{let s=10-a;return`${t("portal_waygate_effect")}
${t("space_dwarf_collider_effect2",[s])}
`}},action(){return e.portal.waygate.count<10&&e.tech.waygate&&e.tech.waygate===1&&u($(this)[0])?(ne("waygate","portal"),e.portal.waygate.count>=10&&(e.tech.waygate=2,e.portal.waygate.count=1,ir()),!0):!1}}}};function $a(r){let a=e.portal.hasOwnProperty("spire")&&e.blood.spire?r-(e.portal.spire.count-1)/2500:r;return a>=1.01?a:1.01}var Wt=function(){var r;return function(a){return r&&!a||(r=1e3,e.hasOwnProperty("pillars")&&Object.keys(e.pillars).forEach(function(i){e.pillars[i]&&(r-=12)})),r}}();function la(r){let a=Nr("gate");return Math.round(r/(a.supress>.01?a.supress:.01))}function ji(){let r=Math.round(650/mt(1,"hellArmy"));return k.gun_emplacement&&(r-=k.gun_emplacement*(e.tech.hell_gun>=2?2:1),r<0&&(r=0)),r}function an(){return br}function ir(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==4))return;let r=$("#portal");le(r),r.append($(`${t("tab_portal")} `)),!(!e.tech.portal||e.tech.portal<2)&&Object.keys(br).forEach(function(a){let i=a.replace("prtl_","");if(e.settings.portal[`${i}`]){let s=typeof br[a].info.name=="string"?br[a].info.name:br[a].info.name(),n="";if(br[a].info.hasOwnProperty("prop")&&(n=br[a].info.prop()),br[a].info.support){let c=br[a].info.support;br[a].info.hide_support?r.append(``):r.append(`
${s} {{ support }}/{{ s_max }} ${n} `),D({el:`#sr${a}`,data:e.portal[c],filters:{filter(){return br[a].info.filter(...arguments)}}})}else r.append(``);pe(a,function(){return typeof br[a].info.desc=="string"?br[a].info.desc:br[a].info.desc()},{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),a==="prtl_fortress"&&Us(r,!0),Object.keys(br[a]).forEach(function(c){if(c!=="info"&&Dr(br,a,c)){let l=br[a][c];Br(l,"portal",c)}})}})}function Jc(r,a){return Dr(br,r,a)}function Wi(r){switch(r){case"hostiles":return e.portal.fortress.threat>=2e3?`${t("fortress_threat",[e.portal.fortress.threat])} ${t("fortress_threat_high")}`:e.portal.fortress.threat<1e3?`${t("fortress_threat",[e.portal.fortress.threat])} ${t("fortress_threat_low")}`:`${t("fortress_threat",[e.portal.fortress.threat])} ${t("fortress_threat_medium")}`;case"threatLevel":{let a=e.portal.fortress.threat;return a<1e3?`${t("fortress_threat_level")} ${t("fortress_threat_level1")}`:a<1500?`${t("fortress_threat_level")} ${t("fortress_threat_level2")}`:a>=5e3?`${t("fortress_threat_level")} ${t("fortress_threat_level6")}`:a>=3e3?`${t("fortress_threat_level")} ${t("fortress_threat_level5")}`:a>=2e3?`${t("fortress_threat_level")} ${t("fortress_threat_level4")}`:`${t("fortress_threat_level")} ${t("fortress_threat_level3")}`}case"hireLabel":{let a=Math.round(vr("m_cost")).toLocaleString();return t("civics_garrison_hire_mercenary_cost",[a])}}}function Us(r,a){if(!e.settings.tabLoad)switch(e.settings.civTabs){case 1:if(e.settings.spaceTabs!==4)return;break;case 2:if(e.settings.govTabs!==3)return;break;default:return}if(!e.tech.portal||e.tech.portal<2)return;let i=a?"fort":"gFort",s=a?$(`
`):$("#gFort");a?r.append(s):(s.length>0?le(s):(s=$(`
`),r.append(s)),s.append(`
${t("portal_fortress_name")} ${t("hell_observation_button")} `));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($(`${t("civics_garrison_hire_mercenary")} `));var _=$('
');h.append(_),_.append($(`${t("civics_garrison")}: `));let m=e.tech.world_control&&!e.race.truepath?t("civics_garrison_peacekeepers"):t("civics_garrison_soldiers");_.append($(`${m} / {{ g.max | s_max }} | `)),_.append($(`${t("civics_garrison_crew")} {{ g.crew }} | `)),_.append($(`${t("civics_garrison_wounded")} {{ g.wounded }} `));let w=e.settings.theme==="light"?' type="is-light"':' type="is-dark"',M=$("
");h.append(M),M.append($(`${t("fortress_patrol_reports")} `)),M.append($(`${t("fortress_surv_reports")} `)),M.append($(`${t("fortress_nocrew")} `)),a&&s.append($(`${t("civics_garrison_training")} - ${t("arpa_to_complete")} {{ g.rate, g.progress | trainTime }} ${t("hell_observation_button")} {{ g.progress }}% `)),D({el:`#${i}`,data:{f:e.portal.fortress,g:e.civic.garrison,s:e.settings},methods:{defense(){return t("fortress_defense")},hostiles(){return Wi("hostiles")},threatLevel(){return Wi("threatLevel")},aNext(){let F=fe();e.portal.fortress.garrisone.civic.garrison.workers&&(e.portal.fortress.garrison=e.civic.garrison.workers),e.portal.fortress.assigned=e.portal.fortress.garrison,D({el:"#garrison"},"update"))},aLast(){let F=fe(),x=e.portal.fortress.patrols*e.portal.fortress.patrol_size;k.soul_forge&&(x+=ji()),e.portal.hasOwnProperty("guard_post")&&(x+=N(e.portal.guard_post.on)),e.portal.fortress.garrison>x&&(e.portal.fortress.garrison-=F,e.portal.fortress.garrison0&&(e.portal.fortress.patrols-=F,e.portal.fortress.patrols<0&&(e.portal.fortress.patrols=0))},patSizeInc(){let F=fe();e.portal.fortress.patrol_size1&&(e.portal.fortress.patrol_size-=F,e.portal.fortress.patrol_size<1&&(e.portal.fortress.patrol_size=1))},wall(){let F=e.portal.fortress.walls;return F>=75?"has-text-success":F<=25?"has-text-danger":"has-text-warning"},threaten(){let F=e.portal.fortress.threat;return F<1e3?"has-text-success":F>=2e3?"has-text-danger":"has-text-warning"},hire(){let F=fe(),x=!0;for(;x&&F>0;){let j=_s();e.civic.garrison.workers=j?(e.resource.Money.amount-=j,e.civic.garrison.workers++,e.civic.garrison.m_use++,e.portal.fortress.garrison++,e.portal.fortress.assigned=e.portal.fortress.garrison,D({el:"#garrison"},"update")):x=!1,F--}},hireLabel(){return Wi("hireLabel")},observation(){e.settings.civTabs=$("#mainTabs > nav ul li").length-1,e.settings.tabLoad||ys()}},filters:{defensive(F){return Ho(F)},patrolling(F){let x=F-e.portal.fortress.patrols*e.portal.fortress.patrol_size;if(k.soul_forge){let j=ji();j<=x&&(x-=j)}return e.portal.hasOwnProperty("guard_post")&&(x-=N(e.portal.guard_post.on)),x},threat(F){return F<1e3?t("fortress_threat_level1"):F<1500?t("fortress_threat_level2"):F>=5e3?t("fortress_threat_level6"):F>=3e3?t("fortress_threat_level5"):F>=2e3?t("fortress_threat_level4"):t("fortress_threat_level3")},trainTime(F,x){return F===0?Ft(-1):Ft((100-x)/(F*4))},stationed(){return We()},s_max(F){return We(!0)}}}),["hostiles","threatLevel","armyLabel","patLabel","patSizeLabel","hireLabel"].forEach(function(F){pe(`hf${i}${F}`,function(){switch(F){case"hostiles":return Wi("hostiles");case"threatLevel":return Wi("hostiles");case"armyLabel":return t("fortress_stationed");case"patLabel":return t("fortress_patrol_desc",[e.portal.fortress.patrols]);case"patSizeLabel":return t("fortress_patrol_size_desc",[e.portal.fortress.patrol_size]);case"hireLabel":return Wi("hireLabel")}},{elm:`#${i} span.${F}`})}),pe(`hf${i}observe`,function(){return t("hell_observation_tooltip")},{elm:`#${i} button.observe`})}function Ho(r){let a=r-e.portal.fortress.patrols*e.portal.fortress.patrol_size;if(k.soul_forge){let n=ji();n<=a&&(a-=n)}e.portal.hasOwnProperty("guard_post")&&(a-=N(e.portal.guard_post.on));let i=0;if(e.civic.garrison.wounded>e.civic.garrison.workers-e.portal.fortress.garrison&&(i=e.civic.garrison.wounded-(e.civic.garrison.workers-e.portal.fortress.garrison),i>a&&(i=a)),k.war_droid){let n=k.war_droid-e.portal.fortress.patrols>0?k.war_droid-e.portal.fortress.patrols:0;a+=e.tech.hdroid?N(n*2):N(n)}let s=e.tech.turret?e.tech.turret>=2?70:50:35;return Math.round(mt(a,"hellArmy",i))+(k.turret?k.turret*s:0)}function Go(r,a,i,s){let n=Math.round(Math.log2(r/e.portal.fortress.patrol_size/(a||1)))-Math.rand(0,a),c=0;if(n>0){n>e.portal.fortress.patrol_size&&(n=e.portal.fortress.patrol_size),n=Math.rand(i?1:0,n+1),c=Math.rand(0,n+1);let l=n-c;if(e.race.instinct){let o=Math.floor(c*(b.instinct.vars()[1]/100));c-=o,l+=o}s.wounded=l,s.died=c,e.civic.garrison.wounded+=l,e.civic.garrison.workers-=c,e.stats.died+=c}return c}function Uo(){let r={start:e.portal.fortress.threat,foundGems:0,stats:{wounded:0,died:0,revived:0,surveyors:0,sieges:0,kills:{drones:0,patrols:0,sieges:0,guns:0,soul_forge:0,turrets:0},gems:{patrols:0,guns:0,soul_forge:0,crafted:0,turrets:0,surveyors:0}}},a=e.tech.armor?e.tech.armor:0;e.race.armored&&(a+=b.armored.vars()[1]);let i=ve("tortoisan");i>0&&(a+=Math.floor(b.armored.vars(1)[1]*i)),e.race.scales&&(a+=b.scales.vars()[2]);let s=!1;if(k.soul_forge){let x=e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size;ji()<=x?(s=!0,$("#portal-soul_forge .on").removeClass("altwarn")):(s=!1,$("#portal-soul_forge .on").addClass("altwarn"))}else $("#portal-soul_forge .on").addClass("altwarn");let n=0;if(e.tech.portal>=3&&k.war_drone){r.drones={};for(let x=0;x=Math.rand(0,999)){let B=Math.rand(Math.floor(e.portal.fortress.threat/50),Math.floor(e.portal.fortress.threat/10)),S=e.tech.portal>=7?Math.rand(50,125):Math.rand(25,75);B=5?9e3:1e4)-e.portal.fortress.pity;if(e.race.universe==="evil"&&e.prestige.Dark.count>1){let x=e.prestige.Dark.count;e.prestige.Harmony.count>0&&(x*=1+e.prestige.Harmony.count*.01),l-=Math.round(Math.log2(x)*2)}e.tech.portal>=4&&k.attractor&&(l=Math.round(l*.948**k.attractor)),e.race.ghostly&&(l=Math.round(l*((100-b.ghostly.vars()[2])/100)));let o=ve("wendigo");o>0&&(l=Math.round(l*((100-b.ghostly.vars(1)[2]*o)/100))),l<12&&(l=12);let d=0,h=k.war_droid?k.war_droid:0,_=!1,m=0;e.civic.garrison.wounded>e.civic.garrison.workers-e.portal.fortress.garrison&&(m=e.civic.garrison.wounded-(e.civic.garrison.workers-e.portal.fortress.garrison),m>e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size?(m-=e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size,m/=e.portal.fortress.patrols):m=0);let w=+(m%1).toFixed(10);r.patrols={};for(let x=0;x1/e.portal.fortress.patrols*x?Math.ceil(m):Math.floor(m);if(Math.rand(0,e.portal.fortress.threat)>=Math.rand(0,999)){j.encounter=!0;let S=e.portal.fortress.patrol_size;h>0&&(j.droid=!0,S+=e.tech.hdroid?N(2):N(1),h--);let Q=Math.round(mt(S,"hellArmy",B)),V=Math.rand(Math.floor(e.portal.fortress.threat/50),Math.floor(e.portal.fortress.threat/10));e.race.blood_thirst&&(e.race.blood_thirst_count+=Math.rand(0,Math.ceil(V/10)),e.race.blood_thirst_count>b.blood_thirst.vars()[0]&&(e.race.blood_thirst_count=b.blood_thirst.vars()[0]));let ce=30+Math.max(e.race.chameleon?b.chameleon.vars()[1]:0,e.race.elusive?b.elusive.vars()[0]:0);if(Math.rand(0,ce)===0){j.ambush=!0,d+=Go(Math.round(V*(1+Math.random()*3)),0,!0,j);let Y=Math.round(Q/2);V0){let Ge=35-Math.floor(k.attractor/3);Ge<5&&(Ge=5);let Ce=Math.round(Y/Ge);for(let wr=0;wre.civic.garrison.workers&&(e.civic.garrison.wounded=e.civic.garrison.workers);let F=e.portal.fortress.nocrew?e.civic.garrison.workers-e.civic.garrison.crew:e.civic.garrison.workers;if(F0&&e.portal.fortress.notify==="Yes"&&(M>0?I(t("fortress_patrol_casualties_revive",[d,M]),!1,!1,["hell"]):I(t("fortress_patrol_casualties",[d]),!1,!1,["hell"])),e.portal.fortress.garrison>0&&e.portal.fortress.siege>0&&e.portal.fortress.siege--,e.portal.fortress.siege<=900&&e.portal.fortress.garrison>0&&1>Math.rand(0,e.portal.fortress.siege)){let x={destroyed:!1,damage:0,kills:0,surveyors:0,soldiers:0},j=Ho(e.portal.fortress.garrison),B=j/35>1?j/35:1,S=Math.round(e.portal.fortress.threat/2),Q=0,V=0,ce=!1;for(;S>0&&e.portal.fortress.walls>0;){let Y=Math.round(Math.rand(1,B+1));if(Y>S&&(Y=S),S-=Y,e.portal.fortress.threat-=Y,e.stats.dkills+=Y,s&&(e.portal.soul_forge.kills+=Y,oi(Y)),V+=Y,S>0&&(Q++,e.portal.fortress.walls--,e.portal.fortress.walls===0)){x.destroyed=!0,ce=!0;break}}x.damage=Q,x.kills=V,r.stats.kills.sieges=V,ce?(I(t("fortress_lost"),!1,!1,["hell"]),x.surveyors=e.civic.hell_surveyor.workers,e.resource[e.race.species].amount-=e.civic.hell_surveyor.workers,e.civic.hell_surveyor.workers=0,e.civic.hell_surveyor.assigned=0,x.soldiers=e.portal.fortress.garrison,r.stats.died+=e.portal.fortress.garrison,e.portal.fortress.patrols=0,e.stats.died+=e.portal.fortress.garrison,e.civic.garrison.workers-=e.portal.fortress.garrison,e.portal.fortress.garrison=0,e.portal.fortress.assigned=0):I(t("fortress_sieged",[V,Q]),!1,!1,["hell"]),e.portal.fortress.siege=999,r.stats.sieges++,r.siege=x}if(e.portal.fortress.threat<1e4){let x=(1e4-e.portal.fortress.threat)/2500+1;e.tech.portal>=4&&k.attractor&&(x*=1+k.attractor*.22);let j=Math.rand(Math.round(10*x),Math.round(50*x));e.portal.fortress.threat+=j,r.demons=j}if(e.civic.hell_surveyor.display&&e.civic.hell_surveyor.workers>0){let x=1e3,j=ge("nopain",1);j&&(x*=1+j/100),e.race.blurry&&(x*=1+b.blurry.vars()[0]/100);let B=ve("yeti");B>0&&(x*=1+b.blurry.vars(1)[0]/100*B),e.race.instinct&&(x*=1+b.instinct.vars()[0]/100),e.tech.infernite&&e.tech.infernite>=5&&(x+=250);let S=e.portal.fortress.threat/x,Q=e.civic.hell_surveyor.workers>10?10:e.civic.hell_surveyor.workers,V=10-Math.rand(0,Q+1);if(S>V){let ce=Math.round(S),Y=Math.rand(0,ce+1);Y>e.civic.hell_surveyor.workers&&(Y=e.civic.hell_surveyor.workers),Y===1&&e.portal.fortress.s_ntfy==="Yes"?I(t("fortress_killed"),!1,!1,["hell"]):Y>1&&e.portal.fortress.s_ntfy==="Yes"&&I(t("fortress_eviscerated",[Y]),!1,!1,["hell"]),Y>0&&(r.surveyors=Y,r.stats.surveyors=Y,e.civic.hell_surveyor.workers-=Y,e.civic.hell_surveyor.max-=Y,e.resource[e.race.species].amount-=Y,e.portal.carport.damaged+=Y)}if(r.surveyor_finds={},e.civic.hell_surveyor.workers>0&&n>0)for(let ce=0;ce100&&(Ge=100),Y.bodies=Ge,Ge>0){let Ce=25-Math.floor(k.attractor/5);Ce<5&&(Ce=5);let wr=Math.round(Ge/Ce);for(let Or=0;Or=1e6&&e.tech.gateway&&!e.tech.hell_pit&&(e.tech.hell_pit=1,e.settings.portal.pit=!0,I(t("portal_hell_pit_found"),"info",!1,["progress","hell"]),ir()),e.tech.hell_pit){if(s&&e.tech.hell_pit>=5&&k.soul_attractor){let j=e.blood.attract?e.blood.attract*5:0,B=k.soul_attractor*Math.rand(40+j,120+j);e.portal.soul_forge.kills+=B,r.soul_attractors=B,oi(B)}if(s&&e.tech.hell_gun&&k.gun_emplacement){r.gun_emplacements={};let j=0;for(let S=0;S=2?Math.rand(35,75):Math.rand(20,40);j+=Q,r.gun_emplacements[S+1].kills=Q}r.stats.kills.guns=j,e.portal.soul_forge.kills+=j,oi(j),e.stats.dkills+=j;let B=e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=5?6750:7500;e.tech.hell_pit>=7&&k.soul_attractor>0&&(B*=.94**k.soul_attractor);for(let S=0;S=5?4500:5e3;Math.rand(0,B)===0&&(r.soul_forge.gem=!0,r.stats.gems.soul_forge++,e.resource.Soul_Gem.amount++)}let x=e.tech.hell_pit>=6?75e4:1e6;if(e.tech.hell_pit>=7&&k.soul_attractor>0&&(x*=.97**k.soul_attractor),s&&e.portal.soul_forge.kills>=Math.round(x)){r.soul_forge.gem_craft=!0,e.portal.soul_forge.kills=0;let j=10-k.soul_attractor>0?10-k.soul_attractor:1;e.tech.high_tech>=16&&!e.tech.corrupt&&Math.rand(0,j+1)===0?(r.soul_forge.corrupt=!0,e.resource.Corrupt_Gem.amount++,e.resource.Corrupt_Gem.display=!0,I(t("portal_corrupt_gem"),"info",!1,["progress","hell"]),e.tech.corrupt=1,ue()):(e.resource.Soul_Gem.amount++,r.stats.gems.crafted++)}}if(e.tech.hell_gate&&e.tech.hell_gate>=3&&s&&k.gate_turret){r.gate_turrets={};let x=0,j=e.tech.hell_gun>=2?65:40,B=e.tech.hell_gun>=2?100:60;for(let Q=0;Q=5?2700:3e3;for(let Q=0;Q0&&(e.portal.soul_capacitor.energy+=r,e.portal.soul_capacitor.energy>e.portal.soul_capacitor.ecap&&(e.portal.soul_capacitor.energy=e.portal.soul_capacitor.ecap))}function Nr(r,a){switch(r){case"ruins":{let i=a||N(k.guard_post),s=(k.arcology||0)*75,n=mt(i,"hellArmy",0);e.race.holy&&(n*=1+b.holy.vars()[1]/100);let c=ve("unicorn");c>0&&(n*=1+b.holy.vars(1)[1]/100*c);let l=(n+s)/5e3;return{supress:l>1?1:l,rating:n+s}}case"gate":{let i=Nr("ruins",a),s=(k.gate_turret||0)*100;e.race.holy&&(s*=1+b.holy.vars()[1]/100);let n=ve("unicorn");n>0&&(s*=1+b.holy.vars(1)[1]/100*n);let c=(i.rating+s)/7500;return{supress:c>1?1:c,rating:i.rating+s}}default:return 0}}var xa={fire_elm:{weapon:{laser:1.05,flame:0,plasma:.25,kinetic:.5,missile:.5,sonic:1,shotgun:.75,tesla:.65},nozone:{freeze:!0,flooded:!0},amp:{hot:1.75,humid:.8,steam:.9}},water_elm:{weapon:{laser:.65,flame:.5,plasma:1,kinetic:.2,missile:.5,sonic:.5,shotgun:.25,tesla:.75},nozone:{hot:!0,freeze:!0},amp:{steam:1.5,river:1.1,flooded:2,rain:1.75,humid:1.25}},rock_golem:{weapon:{laser:1,flame:.5,plasma:1,kinetic:.65,missile:.95,sonic:.75,shotgun:.35,tesla:0},nozone:{},amp:{}},bone_golem:{weapon:{laser:.45,flame:.35,plasma:.55,kinetic:1,missile:1,sonic:.75,shotgun:.75,tesla:.15},nozone:{},amp:{}},mech_dino:{weapon:{laser:.85,flame:.05,plasma:.55,kinetic:.45,missile:.5,sonic:.35,shotgun:.5,tesla:1},nozone:{},amp:{}},plant:{weapon:{laser:.42,flame:1,plasma:.65,kinetic:.2,missile:.25,sonic:.75,shotgun:.35,tesla:.38},nozone:{},amp:{}},crazed:{weapon:{laser:.5,flame:.85,plasma:.65,kinetic:1,missile:.35,sonic:.15,shotgun:.95,tesla:.6},nozone:{},amp:{}},minotaur:{weapon:{laser:.32,flame:.5,plasma:.82,kinetic:.44,missile:1,sonic:.15,shotgun:.2,tesla:.35},nozone:{},amp:{}},ooze:{weapon:{laser:.2,flame:.65,plasma:1,kinetic:0,missile:0,sonic:.85,shotgun:0,tesla:.15},nozone:{},amp:{}},zombie:{weapon:{laser:.35,flame:1,plasma:.45,kinetic:.08,missile:.8,sonic:.18,shotgun:.95,tesla:.05},nozone:{},amp:{}},raptor:{weapon:{laser:.68,flame:.55,plasma:.85,kinetic:1,missile:.44,sonic:.22,shotgun:.33,tesla:.66},nozone:{},amp:{}},frost_giant:{weapon:{laser:.9,flame:.82,plasma:1,kinetic:.25,missile:.08,sonic:.45,shotgun:.28,tesla:.5},nozone:{hot:!0},amp:{freeze:2.5,hail:1.65}},swarm:{weapon:{laser:.02,flame:1,plasma:.04,kinetic:.01,missile:.08,sonic:.66,shotgun:.38,tesla:.45},nozone:{},amp:{}},dragon:{weapon:{laser:.18,flame:0,plasma:.12,kinetic:.35,missile:1,sonic:.22,shotgun:.65,tesla:.15},nozone:{},amp:{}},mech_dragon:{weapon:{laser:.84,flame:.1,plasma:.68,kinetic:.18,missile:.75,sonic:.22,shotgun:.28,tesla:1},nozone:{},amp:{}},construct:{weapon:{laser:.5,flame:.2,plasma:.6,kinetic:.34,missile:.9,sonic:.08,shotgun:.28,tesla:1},nozone:{},amp:{}},beholder:{weapon:{laser:.75,flame:.15,plasma:1,kinetic:.45,missile:.05,sonic:.01,shotgun:.12,tesla:.3},nozone:{},amp:{}},worm:{weapon:{laser:.55,flame:.38,plasma:.45,kinetic:.2,missile:.05,sonic:1,shotgun:.02,tesla:.01},nozone:{},amp:{}},hydra:{weapon:{laser:.85,flame:.75,plasma:.85,kinetic:.25,missile:.45,sonic:.5,shotgun:.6,tesla:.65},nozone:{},amp:{}},colossus:{weapon:{laser:1,flame:.05,plasma:.75,kinetic:.45,missile:1,sonic:.35,shotgun:.35,tesla:.5},nozone:{},amp:{}},lich:{weapon:{laser:.1,flame:.1,plasma:.1,kinetic:.45,missile:.75,sonic:.35,shotgun:.75,tesla:.5},nozone:{},amp:{}},ape:{weapon:{laser:1,flame:.95,plasma:.85,kinetic:.5,missile:.5,sonic:.05,shotgun:.35,tesla:.68},nozone:{},amp:{}},bandit:{weapon:{laser:.65,flame:.5,plasma:.85,kinetic:1,missile:.5,sonic:.25,shotgun:.75,tesla:.25},nozone:{},amp:{}},croc:{weapon:{laser:.65,flame:.05,plasma:.6,kinetic:.5,missile:.5,sonic:1,shotgun:.2,tesla:.75},nozone:{},amp:{}},djinni:{weapon:{laser:0,flame:.35,plasma:1,kinetic:.15,missile:0,sonic:.65,shotgun:.22,tesla:.4},nozone:{},amp:{}},snake:{weapon:{laser:.5,flame:.5,plasma:.5,kinetic:.5,missile:.5,sonic:.5,shotgun:.5,tesla:.5},nozone:{},amp:{}},centipede:{weapon:{laser:.5,flame:.85,plasma:.95,kinetic:.65,missile:.6,sonic:0,shotgun:.5,tesla:.01},nozone:{},amp:{}},spider:{weapon:{laser:.65,flame:1,plasma:.22,kinetic:.75,missile:.15,sonic:.38,shotgun:.9,tesla:.18},nozone:{},amp:{}},manticore:{weapon:{laser:.05,flame:.25,plasma:.95,kinetic:.5,missile:.15,sonic:.48,shotgun:.4,tesla:.6},nozone:{},amp:{}},fiend:{weapon:{laser:.75,flame:.25,plasma:.5,kinetic:.25,missile:.75,sonic:.25,shotgun:.5,tesla:.5},nozone:{},amp:{}},bat:{weapon:{laser:.16,flame:.18,plasma:.12,kinetic:.25,missile:.02,sonic:1,shotgun:.9,tesla:.58},nozone:{},amp:{}},medusa:{weapon:{laser:.35,flame:.1,plasma:.3,kinetic:.95,missile:1,sonic:.15,shotgun:.88,tesla:.26},nozone:{},amp:{}},ettin:{weapon:{laser:.5,flame:.35,plasma:.8,kinetic:.5,missile:.25,sonic:.3,shotgun:.6,tesla:.09},nozone:{},amp:{}},faceless:{weapon:{laser:.6,flame:.28,plasma:.6,kinetic:0,missile:.05,sonic:.8,shotgun:.15,tesla:1},nozone:{},amp:{}},enchanted:{weapon:{laser:1,flame:.02,plasma:.95,kinetic:.2,missile:.7,sonic:.05,shotgun:.65,tesla:.01},nozone:{},amp:{}},gargoyle:{weapon:{laser:.15,flame:.4,plasma:.3,kinetic:.5,missile:.5,sonic:.85,shotgun:1,tesla:.2},nozone:{},amp:{}},chimera:{weapon:{laser:.38,flame:.6,plasma:.42,kinetic:.85,missile:.35,sonic:.5,shotgun:.65,tesla:.8},nozone:{},amp:{}},gorgon:{weapon:{laser:.65,flame:.65,plasma:.65,kinetic:.65,missile:.65,sonic:.65,shotgun:.65,tesla:.65},nozone:{},amp:{}},kraken:{weapon:{laser:.75,flame:.35,plasma:.75,kinetic:.35,missile:.5,sonic:.18,shotgun:.05,tesla:.85},nozone:{},amp:{}},homunculus:{weapon:{laser:.05,flame:1,plasma:.1,kinetic:.85,missile:.65,sonic:.5,shotgun:.75,tesla:.2},nozone:{},amp:{}}};function ha(r,a){let i=9999,s=1e7;switch(r){case"small":{let n=e.blood.prepared&&e.blood.prepared>=2?5e4:75e3;s=a?n*2.5:n,i=a?20:1}break;case"medium":s=a?45e4:18e4,i=a?100:4;break;case"large":s=a?925e3:375e3,i=a?500:20;break;case"titan":s=a?15e5:75e4,i=a?1500:75;break;case"collector":{let n=e.blood.prepared&&e.blood.prepared>=2?8e3:1e4;s=a?n*2.5:n,i=1}break}return{s:i,c:s}}function qu(r){let a="laser",i="laser";return Object.keys(xa[r].weapon).forEach(function(s){xa[r].weapon[s]>xa[r].weapon[a]&&(a=s),xa[r].weapon[s]');r.append(a);let i=$(`${t("portal_mech_assembly")} - {{ b.size | slabel }} {{ b.chassis | clabel }}
`);a.append(i),i.append(` | ${t("portal_mech_bay_space")} : {{ m.bay }} / {{ m.max }} `),i.append(` | ${t("portal_mech_sup_avail")} : {{ p.supply | round }} / {{ p.sup_max }} `);let s=e.blood.prepared&&e.blood.prepared>=3?`${t("portal_mech_infernal")} (${t("portal_mech_infernal_effect",[25])}) `:"";a.append(`${t("portal_mech_space")} {{ b.size | bay }} | ${t("portal_mech_cost")} {{ b.size | price }} | ${t("portal_mech_soul",[e.resource.Soul_Gem.name])} {{ b.size | soul }} ${s}
`),a.append("{{ b.size | desc }}
");let n=$('
');a.append(n);let c="";["small","medium","large","titan","collector"].forEach(function(h,_){c+=`${t(`portal_mech_size_${h}`)} `}),n.append(`
${t("portal_mech_size")}: {{ b.size | slabel }}
@@ -558,7 +558,7 @@
${t("portal_mech_equipment")}: {{ b.equip[${h}] || 'shields' | equipment }}
${_}
- `)}a.append(`${t("portal_mech_construct")}
`),D({el:"#mechAssembly",data:{p:e.portal.purifier,m:e.portal.mechbay,b:e.portal.mechbay.blueprint},methods:{build(){let h=ha(e.portal.mechbay.blueprint.size,e.portal.mechbay.blueprint.infernal),_=h.c,m=h.s,w=Da(e.portal.mechbay.blueprint.size),M=e.portal.mechbay.max-e.portal.mechbay.bay;if(e.portal.purifier.supply>=_&&M>=w&&e.resource.Soul_Gem.amount>=m){e.portal.purifier.supply-=_,e.resource.Soul_Gem.amount-=m;let A=Ke(e.portal.mechbay.blueprint);e.portal.mechbay.mechs.push(A),e.portal.mechbay.bay+=w,e.portal.mechbay.active++}},setSize(h){switch(e.portal.mechbay.blueprint.size=h,h==="collector"?e.portal.mechbay.blueprint.hardpoint.length=0:h==="small"||h==="medium"?(e.portal.mechbay.blueprint.hardpoint.length===0&&e.portal.mechbay.blueprint.hardpoint.push("laser"),e.portal.mechbay.blueprint.hardpoint.length=1):(e.portal.mechbay.blueprint.hardpoint.length===0&&e.portal.mechbay.blueprint.hardpoint.push("laser"),e.portal.mechbay.blueprint.hardpoint.length===1&&e.portal.mechbay.blueprint.hardpoint.push(e.portal.mechbay.blueprint.hardpoint.includes("laser")?"plasma":"laser"),h==="titan"?e.portal.mechbay.blueprint.hardpoint.length===2&&(e.portal.mechbay.blueprint.hardpoint.push(e.portal.mechbay.blueprint.hardpoint.includes("laser")?"shotgun":"laser"),e.portal.mechbay.blueprint.hardpoint.push(e.portal.mechbay.blueprint.hardpoint.includes("laser")?"kinetic":"laser")):e.portal.mechbay.blueprint.hardpoint.length=2),h){case"small":e.blood.prepared&&e.portal.mechbay.blueprint.equip.push("special"),e.portal.mechbay.blueprint.equip.length=e.blood.prepared?1:0;break;case"medium":e.portal.mechbay.blueprint.equip.length<1&&e.portal.mechbay.blueprint.equip.push("special"),e.blood.prepared&&e.portal.mechbay.blueprint.equip.push("shields"),e.portal.mechbay.blueprint.equip.length=e.blood.prepared?2:1;break;case"collector":case"large":e.portal.mechbay.blueprint.equip.length<1&&e.portal.mechbay.blueprint.equip.push("special"),e.portal.mechbay.blueprint.equip.length<2&&e.portal.mechbay.blueprint.equip.push("shields"),e.blood.prepared&&e.portal.mechbay.blueprint.equip.push("grapple"),e.portal.mechbay.blueprint.equip.length=e.blood.prepared?3:2;break;case"titan":e.portal.mechbay.blueprint.equip.length<1&&e.portal.mechbay.blueprint.equip.push("special"),e.portal.mechbay.blueprint.equip.length<2&&e.portal.mechbay.blueprint.equip.push("shields"),e.portal.mechbay.blueprint.equip.length<3&&e.portal.mechbay.blueprint.equip.push("grapple"),e.portal.mechbay.blueprint.equip.length<4&&e.portal.mechbay.blueprint.equip.push("seals"),e.blood.prepared&&e.portal.mechbay.blueprint.equip.push("stabilizer"),e.portal.mechbay.blueprint.equip.length=e.blood.prepared?5:4;break}},setType(h){e.portal.mechbay.blueprint.chassis=h},setWep(h,_){e.portal.mechbay.blueprint.hardpoint[_]=h,D({el:"#mechAssembly"},"update")},setEquip(h,_){e.portal.mechbay.blueprint.equip[_]=h,D({el:"#mechAssembly"},"update")},vis(h){return e.portal.mechbay.blueprint.size==="collector"?!1:h===0||e.portal.mechbay.blueprint.size==="large"&&h<2||e.portal.mechbay.blueprint.size==="titan"},eVis(h){let _=e.blood.prepared?1:0;switch(e.portal.mechbay.blueprint.size){case"small":return _===1&&h===0;case"medium":return h<=0+_;case"collector":case"large":return h<=1+_;case"titan":return!0}}},filters:{bay(h){return Da(h)},price(h){return ha(h,e.portal.mechbay.blueprint.infernal).c},soul(h){return ha(h,e.portal.mechbay.blueprint.infernal).s},slabel(h){return t(`portal_mech_size_${h}`)},clabel(h){return t(`portal_mech_chassis_${h}`)},wlabel(h){return t(`portal_mech_weapon_${h}`)},desc(h){return t(`portal_mech_size_${h}_desc`)},round(h){return Math.round(h)},equipment(h){if(h!=="special")return t(`portal_mech_equip_${h}`);let _="jumpjet";switch(e.portal.mechbay.blueprint.size){case"large":_="battery";break;case"titan":_="target";break}return t(`portal_mech_equip_${_}`)}}}),["size","chassis","weapon","equip"].forEach(function(h){let _=1;h==="weapon"?_=4:h==="equip"&&(_=o);for(let m=0;m<_;m++)for(let w=0;w<$(`#mechAssembly .${h}.r${m}`).length;w++)pe(`mechAssembly${h}${m}${w}`,function(M){let A=$(M.this).attr("data-val");if(A==="special")switch(e.portal.mechbay.blueprint.size){case"large":A="battery";break;case"titan":A="target";break;default:A="jumpjet";break}return t(`portal_mech_${h}_${A}_desc`)},{elm:`#mechAssembly .${h}.r${m}.a${w}`,placement:"right"})});let d=$('
');r.append(d),Mu()}}function Mu(){Ws(),le($("#mechList")),$("#mechList").append(`
+ `)}a.append(`${t("portal_mech_construct")}
`),D({el:"#mechAssembly",data:{p:e.portal.purifier,m:e.portal.mechbay,b:e.portal.mechbay.blueprint},methods:{build(){let h=ha(e.portal.mechbay.blueprint.size,e.portal.mechbay.blueprint.infernal),_=h.c,m=h.s,w=Da(e.portal.mechbay.blueprint.size),M=e.portal.mechbay.max-e.portal.mechbay.bay;if(e.portal.purifier.supply>=_&&M>=w&&e.resource.Soul_Gem.amount>=m){e.portal.purifier.supply-=_,e.resource.Soul_Gem.amount-=m;let F=Ke(e.portal.mechbay.blueprint);e.portal.mechbay.mechs.push(F),e.portal.mechbay.bay+=w,e.portal.mechbay.active++}},setSize(h){switch(e.portal.mechbay.blueprint.size=h,h==="collector"?e.portal.mechbay.blueprint.hardpoint.length=0:h==="small"||h==="medium"?(e.portal.mechbay.blueprint.hardpoint.length===0&&e.portal.mechbay.blueprint.hardpoint.push("laser"),e.portal.mechbay.blueprint.hardpoint.length=1):(e.portal.mechbay.blueprint.hardpoint.length===0&&e.portal.mechbay.blueprint.hardpoint.push("laser"),e.portal.mechbay.blueprint.hardpoint.length===1&&e.portal.mechbay.blueprint.hardpoint.push(e.portal.mechbay.blueprint.hardpoint.includes("laser")?"plasma":"laser"),h==="titan"?e.portal.mechbay.blueprint.hardpoint.length===2&&(e.portal.mechbay.blueprint.hardpoint.push(e.portal.mechbay.blueprint.hardpoint.includes("laser")?"shotgun":"laser"),e.portal.mechbay.blueprint.hardpoint.push(e.portal.mechbay.blueprint.hardpoint.includes("laser")?"kinetic":"laser")):e.portal.mechbay.blueprint.hardpoint.length=2),h){case"small":e.blood.prepared&&e.portal.mechbay.blueprint.equip.push("special"),e.portal.mechbay.blueprint.equip.length=e.blood.prepared?1:0;break;case"medium":e.portal.mechbay.blueprint.equip.length<1&&e.portal.mechbay.blueprint.equip.push("special"),e.blood.prepared&&e.portal.mechbay.blueprint.equip.push("shields"),e.portal.mechbay.blueprint.equip.length=e.blood.prepared?2:1;break;case"collector":case"large":e.portal.mechbay.blueprint.equip.length<1&&e.portal.mechbay.blueprint.equip.push("special"),e.portal.mechbay.blueprint.equip.length<2&&e.portal.mechbay.blueprint.equip.push("shields"),e.blood.prepared&&e.portal.mechbay.blueprint.equip.push("grapple"),e.portal.mechbay.blueprint.equip.length=e.blood.prepared?3:2;break;case"titan":e.portal.mechbay.blueprint.equip.length<1&&e.portal.mechbay.blueprint.equip.push("special"),e.portal.mechbay.blueprint.equip.length<2&&e.portal.mechbay.blueprint.equip.push("shields"),e.portal.mechbay.blueprint.equip.length<3&&e.portal.mechbay.blueprint.equip.push("grapple"),e.portal.mechbay.blueprint.equip.length<4&&e.portal.mechbay.blueprint.equip.push("seals"),e.blood.prepared&&e.portal.mechbay.blueprint.equip.push("stabilizer"),e.portal.mechbay.blueprint.equip.length=e.blood.prepared?5:4;break}},setType(h){e.portal.mechbay.blueprint.chassis=h},setWep(h,_){e.portal.mechbay.blueprint.hardpoint[_]=h,D({el:"#mechAssembly"},"update")},setEquip(h,_){e.portal.mechbay.blueprint.equip[_]=h,D({el:"#mechAssembly"},"update")},vis(h){return e.portal.mechbay.blueprint.size==="collector"?!1:h===0||e.portal.mechbay.blueprint.size==="large"&&h<2||e.portal.mechbay.blueprint.size==="titan"},eVis(h){let _=e.blood.prepared?1:0;switch(e.portal.mechbay.blueprint.size){case"small":return _===1&&h===0;case"medium":return h<=0+_;case"collector":case"large":return h<=1+_;case"titan":return!0}}},filters:{bay(h){return Da(h)},price(h){return ha(h,e.portal.mechbay.blueprint.infernal).c},soul(h){return ha(h,e.portal.mechbay.blueprint.infernal).s},slabel(h){return t(`portal_mech_size_${h}`)},clabel(h){return t(`portal_mech_chassis_${h}`)},wlabel(h){return t(`portal_mech_weapon_${h}`)},desc(h){return t(`portal_mech_size_${h}_desc`)},round(h){return Math.round(h)},equipment(h){if(h!=="special")return t(`portal_mech_equip_${h}`);let _="jumpjet";switch(e.portal.mechbay.blueprint.size){case"large":_="battery";break;case"titan":_="target";break}return t(`portal_mech_equip_${_}`)}}}),["size","chassis","weapon","equip"].forEach(function(h){let _=1;h==="weapon"?_=4:h==="equip"&&(_=o);for(let m=0;m<_;m++)for(let w=0;w<$(`#mechAssembly .${h}.r${m}`).length;w++)pe(`mechAssembly${h}${m}${w}`,function(M){let F=$(M.this).attr("data-val");if(F==="special")switch(e.portal.mechbay.blueprint.size){case"large":F="battery";break;case"titan":F="target";break;default:F="jumpjet";break}return t(`portal_mech_${h}_${F}_desc`)},{elm:`#mechAssembly .${h}.r${m}.a${w}`,placement:"right"})});let d=$('
');r.append(d),Mu()}}function Mu(){Ws(),le($("#mechList")),$("#mechList").append(`
- `),D({el:"#mechList",data:e.portal.mechbay,methods:{scrap(a){if(e.portal.mechbay.mechs[a]){let i=ha(e.portal.mechbay.mechs[a].size,e.portal.mechbay.mechs[a].infernal),s=Da(e.portal.mechbay.mechs[a].size);e.portal.purifier.supply+=Math.floor(i.c/3),e.resource.Soul_Gem.amount+=Math.floor(i.s/2),e.portal.purifier.supply>e.portal.purifier.sup_max&&(e.portal.purifier.supply=e.portal.purifier.sup_max),e.portal.mechbay.mechs.splice(a,1),e.portal.mechbay.bay-=s,e.portal.mechbay.active--}}},filters:{equipment(a,i){if(a!=="special")return t(`portal_mech_equip_${a}`);let s="jumpjet";switch(i){case"large":s="battery";break;case"titan":s="target";break}return t(`portal_mech_equip_${s}`)},weapon(a){return t(`portal_mech_weapon_${a}`)},size(a){return t(`portal_mech_size_${a.size}`)},chassis(a){return t(`portal_mech_chassis_${a.chassis}`)}}}),Pu(),$("#mechList .scrap").each(function(a,i){pe(`mechList-scrap${a}`,function(){let s=ha(e.portal.mechbay.mechs[a].size,e.portal.mechbay.mechs[a].infernal);return t("portal_mech_scrap_refund",[Math.floor(s.c/3),Math.floor(s.s/2)])},{elm:i})})}function Da(r){switch(r){case"small":return 2;case"medium":return e.blood.prepared&&e.blood.prepared>=2?4:5;case"large":return e.blood.prepared&&e.blood.prepared>=2?8:10;case"titan":return e.blood.prepared&&e.blood.prepared>=2?20:25;case"collector":return 1;case"default":return 25}}function Ws(){let r=$("#mechList")[0];if(r){let a=Sortable.get(r);a&&a.destroy()}}function Pu(){let r=$("#mechList")[0];Sortable.create(r,{onEnd(a){let i=a.from.querySelectorAll(":scope > .mechRow");a.from.insertBefore(a.item,i[a.oldIndex+(a.oldIndex>a.newIndex)]);let s=e.portal.mechbay.mechs;s.splice(a.newDraggableIndex,0,s.splice(a.oldDraggableIndex,1)[0]),sn()}})}function sn(){let r=(pa.mechbay||0)*25,a=0,i=0,s=0;for(let n of e.portal.mechbay.mechs)a+=Da(n.size),a<=r&&(i++,n.size==="small"&&s++);e.portal.mechbay.bay=a,e.portal.mechbay.max=r,e.portal.mechbay.active=i,e.portal.mechbay.scouts=s}function nn(){let r=["sand","swamp","forest","jungle","rocky","gravel","muddy","grass","brush","concrete"];if(e.portal.spire.type=r[Math.floor(J(0,r.length))],e.portal.spire.count>=10){e.portal.spire.status={};let i=["freeze","hot","corrosive","humid","windy","hilly","mountain","radioactive","quake","dust","river","tar","steam","flooded","fog","rain","hail","chasm","dark","gravity"];if(za(i[Math.floor(J(0,i.length))]),e.portal.spire.count>=25&&e.portal.spire.count<=100){let s=105-e.portal.spire.count;Math.floor(J(0,s)<=5)&&za(i[Math.floor(J(0,i.length))])}else if(e.portal.spire.count>100&&e.portal.spire.count<=250){za(i[Math.floor(J(0,i.length))]);let s=260-e.portal.spire.count;Math.floor(J(0,s)<=10)&&za(i[Math.floor(J(0,i.length))])}else if(e.portal.spire.count>250&&e.portal.spire.count<=1e3){za(i[Math.floor(J(0,i.length))]),za(i[Math.floor(J(0,i.length))]);let s=1025-e.portal.spire.count;Math.floor(J(0,s)<=25)&&za(i[Math.floor(J(0,i.length))])}else e.portal.spire.count>1e3&&(za(i[Math.floor(J(0,i.length))]),za(i[Math.floor(J(0,i.length))]),za(i[Math.floor(J(0,i.length))]))}let a=Object.keys(xa).filter(function(i){let s=Object.keys(xa[i].nozone);return!(s.some(n=>Object.keys(e.portal.spire.status).includes(n))||s.includes(e.portal.spire.type))});e.portal.spire.boss=a[Math.floor(J(0,a.length))]}function za(r){e.portal.spire.status.freeze||e.portal.spire.status.hot?r!=="freeze"&&r!=="hot"&&(e.portal.spire.status[r]=!0):e.portal.spire.status.rain||e.portal.spire.status.hail?r!=="rain"&&r!=="hail"&&(e.portal.spire.status[r]=!0):e.portal.spire.status[r]=!0}function Wo(r,a,i){return r.equip.includes("special")&&(r.size==="small"||r.size==="medium"||r.size==="collector")&&a<1&&(a+=(1-a)*(i.includes("gravity")?.1:.2)),r.size!=="small"&&a<1&&(a+=(i.includes("fog")||i.includes("dark")?.005:.01)*e.portal.mechbay.scouts,a>1&&(a=1)),a}function Cu(r,a){return a<1&&a!==0&&r.equip.includes("special")&&r.size==="titan"&&(a+=(1-a)*.25),r.equip.includes("special")&&r.size==="large"&&(a*=1.02),a}function Qo(r,a){let i=1;switch(a){case"freeze":r.equip.includes("radiator")||(i=.25);break;case"hot":r.equip.includes("coolant")||(i=.25);break;case"corrosive":r.equip.includes("ablative")||(i=r.equip.includes("shields")?.75:.25);break;case"humid":r.equip.includes("seals")||(i=.75);break;case"windy":r.chassis==="hover"&&(i=.5);break;case"hilly":r.chassis!=="spider"&&(i=.75);break;case"mountain":r.chassis!=="spider"&&!r.equip.includes("grapple")&&(i=r.equip.includes("flare")?.75:.5);break;case"radioactive":r.equip.includes("shields")||(i=.5);break;case"quake":r.equip.includes("stabilizer")||(i=.25);break;case"dust":r.equip.includes("seals")||(i=.5);break;case"river":r.chassis!=="hover"&&(i=.65);break;case"tar":r.chassis!=="quad"&&(i=r.chassis==="tread"||r.chassis==="wheel"?.5:.75);break;case"steam":r.equip.includes("shields")||(i=.75);break;case"flooded":r.chassis!=="hover"&&(i=.35);break;case"fog":r.equip.includes("sonar")||(i=.2);break;case"rain":r.equip.includes("seals")||(i=.75);break;case"hail":!r.equip.includes("ablative")&&!r.equip.includes("shields")&&(i=.75);break;case"chasm":r.equip.includes("grapple")||(i=.1);break;case"dark":r.equip.includes("infrared")||(i=r.equip.includes("flare")?.25:.1);break;case"gravity":switch(r.size){case"medium":i=.8;break;case"large":i=.45;break;case"titan":i=.25;break}break}return i}function Vo(r,a){let i=a||e.portal.spire.type,s=1;switch(r.chassis){case"wheel":switch(i){case"sand":s=["small","medium"].includes(r.size)?.9:.85;break;case"swamp":s=["small","medium"].includes(r.size)?.35:.18;break;case"jungle":s=["small","medium"].includes(r.size)?.92:.85;break;case"rocky":s=["small","medium"].includes(r.size)?.65:.5;break;case"gravel":s=["small","medium"].includes(r.size)?1:.95;break;case"muddy":s=["small","medium"].includes(r.size)?.85:.58;break;case"grass":s=["small","medium"].includes(r.size)?1.3:1.2;break;case"brush":s=["small","medium"].includes(r.size)?.9:.8;break;case"concrete":s=["small","medium"].includes(r.size)?1.1:1;break}break;case"tread":switch(i){case"sand":s=["small","medium"].includes(r.size)?1.15:1.1;break;case"swamp":s=["small","medium"].includes(r.size)?.55:.4;break;case"forest":s=["small","medium"].includes(r.size)?1:.95;break;case"jungle":s=["small","medium"].includes(r.size)?.95:.9;break;case"rocky":s=["small","medium"].includes(r.size)?.65:.5;break;case"gravel":s=["small","medium"].includes(r.size)?1.3:1.2;break;case"muddy":s=["small","medium"].includes(r.size)?.88:.72;break}break;case"biped":switch(i){case"sand":s=["small","medium"].includes(r.size)?.78:.65;break;case"swamp":s=["small","medium"].includes(r.size)?.68:.5;break;case"forest":s=["small","medium"].includes(r.size)?1:.95;break;case"jungle":s=["small","medium"].includes(r.size)?.82:.7;break;case"rocky":s=["small","medium"].includes(r.size)?.48:.4;break;case"muddy":s=["small","medium"].includes(r.size)?.85:.7;break;case"grass":s=["small","medium"].includes(r.size)?1.25:1.2;break;case"brush":s=["small","medium"].includes(r.size)?.92:.85;break}break;case"quad":switch(i){case"sand":s=["small","medium"].includes(r.size)?.86:.75;break;case"swamp":s=["small","medium"].includes(r.size)?.58:.42;break;case"forest":s=["small","medium"].includes(r.size)?1.25:1.2;break;case"rocky":s=["small","medium"].includes(r.size)?.95:.9;break;case"gravel":s=["small","medium"].includes(r.size)?.9:.8;break;case"muddy":s=["small","medium"].includes(r.size)?.68:.5;break;case"grass":s=["small","medium"].includes(r.size)?1:.95;break;case"brush":s=["small","medium"].includes(r.size)?.95:.9;break}break;case"spider":switch(i){case"sand":s=["small","medium"].includes(r.size)?.75:.65;break;case"swamp":s=["small","medium"].includes(r.size)?.9:.78;break;case"forest":s=["small","medium"].includes(r.size)?.82:.75;break;case"jungle":s=["small","medium"].includes(r.size)?.77:.65;break;case"rocky":s=["small","medium"].includes(r.size)?1.25:1.2;break;case"gravel":s=["small","medium"].includes(r.size)?.86:.75;break;case"muddy":s=["small","medium"].includes(r.size)?.92:.82;break;case"brush":s=["small","medium"].includes(r.size)?1:.95;break}break;case"hover":switch(i){case"swamp":s=["small","medium"].includes(r.size)?1.35:1.2;break;case"forest":s=["small","medium"].includes(r.size)?.65:.48;break;case"jungle":s=["small","medium"].includes(r.size)?.55:.35;break;case"rocky":s=["small","medium"].includes(r.size)?.82:.68;break;case"muddy":s=["small","medium"].includes(r.size)?1.15:1.08;break;case"brush":s=["small","medium"].includes(r.size)?.78:.7;break}break}return s}function Zo(r){let a=r.infernal?31.25:25,i=Vo(r),s=[];return Object.keys(e.portal.spire.status).forEach(function(n){s.push(n),a*=Qo(r,n)}),a*=Wo(r,i,s),a}function Ou(r){switch(r){case"small":return .0025;case"medium":return .0075;case"large":return .01;case"titan":return .012;default:return 0}}function pc(r,a){let i=Ou(r.size);if(i===0)return 0;if(r.hasOwnProperty("infernal")&&r.infernal&&e.blood.prepared&&e.blood.prepared>=3&&(i*=1.25),a){e.stats.achieve.gladiator&&e.stats.achieve.gladiator.l>0&&(i*=1+e.stats.achieve.gladiator.l*.1),e.blood.wrath&&(i*=1+e.blood.wrath/20),r.size==="titan"&&(i*=1.1);let s=it();e.stats.spire.hasOwnProperty(s)&&e.stats.spire[s].hasOwnProperty("dlstr")?i/=100+e.stats.spire[s].dlstr*25:i/=100;let n=0;for(let c=0;c0&&(i*=1+e.stats.achieve.gladiator.l*.2),e.blood.wrath&&(i*=1+e.blood.wrath/20),e.portal.spire.type==="concrete")switch(r.size){case"small":i*=.92;break;case"medium":i*=.95;break;case"titan":i*=1.25;break}let s=Vo(r),n=[];Object.keys(e.portal.spire.status).forEach(function(l){n.push(l),i*=Qo(r,l)}),i*=Wo(r,s,n),i/=e.portal.spire.count;let c=0;for(let l=0;l nav ul li").length-1&&!r)return;let a=$("#mTabObserve");le(a);let i=$('
');if(a.append(i),i.append(`
+ `),D({el:"#mechList",data:e.portal.mechbay,methods:{scrap(a){if(e.portal.mechbay.mechs[a]){let i=ha(e.portal.mechbay.mechs[a].size,e.portal.mechbay.mechs[a].infernal),s=Da(e.portal.mechbay.mechs[a].size);e.portal.purifier.supply+=Math.floor(i.c/3),e.resource.Soul_Gem.amount+=Math.floor(i.s/2),e.portal.purifier.supply>e.portal.purifier.sup_max&&(e.portal.purifier.supply=e.portal.purifier.sup_max),e.portal.mechbay.mechs.splice(a,1),e.portal.mechbay.bay-=s,e.portal.mechbay.active--}}},filters:{equipment(a,i){if(a!=="special")return t(`portal_mech_equip_${a}`);let s="jumpjet";switch(i){case"large":s="battery";break;case"titan":s="target";break}return t(`portal_mech_equip_${s}`)},weapon(a){return t(`portal_mech_weapon_${a}`)},size(a){return t(`portal_mech_size_${a.size}`)},chassis(a){return t(`portal_mech_chassis_${a.chassis}`)}}}),Pu(),$("#mechList .scrap").each(function(a,i){pe(`mechList-scrap${a}`,function(){let s=ha(e.portal.mechbay.mechs[a].size,e.portal.mechbay.mechs[a].infernal);return t("portal_mech_scrap_refund",[Math.floor(s.c/3),Math.floor(s.s/2)])},{elm:i})})}function Da(r){switch(r){case"small":return 2;case"medium":return e.blood.prepared&&e.blood.prepared>=2?4:5;case"large":return e.blood.prepared&&e.blood.prepared>=2?8:10;case"titan":return e.blood.prepared&&e.blood.prepared>=2?20:25;case"collector":return 1;case"default":return 25}}function Ws(){let r=$("#mechList")[0];if(r){let a=Sortable.get(r);a&&a.destroy()}}function Pu(){let r=$("#mechList")[0];Sortable.create(r,{onEnd(a){let i=a.from.querySelectorAll(":scope > .mechRow");a.from.insertBefore(a.item,i[a.oldIndex+(a.oldIndex>a.newIndex)]);let s=e.portal.mechbay.mechs;s.splice(a.newDraggableIndex,0,s.splice(a.oldDraggableIndex,1)[0]),sn()}})}function sn(){let r=(pa.mechbay||0)*25,a=0,i=0,s=0;for(let n of e.portal.mechbay.mechs)a+=Da(n.size),a<=r&&(i++,n.size==="small"&&s++);e.portal.mechbay.bay=a,e.portal.mechbay.max=r,e.portal.mechbay.active=i,e.portal.mechbay.scouts=s}function nn(){let r=["sand","swamp","forest","jungle","rocky","gravel","muddy","grass","brush","concrete"];if(e.portal.spire.type=r[Math.floor(J(0,r.length))],e.portal.spire.count>=10){e.portal.spire.status={};let i=["freeze","hot","corrosive","humid","windy","hilly","mountain","radioactive","quake","dust","river","tar","steam","flooded","fog","rain","hail","chasm","dark","gravity"];if(za(i[Math.floor(J(0,i.length))]),e.portal.spire.count>=25&&e.portal.spire.count<=100){let s=105-e.portal.spire.count;Math.floor(J(0,s)<=5)&&za(i[Math.floor(J(0,i.length))])}else if(e.portal.spire.count>100&&e.portal.spire.count<=250){za(i[Math.floor(J(0,i.length))]);let s=260-e.portal.spire.count;Math.floor(J(0,s)<=10)&&za(i[Math.floor(J(0,i.length))])}else if(e.portal.spire.count>250&&e.portal.spire.count<=1e3){za(i[Math.floor(J(0,i.length))]),za(i[Math.floor(J(0,i.length))]);let s=1025-e.portal.spire.count;Math.floor(J(0,s)<=25)&&za(i[Math.floor(J(0,i.length))])}else e.portal.spire.count>1e3&&(za(i[Math.floor(J(0,i.length))]),za(i[Math.floor(J(0,i.length))]),za(i[Math.floor(J(0,i.length))]))}let a=Object.keys(xa).filter(function(i){let s=Object.keys(xa[i].nozone);return!(s.some(n=>Object.keys(e.portal.spire.status).includes(n))||s.includes(e.portal.spire.type))});e.portal.spire.boss=a[Math.floor(J(0,a.length))]}function za(r){e.portal.spire.status.freeze||e.portal.spire.status.hot?r!=="freeze"&&r!=="hot"&&(e.portal.spire.status[r]=!0):e.portal.spire.status.rain||e.portal.spire.status.hail?r!=="rain"&&r!=="hail"&&(e.portal.spire.status[r]=!0):e.portal.spire.status[r]=!0}function Wo(r,a,i){return r.equip.includes("special")&&(r.size==="small"||r.size==="medium"||r.size==="collector")&&a<1&&(a+=(1-a)*(i.includes("gravity")?.1:.2)),r.size!=="small"&&a<1&&(a+=(i.includes("fog")||i.includes("dark")?.005:.01)*e.portal.mechbay.scouts,a>1&&(a=1)),a}function Cu(r,a){return a<1&&a!==0&&r.equip.includes("special")&&r.size==="titan"&&(a+=(1-a)*.25),r.equip.includes("special")&&r.size==="large"&&(a*=1.02),a}function Qo(r,a){let i=1;switch(a){case"freeze":r.equip.includes("radiator")||(i=.25);break;case"hot":r.equip.includes("coolant")||(i=.25);break;case"corrosive":r.equip.includes("ablative")||(i=r.equip.includes("shields")?.75:.25);break;case"humid":r.equip.includes("seals")||(i=.75);break;case"windy":r.chassis==="hover"&&(i=.5);break;case"hilly":r.chassis!=="spider"&&(i=.75);break;case"mountain":r.chassis!=="spider"&&!r.equip.includes("grapple")&&(i=r.equip.includes("flare")?.75:.5);break;case"radioactive":r.equip.includes("shields")||(i=.5);break;case"quake":r.equip.includes("stabilizer")||(i=.25);break;case"dust":r.equip.includes("seals")||(i=.5);break;case"river":r.chassis!=="hover"&&(i=.65);break;case"tar":r.chassis!=="quad"&&(i=r.chassis==="tread"||r.chassis==="wheel"?.5:.75);break;case"steam":r.equip.includes("shields")||(i=.75);break;case"flooded":r.chassis!=="hover"&&(i=.35);break;case"fog":r.equip.includes("sonar")||(i=.2);break;case"rain":r.equip.includes("seals")||(i=.75);break;case"hail":!r.equip.includes("ablative")&&!r.equip.includes("shields")&&(i=.75);break;case"chasm":r.equip.includes("grapple")||(i=.1);break;case"dark":r.equip.includes("infrared")||(i=r.equip.includes("flare")?.25:.1);break;case"gravity":switch(r.size){case"medium":i=.8;break;case"large":i=.45;break;case"titan":i=.25;break}break}return i}function Vo(r,a){let i=a||e.portal.spire.type,s=1;switch(r.chassis){case"wheel":switch(i){case"sand":s=["small","medium"].includes(r.size)?.9:.85;break;case"swamp":s=["small","medium"].includes(r.size)?.35:.18;break;case"jungle":s=["small","medium"].includes(r.size)?.92:.85;break;case"rocky":s=["small","medium"].includes(r.size)?.65:.5;break;case"gravel":s=["small","medium"].includes(r.size)?1:.95;break;case"muddy":s=["small","medium"].includes(r.size)?.85:.58;break;case"grass":s=["small","medium"].includes(r.size)?1.3:1.2;break;case"brush":s=["small","medium"].includes(r.size)?.9:.8;break;case"concrete":s=["small","medium"].includes(r.size)?1.1:1;break}break;case"tread":switch(i){case"sand":s=["small","medium"].includes(r.size)?1.15:1.1;break;case"swamp":s=["small","medium"].includes(r.size)?.55:.4;break;case"forest":s=["small","medium"].includes(r.size)?1:.95;break;case"jungle":s=["small","medium"].includes(r.size)?.95:.9;break;case"rocky":s=["small","medium"].includes(r.size)?.65:.5;break;case"gravel":s=["small","medium"].includes(r.size)?1.3:1.2;break;case"muddy":s=["small","medium"].includes(r.size)?.88:.72;break}break;case"biped":switch(i){case"sand":s=["small","medium"].includes(r.size)?.78:.65;break;case"swamp":s=["small","medium"].includes(r.size)?.68:.5;break;case"forest":s=["small","medium"].includes(r.size)?1:.95;break;case"jungle":s=["small","medium"].includes(r.size)?.82:.7;break;case"rocky":s=["small","medium"].includes(r.size)?.48:.4;break;case"muddy":s=["small","medium"].includes(r.size)?.85:.7;break;case"grass":s=["small","medium"].includes(r.size)?1.25:1.2;break;case"brush":s=["small","medium"].includes(r.size)?.92:.85;break}break;case"quad":switch(i){case"sand":s=["small","medium"].includes(r.size)?.86:.75;break;case"swamp":s=["small","medium"].includes(r.size)?.58:.42;break;case"forest":s=["small","medium"].includes(r.size)?1.25:1.2;break;case"rocky":s=["small","medium"].includes(r.size)?.95:.9;break;case"gravel":s=["small","medium"].includes(r.size)?.9:.8;break;case"muddy":s=["small","medium"].includes(r.size)?.68:.5;break;case"grass":s=["small","medium"].includes(r.size)?1:.95;break;case"brush":s=["small","medium"].includes(r.size)?.95:.9;break}break;case"spider":switch(i){case"sand":s=["small","medium"].includes(r.size)?.75:.65;break;case"swamp":s=["small","medium"].includes(r.size)?.9:.78;break;case"forest":s=["small","medium"].includes(r.size)?.82:.75;break;case"jungle":s=["small","medium"].includes(r.size)?.77:.65;break;case"rocky":s=["small","medium"].includes(r.size)?1.25:1.2;break;case"gravel":s=["small","medium"].includes(r.size)?.86:.75;break;case"muddy":s=["small","medium"].includes(r.size)?.92:.82;break;case"brush":s=["small","medium"].includes(r.size)?1:.95;break}break;case"hover":switch(i){case"swamp":s=["small","medium"].includes(r.size)?1.35:1.2;break;case"forest":s=["small","medium"].includes(r.size)?.65:.48;break;case"jungle":s=["small","medium"].includes(r.size)?.55:.35;break;case"rocky":s=["small","medium"].includes(r.size)?.82:.68;break;case"muddy":s=["small","medium"].includes(r.size)?1.15:1.08;break;case"brush":s=["small","medium"].includes(r.size)?.78:.7;break}break}return s}function Zo(r){let a=r.infernal?31.25:25,i=Vo(r),s=[];return Object.keys(e.portal.spire.status).forEach(function(n){s.push(n),a*=Qo(r,n)}),a*=Wo(r,i,s),a}function Ou(r){switch(r){case"small":return .0025;case"medium":return .0075;case"large":return .01;case"titan":return .012;default:return 0}}function pc(r,a){let i=Ou(r.size);if(i===0)return 0;if(r.hasOwnProperty("infernal")&&r.infernal&&e.blood.prepared&&e.blood.prepared>=3&&(i*=1.25),a){e.stats.achieve.gladiator&&e.stats.achieve.gladiator.l>0&&(i*=1+e.stats.achieve.gladiator.l*.1),e.blood.wrath&&(i*=1+e.blood.wrath/20),r.size==="titan"&&(i*=1.1);let s=ot();e.stats.spire.hasOwnProperty(s)&&e.stats.spire[s].hasOwnProperty("dlstr")?i/=100+e.stats.spire[s].dlstr*25:i/=100;let n=0;for(let c=0;c0&&(i*=1+e.stats.achieve.gladiator.l*.2),e.blood.wrath&&(i*=1+e.blood.wrath/20),e.portal.spire.type==="concrete")switch(r.size){case"small":i*=.92;break;case"medium":i*=.95;break;case"titan":i*=1.25;break}let s=Vo(r),n=[];Object.keys(e.portal.spire.status).forEach(function(l){n.push(l),i*=Qo(r,l)}),i*=Wo(r,s,n),i/=e.portal.spire.count;let c=0;for(let l=0;l nav ul li").length-1&&!r)return;let a=$("#mTabObserve");le(a);let i=$('
');if(a.append(i),i.append(`
${t("hell_tabs_reports")}
@@ -604,7 +604,7 @@
${t("hell_analysis_time_hours")}
${t("hell_analysis_time_days")}
- `),D({el:"#hellAnalysis",data:{s:e.portal.observe.settings,r:e.race}});let o=function(w,M){w=w.toFixed(M);let A=Math.floor(w),x=(+(w-A).toFixed(M)).toString().substring(1);return A.toLocaleString()+x},d=function(w,M,A){if(w){switch(A!=="game_days"&&e.portal.observe.settings.hyperSlow&&(e.race.slow&&(M*=1+b.slow.vars()[0]/100),e.race.hyper&&(M*=1-b.hyper.vars()[0]/100)),w/=M,A){case"seconds":w/=5;break;case"minutes":w*=12;break;case"hours":w*=720;break;case"days":w*=17280;break;default:break}w=e.portal.observe.settings.expanded?o(w,5):Ee(w,5,!0)}return t("hell_analysis_time_average",[w,t(`hell_analysis_time_${A}_abbr`)])},h=function(w,M){if(!w)return;let A=$(`#${w}`);le(A),A.append(`
+ `),D({el:"#hellAnalysis",data:{s:e.portal.observe.settings,r:e.race}});let o=function(w,M){w=w.toFixed(M);let F=Math.floor(w),x=(+(w-F).toFixed(M)).toString().substring(1);return F.toLocaleString()+x},d=function(w,M,F){if(w){switch(F!=="game_days"&&e.portal.observe.settings.hyperSlow&&(e.race.slow&&(M*=1+b.slow.vars()[0]/100),e.race.hyper&&(M*=1-b.hyper.vars()[0]/100)),w/=M,F){case"seconds":w/=5;break;case"minutes":w*=12;break;case"hours":w*=720;break;case"days":w*=17280;break;default:break}w=e.portal.observe.settings.expanded?o(w,5):Ee(w,5,!0)}return t("hell_analysis_time_average",[w,t(`hell_analysis_time_${F}_abbr`)])},h=function(w,M){if(!w)return;let F=$(`#${w}`);le(F),F.append(`
${t("hell_analysis_"+M)} ${M==="period"?'{{ | resetLabel }} ':""}
{{ st.${M}.start | startLabel }}
{{ st.${M}.days, s.display | time }}
@@ -631,7 +631,7 @@
{{ st.${M}.revived, 'revived', s.average | generic }}
{{ st.${M}.surveyors, 'surveyors', s.average | generic }}
{{ st.${M}.sieges, 'sieges', s.average | generic }}
- `),D({el:`#${w}`,data:{st:e.portal.observe.stats,s:e.portal.observe.settings,p:e.portal,r:e.race,sg:e.resource.Soul_Gem},methods:{resetObservations(){Object.keys(e.portal.observe.stats.period).forEach(function(x){["kills","gems"].includes(x)?Object.keys(e.portal.observe.stats.period[x]).forEach(function(j){e.portal.observe.stats.period[x][j]=0}):x==="start"?e.portal.observe.stats.period.start={year:e.city.calendar.year,day:e.city.calendar.day}:e.portal.observe.stats.period[x]=0})},toggleDropdown(x){e.portal.observe.settings[x]=!e.portal.observe.settings[x]}},filters:{generic(x,j,B){return B?t("hell_analysis_number_display",[t(`hell_analysis_${j}`),d(x,e.portal.observe.stats[M].days,e.portal.observe.settings.display)]):t("hell_analysis_number_display",[t(`hell_analysis_${j}`),e.portal.observe.settings.expanded?(+x.toFixed(5)).toLocaleString():Ee(x,5,!0)])},genericSub(x,j,B){return B?"\u1102"+t("hell_analysis_number_display",[t(`hell_analysis_${j}`),d(x,e.portal.observe.stats[M].days,e.portal.observe.settings.display)]):"\u1102"+t("hell_analysis_number_display",[t(`hell_analysis_${j}`),e.portal.observe.settings.expanded?(+x.toFixed(5)).toLocaleString():Ee(x,5,!0)])},genericMulti(x,j,B){let S=0;return Object.keys(x).forEach(function(Q){S+=x[Q]}),B?t("hell_analysis_number_display",[t(`hell_analysis_${j}`),d(S,e.portal.observe.stats[M].days,e.portal.observe.settings.display)]):t("hell_analysis_number_display",[t(`hell_analysis_${j}`),e.portal.observe.settings.expanded?(+S.toFixed(5)).toLocaleString():Ee(S,5,!0)])},time(x,j){switch(j!=="game_days"&&e.portal.observe.settings.hyperSlow&&(e.race.slow&&(x*=1+b.slow.vars()[0]/100),e.race.hyper&&(x*=1-b.hyper.vars()[0]/100)),j){case"seconds":x*=5;break;case"minutes":x/=12;break;case"hours":x/=720;break;case"days":x/=17280;break;default:break}return t("hell_analysis_time",[t(`hell_analysis_time_${j}`),e.portal.observe.settings.expanded?o(x,8):Ee(x,5,!0)])},resetLabel(){return t("hell_analysis_period_reset")},startLabel(x){return t("hell_analysis_start",[x.year,x.day])},dropdownLabel(x){return x?"\u25B2":"\u25BC"}}})};h("hellAnalysisTotal","total"),h("hellAnalysisPeriod","period"),a=$("#hellAnalysis");let _=$("
");a.append(_),_.append(`
${t("hell_graph_create")} `);let m=$('
');_.append(m),D({el:"#hellGraphCreator",methods:{createGraph(){let w={template:'
'};this.$buefy.modal.open({parent:this,component:w});let M=setInterval(function(){if($("#modalBox").length>0){clearInterval(M),$("#modalBox").append($(`${t("hell_graph_title")}
`));var A=$('
');$("#modalBox").append(A);let x=$('
');A.append(x);let j={chartType:"pie",name:"",chartName:"",data:[],radioFake:"",showGroups:!0},B={show:!1,message:""};x.append(`
+ `),D({el:`#${w}`,data:{st:e.portal.observe.stats,s:e.portal.observe.settings,p:e.portal,r:e.race,sg:e.resource.Soul_Gem},methods:{resetObservations(){Object.keys(e.portal.observe.stats.period).forEach(function(x){["kills","gems"].includes(x)?Object.keys(e.portal.observe.stats.period[x]).forEach(function(j){e.portal.observe.stats.period[x][j]=0}):x==="start"?e.portal.observe.stats.period.start={year:e.city.calendar.year,day:e.city.calendar.day}:e.portal.observe.stats.period[x]=0})},toggleDropdown(x){e.portal.observe.settings[x]=!e.portal.observe.settings[x]}},filters:{generic(x,j,B){return B?t("hell_analysis_number_display",[t(`hell_analysis_${j}`),d(x,e.portal.observe.stats[M].days,e.portal.observe.settings.display)]):t("hell_analysis_number_display",[t(`hell_analysis_${j}`),e.portal.observe.settings.expanded?(+x.toFixed(5)).toLocaleString():Ee(x,5,!0)])},genericSub(x,j,B){return B?"\u1102"+t("hell_analysis_number_display",[t(`hell_analysis_${j}`),d(x,e.portal.observe.stats[M].days,e.portal.observe.settings.display)]):"\u1102"+t("hell_analysis_number_display",[t(`hell_analysis_${j}`),e.portal.observe.settings.expanded?(+x.toFixed(5)).toLocaleString():Ee(x,5,!0)])},genericMulti(x,j,B){let S=0;return Object.keys(x).forEach(function(Q){S+=x[Q]}),B?t("hell_analysis_number_display",[t(`hell_analysis_${j}`),d(S,e.portal.observe.stats[M].days,e.portal.observe.settings.display)]):t("hell_analysis_number_display",[t(`hell_analysis_${j}`),e.portal.observe.settings.expanded?(+S.toFixed(5)).toLocaleString():Ee(S,5,!0)])},time(x,j){switch(j!=="game_days"&&e.portal.observe.settings.hyperSlow&&(e.race.slow&&(x*=1+b.slow.vars()[0]/100),e.race.hyper&&(x*=1-b.hyper.vars()[0]/100)),j){case"seconds":x*=5;break;case"minutes":x/=12;break;case"hours":x/=720;break;case"days":x/=17280;break;default:break}return t("hell_analysis_time",[t(`hell_analysis_time_${j}`),e.portal.observe.settings.expanded?o(x,8):Ee(x,5,!0)])},resetLabel(){return t("hell_analysis_period_reset")},startLabel(x){return t("hell_analysis_start",[x.year,x.day])},dropdownLabel(x){return x?"\u25B2":"\u25BC"}}})};h("hellAnalysisTotal","total"),h("hellAnalysisPeriod","period"),a=$("#hellAnalysis");let _=$("
");a.append(_),_.append(`
${t("hell_graph_create")} `);let m=$('
');_.append(m),D({el:"#hellGraphCreator",methods:{createGraph(){let w={template:'
'};this.$buefy.modal.open({parent:this,component:w});let M=setInterval(function(){if($("#modalBox").length>0){clearInterval(M),$("#modalBox").append($(`${t("hell_graph_title")}
`));var F=$('
');$("#modalBox").append(F);let x=$('
');F.append(x);let j={chartType:"pie",name:"",chartName:"",data:[],radioFake:"",showGroups:!0},B={show:!1,message:""};x.append(`
${t("hell_graph_name")}
`),x.append(`
@@ -670,12 +670,12 @@
${t("year")+" "+d+" | "+t("day")+" "+h} ${m}
`+r}h=1}for(h;h
${w>=5?`♦x${w}`:"♦".repeat(w)}`),r=`
${t("year")+" "+d+" | "+t("day")+" "+h} ${m}
- `+r}c.year=d,c.day=h;let _=$("#hellReportList");le(_),_.append(r),D({el:"#hellReportList",methods:{reportLoad(m,w){o(m,w)}}})},o=function(d,h){if(!d||!h)return;let _=$("#hellReportDisplay");le(_);let m=mr[`year-${d}`][`day-${h}`],w=$('
');_.append(w);let M=0,A=0;if(Object.keys(m.stats.kills).forEach(function(x){M+=m.stats.kills[x]}),Object.keys(m.stats.gems).forEach(function(x){A+=m.stats.gems[x]}),w.append(`
${t("hell_report_log_stats",[d,h])} `),w.append(`
+ `+r}c.year=d,c.day=h;let _=$("#hellReportList");le(_),_.append(r),D({el:"#hellReportList",methods:{reportLoad(m,w){o(m,w)}}})},o=function(d,h){if(!d||!h)return;let _=$("#hellReportDisplay");le(_);let m=mr[`year-${d}`][`day-${h}`],w=$('
');_.append(w);let M=0,F=0;if(Object.keys(m.stats.kills).forEach(function(x){M+=m.stats.kills[x]}),Object.keys(m.stats.gems).forEach(function(x){F+=m.stats.gems[x]}),w.append(`
${t("hell_report_log_stats",[d,h])} `),w.append(`
${t("hell_report_log_stats_kills",[M])}
- ${t("hell_report_log_stats_gems",[A])}
+ ${t("hell_report_log_stats_gems",[F])}
${t("hell_report_log_stats_wounded",[m.stats.wounded])}
${t("hell_report_log_stats_died",[m.stats.died])}
- `),_.append(`
${t("hell_report_log_report",[d,h])} `),_.append(`
${t("hell_report_log_start",[m.start])}
`),m.drones&&Object.keys(m.drones).forEach(function(x){let j=m.drones[x],B=t("hell_report_log_obj_counter",[t("portal_war_drone_title"),x]);j.encounter?_.append(`
${t("hell_report_log_encounter",[B,j.kills])}
`):_.append(`
${t("hell_report_log_encounter_fail",[B])}
`)}),m.patrols&&Object.keys(m.patrols).forEach(function(x){let j=m.patrols[x],B=t("hell_report_log_obj_counter",[t("hell_report_log_patrol"),x]);if(B=j.droid?t("hell_report_log_patrol_droid",[B]):B,j.encounter){let S=$("
");j.ambush?S.append(`
${t("hell_report_log_patrol_ambush",[B,j.kills])} `):S.append(`
${t("hell_report_log_encounter",[B,j.kills])} `),j.wounded&&S.append(`
${j.wounded>1?t("hell_report_log_patrol_wounded_plural",[j.wounded]):t("hell_report_log_patrol_wounded")} `),j.died&&S.append(`
${j.died>1?t("hell_report_log_patrol_killed_plural",[j.died]):t("hell_report_log_patrol_killed")} `),j.gem>0&&S.append(`
${t("hell_report_log_soul_find",[e.resource.Soul_Gem.name,j.gem])} `),_.append(S)}else _.append(`
${t("hell_report_log_encounter_fail",[B])}
`)}),m.surveyor_finds&&Object.keys(m.surveyor_finds).forEach(function(x){let j=m.surveyor_finds[x],B=t("hell_report_log_obj_counter",[t("job_hell_surveyor"),x]),S=$("
");S.append(`
${t("hell_report_log_search",[B,j.bodies])} `),j.gem>0&&S.append(`
${t("hell_report_log_soul_search",[e.resource.Soul_Gem.name,j.gem])} `),_.append(S)}),m.revived&&_.append(`
${m.revived>1?t("hell_report_log_revived_plural",[m.revived]):t("hell_report_log_revived")}
`),m.patrols_lost&&_.append(`
${t("hell_report_log_patrols_lost",[m.patrols_lost])}
`),m.siege&&(m.siege.destroyed?_.append(`
${t("hell_report_log_siege",[m.siege.surveyors,m.siege.soldiers,m.siege.kills])}
`):_.append(`
${t("hell_report_log_siege_fail",[m.siege.damage,m.siege.kills])}
`)),m.demons&&_.append(`
${t("hell_report_log_demons",[m.demons])}
`),m.surveyors&&_.append(`
${m.surveyors>1?t("hell_report_log_surveyors_plural",[m.surveyors]):t("hell_report_log_surveyors")}
`),m.soul_attractors&&_.append(`
${t("hell_report_log_soul_attractors",[m.soul_attractors])}
`),m.gun_emplacements&&Object.keys(m.gun_emplacements).forEach(function(x){let j=$("
"),B=m.gun_emplacements[x],S=t("hell_report_log_obj_counter",[t("portal_gun_emplacement_title"),x]);j.append($(`
${t("hell_report_log_misc_kills",[S,B.kills,t("portal_pit_name")])} `)),B.gem&&j.append(`
${t("hell_report_log_soul_find",[e.resource.Soul_Gem.name,1])} `),_.append(j)}),m.soul_forge){let x=$("
");x.append(`
${t("hell_report_log_soul_forge",[m.soul_forge.kills])} `),m.soul_forge.gem&&x.append(`
${t("hell_report_log_soul_find",[e.resource.Soul_Gem.name,1])} `),m.soul_forge.gem_craft&&x.append(`
${t("hell_report_log_soul_craft",[m.soul_forge.corrupt?t("resource_Corrupt_Gem_name"):e.resource.Soul_Gem.name])} `),_.append(x)}m.gate_turrets&&Object.keys(m.gate_turrets).forEach(function(x){let j=$("
"),B=m.gate_turrets[x],S=t("hell_report_log_obj_counter",[t("portal_gate_turret_title"),x]);j.append(`
${t("hell_report_log_misc_kills",[S,B.kills,t("portal_gate_name")])} `),B.gem&&j.append(`
${t("hell_report_log_soul_find",[e.resource.Soul_Gem.name,1])} `),_.append(j)}),D({el:"#hellReportDisplay",data:{g:e.resource.Soul_Gem}})};if(c.day!==0){l(c.year,c.day);let d=c.year,h=c.day;h-1===0?(d--,h=e.city.calendar.orbit):h--,o(d,h)}else c.year=e.city.calendar.year,c.day=e.city.calendar.day;D({el:"#hellReportLogTitle",methods:{updateList(){l(c.year,c.day)}}}),pe("hellReportLogs",function(){return t("hell_report_log_tooltip",[2500])},{elm:"#hellReport .reportList div:first-child h2"})}function dc(r){if(!document.getElementById("hellReportList")||r){let a=!1,i=2500,s=(Object.keys(mr).length-1)*e.city.calendar.orbit+e.city.calendar.day;if(s>i){let n=Object.keys(mr[Object.keys(mr)[0]]).length;for(s-e.city.calendar.orbit+n>i&&(a=!0,s-=n,delete mr[Object.keys(mr)[0]]);s>i;)s-=e.city.calendar.orbit,delete mr[Object.keys(mr)[0]]}return a}}var ta={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},sr={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},Mt={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},ya={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 wa(){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 a=1+b.wasteful.vars()[0]/100;Object.keys(r).forEach(function(i){for(let s=0;s
=2){let l=e.tech.foundry>=5?e.tech.foundry>=8?.08:.05:.03;r.general.add.push({name:t("city_foundry"),manual:e.city.foundry.count*l,auto:e.city.foundry.count*l})}if(e.tech.foundry>=3&&Object.keys(r).forEach(function(l){e.city.foundry[l]&&e.city.foundry[l]>1&&r[l].add.push({name:t("tech_apprentices"),manual:(e.city.foundry[l]-1)*xe(.03),auto:(e.city.foundry[l]-1)*xe(.03)})}),e.tech.foundry>=4&&e.city.sawmill&&r.Plywood.add.push({name:t("city_sawmill"),manual:e.city.sawmill.count*.02,auto:e.city.sawmill.count*.02}),e.tech.foundry>=6&&r.Brick.add.push({name:t("city_foundry"),manual:e.city.foundry.count*.02,auto:e.city.foundry.count*.02}),e.tech.foundry>=7&&(r.general.add.push({name:t("city_factory")+` (${t("tab_city5")})`,manual:k.factory*.05,auto:k.factory*.05}),e.tech.mars>=4&&r.general.add.push({name:t("city_factory")+` (${t("tab_space")})`,manual:k.red_factory*.05,auto:k.red_factory*.05}),e.interstellar.int_factory&&k.int_factory&&r.general.add.push({name:t("interstellar_int_factory_title"),manual:k.int_factory*.1,auto:k.int_factory*.1})),e.space.fabrication&&U.fabrication&&r.general.add.push({name:t("space_red_fabrication_title"),manual:U.fabrication*e.civic.colonist.workers*(n?xe(.05):xe(.02)),auto:U.fabrication*e.civic.colonist.workers*(n?xe(.05):xe(.02))}),k.stellar_forge&&(r.Mythril.add.push({name:t("interstellar_stellar_forge_title"),manual:k.stellar_forge*.05,auto:k.stellar_forge*.05}),r.general.add.push({name:t("interstellar_stellar_forge_title"),manual:0,auto:k.stellar_forge*.1})),k.hell_forge){let l=Nr("ruins");r.general.add.push({name:t("portal_hell_forge_title"),manual:0,auto:k.hell_forge*.75*l.supress}),r.Scarletite.multi.push({name:t("portal_ruins_supressed"),manual:1,auto:l.supress})}if(e.tauceti.tau_factory&&U.tau_factory&&r.general.add.push({name:t("tau_home_tau_factory"),manual:0,auto:U.tau_factory*(e.tech.isolation?2.75:.9)}),e.tech.isolation&&e.tauceti.colony&&U.colony&&r.general.add.push({name:t("tau_home_colony"),manual:U.colony*.5,auto:U.colony*.5}),U.zero_g_lab&&k.zero_g_lab||U.infectious_disease_lab&&k.infectious_disease_lab){let l=yt("spc_enceladus");r.Quantium.multi.push({name:t("space_syndicate"),manual:1,auto:l})}if(e.tech.alien_crafting&&U.infectious_disease_lab&&k.infectious_disease_lab){let l=1+.65*Math.min(U.infectious_disease_lab,k.infectious_disease_lab);r.Quantium.multi.push({name:t("tech_infectious_disease_lab_alt"),manual:1,auto:l})}if(e.race.crafty&&r.general.add.push({name:t("wiki_arpa_crispr_crafty"),manual:.03,auto:.03}),e.race.ambidextrous&&r.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&&r.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"&&r.general.multi.push({name:t("govern_socialist"),manual:1+$e.socialist()[0]/100,auto:1+$e.socialist()[0]/100}),e.race.casting&&e.race.casting.crafting){let l=1+e.race.casting.crafting/(e.race.casting.crafting+75),o=1+2*e.race.casting.crafting/(2*e.race.casting.crafting+75);r.general.multi.push({name:t("modal_pylon_casting"),manual:l,auto:o})}e.race.universe==="magic"&&r.general.multi.push({name:t("universe_magic"),manual:.8,auto:.8}),e.tech.v_train&&r.general.multi.push({name:t("tech_vocational_training"),manual:1,auto:2}),e.genes.crafty&&r.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&&r.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&&r.general.multi.push({name:t("evo_challenge_orbit_decay"),manual:1,auto:1.1}),e.race.ambidextrous&&r.general.multi.push({name:t("trait_ambidextrous_name"),manual:1,auto:1+b.ambidextrous.vars()[1]*e.race.ambidextrous/100}),e.blood.artisan&&r.general.multi.push({name:t("tab_arpa_blood")+" "+t("arpa_blood_artisan_title"),manual:1,auto:1+e.blood.artisan/100});let c=gc();c>0&&r.general.multi.push({name:t("faith"),manual:1,auto:1+c/(e.race.universe==="antimatter"?1.5:3)}),e.prestige.Plasmid.count>0&&r.general.multi.push({name:t("resource_Plasmid_plural_name"),manual:Vi()/8+1,auto:Vi()/8+1}),e.genes.challenge&&e.genes.challenge>=2&&r.general.multi.push({name:t("mastery"),manual:1+Nt()/(e.race.weak_mastery?50:100),auto:1+Nt()/(e.race.weak_mastery?50:100)}),e.race.gravity_well&&r.general.multi.push({name:t("evo_challenge_gravity_well"),manual:Xe(1),auto:Xe(1)})}else{let n=1,c={},l={};if(r.general){for(let d=0;d `);$("#market").append(n),bs(`#market-${a}`,n,a,i,!0)}}),Ui()}else if(r==="storage"){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==1))return;Fa("storage"),Je.hasOwnProperty("resource")&&Object.keys(Je.resource).forEach(function(a){let i=Je.resource[a].color;if(Je.resource[a].stackable){var n=$(`
`);$("#resStorage").append(n),ws(`#stack-${a}`,n,a,i,!0)}}),Ui()}else if(r==="ejector"){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==2))return;Fa("ejector"),Je.hasOwnProperty("resource")&&Object.keys(Je.resource).forEach(function(a){let i=Je.resource[a].color;Mt[a]&&Yn(a,i)})}else if(r==="supply"){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==3))return;Fa("supply"),Je.hasOwnProperty("resource")&&Object.keys(Je.resource).forEach(function(a){let i=Je.resource[a].color;ya[a]&&Xn(a,i)})}else if(r==="alchemy"){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==4))return;Fa("alchemy"),Je.hasOwnProperty("resource")&&Object.keys(Je.resource).forEach(function(a){let i=Je.resource[a].color,s=Je.resource[a].tradable;sr[a]&&e.race.universe==="magic"&&(e.resource[a].basic=s,ec(a,i,s))})}}function cn(r){if(e.race.species==="protoplasm"){let a=100;e.stats.achieve.mass_extinction&&e.stats.achieve.mass_extinction.l>1&&(a+=50*(e.stats.achieve.mass_extinction.l-1)),je("RNA",r,a,1,!1),je("DNA",r,a,1,!1)}je("Money",r,1e3,1,!1,!1,"success"),je(e.race.species,r,0,0,!1,!1,"warning"),je("Slave",r,0,0,!1,!1,"warning"),je("Mana",r,0,1,!1,!1,"warning"),je("Energy",r,0,0,!1,!1,"warning"),je("Sus",r,0,0,!1,!1,"warning"),je("Knowledge",r,100,1,!1,!1,"warning"),je("Zen",r,0,0,!1,!1,"warning"),je("Crates",r,0,0,!1,!1,"warning"),je("Containers",r,0,0,!1,!1,"warning"),je("Food",r,250,1,!0,!0),je("Lumber",r,200,1,!0,!0),je("Chrysotile",r,200,1,!0,!0),je("Stone",r,200,1,!0,!0),je("Crystal",r,200,1,!0,!0),je("Furs",r,100,1,!0,!0),je("Copper",r,100,1,!0,!0),je("Iron",r,100,1,!0,!0),je("Aluminium",r,50,1,!0,!0),je("Cement",r,100,1,!0,!0),je("Coal",r,50,1,!0,!0),je("Oil",r,0,1,!0,!1),je("Uranium",r,10,1,!0,!1),je("Steel",r,50,1,!0,!0),je("Titanium",r,50,1,!0,!0),je("Alloy",r,50,1,!0,!0),je("Polymer",r,50,1,!0,!0),je("Iridium",r,0,1,!0,!0),je("Helium_3",r,0,1,!0,!1),je("Water",r,0,1,!1,!1,"advanced"),je("Deuterium",r,0,1,!1,!1,"advanced"),je("Neutronium",r,0,1,!1,!1,"advanced"),je("Adamantite",r,0,1,!1,!0,"advanced"),je("Infernite",r,0,1,!1,!1,"advanced"),je("Elerium",r,1,1,!1,!1,"advanced"),je("Nano_Tube",r,0,1,!1,!1,"advanced"),je("Graphene",r,0,1,!1,!0,"advanced"),je("Stanene",r,0,1,!1,!0,"advanced"),je("Bolognium",r,0,1,!1,!0,"advanced"),je("Vitreloy",r,0,1,!1,!0,"advanced"),je("Orichalcum",r,0,1,!1,!0,"advanced"),je("Unobtainium",r,0,1,!1,!1,"advanced"),je("Materials",r,0,1,!1,!1,"advanced"),je("Horseshoe",r,-2,0,!1,!1,"advanced"),je("Nanite",r,0,1,!1,!1,"advanced"),je("Genes",r,-2,0,!1,!1,"advanced"),je("Soul_Gem",r,-2,0,!1,!1,"advanced"),je("Plywood",r,-1,0,!1,!1,"danger"),je("Brick",r,-1,0,!1,!1,"danger"),je("Wrought_Iron",r,-1,0,!1,!1,"danger"),je("Sheet_Metal",r,-1,0,!1,!1,"danger"),je("Mythril",r,-1,0,!1,!1,"danger"),je("Aerogel",r,-1,0,!1,!1,"danger"),je("Nanoweave",r,-1,0,!1,!1,"danger"),je("Scarletite",r,-1,0,!1,!1,"danger"),je("Quantium",r,-1,0,!1,!1,"danger"),je("Corrupt_Gem",r,-2,0,!1,!1,"caution"),je("Codex",r,-2,0,!1,!1,"caution"),je("Cipher",r,0,1,!1,!1,"caution"),je("Demonic_Essence",r,-2,0,!1,!1,"caution"),!r&&(li("Blood_Stone","caution"),li("Artifact","caution"),li("Plasmid"),li("AntiPlasmid"),li("Phage"),li("Dark"),li("Harmony"),li("AICore"))}function Ui(){e.race.species!=="protoplasm"&&(Tu(),zu(),Eu())}function je(r,a,i,s,n,c,l){if(l=l||"info",e.resource[r]||(e.resource[r]={}),Ir(r),e.race.artifical&&r==="Food"&&(c=!1),a)return;e.resource[r].hasOwnProperty("display")||(e.resource[r].display=!1),e.resource[r].hasOwnProperty("value")||(e.resource[r].value=e.race.truepath?ta[r]*2:ta[r]),e.resource[r].hasOwnProperty("amount")||(e.resource[r].amount=0),e.resource[r].hasOwnProperty("max")||(e.resource[r].max=i),e.resource[r].hasOwnProperty("diff")||(e.resource[r].diff=0),e.resource[r].hasOwnProperty("delta")||(e.resource[r].delta=0),e.resource[r].hasOwnProperty("rate")||(e.resource[r].rate=s),r==="Mana"&&(e.resource[r].gen=0,e.resource[r].gen_d=0),e.resource[r].stackable=c,e.resource[r].crates||(e.resource[r].crates=0),e.resource[r].containers||(e.resource[r].containers=0),!e.resource[r].trade&&n&&(e.resource[r].trade=0);var o;e.resource[r].max===-1||e.resource[r].max===-2?o=$(`
{{ name | namespace }} {{ amount | diffSize }} `):o=$(`
{{ name | namespace }} {{ amount | size }} / {{ max | size }} `),c?o.append($(`+ `)):(i!==-1||i===-1&&s===0&&e.race.no_craft||r==="Scarletite"||r==="Quantium")&&o.append($(" "));let d=!1;if(s!==0||i===-1&&s===0&&e.race.no_craft||r==="Scarletite"||r==="Quantium")o.append($(`{{ diff | diffSize }} /s `));else if(i===-1&&!e.race.no_craft&&r!=="Scarletite"&&r!=="Quantium"){let _=$(' ');o.append(_);let m=[1,5];for(let w=0;w+${m[w]} `));_.append($(`+A `)),d=!0}else o.append($(" "));$("#resources").append(o);var h={template:'
'};if(D({el:`#res${r}`,data:e.resource[r],filters:{size:function(_){return _&&Ee(_,0)},diffSize:function(_){return r==="Horseshoe"&&!e.race.hooved&&Ve("fool",2023)&&(_=5),Ee(_,2)},namespace(_){return _.replace("_"," ")}},methods:{resRate(_){let m=Ee(e.resource[_].diff,2);return`${_} ${m} per second`},trigModal(){this.$buefy.modal.open({parent:this,component:h});var _=setInterval(function(){$("#modalBox").length>0&&(clearInterval(_),Iu(r,l))},50)},showTrigger(){return e.resource.Crates.display},craft(_,m){if(!e.race.no_craft){let w=Ua(_,"manual").multiplier,M=wa(),A=Math.floor(e.resource[M[_][0].r].amount/M[_][0].a);for(let x=1;x${e.resource[M[_][A].r].name} ${x} `}return w}}}),Jo(`cnt${r}`,r,"c"),d){let _=[1,5,"A"];for(let m=0;m<_.length;m++){let w=function(){let M=$("
"),A=r,x=_[m],j=+(Ua(A,"manual").multiplier*100).toFixed(0);M.append($(`${t("manual_crafting_hover_bonus",[j.toLocaleString(),e.resource[A].name])}
`));let B=wa(),S=$(`${t("manual_crafting_hover_craft")}
`),Q=0;if(typeof x!="number"){if(Q=e.resource[B[A][0].r].amount/B[A][0].a,B[A].length>1)for(let ce=1;ce${Ee(j/100*Q,1)} ${e.resource[A].name} `))}else{Q=fe()*x;let ce=Ee(j/100*Q,1);S.append($(`${ce} ${e.resource[A].name} `))}let V=$(`${t("manual_crafting_hover_use")}
`);for(let ce=0;ce${Ee(Q*B[A][ce].a,1)} ${e.resource[B[A][ce].r].name} `)),ce+1, "));return M.append(S),M.append(V),M};rn(`inc${r}${_[m]}`,r,"manual",w)}}c&&pe(`con${r}`,function(){var _=$(` ${t("resource_Crates_plural")} ${e.resource[r].crates}
`);return e.tech.steel_container&&_.append($(`${t("resource_Containers_plural")} ${e.resource[r].containers}
`)),_}),r!==e.race.species&&r!=="Crates"&&r!=="Containers"&&i!==-1?Jo(`inc${r}`,r,"p"):i===-1&&rn(`inc${r}`,r,"auto"),$(`#res${r}`).on("mouseover",function(){$(`.res-${r}`).each(function(){e.resource[r].amount>=$(this).attr(`data-${r}`)?$(this).addClass("hl-ca"):$(this).addClass("hl-cna")})}),$(`#res${r}`).on("mouseout",function(){$(`.res-${r}`).each(function(){$(this).removeClass("hl-ca"),$(this).removeClass("hl-cna")})}),typeof Je.resource>"u"&&(Je.resource={}),Je.resource[r]={color:l,tradable:n,stackable:c}}function Ir(r){if(r===e.race.species?e.resource[r].name=tt("name"):e.resource[r].name=r==="Money"?"$":t(`resource_${r}_name`),Ve("fool",2022))switch(r){case"Lumber":e.resource[r].name=t("resource_Stone_name");break;case"Stone":e.resource[r].name=t("resource_Lumber_name");break;case"Copper":e.resource[r].name=t("resource_Iron_name");break;case"Iron":e.resource[r].name=t("resource_Copper_name");break;case"Steel":e.resource[r].name=t("resource_Titanium_name");break;case"Titanium":e.resource[r].name=t("resource_Steel_name");break;case"Coal":e.resource[r].name=t("resource_Oil_name");break;case"Oil":e.resource[r].name=t("resource_Coal_name");break;case"Alloy":e.resource[r].name=t("resource_Polymer_name");break;case"Polymer":e.resource[r].name=t("resource_Alloy_name");break;case"Graphene":e.resource[r].name=t("resource_Stanene_name");break;case"Stanene":e.resource[r].name=t("resource_Graphene_name");break;case"Plywood":e.resource[r].name=t("resource_Brick_name");break;case"Brick":e.resource[r].name=t("resource_Plywood_name");break;case"Genes":e.resource[r].name=t("resource_Soul_Gem_name");break;case"Soul_Gem":e.resource[r].name=t("resource_Genes_name");break;case"Slave":e.resource[r].name=t("resource_Peon_name");break}if(r==="Horseshoe"&&(e.resource[r].name=Wr()),e.race.artifical&&r==="Genes"&&(e.resource[r].name=t("resource_Program_name")),e.race.sappy)switch(r){case"Stone":e.resource[r].name=t("resource_Amber_name");break}else if(e.race.flier)switch(r){case"Stone":e.resource[r].name=t("resource_Clay_name");break;case"Brick":e.resource[r].name=t("resource_Mud_Brick_name");break}if(e.race.soul_eater)switch(r){case"Food":e.resource[r].name=t("resource_Souls_name");break}if(e.race.evil)switch(r){case"Lumber":e.resource[r].name=t("resource_Bones_name");break;case"Furs":e.resource[r].name=t("resource_Flesh_name");break;case"Plywood":e.resource[r].name=t("resource_Boneweave_name");break}if(e.race.artifical)switch(r){case"Food":e.resource[r].name=t("resource_Signal_name");break}if(Ve("halloween").active)switch(r){case"Food":e.resource[r].name=t("resource_Candy_name");break;case"Lumber":e.resource[r].name=t("resource_Bones_name");break;case"Stone":e.resource[r].name=t("resource_RockCandy_name");break;case"Furs":e.resource[r].name=t("resource_Webs_name");break;case"Plywood":e.resource[r].name=t("resource_Boneweave_name");break;case"Brick":e.resource[r].name=t("resource_Tombstone_name");break;case"Soul_Gem":e.resource[r].name=t("resource_CandyCorn_name");break}}function li(r,a){if($(`#res${r}`).length){let s=$(`#res${r}`);s.detach(),$("#resources").append(s);return}a=a||"special";var i=$(`${t(`resource_${r}_name`)} {{ count | round }}
`);$("#resources").append(i),D({el:`#res${r}`,data:e.prestige[r],filters:{round(s){return+s.toFixed(3)}}}),!(r==="Artifact"||r==="Blood_Stone")&&pe(`res${r}`,function(){let s=$("
");switch(r){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_${r}_desc`,[n,+(Vi("plasmid")*100).toFixed(2)])} `)),e.genes.store&&(e.race.universe!=="antimatter"||e.genes.bleed>=3)){let d=H(1,"plasmid");d>1&&s.append($(` ${t("resource_Plasmid_desc2",[+((d-1)*100).toFixed(2)])} `))}break;case"AntiPlasmid":s.append($(`${t(`resource_${r}_desc`,[e.prestige.AntiPlasmid.count,+(Vi("antiplasmid")*100).toFixed(2)])} `));let c=H(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 l=H(1,"phage");e.genes.store&&e.genes.store>=4&&l>1&&s.append($(` ${t("resource_Plasmid_desc2",[+((l-1)*100).toFixed(2)])} `));break;case"Dark":switch(e.race.universe){case"standard":s.append($(`${t(`resource_${r}_desc_s`,[+((ft("standard")-1)*100).toFixed(2)])} `));break;case"evil":s.append($(`${t(`resource_${r}_desc_e`,[+((ft("evil")-1)*100).toFixed(2)])} `));break;case"micro":s.append($(`${t(`resource_${r}_desc_m`,[ft("micro",!1),ft("micro",!0)])} `));break;case"heavy":let d=ft("heavy"),h=.25+.5*d,_=.2+.3*d;s.append($(`${t(`resource_${r}_desc_h`,[+(h*100).toFixed(4),+(_*100).toFixed(4)])} `));break;case"antimatter":s.append($(`${t(`resource_${r}_desc_a`,[+((ft("antimatter")-1)*100).toFixed(2)])} `));break;case"magic":s.append($(`${t(`resource_${r}_desc_mg`,[t("resource_Mana_name"),+((ft("magic")-1)*100).toFixed(2)])} `));break}break;case"Harmony":s.append($(`${t(`resource_${r}_desc`,[e.race.universe==="standard"?.1:1,Ps()])} `));break;case"AICore":let o=+((1-.99**e.prestige.AICore.count)*100).toFixed(2);s.append($(`${t(`resource_${r}_desc`,[o])} `));break}return s})}function Au(r){let a=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!==r)return!1;a=e.tech.currency>=6?-1e6:e.tech.currency>=4?-25:-10}return!(e.resource[r].trade<=a)}function Fu(r){let a=e.tech.currency>=6?1e6:e.tech.currency>=4?100:25;return!(e.resource[r].trade>=a)}function bs(r,a,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&&a.append($(`{{ r.name | namespace }} `)),e.race.no_trade||(a.append($(`${t("resource_market_buy")} `)),a.append($(`\${{ r.value | buy }} `)),a.append($(`${t("resource_market_sell")} `)),a.append($(`\${{ r.value | sell }} `))),n&&(e.race.banana&&i==="Food"||e.tech.trade&&!e.race.terrifying)){let c=$(`${t("resource_market_routes")} `);a.append(c),c.append($(`- `)),c.append($(' ')),c.append($(`+ `)),c.append($(`${t("cancel_routes")} `)),ks(i)}D({el:r,data:{r:e.resource[i],m:e.city.market},methods:{aSell(c){let l=sr[c]===1?t("resource_market_unit"):t("resource_market_units"),o=qs(c),d=sr[c];if(e.stats.achieve.hasOwnProperty("trade")){let h=e.stats.achieve.trade.l;h>5&&(h=5),d*=1-h/100}return d=+d.toFixed(3),t("resource_market_auto_sell_desc",[d,l,o])},aBuy(c){let l=sr[c],o=ge("dealmaker",0);o&&(l*=1+o/100),e.race.persuasive&&(l*=1+e.race.persuasive/100),e.race.merchant&&(l*=1+b.merchant.vars()[1]/100);let d=ve("goblin");if(d>0&&(l*=1+b.merchant.vars(1)[1]/100*d),e.genes.trader){let m=Nt();l*=1+m/100}if(e.stats.achieve.hasOwnProperty("trade")){let m=e.stats.achieve.trade.l;m>5&&(m=5),l*=1+m/50}e.race.truepath&&(l*=1-e.civic.foreign.gov3.hstl/101),l=+l.toFixed(3);let h=l===1?t("resource_market_unit"):t("resource_market_units"),_=Ms(c);return t("resource_market_auto_buy_desc",[l,h,_])},purchase(c){if(!e.race.no_trade&&!e.settings.pause){let l=e.city.market.qty,o=e.resource[c].value;e.race.arrogant&&(o*=1+b.arrogant.vars()[0]/100),e.race.conniving&&(o*=1-b.conniving.vars()[0]/100);let d=ve("imp");d>0&&(o*=1-b.conniving.vars(1)[0]/100*d);let h=Math.floor(Math.min(l,e.resource.Money.amount/o,e.resource[c].max-e.resource[c].amount));h>0&&(e.resource[c].amount+=h,e.resource.Money.amount-=Math.round(o*h),e.resource[c].value+=Number((h/Math.rand(1e3,1e4)).toFixed(2)))}},sell(c){if(!e.race.no_trade&&!e.settings.pause){let l=e.city.market.qty,o=4;e.race.merchant&&(o*=1-b.merchant.vars()[0]/100);let d=ve("goblin");d>0&&(o*=1-b.merchant.vars(1)[0]/100*d),e.race.asymmetrical&&(o*=1+b.asymmetrical.vars()[0]/100),e.race.conniving&&(o*=1-b.conniving.vars()[1]/100);let h=ve("imp");h>0&&(o*=1-b.conniving.vars(1)[1]/100*h);let _=e.resource[c].value/o,m=Math.floor(Math.min(l,e.resource[c].amount,(e.resource.Money.max-e.resource.Money.amount)/_));m>0&&(e.resource[c].amount-=m,e.resource.Money.amount+=Math.round(_*m),e.resource[c].value-=Number((m/Math.rand(1e3,1e4)).toFixed(2)),e.resource[c].value0&&(h+=e.resource[_].trade)}),d<=h)break}if(e.resource[c].trade>=0)if(Fu(c)&&e.city.market.trade0&&(l*=1-b.merchant.vars(1)[0]/100*o),e.race.asymmetrical&&(l*=1+b.asymmetrical.vars()[0]/100),Ee(c*e.city.market.qty/l,0)},trade(c){if(i==="Stone"&&(c===31||c===-31)){let l=ar(3,12,!1);if(l.length>0)return l}return c<0?(c=0-c,`-${c}`):c>0?`+${c}`:0},namespace(c){return c.replace("_"," ")}}})}}function zu(){!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==0)||($("#market").append($(``)),hc())}function Qi(){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 hc(r){let a=r||$("#galaxyTrade");if(r||le($("#galaxyTrade")),e.galaxy.trade){a.append($(``));let i=Qi();for(let n=0;n');a.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 l=$(`${t("resource_market_routes")} `);c.append(l);let o=t("galaxy_freighter_assign",[e.resource[i[n].buy.res].name,e.resource[i[n].sell.res].name]),d=t("galaxy_freighter_unassign",[e.resource[i[n].buy.res].name,e.resource[i[n].sell.res].name]);l.append($(`- `)),l.append($(`{{ g.f${n} }} `)),l.append($(`+ `)),l.append($(`${t("cancel_routes")} `))}let s=$(`${t("resource_market_galactic_trade_routes")} {{ g.cur }} / {{ g.max }}
`);s.append($(`${t("cancel_all_routes")} `)),a.append(s)}D({el:r?"#specialModal":"#galaxyTrade",data:{g:e.galaxy.trade,t:e.tech},methods:{less(i){let s=fe();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=fe();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=Qi();for(let n=0;n0&&(n*=1+b.merchant.vars(1)[1]/100*c),e.genes.trader){let l=Nt();n*=1+l/100}if(e.stats.achieve.hasOwnProperty("trade")){let l=e.stats.achieve.trade.l;l>5&&(l=5),n*=1+l/50}return n=+n.toFixed(2),n},s_vol(i){let n=Qi()[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}}}),pe("galacticTradeTotal",function(){let i=$('
');return v.hasOwnProperty("gt_route")&&Object.keys(v.gt_route).forEach(function(s){v.gt_route[s]>0&&i.append(`${s} +${v.gt_route[s]}
`)}),i.append(`${t("resource_market_galactic_trade_routes")} ${e.galaxy.trade.max}
`),i},{elm:"#galacticTradeTotal > span"})}function al(r){let a=fe(),i=Zi();a>e.resource[r].crates&&(a=e.resource[r].crates),a>0&&(e.resource.Crates.amount+=a,e.resource.Crates.max+=a,e.resource[r].crates-=a,e.resource[r].max-=i*a)}function il(r){let a=fe(),i=Zi();a>e.resource.Crates.amount&&(a=e.resource.Crates.amount),a>0&&(e.resource.Crates.amount-=a,e.resource.Crates.max-=a,e.resource[r].crates+=a,e.resource[r].max+=i*a)}function sl(r){let a=fe(),i=Ji();a>e.resource[r].containers&&(a=e.resource[r].containers),a>0&&(e.resource.Containers.amount+=a,e.resource.Containers.max+=a,e.resource[r].containers-=a,e.resource[r].max-=i*a)}function nl(r){let a=fe(),i=Ji();a>e.resource.Containers.amount&&(a=e.resource.Containers.amount),a>0&&(e.resource.Containers.amount-=a,e.resource.Containers.max-=a,e.resource[r].containers+=a,e.resource[r].max+=i*a)}function ws(r,a,i,s){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==1))){if(a.append($(`{{ name }} `)),e.resource.Crates.display){let n=$(`${t("resource_Crates_name")} `);a.append(n),n.append($(`« `)),n.append($(` `)),n.append($(`» `))}if(e.resource.Containers.display){let n=$(`${t("resource_Containers_name")} `);a.append(n),n.append($(`« `)),n.append($(' ')),n.append($(`» `))}D({el:r,data:e.resource[i],methods:{addCrate(n){il(n)},subCrate(n){al(n)},addCon(n){nl(n)},subCon(n){sl(n)}},filters:{trick(n){if(i==="Stone"&&e.resource[i].crates===10&&e.resource[i].containers===31){let c=ar(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"){let l=jt(13,10);if(n===10&&l.length>0)return"1"+l}return n}}})}}function qs(r){let a=4;e.race.merchant&&(a*=1-b.merchant.vars()[0]/100);let i=ve("goblin");i>0&&(a*=1-b.merchant.vars(1)[0]/100*i),e.race.asymmetrical&&(a*=1+b.asymmetrical.vars()[0]/100),e.race.conniving&&a--;let s=e.resource[r].value*sr[r]/a;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*=T("psychic_cash"),s=+s.toFixed(1),s}function Ms(r){let a=e.resource[r].value;e.race.arrogant&&(a*=1+b.arrogant.vars()[0]/100),e.race.conniving&&(a*=1-b.conniving.vars()[0]/100);let i=ve("imp");i>0&&(a*=1-b.conniving.vars(1)[0]/100*i);let s=a*sr[r];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 rn(r,a,i,s){pe(`${r}`,function(){let n=$('{{ res.name | namespace }}
'),c=$('
');n.append(c);let l=Ua(a,i),o=$("
");c.append(o),i==="auto"&&v.p[a]&&Object.keys(v.p[a]).forEach(function(m){let w=v.p[a][m],M=parseFloat(w.slice(0,-1));if(M!=0&&!isNaN(M)){let A=M>0?"success":"danger",x=m.replace(/\+.+$/,"");m=m.replace(/'/g,"\\'"),o.append(`${x} {{ ${[a]}['${m}'] | translate }}
`)}}),Object.keys(l.multi_bd).forEach(function(m){let w=l.multi_bd[m],M=parseFloat(w.slice(0,-1));if(M!=0&&!isNaN(M)){let A=M>0?"success":"danger",x=m.replace(/\+.+$/,"");m=m.replace(/'/g,"\\'"),o.append(`${x} {{ craft.multi_bd['${m}'] | translate }}
`)}});let d=$('
'),h=$(`${t("craft_tools_multi")}
`);d.append(h);let _=0;if(Object.keys(l.add_bd).forEach(function(m){let w=l.add_bd[m],M=parseFloat(w.slice(0,-1));if(M!=0&&!isNaN(M)){_++;let A=M>0?"success":"danger",x=m.replace(/\+.+$/,"");m=m.replace(/'/g,"\\'"),d.append(`${x} {{ craft.add_bd['${m}'] | translate }}
`)}}),_>0&&c.append(d),v.p.consume&&v.p.consume[a]){let m=$('
'),w=0;Object.keys(v.p.consume[a]).forEach(function(M){let A=v.p.consume[a][M];if(A!=0&&!isNaN(A)){w++;let x=A>0?"success":"danger",j=M.replace(/\+.+$/,"");M=M.replace(/'/g,"\\'"),m.append(`${j} {{ consume.${a}['${M}'] | fix | translate }}
`)}}),w>0&&c.append(m)}return e.resource[a].diff<0&&e.resource[a].amount>0&&n.append(`${t("to_empty")} {{ res.amount | counter }}
`),s&&(n.append('
'),n.append(s)),n},{in:function(){D({el:"#popper > div",data:{[a]:v.p[a],res:e.resource[a],consume:v.p.consume,craft:Ua(a,i)},filters:{translate(n){let c=n[n.length-1],l=parseFloat(n.slice(0,-1)),o=l>0&&l<1||l<0&&l>-1?4:l>0&&l<10||l<0&&l>-10?3:2;l=+l.toFixed(o);let d=c==="%"?"%":"";if(l>0)return"+"+Ee(l,o)+d;if(l<0)return Ee(l,o)+d},fix(n){return n+"v"},counter(n){let c=-e.resource[a].diff,l=+(n/c).toFixed(0);if(l>60){let o=l%60,d=(l-o)/60;if(d>=60){let h=d%60;return`${(d-h)/60}h ${h}m`}else return`${d}m ${o}s`}else return`${l}s`},namespace(n){return n.replace("_"," ")}}})},out:function(){D({el:"#popper > div"},"destroy")},classes:"breakdown has-background-light has-text-dark",prop:{modifiers:{preventOverflow:{enabled:!1},hide:{enabled:!1}}}})}function Jo(r,a,i){pe(`${r}`,function(){let s=$('{{ res.name | namespace }}
'),n=$('
');s.append(n);let c=!1;if(v[i][a]){let o=$("
");n.append(o);let d=[a];d.push("Global");for(var l=0;l0?"success":"danger",A=_.replace(/\+.+$/,"");_=_.replace(/'/g,"\\'"),o.append(`${A} {{ ${h}['${_}'] | translate }}
`)}})}}if(v[i].consume&&v[i].consume[a]){let o=$(`
`),d=0;Object.keys(v[i].consume[a]).forEach(function(h){let _=v[i].consume[a][h];if(_!=0&&!isNaN(_)){d++;let m=_>0?"success":"danger",w=h.replace(/\+.+$/,"");h=h.replace(/'/g,"\\'"),o.append(`${w} {{ consume.${a}['${h}'] | fix | translate }}
`)}}),d>0&&n.append(o)}if(i==="p"){let o=e.resource[a].diff>0?"success":"danger";s.append(`{{ res.diff | direction }} {{ res.amount | counter }}
`)}return s},{in:function(){D({el:"#popper > div",data:{Global:v[i].Global,[a]:v[i][a],consume:v[i].consume,res:e.resource[a]},filters:{translate(s){let n=s[s.length-1],c=parseFloat(s.slice(0,-1)),l=c>0&&c<1||c<0&&c>-1?4:c>0&&c<10||c<0&&c>-10?3:2,o=n==="%"?"%":"";if(c>0)return"+"+Ee(c,l)+o;if(c<0)return Ee(c,l)+o},fix(s){return s+"v"},counter(s){let n=e.resource[a].diff,c=0;if(n<0?(n*=-1,c=+(s/n).toFixed(0)):c=+((e.resource[a].max-s)/n).toFixed(0),c===1/0||Number.isNaN(c))return"Never";if(c>60){let l=c%60,o=(c-l)/60;if(o>=60){let d=o%60;return`${(o-d)/60}h ${d}m`}else return`${o}m ${l}s`}else return`${c}s`},direction(s){return s>=0?t("to_full"):t("to_empty")},namespace(s){return s.replace("_"," ")}}})},out:function(){D({el:"#popper > div"},"destroy")},classes:"breakdown has-background-light has-text-dark",prop:{modifiers:{preventOverflow:{enabled:!1},hide:{enabled:!1}}}})}function Tu(){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==0))return;let r=e.race.no_trade?" nt":"";var a=$(`${t("resource_market_trade_routes")} / {{ mtrade }}
`);a.append($(`${t("cancel_all_routes")} `)),$("#market").append(a),D({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,ks(i))})}},filters:{tdeCnt(i){let s=jt(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}}}),pe("tradeTotalPopover",function(){let i=$('
');return v.hasOwnProperty("t_route")&&Object.keys(v.t_route).forEach(function(s){v.t_route[s]>0&&i.append(`${s} +${v.t_route[s]}
`)}),i.append(`${t("resource_market_trade_routes")} ${e.city.market.mtrade}
`),i},{elm:"#tradeTotalPopover > span"})}function Eu(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==1))){var r=$(`${t("resource_Crates_name")} {{ cr.amount }} / {{ cr.max }} ${t("resource_Containers_name")} {{ cn.amount }} / {{ cn.max }}
`);$("#resStorage").append(r),D({el:"#crateTotal",data:{cr:e.resource.Crates,cn:e.resource.Containers}})}}function ks(r){$(`#market-${r} .trade .current`).removeClass("has-text-warning"),$(`#market-${r} .trade .current`).removeClass("has-text-danger"),$(`#market-${r} .trade .current`).removeClass("has-text-success"),e.resource[r].trade>0?$(`#market-${r} .trade .current`).addClass("has-text-success"):e.resource[r].trade<0?$(`#market-${r} .trade .current`).addClass("has-text-danger"):$(`#market-${r} .trade .current`).addClass("has-text-warning")}function cl(){let r=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"),a=e.race.kindling_kindred||e.race.smoldering?200:10;return t("resource_modal_crate_construct_desc",[a,r,Zi()])}function ol(){return t("resource_modal_container_construct_desc",[125,Ji()])}function Cn(r,a){switch(r){case"crate":fc(a);break;case"container":mc(a);break}}function fc(r){let a=r||fe(),i=e.race.kindling_kindred||e.race.smoldering?e.race.smoldering?"Chrysotile":"Stone":"Plywood",s=e.race.kindling_kindred||e.race.smoldering?200:10;a+e.resource.Crates.amount>e.resource.Crates.max&&(a=e.resource.Crates.max-e.resource.Crates.amount),e.resource[i].amount=s*a&&e.resource.Crates.amounte.resource.Containers.max&&(a=e.resource.Containers.max-e.resource.Containers.amount),e.resource.Steel.amount<125*a&&(a=Math.floor(e.resource.Steel.amount/125)),e.resource.Steel.amount>=125*a&&e.resource.Containers.amount{{ name }} - {{ amount | size }}/{{ max | size }} '));let a=$('
');if($("#modalBox").append(a),r==="Food"&&!e.race.artifical||e.race.artifical&&r==="Coal"){let o=jt(7,10);o.length>0&&$("#modalBoxTitle").prepend(o)}if(r==="Stone"){let o=ar(1,12,!1);o.length>0&&$("#modalBoxTitle").prepend(o)}let i=$('
');a.append(i),i.append($(`${t("resource_modal_crate_owned")} {{ crates.amount }}/{{ crates.max }} ${t("resource_modal_crate_assigned")} {{ res.crates }}
`));let s=$(`${t("resource_modal_crate_construct")} `),n=$(`${t("resource_modal_crate_unassign")} `),c=$(`${t("resource_modal_crate_assign")} `);if(i.append(s),i.append(n),i.append(c),D({el:"#modalCrates",data:{crates:e.resource.Crates,res:e.resource[r]},methods:{buildCrate(){fc()},subCrate(o){al(o)},addCrate(o){il(o)}}}),e.resource.Containers.display){let o=$('
');a.append(o),o.append($(`${t("resource_modal_container_owned")} {{ containers.amount }}/{{ containers.max }} ${t("resource_modal_container_assigned")} {{ res.containers }}
`));let d=$(`${t("resource_modal_container_construct")} `),h=$(`${t("resource_modal_container_unassign")} `),_=$(`${t("resource_modal_container_assign")} `);o.append(d),o.append(h),o.append(_),D({el:"#modalContainers",data:{containers:e.resource.Containers,res:e.resource[r]},methods:{buildContainer(){mc()},removeContainer(m){sl(m)},addContainer(m){nl(m)}}})}D({el:"#modalBoxTitle",data:e.resource[r],filters:{size:function(o){return Ee(o,0)},diffSize:function(o){return Ee(o,2)}}});function l(o,d){if(o==="modalContainers"){let h=Ji();switch(d){case"assign":return t("resource_modal_container_assign_desc",[h]);case"unassign":return t("resource_modal_container_unassign_desc",[h]);case"construct":return ol()}}else{let h=Zi();switch(d){case"assign":return t("resource_modal_crate_assign_desc",[h]);case"unassign":return t("resource_modal_crate_unassign_desc",[h]);case"construct":return cl()}}}["modalCrates","modalContainers"].forEach(function(o){["assign","unassign","construct"].forEach(function(d){pe(`${o}${d}`,l(o,d),{elm:$(`#${o} > .${d}`),attach:"#main"})})})}function ll(){e.settings.showResources||(e.settings.marketTabs=1),e.settings.showResources=!0,e.settings.showStorage=!0,Ha("storage"),Ot()}function ul(){e.resource.Crates.display||(I(t("city_storage_yard_msg"),"info",!1,["progress"]),e.resource.Crates.display=!0,ll())}function Yr(){e.resource.Containers.display||(I(t("city_warehouse_msg"),"info",!1,["progress"]),e.resource.Containers.display=!0,ll())}function Zi(){let r=e.tech.container&&e.tech.container>=2?500:350;e.tech.container&&e.tech.container>=4&&(r+=e.tech.container>=5?500:250),e.tech.container&&e.tech.container>=6&&(r+=e.tech.container>=7?1200:500),e.tech.container&&e.tech.container>=8&&(r+=4e3),e.race.pack_rat&&(r*=1+b.pack_rat.vars()[0]/100);let a=ve("kobold");return a>0&&(r*=1+b.pack_rat.vars(1)[0]/100*a),e.stats.achieve.banana&&e.stats.achieve.banana.l>=3&&(r*=1.1),r*=e.stats.achieve.blackhole?1+e.stats.achieve.blackhole.l*.05:1,Math.round(H(r))}function Ji(){let r=e.tech.steel_container&&e.tech.steel_container>=3?1200:800;e.tech.steel_container&&e.tech.steel_container>=4&&(r+=e.tech.steel_container>=5?1e3:400),e.tech.steel_container&&e.tech.steel_container>=6&&(r+=e.tech.steel_container>=7?7500:1e3),e.tech.steel_container&&e.tech.steel_container>=8&&(r+=8e3),e.race.pack_rat&&(r*=1+b.pack_rat.vars()[0]/100);let a=ve("kobold");return a>0&&(r*=1+b.pack_rat.vars(1)[0]/100*a),r*=e.stats.achieve.blackhole?1+e.stats.achieve.blackhole.l*.05:1,Math.round(H(r))}function Yo(){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==0))return;let r=$(``);le($("#market")),$("#market").append(r),Lu()}function Xo(){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==1))return;let r=$(``);le($("#resStorage")),$("#resStorage").append(r),e.resource.Crates&&e.resource.Containers&&(r.append($(`${t("resource_modal_crate_construct")} `)),r.append($(`${t("resource_modal_container_construct")} `)),D({el:"#createHead",data:{cr:e.resource.Crates,cn:e.resource.Containers},methods:{crate(){fc()},container(){mc()},buildCrateDesc(){return cl()},buildContainerDesc(){return ol()}}}))}function Lu(){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==0))return;let r=$("#market-qty");le(r),e.race.no_trade||(r.append($(`${t("resource_trade_qty")} `)),r.append($('- + '))),D({el:"#market-qty",data:e.city.market,methods:{val(){e.city.market.qty<1?e.city.market.qty=1:e.city.market.qty>_c()&&(e.city.market.qty=_c())},limit(){return _c()},less(){e.city.market.qty-=fe()},more(){e.city.market.qty+=fe()}}})}function _c(){return e.tech.currency>=6?1e6:e.tech.currency>=4?5e3:100}function el(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==2))&&(le($("#resEjector")),e.interstellar.mass_ejector)){let r=$(`
${t("interstellar_mass_ejector_vol")} `);$("#resEjector").append(r);let a=$(' ');r.append(a),a.append($(`{{ total }} / {{ on | max }}{{ on | real }} ${t("interstellar_mass_ejector_mass")}: {{ mass | approx }} kt/s `)),D({el:"#eject",data:e.interstellar.mass_ejector,filters:{max(i){return i*1e3},real(i){return k.mass_ejector${e.resource[r].name} `);$("#resEjector").append(i);let s=$(' ');i.append(s),s.append($(`« `)),s.append($(`{{ e.${r} }} `)),s.append($(`» `)),s.append($(`${t("interstellar_mass_ejector_per")}: ${Mt[r]} kt `)),e.interstellar.mass_ejector.hasOwnProperty(r)||(e.interstellar.mass_ejector[r]=0),D({el:`#eject${r}`,data:{r:e.resource[r],e:e.interstellar.mass_ejector},methods:{ejectMore(n){let c=fe();c+e.interstellar.mass_ejector.total>k.mass_ejector*1e3&&(c=k.mass_ejector*1e3-e.interstellar.mass_ejector.total),e.interstellar.mass_ejector[n]+=c,e.interstellar.mass_ejector.total+=c},ejectLess(n){let c=fe();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 tl(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==3))&&(le($("#resCargo")),e.portal.transport)){let r=$(`
${t("portal_transport_supply")} `);$("#resCargo").append(r);let a=$('{{ used }} / {{ max }} ');r.append(a),D({el:"#spireSupply",data:e.portal.transport.cargo})}}function Xn(r,a){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==3))&&ya[r]&&e.portal.transport){let i=$(`
${e.resource[r].name} `);$("#resCargo").append(i);let s=$(' ');i.append(s),s.append($(`« `)),s.append($(`{{ e.${r} }} `)),s.append($(`» `));let n=Ee(ya[r].out);s.append($(`${t("portal_transport_item",[`${n} `,`${ya[r].in} `])} `)),e.portal.transport.cargo.hasOwnProperty(r)||(e.portal.transport.cargo[r]=0),D({el:`#supply${r}`,data:{r:e.resource[r],e:e.portal.transport.cargo},methods:{supplyMore(c){let l=fe();l+e.portal.transport.cargo.used>e.portal.transport.cargo.max&&(l=e.portal.transport.cargo.max-e.portal.transport.cargo.used,e.portal.transport.cargo[c]+l<0&&(l=-e.portal.transport.cargo[c])),e.portal.transport.cargo[c]+=l,e.portal.transport.cargo.used+=l},supplyLess(c){let l=fe();l>e.portal.transport.cargo[c]&&(l=e.portal.transport.cargo[c]),e.portal.transport.cargo[c]>0&&(e.portal.transport.cargo[c]-=l,e.portal.transport.cargo.used-=l)}}})}}function rl(){!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==4)||le($("#resAlchemy"))}function ec(r,a,i){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==4))&&!(e.race.artifical&&r==="Food")&&e.tech.alchemy&&(i||e.tech.alchemy>=2)&&r!=="Crystal"){let s=$(`
${e.resource[r].name} `);$("#resAlchemy").append(s);let n=$(' ');s.append(n),n.append($(`« `)),n.append($(`{{ a.${r} }} `)),n.append($(`» `)),e.race.alchemy.hasOwnProperty(r)||(e.race.alchemy[r]=0),D({el:`#alchemy${r}`,data:{r:e.resource[r],a:e.race.alchemy},methods:{addSpell(c){let l=fe();for(let o=0;o=1;o++)e.race.alchemy[c]++,e.resource.Mana.diff--},subSpell(c){let l=fe();for(let o=0;o0;o++)e.race.alchemy[c]--,e.resource.Mana.diff++}}}),pe(`alchemy${r}`,function(){let c=i&&e.tech.alchemy>=2?sr[r]*8:sr[r]*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[r].name])}
`)},{elm:`#alchemy${r} h3`})}}var H=function(){var r={};return function(a,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(r[n]||(r[n]={}),!r[n][c]||s){let l=1,o=!!(e.race.cataclysm||e.race.orbit_decayed);if(e.genes.store){let d=0;if(!i||i&&(i==="plasmid"&&e.race.universe!=="antimatter"||i==="anti"&&e.race.universe==="antimatter")){d=e.race.universe==="antimatter"?e.prestige.AntiPlasmid.count:e.prestige.Plasmid.count;let _=d;e.race.no_plasmid?_=Math.min(e.race.p_mutation,d):e.race.nerfed&&(_=Math.floor(d/(e.race.universe==="antimatter"?2:5))),d=Math.round(_*(e.race.nerfed?.5:1))}(!i||i&&i==="phage")&&e.genes.store>=4&&(d+=Math.round(e.prestige.Phage.count*(e.race.nerfed?1/3:1)));let h=e.genes.store>=2?e.genes.store>=3?1250:1666:2500;if(e.race.universe==="antimatter"&&(h*=2),e.genes.bleed&&e.genes.bleed>=3&&(!i||i&&(i==="plasmid"&&e.race.universe==="antimatter"||i==="anti"&&e.race.universe!=="antimatter"))){let _=e.race.universe==="antimatter"?e.prestige.Plasmid.count/5:e.prestige.AntiPlasmid.count/10;d+=Math.round(_*(e.race.nerfed?.5:1))}l*=1+d/h}if(e.race.universe==="standard"&&(l*=ft("standard")),e.race.universe==="antimatter"&&(!o&&e.city.temple&&e.city.temple.count||o&&e.space.ziggurat&&e.space.ziggurat.count)){let d=.06;if(e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let h=e.genes.ancients>=5?.0012:e.genes.ancients>=3?.001:8e-4;e.race.high_pop&&(h=xe(h)),d+=h*e.civic.priest.workers}l*=1+(o?e.space.ziggurat.count:e.city.temple.count)*d}if(!i&&e.pillars){let d=ea();l*=d[1]}r[n]={},r[n][c]=l}return i?r[n][c]*a:Math.round(r[n][c]*a)}}();function gc(){if(e.race.no_plasmid||e.race.universe==="antimatter"){let r=!!(e.race.cataclysm||e.race.orbit_decayed);if(r&&e.space.ziggurat&&e.space.ziggurat.count||e.city.temple&&e.city.temple.count){let a=e.tech.anthropology&&e.tech.anthropology>=1?.016:.01;if(e.tech.fanaticism&&e.tech.fanaticism>=2){let s=e.civic.professor.workers*(e.race.universe==="antimatter"?2e-4:4e-4);e.race.high_pop&&(s=xe(s)),a+=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;e.race.high_pop&&(s=xe(s)),a+=s*e.civic.priest.workers}e.race.universe==="antimatter"?a/=e.race.nerfed?3:2:e.race.nerfed&&(a/=2),e.race.spiritual&&(a*=1+b.spiritual.vars()[0]/100);let i=ve("seraph");return i>0&&(a*=1+b.spiritual.vars(1)[0]/100*i),e.civic.govern.type==="theocracy"&&(a*=1.12),e.race.ooze&&(a*=1-b.ooze.vars()[1]/100),(r?e.space.ziggurat.count:e.city.temple.count)*a}}return 0}var Vi=function(){var r={};return function(a){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",k.alien_outpost||"0"].join("-");if(!r[i]){let s=0,n=0;if(e.race.universe!=="antimatter"||e.genes.bleed){let l=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&&(l*=.025),e.race.decayed&&(l-=Math.round((e.stats.days-e.race.decayed)/(300+e.race.gene_fortify*6)));let o=250+e.prestige.Phage.count;l>o?s=+(Math.log(o+50)-3.91202).toFixed(5)/2.888+Math.log(l+1-o)/Math.LN2/250:l<0?s=0:s=+(Math.log(l+50)-3.91202).toFixed(5)/2.888,e.tech.outpost_boost&&e.race.truepath&&k.alien_outpost&&(s*=2);let d=0;if(e.race.orbit_decayed&&e.space.ziggurat?d=e.space.ziggurat.count:e.city.temple&&(d=e.city.temple.count),d>0&&!e.race.no_plasmid&&e.race.universe!=="antimatter"){let h=e.tech.anthropology&&e.tech.anthropology>=1?.08:.05;if(e.tech.fanaticism&&e.tech.fanaticism>=2){let m=e.civic.professor.workers*.002;e.race.high_pop&&(m=xe(m)),h+=m}if(e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let m=e.genes.ancients>=5?.0015:e.genes.ancients>=3?.00125:.001;e.race.high_pop&&(m=xe(m)),h+=m*e.civic.priest.workers}e.race.spiritual&&(h*=1+b.spiritual.vars()[0]/100);let _=ve("seraph");_>0&&(h*=1+b.spiritual.vars(1)[0]/100*_),e.civic.govern.type==="theocracy"&&(h*=1.12),e.race.ooze&&(h*=1-b.ooze.vars()[1]/100),e.race.orbit_decayed&&e.race.truepath&&(h*=.1),s*=1+d*h}}if(e.race.universe==="antimatter"||e.genes.bleed&&e.genes.bleed>=2){let l=e.prestige.AntiPlasmid.count;e.race.universe!=="antimatter"&&e.genes.bleed&&e.genes.bleed>=2&&(l*=.25),e.race.decayed&&(l-=Math.round((e.stats.days-e.race.decayed)/(300+e.race.gene_fortify*6)));let o=250+e.prestige.Phage.count;l>o?n=+(Math.log(o+50)-3.91202).toFixed(5)/2.888+Math.log(l+1-o)/Math.LN2/250:l<0?n=0:n=+(Math.log(l+50)-3.91202).toFixed(5)/2.888,e.tech.outpost_boost&&e.race.truepath&&k.alien_outpost&&(n*=2),n/=3}e.race.nerfed&&(e.race.universe==="antimatter"?(s/=2,n/=2):(s/=5,n/=5)),r={};let c=(1+s)*(1+n)-1;r[i]=[c,s,n]}return a&&a==="raw"?r[i]:a&&a==="plasmid"?r[i][1]:a&&a==="antiplasmid"?r[i][2]:r[i][0]}}();var ui={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 u($(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 u($(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 u($(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 u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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!!u($(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!!u($(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 u($(this)[0])?(e.city.basic_housing={count:0},!0):!1}},cottage:{id:"tech-cottage",title(){return St("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 u($(this)[0])?(e.city.cottage={count:0},!0):!1}},apartment:{id:"tech-apartment",title(){return St("large")},desc(){return St("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 u($(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 u($(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 r=St("small"),a=St("medium");return t("tech_steel_beams_effect",[r,a])},action(){return!!u($(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 r=St("small"),a=St("medium");return t("tech_mythril_beams_effect",[r,a])},action(){return!!u($(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 r=St("small"),a=St("medium");return t("tech_neutronium_walls_effect",[r,a])},action(){return!!u($(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 r=St("small"),a=St("medium");return t("tech_bolognium_alloy_beams_effect",[r,a])},action(){return!!u($(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!!u($(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!!u($(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 u($(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 u($(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 u($(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 u($(this)[0])?(e.resource.Energy.display=!0,e.settings.showPsychic=!0,e.race.psychicPowers={boost:{r:"Food"},boostTime:0},!0):!1},post(){Ct()}},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 u($(this)[0])?(e.race.psychicPowers.assaultTime=0,!0):!1},post(){Ct()}},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 u($(this)[0])?(e.race.psychicPowers.cash=0,!0):!1},post(){Ct()}},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 u($(this)[0])?(e.race.psychicPowers.channel={cash:0,assault:0,boost:0},!0):!1},post(){Ct()}},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!!u($(this)[0])},post(){Ct()}},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!!u($(this)[0])},post(){Ct()}},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!!u($(this)[0])},post(){Ct()}},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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(this)[0])?(Lr("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 u($(this)[0])?(Lr("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 u($(this)[0])?(Lr("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 u($(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 u($(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!!u($(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!!u($(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!!u($(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 u($(this)[0])?(Lr("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!!u($(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!!u($(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 u($(this)[0])?(Lr("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 u($(this)[0])?(Lr("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!!u($(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!!u($(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 u($(this)[0])?(Lr("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!!u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(this)[0])}},banquet:{id:"tech-banquet",title:t("tech_banquet"),desc:t("tech_banquet"),category:"special",era:"discovery",reqs:{high_tech:2},grant:["banquet",1],not_trait:["fasting"],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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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(){return!!u($(this)[0])},post(){rt()}},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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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!!u($(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!!u($(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!!u($(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",[dr()])},action(){return!!u($(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",[dr()])},action(){return!!u($(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 u($(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 u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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 u($(this)[0])?(e.city.metal_refinery={count:0,on:0},Lt(),!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!!u($(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 u($(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,ue())}},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 u($(this)[0])?(e.resource.Steel.display=!0,!0):!1},post(){rt(),Ct()}},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!!u($(this)[0])},post(){e.race.steelen&&(e.tech.smelting=6,ue())}},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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(this)[0])},post(){rt()}},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!!u($(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!!u($(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 u($(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 u($(this)[0])?(e.resource.Iron.display=!0,e.city.foundry&&e.city.foundry.count>0&&(e.resource.Wrought_Iron.display=!0,Lt()),!0):!1},post(){Ct()}},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 u($(this)[0])?(e.city.coal_mine={count:0,on:0},e.resource.Coal.display=!0,!0):!1},post(){Ct()}},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 u($(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!!u($(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!!u($(this)[0])},post(){Qr(!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!!u($(this)[0])},post(){Qr(!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!!u($(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!!u($(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!!u($(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 u($(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 r=t("resource_Bones_name");return e.race.smoldering?r=t("resource_Chrysotile_name"):e.race.kindling_kindred&&(r=t("resource_Stone_name")),t("tech_reinforced_crates_alt_effect",[r])}else return t("tech_reinforced_crates_effect")},action(){return u($(this)[0])?(D({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!!u($(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 u($(this)[0])?(D({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 u($(this)[0])?(D({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 u($(this)[0])?(D({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 u($(this)[0])?(D({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!!u($(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 r=e.race.kindling_kindred||e.race.smoldering?e.race.smoldering?"Chrysotile":"Stone":"Plywood";return t("tech_steel_containers_alt_effect",[e.resource[r].name,e.resource.Steel.name])}else return t("tech_steel_containers_effect",[e.resource.Steel.name])},action(){return u($(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!!u($(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 u($(this)[0])?(D({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 u($(this)[0])?(D({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 u($(this)[0])?(D({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 u($(this)[0])?(D({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!!u($(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!!u($(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 u($(this)[0])?(e.queue.display=!0,!0):!1},post(){zr()}},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 u($(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(){zr()}},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!!u($(this)[0])},post(){zr()}},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!!u($(this)[0])},post(){zr()}},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 u($(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!!u($(this)[0])},post(){D({el:"#govType"},"update"),D({el:"#foreign"},"update"),D({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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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||_r()},grant:["gov_fed",1],cost:{Knowledge(){return 3e4}},effect:t("tech_federation_effect"),action(){return!!u($(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!!u($(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 u($(this)[0])?(e.settings.showGovernor=!0,!0):!1},post(){Ot()}},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!!u($(this)[0])},post(){D({el:"#foreign"},"update"),Ot()}},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 u($(this)[0])?(e.settings.msgFilters.spy.unlocked||(e.settings.msgFilters.spy.unlocked=!0,e.settings.msgFilters.spy.vis=!0),!0):!1},post(){D({el:"#foreign"},"update"),Ot()}},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!!u($(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!!u($(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!!u($(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 u($(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 u($(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 u($(this)[0])?(e.civic.taxes.display=!0,!0):!1},post(){Ot()}},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!!u($(this)[0])},post(){e.race.noble&&(e.tech.currency=5,ue())}},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!!u($(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!!u($(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 u($(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!!u($(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!!u($(this)[0])},post(){e.tech.high_tech>=6&&Ue("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 u($(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 u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(this)[0])}},swiss_banking:{id:"tech-swiss_banking",title:ln(),desc:ln(),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!!u($(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!!u($(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!!u($(this)[0])},post(){Ue("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!!u($(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!!u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(this)[0])?(e.arpa.m_type=Ue("Monument"),!0):!1},post(){Ue("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 u($(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!!u($(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 u($(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 u($(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!!u($(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!!u($(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!!u($(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",[dr(),e.civic.scientist?e.civic.scientist.name:t("job_scientist")])},action(){return!!u($(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",[dr()])},action(){return!!u($(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 u($(this)[0])?(e.race.toxic&&e.race.species==="troll"&&ie("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 u($(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",[W().dwarf])},action(){return u($(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 u($(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!!u($(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!!u($(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"),dr()])},action(){return!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(this)[0])?(e.resource.Codex.display=!1,!0):!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 u($(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 u($(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(){Ue("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 u($(this)[0])?(e.settings.arpa.crispr=!0,e.settings.arpa.arpaTabs=2,!0):!1},post(){Ue("Genetics"),Ue("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 u($(this)[0])?(e.arpa.sequence.boost=!0,!0):!1},post(){Ue("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 u($(this)[0])?(e.resource.Genes.display=!0,!0):!1},post(){Ue("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 u($(this)[0])?(e.arpa.sequence.auto=!0,!0):!1},post(){Ue("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!!u($(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 u($(this)[0])?(e.race.terrifying&&(e.civic.taxes.display=!0),e.city.wardenclyffe={count:0,on:0},!0):!1},post(){e.race.terrifying&&Ot()}},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 u($(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,ca(),!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(u($(this)[0])){if(e.race.universe==="antimatter"&&e.race.amexplode){De("annihilation"),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),$("body").addClass("nuke");let r=$('
');$("body").append(r),setTimeout(function(){r.addClass("burn")},500),setTimeout(function(){r.addClass("b")},600),setTimeout(function(){window.soft_reset()},4e3)}else e.race.replicator={res:"Stone",pow:1};return!0}return!1},post(){Ot()}},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 u($(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(){Ct()}},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 u($(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 u($(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 u($(this)[0])?(e.settings.showGenetics=!0,e.settings.arpa.physics=!0,e.race.truepath&&!e.tech.unify&&(e.tech.unify=1),!0):!1},post(){Ue("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 u($(this)[0])?(e.race.truepath&&!e.tech.rival&&(e.tech.rival=1,I(t("civics_rival_unlocked",[ut(3)]),"info",!1,["progress","combat"])),!0):!1},post(){Ue("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!!u($(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 u($(this)[0])?(e.race.cataclysm&&ie("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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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 u($(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!!u($(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 u($(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!!u($(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 u($(this)[0])?(e.settings.arpa.blood=!0,Ue("Crispr"),!0):!1},post(){Ue("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!!u($(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 u($(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"],cost:{Species(){return Si(1e3)},Knowledge(){return 55e6},Demonic_Essence(){return 1}},effect(){return`${t("tech_demonic_infusion_effect")}
${t("tech_demonic_infusion_effect2",[ot("descend").artifact])}
`},action(){return u($(this)[0])&&Ts(),!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 u($(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 u($(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 u($(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 u($(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!!u($(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 u($(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 u($(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 u($(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 u($(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 u($(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!!u($(this)[0])}},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 u($(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 u($(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 u($(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 u($(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!!u($(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 u($(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",[W().red])},action(){return u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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 u($(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!!u($(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!!u($(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",[W().gas_moon])},action(){return u($(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 u($(this)[0])?(e.resource.Uranium.display=!0,!0):!1},post(){Ct()}},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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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 u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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 u($(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 u($(this)[0])?(e.resource.Polymer.display=!0,I(t("tech_polymer_avail"),"info",!1,["progress"]),!0):!1},post(){rt(),Ct()}},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!!u($(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!!u($(this)[0])},post(){rt()}},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 u($(this)[0])?(e.resource.Nanoweave.display=!0,I(t("tech_nanoweave_avail"),"info",!1,["progress"]),Lt(),!0):!1},post(){Ct()}},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 u($(this)[0])?(e.resource.Stanene.display=!0,I(t("tech_stanene_avail"),"info",!1,["progress"]),!0):!1},post(){rt(),Ct()}},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 u($(this)[0])?(e.resource.Nano_Tube.display=!0,I(t("tech_nano_tubes_msg"),"info",!1,["progress"]),!0):!1},post(){rt(),Ct()}},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(u($(this)[0])){if(e.resource.Scarletite.display=!0,e.portal.hell_forge={count:0,on:0},I(t("tech_scarletite_avail"),"info",!1,["progress"]),Lt(),e.race.universe!=="micro"&&!e.pillars[e.race.species])e.tech.fusable=1;else{let r=Jt();r>e.pillars[e.race.species]&&(e.pillars[e.race.species]=r),e.tech.pillars=2}return!0}return!1},post(){Ct()}},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 u($(this)[0])?(I(t("tech_pillars_msg",[F[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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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!!u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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!!u($(this)[0])},post(){Ot()}},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!!u($(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!!u($(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!!u($(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 u($(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 u($(this)[0])?(e.civic.garrison.mercs=!0,!0):!1},post(){Ot()}},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!!u($(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 u($(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!!u($(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 u($(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!!u($(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!!u($(this)[0])},post(){D({el:"#garrison"},"update"),D({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!!u($(this)[0])},post(){D({el:"#garrison"},"update"),D({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!!u($(this)[0])},post(){D({el:"#garrison"},"update"),D({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!!u($(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!!u($(this)[0])},post(){D({el:"#garrison"},"update"),D({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 u($(this)[0])?(e.race.species==="sharkin"&&ie("laser_shark"),!0):!1},post(){D({el:"#garrison"},"update"),D({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!!u($(this)[0])},post(){D({el:"#garrison"},"update"),D({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!!u($(this)[0])},post(){D({el:"#garrison"},"update"),D({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!!u($(this)[0])},post(){D({el:"#garrison"},"update"),D({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!!u($(this)[0])},post(){D({el:"#garrison"},"update"),D({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",[W().red])}
`},action(){return u($(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!!u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(this)[0])},post(){D({el:"#fort"},"update"),Qr(!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!!u($(this)[0])},post(){D({el:"#fort"},"update"),Qr(!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!!u($(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!!u($(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!!u($(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 u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(this)[0])?(e.resource.Titanium.value=ta.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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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(r=>r.id==="tech-anthropology")},cost:{Knowledge(){return 2500}},effect:`${t("tech_fanaticism_effect")}
${t("tech_fanaticism_warning")}
`,action(){return u($(this)[0])?(e.tech.fanaticism=1,e.race.gods===e.race.species&&ie("second_evolution"),on(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 u($(this)[0])?(e.tech.theology===2&&(e.tech.theology=3),e.race.gods===e.race.species&&ie("second_evolution"),on(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 r=e.race.old_gods!=="none"?F[e.race.old_gods.toLowerCase()].entity:F[e.race.species].entity,a=e.race.gods!=="none"?F[e.race.gods.toLowerCase()].entity:F[e.race.species].entity;return t("tech_ancient_theology_effect",[r,a])},action(){return u($(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(r=>r.id==="tech-deify")},cost:{Knowledge(){return 195e3}},effect(){let r=e.race.old_gods!=="none"?F[e.race.old_gods.toLowerCase()].entity:F[e.race.species].entity;return`${t("tech_study_effect",[r])}
${t("tech_study_warning")}
`},action(){return u($(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!!u($(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(r=>r.id==="tech-study")},cost:{Knowledge(){return 195e3}},effect(){let r=e.race.old_gods!=="none"?F[e.race.old_gods.toLowerCase()].entity:F[e.race.species].entity;return`${t("tech_deify_effect",[r])}
${t("tech_deify_warning")}
`},action(){return u($(this)[0])?(e.tech.ancient_deify=1,on(e.race.old_gods),Ue("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!!u($(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!!u($(this)[0])},post(){e.race.terrifying&&(e.tech.fanaticism=3,ue())}},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!!u($(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!!u($(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(r=>r.id==="tech-fanaticism")},cost:{Knowledge(){return 2500}},effect:`${t("tech_anthropology_effect")}
${t("tech_anthropology_warning")}
`,action(){return u($(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 u($(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!!u($(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!!u($(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!!u($(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 u($(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 u($(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 u($(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 u($(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",[W().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",[W().red])},action(){return u($(this)[0])?(e.space.biodome={count:0,on:0},!0):!1}},red_tower:{id:"tech-red_tower",title(){return t("tech_red_tower",[W().red])},desc(){return t("tech_red_tower",[W().red])},category:"space_exploration",era:"early_space",reqs:{mars:2},grant:["mars",3],cost:{Knowledge(){return 195e3}},effect(){return t("tech_red_tower_effect",[W().red])},action(){return u($(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",[W().red])},action(){return u($(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 u($(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!!u($(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!!u($(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 u($(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",[F[e.race.species].home,W().hell])},action(){return u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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 u($(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 u($(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 u($(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 u($(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",[W().red])},action(){return!!u($(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 u($(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",[W().gas])},action(){return!!u($(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!!u($(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 u($(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 u($(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 u($(this)[0])?(e.space.elerium_ship={count:0,on:0},e.race.cataclysm&&ie("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!!u($(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!!u($(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!!u($(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 u($(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",[W().red])},action(){return!!u($(this)[0])}},unification:{id:"tech-unification",title:t("tech_unification"),desc(){return t("tech_unification_desc",[F[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!!u($(this)[0])}},unification2:{id:"tech-unification2",title:t("tech_unification"),desc(){return t("tech_unification_desc",[F[e.race.species].home])},category:"special",era:"early_space",path:["standard"],reqs:{unify:1},grant:["unify",2],cost:{Bool(){let r=0;for(let a=0;a<3;a++)(e.civic.foreign[`gov${a}`].occ||e.civic.foreign[`gov${a}`].buy||e.civic.foreign[`gov${a}`].anx)&&r++;return r===3}},effect(){let r=e.race.banana?`${t("tech_unification_banana")}
`:"";return`${t("tech_unification_effect2")}
${t("tech_unification_warning")}
${r}`},action(){return u($(this)[0])?(e.race.banana&&(e.sim||Se.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&&ie("world_domination"),e.civic.foreign.gov0.anx&&e.civic.foreign.gov1.anx&&e.civic.foreign.gov2.anx&&ie("illuminati"),e.civic.foreign.gov0.buy&&e.civic.foreign.gov1.buy&&e.civic.foreign.gov2.buy&&ie("syndicate"),e.stats.attacks===0&&ie("pacifist"),dl(),!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 r=0;for(let a=0;a<3;a++)(e.civic.foreign[`gov${a}`].occ||e.civic.foreign[`gov${a}`].buy||e.civic.foreign[`gov${a}`].anx)&&r++;return r===3}},effect(){return`${t("tech_unite_effect")}
${t("tech_unification_effect2")}
`},action(){return u($(this)[0])?(e.race.banana&&(e.sim||Se.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&&ie("world_domination"),e.civic.foreign.gov0.anx&&e.civic.foreign.gov1.anx&&e.civic.foreign.gov2.anx&&ie("illuminati"),e.civic.foreign.gov0.buy&&e.civic.foreign.gov1.buy&&e.civic.foreign.gov2.buy&&ie("syndicate"),e.stats.attacks===0&&ie("pacifist"),dl(),e.race.truepath&&!e.tech.rival&&(e.tech.rival=1,I(t("civics_rival_unlocked",[ut(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!!u($(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 u($(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 u($(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 u($(this)[0])?(e.starDock.seeder={count:0},e.race.cataclysm&&ie("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 u($(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!!u($(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!!u($(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!!u($(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 u($(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 u($(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 u($(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 u($(this)[0])?(e.resource.Aerogel.display=!0,Lt(),!0):!1},post(){Ct()}},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 u($(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 u($(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 u($(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 u($(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!!u($(this)[0])},post(){Ue("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!!Tt($(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!!Tt($(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 r=ot("bigbang"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name"),i=`${t("wiki_tech_infusion_confirm_gains",[r.plasmid,r.phage,r.dark,a])}
`;return`${t("tech_infusion_confirm_effect")}
${t("tech_exotic_infusion_effect2")}
${i}`},action(){if(u($(this)[0])){if(e.tech.whitehole>=4)return;e.tech.whitehole=4;let r=$('
');return $("body").append(r),setTimeout(function(){r.addClass("burn")},125),setTimeout(function(){r.addClass("b")},150),setTimeout(function(){r.addClass("c")},2e3),setTimeout(function(){to()},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(u($(this)[0])){if(e.interstellar.stellar_engine.mass+=Mt.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 r=it();e.stats.banana.b3[r]=!0,r!=="m"&&r!=="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!!u($(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!!u($(this)[0])},post(){Ue("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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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},F[e.race.species].type==="demonic"?ie("blood_war"):ie("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(){ys()}},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 u($(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 u($(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 u($(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 u($(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!!u($(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!!u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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 r=F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name,a=F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].entity;return t("tech_xeno_culture_effect",[r,a])},action(){return u($(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 r=F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name;return t("tech_cultural_exchange_effect",[r])},action(){return u($(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!!u($(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 u($(this)[0])?(e.galaxy.consulate={count:0},e.settings.space.alien1=!0,I(t("tech_xeno_gift_msg",[F[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",[F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])},action(){return u($(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",[F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])},action(){return!!u($(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!!u($(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 u($(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 u($(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 u($(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 u($(this)[0])?(e.galaxy.frigate_ship={count:0,on:0,crew:0,mil:0},Pt(),!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",[F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},action(){return u($(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,Pt(),!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 u($(this)[0])?(e.galaxy.dreadnought={count:0,on:0,crew:0,mil:0},Pt(),!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 u($(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 u($(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",[F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},action(){return u($(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 u($(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 u($(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(){Ct()}},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 u($(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 u($(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 u($(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!!u($(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!!u($(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 u($(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!!u($(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 r=ot("cataclysm"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`${t("tech_dial_it_to_11_effect",[W().dwarf,e.race.cataclysm?W().red:F[e.race.species].home])}
${t("tech_dial_it_to_11_effect2")}
${t("star_dock_genesis_effect2",[r.plasmid,a])}
${t("star_dock_genesis_effect3",[r.phage])}
`},action(){return u($(this)[0])?($("#main").addClass("earthquake"),setTimeout(function(){$("#main").removeClass("earthquake"),eo()},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!!u($(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 u($(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(){Ct()}},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 u($(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 u($(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(){rt()}},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 u($(this)[0])?(e.race.casting.crafting=0,!0):!1},post(){rt()}},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!!u($(this)[0])},post(){Ue("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!!u($(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!!u($(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!!u($(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 u($(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(){Ha("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!!u($(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!!u($(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!!u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 r=it();return!!(e.stats.spire.hasOwnProperty(r)&&e.stats.spire[r].hasOwnProperty("dlstr")&&e.stats.spire[r].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 u($(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 u($(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!!u($(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 u($(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",[W().enceladus])},action(){return u($(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 u($(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",[W().triton])},action(){return u($(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!!u($(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!!u($(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",[W().titan])},action(){return u($(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 u($(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 u($(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!!u($(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 u($(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!!Tt($(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 r=ot("ai"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name"),i=`${t("tech_protocol66a_effect_gains",[r.plasmid,a,r.phage,r.cores])}
`;return`${t("tech_protocol66a_effect")}
${i}`},action(){return u($(this)[0])?(Pe.w&&Pe.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(){so()},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",[W().red])},action(){return u($(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 u($(this)[0])?(e.resource.Quantium.display=!0,!0):!1},post(){Ct()}},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!!u($(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!!u($(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 u($(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 u($(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 u($(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 u($(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 u($(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",[W().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 u($(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",[W().eris])},action(){return u($(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 u($(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 u($(this)[0])?(e.resource.Stanene.display=!0,I(t("tech_stanene_avail"),"info",!1,["progress"]),!0):!1},post(){rt(),Ct()}},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 u($(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!!u($(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",[W().titan,e.resource.Water.name])},action(){return u($(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",[W().titan])},desc(){return t("tech_storehouse",[W().titan])},category:"storage",era:"solar",path:["truepath"],reqs:{titan:4},grant:["titan",5],cost:{Knowledge(){return 5e5}},effect(){return t("tech_storehouse_effect",[W().titan])},action(){return u($(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!!u($(this)[0])}},titan_bank:{id:"tech-titan_bank",title(){return t("tech_titan_bank",[W().titan])},desc(){return t("tech_titan_bank",[W().titan])},category:"storage",era:"solar",path:["truepath"],reqs:{titan:5},grant:["titan",6],cost:{Knowledge(){return 6e5}},effect(){return t("tech_titan_bank_effect",[W().titan])},action(){return u($(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 u($(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",[W().enceladus,F[e.race.species].home,e.resource.Water.name])},action(){return u($(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",[W().hell])},action(){return u($(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!!u($(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 u($(this)[0])?(D({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!!u($(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 u($(this)[0])?(D({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 u($(this)[0])?(D({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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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!!u($(this)[0])}},shipyard:{id:"tech-shipyard",title(){return t("tech_shipyard",[W().dwarf])},desc(){return t("tech_shipyard",[W().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",[W().dwarf])},action(){return u($(this)[0])?(e.space.shipyard={count:0,on:0,ships:[],expand:!0,sort:!0},Qn(),!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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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!!u($(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 u($(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 u($(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 u($(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",[F[e.race.species].home])},action(){return u($(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",[F[e.race.species].home])},action(){return u($(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",[W().red])])},action(){return u($(this)[0])?(I(t("tech_weasels_msg",[t("tau_planet",[W().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 u($(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!!u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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!!u($(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 u($(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 u($(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 u($(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!!u($(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 u($(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 u($(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 u($(this)[0])?(e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),e.tech.isolation=1,jo(),!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 u($(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 u($(this)[0])?(e.race.artifical?I(t("tech_decode_virus_msg1s",[O.tauceti.tau_home.infectious_disease_lab.title()]),"info",!1,["progress"]):I(t("tech_decode_virus_msg1",[O.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 r=e.race.artifical?O.city.boot_camp.title():O.city.hospital.title;return`${t("tech_vaccine_campaign_effect",[r])}
`},action(){return u($(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 u($(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 u($(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 u($(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 u($(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 u($(this)[0])?(e.tauceti.cloning_facility={count:0,on:0},!0):!1},post(){Ot()}},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 u($(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!!u($(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 u($(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!!u($(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!!u($(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 u($(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+ze(5e6).toFixed(0)}},effect:t("tech_outer_tau_survey_effect"),action(){return u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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",[O.tauceti.tau_gas2.info.name()])},action(){return u($(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",[O.tauceti.tau_gas2.info.name()])},action(){return u($(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 u($(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",[W().red])])},action(){return u($(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 u($(this)[0])?(e.tauceti.goe_facility={count:0},!0):!1}}};function dl(){e.tech.world_control=1,le($("#garrison")),le($("#c_garrison")),ia($("#garrison"),!0),ia($("#c_garrison"),!1);for(let r=0;r<3;r++){if(e.civic.foreign[`gov${r}`].occ){let a=N(e.civic.govern.type==="federation"?15:20);e.civic.garrison.max+=a,e.civic.garrison.workers+=a,e.civic.foreign[`gov${r}`].occ=!1}e.civic.foreign[`gov${r}`].buy=!1,e.civic.foreign[`gov${r}`].anx=!1,e.civic.foreign[`gov${r}`].sab=0,e.civic.foreign[`gov${r}`].act="none"}qr("spy"),qr("spyop")}function ln(r,a){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(a)return i;let s=(e.stats.hasOwnProperty("reset")?e.stats.reset:0)%i.length;return r?t(`cheese_${i[s]}`):t("tech_swiss_bank",[t(`cheese_${i[s]}`)])}var vc={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 pl(r){if(r){let a={};return Object.keys(ui).forEach(function(i){(vc[r].includes(ui[i].era)||ui[i].hasOwnProperty("path"))&&(!ui[i].hasOwnProperty("path")||ui[i].hasOwnProperty("path")&&ui[i].path.includes(r))&&(a[i]=ui[i])}),a}return ui}var O={evolution:{rna:{id:"evolution-rna",title:t("resource_RNA_name"),desc(){let r=e.race.rapid_mutation?2:1;return t("evo_rna",[r])},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&&r++,t("evo_organelles_effect",[r])},action(){return u($(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(r){return Wa("nucleus",38,e.tech.evo&&e.tech.evo>=4?16:32,r)},DNA(r){return Wa("nucleus",18,e.tech.evo&&e.tech.evo>=4?12:16,r)}},effect(){let r=e.tech.evo&&e.tech.evo>=5?2:1;return t("evo_nucleus_effect",[r])},action(){return u($(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(r){return Wa("eukaryotic_cell",20,20,r)},DNA(r){return Wa("eukaryotic_cell",40,12,r)}},effect(){let r=e.evolution.mitochondria?e.evolution.mitochondria.count*10+10:10;return t("evo_eukaryotic_effect",[r])},action(){return u($(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(r){return Wa("mitochondria",75,50,r)},DNA(r){return Wa("mitochondria",65,35,r)}},effect:t("evo_mitochondria_effect"),action(){return u($(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 u($(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 u($(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 nr(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 u($(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 Bt("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 nr(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 u($(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 Bt("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 nr(2)&&e.stats.achieve.obsolete&&e.stats.achieve.obsolete.l>=5},cost:{DNA(){return 200}},effect(){return t("evo_exterminate_effect")},action(){return u($(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 Bt("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 u($(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 u($(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 u($(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 u($(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)&&nr(5)},cost:{DNA(){return 260}},effect:t("evo_bryophyte_effect"),action(){return u($(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 nr(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 u($(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 Bt("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 u($(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 nr(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 u($(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 Bt("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 nr(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 u($(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 Bt("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 nr(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 u($(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 Bt("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 nr(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 u($(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 nr(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 u($(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 Bt("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 nr(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 u($(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 Bt("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 nr(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 u($(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 Bt("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)&&nr(6)},cost:{DNA(){return 260}},effect(){return t("evo_celestial_effect")},action(){return u($(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 Bt("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)&&nr(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 u($(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 Bt("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)&&nr(5)},cost:{DNA(){return 260}},effect:t("evo_eldritch_effect"),action(){return u($(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 Bt("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)&&nr(5)},cost:{DNA(){return 260}},effect:t("evo_aquatic_effect"),action(){return u($(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 Bt("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)&&nr(5)},cost:{DNA(){return 260}},effect:t("evo_fey_effect"),action(){return u($(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 Bt("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)&&nr(5)},cost:{DNA(){return 260}},effect:t("evo_heat_effect"),action(){return u($(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 Bt("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)&&nr(5)},cost:{DNA(){return 260}},effect:t("evo_polar_effect"),action(){return u($(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 Bt("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)&&nr(5)},cost:{DNA(){return 260}},effect:t("evo_sand_effect"),action(){return u($(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 Bt("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 u($(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 nr(6)},cost:{DNA(){return 260}},effect:t("evo_endothermic_effect"),action(){return u($(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 Bt("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 nr(6)},cost:{DNA(){return 260}},effect:t("evo_ectothermic_effect"),action(){return u($(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 Bt("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(u($(this)[0])){let r=[],a="humanoid";for(let i in Er)if(e.tech[`evo_${i}`]&&e.tech[`evo_${i}`]>=2){a=i;break}if(e.race.junker||e.race.sludge){let i=e.race.sludge?"sludge":"junker";e.race.jtype=a,r.push(i)}else for(let i in Xi){let s=Xi[i];F[s].type===a&&r.push(s)}e.race.species=r[Math.floor(J(0,r.length))],e.stats.achieve[`extinct_${e.race.species}`]&&e.stats.achieve[`extinct_${e.race.species}`].l>=1&&(e.race.species=r[Math.floor(J(0,r.length))]),Cs()}return!1},emblem(){for(let r in Xi){let a=Xi[r];if(e.tech[`evo_${F[a].type}`]&&e.tech[`evo_${F[a].type}`]>=2)return Bt(`genus_${F[a].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 r=new Date;if(r.getMonth()!==11||r.getMonth()===11&&(r.getDate()<=16||r.getDate()>=25)){let a=!1;return e.special&&e.special.gift&&Object.keys(e.special.gift).forEach(function(i){e.special.gift[i]&&(a=!0)}),a}return!1},count(){let r=0;return e.special&&e.special.gift&&Object.keys(e.special.gift).forEach(function(a){e.special.gift[a]&&r++}),r},action(){if(!e.settings.pause){let r=new Date,a=!1;if(e.special&&e.special.gift&&Object.keys(e.special.gift).forEach(function(i){e.special.gift[i]&&(a=i)}),r.getMonth()!==11||r.getMonth()===11&&(r.getDate()<=16||r.getDate()>=25)){if(a==="g2019")e.special&&e.special.gift&&(delete e.special.gift[a],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"])),Et());else if(e.special&&e.special.gift){delete e.special.gift[a];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,l=100+i+s,o=n+c,d=[];if(e.stats.died+e.stats.tdied>0){let h=e.stats.died+e.stats.tdied;e.resource.Coal.amount+=h,d.push(`${h.toLocaleString()} ${t("resource_Coal_name")}`)}if(e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=l,e.stats.antiplasmid+=l,d.push(`${l.toLocaleString()} ${t("resource_AntiPlasmid_plural_name")}`)):(e.prestige.Plasmid.count+=l,e.stats.plasmid+=l,d.push(`${l.toLocaleString()} ${t("resource_Plasmid_plural_name")}`)),o>0&&(e.prestige.Phage.count+=o,e.stats.phage+=o,d.push(`${o.toLocaleString()} ${t("resource_Phage_name")}`)),e.stats.hasOwnProperty("achieve")){let h=e.stats.achieve.whitehole?e.stats.achieve.whitehole.l:0;h+=e.stats.achieve.heavy?e.stats.achieve.heavy.l:0,h+=e.stats.achieve.canceled?e.stats.achieve.canceled.l:0,h+=e.stats.achieve.eviltwin?e.stats.achieve.eviltwin.l:0,h+=e.stats.achieve.microbang?e.stats.achieve.microbang.l:0,h+=e.stats.achieve.pw_apocalypse?e.stats.achieve.pw_apocalypse.l:0;let _=e.stats.achieve.ascended?e.stats.achieve.ascended.l:0,m=e.stats.achieve.corrupted?e.stats.achieve.corrupted.l:0,w=e.stats.achieve.obsolete?e.stats.achieve.obsolete.l:0;if(h>30&&(h=30),_>5&&(_=5),m>5&&(m=5),h>0){let M=+(h/7.5).toFixed(2);e.prestige.Dark.count+=M,e.stats.dark+=M,d.push(`${M} ${t("resource_Dark_name")}`)}if(_>0&&(e.prestige.Harmony.count+=_,e.stats.harmony+=_,d.push(`${_} ${t("resource_Harmony_name")}`)),m>0){let M=m*5,A=m;e.prestige.Blood_Stone.count+=M,e.stats.blood+=M,e.prestige.Artifact.count+=A,e.stats.artifact+=A,d.push(`${M} ${t("resource_Blood_Stone_name")}`),d.push(`${A} ${t("resource_Artifact_name")}`)}a!=="g2020"&&w>0&&(e.prestige.AICore.count+=w,e.stats.cores+=w,d.push(`${w} ${t("resource_AICore_name")}`))}I(t("city_gift2_msg",[d.join(", ")]),"info",!1,["events"]),Et()}}}return!1},touchlabel:t("open")},food:{id:"city-food",title(){return qa().active?e.tech.conjuring?t("city_trick_conjure"):t("city_trick"):e.tech.conjuring?t("city_food_conjure"):t("city_food")},desc(){let r=$(this)[0].val(!1),a=qa();return e.race.fasting?t("city_food_fasting"):a.active?e.tech.conjuring?t("city_trick_conjure_desc",[r]):t("city_trick_desc",[r]):e.tech.conjuring?t("city_food_conjure_desc",[r]):t("city_food_desc",[r])},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&&(a*=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 r=$(this)[0].val(!1);return qa().active?e.tech.conjuring&&e.tech.conjuring>=2?t("city_dig_conjour_desc",[r]):t("city_dig_desc",[r]):e.tech.conjuring&&e.tech.conjuring>=2?t("city_lumber_conjure_desc",[r]):t("city_lumber_desc",[r])},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&&(a*=10,e.resource.Lumber.amount=2?t("city_conjour",[e.resource.Stone.name]):t("city_gather",[e.resource.Stone.name])},desc(){let r=$(this)[0].val(!1);return e.tech.conjuring&&e.tech.conjuring>=2?t("city_stone_conjour_desc",[r,e.resource.Stone.name]):t(e.race.sappy?"city_amber_desc":"city_stone_desc",[r,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&&(a*=10,e.resource.Stone.amount=2?t("city_chrysotile_conjour"):t("city_gather",[e.resource.Chrysotile.name])},desc(){let r=$(this)[0].val(!1);return e.tech.conjuring&&e.tech.conjuring>=2?t("city_stone_conjour_desc",[r,e.resource.Chrysotile.name]):t("city_stone_desc",[r,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&&(a*=10,e.resource.Chrysotile.amounte.resource.Slave.amount&&u($(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(r){return(r||0)+(e.city.hasOwnProperty("s_alter")?e.city.s_alter.count:0)>=1?0:100}},effect(){let r=e.civic[e.civic.d_job]?e.civic[e.civic.d_job].workers:0,a=`${t("city_s_alter_sacrifice",[r])}
`;if(e.city.hasOwnProperty("s_alter")&&e.city.s_alter.rage>0&&(a=a+`${t("city_s_alter_rage",[b.cannibalize.vars()[0],At(e.city.s_alter.rage)])}
`),e.city.hasOwnProperty("s_alter")&&e.city.s_alter.regen>0&&(a=a+`${t("city_s_alter_regen",[b.cannibalize.vars()[0],At(e.city.s_alter.regen)])}
`),e.city.hasOwnProperty("s_alter")&&e.city.s_alter.mind>0&&(a=a+`${t("city_s_alter_mind",[b.cannibalize.vars()[0],At(e.city.s_alter.mind)])}
`),e.city.hasOwnProperty("s_alter")&&e.city.s_alter.mine>0&&(a=a+`${t("city_s_alter_mine",[b.cannibalize.vars()[0],At(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");a=a+`${t("city_s_alter_harvest",[b.cannibalize.vars()[0],At(e.city.s_alter.harvest),i])}
`}return a},action(){if(u($(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++,L("Food",Math.rand(250,1e3),!0);let a=300,i=600;if(e.tech.sacrifice)switch(e.tech.sacrifice){case 1:a=600,i=1500;break;case 2:a=1800,i=3600;break;case 3:a=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(a,i);break;case 1:e.city.s_alter.mind+=Math.rand(a,i);break;case 2:e.city.s_alter.regen+=Math.rand(a,i);break;case 3:e.city.s_alter.mine+=Math.rand(a,i);break;case 4:e.city.s_alter.harvest+=Math.rand(a,i);break}}return!0}return!1},touchlabel:t("tech_dist_sacrifice")},basic_housing:{id:"city-basic_housing",title(){return yl()},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(r){return r=r||0,(e.city.basic_housing?e.city.basic_housing.count:0)+r>=5?K("basic_housing",r,20,1.17):0},Lumber(r){return e.race.kindling_kindred||e.race.smoldering?0:K("basic_housing",r,10,1.23)},Stone(r){return e.race.kindling_kindred?K("basic_housing",r,10,1.23):0},Chrysotile(r){return e.race.smoldering?K("basic_housing",r,10,1.23):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.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 r=1;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},cottage:{id:"city-cottage",title(){return St("medium")},desc(){return t("city_cottage_desc",[$(this)[0].citizens()])},category:"residential",reqs:{housing:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(r){return K("cottage",r,900,1.15)},Plywood(r){return K("cottage",r,25,1.25)},Brick(r){return K("cottage",r,20,1.25)},Wrought_Iron(r){return K("cottage",r,15,1.25)},Iron(r){return e.city.ptrait.includes("unstable")?K("cottage",r,5,1.25):0},Horseshoe(){return e.race.hooved?2:0}},effect(){let r=$(this)[0].citizens();if(e.tech.home_safe){let a=H(e.tech.home_safe>=2?e.tech.home_safe>=3?5e3:2e3:1e3);return`${t("plus_max_citizens",[r])}
${t("plus_max_resource",[`$${a.toLocaleString()}`,t("resource_Money_name")])}
`}else return t("plus_max_citizens",[r])},action(){return u($(this)[0])?(e.resource[e.race.species].max+=$(this)[0].citizens(),e.city.cottage.count++,!0):!1},citizens(){let r=2;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},apartment:{id:"city-apartment",title(){return St("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(r){return K("apartment",r,1750,1.26)-500},Crystal(r){return e.race.universe==="magic"?K("apartment",r,25,1.22):0},Furs(r){return K("apartment",r,725,1.32)-500},Copper(r){return K("apartment",r,650,1.32)-500},Cement(r){return K("apartment",r,700,1.32)-500},Steel(r){return K("apartment",r,800,1.32)-500},Horseshoe(){return e.race.hooved?5:0}},effect(){let r=ge("extravagant",2),a=$(this)[0].citizens();if(e.tech.home_safe){let i=H(e.tech.home_safe>=2?e.tech.home_safe>=3?1e4:5e3:2e3);return r&&(i*=2),`${t("plus_max_citizens",[a])}. ${t("minus_power",[$(this)[0].powered()])}
${t("plus_max_resource",[`$${i.toLocaleString()}`,t("resource_Money_name")])}
`}else return`${t("plus_max_citizens",[a])}. ${t("minus_power",[$(this)[0].powered()])} `},powered(){let r=ge("extravagant",1);return _e(r||1)},action(){return u($(this)[0])?(e.city.apartment.count++,re($(this)[0])&&(e.resource[e.race.species].max+=$(this)[0].citizens()),!0):!1},citizens(){let r=ge("extravagant",2),a=r?5+r:5;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},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(r){return K("lodge",r,50,1.32)},Lumber(r){return K("lodge",r,20,1.36)},Stone(r){return K("lodge",r,10,1.36)},Horseshoe(){return e.race.hooved?1:0}},effect(){let r=$(this)[0].citizens();return e.race.carnivore&&!e.race.artifical?`${t("plus_max_resource",[r,t("citizen")])}
${t("city_lodge_effect",[5])}
`:t("plus_max_resource",[r,t("citizen")])},action(){return u($(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 r=1;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},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(r){return K("smokehouse",r,85,1.32)},Lumber(r){return K("smokehouse",r,65,1.36)},Stone(r){return K("smokehouse",r,50,1.36)}},effect(){let r=Qt(H(100));return`${t("plus_max_resource",[r,t("resource_Food_name")])}
${t("city_smokehouse_effect",[10])}
`},action(){return u($(this)[0])?(e.city.smokehouse.count++,e.resource.Food.max+=Qt(H(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(r){return r=r||0,(e.city.soul_well?e.city.soul_well.count:0)+r>=3?K("soul_well",r,50,1.32):0},Lumber(r){return K("soul_well",r,20,1.36)},Stone(r){return K("soul_well",r,10,1.36)}},effect(){let r=Qt(H(500)),a=e.race.ghostly?2+b.ghostly.vars()[1]:2;return`${t("city_soul_well_effect",[a])}
${t("plus_max_resource",[r,t("resource_Souls_name")])}
`},action(){return u($(this)[0])?(e.city.soul_well.count++,e.resource.Food.max+=Qt(H(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(r){return K("slave_pen",r,250,1.32)},Lumber(r){return K("slave_pen",r,100,1.36)},Stone(r){return K("slave_pen",r,75,1.36)},Copper(r){return K("slave_pen",r,10,1.36)},Nanite(r){return e.race.deconstructor?K("slave_pen",r,4,1.36):0}},effect(){let r=e.city.slave_pen?e.city.slave_pen.count*4:4,a=e.city.slave_pen?e.resource.Slave.amount:0;return`${t("city_slave_pen_effect",[4])}
${t("city_slave_pen_effect2",[a,r])}
`},action(){return u($(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(r){return e.city.transmitter&&e.city.transmitter.count>=3?K("transmitter",r,50,1.32):0},Copper(r){return K("transmitter",r,20,1.36)},Steel(r){return K("transmitter",r,10,1.36)}},effect(){let r=+T("transmitter").toFixed(2),a=H(100);return`${t("gain",[r,e.resource.Food.name])}
${t("city_transmitter_effect",[a])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(.5)},powerBalancer(){return[{r:"Food",k:"lpmod"}]},action(){return u($(this)[0])?(e.city.transmitter.count++,re($(this)[0]),!0):!1}},captive_housing:hr("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(r){return r=r||0,(e.city.farm?e.city.farm.count:0)+r>=3?K("farm",r,50,1.32):0},Lumber(r){return K("farm",r,20,1.36)},Stone(r){return K("farm",r,10,1.36)},Horseshoe(r){return e.race.hooved&&(e.city.farm?e.city.farm.count:0)+(r||0)>=2?1:0}},effect(){let r=$(this)[0].citizens();return e.tech.farm?`${t("city_farm_effect")}
${t("plus_max_resource",[r,t("citizen")])}
`:t("city_farm_effect")},action(){return u($(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 r=1;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r},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(r){return r=r||0,(e.city.compost?e.city.compost.count:0)+r>=3?K("compost",r,50,1.32):0},Lumber(r){return K("compost",r,12,1.36)},Stone(r){return K("compost",r,12,1.36)}},effect(){let r=1.2+(e.tech.compost?e.tech.compost:0)*.8;r*=e.city.biome==="grassland"?qe.grassland.vars()[0]:1,r*=e.city.biome==="savanna"?qe.savanna.vars()[0]:1,r*=e.city.biome==="ashland"?qe.ashland.vars()[0]:1,r*=e.city.biome==="volcanic"?qe.volcanic.vars()[0]:1,r*=e.city.biome==="hellscape"?qe.hellscape.vars()[0]:1,r*=e.city.ptrait.includes("trashed")?Re.trashed.vars()[0]:1,r=+r.toFixed(2);let a=Qt(H(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",[r])}
${t("city_compost_heap_effect3",[a])}
${i}`},switchable(){return!0},action(){return u($(this)[0])?(e.city.compost.count++,e.city.compost.on++,e.resource.Food.max+=Qt(H(200)),!0):!1}},mill:{id:"city-mill",title(){return e.tech.agriculture>=5?t("city_mill_title2"):t("city_mill_title1")},desc(){let r=e.tech.agriculture>=5?5:3;if(e.tech.agriculture>=6){let a=$(this)[0].powered()*-1;return t("city_mill_desc2",[r,a])}else return t("city_mill_desc1",[r])},category:"utility",reqs:{agriculture:4},not_tech:["wind_plant"],not_trait:["cataclysm","lone_survivor"],cost:{Money(r){return K("mill",r,1e3,1.31)},Lumber(r){return K("mill",r,600,1.33)},Iron(r){return K("mill",r,150,1.33)},Cement(r){return K("mill",r,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 u($(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(r){return K("windmill",r,1e3,1.31)},Lumber(r){return K("windmill",r,600,1.33)},Iron(r){return K("windmill",r,150,1.33)},Cement(r){return K("windmill",r,125,1.33)}},effect(){let r=$(this)[0].powered()*-1;return`${t("space_dwarf_reactor_effect1",[r])}
`},action(){return u($(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(r){return K("silo",r,85,1.32)},Lumber(r){return K("silo",r,65,1.36)},Stone(r){return K("silo",r,50,1.36)},Iron(r){return(e.city.silo?e.city.silo.count:0)+(r||0)>=4&&e.city.ptrait.includes("unstable")?K("silo",r,10,1.36):0}},effect(){let r=Qt(H(500));return t("plus_max_resource",[r,t("resource_Food_name")])},action(){return u($(this)[0])?(e.city.silo.count++,e.resource.Food.max+=Qt(H(500)),!0):!1}},assembly:hr("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(r){return K("garrison",r,240,1.5)},Stone(r){return K("garrison",r,260,1.46)},Iron(r){return(e.city.garrison?e.city.garrison.count:0)+(r||0)>=4&&e.city.ptrait.includes("unstable")?K("garrison",r,50,1.4):0},Horseshoe(){return e.race.hooved?e.race.chameleon?1:2:0}},effect(){let r=e.tech.military>=5?N(3):N(2);return e.race.chameleon&&r--,t("plus_max_resource",[r,t("civics_garrison_soldiers")])},switchable(){return!0},action(){if(u($(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,D({el:"#garrison"},"update"),D({el:"#c_garrison"},"update"));let r=e.tech.military>=5?3:2;return e.race.chameleon&&(r-=e.city.garrison.count),e.civic.garrison.max+=N(r),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(r){return K("hospital",r,22e3,1.32)},Furs(r){return K("hospital",r,4e3,1.32)},Iron(r){return e.city.ptrait.includes("unstable")?K("hospital",r,500,1.32):0},Aluminium(r){return K("hospital",r,1e4,1.32)}},effect(){let r=e.tech.reproduction&&e.tech.reproduction>=2?`${t("city_hospital_effect2")}
`:"",a=e.tech.medic*5,i=`${t("city_hospital_effect",[a])}
${r}`;return!e.race.artifical&&e.race.hasOwnProperty("vax")&&(i=i+`${t("tau_home_disease_lab_vax",[+e.race.vax.toFixed(2)])}
`),i},action(){return u($(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",[F[e.race.species].name]):t("city_boot_camp_desc")},category:"military",reqs:{boot_camp:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(r){return K("boot_camp",r,5e4,1.32)},Lumber(r){return K("boot_camp",r,21500,1.32)},Iron(r){return e.city.ptrait.includes("unstable")?K("boot_camp",r,300,1.32):0},Aluminium(r){return K("boot_camp",r,12e3,1.32)},Brick(r){return K("boot_camp",r,1400,1.32)}},effect(){let r=e.tech.boot_camp>=2?8:5;e.blood.lust&&(r+=e.blood.lust*.2);let a=ge("militant",0);a&&(r*=1+a/100);let i=e.tech.spy&&e.tech.spy>=3?`${t("city_boot_camp_effect",[r])}
${t("city_boot_camp_effect2",[10])}
`:`${t("city_boot_camp_effect",[r])}
`;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")&&(desc=desc+`${t("tau_home_disease_lab_vax",[+e.race.vax.toFixed(2)])}
`),i},action(){return u($(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 r=e.tech.storage>=3?e.tech.storage>=4?t("city_shed_desc_size3"):t("city_shed_desc_size2"):t("city_shed_desc_size1");return t("city_shed_desc",[r])},category:"trade",reqs:{storage:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(r){return K("shed",r,75,1.22)},Lumber(r){return e.tech.storage&&e.tech.storage<4?K("shed",r,55,1.32):0},Stone(r){return e.tech.storage&&e.tech.storage<3?K("shed",r,45,1.32):0},Iron(r){return e.tech.storage&&e.tech.storage>=4?K("shed",r,22,1.32):0},Cement(r){return e.tech.storage&&e.tech.storage>=3?K("shed",r,18,1.32):0}},res(){let r=["Lumber","Stone","Chrysotile","Crystal","Furs","Copper","Iron","Aluminium","Cement","Coal"];return e.tech.storage>=3&&e.resource.Steel.display&&r.push("Steel"),e.tech.storage>=4&&e.resource.Titanium.display&&r.push("Titanium"),e.tech.shelving&&e.tech.shelving>=3&&e.resource.Graphene.display&&r.push("Graphene"),e.tech.shelving&&e.tech.shelving>=3&&e.resource.Stanene.display&&r.push("Stanene"),e.race.unfathomable&&r.push("Food"),r},val(r){switch(r){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(){let r='',a=ci();for(let i of $(this)[0].res())if(e.resource[i].display){let s=Ee(+(H($(this)[0].val(i))*a).toFixed(0),1);r=r+`${t("plus_max_resource",[s,e.resource[i].name])} `}return r=r+"
",r},wide:!0,action(){if(u($(this)[0])){e.city.shed.count++;let r=ci();for(let a of $(this)[0].res())e.resource[a].display&&(e.resource[a].max+=H($(this)[0].val(a)*r));return!0}return!1}},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(r){return K("storage_yard",r,10,Yi(1.36))},Brick(r){return K("storage_yard",r,3,Yi(1.35))},Wrought_Iron(r){return K("storage_yard",r,5,Yi(1.35))}},effect(){let r=e.tech.container>=3?20:10;return e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=1&&(r+=10),e.tech.world_control&&(r+=10),e.tech.particles&&e.tech.particles>=2&&(r*=2),e.tech.trade&&e.tech.trade>=3?`${t("plus_max_resource",[r,t("resource_Crates_name")])}
${t("city_trade_effect",[1])}
`:t("plus_max_resource",[r,t("resource_Crates_name")])},action(){if(u($(this)[0])){e.city.storage_yard.count++;let r=e.tech.container>=3?20:10;return e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=1&&(r+=10),e.tech.world_control&&(r+=10),e.tech.particles&&e.tech.particles>=2&&(r*=2),e.resource.Crates.max+=r,e.resource.Crates.display||ul(),!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(r){return K("warehouse",r,400,Yi(1.26))},Cement(r){return K("warehouse",r,75,Yi(1.26))},Sheet_Metal(r){return K("warehouse",r,25,Yi(1.25))}},effect(){let r=e.tech.steel_container>=2?20:10;return e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=2&&(r+=10),e.tech.world_control&&(r+=10),e.tech.particles&&e.tech.particles>=2&&(r*=2),t("plus_max_resource",[r,t("resource_Containers_name")])},action(){if(u($(this)[0])){e.city.warehouse.count++;let r=e.tech.steel_container>=2?20:10;return e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=2&&(r+=10),e.tech.world_control&&(r+=10),e.tech.particles&&e.tech.particles>=2&&(r*=2),e.resource.Containers.max+=r,e.resource.Containers.display||Yr(),!0}return!1}},bank:{id:"city-bank",title:t("city_bank"),desc(){let r=F[e.race.species].home;return t("city_bank_desc",[r])},category:"commercial",reqs:{banking:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(r){return K("bank",r,250,1.35)},Lumber(r){return K("bank",r,75,1.32)},Stone(r){return K("bank",r,100,1.35)},Iron(r){return(e.city.bank?e.city.bank.count:0)+(r||0)>=2&&e.city.ptrait.includes("unstable")?K("bank",r,30,1.3):0}},effect(){let r=Fr();return r=H(r),r=(+r.toFixed(0)).toLocaleString(),e.tech.banking>=2?`${t("plus_max_resource",[`$${r}`,t("resource_Money_name")])}
${t("plus_max_resource",[N(1),t("banker_name")])}
`:t("plus_max_resource",[`$${r}`,t("resource_Money_name")])},action(){return u($(this)[0])?(e.resource.Money.max+=H(1800),e.city.bank.count++,e.civic.banker.max=N(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(r){return r=r||0,(e.city.pylon?e.city.pylon.count:0)+r>=2?K("pylon",r,10,1.48):0},Stone(r){return K("pylon",r,12,1.42)},Crystal(r){return K("pylon",r,8,1.42)-3}},effect(){let r=H(5),a=+(.01*ft("magic")).toFixed(3);return`${t("gain",[a,e.resource.Mana.name])}
${t("plus_max_resource",[r,e.resource.Mana.name])}
`},special(){return!!(e.tech.magic&&e.tech.magic>=3)},action(){return u($(this)[0])?(e.city.pylon.count++,e.resource.Mana.max+=H(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(r){return K("conceal_ward",r,500,1.25)},Mana(r){return K("conceal_ward",r,Uu(42),1.25)},Crystal(r){return K("conceal_ward",r,5,1.25)}},effect(){let r=e.tech.roguemagic&&e.tech.roguemagic>=8?1.25:1;return`${t("city_conceal_ward_effect",[r])}
`},action(){return u($(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(r){return r=r||0,(e.city.graveyard?e.city.graveyard.count:0)+r>=5?K("graveyard",r,5,1.85):0},Lumber(r){return K("graveyard",r,2,1.95)},Stone(r){return K("graveyard",r,6,1.9)}},effect(){let r=Qt(H(100));return`${t("city_graveyard_effect",[8])}
${t("plus_max_resource",[r,e.resource.Lumber.name])}
`},action(){return u($(this)[0])?(e.city.graveyard.count++,e.resource.Lumber.max+=Qt(H(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(r){return r=r||0,(e.city.lumber_yard?e.city.lumber_yard.count:0)+r>=5?K("lumber_yard",r,5,1.85):0},Lumber(r){return K("lumber_yard",r,6,1.9)},Stone(r){return K("lumber_yard",r,2,1.95)}},effect(){let r=Qt(H(100));return`${t("city_lumber_yard_effect",[2])}
${t("plus_max_resource",[r,e.resource.Lumber.name])}
`},action(){return u($(this)[0])?(e.city.lumber_yard.count++,e.civic.lumberjack.display=!0,e.resource.Lumber.max+=Qt(H(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(r){return K("sawmill",r,3e3,1.26)},Iron(r){return K("sawmill",r,400,1.26)},Cement(r){return K("sawmill",r,420,1.26)}},effect(){let r=e.tech.saw>=2?8:5,a=Qt(H(200)),i=`${t("plus_max_resource",[a,e.resource.Lumber.name])}
${t("city_lumber_yard_effect",[r])}
`;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 _e(1)},powerBalancer(){return e.city.sawmill.hasOwnProperty("psaw")?[{r:"Lumber",k:"psaw"}]:!1},action(){return u($(this)[0])?(e.city.sawmill.count++,e.resource.Lumber.max+=Qt(H(200)),re($(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(r){return r=r||0,(e.city.rock_quarry?e.city.rock_quarry.count:0)+r>=2?K("rock_quarry",r,20,1.45):0},Lumber(r){return K("rock_quarry",r,50,1.36)},Stone(r){return K("rock_quarry",r,10,1.36)}},effect(){let r=Qt(H(100)),a=e.race.smoldering?`${t("plus_max_resource",[r,e.resource.Chrysotile.name])}
`:"";return e.tech.mine_conveyor?`${t("city_rock_quarry_effect1",[2])}
${t("plus_max_resource",[r,e.resource.Stone.name])}
${a}${t("city_rock_quarry_effect2",[4,$(this)[0].powered()])}
`:`${t("city_rock_quarry_effect1",[2])}
${t("plus_max_resource",[r,e.resource.Stone.name])}
${a}`},special(){return!!e.race.smoldering},powered(){return _e(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(u($(this)[0])){e.city.rock_quarry.count++,e.civic.quarry_worker.display=!0;let r=Qt(H(100));return e.resource.Stone.max+=r,e.race.smoldering&&e.resource.Chrysotile.display&&(e.settings.showCivic=!0,e.settings.showIndustry=!0,e.resource.Chrysotile.max+=r),e.tech.mine_conveyor&&re($(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(r){return K("cement_plant",r,3e3,1.5)},Lumber(r){return K("cement_plant",r,1800,1.36)},Stone(r){return K("cement_plant",r,2e3,1.32)},Iron(r){return e.city.ptrait.includes("unstable")?K("cement_plant",r,275,1.32):0}},effect(){if(e.tech.cement>=5){let r=e.tech.cement>=6?8:5;return`${t("city_cement_plant_effect1",[N(2)])}
${t("city_cement_plant_effect2",[$(this)[0].powered(),r])}
`}else return t("city_cement_plant_effect1",[N(2)])},powered(){return _e(2)},powerBalancer(){return e.city.cement_plant.hasOwnProperty("cnvay")?[{r:"Cement",k:"cnvay"}]:!1},power_reqs:{cement:5},action(){return u($(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*N(2),e.tech.cement&&e.tech.cement>=5&&re($(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(r){return K("foundry",r,750,1.36)},Stone(r){return K("foundry",r,100,1.36)},Copper(r){return K("foundry",r,250,1.36)},Iron(r){return e.city.ptrait.includes("unstable")?K("foundry",r,40,1.36):0}},effect(){let r=`${t("city_foundry_effect1",[N(1)])}
`;if(e.tech.foundry>=2){let a=e.tech.foundry>=5?e.tech.foundry>=8?8:5:3;r=r+`${t("city_crafted_mats",[a])}
`}return e.tech.foundry>=6&&(r=r+`${t("city_foundry_effect2",[2])}
`),r},action(){return u($(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+=N(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),Lt(),!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(r){return K("factory",r,25e3,pt(1.32))},Cement(r){return K("factory",r,1e3,pt(1.32))},Steel(r){return K("factory",r,7500,pt(1.32))},Titanium(r){return K("factory",r,2500,pt(1.32))}},effect(){let r=`${t("city_factory_effect")}
${t("minus_power",[$(this)[0].powered()])}
`;return e.tech.foundry>=7&&(r=r+`${t("city_crafted_mats",[5])}
`),r},powered(){return _e(3)},special:!0,action(){return u($(this)[0])?(e.city.factory.count++,e.resource.Alloy.display=!0,e.tech.polymer&&(e.resource.Polymer.display=!0),re($(this)[0])&&e.city.factory.Alloy++,e.settings.showIndustry=!0,rt(),!0):!1}},nanite_factory:hr("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(r){return K("smelter",r,1e3,pt(1.32))},Iron(r){return K("smelter",r,500,pt(1.33))}},effect(){var r=e.tech.smelting>=3?e.tech.smelting>=7?15:12:10;return e.race.pyrophobia&&(r*=.9),e.tech.smelting>=2&&!e.race.steelen?t("city_smelter_effect2",[r]):t("city_smelter_effect1",[r])},special:!0,action(){return u($(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,rt(),!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(r){return K("metal_refinery",r,2500,1.35)},Iron(r){return e.city.ptrait.includes("unstable")?K("metal_refinery",r,125,1.35):0},Steel(r){return K("metal_refinery",r,350,1.35)}},powered(){return _e(2)},powerBalancer(){return e.city.metal_refinery.hasOwnProperty("pwr")?[{r:"Aluminium",k:"cnvay"}]:!1},power_reqs:{alumina:2},effect(){let r=e.race.sappy?"city_metal_refinery_effect_alt":"city_metal_refinery_effect";return e.tech.alumina>=2?`${t(r,[6])} ${t("city_metal_refinery_effect2",[6,12,$(this)[0].powered()])} `:t(r,[6])},action(){return u($(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,Lt()),e.tech.alumina>=2&&re($(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(r){return K("mine",r,60,pt(1.6))},Lumber(r){return K("mine",r,175,pt(1.38))}},effect(){return e.tech.mine_conveyor?`${t("city_mine_effect1",[N(1)])}
${t("city_mine_effect2",[$(this)[0].powered(),5])}
`:t("city_mine_effect1",[N(1)])},powered(){return _e(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 u($(this)[0])?(e.city.mine.count++,e.resource.Copper.display=!0,e.civic.miner.display=!0,e.civic.miner.max=N(e.city.mine.count),e.tech.mine_conveyor&&re($(this)[0]),!0):!1},flair(){return F[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(r){return K("coal_mine",r,480,pt(1.4))},Lumber(r){return K("coal_mine",r,250,pt(1.36))},Iron(r){return e.city.ptrait.includes("unstable")?K("coal_mine",r,28,pt(1.36)):0},Wrought_Iron(r){return K("coal_mine",r,18,pt(1.36))}},effect(){return e.tech.mine_conveyor?`${t("city_coal_mine_effect1",[N(1)])}
${t("city_coal_mine_effect2",[$(this)[0].powered(),5])}
`:t("city_coal_mine_effect1",[N(1)])},powered(){return _e(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 u($(this)[0])?(e.city.coal_mine.count++,e.resource.Coal.display=!0,e.civic.coal_miner.display=!0,e.civic.coal_miner.max=N(e.city.coal_mine.count),e.tech.mine_conveyor&&re($(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(r){return K("oil_well",r,5e3,pt(1.5))},Iron(r){return e.city.ptrait.includes("unstable")?K("oil_well",r,450,pt(1.5)):0},Cement(r){return K("oil_well",r,5250,pt(1.5))},Steel(r){return K("oil_well",r,6e3,pt(1.5))}},effect(){let r=+T("oil_well").toFixed(2),a=H(500);return t("city_oil_well_effect",[r,a])},action(){return u($(this)[0])?(e.city.oil_well.count++,e.resource.Oil.max+=H(500),e.city.oil_well.count===1&&(e.resource.Oil.display=!0,rt()),!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(r){return K("oil_depot",r,2500,pt(1.46))},Iron(r){return e.city.ptrait.includes("unstable")?K("oil_depot",r,325,pt(1.36)):0},Cement(r){return K("oil_depot",r,3750,pt(1.46))},Sheet_Metal(r){return K("oil_depot",r,100,pt(1.45))}},effect(){let r=H(1e3);r*=e.tech.world_control?1.5:1;let a=`${t("plus_max_resource",[r,e.resource.Oil.name])}.
`;if(e.resource.Helium_3.display){let i=H(400);i*=e.tech.world_control?1.5:1,a=a+`${t("plus_max_resource",[i,e.resource.Helium_3.name])}.
`}if(e.tech.uranium>=2){let i=H(250);i*=e.tech.world_control?1.5:1,a=a+`${t("plus_max_resource",[i,e.resource.Uranium.name])}.
`}return a},action(){return u($(this)[0])?(e.city.oil_depot.count++,e.resource.Oil.max+=H(1e3)*(e.tech.world_control?1.5:1),e.resource.Helium_3.display&&(e.resource.Helium_3.max+=H(400)*(e.tech.world_control?1.5:1)),e.tech.uranium>=2&&(e.resource.Uranium.max+=H(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(r){return K("trade",r,500,1.36)},Lumber(r){return K("trade",r,125,1.36)},Stone(r){return K("trade",r,50,1.36)},Iron(r){return e.city.ptrait.includes("unstable")?K("trade",r,15,1.36):0},Furs(r){return K("trade",r,65,1.36)}},effect(){let r=e.race.xenophobic||e.race.nomadic?e.tech.trade:e.tech.trade+1;return e.tech.trade&&e.tech.trade>=3&&r--,e.race.flier&&(r+=b.flier.vars()[1]),t("city_trade_effect",[r])},action(){if(u($(this)[0])){e.city.trade.count++;let r=e.race.xenophobic||e.race.nomadic?e.tech.trade:e.tech.trade+1;return e.tech.trade&&e.tech.trade>=3&&r--,e.city.market.mtrade+=r,!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(r){return K("wharf",r,62e3,1.32)},Lumber(r){return K("wharf",r,44e3,1.32)},Iron(r){return e.city.ptrait.includes("unstable")?K("wharf",r,200,1.32):0},Cement(r){return K("wharf",r,3e3,1.32)},Oil(r){return K("wharf",r,750,1.32)}},effect(){let r=e.tech.world_control?15:10;return e.tech.particles&&e.tech.particles>=2&&(r*=2),`${t("city_trade_effect",[2])}
${t("city_wharf_effect")}
${t("plus_max_crates",[r])}
${t("plus_max_containers",[r])}
`},action(){if(u($(this)[0])){e.city.wharf.count++,e.city.market.mtrade+=2;let r=e.tech.world_control?15:10;return e.tech.particles&&e.tech.particles>=2&&(r*=2),e.resource.Crates.max+=r,e.resource.Containers.max+=r,e.resource.Containers.display||Yr(),!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(r){return K("tourist_center",r,1e5,1.36)},Stone(r){return K("tourist_center",r,25e3,1.36)},Iron(r){return e.city.ptrait.includes("unstable")?K("tourist_center",r,1e3,1.36):0},Furs(r){return K("tourist_center",r,7500,1.36)},Plywood(r){return K("tourist_center",r,5e3,1.36)}},effect(){let r=e.tech.monument&&e.tech.monument>=3&&k.s_gate?3:1,a=(e.civic.govern.type==="corpocracy"?2:1)*r,i=(e.civic.govern.type==="corpocracy"?10:5)*r,s=(e.civic.govern.type==="corpocracy"?4:2)*r,n="";e.stats.achieve.banana&&e.stats.achieve.banana.l>=4&&(n=`${t("city_tourist_center_effect5",[(e.civic.govern.type==="corpocracy"?6:3)*r])}
`);let c="",l=ge("pious",1);return l&&(c=`${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",[a,O.city.amphitheatre.title()])}
${t("city_tourist_center_effect3",[i])}
${t("city_tourist_center_effect4",[s])}
${n}${c}`},powered(){return 0},action(){return u($(this)[0])?(e.city.tourist_center.count++,e.city.tourist_center.on++,!0):!1}},amphitheatre:{id:"city-amphitheatre",title(){return ge("athleticism",0)?t("city_stadium"):t("city_amphitheatre")},desc(){return ge("athleticism",0)?t("city_stadium"):t("city_amphitheatre_desc")},category:"commercial",reqs:{theatre:1},not_trait:["joyless","cataclysm"],cost:{Money(r){return K("amphitheatre",r,500,1.55)},Lumber(r){return K("amphitheatre",r,50,1.75)},Stone(r){return K("amphitheatre",r,200,1.75)},Iron(r){return e.city.ptrait.includes("unstable")?K("amphitheatre",r,18,1.36):0}},effect(){let r=ge("athleticism",0),a=ge("athleticism",1);return`${t("city_max_entertainer",[N(a||1)])}
${t("city_max_morale",[r||1])}
`},action(){if(u($(this)[0])){e.city.amphitheatre.count++;let r=ge("athleticism",1);return e.civic.entertainer.max+=N(r||1),e.civic.entertainer.display=!0,!0}return!1},flair(){return ge("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(r){return K("casino",r,35e4,1.35)},Iron(r){return e.city.ptrait.includes("unstable")?K("casino",r,2e3,1.35):0},Furs(r){return K("casino",r,6e4,1.35)},Plywood(r){return K("casino",r,1e4,1.35)},Brick(r){return K("casino",r,6e3,1.35)}},effect(){let r=ms();return r=r+`${t("minus_power",[$(this)[0].powered()])}
`,r},powered(){return _e(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=2?2:3)},action(){return u($(this)[0])?(e.city.casino.count++,e.race.joyless||(e.civic.entertainer.max+=N(1),e.civic.entertainer.display=!0),re($(this)[0]),!0):!1},flair:t("city_casino_flair")},temple:{id:"city-temple",title:t("city_temple"),desc(){let r=e.race.gods!=="none"?F[e.race.gods.toLowerCase()].entity:F[e.race.species].entity;return t("city_temple_desc",[r])},category:"commercial",reqs:{theology:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(r){return K("temple",r,50,1.36)},Lumber(r){return K("temple",r,25,1.36)},Iron(r){return e.city.ptrait.includes("unstable")?K("temple",r,6,1.36):0},Furs(r){return K("temple",r,15,1.36)},Cement(r){return K("temple",r,10,1.36)}},effect(){let r=cc();return e.genes.ancients&&e.genes.ancients>=2&&(r=r+`${t("city_temple_effect6",[N(1)])}
`),r},action(){return u($(this)[0])?(e.genes.ancients&&e.genes.ancients>=2&&(e.civic.priest.display=!0,e.civic.priest.max+=N(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(r){return K("shrine",r,75,1.32)},Stone(r){return K("shrine",r,65,1.32)},Furs(r){return K("shrine",r,10,1.32)},Copper(r){return K("shrine",r,15,1.32)}},effect(){let r=`${t("city_shrine_effect")}
`;if(e.city.shrine&&e.city.shrine.morale>0){let a=ka("morale");r=r+`${t("city_shrine_morale",[+a.add.toFixed(1)])}
`}if(e.city.shrine&&e.city.shrine.metal>0){let a=ka("metal");r=r+`${t("city_shrine_metal",[+((a.mult-1)*100).toFixed(1)])}
`}if(e.city.shrine&&e.city.shrine.know>0){let a=ka("know");r=r+`${t("city_shrine_know",[(+a.add.toFixed(1)).toLocaleString()])}
`,r=r+`${t("city_shrine_know2",[+((a.mult-1)*100).toFixed(1)])}
`}if(e.city.shrine&&e.city.shrine.tax>0){let a=ka("tax");r=r+`${t("city_shrine_tax",[+((a.mult-1)*100).toFixed(1)])}
`}return r},action(){if(u($(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(J(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(r){return K("meditation",r,50,1.2)},Stone(r){return K("meditation",r,25,1.2)},Furs(r){return K("meditation",r,8,1.2)}},effect(){let r=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",[`${(r*100).toFixed(2)}%`])}
`},action(){return u($(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(){return!e.stats.achieve.endless_hunger||e.city.banquet.count>=e.stats.achieve.endless_hunger.l?0:e.city.banquet.count===0?45e3:e.city.banquet.count===1?18e4:e.city.banquet.count===2?24e5:e.city.banquet.count===3?3e7:14e7},Food(){return(!e.stats.achieve.endless_hunger||e.city.banquet.count>=e.stats.achieve.endless_hunger.l?0:e.city.banquet.count===0?4e4:e.city.banquet.count===1?124e3:e.city.banquet.count===2?3e5:e.city.banquet.count===3?72e4:12e5)/(e.race.artifical?4:1)},Brick(){return!e.stats.achieve.endless_hunger||e.city.banquet.count>=e.stats.achieve.endless_hunger.l?0:e.city.banquet.count===0?1600:e.city.banquet.count===1?18e3:e.city.banquet.count===2?75e3:0},Wrought_Iron(){return!e.stats.achieve.endless_hunger||e.city.banquet.count>=e.stats.achieve.endless_hunger.l?0:e.city.banquet.count===1?26e3:e.city.banquet.count===2?88e3:e.city.banquet.count===3?144e3:e.city.banquet.count===4?24e4:0},Iridium(){return!e.stats.achieve.endless_hunger||e.city.banquet.count>=e.stats.achieve.endless_hunger.l?0:e.city.banquet.count===2?5e4:e.city.banquet.count===3?27e4:e.city.banquet.count===4?7e5:0},Aerogel(){return!e.stats.achieve.endless_hunger||e.race.truepath||e.city.banquet.count>=e.stats.achieve.endless_hunger.l?0:e.city.banquet.count===3?4e4:e.city.banquet.count===4?15e4:0},Quantium(){return!e.stats.achieve.endless_hunger||!e.race.truepath||e.city.banquet.count>=e.stats.achieve.endless_hunger.l?0:e.city.banquet.count===3?4e4:e.city.banquet.count===4?15e4:0},Bolognium(){return!e.stats.achieve.endless_hunger&&e.city.banquet.count>=e.stats.achieve.endless_hunger.l?0:e.city.banquet.count===4?15e4:0}},effect(){let r=`Strength: ${e.city.banquet.strength}
`;return r+=`${t("city_banquet_effect1",[Ee(((e.city.banquet.count>=5?1.02:1.022)**e.city.banquet.strength-1)*100)])}
`,e.city.banquet.count>=1&&(r+=`${t("city_banquet_effect2",[(e.city.banquet.strength**.75).toFixed(2)])}
`),e.city.banquet.count>=2&&(r+=`${t("city_banquet_effect3",[(e.city.banquet.strength**.65).toFixed(2)])}
`),e.city.banquet.count>=3&&(r+=`${t("city_banquet_effect4",[(e.city.banquet.strength**.65).toFixed(2)])}
`),e.city.banquet.count>=4&&(r+=`${t("city_banquet_effect5",[(e.city.banquet.strength**.75).toFixed(2)])}
`),r},powered(){return 0},action(){return e.city.banquet.count=3&&e.city.ptrait.includes("unstable")?K("university",r,25,1.36):0}},effect(){let r=+$(this)[0].knowVal().toFixed(0);return`${t("city_university_effect",[N(1)])}
${t("city_max_knowledge",[r.toLocaleString()])}
`},knowVal(){let r=1,a=e.tech.science&&e.tech.science>=8?700:500;e.city.ptrait.includes("permafrost")&&(a+=Re.permafrost.vars()[1]),e.tech.science>=4&&(r+=e.city.library.count*.02),e.space.observatory&&e.space.observatory.count>0&&(r+=U.observatory*.05),e.portal.sensor_drone&&e.tech.science>=14&&(r+=k.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 i=ve("cath");if(i>0&&(r*=1+b.curious.vars(3)[0]*i),k.s_gate&&we.scavenger){let l=kt("gxy_alien2"),o=we.scavenger*l/4;r*=1+o}let s=ge("teacher",0);s&&(r*=1+s/100);let n=ge("athleticism",2);if(n&&(r*=1-n/100),Va()){let l=ka("know");r*=l.mult}let c=a*r;if(e.tech.supercollider){let l=e.tech.tp_particles||e.tech.particles&&e.tech.particles>=3?12.5:25;c*=e.tech.supercollider/l+1}return e.race.orbit_decayed&&(e.space.satellite&&(c*=1+e.space.satellite.count*.12),e.tech.biotech&&e.tech.biotech>=1&&(c*=2)),c},action(){if(u($(this)[0])){let r=e.tech.science&&e.tech.science>=8?700:500;if(e.tech.science>=4&&(r*=1+e.city.library.count*.02),e.tech.supercollider){let a=e.tech.particles&&e.tech.particles>=3?12.5:25;r*=e.tech.supercollider/a+1}return e.resource.Knowledge.max+=r,e.city.university.count++,e.civic.professor.display=!0,e.civic.professor.max=N(e.city.university.count),!0}return!1}},library:{id:"city-library",title:t("city_library"),desc(){let r=F[e.race.species].home;return t("city_library_desc",[r])},category:"science",reqs:{science:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(r){return K("library",r,45,1.2)},Crystal(r){return e.race.universe==="magic"?K("library",r,2,1.2):0},Iron(r){return e.city.ptrait.includes("unstable")?K("library",r,4,1.2):0},Furs(r){return K("library",r,22,1.2)},Plywood(r){return K("library",r,20,1.2)},Brick(r){return K("library",r,15,1.2)}},effect(){let r=125;e.race.nearsighted&&(r*=1-b.nearsighted.vars()[0]/100),e.race.studious&&(r*=1+b.studious.vars()[1]/100);let a=ve("elven");if(a>0&&(r*=1+b.studious.vars(1)[1]/100*a),e.tech.science&&e.tech.science>=8&&(r*=1.4),e.tech.anthropology&&e.tech.anthropology>=2&&(r*=1+e.city.temple.count*.05),e.tech.science&&e.tech.science>=5){let o=ye(e.civic.scientist.workers,"scientist");e.race.high_pop&&(o=xe(o)),r*=1+o*.12}let i=ge("teacher",0);i&&(r*=1+i/100);let s=ge("athleticism",2);s&&(r*=1-s/100);let n=ge("muckraker",1);n&&(r*=1+n/100),r=+r.toFixed(0);let c=ge("muckraker",2),l=c?5-c:5;return e.race.autoignition&&(l-=b.autoignition.vars()[0],l<0&&(l=0)),`${t("city_max_knowledge",[r.toLocaleString()])}
${t("city_library_effect",[l])}
`},action(){if(u($(this)[0])){let r=125;return e.race.nearsighted&&(r*=1-b.nearsighted.vars()[0]/100),e.tech.science&&e.tech.science>=8&&(r*=1.4),e.tech.anthropology&&e.tech.anthropology>=2&&(r*=1+e.city.temple.count*.05),e.tech.science&&e.tech.science>=5&&(r*=1+ye(e.civic.scientist.workers,"scientist")*.12),r=+r.toFixed(1),e.resource.Knowledge.max+=r,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 dr()},desc:t("city_wardenclyffe_desc"),category:"science",reqs:{high_tech:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(r){return K("wardenclyffe",r,5e3,1.22)},Knowledge(r){return K("wardenclyffe",r,e.race.logical?1e3-b.logical.vars()[0]:1e3,1.22)},Crystal(r){return e.race.universe==="magic"?K("wardenclyffe",r,100,1.22):0},Copper(r){return K("wardenclyffe",r,500,1.22)},Iron(r){return e.city.ptrait.includes("unstable")?K("wardenclyffe",r,75,1.22):0},Cement(r){return K("wardenclyffe",r,350,1.22)},Sheet_Metal(r){return K("wardenclyffe",r,125,1.2)},Nanite(r){return e.race.deconstructor?K("wardenclyffe",r,50,1.18):0}},effect(){let r=1e3;if(e.city.ptrait.includes("magnetic")&&(r+=Re.magnetic.vars()[1]),e.tech.supercollider){let s=e.tech.particles&&e.tech.particles>=3?12.5:25;r*=e.tech.supercollider/s+1}e.space.satellite&&(r*=1+e.space.satellite.count*.04);let a=ge("athleticism",2);a&&(r*=1-a/100),r=+r.toFixed(0);let i=`${t("city_wardenclyffe_effect1",[N(1),e.civic.scientist?e.civic.scientist.name:t("job_scientist")])}
${t("city_max_knowledge",[r.toLocaleString()])}
`;if(e.city.powered){let s=e.tech.science>=7?2500:2e3;if(e.city.ptrait.includes("magnetic")&&(s+=Re.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=ge("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=H(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",[H(250)])}
=7?2500:2e3),e.tech.supercollider){let a=e.tech.particles&&e.tech.particles>=3?12.5:25;r*=e.tech.supercollider/a+1}return e.resource.Knowledge.max+=r,!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(r){return K("biolab",r,25e3,1.3)},Knowledge(r){return K("biolab",r,5e3,1.3)},Copper(r){return K("biolab",r,1250,1.3)},Iron(r){return e.city.ptrait.includes("unstable")?K("biolab",r,160,1.3):0},Alloy(r){return K("biolab",r,350,1.3)}},effect(){let r=3e3;return e.portal.sensor_drone&&e.tech.science>=14&&(r*=1+k.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 _e(2)},action(){return u($(this)[0])?(e.city.biolab.count++,re($(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(r){return K("coal_power",r,1e4,pt(1.22))},Crystal(r){return e.race.universe==="magic"?K("coal_power",r,125,pt(1.22)):0},Copper(r){return K("coal_power",r,1800,pt(1.22))-1e3},Iron(r){return e.city.ptrait.includes("unstable")?K("coal_power",r,175,pt(1.22)):0},Cement(r){return K("coal_power",r,600,pt(1.22))},Steel(r){return K("coal_power",r,2e3,pt(1.22))-1e3}},effect(){let r=e.race.universe==="magic"?.05:.35,a=-$(this)[0].powered();return e.race.environmentalist?`+${a}MW`:`+${a}MW. ${t(e.race.universe==="magic"?"city_mana_engine_effect":"city_coal_power_effect",[r])} `},powered(){let r=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,a=ge("dirty_jobs",1);return a&&(r-=a),dt(r)},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 u($(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(r){return K("oil_power",r,5e4,pt(1.22))},Copper(r){return K("oil_power",r,6500,pt(1.22))+1e3},Iron(r){return e.city.ptrait.includes("unstable")?K("oil_power",r,180,pt(1.22)):0},Aluminium(r){return K("oil_power",r,12e3,pt(1.22))},Cement(r){return K("oil_power",r,5600,pt(1.22))+1e3}},effect(){let r=.65,a=-$(this)[0].powered();return e.race.environmentalist?`+${a}MW`:`+${a}MW. ${t("city_oil_power_effect",[r])} `},powered(){let r=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;r=e.stats.achieve.dissipated.l>=5?i-2:i-1}else r=e.city.calendar.wind===1?-7:-5;else e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=3?r=e.stats.achieve.dissipated.l>=5?-8:-7:r=-6;let a=ge("dirty_jobs",1);return a&&(r-=a),dt(r)},p_fuel(){return{r:"Oil",a:e.race.environmentalist?0:.65}},action(){return u($(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(r){return K("fission_power",r,25e4,1.36)},Copper(r){return K("fission_power",r,13500,1.36)},Iron(r){return e.city.ptrait.includes("unstable")?K("fission_power",r,1750,1.36):0},Cement(r){return K("fission_power",r,10800,1.36)},Titanium(r){return K("fission_power",r,7500,1.36)}},effect(){let r=.1;return`+${-$(this)[0].powered()}MW. ${t("city_fission_power_effect",[r])} `},powered(){return dt(e.tech.uranium>=4?-18:-14)},p_fuel(){return{r:"Uranium",a:.1}},action(){return u($(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(r){return K("mass_driver",r,375e3,1.32)},Copper(r){return K("mass_driver",r,33e3,1.32)},Iron(r){return K("mass_driver",r,42500,1.32)},Iridium(r){return K("mass_driver",r,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,tt("name")])} ${t("minus_power",[$(this)[0].powered()])} `},powered(){let r=e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=4?4:5;return _e(e.tech.mass>=2?r-1:r)},action(){return u($(this)[0])?(e.city.mass_driver.count++,re($(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:pl(),arpa:Ue("PhysicsTech"),genes:Ue("GeneTech"),blood:Ue("BloodTech"),space:Hi(),interstellar:Ko(),galaxy:No(),starDock:{probes:{id:"starDock-probes",title:t("star_dock_probe"),desc(){return`${t("star_dock_probe_desc")}
`},reqs:{genesis:4},cost:{Money(r){return K("probes",r,35e4,e.race.truepath?1.125:1.25,"starDock")},Alloy(r){return K("probes",r,75e3,e.race.truepath?1.125:1.25,"starDock")},Polymer(r){return K("probes",r,85e3,e.race.truepath?1.125:1.25,"starDock")},Iridium(r){return K("probes",r,12e3,e.race.truepath?1.125:1.25,"starDock")},Mythril(r){return K("probes",r,3500,e.race.truepath?1.125:1.25,"starDock")}},effect(){return`${t("star_dock_probe_effect")}
`},action(){return u($(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(r){return K("geck",r,1e6,1.25,"starDock")},Elerium(r){return K("geck",r,1e3,1.25,"starDock")},Plasmid(r){return K("geck",r,25,1.4,"starDock")}},effect(){return`${t("star_dock_geck_effect")}
`},action(){return u($(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 r=e.race.cataclysm?t("star_dock_exodus"):t("star_dock_seeder");return e.starDock.seeder&&e.starDock.seeder.count>=100?`${r}
${t("star_dock_seeder_desc2")}
`:`${r}
${t("star_dock_seeder_desc1")}
`},reqs:{genesis:5},queue_size:10,queue_complete(){return 100-e.starDock.seeder.count},cost:{Money(r){return(r||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?1e5:0},Steel(r){return(r||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?25e3:0},Neutronium(r){return(r||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?240:0},Elerium(r){return(r||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?10:0},Nano_Tube(r){return(r||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?12e3:0}},effect(r){let a=(r||0)+(e.starDock.seeder?e.starDock.seeder.count:0),i=a<100?t("star_dock_seeder_status1",[100-a]):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&&u($(this)[0])){if(e.starDock.seeder.count++,e.starDock.seeder.count>=100){e.tech.genesis=6,Ie("starDock-seeder"),le($("#modalBox"));let r=O.space.spc_gas.star_dock;yc(r,"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(r,a){return+Fe(e.race.gravity_well?15e4:75e3,!1,a).toFixed(0)}},effect(){let r=ot("bioseed"),a=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",[r.plasmid,a])}
${t("star_dock_genesis_effect3",[r.phage])}
`},action(){if(u($(this)[0])){e.tech.genesis=7,Ie("starDock-prep_ship"),le($("#modalBox"));let r=O.space.spc_gas.star_dock;return yc(r,"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 r=ot("bioseed"),a=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",[r.plasmid,a])}
${t("star_dock_genesis_effect3",[r.phage])}
`},action(){return Xc(),!1}}},portal:an(),tauceti:Po()};function hn(){let r=$("#evolution .evolving").nextAll();Object.values(r).forEach(function(a){le($(a),!0)}),le($("#evolution .evolving"),!0),e.evolution.bunker={count:1},Ra(O.evolution.bunker.id),vl(),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}),Wu(),e.race.truepath||e.race.lone_survivor?vt("evolution","nerfed"):e.race.universe==="antimatter"?vt("evolution","mastery"):vt("evolution","plasmid"),vt("evolution","trade"),vt("evolution","craft"),e.race.truepath||e.race.lone_survivor?vt("evolution","badgenes"):vt("evolution","crispr"),Qu(),vt("evolution","joyless"),vt("evolution","steelen"),(e.stats.achieve.whitehole||e.sim)&&vt("evolution","decay"),(e.stats.achieve.ascended||e.sim)&&vt("evolution","emfield"),(e.stats.achieve.scrooge||e.sim)&&vt("evolution","inflation"),((e.stats.achieve.ascended||e.stats.achieve.corrupted)&&e.stats.achieve.extinct_junker||e.sim)&&vt("evolution","sludge"),(e.stats.achieve.whitehole||e.stats.achieve.ascended||e.sim)&&vt("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)&&vt("evolution","gravity_well"),e.race.universe==="magic"&&(e.stats.achieve.ascended&&e.stats.achieve.ascended.mg||e.sim)&&vt("evolution","witch_hunter"),e.race.universe==="evil"&&(e.stats.achieve.corrupted&&e.stats.achieve.corrupted.e||e.sim),e.hasOwnProperty("beta")&&!e.sim&&vt("evolution","simulation"),Vu(),vt("evolution","junker"),(e.stats.achieve.shaken||e.sim)&&vt("evolution","cataclysm"),(e.stats.achieve.whitehole||e.stats.achieve.ascended||e.sim)&&vt("evolution","banana"),(e.stats.achieve.ascended||e.stats.achieve.corrupted||e.sim)&&vt("evolution","truepath"),(e.stats.achieve.retired||e.sim)&&vt("evolution","lone_survivor"),(e.stats.achieve.corrupted||e.sim)&&vt("evolution","fasting"),e.sim?Zu():e.race.simulation&&Ju()}function hr(r,a){let i=e.race.orbit_decay?"orbit_decayed":"cataclysm",s=function(n,c,l){return l==="space"?n.hasOwnProperty("trait")?n.trait.push(c):n.trait=[c]:l==="tauceti"?n.reqs.isolation=1:n.hasOwnProperty("not_trait")?n.not_trait.push(c):n.not_trait=[c],n};switch(r){case"bonfire":{let n={id:`${a}-bonfire`,title:t("city_bonfire"),desc:t("city_bonfire_desc"),category:"outskirts",wiki:!1,reqs:{primitive:3},condition(){return Ve("summer")},queue_complete(){return 0},effect(){let c=e.resource.Thermite.diff*2.5/(e.resource.Thermite.diff*2.5+500)*500,l=1e5+e.stats.reset*9e3;l>1e6&&(l=1e6);let o=e.resource.Thermite.amount${t("city_bonfire_effect3",[l.toLocaleString()])}${t("city_bonfire_effect4",[(+e.resource.Thermite.amount.toFixed(0)).toLocaleString(),l.toLocaleString()])}
`:"";return`${t("city_bonfire_effect",[e.resource.Thermite.diff])}
${t("city_bonfire_effect2",[+c.toFixed(1)])}
${o}`},action(){return!1},flair(){return t("city_bonfire_flair")}};return s(n,i,a)}case"firework":{let n={id:`${a}-firework`,title:t("city_firework"),desc:t("city_firework"),category:"outskirts",wiki:!1,reqs:{mining:3},condition(){return Ve("firework")&&e[a].firework&&(e.tech.cement||e.race.flier)},cost:{Money(){return e[a].firework.count===0?5e4:0},Iron(){return e[a].firework.count===0?7500:0},Cement(){return e[a].firework.count===0?1e4:0}},queue_complete(){return 1-e[a].firework.count},switchable(){return!0},effect(){return e[a].firework.count===0?t("city_firework_build"):t("city_firework_effect")},action(){return e[a].firework.count===0&&u($(this)[0])?(e[a].firework.count=1,!0):!1}};return s(n,i,a)}case"assembly":{let n=function(l){let o=xe(l);return e.race.promiscuous&&(o/=1+b.promiscuous.vars()[1]*e.race.promiscuous),Math.round(o)},c={id:`${a}-assembly`,title:t("city_assembly"),desc(){return t("city_assembly_desc",[F[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(l){return e.resource[e.race.species].amount?K("citizen",l,n(125),1.01):0},Copper(l){return e.race.deconstructor?0:e.resource[e.race.species].amount>=5?K("citizen",l,n(50),1.01):0},Aluminium(l){return e.race.deconstructor?0:e.resource[e.race.species].amount>=5?K("citizen",l,n(50),1.01):0},Nanite(l){return e.race.deconstructor&&e.resource[e.race.species].amount>=3?K("citizen",l,n(500),1.01):0}},effect(){let l="";return e.resource[e.race.species].max===e.resource[e.race.species].amount&&(l=`${t("city_assembly_effect_warn")}
`),`${t("city_assembly_effect",[F[e.race.species].name])}
${l}`},action(){return e.race.vax&&e.race.vax>=100?!0:e.resource[e.race.species].max>e.resource[e.race.species].amount&&u($(this)[0])?(e.resource[e.race.species].amount++,!0):!1}};return s(c,i,a)}case"nanite_factory":{let n={id:`${a}-nanite_factory`,title:t("city_nanite_factory"),desc:t("city_nanite_factory"),category:"industrial",reqs:{},trait:["deconstructor"],region:"city",cost:{Money(c){return K("nanite_factory",c,25e3,pt(1.25))},Copper(c){return K("nanite_factory",c,1200,pt(1.25))},Steel(c){return K("nanite_factory",c,1e3,pt(1.25))}},effect(){let c=H(2500);return`${t("city_nanite_factory_effect",[e.resource.Nanite.name])}
${t("plus_max_resource",[c,e.resource.Nanite.name])}.
`},special:!0,action(){return u($(this)[0])?(e.city.nanite_factory.count++,e.settings.showIndustry=!0,rt(),!0):!1},flair:t("city_nanite_factory_flair")};return s(n,i,a)}case"captive_housing":{let n={id:`${a}-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 K("captive_housing",c,40,1.35)},Lumber(c){return K("captive_housing",c,30,1.35)},Stone(c){return K("captive_housing",c,18,1.35)}},effect(){let c="";if(!e.race.artifical&&!e.race.detritivore&&!e.race.carnivore&&!e.race.soul_eater){let d=e.city.hasOwnProperty("captive_housing")?e.city.captive_housing.cattle:0,h=e.city.hasOwnProperty("captive_housing")?e.city.captive_housing.cattleCap:0;c+=`${t("city_captive_housing_cattle",[d,h])}
`}let l=0;if(e.city.hasOwnProperty("surfaceDwellers"))for(let d=0;d${t("city_captive_housing_broken",[F[h].name,_])}`,c+=`${t("city_captive_housing_untrained",[F[h].name,m])}
`}let o=e.city.hasOwnProperty("captive_housing")?e.city.captive_housing.raceCap:0;return c+=`${t("city_captive_housing_capacity",[l,o])}
`,e.tech.unfathomable&&e.tech.unfathomable>=2&&(c+=`${t("plus_max_resource",[1,t("job_torturer")])}
`),c},action(){if(u($(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,a)}case"horseshoe":{let n={id:`${a}-horseshoe`,title(){return t(`city_${Wr(!0)}`,[Wr(!1)])},desc(){return t(`city_${Wr(!0)}_desc`,[Wr(!1)])},category:"outskirts",reqs:{primitive:3},condition(){return e.race.hooved||Ve("fool",2023)},inflation:!1,cost:{Lumber(c){let l=(e.race.shoecnt||0)+(c||0);return!e.race.kindling_kindred&&!e.race.smoldering&&(!e.resource.Copper.display||l<=12)?Math.round((l>12?25:5)*(l<=5?1:l-4)*(b.hooved.vars()[0]/100)):0},Copper(c){let l=(e.race.shoecnt||0)+(c||0),o=!(e.race.kindling_kindred||e.race.smoldering);return!!((!o||o&&l>12&&e.resource.Copper.display)&&(!e.resource.Iron.display||l<=75))?Math.round((l>75?20:5)*(l<=12?1:l-11)*(b.hooved.vars()[0]/100)):0},Iron(c){let l=(e.race.shoecnt||0)+(c||0);return e.resource.Iron.display&&l>75&&(!e.resource.Steel.display||l<=150)?Math.round((l<=150?12:28)*l*(b.hooved.vars()[0]/100)):0},Steel(c){let l=(e.race.shoecnt||0)+(c||0);return e.resource.Steel.display&&l>150&&(!e.resource.Adamantite.display||l<=500)?Math.round((l<=500?40:100)*l*(b.hooved.vars()[0]/100)):0},Adamantite(c){let l=(e.race.shoecnt||0)+(c||0);return e.resource.Adamantite.display&&l>500&&(!e.resource.Orichalcum.display||l<=5e3)?Math.round((l<=5e3?5:25)*l*(b.hooved.vars()[0]/100)):0},Orichalcum(c){let l=(e.race.shoecnt||0)+(c||0);return e.resource.Orichalcum.display&&l>5e3?Math.round((25*l-12e4)*(b.hooved.vars()[0]/100)):0}},action(){return!e.race.hooved&&Ve("fool",2023)?!0:e.resource.Horseshoe.display&&u($(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,a)}}}function nr(r,a){a=a||"evo";let i=e.evolution.final||0;return(e.tech[a]&&e.tech[a]===r||e.evolution.gselect)&&i<100}var Xi=["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"];Xi.forEach(r=>O.evolution[r]={id:`evolution-${r}`,title(){return F[r].name},desc(){return`${t("evo_evolve")} ${F[r].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_${r}`]&&e.stats.achieve[`extinct_${r}`].l>=1)&&e.tech[`evo_${F[r].type}`]>=2&&e.evolution.final===100&&!e.race.evoFinalMenu},cost:{RNA(){return 320},DNA(){return 320}},race:!0,effect(){return`${typeof F[r].desc=="string"?F[r].desc:F[r].desc()} ${t("evo_complete")}`},action(){if(u($(this)[0])){if(["synth","custom"].includes(r))return t0(r);e.race.species=r,Cs()}return!1},queue_complete(){return e.tech.evo&&e.tech.evo===7?1:0},emblem(){return Bt(`extinct_${r}`)}});if(Object.keys(e.stats.synth).length>1){let r=Ke(Xi);r.push("junker"),r.push("sludge"),r.forEach(a=>O.evolution[`s-${a}`]={id:`evolution-s-${a}`,title(){return F[a].name},desc(){return`${t("evo_imitate")} ${F[a].name}`},reqs:{evo:8},grant:["evo",9],condition(){return e.stats.synth[a]&&e.race.evoFinalMenu},cost:{},race:!0,effect(){return t("evo_imitate_race",[F[a].name])},action(){return e.stats.synth[a]&&(e.race.species=e.race.evoFinalMenu,e.race.srace=a,Cs()),!1},queue_complete(){return e.tech.evo&&e.tech.evo===8?1:0}})}var Ta={plasmid:"no_plasmid",mastery:"weak_mastery",trade:"no_trade",craft:"no_craft",crispr:"no_crispr",nerfed:"nerfed",badgenes:"badgenes"};Object.keys(Ta).forEach(r=>O.evolution[r]={id:`evolution-${r}`,title:t(`evo_challenge_${r}`),desc:t(`evo_challenge_${r}`),condition(){return e.evolution.hasOwnProperty(r)},cost:{DNA(){return 10}},challenge:!0,effect(){return hl(r)},action(){return u($(this)[0])&&(e.race[Ta[r]]?(delete e.race[Ta[r]],$(`#${$(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(a){delete e.race[a],$(`#evolution-${a}`).removeClass("hl")})):(e.race[Ta[r]]=1,$(`#${$(this)[0].id}`).addClass("hl")),hn(),es()),!1},highlight(){return!!e.race[Ta[r]]},queue_complete(){return 0}});var un={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(un).forEach(r=>O.evolution[r]={id:`evolution-${r}`,title:t(`evo_challenge_${r}`),desc(){let a="";return e.race.universe==="micro"&&(a=a+`${t("evo_challenge_micro_warn")}
`),a=a+`${t(`evo_challenge_${r}_desc`)}
`,["sludge","junker"].includes(r)&&(a=a+`${t("evo_start")}
`),a},condition(){return e.evolution.hasOwnProperty(r)},cost:{DNA(){return un[r].t==="c"?25:50}},challenge:!0,effect(){return hl(r)},action(){return u($(this)[0])&&(un[r].t==="c"?Ku(r):Nu(r)),!1},emblem(){return Bt(un[r].e)},highlight(){return!!e.race[r]},queue_complete(){return 0}});O.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!!u($(this)[0])},queue_complete(){return e.tech.evo_challenge?0:1},flair:t("evo_bunker_flair")};function Gr(){if(!(!e.settings.tabLoad&&e.settings.civTabs!==0)&&!(e.race.universe==="bigbang"||e.race.seeded&&!e.race.chose)){if(e.tech.evo_challenge){let r=$("#evolution .evolving").nextAll();Object.values(r).forEach(function(a){le($(a),!0)}),le($("#evolution .evolving"),!0)}Object.keys(O.evolution).forEach(function(r){if(!O.evolution[r].challenge){Ra(O.evolution[r].id);var a=!0;O.evolution[r].hasOwnProperty("reqs")&&Object.keys(O.evolution[r].reqs).forEach(function(i){(!e.tech[i]||e.tech[i]=2&&vl(),e.tech.evo_challenge&&hn())}}function hl(r){switch(r){case"nerfed":let a=e.race.universe==="antimatter"?["20%","50%","50%","33%"]:["50%","20%","50%","33%"];return t(`evo_challenge_${r}_effect`,a);case"badgenes":return t(`evo_challenge_${r}_effect`,[1,2]);case"orbit_decay":return Nt()>=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 Nt()>=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_${r}_effect`)}}function cc(){let r;if(e.race.universe==="antimatter"||e.race.no_plasmid){let a=e.tech.anthropology&&e.tech.anthropology>=1?1.6:1;if(e.tech.fanaticism&&e.tech.fanaticism>=2){let s=ye(e.civic.professor.workers,"professor")*(e.race.universe==="antimatter"?.02:.04);e.race.high_pop&&(s=xe(s)),a+=+s.toFixed(2)}if(e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let s=e.genes.ancients>=5?.015:e.genes.ancients>=3?.0125:.01;e.race.high_pop&&(s=xe(s)),a+=s*ye(e.civic.priest.workers,"priest")}e.race.universe==="antimatter"&&(a/=2),e.race.spiritual&&(a*=1+b.spiritual.vars()[0]/100);let i=ve("seraph");if(i>0&&(a*=1+b.spiritual.vars(1)[0]/100*i),e.civic.govern.type==="theocracy"&&(a*=1+$e.theocracy()[0]/100),e.race.ooze&&(a*=1-b.ooze.vars()[1]/100),a=+a.toFixed(3),r=`${t("city_temple_effect1",[a])}
`,e.race.universe==="antimatter"){let s=6;if(e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let n=e.genes.ancients>=5?.12:e.genes.ancients>=3?.1:.08;e.race.high_pop&&(n=xe(n)),s+=n*ye(e.civic.priest.workers,"priest")}r+=`${t("city_temple_effect5",[s.toFixed(2)])}
`}}else{let a=e.tech.anthropology&&e.tech.anthropology>=1?8:5;if(e.tech.fanaticism&&e.tech.fanaticism>=2){let s=ye(e.civic.professor.workers,"professor")*.2;e.race.high_pop&&(s=xe(s)),a+=+s.toFixed(1)}if(e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let s=e.genes.ancients>=5?.15:e.genes.ancients>=3?.125:.1;e.race.high_pop&&(s=xe(s)),a+=s*ye(e.civic.priest.workers,"priest")}e.race.spiritual&&(a*=1+b.spiritual.vars()[0]/100);let i=ve("seraph");i>0&&(a*=1+b.spiritual.vars(1)[0]/100*i),e.civic.govern.type==="theocracy"&&(a*=1+$e.theocracy()[0]/100),e.race.ooze&&(a*=1-b.ooze.vars()[1]/100),e.race.orbit_decayed&&e.race.truepath&&(a*=.1),a=+a.toFixed(3),r=`${t("city_temple_effect2",[a])}
`}return e.tech.fanaticism&&e.tech.fanaticism>=3&&(r=r+`${t("city_temple_effect3")}
`),e.tech.anthropology&&e.tech.anthropology>=4&&(r=r+`${e.race.truepath?t("city_temple_effect_tp",[2,25]):t("city_temple_effect4")}
`),r}function ms(){let r=e.tech.gambling>=3?6e4:4e4;e.tech.gambling>=5&&(r+=e.tech.gambling>=6?24e4:6e4),r=H(r),e.race.gambler&&(r*=1+e.race.gambler*.04),e.tech.world_control&&(r=r*1.25),e.race.truepath&&(r=r*1.5),e.tech.stock_exchange&&e.tech.gambling>=4&&(r*=1+e.tech.stock_exchange*.05),e.race.inflation&&(r*=1+e.race.inflation/100),e.tech.isolation&&(r*=5.5),r=Math.round(r);let a=e.race.joyless?"":`${t("city_max_entertainer",[N(1)])}
`,i=e.race.orbit_decayed||e.tech.isolation?`${t("plus_max_resource",[N(1),t("banker_name")])}
`:"",s=`${t("plus_max_resource",[`$${r.toLocaleString()}`,t("resource_Money_name")])}
${a}${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+ye(e.civic.banker.workers,"banker")*.05)),n=+n.toFixed(2),s=s+`${t("tech_casino_effect2",[n])}
`,s}function Wa(r,a,i,s){return((e.evolution.hasOwnProperty(r)?e.evolution[r].count:0)+(s||0))*i+a}function Ku(r){e.race[r]?(delete e.race[r],$(`#evolution-${r}`).removeClass("hl"),r==="sludge"&&Object.keys(F).forEach(function(a){a!=="junker"&&a!=="sludge"&&$(`#evolution-${a}`).removeClass("is-hidden")})):(e.race[r]=1,$(`#evolution-${r}`).addClass("hl"),r==="sludge"&&(Object.keys(F).forEach(function(a){a!=="junker"&&a!=="sludge"&&$(`#evolution-${a}`).addClass("is-hidden")}),e.race.junker&&delete e.race.junker),r==="orbit_decay"&&(delete e.race.cataclysm,e.race.lone_survivor&&(delete e.race.lone_survivor,["nerfed","badgenes"].forEach(function(a){delete e.race[Ta[a]]})))),hn(),es()}function Nu(r){if(e.race.sludge||Object.keys(F).forEach(function(a){a!=="junker"&&a!=="sludge"&&$(`#evolution-${a}`).removeClass("is-hidden")}),e.race[r])delete e.race[r],$(`#evolution-${r}`).removeClass("hl"),["nerfed","badgenes"].forEach(function(a){delete e.race[Ta[a]]});else{["junker","cataclysm","banana","truepath","lone_survivor","fasting"].forEach(function(i){delete e.race[i],$(`#evolution-${i}`).removeClass("hl")}),e.race[r]=1,$(`#evolution-${r}`).addClass("hl"),r==="junker"&&(Object.keys(F).forEach(function(i){i!=="junker"&&i!=="sludge"&&$(`#evolution-${i}`).addClass("is-hidden")}),e.race.sludge&&delete e.race.sludge),(r==="cataclysm"||r==="lone_survivor")&&delete e.race.orbit_decay,r==="truepath"||r==="lone_survivor"?(e.race.nerfed=1,["crispr","plasmid","mastery"].forEach(function(i){delete e.race[Ta[i]]})):(["nerfed","badgenes"].forEach(function(i){delete e.race[Ta[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 a=r==="truepath"||r==="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 a=ve("kobold");return a>0&&(r*=1+b.pack_rat.vars(1)[1]/100*a),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*xt/100),r}function Sa(r){if((e.race.kindling_kindred||e.race.smoldering)&&r==="lumber")return!1;if((e.race.kindling_kindred||e.race.smoldering)&&r==="stone")return!0;let a=e.race.truepath?"truepath":"standard";if(O.city[r].hasOwnProperty("path")&&!O.city[r].path.includes(a))return!1;var i=!0;return Object.keys(O.city[r].reqs).forEach(function(s){(!e.tech[s]||e.tech[s]=3&&(s=!0,e.r_queue.queue.forEach(function(c){cr(c.type,!1)&&(a[O[c.action][c.type].grant[0]]={v:O[c.action][c.type].grant[1],a:c.type})}),Object.keys(n).forEach(function(c){let l=e.tech[c]||0;_n(c,e.tech[c]||0)||(!a[c]||a[c].vl+1)&&(s=!1)})),(i||s)&&(!e.tech[O.tech[r].grant[0]]||e.tech[O.tech[r].grant[0]]=O.tech[r].grant[1]){if(r!=="fanaticism"&&r!=="anthropology"&&r!=="deify"&&r!=="study")return!0;if(r==="fanaticism"&&e.tech.fanaticism)return!0;if(r==="anthropology"&&e.tech.anthropology)return!0;if(r==="deify"&&e.tech.ancient_deify)return!0;if(r==="study"&&e.tech.ancient_study)return!0}return!1}function wc(r){let a=!0;return r.power_reqs&&Object.keys(r.power_reqs).forEach(function(i){(!e.tech[i]||e.tech[i]`).appendTo("#city").append(`
${t(`city_dist_${i}`)} `),r[i].forEach(function(s){vt("city",s)}),pe(`dist-${i}`,function(){return t(`city_dist_${i}_desc`)},{elm:`#city-dist-${i} h3`,classes:"has-background-light has-text-dark"})}})}function ue(){if(!e.settings.tabLoad&&e.settings.civTabs!==3)return;let r={},a={},i={},s=[],n=[],c=[];["primitive","civilized","discovery","industrialized","globalized","early_space","deep_space","interstellar","intergalactic"].forEach(function(d){i[d]=[]});let l={interstellar:"solar"},o={};Object.keys(O.tech).forEach(function(d){if(!Du(d))return;Ra(O.tech[d].id);let h=Bu(d),_=O.tech[d],m="category"in _?_.category:"research";if(!h&&s.indexOf(m)===-1&&s.push(m),h&&n.indexOf(m)===-1&&n.push(m),c.indexOf(m)===-1&&c.push(m),h===!0)m in a||(a[m]=[]),a[m].push(d);else{let w=O.tech[d];if(!Qa(w,d))return;let M=cr(d,o);if(!M)return;m in r||(r[m]=[]);let A=e.race.truepath&&l[w.era]?l[w.era]:w.era;i.hasOwnProperty(A)||(i[A]=[]),i[A].push({t:d,p:M==="precog"})}}),le($("#tech")),Object.keys(i).forEach(function(d){i[d].length>0&&($("#tech").append(`
${t(`tech_era_${d}`)} `),i[d].sort(function(h,_){return O.tech[h.t].cost.Knowledge==null?-1:O.tech[_.t].cost.Knowledge==null||O.tech[h.t].cost.Knowledge()>O.tech[_.t].cost.Knowledge()?1:-1}),i[d].forEach(function(h){vt("tech",h.t,!1,h.p?o:!1)}))}),c.forEach(function(d){le($(`#tech-dist-${d}`),!0),le($(`#tech-dist-old-${d}`),!0)}),n.forEach(function(d){if(!(d in a))return;$(`
`).appendTo("#oldTech").append(`
${t(`tech_dist_${d}`)} `);let h=ar(4,12,!1);h.length>0&&d==="science"&&$("#tech-dist-old-science h3").append(h),a[d].forEach(function(_){vt("tech",_,!0,!1)})})}function vt(r,a,i,s){let n=O[r][a];Br(n,r,a,i,s)}function Br(r,a,i,s,n){if(Qa(r,i)===!1)return;let c=a;a==="outerSol"&&(a="space"),r.region&&(a=r.region),r.powered&&!e[a][i].on&&(e[a][i].on=0);let l=r.id;Ra(l);let o="";n&&r&&r.reqs&&Object.keys(r.reqs).forEach(function(m){n[m]&&(o+=` data-req-${m}="${n[m].a}"`)});let d=r.highlight&&r.highlight()?$(`
`):$(`
`);Tt(r,!1,["genes","blood"].includes(a))||d.addClass("cna"),Tt(r,!0,["genes","blood"].includes(a))||d.addClass("cnam");let h;if(s)h=$('{{ title }} ');else{let m="",w="";if(r.cost){let x=a!=="genes"&&a!=="blood"?jr(r):r.cost;Object.keys(x).forEach(function(j){let B=x[j]();B>0&&(m=m+` res-${j}`,w=w+` data-${j}="${B}"`)})}let M="";r.class&&(M=typeof r.class=="function"?` ${r.class()}`:` ${r.class}`),n&&(M=" precog");let A=r.highlight?r.highlight()?`${t("active")} `:`${t("not_active")} `:"";h=$(` ${A}{{ title }} description `)}if(d.append(h),r.hasOwnProperty("special")&&(typeof r.special=="function"&&r.special()||r.special===!0)){let m=$(`
+
`),_.append(`
${t("hell_report_log_report",[d,h])} `),_.append(`${t("hell_report_log_start",[m.start])}
`),m.drones&&Object.keys(m.drones).forEach(function(x){let j=m.drones[x],B=t("hell_report_log_obj_counter",[t("portal_war_drone_title"),x]);j.encounter?_.append(`${t("hell_report_log_encounter",[B,j.kills])}
`):_.append(`${t("hell_report_log_encounter_fail",[B])}
`)}),m.patrols&&Object.keys(m.patrols).forEach(function(x){let j=m.patrols[x],B=t("hell_report_log_obj_counter",[t("hell_report_log_patrol"),x]);if(B=j.droid?t("hell_report_log_patrol_droid",[B]):B,j.encounter){let S=$("
");j.ambush?S.append(`${t("hell_report_log_patrol_ambush",[B,j.kills])} `):S.append(`${t("hell_report_log_encounter",[B,j.kills])} `),j.wounded&&S.append(`${j.wounded>1?t("hell_report_log_patrol_wounded_plural",[j.wounded]):t("hell_report_log_patrol_wounded")} `),j.died&&S.append(`${j.died>1?t("hell_report_log_patrol_killed_plural",[j.died]):t("hell_report_log_patrol_killed")} `),j.gem>0&&S.append(`${t("hell_report_log_soul_find",[e.resource.Soul_Gem.name,j.gem])} `),_.append(S)}else _.append(`${t("hell_report_log_encounter_fail",[B])}
`)}),m.surveyor_finds&&Object.keys(m.surveyor_finds).forEach(function(x){let j=m.surveyor_finds[x],B=t("hell_report_log_obj_counter",[t("job_hell_surveyor"),x]),S=$("
");S.append(`${t("hell_report_log_search",[B,j.bodies])} `),j.gem>0&&S.append(`${t("hell_report_log_soul_search",[e.resource.Soul_Gem.name,j.gem])} `),_.append(S)}),m.revived&&_.append(`${m.revived>1?t("hell_report_log_revived_plural",[m.revived]):t("hell_report_log_revived")}
`),m.patrols_lost&&_.append(`${t("hell_report_log_patrols_lost",[m.patrols_lost])}
`),m.siege&&(m.siege.destroyed?_.append(`${t("hell_report_log_siege",[m.siege.surveyors,m.siege.soldiers,m.siege.kills])}
`):_.append(`${t("hell_report_log_siege_fail",[m.siege.damage,m.siege.kills])}
`)),m.demons&&_.append(`${t("hell_report_log_demons",[m.demons])}
`),m.surveyors&&_.append(`${m.surveyors>1?t("hell_report_log_surveyors_plural",[m.surveyors]):t("hell_report_log_surveyors")}
`),m.soul_attractors&&_.append(`${t("hell_report_log_soul_attractors",[m.soul_attractors])}
`),m.gun_emplacements&&Object.keys(m.gun_emplacements).forEach(function(x){let j=$("
"),B=m.gun_emplacements[x],S=t("hell_report_log_obj_counter",[t("portal_gun_emplacement_title"),x]);j.append($(`${t("hell_report_log_misc_kills",[S,B.kills,t("portal_pit_name")])} `)),B.gem&&j.append(`${t("hell_report_log_soul_find",[e.resource.Soul_Gem.name,1])} `),_.append(j)}),m.soul_forge){let x=$("
");x.append(`${t("hell_report_log_soul_forge",[m.soul_forge.kills])} `),m.soul_forge.gem&&x.append(`${t("hell_report_log_soul_find",[e.resource.Soul_Gem.name,1])} `),m.soul_forge.gem_craft&&x.append(`${t("hell_report_log_soul_craft",[m.soul_forge.corrupt?t("resource_Corrupt_Gem_name"):e.resource.Soul_Gem.name])} `),_.append(x)}m.gate_turrets&&Object.keys(m.gate_turrets).forEach(function(x){let j=$("
"),B=m.gate_turrets[x],S=t("hell_report_log_obj_counter",[t("portal_gate_turret_title"),x]);j.append(`${t("hell_report_log_misc_kills",[S,B.kills,t("portal_gate_name")])} `),B.gem&&j.append(`${t("hell_report_log_soul_find",[e.resource.Soul_Gem.name,1])} `),_.append(j)}),D({el:"#hellReportDisplay",data:{g:e.resource.Soul_Gem}})};if(c.day!==0){l(c.year,c.day);let d=c.year,h=c.day;h-1===0?(d--,h=e.city.calendar.orbit):h--,o(d,h)}else c.year=e.city.calendar.year,c.day=e.city.calendar.day;D({el:"#hellReportLogTitle",methods:{updateList(){l(c.year,c.day)}}}),pe("hellReportLogs",function(){return t("hell_report_log_tooltip",[2500])},{elm:"#hellReport .reportList div:first-child h2"})}function dc(r){if(!document.getElementById("hellReportList")||r){let a=!1,i=2500,s=(Object.keys(mr).length-1)*e.city.calendar.orbit+e.city.calendar.day;if(s>i){let n=Object.keys(mr[Object.keys(mr)[0]]).length;for(s-e.city.calendar.orbit+n>i&&(a=!0,s-=n,delete mr[Object.keys(mr)[0]]);s>i;)s-=e.city.calendar.orbit,delete mr[Object.keys(mr)[0]]}return a}}var ta={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},sr={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},Mt={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},ya={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 wa(){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 a=1+b.wasteful.vars()[0]/100;Object.keys(r).forEach(function(i){for(let s=0;s=2){let l=e.tech.foundry>=5?e.tech.foundry>=8?.08:.05:.03;r.general.add.push({name:t("city_foundry"),manual:e.city.foundry.count*l,auto:e.city.foundry.count*l})}if(e.tech.foundry>=3&&Object.keys(r).forEach(function(l){e.city.foundry[l]&&e.city.foundry[l]>1&&r[l].add.push({name:t("tech_apprentices"),manual:(e.city.foundry[l]-1)*xe(.03),auto:(e.city.foundry[l]-1)*xe(.03)})}),e.tech.foundry>=4&&e.city.sawmill&&r.Plywood.add.push({name:t("city_sawmill"),manual:e.city.sawmill.count*.02,auto:e.city.sawmill.count*.02}),e.tech.foundry>=6&&r.Brick.add.push({name:t("city_foundry"),manual:e.city.foundry.count*.02,auto:e.city.foundry.count*.02}),e.tech.foundry>=7&&(r.general.add.push({name:t("city_factory")+` (${t("tab_city5")})`,manual:k.factory*.05,auto:k.factory*.05}),e.tech.mars>=4&&r.general.add.push({name:t("city_factory")+` (${t("tab_space")})`,manual:k.red_factory*.05,auto:k.red_factory*.05}),e.interstellar.int_factory&&k.int_factory&&r.general.add.push({name:t("interstellar_int_factory_title"),manual:k.int_factory*.1,auto:k.int_factory*.1})),e.space.fabrication&&U.fabrication&&r.general.add.push({name:t("space_red_fabrication_title"),manual:U.fabrication*e.civic.colonist.workers*(n?xe(.05):xe(.02)),auto:U.fabrication*e.civic.colonist.workers*(n?xe(.05):xe(.02))}),k.stellar_forge&&(r.Mythril.add.push({name:t("interstellar_stellar_forge_title"),manual:k.stellar_forge*.05,auto:k.stellar_forge*.05}),r.general.add.push({name:t("interstellar_stellar_forge_title"),manual:0,auto:k.stellar_forge*.1})),k.hell_forge){let l=Nr("ruins");r.general.add.push({name:t("portal_hell_forge_title"),manual:0,auto:k.hell_forge*.75*l.supress}),r.Scarletite.multi.push({name:t("portal_ruins_supressed"),manual:1,auto:l.supress})}if(e.tauceti.tau_factory&&U.tau_factory&&r.general.add.push({name:t("tau_home_tau_factory"),manual:0,auto:U.tau_factory*(e.tech.isolation?2.75:.9)}),e.tech.isolation&&e.tauceti.colony&&U.colony&&r.general.add.push({name:t("tau_home_colony"),manual:U.colony*.5,auto:U.colony*.5}),U.zero_g_lab&&k.zero_g_lab||U.infectious_disease_lab&&k.infectious_disease_lab){let l=yt("spc_enceladus");r.Quantium.multi.push({name:t("space_syndicate"),manual:1,auto:l})}if(e.tech.alien_crafting&&U.infectious_disease_lab&&k.infectious_disease_lab){let l=1+.65*Math.min(U.infectious_disease_lab,k.infectious_disease_lab);r.Quantium.multi.push({name:t("tech_infectious_disease_lab_alt"),manual:1,auto:l})}if(e.race.crafty&&r.general.add.push({name:t("wiki_arpa_crispr_crafty"),manual:.03,auto:.03}),e.race.ambidextrous&&r.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&&r.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"&&r.general.multi.push({name:t("govern_socialist"),manual:1+$e.socialist()[0]/100,auto:1+$e.socialist()[0]/100}),e.race.casting&&e.race.casting.crafting){let l=1+e.race.casting.crafting/(e.race.casting.crafting+75),o=1+2*e.race.casting.crafting/(2*e.race.casting.crafting+75);r.general.multi.push({name:t("modal_pylon_casting"),manual:l,auto:o})}e.race.universe==="magic"&&r.general.multi.push({name:t("universe_magic"),manual:.8,auto:.8}),e.tech.v_train&&r.general.multi.push({name:t("tech_vocational_training"),manual:1,auto:2}),e.genes.crafty&&r.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&&r.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&&r.general.multi.push({name:t("evo_challenge_orbit_decay"),manual:1,auto:1.1}),e.race.ambidextrous&&r.general.multi.push({name:t("trait_ambidextrous_name"),manual:1,auto:1+b.ambidextrous.vars()[1]*e.race.ambidextrous/100}),e.blood.artisan&&r.general.multi.push({name:t("tab_arpa_blood")+" "+t("arpa_blood_artisan_title"),manual:1,auto:1+e.blood.artisan/100});let c=gc();c>0&&r.general.multi.push({name:t("faith"),manual:1,auto:1+c/(e.race.universe==="antimatter"?1.5:3)}),e.prestige.Plasmid.count>0&&r.general.multi.push({name:t("resource_Plasmid_plural_name"),manual:Vi()/8+1,auto:Vi()/8+1}),e.genes.challenge&&e.genes.challenge>=2&&r.general.multi.push({name:t("mastery"),manual:1+Nt()/(e.race.weak_mastery?50:100),auto:1+Nt()/(e.race.weak_mastery?50:100)}),e.race.gravity_well&&r.general.multi.push({name:t("evo_challenge_gravity_well"),manual:Xe(1),auto:Xe(1)})}else{let n=1,c={},l={};if(r.general){for(let d=0;d`);$("#market").append(n),bs(`#market-${a}`,n,a,i,!0)}}),Ui()}else if(r==="storage"){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==1))return;Aa("storage"),Je.hasOwnProperty("resource")&&Object.keys(Je.resource).forEach(function(a){let i=Je.resource[a].color;if(Je.resource[a].stackable){var n=$(`
`);$("#resStorage").append(n),ws(`#stack-${a}`,n,a,i,!0)}}),Ui()}else if(r==="ejector"){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==2))return;Aa("ejector"),Je.hasOwnProperty("resource")&&Object.keys(Je.resource).forEach(function(a){let i=Je.resource[a].color;Mt[a]&&Yn(a,i)})}else if(r==="supply"){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==3))return;Aa("supply"),Je.hasOwnProperty("resource")&&Object.keys(Je.resource).forEach(function(a){let i=Je.resource[a].color;ya[a]&&Xn(a,i)})}else if(r==="alchemy"){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==4))return;Aa("alchemy"),Je.hasOwnProperty("resource")&&Object.keys(Je.resource).forEach(function(a){let i=Je.resource[a].color,s=Je.resource[a].tradable;sr[a]&&e.race.universe==="magic"&&(e.resource[a].basic=s,ec(a,i,s))})}}function cn(r){if(e.race.species==="protoplasm"){let a=100;e.stats.achieve.mass_extinction&&e.stats.achieve.mass_extinction.l>1&&(a+=50*(e.stats.achieve.mass_extinction.l-1)),je("RNA",r,a,1,!1),je("DNA",r,a,1,!1)}je("Money",r,1e3,1,!1,!1,"success"),je(e.race.species,r,0,0,!1,!1,"warning"),je("Slave",r,0,0,!1,!1,"warning"),je("Mana",r,0,1,!1,!1,"warning"),je("Energy",r,0,0,!1,!1,"warning"),je("Sus",r,0,0,!1,!1,"warning"),je("Knowledge",r,100,1,!1,!1,"warning"),je("Zen",r,0,0,!1,!1,"warning"),je("Crates",r,0,0,!1,!1,"warning"),je("Containers",r,0,0,!1,!1,"warning"),je("Food",r,250,1,!0,!0),je("Lumber",r,200,1,!0,!0),je("Chrysotile",r,200,1,!0,!0),je("Stone",r,200,1,!0,!0),je("Crystal",r,200,1,!0,!0),je("Furs",r,100,1,!0,!0),je("Copper",r,100,1,!0,!0),je("Iron",r,100,1,!0,!0),je("Aluminium",r,50,1,!0,!0),je("Cement",r,100,1,!0,!0),je("Coal",r,50,1,!0,!0),je("Oil",r,0,1,!0,!1),je("Uranium",r,10,1,!0,!1),je("Steel",r,50,1,!0,!0),je("Titanium",r,50,1,!0,!0),je("Alloy",r,50,1,!0,!0),je("Polymer",r,50,1,!0,!0),je("Iridium",r,0,1,!0,!0),je("Helium_3",r,0,1,!0,!1),je("Water",r,0,1,!1,!1,"advanced"),je("Deuterium",r,0,1,!1,!1,"advanced"),je("Neutronium",r,0,1,!1,!1,"advanced"),je("Adamantite",r,0,1,!1,!0,"advanced"),je("Infernite",r,0,1,!1,!1,"advanced"),je("Elerium",r,1,1,!1,!1,"advanced"),je("Nano_Tube",r,0,1,!1,!1,"advanced"),je("Graphene",r,0,1,!1,!0,"advanced"),je("Stanene",r,0,1,!1,!0,"advanced"),je("Bolognium",r,0,1,!1,!0,"advanced"),je("Vitreloy",r,0,1,!1,!0,"advanced"),je("Orichalcum",r,0,1,!1,!0,"advanced"),je("Unobtainium",r,0,1,!1,!1,"advanced"),je("Materials",r,0,1,!1,!1,"advanced"),je("Horseshoe",r,-2,0,!1,!1,"advanced"),je("Nanite",r,0,1,!1,!1,"advanced"),je("Genes",r,-2,0,!1,!1,"advanced"),je("Soul_Gem",r,-2,0,!1,!1,"advanced"),je("Plywood",r,-1,0,!1,!1,"danger"),je("Brick",r,-1,0,!1,!1,"danger"),je("Wrought_Iron",r,-1,0,!1,!1,"danger"),je("Sheet_Metal",r,-1,0,!1,!1,"danger"),je("Mythril",r,-1,0,!1,!1,"danger"),je("Aerogel",r,-1,0,!1,!1,"danger"),je("Nanoweave",r,-1,0,!1,!1,"danger"),je("Scarletite",r,-1,0,!1,!1,"danger"),je("Quantium",r,-1,0,!1,!1,"danger"),je("Corrupt_Gem",r,-2,0,!1,!1,"caution"),je("Codex",r,-2,0,!1,!1,"caution"),je("Cipher",r,0,1,!1,!1,"caution"),je("Demonic_Essence",r,-2,0,!1,!1,"caution"),!r&&(li("Blood_Stone","caution"),li("Artifact","caution"),li("Plasmid"),li("AntiPlasmid"),li("Phage"),li("Dark"),li("Harmony"),li("AICore"))}function Ui(){e.race.species!=="protoplasm"&&(Tu(),zu(),Eu())}function je(r,a,i,s,n,c,l){if(l=l||"info",e.resource[r]||(e.resource[r]={}),Ir(r),e.race.artifical&&r==="Food"&&(c=!1),a)return;e.resource[r].hasOwnProperty("display")||(e.resource[r].display=!1),e.resource[r].hasOwnProperty("value")||(e.resource[r].value=e.race.truepath?ta[r]*2:ta[r]),e.resource[r].hasOwnProperty("amount")||(e.resource[r].amount=0),e.resource[r].hasOwnProperty("max")||(e.resource[r].max=i),e.resource[r].hasOwnProperty("diff")||(e.resource[r].diff=0),e.resource[r].hasOwnProperty("delta")||(e.resource[r].delta=0),e.resource[r].hasOwnProperty("rate")||(e.resource[r].rate=s),r==="Mana"&&(e.resource[r].gen=0,e.resource[r].gen_d=0),e.resource[r].stackable=c,e.resource[r].crates||(e.resource[r].crates=0),e.resource[r].containers||(e.resource[r].containers=0),!e.resource[r].trade&&n&&(e.resource[r].trade=0);var o;e.resource[r].max===-1||e.resource[r].max===-2?o=$(`
{{ name | namespace }} {{ amount | diffSize }} `):o=$(`
{{ name | namespace }} {{ amount | size }} / {{ max | size }} `),c?o.append($(`+ `)):(i!==-1||i===-1&&s===0&&e.race.no_craft||r==="Scarletite"||r==="Quantium")&&o.append($(" "));let d=!1;if(s!==0||i===-1&&s===0&&e.race.no_craft||r==="Scarletite"||r==="Quantium")o.append($(`{{ diff | diffSize }} /s `));else if(i===-1&&!e.race.no_craft&&r!=="Scarletite"&&r!=="Quantium"){let _=$(' ');o.append(_);let m=[1,5];for(let w=0;w+${m[w]} `));_.append($(`+A `)),d=!0}else o.append($(" "));$("#resources").append(o);var h={template:'
'};if(D({el:`#res${r}`,data:e.resource[r],filters:{size:function(_){return _&&Ee(_,0)},diffSize:function(_){return r==="Horseshoe"&&!e.race.hooved&&Ve("fool",2023)&&(_=5),Ee(_,2)},namespace(_){return _.replace("_"," ")}},methods:{resRate(_){let m=Ee(e.resource[_].diff,2);return`${_} ${m} per second`},trigModal(){this.$buefy.modal.open({parent:this,component:h});var _=setInterval(function(){$("#modalBox").length>0&&(clearInterval(_),Iu(r,l))},50)},showTrigger(){return e.resource.Crates.display},craft(_,m){if(!e.race.no_craft){let w=Ua(_,"manual").multiplier,M=wa(),F=Math.floor(e.resource[M[_][0].r].amount/M[_][0].a);for(let x=1;x${e.resource[M[_][F].r].name} ${x}`}return w}}}),Jo(`cnt${r}`,r,"c"),d){let _=[1,5,"A"];for(let m=0;m<_.length;m++){let w=function(){let M=$("
"),F=r,x=_[m],j=+(Ua(F,"manual").multiplier*100).toFixed(0);M.append($(`${t("manual_crafting_hover_bonus",[j.toLocaleString(),e.resource[F].name])}
`));let B=wa(),S=$(`${t("manual_crafting_hover_craft")}
`),Q=0;if(typeof x!="number"){if(Q=e.resource[B[F][0].r].amount/B[F][0].a,B[F].length>1)for(let ce=1;ce${Ee(j/100*Q,1)} ${e.resource[F].name}`))}else{Q=fe()*x;let ce=Ee(j/100*Q,1);S.append($(`${ce} ${e.resource[F].name} `))}let V=$(` ${t("manual_crafting_hover_use")}
`);for(let ce=0;ce${Ee(Q*B[F][ce].a,1)} ${e.resource[B[F][ce].r].name}`)),ce+1, "));return M.append(S),M.append(V),M};rn(`inc${r}${_[m]}`,r,"manual",w)}}c&&pe(`con${r}`,function(){var _=$(` ${t("resource_Crates_plural")} ${e.resource[r].crates}
`);return e.tech.steel_container&&_.append($(`${t("resource_Containers_plural")} ${e.resource[r].containers}
`)),_}),r!==e.race.species&&r!=="Crates"&&r!=="Containers"&&i!==-1?Jo(`inc${r}`,r,"p"):i===-1&&rn(`inc${r}`,r,"auto"),$(`#res${r}`).on("mouseover",function(){$(`.res-${r}`).each(function(){e.resource[r].amount>=$(this).attr(`data-${r}`)?$(this).addClass("hl-ca"):$(this).addClass("hl-cna")})}),$(`#res${r}`).on("mouseout",function(){$(`.res-${r}`).each(function(){$(this).removeClass("hl-ca"),$(this).removeClass("hl-cna")})}),typeof Je.resource>"u"&&(Je.resource={}),Je.resource[r]={color:l,tradable:n,stackable:c}}function Ir(r){if(r===e.race.species?e.resource[r].name=tt("name"):e.resource[r].name=r==="Money"?"$":t(`resource_${r}_name`),Ve("fool",2022))switch(r){case"Lumber":e.resource[r].name=t("resource_Stone_name");break;case"Stone":e.resource[r].name=t("resource_Lumber_name");break;case"Copper":e.resource[r].name=t("resource_Iron_name");break;case"Iron":e.resource[r].name=t("resource_Copper_name");break;case"Steel":e.resource[r].name=t("resource_Titanium_name");break;case"Titanium":e.resource[r].name=t("resource_Steel_name");break;case"Coal":e.resource[r].name=t("resource_Oil_name");break;case"Oil":e.resource[r].name=t("resource_Coal_name");break;case"Alloy":e.resource[r].name=t("resource_Polymer_name");break;case"Polymer":e.resource[r].name=t("resource_Alloy_name");break;case"Graphene":e.resource[r].name=t("resource_Stanene_name");break;case"Stanene":e.resource[r].name=t("resource_Graphene_name");break;case"Plywood":e.resource[r].name=t("resource_Brick_name");break;case"Brick":e.resource[r].name=t("resource_Plywood_name");break;case"Genes":e.resource[r].name=t("resource_Soul_Gem_name");break;case"Soul_Gem":e.resource[r].name=t("resource_Genes_name");break;case"Slave":e.resource[r].name=t("resource_Peon_name");break}if(r==="Horseshoe"&&(e.resource[r].name=Wr()),e.race.artifical&&r==="Genes"&&(e.resource[r].name=t("resource_Program_name")),e.race.sappy)switch(r){case"Stone":e.resource[r].name=t("resource_Amber_name");break}else if(e.race.flier)switch(r){case"Stone":e.resource[r].name=t("resource_Clay_name");break;case"Brick":e.resource[r].name=t("resource_Mud_Brick_name");break}if(e.race.soul_eater)switch(r){case"Food":e.resource[r].name=t("resource_Souls_name");break}if(e.race.evil)switch(r){case"Lumber":e.resource[r].name=t("resource_Bones_name");break;case"Furs":e.resource[r].name=t("resource_Flesh_name");break;case"Plywood":e.resource[r].name=t("resource_Boneweave_name");break}if(e.race.artifical)switch(r){case"Food":e.resource[r].name=t("resource_Signal_name");break}if(Ve("halloween").active)switch(r){case"Food":e.resource[r].name=t("resource_Candy_name");break;case"Lumber":e.resource[r].name=t("resource_Bones_name");break;case"Stone":e.resource[r].name=t("resource_RockCandy_name");break;case"Furs":e.resource[r].name=t("resource_Webs_name");break;case"Plywood":e.resource[r].name=t("resource_Boneweave_name");break;case"Brick":e.resource[r].name=t("resource_Tombstone_name");break;case"Soul_Gem":e.resource[r].name=t("resource_CandyCorn_name");break}}function li(r,a){if($(`#res${r}`).length){let s=$(`#res${r}`);s.detach(),$("#resources").append(s);return}a=a||"special";var i=$(`${t(`resource_${r}_name`)} {{ count | round }}
`);$("#resources").append(i),D({el:`#res${r}`,data:e.prestige[r],filters:{round(s){return+s.toFixed(3)}}}),!(r==="Artifact"||r==="Blood_Stone")&&pe(`res${r}`,function(){let s=$("
");switch(r){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_${r}_desc`,[n,+(Vi("plasmid")*100).toFixed(2)])} `)),e.genes.store&&(e.race.universe!=="antimatter"||e.genes.bleed>=3)){let d=H(1,"plasmid");d>1&&s.append($(` ${t("resource_Plasmid_desc2",[+((d-1)*100).toFixed(2)])} `))}break;case"AntiPlasmid":s.append($(`${t(`resource_${r}_desc`,[e.prestige.AntiPlasmid.count,+(Vi("antiplasmid")*100).toFixed(2)])} `));let c=H(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 l=H(1,"phage");e.genes.store&&e.genes.store>=4&&l>1&&s.append($(` ${t("resource_Plasmid_desc2",[+((l-1)*100).toFixed(2)])} `));break;case"Dark":switch(e.race.universe){case"standard":s.append($(`${t(`resource_${r}_desc_s`,[+((ft("standard")-1)*100).toFixed(2)])} `));break;case"evil":s.append($(`${t(`resource_${r}_desc_e`,[+((ft("evil")-1)*100).toFixed(2)])} `));break;case"micro":s.append($(`${t(`resource_${r}_desc_m`,[ft("micro",!1),ft("micro",!0)])} `));break;case"heavy":let d=ft("heavy"),h=.25+.5*d,_=.2+.3*d;s.append($(`${t(`resource_${r}_desc_h`,[+(h*100).toFixed(4),+(_*100).toFixed(4)])} `));break;case"antimatter":s.append($(`${t(`resource_${r}_desc_a`,[+((ft("antimatter")-1)*100).toFixed(2)])} `));break;case"magic":s.append($(`${t(`resource_${r}_desc_mg`,[t("resource_Mana_name"),+((ft("magic")-1)*100).toFixed(2)])} `));break}break;case"Harmony":s.append($(`${t(`resource_${r}_desc`,[e.race.universe==="standard"?.1:1,Ps()])} `));break;case"AICore":let o=+((1-.99**e.prestige.AICore.count)*100).toFixed(2);s.append($(`${t(`resource_${r}_desc`,[o])} `));break}return s})}function Fu(r){let a=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!==r)return!1;a=e.tech.currency>=6?-1e6:e.tech.currency>=4?-25:-10}return!(e.resource[r].trade<=a)}function Au(r){let a=e.tech.currency>=6?1e6:e.tech.currency>=4?100:25;return!(e.resource[r].trade>=a)}function bs(r,a,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&&a.append($(`{{ r.name | namespace }} `)),e.race.no_trade||(a.append($(`${t("resource_market_buy")} `)),a.append($(`\${{ r.value | buy }} `)),a.append($(`${t("resource_market_sell")} `)),a.append($(`\${{ r.value | sell }} `))),n&&(e.race.banana&&i==="Food"||e.tech.trade&&!e.race.terrifying)){let c=$(`${t("resource_market_routes")} `);a.append(c),c.append($(`- `)),c.append($(' ')),c.append($(`+ `)),c.append($(`${t("cancel_routes")} `)),ks(i)}D({el:r,data:{r:e.resource[i],m:e.city.market},methods:{aSell(c){let l=sr[c]===1?t("resource_market_unit"):t("resource_market_units"),o=qs(c),d=sr[c];if(e.stats.achieve.hasOwnProperty("trade")){let h=e.stats.achieve.trade.l;h>5&&(h=5),d*=1-h/100}return d=+d.toFixed(3),t("resource_market_auto_sell_desc",[d,l,o])},aBuy(c){let l=sr[c],o=ge("dealmaker",0);o&&(l*=1+o/100),e.race.persuasive&&(l*=1+e.race.persuasive/100),e.race.merchant&&(l*=1+b.merchant.vars()[1]/100);let d=ve("goblin");if(d>0&&(l*=1+b.merchant.vars(1)[1]/100*d),e.genes.trader){let m=Nt();l*=1+m/100}if(e.stats.achieve.hasOwnProperty("trade")){let m=e.stats.achieve.trade.l;m>5&&(m=5),l*=1+m/50}e.race.truepath&&(l*=1-e.civic.foreign.gov3.hstl/101),l=+l.toFixed(3);let h=l===1?t("resource_market_unit"):t("resource_market_units"),_=Ms(c);return t("resource_market_auto_buy_desc",[l,h,_])},purchase(c){if(!e.race.no_trade&&!e.settings.pause){let l=e.city.market.qty,o=e.resource[c].value;e.race.arrogant&&(o*=1+b.arrogant.vars()[0]/100),e.race.conniving&&(o*=1-b.conniving.vars()[0]/100);let d=ve("imp");d>0&&(o*=1-b.conniving.vars(1)[0]/100*d);let h=Math.floor(Math.min(l,e.resource.Money.amount/o,e.resource[c].max-e.resource[c].amount));h>0&&(e.resource[c].amount+=h,e.resource.Money.amount-=Math.round(o*h),e.resource[c].value+=Number((h/Math.rand(1e3,1e4)).toFixed(2)))}},sell(c){if(!e.race.no_trade&&!e.settings.pause){let l=e.city.market.qty,o=4;e.race.merchant&&(o*=1-b.merchant.vars()[0]/100);let d=ve("goblin");d>0&&(o*=1-b.merchant.vars(1)[0]/100*d),e.race.asymmetrical&&(o*=1+b.asymmetrical.vars()[0]/100),e.race.conniving&&(o*=1-b.conniving.vars()[1]/100);let h=ve("imp");h>0&&(o*=1-b.conniving.vars(1)[1]/100*h);let _=e.resource[c].value/o,m=Math.floor(Math.min(l,e.resource[c].amount,(e.resource.Money.max-e.resource.Money.amount)/_));m>0&&(e.resource[c].amount-=m,e.resource.Money.amount+=Math.round(_*m),e.resource[c].value-=Number((m/Math.rand(1e3,1e4)).toFixed(2)),e.resource[c].value0&&(h+=e.resource[_].trade)}),d<=h)break}if(e.resource[c].trade>=0)if(Au(c)&&e.city.market.trade0&&(l*=1-b.merchant.vars(1)[0]/100*o),e.race.asymmetrical&&(l*=1+b.asymmetrical.vars()[0]/100),Ee(c*e.city.market.qty/l,0)},trade(c){if(i==="Stone"&&(c===31||c===-31)){let l=ar(3,12,!1);if(l.length>0)return l}return c<0?(c=0-c,`-${c}`):c>0?`+${c}`:0},namespace(c){return c.replace("_"," ")}}})}}function zu(){!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==0)||($("#market").append($(``)),hc())}function Qi(){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 hc(r){let a=r||$("#galaxyTrade");if(r||le($("#galaxyTrade")),e.galaxy.trade){a.append($(``));let i=Qi();for(let n=0;n');a.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 l=$(`${t("resource_market_routes")} `);c.append(l);let o=t("galaxy_freighter_assign",[e.resource[i[n].buy.res].name,e.resource[i[n].sell.res].name]),d=t("galaxy_freighter_unassign",[e.resource[i[n].buy.res].name,e.resource[i[n].sell.res].name]);l.append($(`- `)),l.append($(`{{ g.f${n} }} `)),l.append($(`+ `)),l.append($(`${t("cancel_routes")} `))}let s=$(`${t("resource_market_galactic_trade_routes")} {{ g.cur }} / {{ g.max }}
`);s.append($(`${t("cancel_all_routes")} `)),a.append(s)}D({el:r?"#specialModal":"#galaxyTrade",data:{g:e.galaxy.trade,t:e.tech},methods:{less(i){let s=fe();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=fe();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=Qi();for(let n=0;n0&&(n*=1+b.merchant.vars(1)[1]/100*c),e.genes.trader){let l=Nt();n*=1+l/100}if(e.stats.achieve.hasOwnProperty("trade")){let l=e.stats.achieve.trade.l;l>5&&(l=5),n*=1+l/50}return n=+n.toFixed(2),n},s_vol(i){let n=Qi()[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}}}),pe("galacticTradeTotal",function(){let i=$('
');return v.hasOwnProperty("gt_route")&&Object.keys(v.gt_route).forEach(function(s){v.gt_route[s]>0&&i.append(`${s} +${v.gt_route[s]}
`)}),i.append(`${t("resource_market_galactic_trade_routes")} ${e.galaxy.trade.max}
`),i},{elm:"#galacticTradeTotal > span"})}function al(r){let a=fe(),i=Zi();a>e.resource[r].crates&&(a=e.resource[r].crates),a>0&&(e.resource.Crates.amount+=a,e.resource.Crates.max+=a,e.resource[r].crates-=a,e.resource[r].max-=i*a)}function il(r){let a=fe(),i=Zi();a>e.resource.Crates.amount&&(a=e.resource.Crates.amount),a>0&&(e.resource.Crates.amount-=a,e.resource.Crates.max-=a,e.resource[r].crates+=a,e.resource[r].max+=i*a)}function sl(r){let a=fe(),i=Ji();a>e.resource[r].containers&&(a=e.resource[r].containers),a>0&&(e.resource.Containers.amount+=a,e.resource.Containers.max+=a,e.resource[r].containers-=a,e.resource[r].max-=i*a)}function nl(r){let a=fe(),i=Ji();a>e.resource.Containers.amount&&(a=e.resource.Containers.amount),a>0&&(e.resource.Containers.amount-=a,e.resource.Containers.max-=a,e.resource[r].containers+=a,e.resource[r].max+=i*a)}function ws(r,a,i,s){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==1))){if(a.append($(`{{ name }} `)),e.resource.Crates.display){let n=$(`${t("resource_Crates_name")} `);a.append(n),n.append($(`« `)),n.append($(` `)),n.append($(`» `))}if(e.resource.Containers.display){let n=$(`${t("resource_Containers_name")} `);a.append(n),n.append($(`« `)),n.append($(' ')),n.append($(`» `))}D({el:r,data:e.resource[i],methods:{addCrate(n){il(n)},subCrate(n){al(n)},addCon(n){nl(n)},subCon(n){sl(n)}},filters:{trick(n){if(i==="Stone"&&e.resource[i].crates===10&&e.resource[i].containers===31){let c=ar(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"){let l=jt(13,10);if(n===10&&l.length>0)return"1"+l}return n}}})}}function qs(r){let a=4;e.race.merchant&&(a*=1-b.merchant.vars()[0]/100);let i=ve("goblin");i>0&&(a*=1-b.merchant.vars(1)[0]/100*i),e.race.asymmetrical&&(a*=1+b.asymmetrical.vars()[0]/100),e.race.conniving&&a--;let s=e.resource[r].value*sr[r]/a;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*=T("psychic_cash"),s=+s.toFixed(1),s}function Ms(r){let a=e.resource[r].value;e.race.arrogant&&(a*=1+b.arrogant.vars()[0]/100),e.race.conniving&&(a*=1-b.conniving.vars()[0]/100);let i=ve("imp");i>0&&(a*=1-b.conniving.vars(1)[0]/100*i);let s=a*sr[r];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 rn(r,a,i,s){pe(`${r}`,function(){let n=$('{{ res.name | namespace }}
'),c=$('
');n.append(c);let l=Ua(a,i),o=$("
");c.append(o),i==="auto"&&v.p[a]&&Object.keys(v.p[a]).forEach(function(m){let w=v.p[a][m],M=parseFloat(w.slice(0,-1));if(M!=0&&!isNaN(M)){let F=M>0?"success":"danger",x=m.replace(/\+.+$/,"");m=m.replace(/'/g,"\\'"),o.append(`${x} {{ ${[a]}['${m}'] | translate }}
`)}}),Object.keys(l.multi_bd).forEach(function(m){let w=l.multi_bd[m],M=parseFloat(w.slice(0,-1));if(M!=0&&!isNaN(M)){let F=M>0?"success":"danger",x=m.replace(/\+.+$/,"");m=m.replace(/'/g,"\\'"),o.append(`${x} {{ craft.multi_bd['${m}'] | translate }}
`)}});let d=$('
'),h=$(`${t("craft_tools_multi")}
`);d.append(h);let _=0;if(Object.keys(l.add_bd).forEach(function(m){let w=l.add_bd[m],M=parseFloat(w.slice(0,-1));if(M!=0&&!isNaN(M)){_++;let F=M>0?"success":"danger",x=m.replace(/\+.+$/,"");m=m.replace(/'/g,"\\'"),d.append(`${x} {{ craft.add_bd['${m}'] | translate }}
`)}}),_>0&&c.append(d),v.p.consume&&v.p.consume[a]){let m=$('
'),w=0;Object.keys(v.p.consume[a]).forEach(function(M){let F=v.p.consume[a][M];if(F!=0&&!isNaN(F)){w++;let x=F>0?"success":"danger",j=M.replace(/\+.+$/,"");M=M.replace(/'/g,"\\'"),m.append(`${j} {{ consume.${a}['${M}'] | fix | translate }}
`)}}),w>0&&c.append(m)}return e.resource[a].diff<0&&e.resource[a].amount>0&&n.append(`${t("to_empty")} {{ res.amount | counter }}
`),s&&(n.append('
'),n.append(s)),n},{in:function(){D({el:"#popper > div",data:{[a]:v.p[a],res:e.resource[a],consume:v.p.consume,craft:Ua(a,i)},filters:{translate(n){let c=n[n.length-1],l=parseFloat(n.slice(0,-1)),o=l>0&&l<1||l<0&&l>-1?4:l>0&&l<10||l<0&&l>-10?3:2;l=+l.toFixed(o);let d=c==="%"?"%":"";if(l>0)return"+"+Ee(l,o)+d;if(l<0)return Ee(l,o)+d},fix(n){return n+"v"},counter(n){let c=-e.resource[a].diff,l=+(n/c).toFixed(0);if(l>60){let o=l%60,d=(l-o)/60;if(d>=60){let h=d%60;return`${(d-h)/60}h ${h}m`}else return`${d}m ${o}s`}else return`${l}s`},namespace(n){return n.replace("_"," ")}}})},out:function(){D({el:"#popper > div"},"destroy")},classes:"breakdown has-background-light has-text-dark",prop:{modifiers:{preventOverflow:{enabled:!1},hide:{enabled:!1}}}})}function Jo(r,a,i){pe(`${r}`,function(){let s=$('{{ res.name | namespace }}
'),n=$('
');s.append(n);let c=!1;if(v[i][a]){let o=$("
");n.append(o);let d=[a];d.push("Global");for(var l=0;l0?"success":"danger",F=_.replace(/\+.+$/,"");_=_.replace(/'/g,"\\'"),o.append(`${F} {{ ${h}['${_}'] | translate }}
`)}})}}if(v[i].consume&&v[i].consume[a]){let o=$(`
`),d=0;Object.keys(v[i].consume[a]).forEach(function(h){let _=v[i].consume[a][h];if(_!=0&&!isNaN(_)){d++;let m=_>0?"success":"danger",w=h.replace(/\+.+$/,"");h=h.replace(/'/g,"\\'"),o.append(`${w} {{ consume.${a}['${h}'] | fix | translate }}
`)}}),d>0&&n.append(o)}if(i==="p"){let o=e.resource[a].diff>0?"success":"danger";s.append(`{{ res.diff | direction }} {{ res.amount | counter }}
`)}return s},{in:function(){D({el:"#popper > div",data:{Global:v[i].Global,[a]:v[i][a],consume:v[i].consume,res:e.resource[a]},filters:{translate(s){let n=s[s.length-1],c=parseFloat(s.slice(0,-1)),l=c>0&&c<1||c<0&&c>-1?4:c>0&&c<10||c<0&&c>-10?3:2,o=n==="%"?"%":"";if(c>0)return"+"+Ee(c,l)+o;if(c<0)return Ee(c,l)+o},fix(s){return s+"v"},counter(s){let n=e.resource[a].diff,c=0;if(n<0?(n*=-1,c=+(s/n).toFixed(0)):c=+((e.resource[a].max-s)/n).toFixed(0),c===1/0||Number.isNaN(c))return"Never";if(c>60){let l=c%60,o=(c-l)/60;if(o>=60){let d=o%60;return`${(o-d)/60}h ${d}m`}else return`${o}m ${l}s`}else return`${c}s`},direction(s){return s>=0?t("to_full"):t("to_empty")},namespace(s){return s.replace("_"," ")}}})},out:function(){D({el:"#popper > div"},"destroy")},classes:"breakdown has-background-light has-text-dark",prop:{modifiers:{preventOverflow:{enabled:!1},hide:{enabled:!1}}}})}function Tu(){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==0))return;let r=e.race.no_trade?" nt":"";var a=$(`${t("resource_market_trade_routes")} / {{ mtrade }}
`);a.append($(`${t("cancel_all_routes")} `)),$("#market").append(a),D({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,ks(i))})}},filters:{tdeCnt(i){let s=jt(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}}}),pe("tradeTotalPopover",function(){let i=$('
');return v.hasOwnProperty("t_route")&&Object.keys(v.t_route).forEach(function(s){v.t_route[s]>0&&i.append(`${s} +${v.t_route[s]}
`)}),i.append(`${t("resource_market_trade_routes")} ${e.city.market.mtrade}
`),i},{elm:"#tradeTotalPopover > span"})}function Eu(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==1))){var r=$(`${t("resource_Crates_name")} {{ cr.amount }} / {{ cr.max }} ${t("resource_Containers_name")} {{ cn.amount }} / {{ cn.max }}
`);$("#resStorage").append(r),D({el:"#crateTotal",data:{cr:e.resource.Crates,cn:e.resource.Containers}})}}function ks(r){$(`#market-${r} .trade .current`).removeClass("has-text-warning"),$(`#market-${r} .trade .current`).removeClass("has-text-danger"),$(`#market-${r} .trade .current`).removeClass("has-text-success"),e.resource[r].trade>0?$(`#market-${r} .trade .current`).addClass("has-text-success"):e.resource[r].trade<0?$(`#market-${r} .trade .current`).addClass("has-text-danger"):$(`#market-${r} .trade .current`).addClass("has-text-warning")}function cl(){let r=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"),a=e.race.kindling_kindred||e.race.smoldering?200:10;return t("resource_modal_crate_construct_desc",[a,r,Zi()])}function ol(){return t("resource_modal_container_construct_desc",[125,Ji()])}function Cn(r,a){switch(r){case"crate":fc(a);break;case"container":mc(a);break}}function fc(r){let a=r||fe(),i=e.race.kindling_kindred||e.race.smoldering?e.race.smoldering?"Chrysotile":"Stone":"Plywood",s=e.race.kindling_kindred||e.race.smoldering?200:10;a+e.resource.Crates.amount>e.resource.Crates.max&&(a=e.resource.Crates.max-e.resource.Crates.amount),e.resource[i].amount=s*a&&e.resource.Crates.amounte.resource.Containers.max&&(a=e.resource.Containers.max-e.resource.Containers.amount),e.resource.Steel.amount<125*a&&(a=Math.floor(e.resource.Steel.amount/125)),e.resource.Steel.amount>=125*a&&e.resource.Containers.amount{{ name }} - {{ amount | size }}/{{ max | size }}'));let a=$('
');if($("#modalBox").append(a),r==="Food"&&!e.race.artifical||e.race.artifical&&r==="Coal"){let o=jt(7,10);o.length>0&&$("#modalBoxTitle").prepend(o)}if(r==="Stone"){let o=ar(1,12,!1);o.length>0&&$("#modalBoxTitle").prepend(o)}let i=$('
');a.append(i),i.append($(`${t("resource_modal_crate_owned")} {{ crates.amount }}/{{ crates.max }} ${t("resource_modal_crate_assigned")} {{ res.crates }}
`));let s=$(`${t("resource_modal_crate_construct")} `),n=$(`${t("resource_modal_crate_unassign")} `),c=$(`${t("resource_modal_crate_assign")} `);if(i.append(s),i.append(n),i.append(c),D({el:"#modalCrates",data:{crates:e.resource.Crates,res:e.resource[r]},methods:{buildCrate(){fc()},subCrate(o){al(o)},addCrate(o){il(o)}}}),e.resource.Containers.display){let o=$('
');a.append(o),o.append($(`${t("resource_modal_container_owned")} {{ containers.amount }}/{{ containers.max }} ${t("resource_modal_container_assigned")} {{ res.containers }}
`));let d=$(`${t("resource_modal_container_construct")} `),h=$(`${t("resource_modal_container_unassign")} `),_=$(`${t("resource_modal_container_assign")} `);o.append(d),o.append(h),o.append(_),D({el:"#modalContainers",data:{containers:e.resource.Containers,res:e.resource[r]},methods:{buildContainer(){mc()},removeContainer(m){sl(m)},addContainer(m){nl(m)}}})}D({el:"#modalBoxTitle",data:e.resource[r],filters:{size:function(o){return Ee(o,0)},diffSize:function(o){return Ee(o,2)}}});function l(o,d){if(o==="modalContainers"){let h=Ji();switch(d){case"assign":return t("resource_modal_container_assign_desc",[h]);case"unassign":return t("resource_modal_container_unassign_desc",[h]);case"construct":return ol()}}else{let h=Zi();switch(d){case"assign":return t("resource_modal_crate_assign_desc",[h]);case"unassign":return t("resource_modal_crate_unassign_desc",[h]);case"construct":return cl()}}}["modalCrates","modalContainers"].forEach(function(o){["assign","unassign","construct"].forEach(function(d){pe(`${o}${d}`,l(o,d),{elm:$(`#${o} > .${d}`),attach:"#main"})})})}function ll(){e.settings.showResources||(e.settings.marketTabs=1),e.settings.showResources=!0,e.settings.showStorage=!0,Ha("storage"),Ot()}function ul(){e.resource.Crates.display||(I(t("city_storage_yard_msg"),"info",!1,["progress"]),e.resource.Crates.display=!0,ll())}function Yr(){e.resource.Containers.display||(I(t("city_warehouse_msg"),"info",!1,["progress"]),e.resource.Containers.display=!0,ll())}function Zi(){let r=e.tech.container&&e.tech.container>=2?500:350;e.tech.container&&e.tech.container>=4&&(r+=e.tech.container>=5?500:250),e.tech.container&&e.tech.container>=6&&(r+=e.tech.container>=7?1200:500),e.tech.container&&e.tech.container>=8&&(r+=4e3),e.race.pack_rat&&(r*=1+b.pack_rat.vars()[0]/100);let a=ve("kobold");return a>0&&(r*=1+b.pack_rat.vars(1)[0]/100*a),e.stats.achieve.banana&&e.stats.achieve.banana.l>=3&&(r*=1.1),r*=e.stats.achieve.blackhole?1+e.stats.achieve.blackhole.l*.05:1,Math.round(H(r))}function Ji(){let r=e.tech.steel_container&&e.tech.steel_container>=3?1200:800;e.tech.steel_container&&e.tech.steel_container>=4&&(r+=e.tech.steel_container>=5?1e3:400),e.tech.steel_container&&e.tech.steel_container>=6&&(r+=e.tech.steel_container>=7?7500:1e3),e.tech.steel_container&&e.tech.steel_container>=8&&(r+=8e3),e.race.pack_rat&&(r*=1+b.pack_rat.vars()[0]/100);let a=ve("kobold");return a>0&&(r*=1+b.pack_rat.vars(1)[0]/100*a),r*=e.stats.achieve.blackhole?1+e.stats.achieve.blackhole.l*.05:1,Math.round(H(r))}function Yo(){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==0))return;let r=$(``);le($("#market")),$("#market").append(r),Lu()}function Xo(){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==1))return;let r=$(``);le($("#resStorage")),$("#resStorage").append(r),e.resource.Crates&&e.resource.Containers&&(r.append($(`${t("resource_modal_crate_construct")} `)),r.append($(`${t("resource_modal_container_construct")} `)),D({el:"#createHead",data:{cr:e.resource.Crates,cn:e.resource.Containers},methods:{crate(){fc()},container(){mc()},buildCrateDesc(){return cl()},buildContainerDesc(){return ol()}}}))}function Lu(){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==0))return;let r=$("#market-qty");le(r),e.race.no_trade||(r.append($(`${t("resource_trade_qty")} `)),r.append($('- + '))),D({el:"#market-qty",data:e.city.market,methods:{val(){e.city.market.qty<1?e.city.market.qty=1:e.city.market.qty>_c()&&(e.city.market.qty=_c())},limit(){return _c()},less(){e.city.market.qty-=fe()},more(){e.city.market.qty+=fe()}}})}function _c(){return e.tech.currency>=6?1e6:e.tech.currency>=4?5e3:100}function el(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==2))&&(le($("#resEjector")),e.interstellar.mass_ejector)){let r=$(`
${t("interstellar_mass_ejector_vol")} `);$("#resEjector").append(r);let a=$(' ');r.append(a),a.append($(`{{ total }} / {{ on | max }}{{ on | real }} ${t("interstellar_mass_ejector_mass")}: {{ mass | approx }} kt/s `)),D({el:"#eject",data:e.interstellar.mass_ejector,filters:{max(i){return i*1e3},real(i){return k.mass_ejector${e.resource[r].name} `);$("#resEjector").append(i);let s=$(' ');i.append(s),s.append($(`« `)),s.append($(`{{ e.${r} }} `)),s.append($(`» `)),s.append($(`${t("interstellar_mass_ejector_per")}: ${Mt[r]} kt `)),e.interstellar.mass_ejector.hasOwnProperty(r)||(e.interstellar.mass_ejector[r]=0),D({el:`#eject${r}`,data:{r:e.resource[r],e:e.interstellar.mass_ejector},methods:{ejectMore(n){let c=fe();c+e.interstellar.mass_ejector.total>k.mass_ejector*1e3&&(c=k.mass_ejector*1e3-e.interstellar.mass_ejector.total),e.interstellar.mass_ejector[n]+=c,e.interstellar.mass_ejector.total+=c},ejectLess(n){let c=fe();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 tl(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==3))&&(le($("#resCargo")),e.portal.transport)){let r=$(`
${t("portal_transport_supply")} `);$("#resCargo").append(r);let a=$('{{ used }} / {{ max }} ');r.append(a),D({el:"#spireSupply",data:e.portal.transport.cargo})}}function Xn(r,a){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==3))&&ya[r]&&e.portal.transport){let i=$(`
${e.resource[r].name} `);$("#resCargo").append(i);let s=$(' ');i.append(s),s.append($(`« `)),s.append($(`{{ e.${r} }} `)),s.append($(`» `));let n=Ee(ya[r].out);s.append($(`${t("portal_transport_item",[`${n} `,`${ya[r].in} `])} `)),e.portal.transport.cargo.hasOwnProperty(r)||(e.portal.transport.cargo[r]=0),D({el:`#supply${r}`,data:{r:e.resource[r],e:e.portal.transport.cargo},methods:{supplyMore(c){let l=fe();l+e.portal.transport.cargo.used>e.portal.transport.cargo.max&&(l=e.portal.transport.cargo.max-e.portal.transport.cargo.used,e.portal.transport.cargo[c]+l<0&&(l=-e.portal.transport.cargo[c])),e.portal.transport.cargo[c]+=l,e.portal.transport.cargo.used+=l},supplyLess(c){let l=fe();l>e.portal.transport.cargo[c]&&(l=e.portal.transport.cargo[c]),e.portal.transport.cargo[c]>0&&(e.portal.transport.cargo[c]-=l,e.portal.transport.cargo.used-=l)}}})}}function rl(){!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==4)||le($("#resAlchemy"))}function ec(r,a,i){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==4))&&!(e.race.artifical&&r==="Food")&&e.tech.alchemy&&(i||e.tech.alchemy>=2)&&r!=="Crystal"){let s=$(`
${e.resource[r].name} `);$("#resAlchemy").append(s);let n=$(' ');s.append(n),n.append($(`« `)),n.append($(`{{ a.${r} }} `)),n.append($(`» `)),e.race.alchemy.hasOwnProperty(r)||(e.race.alchemy[r]=0),D({el:`#alchemy${r}`,data:{r:e.resource[r],a:e.race.alchemy},methods:{addSpell(c){let l=fe();for(let o=0;o=1;o++)e.race.alchemy[c]++,e.resource.Mana.diff--},subSpell(c){let l=fe();for(let o=0;o0;o++)e.race.alchemy[c]--,e.resource.Mana.diff++}}}),pe(`alchemy${r}`,function(){let c=i&&e.tech.alchemy>=2?sr[r]*8:sr[r]*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[r].name])}
`)},{elm:`#alchemy${r} h3`})}}var H=function(){var r={};return function(a,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(r[n]||(r[n]={}),!r[n][c]||s){let l=1,o=!!(e.race.cataclysm||e.race.orbit_decayed);if(e.genes.store){let d=0;if(!i||i&&(i==="plasmid"&&e.race.universe!=="antimatter"||i==="anti"&&e.race.universe==="antimatter")){d=e.race.universe==="antimatter"?e.prestige.AntiPlasmid.count:e.prestige.Plasmid.count;let _=d;e.race.no_plasmid?_=Math.min(e.race.p_mutation,d):e.race.nerfed&&(_=Math.floor(d/(e.race.universe==="antimatter"?2:5))),d=Math.round(_*(e.race.nerfed?.5:1))}(!i||i&&i==="phage")&&e.genes.store>=4&&(d+=Math.round(e.prestige.Phage.count*(e.race.nerfed?1/3:1)));let h=e.genes.store>=2?e.genes.store>=3?1250:1666:2500;if(e.race.universe==="antimatter"&&(h*=2),e.genes.bleed&&e.genes.bleed>=3&&(!i||i&&(i==="plasmid"&&e.race.universe==="antimatter"||i==="anti"&&e.race.universe!=="antimatter"))){let _=e.race.universe==="antimatter"?e.prestige.Plasmid.count/5:e.prestige.AntiPlasmid.count/10;d+=Math.round(_*(e.race.nerfed?.5:1))}l*=1+d/h}if(e.race.universe==="standard"&&(l*=ft("standard")),e.race.universe==="antimatter"&&(!o&&e.city.temple&&e.city.temple.count||o&&e.space.ziggurat&&e.space.ziggurat.count)){let d=.06;if(e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let h=e.genes.ancients>=5?.0012:e.genes.ancients>=3?.001:8e-4;e.race.high_pop&&(h=xe(h)),d+=h*e.civic.priest.workers}l*=1+(o?e.space.ziggurat.count:e.city.temple.count)*d}if(!i&&e.pillars){let d=ea();l*=d[1]}r[n]={},r[n][c]=l}return i?r[n][c]*a:Math.round(r[n][c]*a)}}();function gc(){if(e.race.no_plasmid||e.race.universe==="antimatter"){let r=!!(e.race.cataclysm||e.race.orbit_decayed);if(r&&e.space.ziggurat&&e.space.ziggurat.count||e.city.temple&&e.city.temple.count){let a=e.tech.anthropology&&e.tech.anthropology>=1?.016:.01;if(e.tech.fanaticism&&e.tech.fanaticism>=2){let s=e.civic.professor.workers*(e.race.universe==="antimatter"?2e-4:4e-4);e.race.high_pop&&(s=xe(s)),a+=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;e.race.high_pop&&(s=xe(s)),a+=s*e.civic.priest.workers}e.race.universe==="antimatter"?a/=e.race.nerfed?3:2:e.race.nerfed&&(a/=2),e.race.spiritual&&(a*=1+b.spiritual.vars()[0]/100);let i=ve("seraph");return i>0&&(a*=1+b.spiritual.vars(1)[0]/100*i),e.civic.govern.type==="theocracy"&&(a*=1.12),e.race.ooze&&(a*=1-b.ooze.vars()[1]/100),(r?e.space.ziggurat.count:e.city.temple.count)*a}}return 0}var Vi=function(){var r={};return function(a){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",k.alien_outpost||"0"].join("-");if(!r[i]){let s=0,n=0;if(e.race.universe!=="antimatter"||e.genes.bleed){let l=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&&(l*=.025),e.race.decayed&&(l-=Math.round((e.stats.days-e.race.decayed)/(300+e.race.gene_fortify*6)));let o=250+e.prestige.Phage.count;l>o?s=+(Math.log(o+50)-3.91202).toFixed(5)/2.888+Math.log(l+1-o)/Math.LN2/250:l<0?s=0:s=+(Math.log(l+50)-3.91202).toFixed(5)/2.888,e.tech.outpost_boost&&e.race.truepath&&k.alien_outpost&&(s*=2);let d=0;if(e.race.orbit_decayed&&e.space.ziggurat?d=e.space.ziggurat.count:e.city.temple&&(d=e.city.temple.count),d>0&&!e.race.no_plasmid&&e.race.universe!=="antimatter"){let h=e.tech.anthropology&&e.tech.anthropology>=1?.08:.05;if(e.tech.fanaticism&&e.tech.fanaticism>=2){let m=e.civic.professor.workers*.002;e.race.high_pop&&(m=xe(m)),h+=m}if(e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let m=e.genes.ancients>=5?.0015:e.genes.ancients>=3?.00125:.001;e.race.high_pop&&(m=xe(m)),h+=m*e.civic.priest.workers}e.race.spiritual&&(h*=1+b.spiritual.vars()[0]/100);let _=ve("seraph");_>0&&(h*=1+b.spiritual.vars(1)[0]/100*_),e.civic.govern.type==="theocracy"&&(h*=1.12),e.race.ooze&&(h*=1-b.ooze.vars()[1]/100),e.race.orbit_decayed&&e.race.truepath&&(h*=.1),s*=1+d*h}}if(e.race.universe==="antimatter"||e.genes.bleed&&e.genes.bleed>=2){let l=e.prestige.AntiPlasmid.count;e.race.universe!=="antimatter"&&e.genes.bleed&&e.genes.bleed>=2&&(l*=.25),e.race.decayed&&(l-=Math.round((e.stats.days-e.race.decayed)/(300+e.race.gene_fortify*6)));let o=250+e.prestige.Phage.count;l>o?n=+(Math.log(o+50)-3.91202).toFixed(5)/2.888+Math.log(l+1-o)/Math.LN2/250:l<0?n=0:n=+(Math.log(l+50)-3.91202).toFixed(5)/2.888,e.tech.outpost_boost&&e.race.truepath&&k.alien_outpost&&(n*=2),n/=3}e.race.nerfed&&(e.race.universe==="antimatter"?(s/=2,n/=2):(s/=5,n/=5)),r={};let c=(1+s)*(1+n)-1;r[i]=[c,s,n]}return a&&a==="raw"?r[i]:a&&a==="plasmid"?r[i][1]:a&&a==="antiplasmid"?r[i][2]:r[i][0]}}();var ui={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 u($(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 u($(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 u($(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 u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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!!u($(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!!u($(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 u($(this)[0])?(e.city.basic_housing={count:0},!0):!1}},cottage:{id:"tech-cottage",title(){return St("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 u($(this)[0])?(e.city.cottage={count:0},!0):!1}},apartment:{id:"tech-apartment",title(){return St("large")},desc(){return St("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 u($(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 u($(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 r=St("small"),a=St("medium");return t("tech_steel_beams_effect",[r,a])},action(){return!!u($(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 r=St("small"),a=St("medium");return t("tech_mythril_beams_effect",[r,a])},action(){return!!u($(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 r=St("small"),a=St("medium");return t("tech_neutronium_walls_effect",[r,a])},action(){return!!u($(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 r=St("small"),a=St("medium");return t("tech_bolognium_alloy_beams_effect",[r,a])},action(){return!!u($(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!!u($(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!!u($(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 u($(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 u($(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 u($(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 u($(this)[0])?(e.resource.Energy.display=!0,e.settings.showPsychic=!0,e.race.psychicPowers={boost:{r:"Food"},boostTime:0},!0):!1},post(){Ct()}},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 u($(this)[0])?(e.race.psychicPowers.assaultTime=0,!0):!1},post(){Ct()}},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 u($(this)[0])?(e.race.psychicPowers.cash=0,!0):!1},post(){Ct()}},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 u($(this)[0])?(e.race.psychicPowers.channel={cash:0,assault:0,boost:0},!0):!1},post(){Ct()}},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!!u($(this)[0])},post(){Ct()}},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!!u($(this)[0])},post(){Ct()}},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!!u($(this)[0])},post(){Ct()}},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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(this)[0])?(Lr("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 u($(this)[0])?(Lr("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 u($(this)[0])?(Lr("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 u($(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 u($(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!!u($(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!!u($(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!!u($(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 u($(this)[0])?(Lr("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!!u($(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!!u($(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 u($(this)[0])?(Lr("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 u($(this)[0])?(Lr("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!!u($(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!!u($(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 u($(this)[0])?(Lr("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!!u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(this)[0])}},banquet:{id:"tech-banquet",title:t("tech_banquet"),desc:t("tech_banquet"),category:"special",era:"discovery",reqs:{high_tech:2},grant:["banquet",1],not_trait:["fasting"],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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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(){return!!u($(this)[0])},post(){rt()}},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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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!!u($(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!!u($(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!!u($(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",[dr()])},action(){return!!u($(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",[dr()])},action(){return!!u($(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 u($(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 u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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 u($(this)[0])?(e.city.metal_refinery={count:0,on:0},Lt(),!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!!u($(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 u($(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,ue())}},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 u($(this)[0])?(e.resource.Steel.display=!0,!0):!1},post(){rt(),Ct()}},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!!u($(this)[0])},post(){e.race.steelen&&(e.tech.smelting=6,ue())}},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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(this)[0])},post(){rt()}},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!!u($(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!!u($(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 u($(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 u($(this)[0])?(e.resource.Iron.display=!0,e.city.foundry&&e.city.foundry.count>0&&(e.resource.Wrought_Iron.display=!0,Lt()),!0):!1},post(){Ct()}},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 u($(this)[0])?(e.city.coal_mine={count:0,on:0},e.resource.Coal.display=!0,!0):!1},post(){Ct()}},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 u($(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!!u($(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!!u($(this)[0])},post(){Qr(!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!!u($(this)[0])},post(){Qr(!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!!u($(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!!u($(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!!u($(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 u($(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 r=t("resource_Bones_name");return e.race.smoldering?r=t("resource_Chrysotile_name"):e.race.kindling_kindred&&(r=t("resource_Stone_name")),t("tech_reinforced_crates_alt_effect",[r])}else return t("tech_reinforced_crates_effect")},action(){return u($(this)[0])?(D({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!!u($(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 u($(this)[0])?(D({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 u($(this)[0])?(D({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 u($(this)[0])?(D({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 u($(this)[0])?(D({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!!u($(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 r=e.race.kindling_kindred||e.race.smoldering?e.race.smoldering?"Chrysotile":"Stone":"Plywood";return t("tech_steel_containers_alt_effect",[e.resource[r].name,e.resource.Steel.name])}else return t("tech_steel_containers_effect",[e.resource.Steel.name])},action(){return u($(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!!u($(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 u($(this)[0])?(D({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 u($(this)[0])?(D({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 u($(this)[0])?(D({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 u($(this)[0])?(D({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!!u($(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!!u($(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 u($(this)[0])?(e.queue.display=!0,!0):!1},post(){zr()}},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 u($(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(){zr()}},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!!u($(this)[0])},post(){zr()}},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!!u($(this)[0])},post(){zr()}},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 u($(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!!u($(this)[0])},post(){D({el:"#govType"},"update"),D({el:"#foreign"},"update"),D({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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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||_r()},grant:["gov_fed",1],cost:{Knowledge(){return 3e4}},effect:t("tech_federation_effect"),action(){return!!u($(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!!u($(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 u($(this)[0])?(e.settings.showGovernor=!0,!0):!1},post(){Ot()}},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!!u($(this)[0])},post(){D({el:"#foreign"},"update"),Ot()}},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 u($(this)[0])?(e.settings.msgFilters.spy.unlocked||(e.settings.msgFilters.spy.unlocked=!0,e.settings.msgFilters.spy.vis=!0),!0):!1},post(){D({el:"#foreign"},"update"),Ot()}},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!!u($(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!!u($(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!!u($(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 u($(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 u($(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 u($(this)[0])?(e.civic.taxes.display=!0,!0):!1},post(){Ot()}},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!!u($(this)[0])},post(){e.race.noble&&(e.tech.currency=5,ue())}},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!!u($(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!!u($(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 u($(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!!u($(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!!u($(this)[0])},post(){e.tech.high_tech>=6&&Ue("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 u($(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 u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(this)[0])}},swiss_banking:{id:"tech-swiss_banking",title:ln(),desc:ln(),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!!u($(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!!u($(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!!u($(this)[0])},post(){Ue("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!!u($(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!!u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(this)[0])?(e.arpa.m_type=Ue("Monument"),!0):!1},post(){Ue("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 u($(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!!u($(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 u($(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 u($(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!!u($(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!!u($(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!!u($(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",[dr(),e.civic.scientist?e.civic.scientist.name:t("job_scientist")])},action(){return!!u($(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",[dr()])},action(){return!!u($(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 u($(this)[0])?(e.race.toxic&&e.race.species==="troll"&&ie("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 u($(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",[W().dwarf])},action(){return u($(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 u($(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!!u($(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!!u($(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"),dr()])},action(){return!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(this)[0])?(e.resource.Codex.display=!1,!0):!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 u($(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 u($(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(){Ue("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 u($(this)[0])?(e.settings.arpa.crispr=!0,e.settings.arpa.arpaTabs=2,!0):!1},post(){Ue("Genetics"),Ue("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 u($(this)[0])?(e.arpa.sequence.boost=!0,!0):!1},post(){Ue("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 u($(this)[0])?(e.resource.Genes.display=!0,!0):!1},post(){Ue("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 u($(this)[0])?(e.arpa.sequence.auto=!0,!0):!1},post(){Ue("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!!u($(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 u($(this)[0])?(e.race.terrifying&&(e.civic.taxes.display=!0),e.city.wardenclyffe={count:0,on:0},!0):!1},post(){e.race.terrifying&&Ot()}},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 u($(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,ca(),!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(u($(this)[0])){if(e.race.universe==="antimatter"&&e.race.amexplode){De("annihilation"),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),$("body").addClass("nuke");let r=$('
');$("body").append(r),setTimeout(function(){r.addClass("burn")},500),setTimeout(function(){r.addClass("b")},600),setTimeout(function(){window.soft_reset()},4e3)}else e.race.replicator={res:"Stone",pow:1};return!0}return!1},post(){Ot()}},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 u($(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(){Ct()}},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 u($(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 u($(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 u($(this)[0])?(e.settings.showGenetics=!0,e.settings.arpa.physics=!0,e.race.truepath&&!e.tech.unify&&(e.tech.unify=1),!0):!1},post(){Ue("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 u($(this)[0])?(e.race.truepath&&!e.tech.rival&&(e.tech.rival=1,I(t("civics_rival_unlocked",[ut(3)]),"info",!1,["progress","combat"])),!0):!1},post(){Ue("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!!u($(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 u($(this)[0])?(e.race.cataclysm&&ie("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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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 u($(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!!u($(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 u($(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!!u($(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 u($(this)[0])?(e.settings.arpa.blood=!0,Ue("Crispr"),!0):!1},post(){Ue("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!!u($(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 u($(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"],cost:{Species(){return Si(1e3)},Knowledge(){return 55e6},Demonic_Essence(){return 1}},effect(){return`${t("tech_demonic_infusion_effect")}
${t("tech_demonic_infusion_effect2",[ct("descend").artifact])}
`},action(){return u($(this)[0])&&Ts(),!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 u($(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 u($(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 u($(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 u($(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!!u($(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 u($(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 u($(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 u($(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 u($(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 u($(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!!u($(this)[0])}},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 u($(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 u($(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 u($(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 u($(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!!u($(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 u($(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",[W().red])},action(){return u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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 u($(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!!u($(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!!u($(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",[W().gas_moon])},action(){return u($(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 u($(this)[0])?(e.resource.Uranium.display=!0,!0):!1},post(){Ct()}},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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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 u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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 u($(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 u($(this)[0])?(e.resource.Polymer.display=!0,I(t("tech_polymer_avail"),"info",!1,["progress"]),!0):!1},post(){rt(),Ct()}},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!!u($(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!!u($(this)[0])},post(){rt()}},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 u($(this)[0])?(e.resource.Nanoweave.display=!0,I(t("tech_nanoweave_avail"),"info",!1,["progress"]),Lt(),!0):!1},post(){Ct()}},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 u($(this)[0])?(e.resource.Stanene.display=!0,I(t("tech_stanene_avail"),"info",!1,["progress"]),!0):!1},post(){rt(),Ct()}},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 u($(this)[0])?(e.resource.Nano_Tube.display=!0,I(t("tech_nano_tubes_msg"),"info",!1,["progress"]),!0):!1},post(){rt(),Ct()}},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(u($(this)[0])){if(e.resource.Scarletite.display=!0,e.portal.hell_forge={count:0,on:0},I(t("tech_scarletite_avail"),"info",!1,["progress"]),Lt(),e.race.universe!=="micro"&&!e.pillars[e.race.species])e.tech.fusable=1;else{let r=Jt();r>e.pillars[e.race.species]&&(e.pillars[e.race.species]=r),e.tech.pillars=2}return!0}return!1},post(){Ct()}},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 u($(this)[0])?(I(t("tech_pillars_msg",[A[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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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!!u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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!!u($(this)[0])},post(){Ot()}},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!!u($(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!!u($(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!!u($(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 u($(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 u($(this)[0])?(e.civic.garrison.mercs=!0,!0):!1},post(){Ot()}},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!!u($(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 u($(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!!u($(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 u($(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!!u($(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!!u($(this)[0])},post(){D({el:"#garrison"},"update"),D({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!!u($(this)[0])},post(){D({el:"#garrison"},"update"),D({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!!u($(this)[0])},post(){D({el:"#garrison"},"update"),D({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!!u($(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!!u($(this)[0])},post(){D({el:"#garrison"},"update"),D({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 u($(this)[0])?(e.race.species==="sharkin"&&ie("laser_shark"),!0):!1},post(){D({el:"#garrison"},"update"),D({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!!u($(this)[0])},post(){D({el:"#garrison"},"update"),D({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!!u($(this)[0])},post(){D({el:"#garrison"},"update"),D({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!!u($(this)[0])},post(){D({el:"#garrison"},"update"),D({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!!u($(this)[0])},post(){D({el:"#garrison"},"update"),D({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",[W().red])}
`},action(){return u($(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!!u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(this)[0])},post(){D({el:"#fort"},"update"),Qr(!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!!u($(this)[0])},post(){D({el:"#fort"},"update"),Qr(!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!!u($(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!!u($(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!!u($(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 u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(this)[0])?(e.resource.Titanium.value=ta.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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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(r=>r.id==="tech-anthropology")},cost:{Knowledge(){return 2500}},effect:`${t("tech_fanaticism_effect")}
${t("tech_fanaticism_warning")}
`,action(){return u($(this)[0])?(e.tech.fanaticism=1,e.race.gods===e.race.species&&ie("second_evolution"),on(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 u($(this)[0])?(e.tech.theology===2&&(e.tech.theology=3),e.race.gods===e.race.species&&ie("second_evolution"),on(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 r=e.race.old_gods!=="none"?A[e.race.old_gods.toLowerCase()].entity:A[e.race.species].entity,a=e.race.gods!=="none"?A[e.race.gods.toLowerCase()].entity:A[e.race.species].entity;return t("tech_ancient_theology_effect",[r,a])},action(){return u($(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(r=>r.id==="tech-deify")},cost:{Knowledge(){return 195e3}},effect(){let r=e.race.old_gods!=="none"?A[e.race.old_gods.toLowerCase()].entity:A[e.race.species].entity;return`${t("tech_study_effect",[r])}
${t("tech_study_warning")}
`},action(){return u($(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!!u($(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(r=>r.id==="tech-study")},cost:{Knowledge(){return 195e3}},effect(){let r=e.race.old_gods!=="none"?A[e.race.old_gods.toLowerCase()].entity:A[e.race.species].entity;return`${t("tech_deify_effect",[r])}
${t("tech_deify_warning")}
`},action(){return u($(this)[0])?(e.tech.ancient_deify=1,on(e.race.old_gods),Ue("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!!u($(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!!u($(this)[0])},post(){e.race.terrifying&&(e.tech.fanaticism=3,ue())}},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!!u($(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!!u($(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(r=>r.id==="tech-fanaticism")},cost:{Knowledge(){return 2500}},effect:`${t("tech_anthropology_effect")}
${t("tech_anthropology_warning")}
`,action(){return u($(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 u($(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!!u($(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!!u($(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!!u($(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 u($(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 u($(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 u($(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 u($(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",[W().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",[W().red])},action(){return u($(this)[0])?(e.space.biodome={count:0,on:0},!0):!1}},red_tower:{id:"tech-red_tower",title(){return t("tech_red_tower",[W().red])},desc(){return t("tech_red_tower",[W().red])},category:"space_exploration",era:"early_space",reqs:{mars:2},grant:["mars",3],cost:{Knowledge(){return 195e3}},effect(){return t("tech_red_tower_effect",[W().red])},action(){return u($(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",[W().red])},action(){return u($(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 u($(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!!u($(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!!u($(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 u($(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",[A[e.race.species].home,W().hell])},action(){return u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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 u($(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 u($(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 u($(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 u($(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",[W().red])},action(){return!!u($(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 u($(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",[W().gas])},action(){return!!u($(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!!u($(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 u($(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 u($(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 u($(this)[0])?(e.space.elerium_ship={count:0,on:0},e.race.cataclysm&&ie("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!!u($(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!!u($(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!!u($(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 u($(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",[W().red])},action(){return!!u($(this)[0])}},unification:{id:"tech-unification",title:t("tech_unification"),desc(){return t("tech_unification_desc",[A[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!!u($(this)[0])}},unification2:{id:"tech-unification2",title:t("tech_unification"),desc(){return t("tech_unification_desc",[A[e.race.species].home])},category:"special",era:"early_space",path:["standard"],reqs:{unify:1},grant:["unify",2],cost:{Bool(){let r=0;for(let a=0;a<3;a++)(e.civic.foreign[`gov${a}`].occ||e.civic.foreign[`gov${a}`].buy||e.civic.foreign[`gov${a}`].anx)&&r++;return r===3}},effect(){let r=e.race.banana?`${t("tech_unification_banana")}
`:"";return`${t("tech_unification_effect2")}
${t("tech_unification_warning")}
${r}`},action(){return u($(this)[0])?(e.race.banana&&(e.sim||Se.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&&ie("world_domination"),e.civic.foreign.gov0.anx&&e.civic.foreign.gov1.anx&&e.civic.foreign.gov2.anx&&ie("illuminati"),e.civic.foreign.gov0.buy&&e.civic.foreign.gov1.buy&&e.civic.foreign.gov2.buy&&ie("syndicate"),e.stats.attacks===0&&ie("pacifist"),dl(),!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 r=0;for(let a=0;a<3;a++)(e.civic.foreign[`gov${a}`].occ||e.civic.foreign[`gov${a}`].buy||e.civic.foreign[`gov${a}`].anx)&&r++;return r===3}},effect(){return`${t("tech_unite_effect")}
${t("tech_unification_effect2")}
`},action(){return u($(this)[0])?(e.race.banana&&(e.sim||Se.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&&ie("world_domination"),e.civic.foreign.gov0.anx&&e.civic.foreign.gov1.anx&&e.civic.foreign.gov2.anx&&ie("illuminati"),e.civic.foreign.gov0.buy&&e.civic.foreign.gov1.buy&&e.civic.foreign.gov2.buy&&ie("syndicate"),e.stats.attacks===0&&ie("pacifist"),dl(),e.race.truepath&&!e.tech.rival&&(e.tech.rival=1,I(t("civics_rival_unlocked",[ut(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!!u($(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 u($(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 u($(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 u($(this)[0])?(e.starDock.seeder={count:0},e.race.cataclysm&&ie("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 u($(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!!u($(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!!u($(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!!u($(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 u($(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 u($(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 u($(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 u($(this)[0])?(e.resource.Aerogel.display=!0,Lt(),!0):!1},post(){Ct()}},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 u($(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 u($(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 u($(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 u($(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!!u($(this)[0])},post(){Ue("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!!Tt($(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!!Tt($(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 r=ct("bigbang"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name"),i=`${t("wiki_tech_infusion_confirm_gains",[r.plasmid,r.phage,r.dark,a])}
`;return`${t("tech_infusion_confirm_effect")}
${t("tech_exotic_infusion_effect2")}
${i}`},action(){if(u($(this)[0])){if(e.tech.whitehole>=4)return;e.tech.whitehole=4;let r=$('
');return $("body").append(r),setTimeout(function(){r.addClass("burn")},125),setTimeout(function(){r.addClass("b")},150),setTimeout(function(){r.addClass("c")},2e3),setTimeout(function(){to()},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(u($(this)[0])){if(e.interstellar.stellar_engine.mass+=Mt.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 r=ot();e.stats.banana.b3[r]=!0,r!=="m"&&r!=="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!!u($(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!!u($(this)[0])},post(){Ue("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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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},A[e.race.species].type==="demonic"?ie("blood_war"):ie("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(){ys()}},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 u($(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 u($(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 u($(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 u($(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!!u($(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!!u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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 r=A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name,a=A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].entity;return t("tech_xeno_culture_effect",[r,a])},action(){return u($(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 r=A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name;return t("tech_cultural_exchange_effect",[r])},action(){return u($(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!!u($(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 u($(this)[0])?(e.galaxy.consulate={count:0},e.settings.space.alien1=!0,I(t("tech_xeno_gift_msg",[A[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",[A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])},action(){return u($(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",[A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])},action(){return!!u($(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!!u($(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 u($(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 u($(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 u($(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 u($(this)[0])?(e.galaxy.frigate_ship={count:0,on:0,crew:0,mil:0},Pt(),!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",[A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},action(){return u($(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,Pt(),!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 u($(this)[0])?(e.galaxy.dreadnought={count:0,on:0,crew:0,mil:0},Pt(),!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 u($(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 u($(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",[A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},action(){return u($(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 u($(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 u($(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(){Ct()}},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 u($(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 u($(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 u($(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!!u($(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!!u($(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 u($(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!!u($(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 r=ct("cataclysm"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`${t("tech_dial_it_to_11_effect",[W().dwarf,e.race.cataclysm?W().red:A[e.race.species].home])}
${t("tech_dial_it_to_11_effect2")}
${t("star_dock_genesis_effect2",[r.plasmid,a])}
${t("star_dock_genesis_effect3",[r.phage])}
`},action(){return u($(this)[0])?($("#main").addClass("earthquake"),setTimeout(function(){$("#main").removeClass("earthquake"),eo()},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!!u($(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 u($(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(){Ct()}},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 u($(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 u($(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(){rt()}},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 u($(this)[0])?(e.race.casting.crafting=0,!0):!1},post(){rt()}},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!!u($(this)[0])},post(){Ue("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!!u($(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!!u($(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!!u($(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 u($(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(){Ha("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!!u($(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!!u($(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!!u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 r=ot();return!!(e.stats.spire.hasOwnProperty(r)&&e.stats.spire[r].hasOwnProperty("dlstr")&&e.stats.spire[r].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 u($(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 u($(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!!u($(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 u($(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",[W().enceladus])},action(){return u($(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 u($(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",[W().triton])},action(){return u($(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!!u($(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!!u($(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",[W().titan])},action(){return u($(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 u($(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 u($(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!!u($(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 u($(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!!Tt($(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 r=ct("ai"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name"),i=`${t("tech_protocol66a_effect_gains",[r.plasmid,a,r.phage,r.cores])}
`;return`${t("tech_protocol66a_effect")}
${i}`},action(){return u($(this)[0])?(Pe.w&&Pe.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(){so()},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",[W().red])},action(){return u($(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 u($(this)[0])?(e.resource.Quantium.display=!0,!0):!1},post(){Ct()}},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!!u($(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!!u($(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 u($(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 u($(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 u($(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 u($(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 u($(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",[W().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 u($(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",[W().eris])},action(){return u($(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 u($(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 u($(this)[0])?(e.resource.Stanene.display=!0,I(t("tech_stanene_avail"),"info",!1,["progress"]),!0):!1},post(){rt(),Ct()}},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 u($(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!!u($(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",[W().titan,e.resource.Water.name])},action(){return u($(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",[W().titan])},desc(){return t("tech_storehouse",[W().titan])},category:"storage",era:"solar",path:["truepath"],reqs:{titan:4},grant:["titan",5],cost:{Knowledge(){return 5e5}},effect(){return t("tech_storehouse_effect",[W().titan])},action(){return u($(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!!u($(this)[0])}},titan_bank:{id:"tech-titan_bank",title(){return t("tech_titan_bank",[W().titan])},desc(){return t("tech_titan_bank",[W().titan])},category:"storage",era:"solar",path:["truepath"],reqs:{titan:5},grant:["titan",6],cost:{Knowledge(){return 6e5}},effect(){return t("tech_titan_bank_effect",[W().titan])},action(){return u($(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 u($(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",[W().enceladus,A[e.race.species].home,e.resource.Water.name])},action(){return u($(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",[W().hell])},action(){return u($(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!!u($(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 u($(this)[0])?(D({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!!u($(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 u($(this)[0])?(D({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 u($(this)[0])?(D({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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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!!u($(this)[0])}},shipyard:{id:"tech-shipyard",title(){return t("tech_shipyard",[W().dwarf])},desc(){return t("tech_shipyard",[W().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",[W().dwarf])},action(){return u($(this)[0])?(e.space.shipyard={count:0,on:0,ships:[],expand:!0,sort:!0},Qn(),!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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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!!u($(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 u($(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 u($(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 u($(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",[A[e.race.species].home])},action(){return u($(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",[A[e.race.species].home])},action(){return u($(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",[W().red])])},action(){return u($(this)[0])?(I(t("tech_weasels_msg",[t("tau_planet",[W().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 u($(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!!u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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 u($(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!!u($(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 u($(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 u($(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 u($(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!!u($(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 u($(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 u($(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 u($(this)[0])?(e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),e.tech.isolation=1,jo(),!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 u($(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 u($(this)[0])?(e.race.artifical?I(t("tech_decode_virus_msg1s",[O.tauceti.tau_home.infectious_disease_lab.title()]),"info",!1,["progress"]):I(t("tech_decode_virus_msg1",[O.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 r=e.race.artifical?O.city.boot_camp.title():O.city.hospital.title;return`${t("tech_vaccine_campaign_effect",[r])}
`},action(){return u($(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 u($(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 u($(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 u($(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 u($(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 u($(this)[0])?(e.tauceti.cloning_facility={count:0,on:0},!0):!1},post(){Ot()}},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 u($(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!!u($(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 u($(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!!u($(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!!u($(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 u($(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+ze(5e6).toFixed(0)}},effect:t("tech_outer_tau_survey_effect"),action(){return u($(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 u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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!!u($(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",[O.tauceti.tau_gas2.info.name()])},action(){return u($(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",[O.tauceti.tau_gas2.info.name()])},action(){return u($(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 u($(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",[W().red])])},action(){return u($(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 u($(this)[0])?(e.tauceti.goe_facility={count:0},!0):!1}}};function dl(){e.tech.world_control=1,le($("#garrison")),le($("#c_garrison")),ia($("#garrison"),!0),ia($("#c_garrison"),!1);for(let r=0;r<3;r++){if(e.civic.foreign[`gov${r}`].occ){let a=N(e.civic.govern.type==="federation"?15:20);e.civic.garrison.max+=a,e.civic.garrison.workers+=a,e.civic.foreign[`gov${r}`].occ=!1}e.civic.foreign[`gov${r}`].buy=!1,e.civic.foreign[`gov${r}`].anx=!1,e.civic.foreign[`gov${r}`].sab=0,e.civic.foreign[`gov${r}`].act="none"}qr("spy"),qr("spyop")}function ln(r,a){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(a)return i;let s=(e.stats.hasOwnProperty("reset")?e.stats.reset:0)%i.length;return r?t(`cheese_${i[s]}`):t("tech_swiss_bank",[t(`cheese_${i[s]}`)])}var vc={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 pl(r){if(r){let a={};return Object.keys(ui).forEach(function(i){(vc[r].includes(ui[i].era)||ui[i].hasOwnProperty("path"))&&(!ui[i].hasOwnProperty("path")||ui[i].hasOwnProperty("path")&&ui[i].path.includes(r))&&(a[i]=ui[i])}),a}return ui}var O={evolution:{rna:{id:"evolution-rna",title:t("resource_RNA_name"),desc(){let r=e.race.rapid_mutation?2:1;return t("evo_rna",[r])},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&&r++,t("evo_organelles_effect",[r])},action(){return u($(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(r){return Wa("nucleus",38,e.tech.evo&&e.tech.evo>=4?16:32,r)},DNA(r){return Wa("nucleus",18,e.tech.evo&&e.tech.evo>=4?12:16,r)}},effect(){let r=e.tech.evo&&e.tech.evo>=5?2:1;return t("evo_nucleus_effect",[r])},action(){return u($(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(r){return Wa("eukaryotic_cell",20,20,r)},DNA(r){return Wa("eukaryotic_cell",40,12,r)}},effect(){let r=e.evolution.mitochondria?e.evolution.mitochondria.count*10+10:10;return t("evo_eukaryotic_effect",[r])},action(){return u($(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(r){return Wa("mitochondria",75,50,r)},DNA(r){return Wa("mitochondria",65,35,r)}},effect:t("evo_mitochondria_effect"),action(){return u($(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 u($(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 u($(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 nr(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 u($(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 Bt("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 nr(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 u($(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 Bt("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 nr(2)&&e.stats.achieve.obsolete&&e.stats.achieve.obsolete.l>=5},cost:{DNA(){return 200}},effect(){return t("evo_exterminate_effect")},action(){return u($(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 Bt("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 u($(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 u($(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 u($(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 u($(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)&&nr(5)},cost:{DNA(){return 260}},effect:t("evo_bryophyte_effect"),action(){return u($(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 nr(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 u($(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 Bt("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 u($(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 nr(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 u($(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 Bt("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 nr(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 u($(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 Bt("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 nr(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 u($(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 Bt("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 nr(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 u($(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 nr(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 u($(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 Bt("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 nr(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 u($(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 Bt("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 nr(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 u($(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 Bt("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)&&nr(6)},cost:{DNA(){return 260}},effect(){return t("evo_celestial_effect")},action(){return u($(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 Bt("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)&&nr(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 u($(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 Bt("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)&&nr(5)},cost:{DNA(){return 260}},effect:t("evo_eldritch_effect"),action(){return u($(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 Bt("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)&&nr(5)},cost:{DNA(){return 260}},effect:t("evo_aquatic_effect"),action(){return u($(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 Bt("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)&&nr(5)},cost:{DNA(){return 260}},effect:t("evo_fey_effect"),action(){return u($(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 Bt("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)&&nr(5)},cost:{DNA(){return 260}},effect:t("evo_heat_effect"),action(){return u($(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 Bt("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)&&nr(5)},cost:{DNA(){return 260}},effect:t("evo_polar_effect"),action(){return u($(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 Bt("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)&&nr(5)},cost:{DNA(){return 260}},effect:t("evo_sand_effect"),action(){return u($(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 Bt("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 u($(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 nr(6)},cost:{DNA(){return 260}},effect:t("evo_endothermic_effect"),action(){return u($(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 Bt("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 nr(6)},cost:{DNA(){return 260}},effect:t("evo_ectothermic_effect"),action(){return u($(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 Bt("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(u($(this)[0])){let r=[],a="humanoid";for(let i in Er)if(e.tech[`evo_${i}`]&&e.tech[`evo_${i}`]>=2){a=i;break}if(e.race.junker||e.race.sludge){let i=e.race.sludge?"sludge":"junker";e.race.jtype=a,r.push(i)}else for(let i in Xi){let s=Xi[i];A[s].type===a&&r.push(s)}e.race.species=r[Math.floor(J(0,r.length))],e.stats.achieve[`extinct_${e.race.species}`]&&e.stats.achieve[`extinct_${e.race.species}`].l>=1&&(e.race.species=r[Math.floor(J(0,r.length))]),Cs()}return!1},emblem(){for(let r in Xi){let a=Xi[r];if(e.tech[`evo_${A[a].type}`]&&e.tech[`evo_${A[a].type}`]>=2)return Bt(`genus_${A[a].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 r=new Date;if(r.getMonth()!==11||r.getMonth()===11&&(r.getDate()<=16||r.getDate()>=25)){let a=!1;return e.special&&e.special.gift&&Object.keys(e.special.gift).forEach(function(i){e.special.gift[i]&&(a=!0)}),a}return!1},count(){let r=0;return e.special&&e.special.gift&&Object.keys(e.special.gift).forEach(function(a){e.special.gift[a]&&r++}),r},action(){if(!e.settings.pause){let r=new Date,a=!1;if(e.special&&e.special.gift&&Object.keys(e.special.gift).forEach(function(i){e.special.gift[i]&&(a=i)}),r.getMonth()!==11||r.getMonth()===11&&(r.getDate()<=16||r.getDate()>=25)){if(a==="g2019")e.special&&e.special.gift&&(delete e.special.gift[a],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"])),Et());else if(e.special&&e.special.gift){delete e.special.gift[a];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,l=100+i+s,o=n+c,d=[];if(e.stats.died+e.stats.tdied>0){let h=e.stats.died+e.stats.tdied;e.resource.Coal.amount+=h,d.push(`${h.toLocaleString()} ${t("resource_Coal_name")}`)}if(e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=l,e.stats.antiplasmid+=l,d.push(`${l.toLocaleString()} ${t("resource_AntiPlasmid_plural_name")}`)):(e.prestige.Plasmid.count+=l,e.stats.plasmid+=l,d.push(`${l.toLocaleString()} ${t("resource_Plasmid_plural_name")}`)),o>0&&(e.prestige.Phage.count+=o,e.stats.phage+=o,d.push(`${o.toLocaleString()} ${t("resource_Phage_name")}`)),e.stats.hasOwnProperty("achieve")){let h=e.stats.achieve.whitehole?e.stats.achieve.whitehole.l:0;h+=e.stats.achieve.heavy?e.stats.achieve.heavy.l:0,h+=e.stats.achieve.canceled?e.stats.achieve.canceled.l:0,h+=e.stats.achieve.eviltwin?e.stats.achieve.eviltwin.l:0,h+=e.stats.achieve.microbang?e.stats.achieve.microbang.l:0,h+=e.stats.achieve.pw_apocalypse?e.stats.achieve.pw_apocalypse.l:0;let _=e.stats.achieve.ascended?e.stats.achieve.ascended.l:0,m=e.stats.achieve.corrupted?e.stats.achieve.corrupted.l:0,w=e.stats.achieve.obsolete?e.stats.achieve.obsolete.l:0;if(h>30&&(h=30),_>5&&(_=5),m>5&&(m=5),h>0){let M=+(h/7.5).toFixed(2);e.prestige.Dark.count+=M,e.stats.dark+=M,d.push(`${M} ${t("resource_Dark_name")}`)}if(_>0&&(e.prestige.Harmony.count+=_,e.stats.harmony+=_,d.push(`${_} ${t("resource_Harmony_name")}`)),m>0){let M=m*5,F=m;e.prestige.Blood_Stone.count+=M,e.stats.blood+=M,e.prestige.Artifact.count+=F,e.stats.artifact+=F,d.push(`${M} ${t("resource_Blood_Stone_name")}`),d.push(`${F} ${t("resource_Artifact_name")}`)}a!=="g2020"&&w>0&&(e.prestige.AICore.count+=w,e.stats.cores+=w,d.push(`${w} ${t("resource_AICore_name")}`))}I(t("city_gift2_msg",[d.join(", ")]),"info",!1,["events"]),Et()}}}return!1},touchlabel:t("open")},food:{id:"city-food",title(){return qa().active?e.tech.conjuring?t("city_trick_conjure"):t("city_trick"):e.tech.conjuring?t("city_food_conjure"):t("city_food")},desc(){let r=$(this)[0].val(!1),a=qa();return e.race.fasting?t("city_food_fasting"):a.active?e.tech.conjuring?t("city_trick_conjure_desc",[r]):t("city_trick_desc",[r]):e.tech.conjuring?t("city_food_conjure_desc",[r]):t("city_food_desc",[r])},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&&(a*=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 r=$(this)[0].val(!1);return qa().active?e.tech.conjuring&&e.tech.conjuring>=2?t("city_dig_conjour_desc",[r]):t("city_dig_desc",[r]):e.tech.conjuring&&e.tech.conjuring>=2?t("city_lumber_conjure_desc",[r]):t("city_lumber_desc",[r])},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&&(a*=10,e.resource.Lumber.amount=2?t("city_conjour",[e.resource.Stone.name]):t("city_gather",[e.resource.Stone.name])},desc(){let r=$(this)[0].val(!1);return e.tech.conjuring&&e.tech.conjuring>=2?t("city_stone_conjour_desc",[r,e.resource.Stone.name]):t(e.race.sappy?"city_amber_desc":"city_stone_desc",[r,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&&(a*=10,e.resource.Stone.amount=2?t("city_chrysotile_conjour"):t("city_gather",[e.resource.Chrysotile.name])},desc(){let r=$(this)[0].val(!1);return e.tech.conjuring&&e.tech.conjuring>=2?t("city_stone_conjour_desc",[r,e.resource.Chrysotile.name]):t("city_stone_desc",[r,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&&(a*=10,e.resource.Chrysotile.amounte.resource.Slave.amount&&u($(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(r){return(r||0)+(e.city.hasOwnProperty("s_alter")?e.city.s_alter.count:0)>=1?0:100}},effect(){let r=e.civic[e.civic.d_job]?e.civic[e.civic.d_job].workers:0,a=`${t("city_s_alter_sacrifice",[r])}
`;if(e.city.hasOwnProperty("s_alter")&&e.city.s_alter.rage>0&&(a=a+`${t("city_s_alter_rage",[b.cannibalize.vars()[0],Ft(e.city.s_alter.rage)])}
`),e.city.hasOwnProperty("s_alter")&&e.city.s_alter.regen>0&&(a=a+`${t("city_s_alter_regen",[b.cannibalize.vars()[0],Ft(e.city.s_alter.regen)])}
`),e.city.hasOwnProperty("s_alter")&&e.city.s_alter.mind>0&&(a=a+`${t("city_s_alter_mind",[b.cannibalize.vars()[0],Ft(e.city.s_alter.mind)])}
`),e.city.hasOwnProperty("s_alter")&&e.city.s_alter.mine>0&&(a=a+`${t("city_s_alter_mine",[b.cannibalize.vars()[0],Ft(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");a=a+`${t("city_s_alter_harvest",[b.cannibalize.vars()[0],Ft(e.city.s_alter.harvest),i])}
`}return a},action(){if(u($(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++,L("Food",Math.rand(250,1e3),!0);let a=300,i=600;if(e.tech.sacrifice)switch(e.tech.sacrifice){case 1:a=600,i=1500;break;case 2:a=1800,i=3600;break;case 3:a=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(a,i);break;case 1:e.city.s_alter.mind+=Math.rand(a,i);break;case 2:e.city.s_alter.regen+=Math.rand(a,i);break;case 3:e.city.s_alter.mine+=Math.rand(a,i);break;case 4:e.city.s_alter.harvest+=Math.rand(a,i);break}}return!0}return!1},touchlabel:t("tech_dist_sacrifice")},basic_housing:{id:"city-basic_housing",title(){return yl()},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(r){return r=r||0,(e.city.basic_housing?e.city.basic_housing.count:0)+r>=5?K("basic_housing",r,20,1.17):0},Lumber(r){return e.race.kindling_kindred||e.race.smoldering?0:K("basic_housing",r,10,1.23)},Stone(r){return e.race.kindling_kindred?K("basic_housing",r,10,1.23):0},Chrysotile(r){return e.race.smoldering?K("basic_housing",r,10,1.23):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.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 r=1;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},cottage:{id:"city-cottage",title(){return St("medium")},desc(){return t("city_cottage_desc",[$(this)[0].citizens()])},category:"residential",reqs:{housing:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(r){return K("cottage",r,900,1.15)},Plywood(r){return K("cottage",r,25,1.25)},Brick(r){return K("cottage",r,20,1.25)},Wrought_Iron(r){return K("cottage",r,15,1.25)},Iron(r){return e.city.ptrait.includes("unstable")?K("cottage",r,5,1.25):0},Horseshoe(){return e.race.hooved?2:0}},effect(){let r=$(this)[0].citizens();if(e.tech.home_safe){let a=H(e.tech.home_safe>=2?e.tech.home_safe>=3?5e3:2e3:1e3);return`${t("plus_max_citizens",[r])}
${t("plus_max_resource",[`$${a.toLocaleString()}`,t("resource_Money_name")])}
`}else return t("plus_max_citizens",[r])},action(){return u($(this)[0])?(e.resource[e.race.species].max+=$(this)[0].citizens(),e.city.cottage.count++,!0):!1},citizens(){let r=2;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},apartment:{id:"city-apartment",title(){return St("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(r){return K("apartment",r,1750,1.26)-500},Crystal(r){return e.race.universe==="magic"?K("apartment",r,25,1.22):0},Furs(r){return K("apartment",r,725,1.32)-500},Copper(r){return K("apartment",r,650,1.32)-500},Cement(r){return K("apartment",r,700,1.32)-500},Steel(r){return K("apartment",r,800,1.32)-500},Horseshoe(){return e.race.hooved?5:0}},effect(){let r=ge("extravagant",2),a=$(this)[0].citizens();if(e.tech.home_safe){let i=H(e.tech.home_safe>=2?e.tech.home_safe>=3?1e4:5e3:2e3);return r&&(i*=2),`${t("plus_max_citizens",[a])}. ${t("minus_power",[$(this)[0].powered()])}
${t("plus_max_resource",[`$${i.toLocaleString()}`,t("resource_Money_name")])}
`}else return`${t("plus_max_citizens",[a])}. ${t("minus_power",[$(this)[0].powered()])} `},powered(){let r=ge("extravagant",1);return _e(r||1)},action(){return u($(this)[0])?(e.city.apartment.count++,re($(this)[0])&&(e.resource[e.race.species].max+=$(this)[0].citizens()),!0):!1},citizens(){let r=ge("extravagant",2),a=r?5+r:5;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},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(r){return K("lodge",r,50,1.32)},Lumber(r){return K("lodge",r,20,1.36)},Stone(r){return K("lodge",r,10,1.36)},Horseshoe(){return e.race.hooved?1:0}},effect(){let r=$(this)[0].citizens();return e.race.carnivore&&!e.race.artifical?`${t("plus_max_resource",[r,t("citizen")])}
${t("city_lodge_effect",[5])}
`:t("plus_max_resource",[r,t("citizen")])},action(){return u($(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 r=1;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},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(r){return K("smokehouse",r,85,1.32)},Lumber(r){return K("smokehouse",r,65,1.36)},Stone(r){return K("smokehouse",r,50,1.36)}},effect(){let r=Qt(H(100));return`${t("plus_max_resource",[r,t("resource_Food_name")])}
${t("city_smokehouse_effect",[10])}
`},action(){return u($(this)[0])?(e.city.smokehouse.count++,e.resource.Food.max+=Qt(H(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(r){return r=r||0,(e.city.soul_well?e.city.soul_well.count:0)+r>=3?K("soul_well",r,50,1.32):0},Lumber(r){return K("soul_well",r,20,1.36)},Stone(r){return K("soul_well",r,10,1.36)}},effect(){let r=Qt(H(500)),a=e.race.ghostly?2+b.ghostly.vars()[1]:2;return`${t("city_soul_well_effect",[a])}
${t("plus_max_resource",[r,t("resource_Souls_name")])}
`},action(){return u($(this)[0])?(e.city.soul_well.count++,e.resource.Food.max+=Qt(H(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(r){return K("slave_pen",r,250,1.32)},Lumber(r){return K("slave_pen",r,100,1.36)},Stone(r){return K("slave_pen",r,75,1.36)},Copper(r){return K("slave_pen",r,10,1.36)},Nanite(r){return e.race.deconstructor?K("slave_pen",r,4,1.36):0}},effect(){let r=e.city.slave_pen?e.city.slave_pen.count*4:4,a=e.city.slave_pen?e.resource.Slave.amount:0;return`${t("city_slave_pen_effect",[4])}
${t("city_slave_pen_effect2",[a,r])}
`},action(){return u($(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(r){return e.city.transmitter&&e.city.transmitter.count>=3?K("transmitter",r,50,1.32):0},Copper(r){return K("transmitter",r,20,1.36)},Steel(r){return K("transmitter",r,10,1.36)}},effect(){let r=+T("transmitter").toFixed(2),a=H(100);return`${t("gain",[r,e.resource.Food.name])}
${t("city_transmitter_effect",[a])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(.5)},powerBalancer(){return[{r:"Food",k:"lpmod"}]},action(){return u($(this)[0])?(e.city.transmitter.count++,re($(this)[0]),!0):!1}},captive_housing:hr("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(r){return r=r||0,(e.city.farm?e.city.farm.count:0)+r>=3?K("farm",r,50,1.32):0},Lumber(r){return K("farm",r,20,1.36)},Stone(r){return K("farm",r,10,1.36)},Horseshoe(r){return e.race.hooved&&(e.city.farm?e.city.farm.count:0)+(r||0)>=2?1:0}},effect(){let r=$(this)[0].citizens();return e.tech.farm?`${t("city_farm_effect")}
${t("plus_max_resource",[r,t("citizen")])}
`:t("city_farm_effect")},action(){return u($(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 r=1;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r},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(r){return r=r||0,(e.city.compost?e.city.compost.count:0)+r>=3?K("compost",r,50,1.32):0},Lumber(r){return K("compost",r,12,1.36)},Stone(r){return K("compost",r,12,1.36)}},effect(){let r=1.2+(e.tech.compost?e.tech.compost:0)*.8;r*=e.city.biome==="grassland"?qe.grassland.vars()[0]:1,r*=e.city.biome==="savanna"?qe.savanna.vars()[0]:1,r*=e.city.biome==="ashland"?qe.ashland.vars()[0]:1,r*=e.city.biome==="volcanic"?qe.volcanic.vars()[0]:1,r*=e.city.biome==="hellscape"?qe.hellscape.vars()[0]:1,r*=e.city.ptrait.includes("trashed")?Re.trashed.vars()[0]:1,r=+r.toFixed(2);let a=Qt(H(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",[r])}
${t("city_compost_heap_effect3",[a])}
${i}`},switchable(){return!0},action(){return u($(this)[0])?(e.city.compost.count++,e.city.compost.on++,e.resource.Food.max+=Qt(H(200)),!0):!1}},mill:{id:"city-mill",title(){return e.tech.agriculture>=5?t("city_mill_title2"):t("city_mill_title1")},desc(){let r=e.tech.agriculture>=5?5:3;if(e.tech.agriculture>=6){let a=$(this)[0].powered()*-1;return t("city_mill_desc2",[r,a])}else return t("city_mill_desc1",[r])},category:"utility",reqs:{agriculture:4},not_tech:["wind_plant"],not_trait:["cataclysm","lone_survivor"],cost:{Money(r){return K("mill",r,1e3,1.31)},Lumber(r){return K("mill",r,600,1.33)},Iron(r){return K("mill",r,150,1.33)},Cement(r){return K("mill",r,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 u($(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(r){return K("windmill",r,1e3,1.31)},Lumber(r){return K("windmill",r,600,1.33)},Iron(r){return K("windmill",r,150,1.33)},Cement(r){return K("windmill",r,125,1.33)}},effect(){let r=$(this)[0].powered()*-1;return`${t("space_dwarf_reactor_effect1",[r])}
`},action(){return u($(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(r){return K("silo",r,85,1.32)},Lumber(r){return K("silo",r,65,1.36)},Stone(r){return K("silo",r,50,1.36)},Iron(r){return(e.city.silo?e.city.silo.count:0)+(r||0)>=4&&e.city.ptrait.includes("unstable")?K("silo",r,10,1.36):0}},effect(){let r=Qt(H(500));return t("plus_max_resource",[r,t("resource_Food_name")])},action(){return u($(this)[0])?(e.city.silo.count++,e.resource.Food.max+=Qt(H(500)),!0):!1}},assembly:hr("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(r){return K("garrison",r,240,1.5)},Stone(r){return K("garrison",r,260,1.46)},Iron(r){return(e.city.garrison?e.city.garrison.count:0)+(r||0)>=4&&e.city.ptrait.includes("unstable")?K("garrison",r,50,1.4):0},Horseshoe(){return e.race.hooved?e.race.chameleon?1:2:0}},effect(){let r=e.tech.military>=5?N(3):N(2);return e.race.chameleon&&r--,t("plus_max_resource",[r,t("civics_garrison_soldiers")])},switchable(){return!0},action(){if(u($(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,D({el:"#garrison"},"update"),D({el:"#c_garrison"},"update"));let r=e.tech.military>=5?3:2;return e.race.chameleon&&(r-=e.city.garrison.count),e.civic.garrison.max+=N(r),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(r){return K("hospital",r,22e3,1.32)},Furs(r){return K("hospital",r,4e3,1.32)},Iron(r){return e.city.ptrait.includes("unstable")?K("hospital",r,500,1.32):0},Aluminium(r){return K("hospital",r,1e4,1.32)}},effect(){let r=e.tech.reproduction&&e.tech.reproduction>=2?`${t("city_hospital_effect2")}
`:"",a=e.tech.medic*5,i=`${t("city_hospital_effect",[a])}
${r}`;return!e.race.artifical&&e.race.hasOwnProperty("vax")&&(i=i+`${t("tau_home_disease_lab_vax",[+e.race.vax.toFixed(2)])}
`),i},action(){return u($(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",[A[e.race.species].name]):t("city_boot_camp_desc")},category:"military",reqs:{boot_camp:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(r){return K("boot_camp",r,5e4,1.32)},Lumber(r){return K("boot_camp",r,21500,1.32)},Iron(r){return e.city.ptrait.includes("unstable")?K("boot_camp",r,300,1.32):0},Aluminium(r){return K("boot_camp",r,12e3,1.32)},Brick(r){return K("boot_camp",r,1400,1.32)}},effect(){let r=e.tech.boot_camp>=2?8:5;e.blood.lust&&(r+=e.blood.lust*.2);let a=ge("militant",0);a&&(r*=1+a/100);let i=e.tech.spy&&e.tech.spy>=3?`${t("city_boot_camp_effect",[r])}
${t("city_boot_camp_effect2",[10])}
`:`${t("city_boot_camp_effect",[r])}
`;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")&&(desc=desc+`${t("tau_home_disease_lab_vax",[+e.race.vax.toFixed(2)])}
`),i},action(){return u($(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 r=e.tech.storage>=3?e.tech.storage>=4?t("city_shed_desc_size3"):t("city_shed_desc_size2"):t("city_shed_desc_size1");return t("city_shed_desc",[r])},category:"trade",reqs:{storage:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(r){return K("shed",r,75,1.22)},Lumber(r){return e.tech.storage&&e.tech.storage<4?K("shed",r,55,1.32):0},Stone(r){return e.tech.storage&&e.tech.storage<3?K("shed",r,45,1.32):0},Iron(r){return e.tech.storage&&e.tech.storage>=4?K("shed",r,22,1.32):0},Cement(r){return e.tech.storage&&e.tech.storage>=3?K("shed",r,18,1.32):0}},res(){let r=["Lumber","Stone","Chrysotile","Crystal","Furs","Copper","Iron","Aluminium","Cement","Coal"];return e.tech.storage>=3&&e.resource.Steel.display&&r.push("Steel"),e.tech.storage>=4&&e.resource.Titanium.display&&r.push("Titanium"),e.tech.shelving&&e.tech.shelving>=3&&e.resource.Graphene.display&&r.push("Graphene"),e.tech.shelving&&e.tech.shelving>=3&&e.resource.Stanene.display&&r.push("Stanene"),e.race.unfathomable&&r.push("Food"),r},val(r){switch(r){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(){let r='',a=ci();for(let i of $(this)[0].res())if(e.resource[i].display){let s=Ee(+(H($(this)[0].val(i))*a).toFixed(0),1);r=r+`${t("plus_max_resource",[s,e.resource[i].name])} `}return r=r+"
",r},wide:!0,action(){if(u($(this)[0])){e.city.shed.count++;let r=ci();for(let a of $(this)[0].res())e.resource[a].display&&(e.resource[a].max+=H($(this)[0].val(a)*r));return!0}return!1}},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(r){return K("storage_yard",r,10,Yi(1.36))},Brick(r){return K("storage_yard",r,3,Yi(1.35))},Wrought_Iron(r){return K("storage_yard",r,5,Yi(1.35))}},effect(){let r=e.tech.container>=3?20:10;return e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=1&&(r+=10),e.tech.world_control&&(r+=10),e.tech.particles&&e.tech.particles>=2&&(r*=2),e.tech.trade&&e.tech.trade>=3?`${t("plus_max_resource",[r,t("resource_Crates_name")])}
${t("city_trade_effect",[1])}
`:t("plus_max_resource",[r,t("resource_Crates_name")])},action(){if(u($(this)[0])){e.city.storage_yard.count++;let r=e.tech.container>=3?20:10;return e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=1&&(r+=10),e.tech.world_control&&(r+=10),e.tech.particles&&e.tech.particles>=2&&(r*=2),e.resource.Crates.max+=r,e.resource.Crates.display||ul(),!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(r){return K("warehouse",r,400,Yi(1.26))},Cement(r){return K("warehouse",r,75,Yi(1.26))},Sheet_Metal(r){return K("warehouse",r,25,Yi(1.25))}},effect(){let r=e.tech.steel_container>=2?20:10;return e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=2&&(r+=10),e.tech.world_control&&(r+=10),e.tech.particles&&e.tech.particles>=2&&(r*=2),t("plus_max_resource",[r,t("resource_Containers_name")])},action(){if(u($(this)[0])){e.city.warehouse.count++;let r=e.tech.steel_container>=2?20:10;return e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=2&&(r+=10),e.tech.world_control&&(r+=10),e.tech.particles&&e.tech.particles>=2&&(r*=2),e.resource.Containers.max+=r,e.resource.Containers.display||Yr(),!0}return!1}},bank:{id:"city-bank",title:t("city_bank"),desc(){let r=A[e.race.species].home;return t("city_bank_desc",[r])},category:"commercial",reqs:{banking:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(r){return K("bank",r,250,1.35)},Lumber(r){return K("bank",r,75,1.32)},Stone(r){return K("bank",r,100,1.35)},Iron(r){return(e.city.bank?e.city.bank.count:0)+(r||0)>=2&&e.city.ptrait.includes("unstable")?K("bank",r,30,1.3):0}},effect(){let r=Ar();return r=H(r),r=(+r.toFixed(0)).toLocaleString(),e.tech.banking>=2?`${t("plus_max_resource",[`$${r}`,t("resource_Money_name")])}
${t("plus_max_resource",[N(1),t("banker_name")])}
`:t("plus_max_resource",[`$${r}`,t("resource_Money_name")])},action(){return u($(this)[0])?(e.resource.Money.max+=H(1800),e.city.bank.count++,e.civic.banker.max=N(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(r){return r=r||0,(e.city.pylon?e.city.pylon.count:0)+r>=2?K("pylon",r,10,1.48):0},Stone(r){return K("pylon",r,12,1.42)},Crystal(r){return K("pylon",r,8,1.42)-3}},effect(){let r=H(5),a=+(.01*ft("magic")).toFixed(3);return`${t("gain",[a,e.resource.Mana.name])}
${t("plus_max_resource",[r,e.resource.Mana.name])}
`},special(){return!!(e.tech.magic&&e.tech.magic>=3)},action(){return u($(this)[0])?(e.city.pylon.count++,e.resource.Mana.max+=H(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(r){return K("conceal_ward",r,500,1.25)},Mana(r){return K("conceal_ward",r,Uu(42),1.25)},Crystal(r){return K("conceal_ward",r,5,1.25)}},effect(){let r=e.tech.roguemagic&&e.tech.roguemagic>=8?1.25:1;return`${t("city_conceal_ward_effect",[r])}
`},action(){return u($(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(r){return r=r||0,(e.city.graveyard?e.city.graveyard.count:0)+r>=5?K("graveyard",r,5,1.85):0},Lumber(r){return K("graveyard",r,2,1.95)},Stone(r){return K("graveyard",r,6,1.9)}},effect(){let r=Qt(H(100));return`${t("city_graveyard_effect",[8])}
${t("plus_max_resource",[r,e.resource.Lumber.name])}
`},action(){return u($(this)[0])?(e.city.graveyard.count++,e.resource.Lumber.max+=Qt(H(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(r){return r=r||0,(e.city.lumber_yard?e.city.lumber_yard.count:0)+r>=5?K("lumber_yard",r,5,1.85):0},Lumber(r){return K("lumber_yard",r,6,1.9)},Stone(r){return K("lumber_yard",r,2,1.95)}},effect(){let r=Qt(H(100));return`${t("city_lumber_yard_effect",[2])}
${t("plus_max_resource",[r,e.resource.Lumber.name])}
`},action(){return u($(this)[0])?(e.city.lumber_yard.count++,e.civic.lumberjack.display=!0,e.resource.Lumber.max+=Qt(H(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(r){return K("sawmill",r,3e3,1.26)},Iron(r){return K("sawmill",r,400,1.26)},Cement(r){return K("sawmill",r,420,1.26)}},effect(){let r=e.tech.saw>=2?8:5,a=Qt(H(200)),i=`${t("plus_max_resource",[a,e.resource.Lumber.name])}
${t("city_lumber_yard_effect",[r])}
`;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 _e(1)},powerBalancer(){return e.city.sawmill.hasOwnProperty("psaw")?[{r:"Lumber",k:"psaw"}]:!1},action(){return u($(this)[0])?(e.city.sawmill.count++,e.resource.Lumber.max+=Qt(H(200)),re($(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(r){return r=r||0,(e.city.rock_quarry?e.city.rock_quarry.count:0)+r>=2?K("rock_quarry",r,20,1.45):0},Lumber(r){return K("rock_quarry",r,50,1.36)},Stone(r){return K("rock_quarry",r,10,1.36)}},effect(){let r=Qt(H(100)),a=e.race.smoldering?`${t("plus_max_resource",[r,e.resource.Chrysotile.name])}
`:"";return e.tech.mine_conveyor?`${t("city_rock_quarry_effect1",[2])}
${t("plus_max_resource",[r,e.resource.Stone.name])}
${a}${t("city_rock_quarry_effect2",[4,$(this)[0].powered()])}
`:`${t("city_rock_quarry_effect1",[2])}
${t("plus_max_resource",[r,e.resource.Stone.name])}
${a}`},special(){return!!e.race.smoldering},powered(){return _e(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(u($(this)[0])){e.city.rock_quarry.count++,e.civic.quarry_worker.display=!0;let r=Qt(H(100));return e.resource.Stone.max+=r,e.race.smoldering&&e.resource.Chrysotile.display&&(e.settings.showCivic=!0,e.settings.showIndustry=!0,e.resource.Chrysotile.max+=r),e.tech.mine_conveyor&&re($(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(r){return K("cement_plant",r,3e3,1.5)},Lumber(r){return K("cement_plant",r,1800,1.36)},Stone(r){return K("cement_plant",r,2e3,1.32)},Iron(r){return e.city.ptrait.includes("unstable")?K("cement_plant",r,275,1.32):0}},effect(){if(e.tech.cement>=5){let r=e.tech.cement>=6?8:5;return`${t("city_cement_plant_effect1",[N(2)])}
${t("city_cement_plant_effect2",[$(this)[0].powered(),r])}
`}else return t("city_cement_plant_effect1",[N(2)])},powered(){return _e(2)},powerBalancer(){return e.city.cement_plant.hasOwnProperty("cnvay")?[{r:"Cement",k:"cnvay"}]:!1},power_reqs:{cement:5},action(){return u($(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*N(2),e.tech.cement&&e.tech.cement>=5&&re($(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(r){return K("foundry",r,750,1.36)},Stone(r){return K("foundry",r,100,1.36)},Copper(r){return K("foundry",r,250,1.36)},Iron(r){return e.city.ptrait.includes("unstable")?K("foundry",r,40,1.36):0}},effect(){let r=`${t("city_foundry_effect1",[N(1)])}
`;if(e.tech.foundry>=2){let a=e.tech.foundry>=5?e.tech.foundry>=8?8:5:3;r=r+`${t("city_crafted_mats",[a])}
`}return e.tech.foundry>=6&&(r=r+`${t("city_foundry_effect2",[2])}
`),r},action(){return u($(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+=N(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),Lt(),!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(r){return K("factory",r,25e3,pt(1.32))},Cement(r){return K("factory",r,1e3,pt(1.32))},Steel(r){return K("factory",r,7500,pt(1.32))},Titanium(r){return K("factory",r,2500,pt(1.32))}},effect(){let r=`${t("city_factory_effect")}
${t("minus_power",[$(this)[0].powered()])}
`;return e.tech.foundry>=7&&(r=r+`${t("city_crafted_mats",[5])}
`),r},powered(){return _e(3)},special:!0,action(){return u($(this)[0])?(e.city.factory.count++,e.resource.Alloy.display=!0,e.tech.polymer&&(e.resource.Polymer.display=!0),re($(this)[0])&&e.city.factory.Alloy++,e.settings.showIndustry=!0,rt(),!0):!1}},nanite_factory:hr("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(r){return K("smelter",r,1e3,pt(1.32))},Iron(r){return K("smelter",r,500,pt(1.33))}},effect(){var r=e.tech.smelting>=3?e.tech.smelting>=7?15:12:10;return e.race.pyrophobia&&(r*=.9),e.tech.smelting>=2&&!e.race.steelen?t("city_smelter_effect2",[r]):t("city_smelter_effect1",[r])},special:!0,action(){return u($(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,rt(),!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(r){return K("metal_refinery",r,2500,1.35)},Iron(r){return e.city.ptrait.includes("unstable")?K("metal_refinery",r,125,1.35):0},Steel(r){return K("metal_refinery",r,350,1.35)}},powered(){return _e(2)},powerBalancer(){return e.city.metal_refinery.hasOwnProperty("pwr")?[{r:"Aluminium",k:"cnvay"}]:!1},power_reqs:{alumina:2},effect(){let r=e.race.sappy?"city_metal_refinery_effect_alt":"city_metal_refinery_effect";return e.tech.alumina>=2?`${t(r,[6])} ${t("city_metal_refinery_effect2",[6,12,$(this)[0].powered()])} `:t(r,[6])},action(){return u($(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,Lt()),e.tech.alumina>=2&&re($(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(r){return K("mine",r,60,pt(1.6))},Lumber(r){return K("mine",r,175,pt(1.38))}},effect(){return e.tech.mine_conveyor?`${t("city_mine_effect1",[N(1)])}
${t("city_mine_effect2",[$(this)[0].powered(),5])}
`:t("city_mine_effect1",[N(1)])},powered(){return _e(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 u($(this)[0])?(e.city.mine.count++,e.resource.Copper.display=!0,e.civic.miner.display=!0,e.civic.miner.max=N(e.city.mine.count),e.tech.mine_conveyor&&re($(this)[0]),!0):!1},flair(){return A[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(r){return K("coal_mine",r,480,pt(1.4))},Lumber(r){return K("coal_mine",r,250,pt(1.36))},Iron(r){return e.city.ptrait.includes("unstable")?K("coal_mine",r,28,pt(1.36)):0},Wrought_Iron(r){return K("coal_mine",r,18,pt(1.36))}},effect(){return e.tech.mine_conveyor?`${t("city_coal_mine_effect1",[N(1)])}
${t("city_coal_mine_effect2",[$(this)[0].powered(),5])}
`:t("city_coal_mine_effect1",[N(1)])},powered(){return _e(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 u($(this)[0])?(e.city.coal_mine.count++,e.resource.Coal.display=!0,e.civic.coal_miner.display=!0,e.civic.coal_miner.max=N(e.city.coal_mine.count),e.tech.mine_conveyor&&re($(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(r){return K("oil_well",r,5e3,pt(1.5))},Iron(r){return e.city.ptrait.includes("unstable")?K("oil_well",r,450,pt(1.5)):0},Cement(r){return K("oil_well",r,5250,pt(1.5))},Steel(r){return K("oil_well",r,6e3,pt(1.5))}},effect(){let r=+T("oil_well").toFixed(2),a=H(500);return t("city_oil_well_effect",[r,a])},action(){return u($(this)[0])?(e.city.oil_well.count++,e.resource.Oil.max+=H(500),e.city.oil_well.count===1&&(e.resource.Oil.display=!0,rt()),!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(r){return K("oil_depot",r,2500,pt(1.46))},Iron(r){return e.city.ptrait.includes("unstable")?K("oil_depot",r,325,pt(1.36)):0},Cement(r){return K("oil_depot",r,3750,pt(1.46))},Sheet_Metal(r){return K("oil_depot",r,100,pt(1.45))}},effect(){let r=H(1e3);r*=e.tech.world_control?1.5:1;let a=`${t("plus_max_resource",[r,e.resource.Oil.name])}.
`;if(e.resource.Helium_3.display){let i=H(400);i*=e.tech.world_control?1.5:1,a=a+`${t("plus_max_resource",[i,e.resource.Helium_3.name])}.
`}if(e.tech.uranium>=2){let i=H(250);i*=e.tech.world_control?1.5:1,a=a+`${t("plus_max_resource",[i,e.resource.Uranium.name])}.
`}return a},action(){return u($(this)[0])?(e.city.oil_depot.count++,e.resource.Oil.max+=H(1e3)*(e.tech.world_control?1.5:1),e.resource.Helium_3.display&&(e.resource.Helium_3.max+=H(400)*(e.tech.world_control?1.5:1)),e.tech.uranium>=2&&(e.resource.Uranium.max+=H(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(r){return K("trade",r,500,1.36)},Lumber(r){return K("trade",r,125,1.36)},Stone(r){return K("trade",r,50,1.36)},Iron(r){return e.city.ptrait.includes("unstable")?K("trade",r,15,1.36):0},Furs(r){return K("trade",r,65,1.36)}},effect(){let r=e.race.xenophobic||e.race.nomadic?e.tech.trade:e.tech.trade+1;return e.tech.trade&&e.tech.trade>=3&&r--,e.race.flier&&(r+=b.flier.vars()[1]),t("city_trade_effect",[r])},action(){if(u($(this)[0])){e.city.trade.count++;let r=e.race.xenophobic||e.race.nomadic?e.tech.trade:e.tech.trade+1;return e.tech.trade&&e.tech.trade>=3&&r--,e.city.market.mtrade+=r,!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(r){return K("wharf",r,62e3,1.32)},Lumber(r){return K("wharf",r,44e3,1.32)},Iron(r){return e.city.ptrait.includes("unstable")?K("wharf",r,200,1.32):0},Cement(r){return K("wharf",r,3e3,1.32)},Oil(r){return K("wharf",r,750,1.32)}},effect(){let r=e.tech.world_control?15:10;return e.tech.particles&&e.tech.particles>=2&&(r*=2),`${t("city_trade_effect",[2])}
${t("city_wharf_effect")}
${t("plus_max_crates",[r])}
${t("plus_max_containers",[r])}
`},action(){if(u($(this)[0])){e.city.wharf.count++,e.city.market.mtrade+=2;let r=e.tech.world_control?15:10;return e.tech.particles&&e.tech.particles>=2&&(r*=2),e.resource.Crates.max+=r,e.resource.Containers.max+=r,e.resource.Containers.display||Yr(),!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(r){return K("tourist_center",r,1e5,1.36)},Stone(r){return K("tourist_center",r,25e3,1.36)},Iron(r){return e.city.ptrait.includes("unstable")?K("tourist_center",r,1e3,1.36):0},Furs(r){return K("tourist_center",r,7500,1.36)},Plywood(r){return K("tourist_center",r,5e3,1.36)}},effect(){let r=e.tech.monument&&e.tech.monument>=3&&k.s_gate?3:1,a=(e.civic.govern.type==="corpocracy"?2:1)*r,i=(e.civic.govern.type==="corpocracy"?10:5)*r,s=(e.civic.govern.type==="corpocracy"?4:2)*r,n="";e.stats.achieve.banana&&e.stats.achieve.banana.l>=4&&(n=`${t("city_tourist_center_effect5",[(e.civic.govern.type==="corpocracy"?6:3)*r])}
`);let c="",l=ge("pious",1);return l&&(c=`${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",[a,O.city.amphitheatre.title()])}
${t("city_tourist_center_effect3",[i])}
${t("city_tourist_center_effect4",[s])}
${n}${c}`},powered(){return 0},action(){return u($(this)[0])?(e.city.tourist_center.count++,e.city.tourist_center.on++,!0):!1}},amphitheatre:{id:"city-amphitheatre",title(){return ge("athleticism",0)?t("city_stadium"):t("city_amphitheatre")},desc(){return ge("athleticism",0)?t("city_stadium"):t("city_amphitheatre_desc")},category:"commercial",reqs:{theatre:1},not_trait:["joyless","cataclysm"],cost:{Money(r){return K("amphitheatre",r,500,1.55)},Lumber(r){return K("amphitheatre",r,50,1.75)},Stone(r){return K("amphitheatre",r,200,1.75)},Iron(r){return e.city.ptrait.includes("unstable")?K("amphitheatre",r,18,1.36):0}},effect(){let r=ge("athleticism",0),a=ge("athleticism",1);return`${t("city_max_entertainer",[N(a||1)])}
${t("city_max_morale",[r||1])}
`},action(){if(u($(this)[0])){e.city.amphitheatre.count++;let r=ge("athleticism",1);return e.civic.entertainer.max+=N(r||1),e.civic.entertainer.display=!0,!0}return!1},flair(){return ge("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(r){return K("casino",r,35e4,1.35)},Iron(r){return e.city.ptrait.includes("unstable")?K("casino",r,2e3,1.35):0},Furs(r){return K("casino",r,6e4,1.35)},Plywood(r){return K("casino",r,1e4,1.35)},Brick(r){return K("casino",r,6e3,1.35)}},effect(){let r=ms();return r=r+`${t("minus_power",[$(this)[0].powered()])}
`,r},powered(){return _e(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=2?2:3)},action(){return u($(this)[0])?(e.city.casino.count++,e.race.joyless||(e.civic.entertainer.max+=N(1),e.civic.entertainer.display=!0),re($(this)[0]),!0):!1},flair:t("city_casino_flair")},temple:{id:"city-temple",title:t("city_temple"),desc(){let r=e.race.gods!=="none"?A[e.race.gods.toLowerCase()].entity:A[e.race.species].entity;return t("city_temple_desc",[r])},category:"commercial",reqs:{theology:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(r){return K("temple",r,50,1.36)},Lumber(r){return K("temple",r,25,1.36)},Iron(r){return e.city.ptrait.includes("unstable")?K("temple",r,6,1.36):0},Furs(r){return K("temple",r,15,1.36)},Cement(r){return K("temple",r,10,1.36)}},effect(){let r=cc();return e.genes.ancients&&e.genes.ancients>=2&&(r=r+`${t("city_temple_effect6",[N(1)])}
`),r},action(){return u($(this)[0])?(e.genes.ancients&&e.genes.ancients>=2&&(e.civic.priest.display=!0,e.civic.priest.max+=N(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(r){return K("shrine",r,75,1.32)},Stone(r){return K("shrine",r,65,1.32)},Furs(r){return K("shrine",r,10,1.32)},Copper(r){return K("shrine",r,15,1.32)}},effect(){let r=`${t("city_shrine_effect")}
`;if(e.city.shrine&&e.city.shrine.morale>0){let a=ka("morale");r=r+`${t("city_shrine_morale",[+a.add.toFixed(1)])}
`}if(e.city.shrine&&e.city.shrine.metal>0){let a=ka("metal");r=r+`${t("city_shrine_metal",[+((a.mult-1)*100).toFixed(1)])}
`}if(e.city.shrine&&e.city.shrine.know>0){let a=ka("know");r=r+`${t("city_shrine_know",[(+a.add.toFixed(1)).toLocaleString()])}
`,r=r+`${t("city_shrine_know2",[+((a.mult-1)*100).toFixed(1)])}
`}if(e.city.shrine&&e.city.shrine.tax>0){let a=ka("tax");r=r+`${t("city_shrine_tax",[+((a.mult-1)*100).toFixed(1)])}
`}return r},action(){if(u($(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(J(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(r){return K("meditation",r,50,1.2)},Stone(r){return K("meditation",r,25,1.2)},Furs(r){return K("meditation",r,8,1.2)}},effect(){let r=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",[`${(r*100).toFixed(2)}%`])}
`},action(){return u($(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(){return!e.stats.achieve.endless_hunger||e.city.banquet.count>=e.stats.achieve.endless_hunger.l?0:e.city.banquet.count===0?45e3:e.city.banquet.count===1?18e4:e.city.banquet.count===2?24e5:e.city.banquet.count===3?3e7:14e7},Food(){return(!e.stats.achieve.endless_hunger||e.city.banquet.count>=e.stats.achieve.endless_hunger.l?0:e.city.banquet.count===0?4e4:e.city.banquet.count===1?124e3:e.city.banquet.count===2?3e5:e.city.banquet.count===3?72e4:12e5)/(e.race.artifical?4:1)},Brick(){return!e.stats.achieve.endless_hunger||e.city.banquet.count>=e.stats.achieve.endless_hunger.l?0:e.city.banquet.count===0?1600:e.city.banquet.count===1?18e3:e.city.banquet.count===2?75e3:0},Wrought_Iron(){return!e.stats.achieve.endless_hunger||e.city.banquet.count>=e.stats.achieve.endless_hunger.l?0:e.city.banquet.count===1?26e3:e.city.banquet.count===2?88e3:e.city.banquet.count===3?144e3:e.city.banquet.count===4?24e4:0},Iridium(){return!e.stats.achieve.endless_hunger||e.city.banquet.count>=e.stats.achieve.endless_hunger.l?0:e.city.banquet.count===2?5e4:e.city.banquet.count===3?27e4:e.city.banquet.count===4?7e5:0},Aerogel(){return!e.stats.achieve.endless_hunger||e.race.truepath||e.city.banquet.count>=e.stats.achieve.endless_hunger.l?0:e.city.banquet.count===3?4e4:e.city.banquet.count===4?15e4:0},Quantium(){return!e.stats.achieve.endless_hunger||!e.race.truepath||e.city.banquet.count>=e.stats.achieve.endless_hunger.l?0:e.city.banquet.count===3?4e4:e.city.banquet.count===4?15e4:0},Bolognium(){return!e.stats.achieve.endless_hunger&&e.city.banquet.count>=e.stats.achieve.endless_hunger.l?0:e.city.banquet.count===4?15e4:0}},effect(){let r=`Strength: ${e.city.banquet.strength}
`;return r+=`${t("city_banquet_effect1",[Ee(((e.city.banquet.count>=5?1.02:1.022)**e.city.banquet.strength-1)*100)])}
`,e.city.banquet.count>=1&&(r+=`${t("city_banquet_effect2",[(e.city.banquet.strength**.75).toFixed(2)])}
`),e.city.banquet.count>=2&&(r+=`${t("city_banquet_effect3",[(e.city.banquet.strength**.65).toFixed(2)])}
`),e.city.banquet.count>=3&&(r+=`${t("city_banquet_effect4",[(e.city.banquet.strength**.65).toFixed(2)])}
`),e.city.banquet.count>=4&&(r+=`${t("city_banquet_effect5",[(e.city.banquet.strength**.75).toFixed(2)])}
`),r},powered(){return 0},action(){return e.city.banquet.count=3&&e.city.ptrait.includes("unstable")?K("university",r,25,1.36):0}},effect(){let r=+$(this)[0].knowVal().toFixed(0);return`${t("city_university_effect",[N(1)])}
${t("city_max_knowledge",[r.toLocaleString()])}
`},knowVal(){let r=1,a=e.tech.science&&e.tech.science>=8?700:500;e.city.ptrait.includes("permafrost")&&(a+=Re.permafrost.vars()[1]),e.tech.science>=4&&(r+=e.city.library.count*.02),e.space.observatory&&e.space.observatory.count>0&&(r+=U.observatory*.05),e.portal.sensor_drone&&e.tech.science>=14&&(r+=k.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 i=ve("cath");if(i>0&&(r*=1+b.curious.vars(3)[0]*i),k.s_gate&&we.scavenger){let l=kt("gxy_alien2"),o=we.scavenger*l/4;r*=1+o}let s=ge("teacher",0);s&&(r*=1+s/100);let n=ge("athleticism",2);if(n&&(r*=1-n/100),Va()){let l=ka("know");r*=l.mult}let c=a*r;if(e.tech.supercollider){let l=e.tech.tp_particles||e.tech.particles&&e.tech.particles>=3?12.5:25;c*=e.tech.supercollider/l+1}return e.race.orbit_decayed&&(e.space.satellite&&(c*=1+e.space.satellite.count*.12),e.tech.biotech&&e.tech.biotech>=1&&(c*=2)),c},action(){if(u($(this)[0])){let r=e.tech.science&&e.tech.science>=8?700:500;if(e.tech.science>=4&&(r*=1+e.city.library.count*.02),e.tech.supercollider){let a=e.tech.particles&&e.tech.particles>=3?12.5:25;r*=e.tech.supercollider/a+1}return e.resource.Knowledge.max+=r,e.city.university.count++,e.civic.professor.display=!0,e.civic.professor.max=N(e.city.university.count),!0}return!1}},library:{id:"city-library",title:t("city_library"),desc(){let r=A[e.race.species].home;return t("city_library_desc",[r])},category:"science",reqs:{science:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(r){return K("library",r,45,1.2)},Crystal(r){return e.race.universe==="magic"?K("library",r,2,1.2):0},Iron(r){return e.city.ptrait.includes("unstable")?K("library",r,4,1.2):0},Furs(r){return K("library",r,22,1.2)},Plywood(r){return K("library",r,20,1.2)},Brick(r){return K("library",r,15,1.2)}},effect(){let r=125;e.race.nearsighted&&(r*=1-b.nearsighted.vars()[0]/100),e.race.studious&&(r*=1+b.studious.vars()[1]/100);let a=ve("elven");if(a>0&&(r*=1+b.studious.vars(1)[1]/100*a),e.tech.science&&e.tech.science>=8&&(r*=1.4),e.tech.anthropology&&e.tech.anthropology>=2&&(r*=1+e.city.temple.count*.05),e.tech.science&&e.tech.science>=5){let o=ye(e.civic.scientist.workers,"scientist");e.race.high_pop&&(o=xe(o)),r*=1+o*.12}let i=ge("teacher",0);i&&(r*=1+i/100);let s=ge("athleticism",2);s&&(r*=1-s/100);let n=ge("muckraker",1);n&&(r*=1+n/100),r=+r.toFixed(0);let c=ge("muckraker",2),l=c?5-c:5;return e.race.autoignition&&(l-=b.autoignition.vars()[0],l<0&&(l=0)),`${t("city_max_knowledge",[r.toLocaleString()])}
${t("city_library_effect",[l])}
`},action(){if(u($(this)[0])){let r=125;return e.race.nearsighted&&(r*=1-b.nearsighted.vars()[0]/100),e.tech.science&&e.tech.science>=8&&(r*=1.4),e.tech.anthropology&&e.tech.anthropology>=2&&(r*=1+e.city.temple.count*.05),e.tech.science&&e.tech.science>=5&&(r*=1+ye(e.civic.scientist.workers,"scientist")*.12),r=+r.toFixed(1),e.resource.Knowledge.max+=r,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 dr()},desc:t("city_wardenclyffe_desc"),category:"science",reqs:{high_tech:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(r){return K("wardenclyffe",r,5e3,1.22)},Knowledge(r){return K("wardenclyffe",r,e.race.logical?1e3-b.logical.vars()[0]:1e3,1.22)},Crystal(r){return e.race.universe==="magic"?K("wardenclyffe",r,100,1.22):0},Copper(r){return K("wardenclyffe",r,500,1.22)},Iron(r){return e.city.ptrait.includes("unstable")?K("wardenclyffe",r,75,1.22):0},Cement(r){return K("wardenclyffe",r,350,1.22)},Sheet_Metal(r){return K("wardenclyffe",r,125,1.2)},Nanite(r){return e.race.deconstructor?K("wardenclyffe",r,50,1.18):0}},effect(){let r=1e3;if(e.city.ptrait.includes("magnetic")&&(r+=Re.magnetic.vars()[1]),e.tech.supercollider){let s=e.tech.particles&&e.tech.particles>=3?12.5:25;r*=e.tech.supercollider/s+1}e.space.satellite&&(r*=1+e.space.satellite.count*.04);let a=ge("athleticism",2);a&&(r*=1-a/100),r=+r.toFixed(0);let i=`${t("city_wardenclyffe_effect1",[N(1),e.civic.scientist?e.civic.scientist.name:t("job_scientist")])}
${t("city_max_knowledge",[r.toLocaleString()])}
`;if(e.city.powered){let s=e.tech.science>=7?2500:2e3;if(e.city.ptrait.includes("magnetic")&&(s+=Re.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=ge("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=H(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",[H(250)])}
=7?2500:2e3),e.tech.supercollider){let a=e.tech.particles&&e.tech.particles>=3?12.5:25;r*=e.tech.supercollider/a+1}return e.resource.Knowledge.max+=r,!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(r){return K("biolab",r,25e3,1.3)},Knowledge(r){return K("biolab",r,5e3,1.3)},Copper(r){return K("biolab",r,1250,1.3)},Iron(r){return e.city.ptrait.includes("unstable")?K("biolab",r,160,1.3):0},Alloy(r){return K("biolab",r,350,1.3)}},effect(){let r=3e3;return e.portal.sensor_drone&&e.tech.science>=14&&(r*=1+k.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 _e(2)},action(){return u($(this)[0])?(e.city.biolab.count++,re($(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(r){return K("coal_power",r,1e4,pt(1.22))},Crystal(r){return e.race.universe==="magic"?K("coal_power",r,125,pt(1.22)):0},Copper(r){return K("coal_power",r,1800,pt(1.22))-1e3},Iron(r){return e.city.ptrait.includes("unstable")?K("coal_power",r,175,pt(1.22)):0},Cement(r){return K("coal_power",r,600,pt(1.22))},Steel(r){return K("coal_power",r,2e3,pt(1.22))-1e3}},effect(){let r=e.race.universe==="magic"?.05:.35,a=-$(this)[0].powered();return e.race.environmentalist?`+${a}MW`:`+${a}MW. ${t(e.race.universe==="magic"?"city_mana_engine_effect":"city_coal_power_effect",[r])} `},powered(){let r=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,a=ge("dirty_jobs",1);return a&&(r-=a),dt(r)},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 u($(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(r){return K("oil_power",r,5e4,pt(1.22))},Copper(r){return K("oil_power",r,6500,pt(1.22))+1e3},Iron(r){return e.city.ptrait.includes("unstable")?K("oil_power",r,180,pt(1.22)):0},Aluminium(r){return K("oil_power",r,12e3,pt(1.22))},Cement(r){return K("oil_power",r,5600,pt(1.22))+1e3}},effect(){let r=.65,a=-$(this)[0].powered();return e.race.environmentalist?`+${a}MW`:`+${a}MW. ${t("city_oil_power_effect",[r])} `},powered(){let r=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;r=e.stats.achieve.dissipated.l>=5?i-2:i-1}else r=e.city.calendar.wind===1?-7:-5;else e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=3?r=e.stats.achieve.dissipated.l>=5?-8:-7:r=-6;let a=ge("dirty_jobs",1);return a&&(r-=a),dt(r)},p_fuel(){return{r:"Oil",a:e.race.environmentalist?0:.65}},action(){return u($(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(r){return K("fission_power",r,25e4,1.36)},Copper(r){return K("fission_power",r,13500,1.36)},Iron(r){return e.city.ptrait.includes("unstable")?K("fission_power",r,1750,1.36):0},Cement(r){return K("fission_power",r,10800,1.36)},Titanium(r){return K("fission_power",r,7500,1.36)}},effect(){let r=.1;return`+${-$(this)[0].powered()}MW. ${t("city_fission_power_effect",[r])} `},powered(){return dt(e.tech.uranium>=4?-18:-14)},p_fuel(){return{r:"Uranium",a:.1}},action(){return u($(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(r){return K("mass_driver",r,375e3,1.32)},Copper(r){return K("mass_driver",r,33e3,1.32)},Iron(r){return K("mass_driver",r,42500,1.32)},Iridium(r){return K("mass_driver",r,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,tt("name")])} ${t("minus_power",[$(this)[0].powered()])} `},powered(){let r=e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=4?4:5;return _e(e.tech.mass>=2?r-1:r)},action(){return u($(this)[0])?(e.city.mass_driver.count++,re($(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:pl(),arpa:Ue("PhysicsTech"),genes:Ue("GeneTech"),blood:Ue("BloodTech"),space:Hi(),interstellar:Ko(),galaxy:No(),starDock:{probes:{id:"starDock-probes",title:t("star_dock_probe"),desc(){return`${t("star_dock_probe_desc")}
`},reqs:{genesis:4},cost:{Money(r){return K("probes",r,35e4,e.race.truepath?1.125:1.25,"starDock")},Alloy(r){return K("probes",r,75e3,e.race.truepath?1.125:1.25,"starDock")},Polymer(r){return K("probes",r,85e3,e.race.truepath?1.125:1.25,"starDock")},Iridium(r){return K("probes",r,12e3,e.race.truepath?1.125:1.25,"starDock")},Mythril(r){return K("probes",r,3500,e.race.truepath?1.125:1.25,"starDock")}},effect(){return`${t("star_dock_probe_effect")}
`},action(){return u($(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(r){return K("geck",r,1e6,1.25,"starDock")},Elerium(r){return K("geck",r,1e3,1.25,"starDock")},Plasmid(r){return K("geck",r,25,1.4,"starDock")}},effect(){return`${t("star_dock_geck_effect")}
`},action(){return u($(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 r=e.race.cataclysm?t("star_dock_exodus"):t("star_dock_seeder");return e.starDock.seeder&&e.starDock.seeder.count>=100?`${r}
${t("star_dock_seeder_desc2")}
`:`${r}
${t("star_dock_seeder_desc1")}
`},reqs:{genesis:5},queue_size:10,queue_complete(){return 100-e.starDock.seeder.count},cost:{Money(r){return(r||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?1e5:0},Steel(r){return(r||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?25e3:0},Neutronium(r){return(r||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?240:0},Elerium(r){return(r||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?10:0},Nano_Tube(r){return(r||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?12e3:0}},effect(r){let a=(r||0)+(e.starDock.seeder?e.starDock.seeder.count:0),i=a<100?t("star_dock_seeder_status1",[100-a]):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&&u($(this)[0])){if(e.starDock.seeder.count++,e.starDock.seeder.count>=100){e.tech.genesis=6,Ie("starDock-seeder"),le($("#modalBox"));let r=O.space.spc_gas.star_dock;yc(r,"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(r,a){return+Ae(e.race.gravity_well?15e4:75e3,!1,a).toFixed(0)}},effect(){let r=ct("bioseed"),a=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",[r.plasmid,a])}
${t("star_dock_genesis_effect3",[r.phage])}
`},action(){if(u($(this)[0])){e.tech.genesis=7,Ie("starDock-prep_ship"),le($("#modalBox"));let r=O.space.spc_gas.star_dock;return yc(r,"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 r=ct("bioseed"),a=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",[r.plasmid,a])}
${t("star_dock_genesis_effect3",[r.phage])}
`},action(){return Xc(),!1}}},portal:an(),tauceti:Po()};function hn(){let r=$("#evolution .evolving").nextAll();Object.values(r).forEach(function(a){le($(a),!0)}),le($("#evolution .evolving"),!0),e.evolution.bunker={count:1},Ra(O.evolution.bunker.id),vl(),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}),Wu(),e.race.truepath||e.race.lone_survivor?vt("evolution","nerfed"):e.race.universe==="antimatter"?vt("evolution","mastery"):vt("evolution","plasmid"),vt("evolution","trade"),vt("evolution","craft"),e.race.truepath||e.race.lone_survivor?vt("evolution","badgenes"):vt("evolution","crispr"),Qu(),vt("evolution","joyless"),vt("evolution","steelen"),(e.stats.achieve.whitehole||e.sim)&&vt("evolution","decay"),(e.stats.achieve.ascended||e.sim)&&vt("evolution","emfield"),(e.stats.achieve.scrooge||e.sim)&&vt("evolution","inflation"),((e.stats.achieve.ascended||e.stats.achieve.corrupted)&&e.stats.achieve.extinct_junker||e.sim)&&vt("evolution","sludge"),(e.stats.achieve.whitehole||e.stats.achieve.ascended||e.sim)&&vt("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)&&vt("evolution","gravity_well"),e.race.universe==="magic"&&(e.stats.achieve.ascended&&e.stats.achieve.ascended.mg||e.sim)&&vt("evolution","witch_hunter"),e.race.universe==="evil"&&(e.stats.achieve.corrupted&&e.stats.achieve.corrupted.e||e.sim),e.hasOwnProperty("beta")&&!e.sim&&vt("evolution","simulation"),Vu(),vt("evolution","junker"),(e.stats.achieve.shaken||e.sim)&&vt("evolution","cataclysm"),(e.stats.achieve.whitehole||e.stats.achieve.ascended||e.sim)&&vt("evolution","banana"),(e.stats.achieve.ascended||e.stats.achieve.corrupted||e.sim)&&vt("evolution","truepath"),(e.stats.achieve.retired||e.sim)&&vt("evolution","lone_survivor"),(e.stats.achieve.corrupted||e.sim)&&vt("evolution","fasting"),e.sim?Zu():e.race.simulation&&Ju()}function hr(r,a){let i=e.race.orbit_decay?"orbit_decayed":"cataclysm",s=function(n,c,l){return l==="space"?n.hasOwnProperty("trait")?n.trait.push(c):n.trait=[c]:l==="tauceti"?n.reqs.isolation=1:n.hasOwnProperty("not_trait")?n.not_trait.push(c):n.not_trait=[c],n};switch(r){case"bonfire":{let n={id:`${a}-bonfire`,title:t("city_bonfire"),desc:t("city_bonfire_desc"),category:"outskirts",wiki:!1,reqs:{primitive:3},condition(){return Ve("summer")},queue_complete(){return 0},effect(){let c=e.resource.Thermite.diff*2.5/(e.resource.Thermite.diff*2.5+500)*500,l=1e5+e.stats.reset*9e3;l>1e6&&(l=1e6);let o=e.resource.Thermite.amount${t("city_bonfire_effect3",[l.toLocaleString()])}${t("city_bonfire_effect4",[(+e.resource.Thermite.amount.toFixed(0)).toLocaleString(),l.toLocaleString()])}
`:"";return`${t("city_bonfire_effect",[e.resource.Thermite.diff])}
${t("city_bonfire_effect2",[+c.toFixed(1)])}
${o}`},action(){return!1},flair(){return t("city_bonfire_flair")}};return s(n,i,a)}case"firework":{let n={id:`${a}-firework`,title:t("city_firework"),desc:t("city_firework"),category:"outskirts",wiki:!1,reqs:{mining:3},condition(){return Ve("firework")&&e[a].firework&&(e.tech.cement||e.race.flier)},cost:{Money(){return e[a].firework.count===0?5e4:0},Iron(){return e[a].firework.count===0?7500:0},Cement(){return e[a].firework.count===0?1e4:0}},queue_complete(){return 1-e[a].firework.count},switchable(){return!0},effect(){return e[a].firework.count===0?t("city_firework_build"):t("city_firework_effect")},action(){return e[a].firework.count===0&&u($(this)[0])?(e[a].firework.count=1,!0):!1}};return s(n,i,a)}case"assembly":{let n=function(l){let o=xe(l);return e.race.promiscuous&&(o/=1+b.promiscuous.vars()[1]*e.race.promiscuous),Math.round(o)},c={id:`${a}-assembly`,title:t("city_assembly"),desc(){return t("city_assembly_desc",[A[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(l){return e.resource[e.race.species].amount?K("citizen",l,n(125),1.01):0},Copper(l){return e.race.deconstructor?0:e.resource[e.race.species].amount>=5?K("citizen",l,n(50),1.01):0},Aluminium(l){return e.race.deconstructor?0:e.resource[e.race.species].amount>=5?K("citizen",l,n(50),1.01):0},Nanite(l){return e.race.deconstructor&&e.resource[e.race.species].amount>=3?K("citizen",l,n(500),1.01):0}},effect(){let l="";return e.resource[e.race.species].max===e.resource[e.race.species].amount&&(l=`${t("city_assembly_effect_warn")}
`),`${t("city_assembly_effect",[A[e.race.species].name])}
${l}`},action(){return e.race.vax&&e.race.vax>=100?!0:e.resource[e.race.species].max>e.resource[e.race.species].amount&&u($(this)[0])?(e.resource[e.race.species].amount++,!0):!1}};return s(c,i,a)}case"nanite_factory":{let n={id:`${a}-nanite_factory`,title:t("city_nanite_factory"),desc:t("city_nanite_factory"),category:"industrial",reqs:{},trait:["deconstructor"],region:"city",cost:{Money(c){return K("nanite_factory",c,25e3,pt(1.25))},Copper(c){return K("nanite_factory",c,1200,pt(1.25))},Steel(c){return K("nanite_factory",c,1e3,pt(1.25))}},effect(){let c=H(2500);return`${t("city_nanite_factory_effect",[e.resource.Nanite.name])}
${t("plus_max_resource",[c,e.resource.Nanite.name])}.
`},special:!0,action(){return u($(this)[0])?(e.city.nanite_factory.count++,e.settings.showIndustry=!0,rt(),!0):!1},flair:t("city_nanite_factory_flair")};return s(n,i,a)}case"captive_housing":{let n={id:`${a}-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 K("captive_housing",c,40,1.35)},Lumber(c){return K("captive_housing",c,30,1.35)},Stone(c){return K("captive_housing",c,18,1.35)}},effect(){let c="";if(!e.race.artifical&&!e.race.detritivore&&!e.race.carnivore&&!e.race.soul_eater){let d=e.city.hasOwnProperty("captive_housing")?e.city.captive_housing.cattle:0,h=e.city.hasOwnProperty("captive_housing")?e.city.captive_housing.cattleCap:0;c+=`${t("city_captive_housing_cattle",[d,h])}
`}let l=0;if(e.city.hasOwnProperty("surfaceDwellers"))for(let d=0;d${t("city_captive_housing_broken",[A[h].name,_])}`,c+=`${t("city_captive_housing_untrained",[A[h].name,m])}
`}let o=e.city.hasOwnProperty("captive_housing")?e.city.captive_housing.raceCap:0;return c+=`${t("city_captive_housing_capacity",[l,o])}
`,e.tech.unfathomable&&e.tech.unfathomable>=2&&(c+=`${t("plus_max_resource",[1,t("job_torturer")])}
`),c},action(){if(u($(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,a)}case"horseshoe":{let n={id:`${a}-horseshoe`,title(){return t(`city_${Wr(!0)}`,[Wr(!1)])},desc(){return t(`city_${Wr(!0)}_desc`,[Wr(!1)])},category:"outskirts",reqs:{primitive:3},condition(){return e.race.hooved||Ve("fool",2023)},inflation:!1,cost:{Lumber(c){let l=(e.race.shoecnt||0)+(c||0);return!e.race.kindling_kindred&&!e.race.smoldering&&(!e.resource.Copper.display||l<=12)?Math.round((l>12?25:5)*(l<=5?1:l-4)*(b.hooved.vars()[0]/100)):0},Copper(c){let l=(e.race.shoecnt||0)+(c||0),o=!(e.race.kindling_kindred||e.race.smoldering);return!!((!o||o&&l>12&&e.resource.Copper.display)&&(!e.resource.Iron.display||l<=75))?Math.round((l>75?20:5)*(l<=12?1:l-11)*(b.hooved.vars()[0]/100)):0},Iron(c){let l=(e.race.shoecnt||0)+(c||0);return e.resource.Iron.display&&l>75&&(!e.resource.Steel.display||l<=150)?Math.round((l<=150?12:28)*l*(b.hooved.vars()[0]/100)):0},Steel(c){let l=(e.race.shoecnt||0)+(c||0);return e.resource.Steel.display&&l>150&&(!e.resource.Adamantite.display||l<=500)?Math.round((l<=500?40:100)*l*(b.hooved.vars()[0]/100)):0},Adamantite(c){let l=(e.race.shoecnt||0)+(c||0);return e.resource.Adamantite.display&&l>500&&(!e.resource.Orichalcum.display||l<=5e3)?Math.round((l<=5e3?5:25)*l*(b.hooved.vars()[0]/100)):0},Orichalcum(c){let l=(e.race.shoecnt||0)+(c||0);return e.resource.Orichalcum.display&&l>5e3?Math.round((25*l-12e4)*(b.hooved.vars()[0]/100)):0}},action(){return!e.race.hooved&&Ve("fool",2023)?!0:e.resource.Horseshoe.display&&u($(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,a)}}}function nr(r,a){a=a||"evo";let i=e.evolution.final||0;return(e.tech[a]&&e.tech[a]===r||e.evolution.gselect)&&i<100}var Xi=["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"];Xi.forEach(r=>O.evolution[r]={id:`evolution-${r}`,title(){return A[r].name},desc(){return`${t("evo_evolve")} ${A[r].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_${r}`]&&e.stats.achieve[`extinct_${r}`].l>=1)&&e.tech[`evo_${A[r].type}`]>=2&&e.evolution.final===100&&!e.race.evoFinalMenu},cost:{RNA(){return 320},DNA(){return 320}},race:!0,effect(){return`${typeof A[r].desc=="string"?A[r].desc:A[r].desc()} ${t("evo_complete")}`},action(){if(u($(this)[0])){if(["synth","custom"].includes(r))return t0(r);e.race.species=r,Cs()}return!1},queue_complete(){return e.tech.evo&&e.tech.evo===7?1:0},emblem(){return Bt(`extinct_${r}`)}});if(Object.keys(e.stats.synth).length>1){let r=Ke(Xi);r.push("junker"),r.push("sludge"),r.forEach(a=>O.evolution[`s-${a}`]={id:`evolution-s-${a}`,title(){return A[a].name},desc(){return`${t("evo_imitate")} ${A[a].name}`},reqs:{evo:8},grant:["evo",9],condition(){return e.stats.synth[a]&&e.race.evoFinalMenu},cost:{},race:!0,effect(){return t("evo_imitate_race",[A[a].name])},action(){return e.stats.synth[a]&&(e.race.species=e.race.evoFinalMenu,e.race.srace=a,Cs()),!1},queue_complete(){return e.tech.evo&&e.tech.evo===8?1:0}})}var Ta={plasmid:"no_plasmid",mastery:"weak_mastery",trade:"no_trade",craft:"no_craft",crispr:"no_crispr",nerfed:"nerfed",badgenes:"badgenes"};Object.keys(Ta).forEach(r=>O.evolution[r]={id:`evolution-${r}`,title:t(`evo_challenge_${r}`),desc:t(`evo_challenge_${r}`),condition(){return e.evolution.hasOwnProperty(r)},cost:{DNA(){return 10}},challenge:!0,effect(){return hl(r)},action(){return u($(this)[0])&&(e.race[Ta[r]]?(delete e.race[Ta[r]],$(`#${$(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(a){delete e.race[a],$(`#evolution-${a}`).removeClass("hl")})):(e.race[Ta[r]]=1,$(`#${$(this)[0].id}`).addClass("hl")),hn(),es()),!1},highlight(){return!!e.race[Ta[r]]},queue_complete(){return 0}});var un={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(un).forEach(r=>O.evolution[r]={id:`evolution-${r}`,title:t(`evo_challenge_${r}`),desc(){let a="";return e.race.universe==="micro"&&(a=a+`${t("evo_challenge_micro_warn")}
`),a=a+`${t(`evo_challenge_${r}_desc`)}
`,["sludge","junker"].includes(r)&&(a=a+`${t("evo_start")}
`),a},condition(){return e.evolution.hasOwnProperty(r)},cost:{DNA(){return un[r].t==="c"?25:50}},challenge:!0,effect(){return hl(r)},action(){return u($(this)[0])&&(un[r].t==="c"?Ku(r):Nu(r)),!1},emblem(){return Bt(un[r].e)},highlight(){return!!e.race[r]},queue_complete(){return 0}});O.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!!u($(this)[0])},queue_complete(){return e.tech.evo_challenge?0:1},flair:t("evo_bunker_flair")};function Gr(){if(!(!e.settings.tabLoad&&e.settings.civTabs!==0)&&!(e.race.universe==="bigbang"||e.race.seeded&&!e.race.chose)){if(e.tech.evo_challenge){let r=$("#evolution .evolving").nextAll();Object.values(r).forEach(function(a){le($(a),!0)}),le($("#evolution .evolving"),!0)}Object.keys(O.evolution).forEach(function(r){if(!O.evolution[r].challenge){Ra(O.evolution[r].id);var a=!0;O.evolution[r].hasOwnProperty("reqs")&&Object.keys(O.evolution[r].reqs).forEach(function(i){(!e.tech[i]||e.tech[i]=2&&vl(),e.tech.evo_challenge&&hn())}}function hl(r){switch(r){case"nerfed":let a=e.race.universe==="antimatter"?["20%","50%","50%","33%"]:["50%","20%","50%","33%"];return t(`evo_challenge_${r}_effect`,a);case"badgenes":return t(`evo_challenge_${r}_effect`,[1,2]);case"orbit_decay":return Nt()>=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 Nt()>=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_${r}_effect`)}}function cc(){let r;if(e.race.universe==="antimatter"||e.race.no_plasmid){let a=e.tech.anthropology&&e.tech.anthropology>=1?1.6:1;if(e.tech.fanaticism&&e.tech.fanaticism>=2){let s=ye(e.civic.professor.workers,"professor")*(e.race.universe==="antimatter"?.02:.04);e.race.high_pop&&(s=xe(s)),a+=+s.toFixed(2)}if(e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let s=e.genes.ancients>=5?.015:e.genes.ancients>=3?.0125:.01;e.race.high_pop&&(s=xe(s)),a+=s*ye(e.civic.priest.workers,"priest")}e.race.universe==="antimatter"&&(a/=2),e.race.spiritual&&(a*=1+b.spiritual.vars()[0]/100);let i=ve("seraph");if(i>0&&(a*=1+b.spiritual.vars(1)[0]/100*i),e.civic.govern.type==="theocracy"&&(a*=1+$e.theocracy()[0]/100),e.race.ooze&&(a*=1-b.ooze.vars()[1]/100),a=+a.toFixed(3),r=`${t("city_temple_effect1",[a])}
`,e.race.universe==="antimatter"){let s=6;if(e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let n=e.genes.ancients>=5?.12:e.genes.ancients>=3?.1:.08;e.race.high_pop&&(n=xe(n)),s+=n*ye(e.civic.priest.workers,"priest")}r+=`${t("city_temple_effect5",[s.toFixed(2)])}
`}}else{let a=e.tech.anthropology&&e.tech.anthropology>=1?8:5;if(e.tech.fanaticism&&e.tech.fanaticism>=2){let s=ye(e.civic.professor.workers,"professor")*.2;e.race.high_pop&&(s=xe(s)),a+=+s.toFixed(1)}if(e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let s=e.genes.ancients>=5?.15:e.genes.ancients>=3?.125:.1;e.race.high_pop&&(s=xe(s)),a+=s*ye(e.civic.priest.workers,"priest")}e.race.spiritual&&(a*=1+b.spiritual.vars()[0]/100);let i=ve("seraph");i>0&&(a*=1+b.spiritual.vars(1)[0]/100*i),e.civic.govern.type==="theocracy"&&(a*=1+$e.theocracy()[0]/100),e.race.ooze&&(a*=1-b.ooze.vars()[1]/100),e.race.orbit_decayed&&e.race.truepath&&(a*=.1),a=+a.toFixed(3),r=`${t("city_temple_effect2",[a])}
`}return e.tech.fanaticism&&e.tech.fanaticism>=3&&(r=r+`${t("city_temple_effect3")}
`),e.tech.anthropology&&e.tech.anthropology>=4&&(r=r+`${e.race.truepath?t("city_temple_effect_tp",[2,25]):t("city_temple_effect4")}
`),r}function ms(){let r=e.tech.gambling>=3?6e4:4e4;e.tech.gambling>=5&&(r+=e.tech.gambling>=6?24e4:6e4),r=H(r),e.race.gambler&&(r*=1+e.race.gambler*.04),e.tech.world_control&&(r=r*1.25),e.race.truepath&&(r=r*1.5),e.tech.stock_exchange&&e.tech.gambling>=4&&(r*=1+e.tech.stock_exchange*.05),e.race.inflation&&(r*=1+e.race.inflation/100),e.tech.isolation&&(r*=5.5),r=Math.round(r);let a=e.race.joyless?"":`${t("city_max_entertainer",[N(1)])}
`,i=e.race.orbit_decayed||e.tech.isolation?`${t("plus_max_resource",[N(1),t("banker_name")])}
`:"",s=`${t("plus_max_resource",[`$${r.toLocaleString()}`,t("resource_Money_name")])}
${a}${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+ye(e.civic.banker.workers,"banker")*.05)),n=+n.toFixed(2),s=s+`${t("tech_casino_effect2",[n])}
`,s}function Wa(r,a,i,s){return((e.evolution.hasOwnProperty(r)?e.evolution[r].count:0)+(s||0))*i+a}function Ku(r){e.race[r]?(delete e.race[r],$(`#evolution-${r}`).removeClass("hl"),r==="sludge"&&Object.keys(A).forEach(function(a){a!=="junker"&&a!=="sludge"&&$(`#evolution-${a}`).removeClass("is-hidden")})):(e.race[r]=1,$(`#evolution-${r}`).addClass("hl"),r==="sludge"&&(Object.keys(A).forEach(function(a){a!=="junker"&&a!=="sludge"&&$(`#evolution-${a}`).addClass("is-hidden")}),e.race.junker&&delete e.race.junker),r==="orbit_decay"&&(delete e.race.cataclysm,e.race.lone_survivor&&(delete e.race.lone_survivor,["nerfed","badgenes"].forEach(function(a){delete e.race[Ta[a]]})))),hn(),es()}function Nu(r){if(e.race.sludge||Object.keys(A).forEach(function(a){a!=="junker"&&a!=="sludge"&&$(`#evolution-${a}`).removeClass("is-hidden")}),e.race[r])delete e.race[r],$(`#evolution-${r}`).removeClass("hl"),["nerfed","badgenes"].forEach(function(a){delete e.race[Ta[a]]});else{["junker","cataclysm","banana","truepath","lone_survivor","fasting"].forEach(function(i){delete e.race[i],$(`#evolution-${i}`).removeClass("hl")}),e.race[r]=1,$(`#evolution-${r}`).addClass("hl"),r==="junker"&&(Object.keys(A).forEach(function(i){i!=="junker"&&i!=="sludge"&&$(`#evolution-${i}`).addClass("is-hidden")}),e.race.sludge&&delete e.race.sludge),(r==="cataclysm"||r==="lone_survivor")&&delete e.race.orbit_decay,r==="truepath"||r==="lone_survivor"?(e.race.nerfed=1,["crispr","plasmid","mastery"].forEach(function(i){delete e.race[Ta[i]]})):(["nerfed","badgenes"].forEach(function(i){delete e.race[Ta[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 a=r==="truepath"||r==="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 a=ve("kobold");return a>0&&(r*=1+b.pack_rat.vars(1)[1]/100*a),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*xt/100),r}function Sa(r){if((e.race.kindling_kindred||e.race.smoldering)&&r==="lumber")return!1;if((e.race.kindling_kindred||e.race.smoldering)&&r==="stone")return!0;let a=e.race.truepath?"truepath":"standard";if(O.city[r].hasOwnProperty("path")&&!O.city[r].path.includes(a))return!1;var i=!0;return Object.keys(O.city[r].reqs).forEach(function(s){(!e.tech[s]||e.tech[s]=3&&(s=!0,e.r_queue.queue.forEach(function(c){cr(c.type,!1)&&(a[O[c.action][c.type].grant[0]]={v:O[c.action][c.type].grant[1],a:c.type})}),Object.keys(n).forEach(function(c){let l=e.tech[c]||0;_n(c,e.tech[c]||0)||(!a[c]||a[c].vl+1)&&(s=!1)})),(i||s)&&(!e.tech[O.tech[r].grant[0]]||e.tech[O.tech[r].grant[0]]=O.tech[r].grant[1]){if(r!=="fanaticism"&&r!=="anthropology"&&r!=="deify"&&r!=="study")return!0;if(r==="fanaticism"&&e.tech.fanaticism)return!0;if(r==="anthropology"&&e.tech.anthropology)return!0;if(r==="deify"&&e.tech.ancient_deify)return!0;if(r==="study"&&e.tech.ancient_study)return!0}return!1}function wc(r){let a=!0;return r.power_reqs&&Object.keys(r.power_reqs).forEach(function(i){(!e.tech[i]||e.tech[i]`).appendTo("#city").append(`
${t(`city_dist_${i}`)} `),r[i].forEach(function(s){vt("city",s)}),pe(`dist-${i}`,function(){return t(`city_dist_${i}_desc`)},{elm:`#city-dist-${i} h3`,classes:"has-background-light has-text-dark"})}})}function ue(){if(!e.settings.tabLoad&&e.settings.civTabs!==3)return;let r={},a={},i={},s=[],n=[],c=[];["primitive","civilized","discovery","industrialized","globalized","early_space","deep_space","interstellar","intergalactic"].forEach(function(d){i[d]=[]});let l={interstellar:"solar"},o={};Object.keys(O.tech).forEach(function(d){if(!Du(d))return;Ra(O.tech[d].id);let h=Bu(d),_=O.tech[d],m="category"in _?_.category:"research";if(!h&&s.indexOf(m)===-1&&s.push(m),h&&n.indexOf(m)===-1&&n.push(m),c.indexOf(m)===-1&&c.push(m),h===!0)m in a||(a[m]=[]),a[m].push(d);else{let w=O.tech[d];if(!Qa(w,d))return;let M=cr(d,o);if(!M)return;m in r||(r[m]=[]);let F=e.race.truepath&&l[w.era]?l[w.era]:w.era;i.hasOwnProperty(F)||(i[F]=[]),i[F].push({t:d,p:M==="precog"})}}),le($("#tech")),Object.keys(i).forEach(function(d){i[d].length>0&&($("#tech").append(`
${t(`tech_era_${d}`)} `),i[d].sort(function(h,_){return O.tech[h.t].cost.Knowledge==null?-1:O.tech[_.t].cost.Knowledge==null||O.tech[h.t].cost.Knowledge()>O.tech[_.t].cost.Knowledge()?1:-1}),i[d].forEach(function(h){vt("tech",h.t,!1,h.p?o:!1)}))}),c.forEach(function(d){le($(`#tech-dist-${d}`),!0),le($(`#tech-dist-old-${d}`),!0)}),n.forEach(function(d){if(!(d in a))return;$(`
`).appendTo("#oldTech").append(`
${t(`tech_dist_${d}`)} `);let h=ar(4,12,!1);h.length>0&&d==="science"&&$("#tech-dist-old-science h3").append(h),a[d].forEach(function(_){vt("tech",_,!0,!1)})})}function vt(r,a,i,s){let n=O[r][a];Br(n,r,a,i,s)}function Br(r,a,i,s,n){if(Qa(r,i)===!1)return;let c=a;a==="outerSol"&&(a="space"),r.region&&(a=r.region),r.powered&&!e[a][i].on&&(e[a][i].on=0);let l=r.id;Ra(l);let o="";n&&r&&r.reqs&&Object.keys(r.reqs).forEach(function(m){n[m]&&(o+=` data-req-${m}="${n[m].a}"`)});let d=r.highlight&&r.highlight()?$(`
`):$(`
`);Tt(r,!1,["genes","blood"].includes(a))||d.addClass("cna"),Tt(r,!0,["genes","blood"].includes(a))||d.addClass("cnam");let h;if(s)h=$('{{ title }} ');else{let m="",w="";if(r.cost){let x=a!=="genes"&&a!=="blood"?jr(r):r.cost;Object.keys(x).forEach(function(j){let B=x[j]();B>0&&(m=m+` res-${j}`,w=w+` data-${j}="${B}"`)})}let M="";r.class&&(M=typeof r.class=="function"?` ${r.class()}`:` ${r.class}`),n&&(M=" precog");let F=r.highlight?r.highlight()?`${t("active")} `:`${t("not_active")} `:"";h=$(` ${F}{{ title }} description `)}if(d.append(h),r.hasOwnProperty("special")&&(typeof r.special=="function"&&r.special()||r.special===!0)){let m=$(``);d.append(m)}if(r.on||r.off){if(r.on){let m=$(` `);d.append(m)}if(r.off){let m=$(` `);d.append(m)}}else if(r.powered&&e.tech.high_tech&&e.tech.high_tech>=2&&wc(r)||r.switchable&&r.switchable()){let m=$(` `),w=$(` `);d.append(m),d.append(w)}if(r.count){let m=r.count();m>1&&h.append($(`${m} `))}else a!=="tech"&&e[a]&&e[a][i]&&e[a][i].count>=0?h.append($('{{ act.count }} ')):a==="blood"&&e[a]&&e[a][r.grant[0]]&&e[a][r.grant[0]]>0&&r.grant[1]==="*"&&h.append($(` ${e[a][r.grant[0]]} `));if(a!=="tech"&&e[a]&&e[a][i]&&typeof e[a][i].repair<"u"&&h.append($('')),s?$("#oldTech").append(d):$("#"+c).append(d),a!=="tech"&&e[a]&&e[a][i]&&e[a][i].count===0&&($(`#${l} .count`).css("display","none"),$(`#${l} .special`).css("display","none"),$(`#${l} .on`).css("display","none"),$(`#${l} .off`).css("display","none")),r.emblem){let m=r.emblem();d.append($(m))}let _={template:'
'};D({el:"#"+l,data:{title:typeof r.title=="string"?r.title:r.title(),act:e[a][i]},methods:{action(){"ontouchstart"in document.documentElement&&navigator.userAgent.match(e.settings.touch)||fl(r,a,i)},describe(){ss(Ru(r,s))},trigModal(){if(r.sAction&&typeof r.sAction=="function")r.sAction();else{this.$buefy.modal.open({parent:this,component:_});let m=setInterval(function(){$("#modalBox").length>0&&(clearInterval(m),yc(r,i))},50)}},on_label(){return`on: ${e[a][i].on}`},off_label(){return`off: ${e[a][i].count-e[a][i].on}`},power_on(){if(i==="banquet")e[a][i].on=1;else{let m=fe();for(let w=0;w0;w++)e[a][i].on--;r.postPower&&setTimeout(function(){r.postPower(!1)},250)},repair(){return e[a][i].repair},repairMax(){return r.repair()}},filters:{val(m){switch(m){case"on":return r.on();case"off":return r.off()}},p_off(m,w){let M=e[a][i].count-m;if(w==="city-casino"&&!e.race.cataclysm&&!e.race.orbit_decayed||w==="space-spc_casino"&&(e.race.cataclysm||e.race.orbit_decayed)||w==="tauceti-tauceti_casino"&&e.tech.isolation){let A=jt(5,12);if(M===0&&A.length>0)return A}else if(w==="city-banquet")return m?0:1;return M},p_on(m,w){if(w==="city-biolab"&&!e.race.cataclysm&&!e.race.orbit_decayed||(e.race.cataclysm||e.race.orbit_decayed)&&w==="space-exotic_lab"||e.tech.isolation&&w==="tauceti-infectious_disease_lab"){let M=jt(12,12);if(m===0&&M.length>0)return M}else if(w==="city-garrison"||w==="space-space_barracks"){let M=ar(1,14,!0);if(m===(w==="city-garrison"?13:0)&&M.length>0)return M}else if(w==="city-banquet")return m?1:0;return m},title(m){return m},options(m){return t("action_options",[m])}}}),pe(l,function(){},{in:function(m){Pi(m.popper,r,e[a][i],s,a,i)},out:function(){D({el:"#popTimer"},"destroy")},attach:a==="starDock"?"body .modal":"#main",wide:r.wide})}function fl(r,a,i){if(r.id==="spcdock-launch_ship")r.action();else switch(a){case"tech":if(!(e.settings.qKey&&kr.q)&&cr(i,!1)&&r.action())$c(i),r.post&&setTimeout(function(){r.post()},250);else if(!(r.no_queue&&r.no_queue())&&e.tech.r_queue&&e.r_queue.queue.length0){let m=e.settings.qKey?s:1;m>e.queue.max-h&&(m=e.queue.max-h);let w=r.queue_size?r.queue_size:1;if(r.region&&(a=r.id.split("-")[0]),e.settings.q_merge!=="merge_never")e.queue.queue.length>0&&e.queue.queue[e.queue.queue.length-1].id===r.id?e.queue.queue[e.queue.queue.length-1].q+=Math.min(_,w*m):e.queue.queue.push({id:r.id,action:a,type:i,label:typeof r.title=="string"?r.title:r.title(),cna:!1,time:0,q:Math.min(_,w*m),qs:w,t_max:0,bres:!1});else for(let M=0;M0;M++)e.queue.queue.push({id:r.id,action:a,type:i,label:typeof r.title=="string"?r.title:r.title(),cna:!1,time:0,q:Math.min(_,w),qs:w,t_max:0,bres:!1}),_-=w;c=!0}}break}else e.race.inflation&&e.tech.primitive&&(!r.hasOwnProperty("inflation")||r.inflation)&&e.race.inflation++;n=!0}if(n&&(xc(r,a,i),e.tech.queue&&r.queue_complete)){let o=r.queue_complete();for(let d=0,h=0;ho?(_.q=o,o=0):o-=_.q)}}c&&na();break}}}function xc(r,a,i){if(!Tt(r)){let s=r.id;$(`#${s}`).addClass("cna")}if(r.grant){let s=r.grant[0];(!e.tech[s]||e.tech[s]=4&&e.custom.planet&&r.custom&&r.custom.length>0&&Math.floor(J(0,10))===0){c=r.custom[Math.floor(J(0,r.custom.length))];let A=c.split(":");if(e.custom.planet[A[0]]&&e.custom.planet[A[0]][A[1]]){let x=Ke(e.custom.planet[A[0]][A[1]]);a=x.biome,i=x.traitlist,s=x.orbit,n=x.geology,i.sort()}else c=!1}if(!c){a=dn("biome",r),i=dn("trait",r,{biome:a}),i.sort();let A=Math.floor(J(0,3)),x=30;e.stats.achieve.whitehole&&(x+=e.stats.achieve.whitehole.l*5,A+=e.stats.achieve.whitehole.l),a==="eden"&&(x+=5);for(let j=0;j`),m=$(` ${h} `);_.append(m),$("#evolution").append(_);let w=!1,M=0;return pe(o,function(A){w=A,_l(A,h,a,s,i,n,M)},{classes:"has-background-light has-text-dark"}),$("#"+o).on("click",function(){if(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=5&&e.race.hasOwnProperty("geck")&&e.race.geck>0){if(Object.keys(n).forEach(function(A){n[A]+=Math.floor(J(0,7))/100}),M>0){let A=8-M;A<1&&(A=1),Math.floor(J(0,A))===0&&(a=dn("biome",r))}if(Math.floor(J(0,2))===0){let A=dn("trait",r,{biome:a,cap:1});if(A.length>0){if(i.includes(A[0])){let x=i.indexOf(A[0]);i.splice(x,1)}else A[0]!==void 0&&i.push(A[0]);d="",i.forEach(function(x){Re.hasOwnProperty(x)&&(d+=`${Re[x].label} `)})}}h=`${d}${qe[a].label} ${l}`,$(`#${o} .aTitle`).html(h),M++,e.race.geck--,e.race.hasOwnProperty("gecked")||(e.race.gecked=0),e.race.gecked++,le(w.popper),_l(w,h,a,s,i,n,M)}else delete e.race.geck,e.race.gecked&&(e.stats.geck+=e.race.gecked),e.race.chose=o,e.city.biome=a,e.city.calendar.orbit=s,e.city.geology=n,e.city.ptrait=i,M>0&&(e.race.rejuvenated=!0),le($("#evolution")),Ie(),Gr()}),c||(a==="eden"?"hellscape":a)}function _l(r,a,i,s,n,c,l){r.popper.append($(`${t("set_planet",[a,qe[i].label,s])}
`)),r.popper.append($(`${qe[i].desc}
`)),n.length>0&&n.forEach(function(d){r.popper.append($(`${Re[d].desc}
`))});let o=kc(c);o.length>0&&r.popper.append($(`${o}
`)),l&&l>0&&r.popper.append($(`${t("rejuvenated")}
`))}function dn(r,a,i){if(i=i||{},r==="biome"){let s="grassland",n=!a.hell&&e.stats.portals>=1?7:6,c=Math.floor(J(0,3))===0,l=it();switch(Math.floor(J(0,n))){case 0:s=c&&e.stats.achieve.biome_grassland&&e.stats.achieve.biome_grassland[l]&&e.stats.achieve.biome_grassland[l]>0?"savanna":"grassland";break;case 1:s=c&&e.stats.achieve.biome_oceanic&&e.stats.achieve.biome_oceanic[l]&&e.stats.achieve.biome_oceanic[l]>0?"swamp":"oceanic";break;case 2:s=c&&e.stats.achieve.biome_forest&&e.stats.achieve.biome_forest[l]&&e.stats.achieve.biome_forest[l]>0?Math.floor(J(0,2))===0?"taiga":"swamp":"forest";break;case 3:s=c&&e.stats.achieve.biome_desert&&e.stats.achieve.biome_desert[l]&&e.stats.achieve.biome_desert[l]>0?"ashland":"desert";break;case 4:s=c&&e.stats.achieve.biome_volcanic&&e.stats.achieve.biome_volcanic[l]&&e.stats.achieve.biome_volcanic[l]>0?"ashland":"volcanic";break;case 5:s=c&&e.stats.achieve.biome_tundra&&e.stats.achieve.biome_tundra[l]&&e.stats.achieve.biome_tundra[l]>0?"taiga":"tundra";break;case 6:s=e.race.universe==="evil"?"eden":"hellscape";break;default:s="grassland";break}return s}else if(r==="trait"){let s=[],n=i.cap||2;for(let c=0;c0,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 d=e.city.power;c&&(d+=e.race.replicator.pow),n=r.powered()<=d}let l=r.hasOwnProperty("s_type")&&r.hasOwnProperty("support")&&r.support()<0,o=!l;if(l){let d=Xr(),h=d[r.s_type].r,_=d[r.s_type].rs;o=e[h][_].support-r.support()<=e[h][_].s_max}return n&&o||e.settings.alwaysPower?(e[i[0]][i[1]].on++,s&&(e.city.power-=r.powered(),c&&_a.replicate.task()),a&&typeof a=="function"?a(r):!0):!1}function kc(r){let a="";if(Object.keys(r).length>0){let i="",s="",n=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;e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=0&&n++;for(let c in r)if(c!==0){if(r[c]>0){let l=`${t(`resource_${c}_name`)}`;n>0?(l+=`: +${Math.round((r[c]+1)*100-100)}% `,n--):l+=`: ${t("bonus")} `,l+="
",i=i+l}else if(r[c]<0){let l=`${t(`resource_${c}_name`)}`;n>0?(l+=`: ${Math.round((r[c]+1)*100-100)}% `,n--):l+=`: ${t("malus")} `,l+="
",s=s+l}}a=`${i}${s}
`}return a}function Ru(r,a){let i=typeof r.desc=="string"?r.desc:r.desc();if(i=i+". ",r.cost&&!a){Tt(r)?i=i+t("affordable")+". ":i=i+t("not_affordable")+". ",i=i+"Costs: ";let n=r.id.split("-")[0];var s=n!=="genes"&&n!=="blood"?jr(r):r.cost;Object.keys(s).forEach(function(c){if(c==="Custom"){let l=s[c]();i=i+l.label}else if(c==="Structs"){let l=s[c]();Object.keys(l).forEach(function(o){Object.keys(l[o]).forEach(function(d){let h="";if(l[o][d].hasOwnProperty("s")){let _=l[o][d].s;h=typeof O[o][_][d].title=="string"?O[o][_][d].title:O[o][_][d].title()}else h=typeof O[o][d].title=="string"?O[o][d].title:O[o][d].title();i=i+`${h}. `,e[o][d]?l[o][d].count>e[o][d].count?i=i+`${t("insufficient")} ${h}. `:l[o][d].hasOwnProperty("on")&&l[o][d].on>e[o][d].on&&(i=i+`${t("insufficient")} ${h} enabled. `):i=i+`${t("insufficient")} ${h}. `})})}else if(e.prestige.hasOwnProperty(c)){let l=s[c]();if(l>0){c==="Plasmid"&&e.race.universe==="antimatter"&&(c="AntiPlasmid");let o=t(`resource_${c}_name`);i=i+`${o}: ${l}. `,e.prestige[c].count0){let o=t(`resource_${c}_name`);i=i+`${o}: ${l}. `,e.portal.purifier.supply0){let d=o==="Money"?"$":e.resource[o].name+": ";d=d.replace("_"," ");let h=Ee(l,1);i=i+`${d}${h}. `,e.resource[o].amount${a.hasOwnProperty("touchlabel")?a.touchlabel:t("construct")}`),r.append(d),$("#touchButton").on("touchstart",function(){fl(a,n,c)})),r.append($(`${o}
`));let h=a.id.split("-")[0];a.category&&h==="tech"&&!s&&r.append($(`${t("tech_dist_category")}: ${t(`tech_dist_${a.category}`)}
`));let _=fa(a,!1,!0);if(a.cost&&!s){let x=!0;var m=$('
'),w=h!=="genes"&&h!=="blood"?jr(a):a.cost;Object.keys(w).forEach(function(j){if(j==="Custom"){let B=w[j]();m.append($(`${B.label}
`)),x=!1}else if(j==="Structs"){let B=w[j]();Object.keys(B).forEach(function(S){Object.keys(B[S]).forEach(function(Q){let V=B[S][Q].hasOwnProperty("on")?B[S][Q].on:B[S][Q].count,ce="has-text-dark",Y="";e[S][Q]?B[S][Q].count>e[S][Q].count?(ce="has-text-danger",Y=' (blocking resource) '):B[S][Q].hasOwnProperty("on")&&B[S][Q].on>e[S][Q].on&&(ce="has-text-alert"):(ce="has-text-danger",Y=' (blocking resource) ');let Ge="";if(B[S][Q].hasOwnProperty("s")){let Ce=B[S][Q].s;Ge=typeof O[S][Ce][Q].title=="string"?O[S][Ce][Q].title:O[S][Ce][Q].title()}else Ge=typeof O[S][Q].title=="string"?O[S][Q].title:O[S][Q].title();x=!1,m.append($(`${Ge}: ${V}${Y}
`))})})}else if(e.prestige.hasOwnProperty(j)){let B=w[j]();if(B>0){j==="Plasmid"&&e.race.universe==="antimatter"&&(j="AntiPlasmid");let S=t(`resource_${j}_name`),Q="has-text-dark",V="";e.prestige[j].count(blocking resource)'),x=!1,m.append($(` ${S}: ${B}${V}
`))}}else if(j==="Supply"){let B=w[j]();if(B>0){let S=t(`resource_${j}_name`),Q="has-text-dark",V="";e.portal.purifier.supply(blocking resource)'),x=!1,m.append($(` ${S}: ${B}${V}
`))}}else if(j!=="Morale"&&j!=="Army"&&j!=="Bool"){let B=w[j]();if(B>0){let S="",Q=j==="Species"?e.race.species:j;if(j==="HellArmy"){let V=t("fortress_troops"),ce="has-text-dark";e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size(blocking resource)'):ce="has-text-alert"),x=!1,m.append($(` ${V}: ${B}${S}
`))}else{let V=Q==="Money"?"$":e.resource[Q].name+": ";V=V.replace("_"," ");let ce="has-text-dark",Y="";e.resource[Q].amount(blocking resource)'):ce="has-text-alert",l&&l!==j&&_.r===Q?(ce+=" grad-from-left",Y=' (first blocking resource) '):l&&l===j&&_.r!==Q&&(ce+=" grad-from-left-warn")):l&&l===j&&(ce+=" grad-from-right",Y=' (last blocking resource) ');let Ge=Ee(B,1);x=!1,m.append($(` ${V}${Ge}${Y}
`))}}}}),x||r.append(m)}if(a.effect){var M=typeof a.effect=="string"?a.effect:a.effect();M&&r.append($(`${M}
`))}if(a.flair){var A=typeof a.flair=="string"?a.flair:a.flair();r.append($(`${A}
`)),r.addClass("flair")}if(a.reqs){let x=[];if(Object.keys(a.reqs).forEach(function(j){let B=$(`#${a.id}`).attr(`data-req-${j}`);B&&x.push(typeof O.tech[B].title=="string"?O.tech[B].title:O.tech[B].title())}),x.length>0){let j=x.join(", ");r.append($(`${t("requires_tech",[j])}
`))}}if(!s&&a.id.substring(0,5)!=="blood"&&!Tt(a)&&Tt(a,!0)){if(typeof i=="string"&&i==="notimer")return;if(i&&i.time)r.append($('{{ time | timer }}
')),D({el:"#popTimer",data:i,filters:{timer(x){return t("action_ready",[x])}}});else{let x=At(_.t);r.append($(`${t("action_ready",[x])}
`))}}(a.id==="portal-spire"||a.id==="portal-waygate"&&e.tech.waygate>=2)&&i&&i.time&&(r.append($('{{ time | timer }}
')),D({el:"#popTimer",data:i,filters:{timer(x){let j=!a.hasOwnProperty("mscan")||a.hasOwnProperty("mscan")&&a.mscan()>0?x:"???";return t("floor_clearing",[j])}}}))}function Ra(r){le($(`#${r}`),!0),Ie(r)}function Ci(r,a,i){var s=r.id;e[a]&&e[a][i]&&e[a][i].count&&($(`#${s} .count`).html(e[a][i].count),e[a][i]&&e[a][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&&Pi($("#popper"),r,e[a][i],!1,a,i)}function u(r,a){return a=a||jr(r),Ks(a)?(Object.keys(a).forEach(function(i){if(e.prestige.hasOwnProperty(i)){let s=a[i]();i==="Plasmid"&&e.race.universe==="antimatter"&&(i="AntiPlasmid"),e.prestige[i].count-=s}else if(i==="Supply"){let s=a[i]();e.portal.purifier.supply-=s}else if(i!=="Morale"&&i!=="Army"&&i!=="HellArmy"&&i!=="Structs"&&i!=="Bool"&&i!=="Custom"){let s=a[i](),n=i==="Species"?e.race.species:i;e.resource[n].amount-=s,n==="Knowledge"&&(e.stats.know+=s)}}),!0):!1}function Tt(r,a,i){if(r.cost){let s=i?r.cost:jr(r);return a?Hu(s):Ks(s)}return!0}function Hu(r){var a=!0;return Object.keys(r).forEach(function(i){if(i!=="Custom")if(i==="Structs"){if(!ml(r[i]())){a=!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){a=!1;return}}}),a}function Ks(r){var a=!0;return Object.keys(r).forEach(function(i){if(i==="Custom"){if(!r[i]().met){a=!1;return}}else if(i==="Structs"){if(!ml(r[i]())){a=!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){a=!1;return}}}),a}function ml(r){let a=!0;return Object.keys(r).forEach(function(i){if(e.hasOwnProperty(i))Object.keys(r[i]).forEach(function(s){if(e[i].hasOwnProperty(s)){if(e[i][s].count=7&&(r*=.92**e.tech.nexus),r}function pt(r){let a=ge("dirty_jobs",0);return a&&(r-=a),r}function Wu(){let r=$('
');$("#evolution").append(r),r.append($(`
${t("evo_challenge_genes")} `)),r.append($(`${t("evo_challenge_genes_desc")}
`)),e.genes.challenge&&e.genes.challenge>=2&&r.append($(`${t("evo_challenge_genes_mastery")}
`))}function Qu(){let r=$('
');$("#evolution").append(r),r.append($(`
${t("evo_challenge_run")} `)),r.append($(`${t("evo_challenge_run_desc")}
`))}function Vu(){let r=$('
');$("#evolution").append(r),r.append($(`
${t("evo_scenario")} `)),r.append($(`${t("evo_scenario_desc")}
`))}function Zu(){let r=$('
');$("#evolution").append(r),r.append($(`
${t("evo_challenge_simulation")} `)),r.append($(`${t("evo_challenge_simulation_desc")}
`)),r.append($(`${t("evo_challenge_end_sim")} `)),D({el:"#simSection",data:{},methods:{exitsim(){a0()}}})}function Ju(){let r=$('
');$("#evolution").append(r),r.append($(`
${t("evo_challenge_simulation")} `)),r.append($(`${t("evo_challenge_simulation_desc")}
`));let a=$($('
'));r.append(a),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,a.append($(`${t(`resource_${i}_name`)}
`))}),D({el:"#simSection",data:e.race.simConfig})}function yc(r,a){let i=typeof r.title=="string"?r.title:r.title();$("#modalBox").append($(`${i}
`));var s=$('
');switch($("#modalBox").append(s),a){case"smelter":case"hell_smelter":case"stellar_forge":case"hell_forge":case"geothermal":case"ore_refinery":Xt("smelter",s);break;case"factory":case"red_factory":case"int_factory":case"tau_factory":Xt("factory",s);break;case"star_dock":Yu(s);break;case"mining_droid":Xt("droid",s);break;case"g_factory":case"refueling_station":Xt("graphene",s);break;case"freighter":case"super_freighter":hc(s);break;case"pylon":Xt("pylon",s);break;case"rock_quarry":Xt("rock_quarry",s);break;case"titan_mine":Xt("titan_mine",s);break;case"mining_ship":Xt("mining_ship",s);break;case"alien_space_station":Xt("alien_space_station",s);break;case"nanite_factory":Xt("nanite_factory",s);break;case"alien_outpost":Xt("replicator",s);break}}function Yu(r){if(e.tech.genesis<4){let s=$(`${t("stardock_warn")}
`);r.append(s);return}let a=$('
');r.append(a);let i=O.starDock.probes;if(Br(i,"starDock","probes"),e.tech.geck&&e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=5){let s=O.starDock.geck;Br(s,"starDock","geck")}if(e.tech.genesis>=5){let s=O.starDock.seeder;Br(s,"starDock","seeder")}if(e.tech.genesis===6){let s=O.starDock.prep_ship;Br(s,"starDock","prep_ship")}if(e.tech.genesis>=7){let s=O.starDock.launch_ship;Br(s,"starDock","launch_ship")}}function gl(){if(e.race.orbit_decay&&e.stats.hasOwnProperty("days")&&e.stats.days>=e.race.orbit_decay&&!e.race.orbit_decayed){e.race.orbit_decayed=!0,I(t("evo_challenge_orbit_decayed_msg",[F[e.race.species].home]),"info",!1,["progress"]),e.race.universe==="magic"&&(e.city.pylon&&(e.space.pylon={count:Math.ceil(e.city.pylon.count/2)}),e.race.casting&&Object.keys(e.race.casting).forEach(function(r){e.race.casting[r]=0})),Object.keys(O.city).forEach(function(r){e.city.hasOwnProperty(r)&&e.city[r].hasOwnProperty("count")&&(e.race.hooved&&O.city[r].cost.hasOwnProperty("Horseshoe")&&(e.race.shoecnt-=O.city[r].cost.Horseshoe()*e.city[r].count),e.city[r].count=0,e.city[r].hasOwnProperty("on")&&(e.city[r].on=0))}),e.race.hooved&&e.race.shoecnt<5&&(e.race.shoecnt=5),e.resource.Zen.display&&(e.resource.Zen.display=!1),e.resource.Slave.display&&(e.resource.Slave.display=!1,e.resource.Slave.amount=0,qr("slave")),e.race.deconstructor&&va.forEach(function(r){e.city.nanite_factory[r]=0}),Object.keys(e.resource).forEach(function(r){e.resource[r].hasOwnProperty("trade")&&(e.resource[r].trade=0)}),e.space.red_university={count:0},Object.keys(O.space.spc_moon).forEach(function(r){e.space.hasOwnProperty(r)&&e.space[r].hasOwnProperty("count")&&(e.space[r].count=0,e.space[r].hasOwnProperty("on")&&(e.space[r].on=0))}),Object.keys(si).forEach(function(r){r!=="colonist"&&(e.civic[r].workers=0,e.civic[r].assigned=0)}),["bolognium_ship","scout_ship","corvette_ship","frigate_ship","cruiser_ship","dreadnought","freighter","super_freighter","armed_miner","scavenger"].forEach(function(r){e.galaxy[r]&&(e.galaxy[r].on=0)}),e.portal.transport&&(e.portal.transport.on=0),["forager","farmer","lumberjack","quarry_worker"].forEach(function(r){e.civic[r].display=!1}),e.civic.hunter.display?e.civic.d_job="hunter":e.civic.d_job="unemployed";for(let r of Object.values(e.race.purgatory.city))r.hasOwnProperty("count")&&(r.count=0),r.hasOwnProperty("on")&&(r.on=0);if(e.queue.hasOwnProperty("queue"))for(let r=e.queue.queue.length-1;r>=0;r--){let a=e.queue.queue[r];(a.action==="city"||a.action==="space"&&O.space.spc_moon[a.type])&&e.queue.queue.splice(r,1)}e.arpa.sequence&&(e.arpa.sequence.on=!1,e.arpa.sequence.boost=!1),e.city.calendar.moon=0,document.getElementById("moon").removeAttribute("class"),$("#moon").addClass("moon wi wi-moon-new"),e.settings.spaceTabs=1,e.settings.space.moon=!1,e.settings.showCity=!1,le($("#infoTimer")),Pt()}}function vl(){le($("#evolution .evolving"),!0);let r=$(``);$("#evolution").append(r)}function dr(){return e.race.universe==="magic"?t("city_wizard_tower_title"):e.race.evil?t("city_babel_title"):t("city_wardenclyffe")}function yl(){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(F[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 Xu(){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(F[e.race.species].type){case"avian":return t("city_cottage_title6");case"eldritch":return t("city_cottage_title8")}return t("city_cottage_title1")}function e0(r){if(!r&&ge("extravagant",0))return t("city_mansion");switch(e.race.species){case"sporgar":return t("city_apartment_title2")}switch(F[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 St(r,a){switch(r){case"small":return yl();case"medium":return Xu();case"large":return e0(a)}}function Qr(r,a){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(O[n.action]).forEach(function(l){O[n.action][l][n.type]&&c&&(e.queue.queue[s].label=typeof O[n.action][l][n.type].title=="string"?O[n.action][l][n.type].title:O[n.action][l][n.type].title(),c=!1)})}else O[n.action][n.type]&&(e.queue.queue[s].label=typeof O[n.action][n.type].title=="string"?O[n.action][n.type].title:O[n.action][n.type].title())}}if(r&&e.tech.r_queue&&e.r_queue.display)for(let i=0;i1)return e.race.evoFinalMenu=r,Gr(),!0;e.race.species=r,Cs()}function Cs(){e.race.simulation&&r0(),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")&&wl(),e.race.species!=="junker"&&delete e.race.junker,e.race.species!=="sludge"&&delete e.race.sludge;for(var r=["rna","dna","membrane","organelles","nucleus","eukaryotic_cell","mitochondria"],a=0;a=4&&_t(h)}),Object.keys(F[e.race.species].traits).forEach(function(h){_t(h,{set:F[e.race.species].traits[h]})}),e.race.imitation&&e.race.srace&&fn(!1),Object.keys(e.tech).forEach(function(h){h.substring(0,4)==="evo_"&&delete e.tech[h]}),delete e.tech.evo,e.evolution={};let i=new Date;!e.settings.boring&&i.getMonth()===11&&i.getDate()>=17&&(e.race.species==="elven"?(_t("slaver",{set:2}),_t("resourceful",{set:.5}),_t("small",{set:.25})):e.race.species==="capybara"?(_t("beast_of_burden",{set:1}),_t("pack_rat",{set:.5}),_t("musical",{set:.25})):e.race.species==="centaur"?(_t("beast_of_burden",{set:1}),_t("curious",{set:.5}),_t("blissful",{set:.25})):e.race.species==="wendigo"?(_t("immoral",{set:3}),_t("cannibalize",{set:.5}),_t("claws",{set:.25})):e.race.species==="yeti"?(_t("scavenger",{set:3}),_t("regenerative",{set:.5}),_t("musical",{set:.25})):e.race.species==="entish"&&(_t("photosynth",{set:3}),_t("optimistic",{set:.5}),_t("armored",{set:.25})));let s=Ve("easter");if(e.race.species==="wolven"&&s.active?(_t("hyper",{set:1}),_t("fast_growth",{set:1}),_t("rainbow",{set:1}),_t("optimistic",{set:1})):e.race.species==="vulpine"&&s.active&&(_t("cannibalize",{set:2}),_t("rage",{set:1}),_t("blood_thirst",{set:1}),_t("sticky",{set:1})),e.race.no_crispr||e.race.badgenes){let h=e.race.badgenes?3:1;for(let _=0;_=2)for(let h=1;h<8;h++)e.genes.evolve>=h+1&&Ai(h);let l=ga();e.civic.foreign.gov0.name={s0:l.s0,s1:l.s1};let o=ga();for(;l.s0===o.s0&&l.s1===o.s1;)o=ga();e.civic.foreign.gov1.name={s0:o.s0,s1:o.s1};let d=ga();for(;l.s0===d.s0&&l.s1===d.s1||o.s0===d.s0&&o.s1===d.s1;)d=ga();if(e.civic.foreign.gov2.name={s0:d.s0,s1:d.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(J(20,40)),mil:Math.floor(J(650,750)),eco:Math.floor(J(250,300)),spy:0,esp:0,trn:0,sab:0,act:"none"};let h=ga(!0);e.civic.foreign.gov3.name={s0:h.s0,s1:h.s1},e.civic.foreign.gov4={unrest:0,hstl:100,mil:300,eco:100,spy:0,esp:0,trn:0,sab:0,act:"none"};let _=ga(!0);for(;_.s1===h.s1;)_=ga(!0);e.civic.foreign.gov4.name={s0:99,s1:_.s1}}if(e.race.cataclysm?I(t("cataclysm_sentience",[F[e.race.species].home,tt("name")]),"info",!1,["progress"]):I(t("sentience",[t("genelab_genus_"+F[e.race.species].type),F[e.race.species].entity,tt("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 h=1;for(let _=1;_=5&&h++;e.resource.Soul_Gem.amount=h}if(e.race.species==="tortoisan"){let h=Math.floor(J(100));h===99?e.race.shell_color="rainbow":h>=97&&h<=98?e.race.shell_color="white":h>=93&&h<=96?e.race.shell_color="red":h>=89&&h<=92?e.race.shell_color="orange":h>=85&&h<=88?e.race.shell_color="yellow":h>=75&&h<=84?e.race.shell_color="purple":h>=65&&h<=74?e.race.shell_color="blue":e.race.shell_color="green"}if(e.race.species==="vulpine"){let h=Math.floor(J(100));h>=85?e.race.fox_color="white":h>=70&&h<=84?e.race.fox_color="tan":h>=55&&h<=69?e.race.fox_color="silver":h>=35&&h<=54?e.race.fox_color="grey":e.race.fox_color="red"}if(ea(!0),e.blood.aware&&(e.settings.arpa.blood=!0,e.tech.b_stone=2),$i(!0),us(),Ii(!0),e.race.shapeshifter&&oa(!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),Nt(!0),(e.race.truepath||e.race.lone_survivor)&&Object.keys(ta).forEach(function(h){e.resource.hasOwnProperty(h)&&(e.resource[h].value=ta[h]*2)}),me(e.race.species,!0),wt("sentience",{species:e.race.species,challenge:Jt()-1}),e.stats.feat.adept){let h=ts();e.resource.Food.amount+=h*100,e.resource.Stone.max+=h*60,e.resource.Stone.amount+=h*100,e.race.smoldering?(e.resource.Chrysotile.max+=h*60,e.resource.Chrysotile.amount+=h*100):(e.resource.Lumber.max+=h*60,e.resource.Lumber.amount+=h*100)}e.race.fasting&&(e.resource.Food.amount=0),e.race.cataclysm?s0():e.race.lone_survivor?Ao():e.race.artifical&&i0(),e.settings.tabLoad?(Et(),ls(),ia($("#c_garrison"),!1),ps(),e.race.cataclysm||e.race.lone_survivor?(le($("#r_civics")),Ii(),rt(),Fa("market"),Fa("storage"),Je.hasOwnProperty("resource")&&Object.keys(Je.resource).forEach(function(h){let _=Je.resource[h].color,m=Je.resource[h].tradable;if(Je.resource[h].stackable){var M=$(`
`);$("#resStorage").append(M),ws(`#stack-${h}`,M,h,_,!0)}if(m){var M=$(`
`);$("#market").append(M),bs(`#market-${h}`,M,h,_,!0)}}),Ui(),Ue("Genetics"),Ue("Crispr"),Ue("Blood")):e.sim&&(Ue("Crispr"),Ue("Blood"))):gr("mTabCivil"),e.queue.hasOwnProperty("queue")&&(e.queue.queue=[]),(e.race.slow||e.race.hyper||e.race.species==="junker")&&(Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w&&Pe.w.terminate(),window.location.reload())}function r0(){e.race.simulation&&(e.hasOwnProperty("sim")||(e.sim={stats:Ke(e.stats),prestige:Ke(e.prestige),genes:Ke(e.genes),blood:Ke(e.blood),pillars:Ke(e.pillars),race:Ke(e.race)},e.stats={start:Date.now(),days:0,tdays:0},qn(),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(r){e.prestige[r]={count:Number(e.race.simConfig[r])}})))}function a0(){e.hasOwnProperty("sim")&&(e.stats=Ke(e.sim.stats),e.prestige=Ke(e.sim.prestige),e.genes=Ke(e.sim.genes),e.blood=Ke(e.sim.blood),e.pillars=Ke(e.sim.pillars),e.race=Ke(e.sim.race),delete e.sim,e.race.species="protoplasm",delete e.race.simulation,Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w&&Pe.w.terminate(),window.location.reload())}function i0(){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},Et(),ue(),Lt())}function s0(){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=N(1),e.civic.cement_worker.workers=N(1)),e.civic.colonist.max=N(4),e.civic.colonist.workers=N(4),e.civic.space_miner.max=N(3),e.civic.space_miner.workers=N(2),e.civic.professor.max=N(1),e.civic.professor.workers=N(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},Et(),ue(),Pt(),Ue("Physics"),Lt())}function on(r){switch(F[r].fanaticism){case"smart":e.race.dumb?(Ai(5),Ue("Genetics")):pn("smart");break;case"infectious":pn("infectious"),e.race.species==="human"&&ie("infested");break;case"blood_thirst":pn("blood_thirst"),e.race.species==="entish"&&ie("madagascar_tree");break;case"none":Ai(5),Ue("Genetics");break;default:pn(F[r].fanaticism);break}}function pn(r){e.race[r]?_t(r)?r==="imitation"?fn(!0):r==="shapeshifter"&&oa(e.race.ss_genus):(Ai(5),Ue("Genetics")):(e.race[r]=1,Ni(r))}function ki(){if(!e.settings.tabLoad&&e.settings.civTabs!==3)return;tc(),le($("#resQueue")),$("#resQueue").append($(`
+ `);d.append(m)}if(r.on||r.off){if(r.on){let m=$(` `);d.append(m)}if(r.off){let m=$(` `);d.append(m)}}else if(r.powered&&e.tech.high_tech&&e.tech.high_tech>=2&&wc(r)||r.switchable&&r.switchable()){let m=$(` `),w=$(` `);d.append(m),d.append(w)}if(r.count){let m=r.count();m>1&&h.append($(`${m} `))}else a!=="tech"&&e[a]&&e[a][i]&&e[a][i].count>=0?h.append($('{{ act.count }} ')):a==="blood"&&e[a]&&e[a][r.grant[0]]&&e[a][r.grant[0]]>0&&r.grant[1]==="*"&&h.append($(` ${e[a][r.grant[0]]} `));if(a!=="tech"&&e[a]&&e[a][i]&&typeof e[a][i].repair<"u"&&h.append($('')),s?$("#oldTech").append(d):$("#"+c).append(d),a!=="tech"&&e[a]&&e[a][i]&&e[a][i].count===0&&($(`#${l} .count`).css("display","none"),$(`#${l} .special`).css("display","none"),$(`#${l} .on`).css("display","none"),$(`#${l} .off`).css("display","none")),r.emblem){let m=r.emblem();d.append($(m))}let _={template:'
'};D({el:"#"+l,data:{title:typeof r.title=="string"?r.title:r.title(),act:e[a][i]},methods:{action(){"ontouchstart"in document.documentElement&&navigator.userAgent.match(e.settings.touch)||fl(r,a,i)},describe(){ss(Ru(r,s))},trigModal(){if(r.sAction&&typeof r.sAction=="function")r.sAction();else{this.$buefy.modal.open({parent:this,component:_});let m=setInterval(function(){$("#modalBox").length>0&&(clearInterval(m),yc(r,i))},50)}},on_label(){return`on: ${e[a][i].on}`},off_label(){return`off: ${e[a][i].count-e[a][i].on}`},power_on(){if(i==="banquet")e[a][i].on=1;else{let m=fe();for(let w=0;w0;w++)e[a][i].on--;r.postPower&&setTimeout(function(){r.postPower(!1)},250)},repair(){return e[a][i].repair},repairMax(){return r.repair()}},filters:{val(m){switch(m){case"on":return r.on();case"off":return r.off()}},p_off(m,w){let M=e[a][i].count-m;if(w==="city-casino"&&!e.race.cataclysm&&!e.race.orbit_decayed||w==="space-spc_casino"&&(e.race.cataclysm||e.race.orbit_decayed)||w==="tauceti-tauceti_casino"&&e.tech.isolation){let F=jt(5,12);if(M===0&&F.length>0)return F}else if(w==="city-banquet")return m?0:1;return M},p_on(m,w){if(w==="city-biolab"&&!e.race.cataclysm&&!e.race.orbit_decayed||(e.race.cataclysm||e.race.orbit_decayed)&&w==="space-exotic_lab"||e.tech.isolation&&w==="tauceti-infectious_disease_lab"){let M=jt(12,12);if(m===0&&M.length>0)return M}else if(w==="city-garrison"||w==="space-space_barracks"){let M=ar(1,14,!0);if(m===(w==="city-garrison"?13:0)&&M.length>0)return M}else if(w==="city-banquet")return m?1:0;return m},title(m){return m},options(m){return t("action_options",[m])}}}),pe(l,function(){},{in:function(m){Pi(m.popper,r,e[a][i],s,a,i)},out:function(){D({el:"#popTimer"},"destroy")},attach:a==="starDock"?"body .modal":"#main",wide:r.wide})}function fl(r,a,i){if(r.id==="spcdock-launch_ship")r.action();else switch(a){case"tech":if(!(e.settings.qKey&&kr.q)&&cr(i,!1)&&r.action())$c(i),r.post&&setTimeout(function(){r.post()},250);else if(!(r.no_queue&&r.no_queue())&&e.tech.r_queue&&e.r_queue.queue.length0){let m=e.settings.qKey?s:1;m>e.queue.max-h&&(m=e.queue.max-h);let w=r.queue_size?r.queue_size:1;if(r.region&&(a=r.id.split("-")[0]),e.settings.q_merge!=="merge_never")e.queue.queue.length>0&&e.queue.queue[e.queue.queue.length-1].id===r.id?e.queue.queue[e.queue.queue.length-1].q+=Math.min(_,w*m):e.queue.queue.push({id:r.id,action:a,type:i,label:typeof r.title=="string"?r.title:r.title(),cna:!1,time:0,q:Math.min(_,w*m),qs:w,t_max:0,bres:!1});else for(let M=0;M0;M++)e.queue.queue.push({id:r.id,action:a,type:i,label:typeof r.title=="string"?r.title:r.title(),cna:!1,time:0,q:Math.min(_,w),qs:w,t_max:0,bres:!1}),_-=w;c=!0}}break}else e.race.inflation&&e.tech.primitive&&(!r.hasOwnProperty("inflation")||r.inflation)&&e.race.inflation++;n=!0}if(n&&(xc(r,a,i),e.tech.queue&&r.queue_complete)){let o=r.queue_complete();for(let d=0,h=0;ho?(_.q=o,o=0):o-=_.q)}}c&&na();break}}}function xc(r,a,i){if(!Tt(r)){let s=r.id;$(`#${s}`).addClass("cna")}if(r.grant){let s=r.grant[0];(!e.tech[s]||e.tech[s]=4&&e.custom.planet&&r.custom&&r.custom.length>0&&Math.floor(J(0,10))===0){c=r.custom[Math.floor(J(0,r.custom.length))];let F=c.split(":");if(e.custom.planet[F[0]]&&e.custom.planet[F[0]][F[1]]){let x=Ke(e.custom.planet[F[0]][F[1]]);a=x.biome,i=x.traitlist,s=x.orbit,n=x.geology,i.sort()}else c=!1}if(!c){a=dn("biome",r),i=dn("trait",r,{biome:a}),i.sort();let F=Math.floor(J(0,3)),x=30;e.stats.achieve.whitehole&&(x+=e.stats.achieve.whitehole.l*5,F+=e.stats.achieve.whitehole.l),a==="eden"&&(x+=5);for(let j=0;j`),m=$(`${h} `);_.append(m),$("#evolution").append(_);let w=!1,M=0;return pe(o,function(F){w=F,_l(F,h,a,s,i,n,M)},{classes:"has-background-light has-text-dark"}),$("#"+o).on("click",function(){if(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=5&&e.race.hasOwnProperty("geck")&&e.race.geck>0){if(Object.keys(n).forEach(function(F){n[F]+=Math.floor(J(0,7))/100}),M>0){let F=8-M;F<1&&(F=1),Math.floor(J(0,F))===0&&(a=dn("biome",r))}if(Math.floor(J(0,2))===0){let F=dn("trait",r,{biome:a,cap:1});if(F.length>0){if(i.includes(F[0])){let x=i.indexOf(F[0]);i.splice(x,1)}else F[0]!==void 0&&i.push(F[0]);d="",i.forEach(function(x){Re.hasOwnProperty(x)&&(d+=`${Re[x].label} `)})}}h=`${d}${qe[a].label} ${l}`,$(`#${o} .aTitle`).html(h),M++,e.race.geck--,e.race.hasOwnProperty("gecked")||(e.race.gecked=0),e.race.gecked++,le(w.popper),_l(w,h,a,s,i,n,M)}else delete e.race.geck,e.race.gecked&&(e.stats.geck+=e.race.gecked),e.race.chose=o,e.city.biome=a,e.city.calendar.orbit=s,e.city.geology=n,e.city.ptrait=i,M>0&&(e.race.rejuvenated=!0),le($("#evolution")),Ie(),Gr()}),c||(a==="eden"?"hellscape":a)}function _l(r,a,i,s,n,c,l){r.popper.append($(`${t("set_planet",[a,qe[i].label,s])}
`)),r.popper.append($(`${qe[i].desc}
`)),n.length>0&&n.forEach(function(d){r.popper.append($(`${Re[d].desc}
`))});let o=kc(c);o.length>0&&r.popper.append($(`${o}
`)),l&&l>0&&r.popper.append($(`${t("rejuvenated")}
`))}function dn(r,a,i){if(i=i||{},r==="biome"){let s="grassland",n=!a.hell&&e.stats.portals>=1?7:6,c=Math.floor(J(0,3))===0,l=ot();switch(Math.floor(J(0,n))){case 0:s=c&&e.stats.achieve.biome_grassland&&e.stats.achieve.biome_grassland[l]&&e.stats.achieve.biome_grassland[l]>0?"savanna":"grassland";break;case 1:s=c&&e.stats.achieve.biome_oceanic&&e.stats.achieve.biome_oceanic[l]&&e.stats.achieve.biome_oceanic[l]>0?"swamp":"oceanic";break;case 2:s=c&&e.stats.achieve.biome_forest&&e.stats.achieve.biome_forest[l]&&e.stats.achieve.biome_forest[l]>0?Math.floor(J(0,2))===0?"taiga":"swamp":"forest";break;case 3:s=c&&e.stats.achieve.biome_desert&&e.stats.achieve.biome_desert[l]&&e.stats.achieve.biome_desert[l]>0?"ashland":"desert";break;case 4:s=c&&e.stats.achieve.biome_volcanic&&e.stats.achieve.biome_volcanic[l]&&e.stats.achieve.biome_volcanic[l]>0?"ashland":"volcanic";break;case 5:s=c&&e.stats.achieve.biome_tundra&&e.stats.achieve.biome_tundra[l]&&e.stats.achieve.biome_tundra[l]>0?"taiga":"tundra";break;case 6:s=e.race.universe==="evil"?"eden":"hellscape";break;default:s="grassland";break}return s}else if(r==="trait"){let s=[],n=i.cap||2;for(let c=0;c0,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 d=e.city.power;c&&(d+=e.race.replicator.pow),n=r.powered()<=d}let l=r.hasOwnProperty("s_type")&&r.hasOwnProperty("support")&&r.support()<0,o=!l;if(l){let d=Xr(),h=d[r.s_type].r,_=d[r.s_type].rs;o=e[h][_].support-r.support()<=e[h][_].s_max}return n&&o||e.settings.alwaysPower?(e[i[0]][i[1]].on++,s&&(e.city.power-=r.powered(),c&&_a.replicate.task()),a&&typeof a=="function"?a(r):!0):!1}function kc(r){let a="";if(Object.keys(r).length>0){let i="",s="",n=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;e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=0&&n++;for(let c in r)if(c!==0){if(r[c]>0){let l=`${t(`resource_${c}_name`)}`;n>0?(l+=`: +${Math.round((r[c]+1)*100-100)}% `,n--):l+=`: ${t("bonus")} `,l+="
",i=i+l}else if(r[c]<0){let l=`${t(`resource_${c}_name`)}`;n>0?(l+=`: ${Math.round((r[c]+1)*100-100)}% `,n--):l+=`: ${t("malus")} `,l+="
",s=s+l}}a=`${i}${s}
`}return a}function Ru(r,a){let i=typeof r.desc=="string"?r.desc:r.desc();if(i=i+". ",r.cost&&!a){Tt(r)?i=i+t("affordable")+". ":i=i+t("not_affordable")+". ",i=i+"Costs: ";let n=r.id.split("-")[0];var s=n!=="genes"&&n!=="blood"?jr(r):r.cost;Object.keys(s).forEach(function(c){if(c==="Custom"){let l=s[c]();i=i+l.label}else if(c==="Structs"){let l=s[c]();Object.keys(l).forEach(function(o){Object.keys(l[o]).forEach(function(d){let h="";if(l[o][d].hasOwnProperty("s")){let _=l[o][d].s;h=typeof O[o][_][d].title=="string"?O[o][_][d].title:O[o][_][d].title()}else h=typeof O[o][d].title=="string"?O[o][d].title:O[o][d].title();i=i+`${h}. `,e[o][d]?l[o][d].count>e[o][d].count?i=i+`${t("insufficient")} ${h}. `:l[o][d].hasOwnProperty("on")&&l[o][d].on>e[o][d].on&&(i=i+`${t("insufficient")} ${h} enabled. `):i=i+`${t("insufficient")} ${h}. `})})}else if(e.prestige.hasOwnProperty(c)){let l=s[c]();if(l>0){c==="Plasmid"&&e.race.universe==="antimatter"&&(c="AntiPlasmid");let o=t(`resource_${c}_name`);i=i+`${o}: ${l}. `,e.prestige[c].count0){let o=t(`resource_${c}_name`);i=i+`${o}: ${l}. `,e.portal.purifier.supply0){let d=o==="Money"?"$":e.resource[o].name+": ";d=d.replace("_"," ");let h=Ee(l,1);i=i+`${d}${h}. `,e.resource[o].amount${a.hasOwnProperty("touchlabel")?a.touchlabel:t("construct")}`),r.append(d),$("#touchButton").on("touchstart",function(){fl(a,n,c)})),r.append($(`${o}
`));let h=a.id.split("-")[0];a.category&&h==="tech"&&!s&&r.append($(`${t("tech_dist_category")}: ${t(`tech_dist_${a.category}`)}
`));let _=fa(a,!1,!0);if(a.cost&&!s){let x=!0;var m=$('
'),w=h!=="genes"&&h!=="blood"?jr(a):a.cost;Object.keys(w).forEach(function(j){if(j==="Custom"){let B=w[j]();m.append($(`${B.label}
`)),x=!1}else if(j==="Structs"){let B=w[j]();Object.keys(B).forEach(function(S){Object.keys(B[S]).forEach(function(Q){let V=B[S][Q].hasOwnProperty("on")?B[S][Q].on:B[S][Q].count,ce="has-text-dark",Y="";e[S][Q]?B[S][Q].count>e[S][Q].count?(ce="has-text-danger",Y=' (blocking resource) '):B[S][Q].hasOwnProperty("on")&&B[S][Q].on>e[S][Q].on&&(ce="has-text-alert"):(ce="has-text-danger",Y=' (blocking resource) ');let Ge="";if(B[S][Q].hasOwnProperty("s")){let Ce=B[S][Q].s;Ge=typeof O[S][Ce][Q].title=="string"?O[S][Ce][Q].title:O[S][Ce][Q].title()}else Ge=typeof O[S][Q].title=="string"?O[S][Q].title:O[S][Q].title();x=!1,m.append($(`${Ge}: ${V}${Y}
`))})})}else if(e.prestige.hasOwnProperty(j)){let B=w[j]();if(B>0){j==="Plasmid"&&e.race.universe==="antimatter"&&(j="AntiPlasmid");let S=t(`resource_${j}_name`),Q="has-text-dark",V="";e.prestige[j].count(blocking resource)'),x=!1,m.append($(` ${S}: ${B}${V}
`))}}else if(j==="Supply"){let B=w[j]();if(B>0){let S=t(`resource_${j}_name`),Q="has-text-dark",V="";e.portal.purifier.supply(blocking resource)'),x=!1,m.append($(` ${S}: ${B}${V}
`))}}else if(j!=="Morale"&&j!=="Army"&&j!=="Bool"){let B=w[j]();if(B>0){let S="",Q=j==="Species"?e.race.species:j;if(j==="HellArmy"){let V=t("fortress_troops"),ce="has-text-dark";e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size(blocking resource)'):ce="has-text-alert"),x=!1,m.append($(` ${V}: ${B}${S}
`))}else{let V=Q==="Money"?"$":e.resource[Q].name+": ";V=V.replace("_"," ");let ce="has-text-dark",Y="";e.resource[Q].amount(blocking resource)'):ce="has-text-alert",l&&l!==j&&_.r===Q?(ce+=" grad-from-left",Y=' (first blocking resource) '):l&&l===j&&_.r!==Q&&(ce+=" grad-from-left-warn")):l&&l===j&&(ce+=" grad-from-right",Y=' (last blocking resource) ');let Ge=Ee(B,1);x=!1,m.append($(` ${V}${Ge}${Y}
`))}}}}),x||r.append(m)}if(a.effect){var M=typeof a.effect=="string"?a.effect:a.effect();M&&r.append($(`${M}
`))}if(a.flair){var F=typeof a.flair=="string"?a.flair:a.flair();r.append($(`${F}
`)),r.addClass("flair")}if(a.reqs){let x=[];if(Object.keys(a.reqs).forEach(function(j){let B=$(`#${a.id}`).attr(`data-req-${j}`);B&&x.push(typeof O.tech[B].title=="string"?O.tech[B].title:O.tech[B].title())}),x.length>0){let j=x.join(", ");r.append($(`${t("requires_tech",[j])}
`))}}if(!s&&a.id.substring(0,5)!=="blood"&&!Tt(a)&&Tt(a,!0)){if(typeof i=="string"&&i==="notimer")return;if(i&&i.time)r.append($('{{ time | timer }}
')),D({el:"#popTimer",data:i,filters:{timer(x){return t("action_ready",[x])}}});else{let x=Ft(_.t);r.append($(`${t("action_ready",[x])}
`))}}(a.id==="portal-spire"||a.id==="portal-waygate"&&e.tech.waygate>=2)&&i&&i.time&&(r.append($('{{ time | timer }}
')),D({el:"#popTimer",data:i,filters:{timer(x){let j=!a.hasOwnProperty("mscan")||a.hasOwnProperty("mscan")&&a.mscan()>0?x:"???";return t("floor_clearing",[j])}}}))}function Ra(r){le($(`#${r}`),!0),Ie(r)}function Ci(r,a,i){var s=r.id;e[a]&&e[a][i]&&e[a][i].count&&($(`#${s} .count`).html(e[a][i].count),e[a][i]&&e[a][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&&Pi($("#popper"),r,e[a][i],!1,a,i)}function u(r,a){return a=a||jr(r),Ks(a)?(Object.keys(a).forEach(function(i){if(e.prestige.hasOwnProperty(i)){let s=a[i]();i==="Plasmid"&&e.race.universe==="antimatter"&&(i="AntiPlasmid"),e.prestige[i].count-=s}else if(i==="Supply"){let s=a[i]();e.portal.purifier.supply-=s}else if(i!=="Morale"&&i!=="Army"&&i!=="HellArmy"&&i!=="Structs"&&i!=="Bool"&&i!=="Custom"){let s=a[i](),n=i==="Species"?e.race.species:i;e.resource[n].amount-=s,n==="Knowledge"&&(e.stats.know+=s)}}),!0):!1}function Tt(r,a,i){if(r.cost){let s=i?r.cost:jr(r);return a?Hu(s):Ks(s)}return!0}function Hu(r){var a=!0;return Object.keys(r).forEach(function(i){if(i!=="Custom")if(i==="Structs"){if(!ml(r[i]())){a=!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){a=!1;return}}}),a}function Ks(r){var a=!0;return Object.keys(r).forEach(function(i){if(i==="Custom"){if(!r[i]().met){a=!1;return}}else if(i==="Structs"){if(!ml(r[i]())){a=!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){a=!1;return}}}),a}function ml(r){let a=!0;return Object.keys(r).forEach(function(i){if(e.hasOwnProperty(i))Object.keys(r[i]).forEach(function(s){if(e[i].hasOwnProperty(s)){if(e[i][s].count=7&&(r*=.92**e.tech.nexus),r}function pt(r){let a=ge("dirty_jobs",0);return a&&(r-=a),r}function Wu(){let r=$('
');$("#evolution").append(r),r.append($(`
${t("evo_challenge_genes")} `)),r.append($(`${t("evo_challenge_genes_desc")}
`)),e.genes.challenge&&e.genes.challenge>=2&&r.append($(`${t("evo_challenge_genes_mastery")}
`))}function Qu(){let r=$('
');$("#evolution").append(r),r.append($(`
${t("evo_challenge_run")} `)),r.append($(`${t("evo_challenge_run_desc")}
`))}function Vu(){let r=$('
');$("#evolution").append(r),r.append($(`
${t("evo_scenario")} `)),r.append($(`${t("evo_scenario_desc")}
`))}function Zu(){let r=$('
');$("#evolution").append(r),r.append($(`
${t("evo_challenge_simulation")} `)),r.append($(`${t("evo_challenge_simulation_desc")}
`)),r.append($(`${t("evo_challenge_end_sim")} `)),D({el:"#simSection",data:{},methods:{exitsim(){a0()}}})}function Ju(){let r=$('
');$("#evolution").append(r),r.append($(`
${t("evo_challenge_simulation")} `)),r.append($(`${t("evo_challenge_simulation_desc")}
`));let a=$($('
'));r.append(a),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,a.append($(`${t(`resource_${i}_name`)}
`))}),D({el:"#simSection",data:e.race.simConfig})}function yc(r,a){let i=typeof r.title=="string"?r.title:r.title();$("#modalBox").append($(`${i}
`));var s=$('
');switch($("#modalBox").append(s),a){case"smelter":case"hell_smelter":case"stellar_forge":case"hell_forge":case"geothermal":case"ore_refinery":Xt("smelter",s);break;case"factory":case"red_factory":case"int_factory":case"tau_factory":Xt("factory",s);break;case"star_dock":Yu(s);break;case"mining_droid":Xt("droid",s);break;case"g_factory":case"refueling_station":Xt("graphene",s);break;case"freighter":case"super_freighter":hc(s);break;case"pylon":Xt("pylon",s);break;case"rock_quarry":Xt("rock_quarry",s);break;case"titan_mine":Xt("titan_mine",s);break;case"mining_ship":Xt("mining_ship",s);break;case"alien_space_station":Xt("alien_space_station",s);break;case"nanite_factory":Xt("nanite_factory",s);break;case"alien_outpost":Xt("replicator",s);break}}function Yu(r){if(e.tech.genesis<4){let s=$(`${t("stardock_warn")}
`);r.append(s);return}let a=$('
');r.append(a);let i=O.starDock.probes;if(Br(i,"starDock","probes"),e.tech.geck&&e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=5){let s=O.starDock.geck;Br(s,"starDock","geck")}if(e.tech.genesis>=5){let s=O.starDock.seeder;Br(s,"starDock","seeder")}if(e.tech.genesis===6){let s=O.starDock.prep_ship;Br(s,"starDock","prep_ship")}if(e.tech.genesis>=7){let s=O.starDock.launch_ship;Br(s,"starDock","launch_ship")}}function gl(){if(e.race.orbit_decay&&e.stats.hasOwnProperty("days")&&e.stats.days>=e.race.orbit_decay&&!e.race.orbit_decayed){e.race.orbit_decayed=!0,I(t("evo_challenge_orbit_decayed_msg",[A[e.race.species].home]),"info",!1,["progress"]),e.race.universe==="magic"&&(e.city.pylon&&(e.space.pylon={count:Math.ceil(e.city.pylon.count/2)}),e.race.casting&&Object.keys(e.race.casting).forEach(function(r){e.race.casting[r]=0})),Object.keys(O.city).forEach(function(r){e.city.hasOwnProperty(r)&&e.city[r].hasOwnProperty("count")&&(e.race.hooved&&O.city[r].cost.hasOwnProperty("Horseshoe")&&(e.race.shoecnt-=O.city[r].cost.Horseshoe()*e.city[r].count),e.city[r].count=0,e.city[r].hasOwnProperty("on")&&(e.city[r].on=0))}),e.race.hooved&&e.race.shoecnt<5&&(e.race.shoecnt=5),e.resource.Zen.display&&(e.resource.Zen.display=!1),e.resource.Slave.display&&(e.resource.Slave.display=!1,e.resource.Slave.amount=0,qr("slave")),e.race.deconstructor&&va.forEach(function(r){e.city.nanite_factory[r]=0}),Object.keys(e.resource).forEach(function(r){e.resource[r].hasOwnProperty("trade")&&(e.resource[r].trade=0)}),e.space.red_university={count:0},Object.keys(O.space.spc_moon).forEach(function(r){e.space.hasOwnProperty(r)&&e.space[r].hasOwnProperty("count")&&(e.space[r].count=0,e.space[r].hasOwnProperty("on")&&(e.space[r].on=0))}),Object.keys(si).forEach(function(r){r!=="colonist"&&(e.civic[r].workers=0,e.civic[r].assigned=0)}),["bolognium_ship","scout_ship","corvette_ship","frigate_ship","cruiser_ship","dreadnought","freighter","super_freighter","armed_miner","scavenger"].forEach(function(r){e.galaxy[r]&&(e.galaxy[r].on=0)}),e.portal.transport&&(e.portal.transport.on=0),["forager","farmer","lumberjack","quarry_worker"].forEach(function(r){e.civic[r].display=!1}),e.civic.hunter.display?e.civic.d_job="hunter":e.civic.d_job="unemployed";for(let r of Object.values(e.race.purgatory.city))r.hasOwnProperty("count")&&(r.count=0),r.hasOwnProperty("on")&&(r.on=0);if(e.queue.hasOwnProperty("queue"))for(let r=e.queue.queue.length-1;r>=0;r--){let a=e.queue.queue[r];(a.action==="city"||a.action==="space"&&O.space.spc_moon[a.type])&&e.queue.queue.splice(r,1)}e.arpa.sequence&&(e.arpa.sequence.on=!1,e.arpa.sequence.boost=!1),e.city.calendar.moon=0,document.getElementById("moon").removeAttribute("class"),$("#moon").addClass("moon wi wi-moon-new"),e.settings.spaceTabs=1,e.settings.space.moon=!1,e.settings.showCity=!1,le($("#infoTimer")),Pt()}}function vl(){le($("#evolution .evolving"),!0);let r=$(``);$("#evolution").append(r)}function dr(){return e.race.universe==="magic"?t("city_wizard_tower_title"):e.race.evil?t("city_babel_title"):t("city_wardenclyffe")}function yl(){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(A[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 Xu(){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(A[e.race.species].type){case"avian":return t("city_cottage_title6");case"eldritch":return t("city_cottage_title8")}return t("city_cottage_title1")}function e0(r){if(!r&&ge("extravagant",0))return t("city_mansion");switch(e.race.species){case"sporgar":return t("city_apartment_title2")}switch(A[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 St(r,a){switch(r){case"small":return yl();case"medium":return Xu();case"large":return e0(a)}}function Qr(r,a){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(O[n.action]).forEach(function(l){O[n.action][l][n.type]&&c&&(e.queue.queue[s].label=typeof O[n.action][l][n.type].title=="string"?O[n.action][l][n.type].title:O[n.action][l][n.type].title(),c=!1)})}else O[n.action][n.type]&&(e.queue.queue[s].label=typeof O[n.action][n.type].title=="string"?O[n.action][n.type].title:O[n.action][n.type].title())}}if(r&&e.tech.r_queue&&e.r_queue.display)for(let i=0;i1)return e.race.evoFinalMenu=r,Gr(),!0;e.race.species=r,Cs()}function Cs(){e.race.simulation&&r0(),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")&&wl(),e.race.species!=="junker"&&delete e.race.junker,e.race.species!=="sludge"&&delete e.race.sludge;for(var r=["rna","dna","membrane","organelles","nucleus","eukaryotic_cell","mitochondria"],a=0;a=4&&_t(h)}),Object.keys(A[e.race.species].traits).forEach(function(h){_t(h,{set:A[e.race.species].traits[h]})}),e.race.imitation&&e.race.srace&&fn(!1),Object.keys(e.tech).forEach(function(h){h.substring(0,4)==="evo_"&&delete e.tech[h]}),delete e.tech.evo,e.evolution={};let i=new Date;!e.settings.boring&&i.getMonth()===11&&i.getDate()>=17&&(e.race.species==="elven"?(_t("slaver",{set:2}),_t("resourceful",{set:.5}),_t("small",{set:.25})):e.race.species==="capybara"?(_t("beast_of_burden",{set:1}),_t("pack_rat",{set:.5}),_t("musical",{set:.25})):e.race.species==="centaur"?(_t("beast_of_burden",{set:1}),_t("curious",{set:.5}),_t("blissful",{set:.25})):e.race.species==="wendigo"?(_t("immoral",{set:3}),_t("cannibalize",{set:.5}),_t("claws",{set:.25})):e.race.species==="yeti"?(_t("scavenger",{set:3}),_t("regenerative",{set:.5}),_t("musical",{set:.25})):e.race.species==="entish"&&(_t("photosynth",{set:3}),_t("optimistic",{set:.5}),_t("armored",{set:.25})));let s=Ve("easter");if(e.race.species==="wolven"&&s.active?(_t("hyper",{set:1}),_t("fast_growth",{set:1}),_t("rainbow",{set:1}),_t("optimistic",{set:1})):e.race.species==="vulpine"&&s.active&&(_t("cannibalize",{set:2}),_t("rage",{set:1}),_t("blood_thirst",{set:1}),_t("sticky",{set:1})),e.race.no_crispr||e.race.badgenes){let h=e.race.badgenes?3:1;for(let _=0;_=2)for(let h=1;h<8;h++)e.genes.evolve>=h+1&&Fi(h);let l=ga();e.civic.foreign.gov0.name={s0:l.s0,s1:l.s1};let o=ga();for(;l.s0===o.s0&&l.s1===o.s1;)o=ga();e.civic.foreign.gov1.name={s0:o.s0,s1:o.s1};let d=ga();for(;l.s0===d.s0&&l.s1===d.s1||o.s0===d.s0&&o.s1===d.s1;)d=ga();if(e.civic.foreign.gov2.name={s0:d.s0,s1:d.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(J(20,40)),mil:Math.floor(J(650,750)),eco:Math.floor(J(250,300)),spy:0,esp:0,trn:0,sab:0,act:"none"};let h=ga(!0);e.civic.foreign.gov3.name={s0:h.s0,s1:h.s1},e.civic.foreign.gov4={unrest:0,hstl:100,mil:300,eco:100,spy:0,esp:0,trn:0,sab:0,act:"none"};let _=ga(!0);for(;_.s1===h.s1;)_=ga(!0);e.civic.foreign.gov4.name={s0:99,s1:_.s1}}if(e.race.cataclysm?I(t("cataclysm_sentience",[A[e.race.species].home,tt("name")]),"info",!1,["progress"]):I(t("sentience",[t("genelab_genus_"+A[e.race.species].type),A[e.race.species].entity,tt("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 h=1;for(let _=1;_=5&&h++;e.resource.Soul_Gem.amount=h}if(e.race.species==="tortoisan"){let h=Math.floor(J(100));h===99?e.race.shell_color="rainbow":h>=97&&h<=98?e.race.shell_color="white":h>=93&&h<=96?e.race.shell_color="red":h>=89&&h<=92?e.race.shell_color="orange":h>=85&&h<=88?e.race.shell_color="yellow":h>=75&&h<=84?e.race.shell_color="purple":h>=65&&h<=74?e.race.shell_color="blue":e.race.shell_color="green"}if(e.race.species==="vulpine"){let h=Math.floor(J(100));h>=85?e.race.fox_color="white":h>=70&&h<=84?e.race.fox_color="tan":h>=55&&h<=69?e.race.fox_color="silver":h>=35&&h<=54?e.race.fox_color="grey":e.race.fox_color="red"}if(ea(!0),e.blood.aware&&(e.settings.arpa.blood=!0,e.tech.b_stone=2),$i(!0),us(),Ii(!0),e.race.shapeshifter&&oa(!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),Nt(!0),(e.race.truepath||e.race.lone_survivor)&&Object.keys(ta).forEach(function(h){e.resource.hasOwnProperty(h)&&(e.resource[h].value=ta[h]*2)}),me(e.race.species,!0),wt("sentience",{species:e.race.species,challenge:Jt()-1}),e.stats.feat.adept){let h=ts();e.resource.Food.amount+=h*100,e.resource.Stone.max+=h*60,e.resource.Stone.amount+=h*100,e.race.smoldering?(e.resource.Chrysotile.max+=h*60,e.resource.Chrysotile.amount+=h*100):(e.resource.Lumber.max+=h*60,e.resource.Lumber.amount+=h*100)}e.race.fasting&&(e.resource.Food.amount=0),e.race.cataclysm?s0():e.race.lone_survivor?Fo():e.race.artifical&&i0(),e.settings.tabLoad?(Et(),ls(),ia($("#c_garrison"),!1),ps(),e.race.cataclysm||e.race.lone_survivor?(le($("#r_civics")),Ii(),rt(),Aa("market"),Aa("storage"),Je.hasOwnProperty("resource")&&Object.keys(Je.resource).forEach(function(h){let _=Je.resource[h].color,m=Je.resource[h].tradable;if(Je.resource[h].stackable){var M=$(`
`);$("#resStorage").append(M),ws(`#stack-${h}`,M,h,_,!0)}if(m){var M=$(`
`);$("#market").append(M),bs(`#market-${h}`,M,h,_,!0)}}),Ui(),Ue("Genetics"),Ue("Crispr"),Ue("Blood")):e.sim&&(Ue("Crispr"),Ue("Blood"))):gr("mTabCivil"),e.queue.hasOwnProperty("queue")&&(e.queue.queue=[]),(e.race.slow||e.race.hyper||e.race.species==="junker")&&(Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w&&Pe.w.terminate(),window.location.reload())}function r0(){e.race.simulation&&(e.hasOwnProperty("sim")||(e.sim={stats:Ke(e.stats),prestige:Ke(e.prestige),genes:Ke(e.genes),blood:Ke(e.blood),pillars:Ke(e.pillars),race:Ke(e.race)},e.stats={start:Date.now(),days:0,tdays:0},qn(),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(r){e.prestige[r]={count:Number(e.race.simConfig[r])}})))}function a0(){e.hasOwnProperty("sim")&&(e.stats=Ke(e.sim.stats),e.prestige=Ke(e.sim.prestige),e.genes=Ke(e.sim.genes),e.blood=Ke(e.sim.blood),e.pillars=Ke(e.sim.pillars),e.race=Ke(e.sim.race),delete e.sim,e.race.species="protoplasm",delete e.race.simulation,Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w&&Pe.w.terminate(),window.location.reload())}function i0(){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},Et(),ue(),Lt())}function s0(){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=N(1),e.civic.cement_worker.workers=N(1)),e.civic.colonist.max=N(4),e.civic.colonist.workers=N(4),e.civic.space_miner.max=N(3),e.civic.space_miner.workers=N(2),e.civic.professor.max=N(1),e.civic.professor.workers=N(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},Et(),ue(),Pt(),Ue("Physics"),Lt())}function on(r){switch(A[r].fanaticism){case"smart":e.race.dumb?(Fi(5),Ue("Genetics")):pn("smart");break;case"infectious":pn("infectious"),e.race.species==="human"&&ie("infested");break;case"blood_thirst":pn("blood_thirst"),e.race.species==="entish"&&ie("madagascar_tree");break;case"none":Fi(5),Ue("Genetics");break;default:pn(A[r].fanaticism);break}}function pn(r){e.race[r]?_t(r)?r==="imitation"?fn(!0):r==="shapeshifter"&&oa(e.race.ss_genus):(Fi(5),Ue("Genetics")):(e.race[r]=1,Ni(r))}function ki(){if(!e.settings.tabLoad&&e.settings.civTabs!==3)return;tc(),le($("#resQueue")),$("#resQueue").append($(`
${t("research_queue")} ({{ queue.length }}/{{ max }})
- `));let r=$('');$("#resQueue").append(r),r.append($(`{{ item.label }} [{{ item.time | time }} ] `));try{D({el:"#resQueue",data:e.r_queue,methods:{remove(a){Ie(`rq${e.r_queue.queue[a].id}`),e.r_queue.queue.splice(a,1),ki(),ue()},setID(a){return`rq${e.r_queue.queue[a].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(a){return At(a)}}}),n0()}catch{e.r_queue.queue=[]}}function tc(){let r=$("#resQueue .buildList")[0];if(r){let a=Sortable.get(r);a&&a.destroy()}}function n0(){let r=$("#resQueue .buildList")[0];Sortable.create(r,{onEnd(a){let i=e.r_queue.queue;i.splice(a.newDraggableIndex,0,i.splice(a.oldDraggableIndex,1)[0]),e.r_queue.queue=i,ki()}}),c0()}function c0(){for(let r=0;r=5?r-.01:r}function Fr(){let r=1800;e.tech.vault>=1?r=(e.tech.vault+1)*7500:e.tech.banking>=5?r=9e3:e.tech.banking>=3&&(r=4e3),e.race.paranoid&&(r*=1-b.paranoid.vars()[0]/100),e.race.hoarder&&(r*=1+b.hoarder.vars()[0]/100);let a=ve("dracnid");a>0&&(r*=1+b.hoarder.vars(1)[0]/100*a),e.tech.banking>=7&&(r*=1+xe(ye(e.civic.banker.workers,"banker")*.05)),e.tech.banking>=8&&(r+=xe(25*e.resource[e.race.species].amount)),e.tech.stock_exchange&&(r*=1+e.tech.stock_exchange*.1),e.tech.world_control&&(r*=1.25),e.race.truepath&&(r*=1.25),e.blood.greed&&(r*=1+e.blood.greed/100),e.stats.achieve.wheelbarrow&&(r*=1+e.stats.achieve.wheelbarrow.l/50),e.race.inflation&&(r*=1+e.race.inflation/125);let i=ge("risktaker",0);return i&&(r*=1+i/100),r}function bl(){e.race.start_cataclysm&&(delete e.race.start_cataclysm,Cs())}function Xt(r,a,i){switch(r){case"smelter":o0(a,i);break;case"factory":l0(a,i);break;case"droid":d0(a,i);break;case"graphene":p0(a,i);break;case"pylon":_0(a,i);break;case"rock_quarry":h0(a,i);break;case"titan_mine":f0(a,i);break;case"nanite_factory":u0(a,i);break;case"mining_ship":m0(a,i);break;case"alien_space_station":g0(a,i);break;case"replicator":v0(a,i);break}}function rt(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==1))){if(le($("#industry")),e.city.smelter&&(e.city.smelter.count>0||e.race.cataclysm||e.race.orbit_decayed||e.tech.isolation)){var r=$(`
`);$("#industry").append(r),Xt("smelter",r,"#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 a=$(`
`);$("#industry").append(a),Xt("factory",a,"#iFactory")}if(e.interstellar.mining_droid&&e.interstellar.mining_droid.count>0){var i=$(`
`);$("#industry").append(i),Xt("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=$(`
`);$("#industry").append(s),Xt("graphene",s,"#iGraphene")}if(e.race.casting&&(e.city.pylon||e.space.pylon||e.tauceti.pylon)){var n=$(`
`);$("#industry").append(n),Xt("pylon",n,"#iPylon")}if(e.race.smoldering&&e.city.rock_quarry&&!e.race.cataclysm&&!e.race.orbit_decayed&&!e.tech.isolation){var c=$(`
`);$("#industry").append(c),Xt("rock_quarry",c,"#iQuarry")}if(e.space.titan_mine&&e.space.titan_mine.count>0){var c=$(`
`);$("#industry").append(c),Xt("titan_mine",c,"#iTMine")}if(e.tech.tau_roid&&e.tech.tau_roid>=4&&e.tauceti.mining_ship){var l=$(`
`);$("#industry").append(l),Xt("mining_ship",l,"#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 o=$(`
`);$("#industry").append(o),Xt("alien_space_station",o,"#iAlienSpaceStation")}if(e.race.deconstructor&&e.city.nanite_factory){var d=$(`
`);$("#industry").append(d),Xt("nanite_factory",d,"#iNFactory")}if(e.race.replicator&&e.tech.replicator){var h=$(`
`);$("#industry").append(h),Xt("replicator",h,"#iReplicator")}}}var Be={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 o0(r,a){let i=$(`${t("modal_smelter_fuel")}: {{s.count | on}}/{{ s.cap }}
`);if(r.append(i),r.hasClass("modalBody")){let _=jt(10);_.length>0&&i.prepend(_)}if(a&&e.race.forge&&e.race.steelen){let _=ar(3,12,!0);_.length>0&&i.prepend(_)}let s=r.hasClass("modalBody")?"mSmelterFuels":"smelterFuels",n=$(`
`);if(r.append(n),!e.race.forge){if(!e.race.kindling_kindred&&!e.race.smoldering||e.race.evil){let _=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,m=$(`${_} {{ s.Wood }} `),w=$(`« `),M=$(`» `);n.append(w),n.append(m),n.append(M)}if(e.resource.Coal.display){let _=$(`${e.resource.Coal.name} `),m=$(`« `),w=$(`» `);n.append(m),n.append(_),n.append(w)}}if(e.race.forge){let _=$(`${t("trait_forge_name")} {{ s.Oil }} `);n.append(_)}else if(e.resource.Oil.display){let _=$(`${e.resource.Oil.name} {{ s.Oil }} `),m=$(`« `),w=$(`» `);n.append(m),n.append(_),n.append(w)}if(e.tech.star_forge&&e.tech.star_forge>=2){let _=$(`${t("star")} {{ s.Star }} `);n.append(_)}if(e.tech.smelting&&e.tech.smelting>=8){let _=$(`${t("modal_smelter_inferno")} {{ s.Inferno }} `),m=$(`« `),w=$(`» `);n.append(m),n.append(_),n.append(w)}let c=$('
');r.append(c);let l=!!(e.tech.irid_smelting||e.tech.m_smelting&&e.tech.m_smelting>=2);if(e.resource.Iridium.display&&l||e.resource.Steel.display&&e.tech.smelting>=2&&!e.race.steelen){let _=$(`
`);r.append(_),_.append(`${t("modal_smelter_type")}: {{s.count | son}}/{{ s.cap | on }}
`);let m=$('
');_.append(m);let w=$(`${e.resource.Iron.name} {{ s.Iron }} `),M=$(`« `),A=$(`» `);if(m.append(M),m.append(w),m.append(A),e.resource.Steel.display&&e.tech.smelting>=2&&!e.race.steelen){let x=$(`${e.resource.Steel.name} {{ s.Steel }} `),j=$(`« `),B=$(`» `);m.append(j),m.append(x),m.append(B)}if(e.resource.Iridium.display&&l){let x=$(`${e.resource.Iridium.name} {{ s.Iridium }} `),j=$(`« `),B=$(`» `);m.append(j),m.append(x),m.append(B)}}D({el:a||"#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(_){let m=fe();for(let w=0;w=e.city.smelter.StarCap)break;if(M0)_!=="Wood"&&e.city.smelter.Wood>0?(e.city.smelter.Wood--,e.city.smelter[_]++):_!=="Coal"&&e.city.smelter.Coal>0?(e.city.smelter.Coal--,e.city.smelter[_]++):_!=="Oil"&&e.city.smelter.Oil>0?(e.city.smelter.Oil--,e.city.smelter[_]++):_!=="Inferno"&&e.city.smelter.Inferno>0&&(e.city.smelter.Inferno--,e.city.smelter[_]++);else break}},subFuel(_){let m=fe();for(let w=0;w0;w++){e.city.smelter[_]--,e.race.forge&&_==="Inferno"&&e.city.smelter.Oil++;let M=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>M&&(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(_){return d(_)},addMetal(_){let m=fe();for(let w=0;w0&&_!=="Iron")e.city.smelter.Iron--,e.city.smelter[_]++;else if(e.city.smelter.Steel>0&&_!=="Steel")e.city.smelter.Steel--,e.city.smelter[_]++;else if(e.city.smelter.Iridium>0&&_!=="Iridium")e.city.smelter.Iridium--,e.city.smelter[_]++;else break}},subMetal(_){let m=fe();e.city.smelter[_]-=m,e.city.smelter[_]<0&&(e.city.smelter[_]=0)},buildLabel(_){return o(_)},ariaCount(_){return` ${e.city.smelter[_]} ${_} fueled.`},ariaProd(_){return`. ${e.city.smelter[_]} producing ${_}.`},net(_){return e.resource[_].diff>=0?"has-text-success":"has-text-danger"},level(){let _=e.city.smelter.Wood+e.city.smelter.Coal+e.city.smelter.Oil+e.city.smelter.Star+e.city.smelter.Inferno;return rs(_,e.city.smelter.count)}},filters:{on(_){return e.city.smelter.Wood+e.city.smelter.Coal+e.city.smelter.Oil+e.city.smelter.Star+e.city.smelter.Inferno},son(_){return e.city.smelter.Iron+e.city.smelter.Steel+e.city.smelter.Iridium},diffSize(_){return _>0?`+${Ee(_,2)}`:Ee(_,2)},spook(_){if(a&&((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 m=ar(3,12,!0);if(m.length>0)return m}return _},altspook(_){if(a&&e.race.forge&&e.city.smelter.Steel===6){let m=ar(3,12,!0);if(m.length>0)return m}return _}}});function o(_){switch(_){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 m=e.race.kindling_kindred?.15:.25;return e.tech.uranium&&e.tech.uranium>=3?t("modal_build_coal2",[m,t("resource_Coal_name"),t("resource_Uranium_name")]):t("modal_build_coal1",[m,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 m=50,w=35,M=.5;return t("modal_build_inferno",[m,t("resource_Coal_name"),w,t("resource_Oil_name"),M,t("resource_Infernite_name")])}}}function d(_){if(_==="steel"){let m=e.tech.smelting>=4?1.2:1;return e.tech.smelting>=5&&(m*=1.2),e.tech.smelting>=6&&(m*=1.2),e.tech.smelting>=7&&(m*=1.25),e.race.pyrophobia&&(m*=.9),t("modal_smelter_steel",[+m.toFixed(3),t("resource_Steel_name"),t("resource_Coal_name"),t("resource_Iron_name")])}else if(_==="iridium"){let m=e.tech.smelting>=7?6.25:5;return e.race.pyrophobia&&(m*=.9),t("modal_smelter_iron",[+m.toFixed(3),t("resource_Iridium_name")])}else{let m=e.tech.smelting>=3?e.tech.smelting>=7?15:12:10;return e.race.pyrophobia&&(m*=.9),t("modal_smelter_iron",[+m.toFixed(3),t("resource_Iron_name")])}}let h=r.hasClass("modalBody")?"mSmelterFuels":"smelterFuels";if(["wood","coal","oil","star","inferno"].forEach(function(_){pe(`${h}${_}`,function(){return o(_)},{elm:$(`#${h} > .${_}`),attach:"#main"})}),e.resource.Steel.display&&e.tech.smelting>=2&&!e.race.steelen||e.resource.Iridium.display&&l){let _=r.hasClass("modalBody")?"mSmelterMats":"smelterMats";["iron","steel","iridium"].forEach(function(m){m==="steel"&&(!e.resource.Steel.display||e.race.steelen)||m==="iridium"&&!(e.resource.Iridium.display&&l)||pe(`${_}${m}`,function(){return d(m)},{elm:$(`#${_} span.${m}`),attach:"#main"})})}}function l0(r,a){let i=$(`${t("modal_factory_operate")}: {{count | on}}/{{ on | max }}
`);r.append(i);let s=$(`${t("modal_factory_lux")}
`);r.append(s);let n=$(' '),c=$(`« `),l=$(`» `);if(s.append(c),s.append(n),s.append(l),e.tech.synthetic_fur){let w=$(`${e.race.evil?t("resource_Flesh_name"):t("resource_Furs_name")}
`);r.append(w);let M=$('{{ Furs }} '),A=$(`« `),x=$(`» `);w.append(A),w.append(M),w.append(x)}let o=$(`${t("resource_Alloy_name")}
`);r.append(o);let d=$('{{ Alloy }} '),h=$(`« `),_=$(`» `);if(o.append(h),o.append(d),o.append(_),e.tech.polymer){let w=$(`${t("resource_Polymer_name")}
`);r.append(w);let M=$('{{ Polymer }} '),A=$(`« `),x=$(`» `);w.append(A),w.append(M),w.append(x)}if(e.tech.nano){let w=$(`${t("resource_Nano_Tube_name")}
`);r.append(w);let M=$('{{ Nano }} '),A=$(`« `),x=$(`» `);w.append(A),w.append(M),w.append(x)}if(e.tech.stanene){let w=$(`${t("resource_Stanene_name")}
`);r.append(w);let M=$('{{ Stanene }} '),A=$(`« `),x=$(`» `);w.append(A),w.append(M),w.append(x)}D({el:a||"#specialModal",data:e.city.factory,methods:{subItem:function(w){let M=fe();for(var A=0;A0;A++)e.city.factory[w]--},addItem:function(w){let M=e.space.red_factory?e.space.red_factory.on+e.city.factory.on:e.city.factory.on;e.interstellar.int_factory&&k.int_factory&&(M+=k.int_factory*2),e.tauceti.tau_factory&&U.tau_factory&&(M+=U.tau_factory*(e.tech.isolation?5:3));let A=fe();for(var x=0;x0)e.city.factory.Alloy--,e.city.factory[w]++;else break}},buildLabel:function(w){return m(w)},ariaProd(w){return`. ${e.city.factory[w]} factories producing ${w}.`},level(){let w=e.city.factory.Lux+e.city.factory.Furs+e.city.factory.Alloy+e.city.factory.Polymer+e.city.factory.Nano+e.city.factory.Stanene,M=e.space.red_factory?e.space.red_factory.on+e.city.factory.on:e.city.factory.on;return e.interstellar.int_factory&&k.int_factory&&(M+=k.int_factory*2),e.tauceti.tau_factory&&U.tau_factory&&(M+=U.tau_factory*(e.tech.isolation?5:3)),rs(w,M)}},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 w=e.space.red_factory?e.space.red_factory.on+e.city.factory.on:e.city.factory.on;return e.interstellar.int_factory&&k.int_factory&&(w+=k.int_factory*2),e.tauceti.tau_factory&&U.tau_factory&&(w+=U.tau_factory*(e.tech.isolation?5:3)),w},spook(w){if(e.city.factory.Lux===3&&a){let M=ar(6,12,!0);if(M.length>0)return M}return w}}});function m(w){let M=!!e.tech.factory;switch(w){case"Lux":{let A=+(e.resource[e.race.species].amount*(M?Be.Lux.demand[e.tech.factory]:Be.Lux.demand[0]));A=Mc(A).toFixed(2);let x=M?Be.Lux.fur[e.tech.factory]:Be.Lux.fur[0];return t("modal_factory_lux_label",[x,e.resource.Furs.name,A])}case"Furs":{let A=M?Be.Furs.money[e.tech.factory]:Be.Furs.money[0],x=M?Be.Furs.polymer[e.tech.factory]:Be.Furs.polymer[0];return t("modal_factory_alloy_label",[A,t("resource_Money_name"),x,t("resource_Polymer_name"),e.race.evil?t("resource_Flesh_name"):t("resource_Furs_name")])}case"Alloy":{let A=M?Be.Alloy.copper[e.tech.factory]:Be.Alloy.copper[0],x=M?Be.Alloy.aluminium[e.tech.factory]:Be.Alloy.aluminium[0];return t("modal_factory_alloy_label",[A,t("resource_Copper_name"),x,t("resource_Aluminium_name"),t("resource_Alloy_name")])}case"Polymer":if(e.race.kindling_kindred||e.race.smoldering){let A=M?Be.Polymer.oil_kk[e.tech.factory]:Be.Polymer.oil_kk[0];return t("modal_factory_polymer_label2",[A,t("resource_Oil_name"),t("resource_Polymer_name")])}else{let A=M?Be.Polymer.oil[e.tech.factory]:Be.Polymer.oil[0],x=M?Be.Polymer.lumber[e.tech.factory]:Be.Polymer.lumber[0];return t("modal_factory_polymer_label1",[A,t("resource_Oil_name"),x,e.resource.Lumber.name,t("resource_Polymer_name")])}case"Nano":{let A=M?Be.Nano_Tube.coal[e.tech.factory]:Be.Nano_Tube.coal[0],x=M?Be.Nano_Tube.neutronium[e.tech.factory]:Be.Nano_Tube.neutronium[0];return t("modal_factory_nano_label",[A,t("resource_Coal_name"),x,t("resource_Neutronium_name"),t("resource_Nano_Tube_name")])}case"Stanene":{let A=M?Be.Stanene.aluminium[e.tech.factory]:Be.Stanene.aluminium[0],x=M?Be.Stanene.nano[e.tech.factory]:Be.Stanene.nano[0];return t("modal_factory_stanene_label",[A,t("resource_Aluminium_name"),x,t("resource_Nano_Tube_name"),t("resource_Stanene_name")])}}}["Lux","Furs","Alloy","Polymer","Nano","Stanene"].forEach(function(w){let M=r.hasClass("modalBody")?"specialModal":"iFactory";pe(`${M}${w}`,function(){return m(w)},{elm:$(`#${M} .factory > .${w}`),attach:"#main"})})}function Mc(r){e.race.toxic&&(r*=1+b.toxic.vars()[0]/100);let a=ve("shroomi");return a>0&&(r*=1+b.toxic.vars(1)[0]/100*a),e.civic.govern.type==="corpocracy"&&(r*=2.5),e.civic.govern.type==="socialist"&&(r*=.8),e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=2&&(r*=1.1),e.race.inflation&&(r*=1+e.race.inflation/1250),e.tech.isolation&&(r*=1+(U.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&&(r*=1+e.city.banquet.strength**.75/100),r*=T("psychic_cash"),r}var va=["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 u0(r,a){let i=$(`${t("modal_factory_operate")}: {{count | on}}/{{ count | max }}
`);r.append(i);let s=r.hasClass("modalBody")?"mNFactoryRes":"NFactoryRes",n=$(`
`);r.append(n),va.forEach(function(l){if(e.resource[l].display){let o=$(`${e.resource[l].name} {{ ${l} }} `),d=$(`« `),h=$(`» `);n.append(d),n.append(o),n.append(h)}}),D({el:a||"#specialModal",data:e.city.nanite_factory,methods:{subItem:function(l){let o=fe();e.city.nanite_factory[l]-=o,e.city.nanite_factory[l]<0&&(e.city.nanite_factory[l]=0)},addItem:function(l){let o=fe(),d=0;va.forEach(function(_){d+=e.city.nanite_factory[_]});let h=e.city.nanite_factory.count*50-d;o>h&&(o=h),o>0&&(e.city.nanite_factory[l]+=o)},eatLabel(l){return`Consume ${l} to produce ${e.resource.Nanite.name}`},level(){let l=0;va.forEach(function(d){l+=e.city.nanite_factory[d]});let o=e.city.nanite_factory.count;return rs(l,o)}},filters:{on(){let l=0;return va.forEach(function(o){l+=e.city.nanite_factory[o]}),l},max(){return e.city.nanite_factory.count*50}}});function c(l){let o=+(Mt[l]/100*(b.deconstructor.vars()[0]/100)).toFixed(4),d=+(e.city.nanite_factory[l]*o).toFixed(4);return t("modal_nfactory_resource_label",[1,e.resource[l].name,o,e.resource.Nanite.name,e.city.nanite_factory[l],d])}va.forEach(function(l){let o=r.hasClass("modalBody")?"specialModal":"iNFactory";pe(`${o}${l}`,function(){return c(l)},{elm:$(`#${o} > .fuels > .${l}`),attach:"#main"})})}function d0(r,a){let i=$(`${t("modal_factory_operate")}: {{count | on}}/{{ on | max }}
`);r.append(i);let s=$(`${t("resource_Adamantite_name")}
`);r.append(s);let n=$('{{ adam }} '),c=$(`« `),l=$(`» `);s.append(c),s.append(n),s.append(l);let o=$(`${t("resource_Uranium_name")}
`);r.append(o);let d=$('{{ uran }} '),h=$(`« `),_=$(`» `);o.append(h),o.append(d),o.append(_);let m=$(`${t("resource_Coal_name")}
`);r.append(m);let w=$('{{ coal }} '),M=$(`« `),A=$(`» `);m.append(M),m.append(w),m.append(A);let x=$(`${t("resource_Aluminium_name")}
`);r.append(x);let j=$('{{ alum }} '),B=$(`« `),S=$(`» `);x.append(B),x.append(j),x.append(S),D({el:a||"#specialModal",data:e.interstellar.mining_droid,methods:{subItem:function(V){let ce=fe();for(var Y=0;Y0;Y++)e.interstellar.mining_droid[V]--},addItem:function(V){let ce=fe();for(var Y=0;Y .${V}`),attach:"#main"})})}function p0(r,a){let i=e.race.truepath?"space":"interstellar",s=$(`${t("modal_smelter_fuel")}: {{count | on}}/{{ on | max }}
`);r.append(s);let n=$("
");if(r.append(n),!e.race.kindling_kindred&&!e.race.smoldering){let l=e.resource.Lumber.name,o=$(`${l} {{ Lumber }} `),d=$('« '),h=$('» ');n.append(d),n.append(o),n.append(h)}if(e.resource.Coal.display){let l=$(`${e.resource.Coal.name} {{ Coal }} `),o=$('« '),d=$('» ');n.append(o),n.append(l),n.append(d)}if(e.resource.Oil.display){let l=$(`${e.resource.Oil.name} {{ Oil }} `),o=$('« '),d=$('» ');n.append(o),n.append(l),n.append(d)}D({el:a||"#specialModal",data:e[i].g_factory,methods:{subWood(){let l=fe();for(let o=0;o0;o++)e[i].g_factory.Lumber--},addWood(){let l=fe();for(let o=0;o0)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 l=fe();for(let o=0;o0;o++)e[i].g_factory.Coal--},addCoal(){let l=fe();for(let o=0;o0)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 l=fe();for(let o=0;o0;o++)e[i].g_factory.Oil--},addOil(){let l=fe();for(let o=0;o0)e[i].g_factory.Lumber>0?e[i].g_factory.Lumber--:e[i].g_factory.Coal--,e[i].g_factory.Oil++;else break},buildLabel(l){return c(l)},ariaCount(l){return` ${e[i].g_factory[l]} ${l} fueled.`},ariaProd(l){return`. ${e[i].g_factory[l]} producing ${l}.`},level(){let l=e[i].g_factory.Lumber+e[i].g_factory.Coal+e[i].g_factory.Oil,o=e[i].g_factory.on;return rs(l,o)}},filters:{on:function(l){return e[i].g_factory.Lumber+e[i].g_factory.Coal+e[i].g_factory.Oil}}});function c(l){switch(l){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(l){let o=r.hasClass("modalBody")?"specialModal":"iGraphene";pe(`${o}${l}`,function(){return c(l)},{elm:$(`#${o} > div > .${l}`),attach:"#main"})})}function _0(r,a){let i=$(`${t("modal_pylon_casting")}: {{total | drain}}
`);r.append(i);let s=$('
');r.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(l){let o=$(`${t(`modal_pylon_spell_${l}`)} {{ ${l} }} `),d=$(`« `),h=$(`» `);s.append(d),s.append(o),s.append(h)}),D({el:a||"#specialModal",data:e.race.casting,methods:{buildLabel(l){return c(l)},addSpell(l){let o=fe();for(let d=0;d=h)e.race.casting[l]++,e.race.casting.total++,e.resource.Mana.diff-=h;else break}},subSpell(l){let o=fe();for(let d=0;d0;d++)e.race.casting[l]--,e.race.casting.total--},ariaCount(l){return` ${l} casting.`},level(){return rs(e.race.casting.total,e.resource.Mana.gen,!0)}},filters:{drain:function(l){let o=0;return n.forEach(function(d){e.race.casting[d]&&e.race.casting[d]>0&&(o+=di(e.race.casting[d]))}),t("modal_pylon_casting_cost",[+o.toFixed(3)])}}});function c(l){let o=+di(e.race.casting[l]).toFixed(4),d=+(di(e.race.casting[l]+1)-di(e.race.casting[l])).toFixed(4),h=+(100*(e.race.casting[l]/(e.race.casting[l]+75))).toFixed(2);if(l==="crafting"){let _=+(100*(2*e.race.casting[l]/(2*e.race.casting[l]+75))).toFixed(2);return t("modal_pylon_casting_label_crafting",[o,h,_,d])}return t("modal_pylon_casting_label",[t(`modal_pylon_spell_${l}`),o,d,h])}n.forEach(function(l){let o=r.hasClass("modalBody")?"specialModal":"iPylon";pe(`${o}${l}`,function(){return c(l)},{elm:$(`#${o} > .pylon > .${l}`),attach:"#main"})})}function h0(r,a){r.append($(`${t("modal_quarry_ratio",[e.resource.Chrysotile.name])}
`));let i=$('« »
');r.append(i),D({el:a||"#specialModal",data:e.city.rock_quarry,methods:{sub(){let s=fe();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=fe();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 f0(r,a){r.append($(`${t("modal_quarry_ratio",[e.resource.Adamantite.name])}
`));let i=$('« »
');r.append(i),D({el:a||"#specialModal",data:e.space.titan_mine,methods:{sub(){let s=fe();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=fe();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 m0(r,a){r.append($(`${t("tau_roid_mining_ship_ratio",[e.resource.Iron.name,e.resource.Aluminium.name])}
`));let i=$(`« »
`);r.append(i),r.append($(`${t("tau_roid_mining_ship_ratio",[e.resource.Iridium.name,e.resource.Neutronium.name])}
`));let s=$(`« »
`);if(r.append(s),e.tech.tau_roid>=5){r.append($(`${t("tau_roid_mining_ship_ratio",[e.resource.Orichalcum.name,e.resource.Elerium.name])}
`));let n=$(`« »
`);r.append(n)}D({el:a||"#specialModal",data:e.tauceti.mining_ship,methods:{sub(n){let c=fe();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=fe();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 g0(r,a){r.append($(`${t("tau_gas2_alien_station_focus",[e.resource.Knowledge.name])}
`));let i=$(`« »
`);r.append(i),D({el:a||"#specialModal",data:e.tauceti.alien_space_station,methods:{sub(s){let n=fe();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=fe();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 v0(r,a){if(e.race.replicator){r.append($(`${e.race.universe==="antimatter"?t("tech_antireplicator"):t("tech_replicator")}
`));let i=$('
');if(r.append(i),a){let o="";Object.keys(Mt).forEach(function(d){o+=`${e.resource[d].name} `}),i.append(`
+ `));let r=$('');$("#resQueue").append(r),r.append($(`{{ item.label }} [{{ item.time | time }} ] `));try{D({el:"#resQueue",data:e.r_queue,methods:{remove(a){Ie(`rq${e.r_queue.queue[a].id}`),e.r_queue.queue.splice(a,1),ki(),ue()},setID(a){return`rq${e.r_queue.queue[a].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(a){return Ft(a)}}}),n0()}catch{e.r_queue.queue=[]}}function tc(){let r=$("#resQueue .buildList")[0];if(r){let a=Sortable.get(r);a&&a.destroy()}}function n0(){let r=$("#resQueue .buildList")[0];Sortable.create(r,{onEnd(a){let i=e.r_queue.queue;i.splice(a.newDraggableIndex,0,i.splice(a.oldDraggableIndex,1)[0]),e.r_queue.queue=i,ki()}}),c0()}function c0(){for(let r=0;r=5?r-.01:r}function Ar(){let r=1800;e.tech.vault>=1?r=(e.tech.vault+1)*7500:e.tech.banking>=5?r=9e3:e.tech.banking>=3&&(r=4e3),e.race.paranoid&&(r*=1-b.paranoid.vars()[0]/100),e.race.hoarder&&(r*=1+b.hoarder.vars()[0]/100);let a=ve("dracnid");a>0&&(r*=1+b.hoarder.vars(1)[0]/100*a),e.tech.banking>=7&&(r*=1+xe(ye(e.civic.banker.workers,"banker")*.05)),e.tech.banking>=8&&(r+=xe(25*e.resource[e.race.species].amount)),e.tech.stock_exchange&&(r*=1+e.tech.stock_exchange*.1),e.tech.world_control&&(r*=1.25),e.race.truepath&&(r*=1.25),e.blood.greed&&(r*=1+e.blood.greed/100),e.stats.achieve.wheelbarrow&&(r*=1+e.stats.achieve.wheelbarrow.l/50),e.race.inflation&&(r*=1+e.race.inflation/125);let i=ge("risktaker",0);return i&&(r*=1+i/100),r}function bl(){e.race.start_cataclysm&&(delete e.race.start_cataclysm,Cs())}function Xt(r,a,i){switch(r){case"smelter":o0(a,i);break;case"factory":l0(a,i);break;case"droid":d0(a,i);break;case"graphene":p0(a,i);break;case"pylon":_0(a,i);break;case"rock_quarry":h0(a,i);break;case"titan_mine":f0(a,i);break;case"nanite_factory":u0(a,i);break;case"mining_ship":m0(a,i);break;case"alien_space_station":g0(a,i);break;case"replicator":v0(a,i);break}}function rt(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==1))){if(le($("#industry")),e.city.smelter&&(e.city.smelter.count>0||e.race.cataclysm||e.race.orbit_decayed||e.tech.isolation)){var r=$(`
`);$("#industry").append(r),Xt("smelter",r,"#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 a=$(`
`);$("#industry").append(a),Xt("factory",a,"#iFactory")}if(e.interstellar.mining_droid&&e.interstellar.mining_droid.count>0){var i=$(`
`);$("#industry").append(i),Xt("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=$(`
`);$("#industry").append(s),Xt("graphene",s,"#iGraphene")}if(e.race.casting&&(e.city.pylon||e.space.pylon||e.tauceti.pylon)){var n=$(`
`);$("#industry").append(n),Xt("pylon",n,"#iPylon")}if(e.race.smoldering&&e.city.rock_quarry&&!e.race.cataclysm&&!e.race.orbit_decayed&&!e.tech.isolation){var c=$(`
`);$("#industry").append(c),Xt("rock_quarry",c,"#iQuarry")}if(e.space.titan_mine&&e.space.titan_mine.count>0){var c=$(`
`);$("#industry").append(c),Xt("titan_mine",c,"#iTMine")}if(e.tech.tau_roid&&e.tech.tau_roid>=4&&e.tauceti.mining_ship){var l=$(`
`);$("#industry").append(l),Xt("mining_ship",l,"#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 o=$(`
`);$("#industry").append(o),Xt("alien_space_station",o,"#iAlienSpaceStation")}if(e.race.deconstructor&&e.city.nanite_factory){var d=$(`
`);$("#industry").append(d),Xt("nanite_factory",d,"#iNFactory")}if(e.race.replicator&&e.tech.replicator){var h=$(`
`);$("#industry").append(h),Xt("replicator",h,"#iReplicator")}}}var Be={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 o0(r,a){let i=$(`${t("modal_smelter_fuel")}: {{s.count | on}}/{{ s.cap }}
`);if(r.append(i),r.hasClass("modalBody")){let _=jt(10);_.length>0&&i.prepend(_)}if(a&&e.race.forge&&e.race.steelen){let _=ar(3,12,!0);_.length>0&&i.prepend(_)}let s=r.hasClass("modalBody")?"mSmelterFuels":"smelterFuels",n=$(`
`);if(r.append(n),!e.race.forge){if(!e.race.kindling_kindred&&!e.race.smoldering||e.race.evil){let _=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,m=$(`${_} {{ s.Wood }} `),w=$(`« `),M=$(`» `);n.append(w),n.append(m),n.append(M)}if(e.resource.Coal.display){let _=$(`${e.resource.Coal.name} `),m=$(`« `),w=$(`» `);n.append(m),n.append(_),n.append(w)}}if(e.race.forge){let _=$(`${t("trait_forge_name")} {{ s.Oil }} `);n.append(_)}else if(e.resource.Oil.display){let _=$(`${e.resource.Oil.name} {{ s.Oil }} `),m=$(`« `),w=$(`» `);n.append(m),n.append(_),n.append(w)}if(e.tech.star_forge&&e.tech.star_forge>=2){let _=$(`${t("star")} {{ s.Star }} `);n.append(_)}if(e.tech.smelting&&e.tech.smelting>=8){let _=$(`${t("modal_smelter_inferno")} {{ s.Inferno }} `),m=$(`« `),w=$(`» `);n.append(m),n.append(_),n.append(w)}let c=$('
');r.append(c);let l=!!(e.tech.irid_smelting||e.tech.m_smelting&&e.tech.m_smelting>=2);if(e.resource.Iridium.display&&l||e.resource.Steel.display&&e.tech.smelting>=2&&!e.race.steelen){let _=$(`
`);r.append(_),_.append(`${t("modal_smelter_type")}: {{s.count | son}}/{{ s.cap | on }}
`);let m=$('
');_.append(m);let w=$(`${e.resource.Iron.name} {{ s.Iron }} `),M=$(`« `),F=$(`» `);if(m.append(M),m.append(w),m.append(F),e.resource.Steel.display&&e.tech.smelting>=2&&!e.race.steelen){let x=$(`${e.resource.Steel.name} {{ s.Steel }} `),j=$(`« `),B=$(`» `);m.append(j),m.append(x),m.append(B)}if(e.resource.Iridium.display&&l){let x=$(`${e.resource.Iridium.name} {{ s.Iridium }} `),j=$(`« `),B=$(`» `);m.append(j),m.append(x),m.append(B)}}D({el:a||"#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(_){let m=fe();for(let w=0;w=e.city.smelter.StarCap)break;if(M0)_!=="Wood"&&e.city.smelter.Wood>0?(e.city.smelter.Wood--,e.city.smelter[_]++):_!=="Coal"&&e.city.smelter.Coal>0?(e.city.smelter.Coal--,e.city.smelter[_]++):_!=="Oil"&&e.city.smelter.Oil>0?(e.city.smelter.Oil--,e.city.smelter[_]++):_!=="Inferno"&&e.city.smelter.Inferno>0&&(e.city.smelter.Inferno--,e.city.smelter[_]++);else break}},subFuel(_){let m=fe();for(let w=0;w0;w++){e.city.smelter[_]--,e.race.forge&&_==="Inferno"&&e.city.smelter.Oil++;let M=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>M&&(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(_){return d(_)},addMetal(_){let m=fe();for(let w=0;w0&&_!=="Iron")e.city.smelter.Iron--,e.city.smelter[_]++;else if(e.city.smelter.Steel>0&&_!=="Steel")e.city.smelter.Steel--,e.city.smelter[_]++;else if(e.city.smelter.Iridium>0&&_!=="Iridium")e.city.smelter.Iridium--,e.city.smelter[_]++;else break}},subMetal(_){let m=fe();e.city.smelter[_]-=m,e.city.smelter[_]<0&&(e.city.smelter[_]=0)},buildLabel(_){return o(_)},ariaCount(_){return` ${e.city.smelter[_]} ${_} fueled.`},ariaProd(_){return`. ${e.city.smelter[_]} producing ${_}.`},net(_){return e.resource[_].diff>=0?"has-text-success":"has-text-danger"},level(){let _=e.city.smelter.Wood+e.city.smelter.Coal+e.city.smelter.Oil+e.city.smelter.Star+e.city.smelter.Inferno;return rs(_,e.city.smelter.count)}},filters:{on(_){return e.city.smelter.Wood+e.city.smelter.Coal+e.city.smelter.Oil+e.city.smelter.Star+e.city.smelter.Inferno},son(_){return e.city.smelter.Iron+e.city.smelter.Steel+e.city.smelter.Iridium},diffSize(_){return _>0?`+${Ee(_,2)}`:Ee(_,2)},spook(_){if(a&&((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 m=ar(3,12,!0);if(m.length>0)return m}return _},altspook(_){if(a&&e.race.forge&&e.city.smelter.Steel===6){let m=ar(3,12,!0);if(m.length>0)return m}return _}}});function o(_){switch(_){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 m=e.race.kindling_kindred?.15:.25;return e.tech.uranium&&e.tech.uranium>=3?t("modal_build_coal2",[m,t("resource_Coal_name"),t("resource_Uranium_name")]):t("modal_build_coal1",[m,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 m=50,w=35,M=.5;return t("modal_build_inferno",[m,t("resource_Coal_name"),w,t("resource_Oil_name"),M,t("resource_Infernite_name")])}}}function d(_){if(_==="steel"){let m=e.tech.smelting>=4?1.2:1;return e.tech.smelting>=5&&(m*=1.2),e.tech.smelting>=6&&(m*=1.2),e.tech.smelting>=7&&(m*=1.25),e.race.pyrophobia&&(m*=.9),t("modal_smelter_steel",[+m.toFixed(3),t("resource_Steel_name"),t("resource_Coal_name"),t("resource_Iron_name")])}else if(_==="iridium"){let m=e.tech.smelting>=7?6.25:5;return e.race.pyrophobia&&(m*=.9),t("modal_smelter_iron",[+m.toFixed(3),t("resource_Iridium_name")])}else{let m=e.tech.smelting>=3?e.tech.smelting>=7?15:12:10;return e.race.pyrophobia&&(m*=.9),t("modal_smelter_iron",[+m.toFixed(3),t("resource_Iron_name")])}}let h=r.hasClass("modalBody")?"mSmelterFuels":"smelterFuels";if(["wood","coal","oil","star","inferno"].forEach(function(_){pe(`${h}${_}`,function(){return o(_)},{elm:$(`#${h} > .${_}`),attach:"#main"})}),e.resource.Steel.display&&e.tech.smelting>=2&&!e.race.steelen||e.resource.Iridium.display&&l){let _=r.hasClass("modalBody")?"mSmelterMats":"smelterMats";["iron","steel","iridium"].forEach(function(m){m==="steel"&&(!e.resource.Steel.display||e.race.steelen)||m==="iridium"&&!(e.resource.Iridium.display&&l)||pe(`${_}${m}`,function(){return d(m)},{elm:$(`#${_} span.${m}`),attach:"#main"})})}}function l0(r,a){let i=$(`${t("modal_factory_operate")}: {{count | on}}/{{ on | max }}
`);r.append(i);let s=$(`${t("modal_factory_lux")}
`);r.append(s);let n=$(' '),c=$(`« `),l=$(`» `);if(s.append(c),s.append(n),s.append(l),e.tech.synthetic_fur){let w=$(`${e.race.evil?t("resource_Flesh_name"):t("resource_Furs_name")}
`);r.append(w);let M=$('{{ Furs }} '),F=$(`« `),x=$(`» `);w.append(F),w.append(M),w.append(x)}let o=$(`${t("resource_Alloy_name")}
`);r.append(o);let d=$('{{ Alloy }} '),h=$(`« `),_=$(`» `);if(o.append(h),o.append(d),o.append(_),e.tech.polymer){let w=$(`${t("resource_Polymer_name")}
`);r.append(w);let M=$('{{ Polymer }} '),F=$(`« `),x=$(`» `);w.append(F),w.append(M),w.append(x)}if(e.tech.nano){let w=$(`${t("resource_Nano_Tube_name")}
`);r.append(w);let M=$('{{ Nano }} '),F=$(`« `),x=$(`» `);w.append(F),w.append(M),w.append(x)}if(e.tech.stanene){let w=$(`${t("resource_Stanene_name")}
`);r.append(w);let M=$('{{ Stanene }} '),F=$(`« `),x=$(`» `);w.append(F),w.append(M),w.append(x)}D({el:a||"#specialModal",data:e.city.factory,methods:{subItem:function(w){let M=fe();for(var F=0;F0;F++)e.city.factory[w]--},addItem:function(w){let M=e.space.red_factory?e.space.red_factory.on+e.city.factory.on:e.city.factory.on;e.interstellar.int_factory&&k.int_factory&&(M+=k.int_factory*2),e.tauceti.tau_factory&&U.tau_factory&&(M+=U.tau_factory*(e.tech.isolation?5:3));let F=fe();for(var x=0;x0)e.city.factory.Alloy--,e.city.factory[w]++;else break}},buildLabel:function(w){return m(w)},ariaProd(w){return`. ${e.city.factory[w]} factories producing ${w}.`},level(){let w=e.city.factory.Lux+e.city.factory.Furs+e.city.factory.Alloy+e.city.factory.Polymer+e.city.factory.Nano+e.city.factory.Stanene,M=e.space.red_factory?e.space.red_factory.on+e.city.factory.on:e.city.factory.on;return e.interstellar.int_factory&&k.int_factory&&(M+=k.int_factory*2),e.tauceti.tau_factory&&U.tau_factory&&(M+=U.tau_factory*(e.tech.isolation?5:3)),rs(w,M)}},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 w=e.space.red_factory?e.space.red_factory.on+e.city.factory.on:e.city.factory.on;return e.interstellar.int_factory&&k.int_factory&&(w+=k.int_factory*2),e.tauceti.tau_factory&&U.tau_factory&&(w+=U.tau_factory*(e.tech.isolation?5:3)),w},spook(w){if(e.city.factory.Lux===3&&a){let M=ar(6,12,!0);if(M.length>0)return M}return w}}});function m(w){let M=!!e.tech.factory;switch(w){case"Lux":{let F=+(e.resource[e.race.species].amount*(M?Be.Lux.demand[e.tech.factory]:Be.Lux.demand[0]));F=Mc(F).toFixed(2);let x=M?Be.Lux.fur[e.tech.factory]:Be.Lux.fur[0];return t("modal_factory_lux_label",[x,e.resource.Furs.name,F])}case"Furs":{let F=M?Be.Furs.money[e.tech.factory]:Be.Furs.money[0],x=M?Be.Furs.polymer[e.tech.factory]:Be.Furs.polymer[0];return t("modal_factory_alloy_label",[F,t("resource_Money_name"),x,t("resource_Polymer_name"),e.race.evil?t("resource_Flesh_name"):t("resource_Furs_name")])}case"Alloy":{let F=M?Be.Alloy.copper[e.tech.factory]:Be.Alloy.copper[0],x=M?Be.Alloy.aluminium[e.tech.factory]:Be.Alloy.aluminium[0];return t("modal_factory_alloy_label",[F,t("resource_Copper_name"),x,t("resource_Aluminium_name"),t("resource_Alloy_name")])}case"Polymer":if(e.race.kindling_kindred||e.race.smoldering){let F=M?Be.Polymer.oil_kk[e.tech.factory]:Be.Polymer.oil_kk[0];return t("modal_factory_polymer_label2",[F,t("resource_Oil_name"),t("resource_Polymer_name")])}else{let F=M?Be.Polymer.oil[e.tech.factory]:Be.Polymer.oil[0],x=M?Be.Polymer.lumber[e.tech.factory]:Be.Polymer.lumber[0];return t("modal_factory_polymer_label1",[F,t("resource_Oil_name"),x,e.resource.Lumber.name,t("resource_Polymer_name")])}case"Nano":{let F=M?Be.Nano_Tube.coal[e.tech.factory]:Be.Nano_Tube.coal[0],x=M?Be.Nano_Tube.neutronium[e.tech.factory]:Be.Nano_Tube.neutronium[0];return t("modal_factory_nano_label",[F,t("resource_Coal_name"),x,t("resource_Neutronium_name"),t("resource_Nano_Tube_name")])}case"Stanene":{let F=M?Be.Stanene.aluminium[e.tech.factory]:Be.Stanene.aluminium[0],x=M?Be.Stanene.nano[e.tech.factory]:Be.Stanene.nano[0];return t("modal_factory_stanene_label",[F,t("resource_Aluminium_name"),x,t("resource_Nano_Tube_name"),t("resource_Stanene_name")])}}}["Lux","Furs","Alloy","Polymer","Nano","Stanene"].forEach(function(w){let M=r.hasClass("modalBody")?"specialModal":"iFactory";pe(`${M}${w}`,function(){return m(w)},{elm:$(`#${M} .factory > .${w}`),attach:"#main"})})}function Mc(r){e.race.toxic&&(r*=1+b.toxic.vars()[0]/100);let a=ve("shroomi");return a>0&&(r*=1+b.toxic.vars(1)[0]/100*a),e.civic.govern.type==="corpocracy"&&(r*=2.5),e.civic.govern.type==="socialist"&&(r*=.8),e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=2&&(r*=1.1),e.race.inflation&&(r*=1+e.race.inflation/1250),e.tech.isolation&&(r*=1+(U.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&&(r*=1+e.city.banquet.strength**.75/100),r*=T("psychic_cash"),r}var va=["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 u0(r,a){let i=$(`${t("modal_factory_operate")}: {{count | on}}/{{ count | max }}
`);r.append(i);let s=r.hasClass("modalBody")?"mNFactoryRes":"NFactoryRes",n=$(`
`);r.append(n),va.forEach(function(l){if(e.resource[l].display){let o=$(`${e.resource[l].name} {{ ${l} }} `),d=$(`« `),h=$(`» `);n.append(d),n.append(o),n.append(h)}}),D({el:a||"#specialModal",data:e.city.nanite_factory,methods:{subItem:function(l){let o=fe();e.city.nanite_factory[l]-=o,e.city.nanite_factory[l]<0&&(e.city.nanite_factory[l]=0)},addItem:function(l){let o=fe(),d=0;va.forEach(function(_){d+=e.city.nanite_factory[_]});let h=e.city.nanite_factory.count*50-d;o>h&&(o=h),o>0&&(e.city.nanite_factory[l]+=o)},eatLabel(l){return`Consume ${l} to produce ${e.resource.Nanite.name}`},level(){let l=0;va.forEach(function(d){l+=e.city.nanite_factory[d]});let o=e.city.nanite_factory.count;return rs(l,o)}},filters:{on(){let l=0;return va.forEach(function(o){l+=e.city.nanite_factory[o]}),l},max(){return e.city.nanite_factory.count*50}}});function c(l){let o=+(Mt[l]/100*(b.deconstructor.vars()[0]/100)).toFixed(4),d=+(e.city.nanite_factory[l]*o).toFixed(4);return t("modal_nfactory_resource_label",[1,e.resource[l].name,o,e.resource.Nanite.name,e.city.nanite_factory[l],d])}va.forEach(function(l){let o=r.hasClass("modalBody")?"specialModal":"iNFactory";pe(`${o}${l}`,function(){return c(l)},{elm:$(`#${o} > .fuels > .${l}`),attach:"#main"})})}function d0(r,a){let i=$(`${t("modal_factory_operate")}: {{count | on}}/{{ on | max }}
`);r.append(i);let s=$(`${t("resource_Adamantite_name")}
`);r.append(s);let n=$('{{ adam }} '),c=$(`« `),l=$(`» `);s.append(c),s.append(n),s.append(l);let o=$(`${t("resource_Uranium_name")}
`);r.append(o);let d=$('{{ uran }} '),h=$(`« `),_=$(`» `);o.append(h),o.append(d),o.append(_);let m=$(`${t("resource_Coal_name")}
`);r.append(m);let w=$('{{ coal }} '),M=$(`« `),F=$(`» `);m.append(M),m.append(w),m.append(F);let x=$(`${t("resource_Aluminium_name")}
`);r.append(x);let j=$('{{ alum }} '),B=$(`« `),S=$(`» `);x.append(B),x.append(j),x.append(S),D({el:a||"#specialModal",data:e.interstellar.mining_droid,methods:{subItem:function(V){let ce=fe();for(var Y=0;Y0;Y++)e.interstellar.mining_droid[V]--},addItem:function(V){let ce=fe();for(var Y=0;Y .${V}`),attach:"#main"})})}function p0(r,a){let i=e.race.truepath?"space":"interstellar",s=$(`${t("modal_smelter_fuel")}: {{count | on}}/{{ on | max }}
`);r.append(s);let n=$("
");if(r.append(n),!e.race.kindling_kindred&&!e.race.smoldering){let l=e.resource.Lumber.name,o=$(`${l} {{ Lumber }} `),d=$('« '),h=$('» ');n.append(d),n.append(o),n.append(h)}if(e.resource.Coal.display){let l=$(`${e.resource.Coal.name} {{ Coal }} `),o=$('« '),d=$('» ');n.append(o),n.append(l),n.append(d)}if(e.resource.Oil.display){let l=$(`${e.resource.Oil.name} {{ Oil }} `),o=$('« '),d=$('» ');n.append(o),n.append(l),n.append(d)}D({el:a||"#specialModal",data:e[i].g_factory,methods:{subWood(){let l=fe();for(let o=0;o0;o++)e[i].g_factory.Lumber--},addWood(){let l=fe();for(let o=0;o0)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 l=fe();for(let o=0;o0;o++)e[i].g_factory.Coal--},addCoal(){let l=fe();for(let o=0;o0)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 l=fe();for(let o=0;o0;o++)e[i].g_factory.Oil--},addOil(){let l=fe();for(let o=0;o0)e[i].g_factory.Lumber>0?e[i].g_factory.Lumber--:e[i].g_factory.Coal--,e[i].g_factory.Oil++;else break},buildLabel(l){return c(l)},ariaCount(l){return` ${e[i].g_factory[l]} ${l} fueled.`},ariaProd(l){return`. ${e[i].g_factory[l]} producing ${l}.`},level(){let l=e[i].g_factory.Lumber+e[i].g_factory.Coal+e[i].g_factory.Oil,o=e[i].g_factory.on;return rs(l,o)}},filters:{on:function(l){return e[i].g_factory.Lumber+e[i].g_factory.Coal+e[i].g_factory.Oil}}});function c(l){switch(l){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(l){let o=r.hasClass("modalBody")?"specialModal":"iGraphene";pe(`${o}${l}`,function(){return c(l)},{elm:$(`#${o} > div > .${l}`),attach:"#main"})})}function _0(r,a){let i=$(`${t("modal_pylon_casting")}: {{total | drain}}
`);r.append(i);let s=$('
');r.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(l){let o=$(`${t(`modal_pylon_spell_${l}`)} {{ ${l} }} `),d=$(`« `),h=$(`» `);s.append(d),s.append(o),s.append(h)}),D({el:a||"#specialModal",data:e.race.casting,methods:{buildLabel(l){return c(l)},addSpell(l){let o=fe();for(let d=0;d=h)e.race.casting[l]++,e.race.casting.total++,e.resource.Mana.diff-=h;else break}},subSpell(l){let o=fe();for(let d=0;d0;d++)e.race.casting[l]--,e.race.casting.total--},ariaCount(l){return` ${l} casting.`},level(){return rs(e.race.casting.total,e.resource.Mana.gen,!0)}},filters:{drain:function(l){let o=0;return n.forEach(function(d){e.race.casting[d]&&e.race.casting[d]>0&&(o+=di(e.race.casting[d]))}),t("modal_pylon_casting_cost",[+o.toFixed(3)])}}});function c(l){let o=+di(e.race.casting[l]).toFixed(4),d=+(di(e.race.casting[l]+1)-di(e.race.casting[l])).toFixed(4),h=+(100*(e.race.casting[l]/(e.race.casting[l]+75))).toFixed(2);if(l==="crafting"){let _=+(100*(2*e.race.casting[l]/(2*e.race.casting[l]+75))).toFixed(2);return t("modal_pylon_casting_label_crafting",[o,h,_,d])}return t("modal_pylon_casting_label",[t(`modal_pylon_spell_${l}`),o,d,h])}n.forEach(function(l){let o=r.hasClass("modalBody")?"specialModal":"iPylon";pe(`${o}${l}`,function(){return c(l)},{elm:$(`#${o} > .pylon > .${l}`),attach:"#main"})})}function h0(r,a){r.append($(`${t("modal_quarry_ratio",[e.resource.Chrysotile.name])}
`));let i=$('« »
');r.append(i),D({el:a||"#specialModal",data:e.city.rock_quarry,methods:{sub(){let s=fe();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=fe();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 f0(r,a){r.append($(`${t("modal_quarry_ratio",[e.resource.Adamantite.name])}
`));let i=$('« »
');r.append(i),D({el:a||"#specialModal",data:e.space.titan_mine,methods:{sub(){let s=fe();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=fe();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 m0(r,a){r.append($(`${t("tau_roid_mining_ship_ratio",[e.resource.Iron.name,e.resource.Aluminium.name])}
`));let i=$(`« »
`);r.append(i),r.append($(`${t("tau_roid_mining_ship_ratio",[e.resource.Iridium.name,e.resource.Neutronium.name])}
`));let s=$(`« »
`);if(r.append(s),e.tech.tau_roid>=5){r.append($(`${t("tau_roid_mining_ship_ratio",[e.resource.Orichalcum.name,e.resource.Elerium.name])}
`));let n=$(`« »
`);r.append(n)}D({el:a||"#specialModal",data:e.tauceti.mining_ship,methods:{sub(n){let c=fe();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=fe();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 g0(r,a){r.append($(`${t("tau_gas2_alien_station_focus",[e.resource.Knowledge.name])}
`));let i=$(`« »
`);r.append(i),D({el:a||"#specialModal",data:e.tauceti.alien_space_station,methods:{sub(s){let n=fe();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=fe();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 v0(r,a){if(e.race.replicator){r.append($(`${e.race.universe==="antimatter"?t("tech_antireplicator"):t("tech_replicator")}
`));let i=$('
');if(r.append(i),a){let o="";Object.keys(Mt).forEach(function(d){o+=`${e.resource[d].name} `}),i.append(`
{{ res | resName }}
${o}
-
`)}else{let o="";Object.keys(Mt).forEach(function(d){e.resource[d].display&&(o+=`${e.resource[d].name} `)}),i.append(`${o}
`)}let s=a?$("
"):$('
');i.append(s);let n=$('{{ pow }}MW '),c=$('« '),l=$('» ');if(s.append(c),s.append(n),s.append(l),r.append('{{ res | result }}
'),D({el:a||"#specialModal",data:e.race.replicator,methods:{less(){let o=fe();e.race.replicator.pow>0&&(e.race.replicator.pow-=o,e.race.replicator.pow<0&&(e.race.replicator.pow=0))},more(){let o=fe();e.race.replicator.pow+=o},setVal(o){e.resource[o].display&&(e.race.replicator.res=o)},avail(o){return e.resource[o].display},aria(){return e.race.replicator.pow+"MW"}},filters:{resName(o){return e.resource[o].name},result(o){return t("tau_replicator",[Pc(o,e.race.replicator.pow).toFixed(3),e.resource[o].name])}}}),!a){let o=document.getElementById("hscrolltarget");o.addEventListener("wheel",d=>{d.preventDefault(),o.scrollLeft+=d.deltaY})}}}function Pc(r,a){return e.race.lone_survivor?17.5*xt/Mt[r]*a:12.5*(xt||1)/Mt[r]*a**.75}function di(r,a){return a=typeof a>"u"?.0025:a,r*((1+a)**r-1)}function rs(r,a,i){return r<=0?i?"has-text-success":"has-text-danger":r>=a?i?"has-text-danger":"has-text-success":r<=a/3?i?"has-text-info":"has-text-caution":r<=a*.66?"has-text-warning":rDistribute Low Power
`),D({el:"#powerModeSwitch",data:e.settings}),Object.keys(r).forEach(function(a){if(!r[a].s)return;let i="";a==="power"&&(i=ar(7,12,!1)),r[a].r&&r[a].rs&&e[r[a].r][r[a].rs]?($("#powerGrid").append(``),D({el:`#pg${a}sup`,data:e[r[a].r][r[a].rs]})):$("#powerGrid").append(``);let s=$(`
`);$("#powerGrid").append(s);let n=0;for(let l=0;l`);A.append(` ${w}${M} `),A.append('{{ on | off }} {{ on }} '),A.append('« » '),s.append(A),D({el:`#pg${m.id}${a}`,data:e[_][d[1]],methods:{power_on(){let x=fe();for(let j=0;j0;j++)e[_][d[1]].on--;m.postPower&&setTimeout(function(){m.postPower(!1)},250)},higher(){let x=$(`#pg${m.id}${a}`).attr("data-idx"),j=$(`#pg${m.id}${a}`).prevAll('.circuit:not(".inactive")').attr("data-idx");if(j>=0){let B=r[a].l;B.splice(j,0,B.splice(x,1)[0]),r[a].l=B,ca()}},lower(){let x=$(`#pg${m.id}${a}`).attr("data-idx"),j=$(`#pg${m.id}${a}`).nextAll('.circuit:not(".inactive")').attr("data-idx");if(j0?"1"+j:x}}})}else{let A=$(`
`);A.append(`${w}${M} `),s.append(A)}}y0(a);let c=$(`${t("power_grid_reset",[r[a].n])}
`);$("#powerGrid").append(c),D({el:`#${a}GridReset`,data:{},methods:{resetGrid(l){xi(l,!0),ca()}}})})}function Xr(){return{power:{l:e.power,n:t("power"),s:!0,r:!1,rs:!1},moon:{l:e.support.moon,n:t("space_moon_info_name"),s:e.settings.space.moon,r:"space",rs:"moon_base"},red:{l:e.support.red,n:W().red,s:e.settings.space.red,r:"space",rs:"spaceport"},belt:{l:e.support.belt,n:t("space_belt_info_name"),s:e.settings.space.belt,r:"space",rs:"space_station"},alpha:{l:e.support.alpha,n:t("interstellar_alpha_name"),s:e.settings.space.alpha,r:"interstellar",rs:"starport"},nebula:{l:e.support.nebula,n:t("interstellar_nebula_name"),s:e.settings.space.nebula,r:"interstellar",rs:"nexus"},gateway:{l:e.support.gateway,n:t("galaxy_gateway"),s:e.settings.space.gateway,r:"galaxy",rs:"starbase"},alien2:{l:e.support.alien2,n:t("galaxy_alien",[F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name]),s:e.settings.space.alien2,r:"galaxy",rs:"foothold"},lake:{l:e.support.lake,n:t("portal_lake_name"),s:e.settings.portal.lake,r:"portal",rs:"harbour"},spire:{l:e.support.spire,n:t("portal_spire_name"),s:e.settings.portal.spire,r:"portal",rs:"purifier"},titan:{l:e.support.titan,n:W().titan,s:e.settings.space.titan,r:"space",rs:"electrolysis"},enceladus:{l:e.support.enceladus,n:W().enceladus,s:e.settings.space.enceladus,r:"space",rs:"titan_spaceport"},eris:{l:e.support.eris,n:W().eris,s:e.settings.space.eris,r:"space",rs:"drone_control"},tau_home:{l:e.support.tau_home,n:t("tau_planet",[F[e.race.species].home]),s:e.settings.tau.home,r:"tauceti",rs:"orbital_station"},tau_red:{l:e.support.tau_red,n:t("tau_planet",[W().red]),s:e.settings.tau.red,r:"tauceti",rs:"orbital_platform"},tau_roid:{l:e.support.tau_roid,n:t("tau_roid_title"),s:e.settings.tau.roid,r:"tauceti",rs:"patrol_ship"}}}function Qs(r){r=r||Xr(),Object.keys(r).forEach(function(a){let i=$(`#grid${a}`)[0];if(i){let s=Sortable.get(i);s&&s.destroy()}})}function y0(r){let a=$(`#grid${r}`)[0],i=Xr();Sortable.create(a,{onEnd(s){let n=i[r].l;n.splice(s.newDraggableIndex,0,n.splice(s.oldDraggableIndex,1)[0]),i[r].l=n,ca()}})}var Fi=new Date,$l=mn(),b0=qa(),bc=["angry","arrogant","atrophy","diverse","dumb","fragrant","frail","freespirit","gluttony","gnawer","greedy","hard_of_hearing","heavy","hooved","invertebrate","lazy","mistrustful","nearsighted","nyctophilia","paranoid","pathetic","pessimistic","puny","pyrophobia","skittish","slow","slow_regen","snowy","solitary","unorganized"];function me(r,a){if(e.settings.boring)return e.race.hrt&&delete e.race.hrt,!1;switch(r){case"elven":case"capybara":case"centaur":case"wendigo":case"entish":case"yeti":return Fi.getMonth()===11&&Fi.getDate()>=17||e.race.hrt&&e.race.hrt===r?(a&&(e.race.hrt=r),!0):!1;case"wolven":return $l.active||e.race.hrt&&e.race.hrt===r?(a&&(e.race.hrt=r),!0):!1;case"vulpine":return $l.active||e.race.hrt&&e.race.hrt===r?(a&&(e.race.hrt=r),!0):!1;case"arraak":return Fi.getMonth()===10&&Fi.getDate()>=22&&Fi.getDate()<=28||e.race.hrt&&e.race.hrt===r?(a&&(e.race.hrt=r),!0):!1;case"seraph":return Fi.getMonth()===1&&Fi.getDate()===14||e.race.hrt&&e.race.hrt===r?(a&&(e.race.hrt=r),!0):!1;case"junker":return b0.active||e.race.hrt&&e.race.hrt===r?(a&&(e.race.hrt=r),!0):!1}return!1}var Er={humanoid:{adaptable:1,wasteful:1},carnivore:{carnivore:1,beast:1,cautious:1},herbivore:{herbivore:1,instinct:1},small:{small:1,weak:1},giant:{large:1,strong:1},reptilian:{cold_blooded:1,scales:1},avian:{flier:1,hollow_bones:1,sky_lover:1},insectoid:{high_pop:1,fast_growth:1,high_metabolism:1},plant:{sappy:1,asymmetrical:1},fungi:{detritivore:1,spongy:1},aquatic:{submerged:1,low_light:1},fey:{elusive:1,iron_allergy:1},heat:{smoldering:1,cold_intolerance:1},polar:{chilled:1,heat_intolerance:1},sand:{scavenger:1,nomadic:1},demonic:{immoral:1,evil:1,soul_eater:1},angelic:{blissful:1,pompous:1,holy:1},synthetic:{artifical:1,powered:1},eldritch:{psychic:1,tormented:1,darkness:1,unfathomable:1}},b={adaptable:{name:t("trait_adaptable_name"),desc:t("trait_adaptable"),type:"genus",val:3,vars(r){switch(r||e.race.adaptable||1){case .25:return[3];case .5:return[5];case 1:return[10];case 2:return[15];case 3:return[20]}}},wasteful:{name:t("trait_wasteful_name"),desc:t("trait_wasteful"),type:"genus",val:-3,vars(r){switch(r||e.race.wasteful||1){case .25:return[14];case .5:return[12];case 1:return[10];case 2:return[6];case 3:return[4]}}},xenophobic:{name:t("trait_xenophobic_name"),desc:t("trait_xenophobic"),type:"genus",val:-5},carnivore:{name:t("trait_carnivore_name"),desc:t("trait_carnivore"),type:"genus",val:3,vars(r){switch(r||e.race.carnivore||1){case .25:return[65];case .5:return[60];case 1:return[50];case 2:return[40];case 3:return[35]}}},beast:{name:t("trait_beast_name"),desc:t("trait_beast"),type:"genus",val:2,vars(r){switch(r||e.race.beast||1){case .25:return[4,8,4];case .5:return[5,10,5];case 1:return[8,15,10];case 2:return[10,20,15];case 3:return[12,24,20]}}},cautious:{name:t("trait_cautious_name"),desc:t("trait_cautious"),type:"genus",val:-2,vars(r){switch(r||e.race.cautious||1){case .25:return[14];case .5:return[12];case 1:return[10];case 2:return[8];case 3:return[6]}}},herbivore:{name:t("trait_herbivore_name"),desc:t("trait_herbivore"),type:"genus",val:-7},instinct:{name:t("trait_instinct_name"),desc:t("trait_instinct"),type:"genus",val:5,vars(r){switch(r||e.race.instinct||1){case .25:return[3,15];case .5:return[5,25];case 1:return[10,50];case 2:return[15,60];case 3:return[20,65]}}},small:{name:t("trait_small_name"),desc:t("trait_small"),type:"genus",val:6,vars(r){switch(r||e.race.small||1){case .25:return[.0025,.0015];case .5:return[.005,.0025];case 1:return[.01,.005];case 2:return[.0125,.006];case 3:return[.015,.0075]}}},weak:{name:t("trait_weak_name"),desc:t("trait_weak"),type:"genus",val:-3,vars(r){switch(r||e.race.weak||1){case .25:return[14];case .5:return[12];case 1:return[10];case 2:return[8];case 3:return[6]}}},large:{name:t("trait_large_name"),desc:t("trait_large"),type:"genus",val:-5,vars(r){switch(r||e.race.large||1){case .25:return[.007];case .5:return[.006];case 1:return[.005];case 2:return[.004];case 3:return[.003]}}},strong:{name:t("trait_strong_name"),desc:t("trait_strong"),type:"genus",val:5,vars(r){switch(r||e.race.strong||1){case .25:return[2,1.25];case .5:return[3,1.5];case 1:return[4,2];case 2:return[5,2.25];case 3:return[6,2.5]}}},cold_blooded:{name:t("trait_cold_blooded_name"),desc:t("trait_cold_blooded"),type:"genus",val:-2,vars(r){switch(r||e.race.cold_blooded||1){case .25:return[30,6];case .5:return[25,8];case 1:return[20,10];case 2:return[15,15];case 3:return[12,18]}}},scales:{name:t("trait_scales_name"),desc:t("trait_scales"),type:"genus",val:5,vars(r){switch(r||e.race.scales||1){case .25:return[1,0,1];case .5:return[1,1,1];case 1:return[2,1,1];case 2:return[2,2,1];case 3:return[2,2,2]}}},flier:{name:t("trait_flier_name"),desc:t("trait_flier"),type:"genus",val:3,vars(r){switch(r||e.race.flier||1){case .25:return[10,0];case .5:return[15,0];case 1:return[25,1];case 2:return[40,1];case 3:return[50,2]}}},hollow_bones:{name:t("trait_hollow_bones_name"),desc:t("trait_hollow_bones"),type:"genus",val:2,vars(r){switch(r||e.race.hollow_bones||1){case .25:return[1];case .5:return[2];case 1:return[5];case 2:return[8];case 3:return[10]}}},sky_lover:{name:t("trait_sky_lover_name"),desc:t("trait_sky_lover"),type:"genus",val:-2,vars(r){switch(r||e.race.sky_lover||1){case .25:return[40];case .5:return[30];case 1:return[20];case 2:return[15];case 3:return[10]}}},rigid:{name:t("trait_rigid_name"),desc:t("trait_rigid"),type:"genus",val:-2,vars(r){switch(r||e.race.rigid||1){case .25:return[3];case .5:return[2];case 1:return[1];case 2:return[.5];case 3:return[.4]}}},high_pop:{name:t("trait_high_pop_name"),desc:t("trait_high_pop"),type:"genus",val:3,vars(r){switch(r||e.race.high_pop||1){case .25:return[2,50,1.5];case .5:return[3,34,2.5];case 1:return[4,26,3.5];case 2:return[5,21.2,4.5];case 3:return[6,18,5.5]}}},fast_growth:{name:t("trait_fast_growth_name"),desc:t("trait_fast_growth"),type:"genus",val:2,vars(r){switch(r||e.race.fast_growth||1){case .25:return[1.5,1];case .5:return[2,1];case 1:return[2,2];case 2:return[2.5,3];case 3:return[3,3]}}},high_metabolism:{name:t("trait_high_metabolism_name"),desc:t("trait_high_metabolism"),type:"genus",val:-1,vars(r){switch(r||e.race.high_metabolism||1){case .25:return[10];case .5:return[8];case 1:return[5];case 2:return[2];case 3:return[1]}}},photosynth:{name:t("trait_photosynth_name"),desc:t("trait_photosynth"),type:"genus",val:3,vars(r){switch(r||e.race.photosynth||1){case .25:return[10,5,4];case .5:return[20,10,5];case 1:return[40,20,10];case 2:return[50,30,15];case 3:return[60,35,20]}}},sappy:{name:t("trait_sappy_name"),desc:t("trait_sappy",[t("resource_Amber_name")]),type:"genus",val:4,vars(r){switch(r||e.race.sappy||1){case .25:return[.4];case .5:return[.5];case 1:return[.6];case 2:return[.65];case 3:return[.7]}}},asymmetrical:{name:t("trait_asymmetrical_name"),desc:t("trait_asymmetrical"),type:"genus",val:-3,vars(r){switch(r||e.race.asymmetrical||1){case .25:return[30];case .5:return[25];case 1:return[20];case 2:return[15];case 3:return[10]}}},detritivore:{name:t("trait_detritivore_name"),desc:t("trait_detritivore"),type:"genus",val:2,vars(r){switch(r||e.race.detritivore||1){case .25:return[65];case .5:return[72];case 1:return[80];case 2:return[85];case 3:return[90]}}},spores:{name:t("trait_spores_name"),desc:t("trait_spores"),type:"genus",val:2,vars(r){switch(r||e.race.spores||1){case .25:return[1,1.5,1];case .5:return[2,1.5,1];case 1:return[2,2,1];case 2:return[2,2.5,2];case 3:return[2,3,2]}}},spongy:{name:t("trait_spongy_name"),desc:t("trait_spongy"),type:"genus",val:-2},submerged:{name:t("trait_submerged_name"),desc:t("trait_submerged"),type:"genus",val:3},low_light:{name:t("trait_low_light_name"),desc:t("trait_low_light"),type:"genus",val:-2,vars(r){switch(r||e.race.low_light||1){case .25:return[14];case .5:return[12];case 1:return[10];case 2:return[8];case 3:return[6]}}},elusive:{name:t("trait_elusive_name"),desc:t("trait_elusive"),type:"genus",val:7,vars(r){switch(r||e.race.elusive||1){case .25:return[10];case .5:return[15];case 1:return[20];case 2:return[25];case 3:return[30]}}},iron_allergy:{name:t("trait_iron_allergy_name"),desc:t("trait_iron_allergy"),type:"genus",val:-4,vars(r){switch(r||e.race.iron_allergy||1){case .25:return[40];case .5:return[35];case 1:return[25];case 2:return[18];case 3:return[15]}}},smoldering:{name:t("trait_smoldering_name"),desc:t("trait_smoldering"),type:"genus",val:7,vars(r){switch(r||e.race.smoldering||1){case .25:return[3,.14,.08];case .5:return[4,.18,.1];case 1:return[5,.35,.2];case 2:return[10,.38,.22];case 3:return[12,.4,.24]}}},cold_intolerance:{name:t("trait_cold_intolerance_name"),desc:t("trait_cold_intolerance"),type:"genus",val:-4,vars(r){switch(r||e.race.cold_intolerance||1){case .25:return[.35];case .5:return[.3];case 1:return[.25];case 2:return[.2];case 3:return[.18]}}},chilled:{name:t("trait_chilled_name"),desc:t("trait_chilled"),type:"genus",val:7,vars(r){switch(r||e.race.chilled||1){case .25:return[1,.14,.08,5,2,20];case .5:return[2,.18,.1,10,5,18];case 1:return[5,.35,.2,20,10,15];case 2:return[10,.38,.22,25,12,10];case 3:return[12,.4,.24,30,14,8]}}},heat_intolerance:{name:t("trait_heat_intolerance_name"),desc:t("trait_heat_intolerance"),type:"genus",val:-4,vars(r){switch(r||e.race.heat_intolerance||1){case .25:return[.35];case .5:return[.3];case 1:return[.25];case 2:return[.2];case 3:return[.18]}}},scavenger:{name:t("trait_scavenger_name"),desc:t("trait_scavenger"),type:"genus",val:3,vars(r){switch(r||e.race.scavenger||1){case .25:return[.08,20];case .5:return[.1,22];case 1:return[.12,25];case 2:return[.14,30];case 3:return[.16,32]}}},nomadic:{name:t("trait_nomadic_name"),desc:t("trait_nomadic"),type:"genus",val:-5},immoral:{name:t("trait_immoral_name"),desc:t("trait_immoral"),type:"genus",val:4,vars(r){switch(r||e.race.immoral||1){case .25:return[-30];case .5:return[-20];case 1:return[0];case 2:return[20];case 3:return[30]}}},evil:{name:t("trait_evil_name"),desc:t("trait_evil"),type:"genus",val:0},blissful:{name:t("trait_blissful_name"),desc:t("trait_blissful"),type:"genus",val:3,vars(r){switch(r||e.race.blissful||1){case .25:return[70];case .5:return[60];case 1:return[50];case 2:return[40];case 3:return[30]}}},pompous:{name:t("trait_pompous_name"),desc:t("trait_pompous"),type:"genus",val:-6,vars(r){switch(r||e.race.pompous||1){case .25:return[85];case .5:return[80];case 1:return[75];case 2:return[65];case 3:return[60]}}},holy:{name:t("trait_holy_name"),desc:t("trait_holy"),type:"genus",val:4,vars(r){switch(r||e.race.holy||1){case .25:return[25,10];case .5:return[30,15];case 1:return[50,25];case 2:return[60,35];case 3:return[65,40]}}},artifical:{name:t("trait_artifical_name"),desc:t("trait_artifical"),type:"genus",val:5,vars(r){switch(r||e.race.artifical||1){case .25:return[5];case .5:return[10];case 1:return[20];case 2:return[25];case 3:return[30]}}},powered:{name:t("trait_powered_name"),desc:t("trait_powered"),type:"genus",val:-6,vars(r){switch(r||e.race.powered||1){case .25:return[.35,5];case .5:return[.3,8];case 1:return[.2,16];case 2:return[.1,20];case 3:return[.05,24]}}},psychic:{name:t("trait_psychic_name"),desc:t("trait_psychic"),type:"genus",val:10,vars(r){switch(r||e.race.psychic||1){case .25:return[.35,5,.01,20];case .5:return[.65,10,.025,30];case 1:return[1,15,.05,40];case 2:return[1.25,20,.075,50];case 3:return[1.5,25,.1,60]}}},tormented:{name:t("trait_tormented_name"),desc:t("trait_tormented"),type:"genus",val:-25,vars(r){switch(r||e.race.tormented||1){case .25:return[99];case .5:return[95];case 1:return[90];case 2:return[80];case 3:return[75]}}},darkness:{name:t("trait_darkness_name"),desc:t("trait_darkness"),type:"genus",val:1,vars(r){switch(r||e.race.darkness||1){case .25:return[1];case .5:return[2];case 1:return[3];case 2:return[4];case 3:return[5]}}},unfathomable:{name:t("trait_unfathomable_name"),desc:t("trait_unfathomable"),type:"genus",val:15,vars(r){switch(r||e.race.unfathomable||1){case .25:return[1,.5,.05];case .5:return[1,.65,.08];case 1:return[2,.8,.1];case 2:return[2,.9,.12];case 3:return[3,1,.13]}}},creative:{name:t("trait_creative_name"),desc:t("trait_creative"),type:"major",val:8,vars(r){switch(r||e.race.creative||1){case .25:return[.0015,5];case .5:return[.0025,10];case 1:return[.005,20];case 2:return[.006,22];case 3:return[.0065,24]}}},diverse:{name:t("trait_diverse_name"),desc:t("trait_diverse"),type:"major",val:-4,vars(r){switch(r||e.race.diverse||1){case .25:return[35];case .5:return[30];case 1:return[25];case 2:return[20];case 3:return[15]}}},studious:{name:t("trait_studious_name"),desc:t("trait_studious"),type:"major",val:2,vars(r){switch(r||e.race.studious||1){case .25:return[.1,6];case .5:return[.15,8];case 1:return[.25,10];case 2:return[.35,12];case 3:return[.4,14]}}},arrogant:{name:t("trait_arrogant_name"),desc:t("trait_arrogant"),type:"major",val:-2,vars(r){switch(r||e.race.arrogant||1){case .25:return[14];case .5:return[12];case 1:return[10];case 2:return[8];case 3:return[6]}}},brute:{name:t("trait_brute_name"),desc:t("trait_brute"),type:"major",val:7,vars(r){switch(r||e.race.brute||1){case .25:return[20,50];case .5:return[25,60];case 1:return[50,100];case 2:return[60,120];case 3:return[65,140]}}},angry:{name:t("trait_angry_name"),desc:t("trait_angry"),type:"major",val:-1,vars(r){switch(r||e.race.angry||1){case .25:return[35];case .5:return[30];case 1:return[25];case 2:return[20];case 3:return[15]}}},lazy:{name:t("trait_lazy_name"),desc:t("trait_lazy"),type:"major",val:-4,vars(r){switch(r||e.race.lazy||1){case .25:return[14];case .5:return[12];case 1:return[10];case 2:return[8];case 3:return[6]}}},curious:{name:t("trait_curious_name"),desc:t("trait_curious"),type:"major",val:4,vars(r){switch(r||e.race.curious||1){case .25:return[.03];case .5:return[.05];case 1:return[.1];case 2:return[.12];case 3:return[.13]}}},pack_mentality:{name:t("trait_pack_mentality_name"),desc:t("trait_pack_mentality"),type:"major",val:4,vars(r){switch(r||e.race.pack_mentality||1){case .25:return[.04,.016];case .5:return[.035,.018];case 1:return[.03,.02];case 2:return[.026,.022];case 3:return[.024,.023]}}},tracker:{name:t("trait_tracker_name"),desc:t("trait_tracker"),type:"major",val:2,vars(r){switch(r||e.race.tracker||1){case .25:return[10];case .5:return[15];case 1:return[20];case 2:return[25];case 3:return[30]}}},playful:{name:t("trait_playful_name"),desc:t("trait_playful"),type:"major",val:5,vars(r){switch(r||e.race.playful||1){case .25:return[.3];case .5:return[.4];case 1:return[.5];case 2:return[.6];case 3:return[.7]}}},freespirit:{name:t("trait_freespirit_name"),desc:t("trait_freespirit"),type:"major",val:-3,vars(r){switch(r||e.race.freespirit||1){case .25:return[65];case .5:return[60];case 1:return[50];case 2:return[35];case 3:return[25]}}},beast_of_burden:{name:t("trait_beast_of_burden_name"),desc:t("trait_beast_of_burden"),type:"major",val:3},sniper:{name:t("trait_sniper_name"),desc:t("trait_sniper"),type:"major",val:6,vars(r){switch(r||e.race.sniper||1){case .25:return[4];case .5:return[6];case 1:return[8];case 2:return[9];case 3:return[10]}}},hooved:{name:t("trait_hooved_name"),desc:t("trait_hooved"),type:"major",val:-4,vars(r){switch(r||e.race.hooved||1){case .25:return[130];case .5:return[120];case 1:return[100];case 2:return[80];case 3:return[70]}}},rage:{name:t("trait_rage_name"),desc:t("trait_rage"),type:"major",val:4,vars(r){switch(r||e.race.rage||1){case .25:return[.3,20];case .5:return[.5,30];case 1:return[1,50];case 2:return[1.25,60];case 3:return[1.4,65]}}},heavy:{name:t("trait_heavy_name"),desc:t("trait_heavy"),type:"major",val:-4,vars(r){switch(r||e.race.heavy||1){case .25:return[18,10];case .5:return[15,8];case 1:return[10,5];case 2:return[8,4];case 3:return[6,3]}}},gnawer:{name:t("trait_gnawer_name"),desc:t("trait_gnawer"),type:"major",val:-1,vars(r){switch(r||e.race.gnawer||1){case .25:return[.5];case .5:return[.4];case 1:return[.25];case 2:return[.2];case 3:return[.15]}}},calm:{name:t("trait_calm_name"),desc:t("trait_calm"),type:"major",val:6,vars(r){switch(r||e.race.calm||1){case .25:return[7];case .5:return[8];case 1:return[10];case 2:return[12];case 3:return[13]}}},pack_rat:{name:t("trait_pack_rat_name"),desc:t("trait_pack_rat"),type:"major",val:3,vars(r){switch(r||e.race.pack_rat||1){case .25:return[5,2];case .5:return[6,3];case 1:return[10,5];case 2:return[15,8];case 3:return[20,10]}}},paranoid:{name:t("trait_paranoid_name"),desc:t("trait_paranoid"),type:"major",val:-3,vars(r){switch(r||e.race.paranoid||1){case .25:return[14];case .5:return[12];case 1:return[10];case 2:return[8];case 3:return[6]}}},greedy:{name:t("trait_greedy_name"),desc:t("trait_greedy"),type:"major",val:-5,vars(r){switch(r||e.race.greedy||1){case .25:return[17.5];case .5:return[15];case 1:return[12.5];case 2:return[10];case 3:return[8]}}},merchant:{name:t("trait_merchant_name"),desc:t("trait_merchant"),type:"major",val:3,vars(r){switch(r||e.race.merchant||1){case .25:return[10,3];case .5:return[15,5];case 1:return[25,10];case 2:return[35,12];case 3:return[40,13]}}},smart:{name:t("trait_smart_name"),desc:t("trait_smart"),type:"major",val:6,vars(r){switch(r||e.race.smart||1){case .25:return[3];case .5:return[5];case 1:return[10];case 2:return[12];case 3:return[13]}}},puny:{name:t("trait_puny_name"),desc:t("trait_puny"),type:"major",val:-4,vars(r){switch(r||e.race.puny||1){case .25:return[18];case .5:return[15];case 1:return[10];case 2:return[6];case 3:return[4]}}},dumb:{name:t("trait_dumb_name"),desc:t("trait_dumb"),type:"major",val:-5,vars(r){switch(r||e.race.dumb||1){case .25:return[7];case .5:return[6];case 1:return[5];case 2:return[4];case 3:return[3]}}},tough:{name:t("trait_tough_name"),desc:t("trait_tough"),type:"major",val:4,vars(r){switch(r||e.race.tough||1){case .25:return[10];case .5:return[15];case 1:return[25];case 2:return[35];case 3:return[40]}}},nearsighted:{name:t("trait_nearsighted_name"),desc:t("trait_nearsighted"),type:"major",val:-4,vars(r){switch(r||e.race.nearsighted||1){case .25:return[18];case .5:return[15];case 1:return[12];case 2:return[10];case 3:return[8]}}},intelligent:{name:t("trait_intelligent_name"),desc:t("trait_intelligent"),type:"major",val:7,vars(r){switch(r||e.race.intelligent||1){case .25:return[.08,.15];case .5:return[.1,.2];case 1:return[.125,.25];case 2:return[.14,.3];case 3:return[.15,.32]}}},regenerative:{name:t("trait_regenerative_name"),desc:t("trait_regenerative"),type:"major",val:8,vars(r){switch(r||e.race.regenerative||1){case .25:return[2];case .5:return[3];case 1:return[4];case 2:return[5];case 3:return[6]}}},gluttony:{name:t("trait_gluttony_name"),desc:t("trait_gluttony"),type:"major",val:-2,vars(r){switch(r||e.race.gluttony||1){case .25:return[20];case .5:return[15];case 1:return[10];case 2:return[8];case 3:return[6]}}},slow:{name:t("trait_slow_name"),desc:t("trait_slow"),type:"major",val:-5,vars(r){switch(r||e.race.slow||1){case .25:return[13];case .5:return[12];case 1:return[10];case 2:return[8];case 3:return[6]}}},armored:{name:t("trait_armored_name"),desc:t("trait_armored"),type:"major",val:4,vars(r){switch(r||e.race.armored||1){case .25:return[15,1];case .5:return[25,1];case 1:return[50,2];case 2:return[70,2];case 3:return[80,2]}}},optimistic:{name:t("trait_optimistic_name"),desc:t("trait_optimistic"),type:"major",val:5,vars(r){switch(r||e.race.optimistic||1){case .25:return[4,6];case .5:return[5,8];case 1:return[10,10];case 2:return[15,13];case 3:return[18,15]}}},chameleon:{name:t("trait_chameleon_name"),desc:t("trait_chameleon"),type:"major",val:6,vars(r){switch(r||e.race.chameleon||1){case .25:return[5,10];case .5:return[10,15];case 1:return[20,20];case 2:return[25,25];case 3:return[30,30]}}},slow_digestion:{name:t("trait_slow_digestion_name"),desc:t("trait_slow_digestion"),type:"major",val:1,vars(r){switch(r||e.race.slow_digestion||1){case .25:return[.3];case .5:return[.5];case 1:return[.75];case 2:return[1];case 3:return[1.25]}}},hard_of_hearing:{name:t("trait_hard_of_hearing_name"),desc:t("trait_hard_of_hearing"),type:"major",val:-3,vars(r){switch(r||e.race.hard_of_hearing||1){case .25:return[7];case .5:return[6];case 1:return[5];case 2:return[4];case 3:return[3]}}},resourceful:{name:t("trait_resourceful_name"),desc:t("trait_resourceful"),type:"major",val:4,vars(r){switch(r||e.race.resourceful||1){case .25:return[6];case .5:return[8];case 1:return[12];case 2:return[16];case 3:return[18]}}},selenophobia:{name:t("trait_selenophobia_name"),desc:t("trait_selenophobia"),type:"major",val:-6,vars(r){switch(r||e.race.selenophobia||1){case .25:return[2];case .5:return[3];case 1:return[4];case 2:return[5];case 3:return[6]}}},leathery:{name:t("trait_leathery_name"),desc:t("trait_leathery"),type:"major",val:2,vars(r){switch(r||e.race.leathery||1){case .25:return[4];case .5:return[3];case 1:return[2];case 2:return[1];case 3:return[0]}}},pessimistic:{name:t("trait_pessimistic_name"),desc:t("trait_pessimistic"),type:"major",val:-1,vars(r){switch(r||e.race.pessimistic||1){case .25:return[4];case .5:return[3];case 1:return[2];case 2:return[1];case 3:return[1]}}},hoarder:{name:t("trait_hoarder_name"),desc:t("trait_hoarder"),type:"major",val:4,vars(r){switch(r||e.race.hoarder||1){case .25:return[5];case .5:return[10];case 1:return[20];case 2:return[25];case 3:return[30]}}},solitary:{name:t("trait_solitary_name"),desc:t("trait_solitary"),type:"major",val:-1,vars(r){switch(r||e.race.solitary||1){case .25:return[.01,.025];case .5:return[.01,.02];case 1:return[.02,.02];case 2:return[.025,.02];case 3:return[.025,.015]}}},kindling_kindred:{name:t("trait_kindling_kindred_name"),desc:t("trait_kindling_kindred"),type:"major",val:8,vars(r){switch(r||e.race.kindling_kindred||1){case .25:return[10];case .5:return[8];case 1:return[5];case 2:return[4];case 3:return[3]}}},pyrophobia:{name:t("trait_pyrophobia_name"),desc:t("trait_pyrophobia"),type:"major",val:-4,vars(r){switch(r||e.race.pyrophobia||1){case .25:return[14];case .5:return[12];case 1:return[10];case 2:return[8];case 3:return[6]}}},hyper:{name:t("trait_hyper_name"),desc:t("trait_hyper"),type:"major",val:4,vars(r){switch(r||e.race.hyper||1){case .25:return[2];case .5:return[3];case 1:return[5];case 2:return[6];case 3:return[7]}}},skittish:{name:t("trait_skittish_name"),desc:t("trait_skittish"),type:"major",val:-4,vars(r){switch(r||e.race.skittish||1){case .25:return[18];case .5:return[15];case 1:return[12];case 2:return[8];case 3:return[6]}}},fragrant:{name:t("trait_fragrant_name"),desc:t("trait_fragrant"),type:"major",val:-3,vars(r){switch(r||e.race.fragrant||1){case .25:return[35];case .5:return[30];case 1:return[20];case 2:return[15];case 3:return[12]}}},sticky:{name:t("trait_sticky_name"),desc:t("trait_sticky"),type:"major",val:3,vars(r){switch(r||e.race.sticky||1){case .25:return[5,5];case .5:return[10,8];case 1:return[20,15];case 2:return[25,18];case 3:return[30,20]}}},infectious:{name:t("trait_infectious_name"),desc:t("trait_infectious"),type:"major",val:4,vars(r){switch(r||e.race.infectious||1){case .25:return[1,2,3,7,18];case .5:return[1,2,4,8,20];case 1:return[2,3,5,10,25];case 2:return[2,4,6,12,30];case 3:return[3,4,7,13,32]}}},parasite:{name:t("trait_parasite_name"),desc:t("trait_parasite"),type:"major",val:-4},toxic:{name:t("trait_toxic_name"),desc:t("trait_toxic"),type:"major",val:5,vars(r){switch(r||e.race.toxic||1){case .25:return[5,3,10];case .5:return[10,5,15];case 1:return[20,8,30];case 2:return[25,10,40];case 3:return[30,12,45]}}},nyctophilia:{name:t("trait_nyctophilia_name"),desc:t("trait_nyctophilia"),type:"major",val:-3,vars(r){switch(r||e.race.nyctophilia||1){case .25:return[10,6];case .5:return[8,5];case 1:return[5,2];case 2:return[3,1];case 3:return[2,1]}}},infiltrator:{name:t("trait_infiltrator_name"),desc:t("trait_infiltrator"),type:"major",val:4,vars(r){switch(r||e.race.infiltrator||1){case .25:return[110];case .5:return[100];case 1:return[90];case 2:return[85];case 3:return[80]}}},hibernator:{name:t("trait_hibernator_name"),desc:t("trait_hibernator"),type:"major",val:-3,vars(r){switch(r||e.race.hibernator||1){case .25:return[15,8];case .5:return[20,8];case 1:return[25,8];case 2:return[30,6];case 3:return[35,5]}}},cannibalize:{name:t("trait_cannibalize_name"),desc:t("trait_cannibalize"),type:"major",val:5,vars(r){switch(r||e.race.cannibalize||1){case .25:return[8];case .5:return[10];case 1:return[15];case 2:return[20];case 3:return[22]}}},frail:{name:t("trait_frail_name"),desc:t("trait_frail"),type:"major",val:-5,vars(r){switch(r||e.race.frail||1){case .25:return[2,2];case .5:return[1,2];case 1:return[1,1];case 2:return[1,0];case 3:return[1,0]}}},malnutrition:{name:t("trait_malnutrition_name"),desc:t("trait_malnutrition"),type:"major",val:1,vars(r){switch(r||e.race.malnutrition||1){case .25:return[10];case .5:return[12];case 1:return[25];case 2:return[40];case 3:return[50]}}},claws:{name:t("trait_claws_name"),desc:t("trait_claws"),type:"major",val:5,vars(r){switch(r||e.race.claws||1){case .25:return[8];case .5:return[12];case 1:return[25];case 2:return[32];case 3:return[35]}}},atrophy:{name:t("trait_atrophy_name"),desc:t("trait_atrophy"),type:"major",val:-1,vars(r){switch(r||e.race.atrophy||1){case .25:return[.35];case .5:return[.25];case 1:return[.15];case 2:return[.1];case 3:return[.08]}}},hivemind:{name:t("trait_hivemind_name"),desc:t("trait_hivemind"),type:"major",val:9,vars(r){switch(r||e.race.hivemind||1){case .25:return[12];case .5:return[11];case 1:return[10];case 2:return[8];case 3:return[7]}}},tunneler:{name:t("trait_tunneler_name"),desc:t("trait_tunneler"),type:"major",val:2,vars(r){switch(r||e.race.tunneler||1){case .25:return[.002];case .5:return[.005];case 1:return[.01];case 2:return[.015];case 3:return[.018]}}},blood_thirst:{name:t("trait_blood_thirst_name"),desc:t("trait_blood_thirst"),type:"major",val:5,vars(r){switch(r||e.race.blood_thirst||1){case .25:return[25e4];case .5:return[5e5];case 1:return[1e6];case 2:return[2e6];case 3:return[4e6]}}},apex_predator:{name:t("trait_apex_predator_name"),desc:t("trait_apex_predator"),type:"major",val:6,vars(r){switch(r||e.race.apex_predator||1){case .25:return[15,20];case .5:return[20,30];case 1:return[30,50];case 2:return[40,60];case 3:return[45,65]}}},invertebrate:{name:t("trait_invertebrate_name"),desc:t("trait_invertebrate"),type:"major",val:-2,vars(r){switch(r||e.race.invertebrate||1){case .25:return[25];case .5:return[20];case 1:return[10];case 2:return[8];case 3:return[5]}}},suction_grip:{name:t("trait_suction_grip_name"),desc:t("trait_suction_grip"),type:"major",val:4,vars(r){switch(r||e.race.suction_grip||1){case .25:return[5];case .5:return[6];case 1:return[8];case 2:return[12];case 3:return[14]}}},befuddle:{name:t("trait_befuddle_name"),desc:t("trait_befuddle"),type:"major",val:4,vars(r){switch(r||e.race.befuddle||1){case .25:return[20];case .5:return[30];case 1:return[50];case 2:return[75];case 3:return[85]}}},environmentalist:{name:t("trait_environmentalist_name"),desc:t("trait_environmentalist"),type:"major",val:-5},unorganized:{name:t("trait_unorganized_name"),desc:t("trait_unorganized"),type:"major",val:-2,vars(r){switch(r||e.race.unorganized||1){case .25:return[90];case .5:return[80];case 1:return[50];case 2:return[40];case 3:return[30]}}},musical:{name:t("trait_musical_name"),desc:t("trait_musical"),type:"major",val:5,vars(r){switch(r||e.race.musical||1){case .25:return[.25];case .5:return[.5];case 1:return[1];case 2:return[1.1];case 3:return[1.2]}}},revive:{name:t("trait_revive_name"),desc:t("trait_revive"),type:"major",val:4,vars(r){switch(r||e.race.revive||1){case .25:return[7,5,2,8,6,3,4];case .5:return[6,4,2,7,5,2.5,4];case 1:return[5,3,1.5,6,4,2,3];case 2:return[4,2,1,5,3,1.5,2];case 3:return[3,1.5,1,4,2.5,1,2]}}},slow_regen:{name:t("trait_slow_regen_name"),desc:t("trait_slow_regen"),type:"major",val:-4,vars(r){switch(r||e.race.slow_regen||1){case .25:return[40];case .5:return[35];case 1:return[25];case 2:return[20];case 3:return[15]}}},forge:{name:t("trait_forge_name"),desc:t("trait_forge"),type:"major",val:4,vars(r){switch(r||e.race.forge||1){case .25:return[.5];case .5:return[1];case 1:return[2];case 2:return[2.5];case 3:return[3]}}},autoignition:{name:t("trait_autoignition_name"),desc:t("trait_autoignition"),type:"major",val:-4,vars(r){switch(r||e.race.autoignition||1){case .25:return[4];case .5:return[3];case 1:return[2];case 2:return[1.5];case 3:return[1]}}},blurry:{name:t("trait_blurry_name"),desc:t("trait_blurry"),type:"major",val:5,vars(r){switch(r||e.race.blurry||1){case .25:return[10];case .5:return[15];case 1:return[25];case 2:return[35];case 3:return[40]}}},snowy:{name:t("trait_snowy_name"),desc:t("trait_snowy"),type:"major",val:-3,vars(r){switch(r||e.race.snowy||1){case .25:return[4,10];case .5:return[3,8];case 1:return[2,5];case 2:return[2,4];case 3:return[1,3]}}},ravenous:{name:t("trait_ravenous_name"),desc:t("trait_ravenous"),type:"major",val:-5,vars(r){switch(r||e.race.ravenous||1){case .25:return[30,2];case .5:return[25,2];case 1:return[20,3];case 2:return[15,4];case 3:return[10,4]}}},ghostly:{name:t("trait_ghostly_name"),desc:t("trait_ghostly"),type:"major",val:5,vars(r){switch(r||e.race.ghostly||1){case .25:return[20,1.2,5];case .5:return[25,1.25,10];case 1:return[50,1.5,15];case 2:return[60,1.6,20];case 3:return[65,1.7,22]}}},lawless:{name:t("trait_lawless_name"),desc:t("trait_lawless"),type:"major",val:3,vars(r){switch(r||e.race.lawless||1){case .25:return[30];case .5:return[50];case 1:return[90];case 2:return[95];case 3:return[98]}}},mistrustful:{name:t("trait_mistrustful_name"),desc:t("trait_mistrustful"),type:"major",val:-1,vars(r){switch(r||e.race.mistrustful||1){case .25:return[4];case .5:return[3];case 1:return[2];case 2:return[1];case 3:return[1]}}},humpback:{name:t("trait_humpback_name"),desc:t("trait_humpback"),type:"major",val:4,vars(r){switch(r||e.race.humpback||1){case .25:return[.2,8];case .5:return[.25,10];case 1:return[.5,20];case 2:return[.75,25];case 3:return[.8,30]}}},thalassophobia:{name:t("trait_thalassophobia_name"),desc:t("trait_thalassophobia"),type:"major",val:-4},fiery:{name:t("trait_fiery_name"),desc:t("trait_fiery"),type:"major",val:10,vars(r){switch(r||e.race.fiery||1){case .25:return[30,15];case .5:return[40,18];case 1:return[65,25];case 2:return[70,35];case 3:return[72,38]}}},terrifying:{name:t("trait_terrifying_name"),desc:t("trait_terrifying"),type:"major",val:6,vars(r){switch(r||e.race.terrifying||1){case .25:return[8,20];case .5:return[10,25];case 1:return[12,32];case 2:return[12,34];case 3:return[12,36]}}},slaver:{name:t("trait_slaver_name"),desc:t("trait_slaver"),type:"major",val:12,vars(r){switch(r||e.race.slaver||1){case .25:return[.1];case .5:return[.14];case 1:return[.28];case 2:return[.3];case 3:return[.32]}}},compact:{name:t("trait_compact_name"),desc:t("trait_compact"),type:"major",val:10,vars(r){switch(r||e.race.compact||1){case .25:return[.005,.003];case .5:return[.01,.005];case 1:return[.015,.0075];case 2:return[.018,.0085];case 3:return[.02,.009]}}},conniving:{name:t("trait_conniving_name"),desc:t("trait_conniving"),type:"major",val:4,vars(r){switch(r||e.race.conniving||1){case .25:return[2,8];case .5:return[3,10];case 1:return[5,15];case 2:return[8,20];case 3:return[10,24]}}},pathetic:{name:t("trait_pathetic_name"),desc:t("trait_pathetic"),type:"major",val:-5,vars(r){switch(r||e.race.pathetic||1){case .25:return[35];case .5:return[30];case 1:return[25];case 2:return[20];case 3:return[15]}}},spiritual:{name:t("trait_spiritual_name"),desc:t("trait_spiritual"),type:"major",val:4,vars(r){switch(r||e.race.spiritual||1){case .25:return[8];case .5:return[10];case 1:return[13];case 2:return[15];case 3:return[18]}}},truthful:{name:t("trait_truthful_name"),desc:t("trait_truthful"),type:"major",val:-7,vars(r){switch(r||e.race.truthful||1){case .25:return[75];case .5:return[65];case 1:return[50];case 2:return[30];case 3:return[20]}}},unified:{name:t("trait_unified_name"),desc:t("trait_unified"),type:"major",val:4,vars(r){switch(r||e.race.unified||1){case .25:return[0];case .5:return[1];case 1:return[3];case 2:return[5];case 3:return[7]}}},rainbow:{name:t("trait_rainbow_name"),desc:t("trait_rainbow"),type:"major",val:3,vars(r){switch(r||e.race.rainbow||1){case .25:return[20];case .5:return[30];case 1:return[50];case 2:return[80];case 3:return[100]}}},magnificent:{name:t("trait_magnificent_name"),desc:t("trait_magnificent"),type:"major",val:6,vars(r){switch(r||e.race.magnificent||1){case .25:return[300,1,.5,.75,1];case .5:return[350,2,.75,.8,1];case 1:return[400,3,1,1,1];case 2:return[450,3,1.5,1.5,1.5];case 3:return[500,3,2,2,2]}}},noble:{name:t("trait_noble_name"),desc:t("trait_noble"),type:"major",val:-3,vars(r){switch(r||e.race.noble||1){case .25:return[15,20];case .5:return[12,20];case 1:return[10,20];case 2:return[10,24];case 3:return[10,28]}}},imitation:{name:t("trait_imitation_name"),desc:t("trait_imitation"),type:"major",val:6,vars(r){switch(r||e.race.imitation||1){case .25:return[.25,.5];case .5:return[.25,1];case 1:return[.5,1];case 2:return[.5,2];case 3:return[1,2]}}},emotionless:{name:t("trait_emotionless_name"),desc:t("trait_emotionless"),type:"major",val:-4,vars(r){switch(r||e.race.emotionless||1){case .25:return[50,10];case .5:return[45,10];case 1:return[35,13];case 2:return[25,15];case 3:return[20,15]}}},logical:{name:t("trait_logical_name"),desc:t("trait_logical"),type:"major",val:6,vars(r){switch(r||e.race.logical||1){case .25:return[25,10];case .5:return[50,15];case 1:return[100,25];case 2:return[125,30];case 3:return[150,32]}}},shapeshifter:{name:t("trait_shapeshifter_name"),desc:t("trait_shapeshifter"),type:"major",val:10,vars(r){switch(r||e.race.shapeshifter||1){case .25:return[.25,.5];case .5:return[.25,1];case 1:return[.5,1];case 2:return[.5,2];case 3:return[1,2]}}},deconstructor:{name:t("trait_deconstructor_name"),desc:t("trait_deconstructor"),type:"major",val:-4,vars(r){switch(r||e.race.deconstructor||1){case .25:return[40];case .5:return[60];case 1:return[100];case 2:return[125];case 3:return[140]}}},linked:{name:t("trait_linked_name"),desc:t("trait_linked"),type:"major",val:4,vars(r){switch(r||e.race.linked||1){case .25:return[.03,40];case .5:return[.05,40];case 1:return[.1,80];case 2:return[.12,100];case 3:return[.14,100]}}},dark_dweller:{name:t("trait_dark_dweller_name"),desc:t("trait_dark_dweller"),type:"major",val:-3,vars(r){switch(r||e.race.dark_dweller||1){case .25:return[90];case .5:return[75];case 1:return[60];case 2:return[45];case 3:return[30]}}},swift:{name:t("trait_swift_name"),desc:t("trait_swift"),type:"major",val:10,vars(r){switch(r||e.race.swift||1){case .25:return[35,15];case .5:return[55,30];case 1:return[75,45];case 2:return[85,55];case 3:return[90,65]}}},anthropophagite:{name:t("trait_anthropophagite_name"),desc:t("trait_anthropophagite"),type:"major",val:-2,vars(r){switch(r||e.race.anthropophagite||1){case .25:return[.4];case .5:return[.65];case 1:return[1];case 2:return[1.5];case 3:return[2]}}},living_tool:{name:t("trait_living_tool_name"),desc:t("trait_living_tool"),type:"major",val:12,vars(r){switch(r||e.race.living_tool||1){case .25:return[.65,5];case .5:return[.8,12];case 1:return[1,25];case 2:return[1.1,35];case 3:return[1.2,42]}}},bloated:{name:t("trait_bloated_name"),desc:t("trait_bloated"),type:"major",val:-10,vars(r){switch(r||e.race.bloated||1){case .25:return[25];case .5:return[20];case 1:return[15];case 2:return[10];case 3:return[5]}}},ooze:{name:t("trait_ooze_name"),desc:t("trait_ooze"),type:"major",val:-50,vars(r){switch(r||e.race.ooze||1){case .25:return[20,25,40];case .5:return[15,20,35];case 1:return[12,15,30];case 2:return[10,12,25];case 3:return[8,10,20]}}},soul_eater:{name:t("trait_soul_eater_name"),desc:t("trait_soul_eater"),type:"special",val:0},untapped:{name:t("trait_untapped_name"),desc:t("trait_untapped"),type:"special",val:0},emfield:{name:t("trait_emfield_name"),desc:t("trait_emfield"),type:"special",val:-20},tactical:{name:t("trait_tactical_name"),desc:t("trait_tactical"),type:"minor",vars(r){return[5]}},analytical:{name:t("trait_analytical_name"),desc:t("trait_analytical"),type:"minor",vars(r){return[1]}},promiscuous:{name:t("trait_promiscuous_name"),desc:t("trait_promiscuous"),type:"minor",vars(r){return[1,.02]}},resilient:{name:t("trait_resilient_name"),desc:t("trait_resilient"),type:"minor",vars(r){return[2]}},cunning:{name:t("trait_cunning_name"),desc:t("trait_cunning"),type:"minor",vars(r){return[5]}},hardy:{name:t("trait_hardy_name"),desc:t("trait_hardy"),type:"minor",vars(r){return[1]}},ambidextrous:{name:t("trait_ambidextrous_name"),desc:t("trait_ambidextrous"),type:"minor",vars(r){return[3,2]}},industrious:{name:t("trait_industrious_name"),desc:t("trait_industrious"),type:"minor",vars(r){return[2]}},content:{name:t("trait_content_name"),desc:t("trait_content"),type:"minor"},fibroblast:{name:t("trait_fibroblast_name"),desc:t("trait_fibroblast"),type:"minor",vars(r){return[2]}},metallurgist:{name:t("trait_metallurgist_name"),desc:t("trait_metallurgist"),type:"minor",vars(r){return[4]}},gambler:{name:t("trait_gambler_name"),desc:t("trait_gambler"),type:"minor",vars(r){return[4]}},persuasive:{name:t("trait_persuasive_name"),desc:t("trait_persuasive"),type:"minor",vars(r){return[1]}},fortify:{name:t("trait_fortify_name"),desc:t("trait_fortify"),type:"special"},mastery:{name:t("trait_mastery_name"),desc:t("trait_mastery"),type:"special",vars(r){return[1]}}},F={protoplasm:{name:t("race_protoplasm"),desc:t("race_protoplasm_desc"),type:"organism",home:t("race_prehistoric"),entity:t("race_protoplasm_entity"),traits:{},solar:{red:t("race_human_solar_red"),hell:t("race_human_solar_hell"),gas:t("race_human_solar_gas"),gas_moon:t("race_human_solar_gas_moon"),dwarf:t("race_human_solar_dwarf")},fanaticism:"none",basic(){return!1}},human:{name:t("race_human"),desc:t("race_human_desc"),type:"humanoid",home:t("race_human_home"),entity:t("race_human_entity"),traits:{creative:1,diverse:1},solar:{red:t("race_human_solar_red"),hell:t("race_human_solar_hell"),gas:t("race_human_solar_gas"),gas_moon:t("race_human_solar_gas_moon"),dwarf:t("race_human_solar_dwarf")},fanaticism:"creative",basic(){return!0}},elven:{name:t("race_elven"),desc:t(me("elven")?"race_xmas_elf_desc":"race_elven_desc"),type:"humanoid",home:t(me("elven")?"race_xmas_elf_home":"race_elven_home"),entity:me("elven")?t("race_xmas_elf_entity"):t("race_elven_entity"),traits:{studious:1,arrogant:1},solar:{red:t(me("elven")?"race_xmas_elf_solar_red":"race_elven_solar_red"),hell:t(me("elven")?"race_xmas_elf_solar_hell":"race_elven_solar_hell"),gas:t(me("elven")?"race_xmas_elf_solar_gas":"race_elven_solar_gas"),gas_moon:t(me("elven")?"race_xmas_elf_solar_gas_moon":"race_elven_solar_gas_moon"),dwarf:t(me("elven")?"race_xmas_elf_solar_dwarf":"race_elven_solar_dwarf")},fanaticism:"studious",basic(){return!0}},orc:{name:t("race_orc"),desc:t("race_orc_desc"),type:"humanoid",home:t("race_orc_home"),entity:t("race_orc_entity"),traits:{brute:1,angry:1},solar:{red:t("race_orc_solar_red"),hell:t("race_orc_solar_hell"),gas:t("race_orc_solar_gas"),gas_moon:t("race_orc_solar_gas_moon"),dwarf:t("race_orc_solar_dwarf")},fanaticism:"brute",basic(){return!0}},cath:{name:t("race_cath"),desc:t("race_cath_desc"),type:"carnivore",home:t("race_cath_home"),entity:t("race_cath_entity"),traits:{lazy:1,curious:1},solar:{red:t("race_cath_solar_red"),hell:t("race_cath_solar_hell"),gas:t("race_cath_solar_gas"),gas_moon:t("race_cath_solar_gas_moon"),dwarf:t("race_cath_solar_dwarf")},fanaticism:"curious",basic(){return!0}},wolven:{name:me("wolven")?t("race_rabbit"):t("race_wolven"),desc:me("wolven")?t("race_rabbit_desc"):t("race_wolven_desc"),type:"carnivore",home:me("wolven")?t("race_rabbit_home"):t("race_wolven_home"),entity:me("wolven")?t("race_rabbit_entity"):t("race_wolven_entity"),traits:{pack_mentality:1,tracker:1},solar:{red:me("wolven")?t("race_rabbit_solar_red"):t("race_wolven_solar_red"),hell:me("wolven")?t("race_rabbit_solar_hell"):t("race_wolven_solar_hell"),gas:me("wolven")?t("race_rabbit_solar_gas"):t("race_wolven_solar_gas"),gas_moon:me("wolven")?t("race_rabbit_solar_gas_moon"):t("race_wolven_solar_gas_moon"),dwarf:me("wolven")?t("race_rabbit_solar_dwarf"):t("race_wolven_solar_dwarf")},fanaticism:"tracker",basic(){return!0}},vulpine:{name:me("vulpine")?t("race_chocolate_rabbit"):t(e.race.universe==="magic"?"race_kitsune":"race_vulpine"),desc(){return me("vulpine")?t("race_chocolate_rabbit_desc"):t("race_vulpine_desc",[t(e.race.universe==="magic"?"race_kitsune":"race_vulpine"),x0()])},type:"carnivore",home:me("vulpine")?t("race_chocolate_rabbit_home"):t("race_vulpine_home"),entity:me("vulpine")?t("race_chocolate_rabbit_entity"):t("race_vulpine_entity"),traits:{playful:1,freespirit:1},solar:{red:me("vulpine")?t("race_chocolate_rabbit_solar_red"):t("race_vulpine_solar_red"),hell:me("vulpine")?t("race_chocolate_rabbit_solar_hell"):t("race_vulpine_solar_hell"),gas:me("vulpine")?t("race_chocolate_rabbit_solar_gas"):t("race_vulpine_solar_gas"),gas_moon:me("vulpine")?t("race_chocolate_rabbit_solar_gas_moon"):t("race_vulpine_solar_gas_moon"),dwarf:me("vulpine")?t("race_chocolate_rabbit_solar_dwarf"):t("race_vulpine_solar_dwarf")},fanaticism:"playful",basic(){return!0}},centaur:{name:t(me("centaur")?"race_reindeer":"race_centaur"),desc:t(me("centaur")?"race_reindeer_desc":"race_centaur_desc"),type:"herbivore",home:t(me("centaur")?"race_reindeer_home":"race_centaur_home"),entity:t(me("centaur")?"race_reindeer_entity":"race_centaur_entity"),traits:{sniper:1,hooved:1},solar:{red:t(me("centaur")?"race_reindeer_solar_red":"race_centaur_solar_red"),hell:t(me("centaur")?"race_reindeer_solar_hell":"race_centaur_solar_hell"),gas:t(me("centaur")?"race_reindeer_solar_gas":"race_centaur_solar_gas"),gas_moon:t(me("centaur")?"race_reindeer_solar_gas_moon":"race_centaur_solar_gas_moon"),dwarf:t(me("centaur")?"race_reindeer_solar_dwarf":"race_centaur_solar_dwarf")},fanaticism:"sniper",basic(){return!0}},rhinotaur:{name:t("race_rhinotaur"),desc:t("race_rhinotaur_desc"),type:"herbivore",home:t("race_rhinotaur_home"),entity:t("race_rhinotaur_entity"),traits:{rage:1,heavy:1},solar:{red:t("race_rhinotaur_solar_red"),hell:t("race_rhinotaur_solar_hell"),gas:t("race_rhinotaur_solar_gas"),gas_moon:t("race_rhinotaur_solar_gas_moon"),dwarf:t("race_rhinotaur_solar_dwarf")},fanaticism:"rage",basic(){return!0}},capybara:{name:t(me("capybara")?"race_donkey":"race_capybara"),desc:t(me("capybara")?"race_donkey_desc":"race_capybara_desc"),type:"herbivore",home:t(me("capybara")?"race_donkey_home":"race_capybara_home"),entity:t(me("capybara")?"race_donkey_entity":"race_capybara_entity"),traits:{gnawer:1,calm:1},solar:{red:t(me("capybara")?"race_donkey_solar_red":"race_capybara_solar_red"),hell:t(me("capybara")?"race_donkey_solar_hell":"race_capybara_solar_hell"),gas:t(me("capybara")?"race_donkey_solar_gas":"race_capybara_solar_gas"),gas_moon:t(me("capybara")?"race_donkey_solar_gas_moon":"race_capybara_solar_gas_moon"),dwarf:t(me("capybara")?"race_donkey_solar_dwarf":"race_capybara_solar_dwarf")},fanaticism:"calm",basic(){return!0}},kobold:{name:t("race_kobold"),desc:t("race_kobold_desc"),type:"small",home:t("race_kobold_home"),entity:t("race_kobold_entity"),traits:{pack_rat:1,paranoid:1},solar:{red:t("race_kobold_solar_red"),hell:t("race_kobold_solar_hell"),gas:t("race_kobold_solar_gas"),gas_moon:t("race_kobold_solar_gas_moon"),dwarf:t("race_kobold_solar_dwarf")},fanaticism:"pack_rat",basic(){return!0}},goblin:{name:t("race_goblin"),desc:t("race_goblin_desc"),type:"small",home:t("race_goblin_home"),entity:t("race_goblin_entity"),traits:{greedy:1,merchant:1},solar:{red:t("race_goblin_solar_red"),hell:t("race_goblin_solar_hell"),gas:t("race_goblin_solar_gas"),gas_moon:t("race_goblin_solar_gas_moon"),dwarf:t("race_goblin_solar_dwarf")},fanaticism:"merchant",basic(){return!0}},gnome:{name:t("race_gnome"),desc:t("race_gnome_desc"),type:"small",home:t("race_gnome_home"),entity:t("race_gnome_entity"),traits:{smart:1,puny:1},solar:{red:t("race_gnome_solar_red"),hell:t("race_gnome_solar_hell"),gas:t("race_gnome_solar_gas"),gas_moon:t("race_gnome_solar_gas_moon"),dwarf:t("race_gnome_solar_dwarf")},fanaticism:"smart",basic(){return!0}},ogre:{name:t("race_ogre"),desc:t("race_ogre_desc"),type:"giant",home:t("race_ogre_home"),entity:t("race_ogre_entity"),traits:{dumb:1,tough:1},solar:{red:t("race_ogre_solar_red"),hell:t("race_ogre_solar_hell"),gas:t("race_ogre_solar_gas"),gas_moon:t("race_ogre_solar_gas_moon"),dwarf:t("race_ogre_solar_dwarf")},fanaticism:"tough",basic(){return!0}},cyclops:{name:t("race_cyclops"),desc:t("race_cyclops_desc"),type:"giant",home:t("race_cyclops_home"),entity:t("race_cyclops_entity"),traits:{nearsighted:1,intelligent:1},solar:{red:t("race_cyclops_solar_red"),hell:t("race_cyclops_solar_hell"),gas:t("race_cyclops_solar_gas"),gas_moon:t("race_cyclops_solar_gas_moon"),dwarf:t("race_cyclops_solar_dwarf")},fanaticism:"intelligent",basic(){return!0}},troll:{name:t("race_troll"),desc:t("race_troll_desc"),type:"giant",home:t("race_troll_home"),entity:t("race_troll_entity"),traits:{regenerative:1,gluttony:1},solar:{red:t("race_troll_solar_red"),hell:t("race_troll_solar_hell"),gas:t("race_troll_solar_gas"),gas_moon:t("race_troll_solar_gas_moon"),dwarf:t("race_troll_solar_dwarf")},fanaticism:"regenerative",basic(){return!0}},tortoisan:{name:t("race_tortoisan"),desc(){return t("race_tortoisan_desc",[$0()])},type:"reptilian",home:t("race_tortoisan_home"),entity:t("race_tortoisan_entity"),traits:{slow:1,armored:1},solar:{red:t("race_tortoisan_solar_red"),hell:t("race_tortoisan_solar_hell"),gas:t("race_tortoisan_solar_gas"),gas_moon:t("race_tortoisan_solar_gas_moon"),dwarf:t("race_tortoisan_solar_dwarf")},fanaticism:"armored",basic(){return!0}},gecko:{name:t("race_gecko"),desc:t("race_gecko_desc"),type:"reptilian",home:t("race_gecko_home"),entity:t("race_gecko_entity"),traits:{optimistic:1,chameleon:1},solar:{red:t("race_gecko_solar_red"),hell:t("race_gecko_solar_hell"),gas:t("race_gecko_solar_gas"),gas_moon:t("race_gecko_solar_gas_moon"),dwarf:t("race_gecko_solar_dwarf")},fanaticism:"optimistic",basic(){return!0}},slitheryn:{name:t("race_slitheryn"),desc:t("race_slitheryn_desc"),type:"reptilian",home:t("race_slitheryn_home"),entity:t("race_slitheryn_entity"),traits:{slow_digestion:1,hard_of_hearing:1},solar:{red:t("race_slitheryn_solar_red"),hell:t("race_slitheryn_solar_hell"),gas:t("race_slitheryn_solar_gas"),gas_moon:t("race_slitheryn_solar_gas_moon"),dwarf:t("race_slitheryn_solar_dwarf")},fanaticism:"slow_digestion",basic(){return!0}},arraak:{name:t(me("arraak")?"race_turkey":"race_arraak"),desc:t(me("arraak")?"race_turkey_desc":"race_arraak_desc"),type:"avian",home:t(me("arraak")?"race_turkey_home":"race_arraak_home"),entity:me("arraak")?t("race_turkey_entity"):t("race_arraak_entity"),traits:{resourceful:1,selenophobia:1},solar:{red:t(me("arraak")?"race_turkey_solar_red":"race_arraak_solar_red"),hell:t(me("arraak")?"race_turkey_solar_hell":"race_arraak_solar_hell"),gas:t(me("arraak")?"race_turkey_solar_gas":"race_arraak_solar_gas"),gas_moon:t(me("arraak")?"race_turkey_solar_gas_moon":"race_arraak_solar_gas_moon"),dwarf:t(me("arraak")?"race_turkey_solar_dwarf":"race_arraak_solar_dwarf")},fanaticism:"resourceful",basic(){return!0}},pterodacti:{name:t("race_pterodacti"),desc:t("race_pterodacti_desc"),type:"avian",home:t("race_pterodacti_home"),entity:t("race_pterodacti_entity"),traits:{leathery:1,pessimistic:1},solar:{red:t("race_pterodacti_solar_red"),hell:t("race_pterodacti_solar_hell"),gas:t("race_pterodacti_solar_gas"),gas_moon:t("race_pterodacti_solar_gas_moon"),dwarf:t("race_pterodacti_solar_dwarf")},fanaticism:"leathery",basic(){return!0}},dracnid:{name:t("race_dracnid"),desc:t("race_dracnid_desc"),type:"avian",home:t("race_dracnid_home"),entity:t("race_dracnid_entity"),traits:{hoarder:1,solitary:1},solar:{red:t("race_dracnid_solar_red"),hell:t("race_dracnid_solar_hell"),gas:t("race_dracnid_solar_gas"),gas_moon:t("race_dracnid_solar_gas_moon"),dwarf:t("race_dracnid_solar_dwarf")},fanaticism:"hoarder",basic(){return!0}},entish:{name:t(me("entish")?"race_spruce":"race_entish"),desc:t(me("entish")?"race_spruce_desc":"race_entish_desc"),type:"plant",home:t(me("entish")?"race_spruce_home":"race_entish_home"),entity:t(me("entish")?"race_spruce_entity":"race_entish_entity"),traits:{kindling_kindred:1,pyrophobia:1},solar:{red:t(me("entish")?"race_spruce_solar_red":"race_entish_solar_red"),hell:t(me("entish")?"race_spruce_solar_hell":"race_entish_solar_hell"),gas:t(me("entish")?"race_spruce_solar_gas":"race_entish_solar_gas"),gas_moon:t(me("entish")?"race_spruce_solar_gas_moon":"race_entish_solar_gas_moon"),dwarf:t(me("entish")?"race_spruce_solar_dwarf":"race_entish_solar_dwarf")},fanaticism:"kindling_kindred",basic(){return!0}},cacti:{name:t("race_cacti"),desc:t("race_cacti_desc"),type:"plant",home:t("race_cacti_home"),entity:t("race_cacti_entity"),traits:{hyper:1,skittish:1},solar:{red:t("race_cacti_solar_red"),hell:t("race_cacti_solar_hell"),gas:t("race_cacti_solar_gas"),gas_moon:t("race_cacti_solar_gas_moon"),dwarf:t("race_cacti_solar_dwarf")},fanaticism:"hyper",basic(){return!0}},pinguicula:{name:t("race_pinguicula"),desc:t("race_pinguicula_desc"),type:"plant",home:t("race_pinguicula_home"),entity:t("race_pinguicula_entity"),traits:{fragrant:1,sticky:1},solar:{red:t("race_pinguicula_solar_red"),hell:t("race_pinguicula_solar_hell"),gas:t("race_pinguicula_solar_gas"),gas_moon:t("race_pinguicula_solar_gas_moon"),dwarf:t("race_pinguicula_solar_dwarf")},fanaticism:"sticky",basic(){return!0}},sporgar:{name:t("race_sporgar"),desc:t("race_sporgar_desc"),type:"fungi",home:t("race_sporgar_home"),entity:t("race_sporgar_entity"),traits:{infectious:1,parasite:1},solar:{red:t("race_sporgar_solar_red"),hell:t("race_sporgar_solar_hell"),gas:t("race_sporgar_solar_gas"),gas_moon:t("race_sporgar_solar_gas_moon"),dwarf:t("race_sporgar_solar_dwarf")},fanaticism:"infectious",basic(){return!1}},shroomi:{name:t("race_shroomi"),desc:t("race_shroomi_desc"),type:"fungi",home:t("race_shroomi_home"),entity:t("race_shroomi_entity"),traits:{toxic:1,nyctophilia:1},solar:{red:t("race_shroomi_solar_red"),hell:t("race_shroomi_solar_hell"),gas:t("race_shroomi_solar_gas"),gas_moon:t("race_shroomi_solar_gas_moon"),dwarf:t("race_shroomi_solar_dwarf")},fanaticism:"toxic",basic(){return!0}},moldling:{name:t("race_moldling"),desc:t("race_moldling_desc"),type:"fungi",home:t("race_moldling_home"),entity:t("race_moldling_entity"),traits:{infiltrator:1,hibernator:1},solar:{red:t("race_moldling_solar_red"),hell:t("race_moldling_solar_hell"),gas:t("race_moldling_solar_gas"),gas_moon:t("race_moldling_solar_gas_moon"),dwarf:t("race_moldling_solar_dwarf")},fanaticism:"infiltrator",basic(){return!0}},mantis:{name:t("race_mantis"),desc:t("race_mantis_desc"),type:"insectoid",home:t("race_mantis_home"),entity:t("race_mantis_entity"),traits:{cannibalize:1,malnutrition:1},solar:{red:t("race_mantis_solar_red"),hell:t("race_mantis_solar_hell"),gas:t("race_mantis_solar_gas"),gas_moon:t("race_mantis_solar_gas_moon"),dwarf:t("race_mantis_solar_dwarf")},fanaticism:"cannibalize",basic(){return!0}},scorpid:{name:t("race_scorpid"),desc:t("race_scorpid_desc"),type:"insectoid",home:t("race_scorpid_home"),entity:t("race_scorpid_entity"),traits:{claws:1,atrophy:1},solar:{red:t("race_scorpid_solar_red"),hell:t("race_scorpid_solar_hell"),gas:t("race_scorpid_solar_gas"),gas_moon:t("race_scorpid_solar_gas_moon"),dwarf:t("race_scorpid_solar_dwarf")},fanaticism:"claws",basic(){return!0}},antid:{name:t("race_antid"),desc:t("race_antid_desc"),type:"insectoid",home:t("race_antid_home"),entity:t("race_antid_entity"),traits:{hivemind:1,tunneler:1},solar:{red:t("race_antid_solar_red"),hell:t("race_antid_solar_hell"),gas:t("race_antid_solar_gas"),gas_moon:t("race_antid_solar_gas_moon"),dwarf:t("race_antid_solar_dwarf")},fanaticism:"hivemind",basic(){return!0}},sharkin:{name:t("race_sharkin"),desc:t("race_sharkin_desc"),type:"aquatic",home:t("race_sharkin_home"),entity:t("race_sharkin_entity"),traits:{blood_thirst:1,apex_predator:1},solar:{red:t("race_sharkin_solar_red"),hell:t("race_sharkin_solar_hell"),gas:t("race_sharkin_solar_gas"),gas_moon:t("race_sharkin_solar_gas_moon"),dwarf:t("race_sharkin_solar_dwarf")},fanaticism:"blood_thirst",basic(){return!!["oceanic","swamp"].includes(e.city.biome)}},octigoran:{name:t("race_octigoran"),desc:t("race_octigoran_desc"),type:"aquatic",home:t("race_octigoran_home"),entity:t("race_octigoran_entity"),traits:{invertebrate:1,suction_grip:1},solar:{red:t("race_octigoran_solar_red"),hell:t("race_octigoran_solar_hell"),gas:t("race_octigoran_solar_gas"),gas_moon:t("race_octigoran_solar_gas_moon"),dwarf:t("race_octigoran_solar_dwarf")},fanaticism:"suction_grip",basic(){return!!["oceanic","swamp"].includes(e.city.biome)}},dryad:{name:t("race_dryad"),desc:t("race_dryad_desc"),type:"fey",home:t("race_dryad_home"),entity:t("race_dryad_entity"),traits:{befuddle:1,environmentalist:1,kindling_kindred:1},solar:{red:t("race_dryad_solar_red"),hell:t("race_dryad_solar_hell"),gas:t("race_dryad_solar_gas"),gas_moon:t("race_dryad_solar_gas_moon"),dwarf:t("race_dryad_solar_dwarf")},fanaticism:"befuddle",basic(){return!!["forest","swamp","taiga"].includes(e.city.biome)}},satyr:{name:t("race_satyr"),desc:t("race_satyr_desc"),type:"fey",home:t("race_satyr_home"),entity:t("race_satyr_entity"),traits:{unorganized:1,musical:1},solar:{red:t("race_satyr_solar_red"),hell:t("race_satyr_solar_hell"),gas:t("race_satyr_solar_gas"),gas_moon:t("race_satyr_solar_gas_moon"),dwarf:t("race_satyr_solar_dwarf")},fanaticism:"musical",basic(){return!!["forest","swamp","taiga"].includes(e.city.biome)}},phoenix:{name:t("race_phoenix"),desc:t("race_phoenix_desc"),type:"heat",home:t("race_phoenix_home"),entity:t("race_phoenix_entity"),traits:{revive:1,slow_regen:1},solar:{red:t("race_phoenix_solar_red"),hell:t("race_phoenix_solar_hell"),gas:t("race_phoenix_solar_gas"),gas_moon:t("race_phoenix_solar_gas_moon"),dwarf:t("race_phoenix_solar_dwarf")},fanaticism:"revive",basic(){return!!["volcanic","ashland"].includes(e.city.biome)}},salamander:{name:t("race_salamander"),desc:t("race_salamander_desc"),type:"heat",home:t("race_salamander_home"),entity:t("race_salamander_entity"),traits:{forge:1,autoignition:1},solar:{red:t("race_salamander_solar_red"),hell:t("race_salamander_solar_hell"),gas:t("race_salamander_solar_gas"),gas_moon:t("race_salamander_solar_gas_moon"),dwarf:t("race_salamander_solar_dwarf")},fanaticism:"forge",basic(){return!!["volcanic","ashland"].includes(e.city.biome)}},yeti:{name:t(me("yeti")?"race_snowman":"race_yeti"),desc:t(me("yeti")?"race_snowman_desc":"race_yeti_desc"),type:"polar",home:t(me("yeti")?"race_snowman_home":"race_yeti_home"),entity:t(me("yeti")?"race_snowman_entity":"race_yeti_entity"),traits:{blurry:1,snowy:1},solar:{red:t(me("yeti")?"race_snowman_solar_red":"race_yeti_solar_red"),hell:t(me("yeti")?"race_snowman_solar_hell":"race_yeti_solar_hell"),gas:t(me("yeti")?"race_snowman_solar_gas":"race_yeti_solar_gas"),gas_moon:t(me("yeti")?"race_snowman_solar_gas_moon":"race_yeti_solar_gas_moon"),dwarf:t(me("yeti")?"race_snowman_solar_dwarf":"race_yeti_solar_dwarf")},fanaticism:"blurry",basic(){return!!["tundra","taiga"].includes(e.city.biome)}},wendigo:{name:t(me("wendigo")?"race_krampus":"race_wendigo"),desc:t(me("wendigo")?"race_krampus_desc":"race_wendigo_desc"),type:"polar",home:t(me("wendigo")?"race_krampus_home":"race_wendigo_home"),entity:t(me("wendigo")?"race_krampus_entity":"race_wendigo_entity"),traits:{ravenous:1,ghostly:1,soul_eater:1},solar:{red:t(me("wendigo")?"race_krampus_solar_red":"race_wendigo_solar_red"),hell:t(me("wendigo")?"race_krampus_solar_hell":"race_wendigo_solar_hell"),gas:t(me("wendigo")?"race_krampus_solar_gas":"race_wendigo_solar_gas"),gas_moon:t(me("wendigo")?"race_krampus_solar_gas_moon":"race_wendigo_solar_gas_moon"),dwarf:t(me("wendigo")?"race_krampus_solar_dwarf":"race_wendigo_solar_dwarf")},fanaticism:"ghostly",basic(){return!!["tundra","taiga"].includes(e.city.biome)}},tuskin:{name:t("race_tuskin"),desc:t("race_tuskin_desc"),type:"sand",home:t("race_tuskin_home"),entity:t("race_tuskin_entity"),traits:{lawless:1,mistrustful:1},solar:{red:t("race_tuskin_solar_red"),hell:t("race_tuskin_solar_hell"),gas:t("race_tuskin_solar_gas"),gas_moon:t("race_tuskin_solar_gas_moon"),dwarf:t("race_tuskin_solar_dwarf")},fanaticism:"lawless",basic(){return!!["desert","ashland"].includes(e.city.biome)}},kamel:{name:t("race_kamel"),desc:t("race_kamel_desc"),type:"sand",home:t("race_kamel_home"),entity:t("race_kamel_entity"),traits:{humpback:1,thalassophobia:1},solar:{red:t("race_kamel_solar_red"),hell:t("race_kamel_solar_hell"),gas:t("race_kamel_solar_gas"),gas_moon:t("race_kamel_solar_gas_moon"),dwarf:t("race_kamel_solar_dwarf")},fanaticism:"humpback",basic(){return!!["desert","ashland"].includes(e.city.biome)}},balorg:{name:t("race_balorg"),desc:t("race_balorg_desc"),type:"demonic",home:t("race_balorg_home"),entity:t("race_balorg_entity"),traits:{fiery:1,terrifying:1,slaver:1},solar:{red:t("race_balorg_solar_red"),hell:t("race_balorg_solar_hell"),gas:t("race_balorg_solar_gas"),gas_moon:t("race_balorg_solar_gas_moon"),dwarf:t("race_balorg_solar_dwarf")},fanaticism:"fiery",basic(){return e.city.biome==="hellscape"}},imp:{name:t("race_imp"),desc:t("race_imp_desc"),type:"demonic",home:t("race_imp_home"),entity:t("race_imp_entity"),traits:{compact:1,conniving:1,pathetic:1},solar:{red:t("race_imp_solar_red"),hell:t("race_imp_solar_hell"),gas:t("race_imp_solar_gas"),gas_moon:t("race_imp_solar_gas_moon"),dwarf:t("race_imp_solar_dwarf")},fanaticism:"conniving",basic(){return e.city.biome==="hellscape"}},seraph:{name:t(me("seraph")?"race_cherub":"race_seraph"),desc:t(me("seraph")?"race_cherub_desc":"race_seraph_desc"),type:"angelic",home:t(me("seraph")?"race_cherub_home":"race_seraph_home"),entity:t(me("seraph")?"race_cherub_entity":"race_seraph_entity"),traits:{unified:1,spiritual:1,truthful:1},solar:{red:t(me("seraph")?"race_cherub_solar_red":"race_seraph_solar_red"),hell:t(me("seraph")?"race_cherub_solar_hell":"race_seraph_solar_hell"),gas:t(me("seraph")?"race_cherub_solar_gas":"race_seraph_solar_gas"),gas_moon:t(me("seraph")?"race_cherub_solar_gas_moon":"race_seraph_solar_gas_moon"),dwarf:t(me("seraph")?"race_cherub_solar_dwarf":"race_seraph_solar_dwarf")},fanaticism:"spiritual",basic(){return e.city.biome==="eden"}},unicorn:{name:t("race_unicorn"),desc:t("race_unicorn_desc"),type:"angelic",home:t("race_unicorn_home"),entity:t("race_unicorn_entity"),traits:{rainbow:1,magnificent:1,noble:1},solar:{red:t("race_unicorn_solar_red"),hell:t("race_unicorn_solar_hell"),gas:t("race_unicorn_solar_gas"),gas_moon:t("race_unicorn_solar_gas_moon"),dwarf:t("race_unicorn_solar_dwarf")},fanaticism:"magnificent",basic(){return e.city.biome==="eden"}},synth:{name:t("race_synth"),desc(){let r=e.race.hasOwnProperty("srace")?e.race.srace:"human";return t("race_synth_desc",[F[r].name])},type:"synthetic",home:t("race_synth_home"),entity:t("race_synth_entity"),traits:{imitation:1,emotionless:1,logical:1},solar:{red:t("race_synth_solar_red"),hell:t("race_synth_solar_hell"),gas:t("race_synth_solar_gas"),gas_moon:t("race_synth_solar_gas_moon"),dwarf:t("race_synth_solar_dwarf")},fanaticism:"logical",basic(){return!1}},nano:{name:t("race_nano"),desc:t("race_nano_desc"),type:"synthetic",home:t("race_nano_home"),entity:t("race_nano_entity"),traits:{deconstructor:1,linked:1,shapeshifter:1},solar:{red:t("race_nano_solar_red"),hell:t("race_nano_solar_hell"),gas:t("race_nano_solar_gas"),gas_moon:t("race_nano_solar_gas_moon"),dwarf:t("race_nano_solar_dwarf")},fanaticism:"shapeshifter",basic(){return!1}},ghast:{name:t("race_ghast"),desc:t("race_ghast_desc"),type:"eldritch",home:t("race_ghast_home"),entity:t("race_ghast_entity"),traits:{dark_dweller:1,swift:1,anthropophagite:1},solar:{red:t("race_ghast_solar_red"),hell:t("race_ghast_solar_hell"),gas:t("race_ghast_solar_gas"),gas_moon:t("race_ghast_solar_gas_moon"),dwarf:t("race_ghast_solar_dwarf")},fanaticism:"swift",basic(){return!1}},shoggoth:{name:t("race_shoggoth"),desc:t("race_shoggoth_desc"),type:"eldritch",home:t("race_shoggoth_home"),entity:t("race_shoggoth_entity"),traits:{living_tool:1,bloated:1},solar:{red:t("race_shoggoth_solar_red"),hell:t("race_shoggoth_solar_hell"),gas:t("race_shoggoth_solar_gas"),gas_moon:t("race_shoggoth_solar_gas_moon"),dwarf:t("race_shoggoth_solar_dwarf")},fanaticism:"living_tool",basic(){return!1}},junker:{name:me("junker")?t("race_ghoul"):t("race_junker"),desc:me("junker")?t("race_ghoul_desc"):t("race_junker_desc"),type:function(){return e.race.hasOwnProperty("jtype")?e.race.jtype:"humanoid"}(),home:me("junker")?t("race_ghoul_home"):t("race_junker_home"),entity:me("junker")?t("race_ghoul_entity"):t("race_junker_entity"),traits:{diverse:1,arrogant:1,angry:1,lazy:1,paranoid:1,greedy:1,puny:1,dumb:1,nearsighted:1,gluttony:1,slow:1,hard_of_hearing:1,pessimistic:1,solitary:1,pyrophobia:1,skittish:1,nyctophilia:1,frail:1,atrophy:1,invertebrate:1,pathetic:1,hibernator:1,freespirit:1,heavy:1,gnawer:1,hooved:1},solar:{red:me("junker")?t("race_ghoul_solar_red"):t("race_junker_solar_red"),hell:me("junker")?t("race_ghoul_solar_hell"):t("race_junker_solar_hell"),gas:me("junker")?t("race_ghoul_solar_gas"):t("race_junker_solar_gas"),gas_moon:me("junker")?t("race_ghoul_solar_gas_moon"):t("race_junker_solar_gas_moon"),dwarf:me("junker")?t("race_ghoul_solar_dwarf"):t("race_junker_solar_dwarf")},fanaticism:"none",basic(){return!1}},sludge:{name:t("race_sludge"),desc:t("race_sludge_desc"),type:function(){return e.race.hasOwnProperty("jtype")?e.race.jtype:"humanoid"}(),home:t("race_sludge_home"),entity:t("race_sludge_entity"),traits:{ooze:.25,diverse:.25,arrogant:.25,angry:.25,lazy:.25,hooved:.25,freespirit:.25,heavy:.25,gnawer:.25,paranoid:.25,greedy:.25,puny:.25,dumb:.25,nearsighted:.25,gluttony:.25,slow:.25,hard_of_hearing:.25,selenophobia:.25,pessimistic:.25,solitary:.25,pyrophobia:.25,skittish:.25,fragrant:.25,nyctophilia:.25,hibernator:.25,frail:.25,atrophy:.25,invertebrate:.25,unorganized:.25,slow_regen:.25,autoignition:.25,snowy:.25,mistrustful:.25,thalassophobia:.25,pathetic:.25,truthful:.25},solar:{red:t("race_sludge_solar_red"),hell:t("race_sludge_solar_hell"),gas:t("race_sludge_solar_gas"),gas_moon:t("race_sludge_solar_gas_moon"),dwarf:t("race_sludge_solar_dwarf")},fanaticism:"ooze",basic(){return!1}},custom:w0()},Mi={organism:{},humanoid:{},carnivore:{},herbivore:{},omnivore:{},small:{},giant:{},reptilian:{},avian:{},insectoid:{},plant:{},fungi:{},aquatic:{},fey:{},heat:{},polar:{},sand:{},demonic:{},angelic:{},synthetic:{},eldritch:{}};Object.keys(Mi).forEach(function(r){let a=r==="organism"?"humanoid":r;Mi[r].solar={titan:t(`genus_${a}_solar_titan`),enceladus:t(`genus_${a}_solar_enceladus`),triton:t(`genus_${a}_solar_triton`),eris:t(`genus_${a}_solar_eris`)}});function wl(){F.junker.type=e.race.hasOwnProperty("jtype")?e.race.jtype:"humanoid",F.sludge.type=e.race.hasOwnProperty("jtype")?e.race.jtype:"humanoid"}function w0(){if(e.hasOwnProperty("custom")&&e.custom.hasOwnProperty("race0")){let r={};for(let i=0;ib[a].val&&(a=e.custom.race0.traits[i]);return{name:e.custom.race0.name,desc:e.custom.race0.desc,type:e.custom.race0.genus,home:e.custom.race0.home,entity:e.custom.race0.entity,traits:r,solar:{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},fanaticism:a,basic(){return!1}}}else return{}}function $t(r,a){let i=1,s=ge("theorist",1);s&&(a==="factory"||a==="miner"||a==="lumberjack")&&(i*=1-s/100);let n=ge("inspirational",0);n&&(a==="farmer"||a==="factory"||a==="miner"||a==="lumberjack")&&(i*=1+n/100);let c=ge("dirty_jobs",2);if(c&&a==="miner"&&(i*=1+c/100),e.race.rejuvenated&&["lumberjack","miner","factory"].includes(a)&&(i*=1.1),a==="lumberjack"&&e.race.evil&&!e.race.soul_eater&&(e.race.living_tool?i*=1+b.living_tool.vars()[0]*(e.tech.science&&e.tech.science>0?e.tech.science*.3:0):i*=1+(e.tech.reclaimer-1)*.4),e.race.powered&&(a==="factory"||a==="miner"||a==="lumberjack")&&(i*=1+b.powered.vars()[1]/100),e.race.artifical&&a==="science"&&(i*=1+b.artifical.vars()[0]/100),e.race.hivemind&&a!=="farmer"&&!e.race.lone_survivor){let _=b.hivemind.vars()[0],m=.05;if(e.race.high_pop&&a!=="army"&&a!=="hellArmy"&&(_*=b.high_pop.vars()[0],m=.5/(b.hivemind.vars()[0]*b.high_pop.vars()[0])),r<=_){let w=1-_*m;i*=r*m+w}else{let w=a==="army"||a==="hellArmy"?.99:e.race.high_pop?.985:.98;i*=1+(1-w**(r-_))}}let l=ve("antid");if(l>0){let _=a==="army"||a==="hellArmy"?.99:e.race.high_pop?.985:.98;i*=1+(1-_**(r*l/4))/2}if(e.race.cold_blooded&&a!=="army"&&a!=="hellArmy"&&a!=="factory"&&a!=="science"){switch(e.city.calendar.temp){case 0:i*=1-b.cold_blooded.vars()[0]/100;break;case 2:i*=1+b.cold_blooded.vars()[1]/100;break;default:i*=1;break}switch(e.city.calendar.weather){case 0:i*=1-b.cold_blooded.vars()[0]/100;break;case 2:i*=1+b.cold_blooded.vars()[1]/100;break;default:i*=1;break}}e.race.cannibalize&&e.city.s_alter&&e.city.s_alter.count>0&&(a==="miner"&&e.city.s_alter.mine>0&&(i*=1+b.cannibalize.vars()[0]/100),a==="lumberjack"&&e.city.s_alter.harvest>0&&(i*=1+b.cannibalize.vars()[0]/100),(a==="army"||a==="hellArmy")&&e.city.s_alter.rage>0&&(i*=1+b.cannibalize.vars()[0]/100),a==="science"&&e.city.s_alter.mind>0&&(i*=1+b.cannibalize.vars()[0]/100));let o=ve("mantis");o>0&&(a==="miner"&&(i*=1+b.cannibalize.vars(1)[0]/100*o),a==="lumberjack"&&(i*=1+b.cannibalize.vars(1)[0]/100*o),(a==="army"||a==="hellArmy")&&(i*=1+b.cannibalize.vars(1)[0]/100*o),a==="science"&&(i*=1+b.cannibalize.vars(1)[0]/100*o)),e.race.humpback&&(a==="miner"||a==="lumberjack")&&(i*=1+b.humpback.vars()[0]/100);let d=ve("kamel");d>0&&(a==="miner"||a==="lumberjack")&&(i*=1+b.humpback.vars(1)[0]/100*d),e.city.ptrait.includes("magnetic")&&a==="miner"&&(i*=Re.magnetic.vars()[2]),e.race.weak&&(a==="miner"||a==="lumberjack")&&(i*=1-b.weak.vars()[0]/100),e.race.hydrophilic&&e.city.calendar.weather===0&&e.city.calendar.temp>0&&a!=="factory"&&(i*=.75),e.race.toxic&&a==="factory"&&(i*=1+b.toxic.vars()[2]/100);let h=ve("shroomi");if(h>0&&a==="factory"&&(i*=1+b.toxic.vars(1)[2]/100*h),e.race.hardy&&a==="factory"&&(i*=1+b.hardy.vars()[0]*e.race.hardy/100),e.race.analytical&&a==="science"&&(i*=1+b.analytical.vars()[0]*e.race.analytical/100),e.race.ooze&&(i*=1-b.ooze.vars()[0]/100),e.civic.govern.type==="democracy"&&(i*=1-$e.democracy()[1]/100),e.tech.cyber_worker&&(a==="lumberjack"||a==="miner")&&(i*=1.25),a==="hunting"){e.race.tracker&&(i*=1+b.tracker.vars()[0]/100);let _=ve("wolven");if(_>0&&(i*=1+b.tracker.vars(1)[0]/100*_),e.race.beast){let M=e.city.calendar.wind===1?b.beast.vars()[1]:b.beast.vars()[0];i*=1+M/100}e.race.apex_predator&&(i*=1+b.apex_predator.vars()[1]/100);let m=ve("sharkin");m>0&&(i*=1+b.apex_predator.vars(1)[1]/100*m),e.race.fiery&&(i*=1+b.fiery.vars()[1]/100);let w=ve("balorg");w>0&&(i*=1+b.fiery.vars(1)[1]/100*w),e.race.fragrant&&(i*=1-b.fragrant.vars()[0]/100),e.city.ptrait.includes("rage")&&(i*=Re.rage.vars()[1]),e.race.cunning&&(i*=1+b.cunning.vars()[0]*e.race.cunning/100),e.city.biome==="savanna"&&(i*=qe.savanna.vars()[1]),e.race.dark_dweller&&e.city.calendar.weather===2&&(i*=1-b.dark_dweller.vars()[0]/100)}if(e.race.universe==="magic"&&(a==="science"?i*=.6:a==="army"||a==="hellArmy"?i*=.75:i*=.8,e.race.witch_hunter&&(i*=.75),e.race.hasOwnProperty("casting")&&e.race.casting[a==="hellArmy"?"army":a])){let _=e.race.casting[a==="hellArmy"?"army":a];e.race.witch_hunter?i*=1+_/(_+75)*2.5:i*=1+_/(_+75)}return e.race.living_tool&&a==="miner"&&(i*=1+b.living_tool.vars()[0]*(e.tech.science&&e.tech.science>0?e.tech.science*.12:0)),e.city.banquet&&e.city.banquet.on&&e.city.banquet.count>=3&&(a==="army"||a==="hellArmy")&&(i*=1+e.city.banquet.strength**.65/100),e.race.high_pop&&(i=xe(i)),e.race.gravity_well&&["farmer","miner","lumberjack","factory","hunting"].includes(a)&&(i=Xe(i)),i}function pr(r,a){let i=1;return e.race.gravity_well&&["farmer","miner","lumberjack","factory","hunting","scavenger"].includes(a)&&(i=Xe(i)),i}function Ai(r){let a=[];Object.keys(b).forEach(function(s){b[s].type==="minor"&&!e.race[s]&&a.push(s)}),a.length===0&&Object.keys(b).forEach(function(s){b[s].type==="minor"&&a.push(s)});let i=a[Math.floor(J(0,a.length))];return e.race[i]?e.race[i]+=r:e.race[i]=r,i}function lt(r,a,i){e.race.purgatory[r].hasOwnProperty(a)?(e[r][a]=e.race.purgatory[r][a],delete e.race.purgatory[r][a]):i&&(e[r][a]=i)}function Lr(r,a,i,s){e.race.purgatory[r].hasOwnProperty(a)?(e[r][a]=e.race.purgatory[r][a],delete e.race.purgatory[r][a]):e.race.purgatory[r].hasOwnProperty(i)?(e[r][a]=e.race.purgatory[r][i],delete e.race.purgatory[r][i]):s&&(e[r][a]=s)}function or(r,a){e[r].hasOwnProperty(a)&&(e.race.purgatory[r][a]=e[r][a],delete e[r][a])}function Za(r,a){if(e.race.purgatory[r].hasOwnProperty(a))return e.race.purgatory[r][a]}function xl(){Oc("Lumber"),Oc("Plywood"),Zr(["city-graveyard","city-lumber_yard","city-sawmill"]),pi(["reclaimer","axe","saw"]),or("city","sawmill"),or("city","graveyard"),or("city","lumber_yard"),or("tech","axe"),or("tech","reclaimer"),or("tech","saw"),e.civic.lumberjack.display=!1,e.civic.lumberjack.workers=0,e.civic.lumberjack.assigned=0,e.civic.d_job==="lumberjack"&&(e.civic.d_job=e.race.carnivore||e.race.soul_eater?"hunter":"unemployed"),e.race.casting&&(e.race.casting.total-=e.race.casting.lumberjack,e.race.casting.lumberjack=0,rt()),e.city.s_alter&&(e.city.s_alter.harvest=0)}function Oc(r){e.resource[r].display=!1,e.race.alchemy&&e.race.alchemy.hasOwnProperty(r)&&(e.resource.Mana.diff+=e.race.alchemy[r],e.race.alchemy[r]=0),e.interstellar.mass_ejector&&e.interstellar.mass_ejector.hasOwnProperty(r)&&(e.interstellar.mass_ejector.total-=e.interstellar.mass_ejector[r],e.interstellar.mass_ejector[r]=0),e.city.nanite_factory&&e.city.nanite_factory.hasOwnProperty(r)&&(e.city.nanite_factory[r]=0),e.portal.transport&&e.portal.transport.cargo.hasOwnProperty(r)&&(e.portal.transport.cargo.used-=e.portal.transport.cargo[r],e.portal.transport.cargo[r]=0),e.tech.foundry&&e.city.foundry.hasOwnProperty(r)&&(e.civic.craftsman.workers-=e.city.foundry[r],e.city.foundry.crafting-=e.city.foundry[r],e.city.foundry[r]=0,Lt()),e.resource[r].hasOwnProperty("trade")&&(e.city.market.trade-=Math.abs(e.resource[r].trade),e.resource[r].trade=0),e.resource.Crates.amount+=e.resource[r].crates,e.resource[r].crates=0,e.resource.Containers.amount+=e.resource[r].containers,e.resource[r].containers=0}function Sc(){let r=Qa(O.tech.agriculture),a=Qa(O.tech.smokehouse),i=Qa(O.tech.reclaimer)||Qa(O.tech.stone_axe),s=Qa(O.tech.alt_lodge),n=Qa(O.tech.wind_plant),c=[],l=[];if(!e.race.artifical){if(["agriculture","farm","hunting","s_lodge","wind_plant","compost","soul_eater"].forEach(function(h){or("tech",h)}),["silo","farm","mill","windmill","smokehouse","lodge","compost","soul_well"].forEach(function(h){or("city",h)}),s){lt("tech","s_lodge");let h=Za("tech","farm")>=1||Za("tech","hunting")>=2?1:0;h>0&&(!e.tech.s_lodge||e.tech.s_lodge=1&&Lr("city","lodge","farm",{count:0})}if(a){lt("tech","hunting");let h=Za("tech","farm")>=1||Za("tech","s_lodge")>=1?2:Za("tech","agriculture")>=3?1:0;h>0&&(!e.tech.hunting||e.tech.hunting=1&&Lr("city","smokehouse","silo",{count:0}),e.tech.hunting>=2&&!s&&Lr("city","lodge","farm",{count:0})}else l.push("hunting"),c.push("city-smokehouse"),s||l.push("city-lodge");if(r){lt("tech","farm");let h=Za("tech","hunting")>=2||Za("tech","s_lodge")>=1?1:0;h>0&&(!e.tech.farm||e.tech.farm=1?3:Za("tech","s_lodge")>=1?1:0;_>0&&(!e.tech.agriculture||e.tech.agriculture<_)&&(e.tech.agriculture=_),e.tech.agriculture>=1&&Lr("city","farm","lodge",{count:0}),e.tech.agriculture>=3&&Lr("city","silo","smokehouse",{count:0}),e.tech.agriculture>=4&&!n&&Lr("city","mill","windmill",{count:0,on:0})}else l.push("agriculture","farm"),c.push("city-farm","city-silo","city-mill");e.race.soul_eater?(lt("tech","soul_eater"),lt("city","soul_well")):(c.push("city-soul_well"),l.push("soul_eater")),e.race.detritivore?(lt("tech","compost"),lt("city","compost")):(l.push("compost"),c.push("city-compost")),n?(lt("tech","wind_plant"),e.tech.wind_plant>=1&&Lr("city","windmill","mill",{count:0,on:0})):(l.push("wind_plant"),c.push("city-windmill"),delete Ht[t("city_mill_title2")])}let o=[],d=[];!e.race.orbit_decayed&&r&&e.tech.agriculture>=1&&e.city.farm.count>0?o.push("farmer"):d.push("farmer"),e.race.carnivore&&!e.race.herbivore||e.race.soul_eater||e.race.unfathomable?(o.push("hunter"),d.push("unemployed")):(d.push("hunter"),o.push("unemployed")),!e.race.orbit_decayed&&i?o.push("lumberjack"):d.push("lumberjack"),o.forEach(function(h){e.civic[h].display||(e.civic[h].workers=0,e.civic[h].display=!0)}),d.forEach(function(h){e.civic[h].display&&(e.civic.d_job===h&&(e.civic.d_job=o[0]),e.civic[o[0]].workers+=e.civic[h].workers,e.civic[h].workers=0,e.civic[h].assigned=0,e.civic[h].display=!1)}),e.race.casting&&(r||(e.race.casting.total-=e.race.casting.farmer,e.race.casting.farmer=0),rt()),Zr(c),pi(l),Ir("Food")}function Ni(r){switch(r){case"high_pop":e.resource[e.race.species].amount=Math.round(e.resource[e.race.species].amount*b.high_pop.vars()[0]),e.civic.hasOwnProperty("garrison")&&(e.civic.garrison.workers=Math.round(e.civic.garrison.workers*b.high_pop.vars()[0]));break;case"kindling_kindred":if(e.race.smoldering)break;xl();break;case"smoldering":if(e.resource.Chrysotile.display=!0,e.race.kindling_kindred)break;xl();break;case"forge":rt();break;case"soul_eater":tn("lumberjack");case"detritivore":case"carnivore":case"herbivore":Sc();break;case"unfathomable":for(Sc(),e.city.hasOwnProperty("surfaceDwellers")||(e.city.surfaceDwellers=[]);e.city.surfaceDwellers.lengthb.unfathomable.vars()[0]&&(e.city.surfaceDwellers.length=b.unfathomable.vars()[0]),e.race.psychic&&Ct();break;case"flier":Ir("Stone"),Ir("Brick"),e.resource.Cement.display=!1,e.civic.cement_worker.display=!1,e.civic.cement_worker.workers=0,e.civic.cement_worker.assigned=0,or("tech","cement"),or("city","cement_plant");break;case"sappy":e.civic.d_job==="quarry_worker"&&(e.civic.d_job=e.race.carnivore||e.race.soul_eater?"hunter":"unemployed"),e.civic.quarry_worker.display=!1,e.civic.quarry_worker.workers=0,e.civic.quarry_worker.assigned=0,Ir("Stone"),or("tech","hammer"),or("city","rock_quarry");break;case"apex_predator":pi(["armor"]),or("tech","armor");break;case"environmentalist":delete Ht[t("city_coal_power")],delete Ht[t("city_mana_engine")],delete Ht[t("city_oil_power")];break;case"terrifying":Object.keys(e.resource).forEach(function(a){e.resource[a].hasOwnProperty("trade")&&(e.resource[a].trade=0)}),e.settings.showMarket=!1,e.settings.marketTabs===0&&(e.settings.marketTabs=1),Zr(["city-trade"]),pi(["trade"]),or("tech","trade"),or("city","trade");break;case"slaver":lt("tech","slaves"),e.tech.slaves>=1&&(lt("city","slave_pen",{count:0}),e.city.slave_pen.count>0&&!e.race.orbit_decayed&&(e.resource.Slave.display=!0),e.tech.slaves>=2&&Ot());break;case"cannibalize":lt("tech","sacrifice"),e.tech.mining&&(e.city.s_alter={count:0,rage:0,mind:0,regen:0,mine:0,harvest:0},Ot());break;case"magnificent":e.tech.theology>=2&<("city","shrine",{count:0,morale:0,metal:0,know:0,tax:0});break;case"unified":e.tech.world_control=1,e.tech.unify=2,le($("#garrison")),le($("#c_garrison")),ia($("#garrison"),!0),ia($("#c_garrison"),!1);for(let a=0;a<3;a++){if(e.civic.foreign[`gov${a}`].occ){let i=N(e.civic.govern.type==="federation"?15:20);e.civic.garrison.max+=i,e.civic.garrison.workers+=i,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"}qr("spy"),qr("spyop");break;case"noble":e.civic.taxes.tax_rate<10?e.civic.taxes.tax_rate=10:e.civic.taxes.tax_rate>20&&(e.civic.taxes.tax_rate=20);break;case"toxic":e.race.species==="troll"&&e.tech.science&&e.tech.science>=8&&ie("godwin");break;case"thalassophobia":Zr(["city-wharf"]),pi(["wharf"]),or("city","wharf");break;case"hooved":e.resource.Horseshoe.display=!0,e.race.hasOwnProperty("shoecnt")||(e.race.shoecnt=0),Ot();break;case"slow":Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w?(Pr("stop"),Pr("start")):window.location.reload();break;case"hyper":Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w?(Pr("stop"),Pr("start")):window.location.reload();break;case"calm":e.tech.primitive>=3&&(lt("city","meditation",{count:0}),e.race.orbit_decayed||(e.resource.Zen.display=!0));break;case"blood_thirst":e.race.blood_thirst_count=1;break;case"deconstructor":e.resource.Nanite.display=!0,lt("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});break;case"shapeshifter":oa(!1,!0);break;case"imitation":fn(!0);break;case"evil":Ir("Lumber"),Ir("Furs"),Ir("Plywood");break;case"psychic":e.tech.psychic&&(e.resource.Energy.display=!0,e.settings.showPsychic=!0);break;case"ooze":!e.tech.high_tech&&e.race.species!=="custom"&&e.race.species!=="sludge"&&(e.race.gross_enabled=1),Nt(!0);break;default:break}}function Ns(r,a){switch(r){case"high_pop":e.resource[e.race.species].amount=Math.round(e.resource[e.race.species].amount/b.high_pop.vars(a)[0]),e.civic.hasOwnProperty("garrison")&&(e.civic.garrison.workers=Math.round(e.civic.garrison.workers/b.high_pop.vars(a)[0]));break;case"kindling_kindred":if(e.race.smoldering)break;e.resource.Lumber.display=!0,e.tech.foundry&&(e.resource.Plywood.display=!0),e.race.casting&&rt(),lt("city","sawmill"),lt("city","graveyard"),lt("city","lumber_yard"),lt("tech","axe"),lt("tech","reclaimer"),lt("tech","saw"),(e.tech.axe||e.tech.reclaimer)&&!e.race.orbit_decayed&&(e.civic.lumberjack.display=!0);break;case"smoldering":if(Oc("Chrysotile"),e.race.kindling_kindred)break;e.resource.Lumber.display=!0,e.tech.foundry&&(e.resource.Plywood.display=!0),e.race.casting&&rt(),lt("city","sawmill"),lt("city","graveyard"),lt("city","lumber_yard"),lt("tech","axe"),lt("tech","reclaimer"),lt("tech","saw"),(e.tech.axe||e.tech.reclaimer)&&!e.race.orbit_decayed&&(e.civic.lumberjack.display=!0);break;case"forge":rt();break;case"soul_eater":tn("lumberjack");case"detritivore":case"carnivore":case"herbivore":case"unfathomable":Sc(),e.race.psychic&&Ct();break;case"flier":Ir("Stone"),Ir("Brick"),lt("tech","cement"),e.tech.cement&&(lt("city","cement_plant"),e.resource.Cement.display=!0,e.civic.cement_worker.display=!0);break;case"sappy":Ir("Stone"),lt("tech","hammer"),e.tech.mining>=1&&(lt("city","rock_quarry",{count:0,asbestos:0}),(e.city.rock_quarry&&e.city.rock_quarry.count>0||e.race.lone_survivor)&&(e.civic.quarry_worker.display=!0));break;case"apex_predator":lt("tech","armor");break;case"environmentalist":delete Ht[t("city_hydro_power")],delete Ht[t("city_wind_power")];break;case"terrifying":e.settings.showMarket=!0,lt("tech","trade"),lt("city","trade");break;case"slaver":Zr(["city-slave_pen"]),pi(["slaves"]),or("city","slave_pen"),or("tech","slaves"),e.resource.Slave.amount=0,e.resource.Slave.max=0,e.resource.Slave.display=!1,qr("slave"),Ot();break;case"cannibalize":Zr(["city-s_alter"]),pi(["sacrifice"]),or("tech","sacrifice"),delete e.city.s_alter,qr("sacrifice"),Ot();break;case"magnificent":Zr(["city-shrine"]),or("city","shrine");break;case"thalassophobia":e.tech.wharf&<("city","wharf",{count:0});break;case"hooved":Zr(["city-horseshoe","space-horseshoe"]),e.resource.Horseshoe.display=!1,qr("horseshoe"),Ot();break;case"slow":Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w?(Pr("stop"),Pr("start")):window.location.reload();break;case"hyper":Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w?(Pr("stop"),Pr("start")):window.location.reload();break;case"calm":Zr(["city-meditation"]),e.resource.Zen.display=!1,or("city","meditation");break;case"blood_thirst":delete e.race.blood_thirst_count;break;case"deconstructor":Zr(["city-nanite_factory"]),e.resource.Nanite.display=!1,or("city","nanite_factory");break;case"shapeshifter":le($("#sshifter")),oa();break;case"imitation":e.race.iTraits&&(Object.keys(e.race.iTraits).forEach(function(i){if(i!=="imitation")if(e.race.iTraits[i]===0){let s=e.race[i];delete e.race[i],Ns(i,s)}else e.race[i]=e.race.iTraits[i]}),delete e.race.iTraits);break;case"evil":Ir("Lumber"),Ir("Furs"),Ir("Plywood");break;case"psychic":e.resource.Energy.display=!1,e.settings.showPsychic=!1;break;case"ooze":delete e.race.gross_enabled,Nt(!0);break;default:break}}function fn(r){if(e.race.imitation&&e.race.srace){e.race.iTraits||(e.race.iTraits={}),e.race.shapeshifter&&oa(e.race.ss_genus===F[e.race.srace].type?"none":!1,!0);let a=[];if(Object.keys(Er[F[e.race.srace].type]).forEach(function(i){e.race[i]||a.push(i)}),e.race.srace==="custom"){let i=["evil","evil"];Object.keys(F[e.race.srace].traits).forEach(function(s){b[s].val>b[i[0]].val?i[0]=s:b[s].val=0?e.race[s]=b.shapeshifter.vars()[0]:e.race[s]=b.shapeshifter.vars()[1],Ni(s),i.push(s))}),e.race.ss_genus=r),a){le($("#sshifter")),e.race.ss_genus=e.race.hasOwnProperty("ss_genus")?e.race.ss_genus:"none";let s="";Object.keys(Er).forEach(function(n){n!=="synthetic"&&n!=="eldritch"&&n!==F[e.race.species].type&&(!e.race.imitation||n!==F[e.race.srace].type)&&e.stats.achieve[`genus_${n}`]&&e.stats.achieve[`genus_${n}`].l>0&&(s+=`{{ '${n}' | genus }} `)}),$("#sshifter").append(`${t("trait_shapeshifter_name")} :
+ `)}else{let o="";Object.keys(Mt).forEach(function(d){e.resource[d].display&&(o+=`${e.resource[d].name} `)}),i.append(` ${o}
`)}let s=a?$("
"):$('
');i.append(s);let n=$('{{ pow }}MW '),c=$('« '),l=$('» ');if(s.append(c),s.append(n),s.append(l),r.append('{{ res | result }}
'),D({el:a||"#specialModal",data:e.race.replicator,methods:{less(){let o=fe();e.race.replicator.pow>0&&(e.race.replicator.pow-=o,e.race.replicator.pow<0&&(e.race.replicator.pow=0))},more(){let o=fe();e.race.replicator.pow+=o},setVal(o){e.resource[o].display&&(e.race.replicator.res=o)},avail(o){return e.resource[o].display},aria(){return e.race.replicator.pow+"MW"}},filters:{resName(o){return e.resource[o].name},result(o){return t("tau_replicator",[Pc(o,e.race.replicator.pow).toFixed(3),e.resource[o].name])}}}),!a){let o=document.getElementById("hscrolltarget");o.addEventListener("wheel",d=>{d.preventDefault(),o.scrollLeft+=d.deltaY})}}}function Pc(r,a){return e.race.lone_survivor?17.5*xt/Mt[r]*a:12.5*(xt||1)/Mt[r]*a**.75}function di(r,a){return a=typeof a>"u"?.0025:a,r*((1+a)**r-1)}function rs(r,a,i){return r<=0?i?"has-text-success":"has-text-danger":r>=a?i?"has-text-danger":"has-text-success":r<=a/3?i?"has-text-info":"has-text-caution":r<=a*.66?"has-text-warning":rDistribute Low Power
`),D({el:"#powerModeSwitch",data:e.settings}),Object.keys(r).forEach(function(a){if(!r[a].s)return;let i="";a==="power"&&(i=ar(7,12,!1)),r[a].r&&r[a].rs&&e[r[a].r][r[a].rs]?($("#powerGrid").append(``),D({el:`#pg${a}sup`,data:e[r[a].r][r[a].rs]})):$("#powerGrid").append(``);let s=$(`
`);$("#powerGrid").append(s);let n=0;for(let l=0;l`);F.append(` ${w}${M} `),F.append('{{ on | off }} {{ on }} '),F.append('« » '),s.append(F),D({el:`#pg${m.id}${a}`,data:e[_][d[1]],methods:{power_on(){let x=fe();for(let j=0;j0;j++)e[_][d[1]].on--;m.postPower&&setTimeout(function(){m.postPower(!1)},250)},higher(){let x=$(`#pg${m.id}${a}`).attr("data-idx"),j=$(`#pg${m.id}${a}`).prevAll('.circuit:not(".inactive")').attr("data-idx");if(j>=0){let B=r[a].l;B.splice(j,0,B.splice(x,1)[0]),r[a].l=B,ca()}},lower(){let x=$(`#pg${m.id}${a}`).attr("data-idx"),j=$(`#pg${m.id}${a}`).nextAll('.circuit:not(".inactive")').attr("data-idx");if(j0?"1"+j:x}}})}else{let F=$(`
`);F.append(`${w}${M} `),s.append(F)}}y0(a);let c=$(`${t("power_grid_reset",[r[a].n])}
`);$("#powerGrid").append(c),D({el:`#${a}GridReset`,data:{},methods:{resetGrid(l){xi(l,!0),ca()}}})})}function Xr(){return{power:{l:e.power,n:t("power"),s:!0,r:!1,rs:!1},moon:{l:e.support.moon,n:t("space_moon_info_name"),s:e.settings.space.moon,r:"space",rs:"moon_base"},red:{l:e.support.red,n:W().red,s:e.settings.space.red,r:"space",rs:"spaceport"},belt:{l:e.support.belt,n:t("space_belt_info_name"),s:e.settings.space.belt,r:"space",rs:"space_station"},alpha:{l:e.support.alpha,n:t("interstellar_alpha_name"),s:e.settings.space.alpha,r:"interstellar",rs:"starport"},nebula:{l:e.support.nebula,n:t("interstellar_nebula_name"),s:e.settings.space.nebula,r:"interstellar",rs:"nexus"},gateway:{l:e.support.gateway,n:t("galaxy_gateway"),s:e.settings.space.gateway,r:"galaxy",rs:"starbase"},alien2:{l:e.support.alien2,n:t("galaxy_alien",[A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name]),s:e.settings.space.alien2,r:"galaxy",rs:"foothold"},lake:{l:e.support.lake,n:t("portal_lake_name"),s:e.settings.portal.lake,r:"portal",rs:"harbour"},spire:{l:e.support.spire,n:t("portal_spire_name"),s:e.settings.portal.spire,r:"portal",rs:"purifier"},titan:{l:e.support.titan,n:W().titan,s:e.settings.space.titan,r:"space",rs:"electrolysis"},enceladus:{l:e.support.enceladus,n:W().enceladus,s:e.settings.space.enceladus,r:"space",rs:"titan_spaceport"},eris:{l:e.support.eris,n:W().eris,s:e.settings.space.eris,r:"space",rs:"drone_control"},tau_home:{l:e.support.tau_home,n:t("tau_planet",[A[e.race.species].home]),s:e.settings.tau.home,r:"tauceti",rs:"orbital_station"},tau_red:{l:e.support.tau_red,n:t("tau_planet",[W().red]),s:e.settings.tau.red,r:"tauceti",rs:"orbital_platform"},tau_roid:{l:e.support.tau_roid,n:t("tau_roid_title"),s:e.settings.tau.roid,r:"tauceti",rs:"patrol_ship"}}}function Qs(r){r=r||Xr(),Object.keys(r).forEach(function(a){let i=$(`#grid${a}`)[0];if(i){let s=Sortable.get(i);s&&s.destroy()}})}function y0(r){let a=$(`#grid${r}`)[0],i=Xr();Sortable.create(a,{onEnd(s){let n=i[r].l;n.splice(s.newDraggableIndex,0,n.splice(s.oldDraggableIndex,1)[0]),i[r].l=n,ca()}})}var Ai=new Date,$l=mn(),b0=qa(),bc=["angry","arrogant","atrophy","diverse","dumb","fragrant","frail","freespirit","gluttony","gnawer","greedy","hard_of_hearing","heavy","hooved","invertebrate","lazy","mistrustful","nearsighted","nyctophilia","paranoid","pathetic","pessimistic","puny","pyrophobia","skittish","slow","slow_regen","snowy","solitary","unorganized"];function me(r,a){if(e.settings.boring)return e.race.hrt&&delete e.race.hrt,!1;switch(r){case"elven":case"capybara":case"centaur":case"wendigo":case"entish":case"yeti":return Ai.getMonth()===11&&Ai.getDate()>=17||e.race.hrt&&e.race.hrt===r?(a&&(e.race.hrt=r),!0):!1;case"wolven":return $l.active||e.race.hrt&&e.race.hrt===r?(a&&(e.race.hrt=r),!0):!1;case"vulpine":return $l.active||e.race.hrt&&e.race.hrt===r?(a&&(e.race.hrt=r),!0):!1;case"arraak":return Ai.getMonth()===10&&Ai.getDate()>=22&&Ai.getDate()<=28||e.race.hrt&&e.race.hrt===r?(a&&(e.race.hrt=r),!0):!1;case"seraph":return Ai.getMonth()===1&&Ai.getDate()===14||e.race.hrt&&e.race.hrt===r?(a&&(e.race.hrt=r),!0):!1;case"junker":return b0.active||e.race.hrt&&e.race.hrt===r?(a&&(e.race.hrt=r),!0):!1}return!1}var Er={humanoid:{adaptable:1,wasteful:1},carnivore:{carnivore:1,beast:1,cautious:1},herbivore:{herbivore:1,instinct:1},small:{small:1,weak:1},giant:{large:1,strong:1},reptilian:{cold_blooded:1,scales:1},avian:{flier:1,hollow_bones:1,sky_lover:1},insectoid:{high_pop:1,fast_growth:1,high_metabolism:1},plant:{sappy:1,asymmetrical:1},fungi:{detritivore:1,spongy:1},aquatic:{submerged:1,low_light:1},fey:{elusive:1,iron_allergy:1},heat:{smoldering:1,cold_intolerance:1},polar:{chilled:1,heat_intolerance:1},sand:{scavenger:1,nomadic:1},demonic:{immoral:1,evil:1,soul_eater:1},angelic:{blissful:1,pompous:1,holy:1},synthetic:{artifical:1,powered:1},eldritch:{psychic:1,tormented:1,darkness:1,unfathomable:1}},b={adaptable:{name:t("trait_adaptable_name"),desc:t("trait_adaptable"),type:"genus",val:3,vars(r){switch(r||e.race.adaptable||1){case .25:return[3];case .5:return[5];case 1:return[10];case 2:return[15];case 3:return[20]}}},wasteful:{name:t("trait_wasteful_name"),desc:t("trait_wasteful"),type:"genus",val:-3,vars(r){switch(r||e.race.wasteful||1){case .25:return[14];case .5:return[12];case 1:return[10];case 2:return[6];case 3:return[4]}}},xenophobic:{name:t("trait_xenophobic_name"),desc:t("trait_xenophobic"),type:"genus",val:-5},carnivore:{name:t("trait_carnivore_name"),desc:t("trait_carnivore"),type:"genus",val:3,vars(r){switch(r||e.race.carnivore||1){case .25:return[65];case .5:return[60];case 1:return[50];case 2:return[40];case 3:return[35]}}},beast:{name:t("trait_beast_name"),desc:t("trait_beast"),type:"genus",val:2,vars(r){switch(r||e.race.beast||1){case .25:return[4,8,4];case .5:return[5,10,5];case 1:return[8,15,10];case 2:return[10,20,15];case 3:return[12,24,20]}}},cautious:{name:t("trait_cautious_name"),desc:t("trait_cautious"),type:"genus",val:-2,vars(r){switch(r||e.race.cautious||1){case .25:return[14];case .5:return[12];case 1:return[10];case 2:return[8];case 3:return[6]}}},herbivore:{name:t("trait_herbivore_name"),desc:t("trait_herbivore"),type:"genus",val:-7},instinct:{name:t("trait_instinct_name"),desc:t("trait_instinct"),type:"genus",val:5,vars(r){switch(r||e.race.instinct||1){case .25:return[3,15];case .5:return[5,25];case 1:return[10,50];case 2:return[15,60];case 3:return[20,65]}}},small:{name:t("trait_small_name"),desc:t("trait_small"),type:"genus",val:6,vars(r){switch(r||e.race.small||1){case .25:return[.0025,.0015];case .5:return[.005,.0025];case 1:return[.01,.005];case 2:return[.0125,.006];case 3:return[.015,.0075]}}},weak:{name:t("trait_weak_name"),desc:t("trait_weak"),type:"genus",val:-3,vars(r){switch(r||e.race.weak||1){case .25:return[14];case .5:return[12];case 1:return[10];case 2:return[8];case 3:return[6]}}},large:{name:t("trait_large_name"),desc:t("trait_large"),type:"genus",val:-5,vars(r){switch(r||e.race.large||1){case .25:return[.007];case .5:return[.006];case 1:return[.005];case 2:return[.004];case 3:return[.003]}}},strong:{name:t("trait_strong_name"),desc:t("trait_strong"),type:"genus",val:5,vars(r){switch(r||e.race.strong||1){case .25:return[2,1.25];case .5:return[3,1.5];case 1:return[4,2];case 2:return[5,2.25];case 3:return[6,2.5]}}},cold_blooded:{name:t("trait_cold_blooded_name"),desc:t("trait_cold_blooded"),type:"genus",val:-2,vars(r){switch(r||e.race.cold_blooded||1){case .25:return[30,6];case .5:return[25,8];case 1:return[20,10];case 2:return[15,15];case 3:return[12,18]}}},scales:{name:t("trait_scales_name"),desc:t("trait_scales"),type:"genus",val:5,vars(r){switch(r||e.race.scales||1){case .25:return[1,0,1];case .5:return[1,1,1];case 1:return[2,1,1];case 2:return[2,2,1];case 3:return[2,2,2]}}},flier:{name:t("trait_flier_name"),desc:t("trait_flier"),type:"genus",val:3,vars(r){switch(r||e.race.flier||1){case .25:return[10,0];case .5:return[15,0];case 1:return[25,1];case 2:return[40,1];case 3:return[50,2]}}},hollow_bones:{name:t("trait_hollow_bones_name"),desc:t("trait_hollow_bones"),type:"genus",val:2,vars(r){switch(r||e.race.hollow_bones||1){case .25:return[1];case .5:return[2];case 1:return[5];case 2:return[8];case 3:return[10]}}},sky_lover:{name:t("trait_sky_lover_name"),desc:t("trait_sky_lover"),type:"genus",val:-2,vars(r){switch(r||e.race.sky_lover||1){case .25:return[40];case .5:return[30];case 1:return[20];case 2:return[15];case 3:return[10]}}},rigid:{name:t("trait_rigid_name"),desc:t("trait_rigid"),type:"genus",val:-2,vars(r){switch(r||e.race.rigid||1){case .25:return[3];case .5:return[2];case 1:return[1];case 2:return[.5];case 3:return[.4]}}},high_pop:{name:t("trait_high_pop_name"),desc:t("trait_high_pop"),type:"genus",val:3,vars(r){switch(r||e.race.high_pop||1){case .25:return[2,50,1.5];case .5:return[3,34,2.5];case 1:return[4,26,3.5];case 2:return[5,21.2,4.5];case 3:return[6,18,5.5]}}},fast_growth:{name:t("trait_fast_growth_name"),desc:t("trait_fast_growth"),type:"genus",val:2,vars(r){switch(r||e.race.fast_growth||1){case .25:return[1.5,1];case .5:return[2,1];case 1:return[2,2];case 2:return[2.5,3];case 3:return[3,3]}}},high_metabolism:{name:t("trait_high_metabolism_name"),desc:t("trait_high_metabolism"),type:"genus",val:-1,vars(r){switch(r||e.race.high_metabolism||1){case .25:return[10];case .5:return[8];case 1:return[5];case 2:return[2];case 3:return[1]}}},photosynth:{name:t("trait_photosynth_name"),desc:t("trait_photosynth"),type:"genus",val:3,vars(r){switch(r||e.race.photosynth||1){case .25:return[10,5,4];case .5:return[20,10,5];case 1:return[40,20,10];case 2:return[50,30,15];case 3:return[60,35,20]}}},sappy:{name:t("trait_sappy_name"),desc:t("trait_sappy",[t("resource_Amber_name")]),type:"genus",val:4,vars(r){switch(r||e.race.sappy||1){case .25:return[.4];case .5:return[.5];case 1:return[.6];case 2:return[.65];case 3:return[.7]}}},asymmetrical:{name:t("trait_asymmetrical_name"),desc:t("trait_asymmetrical"),type:"genus",val:-3,vars(r){switch(r||e.race.asymmetrical||1){case .25:return[30];case .5:return[25];case 1:return[20];case 2:return[15];case 3:return[10]}}},detritivore:{name:t("trait_detritivore_name"),desc:t("trait_detritivore"),type:"genus",val:2,vars(r){switch(r||e.race.detritivore||1){case .25:return[65];case .5:return[72];case 1:return[80];case 2:return[85];case 3:return[90]}}},spores:{name:t("trait_spores_name"),desc:t("trait_spores"),type:"genus",val:2,vars(r){switch(r||e.race.spores||1){case .25:return[1,1.5,1];case .5:return[2,1.5,1];case 1:return[2,2,1];case 2:return[2,2.5,2];case 3:return[2,3,2]}}},spongy:{name:t("trait_spongy_name"),desc:t("trait_spongy"),type:"genus",val:-2},submerged:{name:t("trait_submerged_name"),desc:t("trait_submerged"),type:"genus",val:3},low_light:{name:t("trait_low_light_name"),desc:t("trait_low_light"),type:"genus",val:-2,vars(r){switch(r||e.race.low_light||1){case .25:return[14];case .5:return[12];case 1:return[10];case 2:return[8];case 3:return[6]}}},elusive:{name:t("trait_elusive_name"),desc:t("trait_elusive"),type:"genus",val:7,vars(r){switch(r||e.race.elusive||1){case .25:return[10];case .5:return[15];case 1:return[20];case 2:return[25];case 3:return[30]}}},iron_allergy:{name:t("trait_iron_allergy_name"),desc:t("trait_iron_allergy"),type:"genus",val:-4,vars(r){switch(r||e.race.iron_allergy||1){case .25:return[40];case .5:return[35];case 1:return[25];case 2:return[18];case 3:return[15]}}},smoldering:{name:t("trait_smoldering_name"),desc:t("trait_smoldering"),type:"genus",val:7,vars(r){switch(r||e.race.smoldering||1){case .25:return[3,.14,.08];case .5:return[4,.18,.1];case 1:return[5,.35,.2];case 2:return[10,.38,.22];case 3:return[12,.4,.24]}}},cold_intolerance:{name:t("trait_cold_intolerance_name"),desc:t("trait_cold_intolerance"),type:"genus",val:-4,vars(r){switch(r||e.race.cold_intolerance||1){case .25:return[.35];case .5:return[.3];case 1:return[.25];case 2:return[.2];case 3:return[.18]}}},chilled:{name:t("trait_chilled_name"),desc:t("trait_chilled"),type:"genus",val:7,vars(r){switch(r||e.race.chilled||1){case .25:return[1,.14,.08,5,2,20];case .5:return[2,.18,.1,10,5,18];case 1:return[5,.35,.2,20,10,15];case 2:return[10,.38,.22,25,12,10];case 3:return[12,.4,.24,30,14,8]}}},heat_intolerance:{name:t("trait_heat_intolerance_name"),desc:t("trait_heat_intolerance"),type:"genus",val:-4,vars(r){switch(r||e.race.heat_intolerance||1){case .25:return[.35];case .5:return[.3];case 1:return[.25];case 2:return[.2];case 3:return[.18]}}},scavenger:{name:t("trait_scavenger_name"),desc:t("trait_scavenger"),type:"genus",val:3,vars(r){switch(r||e.race.scavenger||1){case .25:return[.08,20];case .5:return[.1,22];case 1:return[.12,25];case 2:return[.14,30];case 3:return[.16,32]}}},nomadic:{name:t("trait_nomadic_name"),desc:t("trait_nomadic"),type:"genus",val:-5},immoral:{name:t("trait_immoral_name"),desc:t("trait_immoral"),type:"genus",val:4,vars(r){switch(r||e.race.immoral||1){case .25:return[-30];case .5:return[-20];case 1:return[0];case 2:return[20];case 3:return[30]}}},evil:{name:t("trait_evil_name"),desc:t("trait_evil"),type:"genus",val:0},blissful:{name:t("trait_blissful_name"),desc:t("trait_blissful"),type:"genus",val:3,vars(r){switch(r||e.race.blissful||1){case .25:return[70];case .5:return[60];case 1:return[50];case 2:return[40];case 3:return[30]}}},pompous:{name:t("trait_pompous_name"),desc:t("trait_pompous"),type:"genus",val:-6,vars(r){switch(r||e.race.pompous||1){case .25:return[85];case .5:return[80];case 1:return[75];case 2:return[65];case 3:return[60]}}},holy:{name:t("trait_holy_name"),desc:t("trait_holy"),type:"genus",val:4,vars(r){switch(r||e.race.holy||1){case .25:return[25,10];case .5:return[30,15];case 1:return[50,25];case 2:return[60,35];case 3:return[65,40]}}},artifical:{name:t("trait_artifical_name"),desc:t("trait_artifical"),type:"genus",val:5,vars(r){switch(r||e.race.artifical||1){case .25:return[5];case .5:return[10];case 1:return[20];case 2:return[25];case 3:return[30]}}},powered:{name:t("trait_powered_name"),desc:t("trait_powered"),type:"genus",val:-6,vars(r){switch(r||e.race.powered||1){case .25:return[.35,5];case .5:return[.3,8];case 1:return[.2,16];case 2:return[.1,20];case 3:return[.05,24]}}},psychic:{name:t("trait_psychic_name"),desc:t("trait_psychic"),type:"genus",val:10,vars(r){switch(r||e.race.psychic||1){case .25:return[.35,5,.01,20];case .5:return[.65,10,.025,30];case 1:return[1,15,.05,40];case 2:return[1.25,20,.075,50];case 3:return[1.5,25,.1,60]}}},tormented:{name:t("trait_tormented_name"),desc:t("trait_tormented"),type:"genus",val:-25,vars(r){switch(r||e.race.tormented||1){case .25:return[99];case .5:return[95];case 1:return[90];case 2:return[80];case 3:return[75]}}},darkness:{name:t("trait_darkness_name"),desc:t("trait_darkness"),type:"genus",val:1,vars(r){switch(r||e.race.darkness||1){case .25:return[1];case .5:return[2];case 1:return[3];case 2:return[4];case 3:return[5]}}},unfathomable:{name:t("trait_unfathomable_name"),desc:t("trait_unfathomable"),type:"genus",val:15,vars(r){switch(r||e.race.unfathomable||1){case .25:return[1,.5,.05];case .5:return[1,.65,.08];case 1:return[2,.8,.1];case 2:return[2,.9,.12];case 3:return[3,1,.13]}}},creative:{name:t("trait_creative_name"),desc:t("trait_creative"),type:"major",val:8,vars(r){switch(r||e.race.creative||1){case .25:return[.0015,5];case .5:return[.0025,10];case 1:return[.005,20];case 2:return[.006,22];case 3:return[.0065,24]}}},diverse:{name:t("trait_diverse_name"),desc:t("trait_diverse"),type:"major",val:-4,vars(r){switch(r||e.race.diverse||1){case .25:return[35];case .5:return[30];case 1:return[25];case 2:return[20];case 3:return[15]}}},studious:{name:t("trait_studious_name"),desc:t("trait_studious"),type:"major",val:2,vars(r){switch(r||e.race.studious||1){case .25:return[.1,6];case .5:return[.15,8];case 1:return[.25,10];case 2:return[.35,12];case 3:return[.4,14]}}},arrogant:{name:t("trait_arrogant_name"),desc:t("trait_arrogant"),type:"major",val:-2,vars(r){switch(r||e.race.arrogant||1){case .25:return[14];case .5:return[12];case 1:return[10];case 2:return[8];case 3:return[6]}}},brute:{name:t("trait_brute_name"),desc:t("trait_brute"),type:"major",val:7,vars(r){switch(r||e.race.brute||1){case .25:return[20,50];case .5:return[25,60];case 1:return[50,100];case 2:return[60,120];case 3:return[65,140]}}},angry:{name:t("trait_angry_name"),desc:t("trait_angry"),type:"major",val:-1,vars(r){switch(r||e.race.angry||1){case .25:return[35];case .5:return[30];case 1:return[25];case 2:return[20];case 3:return[15]}}},lazy:{name:t("trait_lazy_name"),desc:t("trait_lazy"),type:"major",val:-4,vars(r){switch(r||e.race.lazy||1){case .25:return[14];case .5:return[12];case 1:return[10];case 2:return[8];case 3:return[6]}}},curious:{name:t("trait_curious_name"),desc:t("trait_curious"),type:"major",val:4,vars(r){switch(r||e.race.curious||1){case .25:return[.03];case .5:return[.05];case 1:return[.1];case 2:return[.12];case 3:return[.13]}}},pack_mentality:{name:t("trait_pack_mentality_name"),desc:t("trait_pack_mentality"),type:"major",val:4,vars(r){switch(r||e.race.pack_mentality||1){case .25:return[.04,.016];case .5:return[.035,.018];case 1:return[.03,.02];case 2:return[.026,.022];case 3:return[.024,.023]}}},tracker:{name:t("trait_tracker_name"),desc:t("trait_tracker"),type:"major",val:2,vars(r){switch(r||e.race.tracker||1){case .25:return[10];case .5:return[15];case 1:return[20];case 2:return[25];case 3:return[30]}}},playful:{name:t("trait_playful_name"),desc:t("trait_playful"),type:"major",val:5,vars(r){switch(r||e.race.playful||1){case .25:return[.3];case .5:return[.4];case 1:return[.5];case 2:return[.6];case 3:return[.7]}}},freespirit:{name:t("trait_freespirit_name"),desc:t("trait_freespirit"),type:"major",val:-3,vars(r){switch(r||e.race.freespirit||1){case .25:return[65];case .5:return[60];case 1:return[50];case 2:return[35];case 3:return[25]}}},beast_of_burden:{name:t("trait_beast_of_burden_name"),desc:t("trait_beast_of_burden"),type:"major",val:3},sniper:{name:t("trait_sniper_name"),desc:t("trait_sniper"),type:"major",val:6,vars(r){switch(r||e.race.sniper||1){case .25:return[4];case .5:return[6];case 1:return[8];case 2:return[9];case 3:return[10]}}},hooved:{name:t("trait_hooved_name"),desc:t("trait_hooved"),type:"major",val:-4,vars(r){switch(r||e.race.hooved||1){case .25:return[130];case .5:return[120];case 1:return[100];case 2:return[80];case 3:return[70]}}},rage:{name:t("trait_rage_name"),desc:t("trait_rage"),type:"major",val:4,vars(r){switch(r||e.race.rage||1){case .25:return[.3,20];case .5:return[.5,30];case 1:return[1,50];case 2:return[1.25,60];case 3:return[1.4,65]}}},heavy:{name:t("trait_heavy_name"),desc:t("trait_heavy"),type:"major",val:-4,vars(r){switch(r||e.race.heavy||1){case .25:return[18,10];case .5:return[15,8];case 1:return[10,5];case 2:return[8,4];case 3:return[6,3]}}},gnawer:{name:t("trait_gnawer_name"),desc:t("trait_gnawer"),type:"major",val:-1,vars(r){switch(r||e.race.gnawer||1){case .25:return[.5];case .5:return[.4];case 1:return[.25];case 2:return[.2];case 3:return[.15]}}},calm:{name:t("trait_calm_name"),desc:t("trait_calm"),type:"major",val:6,vars(r){switch(r||e.race.calm||1){case .25:return[7];case .5:return[8];case 1:return[10];case 2:return[12];case 3:return[13]}}},pack_rat:{name:t("trait_pack_rat_name"),desc:t("trait_pack_rat"),type:"major",val:3,vars(r){switch(r||e.race.pack_rat||1){case .25:return[5,2];case .5:return[6,3];case 1:return[10,5];case 2:return[15,8];case 3:return[20,10]}}},paranoid:{name:t("trait_paranoid_name"),desc:t("trait_paranoid"),type:"major",val:-3,vars(r){switch(r||e.race.paranoid||1){case .25:return[14];case .5:return[12];case 1:return[10];case 2:return[8];case 3:return[6]}}},greedy:{name:t("trait_greedy_name"),desc:t("trait_greedy"),type:"major",val:-5,vars(r){switch(r||e.race.greedy||1){case .25:return[17.5];case .5:return[15];case 1:return[12.5];case 2:return[10];case 3:return[8]}}},merchant:{name:t("trait_merchant_name"),desc:t("trait_merchant"),type:"major",val:3,vars(r){switch(r||e.race.merchant||1){case .25:return[10,3];case .5:return[15,5];case 1:return[25,10];case 2:return[35,12];case 3:return[40,13]}}},smart:{name:t("trait_smart_name"),desc:t("trait_smart"),type:"major",val:6,vars(r){switch(r||e.race.smart||1){case .25:return[3];case .5:return[5];case 1:return[10];case 2:return[12];case 3:return[13]}}},puny:{name:t("trait_puny_name"),desc:t("trait_puny"),type:"major",val:-4,vars(r){switch(r||e.race.puny||1){case .25:return[18];case .5:return[15];case 1:return[10];case 2:return[6];case 3:return[4]}}},dumb:{name:t("trait_dumb_name"),desc:t("trait_dumb"),type:"major",val:-5,vars(r){switch(r||e.race.dumb||1){case .25:return[7];case .5:return[6];case 1:return[5];case 2:return[4];case 3:return[3]}}},tough:{name:t("trait_tough_name"),desc:t("trait_tough"),type:"major",val:4,vars(r){switch(r||e.race.tough||1){case .25:return[10];case .5:return[15];case 1:return[25];case 2:return[35];case 3:return[40]}}},nearsighted:{name:t("trait_nearsighted_name"),desc:t("trait_nearsighted"),type:"major",val:-4,vars(r){switch(r||e.race.nearsighted||1){case .25:return[18];case .5:return[15];case 1:return[12];case 2:return[10];case 3:return[8]}}},intelligent:{name:t("trait_intelligent_name"),desc:t("trait_intelligent"),type:"major",val:7,vars(r){switch(r||e.race.intelligent||1){case .25:return[.08,.15];case .5:return[.1,.2];case 1:return[.125,.25];case 2:return[.14,.3];case 3:return[.15,.32]}}},regenerative:{name:t("trait_regenerative_name"),desc:t("trait_regenerative"),type:"major",val:8,vars(r){switch(r||e.race.regenerative||1){case .25:return[2];case .5:return[3];case 1:return[4];case 2:return[5];case 3:return[6]}}},gluttony:{name:t("trait_gluttony_name"),desc:t("trait_gluttony"),type:"major",val:-2,vars(r){switch(r||e.race.gluttony||1){case .25:return[20];case .5:return[15];case 1:return[10];case 2:return[8];case 3:return[6]}}},slow:{name:t("trait_slow_name"),desc:t("trait_slow"),type:"major",val:-5,vars(r){switch(r||e.race.slow||1){case .25:return[13];case .5:return[12];case 1:return[10];case 2:return[8];case 3:return[6]}}},armored:{name:t("trait_armored_name"),desc:t("trait_armored"),type:"major",val:4,vars(r){switch(r||e.race.armored||1){case .25:return[15,1];case .5:return[25,1];case 1:return[50,2];case 2:return[70,2];case 3:return[80,2]}}},optimistic:{name:t("trait_optimistic_name"),desc:t("trait_optimistic"),type:"major",val:5,vars(r){switch(r||e.race.optimistic||1){case .25:return[4,6];case .5:return[5,8];case 1:return[10,10];case 2:return[15,13];case 3:return[18,15]}}},chameleon:{name:t("trait_chameleon_name"),desc:t("trait_chameleon"),type:"major",val:6,vars(r){switch(r||e.race.chameleon||1){case .25:return[5,10];case .5:return[10,15];case 1:return[20,20];case 2:return[25,25];case 3:return[30,30]}}},slow_digestion:{name:t("trait_slow_digestion_name"),desc:t("trait_slow_digestion"),type:"major",val:1,vars(r){switch(r||e.race.slow_digestion||1){case .25:return[.3];case .5:return[.5];case 1:return[.75];case 2:return[1];case 3:return[1.25]}}},hard_of_hearing:{name:t("trait_hard_of_hearing_name"),desc:t("trait_hard_of_hearing"),type:"major",val:-3,vars(r){switch(r||e.race.hard_of_hearing||1){case .25:return[7];case .5:return[6];case 1:return[5];case 2:return[4];case 3:return[3]}}},resourceful:{name:t("trait_resourceful_name"),desc:t("trait_resourceful"),type:"major",val:4,vars(r){switch(r||e.race.resourceful||1){case .25:return[6];case .5:return[8];case 1:return[12];case 2:return[16];case 3:return[18]}}},selenophobia:{name:t("trait_selenophobia_name"),desc:t("trait_selenophobia"),type:"major",val:-6,vars(r){switch(r||e.race.selenophobia||1){case .25:return[2];case .5:return[3];case 1:return[4];case 2:return[5];case 3:return[6]}}},leathery:{name:t("trait_leathery_name"),desc:t("trait_leathery"),type:"major",val:2,vars(r){switch(r||e.race.leathery||1){case .25:return[4];case .5:return[3];case 1:return[2];case 2:return[1];case 3:return[0]}}},pessimistic:{name:t("trait_pessimistic_name"),desc:t("trait_pessimistic"),type:"major",val:-1,vars(r){switch(r||e.race.pessimistic||1){case .25:return[4];case .5:return[3];case 1:return[2];case 2:return[1];case 3:return[1]}}},hoarder:{name:t("trait_hoarder_name"),desc:t("trait_hoarder"),type:"major",val:4,vars(r){switch(r||e.race.hoarder||1){case .25:return[5];case .5:return[10];case 1:return[20];case 2:return[25];case 3:return[30]}}},solitary:{name:t("trait_solitary_name"),desc:t("trait_solitary"),type:"major",val:-1,vars(r){switch(r||e.race.solitary||1){case .25:return[.01,.025];case .5:return[.01,.02];case 1:return[.02,.02];case 2:return[.025,.02];case 3:return[.025,.015]}}},kindling_kindred:{name:t("trait_kindling_kindred_name"),desc:t("trait_kindling_kindred"),type:"major",val:8,vars(r){switch(r||e.race.kindling_kindred||1){case .25:return[10];case .5:return[8];case 1:return[5];case 2:return[4];case 3:return[3]}}},pyrophobia:{name:t("trait_pyrophobia_name"),desc:t("trait_pyrophobia"),type:"major",val:-4,vars(r){switch(r||e.race.pyrophobia||1){case .25:return[14];case .5:return[12];case 1:return[10];case 2:return[8];case 3:return[6]}}},hyper:{name:t("trait_hyper_name"),desc:t("trait_hyper"),type:"major",val:4,vars(r){switch(r||e.race.hyper||1){case .25:return[2];case .5:return[3];case 1:return[5];case 2:return[6];case 3:return[7]}}},skittish:{name:t("trait_skittish_name"),desc:t("trait_skittish"),type:"major",val:-4,vars(r){switch(r||e.race.skittish||1){case .25:return[18];case .5:return[15];case 1:return[12];case 2:return[8];case 3:return[6]}}},fragrant:{name:t("trait_fragrant_name"),desc:t("trait_fragrant"),type:"major",val:-3,vars(r){switch(r||e.race.fragrant||1){case .25:return[35];case .5:return[30];case 1:return[20];case 2:return[15];case 3:return[12]}}},sticky:{name:t("trait_sticky_name"),desc:t("trait_sticky"),type:"major",val:3,vars(r){switch(r||e.race.sticky||1){case .25:return[5,5];case .5:return[10,8];case 1:return[20,15];case 2:return[25,18];case 3:return[30,20]}}},infectious:{name:t("trait_infectious_name"),desc:t("trait_infectious"),type:"major",val:4,vars(r){switch(r||e.race.infectious||1){case .25:return[1,2,3,7,18];case .5:return[1,2,4,8,20];case 1:return[2,3,5,10,25];case 2:return[2,4,6,12,30];case 3:return[3,4,7,13,32]}}},parasite:{name:t("trait_parasite_name"),desc:t("trait_parasite"),type:"major",val:-4},toxic:{name:t("trait_toxic_name"),desc:t("trait_toxic"),type:"major",val:5,vars(r){switch(r||e.race.toxic||1){case .25:return[5,3,10];case .5:return[10,5,15];case 1:return[20,8,30];case 2:return[25,10,40];case 3:return[30,12,45]}}},nyctophilia:{name:t("trait_nyctophilia_name"),desc:t("trait_nyctophilia"),type:"major",val:-3,vars(r){switch(r||e.race.nyctophilia||1){case .25:return[10,6];case .5:return[8,5];case 1:return[5,2];case 2:return[3,1];case 3:return[2,1]}}},infiltrator:{name:t("trait_infiltrator_name"),desc:t("trait_infiltrator"),type:"major",val:4,vars(r){switch(r||e.race.infiltrator||1){case .25:return[110];case .5:return[100];case 1:return[90];case 2:return[85];case 3:return[80]}}},hibernator:{name:t("trait_hibernator_name"),desc:t("trait_hibernator"),type:"major",val:-3,vars(r){switch(r||e.race.hibernator||1){case .25:return[15,8];case .5:return[20,8];case 1:return[25,8];case 2:return[30,6];case 3:return[35,5]}}},cannibalize:{name:t("trait_cannibalize_name"),desc:t("trait_cannibalize"),type:"major",val:5,vars(r){switch(r||e.race.cannibalize||1){case .25:return[8];case .5:return[10];case 1:return[15];case 2:return[20];case 3:return[22]}}},frail:{name:t("trait_frail_name"),desc:t("trait_frail"),type:"major",val:-5,vars(r){switch(r||e.race.frail||1){case .25:return[2,2];case .5:return[1,2];case 1:return[1,1];case 2:return[1,0];case 3:return[1,0]}}},malnutrition:{name:t("trait_malnutrition_name"),desc:t("trait_malnutrition"),type:"major",val:1,vars(r){switch(r||e.race.malnutrition||1){case .25:return[10];case .5:return[12];case 1:return[25];case 2:return[40];case 3:return[50]}}},claws:{name:t("trait_claws_name"),desc:t("trait_claws"),type:"major",val:5,vars(r){switch(r||e.race.claws||1){case .25:return[8];case .5:return[12];case 1:return[25];case 2:return[32];case 3:return[35]}}},atrophy:{name:t("trait_atrophy_name"),desc:t("trait_atrophy"),type:"major",val:-1,vars(r){switch(r||e.race.atrophy||1){case .25:return[.35];case .5:return[.25];case 1:return[.15];case 2:return[.1];case 3:return[.08]}}},hivemind:{name:t("trait_hivemind_name"),desc:t("trait_hivemind"),type:"major",val:9,vars(r){switch(r||e.race.hivemind||1){case .25:return[12];case .5:return[11];case 1:return[10];case 2:return[8];case 3:return[7]}}},tunneler:{name:t("trait_tunneler_name"),desc:t("trait_tunneler"),type:"major",val:2,vars(r){switch(r||e.race.tunneler||1){case .25:return[.002];case .5:return[.005];case 1:return[.01];case 2:return[.015];case 3:return[.018]}}},blood_thirst:{name:t("trait_blood_thirst_name"),desc:t("trait_blood_thirst"),type:"major",val:5,vars(r){switch(r||e.race.blood_thirst||1){case .25:return[25e4];case .5:return[5e5];case 1:return[1e6];case 2:return[2e6];case 3:return[4e6]}}},apex_predator:{name:t("trait_apex_predator_name"),desc:t("trait_apex_predator"),type:"major",val:6,vars(r){switch(r||e.race.apex_predator||1){case .25:return[15,20];case .5:return[20,30];case 1:return[30,50];case 2:return[40,60];case 3:return[45,65]}}},invertebrate:{name:t("trait_invertebrate_name"),desc:t("trait_invertebrate"),type:"major",val:-2,vars(r){switch(r||e.race.invertebrate||1){case .25:return[25];case .5:return[20];case 1:return[10];case 2:return[8];case 3:return[5]}}},suction_grip:{name:t("trait_suction_grip_name"),desc:t("trait_suction_grip"),type:"major",val:4,vars(r){switch(r||e.race.suction_grip||1){case .25:return[5];case .5:return[6];case 1:return[8];case 2:return[12];case 3:return[14]}}},befuddle:{name:t("trait_befuddle_name"),desc:t("trait_befuddle"),type:"major",val:4,vars(r){switch(r||e.race.befuddle||1){case .25:return[20];case .5:return[30];case 1:return[50];case 2:return[75];case 3:return[85]}}},environmentalist:{name:t("trait_environmentalist_name"),desc:t("trait_environmentalist"),type:"major",val:-5},unorganized:{name:t("trait_unorganized_name"),desc:t("trait_unorganized"),type:"major",val:-2,vars(r){switch(r||e.race.unorganized||1){case .25:return[90];case .5:return[80];case 1:return[50];case 2:return[40];case 3:return[30]}}},musical:{name:t("trait_musical_name"),desc:t("trait_musical"),type:"major",val:5,vars(r){switch(r||e.race.musical||1){case .25:return[.25];case .5:return[.5];case 1:return[1];case 2:return[1.1];case 3:return[1.2]}}},revive:{name:t("trait_revive_name"),desc:t("trait_revive"),type:"major",val:4,vars(r){switch(r||e.race.revive||1){case .25:return[7,5,2,8,6,3,4];case .5:return[6,4,2,7,5,2.5,4];case 1:return[5,3,1.5,6,4,2,3];case 2:return[4,2,1,5,3,1.5,2];case 3:return[3,1.5,1,4,2.5,1,2]}}},slow_regen:{name:t("trait_slow_regen_name"),desc:t("trait_slow_regen"),type:"major",val:-4,vars(r){switch(r||e.race.slow_regen||1){case .25:return[40];case .5:return[35];case 1:return[25];case 2:return[20];case 3:return[15]}}},forge:{name:t("trait_forge_name"),desc:t("trait_forge"),type:"major",val:4,vars(r){switch(r||e.race.forge||1){case .25:return[.5];case .5:return[1];case 1:return[2];case 2:return[2.5];case 3:return[3]}}},autoignition:{name:t("trait_autoignition_name"),desc:t("trait_autoignition"),type:"major",val:-4,vars(r){switch(r||e.race.autoignition||1){case .25:return[4];case .5:return[3];case 1:return[2];case 2:return[1.5];case 3:return[1]}}},blurry:{name:t("trait_blurry_name"),desc:t("trait_blurry"),type:"major",val:5,vars(r){switch(r||e.race.blurry||1){case .25:return[10];case .5:return[15];case 1:return[25];case 2:return[35];case 3:return[40]}}},snowy:{name:t("trait_snowy_name"),desc:t("trait_snowy"),type:"major",val:-3,vars(r){switch(r||e.race.snowy||1){case .25:return[4,10];case .5:return[3,8];case 1:return[2,5];case 2:return[2,4];case 3:return[1,3]}}},ravenous:{name:t("trait_ravenous_name"),desc:t("trait_ravenous"),type:"major",val:-5,vars(r){switch(r||e.race.ravenous||1){case .25:return[30,2];case .5:return[25,2];case 1:return[20,3];case 2:return[15,4];case 3:return[10,4]}}},ghostly:{name:t("trait_ghostly_name"),desc:t("trait_ghostly"),type:"major",val:5,vars(r){switch(r||e.race.ghostly||1){case .25:return[20,1.2,5];case .5:return[25,1.25,10];case 1:return[50,1.5,15];case 2:return[60,1.6,20];case 3:return[65,1.7,22]}}},lawless:{name:t("trait_lawless_name"),desc:t("trait_lawless"),type:"major",val:3,vars(r){switch(r||e.race.lawless||1){case .25:return[30];case .5:return[50];case 1:return[90];case 2:return[95];case 3:return[98]}}},mistrustful:{name:t("trait_mistrustful_name"),desc:t("trait_mistrustful"),type:"major",val:-1,vars(r){switch(r||e.race.mistrustful||1){case .25:return[4];case .5:return[3];case 1:return[2];case 2:return[1];case 3:return[1]}}},humpback:{name:t("trait_humpback_name"),desc:t("trait_humpback"),type:"major",val:4,vars(r){switch(r||e.race.humpback||1){case .25:return[.2,8];case .5:return[.25,10];case 1:return[.5,20];case 2:return[.75,25];case 3:return[.8,30]}}},thalassophobia:{name:t("trait_thalassophobia_name"),desc:t("trait_thalassophobia"),type:"major",val:-4},fiery:{name:t("trait_fiery_name"),desc:t("trait_fiery"),type:"major",val:10,vars(r){switch(r||e.race.fiery||1){case .25:return[30,15];case .5:return[40,18];case 1:return[65,25];case 2:return[70,35];case 3:return[72,38]}}},terrifying:{name:t("trait_terrifying_name"),desc:t("trait_terrifying"),type:"major",val:6,vars(r){switch(r||e.race.terrifying||1){case .25:return[8,20];case .5:return[10,25];case 1:return[12,32];case 2:return[12,34];case 3:return[12,36]}}},slaver:{name:t("trait_slaver_name"),desc:t("trait_slaver"),type:"major",val:12,vars(r){switch(r||e.race.slaver||1){case .25:return[.1];case .5:return[.14];case 1:return[.28];case 2:return[.3];case 3:return[.32]}}},compact:{name:t("trait_compact_name"),desc:t("trait_compact"),type:"major",val:10,vars(r){switch(r||e.race.compact||1){case .25:return[.005,.003];case .5:return[.01,.005];case 1:return[.015,.0075];case 2:return[.018,.0085];case 3:return[.02,.009]}}},conniving:{name:t("trait_conniving_name"),desc:t("trait_conniving"),type:"major",val:4,vars(r){switch(r||e.race.conniving||1){case .25:return[2,8];case .5:return[3,10];case 1:return[5,15];case 2:return[8,20];case 3:return[10,24]}}},pathetic:{name:t("trait_pathetic_name"),desc:t("trait_pathetic"),type:"major",val:-5,vars(r){switch(r||e.race.pathetic||1){case .25:return[35];case .5:return[30];case 1:return[25];case 2:return[20];case 3:return[15]}}},spiritual:{name:t("trait_spiritual_name"),desc:t("trait_spiritual"),type:"major",val:4,vars(r){switch(r||e.race.spiritual||1){case .25:return[8];case .5:return[10];case 1:return[13];case 2:return[15];case 3:return[18]}}},truthful:{name:t("trait_truthful_name"),desc:t("trait_truthful"),type:"major",val:-7,vars(r){switch(r||e.race.truthful||1){case .25:return[75];case .5:return[65];case 1:return[50];case 2:return[30];case 3:return[20]}}},unified:{name:t("trait_unified_name"),desc:t("trait_unified"),type:"major",val:4,vars(r){switch(r||e.race.unified||1){case .25:return[0];case .5:return[1];case 1:return[3];case 2:return[5];case 3:return[7]}}},rainbow:{name:t("trait_rainbow_name"),desc:t("trait_rainbow"),type:"major",val:3,vars(r){switch(r||e.race.rainbow||1){case .25:return[20];case .5:return[30];case 1:return[50];case 2:return[80];case 3:return[100]}}},magnificent:{name:t("trait_magnificent_name"),desc:t("trait_magnificent"),type:"major",val:6,vars(r){switch(r||e.race.magnificent||1){case .25:return[300,1,.5,.75,1];case .5:return[350,2,.75,.8,1];case 1:return[400,3,1,1,1];case 2:return[450,3,1.5,1.5,1.5];case 3:return[500,3,2,2,2]}}},noble:{name:t("trait_noble_name"),desc:t("trait_noble"),type:"major",val:-3,vars(r){switch(r||e.race.noble||1){case .25:return[15,20];case .5:return[12,20];case 1:return[10,20];case 2:return[10,24];case 3:return[10,28]}}},imitation:{name:t("trait_imitation_name"),desc:t("trait_imitation"),type:"major",val:6,vars(r){switch(r||e.race.imitation||1){case .25:return[.25,.5];case .5:return[.25,1];case 1:return[.5,1];case 2:return[.5,2];case 3:return[1,2]}}},emotionless:{name:t("trait_emotionless_name"),desc:t("trait_emotionless"),type:"major",val:-4,vars(r){switch(r||e.race.emotionless||1){case .25:return[50,10];case .5:return[45,10];case 1:return[35,13];case 2:return[25,15];case 3:return[20,15]}}},logical:{name:t("trait_logical_name"),desc:t("trait_logical"),type:"major",val:6,vars(r){switch(r||e.race.logical||1){case .25:return[25,10];case .5:return[50,15];case 1:return[100,25];case 2:return[125,30];case 3:return[150,32]}}},shapeshifter:{name:t("trait_shapeshifter_name"),desc:t("trait_shapeshifter"),type:"major",val:10,vars(r){switch(r||e.race.shapeshifter||1){case .25:return[.25,.5];case .5:return[.25,1];case 1:return[.5,1];case 2:return[.5,2];case 3:return[1,2]}}},deconstructor:{name:t("trait_deconstructor_name"),desc:t("trait_deconstructor"),type:"major",val:-4,vars(r){switch(r||e.race.deconstructor||1){case .25:return[40];case .5:return[60];case 1:return[100];case 2:return[125];case 3:return[140]}}},linked:{name:t("trait_linked_name"),desc:t("trait_linked"),type:"major",val:4,vars(r){switch(r||e.race.linked||1){case .25:return[.03,40];case .5:return[.05,40];case 1:return[.1,80];case 2:return[.12,100];case 3:return[.14,100]}}},dark_dweller:{name:t("trait_dark_dweller_name"),desc:t("trait_dark_dweller"),type:"major",val:-3,vars(r){switch(r||e.race.dark_dweller||1){case .25:return[90];case .5:return[75];case 1:return[60];case 2:return[45];case 3:return[30]}}},swift:{name:t("trait_swift_name"),desc:t("trait_swift"),type:"major",val:10,vars(r){switch(r||e.race.swift||1){case .25:return[35,15];case .5:return[55,30];case 1:return[75,45];case 2:return[85,55];case 3:return[90,65]}}},anthropophagite:{name:t("trait_anthropophagite_name"),desc:t("trait_anthropophagite"),type:"major",val:-2,vars(r){switch(r||e.race.anthropophagite||1){case .25:return[.4];case .5:return[.65];case 1:return[1];case 2:return[1.5];case 3:return[2]}}},living_tool:{name:t("trait_living_tool_name"),desc:t("trait_living_tool"),type:"major",val:12,vars(r){switch(r||e.race.living_tool||1){case .25:return[.65,5];case .5:return[.8,12];case 1:return[1,25];case 2:return[1.1,35];case 3:return[1.2,42]}}},bloated:{name:t("trait_bloated_name"),desc:t("trait_bloated"),type:"major",val:-10,vars(r){switch(r||e.race.bloated||1){case .25:return[25];case .5:return[20];case 1:return[15];case 2:return[10];case 3:return[5]}}},ooze:{name:t("trait_ooze_name"),desc:t("trait_ooze"),type:"major",val:-50,vars(r){switch(r||e.race.ooze||1){case .25:return[20,25,40];case .5:return[15,20,35];case 1:return[12,15,30];case 2:return[10,12,25];case 3:return[8,10,20]}}},soul_eater:{name:t("trait_soul_eater_name"),desc:t("trait_soul_eater"),type:"special",val:0},untapped:{name:t("trait_untapped_name"),desc:t("trait_untapped"),type:"special",val:0},emfield:{name:t("trait_emfield_name"),desc:t("trait_emfield"),type:"special",val:-20},tactical:{name:t("trait_tactical_name"),desc:t("trait_tactical"),type:"minor",vars(r){return[5]}},analytical:{name:t("trait_analytical_name"),desc:t("trait_analytical"),type:"minor",vars(r){return[1]}},promiscuous:{name:t("trait_promiscuous_name"),desc:t("trait_promiscuous"),type:"minor",vars(r){return[1,.02]}},resilient:{name:t("trait_resilient_name"),desc:t("trait_resilient"),type:"minor",vars(r){return[2]}},cunning:{name:t("trait_cunning_name"),desc:t("trait_cunning"),type:"minor",vars(r){return[5]}},hardy:{name:t("trait_hardy_name"),desc:t("trait_hardy"),type:"minor",vars(r){return[1]}},ambidextrous:{name:t("trait_ambidextrous_name"),desc:t("trait_ambidextrous"),type:"minor",vars(r){return[3,2]}},industrious:{name:t("trait_industrious_name"),desc:t("trait_industrious"),type:"minor",vars(r){return[2]}},content:{name:t("trait_content_name"),desc:t("trait_content"),type:"minor"},fibroblast:{name:t("trait_fibroblast_name"),desc:t("trait_fibroblast"),type:"minor",vars(r){return[2]}},metallurgist:{name:t("trait_metallurgist_name"),desc:t("trait_metallurgist"),type:"minor",vars(r){return[4]}},gambler:{name:t("trait_gambler_name"),desc:t("trait_gambler"),type:"minor",vars(r){return[4]}},persuasive:{name:t("trait_persuasive_name"),desc:t("trait_persuasive"),type:"minor",vars(r){return[1]}},fortify:{name:t("trait_fortify_name"),desc:t("trait_fortify"),type:"special"},mastery:{name:t("trait_mastery_name"),desc:t("trait_mastery"),type:"special",vars(r){return[1]}}},A={protoplasm:{name:t("race_protoplasm"),desc:t("race_protoplasm_desc"),type:"organism",home:t("race_prehistoric"),entity:t("race_protoplasm_entity"),traits:{},solar:{red:t("race_human_solar_red"),hell:t("race_human_solar_hell"),gas:t("race_human_solar_gas"),gas_moon:t("race_human_solar_gas_moon"),dwarf:t("race_human_solar_dwarf")},fanaticism:"none",basic(){return!1}},human:{name:t("race_human"),desc:t("race_human_desc"),type:"humanoid",home:t("race_human_home"),entity:t("race_human_entity"),traits:{creative:1,diverse:1},solar:{red:t("race_human_solar_red"),hell:t("race_human_solar_hell"),gas:t("race_human_solar_gas"),gas_moon:t("race_human_solar_gas_moon"),dwarf:t("race_human_solar_dwarf")},fanaticism:"creative",basic(){return!0}},elven:{name:t("race_elven"),desc:t(me("elven")?"race_xmas_elf_desc":"race_elven_desc"),type:"humanoid",home:t(me("elven")?"race_xmas_elf_home":"race_elven_home"),entity:me("elven")?t("race_xmas_elf_entity"):t("race_elven_entity"),traits:{studious:1,arrogant:1},solar:{red:t(me("elven")?"race_xmas_elf_solar_red":"race_elven_solar_red"),hell:t(me("elven")?"race_xmas_elf_solar_hell":"race_elven_solar_hell"),gas:t(me("elven")?"race_xmas_elf_solar_gas":"race_elven_solar_gas"),gas_moon:t(me("elven")?"race_xmas_elf_solar_gas_moon":"race_elven_solar_gas_moon"),dwarf:t(me("elven")?"race_xmas_elf_solar_dwarf":"race_elven_solar_dwarf")},fanaticism:"studious",basic(){return!0}},orc:{name:t("race_orc"),desc:t("race_orc_desc"),type:"humanoid",home:t("race_orc_home"),entity:t("race_orc_entity"),traits:{brute:1,angry:1},solar:{red:t("race_orc_solar_red"),hell:t("race_orc_solar_hell"),gas:t("race_orc_solar_gas"),gas_moon:t("race_orc_solar_gas_moon"),dwarf:t("race_orc_solar_dwarf")},fanaticism:"brute",basic(){return!0}},cath:{name:t("race_cath"),desc:t("race_cath_desc"),type:"carnivore",home:t("race_cath_home"),entity:t("race_cath_entity"),traits:{lazy:1,curious:1},solar:{red:t("race_cath_solar_red"),hell:t("race_cath_solar_hell"),gas:t("race_cath_solar_gas"),gas_moon:t("race_cath_solar_gas_moon"),dwarf:t("race_cath_solar_dwarf")},fanaticism:"curious",basic(){return!0}},wolven:{name:me("wolven")?t("race_rabbit"):t("race_wolven"),desc:me("wolven")?t("race_rabbit_desc"):t("race_wolven_desc"),type:"carnivore",home:me("wolven")?t("race_rabbit_home"):t("race_wolven_home"),entity:me("wolven")?t("race_rabbit_entity"):t("race_wolven_entity"),traits:{pack_mentality:1,tracker:1},solar:{red:me("wolven")?t("race_rabbit_solar_red"):t("race_wolven_solar_red"),hell:me("wolven")?t("race_rabbit_solar_hell"):t("race_wolven_solar_hell"),gas:me("wolven")?t("race_rabbit_solar_gas"):t("race_wolven_solar_gas"),gas_moon:me("wolven")?t("race_rabbit_solar_gas_moon"):t("race_wolven_solar_gas_moon"),dwarf:me("wolven")?t("race_rabbit_solar_dwarf"):t("race_wolven_solar_dwarf")},fanaticism:"tracker",basic(){return!0}},vulpine:{name:me("vulpine")?t("race_chocolate_rabbit"):t(e.race.universe==="magic"?"race_kitsune":"race_vulpine"),desc(){return me("vulpine")?t("race_chocolate_rabbit_desc"):t("race_vulpine_desc",[t(e.race.universe==="magic"?"race_kitsune":"race_vulpine"),x0()])},type:"carnivore",home:me("vulpine")?t("race_chocolate_rabbit_home"):t("race_vulpine_home"),entity:me("vulpine")?t("race_chocolate_rabbit_entity"):t("race_vulpine_entity"),traits:{playful:1,freespirit:1},solar:{red:me("vulpine")?t("race_chocolate_rabbit_solar_red"):t("race_vulpine_solar_red"),hell:me("vulpine")?t("race_chocolate_rabbit_solar_hell"):t("race_vulpine_solar_hell"),gas:me("vulpine")?t("race_chocolate_rabbit_solar_gas"):t("race_vulpine_solar_gas"),gas_moon:me("vulpine")?t("race_chocolate_rabbit_solar_gas_moon"):t("race_vulpine_solar_gas_moon"),dwarf:me("vulpine")?t("race_chocolate_rabbit_solar_dwarf"):t("race_vulpine_solar_dwarf")},fanaticism:"playful",basic(){return!0}},centaur:{name:t(me("centaur")?"race_reindeer":"race_centaur"),desc:t(me("centaur")?"race_reindeer_desc":"race_centaur_desc"),type:"herbivore",home:t(me("centaur")?"race_reindeer_home":"race_centaur_home"),entity:t(me("centaur")?"race_reindeer_entity":"race_centaur_entity"),traits:{sniper:1,hooved:1},solar:{red:t(me("centaur")?"race_reindeer_solar_red":"race_centaur_solar_red"),hell:t(me("centaur")?"race_reindeer_solar_hell":"race_centaur_solar_hell"),gas:t(me("centaur")?"race_reindeer_solar_gas":"race_centaur_solar_gas"),gas_moon:t(me("centaur")?"race_reindeer_solar_gas_moon":"race_centaur_solar_gas_moon"),dwarf:t(me("centaur")?"race_reindeer_solar_dwarf":"race_centaur_solar_dwarf")},fanaticism:"sniper",basic(){return!0}},rhinotaur:{name:t("race_rhinotaur"),desc:t("race_rhinotaur_desc"),type:"herbivore",home:t("race_rhinotaur_home"),entity:t("race_rhinotaur_entity"),traits:{rage:1,heavy:1},solar:{red:t("race_rhinotaur_solar_red"),hell:t("race_rhinotaur_solar_hell"),gas:t("race_rhinotaur_solar_gas"),gas_moon:t("race_rhinotaur_solar_gas_moon"),dwarf:t("race_rhinotaur_solar_dwarf")},fanaticism:"rage",basic(){return!0}},capybara:{name:t(me("capybara")?"race_donkey":"race_capybara"),desc:t(me("capybara")?"race_donkey_desc":"race_capybara_desc"),type:"herbivore",home:t(me("capybara")?"race_donkey_home":"race_capybara_home"),entity:t(me("capybara")?"race_donkey_entity":"race_capybara_entity"),traits:{gnawer:1,calm:1},solar:{red:t(me("capybara")?"race_donkey_solar_red":"race_capybara_solar_red"),hell:t(me("capybara")?"race_donkey_solar_hell":"race_capybara_solar_hell"),gas:t(me("capybara")?"race_donkey_solar_gas":"race_capybara_solar_gas"),gas_moon:t(me("capybara")?"race_donkey_solar_gas_moon":"race_capybara_solar_gas_moon"),dwarf:t(me("capybara")?"race_donkey_solar_dwarf":"race_capybara_solar_dwarf")},fanaticism:"calm",basic(){return!0}},kobold:{name:t("race_kobold"),desc:t("race_kobold_desc"),type:"small",home:t("race_kobold_home"),entity:t("race_kobold_entity"),traits:{pack_rat:1,paranoid:1},solar:{red:t("race_kobold_solar_red"),hell:t("race_kobold_solar_hell"),gas:t("race_kobold_solar_gas"),gas_moon:t("race_kobold_solar_gas_moon"),dwarf:t("race_kobold_solar_dwarf")},fanaticism:"pack_rat",basic(){return!0}},goblin:{name:t("race_goblin"),desc:t("race_goblin_desc"),type:"small",home:t("race_goblin_home"),entity:t("race_goblin_entity"),traits:{greedy:1,merchant:1},solar:{red:t("race_goblin_solar_red"),hell:t("race_goblin_solar_hell"),gas:t("race_goblin_solar_gas"),gas_moon:t("race_goblin_solar_gas_moon"),dwarf:t("race_goblin_solar_dwarf")},fanaticism:"merchant",basic(){return!0}},gnome:{name:t("race_gnome"),desc:t("race_gnome_desc"),type:"small",home:t("race_gnome_home"),entity:t("race_gnome_entity"),traits:{smart:1,puny:1},solar:{red:t("race_gnome_solar_red"),hell:t("race_gnome_solar_hell"),gas:t("race_gnome_solar_gas"),gas_moon:t("race_gnome_solar_gas_moon"),dwarf:t("race_gnome_solar_dwarf")},fanaticism:"smart",basic(){return!0}},ogre:{name:t("race_ogre"),desc:t("race_ogre_desc"),type:"giant",home:t("race_ogre_home"),entity:t("race_ogre_entity"),traits:{dumb:1,tough:1},solar:{red:t("race_ogre_solar_red"),hell:t("race_ogre_solar_hell"),gas:t("race_ogre_solar_gas"),gas_moon:t("race_ogre_solar_gas_moon"),dwarf:t("race_ogre_solar_dwarf")},fanaticism:"tough",basic(){return!0}},cyclops:{name:t("race_cyclops"),desc:t("race_cyclops_desc"),type:"giant",home:t("race_cyclops_home"),entity:t("race_cyclops_entity"),traits:{nearsighted:1,intelligent:1},solar:{red:t("race_cyclops_solar_red"),hell:t("race_cyclops_solar_hell"),gas:t("race_cyclops_solar_gas"),gas_moon:t("race_cyclops_solar_gas_moon"),dwarf:t("race_cyclops_solar_dwarf")},fanaticism:"intelligent",basic(){return!0}},troll:{name:t("race_troll"),desc:t("race_troll_desc"),type:"giant",home:t("race_troll_home"),entity:t("race_troll_entity"),traits:{regenerative:1,gluttony:1},solar:{red:t("race_troll_solar_red"),hell:t("race_troll_solar_hell"),gas:t("race_troll_solar_gas"),gas_moon:t("race_troll_solar_gas_moon"),dwarf:t("race_troll_solar_dwarf")},fanaticism:"regenerative",basic(){return!0}},tortoisan:{name:t("race_tortoisan"),desc(){return t("race_tortoisan_desc",[$0()])},type:"reptilian",home:t("race_tortoisan_home"),entity:t("race_tortoisan_entity"),traits:{slow:1,armored:1},solar:{red:t("race_tortoisan_solar_red"),hell:t("race_tortoisan_solar_hell"),gas:t("race_tortoisan_solar_gas"),gas_moon:t("race_tortoisan_solar_gas_moon"),dwarf:t("race_tortoisan_solar_dwarf")},fanaticism:"armored",basic(){return!0}},gecko:{name:t("race_gecko"),desc:t("race_gecko_desc"),type:"reptilian",home:t("race_gecko_home"),entity:t("race_gecko_entity"),traits:{optimistic:1,chameleon:1},solar:{red:t("race_gecko_solar_red"),hell:t("race_gecko_solar_hell"),gas:t("race_gecko_solar_gas"),gas_moon:t("race_gecko_solar_gas_moon"),dwarf:t("race_gecko_solar_dwarf")},fanaticism:"optimistic",basic(){return!0}},slitheryn:{name:t("race_slitheryn"),desc:t("race_slitheryn_desc"),type:"reptilian",home:t("race_slitheryn_home"),entity:t("race_slitheryn_entity"),traits:{slow_digestion:1,hard_of_hearing:1},solar:{red:t("race_slitheryn_solar_red"),hell:t("race_slitheryn_solar_hell"),gas:t("race_slitheryn_solar_gas"),gas_moon:t("race_slitheryn_solar_gas_moon"),dwarf:t("race_slitheryn_solar_dwarf")},fanaticism:"slow_digestion",basic(){return!0}},arraak:{name:t(me("arraak")?"race_turkey":"race_arraak"),desc:t(me("arraak")?"race_turkey_desc":"race_arraak_desc"),type:"avian",home:t(me("arraak")?"race_turkey_home":"race_arraak_home"),entity:me("arraak")?t("race_turkey_entity"):t("race_arraak_entity"),traits:{resourceful:1,selenophobia:1},solar:{red:t(me("arraak")?"race_turkey_solar_red":"race_arraak_solar_red"),hell:t(me("arraak")?"race_turkey_solar_hell":"race_arraak_solar_hell"),gas:t(me("arraak")?"race_turkey_solar_gas":"race_arraak_solar_gas"),gas_moon:t(me("arraak")?"race_turkey_solar_gas_moon":"race_arraak_solar_gas_moon"),dwarf:t(me("arraak")?"race_turkey_solar_dwarf":"race_arraak_solar_dwarf")},fanaticism:"resourceful",basic(){return!0}},pterodacti:{name:t("race_pterodacti"),desc:t("race_pterodacti_desc"),type:"avian",home:t("race_pterodacti_home"),entity:t("race_pterodacti_entity"),traits:{leathery:1,pessimistic:1},solar:{red:t("race_pterodacti_solar_red"),hell:t("race_pterodacti_solar_hell"),gas:t("race_pterodacti_solar_gas"),gas_moon:t("race_pterodacti_solar_gas_moon"),dwarf:t("race_pterodacti_solar_dwarf")},fanaticism:"leathery",basic(){return!0}},dracnid:{name:t("race_dracnid"),desc:t("race_dracnid_desc"),type:"avian",home:t("race_dracnid_home"),entity:t("race_dracnid_entity"),traits:{hoarder:1,solitary:1},solar:{red:t("race_dracnid_solar_red"),hell:t("race_dracnid_solar_hell"),gas:t("race_dracnid_solar_gas"),gas_moon:t("race_dracnid_solar_gas_moon"),dwarf:t("race_dracnid_solar_dwarf")},fanaticism:"hoarder",basic(){return!0}},entish:{name:t(me("entish")?"race_spruce":"race_entish"),desc:t(me("entish")?"race_spruce_desc":"race_entish_desc"),type:"plant",home:t(me("entish")?"race_spruce_home":"race_entish_home"),entity:t(me("entish")?"race_spruce_entity":"race_entish_entity"),traits:{kindling_kindred:1,pyrophobia:1},solar:{red:t(me("entish")?"race_spruce_solar_red":"race_entish_solar_red"),hell:t(me("entish")?"race_spruce_solar_hell":"race_entish_solar_hell"),gas:t(me("entish")?"race_spruce_solar_gas":"race_entish_solar_gas"),gas_moon:t(me("entish")?"race_spruce_solar_gas_moon":"race_entish_solar_gas_moon"),dwarf:t(me("entish")?"race_spruce_solar_dwarf":"race_entish_solar_dwarf")},fanaticism:"kindling_kindred",basic(){return!0}},cacti:{name:t("race_cacti"),desc:t("race_cacti_desc"),type:"plant",home:t("race_cacti_home"),entity:t("race_cacti_entity"),traits:{hyper:1,skittish:1},solar:{red:t("race_cacti_solar_red"),hell:t("race_cacti_solar_hell"),gas:t("race_cacti_solar_gas"),gas_moon:t("race_cacti_solar_gas_moon"),dwarf:t("race_cacti_solar_dwarf")},fanaticism:"hyper",basic(){return!0}},pinguicula:{name:t("race_pinguicula"),desc:t("race_pinguicula_desc"),type:"plant",home:t("race_pinguicula_home"),entity:t("race_pinguicula_entity"),traits:{fragrant:1,sticky:1},solar:{red:t("race_pinguicula_solar_red"),hell:t("race_pinguicula_solar_hell"),gas:t("race_pinguicula_solar_gas"),gas_moon:t("race_pinguicula_solar_gas_moon"),dwarf:t("race_pinguicula_solar_dwarf")},fanaticism:"sticky",basic(){return!0}},sporgar:{name:t("race_sporgar"),desc:t("race_sporgar_desc"),type:"fungi",home:t("race_sporgar_home"),entity:t("race_sporgar_entity"),traits:{infectious:1,parasite:1},solar:{red:t("race_sporgar_solar_red"),hell:t("race_sporgar_solar_hell"),gas:t("race_sporgar_solar_gas"),gas_moon:t("race_sporgar_solar_gas_moon"),dwarf:t("race_sporgar_solar_dwarf")},fanaticism:"infectious",basic(){return!1}},shroomi:{name:t("race_shroomi"),desc:t("race_shroomi_desc"),type:"fungi",home:t("race_shroomi_home"),entity:t("race_shroomi_entity"),traits:{toxic:1,nyctophilia:1},solar:{red:t("race_shroomi_solar_red"),hell:t("race_shroomi_solar_hell"),gas:t("race_shroomi_solar_gas"),gas_moon:t("race_shroomi_solar_gas_moon"),dwarf:t("race_shroomi_solar_dwarf")},fanaticism:"toxic",basic(){return!0}},moldling:{name:t("race_moldling"),desc:t("race_moldling_desc"),type:"fungi",home:t("race_moldling_home"),entity:t("race_moldling_entity"),traits:{infiltrator:1,hibernator:1},solar:{red:t("race_moldling_solar_red"),hell:t("race_moldling_solar_hell"),gas:t("race_moldling_solar_gas"),gas_moon:t("race_moldling_solar_gas_moon"),dwarf:t("race_moldling_solar_dwarf")},fanaticism:"infiltrator",basic(){return!0}},mantis:{name:t("race_mantis"),desc:t("race_mantis_desc"),type:"insectoid",home:t("race_mantis_home"),entity:t("race_mantis_entity"),traits:{cannibalize:1,malnutrition:1},solar:{red:t("race_mantis_solar_red"),hell:t("race_mantis_solar_hell"),gas:t("race_mantis_solar_gas"),gas_moon:t("race_mantis_solar_gas_moon"),dwarf:t("race_mantis_solar_dwarf")},fanaticism:"cannibalize",basic(){return!0}},scorpid:{name:t("race_scorpid"),desc:t("race_scorpid_desc"),type:"insectoid",home:t("race_scorpid_home"),entity:t("race_scorpid_entity"),traits:{claws:1,atrophy:1},solar:{red:t("race_scorpid_solar_red"),hell:t("race_scorpid_solar_hell"),gas:t("race_scorpid_solar_gas"),gas_moon:t("race_scorpid_solar_gas_moon"),dwarf:t("race_scorpid_solar_dwarf")},fanaticism:"claws",basic(){return!0}},antid:{name:t("race_antid"),desc:t("race_antid_desc"),type:"insectoid",home:t("race_antid_home"),entity:t("race_antid_entity"),traits:{hivemind:1,tunneler:1},solar:{red:t("race_antid_solar_red"),hell:t("race_antid_solar_hell"),gas:t("race_antid_solar_gas"),gas_moon:t("race_antid_solar_gas_moon"),dwarf:t("race_antid_solar_dwarf")},fanaticism:"hivemind",basic(){return!0}},sharkin:{name:t("race_sharkin"),desc:t("race_sharkin_desc"),type:"aquatic",home:t("race_sharkin_home"),entity:t("race_sharkin_entity"),traits:{blood_thirst:1,apex_predator:1},solar:{red:t("race_sharkin_solar_red"),hell:t("race_sharkin_solar_hell"),gas:t("race_sharkin_solar_gas"),gas_moon:t("race_sharkin_solar_gas_moon"),dwarf:t("race_sharkin_solar_dwarf")},fanaticism:"blood_thirst",basic(){return!!["oceanic","swamp"].includes(e.city.biome)}},octigoran:{name:t("race_octigoran"),desc:t("race_octigoran_desc"),type:"aquatic",home:t("race_octigoran_home"),entity:t("race_octigoran_entity"),traits:{invertebrate:1,suction_grip:1},solar:{red:t("race_octigoran_solar_red"),hell:t("race_octigoran_solar_hell"),gas:t("race_octigoran_solar_gas"),gas_moon:t("race_octigoran_solar_gas_moon"),dwarf:t("race_octigoran_solar_dwarf")},fanaticism:"suction_grip",basic(){return!!["oceanic","swamp"].includes(e.city.biome)}},dryad:{name:t("race_dryad"),desc:t("race_dryad_desc"),type:"fey",home:t("race_dryad_home"),entity:t("race_dryad_entity"),traits:{befuddle:1,environmentalist:1,kindling_kindred:1},solar:{red:t("race_dryad_solar_red"),hell:t("race_dryad_solar_hell"),gas:t("race_dryad_solar_gas"),gas_moon:t("race_dryad_solar_gas_moon"),dwarf:t("race_dryad_solar_dwarf")},fanaticism:"befuddle",basic(){return!!["forest","swamp","taiga"].includes(e.city.biome)}},satyr:{name:t("race_satyr"),desc:t("race_satyr_desc"),type:"fey",home:t("race_satyr_home"),entity:t("race_satyr_entity"),traits:{unorganized:1,musical:1},solar:{red:t("race_satyr_solar_red"),hell:t("race_satyr_solar_hell"),gas:t("race_satyr_solar_gas"),gas_moon:t("race_satyr_solar_gas_moon"),dwarf:t("race_satyr_solar_dwarf")},fanaticism:"musical",basic(){return!!["forest","swamp","taiga"].includes(e.city.biome)}},phoenix:{name:t("race_phoenix"),desc:t("race_phoenix_desc"),type:"heat",home:t("race_phoenix_home"),entity:t("race_phoenix_entity"),traits:{revive:1,slow_regen:1},solar:{red:t("race_phoenix_solar_red"),hell:t("race_phoenix_solar_hell"),gas:t("race_phoenix_solar_gas"),gas_moon:t("race_phoenix_solar_gas_moon"),dwarf:t("race_phoenix_solar_dwarf")},fanaticism:"revive",basic(){return!!["volcanic","ashland"].includes(e.city.biome)}},salamander:{name:t("race_salamander"),desc:t("race_salamander_desc"),type:"heat",home:t("race_salamander_home"),entity:t("race_salamander_entity"),traits:{forge:1,autoignition:1},solar:{red:t("race_salamander_solar_red"),hell:t("race_salamander_solar_hell"),gas:t("race_salamander_solar_gas"),gas_moon:t("race_salamander_solar_gas_moon"),dwarf:t("race_salamander_solar_dwarf")},fanaticism:"forge",basic(){return!!["volcanic","ashland"].includes(e.city.biome)}},yeti:{name:t(me("yeti")?"race_snowman":"race_yeti"),desc:t(me("yeti")?"race_snowman_desc":"race_yeti_desc"),type:"polar",home:t(me("yeti")?"race_snowman_home":"race_yeti_home"),entity:t(me("yeti")?"race_snowman_entity":"race_yeti_entity"),traits:{blurry:1,snowy:1},solar:{red:t(me("yeti")?"race_snowman_solar_red":"race_yeti_solar_red"),hell:t(me("yeti")?"race_snowman_solar_hell":"race_yeti_solar_hell"),gas:t(me("yeti")?"race_snowman_solar_gas":"race_yeti_solar_gas"),gas_moon:t(me("yeti")?"race_snowman_solar_gas_moon":"race_yeti_solar_gas_moon"),dwarf:t(me("yeti")?"race_snowman_solar_dwarf":"race_yeti_solar_dwarf")},fanaticism:"blurry",basic(){return!!["tundra","taiga"].includes(e.city.biome)}},wendigo:{name:t(me("wendigo")?"race_krampus":"race_wendigo"),desc:t(me("wendigo")?"race_krampus_desc":"race_wendigo_desc"),type:"polar",home:t(me("wendigo")?"race_krampus_home":"race_wendigo_home"),entity:t(me("wendigo")?"race_krampus_entity":"race_wendigo_entity"),traits:{ravenous:1,ghostly:1,soul_eater:1},solar:{red:t(me("wendigo")?"race_krampus_solar_red":"race_wendigo_solar_red"),hell:t(me("wendigo")?"race_krampus_solar_hell":"race_wendigo_solar_hell"),gas:t(me("wendigo")?"race_krampus_solar_gas":"race_wendigo_solar_gas"),gas_moon:t(me("wendigo")?"race_krampus_solar_gas_moon":"race_wendigo_solar_gas_moon"),dwarf:t(me("wendigo")?"race_krampus_solar_dwarf":"race_wendigo_solar_dwarf")},fanaticism:"ghostly",basic(){return!!["tundra","taiga"].includes(e.city.biome)}},tuskin:{name:t("race_tuskin"),desc:t("race_tuskin_desc"),type:"sand",home:t("race_tuskin_home"),entity:t("race_tuskin_entity"),traits:{lawless:1,mistrustful:1},solar:{red:t("race_tuskin_solar_red"),hell:t("race_tuskin_solar_hell"),gas:t("race_tuskin_solar_gas"),gas_moon:t("race_tuskin_solar_gas_moon"),dwarf:t("race_tuskin_solar_dwarf")},fanaticism:"lawless",basic(){return!!["desert","ashland"].includes(e.city.biome)}},kamel:{name:t("race_kamel"),desc:t("race_kamel_desc"),type:"sand",home:t("race_kamel_home"),entity:t("race_kamel_entity"),traits:{humpback:1,thalassophobia:1},solar:{red:t("race_kamel_solar_red"),hell:t("race_kamel_solar_hell"),gas:t("race_kamel_solar_gas"),gas_moon:t("race_kamel_solar_gas_moon"),dwarf:t("race_kamel_solar_dwarf")},fanaticism:"humpback",basic(){return!!["desert","ashland"].includes(e.city.biome)}},balorg:{name:t("race_balorg"),desc:t("race_balorg_desc"),type:"demonic",home:t("race_balorg_home"),entity:t("race_balorg_entity"),traits:{fiery:1,terrifying:1,slaver:1},solar:{red:t("race_balorg_solar_red"),hell:t("race_balorg_solar_hell"),gas:t("race_balorg_solar_gas"),gas_moon:t("race_balorg_solar_gas_moon"),dwarf:t("race_balorg_solar_dwarf")},fanaticism:"fiery",basic(){return e.city.biome==="hellscape"}},imp:{name:t("race_imp"),desc:t("race_imp_desc"),type:"demonic",home:t("race_imp_home"),entity:t("race_imp_entity"),traits:{compact:1,conniving:1,pathetic:1},solar:{red:t("race_imp_solar_red"),hell:t("race_imp_solar_hell"),gas:t("race_imp_solar_gas"),gas_moon:t("race_imp_solar_gas_moon"),dwarf:t("race_imp_solar_dwarf")},fanaticism:"conniving",basic(){return e.city.biome==="hellscape"}},seraph:{name:t(me("seraph")?"race_cherub":"race_seraph"),desc:t(me("seraph")?"race_cherub_desc":"race_seraph_desc"),type:"angelic",home:t(me("seraph")?"race_cherub_home":"race_seraph_home"),entity:t(me("seraph")?"race_cherub_entity":"race_seraph_entity"),traits:{unified:1,spiritual:1,truthful:1},solar:{red:t(me("seraph")?"race_cherub_solar_red":"race_seraph_solar_red"),hell:t(me("seraph")?"race_cherub_solar_hell":"race_seraph_solar_hell"),gas:t(me("seraph")?"race_cherub_solar_gas":"race_seraph_solar_gas"),gas_moon:t(me("seraph")?"race_cherub_solar_gas_moon":"race_seraph_solar_gas_moon"),dwarf:t(me("seraph")?"race_cherub_solar_dwarf":"race_seraph_solar_dwarf")},fanaticism:"spiritual",basic(){return e.city.biome==="eden"}},unicorn:{name:t("race_unicorn"),desc:t("race_unicorn_desc"),type:"angelic",home:t("race_unicorn_home"),entity:t("race_unicorn_entity"),traits:{rainbow:1,magnificent:1,noble:1},solar:{red:t("race_unicorn_solar_red"),hell:t("race_unicorn_solar_hell"),gas:t("race_unicorn_solar_gas"),gas_moon:t("race_unicorn_solar_gas_moon"),dwarf:t("race_unicorn_solar_dwarf")},fanaticism:"magnificent",basic(){return e.city.biome==="eden"}},synth:{name:t("race_synth"),desc(){let r=e.race.hasOwnProperty("srace")?e.race.srace:"human";return t("race_synth_desc",[A[r].name])},type:"synthetic",home:t("race_synth_home"),entity:t("race_synth_entity"),traits:{imitation:1,emotionless:1,logical:1},solar:{red:t("race_synth_solar_red"),hell:t("race_synth_solar_hell"),gas:t("race_synth_solar_gas"),gas_moon:t("race_synth_solar_gas_moon"),dwarf:t("race_synth_solar_dwarf")},fanaticism:"logical",basic(){return!1}},nano:{name:t("race_nano"),desc:t("race_nano_desc"),type:"synthetic",home:t("race_nano_home"),entity:t("race_nano_entity"),traits:{deconstructor:1,linked:1,shapeshifter:1},solar:{red:t("race_nano_solar_red"),hell:t("race_nano_solar_hell"),gas:t("race_nano_solar_gas"),gas_moon:t("race_nano_solar_gas_moon"),dwarf:t("race_nano_solar_dwarf")},fanaticism:"shapeshifter",basic(){return!1}},ghast:{name:t("race_ghast"),desc:t("race_ghast_desc"),type:"eldritch",home:t("race_ghast_home"),entity:t("race_ghast_entity"),traits:{dark_dweller:1,swift:1,anthropophagite:1},solar:{red:t("race_ghast_solar_red"),hell:t("race_ghast_solar_hell"),gas:t("race_ghast_solar_gas"),gas_moon:t("race_ghast_solar_gas_moon"),dwarf:t("race_ghast_solar_dwarf")},fanaticism:"swift",basic(){return!1}},shoggoth:{name:t("race_shoggoth"),desc:t("race_shoggoth_desc"),type:"eldritch",home:t("race_shoggoth_home"),entity:t("race_shoggoth_entity"),traits:{living_tool:1,bloated:1},solar:{red:t("race_shoggoth_solar_red"),hell:t("race_shoggoth_solar_hell"),gas:t("race_shoggoth_solar_gas"),gas_moon:t("race_shoggoth_solar_gas_moon"),dwarf:t("race_shoggoth_solar_dwarf")},fanaticism:"living_tool",basic(){return!1}},junker:{name:me("junker")?t("race_ghoul"):t("race_junker"),desc:me("junker")?t("race_ghoul_desc"):t("race_junker_desc"),type:function(){return e.race.hasOwnProperty("jtype")?e.race.jtype:"humanoid"}(),home:me("junker")?t("race_ghoul_home"):t("race_junker_home"),entity:me("junker")?t("race_ghoul_entity"):t("race_junker_entity"),traits:{diverse:1,arrogant:1,angry:1,lazy:1,paranoid:1,greedy:1,puny:1,dumb:1,nearsighted:1,gluttony:1,slow:1,hard_of_hearing:1,pessimistic:1,solitary:1,pyrophobia:1,skittish:1,nyctophilia:1,frail:1,atrophy:1,invertebrate:1,pathetic:1,hibernator:1,freespirit:1,heavy:1,gnawer:1,hooved:1},solar:{red:me("junker")?t("race_ghoul_solar_red"):t("race_junker_solar_red"),hell:me("junker")?t("race_ghoul_solar_hell"):t("race_junker_solar_hell"),gas:me("junker")?t("race_ghoul_solar_gas"):t("race_junker_solar_gas"),gas_moon:me("junker")?t("race_ghoul_solar_gas_moon"):t("race_junker_solar_gas_moon"),dwarf:me("junker")?t("race_ghoul_solar_dwarf"):t("race_junker_solar_dwarf")},fanaticism:"none",basic(){return!1}},sludge:{name:t("race_sludge"),desc:t("race_sludge_desc"),type:function(){return e.race.hasOwnProperty("jtype")?e.race.jtype:"humanoid"}(),home:t("race_sludge_home"),entity:t("race_sludge_entity"),traits:{ooze:.25,diverse:.25,arrogant:.25,angry:.25,lazy:.25,hooved:.25,freespirit:.25,heavy:.25,gnawer:.25,paranoid:.25,greedy:.25,puny:.25,dumb:.25,nearsighted:.25,gluttony:.25,slow:.25,hard_of_hearing:.25,selenophobia:.25,pessimistic:.25,solitary:.25,pyrophobia:.25,skittish:.25,fragrant:.25,nyctophilia:.25,hibernator:.25,frail:.25,atrophy:.25,invertebrate:.25,unorganized:.25,slow_regen:.25,autoignition:.25,snowy:.25,mistrustful:.25,thalassophobia:.25,pathetic:.25,truthful:.25},solar:{red:t("race_sludge_solar_red"),hell:t("race_sludge_solar_hell"),gas:t("race_sludge_solar_gas"),gas_moon:t("race_sludge_solar_gas_moon"),dwarf:t("race_sludge_solar_dwarf")},fanaticism:"ooze",basic(){return!1}},custom:w0()},Mi={organism:{},humanoid:{},carnivore:{},herbivore:{},omnivore:{},small:{},giant:{},reptilian:{},avian:{},insectoid:{},plant:{},fungi:{},aquatic:{},fey:{},heat:{},polar:{},sand:{},demonic:{},angelic:{},synthetic:{},eldritch:{}};Object.keys(Mi).forEach(function(r){let a=r==="organism"?"humanoid":r;Mi[r].solar={titan:t(`genus_${a}_solar_titan`),enceladus:t(`genus_${a}_solar_enceladus`),triton:t(`genus_${a}_solar_triton`),eris:t(`genus_${a}_solar_eris`)}});function wl(){A.junker.type=e.race.hasOwnProperty("jtype")?e.race.jtype:"humanoid",A.sludge.type=e.race.hasOwnProperty("jtype")?e.race.jtype:"humanoid"}function w0(){if(e.hasOwnProperty("custom")&&e.custom.hasOwnProperty("race0")){let r={};for(let i=0;ib[a].val&&(a=e.custom.race0.traits[i]);return{name:e.custom.race0.name,desc:e.custom.race0.desc,type:e.custom.race0.genus,home:e.custom.race0.home,entity:e.custom.race0.entity,traits:r,solar:{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},fanaticism:a,basic(){return!1}}}else return{}}function $t(r,a){let i=1,s=ge("theorist",1);s&&(a==="factory"||a==="miner"||a==="lumberjack")&&(i*=1-s/100);let n=ge("inspirational",0);n&&(a==="farmer"||a==="factory"||a==="miner"||a==="lumberjack")&&(i*=1+n/100);let c=ge("dirty_jobs",2);if(c&&a==="miner"&&(i*=1+c/100),e.race.rejuvenated&&["lumberjack","miner","factory"].includes(a)&&(i*=1.1),a==="lumberjack"&&e.race.evil&&!e.race.soul_eater&&(e.race.living_tool?i*=1+b.living_tool.vars()[0]*(e.tech.science&&e.tech.science>0?e.tech.science*.3:0):i*=1+(e.tech.reclaimer-1)*.4),e.race.powered&&(a==="factory"||a==="miner"||a==="lumberjack")&&(i*=1+b.powered.vars()[1]/100),e.race.artifical&&a==="science"&&(i*=1+b.artifical.vars()[0]/100),e.race.hivemind&&a!=="farmer"&&!e.race.lone_survivor){let _=b.hivemind.vars()[0],m=.05;if(e.race.high_pop&&a!=="army"&&a!=="hellArmy"&&(_*=b.high_pop.vars()[0],m=.5/(b.hivemind.vars()[0]*b.high_pop.vars()[0])),r<=_){let w=1-_*m;i*=r*m+w}else{let w=a==="army"||a==="hellArmy"?.99:e.race.high_pop?.985:.98;i*=1+(1-w**(r-_))}}let l=ve("antid");if(l>0){let _=a==="army"||a==="hellArmy"?.99:e.race.high_pop?.985:.98;i*=1+(1-_**(r*l/4))/2}if(e.race.cold_blooded&&a!=="army"&&a!=="hellArmy"&&a!=="factory"&&a!=="science"){switch(e.city.calendar.temp){case 0:i*=1-b.cold_blooded.vars()[0]/100;break;case 2:i*=1+b.cold_blooded.vars()[1]/100;break;default:i*=1;break}switch(e.city.calendar.weather){case 0:i*=1-b.cold_blooded.vars()[0]/100;break;case 2:i*=1+b.cold_blooded.vars()[1]/100;break;default:i*=1;break}}e.race.cannibalize&&e.city.s_alter&&e.city.s_alter.count>0&&(a==="miner"&&e.city.s_alter.mine>0&&(i*=1+b.cannibalize.vars()[0]/100),a==="lumberjack"&&e.city.s_alter.harvest>0&&(i*=1+b.cannibalize.vars()[0]/100),(a==="army"||a==="hellArmy")&&e.city.s_alter.rage>0&&(i*=1+b.cannibalize.vars()[0]/100),a==="science"&&e.city.s_alter.mind>0&&(i*=1+b.cannibalize.vars()[0]/100));let o=ve("mantis");o>0&&(a==="miner"&&(i*=1+b.cannibalize.vars(1)[0]/100*o),a==="lumberjack"&&(i*=1+b.cannibalize.vars(1)[0]/100*o),(a==="army"||a==="hellArmy")&&(i*=1+b.cannibalize.vars(1)[0]/100*o),a==="science"&&(i*=1+b.cannibalize.vars(1)[0]/100*o)),e.race.humpback&&(a==="miner"||a==="lumberjack")&&(i*=1+b.humpback.vars()[1]/100);let d=ve("kamel");d>0&&(a==="miner"||a==="lumberjack")&&(i*=1+b.humpback.vars(1)[1]/100*d),e.city.ptrait.includes("magnetic")&&a==="miner"&&(i*=Re.magnetic.vars()[2]),e.race.weak&&(a==="miner"||a==="lumberjack")&&(i*=1-b.weak.vars()[0]/100),e.race.hydrophilic&&e.city.calendar.weather===0&&e.city.calendar.temp>0&&a!=="factory"&&(i*=.75),e.race.toxic&&a==="factory"&&(i*=1+b.toxic.vars()[2]/100);let h=ve("shroomi");if(h>0&&a==="factory"&&(i*=1+b.toxic.vars(1)[2]/100*h),e.race.hardy&&a==="factory"&&(i*=1+b.hardy.vars()[0]*e.race.hardy/100),e.race.analytical&&a==="science"&&(i*=1+b.analytical.vars()[0]*e.race.analytical/100),e.race.ooze&&(i*=1-b.ooze.vars()[0]/100),e.civic.govern.type==="democracy"&&(i*=1-$e.democracy()[1]/100),e.tech.cyber_worker&&(a==="lumberjack"||a==="miner")&&(i*=1.25),a==="hunting"){e.race.tracker&&(i*=1+b.tracker.vars()[0]/100);let _=ve("wolven");if(_>0&&(i*=1+b.tracker.vars(1)[0]/100*_),e.race.beast){let M=e.city.calendar.wind===1?b.beast.vars()[1]:b.beast.vars()[0];i*=1+M/100}e.race.apex_predator&&(i*=1+b.apex_predator.vars()[1]/100);let m=ve("sharkin");m>0&&(i*=1+b.apex_predator.vars(1)[1]/100*m),e.race.fiery&&(i*=1+b.fiery.vars()[1]/100);let w=ve("balorg");w>0&&(i*=1+b.fiery.vars(1)[1]/100*w),e.race.fragrant&&(i*=1-b.fragrant.vars()[0]/100),e.city.ptrait.includes("rage")&&(i*=Re.rage.vars()[1]),e.race.cunning&&(i*=1+b.cunning.vars()[0]*e.race.cunning/100),e.city.biome==="savanna"&&(i*=qe.savanna.vars()[1]),e.race.dark_dweller&&e.city.calendar.weather===2&&(i*=1-b.dark_dweller.vars()[0]/100)}if(e.race.universe==="magic"&&(a==="science"?i*=.6:a==="army"||a==="hellArmy"?i*=.75:i*=.8,e.race.witch_hunter&&(i*=.75),e.race.hasOwnProperty("casting")&&e.race.casting[a==="hellArmy"?"army":a])){let _=e.race.casting[a==="hellArmy"?"army":a];e.race.witch_hunter?i*=1+_/(_+75)*2.5:i*=1+_/(_+75)}return e.race.living_tool&&a==="miner"&&(i*=1+b.living_tool.vars()[0]*(e.tech.science&&e.tech.science>0?e.tech.science*.12:0)),e.city.banquet&&e.city.banquet.on&&e.city.banquet.count>=3&&(a==="army"||a==="hellArmy")&&(i*=1+e.city.banquet.strength**.65/100),e.race.high_pop&&(i=xe(i)),e.race.gravity_well&&["farmer","miner","lumberjack","factory","hunting"].includes(a)&&(i=Xe(i)),i}function pr(r,a){let i=1;return e.race.gravity_well&&["farmer","miner","lumberjack","factory","hunting","scavenger"].includes(a)&&(i=Xe(i)),i}function Fi(r){let a=[];Object.keys(b).forEach(function(s){b[s].type==="minor"&&!e.race[s]&&a.push(s)}),a.length===0&&Object.keys(b).forEach(function(s){b[s].type==="minor"&&a.push(s)});let i=a[Math.floor(J(0,a.length))];return e.race[i]?e.race[i]+=r:e.race[i]=r,i}function lt(r,a,i){e.race.purgatory[r].hasOwnProperty(a)?(e[r][a]=e.race.purgatory[r][a],delete e.race.purgatory[r][a]):i&&(e[r][a]=i)}function Lr(r,a,i,s){e.race.purgatory[r].hasOwnProperty(a)?(e[r][a]=e.race.purgatory[r][a],delete e.race.purgatory[r][a]):e.race.purgatory[r].hasOwnProperty(i)?(e[r][a]=e.race.purgatory[r][i],delete e.race.purgatory[r][i]):s&&(e[r][a]=s)}function or(r,a){e[r].hasOwnProperty(a)&&(e.race.purgatory[r][a]=e[r][a],delete e[r][a])}function Za(r,a){if(e.race.purgatory[r].hasOwnProperty(a))return e.race.purgatory[r][a]}function xl(){Oc("Lumber"),Oc("Plywood"),Zr(["city-graveyard","city-lumber_yard","city-sawmill"]),pi(["reclaimer","axe","saw"]),or("city","sawmill"),or("city","graveyard"),or("city","lumber_yard"),or("tech","axe"),or("tech","reclaimer"),or("tech","saw"),e.civic.lumberjack.display=!1,e.civic.lumberjack.workers=0,e.civic.lumberjack.assigned=0,e.civic.d_job==="lumberjack"&&(e.civic.d_job=e.race.carnivore||e.race.soul_eater?"hunter":"unemployed"),e.race.casting&&(e.race.casting.total-=e.race.casting.lumberjack,e.race.casting.lumberjack=0,rt()),e.city.s_alter&&(e.city.s_alter.harvest=0)}function Oc(r){e.resource[r].display=!1,e.race.alchemy&&e.race.alchemy.hasOwnProperty(r)&&(e.resource.Mana.diff+=e.race.alchemy[r],e.race.alchemy[r]=0),e.interstellar.mass_ejector&&e.interstellar.mass_ejector.hasOwnProperty(r)&&(e.interstellar.mass_ejector.total-=e.interstellar.mass_ejector[r],e.interstellar.mass_ejector[r]=0),e.city.nanite_factory&&e.city.nanite_factory.hasOwnProperty(r)&&(e.city.nanite_factory[r]=0),e.portal.transport&&e.portal.transport.cargo.hasOwnProperty(r)&&(e.portal.transport.cargo.used-=e.portal.transport.cargo[r],e.portal.transport.cargo[r]=0),e.tech.foundry&&e.city.foundry.hasOwnProperty(r)&&(e.civic.craftsman.workers-=e.city.foundry[r],e.city.foundry.crafting-=e.city.foundry[r],e.city.foundry[r]=0,Lt()),e.resource[r].hasOwnProperty("trade")&&(e.city.market.trade-=Math.abs(e.resource[r].trade),e.resource[r].trade=0),e.resource.Crates.amount+=e.resource[r].crates,e.resource[r].crates=0,e.resource.Containers.amount+=e.resource[r].containers,e.resource[r].containers=0}function Sc(){let r=Qa(O.tech.agriculture),a=Qa(O.tech.smokehouse),i=Qa(O.tech.reclaimer)||Qa(O.tech.stone_axe),s=Qa(O.tech.alt_lodge),n=Qa(O.tech.wind_plant),c=[],l=[];if(!e.race.artifical){if(["agriculture","farm","hunting","s_lodge","wind_plant","compost","soul_eater"].forEach(function(h){or("tech",h)}),["silo","farm","mill","windmill","smokehouse","lodge","compost","soul_well"].forEach(function(h){or("city",h)}),s){lt("tech","s_lodge");let h=Za("tech","farm")>=1||Za("tech","hunting")>=2?1:0;h>0&&(!e.tech.s_lodge||e.tech.s_lodge=1&&Lr("city","lodge","farm",{count:0})}if(a){lt("tech","hunting");let h=Za("tech","farm")>=1||Za("tech","s_lodge")>=1?2:Za("tech","agriculture")>=3?1:0;h>0&&(!e.tech.hunting||e.tech.hunting=1&&Lr("city","smokehouse","silo",{count:0}),e.tech.hunting>=2&&!s&&Lr("city","lodge","farm",{count:0})}else l.push("hunting"),c.push("city-smokehouse"),s||l.push("city-lodge");if(r){lt("tech","farm");let h=Za("tech","hunting")>=2||Za("tech","s_lodge")>=1?1:0;h>0&&(!e.tech.farm||e.tech.farm=1?3:Za("tech","s_lodge")>=1?1:0;_>0&&(!e.tech.agriculture||e.tech.agriculture<_)&&(e.tech.agriculture=_),e.tech.agriculture>=1&&Lr("city","farm","lodge",{count:0}),e.tech.agriculture>=3&&Lr("city","silo","smokehouse",{count:0}),e.tech.agriculture>=4&&!n&&Lr("city","mill","windmill",{count:0,on:0})}else l.push("agriculture","farm"),c.push("city-farm","city-silo","city-mill");e.race.soul_eater?(lt("tech","soul_eater"),lt("city","soul_well")):(c.push("city-soul_well"),l.push("soul_eater")),e.race.detritivore?(lt("tech","compost"),lt("city","compost")):(l.push("compost"),c.push("city-compost")),n?(lt("tech","wind_plant"),e.tech.wind_plant>=1&&Lr("city","windmill","mill",{count:0,on:0})):(l.push("wind_plant"),c.push("city-windmill"),delete Ht[t("city_mill_title2")])}let o=[],d=[];!e.race.orbit_decayed&&r&&e.tech.agriculture>=1&&e.city.farm.count>0?o.push("farmer"):d.push("farmer"),e.race.carnivore&&!e.race.herbivore||e.race.soul_eater||e.race.unfathomable?(o.push("hunter"),d.push("unemployed")):(d.push("hunter"),o.push("unemployed")),!e.race.orbit_decayed&&i?o.push("lumberjack"):d.push("lumberjack"),o.forEach(function(h){e.civic[h].display||(e.civic[h].workers=0,e.civic[h].display=!0)}),d.forEach(function(h){e.civic[h].display&&(e.civic.d_job===h&&(e.civic.d_job=o[0]),e.civic[o[0]].workers+=e.civic[h].workers,e.civic[h].workers=0,e.civic[h].assigned=0,e.civic[h].display=!1)}),e.race.casting&&(r||(e.race.casting.total-=e.race.casting.farmer,e.race.casting.farmer=0),rt()),Zr(c),pi(l),Ir("Food")}function Ni(r){switch(r){case"high_pop":e.resource[e.race.species].amount=Math.round(e.resource[e.race.species].amount*b.high_pop.vars()[0]),e.civic.hasOwnProperty("garrison")&&(e.civic.garrison.workers=Math.round(e.civic.garrison.workers*b.high_pop.vars()[0]));break;case"kindling_kindred":if(e.race.smoldering)break;xl();break;case"smoldering":if(e.resource.Chrysotile.display=!0,e.race.kindling_kindred)break;xl();break;case"forge":rt();break;case"soul_eater":tn("lumberjack");case"detritivore":case"carnivore":case"herbivore":Sc();break;case"unfathomable":for(Sc(),e.city.hasOwnProperty("surfaceDwellers")||(e.city.surfaceDwellers=[]);e.city.surfaceDwellers.lengthb.unfathomable.vars()[0]&&(e.city.surfaceDwellers.length=b.unfathomable.vars()[0]),e.race.psychic&&Ct();break;case"flier":Ir("Stone"),Ir("Brick"),e.resource.Cement.display=!1,e.civic.cement_worker.display=!1,e.civic.cement_worker.workers=0,e.civic.cement_worker.assigned=0,or("tech","cement"),or("city","cement_plant");break;case"sappy":e.civic.d_job==="quarry_worker"&&(e.civic.d_job=e.race.carnivore||e.race.soul_eater?"hunter":"unemployed"),e.civic.quarry_worker.display=!1,e.civic.quarry_worker.workers=0,e.civic.quarry_worker.assigned=0,Ir("Stone"),or("tech","hammer"),or("city","rock_quarry");break;case"apex_predator":pi(["armor"]),or("tech","armor");break;case"environmentalist":delete Ht[t("city_coal_power")],delete Ht[t("city_mana_engine")],delete Ht[t("city_oil_power")];break;case"terrifying":Object.keys(e.resource).forEach(function(a){e.resource[a].hasOwnProperty("trade")&&(e.resource[a].trade=0)}),e.settings.showMarket=!1,e.settings.marketTabs===0&&(e.settings.marketTabs=1),Zr(["city-trade"]),pi(["trade"]),or("tech","trade"),or("city","trade");break;case"slaver":lt("tech","slaves"),e.tech.slaves>=1&&(lt("city","slave_pen",{count:0}),e.city.slave_pen.count>0&&!e.race.orbit_decayed&&(e.resource.Slave.display=!0),e.tech.slaves>=2&&Ot());break;case"cannibalize":lt("tech","sacrifice"),e.tech.mining&&(e.city.s_alter={count:0,rage:0,mind:0,regen:0,mine:0,harvest:0},Ot());break;case"magnificent":e.tech.theology>=2&<("city","shrine",{count:0,morale:0,metal:0,know:0,tax:0});break;case"unified":e.tech.world_control=1,e.tech.unify=2,le($("#garrison")),le($("#c_garrison")),ia($("#garrison"),!0),ia($("#c_garrison"),!1);for(let a=0;a<3;a++){if(e.civic.foreign[`gov${a}`].occ){let i=N(e.civic.govern.type==="federation"?15:20);e.civic.garrison.max+=i,e.civic.garrison.workers+=i,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"}qr("spy"),qr("spyop");break;case"noble":e.civic.taxes.tax_rate<10?e.civic.taxes.tax_rate=10:e.civic.taxes.tax_rate>20&&(e.civic.taxes.tax_rate=20);break;case"toxic":e.race.species==="troll"&&e.tech.science&&e.tech.science>=8&&ie("godwin");break;case"thalassophobia":Zr(["city-wharf"]),pi(["wharf"]),or("city","wharf");break;case"hooved":e.resource.Horseshoe.display=!0,e.race.hasOwnProperty("shoecnt")||(e.race.shoecnt=0),Ot();break;case"slow":Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w?(Pr("stop"),Pr("start")):window.location.reload();break;case"hyper":Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w?(Pr("stop"),Pr("start")):window.location.reload();break;case"calm":e.tech.primitive>=3&&(lt("city","meditation",{count:0}),e.race.orbit_decayed||(e.resource.Zen.display=!0));break;case"blood_thirst":e.race.blood_thirst_count=1;break;case"deconstructor":e.resource.Nanite.display=!0,lt("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});break;case"shapeshifter":oa(!1,!0);break;case"imitation":fn(!0);break;case"evil":Ir("Lumber"),Ir("Furs"),Ir("Plywood");break;case"psychic":e.tech.psychic&&(e.resource.Energy.display=!0,e.settings.showPsychic=!0);break;case"ooze":!e.tech.high_tech&&e.race.species!=="custom"&&e.race.species!=="sludge"&&(e.race.gross_enabled=1),Nt(!0);break;default:break}}function Ns(r,a){switch(r){case"high_pop":e.resource[e.race.species].amount=Math.round(e.resource[e.race.species].amount/b.high_pop.vars(a)[0]),e.civic.hasOwnProperty("garrison")&&(e.civic.garrison.workers=Math.round(e.civic.garrison.workers/b.high_pop.vars(a)[0]));break;case"kindling_kindred":if(e.race.smoldering)break;e.resource.Lumber.display=!0,e.tech.foundry&&(e.resource.Plywood.display=!0),e.race.casting&&rt(),lt("city","sawmill"),lt("city","graveyard"),lt("city","lumber_yard"),lt("tech","axe"),lt("tech","reclaimer"),lt("tech","saw"),(e.tech.axe||e.tech.reclaimer)&&!e.race.orbit_decayed&&(e.civic.lumberjack.display=!0);break;case"smoldering":if(Oc("Chrysotile"),e.race.kindling_kindred)break;e.resource.Lumber.display=!0,e.tech.foundry&&(e.resource.Plywood.display=!0),e.race.casting&&rt(),lt("city","sawmill"),lt("city","graveyard"),lt("city","lumber_yard"),lt("tech","axe"),lt("tech","reclaimer"),lt("tech","saw"),(e.tech.axe||e.tech.reclaimer)&&!e.race.orbit_decayed&&(e.civic.lumberjack.display=!0);break;case"forge":rt();break;case"soul_eater":tn("lumberjack");case"detritivore":case"carnivore":case"herbivore":case"unfathomable":Sc(),e.race.psychic&&Ct();break;case"flier":Ir("Stone"),Ir("Brick"),lt("tech","cement"),e.tech.cement&&(lt("city","cement_plant"),e.resource.Cement.display=!0,e.civic.cement_worker.display=!0);break;case"sappy":Ir("Stone"),lt("tech","hammer"),e.tech.mining>=1&&(lt("city","rock_quarry",{count:0,asbestos:0}),(e.city.rock_quarry&&e.city.rock_quarry.count>0||e.race.lone_survivor)&&(e.civic.quarry_worker.display=!0));break;case"apex_predator":lt("tech","armor");break;case"environmentalist":delete Ht[t("city_hydro_power")],delete Ht[t("city_wind_power")];break;case"terrifying":e.settings.showMarket=!0,lt("tech","trade"),lt("city","trade");break;case"slaver":Zr(["city-slave_pen"]),pi(["slaves"]),or("city","slave_pen"),or("tech","slaves"),e.resource.Slave.amount=0,e.resource.Slave.max=0,e.resource.Slave.display=!1,qr("slave"),Ot();break;case"cannibalize":Zr(["city-s_alter"]),pi(["sacrifice"]),or("tech","sacrifice"),delete e.city.s_alter,qr("sacrifice"),Ot();break;case"magnificent":Zr(["city-shrine"]),or("city","shrine");break;case"thalassophobia":e.tech.wharf&<("city","wharf",{count:0});break;case"hooved":Zr(["city-horseshoe","space-horseshoe"]),e.resource.Horseshoe.display=!1,qr("horseshoe"),Ot();break;case"slow":Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w?(Pr("stop"),Pr("start")):window.location.reload();break;case"hyper":Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w?(Pr("stop"),Pr("start")):window.location.reload();break;case"calm":Zr(["city-meditation"]),e.resource.Zen.display=!1,or("city","meditation");break;case"blood_thirst":delete e.race.blood_thirst_count;break;case"deconstructor":Zr(["city-nanite_factory"]),e.resource.Nanite.display=!1,or("city","nanite_factory");break;case"shapeshifter":le($("#sshifter")),oa();break;case"imitation":e.race.iTraits&&(Object.keys(e.race.iTraits).forEach(function(i){if(i!=="imitation")if(e.race.iTraits[i]===0){let s=e.race[i];delete e.race[i],Ns(i,s)}else e.race[i]=e.race.iTraits[i]}),delete e.race.iTraits);break;case"evil":Ir("Lumber"),Ir("Furs"),Ir("Plywood");break;case"psychic":e.resource.Energy.display=!1,e.settings.showPsychic=!1;break;case"ooze":delete e.race.gross_enabled,Nt(!0);break;default:break}}function fn(r){if(e.race.imitation&&e.race.srace){e.race.iTraits||(e.race.iTraits={}),e.race.shapeshifter&&oa(e.race.ss_genus===A[e.race.srace].type?"none":!1,!0);let a=[];if(Object.keys(Er[A[e.race.srace].type]).forEach(function(i){e.race[i]||a.push(i)}),e.race.srace==="custom"){let i=["evil","evil"];Object.keys(A[e.race.srace].traits).forEach(function(s){b[s].val>b[i[0]].val?i[0]=s:b[s].val=0?e.race[s]=b.shapeshifter.vars()[0]:e.race[s]=b.shapeshifter.vars()[1],Ni(s),i.push(s))}),e.race.ss_genus=r),a){le($("#sshifter")),e.race.ss_genus=e.race.hasOwnProperty("ss_genus")?e.race.ss_genus:"none";let s="";Object.keys(Er).forEach(function(n){n!=="synthetic"&&n!=="eldritch"&&n!==A[e.race.species].type&&(!e.race.imitation||n!==A[e.race.srace].type)&&e.stats.achieve[`genus_${n}`]&&e.stats.achieve[`genus_${n}`].l>0&&(s+=`{{ '${n}' | genus }} `)}),$("#sshifter").append(`${t("trait_shapeshifter_name")} :
{{ ss_genus | genus }}
{{ 'none' | genus }} ${s}
- `),D({el:"#sshifter",data:e.race,methods:{setShape(n){oa(n)}},filters:{genus(n){return t(`genelab_genus_${n}`)}}})}e.race.ss_traits=i}function _t(r,a){if(a=a||{},e.race[r]&&!a.force)switch(e.race[r]){case .25:return e.race[r]=a.down?.25:.5,!a.down;case .5:return e.race[r]=a.down?.25:1,!0;case 1:return e.race[r]=a.down?.5:2,!0;case 2:return e.race[r]=a.down?1:3,!0;case 3:return e.race[r]=a.down?2:3,!!a.down}else if(a.set)return e.race[r]=a.set,!0;return!1}function ve(r){if(e.race.unfathomable&&e.city.surfaceDwellers&&e.city.surfaceDwellers.includes(r)&&e.city.captive_housing){let a=e.city.surfaceDwellers.indexOf(r),i=e.city.captive_housing[`race${a}`];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 sa(r,a){switch(r){case"name":{let i={hooved:kl(!1),promiscuous:e.race.artifical?t("trait_promiscuous_synth_name"):b.promiscuous.name};return a?i[a]?i[a]:b[a].name:i}case"desc":{let i={hooved:kl(!0),promiscuous:e.race.artifical?t("trait_promiscuous_synth"):b.promiscuous.desc};return a?i[a]?i[a]:b[a].desc:i}}}function kl(r){return e.race.sludge?r?t("trait_hooved_slime"):t("trait_hooved_slime_name"):["cath","wolven","dracnid","seraph","cyclops","kobold","tuskin","sharkin"].includes(e.race.species)?r?t(`trait_hooved_${e.race.species}`):t(`trait_hooved_${e.race.species}_name`):["humanoid","avian","plant","fungi","reptilian","fey","synthetic"].includes(F[e.race.species].type)?r?t(`trait_hooved_${F[e.race.species].type}`):t(`trait_hooved_${F[e.race.species].type}_name`):r?b.hooved.desc:b.hooved.name}var qe={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")}},Re={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 $0(){return e.race.hasOwnProperty("shell_color")?t(`color_${e.race.shell_color}`):t("color_green")}function x0(){return e.race.hasOwnProperty("fox_color")?t(`color_${e.race.fox_color}`):t("color_red")}function qc(r){r=r||[];let a=Object.keys(F).filter(function(s){return F[s].basic()&&!r.includes(s)}),i=xs(a);return a[i]}function Ct(){if(!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==6))return;let r=$("#psychicPowers");le(r),e.race.psychic&&e.tech.psychic&&(k0(r),q0(r),e.tech.psychic>=2&&M0(r),e.tech.psychic>=3&&(e.race.psychicPowers.cash||(e.race.psychicPowers.cash=0),P0(r)),e.tech.psychicthrall&&e.tech.unfathomable&&e.race.unfathomable&&(e.tech.psychicthrall>=2&&O0(r),C0(r)))}function k0(r){let a=$('
');r.append(a),a.append($(``));let i=$("
");a.append(i);let s="";if(Object.keys(Mt).forEach(function(o){e.resource[o].display&&(s+=`${e.resource[o].name} `)}),i.append(`${s}
`),a.append('
'),e.tech.psychic>=4){let o=$(`${t("psychic_channel")}
`),d=$('{{ c.boost }} '),h=$(`« `),_=$(`» `);o.append(h),o.append(d),o.append(_),a.append(o)}let n=e.tech.psychic>=5?60:75,c=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;D({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 o=fe();for(let d=0;d0;d++)e.race.psychicPowers.channel.boost--}},filters:{boost(o){return t("psychic_boost_button",[e.resource[o]?e.resource[o].name:"N/A",n])},boostTime(){return e.race.psychicPowers.boostTime>0?t("psychic_boost_time",[e.race.psychicPowers.boostTime]):""}}});let l=document.getElementById("psyhscrolltarget");l.addEventListener("wheel",o=>{o.preventDefault(),l.scrollLeft+=o.deltaY}),pe("psychicBoost",function(){return t("psychic_boost_desc",[b.psychic.vars()[3]])},{elm:"#psychicBoost > div > button"})}function q0(r){let a=$('
');r.append(a),a.append($(``)),a.append('
');let i=e.tech.psychic>=5?8:10;D({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&&L("Food",1e4*b.anthropophagite.vars()[0]),e.stats.psykill===10&&Ct())}},filters:{kill(){return t("psychic_murder_button",[i])}}}),pe("psychicKill",function(){return t("psychic_murder_desc")},{elm:"#psychicKill > div > button"})}function M0(r){let a=$('
');if(r.append(a),a.append($(``)),a.append('
'),e.tech.psychic>=4){let n=$(`${t("psychic_channel")}
`),c=$('{{ assault }} '),l=$(`« `),o=$(`» `);n.append(l),n.append(c),n.append(o),a.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;D({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=fe();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]):""}}}),pe("psychicAssault",function(){return t("psychic_assault_desc",[b.psychic.vars()[3]])},{elm:"#psychicAssault > div > button"})}function P0(r){let a=$('
');if(r.append(a),a.append($(``)),a.append('
'),e.tech.psychic>=4){let n=$(`${t("psychic_channel")}
`),c=$('{{ cash }} '),l=$(`« `),o=$(`» `);n.append(l),n.append(c),n.append(o),a.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;D({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=fe();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]):""}}}),pe("psychicFinance",function(){return t("psychic_profit_desc",[b.psychic.vars()[3]])},{elm:"#psychicFinance > div > button"})}function C0(r){let a=$('
');r.append(a),a.append($(``)),a.append('
');let i=e.tech.psychic>=5?64:80;D({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])}}}),pe("psychicMindBreak",function(){return t("psychic_mind_break_desc")},{elm:"#psychicMindBreak > div > button"})}function O0(r){let a=$('
');r.append(a),a.append($(``)),a.append('
');let i=e.tech.psychic>=5?80:100;D({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 Os=!1;function pe(r,a,i){i||(i={}),i.hasOwnProperty("elm")||(i.elm="#"+r),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(){(Os||$("#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),a&&c.append(typeof a=="function"?a({this:this,popper:c}):a),Os=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"}),Ve("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(r){if($(".popper").length===1){Ie();return}});function Ie(r){r&&$("#popper").data("id")!==r||($("#popper").hide(),Os&&(Os.destroy(),Os=!1),le($("#popper"),!0))}function Pr(r){switch(r){case"stop":Pe.w?Pe.w.postMessage({loop:"clear"}):(clearInterval(Ka.main_loop),clearInterval(Ka.mid_loop),clearInterval(Ka.long_loop)),e.settings.at>0&&(e.settings.at=Xa.t),Pe.s=!1;break;case"start":{bn(Date.now());let a=yn();Pe.mt=a.webWorkerMainTimer,Pe.w?(Pe.w.postMessage({loop:"short",period:a.mainTimer}),Pe.w.postMessage({loop:"mid",period:a.midTimer}),Pe.w.postMessage({loop:"long",period:a.longTimer})):(Ka.main_loop=setInterval(function(){fastLoop()},a.mainTimer),Ka.mid_loop=setInterval(function(){midLoop()},a.midTimer),Ka.long_loop=setInterval(function(){longLoop()},a.longTimer)),Pe.s=!0}}}function yn(){let r=1;e.race.slow&&(r*=1+b.slow.vars()[0]/100),e.race.hyper&&(r*=1-b.hyper.vars()[0]/100);let a=Math.floor(250*r),i=4*a,s=20*a,n=2,c=Xa.t>0?1/n:1;return{webWorkerMainTimer:a,mainTimer:Math.ceil(a*c),midTimer:Math.ceil(i*c),longTimer:Math.ceil(s*c),baseLongTimer:s,timeAccelerationFactor:n}}function bn(r){if(Ac(r)||e.stats.hasOwnProperty("current")&&e.settings.at>0){let a=r-e.stats.current;if(e.settings.at>11520&&(e.settings.at=0),a>=12e4){let i=yn(),s=i.baseLongTimer;e.settings.at+=Math.floor(2/3*a*i.timeAccelerationFactor/s)}e.settings.at>11520&&(e.settings.at=11520),Xa.t=e.settings.at,e.stats.current=r}}function Ac(r){return e.stats.hasOwnProperty("current")&&r-e.stats.current>=12e4}window.exportGame=function(){return e.race.noexport?`Export is not available during ${e.race.noexport} Creation`:(bn(Date.now()),LZString.compressToBase64(JSON.stringify(e)))};window.importGame=function(a,i){let s=JSON.parse(i?LZString.decompressFromUTF16(a):LZString.decompressFromBase64(a));s&&"evolution"in s&&"settings"in s&&"stats"in s&&"plasmid"in s.stats&&(Pe.w&&Pe.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)),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(s))),window.location.reload())};function xi(r,a){let i=Xr(),s=[];switch(r){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:harbour","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","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}a&&(i[r].l.length=0),s.forEach(function(n){i[r].l.includes(n)||i[r].l.push(n)}),i[r].l.length>s.length&&i[r].l.forEach(function(n){s.includes(n)||i[r].l.splice(i[r].l.indexOf(n),1)})}function Vs(r){r=r||Oa,r.forEach(function(a){rr[a]=[],e.settings.msgFilters[rr.view].vis||($(`#msgQueueFilter-${rr.view}`).removeClass("is-active"),$(`#msgQueueFilter-${a}`).addClass("is-active"),rr.view=a)})}function I(r,a,i,s,n){if(s=s||[],!n&&!s.includes("all")&&s.push("all"),a=a||"warning",s.includes(rr.view)){let c=$(''+r+"
");$("#msgQueueLog").prepend(c),$("#msgQueueLog").children().length>e.settings.msgFilters[rr.view].max&&$("#msgQueueLog").children().last().remove()}s.forEach(function(c){rr[c].unshift({msg:r,color:a}),rr[c].length>e.settings.msgFilters[c].max&&rr[c].pop()}),i||s.forEach(function(c){e.lastMsg[c]&&(e.lastMsg[c].unshift({m:r,c:a}),e.lastMsg[c].length>e.settings.msgFilters[c].save&&e.lastMsg[c].splice(e.settings.msgFilters[c].save))})}function Zr(r){for(let a=e.queue.queue.length-1;a>=0;a--)r.includes(e.queue.queue[a].id)&&e.queue.queue.splice(a,1)}function pi(r){for(let a=e.r_queue.queue.length-1;a>=0;a--)r.includes(O.tech[e.r_queue.queue[a].type].grant[0])&&e.r_queue.queue.splice(a,1)}function zr(){let r=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);r+=i>=4?2:1}e.genes.queue&&e.genes.queue>=2&&(r*=2);let a=ge("pragmatist",0);a&&(r=Math.round(r*(1+a/100))),e.queue.max=r}function ra(){let r=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);r+=i>=3?i>=5?3:2:1}e.genes.queue&&e.genes.queue>=2&&(r*=2);let a=ge("theorist",0);a&&(r=Math.round(r*(1+a/100))),e.r_queue.max=r}function na(){S0(),le($("#buildQueue")),$("#buildQueue").append($(`
+ `),D({el:"#sshifter",data:e.race,methods:{setShape(n){oa(n)}},filters:{genus(n){return t(`genelab_genus_${n}`)}}})}e.race.ss_traits=i}function _t(r,a){if(a=a||{},e.race[r]&&!a.force)switch(e.race[r]){case .25:return e.race[r]=a.down?.25:.5,!a.down;case .5:return e.race[r]=a.down?.25:1,!0;case 1:return e.race[r]=a.down?.5:2,!0;case 2:return e.race[r]=a.down?1:3,!0;case 3:return e.race[r]=a.down?2:3,!!a.down}else if(a.set)return e.race[r]=a.set,!0;return!1}function ve(r){if(e.race.unfathomable&&e.city.surfaceDwellers&&e.city.surfaceDwellers.includes(r)&&e.city.captive_housing){let a=e.city.surfaceDwellers.indexOf(r),i=e.city.captive_housing[`race${a}`];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 sa(r,a){switch(r){case"name":{let i={hooved:kl(!1),promiscuous:e.race.artifical?t("trait_promiscuous_synth_name"):b.promiscuous.name};return a?i[a]?i[a]:b[a].name:i}case"desc":{let i={hooved:kl(!0),promiscuous:e.race.artifical?t("trait_promiscuous_synth"):b.promiscuous.desc};return a?i[a]?i[a]:b[a].desc:i}}}function kl(r){return e.race.sludge?r?t("trait_hooved_slime"):t("trait_hooved_slime_name"):["cath","wolven","dracnid","seraph","cyclops","kobold","tuskin","sharkin"].includes(e.race.species)?r?t(`trait_hooved_${e.race.species}`):t(`trait_hooved_${e.race.species}_name`):["humanoid","avian","plant","fungi","reptilian","fey","synthetic"].includes(A[e.race.species].type)?r?t(`trait_hooved_${A[e.race.species].type}`):t(`trait_hooved_${A[e.race.species].type}_name`):r?b.hooved.desc:b.hooved.name}var qe={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")}},Re={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 $0(){return e.race.hasOwnProperty("shell_color")?t(`color_${e.race.shell_color}`):t("color_green")}function x0(){return e.race.hasOwnProperty("fox_color")?t(`color_${e.race.fox_color}`):t("color_red")}function qc(r){r=r||[];let a=Object.keys(A).filter(function(s){return A[s].basic()&&!r.includes(s)}),i=xs(a);return a[i]}function Ct(){if(!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==6))return;let r=$("#psychicPowers");le(r),e.race.psychic&&e.tech.psychic&&(k0(r),q0(r),e.tech.psychic>=2&&M0(r),e.tech.psychic>=3&&(e.race.psychicPowers.cash||(e.race.psychicPowers.cash=0),P0(r)),e.tech.psychicthrall&&e.tech.unfathomable&&e.race.unfathomable&&(e.tech.psychicthrall>=2&&O0(r),C0(r)))}function k0(r){let a=$('
');r.append(a),a.append($(``));let i=$("
");a.append(i);let s="";if(Object.keys(Mt).forEach(function(o){e.resource[o].display&&(s+=`${e.resource[o].name} `)}),i.append(`${s}
`),a.append('
'),e.tech.psychic>=4){let o=$(`${t("psychic_channel")}
`),d=$('{{ c.boost }} '),h=$(`« `),_=$(`» `);o.append(h),o.append(d),o.append(_),a.append(o)}let n=e.tech.psychic>=5?60:75,c=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;D({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 o=fe();for(let d=0;d0;d++)e.race.psychicPowers.channel.boost--}},filters:{boost(o){return t("psychic_boost_button",[e.resource[o]?e.resource[o].name:"N/A",n])},boostTime(){return e.race.psychicPowers.boostTime>0?t("psychic_boost_time",[e.race.psychicPowers.boostTime]):""}}});let l=document.getElementById("psyhscrolltarget");l.addEventListener("wheel",o=>{o.preventDefault(),l.scrollLeft+=o.deltaY}),pe("psychicBoost",function(){return t("psychic_boost_desc",[b.psychic.vars()[3]])},{elm:"#psychicBoost > div > button"})}function q0(r){let a=$('
');r.append(a),a.append($(``)),a.append('
');let i=e.tech.psychic>=5?8:10;D({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&&L("Food",1e4*b.anthropophagite.vars()[0]),e.stats.psykill===10&&Ct())}},filters:{kill(){return t("psychic_murder_button",[i])}}}),pe("psychicKill",function(){return t("psychic_murder_desc")},{elm:"#psychicKill > div > button"})}function M0(r){let a=$('
');if(r.append(a),a.append($(``)),a.append('
'),e.tech.psychic>=4){let n=$(`${t("psychic_channel")}
`),c=$('{{ assault }} '),l=$(`« `),o=$(`» `);n.append(l),n.append(c),n.append(o),a.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;D({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=fe();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]):""}}}),pe("psychicAssault",function(){return t("psychic_assault_desc",[b.psychic.vars()[3]])},{elm:"#psychicAssault > div > button"})}function P0(r){let a=$('
');if(r.append(a),a.append($(``)),a.append('
'),e.tech.psychic>=4){let n=$(`${t("psychic_channel")}
`),c=$('{{ cash }} '),l=$(`« `),o=$(`» `);n.append(l),n.append(c),n.append(o),a.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;D({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=fe();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]):""}}}),pe("psychicFinance",function(){return t("psychic_profit_desc",[b.psychic.vars()[3]])},{elm:"#psychicFinance > div > button"})}function C0(r){let a=$('
');r.append(a),a.append($(``)),a.append('
');let i=e.tech.psychic>=5?64:80;D({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])}}}),pe("psychicMindBreak",function(){return t("psychic_mind_break_desc")},{elm:"#psychicMindBreak > div > button"})}function O0(r){let a=$('
');r.append(a),a.append($(``)),a.append('
');let i=e.tech.psychic>=5?80:100;D({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 Os=!1;function pe(r,a,i){i||(i={}),i.hasOwnProperty("elm")||(i.elm="#"+r),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(){(Os||$("#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),a&&c.append(typeof a=="function"?a({this:this,popper:c}):a),Os=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"}),Ve("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(r){if($(".popper").length===1){Ie();return}});function Ie(r){r&&$("#popper").data("id")!==r||($("#popper").hide(),Os&&(Os.destroy(),Os=!1),le($("#popper"),!0))}function Pr(r){switch(r){case"stop":Pe.w?Pe.w.postMessage({loop:"clear"}):(clearInterval(Ka.main_loop),clearInterval(Ka.mid_loop),clearInterval(Ka.long_loop)),e.settings.at>0&&(e.settings.at=Xa.t),Pe.s=!1;break;case"start":{bn(Date.now());let a=yn();Pe.mt=a.webWorkerMainTimer,Pe.w?(Pe.w.postMessage({loop:"short",period:a.mainTimer}),Pe.w.postMessage({loop:"mid",period:a.midTimer}),Pe.w.postMessage({loop:"long",period:a.longTimer})):(Ka.main_loop=setInterval(function(){fastLoop()},a.mainTimer),Ka.mid_loop=setInterval(function(){midLoop()},a.midTimer),Ka.long_loop=setInterval(function(){longLoop()},a.longTimer)),Pe.s=!0}}}function yn(){let r=1;e.race.slow&&(r*=1+b.slow.vars()[0]/100),e.race.hyper&&(r*=1-b.hyper.vars()[0]/100);let a=Math.floor(250*r),i=4*a,s=20*a,n=2,c=Xa.t>0?1/n:1;return{webWorkerMainTimer:a,mainTimer:Math.ceil(a*c),midTimer:Math.ceil(i*c),longTimer:Math.ceil(s*c),baseLongTimer:s,timeAccelerationFactor:n}}function bn(r){if(Fc(r)||e.stats.hasOwnProperty("current")&&e.settings.at>0){let a=r-e.stats.current;if(e.settings.at>11520&&(e.settings.at=0),a>=12e4){let i=yn(),s=i.baseLongTimer;e.settings.at+=Math.floor(2/3*a*i.timeAccelerationFactor/s)}e.settings.at>11520&&(e.settings.at=11520),Xa.t=e.settings.at,e.stats.current=r}}function Fc(r){return e.stats.hasOwnProperty("current")&&r-e.stats.current>=12e4}window.exportGame=function(){return e.race.noexport?`Export is not available during ${e.race.noexport} Creation`:(bn(Date.now()),LZString.compressToBase64(JSON.stringify(e)))};window.importGame=function(a,i){let s=JSON.parse(i?LZString.decompressFromUTF16(a):LZString.decompressFromBase64(a));s&&"evolution"in s&&"settings"in s&&"stats"in s&&"plasmid"in s.stats&&(Pe.w&&Pe.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)),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(s))),window.location.reload())};function xi(r,a){let i=Xr(),s=[];switch(r){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:harbour","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","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}a&&(i[r].l.length=0),s.forEach(function(n){i[r].l.includes(n)||i[r].l.push(n)}),i[r].l.length>s.length&&i[r].l.forEach(function(n){s.includes(n)||i[r].l.splice(i[r].l.indexOf(n),1)})}function Vs(r){r=r||Oa,r.forEach(function(a){rr[a]=[],e.settings.msgFilters[rr.view].vis||($(`#msgQueueFilter-${rr.view}`).removeClass("is-active"),$(`#msgQueueFilter-${a}`).addClass("is-active"),rr.view=a)})}function I(r,a,i,s,n){if(s=s||[],!n&&!s.includes("all")&&s.push("all"),a=a||"warning",s.includes(rr.view)){let c=$(''+r+"
");$("#msgQueueLog").prepend(c),$("#msgQueueLog").children().length>e.settings.msgFilters[rr.view].max&&$("#msgQueueLog").children().last().remove()}s.forEach(function(c){rr[c].unshift({msg:r,color:a}),rr[c].length>e.settings.msgFilters[c].max&&rr[c].pop()}),i||s.forEach(function(c){e.lastMsg[c]&&(e.lastMsg[c].unshift({m:r,c:a}),e.lastMsg[c].length>e.settings.msgFilters[c].save&&e.lastMsg[c].splice(e.settings.msgFilters[c].save))})}function Zr(r){for(let a=e.queue.queue.length-1;a>=0;a--)r.includes(e.queue.queue[a].id)&&e.queue.queue.splice(a,1)}function pi(r){for(let a=e.r_queue.queue.length-1;a>=0;a--)r.includes(O.tech[e.r_queue.queue[a].type].grant[0])&&e.r_queue.queue.splice(a,1)}function zr(){let r=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);r+=i>=4?2:1}e.genes.queue&&e.genes.queue>=2&&(r*=2);let a=ge("pragmatist",0);a&&(r=Math.round(r*(1+a/100))),e.queue.max=r}function ra(){let r=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);r+=i>=3?i>=5?3:2:1}e.genes.queue&&e.genes.queue>=2&&(r*=2);let a=ge("theorist",0);a&&(r=Math.round(r*(1+a/100))),e.r_queue.max=r}function na(){S0(),le($("#buildQueue")),$("#buildQueue").append($(`
${t("building_queue")} ({{ | used_q }}/{{ max }})
- `)),e.settings.queuestyle&&$("#buildQueue").addClass(e.settings.queuestyle);let r=$('');$("#buildQueue").append(r),r.append($(`{{ item.label }}{{ item.q | count }} [{{ item.time | time }}{{ item.t_max | max_t(item.time) }} ] `));try{D({el:"#buildQueue",data:e.queue,methods:{remove(a){let i=fe();for(let s=0;s0&&(e.queue.queue[a].q-=e.queue.queue[a].qs),e.queue.queue[a].q<=0){Ie(`q${e.queue.queue[a].id}${a}`),e.queue.queue.splice(a,1),na();break}},setID(a){return`q${e.queue.queue[a].id}${a}`},setData(a,i){let s,n=e.queue.queue[a].id.split("-");n[0].substring(0,4)==="arpa"?s=n[0].substring(4):n[0]==="city"||n[0]==="evolution"||n[0]==="starDock"?s=O[n[0]][n[1]]:Object.keys(O[n[0]]).forEach(function(l){O[n[0]][l].hasOwnProperty(n[1])&&(s=O[n[0]][l][n[1]])});let c={};if(s.cost){let l=jr(s);Object.keys(l).forEach(function(o){let d=l[o]();d>0&&(c[`${i}-${o}`]=d)})}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(a){return At(a)},count(a){return a>1?` (${a})`:""},max_t(a,i){return i===a||i<0?"":` / ${At(a)}`},used_q(){let a=0;for(let i=0;ie.resource[r].max&&e.resource[r].max!=-1?n=e.resource[r].max:n<0&&((!s||s&&n*-1>s)&&(c=!1),n=0),Number.isNaN(n)||(e.resource[r].amount=n,i||(e.resource[r].delta+=a,r==="Mana"&&a>0&&(e.resource[r].gen_d+=a))),c}function ga(r){let a=F[e.race.species].type;switch(a){case"animal":a="animalism";break;case"small":a="dwarfism";break;case"giant":a="gigantism";break;case"avian":case"reptilian":a="eggshell";break;case"fungi":a="chitin";break;case"insectoid":a="athropods";break;case"angelic":a="celestial";break;case"organism":a="sentience";break}let i=r?[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")]:[F[e.race.species].name,F[e.race.species].home,t(`biome_${e.city.biome}_name`),t(`evo_${a}_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 K(r,a,i,s,n){n||(n="city"),e.race.universe==="micro"&&(s-=ft("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&&(r==="mine"||r==="coal_mine")&&(s-=b.tunneler.vars()[0]),e.tech.housing_reduction&&(r==="basic_housing"||r==="cottage")&&(s-=e.tech.housing_reduction*.02),e.tech.housing_reduction&&r==="captive_housing"&&(s-=e.tech.housing_reduction*.01),r==="basic_housing"&&(e.race.solitary&&(s-=b.solitary.vars()[0]),e.race.pack_mentality&&(s+=b.pack_mentality.vars()[0])),r==="cottage"&&(e.race.solitary&&(s+=b.solitary.vars()[1]),e.race.pack_mentality&&(s-=b.pack_mentality.vars()[1])),r==="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=ge("noquestions",0);c&&(s-=c),s<1.005&&(s=1.005);var l=r==="citizen"?e.resource[e.race.species].amount:e[n][r]?e[n][r].count:0;return a&&(l+=a),Math.round(s**l*i)}function f(r,a,i,s,n,c){n||(n="space"),c=c||1.005,e.race.universe==="micro"&&(s-=ft("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-=Ps());let l=ge("noquestions",0);l&&(s-=l),s0&&e.stats.achieve.ascended){let r=0;switch(e.race.universe){case"heavy":e.stats.achieve.ascended.hasOwnProperty("h")&&(r=e.stats.achieve.ascended.h*e.prestige.Harmony.count);break;case"antimatter":e.stats.achieve.ascended.hasOwnProperty("a")&&(r=e.stats.achieve.ascended.a*e.prestige.Harmony.count);break;case"evil":e.stats.achieve.ascended.hasOwnProperty("e")&&(r=e.stats.achieve.ascended.e*e.prestige.Harmony.count);break;case"micro":e.stats.achieve.ascended.hasOwnProperty("m")&&(r=e.stats.achieve.ascended.m*e.prestige.Harmony.count);break;case"magic":e.stats.achieve.ascended.hasOwnProperty("mg")&&(r=e.stats.achieve.ascended.mg*e.prestige.Harmony.count);break;default:e.stats.achieve.ascended.hasOwnProperty("l")&&(r=e.stats.achieve.ascended.l*e.prestige.Harmony.count);break}if(r>0)return r=(Math.log(50+r)-3.912023005428146)*.01,+r.toFixed(5)}return 0}function fa(r,a,i,s){if(s=typeof s>"u"?!0:s,r.cost){let n=0,c=!1,l=a&&a.id[r.id]?a.id[r.id]:!1,o=jr(r,l),d=a?{}:!1,h=a?{}:!1;a&&(Object.keys(a.r).forEach(function(w){d[w]=a.r[w]}),Object.keys(a.rr).forEach(function(w){h[w]=a.rr[w]}));let _=!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(w){e.race.governor.tasks[w]==="trash"&&(_=!0)});let m={};return Object.keys(o).forEach(function(w){if(n>=0&&!e.prestige.hasOwnProperty(w)&&!["Morale","HellArmy","Structs","Bool"].includes(w)){var M=Number(l?o[w](l):o[w]());if(M>0){let A=w==="Species"?e.race.species:w,x=w==="Supply"?e.portal.purifier.supply:Number(e.resource[A].amount),j=w==="Supply"?e.portal.purifier.sup_max:e.resource[A].max,B=w==="Supply"?e.portal.purifier.diff:e.resource[A].diff;if(_&&e.interstellar.mass_ejector[w]&&(B+=e.interstellar.mass_ejector[w],e.race.governor.config.trash.hasOwnProperty(w)&&(B-=Math.min(e.race.governor.config.trash[w].v,e.interstellar.mass_ejector[w]))),a&&(x+=B*(s?a.t.t:a.t.rt),a.r.hasOwnProperty(A)||(a.r[A]=0),a.rr.hasOwnProperty(A)||(a.rr[A]=0),s?(x-=Number(a.r[A]),a.r[A]+=M,a.rr[A]+=M):(x-=Number(a.rr[A]),a.rr[A]+=M),j>=0&&x>j&&(x=j)),M>x)if(B>0){let S=(M-x)/B;S>n&&(c=A,n=S),m[A]=S}else a&&(a.r=d,a.rr=h),n=-9999999,m[A]=99999999-B,(m[c]&&m[A]>m[c]||!m[c])&&(c=A)}}}),a&&n>=0&&(typeof a.id[r.id]>"u"?a.id[r.id]=1:a.id[r.id]++,s&&(a.t.t+=n),a.t.rt+=n),i?{t:n,r:c,s:m}:n}else return 0}function ei(r,a,i,s){let n=i&&i.id[r.id]?i.id[r.id]:!1,c=hs(r.cost,n),l=0,o=i?{}:!1,d=i?{}:!1,h=!1;i&&(Object.keys(i.r).forEach(function(w){o[w]=i.r[w]}),Object.keys(i.rr).forEach(function(w){d[w]=i.rr[w]}));let _=!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(w){e.race.governor.tasks[w]==="trash"&&(_=!0)});let m={};return Object.keys(c).forEach(function(w){if(l>=0){let M=Number(c[w](n))*a;if(M>0){let A=Number(e.resource[w].amount),x=e.resource[w].diff;if(i&&(_&&e.interstellar.mass_ejector[w]&&(x+=e.interstellar.mass_ejector[w],e.race.governor.config.trash.hasOwnProperty(w)&&(x-=Math.min(e.race.governor.config.trash[w].v,e.interstellar.mass_ejector[w]))),A+=x*i.t.t,i.r[w]?(A-=Number(i.r[w]),i.r[w]+=M):i.r[w]=M,i.rr[w]?i.rr[w]+=M:i.rr[w]=M,e.resource[w].max>=0&&A>e.resource[w].max&&(A=e.resource[w].max)),M>A)if(x>0){let j=(M-A)/x;j>l&&(l=j,h=w),m[w]=j}else i&&(i.r=o,i.rr=d),l=-9999999,m[w]=99999999-x,(m[h]&&m[w]>m[h]||!m[h])&&(h=w)}}}),i&&l>=0&&(typeof i.id[r.id]>"u"?i.id[r.id]=1:i.id[r.id]++,i.t.t+=l,i.t.rt+=l),s?{t:l,r:h,s:m}:l}function le(r,a){if(r.find(".vb").each(function(){try{$(this)[0].__vue__.$destroy()}catch{}}),a){try{r[0].__vue__.$destroy()}catch{}r.remove()}else r.empty()}function D(r,a){if(a=a||"create",$(r.el).length>0&&typeof $(r.el)[0].__vue__<"u")try{a==="update"?$(r.el)[0].__vue__.$forceUpdate():$(r.el)[0].__vue__.$destroy()}catch{}a==="create"&&(new Vue(r),$(r.el).addClass("vb"))}function At(r){let a;if(r<0)a=t("time_never");else if(r=+r.toFixed(0),r>60){let i=r%60,s=(r-i)/60;if(s>=60){let n=s%60,c=(s-n)/60;c>24?(n=c%24,a=`${(c-n)/24}d ${n}h`):(n=("0"+n).slice(-2),a=`${c}h ${n}m`)}else i=("0"+i).slice(-2),a=`${s}m ${i}s`}else a=`${r}s`;return a}function dt(r){return e.race.universe==="antimatter"&&(r*=ft("antimatter"),r=+r.toFixed(2)),ma()==="leo"&&(r*=1+Zt("leo")[0]/100,r=+r.toFixed(2)),r}function _e(r){return e.race.emfield?+(r*1.5).toFixed(2):r}function ft(r,a,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,l=s.sludge!==void 0?s.sludge:e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge[it(r)]?e.stats.achieve.extinct_sludge[it(r)]:0;switch(r){case"standard":return e.race.universe==="standard"||i?(c>0&&(n*=1+c*.001),l&&(n*=1+l*.03),1+n/200):0;case"evil":return e.race.universe==="evil"||i?(c>0&&(n*=1+c*.01),l&&(n*=1+l*.03),1+(Math.log2(10+n)-3.321928094887362)/5):1;case"micro":return e.race.universe==="micro"||i?a?(c>0&&(n*=1+c*.01),n=.01+(Math.log(100+n)-4.605170185988092)/35,l&&(n*=1+l*.03),n>.04&&(n=.04),+n.toFixed(5)):(c>0&&(n*=1+c*.01),n=.02+(Math.log(100+n)-4.605170185988092)/20,l&&(n*=1+l*.03),n>.06&&(n=.06),+n.toFixed(5)):0;case"heavy":return e.race.universe==="heavy"||i?(c>0&&(n*=1+c*.01),l&&(n*=1+l*.03),.995**n):1;case"antimatter":return e.race.universe==="antimatter"||i?(c>0&&(n*=1+c*.01),l&&(n*=1+l*.03),1+(Math.log(50+n)-3.912023005428146)/5):0;case"magic":return e.race.universe==="magic"||i?(c>0&&(n*=1+c*.01),l&&(n*=1+l*.03),1+(Math.log(50+n)-3.912023005428146)/3):0}return 0}var Nt=function(){var r;return function(a){return r&&!a?r:e.genes.challenge&&e.genes.challenge>=2?(r=Fc(e.race.universe),r):0}}();function Fc(r,a){if(e.genes.challenge&&e.genes.challenge>=2){r=r||e.race.universe;let i=Tc(r),s=r==="standard"?.25:.15,n=e.genes.challenge>=3?.15:.1;e.genes.challenge>=4&&r!=="standard"&&(s+=.05,n-=.05),e.race.weak_mastery&&r==="antimatter"&&(s/=10,n/=10),e.race.nerfed&&(s/=r==="antimatter"?5:2,n/=r==="antimatter"?5:2),e.race.ooze&&(s*=1-b.ooze.vars()[2]/100,n*=1-b.ooze.vars()[2]/100);let c=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;c>0&&(s*=1+c/100,n*=1+c/100);let l=i.aLvl*s,o=0;return r!=="standard"&&(o=i.uLvl*n),e.genes.challenge>=5&&e.race.hasOwnProperty("mastery")&&(l*=1+b.mastery.vars()[0]*e.race.mastery/100,o*=1+b.mastery.vars()[0]*e.race.mastery/100),a?{g:l,u:o,m:l+o}:l+o}return a?{g:0,u:0,m:0}:0}var ea=function(){var r;return function(a){if(!r||a){let i=0;Object.keys(e.pillars).forEach(function(s){F[s]&&e.race.species===s?i+=4:F[s]&&i++}),r=[1+i/100,1+i*2/100]}return r}}();function gn(r,a,i,s){i=i||0,s=s||{};let n=s.genes;n===void 0&&(n=Jt()-1,n>4&&(n=4));let c=s.uni||e.race.universe;if(c==="micro"&&(r=r*.25),c==="antimatter"&&(r=r*1.1),c==="heavy"&&a!=="mad")switch(n){case 1:r=r*1.1;break;case 2:r=r*1.15;break;case 3:r=r*1.2;break;case 4:r=r*1.25;break;default:r=r*1.05;break}switch((s.tp!==void 0?s.tp:e.race.truepath)&&(r=r*1.1),n){case 1:return+(r*1.05).toFixed(i);case 2:return+(r*1.12).toFixed(i);case 3:return+(r*1.25).toFixed(i);case 4:return+(r*1.45).toFixed(i);default:return+r.toFixed(i)}}function z0(r,a){a||(a={});let i={pop_divisor:999,k_inc:1e6,k_mult:100,phage_mult:0,plasmid_cap:150};switch(r){case"mad":i.pop_divisor=3,i.k_inc=1e5,i.k_mult=1.1,i.plasmid_cap=150,a.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 ot(r,a){let i={plasmid:0,phage:0,dark:0,harmony:0,artifact:0,cores:0};a||(a={}),a.synth!==void 0&&(a.synth=F[e.race.species].type==="synthetic");let s=a.genes,n=a.uni;n=n||e.race.universe;let c=0;if(a.cit===void 0){let w=e.civic.hasOwnProperty("garrison")?e.civic.garrison.workers:0;for(let M=0;M<3;M++)e.civic.foreign[`gov${M}`].occ&&(w+=N(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(w/b.high_pop.vars()[0]):c=e.resource[e.race.species].amount+w}else a.high_pop?c=Math.round(a.cit/b.high_pop.vars(a.high_pop)[0])+Math.round(a.sol/b.high_pop.vars(a.high_pop)[0]):c=a.cit+a.sol;let l=z0(r,a),o=l.pop_divisor,d=l.k_inc,h=l.k_mult,_=l.phage_mult,m=l.plasmid_cap;if(s!==void 0?m=Math.floor(m*(1+(s+(a.tp?1:0))/8)):m=Math.floor(m*(1+(Jt()-(e.race.truepath?0:1))/8)),a.plas===void 0){let w=a.know!==void 0?a.know:e.stats.know,M=Math.round(c/o);for(;w>d;)M++,w-=d,d*=h;if(e.race.cataclysm?M+=300:e.race.lone_survivor&&(M+=800),i.plasmid=gn(M,r,!1,a),!a.rawPlasmids&&i.plasmid>m){let A=i.plasmid-m;i.plasmid=m,A=Math.floor(A/(A+m)*m),i.plasmid+=A}}else i.plasmid=a.plas;if(i.phage=i.plasmid>0?gn(Math.floor(Math.log2(i.plasmid)*Math.E*_),r,!1,a):0,r==="bigbang"){let w=a.exotic,M=a.mass;w===void 0&&e.interstellar&&e.interstellar.stellar_engine&&(w=e.interstellar.stellar_engine.exotic,M=e.interstellar.stellar_engine.mass);let A=+Math.log(1+w*40).toFixed(3);A+=+(Math.log2(M-7)/2.5).toFixed(3),A=gn(A,"bigbang",3,a),i.dark=A}else if(r==="vacuum"){let w=a.mana!==void 0?a.mana:e.resource.Mana.gen,M=+(Math.log2(w)/5).toFixed(3);M=gn(M,"vacuum",3,a),i.dark=M}if(["ascend","descend","terraform"].includes(r)){let w=1;if(s===void 0?(w=Jt(),w>5&&(w=5)):w=s+1,r==="ascend"||r==="terraform"){switch(n){case"micro":w*=.25;break;case"heavy":w*=1.2;break;case"antimatter":w*=1.1;break;default:break}i.harmony=parseFloat(w.toFixed(2))}else if(r==="descend"){let M=n==="micro"?1:w,A=a.floor;A!==void 0?A++:A=e.portal.hasOwnProperty("spire")?e.portal.spire.count:0,[50,100].forEach(function(x){A>x&&M++}),i.artifact=M}}return r==="ai"&&(i.cores=n==="micro"?2:5),i}function jr(r,a,i){let s=r.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](a,i)*.8)})}),n}return s=T0(s,a,i),s=I0(s,r,a,i),s=E0(s,a,i),s=L0(s,a,i),s=N0(s,a,i),s=R0(s,a,i),s=G0(s,a,i),s=B0(s,a,i),s=D0(s,a,i),s=W0(s,a,i),s=K0(s,a,i),s=U0(s,a,i),H0(s,a,i)}function T0(r,a,i){if(e.race.bloated){let n=1+b.bloated.vars()[0]/100;var s={};return Object.keys(r).forEach(function(c){["Food","Lumber","Stone","Furs","Copper","Iron","Aluminium","Cement","Coal","Steel","Titanium","Alloy","Polymer","Iridium"].includes(c)?s[c]=function(){return r[c](a,i)*n}:s[c]=function(){return r[c](a,i)}}),s}return r}function E0(r,a,i){if(e.race.lone_survivor){var s={};return Object.keys(r).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 r[n](a,i)}:["Knowledge"].includes(n)?s[n]=function(){return Math.round(r[n](a,i)*.5)}:["Money"].includes(n)?s[n]=function(){return Math.round(r[n](a,i)*.22)}:["Plywood","Brick","Wrought_Iron","Sheet_Metal","Mythril","Quantium"].includes(n)?s[n]=function(){return Math.round(r[n](a,i)*.14)}:s[n]=function(){return Math.round(r[n](a,i)*.28)}}),s}return r}function I0(r,a,i,s){if((s?s.truepath:e.race.truepath)&&(!a.hasOwnProperty("path")||!a.path.includes("truepath"))){var n={};return Object.keys(r).forEach(function(c){c==="Money"?n[c]=function(){return Math.round(r[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 r[c](i,s)}:n[c]=function(){return Math.round(r[c](i,s)*2)}}),n}return r}function L0(r,a,i){if(e.race.inflation){var s={};return Object.keys(r).forEach(function(n){if(n==="Money"){let c=1+e.race.inflation/75;s[n]=function(){return Math.round(r[n](a,i)*c)}}else s[n]=function(){return r[n](a,i)}}),s}return r}function K0(r,a,i){let s=ge("extravagant",0);if(s){var n={};return Object.keys(r).forEach(function(c){if(c==="Money"){let l=1+s/100;n[c]=function(){return Math.round(r[c](a,i)*l)}}else n[c]=function(){return r[c](a,i)}}),n}return r}function N0(r,a,i){if(e.civic.govern.type==="technocracy"){let n=1+$e.technocracy()[1]/100;var s={};return Object.keys(r).forEach(function(c){if(c==="Knowledge"){let l=1-$e.technocracy()[0]/100;s[c]=function(){return Math.round(r[c](a,i)*l)}}else c==="Money"||c==="Structs"||c==="Custom"?s[c]=function(){return r[c](a,i)}:s[c]=function(){return Math.round(r[c](a,i)*n)}}),s}return r}function D0(r,a,i){let s=ge("pragmatist",1),n=ve("gnome");if((e.race.smart||e.race.dumb||s||n>0)&&r.Knowledge){var c={};return Object.keys(r).forEach(function(l){l==="Knowledge"?c[l]=function(){let o=r[l](a,i);return e.race.smart&&(o*=1-b.smart.vars()[0]/100),n>0&&(o*=1-b.smart.vars(1)[0]/100*n),e.race.dumb&&(o*=1+b.dumb.vars()[0]/100),s&&(o*=1+s/100),Math.round(o)}:c[l]=function(){return r[l](a,i)}}),c}return r}function B0(r,a,i){if(e.race.smoldering){let s={};return Object.keys(r).forEach(function(n){if(n==="Lumber"||n==="Plywood"){let c=n==="Plywood"?2:1;s.Chrysotile=function(){return Math.round(r[n](a,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 r[n](a,i)}:s[n]=function(){return Math.round(r[n](a,i)*.9)}}),!s.hasOwnProperty("Chrysotile")&&r.hasOwnProperty("Money")&&e.tech.primitive&&e.tech.primitive>=3&&(s.Chrysotile=function(){let n=r.Money(a,i)||0;return n>0?Math.round(n/50):0}),s}return r}function G0(r,a,i){if(e.race.kindling_kindred&&(r.Lumber||r.Plywood)){var s={};let n=1+b.kindling_kindred.vars()[0]/100;return Object.keys(r).forEach(function(c){c!=="Lumber"&&c!=="Plywood"&&c!=="Structs"?s[c]=function(){return Math.round(r[c](a,i)*n)||0}:c==="Structs"&&(s[c]=function(){return r[c](a,i)})}),s}else if(e.race.unfathomable&&e.city.captive_housing){let n=ve("entish");if(n>0){var s={};let l=1-.4*n;return Object.keys(r).forEach(function(o){o==="Lumber"&&o==="Plywood"?s[o]=function(){return Math.round(r[o](a,i)*l)||0}:s[o]=function(){return r[o](a,i)}}),s}}return r}function R0(r,a,i){if(e.race.flier&&(r.Stone||r.Cement)){var s={};let n=1-b.flier.vars()[0]/100;return Object.keys(r).forEach(function(c){c==="Stone"&&!r.Cement?s[c]=function(){return Math.round(r[c](a,i)*n)||0}:c==="Cement"?r.Stone?s.Stone=function(){return Math.round(r.Stone(a,i)*n+r[c](a,i)*1.8*n)||0}:s.Stone=function(){return Math.round(r[c](a,i)*1.75*n)}:s[c]=function(){return r[c](a,i)}}),s}return r}function H0(r,a,i){let s=ve("pterodacti");if((e.race.hollow_bones||s>0)&&(r.Plywood||r.Brick||r.Wrought_Iron||r.Sheet_Metal||r.Mythril||r.Aerogel||r.Nanoweave||r.Scarletite||r.Quantium)){var n={};return Object.keys(r).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 l=r[c](a,i);return e.race.hollow_bones&&(l*=1-b.hollow_bones.vars()[0]/100),s>0&&(l*=1-b.hollow_bones.vars(3)[0]/100*s),Math.round(l)}:n[c]=function(){return r[c](a,i)}}),n}return r}function Si(r){return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}function U0(r,a,i){if(e.race.heavy){var s={};return Object.keys(r).forEach(function(n){n==="Stone"||n==="Cement"||n==="Wrought_Iron"?s[n]=function(){return Math.round(r[n](a,i)*(1+b.heavy.vars()[1]/100))}:s[n]=function(){return r[n](a,i)}}),s}return r}function W0(r,a,i){if(r.Cement&&e.tech.cement&&e.tech.cement>=2){let n=e.tech.cement>=3?.8:.9;var s={};return Object.keys(r).forEach(function(c){c==="Cement"?s[c]=function(){return Math.round(r[c](a,i)*n)||0}:s[c]=function(){return r[c](a,i)}}),s}return r}function Ss(r){switch(r){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 r=$('');$("#buildQueue").append(r),r.append($(`{{ item.label }}{{ item.q | count }} [{{ item.time | time }}{{ item.t_max | max_t(item.time) }} ] `));try{D({el:"#buildQueue",data:e.queue,methods:{remove(a){let i=fe();for(let s=0;s0&&(e.queue.queue[a].q-=e.queue.queue[a].qs),e.queue.queue[a].q<=0){Ie(`q${e.queue.queue[a].id}${a}`),e.queue.queue.splice(a,1),na();break}},setID(a){return`q${e.queue.queue[a].id}${a}`},setData(a,i){let s,n=e.queue.queue[a].id.split("-");n[0].substring(0,4)==="arpa"?s=n[0].substring(4):n[0]==="city"||n[0]==="evolution"||n[0]==="starDock"?s=O[n[0]][n[1]]:Object.keys(O[n[0]]).forEach(function(l){O[n[0]][l].hasOwnProperty(n[1])&&(s=O[n[0]][l][n[1]])});let c={};if(s.cost){let l=jr(s);Object.keys(l).forEach(function(o){let d=l[o]();d>0&&(c[`${i}-${o}`]=d)})}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(a){return Ft(a)},count(a){return a>1?` (${a})`:""},max_t(a,i){return i===a||i<0?"":` / ${Ft(a)}`},used_q(){let a=0;for(let i=0;ie.resource[r].max&&e.resource[r].max!=-1?n=e.resource[r].max:n<0&&((!s||s&&n*-1>s)&&(c=!1),n=0),Number.isNaN(n)||(e.resource[r].amount=n,i||(e.resource[r].delta+=a,r==="Mana"&&a>0&&(e.resource[r].gen_d+=a))),c}function ga(r){let a=A[e.race.species].type;switch(a){case"animal":a="animalism";break;case"small":a="dwarfism";break;case"giant":a="gigantism";break;case"avian":case"reptilian":a="eggshell";break;case"fungi":a="chitin";break;case"insectoid":a="athropods";break;case"angelic":a="celestial";break;case"organism":a="sentience";break}let i=r?[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")]:[A[e.race.species].name,A[e.race.species].home,t(`biome_${e.city.biome}_name`),t(`evo_${a}_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 K(r,a,i,s,n){n||(n="city"),e.race.universe==="micro"&&(s-=ft("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&&(r==="mine"||r==="coal_mine")&&(s-=b.tunneler.vars()[0]),e.tech.housing_reduction&&(r==="basic_housing"||r==="cottage")&&(s-=e.tech.housing_reduction*.02),e.tech.housing_reduction&&r==="captive_housing"&&(s-=e.tech.housing_reduction*.01),r==="basic_housing"&&(e.race.solitary&&(s-=b.solitary.vars()[0]),e.race.pack_mentality&&(s+=b.pack_mentality.vars()[0])),r==="cottage"&&(e.race.solitary&&(s+=b.solitary.vars()[1]),e.race.pack_mentality&&(s-=b.pack_mentality.vars()[1])),r==="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=ge("noquestions",0);c&&(s-=c),s<1.005&&(s=1.005);var l=r==="citizen"?e.resource[e.race.species].amount:e[n][r]?e[n][r].count:0;return a&&(l+=a),Math.round(s**l*i)}function f(r,a,i,s,n,c){n||(n="space"),c=c||1.005,e.race.universe==="micro"&&(s-=ft("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-=Ps());let l=ge("noquestions",0);l&&(s-=l),s0&&e.stats.achieve.ascended){let r=0;switch(e.race.universe){case"heavy":e.stats.achieve.ascended.hasOwnProperty("h")&&(r=e.stats.achieve.ascended.h*e.prestige.Harmony.count);break;case"antimatter":e.stats.achieve.ascended.hasOwnProperty("a")&&(r=e.stats.achieve.ascended.a*e.prestige.Harmony.count);break;case"evil":e.stats.achieve.ascended.hasOwnProperty("e")&&(r=e.stats.achieve.ascended.e*e.prestige.Harmony.count);break;case"micro":e.stats.achieve.ascended.hasOwnProperty("m")&&(r=e.stats.achieve.ascended.m*e.prestige.Harmony.count);break;case"magic":e.stats.achieve.ascended.hasOwnProperty("mg")&&(r=e.stats.achieve.ascended.mg*e.prestige.Harmony.count);break;default:e.stats.achieve.ascended.hasOwnProperty("l")&&(r=e.stats.achieve.ascended.l*e.prestige.Harmony.count);break}if(r>0)return r=(Math.log(50+r)-3.912023005428146)*.01,+r.toFixed(5)}return 0}function fa(r,a,i,s){if(s=typeof s>"u"?!0:s,r.cost){let n=0,c=!1,l=a&&a.id[r.id]?a.id[r.id]:!1,o=jr(r,l),d=a?{}:!1,h=a?{}:!1;a&&(Object.keys(a.r).forEach(function(w){d[w]=a.r[w]}),Object.keys(a.rr).forEach(function(w){h[w]=a.rr[w]}));let _=!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(w){e.race.governor.tasks[w]==="trash"&&(_=!0)});let m={};return Object.keys(o).forEach(function(w){if(n>=0&&!e.prestige.hasOwnProperty(w)&&!["Morale","HellArmy","Structs","Bool"].includes(w)){var M=Number(l?o[w](l):o[w]());if(M>0){let F=w==="Species"?e.race.species:w,x=w==="Supply"?e.portal.purifier.supply:Number(e.resource[F].amount),j=w==="Supply"?e.portal.purifier.sup_max:e.resource[F].max,B=w==="Supply"?e.portal.purifier.diff:e.resource[F].diff;if(_&&e.interstellar.mass_ejector[w]&&(B+=e.interstellar.mass_ejector[w],e.race.governor.config.trash.hasOwnProperty(w)&&(B-=Math.min(e.race.governor.config.trash[w].v,e.interstellar.mass_ejector[w]))),a&&(x+=B*(s?a.t.t:a.t.rt),a.r.hasOwnProperty(F)||(a.r[F]=0),a.rr.hasOwnProperty(F)||(a.rr[F]=0),s?(x-=Number(a.r[F]),a.r[F]+=M,a.rr[F]+=M):(x-=Number(a.rr[F]),a.rr[F]+=M),j>=0&&x>j&&(x=j)),M>x)if(B>0){let S=(M-x)/B;S>n&&(c=F,n=S),m[F]=S}else a&&(a.r=d,a.rr=h),n=-9999999,m[F]=99999999-B,(m[c]&&m[F]>m[c]||!m[c])&&(c=F)}}}),a&&n>=0&&(typeof a.id[r.id]>"u"?a.id[r.id]=1:a.id[r.id]++,s&&(a.t.t+=n),a.t.rt+=n),i?{t:n,r:c,s:m}:n}else return 0}function ei(r,a,i,s){let n=i&&i.id[r.id]?i.id[r.id]:!1,c=hs(r.cost,n),l=0,o=i?{}:!1,d=i?{}:!1,h=!1;i&&(Object.keys(i.r).forEach(function(w){o[w]=i.r[w]}),Object.keys(i.rr).forEach(function(w){d[w]=i.rr[w]}));let _=!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(w){e.race.governor.tasks[w]==="trash"&&(_=!0)});let m={};return Object.keys(c).forEach(function(w){if(l>=0){let M=Number(c[w](n))*a;if(M>0){let F=Number(e.resource[w].amount),x=e.resource[w].diff;if(i&&(_&&e.interstellar.mass_ejector[w]&&(x+=e.interstellar.mass_ejector[w],e.race.governor.config.trash.hasOwnProperty(w)&&(x-=Math.min(e.race.governor.config.trash[w].v,e.interstellar.mass_ejector[w]))),F+=x*i.t.t,i.r[w]?(F-=Number(i.r[w]),i.r[w]+=M):i.r[w]=M,i.rr[w]?i.rr[w]+=M:i.rr[w]=M,e.resource[w].max>=0&&F>e.resource[w].max&&(F=e.resource[w].max)),M>F)if(x>0){let j=(M-F)/x;j>l&&(l=j,h=w),m[w]=j}else i&&(i.r=o,i.rr=d),l=-9999999,m[w]=99999999-x,(m[h]&&m[w]>m[h]||!m[h])&&(h=w)}}}),i&&l>=0&&(typeof i.id[r.id]>"u"?i.id[r.id]=1:i.id[r.id]++,i.t.t+=l,i.t.rt+=l),s?{t:l,r:h,s:m}:l}function le(r,a){if(r.find(".vb").each(function(){try{$(this)[0].__vue__.$destroy()}catch{}}),a){try{r[0].__vue__.$destroy()}catch{}r.remove()}else r.empty()}function D(r,a){if(a=a||"create",$(r.el).length>0&&typeof $(r.el)[0].__vue__<"u")try{a==="update"?$(r.el)[0].__vue__.$forceUpdate():$(r.el)[0].__vue__.$destroy()}catch{}a==="create"&&(new Vue(r),$(r.el).addClass("vb"))}function Ft(r){let a;if(r<0)a=t("time_never");else if(r=+r.toFixed(0),r>60){let i=r%60,s=(r-i)/60;if(s>=60){let n=s%60,c=(s-n)/60;c>24?(n=c%24,a=`${(c-n)/24}d ${n}h`):(n=("0"+n).slice(-2),a=`${c}h ${n}m`)}else i=("0"+i).slice(-2),a=`${s}m ${i}s`}else a=`${r}s`;return a}function dt(r){return e.race.universe==="antimatter"&&(r*=ft("antimatter"),r=+r.toFixed(2)),ma()==="leo"&&(r*=1+Zt("leo")[0]/100,r=+r.toFixed(2)),r}function _e(r){return e.race.emfield?+(r*1.5).toFixed(2):r}function ft(r,a,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,l=s.sludge!==void 0?s.sludge:e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge[ot(r)]?e.stats.achieve.extinct_sludge[ot(r)]:0;switch(r){case"standard":return e.race.universe==="standard"||i?(c>0&&(n*=1+c*.001),l&&(n*=1+l*.03),1+n/200):0;case"evil":return e.race.universe==="evil"||i?(c>0&&(n*=1+c*.01),l&&(n*=1+l*.03),1+(Math.log2(10+n)-3.321928094887362)/5):1;case"micro":return e.race.universe==="micro"||i?a?(c>0&&(n*=1+c*.01),n=.01+(Math.log(100+n)-4.605170185988092)/35,l&&(n*=1+l*.03),n>.04&&(n=.04),+n.toFixed(5)):(c>0&&(n*=1+c*.01),n=.02+(Math.log(100+n)-4.605170185988092)/20,l&&(n*=1+l*.03),n>.06&&(n=.06),+n.toFixed(5)):0;case"heavy":return e.race.universe==="heavy"||i?(c>0&&(n*=1+c*.01),l&&(n*=1+l*.03),.995**n):1;case"antimatter":return e.race.universe==="antimatter"||i?(c>0&&(n*=1+c*.01),l&&(n*=1+l*.03),1+(Math.log(50+n)-3.912023005428146)/5):0;case"magic":return e.race.universe==="magic"||i?(c>0&&(n*=1+c*.01),l&&(n*=1+l*.03),1+(Math.log(50+n)-3.912023005428146)/3):0}return 0}var Nt=function(){var r;return function(a){return r&&!a?r:e.genes.challenge&&e.genes.challenge>=2?(r=Ac(e.race.universe),r):0}}();function Ac(r,a){if(e.genes.challenge&&e.genes.challenge>=2){r=r||e.race.universe;let i=Tc(r),s=r==="standard"?.25:.15,n=e.genes.challenge>=3?.15:.1;e.genes.challenge>=4&&r!=="standard"&&(s+=.05,n-=.05),e.race.weak_mastery&&r==="antimatter"&&(s/=10,n/=10),e.race.nerfed&&(s/=r==="antimatter"?5:2,n/=r==="antimatter"?5:2),e.race.ooze&&(s*=1-b.ooze.vars()[2]/100,n*=1-b.ooze.vars()[2]/100);let c=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;c>0&&(s*=1+c/100,n*=1+c/100);let l=i.aLvl*s,o=0;return r!=="standard"&&(o=i.uLvl*n),e.genes.challenge>=5&&e.race.hasOwnProperty("mastery")&&(l*=1+b.mastery.vars()[0]*e.race.mastery/100,o*=1+b.mastery.vars()[0]*e.race.mastery/100),a?{g:l,u:o,m:l+o}:l+o}return a?{g:0,u:0,m:0}:0}var ea=function(){var r;return function(a){if(!r||a){let i=0;Object.keys(e.pillars).forEach(function(s){A[s]&&e.race.species===s?i+=4:A[s]&&i++}),r=[1+i/100,1+i*2/100]}return r}}();function gn(r,a,i,s){i=i||0,s=s||{};let n=s.genes;n===void 0&&(n=Jt()-1,n>4&&(n=4));let c=s.uni||e.race.universe;if(c==="micro"&&(r=r*.25),c==="antimatter"&&(r=r*1.1),c==="heavy"&&a!=="mad")switch(n){case 1:r=r*1.1;break;case 2:r=r*1.15;break;case 3:r=r*1.2;break;case 4:r=r*1.25;break;default:r=r*1.05;break}switch((s.tp!==void 0?s.tp:e.race.truepath)&&(r=r*1.1),n){case 1:return+(r*1.05).toFixed(i);case 2:return+(r*1.12).toFixed(i);case 3:return+(r*1.25).toFixed(i);case 4:return+(r*1.45).toFixed(i);default:return+r.toFixed(i)}}function z0(r,a){a||(a={});let i={pop_divisor:999,k_inc:1e6,k_mult:100,phage_mult:0,plasmid_cap:150};switch(r){case"mad":i.pop_divisor=3,i.k_inc=1e5,i.k_mult=1.1,i.plasmid_cap=150,a.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 ct(r,a){let i={plasmid:0,phage:0,dark:0,harmony:0,artifact:0,cores:0};a||(a={}),a.synth!==void 0&&(a.synth=A[e.race.species].type==="synthetic");let s=a.genes,n=a.uni;n=n||e.race.universe;let c=0;if(a.cit===void 0){let w=e.civic.hasOwnProperty("garrison")?e.civic.garrison.workers:0;for(let M=0;M<3;M++)e.civic.foreign[`gov${M}`].occ&&(w+=N(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(w/b.high_pop.vars()[0]):c=e.resource[e.race.species].amount+w}else a.high_pop?c=Math.round(a.cit/b.high_pop.vars(a.high_pop)[0])+Math.round(a.sol/b.high_pop.vars(a.high_pop)[0]):c=a.cit+a.sol;let l=z0(r,a),o=l.pop_divisor,d=l.k_inc,h=l.k_mult,_=l.phage_mult,m=l.plasmid_cap;if(s!==void 0?m=Math.floor(m*(1+(s+(a.tp?1:0))/8)):m=Math.floor(m*(1+(Jt()-(e.race.truepath?0:1))/8)),a.plas===void 0){let w=a.know!==void 0?a.know:e.stats.know,M=Math.round(c/o);for(;w>d;)M++,w-=d,d*=h;if(e.race.cataclysm?M+=300:e.race.lone_survivor&&(M+=800),i.plasmid=gn(M,r,!1,a),!a.rawPlasmids&&i.plasmid>m){let F=i.plasmid-m;i.plasmid=m,F=Math.floor(F/(F+m)*m),i.plasmid+=F}}else i.plasmid=a.plas;if(i.phage=i.plasmid>0?gn(Math.floor(Math.log2(i.plasmid)*Math.E*_),r,!1,a):0,r==="bigbang"){let w=a.exotic,M=a.mass;w===void 0&&e.interstellar&&e.interstellar.stellar_engine&&(w=e.interstellar.stellar_engine.exotic,M=e.interstellar.stellar_engine.mass);let F=+Math.log(1+w*40).toFixed(3);F+=+(Math.log2(M-7)/2.5).toFixed(3),F=gn(F,"bigbang",3,a),i.dark=F}else if(r==="vacuum"){let w=a.mana!==void 0?a.mana:e.resource.Mana.gen,M=+(Math.log2(w)/5).toFixed(3);M=gn(M,"vacuum",3,a),i.dark=M}if(["ascend","descend","terraform"].includes(r)){let w=1;if(s===void 0?(w=Jt(),w>5&&(w=5)):w=s+1,r==="ascend"||r==="terraform"){switch(n){case"micro":w*=.25;break;case"heavy":w*=1.2;break;case"antimatter":w*=1.1;break;default:break}i.harmony=parseFloat(w.toFixed(2))}else if(r==="descend"){let M=n==="micro"?1:w,F=a.floor;F!==void 0?F++:F=e.portal.hasOwnProperty("spire")?e.portal.spire.count:0,[50,100].forEach(function(x){F>x&&M++}),i.artifact=M}}return r==="ai"&&(i.cores=n==="micro"?2:5),i}function jr(r,a,i){let s=r.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](a,i)*.8)})}),n}return s=T0(s,a,i),s=I0(s,r,a,i),s=E0(s,a,i),s=L0(s,a,i),s=N0(s,a,i),s=R0(s,a,i),s=G0(s,a,i),s=B0(s,a,i),s=D0(s,a,i),s=W0(s,a,i),s=K0(s,a,i),s=U0(s,a,i),H0(s,a,i)}function T0(r,a,i){if(e.race.bloated){let n=1+b.bloated.vars()[0]/100;var s={};return Object.keys(r).forEach(function(c){["Food","Lumber","Stone","Furs","Copper","Iron","Aluminium","Cement","Coal","Steel","Titanium","Alloy","Polymer","Iridium"].includes(c)?s[c]=function(){return r[c](a,i)*n}:s[c]=function(){return r[c](a,i)}}),s}return r}function E0(r,a,i){if(e.race.lone_survivor){var s={};return Object.keys(r).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 r[n](a,i)}:["Knowledge"].includes(n)?s[n]=function(){return Math.round(r[n](a,i)*.5)}:["Money"].includes(n)?s[n]=function(){return Math.round(r[n](a,i)*.22)}:["Plywood","Brick","Wrought_Iron","Sheet_Metal","Mythril","Quantium"].includes(n)?s[n]=function(){return Math.round(r[n](a,i)*.14)}:s[n]=function(){return Math.round(r[n](a,i)*.28)}}),s}return r}function I0(r,a,i,s){if((s?s.truepath:e.race.truepath)&&(!a.hasOwnProperty("path")||!a.path.includes("truepath"))){var n={};return Object.keys(r).forEach(function(c){c==="Money"?n[c]=function(){return Math.round(r[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 r[c](i,s)}:n[c]=function(){return Math.round(r[c](i,s)*2)}}),n}return r}function L0(r,a,i){if(e.race.inflation){var s={};return Object.keys(r).forEach(function(n){if(n==="Money"){let c=1+e.race.inflation/75;s[n]=function(){return Math.round(r[n](a,i)*c)}}else s[n]=function(){return r[n](a,i)}}),s}return r}function K0(r,a,i){let s=ge("extravagant",0);if(s){var n={};return Object.keys(r).forEach(function(c){if(c==="Money"){let l=1+s/100;n[c]=function(){return Math.round(r[c](a,i)*l)}}else n[c]=function(){return r[c](a,i)}}),n}return r}function N0(r,a,i){if(e.civic.govern.type==="technocracy"){let n=1+$e.technocracy()[1]/100;var s={};return Object.keys(r).forEach(function(c){if(c==="Knowledge"){let l=1-$e.technocracy()[0]/100;s[c]=function(){return Math.round(r[c](a,i)*l)}}else c==="Money"||c==="Structs"||c==="Custom"?s[c]=function(){return r[c](a,i)}:s[c]=function(){return Math.round(r[c](a,i)*n)}}),s}return r}function D0(r,a,i){let s=ge("pragmatist",1),n=ve("gnome");if((e.race.smart||e.race.dumb||s||n>0)&&r.Knowledge){var c={};return Object.keys(r).forEach(function(l){l==="Knowledge"?c[l]=function(){let o=r[l](a,i);return e.race.smart&&(o*=1-b.smart.vars()[0]/100),n>0&&(o*=1-b.smart.vars(1)[0]/100*n),e.race.dumb&&(o*=1+b.dumb.vars()[0]/100),s&&(o*=1+s/100),Math.round(o)}:c[l]=function(){return r[l](a,i)}}),c}return r}function B0(r,a,i){if(e.race.smoldering){let s={};return Object.keys(r).forEach(function(n){if(n==="Lumber"||n==="Plywood"){let c=n==="Plywood"?2:1;s.Chrysotile=function(){return Math.round(r[n](a,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 r[n](a,i)}:s[n]=function(){return Math.round(r[n](a,i)*.9)}}),!s.hasOwnProperty("Chrysotile")&&r.hasOwnProperty("Money")&&e.tech.primitive&&e.tech.primitive>=3&&(s.Chrysotile=function(){let n=r.Money(a,i)||0;return n>0?Math.round(n/50):0}),s}return r}function G0(r,a,i){if(e.race.kindling_kindred&&(r.Lumber||r.Plywood)){var s={};let n=1+b.kindling_kindred.vars()[0]/100;return Object.keys(r).forEach(function(c){c!=="Lumber"&&c!=="Plywood"&&c!=="Structs"?s[c]=function(){return Math.round(r[c](a,i)*n)||0}:c==="Structs"&&(s[c]=function(){return r[c](a,i)})}),s}else if(e.race.unfathomable&&e.city.captive_housing){let n=ve("entish");if(n>0){var s={};let l=1-.4*n;return Object.keys(r).forEach(function(o){o==="Lumber"&&o==="Plywood"?s[o]=function(){return Math.round(r[o](a,i)*l)||0}:s[o]=function(){return r[o](a,i)}}),s}}return r}function R0(r,a,i){if(e.race.flier&&(r.Stone||r.Cement)){var s={};let n=1-b.flier.vars()[0]/100;return Object.keys(r).forEach(function(c){c==="Stone"&&!r.Cement?s[c]=function(){return Math.round(r[c](a,i)*n)||0}:c==="Cement"?r.Stone?s.Stone=function(){return Math.round(r.Stone(a,i)*n+r[c](a,i)*1.8*n)||0}:s.Stone=function(){return Math.round(r[c](a,i)*1.75*n)}:s[c]=function(){return r[c](a,i)}}),s}return r}function H0(r,a,i){let s=ve("pterodacti");if((e.race.hollow_bones||s>0)&&(r.Plywood||r.Brick||r.Wrought_Iron||r.Sheet_Metal||r.Mythril||r.Aerogel||r.Nanoweave||r.Scarletite||r.Quantium)){var n={};return Object.keys(r).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 l=r[c](a,i);return e.race.hollow_bones&&(l*=1-b.hollow_bones.vars()[0]/100),s>0&&(l*=1-b.hollow_bones.vars(3)[0]/100*s),Math.round(l)}:n[c]=function(){return r[c](a,i)}}),n}return r}function Si(r){return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}function U0(r,a,i){if(e.race.heavy){var s={};return Object.keys(r).forEach(function(n){n==="Stone"||n==="Cement"||n==="Wrought_Iron"?s[n]=function(){return Math.round(r[n](a,i)*(1+b.heavy.vars()[1]/100))}:s[n]=function(){return r[n](a,i)}}),s}return r}function W0(r,a,i){if(r.Cement&&e.tech.cement&&e.tech.cement>=2){let n=e.tech.cement>=3?.8:.9;var s={};return Object.keys(r).forEach(function(c){c==="Cement"?s[c]=function(){return Math.round(r[c](a,i)*n)||0}:s[c]=function(){return r[c](a,i)}}),s}return r}function Ss(r){switch(r){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`
- `}}function js(r){switch(r){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"}}function As(r,a){if(a==="feat")switch(r){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";default:return"star"}return e.settings.icon}function gs(r,a,i,s,n){let c="";return s&&(c=`id="${s}" `),n=n||"",`${Ss(r)} `}function jt(r,a){let i=mn(),s=new Date;return i.active&&!e.special.egg[s.getFullYear()][`egg${r}`]?gs("egg",a||16,2,`egg${r}`,'role="button" aria-label="Egg" '):""}function Cl(r){$(`#egg${r}`).click(function(){let i=new Date().getFullYear();e.special.egg[i][`egg${r}`]||(e.special.egg[i][`egg${r}`]=!0,r<=12?e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=9,e.stats.antiplasmid+=9,I(t("city_egg_msg",[9,t("resource_AntiPlasmid_plural_name")]),"success",!1,["events"])):(e.prestige.Plasmid.count+=9,e.stats.plasmid+=9,I(t("city_egg_msg",[9,t("resource_Plasmid_plural_name")]),"success",!1,["events"])):(e.prestige.Phage.count+=4,e.stats.phage+=4,I(t("city_egg_msg",[4,t("resource_Phage_name")]),"success",!1,["events"])),$(`#egg${r}`).remove(),$(".popper").hide())})}function ar(r,a,i){let s=qa(),c=new Date().getFullYear(),l=i?"trick":"treat";if(s.active&&!e.special.trick[c][`${l}${r}`]){let o=i?"Ghost":"Candy Corn";return gs(i?"ghost":"candycorn",a||16,2,`${l}${r}`,`role="button" aria-label="${o}" `)}return""}function zc(r,a){let s=new Date().getFullYear(),n=a?"trick":"treat";$(`#${n}${r}`).click(function(){e.special.trick[s][`${n}${r}`]||(e.special.trick[s][`${n}${r}`]=!0,a?(e.prestige.Phage.count+=2,e.stats.phage+=2,I(t("city_ghost_msg",[2,t("resource_Phage_name")]),"success",!1,["events"])):e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=13,e.stats.antiplasmid+=13,I(t("city_trick_msg",[13,t("resource_AntiPlasmid_plural_name")]),"success",!1,["events"])):(e.prestige.Plasmid.count+=13,e.stats.plasmid+=13,I(t("city_trick_msg",[13,t("resource_Plasmid_plural_name")]),"success",!1,["events"])),$(`#${n}${r}`).remove(),setTimeout(function(){r===1&&a&&$(".popper").hide()},250))})}function ua(r,a,i,s,n,c){return e.stats.achieve[r]&&(n?e.stats.achieve[r][c]-1:e.stats.achieve[r][c])>0?`${Ss(i)} ${vn(e.stats.achieve[r][c])} ${s}
`:""}function Bt(r,a,i,s,n){a||(a=10),i||(i=As(r,"achievement"));let c="";if(!n)c=c+ua(r,a,i,t(e.settings.icon),s,"l"),c=c+ua(r,a,"atom",t("universe_antimatter"),s,"a"),c=c+ua(r,a,"evil",t("universe_evil"),s,"e"),c=c+ua(r,a,"heavy",t("universe_heavy"),s,"h"),c=c+ua(r,a,"micro",t("universe_micro"),s,"m"),c=c+ua(r,a,"magic",t("universe_magic"),s,"mg");else switch(n){case"standard":c=c+ua(r,a,i,t(e.settings.icon),s,"l");break;case"antimatter":c=c+ua(r,a,"atom",t("universe_antimatter"),s,"a");break;case"evil":c=c+ua(r,a,"evil",t("universe_evil"),s,"e");break;case"heavy":c=c+ua(r,a,"heavy",t("universe_heavy"),s,"h");break;case"micro":c=c+ua(r,a,"micro",t("universe_micro"),s,"m");break;case"magic":c=c+ua(r,a,"magic",t("universe_magic"),s,"mg");break}return c}function Ba(r,a){return a=a||{},a[r]?a[r]:r<=1?1:a[r]=Ba(r-1,a)+Ba(r-2,a)}function xs(r){var a=Object.keys(r);return a[a.length*Math.random()<<0]}function vn(r){switch(r){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 ni(r,a){let i=0;if(a)Object.keys(a.ascended).forEach(function(c){i+=a.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&&(l-=s-n),n++),i-=l}return i}function Vr(){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 Ke(r){if(r===null||typeof r!="object")return r;if(r instanceof Date)return new Date(r.getTime());if(Array.isArray(r)){var a=[];return r.forEach(function(n){a.push(Ke(n))}),a}let i=new r.constructor;for(var s in r)r.hasOwnProperty(s)&&(i[s]=Ke(r[s]));return i}function tt(r,a,i){switch(r){case"reverse":{let s=a.toLowerCase().split("").reverse().join("");return s.charAt(0).toUpperCase()+s.slice(1)}case"name":return Ve("fool",2021)?tt("reverse",F[e.race.species].name):F[e.race.species].name;case"curve":{let s=i||1.5;return 1-(1-a)**s}}return!1}function Ve(r,a){switch(r){case"easter":return mn();case"halloween":return qa();case"fool":{let i=new Date;return!e.settings.boring&&i.getMonth()===3&&i.getDate()===1?a?i.getFullYear()===a:!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 mn(){let r=new Date,a=r.getFullYear();e.special.egg.hasOwnProperty(a)||(e.special.egg[a]={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(a)&&!e.special.egg[a].hasOwnProperty("egg13")&&(e.special.egg[a].egg13=!1,e.special.egg[a].egg14=!1,e.special.egg[a].egg15=!1),e.special.egg.hasOwnProperty(a)&&!e.special.egg[a].hasOwnProperty("egg16")&&(e.special.egg[a].egg16=!1,e.special.egg[a].egg17=!1,e.special.egg[a].egg18=!1);let i=Math.floor,s=a%19,n=i(a/100),c=(n-i(n/4)-i((8*n+13)/25)+19*s+15)%30,l=c-i(c/28)*(1-i(29/(c+1))*i((21-s)/11)),o=(a+i(a/4)+l+2-n+i(n/4))%7,d=l-o,h=3+i((d+40)/44),_=d+28-31*i(h/4),m={date:[h-1,_],active:!1,endDate:[h-1,_],hint:!1,hintDate:[h-1,_],solve:!1,solveDate:[h-1,_]};if(e.settings.boring)return m;m.endDate[1]+=10,(m.endDate[0]===2&&m.endDate[1]>31||m.endDate[0]===3&&m.endDate[1]>30)&&(m.endDate[1]-=m.endDate[0]===2?31:30,m.endDate[0]++),m.hintDate[1]+=1,(m.hintDate[0]===2&&m.hintDate[1]>31||m.hintDate[0]===3&&m.hintDate[1]>30)&&(m.hintDate[1]-=m.hintDate[0]===2?31:30,m.hintDate[0]++),m.solveDate[1]+=3,(m.solveDate[0]===2&&m.solveDate[1]>31||m.solveDate[0]===3&&m.solveDate[1]>30)&&(m.solveDate[1]-=m.solveDate[0]===2?31:30,m.solveDate[0]++);let w=r.getDate(),M=r.getMonth(),A=M>m.date[0]||M===m.date[0]&&w>=m.date[1],x=M=m.hintDate[0]&&w>=m.hintDate[1]&&M<=m.endDate[0]&&w<=m.endDate[1]&&(m.hint=!0),M>=m.solveDate[0]&&w>=m.solveDate[1]&&M<=m.endDate[0]&&w<=m.endDate[1]&&(m.solve=!0)),m}function qa(){let r=new Date,a=r.getFullYear();e.special.trick.hasOwnProperty(a)||(e.special.trick[a]={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]}/${a}`),n=new Date(`${i.endDate[0]+1}/${i.endDate[1]}/${a}`);if(r>=s&&r<=n){i.active=!0;let c=new Date(`${i.hintDate[0]+1}/${i.hintDate[1]}/${a}`);r>=c&&r<=n&&(i.hint=!0);let l=new Date(`${i.solveDate[0]+1}/${i.solveDate[1]}/${a}`);r>=l&&r<=n&&(i.solve=!0)}return i}function Va(){return e.race.magnificent&&e.city.hasOwnProperty("shrine")&&e.city.shrine.count>0}function ka(r){let a={mult:1,add:0};if(Va())switch(r){case"metal":a.mult+=+(e.city.shrine.metal/100*b.magnificent.vars()[3]);break;case"tax":a.mult+=+(e.city.shrine.tax/100*b.magnificent.vars()[2]);break;case"know":a.add+=+(e.city.shrine.know*b.magnificent.vars()[0]),a.mult+=+(e.city.shrine.know*b.magnificent.vars()[1]/100);break;case"morale":a.add+=e.city.shrine.morale*b.magnificent.vars()[4];break;default:break}return a}var ql={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 Ml(r,a){let i=b[r].hasOwnProperty("vars")?b[r].vars(a):[];return ql.hasOwnProperty(r)&&(r==="fibroblast"?i=[i[0]*5]:r==="hivemind"&&e.race.high_pop?i=[i[0]*b.high_pop.vars()[0]]:r==="imitation"?i.push(F[e.race.srace||"protoplasm"].name):r==="elusive"?i=[Math.round((1/30/(1/(30+i[0]))-1)*100)]:r==="chameleon"?i=[i[0],Math.round((1/30/(1/(30+i[1]))-1)*100)]:r==="blood_thirst"?i=[Math.ceil(Math.log2(i[0]))]:r==="selenophobia"?i=[14-i[0],i[0]]:r==="hooved"?i.unshift(Wr()):r==="anthropophagite"?i=[i[0]*1e4]:ql[r]||(i=[])),i}function Wr(r){return e.race.sludge?r?"craft":t("resource_Beaker_name"):e.race.species==="cath"?r?"craft":t("resource_Box_name"):e.race.species==="wolven"?r?"craft":t("resource_ChewToy_name"):e.race.species==="dracnid"?r?"craft":t("resource_Hoard_name"):e.race.species==="seraph"?r?"forge":t("resource_Halo_name"):e.race.species==="cyclops"?r?"craft":t("resource_Monocle_name"):e.race.species==="kobold"?r?"craft":t("resource_Candle_name"):e.race.species==="tuskin"?r?"craft":t("resource_Goggles_name"):e.race.species==="sharkin"?r?"craft":t("resource_ToothSharpener_name"):F[e.race.species].type==="humanoid"?r?"craft":t("resource_Sandals_name"):F[e.race.species].type==="avian"?r?"craft":t("resource_Perch_name"):F[e.race.species].type==="plant"?r?"craft":t("resource_Planter_name"):F[e.race.species].type==="fungi"?r?"craft":t("resource_DampCloth_name"):F[e.race.species].type==="reptilian"?r?"craft":t("resource_HeatRock_name"):F[e.race.species].type==="fey"?r?"craft":t("resource_PixieDust_name"):F[e.race.species].type==="synthetic"?r?"craft":t("resource_Battery_name"):r?"forge":t("resource_Horseshoe_name")}var Pl={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",[jc("Stone"),jc("Cement"),jc("Wrought_Iron")])],sniper:[t("wiki_trait_effect_sniper_ex1")],hooved:[t("wiki_trait_effect_hooved_ex1",[Wr(!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 ',Wr(!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 jc(r){return`${e.hasOwnProperty("resource")&&e.resource.hasOwnProperty(r)?e.resource[r].name:t(`resource_${r}_name`)} `}function vi(r,a,i){let s=i.fanatic||!1,n=i.tpage||!1,c=i.trank||!1,l=i.wiki||!1,o="",d=sa("name",a),h=sa("desc",a);n&&["genus","major"].includes(b[a].type)&&(o=`« ${t("wiki_trait_rank")} {{ rank }} » `),l&&r.append(`
${d} ${o}`),l&&(n&&b[a].hasOwnProperty("val")?r.append(`${t(`wiki_trait_${b[a].type}`)}${t("wiki_trait_value",[b[a].val])}
`):r.append(`${t(`wiki_trait_${b[a].type}`)}
`)),s&&l&&r.append(`${t("wiki_trait_fanaticism",[s])}
`),r.append(`${h}
`);let _="warning";if(b[a].hasOwnProperty("val")&&(_=b[a].val>=0?"success":"danger"),n&&["genus","major"].includes(b[a].type)?r.append(`
`):(l||e.stats.feat.journeyman&&e.stats.achieve.seeder&&e.stats.achieve.seeder.l>0)&&r.append(`${t(`wiki_trait_effect_${a}`,Ml(a,c))}
`),Pl[a]&&l&&Pl[a].forEach(function(m){r.append(`${m}
`)}),n&&["genus","major"].includes(b[a].type)){let m={rank:e.race[a]||1};D({el:`#${b[a].type}_${a}`,data:m,methods:{getTraitDesc(w){return t(`wiki_trait_effect_${a}`,Ml(a,w))},up(){switch(m.rank){case .25:m.rank=.5;break;case .5:m.rank=1;break;case 1:m.rank=2;break;case 2:m.rank=3;break;case 3:m.rank=3;break}},down(){switch(m.rank){case .25:m.rank=.25;break;case .5:m.rank=.25;break;case 1:m.rank=.5;break;case 2:m.rank=1;break;case 3:m.rank=2;break}}}})}}var Ol={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"]},Sl={colonist:[tt("name")]},jl={trade:[750,50]},Ma={};Object.keys(Ol).forEach(function(r){Ol[r].forEach(a=>Ma[a]={name:t(`achieve_${a}_name`),desc:jl[a]?t(`achieve_${a}_desc`,jl[a]):t(`achieve_${a}_desc`),flair:Sl[a]?t(`achieve_${a}_flair`,Sl[a]):t(`achieve_${a}_flair`),type:r})});var as={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 r=Tc();xn(r.aLvl),kn(r.uLvl)}function Tc(r){r=r||e.race.universe;let a=it(r),i=0,s=0;return Object.keys(Ma).forEach(function(n){e.stats.achieve[n]&&(i+=e.stats.achieve[n].l>5?5:e.stats.achieve[n].l,e.stats.achieve[n][a]&&(s+=e.stats.achieve[n][a]>5?5:e.stats.achieve[n][a]))}),{aLvl:i,uLvl:s}}function it(r){switch(r=r||e.race.universe,r){case"evil":return"e";case"antimatter":return"a";case"heavy":return"h";case"micro":return"m";case"magic":return"mg";default:return"l"}}function ie(r,a,i,s){if(e.race.universe!=="micro"&&a===!0)return!1;e.settings.msgFilters.achievements.unlocked||(e.settings.msgFilters.achievements.unlocked=!0,e.settings.msgFilters.achievements.vis=!0);let n=Jt(),c=!1,l=!1;(typeof i>"u"||i>n)&&(i=n);let o=!0;if(typeof e.stats.achieve[r]>"u"&&(e.stats.achieve[r]={l:0},o=!1),(e.race.universe==="micro"&&a===!0||e.race.universe!=="micro"&&a!==!0)&&e.stats.achieve[r]&&e.stats.achieve[r].l"u"||i>s)&&(i=s),!e.stats.feat[r]||e.stats.feat[r]&&e.stats.feat[r]');$("#stats").append(r);let a=$('
');$("#perks").append(a);let i=$('
');$("#achieve").append(i),Q0(),Lc(),$("body").hasClass("fool")?_i({fool:!0}):_i()}function _i(r){le($("#achievePanel"));let a=$("#achievePanel"),i=0,s=0,n=0,c=0,l=it(),o=typeof r=="object"&&r.fool?r.fool:!1;if(Object.keys(Ma).forEach(function(h){let _=As(h,"achievement");if(s++,e.stats.achieve[h]){i++,n+=e.stats.achieve[h].l>5?5:e.stats.achieve[h].l,e.stats.achieve[h][l]&&(c+=e.stats.achieve[h][l]>5?5:e.stats.achieve[h][l]);let m=Bt(h,16,_,o);o&&e.stats.achieve[h].l>1||!o?a.append($(`${Ma[h].name} ${Ma[h].desc} ${m}
`)):o&&e.stats.achieve[h].l===1&&i--}}),xn(n),kn(c),o&&!e.stats.feat.fool){let h=$(`${as.fool.name} ${t("feat_fool_spoof")}
`);a.append(h)}else Object.keys(as).forEach(function(h){let _=As(h,"feat");if(e.stats.feat[h]){let m=e.stats.feat[h]>1?` ${Ss(_)}
`:"";if(h==="easter"){let w=jt(4,14);w.length>0&&(m=w)}a.append($(`${as[h].name} ${as[h].desc} ${m}
`))}});let d=ar(5,12,!1);a.prepend(`${t("achieve_draw_achieve_earned",[i,s])}${d}
`),D({el:"#achievePanel",methods:{flair(h){return Ma[h].flair},feat(h){return as[h].flair}}}),o&&!e.stats.feat.fool&&$("#thefool").on("mouseover",function(){e.race.universe==="micro"?De("fool",!0):De("fool"),_i()})}function es(){let r=Jt();$("#topBar span.flair")&&le($("#topBar span.flair"),!0);let a=jt(1,14);if(a.length>0&&$("#topBar .planet").after($(a)),r>1&&$("#topBar .planet .flair").length===0){if(a.length===0){let s=As("topbar","challenge");$("#topBar .planet").after(`${Ss(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}
`)),pe("topbarPlanet",function(s){let n=$('
');s.popper.append(n),n.append($(i))},{elm:"#topBar .planetWrap .flair",classes:"has-background-light has-text-dark"})}}function Jt(){let r=1;return e.race.no_plasmid&&r++,e.race.no_trade&&r++,e.race.no_craft&&r++,e.race.no_crispr&&r++,e.race.weak_mastery&&r++,e.race.nerfed&&r++,e.race.badgenes&&r++,r>5&&(r=5),r}function Tr(){let r=Jt();for(let c=r;c>=0;c--)Ec("extinct_","mass_extinction",25,c),e.race.universe==="evil"&&Ic("extinct_","vigilante",12,c),Ec("genus_","creator",9,c),Ec("biome_","explorer",6,c),e.race.universe==="heavy"&&Ic("genus_","heavyweight",8,c);if(e.tech.supercollider&&e.tech.supercollider>=99&&ie("blackhole"),e.stats.starved>=100&&ie("mass_starvation"),Math.round(Math.log2(e.civic.garrison.protest+e.civic.garrison.fatigue))>=8&&ie("warmonger"),e.stats.died>=250&&ie("red_tactics"),e.interstellar.stellar_engine&&e.interstellar.stellar_engine.mass>=12&&ie("landfill"),e.interstellar.stellar_engine&&e.interstellar.stellar_engine.mass>=100&&De("supermassive"),e.tech.piracy&&e.tech.chthonian&&e.tech.chthonian>=2&&e.galaxy){let c=kt("gxy_chthonian");if(kt("gxy_stargate")===1&&kt("gxy_gateway")===1&&kt("gxy_gorddon")===1&&kt("gxy_alien1")===1&&kt("gxy_alien2")===1&&c===1&&ie("neutralized"),e.race.fasting&&c===1){let l=it();e.stats.endless_hunger.b2[l]=!0,l!=="m"&&l!=="l"&&(e.stats.endless_hunger.b2.l=!0)}}if(Ve("summer")&&e.resource.hasOwnProperty("Thermite")){let c=1e5+e.stats.reset*9e3;c>1e6&&(c=1e6),e.resource.Thermite.amount>c&&De("solstice",e.race.universe==="micro")}if(Ve("firework")&&e[e.race.cataclysm||e.race.orbit_decayed?"space":"city"].firework.on>0&&De("firework",e.race.universe==="micro"),e.city.morale.current>=200&&(ie("paradise"),e.city.morale.current>=500&&De("utopia")),e.resource.hasOwnProperty("Money")&&e.resource.Money.amount>=1e9&&ie("scrooge"),e.resource.hasOwnProperty("Money")&&e.race.inflation&&e.resource.Money.amount>=25e10&&ie("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"&&ie("trade"),e.tech.pillars){let c={},l=0,o=Array(5+1).fill(0);if(Object.keys(e.pillars).forEach(function(d){F[d]&&((!c[F[d].type]||e.pillars[d]>c[F[d].type])&&(c[F[d].type]=e.pillars[d]),l++,o[e.pillars[d]]++)}),Object.keys(c).length>=Object.keys(Er).length){let d=5;Object.keys(c).forEach(function(h){c[h]=Object.keys(F).length-1&&ie("resonance"),l>=50){let d=0;for(let h=5;h>0;h--)if(d+=o[h],d>=50){De("equilibrium",!1,h);break}}}if(e.portal.hasOwnProperty("mechbay")&&e.tech.hasOwnProperty("hell_spire")&&e.tech.hell_spire>=9){let c=Object.keys(xa).length,l={};Object.keys(e.stats.spire).forEach(function(o){let d={};Object.keys(e.stats.spire[o]).forEach(function(h){xa[h]&&((!l.hasOwnProperty(h)||l[h]0&&(d[h]=e.stats.spire[o][h]))}),Object.keys(d).length===c&&ie("gladiator",!1,Math.min(...Object.values(d)),o)}),Object.keys(l).length===c&&ie("gladiator",!1,Math.min(...Object.values(l)),"l")}if(e.race.banana){let c=it();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 l=0,o=0;["b1","b2","b3","b4","b5"].forEach(function(d){e.stats.banana[d].l&&l++,c!=="l"&&e.stats.banana[d][c]&&o++}),l>0&&ie("banana",!1,l,"l"),o>0&&c!=="l"&&ie("banana",!1,o,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",it()].forEach(function(l){let o=0;["ashanddust","exodus","obsolete","bluepill","retired"].forEach(function(d){e.stats.achieve[d]&&e.stats.achieve[d][l]&&e.stats.achieve[d][l]>=5&&o++}),o>0&&ie("pathfinder",!1,o,l)}),e.race.fasting){let c=it();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 l=0,o=0;["b1","b2","b3","b4","b5"].forEach(function(d){e.stats.endless_hunger[d].l&&l++,c!=="l"&&e.stats.endless_hunger[d][c]&&o++}),l>0&&ie("endless_hunger",!1,l,"l"),o>0&&c!=="l"&&ie("endless_hunger",!1,o,c)}let a=new Date,i=Ve("easter"),s=Ve("halloween"),n=a.getFullYear();if(!e.settings.boring&&a.getDate()===13&&a.getDay()===5&&e.resource[e.race.species].amount>=1){let c=!1;c=De("friday",e.race.universe==="micro"),c&&e.resource[e.race.species].amount--}else if(!e.settings.boring&&a.getMonth()===1&&a.getDate()===14)De("valentine",e.race.universe==="micro");else if(!e.settings.boring&&a.getMonth()===2&&a.getDate()===17)De("leprechaun",e.race.universe==="micro");else if(i.active){De("easter",e.race.universe==="micro");let c=0;for(let l=1;l<=18;l++)e.special.egg[n][`egg${l}`]&&c++;c>=12&&De("egghunt",e.race.universe==="micro")}else if(Ve("launch_day"))De("launch_day",e.race.universe==="micro");else if(s.active){let c=0;for(let l=1;l<=7;l++)e.special.trick[n][`trick${l}`]&&c++;for(let l=1;l<=7;l++)e.special.trick[n][`treat${l}`]&&c++;c>=12&&De("trickortreat",e.race.universe==="micro"),a.getMonth()===9&&a.getDate()===31&&De("halloween",e.race.universe==="micro")}else!e.settings.boring&&a.getMonth()===10&&a.getDate()>=22&&a.getDate()<=28?De("thanksgiving",e.race.universe==="micro"):!e.settings.boring&&a.getMonth()===11&&a.getDate()==25&&De("xmas",e.race.universe==="micro");!e.settings.boring&&a.getMonth()===3&&a.getDate()>=1&&a.getDate()<=3&&e.stats.feat.hasOwnProperty("fool")&&e.stats.feat.fool>0&&De("fool",e.race.universe==="micro"),e.stats.dkills>=666e6&&De("demon_slayer");for(let c=r;c>=1;c--){let l=0,o=Object.keys(Ma);for(let h of o)e.stats.achieve[h]&&e.stats.achieve[h].l>=c&&l++;let d=[{c:10,f:"novice"},{c:25,f:"journeyman"},{c:50,f:"adept"},{c:75,f:"master"},{c:100,f:"grandmaster"}];for(let h=0;h<5;h++)l>=d[h].c&&(!e.stats.feat[d[h].f]||e.stats.feat[d[h].f]=s&&n++;if(n>=i&&(ie(a,!1,s),e.race.universe!=="standard"))switch(e.race.universe){case"evil":e.stats.achieve[a].e=void 0;break;case"antimatter":e.stats.achieve[a].a=void 0;break;case"heavy":e.stats.achieve[a].h=void 0;break;case"micro":e.stats.achieve[a].m=void 0;break;case"magic":e.stats.achieve[a].mg=void 0;break;default:break}}e.race.universe!=="standard"&&Ic(r,a,i,s)}function Ic(r,a,i,s){let n=!1;switch(e.race.universe){case"evil":(typeof e.stats.achieve[a]>"u"||typeof e.stats.achieve[a].e>"u"||e.stats.achieve[a].e"u"||typeof e.stats.achieve[a].a>"u"||e.stats.achieve[a].a"u"||typeof e.stats.achieve[a].h>"u"||e.stats.achieve[a].h"u"||typeof e.stats.achieve[a].m>"u"||e.stats.achieve[a].m"u"||typeof e.stats.achieve[a].mg>"u"||e.stats.achieve[a].mg=s&&c++;break;case"antimatter":e.stats.achieve[o]&&e.stats.achieve[o].a&&e.stats.achieve[o].a>=s&&c++;break;case"heavy":e.stats.achieve[o]&&e.stats.achieve[o].h&&e.stats.achieve[o].h>=s&&c++;break;case"micro":e.stats.achieve[o]&&e.stats.achieve[o].m&&e.stats.achieve[o].m>=s&&c++;break;case"magic":e.stats.achieve[o]&&e.stats.achieve[o].mg&&e.stats.achieve[o].mg>=s&&c++;break;default:break}c>=i&&ie(a,!1,s)}}var zi={mastery:{name:t("mastery"),desc(){let r="";return Object.keys(Rr).forEach(function(a){let i=Fc(a,!0);a==="standard"?r+=`${Rr[a].name} : ${t("perks_mastery_general",[`${+i.g.toFixed(2)}% `])} `:e.stats.achieve.whitehole&&(r+=`${Rr[a].name} : ${t("perks_mastery_general",[`${+i.g.toFixed(2)}% `])}, ${t("perks_mastery_universe",[`${+i.u.toFixed(2)}% `])} `)}),r},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(r){let a=r?"5/10/15/20/25":e.stats.achieve.blackhole?e.stats.achieve.blackhole.l*5:5;return t("achieve_perks_blackhole",[a])},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(r){let a=r?"2/4/6/8/10":e.stats.achieve.trade?e.stats.achieve.trade.l*2:2,i=r?"1/2/3/4/5":e.stats.achieve.trade?e.stats.achieve.trade.l:1;return t("achieve_perks_trade",[a,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(r){let a=r?"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",[a])},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(r){let a=e.stats.achieve.mass_extinction?e.stats.achieve.mass_extinction.l:1,i=r?"0/50/100/150/200":(a-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(r){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(r){let a=r?"1/2/3/4/5":e.stats.achieve.explorer?e.stats.achieve.explorer.l:1;return t("achieve_perks_explorer",[a])},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(r){let a=r?"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",[a])},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(r){let a=r?"2/4/6/8/10":e.stats.achieve.joyless?e.stats.achieve.joyless.l*2:2;return t("achieve_perks_joyless",[a])},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(r){let a=r?"2/4/6/8/10":e.stats.achieve.steelen?e.stats.achieve.steelen.l*2:2;return t("achieve_perks_steelen",[a])},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(r){let a=r?"2/4/6/8/10":e.stats.achieve.wheelbarrow?e.stats.achieve.wheelbarrow.l*2:2;return t("achieve_perks_wheelbarrow",[a])},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(r){let a=r?"3/6/9/12/15":e.stats.achieve.extinct_sludge?e.stats.achieve.extinct_sludge.l*3:3;return t("achieve_perks_extinct_sludge",[a,t("universe_standard")])},active(){return!!(e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge.l>=1)}},{desc(r){let a=r?"3/6/9/12/15":e.stats.achieve.extinct_sludge?e.stats.achieve.extinct_sludge.h*3:3;return t("achieve_perks_extinct_sludge",[a,t("universe_heavy")])},active(){return!!(e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge.h>=1)}},{desc(r){let a=r?"3/6/9/12/15":e.stats.achieve.extinct_sludge?e.stats.achieve.extinct_sludge.a*3:3;return t("achieve_perks_extinct_sludge",[a,t("universe_antimatter")])},active(){return!!(e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge.a>=1)}},{desc(r){let a=r?"3/6/9/12/15":e.stats.achieve.extinct_sludge?e.stats.achieve.extinct_sludge.e*3:3;return t("achieve_perks_extinct_sludge",[a,t("universe_evil")])},active(){return!!(e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge.e>=1)}},{desc(r){let a=r?"3/6/9/12/15":e.stats.achieve.extinct_sludge?e.stats.achieve.extinct_sludge.m*3:3;return t("achieve_perks_extinct_sludge",[a,t("universe_micro")])},active(){return!!(e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge.m>=1)}},{desc(r){let a=r?"3/6/9/12/15":e.stats.achieve.extinct_sludge?e.stats.achieve.extinct_sludge.mg*3:3;return t("achieve_perks_extinct_sludge",[a,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(r){let a=r?"5/10/15/20/25":e.stats.achieve.whitehole?e.stats.achieve.whitehole.l*5:5;return t("achieve_perks_whitehole2",[a])},active(){return!!e.stats.achieve.whitehole}},{desc(r){let a=r?"1/2/3/4/5":e.stats.achieve.whitehole?e.stats.achieve.whitehole.l:1;return t("achieve_perks_whitehole3",[a])},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(r){let a=r?"4/8/12/16/20":e.stats.achieve.heavyweight?e.stats.achieve.heavyweight.l*4:4;return t("achieve_perks_heavyweight",[a])},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(r){let a=r?"1/2":e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=5?2:1;return t("achieve_perks_dissipated2",[a])},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(r){let a=r?"10/20/30/40/50":e.stats.achieve.anarchist?e.stats.achieve.anarchist.l*10:10;return t("achieve_perks_anarchist",[a])},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(r){let a;if(r)a="1-30";else if(a=0,e.stats.achieve.ascended)for(let i=0;i=1)}},{desc(){return t("achieve_perks_ascended2",[Ps()])},active(){return!!(e.stats.achieve.ascended&&e.stats.achieve.ascended[it()]>=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(r){let a;if(r)a="10/25/30/35/40/45/50";else{a=e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=4?25:10;for(let i=1;i=5&&(a+=5)}return t("achieve_perks_technophobe2",[a])},active(){return!!(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=2)}},{desc(r){let a;if(r)a="1/2/3/4/5/6";else{a=1;for(let i=1;i=5&&(a+=1)}return r||a>1?t("achieve_perks_technophobe3a",[a]):t("achieve_perks_technophobe3",[a])},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(r){let a=r?"1/2/3/4/5":e.stats.achieve.technophobe?e.stats.achieve.technophobe.l:0;return t("achieve_perks_technophobe5",[a])},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(r){let a=r?"100/200/300/400/500":e.stats.achieve.soul_sponge?e.stats.achieve.soul_sponge.mg*100:100;return t("achieve_perks_soul_sponge",[a])},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(r){let a=r?"2/4/6/8/10":e.stats.achieve.escape_velocity?e.stats.achieve.escape_velocity.h*2:2;return t("achieve_perks_escape_velocity",[a])},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",[50])} `])]},gladiator:{name:t("achieve_gladiator_name"),desc(r){let a=r?"20/40/60/80/100":e.stats.achieve.gladiator?e.stats.achieve.gladiator.l*20:20;return t("achieve_perks_gladiator",[a])},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 r=`${t("achieve_perks_overlord1",[10])}
`;return r+=`${t("achieve_perks_overlord2")}
`,r+=`${t("achieve_perks_overlord3")}
`,r+=`${t("achieve_perks_overlord4")}
`,r},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(r){let a=r?"0.01/0.02/0.03/0.04/0.05":e.genes.creep?e.genes.creep*.01:0;return t("arpa_perks_creep",[a])},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(r){let a=r?"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",[a])},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(r){let a=r?"50/100":e.genes.crafty&&e.genes.crafty>=3?100:50;return t("arpa_genepool_crafting_desc",[a])},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(r){let a=r?"2/3/4":e.genes.synthesis&&e.genes.synthesis>=2?e.genes.synthesis>=3?4:3:2,i=r?"10/25/50":e.genes.synthesis&&e.genes.synthesis>=2?e.genes.synthesis>=3?50:25:10;return t("arpa_genepool_synthesis_desc",[a,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(r){return t("arpa_perks_challenge2",[r?"60/80":e.genes.challenge&&e.genes.challenge>=4?80:60,r?"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(r){return t("arpa_perks_ancients4",[r?"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(r){let a=r?"3/5":e.genes.plasma>=2?5:3;return t("arpa_genepool_mitosis_desc",[a])},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(r){return t("arpa_perks_lust",[r?.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(r){return t("arpa_perks_illuminate",[r?.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(r){return t("arpa_perks_greed",[r?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(r){return t("arpa_perks_hoarder",[r?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(r){return t("arpa_perks_artisan",[r?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(r){return t("arpa_perks_attract",[r?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(r){return t("arpa_perks_wrath",[r?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(r){return t("arpa_perks_unbound_resist",[r?"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(r){let a=ea();return t("perks_harmonic",[r?`1-${Object.keys(F).length+2}`:+((a[0]-1)*100).toFixed(0),r?`2-${(Object.keys(F).length+2)*2}`:+((a[1]-1)*100).toFixed(0)])},active(){let r=ea();return!!(e.pillars&&r[0]>1)}},{desc(r){let a=ea();return t("perks_harmonic2",[t("portal_west_tower"),t("portal_east_tower"),r?`12-${(Object.keys(F).length-1)*12}`:+(Object.keys(e.pillars).length*12)])},active(){let r=ea();return!!(e.pillars&&r[0]>1)}}],notes:[t("wiki_perks_harmonic_note1"),t("wiki_perks_harmonic_note2")]},novice:{name:t("perk_novice"),desc(r){let a=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=r?"0.5/1/1.5/2/2.5":a/2,s=r?"0.25/0.5/0.75/1/1.25":a/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(r){let a=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(r||a>1){let i=r?"1/2/3":a>=3?a>=5?3:2:1,s=r?"1/2":a>=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(r){let a=ts()||1,i=r?"100/200/300/400/500":a*100,s=r?"60/120/180/240/300":a*60;return t("achieve_perks_adept",[i,s])},active(){return ts()>0},notes:[t("wiki_perks_progress_note1",[50,t("wiki_resets_blackhole")]),t("wiki_perks_progress_note2")]},master:{name:t("perk_master"),desc(r){let a=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=r?"1/2/3/4/5":a,s=r?"2/4/6/8/10":a*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(r){let a=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",[r?"1/2/3/4/5":a])},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 Lc(){le($("#perksPanel"));let r=$("#perksPanel"),a=!1;Object.keys(zi).forEach(function(i){if(zi[i].hasOwnProperty("group")){let s=!1,n=$(`${zi[i].name}
`);zi[i].group.forEach(function(c){c.active()&&(s=!0,n.append($(`${c.desc()}
`)))}),s&&(a=!0,r.append(n))}else zi[i].active()&&(a=!0,r.append($(`${zi[i].name} ${zi[i].desc()}
`)))}),a||r.append($(`${t("perks_none")}
`))}function Q0(){le($("#statsPanel"));let r=$("#statsPanel");if(r.append(`${t("achieve_stats_overall")}
`),r.append(`${t("achieve_stats_plasmid_earned")} {{ s.plasmid | format }}
`),e.stats.antiplasmid>0&&r.append(`${t("achieve_stats_antiplasmid_earned")} {{ s.antiplasmid | format }}
`),e.stats.phage>0&&r.append(`${t("achieve_stats_phage_earned")} {{ s.phage | format }}
`),e.stats.dark>0&&r.append(`${t("achieve_stats_dark_earned")} {{ s.dark | format }}
`),e.stats.harmony>0&&r.append(`${t("achieve_stats_harmony_earned")} {{ s.harmony | format }}
`),e.stats.blood>0&&r.append(`${t("achieve_stats_blood_earned")} {{ s.blood | format }}
`),e.stats.artifact>0&&r.append(`${t("achieve_stats_artifact_earned")} {{ s.artifact | format }}
`),r.append(`${t("achieve_stats_knowledge_spent")} {{ s.know | t_know | format }}
`),r.append(`${t("achieve_stats_starved_to_death")} {{ s.starved | t_starved | format }}
`),r.append(`${t("achieve_stats_died_in_combat")} {{ s.died | t_died | format }}
`),r.append(`${t("achieve_stats_game_days_played")} {{ s.days | played | format }}
`),e.stats.portals>0&&r.append(`${t("achieve_stats_portals")} {{ s.portals | format }}
`),r.append(`${t("achieve_stats_total_resets")} {{ s.reset | format }}
`),e.stats.mad>0&&r.append(`${t("achieve_stats_mad_resets")} {{ s.mad | format }}
`),e.stats.bioseed>0&&r.append(`${t("achieve_stats_bioseed_resets")} {{ s.bioseed | format }}
`),e.stats.cataclysm>0&&r.append(`${t("achieve_stats_cataclysm_resets")} {{ s.cataclysm | format }}
`),e.stats.blackhole>0&&r.append(`${t("achieve_stats_blackhole_resets")} {{ s.blackhole | format }}
`),e.stats.ascend>0&&r.append(`${t("achieve_stats_ascension_resets")} {{ s.ascend | format }}
`),e.stats.descend>0&&r.append(`${t("achieve_stats_descension_resets")} {{ s.descend | format }}
`),e.stats.aiappoc>0&&r.append(`${t("achieve_stats_aiappoc_resets")} {{ s.aiappoc | format }}
`),e.stats.matrix>0&&r.append(`${t("achieve_stats_matrix_resets")} {{ s.matrix | format }}
`),e.stats.retire>0&&r.append(`${t("achieve_stats_retire_resets")} {{ s.retire | format }}
`),e.stats.eden>0&&r.append(`${t("achieve_stats_eden_resets")} {{ s.eden | format }}
`),e.stats.terraform>0&&r.append(`${t("achieve_stats_terraform_resets")} {{ s.terraform | format }}
`),e.stats.geck>0&&r.append(`${t("achieve_stats_gecks")} {{ s.geck | format }}
`),r.append(`${t("achieve_stats_current_game")}
`),r.append(`${t("achieve_stats_knowledge_spent")} {{ s.know | format }}
`),r.append(`${t("achieve_stats_starved_to_death")} {{ s.starved | format }}
`),r.append(`${t("achieve_stats_died_in_combat")} {{ s.died | format }}
`),r.append(`${t("achieve_stats_attacks_made")} {{ s.attacks | format }}
`),r.append(`${t("achieve_stats_game_days_played")} {{ s.days | format }}
`),e.stats.dkills>0&&r.append(`${t("achieve_stats_demons_kills")} {{ s.dkills | format }}
`),e.stats.sac>0&&r.append(`${t("achieve_stats_sacrificed")} {{ s.sac | format }}
`),e.stats.murders>0&&r.append(`${t("achieve_stats_murders")} {{ s.murders | format }}
`),e.stats.psykill>0&&r.append(`${t("achieve_stats_psymurders")} {{ s.psykill | format }}
`),e.resource.hasOwnProperty("Thermite")&&e.resource.Thermite.amount>0&&r.append(`${t("achieve_stats_thermite")} {{ r.Thermite.amount | res }}
`),qa().active){let i="";(e.stats.cfood>=13||e.race.cataclysm||e.race.orbit_decayed)&&(i=`${ar(7,12,!0)} `),r.append(`${t("achieve_stats_trickortreat")} {{ s.cfood | format }} ${i}
`)}D({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()}}})}var er={dna_replication:{reqs:{race:"protoplasm",resource:"DNA"},type:"major",effect(){var r=Math.rand(1,Math.round(e.resource.DNA.max/3)),a=e.resource.DNA.amount+r;return a>e.resource.DNA.max&&(a=e.resource.DNA.max),e.resource.DNA.amount=a,t("event_dna",[r.toLocaleString()])}},rna_meteor:{reqs:{race:"protoplasm",resource:"RNA"},type:"major",effect(){var r=Math.rand(1,Math.round(e.resource.RNA.max/2)),a=e.resource.RNA.amount+r;return a>e.resource.RNA.max&&(a=e.resource.RNA.max),e.resource.RNA.amount=a,t("event_rna",[r.toLocaleString()])}},inspiration:{reqs:{resource:"Knowledge"},type:"major",effect(){return e.race.inspired=Math.rand(300,600),t("event_inspiration")}},motivation:{reqs:{tech:"primitive"},type:"major",effect(){return e.race.motivated=Math.rand(300,600),t("event_motivation")}},fire:{reqs:{resource:"Lumber",nogenus:"aquatic",notrait:"evil"},type:"major",effect(){var r=Math.rand(1,Math.round(e.resource.Lumber.amount/4)),a=e.resource.Lumber.amount-r;return a<0&&(a=0),e.resource.Lumber.amount=a,t("event_fire",[r.toLocaleString()])}},flare:{reqs:{tech:"primitive"},type:"major",condition(){return!!e.city.ptrait.includes("flare")},effect(){let r=0,a=F[e.race.species].home;e.race.cataclysm||e.race.orbit_decayed?(e.space.hasOwnProperty("living_quarters")&&(r+=Math.round(U.living_quarters*O.space.spc_red.living_quarters.citizens())),a=F[e.race.species].solar.red):(e.city.hasOwnProperty("basic_housing")&&(r+=e.city.basic_housing.count*O.city.basic_housing.citizens()),e.city.hasOwnProperty("cottage")&&(r+=e.city.cottage.count*O.city.cottage.citizens()),e.city.hasOwnProperty("apartment")&&(r+=k.apartment*O.city.apartment.citizens())),r>e.resource[e.race.species].amount&&(r=e.resource[e.race.species].amount),r=Math.floor(r*.1);let i=Math.rand(0,r);if(e.resource[e.race.species].amount-=i,e.civic[e.civic.d_job].workers-=i,e.civic[e.civic.d_job].workers<0&&(e.civic[e.civic.d_job].workers=0),e.city.biome!=="oceanic"){let s=400;e.city.biome==="forest"?s*=2:(e.city.biome==="desert"||e.city.biome==="volcanic")&&(s/=2),e.city.firestorm=Math.rand(s,s*10)}return t(e.city.biome==="oceanic"?"event_flare2":"event_flare",[a,i.toLocaleString()])}},raid:{reqs:{tech:"military",notech:"world_control"},type:"major",condition(){return _r("gov0")&&_r("gov1")&&_r("gov2")?!1:!e.race.truepath&&!e.race.cataclysm&&(e.civic.foreign.gov0.hstl>60||e.civic.foreign.gov1.hstl>60||e.civic.foreign.gov2.hstl>60)},effect(){let r=mt(We(),"army",e.civic.garrison.wounded),a=e.tech.high_tech?e.tech.high_tech+1:1,i=Math.rand(25,50)*a,s=e.civic.garrison.wounded>We()?We():e.civic.garrison.wounded,n=Math.floor(J(0,s)),c=Math.floor(J(0,We()-s));if(e.race.instinct&&(n=Math.round(n/2),c=Math.round(c/2)),e.civic.garrison.workers-=n,e.civic.garrison.wounded+=c,e.stats.died+=n,e.civic.garrison.wounded>e.civic.garrison.workers&&(e.civic.garrison.wounded=e.civic.garrison.workers),e.race.blood_thirst&&(e.race.blood_thirst_count+=Math.ceil(i/5),e.race.blood_thirst_count>b.blood_thirst.vars()[0]&&(e.race.blood_thirst_count=b.blood_thirst.vars()[0])),r>i)return t("event_raid1",[n.toLocaleString(),c.toLocaleString()]);{let l=Math.rand(1,Math.round(e.resource.Money.amount/4));if(l<=0)return t("event_raid1",[n.toLocaleString(),c.toLocaleString()]);{let o=e.resource.Money.amount-l;return o<0&&(o=0),e.resource.Money.amount=o,t("event_raid2",[l.toLocaleString(),n.toLocaleString(),c.toLocaleString()])}}}},siege:{reqs:{tech:"military",notech:"world_control"},type:"major",condition(){return _r("gov0")||_r("gov1")||_r("gov2")?!1:!e.race.truepath&&e.civic.foreign.gov0.hstl>80&&e.civic.foreign.gov1.hstl>80&&e.civic.foreign.gov2.hstl>80},effect(){let r=mt(We(),"army",e.civic.garrison.wounded),a=e.tech.high_tech?e.tech.high_tech+1:1,i=(e.civic.foreign.gov0.mil+e.civic.foreign.gov1.mil+e.civic.foreign.gov2.mil)*a,s=e.civic.garrison.wounded>We()?We():e.civic.garrison.wounded,n=Math.floor(J(0,s)),c=Math.floor(J(0,We()-s));if(e.race.instinct&&(n=Math.round(n/2),c=Math.round(c/2)),e.civic.garrison.workers-=n,e.civic.garrison.wounded+=c,e.stats.died+=n,e.civic.garrison.wounded>e.civic.garrison.workers&&(e.civic.garrison.wounded=e.civic.garrison.workers),e.race.blood_thirst&&(e.race.blood_thirst_count+=Math.ceil(i/5),e.race.blood_thirst_count>b.blood_thirst.vars()[0]&&(e.race.blood_thirst_count=b.blood_thirst.vars()[0])),r>i)return t("event_siege1",[n.toLocaleString(),c.toLocaleString()]);var l=Math.rand(1,Math.round(e.resource.Money.amount/2)),o=e.resource.Money.amount-l;return o<0&&(o=0),e.resource.Money.amount=o,t("event_siege2",[l.toLocaleString(),n.toLocaleString(),c.toLocaleString()])}},pillage0:{reqs:{tech:"military",notech:"world_control"},type:"major",condition(){return!!(e.race.truepath&&!e.tech.isolation&&!_r("gov0")&&e.civic.foreign.gov0.hstl>60)},effect(){return Fs("gov0")}},pillage1:{reqs:{tech:"military",notech:"world_control"},type:"major",condition(){return!!(e.race.truepath&&!e.tech.isolation&&!_r("gov1")&&e.civic.foreign.gov1.hstl>60)},effect(){return Fs("gov1")}},pillage2:{reqs:{tech:"military",notech:"world_control"},type:"major",condition(){return!!(e.race.truepath&&!e.tech.isolation&&!_r("gov2")&&e.civic.foreign.gov2.hstl>60)},effect(){return Fs("gov2")}},pillage3:{reqs:{tech:"military"},type:"major",condition(){return!!(e.race.truepath&&!e.tech.isolation&&e.tech.rival&&e.civic.foreign.gov3.hstl>60)},effect(){return Fs("gov3",!0)}},witch_hunt_crusade:{reqs:{tech:"magic"},type:"major",condition(){return!!(e.race.witch_hunter&&e.resource.Sus.amount>=100)},effect(){return Fs("witchhunt",!0)}},terrorist:{reqs:{tech:"world_control",notrait:"truepath"},type:"major",effect(){let r=Math.floor(J(0,e.civic.garrison.wounded)),a=Math.floor(J(0,e.civic.garrison.workers-e.civic.garrison.wounded));return e.race.instinct&&(r=Math.round(r/2),a=Math.round(a/2)),e.civic.garrison.workers-=r,e.civic.garrison.wounded+=a,e.stats.died+=r,e.civic.garrison.wounded>e.civic.garrison.workers&&(e.civic.garrison.wounded=e.civic.garrison.workers),e.race.blood_thirst&&(e.race.blood_thirst_count+=1e3,e.race.blood_thirst_count>b.blood_thirst.vars()[0]&&(e.race.blood_thirst_count=b.blood_thirst.vars()[0])),r===0?t("event_terrorist1",[a.toLocaleString()]):t("event_terrorist2",[a.toLocaleString(),r.toLocaleString()])}},quake:{reqs:{tech:"wsc",notech:"quaked"},type:"major",condition(){return!!e.city.ptrait.includes("unstable")},effect(){return e.tech.quaked=1,ue(),t("event_quake",[e.race.cataclysm||e.race.orbit_decayed?F[e.race.species].solar.red:F[e.race.species].home])}},doom:{reqs:{tech:"wsc",notech:"portal_guard"},type:"major",condition(){return!!(e.space.space_barracks&&e.space.space_barracks.on>0)},effect(){return ie("doomed"),e.stats.portals++,t(e.race.evil?"event_doom_alt":"event_doom",[F[e.race.species].solar.dwarf])}},demon_influx:{reqs:{tech:"portal_guard"},type:"major",effect(){let r=Math.rand(2500,5e3);return e.portal.fortress.threat+=r,t("event_demon_influx",[r.toLocaleString()])}},ruins:{reqs:{trait:"ancient_ruins",resource:"Knowledge"},type:"major",effect(){let r=["Iron","Copper","Steel","Cement"];for(var a=0;ae.resource[i].max?e.resource[i].amount=e.resource[i].max:e.resource[i].amount+=s}}return t("event_ruins")}},tax_revolt:{reqs:{low_morale:99,notrait:"blissful",tech:"primitive"},type:"major",condition(){let r=e.civic.govern.type==="oligarchy"?45:25,a=ge("aristocrat",2);return a&&(r-=a),e.civic.taxes.tax_rate>r},effect(){return V0()}},slave_death1:is("major","death1"),slave_death2:is("major","death2"),slave_death3:is("major","death3"),protest:{reqs:{tech:"primitive"},type:"major",condition(){return e.civic.govern.type==="republic"},effect(){switch(e.civic.govern.protest=Math.rand(30,60),Math.rand(0,10)){case 0:return t("event_protest0",[St("small")]);case 1:return t("event_protest1");case 2:return t("event_protest2");case 3:return e.civic.govern.protest=Math.rand(45,75),t("event_protest3");case 4:return t("event_protest4");case 5:return e.civic.govern.protest=Math.rand(45,75),t("event_protest5");case 6:return t("event_protest6");case 7:return t("event_protest7");case 8:return t("event_protest8");case 9:return e.civic.govern.protest=Math.rand(60,90),t("event_protest9")}}},scandal:{reqs:{tech:"govern"},type:"major",condition(){return!!ge("muckraker",0)},effect(){switch(e.civic.govern.scandal=Math.rand(15,90),Math.rand(0,10)){case 0:return t("event_scandal0");case 1:return t("event_scandal1");case 2:return t("event_scandal2");case 3:return t("event_scandal3");case 4:return t("event_scandal4");case 5:return t("event_scandal5");case 6:return t("event_scandal6");case 7:return t("event_scandal7");case 8:return t("event_scandal8");case 9:return t("event_scandal9")}}},spy:{reqs:{tech:"primitive",notech:"world_control"},type:"major",condition(){if(e.race.elusive||ve("satyr")>.25)return!1;for(let a=0;a<3;a++)if(e.civic.foreign[`gov${a}`].spy>0&&!e.civic.foreign[`gov${a}`].occ&&!e.civic.foreign[`gov${a}`].anx&&!e.civic.foreign[`gov${a}`].buy)return!0;return!1},effect(){let r=[];for(let i=0;i<3;i++)e.civic.foreign[`gov${i}`].spy>0&&!e.civic.foreign[`gov${i}`].occ&&!e.civic.foreign[`gov${i}`].anx&&!e.civic.foreign[`gov${i}`].buy&&r.push(i);let a=r[Math.rand(0,r.length)];return e.civic.foreign[`gov${a}`].spy--,e.civic.foreign[`gov${a}`].spy===0&&(e.civic.foreign[`gov${a}`].act="none",e.civic.foreign[`gov${a}`].sab=0),t("event_spy",[ut(a)])}},mine_collapse:{reqs:{tech:"mining"},type:"major",condition(){return e.resource[e.race.species].amount>0&&e.civic.miner.workers>0},effect(){return e.resource[e.race.species].amount--,e.civic.miner.workers--,t("event_mine_collapse")}},m_curious:{reqs:{tech:"primitive",trait:"curious"},condition(){return e.resource[e.race.species].amount>=40},type:"major",effect(){switch(Math.rand(0,5)){case 0:{let r="Money",a=Math.rand(5e4,5e6);switch(Math.rand(0,5)){case 0:e.resource.Steel.display&&(r="Steel",a=Math.rand(100,1e5));break;case 1:e.resource.Bolognium.display&&(r="Bolognium",a=Math.rand(500,5e4));break;case 2:e.resource.Alloy.display&&(r="Alloy",a=Math.rand(250,1e6));break;case 3:e.resource.Adamantite.display&&(r="Adamantite",a=Math.rand(1e3,25e4));break;case 4:e.resource.Soul_Gem.display&&(r="Soul_Gem",a=1);break}return e.resource[r].amount+=a,e.resource[r].max>=0&&e.resource[r].amount>e.resource[r].max&&(e.resource[r].amount=e.resource[r].max),r==="Money"?t("event_m_curious0",[F[e.race.species].name,"$",a.toLocaleString()]):t("event_m_curious0",[F[e.race.species].name,a.toLocaleString(),e.resource[r].name])}case 1:return e.resource[e.race.species].amount-=10,e.civic[e.civic.d_job].workers-=10,e.civic[e.civic.d_job].workers<0&&(e.civic[e.civic.d_job].workers=0),t("event_m_curious1",[F[e.race.species].name]);case 2:return e.race.inspired=Math.rand(600,1200),t("event_m_curious2",[F[e.race.species].name]);case 3:return e.race.distracted=Math.rand(200,600),t("event_m_curious3",[F[e.race.species].name]);case 4:return e.race.species==="cath"?(e.race.stimulated=Math.rand(500,1e3),t("event_m_curious4a",[F[e.race.species].name])):t("event_m_curious4b",[F[e.race.species].name])}}},curious1:{reqs:{tech:"primitive",trait:"curious"},type:"minor",effect(){let r=Math.rand(0,5);return t(`event_curious${r}`,[F[e.race.species].name])}},curious2:{reqs:{tech:"primitive",trait:"curious"},type:"minor",effect(){let r=Math.rand(5,10);return t(`event_curious${r}`,[F[e.race.species].name])}},slave_escape1:is("minor","escape1"),slave_escape2:is("minor","escape2"),slave_escape3:is("minor","death4"),shooting_star:ht("shooting_star","primitive"),tumbleweed:ht("tumbleweed","primitive"),flashmob:ht("flashmob","high_tech"),witch_hunt:{reqs:{tech:"magic"},type:"minor",condition(){return!!(e.race.witch_hunter&&e.resource.Sus.amount>=50&&e.civic.scientist.workers>0)},effect(){return e.resource[e.race.species].amount--,e.civic.scientist.workers--,e.civic.scientist.assigned--,t("witch_hunter_witch_hunt")}},heatwave:{reqs:{tech:"primitive"},type:"minor",condition(){return!(e.race.cataclysm||e.race.orbit_decayed||e.city.calendar.temp===2||e.city.calendar.season===3&&["tundra","taiga","eden"].includes(e.city.biome))},effect(){return e.city.calendar.temp=2,e.city.cold=0,t("event_heatwave")}},coldsnap:{reqs:{tech:"primitive"},type:"minor",condition(){return!(e.race.cataclysm||e.race.orbit_decayed||e.city.calendar.temp===0||e.city.biome==="hellscape"&&!e.city.ptrait.includes("permafrost")||e.city.calendar.season===1&&["ashland","volcanic","eden"].includes(e.city.biome))},effect(){return e.city.calendar.temp=0,e.city.hot=0,t("event_coldsnap")}},cucumber:ht("cucumber","primitive"),planking:ht("planking","high_tech"),furryfish:ht("furryfish","primitive"),meteor_shower:ht("meteor_shower","primitive"),hum:ht("hum","high_tech"),bloodrain:ht("bloodrain","primitive"),haunting:ht("haunting","science"),mothman:ht("mothman","science"),dejavu:ht("dejavu","theology"),dollar:ht("dollar","currency",function(){let r=Math.rand(1,10);return e.resource.Money.amount+=r,e.resource.Money.amount>e.resource.Money.max&&(e.resource.Money.amount=e.resource.Money.max),r}),pickpocket:ht("pickpocket","currency",function(){let r=Math.rand(1,10);return e.resource.Money.amount-=r,e.resource.Money.amount<0&&(e.resource.Money.amount=0),r}),bird:ht("bird","primitive"),contest:{reqs:{tech:"science"},type:"minor",effect(){let r=Math.rand(0,3),a=Math.rand(0,10);return t("event_contest",[t(`event_contest_place${r}`),t(`event_contest_type${a}`)])}},cloud:ht("cloud","primitive",function(){let r=Math.rand(0,11);return t(`event_cloud_type${r}`)}),dark_cloud:{reqs:{tech:"primitive"},type:"minor",condition(){return!e.race.cataclysm&&!e.race.orbit_decayed&&e.city.calendar.weather!==0},effect(){return e.city.calendar.weather=0,t("event_dark_cloud")}},gloom:{reqs:{tech:"primitive"},type:"minor",condition(){return!e.race.cataclysm&&!e.race.orbit_decayed&&e.city.calendar.weather!==1},effect(){return e.city.calendar.weather=1,t("event_gloom")}},tracks:ht("tracks","primitive"),hoax:ht("hoax","primitive"),burial:ht("burial","primitive"),artifacts:ht("artifacts","high_tech"),parade:ht("parade","world_control"),crop_circle:ht("crop_circle","agriculture"),llama:ht("llama","primitive",function(){let r=Math.rand(25,100);return e.resource.Food.amount-=r,e.resource.Food.amount<0&&(e.resource.Food.amount=0),r},function(){return!(e.race.carnivore||e.race.soul_eater||e.race.detritivore||e.race.artifical)}),cat:ht("cat","primitive"),omen:ht("omen","primitive"),theft:ht("theft","primitive",function(){let r=Math.rand(0,10);return t(`event_theft_type${r}`)}),compass:ht("compass","mining"),bone:ht("bone","primitive"),delicacy:ht("delicacy","high_tech"),prank:ht("prank","primitive",function(){let r=Math.rand(0,10);return t(`event_prank_type${r}`)}),graffiti:ht("graffiti","science"),soul:ht("soul","soul_eater"),cheese:{reqs:{tech:"banking"},type:"minor",condition(){return!!(e.tech.banking&&e.tech.banking>=7)},effect(){let r=e.stats.hasOwnProperty("reset")?e.stats.reset+1:1;return e.race.cheese=Math.rand(10,10+r),t("event_cheese")}},tremor:ht("tremor","primitive"),rumor:ht("rumor","primitive",function(){let r=Math.rand(0,10);return t(`event_rumor_type${r}`)}),pet:{reqs:{tech:"primitive"},type:"minor",effect(){if(e.race.pet){let r=Math.rand(0,10);return t(`event_${e.race.pet.type}_interaction${r}`,[t(`event_${e.race.pet.type}_name${e.race.pet.name}`)])}else return e.race.pet={type:Math.rand(0,2)===0?"cat":"dog",name:Math.rand(0,10)},t(`event_pet_${e.race.pet.type}`,[t(`event_${e.race.pet.type}_name${e.race.pet.name}`)])}}};function ht(r,a,i,s){return{reqs:{tech:a},condition(){let n=!0;return typeof s=="function"&&(n=s()),n},type:"minor",effect(){let n=!1;return typeof i=="function"&&(n=i()),n?t(`event_${r}`,[n]):t(`event_${r}`)}}}function is(r,a){return{reqs:{trait:"slaver",tech:"slaves"},condition(){return!(e.race.cataclysm||e.race.orbit_decayed||e.tech.isolation)},type:r,effect(){return e.city.slave_pen&&e.resource.Slave.amount>0?(e.resource.Slave.amount--,t(`event_slave_${a}`)):t("event_slave_none")}}}function Fs(r,a){let i=mt(We(),"army",e.civic.garrison.wounded),s=e.tech.high_tech?e.tech.high_tech+1:1,n=(r==="witchhunt"?1e3:e.civic.foreign[r].mil)*(1+Math.floor(J(0,10)-5)/10)*s,c=e.civic.garrison.wounded>We()?We():e.civic.garrison.wounded,l=We()>0?Math.floor(J(1,c)):0,o=Math.floor(J(0,We()-c));e.race.instinct&&(l=Math.round(l/2),o=Math.round(o/2)),e.civic.garrison.workers-=l,e.civic.garrison.wounded+=o,e.stats.died+=l,e.civic.garrison.wounded>e.civic.garrison.workers&&(e.civic.garrison.wounded=e.civic.garrison.workers),e.race.blood_thirst&&(e.race.blood_thirst_count+=Math.ceil(n/5),e.race.blood_thirst_count>b.blood_thirst.vars()[0]&&(e.race.blood_thirst_count=b.blood_thirst.vars()[0]));let d=r==="witchhunt"?t("witch_hunter_crusade"):t(`civics_gov${e.civic.foreign[r].name.s0}`,[e.civic.foreign[r].name.s1]);if(i>n)return t("event_pillaged1",[d,l.toLocaleString(),o.toLocaleString()]);{let h=a?2:4,_=[],m=Object.keys(sr);return m.push("Money"),m.forEach(function(w){if(e.resource[w]&&e.resource[w].display&&e.resource[w].amount>0){let M=Math.rand(1,Math.round(e.resource[w].amount/h)),A=e.resource[w].amount-M;A<0&&(A=0),e.resource[w].amount=A,w==="Money"?_.push(`$${Ee(M)}`):_.push(`${Ee(M)} ${e.resource[w].name}`)}}),t("event_pillaged2",[d,l.toLocaleString(),o.toLocaleString(),_.join(", ")])}}function Kc(r){let a=[];return Object.keys(er).forEach(function(i){let s=!0;r!==er[i].type&&(s=!1),(r==="major"&&e.event.l===i||r==="minor"&&e.m_event.l===i)&&(s=!1),er[i].reqs&&Object.keys(er[i].reqs).forEach(function(n){switch(n){case"race":er[i].reqs[n]!==e.race.species&&(s=!1);break;case"genus":er[i].reqs[n]!==F[e.race.species].type&&(s=!1);break;case"nogenus":er[i].reqs[n]===F[e.race.species].type&&(s=!1);break;case"resource":(!e.resource[er[i].reqs[n]]||!e.resource[er[i].reqs[n]].display)&&(s=!1);break;case"trait":e.race[er[i].reqs[n]]||(s=!1);break;case"notrait":e.race[er[i].reqs[n]]&&(s=!1);break;case"tech":e.tech[er[i].reqs[n]]||(s=!1);break;case"notech":e.tech[er[i].reqs[n]]&&(s=!1);break;case"high_tax_rate":e.civic.taxes.tax_rate<=er[i].reqs[n]&&(s=!1);break;case"low_morale":e.city.morale.current>=er[i].reqs[n]&&(s=!1);break;case"biome":e.city.biome!==er[i].reqs[n]&&(s=!1);break;default:s=!1;break}}),s&&er[i].condition&&!er[i].condition()&&(s=!1),s&&a.push(i)}),a}function V0(){let r=["Soul_Gem","Corrupt_Gem","Codex","Demonic_Essence"],a=e.civic.govern.type==="oligarchy"?45:25,i=ge("aristocrat",2);i&&(a-=i);let s=(e.civic.taxes.tax_rate-a)*.04;return Object.keys(e.resource).forEach(function(n){if(!r.includes(n)){let c=Math.rand(1,Math.round(e.resource[n].amount*s)),l=e.resource[n].amount-c;l<0&&(l=0),e.resource[n].amount=l}}),t("event_tax_revolt")}var hi=[{version:"1.3.13",revision:"a",date:"8/6/2024",changes:["Fix a bug that prevented crafting in Cataclysm and Lone Survivor modes."]},{version:"1.3.13",date:"8/6/2024",changes:["New Scenario by CondoSlime: Fasting.","More queue config options.","Wiki Search feature by sm3232","Language Updates.","Random bug fixes."]},{version:"1.3.12",date:"3/30/2024",changes:["Fixed Easter Event."]},{version:"1.3.11",date:"2/19/2024",changes:["Community fixes:","New Power settings.","Fixed loot bug with Gravity Well and Dark Energy.","Fixed pet names in pet events.","Fixed issue with Aquarius sign and Tourist Centers.","Fixed bugs with Arraak and Human thralls.","Many bug fixes related to High Population trait.","Many language updates."]},{version:"1.3.10",date:"1/23/2024",changes:["Added Gravity Well challenge mode.","Prepping the Bioseed ship for launch now has a Helium-3 cost.","Added new pet minor event","Polish language translation by Wied\u017Amin.","German language translation by FutterSillo.","Various UI improvements and language updates."]},{version:"1.3.9",date:"8/20/2023",changes:["Pressing the same tab key multiple times will now cycle the subtabs.","Reduced Mana costs of Improved Concealment, Study Corrupt Gem, & Outerplane Summon in Witch Hunter for non-gold star players.","Fixed Bilateral Symmetry DNA bonus.","Updated Korean and Chinese langs.","Screen Reader improvement for achievements display."]},{version:"1.3.8",revision:"a",date:"6/1/2023",changes:["Fixed high pop scaling."]},{version:"1.3.8",date:"6/1/2023",changes:["Unfathomable bug fixes.","Psychic powers up time now scale with rank of Ancient Nightmare.","Additional Psychic power upgrades.","Intergalactic Raider renamed to Corsair."]},{version:"1.3.7",revision:"a",date:"5/30/2023",changes:["Fixed issue with drawing the same alien species twice in intergalactic content.","Adjusted Mana costs for some research techs in Witch Hunter."]},{version:"1.3.7",date:"5/29/2023",changes:["Added Magic universe exclusive challenge: Witch Hunter.","Reduced Encrypted Data cost of Data Analysis, Advanced Medkits, Automated Warehousing, Elerium Extraction, and Drone Warfare techs.","Star Forge smelting bonus rebalanced.","Antimatter Dark Energy effect now applies to Truepath Ship power generation.","Fixed Magocracy Crystal bonus.","Reduced Crystal cost of Alchemy.","Fixed Humpback trait rank scaling.","Infiltrator can now steal Alien Biotech on Truepath.","Fixed brownout issue with using Replicator Gov task when constructing a new powered building.","Fixed rejuvenated trashed planet bonus.","Fixed orbit period on reterraformed planets."]},{version:"1.3.6",date:"4/22/2023",changes:["Added Astrological signs.","Added Motivated Event.","Operating Bases now function as Hospitals in Orbit Decay scenario.","Stellar Forge is now locked to using Star Fuel for smelting.","Species with the Forge trait can now use Inferno Fuel and Star Fuel.","Reduced Wireless Signal needed to Contact womlings in Lone Survivor."]},{version:"1.3.5",revision:"c",date:"4/16/2023",changes:["Made Egg #17 easier to get in Cataclysm mode."]},{version:"1.3.5",revision:"b",date:"4/9/2023",changes:["Increased egg accessibility with certain traits or challenge modes."]},{version:"1.3.5",revision:"a",date:"4/8/2023",changes:["Fixed a bug that caused eggs 16-18 not to count for unlocking the egg hunt feat."]},{version:"1.3.5",date:"4/7/2023",changes:["Avian species now have the Flier trait.","Avian Rigid trait replaced with Sky Lover.","Added Wireless storage to High-Tech farm in isolation","Fixed truepath dreadnought power costs.","Fixed a bug that could assign extra challenge genes.","Fixed a bug with changing languages with active Tau Ceti content.","Fixed many issues with preload tab content in the early game."]},{version:"1.3.4",revision:"b",date:"3/30/2023",changes:["Prevented some bugs caused by distributed power mode from occurring.","You can now unlock World Domination, Illuminati, Syndicate, and Pacifist in Truepath."]},{version:"1.3.4",revision:"a",date:"3/25/2023",changes:["A restore point is now made if you select isolation protocol."]},{version:"1.3.4",date:"3/24/2023",changes:["Evolving Synth can now choose imitation race from any species killed by an AI Apocalypse.","Fixed issue with miscalculating low fuel usage for various power generating structures.","Extractor Ship Isolation output boosted by 20%.","Added additional Hooved reskins.","Fixed various issues with Preload Tab Content.","Explorer Ship config is now locked down for Engine, Sensor, and Weapon components.","Skilled Servants assigned to craft inactive resources will now be refunded."]},{version:"1.3.3",revision:"a",date:"3/20/2023",changes:["Fixed a bug that could cause the Test Launch to be unavailable."]},{version:"1.3.3",date:"3/15/2023",changes:["Rebalanced Soul Gem drop mechanics.","Added Annihilation Feat.","Added additional Mass Ejector Optimizer config mode.","Servants are no longer affected by most racial traits.","The Lone Survivor can no longer benefit from Hivemind.","Fixed High Pop issue with Pit Miners.","Fixed bug with unlocking Replicator without a Governor."]},{version:"1.3.2",revision:"c",date:"3/8/2023",changes:["Fixed cataclysm reset while having preload tab content enabled."]},{version:"1.3.2",revision:"b",date:"3/5/2023",changes:["Fixed Rock Quarry under industry tab for Smoldering players."]},{version:"1.3.2",revision:"a",date:"3/5/2023",changes:["Adjusted hell calculation."]},{version:"1.3.2",date:"3/4/2023",changes:["High-Tech Factory changed back to tool modifier, however value is increased from original 25% to 90%.","Advanced Material Synthesis increased from 50% to 65%.","Added new interaction between Hell Surveyors and Drone victims.","Fixed bug that would cause Replicator Governor task to swap resources when focusing a resource without a cap.","Fixed inability to produce Chrysotile in Isolation."]},{version:"1.3.1",date:"3/3/2023",changes:["Added Advanced Material Synthesis tech to Isolation path.","High-Tech Factory crafting bonus changed from a Tool modifier to a direct multiplier.","Updated Mass Ejector Optimizer logic.","Fixed a bug that broke Cataclysm reset.","Fixed fuel calculation bug with Moon Bases and Spaceports.","Fixed issue with self replicating Synth and Nano.","Fixed bugs with purchasing CRISPR techs in Antimatter universe."]},{version:"1.3.0",revision:"b",date:"3/1/2023",changes:["Fixed issue with Mass Ejector Optimizer gov task breaking the governor subtab."]},{version:"1.3.0",revision:"a",date:"3/1/2023",changes:["Fixed Antimatter universe."]},{version:"1.3.0",date:"3/1/2023",changes:["The True Path has been extended, explore Tau Ceti and expand your civilization.","Added Perks: Evolve Master and Evolve Grandmaster.","Added Distributed Low Power mode setting.","Added Precognition CRISPR upgrade.","Strong trait now buffs basic jobs but has a weaker effect on manual resource collection.","Ships in Truepath can now only be scrapped at the Shipyard.","Truepath Sensor Range and Costs adjusted. Range now depends partly on base ship class.","Queue stacks now indicate first block vs last blocking resource with a gradient indicator.","Added screen reader improvements for blocking resources.","You can no longer unlock Anarchist by Cataclysm.","Syndicate will now also steal food from Biodomes.","Reinforced Shed upgrade now requires unlocking Iron Mining.","You must now construct a Titan Habitat before a Titan Mine.","Removed dark background effect from modal popups.","Increased Entrepreneur Governor trade bonus from 75% to 125% and Bank capacity boost from 10% to 12%.","Increased Media Governor morale bonuses and Library bonus.","Increased Soldier Governor combat bonus from 5% to 25%.","Increased Educator Governor knowledge bonus from 5% to 6%.","Increased Spiritualist Governor worker bonus from 10% to 20% and tourism bonus from $2 to $5 per Temple.","Increased Noble Governor tax cap bonus from 10% to 20%.","Bluecollar Governor now increases output of Coal and Oil power plants and boosts Miners, Smelter, and Oil Derrick.","Bureaucrat Governor now provides a slight boost to government effects."]},{version:"1.2.21",date:"1/10/2023",changes:["New Achievement filtering options in Wiki.","Updated Chinese lang file.","Updated Korean lang file."]},{version:"1.2.20",date:"9/16/2022",changes:["New homelessness system.","Factory, Mining Droids, and Graphene Plants will remember resource assignment after a low power shutdown.","Terraforming and Ascension can no longer be queued or multi-clicked.","AI Cores show correct bonus in tooltip.","Stealing Rocketry will now unlock rival in Truepath.","Playful will no longer remove unemployed stress with no hunters.","Andromeda Citizens will no longer stick around if abandoned by a stargate shutdown.","Fixed various bugs with mutating in or out some traits.","Made some improvements for screen readers to determine active state of challenges."]},{version:"1.2.19",revision:"a",date:"8/21/2022",changes:["Home Planet Orbital structures are now merged with the Moon instead of Red Planet in Cataclysm."]},{version:"1.2.19",date:"8/20/2022",changes:["Added rank scaling effects to traits: Carnivore, Hooved, Leathery, Unified, & Magnificent.","Structures orbiting the home planet are now moved to the Red planet after Orbit Decay or during Cataclysm.","Fixed a bug with deactivating fuel consuming structures when fuel runs dry.","Already active Governor tasks will no longer display for assignment in other task slots.","Constructing a Stellar or Infernal Forge will now assign Iron as a default resource instead of nothing.","Buffed effects of Star Forge fueled smelting.","Fixed an incorrect source label for money storage in Orbit Decay."]},{version:"1.2.18",revision:"a",date:"8/14/2022",changes:["Fixed ARPA queueing."]},{version:"1.2.18",date:"8/14/2022",changes:["More accurate timers when using Governor Trash Management task.","Optimistic Min Morale effect now scales with trait rank.","Fixed TP loot table when Assaulting or Sieging rival."]},{version:"1.2.17",revision:"a",date:"8/10/2022",changes:["Cheese Event power is now scaled with your cheese level.","Fixed Soft Reset bug with Rejuvenated."]},{version:"1.2.17",date:"8/10/2022",changes:["New Hell stats tracking and analytics.","Fixed Genetics not unlocking in Cataclysm.","Fixed many High Pop scaling interactions.","Fixed some loading bugs with wiki when no save data is present.","Updated various wiki entries and calculators.","Updated Pig Latin."]},{version:"1.2.16",revision:"a",date:"8/8/2022",changes:["Fixed OD bugs with Ziggurat, Garage, and Fabrication.","Fixed Launch Facility sometimes getting stuck in queue."]},{version:"1.2.16",date:"8/4/2022",changes:["Added Orbit Decay Challenge.","Added Retrograde planetary trait.","New achievement: Better dead than red.","New CRISPR upgrade: Civil Service.","Other stuff the dev was too lazy to document."]},{version:"1.2.15",revision:"a",date:"7/1/2022",changes:["Fixed bug that prevented games without save data from loading."]},{version:"1.2.15",date:"7/1/2022",changes:["Firework Festival now starts on July 1st and ends July 4th.","Added Dracula theme by azzzertyy.","Fixed bug with Horseshoe governor and multiplier keys.","Fixed issues with starting Cataclysm as Synth.","Fixed bugs with wrong path techs being displayed.","Evil Synth now start with a Graveyard instead of a Lumberyard.","Deify and study can no longer be queued at same time.","Restore backup no longer requires double clicking to trigger confirmation box."]},{version:"1.2.14",revision:"a",date:"4/19/2022",changes:["Fixed some minor bugs.","Updated some translations."]},{version:"1.2.14",date:"4/1/2022",changes:["Added Titan Mine slider to Industry tab.","Added additional popup confirmation to Restore Backup.","Nanite Factory interface now has tooltips for each resource","The Vault Discovery event can no longer occur if there are 0 Archaeologists and/or if Suppression is at 0%","Fixed bugs related to unlocking the Fool feat.","Fixed bugs with Mass Ejector optimizor governor task."]},{version:"1.2.13",date:"3/31/2022",changes:["Restore Backup must now be clicked twice to trigger."]},{version:"1.2.12",revision:"c",date:"3/7/2022",changes:["Fixed Double Density achievement."]},{version:"1.2.12",revision:"b",date:"3/2/2022",changes:["Fixed logic fault with mech constructor inferno upgrades."]},{version:"1.2.12",revision:"a",date:"3/1/2022",changes:["Fixed some bugs with planet traits.","Fixed bug with attacking on Swamp planets."]},{version:"1.2.12",date:"2/28/2022",changes:["Planets can now have upto two traits.","Advanced Biomes: Savanna, Swamp, Ashland, and Taiga can now appear.","Added Permafrost planetary trait.","Forest Biome lumber bonus changed from 15% to 20%.","Exotic materials are now ranked higher by the Mass Optimizer governor task.","Repair droid effect on Carport repairs buffed from 5% to 8%.","You must now discover the Hell Vault through Archaeology.","Water now has Mass."]},{version:"1.2.11",date:"2/16/2022",changes:["Added Doomed achievement to the perks lists.","Added Governor CRISPR tree to perks list.","Updated prestige gain/bonus calculators.","Fixed Ritual Casting not showing up in Industry in Cataclysm.","Detritivores no longer see the Farming ritual.","Fixed Entertainer tooltip showing twice the effect of Musical.","Fixed Gauss Rifles showing the effect for Disruptor Rifles.","Fixed Water Freighter tooltip showing half the Helium-3 cost.","Fixed some affordability checks."]},{version:"1.2.10",date:"2/7/2022",changes:["Bioseed probes now have significantly less cost creep inside True Path scenario.","You can no longer manually buy or sell resources while the game is paused.","Fixed bug with High Pop trait and Savings Bonds granting too much money.","Minor bug fixes"]},{version:"1.2.9",date:"1/29/2022",changes:["Spies may now sell you out when caught or escape when failing a mission.","Infiltrator can now steal Quantium tech inside True Path.","Genetics Lab UI updated."]},{version:"1.2.8",revision:"a",date:"1/19/2022",changes:["Fixed Farmer per Farm scaling with High Pop trait.","Adjusted low end scaling of High Pop Hivemind trait.","Wireless Signal cost for Symposium lowered.","Added Anarchy scaling with High Pop"]},{version:"1.2.8",date:"1/19/2022",changes:["Insectoid genus redesigned with High Population trait.","Fixed bug that caused incorrect timer calculations when using Slow or Hyper trait at any rank other then 1."]},{version:"1.2.7",revision:"a",date:"1/11/2022",changes:["Fixed storage bug with standard universe."]},{version:"1.2.7",date:"1/11/2022",changes:["Failed Experiment Challenge mode.","Ziggurat bonus separated from base production of buildings.","Fixed bug that prevented smoldering races from being able to loot Chrysotile","Fixed bug that would cause Intergalactic Tech page in wiki not to load if you were playing in Antimatter universe."]},{version:"1.2.6",date:"12/24/2021",changes:["Fixed bug that prevented custom Synthetic race from showing if you refreshed the page.","Fixed bugs with Synthetic evolution and traits: Calm, Cannibalize, and Magnificent.","Fixed bugs with using the quick tab keys when preload tabs is enabled."]},{version:"1.2.5",date:"12/21/2021",changes:["Fixed bug that caused a planet to lose its geology traits after an AI reset.","Fixed bug with scavenger job description."]},{version:"1.2.4",date:"12/19/2021",changes:["Solar system now has elliptical orbits.","Fixed Evolve Adept Food bonus.","Rank of each aquired trait is now listed in genetics tab.","Crate/Container sources are now listed in resource popup.",'Manual buying/selling will auto scale down to prevent "waste".']},{version:"1.2.3",date:"12/16/2021",changes:["Expanded Festive Season to include additional species."]},{version:"1.2.2",date:"12/15/2021",changes:["Graphene Plants now show on industry tab for True Path.","Added entry for Festive Season into wiki.","The game wiki will now load without any game data."]},{version:"1.2.1",date:"12/14/2021",changes:["Smelter metals can now be reallocated without unassigning.","Increased accuracy of syndicate intel data","Fixed bug with removing Weak & Bad genes when toggling True Path.","Fixed bug with adding or removing Professors not updating indoctrination value.","Fixed bug with Planet Wiki entry that prevented some data from loading.","Added trait rankings to wiki."]},{version:"1.2.0",revision:"a",date:"12/12/2021",changes:["Fixed bug with Plasmid Storage.","Fixed bug with Befuddle trait and Espionage.","Fixed bug with Composting.","Updated Solar Map.","Added setting to enable mobile device support.","Minor buff to TP Frigate power."]},{version:"1.2.0",date:"12/12/2021",changes:["Unlock the True Path (Requires completion of Ascension or Demonic Infusion).","Using Fanaticism to gain an unempowered trait you already possess will now empower that trait.","Added option to Hell Fortress to prevent using ship crew as reinforcements.","Shrine Metal bonus now applies to Mining Droid Aluminium production.","Armored trait now prevents 50% of deaths.","Cannibalize healing now applies a percent based bonus instead of being equivalent to 3 5% Hospitals.","GruvBox Dark is now the default theme.","Added Evolve Adept Perk.","Themed several additional weapon techs in magic universe for immersion.","Smoldering and Chilled effects now display as Smoldering or Chilled in production breakdowns instead of Hot/Cold.","Improved touch device support."]},{version:"1.1.17",date:"11/28/2021",changes:["Job stress from Civilian Ship Crew is now calculated correctly.","Things will now show as unaffordable if they require a locked resource.","Added new entries to Mechanics section of Wiki: Job Stress, Cost Creep, and Warmonger.","Evolve Novice and Evolve Journeyman perk conditions updated."]},{version:"1.1.16",date:"10/30/2021",changes:["Ghost #3 can now be captured with Smoldering.","Ghost #7 can now be captured in Cataclysm mode.","Updated description of Trick or Treat feat.","Llamas will no longer harass carnivores, detritivores, and soul eaters by grazing their fields."]},{version:"1.1.15",date:"10/20/2021",changes:["Added buttons to pause queues.","Cracked Pylons now correctly add to Mana cap.","Pillar of Bones will no longer be rolled with the Smoldering trait.","Fixed bugs with removing Terrifying trait.","Fixed bug with items in queue blocking the next item when it couldn't be completed due to negative production of a resource.","The Tax-Morale governor task is now slightly smarter."]},{version:"1.1.14",revision:"a",date:"9/30/2021",changes:["Fixed Pylon bug with upgraded save games in Magic Cataclysm runs.","Fixed a Message Log filtering problem where some players might not unlock some options."]},{version:"1.1.14",date:"9/29/2021",changes:["New settings options for message log filters.","Added Cracked Pylons for Magic Cataclysm mode.","Conjuring is no longer researchable in Cataclysm mode.","Challenges section added to Wiki under Gameplay.","Smoldering Gnawer will now consume Stone instead of nothing."]},{version:"1.1.13",date:"9/5/2021",changes:["Expanded Mechanics entries in wiki.","Fixed some errors in wiki prestige calculators.","Added a Custom Lab calculator to wiki under species."]},{version:"1.1.12",date:"8/19/2021",changes:["Training Timer for Military tab.","Draggable config options for Spy Operator.","Bug fixes for log and queue windows."]},{version:"1.1.11",date:"8/12/2021",changes:["ARPA projects now contribute to inflation.","Mercenaries costs are now affected by inflation.","Trade is now affected by inflation.","Casino income is now affected by inflation.","Luxury Goods income is now affected by inflation.","Rescaled inflation levels.","Wheelbarrow achievement now requires $250 billion.","Inflation bug fixes.","New message log filters.","Fixed Luxury Goods tooltip money value."]},{version:"1.1.10",date:"8/8/2021",changes:["Added Inflation Challenge Mode. Requires Scrooge achievement to unlock.","Import/Export race feature added to Ascension lab.","Added merge options for queue.","Available space in queue is now shown.","Added Blackhole + Mass Ejector mechanic entry to wiki.","Fixed some display bugs with Alchemy.","Fixed bug where Protoplasm could be required by some structures late in hell phase."]},{version:"1.1.9",date:"7/7/2021",changes:["Firework festival bug fix for cataclysm mode."]},{version:"1.1.8",date:"7/3/2021",changes:["Added firework festival event (July 4th - July 8th).","Added Copper and Iron settings to Mass Ejector Optimizer task.","Current Quantum Level now shown on Citadel Stations.","Updated wiki prestige calculators.","Added a Quantum Level section to wiki."]},{version:"1.1.7",date:"6/29/2021",changes:["Added a Mass Ejector Optimizer governor task.","Fixed precision error with Tech Scavengers.","Prestige calculators added to wiki.","Progress related event section added to wiki.","Anti-plasmids gained from MAD in antimatter universe are now correctly calculated."]},{version:"1.1.6",date:"6/19/2021",changes:["Solstice event is now easier for less seasoned players.","Wharves are no longer affected by the Nomadic trait.","Decreased cost of Iron Horseshoes."]},{version:"1.1.5",date:"6/16/2021",changes:["Support for String Packs.","Separate research queue behavior option.","Balorg can now use the governor tax task."]},{version:"1.1.4",date:"6/11/2021",changes:["Fixed a bug that would sometimes cause mechs to be constructed without weapons.","Fixed a bug that would cause an open tooltip to change descriptions when a queue item completes."]},{version:"1.1.3",date:"6/7/2021",changes:["Improvements to tooltip reliability.","The first Horseshoes can now be constructed out of Lumber if available as a resource.","Horseshoe pacing updated, see Hooved entry in wiki for expanded information."]},{version:"1.1.2",date:"6/6/2021",changes:["Added Money Reserve % config value to Slave replacement task.","Various special buildings are now dropped from the queue if you remove their required trait.","Spy Operator will no longer attempt espionage against controlled cities.","Fixed many issues with labels not updating"]},{version:"1.1.1",date:"6/5/2021",changes:["Unifying during banana republic now triggers an automatic backup save.","Holding a key multiplier with the queue key will now queue mulitple of a building.","Dealmaker import bonus buffed from 40% to 75%.","Nerfed Beast trait to 8% hunting / 15% windy hunting / 10% soldier training.","Restored Cautious trait to Carnivore genus.","Added Money Reserve % config values to Merc and Spy recruiter tasks.","Horseshoes can now be queued.","Adamantite Horseshoes are now much cheaper.","Changed progression system for Horseshoe costs, will not change to next resource unless it's unlocked."]},{version:"1.1.0",date:"6/4/2021",changes:["Appoint a Governor to help run the everyday tasks, unlock in the CRISPR lab.","Animal genus split into 2 new beast genus: Carnivore & Herbivore.","Carnivore Species: Cath, Wolven, Vulpine.","Herbivore Species: Centaur, Rhinotaur, Capybara.","Cath, Wolven, and Centaur redesigned.","Spire Mech Combat rebalanced.","Titan mechs now have 4 weapon slots and an extra equipment slot.","New Equipment: Jump Jet (All but Heavy & Titan), Battery (Heavy Only), and Targeting Computer (Titan Only).","New Scavenger mech type","Reweighted Angelic genus trait costs.","Major event messages are now shown in a different color from minor ones.","Decreased frequency of minor events.","Smoldering no longer applies to a variety of special resources.","Frenzy renamed to Blood Thirst.","Madagascar Tree achievement now requires inheriting Blood Thirst instead of Carnivore.","Expanded Hell section of Wiki"]},{version:"1.0.43",date:"5/18/2021",changes:["Banana Smoothie will no longer unlock for free in alternate universes.","Added a Spire Floor clear timer for previously beaten monsters.","Gate Turrets now correctly contribute to demon kills."]},{version:"1.0.42",date:"5/4/2021",changes:["Minor bug fixes with new events."]},{version:"1.0.41",date:"5/3/2021",changes:["Added launch day event for May 6th.","New minor event system.","The same event can no longer trigger twice in a row."]},{version:"1.0.40",date:"4/11/2021",changes:["Special event race reskins will now persist after event ends until reset.","Added a warning to Unification tech if playing Banana Republic scenario."]},{version:"1.0.39",date:"4/9/2021",changes:["Added challenge win conditions to planet description popover."]},{version:"1.0.38",date:"4/4/2021",changes:["Fixed a bug that prevented some races from acquiring Egg #3."]},{version:"1.0.37",date:"4/3/2021",changes:["Fixed a bug with unlocking the Egg Hunt feat."]},{version:"1.0.36",date:"4/1/2021",changes:["Fool Feat will automatically upgrade to current challenge level for eligible players."]},{version:"1.0.35",date:"3/31/2021",changes:["Changed Blackhole objective of Banana Republic scenerio from stabilize a blackhole to Expand a blackhole to 12 solar mass without exotic matter.","Fixed Terrifying trade exploit in Banana Republic scenerio."]},{version:"1.0.34",date:"3/28/2021",changes:["Added the Banana Republic challenge.","Tax Riots will no longer cause loss of Artifacts, Blood Stones, and other key resources.","Cancel all routes option for trade screen.","Protests no longer apply their penalty twice.","Minor genetic traits can now be reordered by dragging.","Max trade routes per resource type are now governed by Large Trade and Massive Trade upgrades.","Misc minor bug fixes."]},{version:"1.0.33",date:"3/20/2021",changes:["Enhanced threat assessment for Spire.","Added a Save as File option for exporting game state."]},{version:"1.0.32",date:"3/19/2021",changes:["Unemployment Rework.","Fixed reactivity of some tooltips.","Fixed cut off tooltips on settings tab.","Xeno Tourism now requires 10 Monuments and Tourism."]},{version:"1.0.31",date:"3/15/2021",changes:["Alien 1 system is now named after their homeworld.","Alien 2 system is now named after their red planet.","Fixed various cut off tooltips."]},{version:"1.0.30",date:"3/4/2021",changes:["Wharves once again now grant the correct number of trade routes.","Fixed errors with Casino vault size.","Sacrificed Citizens stat for Mantis players.","Factory production can be assigned without first removing it from Alloy production."]},{version:"1.0.29",date:"2/25/2021",changes:["Evolved species will no longer be stuck in the queue after evolution.","Fixed potential viewport scrolling issues with Settings and Evolution tabs.","Added a warning for users running Evolve in multiple tabs.","The game will now remind players to backup their game data once every 100,000 game days."]},{version:"1.0.28",date:"2/21/2021",changes:["Queue can now be used during evolution stage if unlocked with CRISPR tech.","Fixed incorrect Scarletite costs with Wasteful trait.","Graphene Plants now default to Oil with Smoldering.","Fixed many string errors."]},{version:"1.0.27",date:"2/11/2021",changes:["Added Trade Federation achievement.","Added Mastery section to perks page.","Fixed aria label of jobs.","Squished achievement will now unlock from Blackhole or Demonic Infusion."]},{version:"1.0.26",date:"1/30/2021",changes:["Enhanced crafted material popovers.","Universe filters for wiki achievements page.","Cheese Guide."]},{version:"1.0.25",date:"1/23/2021",changes:["Added Piracy section to Wiki under Gameplay-Mechanics.","Numerous minor bug fixes."]},{version:"1.0.24",date:"1/17/2021",changes:["Evil Smoldering races can now research bone tools."]},{version:"1.0.23",date:"1/16/2021",changes:["Redesigned Heat based Genus mechanics.","Untapped Potential formula changed: now has diminishing returns for stacking unspent genes.","Faith now has an effect on auto crafting (Craftsmen Only).","Added new topics to Mechanics section of Wiki.","Minor bug fixes."]},{version:"1.0.22",date:"1/15/2021",changes:["Fixed Cataclysm mode game start."]},{version:"1.0.21",date:"1/10/2021",changes:["Gain upto 8 hours of accelerated time when game is stopped/closed.","Optimized tab content loading for performance.","Pause game feature."]},{version:"1.0.20",date:"12/29/2020",changes:["Fixed issue with keyup event not releasing multiplier keys."]},{version:"1.0.19",date:"12/28/2020",changes:["Studious now improves library knowledge by 10%.","Merchant now increases the amount of resources gained from trading by 10%.","Tracker raised from 10% to 20%.","Resourceful raised from 10% to 12%.","Claws raised from 20% to 25%.","Apex Predator combat bonus raised from 25% to 30%.","Forge Geothermal power boost raised from +1MW to +2MW.","Beast trait now boosts Hunting by 10% or 20% when windy and improves soldier training time by 20%.","Beast gene point cost changed from 2 to 3 points.","Top level tab quick selection key bindings (default 1-7)."]},{version:"1.0.18",date:"12/24/2020",changes:["Fixed issue with species costs on some techs requiring protoplasm without a reload."]},{version:"1.0.17",date:"12/19/2020",changes:["Larger font size modes.","Added descriptions for city sectors.","Last 3 event messages will now be preserved on reload.","Fixed Evolution bugs with Unbound Infusion active.","Improved timer accuracy of stacked queue items when No Queue Order is used."]},{version:"1.0.16",date:"12/16/2020",changes:["Dark Bomb: Kill and Reset the Demon Lord's accumulated strength using the new Dark Bomb.","Bonus Artifacts can now be earned during Demonic Infusion if Spire floor 50 or 100 are cleared.","Renamed the tech upgrade Purify to Enhanced Air Filters in order to prevent confusion with the Blood Infusion Purify."]},{version:"1.0.15",date:"12/12/2020",changes:["Redesigned Inferno Reactor, output is now tied to Infernal Forge.","Steel can once again be discovered by Ambush attacks.","Power Grid is now shown in Cataclysm.","Cataclysm reset no longer incorrectly grants Rapid Mutation or Ancient Ruins.","Many minor bug fixes."]},{version:"1.0.14",date:"12/8/2020",changes:["Vacuum Collapse no longer removes all charges of Corrupted bonus.","Vacuum Collapse now correctly increases Dark Energy earned on the stats page.","Lumber Ritual is no longer displayed to Evil races.","Multiplier keys now work when hiring mercenaries."]},{version:"1.0.13",date:"12/4/2020",changes:["Power Grid now correctly unlocks when gaining Electricity from Infiltrator trait.","Feats Garbage Pie and Finish Line can now be unlocked by Demonic Infusion."]},{version:"1.0.12",date:"12/4/2020",changes:["MechBay tab improvements.","Mechlist can now be reordered by dragging.","Power Grid can now control On/Off state.","Support type structures can now be controlled by the power grid."]},{version:"1.0.11",date:"12/2/2020",changes:["Fixed a memory leak.","Minor adjustments to GruvBox Dark theme.","Cheesy Goodness."]},{version:"1.0.10",date:"12/1/2020",changes:["Ascended buff now persists after Demonic Infusion.","New Themes: GruvBox Light, GruvBox Dark, and Orange Soda."]},{version:"1.0.9",date:"11/29/2020",changes:["Perks separated on to a separate tab under Stats.","Added Perks section to Wiki."]},{version:"1.0.8",date:"11/28/2020",changes:["Base Neutronium cost of Inferno Reactor lowered to 3,750,000.","Fixed Valdi genus traits after evolution.","Prepared rank 2 now correctly applies when building mechs.","Power Grid is now more strict in checking what is available.","Fixed bug that sometimes caused crafting to use a wrong Mastery value."]},{version:"1.0.7",date:"11/25/2020",changes:["Fixed a bug where Technocracy prevented Alien 2 & Chthonian invasions from working."]},{version:"1.0.6",date:"11/24/2020",changes:["Fixed Mechlab quick switch button.","Titan class mech power increased by 12.5%."]},{version:"1.0.5",date:"11/22/2020",changes:["Adjustable Power Grid","Light Theme bug fixes."]},{version:"1.0.4",date:"11/21/2020",changes:["Gains from Alchemy are now higher.","Any mixed fleet can now invade the Alien 2 and Chthonian systems as long as the invasion force is strong enough.","Alien 2 Invasion requires minimum of 400 fleet rating and at least 650 to take no losses.","Chthonian Invasion requires a minimum 1250 fleet rating, 2500 for average losses, and 4500 for minimum losses."]},{version:"1.0.3",date:"11/15/2020",changes:["Fixed compost heap values.","Added combat section to the wiki under gameplay.","Added Equilibrium feat for pillaring every species.","The Misery feat can now be earned from Demonic Infusion."]},{version:"1.0.2",date:"11/10/2020",changes:["Valdi now take your chosen Genus instead of humanoid.","Wrath Blood Infusion now properly applies to all Mech fights.","Artifacts can now be spent properly on the CRISPR tab.","Crystal trade prices adjusted.","Megalith base price reduced from 100k to 55k.","Many minor bug fixes."]},{version:"1.0.1",date:"11/08/2020",changes:["Fixed display bug with CRISPR costs and Technocracy.","Fixed issue with some Windmills not producing power.","The Resort now properly formats its vault size."]},{version:"1.0.0",date:"11/07/2020",changes:["Expanded Interdimensional content, delve deep into the hell dimension.","New Magic Universe.","Fling asteroids into the blackhole with the Asteroid Redirect ARPA project.","The same monument type will no longer be chosen twice in a row.","Evil races can now construct a Pillar of Bones monument type.","Democracy now only affects Entertainers.","Some government bonuses now scale with tech era.","Races with Detritivore can now build Windmills.","Base Aluminium income for plant based species is now roughly 10% higher.","Beast of Burden now grants an extra loot roll instead of a 10% boost.","Revamped combat loot formulas.","Build queue resource highlighting.","Low Contrast Dark Night Theme.","Ewnay igpay atinlay anguagelay."]},{version:"0.9.24",date:"11/1/2020",changes:["Holiday icons from feats earned with no stars can now be accessed.","Challenge feat icons still require at least 1 star."]},{version:"0.9.23",date:"10/30/2020",changes:["New settings option for people who hate fun.","Added ability for an obscure combination of settings and racial traits to get Ghost #3"]},{version:"0.9.22",date:"10/28/2020",changes:["Halloween cosmetic effects will now run for the duration of the Trick or Treat event instead of just on Halloween.","Ents, Dryads, and Salamanders can now find all the Ghosts.","A certain Ghost is now easier to obtain in Cataclysm.","Accessibility improvements for the event."]},{version:"0.9.21",date:"10/27/2020",changes:["Trick or Treat Event, runs from 10/28 - 11/4."]},{version:"0.9.20",date:"10/16/2020",changes:["Fixed bug with the holy trait that improperly applied its bonus."]},{version:"0.9.19",date:"9/1/2020",changes:["Swarm Control AI now provides a base increase of +2 before unlocking Quantum Computing.","Fixed bugs with manual crafting popover.","Fixed bug that stopped DNA & RNA generation during evolution if the Cataclysm scenario was toggled on."]},{version:"0.9.18",date:"8/28/2020",changes:["ARPA Queue timer fixes.","Swarm Control AI upgrade now make Control Stations scale with Quantum level."]},{version:"0.9.17",date:"8/22/2020",changes:["Fixed bug that prevented Cataclysm Ascension from completing.","Rank 1 sacrifice is slightly less effective","Rank 3 sacrifice is significantly more effective","New Research is now shown by Era."]},{version:"0.9.16",date:"8/12/2020",changes:["Bug Fixes by Beorseder:","Fixed issue where Exotic Materials Lab and Fortifications would clear current queue.","Fixed Scavengers not working during Cataclysm.","Fixed display bug with Galactic Exchange during Cataclysm.","Genomic Mutations no longer give the wrong number of Genes without Synthesis upgrades.","Genomic Mutations now tell how many Plasmids/Antiplasmids are gained from them.","Techs now display their requirements on the wiki."]},{version:"0.9.15",date:"8/10/2020",changes:["Tax revolts can no longer destroy Soul Gems.","If you lose your sample of Elerium before researching Elerium Mining it will now be replaced."]},{version:"0.9.14",date:"8/9/2020",changes:["Angelic races now have an innate bonus vs demonic creatures.","Enhanced Muscle Fibers added to perks page.","Genome sequencing will now be off by default in Cataclysm.","Reorganized achievements page in Wiki."]},{version:"0.9.13",date:"8/6/2020",changes:["Special resource descriptions now update."]},{version:"0.9.12",date:"8/3/2020",changes:["Added Crossed the Finish Line feat for Ascending with Cataclysm.","Adjusted many post World Collider Cataclysm things that referenced none existent planetary structures.","Added a fix for Stabilize Blackhole being stuck in an untriggerable state.","Upgrading achievements will now send a notification."]},{version:"0.9.11",date:"8/1/2020",changes:["Fixed a bug that caused Factories to charge the wrong amount of Polymer for producing Synthetic Furs."]},{version:"0.9.10",date:"7/30/2020",changes:["Expanded list of potential enemy city names.","Added Synthetic Fur option to Factories.","Restoring a backup after a Cataclysm will now allow you to Cataclysm again.","Fixed Lumber penalty on Desert worlds.","Many minor bug fixes."]},{version:"0.9.9",date:"7/21/2020",changes:["Added Devotion upgrade to ancients CRISPR line between Faith and Acolyte. The total cost is the same, it's just spread out more.","Players with Ancients 4 are granted Ancients 5 automatically, those with Ancients 3 are refunded 300 Plasmids.","Added Enhanced Muscle Fiber CRISPR upgrade.","High tax morale penalty under Oligarchy is now reduced.","Fixed bugs with Blackhole reset and restoring backups.","Fixed bug with adjusting taxes as a Noble race that would set it to the max."]},{version:"0.9.8",date:"7/18/2020",changes:["Czech translation by Mousesama","The slaves have staged a successful hunger strike to demand better living conditions, as a result slave pens can now only hold 4 slaves each.","Autocracy and Frenzy no longer block Immoral races from gaining a Warmonger bonus.","Geology traits now display under planet information.","Popovers added to building and research queues."]},{version:"0.9.7",date:"7/13/2020",changes:["Seasons no longer exist in Cataclysm mode.","It is no longer Sunny in Cataclysm mode.","Parasites are no longer unable to grow population in Cataclysm mode, but they do take a growth penalty.","Base Sawmill effect is now separated from lumberjack in production breakdown."]},{version:"0.9.6",date:"7/10/2020",changes:["Fixed bug with Infiltrator not unlocking Nanoweave.","Fixed bug with Railways not adding traderoutes correctly in Cataclysm mode."]},{version:"0.9.5",date:"7/6/2020",changes:["Fixed a bug that occurred when combining the Terrifying trait with the gold star Iron Will perk."]},{version:"0.9.4",date:"7/3/2020",changes:["Failed History perk raised from +1 Geothermal to +2 Geothermal energy.","Fixed Oligarchy tax riot immunity between 36%-45%.","Infiltrator can now steal Graphene Processing, Nanoweave, and Orichalcum Analysis techs."]},{version:"0.9.3",date:"7/1/2020",changes:["Increased base number of Plasmids earned in Cataclysm mode."]},{version:"0.9.2",date:"6/30/2020",changes:["Added Restore Backup option, restores game to just before your last prestige reset.","Extended Recombination CRISPR line.","When gaining a random minor trait from Fanaticism, you will now gain 5 ranks of it."]},{version:"0.9.1",date:"6/21/2020",changes:["Fixed Dyson Net."]},{version:"0.9.0",date:"6/21/2020",changes:["Added Scenarios Section to Evolution Challenges.","Added Cataclysm Scenario for those who value science over caution.","Genetic Dead End is now classified as a Scenario.","Plant genus redesign. Photosynth trait replaced with Sappy.","Added 3rd race option for Plant genus: Pinguicula.","Dyson Net now provides partial power as it is constructed.","Added Orichalcum upgrade for Dyson Sphere.","Added Xeno Tourism upgrade.","Added Fertility Clinic upgrade for Hospitals.","Added OTB, Online Gambling, & Bolognium Vault upgrade for Casinos.","Added Scrooge achievement.","Added Soul Link upgrade for Soul Forge/Soul Attractors.","Reduced Bolognium cost of Freighters & Corvette Ships.","Increased rating of Corvette Ships to 30.","Piracy will no longer start until after you construct the Embassy.","Reduced power requirement of Soul Forge and Soul Attractor.","Gun Emplacements and Soul Attractors are now more potent.","Reduced requirement of Demon Slayer feat to 666 Million demon kills."]},{version:"0.8.17",date:"5/30/2020",changes:["Added 3rd race option for Fungus genus: Moldling.","Fungi genus Spore trait replaced with Detritivore.","Casinos now start powered and generated money immediately.","Extreme Dazzle upgrade now boosts Casino income by 50%.","Reduced power requirement of Casino by 1.","Casino Max Morale boost no longer works unless casino is powered.","Occupation will now unlock Federation research.","Added Double Density achievement in heavyverse.","Stoned penalty on mellow planets raised to 10%.","Unemployed citizens on mellow planets no longer generate any stress (note: hunters are NOT unemployed).","Life on mellow planets is now overall less stressful.","Slaver trait rating raised to 12.","Barracks can now be switched off.","Space Stations will now automatically staff Space Miners from the default job when constructed.","Factories now default to producing Alloy instead of Nothing."]},{version:"0.8.16",date:"5/8/2020",changes:["Oceanic biome now applies a 6% bonus to Titanium from Steel smelting.","Oceanic biome now applies a 12% bonus to Titanium from Iron smelting.","Oceanic biome now applies a 5% penalty to Fur generation.","Tundra biome now applies a 25% bonus to Fur generation.","Tundra biome now applies a 10% penalty to Oil generation.","New planetary modifiers: Elliptical, Flare, Dense, and Unstable.","Oligarchy tax riot immunity raised from 35% to 45%."]},{version:"0.8.15",date:"5/2/2020",changes:["Grassland biome Food bonus raised to 20%.","Forest biome Lumber bonus raised to 15%.","Desert biome now applies a 25% Lumber penalty.","Desert biome now gives a 20% stone bonus and a 10% Oil bonus.","Volcanic biome now applies a 10% Food penalty.","Volcanic biome now gives an 8% Iron and 12% Copper bonus.","Added partial Korean translation.","Achievements in the wiki are now sorted Alphabetically.","Some achievements now show completion progress in the wiki."]},{version:"0.8.14",date:"4/30/2020",changes:["Post unification Federation now gives a 32% bonus (raised from 30%).","Federation now increases morale by 10%.","Socialist factory bonus is now 10% (raised from 5%).","Socialist crafting bonus is now 35% (raised from 25%).","Corpocracy factory bonus is now 30% (raised from 20%).","Corpocracy factory bonus now applies to Cement, Graphene, and Vitreloy.","Republic now increases morale by 20%.","Oligarchy tax revenue penalty is now 5% (lowered from 10%).","Oligarchy can now set taxes 20% higher then other governments (raised from 10%).","Technocracy now adds a 10% Knowledge gain bonus.","Autocracy governments are now immune to the warmonger penalty.","Priests now apply a bonus to Ziggurats under Theocracy.","Fixed display of Theocracy effect on temples. This gives a 12% bonus but was only displaying as a 5% increase.","Noble Oligarchy can now set their taxes as high as 40%."]},{version:"0.8.13",date:"4/29/2020",changes:["New research is now sorted by knowledge cost.","Added popover descriptions for prestige resources.","Harmony Crystals now boost standard Dark Energy by 0.1% instead of 0.01%.","Lots of minor bug fixes."]},{version:"0.8.12",date:"4/24/2020",changes:["Farming has been redesigned. Farms no longer directly generate food, Farmers now generate food in combination with Farms.","Added Energizer Feat for ascending without building any Thermal Collectors.","Bad traits no longer count for Ascension Species Creator complexity.","Dreaded Achievement will now unlock if you never researched dreadnoughts.","Fixed issue with some feats spamming the log due to micro achievements.","Fixed base training rate of soldiers.","Fixed bug with diverse trait that made it do the opposite of what it was suppose to do.",'Adjusted color of "purple" text on Night theme.',"Kilowatts are now Megawatts."]},{version:"0.8.11",date:"4/16/2020",changes:["Ascension reset no longer offers planet choices, instead your next race is created on the old planet with bonuses added to that planet.","Ascended planets now gain +2% to all geology deposits, +5% production, +10% storage, and +2 Sundial base Knowledge gain.","Unspent gene points in the Ascension Lab will be converted into Untapped Potential.","Ascension lab now has a complexity gene tax for adding more then 4 traits.","Technophobe perk now applies an additional bonus to custom race complexity.","Paranoid and Hoarder can now be combined.","Over capped slaves will now be released."]},{version:"0.8.10",date:"4/13/2020",changes:["Added EM (Electromagnetic) Field Challenge."]},{version:"0.8.9",date:"4/12/2020",changes:["Added a Feat for finding all the Eggs.","Current egg count can now be checked in the Wiki."]},{version:"0.8.8",date:"4/12/2020",changes:["Easter Event Activated","Event ends 10 days after the start of Easter."]},{version:"0.8.7",date:"4/11/2020",changes:["Fixed Pathetic trait."]},{version:"0.8.6",date:"4/11/2020",changes:["Fixed Brute trait.","Added section for Achievements and Feats to Wiki."]},{version:"0.8.5",date:"4/11/2020",changes:["Added New Work in Progress Game Wiki","Sentience is now more likely to grant a species where the extinction achievement has not yet been earned.","Sentience can now include custom races.","Incorporeal Existence research now costs Phage instead of Plasmids.","Ascension research now Plasmids instead of Phage.","The change log is now part of the Wiki."]},{version:"0.8.4",date:"4/4/2020",changes:["Fixed breaking bug with Rigid trait."]},{version:"0.8.3",date:"4/3/2020",changes:["Federation now reduces the soldier requirement of occupied cities by 5.","Fixed incorrect Industrious string."]},{version:"0.8.2",date:"3/30/2020",changes:["Piracy in the Gateway and Stargate regions ramp up more slowly as you explore Andromeda.","Fixed formatting of multiline Crafting Tooltip cost display.","Fixed incorrect string used by completed Dyson Sphere."]},{version:"0.8.1",date:"3/29/2020",changes:["Piracy now slowly takes effect in the Gateway System and Stargate region over 1000 days after piracy begins.","Purchasing Negotiator and levels of Persuasive will now update the regular Market as well as the Galactic Market.","Added new CRISPR upgrade effects from the Challenge, Ancients, and Trader trees to the perks list.","Queued Monuments will update their name in the queue when a Monument is constructed.","Fixed bug where ARPA projects at the end of the Queue while No Queue Order was active would cause No Queue Order to not work as intended.","The name of the trait gained from a Mutation in the message is now localized.","Adding Apex Predator will remove currently obtained Armor techs.",'Annexed/Purchased powers will now have a respective " - Annexed"/" - Purchased" tag next to their name, like Occupied powers do.',"Blackhole reset gives its proper reward again.","The amount of Gene/Phage levels of Minor Traits purchased is now affected by Multiplier Keys.","The amount of Ships moved from one area to another is now affected by Multiplier Keys.","Manual Crafting button tooltips are more informational.","Constructing the first Foundry of a game will log a message briefly explaining what Crafted Resources are and the ways to make them.","Informative messages (mission results, messages that explain newly unlocked mechanics, the Launch Facility message that informs the player of the space tab, etc.) are now displayed in blue, to separate them from less important messages.","Added the missing Wormhole Mission result string."]},{version:"0.8.0",date:"3/27/2020",changes:["Intergalactic Content.","Universe Mastery Rework.","-Each Universe now tracks its own mastery level responsible for 40% of the mastery bonus, the remaining 60% comes from the general mastery level.","-Standard Universe mastery rules remains unchanged.","Micro icons can now be earned for none Micro achievements. These will not count for standard mastery, only Micro mastery.","Unification 3.0, the unification system has been reworked.","Federation Government type.","New Faith CRISPR line of upgrades, unlocks priest job.","Universal, Standard and Mastered CRISPR Upgrades, for masters of the universes.","Added Negotiator CRISPR upgrade.","Added Persuasive Minor Gene.","Extended the Deify and Study Ancients tech trees.","Enhanced Droids upgrade for War Droids.","Repair Droids for Fortress.","Smoldering and Chilled now have reduced effectiveness after 100 stacks.","Removed Heavy Genus Feats, these were redundant with Universe Icons.","Blackhole reset now also grants species level extinction achievement.","Power cost of Mass Ejector increased to 3kW.","Genetics lab custom mutation costs rescaled to static values depending on the genetic trait.","Colonists will now be automatically assigned when a Living Quarter is completed if the default job has any available citizens.","Biodome redesigned, produces less food but increases living quarter capacity for Citizens.","More robust research categories.","Various racial traits now apply to ARPA projects.","Human Creative trait rescaled.","Large cost creep penalty reduced to 0.005 from 0.01.","Strong gathering bonus increased from 2 to 5.","Compact lowered from -0.02 to -0.015."]},{version:"0.7.28",date:"3/16/2020",changes:["Antimatter Universe now gives a 10% prestige bonus post MAD.","St. Patrick's Day event.","Blood War can no longer be earned by none demonic evil races.","Build Crate/Container buttons now update create/container values when upgraded by research."]},{version:"0.7.27",date:"3/10/2020",changes:["Memory leak fixes."]},{version:"0.7.26",date:"3/5/2020",changes:["Any race where the associated extinction achievement has been unlocked is now always available during evolution.","Joyless perk changed to +2% Max Morale per star level.","The effects of the Mass Extinction and Creator perks have been swapped.","Creator perk (old mass extinction) changed to 1.5x / 2x / 2.5x / 3x / 3.5x genes gained on mutation.","Minor traits bought with Phage now count twice when you complete evolution."]},{version:"0.7.25",date:"2/26/2020",changes:["Unicorn Shrine bonus is now determined by the moon phase when constructed.","Shrine Knowledge bonus now applies an additional affect to universities.","Smelters in Evil universe when using Kindling Kindred default to Flesh instead of Coal.","Evil Wendigo Smelters correctly display that they use 1 Flesh/s instead of 3 Souls/s. Also fixed the bug where they end up using 3 Flesh/s instead of 1.","Fixed bug where the Evil Wendigo Reclaimer description would show the Lumberjack description.","If Containers have not yet been unlocked as a resource, getting a Wharf will unlock it.","Fixed bug where, if Freight Trains was gotten after ARPA, the Railway project would need a refresh to appear."]},{version:"0.7.24",date:"2/12/2020",changes:["Special Prestige icons awarded to players from certain feats can now be set to replace the standard Star icon."]},{version:"0.7.23",date:"2/11/2020",changes:["Steelen Challenge now requires Bioseed as its win condition.","Added Feat for Blackhole reset with Steelen Challenge.","Added V-Day Event stuff."]},{version:"0.7.22",date:"2/9/2020",changes:["Steelen Challenge.","Graveyards are now removed upon gaining Kindling Kindred.","If Default job is set to Farmer/Lumberjack for Carnivore/Kindling Kindred, it will be changed to Unemployed upon adding those traits.","Fixed bug where gaining Carnivore and having no Grain Mills would make Smokehouses unpurchasable until refresh.","Cargo Yard now requires the construction of a Transfer Station to be unlocked.","Mitosis/Metaphase effect now appears on perks list."]},{version:"0.7.21",date:"1/28/2020",changes:["More bug fixes."]},{version:"0.7.20",date:"1/20/2020",changes:["Bug Fixes by Beorseder.","Fixed bug where purchasing Multicellular would double DNA generation from Nuclei instead of Bilateral Symmetry/Poikilohydric/Spores.","New population from the Infectious trait now go into the set Default job, instead of always Unemployed.","Controlled Mutation will no longer offer conflicting traits."]},{version:"0.7.19",date:"1/14/2020",changes:["Bug Fixes."]},{version:"0.7.18",date:"1/12/2020",changes:["Theocracy temple bonus raised from 5% to 12%.","Technocracy knowledge discount raised from 5% to 8%.","Corpocracy Casino Bonus raised from +100% to +200%.","Corpocracy Luxury Good Bonus raised from +50% to +150%.","Corpocracy Tourism Bonus raised from +50% to +100%.","Corpocracy morale penalty lowered from -15% to -10%.","Corpocracy Manufacturing Bonus raised from +15% to +20%.","Miner's Dream now scales the information that is revealed depending on the star level of the achievement.","Slaves now appear as a resource.","Alternate universes now award icons for complex achievements."]},{version:"0.7.17",date:"1/9/2020",changes:["Fixed an issue with displaying foreign powers in civics tab on unlock."]},{version:"0.7.16",date:"1/8/2020",changes:["Exploration Missions can be queued again.","The game will now notify the user if the current version is out of date.","Changes by Beorseder.","Geology deposit aesthetic changes on planet selection.","Miner's Dream Achievement & Perk."]},{version:"0.7.15",date:"1/7/2020",changes:["Queueing the World Collider will no longer lag the game.","Multi-segment projects will now have extra segments cleared from the queue on completion.","Spy and Government related popovers that would sometimes get stuck open will now clear.","Queued projects that will not complete due to lack of production will now display a green [Never] instead of -1 second timer.","Multi-segment projects no longer block queueing ARPA projects unless they consumed the entire queue space."]},{version:"0.7.14",date:"12/31/2019",changes:["Research Categorization option by Naryl."]},{version:"0.7.13",date:"12/30/2019",changes:["Gene decay will no longer result in a negative plasmid count.","Gene fortification is slightly more effective."]},{version:"0.7.12",date:"12/19/2019",changes:["Gene Fortification.","Fixed Cultural Supremacy popover."]},{version:"0.7.11",date:"12/15/2019",changes:["Decaying resources will now use a warning color if you are losing that resource but at a slower rate then the decay rate.","The most bottlenecked resource will now display in red while other trouble resources will be marked with an alert color.","CRISPR upgrades are now darkened when unaffordable.","Transfer Station now lists its uranium storage.","Wendigo bug fixes."]},{version:"0.7.10",date:"12/12/2019",changes:["Craftsman now continuously output product instead of once/twice a month.","Cumulative achievements now check for lower tier unlocks."]},{version:"0.7.9",date:"12/7/2019",changes:["Many bug fixes."]},{version:"0.7.8",date:"12/6/2019",changes:["The default job can now be set to: Unemployed, Farmer, Lumberjack, Quarry Worker, or Scavenger.","New line of feats for achievement hunting.","Novice Perk.","Journeyman Perk."]},{version:"0.7.7",date:"12/5/2019",changes:["Super projects now queue in larger batches.","Super projects now only report completion by the queue if actually complete instead of for each segment constructed."]},{version:"0.7.6",date:"12/2/2019",changes:["Adjacent queue items of the same type will now combine.","Architect now doubles queue sizes instead of adding a flat +2.","Misc minor bug fixes."]},{version:"0.7.5",date:"11/28/2019",changes:["Queueing 2x or more of the same building in a row will now stack them in the queue.","Queue timer now adjusts for cost creep.","ARPA Projects can now be queued.","Fixed a bug that could break the game when Yeti or Wendigo unlocked the genetics lab."]},{version:"0.7.4",date:"11/27/2019",changes:["Wendigo can now build hunting lodges.","Trade route prices are now tracked to 1 decimal.","Elusive spies will no longer be killed when they fail a mission.","Disruptor Rifles now require researching Quantum Entanglement."]},{version:"0.7.3",date:"11/26/2019",changes:["Night Theme trade volume control made more night theme friendly.","Contrast improvements for Night and R/G Theme."]},{version:"0.7.2",date:"11/24/2019",changes:["New market buy/sell volume control.","Large Trade upgrade now raises the buy/sell cap to 5,000.","Massive Trades upgrade now raises the buy/sell cap to 1,000,000.","Various bug fixes by Beorseder."]},{version:"0.7.1",date:"11/23/2019",changes:["Garrison controls reintegrated into government section.","Mutation plasmids now track correctly in no plasmid challenge runs.","Fixed many issues with foreign power name generation.","Feat star icon is no longer tiny."]},{version:"0.7.0",date:"11/21/2019",changes:["Establish a Government.","Battle rival cities.","Biome races added for Forest, Desert, Tundra, and Volcanic.","New ARPA Project: Railway.","New CRISPR upgrades: Mitosis & Metaphase.","Construct advanced AI stations in deep space.","Rapid Gene Sequencing upgrade.","Civics tab split into Government, Industry, and Military sections.","Inspiration no longer adds an upfront knowledge bonus.","Vigilante requirement lowered to 12.","Xenophobic replaced with Wasteful.","Added Rocky Road Feat.","Configurable number notations."]},{version:"0.6.27",date:"11/12/2019",changes:["Tundra planets are now always cold in winter.","Volcanic planets are now always hot in summer.","Stormy planets are now more likely to be windy.","Fixed issue with last rites not showing up as affordable.","2-4x Challenge Multipliers changed:.","2 Challenges: +12% Prestige.","3 Challenges: +25% Prestige.","4 Challenges: +45% Prestige.","Heavy Universe prestige bonus now scales with challenge level:.","0 Challenges: +5% Prestige.","1 Challenge: +10% Prestige.","2 Challenges: +15% Prestige.","3 Challenges: +20% Prestige.","4 Challenges: +25% Prestige."]},{version:"0.6.26",date:"11/7/2019",changes:["ARPA costs now update without mousing off and back on the buttons.","Fixed issues with incorrectly powering on newly built structures.","None-demonic evil smelters now correctly state they burn 1 flesh/s.","Added whitehole perk to stats page."]},{version:"0.6.25",date:"11/2/2019",changes:["Geology bonus is now preserved on MAD reset.","Key Mappings are now configurable for multiplier and queue keys."]},{version:"0.6.24",date:"10/31/2019",changes:["The Halloween feat will now unlock inside a micro universe."]},{version:"0.6.23",date:"10/28/2019",changes:["Exotic mass now counts towards Galactic Landfill and Supermassive.","Fixed issues with queue timers and kindling kindred trait.","Dark Energy now applies to windmills in antimatter universe."]},{version:"0.6.22",date:"10/26/2019",changes:["Game optimizations.","Bug fixes for queues.","Fixed bug with war droids."]},{version:"0.6.21",date:"10/24/2019",changes:["Freight Train upgrade now adds a trade route to freight yards instead of trade posts.","Toxic troll achievement.","Spatial reasoning rounding fix."]},{version:"0.6.20",date:"10/21/2019",changes:["Fixed application of plasmids with antiplasmids.","Updated description of bleeding effect.","Added achievement for synthesizing an anti-plasmid.","More readable achievement page."]},{version:"0.6.19",date:"10/20/2019",changes:["Fixed power errors with hell dimension turrets.","Crate/Container rounding is now applied after spatial reasoning.","Added extra text to the asteroid belt description to call out the necessity of assigning space miners.","Evil Ents can now burn flesh in the smelter."]},{version:"0.6.18",date:"10/16/2019",changes:["Swarm Satellite redesign.","Swarm Satellites cost and output decreased.","Control Stations can now control 10/18 swarm satellites.","Iron mining ship swarm plant discount now applies to all swarm plant costs.","New upgrades to increase output of swarm satellites."]},{version:"0.6.17",date:"10/14/2019",changes:['"Q" key now works with research queue.',"Added settings option to not enforce queue order.","Decay challenge no longer shows the star level for Joyless.","All universe types can now be seen on achievements.","Genus completion is now marked on sentience.","Challenges can now be toggled during evolution.","Inspiration event now gives a temporary buff to all science production.","Added Slave Market for slaver races to buy slaves as an alternative to catching them.","Added Crate/Container storage amount to the build crate/container tooltip.","Added a button to cancel all trade routes for each resource."]},{version:"0.6.16",date:"10/13/2019",changes:["Employment is now color coded depending on staffing levels.","GPS satellites now add additional trade routes.","Added stats tracking on reset mechanics used.","Added a message when completing the launch facility.","Added icons to challenges and races in evolution stage to indicate level of challenge completion."]},{version:"0.6.15",date:"10/11/2019",changes:["Added a settings option to disable the queue hot key.","The queue hot key is now disabled by default because it breaks the game for some users."]},{version:"0.6.14",date:"10/9/2019",changes:["Fixed several bugs with celestial races.","Only one demonic invasion event is now required to reach a hellscape planet.","New city categorization can now be switched off in the settings tab.","Holding Q while clicking a building will now queue it instead of constructing it."]},{version:"0.6.13",date:"10/7/2019",changes:["Fixed bioseed reset bug when seeding from a planet without a special property."]},{version:"0.6.12",date:"10/6/2019",changes:["Added a hire merc option to fortress, mercs hired here go directly to the fortress.","Default patrol size is now 10 instead of 4.","Adjusted margins in city tab/space tabs to slightly reduce vertical scrolling.","New Tower of Babel flair."]},{version:"0.6.11",date:"10/5/2019",changes:["New planetary modifiers: Toxic, Mellow, Rage, Stormy, Ozone, Magnetic, and Trashed.","City Categorization by NotOats.","Chinese Translation."]},{version:"0.6.10",date:"10/1/2019",changes:["Fixed issue with gene editing costing the wrong type of Plasmid.","Fixed Bone label in Graphene plant.","Fixed issue with Plywood not unlocking when removing Kindling Kindred trait."]},{version:"0.6.9",date:"9/30/2019",changes:["Antimatter Universe.","Bleeding Effect line of CRISPR upgrades, requires Anti-Plasmids to unlock.","Balorg can now unlock queues.","Fixed aria labels in mass ejector."]},{version:"0.6.8",date:"9/24/2019",changes:["Queue reordering no longer swaps the dragged item with the one in the target spot.","Added timers to research queue.","Cost adjustments are now applied to queue timers increasing their accuracy."]},{version:"0.6.7",date:"9/24/2019",changes:["Cath windmills now generate power instead of just looking pretty.","Fixed Spanish strings file, language now loads again."]},{version:"0.6.6",date:"9/23/2019",changes:["Added special tech tree to sacrificial altar to boost its effectiveness per sacrifice.","Restored windmills to cath.","Challenge Multiplier Dark Energy rounding calculation fixed.","Added extra information to blackhole description when it reaches destabilization point.","Added a warning to stabilize option that it will reset your exotic matter."]},{version:"0.6.5",date:"9/21/2019",changes:["Fixed display issue with frenzy appearing to never drop below 1%.","Updated the tooltip values on farms and farmers to include the hellscape penalty.","Fixed Evil Ents so they start with Gather Stone option."]},{version:"0.6.4",date:"9/19/2019",changes:["Fixed double windmill issue with evil universe races.","Spanish language updates.","Added warnings to challenge modes in micro universe that you will not receive credit."]},{version:"0.6.3",date:"9/17/2019",changes:["Restored broken perks."]},{version:"0.6.2",date:"9/17/2019",changes:["Bug Fixes."]},{version:"0.6.1",date:"9/17/2019",changes:["Universe Update, explore ~~ 4 ~~ 3 new universe types:.","Heavy Gravity Universe.","Micro Universe.","Evil Universe.","New Decay Challenge.","Antimatter universe is still forming, coming soon.","Dark Energy effects added, unique per universe type.","New Plasmid scaling formula.","Blackhole mass added to Stellar Engine.","Stuff I probably forgot about."]},{version:"0.5.18",date:"9/11/2019",changes:["Spanish translation provided by RanaPeluda.","Fixed Ent fanaticism.","Modals are no longer unnecessarily wide.","Smelter modal now shows the fuel production for each type."]},{version:"0.5.17",date:"9/5/2019",changes:["Mantis Frail trait replaced with new Cannibalize trait, eat your own citizens for buffs.","The Fortress will now remember the number of troops assigned to it and attempt to keep it at that level."]},{version:"0.5.16",date:"9/3/2019",changes:["Made some adjustments to Soul Gem drop odds.","Added a message when you discover your first Soul Gem."]},{version:"0.5.15",date:"9/1/2019",changes:["Portuguese translations updated by Rodrigodd."]},{version:"0.5.14",date:"9/1/2019",changes:["Buildings will no longer be added to the queue if holding down a multiplier key.","Fixed a problem with smelters that could cause their production to become stuck in a high state.","Fixed initial display state of containers in storage management tab."]},{version:"0.5.13",date:"8/30/2019",changes:["New layout for selecting challenge genes/modes during end of evolution stage.","Fixed bug with low support elerium miners that caused them to miscalculate miner outputs.","Added a threat level warning to fortress."]},{version:"0.5.12",date:"8/30/2019",changes:["Pacifist Achievement is now unlocked by unifying without ever initiating an attack."]},{version:"0.5.11",date:"8/28/2019",changes:["Fixed issue with nucleus DNA bonus not applying from correct cell stage evolutions.","Building timers now count down without refreshing the popover.","Long action titles will now wrap instead of overflowing the button.","Fixed a bug that could cause the research queue to clear items from the building queue."]},{version:"0.5.10",date:"8/28/2019",changes:["Fixed bug with some construction projects not refreshing the page after being built with the queue.","Space exploration missions can no longer be queued more then once at a time.","One off projects are now removed from the queue if completed manually.","Queue timers now track crafted resources.","Demonic attractor soul gem drop rate increase buffed from 5% to 8%.","Updated some fortress related tooltips.","Mousing over the star rating in the top left corner now lists which challenges are active.","Time until ready added to unaffordable actions."]},{version:"0.5.9",date:"8/27/2019",changes:["Active build queues wiped due do internal game breaking format change."]},{version:"0.5.8",date:"8/27/2019",changes:["Construction timers added to build queue.","Construction and research completed by queues are now logged to the message list.","Improved drag and drop support for queues."]},{version:"0.5.7",date:"8/25/2019",changes:["Drag support for queue sorting.","Fixed resource display bug that occurred when buying a mass ejector.","Minor traits now show the number of ranks from phage or genes spent."]},{version:"0.5.6",date:"8/23/2019",changes:["Building queue now works in space.","Added a separate research queue.","Fixed rock quarry awarding 4% stone bonus instead of the stated 2%.","Fixed rendering bugs with the blackhole and mass ejector."]},{version:"0.5.5",date:"8/22/2019",changes:["Bug Fixes for queueing system."]},{version:"0.5.4",date:"8/22/2019",changes:["Building Queue system v1.0.","Urban Planning, Zoning Permits, and Urbanization queue related techs.","New CRISPR upgrades for enhanced queueing."]},{version:"0.5.3",date:"8/20/2019",changes:["Stats and Achievements separated into separate sub tabs.","Disruptor rifle upgrade for soldiers.","Mass Ejector can no longer be unlocked before completing the Stellar Engine."]},{version:"0.5.2",date:"8/20/2019",changes:["Fixed misnamed mantis trait key.","Fixed Iron smelter paying out 10x intended amount."]},{version:"0.5.1",date:"8/20/2019",changes:["Disappearing craftsman fix."]},{version:"0.5.0",date:"8/19/2019",changes:["Interstellar space is now unlockable.","Interdimensional travel is now unlockable.","New management tab for Crates & Containers.","Power generation breakdown.","Improved resource breakdown layout.","Leathery trait buffed.","Chameleon trait now adds a combat rating bonus.","Optimistic now also applies to the minimum morale rating.","Smarter Smelter fuel switching.","New CRISPR unlocks."]},{version:"0.4.42",date:"8/16/2019",changes:["Fixed some screen reader issues with the crate modal launch button.","Added a warning to the Genetic Dead End challenge if you are on a hellscape planet."]},{version:"0.4.41",date:"8/15/2019",changes:["Joyless Challenge.","??? - Nothing to see here, move along."]},{version:"0.4.40",date:"8/9/2019",changes:["Changed No Crispr gene into the Weak Crispr gene."]},{version:"0.4.39",date:"8/6/2019",changes:["Genetic Disaster Challenge."]},{version:"0.4.38",date:"8/5/2019",changes:["Special action icon is now properly flagged as a button."]},{version:"0.4.37",date:"7/31/2019",changes:["ARIA Improvements for Factory and A.R.P.A."]},{version:"0.4.36",date:"7/27/2019",changes:["Slow and Hyper traits can now combine.","Added new achievements: Creator & Explorer.","Added perks for Mass Extinction, Creator, and Explorer."]},{version:"0.4.35",date:"7/25/2019",changes:["Centaur can now pick Fanaticism.","Challenge multiplier is now applied to phage gain."]},{version:"0.4.34",date:"7/23/2019",changes:["Fixed SR descriptions of buildings that lack affordability.","Fixed resource highlighting of buildings that have zero costs."]},{version:"0.4.33",date:"7/23/2019",changes:["Fixes for Ent Fanaticism not releasing some resources.","Aria improvements for the smelter modal.","Improved screen reader resource affordability description of buildings/research.","Resource highlighting on structures."]},{version:"0.4.32",date:"7/21/2019",changes:["Balorg slaver trait added.","Ziggurat bonus now applies to the oil extractor.","Geology Oil rich/poor no longer applies to oil extractor.","Added resource alternate row coloring.","Added an affordability hint for screen readers.","Fixed some bugs with awarding a random minor trait from fanaticism.","Dimensional Compression now charges the correct cost."]},{version:"0.4.31",date:"7/20/2019",changes:["Extreme Dazzle casino upgrade.","Metallurgist minor trait, buffs alloy.","Gambler minor trait, buffs casinos.","A.R.P.A. projects now use resource approximations for large numbers.","Cement Factory renamed to Cement Plant to reduce confusion with the regular Factory.","Key multipliers now work inside the factory modal.","Imps and Balorg now have access to advanced crafting tech.","Imps and Balorg now have access to windmills.","Balorg can now set their taxes below 10% and above 30%."]},{version:"0.4.30",date:"7/19/2019",changes:["Portuguese translation by Rodrigodd.","DNA Sequencer upgrade.","Gene Assembly cost increase to 200k.","Synthesis now applies a bonus to auto crafted genes.","Ambidextrous buffed.","Ambidextrous now has a greater effect on auto crafting."]},{version:"0.4.29",date:"7/18/2019",changes:["Genetic modification system, customize your race with minor traits.","Shotgun Sequencing upgrade for genome research.","Randomly gained minor traits will no longer stack unless they have all been unlocked.","Genes are now gained from random mutations.","Synthesis line of CRISPR upgrades.","Satellite and Observatory cost reductions.","Fibroblast minor trait.","Iridium is now unlocked by constructing an iridium mine instead of the moon base.","Helium-3 is now unlocked by constructing a helium-3 mine instead of the moon base.","Genome sequencing now defaults to on when first unlocked."]},{version:"0.4.28",date:"7/16/2019",changes:["Added missing hellscape achievement.","Fixed spatial reasoning and phage interaction.","Fixed warmonger unlocking requirement."]},{version:"0.4.27",date:"7/13/2019",changes:["Added special action description buttons for screen readers."]},{version:"0.4.26",date:"7/12/2019",changes:["Unlocked CRISPR upgrades are now listed as perks.","Control/Shift/Alt click now works with power on and off buttons."]},{version:"0.4.25",date:"7/11/2019",changes:["Quantum Manufacturing upgrade.","Quantum Swarm cost lowered from 465k to 450k."]},{version:"0.4.24",date:"7/10/2019",changes:["Thermomechanics upgrade for alloy production.","Ziggurats unlockable via ancients upgrade.","Cement factory has a more clear label in breakdown lists."]},{version:"0.4.23",date:"7/7/2019",changes:["Resources at the millions breakpoint and above are now shown with 2 significant decimal points.","Reduced the creep cost of Observatory.","Reduced the base knowledge cost of Observatory.","Reduced the Brick cost of Boot Camps.","Evil has been unleashed."]},{version:"0.4.22",date:"7/6/2019",changes:["Fixed issue with having exactly 251 Plasmids that would break your resources.","Fixed issue with planet generation that caused it to always use the same seed."]},{version:"0.4.21",date:"7/6/2019",changes:["Fixed unlocking of mass extinction achievement.","Fixed potential fuel consumption bug with power plants."]},{version:"0.4.20",date:"7/4/2019",changes:["Phage can now be earned from space resets, phage extends the plasmid diminishing return breakpoint.","Dimensional Warping crispr upgrade, applies phages to spatial reasoning.","Added special windmill tech for carnivore path to equalize power grid.","Space Stations now give 5 Elerium storage instead of 4."]},{version:"0.4.19",date:"7/2/2019",changes:["Fixed bugs with the hell planet and gas planet survey mission.","Fixed bug that prevented the planet description tooltip from triggering.","Aluminium now properly requires you to build a metal refinery."]},{version:"0.4.18",date:"7/1/2019",changes:["Planets choice now has more depth to it, each planet can be poor or rich in various resource types.","A mineral poor planet suffers anywhere from 1 to 10% penalty for that resource.","A mineral rich planet gains anywhere from 1 to 20% bonus for that resource.","The fire event no longer triggers for aquatic races.","The first interstellar probe now contributes to the number of potential target worlds.","All interstellar space probe costs are now cheaper."]},{version:"0.4.17",date:"6/29/2019",changes:["Added indication of current challenge level to top bar.","Added H tags for accessibility."]},{version:"0.4.16",date:"6/28/2019",changes:["New Hospital, heals wounded soldiers faster.","New Boot Camp, train new soldiers quicker.","Lowered research cost of Mass Driver from 170k to 160k.","Lowered Iridium cost of Mass Drivers.","Updated Mass Extinction unlock requirement."]},{version:"0.4.15",date:"6/28/2019",changes:["Global bonuses are now multiplicative instead of additive.","Decreased base Elerium cost of Exotic Lab by 4.","Creative trait decreases cost creep instead of providing a flat discount.","ARPA 100% button replaced with remaining percentage value.","New experimental military advice."]},{version:"0.4.14",date:"6/27/2019",changes:["Statues now cost Aluminium instead of Wrought Iron.","Nav Beacon now costs Aluminium instead of Iron.","Helium-3 Mine now costs Aluminium instead of Copper.","Elerium Mining Ship now costs Titanium instead of Iridium.","Iron Mining Ship now costs Aluminium instead of Titanium.","Dimension Compression upgrade now works correctly.","Aluminium can now be looted from battle."]},{version:"0.4.13",date:"6/26/2019",changes:["Aluminium resource added to the game, research Bayer Process to unlock Metal Refinery which in turn unlocks Aluminum.","New Metal Refinery structure for producing Aluminium.","Alloy is now made out of Aluminium and Copper.","Sheet Metal is now made out of Aluminium.","Oil Powerplant and Propellant Depot now cost Aluminium instead of Steel.","Some minor accessibility improvements."]},{version:"0.4.12",date:"6/24/2019",changes:["Blackhole achievement now gives a permanent perk for completing it, the perk strength depends on the achievement level.","Fixed issue with event timer being frozen after changing planets.","Fixed the unlocking of upgraded versions of some achievements.","Cost descriptions now show approximations above 10,000."]},{version:"0.4.11",date:"6/24/2019",changes:["Re-evaluated starvation breakpoint.","Added Infested Terran achievement.","Titanium price is now reset after unlocking Hunter Process.","Resources now have a 25% chance of their market price changing per day, up from 10%."]},{version:"0.4.10",date:"6/23/2019",changes:["Fixed stats tracking on demonic invasions so it actually tracks new invasions."]},{version:"0.4.9",date:"6/23/2019",changes:["Fabrication facilities now increase craftsman cap.","Added stats tracking on demonic invasions.","Detail Oriented buffed to 50% from 33%.","Rigorous buffed to 100% from 66%.","Crafting bonus now shown for each resource.","Temple Faith bonus now applies to crafting in no plasmid challenge mode.","Mastery bonus now applies to crafting."]},{version:"0.4.8",date:"6/22/2019",changes:["Fixed a bug that removed MAD when achieving unification.","Fixed missing options in evolution stage with picking avians after space reset."]},{version:"0.4.7",date:"6/21/2019",changes:["Activating challenge genes now provide a bonus to the number of plasmids earned."]},{version:"0.4.6",date:"6/21/2019",changes:["Reduced Nano Tube and Neutronium costs of bioseeder ship.","Reduced Mythril cost of Space Probes."]},{version:"0.4.5",date:"6/19/2019",changes:["Mastery Bonus now unlockable in CRISPR.","Fixed bug with elerium mining that could cause negative mining when you lacked asteroid miners.","Fixed low power warning not clearing when you have no buildings active.","Fixed Sporgar label of Cottages in Steel & Mythril Beams research.","Gene Mutation research will no longer turn off when you run out of knowledge, instead it will pause.","Human creative trait buffed from 2% to 5%.","Troll regenerative trait buffed to heal 4 wounded per day instead of 2.","Ogre tough trait buffed to 25% from 10%.","Gecko optimistic trait buffed to 10% from 2%.","Arraak resourceful trait buffed from 5% to 10%.","Dracnid hoarder trait buffed from 10% to 20%.","Shroomi toxic trait buffed from 10% to 25%.","Wolven pack mentality trait now applies to apartments.","Reduced Nano Tube cost of Mining Drones."]},{version:"0.4.4",date:"6/18/2019",changes:["Matter compression now applies to Wharves.","Xenophobia now applies to Wharves.","Plasmids earned by mutation now apply to no plasmid challenge run.","Reduced Nano Tube cost of Mining Drones."]},{version:"0.4.3",date:"6/17/2019",changes:["Challenge mode achievement tracking.","Vocational Training for craftsman.","Spelling and grammar fixes.","Fixed incorrect reject unity reward text."]},{version:"0.4.2",date:"6/16/2019",changes:["Added some clarification to breakdown of stress."]},{version:"0.4.1",date:"6/16/2019",changes:["Fixed a bug with factories converted from some pre 0.4.0 save files."]},{version:"0.4.0",date:"6/16/2019",changes:["Space reset option, control the destiny of your next race.","Challenge Modes.","New Stuff to discover.","New Achievements to unlock.","Added missing Cyclops racial trait.","World Domination, maybe.","Added soft reset option."]},{version:"0.3.12",date:"6/11/2019",changes:["Fixed bug with riot event that caused it to trigger on high morale instead of low morale."]},{version:"0.3.11",date:"6/10/2019",changes:["The Gas Moon and the Dwarf planets are now accessible.","New technologies based on new discoveries made in deep space.","Wharves can now be unlocked after discovering oil.","There is now an alternative method of unlocking steel.","Night Theme updated, popovers are no longer bright.","Trade route tooltips now include money being imported or exported.","New crispr upgrades for crafting.","Warmonger achievement requirement lowered from 10% to 8%."]},{version:"0.3.10",date:"6/9/2019",changes:["Added code to fix peculiar failed space launch game state."]},{version:"0.3.9",date:"6/8/2019",changes:["New official Evolve [Discord](https://discordapp.com/invite/dcwdQEr)."]},{version:"0.3.8",date:"6/7/2019",changes:["Fixed a problem with negative craftsman counts that could result from craftsman dying."]},{version:"0.3.7",date:"6/6/2019",changes:["Warmongering is now tracked and high casualties may impact morale.","Depleting the mercenary pool will temporarily increase their cost.","Three new achievements related to war."]},{version:"0.3.6",date:"6/5/2019",changes:["Fixed issue with production breakdowns not showing when income was only produced by trade.","Fixed issue that prevented affordability check from refreshing on space missions."]},{version:"0.3.5",date:"6/5/2019",changes:["Mythril Craftsman now unlock correctly.","Fixed a bug that could pause the game if you ran out of Titanium."]},{version:"0.3.4",date:"6/4/2019",changes:["The Asteroid Belt is now open for business.","Robotics Upgrades.","Automation renamed to Machinery.","Assembly Line upgrade for factory."]},{version:"0.3.3",date:"6/3/2019",changes:["New Orbit Structure: Navigation Beacon.","New Red Planet Structures: Space Control Tower and Space Factory.","Reduced number of monuments required to unlock tourism from 4 to 2.","Cement plant workers now round their contribution to 2 decimal places.","Red planet mining now correctly attributes to the red planet in breakdowns."]},{version:"0.3.2",date:"6/3/2019",changes:["Fixed bug that would let you launch the space missions without the proper resources, this would corrupt your game file and break the game.","Added code to detect games corrupted by the previous bug and fix them.","Fixed Fanaticism bug that wouldn't release lumberjacks when you have ent gods."]},{version:"0.3.1",date:"6/3/2019",changes:["Added building check redundancy to auto correct game states that shouldn't occur anyway."]},{version:"0.3.0",date:"6/2/2019",changes:["Space V1 Update.","This opens the first steps into space exploration, more to come... this is not the end.","Rebalanced storage caps to help the game feel more idle friendly."]},{version:"0.2.70",date:"6/2/2019",changes:["Fixed bug when picking Fanaticism with cath gods that wouldn't release your farmers.","Fixed bug when upgrading weapon technology that wouldn't immediately show the increase in army rating."]},{version:"0.2.69",date:"5/26/2019",changes:["Fixed bug which could let you get free barn or warehouse upgrade by essentially skipping over the tech.","Added aria button roles to many button like elements that were not technically buttons."]},{version:"0.2.68",date:"5/26/2019",changes:["Fixed bug with Rock Quarry that prevented the 2% bonus from working unless you had electricity unlocked."]},{version:"0.2.67",date:"5/24/2019",changes:["Revamp of farmer, lumberjack, and quarry worker jobs. These govern the most basic materials produced and can now assign as many workers as you like to these positions.","Farms now directly produce food instead of determining farmer cap.","Lumber Yards now increase lumber production instead of governing lumberjack cap.","Rock Quarry now increase stone production instead of governing quarry worker cap.","Sawmill powered on bonus reduced from 5% to 4%.","Rock Quarry powered on bonus reduced from 5% to 4%.","Stock Exchanges no longer cost Knowledge.","Fixed a display bug that could cause farmers to falsely show they produced more food then they actual did."]},{version:"0.2.66",date:"5/22/2019",changes:["Added alternate row coloring to the market to help distinguish rows."]},{version:"0.2.65",date:"5/21/2019",changes:["Sporgar race redesigned into a parasitic race that spreads through infecting victims."]},{version:"0.2.64",date:"5/20/2019",changes:["Currency is now required before unlocking Basic Storage.","Primitive Axes are no longer gated behind Basic Storage.","Foundry now requires Metal Working to unlock and no longer requires Cement.","Research tab now defaults back to new when resetting.","Fixed issue with not being able to buy something if you had consumption on a resource and the cost was the same as your max capacity.","Fixed issue with max affordability check not refreshing on evolution stage.","Experimental Red-Green color blind theme."]},{version:"0.2.63",date:"5/20/2019",changes:["Fixed an issue that accidentally set the default tax rate to 2% instead of 20% for new games."]},{version:"0.2.62",date:"5/19/2019",changes:["Tax system revamped. Taxes can now be adjusted more granularly and effect morale instead of production.","Cement is now a requirement for theology since cement is needed for temples."]},{version:"0.2.61",date:"5/19/2019",changes:["Every genus type now has its own evolution path."]},{version:"0.2.60",date:"5/18/2019",changes:["Rescaled crate/container volumes. There are now substantially less crates/containers but they do a lot more per crate/container.","Spatial Reasoning now correctly applies to crates & containers.","Increased base value of several major storage facilities.","Added storage timers.","A.R.P.A. costs in popover now update their affordability check.","Buildings and Research that can not be afforded due to low capacity are now marked in red text."]},{version:"0.2.59",date:"5/17/2019",changes:["Added additional validation to ensure save strings belong to evolve before importing.","Fixed army rating display when rating doesn't calculate to a whole number.","Fixed listing order of some resources.","Smelter Iron bonus breakdown fixed.","Added Selenophobia to breakdown lists."]},{version:"0.2.58",date:"5/15/2019",changes:["Settings option to disable multiplier keys."]},{version:"0.2.57",date:"5/15/2019",changes:["Added labor validation to coal miners.","Key Multipliers now work with job and trade route assignment."]},{version:"0.2.56",date:"5/15/2019",changes:["Added +- symbols to trade route to distinguish import vs export."]},{version:"0.2.55",date:"5/14/2019",changes:["Manually crafting resources now gets all the same bonuses as auto crafting.","Fixed Recombination crispr upgrade.","Death limits added to each war campaign level.","War assessment added for each war campaign level."]},{version:"0.2.54",date:"5/13/2019",changes:["Uranium Breakdown Fixes."]},{version:"0.2.53",date:"5/13/2019",changes:["Breakdown Accuracy Enhancements.","Some Kindling Kindred costs reduced.","Fixed bug related to Fanaticism and Ent gods with foundry workers assigned to make plywood.","Plasmid bonus now applies to the sundial.","Fixed some spelling errors."]},{version:"0.2.52",date:"5/11/2019",changes:["Completed research can now be viewed on a separate tab under research.","Removed Plywood requirement from Stock Exchange for players with Kindling Kindred trait.","Fixed a CSS issue in the A.R.P.A. projects tab."]},{version:"0.2.51",date:"5/11/2019",changes:["University starts slightly cheaper.","Added Spatial Superiority crispr upgrade.","Added Spatial Supremacy crispr upgrade.","Exporting a save string now automatically selects the text and copies it to the clipboard."]},{version:"0.2.50",date:"5/10/2019",changes:["Added new capacity breakdowns for various resources."]},{version:"0.2.49",date:"5/10/2019",changes:["Added changelog link to version listing.","Added protection against loading a corrupt save string.","Greedy trait is now less greedy.","Spelling error fixes."]},{version:"0.2.48",date:"5/8/2019",changes:["Resources that are at greater then 99% capacity now change color to indicate they are at cap.","Attacks from rival cities should no longer cause more wounded soldiers then you have.","Assigning craftsman when no citizens are free will no longer take the labor from another job."]},{version:"0.2.47",date:"5/8/2019",changes:["Gluttony trait lowered to 10% from 25% .","High Metabolism trait lowered to 5% from 10% .","Fixed Sheet Metal not being added to craftsman list when unlocked."]},{version:"0.2.46",date:"5/8/2019",changes:["The 5% library bonus was only applying to scientists which was not intended. This now applies to the sundial and professors as well."]},{version:"0.2.45",date:"5/8/2019",changes:["Fixed an issue that allowed you to get extra benefits from under-powered wardenclyffe towers and biolabs."]},{version:"0.2.44",date:"5/8/2019",changes:["Fixed Key Multipliers getting stuck down."]},{version:"0.2.43",date:"5/7/2019",changes:["Fixed bug that could cause player to get free extra crafted resources when using the +5 option.","Reordered buildings in Village tab to group them more logically."]},{version:"0.2.42",date:"5/7/2019",changes:["Fixed a bug that was causing soldiers to become immortal.","Fixed some bugs with morale that caused some weather patterns to apply a different value then was reported.","Added weather to Food breakdown."]},{version:"0.2.41",date:"5/7/2019",changes:["Added a 5% bonus to global knowledge production on libraries."]},{version:"0.2.40",date:"5/7/2019",changes:["The Hivemind trait no longer applies to farmers as this was especially punishing."]},{version:"0.2.39",date:"5/7/2019",changes:["Evolution 2.0: Redid the evolution stage of the game to make it feel less tedious and like it matters more to the next phase of the game.","Fixed a bug that has the intended effects of Pessimism and Optimism traits swapped."]},{version:"0.2.38",date:"5/6/2019",changes:["First public release."]}];function Al(r){let a=0;for(a=0;a=0;i--){r.append(`
v${hi[i].version}${hi[i].hasOwnProperty("revision")?hi[i].revision:""} ${hi[i].date} `);for(let s=0;s${hi[i].changes[s]}`)}return r}function Nc(){e.settings.expose&&(window.evolve={actions:Ke(O),races:Ke(F),traits:Ke(b),tradeRatio:Ke(sr),craftCost:Ke(wa()),atomic_mass:Ke(Mt),f_rate:Ke(Be),checkAffordable:Ke(Tt),adjustCosts:Ke(jr),armyRating:Ke(mt),tradeBuyPrice:Ke(Ms),tradeSellPrice:Ke(qs),fuel_adjust:Ke(Fe),int_fuel_adjust:Ke(ze),alevel:Ke(Jt),messageQueue:Ke(I),loc:Ke(t),shipCosts:Ke(Hs),updateDebugData:Ke(Dc),global:{},breakdown:{}})}function Dc(){e.settings.expose&&(window.evolve.global=Ke(e),window.evolve.craftCost=Ke(wa()),window.evolve.breakdown=Ke(v))}$(document).ready(function(){if(window.matchMedia){var r=$('head > link[rel="icon"][media]');$.each(r,function(a,i){var s=window.matchMedia(i.media);function n(){s.matches&&(r.remove(),r=$(i).appendTo("head"))}s.addListener(n),n()})}});var Fl=!1;window.addEventListener("storage",r=>{Fl===!1&&I(t("multitab_warning"),"danger",!0),Fl=!0});e.settings.expose&&Nc();var Pa={showCiv:1,showCivic:2,showResearch:3,showResources:4,showGenetics:5,showAchieve:6,settings:7};$(document).keydown(function(r){r=r||window.event;let a=r.key||r.keyCode;Object.keys(kr).forEach(function(i){a===e.settings.keyMap[i]&&(kr[i]=!0)}),!$("input").is(":focus")&&!$("textarea").is(":focus")&&Object.keys(Pa).forEach(function(i){if(a===e.settings.keyMap[i]&&e.settings.civTabs!==0&&(i==="settings"||e.settings[i])){if(e.settings.civTabs!==Pa[i])e.settings.civTabs=Pa[i];else{let s=e.settings,n=null,c=null;switch(Pa[i]){case Pa.showCiv:n="spaceTabs",c=[s.showCity,s.showSpace,s.showDeep,s.showGalactic,s.showPortal,s.showOuter,s.showTau];break;case Pa.showCivic:n="govTabs",c=["Government",s.showIndustry,s.showPowerGrid,s.showMil,s.showMechLab,s.showShipYard,s.showPsychic];break;case Pa.showResearch:n="resTabs",c=["New","Completed"];break;case Pa.showResources:n="marketTabs",c=[s.showMarket,s.showStorage,s.showEjector,s.showCargo,s.showAlchemy];break;case Pa.showGenetics:s=e.settings.arpa,n="arpaTabs",c=[s.physics,s.genetics,s.crispr,s.blood];break;case Pa.showAchieve:n="statsTabs",c=["Stats","Achievements","Perks"];break;case Pa.settings:default:n="",c=[];break}for(let l=1;l a").html(`v${e.version} Beta ${e.beta}${Rc}`):$("#topBar .version > a").html("v"+e.version+Rc);Vs();e.lastMsg&&Object.keys(e.lastMsg).forEach(function(r){e.lastMsg[r].reverse().forEach(function(a){I(a.m,a.c,!0,[r],!0)}),e.lastMsg[r].reverse()});$("#msgQueue").height(e.settings.msgQueueHeight);$("#buildQueue").height(e.settings.buildQueueHeight);e.queue.rename===!0&&(Qr(!0),e.queue.rename=!1);e.settings.sPackMsg=Se.getItem("string_pack_name")?t("string_pack_using",[Se.getItem("string_pack_name")]):t("string_pack_none");e.queue.display&&zr();e.r_queue.display&&ra();Fo();e.new&&(I(t("new"),"warning",!1,["progress"]),e.new=!1);e.city.mass_driver&&(k.mass_driver=e.city.mass_driver.on);e.portal.turret&&(k.turret=e.portal.turret.on);e.interstellar.fusion&&(bt.fusion=e.interstellar.fusion.on);e.portal.hell_forge&&(k.hell_forge=e.portal.hell_forge.on);e.space.sam&&(k.sam=e.space.sam.on);e.space.operating_base&&(k.operating_base=e.space.operating_base.on,U.operating_base=e.space.operating_base.on);e.space.fob&&(k.fob=e.space.fob.on);e.tauceti.fusion_generator&&(k.fusion_generator=e.tauceti.fusion_generator.on);$i(!0);cn();Zn();na();e.race.shapeshifter&&oa(!1,!0);Object.keys(Xr()).forEach(function(r){xi(r)});Ti();D({el:"#race",data:{race:e.race,city:e.city},methods:{name(){return tt("name")}},filters:{replicate(r){return 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?r+e.race.replicator.pow:r},approx(r){return+r.toFixed(2)},mRound(r){return+r.toFixed(1)}}});pe("race",function(){return typeof F[e.race.species].desc=="string"?F[e.race.species].desc:F[e.race.species].desc()},{elm:"#race > .name"});var Ea=125;pe("morale",function(r){if(e.city.morale.unemployed!==0){let n=e.city.morale.unemployed>0?"success":"danger";r.popper.append(`${t(e.race.playful?"morale_hunter":"morale_unemployed")} ${+e.city.morale.unemployed.toFixed(1)}%
`)}if(e.city.morale.stress!==0){let n=e.city.morale.stress>0?"success":"danger";r.popper.append(`${t("morale_stress")} ${+e.city.morale.stress.toFixed(1)}%
`)}let a=100+e.city.morale.unemployed+e.city.morale.stress;if(Object.keys(e.city.morale).forEach(function(n){if(!["current","unemployed","stress","season","cap","potential"].includes(n)&&e.city.morale[n]!==0){a+=e.city.morale[n];let c=e.city.morale[n]>0?"success":"danger",l=e.city.morale[n];if(n==="entertain"&&e.civic.govern.type==="democracy"){let o=1+$e.democracy()[0]/100;l/=o}if(r.popper.append(`${t(`morale_${n}`)} ${+l.toFixed(1)}%
`),n==="entertain"&&e.civic.govern.type==="democracy"){let o=$e.democracy()[0];r.popper.append(`\u1102${t("govern_democracy")} +${o}%
`)}}}),e.city.morale.season!==0){a+=e.city.morale.season;let n=e.city.calendar.season===0?t("morale_spring"):e.city.calendar.season===1?t("morale_summer"):t("morale_winter"),c=e.city.morale.season>0?"success":"danger";r.popper.append(`${n} ${+e.city.morale.season.toFixed(1)}%
`)}if(e.civic.govern.type==="corpocracy"){let n=$e.corpocracy()[3];a-=n,r.popper.append(`${t("govern_corpocracy")} -${n}%
`)}if(e.civic.govern.type==="republic"){let n=$e.republic()[1];a+=n,r.popper.append(`${t("govern_republic")} +${n}%
`)}if(e.civic.govern.type==="federation"){let n=$e.federation()[1];a+=n,r.popper.append(`${t("govern_federation")} +${n}%
`)}let i=ge("militant",1);if(i&&(a-=i,r.popper.append(`${t("gov_trait_militant")} -${i}%
`)),e.race.cheese){let n=e.stats.hasOwnProperty("reset")?e.stats.reset+1:1,c=+(n/(n+10)*11).toFixed(2);a+=c,r.popper.append(`${ln(!0,!1)} +${c}%
`)}if(e.race.motivated){let n=Math.ceil(e.race.motivated**.4);a+=n,r.popper.append(`${t("event_motivation_bd")} +${n}%
`)}if(e.race.pet&&(a+=1,r.popper.append(`${t(`event_pet_${e.race.pet.type}_owner`)} +1%
`)),e.civic.homeless){let n=e.civic.homeless/2;a-=n,r.popper.append(`${t("homeless")} -${n}%
`)}if(e.tech.vax_c||e.tech.vax_f){let n=e.tech.vax_c?10:50;a-=n,r.popper.append(`${t(e.tech.vax_c?"tech_vax_strat4_bd":"tech_vax_strat2_bd")} -${n}%
`)}else if(e.tech.vax_s){let n=20;a+=n,r.popper.append(`${t("tech_vax_strat3_bd")} +${n}%
`)}e.city.tormented&&(a-=e.city.tormented,r.popper.append(`${t("trait_tormented_name")} -${e.city.tormented}%
`)),a=+a.toFixed(1);let s=$("
");r.popper.append(s),s.append(`${t("morale_total")} ${+a.toFixed(1)}%
`),s.append(`${t("morale_max")} ${+Ea.toFixed(1)}%
`),s.append(`${t("morale_current")} ${+e.city.morale.current.toFixed(1)}%
`)},{classes:"has-background-light has-text-dark"});pe("powerStatus",function(r){let a=+(e.city.power_total-e.city.power).toFixed(2);Object.keys(Ht).forEach(function(s){if(Ht[s]){let n=+Ht[s].toFixed(2);r.popper.append(`${s} +${n}
`)}}),r.popper.append(`${t("power_consumed")} -${a}
`);let i=+e.city.power.toFixed(2);e.city.power>0?r.popper.append(`${t("power_available")} ${i}
`):r.popper.append(`${t("power_available")} ${i}
`)},{classes:"has-background-light has-text-dark"});e.settings.pause?$("#pausegame").addClass("pause"):$("#pausegame").addClass("play");D({el:"#topBar",data:{city:e.city,race:e.race,s:e.settings},methods:{sign(){return gi("sign")},getAstroSign(){return gi("astrology")},weather(){return gi("weather")},temp(){return gi("temp")},moon(){return gi("moon")},showUniverse(){return!(e.race.universe==="standard"||e.race.universe==="bigbang")},showSim(){return!!e.sim},atRemain(){return t("accelerated_time")},pause(){$("#pausegame").removeClass("play"),$("#pausegame").removeClass("pause"),e.settings.pause?(e.settings.pause=!1,$("#pausegame").addClass("play")):(e.settings.pause=!0,$("#pausegame").addClass("pause")),!e.settings.pause&&!Pe.s&&Pr("start")},pausedesc(){return e.settings.pause?t("game_play"):t("game_pause")}},filters:{planet(r){return F[r].home},universe(r){return r==="standard"||r==="bigbang"?"":Rr[r].name},remain(r){let a=Math.ceil(r*yn().longTimer/6e4);if(a>0){let i=Math.floor(a/60);return a-=i*60,`${i}:${a.toString().padStart(2,"0")}`}}}});["astroSign"].forEach(function(r){pe(`${r}`,function(){return gi("sign")},{elm:$(`#${r}`)})});pe("topBarPlanet",function(r){if(e.race.species==="protoplasm")r.popper.append($(`${t("infant")} `));else{let a=F[e.race.species].home,i=tt("name"),s=qe[e.city.biome].label,n=e.city.ptrait;if(n.length>0){let d="";n.forEach(function(h){Re.hasOwnProperty(h)&&(h==="mellow"&&e.race.species==="entish"?d+=`${t("planet_mellow_eg")} `:d+=`${Re[h].label} `)}),s=`${d}${s}`}let c=e.city.calendar.orbit,l=kc(e.city.geology),o="";if(e.race.truepath&&(o=o+`${t("evo_challenge_truepath_recap")}
`),e.race.junker&&(o=o+`${t("evo_challenge_junker_desc")} ${t("evo_challenge_junker_conditions")}
`),e.race.joyless&&(o=o+`${t("evo_challenge_joyless_desc")} ${t("evo_challenge_joyless_conditions")}
`),e.race.steelen&&(o=o+`${t("evo_challenge_steelen_desc")} ${t("evo_challenge_steelen_conditions")}
`),e.race.decay&&(o=o+`${t("evo_challenge_decay_desc")} ${t("evo_challenge_decay_conditions")}
`),e.race.emfield&&(o=o+`${t("evo_challenge_emfield_desc")} ${t("evo_challenge_emfield_conditions")}
`),e.race.inflation&&(o=o+`${t("evo_challenge_inflation_desc")} ${t("evo_challenge_inflation_conditions")}
`),e.race.banana&&(o=o+`${t("evo_challenge_banana_desc")} ${t("wiki_achieve_banana1")}. ${t("wiki_achieve_banana2")}. ${t("wiki_achieve_banana3")}. ${t("wiki_achieve_banana4",[500])}. ${t("wiki_achieve_banana5",[50])}.
`),e.race.witch_hunter&&(o=o+`${t("evo_challenge_witch_hunter_desc")}
`),e.race.nonstandard&&(o=o+`${t("evo_challenge_nonstandard_desc")}
`),e.race.gravity_well&&(o=o+`${t("evo_challenge_gravity_well_desc")}
`),e.race.warlord&&(o=o+`${t("evo_challenge_warlord_desc")}
`),e.race.fasting&&(o=o+`${t("evo_challenge_fasting_desc")}
`),e.race.lone_survivor&&(o=o+`${t("evo_challenge_lone_survivor_desc")}
`),e.race.sludge&&(o=o+`${t("evo_challenge_sludge_desc")} ${t("evo_challenge_sludge_conditions")}
`),e.race.orbit_decay){let d=e.race.orbit_decayed?"":t("evo_challenge_orbit_decay_impact",[e.race.orbit_decay-e.stats.days]),h=e.race.orbit_decayed?t("evo_challenge_orbit_decay_impacted",[F[e.race.species].home]):t("evo_challenge_orbit_decay_desc");o=o+`${h} ${t("evo_challenge_orbit_decay_conditions")} ${d}
`,Nt()>=100&&e.race.universe!=="antimatter"?o=o+`${t("evo_challenge_cataclysm_warn")}
`:o=o+`${t("evo_challenge_scenario_warn")}
`}e.race.cataclysm&&(Nt()>=50&&e.race.universe!=="antimatter"?o=o+`${t("evo_challenge_cataclysm_desc")}
${t("evo_challenge_cataclysm_warn")}
`:o=o+`${t("evo_challenge_cataclysm_desc")}
${t("evo_challenge_scenario_warn")}
`),r.popper.append($(`${t(e.race.cataclysm?"no_home":"home",[a,i,s,c])}
${l}${o}`))}},{elm:"#topBar .planetWrap .planet",classes:"has-background-light has-text-dark"});pe("topBarUniverse",function(r){r.popper.append($(`${Rr[e.race.universe].desc}
`)),r.popper.append($(`${Rr[e.race.universe].effect}
`))},{elm:"#topBar .planetWrap .universe",classes:"has-background-light has-text-dark"});pe("topBarSimulation",function(r){r.popper.append($(`${t("evo_challenge_simulation_topbar")}
`))},{elm:"#topBar .planetWrap .simulation",classes:"has-background-light has-text-dark"});e.race.orbit_decay&&!e.race.orbit_decayed&&pe("infoTimer",function(){return e.race.orbit_decayed?"":t("evo_challenge_orbit_decay_impact",[e.race.orbit_decay-e.stats.days])},{elm:"#infoTimer",classes:"has-background-light has-text-dark"});es();if(e.race.species==="protoplasm"){e.resource.RNA.display=!0;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):0;if(e.sim&&(r=5),r>0&&!e.evolution.mloaded){let i=["dna","membrane","organelles","nucleus","eukaryotic_cell","mitochondria"];for(let s=0;s0?Math.min(e.stats.achieve.corrupted.l,e.stats.feat.grandmaster):0;e.sim&&(a=5),a>=5&&!e.evolution.gmloaded&&(e.tech.evo=6,e.evolution.gselect=!0,e.evolution.gmloaded=1,e.evolution.final=80,e.tech.evo_humanoid=1,e.tech.evo_giant=1,e.tech.evo_small=1,e.tech.evo_animalism=2,e.tech.evo_demonic=1,e.tech.evo_angelic=1,e.tech.evo_insectoid=1,e.tech.evo_eggshell=2,e.tech.evo_eldritch=1,e.tech.evo_sand=1,e.tech.evo_polar=1,e.tech.evo_heat=1,e.tech.evo_fey=1,e.tech.evo_aquatic=1),e.race.universe==="bigbang"?(e.seed=e.race.seed,Bo()):e.race.seeded&&!e.race.chose?(e.seed=e.race.seed,nc()):Gr()}else e.portal.hasOwnProperty("soul_forge")&&e.portal.soul_forge.on&&(k.soul_forge=1),Sn();Il(!0);$("#lbl_city").html("Village");window.Worker&&(Pe.w=new Worker("evolve/evolve.js"),Pe.w.addEventListener("message",function(r){var a=r.data;switch(a){case"fast":Z0();break;case"mid":J0();break;case"long":X0();break}},!1));Pr("start");Ll();var zl=!0,wn=e.arpa.sequence&&e.arpa.sequence.on?e.arpa.sequence.on:0;function Z0(){e.race.no_craft||$(".craft").each(function(S){typeof $(this).data("val")=="number"&&$(this).html(Ee($(this).data("val")*fe(),1))});let r=new Date,a=ma();v.p.Global={};var i=1;let s=!1,n=Vi("raw");if(e.prestige.Plasmid.count>0&&(e.race.universe!=="antimatter"||e.genes.bleed&&e.race.universe==="antimatter")&&(v.p.Global[t("resource_Plasmid_name")]=n[1]*100+"%",s=!0),e.prestige.AntiPlasmid.count>0&&(e.race.universe==="antimatter"||e.genes.bleed&&e.genes.bleed>=2&&e.race.universe!=="antimatter")&&(v.p.Global[t("resource_AntiPlasmid_name")]=n[2]*100+"%",s=!0),s&&(i+=n[0]),(e.race.no_plasmid||e.race.universe==="antimatter")&&((e.race.cataclysm||e.race.orbit_decayed)&&e.space.ziggurat&&e.space.ziggurat.count||e.city.temple&&e.city.temple.count)){let S=gc();v.p.Global[t("faith")]=S*100+"%",i*=1+S}if(e.race.untapped&&e.race.untapped>0){let S=+(e.race.untapped/(e.race.untapped+20)/10+24e-5).toFixed(4);v.p.Global[t("trait_untapped_bd")]=`${S*100}%`,i*=1+S}if(e.race.rainbow_active&&e.race.rainbow_active>1&&(v.p.Global[t("trait_rainbow_bd")]=`${b.rainbow.vars()[0]}%`,i*=1+b.rainbow.vars()[0]/100),e.tech.world_control){let S=25;e.civic.govern.type==="federation"&&(S=$e.federation()[2]),e.race.unified&&(S+=b.unified.vars()[0]),a==="taurus"&&(S+=Zt("taurus")[0]),v.p.Global[t("tech_unification")]=`${S}%`,i*=1+S/100}else{let S=0;for(let Q=0;Q<3;Q++)(e.civic.foreign[`gov${Q}`].occ||e.civic.foreign[`gov${Q}`].anx||e.civic.foreign[`gov${Q}`].buy)&&(S+=e.civic.govern.type==="federation"?5+$e.federation()[0]:5);S>0&&(v.p.Global[t("civics_garrison_occupy")]=`${S}%`,i*=1+S/100)}if(e.genes.challenge&&e.genes.challenge>=2){let S=Nt();v.p.Global[t("mastery")]=S+"%",i*=1+S/100}if(e.pillars){let S=ea();v.p.Global[t("harmonic")]=`${(S[0]-1)*100}%`,i*=S[0]}if(e.race.ascended&&(v.p.Global[t("achieve_ascended_name")]="5%",i*=1.05),e.race.corruption){let S=e.race.corruption*2;v.p.Global[t("achieve_corrupted_name")]=`${S}%`,i*=1+S/100}if(e.race.rejuvenated){let S=e.stats.days<996?(1e3-e.stats.days)/2e3:.02;v.p.Global[t("rejuvenated")]=`${S*100}%`,i*=1+S}let c=ve("octigoran");if(e.race.suction_grip||c>0){let S=0;e.race.suction_grip&&(S+=b.suction_grip.vars()[0]),c>0&&(S+=+(b.suction_grip.vars(1)[0]*c).toFixed(2)),v.p.Global[t("trait_suction_grip_bd")]=S+"%",i*=1+S/100}let l=ve("cyclops");if(e.race.intelligent||l>0){let S=0;e.race.intelligent&&(S+=ye(e.civic.scientist.workers,"scientist")*b.intelligent.vars()[1]+ye(e.civic.professor.workers,"professor")*b.intelligent.vars()[0]),l>0&&(S+=ye(e.civic.scientist.workers,"scientist")*b.intelligent.vars(1)[1]*l+ye(e.civic.professor.workers,"professor")*b.intelligent.vars(1)[0]*l),e.race.high_pop&&(S=xe(S)),v.p.Global[t("trait_intelligent_bd")]=S+"%",i*=1+S/100}if(e.race.slaver&&e.city.slave_pen&&e.city.slave_pen){let S=e.resource.Slave.amount*b.slaver.vars()[0];v.p.Global[t("trait_slaver_bd")]=S+"%",i*=1+S/100}if((e.city.ptrait.includes("trashed")||e.race.scavenger||e.race.servants&&e.race.servants.force_scavenger)&&e.civic.scavenger){let S=e.city.ptrait.includes("trashed")||e.race.scavenger?ye(e.civic.scavenger.workers,"scavenger"):0;if(e.race.servants&&(S+=N(e.race.servants.jobs.scavenger)),S>0){let Q=S*b.scavenger.vars()[0];e.city.ptrait.includes("trashed")&&e.race.scavenger&&(Q*=1+b.scavenger.vars()[1]/100),e.city.ptrait.includes("trashed")&&(Q*=Re.trashed.vars()[1]),e.race.high_pop&&(Q=xe(Q)),v.p.Global[t("job_scavenger")]=Q+"%",i*=1+Q/100}}if(e.race.unfathomable&&e.city.surfaceDwellers&&e.city.captive_housing){let S=0,Q=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;if(e.city.hasOwnProperty("surfaceDwellers")){for(let V=0;Ve.civic.torturer.workers*Q/2){let V=S-e.civic.torturer.workers*Q/2;S-=Math.ceil(V/3)}}if(S>0){let V=S*b.unfathomable.vars()[2]*Q/5;e.race.psychic&&(V*=1+b.psychic.vars()[1]/100),v.p.Global[t("trait_unfathomable_bd")]=V+"%",i*=1+V/100}}if(e.city.ptrait.includes("mellow")&&(v.p.Global[t("planet_mellow_bd")]="-"+(100-Re.mellow.vars()[2]*100)+"%",i*=Re.mellow.vars()[2]),e.city.ptrait.includes("ozone")&&e.city.sun){let S=e.city.sun*Re.ozone.vars()[0];v.p.Global[t("planet_ozone_bd")]=`-${S}%`,i*=1-S/100}let o=ve("phoenix");if((e.race.smoldering||o>0)&&e.city.hot){let S=0;e.race.smoldering&&(e.city.hot>100?(S+=100*b.smoldering.vars()[1],S+=(e.city.hot-100)*b.smoldering.vars()[2]):S+=e.city.hot*b.smoldering.vars()[1]),o>0&&(e.city.hot>100?(S+=100*b.smoldering.vars(.25)[1]*o,S+=(e.city.hot-100)*b.smoldering.vars(.25)[2]*o):S+=e.city.hot*b.smoldering.vars(.25)[1]*o),v.p.Global[t("trait_smoldering_name")]=`${S}%`,i*=1+S/100}if(e.race.heat_intolerance&&e.city.hot){let S=e.city.hot*b.heat_intolerance.vars()[0];v.p.Global[t("hot")]=`-${S}%`,i*=1-S/100}if(e.race.chilled&&e.city.cold){let S=0;e.city.cold>100?(S+=100*b.chilled.vars()[1],S+=(e.city.cold-100)*b.chilled.vars()[2]):S=e.city.cold*b.chilled.vars()[1],v.p.Global[t("trait_chilled_name")]=`${S}%`,i*=1+S/100}if(e.race.cold_intolerance&&e.city.cold){let S=e.city.cold*b.cold_intolerance.vars()[0];v.p.Global[t("cold")]=`-${S}%`,i*=1-S/100}if(e.civic.govern.type==="anarchy"&&e.resource[e.race.species].amount>=N(10)){let S=(e.resource[e.race.species].amount-(N(10)-1))*(e.race.high_pop?.25/b.high_pop.vars()[0]:.25);v.p.Global[t("govern_anarchy")]=`-${S}%`,i*=1-S/100}if(e.civic.govern.protest&&e.civic.govern.protest>0&&(v.p.Global[t("event_protest")]="-30%",i*=.7),e.civic.govern.scandal&&e.civic.govern.scandal>0){let S=ge("muckraker",0);S&&(v.p.Global[t("event_scandal")]=`-${S}%`,i*=1-S/100)}let d=ve("capybara");if(d>0||e.race.calm&&e.city.meditation&&e.resource.Zen.display){let S=e.resource.Zen.amount;d>0&&(S+=Math.round(d*500));let Q=S/(S+5e3);v.p.Global[t("trait_calm_bd")]=`+${(Q*100).toFixed(2)}%`,i*=1+Q}if(e.city.firestorm&&e.city.firestorm>0&&(e.city.firestorm--,v.p.Global[t("event_flare_bd")]="-20%",i*=.8),F[e.race.species].type==="aquatic"&&!["swamp","oceanic"].includes(e.city.biome)||F[e.race.species].type==="fey"&&!["forest","swamp","taiga"].includes(e.city.biome)||F[e.race.species].type==="heat"&&!["ashland","volcanic"].includes(e.city.biome)||F[e.race.species].type==="polar"&&!["tundra","taiga"].includes(e.city.biome)||F[e.race.species].type==="sand"&&!["ashland","desert"].includes(e.city.biome)||F[e.race.species].type==="demonic"&&e.city.biome!=="hellscape"||F[e.race.species].type==="angelic"&&e.city.biome!=="eden"){let S=1;e.blood.unbound&&e.blood.unbound>=4?S=e.race.rejuvenated?.975:.95:e.blood.unbound&&e.blood.unbound>=2?S=e.race.rejuvenated?.95:.9:S=e.race.rejuvenated?.9:.8,v.p.Global[t("unsuited")]=`-${Math.round((1-S)*100)}%`,i*=S}if(e.race.hibernator&&e.city.calendar.season===3&&(i*=1-b.hibernator.vars()[1]/100,v.p.Global[t("morale_winter")]=`-${b.hibernator.vars()[1]}%`),e.race.universe==="magic"&&e.tech.syphon){let S=e.tech.syphon/8;v.p.Global[t("arpa_syphon_damage")]=`-${S}%`,i*=1-S/100}let h=["Money","Knowledge","Food","Lumber","Stone","Chrysotile","Crystal","Furs","Copper","Iron","Cement","Coal","Oil","Uranium","Aluminium","Steel","Titanium","Alloy","Polymer","Iridium","Helium_3","Water","Deuterium","Neutronium","Adamantite","Infernite","Elerium","Nano_Tube","Graphene","Stanene","Bolognium","Vitreloy","Orichalcum","Unobtainium","Quantium","Plywood","Brick","Wrought_Iron","Sheet_Metal","Mythril","Aerogel","Nanoweave","Scarletite","Cipher","Nanite","Mana"];v.p.consume={},h.forEach(function(S){v.p.consume[S]={},v.p[S]={}});var _=.25;if(e.race.species==="protoplasm"){if(e.evolution.nucleus&&e.resource.DNA.amount=5&&(m*=2),L("DNA",m*i*_),L("RNA",-(S*2*_))}if(e.evolution.organelles){let S=e.race.rapid_mutation?2:1;e.tech.evo&&e.tech.evo>=2&&S++,L("RNA",e.evolution.organelles.count*S*i*_)}if((e.stats.feat.novice&&e.stats.achieve.apocalypse&&e.stats.achieve.apocalypse.l>0||e.sim)&&e.race.universe!=="bigbang"&&(!e.race.seeded||e.race.seeded&&e.race.chose)){let S=e.sim?5:Math.min(e.stats.achieve.apocalypse.l,e.stats.feat.novice);L("RNA",S/2*_*i),e.resource.DNA.display&&L("DNA",S/4*_*i)}e.resource.RNA.amount>=2&&!e.evolution.dna?(e.evolution.dna=1,e.resource.DNA.display=!0,e.stats.achieve.mass_extinction&&e.stats.achieve.mass_extinction.l>1&&(L("RNA",e.resource.RNA.max),L("DNA",e.resource.RNA.max)),Gr()):e.resource.RNA.amount>=10&&!e.evolution.membrane?(e.evolution.membrane={count:0},Gr()):e.resource.DNA.amount>=4&&!e.evolution.organelles?(e.evolution.organelles={count:0},Gr()):e.evolution.organelles&&e.evolution.organelles.count>=2&&!e.evolution.nucleus?(e.evolution.nucleus={count:0},Gr()):e.evolution.nucleus&&e.evolution.nucleus.count>=1&&!e.evolution.eukaryotic_cell?(e.evolution.eukaryotic_cell={count:0},Gr()):e.evolution.eukaryotic_cell&&e.evolution.eukaryotic_cell.count>=1&&!e.evolution.mitochondria?(e.evolution.mitochondria={count:0},Gr()):e.evolution.mitochondria&&!e.tech.evo&&(e.tech.evo=1,Gr())}else{let S=Do(),Q=100,V=1,ce=1;if(e.race.quarantine&&e.race.qDays){let p=1-(e.race.qDays<=1e3?e.race.qDays:1e3)/1e3;switch(e.race.quarantine){case 1:V=.5+.5*p;break;case 2:V=.25+.25*p,ce=.5+.5*p;break;case 3:V=.1+.15*p,ce=.25+.25*p;break;case 4:V=.08+.02*p,ce=.12+.13*p;break}if(e.race.vax&&e.tech.focus_cure&&e.tech.focus_cure>=4){let g=+e.race.vax.toFixed(2)/100;g>1&&(g=1),V=V+(1-V)*g,ce=ce+(1-ce)*g}}if(e.city.calendar.season===0&&e.city.calendar.year>0){let p=e.race.chilled||e.race.smoldering?0:5;Q+=p,e.city.morale.season=p}else e.city.calendar.season===1&&e.race.smoldering?(Q+=b.smoldering.vars()[0],e.city.morale.season=b.smoldering.vars()[0]):e.city.calendar.season===3?e.race.chilled?(Q+=b.chilled.vars()[0],e.city.morale.season=b.chilled.vars()[0]):(Q-=e.race.leathery?b.leathery.vars()[0]:5,e.city.morale.season=e.race.leathery?-b.leathery.vars()[0]:-5):e.city.morale.season=0;if(e.race.cheese){let p=e.stats.hasOwnProperty("reset")?e.stats.reset+1:1,g=+(p/(p+10)*11).toFixed(2);Q+=g}if(e.civic.homeless&&(Q-=e.civic.homeless/2),e.tech.vax_c||e.tech.vax_f?Q-=e.tech.vax_c?10:50:e.tech.vax_s&&(Q+=20),e.tech.m_boost?(e.city.morale.leadership=20,Q+=20):e.city.morale.leadership=0,Va()){let p=ka("morale");e.city.morale.shrine=p.add,Q+=p.add}else e.city.morale.shrine=0;let Y=ge("militant",1);if(Y&&(Q-=Y),e.civic.govern.type==="corpocracy"&&(Q-=$e.corpocracy()[3]),e.civic.govern.type==="republic"&&(Q+=$e.republic()[1]),e.civic.govern.type==="federation"&&(Q+=$e.federation()[1]),e.race.blood_thirst&&e.race.blood_thirst_count>=1){let p=Math.ceil(Math.log2(e.race.blood_thirst_count));e.city.morale.blood_thirst=p,Q+=p}else e.city.morale.blood_thirst=0;let Ge=0;if(e.city.calendar.weather===0?e.city.calendar.temp>0&&(e.city.calendar.wind===1?e.race.skittish?Ge=-b.skittish.vars()[0]:Ge=e.race.leathery?-b.leathery.vars()[0]:-5:Ge=e.race.leathery?0:-2):e.city.calendar.weather===2?e.race.nyctophilia?Ge=-b.nyctophilia.vars()[0]:(e.city.calendar.wind===0&&e.city.calendar.temp<2||e.city.calendar.wind===1&&e.city.calendar.temp===2)&&(Ge=2):e.race.nyctophilia&&(Ge=b.nyctophilia.vars()[1]),e.race.snowy&&(e.city.calendar.temp!==0||e.city.calendar.weather!==0)&&(Ge-=e.city.calendar.temp>=2?b.snowy.vars()[1]:b.snowy.vars()[0]),e.city.morale.weather=e.race.submerged?0:Ge,Q+=e.race.submerged?0:Ge,e.race.motivated){let p=Math.ceil(e.race.motivated**.4);Q+=p}e.race.pet&&(Q+=1);let Ce=0,wr=5;if(e.city.morale.unemployed=0,e.city.ptrait.includes("mellow"))wr*=Re.mellow.vars()[0];else{let p=e.civic.unemployed.workers/(e.race.high_pop?b.high_pop.vars()[0]:1);Q-=p,e.city.morale.unemployed=-p}let Or=ve("vulpine");if(e.civic.hunter.display&&(e.race.playful||Or>0)){let p=0;Or>0&&(p+=b.playful.vars(1)[0]*Or),e.race.playful&&(p+=b.playful.vars()[0]),Q+=e.civic.hunter.workers*p,e.city.morale.unemployed=e.civic.hunter.workers*p}else Ce-=e.civic.hunter.workers/wr;e.race.optimistic&&(Ce+=b.optimistic.vars()[0]);let Ia=ve("gecko");if(Ia>0&&(Ce+=b.optimistic.vars(1)[0]*Ia),e.race.pessimistic&&(Ce-=b.pessimistic.vars()[0]),e.civic.garrison){let p=2;e.city.ptrait.includes("mellow")&&(p*=Re.mellow.vars()[0]);let g=e.civic.garrison.max/p;e.race.high_pop&&(g/=b.high_pop.vars()[0]),Ce-=g}if(v.p.consume.Money[t("trade")]=0,e.tech.trade||e.race.banana&&e.tech.primitive&&e.tech.primitive>=3){let p=0,g=ge("dealmaker",0);Object.keys(e.resource).forEach(function(q){if(e.resource[q].trade>0){p+=e.resource[q].trade;let C=Ms(q)*e.resource[q].trade;if(e.resource.Money.amount>=C*_){let P=sr[q];g&&(P*=1+g/100),e.race.persuasive&&(P*=1+b.persuasive.vars()[0]*e.race.persuasive/100),e.race.merchant&&(P*=1+b.merchant.vars()[1]/100);let R=ve("goblin");if(R>0&&(P*=1+b.merchant.vars(1)[1]/100*R),a==="capricorn"&&(P*=1+Zt("capricorn")[0]/100),e.genes.trader){let G=Nt();P*=1+G/100}if(e.stats.achieve.hasOwnProperty("trade")){let G=e.stats.achieve.trade.l*2;G>10&&(G=10),P*=1+G/100}e.race.truepath&&(P*=1-e.civic.foreign.gov3.hstl/101),L(q,e.resource[q].trade*_*P),L("Money",-(C*_)),v.p.consume.Money[t("trade")]-=C,v.p.consume[q][t("trade")]=e.resource[q].trade*P}Tl()}else if(e.resource[q].trade<0){p-=e.resource[q].trade;let C=qs(q)*e.resource[q].trade,P=sr[q];if(e.stats.achieve.hasOwnProperty("trade")){let R=e.stats.achieve.trade.l;R>5&&(R=5),P*=1-R/100}e.resource[q].amount>=P*_&&(L(q,e.resource[q].trade*_*P),L("Money",-(C*_)),v.p.consume.Money[t("trade")]-=C,v.p.consume[q][t("trade")]=e.resource[q].trade*P),Tl()}}),e.city.market.trade=p}if(v.p.consume.Money[t("trade")]===0&&delete v.p.consume.Money[t("trade")],e.tech.alchemy){let p=0,g=0,q=0;Object.keys(e.race.alchemy).forEach(function(C){if(e.race.alchemy[C]>0){let P=Number(e.race.alchemy[C]);if(e.resource.Mana.amount=_){let R=e.resource[C].basic&&e.tech.alchemy>=2?sr[C]*8:sr[C]*2;e.race.witch_hunter&&(R*=3),e.stats.achieve.soul_sponge&&e.stats.achieve.soul_sponge.mg&&(R*=e.stats.achieve.soul_sponge.mg+1),L(C,P*_*R),L("Mana",-(P*_)),L("Crystal",-(P*.15*_)),p-=P,g-=P*.15,v.p.consume[C][t("tab_alchemy")]=P*R,e.race.universe==="magic"&&!e.resource[C].basic&&e.tech.alchemy>=2&&ie("fullmetal")}}}),e.race.totTransmute=q,v.p.consume.Mana[t("tab_alchemy")]=p,v.p.consume.Crystal[t("tab_alchemy")]=g}if(e.galaxy.trade&&(we.hasOwnProperty("freighter")||we.hasOwnProperty("super_freighter"))){let p=0;e.galaxy.freighter&&(p+=we.freighter*2),e.galaxy.super_freighter&&(p+=we.super_freighter*5),e.galaxy.trade.max=p;let g=0,q=Qi();for(let C=0;C0&&(X*=1+b.merchant.vars(1)[1]/100*ae),a==="capricorn"&&(X*=1+Zt("capricorn")[0]/100),e.genes.trader){let de=Nt();X*=1+de/100}if(e.stats.achieve.hasOwnProperty("trade")){let de=e.stats.achieve.trade.l;de>5&&(de=5),X*=1+de/50,R*=1-de/100}g+=e.galaxy.trade[`f${C}`],g>p&&(e.galaxy.trade[`f${C}`]-=g-p,e.galaxy.trade[`f${C}`]<0&&(e.galaxy.trade[`f${C}`]=0));let se=kt("gxy_gorddon");for(let de=0;de0&&(v.p.consume[P][t("trade")]?v.p.consume[P][t("trade")]-=ee:v.p.consume[P][t("trade")]=-ee),Z>0&&(v.p.consume[G][t("trade")]?v.p.consume[G][t("trade")]+=Z:v.p.consume[G][t("trade")]=Z),se<1&&(v.p.consume[G][t("galaxy_piracy")]?v.p.consume[G][t("galaxy_piracy")]+=-((1-se)*Z):v.p.consume[G][t("galaxy_piracy")]=-((1-se)*Z)),v.p.consume[P][t("trade")]===0&&delete v.p.consume[P][t("trade")],v.p.consume[G][t("trade")]===0&&delete v.p.consume[G][t("trade")]}e.galaxy.trade.cur=g}e.race.deconstructor&&e.city.nanite_factory&&va.forEach(function(p){if(e.resource[p].display){let g=e.city.nanite_factory[p]*_;if(g>0&&(e.resource[p].amount=1e3){let p=e.race.lone_survivor?100:1e4;fr-=p,Gt+=p,Ht[t("tau_star_ringworld")]=p}if(e.interstellar.orichalcum_sphere&&e.interstellar.orichalcum_sphere.count>0){let p=0;e.interstellar.orichalcum_sphere.count>=100?p=dt(1750):p=dt(750+e.interstellar.orichalcum_sphere.count*8),fr-=p,Gt+=p,Ht[t("interstellar_dyson_sphere_title")]=p,delete Ht[t("tech_dyson_net")]}else if(e.interstellar.dyson_sphere&&e.interstellar.dyson_sphere.count>0){let p=0;e.interstellar.dyson_sphere.count>=100?p=dt(750):p=dt(175+e.interstellar.dyson_sphere.count*5),fr-=p,Gt+=p,Ht[t("interstellar_dyson_sphere_title")]=p,delete Ht[t("tech_dyson_net")]}else if(e.interstellar.dyson&&e.interstellar.dyson.count>=1){let p=0;e.interstellar.dyson.count>=100?p=dt(175):p=dt(e.interstellar.dyson.count*1.25),fr-=p,Gt+=p,Ht[t("tech_dyson_net")]=p}if(e.interstellar.stellar_engine&&e.interstellar.stellar_engine.count>=100){let p=e.tech.gravity&&e.tech.gravity>=2?13.5:7.5,g=e.interstellar.stellar_engine.mass;e.tech.roid_eject&&(g+=.225*e.tech.roid_eject*(1+e.tech.roid_eject/12));let q=1+(e.stats.achieve.escape_velocity&&e.stats.achieve.escape_velocity.h?e.stats.achieve.escape_velocity.h*.02:0),C=dt(20+(g-8)*p+e.interstellar.stellar_engine.exotic*p*10)*q;fr-=C,Gt+=C,Ht[t("tech_stellar_engine")]=C}if([{r:"city",s:"coal_power"},{r:"city",s:"oil_power"},{r:"city",s:"fission_power"},{r:"spc_hell",s:"geothermal"},{r:"spc_dwarf",s:"e_reactor"},{r:"int_alpha",s:"fusion"},{r:"tau_home",s:"fusion_generator"},{r:"tau_gas2",s:"alien_space_station"}].forEach(function(p){let g=ba(p.r),q=p.r==="city"?p.r:g,C=p.r==="city"?O.city:O[g][p.r],P=typeof C[p.s].title=="string"?C[p.s].title:C[p.s].title();if(e[q][p.s]&&e[q][p.s].on){let R=C[p.s].powered();if(k[p.s]=e[q][p.s].on,C[p.s].hasOwnProperty("p_fuel")){let X=C[p.s].p_fuel();Array.isArray(X)||(X=[X]);for(let ee=0;ee=3&&k.coal_power){let p=k.coal_power*.35*T("psychic_boost","Uranium");v.p.Uranium[t("city_coal_ash")]=p/65/i,L("Uranium",p*_/65)}if(e.space.hydrogen_plant){let p=O.space.spc_titan.hydrogen_plant.powered();e.space.hydrogen_plant.on>e.space.electrolysis.on&&(e.space.hydrogen_plant.on=e.space.electrolysis.on);let g=e.space.hydrogen_plant.on*p;fr+=g,Gt-=g,Ht[t("space_hydrogen_plant_title")]=-g}if(e.portal.inferno_power){let p=O.portal.prtl_ruins.inferno_power.fuel,g=e.portal.inferno_power.on;Object.keys(p).forEach(function(C){let P=g*p[C];for(;P*_>e.resource[C].amount+(e.resource[C].diff>0?e.resource[C].diff*_:0)&&P>0;)g--,P-=p[C];v.p.consume[C][t("portal_inferno_power_title")]=-P,L(C,-(P*_))});let q=g*O.portal.prtl_ruins.inferno_power.powered();fr+=q,Gt-=q,Ht[t("portal_inferno_power_title")]=-q}if(e.space.swarm_satellite&&e.space.swarm_control){let p=e.space.swarm_satellite.count;p>e.space.swarm_control.s_max&&(p=e.space.swarm_control.s_max),e.space.swarm_control.support=p;let g=.35;e.tech.swarm>=4&&(g+=.15*(e.tech.swarm-3)),e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=1&&(g+=.15),e.blood.illuminate&&(g+=.01*e.blood.illuminate),g=+g.toFixed(2);let q=dt(p*g);fr-=q,Gt+=q,Ht[t("space_sun_swarm_satellite_title")]=q}if(e.city.mill&&e.tech.agriculture&&e.tech.agriculture>=6){let p=dt(e.city.mill.on*O.city.mill.powered());fr+=p,Gt-=p,Ht[t("city_mill_title2")]=-p}if(e.city.windmill&&e.tech.wind_plant){let p=dt(e.city.windmill.count*O.city.windmill.powered());fr+=p,Gt-=p,Ht[t("city_mill_title2")]=-p}if(e.race.powered){let p=b.powered.vars()[0]*e.resource[e.race.species].amount;e.race.discharge&&e.race.discharge>0&&(p=+(p*1.25).toFixed(3)),Gt-=p}e.race.replicator&&(e.city.replicator={count:e.race.replicator.pow,on:e.race.replicator.pow});let Rt=e.power;if(e.settings.lowPowerBalance){let p=0;for(let C=0;C=0;w--){let C=Rt[w].split(":"),P=ba(C[0]),R=C[0]==="city"?C[0]:P,G=C[0]==="city"?O.city:O[P][C[0]];if(e[R][C[1]]&&e[R][C[1]].on&&(k[C[1]]=e[R][C[1]].on,G[C[1]].hasOwnProperty("p_fuel"))){let X=G[C[1]].p_fuel();Array.isArray(X)||(X=[X]);for(let ee=0;eeGt&&k[P[1]]>0){let R=P[0]==="city"?"city":ba(P[0]),G=P[0]==="city"?O.city:O[R][P[0]],X=G[P[1]].powerBalancer();if(X){let ee=k[P[1]];X.forEach(function(Z){let ae=0;if(Z.hasOwnProperty("r")&&Z.hasOwnProperty("k")){let se=e[R][P[1]][Z.k]?e[R][P[1]][Z.k]:0;e.resource[Z.r].odif&&e.resource[Z.r].odif<0&&(e.resource[Z.r].odif=0);let de=e.resource[Z.r].diff+(e.resource[Z.r].odif?e.resource[Z.r].odif:0);for(;de-ae*se>se&&ee>0&&g>Gt;)ee--,ae++,g-=G[P[1]].powered();e.resource[Z.r].odif=se*ae}else if(Z.hasOwnProperty("s")){let se=G[P[1]].support();e[R][P[1]].soff&&e[R][P[1]].soff<0&&(e[R][P[1]].soff=0);let de=Z.s+(e[R][P[1]].soff?e[R][P[1]].soff:0);for(;de-se*ae>=se&&ee>0&&g>Gt;)ee--,ae++,g-=G[P[1]].powered();e[R][P[1]].soff=se*ae}}),k[P[1]]=ee}}}for(var w=Rt.length-1;w>=0;w--){let P=Rt[w].split(":"),R=ba(P[0]),G=P[0]==="city"?P[0]:R,X=P[0]==="city"?O.city:O[R][P[0]];if(e[G][P[1]]&&e[G][P[1]].on){let ee=X[P[1]].powered();for(;g>Gt&&k[P[1]]>0;)g-=ee,k[P[1]]--;k[P[1]]!==e[G][P[1]].on?($(`#${G}-${P[1]} .on`).addClass("warn"),$(`#${G}-${P[1]} .on`).prop("title",`ON ${k[P[1]]}/${e[G][P[1]].on}`)):($(`#${G}-${P[1]} .on`).removeClass("warn"),$(`#${G}-${P[1]} .on`).prop("title","ON"))}else k[P[1]]=0,$(`#${G}-${P[1]} .on`).removeClass("warn"),$(`#${G}-${P[1]} .on`).prop("title","ON")}Gt-=p}else for(var w=0;wGt&&G>0;)G-=P[g[1]].powered(),k[g[1]]--;if(Gt-=e[C][g[1]].on*R,P[g[1]].hasOwnProperty("p_fuel")){let X=P[g[1]].p_fuel();Array.isArray(X)||(X=[X]);for(let ee=0;eee.resource.Elerium.amount&&g>0;)g-=p,k.foothold--;v.p.consume.Elerium[t("galaxy_foothold")]=-g;let q=g*_;L("Elerium",-q)}if(e.race.fasting){let p=["city:tourist_center","space:spaceport","int_:starport","gxy_:starbase","space:space_barracks","int_:zoo"];for(let g=0;g0){if(Rt.includes(`${p.r}:${p.s}`)||(k[p.s]=e[p.a][p.s].on),O[p.a][p.r][p.s].hasOwnProperty("support_fuel")){let q=O[p.a][p.r][p.s].support_fuel();Array.isArray(q)||(q=[q]);for(let C=0;C=2?k.nav_beacon*O.space.spc_home.nav_beacon.support():0;break;case"red":e[p.a][p.s].s_max+=e.tech.mars&&e.tech.mars>=3?k.red_tower*O.space.spc_red.red_tower.support():0,e[p.a][p.s].s_max+=e.tech.luna&&e.tech.luna>=3?k.nav_beacon*O.space.spc_home.nav_beacon.support():0;break;case"tau_home":e[p.a][p.s].s_max+=k.tau_farm?k.tau_farm:0;break}}if(e[p.a][p.s]&&p.r==="spc_eris"&&!k.ai_core2&&(e[p.a][p.s].s_max=0),e[p.a][p.s]){let q=0,C=e.support[p.g].map(P=>P.split(":")[1]);for(var g=0;gX&&!p.oc?(G=Math.floor(X/R),$(`#${P} .on`).addClass("warn"),$(`#${P} .on`).prop("title",`ON ${G}/${e[p.a][C[g]].on}`)):($(`#${P} .on`).removeClass("warn"),$(`#${P} .on`).prop("title","ON")),O[p.a][p.r2][C[g]].hasOwnProperty("support_fuel")){let ee=O[p.a][p.r2][C[g]].support_fuel();Array.isArray(ee)||(ee=[ee]);for(let Z=0;Z0){let p=k.red_factory*Fe(1,!0);L("Helium_3",-(p*_)),v.p.consume.Helium_3[t("space_red_factory_title")]=-p}if(k.int_factory&&k.int_factory>0){let p=k.int_factory*ze(5);L("Deuterium",-(p*_)),v.p.consume.Deuterium[t("interstellar_int_factory_title")]=-p}if(U.water_freighter&&U.water_freighter>0){let p=Fe(5,!0),g=U.water_freighter*p;for(let q=0;q0){let p=+ze(5),g=k.starport*p;v.p.consume.Helium_3[t("interstellar_alpha_starport_title")]=-g;for(let q=0;qq.split(":")[1]);for(var w=0;we.interstellar.starport.s_max?(C-=p+C-e.interstellar.starport.s_max,$(`#${P} .on`).addClass("warn"),$(`#${P} .on`).prop("title",`ON ${C}/${e.interstellar[g[w]].on}`)):($(`#${P} .on`).removeClass("warn"),$(`#${P} .on`).prop("title","ON")),p+=C,bt[g[w]]=C}else bt[g[w]]=0;if(e.interstellar.starport.support=p,e.interstellar.hasOwnProperty("mining_droid")&&e.interstellar.mining_droid.count>0){let q=bt.mining_droid,C=e.interstellar.mining_droid.on,P=C>0?q/C:0,R=C;["adam","uran","coal","alum"].forEach(function(G){R-=e.interstellar.mining_droid[G],R<0&&(e.interstellar.mining_droid[G]+=R,R=0),$r[G]=e.interstellar.mining_droid[G]*P})}}if(e.galaxy.starbase&&e.galaxy.starbase.count>0){let p=+ze(25),g=k.starbase*p;v.p.consume.Helium_3[t("galaxy_starbase")]=-g;for(let q=0;qq.split(":")[1]);for(var w=0;we.galaxy.starbase.s_max?(C-=p+C-e.galaxy.starbase.s_max,$(`#${P} .on`).addClass("warn"),$(`#${P} .on`).prop("title",`ON ${C}/${e.galaxy[g[w]].on}`)):($(`#${P} .on`).removeClass("warn"),$(`#${P} .on`).prop("title","ON")),p+=C*-O.galaxy.gxy_gateway[g[w]].support(),we[g[w]]=C}else we[g[w]]=0;e.galaxy.starbase.support=p}if(e.galaxy.foothold&&e.galaxy.foothold.count>0){e.galaxy.foothold.s_max=k.foothold*O.galaxy.gxy_alien2.foothold.support();let p=0,g=e.support.alien2.map(q=>q.split(":")[1]);for(var w=0;we.galaxy.foothold.s_max?(C-=p+C-e.galaxy.foothold.s_max,$(`#${P} .on`).addClass("warn"),$(`#${P} .on`).prop("title",`ON ${C}/${e.galaxy[g[w]].on}`)):($(`#${P} .on`).removeClass("warn"),$(`#${P} .on`).prop("title","ON")),p+=C*-O.galaxy.gxy_alien2[g[w]].support(),we[g[w]]=C}else we[g[w]]=0;e.galaxy.foothold.support=p}if(e.portal.guard_post){if(e.portal.guard_post.s_max=e.portal.guard_post.count*O.portal.prtl_ruins.guard_post.support(),e.portal.guard_post.on>0){let p=e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size;if(k.soul_forge){let g=ji();g<=p&&(p-=g)}pq.split(":")[1]);for(var w=0;we.portal.harbour.s_max?(C-=p+C-e.portal.harbour.s_max,$(`#${P} .on`).addClass("warn"),$(`#${P} .on`).prop("title",`ON ${C}/${e.portal[g[w]].on}`)):($(`#${P} .on`).removeClass("warn"),$(`#${P} .on`).prop("title","ON")),p+=C*-O.portal.prtl_lake[g[w]].support(),we[g[w]]=C}else we[g[w]]=0;e.portal.harbour.support=p}if(e.portal.purifier){e.portal.purifier.s_max=k.purifier*O.portal.prtl_spire.purifier.support();let p=0,g=e.support.spire.map(q=>q.split(":")[1]);for(var w=0;we.portal.purifier.s_max?(C-=p+C-e.portal.purifier.s_max,$(`#${P} .on`).addClass("warn"),$(`#${P} .on`).prop("title",`ON ${C}/${e.portal[g[w]].on}`)):($(`#${P} .on`).removeClass("warn"),$(`#${P} .on`).prop("title","ON")),p+=C*-O.portal.prtl_spire[g[w]].support(),pa[g[w]]=C}else pa[g[w]]=0;e.portal.purifier.support=p}if(e.space.space_station&&e.space.space_station.count>0){let p=+Fe(2.5,!0),g=k.space_station*p;v.p.consume.Helium_3[t("space_belt_station_title")]=-g;for(let q=0;qq.split(":")[1]);for(var w=0;we.space.space_station.s_max){let R=p+C*-O.space.spc_belt[g[w]].support()-e.space.space_station.s_max;C-=Math.ceil(R/-O.space.spc_belt[g[w]].support()),$(`#${P} .on`).addClass("warn"),$(`#${P} .on`).prop("title",`ON ${C}/${e.space[g[w]].on}`)}else $(`#${P} .on`).removeClass("warn"),$(`#${P} .on`).prop("title","ON");p+=C*-O.space.spc_belt[g[w]].support(),U[g[w]]=C}else U[g[w]]=0;e.space.space_station.support=p}if(e.interstellar.nexus&&e.interstellar.nexus.count>0){let p=350,g=k.nexus*p;v.p.consume.Money[t("interstellar_nexus_bd")]=-g;for(let q=0;qq.split(":")[1]);for(var w=0;we.interstellar.nexus.s_max?(C-=p+C-e.interstellar.nexus.s_max,$(`#${P} .on`).addClass("warn"),$(`#${P} .on`).prop("title",`ON ${C}/${e.interstellar[g[w]].on}`)):($(`#${P} .on`).removeClass("warn"),$(`#${P} .on`).prop("title","ON")),p+=C,bt[g[w]]=C}else bt[g[w]]=0;e.interstellar.nexus.support=p}if(e.interstellar.xfer_station&&k.xfer_station){let p=.28,g=k.xfer_station*p;v.p.consume.Uranium[t("interstellar_xfer_station_title")]=-g;for(let q=0;q0){let p=+Fe(2,!0),g=k.outpost*p;v.p.consume.Oil[t("space_gas_moon_outpost_bd")]=-g;for(let q=0;q0){let p=+ze(3),g=k.neutron_miner*p;v.p.consume.Helium_3[t("interstellar_neutron_miner_title")]=-g;for(let q=0;qp.split(":")[1])},{area:"galaxy",region:"gxy_gorddon",ships:["freighter"],req:"embassy"},{area:"galaxy",region:"gxy_alien1",ships:["super_freighter"],req:"embassy"},{area:"galaxy",region:"gxy_alien2",ships:["armed_miner","scavenger"],req:"foothold"},{area:"galaxy",region:"gxy_chthonian",ships:["minelayer","raider"],req:"starbase"},{area:"portal",region:"prtl_lake",ships:["bireme","transport"],req:"harbour"}];let da=0,Hr=0,lr=0;for(let p=0;pO[g][q][P].ship.civ()&&(e.civic[e.civic.d_job].workers-=O[g][q][P].ship.civ(),e.civic.crew.workers+=O[g][q][P].ship.civ(),e[g][P].crew+=O[g][q][P].ship.civ()),e[g][P].crew>e[g][P].on*O[g][q][P].ship.civ()&&(e.civic[e.civic.d_job].workers+=O[g][q][P].ship.civ(),e.civic.crew.workers-=O[g][q][P].ship.civ(),e[g][P].crew-=O[g][q][P].ship.civ()),e.civic.crew.assigned=e.civic.crew.workers,da+=e[g][P].crew,lr+=e[g][P].crew),O[g][q][P].ship.mil&&e[g][P].hasOwnProperty("mil")){if(e[g][P].mil!==e[g][P].on*O[g][q][P].ship.mil()&&(e[g][P].mil=e[g][P].on*O[g][q][P].ship.mil()),e.civic.garrison.workers-e.portal.fortress.garrison<0){let R=e.civic.garrison.workers-e.portal.fortress.garrison;e[g][P].mil-=R}Hr+e[g][P].mil>e.civic.garrison.workers-e.portal.fortress.garrison&&(e[g][P].mil=e.civic.garrison.workers-e.portal.fortress.garrison-Hr),e[g][P].mil<0&&(e[g][P].mil=0),Hr+=e[g][P].mil}e[g][P].crew0)&&(Hr+=fs(p))}),e.civic.garrison.crew=Hr),Object.keys(si).forEach(function(p){if(e.civic[p]&&(p!=="crew"&&(lr+=e.civic[p].workers,lr>e.resource[e.race.species].amount&&(e.civic[p].workers-=lr-e.resource[e.race.species].amount),(!e.civic[p].display||e.civic[p].workers<0)&&(e.civic[p].workers=0)),p!=="unemployed"&&p!=="hunter"&&p!=="forager")){let g=e.civic[p].stress;if(e.city.ptrait.includes("mellow")&&(g+=Re.mellow.vars()[1]),e.race.content){let C=p==="hell_surveyor"?.2:.4;g+=e.race.content*C}e.city.ptrait.includes("dense")&&p==="miner"&&(g-=Re.dense.vars()[1]),e.race.freespirit&&p!=="farmer"&&p!=="lumberjack"&&p!=="quarry_worker"&&p!=="crystal_miner"&&p!=="scavenger"&&(g/=1+b.freespirit.vars()[0]/100);let q=e.civic[p].workers;e.race.high_pop&&(q/=b.high_pop.vars()[0]),e.race.sky_lover&&["miner","coal_miner","crystal_miner","pit_miner"].includes(p)&&(q*=1+b.sky_lover.vars()[0]/100),Ce-=q/g}}),e.civic[e.civic.d_job].workers+=e.resource[e.race.species].amount-lr,e.civic[e.civic.d_job].workers<0&&(e.civic[e.civic.d_job].workers=0),Object.keys(si).forEach(function(p){p!=="craftsman"&&e.civic[p]&&e.civic[p].display&&e.civic[p].workers0&&e.civic[p].workers40){let p=e.civic.taxes.tax_rate-40;e.city.morale.tax-=p*.5,Q-=p*.5}if(e.civic.govern.type==="oligarchy"&&e.civic.taxes.tax_rate>20){let p=e.civic.taxes.tax_rate-20;e.city.morale.tax+=p*.5,Q+=p*.5}if((e.civic.govern.type!=="autocracy"&&!e.race.blood_thirst||e.race.immoral)&&e.civic.garrison.protest+e.civic.garrison.fatigue>2){let p=e.race.immoral?1+b.immoral.vars()[0]/100:1,g=Math.round(Math.log2(e.civic.garrison.protest+e.civic.garrison.fatigue)*p);e.city.morale.warmonger=e.race.immoral?g:-g,Q+=e.city.morale.warmonger}else e.city.morale.warmonger=0;let Vt=100;if(Vt+=e.city.casino?k.casino:0,Vt+=e.space.spc_casino?k.spc_casino:0,Vt+=e.tauceti.tauceti_casino?k.tauceti_casino:0,e.city.amphitheatre){let p=ge("athleticism",0);Vt+=p?e.city.amphitheatre.count*p:e.city.amphitheatre.count}if(U.vr_center&&(Vt+=U.vr_center*2),bt.zoo&&!e.race.fasting&&(Vt+=bt.zoo*2),k.resort&&(Vt+=k.resort*2),e.tech.superstar){let p=e.race.high_pop?xe(1):1;Vt+=ye(e.civic.entertainer.workers,"entertainer")*p}if(Ea=Vt,e.tech.monuments){let p=ge("gaslighter",2),g=p?2-p:2;Ea+=e.tech.monuments*g}if(e.civic.taxes.tax_rate<20&&!e.race.banana&&(Ea+=10-Math.floor(e.civic.taxes.tax_rate/2)),e.stats.achieve.joyless&&(Ea+=e.stats.achieve.joyless.l*2),e.race.motivated){let p=Math.ceil(e.race.motivated**.4);Ea+=Math.round(p/2)}let Sr=50;if(e.race.optimistic&&(Sr+=b.optimistic.vars()[1]),Ia>0&&(Sr+=Math.round(b.optimistic.vars(1)[1]*Ia)),e.race.truepath&&(Sr-=25),e.civic.govern.fr>0){let p=Q/2;e.city.morale.rev=p,Q-=p,Sr-=10}else e.city.morale.rev=0;if(e.race.tormented)if(Q>100){let p=Q-100;p=Math.ceil(p*b.tormented.vars()[0]/100),Q-=p,e.city.tormented=p}else e.city.tormented=0;else delete e.city.tormented;if(e.city.morale.potential=+Q.toFixed(1),QEa&&(Q=Ea),e.city.morale.cap=Ea,e.city.morale.current=Q,e.city.morale.current<100)if(e.race.blissful){let p=e.city.morale.current-100,g=b.blissful.vars()[0]/100;i*=1+p*g/100,v.p.Global[t("morale")]=p*g+"%"}else i*=e.city.morale.current/100,v.p.Global[t("morale")]=e.city.morale.current-100+"%";else i*=1+(e.city.morale.current-100)/200,v.p.Global[t("morale")]=(e.city.morale.current-100)/2+"%";if(e.race.lazy&&e.city.calendar.temp===2&&(v.p.Global[t("trait_lazy_bd")]="-"+b.lazy.vars()[0]+"%",i*=1-b.lazy.vars()[0]/100),e.race.distracted&&(v.p.Global[t("event_m_curious3_bd")]="-5%",i*=.95),e.race.stimulated&&(v.p.Global[t("event_m_curious4_bd")]="+10%",i*=1.1),e.race.selenophobia){let p=e.city.calendar.moon>14?28-e.city.calendar.moon:e.city.calendar.moon;v.p.Global[t("moon_phase")]=-p+b.selenophobia.vars()[0]+"%",p=1+b.selenophobia.vars()[0]/100-p/100,i*=p}if(e.interstellar.mass_ejector){let p=0,g=0,q=0;Object.keys(e.interstellar.mass_ejector).forEach(function(C){if(Mt[C]){let P=e.interstellar.mass_ejector[C];p+P>k.mass_ejector*1e3&&(P=k.mass_ejector*1e3-p),p+=P,P>0&&(v.p.consume[C][t("interstellar_blackhole_name")]=-P),P*_>e.resource[C].amount&&(P=e.resource[C].amount/_),P<0&&(P=0),L(C,-(_*P)),g+=P*Mt[C],e.race.universe!=="magic"&&(C==="Elerium"||C==="Infernite")&&(q+=P*Mt[C])}}),e.interstellar.mass_ejector.mass=g,e.interstellar.mass_ejector.total=p,e.interstellar.stellar_engine.mass+=g/1e10*_,e.interstellar.stellar_engine.exotic+=q/1e10*_}if(e.portal.transport&&e.portal.purifier){let p=0,g=0,q=e.blood.spire&&e.blood.spire>=2?.8:.85;if(Object.keys(e.portal.transport.cargo).forEach(function(C){if(ya[C]){let P=e.portal.transport.cargo[C];p+P>we.transport*5&&(P=we.transport*5-p),p+=P;let R=P*ya[C].out;for(;R*_>e.resource[C].amount&&R>0;)R-=ya[C].out,P--;R>0&&(v.p.consume[C][t("portal_transport_title")]=-R);let G=1-q**(we.bireme||0);L(C,-(_*R)),g+=Number(P*ya[C].in*_*G)}}),e.portal.mechbay)for(let C=0;Ce.portal.purifier.sup_max&&(e.portal.purifier.supply=e.portal.purifier.sup_max)}if(e.race.carnivore&&!e.race.herbivore&&!e.race.soul_eater&&!e.race.artifical&&e.resource.Food.amount>10){let p=b.carnivore.vars()[0]/100,g=+((e.resource.Food.amount-10)*p).toFixed(3);e.city.smokehouse&&(g*=.9**e.city.smokehouse.count),L("Food",-(g*_)),v.p.consume.Food[t("spoilage")]=-g}if(e.race.gnawer){let p=e.race.kindling_kindred||e.race.smoldering?"Stone":"Lumber";if(e.resource[p].display){let g=e.resource[e.race.species].amount+e.civic.garrison.workers;e.race.high_pop&&(g/=b.high_pop.vars()[0]);let q=g*b.gnawer.vars()[0];v.p.consume[p][t("trait_gnawer_bd")]=-q,L(p,-(q*_))}}var A=!0;if(e.resource[e.race.species].amount>=1||e.city.farm||e.city.soul_well||e.city.compost||e.city.tourist_center||e.city.transmitter){let p=0,g=a==="virgo"?1+Zt("virgo")[0]/100:1;if(e.race.artifical)e.city.transmitter&&(p=k.transmitter*T("transmitter")*T("psychic_boost","Food"),v.p.Food[t("city_transmitter")]=p+"v",e.city.transmitter.lpmod=T("transmitter")*i*T("psychic_boost","Food"));else if(e.race.detritivore){if(e.city.compost){let et=e.city.compost.on;if(!e.race.kindling_kindred&&!e.race.smoldering){let ct=.5,ur=et*ct;for(;ur*_>e.resource.Lumber.amount&&ur>0;)ur-=ct,et--;v.p.consume.Lumber[t("city_compost_heap")]=-ur,L("Lumber",-(ur*_))}let ke=b.detritivore.vars()[0]/100,Ae=et*(1.2+e.tech.compost*ke);Ae*=e.city.biome==="grassland"?qe.grassland.vars()[0]:1,Ae*=e.city.biome==="savanna"?qe.savanna.vars()[0]:1,Ae*=e.city.biome==="ashland"?qe.ashland.vars()[0]:1,Ae*=e.city.biome==="volcanic"?qe.volcanic.vars()[0]:1,Ae*=e.city.biome==="hellscape"?qe.hellscape.vars()[0]:1,Ae*=e.city.ptrait.includes("trashed")?Re.trashed.vars()[0]:1,Ae*=T("psychic_boost","Food"),v.p.Food[t("city_compost_heap")]=Ae+"v",p+=Ae}}else if(e.race.carnivore||e.race.soul_eater){let et=ti(),ke=ye(e.civic.hunter.workers,"hunter");if(ke*=$t(ke,"hunting"),e.race.servants){let Ae=e.race.servants.jobs.hunter;Ae*=pr(e.race.servants.jobs.hunter,"hunting"),ke+=Ae}if(ke*=et*(e.race.carnivore?2:.5),e.race.ghostly&&(ke*=1+b.ghostly.vars()[0]/100),ke*=T("psychic_boost","Food"),v.p.Food[t(e.race.unfathomable?"job_raider":"job_hunter")]=ke+"v",e.race.carnivore&&e.city.lodge&&ke>0&&(ke*=1+e.city.lodge.count/20,v.p.Food[`\u1102${t("city_lodge")}`]=e.city.lodge.count*5+"%"),e.city.soul_well){let Ae=e.city.soul_well.count*(e.race.ghostly?2+b.ghostly.vars()[1]:2);ke+=Ae*T("psychic_boost","Food"),v.p.Food[t("city_soul_well")]=Ae+"v"}p+=ke}else if(e.race.unfathomable){if(e.city.captive_housing){let et=ti(),ke=ye(e.civic.hunter.workers,"hunter");if(ke*=$t(ke,"hunting")*et,e.race.servants){let ct=e.race.servants.jobs.hunter*et;ct*=pr(e.race.servants.jobs.hunter,"hunting"),ke+=ct}let Ae=ke*.008;if(e.city.captive_housing.cattle0&&(ke-=Math.round(e.city.captive_housing.cattle**1.25),ke=e.city.captive_housing.cattle**2&&(e.city.captive_housing.cattle++,e.city.captive_housing.cattleCatch=0),e.city.captive_housing.cattle>0&&e.resource.Food.amount0){let ct=e.city.captive_housing.cattle/3*T("psychic_boost","Food");v.p.Food[t("city_captive_housing_cattle_bd")]=ct+"v",p+=ct}}}else if(e.city.farm||e.race.forager){let et=1;if(e.race.submerged||(e.city.calendar.temp===0&&(e.city.calendar.weather===0?et*=e.race.chilled?1+b.chilled.vars()[3]/100:.7:et*=e.race.chilled?1+b.chilled.vars()[4]/100:.85),e.city.calendar.weather===2&&(et*=e.race.chilled?1-b.chilled.vars()[5]/100:1.1)),e.race.forager){let ke=1+(e.tech.foraging?.75*e.tech.foraging:0),Ae=ye(e.civic.forager.workers,"forager");if(e.race.servants){let ur=e.race.servants.jobs.forager;ur*=pr(e.race.servants.jobs.forager,"forager"),Ae+=ur}let ct=Ae*ke*.35;v.p.Food[t("job_forager")]=ct+"v",p+=ct}if(e.city.farm){let ke=ye(e.civic.farmer.workers,"farmer"),Ae=0;ke>N(e.city.farm.count)&&(Ae=ke-N(e.city.farm.count),ke=N(e.city.farm.count));let ct=ke*Oi(!0)+Ae*Oi(!1);if(e.race.servants){let xr=e.race.servants.jobs.farmer,mi=0,$n=e.city.farm.count-ke/(e.race.high_pop?b.high_pop.vars()[0]:1);xr>$n&&(mi=xr-$n,xr=$n),ct+=xr*Oi(!0,!0)+mi*Oi(!1,!0)}let ur=1;if(e.city.mill){let xr=e.tech.agriculture>=5?.05:.03,mi=e.city.mill.count-e.city.mill.on;ur+=mi*xr}v.p.Food[t("job_farmer")]=ct+"v",p+=ct*g*et*ur*V*T("psychic_boost","Food"),ct>0&&(v.p.Food[`\u1102${t("city_mill_title1")}`]=(ur-1)*100+"%",v.p.Food[`\u1102${t("sign_virgo")}+0`]=(g-1)*100+"%",v.p.Food[`\u1102${t("morale_weather")}`]=(et-1)*100+"%",v.p.Food[`\u1102${t("quarantine")}+0`]=(V-1)*100+"%")}}if(e.tauceti.tau_farm&&k.tau_farm){let et=1+(U.colony||0)*.5,ke=T("tau_farm","food")*k.tau_farm*T("psychic_boost","Food"),Ae=ke*i*et;v.p.Food[t("tau_home_tau_farm")]=ke+"v",ke>0&&(v.p.Food[`\u1102${t("tau_home_colony")}`]=(et-1)*100+"%"),L("Food",Ae*_)}let q=0;e.tech.military&&(q=e.race.herbivore&&!e.race.carnivore||e.race.artifical?0:mt(We(),"hunting")/3,q*=T("psychic_boost","Food"));let C=0,P=yt("spc_red");e.tech.mars&&(C=U.biodome*ye(e.civic.colonist.workers,"colonist")*T("biodome","food")*T("psychic_boost","Food"),(e.race.cataclysm||e.race.orbit_decayed)&&(C+=U.biodome*T("biodome","cat_food")*T("psychic_boost","Food"))),v.p.Food[O.space.spc_red.biodome.title()]=C+"v",C>0&&(v.p.Food[`\u1102${t("space_syndicate")}+0`]=-((1-P)*100)+"%",v.p.Food[`\u1102${t("space_red_ziggurat_title")}+0`]=(S-1)*100+"%",v.p.Food[`\u1102${t("sign_virgo")}+0`]=(g-1)*100+"%");let R=p+q*V+C*P*S*g;R*=i,e.race.fasting&&(v.p.Food[`${t("evo_challenge_fasting")}`]="-100%",R*=0);let G=e.civic.garrison.workers;e.race.parasite&&!e.tech.isolation&&(G-=2,G<0&&(G=0));let X=0,ee=1;e.race.gluttony&&(ee*=1+b.gluttony.vars()[0]/100),e.race.high_metabolism&&(ee*=1+b.high_metabolism.vars()[0]/100),e.race.sticky&&(ee*=1-b.sticky.vars()[0]/100);let Z=ve("pinguicula");if(Z>0&&(ee*=1-b.sticky.vars(1)[0]/100*Z),e.race.photosynth)switch(e.city.calendar.weather){case 0:ee*=e.city.calendar.temp===0?1:1-b.photosynth.vars()[2]/100;break;case 1:ee*=1-b.photosynth.vars()[1]/100;break;case 2:ee*=1-b.photosynth.vars()[0]/100;break}e.race.ravenous&&(ee*=1+b.ravenous.vars()[0]/100),e.race.hibernator&&e.city.calendar.season===3&&(ee*=1-b.hibernator.vars()[0]/100),e.race.high_pop&&(ee/=b.high_pop.vars()[0]);let ae=1;e.city.banquet&&(e.city.banquet.on?ae*=(e.city.banquet.count>=5?1.02:1.022)**e.city.banquet.strength:e.city.banquet.strength=0);let se=0,de=0,he=0,y=0,z=0,E=0,te=0,Oe=0,Kt=0;e.race.fasting||(X=(e.resource[e.race.species].amount+G-(e.civic.unemployed.workers+ye(e.civic.hunter.workers,"hunter"))*.5)*ee,e.race.forager&&(X-=ye(e.civic.forager.workers,"forager")),e.race.ravenous&&(se=e.resource.Food.amount/b.ravenous.vars()[1]),v.p.consume.Food[tt("name")]=-(X+se),X*ae+se>=e.resource.Food.amount?e.city.banquet&&ae>1&&(e.city.banquet.strength=0):(ae>1&&(v.p.consume.Food[`${t("city_banquet")}`]=-(X*(ae-1))),X*=ae),e.city.tourist_center&&(de=e.city.tourist_center.on*50,v.p.consume.Food[t("tech_tourism")]=-de),e.space.spaceport&&(he=k.spaceport*(e.race.cataclysm||e.race.orbit_decayed?2:25),v.p.consume.Food[t("space_red_spaceport_title")]=-he),e.interstellar.starport&&(y=k.starport*100,v.p.consume.Food[t("interstellar_alpha_starport_title")]=-y),e.galaxy.starbase&&(z=k.s_gate*k.starbase*250,v.p.consume.Food[t("galaxy_starbase")]=-z),e.space.space_station&&(E=k.space_station*(e.race.cataclysm?1:10),v.p.consume.Food[t("space_belt_station_title")]=-E),e.space.space_barracks&&!e.race.cataclysm&&(te=e.space.space_barracks.on*10,v.p.consume.Food[t("tech_space_marines_bd")]=-te),e.galaxy.embassy&&(Oe=k.s_gate*k.embassy*7500,v.p.consume.Food[t("galaxy_embassy")]=-Oe),e.interstellar.zoo&&(Kt=bt.zoo*12e3,v.p.consume.Food[t("tech_zoo")]=-Kt));let Qe=R-X-se-de-he-y-z-E-te-Oe-Kt;if(v.p.Food[t("soldiers")]=q+"v",q>0&&(v.p.Food[`\u1102${t("quarantine")}+1`]=(V-1)*100+"%"),!L("Food",Qe*_)||e.race.fasting){if(e.race.anthropophagite&&e.resource[e.race.species].amount>1&&!e.race.fasting)e.resource[e.race.species].amount--,L("Food",1e4*b.anthropophagite.vars()[0]),e.stats.murders++;else if(A=!1,e.resource[e.race.species].amount>0){let et=1.25;e.race.slow_digestion&&(et+=b.slow_digestion.vars()[0]);let ke=ve("slitheryn");if(ke>0&&(et+=b.slow_digestion.vars(1)[0]*ke),e.race.humpback&&(et+=b.humpback.vars()[0]),e.race.fasting&&(et+=xe(e.civic.meditator.workers)*.03),e.race.atrophy&&(et-=b.atrophy.vars()[0]),Math.rand(0,10)===0)if(e.race.fasting){let Ae=e.resource[e.race.species].amount/100*ee-et;Ae<0&&(Ae=0),Ae%1>Math.random()?Ae=Math.ceil(Ae):Ae=Math.floor(Ae),Ae>e.resource[e.race.species].amount&&(Ae=e.resource[e.race.species].amount),e.resource[e.race.species].amount-=Ae,e.stats.starved+=Ae}else R1&&Math.rand(0,400)===0&&(e.resource[e.race.species].amount--,L("Food",1e4*b.anthropophagite.vars()[0]),e.stats.murders++)}if(e.portal.fortress&&e.portal.fortress.walls<100&&(L("Stone",-(200*_))&&(e.portal.fortress.repair++,v.p.consume.Stone[t("portal_fortress_name")]=-200),e.portal.fortress.repair>=O.portal.prtl_fortress.info.repair()&&(e.portal.fortress.repair=0,e.portal.fortress.walls++)),e.race.psychic&&e.resource.Energy.display){let p={},g=b.psychic.vars()[2];p[t("trait_psychic_name")]=g+"v",L("Energy",g*_),v.p.Energy=p}if(e.civic.homeless>0){let p=Math.min(e.civic.homeless,e.resource[e.race.species].max-e.resource[e.race.species].amount);e.civic.homeless-=p,e.resource[e.race.species].amount+=p}else if((A&&e.resource.Food.amount>0||e.race.fasting)&&e.resource[e.race.species].max>e.resource[e.race.species].amount&&!(e.race.artifical||e.race.spongy&&e.city.calendar.weather===0)){if(!(e.race.parasite&&e.city.calendar.wind===0&&!e.race.cataclysm&&!e.race.orbit_decayed)){if(!(e.race.vax&&e.race.vax>=100)){var x=e.tech.reproduction?e.tech.reproduction:0;e.tech.reproduction&&r.getMonth()===1&&r.getDate()===14&&(x+=5),e.race.fast_growth&&(x*=b.fast_growth.vars()[0],x+=b.fast_growth.vars()[1]),e.race.spores&&e.city.calendar.wind===1&&(e.race.parasite?x+=b.spores.vars()[2]:(x+=b.spores.vars()[0],x*=b.spores.vars()[1])),e.tech.reproduction&&e.tech.reproduction>=2&&e.city.hospital&&(x+=e.city.hospital.count),e.genes.birth&&(x+=e.genes.birth),e.race.promiscuous&&(x+=b.promiscuous.vars()[0]*e.race.promiscuous),e.race.fasting&&(x+=xe(e.civic.meditator.workers)*.15),e.city.banquet&&e.city.banquet.on&&e.city.banquet.count>=1&&(x*=1+e.city.banquet.strength**.75/100),a==="libra"&&(x*=1+Zt("libra")[0]/100),e.race.high_pop&&(x*=b.high_pop.vars()[2]),e.city.biome==="taiga"&&(x*=qe.taiga.vars()[1]);let p=e.city.ptrait.includes("toxic")?e.resource[e.race.species].amount*Re.toxic.vars()[1]:e.resource[e.race.species].amount;e.race.parasite&&(e.race.cataclysm||e.race.orbit_decayed)&&(x=Math.round(x/5),p*=3),Math.rand(0,p*(3-2**_))<=x&&e.resource[e.race.species].amount++}}}let La=0,fi=0;if(k.s_gate){let p=["freighter","super_freighter","minelayer","raider"];for(let g=0;g0:!0;if(k.s_gate&&R&&e[g][P]&&(e[g][P].crew>0||e[g][P].mil>0)){let G=0;if(O[g][q][P].ship.civ()>0&&(G=Math.floor(e[g][P].crew/O[g][q][P].ship.civ())),O[g][q][P].ship.mil()>0){let X=Math.floor(e[g][P].mil/O[g][q][P].ship.mil());(O[g][q][P].ship.civ()===0||Xe.resource.Helium_3.amount+(e.resource.Helium_3.diff>0?e.resource.Helium_3.diff*_:0)&&ee>0;)ee-=X,G--;L("Helium_3",-(ee*_)),La+=ee}if(O[g][q][P].ship.hasOwnProperty("deuterium")){let X=+ze(O[g][q][P].ship.deuterium).toFixed(2),ee=G*X;for(;ee*_>e.resource.Deuterium.amount+(e.resource.Deuterium.diff>0?e.resource.Deuterium.diff*_:0)&&ee>0;)ee-=X,G--;L("Deuterium",-(ee*_)),fi+=ee}we.hasOwnProperty(P)?we[P]=we[P]>G?G:we[P]:we[P]=G}else we[P]=0}}if(v.p.consume.Helium_3[t("galaxy_fuel_consume")]=-La,v.p.consume.Deuterium[t("galaxy_fuel_consume")]=-fi,e.space.shipyard&&e.space.shipyard.ships){let p={Oil:0,Helium_3:0,Uranium:0,Elerium:0};e.space.shipyard.ships.forEach(function(g){if(g.location!=="spc_dwarf"){let q=Rs(g);q.res&&q.burn>0?q.burn*_0?e.resource[q.res].diff*_:0)?(L(q.res,-(q.burn*_)),g.fueled=!0,p[q.res]+=q.burn):g.fueled=!1:g.fueled=!0}}),v.p.consume.Oil[t("outer_shipyard_fleet")]=-p.Oil,v.p.consume.Helium_3[t("outer_shipyard_fleet")]=-p.Helium_3,v.p.consume.Uranium[t("outer_shipyard_fleet")]=-p.Uranium,v.p.consume.Elerium[t("outer_shipyard_fleet")]=-p.Elerium}e.race.emfield&&(e.race.discharge&&e.race.discharge>0?e.race.discharge--:(e.race.emfield++,Math.rand(0,500)===0&&(e.race.discharge=e.race.emfield,e.race.emfield=1)));let oe=A?1:.5;if(e.race.angry&&A===!1&&(oe-=b.angry.vars()[0]/100),e.race.malnutrition&&A===!1&&(oe+=b.malnutrition.vars()[0]/100),e.resource.Furs.display){if(e.race.evil||e.race.artifical||e.race.unfathomable){let g=ti(),q=ye(e.civic.hunter.workers,"hunter");if(q*=$t(q,"hunting"),e.race.servants){let C=N(e.race.servants.jobs.hunter);C*=pr(e.race.servants.jobs.forager,"hunting"),q+=C}if(e.city.biome==="oceanic"?q*=qe.oceanic.vars()[2]:e.city.biome==="tundra"&&(q*=qe.tundra.vars()[0]),q*=g/20,q*=T("psychic_boost","Furs"),v.p.Furs[t(e.race.unfathomable?"job_raider":"job_hunter")]=q+"v",q>0&&(v.p.Furs[`\u1102${t("quarantine")}+0`]=(V-1)*100+"%"),L("Furs",q*oe*i*_*V),!e.race.soul_eater&&e.race.evil){let C=ye(e.civic.lumberjack.workers,"lumberjack");if(C*=$t(C,"lumberjack"),e.race.servants){let P=e.race.servants.jobs.lumberjack;P*=pr(e.race.servants.jobs.lumberjack,"lumberjack"),C+=P}C/=4,C*=T("psychic_boost","Furs"),v.p.Furs[t("job_reclaimer")]=C+"v",C>0&&(v.p.Furs[`\u1102${t("quarantine")}+1`]=(V-1)*100+"%"),L("Furs",C*oe*i*_*V)}}let p=mt(We(),"hunting")/10;if(e.city.biome==="oceanic"?p*=qe.oceanic.vars()[2]:e.city.biome==="tundra"&&(p*=qe.tundra.vars()[0]),p*=T("psychic_boost","Furs"),v.p.Furs[t("soldiers")]=p+"v",p>0&&(v.p.Furs[`\u1102${t("quarantine")}+2`]=(V-1)*100+"%"),L("Furs",p*oe*i*V*_),e.race.forager){let g=1+(e.tech.foraging?.5*e.tech.foraging:0),q=ye(e.civic.forager.workers,"forager");if(e.race.servants){let P=e.race.servants.jobs.forager;P*=pr(e.race.servants.jobs.forager,"forager"),q+=P}let C=q*g*.05*T("psychic_boost","Furs");v.p.Furs[t("job_forager")]=C+"v",C>0&&(v.p.Furs[`\u1102${t("quarantine")}+3`]=(V-1)*100+"%"),L("Furs",C*oe*V*_)}}if(e.resource.Furs.display&&e.tech.isolation&&e.tauceti.womling_farm){let p=e.tauceti.womling_farm.farmers*T("psychic_boost","Furs"),g=p*i;v.p.Furs[t("tau_red_womlings")]=p+"v",L("Furs",g)}if(e.race.unfathomable&&e.civic.hunter.display){let p=ti(),g=ye(e.civic.hunter.workers,"hunter");if(g*=$t(g,"hunting"),e.race.servants){let C=N(e.race.servants.jobs.hunter);C*=pr(e.race.servants.jobs.hunter,"hunting"),g+=xe(C)}g*=p/20,["Lumber","Chrysotile","Stone","Crystal","Copper","Iron","Aluminium","Cement","Coal","Oil","Uranium","Steel","Titanium","Alloy","Polymer","Iridium"].forEach(function(C){if(e.resource[C].display){let P=g*T("psychic_boost",C)*sr[C]/5;["Crystal","Uranium"].includes(C)?P*=.2:["Alloy","Polymer","Iridium"].includes(C)?P*=.35:["Steel","Cement"].includes(C)?P*=.85:["Titanium"].includes(C)&&(P*=.65),v.p[C][t(e.race.unfathomable?"job_raider":"job_hunter")]=P+"v",P>0&&(v.p[C][`\u1102${t("quarantine")}+99`]=(V-1)*100+"%"),L(C,P*oe*i*_*V)}})}{let p=e.tech.primitive&&e.tech.primitive>=3?1:0;e.race.ancient_ruins&&p++,e.stats.achieve.extinct_junker&&e.stats.achieve.extinct_junker.l>=1&&p++,e.city.ptrait.includes("magnetic")&&(p+=Re.magnetic.vars()[0]),e.race.ascended&&(p+=2);let g=ye(e.civic.professor.workers,"professor"),q=e.race.studious?e.civic.professor.impact+b.studious.vars()[0]:e.civic.professor.impact,C=ve("elven");C>0&&(q+=b.studious.vars(1)[0]*C),g*=q,g*=e.race.pompous?1-b.pompous.vars()[0]/100:1,g*=$t(ye(e.civic.professor.workers,"professor"),"science"),e.tech.anthropology&&e.tech.anthropology>=3&&(g*=1+(e.race.cataclysm||e.race.orbit_decayed?e.space.ziggurat?e.space.ziggurat.count:0:e.city.temple.count)*.05),e.civic.govern.type==="theocracy"&&(g*=1-$e.theocracy()[1]/100);let P=ye(e.civic.scientist.workers,"scientist");if(P*=e.civic.scientist.impact,P*=$t(ye(e.civic.scientist.workers,"scientist"),"science"),e.tech.science>=6&&e.city.wardenclyffe){let he=ye(e.civic.professor.workers,"professor");e.race.high_pop&&(he=xe(he)),P*=1+he*k.wardenclyffe*.01}e.space.satellite&&(P*=1+e.space.satellite.count*.01),e.civic.govern.type==="theocracy"&&(P*=1-$e.theocracy()[2]/100);let R=.05,G=ge("muckraker",2);G&&(R-=G/100),e.race.autoignition&&(R-=b.autoignition.vars()[0]/100,R<0&&(R=0));let X=e.city.library?1+e.city.library.count*R:1,ee=a==="gemini"?1+Zt("gemini")[0]/100:1,Z=0;if(e.arpa.sequence&&e.arpa.sequence.on&&e.arpa.sequence.time>0){let he=50+e.race.mutation*10;e.arpa.sequence.boost&&(he*=4),he*_<=e.resource.Knowledge.amount?(Z=he,wn=!0):wn=!1}else e.arpa.hasOwnProperty("sequence")&&e.arpa.sequence.time===null&&(e.arpa.sequence.time=e.arpa.sequence.max),wn=!1;let ae=e.tauceti.hasOwnProperty("womling_lab")?e.tauceti.womling_lab.scientist*(e.tech.womling_gene?10:8):0,se=e.tech.isolation?1+(U.infectious_disease_lab||0)*.75:1,de=g+P+ae;if(de*=oe*i,de+=p*i,de*=X*se,v.p.Knowledge[t("job_professor")]=g+"v",v.p.Knowledge[t("job_scientist")]=P+"v",v.p.Knowledge[t("tau_red_womlings")]=ae+"v",v.p.Knowledge[t("hunger")]=(oe-1)*100+"%",v.p.Knowledge[e.race.unfathomable?t("tech_moondial"):t("tech_sundial")]=p+"v",e.race.inspired&&(v.p.Knowledge[t("event_inspiration_bd")]="100%",de*=2),e.city.library&&(v.p.Knowledge[t("city_library")]=(X-1)*100+"%"),a==="gemini"&&(v.p.Knowledge[t(`sign_${a}`)]=(ee-1)*100+"%"),e.tech.isolation&&U.infectious_disease_lab&&(v.p.Knowledge[O.tauceti.tau_home.infectious_disease_lab.title()]=(se-1)*100+"%"),e.civic.govern.type==="technocracy"&&(v.p.Knowledge[t("govern_technocracy")]=$e.technocracy()[2]+"%",de*=1+$e.technocracy()[2]/100),Z>0&&(de-=Z,v.p.consume.Knowledge[t("genome_bd")]=-Z),L("Knowledge",de*_),e.tech.tau_gas2&&e.tech.tau_gas2>=6&&(!e.tech.alien_data||e.tech.alien_data<6)&&e.tauceti.alien_space_station&&k.alien_space_station){let he=e.tauceti.alien_space_station.focus/100*de;v.p.consume.Knowledge[t("tau_gas2_alien_station")]=-he,L("Knowledge",-he*_),e.tauceti.alien_space_station.decrypted+=+he.toFixed(3),e.stats.know+=+he.toFixed(0),e.tauceti.alien_space_station.decrypted>=(e.race.lone_survivor?1e6:25e7)&&!e.tech.alien_data?(e.tech.alien_data=1,I(t("tau_gas2_alien_station_data1",[t("tech_dist_womling")]),"success",!1,["progress"]),ue()):e.tauceti.alien_space_station.decrypted>=(e.race.lone_survivor?2e6:5e8)&&e.tech.alien_data&&e.tech.alien_data===1?(e.tech.alien_data=2,e.race.tau_food_item=Math.rand(0,10),I(t("tau_gas2_alien_station_data2",[t(`tau_gas2_alien_station_data2_r${e.race.tau_food_item||0}`)]),"success",!1,["progress"]),ue()):e.tauceti.alien_space_station.decrypted>=(e.race.lone_survivor?3e6:75e7)&&e.tech.alien_data&&e.tech.alien_data===2?(e.tech.alien_data=3,I(t("tau_gas2_alien_station_data3"),"success",!1,["progress"]),ue()):e.tauceti.alien_space_station.decrypted>=(e.race.lone_survivor?48e5:12e8)&&e.tech.alien_data&&e.tech.alien_data===3?(e.tech.alien_data=4,e.race.tau_junk_item=Math.rand(0,10),I(t("tau_gas2_alien_station_data4",[t(`tau_gas2_alien_station_data4_r${e.race.tau_junk_item||0}`)]),"success",!1,["progress"]),ue()):e.tauceti.alien_space_station.decrypted>=(e.race.lone_survivor?6e6:15e8)&&e.tech.alien_data&&e.tech.alien_data===4?(e.tech.alien_data=5,I(t("tau_gas2_alien_station_data5"),"success",!1,["progress"]),ue()):e.tauceti.alien_space_station.decrypted>=(e.race.lone_survivor?1e7:25e8)&&e.tech.alien_data&&e.tech.alien_data===5&&(e.tech.alien_data=6,e.tauceti.alien_space_station.decrypted=25e8,e.race.lone_survivor?(e.settings.tau.star=!0,e.tech.matrix=2,e.tauceti.ringworld={count:0},I(t("tau_gas2_alien_station_data6_alt"),"success",!1,["progress"])):I(t("tau_gas2_alien_station_data6"),"success",!1,["progress"]),ue())}}let Ja=0;if(e.city.factory){let p=(k.factory||0)+(k.red_factory||0)+(k.int_factory||0)*2+(U.tau_factory||0)*(e.tech.isolation?5:3),g=e.city.factory.on+(e.space.red_factory?e.space.red_factory.on:0)+(e.interstellar.int_factory?e.interstellar.int_factory.on*2:0)+(e.tauceti.tau_factory?e.tauceti.tau_factory.on*(e.tech.isolation?5:3):0),q=g>0?p/g:0,C=g;["Lux","Furs","Alloy","Polymer","Nano","Stanene"].forEach(function(G){C-=e.city.factory[G],C<0&&(e.city.factory[G]+=C,C=0)});let P=e.tech.factory||0,R=e.tech.isolation?1+(U.colony||0)*.5:1;if(e.city.factory.Lux&&e.city.factory.Lux>0){let G=e.city.factory.Lux*Be.Lux.fur[P]*q,X=e.city.factory.Lux;for(;G*_>e.resource.Furs.amount&&G>0;)G-=Be.Lux.fur[P]*q,X--;v.p.consume.Furs[t("city_factory")]=-G,L("Furs",-(G*_));let ee=xe(e.resource[e.race.species].amount)*Be.Lux.demand[P]*q;ee=Mc(ee);let Z=X*ee;e.race.gravity_well&&(Z=Xe(Z)),Ja=Z,e.race.discharge&&e.race.discharge>0&&(Z*=.5),Z*=i*oe,L("Money",Z*_)}if(e.city.factory.Furs&&e.city.factory.Furs>0){let G=Be.Furs.money[P]*q,X=Be.Furs.polymer[P]*q,ee=e.city.factory.Furs*G,Z=e.city.factory.Furs*X,ae=e.city.factory.Furs;for(;Z*_>e.resource.Polymer.amount&&Z>0;)Z-=X,ee-=G,ae--;for(;ee*_>e.resource.Money.amount&&ee>0;)Z-=X,ee-=G,ae--;v.p.consume.Money[t("city_factory")]=-ee,v.p.consume.Polymer[t("city_factory")]=-Z,L("Money",-(ee*_)),L("Polymer",-(Z*_));let se=ae*Be.Furs.output[P]*q*T("psychic_boost","Furs");e.race.toxic&&(se*=1+b.toxic.vars()[0]/100);let de=ve("shroomi");de>0&&(se*=1+b.toxic.vars(1)[0]/100*de),e.civic.govern.type==="corpocracy"&&(se*=1+$e.corpocracy()[4]/100),e.civic.govern.type==="socialist"&&(se*=1+$e.socialist()[1]/100),e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=2&&(se*=1.1);let he=se*R;if(he*=oe*i,e.race.gravity_well&&(he=Xe(he)),v.p.Furs[t("city_factory")]=se+"v",he>0&&(R>0&&(v.p.Furs[`\u1102${t("tau_home_colony")}`]=(R-1)*100+"%"),e.race.discharge&&e.race.discharge>0&&(he*=.5,v.p.Furs[`\u1102${t("evo_challenge_discharge")}`]="-50%"),e.tech.q_factory)){let y=(xt-1)/8+1;he*=y,v.p.Furs[`\u1102${t("quantum")}`]=(y-1)*100+"%"}e.race.gravity_well&&(v.p.Furs[`\u1102${t("evo_challenge_gravity_well")}+0`]=-((1-Xe(1))*100)+"%"),L("Furs",he*_)}if(e.city.factory.Alloy&&e.city.factory.Alloy>0){let G=e.city.factory.Alloy*Be.Alloy.copper[P]*q,X=e.city.factory.Alloy*Be.Alloy.aluminium[P]*q,ee=e.city.factory.Alloy;for(;G*_>e.resource.Copper.amount&&G>0;)G-=Be.Alloy.copper[P]*q,X-=Be.Alloy.aluminium[P]*q,ee--;for(;X*_>e.resource.Aluminium.amount&&X>0;)G-=Be.Alloy.copper[P]*q,X-=Be.Alloy.aluminium[P]*q,ee--;v.p.consume.Copper[t("city_factory")]=-G,v.p.consume.Aluminium[t("city_factory")]=-X,L("Copper",-(G*_)),L("Aluminium",-(X*_));let Z=ee*Be.Alloy.output[P]*q*T("psychic_boost","Alloy");e.race.toxic&&(Z*=1+b.toxic.vars()[0]/100);let ae=ve("shroomi");ae>0&&(Z*=1+b.toxic.vars(1)[0]/100*ae),e.tech.alloy&&(Z*=1.37),e.race.metallurgist&&(Z*=1+b.metallurgist.vars()[0]*e.race.metallurgist/100),e.civic.govern.type==="corpocracy"&&(Z*=1+$e.corpocracy()[4]/100),e.civic.govern.type==="socialist"&&(Z*=1+$e.socialist()[1]/100),e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=2&&(Z*=1.1);let se=Z*R;if(se*=oe*i,e.race.gravity_well&&(se=Xe(se)),v.p.Alloy[t("city_factory")]=Z+"v",se>0){if(R>0&&(v.p.Alloy[`\u1102${t("tau_home_colony")}`]=(R-1)*100+"%"),e.race.discharge&&e.race.discharge>0&&(se*=.5,v.p.Alloy[`\u1102${t("evo_challenge_discharge")}`]="-50%"),e.tech.q_factory){let de=(xt-1)/2+1;se*=de,v.p.Alloy[`\u1102${t("quantum")}`]=(de-1)*100+"%"}v.p.Alloy[t("hunger")]=(oe-1)*100+"%"}e.race.gravity_well&&(v.p.Alloy[`\u1102${t("evo_challenge_gravity_well")}+0`]=-((1-Xe(1))*100)+"%"),L("Alloy",se*_)}else v.p.Alloy=0;if(e.city.factory.Polymer&&e.city.factory.Polymer>0){let G=e.race.kindling_kindred||e.race.smoldering?Be.Polymer.oil_kk[P]*q:Be.Polymer.oil[P]*q,X=e.race.kindling_kindred||e.race.smoldering?0:Be.Polymer.lumber[P]*q,ee=e.city.factory.Polymer*G,Z=e.city.factory.Polymer*X,ae=e.city.factory.Polymer;for(;Z*_>e.resource.Lumber.amount&&Z>0;)Z-=X,ee-=G,ae--;for(;ee*_>e.resource.Oil.amount&&ee>0;)Z-=X,ee-=G,ae--;v.p.consume.Lumber[t("city_factory")]=-Z,v.p.consume.Oil[t("city_factory")]=-ee,L("Lumber",-(Z*_)),L("Oil",-(ee*_));let se=ae*Be.Polymer.output[P]*q*T("psychic_boost","Polymer");e.race.toxic&&(se*=1+b.toxic.vars()[0]/100);let de=ve("shroomi");de>0&&(se*=1+b.toxic.vars(1)[0]/100*de),e.tech.polymer>=2&&(se*=1.42),e.civic.govern.type==="corpocracy"&&(se*=1+$e.corpocracy()[4]/100),e.civic.govern.type==="socialist"&&(se*=1+$e.socialist()[1]/100),e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=2&&(se*=1.1);let he=se*R;if(he*=oe*i,e.race.gravity_well&&(he=Xe(he)),v.p.Polymer[t("city_factory")]=se+"v",he>0&&(R>0&&(v.p.Polymer[`\u1102${t("tau_home_colony")}`]=(R-1)*100+"%"),e.race.discharge&&e.race.discharge>0&&(he*=.5,v.p.Polymer[`\u1102${t("evo_challenge_discharge")}`]="-50%"),e.tech.q_factory)){let y=(xt-1)/2+1;he*=y,v.p.Polymer[`\u1102${t("quantum")}`]=(y-1)*100+"%"}e.race.gravity_well&&(v.p.Polymer[`\u1102${t("evo_challenge_gravity_well")}+0`]=-((1-Xe(1))*100)+"%"),L("Polymer",he*_)}if(k.s_gate&&e.galaxy.raider&&we.raider>0){let G=we.raider*2.3*T("psychic_boost","Polymer"),X=kt("gxy_chthonian"),ee=G*i*X*oe*S;v.p.Polymer[t("galaxy_raider")]=G+"v",G>0&&(v.p.Polymer[`\u1102${t("galaxy_piracy")}`]=-((1-X)*100)+"%",v.p.Polymer[`\u1102${t("space_red_ziggurat_title")}`]=(S-1)*100+"%"),L("Polymer",ee*_)}if(v.p.Polymer[t("hunger")]=(oe-1)*100+"%",e.city.factory.Nano&&e.city.factory.Nano>0){let G=Be.Nano_Tube.coal[P]*q,X=Be.Nano_Tube.neutronium[P]*q,ee=e.city.factory.Nano*G,Z=e.city.factory.Nano*X,ae=e.city.factory.Nano;for(;Z*_>e.resource.Neutronium.amount&&Z>0;)Z-=X,ee-=G,ae--;for(;ee*_>e.resource.Coal.amount&&ee>0;)Z-=X,ee-=G,ae--;v.p.consume.Coal[t("city_factory")]=-ee,v.p.consume.Neutronium[t("city_factory")]=-Z,L("Neutronium",-(Z*_)),L("Coal",-(ee*_));let se=ae*Be.Nano_Tube.output[P]*q*T("psychic_boost","Nano_Tube");e.race.toxic&&(se*=1+b.toxic.vars()[1]/100);let de=ve("shroomi");de>0&&(se*=1+b.toxic.vars(1)[1]/100*de),e.tech.polymer>=2&&(se*=1.42),e.civic.govern.type==="corpocracy"&&(se*=1+$e.corpocracy()[4]/100),e.civic.govern.type==="socialist"&&(se*=1+$e.socialist()[1]/100),e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=2&&(se*=1.1);let he=se*R;if(he*=oe*i,e.race.gravity_well&&(he=Xe(he)),v.p.Nano_Tube[t("city_factory")]=se+"v",he>0){if(R>0&&(v.p.Nano_Tube[`\u1102${t("tau_home_colony")}`]=(R-1)*100+"%"),e.race.discharge&&e.race.discharge>0&&(he*=.5,v.p.Nano_Tube[`\u1102${t("evo_challenge_discharge")}`]="-50%"),e.tech.q_factory){let y=(xt-1)/2+1;he*=y,v.p.Nano_Tube[`\u1102${t("quantum")}`]=(y-1)*100+"%"}v.p.Nano_Tube[t("hunger")]=(oe-1)*100+"%"}e.race.gravity_well&&(v.p.Nano_Tube[`\u1102${t("evo_challenge_gravity_well")}+0`]=-((1-Xe(1))*100)+"%"),L("Nano_Tube",he*_)}else v.p.Nano_Tube=0;if(e.city.factory.Stanene&&e.city.factory.Stanene>0){let G=Be.Stanene.aluminium[P]*q,X=Be.Stanene.nano[P]*q,ee=e.city.factory.Stanene*G,Z=e.city.factory.Stanene*X,ae=e.city.factory.Stanene;for(;ee*_>e.resource.Aluminium.amount&&ee>0;)Z-=X,ee-=G,ae--;for(;Z*_>e.resource.Nano_Tube.amount&&Z>0;)Z-=X,ee-=G,ae--;v.p.consume.Aluminium[t("city_factory")]=v.p.consume.Aluminium[t("city_factory")]?v.p.consume.Aluminium[t("city_factory")]-ee:-ee,v.p.consume.Nano_Tube[t("city_factory")]=-Z,L("Aluminium",-(ee*_)),L("Nano_Tube",-(Z*_));let se=ae*Be.Stanene.output[P]*q*T("psychic_boost","Stanene");e.race.toxic&&(se*=1+b.toxic.vars()[1]/100);let de=ve("shroomi");de>0&&(se*=1+b.toxic.vars(1)[1]/100*de),e.civic.govern.type==="corpocracy"&&(se*=1+$e.corpocracy()[4]/100),e.civic.govern.type==="socialist"&&(se*=1+$e.socialist()[1]/100),e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=2&&(se*=1.1);let he=se*R;if(he*=oe*i,e.race.gravity_well&&(he=Xe(he)),v.p.Stanene[t("city_factory")]=se+"v",he>0){if(R>0&&(v.p.Stanene[`\u1102${t("tau_home_colony")}`]=(R-1)*100+"%"),e.race.discharge&&e.race.discharge>0&&(he*=.5,v.p.Stanene[`\u1102${t("evo_challenge_discharge")}`]="-50%"),e.tech.q_factory){let y=(xt-1)/2+1;he*=y,v.p.Stanene[`\u1102${t("quantum")}`]=(y-1)*100+"%"}v.p.Stanene[t("hunger")]=(oe-1)*100+"%"}e.race.gravity_well&&(v.p.Stanene[`\u1102${t("evo_challenge_gravity_well")}+0`]=-((1-Xe(1))*100)+"%"),L("Stanene",he*_)}else v.p.Stanene=0}if(e.resource.Furs.display&&(v.p.Furs[t("hunger")]=(oe-1)*100+"%"),e.resource.Cement.display){let p=e.race.high_pop?3/b.high_pop.vars()[0]:3;e.city.biome==="ashland"&&(p*=qe.ashland.vars()[1]);let g=ye(e.civic.cement_worker.workers,"cement_worker")*p,q=ye(e.civic.cement_worker.workers,"cement_worker");for(;g*_>e.resource.Stone.amount&&g>0;)g-=p,q--;let C=e.tech.isolation?1+(U.colony||0)*.5:1;v.p.consume.Stone[t(e.tech.isolation?"job_cement_worker_bd":"city_cement_plant_bd")]=-g,L("Stone",-(g*_));let P=e.tech.cement>=4?1.2:1;P*=e.civic.cement_worker.impact,P*=$t(ye(e.civic.cement_worker.workers,"cement_worker"),"factory"),e.city.biome==="ashland"&&(P*=qe.ashland.vars()[1]),e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=3&&(P*=1.1);let R=q*P*T("psychic_boost","Cement");e.civic.govern.type==="corpocracy"&&(R*=1+$e.corpocracy()[4]/100),e.civic.govern.type==="socialist"&&(R*=1+$e.socialist()[1]/100);let G=1,X=1;if(e.city.powered&&k.cement_plant){let de=e.tech.cement>=6?.08:.05;G+=k.cement_plant*de,X+=de}let ee=1;if(e.tech.ai_core&&k.citadel>0){let de=+(xt/1.75).toFixed(1)/100;ee+=k.citadel*de}let Z=e.tech.isolation?1+U.mining_pit*.08:1,ae=e.tech.isolation?1:V;v.p.Cement[t(e.tech.isolation?"job_cement_worker_bd":"city_cement_plant_bd")]=R+"v",R>0&&(e.tech.isolation&&(v.p.Cement[`\u1102${t("tau_home_colony")}+0`]=(C-1)*100+"%",v.p.Cement[`\u1102${t("tau_home_mining_pit")}+0`]=(Z-1)*100+"%"),v.p.Cement[`\u1102${t("power")}+0`]=(G-1)*100+"%",v.p.Cement[`\u1102${t("quarantine")}+0`]=(ae-1)*100+"%"),e.race.discharge&&e.race.discharge>0&&k.cement_plant>0&&(G=(G-1)*.5+1,X=(X-1)*.5+1,v.p.Cement[`\u1102${t("evo_challenge_discharge")}`]="-50%");let se=R*ee*C*Z;e.city.cement_plant&&(e.city.cement_plant.cnvay=+(se*oe*ae*i*(X-1)).toFixed(5)),se*=G*oe*ae*i,e.tech.ai_core&&k.citadel>0&&(v.p.Cement[t("interstellar_citadel_effect_bd")]=(ee-1)*100+"%"),v.p.Cement[t("hunger")]=(oe-1)*100+"%",L("Cement",se*_)}let at=ka("metal"),zt=0,Ur=0,qt=0;if(e.city.smelter&&(e.city.smelter.count>0||e.race.cataclysm||e.race.orbit_decayed||e.tech.isolation)){let p=e.city.smelter.count;k.stellar_forge&&e.tech.star_forge&&e.tech.star_forge>=2&&(p+=k.stellar_forge*2),k.hell_forge&&(p+=k.hell_forge*3),k.ore_refinery&&(p+=k.ore_refinery*(e.tech.isolation?12:4)),e.tech.m_smelting&&e.space.hell_smelter&&(p+=e.space.hell_smelter.count*2),(e.race.cataclysm||e.race.orbit_decayed)&&e.space.geothermal&&(p+=e.space.geothermal.on),e.city.smelter.cap=p,e.tech.star_forge>=2?(e.city.smelter.StarCap=k.stellar_forge*2,e.city.smelter.Star=e.city.smelter.StarCap):e.city.smelter.StarCap=0,e.race.forge&&(e.city.smelter.Wood=0,e.city.smelter.Coal=0,e.city.smelter.Oil=e.city.smelter.cap-e.city.smelter.Star-e.city.smelter.Inferno),(e.race.kindling_kindred||e.race.smoldering)&&!e.race.evil&&(e.city.smelter.Wood=0);let g=e.race.kindling_kindred||e.race.smoldering?.15:.25,q=0;if(["Wood","Coal","Oil","Star","Inferno"].forEach(function(de){q+e.city.smelter[de]>e.city.smelter.cap&&(e.city.smelter[de]=e.city.smelter.cap-q),q+=e.city.smelter[de]}),e.city.smelter.Iron+e.city.smelter.Steel+e.city.smelter.Iridium>e.city.smelter.Wood+e.city.smelter.Coal+e.city.smelter.Oil+e.city.smelter.Star+e.city.smelter.Inferno){let de=e.city.smelter.Wood+e.city.smelter.Coal+e.city.smelter.Oil+e.city.smelter.Star+e.city.smelter.Inferno,he=e.city.smelter.Iron+e.city.smelter.Steel+e.city.smelter.Iridium-de;e.city.smelter.Iron-=he,e.city.smelter.Iron<0&&(he=e.city.smelter.Iron,e.city.smelter.Iron=0,e.city.smelter.Iridium+=he,e.city.smelter.Iridium<0&&(he=e.city.smelter.Iridium,e.city.smelter.Iridium=0),e.city.smelter.Steel+=he,e.city.smelter.Steel<0&&(e.city.smelter.Steel=0))}else if(e.city.smelter.Iron+e.city.smelter.Steel+e.city.smelter.Iridium=2);!(e.resource.Iridium.display&&de)&&!(e.resource.Steel.display&&e.tech.smelting>=2&&!e.race.steelen)&&e.city.smelter.Iron++}if(e.city.smelter.Star>e.city.smelter.StarCap){let de=e.city.smelter.Star-e.city.smelter.StarCap;e.city.smelter.Star=e.city.smelter.StarCap,e.city.smelter.Oil+=de}let C=e.race.forge?0:e.city.smelter.Wood*(e.race.evil&&(!e.race.soul_eater||e.race.species==="wendigo")?1:3),P=e.race.forge?0:e.city.smelter.Coal*g,R=e.race.forge?0:e.city.smelter.Oil*.35;zt=e.city.smelter.Iron;let G=e.city.smelter.Steel;qt=e.city.smelter.Iridium;let X=e.race.forge?e.city.smelter.Wood+e.city.smelter.Coal+e.city.smelter.Oil:e.city.smelter.Oil;Ur=e.city.smelter.Star;let ee=e.city.smelter.Inferno;for(e.race.steelen&&(zt+=G,G=0);zt+G+qt>e.city.smelter.Wood+e.city.smelter.Coal+e.city.smelter.Oil+e.city.smelter.Star+e.city.smelter.Inferno;)G>0?G--:zt>0?zt--:qt--;let Z=e.race.soul_eater&&e.race.species!=="wendigo"?"Food":e.race.evil?"Furs":"Lumber";for(;C*_>e.resource[Z].amount&&C>0;)C-=e.race.evil&&(!e.race.soul_eater||e.race.species==="wendigo")?1:3,G>0?G--:zt>0?zt--:qt--;for(;P*_>e.resource.Coal.amount&&P>0;)P-=g,G>0?G--:zt>0?zt--:qt--;for(;R*_>e.resource.Oil.amount&&R>0;)R-=.35,X--,G>0?G--:zt>0?zt--:qt--;if(ee>0){let de={Oil:35,Coal:50,Infernite:.5};Object.keys(de).forEach(function(y){for(;de[y]*ee*_>e.resource[y].amount&&ee>0;)ee--,G>0?G--:zt>0?zt--:qt--}),R+=de.Oil*ee,P+=de.Coal*ee;let he=de.Infernite*ee;v.p.consume.Infernite[t("city_smelter")]=-he,L("Infernite",-(he*_))}zt*=e.tech.smelting>=3?1.2:1,qt>0&&(qt=1+qt*.05);let ae=ge("dirty_jobs",2);ae&&(zt*=1+ae/100,qt*=1+ae/100),e.tech.smelting>=7&&(zt*=1.25,qt*=1.25),X>0&&(zt*=1+X/200,qt*=1+X/200),ee>0&&(zt*=1+ee/125,qt*=1+ee/125),Ur>0&&(zt*=1+Ur/500,qt*=1+Ur/75),e.race.pyrophobia&&(zt*=1-b.pyrophobia.vars()[0]/100,qt*=1-b.pyrophobia.vars()[0]/100);let se=ve("salamander");if(se>0&&(zt*=1+.2*se,qt*=1+.2*se),qt<1&&(qt=1),e.race.evil?e.race.soul_eater&&e.race.species!=="wendigo"&&!e.race.artifical?v.p.consume.Food[t("city_smelter")]=-C:v.p.consume.Furs[t("city_smelter")]=-C:v.p.consume.Lumber[t("city_smelter")]=-C,v.p.consume.Coal[t("city_smelter")]=-P,v.p.consume.Oil[t("city_smelter")]=-R,L(Z,-(C*_)),L("Coal",-(P*_)),L("Oil",-(R*_)),P>0&&e.tech.uranium&&e.tech.uranium>=3){let de=P;e.city.geology.Uranium&&(de*=e.city.geology.Uranium+1);let he=de/65/i*T("psychic_boost","Uranium");v.p.Uranium[t("city_coal_ash")]=v.p.Uranium[t("city_coal_ash")]?v.p.Uranium[t("city_coal_ash")]+he:he,L("Uranium",de*_/65)}if(e.resource.Steel.display){let de=G*2,he=G*.25;for(;de*_>e.resource.Iron.amount&&de>0||he*_>e.resource.Coal.amount&&he>0;)de-=2,he-=.25,G--;v.p.consume.Coal[t("city_smelter")]-=he,v.p.consume.Iron[t("city_smelter")]=-de,L("Iron",-(de*_)),L("Coal",-(he*_));let y=1;if(e.stats.achieve.steelen&&e.stats.achieve.steelen.l>=1){let te=e.stats.achieve.steelen.l*2/100;y*=1+te}for(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=2&&(y*=1.1),w=4;w<=6;w++)e.tech.smelting>=w&&(y*=1.2);e.tech.smelting>=7&&(y*=1.25),X>0&&(G*=1+X/200),ee>0&&(G*=1+ee/125),Ur&&(G*=1+Ur/500),ae&&(G*=1+ae/100),se>0&&(G*=1+.2*se);let z=G*y*T("psychic_boost","Steel");e.race.pyrophobia&&(z*=1-b.pyrophobia.vars()[0]/100);let E=z;if(E*=oe*i*at.mult,v.p.Steel[t("city_smelter")]=z+"v",v.p.Steel[t("city_shrine")]=((at.mult-1)*100).toFixed(1)+"%",v.p.Steel[t("hunger")]=(oe-1)*100+"%",L("Steel",E*_),e.tech.titanium&&e.tech.titanium>=1){let te=z*oe*T("psychic_boost","Titanium");Ur>0&&(E*=1+Ur/50),e.city.geology.Titanium&&(E*=e.city.geology.Titanium+1),e.city.biome==="oceanic"&&(E*=qe.oceanic.vars()[1]),E*=at.mult;let Oe=e.tech.titanium>=3?10:25;L("Titanium",E*_/Oe),v.p.Titanium[t("resource_Steel_name")]=te/Oe+"v"}}}let tr=e.race.truepath?"space":"interstellar";if(e[tr].g_factory&&e[tr].g_factory.count>0){let p=e.race.truepath?U.g_factory:bt.g_factory,g=e[tr].g_factory.on,q=g>0?p/g:0,C=g;(e.race.kindling_kindred||e.race.smoldering)&&(e[tr].g_factory.Lumber=0),["Oil","Coal","Lumber"].forEach(function(R){C-=e[tr].g_factory[R],C<0&&(e[tr].g_factory[R]+=C,C=0)});let P=e[tr].g_factory.Lumber+e[tr].g_factory.Coal+e[tr].g_factory.Oil;if(P>0){let R=e[tr].g_factory.Lumber*350*q,G=e[tr].g_factory.Coal*25*q,X=e[tr].g_factory.Oil*15*q;for(;R*_>e.resource.Lumber.amount&&R>0;)R-=350*q,P--;for(;G*_>e.resource.Coal.amount&&G>0;)G-=25*q,P--;for(;X*_>e.resource.Oil.amount&&X>0;)X-=15*q,P--;P*=T("g_factory")*T("psychic_boost","Graphene"),v.p.consume.Lumber[t("interstellar_g_factory_bd")]=-R,v.p.consume.Coal[t("interstellar_g_factory_bd")]=-G,v.p.consume.Oil[t("interstellar_g_factory_bd")]=-X,L("Lumber",-(R*_)),L("Coal",-(G*_)),L("Oil",-(X*_)),e.civic.govern.type==="corpocracy"&&(P*=1+$e.corpocracy()[4]/100),e.civic.govern.type==="socialist"&&(P*=1+$e.socialist()[1]/100);let ee=1;if(e.tech.ai_core>=3){let se=+(xt/5).toFixed(1)/100;ee+=se*k.citadel}let Z=e.race.truepath?yt("spc_titan"):1,ae=P*ee*S*oe*i*Z*q;v.p.Graphene[t("interstellar_g_factory_bd")]=P+"v",e.tech.isolation&&P>0&&(ae*=st,st>1&&(v.p.Graphene[`\u1102${t("tau_red_womlings")}+0`]=(st-1)*100+"%")),P>0&&(v.p.Graphene[`\u1102${t("space_syndicate")}`]=-((1-Z)*100)+"%",v.p.Graphene[`\u1102${t("space_red_ziggurat_title")}`]=(S-1)*100+"%"),e.race.discharge&&e.race.discharge>0&&(ae*=.5,v.p.Graphene[`\u1102${t("evo_challenge_discharge")}`]="-50%"),k.citadel>0&&(v.p.Graphene[t("interstellar_citadel_effect_bd")]=(ee-1)*100+"%"),v.p.Graphene[t("hunger")]=(oe-1)*100+"%",L("Graphene",ae*_)}else v.p.Graphene=0}if(e.galaxy.vitreloy_plant&&k.vitreloy_plant>0){let p=k.vitreloy_plant*5e4,g=k.vitreloy_plant*2.5,q=k.vitreloy_plant*100,C=k.vitreloy_plant;for(;p*_>e.resource.Money.amount&&p>0;)p-=350,C--;for(;g*_>e.resource.Bolognium.amount&&g>0;)g-=25,C--;for(;q*_>e.resource.Stanene.amount&&q>0;)q-=15,C--;if(C>0){C*=T("vitreloy_plant")*T("psychic_boost","Vitreloy"),v.p.consume.Money[t("galaxy_vitreloy_plant_bd")]=-p,v.p.consume.Bolognium[t("galaxy_vitreloy_plant_bd")]=-g,v.p.consume.Stanene[t("galaxy_vitreloy_plant_bd")]=-q,L("Money",-(p*_)),L("Bolognium",-(g*_)),L("Stanene",-(q*_));let P=kt("gxy_alien1");v.p.Vitreloy[t("galaxy_vitreloy_plant_bd")]=C+"v",e.race.discharge&&e.race.discharge>0&&(C*=.5,v.p.Vitreloy[`\u1102${t("evo_challenge_discharge")}`]="-50%"),C>0&&(v.p.Vitreloy[`\u1102${t("galaxy_piracy")}+0`]=-((1-P)*100)+"%",v.p.Vitreloy[`\u1102${t("space_red_ziggurat_title")}+0`]=(S-1)*100+"%"),L("Vitreloy",C*oe*i*P*_*S)}}if(k.s_gate&&e.galaxy.raider&&we.raider>0){let p=we.raider*.05*T("psychic_boost","Vitreloy"),g=kt("gxy_chthonian"),q=p*i*g*oe*S;v.p.Vitreloy[t("galaxy_raider")]=p+"v",p>0&&(v.p.Vitreloy[`\u1102${t("galaxy_piracy")}+1`]=-((1-g)*100)+"%",v.p.Vitreloy[`\u1102${t("space_red_ziggurat_title")}+1`]=(S-1)*100+"%"),L("Vitreloy",q*_)}if(v.p.Vitreloy[t("hunger")]=(oe-1)*100+"%",!e.tech.isolation&&e.space.lander&&e.space.crashed_ship&&e.space.crashed_ship.count===100){let p=yt("spc_triton"),g=U.lander*T("lander"),q=g*i*p*oe;v.p.Cipher[t("space_lander_title")]=g+"v",v.p.Cipher[`\u1102${t("space_syndicate")}+0`]=-((1-p)*100)+"%",v.p.Cipher[`\u1102${t("hunger")}`]=(oe-1)*100+"%",L("Cipher",q*_),e.resource.Cipher.display&&e.tech.outer&&e.tech.outer===2&&(e.tech.outer=3,ue())}if(!e.tech.isolation&&e.space.digsite&&e.space.digsite.count===100){e.tech.dig_control||(e.tech.dig_control=1,ue());let p=yt("spc_eris"),g=U.shock_trooper*T("shock_trooper"),q=U.tank*T("tank");U.shock_trooper&&(v.p.Cipher[t("space_shock_trooper_title")]=g+"v",v.p.Cipher[`\u1102${t("space_syndicate")}+1`]=-((1-p)*100)+"%"),U.tank&&(v.p.Cipher[t("space_tank_title")]=q+"v",v.p.Cipher[`\u1102${t("space_syndicate")}+2`]=-((1-p)*100)+"%");let C=(g+q)*i*p;L("Cipher",C*_)}if(e.tech.isolation&&e.tauceti.alien_outpost&&k.alien_outpost){let p=T("alien_outpost"),g=1+(U.colony||0)*.5;v.p.Cipher[t("tech_alien_outpost")]=p+"v",p>0&&(v.p.Cipher[`\u1102${t("tau_home_colony")}`]=(g-1)*100+"%");let q=p*i*g;L("Cipher",q*_)}let nt={};if(e.tauceti.ore_refinery&&e.tauceti.mining_ship&&e.tech.tau_roid&&e.tech.tau_roid>=4){if(e.tauceti.ore_refinery.max=e.tauceti.ore_refinery.count*1e3,e.tauceti.ore_refinery.fill>0){let g=k.ore_refinery*T("ore_refinery");g>e.tauceti.ore_refinery.fill&&(g=e.tauceti.ore_refinery.fill),e.tauceti.ore_refinery.fill-=g*_;let q=e.tech.tau_roid>=5?.6:.64,C=e.tech.tau_roid>=5?.35:.36;nt.iron=g*q*(100-e.tauceti.mining_ship.common)/100*T("mining_ship_ore","iron")*T("psychic_boost","Iron"),nt.aluminium=g*q*e.tauceti.mining_ship.common/100*T("mining_ship_ore","aluminium")*T("psychic_boost","Aluminium"),nt.iridium=g*C*(100-e.tauceti.mining_ship.uncommon)/100*T("mining_ship_ore","iridium")*T("psychic_boost","Iridium"),nt.neutronium=g*C*e.tauceti.mining_ship.uncommon/100*T("mining_ship_ore","neutronium")*T("psychic_boost","Neutronium"),e.tech.tau_roid>=5&&(nt.orichalcum=g*.05*(100-e.tauceti.mining_ship.rare)/10*T("mining_ship_ore","orichalcum")*T("psychic_boost","Orichalcum"),nt.elerium=g*.05*e.tauceti.mining_ship.rare/10*T("mining_ship_ore","elerium")*T("psychic_boost","Elerium"))}let p=U.mining_ship*T("mining_ship");e.tauceti.ore_refinery.fill+=p*_,e.tauceti.ore_refinery.fill>e.tauceti.ore_refinery.max&&(e.tauceti.ore_refinery.fill=e.tauceti.ore_refinery.max)}if(e.race.cataclysm||e.race.orbit_decayed){if(e.tech.mars&&U.biodome&&!e.race.kindling_kindred&&!e.race.smoldering){let p=U.biodome*ye(e.civic.colonist.workers,"colonist")*T("biodome","lumber")*T("psychic_boost","Lumber");v.p.Lumber[O.space.spc_red.biodome.title()]=p+"v",p>0&&(v.p.Lumber[`\u1102${t("space_red_ziggurat_title")}`]=(S-1)*100+"%"),v.p.Lumber[t("hunger")]=(oe-1)*100+"%",L("Lumber",p*oe*i*_*S)}}else if(e.race.soul_eater&&e.race.species!=="wendigo"&&e.race.evil){let p=ti(),g=ye(e.civic.hunter.workers,"hunter");if(g*=$t(g,"hunting"),e.race.servants){let C=N(e.race.servants.jobs.hunter);C*=pr(e.race.servants.jobs.hunter,"hunting"),g+=xe(C)}g*=p/2,g*=T("psychic_boost","Lumber");let q=mt(We(),"hunting")/3;q*=T("psychic_boost","Lumber"),v.p.Lumber[t(e.race.unfathomable?"job_raider":"job_hunter")]=g+"v",v.p.Lumber[t("soldiers")]=q+"v",v.p.Lumber[t("hunger")]=(oe-1)*100+"%",L("Lumber",g*oe*i*_),L("Lumber",q*oe*i*_)}else if(e.race.evil){let p=ye(e.civic.lumberjack.workers,"lumberjack");if(p*=$t(p,"lumberjack"),e.race.servants){let C=e.race.servants.jobs.lumberjack;C*=pr(e.race.servants.jobs.lumberjack,"lumberjack"),p+=C}p*=T("psychic_boost","Lumber");let g=1;e.city.graveyard&&(g+=e.city.graveyard.count*.08);let q=mt(We(),"hunting")/5;if(q*=T("psychic_boost","Lumber"),v.p.Lumber[t("job_reclaimer")]=p+"v",p>0&&(v.p.Lumber[`\u1102${t("city_graveyard")}`]=(g-1)*100+"%",v.p.Lumber[`\u1102${t("quarantine")}+0`]=(V-1)*100+"%"),v.p.Lumber[t("soldiers")]=q+"v",q>0&&(v.p.Lumber[`\u1102${t("quarantine")}+1`]=(V-1)*100+"%"),e.race.forager){let C=1,P=ye(e.civic.forager.workers,"forager");if(e.race.servants){let G=e.race.servants.jobs.forager;G*=pr(e.race.servants.jobs.forager,"forager"),P+=G}let R=P*C*.25;v.p.Lumber[t("job_forager")]=R+"v",R>0&&(v.p.Lumber[`\u1102${t("quarantine")}+2`]=(V-1)*100+"%"),L("Lumber",R*oe*i*V*_)}v.p.Lumber[t("hunger")]=(oe-1)*100+"%",L("Lumber",p*oe*g*i*V*_),L("Lumber",q*oe*i*V*_)}else{let p=ye(e.civic.lumberjack.workers,"lumberjack");if(p*=$t(p,"lumberjack"),e.race.servants){let G=e.race.servants.jobs.lumberjack;G*=pr(e.race.servants.jobs.lumberjack,"lumberjack"),p+=G}p*=e.city.biome==="forest"?qe.forest.vars()[0]:1,p*=e.city.biome==="savanna"?qe.savanna.vars()[2]:1,p*=e.city.biome==="desert"?qe.desert.vars()[2]:1,p*=e.city.biome==="swamp"?qe.swamp.vars()[2]:1,p*=e.city.biome==="taiga"?qe.taiga.vars()[0]:1,p*=e.civic.lumberjack.impact,e.race.living_tool?p*=b.living_tool.vars()[0]*(e.tech.science&&e.tech.science>0?e.tech.science*.25:0)+1:p*=(e.tech.axe&&e.tech.axe>1?(e.tech.axe-1)*.35:0)+1,p*=T("psychic_boost","Lumber");let g=1;if(e.city.sawmill){let G=e.tech.saw>=2?.08:.05;g*=e.city.sawmill.count*G+1}let q=1,C=1;e.city.powered&&e.city.sawmill&&k.sawmill&&(q+=k.sawmill*.04,C+=.04);let P=1;e.city.lumber_yard&&(P+=e.city.lumber_yard.count*.02),v.p.Lumber[t("job_lumberjack")]=p+"v",p>0&&(v.p.Lumber[`\u1102${t("city_lumber_yard")}`]=(P-1)*100+"%",v.p.Lumber[`\u1102${t("city_sawmill")}`]=(g-1)*100+"%",v.p.Lumber[`\u1102${t("power")}`]=(q-1)*100+"%",v.p.Lumber[`\u1102${t("quarantine")}+0`]=(V-1)*100+"%"),e.race.discharge&&e.race.discharge>0&&k.sawmill>0&&(q=(q-1)*.5+1,C=(C-1)*.5+1,v.p.Lumber[`\u1102${t("evo_challenge_discharge")}`]="-50%");let R=p*g*P;if(e.city.sawmill&&(e.city.sawmill.psaw=+(R*oe*V*i*(C-1)).toFixed(5)),R*=q*oe*V*i,e.race.forager){let G=1,X=ye(e.civic.forager.workers,"forager");if(e.race.servants){let Z=e.race.servants.jobs.forager;Z*=pr(e.race.servants.jobs.forager,"forager"),X+=Z}let ee=X*G*.25*T("psychic_boost","Lumber");v.p.Lumber[t("job_forager")]=ee+"v",L("Lumber",ee*oe*i*_)}v.p.Lumber[t("hunger")]=(oe-1)*100+"%",L("Lumber",R*_)}let Te=e.city.metal_refinery?e.city.metal_refinery.count*6:0;if(Te*=V,e.race.sappy){if(e.tech.mining&&e.resource[e.race.species].amount>0){let p=e.resource[e.race.species].amount*b.sappy.vars()[0]*T("psychic_boost","Stone");e.race.high_pop&&(p=xe(p));let g=ve("cacti");if(g>0&&(p*=1+.32*g),v.p.Stone[tt("name")]=p+"v",e.city.hasOwnProperty("basic_housing")){let P=e.city.basic_housing.count*.025;p*=1+P,v.p.Stone[`\u1102${St("small")}`]=P*100+"%"}let q=0;e.civic.hasOwnProperty("garrison")&&(q=e.civic.garrison.workers*b.sappy.vars()[0],e.race.high_pop&&(q=xe(q)),v.p.Stone[t("soldiers")]=q+"v");let C=(p+q)*oe*i;v.p.Stone[t("hunger")]=(oe-1)*100+"%",L("Stone",C*_)}}else{let p=ye(e.civic.quarry_worker.workers,"quarry_worker");p*=$t(p,"miner");let g=ve("cacti");if(g>0&&(p*=1+.32*g),e.race.servants){let X=e.race.servants.jobs.quarry_worker;X*=pr(e.race.servants.jobs.quarry_worker,"miner"),p+=X}p*=e.civic.quarry_worker.impact*T("psychic_boost","Stone"),e.race.living_tool?p*=b.living_tool.vars()[0]*(e.tech.science&&e.tech.science>0?e.tech.science*.06:0)+1:p*=(e.tech.hammer&&e.tech.hammer>0?e.tech.hammer*.4:0)+1,e.city.biome==="desert"&&(p*=qe.desert.vars()[0]),e.city.biome==="swamp"&&(p*=qe.swamp.vars()[3]),e.tech.explosives&&e.tech.explosives>=2&&(p*=e.tech.explosives>=3?1.75:1.5);let q=0;e.race.smoldering&&e.resource.Chrysotile.display&&e.city.rock_quarry&&(q=p*T("psychic_boost","Chrysotile"),p*=(100-e.city.rock_quarry.asbestos)/100,q*=e.city.rock_quarry.asbestos/100);let C=1,P=1,R=1;e.city.rock_quarry&&(e.city.rock_quarry.on&&(C+=k.rock_quarry*.04,P+=.04),R+=e.city.rock_quarry.count*.02),v.p.Stone[t("workers")]=p+"v",p>0&&(v.p.Stone[`\u1102${t("city_rock_quarry")}`]=(R-1)*100+"%",v.p.Stone[`\u1102${t("power")}`]=(C-1)*100+"%",v.p.Stone[`\u1102${t("quarantine")}+0`]=(V-1)*100+"%"),e.race.smoldering&&e.resource.Chrysotile.display&&(v.p.Chrysotile[t("workers")]=q+"v",q>0&&(v.p.Chrysotile[`\u1102${t("city_rock_quarry")}`]=(R-1)*100+"%",v.p.Chrysotile[`\u1102${t("power")}`]=(C-1)*100+"%")),e.race.discharge&&e.race.discharge>0&&k.rock_quarry>0&&(C=(C-1)*.5+1,P=(P-1)*.5+1,v.p.Stone[`\u1102${t("evo_challenge_discharge")}`]="-50%",e.race.smoldering&&e.resource.Chrysotile.display&&(v.p.Chrysotile[`\u1102${t("evo_challenge_discharge")}`]="-50%")),(e.race.cataclysm||e.race.orbit_decayed)&&(e.tech.mars&&U.red_mine&&(p=U.red_mine*ye(e.civic.colonist.workers,"colonist")*T("red_mine","stone")*T("psychic_boost","Stone"),v.p.Stone[t("space_red_mine_title")]=p+"v",p>0&&(v.p.Stone[`\u1102${t("space_red_ziggurat_title")}`]=(S-1)*100+"%"),e.race.smoldering&&e.resource.Chrysotile.display&&(q=U.red_mine*ye(e.civic.colonist.workers,"colonist")*T("red_mine","asbestos")*T("psychic_boost","Chrysotile"),v.p.Chrysotile[t("space_red_mine_title")]=q+"v",q>0&&(v.p.Chrysotile[`\u1102${t("space_red_ziggurat_title")}`]=(S-1)*100+"%"),q*=S),p*=S),C=1,P=1,R=1);let G=p*R;if(e.city.rock_quarry&&(e.city.rock_quarry.cnvay=+(G*oe*V*i*(P-1)).toFixed(5)),G*=C*oe*V*i,e.race.forager&&e.resource.Stone.display){let X=1,ee=ye(e.civic.forager.workers,"forager");if(e.race.servants){let ae=e.race.servants.jobs.forager;ae*=pr(e.race.servants.jobs.forager,"forager"),ee+=ae}let Z=ee*X*.22*T("psychic_boost","Stone");v.p.Stone[t("job_forager")]=Z+"v",Z>0&&(v.p.Stone[`\u1102${t("quarantine")}+1`]=(V-1)*100+"%"),L("Stone",Z*oe*i*V*_)}if(v.p.Stone[t("hunger")]=(oe-1)*100+"%",L("Stone",G*_),e.race.smoldering&&e.resource.Chrysotile.display){let X=q*C*R;X*=oe*i,v.p.Chrysotile[t("hunger")]=(oe-1)*100+"%",L("Chrysotile",X*_)}if(e.city.metal_refinery&&e.city.metal_refinery.count>0||e.race.cataclysm||e.race.orbit_decayed){let X=p*R*(e.race.cataclysm?.16:.08);e.city.geology.Aluminium&&(X*=e.city.geology.Aluminium+1),X*=T("psychic_boost","Aluminium");let ee=X*at.mult*oe*V*i;if(e.city.metal_refinery.cnvay=+(ee*(P-1)).toFixed(5),e.city.rock_quarry.almcvy=e.city.metal_refinery.cnvay,ee*=C,e.tech.alumina>=2){Te+=k.metal_refinery*6*V;let Z=6*V/100;e.city.metal_refinery.pwr=+(ee*Z).toFixed(5)}ee*=1+Te/100,v.p.Aluminium[`${e.race.cataclysm||e.race.orbit_decayed?t("space_red_mine_title"):t("workers")}+1`]=X+"v",X>0&&(v.p.Aluminium[`\u1102${t("quarantine")}+0`]=(V-1)*100+"%"),v.p.Aluminium[t("city_shrine")]=((at.mult-1)*100).toFixed(1)+"%",v.p.Aluminium[t("hunger")]=(oe-1)*100+"%",L("Aluminium",ee*_)}}if(e.resource.Water.display){if(U.water_freighter){let p=yt("spc_enceladus"),g=T("water_freighter")*U.water_freighter*T("psychic_boost","Water"),q=g*oe*i*p*S;v.p.Water[t("space_water_freighter_title")]=g+"v",g>0&&(v.p.Water[`\u1102${t("space_syndicate")}`]=-((1-p)*100)+"%",v.p.Water[`\u1102${t("space_red_ziggurat_title")}`]=(S-1)*100+"%",v.p.Water[`\u1102${t("hunger")}`]=(oe-1)*100+"%"),L("Water",q*_)}if(e.tech.isolation&&e.tauceti.tau_farm&&k.tau_farm){let p=1+(U.colony||0)*.5,g=T("tau_farm","water")*k.tau_farm*T("psychic_boost","Water"),q=g*i*p;v.p.Water[t("tau_home_tau_farm")]=g+"v",g>0&&(v.p.Water[`\u1102${t("tau_home_colony")}`]=(p-1)*100+"%"),L("Water",q*_)}}if(e.resource.Mana.display){if(e.race.casting&&["farmer","miner","lumberjack","science","factory","army","hunting","crafting"].forEach(function(p){if(e.race.casting[p]&&e.race.casting[p]>0){let g=di(e.race.casting[p]);v.p.consume.Mana[t(`modal_pylon_spell_${p}`)]=-g;let q=e.resource.Mana.diff>0?e.resource.Mana.diff*_:0;L("Mana",-(g*_),!1,q)||e.race.casting[p]--}else delete v.p.consume.Mana[t(`modal_pylon_spell_${p}`)]}),e.city.pylon||e.space.pylon||e.tauceti.pylon){let p=0,g="city_pylon";(e.race.cataclysm||e.race.orbit_decayed)&&e.space.pylon?(p=e.space.pylon.count*.005,g="space_red_pylon"):e.tech.isolation&&e.tauceti.pylon?(p=e.tauceti.pylon.count*.0125,g="tau_home_pylon"):e.city.pylon&&(p=e.city.pylon.count*.01),p*=ft("magic");let q=p*oe*i;if(v.p.Mana[t(g)]=p+"v",e.tech.nexus){let C=e.tech.nexus*5;q*=1+C/100,v.p.Mana[`\u1102${t("arpa_projects_nexus_title")}`]=C+"%"}L("Mana",q*_)}if(e.tech.cleric&&e.civic.priest.display){let p=ye(e.civic.priest.workers,"priest")*.0025;e.race.high_pop&&(p=xe(p)),p*=ft("magic");let g=p*oe*i;v.p.Mana[t("job_priest")]=p+"v",L("Mana",g*_)}if(e.race.universe==="magic"&&e.civic.scientist.display){let p=ye(e.civic.scientist.workers,"scientist")*.025;e.race.high_pop&&(p=xe(p)),p*=ft("magic");let g=p*oe*i;v.p.Mana[t("job_wizard")]=p+"v",e.civic.govern.type==="magocracy"&&(g*=1+$e.magocracy()[0]/100,v.p.Mana[`\u1102${t("govern_magocracy")}`]=$e.magocracy()[0]+"%"),L("Mana",g*_)}if(e.race.universe==="magic"&&e.tech.syphon){let p=e.tech.syphon/3;p*=ft("magic");let g=p*oe*i;v.p.Mana[t("arpa_syphon_title")]=p+"v",L("Mana",g*_)}v.p.Mana[t("hunger")]=(oe-1)*100+"%"}if(e.resource.Crystal.display){let p=ye(e.civic.crystal_miner.workers,"crystal_miner");if(p*=$t(p,"miner"),e.race.servants){let q=e.race.servants.jobs.crystal_miner;q*=pr(e.race.servants.jobs.crystal_miner,"miner"),p+=q}if(p*=e.civic.crystal_miner.impact*T("psychic_boost","Crystal"),v.p.Crystal[t("job_crystal_miner")]=p+"v",e.civic.govern.type==="magocracy"){let q=$e.magocracy()[1];p*=1+q/100,v.p.Crystal[`\u1102${t("govern_magocracy")}`]=`${q}%`}let g=p*oe*i;v.p.Crystal[t("hunger")]=(oe-1)*100+"%",L("Crystal",g*_)}if(e.resource.Copper.display||e.resource.Iron.display){let p=ye(e.civic.miner.workers,"miner");p*=$t(p,"miner"),p*=e.civic.miner.impact,e.race.tough&&(p*=1+b.tough.vars()[0]/100);let g=ve("ogre");if(g>0&&(p*=1+b.tough.vars(1)[0]/100*g),e.race.industrious){let P=1+b.industrious.vars()[0]*e.race.industrious/100;p*=P}e.city.ptrait.includes("dense")&&(p*=Re.dense.vars()[0]),e.city.ptrait.includes("permafrost")&&(p*=Re.permafrost.vars()[0]),e.race.living_tool||(p*=(e.tech.pickaxe&&e.tech.pickaxe>0?e.tech.pickaxe*.15:0)+1),e.tech.explosives&&e.tech.explosives>=2&&(p*=e.tech.explosives>=3?1.4:1.25);let q=1,C=1;if(e.city.mine.on&&(q+=k.mine*.05,C+=1.05),e.resource.Copper.display){let P=.14285714285714285;e.tech.copper&&(P*=1.2);let R=p*P*T("psychic_boost","Copper");e.city.geology.Copper&&(R*=e.city.geology.Copper+1),e.city.biome==="volcanic"?R*=qe.volcanic.vars()[1]:e.city.biome==="ashland"&&(R*=qe.ashland.vars()[2]);let G=q,X=C;v.p.Copper[t("job_miner")]=R+"v",R>0&&(v.p.Copper[`\u1102${t("power")}`]=(G-1)*100+"%",v.p.Copper[`\u1102${t("quarantine")}+0`]=(V-1)*100+"%",e.race.discharge&&e.race.discharge>0&&k.mine>0&&(G=(G-1)*.5+1,X=(X-1)*.5+1,v.p.Copper[`\u1102${t("evo_challenge_discharge")}`]="-50%"));let ee=R*at.mult;if(e.city.mine.cpow=+(ee*oe*V*i*(X-1)).toFixed(5),ee*=G*oe*V*i,L("Copper",ee*_),e.race.forager&&e.tech.dowsing){let Z=e.tech.dowsing>=2?5:1,ae=ye(e.civic.forager.workers,"forager");if(e.race.servants){let de=e.race.servants.jobs.forager;de*=pr(e.race.servants.jobs.forager,"forager"),ae+=de}let se=ae*Z*.025*T("psychic_boost","Copper");e.city.geology.Copper&&(se*=e.city.geology.Copper+1),e.city.biome==="volcanic"?se*=qe.volcanic.vars()[1]:e.city.biome==="ashland"&&(se*=qe.ashland.vars()[2]),v.p.Copper[t("job_forager")]=se+"v",se>0&&(v.p.Copper[`\u1102${t("quarantine")}+1`]=(V-1)*100+"%"),L("Copper",se*oe*i*V*_)}}if(e.resource.Iron.display){let R=p*.25*T("psychic_boost","Iron");e.race.iron_allergy&&(R*=1-b.iron_allergy.vars()[0]/100);let G=1+zt*.1;e.city.geology.Iron&&(R*=e.city.geology.Iron+1),e.city.biome==="volcanic"?R*=qe.volcanic.vars()[2]:e.city.biome==="ashland"&&(R*=qe.ashland.vars()[2]);let X=0,ee=yt("spc_belt");U.iron_ship&&(X=U.iron_ship*T("iron_ship")*T("psychic_boost","Iron"),X*=ee);let Z=q,ae=q;v.p.Iron[t("job_miner")]=R+"v",R>0&&(v.p.Iron[`\u1102${t("power")}`]=(Z-1)*100+"%",e.race.discharge&&e.race.discharge>0&&k.mine>0&&(Z=(Z-1)*.5+1,ae=(ae-1)*.5+1,v.p.Iron[`\u1102${t("evo_challenge_discharge")}`]="-50%"),v.p.Iron[`\u1102${t("quarantine")}+0`]=(V-1)*100+"%");let se=0,de=0;if(e.tech.isolation&&e.race.lone_survivor){{let z=ye(e.civic.pit_miner.workers,"pit_miner");z*=$t(z,"miner");let E=1+(U.colony||0)*.5,te=z*T("psychic_boost","Iron");te*=T("mining_pit","iron"),se=te*E,v.p.Iron[t("job_pit_miner")]=te+"v",te>0&&(v.p.Iron[`\u1102${t("tau_home_colony")}`]=(E-1)*100+"%")}if(e.tauceti.hasOwnProperty("womling_mine")&&e.tauceti.hasOwnProperty("overseer")){let z=e.tauceti.overseer.prod/100,E=e.tauceti.womling_mine.miners*T("womling_mine","iron")*T("psychic_boost","Iron");v.p.Iron[t("tau_red_womlings")]=E+"v",de=E*z,E>0&&(v.p.Iron[`\u1102${t("tau_red_womling_prod_label")}`]=-((1-z)*100)+"%")}}v.p.Iron[t("job_space_miner")]=X+"v",X>0&&(v.p.Iron[`\u1102${t("space_syndicate")}`]=-((1-ee)*100)+"%",v.p.Iron[`\u1102${t("space_red_ziggurat_title")}`]=(S-1)*100+"%",v.p.Iron[`\u1102${t("quarantine")}+1`]=(ce-1)*100+"%"),e.race.gravity_well&&(X=Xe(X)),e.race.gravity_well&&(v.p.Iron[`\u1102${t("evo_challenge_gravity_well")}+1`]=-((1-Xe(1))*100)+"%");let he=nt.iron?nt.iron*st:0,y=(R*Z*V+X*ce*S+he+se+de)*G*at.mult;if(e.city.mine.ipow=+(R*V*oe*i*(ae-1)).toFixed(5),y*=oe*i,nt.iron&&nt.iron>0&&(v.p.Iron[t("tau_roid_mining_ship")]=nt.iron+"v",st>1&&(v.p.Iron[`\u1102${t("tau_red_womlings")}+0`]=(st-1)*100+"%")),v.p.Iron[t("city_smelter")]=(G-1)*100+"%",v.p.Iron[t("city_shrine")]=((at.mult-1)*100).toFixed(1)+"%",e.race.forager&&e.tech.dowsing){let z=e.tech.dowsing>=2?5:1,E=ye(e.civic.forager.workers,"forager");if(e.race.servants){let Oe=e.race.servants.jobs.forager;Oe*=pr(e.race.servants.jobs.forager,"forager"),E+=Oe}let te=E*z*.035*T("psychic_boost","Iron");e.city.geology.Iron&&(te*=e.city.geology.Iron+1),e.city.biome==="volcanic"?te*=qe.volcanic.vars()[2]:e.city.biome==="ashland"&&(te*=qe.ashland.vars()[2]),v.p.Iron[t("job_forager")]=te+"v",L("Iron",te*oe*i*_)}if(v.p.Iron[t("hunger")]=(oe-1)*100+"%",L("Iron",y*_),e.tech.titanium&&e.tech.titanium>=2){let z=xe(ye(e.civic.miner.workers,"miner"))/4;U.iron_ship&&(z+=U.iron_ship/2);let E=z*zt*.1;y=E*i,Ur>0&&(y*=1+Ur/50),e.city.geology.Titanium&&(y*=e.city.geology.Titanium+1),e.city.biome==="oceanic"&&(y*=qe.oceanic.vars()[0]),y*=at.mult*T("psychic_boost","Titanium");let te=e.tech.titanium>=3?10:25;L("Titanium",y*_/te),v.p.Titanium[t("resource_Iron_name")]=E/te+"v"}}if(e.race.sappy){if(e.city.metal_refinery&&e.city.metal_refinery.count>0||e.race.cataclysm||e.race.orbit_decayed){let P=0;e.race.cataclysm||e.race.orbit_decayed?e.tech.mars&&U.red_mine&&(P=U.red_mine*ye(e.civic.colonist.workers,"colonist")*T("red_mine","aluminium")):P=p*q*.088,e.city.geology.Aluminium&&(P*=e.city.geology.Aluminium+1),P*=T("psychic_boost","Aluminium");let R=P*at.mult*oe*i;e.tech.alumina>=2&&(Te+=k.metal_refinery*6),R*=1+Te/100,v.p.Aluminium[`${e.race.cataclysm||e.race.orbit_decayed?t("space_red_mine_title"):t("job_miner")}+2`]=P+"v",(e.race.cataclysm||e.race.orbit_decayed)&&P>0&&S>0&&(R*=S,v.p.Aluminium[`\u1102${t("space_red_ziggurat_title")}`]=(S-1)*100+"%"),v.p.Aluminium[t("city_shrine")]=(at.mult-1)*100+"%",v.p.Aluminium[t("hunger")]=(oe-1)*100+"%",L("Aluminium",R*_)}if(e.race.smoldering&&e.resource.Chrysotile.display){let P=p/2*T("psychic_boost","Chrysotile"),R=q;v.p.Chrysotile[t("job_miner")]=P+"v",P>0&&(v.p.Chrysotile[`\u1102${t("power")}`]=(R-1)*100+"%",e.race.discharge&&e.race.discharge>0&&k.mine>0&&(R=(R-1)*.5+1,v.p.Chrysotile[`\u1102${t("evo_challenge_discharge")}`]="-50%"));let G=P*R;G*=oe*i,v.p.Chrysotile[t("hunger")]=(oe-1)*100+"%",L("Chrysotile",G*_)}}}{if(e.interstellar.mining_droid&&$r.alum>0){let p=$r.alum*2.75*T("psychic_boost","Aluminium"),g=p*at.mult*i*S;g*=1+Te/100,v.p.Aluminium[t("interstellar_mining_droid_title")]=p+"v",p>0&&(v.p.Aluminium[`\u1102${t("space_red_ziggurat_title")}+1`]=(S-1)*100+"%"),L("Aluminium",g*_)}if(e.resource.Aluminium.display&&e.space.titan_mine){let p=yt("spc_titan"),g=k.ai_colonist?ye(e.civic.titan_colonist.workers,"titan_colonist")+N(k.ai_colonist):ye(e.civic.titan_colonist.workers,"titan_colonist"),q=T("titan_mine","aluminium")*U.titan_mine*g*T("psychic_boost","Aluminium"),C=q*at.mult*i*ce*p*S;C*=1+Te/100,v.p.Aluminium[`${t("city_mine")}+0`]=+q.toFixed(3)+"v",q>0&&(v.p.Aluminium[`\u1102${t("space_syndicate")}`]=-((1-p)*100)+"%",v.p.Aluminium[`\u1102${t("space_red_ziggurat_title")}+2`]=(S-1)*100+"%",v.p.Aluminium[`\u1102${t("quarantine")}+2`]=(ce-1)*100+"%"),L("Aluminium",C*_)}if(e.resource.Aluminium.display&&nt.aluminium&&nt.aluminium>0){let p=nt.aluminium*at.mult*i*st;p*=1+Te/100,v.p.Aluminium[t("tau_roid_mining_ship")]=nt.aluminium+"v",st>1&&(v.p.Aluminium[`\u1102${t("tau_red_womlings")}+0`]=(st-1)*100+"%"),L("Aluminium",p*_)}Te>0&&(v.p.Aluminium[t("city_metal_refinery")]=Te+"%",v.p.Aluminium[`\u1102${t("quarantine")}+1`]=(V-1)*100+"%")}if(U.red_mine&&U.red_mine>0){let p=yt("spc_red"),g=U.red_mine*ye(e.civic.colonist.workers,"colonist")*T("red_mine","copper").f;g*=T("psychic_boost","Copper"),v.p.Copper[t("space_red_mine_desc_bd",[W().red])]=g+"v",g>0&&(v.p.Copper[`\u1102${t("space_syndicate")}`]=-((1-p)*100)+"%",v.p.Copper[`\u1102${t("space_red_ziggurat_title")}`]=(S-1)*100+"%",v.p.Copper[`\u1102${t("quarantine")}+1`]=(ce-1)*100+"%"),L("Copper",g*at.mult*_*i*ce*oe*p*S);let q=U.red_mine*ye(e.civic.colonist.workers,"colonist")*oe*T("red_mine","titanium").f;q*=T("psychic_boost","Titanium"),v.p.Titanium[t("space_red_mine_desc_bd",[W().red])]=q+"v",q>0&&(v.p.Titanium[`\u1102${t("space_syndicate")}`]=-((1-p)*100)+"%",v.p.Titanium[`\u1102${t("space_red_ziggurat_title")}`]=(S-1)*100+"%",v.p.Titanium[`\u1102${t("quarantine")}+0`]=(ce-1)*100+"%"),L("Titanium",q*at.mult*_*i*ce*p*S)}if(Va()&&(v.p.Copper[t("city_shrine")]=((at.mult-1)*100).toFixed(1)+"%",v.p.Titanium[t("city_shrine")]=((at.mult-1)*100).toFixed(1)+"%"),v.p.Copper[t("hunger")]=(oe-1)*100+"%",v.p.Uranium.hasOwnProperty(t("city_coal_ash"))&&(v.p.Uranium[t("city_coal_ash")]=v.p.Uranium[t("city_coal_ash")]+"v"),e.resource.Coal.display){let p=ye(e.civic.coal_miner.workers,"coal_miner");p*=$t(p,"miner"),e.race.tough&&(p*=1+b.tough.vars()[0]/100);let g=ve("ogre");if(g>0&&(p*=1+b.tough.vars(1)[0]/100*g),e.race.resilient){let R=1+b.resilient.vars()[0]*e.race.resilient/100;p*=R}e.tech.explosives&&e.tech.explosives>=2&&(p*=e.tech.explosives>=3?1.4:1.25),e.city.geology.Coal&&(p*=e.city.geology.Coal+1);let q=1,C=1;e.city.coal_mine.on&&(q+=k.coal_mine*.05,C+=.05),p*=e.civic.coal_miner.impact*T("psychic_boost","Coal"),v.p.Coal[t("job_coal_miner")]=p+"v",p>0&&(v.p.Coal[`\u1102${t("power")}`]=(q-1)*100+"%",v.p.Coal[`\u1102${t("quarantine")}+0`]=(V-1)*100+"%"),e.race.discharge&&e.race.discharge>0&&k.coal_mine>0&&(q=(q-1)*.5+1,C=(C-1)*.5+1,v.p.Coal[`\u1102${t("evo_challenge_discharge")}`]="-50%"),e.race.cataclysm&&U.iridium_mine&&(p=U.iridium_mine*T("iridium_mine","coal"),p*=e.civic.coal_miner.impact*T("psychic_boost","Coal"),v.p.Coal[t("space_moon_iridium_mine_title")]=p+"v",p>0&&(v.p.Coal[`\u1102${t("space_red_ziggurat_title")}`]=(S-1)*100+"%",v.p.Coal[`\u1102${t("quarantine")}+0`]=(V-1)*100+"%"),q=1*S);let P=p;if(e.city.coal_mine.cpow=+(P*oe*V*i*(C-1)).toFixed(5),P*=q*oe*V*i,v.p.Coal[t("hunger")]=(oe-1)*100+"%",e.interstellar.mining_droid&&$r.coal>0){let R=$r.coal*3.75*T("psychic_boost","Coal"),G=R*i*S;v.p.Coal[t("interstellar_mining_droid_title")]=R+"v",R>0&&(v.p.Coal[`\u1102${t("space_red_ziggurat_title")}+1`]=(S-1)*100+"%"),L("Coal",G*_)}if(L("Coal",P*_),e.resource.Uranium.display){let R=P/(e.race.cataclysm?48:115)*T("psychic_boost","Uranium");e.city.coal_mine.upow=+(e.city.coal_mine.cpow/(e.race.cataclysm?48:115)).toFixed(5),e.city.geology.Uranium&&(R*=e.city.geology.Uranium+1),L("Uranium",R*_),v.p.Uranium[e.race.cataclysm?t("space_moon_iridium_mine_title"):t("job_coal_miner")]=R/i+"v"}}if(e.interstellar.mining_droid&&$r.uran>0){let p=$r.uran*.12*T("psychic_boost","Uranium"),g=p*i*S;v.p.Uranium[t("interstellar_mining_droid_title")]=p+"v",p>0&&(v.p.Uranium[`\u1102${t("space_red_ziggurat_title")}`]=(S-1)*100+"%"),L("Uranium",g*_)}if(e.space.uranium_mine&&k.uranium_mine){let p=yt("spc_kuiper"),g=k.uranium_mine*T("uranium_mine")*T("psychic_boost","Uranium"),q=g*i*ce*p*S;v.p.Uranium[t("space_kuiper_mine",[e.resource.Uranium.name])]=g+"v",g>0&&(v.p.Uranium[`\u1102${t("space_syndicate")}`]=-((1-p)*100)+"%",v.p.Uranium[`\u1102${t("space_red_ziggurat_title")}+1`]=(S-1)*100+"%",v.p.Uranium[`\u1102${t("quarantine")}+0`]=(ce-1)*100+"%"),L("Uranium",q*_)}if(e.resource.Oil.display){let p=0;if(e.tauceti.whaling_station&&e.tauceti.whaling_ship){if(e.tauceti.whaling_station.max=e.tauceti.whaling_station.count*750,e.tauceti.whaling_station.fill>0){let G=k.whaling_station*T("whaling_station");G>e.tauceti.whaling_station.fill&&(G=e.tauceti.whaling_station.fill),e.tauceti.whaling_station.fill-=G*_,p=G*T("whaling_ship_oil")*T("psychic_boost","Oil")}let R=U.whaling_ship*T("whaling_ship");e.tauceti.whaling_station.fill+=R*_,e.tauceti.whaling_station.fill>e.tauceti.whaling_station.max&&(e.tauceti.whaling_station.fill=e.tauceti.whaling_station.max)}let g=e.space.oil_extractor?k.oil_extractor*T("oil_extractor"):0,q=e.city.oil_well?T("oil_well")*e.city.oil_well.count:0;g*=T("psychic_boost","Oil"),q*=T("psychic_boost","Oil");let C=yt("spc_gas_moon"),P=q*V+g*ce*C*S+p*st;P*=oe*i,e.race.gravity_well&&(P=Xe(P)),e.space.oil_extractor&&(e.space.oil_extractor.lpmod=T("oil_extractor")*ce*C*S),v.p.Oil[t("city_oil_well")]=q+"v",q>0&&(v.p.Oil[`\u1102${t("quarantine")}+0`]=(V-1)*100+"%"),v.p.Oil[t("space_gas_moon_oil_extractor_title")]=g+"v",g>0&&(v.p.Oil[`\u1102${t("space_syndicate")}`]=-((1-C)*100)+"%",v.p.Oil[`\u1102${t("space_red_ziggurat_title")}`]=(S-1)*100+"%",v.p.Oil[`\u1102${t("quarantine")}+1`]=(ce-1)*100+"%"),v.p.Oil[t("tau_roid_whaling_ship")]=p+"v",st>1&&(v.p.Oil[`\u1102${t("tau_red_womlings")}+0`]=(st-1)*100+"%"),e.race.gravity_well&&(v.p.Oil[`${t("evo_challenge_gravity_well")}+0`]=-((1-Xe(1))*100)+"%"),v.p.Oil[t("hunger")]=(oe-1)*100+"%",L("Oil",P*_)}if(U.iridium_mine){let p=U.iridium_mine*T("iridium_mine","iridium").f;p*=T("psychic_boost","Iridium");let g=yt("spc_moon"),q=p*oe*at.mult*i*g*ce*qt*S;e.race.gravity_well&&(q=Xe(q)),v.p.Iridium[t("space_moon_iridium_mine_title")]=p+"v",p>0&&(v.p.Iridium[`\u1102${t("city_smelter")}+0`]=(qt-1)*100+"%",v.p.Iridium[`\u1102${t("space_syndicate")}+0`]=-((1-g)*100)+"%",v.p.Iridium[`\u1102${t("space_red_ziggurat_title")}+0`]=(S-1)*100+"%",v.p.Iridium[`\u1102${t("quarantine")}+0`]=(ce-1)*100+"%",e.race.gravity_well&&(v.p.Iridium[`\u1102${t("evo_challenge_gravity_well")}+0`]=-((1-Xe(1))*100)+"%")),L("Iridium",q*_)}if(U.iridium_ship){let p=U.iridium_ship*T("iridium_ship");p*=T("psychic_boost","Iridium");let g=yt("spc_belt"),q=p*oe*at.mult*i*g*ce*qt*S;e.race.gravity_well&&(q=Xe(q)),v.p.Iridium[t("job_space_miner")]=p+"v",p>0&&(v.p.Iridium[`\u1102${t("city_smelter")}+1`]=(qt-1)*100+"%",v.p.Iridium[`\u1102${t("space_syndicate")}+1`]=-((1-g)*100)+"%",v.p.Iridium[`\u1102${t("space_red_ziggurat_title")}+1`]=(S-1)*100+"%",v.p.Iridium[`\u1102${t("quarantine")}+1`]=(ce-1)*100+"%",e.race.gravity_well&&(v.p.Iridium[`\u1102${t("evo_challenge_gravity_well")}+1`]=-((1-Xe(1))*100)+"%")),L("Iridium",q*_)}if(k.s_gate&&e.resource.Adamantite.display&&e.galaxy.armed_miner&&we.armed_miner>0){let p=we.armed_miner*.65*T("psychic_boost","Iridium"),g=1+we.ore_processor*.1,q=kt("gxy_alien2"),C=p*i*q*g*oe*at.mult*qt*S;e.race.gravity_well&&(C=Xe(C)),v.p.Iridium[t("galaxy_armed_miner_bd")]=p+"v",p>0&&(v.p.Iridium[`\u1102${t("galaxy_ore_processor")}`]=-((1-g)*100)+"%",v.p.Iridium[`\u1102${t("city_smelter")}+2`]=(qt-1)*100+"%",v.p.Iridium[`\u1102${t("galaxy_piracy")}`]=-((1-q)*100)+"%",v.p.Iridium[`\u1102${t("space_red_ziggurat_title")}+2`]=(S-1)*100+"%",e.race.gravity_well&&(v.p.Iridium[`\u1102${t("evo_challenge_gravity_well")}+2`]=-((1-Xe(1))*100)+"%")),L("Iridium",C*_)}if(e.resource.Iridium.display&&nt.iridium&&nt.iridium>0){let p=nt.iridium*at.mult*i*qt*oe*st;e.race.gravity_well&&(p=Xe(p)),v.p.Iridium[t("tau_roid_mining_ship")]=nt.iridium+"v",v.p.Iridium[`\u1102${t("city_smelter")}+3`]=(qt-1)*100+"%",st>1&&(v.p.Iridium[`\u1102${t("tau_red_womlings")}+0`]=(st-1)*100+"%"),e.race.gravity_well&&(v.p.Iridium[`\u1102${t("evo_challenge_gravity_well")}+3`]=-((1-Xe(1))*100)+"%"),L("Iridium",p*_)}if(e.space.moon_base&&U.helium_mine){let p=U.helium_mine*T("helium_mine").f;p*=T("psychic_boost","Helium_3");let g=yt("spc_moon"),q=p*oe*i*g*ce*S;e.race.gravity_well&&(q=Xe(q)),v.p.Helium_3[t("space_moon_helium_mine_title")]=p+"v",p>0&&(v.p.Helium_3[`\u1102${t("space_syndicate")}+0`]=-((1-g)*100)+"%",v.p.Helium_3[`\u1102${t("space_red_ziggurat_title")}`]=(S-1)*100+"%",v.p.Helium_3[`\u1102${t("quarantine")}+0`]=(ce-1)*100+"%",e.race.gravity_well&&(v.p.Helium_3[`\u1102${t("evo_challenge_gravity_well")}+0`]=-((1-Xe(1))*100)+"%")),L("Helium_3",q*_)}if(e.space.gas_mining&&k.gas_mining){let p=k.gas_mining*T("gas_mining");p*=T("psychic_boost","Helium_3");let g=yt("spc_gas"),q=p*oe*i*g*ce*S;e.race.gravity_well&&(q=Xe(q)),v.p.Helium_3[t("space_gas_mining_title")]=p+"v",p>0&&(v.p.Helium_3[`\u1102${t("space_syndicate")}+1`]=-((1-g)*100)+"%",v.p.Helium_3[`\u1102${t("space_red_ziggurat_title")}+1`]=(S-1)*100+"%",v.p.Helium_3[`\u1102${t("quarantine")}+1`]=(ce-1)*100+"%",e.race.gravity_well&&(v.p.Helium_3[`\u1102${t("evo_challenge_gravity_well")}+1`]=-((1-Xe(1))*100)+"%")),L("Helium_3",q*_)}if(k.refueling_station){let p=k.refueling_station*T("refueling_station");p*=T("psychic_boost","Helium_3");let g=p*oe*i*st;v.p.Helium_3[t("tau_gas_refueling_station_title")]=p+"v",st>1&&(v.p.Helium_3[`\u1102${t("tau_red_womlings")}+0`]=(st-1)*100+"%"),L("Helium_3",g*_)}if(e.interstellar.harvester&&bt.harvester){let p=bt.harvester*T("harvester","helium");p*=T("psychic_boost","Helium_3");let g=p*oe*i*S;if(v.p.Helium_3[t("interstellar_harvester_title")]=p+"v",p>0&&(v.p.Helium_3[`\u1102${t("space_red_ziggurat_title")}+2`]=(S-1)*100+"%",e.race.discharge&&e.race.discharge>0&&(g*=.5,v.p.Helium_3[`\u1102${t("evo_challenge_discharge")}`]="-50%")),L("Helium_3",g*_),e.tech.ram_scoop){let q=bt.harvester*T("harvester","deuterium");q*=T("psychic_boost","Deuterium");let C=q*oe*i*S;v.p.Deuterium[t("interstellar_harvester_title")]=q+"v",q>0&&(v.p.Deuterium[`\u1102${t("space_red_ziggurat_title")}`]=(S-1)*100+"%"),L("Deuterium",C*_)}}if(k.s_gate&&e.galaxy.raider&&we.raider>0){let p=we.raider*.65*T("psychic_boost","Deuterium"),g=kt("gxy_chthonian"),q=p*i*g*oe*S;v.p.Deuterium[t("galaxy_raider")]=p+"v",p>0&&(v.p.Deuterium[`\u1102${t("galaxy_piracy")}`]=-((1-g)*100)+"%",v.p.Deuterium[`\u1102${t("space_red_ziggurat_title")}+1`]=(S-1)*100+"%"),L("Deuterium",q*_)}if(v.p.Helium_3[t("hunger")]=(oe-1)*100+"%",v.p.Deuterium[t("hunger")]=(oe-1)*100+"%",k.outpost){let p=T("outpost",!0),g=T("psychic_boost","Neutronium");v.p.Neutronium[t("space_gas_moon_outpost_bd")]=p.b*g*k.outpost+"v",e.tech.drone&&(v.p.Neutronium[`\u1102${t("tech_worker_drone")}`]=p.d*100+"%");let q=yt("spc_gas_moon"),C=k.outpost*p.n*g*oe*i*ce*q*S;e.space.outpost.lpmod=p.n*g*oe*i*ce*q*S,e.race.gravity_well&&(C=Xe(C)),p.b>0&&(v.p.Neutronium[`\u1102${t("space_syndicate")}+0`]=-((1-q)*100)+"%",v.p.Neutronium[`\u1102${t("space_red_ziggurat_title")}+0`]=(S-1)*100+"%",v.p.Neutronium[`\u1102${t("quarantine")}+0`]=(ce-1)*100+"%",e.race.discharge&&e.race.discharge>0&&(C*=.5,e.space.outpost.lpmod*=.5,v.p.Neutronium[`\u1102${t("evo_challenge_discharge")}+0`]="-50%"),e.race.gravity_well&&(v.p.Neutronium[`\u1102${t("evo_challenge_gravity_well")}+0`]=-((1-Xe(1))*100)+"%")),L("Neutronium",C*_)}if(k.neutron_miner){let p=k.neutron_miner*T("neutron_miner")*T("psychic_boost","Neutronium"),g=p*oe*i*S;v.p.Neutronium[t("interstellar_neutron_miner_bd")]=p+"v",e.interstellar.neutron_miner.lpmod=T("neutron_miner")*oe*i*S,p>0&&(v.p.Neutronium[`\u1102${t("space_red_ziggurat_title")}+1`]=(S-1)*100+"%",e.race.discharge&&e.race.discharge>0&&(g*=.5,e.interstellar.neutron_miner.lpmod*=.5,v.p.Neutronium[`\u1102${t("evo_challenge_discharge")}+1`]="-50%")),L("Neutronium",g*_)}if(k.s_gate&&e.galaxy.raider&&we.raider>0){let p=we.raider*.8*T("psychic_boost","Neutronium"),g=kt("gxy_chthonian"),q=p*i*g*oe*S;v.p.Neutronium[t("galaxy_raider")]=p+"v",p>0&&(v.p.Neutronium[`\u1102${t("galaxy_piracy")}`]=-((1-g)*100)+"%",v.p.Neutronium[`\u1102${t("space_red_ziggurat_title")}+2`]=(S-1)*100+"%"),L("Neutronium",q*_)}if(e.space.neutronium_mine&&k.neutronium_mine){let p=yt("spc_kuiper"),g=k.neutronium_mine*T("neutronium_mine")*T("psychic_boost","Neutronium"),q=g*i*ce*p*S;v.p.Neutronium[t("space_kuiper_mine",[e.resource.Neutronium.name])]=g+"v",g>0&&(v.p.Neutronium[`\u1102${t("space_syndicate")}+1`]=-((1-p)*100)+"%",v.p.Neutronium[`\u1102${t("space_red_ziggurat_title")}+3`]=(S-1)*100+"%",v.p.Neutronium[`\u1102${t("quarantine")}+1`]=(ce-1)*100+"%"),L("Neutronium",q*_)}if(e.resource.Neutronium.display&&nt.neutronium&&nt.neutronium>0){let p=nt.neutronium*i*st;v.p.Neutronium[t("tau_roid_mining_ship")]=nt.neutronium+"v",st>1&&(v.p.Neutronium[`\u1102${t("tau_red_womlings")}+0`]=(st-1)*100+"%"),L("Neutronium",p*_)}if(U.elerium_ship){let p=U.elerium_ship*T("elerium_ship")*T("psychic_boost","Elerium"),g=yt("spc_belt"),q=p*oe*i*ce*g*S;e.race.gravity_well&&(q=Xe(q)),v.p.Elerium[t("job_space_miner")]=p+"v",p>0&&(v.p.Elerium[`\u1102${t("space_syndicate")}+0`]=-((1-g)*100)+"%",v.p.Elerium[`\u1102${t("space_red_ziggurat_title")}+0`]=(S-1)*100+"%",v.p.Elerium[`\u1102${t("quarantine")}+0`]=(ce-1)*100+"%",e.race.discharge&&e.race.discharge>0&&(q*=.75,v.p.Elerium[`\u1102${t("evo_challenge_discharge")}`]="-25%"),e.race.gravity_well&&(v.p.Elerium[`\u1102${t("evo_challenge_gravity_well")}+1`]=-((1-Xe(1))*100)+"%")),L("Elerium",q*_)}if(bt.elerium_prospector){let p=bt.elerium_prospector*T("elerium_prospector")*T("psychic_boost","Elerium"),g=p*oe*i*S;v.p.Elerium[t("interstellar_elerium_prospector_bd")]=p+"v",p>0&&(v.p.Elerium[`\u1102${t("space_red_ziggurat_title")}+1`]=(S-1)*100+"%"),L("Elerium",g*_)}if(e.space.elerium_mine&&k.elerium_mine){let p=yt("spc_kuiper"),g=k.elerium_mine*T("elerium_mine")*T("psychic_boost","Elerium"),q=g*i*ce*p*oe*S;v.p.Elerium[t("space_kuiper_mine",[e.resource.Elerium.name])]=g+"v",g>0&&(v.p.Elerium[`\u1102${t("space_syndicate")}+1`]=-((1-p)*100)+"%",v.p.Elerium[`\u1102${t("space_red_ziggurat_title")}+2`]=(S-1)*100+"%",v.p.Elerium[`\u1102${t("quarantine")}+1`]=(ce-1)*100+"%"),L("Elerium",q*_)}if(e.resource.Elerium.display&&nt.elerium&&nt.elerium>0){let p=nt.elerium*i*st;v.p.Elerium[t("tau_roid_mining_ship")]=nt.elerium+"v",st>1&&(v.p.Elerium[`\u1102${t("tau_red_womlings")}+0`]=(st-1)*100+"%"),L("Elerium",p*_)}if(v.p.Elerium[t("hunger")]=(oe-1)*100+"%",e.resource.Adamantite.display&&e.interstellar.mining_droid&&$r.adam>0){let p=$r.adam*.075*T("psychic_boost","Adamantite"),g=p*at.mult*i*S;if(v.p.Adamantite[t("interstellar_mining_droid_title")]=p+"v",p>0){if(e.interstellar.processing&&bt.processing){let q=.12;e.tech.ai_core&&e.tech.ai_core>=2&&k.citadel>0&&(q+=k.citadel*.02);let C=bt.processing*q;g*=1+C,v.p.Adamantite[`\u1102${t("interstellar_processing_title")}`]=C*100+"%",e.race.discharge&&e.race.discharge>0&&(g*=.5,v.p.Adamantite[`\u1102${t("evo_challenge_discharge")}`]="-50%")}v.p.Adamantite[`\u1102${t("space_red_ziggurat_title")}`]=(S-1)*100+"%"}L("Adamantite",g*_)}if(k.s_gate&&e.resource.Adamantite.display&&e.galaxy.armed_miner&&we.armed_miner>0){let p=we.armed_miner*.23*T("psychic_boost","Adamantite"),g=1+we.ore_processor*.1,q=kt("gxy_alien2"),C=p*i*q*g*at.mult*S;v.p.Adamantite[t("galaxy_armed_miner_bd")]=p+"v",p>0&&(v.p.Adamantite[`\u1102${t("galaxy_ore_processor")}`]=-((1-g)*100)+"%",v.p.Adamantite[`\u1102${t("galaxy_piracy")}`]=-((1-q)*100)+"%",v.p.Adamantite[`\u1102${t("space_red_ziggurat_title")}+1`]=(S-1)*100+"%"),L("Adamantite",C*_)}if(e.resource.Adamantite.display&&e.space.titan_mine){let p=yt("spc_titan"),g=k.ai_colonist?ye(e.civic.titan_colonist.workers,"titan_colonist")+N(k.ai_colonist):ye(e.civic.titan_colonist.workers,"titan_colonist"),q=T("titan_mine","adamantite")*U.titan_mine*g*T("psychic_boost","Adamantite"),C=q*at.mult*i*ce*p*S;v.p.Adamantite[t("city_mine")]=q+"v",q>0&&(v.p.Adamantite[`\u1102${t("space_syndicate")}`]=-((1-p)*100)+"%",v.p.Adamantite[`\u1102${t("space_red_ziggurat_title")}+2`]=(S-1)*100+"%",v.p.Adamantite[`\u1102${t("quarantine")}+0`]=(ce-1)*100+"%"),L("Adamantite",C*_)}if(e.resource.Infernite.display){if(e.civic.hell_surveyor.workers>0){let p=e.tech.infernite>=3?.015:.01,g=ye(e.civic.hell_surveyor.workers,"hell_surveyor")*p*T("psychic_boost","Infernite"),q=1;if(e.tech.infernite>=2&&k.sensor_drone){let P=e.tech.infernite>=4?e.tech.infernite>=6?.5:.2:.1;q=1+k.sensor_drone*P}let C=g*q*i;v.p.Infernite[t("job_hell_surveyor")]=g+"v",v.p.Infernite[`\u1102${t("portal_sensor_drone_title")}`]=(q-1)*100+"%",L("Infernite",C*_)}if(k.infernite_mine){let p=T("infernite_mine"),g=k.infernite_mine*p*T("psychic_boost","Infernite"),q=g*i;e.portal.infernite_mine.lpmod=p*i,v.p.Infernite[t("city_mine")]=g+"v",L("Infernite",q*_)}}if(k.s_gate&&e.resource.Bolognium.display&&e.galaxy.bolognium_ship&&we.bolognium_ship>0){let p=we.bolognium_ship*T("bolognium_ship")*T("psychic_boost","Bolognium"),g=kt("gxy_gateway"),q=p*i*g*S;v.p.Bolognium[t("galaxy_bolognium_ship")]=p+"v",p>0&&(v.p.Bolognium[`\u1102${t("galaxy_piracy")}+0`]=-((1-g)*100)+"%",v.p.Bolognium[`\u1102${t("space_red_ziggurat_title")}`]=(S-1)*100+"%",e.race.discharge&&e.race.discharge>0&&(q*=.5,v.p.Bolognium[`\u1102${t("evo_challenge_discharge")}+0`]="-50%")),L("Bolognium",q*_)}if(e.civic.pit_miner.display)if(yr()){let p=ye(e.civic.pit_miner.workers,"pit_miner");p*=$t(p,"miner");let g=1+(U.colony||0)*.5;{let q=p*T("psychic_boost","Bolognium");q*=T("mining_pit","bolognium");let C=q*i*g;v.p.Bolognium[t("job_pit_miner")]=q+"v",q>0&&(v.p.Bolognium[`\u1102${t("tau_home_colony")}`]=(g-1)*100+"%"),L("Bolognium",C*_)}{let q=p*T("psychic_boost","Stone");q*=T("mining_pit","stone");let C=q*i*g;v.p.Stone[t("job_pit_miner")]=q+"v",q>0&&(v.p.Stone[`\u1102${t("tau_home_colony")}`]=(g-1)*100+"%"),L("Stone",C*_)}{let q=p*T("psychic_boost","Adamantite");q*=T("mining_pit","adamantite");let C=q*at.mult*i*g;v.p.Adamantite[t("job_pit_miner")]=q+"v",q>0&&(v.p.Adamantite[`\u1102${t("tau_home_colony")}`]=(g-1)*100+"%"),L("Adamantite",C*_)}if(e.tech.isolation){{let q=p*T("psychic_boost","Copper");q*=T("mining_pit","copper");let C=q*at.mult*i*g;v.p.Copper[t("job_pit_miner")]=q+"v",q>0&&(v.p.Copper[`\u1102${t("tau_home_colony")}`]=(g-1)*100+"%"),L("Copper",C*_)}{let q=p*T("psychic_boost","Coal");q*=T("mining_pit","coal");let C=q*i*g;v.p.Coal[t("job_pit_miner")]=q+"v",q>0&&(v.p.Coal[`\u1102${t("tau_home_colony")}`]=(g-1)*100+"%"),L("Coal",C*_)}if(e.race.lone_survivor){let q=p*T("psychic_boost","Aluminium");q*=T("mining_pit","aluminium");let C=q*at.mult*i*g;v.p.Aluminium[t("job_pit_miner")]=q+"v",q>0&&(v.p.Aluminium[`\u1102${t("tau_home_colony")}`]=(g-1)*100+"%"),L("Aluminium",C*_)}{let q=p*T("psychic_boost","Chrysotile");q*=T("mining_pit","chrysotile");let C=q*i*g*oe;v.p.Chrysotile[t("job_pit_miner")]=q+"v",q>0&&(v.p.Chrysotile[`\u1102${t("tau_home_colony")}`]=(g-1)*100+"%",v.p.Chrysotile[t("hunger")]=(oe-1)*100+"%"),L("Chrysotile",C*_)}}}else{let p={},g=ye(e.civic.pit_miner.workers,"pit_miner");g*=$t(g,"miner"),g*=T("mining_pit","materials");let q=1+(U.colony||0)*.5,C=g*i*q;p[t("job_pit_miner")]=g+"v",g>0&&(p[`\u1102${t("tau_home_colony")}`]=(q-1)*100+"%"),v.p.Materials=p,L("Materials",C*_)}if(e.tauceti.tau_farm&&k.tau_farm){let p=1+(U.colony||0)*.5;if(!e.race.kindling_kindred&&!e.race.smoldering){let g=T("tau_farm","lumber")*k.tau_farm*T("psychic_boost","Lumber"),q=g*i*p;v.p.Lumber[t("tau_home_tau_farm")]=g+"v",g>0&&(v.p.Lumber[`\u1102${t("tau_home_colony")}`]=(p-1)*100+"%"),L("Lumber",q*_)}}if(Va()&&(v.p.Adamantite[t("city_shrine")]=((at.mult-1)*100).toFixed(1)+"%"),k.s_gate&&e.resource.Bolognium.display&&e.galaxy.armed_miner&&we.armed_miner>0){let p=we.armed_miner*.032*T("psychic_boost","Bolognium"),g=1+we.ore_processor*.1,q=kt("gxy_alien2"),C=p*i*q*g*S;v.p.Bolognium[t("galaxy_armed_miner_bd")]=p+"v",p>0&&(v.p.Bolognium[`\u1102${t("galaxy_ore_processor")}`]=-((1-g)*100)+"%",v.p.Bolognium[`\u1102${t("galaxy_piracy")}+1`]=-((1-q)*100)+"%",v.p.Bolognium[`\u1102${t("space_red_ziggurat_title")}+1`]=(S-1)*100+"%",e.race.discharge&&e.race.discharge>0&&(C*=.5,v.p.Bolognium[`\u1102${t("evo_challenge_discharge")}+1`]="-50%")),L("Bolognium",C*_)}if(k.s_gate&&e.resource.Orichalcum.display&&e.galaxy.excavator&&k.excavator>0){let p=k.excavator*T("excavator")*T("psychic_boost","Orichalcum"),g=kt("gxy_chthonian"),q=p*i*g*S;e.galaxy.excavator.lpmod=T("excavator")*i*g*S,v.p.Orichalcum[t("galaxy_excavator")]=p+"v",p>0&&(v.p.Orichalcum[`\u1102${t("galaxy_piracy")}`]=-((1-g)*100)+"%",v.p.Orichalcum[`\u1102${t("space_red_ziggurat_title")}`]=(S-1)*100+"%",e.race.discharge&&e.race.discharge>0&&(q*=.5,e.galaxy.excavator.lpmod*=.5,v.p.Orichalcum[`\u1102${t("evo_challenge_discharge")}`]="-50%")),L("Orichalcum",q*_)}if(e.space.orichalcum_mine&&k.orichalcum_mine){let p=yt("spc_kuiper"),g=k.orichalcum_mine*T("orichalcum_mine")*T("psychic_boost","Orichalcum"),q=g*i*ce*p*S;v.p.Orichalcum[t("space_kuiper_mine",[e.resource.Orichalcum.name])]=g+"v",g>0&&(v.p.Orichalcum[`\u1102${t("space_syndicate")}`]=-((1-p)*100)+"%",v.p.Orichalcum[`\u1102${t("space_red_ziggurat_title")}+1`]=(S-1)*100+"%",v.p.Orichalcum[`\u1102${t("quarantine")}+0`]=(ce-1)*100+"%"),L("Orichalcum",q*_)}if(e.resource.Orichalcum.display&&nt.orichalcum&&nt.orichalcum>0){let p=nt.orichalcum*i*st;v.p.Orichalcum[t("tau_roid_mining_ship")]=nt.orichalcum+"v",st>1&&(v.p.Orichalcum[`\u1102${t("tau_red_womlings")}+0`]=(st-1)*100+"%"),L("Orichalcum",p*_)}if(e.race.truepath&&e.tech.tau_red&&e.tech.tau_red>=5&&e.tauceti.womling_mine&&e.tauceti.overseer){let p=e.tauceti.womling_mine.miners*T("womling_mine","unobtainium")*T("psychic_boost","Unobtainium"),g=e.tauceti.overseer.prod/100,q=p*g*i;if(v.p.Unobtainium[t("tau_red_womlings")]=p+"v",p>0&&(v.p.Unobtainium[`\u1102${t("tau_red_womling_prod_label")}`]=-((1-g)*100)+"%"),L("Unobtainium",q*_),e.tech.isolation){let C=e.tauceti.womling_mine.miners*T("womling_mine","uranium")*T("psychic_boost","Uranium");v.p.Uranium[t("tau_red_womlings")]=C+"v";let P=C*g*i;C>0&&(v.p.Uranium[`\u1102${t("tau_red_womling_prod_label")}`]=-((1-g)*100)+"%"),L("Uranium",P*_);let R=e.tauceti.womling_mine.miners*T("womling_mine","titanium")*T("psychic_boost","Titanium");v.p.Titanium[t("tau_red_womlings")]=R+"v";let G=R*g*at.mult*i;if(R>0&&(v.p.Titanium[`\u1102${t("tau_red_womling_prod_label")}`]=-((1-g)*100)+"%"),L("Titanium",G*_),e.race.lone_survivor){let X=e.tauceti.womling_mine.miners*T("womling_mine","copper")*T("psychic_boost","Copper");v.p.Copper[t("tau_red_womlings")]=X+"v";let ee=X*g*at.mult*i;ee>0&&(v.p.Copper[`\u1102${t("tau_red_womling_prod_label")}`]=-((1-g)*100)+"%"),L("Copper",ee*_);let Z=e.tauceti.womling_mine.miners*T("womling_mine","aluminium")*T("psychic_boost","Aluminium");v.p.Aluminium[t("tau_red_womlings")]=Z+"v";let ae=Z*g*at.mult*i;Z>0&&(v.p.Aluminium[`\u1102${t("tau_red_womling_prod_label")}`]=-((1-g)*100)+"%"),L("Aluminium",ae*_);let se=e.tauceti.womling_mine.miners*T("womling_mine","iridium")*T("psychic_boost","Iridium");v.p.Iridium[t("tau_red_womlings")]=se+"v";let de=se*g*oe*at.mult*i;se>0&&(v.p.Iridium[`\u1102${t("tau_red_womling_prod_label")}`]=-((1-g)*100)+"%"),L("Iridium",de*_);let he=e.tauceti.womling_mine.miners*T("womling_mine","neutronium")*T("psychic_boost","Neutronium");v.p.Neutronium[t("tau_red_womlings")]=he+"v";let y=he*g*oe*i;he>0&&(v.p.Neutronium[`\u1102${t("tau_red_womling_prod_label")}`]=-((1-g)*100)+"%"),L("Neutronium",y*_)}}}v.p.Neutronium[t("hunger")]=(oe-1)*100+"%",Va()&&(v.p.Iridium[t("city_shrine")]=((at.mult-1)*100).toFixed(1)+"%"),v.p.Iridium[t("hunger")]=(oe-1)*100+"%";let Le=Ja?Ja*i:0;if(Ja&&e.race.discharge&&e.race.discharge>0&&(Le*=.5),e.tech.currency>=1){let p=e.resource[e.race.species].amount+e.civic.garrison.workers-e.civic.unemployed.workers;if(e.race.high_pop&&(p=xe(p)),p*=e.race.truepath?.2:.4,e.race.greedy&&(p*=1-b.greedy.vars()[0]/100),e.tech.isolation&&(p*=15),p*=T("psychic_cash"),A&&e.tech.banking&&e.tech.banking>=2){let R=+ye(e.civic.banker.impact,"banker");e.tech.banking>=10&&(R+=.02*e.tech.stock_exchange),e.race.truthful&&(R*=1-b.truthful.vars()[0]/100),e.civic.govern.type==="republic"&&(R*=1+$e.republic()[0]/100),e.race.high_pop&&(R=xe(R)),p*=1+e.civic.banker.workers*R}p*=e.civic.taxes.tax_rate/20,e.civic.govern.type==="oligarchy"&&(p*=1-$e.oligarchy()[0]/100),e.civic.govern.type==="corpocracy"&&(p*=.5),e.civic.govern.type==="socialist"&&(p*=1-$e.socialist()[3]/100),e.race.banana&&(p*=.05);let g=1;e.tech.anthropology&&e.tech.anthropology>=4&&!e.race.truepath&&(g+=(e.race.cataclysm||e.race.orbit_decayed?e.space.ziggurat?e.space.ziggurat.count:0:e.city.temple.count)*.025);let q=0;if(!e.tech.world_control&&e.civic.govern.type!=="federation")for(let R=0;R<3;R++)e.civic.foreign[`gov${R}`].buy&&(q+=p*.2);let C=ka("tax"),P=(p-q)*g*oe*C.mult;P*=i,v.p.Money[t("morale_tax")]=p+"v",p>0&&(v.p.Money[`\u1102${t("civics_spy_purchase_bd")}`]=-q+"v",v.p.Money[e.race.cataclysm||e.race.orbit_decayed?`\u1102${t("space_red_ziggurat_title")}`:`\u1102${t("city_temple")}`]=(g-1)*100+"%",v.p.Money[`\u1102${t("city_shrine")}`]=(C.mult-1)*100+"%"),v.p.Money[t("city_factory")]=Ja+"v",e.race.discharge&&e.race.discharge>0&&Ja>0&&(v.p.Money[`\u1102${t("evo_challenge_discharge")}`]="-50%"),L("Money",+(P*_).toFixed(2)),Le+=P}if(e.tech.gambling&&(k.casino||k.spc_casino||k.tauceti_casino)){let p=0;k.casino&&(p+=k.casino),k.spc_casino&&(p+=k.spc_casino),k.tauceti_casino&&(p+=k.tauceti_casino);let g=Math.log2(1+e.resource[e.race.species].amount),q=2.5;e.race.gambler&&(q*=1+b.gambler.vars()[0]*e.race.gambler/100),g*=q,e.tech.gambling>=2&&(g*=e.tech.gambling>=5?2:1.5),e.tech.stock_exchange&&e.tech.gambling>=4&&(g*=1+e.tech.stock_exchange*.01),e.civic.govern.type==="corpocracy"&&(g*=1+$e.corpocracy()[0]/100),e.civic.govern.type==="socialist"&&(g*=1-$e.socialist()[3]/100),e.race.inflation&&(g*=1+e.race.inflation/1250),e.tech.isolation&&(g*=1.25,e.tech.iso_gambling&&(g*=1+ye(e.civic.banker.workers,"banker")*.05)),g*=T("psychic_cash");let C=ge("racketeer",1);C&&(g*=1+C/100),g*=p,v.p.Money[t("city_casino")]=g+"v",L("Money",+(g*_*i*oe).toFixed(2)),Le+=g*i*oe}if(e.city.tourist_center&&e.city.tourist_center.on&&!e.race.fasting){let p=0,g=e.tech.monument&&e.tech.monument>=3&&k.s_gate?3:1;e.city.amphitheatre&&(p+=e.city.tourist_center.on*e.city.amphitheatre.count*g),e.city.casino&&(p+=e.city.tourist_center.on*e.city.casino.count*5*g),e.space.spc_casino&&(p+=e.city.tourist_center.on*e.space.spc_casino.count*5*g),e.tech.monuments&&(p+=e.city.tourist_center.on*e.tech.monuments*2*g),e.city.trade&&e.stats.achieve.banana&&e.stats.achieve.banana.l>=4&&(p+=e.city.tourist_center.on*e.city.trade.count*3*g);let q=ge("pious",1);q&&e.city.temple&&(p+=e.city.tourist_center.on*e.city.temple.count*q*g),e.civic.govern.type==="corpocracy"&&(p*=1+$e.corpocracy()[2]/100),e.civic.govern.type==="socialist"&&(p*=1-$e.socialist()[3]/100),a==="aquarius"&&(p*=1+Zt("aquarius")[0]/100),p*=T("psychic_cash"),v.p.Money[t("tech_tourism")]=Math.round(p)+"v",a==="aquarius"&&(v.p.Money[`\u1102${t("sign_aquarius")}`]=Zt("aquarius")[0]+"%"),L("Money",+(p*_*i*oe).toFixed(2)),Le+=p*i*oe}if(e.tauceti.tau_cultural_center){let p=0;e.tauceti.tauceti_casino&&(p+=k.tau_cultural_center*k.tauceti_casino*20),e.tech.monuments&&(p+=k.tau_cultural_center*e.tech.monuments*5),e.tech.tau_culture&&e.tech.tau_culture>=2&&(p+=k.tau_cultural_center*U.colony*15),e.civic.govern.type==="corpocracy"?p*=1+$e.corpocracy()[2]/100:e.civic.govern.type==="socialist"&&(p*=1-$e.socialist()[3]/100),p*=T("psychic_cash"),v.p.Money[t("tech_cultural_center")]=Math.round(p)+"v",a==="aquarius"&&(p*=1+Zt("aquarius")[0]/100,v.p.Money[`\u1102${t("sign_aquarius")}`]=Zt("aquarius")[0]+"%"),L("Money",+(p*_*i*oe).toFixed(2)),Le+=p*i*oe}if(e.tech.tau_junksale){let p=U.womling_village*40,g=k.tau_cultural_center?1+k.tau_cultural_center*.08:1;v.p.Money[t("tau_red_womling_village")]=Math.round(p)+"v",v.p.Money[`\u1102${t("tech_cultural_center")}+1`]=(g-1)*100+"%",L("Money",+(p*g*_*i*oe).toFixed(2)),Le+=p*g*i*oe}if(e.race.gravity_well&&e.tech.teamster&&e.tech.teamster>=2){let g=e.civic.teamster.workers*Le*45e-5;v.p.Money[t("job_teamster")]=Math.round(g)+"v",L("Money",+(g*_*i*oe).toFixed(2)),Le+=g*i*oe}if(v.p.Money[t("hunger")]=(oe-1)*100+"%",e.tech.anthropology&&e.tech.anthropology>=4&&e.race.truepath){let p=e.resource[e.race.species].amount*e.city.temple.count*.08;v.p.Money[t("city_temple")]=p+"v",L("Money",+(p*i*_).toFixed(2)),Le+=p*i}if(e.race.truepath&&e.tauceti.overseer){let p=(e.tauceti.overseer.loyal+e.tauceti.overseer.morale)/200,g=e.tauceti.overseer.pop;k.womling_station&&(g+=k.womling_station*2);let q=g*p*(e.tech.isolation?25:12),C=k.tau_cultural_center?1+k.tau_cultural_center*.08:1,P=q*i*C;v.p.Money[t("tau_red_womlings")]=q+"v",v.p.Money[`\u1102${t("tech_cultural_center")}`]=(C-1)*100+"%",L("Money",+(P*_).toFixed(2)),Le+=P}{let p=ge("racketeer",0);if(p){let g=-Math.round(Le*(p/100));v.p.consume.Money[t("gov_trait_racketeer_bd")]=g,L("Money",+(g*_).toFixed(2))}}{let p=ge("pious",0);if(p){let g=-Math.round(Le*(p/100));v.p.consume.Money[t("gov_trait_pious_bd")]=g,L("Money",+(g*_).toFixed(2))}}if(e.tech.foundry){let p=e.race.resourceful?1-b.resourceful.vars()[0]/100:1,g=ve("arraak");g>0&&(p-=b.resourceful.vars(1)[0]/100*g);let q=wa(),C={};Ua("","",!0),Object.keys(q).forEach(function(P){if(P==="Thermite"&&!Ve("summer"))return;v.p[P]={};let R=ye(e.city.foundry[P],"craftsman");e.race.servants&&e.race.servants.hasOwnProperty("sjobs")&&e.race.servants.sjobs.hasOwnProperty(P)&&(R+=N(e.race.servants.sjobs[P]));let G=Ua(P,"auto").multiplier,X=e.genes.crafty?2:1,ee=Math.floor(e.resource[q[P][0].r].amount/(q[P][0].a*X*p/140));for(let Z=1;Z"u"?C[q[P][Z].r]=ae/_:C[q[P][Z].r]+=ae/_}e.race.high_pop&&(ee=xe(ee)),v.p[P][t("job_craftsman")]=ee*X/140+"v",L(P,G*ee*X*_/140*T("psychic_boost",P))}),Object.keys(C).forEach(function(P){C[P]>0&&(v.p.consume[P][t("job_craftsman")]=-C[P])})}!e.settings.showResearch&&(e.resource.Lumber.amount>=5||e.resource.Stone.amount>=6)&&(e.settings.showResearch=!0),e.city.power_total=-fr,e.city.power=Gt,e.city.power<0?($("#powerMeter").addClass("low"),$("#powerMeter").removeClass("neutral"),$("#powerMeter").removeClass("high")):e.city.power>0?($("#powerMeter").removeClass("low"),$("#powerMeter").removeClass("neutral"),$("#powerMeter").addClass("high")):($("#powerMeter").removeClass("low"),$("#powerMeter").addClass("neutral"),$("#powerMeter").removeClass("high")),k.world_controller&&k.world_controller>0?e.tech.wsc===0&&(e.tech.wsc=1,ue()):e.tech.wsc!==0&&(e.tech.wsc=0,ue()),e.tech.portal>=2&&(e.portal.fortress.garrison>0?e.tech.portal_guard=1:e.tech.portal_guard=0),e.race.decay&&Object.keys(sr).forEach(function(p){if(e.resource[p].amount>50){let g=+((e.resource[p].amount-50)*(.001*sr[p])).toFixed(3);L(p,-(g*_)),v.p.consume[p][t("evo_challenge_decay")]=-g}else delete v.p.consume[p][t("evo_challenge_decay")]}),zl&&(e.tech.piracy&&Pt(),e.settings.portal.ruins&&(D({el:"#srprtl_ruins"},"update"),D({el:"#foundry"},"update")),e.settings.portal.gate&&D({el:"#srprtl_gate"},"update"))}if(e.civic.garrison&&e.civic.garrison.workers=2?.08:.05;e.blood.lust&&(V+=e.blood.lust*.002);let ce=ge("militant",0);ce&&(V*=1+ce/100),S*=1+(e.race.orbit_decayed&&e.space.space_barracks?e.space.space_barracks.on:e.city.boot_camp.count)*V}e.race.beast&&(S*=1+b.beast.vars()[2]/100),e.civic.garrison.rate=S*_,e.race.brute&&(e.civic.garrison.rate+=b.brute.vars()[1]/40*_);let Q=ve("orc");Q>0&&(e.civic.garrison.rate+=b.brute.vars(1)[1]/40*Q*_),e.civic.garrison.progress+=e.civic.garrison.rate,e.civic.garrison.progress>=100&&(e.civic.garrison.progress=0,e.civic.garrison.workers++,e.portal.fortress&&e.portal.fortress.assigned&&e.portal.fortress.garrison0?($("#portal-carport .count").hasClass("has-text-alert")||$("#portal-carport .count").addClass("has-text-alert"),e.portal.carport.repair++,e.portal.carport.repair>=O.portal.prtl_fortress.carport.repair()&&(e.portal.carport.repair=0,e.portal.carport.damaged--)):$("#portal-carport .count").hasClass("has-text-alert")&&$("#portal-carport .count").removeClass("has-text-alert")),Object.keys(e.resource).forEach(function(S){(e.resource[S].rate>0||e.resource[S].rate===0&&e.resource[S].max===-1)&&ed(S,Pe.mt)}),e.settings.expose&&(window.evolve||Nc(),Dc()),Ve("easter").active)for(w=1;w<=18;w++)$(`#egg${w}`).length>0&&!$(`#egg${w}`).hasClass("binded")&&(Cl(w),$(`#egg${w}`).addClass("binded"));if(Ve("halloween").active){for(w=1;w<=7;w++)$(`#treat${w}`).length>0&&!$(`#treat${w}`).hasClass("binded")&&(zc(w,!1),$(`#treat${w}`).addClass("binded"));for(w=1;w<=7;w++)$(`#trick${w}`).length>0&&!$(`#trick${w}`).hasClass("binded")&&(zc(w,!0),$(`#trick${w}`).addClass("binded"))}zl=!1}function J0(){let r=ma();if(e.race.species==="protoplasm"){let Te=100;e.stats.achieve.mass_extinction&&e.stats.achieve.mass_extinction.l>1&&(Te+=50*(e.stats.achieve.mass_extinction.l-1));var a={RNA:Te,DNA:Te};if(e.evolution.membrane){let Le=e.evolution.mitochondria?e.evolution.mitochondria.count*5+5:5;a.RNA+=e.evolution.membrane.count*Le}if(e.evolution.eukaryotic_cell){let Le=e.evolution.mitochondria?e.evolution.mitochondria.count*10+10:10;a.DNA+=e.evolution.eukaryotic_cell.count*Le}e.resource.RNA.max=a.RNA,e.resource.DNA.max=a.DNA,Object.keys(O.evolution).forEach(function(Le){if(O.evolution[Le]&&O.evolution[Le].cost){let p=O.evolution[Le],g=$("#"+p.id);g.length>0&&(Tt(p)?g.hasClass("cna")&&g.removeClass("cna"):g.hasClass("cna")||g.addClass("cna"),Tt(p,!0)?g.hasClass("cnam")&&g.removeClass("cnam"):g.hasClass("cnam")||g.addClass("cnam"))}})}else{var a={Money:1e3,Slave:0,Mana:0,Energy:100,Sus:100,Knowledge:e.stats.achieve.extinct_junker&&e.stats.achieve.extinct_junker.l>=1?1e3:100,Zen:0,Food:1e3,Crates:0,Containers:0,Lumber:200,Stone:200,Chrysotile:200,Crystal:10,Furs:100,Copper:100,Iron:100,Cement:100,Coal:50,Oil:0,Uranium:10,Aluminium:50,Steel:50,Titanium:50,Alloy:50,Polymer:50,Iridium:0,Helium_3:0,Water:0,Deuterium:0,Neutronium:0,Adamantite:0,Infernite:0,Elerium:1,Nano_Tube:0,Graphene:0,Stanene:0,Bolognium:0,Vitreloy:0,Orichalcum:0,Unobtainium:0,Cipher:0,Nanite:0,Materials:0},i={unemployed:-1,hunter:-1,forager:-1,farmer:-1,lumberjack:-1,quarry_worker:-1,crystal_miner:-1,scavenger:-1,teamster:-1,meditator:-1,torturer:0,miner:0,coal_miner:0,craftsman:0,cement_worker:0,banker:0,entertainer:0,priest:0,professor:0,scientist:0,garrison:0,colonist:0,titan_colonist:0,space_miner:0,hell_surveyor:0,archaeologist:0,pit_miner:0,crew:0};if(e.race.cataclysm?(a.Money+=25e4,a.Knowledge+=1e5,a.Lumber+=1e5,a.Stone+=1e5,a.Chrysotile+=1e5,a.Furs+=1e5,a.Aluminium+=1e5,a.Steel+=1e5,a.Copper+=1e5,a.Iron+=1e5,a.Coal+=1e5,a.Cement+=1e5,a.Titanium+=75e3,a.Alloy+=2e4,a.Polymer+=2e4,a.Uranium+=1e3):e.race.lone_survivor&&(a.Money+=1e9,a.Knowledge+=1e5,a.Food+=9e3,a.Water+=1e4,a.Elerium+=999),e.stats.feat.adept){let y=ts();a.Lumber+=y*60,a.Stone+=y*60}e.race.hasOwnProperty("psychicPowers")&&e.race.psychicPowers.hasOwnProperty("channel")&&(a.Energy-=e.race.psychicPowers.channel.boost,a.Energy-=e.race.psychicPowers.channel.assault,a.Energy-=e.race.psychicPowers.channel.cash,a.Energy<0&&(a.Energy=100,e.race.psychicPowers.channel.boost=0,e.race.psychicPowers.channel.assault=0,e.race.psychicPowers.channel.cash=0));var s={[t("base")]:a.Money+"v"},n={},c={},l={[t("base")]:a.Mana+"v"},o={[t("base")]:a.Mana+"v"},d={[t("base")]:a.Knowledge+"v"},h={},_={},m={},w={[t("base")]:a.Food+"v"},M={[t("base")]:a.Lumber+"v"},A={[t("base")]:a.Stone+"v"},x={[t("base")]:a.Chrysotile+"v"},j={[t("base")]:a.Crystal+"v"},B={[t("base")]:a.Furs+"v"},S={[t("base")]:a.Copper+"v"},Q={[t("base")]:a.Iron+"v"},V={[t("base")]:a.Cement+"v"},ce={[t("base")]:a.Coal+"v"},Y={[t("base")]:a.Oil+"v"},Ge={[t("base")]:a.Uranium+"v"},Ce={[t("base")]:a.Steel+"v"},wr={[t("base")]:a.Aluminium+"v"},Or={[t("base")]:a.Titanium+"v"},Ia={[t("base")]:a.Alloy+"v"},Gt={[t("base")]:a.Polymer+"v"},fr={[t("base")]:a.Iridium+"v"},Rt={[t("base")]:a.Helium_3+"v"},st={[t("base")]:a.Water+"v"},$r={[t("base")]:a.Deuterium+"v"},da={[t("base")]:a.Neutronium+"v"},Hr={[t("base")]:a.Adamantite+"v"},lr={[t("base")]:a.Infernite+"v"},Me={[t("base")]:a.Elerium+"v"},Vt={[t("base")]:a.Nano_Tube+"v"},Sr={[t("base")]:a.Graphene+"v"},La={[t("base")]:a.Stanene+"v"},fi={[t("base")]:a.Bolognium+"v"},oe={[t("base")]:a.Vitreloy+"v"},Ja={[t("base")]:a.Orichalcum+"v"},at={[t("base")]:a.Unobtainium+"v"},zt={[t("base")]:a.Cipher+"v"},Ur={[t("base")]:a.Nanite+"v"},qt={[t("base")]:a.Materials+"v"};if(v.c={Money:s,[e.race.species]:n,Slave:c,Mana:l,Sus:o,Knowledge:d,Zen:h,Crates:_,Containers:m,Food:w,Lumber:M,Stone:A,Chrysotile:x,Crystal:j,Furs:B,Copper:S,Iron:Q,Cement:V,Coal:ce,Oil:Y,Uranium:Ge,Steel:Ce,Aluminium:wr,Titanium:Or,Alloy:Ia,Polymer:Gt,Iridium:fr,Helium_3:Rt,Water:st,Deuterium:$r,Neutronium:da,Adamantite:Hr,Infernite:lr,Elerium:Me,Nano_Tube:Vt,Graphene:Sr,Stanene:La,Bolognium:fi,Vitreloy:oe,Orichalcum:Ja,Unobtainium:at,Nanite:Ur,Cipher:zt,Materials:qt},a[e.race.species]=0,e.race.unfathomable&&e.city.captive_housing){let y=ti(),z=ye(e.civic.hunter.workers,"hunter");if(z*=$t(z,"hunting")*y,e.race.swift&&(z*=1+b.swift.vars()[1]/100),e.race.servants){let Qe=e.race.servants.jobs.hunter*y;Qe*=pr(e.race.servants.jobs.hunter,"hunting"),z+=Qe}let E=0,te=0,Oe=[];if(e.city.hasOwnProperty("surfaceDwellers"))for(let Qe=0;Qe0&&Oe.push(Qe)}let Kt=Math.round(40/b.unfathomable.vars()[1]);if(E=2&&e.civic.torturer.workers>0&&Oe.length>0&&Math.rand(0,Math.ceil((te+1)**1.45))0&&(e.race.psychicPowers.boostTime--,(e.race.psychicPowers.boostTime<0||e.race.psychicPowers.boostTime>360)&&(e.race.psychicPowers.boostTime=0)),e.race.psychicPowers&&e.race.psychicPowers.assaultTime&&e.race.psychicPowers.assaultTime>0&&(e.race.psychicPowers.assaultTime--,(e.race.psychicPowers.assaultTime<0||e.race.psychicPowers.assaultTime>360)&&(e.race.psychicPowers.assaultTime=0)),e.race.psychicPowers&&e.race.psychicPowers.cash&&e.race.psychicPowers.cash>0&&(e.race.psychicPowers.cash--,(e.race.psychicPowers.cash<0||e.race.psychicPowers.cash>360)&&(e.race.psychicPowers.cash=0))),e.city.nanite_factory){let y=e.city.nanite_factory.count*H(2500);a.Nanite+=y,Ur[t("city_nanite_factory")]=y+"v"}if(k.transmitter&&e.race.artifical){let y=k.transmitter*H(100);a.Food+=y,w[t("city_transmitter")]=y+"v"}if(e.city.pylon||e.space.pylon||e.tauceti.pylon){let y=0,z="city_pylon";(e.race.cataclysm||e.race.orbit_decayed)&&e.space.pylon?(y=H(2)*e.space.pylon.count,z="space_red_pylon"):e.tech.isolation&&e.tauceti.pylon?(y=H(2)*e.tauceti.pylon.count,z="tau_home_pylon"):e.city.pylon&&(y=H(5)*e.city.pylon.count),a.Mana+=y,l[t(z)]=y+"v"}if(e.city.captive_housing){let y=e.city.captive_housing.count;e.city.captive_housing.raceCap=y*(e.tech.unfathomable&&e.tech.unfathomable>=3?3:2),e.city.captive_housing.cattleCap=y*5}if(e.city.farm&&e.tech.farm){let y=e.city.farm.count*O.city.farm.citizens();a[e.race.species]+=y,n[t("city_farm")]=y+"v"}if(e.city.wharf){let y=e.tech.world_control?15:10;e.tech.particles&&e.tech.particles>=2&&(y*=2),a.Crates+=e.city.wharf.count*y,_[t("city_wharf")]=e.city.wharf.count*y+"v",a.Containers+=e.city.wharf.count*y,m[t("city_wharf")]=e.city.wharf.count*y+"v"}if(e.space.munitions_depot){let y=25;a.Crates+=e.space.munitions_depot.count*y,_[t("tech_munitions_depot")]=e.space.munitions_depot.count*y+"v",a.Containers+=e.space.munitions_depot.count*y,m[t("tech_munitions_depot")]=e.space.munitions_depot.count*y+"v"}if(e.interstellar.cargo_yard){a.Crates+=e.interstellar.cargo_yard.count*50,_[t("interstellar_cargo_yard_title")]=e.interstellar.cargo_yard.count*50+"v",a.Containers+=e.interstellar.cargo_yard.count*50,m[t("interstellar_cargo_yard_title")]=e.interstellar.cargo_yard.count*50+"v";let y=e.interstellar.cargo_yard.count*H(200);a.Neutronium+=y,da[t("interstellar_cargo_yard_title")]=y+"v",y=e.interstellar.cargo_yard.count*H(150),a.Infernite+=y,lr[t("interstellar_cargo_yard_title")]=y+"v"}if(e.interstellar.neutron_miner&&k.neutron_miner){let y=k.neutron_miner*H(500);a.Neutronium+=y,da[t("interstellar_neutron_miner_title")]=y+"v"}if(e.city.storage_yard){let y=e.tech.container>=3?20:10;e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=1&&(y+=10),e.tech.world_control&&(y+=10),e.tech.particles&&e.tech.particles>=2&&(y*=2),a.Crates+=e.city.storage_yard.count*y,_[t("city_storage_yard")]=e.city.storage_yard.count*y+"v"}if(e.space.garage){let y=e.tech.particles>=4?20+e.tech.supercollider:20;(e.tech.world_control||e.race.cataclysm)&&(y+=10),a.Containers+=e.space.garage.count*y,m[t("space_red_garage_title")]=e.space.garage.count*y+"v",(e.race.cataclysm||e.race.orbit_decayed)&&(a.Crates+=e.space.garage.count*y,_[t("space_red_garage_title")]=e.space.garage.count*y+"v")}if(e.tech.tp_depot&&(a.Containers+=e.tech.tp_depot*50,m[t("galaxy_gateway_depot")]=e.tech.tp_depot*50+"v",a.Crates+=e.tech.tp_depot*50,_[t("galaxy_gateway_depot")]=e.tech.tp_depot*50+"v"),e.city.warehouse){let y=e.tech.steel_container>=2?20:10;e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=2&&(y+=10),e.tech.world_control&&(y+=10),e.tech.particles&&e.tech.particles>=2&&(y*=2),a.Containers+=e.city.warehouse.count*y,m[t("city_warehouse")]=e.city.warehouse.count*y+"v"}if(e.city.rock_quarry){let y=Qt(e.city.rock_quarry.count*H(100));a.Stone+=y,A[t("city_rock_quarry")]=y+"v",a.Chrysotile+=y,x[t("city_rock_quarry")]=y+"v"}if(e.city.lumber_yard){let y=Qt(e.city.lumber_yard.count*H(100));a.Lumber+=y,M[t("city_lumber_yard")]=y+"v"}else if(e.city.graveyard){let y=Qt(e.city.graveyard.count*H(100));a.Lumber+=y,M[t("city_graveyard")]=y+"v"}if(e.city.sawmill){let y=Qt(e.city.sawmill.count*H(200));a.Lumber+=y,M[t("city_sawmill")]=y+"v"}if(e.city.mine&&(i.miner+=N(e.city.mine.count)),e.city.coal_mine&&(i.coal_miner+=N(e.city.coal_mine.count)),e.city.bank&&(i.banker+=N(e.city.bank.count)),e.city.amphitheatre){let y=ge("athleticism",1);i.entertainer+=N(y?e.city.amphitheatre.count*y:e.city.amphitheatre.count)}if(e.city.casino&&(i.entertainer+=N(e.city.casino.count)),e.space.spc_casino&&(i.entertainer+=N(e.space.spc_casino.count),e.race.orbit_decayed&&(i.banker+=N(e.space.spc_casino.count))),e.tauceti.tauceti_casino&&(i.entertainer+=N(e.tauceti.tauceti_casino.count),e.tech.isolation)){i.banker+=N(e.tauceti.tauceti_casino.count);let y=k.tauceti_casino*O.tauceti.tau_home.tauceti_casino.citizens();a[e.race.species]+=y,n[t("city_casino")]=y+"v"}if(e.galaxy.resort&&(i.entertainer+=N(k.resort*2)),e.city.cement_plant&&(i.cement_worker+=N(e.city.cement_plant.count*2)),e.race.orbit_decayed&&k.red_factory&&(i.cement_worker+=N(k.red_factory)),e.race.parasite&&!e.tech.isolation&&(i.garrison+=N(2)),e.city.garrison&&(i.garrison+=e.city.garrison.on*(e.tech.military>=5?N(3):N(2)),e.race.chameleon&&(i.garrison-=e.city.garrison.on)),e.space.space_barracks&&!e.race.fasting){let y=e.tech.marines>=2?N(4):N(2);i.garrison+=e.space.space_barracks.on*y}if(e.interstellar.cruiser&&(i.garrison+=bt.cruiser*N(3)),k.s_gate&&e.galaxy.starbase){let y=e.tech.marines>=2?N(8):N(5);i.garrison+=k.starbase*y}if(e.race.orbit_decayed&&e.space.hasOwnProperty("red_mine")&&(i.miner+=N(U.red_mine),i.coal_miner+=N(U.red_mine)),!e.tech.world_control){let y=N(e.civic.govern.type==="federation"?15:20);for(let z=2;z>=0;z--)e.civic.foreign[`gov${z}`].occ&&(i.garrison-=y,i.garrison<0&&(e.civic.foreign[`gov${z}`].occ=!1,i.garrison+=y,e.civic.garrison.workers+=y,I(t("civics_garrison_autodeoccupy_desc",[ut(z)]),"danger",!1,["spy"])))}if(e.race.slaver&&e.tech.slaves&&e.city.slave_pen&&(a.Slave=e.city.slave_pen.count*4,c[t("city_slave_pen")]=e.city.slave_pen.count*4+"v",a.Slavee.resource.Zen.max&&(e.resource.Zen.amount=e.resource.Zen.max);let y=e.resource.Zen.amount/(e.resource.Zen.amount+5e3);h[t("trait_calm_desc")]=`+${(y*100).toFixed(2)}%`}if(e.city.basic_housing){let y=e.city.basic_housing.count*O.city.basic_housing.citizens();a[e.race.species]+=y,n[St("small")]=y+"v"}if(e.tauceti.tau_housing&&e.tech.isolation){let y=e.tauceti.tau_housing.count*O.tauceti.tau_home.tau_housing.citizens();a[e.race.species]+=y,n[St("small")]=y+"v"}if(e.city.cottage){let y=e.city.cottage.count*O.city.cottage.citizens();if(a[e.race.species]+=y,n[St("medium")]=y+"v",e.tech.home_safe){let z=e.city.cottage.count*H(e.tech.home_safe>=2?e.tech.home_safe>=3?5e3:2e3:1e3);a.Money+=z,s[St("medium")]=z+"v"}}if(e.city.apartment){let y=k.apartment*O.city.apartment.citizens();if(a[e.race.species]+=y,n[St("large")]=y+"v",e.tech.home_safe){let z=k.apartment*H(e.tech.home_safe>=2?e.tech.home_safe>=3?1e4:5e3:2e3);a.Money+=z,s[St("large")]=z+"v"}}if(k.s_gate&&e.galaxy.consulate&&e.galaxy.consulate.count>=1){let y=O.galaxy.gxy_alien1.consulate.citizens();a[e.race.species]+=y,n[t("galaxy_consulate")]=y+"v"}if(k.s_gate&&k.embassy&&e.tech.xeno>=11){let y=O.galaxy.gxy_gorddon.embassy.citizens();a[e.race.species]+=y,n[t("galaxy_embassy")]=y+"v"}if(k.s_gate&&k.embassy&&e.galaxy.dormitory){let y=k.dormitory*O.galaxy.gxy_gorddon.dormitory.citizens();a[e.race.species]+=y,n[t("galaxy_dormitory")]=y+"v"}if(k.arcology){let y=k.arcology*O.portal.prtl_ruins.arcology.citizens();a[e.race.species]+=y,n[t("portal_arcology_title")]=y+"v",i.garrison+=k.arcology*N(5),a.Containers+=k.arcology*Math.round(xt)*10,m[t("portal_arcology_title")]=k.arcology*Math.round(xt)*10+"v",a.Crates+=k.arcology*Math.round(xt)*10,_[t("portal_arcology_title")]=k.arcology*Math.round(xt)*10+"v";let z=Nr("ruins"),E=k.arcology*H(Fr()*8*z.supress);a.Money+=E,s[t("portal_arcology_title")]=E+"v"}if(U.colony){let y=e.tech.isolation?900:250;a.Containers+=U.colony*y,m[t("tau_home_colony")]=U.colony*y+"v",a.Crates+=U.colony*y,_[t("tau_home_colony")]=U.colony*y+"v";let z=U.colony*O.tauceti.tau_home.colony.citizens();a[e.race.species]+=z,n[t("tau_home_colony")]=z+"v"}if(k.operating_base&&(i.garrison+=Math.min(U.operating_base,k.operating_base)*N(4)),k.fob&&(i.garrison+=N(10)),e.space.living_quarters){let y=Math.round(U.living_quarters*O.space.spc_red.living_quarters.citizens());if(a[e.race.species]+=y,i.colonist+=N(U.living_quarters),n[`${W().red}`]=y+"v",(e.race.cataclysm||e.race.orbit_decayed)&&e.tech.home_safe){let z=U.living_quarters*H(e.tech.home_safe>=2?e.tech.home_safe>=3?1e5:5e4:25e3);a.Money+=z,s[t("space_red_living_quarters_title")]=z+"v"}}if(U.biodome&&(e.race.artifical||e.race.orbit_decayed)){let y=U.biodome*H(e.race.artifical?500:100);a.Food+=y,w[t("space_red_signal_tower_title")]=y+"v"}if(e.space.titan_quarters){let y=Math.round(U.titan_quarters*O.space.spc_titan.titan_quarters.citizens());a[e.race.species]+=y,i.titan_colonist+=N(U.titan_quarters),n[`${W().titan}`]=y+"v"}if(e.interstellar.habitat&&k.habitat){let y=k.habitat*O.interstellar.int_alpha.habitat.citizens();a[e.race.species]+=y,n[t("interstellar_habitat_title")]=y+"v"}if(e.interstellar.luxury_condo&&k.luxury_condo){let y=k.luxury_condo*O.interstellar.int_alpha.luxury_condo.citizens();a[e.race.species]+=y,n[t("tech_luxury_condo")]=y+"v";let z=k.luxury_condo*H(75e4);a.Money+=z,s[t("tech_luxury_condo")]=z+"v"}if(e.city.lodge){let y=e.city.lodge.count*O.city.lodge.citizens();a[e.race.species]+=y,n[t("city_lodge")]=y+"v"}if(e.space.outpost){let y=e.space.outpost.count*H(500);a.Neutronium+=y,da[t("space_gas_moon_outpost_title")]=y+"v"}if(e.city.shed){var tr=ci();let y=e.tech.storage<=2?t("city_shed_title1"):e.tech.storage>=4?t("city_shed_title3"):t("city_shed_title2");for(let z of O.city.shed.res())if(e.resource[z].display){let E=e.city.shed.count*H(O.city.shed.val(z)*tr);a[z]+=E,v.c[z][y]=E+"v"}}if(e.race.lone_survivor&&(n[t("base")]="1v",a[e.race.species]=1),e.interstellar.warehouse){var tr=ci();let z=t("interstellar_alpha_name");for(let E of O.interstellar.int_alpha.warehouse.res())if(e.resource[E].display){let te=e.interstellar.warehouse.count*H(O.interstellar.int_alpha.warehouse.val(E)*tr);a[E]+=te,v.c[E][z]=te+"v"}}if(e.space.storehouse){var tr=Aa("storehouse",!1),nt=Aa("storehouse",!0);let z=t("space_storehouse_title");for(let E of O.space.spc_titan.storehouse.res())if(e.resource[E].display){let te=O.space.spc_titan.storehouse.heavy(E),Oe=e.space.storehouse.count*H(O.space.spc_titan.storehouse.val(E)*(te?nt:tr));a[E]+=Oe,v.c[E][z]=Oe+"v"}}if(e.tauceti.repository){var tr=Aa("repository");let z=t("tech_repository");for(let E of O.tauceti.tau_home.repository.res())if(e.resource[E].display){let te=e.tauceti.repository.count*H(O.tauceti.tau_home.repository.val(E)*tr);a[E]+=te,v.c[E][z]=te+"v"}if(e.tech.isolation){let E=250;a.Containers+=e.tauceti.repository.count*E,m[t("tech_repository")]=e.tauceti.repository.count*E+"v",a.Crates+=e.tauceti.repository.count*E,_[t("tech_repository")]=e.tauceti.repository.count*E+"v"}}if(e.tech.isolation&&k.tau_farm&&e.race.artifical){let y=k.tau_farm*H(350);a.Food+=y,w[t("tau_home_tau_farm")]=y+"v"}if(e.galaxy.gateway_depot){let y=e.tech.world_control?150:100;a.Crates+=e.galaxy.gateway_depot.count*y,_[t("galaxy_gateway_depot")]=e.galaxy.gateway_depot.count*y+"v",a.Containers+=e.galaxy.gateway_depot.count*y,m[t("galaxy_gateway_depot")]=e.galaxy.gateway_depot.count*y+"v";let z=t("galaxy_gateway_depot"),E=Xs();if(e.resource.Uranium.display){let te=e.galaxy.gateway_depot.count*H(3e3*E);a.Uranium+=te,Ge[z]=te+"v"}if(e.resource.Nano_Tube.display){let te=e.galaxy.gateway_depot.count*H(25e4*E);a.Nano_Tube+=te,Vt[z]=te+"v"}if(e.resource.Neutronium.display){let te=e.galaxy.gateway_depot.count*H(9001*E);a.Neutronium+=te,da[z]=te+"v"}if(e.resource.Infernite.display){let te=e.galaxy.gateway_depot.count*H(6660*E);a.Infernite+=te,lr[z]=te+"v"}if(e.resource.Elerium.display&&k.gateway_depot&&k.s_gate){let te=k.gateway_depot*H(200);a.Elerium+=te,Me[z]=te+"v"}}if(e.resource.Infernite.display&&e.portal.fortress){let y=H(1e3);a.Infernite+=y,lr[t("portal_fortress_name")]=y+"v"}if(e.space.garage){var tr=O.space.spc_red.garage.multiplier(!1),nt=O.space.spc_red.garage.multiplier(!0);let E=t("space_red_garage_title");for(let te of O.space.spc_red.garage.res())if(e.resource[te].display){let Oe=O.space.spc_red.garage.heavy(te),Kt=e.space.garage.count*H(O.space.spc_red.garage.val(te)*(Oe?nt:tr));a[te]+=Kt,v.c[te][E]=Kt+"v"}}if(e.portal.harbour&&k.harbour){let y=t("portal_harbour_title");for(let z of O.portal.prtl_lake.harbour.res())if(e.resource[z].display){let E=k.harbour*H(O.portal.prtl_lake.harbour.val(z));a[z]+=E,v.c[z][y]=E+"v"}}if(e.city.silo){let y=Qt(e.city.silo.count*H(500));a.Food+=y,w[t("city_silo")]=y+"v"}if(e.city.compost){let y=Qt(e.city.compost.count*H(200));a.Food+=y,w[t("city_compost_heap")]=y+"v"}if(e.city.soul_well){let y=Qt(e.city.soul_well.count*H(500));a.Food+=y,w[t("city_soul_well")]=y+"v"}if(e.city.smokehouse){let y=Qt(e.city.smokehouse.count*H(100));a.Food+=y,w[t("city_smokehouse")]=y+"v"}if(e.city.oil_well){let y=e.city.oil_well.count*H(500);a.Oil+=y,Y[t("city_oil_well")]=y+"v"}if(e.city.oil_depot){let y=e.city.oil_depot.count*H(1e3);y*=e.tech.world_control?1.5:1,a.Oil+=y,Y[t("city_oil_depot")]=y+"v",e.tech.uranium>=2&&(y=e.city.oil_depot.count*H(250),y*=e.tech.world_control?1.5:1,a.Uranium+=y,Ge[t("city_oil_depot")]=y+"v"),e.resource.Helium_3.display&&(y=e.city.oil_depot.count*H(400),y*=e.tech.world_control?1.5:1,a.Helium_3+=y,Rt[t("city_oil_depot")]=y+"v")}if(e.space.propellant_depot){let y=e.space.propellant_depot.count*H(1250);y*=e.tech.world_control?1.5:1,a.Oil+=y,Y[t("space_home_propellant_depot_title")]=y+"v",e.resource.Helium_3.display&&(y=e.space.propellant_depot.count*H(1e3),y*=e.tech.world_control?1.5:1,a.Helium_3+=y,Rt[t("space_home_propellant_depot_title")]=y+"v")}if(k.orbital_station){let y=k.orbital_station*H(15e3);a.Helium_3+=y,Rt[t("tau_home_orbital_station")]=y+"v"}if(k.refueling_station){let y=k.refueling_station*H(1e4);if(a.Helium_3+=y,Rt[t("tau_gas_refueling_station_title")]=y+"v",e.tech.tau_whale>=2){let z=k.refueling_station*H(6500);a.Oil+=z,Y[t("tau_gas_refueling_station_title")]=z+"v"}}if(k.orbital_platform){let y=k.orbital_platform*H(17500);a.Oil+=y,Y[t("tau_red_orbital_platform")]=y+"v"}if(e.space.gas_storage){let y=e.space.gas_storage.count*H(3500);y*=e.tech.world_control?1.5:1,a.Oil+=y,Y[`${W().gas} ${t("depot")}`]=y+"v",y=e.space.gas_storage.count*H(2500),y*=e.tech.world_control?1.5:1,a.Helium_3+=y,Rt[`${W().gas} ${t("depot")}`]=y+"v",y=e.space.gas_storage.count*H(1e3),y*=e.tech.world_control?1.5:1,a.Uranium+=y,Ge[`${W().gas} ${t("depot")}`]=y+"v"}if(k.xfer_station){let y=k.xfer_station*H(5e3);if(a.Helium_3+=y,Rt[t("interstellar_xfer_station_title")]=y+"v",y=k.xfer_station*H(4e3),a.Oil+=y,Y[t("interstellar_xfer_station_title")]=y+"v",y=k.xfer_station*H(2500),a.Uranium+=y,Ge[t("interstellar_xfer_station_title")]=y+"v",e.resource.Deuterium.display){let z=k.xfer_station*H(2e3);a.Deuterium+=z,$r[t("interstellar_xfer_station_title")]=z+"v"}}if(e.space.helium_mine){let y=e.space.helium_mine.count*H(100);a.Helium_3+=y,Rt[t("space_moon_helium_mine_title")]=y+"v"}if(Va()){let y=ka("know");a.Knowledge+=y.add,d[t("city_shrine")]=y.add+"v"}e.city.temple&&e.genes.ancients&&e.genes.ancients>=2&&(i.priest+=N(e.city.temple.count)),e.space.ziggurat&&e.genes.ancients&&e.genes.ancients>=4&&(i.priest+=N(e.space.ziggurat.count));let Le=kt("gxy_alien2");if(e.city.university){let y=O.city.university.knowVal()*e.city.university.count;i.professor+=N(e.city.university.count),a.Knowledge+=y,d[t("city_university")]=y+"v"}if(e.race.lone_survivor&&e.tauceti.alien_outpost&&(i.professor+=N(e.tauceti.alien_outpost.count)),e.city.library){let y=125;e.race.nearsighted&&(y*=1-b.nearsighted.vars()[0]/100),e.race.studious&&(y*=1+b.studious.vars()[1]/100);let z=ve("elven");if(z>0&&(y*=1+b.studious.vars(1)[1]/100*z),e.tech.science&&e.tech.science>=8&&(y*=1.4),e.tech.science&&e.tech.science>=5){let Qe=ye(e.civic.scientist.workers,"scientist");e.race.high_pop&&(Qe=xe(Qe)),y*=1+Qe*.12}e.tech.anthropology&&e.tech.anthropology>=2&&(y*=1+(e.race.cataclysm||e.race.orbit_decayed?e.space.ziggurat?e.space.ziggurat.count:0:e.city.temple.count)*.05);let E=ge("teacher",0);E&&(y*=1+E/100);let te=ge("athleticism",2);te&&(y*=1-te/100);let Oe=ge("muckraker",1);Oe&&(y*=1+Oe/100);let Kt=Math.round(e.city.library.count*y);a.Knowledge+=Kt,d[t("city_library")]=Kt+"v",e.tech.science&&e.tech.science>=3&&(e.civic.professor.impact=.5+e.city.library.count*.01)}if(e.city.wardenclyffe){let y=1e3;e.city.ptrait.includes("magnetic")&&(y+=Re.magnetic.vars()[1]);let z=e.city.wardenclyffe.count*y;i.scientist+=N(e.city.wardenclyffe.count);let E=e.tech.science>=7?1500:1e3;if(z+=k.wardenclyffe*E,e.tech.supercollider){let Oe=e.tech.tp_particles||e.tech.particles&&e.tech.particles>=3?12.5:25;z*=e.tech.supercollider/Oe+1}e.space.satellite&&(z*=1+e.space.satellite.count*.04);let te=ge("athleticism",2);if(te&&(z*=1-te/100),a.Knowledge+=z,d[dr()]=z+"v",e.race.universe==="magic"){let Oe=e.city.wardenclyffe.count*H(8);a.Mana+=Oe,l[dr()]=Oe+"v"}if(e.race.artifical){let Oe=k.wardenclyffe*H(250);a.Food+=Oe,w[dr()]=Oe+"v"}}if(e.race.logical){let y=e.tech.hasOwnProperty("high_tech")?e.tech.high_tech:0;y+=e.tech.hasOwnProperty("science")?e.tech.science:0;let z=e.resource[e.race.species].amount*b.logical.vars()[1]*y;a.Knowledge+=z,d[F[e.race.species].name]=z+"v"}if(e.portal.sensor_drone){let y=k.sensor_drone*(e.tech.infernite>=6?2500:1e3);a.Knowledge+=y,d[t("portal_sensor_drone_title")]=y+"v"}if(e.space.satellite){let y=e.space.satellite.count*(e.race.cataclysm||e.race.orbit_decayed?2e3:750);if((e.race.cataclysm||e.race.orbit_decayed)&&e.tech.supercollider){let z=e.tech.tp_particles||e.tech.particles&&e.tech.particles>=3?5:10;y*=e.tech.supercollider/z+1}a.Knowledge+=y,d[t("space_home_satellite_title")]=y+"v"}if(e.space.observatory&&e.space.observatory.count>0){let y=U.observatory*5e3;e.race.cataclysm&&e.space.satellite&&e.space.satellite.count>0&&(y*=1+e.space.satellite.count*.25),a.Knowledge+=y,d[t("space_moon_observatory_title")]=y+"v",e.race.cataclysm&&(i.professor+=N(U.observatory))}if(e.interstellar.laboratory&&bt.laboratory>0){e.tech.science>=16&&(i.scientist+=N(bt.laboratory));let y=bt.laboratory*1e4;if(e.tech.science>=15&&(y*=1+(e.race.cataclysm?U.exotic_lab:e.city.wardenclyffe.count)*.02),e.race.cataclysm&&k.s_gate&&we.scavenger&&(y*=1+we.scavenger*kt("gxy_alien2")*.75),e.tech.science>=21&&(y*=1.45),a.Knowledge+=y,d[t(e.race.universe==="magic"?"tech_sanctum":"interstellar_laboratory_title")]=y+"v",e.race.universe==="magic"){let z=bt.laboratory*H(12);a.Mana+=z,l[t(e.race.universe==="magic"?"tech_sanctum":"interstellar_laboratory_title")]=z+"v"}}if(e.city.biolab){let y=3e3;e.portal.sensor_drone&&e.tech.science>=14&&(y*=1+k.sensor_drone*.02),e.tech.science>=20&&(y*=3),e.tech.science>=21&&(y*=1.45),e.tech.biotech>=1&&(y*=2.5),a.Knowledge+=k.biolab*y,d[t("city_biolab")]=k.biolab*y+"v"}if(e.space.zero_g_lab&&Math.min(U.zero_g_lab,k.zero_g_lab)>0){let y=Math.min(U.zero_g_lab,k.zero_g_lab),z=yt("spc_enceladus"),E=Math.round(y*1e4*z);if(a.Knowledge+=E,d[t("tech_zero_g_lab")]=E+"v",e.resource.Cipher.display){let te=1e4*y;a.Cipher+=te,zt[t("tech_zero_g_lab")]=te+"v"}}if(e.tech.isolation&&e.tauceti.alien_outpost&&e.resource.Cipher.display){let y=2e5;a.Cipher+=y,zt[t("tech_alien_outpost")]=y+"v"}if(e.portal.archaeology){let y=Nr("ruins"),z=25e4;e.race.high_pop&&(z=xe(z));let E=Math.round(z*y.supress);a.Knowledge+=ye(e.civic.archaeologist.workers,"archaeologist")*E,d[t("portal_archaeology_bd")]=ye(e.civic.archaeologist.workers,"archaeologist")*E+"v"}if(k.embassy&&e.galaxy.symposium){let y=1750*k.dormitory,z=650*e.galaxy.trade.cur,E=0;if(e.tech.xeno>=7){let Oe=e.galaxy.defense.gxy_gorddon.scout_ship*(O.galaxy.gxy_gateway.scout_ship.ship.civ()+O.galaxy.gxy_gateway.scout_ship.ship.mil());Oe+=e.galaxy.defense.gxy_gorddon.corvette_ship*(O.galaxy.gxy_gateway.corvette_ship.ship.civ()+O.galaxy.gxy_gateway.corvette_ship.ship.mil()),Oe+=e.galaxy.defense.gxy_gorddon.frigate_ship*(O.galaxy.gxy_gateway.frigate_ship.ship.civ()+O.galaxy.gxy_gateway.frigate_ship.ship.mil()),Oe+=e.galaxy.defense.gxy_gorddon.cruiser_ship*(O.galaxy.gxy_gateway.cruiser_ship.ship.civ()+O.galaxy.gxy_gateway.cruiser_ship.ship.mil()),Oe+=e.galaxy.defense.gxy_gorddon.dreadnought*(O.galaxy.gxy_gateway.dreadnought.ship.civ()+O.galaxy.gxy_gateway.dreadnought.ship.mil()),we.freighter&&(Oe+=we.freighter*(O.galaxy.gxy_gorddon.freighter.ship.civ()+O.galaxy.gxy_gorddon.freighter.ship.mil())),E=+xe(Oe).toFixed(2)*300}let te=(y+z+E)*k.symposium;a.Knowledge+=te,d[t("galaxy_symposium")]=te+"v"}if(e.city.bank||e.race.cataclysm&&k.spaceport){let y=e.race.cataclysm||e.race.orbit_decayed?Fr()*4:Fr(),z=e.race.cataclysm||e.race.orbit_decayed?k.spaceport:e.city.bank.count,E=z*H(y);if(a.Money+=E,e.race.cataclysm||e.race.orbit_decayed?s[t("space_red_spaceport_title")]=E+"v":s[t("city_bank")]=E+"v",e.interstellar.exchange){let te=H(bt.exchange*(y*z/18));e.race.inflation&&(te*=2),e.tech.banking>=13&&(e.galaxy.freighter&&(te*=1+we.freighter*.03),e.galaxy.super_freighter&&(te*=1+we.super_freighter*.08)),te=Math.round(te),a.Money+=te,s[t("interstellar_exchange_bd")]=te+"v"}}if(e.space.titan_bank){let y=Fr()*2,E=e.space.titan_bank.count*H(y);a.Money+=E,s[`${W().titan} ${t("city_bank")}`]=E+"v"}if(e.tauceti.colony&&e.tech.isolation){let y=Fr()*25,z=e.tauceti.colony.count*H(y);a.Money+=z,s[t("tau_home_colony")]=z+"v"}if(e.city.casino||e.space.spc_casino||e.tauceti.tauceti_casino){let y=0;e.city.casino&&e.city.casino.count>0&&(y+=e.city.casino.count),e.space.spc_casino&&e.space.spc_casino.count>0&&(y+=e.space.spc_casino.count),e.tauceti.tauceti_casino&&e.tauceti.tauceti_casino.count>0&&(y+=e.tauceti.tauceti_casino.count);let z=e.tech.gambling>=3?6e4:4e4;e.tech.gambling>=5&&(z+=e.tech.gambling>=6?24e4:6e4);let E=y*H(z);e.race.gambler&&(E*=1+b.gambler.vars()[0]*e.race.gambler/100),e.tech.world_control&&(E=Math.round(E*1.25)),e.tech.stock_exchange&&e.tech.gambling>=4&&(E*=1+e.tech.stock_exchange*.05),e.race.inflation&&(E*=1+e.race.inflation/100),e.tech.isolation&&(E*=5.5),a.Money+=E,s[t("city_casino")]=E+"v"}if(e.galaxy.resort){let y=k.resort*H(e.tech.world_control?1875e3:15e5);a.Money+=y,s[t("galaxy_resort")]=y+"v"}if(e.tech.banking>=4){let y=250;e.tech.banking>=11?y=1e3:e.tech.banking>=6&&(y=600);let z=y*(e.resource[e.race.species].amount+e.civic.garrison.workers);e.race.high_pop&&(z=xe(z)),a.Money+=z,s[t("tech_bonds")]=z+"v"}if(k.moon_base){let y=k.moon_base*H(500);a.Iridium+=y,fr[t("space_moon_base_title")]=y+"v"}if(k.space_station&&(i.space_miner+=N(k.space_station*3),e.tech.asteroid>=5)){let y=k.space_station*H(5);a.Elerium+=y,Me[t("space_belt_station_title")]=y+"v"}if(U.exotic_lab){let y=U.exotic_lab*H(10);a.Elerium+=y,Me[t("space_red_exotic_lab_bd")]=y+"v";let z=500;if(e.tech.science>=13&&e.interstellar.laboratory&&(z+=bt.laboratory*25),e.tech.ancient_study&&e.tech.ancient_study>=2&&(z+=e.space.ziggurat.count*15),e.tech.mass>=2){let te=ye(e.civic.scientist.workers,"scientist");e.race.high_pop&&(te=xe(te)),z+=k.mass_driver*te}e.race.cataclysm&&U.observatory&&(z*=1+U.observatory*.25),(e.race.cataclysm||e.race.orbit_decayed)&&e.portal.sensor_drone&&e.tech.science>=14&&(z*=1+k.sensor_drone*.02),e.tech.science>=21&&(z*=1.45),e.race.high_pop&&(z=xe(z));let E=U.exotic_lab*ye(e.civic.colonist.workers,"colonist")*z;a.Knowledge+=E,d[t("tech_exotic_bd")]=E+"v",(e.race.cataclysm||e.race.orbit_decayed)&&(i.scientist+=N(U.exotic_lab))}if(e.tech.isolation&&U.infectious_disease_lab&&(i.professor+=N(U.infectious_disease_lab*2),i.scientist+=N(U.infectious_disease_lab)),U.decoder){let y=k.ai_colonist?ye(e.civic.titan_colonist.workers,"titan_colonist")+N(k.ai_colonist):ye(e.civic.titan_colonist.workers,"titan_colonist"),z=U.decoder*y*2500;e.race.high_pop&&(z=xe(z)),k.ai_core2&&(z*=1.25),a.Knowledge+=z,d[t("space_decoder_title")]=z+"v"}if(k.elerium_contain){let y=k.elerium_contain*H(100);a.Elerium+=y,Me[t("space_dwarf_elerium_contain_title")]=y+"v"}if(e.city.foundry&&(i.craftsman+=N(e.city.foundry.count)),U.fabrication&&(i.craftsman+=N(U.fabrication),e.race.cataclysm&&(i.cement_worker+=N(U.fabrication))),e.tech.isolation&&U.tau_factory&&(i.craftsman+=N(U.tau_factory*5),i.cement_worker+=N(U.tau_factory*2)),k.womling_station&&(i.craftsman+=N(k.womling_station*1),i.cement_worker+=N(k.womling_station*1)),k.stellar_forge&&(i.craftsman+=N(k.stellar_forge*2)),e.portal.carport&&(i.hell_surveyor+=e.portal.carport.count-e.portal.carport.damaged),k.archaeology&&(i.archaeologist+=N(k.archaeology*2)),k.nexus){let y=k.nexus*H(4e3);a.Helium_3+=y,Rt[t("interstellar_nexus_title")]=y+"v";let z=k.nexus*H(3500);a.Oil+=z,Y[t("interstellar_nexus_title")]=z+"v";let E=k.nexus*H(3e3);a.Deuterium+=E,$r[t("interstellar_nexus_title")]=E+"v";let te=k.nexus*H(25);a.Elerium+=te,Me[t("interstellar_nexus_title")]=te+"v"}if(k.s_gate&&e.galaxy.gateway_station){let y=k.gateway_station*H(2e3);a.Helium_3+=y,Rt[t("galaxy_gateway_station")]=y+"v";let z=k.gateway_station*H(4500);a.Deuterium+=z,$r[t("galaxy_gateway_station")]=z+"v";let E=k.gateway_station*H(50);a.Elerium+=E,Me[t("galaxy_gateway_station")]=E+"v"}if(k.s_gate&&k.telemetry_beacon){let y=e.tech.telemetry?1200:800;e.tech.science>=17&&(y+=we.scout_ship*25);let z=k.telemetry_beacon**2*y;a.Knowledge+=z,d[t("galaxy_telemetry_beacon_bd")]=z+"v"}if(k.s_gate&&we.scavenger){let y=we.scavenger*Math.round(Le*25e3);a.Knowledge+=y,d[t("galaxy_scavenger")]=y+"v"}if(v.t_route={},e.city.market.mtrade=0,e.race.banana&&(e.city.market.mtrade++,v.t_route[t("base")]=1),e.city.trade){let y=e.race.nomadic||e.race.xenophobic?e.tech.trade:e.tech.trade+1;if(e.tech.trade&&e.tech.trade>=3&&y--,e.race.flier&&(y+=b.flier.vars()[1]),e.city.market.mtrade+=y*e.city.trade.count,v.t_route[t("city_trade")]=y*e.city.trade.count,e.tech.fanaticism&&e.tech.fanaticism>=3){let z=e.race.cataclysm||e.race.orbit_decayed?e.space.ziggurat?e.space.ziggurat.count:0:e.city.temple.count;e.city.market.mtrade+=z,v.t_route[e.race.cataclysm?t("space_red_ziggurat_title"):t("city_temple")]=z}}if(e.city.wharf){let y=e.city.wharf.count*2;e.city.market.mtrade+=y,v.t_route[t("city_wharf")]=y}if(e.space.gps&&e.space.gps.count>=4){let y=e.space.gps.count*2;e.city.market.mtrade+=e.space.gps.count*2,v.t_route[t("space_home_gps_title")]=y}if(e.city.storage_yard&&e.tech.trade&&e.tech.trade>=3){let y=e.city.storage_yard.count;e.city.market.mtrade+=y,v.t_route[t("city_storage_yard")]=y}if(e.tech.railway){let y=0;e.race.cataclysm||e.race.orbit_decayed?y=e.space.gps?Math.floor(e.space.gps.count/3):0:y=e.city.storage_yard?Math.floor(e.city.storage_yard.count/6):0,e.stats.achieve.banana&&e.stats.achieve.banana.l>=2&&y++,e.city.market.mtrade+=e.tech.railway*y,v.t_route[t("arpa_projects_railway_title")]=e.tech.railway*y}if(k.titan_spaceport){let y=k.titan_spaceport*H(250);a.Water+=y,st[t("space_red_spaceport_title")]=y+"v"}if(e.tauceti.mining_pit&&(i.pit_miner+=N(U.mining_pit*(e.tech.isolation?6:8)),a.Materials+=U.mining_pit*1e6),e.civic.torturer.display&&e.tech.unfathomable&&e.tech.unfathomable>=2&&(i.torturer=e.city.captive_housing.count),e.race.universe==="magic"&&e.race.witch_hunter){let y=0;if(e.city.wardenclyffe){let E=e.city.wardenclyffe.count;E+=k.wardenclyffe,e.tech.roguemagic&&e.tech.roguemagic>=6&&(E/=2),o[dr()]=E+"v",y+=E}if(e.civic.scientist.workers>0){let E=e.civic.scientist.workers;e.civic.govern.type==="magocracy"&&(E/=2),E=xe(E),o[t("job_wizard")]=E+"v",y+=E}if(e.city.coal_power&&!e.race.environmentalist){let E=k.coal_power;e.tech.roguemagic&&e.tech.roguemagic>=6&&(E/=2),o[t("city_mana_engine")]=E+"v",y+=E}if(e.city.pylon||e.space.pylon||e.tauceti.pylon){let E=0,te="city_pylon";(e.race.cataclysm||e.race.orbit_decayed)&&e.space.pylon?(E=e.space.pylon.count,te="space_red_pylon"):e.tech.isolation&&e.tauceti.pylon?(E=e.tauceti.pylon.count,te="tau_home_pylon"):e.city.pylon&&(E=e.city.pylon.count),e.tech.roguemagic&&e.tech.roguemagic>=5&&(E/=3),o[t(te)]=E+"v",y+=E}if(e.race.casting){let E=e.race.casting.total;e.tech.roguemagic&&e.tech.roguemagic>=2&&(e.tech.roguemagic>=4&&(E/=4),E-=xe(e.civic.priest.workers),E<0&&(E=0)),o[t("tech_rituals")]=E+"v",y+=E}if(e.race.totTransmute&&e.race.totTransmute>0){let E=e.race.totTransmute/5;o[t("tech_alchemy")]=E+"v",y+=E}let z=0;if(e.tech.explosives&&(z+=4),e.tech.military&&(e.tech.military>=10?z+=28:e.tech.military>=9?z+=24:e.tech.military>=8?z+=20:e.tech.military>=7?z+=16:e.tech.military>=6?z+=12:e.tech.military>=4?z+=8:e.tech.military>=3&&(z+=4)),o[t("witch_hunter_magic_tech")]=z+"v",y+=z,e.tech.roguemagic||(o[t("overt")]=y*5-y+"v",y*=5),e.tech.nexus){let E=e.tech.nexus*.15;o[t("arpa_projects_nexus_title")]=E+"v",y+=E}if(e.tech.syphon){let E=e.tech.syphon*2.5;o[t("arpa_syphon_title")]=E+"v",y+=E}if(e.portal.hasOwnProperty("soul_capacitor")){let E=k.soul_capacitor||0;e.portal.soul_capacitor.ecap=25e5*E,o[t("portal_soul_capacitor_title")]=E/3+"v",y+=E/3}if(e.tech.roguemagic&&e.tech.roguemagic>=3&&e.city.conceal_ward){let E=e.city.conceal_ward.count;e.tech.roguemagic>=8&&(E*=1.25),o[t("city_conceal_ward")]=-E+"v",y-=E}y<0&&(y=0),y=Math.floor(y),e.resource.Sus.amount=y,y>=50&&!e.race.witch_hunter_warned?(e.race.witch_hunter_warned=1,I(t("witch_hunter_warning"),"danger",!1,["progress"])):y>=80&&e.race.witch_hunter_warned&&e.race.witch_hunter_warned===1&&(e.race.witch_hunter_warned=2,I(t("witch_hunter_warning2"),"danger",!1,["progress"])),y>=100&&(e.civic.foreign.gov0.hstl=100,e.civic.foreign.gov1.hstl=100,e.civic.foreign.gov2.hstl=100,e.race.truepath&&(e.civic.foreign.gov3.hstl=100))}if(v.gt_route={},e.galaxy.freighter&&(v.gt_route[t("galaxy_freighter")]=we.freighter*2),e.galaxy.super_freighter&&(v.gt_route[t("galaxy_super_freighter")]=we.super_freighter*5),e.galaxy.bolognium_ship&&(i.crew+=e.galaxy.bolognium_ship.on*O.galaxy.gxy_gateway.bolognium_ship.ship.civ()),e.galaxy.scout_ship&&(i.crew+=e.galaxy.scout_ship.on*O.galaxy.gxy_gateway.scout_ship.ship.civ()),e.galaxy.corvette_ship&&(i.crew+=e.galaxy.corvette_ship.on*O.galaxy.gxy_gateway.corvette_ship.ship.civ()),e.galaxy.frigate_ship&&(i.crew+=e.galaxy.frigate_ship.on*O.galaxy.gxy_gateway.frigate_ship.ship.civ()),e.galaxy.cruiser_ship&&(i.crew+=e.galaxy.cruiser_ship.on*O.galaxy.gxy_gateway.cruiser_ship.ship.civ()),e.galaxy.dreadnought&&(i.crew+=e.galaxy.dreadnought.on*O.galaxy.gxy_gateway.dreadnought.ship.civ()),e.galaxy.freighter&&(i.crew+=e.galaxy.freighter.on*O.galaxy.gxy_gorddon.freighter.ship.civ()),e.galaxy.super_freighter&&(i.crew+=e.galaxy.super_freighter.on*O.galaxy.gxy_alien1.super_freighter.ship.civ()),e.galaxy.armed_miner&&(i.crew+=e.galaxy.armed_miner.on*O.galaxy.gxy_alien2.armed_miner.ship.civ()),e.galaxy.scavenger&&(i.crew+=e.galaxy.scavenger.on*O.galaxy.gxy_alien2.scavenger.ship.civ()),e.portal.transport&&(i.crew+=e.portal.transport.on*O.portal.prtl_lake.transport.ship.civ()),e.tauceti.infectious_disease_lab){let y=39616;if(e.tech.supercollider&&e.tech.isolation){let z=e.tech.tp_particles||e.tech.particles&&e.tech.particles>=3?12.5:25;y*=e.tech.supercollider/z+1}if(a.Knowledge+=k.infectious_disease_lab*Math.round(y),d[O.tauceti.tau_home.infectious_disease_lab.title()]=k.infectious_disease_lab*y+"v",e.tech.isolation){let z=U.infectious_disease_lab*H(375);a.Elerium+=z,Me[O.tauceti.tau_home.infectious_disease_lab.title()]=z+"v"}}if(e.race.truepath&&e.tauceti.overseer&&e.tech.tau_red&&e.tech.tau_red>=5){let y=0,z=e.tauceti.overseer.injured,E=0,te=0,Oe=0;e.race.womling_friend?(te+=25+U.overseer*O.tauceti.tau_red.overseer.val(),E+=75+U.womling_fun*O.tauceti.tau_red.womling_fun.val()):e.race.womling_god?(te+=75+U.overseer*O.tauceti.tau_red.overseer.val(),E+=40+U.womling_fun*O.tauceti.tau_red.womling_fun.val()):e.race.womling_lord&&(te+=U.overseer*O.tauceti.tau_red.overseer.val(),E+=30+U.womling_fun*O.tauceti.tau_red.womling_fun.val());let Kt=e.tech.womling_pop&&e.tech.womling_pop>=2?6:5;y=U.womling_village*Kt;let Qe=U.womling_farm*2;Qe>y&&(Qe=y);let et=e.tech.womling_pop?8:6;e.tech.womling_gene&&(et+=2),y>Qe*et&&(y=Qe*et);let ke=y-Qe-z,Ae=0;if(U.womling_lab){Ae=U.womling_lab,Ae>ke&&(Ae=ke),ke-=Ae;let xr=Ae*Math.round(25e3*e.tauceti.overseer.prod/100);if(a.Knowledge+=xr,d[t("interstellar_laboratory_title")]=xr+"v",Math.rand(0,10)=5?4.9:5;e.race.lone_survivor&&(mi-=.1),e.tauceti.womling_lab.tech>=Math.round((e.tech.womling_tech+2)**mi)&&(e.tech.womling_tech++,e.tauceti.womling_lab.tech=0,I(t("tau_red_womling_advancement",[e.tech.womling_tech]),"advanced",!1,["progress"]),ue())}}let ct=U.womling_mine*6;ct>ke&&(ct=ke),ke-=ct;let ur=e.tech.tech_womling_firstaid?3:4;if(Math.rand(0,10)===0){let xr=Math.rand(0,ct+Ae);xr>z&&(z=xr)}else z>0&&Math.rand(0,ur)===0&&z--;e.tauceti.hasOwnProperty("womling_farm")&&(e.tauceti.womling_farm.farmers=Qe),e.tauceti.hasOwnProperty("womling_mine")&&(e.tauceti.womling_mine.miners=ct),e.tauceti.hasOwnProperty("womling_lab")&&(e.tauceti.womling_lab.scientist=Ae),te-=ct,E-=ct,E-=Qe,E-=z,te>100?te=100:te<0&&(te=0),E>100?E=100:E<0&&(E=0),Oe=Math.round((te+E)/2),e.tauceti.overseer.loyal=te,e.tauceti.overseer.morale=E,e.tauceti.overseer.pop=y,e.tauceti.overseer.working=Qe+ct+Ae,e.tauceti.overseer.injured=z,e.tauceti.overseer.prod=Oe}["inspired","distracted","stimulated","motivated"].forEach(function(y){e.race[y]&&(e.race[y]--,e.race[y]<=0&&delete e.race[y])});let p=e.resource[e.race.species].amount-a[e.race.species];if(p>0&&(e.race.orbit_decayed&&e.stats.days===e.race.orbit_decay?I(t("tragic_death",[p]),"danger"):(I(t(p===1?"abandon1":"abandon2",[p]),"danger"),e.civic.homeless+=p)),k.world_controller){let y=.25;e.interstellar.far_reach&&k.far_reach>0&&(y+=k.far_reach*.01),e.tech.science>=19&&(y+=.15);let z=Math.round(a.Knowledge*y);a.Knowledge+=z,d[t("space_dwarf_collider_title")]=z+"v"}if(k.alien_outpost){let y=0;e.tech.isolation&&(y=e.race.lone_survivor?35e5:65e5,a.Knowledge+=y);let z=.2,E=Math.round(a.Knowledge*z);a.Knowledge+=E,d[t("tech_alien_outpost")]=E+y+"v"}let g=a.Crates,q=a.Containers;if(Object.keys(a).forEach(function(y){a.Crates-=e.resource[y].crates}),Object.keys(a).forEach(function(y){a.Containers-=e.resource[y].containers}),a.Crates<0){let y=0-a.Crates;Object.keys(a).forEach(function(z){if(y>0){let E=e.resource[z].crates;E>y&&(E=y),a.Crates+=E,e.resource[z].crates-=E,y-=E}})}if(a.Containers<0){let y=0-a.Containers;Object.keys(a).forEach(function(z){if(y>0){let E=e.resource[z].containers;E>y&&(E=y),a.Containers+=E,e.resource[z].containers-=E,y-=E}})}_[t("crates_used")]=a.Crates-g+"v",m[t("crates_used")]=a.Containers-q+"v";let C=Zi(),P=Ji();Object.keys(a).forEach(function(y){let z=e.resource[y].crates*C;a[y]+=z;let E=e.resource[y].containers*P;a[y]+=E,v.c[y]&&(v.c[y][t("resource_Crates_plural")]=z+"v",v.c[y][t("resource_Containers_plural")]=E+"v"),e.resource[y].max=a[y],e.resource[y].amount>e.resource[y].max&&y!="Sus"?e.resource[y].amount=e.resource[y].max:e.resource[y].amount<0&&(e.resource[y].amount=0),e.resource[y].amount>=e.resource[y].max*.99?$(`#res${y} .count`).hasClass("has-text-warning")||$(`#res${y} .count`).addClass("has-text-warning"):$(`#res${y} .count`).hasClass("has-text-warning")&&$(`#res${y} .count`).removeClass("has-text-warning")});let R=!1,G=0,X=0;if(Object.keys(i).forEach(function(y){e.civic[y].max===-1&&e.civic[y].display&&y!=="unemployed"&&y!=="scavenger"&&X++}),["Scarletite","Quantium"].forEach(function(y){bi(y)}),Object.keys(i).forEach(function(y){e.civic[y].max=i[y],e.civic[y].workers>e.civic[y].max&&e.civic[y].max!==-1?e.civic[y].workers=e.civic[y].max:(!e.civic[y].display||e.civic[y].workers<0)&&(e.civic[y].workers=0),e.race.servants&&(e.civic[y].max===-1&&!e.race.servants.jobs.hasOwnProperty(y)&&(e.race.servants.jobs[y]=0,R=!0),e.race.servants.jobs.hasOwnProperty(y)&&(!e.civic[y].display&&(y!=="scavenger"||X>0)?e.race.servants.jobs[y]=0:G+=e.race.servants.jobs[y],G>e.race.servants.max&&e.race.servants.jobs[y]>0&&(e.race.servants.jobs[y]--,G--)))}),R?oc():e.race.servants&&(e.race.servants.force_scavenger=X===0,e.race.servants.used=G),e.race.servants&&e.race.servants.hasOwnProperty("smax")&&e.race.servants.smax>0){let y=0;Object.keys(e.race.servants.sjobs).forEach(function(z){e.resource[z].display||(e.race.servants.sjobs[z]=0),y+=e.race.servants.sjobs[z],y>e.race.servants.smax&&(e.race.servants.sjobs[z]-=y-e.race.servants.smax),e.race.servants.sjobs[z]<0&&(e.race.servants.sjobs[z]=0)}),e.race.servants.sused=y}if(e.race.gravity_well){let y=0;["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger","miner","coal_miner","craftsman","cement_worker","space_miner","hell_surveyor","pit_miner"].forEach(function(z){y+=e.civic[z].workers,e.race.servants&&e.race.servants.jobs[z]&&(y+=e.race.servants.jobs[z])}),e.city.oil_well&&(y+=e.city.oil_well.count*(e.tech.teamster&&e.tech.teamster>=3?0:2)),e.city.factory&&k.factory&&(y+=k.factory*2),e.space.red_factory&&k.red_factory&&(y+=k.red_factory*2),e.space.moon_base&&U.iridium_mine&&(y+=U.iridium_mine*2),e.space.moon_base&&U.helium_mine&&(y+=U.helium_mine),e.tech.mars&&U.red_mine&&(y+=U.red_mine*3),k.outpost&&(y+=k.outpost*3),e.race.servants&&e.race.servants.hasOwnProperty("smax")&&e.race.servants.smax>0&&(y+=e.race.servants.sused),e.race.teamster=y}if(e.civic.space_miner.display&&e.space.space_station&&(e.space.space_station.s_max=ye(e.civic.space_miner.workers,"space_miner")),e.portal.hasOwnProperty("transport")){let y=0;we.transport&&(y=we.transport*5),e.portal.transport.cargo.max=y}if(e.portal.hasOwnProperty("purifier")){let y=100,z=1e4;pa.base_camp&&(z*=1+pa.base_camp*.4),pa.port&&(y+=pa.port*z),e.portal.purifier.sup_max=Math.round(y)}let ee=e.race.truepath?5:3,Z=e.race.blurry?2:0,ae=ve("yeti");ae>=.25&&(Z+=ae>=.5?2:1);for(let y=0;y0&&(e.civic.foreign[`gov${y}`].trn--,e.civic.foreign[`gov${y}`].trn===0&&e.civic.foreign[`gov${y}`].spy++),e.civic.foreign[`gov${y}`].sab>0&&(e.civic.foreign[`gov${y}`].sab--,e.civic.foreign[`gov${y}`].sab===0))switch(e.civic.foreign[`gov${y}`].act){case"influence":if(Math.floor(J(0,4+Z))===0)Gc(y);else{let te=Math.floor(J(e.tech.spy>=5?2:1,e.tech.spy>=5?8:6));r==="scorpio"&&(te+=Zt("scorpio")[1]),e.civic.foreign[`gov${y}`].hstl-=te,e.civic.foreign[`gov${y}`].hstl<0&&(e.civic.foreign[`gov${y}`].hstl=0),I(t("civics_spy_influence_success",[ut(y),te]),"success",!1,["spy"])}break;case"sabotage":if(Math.floor(J(0,3+Z))===0)Gc(y);else{let te=Math.floor(J(e.tech.spy>=5?2:1,e.tech.spy>=5?8:6));r==="scorpio"&&(te+=Zt("scorpio")[1]),e.civic.foreign[`gov${y}`].mil-=te,e.civic.foreign[`gov${y}`].mil<50&&(e.civic.foreign[`gov${y}`].mil=50),I(t("civics_spy_sabotage_success",[ut(y),te]),"success",!1,["spy"])}break;case"incite":if(Math.floor(J(0,2+Math.floor(Z/2)))===0)Gc(y);else{let te=Math.floor(J(e.tech.spy>=5?2:1,e.tech.spy>=5?8:6));r==="scorpio"&&(te+=Zt("scorpio")[1]),e.civic.foreign[`gov${y}`].unrest+=te,e.civic.foreign[`gov${y}`].unrest>100&&(e.civic.foreign[`gov${y}`].unrest=100),I(t("civics_spy_incite_success",[ut(y),te]),"success",!1,["spy"])}break;case"annex":if(y>=3)break;let z=!e.tech.gov_fed&&!_r();e.civic.foreign[`gov${y}`].anx=!0,I(t("civics_spy_annex_success",[ut(y)]),"success",!1,["spy"]),z&&ue();break;case"purchase":if(y>=3)break;let E=!e.tech.gov_fed&&!_r();e.civic.foreign[`gov${y}`].buy=!0,I(t("civics_spy_purchase_success",[ut(y)]),"success",!1,["spy"]),E&&ue();break}if(e.race.banana){let y=!1,z=0;if(Object.keys(e.resource).forEach(function(E){e.resource[E].hasOwnProperty("trade")&&e.resource[E].trade<0&&(y?e.resource[E].trade=0:y=E),e.resource[E].hasOwnProperty("trade")&&e.resource[E].trade>0&&(z+=e.resource[E].trade)}),e.resource[y]&&e.resource[y].trade<=-500){let E=it();e.stats.banana.b4[E]=!0,E!=="m"&&E!=="l"&&(e.stats.banana.b4.l=!0),z>=500&&De("banana")}}if(e.galaxy.defense){let y=["dreadnought","cruiser_ship","frigate_ship","corvette_ship","scout_ship"];for(let z=0;zwe[y[z]]){let Oe=E-we[y[z]];e.galaxy.defense[te][y[z]]-=Oe}e.galaxy.defense[te][y[z]]<0&&(e.galaxy.defense[te][y[z]]=0)}}),E=2&&se.push("slave_market"),se.forEach(function(y){if(O.city[y]&&O.city[y].cost){let z=O.city[y],E=$("#"+z.id);if(Tt(z)?E.hasClass("cna")&&E.removeClass("cna"):E.hasClass("cna")||E.addClass("cna"),Tt(z,!0)?E.hasClass("cnam")&&E.removeClass("cnam"):E.hasClass("cnam")||E.addClass("cnam"),e.city[y]){let te=fa(z,!1,!0);e.city[y].time=At(te.t),e.city[y].bn=te.r}}}),Object.keys(O.tech).forEach(function(y){if(O.tech[y]&&O.tech[y].cost){let z=O.tech[y],E=$("#"+z.id);E.length>0&&(Tt(z)?E.hasClass("cna")&&E.removeClass("cna"):E.hasClass("cna")||E.addClass("cna"),Tt(z,!0)?E.hasClass("cnam")&&E.removeClass("cnam"):E.hasClass("cnam")||E.addClass("cnam"))}});let de=["space","interstellar","galaxy","portal","tauceti"];for(let y=0;y0&&e.city.ptrait.includes("toxic")&&(y+=Re.toxic.vars()[0]),e.arpa.sequence.labs=y,e.arpa.sequence.time-=e.arpa.sequence.boost?y*2:y,e.arpa.sequence.progress=e.arpa.sequence.max-e.arpa.sequence.time,e.arpa.sequence.time<=0){if(e.arpa.sequence.max=5e4*(1+e.race.mutation**2),e.race.adaptable){let z=1-b.adaptable.vars()[0]/100;e.arpa.sequence.max=Math.floor(e.arpa.sequence.max*z)}if(e.arpa.sequence.progress=0,e.arpa.sequence.time=e.arpa.sequence.max,e.tech.genetics===2)I(t("genome",[tt("name")]),"success",!1,["progress"]),e.tech.genetics=3;else{e.race.mutation++;let z=Ai(1),E=1+(e.genes.synthesis?e.genes.synthesis:0),te=2**(e.race.mutation-1)*E;e.stats.achieve.creator&&(te=Math.round(te*(1+e.stats.achieve.creator.l*.5))),e.resource.Genes.amount+=te,e.resource.Genes.display=!0;let Oe=e.genes.plasma?e.race.mutation:1;e.genes.plasma&&Oe>3&&(e.genes.plasma>=2?Oe=Oe>5?5:Oe:Oe=3);let Kt=Oe>1?"_plural":"";e.race.universe==="antimatter"?(Kt=t("resource_AntiPlasmid"+Kt+"_name"),e.stats.antiplasmid+=Oe,e.prestige.AntiPlasmid.count+=Oe,ie("cross")):(Kt=t("resource_Plasmid"+Kt+"_name"),e.stats.plasmid+=Oe,e.prestige.Plasmid.count+=Oe),Ue("Crispr"),I(t("gene_therapy",[t("trait_"+z+"_name"),te,Oe,Kt]),"success",!1,["progress"])}Ue("Genetics"),ue()}}if(e.city.foundry){let y=e.civic.craftsman.workers;(e.race.kindling_kindred||e.race.smoldering)&&e.city.foundry.Plywood>0&&(e.civic.craftsman.workers-=e.city.foundry.Plywood,e.city.foundry.crafting-=e.city.foundry.Plywood,e.city.foundry.Plywood=0);let z=wa();Object.keys(z).forEach(function(E){for(;e.city.foundry[E]>y&&e.city.foundry[E]>0;)e.city.foundry[E]--,e.city.foundry.crafting--;y-=e.city.foundry[E]})}e.tech.foundry===3&&(e.race.kindling_kindred||e.race.smoldering)&&(e.tech.foundry=4,ue()),(e.race.kindling_kindred||e.race.smoldering)&&(e.civic.lumberjack.workers=0,e.civic.lumberjack.assigned=0,e.resource.Lumber.crates=0,e.resource.Lumber.containers=0,e.resource.Lumber.trade=0),(e.race.kindling_kindred||e.race.smoldering)&&e.city.foundry&&e.city.foundry.Plywood&&(e.city.foundry.Plywood=0),Ve("fool",2023)&&!e.race.hooved?e.resource.Horseshoe.display=!0:e.race.hooved||(e.resource.Horseshoe.display=!1),Il(!1);let he=U.iron_ship+U.iridium_ship;if(he>0&&e.tech.asteroid&&e.tech.asteroid===3&&Math.rand(0,250)<=he&&(e.tech.asteroid=4,e.resource.Elerium.display=!0,L("Elerium",1),ue(),I(t("discover_elerium"),"info",!1,["progress"])),e.tech.asteroid&&e.tech.asteroid===4&&e.resource.Elerium.amount===0&&L("Elerium",1),k.outpost>0&&e.tech.gas_moon&&e.tech.gas_moon===1&&Math.rand(0,100)<=k.outpost&&(e.space.oil_extractor={count:0,on:0},e.tech.gas_moon=2,I(t("discover_oil",[W().gas_moon]),"info",!1,["progress"]),Pt()),e.portal.hasOwnProperty("mechbay")&&e.tech.hell_spire&&e.tech.hell_spire>=9){e.portal.spire.boss||nn(),sn();let y=0;for(let z=0;z=2&&e.portal.waygate.progress<100?y+=pc(E,!0):y+=pc(E,!1)}if(e.portal.hasOwnProperty("waygate")&&e.tech.hasOwnProperty("waygate")&&e.portal.waygate.on===1&&e.tech.waygate>=2&&e.portal.waygate.progress<100?(e.portal.waygate.progress+=y,e.portal.waygate.time=y===0?At(-1):At((100-e.portal.waygate.progress)/y),e.portal.spire.time=At(-1)):(e.portal.spire.progress+=y,e.portal.spire.time=y===0?At(-1):At((100-e.portal.spire.progress)/y),e.tech.waygate&&e.tech.waygate>=2&&(e.portal.waygate.time=At(-1))),e.portal.hasOwnProperty("waygate")&&e.portal.waygate.on===1&&e.portal.waygate.progress>=100&&(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,ue()),e.portal.spire.progress>=100){e.portal.spire.progress=0;let z=Number(Jt()),E=z;e.genes.blood&&e.genes.blood>=2&&(E*=2),e.prestige.Blood_Stone.count+=E,e.stats.blood+=E,Ue("Blood"),e.tech.hasOwnProperty("b_stone")||(e.tech.b_stone=1,ue()),I(`${t("portal_spire_conquest",[t(`portal_mech_boss_${e.portal.spire.boss}`),e.portal.spire.count])} ${t(E===1?"portal_spire_conquest_stone":"portal_spire_conquest_stones",[E])}`,"info",!1,["progress","hell"]),e.portal.spire.count++,e.portal.spire.count>10&&(e.tech.hell_spire=10,ue());let te=it();e.stats.spire.hasOwnProperty(te)||(e.stats.spire[te]={s0:0,s1:0,s2:0,s3:0,s4:0}),e.portal.spire.count>e.stats.spire[te][`s${z-1}`]&&(e.stats.spire[te][`s${z-1}`]=e.portal.spire.count),(!e.stats.spire[te].hasOwnProperty(e.portal.spire.boss)||z>e.stats.spire[te][e.portal.spire.boss])&&(e.stats.spire[te][e.portal.spire.boss]=z),e.race.fasting&&e.portal.spire.count>50&&(e.stats.endless_hunger.b5[te]=!0,te!=="m"&&te!=="l"&&(e.stats.endless_hunger.b5.l=!0)),nn(),ir()}}if(e.race.cannibalize&&e.city.s_alter&&(e.city.s_alter.rage>0&&e.city.s_alter.rage--,e.city.s_alter.regen>0&&e.city.s_alter.regen--,e.city.s_alter.mind>0&&e.city.s_alter.mind--,e.city.s_alter.mine>0&&e.city.s_alter.mine--,e.city.s_alter.harvest>0&&e.city.s_alter.harvest--,$('#popper[data-id="city-s_alter"]').length>0&&Ci(O.city.s_alter,"city","s_alter")),e.race.casting){let y=0;["farmer","miner","lumberjack","science","factory","army","hunting","crafting"].forEach(function(z){e.race.casting[z]&&(y+=e.race.casting[z])}),e.race.casting.total=y}if(e.tech.r_queue&&e.r_queue.display){let y=-1,z=!1,E=!1,te=0,Oe=0,Kt={t:{t:0,rt:0},r:{},rr:{},id:{}};for(let ke=0;ke=ct.grant[1]){e.r_queue.queue.splice(ke,1),Ie(`rq${z.id}`);break}else if(Tt(ct,!0)){e.r_queue.queue[ke].cna=!1;let ur=cr(Ae.type,!1),xr=e.settings.qAny_res?fa(ct):fa(ct,Kt,!1,ur);xr>=0?(!E&&Tt(ct)&&ur?(z=ct,y=ke,e.settings.qAny_res&&(E=!0)):(ur&&(te+=xr),Oe+=xr),!e.settings.qAny_res&&ur&&(E=!0),e.r_queue.queue[ke].time=ur?te:Oe):e.r_queue.queue[ke].time=xr,e.r_queue.queue[ke].req=!!ur}else e.r_queue.queue[ke].cna=!0,e.r_queue.queue[ke].time=-1;e.r_queue.queue[ke].qa=!!e.settings.qAny_res}y>=0&&z&&!e.r_queue.pause&&z.action()&&(I(t("research_success",[e.r_queue.queue[y].label]),"success",!1,["queue","research_queue"]),$c(e.r_queue.queue[y].type),z.post&&z.post(),e.r_queue.queue.splice(y,1),Ie(`rq${z.id}`),ki()),e.r_queue.queue.length>e.r_queue.max&&e.r_queue.queue.splice(e.r_queue.max);let Qe={},et=[];cr("club",Qe);for(let ke=0;ke0)for(let ke=et.length-1;ke>=0;ke--)e.r_queue.queue.splice(et[ke],1)}e.arpa.sequence&&e.arpa.sequence.auto&&e.tech.genetics&&e.tech.genetics>=8&&El(),k.soul_forge&&D({el:"#fort"},"update"),Tr()}if(e.tech.queue&&e.queue.display){let Te=-1,Le=!1,p=!1,g=["space","interstellar","galaxy","portal","tauceti"],q=0,C={t:{t:0,rt:0},r:{},rr:{},id:{}},P=!1;for(let Z=0;Z=0){q+=he,ae.time=q;for(let y=1;y=0&&(e.settings.qAny&&!e.queue.pause&&ae.time>1?Is(ae.type,100,!0):p||(Le=se,Te=Z,P=!0,p=!0))}else if(Tt(se,!0)){ae.cna=!1;let de=fa(se,C);if(ae.bres=!1,de>=0){!p&&Tt(se)?(Le=se,Te=Z,P=!1,e.settings.qAny&&(p=!0)):q+=de,e.settings.qAny||(p=!0),ae.time=q;let he=!1;for(let y=1;y=0&&Le&&!e.queue.pause){let Z=!1;if(P){let ae=e.queue.queue[Te].label;Is(e.queue.queue[Te].type,100,!0,!0)&&(I(t("build_success",[ae]),"success",!1,["queue","building_queue"]),e.queue.queue[Te].q>1?e.queue.queue[Te].q--:(Ie(`q${Le.id}${Te}`),e.queue.queue.splice(Te,1),na()))}else{let ae=e.queue.queue[Te].q,se=e.queue.queue[Te],de=Le.queue_complete?Le.queue_complete():1;for(let he=0;he1?e.queue.queue[Te].q--:(Ie(`q${Le.id}${Te}`),e.queue.queue.splice(Te,1),na()),e.race.inflation&&e.tech.primitive&&(!Le.hasOwnProperty("inflation")||Le.inflation)&&e.race.inflation++;Z&&xc(Le,se.action,se.type)}}let R=!1,G=0,X=[],ee=!1;for(let Z=0;Ze.queue.max){let ae=Math.ceil(e.queue.queue[Z].q/e.queue.queue[Z].qs)-(G-e.queue.max);ae===0?e.queue.queue.splice(Z):(e.queue.queue[Z].q=ae*e.queue.queue[Z].qs,e.queue.queue.splice(Z+1))}if(e.settings.q_merge==="merge_nearby"){if(R===e.queue.queue[Z].id){Ie(`q${e.queue.queue[Z].id}${Z}`),e.queue.queue[Z-1].q+=e.queue.queue[Z].q,e.queue.queue.splice(Z,1),na();break}R=e.queue.queue[Z].id}else if(e.settings.q_merge==="merge_all"){let ae=!1;for(let se=0;se=0&&g>e.resource[p].max,C=Te.attr("data-ok")?Te.attr("data-ok"):"has-text-dark";e.resource[p].amount+e.resource[p].diffP.clientHeight)Le++;else if(["auto","shrink"].includes(e.settings.q_resize)){let R=g;P.childNodes.forEach(function(G){R+=G.clientHeight||0}),P.clientHeight>R&&(Le=Math.min(Le,R))}}Teq&&(Le-=q-Te),Te=q),LeC&&(Te-=Te+Le-C,TeC&&(Le-=Te+Le-C,Le0&&$("#mechList").css("height",`calc(100vh - 11.5rem - ${$("#mechAssembly").height()}px)`),$("#shipList").length>0&&$("#shipList").css("height",`calc(100vh - 11.5rem - ${$("#shipPlans").height()}px)`)}var Y0={1:1.1,2:1.25,3:1.5},Bc=60;function X0(){let r=new Date,a=ma();if(e.race.species!=="protoplasm"){let n=Xr(),c=!1;if(Object.keys(n).forEach(function(o){n[o].l.forEach(function(d){let h=d.split(":"),_=ba(h[0]),m=h[0]==="city"?h[0]:_,w=h[0]==="city"?O.city[h[1]]:O[_][h[0]][h[1]],M=$(`#pg${w.id}${o}`);n[o].s&&(M.length===0||Cc(w,m,h[0],h[1])&&M.hasClass("inactive"))&&(c=!0)})}),c&&ca(),e.tech.syphon&&e.tech.syphon>=80){Pe.w&&Pe.w.terminate();let o=$('
');$("body").append(o),setTimeout(function(){o.addClass("burn")},125),setTimeout(function(){o.addClass("b")},150),setTimeout(function(){o.addClass("c")},2e3),setTimeout(function(){ro()},4e3)}if(e.portal.fortress&&Uo(),e.civic.govern.rev>0&&e.civic.govern.rev--,e.civic.govern.fr>0&&e.civic.govern.fr--,e.civic.govern.rev<0&&(e.civic.govern.rev=0),e.city.ptrait.includes("trashed")||e.race.scavenger?e.civic.scavenger.display=!0:(e.civic.scavenger.display=!1,e.civic.scavenger.workers=0),e.civic.homeless>0){let o=e.arpa.railway?e.arpa.railway.rank:0,d=Math.floor(o/(o+25)*10);Math.rand(0,10)<=d&&e.civic.homeless--}if(e.tech.currency&&e.tech.currency>=2){let o=ge("risktaker",0)?2:4;Object.keys(ta).forEach(function(d){let h=e.race.truepath?ta[d]*2:ta[d];if(d==="Copper"&&e.tech.high_tech&&e.tech.high_tech>=2&&(h*=2),d==="Titanium"&&(e.tech.titanium&&e.tech.titanium>0?h*=e.resource.Alloy.display?1:2.5:h*=5),e.resource[d].display&&Math.rand(0,o)===0){let _=h*3,m=h/2,w=(Math.rand(0,200)-100)/100,M=e.resource[d].value+w;M_&&(M=_-h),e.resource[d].value=M}})}if(e.race.blood_thirst&&(e.race.hasOwnProperty("blood_thirst_count")||(e.race.blood_thirst_count=1),e.race.blood_thirst_count>1&&e.race.blood_thirst_count--),e.race.truepath&&e.civic.foreign.gov3.mil<500&&Math.rand(0,50)===0&&e.civic.foreign.gov3.mil++,e.civic.garrison.wounded>0){let o=e.race.regenerative?b.regenerative.vars()[0]:1,d=e.city.hospital?e.city.hospital.count:0;if(e.race.orbit_decayed&&e.race.truepath?d=Math.min(U.operating_base,k.operating_base):e.race.artifical&&e.city.boot_camp&&(d=e.city.boot_camp.count),e.race.rejuvenated&&e.stats.achieve.lamentis){let M=e.stats.achieve.lamentis.l;M>5&&(M=5),d+=M}a==="cancer"&&(d+=Zt("cancer")[0]),e.tech.medic&&e.tech.medic>=2&&(d*=e.tech.medic),e.race.fibroblast&&(d+=b.fibroblast.vars()[0]*e.race.fibroblast),e.race.cannibalize&&e.city.s_alter&&e.city.s_alter.regen>0&&(d>=20?d*=1+b.cannibalize.vars()[0]/100:d+=Math.floor(b.cannibalize.vars()[0]/5));let h=ve("mantis");h>0&&(d>=20?d*=1+b.cannibalize.vars(1)[0]/100*h:d+=Math.floor(b.cannibalize.vars(1)[0]/5*h)),e.race.high_pop&&(d*=b.high_pop.vars()[2]);let _=ge("nopain",0);_&&(d*=1+_/100),e.city.banquet&&e.city.banquet.on&&e.city.banquet.count>=2&&(d*=1+e.city.banquet.strength**.65/100);let m=ve("troll");m>0&&(d+=Math.round(20*b.regenerative.vars(1)[0]*m));let w=20;if(e.race.slow_regen&&(w*=1+b.slow_regen.vars()[0]/100),d=Math.round(d),d>0){for(;d>=w;)o++,d-=w;Math.rand(0,d)>Math.rand(0,w)&&o++}e.civic.garrison.wounded-=o,e.civic.garrison.wounded<0&&(e.civic.garrison.wounded=0)}if(e.civic.garrison.fatigue&&e.civic.garrison.fatigue>0&&e.civic.garrison.fatigue--,e.civic.garrison.protest&&e.civic.garrison.protest>0&&e.civic.garrison.protest--,e.civic.garrison.m_use&&e.civic.garrison.m_use>0){let o=e.tech.mercs&&e.tech.mercs>=2?3:4,d=e.race.high_pop?b.high_pop.vars()[0]:1,h=0;for(let _=0;_1&&e.race.rainbow_active--,e.city.calendar.day>0){if(e.city.calendar.day++,e.stats.days++,e.city.calendar.day>e.city.calendar.orbit&&(e.city.calendar.day=1,e.city.calendar.year++),e.race.cataclysm||e.race.orbit_decayed)e.city.calendar.season=-1;else{let o=e.city.ptrait.includes("elliptical")?6:4,d=Math.round(e.city.calendar.orbit/o),h=e.city.calendar.day,_=0;for(;h>d;)h-=d,_++;if(e.city.ptrait.includes("elliptical"))switch(_){case 0:e.city.calendar.season=0;break;case 1:case 2:e.city.calendar.season=1;break;case 3:e.city.calendar.season=2;break;default:e.city.calendar.season=3;break}else e.city.calendar.season=_}if(e.race.cataclysm||e.race.orbit_decayed)e.city.calendar.wind=0,e.city.calendar.temp=1,e.city.calendar.weather=-1;else if(Math.rand(0,5)===0){let o=Math.rand(0,3),d=Math.rand(0,5),h=Math.rand(0,3);switch(e.city.biome){case"oceanic":case"swamp":Math.rand(0,2)===0&&d>0&&d--;break;case"tundra":case"taiga":e.city.calendar.season===3?o=0:Math.rand(0,2)===0&&o>0&&o--;break;case"desert":Math.rand(0,2)===0&&d<4&&d++;break;case"ashland":Math.rand(0,2)===0&&(d<1?d++:d>2&&d--);case"volcanic":e.city.calendar.season===1?o=2:Math.rand(0,2)===0&&o<2&&!e.city.ptrait.includes("permafrost")&&o++;break;default:break}switch(e.city.calendar.season){case 0:Math.rand(0,3)===0&&d>0&&d--;break;case 1:Math.rand(0,3)===0&&o<2&&o++;break;case 2:Math.rand(0,3)===0&&h>0&&h--;break;case 3:Math.rand(0,3)===0&&o>0&&o--;break;default:break}if(e.city.ptrait.includes("stormy")&&h>0&&(e.race.rejuvenated||Math.rand(0,2)===0)&&h--,d===0?(e.race.rainbow&&(e.race.rainbow_active=1),e.city.calendar.weather=0):d>=1&&d<=2?(e.race.rainbow&&(e.race.rainbow_active=1),e.city.calendar.weather=1):(e.race.rainbow&&e.city.calendar.weather===0&&(e.race.rainbow_active=Math.rand(10,20)),e.city.calendar.weather=2,e.race.darkness&&Math.rand(0,7-b.darkness.vars()[0])===0&&(e.city.calendar.weather=1)),o===0){let _=e.city.calendar.temp-1;_<0&&(_=0),e.city.calendar.season===1&&_===0&&(_=1),_===0&&e.city.biome==="hellscape"&&!e.city.ptrait.includes("permafrost")&&(_=1),_===0&&e.city.biome==="eden"&&e.city.calendar.season!==3&&(_=1),e.city.calendar.temp=_}else if(o===2){let _=e.city.calendar.temp+1;_>2&&(_=2),e.city.calendar.season===3&&_===2&&(_=1),_===2&&e.city.biome==="eden"&&e.city.calendar.season!==1&&(_=1),e.city.calendar.temp=_}e.city.calendar.wind=h===0?1:0}e.city.calendar.weather===2?e.city.sun++:e.city.sun=0,e.city.calendar.temp===0?e.city.cold++:e.city.cold=0,e.city.calendar.temp===2?e.city.hot++:e.city.hot=0,e.race.orbit_decayed||(e.city.ptrait.includes("retrograde")?(e.city.calendar.moon--,e.city.calendar.moon<0&&(e.city.calendar.moon=27)):(e.city.calendar.moon++,e.city.calendar.moon>27&&(e.city.calendar.moon=0))),Sn()}if(!e.race.cataclysm&&!e.race.orbit_decayed&&!e.race.lone_survivor&&!e.race.vax){let o=Math.floor(5e7/(1+e.race.mutation))-e.stats.days;if(e.race.deterioration===0&&o<4e7){e.race.deterioration=1;let d=Math.round(o/e.city.calendar.orbit);I(t("deterioration1",[tt("name"),d]),"danger",!1,["progress"])}else if(e.race.deterioration===1&&o<2e7){e.race.deterioration=2;let d=Math.round(o/e.city.calendar.orbit);I(t("deterioration2",[tt("name"),d]),"danger",!1,["progress"])}else if(e.race.deterioration===2&&o<5e6){e.race.deterioration=3;let d=Math.round(o/e.city.calendar.orbit);I(t("deterioration3",[tt("name"),d]),"danger",!1,["progress"])}else if(e.race.deterioration===3&&o<1e6){e.race.deterioration=4;let d=Math.round(o/e.city.calendar.orbit);I(t("deterioration4",[tt("name"),d]),"danger",!1,["progress"])}else e.race.deterioration===4&&o<=0&&(e.race.deterioration=5,e.race.decayed=e.stats.days,e.tech.decay=1,I(t("deterioration5",[tt("name")]),"danger",!1,["progress"]),ue())}if(e.tech.decay&&e.tech.decay>=2){let o=0;e.genes.minor.fortify&&(o+=e.genes.minor.fortify),e.race.minor.fortify&&(o+=e.race.minor.fortify),e.tech.decay>=3&&(o*=100),e.race.gene_fortify=o}else e.race.gene_fortify=0;if(!e.tech.genesis&&e.race.deterioration>=1&&e.tech.high_tech&&e.tech.high_tech>=10&&(e.tech.genesis=1,I(t("genesis"),"special",!1,["progress"]),ue()),e.settings.cLabels&&$("#city-dist-outskirts").length===0&&Et(),!e.settings.cLabels&&$("#city-dist-outskirts").length>0&&Et(),e.tech.xeno&&e.tech.xeno>=5&&!e.tech.piracy&&Math.rand(0,5)===0&&(e.tech.piracy=1,I(t("galaxy_piracy_msg",[F[e.galaxy.alien2.id].name]),"info",!1,["progress"]),Pt()),e.race.cheese&&(e.race.cheese--,e.race.cheese<=0&&delete e.race.cheese),e.tech.piracy&&(e.tech.piracy<1e3?e.tech.piracy++:e.tech.xeno>=8&&e.tech.piracy<2500?e.tech.piracy++:e.tech.conflict&&e.tech.piracy<5e3&&e.tech.piracy++),e.portal.archaeology&&e.tech.hasOwnProperty("hell_ruins")&&e.tech.hell_ruins>=2&&!e.tech.hell_vault){let o=Nr("ruins"),d=25e4;e.race.high_pop&&(d=xe(d)),d=Math.round(d*o.supress)*ye(e.civic.archaeologist.workers,"archaeologist")/1e3,Math.rand(0,1e4)+1<=d&&(e.tech.hell_vault=1,I(t("portal_ruins_vault"),"info",!1,["progress"]),ir())}if(e.tech.syndicate&&e.race.truepath){let o=Hi();if(Object.keys(o).forEach(function(d){if(o[d].info.hasOwnProperty("syndicate")&&o[d].info.syndicate()){let h=o[d].info.hasOwnProperty("syndicate_cap")?o[d].info.syndicate_cap():500;e.space.syndicate.hasOwnProperty(d)||(e.space.syndicate[d]=0);let _=d==="spc_triton"?5:10;e.space.syndicate[d]h&&(e.space.syndicate[d]=h)}}),e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){let d=0,h=0,_=!1;e.space.shipyard.ships.forEach(function(m){if(m.transit>0&&m.fueled){m.transit--;let w=1-m.transit/m.dist,M=Math.abs(m.origin.x-m.destination.x)*w,A=Math.abs(m.origin.y-m.destination.y)*w;m.origin.x<=m.destination.x?m.xy.x=m.origin.x+M:m.xy.x=m.origin.x-M,m.origin.y<=m.destination.y?m.xy.y=m.origin.y+A:m.xy.y=m.origin.y-A}if(m.transit===0&&(m.xy=ii(m.location),m.origin=Ke(m.xy),m.dist=0),m.damage>0&&k.shipyard&&m.damage--,m.location!=="spc_dwarf"&&Math.rand(0,10)===0){let w=m.location==="spc_triton"?2:1;switch(m.armor){case"steel":m.damage+=Math.rand(1,8*w);break;case"alloy":m.damage+=Math.rand(1,6*w);break;case"neutronium":m.damage+=Math.rand(1,4*w);break}m.damage>90&&(m.damage=90)}e.tech.hasOwnProperty("eris_scan")&&m.location==="spc_eris"&&m.transit===0&&(d+=Ri(m)),e.tech.hasOwnProperty("tauceti")&&m.location==="tauceti"&&m.transit===0&&(h+=Ri(m),_=m.name)}),e.tech.hasOwnProperty("eris_scan")&&e.tech.hasOwnProperty("eris")&&e.tech.eris===1&&d>50&&(e.tech.eris_scan+=d-50,e.tech.eris_scan>=100&&(e.tech.eris_scan=100,e.tech.eris=2,I(t("space_eris_scan",[W().eris]),"info",!1,["progress"]),Pt())),e.tech.hasOwnProperty("tauceti")&&e.tech.tauceti>=1&&h>=1&&e.tech.tauceti===1&&(e.tauceti.orbital_station={count:0,on:0,support:0,s_max:0},e.tauceti.orbital_platform={count:0,on:0,support:0,s_max:0},e.tech.tauceti=2,e.settings.showTau=!0,e.settings.tau.home=!0,e.settings.tau.red=!0,e.settings.tau.gas=!1,e.settings.tau.roid=!1,I(t("tau_scan",[_]),"info",!1,["progress"]),Ar()),e.space.hasOwnProperty("position")&&Object.keys(It).forEach(function(m){if(e.space.position.hasOwnProperty(m)){let w=It[m].orbit===-1?e.city.calendar.orbit:It[m].orbit;if(w===-2)return;w===0?e.space.position[m]=0:(e.space.position[m]+=+(360/w).toFixed(4),e.space.position[m]>=360&&(e.space.position[m]-=360))}}),$("#mapCanvas").length>0&&ai()}e.tech.triton&&e.tech.triton>=3&&Oo(),e.tech.eris&&e.tech.eris>=3&&So()}if((e.stats.matrix>0||e.stats.retire>0)&&!e.race.servants&&Math.rand(0,25)===0){let o=e.stats.matrix+e.stats.retire+e.stats.eden,d=e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=5?2:0;d+=Math.min(e.stats.matrix,e.stats.retire),e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5&&Dt.forEach(function(h){e.stats.achieve.overlord[h]>=5&&(d++,o+=2)}),e.race.servants={max:o,used:0,smax:d,sused:0,jobs:{},sjobs:{},force_scavenger:!1},I(o+d===1?t("civics_servants_msg1"):t("civics_servants_msg2",[o+d]),"caution",!1,["events","major_events"])}if(e.race.truepath&&e.tech.focus_cure&&e.tech.focus_cure>=2&&e.tauceti.infectious_disease_lab){if(e.tauceti.infectious_disease_lab.cure<100){let o=(U.infectious_disease_lab||0)/100;o>1&&(o=1);let d=+tt("curve",o).toFixed(5)/5;e.tauceti.infectious_disease_lab.cure+=d,e.tauceti.infectious_disease_lab.cure>100&&(e.tauceti.infectious_disease_lab.cure=100)}else if(e.tauceti.infectious_disease_lab.cure>=100&&e.tech.focus_cure===2)e.tech.focus_cure=3,F[e.race.species].type==="synthetic"?I(t("tech_decode_virus_msg2s"),"info",!1,["progress"]):I(t("tech_decode_virus_msg2"),"info",!1,["progress"]);else if(e.tech.focus_cure>=4&&e.race.hasOwnProperty("vax")){let o=e.race.artifical?e.city.boot_camp.count:e.city.hospital.count;if(e.race.orbit_decayed&&(o=Math.min(U.operating_base,k.operating_base)),e.tech.focus_cure===4&&e.race.vax<25)e.race.vax+=Math.rand(0,o*2)/150;else if(e.tech.focus_cure===4&&e.race.vax>=25)e.tech.focus_cure=5,I(t("tech_vaccine_campaign_msg1"),"info",!1,["progress"]);else if(e.tech.focus_cure===5&&e.race.vax<50)e.race.vax+=Math.rand(0,o*2)/450;else if(e.tech.focus_cure===5&&e.race.vax<75)e.race.vax+=Math.rand(0,o*2)/1200;else if(e.tech.focus_cure===6&&e.race.vax<100){let d=1e3;e.tech.vax_p?d=250:e.tech.vax_s?d=390:e.tech.vax_f?d=25:e.tech.vax_c&&(d=125),e.race.vax+=Math.rand(0,o*2)/d}else e.race.vax>=100&&e.tech.focus_cure<=6&&(e.race.vax=100,e.tech.focus_cure=7,I(t("tech_vaccine_campaign_msg2"),"info",!1,["progress"]),qr("assemble"))}}if(e.race.infiltrator){let o=e.tech.world_control?"trait_infiltrator_steal_alt":"trait_infiltrator_steal",d=b.infiltrator.vars()[0]/100;e.resource.Knowledge.max>=O.tech.steel.cost.Knowledge()*d&&!e.race.steelen&&e.tech.smelting&&e.tech.smelting===1&&(I(t(o,[t("tech_steel")]),"info",!1,["progress"]),e.resource.Steel.display=!0,e.tech.smelting=2,rt(),ue()),e.resource.Knowledge.max>=O.tech.electricity.cost.Knowledge()*d&&e.tech.high_tech&&e.tech.high_tech===1&&(I(t(o,[t("tech_electricity")]),"info",!1,["progress"]),e.tech.high_tech=2,e.city.power=0,e.city.powered=!0,e.city.coal_power={count:0,on:0},e.settings.showPowerGrid=!0,ca(),ue(),Et()),e.resource.Knowledge.max>=O.tech.electronics.cost.Knowledge()*d&&e.tech.high_tech&&e.tech.high_tech===3&&e.tech.titanium&&(I(t(o,[t("tech_electronics")]),"info",!1,["progress"]),e.tech.high_tech=4,e.race.terrifying&&(e.tech.gambling=1,e.city.casino={count:0},e.space.spc_casino={count:0}),ue(),Et()),e.resource.Knowledge.max>=O.tech.fission.cost.Knowledge()*d&&e.tech.high_tech&&e.tech.high_tech===4&&e.tech.uranium&&(I(t(o,[t("tech_fission")]),"info",!1,["progress"]),e.tech.high_tech=5,e.city.fission_power={count:0,on:0},ue(),Et()),e.resource.Knowledge.max>=O.tech.rocketry.cost.Knowledge()*d&&e.tech.high_tech&&e.tech.high_tech===6&&(I(t(o,[t("tech_rocketry")]),"info",!1,["progress"]),e.tech.high_tech=7,e.race.truepath&&!e.tech.rival&&(e.tech.rival=1,I(t("civics_rival_unlocked",[ut(3)]),"info",!1,["progress","combat"])),Ue("Physics"),ue(),Et()),e.resource.Knowledge.max>=O.tech.artifical_intelligence.cost.Knowledge()*d&&e.tech.high_tech&&e.tech.high_tech===9&&(I(t(o,[t("tech_artificial_intelligence")]),"info",!1,["progress"]),e.tech.high_tech=10,ue(),Et()),e.resource.Knowledge.max>=O.tech.quantum_computing.cost.Knowledge()*d&&e.tech.high_tech&&e.tech.high_tech===10&&e.tech.nano&&(I(t(o,[t("tech_quantum_computing")]),"info",!1,["progress"]),e.tech.high_tech=11,ue(),Et()),e.resource.Knowledge.max>=O.tech[e.race.truepath?"virtual_reality_tp":"virtual_reality"].cost.Knowledge()*d&&e.tech.high_tech&&e.tech.high_tech===11&&e.tech.stanene&&(e.tech.infernite&&e.tech.alpha&&e.tech.alpha>=2||e.race.truepath)&&(I(t(o,[t("tech_virtual_reality")]),"info",!1,["progress"]),e.tech.high_tech=12,ue(),Et()),e.race.truepath?(e.resource.Knowledge.max>=O.tech.quantium.cost.Knowledge()*d&&e.tech.supercollider&&e.tech.supercollider>=10&&e.tech.enceladus&&e.tech.enceladus>=3&&!e.tech.quantium&&(I(t(o,[t("tech_quantium")]),"info",!1,["progress"]),e.tech.quantium=1,e.resource.Quantium.display=!0,ue(),Lt()),e.resource.Knowledge.max>=O.tech.alien_biotech.cost.Knowledge()*d&&e.tech.genetics&&e.tech.genetics>=8&&e.tech.kuiper&&!e.tech.biotech&&(I(t(o,[t("tech_alien_biotech")]),"info",!1,["progress"]),e.tech.biotech=1,ue())):(e.resource.Knowledge.max>=O.tech.shields.cost.Knowledge()*d&&e.tech.high_tech&&e.tech.high_tech===13&&(I(t(o,[t("tech_shields")]),"info",!1,["progress"]),e.tech.high_tech=14,e.settings.space.neutron=!0,e.settings.space.blackhole=!0,ue(),Et()),e.resource.Knowledge.max>=O.tech.ai_core.cost.Knowledge()*d&&e.tech.high_tech&&e.tech.high_tech===14&&e.tech.blackhole&&e.tech.blackhole>=3&&(I(t(o,[t("tech_ai_core")]),"info",!1,["progress"]),e.tech.high_tech=15,e.interstellar.citadel={count:0,on:0},ue(),Et()),e.resource.Knowledge.max>=O.tech.graphene_processing.cost.Knowledge()*d&&e.tech.ai_core&&e.tech.ai_core===2&&(I(t(o,[t("tech_graphene_processing")]),"info",!1,["progress"]),e.tech.ai_core=3,ue()),e.resource.Knowledge.max>=O.tech.nanoweave.cost.Knowledge()*d&&e.tech.science&&e.tech.science>=18&&!e.tech.nanoweave&&(I(t(o,[t("tech_nanoweave")]),"info",!1,["progress"]),e.tech.nanoweave=1,e.resource.Nanoweave.display=!0,ue(),Lt()),e.resource.Knowledge.max>=O.tech.orichalcum_analysis.cost.Knowledge()*d&&e.tech.high_tech&&e.tech.high_tech===16&&e.tech.chthonian&&e.tech.chthonian>=3&&(I(t(o,[t("tech_orichalcum_analysis")]),"info",!1,["progress"]),I(t("tech_orichalcum_analysis_result"),"info",!1,["progress"]),e.tech.high_tech=17,ue(),Et()),e.resource.Knowledge.max>=O.tech.infernium_fuel.cost.Knowledge()*d&&e.tech.smelting&&e.tech.smelting===7&&e.tech.hell_ruins&&e.tech.hell_ruins>=4&&(I(t(o,[t("tech_infernium_fuel")]),"info",!1,["progress"]),e.tech.smelting=8,rt(),ue()))}let l=ve("moldling");if(l>0){let o="trait_infiltrator_thrall",d=1-(100-b.infiltrator.vars(1)[0])*l/100;l>=.02&&e.resource.Knowledge.max>=O.tech.smelting.cost.Knowledge()*d&&cr("smelting",!1)&&!e.tech.smelting&&(I(t(o,[t("tech_smelting")]),"info",!1,["progress"]),e.tech.smelting=1,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},e.race.steelen&&(e.tech.smelting=2),ue()),l>=.04&&e.resource.Knowledge.max>=O.tech.dynamite.cost.Knowledge()*d&&cr("dynamite",!1)&&e.tech.explosives&&e.tech.explosives===1&&(I(t(o,[t("tech_dynamite")]),"info",!1,["progress"]),e.tech.explosives=2,ue()),l>=.08&&e.resource.Knowledge.max>=O.tech.portland_cement.cost.Knowledge()*d&&cr("portland_cement",!1)&&e.tech.cement&&e.tech.cement===3&&(I(t(o,[t("tech_portland_cement")]),"info",!1,["progress"]),e.tech.cement=4,ue()),l>=.12&&e.resource.Knowledge.max>=O.tech.oxygen_converter.cost.Knowledge()*d&&cr("oxygen_converter",!1)&&e.tech.smelting&&e.tech.smelting===4&&(I(t(o,[t("tech_oxygen_converter")]),"info",!1,["progress"]),e.tech.smelting=5,ue()),l>=.15&&e.resource.Knowledge.max>=O.tech.machinery.cost.Knowledge()*d&&cr("machinery",!1)&&e.tech.foundry&&e.tech.foundry===6&&(I(t(o,[t("tech_machinery")]),"info",!1,["progress"]),e.tech.foundry=7,ue()),l>=.2&&e.resource.Knowledge.max>=O.tech.uranium_storage.cost.Knowledge()*d&&cr("uranium_storage",!1)&&e.tech.uranium&&e.tech.uranium===1&&(I(t(o,[t("tech_uranium_storage")]),"info",!1,["progress"]),e.tech.uranium=1,ue()),l>=.25&&e.resource.Knowledge.max>=O.tech.synthetic_fur.cost.Knowledge()*d&&cr("synthetic_fur",!1)&&!e.tech.synthetic_fur&&(I(t(o,[O.tech.synthetic_fur.title()]),"info",!1,["progress"]),e.tech.synthetic_fur=1,ue()),l>=.35&&e.resource.Knowledge.max>=O.tech.rover.cost.Knowledge()*d&&cr("rover",!1)&&e.tech.space_explore&&e.tech.space_explore===1&&(I(t(o,[t("tech_rover")]),"info",!1,["progress"]),e.tech.space_explore=2,e.settings.space.moon=!0,e.space.moon_base={count:0,on:0,support:0,s_max:0},ue());let h="trait_infiltrator_thrall_alt";l>=.4&&e.resource.Knowledge.max>=O.tech.starcharts.cost.Knowledge()*d&&cr("starcharts",!1)&&e.tech.space_explore&&e.tech.space_explore===3&&(I(t(h,[t("tech_starcharts")]),"info",!1,["progress"]),e.tech.space_explore=4,ue()),l>=.5&&e.resource.Knowledge.max>=O.tech.nano_tubes.cost.Knowledge()*d&&cr("nano_tubes",!1)&&!e.tech.nano&&(I(t(h,[t("tech_nano_tubes")]),"info",!1,["progress"]),e.tech.nano=1,e.resource.Nano_Tube.display=!0,ue()),e.race.truepath?(l>=.65&&e.resource.Knowledge.max>=O.tech.stanene_tp.cost.Knowledge()*d&&cr("stanene_tp",!1)&&!e.tech.stanene&&(I(t(h,[t("tech_stanene")]),"info",!1,["progress"]),e.tech.stanene=1,e.resource.Stanene.display=!0,ue()),l>=.8&&e.resource.Knowledge.max>=O.tech.anitgrav_bunk.cost.Knowledge()*d&&cr("anitgrav_bunk",!1)&&e.tech.marines&&e.tech.marines===1&&(I(t(h,[t("tech_anitgrav_bunk")]),"info",!1,["progress"]),e.tech.marines=2,ue())):(l>=.65&&e.resource.Knowledge.max>=O.tech.stanene.cost.Knowledge()*d&&cr("stanene",!1)&&!e.tech.stanene&&(I(t(h,[t("tech_stanene")]),"info",!1,["progress"]),e.tech.stanene=1,e.resource.Stanene.display=!0,ue()),l>=.78&&e.resource.Knowledge.max>=O.tech.hydroponics.cost.Knowledge()*d&&cr("hydroponics",!1)&&e.tech.mars&&e.tech.mars===5&&(I(t(h,[t("tech_hydroponics")]),"info",!1,["progress"]),e.tech.mars=6,ue()),l>=.92&&e.resource.Knowledge.max>=O.tech.orichalcum_panels.cost.Knowledge()*d&&cr("orichalcum_panels",!1)&&e.tech.swarm&&e.tech.swarm===5&&(I(t(h,[t("tech_orichalcum_panels")]),"info",!1,["progress"]),e.tech.swarm=6,ue()),l>=1&&e.resource.Knowledge.max>=O.tech.cybernetics.cost.Knowledge()*d&&cr("cybernetics",!1)&&e.tech.high_tech&&e.tech.high_tech===17&&(I(t(h,[t("tech_cybernetics")]),"info",!1,["progress"]),e.tech.high_tech=18,ue()))}e.race.truepath&&e.tech.tauceti&&e.tech.tauceti===3&&e.space.hasOwnProperty("jump_gate")&&e.tauceti.hasOwnProperty("jump_gate")&&e.space.jump_gate.count>=100&&e.tauceti.jump_gate.count>=100&&(e.tech.tauceti=4,e.resource.Materials.display=!1,e.resource.Bolognium.display=!0,Pt(),Ar(),ue()),e.race.truepath&&e.tech.tauceti&&!e.race.lone_survivor?e.tech.tauceti===5&&!e.tech.plague&&Math.rand(0,50)===0?(e.tech.plague=1,I(t("tau_plague",[ut(3)]),"info",!1,["progress"])):e.tech.plague&&e.tech.tau_roid&&e.tech.tau_whale&&(e.tech.plague===1&&(e.tech.tau_roid>=4||e.tech.tau_whale>=2)&&Math.rand(0,50)===0?(e.tech.plague=2,e.race.quarantine=1,e.race.qDays=0,I(t("tau_plague2",[ut(3)]),"info",!1,["progress"])):e.tech.plague===2&&e.tech.tau_roid>=5&&e.tech.tau_whale>=2&&Math.rand(0,50)===0?(e.tech.plague=3,e.race.quarantine=2,e.race.qDays=0,I(t("tau_plague3",[ut(3),F[e.race.species].home]),"info",!1,["progress"])):e.tech.isolation?e.tech.plague<5&&Math.rand(0,50)===0&&(e.tech.plague=5,I(t("tau_plague5b",[F[e.race.species].home]),"info",!1,["progress"]),ue()):e.tech.plague===3&&e.tech.disease&&e.tech.disease>=2&&Math.rand(0,50)===0?(e.tech.plague=4,e.race.quarantine=3,e.race.qDays=0,I(t("tau_plague5a",[F[e.race.species].home]),"info",!1,["progress"])):e.tech.plague===4&&e.tech.disease&&e.tech.disease>=3&&Math.rand(0,50)===0&&(e.tech.plague=5,e.race.quarantine=4,e.race.qDays=0,I(t("tau_plague5a",[F[e.race.species].home]),"info",!1,["progress"])),e.race.quarantine&&(e.race.hasOwnProperty("qDays")||(e.race.qDays=0),e.race.qDays++)):e.tech.tau_gas&&e.tech.tau_gas>=4&&!e.tech.plague&&e.race.lone_survivor&&(e.tech.plague=5),e.civic.govern.protest&&e.civic.govern.protest>0&&e.civic.govern.protest--,e.civic.govern.scandal&&e.civic.govern.scandal>0&&e.civic.govern.scandal--;{let o=vr("tax_cap"),d=vr("tax_cap",!0);e.civic.taxes.tax_rate>o?e.civic.taxes.tax_rate=o:e.civic.taxes.tax_rate0){let o=0;for(let d=0;d3&&(e.genes.plasma>=2?_=_>5?5:_:_=3),o+=_}e.race.p_mutation=o}!e.tech.whitehole&&e.interstellar.stellar_engine&&e.interstellar.stellar_engine.exotic>=.025?(e.tech.whitehole=1,e.tech.stablized&&delete e.tech.stablized,I(t("interstellar_blackhole_unstable"),"danger",!1,["progress"]),ue()):e.interstellar.stellar_engine&&e.interstellar.stellar_engine.exotic>=.025&&e.tech.whitehole&&e.tech.stablized&&(delete e.tech.stablized,ue()),!e.tech.xeno&&e.galaxy.scout_ship&&e.galaxy.scout_ship.on>0&&Math.rand(0,10)===0&&(e.tech.xeno=1,e.galaxy.scout_ship.count--,e.galaxy.scout_ship.on--,e.galaxy.scout_ship.crew--,e.galaxy.scout_ship.mil--,e.resource[e.race.species].amount--,e.civic.garrison.workers--,e.civic.garrison.crew--,I(t("galaxy_encounter"),"info",!1,["progress"]),ue()),e.galaxy.scavenger&&e.tech.conflict&&e.tech.conflict===4&&we.scavenger>0&&Math.rand(0,50)<=we.scavenger&&(e.tech.conflict=5,I(t("galaxy_scavenger_find"),"info",!1,["progress"]),ue()),!e.tech.syndicate&&!e.race.lone_survivor&&e.tech.outer&&Math.rand(0,20)===0&&(I(t("outer_syndicate",[ut(4)]),"info",!1,["progress"]),e.tech.syndicate=1,e.space.syndicate={}),!e.tech.corrupted_ai&&k.ai_core2&&Vn()===100&&(e.tech.corrupted_ai=1,ue()),e.arpa.sequence&&e.arpa.sequence.auto&&e.tech.genetics&&e.tech.genetics===7&&El(),e.race.orbit_decay&&(e.race.orbit_decayed||$("#infoTimer").html(`T-${e.race.orbit_decay-e.stats.days}`),gl()),Zc()}if(!e.race.seeded||e.race.seeded&&e.race.chose){if(Math.rand(0,e.event.t)===0){let n=Kc("major");if(n.length>0){let c=n[Math.floor(J(0,n.length))],l=er[c].effect();I(l,"caution",!1,["events","major_events"]),e.event.l=c}e.event.t=999,a==="pisces"&&(e.event.t-=Zt("pisces")[0])}else e.event.t--;if(e.race.species!=="protoplasm")if(Math.rand(0,e.m_event.t)===0){let n=Kc("minor");if(n.length>0){let c=n[Math.floor(J(0,n.length))],l=er[c].effect();I(l,!1,!1,["events","minor_events"]),e.m_event.l=c}e.m_event.t=850,a==="pisces"&&(e.m_event.t-=Zt("pisces")[1])}else e.m_event.t--;if(e.race.witch_hunter&&e.resource.Sus.amount>=100){let n=300-e.resource.Sus.amount;if(n<1&&(n=1),Math.rand(0,n)===0){let c=er.witch_hunt_crusade.effect();I(c,"caution",!1,["events","major_events"])}}if(e.race.witch_hunter&&e.resource.Sus.amount>=50&&e.civic.scientist.workers>0){let n=250-e.resource.Sus.amount*2;if(n<50&&(n=50),Math.rand(0,n)===0){let c=er.witch_hunt.effect();I(c,!1,!1,["events","minor_events"])}}e.stats.achieve.endless_hunger&&e.city.banquet&&e.city.banquet.on&&e.city.banquet.strength++}r.getMonth()===11&&r.getDate()>=17&&r.getDate()<=24?(e.special.gift[`g${r.getFullYear()}`]=!0,e.tech.santa=1):delete e.tech.santa,Ve("fool")?$("body").hasClass("fool")||($("body").addClass("fool"),_i({fool:!0})):$("body").hasClass("fool")&&($("body").removeClass("fool"),_i());let i=r.valueOf(),s=!1;!e.settings.pause&&Ac(i)&&(bn(i),s=!0),e.stats.current=i,e.race.hasOwnProperty("geck")||Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),e.race.species!=="protoplasm"&&(e.stats.days+e.stats.tdays)%1e5===99999&&I(t("backup_warning"),"advanced",!0),Bc--,Bc<=0&&(Bc=60,wt("page_view",{page_title:"Game Loop"})),e.settings.pause&&Pe.s&&Pr("stop"),Xa.t>0&&(Xa.t--,e.settings.at--,(e.settings.at<=0||Xa.t<=0)&&(e.settings.at=0,s=!0)),s&&(Pr("stop"),Pr("start"))}function El(){let r=e.resource.Knowledge.diff<1e4?e.resource.Knowledge.diff:1e4;if(e.resource.Knowledge.amount>=2e5&&e.resource.Knowledge.amount>=e.resource.Knowledge.max-r){e.resource.Knowledge.amount-=2e5;let a=e.genes.synthesis?Y0[e.genes.synthesis]:1;e.resource.Genes.amount+=a}}function Il(r){if(e.tech.high_tech&&e.tech.high_tech>=11){let a=e.resource.Knowledge.max,i=25e4,s=0;for(;a>i;)a-=i,i*=1.1,s++;if(s+=+(a/i).toFixed(2),e.interstellar.citadel){let n=r?e.interstellar.citadel.on:k.citadel;e.tech.high_tech&&e.tech.high_tech>=15&&n>0&&(s*=1+n*.05)}if(e.space.ai_core2){let n=r?e.space.ai_core2.on:k.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}Uc(+s.toFixed(3))}}function ed(r,a){let i=1e3;if(e.race.slow){let n=1+b.slow.vars()[0]/100;i=Math.floor(i*n)}if(e.race.hyper){let n=1-b.hyper.vars()[0]/100;i=Math.floor(i*n)}e.resource[r].diff=+(e.resource[r].delta/(a/i)).toFixed(2),e.resource[r].delta=0,e.resource[r].hasOwnProperty("gen")&&e.resource[r].hasOwnProperty("gen_d")&&(e.resource[r].gen=+(e.resource[r].gen_d/(a/i)).toFixed(2),e.resource[r].gen_d=0);let s=$(`#res${r} .diff`);e.race.decay?e.resource[r].diff<0?e.resource[r].diff>=v.p.consume[r][t("evo_challenge_decay")]?s.hasClass("has-text-warning")||(s.removeClass("has-text-danger"),s.addClass("has-text-warning")):s.hasClass("has-text-danger")||(s.removeClass("has-text-warning"),s.addClass("has-text-danger")):e.resource[r].diff>=0&&(s.hasClass("has-text-danger")||s.hasClass("has-text-warning"))&&(s.removeClass("has-text-danger"),s.removeClass("has-text-warning")):e.resource[r].diff<0&&!s.hasClass("has-text-danger")?s.addClass("has-text-danger"):e.resource[r].diff>=0&&s.hasClass("has-text-danger")&&s.removeClass("has-text-danger")}function Tl(){e.resource.Steel.display===!1&&Math.rand(0,1250)===0&&(e.resource.Steel.display=!0,L("Steel",1),I(t("steel_sample"),"info",!1,["progress"]))}function Ll(){["#resources > .resource",".tab-item > .market-item","#galaxyTrade > .market-item"].forEach(function(r){let a=!1;$(`${r}:visible`).each(function(){a?($(this).addClass("alt"),a=!1):($(this).removeClass("alt"),a=!0)})})}function Gc(r){let a=!!(e.race.elusive||Math.floor(J(0,3))===0),i=ve("satyr");if(i>0&&Math.floor(J(0,100))<=i*100&&(a=!0),!a&&e.civic.foreign[`gov${r}`].spy>0&&(e.civic.foreign[`gov${r}`].spy-=1),!a&&Math.floor(J(0,4))===0){I(t("event_spy_sellout",[ut(r)]),"danger",!1,["spy"]);let s=e.race.mistrustful?5+b.mistrustful.vars()[0]:5;e.civic.foreign[`gov${r}`].hstl+=Math.floor(J(1,s)),e.civic.foreign[`gov${r}`].hstl>100&&(e.civic.foreign[`gov${r}`].hstl=100)}else I(t(a?"event_spy_fail":"event_spy",[ut(r)]),"danger",!1,["spy"])}Ka.version_check=setInterval(function(){$.ajax({url:"https://pmotschmann.github.io/Evolve/package.json",type:"GET",dataType:"json",success:function(r){r.version&&r.version!=e.version&&!e.beta&&$("#topBar .version > a").html(`