From 3a7d9a71c8d3b37a6adde477ca14f9588cc5a6d3 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Sun, 26 Nov 2023 22:29:04 +1300 Subject: [PATCH] Show more accurate time remaining in build queue --- evolve/main.js | 2 +- src/main.js | 66 ++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 54 insertions(+), 14 deletions(-) diff --git a/evolve/main.js b/evolve/main.js index 968e072f23..a7463a7115 100644 --- a/evolve/main.js +++ b/evolve/main.js @@ -1 +1 @@ -(()=>{"use strict";var e=window.localStorage,t={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}},a={},r={c:{},p:{}},s={},i={},c={},o={},n={},l={},u=0,d={t:0};var _={},p={},h={view:"all"};const m=["all","progress","queue","building_queue","research_queue","combat","spy","events","major_events","minor_events","achievements","hell"];function g(e,a,r){return a=a||1,e=e||0,t[r?"warseed":"seed"]=(9301*t[r?"warseed":"seed"]+49297)%233280,e+t[r?"warseed":"seed"]/233280*(a-e)}Math.rand=function(e,t){return Math.floor(Math.random()*(t-e))+e},t.seed=2,t.warseed=2;{let a=e.getItem("evolved")||!1;if(a){let e=JSON.parse(LZString.decompressFromUTF16(a));e?t=e:v()}else v()}if(t.version||(t.version="0.2.0"),w(t.version)<2060&&Object.keys(t.resource).forEach((function(e){t.resource[e].crates&&(t.resource[e].crates=Math.ceil(t.resource[e].crates/5)),t.resource[e].containers&&(t.resource[e].containers=Math.ceil(t.resource[e].containers/5))})),w(t.version)<2062&&void 0!==t.civic.taxes)switch(Number(t.civic.taxes.tax_rate)){case 0:t.civic.taxes.tax_rate=0;break;case 1:t.civic.taxes.tax_rate=10;break;case 2:t.civic.taxes.tax_rate=20;break;case 3:t.civic.taxes.tax_rate=30;break;case 4:t.civic.taxes.tax_rate=40;break;case 5:t.civic.taxes.tax_rate=50}if(2062===w(t.version)&&void 0!==t.civic.taxes&&2==t.civic.taxes.tax_rate&&(t.civic.taxes.tax_rate=20),w(t.version)<2065&&void 0!==t.race&&"sporgar"===t.race.species&&(delete t.race.crafty,delete t.race.hydrophilic,t.race.infectious=1,t.race.parasite=1,!t.tech.military&&t.tech.primitive&&t.tech.primitive>=3&&(t.civic.garrison.display=!0,t.settings.showCivic=!0,t.city.garrison={count:0})),w(t.version)<3002&&t.space&&(t.tech.space&&t.tech.space>=4&&(t.space.living_quarters||(t.space.living_quarters={count:0,on:0}),t.space.garage||(t.space.garage={count:0}),t.space.red_mine||(t.space.red_mine={count:0,on:0}),t.space.fabrication||(t.space.fabrication={count:0,on:0}),t.space.laboratory||(t.space.laboratory={count:0,on:0})),t.tech.space&&t.tech.space>=3&&(t.space.iridium_mine||(t.space.iridium_mine={count:0,on:0}),t.space.helium_mine||(t.space.helium_mine={count:0,on:0})),t.tech.hell&&(t.space.geothermal||(t.space.geothermal={count:0,on:0}))),w(t.version)<3004&&t.settings&&t.settings.space&&t.settings.space.belt&&(t.space.space_station={count:0,on:0,support:0,s_max:0}),w(t.version)<4001&&t.city&&t.city.factory&&!t.city.factory.Nano&&(t.city.factory.Nano=0),w(t.version)<4003&&t.stats.achieve&&Object.keys(t.stats.achieve).forEach((function(e){t.stats.achieve[e]=1})),w(t.version)<4028&&t.stats.achieve&&t.stats.achieve.genus_demonic&&(t.stats.achieve.biome_hellscape=t.stats.achieve.genus_demonic),w(t.version)<4029&&t.race.mutation&&t.race.mutation>0){t.resource.Genes={name:"Genes",display:!0,value:0,amount:0,crates:0,diff:0,delta:0,max:-2,rate:0};for(let e=0;e=3&&(t.tech.wind_plant=1,t.tech.hunting=2);let e=["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 e=1;t.race.no_trade&&e++,t.race.no_craft&&e++,t.race.no_crispr&&e++,t.race.weak_mastery&&e++,t.stats.achieve.cross={l:e,a:e}}if(w(t.version)<7e3&&(t.civic.govern||(t.civic.govern={type:"oligarchy",rev:0,fr:0})),w(t.version)<7004&&t.queue&&t.queue.queue)for(let e=0;e0&&(t.stats.harmony=parseFloat(t.stats.harmony.toFixed(2)),t.race.Harmony.count=parseFloat(t.race.Harmony.count.toFixed(2))),w(t.version)<8017&&t.city.garrison&&(t.city.garrison.on=t.city.garrison.count),w(t.version)<9005&&t.race.hasOwnProperty("terrifying")&&t.tech.hasOwnProperty("gambling")&&!t.space.hasOwnProperty("spc_casino")&&(t.space.spc_casino={count:0,on:0}),w(t.version)<9009&&t.genes.hasOwnProperty("ancients")&&t.genes.ancients>=3&&(4===t.genes.ancients?t.genes.ancients=5:t.race.Plasmid.count+=300),w(t.version)<9010&&(["species","gods","old_gods"].forEach((e=>{"orge"===t.race[e]&&(t.race[e]="ogre")})),t.stats.hasOwnProperty("achieve")&&t.stats.achieve.hasOwnProperty("extinct_orge")&&(t.stats.achieve.extinct_ogre=t.stats.achieve.extinct_orge,delete t.stats.achieve.extinct_orge),t.resource.hasOwnProperty("orge")&&(t.resource.ogre=t.resource.orge,delete t.resource.orge),t.city&&t.city.factory&&!t.city.factory.Furs&&(t.city.factory.Furs=0)),w(t.version)<9014&&(["seraph","unicorn","custom"].forEach((e=>{t.race.species===e&&("custom"===e&&t.hasOwnProperty("custom")&&"angelic"===t.custom.race0.genus||"custom"!==e)&&(t.race.holy=1)})),t.hasOwnProperty("arpa")&&t.arpa.hasOwnProperty("sequence")&&(t.arpa.sequence.labs=0)),w(t.version)<1e5&&(delete t.city.lumber,delete t.city.stone,t.stats.dark=0,t.race.Dark&&(t.stats.dark=t.race.Dark.count),t.city.hasOwnProperty("smelter")&&(t.city.smelter.hasOwnProperty("Star")||(t.city.smelter.Star=0),t.city.smelter.hasOwnProperty("StarCap")||(t.city.smelter.StarCap=0),t.city.smelter.hasOwnProperty("Inferno")||(t.city.smelter.Inferno=0)),t.hasOwnProperty("warseed")||(t.warseed=t.seed+1,Math.war=t.hasOwnProperty("warseed")?t.warseed:t.seed),t.portal.hasOwnProperty("bireme")&&(t.portal.bireme.crew=0,t.portal.bireme.mil=0),t.portal.hasOwnProperty("transport")&&(t.portal.transport.crew=0,t.portal.transport.mil=0,t.portal.transport.cargo||(t.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})),t.hasOwnProperty("settings")&&t.settings.portal&&t.settings.portal.spire&&!t.portal.hasOwnProperty("purifier")&&(t.settings.portal.spire=!1),t.portal.hasOwnProperty("mechbay")&&!Array.isArray(t.portal.mechbay.mechs)&&(t.portal.mechbay.mechs=[]),t.portal.transport&&t.portal.transport.count>=1&&!t.tech.hell_spire&&(t.tech.hell_spire=1,t.settings.portal.spire=!0,t.settings.showCargo=!0,t.portal.purifier={count:0,on:0,support:0,s_max:0,supply:0,sup_max:100,diff:0},t.portal.port={count:0,on:0}),t.tech.hasOwnProperty("waygate")&&!t.portal.hasOwnProperty("waygate")&&delete t.tech.waygate,t.hasOwnProperty("blood")||(t.blood={})),w(t.version)<100013&&t.hasOwnProperty("settings")&&t.settings.hasOwnProperty("showPowerGrid")&&t.hasOwnProperty("race")&&t.race.infiltrator&&t.hasOwnProperty("tech")&&t.tech.hasOwnProperty("high_tech")&&t.tech.high_tech>=2&&(t.settings.showPowerGrid=!0),w(t.version)<100014&&(t.race.Dark&&(t.stats.dark=t.race.Dark.count),t.race.casting&&t.race.evil&&(t.race.casting.total-=t.race.casting.lumberjack,t.race.casting.lumberjack=0),t.queue&&t.queue.queue))for(let e=0;e=2,events:!0,major_events:!0,minor_events:!0,achievements:t.stats.achieve&&Object.keys(t.stats.achieve).length>0||t.stats.feat&&Object.keys(t.stats.feat).length>0,hell:t.settings.showPortal||t.stats.blackhole||t.stats.ascend||t.stats.descend}),t.race.hasOwnProperty("inflation")&&["supercollider","stock_exchange","launch_facility","monuments","railway","roid_eject","nexus","syphon"].forEach((function(e){t.tech.hasOwnProperty(e)&&(t.race.inflation+=10*t.tech[e])}))),w(t.version)<101012&&t.civic.garrison&&(t.civic.garrison.rate=0),w(t.version)<101014&&(t.hasOwnProperty("settings")&&t.settings.hasOwnProperty("msgFilters")&&Object.keys(t.settings.msgFilters).forEach((function(e){t.settings.msgFilters[e]={unlocked:!!t.settings.msgFilters[e],vis:!!t.settings.msgFilters[e],max:60,save:3}})),t.hasOwnProperty("lastMsg")&&t.lastMsg)){let e={};m.forEach((function(t){e[t]=[]})),t.lastMsg.forEach((function(t){t.t?t.t.forEach((function(a){e[a].push({m:t.m,c:t.c})})):e.all.push({m:t.m,c:t.c})})),t.lastMsg=e}if(w(t.version)<=101014&&!t.revision&&t.race.cataclysm&&t.race.universe&&"magic"===t.race.universe&&t.tech.magic&&t.tech.magic>=2&&(t.space.pylon={count:0}),w(t.version)<101015&&t.hasOwnProperty("special")&&t.special.hasOwnProperty("trick")&&(t.special.trick[2020]=JSON.parse(JSON.stringify(t.special.trick)),delete t.special.trick.trick1,delete t.special.trick.trick2,delete t.special.trick.trick3,delete t.special.trick.trick4,delete t.special.trick.trick5,delete t.special.trick.trick6,delete t.special.trick.trick7,delete t.special.trick.trick8,delete t.special.trick.trick9,delete t.special.trick.trick10,delete t.special.trick.trick11,delete t.special.trick.trick12),w(t.version)<102e3&&(t.hasOwnProperty("portal")&&t.portal.hasOwnProperty("fortress")&&!t.portal.fortress.hasOwnProperty("nocrew")&&(t.portal.fortress.nocrew=!1),t.city.hasOwnProperty("smelter")&&!t.city.smelter.hasOwnProperty("Iridium")&&(t.city.smelter.Iridium=0),t.hasOwnProperty("portal")&&t.portal.hasOwnProperty("mechbay")&&!t.portal.mechbay.hasOwnProperty("active")&&(t.portal.mechbay.active=0,t.portal.mechbay.scouts=0)),w(t.version)<102001&&(t.race.blood_thirst&&t.race.blood_thirst>3&&(t.race.blood_thirst=1),t.race.rainbow&&t.race.rainbow>3&&(t.race.rainbow=1)),w(t.version)<102005&&!t.stats.cores&&t.race.hasOwnProperty("AICore")&&(t.stats.cores=t.race.AICore.count),w(t.version)<102006&&t.race.artifical&&(t.race.calm&&(t.resource.hasOwnProperty("Zen")&&(t.resource.Zen.display=!0),t.city.meditation={count:0}),t.race.cannibalize&&(t.city.s_alter={count:0,rage:0,mind:0,regen:0,mine:0,harvest:0}),t.race.magnificent&&(t.city.shrine={count:0,morale:0,metal:0,know:0,tax:0})),w(t.version)<102007&&t.stats.hasOwnProperty("achieve")&&delete t.stats.achieve.extinct_sludge,w(t.version)<102012&&(t.city.hasOwnProperty("ptrait")&&(t.city.ptrait="none"===t.city.ptrait?[]:[t.city.ptrait]),t.tech.hell_ruins&&t.tech.hell_ruins>=3&&(t.tech.hell_vault=1)),w(t.version)<102015){if(t.race.hasOwnProperty("governor")&&t.race.governor.hasOwnProperty("tasks"))for(let e in t.race.governor.tasks)"asssemble"===t.race.governor.tasks[e]&&(t.race.governor.tasks[e]="assemble");t.settings&&t.settings.hasOwnProperty("restoreCheck")&&delete t.settings.restoreCheck}if(w(t.version)<102017&&(t.portal.hasOwnProperty("fortress")&&(t.portal.observe={settings:{expanded:!1,average:!1,hyperSlow:!1,display:"game_days",dropKills:!0,dropGems:!0},stats:{total:{start:{year:t.city.calendar.year,day:t.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:t.city.calendar.year,day:t.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:{}}),t.tech.hasOwnProperty("genetics")&&t.tech.genetics>1&&t.hasOwnProperty("arpa")&&(t.arpa.hasOwnProperty("sequence")||(t.arpa.sequence={max:5e4,progress:0,time:5e4,on:!1}),t.arpa.sequence.boost||(t.arpa.sequence.boost=!1),t.arpa.sequence.auto||(t.arpa.sequence.auto=!1),t.arpa.sequence.labs||(t.arpa.sequence.labs=0))),w(t.version)<102021&&t.hasOwnProperty("custom")&&!t.custom.hasOwnProperty("race0")){let e=t.race.hasOwnProperty("species")?t.race.species:"protoplasm";t.galaxy.hasOwnProperty("alien1")&&"custom"===t.galaxy.alien1.id&&(t.galaxy.alien1.id="human"===e?"elven":"human"),t.galaxy.hasOwnProperty("alien2")&&"custom"===t.galaxy.alien2.id&&(t.galaxy.alien2.id="orc"===e||"orc"===t.galaxy.alien1.id?"cath":"orc")}function f(){["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(e){t.stats.hasOwnProperty(e)||(t.stats[e]=0)})),t.stats.achieve||(t.stats.achieve={}),t.stats.feat||(t.stats.feat={}),t.stats.hasOwnProperty("womling")||(t.stats.womling={god:{l:0},lord:{l:0},friend:{l:0}}),t.stats.spire||(t.stats.spire={}),t.stats.synth||(t.stats.synth={}),t.stats.hasOwnProperty("banana")||(t.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}})}if(w(t.version)<103e3&&(t.hasOwnProperty("tauceti")||(t.tauceti={}),"protoplasm"===t.race.species&&(t.evolution.hasOwnProperty("sexual_reproduction")&&(t.tech.evo=t.evolution.sexual_reproduction.count>0?2:1,delete t.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(e){if(t.evolution.hasOwnProperty(e[0])&&t.evolution[e[0]].count>0)for(let[a,r]of Object.entries(e[1]))t.tech[a]=r;delete t.evolution[e[0]]})),t.evolution.mloaded=1,t.evolution.gmloaded=1)),w(t.version)<103001&&(t.hasOwnProperty("prestige")||(t.prestige={}),t.race.Plasmid&&t.race.Plasmid.hasOwnProperty("anti")&&(t.prestige.AntiPlasmid={count:t.race.Plasmid.anti}),["Plasmid","Phage","AICore","Dark","Harmony"].forEach((function(e){t.race.hasOwnProperty(e)&&(t.prestige[e]={count:t.race[e].count},delete t.race[e])})),["Artifact","Blood_Stone"].forEach((function(e){t.resource.hasOwnProperty(e)&&(t.prestige[e]={count:t.resource[e].amount},delete t.resource[e])})),!t.stats.hasOwnProperty("synth")&&t.race.hasOwnProperty("srace")&&(t.stats.synth={},t.stats.synth[t.race.srace]=!0),t.race.hasOwnProperty("governor")&&t.race.governor.hasOwnProperty("config")&&t.race.governor.config.hasOwnProperty("trash")&&["Infernite","Elerium","Copper","Iron"].forEach((function(e){t.race.governor.config.trash.hasOwnProperty(e)&&"number"==typeof t.race.governor.config.trash[e]&&(t.race.governor.config.trash[e]={v:t.race.governor.config.trash[e],s:!0})}))),w(t.version)<103002&&t.portal.hasOwnProperty("observe")&&t.portal.observe.hasOwnProperty("stats")&&(t.portal.observe.stats.period.gems.surveyors=0,t.portal.observe.stats.total.gems.surveyors=0),t.version="1.3.9",delete t.revision,delete t.beta,t.hasOwnProperty("prestige")||(t.prestige={}),["Plasmid","AntiPlasmid","Phage","Dark","Harmony","AICore","Artifact","Blood_Stone"].forEach((function(e){t.prestige.hasOwnProperty(e)||(t.prestige[e]={count:0})})),t.hasOwnProperty("power")||(t.power=[]),t.hasOwnProperty("support")||(t.support={}),["moon","red","belt","alpha","nebula","gateway","alien2","lake","spire","titan","enceladus","eris","tau_home","tau_red","tau_roid"].forEach((function(e){t.support.hasOwnProperty(e)||(t.support[e]=[])})),t.civic.cement_worker&&.25===t.civic.cement_worker.impact&&(t.civic.cement_worker.impact=.4),t.settings||(t.settings={showEvolve:!0,showAchieve:!1,animated:!0,disableReset:!1,font:"standard",q_merge:"merge_nearby",cLabels:!0,theme:"gruvboxDark",locale:"en-US",icon:"star"}),t.settings.space||(t.settings.space={}),t.settings.space.hasOwnProperty("home")||(t.settings.space.home=!0),j(!1),t.settings.icon||(t.settings.icon="star"),t.settings.showResources||(t.settings.showResources=t.settings.showMarket),t.settings.showStorage||(t.city.warehouse||t.city.storage_yard?t.settings.showStorage=!0:t.settings.showStorage=!1),t.settings.hasOwnProperty("touch")||(t.settings.touch=!1),t.settings.hasOwnProperty("lowPowerBalance")||(t.settings.lowPowerBalance=!1),t.queue||(t.queue={display:!1,queue:[]}),t.r_queue||(t.r_queue={display:!1,queue:[]}),t.queue.rename||(t.queue.rename=!1),t.queue.max||(t.queue.max=0),t.r_queue.max||(t.r_queue.max=0),t.queue.pause||(t.queue.pause=!1),t.r_queue.pause||(t.r_queue.pause=!1),t.lastMsg||(t.lastMsg={}),t.settings.msgFilters||(t.settings.msgFilters={}),["all","progress","events","major_events","minor_events"].forEach((function(e){t.settings.msgFilters[e]||(t.settings.msgFilters[e]={unlocked:!0,vis:!0,max:60,save:3})})),m.forEach((function(e){t.lastMsg[e]||(t.lastMsg[e]=[]),t.settings.msgFilters[e]||(t.settings.msgFilters[e]={unlocked:!1,vis:!1,max:60,save:3})})),t.settings.msgQueueHeight||(t.settings.msgQueueHeight=$("#msgQueue").outerHeight(),t.settings.buildQueueHeight=$("#buildQueue").outerHeight()),t.space||(t.space={}),t.starDock||(t.starDock={}),t.interstellar||(t.interstellar={}),t.galaxy||(t.galaxy={}),t.interstellar.mass_ejector&&!t.interstellar.mass_ejector.Bolognium&&(t.interstellar.mass_ejector.Bolognium=0),t.interstellar.mass_ejector&&!t.interstellar.mass_ejector.Vitreloy&&(t.interstellar.mass_ejector.Vitreloy=0),t.interstellar.mass_ejector&&!t.interstellar.mass_ejector.Orichalcum&&(t.interstellar.mass_ejector.Orichalcum=0),t.interstellar.mass_ejector&&!t.interstellar.mass_ejector.Nanoweave&&(t.interstellar.mass_ejector.Nanoweave=0),t.interstellar.mass_ejector&&!t.interstellar.mass_ejector.Scarletite&&(t.interstellar.mass_ejector.Scarletite=0),t.hasOwnProperty("pillars")||(t.pillars={}),t.settings.space.alpha||(t.settings.space.alpha=!1,t.settings.space.proxima=!1,t.settings.space.nebula=!1,t.settings.space.neutron=!1,t.settings.space.blackhole=!1),t.settings.showAchieve||(t.settings.showAchieve=!1),t.settings.locale||(t.settings.locale="en-us"),void 0===t.settings.pause&&(t.settings.pause=!1),void 0===t.settings.mKeys&&(t.settings.mKeys=!0),void 0===t.settings.keyMap&&(t.settings.keyMap={x10:"Control",x25:"Shift",x100:"Alt",q:"q"}),void 0===t.settings.keyMap.showCiv&&(t.settings.keyMap.showCiv="1",t.settings.keyMap.showCivic="2",t.settings.keyMap.showResearch="3",t.settings.keyMap.showResources="4",t.settings.keyMap.showGenetics="5",t.settings.keyMap.showAchieve="6",t.settings.keyMap.settings="7"),delete t.settings.keyMap.d,void 0===t.settings.qAny&&(t.settings.qAny=!1),void 0===t.settings.sPackOn&&(t.settings.sPackOn=!0),void 0===t.settings.qAny_res&&(t.settings.qAny_res=!1),void 0===t.settings.sPackMsg&&(t.settings.sPackMsg=!1),void 0===t.settings.expose&&(t.settings.expose=!1),void 0===t.settings.tabLoad&&(t.settings.tabLoad=!1),void 0===t.settings.boring&&(t.settings.boring=!1),t.settings.hasOwnProperty("mtorder")||(t.settings.mtorder=[]),f(),t.race.seeded||(t.race.seeded=!1),t.race.deterioration||(t.race.deterioration=0),t.race.gene_fortify||(t.race.gene_fortify=0),t.race.old_gods||(t.race.old_gods="none"),t.race.universe||(t.race.universe="standard"),t.genes.minor||(t.genes.minor={}),t.race.minor||(t.race.minor={}),t.hasOwnProperty("govern")||(t.govern={governor:{},candidate:[],policy:{}}),t.settings.hasOwnProperty("showMil")||(t.settings.showMil=!0),t.settings.hasOwnProperty("showPowerGrid")||(t.settings.showPowerGrid=!!(t.hasOwnProperty("tech")&&t.tech.hasOwnProperty("high_tech")&&t.tech.high_tech>=2)),t.settings.affix||(t.settings.affix="si"),t.special||(t.special={}),t.special.gift||(t.special.gift={}),t.special.hasOwnProperty("egg")||(t.special.egg={}),t.special.hasOwnProperty("trick")||(t.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}),t.civic.govern||(t.civic.govern={type:"oligarchy",rev:2e3,fr:0}),t.civic.govern.fr=0,t.hasOwnProperty("custom")||(t.custom={}),t.custom.hasOwnProperty("planet")&&t.custom.planet.hasOwnProperty("biome")&&delete t.custom.planet,t.city.hasOwnProperty("smelter")&&!t.city.smelter.hasOwnProperty("cap")&&(t.city.smelter.cap=0),t.civic.homeless||(t.civic.homeless=0),t.civic.foreign||(t.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}}),void 0===t.civic.foreign.gov0.trn&&(t.civic.foreign.gov0.trn=0,t.civic.foreign.gov1.trn=0,t.civic.foreign.gov2.trn=0,t.civic.foreign.gov0.sab=0,t.civic.foreign.gov1.sab=0,t.civic.foreign.gov2.sab=0,t.civic.foreign.gov0.act="none",t.civic.foreign.gov1.act="none",t.civic.foreign.gov2.act="none"),void 0!==t.civic.foreign.gov0.name&&"evo_organism_title"===t.civic.foreign.gov0.name.s1&&(t.civic.foreign.gov0.name.s1="Northern"),void 0!==t.civic.foreign.gov1.name&&"evo_organism_title"===t.civic.foreign.gov1.name.s1&&(t.civic.foreign.gov1.name.s1="Southern"),void 0!==t.civic.foreign.gov2.name&&"evo_organism_title"===t.civic.foreign.gov2.name.s1&&(t.civic.foreign.gov2.name.s1="Divine"),!t.race.evil&&t.race.immoral&&void 0!==t.race&&"wendigo"!==t.race.species)delete t.race.immoral;else if(void 0!==t.race&&"wendigo"===t.race.species){const e=new Date;t.settings.hasOwnProperty("boring")&&!t.settings.boring&&11===e.getMonth()&&e.getDate()>=17&&(t.race.immoral=3)}if(t.hasOwnProperty("special")&&t.special.hasOwnProperty("gift")){const e=new Date(t.stats.start),a=new Date;Object.keys(t.special.gift).forEach((function(r){let s=Number(r.substring(1,5));(s=1?t.civic.d_job="farmer":t.civic.d_job="unemployed"),t.settings.animated=!0,t.settings.disableReset=!1,t.arpa&&t.arpa.launch_facility&&t.arpa.launch_facility.rank>0&&!t.tech.space&&(t.tech.space=1);var y={x10:!1,x25:!1,x100:!1,q:!1};function b(){let e=1;return t.settings.mKeys&&(y.x10&&(e*=10),y.x25&&(e*=25),y.x100&&(e*=100)),e}function w(e){let t=e.split(".",3);return t[0]*=1e5,t[1]*=1e3,Number(t[0])+Number(t[1])+Number(t[2])}function x(){if($(window).width()>=1400&&$("#msgQueue:not(.right)")){let e=$("#buildQueue").detach();e.addClass("right"),e.removeClass("has-text-info");let t=$("#msgQueue").detach();t.addClass("right"),t.removeClass("has-text-info"),t.css("resize","none"),$("#queueColumn").addClass("is-one-quarter"),$("#queueColumn").append(e),$("#queueColumn").append(t),$("#mainColumn").removeClass("is-three-quarters"),$("#mainColumn").addClass("is-half")}else if($(window).width()<1400&&$("#msgQueue").hasClass("right")){let e=$("#buildQueue").detach();e.removeClass("right"),e.addClass("has-text-info");let t=$("#msgQueue").detach();t.removeClass("right"),t.addClass("has-text-info"),t.css("resize","vertical"),$("#queueColumn").removeClass("is-one-quarter"),$("#sideQueue").append(e),$("#sideQueue").append(t),$("#mainColumn").removeClass("is-half"),$("#mainColumn").addClass("is-three-quarters")}}var k={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 q(e,a,r){let s=0,i="",c=e<0;return c&&(e*=-1),e<=9999?s=+e.toFixed(a):e<1e6?(i=k[t.settings.affix][0],s=r?+(e/1e3).toFixed(1):Math.floor(e/100)/10):e<1e9?(i=k[t.settings.affix][1],s=r?+(e/1e6).toFixed(1):Math.floor(e/1e4)/100):e<1e12?(i=k[t.settings.affix][2],s=r?+(e/1e9).toFixed(1):Math.floor(e/1e7)/100):e<1e15?(i=k[t.settings.affix][3],s=r?+(e/1e12).toFixed(1):Math.floor(e/1e10)/100):e<1e18?(i=k[t.settings.affix][4],s=r?+(e/1e15).toFixed(1):Math.floor(e/1e13)/100):e<1e21?(i=k[t.settings.affix][5],s=r?+(e/1e18).toFixed(1):Math.floor(e/1e16)/100):e<1e24?(i=k[t.settings.affix][6],s=r?+(e/1e21).toFixed(1):Math.floor(e/1e19)/100):(i=k[t.settings.affix][7],s=r?+(e/1e24).toFixed(1):Math.floor(e/1e22)/100),s>=100&&(s=+s.toFixed(1)),c&&(s*=-1),s+i}function M(e,t){var a=document.createElement("div"),r="speak-"+Date.now();a.setAttribute("id",r),a.setAttribute("aria-live",t||"polite"),a.classList.add("sr-only"),document.body.appendChild(a),window.setTimeout((function(){document.getElementById(r).innerHTML=e}),100),window.setTimeout((function(){document.body.removeChild(document.getElementById(r))}),1e3)}$(window).resize((function(){x()})),window.soft_reset=function(a){try{a=a&&"replicator"===a?"replicator":"soft",gtag("event","reset",{end:a})}catch(e){}a||C();let r=!!t.race.hasOwnProperty("srace")&&t.race.srace,s=t.race.hasOwnProperty("geck")?t.race.geck:0;t.race.hasOwnProperty("gecked")&&(s+=t.race.gecked,t.stats.geck-=t.race.gecked);let i={species:"protoplasm",universe:t.race.universe,seeded:t.race.seeded,probes:t.race.probes,seed:t.race.seed,ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended,rejuvenated:!!t.race.hasOwnProperty("rejuvenated")&&t.race.rejuvenated};s>0&&(i.geck=s),r&&(i.srace=r),t.race.bigbang&&(i.bigbang=!0),t.race.gods&&(i.gods=t.race.gods),t.race.old_gods&&(i.old_gods=t.race.old_gods),t.race.rapid_mutation&&t.race.rapid_mutation>0&&(i.rapid_mutation=t.race.rapid_mutation),t.race.ancient_ruins&&t.race.ancient_ruins>0&&(i.ancient_ruins=t.race.ancient_ruins),t.race.bigbang&&(i.universe="bigbang"),t.race.hasOwnProperty("corruption")&&(i.corruption=t.race.corruption),t.race=i;let c=t.city.calendar.orbit,o=t.city.biome,n=t.city.ptrait,l=t.city.geology;t.city={calendar:{day:0,year:0,weather:2,temp:1,moon:0,wind:0,orbit:c},biome:o,ptrait:n,geology:l},t.tech.theology&&t.tech.theology>=1?t.tech={theology:1}:t.tech={},S(),t.new=!0,t.seed=Math.rand(0,1e4),t.warseed=Math.rand(0,1e4),t.stats.current=Date.now(),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()};var P={w:!1,s:!1,mt:250},O={};function C(){m.forEach((function(e){"achievements"!==e&&(t.lastMsg[e]=[])}))}function j(e){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(r){"base"===r?a[r].forEach((function(a){t.settings.hasOwnProperty(a)&&!e||(t.settings[a]=!1)})):(t.settings.hasOwnProperty(r)||(t.settings[r]={}),a[r].forEach((function(a){t.settings[r].hasOwnProperty(a)&&!e||(t.settings[r][a]=!1)})))})),["civTabs","govTabs","govTabs2","hellTabs","resTabs","spaceTabs","marketTabs","statsTabs"].forEach((function(a){t.settings.hasOwnProperty(a)&&!e||(t.settings[a]=0)}))}function S(){P.w&&P.w.terminate(),t.queue={display:!1,queue:[]},t.r_queue={display:!1,queue:[]},t.space={},t.interstellar={},t.galaxy={},t.portal={},t.starDock={},t.tauceti={},t.civic={new:0},t.civic.foreign={gov0:{unrest:0,hstl:Math.floor(g(80,100)),mil:Math.floor(g(75,125)),eco:Math.floor(g(60,90)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov1:{unrest:0,hstl:Math.floor(g(0,20)),mil:Math.floor(g(125,175)),eco:Math.floor(g(80,120)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov2:{unrest:0,hstl:Math.floor(g(40,60)),mil:Math.floor(g(200,300)),eco:Math.floor(g(130,170)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1}},t.genes.blood||(t.prestige.Blood_Stone.count=0),t.resource={},t.evolution={},t.event={t:100,l:!1},t.m_event={t:499,l:!1},t.stats.days=0,t.stats.know=0,t.stats.starved=0,t.stats.died=0,t.stats.attacks=0,t.stats.dkills=0,t.stats.cfood=0,t.stats.cstone=0,t.stats.clumber=0,t.stats.sac=0,t.stats.cattle=0,t.stats.murders=0,t.settings.at=0,t.settings.showEvolve=!0,t.settings.space.home=!0,j(!0),t.settings.disableReset=!1,t.settings.pause=!1,t.arpa={},delete t.race.hrt,t.genes.queue&&(t.tech.queue=1,t.queue.display=!0)}let F;function z(e,a){let r=F[e];if(!r)return t.settings.expose&&(console.error(`string ${e} not found`),console.log(F)),e;if(a)if(a instanceof Array){for(let s=0;s{r=e})),"en-US"!=a){let e;try{$.getJSON(`strings/strings.${a}.json`,(t=>{e=t}))}catch(e){console.error(e,e.stack)}const s=r.length;e&&Object.assign(r,e),r.length!=s&&t.settings.expose&&console.error(`string.${a}.json has extra keys.`)}let s=e.getItem("string_pack")||!1;if(s&&t.settings.sPackOn){let e;try{e=JSON.parse(LZString.decompressFromUTF16(s))}catch(e){console.error(e,e.stack)}const a=r.length;e&&Object.assign(r,e),r.length!=a&&t.settings.expose&&console.error("string pack has extra keys.")}$.ajaxSetup({async:!0}),F=r}(t.settings.locale);const A={"en-US":"English (US)","es-ES":"Spanish (ESP)","pt-BR":"Português (BR)","zh-CN":"简体中文","zh-TW":"繁體中文","ko-KR":"한국어","cs-CZ":"Čeština","ru-RU":"Русский","im-PL":"Igpay-Atinlay"},T={soldier:{name:z("governor_soldier"),desc:z("governor_soldier_desc"),title:[z("governor_soldier_t1"),z("governor_soldier_t2"),z("governor_soldier_t3")],traits:{tactician:1,militant:1}},criminal:{name:z("governor_criminal"),desc:z("governor_criminal_desc"),title:[z("governor_criminal_t1"),z("governor_criminal_t2"),{m:z("governor_criminal_t3m"),f:z("governor_criminal_t3f")}],traits:{noquestions:1,racketeer:1}},entrepreneur:{name:z("governor_entrepreneur"),desc:z("governor_entrepreneur_desc"),title:[z("governor_entrepreneur_t1"),z("governor_entrepreneur_t2"),{m:z("governor_entrepreneur_t3m"),f:z("governor_entrepreneur_t3f")}],traits:{dealmaker:1,risktaker:1}},educator:{name:z("governor_educator"),desc:z("governor_educator_desc"),title:[z("governor_educator_t1"),z("governor_educator_t2"),z("governor_educator_t3")],traits:{teacher:1,theorist:1}},spiritual:{name:z("governor_spiritual"),desc:z("governor_spiritual_desc"),title:[z("governor_spiritual_t1"),z("governor_spiritual_t2"),z("governor_spiritual_t3")],traits:{inspirational:1,pious:1}},bluecollar:{name:z("governor_bluecollar"),desc:z("governor_bluecollar_desc"),title:[{m:z("governor_bluecollar_t1m"),f:z("governor_bluecollar_t1f")},z("governor_bluecollar_t2"),{m:z("governor_bluecollar_t3m"),f:z("governor_bluecollar_t3f")}],traits:{pragmatist:1,dirty_jobs:1}},noble:{name:z("governor_noble"),desc:z("governor_noble_desc"),title:[{m:z("governor_noble_t1m"),f:z("governor_noble_t1f")},{m:z("governor_noble_t2m"),f:z("governor_noble_t2f")},{m:z("governor_noble_t3m"),f:z("governor_noble_t3f")},{m:z("governor_noble_t4m"),f:z("governor_noble_t4f")}],traits:{extravagant:1,aristocrat:1}},media:{name:z("governor_media"),desc:z("governor_media_desc"),title:[z("governor_media_t1"),{m:z("governor_media_t2m"),f:z("governor_media_t2f")},z("governor_media_t3")],traits:{gaslighter:1,muckraker:1}},sports:{name:z("governor_sports"),desc:z("governor_sports_desc"),title:[z("governor_sports_t1"),z("governor_sports_t2"),z("governor_sports_t3")],traits:{athleticism:1,nopain:1}},bureaucrat:{name:z("governor_bureaucrat"),desc:z("governor_bureaucrat_desc"),title:[z("governor_bureaucrat_t1"),{m:z("governor_bureaucrat_t2m"),f:z("governor_bureaucrat_t2f")},z("governor_bureaucrat_t3")],traits:{organizer:1}}},E={tactician:{name:z("gov_trait_tactician"),effect(){return z("gov_trait_tactician_effect",[$(this)[0].vars()[0]])},vars:()=>[25]},militant:{name:z("gov_trait_militant"),effect(){return z("gov_trait_militant_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[25,10]},noquestions:{name:z("gov_trait_noquestions"),effect(){return z("gov_trait_noquestions_effect",[$(this)[0].vars()[0]])},vars:()=>[.005]},racketeer:{name:z("gov_trait_racketeer"),effect(){return z("gov_trait_racketeer_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[20,35]},dealmaker:{name:z("gov_trait_dealmaker"),effect(){return z("gov_trait_dealmaker_effect",[$(this)[0].vars()[0]])},vars:()=>[125]},risktaker:{name:z("gov_trait_risktaker"),effect(){return z("gov_trait_risktaker_effect",[$(this)[0].vars()[0]])},vars:()=>[12]},teacher:{name:z("gov_trait_teacher"),effect(){return z("gov_trait_teacher_effect",[$(this)[0].vars()[0]])},vars:()=>[6]},theorist:{name:z("gov_trait_theorist"),effect(){return z("gov_trait_theorist_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[50,4]},inspirational:{name:z("gov_trait_inspirational"),effect(){return z("gov_trait_inspirational_effect",[$(this)[0].vars()[0]])},vars:()=>[20]},pious:{name:z("gov_trait_pious"),effect(){let e=$(this)[0].vars()[1],a=t.tech.monument&&t.tech.monument>=3&&i.s_gate?3:1;return e=("corpocracy"===t.civic.govern.type?2*e:e)*a,z("gov_trait_pious_effect",[$(this)[0].vars()[0],e])},vars:()=>[10,5]},pragmatist:{name:z("gov_trait_pragmatist"),effect(){return z("gov_trait_pragmatist_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[50,2]},dirty_jobs:{name:z("gov_trait_dirty_jobs"),effect(){return z("gov_trait_dirty_jobs_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars:()=>[.015,1,10]},extravagant:{name:z("gov_trait_extravagant"),effect(){return z("gov_trait_extravagant_effect",[$(this)[0].vars()[0],Ks("large",!0),$(this)[0].vars()[1],$(this)[0].vars()[2]+5])},vars:()=>[10,1.25,1]},aristocrat:{name:z("gov_trait_aristocrat"),effect(){return z("gov_trait_aristocrat_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars:()=>[50,20,10]},gaslighter:{name:z("gov_trait_gaslighter"),effect(){return z("gov_trait_gaslighter_effect",[$(this)[0].vars()[0],Es(),$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars:()=>[1,1,.5]},muckraker:{name:z("gov_trait_muckraker"),effect(){return z("gov_trait_muckraker_effect",[$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars:()=>[8,12,3]},athleticism:{name:z("gov_trait_athleticism"),effect(){return z("gov_trait_athleticism_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2],Es()])},vars:()=>[1.5,2,4]},nopain:{name:z("gov_trait_nopain"),effect(){return z("gov_trait_nopain_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[50,10]},organizer:{name:z("gov_trait_organizer"),effect(){return z("gov_trait_organizer_effect",[$(this)[0].vars()[0]])},vars:()=>[t.genes.governor&&t.genes.governor>=2?2:1]}},I={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 K(e){let a=[],r=_i[t.race.species].type,s=Object.keys(T),i=JSON.parse(JSON.stringify(I[r]));e=e||s.length;for(let t=0;t');$("#r_govern1").append(e);let a=$('
');e.append(a);let r=$("
");r.append($(`
${z("governor_office",[t.race.governor.g.n])}
`)),r.append($(`
${z("governor_background")}: ${T[t.race.governor.g.bg].name}
`)),a.append(r),a.append($(`
${z("governor_fire")}
`));let s=[0,1,2];t.genes.governor&&t.genes.governor>=2&&(s.push(s.length),D("organizer",0)&&s.push(s.length)),D("organizer",0)&&s.push(s.length),s.forEach((function(t){let a=`{{ 'none' | label }}`;Object.keys(G).forEach((function(e){G[e].req()&&(a+=`{{ '${e}' | label }}`)})),e.append(`
${z("gov_task",[t+1])}\n \n ${a}\n
`)})),t.race.governor.hasOwnProperty("config")||(t.race.governor.config={});let i=$('
');e.append(i);{t.race.governor.config.hasOwnProperty("storage")||(t.race.governor.config.storage={crt:1e3,cnt:1e3});let e=$(`
${z("gov_task_storage")}
`);i.append(e);let a=$('
');e.append(a);let r=t.race.kindling_kindred||t.race.smoldering?t.race.smoldering?"Chrysotile":"Stone":"Plywood",s="Steel";a.append($(`${z("gov_task_storage_reserve",[t.resource[r].name])}`)),a.append($(`${z("gov_task_storage_reserve",[t.resource[s].name])}`))}{t.race.governor.config.hasOwnProperty("bal_storage")||(t.race.governor.config.bal_storage={}),t.race.governor.config.bal_storage.hasOwnProperty("adv")||(t.race.governor.config.bal_storage.adv=!1);let e=$(`
${z("gov_task_bal_storage")}
${z("advanced")}
`);i.append(e);let a=$('
');e.append(a),Object.keys(t.resource).forEach((function(e){t.resource[e].stackable?(t.race.governor.config.bal_storage.hasOwnProperty(e)||(t.race.governor.config.bal_storage[e]="2"),a.append($(`
${t.resource[e].name}\n \n 0x\n 1/2\n 1x\n 2x\n 3x\n 4x\n \n
`))):t.race.governor.config.bal_storage.hasOwnProperty(e)&&delete t.race.governor.config.bal_storage[e]}))}{t.race.governor.config.hasOwnProperty("merc")||(t.race.governor.config.merc={buffer:1,reserve:100});let e=$(`
${z("gov_task_merc")}
`);i.append(e);let a=$('
');e.append(a),a.append($(`${z("gov_task_merc_buffer")}`)),a.append($(`${z("gov_task_merc_reserve")}`))}{t.race.governor.config.hasOwnProperty("spy")||(t.race.governor.config.spy={reserve:100});let e=$(`
${z("gov_task_spy")}
`);i.append(e);let a=$('
');e.append(a),a.append($(`${z("gov_task_merc_reserve")}`))}{t.race.governor.config.hasOwnProperty("spyop")||(t.race.governor.config.spyop={},Object.keys(t.civic.foreign).forEach((function(e){t.race.governor.config.spyop[e]="gov3"===e?["influence","sabotage"]:["sabotage","incite","influence"]})));let e=$(`
${z("gov_task_spyop")}
`);i.append(e),Object.keys(t.civic.foreign).forEach((function(a){if(a.substr(3,1)<3&&!t.tech.world_control||"gov3"===a&&t.tech.rival){let r=$("
");e.append(r),r.append(`\n

${z("gov_task_spyop_priority",[te(a.substring(3))])}

\n
    \n `);let s=$(`#spyopConfig${a}`);t.race.governor.config.spyop[a].forEach((function(e){s.append(`\n
  • ${z("civics_spy_"+e)}
  • \n `)}))}}))}{t.race.governor.config.hasOwnProperty("tax")||(t.race.governor.config.tax={min:20});let e=$(`
    ${z("gov_task_tax")}
    `);i.append(e);let a=$('
    ');e.append(a),a.append($(`${z("gov_task_tax_min")}`))}{t.race.governor.config.hasOwnProperty("slave")||(t.race.governor.config.slave={reserve:100});let e=$(`
    ${z("gov_task_slave")}
    `);i.append(e);let a=$('
    ');e.append(a),a.append($(`${z("gov_task_merc_reserve")}`))}{t.race.governor.config.hasOwnProperty("trash")||(t.race.governor.config.trash={}),["Infernite","Elerium","Copper","Iron"].forEach((function(e){t.race.governor.config.trash.hasOwnProperty(e)&&"object"==typeof t.race.governor.config.trash[e]&&null!==t.race.governor.config.trash[e]||(t.race.governor.config.trash[e]={v:0,s:!0})}));let e=$(`
    ${z("gov_task_trash")}
    `);i.append(e);let a=$('
    ');e.append(a),Object.keys(t.race.governor.config.trash).forEach((function(e){a.append($(`
    `))}))}{t.race.governor.config.hasOwnProperty("replicate")||(t.race.governor.config.replicate={}),t.race.governor.config.replicate.hasOwnProperty("pow")||(t.race.governor.config.replicate.pow={on:!1,cap:1e4,buffer:0}),t.race.governor.config.replicate.hasOwnProperty("res")||(t.race.governor.config.replicate.res={que:!0,neg:!0,cap:!0});let e=$(`
    ${z("gov_task_replicate")}
    `);i.append(e);let a=$('
    ');e.append(a),a.append($(`
    ${z("gov_task_replicate_auto")}
    `)),a.append($(`${z("gov_task_replicate_pmax")}`)),a.append($(`${z("gov_task_replicate_buff")}`));let r=$('
    ');e.append(r),r.append($(`
    ${z("gov_task_replicate_que")}
    `)),r.append($(`
    ${z("gov_task_replicate_neg")}
    `)),r.append($(`
    ${z("gov_task_replicate_cap")}
    `))}ic({el:"#govOffice",data:{t:t.race.governor.tasks,c:t.race.governor.config,r:t.resource},methods:{setTask(e,a){t.race.governor.tasks[`t${a}`]=e,Vi("govtask",{task:e}),ic({el:"#race"},"update")},showTask:e=>Object.values(t.race.governor.tasks).includes(e),activeTask(e){let a=[];return t.race.hasOwnProperty("governor")&&Object.keys(t.race.governor.tasks).forEach((function(e){"none"!==t.race.governor.tasks[e]&&a.push(t.race.governor.tasks[e])})),!a.includes(e)},showStrRes:e=>t.resource[e].display,bStrEx:()=>t.race.governor.config.bal_storage.adv?"m":"",fire(){let e=(10+(t.race.governor.hasOwnProperty("f")?t.race.governor.f:0))**2-50,a="antimatter"===t.race.universe?"AntiPlasmid":"Plasmid";t.prestige[a].count>=e&&(t.prestige[a].count-=e,t.race.governor.candidates=K(10),t.race.governor.hasOwnProperty("f")?t.race.governor.f++:t.race.governor.f=1,delete t.race.governor.g,delete t.race.governor.tasks,Ls(!1,["city-amphitheatre","city-apartment"]),Hi(),Ui(),L())},fireText(){let e=(10+(t.race.governor.hasOwnProperty("f")?t.race.governor.f:0))**2-50;return`
    ${z("governor_fire")}
    ${e} ${z("antimatter"===t.race.universe?"resource_AntiPlasmid_plural_name":"resource_Plasmid_plural_name")}
    `},trashStrat(e){t.race.governor.config.trash[e].s=!t.race.governor.config.trash[e].s},trashLabel:e=>z(t.race.governor.config.trash[e].s?"gov_task_trash_max":"gov_task_trash_min",[t.resource[e].name])},filters:{label:e=>G[e]?"string"==typeof G[e].name?G[e].name:G[e].name():z(`gov_task_${e}`)}}),Ei("govOffice",(function(){let e="";return Object.keys(T[t.race.governor.g.bg].traits).forEach((function(t){e+=(E[t].hasOwnProperty("effect")?E[t].effect():"")+" "})),e}),{elm:"#govOffice .bg"}),Object.keys(t.civic.foreign).forEach((function(e){!function(e){let a=$(`#spyopConfig${e}`)[0];a&&Sortable.create(a,{onEnd(a){let r=t.race.governor.config.spyop[e];r.splice(a.newDraggableIndex,0,r.splice(a.oldDraggableIndex,1)[0]),t.race.governor.config.spyop[e]=r,L()}})}(e)}))}():function(){let e=$('
    ');$("#r_govern1").append(e),t.race.hasOwnProperty("governor")&&t.race.governor.hasOwnProperty("candidates")||(t.race.governor={candidates:K(10)}),e.append($(`
    ${z("governor_candidate")}${z("governor_background")}
    `));for(let a=0;a${r.t} ${r.n}${T[r.bg].name}
    `))}ic({el:"#candidates",data:t.race.governor,methods:{appoint(e){if(t.genes.governor&&t.tech.governor){let a=t.race.governor.candidates[e];t.race.governor.g=a,delete t.race.governor.candidates,t.race.governor.tasks={t0:"none",t1:"none",t2:"none",t3:"none",t4:"none",t5:"none"},Ls(!1,["city-amphitheatre","city-apartment"]),Hi(),Ui(),L(),Vi("governor",{appoint:t.race.governor.g.bg})}}}}),t.race.governor.candidates.forEach((function(e){Ei(`candidates-${e.bg}`,(function(){let t="";return Object.keys(T[e.bg].traits).forEach((function(e){t+=(E[e].hasOwnProperty("effect")?E[e].effect():"")+" "})),t}),{elm:`#candidates .${e.bg} .bg`})}))}())}function N(){Object.keys(t.civic.foreign).forEach((function(e){let t=$(`#spyopConfig${e}`)[0];if(t){let e=Sortable.get(t);e&&e.destroy()}}))}function D(e,a){return!(!t.race.hasOwnProperty("governor")||!t.race.governor.hasOwnProperty("g"))&&!!T[t.race.governor.g.bg].traits[e]&&E[e].vars()[a]}function B(e){if(t.genes.governor&&t.tech.governor&&t.race.governor&&t.race.governor.g&&t.race.governor.tasks)for(let a=0;at.civic.taxes.display,task(){if($(this)[0].req()){let e=1;t.civic.taxes.tax_rate>=40&&(e+=.5),"oligarchy"===t.civic.govern.type&&t.civic.taxes.tax_rate>=20&&(e-=.5);let a=me("tax_cap",!1);if(t.city.morale.current<100&&t.civic.taxes.tax_rate>("oligarchy"===t.civic.govern.type?45:25))for(;t.city.morale.current<100&&t.civic.taxes.tax_rate>("oligarchy"===t.civic.govern.type?45:25);)me("adj_tax","sub");else t.city.morale.potential>=t.city.morale.cap+e&&t.civic.taxes.tax_ratet.race.governor.config.tax.min&&me("adj_tax","sub")}}},storage:{name:z("gov_task_storage"),req:()=>!!(ls("storage_yard")&&t.tech.container&&t.resource.Crates.display),task(){if($(this)[0].req()){if(t.resource.Crates.amountr&&Mr("crate",Math.floor((t.resource[e].amount-r)/a))}if(ls("warehouse")&&t.resource.Containers.display&&t.resource.Containers.amounta&&Mr("container",Math.floor((t.resource.Steel.amount-a)/e))}}}},bal_storage:{name:z("gov_task_bal_storage"),req:()=>!!(ls("storage_yard")&&t.tech.container&&t.resource.Crates.display),task(){if($(this)[0].req()){let e=t.resource.Crates.amount,a=e,r=t.resource.Containers.amount,s=r,i=0,c=Object.keys(t.resource).slice().reverse();c.forEach((function(a){t.resource[a].display&&t.resource[a].stackable?(e+=t.resource[a].crates,r+=t.resource[a].containers,i++):(t.resource[a].crates=0,t.resource[a].containers=0)}));let o=Math.floor(e/i),n=Math.floor(r/i),l={Food:{m:.1,cap:100},Coal:{m:.25}};t.race.artifical&&delete l.Food,Object.keys(t.race.governor.config.bal_storage).forEach((function(e){let a=Number(t.race.governor.config.bal_storage[e]);"Coal"===e?l[e]={m:.125*a}:"Food"===e?l[e]={m:.05*a,cap:50*a}:t.resource[e]&&(l[e]={m:a})})),Object.keys(l).forEach((function(a){if(t.resource[a].display)if(l[a].hasOwnProperty("cap")){i--;{let r=Math.floor(o*l[a].m);l[a].hasOwnProperty("cap")&&r>l[a].cap&&(r=l[a].cap),t.resource[a].crates=r,e-=r}if(t.resource.Containers.display){let e=Math.floor(n*l[a].m);l[a].hasOwnProperty("cap")&&e>l[a].cap&&(e=l[a].cap),t.resource[a].containers=e,r-=e}}else i+=l[a].m-1})),o=0!==i?Math.floor(e/i):0,n=0!==i?Math.floor(r/i):0,e-=Math.floor(o*i),r-=Math.floor(n*i),c.forEach((function(a){if((!l[a]||!l[a].hasOwnProperty("cap"))&&(!t.race.artifical||"Food"!==a)&&t.resource[a].display&&t.resource[a].stackable){let s=l[a]?l[a].m:1,i=Math.floor(o>0?o*s:0);if(t.resource[a].crates=i,t.resource.Containers.display){let e=Math.floor(n>0?n*s:0);t.resource[a].containers=e}if(e>0&&s>=1){let r=Math.ceil(s/2);e0&&s>=1){let e=Math.ceil(s/2);r0&&(e>0||r>0);)u--,c.forEach((function(a){l[a]&&l[a].hasOwnProperty("cap")||t.race.artifical&&"Food"===a||t.resource[a].display&&t.resource[a].stackable&&(e>0&&(t.resource[a].crates++,e--),r>0&&(t.resource[a].containers++,r--))}));t.resource.Crates.amount=e,t.resource.Containers.amount=r,i&&(t.resource.Crates.max-=a,t.resource.Containers.max-=s)}}},assemble:{name:z("gov_task_assemble"),req:()=>!(!t.race.artifical||t.tech.focus_cure&&!(t.tech.focus_cure<7)),task(){$(this)[0].req()&&t.resource[t.race.species].max>t.resource[t.race.species].amount&&Zr.city.assembly.action()}},clone:{name:z("gov_task_clone"),req:()=>!!t.tech.cloning,task(){$(this)[0].req()&&t.resource[t.race.species].max>t.resource[t.race.species].amount&&Zr.tauceti.tau_home.cloning_facility.action()}},merc:{name:z("gov_task_merc"),req:()=>!(!ls("garrison")||!t.tech.mercs),task(){if($(this)[0].req()){let e=t.resource.Money.max*(t.race.governor.config.merc.reserve/100);for(;t.civic.garrison.max>t.civic.garrison.workers+t.race.governor.config.merc.buffer&&t.resource.Money.amount>=me("m_cost")&&(t.resource.Money.amount+t.resource.Money.diff>=e||t.resource.Money.diff>=me("m_cost"));)me("m_buy")}}},spy:{name:z("gov_task_spy"),req:()=>!(t.tech.isolation||(!t.race.truepath||!t.tech.spy)&&(!t.tech.spy||t.tech.world_control||t.race.cataclysm)),task(){if($(this)[0].req()){let e=t.resource.Money.max*(t.race.governor.config.spy.reserve/100),a=t.race.truepath&&t.tech.rival?4:3;for(let r=t.tech.world_control?3:0;r=a&&(t.resource.Money.diff>=a||t.resource.Money.amount+t.resource.Money.diff>=e)&&me("t_spy",r)}}}},spyop:{name:z("gov_task_spyop"),req:()=>!(t.tech.isolation||!(t.race.truepath&&t.tech.spy&&t.tech.spy>=2)&&(!(t.tech.spy&&t.tech.spy>=2)||t.tech.world_control||t.race.cataclysm)),task(){if($(this)[0].req()){let e=t.race.truepath&&t.tech.rival?[0,1,2,3]:[0,1,2];t.tech.world_control&&(e=[3]),e.forEach((function(e){0===t.civic.foreign[`gov${e}`].sab&&t.civic.foreign[`gov${e}`].spy>0&&!t.civic.foreign[`gov${e}`].anx&&!t.civic.foreign[`gov${e}`].buy&&!t.civic.foreign[`gov${e}`].occ&&t.race.governor.config.spyop[`gov${e}`].every((function(a){switch(a){case"influence":if(t.civic.foreign[`gov${e}`].hstl>0&&t.civic.foreign[`gov${e}`].spy>1)return me("s_influence",e),!1;break;case"sabotage":if(t.civic.foreign[`gov${e}`].mil>50)return me("s_sabotage",e),!1;break;case"incite":if(t.civic.foreign[`gov${e}`].unrest<100&&t.civic.foreign[`gov${e}`].spy>2&&e<3)return me("s_incite",e),!1}return!0}))}))}}},slave:{name:z("gov_task_slave"),req:()=>!(t.race.orbit_decayed||!ls("slave_market")||!t.race.slaver||!t.city.slave_pen),task(){let e=t.resource.Money.max*(t.race.governor.config.slave.reserve/100),a=25e3;t.race.inflation&&(a*=1+t.race.inflation/100);let r=D("extravagant",0);r&&(a*=1+r/100),$(this)[0].req()&&t.resource.Money.amount>=a&&(t.resource.Money.diff>=a||t.resource.Money.amount+t.resource.Money.diff>=e)&&4*t.city.slave_pen.count>t.city.slave_pen.slaves&&Zr.city.slave_market.action()}},sacrifice:{name:z("gov_task_sacrifice"),req:()=>!!(ls("s_alter")&&t.city.hasOwnProperty("s_alter")&&t.city.s_alter.count>=1),task(){$(this)[0].req()&&t.resource[t.race.species].amount===t.resource[t.race.species].max&&(!t.race.kindling_kindred&&!t.race.smoldering&&t.city.s_alter.harvest<=1e4||t.city.s_alter.mind<=1e4||t.city.s_alter.mine<=1e4||t.city.s_alter.rage<=1e4||t.city.s_alter.regen<=1e4)&&Zr.city.s_alter.action()}},horseshoe:{name:()=>z(`city_${Gc(!0)}`,[Gc(!1)]),req:()=>!!t.race.hooved,task(){let e=Zr.city.horseshoe.cost;if($(this)[0].req()&&js(e)){e=fc(Zr.city.horseshoe);let a="Copper",r=10;Object.keys(e).forEach((function(t){e[t]()>0&&(a=t,r=e[t]())})),t.resource[a].amount>r&&(t.resource[a].diff>=r||t.resource[a].amount+t.resource[a].diff>=t.resource[a].max)&&Zr.city.horseshoe.action()}}},trash:{name:z("gov_task_trash"),req:()=>!!(t.interstellar.mass_ejector&&t.interstellar.mass_ejector.count>=1),task(){let e=function(e){return"magic"===t.race.universe?Ja[e]:["Elerium","Infernite"].includes(e)?10*Ja[e]:Ja[e]},a=1e3*i.mass_ejector;Object.keys(Ja).sort(((t,a)=>e(t)0&&(i=0),t.race.governor.config.trash[e]||t.interstellar.mass_ejector.hasOwnProperty(e)&&t.resource[e].display&&t.resource[e].max>0&&t.interstellar.mass_ejector[e]+t.resource[e].diff>0&&t.resource[e].amount+s-i>=.999*t.resource[e].max-1){let r=t.resource[e].amount+s-i>=.999*t.resource[e].max-1||t.race.governor.config.trash[e]&&!t.race.governor.config.trash[e].s?Math.floor(t.interstellar.mass_ejector[e]+t.resource[e].diff):0;t.race.governor.config.trash[e]&&r=.999*t.resource[e].max-1?r:r-Math.abs(t.race.governor.config.trash[e].v)),r>a&&(r=a),r<0&&(r=0),t.race.artifical&&"Food"===e&&(r=0),t.interstellar.mass_ejector[e]=r,a-=r}else t.interstellar.mass_ejector[e]=0})),t.interstellar.mass_ejector.total=1e3*i.mass_ejector-a}},mech:{name:z("gov_task_mech"),req:()=>!!(t.stats.achieve.hasOwnProperty("corrupted")&&t.stats.achieve.corrupted.l>0&&("prtl_spire","mechbay",Rt(ga,"prtl_spire","mechbay"))&&t.portal.hasOwnProperty("mechbay")),task(){if($(this)[0].req()){let e="large",a=Sa(e,!1),r=a.c,s=a.s,i=za(e),c={type:{}};["small","medium","large","titan","collector"].forEach((function(e){c.type[e]=0,c[e]={chassis:{},weapon:{},equip:{}},["hover","spider","wheel","tread","biped","quad"].forEach((function(t){c[e].chassis[t]=0})),["plasma","laser","kinetic","shotgun","missile","flame","sonic","tesla"].map((e=>({sort:Math.random(),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)).forEach((function(t){c[e].weapon[t]=0})),["shields","flare","seals","grapple","sonar","ablative","radiator","infrared","coolant","stabilizer"].forEach((function(t){c[e].equip[t]=0}))})),t.portal.mechbay.mechs.forEach((function(e){c.type[e.size]++,c[e.size].chassis[e.chassis]++,e.hardpoint.forEach((function(t){c[e.size].weapon[t]++})),e.equip.forEach((function(t){c[e.size].equip[t]++}))})),c.type.large>=6&&c.type.small<12||c.type.large>=12&&c.type.titan>=2&&c.type.small<24?(e="small",a=Sa(e,!1),r=a.c,s=a.s,i=za(e)):c.type.large>=6&&c.type.medium<12?(e="medium",a=Sa(e,!1),r=a.c,s=a.s,i=za(e)):c.type.large>=12&&c.type.titan<2&&(a=Sa("titan",!1),a.c<=t.portal.purifier.sup_max&&(e="titan",r=a.c,s=a.s,i=za(e)));let o=t.portal.mechbay.max-t.portal.mechbay.bay;if(o=3){if(t.queue.queue.some((e=>["portal-purifier","portal-port","portal-base_camp","portal-mechbay","portal-waygate"].includes(e.id))))return;for(let i=0;it.portal.purifier.sup_max&&(l=t.portal.purifier.sup_max),l>=r&&t.resource.Soul_Gem.amount+n>=s){if(t.resource.Soul_Gem.amount+=n,t.resource.Soul_Gem.amount-=s,t.portal.purifier.supply=l,t.portal.purifier.supply-=r,t.portal.mechbay.mechs[i].infernal=!0,"small"===o.size&&0===o.equip.length)t.portal.mechbay.mechs[i].equip.push("special");else if("medium"===o.size&&1===o.equip.length||"large"===o.size&&2===o.equip.length||"titan"===o.size&&o.equip.length<5){let a="???";Object.keys(c[e].equip).forEach((function(t){("???"===a||c[e].equip[t]=r&&o>=i&&t.resource.Soul_Gem.amount>=s){let a=99,o="hover";Object.keys(c[e].chassis).forEach((function(t){c[e].chassis[t]!(!t.tech.replicator||!t.race.replicator),task(){if(t.race.governor.config.replicate.pow.on){let e=t.race.governor.config.replicate.pow.cap,a=t.race.governor.config.replicate.pow.buffer;if(t.city.power0){let e=t.city.power<0?Math.abs(t.city.power)+a:a-t.city.power;t.race.replicator.pow-=e,t.race.replicator.pow<0&&(t.race.replicator.pow=0)}else t.city.power>a&&t.race.replicator.powe&&(t.race.replicator.pow=e)):t.race.replicator.pow>e&&(t.race.replicator.pow=e);t.race.replicator.pow=Math.floor(t.race.replicator.pow)}let e=!1;for(let a=0;t.race.governor.config.replicate.res.que&&at.resource[e].display)),t.race.governor.config.replicate.res.neg&&t.resource[a[0]].diff<0&&(t.resource[a[0]].amount<=.95*t.resource[a[0]].max||-1===t.resource[a[0]].max))t.race.replicator.res=a[0];else if(-1!==t.resource[t.race.replicator.res].max&&t.race.governor.config.replicate.res.cap&&t.resource[t.race.replicator.res].amount>=t.resource[t.race.replicator.res].max){let r=a.filter((e=>t.resource[e].max>0));for(let a=0;a-1===t.resource[e].max));e.length>0&&(t.race.replicator.res=e[0])}}}}}};function R(){switch(t.city.calendar.moon){case 0:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-1"):$("#moon").removeClass("wi-moon-waning-crescent-6"),$("#moon").addClass("wi-moon-new");break;case 1:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-2"):$("#moon").removeClass("wi-moon-new"),$("#moon").addClass("wi-moon-waxing-crescent-1");break;case 2:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-3"):$("#moon").removeClass("wi-moon-waxing-crescent-1"),$("#moon").addClass("wi-moon-waxing-crescent-2");break;case 3:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-4"):$("#moon").removeClass("wi-moon-waxing-crescent-2"),$("#moon").addClass("wi-moon-waxing-crescent-3");break;case 4:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-5"):$("#moon").removeClass("wi-moon-waxing-crescent-3"),$("#moon").addClass("wi-moon-waxing-crescent-4");break;case 5:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-6"):$("#moon").removeClass("wi-moon-waxing-crescent-4"),$("#moon").addClass("wi-moon-waxing-crescent-5");break;case 6:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-first-quarter"):$("#moon").removeClass("wi-moon-waxing-crescent-5"),$("#moon").addClass("wi-moon-waxing-crescent-6");break;case 7:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-1"):$("#moon").removeClass("wi-moon-waxing-crescent-6"),$("#moon").addClass("wi-moon-first-quarter");break;case 8:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-2"):$("#moon").removeClass("wi-moon-first-quarter"),$("#moon").addClass("wi-moon-waxing-gibbous-1");break;case 9:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-3"):$("#moon").removeClass("wi-moon-waxing-gibbous-1"),$("#moon").addClass("wi-moon-waxing-gibbous-2");break;case 10:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-4"):$("#moon").removeClass("wi-moon-waxing-gibbous-2"),$("#moon").addClass("wi-moon-waxing-gibbous-3");break;case 11:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-5"):$("#moon").removeClass("wi-moon-waxing-gibbous-3"),$("#moon").addClass("wi-moon-waxing-gibbous-4");break;case 12:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-6"):$("#moon").removeClass("wi-moon-waxing-gibbous-4"),$("#moon").addClass("wi-moon-waxing-gibbous-5");break;case 13:sc($("#moon")),t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-full"):$("#moon").removeClass("wi-moon-waxing-gibbous-5"),$("#moon").addClass("wi-moon-waxing-gibbous-6");break;case 14:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-1"):$("#moon").removeClass("wi-moon-waxing-gibbous-6");let e=xc(2);e.length>0?$("#moon").append(e):$("#moon").addClass("wi-moon-full");break;case 15:sc($("#moon")),t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-2"):$("#moon").removeClass("wi-moon-full"),$("#moon").addClass("wi-moon-waning-gibbous-1");break;case 16:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-3"):$("#moon").removeClass("wi-moon-waning-gibbous-1"),$("#moon").addClass("wi-moon-waning-gibbous-2");break;case 17:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-4"):$("#moon").removeClass("wi-moon-waning-gibbous-2"),$("#moon").addClass("wi-moon-waning-gibbous-3");break;case 18:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-5"):$("#moon").removeClass("wi-moon-waning-gibbous-3"),$("#moon").addClass("wi-moon-waning-gibbous-4");break;case 19:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-6"):$("#moon").removeClass("wi-moon-waning-gibbous-4"),$("#moon").addClass("wi-moon-waning-gibbous-5");break;case 20:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-third-quarter"):$("#moon").removeClass("wi-moon-waning-gibbous-5"),$("#moon").addClass("wi-moon-waning-gibbous-6");break;case 21:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-1"):$("#moon").removeClass("wi-moon-waning-gibbous-6"),$("#moon").addClass("wi-moon-third-quarter");break;case 22:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-2"):$("#moon").removeClass("wi-moon-third-quarter"),$("#moon").addClass("wi-moon-waning-crescent-1");break;case 23:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-3"):$("#moon").removeClass("wi-moon-waning-crescent-1"),$("#moon").addClass("wi-moon-waning-crescent-2");break;case 24:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-4"):$("#moon").removeClass("wi-moon-waning-crescent-2"),$("#moon").addClass("wi-moon-waning-crescent-3");break;case 25:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-5"):$("#moon").removeClass("wi-moon-waning-crescent-3"),$("#moon").addClass("wi-moon-waning-crescent-4");break;case 26:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-6"):$("#moon").removeClass("wi-moon-waning-crescent-4"),$("#moon").addClass("wi-moon-waning-crescent-5");break;case 27:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-new"):$("#moon").removeClass("wi-moon-waning-crescent-5"),$("#moon").addClass("wi-moon-waning-crescent-6")}let e;$("#temp").removeClass("wi-thermometer"),$("#temp").removeClass("wi-thermometer-exterior"),0===t.city.calendar.temp?$("#temp").addClass("wi-thermometer-exterior"):2===t.city.calendar.temp&&$("#temp").addClass("wi-thermometer"),$("#weather").removeClass("wi-day-sunny"),$("#weather").removeClass("wi-day-windy"),$("#weather").removeClass("wi-cloud"),$("#weather").removeClass("wi-cloudy-gusts"),$("#weather").removeClass("wi-rain"),$("#weather").removeClass("wi-storm-showers"),$("#weather").removeClass("wi-snow"),$("#weather").removeClass("wi-snow-wind"),0===t.city.calendar.weather?e=0===t.city.calendar.temp?0===t.city.calendar.wind?"wi-snow":"wi-snow-wind":0===t.city.calendar.wind?"wi-rain":"wi-storm-showers":1===t.city.calendar.weather?e=0===t.city.calendar.wind?"wi-cloud":"wi-cloudy-gusts":2===t.city.calendar.weather&&(e=0===t.city.calendar.wind?"wi-day-sunny":"wi-day-windy"),$("#weather").addClass(e)}function H(e){switch(e){case"moon":return t.race.orbit_decayed?z("moon0"):0===t.city.calendar.moon?z("moon1"):t.city.calendar.moon>0&&t.city.calendar.moon<7?z("moon2"):7===t.city.calendar.moon?z("moon3"):t.city.calendar.moon>7&&t.city.calendar.moon<14?z("moon4"):14===t.city.calendar.moon?z("moon5"):t.city.calendar.moon>14&&t.city.calendar.moon<21?z("moon6"):21===t.city.calendar.moon?z("moon7"):t.city.calendar.moon>21?z("moon8"):void 0;case"weather":return function(){switch(t.city.calendar.weather){case 0:return 0===t.city.calendar.temp?1===t.city.calendar.wind?z("snowstorm"):z("snow"):1===t.city.calendar.wind?z("thunderstorm"):z("rain");case 1:return 1===t.city.calendar.wind?z("cloudy_windy"):z("cloudy");case 2:return 1===t.city.calendar.wind?z("sunny_windy"):z("sunny")}}();case"temp":return function(){switch(t.city.calendar.temp){case 0:return z("cold");case 1:return z("moderate");case 2:return z("hot")}}();case"sign":return function(){let e=W(),t=`
    ${z("sign_description",[z(`sign_${e}`),z(`sign_${e}_desc`)])}
    `;return t+=`
    ${function(e){return"pisces"===e||"cancer"===e?z(`sign_${e}_effect`):z(`sign_${e}_effect`,[U(e)[0]])}(e)}
    `,t}();case"astrology":return z(`sign_${W()}_symbol`)}}function U(e){switch(e){case"aries":case"capricorn":return[10];case"taurus":return[2];case"gemini":case"aquarius":return[20];case"cancer":case"sagittarius":return[5];case"leo":return[4];case"virgo":return[15];case"libra":return[25];case"scorpio":return[12,1];case"pisces":return[49,25]}}function W(){const e=new Date;return 0===e.getMonth()&&e.getDate()>=20||1===e.getMonth()&&e.getDate()<=18?"aquarius":1===e.getMonth()&&e.getDate()>=19||2===e.getMonth()&&e.getDate()<=20?"pisces":2===e.getMonth()&&e.getDate()>=21||3===e.getMonth()&&e.getDate()<=19?"aries":3===e.getMonth()&&e.getDate()>=20||4===e.getMonth()&&e.getDate()<=20?"taurus":4===e.getMonth()&&e.getDate()>=21||5===e.getMonth()&&e.getDate()<=21?"gemini":5===e.getMonth()&&e.getDate()>=22||6===e.getMonth()&&e.getDate()<=22?"cancer":6===e.getMonth()&&e.getDate()>=23||7===e.getMonth()&&e.getDate()<=22?"leo":7===e.getMonth()&&e.getDate()>=23||8===e.getMonth()&&e.getDate()<=22?"virgo":8===e.getMonth()&&e.getDate()>=23||9===e.getMonth()&&e.getDate()<=22?"libra":9===e.getMonth()&&e.getDate()>=23||10===e.getMonth()&&e.getDate()<=22?"scorpio":10===e.getMonth()&&e.getDate()>=23||11===e.getMonth()&&e.getDate()<=21?"sagittarius":11===e.getMonth()&&e.getDate()>=22||0===e.getMonth()&&e.getDate()<=19?"capricorn":"time itself is broken"}function Q(){P.w&&P.w.terminate(),C(),Vi("reset",{end:"descension"}),eo("squished",!0),eo(`extinct_${t.race.species}`),t.race.witch_hunter&&"magic"===t.race.universe?eo("nightmare"):eo("corrupted"),"angelic"===_i[t.race.species].type&&to("twisted"),t.race.junker&&"junker"===t.race.species&&to("the_misery"),!t.race.modified&&t.race.junker&&"junker"===t.race.species&&to("garbage_pie"),t.race.cataclysm&&to("finish_line"),t.race.ooze&&"sludge"===t.race.species&&to("slime_lord");let a=gc("descend");t.prestige.Artifact.count+=a.artifact,t.stats.artifact+=a.artifact;let r=Xc();t.stats.spire.hasOwnProperty(r)&&(t.stats.spire[r].hasOwnProperty("lord")?t.stats.spire[r].lord++:t.stats.spire[r].lord=1,t.tech.dl_reset?t.stats.spire[r].dlstr=0:t.stats.spire[r].hasOwnProperty("dlstr")?t.stats.spire[r].dlstr++:t.stats.spire[r].dlstr=1);let s=t.race.species,i=t.race.gods,c=t.city.calendar.orbit,o=t.city.biome,n=t.city.ptrait,l=t.city.geology;t.stats.descend++,zc(),io();let u=!!t.race.hasOwnProperty("srace")&&t.race.srace;t.race={species:"protoplasm",gods:s,old_gods:i,universe:t.race.universe,seeded:!1,seed:Math.floor(g(1e4)),corruption:5,ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended},u&&(t.race.srace=u),Z({orbit:c,biome:o,ptrait:n,geology:l}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}function Z(e){t.city={calendar:{day:0,year:0,weather:2,temp:1,moon:0,wind:0,orbit:e.orbit},biome:e.biome,ptrait:e.ptrait},e.geology&&(t.city.geology=e.geology),t.tech={theology:1},S(),t.new=!0,t.seed=Math.rand(0,1e4)}function V(){let e=Xc();t.race.womling_friend?("m"!==e&&t.stats.womling.friend.l++,"l"!==e&&(t.stats.womling.friend.hasOwnProperty(e)||(t.stats.womling.friend[e]=0),t.stats.womling.friend[e]++)):t.race.womling_lord?("m"!==e&&t.stats.womling.lord.l++,"l"!==e&&(t.stats.womling.lord.hasOwnProperty(e)||(t.stats.womling.lord[e]=0),t.stats.womling.lord[e]++)):t.race.womling_god&&("m"!==e&&t.stats.womling.god.l++,"l"!==e&&(t.stats.womling.god.hasOwnProperty(e)||(t.stats.womling.god[e]=0),t.stats.womling.god[e]++)),t.stats.womling.friend.l>0&&t.stats.womling.lord.l>0&&t.stats.womling.god.l>0&&eo("overlord","m"===e,so(),"l"),t.stats.womling.friend[e]>0&&t.stats.womling.lord[e]>0&&t.stats.womling.god[e]>0&&eo("overlord","m"===e,so(),e)}function J(e){if(t.civic.taxes||(t.civic.taxes={tax_rate:20,display:!1}),!e&&(t.settings.tabLoad||2===t.settings.civTabs&&0===t.settings.govTabs)){var a=$('
    '),r=$(`\n \n \n \n \n \n \n `);a.append(r),$("#r_civics").append(a),ic({el:"#government .govTabs2",data:{t:t.civic.taxes,s:t.settings},methods:{vis:()=>!!t.tech.govern}}),function(e){var a=$('
    ');e.append(a);var r=$(`
    ${z("civics_government_type")} {{ type | govern }}
    `);a.append(r);var s=$("
    ");a.append(s);var i=$('');s.append(i);var c={template:''};ic({el:"#govType",data:t.civic.govern,filters:{govern:e=>z(`govern_${e}`),set:e=>z("anarchy"===e?"civics_set_gov":"civics_revolution")},methods:{trigModal(){this.$buefy.modal.open({parent:this,component:c});var e=setInterval((function(){$("#modalBox").length>0&&(clearInterval(e),function(){$("#modalBox").append($(`

    ${z("civics_government_type")}

    `));let e=xc(6,10);e.length>0&&$("#modalBoxTitle").append(e);let a=qc(6,14,!1);a.length>0&&$("#modalBoxTitle").append(a);var r=$('
    ');$("#modalBox").append(r),t.tech.govern&&("autocracy"!==t.civic.govern.type&&r.append($(``)),"democracy"!==t.civic.govern.type&&r.append($(``)),"oligarchy"!==t.civic.govern.type&&r.append($(``)),t.tech.gov_theo&&"theocracy"!==t.civic.govern.type&&r.append($(``)),t.tech.govern>=2&&"republic"!==t.civic.govern.type&&r.append($(``)),t.tech.gov_soc&&"socialist"!==t.civic.govern.type&&r.append($(``)),t.tech.gov_corp&&"corpocracy"!==t.civic.govern.type&&r.append($(``)),t.tech.govern>=3&&"technocracy"!==t.civic.govern.type&&r.append($(``)),t.tech.gov_fed&&"federation"!==t.civic.govern.type&&r.append($(``)),t.tech.gov_mage&&"magocracy"!==t.civic.govern.type&&r.append($(``))),ic({el:"#govModal",data:t.civic.govern,methods:{setGov(e){if(0===t.civic.govern.rev){let a=t.genes.governor&&"anarchy"===t.civic.govern.type;t.civic.govern.type=e;let r=1e3;t.tech.high_tech&&(r+=250,t.tech.high_tech>=3&&(r+=250),t.tech.high_tech>=6&&(r+=250)),t.tech.space_explore&&t.tech.space_explore>=3&&(r+=250),t.race.unorganized&&(r=Math.round(r*(1+di.unorganized.vars()[0]/100))),t.stats.achieve.anarchist&&(r=Math.round(r*(1-t.stats.achieve.anarchist.l/10))),t.race.lawless&&(r=Math.round(r/(100-di.lawless.vars()[0])));let s=Oi("tuskin");s>0&&(r=Math.round(r/(100-di.lawless.vars(1)[0]*s)));let i=D("aristocrat",0);i&&(r=Math.round(r*(1-i/100))),t.civic.govern.rev=r+t.civic.govern.fr,a&&gs(),ic({el:"#govModal"},"destroy"),$(".modal-background").click(),Ii()}}}}),Ei("GovPop",(function(e){let a=$(e.this).data("gov"),r=t.tech.unify&&t.tech.unify>=2&&"federation"===a?"federation_alt":a;return"theocracy"===r&&t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display&&(r="theocracy_alt"),$(`
    ${se(a)}
    ${ae()[r]}
    `)}),{elm:"#govModal button",self:!0,classes:"has-background-light has-text-dark"})}())}),50)},startrev(){t.civic.govern.fr=t.civic.govern.rev,t.civic.govern.rev=0},force:()=>t.civic.govern.rev>0?z("civics_force_rev_desc"):z("civics_force_rev_desc2"),vis:()=>!!t.tech.govern}}),Ei("govLabel",(function(){let e=t.tech.unify&&t.tech.unify>=2&&"federation"===t.civic.govern.type?"federation_alt":t.civic.govern.type;return"theocracy"===e&&t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display&&(e="theocracy_alt"),$(`
    ${se(t.civic.govern.type)}
    ${ae()[e]}
    `)})),Ei("govTypeChange",(function(){return t.civic.govern.rev>0?z("civics_change_desc",[t.civic.govern.rev]):z("civics_change_desc2")}),{elm:"#govType .change"})}($("#r_govern0")),function(e){var a=$('
    ');e.append(a);var r=$(`

    ${z("civics_tax_rates")}

    `);a.append(r);var s=$(''),i=$('«'),c=$('»');a.append(i),a.append(s),a.append(c),ic({el:"#tax_rates",data:t.civic.taxes,filters:{tax_level(e){let a=xc(11,14),r=qc(2,14,!1);return a.length>0&&(0===e&&!t.race.noble||10===e&&t.race.noble)?a:13===e&&r.length>0?r:`${e}%`}},methods:{add(){he("add")},sub(){he("sub")}}}),Ei("taxRateLabel",(function(){return z("civics_tax_rates_desc")}),{classes:"has-background-light has-text-dark"})}($("#r_govern0"));var s=$('
    ');$("#r_govern0").append(s),L()}}function Y(){if(X(),t.settings.tabLoad||2===t.settings.civTabs&&3===t.settings.govTabs){var a=$('
    ');$("#military").append(a),$("#military").append($('
    ')),ve(a,!0),function(){if(t.race.sludge)return!1;if(0===$("#mad").length){let s="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name");var a=$('
    ');$("#military").append(a);var r=$('
    ');a.append(r),r.append($(`
    ${z("civics_mad_reset_desc",[s])}
    `));let i=!(!t.race.hrt||!["wolven","vulpine"].includes(t.race.hrt));r.append($(`
    `)),r.append($(`
    `)),t.civic.mad.armed||($("#mad").addClass("armed"),$("#mad .arm").html(z(i?"civics_mad_disarm_grenades":"civics_mad_disarm_missiles"))),ic({el:"#mad",data:t.civic.mad,methods:{launch(){if(!t.civic.mad.armed&&!t.race.cataclysm){$("body").addClass("nuke");let a=$('
    ');$("body").append(a),setTimeout((function(){a.addClass("burn")}),500),setTimeout((function(){a.addClass("b")}),600),setTimeout((function(){!function(){if(!t.civic.mad.armed&&!t.race.cataclysm){t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),C(),Vi("reset",{end:"mad"});let a=t.race.species,r=t.race.gods,s=t.city.calendar.orbit,i=t.city.biome,c=t.city.ptrait,o=t.city.geology,n=gc("mad");t.stats.mad++,zc(),"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=n.plasmid,t.stats.antiplasmid+=n.plasmid):(t.prestige.Plasmid.count+=n.plasmid,t.stats.plasmid+=n.plasmid),eo("apocalypse"),eo("squished",!0),eo(`extinct_${a}`),"anarchy"===t.civic.govern.type&&eo("anarchist"),"hellscape"===t.city.biome&&"demonic"!==_i[t.race.species].type&&to("take_no_advice"),t.race.truepath&&eo("ashanddust"),io();let l=!!t.race.hasOwnProperty("srace")&&t.race.srace,u=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0;t.race={species:"protoplasm",gods:a,old_gods:r,rapid_mutation:1,ancient_ruins:1,universe:t.race.universe,seeded:!1,ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended},u>0&&(t.race.corruption=u),l&&(t.race.srace=l),Z({orbit:s,biome:i,ptrait:c,geology:o}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}}()}),4e3)}},arm(){t.civic.mad.armed?($("#mad .arm").html(z(i?"civics_mad_disarm_grenades":"civics_mad_disarm_missiles")),t.civic.mad.armed=!1,$("#mad").addClass("armed")):($("#mad .arm").html(z(i?"civics_mad_arm_grenades":"civics_mad_arm_missiles")),t.civic.mad.armed=!0,$("#mad").removeClass("armed"))}}}),["mdarm","mdlaunch"].forEach((function(e){Ei(`mad${e}`,(function(){return"{{ label() }}"}),{elm:`#mad .${e}`,in:function(a){ic({el:`#${a.id} > span`,data:{test:"val"},methods:{label(){switch(e){case"mdarm":return t.tech.world_control&&!t.race.truepath?z("civics_mad_missiles_world_control_desc"):z(i?"civics_mad_missiles_desc_easter":"civics_mad_missiles_desc");case"mdlaunch":{let e=gc("mad"),a="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name");return z("civics_mad_missiles_warning",[e.plasmid,a])}}}}})},out:function(e){ic({el:`#${e.id} > span`},"destroy")}})}))}}()}}function X(){t.civic.garrison||(t.civic.garrison={display:!1,disabled:!1,rate:0,progress:0,tactic:0,workers:0,wounded:0,raid:0,max:0}),t.civic.garrison.mercs||(t.civic.garrison.mercs=!1),t.civic.garrison.fatigue||(t.civic.garrison.fatigue=0),t.civic.garrison.protest||(t.civic.garrison.protest=0),t.civic.garrison.m_use||(t.civic.garrison.m_use=0),t.civic.garrison.crew||(t.civic.garrison.crew=0),t.civic.mad||(t.civic.mad={display:!1,armed:!0})}function ee(e){if(t.race.truepath){if(t.civic.foreign[`gov${e}`].hstl<10)return 1+(10-t.civic.foreign[`gov${e}`].hstl)/40;if(t.civic.foreign[`gov${e}`].hstl>60)return 1-(-60+t.civic.foreign[`gov${e}`].hstl)/160}return 1}function te(e){if(void 0===t.civic.foreign[`gov${e}`].name){let a=Yi();t.civic.foreign[`gov${e}`].name={s0:a.s0,s1:a.s1}}return z(`civics_gov${t.civic.foreign[`gov${e}`].name.s0}`,[t.civic.foreign[`gov${e}`].name.s1])}const ae=function(){return{anarchy:z("govern_anarchy_effect"),autocracy:z("govern_autocracy_effect",re.autocracy()),democracy:z("govern_democracy_effect",re.democracy()),oligarchy:t.tech.high_tech&&t.tech.high_tech>=12?z("govern_oligarchy_effect_alt",[re.oligarchy()[1]]):z("govern_oligarchy_effect",[re.oligarchy()[0],re.oligarchy()[1]]),theocracy:z("govern_theocracy_effect",re.theocracy()),theocracy_alt:z("govern_theocracy_effect_alt",re.theocracy()),republic:z("govern_republic_effect",re.republic()),socialist:z("govern_socialist_effect",re.socialist()),corpocracy:z("govern_corpocracy_effect",re.corpocracy()),technocracy:t.tech.high_tech&&t.tech.high_tech>=16?z("govern_technocracy_effect_alt",[re.technocracy()[0],re.technocracy()[2]]):z("govern_technocracy_effect",re.technocracy()),federation:z("govern_federation_effect",[re.federation()[0],re.federation()[1]]),federation_alt:z("govern_federation_effect_alt",[25,re.federation()[2],re.federation()[1]]),magocracy:z("govern_magocracy_effect",re.magocracy())}},re={autocracy:()=>[t.tech.high_tech&&t.tech.high_tech>=2?t.tech.high_tech>=12?10:18:25,D("organizer",0)?40:35],democracy:()=>[t.tech.high_tech&&t.tech.high_tech>=2?t.tech.high_tech>=12?30:25:20,D("organizer",0)?1:5],oligarchy:()=>[t.tech.high_tech&&t.tech.high_tech>=12?0:t.tech.high_tech&&t.tech.high_tech>=2?2:5,D("organizer",0)?25:20],theocracy:()=>[12,D("organizer",0)?10:25,t.tech.high_tech&&t.tech.high_tech>=12?t.tech.high_tech>=16?25:40:50],republic:()=>[D("organizer",0)?30:25,t.tech.high_tech&&t.tech.high_tech>=12?t.tech.high_tech>=16?40:30:20],socialist:()=>[t.tech.high_tech&&t.tech.high_tech>=12?t.tech.high_tech>=16?50:42:35,D("organizer",0)?12:10,10,D("organizer",0)?10:20],corpocracy:()=>[D("organizer",0)?220:200,D("organizer",0)?175:150,D("organizer",0)?110:100,t.tech.high_tech&&t.tech.high_tech>=12?5:10,t.tech.high_tech&&t.tech.high_tech>=16?40:30],technocracy:()=>[8,t.tech.high_tech&&t.tech.high_tech>=16?0:t.tech.high_tech&&t.tech.high_tech>=12?1:2,D("organizer",0)?18:10],federation:()=>[3,D("organizer",0)?12:10,t.tech.high_tech&&t.tech.high_tech>=12?t.tech.high_tech>=16?40:36:32],magocracy:()=>[D("organizer",0)?30:25,t.tech.high_tech&&t.tech.high_tech>=12?t.tech.high_tech>=16?50:40:25]};function se(e){return t.race.witch_hunter&&"magocracy"===e?z("witch_hunter_magocracy"):z(`govern_${e}_desc`)}function ie(){if(0===$("#foreign").length&&!t.race.cataclysm&&(!t.tech.world_control||t.race.truepath)&&!t.tech.isolation){let a=$('
    ');a.append($(`

    ${z("civics_foreign")}

    `)),$("#r_govern0").append(a);var e={template:''};let r=t.race.truepath?5:3;for(let e=0;e{{ '${e}' | gov }} - ${z("civics_garrison_occupy")} - ${z("civics_garrison_annex")} - ${z("civics_garrison_purchase")}
    `);a.append(t);let r=$("
    ");r.append($(``)),r.append($(``)),r.append($(``)),t.append(r),t.append($(`
    ${z("civics_gov_mil_rate")}: {{ f${e}.mil | military(${e}) }} ({{ f${e}.mil }})
    `)),t.append($(`
    ${z("civics_gov_relations")}: {{ f${e}.hstl | relation }} ({{ f${e}.hstl | hate }})
    `)),t.append($(`
    ${z("civics_gov_eco_rate")}: {{ f${e}.eco | eco(${e}) }} ({{ f${e}.eco }})
    `)),t.append($(`
    ${z("civics_gov_unrest")}: {{ f${e}.unrest | discontent(${e}) }} ({{ f${e}.unrest | turmoil }})
    `))}let s={f0:t.civic.foreign.gov0,f1:t.civic.foreign.gov1,f2:t.civic.foreign.gov2,t:t.tech};t.race.truepath&&(s.f3=t.civic.foreign.gov3,s.f4=t.civic.foreign.gov4),ic({el:"#foreign",data:s,filters:{military:(e,a)=>t.civic.foreign[`gov${a}`].spy>=1?z(e<50?"civics_gov_v_weak":e<75?"civics_gov_weak":e>300?"civics_gov_superpower":e>200?"civics_gov_v_strong":e>160?"civics_gov_strong":e>125?"civics_gov_above_average":"civics_gov_average"):"???",relation:e=>z(e>80?"civics_gov_hated":e>60?"civics_gov_hostile":e>40?"civics_gov_poor":e>25?"civics_gov_neutral":e>10?"civics_gov_liked":"civics_gov_good"),eco:(e,a)=>t.civic.foreign[`gov${a}`].spy>=2?z(e<60?"civics_gov_weak":e<80?"civics_gov_recession":e>120?"civics_gov_strong":"civics_gov_average"):"???",discontent:(e,a)=>t.civic.foreign[`gov${a}`].spy>=3?z(e<=0?"civics_gov_none":e<30?"civics_gov_low":e<60?"civics_gov_medium":e<90?"civics_gov_high":"civics_gov_extreme"):"???",gov:e=>te(e),sab:e=>"none"===e?"":z(`civics_spy_${e}`),hate:e=>100-e+"%",turmoil:e=>`${e}%`},methods:{campaign(e){we(e)},battleAssessment:e=>be(e),trigModal(a){this.$buefy.modal.open({parent:this,component:e});var r=setInterval((function(){$("#modalBox").length>0&&(clearInterval(r),function(e){$("#modalBox").append($(`

    ${z("civics_espionage_actions")}

    `));var a=$('
    ');$("#modalBox").append(a),t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${e}`].spy>=1&&(a.append($(``)),a.append($(``)),e<3&&a.append($(``)),e<3&&t.civic.foreign[`gov${e}`].hstl<=50&&t.civic.foreign[`gov${e}`].unrest>=50&&a.append($(``)),e<3&&t.civic.foreign[`gov${e}`].spy>=3&&a.append($(``))),ic({el:"#espModal",data:t.civic.foreign[`gov${e}`],methods:{influence(e){t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${e}`].spy>=1&&(_e("influence",e),ic({el:"#espModal"},"destroy"),$(".modal-background").click(),Ii())},sabotage(e){t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${e}`].spy>=1&&(_e("sabotage",e),ic({el:"#espModal"},"destroy"),$(".modal-background").click(),$("#popGov").hide(),Ii())},incite(e){e>=3||t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${e}`].spy>=1&&(_e("incite",e),ic({el:"#espModal"},"destroy"),$(".modal-background").click(),Ii())},annex(a){if(!(a>=3)&&t.civic.foreign[`gov${e}`].hstl<=50&&t.civic.foreign[`gov${e}`].unrest>=50&&t.city.morale.current>=200+t.civic.foreign[`gov${e}`].hstl-t.civic.foreign[`gov${e}`].unrest&&t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${a}`].spy>=1&&0===t.civic.foreign[`gov${a}`].sab){let e=t.tech.spy>=4?150:300;t.race.befuddle&&(e=Math.round(e*(1-di.befuddle.vars()[0]/100)));let r=Oi("dryad");r>0&&(e=Math.round(e*(1-di.befuddle.vars(1)[0]/100*r))),t.civic.foreign[`gov${a}`].sab=e,t.civic.foreign[`gov${a}`].act="annex",ic({el:"#espModal"},"destroy"),$(".modal-background").click(),Ii()}},purchase(e){if(e>=3)return;let a=ue(e);if(a<=t.resource.Money.amount&&t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${e}`].spy>=3&&0===t.civic.foreign[`gov${e}`].sab){t.resource.Money.amount-=a;let r=t.tech.spy>=4?150:300;t.race.befuddle&&(r=Math.round(r*(1-di.befuddle.vars()[0]/100)));let s=Oi("dryad");s>0&&(r=Math.round(r*(1-di.befuddle.vars(1)[0]/100*s))),t.civic.foreign[`gov${e}`].sab=r,t.civic.foreign[`gov${e}`].act="purchase",ic({el:"#espModal"},"destroy"),$(".modal-background").click(),Ii()}}}}),Ei("GovLabel",(function(a){let r=$(a.this).data("esp"),s="";if("purchase"===r){let t=ue(e).toLocaleString();s=z(`civics_spy_${r}_desc`,[te(e),t])}else if("annex"===r)if(t.city.morale.current>=200+t.civic.foreign[`gov${e}`].hstl-t.civic.foreign[`gov${e}`].unrest)s=z(`civics_spy_${r}_desc`,[te(e)]);else{let a=200+t.civic.foreign[`gov${e}`].hstl-t.civic.foreign[`gov${e}`].unrest;s=z(`civics_spy_${r}_goal`,[te(e),a])}else s=z(`civics_spy_${r}_desc`,[te(e)]);let i="";return("influence"===r&&0===t.civic.foreign[`gov${e}`].hstl||"sabotage"===r&&t.civic.foreign[`gov${e}`].spy>=2&&50===t.civic.foreign[`gov${e}`].mil||"incite"===r&&t.civic.foreign[`gov${e}`].spy>=4&&100===t.civic.foreign[`gov${e}`].unrest)&&(i=`
    ${z("civics_spy_warning")}
    `),$(`${i}
    ${s}
    `)}),{elm:"#espModal button",self:!0,classes:"has-background-light has-text-dark"})}(a))}),50)},spy_disabled:e=>t.civic.foreign[`gov${e}`].trn>0||ne(e)>t.resource.Money.amount,spy(e){le(e)},spyDesc:e=>ce(e),espDesc:()=>oe(),vis:()=>!(!t.civic.garrison.display||t.tech.world_control&&!t.race.truepath||t.race.cataclysm||t.tech.isolation),gvis:e=>!t.tech.isolation&&(e<=2?!t.tech.world_control:3===e&&!!t.tech.rival)}});for(let e=0;e{{ label() }}"}),{elm:`#gov${e} .attack`,in:function(t){ic({el:`#${t.id} > span`,data:{test:"val"},methods:{label:()=>be(e)}})},out:function(e){ic({el:e.id},"destroy")}}),Ei(`gov${e}ts`,(function(){return"{{ label() }}"}),{elm:`#gov${e} .tspy`,in:function(t){ic({el:`#${t.id} > span`,data:{test:"val"},methods:{label:()=>ce(e)}})},out:function(e){ic({el:e.id},"destroy")}}),Ei(`gov${e}s`,(function(){return oe()}),{elm:`#gov${e} .sspy`});t.race.truepath&&Ei("garRivaldesc1",(function(){return z("civics_gov_tp_rival",[te(3),_i[t.race.species].home])}),{elm:"#gov3 > span"})}}function ce(e){return t.civic.foreign[`gov${e}`].trn>0?z("civics_progress"):z("civics_gov_spy_desc",[q(ne(e))])}function oe(){return z("civics_gov_esp_desc")}function ne(e){let a=Math.round(t.civic.foreign[`gov${e}`].mil/2+t.civic.foreign[`gov${e}`].hstl/2-t.civic.foreign[`gov${e}`].unrest)+10;return a<50&&(a=50),t.race.infiltrator&&(a/=3),"scorpio"===W()&&(a*=1-U("scorpio")[0]/100),Math.round(a**(t.civic.foreign[`gov${e}`].spy+1))+500}function le(e){if(t.tech.spy&&0===t.civic.foreign[`gov${e}`].trn){let a=ne(e);if(t.resource.Money.amount>=a){t.resource.Money.amount-=a;let r=300;t.tech.spy>=3&&t.city.boot_camp&&(r-=10*(t.race.orbit_decayed&&t.space.space_barracks?t.space.space_barracks.on:t.city.boot_camp.count),r<10&&(r=10)),t.race.infiltrator&&(r=Math.round(r/2)),t.civic.foreign[`gov${e}`].trn=r}}}function ue(e){let a=15384*t.civic.foreign[`gov${e}`].eco;return a*=1+1.6*t.civic.foreign[`gov${e}`].hstl/100,a*=1-.25*t.civic.foreign[`gov${e}`].unrest/100,+a.toFixed(0)}function de(e){return e?t.tech.world_control||t.civic.foreign[e].occ||t.civic.foreign[e].anx||t.civic.foreign[e].buy:t.civic.foreign.gov0.occ||t.civic.foreign.gov1.occ||t.civic.foreign.gov2.occ||t.civic.foreign.gov0.anx||t.civic.foreign.gov1.anx||t.civic.foreign.gov2.anx||t.civic.foreign.gov0.buy||t.civic.foreign.gov1.buy||t.civic.foreign.gov2.buy}function _e(e,a){switch(e){case"influence":if(t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${a}`].spy>=1&&0===t.civic.foreign[`gov${a}`].sab){let e=t.tech.spy>=4?200:300;t.race.befuddle&&(e=Math.round(e*(1-di.befuddle.vars()[0]/100)));let r=Oi("dryad");r>0&&(e=Math.round(e*(1-di.befuddle.vars(1)[0]/100*r))),t.civic.foreign[`gov${a}`].sab=e,t.civic.foreign[`gov${a}`].act="influence"}break;case"sabotage":if(t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${a}`].spy>=1&&0===t.civic.foreign[`gov${a}`].sab){let e=t.tech.spy>=4?400:600;t.race.befuddle&&(e=Math.round(e*(1-di.befuddle.vars()[0]/100)));let r=Oi("dryad");r>0&&(e=Math.round(e*(1-di.befuddle.vars(1)[0]/100*r))),t.civic.foreign[`gov${a}`].sab=e,t.civic.foreign[`gov${a}`].act="sabotage"}break;case"incite":if(a>=3)break;if(t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${a}`].spy>=1&&0===t.civic.foreign[`gov${a}`].sab){let e=t.tech.spy>=4?600:900;t.race.befuddle&&(e=Math.round(e*(1-di.befuddle.vars()[0]/100)));let r=Oi("dryad");r>0&&(e=Math.round(e*(1-di.befuddle.vars(1)[0]/100*r))),t.civic.foreign[`gov${a}`].sab=e,t.civic.foreign[`gov${a}`].act="incite"}}}function pe(e){let a=!!(t.tech.currency&&t.tech.currency>=5);if(e)return!a&&!t.race.terrifying||t.race.noble?t.race.noble?di.noble.vars()[0]:10:0;{let e=30;t.race.noble?e=di.noble.vars()[1]:(a||t.race.terrifying)&&(e+=20),"oligarchy"===t.civic.govern.type&&(e+=re.oligarchy()[1]);let r=D("aristocrat",1);return r&&(e+=r),e}}function he(e,a){switch(e){case"add":{let e=a||b(),r=pe(!1);t.race.noble?(t.civic.taxes.tax_rate+=e,t.civic.taxes.tax_rate>("oligarchy"===t.civic.govern.type?40:20)&&(t.civic.taxes.tax_rate="oligarchy"===t.civic.govern.type?40:20)):t.civic.taxes.tax_rater&&(t.civic.taxes.tax_rate=r))}break;case"sub":{let e=a||b(),r=pe(!0);t.civic.taxes.tax_rate>r&&(t.civic.taxes.tax_rate-=e,t.civic.taxes.tax_rate25e3&&(e=25e3),t.civic.garrison.m_use>0&&(e*=1.1**t.civic.garrison.m_use),t.race.brute&&(e*=1-di.brute.vars()[0]/100);let a=Oi("orc");return a>0&&(e*=1-di.brute.vars(1)[0]/100*a),t.race.inflation&&(e*=1+t.race.inflation/500),t.race.high_pop&&(e*=di.high_pop.vars()[1]/100),Math.round(e)}function fe(e){if(t.tech.mercs){let a=e||b(),r=!0;for(;r&&a>0;){let e=ge();t.civic.garrison.workers=e?(t.resource.Money.amount-=e,t.civic.garrison.workers++,t.civic.garrison.m_use++):r=!1,a--}}}function ve(e,a){sc(e),t.tech.world_control&&!t.race.truepath?e.append($(`

    ${z("civics_garrison")}

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

    ${z("civics_garrison")}

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

    ${z("tab_tauceti")}

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

    ${r}

    ${s}
    `):e.append(`

    ${r}

    {{ support }}/{{ s_max }}${s}
    `),ic({el:`#sr${a}`,data:t.tauceti[i],filters:{filter(){return Ve[a].info.filter(...arguments)}}})}else e.append(`

    ${r}

    ${s}
    `);Ei(a,(function(){return"string"==typeof Ve[a].info.desc?Ve[a].info.desc:Ve[a].info.desc()}),{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(Ve[a]).forEach((function(e){"info"!==e&&Rt(Ve,a,e)&&vs(Ve[a][e],"tauceti",e)})),Ve[a].info.hasOwnProperty("extra")&&Ve[a].info.extra(a)}}))}function rt(){if((t.settings.tabLoad||2===t.settings.civTabs&&5===t.settings.govTabs)&&(vt(),_t(),sc($("#dwarfShipYard")),t.space.hasOwnProperty("shipyard")&&t.settings.showShipYard)){let e=$("#dwarfShipYard");t.space.shipyard.hasOwnProperty("blueprint")||(t.space.shipyard.blueprint={class:"corvette",armor:"steel",weapon:"railgun",engine:"ion",power:"diesel",sensor:"radar",name:st()});let a=$('
    ');e.append(a);let r=$('
    ');a.append(r),r.append(`
    ${z("outer_shipyard_registry")}:
    `),r.append(`
    ${z("crew")}
    `),r.append(`
    ${z("power")}
    `),r.append(`
    ${z("firepower")}
    `),r.append(`
    ${z("outer_shipyard_sensors")}
    `),r.append(`
    ${z("speed")}
    `),r.append(`
    ${z("outer_shipyard_fuel")}
    `),a.append('
    ');let s=$('
    ');a.append(s);let i={class:["corvette","frigate","destroyer","cruiser","battlecruiser","dreadnought","explorer"],power:["solar","diesel","fission","fusion","elerium"],weapon:["railgun","laser","p_laser","plasma","phaser","disruptor"],armor:["steel","alloy","neutronium"],engine:["ion","tie","pulse","photon","vacuum","emdrive"],sensor:["visual","radar","lidar","quantum"]};Object.keys(i).forEach((function(e){let t="";i[e].forEach((function(a,r){t+=`${z(`outer_shipyard_${e}_${a}`)}`})),s.append(`\n ${t}\n `)}));let c=$('
    ');c.append(``),c.append(`${z("outer_shipyard_fleet_details")}`),c.append(`${z("outer_shipyard_fleet_sort")}`),a.append(c),c.append(`
    ${z("outer_shipyard_park",[ea().dwarf])}${z("outer_shipyard_map")}`),it();let o={template:''};ic({el:"#shipPlans",data:{b:t.space.shipyard.blueprint,s:t.space.shipyard},methods:{setVal(e,a){"class"===e&&"explorer"===a?(t.space.shipyard.blueprint.engine="emdrive",t.space.shipyard.blueprint.weapon="railgun",t.tech.syard_armor>=3&&(t.space.shipyard.blueprint.armor="neutronium"),t.tech.syard_sensor>=4&&(t.space.shipyard.blueprint.sensor="quantum"),t.tech.syard_power>=4&&(t.space.shipyard.blueprint.power="elerium")):"class"===e&&"explorer"!==a&&"explorer"===t.space.shipyard.blueprint.class&&(t.space.shipyard.blueprint.engine="ion"),t.space.shipyard.blueprint[e]=a,it()},avail(e,a,r){if(!("class"!==e&&"engine"!==e||!t.tech.tauceti||"emdrive"!==r&&"explorer"!==r))return!0;if("explorer"===t.space.shipyard.blueprint.class){if("weapon"===e)return 1===a;if("engine"===e)return 6===a;if("sensor"===e)return 4===a}return t.tech[`syard_${e}`]>a},crewText:()=>ct(t.space.shipyard.blueprint),powerText(){let e=ot(t.space.shipyard.blueprint);return e<0?`${e}kW`:`${e}kW`},fireText:()=>nt(t.space.shipyard.blueprint),sensorText:()=>gt(t.space.shipyard.blueprint)+"km",speedText(){let e=7.695363719135802*lt(t.space.shipyard.blueprint);return Math.round(e)+"km/s"},fuelText(){let e=ut(t.space.shipyard.blueprint);return e.res?`-${e.burn} ${t.resource[e.res].name}`:"N/A"},build(){if(ot(t.space.shipyard.blueprint)>=0){let e=dt(t.space.shipyard.blueprint),a={};if(Object.keys(e).forEach((function(t){a[t]=function(){return e[t]}})),Cs(!1,a)){let e=Ac(t.space.shipyard.blueprint);e.location="spc_dwarf",e.xy=yt("spc_dwarf"),e.origin=Ac(e.xy),e.destination=Ac(e.xy),e.transit=0,e.dist=0,e.damage=0,e.fueled=!1,0===e.name.length&&(e.name=st());let a=1,r=e.name;for(;t.space.shipyard.ships.filter((e=>e.name===r)).length>0;)a++,r=e.name+` ${a}`;e.name=r,t.space.shipyard.ships.push(e),pt(),it(),t.space.shipyard.blueprint.name=st()}}},trigModal(){this.$buefy.modal.open({parent:this,component:o});let e=setInterval((function(){$("#modalBox").length>0&&(clearInterval(e),$("#modalBox").append($('

    Solar System

    ')),function(e){let t=$('
    ').appendTo(e),a={},r={},s=!1;Mt={},qt=20,t.append($('').on("mouseup mouseover mouseout",(()=>s=!1)).on("mousedown",(e=>{s=!0,r.x=e.clientX-Mt.x,r.y=e.clientY-Mt.y})).on("mousemove",(e=>{s&&(Mt.x=e.clientX-r.x,Mt.y=e.clientY-r.y,Pt())})).on("wheel",(e=>(e.originalEvent.deltaY<0?(qt/=.8,Mt.x=a.x+(Mt.x-a.x)/.8,Mt.y=a.y+(Mt.y-a.y)/.8,Pt()):(qt*=.8,Mt.x=a.x+.8*(Mt.x-a.x),Mt.y=a.y+.8*(Mt.y-a.y),Pt()),!1))),$('').on("click",(()=>{qt/=.8,Mt.x=a.x+(Mt.x-a.x)/.8,Mt.y=a.y+(Mt.y-a.y)/.8,Pt()})),$('').on("click",(()=>{qt*=.8,Mt.x=a.x+.8*(Mt.x-a.x),Mt.y=a.y+.8*(Mt.y-a.y),Pt()})));let i=document.getElementById("mapCanvas").getBoundingClientRect();a.x=i.width/2,a.y=i.height/2,Mt.x=a.x,Mt.y=a.y,Pt()}($("#modalBox")))}),50)},redraw(){pt()}},filters:{lbl:(e,t)=>z(`outer_shipyard_${t}_${e}`)}}),Object.keys(i).forEach((function(e){for(let t=0;t<$(`#shipPlans .${e}`).length;t++)Ei(`shipPlans${e}${t}`,(function(t){let a=$(t.this).attr("data-val");return z(`outer_shipyard_${e}_${a}_desc`)}),{elm:`#shipPlans .${e}.a${t}`,placement:"right"})})),e.append($('
    ')),pt()}}function st(){let e=["Trident","Spacewolf","Excalibur","Neptune","Deimos","Phobos","Enterprise","Intrepid","Daedalus","Odyssey","Endurance","Horizon","Hyperion","Icarus","Aurora","Axiom","Nemesis","Normandy","Orion","Prometheus","Vanguard","Discovery","Voyager","Defiant","Titan","Liberty","Destiny","Phoenix","Nautilus","Barracuda","Dolphin","Cuttlefish","Tiger Shark","Stingray","Swordfish","Triton","Dragon","Scorpion","Hagfish","Marlin","Galileo","Raven","Sarcophagus","Excelsior","Scimitar","Vengeance","Nomad","Nova","Olympus","Aegis","Agamemnon","Charon","Achilles","Apollo","Hermes","Hydra","Medusa","Talos","Zeus","Heracles","Cerberus","Acheron","Damocles","Juno","Persephone","Solaris","Victory","Hawk","Fury","Razor","Stinger","Outrider","Falcon","Vulture","Nirvana","Retribution","Swordbreaker","Valkyrie","Athena","Avalon","Merlin","Argonaut","Serenity","Gunstar","Ranger","Tantive","Cygnus","Nostromo","Reliant","Narcissus","Liberator","Sulaco","Infinity","Resolute","Wasp","Hornet","Independence","Gilgamesh","Midway","Concordia","Goliath","Cosmos","Express","Tigers Claw","Oberon","Minnow","Majestic","Spartacus","Colossi","Vigilant","Remorseless","Caelestis","Inquisitor","Atlas","Avenger","Dauntless","Nihilus","Thanatos","Stargazer","Xyzzy","Kraken","Xerxes","Spitfire","McShipFace","Monitor","Merrimack","Constitution","Ghost","Pequod","Arcadia","Corsair","Inferno","Jenny","Revenge","Red October","Jackdaw","Thorn","Caleuche","Valencia","Ourang","Deering","Baychimo","Octavius","Joyita","Lovibond","Celeste","Dutchman"],a=e[Math.rand(0,e.length)];return t.space.shipyard.ships.filter((e=>e.name===a)).length>0&&(a=function(){let e=["al","an","ar","as","at","ea","ed","en","er","es","ha","he","hi","in","is","it","le","me","nd","ne","ng","nt","on","or","ou","re","se","st","te","th","ti","to","ve","wa","all","and","are","but","ent","era","ere","eve","for","had","hat","hen","her","hin","his","ing","ion","ith","not","ome","oul","our","sho","ted","ter","tha","the","thi","tio","uld","ver","was","wit","you"],t=Math.rand(2,5),a="";for(let r=0;r${t.resource[a].name}${q(e[a])}`):$("#shipYardCosts").append(` | ${t.resource[a].name} ${q(e[a])}`)}))}function ct(e){switch(e.class){case"corvette":return ua(2);case"frigate":return ua(3);case"destroyer":return ua(4);case"cruiser":return ua(6);case"battlecruiser":return ua(8);case"dreadnought":case"explorer":return ua(10)}}function ot(e,t){let a=0,r=1,s=1;switch(e.class){case"frigate":r=1.1,s=1.2;break;case"destroyer":r=1.5,s=1.65;break;case"cruiser":r=2,s=2.5;break;case"battlecruiser":r=2.5,s=3.5;break;case"dreadnought":r=5,s=6.5;break;case"explorer":r=6,s=2}switch(e.power){case"solar":a=Math.round(50*r);break;case"diesel":a=Math.round(100*r);break;case"fission":a=Math.round(150*r);break;case"fusion":a=Math.round(("explorer"===e.class||t?174:175)*r);break;case"elerium":a=Math.round(200*r)}switch(a=Math.round(oc(a)),e.weapon){case"railgun":a-=Math.round(10*s);break;case"laser":a-=Math.round(30*s);break;case"p_laser":a-=Math.round(18*s);break;case"plasma":a-=Math.round(50*s);break;case"phaser":a-=Math.round(65*s);break;case"disruptor":a-=Math.round(100*s)}switch(e.engine){case"ion":a-=Math.round(25*s);break;case"tie":a-=Math.round(50*s);break;case"pulse":a-=Math.round(40*s);break;case"photon":a-=Math.round(75*s);break;case"vacuum":a-=Math.round(120*s);break;case"emdrive":a-=Math.round(("explorer"===e.class||t?515:1024)*s)}switch(e.sensor){case"radar":a-=Math.round(10*s);break;case"lidar":a-=Math.round(25*s);break;case"quantum":a-=Math.round(75*s)}return a}function nt(e){let t=0;switch(e.weapon){case"railgun":t=36;break;case"laser":t=64;break;case"p_laser":t=54;break;case"plasma":t=90;break;case"phaser":t=114;break;case"disruptor":t=156}switch(e.class){case"corvette":return t;case"frigate":return Math.round(1.5*t);case"destroyer":return Math.round(2.75*t);case"cruiser":return Math.round(5.5*t);case"battlecruiser":return Math.round(10*t);case"dreadnought":return Math.round(22*t);case"explorer":return Math.round(1.2*t)}}function lt(e){let a=1;switch(e.class){case"corvette":a="neutronium"===e.armor?1.1:1;break;case"frigate":a="neutronium"===e.armor?1.35:1.25;break;case"destroyer":a="neutronium"===e.armor?1.95:1.8;break;case"cruiser":a="neutronium"===e.armor?3.5:3;break;case"battlecruiser":a="neutronium"===e.armor?4.8:4;break;case"dreadnought":a="neutronium"===e.armor?7.5:6;break;case"explorer":a=1}let r="spc_dwarf"===e.location&&i.m_relay&&0===e.transit&&t.space.m_relay&&t.space.m_relay.charged>=1e4?3:1;switch(e.engine){case"ion":return 12/a*r;case"tie":return 22/a*r;case"pulse":return 18/a*r;case"photon":return 30/a*r;case"vacuum":return 42/a*r;case"emdrive":return 37500/a*r}}function ut(e){let t=!1,a=0;switch(e.power){case"diesel":t="Oil",a=8;break;case"fission":t="Uranium",a=.5;break;case"fusion":t="Helium_3",a=12;break;case"elerium":t="Elerium",a=1}switch(e.class){case"frigate":a*=1.25;break;case"destroyer":a*=1.5;break;case"cruiser":a*=2;break;case"battlecruiser":a*=3;break;case"dreadnought":a*=5;break;case"explorer":a*=25}return{res:t,burn:+a.toFixed(2)}}function dt(e){let a={},r=1,s=1,i=1;switch(e.class){case"corvette":a.Money=25e5,a.Aluminium=5e5,r=1,s=1,i=2;break;case"frigate":a.Money=5e6,a.Aluminium=125e4,r=1.1,s=1.09,i=1.5;break;case"destroyer":a.Money=15e6,a.Aluminium=35e5,r=1.2,s=1.18,i=1.2;break;case"cruiser":a.Money=5e7,a.Adamantite=1e6,r=1.3,s=1.25;break;case"battlecruiser":a.Money=125e6,a.Adamantite=26e5,r=1.35,s=1.3,i=.8;break;case"dreadnought":a.Money=5e8,a.Adamantite=8e6,r=1.4,s=1.35,i=.5;break;case"explorer":a.Money=8e8,a.Adamantite=95e5,r=1.45,s=1}switch(e.armor){case"steel":a.Steel=Math.round(35e4**r);break;case"alloy":a.Alloy=Math.round(25e4**r);break;case"neutronium":a.Neutronium=Math.round(1e4**r)}switch(e.engine){case"ion":a.Titanium=Math.round(75e3**s);break;case"tie":a.Titanium=Math.round(15e4**s);break;case"pulse":a.Titanium=Math.round(125e3**s);break;case"photon":a.Titanium=Math.round(21e4**s);break;case"vacuum":a.Titanium=Math.round(3e5**s);break;case"emdrive":a.Titanium=Math.round(125e4**s)}let c=!!["dreadnought","explorer"].includes(e.class);switch(e.power){case"solar":case"diesel":a[c?"Orichalcum":"Copper"]=Math.round(4e4**r),a.Iridium=Math.round(15e3**s);break;case"fission":a[c?"Orichalcum":"Copper"]=Math.round(5e4**r),a.Iridium=Math.round(3e4**s);break;case"fusion":a[c?"Orichalcum":"Copper"]=Math.round(5e4**r),a.Iridium=Math.round(4e4**s);break;case"elerium":a[c?"Orichalcum":"Copper"]=Math.round(6e4**r),a.Iridium=Math.round(55e3**s)}if("explorer"!==e.class)switch(e.sensor){case"radar":a.Money=Math.round(a.Money**1.04);break;case"lidar":a.Money=Math.round(a.Money**1.08);break;case"quantum":a.Money=Math.round(a.Money**1.12)}switch(e.weapon){case"railgun":a.Iron=Math.round(25e3**r);break;case"laser":a.Iridium=Math.round(a.Iridium**1.05),a.Nano_Tube=Math.round(12e3**r);break;case"p_laser":a.Iridium=Math.round(a.Iridium**1.035),a.Nano_Tube=Math.round(12e3**r);break;case"plasma":a.Iridium=Math.round(a.Iridium**1.1),a.Nano_Tube=Math.round(2e4**r);break;case"phaser":a.Iridium=Math.round(a.Iridium**1.15),a.Quantium=Math.round(18e3**r);break;case"disruptor":a.Iridium=Math.round(a.Iridium**1.2),a.Quantium=Math.round(35e3**r)}"explorer"===e.class&&(a.Iron*=10,a.Titanium*=5,a.Iridium*=50);let o=0;t.space.shipyard.ships.forEach((function(t){t.class===e.class&&o++}));let n=1+(o-2)/25*i;return Object.keys(a).forEach((function(t){"explorer"===e.class?a[t]=Math.ceil(a[t]*(3*(o+1))):o<2?a[t]=Math.ceil(a[t]*(0===o?.75:.9)):o>2&&(a[t]=Math.ceil(a[t]*n))})),a}function _t(){let e=$("#shipList")[0];if(e){let t=Sortable.get(e);t&&t.destroy()}}function pt(){if(_t(),sc($("#shipList")),t.tech.isolation)return;let e=$("#shipList");if(t.space.shipyard.sort){let e={spc_dwarf:"a"};t.space.shipyard.ships=t.space.shipyard.ships.sort(((t,a)=>(e[t.location]?e[t.location]:t.location).localeCompare(e[a.location]?e[a.location]:a.location)))}const a=Bt();for(let r=0;r${e}`}}else Object.keys(a).forEach((function(e){if(s.location!==e&&(a[e].info.syndicate()||"spc_dwarf"===e)&&(!t.race.orbit_decayed||t.race.orbit_decayed&&"spc_moon"!==e)){let t="string"==typeof a[e].info.name?a[e].info.name:a[e].info.name();i+=`${t}`}}));let c="tauceti"===s.location?z("tech_era_tauceti"):"string"==typeof a[s.location].info.name?a[s.location].info.name:a[s.location].info.name(),o=`\n ${i}\n `;if(t.space.shipyard.expand){let t=`${z(`outer_shipyard_engine_${s.engine}`)} ${z(`outer_shipyard_class_${s.class}`)}`,a=$(`
    `),i=$(`
    ${s.name} | ${z("outer_shipyard_scrap")} | ${t} | ${z(`outer_shipyard_weapon_${s.weapon}`)} | ${z(`outer_shipyard_power_${s.power}`)} | ${z(`outer_shipyard_armor_${s.armor}`)} | ${z(`outer_shipyard_sensor_${s.sensor}`)}
    `),c=$('
    '),n=$('
    '),l=$(`
    ${o}
    `);c.append(`${z("crew")} `),c.append(`${z("firepower")} `),c.append(`${z("outer_shipyard_sensors")} `),c.append(`${z("speed")} `),c.append(`${z("outer_shipyard_fuel")} `),c.append(`${z("outer_shipyard_hull")} `),n.append(``),a.append(i),a.append(c),a.append(n),a.append(l),e.append(a)}else{let t=$(`
    `),a=$('
    '),i=$('
    '),c=$(`
    ${o}
    `);a.append(`${s.name} | `),a.append(`${z("firepower")} `),a.append(`${z("outer_shipyard_sensors")} `),a.append(`${z("speed")} `),a.append(`${z("outer_shipyard_fuel")} `),a.append(`${z("outer_shipyard_hull")} `),i.append(``),t.append(a),t.append(i),t.append(c),e.append(t)}ic({el:`#shipReg${r}`,data:t.space.shipyard.ships[r],methods:{scrap(e){t.space.shipyard.ships[e]&&"spc_dwarf"===t.space.shipyard.ships[e].location&&(t.space.shipyard.ships.splice(e,1),pt(),it())},scrapAllowed:e=>!(!t.space.shipyard.ships[e]||"spc_dwarf"!==t.space.shipyard.ships[e].location),setLoc(e,a){let r=t.space.shipyard.ships[a];if(e!==r.location){let s=ct(r),i=r.transit>0||"spc_dwarf"!==r.location;if(i||t.civic.garrison.workers-t.civic.garrison.crew>=s){let c=ht(r,e),o=bt(r.xy,c),n=lt(r);r.location=e,r.transit=Math.round(o/n),r.dist=Math.round(o/n),r.origin=Ac(r.xy),r.destination={x:c.x,y:c.y},i||(t.civic.garrison.crew+=s),pt(),Ii(`ship${a}loc${e}`)}}},crewText:e=>ct(t.space.shipyard.ships[e]),fireText:e=>nt(t.space.shipyard.ships[e]),sensorText:e=>gt(t.space.shipyard.ships[e])+"km",speedText(e){let a=7.695363719135802*lt(t.space.shipyard.ships[e]);return Math.round(a)+"km/s"},fuelText(e){let a=ut(t.space.shipyard.ships[e]);return a.res?`${a.burn} ${t.resource[a.res].name}/s`:"N/A"},hullText:e=>100-t.space.shipyard.ships[e].damage+"%",hullDamage:e=>t.space.shipyard.ships[e].damage<=10?"has-text-success":t.space.shipyard.ships[e].damage>=40&&t.space.shipyard.ships[e].damage<65?"has-text-caution":t.space.shipyard.ships[e].damage>=65?"has-text-danger":"",dest(e){let r="explorer"===s.class?z("tech_era_tauceti"):"string"==typeof a[t.space.shipyard.ships[e].location].info.name?a[t.space.shipyard.ships[e].location].info.name:a[t.space.shipyard.ships[e].location].info.name();return z("outer_shipyard_arrive",[r,t.space.shipyard.ships[e].transit])},show:e=>t.space.shipyard.ships[e].transit>0}}),"explorer"===s.class?"tauceti"!==s.location&&Ei(`ship${r}loctauceti`,(function(){return z("transit_time",[Math.round(bt(s.xy,ht(s,"tauceti"))/lt(s))])}),{elm:`#ship${r}loc .tauceti`,placement:"left"}):Object.keys(a).forEach((function(e){(a[e].info.syndicate()||"spc_dwarf"===e)&&s.location!==e&&Ei(`ship${r}loc${e}`,(function(){return z("transit_time",[Math.round(bt(s.xy,ht(s,e))/lt(s))])}),{elm:`#ship${r}loc .${e}`,placement:"left"})}))}!function(){let e=$("#shipList")[0];Sortable.create(e,{onEnd(e){let a=t.space.shipyard.ships;a.splice(e.newDraggableIndex,0,a.splice(e.oldDraggableIndex,1)[0]),t.space.shipyard.ships=a,pt()}})}()}function ht(e,a){if(-2===ft[a].orbit)return yt(a);let r=Math.sqrt((e.xy.x-kt(a))**2+e.xy.y**2),s=lt(e)/225,i=xt(1,a),c=Math.abs(r-ft[a].dist),o=Math.abs(r+ft[a].dist),n=Math.abs(r-ft[a].dist*i),l=Math.abs(r+ft[a].dist*i),u=Math.floor(Math.min(c,n,o,l)/s),d=Math.ceil(Math.max(c,n,o,l)/s);r>=ft[a].dist&&r<=ft[a].dist*i&&(u=0);let _=360/(-1===ft[a].orbit?t.city.calendar.orbit:ft[a].orbit),p=(t.space.position[a]+u*_)%360,h=Math.PI/180;for(let t=u;t<=d;t++){let r=xt(Math.cos(p*h)*ft[a].dist,a);r+=kt(a);let i=Math.sin(p*h)*ft[a].dist;if(Math.sqrt((r-e.xy.x)**2+(i-e.xy.y)**2)/s<=t)return{x:r,y:i};p=(p+_)%360}return yt(a)}function mt(e,a){if(!t.tech.isolation&&t.tech.syndicate&&t.race.truepath&&t.space.syndicate&&t.space.syndicate.hasOwnProperty(e)){let r=1e3,s=0;switch(t.civic.foreign.gov3.hstl<10?s=250-25*t.civic.foreign.gov3.hstl:t.civic.foreign.gov3.hstl>60&&(s=-13*(t.civic.foreign.gov3.hstl-60)),e){case"spc_home":case"spc_moon":case"spc_red":case"spc_hell":r=1250+s;break;case"spc_gas":case"spc_gas_moon":case"spc_belt":r=1020+s;break;case"spc_titan":case"spc_enceladus":case"spc_triton":case"spc_kuiper":case"spc_eris":r=Zr.space[e].info.syndicate_cap()}let o=t.space.syndicate[e],n=0,l=0,u=0;if(t.space.hasOwnProperty("shipyard")&&t.space.shipyard.hasOwnProperty("ships")){if(t.space.shipyard.ships.forEach((function(t){if(t.location===e&&0===t.transit&&t.fueled){let e=nt(t);n+=t.damage>0?Math.round(e*(100-t.damage)/100):e,l+=gt(t)}})),"spc_enceladus"===e&&Math.min(c.operating_base,i.operating_base)>0){let e=Math.min(c.operating_base,i.operating_base);n+=50*e}else"spc_titan"===e&&i.sam>0?n+=25*i.sam:"spc_triton"===e&&i.fob>0&&(n+=500,l+=10);l>100&&(l=Math.round((l-100)/(l-100+200)*100)+100),n=Math.round(n*((l+25)/125)),n>o&&(u=n-o),o=o-n>0?o-n:0}return a?{p:1-+(o/r).toFixed(4),r:o,s:l,o:u}:1-+(o/r).toFixed(4)}return a?{p:1,r:0,s:0,o:0}:1}function gt(e){let t=1;switch(e.class){case"corvette":case"frigate":t=2;break;case"destroyer":case"cruiser":t=1.5;break;case"explorer":t=5;break;default:t=1}switch(e.sensor){case"visual":return 1;case"radar":return 10*t;case"lidar":return 18*t;case"quantum":return 32*t}}const ft={spc_sun:{dist:0,orbit:0,size:2},spc_home:{dist:1,orbit:-1,size:.6},spc_moon:{dist:1.01,orbit:-1,size:.1,moon:!0},spc_red:{dist:1.524,orbit:687,size:.5},spc_hell:{dist:.4,orbit:88,size:.4},spc_venus:{dist:.7,orbit:225,size:.5},spc_gas:{dist:5.203,orbit:4330,size:1.25},spc_gas_moon:{dist:5.204,orbit:4330,size:.2,moon:!0},spc_belt:{dist:2.7,orbit:1642,size:.5,belt:!0},spc_dwarf:{dist:2.77,orbit:1682,size:.5},spc_saturn:{dist:9.539,orbit:10751,size:1.1},spc_titan:{dist:9.536,orbit:10751,size:.2,moon:!0},spc_enceladus:{dist:9.542,orbit:10751,size:.1,moon:!0},spc_uranus:{dist:19.8,orbit:30660,size:1},spc_neptune:{dist:30.08,orbit:60152,size:1},spc_triton:{dist:30.1,orbit:60152,size:.1,moon:!0},spc_kuiper:{dist:39.5,orbit:90498,size:.5,belt:!0},spc_eris:{dist:68,orbit:204060,size:.5,size:.5},tauceti:{dist:752568.8,orbit:-2,size:2}};function vt(){t.space.position||(t.space.position={}),Object.keys(ft).forEach((function(e){t.space.position.hasOwnProperty(e)||(t.space.position[e]=Math.rand(0,360))})),t.space.position.spc_home=t.space.position.spc_moon,t.space.position.spc_gas_moon=t.space.position.spc_gas,t.space.position.spc_titan=t.space.position.spc_enceladus,t.space.position.spc_saturn=t.space.position.spc_titan,t.space.position.spc_neptune=t.space.position.spc_triton}function yt(e){let a=xt(+Math.cos(t.space.position[e]*(Math.PI/180)).toFixed(5)*ft[e].dist,e),r=+Math.sin(t.space.position[e]*(Math.PI/180)).toFixed(5)*ft[e].dist;return a+=kt(e),{x:a,y:r}}function bt(e,t){return Math.ceil(225*Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2))}function wt(e,a){let r=1;switch(t.race.pack_rat&&(r*=1+di.pack_rat.vars()[1]/100),t.stats.achieve.blackhole&&(r*=1+.05*t.stats.achieve.blackhole.l),t.tech.world_control&&(r*=3),e){case"storehouse":i.titan_spaceport&&(r*=1+.25*i.titan_spaceport),a&&t.tech.shelving&&(r*=2),t.tech.shelving&&t.tech.shelving>=3&&(r*=1.5);case"repository":t.tech.isolation&&(r*=3,t.tech.tp_depot&&(r*=1+t.tech.tp_depot/20))}return r}function $t(){let e=0;return i.ai_colonist&&c.decoder&&(e+=i.ai_colonist*c.decoder*.35),c.shock_trooper&&(e+=2*c.shock_trooper),c.tank&&(e+=2*c.tank),e>100&&(e=100),e}function xt(e,a){if(-2!==ft[a].orbit){let r=1.075+ft[a].dist/100;t.city.ptrait.includes("elliptical")&&(r="spc_home"===a?1.5:1.275+ft[a].dist/100),e*=r}return e}function kt(e){if(-2!==ft[e].orbit){let a=ft[e].dist/3;return t.city.ptrait.includes("elliptical")&&"spc_home"===e&&(a+=.15),"spc_eris"===e&&(a+=25),a}return 0}var qt,Mt;function Pt(){let e=document.getElementById("mapCanvas"),a=e.getContext("2d");e.width=e.getBoundingClientRect().width,e.height=e.getBoundingClientRect().height,a.save(),a.fillStyle="#000000",a.fillRect(0,0,e.width,e.height),a.translate(Mt.x,Mt.y),a.scale(qt,qt);let r={};for(let[e,t]of Object.entries(ft))r[e]=yt(e);a.lineWidth=1/qt,a.strokeStyle="#c0c0c0";for(let[e,r]of Object.entries(ft))if(!r.moon&&-2!==r.orbit){a.beginPath(),r.belt||t.race.orbit_decayed&&"spc_home"===e?a.setLineDash([.01,.01]):a.setLineDash([]);let s=kt(e);a.ellipse(s,0,xt(r.dist,e),r.dist,0,0,2*Math.PI,!0),a.stroke()}a.fillStyle="#0000ff",a.strokeStyle="#0000ff";for(let e of t.space.shipyard.ships)e.transit>0&&(a.beginPath(),a.setLineDash([.1,.4]),a.moveTo(e.xy.x,e.xy.y),a.lineTo(e.destination.x,e.destination.y),a.stroke());for(let[e,s]of Object.entries(ft)){if(t.race.orbit_decayed&&["spc_home","spc_moon"].includes(e))continue;let i="558888";if(Zr.space[e]&&Zr.space[e].info.syndicate()&&t.settings.space[e.substring(4)]){let t=mt(e);i=((Math.round(255*(1-t))<<16)+(Math.round(255*t)<<8)).toString(16).padStart(6,0)}"spc_dwarf"===e?i="7132a8":"spc_sun"!==e&&"tauceti"!==e||(i="f8ff2b"),a.fillStyle="#"+i,a.beginPath();let c=s.size/10;if(s.moon)switch(e){case"spc_moon":a.arc(r[e].x+.05,r[e].y+.05,c,0,2*Math.PI,!0);break;case"spc_titan":a.arc(r[e].x-.2,r[e].y-.2,c,0,2*Math.PI,!0);break;default:a.arc(r[e].x+.2,r[e].y+.2,c,0,2*Math.PI,!0)}else{let t=s.size/10;a.arc(r[e].x,r[e].y,t,0,2*Math.PI,!0)}a.fill()}a.fillStyle="#0000ff",a.strokeStyle="#0000ff";for(let e of t.space.shipyard.ships)e.transit>0&&(a.beginPath(),a.arc(e.xy.x,e.xy.y,.1,0,2*Math.PI,!0),a.fill());a.shadowOffsetX=2,a.shadowOffsetY=2,a.shadowBlur=2,a.shadowColor="rgba(0, 0, 0, 0.5)",a.fillStyle="#009aff",a.font=20/qt+"px serif";for(let e of t.space.shipyard.ships)e.transit>0&&a.fillText(e.name,e.xy.x+.15,e.xy.y-.15);a.fillStyle="#ffa500",a.font=25/qt+"px serif";for(let[e,s]of Object.entries(ft))if(Zr.space[e]&&t.settings.space[e.substring(4)]){if(t.race.orbit_decayed&&["spc_home"].includes(e))continue;let i=Zr.space[e].info.name,c="function"==typeof i?i():i;if(s.moon)switch(e){case"spc_moon":a.fillText(c,r[e].x+.1,r[e].y+.1);break;case"spc_titan":a.fillText(c,r[e].x-.3,r[e].y-.3);break;default:a.fillText(c,r[e].x+.25,r[e].y+.2)}else"spc_sun"===e||a.fillText(c,r[e].x,r[e].y-.2*s.size)}a.restore()}function Ot(e){switch(e){case"city":return t.resource[t.race.species]?t.resource[t.race.species].amount<=5?z("tab_city1"):t.resource[t.race.species].amount<=20?z("tab_city2"):t.resource[t.race.species].amount<=75?z("tab_city3"):t.resource[t.race.species].amount<=250?z("tab_city4"):t.resource[t.race.species].amount<=600?z("tab_city5"):t.resource[t.race.species].amount<=1200?z("tab_city6"):t.resource[t.race.species].amount<=2500?z("tab_city7"):z("tab_city8"):z("tab_city1");case"local_space":return z("sol_system",[t.race.truepath?_i[t.race.species].home:Tc("name")]);case"outer_local_space":return z("outer_sol_system",[t.race.truepath?_i[t.race.species].home:Tc("name")]);case"old":return z("tab_old_res");case"new":return z("tab_new_res");case"old_sr":return z("tab_old_sr_res");case"new_sr":return z("tab_new_sr_res");default:return z(e)}}function Ct(){t.settings.tabLoad?(jt("mTabCivil"),jt("mTabCivic"),jt("mTabResearch"),jt("mTabResource"),jt("mTabArpa"),jt("mTabStats"),jt("mTabObserve")):jt(t.settings.civTabs)}function jt(e){switch(t.settings.tabLoad?Vi("page_view",{page_title:"Evolve - All Tabs"}):(Rs(),si(),Aa(),Be(),N(),_t(),sc($("#mTabCivil")),sc($("#mTabCivic")),sc($("#mTabResearch")),sc($("#mTabResource")),sc($("#mTabArpa")),sc($("#mTabStats")),sc($("#mTabObserve"))),e){case 0:t.settings.tabLoad||(Vi("page_view",{page_title:"Evolve - Evolution"}),as());break;case 1:case"mTabCivil":t.settings.tabLoad||Vi("page_view",{page_title:"Evolve - Civilization"}),$("#mTabCivil").append('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),ic({el:"#mTabCivil",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(sc($("#city")),sc($("#space")),sc($("#interstellar")),sc($("#galaxy")),sc($("#portal")),sc($("#outerSol")),sc($("#tauCeti")),e){case 0:ms();break;case 1:case 2:case 3:case 5:Ht();break;case 4:xa();break;case 6:at()}return e}},filters:{label:e=>Ot(e)}}),"protoplasm"!==t.race.species&&(ms(),Ht(),xa(),at()),t.race.noexport&&("Race"===t.race.noexport?(sc($("#city")),sa()):"Planet"===t.race.noexport&&(sc($("#city")),ia()));break;case 2:case"mTabCivic":t.settings.tabLoad||Vi("page_view",{page_title:"Evolve - Civics"}),$("#mTabCivic").append('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),ic({el:"#mTabCivic",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(si(),N(),Aa(),_t(),sc($("#civic")),sc($("#industry")),sc($("#powerGrid")),sc($("#military")),sc($("#mechLab")),sc($("#dwarfShipYard")),sc($("#psychicPowers")),e){case 0:$("#civic").append($('
    ')),na(),$("#civics").append($('
    ')),J(),"protoplasm"===t.race.species||t.race.start_cataclysm||(X(),ve($("#c_garrison"),!1),ie()),t.race.shapeshifter&&Mi(!1,!0);break;case 1:Qs();break;case 2:Object.keys(ri()).forEach((function(e){Ni(e)})),ai();break;case 3:"protoplasm"===t.race.species||t.race.start_cataclysm||(Y(),qa($("#fortress"),!1));break;case 4:"protoplasm"===t.race.species||t.race.start_cataclysm||Fa();break;case 5:t.race.truepath&&"protoplasm"!==t.race.species&&!t.race.start_cataclysm&&rt();break;case 6:t.race.psychic&&t.tech.psychic&&"protoplasm"!==t.race.species&&Ai()}return e}},filters:{label:e=>Ot(e)}}),Object.keys(ri()).forEach((function(e){Ni(e)})),ai(),$("#civic").append($('
    ')),na(),$("#civics").append($('
    ')),J(),"protoplasm"===t.race.species||t.race.start_cataclysm||(Y(),ve($("#c_garrison"),!1),qa($("#fortress"),!1),ie(),Fa(),t.race.truepath&&rt(),t.race.psychic&&t.tech.psychic&&Ai()),t.race.shapeshifter&&Mi(!1,!0),Qs();break;case 3:case"mTabResearch":t.settings.tabLoad||Vi("page_view",{page_title:"Evolve - Research"}),$("#mTabResearch").append('
    \n \n \n \n \n \n \n \n '),ic({el:"#mTabResearch",data:{s:t.settings,rq:t.r_queue},filters:{label:e=>Ot(e)}}),Gs(),"protoplasm"!==t.race.species&&gs();break;case 4:case"mTabResource":t.settings.tabLoad||Vi("page_view",{page_title:"Evolve - Resources"}),$("#mTabResource").append('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),ic({el:"#mTabResource",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(sc($("#market")),sc($("#resStorage")),sc($("#resEjector")),sc($("#resCargo")),sc($("#resAlchemy")),e){case 0:rr("market");break;case 1:rr("storage");break;case 2:rr("ejector");break;case 3:rr("supply");break;case 4:rr("alchemy")}return e}},filters:{label:e=>Ot(e)}}),ar(),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let r=a.resource[e].color,s=a.resource[e].tradable;if(a.resource[e].stackable){var i=$(`
    `);$("#resStorage").append(i),vr(`#stack-${e}`,i,e,r)}s&&(i=$(`
    `),$("#market").append(i),dr(`#market-${e}`,i,e,r,!0)),Ja[e]&&Tr(e,r),Ya[e]&&Ir(e,r),Va[e]&&"magic"===t.race.universe&&(t.resource[e].basic=s,Lr(e,r,s))})),ir();break;case 5:case"mTabArpa":t.settings.tabLoad||Vi("page_view",{page_title:"Evolve - Arpa"}),$("#mTabArpa").append(`
    \n \n \n \n \n \n \n
    `),ic({el:"#mTabArpa",data:{s:t.settings},filters:{label:e=>Ot(e)}}),Ce("Physics"),Ce("Genetics"),Ce("Crispr"),Ce("Blood");break;case 6:case"mTabStats":t.settings.tabLoad||Vi("page_view",{page_title:"Evolve - Stats"}),$("#mTabStats").append('\n \n \n \n \n \n \n \n \n \n '),ic({el:"#mTabStats",data:{s:t.settings},filters:{label:e=>Ot(e)}}),function(){sc($("#achieve")),sc($("#stats"));let e=$('
    ');$("#stats").append(e);let a=$('
    ');$("#perks").append(a);let r=$('
    ');$("#achieve").append(r),function(){sc($("#statsPanel"));let e=$("#statsPanel");if(e.append(`
    ${z("achieve_stats_overall")}
    `),e.append(`
    ${z("achieve_stats_plasmid_earned")} {{ s.plasmid | format }}
    `),t.stats.antiplasmid>0&&e.append(`
    ${z("achieve_stats_antiplasmid_earned")} {{ s.antiplasmid | format }}
    `),t.stats.phage>0&&e.append(`
    ${z("achieve_stats_phage_earned")} {{ s.phage | format }}
    `),t.stats.dark>0&&e.append(`
    ${z("achieve_stats_dark_earned")} {{ s.dark | format }}
    `),t.stats.harmony>0&&e.append(`
    ${z("achieve_stats_harmony_earned")} {{ s.harmony | format }}
    `),t.stats.blood>0&&e.append(`
    ${z("achieve_stats_blood_earned")} {{ s.blood | format }}
    `),t.stats.artifact>0&&e.append(`
    ${z("achieve_stats_artifact_earned")} {{ s.artifact | format }}
    `),e.append(`
    ${z("achieve_stats_knowledge_spent")} {{ s.know | t_know | format }}
    `),e.append(`
    ${z("achieve_stats_starved_to_death")} {{ s.starved | t_starved | format }}
    `),e.append(`
    ${z("achieve_stats_died_in_combat")} {{ s.died | t_died | format }}
    `),e.append(`
    ${z("achieve_stats_game_days_played")} {{ s.days | played | format }}
    `),t.stats.portals>0&&e.append(`
    ${z("achieve_stats_portals")} {{ s.portals | format }}
    `),e.append(`
    ${z("achieve_stats_total_resets")} {{ s.reset | format }}
    `),t.stats.mad>0&&e.append(`
    ${z("achieve_stats_mad_resets")} {{ s.mad | format }}
    `),t.stats.bioseed>0&&e.append(`
    ${z("achieve_stats_bioseed_resets")} {{ s.bioseed | format }}
    `),t.stats.cataclysm>0&&e.append(`
    ${z("achieve_stats_cataclysm_resets")} {{ s.cataclysm | format }}
    `),t.stats.blackhole>0&&e.append(`
    ${z("achieve_stats_blackhole_resets")} {{ s.blackhole | format }}
    `),t.stats.ascend>0&&e.append(`
    ${z("achieve_stats_ascension_resets")} {{ s.ascend | format }}
    `),t.stats.descend>0&&e.append(`
    ${z("achieve_stats_descension_resets")} {{ s.descend | format }}
    `),t.stats.aiappoc>0&&e.append(`
    ${z("achieve_stats_aiappoc_resets")} {{ s.aiappoc | format }}
    `),t.stats.matrix>0&&e.append(`
    ${z("achieve_stats_matrix_resets")} {{ s.matrix | format }}
    `),t.stats.retire>0&&e.append(`
    ${z("achieve_stats_retire_resets")} {{ s.retire | format }}
    `),t.stats.eden>0&&e.append(`
    ${z("achieve_stats_eden_resets")} {{ s.eden | format }}
    `),t.stats.terraform>0&&e.append(`
    ${z("achieve_stats_terraform_resets")} {{ s.terraform | format }}
    `),t.stats.geck>0&&e.append(`
    ${z("achieve_stats_gecks")} {{ s.geck | format }}
    `),e.append(`
    ${z("achieve_stats_current_game")}
    `),e.append(`
    ${z("achieve_stats_knowledge_spent")} {{ s.know | format }}
    `),e.append(`
    ${z("achieve_stats_starved_to_death")} {{ s.starved | format }}
    `),e.append(`
    ${z("achieve_stats_died_in_combat")} {{ s.died | format }}
    `),e.append(`
    ${z("achieve_stats_attacks_made")} {{ s.attacks | format }}
    `),e.append(`
    ${z("achieve_stats_game_days_played")} {{ s.days | format }}
    `),t.stats.dkills>0&&e.append(`
    ${z("achieve_stats_demons_kills")} {{ s.dkills | format }}
    `),t.stats.sac>0&&e.append(`
    ${z("achieve_stats_sacrificed")} {{ s.sac | format }}
    `),t.stats.murders>0&&e.append(`
    ${z("achieve_stats_murders")} {{ s.murders | format }}
    `),t.stats.psykill>0&&e.append(`
    ${z("achieve_stats_psymurders")} {{ s.psykill | format }}
    `),t.resource.hasOwnProperty("Thermite")&&t.resource.Thermite.amount>0&&e.append(`
    ${z("achieve_stats_thermite")} {{ r.Thermite.amount | res }}
    `),Kc().active){let a="";(t.stats.cfood>=13||t.race.cataclysm||t.race.orbit_decayed)&&(a=`${qc(7,12,!0)}`),e.append(`
    ${z("achieve_stats_trickortreat")} {{ s.cfood | format }} ${a}
    `)}ic({el:"#statsPanel",data:{s:t.stats,r:t.resource},filters:{played:e=>e+t.stats.tdays,t_know:e=>e+t.stats.tknow,t_starved:e=>e+t.stats.tstarved,t_died:e=>e+t.stats.tdied,format:e=>e.toLocaleString(),res:e=>(+e.toFixed(2)).toLocaleString()}})}(),lo(),$("body").hasClass("fool")?ao({fool:!0}):ao()}();break;case 7:t.settings.tabLoad||Vi("page_view",{page_title:"Evolve - Settings"});break;default:t.settings.tabLoad||Vi("page_view",{page_title:"Evolve - Hell Observation"}),t.portal.observe&&Ra(!0)}$("#popper").length>0&&0===$(`#${$("#popper").data("id")}`).length&&Ii()}const St={spc_home:{info:{name:()=>_i[t.race.species].home,desc:z("space_home_info_desc"),zone:"inner",syndicate:()=>!1},test_launch:{id:"space-test_launch",title:z("space_home_test_launch_title"),desc:z("space_home_test_launch_desc"),reqs:{space:1},grant:["space",2],queue_complete:()=>t.tech.space>=2?0:1,cost:{Money:()=>1e5,Oil:(e,t)=>Yt(7500,!1,t)},effect:z("space_home_test_launch_effect"),action(){if(Cs($(this)[0])){if(t.race.truepath){let e=1;if(de("gov0")||e++,de("gov1")||e++,de("gov2")||e++,0!==Math.floor(g(0,e)))return Bi(z("space_home_test_launch_action_fail"),"danger",!1,["progress"]),0}return t.space.satellite={count:0},Bi(z("space_home_test_launch_action"),"info",!1,["progress"]),!0}return!1}},satellite:{id:"space-satellite",title:z("space_home_satellite_title"),desc:z("space_home_satellite_desc"),reqs:{space:2},cost:{Money:e=>ec("satellite",e,72e3,1.22),Knowledge:e=>ec("satellite",e,28e3,1.22),Oil:(e,t)=>ec("satellite",e,Yt(3200,!1,t),1.22),Alloy:e=>ec("satellite",e,8e3,1.22)},effect(){let e=t.race.cataclysm||t.race.orbit_decayed?2e3:750;if((t.race.cataclysm||t.race.orbit_decayed)&&t.tech.supercollider){let a=t.tech.particles&&t.tech.particles>=3?5:10;e*=t.tech.supercollider/a+1}let a=t.race.cataclysm?z("space_moon_observatory_title"):t.race.orbit_decayed?z("city_university"):Es(),r=`
    ${z("space_home_satellite_effect2",[a,t.race.cataclysm?25:t.race.orbit_decayed?12:4])}
    `;return`
    ${z("plus_max_resource",[e,z("resource_Knowledge_name")])}
    ${r}
    ${z("space_home_satellite_effect3",[t.civic.scientist?t.civic.scientist.name:z("job_scientist")])}
    `},action(){return!!Cs($(this)[0])&&(Dt("satellite"),t.resource.Knowledge.max+=750,!0)}},gps:{id:"space-gps",title:z("space_home_gps_title"),desc:()=>t.space.hasOwnProperty("gps")&&t.space.gps.count<4?`
    ${z("space_home_gps_desc")}
    ${z("space_home_gps_desc_req")}
    `:`
    ${z("space_home_gps_desc")}
    `,reqs:{satellite:1},not_trait:["terrifying"],cost:{Money:e=>ec("gps",e,75e3,1.18),Knowledge:e=>ec("gps",e,5e4,1.18),Copper:e=>ec("gps",e,6500,1.18),Oil:(e,t)=>ec("gps",e,Yt(3500,!1,t),1.18),Titanium:e=>ec("gps",e,8e3,1.18)},effect:e=>(e||0)+(t.space.hasOwnProperty("gps")?t.space.gps.count:0)<4?z("space_home_gps_effect_req"):`
    ${z("space_home_gps_effect")}
    ${z("space_home_gps_effect2",[2])}
    `,action(){return!!Cs($(this)[0])&&(Dt("gps"),!0)}},propellant_depot:{id:"space-propellant_depot",title:z("space_home_propellant_depot_title"),desc:z("space_home_propellant_depot_desc"),reqs:{space_explore:1},cost:{Money:e=>ec("propellant_depot",e,55e3,1.35),Aluminium:e=>ec("propellant_depot",e,22e3,1.35),Oil:(e,t)=>ec("propellant_depot",e,Yt(5500,!1,t),1.35)},effect(){let e=Nr(1250)*(t.tech.world_control?1.5:1);if(t.resource.Helium_3.display){let a=Nr(1e3)*(t.tech.world_control?1.5:1);return`
    ${z("plus_max_resource",[e,z("resource_Oil_name")])}
    ${z("plus_max_resource",[a,z("resource_Helium_3_name")])}
    `}return`
    ${z("plus_max_resource",[e,z("resource_Oil_name")])}
    `},action(){return!!Cs($(this)[0])&&(Dt("propellant_depot"),t.resource.Oil.max+=Nr(1250)*(t.tech.world_control?1.5:1),t.resource.Helium_3.display&&(t.resource.Helium_3.max+=Nr(1e3)*(t.tech.world_control?1.5:1)),!0)}},nav_beacon:{id:"space-nav_beacon",title:()=>t.race.orbit_decayed?z("space_home_broadcast_beacon_title"):z("space_home_nav_beacon_title"),desc:`
    ${z("space_home_nav_beacon_desc")}
    ${z("requires_power")}
    `,reqs:{luna:2},cost:{Money:e=>ec("nav_beacon",e,75e3,1.32),Copper:e=>ec("nav_beacon",e,38e3,1.32),Aluminium:e=>ec("nav_beacon",e,44e3,1.32),Oil:(e,t)=>ec("nav_beacon",e,Yt(12500,!1,t),1.32),Iridium:e=>ec("nav_beacon",e,1200,1.32)},powered:()=>nc(2),powerBalancer:()=>t.tech.luna&&t.tech.luna>=3?[{s:t.space.moon_base.s_max-t.space.moon_base.support},{s:t.space.spaceport.s_max-t.space.spaceport.support}]:[{s:t.space.moon_base.s_max-t.space.moon_base.support}],support:()=>1,effect(){let e="";return t.race.orbit_decayed&&t.tech.broadcast&&(e=`
    ${z("space_red_vr_center_effect1",[t.tech.broadcast/2])}
    `),`${t.race.orbit_decayed?"":`
    ${z("space_home_nav_beacon_effect1")}
    `}${t.tech.luna>=3?`
    ${z("space_red_spaceport_effect1",[ea().red,1])}
    `:""}${e}
    ${z("space_home_nav_beacon_effect2",[$(this)[0].powered()])}
    `},action(){return!!Cs($(this)[0])&&(Dt("nav_beacon"),ks($(this)[0]),!0)}}},spc_moon:{info:{name:z("space_moon_info_name"),desc:()=>z("space_moon_info_desc",[_i[t.race.species].home]),support:"moon_base",zone:"inner",syndicate:()=>!0},moon_mission:{id:"space-moon_mission",title:z("space_moon_mission_title"),desc:z("space_moon_mission_desc"),reqs:{space:2,space_explore:2},grant:["space",3],queue_complete:()=>t.tech.space>=3?0:1,cost:{Oil:(e,t)=>+Yt(12e3,!1,t).toFixed(0)},effect:z("space_moon_mission_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("space_moon_mission_action"),"info",!1,["progress"]),t.space.iridium_mine={count:0,on:0},t.space.helium_mine={count:0,on:0},!0)}},moon_base:{id:"space-moon_base",title:z("space_moon_base_title"),desc:()=>`
    ${z("space_moon_base_desc")}
    ${z("requires_power_combo",[t.resource.Oil.name])}
    `,reqs:{space:3},cost:{Money:e=>ec("moon_base",e,22e3,1.32),Cement:e=>ec("moon_base",e,18e3,1.32),Alloy:e=>ec("moon_base",e,7800,1.32),Polymer:e=>ec("moon_base",e,12500,1.32)},effect(e){let t=Nr(500),a=+Yt($(this)[0].support_fuel().a,!0,e).toFixed(2);return`
    ${z("space_moon_base_effect1")}
    ${z("plus_max_resource",[t,z("resource_Iridium_name")])}
    ${z("space_moon_base_effect3",[a,$(this)[0].powered()])}
    `},support:()=>2,support_fuel:()=>({r:"Oil",a:2}),powered:()=>nc(4),powerBalancer:()=>[{s:t.space.moon_base.s_max-t.space.moon_base.support}],refresh:!0,action(){if(Cs($(this)[0])){if(Dt("moon_base"),ks($(this)[0]),1===t.space.moon_base.count&&(t.tech.moon=1),!t.tech.luna&&(t.tech.luna=1,t.race.truepath)){let e=z("space_moon_base_msg",[te(3)]);t.civic.foreign.gov3.hstl<10?e=`${e} ${z("space_moon_base_msg_ally")}`:t.civic.foreign.gov3.hstl>60&&(e=`${e} ${z("space_moon_base_msg_hstl")}`),Bi(e,"info",!1,["progress"])}return t.race.orbit_decay&&t.race.orbit_decay>t.stats.days+2500&&(t.race.orbit_decay=t.stats.days+2500,Bi(z("evo_challenge_orbit_decayed_accelerated",[t.race.orbit_decay-t.stats.days]),"info",!1,["progress"])),!0}return!1}},iridium_mine:{id:"space-iridium_mine",title:z("space_moon_iridium_mine_title"),desc:`
    ${z("space_moon_iridium_mine_desc")}
    ${z("space_support",[z("space_moon_info_name")])}
    `,reqs:{space:3,luna:1},cost:{Money:e=>ec("iridium_mine",e,42e3,1.35),Lumber:e=>ec("iridium_mine",e,9e3,1.35),Titanium:e=>ec("iridium_mine",e,17500,1.35)},effect(){let e=Oe("iridium_mine","iridium"),a=+e.b.toFixed(3),r="";t.race.truepath&&(t.civic.foreign.gov3.hstl<10?r=`
    ${z("space_rival_ally",[+(100*e.g).toFixed(1)])}
    `:t.civic.foreign.gov3.hstl>60&&(r=`
    ${z("space_rival_war",[+(100*e.g).toFixed(1)])}
    `));let s=t.race.cataclysm?`
    ${z("produce",[+Oe("iridium_mine","coal").toFixed(2),t.resource.Coal.name])}
    `:"",i=t.race.cataclysm?`
    ${z("produce",[+(Oe("iridium_mine","coal")/48).toFixed(3),t.resource.Uranium.name])}
    `:"";return`
    ${z("space_used_support",[z("space_moon_info_name")])}
    ${z("space_moon_iridium_mine_effect",[a])}
    ${r}${s}${i}`},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(t.resource.Iridium.display=!0,Dt("iridium_mine"),t.resource.Mythril.display||(t.resource.Mythril.display=!0,ma()),t.space.moon_base.support${z("space_moon_helium_mine_desc")}
    ${z("space_support",[z("space_moon_info_name")])}
    `,reqs:{space:3,luna:1},cost:{Money:e=>ec("helium_mine",e,38e3,1.35),Aluminium:e=>ec("helium_mine",e,9e3,1.35),Steel:e=>ec("helium_mine",e,17500,1.35)},effect(){let e=Nr(100),a=Oe("helium_mine"),r=+a.b.toFixed(3),s="";return t.race.truepath&&(t.civic.foreign.gov3.hstl<10?s=`
    ${z("space_rival_ally",[+(100*a.g).toFixed(1)])}
    `:t.civic.foreign.gov3.hstl>60&&(s=`
    ${z("space_rival_war",[+(100*a.g).toFixed(1)])}
    `)),`
    ${z("space_used_support",[z("space_moon_info_name")])}
    ${z("space_moon_helium_mine_effect",[r])}
    ${s}
    ${z("plus_max_resource",[e,z("resource_Helium_3_name")])}
    `},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(t.resource.Helium_3.display=!0,Dt("helium_mine"),t.space.moon_base.support${z("space_moon_observatory_desc")}
    ${z("space_support",[z("space_moon_info_name")])}
    `,reqs:{science:9,luna:1},cost:{Money:e=>ec("observatory",e,2e5,1.28),Knowledge:e=>ec("observatory",e,69e3,1.28),Stone:e=>ec("observatory",e,125e3,1.28),Iron:e=>ec("observatory",e,65e3,1.28),Iridium:e=>ec("observatory",e,1250,1.28)},effect(){let e="";t.race.cataclysm&&(e=`
    ${z("city_university_effect",[ua(1)])}
    `);let a=5e3;t.race.cataclysm&&t.space.satellite&&t.space.satellite.count>0&&(a*=1+.25*t.space.satellite.count);let r=t.race.cataclysm?`
    ${z("space_moon_observatory_cata_effect",[25])}
    `:`
    ${z("space_moon_observatory_effect",[5])}
    `;return`
    ${z("space_used_support",[z("space_moon_info_name")])}
    ${e}
    ${z("plus_max_resource",[a,z("resource_Knowledge_name")])}
    ${r}`},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("observatory"),t.space.moon_base.supportea().red,desc:()=>z("space_red_info_desc",[ea().red]),support:"spaceport",zone:"inner",syndicate:()=>!0},red_mission:{id:"space-red_mission",title:()=>z("space_mission_title",[ea().red]),desc:()=>z("space_mission_desc",[ea().red]),reqs:{space:3,space_explore:3},grant:["space",4],queue_complete:()=>t.tech.space>=4?0:1,cost:{Helium_3:(e,t)=>+Yt(4500,!1,t).toFixed(0)},effect:()=>z("space_red_mission_effect",[ea().red]),action(){return!!Cs($(this)[0])&&(Bi(z("space_red_mission_action",[ea().red]),"info",!1,["progress"]),t.space.living_quarters={count:0,on:0},t.space.garage={count:0},t.space.red_mine={count:0,on:0},t.space.fabrication={count:0,on:0},!0)}},spaceport:{id:"space-spaceport",title:z("space_red_spaceport_title"),desc:()=>`
    ${z("space_red_spaceport_desc")}
    ${z("requires_power_space",[t.resource.Food.name])}
    `,reqs:{space:4},cost:{Money:e=>ec("spaceport",e,47500,1.32),Iridium:e=>ec("spaceport",e,1750,1.32),Mythril:e=>ec("spaceport",e,25,1.32),Titanium:e=>ec("spaceport",e,22500,1.32)},effect(e){let a=+Yt($(this)[0].support_fuel().a,!0,e).toFixed(2),r="";return(t.race.cataclysm||t.race.orbit_decayed)&&(r=`
    ${z("plus_max_resource",[`$${Nr(4*Us())}`,z("resource_Money_name")])}
    `),`
    ${z("space_red_spaceport_effect1",[ea().red,$(this)[0].support()])}
    ${r}
    ${z("space_red_spaceport_effect2",[a,$(this)[0].powered()])}
    ${z("spend",[t.race.cataclysm?2:25,t.resource.Food.name])}
    `},support(){let e=t.race.cataclysm||t.race.orbit_decayed?4:3;return t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=4&&e++,e},support_fuel:()=>({r:"Helium_3",a:1.25}),powered:()=>nc(5),powerBalancer:()=>[{s:t.space.spaceport.s_max-t.space.spaceport.support}],refresh:!0,action(){return!!Cs($(this)[0])&&(Dt("spaceport"),ks($(this)[0]),t.tech.mars||(t.tech.mars=1),t.race.orbit_decay&&t.race.orbit_decay>t.stats.days+1e3&&(t.race.orbit_decay=t.stats.days+1e3,Bi(z("evo_challenge_orbit_decayed_accelerated",[t.race.orbit_decay-t.stats.days]),"info",!1,["progress"])),!0)}},red_tower:{id:"space-red_tower",title:z("space_red_tower_title"),desc:()=>`
    ${z("space_red_tower_desc")}
    ${z("requires_power")}
    `,reqs:{mars:3},cost:{Money:e=>ec("red_tower",e,225e3,1.28),Iron:e=>ec("red_tower",e,22e3,1.28),Cement:e=>ec("red_tower",e,15e3,1.28),Alloy:e=>ec("red_tower",e,8e3,1.28)},effect(){return`
    ${z("space_red_spaceport_effect1",[ea().red,t.race.cataclysm?2:1])}
    ${z("minus_power",[$(this)[0].powered()])}
    `},powered:()=>nc(2),powerBalancer:()=>[{s:t.space.spaceport.s_max-t.space.spaceport.support}],support:()=>t.race.cataclysm?2:1,action(){return!!Cs($(this)[0])&&(Dt("red_tower"),ks($(this)[0]),!0)}},captive_housing:Jr("captive_housing","space"),terraformer:{id:"space-terraformer",title:z("space_terraformer"),desc:e=>!t.space.hasOwnProperty("terraformer")||t.space.terraformer.count<100||e?`
    ${z("space_terraformer")}
    ${z("requires_segmemts",[100])}
    `+(t.space.hasOwnProperty("terraformer")&&t.space.terraformer.count>=100?`
    ${z("requires_power")}
    `:""):`
    ${z("space_terraformer")}
    `,reqs:{terraforming:1},condition:()=>!(t.space.terraformer.count>=100),queue_size:5,queue_complete:()=>100-t.space.terraformer.count,cost:{Money:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100?t.race.truepath?75e5:75e6:0,Alloy:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100?t.race.truepath?25e4:75e4:0,Neutronium:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100?125e3:0,Elerium:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100?1e3:0,Bolognium:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100?t.race.truepath?0:1e5:0,Orichalcum:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100?t.race.truepath?12e3:25e4:0,Soul_Gem:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100?t.race.truepath?0:1:0,Nanoweave:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100?t.race.truepath?0:75e3:0,Quantium:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100&&t.race.truepath?75e3:0,Cipher:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100&&t.race.truepath?1e3:0},effect(e){let a=(e?e.count:0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0);if(a<100){let e=100-a;return`
    ${z("space_terraformer_effect")}
    ${z("space_dwarf_collider_effect2",[e])}
    `}return St.spc_red.atmo_terraformer.effect(e)},action(){return!!(Cs($(this)[0])&&t.space.terraformer.count<100)&&(Dt("terraformer","space"),t.space.terraformer.count>=100&&(t.tech.terraforming=2,t.space.atmo_terraformer={count:1,on:0},Ht(),Ii()),!0)}},atmo_terraformer:{id:"space-atmo_terraformer",title:z("space_terraformer"),desc:()=>`
    ${z("space_terraformer")}
    ${z("requires_power")}
    `,wiki:!1,reqs:{terraforming:2},condition:()=>t.space.terraformer.count>=100,queue_complete:()=>0,cost:{},powered:e=>nc((e?e.truepath:t.race.truepath)?500:5e3),postPower(e){e?setTimeout((function(){t.tech.terraforming=i.atmo_terraformer?3:2,Ht()}),250):(t.tech.terraforming=2,Ht())},effect(e){let t=At(),a=$(this)[0].powered(e),r=a>0?`
    ${z("minus_power",[a])}
    `:"";return`
    ${z("space_terraformer_effect2")}
    ${t}${r}`},action:()=>!1},terraform:{id:"space-terraform",title:z("space_terraform"),desc:z("space_terraform"),reqs:{terraforming:3},queue_complete:()=>0,no_multi:!0,cost:{},effect(){let e=At();return`
    ${z("space_terraform_effect")}
    ${e}`},action(){return!!Cs($(this)[0])&&(ia(),!0)}},assembly:Jr("assembly","space"),living_quarters:{id:"space-living_quarters",title:z("space_red_living_quarters_title"),desc:()=>`
    ${z("space_red_living_quarters_desc")}
    ${z("space_support",[ea().red])}
    `,reqs:{mars:1},cost:{Money:e=>ec("living_quarters",e,Zt(38e3),1.28),Steel:e=>ec("living_quarters",e,Zt(15e3),1.28),Polymer:e=>ec("living_quarters",e,Zt(9500),1.28),Horseshoe:()=>t.race.hooved?2:0},effect(){let e=$(this)[0].citizens(),a="";return(t.race.cataclysm||t.race.orbit_decayed)&&(a=`
    ${z("plus_max_resource",[`$${Nr(t.tech.home_safe>=2?t.tech.home_safe>=3?"100000":"50000":"25000")}`,z("resource_Money_name")])}
    `),`
    ${z("space_used_support",[ea().red])}
    ${a}
    ${z("plus_max_resource",[ua(1),t.race.truepath?z("job_colonist_tp",[ea().red]):z("colonist")])}
    ${z("plus_max_resource",[e,z("citizen")])}
    `},support:()=>-1,powered:()=>nc(1),action(){if(Cs($(this)[0])){if(Dt("living_quarters"),t.civic.colonist.display=!0,t.space.spaceport.support0)){let e=t.civic[t.civic.d_job].workers-ua(1)<0?t.civic[t.civic.d_job].workers:ua(1);t.civic[t.civic.d_job].workers-=e,t.civic.colonist.workers+=e}return!0}return!1},citizens(){let e=t.race.cataclysm||t.race.orbit_decayed?2:1;return c.biodome&&(e+=(t.tech.mars>=6?.1:.05)*c.biodome),+ua(e).toFixed(2)}},pylon:{id:"space-pylon",title:z("space_red_pylon"),desc:z("space_red_pylon"),reqs:{magic:2},condition:()=>!(!t.race.cataclysm&&!t.race.orbit_decayed),cost:{Money:e=>ec("pylon",e,10,1.48),Stone:e=>ec("pylon",e,12,1.42),Crystal:e=>ec("pylon",e,8,1.42)-3},effect(){let e=Nr(2);return`
    ${z("gain",[+(.005*lc("magic")).toFixed(3),t.resource.Mana.name])}
    ${z("plus_max_resource",[e,t.resource.Mana.name])}
    `},special:()=>!!(t.tech.magic&&t.tech.magic>=3),action(){return!!Cs($(this)[0])&&(t.space.pylon.count++,t.resource.Mana.max+=Nr(2),!0)}},vr_center:{id:"space-vr_center",title:z("space_red_vr_center_title"),desc:()=>`
    ${z("space_red_vr_center_desc")}
    ${z("space_support",[ea().red])}
    `,reqs:{mars:1,broadcast:3},cost:{Money:e=>ec("vr_center",e,38e4,1.25),Copper:e=>ec("vr_center",e,55e3,1.25),Stanene:e=>ec("vr_center",e,1e5,1.25),Soul_Gem:e=>ec("vr_center",e,1,1.25)},effect(){let e=D("gaslighter",1),a=e?e+1:1;return t.race.orbit_decayed&&(a+=2),`
    ${z("space_used_support",[ea().red])}
    ${z("space_red_vr_center_effect1",[a])}
    ${z("space_red_vr_center_effect2",[2])}
    `},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("vr_center"),t.space.spaceport.support`
    ${z("space_red_garage_desc")}
    `,reqs:{mars:1},cost:{Money:e=>ec("garage",e,75e3,1.28),Iron:e=>ec("garage",e,12e3,1.28),Brick:e=>ec("garage",e,3e3,1.28),Sheet_Metal:e=>ec("garage",e,1500,1.28)},wide:!0,res(){let e=["Copper","Iron","Cement","Steel","Titanium","Alloy","Nano_Tube","Neutronium","Infernite"];return(t.race.cataclysm||t.race.orbit_decayed)&&(e.push("Polymer"),e.push("Coal"),e.push("Lumber"),e.push("Chrysotile"),e.push("Stone"),e.push("Furs")),e},heavy:e=>!!["Copper","Iron","Steel","Titanium","Neutronium","Infernite"].includes(e),val(e){switch(e){case"Copper":return 6500;case"Iron":return 5500;case"Cement":return t.race.cataclysm?10500:6e3;case"Steel":return 4500;case"Titanium":return 3500;case"Alloy":case"Polymer":return 2500;case"Nano_Tube":return 25e3;case"Neutronium":return 125;case"Infernite":return 75;case"Coal":return 1500;case"Lumber":case"Chrysotile":case"Stone":return 7500;case"Furs":return 2200;default:return 0}},multiplier(e){let a=t.tech.particles>=4?1+t.tech.supercollider/20:1;return(t.tech.world_control||t.race.cataclysm||t.race.orbit_decayed)&&(a*=2),t.tech.shelving&&t.tech.shelving>=3&&(a*=1.5),a*=t.stats.achieve.blackhole?1+.05*t.stats.achieve.blackhole.l:1,e&&t.tech.shelving&&t.tech.shelving>=2?3*a:a},effect(){let e=$(this)[0].multiplier(!1),a=$(this)[0].multiplier(!0),r=t.tech.particles>=4?20+t.tech.supercollider:20;(t.tech.world_control||t.race.cataclysm||t.race.orbit_decayed)&&(r+=10);let s=t.race.cataclysm||t.race.orbit_decayed?`${z("plus_max_resource",[r,z("resource_Crates_name")])}`:"",i='
    ';i+=`${z("plus_max_resource",[r,z("resource_Containers_name")])}${s}`;for(const r of $(this)[0].res())if(t.resource[r].display){let s=$(this)[0].heavy(r);i+=`${z("plus_max_resource",[q(+(Nr($(this)[0].val(r))*(s?a:e)).toFixed(0),1),t.resource[r].name])}`}return i+="
    ",i},action(){if(Cs($(this)[0])){Dt("garage");let e=$(this)[0].multiplier(!1),a=$(this)[0].multiplier(!0);for(const r of $(this)[0].res())if(t.resource[r].display){let s=$(this)[0].heavy(r);t.resource[r].max+=Nr($(this)[0].val(r))*(s?a:e)}return!0}return!1}},red_mine:{id:"space-red_mine",title:z("space_red_mine_title"),desc:()=>`
    ${z("space_red_mine_desc")}
    ${z("space_support",[ea().red])}
    `,reqs:{mars:1},cost:{Money:e=>ec("red_mine",e,5e4,1.32),Lumber:e=>ec("red_mine",e,65e3,1.32),Iron:e=>ec("red_mine",e,33e3,1.32)},effect(){let e=Oe("red_mine","copper"),a=Oe("red_mine","titanium"),r=+e.b.toFixed(3),s=+a.b.toFixed(3),i="";t.race.truepath&&(t.civic.foreign.gov3.hstl<10?i=`
    ${z("space_rival_ally",[+(100*e.g).toFixed(1)])}
    `:t.civic.foreign.gov3.hstl>60&&(i=`
    ${z("space_rival_war",[+(100*e.g).toFixed(1)])}
    `));let c=t.race.orbit_decayed?`
    ${z("city_mine_effect1",[ua(1)])}
    ${z("city_coal_mine_effect1",[ua(1)])}
    `:"",o=t.race.cataclysm||t.race.orbit_decayed&&!t.race.sappy?`
    ${z("space_red_mine_effect",[+Oe("red_mine","stone").toFixed(2),t.resource.Stone.name])}
    `:"",n=t.race.cataclysm||t.race.orbit_decayed&&t.race.smoldering?`
    ${z("space_red_mine_effect",[+Oe("red_mine","asbestos").toFixed(2),t.resource.Chrysotile.name])}
    `:"",l=t.race.cataclysm||t.race.orbit_decayed?`
    ${z("space_red_mine_effect",[+Oe("red_mine","aluminium").toFixed(2),t.resource.Aluminium.name])}
    `:"";return`
    ${z("space_used_support",[ea().red])}
    ${c}
    ${z("space_red_mine_effect",[r,t.resource.Copper.name])}
    ${z("space_red_mine_effect",[s,t.resource.Titanium.name])}
    ${i}${n}${o}${l}`},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("red_mine"),t.space.spaceport.support`
    ${z("space_red_fabrication_desc")}
    ${z("space_support",[ea().red])}
    `,reqs:{mars:1},cost:{Money:e=>ec("fabrication",e,9e4,1.32),Copper:e=>ec("fabrication",e,25e3,1.32),Cement:e=>ec("fabrication",e,12e3,1.32),Wrought_Iron:e=>ec("fabrication",e,1200,1.32)},effect(){let e=t.race.cataclysm&&!t.race.flier?`
    ${z("city_cement_plant_effect1",[ua(1)])}
    `:"",a=t.race.cataclysm||t.race.orbit_decayed?5:2;return t.race.high_pop&&(a=Pe(a)),`
    ${z("space_used_support",[ea().red])}
    ${z("space_red_fabrication_effect1",[ua(1)])}
    ${e}
    ${z("space_red_fabrication_effect2",[a])}
    `},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("fabrication"),t.space.spaceport.support`
    ${z("space_red_factory_desc")}
    ${z("requires_power_combo",[t.resource.Helium_3.name])}
    `,reqs:{mars:4},cost:{Money:e=>ec("red_factory",e,75e3,1.32),Brick:e=>ec("red_factory",e,1e4,1.32),Coal:e=>ec("red_factory",e,7500,1.32),Mythril:e=>ec("red_factory",e,50,1.32)},effect(e){let a=`
    ${z("space_red_factory_effect1")}
    `;return t.tech.foundry>=7&&(a+=`
    ${z("space_red_factory_effect2")}
    `),t.race.orbit_decayed&&!t.race.flier&&(a+=`
    ${z("city_cement_plant_effect1",[ua(1)])}
    `),a+=`
    ${z("space_red_factory_effect3",[+Yt(1,!0,e).toFixed(2),$(this)[0].powered()])}
    `,a},powered:()=>nc(3),special:!0,action(){return!!Cs($(this)[0])&&(t.space.red_factory.count++,ks($(this)[0])&&t.city.factory.Alloy++,t.settings.showIndustry=!0,Qs(),!0)}},nanite_factory:Jr("nanite_factory","space"),biodome:{id:"space-biodome",title:()=>t.race.artifical?z("space_red_signal_tower_title"):t.race.soul_eater?z("space_red_asphodel_title"):z("space_red_biodome_title"),desc(){let e;return e=t.race.artifical?`
    ${z("space_red_signal_tower_title")}
    `:t.race.soul_eater?`
    ${z("space_red_asphodel_desc")}
    `:t.race.carnivore?`
    ${z("space_red_biodome_desc_carn")}
    `:`
    ${z("space_red_biodome_desc",[ea().red])}
    `,`
    ${e}
    ${z("space_support",[ea().red])}
    `},reqs:{mars:2},cost:{Money:e=>ec("biodome",e,45e3,1.28),Lumber:e=>ec("biodome",e,65e3,1.28),Brick:e=>ec("biodome",e,1e3,1.28),Nanite:e=>t.race.deconstructor?ec("biodome",e,75,1.28):0},effect(){let e=+Oe("biodome","food").toFixed(2),a=t.race.cataclysm||t.race.orbit_decayed?`
    ${z("produce",[+Oe("biodome","cat_food").toFixed(2),t.resource.Food.name])}
    `:"",r=!t.race.cataclysm&&!t.race.orbit_decayed||t.race.kindling_kindred?"":`
    ${z("space_red_mine_effect",[+Oe("biodome","lumber").toFixed(2),t.resource.Lumber.name])}
    `,s=t.tech.mars>=6?.1:.05,i=t.race.artifical?z("city_transmitter_effect",[Nr(500)]):z("plus_max_resource",[Nr(100),z("resource_Food_name")]),c=t.race.artifical||t.race.orbit_decayed?`
    ${i}${z("space_used_support",[ea().red])}
    ${a}
    ${z("space_red_biodome_effect",[e,t.resource.Food.name])}
    ${z("space_red_biodome_effect2",[+ua(s).toFixed(2)])}
    ${r}${c}`},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("biodome"),t.race.cataclysm||(eo("colonist"),t.race.joyless&&(eo("joyless"),delete t.race.joyless,gs())),t.space.spaceport.supportt.race.artifical?z("space_red_signal_tower_flair"):t.race.soul_eater?z("space_red_asphodel_flair"):t.race.carnivore?z("space_red_biodome_flair_carn"):z("space_red_biodome_flair")},red_university:{id:"space-red_university",title:z("city_university"),desc:()=>z("city_university_desc",[ea().red]),reqs:{mars:1},trait:["orbit_decayed"],cost:{Money:e=>ec("university",e,900,1.5,"city")-500,Lumber:e=>ec("university",e,500,1.36,"city")-200,Stone:e=>ec("university",e,750,1.36,"city")-350,Crystal:e=>"magic"===t.race.universe?ec("university",e,5,1.36,"city"):0},wiki:!1,effect:()=>Zr.city.university.effect(),action(){if(Cs($(this)[0])){let e=t.tech.science&&t.tech.science>=8?700:500;if(t.tech.supercollider){let a=t.tech.particles&&t.tech.particles>=3?12.5:25;e*=t.tech.supercollider/a+1}return t.resource.Knowledge.max+=e,t.city.university.count++,t.space.red_university.count=t.city.university.count,t.civic.professor.display=!0,t.civic.professor.max=t.city.university.count,!0}return!1}},exotic_lab:{id:"space-exotic_lab",title:z("space_red_exotic_lab_title"),desc:()=>`
    ${z("space_red_exotic_lab_desc")}
    ${z("space_support",[ea().red])}
    `,reqs:{mars:5},cost:{Money:e=>ec("exotic_lab",e,75e4,1.28),Steel:e=>ec("exotic_lab",e,1e5,1.28),Mythril:e=>ec("exotic_lab",e,1e3,1.28),Elerium:e=>ec("exotic_lab",e,20,1.28)-4},effect(){let e=500;t.tech.science>=13&&t.interstellar.laboratory&&o.laboratory&&(e+=25*o.laboratory),t.tech.ancient_study&&t.tech.ancient_study>=2&&(e+=15*t.space.ziggurat.count),t.tech.mass>=2&&i.mass_driver&&(e+=Pe(i.mass_driver*t.civic.scientist.workers)),t.tech.science>=21&&(e*=1.45),t.race.high_pop&&(e=Pe(e));let a=Nr(10),r="",s="";return(t.race.cataclysm||t.race.orbit_decayed)&&(r=`
    ${z("city_wardenclyffe_effect1",[ua(1),t.civic.scientist.name])}
    `,e*=1+.25*c.observatory,t.tech.science>=15&&(s=`
    ${z("city_wardenclyffe_effect4",[2])}
    `)),`
    ${z("space_used_support",[ea().red])}
    ${r}${s}
    ${z("space_red_exotic_lab_effect1",[+e.toFixed(0)])}
    ${z("plus_max_resource",[a,z("resource_Elerium_name")])}
    `},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("exotic_lab"),t.space.spaceport.support`
    ${z("space_red_exotic_lab_flair1")}
    ${z("space_red_exotic_lab_flair2")}
    `},ziggurat:{id:"space-ziggurat",title:z("space_red_ziggurat_title"),desc:()=>`
    ${z("space_red_ziggurat_desc",["none"!==t.race.old_gods?_i[t.race.old_gods.toLowerCase()].entity:_i[t.race.species].entity])}
    `,reqs:{theology:4},cost:{Money:e=>ec("ziggurat",e,6e5,1.28),Stone:e=>ec("ziggurat",e,25e4,1.28),Aluminium:e=>ec("ziggurat",e,7e4,1.28),Mythril:e=>ec("ziggurat",e,250,1.28)},effect(){let e=t.tech.ancient_study?.6:.4;if(t.tech.ancient_deify&&t.tech.ancient_deify>=2&&c.exotic_lab&&(e+=.01*c.exotic_lab),"theocracy"===t.civic.govern.type&&t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display){let a=.002;t.race.high_pop&&(a=Pe(a)),e+=a*t.civic.priest.workers}t.race.ooze&&(e*=1-di.ooze.vars()[1]/100),t.race.high_pop&&(e=Pe(e)),e=+e.toFixed(2);let a=t.race.truepath?[e,_i[t.race.species].home]:[e],r=`
    ${z(t.race.truepath?"space_red_ziggurat_effect_tp":"space_red_ziggurat_effect",a)}
    `;return t.tech.ancient_study&&t.tech.ancient_study>=2&&(r+=`
    ${z("interstellar_laboratory_effect",[3])}
    `),(t.race.cataclysm||t.race.orbit_decayed)&&(r+=ss()),t.genes.ancients&&t.genes.ancients>=4&&(r+=`
    ${z("city_temple_effect6",[ua(1)])}
    `),r},action(){return!!Cs($(this)[0])&&(Dt("ziggurat"),t.genes.ancients&&t.genes.ancients>=4&&(t.civic.priest.display=!0),t.race.cataclysm&&eo("iron_will",!1,1),!0)}},space_barracks:{id:"space-space_barracks",title:z("space_red_space_barracks_title"),desc:()=>`
    ${z("space_red_space_barracks_desc")}
    ${z("space_red_space_barracks_desc_req")}
    `,reqs:{marines:1},cost:{Money:e=>ec("space_barracks",e,35e4,1.28),Alloy:e=>ec("space_barracks",e,65e3,1.28),Iridium:e=>ec("space_barracks",e,22500,1.28),Wrought_Iron:e=>ec("space_barracks",e,12500,1.28),Horseshoe:()=>t.race.hooved?2:0},effect(e){let a=t.race.orbit_decayed?Zr.city.boot_camp.effect():"",r=+Yt(2,!0,e).toFixed(2),s=t.tech.marines>=2?ua(4):ua(2),i=t.race.cataclysm?"":`
    ${z("space_red_space_barracks_effect3",[t.resource.Food.name])}
    `;return`
    ${z("plus_max_soldiers",[s])}
    ${a}
    ${z("space_red_space_barracks_effect2",[r])}
    ${i}`},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("space_barracks"),t.space.space_barracks.on++,!0)},flair:()=>z("space_red_space_barracks_flair")},bonfire:Jr("bonfire","space"),horseshoe:Jr("horseshoe","space")},spc_hell:{info:{name:()=>ea().hell,desc:()=>z("space_hell_info_desc",[ea().hell]),zone:"inner",syndicate:()=>!1},hell_mission:{id:"space-hell_mission",title:()=>z("space_mission_title",[ea().hell]),desc:()=>z("space_mission_desc",[ea().hell]),reqs:{space:3,space_explore:3},grant:["hell",1],queue_complete:()=>t.tech.hell>=1?0:1,cost:{Helium_3:(e,t)=>+Yt(6500,!1,t).toFixed(0)},effect:()=>z("space_hell_mission_effect1",[ea().hell]),action(){return!!Cs($(this)[0])&&(Bi(z("space_hell_mission_action",[ea().hell]),"info",!1,["progress"]),t.space.geothermal={count:0,on:0},!0)}},geothermal:{id:"space-geothermal",title:z("space_hell_geothermal_title"),desc:()=>`
    ${z("space_hell_geothermal_desc")}
    ${z("space_hell_geothermal_desc_req")}
    `,reqs:{hell:1},cost:{Money:e=>ec("geothermal",e,38e3,1.35),Steel:e=>ec("geothermal",e,15e3,1.35),Polymer:e=>ec("geothermal",e,9500,1.35)},effect(e){let a=+Yt($(this)[0].p_fuel().a,!0,e).toFixed(2);return`${t.race.cataclysm||t.race.orbit_decayed?`
    ${z("interstellar_stellar_forge_effect3",[1])}
    `:""}${z("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}, ${z("space_belt_station_effect3",[a])}`},special:()=>!(!t.race.cataclysm&&!t.race.orbit_decayed),powered(){let e=-8;return t.race.forge&&(e-=di.forge.vars()[0]),t.stats.achieve.failed_history&&t.stats.achieve.failed_history.l>=5&&(e-=2),oc(e)},p_fuel:()=>({r:"Helium_3",a:.5}),action(){return!!Cs($(this)[0])&&(Dt("geothermal"),t.space.geothermal.on++,!0)}},hell_smelter:{id:"space-hell_smelter",title:()=>z("space_hell_smelter_title",[ea().hell]),desc:()=>z("space_hell_smelter_title",[ea().hell]),reqs:{hell:1,m_smelting:1},path:["truepath"],cost:{Money:e=>ec("hell_smelter",e,25e4,1.24),Adamantite:e=>ec("hell_smelter",e,15e3,1.24)},effect:()=>`
    ${z("interstellar_stellar_forge_effect3",[2])}
    `,special:!0,action(){return!!Cs($(this)[0])&&(Dt("hell_smelter"),t.city.smelter.cap+=2,t.city.smelter.Steel+=2,t.city.smelter.Oil+=2,!0)}},spc_casino:{id:"space-spc_casino",title:z("city_casino"),desc:z("city_casino"),category:"commercial",reqs:{hell:1,gambling:1},condition:()=>!!(t.race.cataclysm||t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=5),cost:{Money:e=>ec("spc_casino",e,4e5,1.35),Furs:e=>ec("spc_casino",e,75e3,1.35),Cement:e=>ec("spc_casino",e,1e5,1.35),Plywood:e=>ec("spc_casino",e,2e4,1.35)},effect(){let e=is();return e+=`
    ${z("minus_power",[$(this)[0].powered()])}
    `,e},powered:()=>nc(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=2?2:3),action(){return!!Cs($(this)[0])&&(t.space.spc_casino.count++,t.race.joyless||(t.civic.entertainer.max+=ua(1),t.civic.entertainer.display=!0),ks($(this)[0]),!0)},flair:z("city_casino_flair")},swarm_plant:{id:"space-swarm_plant",title:z("space_hell_swarm_plant_title"),desc:()=>`
    ${z("space_hell_swarm_plant_desc")}
    `,reqs:{solar:4,hell:1},cost:{Money:e=>ec("swarm_plant",e,Vt(75e3),1.28),Iron:e=>ec("swarm_plant",e,Vt(65e3),1.28),Neutronium:e=>ec("swarm_plant",e,Vt(75),1.28),Brick:e=>ec("swarm_plant",e,Vt(2500),1.28),Mythril:e=>ec("swarm_plant",e,Vt(100),1.28)},effect(){let e=t.tech.swarm?.88:.94;return t.tech.swarm>=3&&(e-=u/100),e<.05&&(e=.05),e=+(100*(1-e)).toFixed(2),z("space_hell_swarm_plant_effect1",[e])},action(){return!!Cs($(this)[0])&&(Dt("swarm_plant"),!0)}},firework:Jr("firework","space")},spc_sun:{info:{name:()=>z("space_sun_info_name"),desc:()=>z("space_sun_info_desc",[_i[t.race.species].home]),support:"swarm_control",zone:"inner",syndicate:()=>!1},sun_mission:{id:"space-sun_mission",title:()=>z("space_sun_mission_title"),desc:()=>z("space_sun_mission_desc"),reqs:{space_explore:4},grant:["solar",1],queue_complete:()=>t.tech.solar>=1?0:1,cost:{Helium_3:(e,t)=>+Yt(15e3,!1,t).toFixed(0)},effect:()=>z("space_sun_mission_effect1"),action(){return!!Cs($(this)[0])}},swarm_control:{id:"space-swarm_control",title:z("space_sun_swarm_control_title"),desc:()=>`
    ${z("space_sun_swarm_control_desc")}
    `,reqs:{solar:3},cost:{Money:e=>ec("swarm_control",e,1e5,1.3),Knowledge:e=>ec("swarm_control",e,6e4,1.3),Alloy:e=>ec("swarm_control",e,7500,1.3),Helium_3:(e,t)=>ec("swarm_control",e,Yt(2e3,!1,t),1.3),Mythril:e=>ec("swarm_control",e,250,1.3)},effect(){return z("space_sun_swarm_control_effect1",[$(this)[0].support()])},support:()=>t.tech.swarm&&t.tech.swarm>=2?t.tech.high_tech>=11?11+Math.round(u):12:10,action(){return!!Cs($(this)[0])&&(Dt("swarm_control"),t.space.swarm_control.s_max+=$(this)[0].support(),!0)}},swarm_satellite:{id:"space-swarm_satellite",title:z("space_sun_swarm_satellite_title"),desc:()=>`
    ${z("space_sun_swarm_satellite_desc")}
    ${z("space_sun_swarm_satellite_desc_req")}
    `,reqs:{solar:3},cost:{Money:e=>ec("swarm_satellite",e,Jt(5e3),1.1),Copper:e=>ec("swarm_satellite",e,Jt(2500),1.1),Iridium:e=>ec("swarm_satellite",e,Jt(150),1.1),Helium_3:(e,t)=>ec("swarm_satellite",e,Jt(Yt(50,!1,t)),1.1)},effect(){let e=.35;return t.tech.swarm>=4&&(e+=.15*(t.tech.swarm-3)),t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=1&&(e+=.15),t.blood.illuminate&&(e+=.01*t.blood.illuminate),e=+e.toFixed(2),`${z("space_dwarf_reactor_effect1",[oc(e)])}, ${z("space_sun_swarm_satellite_effect1",[1])}`},support:()=>-1,action(){return!!Cs($(this)[0])&&(Dt("swarm_satellite"),t.space.swarm_control.support++,!0)}},jump_gate:{id:"space-jump_gate",title:z("tau_jump_gate"),desc:e=>!t.space.hasOwnProperty("jump_gate")||t.space.jump_gate.count<100||e?`
    ${z("tau_jump_gate")}
    ${z("requires_segmemts",[100])}
    `:`
    ${z("tau_jump_gate")}
    `,reqs:{tauceti:3},path:["truepath"],queue_size:10,queue_complete:()=>100-t.space.jump_gate.count,cost:{Money:e=>(e||0)+(t.space.hasOwnProperty("jump_gate")?t.space.jump_gate.count:0)<100?1e6:0,Alloy:e=>(e||0)+(t.space.hasOwnProperty("jump_gate")?t.space.jump_gate.count:0)<100?5e4:0,Adamantite:e=>(e||0)+(t.space.hasOwnProperty("jump_gate")?t.space.jump_gate.count:0)<100?12500:0,Graphene:e=>(e||0)+(t.space.hasOwnProperty("jump_gate")?t.space.jump_gate.count:0)<100?42e3:0,Orichalcum:e=>(e||0)+(t.space.hasOwnProperty("jump_gate")?t.space.jump_gate.count:0)<100?35e3:0,Quantium:e=>(e||0)+(t.space.hasOwnProperty("jump_gate")?t.space.jump_gate.count:0)<100?25e3:0},effect(e){let a=(e||0)+(t.space.hasOwnProperty("jump_gate")?t.space.jump_gate.count:0);if(a<100){let e=100-a;return`
    ${z("tau_jump_gate_effect")}
    ${z("space_dwarf_collider_effect2",[e])}
    `}return z("tau_jump_gate_effect")},action(){return!!(Cs($(this)[0])&&t.space.jump_gate.count<100)&&(t.space.jump_gate.count++,!0)}}},spc_gas:{info:{name:()=>ea().gas,desc:()=>z("space_gas_info_desc",[ea().gas,_i[t.race.species].home]),zone:"outer",syndicate:()=>!0},gas_mission:{id:"space-gas_mission",title:()=>z("space_mission_title",[ea().gas]),desc:()=>z("space_mission_desc",[ea().gas]),reqs:{space:4,space_explore:4},grant:["space",5],queue_complete:()=>t.tech.space>=5?0:1,cost:{Helium_3:(e,t)=>+Yt(12500,!1,t).toFixed(0)},effect:()=>z("space_gas_mission_effect",[ea().gas]),action(){return!!Cs($(this)[0])&&(Bi(z("space_gas_mission_action",[ea().gas]),"info",!1,["progress"]),t.settings.space.gas_moon=!0,t.settings.space.belt=!0,t.space.space_station={count:0,on:0,support:0,s_max:0},!0)}},gas_mining:{id:"space-gas_mining",title:z("space_gas_mining_title"),desc:()=>`
    ${z("space_gas_mining_desc")}
    ${z("requires_power")}
    `,reqs:{gas_giant:1},cost:{Money:e=>ec("gas_mining",e,25e4,1.32),Uranium:e=>ec("gas_mining",e,500,1.32),Alloy:e=>ec("gas_mining",e,1e4,1.32),Helium_3:(e,t)=>ec("gas_mining",e,Yt(2500,!1,t),1.32),Mythril:e=>ec("gas_mining",e,25,1.32)},effect(){return`
    ${z("space_gas_mining_effect1",[+Oe("gas_mining").toFixed(2)])}
    ${z("minus_power",[$(this)[0].powered()])}
    `},powered:()=>nc(2),action(){return!!Cs($(this)[0])&&(Dt("gas_mining"),ks($(this)[0]),!0)}},gas_storage:{id:"space-gas_storage",title:()=>z("space_gas_storage_title",[ea().gas]),desc:()=>`
    ${z("space_gas_storage_desc")}
    `,reqs:{gas_giant:1},cost:{Money:e=>ec("gas_storage",e,125e3,1.32),Iridium:e=>ec("gas_storage",e,3e3,1.32),Sheet_Metal:e=>ec("gas_storage",e,2e3,1.32),Helium_3:(e,t)=>ec("gas_storage",e,Yt(1e3,!1,t),1.32)},effect(){let e=Nr(3500)*(t.tech.world_control?1.5:1),a=Nr(2500)*(t.tech.world_control?1.5:1),r=Nr(1e3)*(t.tech.world_control?1.5:1);return`
    ${z("plus_max_resource",[e,z("resource_Oil_name")])}
    ${z("plus_max_resource",[a,z("resource_Helium_3_name")])}
    ${z("plus_max_resource",[r,z("resource_Uranium_name")])}
    `},action(){return!!Cs($(this)[0])&&(Dt("gas_storage"),!0)}},star_dock:{id:"space-star_dock",title:()=>z("space_gas_star_dock_title"),desc:()=>`
    ${z("space_gas_star_dock_title")}
    ${z("space_gas_star_dock_desc_req")}
    `,reqs:{genesis:3},queue_complete:()=>1-t.space.star_dock.count,cost:{Money:e=>(e||0)+(t.space.hasOwnProperty("star_dock")?t.space.star_dock.count:0)===0?15e5:0,Steel:e=>(e||0)+(t.space.hasOwnProperty("star_dock")?t.space.star_dock.count:0)===0?5e5:0,Helium_3:(e,a)=>(e||0)+(t.space.hasOwnProperty("star_dock")?t.space.star_dock.count:0)===0?Math.round(Yt(1e4,!1,a)):0,Nano_Tube:e=>(e||0)+(t.space.hasOwnProperty("star_dock")?t.space.star_dock.count:0)===0?25e4:0,Mythril:e=>(e||0)+(t.space.hasOwnProperty("star_dock")?t.space.star_dock.count:0)===0?1e4:0},effect:()=>`
    ${z("space_gas_star_dock_effect1")}
    `,special:!0,action(){return!(0!==t.space.star_dock.count||!Cs($(this)[0])||(Dt("star_dock"),0))}}},spc_gas_moon:{info:{name:()=>ea().gas_moon,desc:()=>z("space_gas_moon_info_desc",[ea().gas_moon,ea().gas]),zone:"outer",syndicate:()=>!0},gas_moon_mission:{id:"space-gas_moon_mission",title:()=>z("space_mission_title",[ea().gas_moon]),desc:()=>z("space_mission_desc",[ea().gas_moon]),reqs:{space:5},grant:["space",6],queue_complete:()=>t.tech.space>=6?0:1,cost:{Helium_3:(e,t)=>+Yt(3e4,!1,t).toFixed(0)},effect:()=>z("space_gas_moon_mission_effect",[ea().gas_moon]),action(){return!!Cs($(this)[0])&&(Bi(z("space_gas_moon_mission_action",[ea().gas_moon]),"info",!1,["progress"]),t.space.outpost={count:0,on:0},t.tech.gas_moon=1,!0)}},outpost:{id:"space-outpost",title:z("space_gas_moon_outpost_title"),desc:()=>`
    ${z("space_gas_moon_outpost_desc")}
    ${z("requires_power_combo",[t.resource.Oil.name])}
    `,reqs:{gas_moon:1},cost:{Money:e=>ec("outpost",e,666e3,1.3),Titanium:e=>ec("outpost",e,18e3,1.3),Iridium:e=>ec("outpost",e,2500,1.3),Helium_3:(e,t)=>ec("outpost",e,Yt(6e3,!1,t),1.3),Mythril:e=>ec("outpost",e,300,1.3)},effect(e){let t=+Oe("outpost").toFixed(3),a=Nr(500),r=+Yt(2,!0,e).toFixed(2);return`
    ${z("space_gas_moon_outpost_effect1",[t])}
    ${z("plus_max_resource",[a,z("resource_Neutronium_name")])}
    ${z("space_gas_moon_outpost_effect3",[r,$(this)[0].powered()])}
    `},powered:()=>nc(3),powerBalancer:()=>[{r:"Neutronium",k:"lpmod"}],action(){return!!Cs($(this)[0])&&(Dt("outpost"),t.resource.Neutronium.display=!0,ks($(this)[0]),!0)}},drone:{id:"space-drone",title:z("space_gas_moon_drone_title"),desc:()=>`
    ${z("space_gas_moon_drone_desc")}
    `,reqs:{gas_moon:1,drone:1},cost:{Money:e=>ec("drone",e,25e4,1.3),Steel:e=>ec("drone",e,2e4,1.3),Neutronium:e=>ec("drone",e,500,1.3),Elerium:e=>ec("drone",e,25,1.3),Nano_Tube:e=>ec("drone",e,45e3,1.3)},effect:()=>`
    ${z("space_gas_moon_drone_effect1",[t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=3?12:6])}
    `,action(){return!!Cs($(this)[0])&&(Dt("drone"),!0)}},oil_extractor:{id:"space-oil_extractor",title:z("space_gas_moon_oil_extractor_title"),desc:()=>`
    ${z("space_gas_moon_oil_extractor_title")}
    ${z("requires_power")}
    `,reqs:{gas_moon:2},cost:{Money:e=>ec("oil_extractor",e,666e3,1.3),Polymer:e=>ec("oil_extractor",e,7500,1.3),Helium_3:(e,t)=>ec("oil_extractor",e,Yt(2500,!1,t),1.3),Wrought_Iron:e=>ec("oil_extractor",e,5e3,1.3)},effect(){return`${z("space_gas_moon_oil_extractor_effect1",[+Oe("oil_extractor").toFixed(2)])}, ${z("minus_power",[$(this)[0].powered()])}`},powered:()=>nc(1),powerBalancer:()=>[{r:"Oil",k:"lpmod"}],action(){return!!Cs($(this)[0])&&(Dt("oil_extractor"),ks($(this)[0]),!0)}}},spc_belt:{info:{name:()=>z("space_belt_info_name"),desc:()=>t.space.space_station&&t.space.space_station.count>0?`
    ${z("space_belt_info_desc",[ea().red,ea().gas])}
    ${z("space_belt_info_desc2")}
    `:z("space_belt_info_desc",[ea().red,ea().gas]),support:"space_station",zone:"inner",syndicate:()=>!0},belt_mission:{id:"space-belt_mission",title:()=>z("space_belt_mission_title"),desc:()=>z("space_belt_mission_desc"),reqs:{space:5},grant:["asteroid",1],queue_complete:()=>t.tech.asteroid>=1?0:1,cost:{Helium_3:(e,t)=>+Yt(25e3,!1,t).toFixed(0)},effect:()=>z("space_belt_mission_effect1"),action(){return!!Cs($(this)[0])&&(Bi(z("space_belt_mission_action"),"info",!1,["progress"]),t.settings.space.dwarf=!0,!0)}},space_station:{id:"space-space_station",title:z("space_belt_station_title"),desc:()=>`
    ${z("space_belt_station_desc")}
    ${z("requires_power_space",[t.resource.Food.name])}
    `,reqs:{asteroid:2},cost:{Money:e=>ec("space_station",e,25e4,1.3),Iron:e=>ec("space_station",e,85e3,1.3),Polymer:e=>ec("space_station",e,18e3,1.3),Iridium:e=>ec("space_station",e,2800,1.28),Helium_3:(e,t)=>ec("space_station",e,Yt(2e3,!1,t),1.3),Mythril:e=>ec("space_station",e,75,1.25)},effect(e){let a=+Yt(2.5,!0,e).toFixed(2),r=t.race.cataclysm?1:10,s=Nr(5),i=t.tech.asteroid>=5?`
    ${z("plus_max_resource",[s,z("resource_Elerium_name")])}
    `:"";return`
    ${z("plus_max_space_miners",[ua(3)])}
    ${i}
    ${z("space_belt_station_effect3",[a])}
    ${z("space_belt_station_effect4",[r,$(this)[0].powered(),t.resource.Food.name])}
    `},support:()=>ua(3),powered:()=>nc(3),refresh:!0,action(){if(Cs($(this)[0])){if(Dt("space_station"),t.civic.space_miner.display=!0,t.tech.asteroid<3&&(t.tech.asteroid=3),ks($(this)[0])&&t.civic[t.civic.d_job].workers>0){let e=ua(3);t.civic[t.civic.d_job].workers-e<0&&(e=t.civic[t.civic.d_job].workers),t.civic[t.civic.d_job].workers-=e,t.civic.space_miner.workers+=e}return t.race.orbit_decay&&t.race.orbit_decay>t.stats.days+1e3&&(t.race.orbit_decay=t.stats.days+1e3,Bi(z("evo_challenge_orbit_decayed_accelerated",[t.race.orbit_decay-t.stats.days]),"info",!1,["progress"])),!0}return!1}},elerium_ship:{id:"space-elerium_ship",title:z("space_belt_elerium_ship_title"),desc:()=>z("space_belt_elerium_ship_title"),reqs:{asteroid:5},cost:{Money:e=>ec("elerium_ship",e,5e5,1.3),Uranium:e=>ec("elerium_ship",e,2500,1.3),Titanium:e=>ec("elerium_ship",e,1e4,1.3),Mythril:e=>ec("elerium_ship",e,500,1.3),Helium_3:(e,t)=>ec("elerium_ship",e,Yt(5e3,!1,t),1.3)},effect(){let e=+Oe("elerium_ship").toFixed(4);return`
    ${z("space_belt_elerium_ship_effect1",[ua(2)])}
    ${z("space_belt_elerium_ship_effect2",[e])}
    `},support:()=>ua(-2),powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("elerium_ship"),t.space.space_station.support+1z("space_belt_iridium_ship_title"),reqs:{asteroid:3},cost:{Money:e=>ec("iridium_ship",e,12e4,1.3),Uranium:e=>ec("iridium_ship",e,1e3,1.3),Alloy:e=>ec("iridium_ship",e,48e3,1.3),Iridium:e=>ec("iridium_ship",e,2800,1.3),Helium_3:(e,t)=>ec("iridium_ship",e,Yt(1800,!1,t),1.3)},effect(){let e=+Oe("iridium_ship").toFixed(3);return`
    ${z("space_belt_iridium_ship_effect1",[ua(1)])}
    ${z("space_belt_iridium_ship_effect2",[e])}
    `},support:()=>ua(-1),powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("iridium_ship"),t.space.space_station.supportz("space_belt_iron_ship_title"),reqs:{asteroid:3},cost:{Money:e=>ec("iron_ship",e,8e4,1.3),Steel:e=>ec("iron_ship",e,42e3,1.3),Aluminium:e=>ec("iron_ship",e,38e3,1.3),Polymer:e=>ec("iron_ship",e,16e3,1.3),Helium_3:(e,t)=>ec("iron_ship",e,Yt(1200,!1,t),1.3)},effect(){let e=+Oe("iron_ship").toFixed(2);return t.tech.solar&&t.tech.solar>=5?`
    ${z("space_belt_iron_ship_effect1",[ua(1)])}
    ${z("space_belt_iron_ship_effect2",[e])}
    ${z("space_belt_iron_ship_effect3")}
    `:`
    ${z("space_belt_iron_ship_effect1",[ua(1)])}
    ${z("space_belt_iron_ship_effect2",[e])}
    `},support:()=>ua(-1),powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("iron_ship"),t.space.space_station.supportea().dwarf,desc:()=>z("space_dwarf_info_desc",[ea().dwarf]),zone:"inner",syndicate:()=>!1},dwarf_mission:{id:"space-dwarf_mission",title:()=>z("space_mission_title",[ea().dwarf]),desc:()=>z("space_mission_desc",[ea().dwarf]),reqs:{asteroid:1,elerium:1},grant:["dwarf",1],queue_complete:()=>t.tech.dwarf>=1?0:1,cost:{Helium_3:(e,t)=>+Yt(45e3,!1,t).toFixed(0)},effect:()=>z("space_dwarf_mission_effect1",[ea().dwarf]),action(){return!!Cs($(this)[0])&&(Bi(z("space_dwarf_mission_action",[ea().dwarf]),"info",!1,["progress"]),t.space.elerium_contain={count:0,on:0},!0)}},elerium_contain:{id:"space-elerium_contain",title:z("space_dwarf_elerium_contain_title"),desc:()=>`
    ${z("space_dwarf_elerium_contain_title")}
    ${z("requires_power")}
    `,reqs:{dwarf:1},cost:{Money:e=>ec("elerium_contain",e,8e5,1.28),Cement:e=>ec("elerium_contain",e,12e4,1.28),Iridium:e=>ec("elerium_contain",e,5e4,1.28),Neutronium:e=>ec("elerium_contain",e,250,1.28)},effect(){return`
    ${z("plus_max_resource",[Nr(100),z("resource_Elerium_name")])}
    ${z("minus_power",[$(this)[0].powered()])}
    `},powered:()=>nc(6),action(){return!!Cs($(this)[0])&&(Dt("elerium_contain"),ks($(this)[0]),!0)}},e_reactor:{id:"space-e_reactor",title:z("space_dwarf_reactor_title"),desc:()=>`
    ${z("space_dwarf_reactor_title")}
    ${z("space_dwarf_reactor_desc_req")}
    `,reqs:{elerium:2},cost:{Money:e=>ec("e_reactor",e,125e4,1.28),Steel:e=>ec("e_reactor",e,35e4,1.28),Neutronium:e=>ec("e_reactor",e,1250,1.28),Mythril:e=>ec("e_reactor",e,2500,1.28)},effect(){let e=$(this)[0].p_fuel().a;return`
    ${z("space_dwarf_reactor_effect1",[-1*$(this)[0].powered()])}
    ${z("space_dwarf_reactor_effect2",[e])}
    `},powered:()=>oc(-25),p_fuel:()=>({r:"Elerium",a:.05}),action(){return!!Cs($(this)[0])&&(Dt("e_reactor"),t.space.e_reactor.on++,!0)}},world_collider:{id:"space-world_collider",title:z("space_dwarf_collider_title"),desc(e){if(!t.space.hasOwnProperty("world_collider")||t.space.world_collider.count<1859||e)return`
    ${z("space_dwarf_collider_desc")}
    ${z("space_dwarf_collider_desc_req")}
    `+(t.space.hasOwnProperty("world_collider")&&t.space.world_collider.count>=1859?`
    ${z("requires_power")}
    `:"")},reqs:{science:10},path:["standard"],condition:()=>t.space.world_collider.count<1859,queue_size:100,queue_complete:()=>1859-t.space.world_collider.count,cost:{Money:e=>(e||0)+(t.space.hasOwnProperty("world_collider")?t.space.world_collider.count:0)<1859?25e3:0,Copper:e=>(e||0)+(t.space.hasOwnProperty("world_collider")?t.space.world_collider.count:0)<1859?750:0,Alloy:e=>(e||0)+(t.space.hasOwnProperty("world_collider")?t.space.world_collider.count:0)<1859?125:0,Neutronium:e=>(e||0)+(t.space.hasOwnProperty("world_collider")?t.space.world_collider.count:0)<1859?12:0,Elerium:e=>(e||0)+(t.space.hasOwnProperty("world_collider")?t.space.world_collider.count:0)<1859?1:0,Mythril:e=>(e||0)+(t.space.hasOwnProperty("world_collider")?t.space.world_collider.count:0)<1859?10:0},effect(e){let a=(e||0)+(t.space.hasOwnProperty("world_collider")?t.space.world_collider.count:0);if(a<1859){let e=1859-a;return`
    ${z("space_dwarf_collider_effect1")}
    ${z("space_dwarf_collider_effect2",[e])}
    `}return St.spc_dwarf.world_controller.effect()},action(){if(t.space.world_collider.count<1859&&Cs($(this)[0])){if(Dt("world_collider"),t.space.world_collider.count>=1859){if(t.tech.science=11,t.space.world_controller={count:1,on:0},gs(),Ht(),t.race.banana){let e=Xc();t.stats.banana.b2[e]=!0,"m"!==e&&"l"!==e&&(t.stats.banana.b2.l=!0)}Ii()}return!0}return!1},flair:z("space_dwarf_collider_flair")},world_controller:{id:"space-world_controller",title:z("space_dwarf_collider_title"),desc:()=>`
    ${z("space_dwarf_collider_title")}
    ${z("requires_power")}
    `,wiki:!1,reqs:{science:11},path:["standard"],condition:()=>!(t.space.world_collider.count<1859),queue_complete:()=>0,cost:{},effect(){let e=25;return t.interstellar.far_reach&&i.far_reach>0&&(e+=1*i.far_reach),t.tech.science>=19&&(e+=15),`
    ${z("plus_max_resource",[e+"%",z("resource_Knowledge_name")])}
    ${z("space_dwarf_controller_effect3")}
    ${z("minus_power",[$(this)[0].powered()])}
    `},powered:()=>nc(20),action:()=>!1,flair:z("space_dwarf_controller_flair")},shipyard:{id:"space-shipyard",title:z("outer_shipyard_title"),desc:()=>`
    ${z("outer_shipyard_title")}
    ${z("requires_power")}
    `,reqs:{shipyard:1},path:["truepath"],cost:{Money:e=>(e||0)+(t.space.hasOwnProperty("shipyard")?t.space.shipyard.count:0)<1?1e7:0,Aluminium:e=>(e||0)+(t.space.hasOwnProperty("shipyard")?t.space.shipyard.count:0)<1?1e6:0,Titanium:e=>(e||0)+(t.space.hasOwnProperty("shipyard")?t.space.shipyard.count:0)<1?65e4:0,Iridium:e=>(e||0)+(t.space.hasOwnProperty("shipyard")?t.space.shipyard.count:0)<1?25e4:0,Neutronium:e=>(e||0)+(t.space.hasOwnProperty("shipyard")?t.space.shipyard.count:0)<1?1e4:0,Mythril:e=>(e||0)+(t.space.hasOwnProperty("shipyard")?t.space.shipyard.count:0)<1?5e5:0},queue_complete:()=>1-t.space.shipyard.count,effect(){return`
    ${z("outer_shipyard_effect")}
    ${z("minus_power",[$(this)[0].powered()])}
    `},powered:()=>nc(50),special:!0,sAction(){i.shipyard&&(t.settings.civTabs=2,t.settings.govTabs=5,t.settings.tabLoad||(jt("mTabCivic"),Ii("space-shipyard")))},action(){return!!(t.space.shipyard.count<1&&Cs($(this)[0]))&&(Dt("shipyard"),ks($(this)[0])&&(t.settings.showShipYard=!0),t.tech.syard_class=2,t.tech.syard_armor=3,t.tech.syard_weapon=1,t.tech.syard_engine=2,t.tech.syard_power=3,t.tech.syard_sensor=3,!0)}},mass_relay:{id:"space-mass_relay",title:z("space_dwarf_mass_relay_title"),desc(e){if(!t.space.hasOwnProperty("mass_relay")||t.space.mass_relay.count<100||e)return`
    ${z("space_dwarf_mass_relay_title")}
    ${z("requires_segmemts",[100])}
    `},reqs:{outer:5},path:["truepath"],condition:()=>t.space.mass_relay.count<100,queue_size:5,queue_complete:()=>100-t.space.mass_relay.count,cost:{Money:e=>(e||0)+(t.space.hasOwnProperty("mass_relay")?t.space.mass_relay.count:0)<100?1e7:0,Neutronium:e=>(e||0)+(t.space.hasOwnProperty("mass_relay")?t.space.mass_relay.count:0)<100?7500:0,Adamantite:e=>(e||0)+(t.space.hasOwnProperty("mass_relay")?t.space.mass_relay.count:0)<100?18e3:0,Elerium:e=>(e||0)+(t.space.hasOwnProperty("mass_relay")?t.space.mass_relay.count:0)<100?125:0,Stanene:e=>(e||0)+(t.space.hasOwnProperty("mass_relay")?t.space.mass_relay.count:0)<100?1e5:0,Quantium:e=>(e||0)+(t.space.hasOwnProperty("mass_relay")?t.space.mass_relay.count:0)<100?25e3:0},effect(e){let a=(e||0)+(t.space.hasOwnProperty("mass_relay")?t.space.mass_relay.count:0);if(a<100){let e=100-a;return`
    ${z("space_dwarf_mass_relay_effect")}
    ${z("space_dwarf_collider_effect2",[e])}
    `}return St.spc_dwarf.m_relay.effect()},action(){return!!(t.space.mass_relay.count<100&&Cs($(this)[0]))&&(t.space.mass_relay.count++,t.space.mass_relay.count>=100&&(t.tech.outer=6,t.space.m_relay={count:1,on:1,charged:0},gs(),Ht(),Ii()),!0)}},m_relay:{id:"space-m_relay",title:z("space_dwarf_mass_relay_title"),desc:()=>`
    ${z("space_dwarf_mass_relay_title")}
    ${z("requires_power")}
    `,reqs:{outer:6},path:["truepath"],condition:()=>t.space.mass_relay.count>=100,wiki:!1,queue_complete:()=>0,cost:{},powered:()=>nc(100),effect(){let e=Math.floor(t.space.m_relay.charged/10)/10;return`
    ${z("space_dwarf_mass_relay_effect2",[ea().dwarf])}
    ${z("minus_power",[$(this)[0].powered()])}
    ${z("space_dwarf_mass_relay_charged",[e])}
    `},action:()=>!1}},spc_titan:et().spc_titan,spc_enceladus:et().spc_enceladus,spc_triton:et().spc_triton,spc_kuiper:et().spc_kuiper,spc_eris:et().spc_eris},Ft={int_alpha:{info:{name:z("interstellar_alpha_name"),desc:()=>t.tech.alpha?z("interstellar_alpha_desc2",[_i[t.race.species].home]):z("interstellar_alpha_desc1",[_i[t.race.species].home]),support:"starport"},alpha_mission:{id:"interstellar-alpha_mission",title:z("space_mission_title",[z("interstellar_alpha_name")]),desc:z("space_mission_desc",[z("interstellar_alpha_name")]),reqs:{ftl:2},grant:["alpha",1],queue_complete:()=>t.tech.alpha>=1?0:1,cost:{Helium_3:()=>+Xt(4e4).toFixed(0)},effect:z("interstellar_alpha_mission_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("interstellar_alpha_mission_result"),"info",!1,["progress"]),t.interstellar.nexus={count:0,on:0,support:0,s_max:0},t.interstellar.warehouse={count:0},!0)}},starport:{id:"interstellar-starport",title:z("interstellar_alpha_starport_title"),desc:()=>`
    ${z("interstellar_alpha_starport_desc")}
    ${z("requires_power_space",[t.resource.Food.name])}
    `,reqs:{alpha:1},cost:{Money:e=>ec("starport",e,1e6,1.3,"interstellar"),Aluminium:e=>ec("starport",e,4e5,1.3,"interstellar"),Neutronium:e=>ec("starport",e,1e3,1.3,"interstellar"),Elerium:e=>ec("starport",e,100,1.3,"interstellar")},effect(){let e=+Xt(5).toFixed(2);return`
    ${z("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
    ${z("interstellar_alpha_starport_effect2",[e,$(this)[0].powered()])}
    ${z("interstellar_alpha_starport_effect3",[100,t.resource.Food.name])}
    `},support:()=>5,powered:()=>nc(10),powerBalancer:()=>[{s:t.interstellar.starport.s_max-t.interstellar.starport.support}],refresh:!0,action(){return!!Cs($(this)[0])&&(Dt("starport","interstellar"),t.settings.space.proxima=!0,t.settings.space.nebula=!0,ks($(this)[0]),1===t.tech.alpha&&(t.tech.alpha=2,t.interstellar.mining_droid={count:0,on:0,adam:0,uran:0,coal:0,alum:0}),t.race.orbit_decay&&t.race.orbit_decay>t.stats.days+100&&(t.race.orbit_decay=t.stats.days+100,Bi(z("evo_challenge_orbit_decayed_accelerated",[t.race.orbit_decay-t.stats.days]),"info",!1,["progress"])),!0)}},habitat:{id:"interstellar-habitat",title:z("interstellar_habitat_title"),desc:`
    ${z("interstellar_habitat_desc")}
    ${z("requires_power")}
    `,reqs:{alpha:3},cost:{Money:e=>ec("habitat",e,8e5,1.25,"interstellar"),Furs:e=>ec("habitat",e,38e3,1.25,"interstellar"),Adamantite:e=>ec("habitat",e,3200,1.25,"interstellar"),Plywood:e=>ec("habitat",e,1e4,1.25,"interstellar"),Horseshoe:()=>t.race.hooved?1:0},effect(){let e=$(this)[0].citizens();return`
    ${z("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
    ${z("plus_max_citizens",[e])}, ${z("minus_power",[$(this)[0].powered()])}
    `},support:()=>1,powered:()=>nc(2),powerBalancer:()=>[{s:t.interstellar.starport.s_max-t.interstellar.starport.support}],action(){return!!Cs($(this)[0])&&(Dt("habitat","interstellar"),ks($(this)[0])&&(t.resource[t.race.species].max+=$(this)[0].citizens()),!0)},citizens(){let e=1;return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e}},mining_droid:{id:"interstellar-mining_droid",title:z("interstellar_mining_droid_title"),desc:`
    ${z("interstellar_mining_droid_title")}
    ${z("space_support",[z("interstellar_alpha_name")])}
    `,reqs:{alpha:2},cost:{Money:e=>ec("mining_droid",e,65e4,1.28,"interstellar"),Steel:e=>ec("mining_droid",e,12e4,1.28,"interstellar"),Nano_Tube:e=>ec("mining_droid",e,75e3,1.28,"interstellar"),Elerium:e=>ec("mining_droid",e,50,1.28,"interstellar")},effect:()=>`
    ${z("space_used_support",[z("interstellar_alpha_name")])}
    ${z("interstellar_mining_droid_effect")}
    `,support:()=>-1,powered:()=>nc(1),special:!0,refresh:!0,action(){return!!Cs($(this)[0])&&(Dt("mining_droid","interstellar"),t.resource.Adamantite.display=!0,t.interstellar.starport.support${z("interstellar_processing_title")}
    ${z("space_support",[z("interstellar_alpha_name")])}
    `,reqs:{droids:1},cost:{Money:e=>ec("processing",e,35e4,1.28,"interstellar"),Iron:e=>ec("processing",e,18e4,1.28,"interstellar"),Aluminium:e=>ec("processing",e,6e4,1.28,"interstellar"),Iridium:e=>ec("processing",e,5e3,1.28,"interstellar")},effect(){let e=12;return t.tech.ai_core&&t.tech.ai_core>=2&&i.citadel>0&&(e+=2*i.citadel),`
    ${z("space_used_support",[z("interstellar_alpha_name")])}
    ${z("interstellar_processing_effect",[e])}
    `},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("processing","interstellar"),t.interstellar.starport.support`
    ${z("interstellar_fusion_title")}
    ${z("requires_power_support_combo",[z("interstellar_alpha_name"),t.resource.Deuterium.name])}
    `,reqs:{fusion:1},cost:{Money:e=>ec("fusion",e,99e4,1.28,"interstellar"),Iridium:e=>ec("fusion",e,44e3,1.28,"interstellar"),Infernite:e=>ec("fusion",e,350,1.28,"interstellar"),Brick:e=>ec("fusion",e,18e3,1.28,"interstellar")},effect(){return`
    ${z("space_used_support",[z("interstellar_alpha_name")])}
    ${z("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}, ${z("interstellar_fusion_effect",[1.25])}
    `},support:()=>-1,powered:()=>oc(-22),p_fuel:()=>({r:"Deuterium",a:1.25}),action(){return!!Cs($(this)[0])&&(Dt("fusion","interstellar"),t.interstellar.starport.support"magic"===t.race.universe?z("tech_sanctum"):z("interstellar_laboratory_title"),desc:`
    ${z("magic"===t.race.universe?"tech_sanctum":"interstellar_laboratory_title")}
    ${z("space_support",[z("interstellar_alpha_name")])}
    `,reqs:{science:12},cost:{Money:e=>ec("laboratory",e,75e4,1.28,"interstellar"),Crystal:e=>"magic"===t.race.universe?ec("laboratory",e,1200,1.28,"interstellar"):0,Titanium:e=>ec("laboratory",e,12e4,1.28,"interstellar"),Alloy:e=>ec("laboratory",e,95e3,1.28,"interstellar"),Mythril:e=>ec("laboratory",e,8500,1.28,"interstellar")},effect(){let e=1e4;t.tech.science>=15&&(e*=1+.02*(t.race.cataclysm||t.race.orbit_decayed?c.exotic_lab:t.city.wardenclyffe.count)),(t.race.cataclysm||t.race.orbit_decayed&&i.s_gate&&n.scavenger)&&(e*=1+n.scavenger*+(.75*It("gxy_alien2")).toFixed(1)),t.tech.science>=21&&(e*=1.45),e=Math.round(e);let a="";t.tech.science>=16&&(a=`
    ${z("city_wardenclyffe_effect1",[ua(1),t.civic.scientist.name])}
    `);let r=`
    ${z("space_used_support",[z("interstellar_alpha_name")])}
    ${a}
    ${z("city_max_knowledge",[e])}
    `;return t.tech.science>=13&&(r+=`
    ${z("interstellar_laboratory_effect",[5])}
    `),"magic"===t.race.universe&&(r+=`
    ${z("plus_max_resource",[Nr(12),t.resource.Mana.name])}
    `),r},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("laboratory","interstellar"),t.interstellar.starport.support${z("interstellar_exchange_title")}
    ${z("space_support",[z("interstellar_alpha_name")])}
    `,reqs:{banking:12},cost:{Money:e=>ec("exchange",e,68e4,1.28,"interstellar"),Stone:e=>ec("exchange",e,115e3,1.28,"interstellar"),Adamantite:e=>ec("exchange",e,55e3,1.28,"interstellar"),Graphene:e=>ec("exchange",e,78e3,1.28,"interstellar")},effect(){let e=t.race.cataclysm||t.race.orbit_decayed?i.spaceport:t.city.bank?t.city.bank.count:0,a=t.race.cataclysm||t.race.orbit_decayed?4*Us():Us(),r=Nr(t.city.bank?a*e/18:0);return t.race.inflation&&(r*=2),t.tech.banking>=13&&(t.galaxy.freighter&&(r*=1+.03*n.freighter),t.galaxy.super_freighter&&(r*=1+.08*n.super_freighter)),r=+r.toFixed(0),`
    ${z("space_used_support",[z("interstellar_alpha_name")])}
    ${z("plus_max_resource",[`$${r.toLocaleString()}`,z("resource_Money_name")])}
    `},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("exchange","interstellar"),t.interstellar.starport.support${z("interstellar_g_factory_title")}
    ${z("space_support",[z("interstellar_alpha_name")])}
    `,reqs:{graphene:1},cost:{Money:e=>ec("g_factory",e,95e4,1.28,"interstellar"),Copper:e=>ec("g_factory",e,165e3,1.28,"interstellar"),Cement:e=>ec("g_factory",e,22e4,1.28,"interstellar"),Infernite:e=>ec("g_factory",e,750,1.28,"interstellar")},effect:()=>`
    ${z("space_used_support",[z("interstellar_alpha_name")])}
    ${z("interstellar_g_factory_effect")}
    `,support:()=>-1,powered:()=>nc(1),special:!0,action(){return!!Cs($(this)[0])&&(Dt("g_factory","interstellar"),t.resource.Graphene.display=!0,t.interstellar.starport.support`
    ${z("interstellar_int_factory_title")}
    ${z("requires_power_combo",[t.resource.Deuterium.name])}
    `,reqs:{alpha:4},cost:{Money:e=>ec("int_factory",e,25e6,1.26,"interstellar"),Coal:e=>ec("int_factory",e,1e7,1.26,"interstellar"),Brick:e=>ec("int_factory",e,75e4,1.26,"interstellar"),Bolognium:e=>ec("int_factory",e,5e4,1.26,"interstellar")},effect(){let e=+Xt(5).toFixed(2);return`
    ${z("interstellar_int_factory_effect")}
    ${z("city_crafted_mats",[10])}
    ${z("interstellar_fusion_effect",[e])} ${z("minus_power",[$(this)[0].powered()])}
    `},powered:()=>nc(5),special:!0,action(){return!!Cs($(this)[0])&&(Dt("int_factory","interstellar"),ks($(this)[0])&&(t.city.factory.Alloy+=2,Qs()),!0)}},luxury_condo:{id:"interstellar-luxury_condo",title:z("tech_luxury_condo"),desc:`
    ${z("tech_luxury_condo")}
    ${z("requires_power")}
    `,reqs:{alpha:5},cost:{Money:e=>ec("luxury_condo",e,25e6,1.25,"interstellar"),Neutronium:e=>ec("luxury_condo",e,75e3,1.25,"interstellar"),Stanene:e=>ec("luxury_condo",e,23e4,1.25,"interstellar"),Orichalcum:e=>ec("luxury_condo",e,65e3,1.25,"interstellar"),Nanoweave:e=>ec("luxury_condo",e,12500,1.25,"interstellar"),Horseshoe:()=>t.race.hooved?2:0},effect(){let e=$(this)[0].citizens(),t=Nr(75e4);return`
    ${z("plus_max_citizens",[e])}, ${z("minus_power",[$(this)[0].powered()])}
    ${z("plus_max_resource",[`$${t.toLocaleString()}`,z("resource_Money_name")])}
    `},powered:()=>nc(3),action(){return!!Cs($(this)[0])&&(Dt("luxury_condo","interstellar"),ks($(this)[0])&&(t.resource[t.race.species].max+=2),!0)},citizens(){let e=2;return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e}},zoo:{id:"interstellar-zoo",title:z("tech_zoo"),desc:()=>`
    ${z("tech_zoo")}
    ${z("requires_power_support_combo",[z("interstellar_alpha_name"),t.resource.Food.name])}
    `,reqs:{zoo:1},cost:{Money:e=>ec("zoo",e,5e7,1.24,"interstellar"),Polymer:e=>ec("zoo",e,6e6,1.24,"interstellar"),Infernite:e=>ec("zoo",e,75e3,1.24,"interstellar"),Brick:e=>ec("zoo",e,2e6,1.24,"interstellar")},effect:()=>`
    ${z("space_used_support",[z("interstellar_alpha_name")])}
    ${z("space_red_vr_center_effect1",[5])}
    ${z("space_red_vr_center_effect2",[2])}
    ${z("interstellar_alpha_starport_effect3",[12e3,t.resource.Food.name])}
    `,powered:()=>nc(3),action(){return!!Cs($(this)[0])&&(Dt("zoo","interstellar"),t.interstellar.starport.supportt.tech.storage<=2?z("city_shed_title1"):t.tech.storage>=4?z("city_shed_title3"):z("city_shed_title2"),desc(){let e=t.tech.storage>=3?t.tech.storage>=4?z("city_shed_desc_size3"):z("city_shed_desc_size2"):z("city_shed_desc_size1");return z("city_shed_desc",[e])},reqs:{alpha:2},cost:{Money:e=>ec("warehouse",e,175e3,1.28,"interstellar"),Lumber:e=>ec("warehouse",e,1e5,1.28,"interstellar"),Aluminium:e=>ec("warehouse",e,12e4,1.28,"interstellar"),Cement:e=>ec("warehouse",e,45e3,1.28,"interstellar")},res(){let e=["Lumber","Stone","Chrysotile","Furs","Copper","Iron","Aluminium","Cement","Coal","Nano_Tube","Neutronium","Adamantite","Infernite"];return t.tech.storage>=3&&t.resource.Steel.display&&e.push("Steel"),t.tech.storage>=4&&t.resource.Titanium.display&&e.push("Titanium"),e},val(e){switch(e){case"Lumber":case"Stone":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 e='
    ',a=ns();for(const r of $(this)[0].res())t.resource[r].display&&(e+=`${z("plus_max_resource",[q(+(Nr($(this)[0].val(r))*a).toFixed(0),1),t.resource[r].name])}`);return e+="
    ",e},action(){if(Cs($(this)[0])){Dt("warehouse","interstellar");let e=ns();for(const a of $(this)[0].res())t.resource[a].display&&(t.resource[a].max+=Nr($(this)[0].val(a)*e));return!0}return!1}}},int_proxima:{info:{name:z("interstellar_proxima_name"),desc:()=>t.tech.proxima?z("interstellar_proxima_desc2"):z("interstellar_proxima_desc1")},proxima_mission:{id:"interstellar-proxima_mission",title:z("space_mission_title",[z("interstellar_proxima_name")]),desc:z("space_mission_desc",[z("interstellar_proxima_name")]),reqs:{alpha:1},grant:["proxima",1],queue_complete:()=>t.tech.proxima>=1?0:1,cost:{Helium_3:()=>+Xt(42e3).toFixed(0)},effect:z("interstellar_proxima_mission_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.xfer_station={count:0,on:0},Bi(z("interstellar_proxima_mission_result"),"info",!1,["progress"]),!0)}},xfer_station:{id:"interstellar-xfer_station",title:z("interstellar_xfer_station_title"),desc:()=>`
    ${z("interstellar_xfer_station_desc")}
    ${z("requires_power_combo",[t.resource.Uranium.name])}
    `,reqs:{proxima:1},cost:{Money:e=>ec("xfer_station",e,12e5,1.28,"interstellar"),Neutronium:e=>ec("xfer_station",e,1500,1.28,"interstellar"),Adamantite:e=>ec("xfer_station",e,6e3,1.28,"interstellar"),Polymer:e=>ec("xfer_station",e,12e3,1.28,"interstellar"),Wrought_Iron:e=>ec("xfer_station",e,3500,1.28,"interstellar")},effect(){let e=Nr(5e3),a=Nr(4e3),r=Nr(2500),s="";return t.resource.Deuterium.display&&(s=`
    ${z("plus_max_resource",[Nr(2e3),z("resource_Deuterium_name")])}
    `),`
    ${z("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
    ${z("plus_max_resource",[a,z("resource_Oil_name")])}
    ${z("plus_max_resource",[e,z("resource_Helium_3_name")])}
    ${z("plus_max_resource",[r,z("resource_Uranium_name")])}
    ${s}
    ${z("city_fission_power_effect",[.28])}
    ${z("minus_power",[$(this)[0].powered()])}
    `},support:()=>1,powered:()=>nc(1),powerBalancer:()=>[{s:t.interstellar.starport.s_max-t.interstellar.starport.support}],refresh:!0,action(){return!!Cs($(this)[0])&&(Dt("xfer_station","interstellar"),ks($(this)[0])&&(t.resource.Uranium.max+=Nr(2500),t.resource.Helium_3.max+=Nr(5e3),t.resource.Oil.max+=Nr(4e3),t.resource.Deuterium.max+=Nr(2e3)),1===t.tech.proxima&&(t.tech.proxima=2,t.interstellar.cargo_yard={count:0}),!0)}},cargo_yard:{id:"interstellar-cargo_yard",title:z("interstellar_cargo_yard_title"),desc:z("interstellar_cargo_yard_title"),reqs:{proxima:2},cost:{Money:e=>ec("cargo_yard",e,275e3,1.28,"interstellar"),Graphene:e=>ec("cargo_yard",e,7500,1.28,"interstellar"),Mythril:e=>ec("cargo_yard",e,6e3,1.28,"interstellar")},effect(){let e=Nr(200),a=Nr(150),r=`
    ${z("plus_max_resource",[50,z("resource_Crates_name")])}
    ${z("plus_max_resource",[50,z("resource_Containers_name")])}
    `;return r+=`
    ${z("plus_max_resource",[e,z("resource_Neutronium_name")])}
    ${z("plus_max_resource",[a,z("resource_Infernite_name")])}
    `,t.tech.storage>=7&&(r+=`
    ${z("interstellar_cargo_yard_effect",[+u.toFixed(3)])}
    `),r},action(){return!!Cs($(this)[0])&&(Dt("cargo_yard","interstellar"),!0)}},cruiser:{id:"interstellar-cruiser",title:z("interstellar_cruiser_title"),desc:z("interstellar_cruiser_title"),reqs:{cruiser:1},cost:{Money:e=>ec("cruiser",e,875e3,1.28,"interstellar"),Aluminium:e=>ec("cruiser",e,195e3,1.28,"interstellar"),Deuterium:e=>ec("cruiser",e,+Xt(1500).toFixed(0),1.28,"interstellar"),Neutronium:e=>ec("cruiser",e,2e3,1.28,"interstellar"),Aerogel:e=>ec("cruiser",e,250,1.28,"interstellar"),Horseshoe:()=>t.race.hooved?3:0},powered:()=>nc(1),effect(){let e=+Xt(6).toFixed(2);return`
    ${z("plus_max_soldiers",[ua(3)])}
    ${z("space_belt_station_effect3",[e])}
    `},action(){return!!Cs($(this)[0])&&(Dt("cruiser","interstellar"),t.interstellar.cruiser.on++,!0)}},dyson:{id:"interstellar-dyson",title:z("interstellar_dyson_title"),desc:e=>!t.interstellar.hasOwnProperty("dyson")||t.interstellar.dyson.count<100||e?`
    ${z("interstellar_dyson_title")}
    ${z("requires_segmemts",[100])}
    `:`
    ${z("interstellar_dyson_title")}
    `,reqs:{proxima:3},queue_size:10,queue_complete:()=>100-t.interstellar.dyson.count,condition:()=>!(t.interstellar.dyson.count>=100&&t.tech.dyson),cost:{Money:e=>(e||0)+(t.interstellar.hasOwnProperty("dyson")?t.interstellar.dyson.count:0)<100?25e4:0,Adamantite:e=>(e||0)+(t.interstellar.hasOwnProperty("dyson")?t.interstellar.dyson.count:0)<100?1e4:0,Infernite:e=>(e||0)+(t.interstellar.hasOwnProperty("dyson")?t.interstellar.dyson.count:0)<100?25:0,Stanene:e=>(e||0)+(t.interstellar.hasOwnProperty("dyson")?t.interstellar.dyson.count:0)<100?1e5:0},effect(e){let a=(e||0)+(t.interstellar.hasOwnProperty("dyson")?t.interstellar.dyson.count:0);if(a<100){let e=a>0?`
    ${z("space_dwarf_reactor_effect1",[oc(1.25*a)])}
    `:"",t=100-a;return`
    ${z("interstellar_dyson_effect")}
    ${e}
    ${z("space_dwarf_collider_effect2",[t])}
    `}return z("interstellar_dyson_complete",[oc(175)])},action(){return!!(Cs($(this)[0])&&t.interstellar.dyson.count<100)&&(Dt("dyson","interstellar"),t.interstellar.dyson.count>=100&&gs(),!0)}},dyson_sphere:{id:"interstellar-dyson_sphere",title:z("interstellar_dyson_sphere_title"),desc:e=>!t.interstellar.hasOwnProperty("dyson_sphere")||t.interstellar.dyson_sphere.count<100||e?`
    ${z("interstellar_dyson_sphere_title")}
    ${z("requires_segmemts",[100])}
    `:`
    ${z("interstellar_dyson_sphere_title")}
    `,reqs:{proxima:3,dyson:1},queue_size:10,queue_complete:()=>100-t.interstellar.dyson_sphere.count,condition:()=>!!(t.interstellar.dyson.count>=100&&t.tech.dyson&&1===t.tech.dyson),cost:{Money:e=>(e||0)+(t.interstellar.hasOwnProperty("dyson_sphere")?t.interstellar.dyson_sphere.count:0)<100?5e6:0,Bolognium:e=>(e||0)+(t.interstellar.hasOwnProperty("dyson_sphere")?t.interstellar.dyson_sphere.count:0)<100?25e3:0,Vitreloy:e=>(e||0)+(t.interstellar.hasOwnProperty("dyson_sphere")?t.interstellar.dyson_sphere.count:0)<100?1250:0,Aerogel:e=>(e||0)+(t.interstellar.hasOwnProperty("dyson_sphere")?t.interstellar.dyson_sphere.count:0)<100?75e3:0},effect(e){let a=(e||0)+(t.interstellar.hasOwnProperty("dyson_sphere")?t.interstellar.dyson_sphere.count:0);if(a<100){let e=175+5*a,t=100-a;return`
    ${z("interstellar_dyson_sphere_effect")}
    ${z("space_dwarf_reactor_effect1",[oc(e)])}
    ${z("space_dwarf_collider_effect2",[t])}
    `}return z("interstellar_dyson_sphere_complete",[oc(750)])},action(){return!!(Cs($(this)[0])&&t.interstellar.dyson_sphere.count<100)&&(Dt("dyson_sphere","interstellar"),t.interstellar.dyson_sphere.count>=100&&gs(),!0)}},orichalcum_sphere:{id:"interstellar-orichalcum_sphere",title:z("interstellar_dyson_sphere_title"),desc:e=>!t.interstellar.hasOwnProperty("orichalcum_sphere")||t.interstellar.orichalcum_sphere.count<100||e?`
    ${z("interstellar_orichalcum_sphere_desc")}
    ${z("requires_segmemts",[100])}
    `:`
    ${z("interstellar_orichalcum_sphere_desc")}
    `,reqs:{proxima:3,dyson:2},queue_size:10,queue_complete:()=>100-t.interstellar.orichalcum_sphere.count,condition:()=>!!(t.interstellar.dyson_sphere.count>=100&&t.tech.dyson&&2===t.tech.dyson),cost:{Money:e=>(e||0)+(t.interstellar.hasOwnProperty("orichalcum_sphere")?t.interstellar.orichalcum_sphere.count:0)<100?25e6:0,Orichalcum:e=>(e||0)+(t.interstellar.hasOwnProperty("orichalcum_sphere")?t.interstellar.orichalcum_sphere.count:0)<100?75e3:0},effect(e){let a=(e||0)+(t.interstellar.hasOwnProperty("orichalcum_sphere")?t.interstellar.orichalcum_sphere.count:0);if(a<100){let e=750+8*a,t=100-a;return`
    ${z("interstellar_orichalcum_sphere_effect")}
    ${z("space_dwarf_reactor_effect1",[oc(e)])}
    ${z("space_dwarf_collider_effect2",[t])}
    `}return z("interstellar_dyson_sphere_complete",[oc(1750)])},action(){return!!(Cs($(this)[0])&&t.interstellar.orichalcum_sphere.count<100)&&(Dt("orichalcum_sphere","interstellar"),t.interstellar.orichalcum_sphere.count>=100&&eo("blacken_the_sun"),!0)}}},int_nebula:{info:{name:z("interstellar_nebula_name"),desc:()=>t.tech.nebula?z("interstellar_nebula_desc2"):z("interstellar_nebula_desc1"),support:"nexus"},nebula_mission:{id:"interstellar-nebula_mission",title:z("space_mission_title",[z("interstellar_nebula_name")]),desc:z("space_mission_desc",[z("interstellar_nebula_name")]),reqs:{alpha:1},grant:["nebula",1],queue_complete:()=>t.tech.nebula>=1?0:1,cost:{Helium_3:()=>+Xt(55e3).toFixed(0)},effect:z("interstellar_nebula_mission_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("interstellar_nebula_mission_result"),"info",!1,["progress"]),!0)}},nexus:{id:"interstellar-nexus",title:z("interstellar_nexus_title"),desc:()=>`
    ${z("interstellar_nexus_title")}
    ${z("requires_power_combo",[t.resource.Money.name])}
    `,reqs:{nebula:1},cost:{Money:e=>ec("nexus",e,9e5,1.24,"interstellar"),Adamantite:e=>ec("nexus",e,7500,1.24,"interstellar"),Infernite:e=>ec("nexus",e,250,1.24,"interstellar"),Sheet_Metal:e=>ec("nexus",e,14e3,1.24,"interstellar"),Nano_Tube:e=>ec("nexus",e,17500,1.24,"interstellar")},effect(){let e=Nr(3500),t=Nr(4e3),a=Nr(3e3),r=Nr(25);return`
    ${z("interstellar_nexus_effect1",[$(this)[0].support()])}
    ${z("plus_max_resource",[e,z("resource_Oil_name")])}
    ${z("plus_max_resource",[t,z("resource_Helium_3_name")])}
    ${z("plus_max_resource",[a,z("resource_Deuterium_name")])}
    ${z("plus_max_resource",[r,z("resource_Elerium_name")])}
    ${z("interstellar_nexus_effect2",[$(this)[0].powered(),350])}
    `},support:()=>2,powered:()=>nc(8),powerBalancer:()=>[{s:t.interstellar.nexus.s_max-t.interstellar.nexus.support}],refresh:!0,action(){return!!Cs($(this)[0])&&(Dt("nexus","interstellar"),t.resource.Deuterium.display=!0,1===t.tech.nebula&&(t.interstellar.harvester={count:0,on:0},t.tech.nebula=2),ks($(this)[0])&&(t.resource.Oil.max+=Nr(2500),t.resource.Helium_3.max+=Nr(4e3),t.resource.Deuterium.max+=Nr(3e3),t.resource.Elerium.max+=Nr(25)),!0)}},harvester:{id:"interstellar-harvester",title:z("interstellar_harvester_title"),desc:`
    ${z("interstellar_harvester_title")}
    ${z("space_support",[z("interstellar_nebula_name")])}
    `,reqs:{nebula:2},cost:{Money:e=>ec("harvester",e,65e4,1.28,"interstellar"),Copper:e=>ec("harvester",e,8e4,1.28,"interstellar"),Alloy:e=>ec("harvester",e,45e3,1.28,"interstellar"),Iridium:e=>ec("harvester",e,8e3,1.28,"interstellar")},effect(){let e=+Oe("harvester","helium").toFixed(3),a=+Oe("harvester","deuterium").toFixed(3),r=t.tech.ram_scoop?`
    ${z("interstellar_harvester_effect",[a])}
    `:"";return`
    ${z("space_used_support",[z("interstellar_nebula_name")])}
    ${z("space_gas_mining_effect1",[e])}
    ${r}`},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("harvester","interstellar"),t.interstellar.nexus.support${z("interstellar_elerium_prospector_title")}
    ${z("space_support",[z("interstellar_nebula_name")])}
    `,reqs:{nebula:3},cost:{Money:e=>ec("elerium_prospector",e,825e3,1.28,"interstellar"),Steel:e=>ec("elerium_prospector",e,18e3,1.28,"interstellar"),Polymer:e=>ec("elerium_prospector",e,22e3,1.28,"interstellar"),Graphene:e=>ec("elerium_prospector",e,82e3,1.28,"interstellar"),Stanene:e=>ec("elerium_prospector",e,57e3,1.28,"interstellar")},effect(){let e=+Oe("elerium_prospector").toFixed(3);return`
    ${z("space_used_support",[z("interstellar_nebula_name")])}
    ${z("space_belt_elerium_ship_effect2",[e])}
    `},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("elerium_prospector","interstellar"),t.interstellar.nexus.supportt.tech.neutron?z("interstellar_neutron_desc2",[_i[t.race.species].home]):z("interstellar_neutron_desc1")},neutron_mission:{id:"interstellar-neutron_mission",title:z("space_mission_title",[z("interstellar_neutron_name")]),desc:z("space_mission_desc",[z("interstellar_neutron_name")]),reqs:{nebula:1,high_tech:14},grant:["neutron",1],queue_complete:()=>t.tech.neutron>=1?0:1,cost:{Helium_3:()=>+Xt(6e4).toFixed(0),Deuterium:()=>+Xt(1e4).toFixed(0)},effect:z("interstellar_neutron_mission_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.neutron_miner={count:0,on:0},Bi(z("interstellar_neutron_mission_result"),"info",!1,["progress"]),!0)}},neutron_miner:{id:"interstellar-neutron_miner",title:z("interstellar_neutron_miner_title"),desc:()=>`
    ${z("interstellar_neutron_miner_desc")}
    ${z("requires_power_combo",[t.resource.Helium_3.name])}
    `,reqs:{neutron:1},cost:{Money:e=>ec("neutron_miner",e,1e6,1.32,"interstellar"),Titanium:e=>ec("neutron_miner",e,45e3,1.32,"interstellar"),Stanene:e=>ec("neutron_miner",e,88e3,1.32,"interstellar"),Elerium:e=>ec("neutron_miner",e,20,1.32,"interstellar"),Aerogel:e=>ec("neutron_miner",e,50,1.32,"interstellar")},effect(){let e=+Oe("neutron_miner").toFixed(3),t=Nr(500),a=+Xt(3).toFixed(2);return`
    ${z("space_gas_moon_outpost_effect1",[e])}
    ${z("plus_max_resource",[t,z("resource_Neutronium_name")])}
    ${z("interstellar_alpha_starport_effect2",[a,$(this)[0].powered()])}
    `},powered:()=>nc(6),powerBalancer:()=>[{r:"Neutronium",k:"lpmod"}],action(){return!!Cs($(this)[0])&&(Dt("neutron_miner","interstellar"),ks($(this)[0]),!0)}},citadel:{id:"interstellar-citadel",title:z("interstellar_citadel_title"),desc:`
    ${z("interstellar_citadel_desc")}
    ${z("requires_power")}
    `,reqs:{neutron:1,high_tech:15},cost:{Money:e=>ec("citadel",e,5e6,1.25,"interstellar"),Knowledge:e=>ec("citadel",e,15e5,1.15,"interstellar"),Graphene:e=>ec("citadel",e,5e4,1.25,"interstellar"),Stanene:e=>ec("citadel",e,1e5,1.25,"interstellar"),Elerium:e=>ec("citadel",e,250,1.25,"interstellar"),Soul_Gem:e=>ec("citadel",e,1,1.25,"interstellar")},wide:!0,effect(){let e=`
    ${z("interstellar_citadel_stat",[+u.toFixed(1)])}
    ${z("interstellar_citadel_effect",[5])}
    `;if(t.tech.ai_core){let a=+(u/1.75).toFixed(1);t.race.flier||(e+=`
    ${z("interstellar_citadel_effect2",[a])}
    `),t.tech.ai_core>=2&&(e+=`
    ${z("interstellar_citadel_effect3",[2])}
    `),t.tech.ai_core>=3&&(e+=`
    ${z("interstellar_citadel_effect4",[+(u/5).toFixed(1)])}
    `)}return`${e}
    ${z("interstellar_citadel_power",[$(this)[0].powered(),nc(2.5)])}
    `},powered:()=>i.citadel&&i.citadel>1?nc(30+2.5*(i.citadel-1)):nc(30),action(){return!!Cs($(this)[0])&&(Dt("citadel","interstellar"),ks($(this)[0]),!0)},flair:()=>z("interstellar_citadel_flair")},stellar_forge:{id:"interstellar-stellar_forge",title:z("interstellar_stellar_forge_title"),desc:`
    ${z("interstellar_stellar_forge_title")}
    ${z("requires_power")}
    `,reqs:{star_forge:1},cost:{Money:e=>ec("stellar_forge",e,12e5,1.25,"interstellar"),Iridium:e=>ec("stellar_forge",e,25e4,1.25,"interstellar"),Bolognium:e=>ec("stellar_forge",e,35e3,1.25,"interstellar"),Aerogel:e=>ec("stellar_forge",e,75e3,1.25,"interstellar")},effect(){let e=`
    ${z("city_foundry_effect1",[ua(2)])}
    ${z("interstellar_stellar_forge_effect",[10])}
    ${z("interstellar_stellar_forge_effect2",[5])}
    `;return t.tech.star_forge&&t.tech.star_forge>=2&&(e+=`
    ${z("interstellar_stellar_forge_effect3",[2])}
    `),`${e}
    ${z("minus_power",[$(this)[0].powered()])}
    `},powered:()=>nc(3),special:!0,action(){return!!Cs($(this)[0])&&(Dt("stellar_forge","interstellar"),ks($(this)[0])&&t.tech.star_forge>=2&&(t.city.smelter.cap+=2,t.city.smelter.Star+=2,t.city.smelter.StarCap+=2,t.city.smelter.Iron+=2),!0)},flair:()=>z("interstellar_stellar_forge_flair")}},int_blackhole:{info:{name:z("interstellar_blackhole_name"),desc(){let e=_i[t.race.species].home;if(t.tech.blackhole>=5){let a=+t.interstellar.stellar_engine.mass.toFixed(10),r=+t.interstellar.stellar_engine.exotic.toFixed(10);if(t.tech.roid_eject&&(a+=.225*t.tech.roid_eject*(1+t.tech.roid_eject/12)),t.tech.whitehole){let s=gc("bigbang"),i="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name");return`
    ${z("interstellar_blackhole_desc4",[e,a,r])}
    ${z("interstellar_blackhole_desc5",[s.plasmid,s.phage,s.dark,i])}
    `}return t.interstellar.stellar_engine.exotic>0?z("interstellar_blackhole_desc4",[e,a,r]):z("interstellar_blackhole_desc3",[e,a])}return t.tech.blackhole?z("interstellar_blackhole_desc2",[e]):z("interstellar_blackhole_desc1",[e])}},blackhole_mission:{id:"interstellar-blackhole_mission",title:z("space_mission_title",[z("interstellar_blackhole_name")]),desc:z("space_mission_desc",[z("interstellar_blackhole_name")]),reqs:{nebula:1},grant:["blackhole",1],queue_complete:()=>t.tech.blackhole>=1?0:1,cost:{Helium_3:()=>+Xt(75e3).toFixed(0),Deuterium:()=>+Xt(25e3).toFixed(0)},effect:z("interstellar_blackhole_mission_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.far_reach={count:0,on:0},Bi(z("interstellar_blackhole_mission_result"),"info",!1,["progress"]),!0)}},far_reach:{id:"interstellar-far_reach",title:z("interstellar_far_reach"),desc:`
    ${z("interstellar_far_reach_desc")}
    ${z("requires_power")}
    `,reqs:{blackhole:1},cost:{Money:e=>ec("far_reach",e,1e6,1.32,"interstellar"),Knowledge:e=>ec("far_reach",e,1e5,1.32,"interstellar"),Neutronium:e=>ec("far_reach",e,2500,1.32,"interstellar"),Elerium:e=>ec("far_reach",e,100,1.32,"interstellar"),Aerogel:e=>ec("far_reach",e,1e3,1.32,"interstellar")},effect(){return`
    ${z("interstellar_far_reach_effect",[1])}
    ${z("minus_power",[$(this)[0].powered()])}
    `},powered:()=>nc(5),action(){return!!Cs($(this)[0])&&(Dt("far_reach","interstellar"),ks($(this)[0]),1===t.tech.blackhole&&(t.tech.blackhole=2,gs()),!0)},flair:z("interstellar_far_reach_flair")},stellar_engine:{id:"interstellar-stellar_engine",title:z("interstellar_stellar_engine"),desc:e=>!t.interstellar.hasOwnProperty("stellar_engine")||t.interstellar.stellar_engine.count<100||e?`
    ${z("interstellar_stellar_engine")}
    ${z("requires_segmemts",[100])}
    `:`
    ${z("interstellar_stellar_engine")}
    `,reqs:{blackhole:3},queue_size:10,queue_complete:()=>100-t.interstellar.stellar_engine.count,cost:{Money:e=>(e||0)+(t.interstellar.hasOwnProperty("stellar_engine")?t.interstellar.stellar_engine.count:0)<100?5e5:0,Neutronium:e=>(e||0)+(t.interstellar.hasOwnProperty("stellar_engine")?t.interstellar.stellar_engine.count:0)<100?450:0,Adamantite:e=>(e||0)+(t.interstellar.hasOwnProperty("stellar_engine")?t.interstellar.stellar_engine.count:0)<100?17500:0,Infernite:e=>(e||0)+(t.interstellar.hasOwnProperty("stellar_engine")?t.interstellar.stellar_engine.count:0)<100?225:0,Graphene:e=>(e||0)+(t.interstellar.hasOwnProperty("stellar_engine")?t.interstellar.stellar_engine.count:0)<100?45e3:0,Mythril:e=>(e||0)+(t.interstellar.hasOwnProperty("stellar_engine")?t.interstellar.stellar_engine.count:0)<100?250:0,Aerogel:e=>(e||0)+(t.interstellar.hasOwnProperty("stellar_engine")?t.interstellar.stellar_engine.count:0)<100?75:0},effect(e){let a=(e||0)+(t.interstellar.hasOwnProperty("stellar_engine")?t.interstellar.stellar_engine.count:0);if(a<100){let e=100-a;return`
    ${z("interstellar_stellar_engine_effect")}
    ${z("space_dwarf_collider_effect2",[e])}
    `}{let e=t.tech.gravity&&t.tech.gravity>=2?13.5:7.5,a=t.interstellar.stellar_engine?t.interstellar.stellar_engine.mass:8;t.tech.roid_eject&&(a+=.225*t.tech.roid_eject*(1+t.tech.roid_eject/12));let r=oc(+(20+(a-8)*e+(t.interstellar.stellar_engine?t.interstellar.stellar_engine.exotic:0)*e*10).toFixed(2));if(t.tech.blackhole>=5){let e=+t.interstellar.stellar_engine.exotic.toFixed(10),s=t.interstellar.stellar_engine.exotic>0?z("interstellar_stellar_engine_effect3",[a,e]):z("interstellar_stellar_engine_effect2",[a]);return`
    ${z("interstellar_stellar_engine_complete",[r])}
    ${s}
    `}return z("interstellar_stellar_engine_complete",[r])}},action(){return!!(Cs($(this)[0])&&t.interstellar.stellar_engine.count<100)&&(Dt("stellar_engine","interstellar"),t.interstellar.stellar_engine.count>=100&&3===t.tech.blackhole&&(t.tech.blackhole=4,gs()),!0)}},mass_ejector:{id:"interstellar-mass_ejector",title:z("interstellar_mass_ejector"),desc:`
    ${z("interstellar_mass_ejector")}
    ${z("requires_power")}
    `,reqs:{blackhole:5},cost:{Money:e=>ec("mass_ejector",e,75e4,1.25,"interstellar"),Adamantite:e=>ec("mass_ejector",e,125e3,1.25,"interstellar"),Infernite:e=>ec("mass_ejector",e,275,1.25,"interstellar"),Elerium:e=>ec("mass_ejector",e,100,1.25,"interstellar"),Mythril:e=>ec("mass_ejector",e,1e4,1.25,"interstellar")},effect(){return`
    ${z("interstellar_mass_ejector_effect")}, ${z("minus_power",[$(this)[0].powered()])}
    `},powered:()=>nc(3),special:!0,sAction(){t.settings.civTabs=4,t.settings.marketTabs=2,t.settings.tabLoad||(jt("mTabResource"),Ii("interstellar-mass_ejector"))},action(){return!!Cs($(this)[0])&&(0===t.interstellar.mass_ejector.count&&Bi(z("interstellar_mass_ejector_msg"),"info",!1,["progress"]),t.settings.showEjector=!0,Dt("mass_ejector","interstellar"),ks($(this)[0]),sc($("#resources")),sr(),!0)},flair:()=>z("interstellar_mass_ejector_flair")},jump_ship:{id:"interstellar-jump_ship",title:z("interstellar_jump_ship"),desc:z("interstellar_jump_ship_desc"),reqs:{stargate:1},grant:["stargate",2],queue_complete:()=>t.tech.stargate>=2?0:1,cost:{Money:()=>2e7,Copper:()=>24e5,Aluminium:()=>4e6,Titanium:()=>125e4,Adamantite:()=>75e4,Stanene:()=>9e5,Aerogel:()=>1e5},effect:z("interstellar_jump_ship_effect"),action(){return!!Cs($(this)[0])}},wormhole_mission:{id:"interstellar-wormhole_mission",title:z("space_mission_title",[z("interstellar_wormhole_name")]),desc:z("space_mission_desc",[z("interstellar_wormhole_name")]),reqs:{stargate:2},grant:["stargate",3],queue_complete:()=>t.tech.stargate>=3?0:1,cost:{Helium_3:()=>+Xt(15e4).toFixed(0),Deuterium:()=>+Xt(75e3).toFixed(0)},effect:z("interstellar_wormhole_mission_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.stargate={count:0},t.galaxy.gateway_station={count:0,on:0},Bi(z("interstellar_wormhole_mission_result"),"info",!1,["progress"]),!0)}},stargate:{id:"interstellar-stargate",title:z("interstellar_stargate"),desc:e=>!t.interstellar.hasOwnProperty("stargate")||t.interstellar.stargate.count<200||e?`
    ${z("interstellar_stargate")}
    ${z("requires_segmemts",[200])}
    `+(t.interstellar.hasOwnProperty("stargate")&&t.interstellar.stargate.count>=200?`
    ${z("requires_power")}
    `:""):`
    ${z("interstellar_stargate")}
    `,reqs:{stargate:3},condition:()=>!(t.interstellar.stargate.count>=200),queue_size:10,queue_complete:()=>200-t.interstellar.stargate.count,cost:{Money:e=>(e||0)+(t.interstellar.hasOwnProperty("stargate")?t.interstellar.stargate.count:0)<200?1e6:0,Neutronium:e=>(e||0)+(t.interstellar.hasOwnProperty("stargate")?t.interstellar.stargate.count:0)<200?4800:0,Infernite:e=>(e||0)+(t.interstellar.hasOwnProperty("stargate")?t.interstellar.stargate.count:0)<200?666:0,Elerium:e=>(e||0)+(t.interstellar.hasOwnProperty("stargate")?t.interstellar.stargate.count:0)<200?75:0,Nano_Tube:e=>(e||0)+(t.interstellar.hasOwnProperty("stargate")?t.interstellar.stargate.count:0)<200?12e3:0,Stanene:e=>(e||0)+(t.interstellar.hasOwnProperty("stargate")?t.interstellar.stargate.count:0)<200?6e4:0,Mythril:e=>(e||0)+(t.interstellar.hasOwnProperty("stargate")?t.interstellar.stargate.count:0)<200?3200:0},effect(e){let a=(e||0)+(t.interstellar.hasOwnProperty("stargate")?t.interstellar.stargate.count:0);if(a<200){let e=200-a;return`
    ${z("interstellar_stargate_effect")}
    ${z("space_dwarf_collider_effect2",[e])}
    `}return Ft.int_blackhole.s_gate.effect()},action(){return!!(Cs($(this)[0])&&t.interstellar.stargate.count<200)&&(Dt("stargate","interstellar"),t.interstellar.stargate.count>=200&&(t.tech.stargate=4,t.interstellar.s_gate={count:1,on:0},t.city.power>=Ft.int_blackhole.s_gate.powered()&&t.interstellar.s_gate.on++,Wt(),Ii()),!0)}},s_gate:{id:"interstellar-s_gate",title:z("interstellar_stargate"),desc:()=>`
    ${z("interstellar_stargate")}
    ${z("requires_power")}
    `,reqs:{stargate:4},condition:()=>t.interstellar.stargate.count>=200,wiki:!1,queue_complete:()=>0,cost:{},powered:()=>nc(250),effect(){return`
    ${z("interstellar_s_gate_effect")}
    ${z("minus_power",[$(this)[0].powered()])}
    `},action:()=>!1}},int_sirius:{info:{name:()=>t.tech.ascension>=3?z("interstellar_sirius_b_name"):z("interstellar_sirius_name"),desc:()=>t.tech.ascension>=3?z("interstellar_sirius_b_desc"):z("interstellar_sirius_desc",[_i[t.race.species].home])},sirius_mission:{id:"interstellar-sirius_mission",title:z("space_mission_title",[z("interstellar_sirius_name")]),desc:z("space_mission_desc",[z("interstellar_sirius_name")]),reqs:{ascension:2},grant:["ascension",3],queue_complete:()=>t.tech.ascension>=3?0:1,cost:{Helium_3:()=>+Xt(48e4).toFixed(0),Deuterium:()=>+Xt(225e3).toFixed(0)},effect:()=>z("interstellar_sirius_mission_effect",[Tc("name"),_i[t.race.species].home]),action(){return!!Cs($(this)[0])}},sirius_b:{id:"interstellar-sirius_b",title:z("interstellar_sirius_b"),desc:z("interstellar_sirius_b"),reqs:{ascension:3},grant:["ascension",4],queue_complete:()=>t.tech.ascension>=4?0:1,cost:{Knowledge:()=>2e7},effect:()=>z("interstellar_sirius_b_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.space_elevator={count:0},!0)}},space_elevator:{id:"interstellar-space_elevator",title:z("interstellar_space_elevator"),desc:e=>!t.interstellar.hasOwnProperty("space_elevator")||t.interstellar.space_elevator.count<100||e?`
    ${z("interstellar_space_elevator")}
    ${z("requires_segmemts",[100])}
    `:`
    ${z("interstellar_space_elevator")}
    `,reqs:{ascension:4},condition:()=>!(t.interstellar.space_elevator.count>=100),queue_size:5,queue_complete:()=>100-t.interstellar.space_elevator.count,cost:{Money:e=>(e||0)+(t.interstellar.hasOwnProperty("space_elevator")?t.interstellar.space_elevator.count:0)<100?2e7:0,Nano_Tube:e=>(e||0)+(t.interstellar.hasOwnProperty("space_elevator")?t.interstellar.space_elevator.count:0)<100?5e5:0,Bolognium:e=>(e||0)+(t.interstellar.hasOwnProperty("space_elevator")?t.interstellar.space_elevator.count:0)<100?1e5:0,Mythril:e=>(e||0)+(t.interstellar.hasOwnProperty("space_elevator")?t.interstellar.space_elevator.count:0)<100?125e3:0},effect(e){let a=`
    ${z("interstellar_space_elevator_effect")}
    `,r=(e||0)+(t.interstellar.hasOwnProperty("space_elevator")?t.interstellar.space_elevator.count:0);return r<100&&(a+=`
    ${z("space_dwarf_collider_effect2",[100-r])}
    `),a},action(){return!!(Cs($(this)[0])&&t.interstellar.space_elevator.count<100)&&(Dt("space_elevator","interstellar"),t.interstellar.space_elevator.count>=100&&(t.tech.ascension=5,t.interstellar.gravity_dome={count:0},Wt(),Ii()),!0)}},gravity_dome:{id:"interstellar-gravity_dome",title:z("interstellar_gravity_dome"),desc:e=>!t.interstellar.hasOwnProperty("gravity_dome")||t.interstellar.gravity_dome.count<100||e?`
    ${z("interstellar_gravity_dome")}
    ${z("requires_segmemts",[100])}
    `:`
    ${z("interstellar_gravity_dome")}
    `,reqs:{ascension:5},condition:()=>!(t.interstellar.gravity_dome.count>=100),queue_size:5,queue_complete:()=>100-t.interstellar.gravity_dome.count,cost:{Money:e=>(e||0)+(t.interstellar.hasOwnProperty("gravity_dome")?t.interstellar.gravity_dome.count:0)<100?35e6:0,Cement:e=>(e||0)+(t.interstellar.hasOwnProperty("gravity_dome")?t.interstellar.gravity_dome.count:0)<100?125e4:0,Adamantite:e=>(e||0)+(t.interstellar.hasOwnProperty("gravity_dome")?t.interstellar.gravity_dome.count:0)<100?65e4:0,Aerogel:e=>(e||0)+(t.interstellar.hasOwnProperty("gravity_dome")?t.interstellar.gravity_dome.count:0)<100?18e4:0},effect(e){let a=`
    ${z("interstellar_gravity_dome_effect",[_i[t.race.species].home])}
    `,r=(e||0)+(t.interstellar.hasOwnProperty("gravity_dome")?t.interstellar.gravity_dome.count:0);return r<100&&(a+=`
    ${z("space_dwarf_collider_effect2",[100-r])}
    `),a},action(){return!!(Cs($(this)[0])&&t.interstellar.gravity_dome.count<100)&&(Dt("gravity_dome","interstellar"),t.interstellar.gravity_dome.count>=100&&(t.tech.ascension=6,t.interstellar.ascension_machine={count:0},t.interstellar.thermal_collector={count:0},Wt(),Ii()),!0)}},ascension_machine:{id:"interstellar-ascension_machine",title:z("interstellar_ascension_machine"),desc:e=>!t.interstellar.hasOwnProperty("ascension_machine")||t.interstellar.ascension_machine.count<100||e?`
    ${z("interstellar_ascension_machine")}
    ${z("requires_segmemts",[100])}
    `+(t.interstellar.hasOwnProperty("ascension_machine")&&t.interstellar.ascension_machine.count>=100?`
    ${z("requires_power")}
    `:""):`
    ${z("interstellar_ascension_machine")}
    `,reqs:{ascension:6},condition:()=>!(t.interstellar.ascension_machine.count>=100),queue_size:5,queue_complete:()=>100-t.interstellar.ascension_machine.count,cost:{Money:e=>(e||0)+(t.interstellar.hasOwnProperty("ascension_machine")?t.interstellar.ascension_machine.count:0)<100?75e6:0,Alloy:e=>(e||0)+(t.interstellar.hasOwnProperty("ascension_machine")?t.interstellar.ascension_machine.count:0)<100?75e4:0,Neutronium:e=>(e||0)+(t.interstellar.hasOwnProperty("ascension_machine")?t.interstellar.ascension_machine.count:0)<100?125e3:0,Elerium:e=>(e||0)+(t.interstellar.hasOwnProperty("ascension_machine")?t.interstellar.ascension_machine.count:0)<100?1e3:0,Orichalcum:e=>(e||0)+(t.interstellar.hasOwnProperty("ascension_machine")?t.interstellar.ascension_machine.count:0)<100?25e4:0,Nanoweave:e=>(e||0)+(t.interstellar.hasOwnProperty("ascension_machine")?t.interstellar.ascension_machine.count:0)<100?75e3:0},effect(e){let a=(e||0)+(t.interstellar.hasOwnProperty("ascension_machine")?t.interstellar.ascension_machine.count:0);if(a<100){let e=100-a;return`
    ${z("interstellar_ascension_machine_effect",[Tc("name")])}
    ${z("space_dwarf_collider_effect2",[e])}
    `}return Ft.int_sirius.ascension_trigger.effect()},action(){return!!(Cs($(this)[0])&&t.interstellar.ascension_machine.count<100)&&(Dt("ascension_machine","interstellar"),t.interstellar.ascension_machine.count>=100&&(t.tech.ascension=7,t.interstellar.ascension_trigger={count:1,on:0},Wt(),Ii()),!0)}},ascension_trigger:{id:"interstellar-ascension_trigger",title:z("interstellar_ascension_machine"),desc:()=>`
    ${z("interstellar_ascension_machine")}
    ${z("requires_power")}
    `,wiki:!1,reqs:{ascension:7},condition:()=>t.interstellar.ascension_machine.count>=100,queue_complete:()=>0,cost:{},powered(){let e=100;if(t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=2){e+=t.stats.achieve.technophobe.l>=4?25:10;for(let a=1;a=5&&(e+=5)}let a=Math.round(nc(1e4)-e*(t.interstellar.hasOwnProperty("thermal_collector")?t.interstellar.thermal_collector.count:0));return a<0&&(a=0),a},postPower(e){e?setTimeout((function(){t.tech.ascension=i.ascension_trigger?8:7,Wt()}),250):(t.tech.ascension=7,Wt())},effect(){let e=zt(),t=$(this)[0].powered(),a=t>0?`
    ${z("minus_power",[t])}
    `:"";return`
    ${z("interstellar_ascension_trigger_effect")}
    ${e}${a}`},action:()=>!1},ascend:{id:"interstellar-ascend",title:z("interstellar_ascend"),desc:z("interstellar_ascend"),reqs:{ascension:8},queue_complete:()=>0,no_multi:!0,cost:{},effect(){let e=zt();return`
    ${z("interstellar_ascend_effect")}
    ${e}`},action(){return!!Cs($(this)[0])&&(sa(),!0)}},thermal_collector:{id:"interstellar-thermal_collector",title:z("interstellar_thermal_collector"),desc:z("interstellar_thermal_collector"),reqs:{ascension:6},cost:{Money:e=>ec("thermal_collector",e,5e6,1.08,"interstellar"),Infernite:e=>ec("thermal_collector",e,25e3,1.08,"interstellar"),Stanene:e=>ec("thermal_collector",e,1e6,1.08,"interstellar"),Vitreloy:e=>ec("thermal_collector",e,1e5,1.08,"interstellar")},effect(){let e=100;if(t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=2){e+=t.stats.achieve.technophobe.l>=4?25:10;for(let a=1;a=5&&(e+=5)}return z("interstellar_thermal_collector_effect",[e])},action(){return!!Cs($(this)[0])&&(Dt("thermal_collector","interstellar"),!0)}}}};function zt(){let e=gc("ascend"),a="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name");return`
    ${z("interstellar_ascension_trigger_effect2",[e.plasmid,a])}
    ${z("interstellar_ascension_trigger_effect2",[e.phage,z("resource_Phage_name")])}
    ${z("interstellar_ascension_trigger_effect2",[e.harmony,z("resource_Harmony_name")])}
    ${z("interstellar_ascension_trigger_effect3")}
    `}function At(){let e=gc("terraform"),a="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name");return`
    ${z("interstellar_ascension_trigger_effect2",[e.plasmid,a])}
    ${z("interstellar_ascension_trigger_effect2",[e.phage,z("resource_Phage_name")])}
    ${z("interstellar_ascension_trigger_effect2",[e.harmony,z("resource_Harmony_name")])}
    ${z("space_terraformer_effect3")}
    `}const Tt={gxy_gateway:{info:{name:z("galaxy_gateway"),desc:()=>z("galaxy_gateway_desc"),control:()=>({name:Tc("name"),color:"success"}),support:"starbase"},gateway_mission:{id:"galaxy-gateway_mission",title:z("galaxy_gateway_mission"),desc:z("galaxy_gateway_mission"),reqs:{gateway:1},grant:["gateway",2],queue_complete:()=>t.tech.gateway>=2?0:1,cost:{Helium_3:()=>+Xt(212e3).toFixed(0),Deuterium:()=>+Xt(11e4).toFixed(0)},effect:z("galaxy_gateway_mission_effect"),action(){return!!Cs($(this)[0])&&(Kt(),t.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)}},starbase:{id:"galaxy-starbase",title:z("galaxy_starbase"),desc:()=>`
    ${z("galaxy_starbase")}
    ${z("requires_power_space",[t.resource.Food.name])}
    `,reqs:{gateway:2},cost:{Money:e=>ec("starbase",e,42e5,1.25,"galaxy"),Elerium:e=>ec("starbase",e,1e3,1.25,"galaxy"),Mythril:e=>ec("starbase",e,9e4,1.25,"galaxy"),Graphene:e=>ec("starbase",e,32e4,1.25,"galaxy"),Horseshoe:()=>t.race.hooved?5:0},effect(){let e=+Xt(25).toFixed(2),a=t.tech.marines>=2?ua(8):ua(5);return`
    ${z("galaxy_defense_platform_effect",[25])}
    ${z("galaxy_gateway_support",[$(this)[0].support()])}
    ${z("plus_max_soldiers",[a])}
    ${z("interstellar_alpha_starport_effect2",[e,$(this)[0].powered()])}
    ${z("interstellar_alpha_starport_effect3",[250,t.resource.Food.name])}
    `},support:()=>2,powered:()=>nc(i.s_gate?12:0),powerBalancer:()=>[{s:t.galaxy.starbase.s_max-t.galaxy.starbase.support}],refresh:!0,action(){return!!Cs($(this)[0])&&(Dt("starbase","galaxy"),ks($(this)[0]),2===t.tech.gateway&&(t.galaxy.bolognium_ship={count:0,on:0,crew:0},t.tech.gateway=3),!0)}},ship_dock:{id:"galaxy-ship_dock",title:z("galaxy_ship_dock"),desc:`
    ${z("galaxy_ship_dock")}
    ${z("requires_power")}
    `,reqs:{gateway:4},cost:{Money:e=>ec("ship_dock",e,36e5,1.25,"galaxy"),Steel:e=>ec("ship_dock",e,88e4,1.25,"galaxy"),Aluminium:e=>ec("ship_dock",e,12e5,1.25,"galaxy"),Bolognium:e=>ec("ship_dock",e,75e3,1.25,"galaxy")},effect(){return`
    ${z("galaxy_ship_dock_effect",[.25])}
    ${z("minus_power",[$(this)[0].powered()])}
    `},support:()=>i.starbase?.25*i.starbase:0,powered:()=>nc(i.s_gate?4:0),powerBalancer:()=>[{s:t.galaxy.starbase.s_max-t.galaxy.starbase.support}],action(){return!!Cs($(this)[0])&&(Dt("ship_dock","galaxy"),ks($(this)[0]),!0)}},bolognium_ship:{id:"galaxy-bolognium_ship",title:z("galaxy_bolognium_ship"),desc:()=>`
    ${z("galaxy_bolognium_ship_desc")}
    ${z("galaxy_starbase_support",[z("resource_Helium_3_name")])}
    `,reqs:{gateway:3},cost:{Money:e=>ec("bolognium_ship",e,14e5,1.22,"galaxy"),Iron:e=>ec("bolognium_ship",e,56e4,1.22,"galaxy"),Infernite:e=>ec("bolognium_ship",e,1800,1.22,"galaxy"),Nano_Tube:e=>ec("bolognium_ship",e,475e3,1.22,"galaxy")},effect(){let e=+Oe("bolognium_ship").toFixed(3),a=+Xt($(this)[0].ship.helium).toFixed(2);return`
    ${z("gain",[e,z("resource_Bolognium_name")])}
    ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
    ${z("galaxy_gateway_used_support",[-$(this)[0].support()])}
    ${z("spend",[a,t.resource.Helium_3.name])}
    `},support:()=>-1,ship:{civ:()=>t.race.high_pop?2*di.high_pop.vars()[0]:2,mil:()=>0,helium:5},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("bolognium_ship","galaxy"),t.resource.Bolognium.display=!0,t.civic.crew.display=!0,t.galaxy.starbase.support`
    ${z("galaxy_scout_ship")}
    ${z("galaxy_starbase_support",[z("resource_Helium_3_name")])}
    `,reqs:{andromeda:1},cost:{Money:e=>ec("scout_ship",e,16e5,1.25,"galaxy"),Titanium:e=>ec("scout_ship",e,325e3,1.25,"galaxy"),Graphene:e=>ec("scout_ship",e,118e3,1.25,"galaxy"),Soul_Gem:e=>ec("scout_ship",e,1,1.02,"galaxy")},effect(){let e=+Xt($(this)[0].ship.helium).toFixed(2),a=t.tech.science>=17?`
    ${z("galaxy_scout_ship_effect2",[25])}
    `:"";return`
    ${z("galaxy_ship_rating",[$(this)[0].ship.rating()])}
    ${z("galaxy_scout_ship_effect")}
    ${a}
    ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
    ${z("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
    ${z("galaxy_gateway_used_support",[-$(this)[0].support()])}
    ${z("spend",[e,t.resource.Helium_3.name])}
    `},support:()=>-1,ship:{civ:()=>t.race.high_pop?1*di.high_pop.vars()[0]:1,mil:()=>t.race.high_pop?1*di.high_pop.vars()[0]:1,helium:6,rating:()=>t.race.banana?7:10},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("scout_ship","galaxy"),t.galaxy.defense.gxy_gateway.scout_ship++,t.galaxy.starbase.support`
    ${z("galaxy_corvette_ship")}
    ${z("galaxy_starbase_support",[z("resource_Helium_3_name")])}
    `,reqs:{andromeda:2},cost:{Money:e=>ec("corvette_ship",e,45e5,1.25,"galaxy"),Steel:e=>ec("corvette_ship",e,175e4,1.25,"galaxy"),Infernite:e=>ec("corvette_ship",e,16e3,1.25,"galaxy"),Bolognium:e=>ec("corvette_ship",e,35e3,1.25,"galaxy"),Soul_Gem:e=>ec("corvette_ship",e,1,1.25,"galaxy")},effect(){let e=+Xt($(this)[0].ship.helium).toFixed(2);return`
    ${z("galaxy_ship_rating",[$(this)[0].ship.rating()])}
    ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
    ${z("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
    ${z("galaxy_gateway_used_support",[-$(this)[0].support()])}
    ${z("spend",[e,t.resource.Helium_3.name])}
    `},support:()=>-1,ship:{civ:()=>t.race.high_pop?2*di.high_pop.vars()[0]:2,mil:()=>t.race.high_pop?3*di.high_pop.vars()[0]:3,helium:10,rating:()=>t.race.banana?21:30},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("corvette_ship","galaxy"),t.galaxy.defense.gxy_gateway.corvette_ship++,t.galaxy.starbase.support`
    ${z("galaxy_frigate_ship")}
    ${z("galaxy_starbase_support",[z("resource_Helium_3_name")])}
    `,reqs:{andromeda:3},cost:{Money:e=>ec("frigate_ship",e,18e6,1.25,"galaxy"),Elerium:e=>ec("frigate_ship",e,1250,1.25,"galaxy"),Mythril:e=>ec("frigate_ship",e,35e4,1.25,"galaxy"),Sheet_Metal:e=>ec("frigate_ship",e,8e5,1.25,"galaxy"),Soul_Gem:e=>ec("frigate_ship",e,2,1.25,"galaxy")},effect(){let e=+Xt($(this)[0].ship.helium).toFixed(2);return`
    ${z("galaxy_ship_rating",[$(this)[0].ship.rating()])}
    ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
    ${z("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
    ${z("galaxy_gateway_used_support",[-$(this)[0].support()])}
    ${z("spend",[e,t.resource.Helium_3.name])}
    `},support:()=>-2,ship:{civ:()=>t.race.high_pop?3*di.high_pop.vars()[0]:3,mil:()=>t.race.high_pop?5*di.high_pop.vars()[0]:5,helium:25,rating:()=>t.race.banana?56:80},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("frigate_ship","galaxy"),t.galaxy.defense.gxy_gateway.frigate_ship++,t.galaxy.starbase.support+1`
    ${z("galaxy_cruiser_ship")}
    ${z("galaxy_starbase_support",[z("resource_Deuterium_name")])}
    `,reqs:{andromeda:4},cost:{Money:e=>ec("cruiser_ship",e,75e6,1.25,"galaxy"),Copper:e=>ec("cruiser_ship",e,6e6,1.25,"galaxy"),Adamantite:e=>ec("cruiser_ship",e,1e6,1.25,"galaxy"),Vitreloy:e=>ec("cruiser_ship",e,75e4,1.25,"galaxy"),Elerium:e=>ec("cruiser_ship",e,1800,1.25,"galaxy"),Soul_Gem:e=>ec("cruiser_ship",e,5,1.25,"galaxy")},effect(){let e=+Xt($(this)[0].ship.deuterium).toFixed(2);return`
    ${z("galaxy_ship_rating",[$(this)[0].ship.rating()])}
    ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
    ${z("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
    ${z("galaxy_gateway_used_support",[-$(this)[0].support()])}
    ${z("spend",[e,t.resource.Deuterium.name])}
    `},support:()=>-3,ship:{civ:()=>t.race.high_pop?6*di.high_pop.vars()[0]:6,mil:()=>t.race.high_pop?10*di.high_pop.vars()[0]:10,deuterium:25,rating:()=>t.race.banana?175:250},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("cruiser_ship","galaxy"),t.galaxy.defense.gxy_gateway.cruiser_ship++,t.galaxy.starbase.support+2`
    ${z("galaxy_dreadnought")}
    ${z("galaxy_starbase_support",[z("resource_Deuterium_name")])}
    `,reqs:{andromeda:5},cost:{Money:e=>ec("dreadnought",e,225e6,1.25,"galaxy"),Neutronium:e=>ec("dreadnought",e,25e4,1.25,"galaxy"),Bolognium:e=>ec("dreadnought",e,15e5,1.25,"galaxy"),Vitreloy:e=>ec("dreadnought",e,1e6,1.25,"galaxy"),Infernite:e=>ec("dreadnought",e,4e5,1.25,"galaxy"),Aerogel:e=>ec("dreadnought",e,8e5,1.25,"galaxy"),Soul_Gem:e=>ec("dreadnought",e,25,1.25,"galaxy")},effect(){let e=+Xt($(this)[0].ship.deuterium).toFixed(2);return`
    ${z("galaxy_ship_rating",[$(this)[0].ship.rating()])}
    ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
    ${z("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
    ${z("galaxy_gateway_used_support",[-$(this)[0].support()])}
    ${z("spend",[e,t.resource.Deuterium.name])}
    `},support:()=>-5,ship:{civ:()=>t.race.high_pop?10*di.high_pop.vars()[0]:10,mil:()=>t.race.high_pop?20*di.high_pop.vars()[0]:20,deuterium:80,rating:()=>t.race.banana?1260:1800},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("dreadnought","galaxy"),t.galaxy.defense.gxy_gateway.dreadnought++,t.galaxy.starbase.support+2t.tech.piracy?z("galaxy_stargate_desc_alt"):z("galaxy_stargate_desc"),control:()=>({name:Tc("name"),color:"success"})},gateway_station:{id:"galaxy-gateway_station",title:z("galaxy_gateway_station"),desc:()=>`
    ${z("galaxy_gateway_station_desc")}
    ${z("requires_power")}
    `,reqs:{stargate:4},cost:{Money:e=>ec("gateway_station",e,5e6,1.25,"galaxy"),Aluminium:e=>ec("gateway_station",e,52e4,1.25,"galaxy"),Polymer:e=>ec("gateway_station",e,35e4,1.25,"galaxy"),Neutronium:e=>ec("gateway_station",e,17500,1.25,"galaxy")},effect(){let e=Nr(2e3),a=Nr(4500),r=Nr(50),s="";return t.tech.gateway&&t.tech.gateway>=2&&(s=`
    ${z("galaxy_gateway_support",[$(this)[0].support()])}
    `),`${s}
    ${z("plus_max_resource",[e,z("resource_Helium_3_name")])}
    ${z("plus_max_resource",[a,z("resource_Deuterium_name")])}
    ${z("plus_max_resource",[r,z("resource_Elerium_name")])}
    ${z("minus_power",[$(this)[0].powered()])}
    `},support:()=>.5,powered:()=>nc(i.s_gate?4:0),powerBalancer:()=>!t.galaxy.hasOwnProperty("starbase")&&[{s:t.galaxy.starbase.s_max-t.galaxy.starbase.support}],refresh:!0,action(){return!!Cs($(this)[0])&&(Dt("gateway_station","galaxy"),t.resource.Helium_3.max+=Nr(2e3),t.resource.Deuterium.max+=Nr(4500),4===t.tech.stargate&&(t.galaxy.telemetry_beacon={count:0,on:0},t.tech.stargate=5),ks($(this)[0]),!0)}},telemetry_beacon:{id:"galaxy-telemetry_beacon",title:z("galaxy_telemetry_beacon"),desc:()=>`
    ${z("galaxy_telemetry_beacon")}
    ${z("requires_power")}
    `,reqs:{stargate:5},cost:{Money:e=>ec("telemetry_beacon",e,225e4,1.25,"galaxy"),Copper:e=>ec("telemetry_beacon",e,685e3,1.25,"galaxy"),Alloy:e=>ec("telemetry_beacon",e,425e3,1.25,"galaxy"),Iridium:e=>ec("telemetry_beacon",e,177e3,1.25,"galaxy")},effect(){let e=t.tech.telemetry?1200:800;t.tech.science>=17&&(e+=25*n.scout_ship);let a=i.telemetry_beacon?e*i.telemetry_beacon:0,r="";return t.tech.gateway&&t.tech.gateway>=2&&(r=`
    ${z("galaxy_gateway_support",[$(this)[0].support()])}
    `),`${r}
    ${z("galaxy_telemetry_beacon_effect1",[e])}
    ${z("galaxy_telemetry_beacon_effect2",[a])}
    ${z("minus_power",[$(this)[0].powered()])}
    `},support:()=>t.tech.telemetry?.75:.5,powered:()=>nc(i.s_gate?4:0),powerBalancer:()=>!t.galaxy.hasOwnProperty("starbase")&&[{s:t.galaxy.starbase.s_max-t.galaxy.starbase.support}],postPower(e){let a=e?i.telemetry_beacon+b():i.telemetry_beacon-b();a>t.galaxy.telemetry_beacon.count?a=t.galaxy.telemetry_beacon.count:a<0&&(a=0),i.telemetry_beacon=a,Os($(this)[0],"galaxy","telemetry_beacon")},action(){return!!Cs($(this)[0])&&(Dt("telemetry_beacon","galaxy"),ks($(this)[0])&&(t.resource.Knowledge.max+=1750),t.tech.gateway||(t.galaxy.starbase={count:0,on:0,support:0,s_max:0},t.settings.space.gateway=!0,t.tech.gateway=1,Qt()),!0)}},gateway_depot:{id:"galaxy-gateway_depot",title:z("galaxy_gateway_depot"),desc:`
    ${z("galaxy_gateway_depot")}
    `,reqs:{gateway:5},cost:{Money:e=>ec("gateway_depot",e,4e6,1.25,"galaxy"),Neutronium:e=>ec("gateway_depot",e,8e4,1.25,"galaxy"),Stanene:e=>ec("gateway_depot",e,5e5,1.25,"galaxy"),Vitreloy:e=>ec("gateway_depot",e,2500,1.25,"galaxy")},wide:!0,effect(){let e=t.tech.world_control?150:100,a=Nr(200),r=Lt(),s=q(+Nr(3e3*r).toFixed(0),1),i=q(+Nr(25e4*r).toFixed(0),1),c=q(+Nr(9001*r).toFixed(0),1),o=q(+Nr(6660*r).toFixed(0),1),n='
    ';return n+=`${z("plus_max_crates",[e])}${z("plus_max_containers",[e])}`,n+=`${z("plus_max_resource",[s,t.resource.Uranium.name])}`,n+=`${z("plus_max_resource",[i,t.resource.Nano_Tube.name])}`,n+=`${z("plus_max_resource",[c,t.resource.Neutronium.name])}`,n+=`${z("plus_max_resource",[o,t.resource.Infernite.name])}`,n+="
    ",`${n}
    ${z("galaxy_gateway_depot_effect",[a,z("resource_Elerium_name")])}
    ${z("minus_power",[$(this)[0].powered()])}
    `},powered:()=>nc(i.s_gate?10:0),action(){if(Cs($(this)[0])){Dt("gateway_depot","galaxy");let e=Lt();return t.resource.Uranium.max+=Nr(3e3*e),t.resource.Nano_Tube.max+=Nr(25e4*e),t.resource.Neutronium.max+=Nr(9001*e),t.resource.Infernite.max+=Nr(6660*e),ks($(this)[0]),!0}return!1}},defense_platform:{id:"galaxy-defense_platform",title:z("galaxy_defense_platform"),desc:()=>`
    ${z("galaxy_defense_platform")}
    ${z("requires_power")}
    `,reqs:{stargate:6},cost:{Money:e=>ec("defense_platform",e,75e4,1.25,"galaxy"),Adamantite:e=>ec("defense_platform",e,425e3,1.25,"galaxy"),Elerium:e=>ec("defense_platform",e,800,1.25,"galaxy"),Vitreloy:e=>ec("defense_platform",e,1250,1.25,"galaxy"),Wrought_Iron:e=>ec("defense_platform",e,75e3,1.25,"galaxy")},effect(){return`
    ${z("galaxy_defense_platform_effect",[20])}
    ${z("minus_power",[$(this)[0].powered()])}
    `},powered:()=>nc(i.s_gate?5:0),postPower(e){ic({el:"#gxy_stargate"},"update")},action(){return!!Cs($(this)[0])&&(Dt("defense_platform","galaxy"),ks($(this)[0]),!0)},post(){ic({el:"#gxy_stargate"},"update")}}},gxy_gorddon:{info:{name:z("galaxy_gorddon"),desc:()=>z("galaxy_gorddon_desc"),control:()=>({name:_i[t.galaxy.alien1.id].name,color:"advanced"})},gorddon_mission:{id:"galaxy-gorddon_mission",title:z("galaxy_gorddon_mission"),desc:z("galaxy_gorddon_mission_desc"),reqs:{xeno:2},grant:["xeno",3],queue_complete:()=>t.tech.xeno>=3?0:1,cost:{Structs:()=>({galaxy:{scout_ship:{s:"gxy_gateway",count:2,on:2},corvette_ship:{s:"gxy_gateway",count:1,on:1}}}),Helium_3:()=>+Xt(23e4).toFixed(0),Deuterium:()=>+Xt(125e3).toFixed(0)},effect:z("galaxy_gorddon_mission_effect"),action(){if(Cs($(this)[0])){Kt(),t.galaxy.defense.gxy_gateway.scout_ship-=2,t.galaxy.defense.gxy_gorddon.scout_ship+=2,t.galaxy.defense.gxy_gateway.corvette_ship--,t.galaxy.defense.gxy_gorddon.corvette_ship++;let e=_i[t.galaxy.alien1.id].name,a=_i[t.galaxy.alien1.id].entity,r=_i[t.galaxy.alien2.id].name;return Bi(z("galaxy_gorddon_mission_result",[a,e,_i[t.galaxy.alien2.id].entity,r]),"info",!1,["progress"]),!0}return!1}},embassy:{id:"galaxy-embassy",title:z("galaxy_embassy"),desc:()=>`
    ${z("galaxy_embassy")}
    ${z("requires_power_combo",[t.resource.Food.name])}
    `,reqs:{xeno:4},queue_complete:()=>1-t.galaxy.embassy.count,cost:{Money:e=>(e||0)+(t.galaxy.hasOwnProperty("embassy")?t.galaxy.embassy.count:0)<1?3e7:0,Lumber:e=>(e||0)+(t.galaxy.hasOwnProperty("embassy")?t.galaxy.embassy.count:0)<1?38e6:0,Stone:e=>(e||0)+(t.galaxy.hasOwnProperty("embassy")?t.galaxy.embassy.count:0)<1?32e6:0,Furs:e=>(e||0)+(t.galaxy.hasOwnProperty("embassy")?t.galaxy.embassy.count:0)<1?18e6:0,Wrought_Iron:e=>(e||0)+(t.galaxy.hasOwnProperty("embassy")?t.galaxy.embassy.count:0)<1?6e6:0},effect(){let e="";return t.tech.xeno>=11&&(e=`
    ${z("plus_max_citizens",[$(this)[0].citizens()])}
    `),`
    ${z("galaxy_embassy_effect",[_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name])}
    ${e}
    ${z("interstellar_alpha_starport_effect3",[7500,t.resource.Food.name])}
    ${z("minus_power",[$(this)[0].powered()])}
    `},powered:()=>nc(i.s_gate?25:0),refresh:!0,action(){return!!(t.galaxy.embassy.count<1&&Cs($(this)[0]))&&(Dt("embassy","galaxy"),ks($(this)[0]),4===t.tech.xeno&&(t.tech.xeno=5,t.galaxy.freighter={count:0,on:0,crew:0},t.galaxy.trade={max:0,cur:0,f0:0,f1:0,f2:0,f3:0,f4:0,f5:0,f6:0,f7:0,f8:0},sc($("#resources")),sr(),Bi(z("galaxy_embassy_complete",[_i[t.galaxy.alien1.id].name,_i[t.galaxy.alien2.id].name]),"info",!1,["progress"])),!0)},citizens(){let e=20;return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e}},dormitory:{id:"galaxy-dormitory",title:z("galaxy_dormitory"),desc:()=>`
    ${z("galaxy_dormitory")}
    ${z("requires_power")}
    `,reqs:{xeno:6},cost:{Money:e=>ec("dormitory",e,1e7,1.25,"galaxy"),Furs:e=>ec("dormitory",e,7e5,1.25,"galaxy"),Cement:e=>ec("dormitory",e,12e5,1.25,"galaxy"),Plywood:e=>ec("dormitory",e,85e3,1.25,"galaxy"),Horseshoe:()=>t.race.hooved?3:0},effect(){return`
    ${z("requires_res",[z("galaxy_embassy")])}
    ${z("plus_max_citizens",[$(this)[0].citizens()])}
    ${z("minus_power",[$(this)[0].powered()])}
    `},powered:()=>nc(3),action(){return!!Cs($(this)[0])&&(Dt("dormitory","galaxy"),ks($(this)[0]),!0)},citizens(){let e=3;return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e}},symposium:{id:"galaxy-symposium",title:z("galaxy_symposium"),desc:()=>`
    ${z("galaxy_symposium")}
    ${z("requires_power")}
    `,reqs:{xeno:6},cost:{Money:e=>ec("symposium",e,8e6,1.25,"galaxy"),Food:e=>t.race.ravenous?0:ec("symposium",e,t.race.artifical?45e3:125e3,1.25,"galaxy"),Lumber:e=>ec("symposium",e,46e4,1.25,"galaxy"),Brick:e=>ec("symposium",e,261600,1.25,"galaxy")},effect(){let e="";return t.tech.xeno>=7&&(e=`
    ${z("galaxy_symposium_effect3",[+Pe(300).toFixed(2)])}
    `),`
    ${z("galaxy_symposium_effect",[1750])}
    ${z("galaxy_symposium_effect2",[650])}
    ${e}
    ${z("minus_power",[$(this)[0].powered()])}
    `},powered:()=>nc(4),action(){return!!Cs($(this)[0])&&(Dt("symposium","galaxy"),ks($(this)[0]),!0)}},freighter:{id:"galaxy-freighter",title:z("galaxy_freighter"),desc:()=>`
    ${z("galaxy_freighter")}
    ${z("galaxy_crew_fuel",[z("resource_Helium_3_name")])}
    `,reqs:{xeno:5},cost:{Money:e=>ec("freighter",e,6e6,1.2,"galaxy"),Uranium:e=>ec("freighter",e,1e4,1.2,"galaxy"),Adamantite:e=>ec("freighter",e,46e4,1.2,"galaxy"),Stanene:e=>ec("freighter",e,261600,1.2,"galaxy"),Bolognium:e=>ec("freighter",e,66e3,1.2,"galaxy")},effect(){let e=+Xt($(this)[0].ship.helium).toFixed(2),a="";return t.tech.banking>=13&&(a=`
    ${z("interstellar_exchange_boost",[3])}
    `),`
    ${z("galaxy_freighter_effect",[2,_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name])}
    ${a}
    ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
    ${z("spend",[e,t.resource.Helium_3.name])}
    `},ship:{civ:()=>t.race.high_pop?3*di.high_pop.vars()[0]:3,mil:()=>0,helium:12},special:!0,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("freighter","galaxy"),t.galaxy.freighter.on++,t.resource.Vitreloy.display=!0,!0)}}},gxy_alien1:{info:{name:()=>z("galaxy_alien",[_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].home]),desc:()=>z("galaxy_alien1_desc",[_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].home,_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),control:()=>({name:_i[t.galaxy.alien1.id].name,color:"advanced"})},consulate:{id:"galaxy-consulate",title:z("galaxy_consulate"),desc:()=>z("galaxy_consulate_desc",[_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].home]),reqs:{xeno:8},queue_complete:()=>1-t.galaxy.consulate.count,cost:{Money:e=>(e||0)+(t.galaxy.hasOwnProperty("consulate")?t.galaxy.consulate.count:0)<1?9e7:0,Stone:e=>(e||0)+(t.galaxy.hasOwnProperty("consulate")?t.galaxy.consulate.count:0)<1?75e6:0,Furs:e=>(e||0)+(t.galaxy.hasOwnProperty("consulate")?t.galaxy.consulate.count:0)<1?3e7:0,Iron:e=>(e||0)+(t.galaxy.hasOwnProperty("consulate")?t.galaxy.consulate.count:0)<1?45e6:0,Horseshoe:e=>t.race.hooved&&(e||0)+(t.galaxy.hasOwnProperty("consulate")?t.galaxy.consulate.count:0)<1?10:0},effect(){return z("plus_max_citizens",[$(this)[0].citizens()])},refresh:!0,action(){return!!(Cs($(this)[0])&&t.galaxy.consulate.count<1)&&(Dt("consulate","galaxy"),t.galaxy.resort={count:0,on:0},t.galaxy.super_freighter={count:0,on:0,crew:0},t.tech.xeno=9,!0)},citizens(){let e=10;return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e}},resort:{id:"galaxy-resort",title:z("galaxy_resort"),desc:()=>`
    ${z("galaxy_resort")}
    ${z("requires_power")}
    `,reqs:{xeno:9},cost:{Money:e=>ec("resort",e,33e6,1.25,"galaxy"),Stone:e=>ec("resort",e,25e6,1.25,"galaxy"),Furs:e=>ec("resort",e,1e7,1.25,"galaxy"),Oil:e=>ec("resort",e,Xt(125e3),1.25,"galaxy")},effect(){return`
    ${z("plus_max_citizens",[3])}
    ${z("minus_power",[$(this)[0].powered()])}
    `},effect(){let e=Nr(t.tech.world_control?1875e3:15e5),a=t.race.joyless?"":`
    ${z("city_max_entertainer",[ua(2)])}
    `;return`
    ${z("plus_max_resource",[`$${e.toLocaleString()}`,z("resource_Money_name")])}
    ${a}
    ${z("space_red_vr_center_effect2",[2])}
    ${z("minus_power",[$(this)[0].powered()])}
    `},powered:()=>nc(5),action(){return!!Cs($(this)[0])&&(Dt("resort","galaxy"),ks($(this)[0]),!0)}},vitreloy_plant:{id:"galaxy-vitreloy_plant",title:z("galaxy_vitreloy_plant"),desc:()=>`
    ${z("galaxy_vitreloy_plant")}
    ${z("galaxy_vitreloy_plant_desc")}
    `,reqs:{xeno:10},cost:{Money:e=>ec("vitreloy_plant",e,35e6,1.25,"galaxy"),Cement:e=>ec("vitreloy_plant",e,18e5,1.25,"galaxy"),Neutronium:e=>ec("vitreloy_plant",e,25e4,1.25,"galaxy"),Iridium:e=>ec("vitreloy_plant",e,85e4,1.25,"galaxy"),Aerogel:e=>ec("vitreloy_plant",e,4e5,1.25,"galaxy")},effect(){return`
    ${z("galaxy_vitreloy_plant_effect",[+Oe("vitreloy_plant").toFixed(2)])}
    ${z("galaxy_vitreloy_plant_effect2",[2.5,100])}
    ${z("galaxy_vitreloy_plant_effect3",[5e4,$(this)[0].powered()])}
    `},powered:()=>nc(10),action(){return!!Cs($(this)[0])&&(Dt("vitreloy_plant","galaxy"),ks($(this)[0]),!0)}},super_freighter:{id:"galaxy-super_freighter",title:z("galaxy_super_freighter"),desc:()=>`
    ${z("galaxy_super_freighter")}
    ${z("galaxy_crew_fuel",[z("resource_Helium_3_name")])}
    `,reqs:{xeno:9},cost:{Money:e=>ec("super_freighter",e,28e6,1.2,"galaxy"),Aluminium:e=>ec("super_freighter",e,35e5,1.2,"galaxy"),Alloy:e=>ec("super_freighter",e,1e6,1.2,"galaxy"),Graphene:e=>ec("super_freighter",e,75e4,1.2,"galaxy")},effect(){let e=+Xt($(this)[0].ship.helium).toFixed(2),a="";return t.tech.banking>=13&&(a=`
    ${z("interstellar_exchange_boost",[8])}
    `),`
    ${z("galaxy_freighter_effect",[5,_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name])}
    ${a}
    ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
    ${z("spend",[e,t.resource.Helium_3.name])}
    `},ship:{civ:()=>t.race.high_pop?5*di.high_pop.vars()[0]:5,mil:()=>0,helium:25},special:!0,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("super_freighter","galaxy"),t.galaxy.super_freighter.on++,!0)}}},gxy_alien2:{info:{name:()=>z("galaxy_alien",[_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red]),desc:()=>z("galaxy_alien2_desc",[_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red,_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name]),control:()=>({name:_i[t.galaxy.alien2.id].name,color:"danger"}),support:"foothold"},alien2_mission:{id:"galaxy-alien2_mission",title:()=>z("galaxy_alien2_mission",[_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red]),desc:()=>z("galaxy_alien2_mission_desc",[_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red]),reqs:{andromeda:4},grant:["conflict",1],queue_complete:()=>t.tech.conflict>=1?0:1,cost:{Custom(){if(t.galaxy.hasOwnProperty("defense")&&t.galaxy.defense.hasOwnProperty("gxy_alien2")){let e=0;return Object.keys(t.galaxy.defense.gxy_alien2).forEach((function(a){e+=Tt.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_alien2[a]})),{label:z("galaxy_fleet_rating",[`400`]),met:!(e<400)}}return{label:z("galaxy_fleet_rating",['400']),met:!1}}},effect(){let e=0;t.galaxy.hasOwnProperty("defense")&&t.galaxy.defense.hasOwnProperty("gxy_alien2")&&Object.keys(t.galaxy.defense.gxy_alien2).forEach((function(a){e+=Tt.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_alien2[a]}));let a=e>=650?`${z("galaxy_piracy_low")}`:`${z("galaxy_piracy_avg")}`;return`
    ${z("galaxy_alien2_mission_effect2",[e])}
    ${z("galaxy_alien2_mission_effect3",[a])}
    ${z("galaxy_alien2_mission_effect",[_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name])}
    `},action(){if(Cs($(this)[0])){let e=0;if(Object.keys(t.galaxy.defense.gxy_alien2).forEach((function(a){e+=Tt.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_alien2[a]})),e>=400){if(Bi(z("galaxy_alien2_mission_result2",[_i[t.galaxy.alien2.id].solar.red]),"info",!1,["progress"]),e<650){let e=80;t.race.instinct&&(e/=2);let a=[];Object.keys(t.galaxy.defense.gxy_alien2).forEach((function(r){for(let s=0;s0&&(e-=Tt.gxy_gateway[r].ship.rating(),a.push(r))})),Bi(z("galaxy_chthonian_mission_result_losses",[a.map((e=>z(`galaxy_${e}`))).join(", ")]),"danger",!1,["progress"]);for(let e=0;e`
    ${z("galaxy_foothold")}
    ${z("requires_power_combo",[t.resource.Elerium.name])}
    `,reqs:{conflict:1},cost:{Money:e=>ec("foothold",e,25e6,1.25,"galaxy"),Titanium:e=>ec("foothold",e,3e6,1.25,"galaxy"),Polymer:e=>ec("foothold",e,175e4,1.25,"galaxy"),Iridium:e=>ec("foothold",e,9e5,1.25,"galaxy"),Bolognium:e=>ec("foothold",e,5e4,1.25,"galaxy")},effect(){return`
    ${z("galaxy_defense_platform_effect",[50])}
    ${z("galaxy_foothold_effect",[$(this)[0].support(),_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red])}
    ${z("galaxy_foothold_effect2",[2.5,$(this)[0].powered()])}
    `},support:()=>4,powered:()=>nc(i.s_gate?20:0),powerBalancer:()=>[{s:t.galaxy.foothold.s_max-t.galaxy.foothold.support}],action(){return!!Cs($(this)[0])&&(Dt("foothold","galaxy"),ks($(this)[0]),1===t.tech.conflict&&(t.galaxy.armed_miner={count:0,on:0,crew:0,mil:0},t.tech.conflict=2,Qt(),gs()),!0)}},armed_miner:{id:"galaxy-armed_miner",title:z("galaxy_armed_miner"),desc:()=>`
    ${z("galaxy_armed_miner")}
    `,reqs:{conflict:2},cost:{Money:e=>ec("armed_miner",e,5e6,1.25,"galaxy"),Steel:e=>ec("armed_miner",e,18e5,1.25,"galaxy"),Stanene:e=>ec("armed_miner",e,1975e3,1.25,"galaxy"),Vitreloy:e=>ec("armed_miner",e,2e4,1.25,"galaxy"),Soul_Gem:e=>ec("armed_miner",e,1,1.25,"galaxy")},effect(){let e=+Xt($(this)[0].ship.helium).toFixed(2);return`
    ${z("galaxy_ship_rating",[$(this)[0].ship.rating()])}
    ${z("gain",[.032,z("resource_Bolognium_name")])}
    ${z("gain",[.23,z("resource_Adamantite_name")])}
    ${z("gain",[.65,z("resource_Iridium_name")])}
    ${z("galaxy_alien2_support",[$(this)[0].support(),_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red])}
    ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
    ${z("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
    ${z("spend",[e,t.resource.Helium_3.name])}
    `},ship:{civ:()=>t.race.high_pop?2*di.high_pop.vars()[0]:2,mil:()=>t.race.high_pop?1*di.high_pop.vars()[0]:1,helium:10,rating:()=>t.race.banana?4:5},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("armed_miner","galaxy"),t.galaxy.foothold.support`
    ${z("galaxy_ore_processor")}
    `,reqs:{conflict:3},cost:{Money:e=>ec("ore_processor",e,3e6,1.25,"galaxy"),Iron:e=>ec("ore_processor",e,5e6,1.25,"galaxy"),Coal:e=>ec("ore_processor",e,375e4,1.25,"galaxy"),Graphene:e=>ec("ore_processor",e,225e4,1.25,"galaxy")},effect(){return`
    ${z("galaxy_ore_processor_effect",[10])}
    ${z("galaxy_alien2_support",[$(this)[0].support(),_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red])}
    `},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("ore_processor","galaxy"),t.galaxy.foothold.supportec("scavenger",e,75e5,1.25,"galaxy"),Alloy:e=>ec("scavenger",e,125e4,1.25,"galaxy"),Aluminium:e=>ec("scavenger",e,68e5,1.25,"galaxy"),Neutronium:e=>ec("scavenger",e,75e3,1.25,"galaxy"),Elerium:e=>ec("scavenger",e,750,1.25,"galaxy")},effect(){let e=It("gxy_alien2"),a=Math.round(25e3*e),r=+Xt($(this)[0].ship.helium).toFixed(2),s=t.race.cataclysm?`
    ${z("galaxy_scavenger_effect2_cata",[+(100*e*.75).toFixed(1)])}
    `:`
    ${z("galaxy_scavenger_effect2",[+(100*e/4).toFixed(1)])}
    `;return`
    ${z("galaxy_scavenger_effect",[a])}
    ${s}
    ${z("galaxy_alien2_support",[$(this)[0].support(),_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red])}
    ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
    ${z("spend",[r,t.resource.Helium_3.name])}
    `},ship:{civ:()=>t.race.high_pop?1*di.high_pop.vars()[0]:1,mil:()=>0,helium:12},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("scavenger","galaxy"),t.galaxy.foothold.supportz("galaxy_chthonian"),desc:()=>z("galaxy_chthonian_desc",[_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name]),control:()=>({name:_i[t.galaxy.alien2.id].name,color:"danger"})},chthonian_mission:{id:"galaxy-chthonian_mission",title:()=>z("galaxy_alien2_mission",[z("galaxy_chthonian")]),desc:()=>z("galaxy_alien2_mission_desc",[z("galaxy_chthonian")]),reqs:{chthonian:1},grant:["chthonian",2],queue_complete:()=>t.tech.chthonian>=2?0:1,cost:{Custom(){if(t.galaxy.hasOwnProperty("defense")&&t.galaxy.defense.hasOwnProperty("gxy_chthonian")){let e=0;return Object.keys(t.galaxy.defense.gxy_chthonian).forEach((function(a){e+=Tt.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_chthonian[a]})),{label:z("galaxy_fleet_rating",[`1250`]),met:!(e<1250)}}return{label:z("galaxy_fleet_rating",['1250']),met:!1}}},effect(){let e=0;t.galaxy.hasOwnProperty("defense")&&t.galaxy.defense.hasOwnProperty("gxy_chthonian")&&Object.keys(t.galaxy.defense.gxy_chthonian).forEach((function(a){e+=Tt.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_chthonian[a]}));let a=e>=4500?`${z("galaxy_piracy_low")}`:e>=2500?`${z("galaxy_piracy_avg")}`:`${z("galaxy_piracy_high")}`;return`
    ${z("galaxy_alien2_mission_effect2",[e])}
    ${z("galaxy_alien2_mission_effect3",[a])}
    ${z("galaxy_alien2_mission_effect",[z("galaxy_chthonian")])}
    `},action(){if(Cs($(this)[0])){let e=0;if(Object.keys(t.galaxy.defense.gxy_chthonian).forEach((function(a){e+=Tt.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_chthonian[a]})),e>=1250){let a=500,r=[];Bi(z("galaxy_chthonian_mission_result"),"info",!1,["progress"]),e>=2500&&(a=e>=4500?80:160),t.race.instinct&&(a/=2),Object.keys(t.galaxy.defense.gxy_chthonian).forEach((function(e){for(let s=0;s0&&(a-=Tt.gxy_gateway[e].ship.rating(),r.push(e))})),Bi(z("galaxy_chthonian_mission_result_losses",[r.map((e=>z(`galaxy_${e}`))).join(", ")]),"danger",!1,["progress"]);for(let e=0;e`
    ${z("galaxy_minelayer")}
    `,reqs:{chthonian:2},cost:{Money:e=>ec("minelayer",e,9e6,1.25,"galaxy"),Iron:e=>ec("minelayer",e,48e5,1.25,"galaxy"),Nano_Tube:e=>ec("minelayer",e,125e4,1.25,"galaxy"),Nanoweave:e=>ec("minelayer",e,1e5,1.25,"galaxy")},effect(){let e=+Xt($(this)[0].ship.helium).toFixed(2);return`
    ${z("galaxy_defense_platform_effect",[$(this)[0].ship.rating()])}
    ${z("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
    ${z("spend",[e,t.resource.Helium_3.name])}
    `},ship:{civ:()=>0,mil:()=>t.race.high_pop?1*di.high_pop.vars()[0]:1,helium:8,rating:()=>t.race.banana?35:50},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("minelayer","galaxy"),t.galaxy.minelayer.on++,!0)},postPower(){ic({el:"#gxy_chthonian"},"update")},post(){ic({el:"#gxy_chthonian"},"update")}},excavator:{id:"galaxy-excavator",title:z("galaxy_excavator"),desc:()=>`
    ${z("galaxy_excavator")}
    `,reqs:{chthonian:3},cost:{Money:e=>ec("excavator",e,12e6,1.25,"galaxy"),Polymer:e=>ec("excavator",e,44e5,1.25,"galaxy"),Iridium:e=>ec("excavator",e,36e5,1.25,"galaxy"),Mythril:e=>ec("excavator",e,18e4,1.25,"galaxy")},effect(){return`
    ${z("gain",[+Oe("excavator").toFixed(3),z("resource_Orichalcum_name")])}
    ${z("minus_power",[$(this)[0].powered()])}
    `},powered:()=>nc(8),powerBalancer:()=>[{r:"Orichalcum",p:Oe("excavator")}],action(){return!!Cs($(this)[0])&&(Dt("excavator","galaxy"),ks($(this)[0]),!0)}},raider:{id:"galaxy-raider",title:z("galaxy_raider"),desc:()=>`
    ${z("galaxy_raider")}
    `,reqs:{chthonian:3},cost:{Money:e=>ec("raider",e,12e6,1.25,"galaxy"),Titanium:e=>ec("raider",e,125e4,1.25,"galaxy"),Bolognium:e=>ec("raider",e,6e5,1.25,"galaxy"),Vitreloy:e=>ec("raider",e,125e3,1.25,"galaxy"),Stanene:e=>ec("raider",e,825e3,1.25,"galaxy")},effect(){let e=+Xt($(this)[0].ship.helium).toFixed(2);return It("gxy_chthonian"),`
    ${z("galaxy_ship_rating",[$(this)[0].ship.rating()])}
    ${z("gain",[.65,z("resource_Deuterium_name")])}
    ${z("gain",[.05,z("resource_Vitreloy_name")])}
    ${z("gain",[2.3,z("resource_Polymer_name")])}
    ${z("gain",[.8,z("resource_Neutronium_name")])}
    ${z("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
    ${z("spend",[e,t.resource.Helium_3.name])}
    `},ship:{civ:()=>0,mil:()=>t.race.high_pop?2*di.high_pop.vars()[0]:2,helium:18,rating:()=>t.race.banana?9:12},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("raider","galaxy"),t.galaxy.raider.on++,!0)},postPower(){ic({el:"#gxy_chthonian"},"update")},post(){ic({el:"#gxy_chthonian"},"update")}}}};function Et(e){let t="space";return"int_"===e.substr(0,4)?t="interstellar":"prtl_"===e.substr(0,5)?t="portal":"gxy_"===e.substr(0,4)?t="galaxy":"tau_"===e.substr(0,4)&&(t="tauceti"),t}function It(e,a,r){if(t.tech.piracy&&!t.race.truepath){let s=0,c=["dreadnought","cruiser_ship","frigate_ship","corvette_ship","scout_ship"];for(let a=0;ao?o:s))/o)*l+(1-l))*(a?1:It("gxy_stargate")):(1-(o-(s>o?o:s))/o)*l+(1-l)}return 1}function Kt(){let e=["protoplasm",t.race.species];t.city.hasOwnProperty("surfaceDwellers")&&e.push(...t.city.surfaceDwellers),t.custom.hasOwnProperty("race0")||e.push("custom");let a=Object.keys(_i).filter((function(t){return!["demonic","eldritch"].includes(_i[t].type)&&!e.includes(t)})),r=jc(a);t.galaxy.alien1={id:a[r]},e.push(a[r]),a=Object.keys(_i).filter((function(t){return!["angelic"].includes(_i[t].type)&&!e.includes(t)}));let s=jc(a);t.galaxy.alien2={id:a[s]}}function Lt(){let e=1;return t.race.pack_rat&&(e*=1.05),t.stats.achieve.blackhole&&(e*=1+.05*t.stats.achieve.blackhole.l),e*=t.tech.world_control?2:1,e}const Nt={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},laboratory:{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 Dt(e,a){a||(a="space"),t[a][e]||(t[a][e]=Nt[e]),t[a][e].count++}function Bt(e,t){return e&&t?St[e][t]:St}function Gt(e,t,a){switch(e){case"space":return Rt(St,t,a);case"interstellar":return Rt(Ft,t,a);case"galaxy":return Rt(Tt,t,a)}}function Rt(e,a,r){let s=t.race.truepath?"truepath":"standard";if(e[a][r].hasOwnProperty("path")&&!e[a][r].path.includes(s))return!1;var i=!0;return Object.keys(e[a][r].reqs).forEach((function(s){(!t.tech[s]||t.tech[s]=e[a][r].grant[1]&&(i=!1),i}function Ht(){(t.settings.tabLoad||1===t.settings.civTabs)&&(Ut("inner"),t.race.truepath&&Ut("outer"),Wt(),Qt())}function Ut(e){if(e||(e=5===t.settings.spaceTabs?"outer":"inner"),!t.settings.tabLoad&&(1!==t.settings.civTabs||![1,5].includes(t.settings.spaceTabs)||1===t.settings.civTabs&&1===t.settings.spaceTabs&&"inner"!==e||5===t.settings.spaceTabs&&"outer"!==e))return;let a="inner"===e?$("#space"):$("#outerSol");if(sc(a),a.append($(`

    ${z("inner"===e?"tab_space":"tab_outer_space")}

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

    ${s}

    {{ support }}/{{ s_max }}
    `),ic({el:`#sr${r}`,data:t.space[e]})}else a.append(`

    ${s}

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

    ${z("tab_interstellar")}

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

    ${r}

    {{ support }}/{{ s_max }}
    `),ic({el:`#sr${a}`,data:t.interstellar[s]})}else e.append(`

    ${r}

    `);Ei(a,(function(){return"string"==typeof Ft[a].info.desc?Ft[a].info.desc:Ft[a].info.desc()}),{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(Ft[a]).forEach((function(e){"info"!==e&&Rt(Ft,a,e)&&vs(Ft[a][e],"interstellar",e)}))}}))}function Qt(){if(!t.settings.tabLoad&&(1!==t.settings.civTabs||3!==t.settings.spaceTabs))return;let e=$("#galaxy");if(sc(e),e.append($(`

    ${z("tab_galactic")}

    `)),!t.settings.showGalactic)return!1;!function(e,a){if(t.tech.piracy&&!t.race.truepath){let r=$(`

    ${z("galaxy_armada")}

    `);e.append(r);let s=t.tech.world_control?z("civics_garrison_peacekeepers"):z("civics_garrison_soldiers");r.append($("|")),r.append($(`${s} {{ g.workers | stationed }} / {{ g.max | s_max }}`)),r.append($("|")),r.append($(`${z("job_crew_mil")} {{ g.crew }}`)),r.append($("|")),r.append($(`${z("job_crew_civ")} {{ c.workers }} / {{ c.max }}`)),ic({el:`#h${a}`,data:{g:t.civic.garrison,c:t.civic.crew},filters:{stationed:e=>Me(),s_max:e=>Me(!0)}}),["soldier","crew1","crew2"].forEach((function(e){Ei(`h${a}${e}`,(function(){switch(e){case"soldier":return ye();case"crew1":return z("civics_garrison_crew_desc");case"crew2":return z("job_crew_desc")}}),{elm:`#h${a} span.${e}`})}));let i=$(`
    `);e.append(i);let c=["scout_ship","corvette_ship","frigate_ship","cruiser_ship","dreadnought"],o=[];for(let e=0;e<6;e++){let e=$('
    ');o.push(e),i.append(e)}for(let e=0;e${Tt.gxy_gateway[c[e]].title}`);o[e+1].append(t)}o[0].append($("")),o[0].append($(`${Tt.gxy_gateway.info.name}`));for(let e=0;e{{ gateway.${c[e]} }}`);o[e+1].append(t)}Object.keys(t.galaxy.defense).forEach((function(e){let a=e.substring(4);if(t.settings.space[a]&&"gateway"!==a){let r=$(`${"string"==typeof Tt[e].info.name?Tt[e].info.name:Tt[e].info.name()}`);o[0].append(r);for(let r=0;r'),s=$(`«`),i=$(`{{ ${a}.${c[r]} }}`),n=$(`»`);o[r+1].append(t),t.append(s),t.append(i),t.append(n)}}})),ic({el:`#${a}`,data:{stargate:t.galaxy.defense.gxy_stargate,gateway:t.galaxy.defense.gxy_gateway,gorddon:t.galaxy.defense.gxy_gorddon,alien1:t.galaxy.defense.gxy_alien1,alien2:t.galaxy.defense.gxy_alien2,chthonian:t.galaxy.defense.gxy_chthonian,t:t.tech},methods:{sub(e,a){if(t.galaxy.defense[e][a]>0){let r=b();r>t.galaxy.defense[e][a]&&(r=t.galaxy.defense[e][a]),t.galaxy.defense.gxy_gateway[a]+=r,t.galaxy.defense[e][a]-=r}},add(e,a){if(t.galaxy.defense.gxy_gateway[a]>0){let r=b();r>t.galaxy.defense.gxy_gateway[a]&&(r=t.galaxy.defense.gxy_gateway[a]),t.galaxy.defense.gxy_gateway[a]-=r,t.galaxy.defense[e][a]+=r}}}}),Object.keys(t.galaxy.defense).forEach((function(e){let a=e.substring(4);t.settings.space[a]&&Ei(`armada${a}`,(function(){return`
    ${"string"==typeof Tt[e].info.desc?Tt[e].info.desc:Tt[e].info.desc()}
    `}))}));for(let e=0;e`);e.append(s);let i=$(`

    ${r}

    `);s.append(i),t.tech.xeno&&t.tech.xeno>=3&&s.append(`{{ r.control().name }}`);let c={el:`#${a}`,data:{r:Tt[a].info},methods:{threat(e){let a=t.race.infiltrator?1:2;if(t.galaxy.defense[e].scout_ship>=a){let t=100*(1-It(e,!0));return t=t<1?Math.ceil(t):Math.round(t),0===t?"has-text-success":t<=20?"has-text-advanced":t<=40?"has-text-info":t<=60?"has-text-warning":t<=80?"has-text-caution":"has-text-danger"}return"has-text-danger"}},filters:{pirate(e){let a=t.race.infiltrator?1:2;if(t.galaxy.defense[e].scout_ship>=a){let a=100*(1-It(e,!0));a=a<1?Math.ceil(a):Math.round(a);let r=t.race.infiltrator?3:4;return t.galaxy.defense[e].scout_ship>=r?`${a}%`:z(0===a?"galaxy_piracy_none":a<=20?"galaxy_piracy_vlow":a<=40?"galaxy_piracy_low":a<=60?"galaxy_piracy_avg":a<=80?"galaxy_piracy_high":"galaxy_piracy_vhigh")}return"???"},defense:e=>It(e,!0,!0)}};if(Tt[a].info.support){let e=Tt[a].info.support;t.galaxy[e]&&(t.galaxy[e].hasOwnProperty("support")||(t.galaxy[e].support=0,t.galaxy[e].s_max=0),s.append('{{ s.support }}/{{ s.s_max }}'),c.data.s=t.galaxy[e])}t.tech.piracy&&s.append(`
    ${z("galaxy_piracy_threat",[_i[t.galaxy.alien2.id].name])}{{ '${a}' | pirate }}|${z("galaxy_armada")}: {{ '${a}' | defense }}
    `),ic(c),Ei(a,(function(){return"string"==typeof Tt[a].info.desc?Tt[a].info.desc:Tt[a].info.desc()}),{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),Ei(a,(function(){return z("galaxy_control",[Tt[a].info.control().name,r])}),{elm:`#${a} .regionControl`,classes:"has-background-light has-text-dark"}),Object.keys(Tt[a]).forEach((function(e){"info"!==e&&Rt(Tt,a,e)&&vs(Tt[a][e],"galaxy",e)}))}}))}function Zt(e){return t.tech.space_housing&&(e*=.8**t.tech.space_housing),e}function Vt(e){return t.tech.solar&&t.tech.solar>=5&&c.iron_ship&&(e*=.95**c.iron_ship),e}function Jt(e){if(t.space.swarm_plant){let a=t.tech.swarm?.88:.94;t.tech.swarm>=3&&(a-=u/100),a<.05&&(a=.05),e*=a**t.space.swarm_plant.count}return e}function Yt(e,a,r){return r=r||{},"heavy"===t.race.universe&&(e*=1.25+.5*lc("heavy")),t.race.truepath&&(e*=a?2.5:1.25),t.city.mass_driver&&i.mass_driver?e*=(t.race.truepath?.94:.95)**i.mass_driver:r.mass_driver&&(e*=.95**r.mass_driver),t.stats.achieve.heavyweight&&(e*=.96**t.stats.achieve.heavyweight.l),t.city.ptrait.includes("dense")&&(e*=Fi.dense.vars()[2]),t.race.cataclysm&&(e*=.2),t.race.heavy&&(e*=1+di.heavy.vars()[0]/100),Ec("launch_day")&&(e*=.95),e}function Xt(e){return"heavy"===t.race.universe&&(e*=1.2+.3*lc("heavy")),t.stats.achieve.heavyweight&&(e*=.96**t.stats.achieve.heavyweight.l),t.race.heavy&&(e*=1+di.heavy.vars()[0]/100),Ec("launch_day")&&(e*=.95),e}function ea(){let e={red:_i[t.race.species].solar.red,hell:_i[t.race.species].solar.hell,gas:_i[t.race.species].solar.gas,gas_moon:_i[t.race.species].solar.gas_moon,dwarf:_i[t.race.species].solar.dwarf,titan:pi[_i[t.race.species].type].solar.titan,enceladus:pi[_i[t.race.species].type].solar.enceladus,triton:pi[_i[t.race.species].type].solar.triton,eris:pi[_i[t.race.species].type].solar.eris};if("custom"===t.race.species)for(let a of["titan","enceladus","triton","eris"])t.custom.race0.hasOwnProperty(a)&&(e[a]=t.custom.race0[a]);return e}const ta=["l","h","a","e","m","mg"],aa={standard:{name:z("universe_standard"),desc:z("universe_standard_desc"),effect:z("universe_standard_effect")},heavy:{name:z("universe_heavy"),desc:z("universe_heavy_desc"),effect:z("universe_heavy_effect",[5])},antimatter:{name:z("universe_antimatter"),desc:z("universe_antimatter_desc"),effect:z("universe_antimatter_effect")},evil:{name:z("universe_evil"),desc:z("universe_evil_desc"),effect:z("universe_evil_effect")},micro:{name:z("universe_micro"),desc:z("universe_micro_desc"),effect:z("universe_micro_effect",[75])},magic:{name:z("universe_magic"),desc:z("universe_magic_desc"),effect:z("universe_magic_effect")}};function ra(){let e=[];if(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=4&&t.custom.hasOwnProperty("planet")&&Object.keys(aa).forEach((function(a){let r=Xc(a);t.custom.planet.hasOwnProperty(r)&&t.custom.planet[r].s&&e.push(`${r}:s`)})),t.race.geck&&t.race.geck>0){let e=$(`
    ${z("gecks_remaining")}: {{ geck }}
    `);$("#evolution").append(e),ic({el:"#geck",data:t.race})}if(0===t.race.probes)ws({custom:e});else{let a=!1;for(let r=0;r'),s={ascended:{},technophobe:t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l?t.stats.achieve.technophobe.l:0};if(a?a.append(r):$("#city").append(r),r.append(`

    ${z("genelab_title")}

    - ${z("genelab_genes")} {{ g.genes }} - ${z("trait_untapped_name")}: {{ g.genes | untapped }}
    `),a){r.append(`\n
    ${z("achieve_ascended_name")}
    \n `);let e=$("
    ");r.append(e),Object.keys(aa).forEach((function(a){s.ascended[a]=t.stats.achieve.ascended&&t.stats.achieve.ascended.hasOwnProperty(Xc(a))?t.stats.achieve.ascended[Xc(a)]:0,e.append(`\n
    ${z("universe_"+a)}
    \n `)})),r.append(`\n
    ${z("achieve_technophobe_name")}
    \n
    \n
    \n
    \n `)}let i=$(`
    ${z("genelab_name")}
    ${z("genelab_entity")}
    ${z("genelab_home")}
    ${z("genelab_desc")}
    `);r.append(i);let c=$(`
    \n
    ${z("genelab_red")}
    \n
    ${z("genelab_hell")}
    \n
    ${z("genelab_gas")}
    \n
    ${z("genelab_gas_moon")}
    \n
    ${z("genelab_dwarf")}
    `);r.append(c);let o=$(`
    \n
    ${z("genelab_titan")}
    \n
    ${z("genelab_enceladus")}
    \n
    ${z("genelab_triton")}
    \n
    ${z("genelab_eris")}
    `);r.append(o);let n=$('
    ');r.append(n);let l=!1,u=`
    ${z("genelab_genus")}
    ",n.append($(u));let d=`
    ${z("genelab_traits")}
    ",n.append($(d));let h=`\n
    \n \n
    \n
    \n
    \n \n \n \n
    \n
    \n {{ err.msg }}\n
    \n `;a||(h+=`\n
    \n \n
    \n `),r.append(h);var m=t.hasOwnProperty("custom")&&t.custom.hasOwnProperty("race0")?{name:t.custom.race0.name,desc:t.custom.race0.desc,entity:t.custom.race0.entity,home:t.custom.race0.home,red:t.custom.race0.red,hell:t.custom.race0.hell,gas:t.custom.race0.gas,gas_moon:t.custom.race0.gas_moon,dwarf:t.custom.race0.dwarf,titan:t.custom.race0.titan||ea().titan,enceladus:t.custom.race0.enceladus||ea().enceladus,triton:t.custom.race0.triton||ea().triton,eris:t.custom.race0.eris||ea().eris,genes:0,genus:t.custom.race0.genus,traitlist:t.custom.race0.traits}:{name:"Zombie",desc:"Zombies aren't so much a species as they are the shambling remains of a race who succumbed to a nightmarish virus. Yet somehow they continue to drone on.",entity:"rotting bipedal creatures",home:"Grave",red:"Brains",hell:"Rigor Mortis",gas:"Decompose",gas_moon:"Bones",dwarf:"Double Tap",titan:"Necromancer",enceladus:"Skeleton",triton:"Rot",eris:"Zombieland",genes:10,genus:l,traitlist:[]};for(let e=m.traitlist.length-1;e>=0;e--)di.hasOwnProperty(m.traitlist[e])&&"major"===di[m.traitlist[e]].type||m.traitlist.splice(e,1);m.genes=Fc(m,!!a&&s);let f={msg:""};ic({el:"#celestialLab",data:{g:m,w:s,err:f},methods:{val(e){"technophobe"===e?s.technophobe<0?s.technophobe=0:s.technophobe>5&&(s.technophobe=5):s.ascended[e]<0?s.ascended[e]=0:s.ascended[e]>5&&(s.ascended[e]=5)},geneEdit(){m.genes=Fc(m,!!a&&s)},setRace(){Fc(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&&(t.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},function(){C(),Vi("reset",{end:"ascend"});let a=t.race.species,r=t.race.gods,s=t.city.calendar.orbit,i=t.city.biome,c=t.city.ptrait,o=t.city.geology,n=gc("ascend");t.stats.ascend++,zc(),t.prestige.Phage.count+=n.phage,t.stats.phage+=n.phage,"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=n.plasmid,t.stats.antiplasmid+=n.plasmid):(t.prestige.Plasmid.count+=n.plasmid,t.stats.plasmid+=n.plasmid),t.prestige.Harmony.count=parseFloat((t.prestige.Harmony.count+n.harmony).toFixed(2)),t.stats.harmony=parseFloat((t.stats.harmony+n.harmony).toFixed(2)),c.forEach((function(e){Fi.hasOwnProperty(e)&&eo(`atmo_${e}`)})),void 0===t.tech.world_control&&eo("cult_of_personality");let l=0;Object.keys(t.city.geology).forEach((function(e){t.city.geology[e]>0&&l++})),l>=4&&eo("miners_dream"),t.galaxy.hasOwnProperty("dreadnought")&&0!==t.galaxy.dreadnought.count||eo("dreaded"),t.race.modified||"synth"!==t.race.species&&"nano"!==t.race.species||!t.race.emfield||to("digital_ascension"),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&eo("gross"),io();let u=!!t.race.hasOwnProperty("srace")&&t.race.srace,d=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0;t.race={species:"protoplasm",gods:a,old_gods:r,universe:t.race.universe,seeded:!1,seed:Math.floor(g(1e4)),ascended:!0},d>0&&(t.race.corruption=d),u&&(t.race.srace=u),Object.keys(o).forEach((function(e){o[e]+=.02})),Z({orbit:s,biome:i,ptrait:c,geology:o}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}())},allowed:e=>!("synthetic"===m.genus||!["deconstructor","imitation"].includes(e)||(m.traitlist.includes(e)&&m.traitlist.splice(m.traitlist.indexOf(e),1),0)),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=l,m.traitlist=[],m.genes=Fc(m,!!a&&s)},customImport(){let e=document.getElementById("customFile").files[0];if(e){let r=new FileReader;r.readAsText(e,"UTF-8"),r.onload=function(r){let i="";try{i=JSON.parse(r.target.result)}catch{return void(f.msg=z("string_pack_error",[e.name]))}let c=!1;if(Object.keys(m).forEach((function(e){i[e]&&typeof m[e]!=typeof i[e]&&(c=!0)})),c)return f.msg=z("string_pack_error",[e.name]),void console.log("format fail");Object.keys(m).forEach((function(e){i[e]&&(m[e]=i[e])})),["name","home","red","hell","gas","gas_moon","dwarf","titan","enceladus","triton","eris"].forEach((function(e){!i[e]&&["titan","enceladus","triton","eris"].includes(e)?m[e]=z(`genus_${m.genus}_solar_${e}`):m[e].length>20&&(m[e]=m[e].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)),a||t.stats.achieve[`genus_${m.genus}`]&&t.stats.achieve[`genus_${m.genus}`].l>0||(m.genus=l);let o=[];for(let e=0;e{const r=document.createElement("a"),s=new Blob([e],{type:"text/plain"});r.href=URL.createObjectURL(s),r.download=t,r.click(),URL.revokeObjectURL(r.href)})(JSON.stringify(m,null,4),`evolve-custom-${m.name}.txt`)}},filters:{cost(e){if(di[e].val>=0){let r=2;a?r+=s.technophobe:t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=1&&(r+=t.stats.achieve.technophobe.l);let i=di[e].val,c=0;for(let e=0;e=0&&c++;return m.traitlist.includes(e)&&c--,c>r&&(i+=c-r),i}return di[e].val},untapped:e=>`+${e>0?+(100*(e/(e+20)/10+24e-5)).toFixed(3):0}%`}}),Object.keys(ui).forEach((function(e){t.stats.achieve[`genus_${e}`]&&t.stats.achieve[`genus_${e}`].l>0&&Ei(`celestialLabgenusSelection${e}`,(function(){let t=$(`
    ${z(`genelab_genus_${e}_desc`)}
    `);return Object.keys(ui[e]).forEach((function(e){if(di[e]){let a=$("
    ");Uc(a,e,{trank:1}),t.append(a)}})),t}),{elm:`#celestialLab .genus_selection .${e}`,classes:"w30",wide:!0})})),Object.keys(p).sort().forEach((function(e){di.hasOwnProperty(e)&&"major"===di[e].type&&Ei(`celestialLabtraitSelection${e}`,(function(){let t=$("
    ");return Uc(t,e,{trank:1}),t}),{elm:`#celestialLab .trait_selection .t${e}`,classes:"w30",wide:!0})}))}function ia(a){a||t.race.noexport||(P.w&&P.w.terminate(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),eo(`biome_${t.city.biome}`),eo(`genus_${_i[t.race.species].type}`),eo("lamentis"),"junker"===t.race.species&&to("the_misery"),t.race.noexport="Planet",sc($("#city")),t.settings.showCity=!0,t.settings.showCivic=!1,t.settings.showResearch=!1,t.settings.showResources=!1,t.settings.showGenetics=!1,t.settings.showSpace=!1,t.settings.showDeep=!1,t.settings.showGalactic=!1,t.settings.showPortal=!1,t.settings.spaceTabs=0);let r=$('
    '),s={ascended:{},lamentis:t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l?t.stats.achieve.lamentis.l:0};a?a.append(r):$("#city").append(r),r.append(`

    ${z("planetlab_title")}

    - ${z("planetlab_points")} {{ p.pts }}
    `);let i=$('
    ');r.append(i);let c=!1,o=`
    ${z("wiki_planet_biome")}
    ",i.append($(o));let n=`
    ${z("wiki_planet_trait")}
    ",i.append($(n));let l={},u=["Copper","Iron","Aluminium","Coal","Oil","Titanium","Uranium"];t.stats.achieve.whitehole&&u.push("Iridium");let d=`
    ${z("planetlab_res")}
    ",i.append($(d));let _={biome:c,pts:0,traitlist:[],geology:l,orbit:t.city.calendar.orbit};if(t.custom.hasOwnProperty("planet")){let e=Xc();if(t.custom.planet.hasOwnProperty(e)){let a="s";t.custom.planet[e][a]&&(_=Ac(t.custom.planet[e][a]),_.orbit=t.city.calendar.orbit,u.forEach((function(e){_.geology.hasOwnProperty(e)?_.geology[e]*=100:_.geology[e]=0})))}}_.pts=ca(_);let p=`
    \n
    \n \n
    \n `;a||(p+=`\n
    \n \n
    \n `),p+="
    ",r.append(p),ic({el:"#celestialLab",data:{p:_,w:s},methods:{pEdit(){_.pts=ca(_)},setPlanet(){if(ca(_)>=0){Object.keys(_.geology).forEach((function(e){0===_.geology[e]?delete _.geology[e]:_.geology[e]/=100})),t.custom.hasOwnProperty("planet")||(t.custom.planet={});let a=Xc();t.custom.planet.hasOwnProperty(a)||(t.custom.planet[a]={s:!1});let r="s";t.custom.planet[a][r]=Ac(_),delete t.custom.planet[a][r].pts,function(a){C(),Vi("reset",{end:"terraform"});let r=t.race.species,s=t.race.gods,i=t.city.calendar.orbit,c=a.biome,o=a.traitlist,n=a.geology,l=gc("terraform");t.stats.terraform++,zc(),t.prestige.Phage.count+=l.phage,t.stats.phage+=l.phage,"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=l.plasmid,t.stats.antiplasmid+=l.plasmid):(t.prestige.Plasmid.count+=l.plasmid,t.stats.plasmid+=l.plasmid),t.prestige.Harmony.count=parseFloat((t.prestige.Harmony.count+l.harmony).toFixed(2)),t.stats.harmony=parseFloat((t.stats.harmony+l.harmony).toFixed(2)),o.forEach((function(e){Fi.hasOwnProperty(e)&&eo(`atmo_${e}`)})),void 0===t.tech.world_control&&eo("cult_of_personality");let u=0;Object.keys(t.city.geology).forEach((function(e){t.city.geology[e]>0&&u++})),u>=4&&eo("miners_dream"),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&eo("gross"),io();let d=!!t.race.hasOwnProperty("srace")&&t.race.srace,_=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0;t.race={species:"protoplasm",gods:r,old_gods:s,universe:t.race.universe,seeded:!1,seed:Math.floor(g(1e4)),ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended,rejuvenated:!0},_>0&&(t.race.corruption=_),d&&(t.race.srace=d),Z({orbit:i,biome:c,ptrait:o,geology:n}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}(_)}},reset(){_.traitlist=[],Object.keys(_.geology).forEach((function(e){_.geology[e]=0})),_.pts=ca(_)},less(e){_.geology[e]-=b(),_.geology[e]<-20&&(_.geology[e]=-20)},more(e){_.geology[e]+=b();let a=30;t.stats.achieve.whitehole&&(a+=5*t.stats.achieve.whitehole.l),"eden"===_.biome&&(a+=5),_.geology[e]>a&&(_.geology[e]=a)}},filters:{res:e=>_.geology[e]}})}function ca(e,a){let r=("eden"===e.biome?0:10)+(t.stats.achieve.lamentis?10*t.stats.achieve.lamentis.l:0);t.race.truepath&&(r*=2),r-=e.traitlist.length**3;let s=0;return Object.keys(e.geology).forEach((function(t){0!==e.geology[t]&&(r-=e.geology[t],s++)})),s>3&&(r-=(s-3)**2),r}const oa={unemployed:function(e){let a=z("job_unemployed_desc");return"unemployed"!==t.civic.d_job||e||(a=a+" "+z("job_default",[z("job_unemployed")])),a},hunter:function(e){let a=z("job_hunter_desc",[t.resource.Food.name]);return t.race.unfathomable&&(a=z("job_eld_hunter_desc")),t.race.artifical?a=t.race.soul_eater?z("job_art_demon_hunter_desc",[t.resource.Furs.name,t.resource.Lumber.name]):z("job_art_hunter_desc",[t.resource.Furs.name]):t.race.soul_eater&&"wendigo"!==t.race.species&&(a=z(t.race.evil?"job_evil_hunter_desc":"job_not_evil_hunter_desc",[t.resource.Food.name,t.resource.Lumber.name,t.resource.Furs.name])),"hunter"!==t.civic.d_job||e||(a=a+" "+z("job_default",[t.race.unfathomable?z("job_raider"):z("job_hunter")])),a},forager:function(e){let a=z("job_forager_desc");return"forager"!==t.civic.d_job||e||(a=a+" "+z("job_default",[z("job_forager")])),a},farmer:function(e){let a=+ha(!0,e).toFixed(2),r=+ha(!1,e).toFixed(2);e||(a=+la(a,"farmer").toFixed(2),r=+la(r,"farmer").toFixed(2));let s=t.race.high_pop&&!e?z("job_farmer_desc_hp",[a,t.resource.Food.name,ua(1),r,ua(1)*t.city.farm.count]):z("job_farmer_desc",[a,t.resource.Food.name,t.city.farm.count,r]);return"farmer"!==t.civic.d_job||e||(s=s+" "+z("job_default",[z("job_farmer")])),s},lumberjack:function(e){let a=e&&t.race.servants?t.race.servants.jobs.lumberjack:t.civic.lumberjack.workers,r=t.civic.lumberjack.impact;if(e||(a=+la(a,"lumberjack").toFixed(2),r=+la(r,"lumberjack").toFixed(2)),!t.race.evil||t.race.soul_eater&&"wendigo"!==t.race.species){let s=1+(t.tech.axe&&t.tech.axe>0?.35*(t.tech.axe-1):0);e||(s*=hi(a,"lumberjack")),"forest"===t.city.biome&&(r*=Si.forest.vars()[0]),"savanna"===t.city.biome&&(r*=Si.savanna.vars()[2]),"desert"===t.city.biome&&(r*=Si.desert.vars()[2]),"swamp"===t.city.biome&&(r*=Si.swamp.vars()[2]),"taiga"===t.city.biome&&(r*=Si.taiga.vars()[0]);let i=z("job_lumberjack_desc",[+(r*s).toFixed(2),t.resource.Lumber.name]);return"lumberjack"!==t.civic.d_job||e||(i=i+" "+z("job_default",[z("job_lumberjack")])),i}{let s=1;e||(s*=hi(a,"lumberjack"));let i=+(r*s).toFixed(2),c=+(r/4*s).toFixed(2),o="wendigo"===t.race.species?z("job_reclaimer_desc2",[i]):z("job_reclaimer_desc",[i,c]);return"lumberjack"!==t.civic.d_job||e||(o=o+" "+z("job_default",[z("job_reclaimer")])),o}},quarry_worker:function(e){let a=e&&t.race.servants?t.race.servants.jobs.quarry_worker:t.civic.quarry_worker.workers,r=t.civic.quarry_worker.impact;e||(a=+la(a,"quarry_worker").toFixed(2),r=+la(r,"quarry_worker").toFixed(2));let s=1+(t.tech.hammer&&t.tech.hammer>0?.4*t.tech.hammer:0);e||(s*=hi(a,"miner")),"desert"===t.city.biome&&(s*=Si.desert.vars()[0]),"swamp"===t.city.biome&&(s*=Si.swamp.vars()[3]),t.tech.explosives&&t.tech.explosives>=2&&(s*=t.tech.explosives>=3?1.75:1.5);let i=+(r*s).toFixed(1),c=t.resource.Aluminium.display?z("job_quarry_worker_desc2",[i,t.resource.Stone.name,t.resource.Aluminium.name]):z("job_quarry_worker_desc1",[i,t.resource.Stone.name]);return t.race.smoldering&&(c=c+" "+z("job_quarry_worker_smoldering",[t.resource.Chrysotile.name])),"quarry_worker"!==t.civic.d_job||e||(c=c+" "+z("job_default",[z("job_quarry_worker")])),c},crystal_miner:function(e){let a=e&&t.race.servants?t.race.servants.jobs.crystal_miner:t.civic.crystal_miner.workers,r=t.civic.crystal_miner.impact,s=1;e||(a=+la(a,"crystal_miner").toFixed(2),r=+la(r,"crystal_miner").toFixed(2),s*=hi(a,"miner"));let i=z("job_crystal_miner_desc",[+(r*s).toFixed(2),t.resource.Crystal.name]);return"crystal_miner"!==t.civic.d_job||e||(i=i+" "+z("job_default",[z("job_crystal_miner")])),i},scavenger:function(e){let a=di.scavenger.vars()[0];t.city.ptrait.includes("trashed")&&t.race.scavenger&&(a*=1+di.scavenger.vars()[1]/100),t.race.high_pop&&!e&&(a*=di.high_pop.vars()[1]/100),e||(a=+la(a,"scavenger").toFixed(2));let r=z("job_scavenger_desc",[_i[t.race.species].home,a]);return"scavenger"!==t.civic.d_job||e||(r=r+" "+z("job_default",[z("job_scavenger")])),r},torturer:function(){return z("job_torturer_desc")},miner:function(){return t.tech.mining>=3?t.race.sappy&&t.tech.alumina?z("job_miner_desc2_amber"):z("job_miner_desc2"):z("job_miner_desc1")},coal_miner:function(){return t.tech.uranium?z("job_coal_miner_desc2"):z("job_coal_miner_desc1")},craftsman:function(){return z("job_craftsman_desc")},cement_worker:function(){let e=t.race.high_pop?3/di.high_pop.vars()[0]:3;"ashland"===t.city.biome&&(e*=Si.ashland.vars()[1]),e=+la(e,"cement_worker").toFixed(2);let a=+la(t.civic.cement_worker.impact,"cement_worker").toFixed(2)*(t.tech.cement>=4?1.2:1)*hi(t.civic.cement_worker.workers,"factory");return"ashland"===t.city.biome&&(a*=Si.ashland.vars()[1]),a=+a.toFixed(2),t.race.sappy?z("job_cement_worker_amber_desc",[a]):z("job_cement_worker_desc",[a,e])},banker:function(){let e=100*+la(t.civic.banker.impact,"banker").toFixed(2);return t.tech.banking>=10&&(e+=2*t.tech.stock_exchange),t.race.truthful&&(e*=1-di.truthful.vars()[0]/100),"republic"===t.civic.govern.type&&(e*=1.25),t.race.high_pop&&(e*=di.high_pop.vars()[1]/100),e=+e.toFixed(0),z("job_banker_desc",[e])},entertainer:function(){let e=t.tech.theatre;t.race.musical&&(e+=di.musical.vars()[0]),t.race.emotionless&&(e*=1-di.emotionless.vars()[0]/100),t.race.high_pop&&(e*=di.high_pop.vars()[1]/100),e=+la(e,"entertainer").toFixed(2);let a=t.race.high_pop?di.high_pop.vars()[1]/100:1;return a=+la(a,"entertainer").toFixed(2),t.tech.superstar?z("job_entertainer_desc2",[e,a]):z("job_entertainer_desc",[+e.toFixed(2)])},priest:function(){let e="";return e="theocracy"===t.civic.govern.type&&t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display?z("job_priest_desc2"):z("job_priest_desc"),t.tech.cleric&&(e+=` ${z("job_priest_desc3")}`),e},professor:function(){let e=+la(1,"professor"),a=+(t.race.studious?t.civic.professor.impact+di.studious.vars()[0]:t.civic.professor.impact),r=Oi("elven");return r>0&&(a+=di.studious.vars(1)[0]*r),e*=a,e*=t.race.pompous?1-di.pompous.vars()[0]/100:1,e*=hi(t.civic.professor.workers,"science"),t.tech.anthropology&&t.tech.anthropology>=3&&(e*=1+.05*t.city.temple.count),"theocracy"===t.civic.govern.type&&(e*=.75),e=+e.toFixed(2),z("job_professor_desc",[e])},scientist:function(){let e=+la(t.civic.scientist.impact,"scientist").toFixed(2);return e*=hi(t.civic.scientist.workers,"science"),t.tech.science>=6&&t.city.wardenclyffe&&(e*=1+t.civic.professor.workers*t.city.wardenclyffe.on*.01),t.space.satellite&&(e*=1+.01*t.space.satellite.count),"theocracy"===t.civic.govern.type&&(e*=t.tech.high_tech&&t.tech.high_tech>=12?t.tech.high_tech>=16?.75:.6:.5),e=+e.toFixed(2),"magic"===t.race.universe?z("job_wizard_desc",[e,+(.025*lc("magic")).toFixed(4)]):z("job_scientist_desc",[e])},colonist:()=>z(t.race.truepath?"job_colonist_desc_tp":"job_colonist_desc",[ea().red]),titan_colonist:()=>z("job_colonist_desc_tp",[ea().titan]),space_miner:()=>z("job_space_miner_desc"),hell_surveyor:()=>z("job_hell_surveyor_desc"),archaeologist(){let e=75*(i.arcology||0),a=(qe(t.portal.guard_post.on,"hellArmy",0)+e)/5e3;a=a>1?1:a;let r=25e4;return t.race.high_pop&&(r*=di.high_pop.vars()[1]/100),z("job_archaeologist_desc",[Math.round(r*a).toLocaleString()])},pit_miner:()=>z("job_pit_miner_desc",[z("tau_planet",[_i[t.race.species].home])]),crew:()=>z("job_crew_desc")};function na(e){e||$("#civics").append($(`

    ${z("civics_jobs")}

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

    {{ civic.${e}.name }}

    {{ civic.${e}.workers | adjust('${e}') }} / {{ civic.${e}.max | adjust('${e}') }}
    `);l.append(t)}else{c=c||"info";let t=o?$(`

    {{ civic.${e}.name }}

    {{ sjob.${e} }}
    `):$(``);l.append(t)}if(l.append(u),$(o?"#servants":"#jobs").append(l),"crew"!==e){var d=$(`«`),_=$(`»`);u.append(d),u.append(_)}ic(o?{el:`#${n}`,data:{civic:t.civic,sjob:t.race.servants.jobs},methods:{showJob:e=>t.civic[e].display||"scavenger"===e&&t.race.servants.force_scavenger,add(){let a=b();for(let r=0;rt.race.servants.used;r++)t.race.servants.jobs[e]++,t.race.servants.used++},sub(){let a=b();for(let r=0;r0;r++)t.race.servants.jobs[e]--,t.race.servants.used--}}}:{el:`#${n}`,data:{civic:t.civic},methods:{showJob:e=>t.civic[e].display,add(){let a=b();for(let r=0;r0;r++)t.civic[e].workers++,t.civic[t.civic.d_job].workers--,t.civic[e].assigned=t.civic[e].workers},sub(){let a=b();for(let r=0;r0;r++)t.civic[e].workers--,t.civic[t.civic.d_job].workers++,t.civic[e].assigned=t.civic[e].workers},level:e=>0===t.civic[e].workers?"count has-text-danger":t.civic[e].workers===t.civic[e].max?"count has-text-success":t.civic[e].workers<=t.civic[e].max/3?"count has-text-caution":t.civic[e].workers<=.66*t.civic[e].max?"count has-text-warning":t.civic[e].workerst.civic.d_job===e},filters:{d_state:e=>t.civic.d_job===e?"*":"",event(a){if("unemployed"===e&&t.civic.unemployed.display||"hunter"===e&&!t.civic.unemployed.display){let e=xc(3,14);if(0===a&&e.length>0)return e}return a},adjust:(e,t)=>"titan_colonist"===t&&i.ai_colonist?e+ua(i.ai_colonist):e}}),Ei(n,(function(){return oa[e](o)}),{elm:`#${n} .job_label`,classes:"has-background-light has-text-dark"})}}function pa(){if(sc($("#servants")),t.race.servants){var e=$(`

    ${z("civics_servants")}

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

    ${z(e?"civics_skilled_servants":"craftsman_assigned")}

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

    ${r}

    {{ f.${s} }} / {{ p.on | maxScar }}
    `):"Quantium"===s&&(t.space.hasOwnProperty("zero_g_lab")||t.tauceti.hasOwnProperty("infectious_disease_lab"))?$(`

    ${r}

    {{ f.${s} }} / {{ e.on | maxQuantium }}
    `):$(`

    ${r}

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

    ${z("tab_portal")}

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

    ${r}

    ${s}
    `):e.append(`

    ${r}

    {{ support }}/{{ s_max }}${s}
    `),ic({el:`#sr${a}`,data:t.portal[i],filters:{filter(){return ga[a].info.filter(...arguments)}}})}else e.append(`

    ${r}

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

    ${z("portal_fortress_name")}

    `));let c=$("
    ");s.append(c);let o=$(`${z("fortress_defense")} {{ f.garrison | defensive }}`);c.append(o);let n=$(`${z("fortress_spotted")} {{ f.threat }}`);c.append(n);let l=$('{{ f.threat | threat }}');c.append(l);let u=$("
    ");s.append(u),u.append($(`${z("fortress_wall")} {{ f.walls }}%`));let d=$("
    ");s.append(d),d.append($(`${z("fortress_army")}`)),d.append($('«')),d.append($('{{ f.garrison | patrolling }}')),d.append($('»')),d.append($(`${z("fortress_patrol")}`)),d.append($('«')),d.append($('{{ f.patrols }}')),d.append($('»')),d.append($(`${z("fortress_patrol_size")}`)),d.append($('«')),d.append($('{{ f.patrol_size }}')),d.append($('»')),d.append($(``));let _="light"===t.settings.theme?' type="is-light"':' type="is-dark"',p=$("
    ");d.append(p),p.append($(`${z("fortress_patrol_reports")}`)),p.append($(`${z("fortress_surv_reports")}`)),p.append($(`${z("fortress_nocrew")}`)),a&&s.append($(`
    ${z("civics_garrison_training")} - ${z("arpa_to_complete")} {{ g.rate, g.progress | trainTime }} {{ g.progress }}%
    `)),ic({el:`#${r}`,data:{f:t.portal.fortress,g:t.civic.garrison,s:t.settings},methods:{defense:()=>z("fortress_defense"),hostiles:()=>ka("hostiles"),threatLevel:()=>ka("threatLevel"),aNext(){let e=b();t.portal.fortress.garrisont.civic.garrison.workers&&(t.portal.fortress.garrison=t.civic.garrison.workers),t.portal.fortress.assigned=t.portal.fortress.garrison,ic({el:"#garrison"},"update"))},aLast(){let e=b(),a=t.portal.fortress.patrols*t.portal.fortress.patrol_size;i.soul_forge&&(a+=wa()),t.portal.hasOwnProperty("guard_post")&&(a+=ua(t.portal.guard_post.on)),t.portal.fortress.garrison>a&&(t.portal.fortress.garrison-=e,t.portal.fortress.garrison0&&(t.portal.fortress.patrols-=e,t.portal.fortress.patrols<0&&(t.portal.fortress.patrols=0))},patSizeInc(){let e=b();t.portal.fortress.patrol_size1&&(t.portal.fortress.patrol_size-=e,t.portal.fortress.patrol_size<1&&(t.portal.fortress.patrol_size=1))},wall(){let e=t.portal.fortress.walls;return e>=75?"has-text-success":e<=25?"has-text-danger":"has-text-warning"},threaten(){let e=t.portal.fortress.threat;return e<1e3?"has-text-success":e>=2e3?"has-text-danger":"has-text-warning"},hire(){let e=b(),a=!0;for(;a&&e>0;){let r=Math.round(1.24**t.civic.garrison.workers*75)-50;r>25e3&&(r=25e3),t.civic.garrison.m_use>0&&(r*=1.1**t.civic.garrison.m_use),t.race.brute&&(r/=2),r=Math.round(r),t.civic.garrison.workers=r?(t.resource.Money.amount-=r,t.civic.garrison.workers++,t.civic.garrison.m_use++,t.portal.fortress.garrison++,t.portal.fortress.assigned=t.portal.fortress.garrison,ic({el:"#garrison"},"update")):a=!1,e--}},hireLabel:()=>ka("hireLabel"),observation(){t.settings.civTabs=$("#mainTabs > nav ul li").length-1,t.settings.tabLoad||Ra()}},filters:{defensive:e=>Ma(e),patrolling(e){let a=e-t.portal.fortress.patrols*t.portal.fortress.patrol_size;if(i.soul_forge){let e=wa();e<=a&&(a-=e)}return t.portal.hasOwnProperty("guard_post")&&(a-=ua(t.portal.guard_post.on)),a},threat:e=>z(e<1e3?"fortress_threat_level1":e<1500?"fortress_threat_level2":e>=5e3?"fortress_threat_level6":e>=3e3?"fortress_threat_level5":e>=2e3?"fortress_threat_level4":"fortress_threat_level3"),trainTime:(e,t)=>cc(0===e?-1:(100-t)/(4*e))}}),["hostiles","threatLevel","armyLabel","patLabel","patSizeLabel","hireLabel"].forEach((function(e){Ei(`hf${r}${e}`,(function(){switch(e){case"hostiles":case"threatLevel":return ka("hostiles");case"armyLabel":return z("fortress_stationed");case"patLabel":return z("fortress_patrol_desc",[t.portal.fortress.patrols]);case"patSizeLabel":return z("fortress_patrol_size_desc",[t.portal.fortress.patrol_size]);case"hireLabel":return ka("hireLabel")}}),{elm:`#${r} span.${e}`})})),Ei(`hf${r}observe`,(function(){return z("hell_observation_tooltip")}),{elm:`#${r} button.observe`})}function Ma(e){let a=e-t.portal.fortress.patrols*t.portal.fortress.patrol_size;if(i.soul_forge){let e=wa();e<=a&&(a-=e)}t.portal.hasOwnProperty("guard_post")&&(a-=ua(t.portal.guard_post.on));let r=0;if(t.civic.garrison.wounded>t.civic.garrison.workers-t.portal.fortress.garrison&&(r=t.civic.garrison.wounded-(t.civic.garrison.workers-t.portal.fortress.garrison),r>a&&(r=a)),i.war_droid){let e=i.war_droid-t.portal.fortress.patrols>0?i.war_droid-t.portal.fortress.patrols:0;a+=t.tech.hdroid?ua(2*e):ua(e)}let s=t.tech.turret?t.tech.turret>=2?70:50:35;return Math.round(qe(a,"hellArmy",r))+(i.turret?i.turret*s:0)}function Pa(e,a,r,s){let i=Math.round(Math.log2(e/t.portal.fortress.patrol_size/(a||1)))-Math.rand(0,a),c=0;if(i>0){i>t.portal.fortress.patrol_size&&(i=t.portal.fortress.patrol_size),i=Math.rand(r?1:0,i+1),c=Math.rand(0,i+1);let e=i-c;if(t.race.instinct){let t=Math.floor(c*(di.instinct.vars()[1]/100));c-=t,e+=t}s.wounded=e,s.died=c,t.civic.garrison.wounded+=e,t.civic.garrison.workers-=c,t.stats.died+=c}return c}function Oa(e){t.race.witch_hunter&&t.portal.hasOwnProperty("soul_capacitor")&&i.soul_capacitor>0&&(t.portal.soul_capacitor.energy+=e,t.portal.soul_capacitor.energy>t.portal.soul_capacitor.ecap&&(t.portal.soul_capacitor.energy=t.portal.soul_capacitor.ecap))}function Ca(e,a){switch(e){case"ruins":{let e=a||ua(i.guard_post),r=75*(i.arcology||0),s=qe(e,"hellArmy",0);t.race.holy&&(s*=1+di.holy.vars()[1]/100);let c=Oi("unicorn");c>0&&(s*=1+di.holy.vars(1)[1]/100*c);let o=(s+r)/5e3;return{supress:o>1?1:o,rating:s+r}}case"gate":{let e=Ca("ruins",a),r=100*(i.gate_turret||0);t.race.holy&&(r*=1+di.holy.vars()[1]/100);let s=Oi("unicorn");s>0&&(r*=1+di.holy.vars(1)[1]/100*s);let c=(e.rating+r)/7500;return{supress:c>1?1:c,rating:e.rating+r}}default:return 0}}const ja={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 Sa(e,a){let r=9999,s=1e7;switch(e){case"small":{let e=t.blood.prepared&&t.blood.prepared>=2?5e4:75e3;s=a?2.5*e:e,r=a?20:1}break;case"medium":s=a?45e4:18e4,r=a?100:4;break;case"large":s=a?925e3:375e3,r=a?500:20;break;case"titan":s=a?15e5:75e4,r=a?1500:75;break;case"collector":{let e=t.blood.prepared&&t.blood.prepared>=2?8e3:1e4;s=a?2.5*e:e,r=1}}return{s:r,c:s}}function Fa(){if((t.settings.tabLoad||2===t.settings.civTabs&&4===t.settings.govTabs)&&(sc($("#mechLab")),t.portal.hasOwnProperty("mechbay")&&t.settings.showMechLab)){let e=$("#mechLab");t.portal.mechbay.hasOwnProperty("blueprint")||(t.portal.mechbay.blueprint={size:"small",hardpoint:["laser"],chassis:"tread",equip:[],infernal:!1});let a=$('
    ');e.append(a);let r=$(`
    ${z("portal_mech_assembly")} - {{ b.size | slabel }} {{ b.chassis | clabel }}
    `);a.append(r),r.append(` | ${z("portal_mech_bay_space")}: {{ m.bay }} / {{ m.max }}`),r.append(` | ${z("portal_mech_sup_avail")}: {{ p.supply | round }} / {{ p.sup_max }}`);let s=t.blood.prepared&&t.blood.prepared>=3?`${z("portal_mech_infernal")} (${z("portal_mech_infernal_effect",[25])})`:"";a.append(`
    ${z("portal_mech_space")} {{ b.size | bay }} | ${z("portal_mech_cost")} {{ b.size | price }} | ${z("portal_mech_soul",[t.resource.Soul_Gem.name])} {{ b.size | soul }}${s}
    `),a.append("
    {{ b.size | desc }}
    ");let i=$('
    ');a.append(i);let c="";["small","medium","large","titan","collector"].forEach((function(e,t){c+=`${z(`portal_mech_size_${e}`)}`})),i.append(`\n ${c}\n `);let o="";["wheel","tread","biped","quad","spider","hover"].forEach((function(e,t){o+=`${z(`portal_mech_chassis_${e}`)}`})),i.append(`\n ${o}\n `);for(let e=0;e<4;e++){let t="";["laser","kinetic","shotgun","missile","flame","plasma","sonic","tesla"].forEach((function(a,r){t+=`${z(`portal_mech_weapon_${a}`)}`})),i.append(`\n ${t}\n `)}let n=t.blood.prepared?5:4;for(let e=0;e{{ '${a}' | equipment }}`})),i.append(`\n ${t}\n `)}a.append(`
    `),ic({el:"#mechAssembly",data:{p:t.portal.purifier,m:t.portal.mechbay,b:t.portal.mechbay.blueprint},methods:{build(){let e=Sa(t.portal.mechbay.blueprint.size,t.portal.mechbay.blueprint.infernal),a=e.c,r=e.s,s=za(t.portal.mechbay.blueprint.size),i=t.portal.mechbay.max-t.portal.mechbay.bay;if(t.portal.purifier.supply>=a&&i>=s&&t.resource.Soul_Gem.amount>=r){t.portal.purifier.supply-=a,t.resource.Soul_Gem.amount-=r;let e=Ac(t.portal.mechbay.blueprint);t.portal.mechbay.mechs.push(e),t.portal.mechbay.bay+=s,t.portal.mechbay.active++}},setSize(e){switch(t.portal.mechbay.blueprint.size=e,"collector"===e?t.portal.mechbay.blueprint.hardpoint.length=0:"small"===e||"medium"===e?(0===t.portal.mechbay.blueprint.hardpoint.length&&t.portal.mechbay.blueprint.hardpoint.push("laser"),t.portal.mechbay.blueprint.hardpoint.length=1):(0===t.portal.mechbay.blueprint.hardpoint.length&&t.portal.mechbay.blueprint.hardpoint.push("laser"),1===t.portal.mechbay.blueprint.hardpoint.length&&t.portal.mechbay.blueprint.hardpoint.push(t.portal.mechbay.blueprint.hardpoint.includes("laser")?"plasma":"laser"),"titan"===e?2===t.portal.mechbay.blueprint.hardpoint.length&&(t.portal.mechbay.blueprint.hardpoint.push(t.portal.mechbay.blueprint.hardpoint.includes("laser")?"shotgun":"laser"),t.portal.mechbay.blueprint.hardpoint.push(t.portal.mechbay.blueprint.hardpoint.includes("laser")?"kinetic":"laser")):t.portal.mechbay.blueprint.hardpoint.length=2),e){case"small":t.blood.prepared&&t.portal.mechbay.blueprint.equip.push("special"),t.portal.mechbay.blueprint.equip.length=t.blood.prepared?1:0;break;case"medium":t.portal.mechbay.blueprint.equip.length<1&&t.portal.mechbay.blueprint.equip.push("special"),t.blood.prepared&&t.portal.mechbay.blueprint.equip.push("shields"),t.portal.mechbay.blueprint.equip.length=t.blood.prepared?2:1;break;case"collector":case"large":t.portal.mechbay.blueprint.equip.length<1&&t.portal.mechbay.blueprint.equip.push("special"),t.portal.mechbay.blueprint.equip.length<2&&t.portal.mechbay.blueprint.equip.push("shields"),t.blood.prepared&&t.portal.mechbay.blueprint.equip.push("grapple"),t.portal.mechbay.blueprint.equip.length=t.blood.prepared?3:2;break;case"titan":t.portal.mechbay.blueprint.equip.length<1&&t.portal.mechbay.blueprint.equip.push("special"),t.portal.mechbay.blueprint.equip.length<2&&t.portal.mechbay.blueprint.equip.push("shields"),t.portal.mechbay.blueprint.equip.length<3&&t.portal.mechbay.blueprint.equip.push("grapple"),t.portal.mechbay.blueprint.equip.length<4&&t.portal.mechbay.blueprint.equip.push("seals"),t.blood.prepared&&t.portal.mechbay.blueprint.equip.push("stabilizer"),t.portal.mechbay.blueprint.equip.length=t.blood.prepared?5:4}},setType(e){t.portal.mechbay.blueprint.chassis=e},setWep(e,a){t.portal.mechbay.blueprint.hardpoint[a]=e,ic({el:"#mechAssembly"},"update")},setEquip(e,a){t.portal.mechbay.blueprint.equip[a]=e,ic({el:"#mechAssembly"},"update")},vis:e=>"collector"!==t.portal.mechbay.blueprint.size&&(0===e||"large"===t.portal.mechbay.blueprint.size&&e<2||"titan"===t.portal.mechbay.blueprint.size),eVis(e){let a=t.blood.prepared?1:0;switch(t.portal.mechbay.blueprint.size){case"small":return 1===a&&0===e;case"medium":return e<=0+a;case"collector":case"large":return e<=1+a;case"titan":return!0}}},filters:{bay:e=>za(e),price:e=>Sa(e,t.portal.mechbay.blueprint.infernal).c,soul:e=>Sa(e,t.portal.mechbay.blueprint.infernal).s,slabel:e=>z(`portal_mech_size_${e}`),clabel:e=>z(`portal_mech_chassis_${e}`),wlabel:e=>z(`portal_mech_weapon_${e}`),desc:e=>z(`portal_mech_size_${e}_desc`),round:e=>Math.round(e),equipment(e){if("special"!==e)return z(`portal_mech_equip_${e}`);let a="jumpjet";switch(t.portal.mechbay.blueprint.size){case"large":a="battery";break;case"titan":a="target"}return z(`portal_mech_equip_${a}`)}}}),["size","chassis","weapon","equip"].forEach((function(e){let a=1;"weapon"===e?a=4:"equip"===e&&(a=n);for(let r=0;r');e.append(l),Aa(),sc($("#mechList")),$("#mechList").append(`\n
    \n ${z("portal_mech_scrap")}\n | ${z("portal_mech")} #{{index + 1}}: \n {{ mech.infernal ? "${z("portal_mech_infernal")} " : "" }}{{ mech | size }} {{ mech | chassis }}\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    `),ic({el:"#mechList",data:t.portal.mechbay,methods:{scrap(e){if(t.portal.mechbay.mechs[e]){let a=Sa(t.portal.mechbay.mechs[e].size,t.portal.mechbay.mechs[e].infernal),r=za(t.portal.mechbay.mechs[e].size);t.portal.purifier.supply+=Math.floor(a.c/3),t.resource.Soul_Gem.amount+=Math.floor(a.s/2),t.portal.purifier.supply>t.portal.purifier.sup_max&&(t.portal.purifier.supply=t.portal.purifier.sup_max),t.portal.mechbay.mechs.splice(e,1),t.portal.mechbay.bay-=r,t.portal.mechbay.active--}}},filters:{equipment(e,t){if("special"!==e)return z(`portal_mech_equip_${e}`);let a="jumpjet";switch(t){case"large":a="battery";break;case"titan":a="target"}return z(`portal_mech_equip_${a}`)},weapon:e=>z(`portal_mech_weapon_${e}`),size:e=>z(`portal_mech_size_${e.size}`),chassis:e=>z(`portal_mech_chassis_${e.chassis}`)}}),function(){let e=$("#mechList")[0];Sortable.create(e,{onEnd(e){let a=e.from.querySelectorAll(":scope > .mechRow");e.from.insertBefore(e.item,a[e.oldIndex+(e.oldIndex>e.newIndex)]);let r=t.portal.mechbay.mechs;r.splice(e.newDraggableIndex,0,r.splice(e.oldDraggableIndex,1)[0]),Ta()}})}(),$("#mechList .scrap").each((function(e,a){Ei(`mechList-scrap${e}`,(function(){let a=Sa(t.portal.mechbay.mechs[e].size,t.portal.mechbay.mechs[e].infernal);return z("portal_mech_scrap_refund",[Math.floor(a.c/3),Math.floor(a.s/2)])}),{elm:a})}))}}function za(e){switch(e){case"small":return 2;case"medium":return t.blood.prepared&&t.blood.prepared>=2?4:5;case"large":return t.blood.prepared&&t.blood.prepared>=2?8:10;case"titan":return t.blood.prepared&&t.blood.prepared>=2?20:25;case"collector":return 1;case"default":return 25}}function Aa(){let e=$("#mechList")[0];if(e){let t=Sortable.get(e);t&&t.destroy()}}function Ta(){let e=25*(l.mechbay||0),a=0,r=0,s=0;for(let i of t.portal.mechbay.mechs)a+=za(i.size),a<=e&&(r++,"small"===i.size&&s++);t.portal.mechbay.bay=a,t.portal.mechbay.max=e,t.portal.mechbay.active=r,t.portal.mechbay.scouts=s}function Ea(){let e=["sand","swamp","forest","jungle","rocky","gravel","muddy","grass","brush","concrete"];if(t.portal.spire.type=e[Math.floor(g(0,e.length))],t.portal.spire.count>=10){t.portal.spire.status={};let e=["freeze","hot","corrosive","humid","windy","hilly","mountain","radioactive","quake","dust","river","tar","steam","flooded","fog","rain","hail","chasm","dark","gravity"];if(Ia(e[Math.floor(g(0,e.length))]),t.portal.spire.count>=25&&t.portal.spire.count<=100){let a=105-t.portal.spire.count;Math.floor(g(0,a)<=5)&&Ia(e[Math.floor(g(0,e.length))])}else if(t.portal.spire.count>100&&t.portal.spire.count<=250){Ia(e[Math.floor(g(0,e.length))]);let a=260-t.portal.spire.count;Math.floor(g(0,a)<=10)&&Ia(e[Math.floor(g(0,e.length))])}else if(t.portal.spire.count>250&&t.portal.spire.count<=1e3){Ia(e[Math.floor(g(0,e.length))]),Ia(e[Math.floor(g(0,e.length))]);let a=1025-t.portal.spire.count;Math.floor(g(0,a)<=25)&&Ia(e[Math.floor(g(0,e.length))])}else t.portal.spire.count>1e3&&(Ia(e[Math.floor(g(0,e.length))]),Ia(e[Math.floor(g(0,e.length))]),Ia(e[Math.floor(g(0,e.length))]))}let a=Object.keys(ja).filter((function(e){let a=Object.keys(ja[e].nozone);return!a.some((e=>Object.keys(t.portal.spire.status).includes(e)))&&!a.includes(t.portal.spire.type)}));t.portal.spire.boss=a[Math.floor(g(0,a.length))]}function Ia(e){t.portal.spire.status.freeze||t.portal.spire.status.hot?"freeze"!==e&&"hot"!==e&&(t.portal.spire.status[e]=!0):t.portal.spire.status.rain||t.portal.spire.status.hail?"rain"!==e&&"hail"!==e&&(t.portal.spire.status[e]=!0):t.portal.spire.status[e]=!0}function Ka(e,a,r){return!e.equip.includes("special")||"small"!==e.size&&"medium"!==e.size&&"collector"!==e.size||a<1&&(a+=(1-a)*(r.includes("gravity")?.1:.2)),"small"!==e.size&&a<1&&(a+=(r.includes("fog")||r.includes("dark")?.005:.01)*t.portal.mechbay.scouts)>1&&(a=1),a}function La(e,t){return t<1&&0!==t&&e.equip.includes("special")&&"titan"===e.size&&(t+=.25*(1-t)),e.equip.includes("special")&&"large"===e.size&&(t*=1.02),t}function Na(e,t){let a=1;switch(t){case"freeze":e.equip.includes("radiator")||(a=.25);break;case"hot":e.equip.includes("coolant")||(a=.25);break;case"corrosive":e.equip.includes("ablative")||(a=e.equip.includes("shields")?.75:.25);break;case"humid":case"rain":e.equip.includes("seals")||(a=.75);break;case"windy":"hover"===e.chassis&&(a=.5);break;case"hilly":"spider"!==e.chassis&&(a=.75);break;case"mountain":"spider"===e.chassis||e.equip.includes("grapple")||(a=e.equip.includes("flare")?.75:.5);break;case"radioactive":e.equip.includes("shields")||(a=.5);break;case"quake":e.equip.includes("stabilizer")||(a=.25);break;case"dust":e.equip.includes("seals")||(a=.5);break;case"river":"hover"!==e.chassis&&(a=.65);break;case"tar":"quad"!==e.chassis&&(a="tread"===e.chassis||"wheel"===e.chassis?.5:.75);break;case"steam":e.equip.includes("shields")||(a=.75);break;case"flooded":"hover"!==e.chassis&&(a=.35);break;case"fog":e.equip.includes("sonar")||(a=.2);break;case"hail":e.equip.includes("ablative")||e.equip.includes("shields")||(a=.75);break;case"chasm":e.equip.includes("grapple")||(a=.1);break;case"dark":e.equip.includes("infrared")||(a=e.equip.includes("flare")?.25:.1);break;case"gravity":switch(e.size){case"medium":a=.8;break;case"large":a=.45;break;case"titan":a=.25}}return a}function Da(e,a){let r=a||t.portal.spire.type,s=1;switch(e.chassis){case"wheel":switch(r){case"sand":s=["small","medium"].includes(e.size)?.9:.85;break;case"swamp":s=["small","medium"].includes(e.size)?.35:.18;break;case"jungle":s=["small","medium"].includes(e.size)?.92:.85;break;case"rocky":s=["small","medium"].includes(e.size)?.65:.5;break;case"gravel":s=["small","medium"].includes(e.size)?1:.95;break;case"muddy":s=["small","medium"].includes(e.size)?.85:.58;break;case"grass":s=["small","medium"].includes(e.size)?1.3:1.2;break;case"brush":s=["small","medium"].includes(e.size)?.9:.8;break;case"concrete":s=["small","medium"].includes(e.size)?1.1:1}break;case"tread":switch(r){case"sand":s=["small","medium"].includes(e.size)?1.15:1.1;break;case"swamp":s=["small","medium"].includes(e.size)?.55:.4;break;case"forest":s=["small","medium"].includes(e.size)?1:.95;break;case"jungle":s=["small","medium"].includes(e.size)?.95:.9;break;case"rocky":s=["small","medium"].includes(e.size)?.65:.5;break;case"gravel":s=["small","medium"].includes(e.size)?1.3:1.2;break;case"muddy":s=["small","medium"].includes(e.size)?.88:.72}break;case"biped":switch(r){case"sand":s=["small","medium"].includes(e.size)?.78:.65;break;case"swamp":s=["small","medium"].includes(e.size)?.68:.5;break;case"forest":s=["small","medium"].includes(e.size)?1:.95;break;case"jungle":s=["small","medium"].includes(e.size)?.82:.7;break;case"rocky":s=["small","medium"].includes(e.size)?.48:.4;break;case"muddy":s=["small","medium"].includes(e.size)?.85:.7;break;case"grass":s=["small","medium"].includes(e.size)?1.25:1.2;break;case"brush":s=["small","medium"].includes(e.size)?.92:.85}break;case"quad":switch(r){case"sand":s=["small","medium"].includes(e.size)?.86:.75;break;case"swamp":s=["small","medium"].includes(e.size)?.58:.42;break;case"forest":s=["small","medium"].includes(e.size)?1.25:1.2;break;case"rocky":case"brush":s=["small","medium"].includes(e.size)?.95:.9;break;case"gravel":s=["small","medium"].includes(e.size)?.9:.8;break;case"muddy":s=["small","medium"].includes(e.size)?.68:.5;break;case"grass":s=["small","medium"].includes(e.size)?1:.95}break;case"spider":switch(r){case"sand":s=["small","medium"].includes(e.size)?.75:.65;break;case"swamp":s=["small","medium"].includes(e.size)?.9:.78;break;case"forest":s=["small","medium"].includes(e.size)?.82:.75;break;case"jungle":s=["small","medium"].includes(e.size)?.77:.65;break;case"rocky":s=["small","medium"].includes(e.size)?1.25:1.2;break;case"gravel":s=["small","medium"].includes(e.size)?.86:.75;break;case"muddy":s=["small","medium"].includes(e.size)?.92:.82;break;case"brush":s=["small","medium"].includes(e.size)?1:.95}break;case"hover":switch(r){case"swamp":s=["small","medium"].includes(e.size)?1.35:1.2;break;case"forest":s=["small","medium"].includes(e.size)?.65:.48;break;case"jungle":s=["small","medium"].includes(e.size)?.55:.35;break;case"rocky":s=["small","medium"].includes(e.size)?.82:.68;break;case"muddy":s=["small","medium"].includes(e.size)?1.15:1.08;break;case"brush":s=["small","medium"].includes(e.size)?.78:.7}}return s}function Ba(e){let a=e.infernal?31.25:25,r=Da(e),s=[];return Object.keys(t.portal.spire.status).forEach((function(t){s.push(t),a*=Na(e,t)})),a*=Ka(e,r,s),a}function Ga(e,a){let r=function(e){switch(e){case"small":return.0025;case"medium":return.0075;case"large":return.01;case"titan":return.012;default:return 0}}(e.size);if(0===r)return 0;if(e.hasOwnProperty("infernal")&&e.infernal&&t.blood.prepared&&t.blood.prepared>=3&&(r*=1.25),a){t.stats.achieve.gladiator&&t.stats.achieve.gladiator.l>0&&(r*=1+.1*t.stats.achieve.gladiator.l),t.blood.wrath&&(r*=1+t.blood.wrath/20),"titan"===e.size&&(r*=1.1);let a=Xc();t.stats.spire.hasOwnProperty(a)&&t.stats.spire[a].hasOwnProperty("dlstr")?r/=100+25*t.stats.spire[a].dlstr:r/=100;let s=0;for(let t=0;t0&&(r*=1+.2*t.stats.achieve.gladiator.l),t.blood.wrath&&(r*=1+t.blood.wrath/20),"concrete"===t.portal.spire.type)switch(e.size){case"small":r*=.92;break;case"medium":r*=.95;break;case"titan":r*=1.25}let a=Da(e),s=[];Object.keys(t.portal.spire.status).forEach((function(t){s.push(t),r*=Na(e,t)})),r*=Ka(e,a,s),r/=t.portal.spire.count;let i=0;for(let a=0;a nav ul li").length-1&&!e)return;let a=$("#mTabObserve");sc(a);let r=$('
    ');if(a.append(r),r.append(`\n \n \n \n \n \n \n `),ic({el:"#hellObservations",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(sc($("#h_Report")),sc($("#h_Analysis")),e){case 0:Wa();break;case 1:Ha()}return e}}}),t.settings.tabLoad)Wa(),Ha();else switch(t.settings.hellTabs){case 0:Wa();break;case 1:Ha()}}function Ha(){if(!t.settings.tabLoad&&1!==t.settings.hellTabs)return;let e=$("#h_Analysis"),a=$('
    ');e.append(a);let r=$("
    ");a.append(r);let s=$('
    ');a.append(s);let i=$('
    ');s.append(i);let c=$('
    '),o=$('
    ');i.append(c),i.append(o),r.append(`\n
    \n

    ${z("tab_settings")}

    \n
    \n
    \n ${z("hell_analysis_expanded")}\n ${z("hell_analysis_average")}\n ${z("hell_analysis_hyperSlow")}\n
    \n
    \n ${z("hell_analysis_time_game_days")}\n ${z("hell_analysis_time_seconds")}\n ${z("hell_analysis_time_minutes")}\n ${z("hell_analysis_time_hours")}\n ${z("hell_analysis_time_days")}\n
    \n `),ic({el:"#hellAnalysis",data:{s:t.portal.observe.settings,r:t.race}});let n=function(e,t){e=e.toFixed(t);let a=Math.floor(e),r=(+(e-a).toFixed(t)).toString().substring(1);return a.toLocaleString()+r},l=function(e,a,r){if(e){switch("game_days"!==r&&t.portal.observe.settings.hyperSlow&&(t.race.slow&&(a*=1+di.slow.vars()[0]/100),t.race.hyper&&(a*=1-di.hyper.vars()[0]/100)),e/=a,r){case"seconds":e/=5;break;case"minutes":e*=12;break;case"hours":e*=720;break;case"days":e*=17280}e=t.portal.observe.settings.expanded?n(e,5):q(e,5,!0)}return z("hell_analysis_time_average",[e,z(`hell_analysis_time_${r}_abbr`)])},u=function(e,a){if(!e)return;let r=$(`#${e}`);sc(r),r.append(`\n

    ${z("hell_analysis_"+a)}

    ${"period"===a?'

    {{ | resetLabel }}

    ':""}
    \n

    {{ st.${a}.start | startLabel }}

    \n

    {{ st.${a}.days, s.display | time }}

    \n

    {{ st.${a}.kills, 'kills', s.average | genericMulti }}

    {{ s.dropKills | dropdownLabel }}

    \n
    \n

    {{ st.${a}.kills.drones, 'kills_drones', s.average | genericSub }}

    \n

    {{ st.${a}.kills.patrols, 'kills_patrols', s.average | genericSub }}

    \n

    {{ st.${a}.kills.sieges, 'kills_sieges', s.average | genericSub }}

    \n

    {{ st.${a}.kills.guns, 'kills_guns', s.average | genericSub }}

    \n

    {{ st.${a}.kills.soul_forge, 'kills_soul_forge', s.average | genericSub }}

    \n

    {{ st.${a}.kills.turrets, 'kills_turrets', s.average | genericSub }}

    \n
    \n

    {{ st.${a}.gems, 'gems', s.average | genericMulti }}

    {{ s.dropGems | dropdownLabel }}

    \n
    \n

    {{ st.${a}.gems.patrols, 'gems_patrols', s.average | genericSub }}

    \n

    {{ st.${a}.gems.guns, 'gems_guns', s.average | genericSub }}

    \n

    {{ st.${a}.gems.soul_forge, 'gems_soul_forge', s.average | genericSub }}

    \n

    {{ st.${a}.gems.crafted, 'gems_crafted', s.average | genericSub }}

    \n

    {{ st.${a}.gems.turrets, 'gems_turrets', s.average | genericSub }}

    \n

    {{ st.${a}.gems.surveyors, 'gems_surveyors', s.average | genericSub }}

    \n
    \n

    {{ st.${a}.wounded, 'wounded', s.average | generic }}

    \n

    {{ st.${a}.died, 'died', s.average | generic }}

    \n

    {{ st.${a}.revived, 'revived', s.average | generic }}

    \n

    {{ st.${a}.surveyors, 'surveyors', s.average | generic }}

    \n

    {{ st.${a}.sieges, 'sieges', s.average | generic }}

    \n `),ic({el:`#${e}`,data:{st:t.portal.observe.stats,s:t.portal.observe.settings,p:t.portal,r:t.race,sg:t.resource.Soul_Gem},methods:{resetObservations(){Object.keys(t.portal.observe.stats.period).forEach((function(e){["kills","gems"].includes(e)?Object.keys(t.portal.observe.stats.period[e]).forEach((function(a){t.portal.observe.stats.period[e][a]=0})):"start"===e?t.portal.observe.stats.period.start={year:t.city.calendar.year,day:t.city.calendar.day}:t.portal.observe.stats.period[e]=0}))},toggleDropdown(e){t.portal.observe.settings[e]=!t.portal.observe.settings[e]}},filters:{generic:(e,r,s)=>z("hell_analysis_number_display",s?[z(`hell_analysis_${r}`),l(e,t.portal.observe.stats[a].days,t.portal.observe.settings.display)]:[z(`hell_analysis_${r}`),t.portal.observe.settings.expanded?(+e.toFixed(5)).toLocaleString():q(e,5,!0)]),genericSub:(e,r,s)=>s?"ᄂ"+z("hell_analysis_number_display",[z(`hell_analysis_${r}`),l(e,t.portal.observe.stats[a].days,t.portal.observe.settings.display)]):"ᄂ"+z("hell_analysis_number_display",[z(`hell_analysis_${r}`),t.portal.observe.settings.expanded?(+e.toFixed(5)).toLocaleString():q(e,5,!0)]),genericMulti(e,r,s){let i=0;return Object.keys(e).forEach((function(t){i+=e[t]})),z("hell_analysis_number_display",s?[z(`hell_analysis_${r}`),l(i,t.portal.observe.stats[a].days,t.portal.observe.settings.display)]:[z(`hell_analysis_${r}`),t.portal.observe.settings.expanded?(+i.toFixed(5)).toLocaleString():q(i,5,!0)])},time(e,a){switch("game_days"!==a&&t.portal.observe.settings.hyperSlow&&(t.race.slow&&(e*=1+di.slow.vars()[0]/100),t.race.hyper&&(e*=1-di.hyper.vars()[0]/100)),a){case"seconds":e*=5;break;case"minutes":e/=12;break;case"hours":e/=720;break;case"days":e/=17280}return z("hell_analysis_time",[z(`hell_analysis_time_${a}`),t.portal.observe.settings.expanded?n(e,8):q(e,5,!0)])},resetLabel:()=>z("hell_analysis_period_reset"),startLabel:e=>z("hell_analysis_start",[e.year,e.day]),dropdownLabel:e=>e?"⮝":"⮟"}})};u("hellAnalysisTotal","total"),u("hellAnalysisPeriod","period"),a=$("#hellAnalysis");let d=$("
    ");a.append(d),d.append(`

    ${z("hell_graph_create")}

    `);let _=$('
    ');d.append(_),ic({el:"#hellGraphCreator",methods:{createGraph(){this.$buefy.modal.open({parent:this,component:{template:''}});let e=setInterval((function(){if($("#modalBox").length>0){clearInterval(e),$("#modalBox").append($(`

    ${z("hell_graph_title")}

    `));var a=$('
    ');$("#modalBox").append(a);let r=$('
    ');a.append(r);let s={chartType:"pie",name:"",chartName:"",data:[],radioFake:"",showGroups:!0},i={show:!1,message:""};r.append(`\n

    ${z("hell_graph_name")}

    \n `),r.append(`\n
    \n
    \n

    ${z("hell_graph_type")}

    \n
    \n
    \n ${z("hell_graph_pie")}\n
    \n
    \n `);let c=$('
    ');r.append(c),c.append(`

    ${z("hell_graph_data")}

    `),Object.keys(t.portal.observe.stats).forEach((function(e){["kills","gems"].forEach((function(t){c.append(`
    \n ${z("hell_graph_datapoint",[z(`hell_analysis_${e}`),z(`hell_analysis_${t}`)])}\n
    `)}))})),r.append(`\n
    \n
    \n

    {{ e.message }}

    \n
    \n
    \n \n
    \n
    \n `),ic({el:"#specialModal",data:{s,e:i,sg:t.resource.Soul_Gem},methods:{nameUpdate(e){s.chartName!==e&&(i.show=!1,s.chartName=e)},dataOptions(e){switch(e){case"pie":s.showGroups=!0;break;case"bar":s.showGroups=!1}},setData(e,t){i.show=!1,s.data=[e,t]},createGraph(){if(!s.name)return i.show=!0,void(i.message=z("hell_graph_error_name_blank"));if(0===s.data.length)return i.show=!0,void(i.message=z("hell_graph_error_data_missing"));let e=[],a=[];"pie"===s.chartType&&Object.keys(t.portal.observe.stats[s.data[0]][s.data[1]]).forEach((function(t){e.push(z(`hell_analysis_${s.data[1]}_${t}`)),a.push([s.data[0],s.data[1],t])}));let r=function(e,a,r,s,i){let c=`hellGraph-${t.portal.observe.graphID}`;return t.portal.observe.graphID++,t.portal.observe.graphs[c]={id:c,chartID:`${c}-chart`,name:e,type:a,labels:r,data:s,settings:i},c}(s.chartName,s.chartType,e,a,{title:s.chartName});Ua(_,t.portal.observe.graphs[r]),document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape"})),document.dispatchEvent(new KeyboardEvent("keyup",{key:"Escape"}))}}})}}),50)}}}),Object.keys(t.portal.observe.graphs).forEach((function(e){Ua(_,t.portal.observe.graphs[e])}))}function Ua(e,a){let r=a.id;p[r]&&p[r].graph.destroy();let s=$(`
    `);e.append(s),s.append(`
    \n
    \n

    \n

    Delete

    \n
    \n
    \n

    ${a.name}

    \n
    \n
    `);let i=$('
    ');s.append(i),ic({el:`#graph-${r}-controls`,methods:{deleteGraph(){p[r].graph.destroy(),delete p[r],delete t.portal.observe.graphs[r],sc($(`#graph-${r}-container`),!0)}}});let c=$(``);i.append(c),p[r]={data:a.data},"pie"===a.type&&(p[r].graph=function(e,a,r,s){let i=[];return r.forEach((function(e){i.push(3===e.length?t.portal.observe.stats[e[0]][e[1]][e[2]]:t.portal.observe.stats[e[0]][e[1]])})),new Chart(e,{type:"pie",data:{labels:a,datasets:[{data:i,backgroundColor:["rgb(255, 99, 132)","rgb(54, 162, 235)","rgb(255, 205, 86)","rgb(201, 203, 207)","rgb(75, 192, 192)","#B86BFF","#48c774"],hoverOffset:4}]},options:{plugins:{legend:{display:!1}}}})}(c,a.labels,a.data,a.settings))}function Wa(){if(!t.settings.tabLoad&&0!==t.settings.hellTabs)return;Qa();let e="",a=$("#h_Report"),r=$('
    ');a.append(r);let s=$('
    ');r.append(s),s.append(`

    ${z("hell_report_log")}

    \n \n \n\t\t \n \n
    `);let i=$('
    ');s.append(i),r.append($('
    '));let c={year:0,day:0};Object.keys(_).length&&(c.year=Object.keys(_)[0].split("-")[1],c.day=Object.keys(_[`year-${c.year}`])[0].split("-")[1]);let o=function(a,r){for(Qa(!0)&&(e="",a=Object.keys(_)[0].split("-")[1],r=Object.keys(_[`year-${c.year}`])[0].split("-")[1]);a${z("year")+" "+a+" | "+z("day")+" "+r}${_[`year-${a}`][`day-${r}`].foundGem?'':""}\n `+e;r=1}for(;r${z("year")+" "+a+" | "+z("day")+" "+r}${_[`year-${a}`][`day-${r}`].foundGem?``:""}\n `+e;c.year=a,c.day=r;let s=$("#hellReportList");sc(s),s.append(e),ic({el:"#hellReportList",methods:{reportLoad(e,t){n(e,t)}}})},n=function(e,a){if(!e||!a)return;let r=$("#hellReportDisplay");sc(r);let s=_[`year-${e}`][`day-${a}`],i=$('
    ');r.append(i);let c=0,o=0;if(Object.keys(s.stats.kills).forEach((function(e){c+=s.stats.kills[e]})),Object.keys(s.stats.gems).forEach((function(e){o+=s.stats.gems[e]})),i.append(`

    ${z("hell_report_log_stats",[e,a])}

    `),i.append(`
    \n

    ${z("hell_report_log_stats_kills",[c])}

    \n

    ${z("hell_report_log_stats_gems",[o])}

    \n

    ${z("hell_report_log_stats_wounded",[s.stats.wounded])}

    \n

    ${z("hell_report_log_stats_died",[s.stats.died])}

    \n
    `),r.append(`

    ${z("hell_report_log_report",[e,a])}

    `),r.append(`

    ${z("hell_report_log_start",[s.start])}

    `),s.drones&&Object.keys(s.drones).forEach((function(e){let t=s.drones[e],a=z("hell_report_log_obj_counter",[z("portal_war_drone_title"),e]);t.encounter?r.append(`

    ${z("hell_report_log_encounter",[a,t.kills])}

    `):r.append(`

    ${z("hell_report_log_encounter_fail",[a])}

    `)})),s.patrols&&Object.keys(s.patrols).forEach((function(e){let a=s.patrols[e],i=z("hell_report_log_obj_counter",[z("hell_report_log_patrol"),e]);if(i=a.droid?z("hell_report_log_patrol_droid",[i]):i,a.encounter){let e=$("

    ");a.ambush?e.append(`${z("hell_report_log_patrol_ambush",[i,a.kills])}`):e.append(`${z("hell_report_log_encounter",[i,a.kills])}`),a.wounded&&e.append(`${a.wounded>1?z("hell_report_log_patrol_wounded_plural",[a.wounded]):z("hell_report_log_patrol_wounded")}`),a.died&&e.append(`${a.died>1?z("hell_report_log_patrol_killed_plural",[a.died]):z("hell_report_log_patrol_killed")}`),a.gem>0&&e.append(`${z("hell_report_log_soul_find",[t.resource.Soul_Gem.name,a.gem])}`),r.append(e)}else r.append(`

    ${z("hell_report_log_encounter_fail",[i])}

    `)})),s.surveyor_finds&&Object.keys(s.surveyor_finds).forEach((function(e){let a=s.surveyor_finds[e],i=z("hell_report_log_obj_counter",[z("job_hell_surveyor"),e]),c=$("

    ");c.append(`${z("hell_report_log_search",[i,a.bodies])}`),a.gem>0&&c.append(`${z("hell_report_log_soul_search",[t.resource.Soul_Gem.name,a.gem])}`),r.append(c)})),s.revived&&r.append(`

    ${s.revived>1?z("hell_report_log_revived_plural",[s.revived]):z("hell_report_log_revived")}

    `),s.patrols_lost&&r.append(`

    ${z("hell_report_log_patrols_lost",[s.patrols_lost])}

    `),s.siege&&(s.siege.destroyed?r.append(`

    ${z("hell_report_log_siege",[s.siege.surveyors,s.siege.soldiers,s.siege.kills])}

    `):r.append(`

    ${z("hell_report_log_siege_fail",[s.siege.damage,s.siege.kills])}

    `)),s.demons&&r.append(`

    ${z("hell_report_log_demons",[s.demons])}

    `),s.surveyors&&r.append(`

    ${s.surveyors>1?z("hell_report_log_surveyors_plural",[s.surveyors]):z("hell_report_log_surveyors")}

    `),s.soul_attractors&&r.append(`

    ${z("hell_report_log_soul_attractors",[s.soul_attractors])}

    `),s.gun_emplacements&&Object.keys(s.gun_emplacements).forEach((function(e){let a=$("

    "),i=s.gun_emplacements[e],c=z("hell_report_log_obj_counter",[z("portal_gun_emplacement_title"),e]);a.append($(`${z("hell_report_log_misc_kills",[c,i.kills,z("portal_pit_name")])}`)),i.gem&&a.append(`${z("hell_report_log_soul_find",[t.resource.Soul_Gem.name,1])}`),r.append(a)})),s.soul_forge){let e=$("

    ");e.append(`${z("hell_report_log_soul_forge",[s.soul_forge.kills])}`),s.soul_forge.gem&&e.append(`${z("hell_report_log_soul_find",[t.resource.Soul_Gem.name,1])}`),s.soul_forge.gem_craft&&e.append(`${z("hell_report_log_soul_craft",[s.soul_forge.corrupt?z("resource_Corrupt_Gem_name"):t.resource.Soul_Gem.name])}`),r.append(e)}s.gate_turrets&&Object.keys(s.gate_turrets).forEach((function(e){let a=$("

    "),i=s.gate_turrets[e],c=z("hell_report_log_obj_counter",[z("portal_gate_turret_title"),e]);a.append(`${z("hell_report_log_misc_kills",[c,i.kills,z("portal_gate_name")])}`),i.gem&&a.append(`${z("hell_report_log_soul_find",[t.resource.Soul_Gem.name,1])}`),r.append(a)})),ic({el:"#hellReportDisplay",data:{g:t.resource.Soul_Gem}})};if(0!==c.day){o(c.year,c.day);let e=c.year,a=c.day;a-1==0?(e--,a=t.city.calendar.orbit):a--,n(e,a)}else c.year=t.city.calendar.year,c.day=t.city.calendar.day;ic({el:"#hellReportLogTitle",methods:{updateList(){o(c.year,c.day)}}}),Ei("hellReportLogs",(function(){return z("hell_report_log_tooltip",[2500])}),{elm:"#hellReport .reportList div:first-child h2"})}function Qa(e){if(!document.getElementById("hellReportList")||e){let e=!1,a=2500,r=(Object.keys(_).length-1)*t.city.calendar.orbit+t.city.calendar.day;if(r>a){let s=Object.keys(_[Object.keys(_)[0]]).length;for(r-t.city.calendar.orbit+s>a&&(e=!0,r-=s,delete _[Object.keys(_)[0]]);r>a;)r-=t.city.calendar.orbit,delete _[Object.keys(_)[0]]}return e}}const Za={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},Va={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},Ja={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 Xa(){let e={Plywood:[{r:"Lumber",a:100}],Brick:t.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(t.race.wasteful){let t=1+di.wasteful.vars()[0]/100;Object.keys(e).forEach((function(a){for(let r=0;r=2){let e=t.tech.foundry>=5?t.tech.foundry>=8?.08:.05:.03;tr.general.add.push({name:z("city_foundry"),manual:t.city.foundry.count*e,auto:t.city.foundry.count*e})}if(t.tech.foundry>=3&&Object.keys(tr).forEach((function(e){t.city.foundry[e]&&t.city.foundry[e]>1&&tr[e].add.push({name:z("tech_apprentices"),manual:(t.city.foundry[e]-1)*Pe(.03),auto:(t.city.foundry[e]-1)*Pe(.03)})})),t.tech.foundry>=4&&t.city.sawmill&&tr.Plywood.add.push({name:z("city_sawmill"),manual:.02*t.city.sawmill.count,auto:.02*t.city.sawmill.count}),t.tech.foundry>=6&&tr.Brick.add.push({name:z("city_foundry"),manual:.02*t.city.foundry.count,auto:.02*t.city.foundry.count}),t.tech.foundry>=7&&(tr.general.add.push({name:z("city_factory")+` (${z("tab_city5")})`,manual:.05*i.factory,auto:.05*i.factory}),t.tech.mars>=4&&tr.general.add.push({name:z("city_factory")+` (${z("tab_space")})`,manual:.05*i.red_factory,auto:.05*i.red_factory}),t.interstellar.int_factory&&i.int_factory&&tr.general.add.push({name:z("interstellar_int_factory_title"),manual:.1*i.int_factory,auto:.1*i.int_factory})),t.space.fabrication&&c.fabrication&&tr.general.add.push({name:z("space_red_fabrication_title"),manual:c.fabrication*t.civic.colonist.workers*Pe(e?.05:.02),auto:c.fabrication*t.civic.colonist.workers*Pe(e?.05:.02)}),i.stellar_forge&&(tr.Mythril.add.push({name:z("interstellar_stellar_forge_title"),manual:.05*i.stellar_forge,auto:.05*i.stellar_forge}),tr.general.add.push({name:z("interstellar_stellar_forge_title"),manual:0,auto:.1*i.stellar_forge})),i.hell_forge){let e=Ca("ruins");tr.general.add.push({name:z("portal_hell_forge_title"),manual:0,auto:.75*i.hell_forge*e.supress}),tr.Scarletite.multi.push({name:z("portal_ruins_supressed"),manual:1,auto:e.supress})}if(t.tauceti.tau_factory&&c.tau_factory&&tr.general.add.push({name:z("tau_home_tau_factory"),manual:0,auto:c.tau_factory*(t.tech.isolation?2.75:.9)}),t.tech.isolation&&t.tauceti.colony&&c.colony&&tr.general.add.push({name:z("tau_home_colony"),manual:.5*c.colony,auto:.5*c.colony}),c.zero_g_lab&&i.zero_g_lab||c.infectious_disease_lab&&i.infectious_disease_lab){let e=mt("spc_enceladus");tr.Quantium.multi.push({name:z("space_syndicate"),manual:1,auto:e})}if(t.tech.alien_crafting&&c.infectious_disease_lab&&i.infectious_disease_lab){let e=1+.65*Math.min(c.infectious_disease_lab,i.infectious_disease_lab);tr.Quantium.multi.push({name:z("tech_infectious_disease_lab_alt"),manual:1,auto:e})}if(t.race.crafty&&tr.general.add.push({name:z("wiki_arpa_crispr_crafty"),manual:.03,auto:.03}),t.race.ambidextrous&&tr.general.add.push({name:z("trait_ambidextrous_name"),manual:di.ambidextrous.vars()[0]*t.race.ambidextrous/100,auto:di.ambidextrous.vars()[0]*t.race.ambidextrous/100}),t.race.rigid&&tr.general.add.push({name:z("trait_rigid_name"),manual:-di.rigid.vars()[0]/100,auto:-di.rigid.vars()[0]/100}),"socialist"===t.civic.govern.type&&tr.general.multi.push({name:z("govern_socialist"),manual:1+re.socialist()[0]/100,auto:1+re.socialist()[0]/100}),t.race.casting&&t.race.casting.crafting){let e=1+t.race.casting.crafting/(t.race.casting.crafting+75),a=1+2*t.race.casting.crafting/(2*t.race.casting.crafting+75);tr.general.multi.push({name:z("modal_pylon_casting"),manual:e,auto:a})}"magic"===t.race.universe&&tr.general.multi.push({name:z("universe_magic"),manual:.8,auto:.8}),t.tech.v_train&&tr.general.multi.push({name:z("tech_vocational_training"),manual:1,auto:2}),t.genes.crafty&&tr.general.multi.push({name:z("tab_arpa_crispr")+" "+z("wiki_arpa_crispr_crafty"),manual:1,auto:1+.5*(t.genes.crafty-1)}),t.race.living_tool&&tr.general.multi.push({name:z("trait_living_tool_name"),manual:1,auto:1+di.living_tool.vars()[1]/100}),t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=1&&tr.general.multi.push({name:z("evo_challenge_orbit_decay"),manual:1,auto:1.1}),t.race.ambidextrous&&tr.general.multi.push({name:z("trait_ambidextrous_name"),manual:1,auto:1+di.ambidextrous.vars()[1]*t.race.ambidextrous/100}),t.blood.artisan&&tr.general.multi.push({name:z("tab_arpa_blood")+" "+z("arpa_blood_artisan_title"),manual:1,auto:1+t.blood.artisan/100});let a=Br();a>0&&tr.general.multi.push({name:z("faith"),manual:1,auto:1+a/("antimatter"===t.race.universe?1.5:3)}),t.prestige.Plasmid.count>0&&tr.general.multi.push({name:z("resource_Plasmid_plural_name"),manual:Gr()/8+1,auto:Gr()/8+1}),t.genes.challenge&&t.genes.challenge>=2&&tr.general.multi.push({name:z("mastery"),manual:1+uc()/(t.race.weak_mastery?50:100),auto:1+uc()/(t.race.weak_mastery?50:100)})}});var tr;function ar(e){if(e)switch(e){case"market":Sr();break;case"storage":Fr();break;case"ejector":Ar();break;case"supply":Er();break;case"alchemy":Kr()}else Sr(),Fr(),Ar(),Er(),Kr()}function rr(e){"market"===e?(ar("market"),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let t=a.resource[e].color;if(a.resource[e].tradable){var r=$(`
    `);$("#market").append(r),dr(`#market-${e}`,r,e,t,!0)}})),ir()):"storage"===e?(ar("storage"),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let t=a.resource[e].color;if(a.resource[e].stackable){var r=$(`
    `);$("#resStorage").append(r),vr(`#stack-${e}`,r,e,t)}})),ir()):"ejector"===e?(ar("ejector"),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let t=a.resource[e].color;Ja[e]&&Tr(e,t)}))):"supply"===e?(ar("supply"),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let t=a.resource[e].color;Ya[e]&&Ir(e,t)}))):"alchemy"===e&&(ar("alchemy"),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let r=a.resource[e].color,s=a.resource[e].tradable;Va[e]&&"magic"===t.race.universe&&(t.resource[e].basic=s,Lr(e,r,s))})))}function sr(e){if("protoplasm"===t.race.species){let a=100;t.stats.achieve.mass_extinction&&t.stats.achieve.mass_extinction.l>1&&(a+=50*(t.stats.achieve.mass_extinction.l-1)),cr("RNA",e,a,1,!1),cr("DNA",e,a,1,!1)}cr("Money",e,1e3,1,!1,!1,"success"),cr(t.race.species,e,0,0,!1,!1,"warning"),cr("Slave",e,0,0,!1,!1,"warning"),cr("Mana",e,0,1,!1,!1,"warning"),cr("Energy",e,0,0,!1,!1,"warning"),cr("Sus",e,0,0,!1,!1,"warning"),cr("Knowledge",e,100,1,!1,!1,"warning"),cr("Zen",e,0,0,!1,!1,"warning"),cr("Crates",e,0,0,!1,!1,"warning"),cr("Containers",e,0,0,!1,!1,"warning"),cr("Food",e,250,1,!0,!0),cr("Lumber",e,200,1,!0,!0),cr("Chrysotile",e,200,1,!0,!0),cr("Stone",e,200,1,!0,!0),cr("Crystal",e,200,1,!0,!0),cr("Furs",e,100,1,!0,!0),cr("Copper",e,100,1,!0,!0),cr("Iron",e,100,1,!0,!0),cr("Aluminium",e,50,1,!0,!0),cr("Cement",e,100,1,!0,!0),cr("Coal",e,50,1,!0,!0),cr("Oil",e,0,1,!0,!1),cr("Uranium",e,10,1,!0,!1),cr("Steel",e,50,1,!0,!0),cr("Titanium",e,50,1,!0,!0),cr("Alloy",e,50,1,!0,!0),cr("Polymer",e,50,1,!0,!0),cr("Iridium",e,0,1,!0,!0),cr("Helium_3",e,0,1,!0,!1),cr("Water",e,0,1,!1,!1,"advanced"),cr("Deuterium",e,0,1,!1,!1,"advanced"),cr("Neutronium",e,0,1,!1,!1,"advanced"),cr("Adamantite",e,0,1,!1,!0,"advanced"),cr("Infernite",e,0,1,!1,!1,"advanced"),cr("Elerium",e,1,1,!1,!1,"advanced"),cr("Nano_Tube",e,0,1,!1,!1,"advanced"),cr("Graphene",e,0,1,!1,!0,"advanced"),cr("Stanene",e,0,1,!1,!0,"advanced"),cr("Bolognium",e,0,1,!1,!0,"advanced"),cr("Vitreloy",e,0,1,!1,!0,"advanced"),cr("Orichalcum",e,0,1,!1,!0,"advanced"),cr("Unobtainium",e,0,1,!1,!1,"advanced"),cr("Materials",e,0,1,!1,!1,"advanced"),cr("Horseshoe",e,-2,0,!1,!1,"advanced"),cr("Nanite",e,0,1,!1,!1,"advanced"),cr("Genes",e,-2,0,!1,!1,"advanced"),cr("Soul_Gem",e,-2,0,!1,!1,"advanced"),cr("Plywood",e,-1,0,!1,!1,"danger"),cr("Brick",e,-1,0,!1,!1,"danger"),cr("Wrought_Iron",e,-1,0,!1,!1,"danger"),cr("Sheet_Metal",e,-1,0,!1,!1,"danger"),cr("Mythril",e,-1,0,!1,!1,"danger"),cr("Aerogel",e,-1,0,!1,!1,"danger"),cr("Nanoweave",e,-1,0,!1,!1,"danger"),cr("Scarletite",e,-1,0,!1,!1,"danger"),cr("Quantium",e,-1,0,!1,!1,"danger"),cr("Corrupt_Gem",e,-2,0,!1,!1,"caution"),cr("Codex",e,-2,0,!1,!1,"caution"),cr("Cipher",e,0,1,!1,!1,"caution"),cr("Demonic_Essence",e,-2,0,!1,!1,"caution"),e||(nr("Blood_Stone","caution"),nr("Artifact","caution"),nr("Plasmid"),nr("AntiPlasmid"),nr("Phage"),nr("Dark"),nr("Harmony"),nr("AICore"))}function ir(){"protoplasm"!==t.race.species&&(function(){if(!t.settings.tabLoad&&(4!==t.settings.civTabs||0!==t.settings.marketTabs))return;let e=t.race.no_trade?" nt":"";var a=$(`
    ${z("resource_market_trade_routes")} / {{ mtrade }}
    `);a.append($(`${z("cancel_all_routes")}`)),$("#market").append(a),ic({el:"#tradeTotal",data:t.city.market,methods:{zero(){Object.keys(t.resource).forEach((function(e){t.resource[e].trade&&(t.city.market.trade-=Math.abs(t.resource[e].trade),t.resource[e].trade=0,xr(e))}))}},filters:{tdeCnt(e){let a=xc(17,11);return(100===e&&!t.tech.isolation&&!t.race.cataclysm||10===e&&(t.tech.isolation||t.race.cataclysm))&&a.length>0?"10"+a:e}}}),Ei("tradeTotalPopover",(function(){let e=$('
    ');return r.hasOwnProperty("t_route")&&Object.keys(r.t_route).forEach((function(t){r.t_route[t]>0&&e.append(``)})),e.append(``),e}),{elm:"#tradeTotalPopover > span"})}(),(t.settings.tabLoad||4===t.settings.civTabs&&0===t.settings.marketTabs)&&($("#market").append($(`

    ${z("galaxy_trade")}

    `)),pr()),function(){if(t.settings.tabLoad||4===t.settings.civTabs&&1===t.settings.marketTabs){var e=$(`
    ${z("resource_Crates_name")}{{ cr.amount }} / {{ cr.max }}${z("resource_Containers_name")}{{ cn.amount }} / {{ cn.max }}
    `);$("#resStorage").append(e),ic({el:"#crateTotal",data:{cr:t.resource.Crates,cn:t.resource.Containers}})}}())}function cr(e,r,s,i,c,o,n){if(n=n||"info",t.resource[e]||(t.resource[e]={}),or(e),t.race.artifical&&"Food"===e&&(o=!1),r)return;var l;t.resource[e].hasOwnProperty("display")||(t.resource[e].display=!1),t.resource[e].hasOwnProperty("value")||(t.resource[e].value=t.race.truepath?2*Za[e]:Za[e]),t.resource[e].hasOwnProperty("amount")||(t.resource[e].amount=0),t.resource[e].hasOwnProperty("max")||(t.resource[e].max=s),t.resource[e].hasOwnProperty("diff")||(t.resource[e].diff=0),t.resource[e].hasOwnProperty("delta")||(t.resource[e].delta=0),t.resource[e].hasOwnProperty("rate")||(t.resource[e].rate=i),"Mana"===e&&(t.resource[e].gen=0,t.resource[e].gen_d=0),t.resource[e].stackable=o,t.resource[e].crates||(t.resource[e].crates=0),t.resource[e].containers||(t.resource[e].containers=0),!t.resource[e].trade&&c&&(t.resource[e].trade=0),l=-1===t.resource[e].max||-2===t.resource[e].max?$(`

    {{ name | namespace }}

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

    {{ name | namespace }}

    {{ amount | size }} / {{ max | size }}
    `),o?l.append($(`+`)):(-1!==s||-1===s&&0===i&&t.race.no_craft||"Scarletite"===e||"Quantium"===e)&&l.append($(""));let u=!1;if(0!==i||-1===s&&0===i&&t.race.no_craft||"Scarletite"===e||"Quantium"===e)l.append($(`{{ diff | diffSize }} /s`));else if(-1!==s||t.race.no_craft||"Scarletite"===e||"Quantium"===e)l.append($(""));else{let t=$('');l.append(t);let a=[1,5];for(let r=0;r+${a[r]}`));t.append($(`+A`)),u=!0}$("#resources").append(l);var d={template:''};if(ic({el:`#res${e}`,data:t.resource[e],filters:{size:function(e){return e?q(e,0):e},diffSize:function(a){return"Horseshoe"===e&&!t.race.hooved&&Ec("fool",2023)&&(a=5),q(a,2)},namespace:e=>e.replace("_"," ")},methods:{resRate:e=>`${e} ${q(t.resource[e].diff,2)} per second`,trigModal(){this.$buefy.modal.open({parent:this,component:d});var a=setInterval((function(){$("#modalBox").length>0&&(clearInterval(a),function(e){$("#modalBox").append($('

    {{ name }} - {{ amount | size }}/{{ max | size }}

    '));let a=$('
    ');if($("#modalBox").append(a),"Food"===e&&!t.race.artifical||t.race.artifical&&"Coal"===e){let e=xc(7,10);e.length>0&&$("#modalBoxTitle").prepend(e)}if("Stone"===e){let e=qc(1,12,!1);e.length>0&&$("#modalBoxTitle").prepend(e)}let r=$('
    ');a.append(r),r.append($(`
    ${z("resource_modal_crate_owned")} {{ crates.amount }}/{{ crates.max }}${z("resource_modal_crate_assigned")} {{ res.crates }}
    `));let s=$(``),i=$(``),c=$(``);if(r.append(s),r.append(i),r.append(c),ic({el:"#modalCrates",data:{crates:t.resource.Crates,res:t.resource[e]},methods:{buildCrate(){Pr()},subCrate(e){hr(e)},addCrate(e){mr(e)}}}),t.resource.Containers.display){let r=$('
    ');a.append(r),r.append($(`
    ${z("resource_modal_container_owned")} {{ containers.amount }}/{{ containers.max }}${z("resource_modal_container_assigned")} {{ res.containers }}
    `));let s=$(``),i=$(``),c=$(``);r.append(s),r.append(i),r.append(c),ic({el:"#modalContainers",data:{containers:t.resource.Containers,res:t.resource[e]},methods:{buildContainer(){Or()},removeContainer(e){gr(e)},addContainer(e){fr(e)}}})}ic({el:"#modalBoxTitle",data:t.resource[e],filters:{size:function(e){return q(e,0)},diffSize:function(e){return q(e,2)}}}),["modalCrates","modalContainers"].forEach((function(e){["assign","unassign","construct"].forEach((function(t){Ei(`${e}${t}`,function(e,t){if("modalContainers"===e){let e=jr();switch(t){case"assign":return z("resource_modal_container_assign_desc",[e]);case"unassign":return z("resource_modal_container_unassign_desc",[e]);case"construct":return qr()}}else{let e=Cr();switch(t){case"assign":return z("resource_modal_crate_assign_desc",[e]);case"unassign":return z("resource_modal_crate_unassign_desc",[e]);case"construct":return kr()}}}(e,t),{elm:$(`#${e} > .${t}`),attach:"#main"})}))}))}(e))}),50)},showTrigger:()=>t.resource.Crates.display,craft(e,a){if(!t.race.no_craft){let r=er(e,"manual").multiplier,s=Xa(),i=Math.floor(t.resource[s[e][0].r].amount/s[e][0].a);for(let a=1;a${t.resource[s[e][i].r].name} ${c}`}return r}}}),$r(`cnt${e}`,e,"c"),u){let a=[1,5,"A"];for(let r=0;r"),i=e,c=a[r],o=+(100*er(i,"manual").multiplier).toFixed(0);s.append($(`
    ${z("manual_crafting_hover_bonus",[o.toLocaleString(),t.resource[i].name])}
    `));let n=Xa(),l=$(`
    ${z("manual_crafting_hover_craft")}
    `),u=0;if("number"!=typeof c){if(u=t.resource[n[i][0].r].amount/n[i][0].a,n[i].length>1)for(let e=1;e${q(o/100*u,1)} ${t.resource[i].name}`))}else{u=b()*c;let e=q(o/100*u,1);l.append($(`${e} ${t.resource[i].name}`))}let d=$(`
    ${z("manual_crafting_hover_use")}
    `);for(let e=0;e${q(u*n[i][e].a,1)} ${t.resource[n[i][e].r].name}`)),e+1, "));return s.append(l),s.append(d),s};wr(`inc${e}${a[r]}`,e,"manual",s)}}o&&Ei(`con${e}`,(function(){var a=$(`
    ${z("resource_Crates_plural")} ${t.resource[e].crates}
    `);return t.tech.steel_container&&a.append($(`
    ${z("resource_Containers_plural")} ${t.resource[e].containers}
    `)),a})),e!==t.race.species&&"Crates"!==e&&"Containers"!==e&&-1!==s?$r(`inc${e}`,e,"p"):-1===s&&wr(`inc${e}`,e,"auto"),$(`#res${e}`).on("mouseover",(function(){$(`.res-${e}`).each((function(){t.resource[e].amount>=$(this).attr(`data-${e}`)?$(this).addClass("hl-ca"):$(this).addClass("hl-cna")}))})),$(`#res${e}`).on("mouseout",(function(){$(`.res-${e}`).each((function(){$(this).removeClass("hl-ca"),$(this).removeClass("hl-cna")}))})),void 0===a.resource&&(a.resource={}),a.resource[e]={color:n,tradable:c,stackable:o}}function or(e){if(e===t.race.species?t.resource[e].name=Tc("name"):t.resource[e].name="Money"===e?"$":z(`resource_${e}_name`),Ec("fool",2022))switch(e){case"Lumber":t.resource[e].name=z("resource_Stone_name");break;case"Stone":t.resource[e].name=z("resource_Lumber_name");break;case"Copper":t.resource[e].name=z("resource_Iron_name");break;case"Iron":t.resource[e].name=z("resource_Copper_name");break;case"Steel":t.resource[e].name=z("resource_Titanium_name");break;case"Titanium":t.resource[e].name=z("resource_Steel_name");break;case"Coal":t.resource[e].name=z("resource_Oil_name");break;case"Oil":t.resource[e].name=z("resource_Coal_name");break;case"Alloy":t.resource[e].name=z("resource_Polymer_name");break;case"Polymer":t.resource[e].name=z("resource_Alloy_name");break;case"Graphene":t.resource[e].name=z("resource_Stanene_name");break;case"Stanene":t.resource[e].name=z("resource_Graphene_name");break;case"Plywood":t.resource[e].name=z("resource_Brick_name");break;case"Brick":t.resource[e].name=z("resource_Plywood_name");break;case"Genes":t.resource[e].name=z("resource_Soul_Gem_name");break;case"Soul_Gem":t.resource[e].name=z("resource_Genes_name");break;case"Slave":t.resource[e].name=z("resource_Peon_name")}if("Horseshoe"===e&&(t.resource[e].name=Gc()),t.race.artifical&&"Genes"===e&&(t.resource[e].name=z("resource_Program_name")),t.race.sappy)"Stone"===e&&(t.resource[e].name=z("resource_Amber_name"));else if(t.race.flier)switch(e){case"Stone":t.resource[e].name=z("resource_Clay_name");break;case"Brick":t.resource[e].name=z("resource_Mud_Brick_name")}if(t.race.soul_eater&&"Food"===e&&(t.resource[e].name=z("resource_Souls_name")),t.race.evil)switch(e){case"Lumber":t.resource[e].name=z("resource_Bones_name");break;case"Furs":t.resource[e].name=z("resource_Flesh_name");break;case"Plywood":t.resource[e].name=z("resource_Boneweave_name")}if(t.race.artifical&&"Food"===e&&(t.resource[e].name=z("resource_Signal_name")),Ec("halloween").active)switch(e){case"Food":t.resource[e].name=z("resource_Candy_name");break;case"Lumber":t.resource[e].name=z("resource_Bones_name");break;case"Stone":t.resource[e].name=z("resource_RockCandy_name");break;case"Furs":t.resource[e].name=z("resource_Webs_name");break;case"Plywood":t.resource[e].name=z("resource_Boneweave_name");break;case"Brick":t.resource[e].name=z("resource_Tombstone_name");break;case"Soul_Gem":t.resource[e].name=z("resource_CandyCorn_name")}}function nr(e,a){if($(`#res${e}`).length){let t=$(`#res${e}`);return t.detach(),void $("#resources").append(t)}a=a||"special";var r=$(`
    ${z(`resource_${e}_name`)}{{ count | round }}
    `);$("#resources").append(r),ic({el:`#res${e}`,data:t.prestige[e],filters:{round:e=>+e.toFixed(3)}}),"Artifact"!==e&&"Blood_Stone"!==e&&Ei(`res${e}`,(function(){let a=$("
    ");switch(e){case"Plasmid":let r=t.race.no_plasmid?Math.min(t.race.p_mutation,t.prestige.Plasmid.count):t.prestige.Plasmid.count;if(a.append($(`${z(`resource_${e}_desc`,[r,+(100*Gr("plasmid")).toFixed(2)])}`)),t.genes.store&&("antimatter"!==t.race.universe||t.genes.bleed>=3)){let e=Nr(1,"plasmid");e>1&&a.append($(` ${z("resource_Plasmid_desc2",[+(100*(e-1)).toFixed(2)])}`))}break;case"AntiPlasmid":a.append($(`${z(`resource_${e}_desc`,[t.prestige.AntiPlasmid.count,+(100*Gr("antiplasmid")).toFixed(2)])}`));let s=Nr(1,"anti");t.genes.store&&("antimatter"===t.race.universe||t.genes.bleed>=3)&&s>1&&a.append($(` ${z("resource_Plasmid_desc2",[+(100*(s-1)).toFixed(2)])}`));break;case"Phage":a.append($(`${z(t.prestige.AntiPlasmid.count>0?"resource_Phage_desc2":"resource_Phage_desc",[250+t.prestige.Phage.count])}`));let i=Nr(1,"phage");t.genes.store&&t.genes.store>=4&&i>1&&a.append($(` ${z("resource_Plasmid_desc2",[+(100*(i-1)).toFixed(2)])}`));break;case"Dark":switch(t.race.universe){case"standard":a.append($(`${z(`resource_${e}_desc_s`,[+(100*(lc("standard")-1)).toFixed(2)])}`));break;case"evil":a.append($(`${z(`resource_${e}_desc_e`,[+(100*(lc("evil")-1)).toFixed(2)])}`));break;case"micro":a.append($(`${z(`resource_${e}_desc_m`,[lc("micro",!1),lc("micro",!0)])}`));break;case"heavy":let t=lc("heavy"),r=.25+.5*t,s=.2+.3*t;a.append($(`${z(`resource_${e}_desc_h`,[+(100*r).toFixed(4),+(100*s).toFixed(4)])}`));break;case"antimatter":a.append($(`${z(`resource_${e}_desc_a`,[+(100*(lc("antimatter")-1)).toFixed(2)])}`));break;case"magic":a.append($(`${z(`resource_${e}_desc_mg`,[z("resource_Mana_name"),+(100*(lc("magic")-1)).toFixed(2)])}`))}break;case"Harmony":a.append($(`${z(`resource_${e}_desc`,["standard"===t.race.universe?.1:1,tc()])}`));break;case"AICore":let c=+(100*(1-.99**t.prestige.AICore.count)).toFixed(2);a.append($(`${z(`resource_${e}_desc`,[c])}`))}return a}))}function lr(e){let a=t.tech.currency>=6?-1e6:t.tech.currency>=4?-100:-25;if(t.race.banana){let r=!1;if(Object.keys(t.resource).forEach((function(e){t.resource[e].hasOwnProperty("trade")&&t.resource[e].trade<0&&(r=e)})),r&&r!==e)return!1;a=t.tech.currency>=6?-1e6:t.tech.currency>=4?-25:-10}return!(t.resource[e].trade<=a)}function ur(e){let a=t.tech.currency>=6?1e6:t.tech.currency>=4?100:25;return!(t.resource[e].trade>=a)}function dr(e,a,r,s,i){if((t.settings.tabLoad||4===t.settings.civTabs&&0===t.settings.marketTabs)&&(!t.race.artifical||"Food"!==r)){if(i&&a.append($(`

    {{ r.name | namespace }}

    `)),t.race.no_trade||(a.append($(`${z("resource_market_buy")}`)),a.append($(`\${{ r.value | buy }}`)),a.append($(`${z("resource_market_sell")}`)),a.append($(`\${{ r.value | sell }}`))),i&&(t.race.banana&&"Food"===r||t.tech.trade&&!t.race.terrifying)){let e=$(`${z("resource_market_routes")}`);a.append(e),e.append($(`-`)),e.append($('')),e.append($(`+`)),e.append($(`${z("cancel_routes")}`)),xr(r)}ic({el:e,data:{r:t.resource[r],m:t.city.market},methods:{aSell(e){let a=1===Va[e]?z("resource_market_unit"):z("resource_market_units"),r=yr(e),s=Va[e];if(t.stats.achieve.hasOwnProperty("trade")){let e=t.stats.achieve.trade.l;e>5&&(e=5),s*=1-e/100}return s=+s.toFixed(3),z("resource_market_auto_sell_desc",[s,a,r])},aBuy(e){let a=Va[e],r=D("dealmaker",0);r&&(a*=1+r/100),t.race.persuasive&&(a*=1+t.race.persuasive/100),t.race.merchant&&(a*=1+di.merchant.vars()[1]/100);let s=Oi("goblin");if(s>0&&(a*=1+di.merchant.vars(1)[1]/100*s),t.genes.trader&&(a*=1+uc()/100),t.stats.achieve.hasOwnProperty("trade")){let e=t.stats.achieve.trade.l;e>5&&(e=5),a*=1+e/50}t.race.truepath&&(a*=1-t.civic.foreign.gov3.hstl/101),a=+a.toFixed(3);let i=z(1===a?"resource_market_unit":"resource_market_units");return z("resource_market_auto_buy_desc",[a,i,br(e)])},purchase(e){if(!t.race.no_trade&&!t.settings.pause){let a=t.city.market.qty,r=t.resource[e].value;t.race.arrogant&&(r*=1+di.arrogant.vars()[0]/100),t.race.conniving&&(r*=1-di.conniving.vars()[0]/100);let s=Oi("imp");s>0&&(r*=1-di.conniving.vars(1)[0]/100*s);let i=Math.floor(Math.min(a,t.resource.Money.amount/r,t.resource[e].max-t.resource[e].amount));i>0&&(t.resource[e].amount+=i,t.resource.Money.amount-=Math.round(r*i),t.resource[e].value+=Number((i/Math.rand(1e3,1e4)).toFixed(2)))}},sell(e){if(!t.race.no_trade&&!t.settings.pause){let a=t.city.market.qty,r=4;t.race.merchant&&(r*=1-di.merchant.vars()[0]/100);let s=Oi("goblin");s>0&&(r*=1-di.merchant.vars(1)[0]/100*s),t.race.asymmetrical&&(r*=1+di.asymmetrical.vars()[0]/100),t.race.conniving&&(r*=1-di.conniving.vars()[1]/100);let i=Oi("imp");i>0&&(r*=1-di.conniving.vars(1)[1]/100*i);let c=t.resource[e].value/r,o=Math.floor(Math.min(a,t.resource[e].amount,(t.resource.Money.max-t.resource.Money.amount)/c));o>0&&(t.resource[e].amount-=o,t.resource.Money.amount+=Math.round(c*o),t.resource[e].value-=Number((o/Math.rand(1e3,1e4)).toFixed(2)),t.resource[e].value0&&(a+=t.resource[r].trade)})),e<=a)break}if(t.resource[e].trade>=0){if(!(ur(e)&&t.city.market.trade(t.race.arrogant&&(e*=1+di.arrogant.vars()[0]/100),q(e*t.city.market.qty,0)),sell(e){let a=4;t.race.merchant&&(a*=1-di.merchant.vars()[0]/100);let r=Oi("goblin");return r>0&&(a*=1-di.merchant.vars(1)[0]/100*r),t.race.asymmetrical&&(a*=1+di.asymmetrical.vars()[0]/100),q(e*t.city.market.qty/a,0)},trade(e){if("Stone"===r&&(31===e||-31===e)){let e=qc(3,12,!1);if(e.length>0)return e}return e<0?"-"+(e=0-e):e>0?`+${e}`:0},namespace:e=>e.replace("_"," ")}})}}function _r(){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:t.race.kindling_kindred||t.race.smoldering?t.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 pr(e){let a=e||$("#galaxyTrade");if(e||sc($("#galaxyTrade")),t.galaxy.trade){a.append($(`
    ${z("galaxy_trade")}
    `));let e=_r();for(let r=0;r');a.append(s),s.append($(`${t.resource[e[r].buy.res].name}`)),s.append($(`+{{ '${r}' | t_vol }}/s`)),s.append($(`${t.resource[e[r].sell.res].name}`)),s.append($(`-{{ '${r}' | s_vol }}/s`));let i=$(`${z("resource_market_routes")}`);s.append(i);let c=z("galaxy_freighter_assign",[t.resource[e[r].buy.res].name,t.resource[e[r].sell.res].name]),o=z("galaxy_freighter_unassign",[t.resource[e[r].buy.res].name,t.resource[e[r].sell.res].name]);i.append($(`-`)),i.append($(`{{ g.f${r} }}`)),i.append($(`+`)),i.append($(`${z("cancel_routes")}`))}let r=$(`
    ${z("resource_market_galactic_trade_routes")} {{ g.cur }} / {{ g.max }}
    `);r.append($(`${z("cancel_all_routes")}`)),a.append(r)}ic({el:e?"#specialModal":"#galaxyTrade",data:{g:t.galaxy.trade,t:t.tech},methods:{less(e){let a=b();t.galaxy.trade[`f${e}`]>=a?(t.galaxy.trade[`f${e}`]-=a,t.galaxy.trade.cur-=a):(t.galaxy.trade.cur-=t.galaxy.trade[`f${e}`],t.galaxy.trade[`f${e}`]=0)},more(e){let a=b();t.galaxy.trade.curt.galaxy.trade.max-t.galaxy.trade.cur&&(a=t.galaxy.trade.max-t.galaxy.trade.cur),t.galaxy.trade[`f${e}`]+=a,t.galaxy.trade.cur+=a)},zero(e){if(e)t.galaxy.trade.cur-=t.galaxy.trade[`f${e}`],t.galaxy.trade[`f${e}`]=0;else{let e=_r();for(let a=0;ae},filters:{t_vol(e){let a=_r()[e].buy.vol;t.race.persuasive&&(a*=1+t.race.persuasive/100),t.race.merchant&&(a*=1+di.merchant.vars()[1]/100);let r=Oi("goblin");if(r>0&&(a*=1+di.merchant.vars(1)[1]/100*r),t.genes.trader&&(a*=1+uc()/100),t.stats.achieve.hasOwnProperty("trade")){let e=t.stats.achieve.trade.l;e>5&&(e=5),a*=1+e/50}return a=+a.toFixed(2),a},s_vol(e){let a=_r()[e].sell.vol;if(t.stats.achieve.hasOwnProperty("trade")){let e=t.stats.achieve.trade.l;e>5&&(e=5),a*=1-e/100}return a=+a.toFixed(2),a}}}),Ei("galacticTradeTotal",(function(){let e=$('
    ');return r.hasOwnProperty("gt_route")&&Object.keys(r.gt_route).forEach((function(t){r.gt_route[t]>0&&e.append(``)})),e.append(``),e}),{elm:"#galacticTradeTotal > span"})}function hr(e){let a=b(),r=Cr();a>t.resource[e].crates&&(a=t.resource[e].crates),a>0&&(t.resource.Crates.amount+=a,t.resource.Crates.max+=a,t.resource[e].crates-=a,t.resource[e].max-=r*a)}function mr(e){let a=b(),r=Cr();a>t.resource.Crates.amount&&(a=t.resource.Crates.amount),a>0&&(t.resource.Crates.amount-=a,t.resource.Crates.max-=a,t.resource[e].crates+=a,t.resource[e].max+=r*a)}function gr(e){let a=b(),r=jr();a>t.resource[e].containers&&(a=t.resource[e].containers),a>0&&(t.resource.Containers.amount+=a,t.resource.Containers.max+=a,t.resource[e].containers-=a,t.resource[e].max-=r*a)}function fr(e){let a=b(),r=jr();a>t.resource.Containers.amount&&(a=t.resource.Containers.amount),a>0&&(t.resource.Containers.amount-=a,t.resource.Containers.max-=a,t.resource[e].containers+=a,t.resource[e].max+=r*a)}function vr(e,a,r,s){if(t.settings.tabLoad||4===t.settings.civTabs&&1===t.settings.marketTabs){if(a.append($(`

    {{ name }}

    `)),t.resource.Crates.display){let e=$(`${z("resource_Crates_name")}`);a.append(e),e.append($(`«`)),e.append($(``)),e.append($(`»`))}if(t.resource.Containers.display){let e=$(`${z("resource_Containers_name")}`);a.append(e),e.append($(`«`)),e.append($('')),e.append($(`»`))}ic({el:e,data:t.resource[r],methods:{addCrate(e){mr(e)},subCrate(e){hr(e)},addCon(e){fr(e)},subCon(e){gr(e)}},filters:{trick(e){if("Stone"===r&&10===t.resource[r].crates&&31===t.resource[r].containers){let e=qc(4,13,!0);if(e.length>0)return e}return e},cCnt(e,a){if("Food"===a&&!t.race.artifical||t.race.artifical&&"Coal"===a){let t=xc(13,10);if(10===e&&t.length>0)return"1"+t}return e}}})}}function yr(e){let a=4;t.race.merchant&&(a*=1-di.merchant.vars()[0]/100);let r=Oi("goblin");r>0&&(a*=1-di.merchant.vars(1)[0]/100*r),t.race.asymmetrical&&(a*=1+di.asymmetrical.vars()[0]/100),t.race.conniving&&a--;let s=t.resource[e].value*Va[e]/a;if(t.city.wharf&&(s*=1+.01*t.city.wharf.count),t.space.gps&&t.space.gps.count>3&&(s*=1+.01*t.space.gps.count),t.tech.railway){let e=t.stats.achieve.banana&&t.stats.achieve.banana.l>=1?.03:.02;s*=1+t.tech.railway*e}return t.race.truepath&&!t.race.lone_survivor&&(s*=1-t.civic.foreign.gov3.hstl/101),t.race.inflation&&(s*=1+t.race.inflation/500),t.race.witch_hunter&&t.resource.Sus.amount>50&&(s*=1-(t.resource.Sus.amount-50)/52),s*=Oe("psychic_cash"),s=+s.toFixed(1),s}function br(e){let a=t.resource[e].value;t.race.arrogant&&(a*=1+di.arrogant.vars()[0]/100),t.race.conniving&&(a*=1-di.conniving.vars()[0]/100);let r=Oi("imp");r>0&&(a*=1-di.conniving.vars(1)[0]/100*r);let s=a*Va[e];return t.city.wharf&&(s*=.99**t.city.wharf.count),t.space.gps&&t.space.gps.count>3&&(s*=.99**t.space.gps.count),t.tech.railway&&(s*=(t.stats.achieve.banana&&t.stats.achieve.banana.l>=1?.97:.98)**t.tech.railway),t.race.truepath&&!t.race.lone_survivor&&(s*=1+t.civic.foreign.gov3.hstl/101),t.race.inflation&&(s*=1+t.race.inflation/300),t.race.quarantine&&(s*=1+Math.round(t.race.quarantine**3.5)),t.race.witch_hunter&&t.resource.Sus.amount>50&&(s*=1+(t.resource.Sus.amount-50)/8),s=+s.toFixed(1),s}function wr(e,a,s,i){Ei(`${e}`,(function(){let e=$('
    {{ res.name | namespace }}
    '),c=$('
    ');e.append(c);let o=er(a,s),n=$("
    ");c.append(n),"auto"===s&&r.p[a]&&Object.keys(r.p[a]).forEach((function(e){let t=r.p[a][e],s=parseFloat(t.slice(0,-1));if(0!=s&&!isNaN(s)){let t=s>0?"success":"danger",r=e.replace(/\+.+$/,"");e=e.replace(/'/g,"\\'"),n.append(``)}})),Object.keys(o.multi_bd).forEach((function(e){let t=o.multi_bd[e],a=parseFloat(t.slice(0,-1));if(0!=a&&!isNaN(a)){let t=a>0?"success":"danger",r=e.replace(/\+.+$/,"");e=e.replace(/'/g,"\\'"),n.append(``)}}));let l=$('
    '),u=$(`
    ${z("craft_tools_multi")}
    `);l.append(u);let d=0;if(Object.keys(o.add_bd).forEach((function(e){let t=o.add_bd[e],a=parseFloat(t.slice(0,-1));if(0!=a&&!isNaN(a)){d++;let t=a>0?"success":"danger",r=e.replace(/\+.+$/,"");e=e.replace(/'/g,"\\'"),l.append(``)}})),d>0&&c.append(l),r.p.consume&&r.p.consume[a]){let e=$('
    '),t=0;Object.keys(r.p.consume[a]).forEach((function(s){let i=r.p.consume[a][s];if(0!=i&&!isNaN(i)){t++;let r=i>0?"success":"danger",c=s.replace(/\+.+$/,"");s=s.replace(/'/g,"\\'"),e.append(``)}})),t>0&&c.append(e)}return t.resource[a].diff<0&&t.resource[a].amount>0&&e.append(``),i&&(e.append(''),e.append(i)),e}),{in:function(){ic({el:"#popper > div",data:{[a]:r.p[a],res:t.resource[a],consume:r.p.consume,craft:er(a,s)},filters:{translate(e){let t=e[e.length-1],a=parseFloat(e.slice(0,-1)),r=a>0&&a<1||a<0&&a>-1?4:a>0&&a<10||a<0&&a>-10?3:2;a=+a.toFixed(r);let s="%"===t?"%":"";return a>0?"+"+q(a,r)+s:a<0?q(a,r)+s:void 0},fix:e=>e+"v",counter(e){let r=+(e/-t.resource[a].diff).toFixed(0);if(r>60){let e=r%60,t=(r-e)/60;if(t>=60){let e=t%60;return`${(t-e)/60}h ${e}m`}return`${t}m ${e}s`}return`${r}s`},namespace:e=>e.replace("_"," ")}})},out:function(){ic({el:"#popper > div"},"destroy")},classes:"breakdown has-background-light has-text-dark",prop:{modifiers:{preventOverflow:{enabled:!1},hide:{enabled:!1}}}})}function $r(e,a,s){Ei(`${e}`,(function(){let e=$('
    {{ res.name | namespace }}
    '),i=$('
    ');e.append(i);let c=!1;if(r[s][a]){let e=$("
    ");i.append(e);let t=[a];t.push("Global");for(var o=0;o0?"success":"danger",s=t.replace(/\+.+$/,"");t=t.replace(/'/g,"\\'"),e.append(``)}}))}}if(r[s].consume&&r[s].consume[a]){let e=$(`
    `),t=0;Object.keys(r[s].consume[a]).forEach((function(i){let c=r[s].consume[a][i];if(0!=c&&!isNaN(c)){t++;let r=c>0?"success":"danger",s=i.replace(/\+.+$/,"");i=i.replace(/'/g,"\\'"),e.append(``)}})),t>0&&i.append(e)}if("p"===s){let r=t.resource[a].diff>0?"success":"danger";e.append(``)}return e}),{in:function(){ic({el:"#popper > div",data:{Global:r[s].Global,[a]:r[s][a],consume:r[s].consume,res:t.resource[a]},filters:{translate(e){let t=e[e.length-1],a=parseFloat(e.slice(0,-1)),r=a>0&&a<1||a<0&&a>-1?4:a>0&&a<10||a<0&&a>-10?3:2,s="%"===t?"%":"";return a>0?"+"+q(a,r)+s:a<0?q(a,r)+s:void 0},fix:e=>e+"v",counter(e){let r=t.resource[a].diff,s=0;if(r<0?(r*=-1,s=+(e/r).toFixed(0)):s=+((t.resource[a].max-e)/r).toFixed(0),s===1/0||Number.isNaN(s))return"Never";if(s>60){let e=s%60,t=(s-e)/60;if(t>=60){let e=t%60;return`${(t-e)/60}h ${e}m`}return`${t}m ${e}s`}return`${s}s`},direction:e=>z(e>=0?"to_full":"to_empty"),namespace:e=>e.replace("_"," ")}})},out:function(){ic({el:"#popper > div"},"destroy")},classes:"breakdown has-background-light has-text-dark",prop:{modifiers:{preventOverflow:{enabled:!1},hide:{enabled:!1}}}})}function xr(e){$(`#market-${e} .trade .current`).removeClass("has-text-warning"),$(`#market-${e} .trade .current`).removeClass("has-text-danger"),$(`#market-${e} .trade .current`).removeClass("has-text-success"),t.resource[e].trade>0?$(`#market-${e} .trade .current`).addClass("has-text-success"):t.resource[e].trade<0?$(`#market-${e} .trade .current`).addClass("has-text-danger"):$(`#market-${e} .trade .current`).addClass("has-text-warning")}function kr(){let e=t.race.kindling_kindred||t.race.smoldering?t.race.smoldering?t.resource.Chrysotile.name:t.resource.Stone.name:t.resource.Plywood?t.resource.Plywood.name:z("resource_Plywood_name");return z("resource_modal_crate_construct_desc",[t.race.kindling_kindred||t.race.smoldering?200:10,e,Cr()])}function qr(){return z("resource_modal_container_construct_desc",[125,jr()])}function Mr(e,t){switch(e){case"crate":Pr(t);break;case"container":Or(t)}}function Pr(e){let a=e||b(),r=t.race.kindling_kindred||t.race.smoldering?t.race.smoldering?"Chrysotile":"Stone":"Plywood",s=t.race.kindling_kindred||t.race.smoldering?200:10;a+t.resource.Crates.amount>t.resource.Crates.max&&(a=t.resource.Crates.max-t.resource.Crates.amount),t.resource[r].amount=s*a&&t.resource.Crates.amountt.resource.Containers.max&&(a=t.resource.Containers.max-t.resource.Containers.amount),t.resource.Steel.amount<125*a&&(a=Math.floor(t.resource.Steel.amount/125)),t.resource.Steel.amount>=125*a&&t.resource.Containers.amount=2?500:350;t.tech.container&&t.tech.container>=4&&(e+=t.tech.container>=5?500:250),t.tech.container&&t.tech.container>=6&&(e+=t.tech.container>=7?1200:500),t.tech.container&&t.tech.container>=8&&(e+=4e3),t.race.pack_rat&&(e*=1+di.pack_rat.vars()[0]/100);let a=Oi("kobold");return a>0&&(e*=1+di.pack_rat.vars(1)[0]/100*a),t.stats.achieve.banana&&t.stats.achieve.banana.l>=3&&(e*=1.1),e*=t.stats.achieve.blackhole?1+.05*t.stats.achieve.blackhole.l:1,Math.round(Nr(e))}function jr(){let e=t.tech.steel_container&&t.tech.steel_container>=3?1200:800;t.tech.steel_container&&t.tech.steel_container>=4&&(e+=t.tech.steel_container>=5?1e3:400),t.tech.steel_container&&t.tech.steel_container>=6&&(e+=t.tech.steel_container>=7?7500:1e3),t.tech.steel_container&&t.tech.steel_container>=8&&(e+=8e3),t.race.pack_rat&&(e*=1+di.pack_rat.vars()[0]/100);let a=Oi("kobold");return a>0&&(e*=1+di.pack_rat.vars(1)[0]/100*a),e*=t.stats.achieve.blackhole?1+.05*t.stats.achieve.blackhole.l:1,Math.round(Nr(e))}function Sr(){if(!t.settings.tabLoad&&(4!==t.settings.civTabs||0!==t.settings.marketTabs))return;let e=$(`

    ${z("resource_market")}

    `);sc($("#market")),$("#market").append(e),function(){if(!t.settings.tabLoad&&(4!==t.settings.civTabs||0!==t.settings.marketTabs))return;let e=$("#market-qty");sc(e),t.race.no_trade||(e.append($(`

    ${z("resource_trade_qty")}

    `)),e.append($('-+'))),ic({el:"#market-qty",data:t.city.market,methods:{val(){t.city.market.qty<1?t.city.market.qty=1:t.city.market.qty>zr()&&(t.city.market.qty=zr())},limit:()=>zr(),less(){t.city.market.qty-=b()},more(){t.city.market.qty+=b()}}})}()}function Fr(){if(!t.settings.tabLoad&&(4!==t.settings.civTabs||1!==t.settings.marketTabs))return;let e=$(`

    ${z("tab_storage")}

    `);sc($("#resStorage")),$("#resStorage").append(e),t.resource.Crates&&t.resource.Containers&&(e.append($(``)),e.append($(``)),ic({el:"#createHead",data:{cr:t.resource.Crates,cn:t.resource.Containers},methods:{crate(){Pr()},container(){Or()},buildCrateDesc:()=>kr(),buildContainerDesc:()=>qr()}}))}function zr(){return t.tech.currency>=6?1e6:t.tech.currency>=4?5e3:100}function Ar(){if((t.settings.tabLoad||4===t.settings.civTabs&&2===t.settings.marketTabs)&&(sc($("#resEjector")),t.interstellar.mass_ejector)){let e=$(`

    ${z("interstellar_mass_ejector_vol")}

    `);$("#resEjector").append(e);let a=$('');e.append(a),a.append($(`{{ total }} / {{ on | max }}{{ on | real }}${z("interstellar_mass_ejector_mass")}: {{ mass | approx }} kt/s`)),ic({el:"#eject",data:t.interstellar.mass_ejector,filters:{max:e=>1e3*e,real:e=>i.mass_ejectorq(e,2)}})}}function Tr(e,a){if((t.settings.tabLoad||4===t.settings.civTabs&&2===t.settings.marketTabs)&&(!t.race.artifical||"Food"!==e)&&Ja[e]&&t.interstellar.mass_ejector){"magic"===t.race.universe||"Elerium"!==e&&"Infernite"!==e||(a="caution");let r=$(`

    ${t.resource[e].name}

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

    ${z("portal_transport_supply")}

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

    ${t.resource[e].name}

    `);$("#resCargo").append(r);let s=$('');r.append(s),s.append($(`«`)),s.append($(`{{ e.${e} }}`)),s.append($(`»`));let i=q(Ya[e].out);s.append($(`${z("portal_transport_item",[`${i}`,`${Ya[e].in}`])}`)),t.portal.transport.cargo.hasOwnProperty(e)||(t.portal.transport.cargo[e]=0),ic({el:`#supply${e}`,data:{r:t.resource[e],e:t.portal.transport.cargo},methods:{supplyMore(e){let a=b();a+t.portal.transport.cargo.used>t.portal.transport.cargo.max&&(a=t.portal.transport.cargo.max-t.portal.transport.cargo.used,t.portal.transport.cargo[e]+a<0&&(a=-t.portal.transport.cargo[e])),t.portal.transport.cargo[e]+=a,t.portal.transport.cargo.used+=a},supplyLess(e){let a=b();a>t.portal.transport.cargo[e]&&(a=t.portal.transport.cargo[e]),t.portal.transport.cargo[e]>0&&(t.portal.transport.cargo[e]-=a,t.portal.transport.cargo.used-=a)}}})}}function Kr(){(t.settings.tabLoad||4===t.settings.civTabs&&4===t.settings.marketTabs)&&sc($("#resAlchemy"))}function Lr(e,a,r){if((t.settings.tabLoad||4===t.settings.civTabs&&4===t.settings.marketTabs)&&(!t.race.artifical||"Food"!==e)&&t.tech.alchemy&&(r||t.tech.alchemy>=2)&&"Crystal"!==e){let s=$(`

    ${t.resource[e].name}

    `);$("#resAlchemy").append(s);let i=$('');s.append(i),i.append($(`«`)),i.append($(`{{ a.${e} }}`)),i.append($(`»`)),t.race.alchemy.hasOwnProperty(e)||(t.race.alchemy[e]=0),ic({el:`#alchemy${e}`,data:{r:t.resource[e],a:t.race.alchemy},methods:{addSpell(e){let a=b();for(let r=0;r=1;r++)t.race.alchemy[e]++,t.resource.Mana.diff--},subSpell(e){let a=b();for(let r=0;r0;r++)t.race.alchemy[e]--,t.resource.Mana.diff++}}}),Ei(`alchemy${e}`,(function(){let a=r&&t.tech.alchemy>=2?8*Va[e]:2*Va[e];return t.race.witch_hunter&&(a*=3),t.stats.achieve.soul_sponge&&t.stats.achieve.soul_sponge.mg&&(a*=t.stats.achieve.soul_sponge.mg+1),$(`
    ${z("resource_alchemy",[1,z("resource_Mana_name"),.15,z("resource_Crystal_name"),+a.toFixed(2),t.resource[e].name])}
    `)}),{elm:`#alchemy${e} h3`})}}const Nr=(Dr={},function(e,a,r){let s=a||"a",i=[t.race.universe,t.prestige.Plasmid.count,t.prestige.AntiPlasmid.count,t.prestige.Phage.count,t.race.no_plasmid||"0",t.race.p_mutation||"0",t.race.nerfed||"0",t.genes.store||"0",t.genes.bleed||"0",t.city.temple?t.city.temple.count:"0",t.space.ziggurat?t.space.ziggurat.count:"0",t.race.cataclysm?t.race.cataclysm:"0",t.race.orbit_decayed?t.race.orbit_decayed:"0",t.genes.ancients||"0",t.civic.priest?t.civic.priest.workers:"0"].join("-");if(Dr[s]||(Dr[s]={}),!Dr[s][i]||r){let e=1,r=!(!t.race.cataclysm&&!t.race.orbit_decayed);if(t.genes.store){let r=0;if(!a||a&&("plasmid"===a&&"antimatter"!==t.race.universe||"anti"===a&&"antimatter"===t.race.universe)){r="antimatter"===t.race.universe?t.prestige.AntiPlasmid.count:t.prestige.Plasmid.count;let e=r;t.race.no_plasmid?e=Math.min(t.race.p_mutation,r):t.race.nerfed&&(e=Math.floor(r/("antimatter"===t.race.universe?2:5))),r=Math.round(e*(t.race.nerfed?.5:1))}(!a||a&&"phage"===a)&&t.genes.store>=4&&(r+=Math.round(t.prestige.Phage.count*(t.race.nerfed?1/3:1)));let s=t.genes.store>=2?t.genes.store>=3?1250:1666:2500;if("antimatter"===t.race.universe&&(s*=2),t.genes.bleed&&t.genes.bleed>=3&&(!a||a&&("plasmid"===a&&"antimatter"===t.race.universe||"anti"===a&&"antimatter"!==t.race.universe))){let e="antimatter"===t.race.universe?t.prestige.Plasmid.count/5:t.prestige.AntiPlasmid.count/10;r+=Math.round(e*(t.race.nerfed?.5:1))}e*=1+r/s}if("standard"===t.race.universe&&(e*=lc("standard")),"antimatter"===t.race.universe&&(!r&&t.city.temple&&t.city.temple.count||r&&t.space.ziggurat&&t.space.ziggurat.count)){let a=.06;if(t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display){let e=t.genes.ancients>=5?.0012:t.genes.ancients>=3?.001:8e-4;t.race.high_pop&&(e=Pe(e)),a+=e*t.civic.priest.workers}e*=1+(r?t.space.ziggurat.count:t.city.temple.count)*a}!a&&t.pillars&&(e*=pc()[1]),Dr[s]={},Dr[s][i]=e}return a?Dr[s][i]*e:Math.round(Dr[s][i]*e)});var Dr;function Br(){if(t.race.no_plasmid||"antimatter"===t.race.universe){let e=!(!t.race.cataclysm&&!t.race.orbit_decayed);if(e&&t.space.ziggurat&&t.space.ziggurat.count||t.city.temple&&t.city.temple.count){let a=t.tech.anthropology&&t.tech.anthropology>=1?.016:.01;if(t.tech.fanaticism&&t.tech.fanaticism>=2){let e=t.civic.professor.workers*("antimatter"===t.race.universe?2e-4:4e-4);t.race.high_pop&&(e=Pe(e)),a+=e}if(t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display){let e=t.genes.ancients>=5?15e-5:t.genes.ancients>=3?125e-6:1e-4;t.race.high_pop&&(e=Pe(e)),a+=e*t.civic.priest.workers}"antimatter"===t.race.universe?a/=t.race.nerfed?3:2:t.race.nerfed&&(a/=2),t.race.spiritual&&(a*=1+di.spiritual.vars()[0]/100);let r=Oi("seraph");return r>0&&(a*=1+di.spiritual.vars(1)[0]/100*r),"theocracy"===t.civic.govern.type&&(a*=1.12),t.race.ooze&&(a*=1-di.ooze.vars()[1]/100),(e?t.space.ziggurat.count:t.city.temple.count)*a}}return 0}const Gr=(Rr={},function(e){let a=[t.race.universe,t.prestige.Plasmid.count,t.prestige.AntiPlasmid.count,t.prestige.Phage.count,t.civic.govern.type,t.civic.professor.assigned,t.genes.bleed||"0",t.race.decayed||"0",t.race.gene_fortify||"0",t.tech.anthropology||"0",t.tech.fanaticism||"0",t.race.nerfed||"0",t.race.no_plasmid||"0",t.genes.ancients||"0",t.city.temple?t.city.temple.count:"0",t.space.ziggurat?t.space.ziggurat.count:"0",t.civic.priest?t.civic.priest.workers:"0",t.race.orbit_decayed?t.race.orbit_decayed:"0",t.race.spiritual||"0",t.tech.outpost_boost||"0",i.alien_outpost||"0"].join("-");if(!Rr[a]){let e=0,r=0;if("antimatter"!==t.race.universe||t.genes.bleed){let a=t.race.no_plasmid?Math.min(t.race.p_mutation,t.prestige.Plasmid.count):t.prestige.Plasmid.count;"antimatter"===t.race.universe&&t.genes.bleed&&(a*=.025),t.race.decayed&&(a-=Math.round((t.stats.days-t.race.decayed)/(300+6*t.race.gene_fortify)));let r=250+t.prestige.Phage.count;e=a>r?+(Math.log(r+50)-3.91202).toFixed(5)/2.888+Math.log(a+1-r)/Math.LN2/250:a<0?0:+(Math.log(a+50)-3.91202).toFixed(5)/2.888,t.tech.outpost_boost&&t.race.truepath&&i.alien_outpost&&(e*=2);let s=0;if(t.race.orbit_decayed&&t.space.ziggurat?s=t.space.ziggurat.count:t.city.temple&&(s=t.city.temple.count),s>0&&!t.race.no_plasmid&&"antimatter"!==t.race.universe){let a=t.tech.anthropology&&t.tech.anthropology>=1?.08:.05;if(t.tech.fanaticism&&t.tech.fanaticism>=2){let e=.002*t.civic.professor.workers;t.race.high_pop&&(e=Pe(e)),a+=e}if(t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display){let e=t.genes.ancients>=5?.0015:t.genes.ancients>=3?.00125:.001;t.race.high_pop&&(e=Pe(e)),a+=e*t.civic.priest.workers}t.race.spiritual&&(a*=1+di.spiritual.vars()[0]/100);let r=Oi("seraph");r>0&&(a*=1+di.spiritual.vars(1)[0]/100*r),"theocracy"===t.civic.govern.type&&(a*=1.12),t.race.ooze&&(a*=1-di.ooze.vars()[1]/100),t.race.orbit_decayed&&t.race.truepath&&(a*=.1),e*=1+s*a}}if("antimatter"===t.race.universe||t.genes.bleed&&t.genes.bleed>=2){let e=t.prestige.AntiPlasmid.count;"antimatter"!==t.race.universe&&t.genes.bleed&&t.genes.bleed>=2&&(e*=.25),t.race.decayed&&(e-=Math.round((t.stats.days-t.race.decayed)/(300+6*t.race.gene_fortify)));let a=250+t.prestige.Phage.count;r=e>a?+(Math.log(a+50)-3.91202).toFixed(5)/2.888+Math.log(e+1-a)/Math.LN2/250:e<0?0:+(Math.log(e+50)-3.91202).toFixed(5)/2.888,t.tech.outpost_boost&&t.race.truepath&&i.alien_outpost&&(r*=2),r/=3}t.race.nerfed&&("antimatter"===t.race.universe?(e/=2,r/=2):(e/=5,r/=5)),(Rr={})[a]=[(1+e)*(1+r)-1,e,r]}return e&&"raw"===e?Rr[a]:e&&"plasmid"===e?Rr[a][1]:e&&"antiplasmid"===e?Rr[a][2]:Rr[a][0]});var Rr;const Hr={club:{id:"tech-club",title:z("tech_club"),desc:z("tech_club_desc"),category:"agriculture",era:"primitive",reqs:{},grant:["primitive",1],cost:{Lumber:()=>t.race.kindling_kindred||t.race.smoldering?0:5,Stone:()=>t.race.kindling_kindred||t.race.smoldering?5:0},action(){return!!Cs($(this)[0])&&(t.resource.Food.display=!0,!0)}},bone_tools:{id:"tech-bone_tools",title:z("tech_bone_tools"),desc:z("tech_bone_tools_desc"),category:"stone_gathering",era:"primitive",reqs:{primitive:1},grant:["primitive",2],condition:()=>!(t.race.soul_eater&&!t.race.evil),cost:{Food:()=>t.race.evil&&!t.race.smoldering?0:10,Lumber:()=>t.race.evil&&!t.race.smoldering?10:0},action(){return!!Cs($(this)[0])&&(t.resource.Stone.display=!0,t.race.smoldering&&(t.resource.Chrysotile.display=!0),!0)}},wooden_tools:{id:"tech-wooden_tools",title:()=>t.race.kindling_kindred?z("tech_bone_tools"):z("tech_wooden_tools"),desc:()=>t.race.kindling_kindred?z("tech_bone_tools_desc"):z("tech_wooden_tools_desc"),category:"stone_gathering",era:"primitive",reqs:{primitive:1},grant:["primitive",2],condition:()=>!(!t.race.soul_eater||t.race.evil),cost:{Lumber:()=>10},action(){return!!Cs($(this)[0])&&(t.resource.Stone.display=!0,t.race.smoldering&&(t.resource.Chrysotile.display=!0),!0)}},sundial:{id:"tech-sundial",title:()=>t.race.unfathomable?z("tech_moondial"):z("tech_sundial"),desc:()=>t.race.unfathomable?z("tech_moondial_desc"):z("tech_sundial_desc"),category:"science",era:"primitive",reqs:{primitive:2},grant:["primitive",3],cost:{Lumber:()=>8,Stone:()=>10},effect:()=>t.race.unfathomable?z("tech_moondial_effect"):z("tech_sundial_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_sundial_msg"),"info",!1,["progress"]),t.resource.Knowledge.display=!0,t.city.calendar.day++,t.race.infectious&&(t.civic.garrison.display=!0,t.settings.showCivic=!0,t.city.garrison={count:0,on:0}),t.race.banana&&!t.race.terrifying&&(t.settings.showResources=!0,t.settings.showMarket=!0,t.resource.Money.display=!0,t.city.market.active=!0,t.tech.currency=2),t.race.calm&&(t.resource.Zen.display=!0,t.city.meditation={count:0}),!0)}},housing:{id:"tech-housing",title:z("tech_housing"),desc:z("tech_housing_desc"),category:"housing",era:"civilized",reqs:{primitive:3},grant:["housing",1],cost:{Knowledge:()=>10},effect:z("tech_housing_effect"),action(){return!!Cs($(this)[0])&&(t.city.basic_housing={count:0},!0)}},cottage:{id:"tech-cottage",title:()=>Ks("medium"),desc:z("tech_cottage_desc"),category:"housing",era:"civilized",reqs:{housing:1,cement:1,mining:3},grant:["housing",2],cost:{Knowledge:()=>3600},effect:z("tech_cottage_effect"),action(){return!!Cs($(this)[0])&&(t.city.cottage={count:0},!0)}},apartment:{id:"tech-apartment",title:()=>Ks("large"),desc:()=>Ks("large"),category:"housing",era:"discovery",reqs:{housing:2,high_tech:2},grant:["housing",3],cost:{Knowledge:()=>15750},effect:z("tech_apartment_effect"),action(){return!!Cs($(this)[0])&&(t.city.apartment={count:0,on:0},!0)}},arcology:{id:"tech-arcology",title:z("tech_arcology"),desc:z("tech_arcology"),category:"housing",era:"dimensional",reqs:{hell_ruins:4,housing:3,high_tech:17},grant:["housing",4],cost:{Knowledge:()=>25e6},effect:()=>z("tech_arcology_effect"),action(){return!!Cs($(this)[0])&&(t.portal.arcology={count:0,on:0},!0)}},steel_beams:{id:"tech-steel_beams",title:z("tech_steel_beams"),desc:z("tech_housing_cost"),category:"housing",era:"discovery",reqs:{housing:2,smelting:2},not_trait:["cataclysm","lone_survivor"],grant:["housing_reduction",1],cost:{Knowledge:()=>11250,Steel:()=>2500},effect:()=>z("tech_steel_beams_effect",[Ks("small"),Ks("medium")]),action(){return!!Cs($(this)[0])}},mythril_beams:{id:"tech-mythril_beams",title:z("tech_mythril_beams"),desc:z("tech_housing_cost"),category:"housing",era:"early_space",reqs:{housing_reduction:1,space:3},grant:["housing_reduction",2],cost:{Knowledge:()=>175e3,Mythril:()=>1e3},effect:()=>z("tech_mythril_beams_effect",[Ks("small"),Ks("medium")]),action(){return!!Cs($(this)[0])}},neutronium_walls:{id:"tech-neutronium_walls",title:z("tech_neutronium_walls"),desc:z("tech_housing_cost"),category:"housing",era:"deep_space",reqs:{housing_reduction:2,gas_moon:1},grant:["housing_reduction",3],cost:{Knowledge:()=>3e5,Neutronium:()=>850},effect:()=>z("tech_neutronium_walls_effect",[Ks("small"),Ks("medium")]),action(){return!!Cs($(this)[0])}},bolognium_alloy_beams:{id:"tech-bolognium_alloy_beams",title:z("tech_bolognium_alloy_beams"),desc:z("tech_housing_cost"),category:"housing",era:"intergalactic",reqs:{housing_reduction:3,gateway:3},grant:["housing_reduction",4],cost:{Knowledge:()=>375e4,Adamantite:()=>25e5,Bolognium:()=>1e5},effect:()=>z("tech_bolognium_alloy_beams_effect",[Ks("small"),Ks("medium")]),action(){return!!Cs($(this)[0])}},aphrodisiac:{id:"tech-aphrodisiac",title:z("tech_aphrodisiac"),desc:z("tech_aphrodisiac_desc"),category:"housing",era:"civilized",reqs:{housing:2},grant:["reproduction",1],not_trait:["artifical"],cost:{Knowledge:()=>4500},effect:z("tech_aphrodisiac_effect"),action(){return!!Cs($(this)[0])}},fertility_clinic:{id:"tech-fertility_clinic",title:z("tech_fertility_clinic"),desc:z("tech_fertility_clinic"),category:"housing",era:"intergalactic",reqs:{reproduction:1,xeno:6},not_trait:["cataclysm"],grant:["reproduction",2],cost:{Knowledge:()=>45e5},effect:z("tech_fertility_clinic_effect"),action(){return!!Cs($(this)[0])}},captive_housing:{id:"tech-captive_housing",title:z("tech_captive_housing"),desc:z("tech_captive_housing"),category:"eldritch",era:"civilized",reqs:{housing:1},trait:["unfathomable"],grant:["unfathomable",1],cost:{Knowledge:()=>12},effect:z("tech_captive_housing_effect"),action(){return!!Cs($(this)[0])&&(t.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)}},torture:{id:"tech-torture",title:z("tech_torture"),desc:z("tech_torture"),category:"eldritch",era:"civilized",reqs:{unfathomable:1},trait:["unfathomable"],grant:["unfathomable",2],cost:{Knowledge:()=>25},effect:z("tech_torture_effect"),action(){return!!Cs($(this)[0])&&(t.civic.torturer.display=!0,!0)}},thrall_quarters:{id:"tech-thrall_quarters",title:z("tech_thrall_quarters"),desc:z("tech_thrall_quarters"),category:"eldritch",era:"civilized",reqs:{unfathomable:2,high_tech:6},trait:["unfathomable"],grant:["unfathomable",3],cost:{Knowledge:()=>95e3,Cement:()=>5e4,Wrought_Iron:()=>12500},effect:z("tech_thrall_quarters_effect"),action(){return!!Cs($(this)[0])&&(t.civic.torturer.display=!0,!0)}},psychic_energy:{id:"tech-psychic_energy",title:z("tech_psychic_energy"),desc:z("tech_psychic_energy"),category:"eldritch",era:"civilized",reqs:{housing:1},condition:()=>t.settings.showCivic,trait:["psychic"],grant:["psychic",1],cost:{Knowledge:()=>15},effect:z("tech_psychic_energy_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Energy.display=!0,t.settings.showPsychic=!0,t.race.psychicPowers={boost:{r:"Food"},boostTime:0},!0)},post(){Ai()}},psychic_attack:{id:"tech-psychic_attack",title:z("tech_psychic_attack"),desc:z("tech_psychic_attack"),category:"eldritch",era:"civilized",reqs:{psychic:1,military:1},condition:()=>t.stats.psykill>=10,trait:["psychic"],grant:["psychic",2],cost:{Knowledge:()=>100},effect:z("tech_psychic_attack_effect"),action(){return!!Cs($(this)[0])&&(t.race.psychicPowers.assaultTime=0,!0)},post(){Ai()}},psychic_finance:{id:"tech-psychic_finance",title:z("tech_psychic_finance"),desc:z("tech_psychic_finance"),category:"eldritch",era:"civilized",reqs:{psychic:2,high_tech:4},trait:["psychic"],grant:["psychic",3],cost:{Knowledge:()=>65e3},effect:z("tech_psychic_finance_effect"),action(){return!!Cs($(this)[0])&&(t.race.psychicPowers.cash=0,!0)},post(){Ai()}},psychic_channeling:{id:"tech-psychic_channeling",title:z("tech_psychic_channeling"),desc:z("tech_psychic_channeling"),category:"eldritch",era:"deep_space",reqs:{psychic:3,high_tech:10},trait:["psychic"],grant:["psychic",4],cost:{Knowledge:()=>36e4},effect:z("tech_psychic_channeling_effect"),action(){return!!Cs($(this)[0])&&(t.race.psychicPowers.channel={cash:0,assault:0,boost:0},!0)},post(){Ai()}},psychic_efficiency:{id:"tech-psychic_efficiency",title:z("tech_psychic_efficiency"),desc:z("tech_psychic_efficiency"),category:"eldritch",era:"intergalactic",reqs:{psychic:4,high_tech:16},trait:["psychic"],grant:["psychic",5],cost:{Knowledge:()=>525e4},effect:z("tech_psychic_efficiency_effect"),action(){return!!Cs($(this)[0])},post(){Ai()}},mind_break:{id:"tech-mind_break",title:z("tech_mind_break"),desc:z("tech_mind_break"),category:"eldritch",era:"civilized",reqs:{psychic:2,high_tech:1,unfathomable:2},trait:["psychic"],grant:["psychicthrall",1],cost:{Knowledge:()=>7e3},effect:z("tech_mind_break_effect"),action(){return!!Cs($(this)[0])},post(){Ai()}},psychic_stun:{id:"tech-psychic_stun",title:z("tech_psychic_stun"),desc:z("tech_psychic_stun"),category:"eldritch",era:"civilized",reqs:{psychicthrall:1,high_tech:3,unfathomable:2},trait:["psychic"],grant:["psychicthrall",2],cost:{Knowledge:()=>32e3},effect:z("tech_psychic_stun_effect"),action(){return!!Cs($(this)[0])},post(){Ai()}},spear:{id:"tech-spear",title:z("tech_spear"),desc:z("tech_spear_desc"),category:"foraging",era:"civilized",reqs:{primitive:3,storage:1},trait:["forager"],grant:["foraging",1],cost:{Knowledge:()=>110,Stone:()=>75},effect:z("tech_spear_effect"),action(){return!!Cs($(this)[0])}},bronze_spear:{id:"tech-bronze_spear",title:z("tech_bronze_spear"),desc:z("tech_bronze_spear_desc"),category:"foraging",era:"civilized",reqs:{foraging:1,mining:2},trait:["forager"],grant:["foraging",2],cost:{Knowledge:()=>525,Copper:()=>50},effect:z("tech_bronze_spear_effect"),action(){return!!Cs($(this)[0])}},iron_spear:{id:"tech-iron_spear",title:z("tech_iron_spear"),desc:z("tech_iron_spear_desc"),category:"foraging",era:"civilized",reqs:{foraging:2,mining:3},trait:["forager"],grant:["foraging",3],cost:{Knowledge:()=>t.city.ptrait.includes("unstable")?1650:3300,Iron:()=>375},effect:z("tech_bronze_spear_effect"),action(){return!!Cs($(this)[0])}},dowsing_rod:{id:"tech-dowsing_rod",title:z("tech_dowsing_rod"),desc:z("tech_dowsing_rod_desc"),category:"foraging",era:"civilized",reqs:{foraging:1,mining:2},trait:["forager"],grant:["dowsing",1],cost:{Knowledge:()=>450,Lumber:()=>750},effect:z("tech_dowsing_rod_effect"),action(){return!!Cs($(this)[0])}},metal_detector:{id:"tech-metal_detector",title:z("tech_metal_detector"),desc:z("tech_metal_detector_desc"),category:"foraging",era:"civilized",reqs:{dowsing:1,high_tech:4},trait:["forager"],grant:["dowsing",2],cost:{Knowledge:()=>65e3},effect:z("tech_metal_detector_effect"),action(){return!!Cs($(this)[0])}},smokehouse:{id:"tech-smokehouse",title:()=>t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?z("city_smokehouse_easter"):z("tech_smokehouse"),desc:()=>t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?z("tech_smokehouse_easter_desc"):z("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:()=>80},effect:()=>t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?z("tech_smokehouse_easter_effect"):z("tech_smokehouse_effect"),action(){return!!Cs($(this)[0])&&(fi("city","smokehouse","silo",{count:0}),!0)},post(){t.tech.s_lodge&&(t.tech.hunting=2)}},lodge:{id:"tech-lodge",title:z("tech_lodge"),desc:z("tech_lodge"),wiki:!!t.race.carnivore,category:"agriculture",era:"civilized",reqs:{hunting:1,housing:1,currency:1},condition:()=>!t.tech.s_lodge,grant:["hunting",2],cost:{Knowledge:()=>180},effect:z("tech_lodge_effect"),action(){return!!Cs($(this)[0])&&(fi("city","lodge","farm",{count:0}),!0)}},alt_lodge:{id:"tech-alt_lodge",title(){return this.condition()?z("tech_lodge_alt"):z("tech_lodge")},desc(){return this.condition()?z("tech_lodge_alt"):z("tech_lodge")},wiki:!t.race.carnivore,category:"housing",era:"civilized",reqs:{housing:1,currency:1},grant:["s_lodge",1],condition:()=>!!(("wendigo"===t.race.species||t.race.detritivore)&&!t.race.carnivore&&!t.race.herbivore||t.race.carnivore&&t.race.soul_eater||t.race.artifical||t.race.unfathomable),cost:{Knowledge:()=>t.race.artifical?1e4:180},effect(){return this.condition()?z("tech_lodge_effect_alt"):z("tech_lodge_effect")},action(){return!!Cs($(this)[0])&&(fi("city","lodge","farm",{count:0}),!0)}},soul_well:{id:"tech-soul_well",title:z("tech_soul_well"),desc:z("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:()=>10},effect:z("tech_soul_well_effect"),action(){return!!Cs($(this)[0])&&(t.city.soul_well={count:0},!0)}},compost:{id:"tech-compost",title:z("tech_compost"),desc:z("tech_compost_desc"),category:"compost",era:"civilized",reqs:{primitive:3},trait:["detritivore"],not_trait:["cataclysm","artifical","lone_survivor"],grant:["compost",1],cost:{Knowledge:()=>10},effect:z("tech_compost_effect"),action(){return!!Cs($(this)[0])&&(t.city.compost={count:0,on:0},!0)}},hot_compost:{id:"tech-hot_compost",title:z("tech_hot_compost"),desc:z("tech_hot_compost"),category:"compost",era:"civilized",reqs:{compost:1},trait:["detritivore"],grant:["compost",2],cost:{Knowledge:()=>100},effect:z("tech_hot_compost_effect"),action(){return!!Cs($(this)[0])}},mulching:{id:"tech-mulching",title:z("tech_mulching"),desc:z("tech_mulching"),category:"compost",era:"civilized",reqs:{compost:2,mining:3},trait:["detritivore"],grant:["compost",3],cost:{Knowledge:()=>3200},effect:z("tech_mulching_effect"),action(){return!!Cs($(this)[0])}},adv_mulching:{id:"tech-adv_mulching",title:z("tech_adv_mulching"),desc:z("tech_adv_mulching"),category:"compost",era:"discovery",reqs:{compost:3,high_tech:2},trait:["detritivore"],grant:["compost",4],cost:{Knowledge:()=>16e3},effect:z("tech_adv_mulching_effect"),action(){return!!Cs($(this)[0])}},agriculture:{id:"tech-agriculture",title:z("tech_agriculture"),desc:z("tech_agriculture_desc"),category:"agriculture",era:"civilized",reqs:{primitive:3},condition:()=>!(!t.race.herbivore&&(t.race.carnivore||t.race.detritivore||t.race.soul_eater)),not_trait:["cataclysm","artifical","lone_survivor","unfathomable"],grant:["agriculture",1],cost:{Knowledge:()=>10},effect:z("tech_agriculture_effect"),action(){return!!Cs($(this)[0])&&(fi("city","farm","lodge",{count:0}),!0)}},farm_house:{id:"tech-farm_house",title:z("tech_farm_house"),desc:z("tech_farm_house_desc"),category:"housing",era:"civilized",reqs:{agriculture:1,housing:1,currency:1},grant:["farm",1],cost:{Money:()=>50,Knowledge:()=>180},effect:z("tech_farm_house_effect"),action(){return!!Cs($(this)[0])}},irrigation:{id:"tech-irrigation",title:z("tech_irrigation"),desc:z("tech_irrigation_desc"),category:"agriculture",era:"civilized",reqs:{agriculture:1},grant:["agriculture",2],cost:{Knowledge:()=>55},effect:z("tech_irrigation_effect"),action(){return!!Cs($(this)[0])}},silo:{id:"tech-silo",title:z("tech_silo"),desc:z("tech_silo_desc"),category:"storage",era:"civilized",reqs:{agriculture:2,storage:1},grant:["agriculture",3],cost:{Knowledge:()=>80},effect:z("tech_silo_effect"),action(){return!!Cs($(this)[0])&&(fi("city","silo","smokehouse",{count:0}),!0)}},mill:{id:"tech-mill",title:z("tech_mill"),desc:z("tech_mill_desc"),category:"agriculture",era:"civilized",reqs:{agriculture:3,mining:3},grant:["agriculture",4],cost:{Knowledge:()=>5400},effect:z("tech_mill_effect"),action(){return!!Cs($(this)[0])&&(fi("city","mill","windmill",{count:0,on:0}),!0)}},windmill:{id:"tech-windmill",title:z("tech_windmill"),desc:z("tech_windmill_desc"),category:"agriculture",era:"discovery",reqs:{agriculture:4,high_tech:1},grant:["agriculture",5],cost:{Knowledge:()=>16200},effect:z("tech_windmill_effect"),action(){return!!Cs($(this)[0])}},windturbine:{id:"tech-windturbine",title:z("tech_windturbine"),desc:z("tech_windturbine"),category:"power_generation",era:"globalized",reqs:{agriculture:5,high_tech:4},grant:["agriculture",6],cost:{Knowledge:()=>66e3},effect:z("tech_windturbine_effect"),action(){return!!Cs($(this)[0])}},wind_plant:{id:"tech-wind_plant",title:()=>t.race.unfathomable?z("tech_watermill"):z("tech_windmill"),desc:()=>t.race.unfathomable?z("tech_watermill"):z("tech_windmill"),category:"power_generation",era:"globalized",reqs:{high_tech:4},condition:()=>!!(t.race.carnivore||t.race.detritivore||t.race.artifical||t.race.soul_eater||t.race.unfathomable),not_trait:["herbivore"],grant:["wind_plant",1],cost:{Knowledge:()=>66e3},effect:()=>t.race.unfathomable?z("tech_watermill_effect"):z("tech_wind_plant_effect"),action(){return!!Cs($(this)[0])&&(fi("city","windmill","mill",{count:0,on:0}),!0)}},gmfood:{id:"tech-gmfood",title:z("tech_gmfood"),desc:z("tech_gmfood_desc"),category:"agriculture",era:"globalized",reqs:{agriculture:6,genetics:1},grant:["agriculture",7],cost:{Knowledge:()=>95e3},effect:z("tech_gmfood_effect"),action(){return!!Cs($(this)[0])}},foundry:{id:"tech-foundry",title:z("tech_foundry"),desc:z("tech_foundry"),category:"crafting",era:"civilized",reqs:{mining:2},grant:["foundry",1],cost:{Knowledge:()=>650},effect:z("tech_foundry_effect"),action(){return!!Cs($(this)[0])&&(t.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)}},artisans:{id:"tech-artisans",title:z("tech_artisans"),desc:z("tech_artisans"),category:"crafting",era:"civilized",reqs:{foundry:1},grant:["foundry",2],cost:{Knowledge:()=>1500},effect:z("tech_artisans_effect"),action(){return!!Cs($(this)[0])}},apprentices:{id:"tech-apprentices",title:z("tech_apprentices"),desc:z("tech_apprentices"),category:"crafting",era:"civilized",reqs:{foundry:2},grant:["foundry",3],cost:{Knowledge:()=>3200},effect:z("tech_apprentices_effect"),action(){return!!Cs($(this)[0])}},carpentry:{id:"tech-carpentry",title:z("tech_carpentry"),desc:z("tech_carpentry"),category:"crafting",era:"civilized",reqs:{foundry:3,saw:1},grant:["foundry",4],not_trait:["evil"],cost:{Knowledge:()=>5200},effect:z("tech_carpentry_effect"),action(){return!!Cs($(this)[0])}},demonic_craftsman:{id:"tech-demonic_craftsman",title:z("tech_master_craftsman"),desc:z("tech_master_craftsman"),category:"crafting",era:"discovery",wiki:!!t.race.evil,reqs:{foundry:3},grant:["foundry",5],trait:["evil"],cost:{Knowledge:()=>12e3},effect:z("tech_master_craftsman_effect"),action(){return!!Cs($(this)[0])}},master_craftsman:{id:"tech-master_craftsman",title:z("tech_master_craftsman"),desc:z("tech_master_craftsman"),category:"crafting",era:"discovery",wiki:!t.race.evil,reqs:{foundry:4},grant:["foundry",5],not_trait:["evil"],cost:{Knowledge:()=>12e3},effect:z("tech_master_craftsman_effect"),action(){return!!Cs($(this)[0])}},brickworks:{id:"tech-brickworks",title:z("tech_brickworks"),desc:z("tech_brickworks"),category:"crafting",era:"discovery",reqs:{foundry:5},grant:["foundry",6],cost:{Knowledge:()=>18500},effect:z("tech_brickworks_effect"),action(){return!!Cs($(this)[0])}},machinery:{id:"tech-machinery",title:z("tech_machinery"),desc:z("tech_machinery"),category:"crafting",era:"globalized",reqs:{foundry:6,high_tech:4},grant:["foundry",7],cost:{Knowledge:()=>66e3},effect:z("tech_machinery_effect"),action(){return!!Cs($(this)[0])}},cnc_machine:{id:"tech-cnc_machine",title:z("tech_cnc_machine"),desc:z("tech_cnc_machine"),category:"crafting",era:"globalized",reqs:{foundry:7,high_tech:8},grant:["foundry",8],cost:{Knowledge:()=>132e3},effect:z("tech_cnc_machine_effect"),action(){return!!Cs($(this)[0])}},vocational_training:{id:"tech-vocational_training",title:z("tech_vocational_training"),desc:z("tech_vocational_training"),category:"crafting",era:"industrialized",reqs:{foundry:1,high_tech:3},grant:["v_train",1],cost:{Knowledge:()=>3e4},effect:z("tech_vocational_training_effect"),action(){return!!Cs($(this)[0])}},stellar_forge:{id:"tech-stellar_forge",title:z("tech_stellar_forge"),desc:z("tech_stellar_forge"),category:"crafting",era:"intergalactic",reqs:{foundry:8,high_tech:15,gateway:3,neutron:1},grant:["star_forge",1],cost:{Knowledge:()=>45e5},effect:z("tech_stellar_forge_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.stellar_forge={count:0,on:0},!0)}},stellar_smelting:{id:"tech-stellar_smelting",title:z("tech_stellar_smelting"),desc:z("tech_stellar_smelting"),category:"crafting",era:"intergalactic",reqs:{star_forge:1,xeno:4},grant:["star_forge",2],cost:{Knowledge:()=>5e6,Vitreloy:()=>1e4},effect:z("tech_stellar_smelting_effect"),action(){return!!Cs($(this)[0])},post(){Qs()}},assembly_line:{id:"tech-assembly_line",title:z("tech_assembly_line"),desc:z("tech_assembly_line"),category:"crafting",era:"globalized",reqs:{high_tech:4},grant:["factory",1],cost:{Knowledge:()=>72e3,Copper:()=>125e3},effect:`${z("tech_assembly_line_effect")} ${z("tech_factory_warning")}`,action(){return!!Cs($(this)[0])}},automation:{id:"tech-automation",title:z("tech_automation"),desc:z("tech_automation"),category:"crafting",era:"early_space",reqs:{high_tech:8,factory:1},grant:["factory",2],cost:{Knowledge:()=>165e3},effect:`${z("tech_automation_effect")} ${z("tech_factory_warning")}`,action(){return!!Cs($(this)[0])}},laser_cutters:{id:"tech-laser_cutters",title:z("tech_laser_cutters"),desc:z("tech_laser_cutters"),category:"crafting",era:"deep_space",reqs:{high_tech:9,factory:2},grant:["factory",3],cost:{Knowledge:()=>3e5,Elerium:()=>200},effect:`${z("tech_laser_cutters_effect")} ${z("tech_factory_warning")}`,action(){return!!Cs($(this)[0])}},high_tech_factories:{id:"tech-high_tech_factories",title:z("tech_high_tech_factories"),desc:z("tech_high_tech_factories"),category:"crafting",era:"intergalactic",reqs:{high_tech:17,alpha:4,factory:3},grant:["factory",4],cost:{Knowledge:()=>135e5,Vitreloy:()=>5e5,Orichalcum:()=>3e5},effect:`${z("tech_high_tech_factories_effect")} ${z("tech_factory_warning")}`,action(){return!!Cs($(this)[0])}},theatre:{id:"tech-theatre",title:z("tech_theatre"),desc:z("tech_theatre"),category:"entertainment",era:"civilized",reqs:{housing:1,currency:1,cement:1},grant:["theatre",1],not_trait:["joyless"],cost:{Knowledge:()=>750},effect:z("tech_theatre_effect"),action(){return!!Cs($(this)[0])&&(t.city.amphitheatre={count:0},!0)}},playwright:{id:"tech-playwright",title:z("tech_playwright"),desc:z("tech_playwright"),category:"entertainment",era:"civilized",reqs:{theatre:1,science:2},grant:["theatre",2],cost:{Knowledge:()=>1080},effect:z("tech_playwright_effect"),action(){return!!Cs($(this)[0])}},magic:{id:"tech-magic",title:()=>"magic"===t.race.universe?z("tech_illusionist"):z("tech_magic"),desc:()=>"magic"===t.race.universe?z("tech_illusionist"):z("tech_magic"),category:"entertainment",era:"discovery",reqs:{theatre:2,high_tech:1},grant:["theatre",3],cost:{Knowledge:()=>7920},effect:z("tech_magic_effect"),effect:()=>"magic"===t.race.universe?z("tech_illusionist_effect"):z("tech_magic_effect"),action(){return!!Cs($(this)[0])}},superstars:{id:"tech-superstars",title:z("tech_superstars"),desc:z("tech_superstars"),category:"entertainment",era:"interstellar",reqs:{theatre:3,high_tech:12},grant:["superstar",1],cost:{Knowledge:()=>66e4},effect:z("tech_superstars_effect"),action(){return!!Cs($(this)[0])}},radio:{id:"tech-radio",title:z("tech_radio"),desc:z("tech_radio"),category:"entertainment",era:"discovery",reqs:{theatre:3,high_tech:2},grant:["broadcast",1],cost:{Knowledge:()=>16200},effect:()=>z("tech_radio_effect",[Es()]),action(){return!!Cs($(this)[0])}},tv:{id:"tech-tv",title:z("tech_tv"),desc:z("tech_tv"),category:"entertainment",era:"globalized",reqs:{broadcast:1,high_tech:4},grant:["broadcast",2],cost:{Knowledge:()=>67500},effect:()=>z("tech_tv_effect",[Es()]),action(){return!!Cs($(this)[0])}},vr_center:{id:"tech-vr_center",title:z("tech_vr_center"),desc:z("tech_vr_center"),category:"entertainment",era:"interstellar",reqs:{broadcast:2,high_tech:12,stanene:1},grant:["broadcast",3],cost:{Knowledge:()=>62e4},effect:()=>z("tech_vr_center_effect"),action(){return!!Cs($(this)[0])&&(t.space.vr_center={count:0,on:0},!0)}},zoo:{id:"tech-zoo",title:z("tech_zoo"),desc:z("tech_zoo"),category:"entertainment",era:"dimensional",reqs:{hell_ruins:2},grant:["zoo",1],cost:{Knowledge:()=>225e5},effect:()=>z("tech_zoo_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.zoo={count:0,on:0},!0)}},casino:{id:"tech-casino",title:z("tech_casino"),desc:z("tech_casino"),category:"entertainment",era:"globalized",reqs:{high_tech:4,currency:5},grant:["gambling",1],cost:{Knowledge:()=>95e3},effect:z("tech_casino_effect"),action(){return!!Cs($(this)[0])&&(t.city.casino={count:0,on:0},t.space.spc_casino={count:0,on:0},!0)}},dazzle:{id:"tech-dazzle",title:z("tech_dazzle"),desc:z("tech_dazzle"),category:"banking",era:"globalized",reqs:{gambling:1},grant:["gambling",2],cost:{Knowledge:()=>125e3},effect:z("tech_dazzle_effect"),action(){return!!Cs($(this)[0])}},casino_vault:{id:"tech-casino_vault",title:z("tech_casino_vault"),desc:z("tech_casino_vault"),category:"banking",era:"early_space",reqs:{gambling:2,space:3},grant:["gambling",3],cost:{Knowledge:()=>145e3,Iridium:()=>2500},effect:z("tech_casino_vault_effect"),action(){return!!Cs($(this)[0])}},otb:{id:"tech-otb",title:z("tech_otb"),desc:z("tech_otb"),category:"banking",era:"deep_space",reqs:{gambling:3,banking:10,high_tech:10},grant:["gambling",4],cost:{Knowledge:()=>39e4},effect:z("tech_otb_effect"),action(){return!!Cs($(this)[0])}},online_gambling:{id:"tech-online_gambling",title:z("tech_online_gambling"),desc:z("tech_online_gambling"),category:"banking",era:"interstellar",reqs:{gambling:4,banking:12},grant:["gambling",5],cost:{Knowledge:()=>8e5},effect:z("tech_online_gambling_effect"),action(){return!!Cs($(this)[0])}},bolognium_vaults:{id:"tech-bolognium_vaults",title:z("tech_bolognium_vaults"),desc:z("tech_bolognium_vaults"),category:"banking",era:"intergalactic",reqs:{gambling:5,gateway:3},grant:["gambling",6],cost:{Knowledge:()=>39e5,Bolognium:()=>18e4},effect:z("tech_bolognium_vaults_effect"),action(){return!!Cs($(this)[0])}},mining:{id:"tech-mining",title:()=>t.race.sappy?z("tech_amber"):z("tech_mining"),desc:()=>t.race.sappy?z("tech_amber"):z("tech_mining_desc"),category:"mining",era:"civilized",reqs:{primitive:3},grant:["mining",1],cost:{Knowledge:()=>45},effect:()=>t.race.sappy?z("tech_amber_effect"):z(t.race.flier?"tech_mining_effect_alt":"tech_mining_effect"),action(){return!!Cs($(this)[0])&&(t.city.rock_quarry={count:0,on:0,asbestos:50},t.race.cannibalize&&(t.city.s_alter={count:0,rage:0,mind:0,regen:0,mine:0,harvest:0}),!0)}},bayer_process:{id:"tech-bayer_process",title:z("tech_bayer_process"),desc:z("tech_bayer_process_desc"),category:"mining",era:"civilized",reqs:{smelting:2},grant:["alumina",1],cost:{Knowledge:()=>4500},effect:()=>t.race.sappy?z("tech_bayer_process_effect_alt"):z("tech_bayer_process_effect"),action(){return!!Cs($(this)[0])&&(t.city.metal_refinery={count:0,on:0},ma(),!0)}},elysis_process:{id:"tech-elysis_process",title:z("tech_elysis_process"),desc:z("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:()=>675e3,Graphene:()=>45e3,Stanene:()=>75e3},effect:z("tech_elysis_process_effect"),action(){return!!Cs($(this)[0])}},smelting:{id:"tech-smelting",title:z("tech_smelting"),desc:z("tech_smelting_desc"),category:"mining",era:"civilized",reqs:{mining:3},grant:["smelting",1],cost:{Knowledge:()=>4050},effect:z("tech_smelting_effect"),action(){return!!Cs($(this)[0])&&(t.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)},post(){t.race.steelen&&(t.tech.smelting=2,gs())}},steel:{id:"tech-steel",title:z("tech_steel"),desc:z("tech_steel_desc"),category:"mining",era:"civilized",reqs:{smelting:1,mining:4},grant:["smelting",2],condition:()=>!t.race.steelen,cost:{Knowledge:()=>4950,Steel:()=>25},effect:z("tech_steel_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Steel.display=!0,!0)},post(){Qs(),Ai()}},blast_furnace:{id:"tech-blast_furnace",title:z("tech_blast_furnace"),desc:z("tech_blast_furnace"),category:"mining",era:"discovery",reqs:{smelting:2},grant:["smelting",3],cost:{Knowledge:()=>13500,Coal:()=>2e3},effect:z("tech_blast_furnace_effect"),action(){return!!Cs($(this)[0])},post(){t.race.steelen&&(t.tech.smelting=6,gs())}},bessemer_process:{id:"tech-bessemer_process",title:z("tech_bessemer_process"),desc:z("tech_bessemer_process"),category:"mining",era:"discovery",reqs:{smelting:3},grant:["smelting",4],condition:()=>!t.race.steelen,cost:{Knowledge:()=>19800,Coal:()=>5e3},effect:z("tech_bessemer_process_effect"),action(){return!!Cs($(this)[0])}},oxygen_converter:{id:"tech-oxygen_converter",title:z("tech_oxygen_converter"),desc:z("tech_oxygen_converter"),category:"mining",era:"industrialized",reqs:{smelting:4,high_tech:3},grant:["smelting",5],condition:()=>!t.race.steelen,cost:{Knowledge:()=>46800,Coal:()=>1e4},effect:z("tech_oxygen_converter_effect"),action(){return!!Cs($(this)[0])}},electric_arc_furnace:{id:"tech-electric_arc_furnace",title:z("tech_electric_arc_furnace"),desc:z("tech_electric_arc_furnace"),category:"mining",era:"globalized",reqs:{smelting:5,high_tech:4},grant:["smelting",6],condition:()=>!t.race.steelen,cost:{Knowledge:()=>85500,Copper:()=>25e3},effect:z("tech_electric_arc_furnace_effect"),action(){return!!Cs($(this)[0])}},hellfire_furnace:{id:"tech-hellfire_furnace",title:z("tech_hellfire_furnace"),desc:z("tech_hellfire_furnace"),category:"mining",era:"interstellar",reqs:{smelting:6,infernite:1},grant:["smelting",7],cost:{Knowledge:()=>615e3,Infernite:()=>2e3,Soul_Gem:()=>2},effect:z("tech_hellfire_furnace_effect"),action(){return!!Cs($(this)[0])}},infernium_fuel:{id:"tech-infernium_fuel",title:z("tech_infernium_fuel"),desc:z("tech_infernium_fuel"),category:"mining",era:"dimensional",reqs:{smelting:7,hell_ruins:4},grant:["smelting",8],cost:{Knowledge:()=>275e5,Coal:()=>45e6,Oil:()=>5e5,Infernite:()=>75e4},effect:z("tech_infernium_fuel_effect"),action(){return!!Cs($(this)[0])},post(){Qs()}},iridium_smelting_perk:{id:"tech-iridium_smelting_perk",title:z("tech_iridium_smelting"),desc:z("tech_iridium_smelting"),category:"mining",era:"early_space",path:["standard"],reqs:{smelting:6,space:3},condition:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=3),grant:["irid_smelting",1],cost:{Knowledge:()=>35e4,Mythril:()=>2500},effect:z("tech_iridium_smelting_effect"),action(){return!!Cs($(this)[0])}},rotary_kiln:{id:"tech-rotary_kiln",title:z("tech_rotary_kiln"),desc:z("tech_rotary_kiln"),category:"mining",era:"industrialized",reqs:{smelting:3,high_tech:3},grant:["copper",1],cost:{Knowledge:()=>57600,Coal:()=>8e3},effect:z("tech_rotary_kiln_effect"),action(){return!!Cs($(this)[0])}},metal_working:{id:"tech-metal_working",title:z("tech_metal_working"),desc:z("tech_metal_working_desc"),category:"mining",era:"civilized",reqs:{mining:1},grant:["mining",2],cost:{Knowledge:()=>350},effect:z("tech_metal_working_effect"),action(){return!!Cs($(this)[0])&&(t.city.mine={count:0,on:0},!0)}},iron_mining:{id:"tech-iron_mining",title:z("tech_iron_mining"),desc:z("tech_iron_mining_desc"),category:"mining",era:"civilized",reqs:{mining:2},grant:["mining",3],cost:{Knowledge:()=>t.city.ptrait.includes("unstable")?500:2500},effect:z("tech_iron_mining_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Iron.display=!0,t.city.foundry&&t.city.foundry.count>0&&(t.resource.Wrought_Iron.display=!0,ma()),!0)},post(){Ai()}},coal_mining:{id:"tech-coal_mining",title:z("tech_coal_mining"),desc:z("tech_coal_mining_desc"),category:"power_generation",era:"civilized",reqs:{mining:3},grant:["mining",4],cost:{Knowledge:()=>4320},effect:z("tech_coal_mining_effect"),action(){return!!Cs($(this)[0])&&(t.city.coal_mine={count:0,on:0},t.resource.Coal.display=!0,!0)},post(){Ai()}},storage:{id:"tech-storage",title:z("tech_storage"),desc:z("tech_storage_desc"),category:"storage",era:"civilized",reqs:{primitive:3,currency:1},grant:["storage",1],cost:{Knowledge:()=>20},effect:z("tech_storage_effect"),action(){return!!Cs($(this)[0])&&(t.city.shed={count:0},!0)}},reinforced_shed:{id:"tech-reinforced_shed",title:z("tech_reinforced_shed"),desc:z("tech_reinforced_shed_desc"),category:"storage",era:"civilized",reqs:{storage:1,cement:1,mining:3},grant:["storage",2],cost:{Money:()=>3750,Knowledge:()=>2550,Iron:()=>750,Cement:()=>500},effect:z("tech_reinforced_shed_effect"),action(){return!!Cs($(this)[0])}},barns:{id:"tech-barns",title:z("tech_barns"),desc:z("tech_barns_desc"),category:"storage",era:"discovery",reqs:{storage:2,smelting:2,alumina:1},grant:["storage",3],cost:{Knowledge:()=>15750,Aluminium:()=>3e3,Steel:()=>3e3},effect:z("tech_barns_effect"),action(){return!!Cs($(this)[0])},post(){Ls(!1,["city-shed"])}},warehouse:{id:"tech-warehouse",title:z("tech_warehouse"),desc:z("tech_warehouse_desc"),category:"storage",era:"industrialized",reqs:{storage:3,high_tech:3,smelting:2},grant:["storage",4],cost:{Knowledge:()=>40500,Titanium:()=>3e3},effect:z("tech_warehouse_effect"),action(){return!!Cs($(this)[0])},post(){Ls(!1,["city-shed"])}},cameras:{id:"tech-cameras",title:z("tech_cameras"),desc:z("tech_cameras_desc"),category:"storage",era:"globalized",reqs:{storage:4,high_tech:4},grant:["storage",5],cost:{Money:()=>9e4,Knowledge:()=>65e3},effect:z("tech_cameras_effect"),action(){return!!Cs($(this)[0])}},pocket_dimensions:{id:"tech-pocket_dimensions",title:z("tech_pocket_dimensions"),desc:z("tech_pocket_dimensions_desc"),category:"storage",era:"early_space",path:["standard"],reqs:{particles:1,storage:5},grant:["storage",6],cost:{Knowledge:()=>108e3},effect:z("tech_pocket_dimensions_effect"),action(){return!!Cs($(this)[0])}},ai_logistics:{id:"tech-ai_logistics",title:z("tech_ai_logistics"),desc:z("tech_ai_logistics"),category:"storage",era:"interstellar",reqs:{storage:6,proxima:2,science:13},grant:["storage",7],cost:{Knowledge:()=>65e4},effect:z("tech_ai_logistics_effect"),action(){return!!Cs($(this)[0])}},containerization:{id:"tech-containerization",title:z("tech_containerization"),desc:z("tech_containerization_desc"),category:"storage",era:"civilized",reqs:{cement:1,mining:1,storage:1,science:1},grant:["container",1],cost:{Knowledge:()=>2700},effect:z("tech_containerization_effect"),action(){return!!Cs($(this)[0])&&(t.city.storage_yard={count:0},!0)}},reinforced_crates:{id:"tech-reinforced_crates",title:z("tech_reinforced_crates"),desc:z("tech_reinforced_crates"),category:"storage",era:"civilized",reqs:{container:1,smelting:2},grant:["container",2],cost:{Knowledge:()=>6750,Sheet_Metal:()=>100},effect(){if(t.race.smoldering||t.race.kindling_kindred||t.race.evil){let e=z("resource_Bones_name");return t.race.smoldering?e=z("resource_Chrysotile_name"):t.race.kindling_kindred&&(e=z("resource_Stone_name")),z("tech_reinforced_crates_alt_effect",[e])}return z("tech_reinforced_crates_effect")},action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},cranes:{id:"tech-cranes",title:z("tech_cranes"),desc:z("tech_cranes_desc"),category:"storage",era:"discovery",reqs:{container:2,high_tech:2},grant:["container",3],cost:{Knowledge:()=>18e3,Copper:()=>1e3,Steel:()=>2500},effect:z("tech_cranes_effect"),action(){return!!Cs($(this)[0])}},titanium_crates:{id:"tech-titanium_crates",title:()=>z("tech_titanium_crates",[t.resource.Titanium.name]),desc:()=>z("tech_titanium_crates",[t.resource.Titanium.name]),category:"storage",era:"globalized",reqs:{container:3,titanium:1},grant:["container",4],cost:{Knowledge:()=>67500,Titanium:()=>1e3},effect:()=>z("tech_titanium_crates_effect",[t.resource.Titanium.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},mythril_crates:{id:"tech-mythril_crates",title:()=>z("tech_mythril_crates",[t.resource.Mythril.name]),desc:()=>z("tech_mythril_crates",[t.resource.Mythril.name]),category:"storage",era:"early_space",reqs:{container:4,space:3},grant:["container",5],cost:{Knowledge:()=>145e3,Mythril:()=>350},effect:()=>z("tech_mythril_crates_effect",[t.resource.Mythril.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},infernite_crates:{id:"tech-infernite_crates",title:()=>z("tech_crates",[t.resource.Infernite.name]),desc:()=>z("tech_infernite_crates_desc",[t.resource.Infernite.name]),category:"storage",era:"interstellar",reqs:{container:5,infernite:1},grant:["container",6],cost:{Knowledge:()=>575e3,Infernite:()=>1e3},effect:()=>z("tech_infernite_crates_effect",[t.resource.Infernite.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},graphene_crates:{id:"tech-graphene_crates",title:()=>z("tech_crates",[t.resource.Graphene.name]),desc:()=>z("tech_crates",[t.resource.Graphene.name]),category:"storage",era:"interstellar",path:["standard","truepath"],reqs:{container:6,graphene:1},grant:["container",7],cost:{Knowledge:()=>725e3,Graphene:()=>75e3},effect:()=>z("tech_graphene_crates_effect",[t.resource.Graphene.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},bolognium_crates:{id:"tech-bolognium_crates",title:()=>z("tech_crates",[t.resource.Bolognium.name]),desc:()=>z("tech_crates",[t.resource.Bolognium.name]),category:"storage",era:"intergalactic",reqs:{container:7,gateway:3},grant:["container",8],cost:{Knowledge:()=>342e4,Bolognium:()=>9e4},effect:()=>z("tech_bolognium_crates_effect",[t.resource.Bolognium.name]),action(){return!!Cs($(this)[0])}},steel_containers:{id:"tech-steel_containers",title:()=>z("tech_containers",[t.resource.Steel.name]),desc:()=>z("tech_steel_containers_desc",[t.resource.Steel.name]),category:"storage",era:"discovery",reqs:{smelting:2,container:1},grant:["steel_container",1],cost:{Knowledge:()=>9e3,Steel:()=>250},effect(){if(t.race.smoldering||t.race.kindling_kindred||t.race.evil){let e=t.race.kindling_kindred||t.race.smoldering?t.race.smoldering?"Chrysotile":"Stone":"Plywood";return z("tech_steel_containers_alt_effect",[t.resource[e].name,t.resource.Steel.name])}return z("tech_steel_containers_effect",[t.resource.Steel.name])},action(){return!!Cs($(this)[0])&&(t.city.warehouse={count:0},!0)}},gantry_crane:{id:"tech-gantry_crane",title:z("tech_gantry_crane"),desc:z("tech_gantry_crane_desc"),category:"storage",era:"discovery",reqs:{steel_container:1,high_tech:2},grant:["steel_container",2],cost:{Knowledge:()=>22500,Steel:()=>5e3},effect:z("tech_gantry_crane_effect"),action(){return!!Cs($(this)[0])}},alloy_containers:{id:"tech-alloy_containers",title:()=>z("tech_containers",[t.resource.Alloy.name]),desc:()=>z("tech_alloy_containers_desc",[t.resource.Alloy.name]),category:"storage",era:"industrialized",reqs:{steel_container:2,storage:4},grant:["steel_container",3],cost:{Knowledge:()=>49500,Alloy:()=>2500},effect:()=>z("tech_alloy_containers_effect",[t.resource.Alloy.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},mythril_containers:{id:"tech-mythril_containers",title:()=>z("tech_containers",[t.resource.Mythril.name]),desc:()=>z("tech_mythril_containers_desc",[t.resource.Mythril.name]),category:"storage",era:"early_space",reqs:{steel_container:3,space:3},grant:["steel_container",4],cost:{Knowledge:()=>165e3,Mythril:()=>500},effect:()=>z("tech_mythril_containers_effect",[t.resource.Mythril.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},adamantite_containers:{id:"tech-adamantite_containers",title:()=>z("tech_containers",[t.resource.Adamantite.name]),desc:()=>z("tech_adamantite_containers_desc",[t.resource.Adamantite.name]),category:"storage",era:"interstellar",reqs:{steel_container:4,alpha:2},grant:["steel_container",5],cost:{Knowledge:()=>525e3,Adamantite:()=>17500},effect:()=>z("tech_adamantite_containers_effect",[t.resource.Adamantite.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},aerogel_containers:{id:"tech-aerogel_containers",title:()=>z("tech_containers",[t.resource.Aerogel.name]),desc:()=>z("tech_containers",[t.resource.Aerogel.name]),category:"storage",era:"interstellar",reqs:{steel_container:5,aerogel:1},grant:["steel_container",6],cost:{Knowledge:()=>775e3,Aerogel:()=>500},effect:()=>z("tech_aerogel_containers_effect",[t.resource.Aerogel.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},bolognium_containers:{id:"tech-bolognium_containers",title:()=>z("tech_containers",[t.resource.Bolognium.name]),desc:()=>z("tech_containers",[t.resource.Bolognium.name]),category:"storage",era:"intergalactic",reqs:{steel_container:6,gateway:3},grant:["steel_container",7],cost:{Knowledge:()=>35e5,Bolognium:()=>125e3},effect:()=>z("tech_bolognium_containers_effect",[t.resource.Bolognium.name]),action(){return!!Cs($(this)[0])}},nanoweave_containers:{id:"tech-nanoweave_containers",title:()=>z("tech_nanoweave_containers",[t.resource.Nanoweave.name]),desc:()=>z("tech_nanoweave_containers",[t.resource.Nanoweave.name]),category:"storage",era:"intergalactic",reqs:{steel_container:7,nanoweave:1},grant:["steel_container",8],cost:{Knowledge:()=>9e6,Nanoweave:()=>5e4},effect:()=>z("tech_nanoweave_containers_effect",[t.resource.Nanoweave.name]),action(){return!!Cs($(this)[0])}},evil_planning:{id:"tech-evil_planning",title:z("tech_urban_planning"),desc:z("tech_urban_planning"),category:"queues",era:"civilized",wiki:!!t.race.terrifying,reqs:{banking:2},grant:["queue",1],trait:["terrifying"],cost:{Knowledge:()=>2500},effect:z("tech_urban_planning_effect"),action(){return!!Cs($(this)[0])&&(t.queue.display=!0,!0)},post(){Hi()}},urban_planning:{id:"tech-urban_planning",title:z("tech_urban_planning"),desc:z("tech_urban_planning"),category:"queues",era:"civilized",wiki:!t.race.terrifying,reqs:{banking:2,currency:2},grant:["queue",1],not_trait:["terrifying"],cost:{Knowledge:()=>2500},effect:z("tech_urban_planning_effect"),action(){return!!Cs($(this)[0])&&(t.queue.display=!0,t.settings.msgFilters.queue.unlocked||(t.settings.msgFilters.queue.unlocked=!0,t.settings.msgFilters.queue.vis=!0),!0)},post(){Hi()}},zoning_permits:{id:"tech-zoning_permits",title:z("tech_zoning_permits"),desc:z("tech_zoning_permits"),category:"queues",era:"industrialized",reqs:{queue:1,high_tech:3},grant:["queue",2],cost:{Knowledge:()=>28e3},effect:()=>z("tech_zoning_permits_effect",[t.genes.queue&&t.genes.queue>=2?4:2]),action(){return!!Cs($(this)[0])},post(){Hi()}},urbanization:{id:"tech-urbanization",title:z("tech_urbanization"),desc:z("tech_urbanization"),category:"queues",era:"globalized",reqs:{queue:2,high_tech:6},grant:["queue",3],cost:{Knowledge:()=>95e3},effect:()=>z("tech_urbanization_effect",[t.genes.queue&&t.genes.queue>=2?6:3]),action(){return!!Cs($(this)[0])},post(){Hi()}},assistant:{id:"tech-assistant",title:z("tech_assistant"),desc:z("tech_assistant"),category:"queues",era:"civilized",reqs:{queue:1,science:4},grant:["r_queue",1],cost:{Knowledge:()=>5e3},effect:z("tech_assistant_effect"),action(){return!!Cs($(this)[0])&&(t.r_queue.display=!0,t.settings.msgFilters.building_queue.unlocked||(t.settings.msgFilters.building_queue.unlocked=!0,t.settings.msgFilters.building_queue.vis=!0,t.settings.msgFilters.research_queue.unlocked=!0,t.settings.msgFilters.research_queue.vis=!0),!0)},post(){Ui(),t.settings.tabLoad&&$("#resQueue").removeAttr("style")}},government:{id:"tech-government",title:z("tech_government"),desc:z("tech_government_desc"),category:"government",era:"civilized",reqs:{currency:1},grant:["govern",1],cost:{Knowledge:()=>750},effect:z("tech_government_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#govType"},"update"),ic({el:"#foreign"},"update"),ic({el:"#government .govTabs2"},"update"),t.settings.tabLoad&&$("#government .govTabs2").removeAttr("style")}},theocracy:{id:"tech-theocracy",title:z("govern_theocracy"),desc:z("govern_theocracy"),category:"government",era:"civilized",reqs:{govern:1,theology:2},grant:["gov_theo",1],cost:{Knowledge:()=>1200},effect:z("tech_theocracy_effect"),action(){return!!Cs($(this)[0])}},republic:{id:"tech-republic",title:z("govern_republic"),desc:z("govern_republic"),category:"government",era:"discovery",reqs:{govern:1},condition:()=>!!(t.tech.trade&&t.tech.trade>=2||t.race.terrifying),grant:["govern",2],cost:{Knowledge:()=>17e3},effect:z("tech_republic_effect"),action(){return!!Cs($(this)[0])}},socialist:{id:"tech-socialist",title:z("govern_socialist"),desc:z("govern_socialist"),category:"government",era:"discovery",reqs:{govern:1},condition:()=>!!(t.tech.trade&&t.tech.trade>=2||t.race.terrifying),grant:["gov_soc",1],cost:{Knowledge:()=>17e3},effect:z("tech_socialist_effect"),action(){return!!Cs($(this)[0])}},corpocracy:{id:"tech-corpocracy",title:z("govern_corpocracy"),desc:z("govern_corpocracy"),category:"government",era:"industrialized",reqs:{govern:2,high_tech:3},grant:["gov_corp",1],cost:{Knowledge:()=>26e3},effect:z("tech_corpocracy_effect"),action(){return!!Cs($(this)[0])}},technocracy:{id:"tech-technocracy",title:z("govern_technocracy"),desc:z("govern_technocracy"),category:"government",era:"industrialized",reqs:{govern:2,high_tech:3},grant:["govern",3],cost:{Knowledge:()=>26e3},effect:z("tech_technocracy_effect"),action(){return!!Cs($(this)[0])}},federation:{id:"tech-federation",title:z("govern_federation"),desc:z("govern_federation"),category:"government",era:"early_space",reqs:{govern:2},condition:()=>t.tech.unify&&t.tech.unify>=2||de(),grant:["gov_fed",1],cost:{Knowledge:()=>3e4},effect:z("tech_federation_effect"),action(){return!!Cs($(this)[0])}},magocracy:{id:"tech-magocracy",title:z("govern_magocracy"),desc:z("govern_magocracy"),category:"government",era:"industrialized",reqs:{govern:2,high_tech:3},condition:()=>"magic"===t.race.universe,grant:["gov_mage",1],cost:{Knowledge:()=>26e3},effect:z("tech_magocracy_effect"),action(){return!!Cs($(this)[0])}},governor:{id:"tech-governor",title:z("tech_governor"),desc:z("tech_governor"),category:"government",era:"civilized",reqs:{govern:1},condition:()=>!(!t.genes.governor||"anarchy"===t.civic.govern.type),grant:["governor",1],cost:{Knowledge:()=>1e3},effect:z("tech_governor_effect"),action(){return!!Cs($(this)[0])&&(t.settings.showGovernor=!0,!0)},post(){L()}},spy:{id:"tech-spy",title:z("tech_spy"),desc:z("tech_spy"),category:"spies",era:"civilized",reqs:{govern:1},grant:["spy",1],cost:{Knowledge:()=>1250},effect:z("tech_spy_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#foreign"},"update")}},espionage:{id:"tech-espionage",title:z("tech_espionage"),desc:z("tech_espionage"),category:"spies",era:"discovery",reqs:{spy:1,high_tech:1},grant:["spy",2],cost:{Knowledge:()=>7500},effect:z("tech_espionage_effect"),action(){return!!Cs($(this)[0])&&(t.settings.msgFilters.spy.unlocked||(t.settings.msgFilters.spy.unlocked=!0,t.settings.msgFilters.spy.vis=!0),!0)},post(){ic({el:"#foreign"},"update")}},spy_training:{id:"tech-spy_training",title:z("tech_spy_training"),desc:z("tech_spy_training"),category:"spies",era:"discovery",reqs:{spy:2,boot_camp:1},grant:["spy",3],cost:{Knowledge:()=>1e4},effect:z("tech_spy_training_effect"),action(){return!!Cs($(this)[0])}},spy_gadgets:{id:"tech-spy_gadgets",title:z("tech_spy_gadgets"),desc:z("tech_spy_gadgets"),category:"spies",era:"discovery",reqs:{spy:3,high_tech:2},grant:["spy",4],cost:{Knowledge:()=>15e3},effect:z("tech_spy_gadgets_effect"),action(){return!!Cs($(this)[0])}},code_breakers:{id:"tech-code_breakers",title:z("tech_code_breakers"),desc:z("tech_code_breakers"),category:"spies",era:"industrialized",reqs:{spy:4,high_tech:4},grant:["spy",5],cost:{Knowledge:()=>55e3},effect:z("tech_code_breakers_effect"),action(){return!!Cs($(this)[0])}},currency:{id:"tech-currency",title:z("tech_currency"),desc:z("tech_currency_desc"),category:"banking",era:"civilized",reqs:{housing:1},grant:["currency",1],cost:{Knowledge:()=>22,Lumber:()=>10},effect:z("tech_currency_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Money.display=!0,!0)}},market:{id:"tech-market",title:z("tech_market"),desc:z("tech_market_desc"),category:"banking",era:"civilized",reqs:{banking:1,govern:1},not_trait:["terrifying"],grant:["currency",2],cost:{Knowledge:()=>t.race.banana?300:1800},effect:z("tech_market_effect"),action(){return!!Cs($(this)[0])&&(t.settings.showResources=!0,t.settings.showMarket=!0,!0)}},tax_rates:{id:"tech-tax_rates",title:z("tech_tax_rates"),desc:z("tech_tax_rates_desc"),category:"banking",era:"civilized",reqs:{banking:2,currency:2,queue:1},not_trait:["terrifying"],grant:["currency",3],cost:{Knowledge:()=>3375},effect:z("tech_tax_rates_effect"),action(){return!!Cs($(this)[0])&&(t.civic.taxes.display=!0,!0)}},large_trades:{id:"tech-large_trades",title:z("tech_large_trades"),desc:z("tech_large_trades_desc"),category:"market",era:"civilized",reqs:{currency:3},not_trait:["terrifying"],grant:["currency",4],cost:{Knowledge:()=>6750},effect:z("tech_large_trades_effect"),action(){return!!Cs($(this)[0])},post(){t.race.noble&&(t.tech.currency=5,gs())}},corruption:{id:"tech-corruption",title:z("tech_corruption"),desc:z("tech_corruption_desc"),category:"banking",era:"industrialized",reqs:{currency:4,high_tech:3},not_trait:["terrifying","noble"],grant:["currency",5],cost:{Knowledge:()=>36e3},effect:z("tech_corruption_effect"),action(){return!!Cs($(this)[0])}},massive_trades:{id:"tech-massive_trades",title:z("tech_massive_trades"),desc:z("tech_massive_trades_desc"),category:"market",era:"globalized",reqs:{currency:5,high_tech:4},not_trait:["terrifying"],grant:["currency",6],cost:{Knowledge:()=>108e3},effect:z("tech_massive_trades_effect"),action(){return!!Cs($(this)[0])}},trade:{id:"tech-trade",title:z("tech_trade"),desc:z("tech_trade_desc"),category:"market",era:"civilized",reqs:{currency:2,military:1},not_trait:["terrifying"],grant:["trade",1],cost:{Knowledge:()=>t.race.banana?1200:4500},effect:z("tech_trade_effect"),action(){return!!Cs($(this)[0])&&(t.city.trade={count:0},t.city.market.active=!0,!0)}},diplomacy:{id:"tech-diplomacy",title:z("tech_diplomacy"),desc:z("tech_diplomacy_desc"),category:"market",era:"discovery",reqs:{trade:1,high_tech:1},not_trait:["terrifying"],grant:["trade",2],cost:{Knowledge:()=>16200},effect:z("tech_diplomacy_effect"),action(){return!!Cs($(this)[0])}},freight:{id:"tech-freight",title:z("tech_freight"),desc:z("tech_freight_desc"),category:"market",era:"industrialized",reqs:{trade:2,high_tech:3},not_trait:["terrifying"],grant:["trade",3],cost:{Knowledge:()=>37800},effect:z("tech_freight_effect"),action(){return!!Cs($(this)[0])},post(){t.tech.high_tech>=6&&Ce("Physics")}},wharf:{id:"tech-wharf",title:z("tech_wharf"),desc:z("tech_wharf_desc"),category:"market",era:"industrialized",reqs:{trade:1,high_tech:3,oil:1},not_trait:["thalassophobia"],grant:["wharf",1],cost:{Knowledge:()=>44e3},effect:z("tech_wharf_effect"),action(){return!!Cs($(this)[0])&&(t.city.wharf={count:0},!0)}},banking:{id:"tech-banking",title:z("tech_banking"),desc:z("tech_banking_desc"),category:"banking",era:"civilized",reqs:{currency:1},grant:["banking",1],cost:{Knowledge:()=>90},effect:z("tech_banking_effect"),action(){return!!Cs($(this)[0])&&(t.city.bank={count:0},!0)}},investing:{id:"tech-investing",title:z("tech_investing"),desc:z("tech_investing_desc"),category:"banking",era:"civilized",reqs:{banking:1},grant:["banking",2],cost:{Money:()=>2500,Knowledge:()=>900},effect:z("tech_investing_effect"),action(){return!!Cs($(this)[0])&&(t.civic.banker.display=!0,!0)}},vault:{id:"tech-vault",title:z("tech_vault"),desc:z("tech_vault_desc"),category:"banking",era:"civilized",reqs:{banking:2,cement:1},grant:["banking",3],cost:{Money:()=>2e3,Knowledge:()=>3600,Iron:()=>500,Cement:()=>750},effect:z("tech_vault_effect"),action(){return!!Cs($(this)[0])}},bonds:{id:"tech-bonds",title:z("tech_bonds"),desc:z("tech_bonds"),category:"banking",era:"civilized",reqs:{banking:3},grant:["banking",4],cost:{Money:()=>2e4,Knowledge:()=>5e3},effect:z("tech_bonds_effect"),action(){return!!Cs($(this)[0])}},steel_vault:{id:"tech-steel_vault",title:z("tech_steel_vault"),desc:z("tech_steel_vault"),category:"banking",era:"civilized",reqs:{banking:4,smelting:2},grant:["banking",5],cost:{Money:()=>3e4,Knowledge:()=>6750,Steel:()=>3e3},effect:z("tech_steel_vault_effect"),action(){return!!Cs($(this)[0])}},eebonds:{id:"tech-eebonds",title:z("tech_eebonds"),desc:z("tech_eebonds"),category:"banking",era:"discovery",reqs:{banking:5,high_tech:1},grant:["banking",6],cost:{Money:()=>75e3,Knowledge:()=>18e3},effect:z("tech_eebonds_effect"),action(){return!!Cs($(this)[0])}},swiss_banking:{id:"tech-swiss_banking",title:Wr(),desc:Wr(),category:"banking",era:"industrialized",reqs:{banking:6},grant:["banking",7],cost:{Money:()=>125e3,Knowledge:()=>45e3},effect:z("tech_swiss_banking_effect"),action(){return!!Cs($(this)[0])}},safety_deposit:{id:"tech-safety_deposit",title:z("tech_safety_deposit"),desc:z("tech_safety_deposit"),category:"banking",era:"globalized",reqs:{banking:7,high_tech:4},grant:["banking",8],cost:{Money:()=>25e4,Knowledge:()=>67500},effect:z("tech_safety_deposit_effect"),action(){return!!Cs($(this)[0])}},stock_market:{id:"tech-stock_market",title:z("tech_stock_market"),desc:z("tech_stock_market"),category:"arpa",era:"globalized",reqs:{banking:8,high_tech:6},grant:["banking",9],cost:{Money:()=>325e3,Knowledge:()=>108e3},effect:z("tech_stock_market_effect"),action(){return!!Cs($(this)[0])},post(){Ce("Physics")}},hedge_funds:{id:"tech-hedge_funds",title:z("tech_hedge_funds"),desc:z("tech_hedge_funds"),category:"banking",era:"early_space",reqs:{banking:9,stock_exchange:1},grant:["banking",10],cost:{Money:()=>375e3,Knowledge:()=>126e3},effect:z("tech_hedge_funds_effect"),action(){return!!Cs($(this)[0])}},four_oh_one:{id:"tech-four_oh_one",title:z("tech_four_oh_one"),desc:z("tech_four_oh_one"),category:"banking",era:"early_space",reqs:{banking:10},grant:["banking",11],cost:{Money:()=>425e3,Knowledge:()=>144e3},effect:z("tech_four_oh_one_effect"),action(){return!!Cs($(this)[0])},flair:()=>z("tech_four_oh_one_flair")},exchange:{id:"tech-exchange",title:z("tech_exchange"),desc:z("tech_exchange"),category:"banking",era:"interstellar",reqs:{banking:11,alpha:2,graphene:1},grant:["banking",12],cost:{Money:()=>1e6,Knowledge:()=>675e3},effect:z("tech_exchange_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.exchange={count:0,on:0},!0)}},foreign_investment:{id:"tech-foreign_investment",title:z("tech_foreign_investment"),desc:z("tech_foreign_investment"),category:"banking",era:"intergalactic",reqs:{banking:12,xeno:10},grant:["banking",13],cost:{Money:()=>1e8,Knowledge:()=>8e6},effect:z("tech_foreign_investment_effect"),action(){return!!Cs($(this)[0])}},mythril_vault:{id:"tech-mythril_vault",title:z("tech_mythril_vault"),desc:z("tech_mythril_vault"),category:"banking",era:"early_space",reqs:{banking:5,space:3},grant:["vault",1],cost:{Money:()=>5e5,Knowledge:()=>15e4,Mythril:()=>750},effect:z("tech_mythril_vault_effect"),action(){return!!Cs($(this)[0])}},neutronium_vault:{id:"tech-neutronium_vault",title:z("tech_neutronium_vault"),desc:z("tech_neutronium_vault"),category:"banking",era:"deep_space",reqs:{vault:1,gas_moon:1},grant:["vault",2],cost:{Money:()=>75e4,Knowledge:()=>28e4,Neutronium:()=>650},effect:z("tech_neutronium_vault_effect"),action(){return!!Cs($(this)[0])}},adamantite_vault:{id:"tech-adamantite_vault",title:z("tech_adamantite_vault"),desc:z("tech_adamantite_vault"),category:"banking",era:"interstellar",reqs:{vault:2,alpha:2},grant:["vault",3],cost:{Money:()=>2e6,Knowledge:()=>56e4,Adamantite:()=>2e4},effect:z("tech_adamantite_vault_effect"),action(){return!!Cs($(this)[0])}},graphene_vault:{id:"tech-graphene_vault",title:z("tech_graphene_vault"),desc:z("tech_graphene_vault"),category:"banking",era:"interstellar",path:["standard","truepath"],reqs:{vault:3,graphene:1},grant:["vault",4],cost:{Money:()=>3e6,Knowledge:()=>75e4,Graphene:()=>4e5},effect:z("tech_graphene_vault_effect"),action(){return!!Cs($(this)[0])}},home_safe:{id:"tech-home_safe",title:z("tech_home_safe"),desc:z("tech_home_safe"),category:"banking",era:"discovery",reqs:{banking:5},grant:["home_safe",1],cost:{Money:()=>42e3,Knowledge:()=>8e3,Steel:()=>4500},effect:z("tech_home_safe_effect"),action(){return!!Cs($(this)[0])}},fire_proof_safe:{id:"tech-fire_proof_safe",title:z("tech_fire_proof_safe"),desc:z("tech_fire_proof_safe"),category:"banking",era:"early_space",reqs:{home_safe:1,space:3},grant:["home_safe",2],cost:{Money:()=>25e4,Knowledge:()=>12e4,Iridium:()=>1e3},effect:z("tech_fire_proof_safe_effect"),action(){return!!Cs($(this)[0])}},tamper_proof_safe:{id:"tech-tamper_proof_safe",title:z("tech_tamper_proof_safe"),desc:z("tech_tamper_proof_safe"),category:"banking",era:"interstellar",reqs:{home_safe:2,infernite:1},grant:["home_safe",3],cost:{Money:()=>25e5,Knowledge:()=>6e5,Infernite:()=>800},effect:z("tech_tamper_proof_safe_effect"),action(){return!!Cs($(this)[0])}},monument:{id:"tech-monument",title:z("tech_monument"),desc:z("tech_monument"),category:"arpa",era:"globalized",reqs:{high_tech:6},grant:["monument",1],cost:{Knowledge:()=>12e4},effect:z("tech_monument_effect"),action(){return!!Cs($(this)[0])&&(t.arpa.m_type=Ce("Monument"),!0)},post(){Ce("Physics")}},tourism:{id:"tech-tourism",title:z("tech_tourism"),desc:z("tech_tourism"),category:"banking",era:"early_space",reqs:{monuments:2,monument:1},not_trait:["cataclysm","lone_survivor"],grant:["monument",2],cost:{Knowledge:()=>15e4},effect:z("tech_tourism_effect"),action(){return!!Cs($(this)[0])&&(t.city.tourist_center={count:0,on:0},!0)}},xeno_tourism:{id:"tech-xeno_tourism",title:z("tech_xeno_tourism"),desc:z("tech_xeno_tourism"),category:"banking",era:"intergalactic",reqs:{monument:2,xeno:10,monuments:10},not_trait:["cataclysm"],grant:["monument",3],cost:{Knowledge:()=>8e6},effect:z("tech_xeno_tourism_effect"),action(){return!!Cs($(this)[0])}},science:{id:"tech-science",title:z("tech_science"),desc:z("tech_science_desc"),category:"science",era:"civilized",reqs:{housing:1},grant:["science",1],cost:{Knowledge:()=>65},effect:z("tech_science_effect"),action(){return!!Cs($(this)[0])&&(t.city.university={count:0},!0)}},library:{id:"tech-library",title:z("tech_library"),desc:z("tech_library_desc"),category:"science",era:"civilized",reqs:{science:1,cement:1},grant:["science",2],cost:{Knowledge:()=>720},effect:z("tech_library_effect"),action(){return!!Cs($(this)[0])&&(t.city.library={count:0},!0)}},thesis:{id:"tech-thesis",title:z("tech_thesis"),desc:z("tech_thesis_desc"),category:"science",era:"civilized",reqs:{science:2},grant:["science",3],cost:{Knowledge:()=>1125},effect:z("tech_thesis_effect"),action(){return!!Cs($(this)[0])}},research_grant:{id:"tech-research_grant",title:z("tech_research_grant"),desc:z("tech_research_grant_desc"),category:"science",era:"civilized",reqs:{science:3},grant:["science",4],cost:{Knowledge:()=>3240},effect:z("tech_research_grant_effect"),action(){return!!Cs($(this)[0])}},scientific_journal:{id:"tech-scientific_journal",title:()=>"magic"===t.race.universe?z("tech_magic_tomes"):z("tech_scientific_journal"),desc:()=>"magic"===t.race.universe?z("tech_magic_tomes_desc"):z("tech_scientific_journal_desc"),category:"science",era:"industrialized",reqs:{science:4,high_tech:3},grant:["science",5],cost:{Knowledge:()=>27e3},effect:()=>"magic"===t.race.universe?z("tech_magic_tomes_effect"):z("tech_scientific_journal_effect"),action(){return!!Cs($(this)[0])}},adjunct_professor:{id:"tech-adjunct_professor",title:z("tech_adjunct_professor"),desc:z("tech_adjunct_professor"),category:"science",era:"industrialized",reqs:{science:5},grant:["science",6],cost:{Knowledge:()=>36e3},effect:()=>z("tech_adjunct_professor_effect",[Es(),t.civic.scientist?t.civic.scientist.name:z("job_scientist")]),action(){return!!Cs($(this)[0])}},tesla_coil:{id:"tech-tesla_coil",title:z("tech_tesla_coil"),desc:z("tech_tesla_coil_desc"),category:"science",era:"industrialized",reqs:{science:6,high_tech:3},grant:["science",7],cost:{Knowledge:()=>51750},effect:()=>z("tech_tesla_coil_effect",[Es()]),action(){return!!Cs($(this)[0])}},internet:{id:"tech-internet",title:z("tech_internet"),desc:z("tech_internet"),category:"science",era:"globalized",reqs:{science:7,high_tech:4},grant:["science",8],cost:{Knowledge:()=>61200},effect:z("tech_internet_effect"),action(){return!!Cs($(this)[0])&&(t.race.toxic&&"troll"===t.race.species&&eo("godwin"),!0)}},observatory:{id:"tech-observatory",title:z("tech_observatory"),desc:z("tech_observatory"),category:"science",era:"early_space",reqs:{science:8,space:3,luna:1},grant:["science",9],cost:{Knowledge:()=>148e3},effect:z("tech_observatory_effect"),action(){return!!Cs($(this)[0])&&(t.space.observatory={count:0,on:0},!0)}},world_collider:{id:"tech-world_collider",title:z("tech_world_collider"),desc:z("tech_world_collider"),category:"science",era:"deep_space",path:["standard"],reqs:{science:9,elerium:2},grant:["science",10],cost:{Knowledge:()=>35e4},effect:()=>z("tech_world_collider_effect",[ea().dwarf]),action(){return!!Cs($(this)[0])&&(t.space.world_collider={count:0},t.space.world_controller={count:0,on:0},!0)},flair:`
    ${z("tech_world_collider_flair1")}
    ${z("tech_world_collider_flair2")}
    `},laboratory:{id:"tech-laboratory",title:()=>"magic"===t.race.universe?z("tech_sanctum"):z("tech_laboratory"),desc:()=>"magic"===t.race.universe?z("tech_sanctum"):z("tech_laboratory_desc"),category:"science",era:"interstellar",reqs:{science:11,alpha:2},grant:["science",12],cost:{Knowledge:()=>5e5},effect:()=>"magic"===t.race.universe?z("tech_sanctum_effect"):z("tech_laboratory_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.laboratory={count:0,on:0},!0)},flair:()=>"magic"===t.race.universe?z("tech_sanctum_flair"):z("tech_laboratory_flair")},virtual_assistant:{id:"tech-virtual_assistant",title:z("tech_virtual_assistant"),desc:z("tech_virtual_assistant"),category:"science",era:"interstellar",reqs:{science:12,high_tech:12},grant:["science",13],cost:{Knowledge:()=>635e3},effect:()=>"magic"===t.race.universe?z("tech_virtual_assistant_magic_effect"):z("tech_virtual_assistant_effect"),action(){return!!Cs($(this)[0])}},dimensional_readings:{id:"tech-dimensional_readings",title:z("tech_dimensional_readings"),desc:z("tech_dimensional_readings"),category:"science",era:"interstellar",reqs:{science:13,infernite:2},grant:["science",14],cost:{Knowledge:()=>75e4},effect:()=>z("tech_dimensional_readings_effect"),action(){return!!Cs($(this)[0])}},quantum_entanglement:{id:"tech-quantum_entanglement",title:z("tech_quantum_entanglement"),desc:z("tech_quantum_entanglement"),category:"science",era:"interstellar",reqs:{science:14,neutron:1},grant:["science",15],cost:{Knowledge:()=>85e4,Neutronium:()=>7500,Soul_Gem:()=>2},effect:()=>z("tech_quantum_entanglement_effect",[2,"magic"===t.race.universe?z("tech_sanctum"):z("interstellar_laboratory_title"),Es()]),action(){return!!Cs($(this)[0])}},expedition:{id:"tech-expedition",title:()=>"magic"===t.race.universe?z("tech_expedition_wiz"):z("tech_expedition"),desc:()=>"magic"===t.race.universe?z("tech_expedition_wiz"):z("tech_expedition"),category:"science",era:"intergalactic",reqs:{science:15,xeno:4},grant:["science",16],cost:{Knowledge:()=>535e4},effect:()=>"magic"===t.race.universe?z("tech_expedition_wiz_effect"):z("tech_expedition_effect"),action(){return!!Cs($(this)[0])}},subspace_sensors:{id:"tech-subspace_sensors",title:z("tech_subspace_sensors"),desc:z("tech_subspace_sensors"),category:"science",era:"intergalactic",reqs:{science:16,high_tech:16},grant:["science",17],cost:{Knowledge:()=>6e6},effect:()=>z("tech_subspace_sensors_effect"),action(){return!!Cs($(this)[0])}},alien_database:{id:"tech-alien_database",title:z("tech_alien_database"),desc:z("tech_alien_database"),category:"progress",era:"intergalactic",reqs:{science:17,conflict:5},grant:["science",18],cost:{Knowledge:()=>825e4},effect:()=>z("tech_alien_database_effect"),action(){return!!Cs($(this)[0])}},orichalcum_capacitor:{id:"tech-orichalcum_capacitor",title:z("tech_orichalcum_capacitor"),desc:z("tech_orichalcum_capacitor"),category:"science",era:"intergalactic",reqs:{science:18,high_tech:17},grant:["science",19],cost:{Knowledge:()=>125e5,Orichalcum:()=>25e4},effect:()=>z("tech_orichalcum_capacitor_effect"),action(){return!!Cs($(this)[0])}},advanced_biotech:{id:"tech-advanced_biotech",title:z("tech_advanced_biotech"),desc:z("tech_advanced_biotech"),category:"science",era:"dimensional",reqs:{science:19,high_tech:18},grant:["science",20],cost:{Knowledge:()=>255e5},effect:()=>z("tech_advanced_biotech_effect"),action(){return!!Cs($(this)[0])}},codex_infinium:{id:"tech-codex_infinium",title:z("tech_codex_infinium"),desc:z("tech_codex_infinium"),category:"science",era:"dimensional",reqs:{science:20,sphinx_bribe:1},grant:["science",21],cost:{Knowledge:()=>401e5,Codex:()=>1},effect:()=>z("tech_codex_infinium_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Codex.display=!1,!0)}},bioscience:{id:"tech-bioscience",title:z("tech_bioscience"),desc:z("tech_bioscience_desc"),category:"science",era:"globalized",reqs:{science:8},grant:["genetics",1],cost:{Knowledge:()=>67500},effect:z("tech_bioscience_effect"),action(){return!!Cs($(this)[0])&&(t.city.biolab={count:0},!0)}},genetics:{id:"tech-genetics",title:z("tech_genetics"),desc:z("tech_genetics"),category:"arpa",era:"globalized",reqs:{genetics:1,high_tech:6},grant:["genetics",2],cost:{Knowledge:()=>108e3},effect:z("tech_genetics_effect"),action(){return!!Cs($(this)[0])&&(t.settings.arpa.genetics=!0,t.arpa.sequence||(t.arpa.sequence={max:5e4,progress:0,time:5e4,on:!t.race.cataclysm&&!t.race.orbit_decayed,boost:!1,auto:!1,labs:0}),!0)},post(){Ce("Genetics")}},crispr:{id:"tech-crispr",title:z("tech_crispr"),desc:z("tech_crispr"),category:"genes",era:"globalized",reqs:{genetics:3},grant:["genetics",4],cost:{Knowledge:()=>125e3},effect:()=>t.race.artifical?z("tech_crispr_effect_artifical"):z("tech_crispr_effect"),action(){return!!Cs($(this)[0])&&(t.settings.arpa.crispr=!0,t.settings.arpa.arpaTabs=2,!0)},post(){Ce("Genetics"),Ce("Crispr")}},shotgun_sequencing:{id:"tech-shotgun_sequencing",title:z("tech_shotgun_sequencing"),desc:()=>t.race.artifical?z("tech_shotgun_sequencing_desc_artifical"):z("tech_shotgun_sequencing_desc"),category:"genes",era:"early_space",reqs:{genetics:4},grant:["genetics",5],cost:{Knowledge:()=>165e3},effect:()=>t.race.artifical?z("tech_shotgun_sequencing_effect_artifical"):z("tech_shotgun_sequencing_effect"),action(){return!!Cs($(this)[0])&&(t.arpa.sequence.boost=!0,!0)},post(){Ce("Genetics")}},de_novo_sequencing:{id:"tech-de_novo_sequencing",title:z("tech_de_novo_sequencing"),desc:z("tech_de_novo_sequencing"),category:"genes",era:"early_space",reqs:{genetics:5},grant:["genetics",6],cost:{Knowledge:()=>22e4},effect:()=>t.race.artifical?z("tech_de_novo_sequencing_effect_artifical"):z("tech_de_novo_sequencing_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Genes.display=!0,!0)},post(){Ce("Genetics")}},dna_sequencer:{id:"tech-dna_sequencer",title:()=>t.race.artifical?z("tech_code_sequencer"):z("tech_dna_sequencer"),desc:()=>t.race.artifical?z("tech_code_sequencer"):z("tech_dna_sequencer"),category:"genes",era:"deep_space",reqs:{genetics:6},grant:["genetics",7],cost:{Knowledge:()=>3e5},effect:()=>t.race.artifical?z("tech_code_sequencer_effect"):z("tech_dna_sequencer_effect"),action(){return!!Cs($(this)[0])&&(t.arpa.sequence.auto=!0,!0)},post(){Ce("Genetics")}},rapid_sequencing:{id:"tech-rapid_sequencing",title:()=>t.race.artifical?z("tech_agile_development"):z("tech_rapid_sequencing"),desc:()=>t.race.artifical?z("tech_agile_development"):z("tech_rapid_sequencing"),category:"genes",era:"interstellar",path:["standard","truepath"],reqs:{genetics:7,high_tech:12},grant:["genetics",8],cost:{Knowledge:()=>8e5},effect:()=>t.race.artifical?z("tech_agile_development_effect"):z("tech_rapid_sequencing_effect"),action(){return!!Cs($(this)[0])}},mad_science:{id:"tech-mad_science",title:()=>"magic"===t.race.universe?z("tech_sages"):z("tech_mad_science"),desc:()=>"magic"===t.race.universe?z("tech_sages"):z("tech_mad_science"),category:"science",era:"discovery",reqs:{science:2,smelting:2},grant:["high_tech",1],cost:{Money:()=>1e4,Mana:()=>"magic"===t.race.universe?50:0,Knowledge:()=>6750,Crystal:()=>"magic"===t.race.universe?1e3:0,Aluminium:()=>750},effect:()=>"magic"===t.race.universe?z("tech_sages_effect"):z("tech_mad_science_effect"),action(){return!!Cs($(this)[0])&&(t.race.terrifying&&(t.civic.taxes.display=!0),t.city.wardenclyffe={count:0,on:0},!0)}},electricity:{id:"tech-electricity",title:z("tech_electricity"),desc:z("tech_electricity"),category:"power_generation",era:"discovery",reqs:{high_tech:1},grant:["high_tech",2],cost:{Knowledge:()=>13500,Copper:()=>1e3},effect:z("tech_electricity_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_electricity_msg"),"info",!1,["progress"]),t.city.power=0,t.city.powered=!0,t.city.coal_power={count:0,on:0},t.settings.showPowerGrid=!0,ai(),!0)}},matter_replicator:{id:"tech-matter_replicator",title:()=>"antimatter"!==t.race.universe||t.race.amexplode?z("tech_replicator"):z("tech_antireplicator"),desc:()=>"antimatter"!==t.race.universe||t.race.amexplode?z("tech_replicator"):z("tech_antireplicator"),category:"special",era:"discovery",reqs:{high_tech:2},condition:()=>!!(t.stats.achieve.adam_eve&&t.stats.achieve.adam_eve.l>=5),not_trait:["lone_survivor"],grant:["replicator",1],cost:{Knowledge:()=>25e3},effect:()=>"antimatter"!==t.race.universe||t.race.amexplode?z("tech_replicator_effect_alt"):z("tech_antireplicator_effect_alt"),action(){if(Cs($(this)[0])){if("antimatter"===t.race.universe&&t.race.amexplode){to("annihilation"),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),$("body").addClass("nuke");let a=$('
    ');$("body").append(a),setTimeout((function(){a.addClass("burn")}),500),setTimeout((function(){a.addClass("b")}),600),setTimeout((function(){window.soft_reset()}),4e3)}else t.race.replicator={res:"Stone",pow:1};return!0}return!1},post(){L()}},industrialization:{id:"tech-industrialization",title:z("tech_industrialization"),desc:z("tech_industrialization"),category:"progress",era:"industrialized",reqs:{high_tech:2,cement:2,steel_container:1},grant:["high_tech",3],cost:{Knowledge:()=>25200},effect:z("tech_industrialization_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Titanium.display=!0,t.city.factory={count:0,on:0,Lux:0,Furs:0,Alloy:0,Polymer:0,Nano:0,Stanene:0},!0)},post(){Ai()}},electronics:{id:"tech-electronics",title:z("tech_electronics"),desc:z("tech_electronics"),category:"progress",era:"industrialized",reqs:{high_tech:3,titanium:1},grant:["high_tech",4],cost:{Knowledge:()=>5e4},effect:z("tech_electronics_effect"),action(){return!!Cs($(this)[0])&&(t.race.terrifying&&(t.tech.gambling=1,t.city.casino={count:0,on:0},t.space.spc_casino={count:0,on:0}),!0)}},fission:{id:"tech-fission",title:z("tech_fission"),desc:z("tech_fission"),category:"progress",era:"globalized",reqs:{high_tech:4,uranium:1},grant:["high_tech",5],cost:{Knowledge:()=>77400,Uranium:()=>10},effect:z("tech_fission_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_fission_msg"),"info",!1,["progress"]),t.city.fission_power={count:0,on:0},!0)}},arpa:{id:"tech-arpa",title:z("tech_arpa"),desc:z("tech_arpa_desc"),category:"arpa",era:"globalized",reqs:{high_tech:5},grant:["high_tech",6],cost:{Knowledge:()=>9e4},effect:z("tech_arpa_effect"),action(){return!!Cs($(this)[0])&&(t.settings.showGenetics=!0,t.settings.arpa.physics=!0,t.race.truepath&&!t.tech.unify&&(t.tech.unify=1),!0)},post(){Ce("Physics")}},rocketry:{id:"tech-rocketry",title:z("tech_rocketry"),desc:z("tech_rocketry"),category:"arpa",era:"globalized",reqs:{high_tech:6},grant:["high_tech",7],cost:{Knowledge:()=>112500,Oil:()=>t.city.ptrait.includes("dense")?8e3:6800},effect:z("tech_rocketry_effect"),action(){return!!Cs($(this)[0])&&(t.race.truepath&&!t.tech.rival&&(t.tech.rival=1,Bi(z("civics_rival_unlocked",[te(3)]),"info",!1,["progress","combat"])),!0)},post(){Ce("Physics")}},robotics:{id:"tech-robotics",title:z("tech_robotics"),desc:z("tech_robotics"),category:"progress",era:"globalized",reqs:{high_tech:7},grant:["high_tech",8],cost:{Knowledge:()=>125e3},effect:z("tech_robotics_effect"),action(){return!!Cs($(this)[0])}},lasers:{id:"tech-lasers",title:z("tech_lasers"),desc:z("tech_lasers_desc"),category:"progress",era:"deep_space",reqs:{high_tech:8,space:3,supercollider:1,elerium:1},grant:["high_tech",9],cost:{Knowledge:()=>28e4,Elerium:()=>100},effect:z("tech_lasers_effect"),action(){return!!Cs($(this)[0])&&(t.race.cataclysm&&eo("iron_will",!1,3),!0)}},artifical_intelligence:{id:"tech-artifical_intelligence",title:z("tech_artificial_intelligence"),desc:z("tech_artificial_intelligence"),category:"progress",era:"deep_space",reqs:{high_tech:9},grant:["high_tech",10],cost:{Knowledge:()=>325e3},effect:z("tech_artificial_intelligence_effect"),action(){return!!Cs($(this)[0])},flair:()=>z("tech_artificial_intelligence_flair")},quantum_computing:{id:"tech-quantum_computing",title:z("tech_quantum_computing"),desc:z("tech_quantum_computing"),category:"progress",era:"deep_space",reqs:{high_tech:10,nano:1},grant:["high_tech",11],cost:{Knowledge:()=>435e3,Elerium:()=>250,Nano_Tube:()=>1e5},effect:z("tech_quantum_computing_effect"),action(){return!!Cs($(this)[0])},flair:()=>z("tech_quantum_computing_flair")},virtual_reality:{id:"tech-virtual_reality",title:z("tech_virtual_reality"),desc:z("tech_virtual_reality"),category:"progress",era:"interstellar",reqs:{high_tech:11,alpha:2,infernite:1,stanene:1},grant:["high_tech",12],cost:{Knowledge:()=>6e5,Stanene:()=>1250,Soul_Gem:()=>1},effect:z("tech_virtual_reality_effect"),action(){return!!Cs($(this)[0])},flair:()=>z("tech_virtual_reality_flair")},plasma:{id:"tech-plasma",title:z("tech_plasma"),desc:z("tech_plasma"),category:"progress",era:"interstellar",path:["standard","truepath"],reqs:{high_tech:12},grant:["high_tech",13],cost:{Knowledge:()=>755e3,Infernite:()=>t.race.truepath?0:1e3,Stanene:()=>t.race.truepath?1e6:25e4},effect:z("tech_plasma_effect"),action(){return!!Cs($(this)[0])}},shields:{id:"tech-shields",title:z("tech_shields"),desc:z("tech_shields"),category:"stellar_engine",era:"interstellar",reqs:{high_tech:13},grant:["high_tech",14],cost:{Knowledge:()=>85e4},effect:z("tech_shields_effect"),action(){return!!Cs($(this)[0])&&(t.settings.space.neutron=!0,t.settings.space.blackhole=!0,!0)}},ai_core:{id:"tech-ai_core",title:z("tech_ai_core"),desc:z("tech_ai_core"),category:"ai_core",era:"interstellar",reqs:{high_tech:14,science:15,blackhole:3},grant:["high_tech",15],cost:{Knowledge:()=>15e5},effect:z("tech_ai_core_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.citadel={count:0,on:0},!0)}},metaphysics:{id:"tech-metaphysics",title:z("tech_metaphysics"),desc:z("tech_metaphysics"),category:"progress",era:"intergalactic",reqs:{high_tech:15,xeno:5},grant:["high_tech",16],cost:{Knowledge:()=>5e6,Vitreloy:()=>1e4,Soul_Gem:()=>10},effect:()=>z("tech_metaphysics_effect"),action(){return!!Cs($(this)[0])}},orichalcum_analysis:{id:"tech-orichalcum_analysis",title:z("tech_orichalcum_analysis"),desc:z("tech_orichalcum_analysis"),category:"progress",era:"intergalactic",reqs:{high_tech:16,chthonian:3},grant:["high_tech",17],cost:{Knowledge:()=>122e5,Orichalcum:()=>1e5},effect:()=>z("tech_orichalcum_analysis_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_orichalcum_analysis_result"),"info",!1,["progress"]),!0)}},cybernetics:{id:"tech-cybernetics",title:z("tech_cybernetics"),desc:z("tech_cybernetics"),category:"progress",era:"dimensional",reqs:{high_tech:17,hell_ruins:4},grant:["high_tech",18],cost:{Knowledge:()=>25e6,Adamantite:()=>125e5,Stanene:()=>5e7,Vitreloy:()=>1e7},effect:()=>z("tech_cybernetics_effect"),action(){return!!Cs($(this)[0])}},blood_pact:{id:"tech-blood_pact",title:z("tech_blood_pact"),desc:z("tech_blood_pact"),category:"hell_dimension",era:"dimensional",reqs:{high_tech:18,b_stone:1},grant:["b_stone",2],cost:{Knowledge:()=>52e6,Blood_Stone:()=>1},effect:()=>z("tech_blood_pact_effect"),action(){return!!Cs($(this)[0])&&(t.settings.arpa.blood=!0,Ce("Crispr"),!0)},post(){Ce("Blood")}},purify:{id:"tech-purify",title:z("tech_purify"),desc:z("tech_purify"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:3,b_stone:2},grant:["b_stone",3],cost:{Knowledge:()=>525e5,Blood_Stone:()=>1},effect:()=>z("tech_purify_effect"),action(){return!!Cs($(this)[0])}},waygate:{id:"tech-waygate",title:z("tech_waygate"),desc:z("tech_waygate"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:10,b_stone:2},grant:["waygate",1],cost:{Knowledge:()=>55e6},effect:()=>z("tech_waygate_effect"),action(){return!!Cs($(this)[0])&&(t.portal.waygate={count:0,progress:0,on:0},!0)}},demonic_infusion:{id:"tech-demonic_infusion",title:z("tech_demonic_infusion"),desc:z("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:()=>vc(1e3),Knowledge:()=>55e6,Demonic_Essence:()=>1},effect:()=>`
    ${z("tech_demonic_infusion_effect")}
    ${z("tech_demonic_infusion_effect2",[gc("descend").artifact])}
    `,action(){return t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),Cs($(this)[0])&&Q(),!1}},gate_key:{id:"tech-gate_key",title:z("tech_gate_key"),desc:z("tech_gate_key"),category:"hell_dimension",era:"dimensional",reqs:{hell_gate:1},grant:["hell_gate",2],cost:{Knowledge:()=>3e7},effect:()=>z("tech_gate_key_effect"),action(){return!!Cs($(this)[0])&&(t.portal.west_tower={count:0,on:0},t.portal.east_tower={count:0,on:0},!0)}},gate_turret:{id:"tech-gate_turret",title:z("tech_gate_turret"),desc:z("tech_gate_turret"),category:"hell_dimension",era:"dimensional",reqs:{hell_gate:2},grant:["hell_gate",3],cost:{Knowledge:()=>32e6},effect:()=>z("tech_gate_turret_effect"),action(){return!!Cs($(this)[0])&&(t.portal.gate_turret={count:0,on:0},!0)}},infernite_mine:{id:"tech-infernite_mine",title:z("tech_infernite_mine"),desc:z("tech_infernite_mine"),category:"hell_dimension",era:"dimensional",reqs:{hell_gate:3},grant:["hell_gate",4],cost:{Knowledge:()=>325e5},effect:()=>z("tech_infernite_mine_effect"),action(){return!!Cs($(this)[0])&&(t.portal.infernite_mine={count:0,on:0},!0)}},study_corrupt_gem:{id:"tech-study_corrupt_gem",title:z("tech_study_corrupt_gem"),desc:z("tech_study_corrupt_gem"),category:"hell_dimension",era:"intergalactic",reqs:{high_tech:16,corrupt:1},grant:["corrupt",2],trait:["witch_hunter"],cost:{Mana:()=>t.race.no_plasmid?1e4:3e4,Knowledge:()=>185e5,Corrupt_Gem:()=>1},effect:()=>z("tech_study_corrupt_gem_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_study_corrupt_gem_result"),"info",!1,["progress","hell"]),t.resource.Corrupt_Gem.display=!1,!0)}},soul_binding:{id:"tech-soul_binding",title:z("tech_soul_binding"),desc:z("tech_soul_binding"),category:"hell_dimension",era:"intergalactic",reqs:{corrupt:2,science:19},grant:["forbidden",1],trait:["witch_hunter"],cost:{Knowledge:()=>19e6},effect:()=>z("tech_soul_binding_effect"),action(){return!!Cs($(this)[0])}},soul_capacitor:{id:"tech-soul_capacitor",title:z("tech_soul_capacitor"),desc:z("tech_soul_capacitor"),category:"hell_dimension",era:"intergalactic",reqs:{forbidden:1},grant:["forbidden",2],trait:["witch_hunter"],cost:{Knowledge:()=>195e5},effect:()=>z("tech_soul_capacitor_effect"),action(){return!!Cs($(this)[0])&&(t.portal.soul_capacitor={count:0,on:0,energy:0,ecap:0},!0)}},soul_capacitor:{id:"tech-soul_capacitor",title:z("tech_soul_capacitor"),desc:z("tech_soul_capacitor"),category:"hell_dimension",era:"intergalactic",reqs:{forbidden:1},grant:["forbidden",2],trait:["witch_hunter"],cost:{Knowledge:()=>195e5},effect:()=>z("tech_soul_capacitor_effect"),action(){return!!Cs($(this)[0])&&(t.portal.soul_capacitor={count:0,on:0,energy:0,ecap:0},!0)}},absorption_chamber:{id:"tech-absorption_chamber",title:z("tech_absorption_chamber"),desc:z("tech_absorption_chamber"),category:"hell_dimension",era:"intergalactic",reqs:{forbidden:2},grant:["forbidden",3],trait:["witch_hunter"],cost:{Knowledge:()=>2e7},effect:()=>z("tech_absorption_chamber_effect"),action(){return!!Cs($(this)[0])&&(t.portal.absorption_chamber={count:0},!0)}},corrupt_gem_analysis:{id:"tech-corrupt_gem_analysis",title:z("tech_corrupt_gem_analysis"),desc:z("tech_corrupt_gem_analysis"),category:"hell_dimension",era:"dimensional",reqs:{high_tech:16,corrupt:1},grant:["corrupt",2],not_trait:["witch_hunter"],cost:{Species:()=>1,Knowledge:()=>22e6,Corrupt_Gem:()=>1},effect:()=>z("tech_corrupt_gem_analysis_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_corrupt_gem_analysis_result"),"info",!1,["progress","hell"]),t.resource.Corrupt_Gem.display=!1,!0)}},hell_search:{id:"tech-hell_search",title:z("tech_hell_search"),desc:z("tech_hell_search"),category:"hell_dimension",era:"dimensional",reqs:{corrupt:2},grant:["hell_ruins",1],cost:{Knowledge:()=>221e5,Structs:()=>({portal:{sensor_drone:{s:"prtl_badlands",count:25,on:25}}})},effect:()=>z("tech_hell_search_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_hell_search_result"),"info",!1,["progress","hell"]),t.settings.portal.ruins=!0,t.settings.portal.gate=!0,t.portal.guard_post={count:0,on:0,support:0,s_max:0},!0)}},codex_infernium:{id:"tech-codex_infernium",title:z("tech_codex_infernium"),desc:z("tech_codex_infernium"),category:"progress",era:"dimensional",reqs:{hell_ruins:3},grant:["hell_ruins",4],cost:{Knowledge:()=>235e5,Codex:()=>1},effect:()=>z("tech_codex_infernium_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Codex.display=!1,!0)}},lake_analysis:{id:"tech-lake_analysis",title:z("tech_lake_analysis"),desc:z("tech_lake_analysis"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:2},grant:["hell_lake",3],cost:{Knowledge:()=>34e6},effect:()=>z("tech_lake_analysis_effect"),action(){return!!Cs($(this)[0])}},lake_threat:{id:"tech-lake_threat",title:z("tech_lake_threat"),desc:z("tech_lake_threat"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:3},grant:["hell_lake",4],cost:{Knowledge:()=>345e5},effect:()=>z("tech_lake_threat_effect"),action(){return!!Cs($(this)[0])&&(t.portal.bireme={count:0,on:0,crew:0,mil:0},Bi(z("tech_lake_threat_result"),"info",!1,["progress","hell"]),!0)}},lake_transport:{id:"tech-lake_transport",title:z("tech_lake_transport"),desc:z("tech_lake_transport"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:4},grant:["hell_lake",5],cost:{Knowledge:()=>35e6},effect:()=>z("tech_lake_transport_effect"),action(){return!!Cs($(this)[0])&&(t.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)}},cooling_tower:{id:"tech-cooling_tower",title:z("tech_cooling_tower"),desc:z("tech_cooling_tower"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:5},grant:["hell_lake",6],cost:{Knowledge:()=>375e5},effect:()=>z("tech_cooling_tower_effect"),action(){return!!Cs($(this)[0])&&(t.portal.cooling_tower={count:0,on:0},!0)}},miasma:{id:"tech-miasma",title:z("tech_miasma"),desc:z("tech_miasma"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:2},grant:["hell_spire",3],cost:{Knowledge:()=>3825e4},effect:()=>z("tech_miasma_effect"),action(){return!!Cs($(this)[0])&&(t.portal.port={count:0},!0)}},incorporeal:{id:"tech-incorporeal",title:z("tech_incorporeal"),desc:z("tech_incorporeal"),category:"special",era:"intergalactic",reqs:{science:19},grant:["ascension",1],not_trait:["orbit_decay","witch_hunter"],cost:{Knowledge:()=>175e5,Phage:()=>25},effect:()=>z("tech_incorporeal_effect"),action(){return!!Cs($(this)[0])}},tech_ascension:{id:"tech-tech_ascension",title:z("tech_ascension"),desc:z("tech_ascension"),category:"special",era:"intergalactic",reqs:{ascension:1},grant:["ascension",2],not_trait:["orbit_decay","witch_hunter"],cost:{Knowledge:()=>185e5,Plasmid:()=>100},effect:()=>z("tech_ascension_effect"),action(){return!!Cs($(this)[0])&&(t.settings.space.sirius=!0,!0)}},terraforming:{id:"tech-terraforming",title:z("tech_terraforming"),desc:z("tech_terraforming"),category:"special",era:"intergalactic",reqs:{science:19},path:["standard"],grant:["terraforming",1],trait:["orbit_decay"],cost:{Knowledge:()=>18e6},effect:()=>z("tech_terraforming_effect",[ea().red]),action(){return!!Cs($(this)[0])&&(t.space.terraformer={count:0},!0)}},cement_processing:{id:"tech-cement_processing",title:z("tech_cement_processing"),desc:z("tech_cement_processing"),category:"ai_core",era:"interstellar",reqs:{high_tech:15},not_trait:["flier"],grant:["ai_core",1],cost:{Knowledge:()=>175e4},effect:z("tech_cement_processing_effect"),action(){return!!Cs($(this)[0])}},adamantite_processing_flier:{id:"tech-adamantite_processing_flier",title:z("tech_adamantite_processing"),desc:z("tech_adamantite_processing"),category:"ai_core",era:"interstellar",reqs:{high_tech:15},trait:["flier"],grant:["ai_core",2],cost:{Knowledge:()=>2e6},effect:z("tech_adamantite_processing_effect"),action(){return!!Cs($(this)[0])}},adamantite_processing:{id:"tech-adamantite_processing",title:z("tech_adamantite_processing"),desc:z("tech_adamantite_processing"),category:"ai_core",era:"interstellar",reqs:{ai_core:1},not_trait:["flier"],grant:["ai_core",2],cost:{Knowledge:()=>2e6},effect:z("tech_adamantite_processing_effect"),action(){return!!Cs($(this)[0])}},graphene_processing:{id:"tech-graphene_processing",title:z("tech_graphene_processing"),desc:z("tech_graphene_processing"),category:"ai_core",era:"intergalactic",reqs:{ai_core:2},grant:["ai_core",3],cost:{Knowledge:()=>25e5},effect:z("tech_graphene_processing_effect"),action(){return!!Cs($(this)[0])}},fusion_power:{id:"tech-fusion_power",title:z("tech_fusion_power"),desc:z("tech_fusion_power"),category:"power_generation",era:"interstellar",reqs:{ram_scoop:1},grant:["fusion",1],cost:{Knowledge:()=>64e4},effect:z("tech_fusion_power_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.fusion={count:0,on:0},!0)}},infernium_power:{id:"tech-infernium_power",title:z("tech_infernium_power"),desc:z("tech_infernium_power"),category:"power_generation",era:"dimensional",reqs:{smelting:8,hell_ruins:4},grant:["inferno_power",1],cost:{Knowledge:()=>3e7},effect:z("tech_infernium_power_effect"),action(){return!!Cs($(this)[0])&&(t.portal.inferno_power={count:0,on:0},!0)}},thermomechanics:{id:"tech-thermomechanics",title:z("tech_thermomechanics"),desc:z("tech_thermomechanics_desc"),category:"crafting",era:"industrialized",reqs:{high_tech:4},grant:["alloy",1],cost:{Knowledge:()=>6e4},effect:()=>z("tech_thermomechanics_effect"),action(){return!!Cs($(this)[0])}},quantum_manufacturing:{id:"tech-quantum_manufacturing",title:z("tech_quantum_manufacturing"),desc:z("tech_quantum_manufacturing"),category:"crafting",era:"deep_space",reqs:{high_tech:11},grant:["q_factory",1],cost:{Knowledge:()=>465e3},effect:z("tech_quantum_manufacturing_effect"),action(){return!!Cs($(this)[0])}},worker_drone:{id:"tech-worker_drone",title:z("tech_worker_drone"),desc:z("tech_worker_drone"),category:"mining",era:"deep_space",reqs:{nano:1},grant:["drone",1],cost:{Knowledge:()=>4e5},effect:()=>z("tech_worker_drone_effect",[ea().gas_moon]),action(){return!!Cs($(this)[0])&&(t.space.drone={count:0},!0)}},uranium:{id:"tech-uranium",title:z("tech_uranium"),desc:z("tech_uranium"),category:"power_generation",era:"globalized",reqs:{high_tech:4},grant:["uranium",1],cost:{Knowledge:()=>72e3},effect:z("tech_uranium_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Uranium.display=!0,!0)},post(){Ai()}},uranium_storage:{id:"tech-uranium_storage",title:z("tech_uranium_storage"),desc:z("tech_uranium_storage"),category:"storage",era:"globalized",reqs:{uranium:1},grant:["uranium",2],cost:{Knowledge:()=>75600,Alloy:()=>2500},effect:z("tech_uranium_storage_effect"),action(){return!!Cs($(this)[0])}},uranium_ash:{id:"tech-uranium_ash",title:z("tech_uranium_ash"),desc:z("tech_uranium_ash"),category:"power_generation",era:"globalized",reqs:{uranium:2},grant:["uranium",3],cost:{Knowledge:()=>122e3},effect:z("tech_uranium_ash_effect"),action(){return!!Cs($(this)[0])}},breeder_reactor:{id:"tech-breeder_reactor",title:z("tech_breeder_reactor"),desc:z("tech_breeder_reactor"),category:"power_generation",era:"early_space",reqs:{high_tech:5,uranium:3,space:3},grant:["uranium",4],cost:{Knowledge:()=>16e4,Uranium:()=>250,Iridium:()=>1e3},effect:z("tech_breeder_reactor_effect"),action(){return!!Cs($(this)[0])}},mine_conveyor:{id:"tech-mine_conveyor",title:z("tech_mine_conveyor"),desc:z("tech_mine_conveyor"),category:"mining",era:"discovery",reqs:{high_tech:2},grant:["mine_conveyor",1],cost:{Knowledge:()=>16200,Copper:()=>2250,Steel:()=>1750},effect:z("tech_mine_conveyor_effect"),action(){return!!Cs($(this)[0])}},oil_well:{id:"tech-oil_well",title:z("tech_oil_well"),desc:z("tech_oil_well"),category:"power_generation",era:"industrialized",reqs:{high_tech:3},grant:["oil",1],cost:{Knowledge:()=>27e3},effect:z("tech_oil_well_effect"),action(){return!!Cs($(this)[0])&&(t.city.oil_well={count:0},!0)}},oil_depot:{id:"tech-oil_depot",title:z("tech_oil_depot"),desc:z("tech_oil_depot"),category:"storage",era:"industrialized",reqs:{oil:1},grant:["oil",2],cost:{Knowledge:()=>32e3},effect:z("tech_oil_depot_effect"),action(){return!!Cs($(this)[0])&&(t.city.oil_depot={count:0},!0)}},oil_power:{id:"tech-oil_power",title:()=>t.race.environmentalist?z("city_wind_power"):z("tech_oil_power"),desc:()=>t.race.environmentalist?z("city_wind_power"):z("tech_oil_power"),category:"power_generation",era:"industrialized",reqs:{oil:2},grant:["oil",3],cost:{Knowledge:()=>44e3},effect:()=>t.race.environmentalist?z("tech_wind_power_effect"):z("tech_oil_power_effect"),action(){return!!Cs($(this)[0])&&(t.city.oil_power={count:0,on:0},!0)}},titanium_drills:{id:"tech-titanium_drills",title:z("tech_titanium_drills"),desc:z("tech_titanium_drills"),category:"power_generation",era:"industrialized",reqs:{oil:3},grant:["oil",4],cost:{Knowledge:()=>54e3,Titanium:()=>3500},effect:z("tech_titanium_drills_effect"),action(){return!!Cs($(this)[0])}},alloy_drills:{id:"tech-alloy_drills",title:z("tech_alloy_drills"),desc:z("tech_alloy_drills"),category:"power_generation",era:"globalized",reqs:{oil:4},grant:["oil",5],cost:{Knowledge:()=>77e3,Alloy:()=>1e3},effect:z("tech_alloy_drills_effect"),action(){return!!Cs($(this)[0])}},fracking:{id:"tech-fracking",title:z("tech_fracking"),desc:z("tech_fracking"),category:"power_generation",era:"globalized",reqs:{oil:5,high_tech:6},grant:["oil",6],cost:{Knowledge:()=>132e3},effect:z("tech_fracking_effect"),action(){return!!Cs($(this)[0])}},mythril_drills:{id:"tech-mythril_drills",title:z("tech_mythril_drills"),desc:z("tech_mythril_drills"),category:"power_generation",era:"early_space",reqs:{oil:6,space:3},grant:["oil",7],cost:{Knowledge:()=>165e3,Mythril:()=>100},effect:z("tech_mythril_drills_effect"),action(){return!!Cs($(this)[0])}},mass_driver:{id:"tech-mass_driver",title:z("tech_mass_driver"),desc:z("tech_mass_driver"),category:"power_generation",era:"early_space",reqs:{oil:6,space:3},grant:["mass",1],cost:{Knowledge:()=>16e4},effect:z("tech_mass_driver_effect"),action(){return!!Cs($(this)[0])&&(t.city.mass_driver={count:0,on:0},!0)}},orichalcum_driver:{id:"tech-orichalcum_driver",title:z("tech_orichalcum_driver"),desc:z("tech_orichalcum_driver"),category:"science",era:"intergalactic",reqs:{mass:1,science:19},grant:["mass",2],not_trait:["orbit_decayed"],cost:{Knowledge:()=>14e6,Orichalcum:()=>4e5},effect:()=>z("tech_orichalcum_driver_effect"),action(){return!!Cs($(this)[0])&&(t.space.terraformer={count:0},!0)}},polymer:{id:"tech-polymer",title:z("tech_polymer"),desc:z("tech_polymer"),category:"crafting",era:"globalized",reqs:{genetics:1},grant:["polymer",1],cost:{Knowledge:()=>8e4,Oil:()=>5e3,Alloy:()=>450},effect:z("tech_polymer_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Polymer.display=!0,Bi(z("tech_polymer_avail"),"info",!1,["progress"]),!0)},post(){Qs(),Ai()}},fluidized_bed_reactor:{id:"tech-fluidized_bed_reactor",title:z("tech_fluidized_bed_reactor"),desc:z("tech_fluidized_bed_reactor"),category:"crafting",era:"globalized",reqs:{polymer:1,high_tech:6},grant:["polymer",2],cost:{Knowledge:()=>99e3},effect:z("tech_fluidized_bed_reactor_effect"),action(){return!!Cs($(this)[0])}},synthetic_fur:{id:"tech-synthetic_fur",title:()=>t.race.evil?z("tech_faux_leather"):z("tech_synthetic_fur"),desc:()=>t.race.evil?z("tech_faux_leather"):z("tech_synthetic_fur"),category:"crafting",era:"globalized",reqs:{polymer:1},grant:["synthetic_fur",1],cost:{Knowledge:()=>1e5,Polymer:()=>2500},effect:()=>t.race.evil?z("tech_faux_leather_effect"):z("tech_synthetic_fur_effect"),action(){return!!Cs($(this)[0])},post(){Qs()}},nanoweave:{id:"tech-nanoweave",title:z("tech_nanoweave"),desc:z("tech_nanoweave"),category:"crafting",era:"intergalactic",reqs:{science:18},grant:["nanoweave",1],cost:{Knowledge:()=>85e5,Nano_Tube:()=>5e6,Vitreloy:()=>25e4},effect:z("tech_nanoweave_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Nanoweave.display=!0,Bi(z("tech_nanoweave_avail"),"info",!1,["progress"]),ma(),!0)},post(){Ai()}},stanene:{id:"tech-stanene",title:z("tech_stanene"),desc:z("tech_stanene"),category:"crafting",era:"interstellar",reqs:{infernite:1},grant:["stanene",1],cost:{Knowledge:()=>59e4,Aluminium:()=>5e5,Infernite:()=>1e3},effect:z("tech_stanene_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Stanene.display=!0,Bi(z("tech_stanene_avail"),"info",!1,["progress"]),!0)},post(){Qs(),Ai()}},nano_tubes:{id:"tech-nano_tubes",title:z("tech_nano_tubes"),desc:z("tech_nano_tubes"),category:"crafting",era:"deep_space",reqs:{high_tech:10},grant:["nano",1],cost:{Knowledge:()=>375e3,Coal:()=>1e5,Neutronium:()=>1e3},effect:z("tech_nano_tubes_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Nano_Tube.display=!0,Bi(z("tech_nano_tubes_msg"),"info",!1,["progress"]),!0)},post(){Qs(),Ai()}},scarletite:{id:"tech-scarletite",title:z("tech_scarletite"),desc:z("tech_scarletite"),category:"crafting",era:"dimensional",reqs:{hell_ruins:4},grant:["scarletite",1],cost:{Knowledge:()=>2675e4,Iron:()=>1e8,Adamantite:()=>15e6,Orichalcum:()=>8e6},effect:z("tech_scarletite_effect"),action(){if(Cs($(this)[0])){if(t.resource.Scarletite.display=!0,t.portal.hell_forge={count:0,on:0},Bi(z("tech_scarletite_avail"),"info",!1,["progress"]),ma(),"micro"===t.race.universe||t.pillars[t.race.species]){let e=so();e>t.pillars[t.race.species]&&(t.pillars[t.race.species]=e),t.tech.pillars=2}else t.tech.fusable=1;return!0}return!1},post(){Ai()}},pillars:{id:"tech-pillars",title:z("tech_pillars"),desc:z("tech_pillars"),category:"hell_dimension",era:"dimensional",reqs:{scarletite:1,fusable:1},grant:["pillars",1],cost:{Knowledge:()=>3e7},effect:z("tech_pillars_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_pillars_msg",[_i[t.race.species].entity]),"info",!1,["progress","hell"]),!0)}},reclaimer:{id:"tech-reclaimer",title:z("tech_reclaimer"),desc:z("tech_reclaimer_desc"),category:"reclaimer",era:"civilized",reqs:{primitive:3},grant:["reclaimer",1],trait:["evil"],condition:()=>!(t.race.kindling_kindred||t.race.smoldering||"wendigo"!==t.race.species&&t.race.soul_eater),cost:{Knowledge:()=>45,Lumber:()=>20,Stone:()=>20},effect:z("tech_reclaimer_effect"),action(){return!!Cs($(this)[0])&&(t.civic.lumberjack.name=z("job_reclaimer"),t.civic.lumberjack.display=!0,t.city.graveyard={count:0},!0)}},shovel:{id:"tech-shovel",title:z("tech_shovel"),desc:z("tech_shovel"),category:"reclaimer",era:"civilized",reqs:{reclaimer:1,mining:2},grant:["reclaimer",2],trait:["evil"],not_trait:["living_tool"],condition:()=>!(t.race.kindling_kindred||t.race.smoldering||"wendigo"!==t.race.species&&t.race.soul_eater),cost:{Knowledge:()=>540,Copper:()=>25},effect:z("tech_shovel_effect"),action(){return!!Cs($(this)[0])}},iron_shovel:{id:"tech-iron_shovel",title:z("tech_iron_shovel"),desc:z("tech_iron_shovel"),category:"reclaimer",era:"civilized",reqs:{reclaimer:2,mining:3},grant:["reclaimer",3],trait:["evil"],not_trait:["living_tool"],condition:()=>!(t.race.kindling_kindred||t.race.smoldering||"wendigo"!==t.race.species&&t.race.soul_eater),cost:{Knowledge:()=>2700,Iron:()=>250},effect:z("tech_iron_shovel_effect"),action(){return!!Cs($(this)[0])}},steel_shovel:{id:"tech-steel_shovel",title:z("tech_steel_shovel"),desc:z("tech_steel_shovel"),category:"reclaimer",era:"discovery",reqs:{reclaimer:3,smelting:2},grant:["reclaimer",4],trait:["evil"],not_trait:["living_tool"],condition:()=>!(t.race.kindling_kindred||t.race.smoldering||"wendigo"!==t.race.species&&t.race.soul_eater),cost:{Knowledge:()=>9e3,Steel:()=>250},effect:z("tech_steel_shovel_effect"),action(){return!!Cs($(this)[0])}},titanium_shovel:{id:"tech-titanium_shovel",title:z("tech_titanium_shovel"),desc:z("tech_titanium_shovel"),category:"reclaimer",era:"industrialized",reqs:{reclaimer:4,high_tech:3},grant:["reclaimer",5],trait:["evil"],not_trait:["living_tool"],condition:()=>!(t.race.kindling_kindred||t.race.smoldering||"wendigo"!==t.race.species&&t.race.soul_eater),cost:{Knowledge:()=>38e3,Titanium:()=>350},effect:z("tech_titanium_shovel_effect"),action(){return!!Cs($(this)[0])}},alloy_shovel:{id:"tech-alloy_shovel",title:z("tech_alloy_shovel"),desc:z("tech_alloy_shovel"),category:"reclaimer",era:"globalized",reqs:{reclaimer:5,high_tech:4},grant:["reclaimer",6],trait:["evil"],not_trait:["living_tool"],condition:()=>!(t.race.kindling_kindred||t.race.smoldering||"wendigo"!==t.race.species&&t.race.soul_eater),cost:{Knowledge:()=>67500,Alloy:()=>750},effect:z("tech_alloy_shovel_effect"),action(){return!!Cs($(this)[0])}},mythril_shovel:{id:"tech-mythril_shovel",title:z("tech_mythril_shovel"),desc:z("tech_mythril_shovel"),category:"reclaimer",era:"early_space",reqs:{reclaimer:6,space:3},grant:["reclaimer",7],trait:["evil"],not_trait:["living_tool"],condition:()=>!(t.race.kindling_kindred||t.race.smoldering||"wendigo"!==t.race.species&&t.race.soul_eater),cost:{Knowledge:()=>16e4,Mythril:()=>880},effect:z("tech_mythril_shovel_effect"),action(){return!!Cs($(this)[0])}},adamantite_shovel:{id:"tech-adamantite_shovel",title:z("tech_adamantite_shovel"),desc:z("tech_adamantite_shovel"),category:"reclaimer",era:"interstellar",reqs:{reclaimer:7,alpha:2},grant:["reclaimer",8],trait:["evil"],condition:()=>!(t.race.kindling_kindred||t.race.smoldering||"wendigo"!==t.race.species&&t.race.soul_eater),cost:{Knowledge:()=>525e3,Adamantite:()=>1e4},effect:z("tech_adamantite_shovel_effect"),action(){return!!Cs($(this)[0])}},stone_axe:{id:"tech-stone_axe",title:()=>z("tech_stone_axe"),desc:()=>z("tech_stone_axe_desc"),category:"lumber_gathering",reqs:{primitive:3},era:"civilized",grant:["axe",1],not_trait:["kindling_kindred","smoldering","evil","cataclysm"],cost:{Knowledge:()=>45,Lumber:()=>20,Stone:()=>20},effect:()=>t.race.living_tool?z("tech_basic_livingtools"):t.race.sappy?z("tech_amber_axe_effect"):z("tech_stone_axe_effect"),action(){return!!Cs($(this)[0])&&(t.civic.lumberjack.display=!0,t.city.lumber_yard={count:0},!0)}},copper_axes:{id:"tech-copper_axes",title:z("tech_copper_axes"),desc:z("tech_copper_axes_desc"),category:"lumber_gathering",era:"civilized",reqs:{axe:1,mining:2},not_trait:["living_tool"],grant:["axe",2],cost:{Knowledge:()=>540,Copper:()=>25},effect:z("tech_copper_axes_effect"),action(){return!!Cs($(this)[0])}},iron_saw:{id:"tech-iron_saw",title:z("tech_iron_saw"),desc:z("tech_iron_saw_desc"),category:"lumber_gathering",era:"civilized",reqs:{axe:1,mining:3},grant:["saw",1],not_trait:["lone_survivor"],cost:{Knowledge:()=>3375,Iron:()=>400},effect:z("tech_iron_saw_effect"),action(){return!!Cs($(this)[0])&&(t.city.sawmill={count:0,on:0},!0)}},steel_saw:{id:"tech-steel_saw",title:z("tech_steel_saw"),desc:z("tech_steel_saw_desc"),category:"lumber_gathering",era:"discovery",reqs:{smelting:2,saw:1},grant:["saw",2],cost:{Knowledge:()=>10800,Steel:()=>400},effect:z("tech_steel_saw_effect"),action(){return!!Cs($(this)[0])}},iron_axes:{id:"tech-iron_axes",title:z("tech_iron_axes"),desc:z("tech_iron_axes_desc"),category:"lumber_gathering",era:"civilized",reqs:{axe:2,mining:3},not_trait:["living_tool"],grant:["axe",3],cost:{Knowledge:()=>t.city.ptrait.includes("unstable")?1350:2700,Iron:()=>250},effect:z("tech_iron_axes_effect"),action(){return!!Cs($(this)[0])}},steel_axes:{id:"tech-steel_axes",title:z("tech_steel_axes"),desc:z("tech_steel_axes_desc"),category:"lumber_gathering",era:"discovery",reqs:{axe:3,smelting:2},not_trait:["living_tool"],grant:["axe",4],cost:{Knowledge:()=>9e3,Steel:()=>250},effect:z("tech_steel_axes_effect"),action(){return!!Cs($(this)[0])}},titanium_axes:{id:"tech-titanium_axes",title:z("tech_titanium_axes"),desc:z("tech_titanium_axes_desc"),category:"lumber_gathering",era:"industrialized",reqs:{axe:4,high_tech:3},not_trait:["living_tool"],grant:["axe",5],cost:{Knowledge:()=>38e3,Titanium:()=>350},effect:z("tech_titanium_axes_effect"),action(){return!!Cs($(this)[0])}},chainsaws:{id:"tech-chainsaws",title:z("tech_chainsaws"),desc:z("tech_chainsaws_desc"),category:"lumber_gathering",era:"interstellar",reqs:{axe:5,alpha:2},not_trait:["living_tool"],grant:["axe",6],cost:{Knowledge:()=>56e4,Oil:()=>1e4,Adamantite:()=>2e3},effect:z("tech_chainsaws_effect"),action(){return!!Cs($(this)[0])},flair:()=>`
    ${z("tech_chainsaws_flair1")}
    ${z("tech_chainsaws_flair2")}
    `},copper_sledgehammer:{id:"tech-copper_sledgehammer",title:z("tech_copper_sledgehammer"),desc:z("tech_copper_sledgehammer_desc"),category:"stone_gathering",era:"civilized",reqs:{mining:2},not_trait:["cataclysm","sappy","living_tool"],grant:["hammer",1],cost:{Knowledge:()=>540,Copper:()=>25},effect:z("tech_copper_sledgehammer_effect"),action(){return!!Cs($(this)[0])}},iron_sledgehammer:{id:"tech-iron_sledgehammer",title:z("tech_iron_sledgehammer"),desc:z("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:()=>t.city.ptrait.includes("unstable")?1350:2700,Iron:()=>250},effect:z("tech_iron_sledgehammer_effect"),action(){return!!Cs($(this)[0])}},steel_sledgehammer:{id:"tech-steel_sledgehammer",title:z("tech_steel_sledgehammer"),desc:z("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:()=>7200,Steel:()=>250},effect:z("tech_steel_sledgehammer_effect"),action(){return!!Cs($(this)[0])}},titanium_sledgehammer:{id:"tech-titanium_sledgehammer",title:z("tech_titanium_sledgehammer"),desc:z("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:()=>4e4,Titanium:()=>400},effect:z("tech_titanium_sledgehammer_effect"),action(){return!!Cs($(this)[0])}},copper_pickaxe:{id:"tech-copper_pickaxe",title:z("tech_copper_pickaxe"),desc:z("tech_copper_pickaxe_desc"),category:"mining",era:"civilized",reqs:{mining:2},not_trait:["cataclysm","living_tool"],grant:["pickaxe",1],cost:{Knowledge:()=>675,Copper:()=>25},effect:z("tech_copper_pickaxe_effect"),action(){return!!Cs($(this)[0])}},iron_pickaxe:{id:"tech-iron_pickaxe",title:z("tech_iron_pickaxe"),desc:z("tech_iron_pickaxe_desc"),category:"mining",era:"civilized",reqs:{pickaxe:1,mining:3},not_trait:["cataclysm","living_tool"],grant:["pickaxe",2],cost:{Knowledge:()=>t.city.ptrait.includes("unstable")?1600:3200,Iron:()=>250},effect:z("tech_iron_pickaxe_effect"),action(){return!!Cs($(this)[0])}},steel_pickaxe:{id:"tech-steel_pickaxe",title:z("tech_steel_pickaxe"),desc:z("tech_steel_pickaxe_desc"),category:"mining",era:"discovery",reqs:{pickaxe:2,smelting:2},not_trait:["living_tool"],grant:["pickaxe",3],cost:{Knowledge:()=>9e3,Steel:()=>250},effect:z("tech_steel_pickaxe_effect"),action(){return!!Cs($(this)[0])}},jackhammer:{id:"tech-jackhammer",title:z("tech_jackhammer"),desc:z("tech_jackhammer_desc"),category:"mining",era:"discovery",reqs:{pickaxe:3,high_tech:2},not_trait:["living_tool"],grant:["pickaxe",4],cost:{Knowledge:()=>22500,Copper:()=>5e3},effect:z("tech_jackhammer_effect"),action(){return!!Cs($(this)[0])}},jackhammer_mk2:{id:"tech-jackhammer_mk2",title:z("tech_jackhammer_mk2"),desc:z("tech_jackhammer_mk2"),category:"mining",era:"globalized",reqs:{pickaxe:4,high_tech:4},not_trait:["living_tool"],grant:["pickaxe",5],cost:{Knowledge:()=>67500,Titanium:()=>2e3,Alloy:()=>500},effect:z("tech_jackhammer_mk2_effect"),action(){return!!Cs($(this)[0])}},adamantite_hammer:{id:"tech-adamantite_hammer",title:z("tech_adamantite_hammer"),desc:z("tech_adamantite_hammer"),category:"mining",era:"interstellar",reqs:{pickaxe:5,alpha:2},not_trait:["living_tool"],grant:["pickaxe",6],cost:{Knowledge:()=>535e3,Adamantite:()=>12500},effect:z("tech_adamantite_hammer_effect"),action(){return!!Cs($(this)[0])}},copper_hoe:{id:"tech-copper_hoe",title:z("tech_copper_hoe"),desc:z("tech_copper_hoe_desc"),category:"agriculture",era:"civilized",reqs:{mining:2,agriculture:1},not_trait:["cataclysm","living_tool"],grant:["hoe",1],cost:{Knowledge:()=>720,Copper:()=>50},effect:z("tech_copper_hoe_effect"),action(){return!!Cs($(this)[0])}},iron_hoe:{id:"tech-iron_hoe",title:z("tech_iron_hoe"),desc:z("tech_iron_hoe_desc"),category:"agriculture",era:"civilized",reqs:{hoe:1,mining:3,agriculture:1},not_trait:["living_tool"],grant:["hoe",2],cost:{Knowledge:()=>t.city.ptrait.includes("unstable")?1800:3600,Iron:()=>500},effect:z("tech_iron_hoe_effect"),action(){return!!Cs($(this)[0])}},steel_hoe:{id:"tech-steel_hoe",title:z("tech_steel_hoe"),desc:z("tech_steel_hoe_desc"),category:"agriculture",era:"discovery",reqs:{hoe:2,smelting:2,agriculture:1},not_trait:["living_tool"],grant:["hoe",3],cost:{Knowledge:()=>12600,Steel:()=>500},effect:z("tech_steel_hoe_effect"),action(){return!!Cs($(this)[0])}},titanium_hoe:{id:"tech-titanium_hoe",title:z("tech_titanium_hoe"),desc:z("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:()=>44e3,Titanium:()=>500},effect:z("tech_titanium_hoe_effect"),action(){return!!Cs($(this)[0])}},adamantite_hoe:{id:"tech-adamantite_hoe",title:z("tech_adamantite_hoe"),desc:z("tech_adamantite_hoe_desc"),category:"agriculture",era:"interstellar",reqs:{hoe:4,alpha:2},not_trait:["living_tool"],grant:["hoe",5],cost:{Knowledge:()=>53e4,Adamantite:()=>1e3},effect:z("tech_adamantite_hoe_effect"),action(){return!!Cs($(this)[0])}},cyber_limbs:{id:"tech-cyber_limbs",title:z("tech_cyber_limbs"),desc:z("tech_cyber_limbs"),category:"mining",era:"dimensional",reqs:{high_tech:18},grant:["cyber_worker",1],cost:{Knowledge:()=>27e6},effect:z("tech_cyber_limbs_effect"),action(){return!!Cs($(this)[0])}},slave_pens:{id:"tech-slave_pens",title:z("tech_slave_pens"),desc:z("tech_slave_pens"),category:"slaves",era:"civilized",reqs:{military:1,mining:1},not_trait:["cataclysm","lone_survivor"],grant:["slaves",1],trait:["slaver"],cost:{Knowledge:()=>150},effect:z("tech_slave_pens_effect"),action(){return!!Cs($(this)[0])&&(t.city.slave_pen={count:0,slaves:0},!0)}},slave_market:{id:"tech-slave_market",title:z("tech_slave_market"),desc:z("tech_slave_market"),category:"slaves",era:"discovery",reqs:{slaves:1,high_tech:1},grant:["slaves",2],trait:["slaver"],cost:{Knowledge:()=>8e3},effect:z("tech_slave_market_effect"),action(){return!!Cs($(this)[0])}},ceremonial_dagger:{id:"tech-ceremonial_dagger",title:z("tech_ceremonial_dagger"),desc:z("tech_ceremonial_dagger"),category:"sacrifice",era:"civilized",reqs:{mining:1},grant:["sacrifice",1],trait:["cannibalize"],not_trait:["cataclysm","lone_survivor"],cost:{Knowledge:()=>60},effect:z("tech_ceremonial_dagger_effect"),action(){return!!Cs($(this)[0])}},last_rites:{id:"tech-last_rites",title:z("tech_last_rites"),desc:z("tech_last_rites"),category:"sacrifice",era:"civilized",reqs:{sacrifice:1,theology:2},grant:["sacrifice",2],trait:["cannibalize"],cost:{Knowledge:()=>1e3},effect:z("tech_last_rites_effect"),action(){return!!Cs($(this)[0])}},ancient_infusion:{id:"tech-ancient_infusion",title:z("tech_ancient_infusion"),desc:z("tech_ancient_infusion"),category:"sacrifice",era:"early_space",reqs:{sacrifice:2,theology:4},grant:["sacrifice",3],trait:["cannibalize"],cost:{Knowledge:()=>182e3},effect:z("tech_ancient_infusion_effect"),action(){return!!Cs($(this)[0])}},garrison:{id:"tech-garrison",title:z("tech_garrison"),desc:z("tech_garrison_desc"),category:"military",era:"civilized",reqs:{science:1,housing:1},grant:["military",1],cost:{Knowledge:()=>70},effect:z("tech_garrison_effect"),action(){return!!Cs($(this)[0])&&(t.city.garrison={count:0,on:0},!0)}},mercs:{id:"tech-mercs",title:z("tech_mercs"),desc:z("tech_mercs_desc"),category:"military",era:"civilized",reqs:{military:1},grant:["mercs",1],not_trait:["lone_survivor"],cost:{Money:()=>1e4,Knowledge:()=>4500},effect:z("tech_mercs_effect"),action(){return!!Cs($(this)[0])&&(t.civic.garrison.mercs=!0,!0)}},signing_bonus:{id:"tech-signing_bonus",title:z("tech_signing_bonus"),desc:z("tech_signing_bonus_desc"),category:"military",era:"industrialized",reqs:{mercs:1,high_tech:3},grant:["mercs",2],cost:{Money:()=>5e4,Knowledge:()=>32e3},effect:z("tech_signing_bonus_effect"),action(){return!!Cs($(this)[0])}},hospital:{id:"tech-hospital",title:z("tech_hospital"),desc:z("tech_hospital"),category:"military",era:"civilized",reqs:{military:1,alumina:1},grant:["medic",1],not_trait:["artifical"],cost:{Knowledge:()=>5e3},effect:z("tech_hospital_effect"),action(){return!!Cs($(this)[0])&&(t.city.hospital={count:0},!0)}},bac_tanks:{id:"tech-bac_tanks",title:()=>t.race.artifical?z("tech_repair_subroutines"):z("tech_bac_tanks"),desc:()=>t.race.artifical?z("tech_repair_subroutines"):z("tech_bac_tanks_desc"),category:"military",era:"interstellar",reqs:{medic:1,infernite:1},grant:["medic",2],cost:{Knowledge:()=>6e5,Infernite:()=>250},effect:()=>t.race.artifical?z("tech_repair_subroutines_effect"):z("tech_bac_tanks_effect"),action(){return!!Cs($(this)[0])}},boot_camp:{id:"tech-boot_camp",title:z("tech_boot_camp"),desc:z("tech_boot_camp_desc"),category:"military",era:"discovery",reqs:{high_tech:1},grant:["boot_camp",1],cost:{Knowledge:()=>8e3},effect:z("tech_boot_camp_effect"),action(){return!!Cs($(this)[0])&&(t.city.boot_camp={count:0},!0)}},vr_training:{id:"tech-vr_training",title:z("tech_vr_training"),desc:z("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:()=>625e3},effect:()=>z("tech_vr_training_effect"),action(){return!!Cs($(this)[0])}},bows:{id:"tech-bows",title:z("tech_bows"),desc:z("tech_bows_desc"),category:"military",era:"civilized",reqs:{military:1},grant:["military",2],cost:{Knowledge:()=>225,Lumber:()=>250},effect:z("tech_bows_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update")}},flintlock_rifle:{id:"tech-flintlock_rifle",title:()=>"magic"===t.race.universe?z("tech_magic_arrow"):z("tech_flintlock_rifle"),desc:()=>"magic"===t.race.universe?z("tech_magic_arrow"):z("tech_flintlock_rifle"),category:"military",era:"civilized",reqs:{military:2,explosives:1},grant:["military",3],cost:{Knowledge:()=>5400,Coal:()=>"magic"===t.race.universe?0:750,Mana:()=>"magic"===t.race.universe?100:0},effect:()=>"magic"===t.race.universe?z("tech_magic_arrow_effect"):z("tech_flintlock_rifle_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update")}},machine_gun:{id:"tech-machine_gun",title:()=>"magic"===t.race.universe?z("tech_fire_mage"):z("tech_machine_gun"),desc:()=>"magic"===t.race.universe?z("tech_fire_mage"):z("tech_machine_gun"),category:"military",era:"industrialized",reqs:{military:3,oil:1},grant:["military",4],cost:{Mana:()=>"magic"===t.race.universe?300:0,Knowledge:()=>33750,Oil:()=>1500},effect:z("tech_machine_gun_effect"),effect:()=>"magic"===t.race.universe?z("tech_fire_mage_effect"):z("tech_machine_gun_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update")}},bunk_beds:{id:"tech-bunk_beds",title:z("tech_bunk_beds"),desc:z("tech_bunk_beds"),category:"military",era:"globalized",reqs:{military:4,high_tech:4},grant:["military",5],cost:{Knowledge:()=>76500,Furs:()=>25e3,Alloy:()=>3e3},effect:z("tech_bunk_beds_effect"),action(){return!!Cs($(this)[0])}},rail_guns:{id:"tech-rail_guns",title:()=>"magic"===t.race.universe?z("tech_lightning_caster"):z("tech_rail_guns"),desc:()=>"magic"===t.race.universe?z("tech_lightning_caster"):z("tech_rail_guns"),category:"military",era:"early_space",reqs:{military:5,mass:1},grant:["military",6],cost:{Mana:()=>"magic"===t.race.universe?450:0,Knowledge:()=>2e5,Iridium:()=>2500},effect:()=>"magic"===t.race.universe?z("tech_lightning_caster_effect"):z("tech_rail_guns_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update")}},laser_rifles:{id:"tech-laser_rifles",title:()=>"magic"===t.race.universe?z("tech_mana_rifles"):z("tech_laser_rifles"),desc:()=>"magic"===t.race.universe?z("tech_mana_rifles"):z("tech_laser_rifles"),category:"military",era:"deep_space",reqs:{military:6,high_tech:9,elerium:1},grant:["military",7],cost:{Knowledge:()=>325e3,Elerium:()=>250},effect:()=>"magic"===t.race.universe?z("tech_mana_rifles_effect"):z("tech_laser_rifles_effect"),action(){return!!Cs($(this)[0])&&("sharkin"===t.race.species&&eo("laser_shark"),!0)},post(){ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update")}},plasma_rifles:{id:"tech-plasma_rifles",title:()=>"magic"===t.race.universe?z("tech_focused_rifles"):z("tech_plasma_rifles"),desc:()=>"magic"===t.race.universe?z("tech_focused_rifles"):z("tech_plasma_rifles"),category:"military",era:"interstellar",reqs:{military:7,high_tech:13},grant:["military",8],path:["standard","truepath"],cost:{Knowledge:()=>78e4,Elerium:()=>t.race.truepath?1e3:500},effect:()=>"magic"===t.race.universe?z("tech_focused_rifles_effect"):z("tech_plasma_rifles_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update")}},disruptor_rifles:{id:"tech-disruptor_rifles",title:()=>"magic"===t.race.universe?z("tech_magic_missile"):z("tech_disruptor_rifles"),desc:()=>"magic"===t.race.universe?z("tech_magic_missile"):z("tech_disruptor_rifles"),category:"military",era:"interstellar",reqs:{military:8,high_tech:14,science:15,infernite:1},grant:["military",9],cost:{Knowledge:()=>1e6,Infernite:()=>1e3},effect:()=>"magic"===t.race.universe?z("tech_magic_missile_effect"):z("tech_disruptor_rifles_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update")}},gauss_rifles:{id:"tech-gauss_rifles",title:()=>"magic"===t.race.universe?z("tech_magicword_kill"):z("tech_gauss_rifles"),desc:()=>"magic"===t.race.universe?z("tech_magicword_kill"):z("tech_gauss_rifles"),category:"military",era:"intergalactic",reqs:{military:9,science:18},grant:["military",10],cost:{Knowledge:()=>95e5,Bolognium:()=>1e5},effect:()=>"magic"===t.race.universe?z("tech_magicword_kill_effect"):z("tech_gauss_rifles_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update")}},cyborg_soldiers:{id:"tech-cyborg_soldiers",title:z("tech_cyborg_soldiers"),desc:z("tech_cyborg_soldiers"),category:"military",era:"dimensional",reqs:{military:10,high_tech:18},grant:["military",11],cost:{Knowledge:()=>26e6,Adamantite:()=>8e6,Bolognium:()=>4e6,Orichalcum:()=>6e6},effect:z("tech_cyborg_soldiers_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update")}},space_marines:{id:"tech-space_marines",title:z("tech_space_marines"),desc:z("tech_space_marines_desc"),category:"military",era:"early_space",reqs:{space:3,mars:2},grant:["marines",1],cost:{Knowledge:()=>21e4},effect:()=>`
    ${z("tech_space_marines_effect",[ea().red])}
    `,action(){return!!Cs($(this)[0])&&(t.space.space_barracks={count:0,on:0},!0)},flair:z("tech_space_marines_flair")},hammocks:{id:"tech-hammocks",title:z("tech_hammocks"),desc:z("tech_hammocks"),category:"military",era:"intergalactic",reqs:{marines:1,nanoweave:1},grant:["marines",2],cost:{Knowledge:()=>89e5,Nanoweave:()=>3e4},effect:()=>z("tech_hammocks_effect"),action(){return!!Cs($(this)[0])}},cruiser:{id:"tech-cruiser",title:z("tech_cruiser"),desc:z("tech_cruiser"),category:"military",era:"interstellar",reqs:{high_tech:14,proxima:2,aerogel:1},grant:["cruiser",1],cost:{Knowledge:()=>86e4},effect:z("tech_cruiser_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.cruiser={count:0,on:0},!0)}},armor:{id:"tech-armor",title:z("tech_armor"),desc:z("tech_armor_desc"),category:"military",era:"civilized",reqs:{military:1},not_trait:["apex_predator"],grant:["armor",1],cost:{Money:()=>250,Knowledge:()=>225,Furs:()=>250},effect:z("tech_armor_effect"),action(){return!!Cs($(this)[0])}},plate_armor:{id:"tech-plate_armor",title:z("tech_plate_armor"),desc:z("tech_plate_armor_desc"),category:"military",era:"civilized",reqs:{armor:1,mining:3},grant:["armor",2],cost:{Knowledge:()=>3400,Iron:()=>600},effect:z("tech_plate_armor_effect"),action(){return!!Cs($(this)[0])}},kevlar:{id:"tech-kevlar",title:z("tech_kevlar"),desc:z("tech_kevlar_desc"),category:"military",era:"globalized",reqs:{armor:2,polymer:1},grant:["armor",3],cost:{Knowledge:()=>86e3,Polymer:()=>750},effect:z("tech_kevlar_effect"),action(){return!!Cs($(this)[0])}},nanoweave_vest:{id:"tech-nanoweave_vest",title:z("tech_nanoweave_vest"),desc:z("tech_nanoweave_vest"),category:"military",era:"intergalactic",reqs:{armor:3,nanoweave:1},grant:["armor",4],cost:{Knowledge:()=>925e4,Nanoweave:()=>75e3},effect:z("tech_nanoweave_vest_effect"),action(){return!!Cs($(this)[0])}},laser_turret:{id:"tech-laser_turret",title:z("tech_laser_turret"),desc:z("tech_laser_turret"),category:"hell_dimension",era:"interstellar",reqs:{high_tech:9,portal:2},grant:["turret",1],cost:{Knowledge:()=>6e5,Elerium:()=>100},effect:()=>`
    ${z("tech_laser_turret_effect1")}
    ${z("tech_laser_turret_effect2")}
    `,action(){return!!Cs($(this)[0])},post(){ic({el:"#fort"},"update"),Ls(!1,["portal-turret"])}},plasma_turret:{id:"tech-plasma_turret",title:z("tech_plasma_turret"),desc:z("tech_plasma_turret"),category:"hell_dimension",era:"interstellar",reqs:{high_tech:13,turret:1},grant:["turret",2],cost:{Knowledge:()=>76e4,Elerium:()=>350},effect:()=>`
    ${z("tech_plasma_turret_effect")}
    ${z("tech_laser_turret_effect2")}
    `,action(){return!!Cs($(this)[0])},post(){ic({el:"#fort"},"update"),Ls(!1,["portal-turret"])}},black_powder:{id:"tech-black_powder",title:()=>"magic"===t.race.universe?z("tech_magic_powder"):z("tech_black_powder"),desc:()=>"magic"===t.race.universe?z("tech_magic_powder_desc"):z("tech_black_powder_desc"),category:"progress",era:"civilized",reqs:{mining:4},grant:["explosives",1],cost:{Knowledge:()=>4500,Mana:()=>"magic"===t.race.universe?100:0,Crystal:()=>"magic"===t.race.universe?250:0,Coal:()=>"magic"===t.race.universe?300:500},effect:()=>"magic"===t.race.universe?z("tech_magic_powder_effect"):z("tech_black_powder_effect"),action(){return!!Cs($(this)[0])}},dynamite:{id:"tech-dynamite",title:z("tech_dynamite"),desc:z("tech_dynamite"),category:"mining",era:"civilized",reqs:{explosives:1},grant:["explosives",2],cost:{Knowledge:()=>4800,Coal:()=>750},effect:z("tech_dynamite_effect"),action(){return!!Cs($(this)[0])}},anfo:{id:"tech-anfo",title:z("tech_anfo"),desc:z("tech_anfo"),category:"mining",era:"industrialized",reqs:{explosives:2,oil:1},grant:["explosives",3],cost:{Knowledge:()=>42e3,Oil:()=>2500},effect:z("tech_anfo_effect"),action(){return!!Cs($(this)[0])}},mad:{id:"tech-mad",title:z("tech_mad"),desc:z("tech_mad_desc"),category:"special",era:"globalized",reqs:{uranium:1,explosives:3,high_tech:7},not_trait:["cataclysm","lone_survivor"],grant:["mad",1],condition:()=>!(t.race.sludge||t.race.truepath&&!t.tech.world_control),cost:{Knowledge:()=>12e4,Oil:()=>t.city.ptrait.includes("dense")?1e4:8500,Uranium:()=>1250},effect:()=>t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?z("tech_mad_effect_easter"):z("tech_mad_effect"),action(){return!!Cs($(this)[0])&&(t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?Bi(z("tech_mad_info_easter"),"info",!1,["progress"]):Bi(z("tech_mad_info"),"info",!1,["progress"]),t.civic.mad.display=!0,!0)}},cement:{id:"tech-cement",title:z("tech_cement"),desc:z("tech_cement_desc"),category:"cement",era:"civilized",reqs:{mining:1,storage:1,science:1},not_trait:["flier"],grant:["cement",1],cost:{Knowledge:()=>500},effect:z("tech_cement_effect"),action(){return!!Cs($(this)[0])&&(t.city.cement_plant={count:0,on:0},!0)}},rebar:{id:"tech-rebar",title:z("tech_rebar"),desc:z("tech_rebar"),category:"cement",era:"civilized",reqs:{mining:3,cement:1},not_trait:["flier"],grant:["cement",2],cost:{Knowledge:()=>3200,Iron:()=>750},effect:z("tech_rebar_effect"),action(){return!!Cs($(this)[0])}},steel_rebar:{id:"tech-steel_rebar",title:z("tech_steel_rebar"),desc:z("tech_steel_rebar"),category:"cement",era:"civilized",reqs:{smelting:2,cement:2},not_trait:["flier"],grant:["cement",3],cost:{Knowledge:()=>6750,Steel:()=>750},effect:z("tech_steel_rebar_effect"),action(){return!!Cs($(this)[0])}},portland_cement:{id:"tech-portland_cement",title:z("tech_portland_cement"),desc:z("tech_portland_cement"),category:"cement",era:"industrialized",reqs:{cement:3,high_tech:3},not_trait:["flier"],grant:["cement",4],cost:{Knowledge:()=>32e3},effect:z("tech_portland_cement_effect"),action(){return!!Cs($(this)[0])}},screw_conveyor:{id:"tech-screw_conveyor",title:z("tech_screw_conveyor"),desc:z("tech_screw_conveyor"),category:"cement",era:"globalized",reqs:{cement:4,high_tech:4},not_trait:["flier"],grant:["cement",5],cost:{Knowledge:()=>72e3},effect:z("tech_screw_conveyor_effect"),action(){return!!Cs($(this)[0])}},adamantite_screws:{id:"tech-adamantite_screws",title:z("tech_adamantite_screws"),desc:z("tech_adamantite_screws"),category:"cement",era:"interstellar",reqs:{cement:5,alpha:2},not_trait:["cataclysm","flier"],grant:["cement",6],cost:{Knowledge:()=>5e5,Adamantite:()=>1e4},effect:z("tech_adamantite_screws_effect",[3]),action(){return!!Cs($(this)[0])}},hunter_process:{id:"tech-hunter_process",title:z("tech_hunter_process"),desc:z("tech_hunter_process"),category:"mining",era:"industrialized",reqs:{high_tech:3,smelting:2},grant:["titanium",1],cost:{Knowledge:()=>45e3,Titanium:()=>1e3},effect:z("tech_hunter_process_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Titanium.value=Za.Titanium,!0)}},kroll_process:{id:"tech-kroll_process",title:z("tech_kroll_process"),desc:z("tech_kroll_process"),category:"mining",era:"globalized",reqs:{titanium:1,high_tech:4},grant:["titanium",2],cost:{Knowledge:()=>78e3,Titanium:()=>1e4},effect:z("tech_kroll_process_effect"),action(){return!!Cs($(this)[0])}},cambridge_process:{id:"tech-cambridge_process",title:z("tech_cambridge_process"),desc:z("tech_cambridge_process"),category:"mining",era:"early_space",reqs:{titanium:2,supercollider:1},grant:["titanium",3],cost:{Knowledge:()=>135e3,Titanium:()=>17500},effect:z("tech_cambridge_process_effect"),action(){return!!Cs($(this)[0])}},pynn_partical:{id:"tech-pynn_partical",title:z("tech_pynn_partical"),desc:z("tech_pynn_partical"),category:"progress",era:"early_space",path:["standard"],reqs:{supercollider:1},grant:["particles",1],cost:{Knowledge:()=>1e5},effect:z("tech_pynn_partical_effect"),action(){return!!Cs($(this)[0])}},matter_compression:{id:"tech-matter_compression",title:z("tech_matter_compression"),desc:z("tech_matter_compression"),category:"storage",era:"early_space",path:["standard"],reqs:{particles:1},grant:["particles",2],cost:{Knowledge:()=>112500},effect:z("tech_matter_compression_effect"),action(){return!!Cs($(this)[0])}},higgs_boson:{id:"tech-higgs_boson",title:z("tech_higgs_boson"),desc:z("tech_higgs_boson"),category:"science",era:"early_space",path:["standard"],reqs:{particles:2,supercollider:2},grant:["particles",3],cost:{Knowledge:()=>125e3},effect:z("tech_higgs_boson_effect"),action(){return!!Cs($(this)[0])}},dimensional_compression:{id:"tech-dimensional_compression",title:z("tech_dimensional_compression"),desc:z("tech_dimensional_compression"),category:"storage",era:"interstellar",reqs:{particles:3,science:11,supercollider:3},grant:["particles",4],cost:{Knowledge:()=>425e3},effect:z("tech_dimensional_compression_effect"),action(){return!!Cs($(this)[0])}},theology:{id:"tech-theology",title:z("tech_theology"),desc:z("tech_theology"),category:"religion",era:"civilized",reqs:{theology:1,housing:1,cement:1},grant:["theology",2],cost:{Knowledge:()=>900},effect:z("tech_theology_effect"),action(){return!!Cs($(this)[0])&&(t.city.temple={count:0},t.race.magnificent&&(t.city.shrine={count:0,morale:0,metal:0,know:0,tax:0}),t.genes.ancients&&t.genes.ancients>=2&&(t.civic.priest.display=!0),!0)}},fanaticism:{id:"tech-fanaticism",title:z("tech_fanaticism"),desc:z("tech_fanaticism"),category:"religion",era:"civilized",wiki:!t.genes.transcendence,reqs:{theology:2},grant:["theology",3],not_gene:["transcendence"],no_queue:()=>!!t.r_queue.queue.some((e=>"tech-anthropology"===e.id)),cost:{Knowledge:()=>2500},effect:`
    ${z("tech_fanaticism_effect")}
    ${z("tech_fanaticism_warning")}
    `,action(){return!!Cs($(this)[0])&&(t.tech.fanaticism=1,t.race.gods===t.race.species&&eo("second_evolution"),Ds(t.race.gods),!0)}},alt_fanaticism:{id:"tech-alt_fanaticism",title:z("tech_fanaticism"),desc:z("tech_fanaticism"),category:"religion",era:"civilized",wiki:!!t.genes.transcendence,reqs:{theology:2},grant:["fanaticism",1],gene:["transcendence"],cost:{Knowledge:()=>2500},effect:`
    ${z("tech_fanaticism_effect")}
    `,action(){return!!Cs($(this)[0])&&(2===t.tech.theology&&(t.tech.theology=3),t.race.gods===t.race.species&&eo("second_evolution"),Ds(t.race.gods),!0)}},ancient_theology:{id:"tech-ancient_theology",title:z("tech_ancient_theology"),desc:z("tech_ancient_theology"),category:"religion",era:"early_space",reqs:{theology:3,mars:2},grant:["theology",4],condition:()=>!!t.genes.ancients,cost:{Knowledge:()=>18e4},effect:()=>z("tech_ancient_theology_effect",["none"!==t.race.old_gods?_i[t.race.old_gods.toLowerCase()].entity:_i[t.race.species].entity,"none"!==t.race.gods?_i[t.race.gods.toLowerCase()].entity:_i[t.race.species].entity]),action(){return!!Cs($(this)[0])&&(t.space.ziggurat={count:0},!0)}},study:{id:"tech-study",title:z("tech_study"),desc:z("tech_study_desc"),category:"religion",era:"early_space",reqs:{theology:4},grant:["theology",5],no_queue:()=>!!t.r_queue.queue.some((e=>"tech-deify"===e.id)),cost:{Knowledge:()=>195e3},effect:()=>`
    ${z("tech_study_effect",["none"!==t.race.old_gods?_i[t.race.old_gods.toLowerCase()].entity:_i[t.race.species].entity])}
    ${z("tech_study_warning")}
    `,action(){return!!Cs($(this)[0])&&(t.tech.ancient_study=1,!0)}},encoding:{id:"tech-encoding",title:z("tech_encoding"),desc:z("tech_encoding_desc"),category:"religion",era:"deep_space",reqs:{ancient_study:1,mars:5},grant:["ancient_study",2],cost:{Knowledge:()=>268e3},effect:()=>`
    ${z("tech_encoding_effect")}
    `,action(){return!!Cs($(this)[0])}},deify:{id:"tech-deify",title:z("tech_deify"),desc:z("tech_deify_desc"),category:"religion",era:"early_space",reqs:{theology:4},grant:["theology",5],no_queue:()=>!!t.r_queue.queue.some((e=>"tech-study"===e.id)),cost:{Knowledge:()=>195e3},effect:()=>`
    ${z("tech_deify_effect",["none"!==t.race.old_gods?_i[t.race.old_gods.toLowerCase()].entity:_i[t.race.species].entity])}
    ${z("tech_deify_warning")}
    `,action(){return!!Cs($(this)[0])&&(t.tech.ancient_deify=1,Ds(t.race.old_gods),Ce("Genetics"),!0)}},infusion:{id:"tech-infusion",title:z("tech_infusion"),desc:z("tech_infusion_desc"),category:"religion",era:"deep_space",reqs:{ancient_deify:1,mars:5},grant:["ancient_deify",2],cost:{Knowledge:()=>268e3},effect:()=>`
    ${z("tech_infusion_effect")}
    `,action(){return!!Cs($(this)[0])}},indoctrination:{id:"tech-indoctrination",title:z("tech_indoctrination"),desc:z("tech_indoctrination"),category:"religion",era:"civilized",reqs:{fanaticism:1},grant:["fanaticism",2],cost:{Knowledge:()=>5e3},effect:z("tech_indoctrination_effect"),action(){return!!Cs($(this)[0])},post(){t.race.terrifying&&(t.tech.fanaticism=3,gs())}},missionary:{id:"tech-missionary",title:z("tech_missionary"),desc:z("tech_missionary"),category:"religion",era:"discovery",reqs:{fanaticism:2},not_trait:["terrifying"],grant:["fanaticism",3],cost:{Knowledge:()=>1e4},effect:z("tech_missionary_effect"),action(){return!!Cs($(this)[0])}},zealotry:{id:"tech-zealotry",title:z("tech_zealotry"),desc:z("tech_zealotry"),category:"religion",era:"discovery",reqs:{fanaticism:3},grant:["fanaticism",4],cost:{Knowledge:()=>25e3},effect:z("tech_zealotry_effect"),action(){return!!Cs($(this)[0])}},anthropology:{id:"tech-anthropology",title:z("tech_anthropology"),desc:z("tech_anthropology"),category:"religion",era:"civilized",wiki:!t.genes.transcendence,reqs:{theology:2},grant:["theology",3],not_gene:["transcendence"],no_queue:()=>!!t.r_queue.queue.some((e=>"tech-fanaticism"===e.id)),cost:{Knowledge:()=>2500},effect:`
    ${z("tech_anthropology_effect")}
    ${z("tech_anthropology_warning")}
    `,action(){return!!Cs($(this)[0])&&(t.tech.anthropology=1,!0)}},alt_anthropology:{id:"tech-alt_anthropology",title:z("tech_anthropology"),desc:z("tech_anthropology"),category:"religion",era:"civilized",wiki:!!t.genes.transcendence,reqs:{theology:2},grant:["anthropology",1],gene:["transcendence"],cost:{Knowledge:()=>2500},effect:`
    ${z("tech_anthropology_effect")}
    `,action(){return!!Cs($(this)[0])&&(2===t.tech.theology&&(t.tech.theology=3),!0)}},mythology:{id:"tech-mythology",title:z("tech_mythology"),desc:z("tech_mythology"),category:"religion",era:"civilized",reqs:{anthropology:1},grant:["anthropology",2],cost:{Knowledge:()=>5e3},effect:z("tech_mythology_effect"),action(){return!!Cs($(this)[0])}},archaeology:{id:"tech-archaeology",title:z("tech_archaeology"),desc:z("tech_archaeology"),category:"science",era:"discovery",reqs:{anthropology:2},grant:["anthropology",3],cost:{Knowledge:()=>1e4},effect:z("tech_archaeology_effect"),action(){return!!Cs($(this)[0])}},merchandising:{id:"tech-merchandising",title:z("tech_merchandising"),desc:z("tech_merchandising"),category:"banking",era:"discovery",reqs:{anthropology:3},grant:["anthropology",4],cost:{Knowledge:()=>25e3},effect:()=>t.race.truepath?z("tech_merchandising_effect_tp"):z("tech_merchandising_effect"),action(){return!!Cs($(this)[0])}},astrophysics:{id:"tech-astrophysics",title:z("tech_astrophysics"),desc:z("tech_astrophysics_desc"),category:"storage",era:"early_space",reqs:{space:2},grant:["space_explore",1],cost:{Knowledge:()=>125e3},effect:z("tech_astrophysics_effect"),action(){return!!Cs($(this)[0])&&(t.space.propellant_depot={count:0},!0)}},rover:{id:"tech-rover",title:z("tech_rover"),desc:z("tech_rover"),category:"space_exploration",era:"early_space",reqs:{space_explore:1},grant:["space_explore",2],cost:{Knowledge:()=>135e3,Alloy:()=>22e3,Polymer:()=>18e3,Uranium:()=>750},effect:z("tech_rover_effect"),action(){return!!Cs($(this)[0])&&(t.settings.space.moon=!0,t.space.moon_base={count:0,on:0,support:0,s_max:0},!0)}},probes:{id:"tech-probes",title:z("tech_probes"),desc:z("tech_probes"),category:"space_exploration",era:"early_space",reqs:{space_explore:2},grant:["space_explore",3],cost:{Knowledge:()=>168e3,Steel:()=>1e5,Iridium:()=>5e3,Uranium:()=>2250,Helium_3:()=>3500},effect:z("tech_probes_effect"),action(){return!!Cs($(this)[0])&&(t.settings.space.red=!0,t.settings.space.hell=!0,t.space.spaceport={count:0,on:0,support:0,s_max:0},!0)}},starcharts:{id:"tech-starcharts",title:z("tech_starcharts"),desc:z("tech_starcharts"),category:"space_exploration",era:"early_space",reqs:{space_explore:3,science:9},grant:["space_explore",4],cost:{Knowledge:()=>185e3},effect:z("tech_starcharts_effect"),action(){return!!Cs($(this)[0])&&(t.settings.space.gas=!0,t.settings.space.sun=!0,t.race.truepath&&(t.settings.showOuter=!0),t.space.swarm_control={count:0,support:0,s_max:0},!0)}},colonization:{id:"tech-colonization",title:z("tech_colonization"),desc:()=>z("tech_colonization_desc",[ea().red]),category:"agriculture",era:"early_space",reqs:{space:4,mars:1},grant:["mars",2],cost:{Knowledge:()=>172e3},effect:()=>z(t.race.artifical?"tech_colonization_artifical_effect":"tech_colonization_effect",[ea().red]),action(){return!!Cs($(this)[0])&&(t.space.biodome={count:0,on:0},!0)}},red_tower:{id:"tech-red_tower",title:()=>z("tech_red_tower",[ea().red]),desc:()=>z("tech_red_tower",[ea().red]),category:"space_exploration",era:"early_space",reqs:{mars:2},grant:["mars",3],cost:{Knowledge:()=>195e3},effect:()=>z("tech_red_tower_effect",[ea().red]),action(){return!!Cs($(this)[0])&&(t.space.red_tower={count:0,on:0},!0)}},space_manufacturing:{id:"tech-space_manufacturing",title:z("tech_space_manufacturing"),desc:z("tech_space_manufacturing_desc"),category:"crafting",era:"early_space",reqs:{mars:3},grant:["mars",4],cost:{Knowledge:()=>22e4},effect:()=>z("tech_space_manufacturing_effect",[ea().red]),action(){return!!Cs($(this)[0])&&(t.space.red_factory={count:0,on:0},!0)}},exotic_lab:{id:"tech-exotic_lab",title:z("tech_exotic_lab"),desc:z("tech_exotic_lab_desc"),category:"science",era:"deep_space",reqs:{mars:4,asteroid:5},grant:["mars",5],cost:{Knowledge:()=>25e4},effect:z("tech_exotic_lab_effect"),action(){return!!Cs($(this)[0])&&(t.space.exotic_lab={count:0,on:0},!0)}},hydroponics:{id:"tech-hydroponics",title:z("tech_hydroponics"),desc:()=>z("tech_hydroponics"),category:"agriculture",era:"intergalactic",reqs:{mars:5,gateway:3},grant:["mars",6],cost:{Knowledge:()=>3e6,Bolognium:()=>5e5},effect:()=>z("tech_hydroponics_effect"),action(){return!!Cs($(this)[0])}},dyson_sphere:{id:"tech-dyson_sphere",title:z("tech_dyson_sphere"),desc:z("tech_dyson_sphere"),category:"power_generation",era:"early_space",reqs:{solar:1},grant:["solar",2],cost:{Knowledge:()=>195e3},effect:z("tech_dyson_sphere_effect"),action(){return!!Cs($(this)[0])}},dyson_swarm:{id:"tech-dyson_swarm",title:z("tech_dyson_swarm"),desc:z("tech_dyson_swarm"),category:"power_generation",era:"early_space",reqs:{solar:2},grant:["solar",3],cost:{Knowledge:()=>21e4},effect:z("tech_dyson_swarm_effect"),action(){return!!Cs($(this)[0])&&(t.space.swarm_satellite={count:0},!0)}},swarm_plant:{id:"tech-swarm_plant",title:z("tech_swarm_plant"),desc:z("tech_swarm_plant"),category:"power_generation",era:"deep_space",reqs:{solar:3,hell:1,gas_moon:1},grant:["solar",4],cost:{Knowledge:()=>25e4},effect:()=>z("tech_swarm_plant_effect",[_i[t.race.species].home,ea().hell]),action(){return!!Cs($(this)[0])&&(t.space.swarm_plant={count:0},!0)}},space_sourced:{id:"tech-space_sourced",title:z("tech_space_sourced"),desc:z("tech_space_sourced_desc"),category:"power_generation",era:"deep_space",reqs:{solar:4,asteroid:3},grant:["solar",5],cost:{Knowledge:()=>3e5},effect:z("tech_space_sourced_effect"),action(){return!!Cs($(this)[0])}},swarm_plant_ai:{id:"tech-swarm_plant_ai",title:z("tech_swarm_plant_ai"),desc:z("tech_swarm_plant_ai"),category:"power_generation",era:"deep_space",reqs:{solar:4,high_tech:10},grant:["swarm",1],cost:{Knowledge:()=>335e3},effect:z("tech_swarm_plant_ai_effect"),action(){return!!Cs($(this)[0])}},swarm_control_ai:{id:"tech-swarm_control_ai",title:z("tech_swarm_control_ai"),desc:z("tech_swarm_control_ai"),category:"power_generation",era:"deep_space",reqs:{swarm:1},grant:["swarm",2],cost:{Knowledge:()=>36e4},effect:z("tech_swarm_control_ai_effect"),action(){return!!Cs($(this)[0])}},quantum_swarm:{id:"tech-quantum_swarm",title:z("tech_quantum_swarm"),desc:z("tech_quantum_swarm"),category:"power_generation",era:"deep_space",reqs:{swarm:2,high_tech:11},grant:["swarm",3],cost:{Knowledge:()=>45e4},effect:z("tech_quantum_swarm_effect"),action(){return!!Cs($(this)[0])}},perovskite_cell:{id:"tech-perovskite_cell",title:z("tech_perovskite_cell"),desc:z("tech_perovskite_cell"),category:"power_generation",era:"interstellar",reqs:{swarm:3},grant:["swarm",4],path:["standard","truepath"],cost:{Knowledge:()=>525e3,Titanium:()=>1e5},effect:z("tech_perovskite_cell_effect"),action(){return!!Cs($(this)[0])}},swarm_convection:{id:"tech-swarm_convection",title:z("tech_swarm_convection"),desc:z("tech_swarm_convection"),category:"power_generation",era:"interstellar",reqs:{swarm:4,stanene:1},grant:["swarm",5],path:["standard","truepath"],cost:{Knowledge:()=>725e3,Stanene:()=>1e5},effect:z("tech_swarm_convection_effect"),action(){return!!Cs($(this)[0])}},orichalcum_panels:{id:"tech-orichalcum_panels",title:z("tech_orichalcum_panels"),desc:z("tech_orichalcum_panels"),category:"power_generation",era:"intergalactic",reqs:{high_tech:17,swarm:5},grant:["swarm",6],cost:{Knowledge:()=>14e6,Orichalcum:()=>125e3},effect:()=>z("tech_orichalcum_panels_effect"),action(){return!!Cs($(this)[0])}},dyson_net:{id:"tech-dyson_net",title:z("tech_dyson_net"),desc:z("tech_dyson_net"),category:"power_generation",era:"interstellar",reqs:{solar:3,proxima:2,stanene:1},grant:["proxima",3],cost:{Knowledge:()=>8e5},effect:z("tech_dyson_net_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.dyson={count:0},!0)}},dyson_sphere2:{id:"tech-dyson_sphere2",title:z("tech_dyson_sphere"),desc:z("tech_dyson_sphere"),category:"power_generation",era:"intergalactic",reqs:{proxima:3,piracy:1},grant:["dyson",1],cost:{Knowledge:()=>5e6},effect:z("tech_dyson_sphere2_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.dyson_sphere={count:0},!0)}},orichalcum_sphere:{id:"tech-orichalcum_sphere",title:z("tech_orichalcum_sphere"),desc:z("tech_orichalcum_sphere"),category:"power_generation",era:"intergalactic",reqs:{dyson:1,science:19},condition:()=>!!(t.interstellar.dyson_sphere&&t.interstellar.dyson_sphere.count>=100),grant:["dyson",2],cost:{Knowledge:()=>175e5,Orichalcum:()=>25e4},effect:z("tech_orichalcum_sphere_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.orichalcum_sphere={count:0},!0)}},gps:{id:"tech-gps",title:z("tech_gps"),desc:z("tech_gps"),category:"market",era:"early_space",reqs:{space_explore:1},not_trait:["terrifying"],grant:["satellite",1],cost:{Knowledge:()=>15e4},effect:z("tech_gps_effect"),action(){return!!Cs($(this)[0])&&(t.space.gps={count:0},!0)}},nav_beacon:{id:"tech-nav_beacon",title:z("tech_nav_beacon"),desc:z("tech_nav_beacon"),category:"space_exploration",era:"early_space",reqs:{luna:1},grant:["luna",2],cost:{Knowledge:()=>18e4},effect:z("tech_nav_beacon_effect"),action(){return!!Cs($(this)[0])&&(t.space.nav_beacon={count:0,on:0},!0)}},subspace_signal:{id:"tech-subspace_signal",title:z("tech_subspace_signal"),desc:z("tech_subspace_signal"),category:"space_exploration",era:"interstellar",reqs:{science:13,luna:2,stanene:1},grant:["luna",3],cost:{Knowledge:()=>7e5,Stanene:()=>125e3},effect:()=>z("tech_subspace_signal_effect",[ea().red]),action(){return!!Cs($(this)[0])}},atmospheric_mining:{id:"tech-atmospheric_mining",title:z("tech_atmospheric_mining"),desc:z("tech_atmospheric_mining"),category:"power_generation",era:"early_space",reqs:{space:5},grant:["gas_giant",1],cost:{Knowledge:()=>19e4},effect:z("tech_atmospheric_mining_effect"),action(){return!!Cs($(this)[0])&&(t.space.gas_mining={count:0,on:0},t.space.gas_storage={count:0},!0)}},helium_attractor:{id:"tech-helium_attractor",title:z("tech_helium_attractor"),desc:z("tech_helium_attractor"),category:"power_generation",era:"deep_space",reqs:{gas_giant:1,elerium:1},grant:["helium",1],cost:{Knowledge:()=>29e4,Elerium:()=>250},effect:()=>z("tech_helium_attractor_effect",[ea().gas]),action(){return!!Cs($(this)[0])}},ram_scoops:{id:"tech-ram_scoops",title:z("tech_ram_scoops"),desc:z("tech_ram_scoops"),category:"power_generation",era:"interstellar",reqs:{nebula:2},grant:["ram_scoop",1],cost:{Knowledge:()=>58e4},effect:()=>z("tech_ram_scoops_effect"),action(){return!!Cs($(this)[0])}},elerium_prospecting:{id:"tech-elerium_prospecting",title:z("tech_elerium_prospecting"),desc:z("tech_elerium_prospecting"),category:"space_mining",era:"interstellar",reqs:{nebula:2},grant:["nebula",3],cost:{Knowledge:()=>61e4},effect:()=>z("tech_elerium_prospecting_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.elerium_prospector={count:0,on:0},!0)}},zero_g_mining:{id:"tech-zero_g_mining",title:z("tech_zero_g_mining"),desc:z("tech_zero_g_mining"),category:"space_mining",era:"early_space",reqs:{asteroid:1,high_tech:8},grant:["asteroid",2],cost:{Knowledge:()=>21e4},effect:z("tech_zero_g_mining_effect"),action(){return!!Cs($(this)[0])&&(t.space.space_station={count:0,on:0,support:0,s_max:0},t.space.iridium_ship={count:0,on:0},t.space.iron_ship={count:0,on:0},!0)}},elerium_mining:{id:"tech-elerium_mining",title:z("tech_elerium_mining"),desc:z("tech_elerium_mining"),category:"space_mining",era:"deep_space",reqs:{asteroid:4},grant:["asteroid",5],cost:{Knowledge:()=>235e3,Elerium:()=>t.race.truepath?.5:1},effect:z("tech_elerium_mining_effect"),action(){return!!Cs($(this)[0])&&(t.space.elerium_ship={count:0,on:0},t.race.cataclysm&&eo("iron_will",!1,2),!0)}},laser_mining:{id:"tech-laser_mining",title:z("tech_laser_mining"),desc:z("tech_laser_mining"),category:"space_mining",era:"deep_space",reqs:{asteroid:5,elerium:1,high_tech:9},grant:["asteroid",6],cost:{Knowledge:()=>35e4},effect:z("tech_laser_mining_effect"),action(){return!!Cs($(this)[0])}},plasma_mining:{id:"tech-plasma_mining",title:z("tech_plasma_mining"),desc:z("tech_plasma_mining"),category:"space_mining",era:"interstellar",reqs:{asteroid:6,high_tech:13},grant:["asteroid",7],path:["standard","truepath"],cost:{Knowledge:()=>825e3},effect:z("tech_plasma_mining_effect"),action(){return!!Cs($(this)[0])}},elerium_tech:{id:"tech-elerium_tech",title:z("tech_elerium_tech"),desc:z("tech_elerium_tech"),category:"space_mining",era:"deep_space",reqs:{asteroid:5},grant:["elerium",1],cost:{Knowledge:()=>275e3,Elerium:()=>20},effect:z("tech_elerium_tech_effect"),action(){return!!Cs($(this)[0])}},elerium_reactor:{id:"tech-elerium_reactor",title:z("tech_elerium_reactor"),desc:z("tech_elerium_reactor"),category:"power_generation",era:"deep_space",reqs:{dwarf:1,elerium:1},grant:["elerium",2],cost:{Knowledge:()=>325e3,Elerium:()=>180},effect:z("tech_elerium_reactor_effect"),action(){return!!Cs($(this)[0])&&(t.space.e_reactor={count:0,on:0},!0)}},neutronium_housing:{id:"tech-neutronium_housing",title:z("tech_neutronium_housing"),desc:z("tech_neutronium_housing"),category:"housing",era:"deep_space",reqs:{gas_moon:1},grant:["space_housing",1],cost:{Knowledge:()=>275e3,Neutronium:()=>350},effect:()=>z("tech_neutronium_housing_effect",[ea().red]),action(){return!!Cs($(this)[0])}},unification:{id:"tech-unification",title:z("tech_unification"),desc:()=>z("tech_unification_desc",[_i[t.race.species].home]),category:"special",era:"early_space",path:["standard"],reqs:{mars:2},grant:["unify",1],cost:{Knowledge:()=>2e5},effect:z("tech_unification_effect"),action(){return!!Cs($(this)[0])}},unification2:{id:"tech-unification2",title:z("tech_unification"),desc:()=>z("tech_unification_desc",[_i[t.race.species].home]),category:"special",era:"early_space",path:["standard"],reqs:{unify:1},grant:["unify",2],cost:{Bool(){let e=0;for(let a=0;a<3;a++)(t.civic.foreign[`gov${a}`].occ||t.civic.foreign[`gov${a}`].buy||t.civic.foreign[`gov${a}`].anx)&&e++;return 3===e}},effect(){let e=t.race.banana?`
    ${z("tech_unification_banana")}
    `:"";return`
    ${z("tech_unification_effect2")}
    ${z("tech_unification_warning")}
    ${e}`},action(){return!!Cs($(this)[0])&&(t.race.banana&&(t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),delete t.race.banana),t.civic.foreign.gov0.occ&&t.civic.foreign.gov1.occ&&t.civic.foreign.gov2.occ&&eo("world_domination"),t.civic.foreign.gov0.anx&&t.civic.foreign.gov1.anx&&t.civic.foreign.gov2.anx&&eo("illuminati"),t.civic.foreign.gov0.buy&&t.civic.foreign.gov1.buy&&t.civic.foreign.gov2.buy&&eo("syndicate"),0===t.stats.attacks&&eo("pacifist"),Ur(),!0)}},unite:{id:"tech-unite",title:z("tech_unite"),desc:()=>z("tech_unite_desc"),category:"special",era:"globalized",path:["truepath"],reqs:{unify:1},grant:["unify",2],cost:{Bool(){let e=0;for(let a=0;a<3;a++)(t.civic.foreign[`gov${a}`].occ||t.civic.foreign[`gov${a}`].buy||t.civic.foreign[`gov${a}`].anx)&&e++;return 3===e}},effect:()=>`
    ${z("tech_unite_effect")}
    ${z("tech_unification_effect2")}
    `,action(){return!!Cs($(this)[0])&&(t.race.banana&&(t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),delete t.race.banana),t.civic.foreign.gov0.occ&&t.civic.foreign.gov1.occ&&t.civic.foreign.gov2.occ&&eo("world_domination"),t.civic.foreign.gov0.anx&&t.civic.foreign.gov1.anx&&t.civic.foreign.gov2.anx&&eo("illuminati"),t.civic.foreign.gov0.buy&&t.civic.foreign.gov1.buy&&t.civic.foreign.gov2.buy&&eo("syndicate"),0===t.stats.attacks&&eo("pacifist"),Ur(),t.race.truepath&&!t.tech.rival&&(t.tech.rival=1,Bi(z("civics_rival_unlocked",[te(3)]),"info",!1,["progress","combat"])),!0)}},genesis:{id:"tech-genesis",title:z("tech_genesis"),desc:z("tech_genesis"),category:"special",era:"deep_space",reqs:{high_tech:10,genesis:1},grant:["genesis",2],cost:{Knowledge:()=>35e4},effect:z("tech_genesis_effect"),action(){return!!Cs($(this)[0])}},star_dock:{id:"tech-star_dock",title:z("tech_star_dock"),desc:z("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:()=>38e4},effect:z("tech_star_dock_effect"),action(){return!!Cs($(this)[0])&&(t.space.star_dock={count:0,ship:0,probe:0,template:t.race.species},!0)}},interstellar:{id:"tech-interstellar",title:z("tech_interstellar"),desc:z("tech_interstellar"),category:"space_exploration",era:"deep_space",reqs:{genesis:3},grant:["genesis",4],cost:{Knowledge:()=>4e5},effect:z("tech_interstellar_effect"),action(){return!!Cs($(this)[0])&&(t.starDock.probes={count:0},!0)}},genesis_ship:{id:"tech-genesis_ship",title:()=>t.race.cataclysm?z("tech_generational_ship"):z("tech_genesis_ship"),desc:()=>t.race.cataclysm?z("tech_generational_ship"):z("tech_genesis_ship"),category:"special",era:"deep_space",reqs:{genesis:4},grant:["genesis",5],cost:{Knowledge:()=>425e3},effect:()=>t.race.cataclysm?z("tech_generational_effect"):z("tech_genesis_ship_effect"),action(){return!!Cs($(this)[0])&&(t.starDock.seeder={count:0},t.race.cataclysm&&eo("iron_will",!1,4),!0)}},geck:{id:"tech-geck",title:()=>z("tech_geck"),desc:()=>z("tech_geck_desc"),category:"special",era:"deep_space",reqs:{genesis:5},grant:["geck",1],condition:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=5),cost:{Knowledge:()=>5e5},effect:()=>z("tech_geck_effect"),action(){return!!Cs($(this)[0])&&(t.starDock.geck={count:0},!0)}},genetic_decay:{id:"tech-genetic_decay",title:z("tech_genetic_decay"),desc:z("tech_genetic_decay"),category:"genes",era:"early_space",reqs:{decay:1},grant:["decay",2],cost:{Knowledge:()=>2e5},effect:z("tech_genetic_decay_effect"),action(){return!!Cs($(this)[0])}},stabilize_decay:{id:"tech-stabilize_decay",title:z("tech_stabilize_decay"),desc:z("tech_stabilize_decay"),category:"genes",era:"dimensional",reqs:{decay:2,high_tech:18},grant:["decay",3],cost:{Knowledge:()=>5e7,Blood_Stone:()=>1},effect:z("tech_stabilize_decay_effect"),action(){return!!Cs($(this)[0])}},tachyon:{id:"tech-tachyon",title:z("tech_tachyon"),desc:z("tech_tachyon"),category:"progress",era:"interstellar",reqs:{wsc:1},grant:["ftl",1],cost:{Knowledge:()=>435e3},effect:z("tech_tachyon_effect"),action(){return!!Cs($(this)[0])}},warp_drive:{id:"tech-warp_drive",title:z("tech_warp_drive"),desc:z("tech_warp_drive"),category:"space_exploration",era:"interstellar",reqs:{ftl:1},grant:["ftl",2],cost:{Knowledge:()=>45e4},effect:z("tech_warp_drive_effect"),action(){return!!Cs($(this)[0])&&(t.settings.showDeep=!0,t.settings.space.alpha=!0,t.interstellar.starport={count:0,on:0,support:0,s_max:0},!0)}},habitat:{id:"tech-habitat",title:z("tech_habitat"),desc:z("tech_habitat_desc"),category:"housing",era:"interstellar",reqs:{alpha:2,droids:1},grant:["alpha",3],cost:{Knowledge:()=>48e4},effect:z("tech_habitat_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.habitat={count:0,on:0},!0)}},graphene:{id:"tech-graphene",title:z("tech_graphene"),desc:z("tech_graphene"),category:"crafting",era:"interstellar",reqs:{alpha:3,infernite:1},grant:["graphene",1],cost:{Knowledge:()=>54e4,Adamantite:()=>1e4},effect:z("tech_graphene_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.g_factory={count:0,on:0,Lumber:0,Coal:0,Oil:0},!0)}},aerogel:{id:"tech-aerogel",title:z("tech_aerogel"),desc:z("tech_aerogel"),category:"crafting",era:"interstellar",reqs:{graphene:1,science:13},grant:["aerogel",1],cost:{Knowledge:()=>75e4,Graphene:()=>5e4,Infernite:()=>500},effect:z("tech_aerogel_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Aerogel.display=!0,ma(),!0)},post(){Ai()}},mega_manufacturing:{id:"tech-mega_manufacturing",title:z("tech_mega_manufacturing"),desc:z("tech_mega_manufacturing"),category:"crafting",era:"intergalactic",reqs:{high_tech:16,alpha:3},grant:["alpha",4],cost:{Knowledge:()=>565e4},effect:()=>z("tech_mega_manufacturing_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.int_factory={count:0,on:0},!0)}},luxury_condo:{id:"tech-luxury_condo",title:z("tech_luxury_condo"),desc:z("tech_luxury_condo"),category:"housing",era:"intergalactic",reqs:{high_tech:17,alpha:4},grant:["alpha",5],cost:{Knowledge:()=>15e6},effect:()=>z("tech_luxury_condo_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.luxury_condo={count:0,on:0},!0)}},stellar_engine:{id:"tech-stellar_engine",title:z("tech_stellar_engine"),desc:z("tech_stellar_engine"),category:"stellar_engine",era:"interstellar",reqs:{blackhole:2},grant:["blackhole",3],cost:{Knowledge:()=>1e6},effect:z("tech_stellar_engine_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.stellar_engine={count:0,mass:8,exotic:0},!0)}},mass_ejector:{id:"tech-mass_ejector",title:z("tech_mass_ejector"),desc:z("tech_mass_ejector"),category:"stellar_engine",era:"interstellar",reqs:{blackhole:4},grant:["blackhole",5],cost:{Knowledge:()=>11e5},effect:z("tech_mass_ejector_effect"),action(){return!!Cs($(this)[0])&&(t.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)}},asteroid_redirect:{id:"tech-asteroid_redirect",title:z("tech_asteroid_redirect"),desc:z("tech_asteroid_redirect"),category:"stellar_engine",era:"intergalactic",reqs:{blackhole:5,gateway:3},grant:["blackhole",6],cost:{Knowledge:()=>35e5},effect:z("tech_asteroid_redirect_effect"),action(){return!!Cs($(this)[0])},post(){Ce("Physics")}},exotic_infusion:{id:"tech-exotic_infusion",title:z("tech_exotic_infusion"),desc:z("tech_exotic_infusion"),category:"stellar_engine",era:"interstellar",reqs:{whitehole:1},grant:["whitehole",2],cost:{Knowledge:()=>15e5,Soul_Gem:()=>10},effect:()=>`
    ${z("tech_exotic_infusion_effect",[t.resource.Soul_Gem.name])}
    ${z("tech_exotic_infusion_effect2")}
    `,action(){return!!js($(this)[0])},flair:()=>z("tech_exotic_infusion_flair")},infusion_check:{id:"tech-infusion_check",title:z("tech_infusion_check"),desc:z("tech_infusion_check"),category:"stellar_engine",era:"interstellar",reqs:{whitehole:2},grant:["whitehole",3],cost:{Knowledge:()=>15e5,Soul_Gem:()=>10},effect:()=>`
    ${z("tech_infusion_check_effect")}
    ${z("tech_exotic_infusion_effect2")}
    `,action(){return!!js($(this)[0])},flair:()=>z("tech_infusion_check_flair")},infusion_confirm:{id:"tech-infusion_confirm",title:z("tech_infusion_confirm"),desc:z("tech_infusion_confirm"),category:"stellar_engine",era:"interstellar",reqs:{whitehole:3},grant:["whitehole",4],cost:{Knowledge:()=>15e5,Soul_Gem:()=>10},effect(){let e=gc("bigbang"),a="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name"),r=`
    ${z("wiki_tech_infusion_confirm_gains",[e.plasmid,e.phage,e.dark,a])}
    `;return`
    ${z("tech_infusion_confirm_effect")}
    ${z("tech_exotic_infusion_effect2")}
    ${r}`},action(){if(Cs($(this)[0])){if(t.tech.whitehole>=4)return;t.tech.whitehole=4;let a=$('
    ');return $("body").append(a),setTimeout((function(){a.addClass("burn")}),125),setTimeout((function(){a.addClass("b")}),150),setTimeout((function(){a.addClass("c")}),2e3),setTimeout((function(){!function(){switch(t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),C(),Vi("reset",{end:"blackhole"}),eo(`extinct_${t.race.species}`),t.race.universe){case"heavy":eo("heavy");break;case"antimatter":eo("canceled");break;case"evil":eo("eviltwin");break;case"micro":eo("microbang",!0);break;case"standard":eo("whitehole")}t.space.hasOwnProperty("spaceport")&&0===t.space.spaceport.count&&eo("red_dead"),eo("squished",!0),"evil"===t.race.universe&&"angelic"===_i[t.race.species].type&&to("nephilim"),t.race.junker&&"junker"===t.race.species&&to("the_misery"),t.race.decay&&eo("dissipated"),t.race.steelen&&to("steelem");let a=t.race.species,r=t.race.gods,s=t.city.calendar.orbit,i=t.city.biome,c=t.city.ptrait,o=gc("bigbang");io(),t.stats.blackhole++,zc(),t.prestige.Phage.count+=o.phage,t.stats.phage+=o.phage,"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=o.plasmid,t.stats.antiplasmid+=o.plasmid):(t.prestige.Plasmid.count+=o.plasmid,t.stats.plasmid+=o.plasmid),t.prestige.Dark.count=+(t.prestige.Dark.count+o.dark).toFixed(3),t.stats.dark=+(t.stats.dark+o.dark).toFixed(3),t.stats.universes++;let n=!!t.race.hasOwnProperty("srace")&&t.race.srace,l=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0;t.race={species:"protoplasm",gods:a,old_gods:r,universe:"bigbang",seeded:!0,bigbang:!0,probes:4,seed:Math.floor(g(1e4)),ascended:!1},l>0&&(t.race.corruption=l),n&&(t.race.srace=n),Z({orbit:s,biome:i,ptrait:c,geology:!1}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}()}),4e3),!1}return!1},flair:()=>z("tech_infusion_confirm_flair")},stabilize_blackhole:{id:"tech-stabilize_blackhole",title:z("tech_stabilize_blackhole"),desc:()=>`
    ${z("tech_stabilize_blackhole")}
    ${z("tech_stabilize_blackhole2")}
    `,category:"stellar_engine",era:"interstellar",reqs:{whitehole:1},grant:["stablized",1],cost:{Knowledge:()=>15e5,Neutronium:()=>2e4},effect:z("tech_stabilize_blackhole_effect"),action(){if(Cs($(this)[0])){if(t.interstellar.stellar_engine.mass+=2e4*Ja.Neutronium/1e10,t.interstellar.stellar_engine.mass+=40*t.interstellar.stellar_engine.exotic,t.interstellar.stellar_engine.exotic=0,delete t.tech.whitehole,t.race.banana&&t.interstellar.stellar_engine.mass>=12){let e=Xc();t.stats.banana.b3[e]=!0,"m"!==e&&"l"!==e&&(t.stats.banana.b3.l=!0)}return!0}return!1}},veil:{id:"tech-veil",title:z("tech_veil"),desc:z("tech_veil"),category:"magic",era:"interstellar",reqs:{blackhole:2},condition:()=>"magic"===t.race.universe,grant:["veil",1],cost:{Knowledge:()=>125e4},effect:z("tech_veil_effect"),action(){return!!Cs($(this)[0])}},mana_syphon:{id:"tech-mana_syphon",title:z("tech_mana_syphon"),desc:z("tech_mana_syphon"),category:"magic",era:"interstellar",reqs:{veil:1},condition:()=>"magic"===t.race.universe,grant:["veil",2],cost:{Knowledge:()=>15e5},effect:z("tech_mana_syphon_effect"),action(){return!!Cs($(this)[0])},post(){Ce("Physics")}},gravitational_waves:{id:"tech-gravitational_waves",title:z("tech_gravitational_waves"),desc:z("tech_gravitational_waves"),category:"power_generation",era:"interstellar",reqs:{blackhole:4},grant:["gravity",1],cost:{Knowledge:()=>125e4},effect:z("tech_gravitational_waves_effect"),action(){return!!Cs($(this)[0])}},gravity_convection:{id:"tech-gravity_convection",title:z("tech_gravity_convection"),desc:z("tech_gravity_convection"),category:"power_generation",era:"interstellar",reqs:{gravity:1},grant:["gravity",2],cost:{Knowledge:()=>135e4},effect:z("tech_gravity_convection_effect"),action(){return!!Cs($(this)[0])}},wormholes:{id:"tech-wormholes",title:z("tech_wormholes"),desc:z("tech_wormholes"),category:"space_exploration",era:"intergalactic",reqs:{gravity:1,science:15},grant:["stargate",1],cost:{Knowledge:()=>225e4},effect:z("tech_wormholes_effect"),action(){return!!Cs($(this)[0])}},portal:{id:"tech-portal",title:z("tech_portal"),desc:z("tech_portal_desc"),category:"hell_dimension",era:"interstellar",reqs:{wsc:1},grant:["portal",1],cost:{Knowledge:()=>5e5},effect:z("tech_portal_effect"),action(){return!!Cs($(this)[0])}},fortifications:{id:"tech-fortifications",title:z("tech_fort"),desc:z("tech_fort_desc"),category:"hell_dimension",era:"interstellar",reqs:{portal:1},grant:["portal",2],cost:{Knowledge:()=>55e4,Stone:()=>1e6},effect:z("tech_fort_effect"),action(){return!!Cs($(this)[0])&&(t.settings.showPortal=!0,t.settings.portal.fortress=!0,t.settings.msgFilters.hell.unlocked||(t.settings.msgFilters.hell.unlocked=!0,t.settings.msgFilters.hell.vis=!0),t.portal.fortress={threat:1e4,garrison:0,walls:100,repair:0,patrols:0,patrol_size:10,siege:999,notify:"Yes",s_ntfy:"Yes",nocrew:!1},t.portal.turret={count:0,on:0},t.portal.carport={count:0,damaged:0,repair:0},"demonic"===_i[t.race.species].type?eo("blood_war"):eo("pandemonium"),t.portal.observe={settings:{expanded:!1,average:!1,hyperSlow:!1,display:"game_days",dropKills:!0,dropGems:!0},stats:{total:{start:{year:t.city.calendar.year,day:t.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:t.city.calendar.year,day:t.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)},post(){Ra()}},war_drones:{id:"tech-war_drones",title:z("tech_war_drones"),desc:z("tech_war_drones"),category:"hell_dimension",era:"interstellar",reqs:{portal:2,graphene:1},grant:["portal",3],cost:{Knowledge:()=>7e5},effect:z("tech_war_drones_effect"),action(){return!!Cs($(this)[0])&&(t.settings.portal.badlands=!0,t.portal.war_drone={count:0,on:0},!0)}},demon_attractor:{id:"tech-demon_attractor",title:z("tech_demon_attractor"),desc:z("tech_demon_attractor"),category:"hell_dimension",era:"interstellar",reqs:{portal:3,stanene:1},grant:["portal",4],cost:{Knowledge:()=>745e3},effect:z("tech_demon_attractor_effect"),action(){return!!Cs($(this)[0])&&(t.portal.attractor={count:0,on:0},!0)}},combat_droids:{id:"tech-combat_droids",title:z("tech_combat_droids"),desc:z("tech_combat_droids"),category:"hell_dimension",era:"interstellar",reqs:{portal:4},grant:["portal",5],cost:{Knowledge:()=>762e3,Soul_Gem:()=>1},effect:z("tech_combat_droids_effect"),action(){return!!Cs($(this)[0])&&(t.portal.war_droid={count:0,on:0},!0)},flair:()=>z("tech_combat_droids_flair")},repair_droids:{id:"tech-repair_droids",title:z("tech_repair_droids"),desc:z("tech_repair_droids"),category:"hell_dimension",era:"interstellar",reqs:{portal:5},grant:["portal",6],cost:{Knowledge:()=>794e3,Soul_Gem:()=>1},effect:z("tech_repair_droids_effect"),action(){return!!Cs($(this)[0])&&(t.portal.repair_droid={count:0,on:0},!0)}},advanced_predators:{id:"tech-advanced_predators",title:z("tech_advanced_predators"),desc:z("tech_advanced_predators"),category:"hell_dimension",era:"intergalactic",reqs:{portal:6,xeno:4},grant:["portal",7],cost:{Knowledge:()=>5e6,Bolognium:()=>5e5,Vitreloy:()=>25e4},effect:z("tech_advanced_predators_effect"),action(){return!!Cs($(this)[0])}},enhanced_droids:{id:"tech-enhanced_droids",title:z("tech_enhanced_droids"),desc:z("tech_enhanced_droids"),category:"hell_dimension",era:"interstellar",reqs:{portal:5,military:9},grant:["hdroid",1],cost:{Knowledge:()=>105e4},effect:z("tech_enhanced_droids_effect"),action(){return!!Cs($(this)[0])}},sensor_drone:{id:"tech-sensor_drone",title:z("tech_sensor_drone"),desc:z("tech_sensor_drone"),category:"hell_dimension",era:"interstellar",reqs:{portal:3,infernite:1,stanene:1,graphene:1},grant:["infernite",2],cost:{Knowledge:()=>725e3},effect:z("tech_sensor_drone_effect"),action(){return!!Cs($(this)[0])&&(t.portal.sensor_drone={count:0,on:0},!0)}},map_terrain:{id:"tech-map_terrain",title:z("tech_map_terrain"),desc:z("tech_map_terrain"),category:"hell_dimension",era:"interstellar",reqs:{infernite:2},grant:["infernite",3],cost:{Knowledge:()=>948e3},effect:()=>z("tech_map_terrain_effect"),action(){return!!Cs($(this)[0])}},calibrated_sensors:{id:"tech-calibrated_sensors",title:z("tech_calibrated_sensors"),desc:z("tech_calibrated_sensors"),category:"hell_dimension",era:"interstellar",reqs:{infernite:3},grant:["infernite",4],cost:{Knowledge:()=>1125e3,Infernite:()=>3500},effect:()=>z("tech_calibrated_sensors_effect"),action(){return!!Cs($(this)[0])}},shield_generator:{id:"tech-shield_generator",title:z("tech_shield_generator"),desc:z("tech_shield_generator"),category:"hell_dimension",era:"intergalactic",reqs:{high_tech:14,gateway:3,infernite:4},grant:["infernite",5],cost:{Knowledge:()=>268e4,Bolognium:()=>75e3},effect:()=>z("tech_shield_generator_effect"),action(){return!!Cs($(this)[0])}},enhanced_sensors:{id:"tech-enhanced_sensors",title:z("tech_enhanced_sensors"),desc:z("tech_enhanced_sensors"),category:"hell_dimension",era:"intergalactic",reqs:{infernite:5,xeno:4},grant:["infernite",6],cost:{Knowledge:()=>475e4,Vitreloy:()=>25e3},effect:()=>z("tech_enhanced_sensors_effect"),action(){return!!Cs($(this)[0])}},xeno_linguistics:{id:"tech-xeno_linguistics",title:z("tech_xeno_linguistics"),desc:z("tech_xeno_linguistics"),category:"andromeda",era:"intergalactic",reqs:{xeno:1},grant:["xeno",2],cost:{Knowledge:()=>3e6},effect:()=>z("tech_xeno_linguistics_effect"),action(){return!!Cs($(this)[0])&&(t.settings.space.gorddon=!0,!0)}},xeno_culture:{id:"tech-xeno_culture",title:z("tech_xeno_culture"),desc:z("tech_xeno_culture"),category:"progress",era:"intergalactic",reqs:{xeno:3},grant:["xeno",4],cost:{Knowledge:()=>34e5},effect:()=>z("tech_xeno_culture_effect",[_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name,_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].entity]),action(){return!!Cs($(this)[0])&&(t.galaxy.embassy={count:0,on:0},!0)}},cultural_exchange:{id:"tech-cultural_exchange",title:z("tech_cultural_exchange"),desc:z("tech_cultural_exchange"),category:"andromeda",era:"intergalactic",reqs:{xeno:5},grant:["xeno",6],cost:{Knowledge:()=>355e4},effect:()=>z("tech_cultural_exchange_effect",[_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),action(){return!!Cs($(this)[0])&&(t.galaxy.symposium={count:0,on:0},t.galaxy.dormitory={count:0,on:0},!0)}},shore_leave:{id:"tech-shore_leave",title:z("tech_shore_leave"),desc:z("tech_shore_leave"),category:"science",era:"intergalactic",reqs:{andromeda:3,xeno:6},grant:["xeno",7],cost:{Knowledge:()=>46e5},effect:()=>z("tech_shore_leave_effect"),action(){return!!Cs($(this)[0])}},xeno_gift:{id:"tech-xeno_gift",title:z("tech_xeno_gift"),desc:z("tech_xeno_gift"),category:"andromeda",era:"intergalactic",reqs:{high_tech:16,xeno:7},grant:["xeno",8],cost:{Knowledge:()=>65e5,Infernite:()=>125e3},effect:()=>z("tech_xeno_gift_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.consulate={count:0},t.settings.space.alien1=!0,Bi(z("tech_xeno_gift_msg",[_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),"info",!1,["progress"]),!0)}},industrial_partnership:{id:"tech-industrial_partnership",title:z("tech_industrial_partnership"),desc:()=>z("tech_industrial_partnership"),category:"andromeda",era:"intergalactic",reqs:{xeno:9},grant:["xeno",10],cost:{Knowledge:()=>725e4},effect:()=>z("tech_industrial_partnership_effect",[_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),action(){return!!Cs($(this)[0])&&(t.galaxy.vitreloy_plant={count:0,on:0},!0)}},embassy_housing:{id:"tech-embassy_housing",title:z("tech_embassy_housing"),desc:()=>z("tech_embassy_housing"),category:"andromeda",era:"intergalactic",reqs:{xeno:10,science:18},grant:["xeno",11],cost:{Knowledge:()=>1075e4},effect:()=>z("tech_embassy_housing_effect",[_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),action(){return!!Cs($(this)[0])}},advanced_telemetry:{id:"tech-advanced_telemetry",title:z("tech_advanced_telemetry"),desc:z("tech_advanced_telemetry"),category:"science",era:"intergalactic",reqs:{xeno:5},grant:["telemetry",1],cost:{Knowledge:()=>42e5,Vitreloy:()=>1e4},effect:()=>z("tech_advanced_telemetry_effect"),action(){return!!Cs($(this)[0])}},defense_platform:{id:"tech-defense_platform",title:z("galaxy_defense_platform"),desc:z("galaxy_defense_platform"),category:"andromeda",era:"intergalactic",reqs:{stargate:5,piracy:1},grant:["stargate",6],cost:{Knowledge:()=>485e4},effect:z("tech_defense_platform_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.defense_platform={count:0,on:0},!0)}},scout_ship:{id:"tech-scout_ship",title:z("galaxy_scout_ship"),desc:z("galaxy_scout_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{gateway:3},grant:["andromeda",1],cost:{Knowledge:()=>26e5},effect:()=>z("tech_scout_ship_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.scout_ship={count:0,on:0,crew:0,mil:0},!0)}},corvette_ship:{id:"tech-corvette_ship",title:z("galaxy_corvette_ship"),desc:z("galaxy_corvette_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:1,xeno:1},grant:["andromeda",2],cost:{Knowledge:()=>32e5},effect:()=>z("tech_corvette_ship_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.corvette_ship={count:0,on:0,crew:0,mil:0},!0)}},frigate_ship:{id:"tech-frigate_ship",title:z("galaxy_frigate_ship"),desc:z("galaxy_frigate_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:2,xeno:6},grant:["andromeda",3],cost:{Knowledge:()=>4e6},effect:()=>z("tech_frigate_ship_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.frigate_ship={count:0,on:0,crew:0,mil:0},Ht(),!0)}},cruiser_ship:{id:"tech-cruiser_ship",title:z("galaxy_cruiser_ship"),desc:z("galaxy_cruiser_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:3,xeno:10},grant:["andromeda",4],cost:{Knowledge:()=>75e5},effect:()=>z("tech_cruiser_ship_effect",[_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name]),action(){return!!Cs($(this)[0])&&(t.galaxy.cruiser_ship={count:0,on:0,crew:0,mil:0},t.galaxy.foothold={count:0,on:0,support:0,s_max:0},t.settings.space.alien2=!0,Ht(),!0)}},dreadnought:{id:"tech-dreadnought",title:z("galaxy_dreadnought"),desc:z("galaxy_dreadnought"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:4,science:18},grant:["andromeda",5],cost:{Knowledge:()=>1e7},effect:()=>z("tech_dreadnought_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.dreadnought={count:0,on:0,crew:0,mil:0},Ht(),!0)}},ship_dock:{id:"tech-ship_dock",title:z("galaxy_ship_dock"),desc:z("galaxy_ship_dock"),category:"andromeda_ships",era:"intergalactic",reqs:{gateway:3,xeno:6},grant:["gateway",4],cost:{Knowledge:()=>39e5},effect:()=>z("tech_ship_dock_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.ship_dock={count:0,on:0},!0)}},ore_processor:{id:"tech-ore_processor",title:z("galaxy_ore_processor"),desc:z("galaxy_ore_processor"),category:"space_mining",era:"intergalactic",reqs:{conflict:2},grant:["conflict",3],cost:{Knowledge:()=>75e5},effect:()=>z("tech_ore_processor_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.ore_processor={count:0,on:0},!0)}},scavenger:{id:"tech-scavenger",title:z("galaxy_scavenger"),desc:z("galaxy_scavenger"),category:"science",era:"intergalactic",reqs:{conflict:3},grant:["conflict",4],cost:{Knowledge:()=>8e6},effect:()=>z("tech_scavenger_effect",[_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name]),action(){return!!Cs($(this)[0])&&(t.galaxy.scavenger={count:0,on:0,crew:0},!0)}},coordinates:{id:"tech-coordinates",title:z("tech_coordinates"),desc:z("tech_coordinates"),category:"andromeda",era:"intergalactic",reqs:{science:18,conflict:5},grant:["chthonian",1],cost:{Knowledge:()=>1e7},effect:()=>z("tech_coordinates_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.minelayer={count:0,on:0,crew:0,mil:0},t.settings.space.chthonian=!0,!0)}},chthonian_survey:{id:"tech-chthonian_survey",title:z("tech_chthonian_survey"),desc:z("tech_chthonian_survey"),category:"space_mining",era:"intergalactic",reqs:{chthonian:2},grant:["chthonian",3],cost:{Knowledge:()=>118e5},effect:()=>z("tech_chthonian_survey_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Orichalcum.display=!0,t.galaxy.excavator={count:0,on:0},t.galaxy.raider={count:0,on:0,crew:0,mil:0},Bi(z("tech_chthonian_survey_result"),"info",!1,["progress"]),!0)},post(){Ai()}},gateway_depot:{id:"tech-gateway_depot",title:z("galaxy_gateway_depot"),desc:z("galaxy_gateway_depot"),category:"storage",era:"intergalactic",reqs:{gateway:4},grant:["gateway",5],cost:{Knowledge:()=>435e4},effect:()=>z("tech_gateway_depot_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.gateway_depot={count:0,on:0},!0)}},soul_forge:{id:"tech-soul_forge",title:z("portal_soul_forge_title"),desc:z("portal_soul_forge_title"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:3},grant:["hell_pit",4],cost:{Knowledge:()=>275e4},effect:()=>z("tech_soul_forge_effect"),action(){return!!Cs($(this)[0])&&(t.portal.soul_forge={count:0,on:0,kills:0},!0)}},soul_attractor:{id:"tech-soul_attractor",title:z("portal_soul_attractor_title"),desc:z("portal_soul_attractor_title"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:4,high_tech:16},grant:["hell_pit",5],cost:{Knowledge:()=>55e5},effect:()=>z("tech_soul_attractor_effect"),action(){return!!Cs($(this)[0])&&(t.portal.soul_attractor={count:0,on:0},!0)}},soul_absorption:{id:"tech-soul_absorption",title:z("tech_soul_absorption"),desc:z("tech_soul_absorption"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:5},grant:["hell_pit",6],cost:{Knowledge:()=>6e6,Infernite:()=>25e4},effect:()=>z("tech_soul_absorption_effect"),action(){return!!Cs($(this)[0])}},soul_link:{id:"tech-soul_link",title:z("tech_soul_link"),desc:z("tech_soul_link"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:6},grant:["hell_pit",7],cost:{Knowledge:()=>75e5,Vitreloy:()=>25e4},effect:()=>z("tech_soul_link_effect"),action(){return!!Cs($(this)[0])}},gun_emplacement:{id:"tech-gun_emplacement",title:z("portal_gun_emplacement_title"),desc:z("portal_gun_emplacement_title"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:4},grant:["hell_gun",1],cost:{Knowledge:()=>3e6},effect:()=>z("tech_gun_emplacement_effect"),action(){return!!Cs($(this)[0])&&(t.portal.gun_emplacement={count:0,on:0},!0)}},advanced_emplacement:{id:"tech-advanced_emplacement",title:z("tech_advanced_emplacement"),desc:z("tech_advanced_emplacement"),category:"hell_dimension",era:"intergalactic",reqs:{hell_gun:1,high_tech:17},grant:["hell_gun",2],cost:{Knowledge:()=>125e5,Orichalcum:()=>18e4},effect:()=>z("tech_advanced_emplacement_effect"),action(){return!!Cs($(this)[0])}},dial_it_to_11:{id:"tech-dial_it_to_11",title:z("tech_dial_it_to_11"),desc:z("tech_dial_it_to_11"),category:"science",wiki:!1,era:"deep_space",reqs:{quaked:1},grant:["quaked",2],cost:{Knowledge:()=>5e5},condition:()=>!(t.race.sludge&&!t.race.cataclysm),effect(){let e=gc("cataclysm"),a="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name");return`
    ${z("tech_dial_it_to_11_effect",[ea().dwarf,t.race.cataclysm?ea().red:_i[t.race.species].home])}
    ${z("tech_dial_it_to_11_effect2")}
    ${z("star_dock_genesis_effect2",[e.plasmid,a])}
    ${z("star_dock_genesis_effect3",[e.phage])}
    `},action(){return!!Cs($(this)[0])&&($("#main").addClass("earthquake"),setTimeout((function(){$("#main").removeClass("earthquake"),function(){if(t.city.ptrait.includes("unstable")&&t.tech.quaked){P.w&&P.w.terminate(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),Vi("reset",{end:"cataclysm"}),C();let a=gc("cataclysm");t.stats.cataclysm++,zc(),t.prestige.Phage.count+=a.phage,t.stats.phage+=a.phage,"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=a.plasmid,t.stats.antiplasmid+=a.plasmid):(t.prestige.Plasmid.count+=a.plasmid,t.stats.plasmid+=a.plasmid),eo("squished",!0),eo(`extinct_${t.race.species}`),"hellscape"===t.city.biome&&"demonic"!==_i[t.race.species].type&&to("take_no_advice"),io(),eo("shaken"),t.race.cataclysm&&eo("failed_history");let r=!!t.race.hasOwnProperty("srace")&&t.race.srace,s=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0;t.race={species:t.race.species,gods:t.race.gods,old_gods:t.race.old_gods,universe:t.race.universe,seeded:!1,ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended},s>0&&(t.race.corruption=s),r&&(t.race.srace=r),Z({orbit:t.city.calendar.orbit,biome:t.city.biome,ptrait:t.city.ptrait,geology:t.city.geology}),"antimatter"===t.race.universe?t.race.weak_mastery=1:t.race.no_plasmid=1;let i=["crispr","trade","craft"];for(let e=0;ez("tech_dial_it_to_11_flair")},limit_collider:{id:"tech-limit_collider",title:z("tech_limit_collider"),desc:z("tech_limit_collider"),category:"science",wiki:!1,era:"deep_space",reqs:{quaked:1},grant:["quaked",2],cost:{Knowledge:()=>5e5},effect:()=>z("tech_limit_collider_effect"),action(){return!!Cs($(this)[0])}},mana:{id:"tech-mana",title:z("tech_mana"),desc:z("tech_mana"),category:"magic",era:"civilized",reqs:{primitive:3},grant:["magic",1],condition:()=>"magic"===t.race.universe,cost:{Knowledge:()=>25},effect:()=>z("tech_mana_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Mana.display=!0,t.resource.Crystal.display=!0,t.civic.crystal_miner.display=!0,t.race.witch_hunter&&(t.resource.Sus.display=!0),!0)},flair:z("tech_mana_flair"),post(){Ai()}},ley_lines:{id:"tech-ley_lines",title:z("tech_ley_lines"),desc:z("tech_ley_lines"),category:"magic",era:"civilized",reqs:{magic:1},grant:["magic",2],condition:()=>"magic"===t.race.universe,cost:{Knowledge:()=>40},effect:()=>z("tech_ley_lines_effect"),action(){return!!Cs($(this)[0])&&(t.tech.isolation?t.tauceti.pylon={count:0}:t.race.cataclysm||t.race.orbit_decayed?t.space.pylon={count:0}:t.city.pylon={count:0},!0)}},rituals:{id:"tech-rituals",title:z("tech_rituals"),desc:z("tech_rituals"),category:"magic",era:"civilized",reqs:{magic:2},grant:["magic",3],condition:()=>"magic"===t.race.universe,cost:{Mana:()=>25,Knowledge:()=>750,Crystal:()=>50},effect:()=>z("tech_rituals_effect"),action(){return!!Cs($(this)[0])&&(t.race.casting={farmer:0,miner:0,lumberjack:0,science:0,factory:0,army:0,hunting:0,crafting:0,total:0},t.settings.showIndustry=!0,!0)},post(){Qs()}},crafting_ritual:{id:"tech-crafting_ritual",title:z("tech_crafting_ritual"),desc:z("tech_crafting_ritual"),category:"magic",era:"discovery",reqs:{magic:3,foundry:5},grant:["magic",4],condition:()=>"magic"===t.race.universe,cost:{Mana:()=>100,Knowledge:()=>15e3,Crystal:()=>2500},effect:()=>z("tech_crafting_ritual_effect"),action(){return!!Cs($(this)[0])&&(t.race.casting.crafting=0,!0)},post(){Qs()}},mana_nexus:{id:"tech-mana_nexus",title:z("tech_mana_nexus"),desc:z("tech_mana_nexus"),category:"magic",era:"early_space",reqs:{magic:4,space:3,luna:1},grant:["magic",5],condition:()=>"magic"===t.race.universe,cost:{Mana:()=>500,Knowledge:()=>16e4,Crystal:()=>2500},effect:()=>z("tech_mana_nexus_effect"),action(){return!!Cs($(this)[0])},post(){Ce("Physics")}},clerics:{id:"tech-clerics",title:z("tech_clerics"),desc:z("tech_clerics"),category:"magic",era:"civilized",reqs:{magic:3},grant:["cleric",1],condition:()=>!!("magic"===t.race.universe&&t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display),cost:{Mana:()=>100,Knowledge:()=>2e3,Crystal:()=>100},effect:()=>z("tech_clerics_effect"),action(){return!!Cs($(this)[0])}},conjuring:{id:"tech-conjuring",title:z("tech_conjuring"),desc:z("tech_conjuring_desc"),category:"magic",era:"civilized",reqs:{magic:1},grant:["conjuring",1],not_trait:["cataclysm"],condition:()=>"magic"===t.race.universe,cost:{Mana:()=>2,Crystal:()=>5},effect:()=>z("tech_conjuring_effect"),action(){return!!Cs($(this)[0])}},res_conjuring:{id:"tech-res_conjuring",title:z("tech_res_conjuring"),desc:z("tech_res_conjuring"),category:"magic",era:"civilized",reqs:{conjuring:1},grant:["conjuring",2],not_trait:["cataclysm"],condition:()=>"magic"===t.race.universe,cost:{Mana:()=>5,Crystal:()=>10},effect:()=>z("tech_res_conjuring_effect"),action(){return!!Cs($(this)[0])}},alchemy:{id:"tech-alchemy",title:z("tech_alchemy"),desc:z("tech_alchemy"),category:"magic",era:"discovery",reqs:{magic:3,high_tech:1},grant:["alchemy",1],condition:()=>"magic"===t.race.universe,cost:{Mana:()=>100,Knowledge:()=>1e4,Crystal:()=>250},effect:()=>z("tech_alchemy_effect"),action(){return!!Cs($(this)[0])&&(t.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},t.settings.showAlchemy=!0,!0)},post(){sc($("#resources")),sr(),t.settings.tabLoad&&rr("alchemy")}},transmutation:{id:"tech-transmutation",title:z("tech_transmutation"),desc:z("tech_transmutation"),category:"magic",era:"intergalactic",reqs:{alchemy:1,high_tech:16},grant:["alchemy",2],condition:()=>"magic"===t.race.universe,cost:{Mana:()=>1250,Knowledge:()=>55e5,Crystal:()=>1e6},effect:()=>z("tech_transmutation_effect"),action(){return!!Cs($(this)[0])},post(){sc($("#resources")),sr()}},secret_society:{id:"tech-secret_society",title:z("tech_secret_society"),desc:z("tech_secret_society"),category:"magic",era:"civilized",reqs:{magic:1},grant:["roguemagic",1],condition:()=>!("magic"!==t.race.universe||!t.race.witch_hunter),cost:{Mana:()=>10,Knowledge:()=>45},effect:()=>z("tech_secret_society_effect"),action(){return!!Cs($(this)[0])}},cultists:{id:"tech-cultists",title:z("tech_cultists"),desc:z("tech_cultists"),category:"magic",era:"civilized",reqs:{roguemagic:1,cleric:1},grant:["roguemagic",2],condition:()=>!("magic"!==t.race.universe||!t.race.witch_hunter),cost:{Mana:()=>250,Knowledge:()=>2125},effect:()=>z("tech_cultists_effect"),action(){return!!Cs($(this)[0])}},conceal_ward:{id:"tech-conceal_ward",title:z("tech_conceal_ward"),desc:z("tech_conceal_ward"),category:"magic",era:"discovery",reqs:{roguemagic:2,theatre:3},grant:["roguemagic",3],condition:()=>!("magic"!==t.race.universe||!t.race.witch_hunter),cost:{Mana:()=>500,Knowledge:()=>8200,Crystal:()=>1e3},effect:()=>z("tech_conceal_ward_effect"),action(){return!!Cs($(this)[0])&&(t.city.conceal_ward={count:0},t.space.conceal_ward={count:0},!0)}},subtle_rituals:{id:"tech-subtle_rituals",title:z("tech_subtle_rituals"),desc:z("tech_subtle_rituals"),category:"magic",era:"discovery",reqs:{roguemagic:3,magic:4},grant:["roguemagic",4],condition:()=>!("magic"!==t.race.universe||!t.race.witch_hunter),cost:{Mana:()=>100,Knowledge:()=>15e3,Crystal:()=>2500},effect:()=>z("tech_subtle_rituals_effect"),action(){return!!Cs($(this)[0])}},pylon_camouflage:{id:"tech-pylon_camouflage",title:z("tech_pylon_camouflage"),desc:z("tech_pylon_camouflage"),category:"magic",era:"industrialized",reqs:{roguemagic:4,high_tech:3},grant:["roguemagic",5],condition:()=>!("magic"!==t.race.universe||!t.race.witch_hunter),cost:{Mana:()=>1e3,Knowledge:()=>3e4,Crystal:()=>3750},effect:()=>z("tech_pylon_camouflage_effect"),action(){return!!Cs($(this)[0])}},fake_tech:{id:"tech-fake_tech",title:z("tech_fake_tech"),desc:z("tech_fake_tech"),category:"magic",era:"industrialized",reqs:{roguemagic:5,high_tech:4},grant:["roguemagic",6],condition:()=>!("magic"!==t.race.universe||!t.race.witch_hunter),cost:{Mana:()=>2250,Knowledge:()=>6e4},effect:()=>z("tech_fake_tech_effect"),action(){return!!Cs($(this)[0])}},concealment:{id:"tech-concealment",title:z("tech_concealment"),desc:z("tech_concealment"),category:"magic",era:"early_space",reqs:{roguemagic:6,magic:5},grant:["roguemagic",7],condition:()=>!("magic"!==t.race.universe||!t.race.witch_hunter),cost:{Mana:()=>3e3,Knowledge:()=>185e3},effect:()=>z("tech_concealment_effect"),action(){return!!Cs($(this)[0])}},improved_concealment:{id:"tech-improved_concealment",title:z("tech_improved_concealment"),desc:z("tech_improved_concealment"),category:"magic",era:"intergalactic",reqs:{roguemagic:7,forbidden:1},grant:["roguemagic",8],condition:()=>!("magic"!==t.race.universe||!t.race.witch_hunter),cost:{Mana:()=>t.race.no_plasmid?6e3:15e3,Knowledge:()=>2e7},effect:()=>z("tech_improved_concealment_effect"),action(){return!!Cs($(this)[0])}},outerplane_summon:{id:"tech-outerplane_summon",title:z("tech_outerplane_summon"),desc:z("tech_outerplane_summon"),category:"magic",era:"dimensional",reqs:{roguemagic:8,forbidden:4,hell_spire:10,b_stone:2,waygate:3},grant:["forbidden",5],condition:()=>!("magic"!==t.race.universe||!t.race.witch_hunter),cost:{Mana:()=>t.race.no_plasmid?12e3:4e4,Knowledge:()=>6e7,Demonic_Essence:()=>1},effect:()=>z("tech_outerplane_summon_effect"),action(){return!!Cs($(this)[0])}},dark_bomb:{id:"tech-dark_bomb",title:z("tech_dark_bomb"),desc:z("tech_dark_bomb"),category:"hell_dimension",era:"dimensional",reqs:{},reqs:{hell_spire:10,b_stone:2,waygate:2,sphinx_bribe:1},condition(){let e=Xc();return!!(t.stats.spire.hasOwnProperty(e)&&t.stats.spire[e].hasOwnProperty("dlstr")&&t.stats.spire[e].dlstr>0)},grant:["dl_reset",1],cost:{Knowledge:()=>65e6,Soul_Gem:()=>5e3,Blood_Stone:()=>25,Dark:()=>1,Supply:()=>1e6},effect:()=>z("tech_dark_bomb_effect"),action(){return!!Cs($(this)[0])&&(t.portal.waygate.progress=100,t.portal.waygate.on=0,t.tech.waygate=3,t.resource.Demonic_Essence.display=!0,t.resource.Demonic_Essence.amount=1,!0)},flair:()=>z("tech_dark_bomb_flair")},bribe_sphinx:{id:"tech-bribe_sphinx",title:z("portal_sphinx_bribe"),desc:z("portal_sphinx_bribe"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:8},grant:["sphinx_bribe",1],cost:{Soul_Gem:()=>250,Supply:()=>5e5},effect:()=>z("tech_bribe_sphinx_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Codex.display=!0,t.resource.Codex.amount=1,Bi(z("tech_bribe_sphinx_msg"),"info",!1,["progress","hell"]),!0)}},alien_biotech:{id:"tech-alien_biotech",title:z("tech_alien_biotech"),desc:z("tech_alien_biotech"),category:"science",era:"solar",reqs:{genetics:8,kuiper:1},grant:["biotech",1],path:["truepath"],cost:{Knowledge:()=>24e5,Orichalcum:()=>125e3,Cipher:()=>15e3},effect:()=>z(t.race.orbit_decayed?"tech_alien_biotech_effect_alt":"tech_alien_biotech_effect"),action(){return!!Cs($(this)[0])}},zero_g_lab:{id:"tech-zero_g_lab",title:z("tech_zero_g_lab"),desc:z("tech_zero_g_lab"),category:"science",era:"solar",path:["truepath"],reqs:{high_tech:13,graphene:1,enceladus:2},grant:["enceladus",3],cost:{Knowledge:()=>9e5},effect:z("tech_zero_g_lab_effect"),action(){return!!Cs($(this)[0])&&(t.space.zero_g_lab={count:0,on:0},!0)}},operating_base:{id:"tech-operating_base",title:z("tech_operating_base"),desc:z("tech_operating_base"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{enceladus:3,triton:1},grant:["enceladus",4],cost:{Knowledge:()=>14e5},effect:()=>z("tech_operating_base_effect",[ea().enceladus]),action(){return!!Cs($(this)[0])&&(t.space.operating_base={count:0,on:0},!0)}},munitions_depot:{id:"tech-munitions_depot",title:z("tech_munitions_depot"),desc:z("tech_munitions_depot"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{enceladus:4},grant:["enceladus",5],cost:{Knowledge:()=>15e5},effect:()=>z("tech_munitions_depot_effect"),action(){return!!Cs($(this)[0])&&(t.space.munitions_depot={count:0},!0)}},fob:{id:"tech-fob",title:z("tech_fob"),desc:z("tech_fob"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{triton:1},grant:["triton",2],cost:{Knowledge:()=>145e4},effect:()=>z("tech_fob_effect",[ea().triton]),action(){return!!Cs($(this)[0])&&(t.space.fob={count:0,on:0,troops:0,enemy:0},t.space.lander={count:0,on:0},t.space.crashed_ship={count:0},!0)}},bac_tanks_tp:{id:"tech-bac_tanks_tp",title:z("tech_bac_tanks"),desc:z("tech_bac_tanks_desc"),category:"military",era:"solar",path:["truepath"],reqs:{medic:1,triton:2},grant:["medic",2],cost:{Knowledge:()=>175e4},effect:z("tech_bac_tanks_effect"),action(){return!!Cs($(this)[0])}},medkit:{id:"tech-medkit",title:z("tech_medkit"),desc:z("tech_medkit"),category:"military",era:"solar",path:["truepath"],reqs:{medic:2,outer:4},grant:["medic",3],cost:{Knowledge:()=>225e4,Quantium:()=>25e4,Cipher:()=>8e3},effect:z("tech_medkit_effect"),action(){return!!Cs($(this)[0])}},sam_site:{id:"tech-sam_site",title:z("tech_sam_site"),desc:z("tech_sam_site"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{titan:6,triton:1},grant:["titan",7],cost:{Knowledge:()=>1475e3},effect:()=>z("tech_sam_site_effect",[ea().titan]),action(){return!!Cs($(this)[0])&&(t.space.sam={count:0,on:0},!0)}},data_cracker:{id:"tech-data_cracker",title:z("tech_data_cracker"),desc:z("tech_data_cracker"),category:"science",era:"solar",path:["truepath"],reqs:{titan:7,kuiper:1},grant:["titan",8],cost:{Knowledge:()=>275e4,Cipher:()=>25e3},effect:()=>z("tech_data_cracker_effect",[t.resource.Cipher.name]),action(){return!!Cs($(this)[0])&&(t.space.decoder={count:0,on:0},!0)}},ai_core_tp:{id:"tech-ai_core_tp",title:z("tech_ai_core"),desc:z("tech_ai_core"),category:"ai_core",era:"solar",path:["truepath"],reqs:{titan:8},grant:["titan",9],cost:{Knowledge:()=>3e6,Cipher:()=>1e5},effect:z("tech_ai_core_effect"),action(){return!!Cs($(this)[0])&&(t.space.ai_core={count:0},!0)}},ai_optimizations:{id:"tech-ai_optimizations",title:z("tech_ai_optimizations"),desc:z("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:()=>375e4,Cipher:()=>75e3},effect:z("tech_ai_optimizations_effect"),action(){return!!Cs($(this)[0])},class:"synth"},synthetic_life:{id:"tech-synthetic_life",title:z("tech_synthetic_life"),desc:z("tech_synthetic_life"),category:"ai_core",era:"solar",path:["truepath"],reqs:{titan_ai_core:2},grant:["titan_ai_core",3],cost:{Knowledge:()=>4e6,Cipher:()=>75e3},effect:z("tech_synthetic_life_effect"),action(){return!!Cs($(this)[0])&&(t.space.ai_colonist={count:0,on:0},!0)},class:"synth"},protocol66:{id:"tech-protocol66",title:z("tech_protocol66"),desc:z("tech_protocol66"),category:"ai_core",era:"solar",path:["truepath"],reqs:{titan_ai_core:3,corrupted_ai:1},grant:["corrupted_ai",2],cost:{Knowledge:()=>5e6},effect:z("tech_protocol66_effect"),action(){return!!js($(this)[0])},flair:z("tech_protocol66_flair"),class:"synth"},protocol66a:{id:"tech-protocol66a",title:z("tech_protocol66"),desc:z("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:()=>5e6},effect(){let e=gc("ai"),a="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name"),r=`
    ${z("tech_protocol66a_effect_gains",[e.plasmid,a,e.phage,e.cores])}
    `;return`
    ${z("tech_protocol66a_effect")}
    ${r}`},action(){return!!Cs($(this)[0])&&(P.w&&P.w.terminate(),Ii(),$("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(){!function(){t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),C(),Vi("reset",{end:"ai apocalypse"}),eo(`extinct_${t.race.species}`),eo("obsolete"),eo("squished",!0),t.race.junker&&"junker"===t.race.species&&to("the_misery");let a=t.race.species,r=t.race.gods,s=t.city.calendar.orbit,i=t.city.biome,c=t.city.ptrait,o=t.city.geology,n=gc("ai");io(),t.stats.aiappoc++,zc(),t.prestige.Phage.count+=n.phage,t.stats.phage+=n.phage,"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=n.plasmid,t.stats.antiplasmid+=n.plasmid):(t.prestige.Plasmid.count+=n.plasmid,t.stats.plasmid+=n.plasmid),t.prestige.AICore.count+=n.cores,t.stats.cores+=n.cores;let l="synthetic"!==_i[a].type?a:t.race.hasOwnProperty("srace")?t.race.srace:a;t.stats.synth[l]=!0;let u=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0;t.race={species:"protoplasm",gods:a,old_gods:r,srace:l,universe:t.race.universe,seeded:!1,seed:Math.floor(g(1e4)),ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended},u>0&&(t.race.corruption=u),Z({orbit:s,biome:i,ptrait:c,geology:o}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}()}),4e3),!0)},flair:z("tech_protocol66a_flair"),class:"synth"},terraforming_tp:{id:"tech-terraforming_tp",title:z("tech_terraforming"),desc:z("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:()=>5e6},effect:()=>z("tech_terraforming_effect",[ea().red]),action(){return!!Cs($(this)[0])&&(t.space.terraformer={count:0},!0)}},quantium:{id:"tech-quantium",title:z("tech_quantium"),desc:z("tech_quantium"),category:"crafting",era:"solar",path:["truepath"],reqs:{supercollider:10,enceladus:3},grant:["quantium",1],cost:{Knowledge:()=>1e6,Elerium:()=>1e3,Nano_Tube:()=>1e6,Graphene:()=>1e6},effect:z("tech_quantium_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Quantium.display=!0,!0)},post(){Ai()}},anitgrav_bunk:{id:"tech-anitgrav_bunk",title:z("tech_anitgrav_bunk"),desc:z("tech_anitgrav_bunk"),category:"military",era:"solar",path:["truepath"],reqs:{marines:1,quantium:1},grant:["marines",2],cost:{Knowledge:()=>125e4,Quantium:()=>5e5},effect:()=>z("tech_anitgrav_bunk_effect",[z("space_red_space_barracks_title")]),action(){return!!Cs($(this)[0])}},higgs_boson_tp:{id:"tech-higgs_boson_tp",title:z("tech_higgs_boson"),desc:z("tech_higgs_boson"),category:"science",era:"early_space",path:["truepath"],reqs:{supercollider:2},grant:["tp_particles",1],cost:{Knowledge:()=>125e3},effect:z("tech_higgs_boson_effect"),action(){return!!Cs($(this)[0])}},long_range_probes:{id:"tech-long_range_probes",title:z("tech_long_range_probes"),desc:z("tech_long_range_probes"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{high_tech:10,elerium:1},grant:["outer",1],cost:{Knowledge:()=>4e5,Uranium:()=>2e4,Iridium:()=>25e4,Neutronium:()=>3e3,Elerium:()=>350},effect:z("tech_long_range_probes_effect"),action(){return!!Cs($(this)[0])&&(t.settings.space.titan=!0,t.settings.space.enceladus=!0,t.space.titan_spaceport={count:0,on:0,support:0,s_max:0},t.space.electrolysis={count:0,on:0,support:0,s_max:0},!0)}},strange_signal:{id:"tech-strange_signal",title:z("tech_strange_signal"),desc:z("tech_strange_signal"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:1,syard_sensor:4},grant:["outer",2],cost:{Knowledge:()=>135e4},effect:z("tech_strange_signal_effect"),action(){return!!Cs($(this)[0])&&(t.settings.space.triton=!0,!0)}},data_analysis:{id:"tech-data_analysis",title:z("tech_data_analysis"),desc:z("tech_data_analysis"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:3},grant:["outer",4],cost:{Knowledge:()=>18e5,Cipher:()=>12500},effect:z("tech_data_analysis_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_data_analysis_result"),"info",!1,["progress"]),t.space.syndicate.spc_titan+=500,t.space.syndicate.spc_enceladus+=250,t.space.syndicate.spc_triton+=1e3,!0)}},mass_relay:{id:"tech-mass_relay",title:z("tech_mass_relay"),desc:z("tech_mass_relay"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:4},grant:["outer",5],cost:{Knowledge:()=>22e5,Cipher:()=>4e4},effect:z("tech_mass_relay_effect"),action(){return!!Cs($(this)[0])&&(t.space.mass_relay={count:0},!0)}},nav_data:{id:"tech-nav_data",title:z("tech_nav_data"),desc:z("tech_nav_data"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:6},grant:["outer",7],cost:{Knowledge:()=>225e4,Cipher:()=>6e4},effect:z("tech_nav_data_effect"),action(){return!!Cs($(this)[0])&&(t.settings.space.eris=!0,t.settings.space.kuiper=!0,t.tech.eris_scan=0,t.space.drone_control={count:0,on:0,support:0,s_max:0},Bi(z("tech_nav_data_result",[ea().eris]),"info",!1,["progress"]),!0)}},sensor_logs:{id:"tech-sensor_logs",title:z("tech_sensor_logs"),desc:z("tech_sensor_logs"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:7},grant:["outer",8],cost:{Knowledge:()=>35e5,Cipher:()=>65e3},effect:z("tech_sensor_logs_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_sensor_logs_result"),"info",!1,["progress"]),!0)}},dronewar:{id:"tech-dronewar",title:z("tech_dronewar"),desc:z("tech_dronewar"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{eris:2,titan_ai_core:1},grant:["eris",3],cost:{Knowledge:()=>32e5,Cipher:()=>25e3},effect:()=>z("tech_dronewar_effect",[ea().eris]),action(){return!!Cs($(this)[0])&&(t.space.shock_trooper={count:0,on:0},t.space.digsite={count:0,enemy:1e4},!0)}},drone_tank:{id:"tech-drone_tank",title:z("tech_drone_tank"),desc:z("tech_drone_tank"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{eris:3},grant:["eris",4],cost:{Knowledge:()=>34e5,Cipher:()=>5e4},effect:z("tech_drone_tank_effect"),action(){return!!Cs($(this)[0])&&(t.space.tank={count:0,on:0},!0)}},stanene_tp:{id:"tech-stanene_tp",title:z("tech_stanene"),desc:z("tech_stanene"),category:"crafting",era:"solar",path:["truepath"],reqs:{titan:1,enceladus:1},grant:["stanene",1],cost:{Knowledge:()=>525e3,Aluminium:()=>5e5,Nano_Tube:()=>1e5},effect:z("tech_stanene_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Stanene.display=!0,Bi(z("tech_stanene_avail"),"info",!1,["progress"]),!0)},post(){Qs(),Ai()}},graphene_tp:{id:"tech-graphene_tp",title:z("tech_graphene"),desc:z("tech_graphene"),category:"crafting",era:"solar",path:["truepath"],reqs:{titan:5},grant:["graphene",1],cost:{Knowledge:()=>64e4,Adamantite:()=>25e3},effect:z("tech_graphene_effect"),action(){return!!Cs($(this)[0])&&(t.space.g_factory={count:0,on:0,Lumber:0,Coal:0,Oil:0},!0)}},virtual_reality_tp:{id:"tech-virtual_reality_tp",title:z("tech_virtual_reality"),desc:z("tech_virtual_reality"),category:"progress",era:"solar",path:["truepath"],reqs:{high_tech:11,titan:4,stanene:1},grant:["high_tech",12],cost:{Knowledge:()=>616e3,Nano_Tube:()=>1e6,Stanene:()=>125e3},effect:z("tech_virtual_reality_effect"),action(){return!!Cs($(this)[0])},flair:()=>z("tech_virtual_reality_flair")},electrolysis:{id:"tech-electrolysis",title:z("tech_electrolysis"),desc:z("tech_electrolysis"),category:"power_generation",era:"solar",path:["truepath"],reqs:{titan:2,enceladus:1},grant:["titan",3],cost:{Knowledge:()=>465e3},effect:()=>z("tech_electrolysis_effect",[ea().titan,t.resource.Water.name]),action(){return!!Cs($(this)[0])&&(t.space.titan_quarters={count:0,on:0},t.space.titan_mine={count:0,on:0,ratio:90},!0)}},storehouse:{id:"tech-storehouse",title:()=>z("tech_storehouse",[ea().titan]),desc:()=>z("tech_storehouse",[ea().titan]),category:"storage",era:"solar",path:["truepath"],reqs:{titan:4},grant:["titan",5],cost:{Knowledge:()=>5e5},effect:()=>z("tech_storehouse_effect",[ea().titan]),action(){return!!Cs($(this)[0])&&(t.space.storehouse={count:0},!0)}},adamantite_vault_tp:{id:"tech-adamantite_vault_tp",title:z("tech_adamantite_vault"),desc:z("tech_adamantite_vault"),category:"banking",era:"solar",path:["truepath"],reqs:{vault:2,titan:4},grant:["vault",3],cost:{Money:()=>2e6,Knowledge:()=>56e4,Adamantite:()=>2e4},effect:z("tech_adamantite_vault_effect"),action(){return!!Cs($(this)[0])}},titan_bank:{id:"tech-titan_bank",title:()=>z("tech_titan_bank",[ea().titan]),desc:()=>z("tech_titan_bank",[ea().titan]),category:"storage",era:"solar",path:["truepath"],reqs:{titan:5},grant:["titan",6],cost:{Knowledge:()=>6e5},effect:()=>z("tech_titan_bank_effect",[ea().titan]),action(){return!!Cs($(this)[0])&&(t.space.titan_bank={count:0},!0)}},hydrogen_plant:{id:"tech-hydrogen_plant",title:z("tech_hydrogen_plant"),desc:z("tech_hydrogen_plant"),category:"power_generation",era:"solar",path:["truepath"],reqs:{titan:4,stanene:1},grant:["titan_power",1],cost:{Knowledge:()=>55e4},effect:()=>z("tech_hydrogen_plant_effect"),action(){return!!Cs($(this)[0])&&(t.space.hydrogen_plant={count:0,on:0},!0)}},water_mining:{id:"tech-water_mining",title:z("tech_water_mining"),desc:z("tech_water_mining"),category:"power_generation",era:"solar",path:["truepath"],reqs:{titan:2,enceladus:1},grant:["enceladus",2],cost:{Knowledge:()=>45e4},effect:()=>z("tech_water_mining_effect",[ea().enceladus,_i[t.race.species].home,t.resource.Water.name]),action(){return!!Cs($(this)[0])&&(t.space.water_freighter={count:0,on:0},!0)}},mercury_smelting:{id:"tech-mercury_smelting",title:z("tech_mercury_smelting"),desc:z("tech_mercury_smelting"),category:"mining",era:"solar",path:["truepath"],reqs:{hell:1,titan:4,smelting:6},grant:["m_smelting",1],cost:{Knowledge:()=>625e3,Adamantite:()=>5e4},effect:()=>z("tech_mercury_smelting_effect",[ea().hell]),action(){return!!Cs($(this)[0])&&(t.space.hell_smelter={count:0},!0)}},iridium_smelting:{id:"tech-iridium_smelting",title:z("tech_iridium_smelting"),desc:z("tech_iridium_smelting"),category:"mining",era:"solar",path:["truepath"],reqs:{m_smelting:1,graphene:1},grant:["m_smelting",2],cost:{Knowledge:()=>825e3,Graphene:()=>125e3},effect:z("tech_iridium_smelting_effect"),action(){return!!Cs($(this)[0])}},adamantite_crates:{id:"tech-adamantite_crates",title:z("tech_adamantite_crates"),desc:z("tech_adamantite_crates_desc"),category:"storage",era:"solar",path:["truepath"],reqs:{container:5,titan:4},grant:["container",6],cost:{Knowledge:()=>525e3,Adamantite:()=>12500},effect:z("tech_adamantite_crates_effect"),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},bolognium_crates_tp:{id:"tech-bolognium_crates_tp",title:()=>z("tech_crates",[t.resource.Bolognium.name]),desc:()=>z("tech_crates",[t.resource.Bolognium.name]),category:"storage",era:"tauceti",path:["truepath"],reqs:{container:7,tauceti:4},grant:["container",8],cost:{Knowledge:()=>616e4,Bolognium:()=>75e4},effect:()=>z("tech_bolognium_crates_effect",[t.resource.Bolognium.name]),action(){return!!Cs($(this)[0])}},adamantite_containers_tp:{id:"tech-adamantite_containers_tp",title:()=>z("tech_containers",[t.resource.Adamantite.name]),desc:()=>z("tech_adamantite_containers_desc",[t.resource.Adamantite.name]),category:"storage",era:"solar",path:["truepath"],reqs:{steel_container:4,titan:4},grant:["steel_container",5],cost:{Knowledge:()=>575e3,Adamantite:()=>17500},effect:()=>z("tech_adamantite_containers_effect",[t.resource.Adamantite.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},quantium_containers:{id:"tech-quantium_containers",title:()=>z("tech_containers",[t.resource.Quantium.name]),desc:()=>z("tech_containers",[t.resource.Quantium.name]),category:"storage",era:"solar",path:["truepath"],reqs:{steel_container:5,quantium:1},grant:["steel_container",6],cost:{Knowledge:()=>115e4,Quantium:()=>1e5},effect:()=>z("tech_quantium_containers_effect",[t.resource.Quantium.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},unobtainium_containers:{id:"tech-unobtainium_containers",title:()=>z("tech_containers",[t.resource.Unobtainium.name]),desc:()=>z("tech_containers",[t.resource.Unobtainium.name]),category:"storage",era:"tauceti",path:["truepath"],reqs:{steel_container:6,tau_red:7},grant:["steel_container",7],cost:{Knowledge:()=>725e4,Unobtainium:()=>7500},effect:()=>z("tech_bolognium_containers_effect",[t.resource.Unobtainium.name]),action(){return!!Cs($(this)[0])}},reinforced_shelving:{id:"tech-reinforced_shelving",title:z("tech_reinforced_shelving"),desc:z("tech_reinforced_shelving"),category:"storage",era:"solar",path:["truepath"],reqs:{graphene:1,titan:5},grant:["shelving",1],cost:{Knowledge:()=>85e4,Adamantite:()=>35e4,Graphene:()=>25e4},effect:z("tech_reinforced_shelving_effect"),action(){return!!Cs($(this)[0])}},garage_shelving:{id:"tech-garage_shelving",title:z("tech_garage_shelving"),desc:z("tech_garage_shelving"),category:"storage",era:"solar",path:["truepath"],reqs:{shelving:1,quantium:1},grant:["shelving",2],cost:{Knowledge:()=>125e4,Quantium:()=>75e3},effect:z("tech_garage_shelving_effect"),action(){return!!Cs($(this)[0])}},warehouse_shelving:{id:"tech-warehouse_shelving",title:z("tech_warehouse_shelving"),desc:z("tech_warehouse_shelving"),category:"storage",era:"solar",path:["truepath"],reqs:{shelving:2,quantium:1,outer:4},grant:["shelving",3],cost:{Knowledge:()=>225e4,Quantium:()=>1e6,Cipher:()=>25e3},effect:z("tech_warehouse_shelving_effect"),action(){return!!Cs($(this)[0])}},elerium_extraction:{id:"tech-elerium_extraction",title:z("tech_elerium_extraction"),desc:z("tech_elerium_extraction"),category:"mining",era:"solar",path:["truepath"],reqs:{kuiper:1},grant:["kuiper",2],cost:{Knowledge:()=>25e5,Orichalcum:()=>1e5,Cipher:()=>12e3},effect:()=>z("tech_elerium_extraction_effect"),action(){return!!Cs($(this)[0])&&(t.space.elerium_mine={count:0,on:0},!0)}},orichalcum_panels_tp:{id:"tech-orichalcum_panels_tp",title:z("tech_orichalcum_panels"),desc:z("tech_orichalcum_panels"),category:"power_generation",era:"solar",path:["truepath"],reqs:{kuiper:1,swarm:5},grant:["swarm",6],cost:{Knowledge:()=>24e5,Orichalcum:()=>125e3},effect:()=>z("tech_orichalcum_panels_effect"),action(){return!!Cs($(this)[0])}},shipyard:{id:"tech-shipyard",title:()=>z("tech_shipyard",[ea().dwarf]),desc:()=>z("tech_shipyard",[ea().dwarf]),category:"space_militarization",era:"solar",path:["truepath"],reqs:{outer:1,syndicate:1},grant:["shipyard",1],cost:{Knowledge:()=>42e4},effect:()=>z("tech_shipyard_effect",[ea().dwarf]),action(){return!!Cs($(this)[0])&&(t.space.shipyard={count:0,on:0,ships:[],expand:!0,sort:!0},vt(),!0)}},ship_lasers:{id:"tech-ship_lasers",title:z("tech_ship_lasers"),desc:z("tech_ship_lasers"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{military:7,syard_weapon:1},grant:["syard_weapon",2],cost:{Knowledge:()=>425e3,Elerium:()=>500},effect:z("tech_ship_lasers_effect"),action(){return!!Cs($(this)[0])}},pulse_lasers:{id:"tech-pulse_lasers",title:z("tech_pulse_lasers"),desc:z("tech_pulse_lasers"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_weapon:2},grant:["syard_weapon",3],cost:{Knowledge:()=>5e5,Elerium:()=>750},effect:z("tech_pulse_lasers_effect"),action(){return!!Cs($(this)[0])}},ship_plasma:{id:"tech-ship_plasma",title:z("tech_ship_plasma"),desc:z("tech_ship_plasma"),category:"space_militarization",era:"solar",reqs:{high_tech:13,syard_weapon:3},grant:["syard_weapon",4],path:["truepath"],cost:{Knowledge:()=>88e4,Elerium:()=>2500},effect:z("tech_ship_plasma_effect"),action(){return!!Cs($(this)[0])}},ship_phaser:{id:"tech-ship_phaser",title:z("tech_ship_phaser"),desc:z("tech_ship_phaser"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_weapon:4,quantium:1},grant:["syard_weapon",5],cost:{Knowledge:()=>1225e3,Quantium:()=>75e3},effect:z("tech_ship_phaser_effect"),action(){return!!Cs($(this)[0])}},ship_disruptor:{id:"tech-ship_disruptor",title:z("tech_ship_disruptor"),desc:z("tech_ship_disruptor"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_weapon:5,outer:4},grant:["syard_weapon",6],cost:{Knowledge:()=>2e6,Cipher:()=>25e3},effect:z("tech_ship_disruptor_effect"),action(){return!!Cs($(this)[0])}},destroyer_ship:{id:"tech-destroyer_ship",title:z("tech_destroyer_ship"),desc:z("tech_destroyer_ship"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_class:2},grant:["syard_class",3],cost:{Knowledge:()=>465e3},effect:z("tech_destroyer_ship_effect"),action(){return!!Cs($(this)[0])}},cruiser_ship_tp:{id:"tech-cruiser_ship_tp",title:z("tech_cruiser_ship"),desc:z("tech_cruiser_ship"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_class:3,titan:4},grant:["syard_class",4],cost:{Knowledge:()=>75e4,Adamantite:()=>5e4},effect:z("tech_cruiser_ship_tp"),action(){return!!Cs($(this)[0])}},h_cruiser_ship:{id:"tech-h_cruiser_ship",title:z("tech_h_cruiser_ship"),desc:z("tech_h_cruiser_ship"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_class:4,triton:1},grant:["syard_class",5],cost:{Knowledge:()=>15e5},effect:z("tech_h_cruiser_ship_effect"),action(){return!!Cs($(this)[0])}},dreadnought_ship:{id:"tech-dreadnought_ship",title:z("tech_dreadnought_ship"),desc:z("tech_dreadnought_ship"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_class:5,kuiper:1},grant:["syard_class",6],cost:{Knowledge:()=>25e5,Cipher:()=>1e4},effect:z("tech_dreadnought_ship_effect"),action(){return!!Cs($(this)[0])}},pulse_engine:{id:"tech-pulse_engine",title:z("outer_shipyard_engine_pulse"),desc:z("outer_shipyard_engine_pulse"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_engine:2,stanene:1},grant:["syard_engine",3],cost:{Knowledge:()=>555e3,Stanene:()=>25e4},effect:z("tech_pulse_engine_effect"),action(){return!!Cs($(this)[0])}},photon_engine:{id:"tech-photon_engine",title:z("outer_shipyard_engine_photon"),desc:z("outer_shipyard_engine_photon"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_engine:3,quantium:1},grant:["syard_engine",4],cost:{Knowledge:()=>115e4,Quantium:()=>5e4},effect:z("tech_photon_engine_effect"),action(){return!!Cs($(this)[0])}},vacuum_drive:{id:"tech-vacuum_drive",title:z("outer_shipyard_engine_vacuum"),desc:z("outer_shipyard_engine_vacuum"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_engine:4,outer:4},grant:["syard_engine",5],cost:{Knowledge:()=>185e4,Cipher:()=>1e4},effect:z("outer_shipyard_engine_vacuum_desc"),action(){return!!Cs($(this)[0])}},ship_fusion:{id:"tech-ship_fusion",title:z("tech_fusion_generator"),desc:z("tech_fusion_generator"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_power:3,quantium:1},grant:["syard_power",4],cost:{Knowledge:()=>11e5,Quantium:()=>65e3},effect:z("tech_fusion_generator_effect"),action(){return!!Cs($(this)[0])}},ship_elerium:{id:"tech-ship_elerium",title:z("tech_elerium_generator"),desc:z("tech_elerium_generator"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_power:4,outer:4},grant:["syard_power",5],cost:{Knowledge:()=>19e5,Cipher:()=>18e3},effect:z("tech_elerium_generator_effect"),action(){return!!Cs($(this)[0])}},quantum_signatures:{id:"tech-quantum_signatures",title:z("tech_quantum_signatures"),desc:z("tech_quantum_signatures"),category:"progress",era:"solar",path:["truepath"],reqs:{quantium:1,syard_sensor:3},grant:["syard_sensor",4],cost:{Knowledge:()=>105e4,Quantium:()=>1e4},effect:z("tech_quantum_signatures_effect"),action(){return!!Cs($(this)[0])}},interstellar_drive:{id:"tech-interstellar_drive",title:z("tech_interstellar_drive"),desc:z("tech_interstellar_drive"),category:"progress",era:"tauceti",path:["truepath"],reqs:{outer:8,titan_ai_core:2,syard_sensor:4},grant:["tauceti",1],cost:{Knowledge:()=>45e5,Quantium:()=>25e4,Cipher:()=>75e3},effect:z("tech_interstellar_drive_effect"),action(){return!!Cs($(this)[0])}},alien_outpost:{id:"tech-alien_outpost",title:z("tech_alien_outpost"),desc:z("tech_alien_outpost"),category:"science",era:"tauceti",path:["truepath"],reqs:{tauceti:2,tau_home:3},grant:["tau_home",4],cost:{Knowledge:()=>5e6,Cipher:()=>1e5},effect:z("tech_alien_outpost_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.alien_outpost={count:1,on:0},t.tauceti.jump_gate={count:0},t.space.jump_gate={count:0},Bi(z("tech_alien_outpost_msg"),"info",!1,["progress"]),!0)}},jumpgates:{id:"tech-jumpgates",title:z("tech_jumpgates"),desc:z("tech_jumpgates"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tauceti:2,tau_home:4},grant:["tauceti",3],cost:{Knowledge:()=>6e6},effect:z("tech_jumpgates_effect"),action(){return!!Cs($(this)[0])}},system_survey:{id:"tech-system_survey",title:z("tech_system_survey"),desc:z("tech_system_survey"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tauceti:4,womling_tech:1},grant:["tauceti",5],cost:{Knowledge:()=>7e6},effect:z("tech_system_survey_effect"),action(){return!!Cs($(this)[0])&&(t.settings.tau.roid=!0,t.settings.tau.gas=!0,t.tauceti.patrol_ship={count:0,on:0,support:0,s_max:0},!0)}},repository:{id:"tech-repository",title:z("tech_repository"),desc:z("tech_repository"),category:"storage",era:"tauceti",path:["truepath"],reqs:{tauceti:4,tau_home:4},grant:["tau_home",5],cost:{Knowledge:()=>65e5},effect:z("tech_repository_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.repository={count:0},!0)}},fusion_generator:{id:"tech-fusion_generator",title:z("tech_fusion_power"),desc:z("tech_fusion_power"),category:"power_generation",era:"tauceti",path:["truepath"],reqs:{tau_home:5},grant:["tau_home",6],cost:{Knowledge:()=>675e4},effect:z("tech_tau_fusion_power_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.fusion_generator={count:0,on:0},!0)}},tau_cultivation:{id:"tech-tau_cultivation",title:z("tech_tau_cultivation"),desc:z("tech_tau_cultivation"),category:"agriculture",era:"tauceti",path:["truepath"],reqs:{tau_home:6},grant:["tau_home",7],cost:{Knowledge:()=>69e5},effect:()=>z("tech_tau_cultivation_effect",[_i[t.race.species].home]),action(){return!!Cs($(this)[0])&&(t.tauceti.tau_farm={count:0,on:0},!0)}},tau_manufacturing:{id:"tech-tau_manufacturing",title:z("tech_tau_manufacturing"),desc:z("tech_tau_manufacturing"),category:"crafting",era:"tauceti",path:["truepath"],reqs:{tau_home:7},grant:["tau_home",8],cost:{Knowledge:()=>725e4},effect:()=>z("tech_tau_manufacturing_effect",[_i[t.race.species].home]),action(){return!!Cs($(this)[0])&&(t.tauceti.tau_factory={count:0,on:0},!0)}},weasels:{id:"tech-weasels",title:z("tech_weasels"),desc:z("tech_weasels"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:2},grant:["tau_red",3],cost:{Knowledge:()=>625e4},effect:()=>z("tech_weasels_effect",[z("tau_planet",[ea().red])]),action(){return!!Cs($(this)[0])&&(Bi(z("tech_weasels_msg",[z("tau_planet",[ea().red])]),"info",!1,["progress"]),!0)}},jeff:{id:"tech-jeff",title:z("tech_jeff"),desc:z("tech_jeff"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:3},grant:["tau_red",4],cost:{Knowledge:()=>638e4},effect:()=>z("tech_jeff_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_jeff_effect_msg",[]),"info",!1,["progress"]),!0)}},womling_fun:{id:"tech-womling_fun",title:z("tech_womling_fun"),desc:z("tech_womling_fun"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:5},grant:["tau_red",6],cost:{Knowledge:()=>665e4},effect:()=>z("tech_womling_fun_effect"),action(){return!!Cs($(this)[0])}},womling_lab:{id:"tech-womling_lab",title:z("tech_womling_lab"),desc:z("tech_womling_lab"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:6},grant:["tau_red",7],cost:{Knowledge:()=>69e5},effect:()=>z("tech_womling_lab_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.womling_lab={count:0,on:0,scientist:0,tech:0},t.tech.womling_tech=0,!0)}},womling_mining:{id:"tech-womling_mining",title:z("tech_womling_mining"),desc:z("tech_womling_mining"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:1},grant:["womling_mining",1],cost:{Knowledge:()=>71e5},effect:()=>z("tech_womling_mining_effect"),action(){return!!Cs($(this)[0])}},womling_firstaid:{id:"tech-womling_firstaid",title:z("tech_womling_firstaid"),desc:z("tech_womling_firstaid"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:2},grant:["womling_firstaid",1],cost:{Knowledge:()=>735e4},effect:()=>z("tech_womling_firstaid_effect"),action(){return!!Cs($(this)[0])}},womling_logistics:{id:"tech-womling_logistics",title:z("tech_womling_logistics"),desc:z("tech_womling_logistics"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:3},grant:["womling_logistics",1],cost:{Knowledge:()=>765e4},effect:()=>z("tech_womling_logistics_effect",[z("tau_red_orbital_platform")]),action(){return!!Cs($(this)[0])}},womling_repulser:{id:"tech-womling_repulser",title:z("tech_womling_repulser"),desc:z("tech_womling_repulser"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:4,womling_logistics:1},grant:["womling_logistics",2],cost:{Knowledge:()=>79e5},effect:()=>z("tech_womling_repulser_effect",[t.resource.Oil.name,z("tau_red_orbital_platform")]),action(){return!!Cs($(this)[0])}},womling_farming:{id:"tech-womling_farming",title:z("tech_womling_farming"),desc:z("tech_womling_farming"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:5},grant:["womling_pop",1],cost:{Knowledge:()=>82e5},effect:()=>z("tech_womling_farming_effect"),action(){return!!Cs($(this)[0])}},womling_housing:{id:"tech-womling_housing",title:z("tech_womling_housing"),desc:z("tech_womling_housing"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:6,womling_pop:1},grant:["womling_pop",2],cost:{Knowledge:()=>85e5},effect:()=>z("tech_womling_housing_effect"),action(){return!!Cs($(this)[0])}},womling_support:{id:"tech-womling_support",title:z("tech_womling_support"),desc:z("tech_womling_support"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:7,tau_gas:4},grant:["womling_technicians",1],cost:{Knowledge:()=>885e4},effect:()=>`
    ${z("tech_womling_support_effect")}
    `,action(){return!!Cs($(this)[0])&&(t.tauceti.womling_station={count:0,on:0},!0)}},womling_recycling:{id:"tech-womling_recycling",title:z("tech_womling_recycling"),desc:z("tech_womling_recycling"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:8},grant:["womling_recycling",1],cost:{Knowledge:()=>955e4},effect:()=>`
    ${z("tech_womling_recycling_effect")}
    `,action(){return!!Cs($(this)[0])}},asteroid_analysis:{id:"tech-asteroid_analysis",title:z("tech_asteroid_analysis"),desc:z("tech_asteroid_analysis"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tau_roid:1},grant:["tau_roid",2],cost:{Knowledge:()=>735e4},effect:()=>z("tech_asteroid_analysis_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_asteroid_analysis_msg"),"info",!1,["progress"]),!0)}},shark_repellent:{id:"tech-shark_repellent",title:z("tech_shark_repellent"),desc:z("tech_shark_repellent"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tau_roid:2},grant:["tau_roid",3],cost:{Knowledge:()=>74e5},effect:()=>z("tech_shark_repellent_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_shark_repellent_msg"),"info",!1,["progress"]),!0)}},belt_mining:{id:"tech-belt_mining",title:z("tech_belt_mining"),desc:z("tech_belt_mining"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{tau_gas:3,tau_roid:3},grant:["tau_gas",4],cost:{Knowledge:()=>765e4},effect:()=>z("tech_belt_mining_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.ore_refinery={count:0,on:0,max:0,fill:0},t.tauceti.mining_ship={count:0,on:0,common:50,uncommon:50,rare:50},!0)}},adv_belt_mining:{id:"tech-adv_belt_mining",title:z("tech_adv_belt_mining"),desc:z("tech_adv_belt_mining"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{tau_roid:4},grant:["tau_roid",5],cost:{Knowledge:()=>79e5},effect:()=>z("tech_adv_belt_mining_effect"),action(){return!!Cs($(this)[0])}},space_whaling:{id:"tech-space_whaling",title:z("tech_space_whaling"),desc:z("tech_space_whaling"),category:"whaling",era:"tauceti",path:["truepath"],reqs:{tau_gas:3,tau_roid:3},grant:["tau_whale",1],cost:{Knowledge:()=>75e5},effect:()=>z("tech_space_whaling_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.whaling_station={count:0,on:0,max:0,fill:0},t.tauceti.whaling_ship={count:0,on:0},!0)}},infectious_disease_lab:{id:"tech-infectious_disease_lab",title:()=>z(t.race.artifical?"tech_infectious_disease_lab_s":"tech_infectious_disease_lab"),desc:()=>z(t.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:()=>825e4},effect:()=>z(t.race.artifical?"tech_infectious_disease_lab_effect_s":"tech_infectious_disease_lab_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.infectious_disease_lab={count:0,on:0,cure:0},!0)}},isolation_protocol:{id:"tech-isolation_protocol",title:z("tech_isolation_protocol"),desc:z("tech_isolation_protocol"),category:"plague",era:"tauceti",path:["truepath"],reqs:{disease:2},grant:["disease",3],not_trait:["lone_survivor"],cost:{Knowledge:()=>85e5},effect:()=>`
    ${z("tech_isolation_protocol_effect",[z("tab_tauceti")])}
    ${z("tech_isolation_protocol_warning")}
    `,action(){return!!Cs($(this)[0])&&(t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),t.tech.isolation=1,function(){let e={city:{},space:{},ships:[]};e.ships=[...t.space.shipyard.ships],t.space.shipyard.ships=[],t.settings.spaceTabs=6,t.settings.showSpace=!1,t.settings.showOuter=!1,t.settings.showCity=!1,t.settings.showShipYard=!1,5===t.settings.govTabs&&(t.settings.govTabs=0),_t(),sc($("#shipList")),Object.keys(Zr.city).forEach((function(a){t.city.hasOwnProperty(a)&&t.city[a].hasOwnProperty("count")&&(t.race.hooved&&Zr.city[a].cost.hasOwnProperty("Horseshoe")&&(t.race.shoecnt-=Zr.city[a].cost.Horseshoe()*t.city[a].count),e.city[a]={c:t.city[a].count},t.city[a].count=0,t.city[a].hasOwnProperty("on")&&(e.city[a].o=t.city[a].on,t.city[a].on=0))})),["spc_home","spc_moon","spc_red","spc_hell","spc_sun","spc_gas","spc_gas_moon","spc_belt","spc_dwarf","spc_titan","spc_enceladus","spc_triton","spc_kuiper","spc_eris"].forEach((function(a){Object.keys(Zr.space[a]).forEach((function(r){t.space.hasOwnProperty(r)&&t.space[r].hasOwnProperty("count")&&(t.race.hooved&&Zr.space[a][r].cost.hasOwnProperty("Horseshoe")&&(t.race.shoecnt-=Zr.space[a][r].cost.Horseshoe()*t.space[r].count),e.space[r]={c:t.space[r].count},t.space[r].count=0,t.space[r].hasOwnProperty("on")&&(e.space[r].o=t.space[r].on,t.space[r].on=0))}))})),t.race.hooved&&t.race.shoecnt<5&&(t.race.shoecnt=5),t.resource.Zen.display&&(t.resource.Zen.display=!1),t.resource.Slave.display&&(t.resource.Slave.display=!1,t.resource.Slave.amount=0,B("slave")),t.race.deconstructor&&Js.forEach((function(e){t.city.nanite_factory[e]=0})),Object.keys(t.resource).forEach((function(e){t.resource[e].hasOwnProperty("trade")&&(t.resource[e].trade=0)})),Object.keys(oa).forEach((function(e){["professor","scientist","pit_miner","cement_worker","craftsman"].includes(e)||(t.civic[e].workers=0,t.civic[e].assigned=0)})),["forager","farmer","lumberjack","quarry_worker","miner","coal_miner","priest","colonist","titan_colonist","space_miner"].forEach((function(e){t.civic[e].display=!1})),t.civic.hunter.display?t.civic.d_job="hunter":t.civic.d_job="unemployed",t.arpa.sequence&&(t.arpa.sequence.on=!1,t.arpa.sequence.boost=!1);for(let e of Object.values(t.race.purgatory.city))e.hasOwnProperty("count")&&(e.count=0),e.hasOwnProperty("on")&&(e.on=0);for(let e of Object.values(t.race.purgatory.space))e.hasOwnProperty("count")&&(e.count=0),e.hasOwnProperty("on")&&(e.on=0);if(t.queue.hasOwnProperty("queue"))for(let e=t.queue.queue.length-1;e>=0;e--){let a=t.queue.queue[e];"city"!==a.action&&"space"!==a.action&&"starDock"!==a.action||t.queue.queue.splice(e,1)}t.tech.magic&&t.tech.magic>=2&&(t.tauceti.pylon={count:0},t.race.casting&&Object.keys(t.race.casting).forEach((function(e){t.race.casting[0]=0}))),t.tauceti.tauceti_casino={count:0,on:0},t.tauceti.tau_housing={count:0};let a=c.colony*Ve.tau_home.colony.citizens();t.resource[t.race.species].amount>a&&(t.resource[t.race.species].amount=a),B("spy"),B("spyop"),sc($("#infoTimer")),t.race.inactive=e}(),!0)}},focus_cure:{id:"tech-focus_cure",title:z("tech_focus_cure"),desc:z("tech_focus_cure"),category:"plague",era:"tauceti",path:["truepath"],reqs:{disease:2},grant:["disease",3],not_trait:["lone_survivor"],cost:{Knowledge:()=>85e5},effect:()=>`
    ${z("tech_focus_cure_effect",[z("tab_tauceti")])}
    ${z("tech_focus_cure_warning")}
    `,action(){return!!Cs($(this)[0])&&(t.tech.focus_cure=1,!0)}},decode_virus:{id:"tech-decode_virus",title:z("tech_decode_virus"),desc:z("tech_decode_virus"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:1},grant:["focus_cure",2],cost:{Knowledge:()=>9e6},effect:()=>`
    ${z(t.race.artifical?"tech_decode_virus_effect_s":"tech_decode_virus_effect")}
    `,action(){return!!Cs($(this)[0])&&(t.race.artifical?Bi(z("tech_decode_virus_msg1s",[Zr.tauceti.tau_home.infectious_disease_lab.title()]),"info",!1,["progress"]):Bi(z("tech_decode_virus_msg1",[Zr.tauceti.tau_home.infectious_disease_lab.title()]),"info",!1,["progress"]),!0)}},vaccine_campaign:{id:"tech-vaccine_campaign",title:z("tech_vaccine_campaign"),desc:z("tech_vaccine_campaign"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:3},grant:["focus_cure",4],cost:{Knowledge:()=>925e4},effect:()=>`
    ${z("tech_vaccine_campaign_effect",[t.race.artifical?Zr.city.boot_camp.title():Zr.city.hospital.title])}
    `,action(){return!!Cs($(this)[0])&&(t.race.vax=0,!0)}},vax_strat1:{id:"tech-vax_strat1",title:z("tech_vax_strat1"),desc:z("tech_vax_strat1"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge:()=>95e5},effect:()=>`
    ${z("tech_vax_strat1_effect")}
    ${z("tech_vax_warning")}
    `,action(){return!!Cs($(this)[0])&&(t.tech.vax_p=1,Bi(z("tech_vax_strat1_msg"),"info",!1,["progress"]),!0)}},vax_strat2:{id:"tech-vax_strat2",title:z("tech_vax_strat2"),desc:z("tech_vax_strat2"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge:()=>95e5},effect:()=>`
    ${z("tech_vax_strat2_effect")}
    ${z("tech_vax_warning")}
    `,action(){return!!Cs($(this)[0])&&(t.tech.vax_f=1,Bi(z("tech_vax_strat2_msg"),"info",!1,["progress"]),!0)}},vax_strat3:{id:"tech-vax_strat3",title:z("tech_vax_strat3"),desc:z("tech_vax_strat3"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge:()=>95e5},effect:()=>`
    ${z("tech_vax_strat3_effect")}
    ${z("tech_vax_warning")}
    `,action(){return!!Cs($(this)[0])&&(t.tech.vax_s=1,Bi(z("tech_vax_strat3_msg"),"info",!1,["progress"]),!0)}},vax_strat4:{id:"tech-vax_strat4",title:z("tech_vax_strat4"),desc:z("tech_vax_strat4"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge:()=>95e5},effect:()=>`
    ${z("tech_vax_strat4_effect")}
    ${z("tech_vax_warning")}
    `,action(){return!!Cs($(this)[0])&&(t.tech.vax_c=1,Bi(z("tech_vax_strat4_msg"),"info",!1,["progress"]),!0)}},cloning:{id:"tech-cloning",title:z("tech_cloning"),desc:z("tech_cloning"),category:"housing",era:"tauceti",path:["truepath"],reqs:{focus_cure:7},grant:["cloning",1],cost:{Knowledge:()=>975e4},effect:()=>`
    ${z(t.race.artifical?"tech_cloning_effect_s":"tech_cloning_effect")}
    `,action(){return!!Cs($(this)[0])&&(t.tauceti.cloning_facility={count:0,on:0},!0)}},clone_degradation:{id:"tech-clone_degradation",title:z("tech_clone_degradation"),desc:z("tech_clone_degradation"),category:"progress",era:"tauceti",path:["truepath"],reqs:{cloning:1},grant:["cloning",2],cost:{Knowledge:()=>1e7},effect:()=>`
    ${z("tech_clone_degradation_effect")}
    `,action(){return!!Cs($(this)[0])&&(Bi(z("tech_clone_degradation_msg"),"info",!1,["progress"]),!0)}},digital_paradise:{id:"tech-digital_paradise",title:z("tech_digital_paradise"),desc:z("tech_digital_paradise"),category:"progress",era:"tauceti",path:["truepath"],reqs:{cloning:2},grant:["matrix",1],cost:{Knowledge:()=>105e5,Cipher:()=>2e5},effect:()=>`
    ${z("tech_digital_paradise_effect")}
    `,action(){return!!Cs($(this)[0])}},ringworld:{id:"tech-ringworld",title:z("tech_ringworld"),desc:z("tech_ringworld"),category:"progress",era:"tauceti",path:["truepath"],reqs:{matrix:1},grant:["matrix",2],cost:{Money:()=>3e9,Knowledge:()=>11e6},effect:()=>`
    ${z("tech_ringworld_effect")}
    `,action(){return!!Cs($(this)[0])&&(t.settings.tau.star=!0,t.tauceti.ringworld={count:0},!0)}},iso_gambling:{id:"tech-iso_gambling",title:z("tech_iso_gambling"),desc:z("tech_iso_gambling"),category:"banking",era:"tauceti",reqs:{gambling:4,isolation:1},grant:["iso_gambling",1],cost:{Knowledge:()=>865e4},effect:z("tech_iso_gambling_effect",[5]),action(){return!!Cs($(this)[0])}},outpost_boost:{id:"tech-outpost_boost",title:()=>z("tech_outpost_boost"),desc:()=>z("tech_outpost_boost"),category:"special",era:"tauceti",path:["truepath"],reqs:{tau_home:4,isolation:1},grant:["outpost_boost",1],cost:{Knowledge:()=>89e5},effect:()=>z("tech_outpost_boost_effect"),action(){return!!Cs($(this)[0])},flair:()=>z("tech_outpost_boost_flair")},cultural_center:{id:"tech-cultural_center",title:z("tech_cultural_center"),desc:z("tech_cultural_center"),category:"banking",era:"tauceti",path:["truepath"],reqs:{iso_gambling:1,isolation:1},grant:["tau_culture",1],cost:{Knowledge:()=>885e4},effect:z("tech_cultural_center_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.tau_cultural_center={count:0,on:0},!0)},flair:()=>z("tech_cultural_center_flair")},outer_tau_survey:{id:"tech-outer_tau_survey",title:z("tech_outer_tau_survey"),desc:z("tech_outer_tau_survey"),category:"progress",era:"tauceti",path:["truepath"],reqs:{outpost_boost:1,plague:5},grant:["tau_gas2",1],cost:{Knowledge:()=>91e5,Helium_3:()=>+Xt(5e6).toFixed(0)},effect:z("tech_outer_tau_survey_effect"),action(){return!!Cs($(this)[0])&&(t.settings.tau.gas2=!0,!0)}},alien_research:{id:"tech-alien_research",title:z("tech_alien_research"),desc:z("tech_alien_research"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tau_gas2:5},grant:["tau_gas2",6],cost:{Knowledge:()=>935e4},effect:z("tech_alien_research_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.alien_space_station.decrypted=0,t.tauceti.alien_space_station.focus=95,Bi(z("tech_alien_research_msg"),"info",!1,["progress"]),!0)}},womling_gene_therapy:{id:"tech-womling_gene_therapy",title:z("tech_womling_gene_therapy"),desc:z("tech_womling_gene_therapy"),category:"womling",era:"tauceti",path:["truepath"],reqs:{alien_data:1},grant:["womling_gene",1],cost:{Knowledge:()=>952e4},effect:z("tech_womling_gene_therapy_effect"),action(){return!!Cs($(this)[0])}},food_culture:{id:"tech-food_culture",title:()=>z("tech_food_culture",[z(`tau_gas2_alien_station_data2_r${t.race.tau_food_item||0}`)]),desc:()=>z("tech_food_culture",[z(`tau_gas2_alien_station_data2_r${t.race.tau_food_item||0}`)]),category:"banking",era:"tauceti",path:["truepath"],reqs:{alien_data:2,tau_culture:1},grant:["tau_culture",2],cost:{Knowledge:()=>941e4},effect:()=>z("tech_food_culture_effect",[z(`tau_gas2_alien_station_data2_r${t.race.tau_food_item||0}`),z("tech_cultural_center")]),action(){return!!Cs($(this)[0])}},advanced_refinery:{id:"tech-advanced_refinery",title:z("tech_advanced_refinery"),desc:z("tech_advanced_refinery"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{alien_data:3},grant:["tau_ore_mining",1],cost:{Knowledge:()=>968e4},effect:()=>z("tech_advanced_refinery_effect"),action(){return!!Cs($(this)[0])}},advanced_pit_mining:{id:"tech-advanced_pit_mining",title:z("tech_advanced_pit_mining"),desc:z("tech_advanced_pit_mining"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{alien_data:3},grant:["tau_pit_mining",1],cost:{Knowledge:()=>972e4},effect:()=>z("tech_advanced_pit_mining_effect"),action(){return!!Cs($(this)[0])}},useless_junk:{id:"tech-useless_junk",title:z("tech_useless_junk"),desc:z("tech_useless_junk"),category:"womling",era:"tauceti",path:["truepath"],reqs:{alien_data:4},grant:["tau_junksale",1],cost:{Knowledge:()=>955e4},effect:()=>z("tech_useless_junk_effect",[z(`tau_gas2_alien_station_data4_r${t.race.tau_junk_item||0}`),z("tau_red_womlings")]),action(){return!!Cs($(this)[0])}},advanced_asteroid_mining:{id:"tech-advanced_asteroid_mining",title:z("tech_advanced_asteroid_mining"),desc:z("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:()=>975e4},effect:()=>z("tech_advanced_asteroid_mining_effect",[z("tau_roid_mining_ship")]),action(){return!!Cs($(this)[0])}},advanced_material_synthesis:{id:"tech-advanced_material_synthesis",title:z("tech_advanced_material_synthesis"),desc:z("tech_advanced_material_synthesis"),category:"crafting",era:"tauceti",path:["truepath"],reqs:{alien_data:5,disease:1},grant:["alien_crafting",1],cost:{Knowledge:()=>988e4},effect:()=>z("tech_advanced_material_synthesis_effect",[t.resource.Quantium.name]),action(){return!!Cs($(this)[0])}},matrioshka_brain:{id:"tech-matrioshka_brain",title:z("tech_matrioshka_brain"),desc:z("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:()=>1e7},effect:()=>z("tech_matrioshka_brain_effect",[Zr.tauceti.tau_gas2.info.name()]),action(){return!!Cs($(this)[0])&&(t.tauceti.matrioshka_brain={count:0},!0)}},ignition_device:{id:"tech-ignition_device",title:z("tech_ignition_device"),desc:z("tech_ignition_device"),category:"progress",era:"tauceti",path:["truepath"],reqs:{alien_data:6,tau_gas2:7},grant:["tau_gas2",8],cost:{Knowledge:()=>105e5},effect:()=>z("tech_ignition_device_effect",[Zr.tauceti.tau_gas2.info.name()]),action(){return!!Cs($(this)[0])&&(t.tauceti.ignition_device={count:0},t.tauceti.hasOwnProperty("matrioshka_brain")||(t.tauceti.matrioshka_brain={count:0}),!0)}},replicator:{id:"tech-replicator",title:()=>"antimatter"===t.race.universe?z("tech_antireplicator"):z("tech_replicator"),desc:()=>"antimatter"===t.race.universe?z("tech_antireplicator"):z("tech_replicator"),category:"special",era:"tauceti",path:["truepath"],reqs:{tau_home:4,isolation:1},trait:["lone_survivor"],grant:["replicator",1],cost:{Knowledge:()=>625e4},effect:()=>"antimatter"===t.race.universe?z("tech_antireplicator_effect"):z("tech_replicator_effect"),action(){return!!Cs($(this)[0])&&(t.race.replicator={res:"Unobtainium",pow:1},!0)}},womling_unlock:{id:"tech-womling_unlock",title:z("tech_womling_unlock"),desc:z("tech_womling_unlock"),category:"womling",era:"tauceti",path:["truepath"],reqs:{replicator:1},trait:["lone_survivor"],grant:["tau_red",4],cost:{Knowledge:()=>65e5},effect:()=>z("tech_womling_unlock_effect",[z("tau_planet",[ea().red])]),action(){return!!Cs($(this)[0])&&(t.settings.tau.red=!0,t.tauceti.orbital_platform.count=1,t.tauceti.orbital_platform.on=1,!0)}},garden_of_eden:{id:"tech-garden_of_eden",title:z("tech_garden_of_eden"),desc:z("tech_garden_of_eden"),category:"special",era:"tauceti",path:["truepath"],reqs:{eden:1},grant:["eden",2],cost:{Knowledge:()=>1e7},effect:()=>z("tech_garden_of_eden_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.goe_facility={count:0},!0)}}};function Ur(){t.tech.world_control=1,sc($("#garrison")),sc($("#c_garrison")),ve($("#garrison"),!0),ve($("#c_garrison"),!1);for(let e=0;e<3;e++){if(t.civic.foreign[`gov${e}`].occ){let a=ua("federation"===t.civic.govern.type?15:20);t.civic.garrison.max+=a,t.civic.garrison.workers+=a,t.civic.foreign[`gov${e}`].occ=!1}t.civic.foreign[`gov${e}`].buy=!1,t.civic.foreign[`gov${e}`].anx=!1,t.civic.foreign[`gov${e}`].sab=0,t.civic.foreign[`gov${e}`].act="none"}B("spy"),B("spyop")}function Wr(e,a){let r=["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ín","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 r;let s=(t.stats.hasOwnProperty("reset")?t.stats.reset:0)%r.length;return e?z(`cheese_${r[s]}`):z("tech_swiss_bank",[z(`cheese_${r[s]}`)])}const Qr={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"]},Zr={evolution:{rna:{id:"evolution-rna",title:z("resource_RNA_name"),desc:()=>z("evo_rna",[t.race.rapid_mutation?2:1]),condition:()=>t.resource.hasOwnProperty("RNA")&&t.resource.RNA.display&&!t.race.evoFinalMenu,action:()=>(t.resource.RNA.amount0},dna:{id:"evolution-dna",title:z("evo_dna_title"),desc:z("evo_dna_desc"),condition:()=>t.resource.hasOwnProperty("DNA")&&t.resource.DNA.display&&!t.race.evoFinalMenu,cost:{RNA:()=>2},action:()=>(t.resource.RNA.amount>=2&&t.resource.DNA.amount0},membrane:{id:"evolution-membrane",title:z("evo_membrane_title"),desc:z("evo_membrane_desc"),condition:()=>t.evolution.hasOwnProperty("membrane")&&!t.race.evoFinalMenu,cost:{RNA:e=>cs("membrane",2,2,e)},effect:()=>z("evo_membrane_effect",[t.evolution.mitochondria?5*t.evolution.mitochondria.count+5:5]),action(){return!!Cs($(this)[0])&&(t.resource.RNA.max+=t.evolution.mitochondria?5*t.evolution.mitochondria.count+5:5,t.evolution.membrane.count++,!0)}},organelles:{id:"evolution-organelles",title:z("evo_organelles_title"),desc:z("evo_organelles_desc"),condition:()=>t.evolution.hasOwnProperty("organelles")&&!t.race.evoFinalMenu,cost:{RNA:e=>cs("organelles",12,8,e),DNA:e=>cs("organelles",4,4,e)},effect(){let e=t.race.rapid_mutation?2:1;return t.tech.evo&&t.tech.evo>=2&&e++,z("evo_organelles_effect",[e])},action(){return!!Cs($(this)[0])&&(t.evolution.organelles.count++,!0)}},nucleus:{id:"evolution-nucleus",title:z("evo_nucleus_title"),desc:z("evo_nucleus_desc"),condition:()=>t.evolution.hasOwnProperty("nucleus")&&!t.race.evoFinalMenu,cost:{RNA:e=>cs("nucleus",38,t.tech.evo&&t.tech.evo>=4?16:32,e),DNA:e=>cs("nucleus",18,t.tech.evo&&t.tech.evo>=4?12:16,e)},effect:()=>z("evo_nucleus_effect",[t.tech.evo&&t.tech.evo>=5?2:1]),action(){return!!Cs($(this)[0])&&(t.evolution.nucleus.count++,!0)}},eukaryotic_cell:{id:"evolution-eukaryotic_cell",title:z("evo_eukaryotic_title"),desc:z("evo_eukaryotic_desc"),condition:()=>t.evolution.hasOwnProperty("eukaryotic_cell")&&!t.race.evoFinalMenu,cost:{RNA:e=>cs("eukaryotic_cell",20,20,e),DNA:e=>cs("eukaryotic_cell",40,12,e)},effect:()=>z("evo_eukaryotic_effect",[t.evolution.mitochondria?10*t.evolution.mitochondria.count+10:10]),action(){return!!Cs($(this)[0])&&(t.evolution.eukaryotic_cell.count++,t.resource.DNA.max+=t.evolution.mitochondria?10*t.evolution.mitochondria.count+10:10,!0)}},mitochondria:{id:"evolution-mitochondria",title:z("evo_mitochondria_title"),desc:z("evo_mitochondria_desc"),condition:()=>t.evolution.hasOwnProperty("mitochondria")&&!t.race.evoFinalMenu,cost:{RNA:e=>cs("mitochondria",75,50,e),DNA:e=>cs("mitochondria",65,35,e)},effect:z("evo_mitochondria_effect"),action(){return!!Cs($(this)[0])&&(t.evolution.mitochondria.count++,!0)}},sexual_reproduction:{id:"evolution-sexual_reproduction",title:z("evo_sexual_reproduction_title"),desc:z("evo_sexual_reproduction_desc"),reqs:{evo:1},grant:["evo",2],condition:()=>t.tech.evo&&1===t.tech.evo,cost:{DNA:()=>150},effect:z("evo_sexual_reproduction_effect"),action(){return!!Cs($(this)[0])&&(t.evolution.final=20,!0)},queue_complete:()=>t.tech.evo&&1===t.tech.evo?1:0},phagocytosis:{id:"evolution-phagocytosis",title:z("evo_phagocytosis_title"),desc:z("evo_phagocytosis_desc"),reqs:{evo:2},grant:["evo",3],condition:()=>t.tech.evo&&2===t.tech.evo,cost:{DNA:()=>175},effect:z("evo_phagocytosis_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_animal=1,t.evolution.final=40,!0)},queue_complete:()=>t.tech.evo&&2===t.tech.evo?1:0},chloroplasts:{id:"evolution-chloroplasts",title:()=>t.evolution.gselect?z("genelab_genus_plant"):z("evo_chloroplasts_title"),desc:z("evo_chloroplasts_desc"),reqs:{evo:2},grant:["evo",3],condition:()=>Yr(2),cost:{DNA:()=>175},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
    ${z("evo_chloroplasts_effect")}
    ${z("evo_warn_unwise")}
    `:z("evo_chloroplasts_effect"),action(){return!!Cs($(this)[0])&&(t.evolution.gselect?(t.tech.evo=7,t.tech.evo_plant=2,t.evolution.final=100):(t.tech.evo_plant=1,t.evolution.final=40),!0)},queue_complete:()=>t.tech.evo&&2===t.tech.evo?1:0,emblem:()=>Oc("genus_plant")},chitin:{id:"evolution-chitin",title:()=>t.evolution.gselect?z("genelab_genus_fungi"):z("evo_chitin_title"),desc:z("evo_chitin_desc"),reqs:{evo:2},grant:["evo",3],condition:()=>Yr(2),cost:{DNA:()=>175},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
    ${z("evo_chitin_effect")}
    ${z("evo_warn_unwise")}
    `:z("evo_chitin_effect"),action(){return!!Cs($(this)[0])&&(t.evolution.gselect?(t.tech.evo=7,t.tech.evo_fungi=2,t.evolution.final=100):(t.tech.evo_fungi=1,t.evolution.final=40),!0)},queue_complete:()=>t.tech.evo&&2===t.tech.evo?1:0,emblem:()=>Oc("genus_fungi")},exterminate:{id:"evolution-exterminate",title:()=>t.evolution.gselect?z("genelab_genus_synthetic"):z("evo_exterminate_title"),desc:z("evo_exterminate_desc"),reqs:{evo:2},grant:["evo",7],condition:()=>Yr(2)&&t.stats.achieve.obsolete&&t.stats.achieve.obsolete.l>=5,cost:{DNA:()=>200},effect:()=>z("evo_exterminate_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_synthetic=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&2===t.tech.evo?1:0,emblem:()=>Oc("genus_synthetic")},multicellular:{id:"evolution-multicellular",title:z("evo_multicellular_title"),desc:z("evo_multicellular_desc"),reqs:{evo:3},grant:["evo",4],condition:()=>t.tech.evo&&3===t.tech.evo,cost:{DNA:()=>200},effect:z("evo_multicellular_effect"),action(){return!!Cs($(this)[0])&&(t.evolution.final=60,!0)},queue_complete:()=>t.tech.evo&&3===t.tech.evo?1:0},spores:{id:"evolution-spores",title:z("evo_spores_title"),desc:z("evo_spores_desc"),reqs:{evo:4,evo_fungi:1},grant:["evo",5],condition:()=>t.tech.evo&&4===t.tech.evo,cost:{DNA:()=>230},effect:z("evo_nucleus_boost"),action(){return!!Cs($(this)[0])&&(t.evolution.final=80,!0)},queue_complete:()=>t.tech.evo&&4===t.tech.evo?1:0},poikilohydric:{id:"evolution-poikilohydric",title:z("evo_poikilohydric_title"),desc:z("evo_poikilohydric_desc"),reqs:{evo:4,evo_plant:1},grant:["evo",5],condition:()=>t.tech.evo&&4===t.tech.evo,cost:{DNA:()=>230},effect:z("evo_nucleus_boost"),action(){return!!Cs($(this)[0])&&(t.evolution.final=80,!0)},queue_complete:()=>t.tech.evo&&4===t.tech.evo?1:0},bilateral_symmetry:{id:"evolution-bilateral_symmetry",title:z("evo_bilateral_symmetry_title"),desc:z("evo_bilateral_symmetry_desc"),reqs:{evo:4,evo_animal:1},grant:["evo",5],condition:()=>t.tech.evo&&4===t.tech.evo,cost:{DNA:()=>230},effect:z("evo_nucleus_boost"),action(){return!!Cs($(this)[0])&&(t.evolution.final=80,t.tech.evo_insectoid=1,t.tech.evo_mammals=1,t.tech.evo_eggshell=1,t.tech.evo_eldritch=1,t.tech.evo_aquatic=1,t.tech.evo_fey=1,t.tech.evo_sand=1,t.tech.evo_heat=1,t.tech.evo_polar=1,!0)},queue_complete:()=>t.tech.evo&&4===t.tech.evo?1:0},bryophyte:{id:"evolution-bryophyte",title:z("evo_bryophyte_title"),desc:z("evo_bryophyte_desc"),reqs:{evo:5},grant:["evo",7],condition:()=>!(!t.tech.evo_plant&&!t.tech.evo_fungi)&&Yr(5),cost:{DNA:()=>260},effect:z("evo_bryophyte_effect"),action(){return!!Cs($(this)[0])&&(t.evolution.final=100,t.tech.evo_fungi&&(t.tech.evo_fungi=2),t.tech.evo_plant&&(t.tech.evo_plant=2),!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0},athropods:{id:"evolution-athropods",title:z("evo_athropods_title"),desc:z("evo_athropods_desc"),reqs:{evo:5,evo_insectoid:1},grant:["evo",7],condition:()=>Yr(5),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
    ${z("evo_athropods_effect")}
    ${z("evo_warn_unwise")}
    `:z("evo_athropods_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_insectoid=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Oc("genus_insectoid")},mammals:{id:"evolution-mammals",title:z("evo_mammals_title"),desc:z("evo_mammals_desc"),reqs:{evo:5,evo_mammals:1},grant:["evo",6],condition:()=>t.tech.evo&&5===t.tech.evo,cost:{DNA:()=>245},effect:z("evo_mammals_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_humanoid=1,t.tech.evo_giant=1,t.tech.evo_small=1,t.tech.evo_animalism=1,t.tech.evo_demonic=1,t.tech.evo_angelic=1,t.evolution.final=90,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0},humanoid:{id:"evolution-humanoid",title:z("evo_humanoid_title"),desc:z("evo_humanoid_desc"),reqs:{evo:6,evo_humanoid:1},grant:["evo",7],condition:()=>Yr(6),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
    ${z("evo_humanoid_effect")}
    ${z("evo_warn_unwise")}
    `:z("evo_humanoid_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_humanoid=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Oc("genus_humanoid")},gigantism:{id:"evolution-gigantism",title:z("evo_gigantism_title"),desc:z("evo_gigantism_desc"),reqs:{evo:6,evo_giant:1},grant:["evo",7],condition:()=>Yr(6),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
    ${z("evo_gigantism_effect")}
    ${z("evo_warn_unwise")}
    `:z("evo_gigantism_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_giant=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Oc("genus_giant")},dwarfism:{id:"evolution-dwarfism",title:z("evo_dwarfism_title"),desc:z("evo_dwarfism_desc"),reqs:{evo:6,evo_small:1},grant:["evo",7],condition:()=>Yr(6),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
    ${z("evo_dwarfism_effect")}
    ${z("evo_warn_unwise")}
    `:z("evo_dwarfism_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_small=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Oc("genus_small")},animalism:{id:"evolution-animalism",title:z("evo_animalism_title"),desc:z("evo_animalism_desc"),reqs:{evo:6,evo_animalism:1},grant:["evo",7],condition:()=>Yr(6)&&t.tech.evo_animalism&&1===t.tech.evo_animalism,cost:{DNA:()=>250},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
    ${z("evo_animalism_effect")}
    ${z("evo_warn_unwise")}
    `:z("evo_animalism_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_animalism=2,t.evolution.final=95,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo&&1===t.tech.evo_animalism?1:0},carnivore:{id:"evolution-carnivore",title:z("evo_carnivore_title"),desc:z("evo_carnivore_desc"),reqs:{evo_animalism:2},grant:["evo_animalism",3],condition:()=>Yr(7)&&t.tech.evo_animalism&&2===t.tech.evo_animalism,cost:{DNA:()=>255},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
    ${z("evo_carnivore_effect")}
    ${z("evo_warn_unwise")}
    `:z("evo_carnivore_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo=7,t.tech.evo_carnivore=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&7===t.tech.evo&&2===t.tech.evo_animalism?1:0,emblem:()=>Oc("genus_carnivore")},herbivore:{id:"evolution-herbivore",title:z("evo_herbivore_title"),desc:z("evo_herbivore_desc"),reqs:{evo_animalism:2},grant:["evo_animalism",3],condition:()=>Yr(7)&&t.tech.evo_animalism&&2===t.tech.evo_animalism,cost:{DNA:()=>255},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
    ${z("evo_herbivore_effect")}
    ${z("evo_warn_unwise")}
    `:z("evo_herbivore_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo=7,t.tech.evo_herbivore=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&7===t.tech.evo&&2===t.tech.evo_animalism?1:0,emblem:()=>Oc("genus_herbivore")},omnivore:{id:"evolution-omnivore",title:z("evo_omnivore_title"),desc:z("evo_omnivore_desc"),reqs:{evo_animalism:2,locked:1},grant:["evo_animalism",3],condition:()=>Yr(7)&&t.tech.evo_animalism&&2===t.tech.evo_animalism,cost:{DNA:()=>255},wiki:!1,effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
    ${z("evo_omnivore_effect")}
    ${z("evo_warn_unwise")}
    `:z("evo_omnivore_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_omnivore=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&7===t.tech.evo&&2===t.tech.evo_animalism?1:0,emblem:()=>Oc("genus_omnivore")},celestial:{id:"evolution-celestial",title:z("evo_celestial_title"),desc:z("evo_celestial_desc"),reqs:{evo:6,evo_angelic:1},grant:["evo",7],condition:()=>!!("eden"===t.city.biome||t.blood.unbound&&t.blood.unbound>=3)&&Yr(6),cost:{DNA:()=>260},effect:()=>z("evo_celestial_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_angelic=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Oc("genus_angelic")},demonic:{id:"evolution-demonic",title:z("evo_demonic_title"),desc:z("evo_demonic_desc"),reqs:{evo:6,evo_demonic:1},grant:["evo",7],condition:()=>!!("hellscape"===t.city.biome||t.blood.unbound&&t.blood.unbound>=3)&&Yr(6),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"===t.race.universe?`
    ${z("evo_demonic_effect")}
    ${z("evo_warn_unwise")}
    `:z("evo_demonic_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_demonic=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Oc("genus_demonic")},eldritch:{id:"evolution-eldritch",title:z("evo_eldritch_title"),desc:z("evo_eldritch_desc"),reqs:{evo:5,evo_eldritch:1},grant:["evo",7],condition:()=>!(!t.stats.achieve.nightmare||!t.stats.achieve.nightmare.mg)&&Yr(5),cost:{DNA:()=>260},effect:z("evo_eldritch_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_eldritch=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Oc("genus_eldritch")},aquatic:{id:"evolution-aquatic",title:z("evo_aquatic_title"),desc:z("evo_aquatic_desc"),reqs:{evo:5,evo_aquatic:1},grant:["evo",7],condition:()=>!(!["oceanic","swamp"].includes(t.city.biome)&&!t.blood.unbound)&&Yr(5),cost:{DNA:()=>260},effect:z("evo_aquatic_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_aquatic=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Oc("genus_aquatic")},fey:{id:"evolution-fey",title:z("evo_fey_title"),desc:z("evo_fey_desc"),reqs:{evo:5,evo_fey:1},grant:["evo",7],condition:()=>!(!["forest","swamp","taiga"].includes(t.city.biome)&&!t.blood.unbound)&&Yr(5),cost:{DNA:()=>260},effect:z("evo_fey_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_fey=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Oc("genus_fey")},heat:{id:"evolution-heat",title:z("evo_heat_title"),desc:z("evo_heat_desc"),reqs:{evo:5,evo_heat:1},grant:["evo",7],condition:()=>!(!["volcanic","ashland"].includes(t.city.biome)&&!t.blood.unbound)&&Yr(5),cost:{DNA:()=>260},effect:z("evo_heat_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_heat=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Oc("genus_heat")},polar:{id:"evolution-polar",title:z("evo_polar_title"),desc:z("evo_polar_desc"),reqs:{evo:5,evo_polar:1},grant:["evo",7],condition:()=>!(!["tundra","taiga"].includes(t.city.biome)&&!t.blood.unbound)&&Yr(5),cost:{DNA:()=>260},effect:z("evo_polar_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_polar=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Oc("genus_polar")},sand:{id:"evolution-sand",title:z("evo_sand_title"),desc:z("evo_sand_desc"),reqs:{evo:5,evo_sand:1},grant:["evo",7],condition:()=>!(!["desert","ashland"].includes(t.city.biome)&&!t.blood.unbound)&&Yr(5),cost:{DNA:()=>260},effect:z("evo_sand_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_sand=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Oc("genus_sand")},eggshell:{id:"evolution-eggshell",title:z("evo_eggshell_title"),desc:z("evo_eggshell_desc"),reqs:{evo:5,evo_eggshell:1},grant:["evo",6],condition:()=>t.tech.evo&&5===t.tech.evo&&!t.evolution.gselect,cost:{DNA:()=>245},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
    ${z("evo_eggshell_effect")}
    ${z("evo_warn_unwise")}
    `:z("evo_eggshell_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_eggshell=2,t.evolution.final=90,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0},endothermic:{id:"evolution-endothermic",title:()=>t.evolution.gselect?z("genelab_genus_avian"):z("evo_endothermic_title"),desc:z("evo_endothermic_desc"),reqs:{evo:6,evo_eggshell:2},grant:["evo",7],condition:()=>Yr(6),cost:{DNA:()=>260},effect:z("evo_endothermic_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_avian=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Oc("genus_avian")},ectothermic:{id:"evolution-ectothermic",title:()=>t.evolution.gselect?z("genelab_genus_reptilian"):z("evo_ectothermic_title"),desc:z("evo_ectothermic_desc"),reqs:{evo:6,evo_eggshell:2},grant:["evo",7],condition:()=>Yr(6),cost:{DNA:()=>260},effect:z("evo_ectothermic_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_reptilian=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Oc("genus_reptilian")},sentience:{id:"evolution-sentience",title:z("evo_sentience_title"),desc:z("evo_sentience_desc"),reqs:{evo:7},grant:["evo",8],condition:()=>t.tech.evo&&7===t.tech.evo&&100===t.evolution.final,cost:{RNA:()=>300,DNA:()=>300},effect:()=>t.evolution.exterminate?z("evo_sentience_ai_effect"):z("evo_sentience_effect"),action(){if(Cs($(this)[0])){let e=[],a="humanoid";for(let e in ui)if(t.tech[`evo_${e}`]&&t.tech[`evo_${e}`]>=2){a=e;break}if(t.race.junker||t.race.sludge){let r=t.race.sludge?"sludge":"junker";t.race.jtype=a,e.push(r)}else for(let t in Xr){let r=Xr[t];_i[r].type===a&&e.push(r)}t.race.species=e[Math.floor(g(0,e.length))],t.stats.achieve[`extinct_${t.race.species}`]&&t.stats.achieve[`extinct_${t.race.species}`].l>=1&&(t.race.species=e[Math.floor(g(0,e.length))]),Ns()}return!1},emblem(){for(let e in Xr){let a=Xr[e];if(t.tech[`evo_${_i[a].type}`]&&t.tech[`evo_${_i[a].type}`]>=2)return Oc(`genus_${_i[a].type}`)}return""},queue_complete:()=>t.tech.evo&&7===t.tech.evo?1:0}},city:{gift:{id:"city-gift",title:z("city_gift"),desc:z("city_gift_desc"),wiki:!1,category:"outskirts",reqs:{primitive:1},queue_complete:()=>0,not_tech:["santa"],not_trait:["cataclysm","lone_survivor"],class:["hgift"],condition(){const e=new Date;if(11!==e.getMonth()||11===e.getMonth()&&(e.getDate()<=16||e.getDate()>=25)){let e=!1;return t.special&&t.special.gift&&Object.keys(t.special.gift).forEach((function(a){t.special.gift[a]&&(e=!0)})),e}return!1},count(){let e=0;return t.special&&t.special.gift&&Object.keys(t.special.gift).forEach((function(a){t.special.gift[a]&&e++})),e},action(){if(!t.settings.pause){const e=new Date;let a=!1;if(t.special&&t.special.gift&&Object.keys(t.special.gift).forEach((function(e){t.special.gift[e]&&(a=e)})),11!==e.getMonth()||11===e.getMonth()&&(e.getDate()<=16||e.getDate()>=25))if("g2019"===a)t.special&&t.special.gift&&(delete t.special.gift[a],"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=100,t.stats.antiplasmid+=100,Bi(z("city_gift_msg",[100,z("arpa_genepool_effect_antiplasmid")]),"info",!1,["events"])):(t.prestige.Plasmid.count+=100,t.stats.plasmid+=100,Bi(z("city_gift_msg",[100,z("arpa_genepool_effect_plasmid")]),"info",!1,["events"])),ms());else if(t.special&&t.special.gift){delete t.special.gift[a];let e=100+(t.stats.hasOwnProperty("reset")?t.stats.reset:0)+(t.stats.hasOwnProperty("mad")?t.stats.mad:0),r=(t.stats.hasOwnProperty("bioseed")?t.stats.bioseed:0)+(t.stats.hasOwnProperty("cataclysm")?t.stats.cataclysm:0),s=[];if(t.stats.died+t.stats.tdied>0){let e=t.stats.died+t.stats.tdied;t.resource.Coal.amount+=e,s.push(`${e.toLocaleString()} ${z("resource_Coal_name")}`)}if("antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=e,t.stats.antiplasmid+=e,s.push(`${e.toLocaleString()} ${z("resource_AntiPlasmid_plural_name")}`)):(t.prestige.Plasmid.count+=e,t.stats.plasmid+=e,s.push(`${e.toLocaleString()} ${z("resource_Plasmid_plural_name")}`)),r>0&&(t.prestige.Phage.count+=r,t.stats.phage+=r,s.push(`${r.toLocaleString()} ${z("resource_Phage_name")}`)),t.stats.hasOwnProperty("achieve")){let e=t.stats.achieve.whitehole?t.stats.achieve.whitehole.l:0;e+=t.stats.achieve.heavy?t.stats.achieve.heavy.l:0,e+=t.stats.achieve.canceled?t.stats.achieve.canceled.l:0,e+=t.stats.achieve.eviltwin?t.stats.achieve.eviltwin.l:0,e+=t.stats.achieve.microbang?t.stats.achieve.microbang.l:0,e+=t.stats.achieve.pw_apocalypse?t.stats.achieve.pw_apocalypse.l:0;let r=t.stats.achieve.ascended?t.stats.achieve.ascended.l:0,i=t.stats.achieve.corrupted?t.stats.achieve.corrupted.l:0,c=t.stats.achieve.obsolete?t.stats.achieve.obsolete.l:0;if(e>30&&(e=30),r>5&&(r=5),i>5&&(i=5),e>0){let a=+(e/7.5).toFixed(2);t.prestige.Dark.count+=a,t.stats.dark+=a,s.push(`${a} ${z("resource_Dark_name")}`)}if(r>0&&(t.prestige.Harmony.count+=r,t.stats.harmony+=r,s.push(`${r} ${z("resource_Harmony_name")}`)),i>0){let e=5*i,a=i;t.prestige.Blood_Stone.count+=e,t.stats.blood+=e,t.prestige.Artifact.count+=a,t.stats.artifact+=a,s.push(`${e} ${z("resource_Blood_Stone_name")}`),s.push(`${a} ${z("resource_Artifact_name")}`)}"g2020"!==a&&c>0&&(t.prestige.AICore.count+=c,t.stats.cores+=c,s.push(`${c} ${z("resource_AICore_name")}`))}Bi(z("city_gift2_msg",[s.join(", ")]),"info",!1,["events"]),ms()}}return!1},touchlabel:z("open")},food:{id:"city-food",title:()=>Kc().active?t.tech.conjuring?z("city_trick_conjure"):z("city_trick"):t.tech.conjuring?z("city_food_conjure"):z("city_food"),desc(){let e=$(this)[0].val(!1);return Kc().active?t.tech.conjuring?z("city_trick_conjure_desc",[e]):z("city_trick_desc",[e]):t.tech.conjuring?z("city_food_conjure_desc",[e]):z("city_food_desc",[e])},category:"outskirts",reqs:{primitive:1},not_trait:["soul_eater","cataclysm","artifical"],queue_complete:()=>0,cost:{Mana:()=>t.tech.conjuring?1:0},action(){return t.settings.pause||(t.resource.Food.amount=1&&(a*=10,t.resource.Food.amountKc().active?t.tech.conjuring&&t.tech.conjuring>=2?z("city_dig_conjour"):z("city_dig"):t.tech.conjuring&&t.tech.conjuring>=2?z("city_lumber_conjure"):z("city_lumber"),desc(){let e=$(this)[0].val(!1);return Kc().active?t.tech.conjuring&&t.tech.conjuring>=2?z("city_dig_conjour_desc",[e]):z("city_dig_desc",[e]):t.tech.conjuring&&t.tech.conjuring>=2?z("city_lumber_conjure_desc",[e]):z("city_lumber_desc",[e])},category:"outskirts",reqs:{},not_trait:["evil","cataclysm"],queue_complete:()=>0,cost:{Mana:()=>t.tech.conjuring&&t.tech.conjuring>=2?1:0},action(){return t.settings.pause||(t.resource.Lumber.amount=2&&t.resource.Mana.amount>=1&&(a*=10,t.resource.Lumber.amountt.tech.conjuring&&t.tech.conjuring>=2?z("city_conjour",[t.resource.Stone.name]):z("city_gather",[t.resource.Stone.name]),desc(){let e=$(this)[0].val(!1);return t.tech.conjuring&&t.tech.conjuring>=2?z("city_stone_conjour_desc",[e,t.resource.Stone.name]):z(t.race.sappy?"city_amber_desc":"city_stone_desc",[e,t.resource.Stone.name])},category:"outskirts",reqs:{primitive:2},not_trait:["cataclysm","lone_survivor"],queue_complete:()=>0,cost:{Mana:()=>t.tech.conjuring&&t.tech.conjuring>=2?1:0},action(){return t.settings.pause||(t.resource.Stone.amount=2&&t.resource.Mana.amount>=1&&(a*=10,t.resource.Stone.amountt.tech.conjuring&&t.tech.conjuring>=2?z("city_chrysotile_conjour"):z("city_gather",[t.resource.Chrysotile.name]),desc(){let e=$(this)[0].val(!1);return t.tech.conjuring&&t.tech.conjuring>=2?z("city_stone_conjour_desc",[e,t.resource.Chrysotile.name]):z("city_stone_desc",[e,t.resource.Chrysotile.name])},category:"outskirts",reqs:{primitive:2},trait:["smoldering"],not_trait:["cataclysm","lone_survivor"],queue_complete:()=>0,cost:{Mana:()=>t.tech.conjuring&&t.tech.conjuring>=2?1:0},action(){return t.settings.pause||t.resource.Chrysotile.amount=2&&t.resource.Mana.amount>=1&&(a*=10,t.resource.Chrysotile.amountt.race.soul_eater?t.tech.primitive?t.resource.hasOwnProperty("furs")&&t.resource.Furs.display?z("city_evil_desc3"):z("city_evil_desc2"):z("city_evil_desc1"):t.resource.hasOwnProperty("furs")&&t.resource.Furs.display?z("city_evil_desc4"):z("city_evil_desc1"),category:"outskirts",reqs:{},trait:["evil"],not_trait:["kindling_kindred","smoldering","cataclysm"],queue_complete:()=>0,action(){if(!t.settings.pause){let e=t.race.strong?di.strong.vars()[0]:1;t.genes.enhance&&(e*=2),t.race.smoldering||(t.resource.Lumber.amount25e3},queue_complete:()=>t.city.slave_pen?4*t.city.slave_pen.count-t.city.slave_pen.slaves:0,action(){return!!(t.city.slave_pen&&4*t.city.slave_pen.count>t.city.slave_pen.slaves&&Cs($(this)[0]))&&(t.city.slave_pen.slaves++,t.resource.Slave.amount=t.city.slave_pen.slaves,!0)},touchlabel:z("purchase")},s_alter:{id:"city-s_alter",title:z("city_s_alter"),desc:()=>t.city.hasOwnProperty("s_alter")&&t.city.s_alter.count>=1?`
    ${z("city_s_alter")}
    ${z("city_s_alter_desc")}
    `:z("city_s_alter"),category:"outskirts",reqs:{mining:1},trait:["cannibalize"],not_trait:["cataclysm","lone_survivor"],inflation:!1,cost:{Stone:e=>(e||0)+(t.city.hasOwnProperty("s_alter")?t.city.s_alter.count:0)>=1?0:100},effect(){let e=`
    ${z("city_s_alter_sacrifice",[t.civic[t.civic.d_job]?t.civic[t.civic.d_job].workers:0])}
    `;if(t.city.hasOwnProperty("s_alter")&&t.city.s_alter.rage>0&&(e+=`
    ${z("city_s_alter_rage",[di.cannibalize.vars()[0],cc(t.city.s_alter.rage)])}
    `),t.city.hasOwnProperty("s_alter")&&t.city.s_alter.regen>0&&(e+=`
    ${z("city_s_alter_regen",[di.cannibalize.vars()[0],cc(t.city.s_alter.regen)])}
    `),t.city.hasOwnProperty("s_alter")&&t.city.s_alter.mind>0&&(e+=`
    ${z("city_s_alter_mind",[di.cannibalize.vars()[0],cc(t.city.s_alter.mind)])}
    `),t.city.hasOwnProperty("s_alter")&&t.city.s_alter.mine>0&&(e+=`
    ${z("city_s_alter_mine",[di.cannibalize.vars()[0],cc(t.city.s_alter.mine)])}
    `),t.city.hasOwnProperty("s_alter")&&t.city.s_alter.harvest>0){let a=t.race.evil&&!t.race.soul_eater?z("job_reclaimer"):z("job_lumberjack");e+=`
    ${z("city_s_alter_harvest",[di.cannibalize.vars()[0],cc(t.city.s_alter.harvest),a])}
    `}return e},action(){if(Cs($(this)[0])){if(0===t.city.s_alter.count)t.city.s_alter.count++;else if(t.civic[t.civic.d_job].workers>0){t.resource[t.race.species].amount--,t.civic[t.civic.d_job].workers--,t.stats.sac++,t.resource.Food.amount+=Math.rand(250,1e3);let e=300,a=600;if(t.tech.sacrifice)switch(t.tech.sacrifice){case 1:e=600,a=1500;break;case 2:e=1800,a=3600;break;case 3:e=5400,a=16200}switch(t.race.kindling_kindred||t.race.smoldering?Math.rand(0,4):Math.rand(0,5)){case 0:t.city.s_alter.rage+=Math.rand(e,a);break;case 1:t.city.s_alter.mind+=Math.rand(e,a);break;case 2:t.city.s_alter.regen+=Math.rand(e,a);break;case 3:t.city.s_alter.mine+=Math.rand(e,a);break;case 4:t.city.s_alter.harvest+=Math.rand(e,a)}}return!0}return!1},touchlabel:z("tech_dist_sacrifice")},basic_housing:{id:"city-basic_housing",title:()=>Is(),desc:z("city_basic_housing_desc"),desc(){return 1===$(this)[0].citizens()?z("city_basic_housing_desc"):z("city_basic_housing_desc_plural",[$(this)[0].citizens()])},category:"residential",reqs:{housing:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>(e=e||0,(t.city.basic_housing?t.city.basic_housing.count:0)+e>=5?Xi("basic_housing",e,20,1.17):0),Lumber:e=>t.race.kindling_kindred||t.race.smoldering?0:Xi("basic_housing",e,10,1.23),Stone:e=>t.race.kindling_kindred?Xi("basic_housing",e,10,1.23):0,Chrysotile:e=>t.race.smoldering?Xi("basic_housing",e,10,1.23):0,Horseshoe:()=>t.race.hooved?1:0},effect(){let e=$(this)[0].citizens();return t.race.sappy?`
    ${z("plus_max_resource",[e,z("citizen")])}
    ${z("city_grove_effect",[2.5])}
    `:z("plus_max_resource",[e,z("citizen")])},action(){return!!Cs($(this)[0])&&(t.resource[t.race.species].display=!0,t.resource[t.race.species].max+=$(this)[0].citizens(),t.city.basic_housing.count++,t.settings.showCivic=!0,!0)},citizens(){let e=1;return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e}},cottage:{id:"city-cottage",title:()=>Ks("medium"),desc(){return z("city_cottage_desc",[$(this)[0].citizens()])},category:"residential",reqs:{housing:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("cottage",e,900,1.15),Plywood:e=>Xi("cottage",e,25,1.25),Brick:e=>Xi("cottage",e,20,1.25),Wrought_Iron:e=>Xi("cottage",e,15,1.25),Iron:e=>t.city.ptrait.includes("unstable")?Xi("cottage",e,5,1.25):0,Horseshoe:()=>t.race.hooved?2:0},effect(){let e=$(this)[0].citizens();if(t.tech.home_safe){let a=Nr(t.tech.home_safe>=2?t.tech.home_safe>=3?5e3:2e3:1e3);return`
    ${z("plus_max_citizens",[e])}
    ${z("plus_max_resource",[`$${a.toLocaleString()}`,z("resource_Money_name")])}
    `}return z("plus_max_citizens",[e])},action(){return!!Cs($(this)[0])&&(t.resource[t.race.species].max+=$(this)[0].citizens(),t.city.cottage.count++,!0)},citizens(){let e=2;return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e}},apartment:{id:"city-apartment",title:()=>Ks("large"),desc(){return`
    ${z("city_apartment_desc",[$(this)[0].citizens()])}
    ${z("requires_power")}
    `},category:"residential",reqs:{housing:3},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("apartment",e,1750,1.26)-500,Crystal:e=>"magic"===t.race.universe?Xi("apartment",e,25,1.22):0,Furs:e=>Xi("apartment",e,725,1.32)-500,Copper:e=>Xi("apartment",e,650,1.32)-500,Cement:e=>Xi("apartment",e,700,1.32)-500,Steel:e=>Xi("apartment",e,800,1.32)-500,Horseshoe:()=>t.race.hooved?5:0},effect(){let e=D("extravagant",2),a=$(this)[0].citizens();if(t.tech.home_safe){let r=Nr(t.tech.home_safe>=2?t.tech.home_safe>=3?1e4:5e3:2e3);return e&&(r*=2),`
    ${z("plus_max_citizens",[a])}. ${z("minus_power",[$(this)[0].powered()])}
    ${z("plus_max_resource",[`$${r.toLocaleString()}`,z("resource_Money_name")])}
    `}return`${z("plus_max_citizens",[a])}. ${z("minus_power",[$(this)[0].powered()])}`},powered:()=>nc(D("extravagant",1)||1),action(){return!!Cs($(this)[0])&&(t.city.apartment.count++,ks($(this)[0])&&(t.resource[t.race.species].max+=$(this)[0].citizens()),!0)},citizens(){let e=D("extravagant",2),a=e?5+e:5;return t.race.high_pop&&(a*=di.high_pop.vars()[0]),a}},lodge:{id:"city-lodge",title:z("city_lodge"),desc:()=>t.race.detritivore?z("city_lodge_desc_alt"):z("city_lodge_desc"),category:"residential",reqs:{housing:1,currency:1},not_trait:["cataclysm","lone_survivor"],condition:()=>!!((t.race.soul_eater||t.race.detritivore||t.race.artifical||t.race.unfathomable)&&t.tech.s_lodge||t.tech.hunting&&t.tech.hunting>=2),cost:{Money:e=>Xi("lodge",e,50,1.32),Lumber:e=>Xi("lodge",e,20,1.36),Stone:e=>Xi("lodge",e,10,1.36),Horseshoe:()=>t.race.hooved?1:0},effect(){let e=$(this)[0].citizens();return t.race.carnivore&&!t.race.artifical?`
    ${z("plus_max_resource",[e,z("citizen")])}
    ${z("city_lodge_effect",[5])}
    `:z("plus_max_resource",[e,z("citizen")])},action(){return!!Cs($(this)[0])&&(t.city.lodge.count++,t.resource[t.race.species].display=!0,t.resource[t.race.species].max+=1,t.settings.showCivic=!0,!0)},citizens(){let e=1;return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e}},smokehouse:{id:"city-smokehouse",title:()=>t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?z("city_smokehouse_easter"):z("city_smokehouse"),desc:z("city_smokehouse_desc"),category:"trade",reqs:{hunting:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("smokehouse",e,85,1.32),Lumber:e=>Xi("smokehouse",e,65,1.36),Stone:e=>Xi("smokehouse",e,50,1.36)},effect:()=>`
    ${z("plus_max_resource",[os(Nr(100)),z("resource_Food_name")])}
    ${z("city_smokehouse_effect",[10])}
    `,action(){return!!Cs($(this)[0])&&(t.city.smokehouse.count++,t.resource.Food.max+=os(Nr(100)),!0)}},soul_well:{id:"city-soul_well",title:z("city_soul_well"),desc:z("city_soul_well_desc"),category:"trade",reqs:{soul_eater:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>(e=e||0,(t.city.soul_well?t.city.soul_well.count:0)+e>=3?Xi("soul_well",e,50,1.32):0),Lumber:e=>Xi("soul_well",e,20,1.36),Stone:e=>Xi("soul_well",e,10,1.36)},effect(){let e=os(Nr(500));return`
    ${z("city_soul_well_effect",[t.race.ghostly?2+di.ghostly.vars()[1]:2])}
    ${z("plus_max_resource",[e,z("resource_Souls_name")])}
    `},action(){return!!Cs($(this)[0])&&(t.city.soul_well.count++,t.resource.Food.max+=os(Nr(500)),!0)}},slave_pen:{id:"city-slave_pen",title:z("city_slave_pen"),desc:z("city_slave_pen"),category:"commercial",reqs:{slaves:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("slave_pen",e,250,1.32),Lumber:e=>Xi("slave_pen",e,100,1.36),Stone:e=>Xi("slave_pen",e,75,1.36),Copper:e=>Xi("slave_pen",e,10,1.36),Nanite:e=>t.race.deconstructor?Xi("slave_pen",e,4,1.36):0},effect(){let e=t.city.slave_pen?4*t.city.slave_pen.count:4,a=t.city.slave_pen?t.city.slave_pen.slaves:0;return`
    ${z("city_slave_pen_effect",[4])}
    ${z("city_slave_pen_effect2",[a,e])}
    `},action(){return!!Cs($(this)[0])&&(t.city.slave_pen.count++,t.resource.Slave.display=!0,t.resource.Slave.amount=t.city.slave_pen.slaves,t.resource.Slave.max=4*t.city.slave_pen.count,!0)}},transmitter:{id:"city-transmitter",title:z("city_transmitter"),desc:()=>`
    ${z("city_transmitter_desc")}
    ${z("requires_power")}
    `,category:"residential",reqs:{high_tech:4},trait:["artifical"],cost:{Money:e=>t.city.transmitter&&t.city.transmitter.count>=3?Xi("transmitter",e,50,1.32):0,Copper:e=>Xi("transmitter",e,20,1.36),Steel:e=>Xi("transmitter",e,10,1.36)},effect(){let e=+Oe("transmitter").toFixed(2),a=Nr(100);return`
    ${z("gain",[e,t.resource.Food.name])}
    ${z("city_transmitter_effect",[a])}
    ${z("minus_power",[$(this)[0].powered()])}
    `},powered:()=>nc(.5),powerBalancer:()=>[{r:"Food",k:"lpmod"}],action(){return!!Cs($(this)[0])&&(t.city.transmitter.count++,ks($(this)[0]),!0)}},captive_housing:Jr("captive_housing","city"),farm:{id:"city-farm",title:z("city_farm"),desc:z("city_farm_desc"),category:"residential",reqs:{agriculture:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>(e=e||0,(t.city.farm?t.city.farm.count:0)+e>=3?Xi("farm",e,50,1.32):0),Lumber:e=>Xi("farm",e,20,1.36),Stone:e=>Xi("farm",e,10,1.36),Horseshoe:e=>t.race.hooved&&(t.city.farm?t.city.farm.count:0)+(e||0)>=2?1:0},effect(){let e=$(this)[0].citizens();return t.tech.farm?`
    ${z("city_farm_effect")}
    ${z("plus_max_resource",[e,z("citizen")])}
    `:z("city_farm_effect")},action(){return!!Cs($(this)[0])&&(t.city.farm.count++,t.civic.farmer.display=!0,t.tech.farm&&(t.resource[t.race.species].display=!0,t.resource[t.race.species].max+=$(this)[0].citizens(),t.settings.showCivic=!0),!0)},citizens(){let e=1;return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e},flair:()=>t.tech.agriculture>=7?z("city_farm_flair2"):z("city_farm_flair1")},compost:{id:"city-compost",title:z("city_compost_heap"),desc:z("city_compost_heap_desc"),category:"residential",reqs:{compost:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>(e=e||0,(t.city.compost?t.city.compost.count:0)+e>=3?Xi("compost",e,50,1.32):0),Lumber:e=>Xi("compost",e,12,1.36),Stone:e=>Xi("compost",e,12,1.36)},effect(){let e=1.2+.8*(t.tech.compost?t.tech.compost:0);e*="grassland"===t.city.biome?Si.grassland.vars()[0]:1,e*="savanna"===t.city.biome?Si.savanna.vars()[0]:1,e*="ashland"===t.city.biome?Si.ashland.vars()[0]:1,e*="volcanic"===t.city.biome?Si.volcanic.vars()[0]:1,e*="hellscape"===t.city.biome?Si.hellscape.vars()[0]:1,e*=t.city.ptrait.includes("trashed")?Fi.trashed.vars()[0]:1,e=+e.toFixed(2);let a=os(Nr(200)),r=t.race.kindling_kindred?"":`
    ${z("city_compost_heap_effect2",[.5,t.resource.Lumber.name])}
    `;return`
    ${z("city_compost_heap_effect",[e])}
    ${z("city_compost_heap_effect3",[a])}
    ${r}`},switchable:()=>!0,action(){return!!Cs($(this)[0])&&(t.city.compost.count++,t.city.compost.on++,t.resource.Food.max+=os(Nr(200)),!0)}},mill:{id:"city-mill",title:()=>t.tech.agriculture>=5?z("city_mill_title2"):z("city_mill_title1"),desc(){let e=t.tech.agriculture>=5?5:3;return t.tech.agriculture>=6?z("city_mill_desc2",[e,-1*$(this)[0].powered()]):z("city_mill_desc1",[e])},category:"utility",reqs:{agriculture:4},not_tech:["wind_plant"],not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("mill",e,1e3,1.31),Lumber:e=>Xi("mill",e,600,1.33),Iron:e=>Xi("mill",e,150,1.33),Cement:e=>Xi("mill",e,125,1.33)},powered:()=>t.race.environmentalist?-1.5:-1,power_reqs:{agriculture:6},effect:()=>t.tech.agriculture>=6&&`${z("city_on")} ${z("city_mill_effect1")} ${z("city_off")} ${z("city_mill_effect2")}`,action(){return!!Cs($(this)[0])&&(t.city.mill.count++,!0)}},windmill:{id:"city-windmill",title:()=>t.race.unfathomable?z("tech_watermill"):z("city_mill_title2"),desc:()=>t.race.unfathomable?z("tech_watermill"):z("city_mill_title2"),wiki:!1,category:"utility",reqs:{wind_plant:1},not_trait:["cataclysm","lone_survivor"],powered:()=>t.race.environmentalist?-1.5:-1,power_reqs:{false:1},cost:{Money:e=>Xi("windmill",e,1e3,1.31),Lumber:e=>Xi("windmill",e,600,1.33),Iron:e=>Xi("windmill",e,150,1.33),Cement:e=>Xi("windmill",e,125,1.33)},effect(){return`
    ${z("space_dwarf_reactor_effect1",[-1*$(this)[0].powered()])}
    `},action(){return!!Cs($(this)[0])&&(t.city.windmill.count++,!0)}},silo:{id:"city-silo",title:z("city_silo"),desc:z("city_food_storage"),category:"trade",reqs:{agriculture:3},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("silo",e,85,1.32),Lumber:e=>Xi("silo",e,65,1.36),Stone:e=>Xi("silo",e,50,1.36),Iron:e=>(t.city.silo?t.city.silo.count:0)+(e||0)>=4&&t.city.ptrait.includes("unstable")?Xi("silo",e,10,1.36):0},effect:()=>z("plus_max_resource",[os(Nr(500)),z("resource_Food_name")]),action(){return!!Cs($(this)[0])&&(t.city.silo.count++,t.resource.Food.max+=os(Nr(500)),!0)}},assembly:Jr("assembly","city"),garrison:{id:"city-garrison",title:()=>t.race.flier?z("city_garrison_flier"):z("city_garrison"),desc:z("city_garrison_desc"),category:"military",reqs:{military:1,housing:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("garrison",e,240,1.5),Stone:e=>Xi("garrison",e,260,1.46),Iron:e=>(t.city.garrison?t.city.garrison.count:0)+(e||0)>=4&&t.city.ptrait.includes("unstable")?Xi("garrison",e,50,1.4):0,Horseshoe:()=>t.race.hooved?t.race.chameleon?1:2:0},effect(){let e=t.tech.military>=5?ua(3):ua(2);return t.race.chameleon&&e--,z("plus_max_resource",[e,z("civics_garrison_soldiers")])},switchable:()=>!0,action(){if(Cs($(this)[0])){t.settings.showMil=!0,t.settings.msgFilters.combat.unlocked||(t.settings.msgFilters.combat.unlocked=!0,t.settings.msgFilters.combat.vis=!0),t.civic.garrison.display||(t.civic.garrison.display=!0,ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update"));let e=t.tech.military>=5?3:2;return t.race.chameleon&&(e-=t.city.garrison.count),t.civic.garrison.max+=e,t.city.garrison.count++,t.city.garrison.on++,t.resource.Furs.display=!0,!0}return!1}},hospital:{id:"city-hospital",title:z("city_hospital"),desc:z("city_hospital_desc"),category:"military",reqs:{medic:1},not_trait:["cataclysm","artifical"],cost:{Money:e=>Xi("hospital",e,22e3,1.32),Furs:e=>Xi("hospital",e,4e3,1.32),Iron:e=>t.city.ptrait.includes("unstable")?Xi("hospital",e,500,1.32):0,Aluminium:e=>Xi("hospital",e,1e4,1.32)},effect(){let e=t.tech.reproduction&&t.tech.reproduction>=2?`
    ${z("city_hospital_effect2")}
    `:"",a=`
    ${z("city_hospital_effect",[5*t.tech.medic])}
    ${e}`;return!t.race.artifical&&t.race.hasOwnProperty("vax")&&(a+=`
    ${z("tau_home_disease_lab_vax",[+t.race.vax.toFixed(2)])}
    `),a},action(){return!!Cs($(this)[0])&&(t.city.hospital.count++,!0)}},boot_camp:{id:"city-boot_camp",title:()=>t.race.artifical?z("city_boot_camp_art"):z("city_boot_camp"),desc:()=>t.race.artifical?z("city_boot_camp_art_desc",[_i[t.race.species].name]):z("city_boot_camp_desc"),category:"military",reqs:{boot_camp:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("boot_camp",e,5e4,1.32),Lumber:e=>Xi("boot_camp",e,21500,1.32),Iron:e=>t.city.ptrait.includes("unstable")?Xi("boot_camp",e,300,1.32):0,Aluminium:e=>Xi("boot_camp",e,12e3,1.32),Brick:e=>Xi("boot_camp",e,1400,1.32)},effect(){let e=t.tech.boot_camp>=2?8:5;t.blood.lust&&(e+=.2*t.blood.lust);let a=D("militant",0);a&&(e*=1+a/100);let r=t.tech.spy&&t.tech.spy>=3?`
    ${z("city_boot_camp_effect",[e])}
    ${z("city_boot_camp_effect2",[10])}
    `:`
    ${z("city_boot_camp_effect",[e])}
    `;return t.race.artifical&&!t.race.orbit_decayed&&(r+=`
    ${z("city_boot_camp_art_effect",[5*(t.tech.medic||1)])}
    `),t.race.artifical&&t.race.hasOwnProperty("vax")&&(desc+=`
    ${z("tau_home_disease_lab_vax",[+t.race.vax.toFixed(2)])}
    `),r},action(){return!!Cs($(this)[0])&&(t.city.boot_camp.count++,!0)}},shed:{id:"city-shed",title:()=>t.tech.storage<=2?z("city_shed_title1"):t.tech.storage>=4?z("city_shed_title3"):z("city_shed_title2"),desc(){let e=t.tech.storage>=3?t.tech.storage>=4?z("city_shed_desc_size3"):z("city_shed_desc_size2"):z("city_shed_desc_size1");return z("city_shed_desc",[e])},category:"trade",reqs:{storage:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("shed",e,75,1.22),Lumber:e=>t.tech.storage&&t.tech.storage<4?Xi("shed",e,55,1.32):0,Stone:e=>t.tech.storage&&t.tech.storage<3?Xi("shed",e,45,1.32):0,Iron:e=>t.tech.storage&&t.tech.storage>=4?Xi("shed",e,22,1.32):0,Cement:e=>t.tech.storage&&t.tech.storage>=3?Xi("shed",e,18,1.32):0},res(){let e=["Lumber","Stone","Chrysotile","Crystal","Furs","Copper","Iron","Aluminium","Cement","Coal"];return t.tech.storage>=3&&t.resource.Steel.display&&e.push("Steel"),t.tech.storage>=4&&t.resource.Titanium.display&&e.push("Titanium"),t.tech.shelving&&t.tech.shelving>=3&&t.resource.Graphene.display&&e.push("Graphene"),t.tech.shelving&&t.tech.shelving>=3&&t.resource.Stanene.display&&e.push("Stanene"),t.race.unfathomable&&e.push("Food"),e},val(e){switch(e){case"Food":return 50;case"Lumber":case"Stone":case"Chrysotile":return 300;case"Crystal":return 8;case"Furs":case"Iron":return 125;case"Copper":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 e='
    ',a=ns();for(const r of $(this)[0].res())t.resource[r].display&&(e+=`${z("plus_max_resource",[q(+(Nr($(this)[0].val(r))*a).toFixed(0),1),t.resource[r].name])}`);return e+="
    ",e},wide:!0,action(){if(Cs($(this)[0])){t.city.shed.count++;let e=ns();for(const a of $(this)[0].res())t.resource[a].display&&(t.resource[a].max+=Nr($(this)[0].val(a)*e));return!0}return!1}},storage_yard:{id:"city-storage_yard",title:z("city_storage_yard"),desc:z("city_storage_yard_desc"),category:"trade",reqs:{container:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("storage_yard",e,10,Hs(1.36)),Brick:e=>Xi("storage_yard",e,3,Hs(1.35)),Wrought_Iron:e=>Xi("storage_yard",e,5,Hs(1.35))},effect(){let e=t.tech.container>=3?20:10;return t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=1&&(e+=10),t.tech.world_control&&(e+=10),t.tech.particles&&t.tech.particles>=2&&(e*=2),t.tech.trade&&t.tech.trade>=3?`
    ${z("plus_max_resource",[e,z("resource_Crates_name")])}
    ${z("city_trade_effect",[1])}
    `:z("plus_max_resource",[e,z("resource_Crates_name")])},action(){if(Cs($(this)[0])){!1===t.resource.Crates.display&&Bi(z("city_storage_yard_msg"),"info",!1,["progress"]),t.city.storage_yard.count++,t.settings.showResources=!0,t.settings.showStorage=!0,t.settings.showMarket||(t.settings.marketTabs=1);let e=t.tech.container>=3?20:10;return t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=1&&(e+=10),t.tech.world_control&&(e+=10),t.tech.particles&&t.tech.particles>=2&&(e*=2),t.resource.Crates.max+=e,t.resource.Crates.display||(t.resource.Crates.display=!0,sc($("#resources")),sr(),t.settings.tabLoad&&(rr("storage"),L())),!0}return!1}},warehouse:{id:"city-warehouse",title:z("city_warehouse"),desc:z("city_warehouse_desc"),category:"trade",reqs:{steel_container:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("warehouse",e,400,Hs(1.26)),Cement:e=>Xi("warehouse",e,75,Hs(1.26)),Sheet_Metal:e=>Xi("warehouse",e,25,Hs(1.25))},effect(){let e=t.tech.steel_container>=2?20:10;return t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=2&&(e+=10),t.tech.world_control&&(e+=10),t.tech.particles&&t.tech.particles>=2&&(e*=2),z("plus_max_resource",[e,z("resource_Containers_name")])},action(){if(Cs($(this)[0])){!1===t.resource.Containers.display&&Bi(z("city_warehouse_msg"),"info",!1,["progress"]),t.city.warehouse.count++,t.settings.showResources=!0,t.settings.showStorage=!0;let e=t.tech.steel_container>=2?20:10;return t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=2&&(e+=10),t.tech.world_control&&(e+=10),t.tech.particles&&t.tech.particles>=2&&(e*=2),t.resource.Containers.max+=e,t.resource.Containers.display||(t.resource.Containers.display=!0,sc($("#resources")),sr(),t.settings.tabLoad&&rr("storage")),!0}return!1}},bank:{id:"city-bank",title:z("city_bank"),desc:()=>z("city_bank_desc",[_i[t.race.species].home]),category:"commercial",reqs:{banking:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("bank",e,250,1.35),Lumber:e=>Xi("bank",e,75,1.32),Stone:e=>Xi("bank",e,100,1.35),Iron:e=>(t.city.bank?t.city.bank.count:0)+(e||0)>=2&&t.city.ptrait.includes("unstable")?Xi("bank",e,30,1.3):0},effect(){let e=Us();return e=Nr(e),e=(+e.toFixed(0)).toLocaleString(),t.tech.banking>=2?`
    ${z("plus_max_resource",[`$${e}`,z("resource_Money_name")])}
    ${z("plus_max_resource",[ua(1),z("banker_name")])}
    `:z("plus_max_resource",[`$${e}`,z("resource_Money_name")])},action(){return!!Cs($(this)[0])&&(t.resource.Money.max+=Nr(1800),t.city.bank.count++,t.civic.banker.max=ua(t.city.bank.count),!0)}},pylon:{id:"city-pylon",title:z("city_pylon"),desc:z("city_pylon"),category:"industrial",reqs:{magic:2},not_trait:["cataclysm","orbit_decayed"],cost:{Money:e=>(e=e||0,(t.city.pylon?t.city.pylon.count:0)+e>=2?Xi("pylon",e,10,1.48):0),Stone:e=>Xi("pylon",e,12,1.42),Crystal:e=>Xi("pylon",e,8,1.42)-3},effect(){let e=Nr(5);return`
    ${z("gain",[+(.01*lc("magic")).toFixed(3),t.resource.Mana.name])}
    ${z("plus_max_resource",[e,t.resource.Mana.name])}
    `},special:()=>!!(t.tech.magic&&t.tech.magic>=3),action(){return!!Cs($(this)[0])&&(t.city.pylon.count++,t.resource.Mana.max+=Nr(5),!0)}},conceal_ward:{id:"city-conceal_ward",title:z("city_conceal_ward"),desc:z("city_conceal_ward"),category:"industrial",reqs:{roguemagic:3},not_trait:["cataclysm","orbit_decayed"],cost:{Money:e=>Xi("conceal_ward",e,500,1.25),Mana:e=>{return Xi("conceal_ward",e,(a=42,t.tech.nexus&&t.tech.roguemagic&&t.tech.roguemagic>=7&&(a*=.92**t.tech.nexus),a),1.25);var a},Crystal:e=>Xi("conceal_ward",e,5,1.25)},effect:()=>`
    ${z("city_conceal_ward_effect",[t.tech.roguemagic&&t.tech.roguemagic>=8?1.25:1])}
    `,action(){return!!Cs($(this)[0])&&(t.city.conceal_ward.count++,!0)}},graveyard:{id:"city-graveyard",title:z("city_graveyard"),desc:z("city_graveyard_desc"),category:"industrial",reqs:{reclaimer:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>(e=e||0,(t.city.graveyard?t.city.graveyard.count:0)+e>=5?Xi("graveyard",e,5,1.85):0),Lumber:e=>Xi("graveyard",e,2,1.95),Stone:e=>Xi("graveyard",e,6,1.9)},effect(){let e=os(Nr(100));return`
    ${z("city_graveyard_effect",[8])}
    ${z("plus_max_resource",[e,t.resource.Lumber.name])}
    `},action(){return!!Cs($(this)[0])&&(t.city.graveyard.count++,t.resource.Lumber.max+=os(Nr(100)),!0)}},lumber_yard:{id:"city-lumber_yard",title:z("city_lumber_yard"),desc:z("city_lumber_yard_desc"),category:"industrial",reqs:{axe:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>(e=e||0,(t.city.lumber_yard?t.city.lumber_yard.count:0)+e>=5?Xi("lumber_yard",e,5,1.85):0),Lumber:e=>Xi("lumber_yard",e,6,1.9),Stone:e=>Xi("lumber_yard",e,2,1.95)},effect(){let e=os(Nr(100));return`
    ${z("city_lumber_yard_effect",[2])}
    ${z("plus_max_resource",[e,t.resource.Lumber.name])}
    `},action(){return!!Cs($(this)[0])&&(t.city.lumber_yard.count++,t.civic.lumberjack.display=!0,t.resource.Lumber.max+=os(Nr(100)),!0)}},sawmill:{id:"city-sawmill",title:z("city_sawmill"),desc:z("city_sawmill_desc"),category:"industrial",reqs:{saw:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("sawmill",e,3e3,1.26),Iron:e=>Xi("sawmill",e,400,1.26),Cement:e=>Xi("sawmill",e,420,1.26)},effect(){let e=t.tech.saw>=2?8:5,a=`
    ${z("plus_max_resource",[os(Nr(200)),t.resource.Lumber.name])}
    ${z("city_lumber_yard_effect",[e])}
    `;return t.tech.foundry&&t.tech.foundry>=4&&(a+=`
    ${z("city_sawmill_effect2",[2])}
    `),t.city.powered&&(a+=`
    ${z("city_sawmill_effect3",[4,$(this)[0].powered()])}
    `),a},powered:()=>nc(1),powerBalancer:()=>!!t.city.sawmill.hasOwnProperty("psaw")&&[{r:"Lumber",k:"psaw"}],action(){return!!Cs($(this)[0])&&(t.city.sawmill.count++,t.resource.Lumber.max+=os(Nr(200)),ks($(this)[0]),!0)}},rock_quarry:{id:"city-rock_quarry",title:()=>t.race.flier?z("city_rock_quarry_alt"):z("city_rock_quarry"),desc:()=>t.race.flier?z("city_rock_quarry_desc_alt",[t.resource.Stone.name]):z("city_rock_quarry_desc"),category:"industrial",reqs:{mining:1},not_trait:["cataclysm","sappy"],cost:{Money:e=>(e=e||0,(t.city.rock_quarry?t.city.rock_quarry.count:0)+e>=2?Xi("rock_quarry",e,20,1.45):0),Lumber:e=>Xi("rock_quarry",e,50,1.36),Stone:e=>Xi("rock_quarry",e,10,1.36)},effect(){let e=os(Nr(100)),a=t.race.smoldering?`
    ${z("plus_max_resource",[e,t.resource.Chrysotile.name])}
    `:"";return t.tech.mine_conveyor?`
    ${z("city_rock_quarry_effect1",[2])}
    ${z("plus_max_resource",[e,t.resource.Stone.name])}
    ${a}
    ${z("city_rock_quarry_effect2",[4,$(this)[0].powered()])}
    `:`
    ${z("city_rock_quarry_effect1",[2])}
    ${z("plus_max_resource",[e,t.resource.Stone.name])}
    ${a}`},special:()=>!!t.race.smoldering,powered:()=>nc(1),powerBalancer:()=>!!t.city.rock_quarry.hasOwnProperty("cnvay")&&(t.city.hasOwnProperty("metal_refinery")&&t.city.rock_quarry.hasOwnProperty("almcvy")?[{r:"Stone",k:"cnvay"},{r:"Aluminium",k:"almcvy"}]:[{r:"Stone",k:"cnvay"}]),power_reqs:{mine_conveyor:1},action(){if(Cs($(this)[0])){t.city.rock_quarry.count++,t.civic.quarry_worker.display=!0;let e=os(Nr(100));return t.resource.Stone.max+=e,t.race.smoldering&&t.resource.Chrysotile.display&&(t.settings.showCivic=!0,t.settings.showIndustry=!0,t.resource.Chrysotile.max+=e),t.tech.mine_conveyor&&ks($(this)[0]),!0}return!1}},cement_plant:{id:"city-cement_plant",title:z("city_cement_plant"),desc:z("city_cement_plant_desc"),category:"industrial",reqs:{cement:1},not_trait:["cataclysm","lone_survivor","flier"],cost:{Money:e=>Xi("cement_plant",e,3e3,1.5),Lumber:e=>Xi("cement_plant",e,1800,1.36),Stone:e=>Xi("cement_plant",e,2e3,1.32),Iron:e=>t.city.ptrait.includes("unstable")?Xi("cement_plant",e,275,1.32):0},effect(){if(t.tech.cement>=5){let e=t.tech.cement>=6?8:5;return`
    ${z("city_cement_plant_effect1",[ua(2)])}
    ${z("city_cement_plant_effect2",[$(this)[0].powered(),e])}
    `}return z("city_cement_plant_effect1",[ua(2)])},powered:()=>nc(2),powerBalancer:()=>!!t.city.cement_plant.hasOwnProperty("cnvay")&&[{r:"Cement",k:"cnvay"}],power_reqs:{cement:5},action(){return!!Cs($(this)[0])&&(t.resource.Cement.display=!0,t.city.cement_plant.count++,t.civic.cement_worker.display=!0,t.civic.cement_worker.max=t.city.cement_plant.count*ua(2),t.tech.cement&&t.tech.cement>=5&&ks($(this)[0]),!0)}},foundry:{id:"city-foundry",title:z("city_foundry"),desc:z("city_foundry_desc"),category:"industrial",reqs:{foundry:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("foundry",e,750,1.36),Stone:e=>Xi("foundry",e,100,1.36),Copper:e=>Xi("foundry",e,250,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Xi("foundry",e,40,1.36):0},effect(){let e=`
    ${z("city_foundry_effect1",[ua(1)])}
    `;return t.tech.foundry>=2&&(e+=`
    ${z("city_crafted_mats",[t.tech.foundry>=5?t.tech.foundry>=8?8:5:3])}
    `),t.tech.foundry>=6&&(e+=`
    ${z("city_foundry_effect2",[2])}
    `),e},action(){return!!Cs($(this)[0])&&(0===t.city.foundry.count&&(t.race.no_craft?Bi(z("city_foundry_msg2"),"info",!1,["progress"]):Bi(z("city_foundry_msg1"),"info",!1,["progress"])),t.city.foundry.count++,t.civic.craftsman.max+=ua(1),t.civic.craftsman.display=!0,t.race.kindling_kindred||t.race.smoldering||(t.resource.Plywood.display=!0),t.resource.Brick.display=!0,t.resource.Iron.display&&(t.resource.Wrought_Iron.display=!0),t.resource.Aluminium.display&&(t.resource.Sheet_Metal.display=!0),ma(),!0)}},factory:{id:"city-factory",title:z("city_factory"),desc:`
    ${z("city_factory_desc")}
    ${z("requires_power")}
    `,category:"industrial",reqs:{high_tech:3},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("factory",e,25e3,zs(1.32)),Cement:e=>Xi("factory",e,1e3,zs(1.32)),Steel:e=>Xi("factory",e,7500,zs(1.32)),Titanium:e=>Xi("factory",e,2500,zs(1.32))},effect(){let e=`
    ${z("city_factory_effect")}
    ${z("minus_power",[$(this)[0].powered()])}
    `;return t.tech.foundry>=7&&(e+=`
    ${z("city_crafted_mats",[5])}
    `),e},powered:()=>nc(3),special:!0,action(){return!!Cs($(this)[0])&&(t.city.factory.count++,t.resource.Alloy.display=!0,t.tech.polymer&&(t.resource.Polymer.display=!0),ks($(this)[0])&&t.city.factory.Alloy++,t.settings.showIndustry=!0,Qs(),!0)}},nanite_factory:Jr("nanite_factory","city"),smelter:{id:"city-smelter",title:z("city_smelter"),desc:z("city_smelter_desc"),category:"industrial",reqs:{smelting:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("smelter",e,1e3,zs(1.32)),Iron:e=>Xi("smelter",e,500,zs(1.33))},effect(){var e=t.tech.smelting>=3?t.tech.smelting>=7?15:12:10;return t.race.pyrophobia&&(e*=.9),t.tech.smelting>=2&&!t.race.steelen?z("city_smelter_effect2",[e]):z("city_smelter_effect1",[e])},special:!0,action(){return!!Cs($(this)[0])&&(t.city.smelter.count++,t.race.kindling_kindred||t.race.smoldering||t.race.artifical?t.race.artifical?t.city.smelter.Oil++:t.race.evil?t.city.smelter.Wood++:t.city.smelter.Coal++:t.city.smelter.Wood++,t.city.smelter.Iron++,t.settings.showIndustry=!0,Qs(),!0)},flair:`
    ${z("city_smelter_flair1")}
    ${z("city_smelter_flair2")}
    `},metal_refinery:{id:"city-metal_refinery",title:z("city_metal_refinery"),desc:z("city_metal_refinery_desc"),category:"industrial",reqs:{alumina:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("metal_refinery",e,2500,1.35),Iron:e=>t.city.ptrait.includes("unstable")?Xi("metal_refinery",e,125,1.35):0,Steel:e=>Xi("metal_refinery",e,350,1.35)},powered:()=>nc(2),powerBalancer:()=>!!t.city.metal_refinery.hasOwnProperty("pwr")&&[{r:"Aluminium",k:"cnvay"}],power_reqs:{alumina:2},effect(){let e=t.race.sappy?"city_metal_refinery_effect_alt":"city_metal_refinery_effect";return t.tech.alumina>=2?`${z(e,[6])} ${z("city_metal_refinery_effect2",[6,12,$(this)[0].powered()])}`:z(e,[6])},action(){return!!Cs($(this)[0])&&(t.city.metal_refinery.count++,t.resource.Aluminium.display=!0,t.city.foundry&&t.city.foundry.count>0&&!t.resource.Sheet_Metal.display&&(t.resource.Sheet_Metal.display=!0,ma()),t.tech.alumina>=2&&ks($(this)[0]),!0)}},mine:{id:"city-mine",title:z("city_mine"),desc:z("city_mine_desc"),category:"industrial",reqs:{mining:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("mine",e,60,zs(1.6)),Lumber:e=>Xi("mine",e,175,zs(1.38))},effect(){return t.tech.mine_conveyor?`
    ${z("city_mine_effect1",[ua(1)])}
    ${z("city_mine_effect2",[$(this)[0].powered(),5])}
    `:z("city_mine_effect1",[ua(1)])},powered:()=>nc(1),powerBalancer:()=>!(!t.city.mine.hasOwnProperty("cpow")||!t.city.mine.hasOwnProperty("ipow"))&&[{r:"Copper",k:"cpow"},{r:"Iron",k:"ipow"}],power_reqs:{mine_conveyor:1},action(){return!!Cs($(this)[0])&&(t.city.mine.count++,t.resource.Copper.display=!0,t.civic.miner.display=!0,t.civic.miner.max=ua(t.city.mine.count),t.tech.mine_conveyor&&ks($(this)[0]),!0)},flair:()=>"avian"===_i[t.race.species].type?z("city_mine_flair_avian"):""},coal_mine:{id:"city-coal_mine",title:z("city_coal_mine"),desc:z("city_coal_mine_desc"),category:"industrial",reqs:{mining:4},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("coal_mine",e,480,zs(1.4)),Lumber:e=>Xi("coal_mine",e,250,zs(1.36)),Iron:e=>t.city.ptrait.includes("unstable")?Xi("coal_mine",e,28,zs(1.36)):0,Wrought_Iron:e=>Xi("coal_mine",e,18,zs(1.36))},effect(){return t.tech.mine_conveyor?`
    ${z("city_coal_mine_effect1",[ua(1)])}
    ${z("city_coal_mine_effect2",[$(this)[0].powered(),5])}
    `:z("city_coal_mine_effect1",[ua(1)])},powered:()=>nc(1),powerBalancer:()=>t.city.coal_mine.hasOwnProperty("cpow")&&t.city.coal_mine.hasOwnProperty("upow")&&t.resource.Uranium.display?[{r:"Coal",k:"cpow"},{r:"Uranium",k:"upow"}]:!!t.city.coal_mine.hasOwnProperty("cpow")&&[{r:"Coal",k:"cpow"}],power_reqs:{mine_conveyor:1},action(){return!!Cs($(this)[0])&&(t.city.coal_mine.count++,t.resource.Coal.display=!0,t.civic.coal_miner.display=!0,t.civic.coal_miner.max=ua(t.city.coal_mine.count),t.tech.mine_conveyor&&ks($(this)[0]),!0)}},oil_well:{id:"city-oil_well",title:z("city_oil_well"),desc:z("city_oil_well_desc"),category:"industrial",reqs:{oil:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("oil_well",e,5e3,zs(1.5)),Iron:e=>t.city.ptrait.includes("unstable")?Xi("oil_well",e,450,zs(1.5)):0,Cement:e=>Xi("oil_well",e,5250,zs(1.5)),Steel:e=>Xi("oil_well",e,6e3,zs(1.5))},effect:()=>z("city_oil_well_effect",[+Oe("oil_well").toFixed(2),Nr(500)]),action(){return!!Cs($(this)[0])&&(t.city.oil_well.count++,t.resource.Oil.max+=Nr(500),1===t.city.oil_well.count&&(t.resource.Oil.display=!0,Qs()),!0)},flair:z("city_oil_well_flair")},oil_depot:{id:"city-oil_depot",title:z("city_oil_depot"),desc:z("city_oil_depot_desc"),category:"trade",reqs:{oil:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("oil_depot",e,2500,zs(1.46)),Iron:e=>t.city.ptrait.includes("unstable")?Xi("oil_depot",e,325,zs(1.36)):0,Cement:e=>Xi("oil_depot",e,3750,zs(1.46)),Sheet_Metal:e=>Xi("oil_depot",e,100,zs(1.45))},effect(){let e=Nr(1e3);e*=t.tech.world_control?1.5:1;let a=`
    ${z("plus_max_resource",[e,t.resource.Oil.name])}.
    `;if(t.resource.Helium_3.display){let e=Nr(400);e*=t.tech.world_control?1.5:1,a+=`
    ${z("plus_max_resource",[e,t.resource.Helium_3.name])}.
    `}if(t.tech.uranium>=2){let e=Nr(250);e*=t.tech.world_control?1.5:1,a+=`
    ${z("plus_max_resource",[e,t.resource.Uranium.name])}.
    `}return a},action(){return!!Cs($(this)[0])&&(t.city.oil_depot.count++,t.resource.Oil.max+=Nr(1e3)*(t.tech.world_control?1.5:1),t.resource.Helium_3.display&&(t.resource.Helium_3.max+=Nr(400)*(t.tech.world_control?1.5:1)),t.tech.uranium>=2&&(t.resource.Uranium.max+=Nr(250)*(t.tech.world_control?1.5:1)),!0)}},trade:{id:"city-trade",title:z("city_trade"),desc:z("city_trade_desc"),category:"trade",reqs:{trade:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("trade",e,500,1.36),Lumber:e=>Xi("trade",e,125,1.36),Stone:e=>Xi("trade",e,50,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Xi("trade",e,15,1.36):0,Furs:e=>Xi("trade",e,65,1.36)},effect(){let e=t.race.xenophobic||t.race.nomadic?t.tech.trade:t.tech.trade+1;return t.tech.trade&&t.tech.trade>=3&&e--,t.race.flier&&(e+=di.flier.vars()[1]),z("city_trade_effect",[e])},action(){if(Cs($(this)[0])){t.city.trade.count++;let e=t.race.xenophobic||t.race.nomadic?t.tech.trade:t.tech.trade+1;return t.tech.trade&&t.tech.trade>=3&&e--,t.city.market.mtrade+=e,!0}return!1}},wharf:{id:"city-wharf",title:z("city_wharf"),desc:z("city_wharf_desc"),category:"trade",era:"industrialized",reqs:{wharf:1},not_trait:["thalassophobia","cataclysm"],cost:{Money:e=>Xi("wharf",e,62e3,1.32),Lumber:e=>Xi("wharf",e,44e3,1.32),Iron:e=>t.city.ptrait.includes("unstable")?Xi("wharf",e,200,1.32):0,Cement:e=>Xi("wharf",e,3e3,1.32),Oil:e=>Xi("wharf",e,750,1.32)},effect(){let e=t.tech.world_control?15:10;return t.tech.particles&&t.tech.particles>=2&&(e*=2),`
    ${z("city_trade_effect",[2])}
    ${z("city_wharf_effect")}
    ${z("plus_max_crates",[e])}
    ${z("plus_max_containers",[e])}
    `},action(){if(Cs($(this)[0])){!1===t.resource.Containers.display&&(Bi(z("city_warehouse_msg"),"info",!1,["progress"]),t.resource.Containers.display=!0,sc($("#resources")),sr()),t.city.wharf.count++,t.city.market.mtrade+=2;let e=t.tech.world_control?15:10;return t.tech.particles&&t.tech.particles>=2&&(e*=2),t.resource.Crates.max+=e,t.resource.Containers.max+=e,!0}return!1}},tourist_center:{id:"city-tourist_center",title:z("city_tourist_center"),desc:z("city_tourist_center_desc"),category:"commercial",reqs:{monument:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("tourist_center",e,1e5,1.36),Stone:e=>Xi("tourist_center",e,25e3,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Xi("tourist_center",e,1e3,1.36):0,Furs:e=>Xi("tourist_center",e,7500,1.36),Plywood:e=>Xi("tourist_center",e,5e3,1.36)},effect(){let e=t.tech.monument&&t.tech.monument>=3&&i.s_gate?3:1,a=("corpocracy"===t.civic.govern.type?2:1)*e,r=("corpocracy"===t.civic.govern.type?10:5)*e,s=("corpocracy"===t.civic.govern.type?4:2)*e,c="";t.stats.achieve.banana&&t.stats.achieve.banana.l>=4&&(c=`
    ${z("city_tourist_center_effect5",[("corpocracy"===t.civic.govern.type?6:3)*e])}
    `);let o="",n=D("pious",1);return n&&(o=`
    ${z("city_tourist_center_effect6",[("corpocracy"===t.civic.govern.type?2*n:n)*e])}
    `),`
    ${z("city_tourist_center_effect1",[t.resource.Food.name])}
    ${z("city_tourist_center_effect2",[a,Zr.city.amphitheatre.title()])}
    ${z("city_tourist_center_effect3",[r])}
    ${z("city_tourist_center_effect4",[s])}
    ${c}${o}`},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(t.city.tourist_center.count++,t.city.tourist_center.on++,!0)}},amphitheatre:{id:"city-amphitheatre",title:()=>z(D("athleticism",0)?"city_stadium":"city_amphitheatre"),desc:()=>z(D("athleticism",0)?"city_stadium":"city_amphitheatre_desc"),category:"commercial",reqs:{theatre:1},not_trait:["joyless","cataclysm"],cost:{Money:e=>Xi("amphitheatre",e,500,1.55),Lumber:e=>Xi("amphitheatre",e,50,1.75),Stone:e=>Xi("amphitheatre",e,200,1.75),Iron:e=>t.city.ptrait.includes("unstable")?Xi("amphitheatre",e,18,1.36):0},effect(){let e=D("athleticism",0);return`
    ${z("city_max_entertainer",[ua(D("athleticism",1)||1)])}
    ${z("city_max_morale",[e||1])}
    `},action(){return!!Cs($(this)[0])&&(t.city.amphitheatre.count++,t.civic.entertainer.max+=ua(1),t.civic.entertainer.display=!0,!0)},flair:()=>z(D("athleticism",0)?"city_stadium_flair":"city_amphitheatre_flair")},casino:{id:"city-casino",title:z("city_casino"),desc:z("city_casino"),category:"commercial",reqs:{gambling:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("casino",e,35e4,1.35),Iron:e=>t.city.ptrait.includes("unstable")?Xi("casino",e,2e3,1.35):0,Furs:e=>Xi("casino",e,6e4,1.35),Plywood:e=>Xi("casino",e,1e4,1.35),Brick:e=>Xi("casino",e,6e3,1.35)},effect(){let e=is();return e+=`
    ${z("minus_power",[$(this)[0].powered()])}
    `,e},powered:()=>nc(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=2?2:3),action(){return!!Cs($(this)[0])&&(t.city.casino.count++,t.race.joyless||(t.civic.entertainer.max+=ua(1),t.civic.entertainer.display=!0),ks($(this)[0]),!0)},flair:z("city_casino_flair")},temple:{id:"city-temple",title:z("city_temple"),desc:()=>z("city_temple_desc",["none"!==t.race.gods?_i[t.race.gods.toLowerCase()].entity:_i[t.race.species].entity]),category:"commercial",reqs:{theology:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("temple",e,50,1.36),Lumber:e=>Xi("temple",e,25,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Xi("temple",e,6,1.36):0,Furs:e=>Xi("temple",e,15,1.36),Cement:e=>Xi("temple",e,10,1.36)},effect(){let e=ss();return t.genes.ancients&&t.genes.ancients>=2&&(e+=`
    ${z("city_temple_effect6",[ua(1)])}
    `),e},action(){return!!Cs($(this)[0])&&(t.genes.ancients&&t.genes.ancients>=2&&(t.civic.priest.display=!0),t.city.temple.count++,!0)}},shrine:{id:"city-shrine",title:z("city_shrine"),desc:()=>z("city_shrine_desc"),category:"commercial",reqs:{theology:2},trait:["magnificent"],not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("shrine",e,75,1.32),Stone:e=>Xi("shrine",e,65,1.32),Furs:e=>Xi("shrine",e,10,1.32),Copper:e=>Xi("shrine",e,15,1.32)},effect(){let e=`
    ${z("city_shrine_effect")}
    `;if(t.city.shrine&&t.city.shrine.morale>0&&(e+=`
    ${z("city_shrine_morale",[+Nc("morale").add.toFixed(1)])}
    `),t.city.shrine&&t.city.shrine.metal>0&&(e+=`
    ${z("city_shrine_metal",[+(100*(Nc("metal").mult-1)).toFixed(1)])}
    `),t.city.shrine&&t.city.shrine.know>0){let t=Nc("know");e+=`
    ${z("city_shrine_know",[(+t.add.toFixed(1)).toLocaleString()])}
    `,e+=`
    ${z("city_shrine_know2",[+(100*(t.mult-1)).toFixed(1)])}
    `}return t.city.shrine&&t.city.shrine.tax>0&&(e+=`
    ${z("city_shrine_tax",[+(100*(Nc("tax").mult-1)).toFixed(1)])}
    `),e},action(){if(Cs($(this)[0])){if(t.city.shrine.count++,t.city.calendar.moon>0&&t.city.calendar.moon<7)t.city.shrine.morale++;else if(t.city.calendar.moon>7&&t.city.calendar.moon<14)t.city.shrine.metal++;else if(t.city.calendar.moon>14&&t.city.calendar.moon<21)t.city.shrine.know++;else if(t.city.calendar.moon>21)t.city.shrine.tax++;else switch(Math.floor(g(0,4))){case 0:t.city.shrine.morale++;break;case 1:t.city.shrine.metal++;break;case 2:t.city.shrine.know++;break;case 3:t.city.shrine.tax++}return!0}return!1}},meditation:{id:"city-meditation",title:z("city_meditation"),desc:z("city_meditation"),category:"commercial",reqs:{primitive:3},trait:["calm"],not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("meditation",e,50,1.2),Stone:e=>Xi("meditation",e,25,1.2),Furs:e=>Xi("meditation",e,8,1.2)},effect(){let e=t.resource.Zen.amount/(t.resource.Zen.amount+5e3);return`
    ${z("city_meditation_effect",[di.calm.vars()[0]])}
    ${z("city_meditation_effect2",[2])}
    ${z("city_meditation_effect3",[1])}
    ${z("city_meditation_effect4",[`${(100*e).toFixed(2)}%`])}
    `},action(){return!!Cs($(this)[0])&&(t.city.meditation.count++,t.resource.Zen.max+=di.calm.vars()[0],!0)}},university:{id:"city-university",title:z("city_university"),desc:()=>z("city_university_desc",[_i[t.race.species].home]),category:"science",reqs:{science:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("university",e,900,1.5)-500,Lumber:e=>Xi("university",e,500,1.36)-200,Stone:e=>Xi("university",e,750,1.36)-350,Crystal:e=>"magic"===t.race.universe?Xi("university",e,5,1.36):0,Iron:e=>(t.city.university?t.city.university.count:0)+(e||0)>=3&&t.city.ptrait.includes("unstable")?Xi("university",e,25,1.36):0},effect(){let e=+$(this)[0].knowVal().toFixed(0);return`
    ${z("city_university_effect",[ua(1)])}
    ${z("city_max_knowledge",[e.toLocaleString()])}
    `},knowVal(){let e=1,a=t.tech.science&&t.tech.science>=8?700:500;t.city.ptrait.includes("permafrost")&&(a+=Fi.permafrost.vars()[1]),t.tech.science>=4&&(e+=.02*t.city.library.count),t.space.observatory&&t.space.observatory.count>0&&(e+=.05*c.observatory),t.portal.sensor_drone&&t.tech.science>=14&&(e+=.02*i.sensor_drone),t.race.hard_of_hearing&&(e*=1-di.hard_of_hearing.vars()[0]/100),t.race.curious&&(e*=1+di.curious.vars()[0]/100*t.resource[t.race.species].amount);let r=Oi("cath");if(r>0&&(e*=1+di.curious.vars(3)[0]*r),i.s_gate&&n.scavenger){let t=It("gxy_alien2");e*=1+n.scavenger*t/4}let s=D("teacher",0);s&&(e*=1+s/100);let o=D("athleticism",2);o&&(e*=1-o/100),Lc()&&(e*=Nc("know").mult);let l=a*e;if(t.tech.supercollider){let e=t.tech.tp_particles||t.tech.particles&&t.tech.particles>=3?12.5:25;l*=t.tech.supercollider/e+1}return t.race.orbit_decayed&&(t.space.satellite&&(l*=1+.12*t.space.satellite.count),t.tech.biotech&&t.tech.biotech>=1&&(l*=2)),l},action(){if(Cs($(this)[0])){let e=t.tech.science&&t.tech.science>=8?700:500;if(t.tech.science>=4&&(e*=1+.02*t.city.library.count),t.tech.supercollider){let a=t.tech.particles&&t.tech.particles>=3?12.5:25;e*=t.tech.supercollider/a+1}return t.resource.Knowledge.max+=e,t.city.university.count++,t.civic.professor.display=!0,t.civic.professor.max=t.city.university.count,!0}return!1}},library:{id:"city-library",title:z("city_library"),desc:()=>z("city_library_desc",[_i[t.race.species].home]),category:"science",reqs:{science:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("library",e,45,1.2),Crystal:e=>"magic"===t.race.universe?Xi("library",e,2,1.2):0,Iron:e=>t.city.ptrait.includes("unstable")?Xi("library",e,4,1.2):0,Furs:e=>Xi("library",e,22,1.2),Plywood:e=>Xi("library",e,20,1.2),Brick:e=>Xi("library",e,15,1.2)},effect(){let e=125;t.race.nearsighted&&(e*=1-di.nearsighted.vars()[0]/100),t.race.studious&&(e*=1+di.studious.vars()[1]/100);let a=Oi("elven");if(a>0&&(e*=1+di.studious.vars(1)[1]/100*a),t.tech.science&&t.tech.science>=8&&(e*=1.4),t.tech.anthropology&&t.tech.anthropology>=2&&(e*=1+.05*t.city.temple.count),t.tech.science&&t.tech.science>=5){let a=la(t.civic.scientist.workers,"scientist");t.race.high_pop&&(a=Pe(a)),e*=1+.12*a}let r=D("teacher",0);r&&(e*=1+r/100);let s=D("athleticism",2);s&&(e*=1-s/100);let i=D("muckraker",1);i&&(e*=1+i/100),e=+e.toFixed(0);let c=D("muckraker",2),o=c?5-c:5;return t.race.autoignition&&(o-=di.autoignition.vars()[0],o<0&&(o=0)),`
    ${z("city_max_knowledge",[e.toLocaleString()])}
    ${z("city_library_effect",[o])}
    `},action(){if(Cs($(this)[0])){let e=125;return t.race.nearsighted&&(e*=1-di.nearsighted.vars()[0]/100),t.tech.science&&t.tech.science>=8&&(e*=1.4),t.tech.anthropology&&t.tech.anthropology>=2&&(e*=1+.05*t.city.temple.count),t.tech.science&&t.tech.science>=5&&(e*=1+.12*la(t.civic.scientist.workers,"scientist")),e=+e.toFixed(1),t.resource.Knowledge.max+=e,t.city.library.count++,t.tech.science&&t.tech.science>=3&&(t.civic.professor.impact=.5+.01*t.city.library.count),!0}return!1},flair:z("city_library_flair")},wardenclyffe:{id:"city-wardenclyffe",title:()=>Es(),desc:z("city_wardenclyffe_desc"),category:"science",reqs:{high_tech:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("wardenclyffe",e,5e3,1.22),Knowledge:e=>Xi("wardenclyffe",e,t.race.logical?1e3-di.logical.vars()[0]:1e3,1.22),Crystal:e=>"magic"===t.race.universe?Xi("wardenclyffe",e,100,1.22):0,Copper:e=>Xi("wardenclyffe",e,500,1.22),Iron:e=>t.city.ptrait.includes("unstable")?Xi("wardenclyffe",e,75,1.22):0,Cement:e=>Xi("wardenclyffe",e,350,1.22),Sheet_Metal:e=>Xi("wardenclyffe",e,125,1.2),Nanite:e=>t.race.deconstructor?Xi("wardenclyffe",e,50,1.18):0},effect(){let e=1e3;if(t.city.ptrait.includes("magnetic")&&(e+=Fi.magnetic.vars()[1]),t.tech.supercollider){let a=t.tech.particles&&t.tech.particles>=3?12.5:25;e*=t.tech.supercollider/a+1}t.space.satellite&&(e*=1+.04*t.space.satellite.count);let a=D("athleticism",2);a&&(e*=1-a/100),e=+e.toFixed(0);let r=`
    ${z("city_wardenclyffe_effect1",[ua(1),t.civic.scientist?t.civic.scientist.name:z("job_scientist")])}
    ${z("city_max_knowledge",[e.toLocaleString()])}
    `;if(t.city.powered){let e=t.tech.science>=7?2500:2e3;if(t.city.ptrait.includes("magnetic")&&(e+=Fi.magnetic.vars()[1]),t.space.satellite&&(e*=1+.04*t.space.satellite.count),t.tech.supercollider){let a=t.tech.particles&&t.tech.particles>=3?12.5:25;e*=t.tech.supercollider/a+1}let a=D("athleticism",2);if(a&&(e*=1-a/100),e=+e.toFixed(1),t.tech.science>=15&&(r+=`
    ${z("city_wardenclyffe_effect4",[2])}
    `),"magic"===t.race.universe&&(r+=`
    ${z("plus_max_resource",[Nr(8),t.resource.Mana.name])}
    `),t.tech.broadcast){let a=t.tech.broadcast;r+=`
    ${z("city_wardenclyffe_effect3",[$(this)[0].powered(),e.toLocaleString(),a])}
    `}else r+=`
    ${z("city_wardenclyffe_effect2",[$(this)[0].powered(),e.toLocaleString()])}
    `;t.race.artifical&&(r+=`
    ${z("city_transmitter_effect",[Nr(250)])}nc(2),action(){if(Cs($(this)[0])){let e=1e3;if(t.city.wardenclyffe.count++,t.civic.scientist.display=!0,t.civic.scientist.max=t.city.wardenclyffe.count,ks($(this)[0])&&(e=t.tech.science>=7?2500:2e3),t.tech.supercollider){let a=t.tech.particles&&t.tech.particles>=3?12.5:25;e*=t.tech.supercollider/a+1}return t.resource.Knowledge.max+=e,!0}return!1},flair:()=>"magic"===t.race.universe?`
    ${z("city_wizard_tower_flair")}
    `:t.race.evil?`
    ${z("city_babel_flair")}
    `:`
    ${z("city_wardenclyffe_flair1")}
    ${z("city_wardenclyffe_flair2")}
    `},biolab:{id:"city-biolab",title:z("city_biolab"),desc:`
    ${z("city_biolab_desc")}
    ${z("requires_power")}
    `,category:"science",reqs:{genetics:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("biolab",e,25e3,1.3),Knowledge:e=>Xi("biolab",e,5e3,1.3),Copper:e=>Xi("biolab",e,1250,1.3),Iron:e=>t.city.ptrait.includes("unstable")?Xi("biolab",e,160,1.3):0,Alloy:e=>Xi("biolab",e,350,1.3)},effect(){let e=3e3;return t.portal.sensor_drone&&t.tech.science>=14&&(e*=1+.02*i.sensor_drone),t.tech.science>=20&&(e*=3),t.tech.science>=21&&(e*=1.45),t.tech.biotech>=1&&(e*=2.5),e=+e.toFixed(0),`${z("city_max_knowledge",[e.toLocaleString()])}, ${z("minus_power",[$(this)[0].powered()])}`},powered:()=>nc(2),action(){return!!Cs($(this)[0])&&(t.city.biolab.count++,ks($(this)[0])&&(t.resource.Knowledge.max+=3e3),!0)}},coal_power:{id:"city-coal_power",title:()=>t.race.environmentalist?z("city_hydro_power"):z("magic"===t.race.universe?"city_mana_engine":"city_coal_power"),desc:()=>t.race.environmentalist?`
    ${z("city_hydro_power_desc")}
    `:`
    ${z("magic"===t.race.universe?"city_mana_engine_desc":"city_coal_power_desc")}
    ${z("requires_res",[z("magic"===t.race.universe?"resource_Mana_name":"resource_Coal_name")])}
    `,category:"utility",reqs:{high_tech:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("coal_power",e,1e4,zs(1.22)),Crystal:e=>"magic"===t.race.universe?Xi("coal_power",e,125,zs(1.22)):0,Copper:e=>Xi("coal_power",e,1800,zs(1.22))-1e3,Iron:e=>t.city.ptrait.includes("unstable")?Xi("coal_power",e,175,zs(1.22)):0,Cement:e=>Xi("coal_power",e,600,zs(1.22)),Steel:e=>Xi("coal_power",e,2e3,zs(1.22))-1e3},effect(){let e="magic"===t.race.universe?.05:.35,a=-$(this)[0].powered();return t.race.environmentalist?`+${a}MW`:`+${a}MW. ${z("magic"===t.race.universe?"city_mana_engine_effect":"city_coal_power_effect",[e])}`},powered(){let e=t.race.environmentalist?t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=1?-5:-4:t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=1?-6:-5,a=D("dirty_jobs",1);return a&&(e-=a),oc(e)},p_fuel:()=>"magic"===t.race.universe?{r:"Mana",a:t.race.environmentalist?0:.05}:{r:"Coal",a:t.race.environmentalist?0:.35},action(){return!!Cs($(this)[0])&&(t.city.coal_power.count++,t.city.coal_power.on++,t.city.power+=5,!0)}},oil_power:{id:"city-oil_power",title:()=>t.race.environmentalist?z("city_wind_power"):z("city_oil_power"),desc:()=>t.race.environmentalist?`
    ${z("city_wind_power_desc")}
    `:`
    ${z("city_oil_power_desc")}
    ${z("requires_res",[z("resource_Oil_name")])}
    `,category:"utility",reqs:{oil:3},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("oil_power",e,5e4,zs(1.22)),Copper:e=>Xi("oil_power",e,6500,zs(1.22))+1e3,Iron:e=>t.city.ptrait.includes("unstable")?Xi("oil_power",e,180,zs(1.22)):0,Aluminium:e=>Xi("oil_power",e,12e3,zs(1.22)),Cement:e=>Xi("oil_power",e,5600,zs(1.22))+1e3},effect(){let e=-$(this)[0].powered();return t.race.environmentalist?`+${e}MW`:`+${e}MW. ${z("city_oil_power_effect",[.65])}`},powered(){let e=0;if(t.race.environmentalist)if(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=3){let a=1===t.city.calendar.wind?-7:-5;e=t.stats.achieve.dissipated.l>=5?a-2:a-1}else e=1===t.city.calendar.wind?-7:-5;else e=t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=3?t.stats.achieve.dissipated.l>=5?-8:-7:-6;let a=D("dirty_jobs",1);return a&&(e-=a),oc(e)},p_fuel:()=>({r:"Oil",a:t.race.environmentalist?0:.65}),action(){return!!Cs($(this)[0])&&(t.city.oil_power.count++,t.city.oil_power.on++,t.city.power+=6,!0)}},fission_power:{id:"city-fission_power",title:z("city_fission_power"),desc:`
    ${z("city_fission_power_desc")}
    ${z("requires_res",[z("resource_Uranium_name")])}
    `,category:"utility",reqs:{high_tech:5},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("fission_power",e,25e4,1.36),Copper:e=>Xi("fission_power",e,13500,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Xi("fission_power",e,1750,1.36):0,Cement:e=>Xi("fission_power",e,10800,1.36),Titanium:e=>Xi("fission_power",e,7500,1.36)},effect(){return`+${-$(this)[0].powered()}MW. ${z("city_fission_power_effect",[.1])}`},powered:()=>oc(t.tech.uranium>=4?-18:-14),p_fuel:()=>({r:"Uranium",a:.1}),action(){return!!Cs($(this)[0])&&(t.city.fission_power.count++,t.city.fission_power.on++,t.city.power+=14,!0)}},mass_driver:{id:"city-mass_driver",title:z("city_mass_driver"),desc:`
    ${z("city_mass_driver_desc")}
    ${z("requires_power")}
    `,category:"utility",reqs:{mass:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("mass_driver",e,375e3,1.32),Copper:e=>Xi("mass_driver",e,33e3,1.32),Iron:e=>Xi("mass_driver",e,42500,1.32),Iridium:e=>Xi("mass_driver",e,2200,1.32)},effect(){return`${t.tech.mass>=2?`
    ${z("city_mass_driver_effect2",[1,t.civic.scientist.name])}
    `:""}${z("city_mass_driver_effect",[t.race.truepath?6:5,Tc("name")])} ${z("minus_power",[$(this)[0].powered()])}`},powered(){let e=t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=4?4:5;return nc(t.tech.mass>=2?e-1:e)},action(){return!!Cs($(this)[0])&&(t.city.mass_driver.count++,ks($(this)[0]),!0)}},replicator:{id:"city-replicator",title:z("tech_replicator"),desc:z("tech_replicator"),category:"utility",reqs:{special_hack:1},cost:{},wiki:!1,effect:()=>"fake structure",powered:()=>1,action:()=>!1}},tech:Hr,arpa:Ce("PhysicsTech"),genes:Ce("GeneTech"),blood:Ce("BloodTech"),space:Bt(),interstellar:Ft,galaxy:Tt,starDock:{probes:{id:"starDock-probes",title:z("star_dock_probe"),desc:()=>`
    ${z("star_dock_probe_desc")}
    `,reqs:{genesis:4},cost:{Money:e=>Xi("probes",e,35e4,t.race.truepath?1.125:1.25,"starDock"),Alloy:e=>Xi("probes",e,75e3,t.race.truepath?1.125:1.25,"starDock"),Polymer:e=>Xi("probes",e,85e3,t.race.truepath?1.125:1.25,"starDock"),Iridium:e=>Xi("probes",e,12e3,t.race.truepath?1.125:1.25,"starDock"),Mythril:e=>Xi("probes",e,3500,t.race.truepath?1.125:1.25,"starDock")},effect:()=>`
    ${z("star_dock_probe_effect")}
    `,action(){return!!Cs($(this)[0])&&(t.starDock.probes.count++,!0)}},geck:{id:"starDock-geck",title:z("tech_geck"),desc:()=>`
    ${z("tech_geck_desc")}
    `,reqs:{geck:1},condition:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=5),queue_complete:()=>0,no_multi:!0,cost:{Money:e=>Xi("geck",e,1e6,1.25,"starDock"),Elerium:e=>Xi("geck",e,1e3,1.25,"starDock"),Plasmid:e=>Xi("geck",e,25,1.4,"starDock")},effect:()=>`
    ${z("star_dock_geck_effect")}
    `,action(){return!!Cs($(this)[0])&&(t.starDock.geck.count++,!0)}},seeder:{id:"starDock-seeder",title:()=>t.race.cataclysm?z("star_dock_exodus"):z("star_dock_seeder"),desc(){let e=t.race.cataclysm?z("star_dock_exodus"):z("star_dock_seeder");return t.starDock.seeder&&t.starDock.seeder.count>=100?`
    ${e}
    ${z("star_dock_seeder_desc2")}
    `:`
    ${e}
    ${z("star_dock_seeder_desc1")}
    `},reqs:{genesis:5},queue_size:10,queue_complete:()=>100-t.starDock.seeder.count,cost:{Money:e=>(e||0)+(t.starDock.hasOwnProperty("seeder")?t.starDock.seeder.count:0)<100?1e5:0,Steel:e=>(e||0)+(t.starDock.hasOwnProperty("seeder")?t.starDock.seeder.count:0)<100?25e3:0,Neutronium:e=>(e||0)+(t.starDock.hasOwnProperty("seeder")?t.starDock.seeder.count:0)<100?240:0,Elerium:e=>(e||0)+(t.starDock.hasOwnProperty("seeder")?t.starDock.seeder.count:0)<100?10:0,Nano_Tube:e=>(e||0)+(t.starDock.hasOwnProperty("seeder")?t.starDock.seeder.count:0)<100?12e3:0},effect(e){let a=(e||0)+(t.starDock.seeder?t.starDock.seeder.count:0),r=a<100?z("star_dock_seeder_status1",[100-a]):z("star_dock_seeder_status2");return`
    ${t.race.cataclysm?z("star_dock_exodus_effect"):z("star_dock_seeder_effect")}
    ${r}
    `},action(){return!!(t.starDock.seeder.count<100&&Cs($(this)[0]))&&(t.starDock.seeder.count++,t.starDock.seeder.count>=100&&(t.tech.genesis=6,Ii("starDock-seeder"),sc($("#modalBox")),As(Zr.space.spc_gas.star_dock,"star_dock")),!0)}},prep_ship:{id:"starDock-prep_ship",title:z("star_dock_prep"),desc:()=>`
    ${t.race.cataclysm?z("star_dock_prep_cata_desc"):z("star_dock_prep_desc")}
    ${z("star_dock_genesis_desc2")}
    `,reqs:{genesis:6},queue_complete:()=>0,cost:{},effect(){let e=gc("bioseed"),a="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name");return`
    ${t.race.cataclysm?z("star_dock_prep_cata_effect"):z("star_dock_prep_effect")}
    ${z("star_dock_genesis_effect2",[e.plasmid,a])}
    ${z("star_dock_genesis_effect3",[e.phage])}
    `},action:()=>(t.tech.genesis=7,Ii("starDock-prep_ship"),sc($("#modalBox")),As(Zr.space.spc_gas.star_dock,"star_dock"),!0)},launch_ship:{id:"starDock-launch_ship",title:z("star_dock_genesis"),desc:()=>`
    ${t.race.cataclysm?z("star_dock_prep_cata_effect"):z("star_dock_genesis_desc1")}
    ${z("star_dock_genesis_desc2")}
    `,reqs:{genesis:7},queue_complete:()=>0,cost:{},effect(){let e=gc("bioseed"),a="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name");return`
    ${t.race.cataclysm?z("star_dock_genesis_cata_effect1"):z("star_dock_genesis_effect1")}
    ${z("star_dock_genesis_effect2",[e.plasmid,a])}
    ${z("star_dock_genesis_effect3",[e.phage])}
    `},action:()=>(function(){t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),C(),Vi("reset",{end:"bioseed"});let a=t.race.species,r=t.race.gods,s=_i[a].type,i=t.city.calendar.orbit,c=t.city.biome,o=t.city.ptrait,n=gc("bioseed");t.stats.bioseed++,zc(),t.prestige.Phage.count+=n.phage,t.stats.phage+=n.phage,"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=n.plasmid,t.stats.antiplasmid+=n.plasmid):(t.prestige.Plasmid.count+=n.plasmid,t.stats.plasmid+=n.plasmid),eo("seeder"),eo(`biome_${c}`),o.forEach((function(e){Fi.hasOwnProperty(e)&&eo(`atmo_${e}`)})),eo(`genus_${s}`),t.race.truepath&&eo("exodus"),o.includes("dense")&&"heavy"===t.race.universe&&eo("double_density"),t.race.junker&&"junker"===t.race.species&&to("organ_harvester"),"hellscape"===t.city.biome&&"demonic"!==_i[t.race.species].type&&to("ill_advised"),void 0===t.tech.world_control&&eo("cult_of_personality"),t.race.cataclysm&&eo("iron_will",!1,5),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&eo("gross");let l=0,u=0;Object.keys(t.city.geology).forEach((function(e){t.city.geology[e]>0?l++:t.city.geology[e]<0&&u++})),l>=4&&eo("miners_dream"),u>=3&&to("rocky_road"),t.race.steelen&&t.race.steelen>=1&&eo("steelen"),"micro"===t.race.universe&&(t.race.small||t.race.compact?eo("macro",!0):eo("marble",!0)),io();let d=!!t.race.hasOwnProperty("srace")&&t.race.srace,_=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0,p=t.starDock.probes.count+1,h=t.starDock.hasOwnProperty("geck")?t.starDock.geck.count:0;t.stats.achieve.explorer&&(p+=t.stats.achieve.explorer.l),t.race={species:"protoplasm",gods:a,old_gods:r,universe:t.race.universe,seeded:!0,probes:p,geck:h,seed:Math.floor(g(1e4)),ascended:!1},_>0&&(t.race.corruption=_),d&&(t.race.srace=d),Z({orbit:i,biome:c,ptrait:o,geology:!1}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}(),!1)}},portal:$a(),tauceti:Ve};function Vr(){let a=$("#evolution .evolving").nextAll();Object.values(a).forEach((function(e){sc($(e),!0)})),sc($("#evolution .evolving"),!0),t.evolution.bunker={count:1},Ps(Zr.evolution.bunker.id),Ts(),t.race.truepath||t.race.lone_survivor?(t.evolution.nerfed={count:0},t.evolution.badgenes={count:0}):("antimatter"===t.race.universe?t.evolution.mastery={count:0}:t.evolution.plasmid={count:0},t.evolution.crispr={count:0}),t.evolution.trade={count:0},t.evolution.craft={count:0},t.evolution.junker={count:0},t.evolution.joyless={count:0},t.evolution.steelen={count:0},(t.stats.achieve.whitehole||t.sim)&&(t.evolution.decay={count:0}),(t.stats.achieve.ascended||t.sim)&&(t.evolution.emfield={count:0}),(t.stats.achieve.scrooge||t.sim)&&(t.evolution.inflation={count:0}),(t.stats.achieve.shaken||t.sim)&&(t.evolution.cataclysm={count:0}),(t.stats.achieve.whitehole||t.stats.achieve.ascended||t.sim)&&(t.evolution.banana={count:0},t.evolution.orbit_decay={count:0}),"standard"===t.race.universe&&(t.stats.achieve.whitehole||t.sim),"heavy"===t.race.universe&&(t.stats.achieve.seeder&&t.stats.achieve.seeder.h||t.sim),"magic"===t.race.universe&&(t.stats.achieve.ascended&&t.stats.achieve.ascended.mg||t.sim)&&(t.evolution.witch_hunter={count:0}),"evil"===t.race.universe&&(t.stats.achieve.corrupted&&t.stats.achieve.corrupted.e||t.sim),(t.stats.achieve.ascended||t.stats.achieve.corrupted||t.sim)&&(t.evolution.truepath={count:0}),((t.stats.achieve.ascended||t.stats.achieve.corrupted)&&t.stats.achieve.extinct_junker||t.sim)&&(t.evolution.sludge={count:0}),(t.stats.achieve.bluepill||t.sim)&&(t.evolution.simulation={count:0}),(t.stats.achieve.retired||t.sim)&&(t.evolution.lone_survivor={count:0}),function(){let e=$('
    ');$("#evolution").append(e),e.append($(`

    ${z("evo_challenge_genes")}

    `)),e.append($(`
    ${z("evo_challenge_genes_desc")}
    `)),t.genes.challenge&&t.genes.challenge>=2&&e.append($(`
    ${z("evo_challenge_genes_mastery")}
    `))}(),t.race.truepath||t.race.lone_survivor?fs("evolution","nerfed"):"antimatter"===t.race.universe?fs("evolution","mastery"):fs("evolution","plasmid"),fs("evolution","trade"),fs("evolution","craft"),t.race.truepath||t.race.lone_survivor?fs("evolution","badgenes"):fs("evolution","crispr"),function(){let e=$('
    ');$("#evolution").append(e),e.append($(`

    ${z("evo_challenge_run")}

    `)),e.append($(`
    ${z("evo_challenge_run_desc")}
    `))}(),fs("evolution","joyless"),fs("evolution","steelen"),(t.stats.achieve.whitehole||t.sim)&&fs("evolution","decay"),(t.stats.achieve.ascended||t.sim)&&fs("evolution","emfield"),(t.stats.achieve.scrooge||t.sim)&&fs("evolution","inflation"),((t.stats.achieve.ascended||t.stats.achieve.corrupted)&&t.stats.achieve.extinct_junker||t.sim)&&fs("evolution","sludge"),(t.stats.achieve.whitehole||t.stats.achieve.ascended||t.sim)&&fs("evolution","orbit_decay"),"standard"===t.race.universe&&(t.stats.achieve.whitehole||t.sim),"heavy"===t.race.universe&&(t.stats.achieve.seeder&&t.stats.achieve.seeder.h||t.sim),"magic"===t.race.universe&&(t.stats.achieve.ascended&&t.stats.achieve.ascended.mg||t.sim)&&fs("evolution","witch_hunter"),"evil"===t.race.universe&&(t.stats.achieve.corrupted&&t.stats.achieve.corrupted.e||t.sim),t.hasOwnProperty("beta")&&!t.sim&&fs("evolution","simulation"),function(){let e=$('
    ');$("#evolution").append(e),e.append($(`

    ${z("evo_scenario")}

    `)),e.append($(`
    ${z("evo_scenario_desc")}
    `))}(),fs("evolution","junker"),(t.stats.achieve.shaken||t.sim)&&fs("evolution","cataclysm"),(t.stats.achieve.whitehole||t.stats.achieve.ascended||t.sim)&&fs("evolution","banana"),(t.stats.achieve.ascended||t.stats.achieve.corrupted||t.sim)&&fs("evolution","truepath"),(t.stats.achieve.retired||t.sim)&&fs("evolution","lone_survivor"),t.sim?function(){let a=$('
    ');$("#evolution").append(a),a.append($(`

    ${z("evo_challenge_simulation")}

    `)),a.append($(`
    ${z("evo_challenge_simulation_desc")}
    `)),a.append($(``)),ic({el:"#simSection",data:{},methods:{exitsim(){t.hasOwnProperty("sim")&&(t.stats=Ac(t.sim.stats),t.prestige=Ac(t.sim.prestige),t.genes=Ac(t.sim.genes),t.blood=Ac(t.sim.blood),t.pillars=Ac(t.sim.pillars),t.race=Ac(t.sim.race),delete t.sim,t.race.species="protoplasm",delete t.race.simulation,e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w&&P.w.terminate(),window.location.reload())}}})}():t.race.simulation&&function(){let e=$('
    ');$("#evolution").append(e),e.append($(`

    ${z("evo_challenge_simulation")}

    `)),e.append($(`
    ${z("evo_challenge_simulation_desc")}
    `));let a=$($('
    '));e.append(a),t.race.simConfig||(t.race.simConfig={}),["Plasmid","AntiPlasmid","Phage","Dark","Harmony","AICore","Artifact","Blood_Stone"].forEach((function(e){t.race.simConfig[e]=t.race.simConfig[e]||0,a.append($(`
    ${z(`resource_${e}_name`)}
    `))})),ic({el:"#simSection",data:t.race.simConfig})}()}function Jr(e,a){let r=t.race.orbit_decay?"orbit_decayed":"cataclysm",s=function(e,t,a){return"space"===a?e.hasOwnProperty("trait")?e.trait.push(t):e.trait=[t]:"tauceti"===a?e.reqs.isolation=1:e.hasOwnProperty("not_trait")?e.not_trait.push(t):e.not_trait=[t],e};switch(e){case"bonfire":return s({id:`${a}-bonfire`,title:z("city_bonfire"),desc:z("city_bonfire_desc"),category:"outskirts",wiki:!1,reqs:{primitive:3},condition:()=>Ec("summer"),queue_complete:()=>0,effect(){let e=2.5*t.resource.Thermite.diff/(2.5*t.resource.Thermite.diff+500)*500,a=1e5+9e3*t.stats.reset;a>1e6&&(a=1e6);let r=t.resource.Thermite.amount${z("city_bonfire_effect3",[a.toLocaleString()])}
    ${z("city_bonfire_effect4",[(+t.resource.Thermite.amount.toFixed(0)).toLocaleString(),a.toLocaleString()])}
    `:"";return`
    ${z("city_bonfire_effect",[t.resource.Thermite.diff])}
    ${z("city_bonfire_effect2",[+e.toFixed(1)])}
    ${r}`},action:()=>!1,flair:()=>z("city_bonfire_flair")},r,a);case"firework":return s({id:`${a}-firework`,title:z("city_firework"),desc:z("city_firework"),category:"outskirts",wiki:!1,reqs:{mining:3},condition:()=>Ec("firework")&&t[a].firework&&(t.tech.cement||t.race.flier),cost:{Money:()=>0===t[a].firework.count?5e4:0,Iron:()=>0===t[a].firework.count?7500:0,Cement:()=>0===t[a].firework.count?1e4:0},queue_complete:()=>1-t[a].firework.count,switchable:()=>!0,effect:()=>0===t[a].firework.count?z("city_firework_build"):z("city_firework_effect"),action(){return!(0!==t[a].firework.count||!Cs($(this)[0])||(t[a].firework.count=1,0))}},r,a);case"assembly":{let e=function(e){let a=Pe(e);return t.race.promiscuous&&(a/=1+di.promiscuous.vars()[1]*t.race.promiscuous),Math.round(a)};return s({id:`${a}-assembly`,title:z("city_assembly"),desc:()=>z("city_assembly_desc",[_i[t.race.species].name]),category:"military",reqs:{},trait:["artifical"],queue_complete:()=>t.resource[t.race.species].max-t.resource[t.race.species].amount,cost:{Money:a=>t.resource[t.race.species].amount?Xi("citizen",a,e(125),1.01):0,Copper:a=>t.race.deconstructor?0:t.resource[t.race.species].amount>=5?Xi("citizen",a,e(50),1.01):0,Aluminium:a=>t.race.deconstructor?0:t.resource[t.race.species].amount>=5?Xi("citizen",a,e(50),1.01):0,Nanite:a=>t.race.deconstructor&&t.resource[t.race.species].amount>=3?Xi("citizen",a,e(500),1.01):0},effect(){let e="";return t.resource[t.race.species].max===t.resource[t.race.species].amount&&(e=`
    ${z("city_assembly_effect_warn")}
    `),`
    ${z("city_assembly_effect",[_i[t.race.species].name])}
    ${e}`},action(){return!!(t.race.vax&&t.race.vax>=100)||!!(t.resource[t.race.species].max>t.resource[t.race.species].amount&&Cs($(this)[0]))&&(t.resource[t.race.species].amount++,!0)}},r,a)}case"nanite_factory":return s({id:`${a}-nanite_factory`,title:z("city_nanite_factory"),desc:z("city_nanite_factory"),category:"industrial",reqs:{},trait:["deconstructor"],region:"city",cost:{Money:e=>Xi("nanite_factory",e,25e3,zs(1.25)),Copper:e=>Xi("nanite_factory",e,1200,zs(1.25)),Steel:e=>Xi("nanite_factory",e,1e3,zs(1.25))},effect(){let e=Nr(2500);return`
    ${z("city_nanite_factory_effect",[t.resource.Nanite.name])}
    ${z("plus_max_resource",[e,t.resource.Nanite.name])}.
    `},special:!0,action(){return!!Cs($(this)[0])&&(t.city.nanite_factory.count++,t.settings.showIndustry=!0,Qs(),!0)},flair:z("city_nanite_factory_flair")},r,a);case"captive_housing":return s({id:`${a}-captive_housing`,title:z("city_captive_housing"),desc:z("city_captive_housing_desc"),category:"residential",reqs:{unfathomable:1},trait:["unfathomable"],region:"city",cost:{Money:e=>Xi("captive_housing",e,40,1.35),Lumber:e=>Xi("captive_housing",e,30,1.35),Stone:e=>Xi("captive_housing",e,18,1.35)},effect(){let e="";t.race.artifical||t.race.detritivore||t.race.carnivore||t.race.soul_eater||(e+=`
    ${z("city_captive_housing_cattle",[t.city.hasOwnProperty("captive_housing")?t.city.captive_housing.cattle:0,t.city.hasOwnProperty("captive_housing")?t.city.captive_housing.cattleCap:0])}
    `);let a=0;if(t.city.hasOwnProperty("surfaceDwellers"))for(let r=0;r${z("city_captive_housing_broken",[_i[s].name,i])}`,e+=`
    ${z("city_captive_housing_untrained",[_i[s].name,c])}
    `}return e+=`
    ${z("city_captive_housing_capacity",[a,t.city.hasOwnProperty("captive_housing")?t.city.captive_housing.raceCap:0])}
    `,t.tech.unfathomable&&t.tech.unfathomable>=2&&(e+=`
    ${z("plus_max_resource",[1,z("job_torturer")])}
    `),e},action(){if(Cs($(this)[0])){t.city.captive_housing.count++;let e=t.city.captive_housing.count;return t.city.captive_housing.raceCap=e*(t.tech.unfathomable&&t.tech.unfathomable>=3?3:2),t.city.captive_housing.cattleCap=5*e,!0}return!1}},r,a);case"horseshoe":return s({id:`${a}-horseshoe`,title:()=>z(`city_${Gc(!0)}`,[Gc(!1)]),desc:()=>z(`city_${Gc(!0)}_desc`,[Gc(!1)]),category:"outskirts",reqs:{primitive:3},condition:()=>t.race.hooved||Ec("fool",2023),inflation:!1,cost:{Lumber(e){let a=(t.race.shoecnt||0)+(e||0);return t.race.kindling_kindred||t.race.smoldering||t.resource.Copper.display&&!(a<=12)?0:Math.round((a>12?25:5)*(a<=5?1:a-4)*(di.hooved.vars()[0]/100))},Copper(e){let a=(t.race.shoecnt||0)+(e||0),r=!t.race.kindling_kindred&&!t.race.smoldering;return(!r||r&&a>12&&t.resource.Copper.display)&&(!t.resource.Iron.display||a<=75)?Math.round((a>75?20:5)*(a<=12?1:a-11)*(di.hooved.vars()[0]/100)):0},Iron(e){let a=(t.race.shoecnt||0)+(e||0);return t.resource.Iron.display&&a>75&&(!t.resource.Steel.display||a<=150)?Math.round((a<=150?12:28)*a*(di.hooved.vars()[0]/100)):0},Steel(e){let a=(t.race.shoecnt||0)+(e||0);return t.resource.Steel.display&&a>150&&(!t.resource.Adamantite.display||a<=500)?Math.round((a<=500?40:100)*a*(di.hooved.vars()[0]/100)):0},Adamantite(e){let a=(t.race.shoecnt||0)+(e||0);return t.resource.Adamantite.display&&a>500&&(!t.resource.Orichalcum.display||a<=5e3)?Math.round((a<=5e3?5:25)*a*(di.hooved.vars()[0]/100)):0},Orichalcum(e){let a=(t.race.shoecnt||0)+(e||0);return t.resource.Orichalcum.display&&a>5e3?Math.round((25*a-12e4)*(di.hooved.vars()[0]/100)):0}},action(){return!(t.race.hooved||!Ec("fool",2023))||!(!t.resource.Horseshoe.display||!Cs($(this)[0]))&&(t.resource.Horseshoe.amount++,t.race.shoecnt++,!(5001===t.race.shoecnt&&t.resource.Orichalcum.display||501===t.race.shoecnt&&t.resource.Adamantite.display||151===t.race.shoecnt&&t.resource.Steel.display||76===t.race.shoecnt&&t.resource.Iron.display||13===t.race.shoecnt&&t.resource.Copper.display&&t.resource.Lumber.display)||0)}},r,a)}}function Yr(e,a){a=a||"evo";let r=t.evolution.final||0;return(t.tech[a]&&t.tech[a]===e||t.evolution.gselect)&&r<100}const Xr=["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"];if(Xr.forEach((e=>Zr.evolution[e]={id:`evolution-${e}`,title:()=>_i[e].name,desc:()=>`${z("evo_evolve")} ${_i[e].name}`,reqs:{evo:7},grant:["evo",8],condition:()=>(t.race.seeded||t.stats.achieve.mass_extinction&&t.stats.achieve.mass_extinction.l>=1||t.stats.achieve[`extinct_${e}`]&&t.stats.achieve[`extinct_${e}`].l>=1)&&t.tech[`evo_${_i[e].type}`]>=2&&100===t.evolution.final&&!t.race.evoFinalMenu,cost:{RNA:()=>320,DNA:()=>320},race:!0,effect:()=>`${"string"==typeof _i[e].desc?_i[e].desc:_i[e].desc()} ${z("evo_complete")}`,action(){if(Cs($(this)[0])){if(["synth","custom"].includes(e))return function(e){if(("synth"===e||"custom"===e&&t.custom.race0.traits.includes("imitation"))&&Object.keys(t.stats.synth).length>1)return t.race.evoFinalMenu=e,as(),!0;t.race.species=e,Ns()}(e);t.race.species=e,Ns()}return!1},queue_complete:()=>t.tech.evo&&7===t.tech.evo?1:0,emblem:()=>Oc(`extinct_${e}`)})),Object.keys(t.stats.synth).length>1){let e=Ac(Xr);e.push("junker"),e.push("sludge"),e.forEach((e=>Zr.evolution[`s-${e}`]={id:`evolution-s-${e}`,title:()=>_i[e].name,desc:()=>`${z("evo_imitate")} ${_i[e].name}`,reqs:{evo:8},grant:["evo",9],condition:()=>t.stats.synth[e]&&t.race.evoFinalMenu,cost:{},race:!0,effect:()=>z("evo_imitate_race",[_i[e].name]),action:()=>(t.stats.synth[e]&&(t.race.species=t.race.evoFinalMenu,t.race.srace=e,Ns()),!1),queue_complete:()=>t.tech.evo&&8===t.tech.evo?1:0}))}const es={plasmid:"no_plasmid",mastery:"weak_mastery",trade:"no_trade",craft:"no_craft",crispr:"no_crispr",nerfed:"nerfed",badgenes:"badgenes"};Object.keys(es).forEach((e=>Zr.evolution[e]={id:`evolution-${e}`,title:z(`evo_challenge_${e}`),desc:z(`evo_challenge_${e}`),condition:()=>t.evolution.hasOwnProperty(e),cost:{DNA:()=>10},challenge:!0,effect:()=>rs(e),action(){return Cs($(this)[0])&&(t.race[es[e]]?(delete t.race[es[e]],$(`#${$(this)[0].id}`).removeClass("hl"),(t.race.truepath||t.race.lone_survivor)&&(delete t.race.nerfed,delete t.race.badgenes),["junker","cataclysm","banana","truepath","lone_survivor"].forEach((function(e){delete t.race[e],$(`#evolution-${e}`).removeClass("hl")}))):(t.race[es[e]]=1,$(`#${$(this)[0].id}`).addClass("hl")),Vr(),ro()),!1},highlight:()=>!!t.race[es[e]],queue_complete:()=>0}));const ts={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"},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"}};function as(){if((t.settings.tabLoad||0===t.settings.civTabs)&&"bigbang"!==t.race.universe&&(!t.race.seeded||t.race.chose)){if(t.tech.evo_challenge){let e=$("#evolution .evolving").nextAll();Object.values(e).forEach((function(e){sc($(e),!0)})),sc($("#evolution .evolving"),!0)}Object.keys(Zr.evolution).forEach((function(e){if(!Zr.evolution[e].challenge){Ps(Zr.evolution[e].id);var a=!0;Zr.evolution[e].hasOwnProperty("reqs")&&Object.keys(Zr.evolution[e].reqs).forEach((function(r){(!t.tech[r]||t.tech[r]=2&&Ts(),t.tech.evo_challenge&&Vr())}}function rs(e){switch(e){case"nerfed":return z(`evo_challenge_${e}_effect`,"antimatter"===t.race.universe?["20%","50%","50%","33%"]:["50%","20%","50%","33%"]);case"badgenes":return z(`evo_challenge_${e}_effect`,[1,2]);case"orbit_decay":return uc()>=100?`
    ${z("evo_challenge_orbit_decay_effect",[5e3])}
    ${z("evo_challenge_scenario_failwarn")}
    `:`
    ${z("evo_challenge_orbit_decay_effect",[5e3])}
    ${z("evo_challenge_scenario_failwarn")}
    ${z("evo_challenge_scenario_warn")}
    `;case"junker":return"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
    ${z("evo_challenge_junker_effect")}
    ${z("evo_warn_unwise")}
    `:z("evo_challenge_junker_effect");case"cataclysm":return uc()>=50?`
    ${z("evo_challenge_cataclysm_effect")}
    ${z("evo_challenge_cataclysm_warn")}
    `:`
    ${z("evo_challenge_cataclysm_effect")}
    ${z("evo_challenge_scenario_warn")}
    `;default:return z(`evo_challenge_${e}_effect`)}}function ss(){let e;if("antimatter"===t.race.universe||t.race.no_plasmid){let a=t.tech.anthropology&&t.tech.anthropology>=1?1.6:1;if(t.tech.fanaticism&&t.tech.fanaticism>=2){let e=la(t.civic.professor.workers,"professor")*("antimatter"===t.race.universe?.02:.04);t.race.high_pop&&(e=Pe(e)),a+=+e.toFixed(2)}if(t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display){let e=t.genes.ancients>=5?.015:t.genes.ancients>=3?.0125:.01;t.race.high_pop&&(e=Pe(e)),a+=e*la(t.civic.priest.workers,"priest")}"antimatter"===t.race.universe&&(a/=2),t.race.spiritual&&(a*=1+di.spiritual.vars()[0]/100);let r=Oi("seraph");if(r>0&&(a*=1+di.spiritual.vars(1)[0]/100*r),"theocracy"===t.civic.govern.type&&(a*=1+re.theocracy()[0]/100),t.race.ooze&&(a*=1-di.ooze.vars()[1]/100),a=+a.toFixed(3),e=`
    ${z("city_temple_effect1",[a])}
    `,"antimatter"===t.race.universe){let a=6;if(t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display){let e=t.genes.ancients>=5?.12:t.genes.ancients>=3?.1:.08;t.race.high_pop&&(e=Pe(e)),a+=e*la(t.civic.priest.workers,"priest")}e+=`
    ${z("city_temple_effect5",[a.toFixed(2)])}
    `}}else{let a=t.tech.anthropology&&t.tech.anthropology>=1?8:5;if(t.tech.fanaticism&&t.tech.fanaticism>=2){let e=.2*la(t.civic.professor.workers,"professor");t.race.high_pop&&(e=Pe(e)),a+=+e.toFixed(1)}if(t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display){let e=t.genes.ancients>=5?.15:t.genes.ancients>=3?.125:.1;t.race.high_pop&&(e=Pe(e)),a+=e*la(t.civic.priest.workers,"priest")}t.race.spiritual&&(a*=1+di.spiritual.vars()[0]/100);let r=Oi("seraph");r>0&&(a*=1+di.spiritual.vars(1)[0]/100*r),"theocracy"===t.civic.govern.type&&(a*=1+re.theocracy()[0]/100),t.race.ooze&&(a*=1-di.ooze.vars()[1]/100),t.race.orbit_decayed&&t.race.truepath&&(a*=.1),a=+a.toFixed(3),e=`
    ${z("city_temple_effect2",[a])}
    `}return t.tech.fanaticism&&t.tech.fanaticism>=3&&(e+=`
    ${z("city_temple_effect3")}
    `),t.tech.anthropology&&t.tech.anthropology>=4&&(e+=`
    ${t.race.truepath?z("city_temple_effect_tp",[2,25]):z("city_temple_effect4")}
    `),e}function is(){let e=t.tech.gambling>=3?6e4:4e4;t.tech.gambling>=5&&(e+=t.tech.gambling>=6?24e4:6e4),e=Nr(e),t.race.gambler&&(e*=1+.04*t.race.gambler),t.tech.world_control&&(e*=1.25),t.race.truepath&&(e*=1.5),t.tech.stock_exchange&&t.tech.gambling>=4&&(e*=1+.05*t.tech.stock_exchange),t.race.inflation&&(e*=1+t.race.inflation/100),t.tech.isolation&&(e*=5.5),e=Math.round(e);let a=t.race.joyless?"":`
    ${z("city_max_entertainer",[ua(1)])}
    `,r=t.race.orbit_decayed||t.tech.isolation?`
    ${z("plus_max_resource",[ua(1),z("banker_name")])}
    `:"",s=`
    ${z("plus_max_resource",[`$${e.toLocaleString()}`,z("resource_Money_name")])}
    ${a}${r}
    ${z("city_max_morale",[1])}
    `,i=Math.log2(1+t.resource[t.race.species].amount)*(t.race.gambler?2.5+t.race.gambler/10:2.5);return t.tech.gambling&&t.tech.gambling>=2&&(i*=t.tech.gambling>=5?2:1.5),t.tech.stock_exchange&&t.tech.gambling>=4&&(i*=1+.01*t.tech.stock_exchange),"corpocracy"===t.civic.govern.type&&(i*=3),"socialist"===t.civic.govern.type&&(i*=.8),t.race.inflation&&(i*=1+t.race.inflation/1250),t.tech.isolation&&(i*=1.25,t.tech.iso_gambling&&(i*=1+.05*la(t.civic.banker.workers,"banker"))),i=+i.toFixed(2),s+=`
    ${z("tech_casino_effect2",[i])}
    `,s}function cs(e,a,r,s){return((t.evolution.hasOwnProperty(e)?t.evolution[e].count:0)+(s||0))*r+a}function os(e){return t.stats.achieve.blackhole&&(e*=1+.05*t.stats.achieve.blackhole.l),Math.round(e)}function ns(){let e=1.25*(t.tech.storage-1)+1;t.tech.storage>=3&&(e*=t.tech.storage>=4?3:1.5),t.race.pack_rat&&(e*=1+di.pack_rat.vars()[1]/100);let a=Oi("kobold");return a>0&&(e*=1+di.pack_rat.vars(1)[1]/100*a),t.tech.storage>=6&&(e*=1+t.tech.supercollider/20),t.tech.tp_depot&&(e*=1+t.tech.tp_depot/20),t.tech.shelving&&t.tech.shelving>=3&&(e*=1.5),t.stats.achieve.blackhole&&(e*=1+.05*t.stats.achieve.blackhole.l),e*=t.tech.world_control?3:1,t.race.ascended&&(e*=1.1),t.blood.hoarder&&(e*=1+t.blood.hoarder/100),t.tech.storage>=7&&t.interstellar.cargo_yard&&(e*=1+t.interstellar.cargo_yard.count*u/100),e}function ls(e){if((t.race.kindling_kindred||t.race.smoldering)&&"lumber"===e)return!1;if((t.race.kindling_kindred||t.race.smoldering)&&"stone"===e)return!0;let a=t.race.truepath?"truepath":"standard";if(Zr.city[e].hasOwnProperty("path")&&!Zr.city[e].path.includes(a))return!1;var r=!0;return Object.keys(Zr.city[e].reqs).forEach((function(a){(!t.tech[a]||t.tech[a]=3&&(s=!0,t.r_queue.queue.forEach((function(e){ds(e.type,!1)&&(a[Zr[e.action][e.type].grant[0]]={v:Zr[e.action][e.type].grant[1],a:e.type})})),Object.keys(i).forEach((function(r){let i=t.tech[r]||0;us(r,t.tech[r])||(!a[r]||a[r].vi+1)&&(s=!1)}))),!(!r&&!s||t.tech[Zr.tech[e].grant[0]]&&!(t.tech[Zr.tech[e].grant[0]]`).appendTo("#city").append(`

    ${z(`city_dist_${a}`)}

    `),e[a].forEach((function(e){fs("city",e)})),Ei(`dist-${a}`,(function(){return z(`city_dist_${a}_desc`)}),{elm:`#city-dist-${a} h3`,classes:"has-background-light has-text-dark"})}}))}function gs(){if(!t.settings.tabLoad&&3!==t.settings.civTabs)return;let e={},a={},r={},s=[],i=[],c=[];["primitive","civilized","discovery","industrialized","globalized","early_space","deep_space","interstellar","intergalactic"].forEach((function(e){r[e]=[]}));const o={interstellar:"solar"};let n={};Object.keys(Zr.tech).forEach((function(l){if(!function(e){let a=t.race.truepath?"truepath":"standard";return!(!Qr[a].includes(Zr.tech[e].era)&&!Zr.tech[e].hasOwnProperty("path")||Zr.tech[e].hasOwnProperty("path")&&!Zr.tech[e].path.includes(a))}(l))return;Ps(Zr.tech[l].id);let u=function(e){let a=Zr.tech[e].grant[0];if(t.tech[a]&&t.tech[a]>=Zr.tech[e].grant[1]){if("fanaticism"!==e&&"anthropology"!==e&&"deify"!==e&&"study"!==e)return!0;if("fanaticism"===e&&t.tech.fanaticism)return!0;if("anthropology"===e&&t.tech.anthropology)return!0;if("deify"===e&&t.tech.ancient_deify)return!0;if("study"===e&&t.tech.ancient_study)return!0}return!1}(l),d=Zr.tech[l],_="category"in d?d.category:"research";if(u||-1!==s.indexOf(_)||s.push(_),u&&-1===i.indexOf(_)&&i.push(_),-1===c.indexOf(_)&&c.push(_),!0===u)_ in a||(a[_]=[]),a[_].push(l);else{let a=Zr.tech[l];if(!_s(a))return;let s=ds(l,n);if(!s)return;_ in e||(e[_]=[]);let i=t.race.truepath&&o[a.era]?o[a.era]:a.era;r.hasOwnProperty(i)||(r[i]=[]),r[i].push({t:l,p:"precog"===s})}})),sc($("#tech")),Object.keys(r).forEach((function(e){r[e].length>0&&($("#tech").append(`

    ${z(`tech_era_${e}`)}

    `),r[e].sort((function(e,t){return null==Zr.tech[e.t].cost.Knowledge?-1:null==Zr.tech[t.t].cost.Knowledge||Zr.tech[e.t].cost.Knowledge()>Zr.tech[t.t].cost.Knowledge()?1:-1})),r[e].forEach((function(e){fs("tech",e.t,!1,!!e.p&&n)})))})),c.forEach((function(e){sc($(`#tech-dist-${e}`),!0),sc($(`#tech-dist-old-${e}`),!0)})),i.forEach((function(e){if(!(e in a))return;$(`
    `).appendTo("#oldTech").append(`

    ${z(`tech_dist_${e}`)}

    `);let t=qc(4,12,!1);t.length>0&&"science"===e&&$("#tech-dist-old-science h3").append(t),a[e].forEach((function(e){fs("tech",e,!0,!1)}))}))}function fs(e,t,a,r){vs(Zr[e][t],e,t,a,r)}function vs(e,a,r,s,i){if(!1===_s(e))return;let c=a;"outerSol"===a&&(a="space"),e.region&&(a=e.region),e.powered&&!t[a][r].on&&(t[a][r].on=0);let o=e.id;Ps(o);let n="";i&&e&&e.reqs&&Object.keys(e.reqs).forEach((function(e){i[e]&&(n+=` data-req-${e}="${i[e].a}"`)}));let l,u=e.highlight&&e.highlight()?$(`
    `):$(`
    `);if(js(e,!1,["genes","blood"].includes(a))||u.addClass("cna"),js(e,!0,["genes","blood"].includes(a))||u.addClass("cnam"),s)l=$('{{ title }}');else{let t="",r="";if(e.cost){let s="genes"!==a&&"blood"!==a?fc(e):e.cost;Object.keys(s).forEach((function(e){let a=s[e]();a>0&&(t+=` res-${e}`,r+=` data-${e}="${a}"`)}))}let s="";e.class&&(s="function"==typeof e.class?` ${e.class()}`:` ${e.class}`),i&&(s=" precog");let c=e.highlight?e.highlight()?`${z("active")}`:`${z("not_active")}`:"";l=$(`${c}{{ title }} description`)}if(u.append(l),e.hasOwnProperty("special")&&("function"==typeof e.special&&e.special()||!0===e.special)){let e=$('
    \n \n
    ');u.append(e)}if(e.on||e.off){if(e.on){let e=$('');u.append(e)}if(e.off){let e=$('');u.append(e)}}else if(e.powered&&t.tech.high_tech&&t.tech.high_tech>=2&&ps(e)||e.switchable&&e.switchable()){let t=$(``),a=$(``);u.append(t),u.append(a)}if(e.count){let t=e.count();t>1&&l.append($(`${t}`))}else"tech"!==a&&t[a]&&t[a][r]&&t[a][r].count>=0?l.append($('{{ act.count }}')):"blood"===a&&t[a]&&t[a][e.grant[0]]&&t[a][e.grant[0]]>0&&"*"===e.grant[1]&&l.append($(` ${t[a][e.grant[0]]} `));if("tech"!==a&&t[a]&&t[a][r]&&void 0!==t[a][r].repair&&l.append($('
    ')),s?$("#oldTech").append(u):$("#"+c).append(u),"tech"!==a&&t[a]&&t[a][r]&&0===t[a][r].count&&($(`#${o} .count`).css("display","none"),$(`#${o} .special`).css("display","none"),$(`#${o} .on`).css("display","none"),$(`#${o} .off`).css("display","none")),e.emblem){let t=e.emblem();u.append($(t))}let d={template:''};ic({el:"#"+o,data:{title:"string"==typeof e.title?e.title:e.title(),act:t[a][r]},methods:{action(){"ontouchstart"in document.documentElement&&navigator.userAgent.match(t.settings.touch)||ys(e,a,r)},describe(){M(function(e,a){let r="string"==typeof e.desc?e.desc:e.desc();if(r+=". ",e.cost&&!a){r=js(e)?r+z("affordable")+". ":r+z("not_affordable")+". ",r+="Costs: ";let a=e.id.split("-")[0];var s="genes"!==a&&"blood"!==a?fc(e):e.cost;Object.keys(s).forEach((function(e){if("Custom"===e){let t=s[e]();r+=t.label}else if("Structs"===e){let a=s[e]();Object.keys(a).forEach((function(e){Object.keys(a[e]).forEach((function(s){let i="";if(a[e][s].hasOwnProperty("s")){let t=a[e][s].s;i="string"==typeof Zr[e][t][s].title?Zr[e][t][s].title:Zr[e][t][s].title()}else i="string"==typeof Zr[e][s].title?Zr[e][s].title:Zr[e][s].title();r+=`${i}. `,t[e][s]?a[e][s].count>t[e][s].count?r+=`${z("insufficient")} ${i}. `:a[e][s].hasOwnProperty("on")&&a[e][s].on>t[e][s].on&&(r+=`${z("insufficient")} ${i} enabled. `):r+=`${z("insufficient")} ${i}. `}))}))}else if(t.prestige.hasOwnProperty(e)){let a=s[e]();if(a>0){"Plasmid"===e&&"antimatter"===t.race.universe&&(e="AntiPlasmid");let s=z(`resource_${e}_name`);r+=`${s}: ${a}. `,t.prestige[e].count0){let s=z(`resource_${e}_name`);r+=`${s}: ${a}. `,t.portal.purifier.supply0){let e="Money"===i?"$":t.resource[i].name+": ";e=e.replace("_"," ");let s=q(a,1);r+=`${e}${s}. `,t.resource[i].amount0&&(clearInterval(t),As(e,r))}),50)}},on_label:()=>`on: ${t[a][r].on}`,off_label:()=>"off: "+(t[a][r].count-t[a][r].on),power_on(){let s=b();for(let e=0;e0;e++)t[a][r].on--;e.postPower&&setTimeout((function(){e.postPower(!1)}),250)},repair:()=>t[a][r].repair,repairMax:()=>e.repair()},filters:{val(t){switch(t){case"on":return e.on();case"off":return e.off()}},p_off(e,s){let i=t[a][r].count-e;if("city-casino"===s&&!t.race.cataclysm&&!t.race.orbit_decayed||"space-spc_casino"===s&&(t.race.cataclysm||t.race.orbit_decayed)||"tauceti-tauceti_casino"===s&&t.tech.isolation){let e=xc(5,12);if(0===i&&e.length>0)return e}return i},p_on(e,a){if("city-biolab"===a&&!t.race.cataclysm&&!t.race.orbit_decayed||(t.race.cataclysm||t.race.orbit_decayed)&&"space-exotic_lab"===a||t.tech.isolation&&"tauceti-infectious_disease_lab"===a){let t=xc(12,12);if(0===e&&t.length>0)return t}else if("city-garrison"===a||"space-space_barracks"===a){let t=qc(1,14,!0);if(e===("city-garrison"===a?13:0)&&t.length>0)return t}return e},title:e=>e,options:e=>z("action_options",[e])}}),Ei(o,(function(){}),{in:function(i){Ms(i.popper,e,t[a][r],s,a,r)},out:function(){ic({el:"#popTimer"},"destroy")},attach:"starDock"===a?"body .modal":"#main",wide:e.wide})}function ys(e,a,r){if("spcdock-launch_ship"===e.id)e.action();else switch(a){case"tech":if(t.settings.qKey&&y.q||!ds(r,!1)||!e.action()){if((!e.no_queue||!e.no_queue())&&t.tech.r_queue&&t.r_queue.queue.length0){let n=t.settings.qKey?s:1;n>t.queue.max-i&&(n=t.queue.max-i);let l=e.queue_size?e.queue_size:1;if(e.region&&(a=e.id.split("-")[0]),"merge_never"!==t.settings.q_merge)t.queue.queue.length>0&&t.queue.queue[t.queue.queue.length-1].id===e.id?t.queue.queue[t.queue.queue.length-1].q+=Math.min(o,l*n):t.queue.queue.push({id:e.id,action:a,type:r,label:"string"==typeof e.title?e.title:e.title(),cna:!1,time:0,q:Math.min(o,l*n),qs:l,t_max:0,bres:!1});else for(let s=0;s0;s++)t.queue.queue.push({id:e.id,action:a,type:r,label:"string"==typeof e.title?e.title:e.title(),cna:!1,time:0,q:Math.min(o,l),qs:l,t_max:0,bres:!1}),o-=l;c=!0}}break}t.race.inflation&&t.tech.primitive&&(e.hasOwnProperty("inflation")&&!e.inflation||t.race.inflation++),i=!0}if(i&&(bs(e,a,r),t.tech.queue&&e.queue_complete)){let a=e.queue_complete();for(let r=0,s=0;sa?(i.q=a,a=0):a-=i.q)}}c&&Wi();break}}}function bs(e,a,r){if(!js(e)){let t=e.id;$(`#${t}`).addClass("cna")}if(e.grant){let a=e.grant[0];(!t.tech[a]||t.tech[a]=4&&t.custom.planet&&e.custom&&e.custom.length>0&&0===Math.floor(g(0,10))){c=e.custom[Math.floor(g(0,e.custom.length))];let o=c.split(":");if(t.custom.planet[o[0]]&&t.custom.planet[o[0]][o[1]]){let e=Ac(t.custom.planet[o[0]][o[1]]);a=e.biome,r=e.traitlist,s=e.orbit,i=e.geology,r.sort()}else c=!1}if(!c){a=xs("biome",e),r=xs("trait",e,{biome:a}),r.sort();let c=Math.floor(g(0,3)),o=30;t.stats.achieve.whitehole&&(o+=5*t.stats.achieve.whitehole.l,c+=t.stats.achieve.whitehole.l),"eden"===a&&(o+=5);for(let e=0;e`),_=$(`${u}`);d.append(_),$("#evolution").append(d);let p=!1,h=0;return Ei(n,(function(e){p=e,$s(e,u,a,s,r,i,h)}),{classes:"has-background-light has-text-dark"}),$("#"+n).on("click",(function(){if(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=5&&t.race.hasOwnProperty("geck")&&t.race.geck>0){if(Object.keys(i).forEach((function(e){i[e]+=Math.floor(g(0,7))/100})),h>0){let t=8-h;t<1&&(t=1),0===Math.floor(g(0,t))&&(a=xs("biome",e))}if(0===Math.floor(g(0,2))){let t=xs("trait",e,{biome:a,cap:1});if(t.length>0){if(r.includes(t[0])){let e=r.indexOf(t[0]);r.splice(e,1)}else void 0!==t[0]&&r.push(t[0]);l="",r.forEach((function(e){Fi.hasOwnProperty(e)&&(l+=`${Fi[e].label} `)}))}}u=`${l}${Si[a].label} ${o}`,$(`#${n} .aTitle`).html(u),h++,t.race.geck--,t.race.hasOwnProperty("gecked")||(t.race.gecked=0),t.race.gecked++,sc(p.popper),$s(p,u,a,s,r,i,h)}else delete t.race.geck,t.race.gecked&&(t.stats.geck+=t.race.gecked),t.race.chose=n,t.city.biome=a,t.city.calendar.orbit=s,t.city.geology=i,t.city.ptrait=r,h>0&&(t.race.rejuvenated=!0),sc($("#evolution")),Ii(),as()})),c||("eden"===a?"hellscape":a)}function $s(e,t,a,r,s,i,c){e.popper.append($(`
    ${z("set_planet",[t,Si[a].label,r])}
    `)),e.popper.append($(`
    ${Si[a].desc}
    `)),s.length>0&&s.forEach((function(t){e.popper.append($(`
    ${Fi[t].desc}
    `))}));let o=qs(i);o.length>0&&e.popper.append($(`
    ${o}
    `)),c&&c>0&&e.popper.append($(`
    ${z("rejuvenated")}
    `))}function xs(e,a,r){if(r=r||{},"biome"===e){let e="grassland",r=!a.hell&&t.stats.portals>=1?7:6,s=0===Math.floor(g(0,3)),i=Xc();switch(Math.floor(g(0,r))){case 0:e=s&&t.stats.achieve.biome_grassland&&t.stats.achieve.biome_grassland[i]&&t.stats.achieve.biome_grassland[i]>0?"savanna":"grassland";break;case 1:e=s&&t.stats.achieve.biome_oceanic&&t.stats.achieve.biome_oceanic[i]&&t.stats.achieve.biome_oceanic[i]>0?"swamp":"oceanic";break;case 2:e=s&&t.stats.achieve.biome_forest&&t.stats.achieve.biome_forest[i]&&t.stats.achieve.biome_forest[i]>0?0===Math.floor(g(0,2))?"taiga":"swamp":"forest";break;case 3:e=s&&t.stats.achieve.biome_desert&&t.stats.achieve.biome_desert[i]&&t.stats.achieve.biome_desert[i]>0?"ashland":"desert";break;case 4:e=s&&t.stats.achieve.biome_volcanic&&t.stats.achieve.biome_volcanic[i]&&t.stats.achieve.biome_volcanic[i]>0?"ashland":"volcanic";break;case 5:e=s&&t.stats.achieve.biome_tundra&&t.stats.achieve.biome_tundra[i]&&t.stats.achieve.biome_tundra[i]>0?"taiga":"tundra";break;case 6:e="evil"===t.race.universe?"eden":"hellscape";break;default:e="grassland"}return e}if("trait"===e){let e=[],t=r.cap||2;for(let a=0;a0&&(s+=t.race.replicator.pow),!(t.city.hasOwnProperty("powered")&&s>=e.powered()&&(t[r[0]][r[1]].on++,t.race.hasOwnProperty("governor")&&t.race.governor.hasOwnProperty("tasks")&&t.race.hasOwnProperty("replicator")&&Object.values(t.race.governor.tasks).includes("replicate")&&t.race.governor.config.replicate.pow.on&&t.race.replicator.pow>0&&(t.city.power-=e.powered(),G.replicate.task()),a&&"function"==typeof a))||a(e)}return!1}function qs(e){let a="";if(Object.keys(e).length>0){let r="",s="",i=t.stats.achieve.miners_dream?t.stats.achieve.miners_dream.l>=4?2*t.stats.achieve.miners_dream.l-3:t.stats.achieve.miners_dream.l:0;t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=0&&i++;for(let t in e)if(0!==t)if(e[t]>0){let a=`
    ${z(`resource_${t}_name`)}`;i>0?(a+=`: +${Math.round(100*(e[t]+1)-100)}%`,i--):a+=`: ${z("bonus")}`,a+="
    ",r+=a}else if(e[t]<0){let a=`
    ${z(`resource_${t}_name`)}`;i>0?(a+=`: ${Math.round(100*(e[t]+1)-100)}%`,i--):a+=`: ${z("malus")}`,a+="
    ",s+=a}a=`
    ${r}${s}
    `}return a}function Ms(e,a,r,s,i,c,o){sc(e);var n="string"==typeof a.desc?a.desc:a.desc();o=o||!1;let l=!1;!(i&&c&&"ontouchstart"in document.documentElement&&navigator.userAgent.match(/Mobi/)&&t.settings.touch)||(l=$(`${a.hasOwnProperty("touchlabel")?a.touchlabel:z("construct")}`),e.append(l),$("#touchButton").on("touchstart",(function(){ys(a,i,c)}))),e.append($(`
    ${n}
    `));let u=a.id.split("-")[0];a.category&&"tech"===u&&!s&&e.append($(`
    ${z("tech_dist_category")}: ${z(`tech_dist_${a.category}`)}
    `));let d=ac(a,!1,!0);if(a.cost&&!s){let r=!0;var _=$('
    '),p="genes"!==u&&"blood"!==u?fc(a):a.cost;Object.keys(p).forEach((function(e){if("Custom"===e){let t=p[e]();_.append($(`
    ${t.label}
    `)),r=!1}else if("Structs"===e){let a=p[e]();Object.keys(a).forEach((function(e){Object.keys(a[e]).forEach((function(s){let i=a[e][s].hasOwnProperty("on")?a[e][s].on:a[e][s].count,c="has-text-dark",o="";t[e][s]?a[e][s].count>t[e][s].count?(c="has-text-danger",o=' (blocking resource)'):a[e][s].hasOwnProperty("on")&&a[e][s].on>t[e][s].on&&(c="has-text-alert"):(c="has-text-danger",o=' (blocking resource)');let n="";if(a[e][s].hasOwnProperty("s")){let t=a[e][s].s;n="string"==typeof Zr[e][t][s].title?Zr[e][t][s].title:Zr[e][t][s].title()}else n="string"==typeof Zr[e][s].title?Zr[e][s].title:Zr[e][s].title();r=!1,_.append($(`
    ${n}: ${i}${o}
    `))}))}))}else if(t.prestige.hasOwnProperty(e)){let a=p[e]();if(a>0){"Plasmid"===e&&"antimatter"===t.race.universe&&(e="AntiPlasmid");let s=z(`resource_${e}_name`),i="has-text-dark",c="";t.prestige[e].count(blocking resource)'),r=!1,_.append($(`
    ${s}: ${a}${c}
    `))}}else if("Supply"===e){let a=p[e]();if(a>0){let s=z(`resource_${e}_name`),i="has-text-dark",c="";t.portal.purifier.supply(blocking resource)'),r=!1,_.append($(`
    ${s}: ${a}${c}
    `))}}else if("Morale"!==e&&"Army"!==e&&"Bool"!==e){let a=p[e]();if(a>0){let s="",i="Species"===e?t.race.species:e;if("HellArmy"===e){let c=z("fortress_troops"),o="has-text-dark";t.portal.fortress.garrison-t.portal.fortress.patrols*t.portal.fortress.patrol_size(blocking resource)'):o="has-text-alert"),r=!1,_.append($(`
    ${c}: ${a}${s}
    `))}else{let s="Money"===i?"$":t.resource[i].name+": ";s=s.replace("_"," ");let c="has-text-dark",n="";t.resource[i].amount(blocking resource)'):c="has-text-alert",o&&o!==e&&d.r===i?(c+=" grad-from-left",n=' (first blocking resource)'):o&&o===e&&d.r!==i&&(c+=" grad-from-left-warn")):o&&o===e&&(c+=" grad-from-right",n=' (last blocking resource)');let l=q(a,1);r=!1,_.append($(`
    ${s}${l}${n}
    `))}}}})),r||e.append(_)}if(a.effect){var h="string"==typeof a.effect?a.effect:a.effect();h&&e.append($(`
    ${h}
    `))}if(a.flair){var m="string"==typeof a.flair?a.flair:a.flair();e.append($(`
    ${m}
    `)),e.addClass("flair")}if(a.reqs){let t=[];if(Object.keys(a.reqs).forEach((function(e){let r=$(`#${a.id}`).attr(`data-req-${e}`);r&&t.push("string"==typeof Zr.tech[r].title?Zr.tech[r].title:Zr.tech[r].title())})),t.length>0){let a=t.join(", ");e.append($(`
    ${z("requires_tech",[a])}
    `))}}if(!s&&"blood"!==a.id.substring(0,5)&&!js(a)&&js(a,!0)){if("string"==typeof r&&"notimer"===r)return;if(r&&r.time)e.append($('
    {{ time | timer }}
    ')),ic({el:"#popTimer",data:r,filters:{timer:e=>z("action_ready",[e])}});else{let t=cc(d.t);e.append($(`
    ${z("action_ready",[t])}
    `))}}("portal-spire"===a.id||"portal-waygate"===a.id&&t.tech.waygate>=2)&&r&&r.time&&(e.append($('
    {{ time | timer }}
    ')),ic({el:"#popTimer",data:r,filters:{timer:e=>z("floor_clearing",[!a.hasOwnProperty("mscan")||a.hasOwnProperty("mscan")&&a.mscan()>0?e:"???"])}}))}function Ps(e){sc($(`#${e}`),!0),Ii(e)}function Os(e,a,r){var s=e.id;t[a]&&t[a][r]&&t[a][r].count&&($(`#${s} .count`).html(t[a][r].count),t[a][r]&&t[a][r].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&&Ms($("#popper"),e,t[a][r],!1,a,r)}function Cs(e,a){return!!Ss(a=a||fc(e))&&(Object.keys(a).forEach((function(e){if(t.prestige.hasOwnProperty(e)){let r=a[e]();"Plasmid"===e&&"antimatter"===t.race.universe&&(e="AntiPlasmid"),t.prestige[e].count-=r}else if("Supply"===e){let r=a[e]();t.portal.purifier.supply-=r}else if("Morale"!==e&&"Army"!==e&&"HellArmy"!==e&&"Structs"!==e&&"Bool"!==e&&"Custom"!==e){let r=a[e](),s="Species"===e?t.race.species:e;t.resource[s].amount-=r,"Knowledge"===s&&(t.stats.know+=r)}})),!0)}function js(e,a,r){if(e.cost){let c=r?e.cost:fc(e);return a?(s=c,i=!0,Object.keys(s).forEach((function(e){if("Custom"===e);else if("Structs"===e){if(!Fs(s[e]()))return void(i=!1)}else if(t.prestige.hasOwnProperty(e)){let a=e;if("Plasmid"===e&&"antimatter"===t.race.universe&&(e="AntiPlasmid"),t.prestige[e].count0||t.resource[r].max>=0&&a>Number(t.resource[r].max)&&-1!==Number(t.resource[r].max))return void(i=!1)}})),i):Ss(c)}var s,i;return!0}function Ss(e){var a=!0;return Object.keys(e).forEach((function(r){if("Custom"===r){if(!e[r]().met)return void(a=!1)}else if("Structs"===r){if(!Fs(e[r]()))return void(a=!1)}else if(t.prestige.hasOwnProperty(r)){let s=r;if("Plasmid"===r&&"antimatter"===t.race.universe&&(r="AntiPlasmid"),t.prestige[r].count=0&&s>t.resource[i].max;if(s>Number(t.resource[i].amount)+t.resource[i].diff||c)return void(a=!1)}})),a}function Fs(e){let a=!0;return Object.keys(e).forEach((function(r){t.hasOwnProperty(r)?Object.keys(e[r]).forEach((function(s){t[r].hasOwnProperty(s)?(t[r][s].count${r}

    `));var s=$('
    ');switch($("#modalBox").append(s),a){case"smelter":case"hell_smelter":case"stellar_forge":case"hell_forge":case"geothermal":case"ore_refinery":Ws("smelter",s);break;case"factory":case"red_factory":case"int_factory":case"tau_factory":Ws("factory",s);break;case"star_dock":!function(e){if(t.tech.genesis<4){let t=$(`
    ${z("stardock_warn")}
    `);return void e.append(t)}let a=$('
    ');e.append(a),vs(Zr.starDock.probes,"starDock","probes"),t.tech.geck&&t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=5&&vs(Zr.starDock.geck,"starDock","geck"),t.tech.genesis>=5&&vs(Zr.starDock.seeder,"starDock","seeder"),6===t.tech.genesis&&vs(Zr.starDock.prep_ship,"starDock","prep_ship"),t.tech.genesis>=7&&vs(Zr.starDock.launch_ship,"starDock","launch_ship")}(s);break;case"mining_droid":Ws("droid",s);break;case"g_factory":case"refueling_station":Ws("graphene",s);break;case"freighter":case"super_freighter":pr(s);break;case"pylon":Ws("pylon",s);break;case"rock_quarry":Ws("rock_quarry",s);break;case"titan_mine":Ws("titan_mine",s);break;case"mining_ship":Ws("mining_ship",s);break;case"alien_space_station":Ws("alien_space_station",s);break;case"nanite_factory":Ws("nanite_factory",s);break;case"alien_outpost":Ws("replicator",s)}}function Ts(){sc($("#evolution .evolving"),!0);let e=$(`
    ${t.evolution.final}%
    `);$("#evolution").append(e)}function Es(){return"magic"===t.race.universe?z("city_wizard_tower_title"):t.race.evil?z("city_babel_title"):z("city_wardenclyffe")}function Is(){switch(t.race.species){case"orc":return z("city_basic_housing_orc_title");case"wolven":return z("city_basic_housing_wolven_title");case"sporgar":return z("city_basic_housing_sporgar_title");case"dracnid":case"balorg":return z("city_basic_housing_title7");case"imp":return z("city_basic_housing_title8");case"seraph":return z("city_basic_housing_seraph_title");case"unicorn":return z("city_basic_housing_unicorn_title")}switch(_i[t.race.species].type){case"avian":return z("city_basic_housing_nest_title");case"plant":return z("city_basic_housing_entish_title");case"sand":return z("city_basic_housing_sand_title");case"polar":return z("city_basic_housing_polar_title");case"eldritch":return z("city_basic_housing_eldritch_title")}return t.city.ptrait.includes("trashed")?z("city_basic_housing_trash_title"):z("city_basic_housing_title")}function Ks(e,a){switch(e){case"small":return Is();case"medium":return function(){switch(t.race.species){case"sporgar":return z("city_cottage_title2");case"balorg":return z("city_cottage_title3");case"imp":return z("city_basic_housing_title7");case"seraph":return z("city_cottage_title4");case"unicorn":return z("city_cottage_title5");case"dracnid":return z("city_cottage_title7")}switch(_i[t.race.species].type){case"avian":return z("city_cottage_title6");case"eldritch":return z("city_cottage_title8")}return z("city_cottage_title1")}();case"large":return function(e){if(!e&&D("extravagant",0))return z("city_mansion");if("sporgar"===t.race.species)return z("city_apartment_title2");switch(_i[t.race.species].type){case"avian":return z("city_apartment_title5");case"sand":return z("city_apartment_title6");case"demonic":return z("city_apartment_title3");case"angelic":return z("city_apartment_title4");case"giant":return z("city_apartment_title7");case"eldritch":return z("city_apartment_title8")}return z("city_apartment_title1")}(a)}}function Ls(e,a){if(t.tech.queue&&t.queue.display){let e=["space","interstellar","galaxy","portal","tauceti"];for(let r=0;r-1)if(e.includes(s.action)){let e=!0;Object.keys(Zr[s.action]).forEach((function(a){Zr[s.action][a][s.type]&&e&&(t.queue.queue[r].label="string"==typeof Zr[s.action][a][s.type].title?Zr[s.action][a][s.type].title:Zr[s.action][a][s.type].title(),e=!1)}))}else Zr[s.action][s.type]&&(t.queue.queue[r].label="string"==typeof Zr[s.action][s.type].title?Zr[s.action][s.type].title:Zr[s.action][s.type].title())}}if(e&&t.tech.r_queue&&t.r_queue.display)for(let e=0;e=4&&Pi(e)})),Object.keys(_i[t.race.species].traits).forEach((function(e){Pi(e,{set:_i[t.race.species].traits[e]})})),t.race.imitation&&t.race.srace&&qi(!1),Object.keys(t.tech).forEach((function(e){"evo_"===e.substring(0,4)&&delete t.tech[e]})),delete t.tech.evo,t.evolution={};const i=new Date;!t.settings.boring&&11===i.getMonth()&&i.getDate()>=17&&("elven"===t.race.species?(Pi("slaver",{set:2}),Pi("resourceful",{set:.5}),Pi("small",{set:.25})):"capybara"===t.race.species?(Pi("beast_of_burden",{set:1}),Pi("pack_rat",{set:.5}),Pi("musical",{set:.25})):"centaur"===t.race.species?(Pi("beast_of_burden",{set:1}),Pi("curious",{set:.5}),Pi("blissful",{set:.25})):"wendigo"===t.race.species?(Pi("immoral",{set:3}),Pi("cannibalize",{set:.5}),Pi("claws",{set:.25})):"yeti"===t.race.species?(Pi("scavenger",{set:3}),Pi("regenerative",{set:.5}),Pi("musical",{set:.25})):"entish"===t.race.species&&(Pi("photosynth",{set:3}),Pi("optimistic",{set:.5}),Pi("armored",{set:.25})));const c=Ec("easter");if("wolven"===t.race.species&&c.active?(Pi("hyper",{set:1}),Pi("fast_growth",{set:1}),Pi("rainbow",{set:1}),Pi("optimistic",{set:1})):"vulpine"===t.race.species&&c.active&&(Pi("cannibalize",{set:2}),Pi("rage",{set:1}),Pi("blood_thirst",{set:1}),Pi("sticky",{set:1})),t.race.no_crispr||t.race.badgenes){let e=t.race.badgenes?3:1;for(let a=0;a=2)for(let e=1;e<8;e++)t.genes.evolve>=e+1&&mi(e);let l=Yi();t.civic.foreign.gov0.name={s0:l.s0,s1:l.s1};let u=Yi();for(;l.s0===u.s0&&l.s1===u.s1;)u=Yi();t.civic.foreign.gov1.name={s0:u.s0,s1:u.s1};let d=Yi();for(;l.s0===d.s0&&l.s1===d.s1||u.s0===d.s0&&u.s1===d.s1;)d=Yi();if(t.civic.foreign.gov2.name={s0:d.s0,s1:d.s1},t.race.truepath||t.race.lone_survivor){t.civic.foreign.gov0.mil=Math.round(1.5*t.civic.foreign.gov0.mil),t.civic.foreign.gov1.mil=Math.round(1.4*t.civic.foreign.gov1.mil),t.civic.foreign.gov2.mil=Math.round(1.25*t.civic.foreign.gov2.mil),t.civic.foreign.gov3={unrest:0,hstl:Math.floor(g(20,40)),mil:Math.floor(g(650,750)),eco:Math.floor(g(250,300)),spy:0,esp:0,trn:0,sab:0,act:"none"};let e=Yi(!0);t.civic.foreign.gov3.name={s0:e.s0,s1:e.s1},t.civic.foreign.gov4={unrest:0,hstl:100,mil:300,eco:100,spy:0,esp:0,trn:0,sab:0,act:"none"};let a=Yi(!0);for(;a.s1===e.s1;)a=Yi(!0);t.civic.foreign.gov4.name={s0:99,s1:a.s1}}if(t.race.cataclysm?Bi(z("cataclysm_sentience",[_i[t.race.species].home,Tc("name")]),"info",!1,["progress"]):Bi(z("sentience",[z("genelab_genus_"+_i[t.race.species].type),_i[t.race.species].entity,Tc("name")]),"info",!1,["progress"]),t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=1&&(t.resource.Steel.display=!0,t.resource.Steel.amount=25,t.stats.achieve.technophobe.l>=3)){t.race.truepath||(t.resource.Soul_Gem.display=!0);let e=1;for(let a=1;a=5&&e++;t.resource.Soul_Gem.amount=e}if("tortoisan"===t.race.species){let e=Math.floor(g(100));t.race.shell_color=99===e?"rainbow":e>=97&&e<=98?"white":e>=93&&e<=96?"red":e>=89&&e<=92?"orange":e>=85&&e<=88?"yellow":e>=75&&e<=84?"purple":e>=65&&e<=74?"blue":"green"}if("vulpine"===t.race.species){let e=Math.floor(g(100));t.race.fox_color=e>=85?"white":e>=70&&e<=84?"tan":e>=55&&e<=69?"silver":e>=35&&e<=54?"grey":"red"}if(pc(!0),t.blood.aware&&(t.settings.arpa.blood=!0,t.tech.b_stone=2),na(!0),X(),J(!0),t.race.shapeshifter&&Mi(!1,!0),t.race.carnivore||t.race.soul_eater||t.race.unfathomable?(t.civic.d_job="hunter",t.civic.hunter.display=!0):t.race.forager?(t.civic.d_job="forager",t.civic.forager.display=!0):(t.civic.d_job="unemployed",t.civic.unemployed.display=!0),t.race.hooved&&(t.resource.Horseshoe.display=!0,t.resource.Horseshoe.amount=5,t.race.shoecnt=5),t.race.deconstructor&&(t.resource.Nanite.display=!0,t.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},t.settings.showIndustry=!0),uc(!0),(t.race.truepath||t.race.lone_survivor)&&Object.keys(Za).forEach((function(e){t.resource.hasOwnProperty(e)&&(t.resource[e].value=2*Za[e])})),li(t.race.species,!0),Vi("sentience",{species:t.race.species,challenge:so()-1}),t.stats.feat.adept&&t.stats.achieve.whitehole&&t.stats.achieve.whitehole.l>0){let e=Math.min(t.stats.achieve.whitehole.l,t.stats.feat.adept);t.resource.Food.amount+=100*e,t.resource.Stone.max+=60*e,t.resource.Stone.amount+=100*e,t.race.smoldering?(t.resource.Chrysotile.max+=60*e,t.resource.Chrysotile.amount+=100*e):(t.resource.Lumber.max+=60*e,t.resource.Lumber.amount+=100*e)}t.race.cataclysm?t.race.cataclysm&&(t.tech.unify=2,t.tech.spy=5,t.tech.primitive=3,t.tech.currency=6,t.tech.govern=3,t.tech.boot_camp=1,t.tech.medic=1,t.tech.military=5,t.tech.marines=1,t.tech.explosives=3,t.tech.trade=3,t.tech.wharf=1,t.tech.banking=6,t.tech.gambling=1,t.tech.home_safe=1,t.tech.housing=3,t.tech.smelting=3,t.tech.copper=1,t.tech.storage=5,t.tech.container=4,t.tech.steel_container=3,t.tech.mining=4,t.tech.oil=7,t.tech.mass=1,t.tech.alumina=1,t.tech.titanium=2,t.tech.polymer=2,t.tech.uranium=4,t.tech.foundry=7,t.tech.factory=1,t.tech.theatre=3,t.tech.broadcast=2,t.tech.mine_conveyor=1,t.tech.science=9,t.tech.high_tech=7,t.tech.genetics=1,t.tech.theology=2,t.tech.space=6,t.tech.solar=3,t.tech.luna=2,t.tech.hell=1,t.tech.mars=5,t.tech.gas_giant=1,t.tech.gas_moon=2,t.tech.asteroid=3,t.tech.satellite=1,t.tech.space_explore=4,t.tech.genesis=2,t.settings.showSpace=!0,t.settings.space.home=!0,t.settings.space.moon=!0,t.settings.space.red=!0,t.settings.space.hell=!0,t.settings.space.sun=!0,t.settings.space.gas=!0,t.settings.space.gas_moon=!0,t.settings.space.belt=!0,t.settings.space.dwarf=!0,t.settings.showCity=!1,t.settings.showIndustry=!0,t.settings.showPowerGrid=!0,t.settings.showResearch=!0,t.settings.showCivic=!0,t.settings.showMil=!0,t.settings.showResources=!0,t.settings.showMarket=!0,t.settings.showStorage=!0,t.settings.civTabs=1,t.settings.spaceTabs=1,t.settings.showGenetics=!0,t.settings.arpa.physics=!0,t.resource[t.race.species].display=!0,t.resource.Knowledge.display=!0,t.resource.Money.display=!0,t.resource.Food.display=!0,t.resource.Stone.display=!0,t.resource.Furs.display=!0,t.resource.Copper.display=!0,t.resource.Iron.display=!0,t.resource.Aluminium.display=!0,t.resource.Cement.display=!0,t.resource.Coal.display=!0,t.resource.Oil.display=!0,t.resource.Uranium.display=!0,t.resource.Steel.display=!0,t.resource.Titanium.display=!0,t.resource.Alloy.display=!0,t.resource.Polymer.display=!0,t.resource.Iridium.display=!0,t.resource.Helium_3.display=!0,t.resource.Brick.display=!0,t.resource.Wrought_Iron.display=!0,t.resource.Sheet_Metal.display=!0,t.resource.Mythril.display=!0,t.resource.Crates.display=!0,t.resource.Containers.display=!0,t.race.kindling_kindred||t.race.smoldering||(t.resource.Lumber.display=!0,t.resource.Plywood.display=!0,t.resource.Lumber.max=9e4,t.resource.Lumber.amount=9e4,t.resource.Plywood.amount=5e4),t.race.smoldering&&(t.resource.Chrysotile.display=!0,t.resource.Chrysotile.max=9e4,t.resource.Chrysotile.amount=9e4),t.resource[t.race.species].max=8,t.resource[t.race.species].amount=8,t.resource.Crates.amount=20,t.resource.Containers.amount=20,t.resource.Money.max=225e3,t.resource.Money.amount=225e3,t.resource.Food.max=1e3,t.resource.Food.amount=1e3,t.resource.Oil.max=1e3,t.resource.Oil.amount=1e3,t.resource.Helium_3.max=1e3,t.resource.Helium_3.amount=1e3,t.resource.Uranium.max=1e3,t.resource.Uranium.amount=1e3,t.resource.Stone.max=9e4,t.resource.Stone.amount=9e4,t.resource.Furs.max=4e4,t.resource.Furs.amount=4e4,t.resource.Copper.max=75e3,t.resource.Copper.amount=75e3,t.resource.Iron.max=75e3,t.resource.Iron.amount=75e3,t.resource.Steel.max=75e3,t.resource.Steel.amount=75e3,t.resource.Aluminium.max=75e3,t.resource.Aluminium.amount=75e3,t.resource.Cement.max=75e3,t.resource.Cement.amount=75e3,t.resource.Titanium.max=75e3,t.resource.Titanium.amount=75e3,t.resource.Coal.max=1e4,t.resource.Coal.amount=1e4,t.resource.Alloy.max=2e4,t.resource.Alloy.amount=2e4,t.resource.Polymer.max=2e4,t.resource.Polymer.amount=2e4,t.resource.Iridium.max=1e3,t.resource.Iridium.amount=1e3,t.resource.Brick.amount=5e4,t.resource.Wrought_Iron.amount=5e4,t.resource.Sheet_Metal.amount=5e4,t.resource.Mythril.amount=8e3,t.resource.Iridium.crates=5,t.resource.Iridium.containers=5,t.civic.taxes.display=!0,t.civic.professor.display=!0,t.civic.scientist.display=!0,t.civic.colonist.display=!0,t.civic.space_miner.display=!0,t.race.flier||(t.tech.cement=5,t.civic.cement_worker.display=!0,t.civic.cement_worker.max=1,t.civic.cement_worker.workers=1),t.civic.colonist.max=4,t.civic.colonist.workers=4,t.civic.space_miner.max=3,t.civic.space_miner.workers=2,t.civic.professor.max=1,t.civic.professor.workers=1,t.city.calendar.day++,t.city.market.active=!0,t.city.power=0,t.city.powered=!0,t.race.artifical&&(t.city.transmitter={count:0,on:0}),t.city.factory={count:0,on:0,Lux:0,Furs:0,Alloy:0,Polymer:1,Nano:0,Stanene:0},t.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},t.city.smelter={count:0,cap:2,Wood:0,Coal:0,Oil:2,Star:0,StarCap:0,Inferno:0,Iron:1,Steel:1,Iridium:0},t.city.fission_power={count:0,on:0},t.city.oil_power={count:0,on:0},t.city.coal_power={count:0,on:0},t.city.mass_driver={count:0,on:0},t.city.mine={count:0,on:0},t.city.coal_mine={count:0,on:0},t.city.oil_well={count:0},t.city.oil_depot={count:0},t.city.garrison={count:0,on:0},t.city.basic_housing={count:0},t.city.cottage={count:0},t.city.apartment={count:0,on:0},t.city.amphitheatre={count:0},t.city.casino={count:0,on:0},t.city.rock_quarry={count:0,on:0,asbestos:50},t.city.metal_refinery={count:0,on:0},t.city.storage_yard={count:0},t.city.warehouse={count:0},t.city.trade={count:0},t.city.wharf={count:0},t.city.bank={count:0},t.city.tourist_center={count:0,on:0},t.city.university={count:0},t.city.library={count:0},t.city.wardenclyffe={count:0,on:0},t.city.biolab={count:0,on:0},t.city.lumber_yard={count:0},t.city.sawmill={count:0,on:0},t.city.temple={count:0},t.space.satellite={count:1},t.space.propellant_depot={count:1},t.space.gps={count:4},t.space.nav_beacon={count:1,on:1},t.space.moon_base={count:1,on:1,support:3,s_max:3},t.space.iridium_mine={count:1,on:1},t.space.helium_mine={count:1,on:1},t.space.observatory={count:1,on:1},t.space.spaceport={count:2,on:2,support:8,s_max:10},t.space.red_tower={count:1,on:1},t.space.living_quarters={count:4,on:4},t.space.vr_center={count:0,on:0},t.space.garage={count:1},t.space.red_mine={count:1,on:1},t.space.fabrication={count:1,on:1},t.space.red_factory={count:1,on:1},t.space.exotic_lab={count:1,on:1},t.space.ziggurat={count:0},t.space.space_barracks={count:1,on:1},t.space.biodome={count:2,on:2},t.space.laboratory={count:0,on:0},t.space.geothermal={count:2,on:2},t.space.spc_casino={count:0,on:0},t.space.swarm_plant={count:0},t.space.swarm_control={count:5,support:40,s_max:50},t.space.swarm_satellite={count:40},t.space.gas_mining={count:2,on:2},t.space.gas_storage={count:1},t.space.outpost={count:0,on:0},t.space.drone={count:0},t.space.oil_extractor={count:2,on:2},t.space.space_station={count:1,on:1,support:0,s_max:3},t.space.iridium_ship={count:1,on:1},t.space.elerium_ship={count:0,on:0},t.space.elerium_prospector={count:0,on:0},t.space.iron_ship={count:1,on:1},t.space.elerium_contain={count:0,on:0},t.civic.garrison={display:!0,disabled:!1,progress:0,tactic:0,workers:2,wounded:0,raid:0,max:2},ms(),gs(),Ht(),Ce("Physics"),ma()):t.race.lone_survivor?t.race.lone_survivor&&(t.tech.alloy=1,t.tech.alumina=2,t.tech.asteroid=7,t.tech.banking=11,t.tech.biotech=1,t.tech.boot_camp=2,t.tech.broadcast=2,t.tech.container=7,t.tech.copper=1,t.tech.currency=6,t.tech.disease=2,t.tech.drone=1,t.tech.elerium=2,t.tech.explosives=3,t.tech.factory=3,t.tech.foundry=8,t.tech.gambling=4,t.tech.gas_giant=1,t.tech.gas_moon=2,t.tech.genesis=2,t.tech.genetics=2,t.tech.gov_corp=1,t.tech.gov_fed=1,t.tech.gov_soc=1,t.tech.gov_theo=1,t.tech.govern=3,t.tech.graphene=1,t.tech.helium=1,t.tech.hell=1,t.tech.high_tech=13,t.tech.home_safe=2,t.tech.housing=3,t.tech.housing_reduction=3,t.tech.kuiper=2,t.tech.launch_facility=1,t.tech.luna=2,t.tech.m_smelting=2,t.tech.marines=2,t.tech.mars=5,t.tech.mass=1,t.tech.medic=3,t.tech.military=8,t.tech.mine_conveyor=1,t.tech.mining=4,t.tech.monument=1,t.tech.nano=1,t.tech.oil=7,t.tech.outer=8,t.tech.pickaxe=5,t.tech.polymer=2,t.tech.primitive=3,t.tech.q_factory=1,t.tech.quantium=1,t.tech.queue=3,t.tech.r_queue=1,t.tech.reproduction=1,t.tech.rival=1,t.tech.satellite=1,t.tech.science=9,t.tech.shelving=3,t.tech.shipyard=1,t.tech.smelting=6,t.tech.solar=5,t.tech.space=6,t.tech.space_explore=4,t.tech.space_housing=1,t.tech.spy=5,t.tech.stanene=1,t.tech.steel_container=6,t.tech.storage=5,t.tech.swarm=6,t.tech.syard_armor=3,t.tech.syard_class=6,t.tech.syard_engine=5,t.tech.syard_power=5,t.tech.syard_sensor=4,t.tech.syard_weapon=6,t.tech.syndicate=0,t.tech.synthetic_fur=1,t.tech.tau_home=6,t.tech.tauceti=4,t.tech.theatre=3,t.tech.theology=2,t.tech.titan=9,t.tech.titan_ai_core=3,t.tech.titan_power=1,t.tech.titanium=3,t.tech.trade=3,t.tech.unify=2,t.tech.uranium=4,t.tech.v_train=1,t.tech.vault=4,t.tech.wharf=1,t.tech.world_control=1,t.tech.wsc=0,t.race.flier||(t.tech.cement=5,t.resource.Cement.display=!0),"magic"===t.race.universe&&(t.tech.gov_mage=1,t.tech.magic=4,t.tech.conjuring=2,t.resource.Mana.display=!0,t.resource.Crystal.display=!0,t.civic.crystal_miner.display=!0,t.tauceti.pylon={count:0},t.race.casting={farmer:0,miner:0,lumberjack:0,science:0,factory:0,army:0,hunting:0,crafting:0,total:0,crafting:0}),t.settings.showSpace=!1,t.settings.showTau=!0,t.settings.tau.home=!0,t.settings.showCity=!1,t.settings.showIndustry=!0,t.settings.showPowerGrid=!0,t.settings.showResearch=!0,t.settings.showCivic=!0,t.settings.showMil=!0,t.settings.showResources=!0,t.settings.showMarket=!0,t.settings.showStorage=!0,t.settings.civTabs=1,t.settings.spaceTabs=6,t.settings.showGenetics=!0,t.settings.arpa.physics=!0,t.settings.arpa.genetics=!0,t.resource[t.race.species].display=!0,t.resource.Knowledge.display=!0,t.resource.Money.display=!0,t.resource.Crates.display=!0,t.resource.Containers.display=!0,t.resource.Food.display=!0,t.resource.Stone.display=!0,t.resource.Furs.display=!0,t.resource.Copper.display=!0,t.resource.Iron.display=!0,t.resource.Aluminium.display=!0,t.resource.Coal.display=!0,t.resource.Oil.display=!0,t.resource.Uranium.display=!0,t.resource.Steel.display=!0,t.resource.Titanium.display=!0,t.resource.Alloy.display=!0,t.resource.Polymer.display=!0,t.resource.Iridium.display=!0,t.resource.Helium_3.display=!0,t.resource.Water.display=!0,t.resource.Neutronium.display=!0,t.resource.Adamantite.display=!0,t.resource.Elerium.display=!0,t.resource.Nano_Tube.display=!0,t.resource.Graphene.display=!0,t.resource.Stanene.display=!0,t.resource.Orichalcum.display=!0,t.resource.Bolognium.display=!0,t.resource.Unobtainium.display=!0,t.resource.Brick.display=!0,t.resource.Wrought_Iron.display=!0,t.resource.Sheet_Metal.display=!0,t.resource.Mythril.display=!0,t.resource.Quantium.display=!0,t.resource.Cipher.display=!0,t.race.kindling_kindred||t.race.smoldering||(t.civic.lumberjack.display=!0,t.resource.Lumber.display=!0,t.resource.Plywood.display=!0,t.resource.Lumber.max=1e7,t.resource.Lumber.amount=1e7,t.resource.Plywood.amount=25e5,t.resource.Lumber.crates=25,t.resource.Lumber.containers=25,t.tech.axe=5),t.race.smoldering&&(t.resource.Chrysotile.display=!0,t.resource.Chrysotile.max=5e6,t.resource.Chrysotile.amount=5e6),t.race.sappy||(t.tech.hammer=4),t.race.apex_predator||(t.tech.armor=3),t.resource[t.race.species].max=1,t.resource[t.race.species].amount=1,t.resource.Crates.amount=1e3,t.resource.Containers.amount=1e3,t.resource.Money.max=1e9,t.resource.Money.amount=1e9,t.resource.Knowledge.max=8e6,t.resource.Knowledge.amount=8e6,t.resource.Food.max=1e4,t.resource.Food.amount=1e4,t.resource.Oil.max=5e5,t.resource.Oil.amount=5e5,t.resource.Helium_3.max=5e5,t.resource.Helium_3.amount=5e5,t.resource.Water.max=25e3,t.resource.Water.amount=25e3,t.resource.Uranium.max=5e5,t.resource.Uranium.amount=5e5,t.resource.Stone.max=1e7,t.resource.Stone.amount=1e7,t.resource.Furs.max=5e6,t.resource.Furs.amount=5e6,t.resource.Copper.max=5e6,t.resource.Copper.amount=5e6,t.resource.Iron.max=5e6,t.resource.Iron.amount=5e6,t.resource.Steel.max=5e6,t.resource.Steel.amount=5e6,t.resource.Aluminium.max=5e6,t.resource.Aluminium.amount=5e6,t.resource.Cement.max=5e6,t.resource.Cement.amount=5e6,t.resource.Titanium.max=5e6,t.resource.Titanium.amount=5e6,t.resource.Coal.max=5e6,t.resource.Coal.amount=5e6,t.resource.Alloy.max=5e6,t.resource.Alloy.amount=5e6,t.resource.Polymer.max=5e6,t.resource.Polymer.amount=5e6,t.resource.Iridium.max=5e6,t.resource.Iridium.amount=5e6,t.resource.Neutronium.max=5e5,t.resource.Neutronium.amount=5e5,t.resource.Adamantite.max=5e6,t.resource.Adamantite.amount=5e6,t.resource.Elerium.max=1e3,t.resource.Elerium.amount=1e3,t.resource.Nano_Tube.max=5e6,t.resource.Nano_Tube.amount=5e6,t.resource.Graphene.max=5e6,t.resource.Graphene.amount=5e6,t.resource.Stanene.max=5e6,t.resource.Stanene.amount=5e6,t.resource.Bolognium.max=5e6,t.resource.Bolognium.amount=5e6,t.resource.Orichalcum.max=5e6,t.resource.Orichalcum.amount=5e6,t.resource.Brick.amount=25e5,t.resource.Wrought_Iron.amount=25e5,t.resource.Sheet_Metal.amount=25e5,t.resource.Mythril.amount=25e5,t.resource.Quantium.amount=25e5,t.race.artifical||(t.resource.Food.crates=10,t.resource.Food.containers=10),t.resource.Stone.crates=25,t.resource.Stone.containers=25,t.resource.Furs.crates=25,t.resource.Furs.containers=25,t.resource.Coal.crates=10,t.resource.Coal.containers=10,t.resource.Copper.crates=25,t.resource.Copper.containers=25,t.resource.Iron.crates=25,t.resource.Iron.containers=25,t.resource.Aluminium.crates=25,t.resource.Aluminium.containers=25,t.resource.Steel.crates=25,t.resource.Steel.containers=25,t.resource.Titanium.crates=25,t.resource.Titanium.containers=25,t.resource.Alloy.crates=25,t.resource.Alloy.containers=25,t.resource.Polymer.crates=25,t.resource.Polymer.containers=25,t.resource.Iridium.crates=25,t.resource.Iridium.containers=25,t.resource.Adamantite.crates=25,t.resource.Adamantite.containers=25,t.resource.Graphene.crates=25,t.resource.Graphene.containers=25,t.resource.Stanene.crates=25,t.resource.Stanene.containers=25,t.resource.Bolognium.crates=25,t.resource.Bolognium.containers=25,t.resource.Orichalcum.crates=25,t.resource.Orichalcum.containers=25,t.civic.taxes.display=!0,t.race.flier||(t.civic.cement_worker.display=!0,t.resource.Cement.crates=25,t.resource.Cement.containers=25),t.race.sappy||(t.civic.quarry_worker.display=!0),t.civic.professor.display=!0,t.civic.scientist.display=!0,t.civic.banker.display=!0,t.civic.pit_miner.display=!0,t.civic.professor.max=1,t.civic.professor.workers=1,t.city.calendar.day++,t.city.market.active=!0,t.city.power=0,t.city.powered=!0,t.race.artifical&&(t.city.transmitter={count:0,on:0}),t.city.factory={count:0,on:0,Lux:0,Furs:0,Alloy:0,Polymer:1,Nano:0,Stanene:0},t.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},t.city.smelter={count:0,cap:2,Wood:0,Coal:0,Oil:2,Star:0,StarCap:0,Inferno:0,Iron:1,Steel:1,Iridium:0},t.city.amphitheatre={count:0},t.city.apartment={count:0,on:0},t.city.bank={count:0},t.city.basic_housing={count:0},t.city.biolab={count:0,on:0},t.city.boot_camp={count:0},t.city.casino={count:0,on:0},t.city.cement_plant={count:0,on:0},t.city.coal_mine={count:0,on:0},t.city.coal_power={count:0,on:0},t.city.cottage={count:0},t.city.fission_power={count:0,on:0},t.city.garrison={count:0,on:0},t.city.hospital={count:0},t.city.library={count:0},t.city.lumber_yard={count:0},t.city.mass_driver={count:0,on:0},t.city.metal_refinery={count:0,on:0},t.city.mine={count:0,on:0},t.city.oil_depot={count:0},t.city.oil_power={count:0,on:0},t.city.oil_well={count:0},t.city.rock_quarry={count:0,on:0,asbestos:50},t.city.sawmill={count:0,on:0},t.city.shed={count:0,on:0},t.city.storage_yard={count:0},t.city.temple={count:0},t.city.tourist_center={count:0,on:0},t.city.trade={count:0},t.city.university={count:0},t.city.wardenclyffe={count:0,on:0},t.city.warehouse={count:0},t.city.wharf={count:0},t.space.ai_colonist={count:0,on:0},t.space.ai_core={count:100},t.space.ai_core2={count:0,on:0},t.space.biodome={count:0,on:0},t.space.crashed_ship={count:100},t.space.decoder={count:0,on:0},t.space.digsite={count:0},t.space.drone={count:0},t.space.drone_control={count:0,on:0},t.space.e_reactor={count:0,on:0},t.space.electrolysis={count:0,on:0,support:0,s_max:0},t.space.elerium_contain={count:0,on:0},t.space.elerium_mine={count:0,on:0},t.space.elerium_ship={count:0,on:0},t.space.exotic_lab={count:0,on:0},t.space.fabrication={count:0,on:0},t.space.fob={count:0,on:0,troops:0,enemy:0},t.space.g_factory={count:0,on:0,Lumber:0,Coal:0,Oil:0},t.space.garage={count:0},t.space.gas_mining={count:0,on:0},t.space.gas_storage={count:0},t.space.geothermal={count:0,on:0},t.space.gps={count:0},t.space.helium_mine={count:0,on:0},t.space.hell_smelter={count:0,on:0},t.space.hydrogen_plant={count:0,on:0},t.space.iridium_mine={count:0,on:0},t.space.iridium_ship={count:0,on:0},t.space.iron_ship={count:0,on:0},t.space.lander={count:0,on:0},t.space.living_quarters={count:0,on:0},t.space.m_relay={count:0,on:0},t.space.mass_relay={count:100},t.space.moon_base={count:0,on:0,support:0,s_max:0},t.space.munitions_depot={count:0},t.space.nav_beacon={count:0,on:0},t.space.neutronium_mine={count:0,on:0},t.space.observatory={count:0,on:0},t.space.oil_extractor={count:0,on:0},t.space.operating_base={count:0,on:0},t.space.orichalcum_mine={count:0,on:0},t.space.outpost={count:0,on:0},t.space.propellant_depot={count:0},t.space.red_factory={count:0,on:0},t.space.red_mine={count:0,on:0},t.space.red_tower={count:0,on:0},t.space.satellite={count:0},t.space.shipyard={count:0,on:0,ships:[],expand:!1,sort:!0},t.space.shock_trooper={count:0,on:0},t.space.space_barracks={count:0,on:0},t.space.space_station={count:0,on:0,support:0,s_max:0},t.space.spaceport={count:0,on:0,support:0,s_max:0},t.space.spc_casino={count:0,on:0},t.space.storehouse={count:0},t.space.swarm_control={count:0,support:0,s_max:0},t.space.swarm_plant={count:0},t.space.swarm_satellite={count:0},t.space.tank={count:0,on:0},t.space.titan_bank={count:0},t.space.titan_mine={count:0,on:0},t.space.titan_quarters={count:0,on:0},t.space.titan_spaceport={count:0,on:0,support:0,s_max:0},t.space.uranium_mine={count:0,on:0},t.space.vr_center={count:0,on:0},t.space.water_freighter={count:0,on:0},t.space.zero_g_lab={count:0,on:0},t.space.ziggurat={count:0},t.tauceti.alien_outpost={count:1,on:1},t.tauceti.colony={count:1,on:1},t.tauceti.fusion_generator={count:1,on:1},t.tauceti.infectious_disease_lab={count:0,on:0,cure:0},t.tauceti.mining_pit={count:1,on:1},t.tauceti.orbital_platform={count:0,on:0,support:0,s_max:0},t.tauceti.orbital_station={count:1,on:1,support:0,s_max:0},t.tauceti.refueling_station={count:0,on:0},t.tauceti.repository={count:2},t.tauceti.tauceti_casino={count:0,on:0},t.civic.garrison={display:!0,disabled:!1,progress:0,tactic:0,workers:2,wounded:0,raid:0,max:2},t.arpa.sequence={max:5e4,progress:0,time:5e4,on:!0,boost:!1,auto:!1,labs:0},t.tech.stock_exchange=0,t.tech.monuments=0,t.tech.supercollider=0,t.tech.tp_depot=0,t.tech.railway=0,t.tech.isolation=1,t.race.truepath=1,t.arpa.m_type=Ce("Monument"),gs(),at(),Ce("Physics"),ma()):t.race.artifical&&t.race.artifical&&(t.tech.spy=5,t.tech.primitive=3,t.tech.currency=6,t.tech.govern=3,t.tech.boot_camp=1,t.tech.medic=1,t.tech.military=5,t.tech.explosives=3,t.tech.trade=3,t.tech.banking=6,t.tech.home_safe=1,t.tech.housing=3,t.tech.smelting=3,t.tech.copper=1,t.tech.storage=5,t.tech.container=4,t.tech.steel_container=3,t.tech.mining=4,t.tech.pickaxe=2,t.tech.hammer=2,t.tech.oil=3,t.tech.alumina=1,t.tech.titanium=1,t.tech.foundry=7,t.tech.factory=1,t.tech.theatre=3,t.tech.broadcast=1,t.tech.science=7,t.tech.high_tech=4,t.tech.theology=2,t.settings.showIndustry=!0,t.settings.showPowerGrid=!0,t.settings.showResearch=!0,t.settings.showCivic=!0,t.settings.showMil=!0,t.settings.showResources=!0,t.settings.showMarket=!0,t.settings.showStorage=!0,t.resource[t.race.species].display=!0,t.resource.Knowledge.display=!0,t.resource.Money.display=!0,t.resource.Food.display=!0,t.resource.Money.amount=1e3,t.resource.Stone.display=!0,t.resource.Furs.display=!0,t.resource.Copper.display=!0,t.resource.Iron.display=!0,t.resource.Aluminium.display=!0,t.resource.Coal.display=!0,t.resource.Oil.display=!0,t.resource.Steel.display=!0,t.resource.Titanium.display=!0,t.resource.Brick.display=!0,t.resource.Wrought_Iron.display=!0,t.resource.Sheet_Metal.display=!0,t.resource.Crates.display=!0,t.resource.Containers.display=!0,t.race.flier||(t.tech.cement=5,t.resource.Cement.display=!0),t.race.kindling_kindred||t.race.smoldering||(t.race.evil?(t.tech.reclaimer=3,t.city.graveyard={count:1}):(t.tech.axe=3,t.tech.saw=2,t.city.lumber_yard={count:1},t.city.sawmill={count:0,on:0}),t.resource.Lumber.display=!0,t.resource.Plywood.display=!0,t.civic.lumberjack.display=!0),t.race.smoldering&&(t.resource.Chrysotile.display=!0),t.resource[t.race.species].max=0,t.resource[t.race.species].amount=0,t.resource.Crates.amount=10,t.resource.Containers.amount=10,t.civic.taxes.display=!0,t.civic.miner.display=!0,t.civic.coal_miner.display=!0,t.civic.quarry_worker.display=!0,t.civic.professor.display=!0,t.civic.scientist.display=!0,t.race.flier||(t.civic.cement_worker.display=!0),t.civic.banker.display=!0,t.city.calendar.day++,t.city.market.active=!0,t.city.power=7.5,t.city.powered=!0,t.city.factory={count:0,on:0,Lux:0,Furs:0,Alloy:0,Polymer:1,Nano:0,Stanene:0},t.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},t.city.smelter={count:1,cap:0,Wood:0,Coal:0,Oil:1,Star:0,StarCap:0,Inferno:0,Iron:1,Steel:0,Iridium:0},t.city.oil_power={count:1,on:1},t.city.coal_power={count:0,on:0},t.city.transmitter={count:1,on:1},t.city.mine={count:1,on:0},t.city.coal_mine={count:1,on:0},t.city.oil_well={count:1},t.city.oil_depot={count:1},t.city.cement_plant={count:1,on:0},t.city.garrison={count:0,on:0},t.city.boot_camp={count:0},t.city.basic_housing={count:0},t.city.cottage={count:0},t.city.apartment={count:0,on:0},t.city.amphitheatre={count:0},t.city.rock_quarry={count:1,on:0,asbestos:50},t.city.metal_refinery={count:1,on:0},t.city.shed={count:2},t.city.storage_yard={count:1},t.city.warehouse={count:1},t.city.trade={count:0},t.city.wharf={count:0},t.city.bank={count:1},t.city.university={count:1},t.city.library={count:1},t.city.wardenclyffe={count:0,on:0},t.city.temple={count:0},t.race.calm&&(t.resource.Zen.display=!0,t.city.meditation={count:0}),t.race.cannibalize&&(t.city.s_alter={count:0,rage:0,mind:0,regen:0,mine:0,harvest:0}),t.race.magnificent&&(t.city.shrine={count:0,morale:0,metal:0,know:0,tax:0}),t.civic.govern.type="technocracy",t.civic.garrison={display:!0,disabled:!1,progress:0,tactic:0,workers:0,wounded:0,raid:0,max:0},ms(),gs(),ma()),t.settings.tabLoad?(ms(),Y(),ve($("#c_garrison"),!1),ie(),t.race.cataclysm||t.race.lone_survivor?(sc($("#r_civics")),J(),Qs(),ar("market"),ar("storage"),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let t=a.resource[e].color,r=a.resource[e].tradable;if(a.resource[e].stackable){var s=$(`
    `);$("#resStorage").append(s),vr(`#stack-${e}`,s,e,t)}r&&(s=$(`
    `),$("#market").append(s),dr(`#market-${e}`,s,e,t,!0))})),ir(),Ce("Genetics"),Ce("Crispr"),Ce("Blood")):t.sim&&(Ce("Crispr"),Ce("Blood"))):jt("mTabCivil"),t.queue.hasOwnProperty("queue")&&(t.queue.queue=[]),(t.race.slow||t.race.hyper||"junker"===t.race.species)&&(e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w&&P.w.terminate(),window.location.reload())}function Ds(e){switch(_i[e].fanaticism){case"smart":t.race.dumb?(mi(5),Ce("Genetics")):Bs("smart");break;case"infectious":Bs("infectious"),"human"===t.race.species&&eo("infested");break;case"blood_thirst":Bs("blood_thirst"),"entish"===t.race.species&&eo("madagascar_tree");break;case"none":mi(5),Ce("Genetics");break;default:Bs(_i[e].fanaticism)}}function Bs(e){t.race[e]?Pi(e)?"imitation"===e?qi(!0):"shapeshifter"===e&&Mi(t.race.ss_genus):(mi(5),Ce("Genetics")):(t.race[e]=1,xi(e))}function Gs(){if(!t.settings.tabLoad&&3!==t.settings.civTabs)return;Rs(),sc($("#resQueue")),$("#resQueue").append($(`\n

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

    \n \n `));let e=$('
      ');$("#resQueue").append(e),e.append($('
    • {{ item.label }} [{{ item.time | time }}]
    • '));try{ic({el:"#resQueue",data:t.r_queue,methods:{remove(e){Ii(`rq${t.r_queue.queue[e].id}`),t.r_queue.queue.splice(e,1),Gs(),gs()},setID:e=>`rq${t.r_queue.queue[e].id}`,pauseRQueue(){$("#pauserqueue").removeClass("play"),$("#pauserqueue").removeClass("pause"),t.r_queue.pause?(t.r_queue.pause=!1,$("#pauserqueue").addClass("play")):(t.r_queue.pause=!0,$("#pauserqueue").addClass("pause"))},pausedesc:()=>t.r_queue.pause?z("r_queue_play"):z("r_queue_pause")},filters:{time:e=>cc(e)}}),function(){let e=$("#resQueue .buildList")[0];Sortable.create(e,{onEnd(e){let a=t.r_queue.queue;a.splice(e.newDraggableIndex,0,a.splice(e.oldDraggableIndex,1)[0]),t.r_queue.queue=a,Gs()}}),function(){for(let e=0;e=5?e-.01:e}function Us(){let e=1800;t.tech.vault>=1?e=7500*(t.tech.vault+1):t.tech.banking>=5?e=9e3:t.tech.banking>=3&&(e=4e3),t.race.paranoid&&(e*=1-di.paranoid.vars()[0]/100),t.race.hoarder&&(e*=1+di.hoarder.vars()[0]/100);let a=Oi("dracnid");a>0&&(e*=1+di.hoarder.vars(1)[0]/100*a),t.tech.banking>=7&&(e*=1+Pe(.05*la(t.civic.banker.workers,"banker"))),t.tech.banking>=8&&(e+=Pe(25*t.resource[t.race.species].amount)),t.tech.stock_exchange&&(e*=1+.1*t.tech.stock_exchange),t.tech.world_control&&(e*=1.25),t.race.truepath&&(e*=1.25),t.blood.greed&&(e*=1+t.blood.greed/100),t.stats.achieve.wheelbarrow&&(e*=1+t.stats.achieve.wheelbarrow.l/50),t.race.inflation&&(e*=1+t.race.inflation/125);let r=D("risktaker",0);return r&&(e*=1+r/100),e}function Ws(e,a,r){switch(e){case"smelter":!function(e,a){let r=$(`
      ${z("modal_smelter_fuel")}: {{s.count | on}}/{{ s.cap }}
      `);if(e.append(r),e.hasClass("modalBody")){let e=xc(10);e.length>0&&r.prepend(e)}if(a&&t.race.forge&&t.race.steelen){let e=qc(3,12,!0);e.length>0&&r.prepend(e)}let s=e.hasClass("modalBody")?"mSmelterFuels":"smelterFuels",i=$(`
      `);if(e.append(i),!t.race.forge){if(!t.race.kindling_kindred&&!t.race.smoldering||t.race.evil){let e=t.race.evil?t.race.soul_eater&&"wendigo"!==t.race.species&&!t.race.artifical?t.resource.Food.name:t.resource.Furs.name:t.resource.Lumber.name,a=$(`${e} {{ s.Wood }}`),r=$('«'),s=$('»');i.append(r),i.append(a),i.append(s)}if(t.resource.Coal.display){let e=$(`${t.resource.Coal.name} `),a=$('«'),r=$('»');i.append(a),i.append(e),i.append(r)}}if(t.race.forge){let e=$(`${z("trait_forge_name")} {{ s.Oil }}`);i.append(e)}else if(t.resource.Oil.display){let e=$(`${t.resource.Oil.name} {{ s.Oil }}`),a=$('«'),r=$('»');i.append(a),i.append(e),i.append(r)}if(t.tech.star_forge&&t.tech.star_forge>=2){let e=$(`${z("star")} {{ s.Star }}`);i.append(e)}if(t.tech.smelting&&t.tech.smelting>=8){let e=$(`${z("modal_smelter_inferno")} {{ s.Inferno }}`),t=$('«'),a=$('»');i.append(t),i.append(e),i.append(a)}let c=$('
      ');e.append(c);let o=!!(t.tech.irid_smelting||t.tech.m_smelting&&t.tech.m_smelting>=2);if(t.resource.Iridium.display&&o||t.resource.Steel.display&&t.tech.smelting>=2&&!t.race.steelen){let a=$(`
      `);e.append(a),a.append(`
      ${z("modal_smelter_type")}: {{s.count | son}}/{{ s.cap | on }}
      `);let r=$('
      ');a.append(r);let s=$(`${t.resource.Iron.name} {{ s.Iron }}`),i=$('«'),c=$('»');if(r.append(i),r.append(s),r.append(c),t.resource.Steel.display&&t.tech.smelting>=2&&!t.race.steelen){let e=$(`${t.resource.Steel.name} {{ s.Steel }}`),a=$('«'),s=$('»');r.append(a),r.append(e),r.append(s)}if(t.resource.Iridium.display&&o){let e=$(`${t.resource.Iridium.name} {{ s.Iridium }}`),a=$('«'),s=$('»');r.append(a),r.append(e),r.append(s)}}function n(e){switch(e){case"wood":return z("modal_build_wood",[t.race.evil?t.race.soul_eater&&"wendigo"!==t.race.species&&!t.race.artifical?t.resource.Food.name:t.resource.Furs.name:t.resource.Lumber.name,t.race.evil&&!t.race.soul_eater||"wendigo"===t.race.species?1:3]);case"coal":{let e=t.race.kindling_kindred?.15:.25;return t.tech.uranium&&t.tech.uranium>=3?z("modal_build_coal2",[e,z("resource_Coal_name"),z("resource_Uranium_name")]):z("modal_build_coal1",[e,z("resource_Coal_name")])}case"oil":return t.race.forge?z("modal_build_forge"):z("modal_build_oil",["0.35",z("resource_Oil_name")]);case"star":return t.tech.irid_smelting?z("modal_build_star2",[z("resource_Titanium_name"),z("resource_Iridium_name")]):z("modal_build_star",[z("resource_Titanium_name")]);case"inferno":{let e=35,t=.5;return z("modal_build_inferno",[50,z("resource_Coal_name"),e,z("resource_Oil_name"),t,z("resource_Infernite_name")])}}}function l(e){if("steel"===e){let e=t.tech.smelting>=4?1.2:1;return t.tech.smelting>=5&&(e*=1.2),t.tech.smelting>=6&&(e*=1.2),t.tech.smelting>=7&&(e*=1.25),t.race.pyrophobia&&(e*=.9),z("modal_smelter_steel",[+e.toFixed(3),z("resource_Steel_name"),z("resource_Coal_name"),z("resource_Iron_name")])}if("iridium"===e){let e=t.tech.smelting>=7?6.25:5;return t.race.pyrophobia&&(e*=.9),z("modal_smelter_iron",[+e.toFixed(3),z("resource_Iridium_name")])}{let e=t.tech.smelting>=3?t.tech.smelting>=7?15:12:10;return t.race.pyrophobia&&(e*=.9),z("modal_smelter_iron",[+e.toFixed(3),z("resource_Iron_name")])}}ic({el:a||"#specialModal",data:{s:t.city.smelter,lum:t.resource.Lumber,coal:t.resource.Coal,oil:t.resource.Oil,food:t.resource.Food,fur:t.resource.Furs},methods:{addFuel(e){let a=b();for(let r=0;r=t.city.smelter.StarCap)break;if(a0))break;"Wood"!==e&&t.city.smelter.Wood>0?(t.city.smelter.Wood--,t.city.smelter[e]++):"Coal"!==e&&t.city.smelter.Coal>0?(t.city.smelter.Coal--,t.city.smelter[e]++):"Oil"!==e&&t.city.smelter.Oil>0?(t.city.smelter.Oil--,t.city.smelter[e]++):"Inferno"!==e&&t.city.smelter.Inferno>0&&(t.city.smelter.Inferno--,t.city.smelter[e]++)}}},subFuel(e){let a=b();for(let r=0;r0;r++){t.city.smelter[e]--,t.race.forge&&"Inferno"===e&&t.city.smelter.Oil++;let a=t.city.smelter.Wood+t.city.smelter.Coal+t.city.smelter.Oil+t.city.smelter.Star+t.city.smelter.Inferno;t.city.smelter.Iron+t.city.smelter.Steel+t.city.smelter.Iridium>a&&(t.city.smelter.Iron>0?t.city.smelter.Iron--:t.city.smelter.Steel>0?t.city.smelter.Steel--:t.city.smelter.Iridium>0&&t.city.smelter.Iridium--)}},mLabel:e=>l(e),addMetal(e){let a=b();for(let r=0;r0&&"Iron"!==e)t.city.smelter.Iron--,t.city.smelter[e]++;else if(t.city.smelter.Steel>0&&"Steel"!==e)t.city.smelter.Steel--,t.city.smelter[e]++;else{if(!(t.city.smelter.Iridium>0&&"Iridium"!==e))break;t.city.smelter.Iridium--,t.city.smelter[e]++}}},subMetal(e){let a=b();t.city.smelter[e]-=a,t.city.smelter[e]<0&&(t.city.smelter[e]=0)},buildLabel:e=>n(e),ariaCount:e=>` ${t.city.smelter[e]} ${e} fueled.`,ariaProd:e=>`. ${t.city.smelter[e]} producing ${e}.`,net:e=>t.resource[e].diff>=0?"has-text-success":"has-text-danger",level:()=>ei(t.city.smelter.Wood+t.city.smelter.Coal+t.city.smelter.Oil+t.city.smelter.Star+t.city.smelter.Inferno,t.city.smelter.count)},filters:{on:e=>t.city.smelter.Wood+t.city.smelter.Coal+t.city.smelter.Oil+t.city.smelter.Star+t.city.smelter.Inferno,son:e=>t.city.smelter.Iron+t.city.smelter.Steel+t.city.smelter.Iridium,diffSize:e=>e>0?`+${q(e,2)}`:q(e,2),spook(e){if(a&&((t.race.kindling_kindred||t.race.smoldering)&&(6===t.city.smelter.Steel||6===t.city.smelter.Iron)||6===t.city.smelter.Wood)&&6===t.city.smelter.Coal&&6===t.city.smelter.Oil){let e=qc(3,12,!0);if(e.length>0)return e}return e},altspook(e){if(a&&t.race.forge&&6===t.city.smelter.Steel){let e=qc(3,12,!0);if(e.length>0)return e}return e}}});let u=e.hasClass("modalBody")?"mSmelterFuels":"smelterFuels";if(["wood","coal","oil","star","inferno"].forEach((function(e){Ei(`${u}${e}`,(function(){return n(e)}),{elm:$(`#${u} > .${e}`),attach:"#main"})})),t.resource.Steel.display&&t.tech.smelting>=2&&!t.race.steelen||t.resource.Iridium.display&&o){let a=e.hasClass("modalBody")?"mSmelterMats":"smelterMats";["iron","steel","iridium"].forEach((function(e){("steel"!==e||t.resource.Steel.display&&!t.race.steelen)&&("iridium"!==e||t.resource.Iridium.display&&o)&&Ei(`${a}${e}`,(function(){return l(e)}),{elm:$(`#${a} span.${e}`),attach:"#main"})}))}}(a,r);break;case"factory":!function(e,a){let r=$(`
      ${z("modal_factory_operate")}: {{count | on}}/{{ on | max }}
      `);e.append(r);let s=$(`
      ${z("modal_factory_lux")}
      `);e.append(s);let o=$(''),n=$('«'),l=$('»');if(s.append(n),s.append(o),s.append(l),t.tech.synthetic_fur){let a=$(`
      ${t.race.evil?z("resource_Flesh_name"):z("resource_Furs_name")}
      `);e.append(a);let r=$('{{ Furs }}'),s=$('«'),i=$('»');a.append(s),a.append(r),a.append(i)}let u=$(`
      ${z("resource_Alloy_name")}
      `);e.append(u);let d=$('{{ Alloy }}'),_=$('«'),p=$('»');if(u.append(_),u.append(d),u.append(p),t.tech.polymer){let t=$(`
      ${z("resource_Polymer_name")}
      `);e.append(t);let a=$('{{ Polymer }}'),r=$('«'),s=$('»');t.append(r),t.append(a),t.append(s)}if(t.tech.nano){let t=$(`
      ${z("resource_Nano_Tube_name")}
      `);e.append(t);let a=$('{{ Nano }}'),r=$('«'),s=$('»');t.append(r),t.append(a),t.append(s)}if(t.tech.stanene){let t=$(`
      ${z("resource_Stanene_name")}
      `);e.append(t);let a=$('{{ Stanene }}'),r=$('«'),s=$('»');t.append(r),t.append(a),t.append(s)}function h(e){let a=!!t.tech.factory;switch(e){case"Lux":{let e=+t.resource[t.race.species].amount*(a?Zs.Lux.demand[t.tech.factory]:Zs.Lux.demand[0]);return e=Vs(e).toFixed(2),z("modal_factory_lux_label",[a?Zs.Lux.fur[t.tech.factory]:Zs.Lux.fur[0],t.resource.Furs.name,e])}case"Furs":{let e=a?Zs.Furs.money[t.tech.factory]:Zs.Furs.money[0],r=a?Zs.Furs.polymer[t.tech.factory]:Zs.Furs.polymer[0];return z("modal_factory_alloy_label",[e,z("resource_Money_name"),r,z("resource_Polymer_name"),t.race.evil?z("resource_Flesh_name"):z("resource_Furs_name")])}case"Alloy":{let e=a?Zs.Alloy.copper[t.tech.factory]:Zs.Alloy.copper[0],r=a?Zs.Alloy.aluminium[t.tech.factory]:Zs.Alloy.aluminium[0];return z("modal_factory_alloy_label",[e,z("resource_Copper_name"),r,z("resource_Aluminium_name"),z("resource_Alloy_name")])}case"Polymer":if(t.race.kindling_kindred||t.race.smoldering)return z("modal_factory_polymer_label2",[a?Zs.Polymer.oil_kk[t.tech.factory]:Zs.Polymer.oil_kk[0],z("resource_Oil_name"),z("resource_Polymer_name")]);{let e=a?Zs.Polymer.oil[t.tech.factory]:Zs.Polymer.oil[0],r=a?Zs.Polymer.lumber[t.tech.factory]:Zs.Polymer.lumber[0];return z("modal_factory_polymer_label1",[e,z("resource_Oil_name"),r,t.resource.Lumber.name,z("resource_Polymer_name")])}case"Nano":{let e=a?Zs.Nano_Tube.coal[t.tech.factory]:Zs.Nano_Tube.coal[0],r=a?Zs.Nano_Tube.neutronium[t.tech.factory]:Zs.Nano_Tube.neutronium[0];return z("modal_factory_nano_label",[e,z("resource_Coal_name"),r,z("resource_Neutronium_name"),z("resource_Nano_Tube_name")])}case"Stanene":{let e=a?Zs.Stanene.aluminium[t.tech.factory]:Zs.Stanene.aluminium[0],r=a?Zs.Stanene.nano[t.tech.factory]:Zs.Stanene.nano[0];return z("modal_factory_stanene_label",[e,z("resource_Aluminium_name"),r,z("resource_Nano_Tube_name"),z("resource_Stanene_name")])}}}ic({el:a||"#specialModal",data:t.city.factory,methods:{subItem:function(e){let a=b();for(var r=0;r0;r++)t.city.factory[e]--},addItem:function(e){let a=t.space.red_factory?t.space.red_factory.on+t.city.factory.on:t.city.factory.on;t.interstellar.int_factory&&i.int_factory&&(a+=2*i.int_factory),t.tauceti.tau_factory&&c.tau_factory&&(a+=c.tau_factory*(t.tech.isolation?5:3));let r=b();for(var s=0;s0))break;t.city.factory.Alloy--,t.city.factory[e]++}}},buildLabel:function(e){return h(e)},ariaProd:e=>`. ${t.city.factory[e]} factories producing ${e}.`,level(){let e=t.city.factory.Lux+t.city.factory.Furs+t.city.factory.Alloy+t.city.factory.Polymer+t.city.factory.Nano+t.city.factory.Stanene,a=t.space.red_factory?t.space.red_factory.on+t.city.factory.on:t.city.factory.on;return t.interstellar.int_factory&&i.int_factory&&(a+=2*i.int_factory),t.tauceti.tau_factory&&c.tau_factory&&(a+=c.tau_factory*(t.tech.isolation?5:3)),ei(e,a)}},filters:{on:()=>t.city.factory.Lux+t.city.factory.Furs+t.city.factory.Alloy+t.city.factory.Polymer+t.city.factory.Nano+t.city.factory.Stanene,max(){let e=t.space.red_factory?t.space.red_factory.on+t.city.factory.on:t.city.factory.on;return t.interstellar.int_factory&&i.int_factory&&(e+=2*i.int_factory),t.tauceti.tau_factory&&c.tau_factory&&(e+=c.tau_factory*(t.tech.isolation?5:3)),e},spook(e){if(3===t.city.factory.Lux&&a){let e=qc(6,12,!0);if(e.length>0)return e}return e}}}),["Lux","Furs","Alloy","Polymer","Nano","Stanene"].forEach((function(t){let a=e.hasClass("modalBody")?"specialModal":"iFactory";Ei(`${a}${t}`,(function(){return h(t)}),{elm:$(`#${a} .factory > .${t}`),attach:"#main"})}))}(a,r);break;case"droid":!function(e,a){let r=$(`
      ${z("modal_factory_operate")}: {{count | on}}/{{ on | max }}
      `);e.append(r);let s=$(`
      ${z("resource_Adamantite_name")}
      `);e.append(s);let i=$('{{ adam }}'),c=$('«'),o=$('»');s.append(c),s.append(i),s.append(o);let n=$(`
      ${z("resource_Uranium_name")}
      `);e.append(n);let l=$('{{ uran }}'),u=$('«'),d=$('»');n.append(u),n.append(l),n.append(d);let _=$(`
      ${z("resource_Coal_name")}
      `);e.append(_);let p=$('{{ coal }}'),h=$('«'),m=$('»');_.append(h),_.append(p),_.append(m);let g=$(`
      ${z("resource_Aluminium_name")}
      `);e.append(g);let f=$('{{ alum }}'),v=$('«'),y=$('»');function w(e){switch(e){case"adam":return z("modal_droid_res_label",[z("resource_Adamantite_name")]);case"uran":return z("modal_droid_res_label",[z("resource_Uranium_name")]);case"coal":return z("modal_droid_res_label",[z("resource_Coal_name")]);case"alum":return z("modal_droid_res_label",[z("resource_Aluminium_name")])}}g.append(v),g.append(f),g.append(y),ic({el:a||"#specialModal",data:t.interstellar.mining_droid,methods:{subItem:function(e){let a=b();for(var r=0;r0;r++)t.interstellar.mining_droid[e]--},addItem:function(e){let a=b();for(var r=0;r`. ${t.interstellar.mining_droid[e]} driod mining ${e}.`,level:()=>ei(t.interstellar.mining_droid.adam+t.interstellar.mining_droid.uran+t.interstellar.mining_droid.coal+t.interstellar.mining_droid.alum,t.interstellar.mining_droid.on)},filters:{on:()=>t.interstellar.mining_droid.adam+t.interstellar.mining_droid.uran+t.interstellar.mining_droid.coal+t.interstellar.mining_droid.alum,max:()=>t.interstellar.mining_droid.on}}),["adam","uran","coal","alum"].forEach((function(t){let a=e.hasClass("modalBody")?"specialModal":"iDroid";Ei(`${a}${t}`,(function(){return w(t)}),{elm:$(`#${a} .factory > .${t}`),attach:"#main"})}))}(a,r);break;case"graphene":!function(e,a){let r=t.race.truepath?"space":"interstellar",s=$(`
      ${z("modal_smelter_fuel")}: {{count | on}}/{{ on | max }}
      `);e.append(s);let i=$("
      ");if(e.append(i),!t.race.kindling_kindred&&!t.race.smoldering){let e=t.resource.Lumber.name,a=$(`${e} {{ Lumber }}`),r=$('«'),s=$('»');i.append(r),i.append(a),i.append(s)}if(t.resource.Coal.display){let e=$(`${t.resource.Coal.name} {{ Coal }}`),a=$('«'),r=$('»');i.append(a),i.append(e),i.append(r)}if(t.resource.Oil.display){let e=$(`${t.resource.Oil.name} {{ Oil }}`),a=$('«'),r=$('»');i.append(a),i.append(e),i.append(r)}function c(e){switch(e){case"wood":return z("modal_graphene_produce",[350,t.race.evil?z("resource_Bones_name"):z("resource_Lumber_name"),z("resource_Graphene_name")]);case"coal":return z("modal_graphene_produce",[25,z("resource_Coal_name"),z("resource_Graphene_name")]);case"oil":return z("modal_graphene_produce",[15,z("resource_Oil_name"),z("resource_Graphene_name")])}}ic({el:a||"#specialModal",data:t[r].g_factory,methods:{subWood(){let e=b();for(let a=0;a0;a++)t[r].g_factory.Lumber--},addWood(){let e=b();for(let a=0;a0))break;t[r].g_factory.Oil>t[r].g_factory.Coal?t[r].g_factory.Coal>0?t[r].g_factory.Coal--:t[r].g_factory.Oil--:t[r].g_factory.Oil>0?t[r].g_factory.Oil--:t[r].g_factory.Coal--,t[r].g_factory.Lumber++}},subCoal(){let e=b();for(let a=0;a0;a++)t[r].g_factory.Coal--},addCoal(){let e=b();for(let a=0;a0))break;t[r].g_factory.Lumber>0?t[r].g_factory.Lumber--:t[r].g_factory.Oil--,t[r].g_factory.Coal++}},subOil(){let e=b();for(let a=0;a0;a++)t[r].g_factory.Oil--},addOil(){let e=b();for(let a=0;a0))break;t[r].g_factory.Lumber>0?t[r].g_factory.Lumber--:t[r].g_factory.Coal--,t[r].g_factory.Oil++}},buildLabel:e=>c(e),ariaCount:e=>` ${t[r].g_factory[e]} ${e} fueled.`,ariaProd:e=>`. ${t[r].g_factory[e]} producing ${e}.`,level:()=>ei(t[r].g_factory.Lumber+t[r].g_factory.Coal+t[r].g_factory.Oil,t[r].g_factory.on)},filters:{on:function(e){return t[r].g_factory.Lumber+t[r].g_factory.Coal+t[r].g_factory.Oil}}}),["wood","coal","oil"].forEach((function(t){let a=e.hasClass("modalBody")?"specialModal":"iGraphene";Ei(`${a}${t}`,(function(){return c(t)}),{elm:$(`#${a} > div > .${t}`),attach:"#main"})}))}(a,r);break;case"pylon":!function(e,a){let r=$(`
      ${z("modal_pylon_casting")}: {{total | drain}}
      `);e.append(r);let s=$('
      ');e.append(s);let i=[];function c(e){let a=+Xs(t.race.casting[e]).toFixed(4),r=+(Xs(t.race.casting[e]+1)-Xs(t.race.casting[e])).toFixed(4),s=+(t.race.casting[e]/(t.race.casting[e]+75)*100).toFixed(2);return"crafting"===e?z("modal_pylon_casting_label_crafting",[a,s,+(2*t.race.casting[e]/(2*t.race.casting[e]+75)*100).toFixed(2),r]):z("modal_pylon_casting_label",[z(`modal_pylon_spell_${e}`),a,r,s])}i=t.race.orbit_decayed?["miner","science","factory","army","hunting","crafting"]:t.race.cataclysm?["science","factory","army","hunting","crafting"]:t.race.unfathomable?["miner","lumberjack","science","factory","army","hunting","crafting"]:["farmer","miner","lumberjack","science","factory","army","hunting","crafting"],t.tech.magic&&t.tech.magic>=3&&i.forEach((function(e){if("crafting"!==e&&"lumberjack"!==e&&"farmer"!==e||"farmer"===e&&!t.race.detritivore&&!t.race.carnivore&&!t.race.soul_eater&&!t.race.artifical||"lumberjack"===e&&!t.race.kindling_kindred&&!t.race.smoldering&&!t.race.evil||"crafting"===e&&t.tech.magic>=4){let t=$(`${z(`modal_pylon_spell_${e}`)} {{ ${e} }}`),a=$(`«`),r=$(`»`);s.append(a),s.append(t),s.append(r)}})),ic({el:a||"#specialModal",data:t.race.casting,methods:{buildLabel:e=>c(e),addSpell(e){let a=b();for(let r=0;r=a))break;t.race.casting[e]++,t.race.casting.total++,t.resource.Mana.diff-=a}},subSpell(e){let a=b();for(let r=0;r0;r++)t.race.casting[e]--,t.race.casting.total--},ariaCount:e=>` ${e} casting.`,level:()=>ei(t.race.casting.total,t.resource.Mana.gen,!0)},filters:{drain:function(e){let a=0;return i.forEach((function(e){t.race.casting[e]&&t.race.casting[e]>0&&(a+=Xs(t.race.casting[e]))})),z("modal_pylon_casting_cost",[+a.toFixed(3)])}}}),i.forEach((function(t){let a=e.hasClass("modalBody")?"specialModal":"iPylon";Ei(`${a}${t}`,(function(){return c(t)}),{elm:$(`#${a} > .pylon > .${t}`),attach:"#main"})}))}(a,r);break;case"rock_quarry":!function(e,a){e.append($(`
      ${z("modal_quarry_ratio",[t.resource.Chrysotile.name])}
      `));let r=$('
      «»
      ');e.append(r),ic({el:a||"#specialModal",data:t.city.rock_quarry,methods:{sub(){let e=b();t.city.rock_quarry.asbestos>0&&(t.city.rock_quarry.asbestos-=e,t.city.rock_quarry.asbestos<0&&(t.city.rock_quarry.asbestos=0))},add(){let e=b();t.city.rock_quarry.asbestos<100&&(t.city.rock_quarry.asbestos+=e,t.city.rock_quarry.asbestos>100&&(t.city.rock_quarry.asbestos=100))}}})}(a,r);break;case"titan_mine":!function(e,a){e.append($(`
      ${z("modal_quarry_ratio",[t.resource.Adamantite.name])}
      `));let r=$('
      «»
      ');e.append(r),ic({el:a||"#specialModal",data:t.space.titan_mine,methods:{sub(){let e=b();t.space.titan_mine.ratio>0&&(t.space.titan_mine.ratio-=e,t.space.titan_mine.ratio<0&&(t.space.titan_mine.ratio=0))},add(){let e=b();t.space.titan_mine.ratio<100&&(t.space.titan_mine.ratio+=e,t.space.titan_mine.ratio>100&&(t.space.titan_mine.ratio=100))}}})}(a,r);break;case"nanite_factory":!function(e,a){let r=$(`
      ${z("modal_factory_operate")}: {{count | on}}/{{ count | max }}
      `);e.append(r);let s=e.hasClass("modalBody")?"mNFactoryRes":"NFactoryRes",i=$(`
      `);e.append(i),Js.forEach((function(e){if(t.resource[e].display){let a=$(`${t.resource[e].name} {{ ${e} }}`),r=$(`«`),s=$(`»`);i.append(r),i.append(a),i.append(s)}})),ic({el:a||"#specialModal",data:t.city.nanite_factory,methods:{subItem:function(e){let a=b();t.city.nanite_factory[e]-=a,t.city.nanite_factory[e]<0&&(t.city.nanite_factory[e]=0)},addItem:function(e){let a=b(),r=0;Js.forEach((function(e){r+=t.city.nanite_factory[e]}));let s=50*t.city.nanite_factory.count-r;a>s&&(a=s),a>0&&(t.city.nanite_factory[e]+=a)},eatLabel:e=>`Consume ${e} to produce ${t.resource.Nanite.name}`,level(){let e=0;Js.forEach((function(a){e+=t.city.nanite_factory[a]}));let a=t.city.nanite_factory.count;return ei(e,a)}},filters:{on(){let e=0;return Js.forEach((function(a){e+=t.city.nanite_factory[a]})),e},max:()=>50*t.city.nanite_factory.count}}),Js.forEach((function(a){let r=e.hasClass("modalBody")?"specialModal":"iNFactory";Ei(`${r}${a}`,(function(){return function(e){let a=+(Ja[e]/100*(di.deconstructor.vars()[0]/100)).toFixed(4),r=+(t.city.nanite_factory[e]*a).toFixed(4);return z("modal_nfactory_resource_label",[1,t.resource[e].name,a,t.resource.Nanite.name,t.city.nanite_factory[e],r])}(a)}),{elm:$(`#${r} > .fuels > .${a}`),attach:"#main"})}))}(a,r);break;case"mining_ship":!function(e,a){e.append($(`
      ${z("tau_roid_mining_ship_ratio",[t.resource.Iron.name,t.resource.Aluminium.name])}
      `));let r=$('
      «»
      ');e.append(r),e.append($(`
      ${z("tau_roid_mining_ship_ratio",[t.resource.Iridium.name,t.resource.Neutronium.name])}
      `));let s=$('
      «»
      ');if(e.append(s),t.tech.tau_roid>=5){e.append($(`
      ${z("tau_roid_mining_ship_ratio",[t.resource.Orichalcum.name,t.resource.Elerium.name])}
      `));let a=$('
      «»
      ');e.append(a)}ic({el:a||"#specialModal",data:t.tauceti.mining_ship,methods:{sub(e){let a=b();t.tauceti.mining_ship[e]>0&&(t.tauceti.mining_ship[e]-=a,t.tauceti.mining_ship[e]<0&&(t.tauceti.mining_ship[e]=0))},add(e){let a=b();t.tauceti.mining_ship[e]<100&&(t.tauceti.mining_ship[e]+=a,t.tauceti.mining_ship[e]>100&&(t.tauceti.mining_ship[e]=100))}}})}(a,r);break;case"alien_space_station":!function(e,a){e.append($(`
      ${z("tau_gas2_alien_station_focus",[t.resource.Knowledge.name])}
      `));let r=$('
      «»
      ');e.append(r),ic({el:a||"#specialModal",data:t.tauceti.alien_space_station,methods:{sub(e){let a=b();t.tauceti.alien_space_station[e]>0&&(t.tauceti.alien_space_station[e]-=a,t.tauceti.alien_space_station[e]<0&&(t.tauceti.alien_space_station[e]=0))},add(e){let a=b();t.tauceti.alien_space_station[e]<100&&(t.tauceti.alien_space_station[e]+=a,t.tauceti.alien_space_station[e]>100&&(t.tauceti.alien_space_station[e]=100))}}})}(a,r);break;case"replicator":!function(e,a){if(t.race.replicator){e.append($(`
      ${"antimatter"===t.race.universe?z("tech_antireplicator"):z("tech_replicator")}
      `));let r=$('
      ');if(e.append(r),a){let e="";Object.keys(Ja).forEach((function(a){e+=`${t.resource[a].name}`})),r.append(`
      \n ${e}\n
      `)}else{let e="";Object.keys(Ja).forEach((function(a){t.resource[a].display&&(e+=`${t.resource[a].name}`)})),r.append(`
      ${e}
      `)}let s=a?$("
      "):$('
      ');r.append(s);let i=$('{{ pow }}MW'),c=$('«'),o=$('»');if(s.append(c),s.append(i),s.append(o),e.append('
      {{ res | result }}
      '),ic({el:a||"#specialModal",data:t.race.replicator,methods:{less(){let e=b();t.race.replicator.pow>0&&(t.race.replicator.pow-=e,t.race.replicator.pow<0&&(t.race.replicator.pow=0))},more(){let e=b();t.race.replicator.pow+=e},setVal(e){t.resource[e].display&&(t.race.replicator.res=e)},avail:e=>t.resource[e].display,aria:()=>t.race.replicator.pow+"MW"},filters:{resName:e=>t.resource[e].name,result:e=>z("tau_replicator",[Ys(e,t.race.replicator.pow).toFixed(3),t.resource[e].name])}}),!a){const e=document.getElementById("hscrolltarget");e.addEventListener("wheel",(t=>{t.preventDefault(),e.scrollLeft+=t.deltaY}))}}}(a,r)}}function Qs(){if(t.settings.tabLoad||2===t.settings.civTabs&&1===t.settings.govTabs){if(sc($("#industry")),t.city.smelter&&(t.city.smelter.count>0||t.race.cataclysm||t.race.orbit_decayed||t.tech.isolation)){var e=$(`

      ${z("city_smelter")}

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

      ${z("city_factory")}

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

      ${z("interstellar_mining_droid_title")}

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

      ${z("interstellar_g_factory_title")}

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

      ${z("city_pylon")}

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

      ${z("city_rock_quarry")}

      `);$("#industry").append(c),Ws("rock_quarry",c,"#iQuarry")}if(t.space.titan_mine&&t.space.titan_mine.count>0&&(c=$(`

      ${z("city_mine")}

      `),$("#industry").append(c),Ws("titan_mine",c,"#iTMine")),t.tech.tau_roid&&t.tech.tau_roid>=4&&t.tauceti.mining_ship){var o=$(`

      ${z("tau_roid_mining_ship")}

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

      ${z("tau_gas2_alien_station")}

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

      ${z("city_nanite_factory")}

      `);$("#industry").append(l),Ws("nanite_factory",l,"#iNFactory")}if(t.race.replicator&&t.tech.replicator){var u=$(`

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

      `);$("#industry").append(u),Ws("replicator",u,"#iReplicator")}}}Object.keys(ts).forEach((e=>Zr.evolution[e]={id:`evolution-${e}`,title:z(`evo_challenge_${e}`),desc(){let a="";return"micro"===t.race.universe&&(a+=`
      ${z("evo_challenge_micro_warn")}
      `),a+=`
      ${z(`evo_challenge_${e}_desc`)}
      `,["sludge","junker"].includes(e)&&(a+=`
      ${z("evo_start")}
      `),a},condition:()=>t.evolution.hasOwnProperty(e),cost:{DNA:()=>"c"===ts[e].t?25:50},challenge:!0,effect:()=>rs(e),action(){return Cs($(this)[0])&&("c"===ts[e].t?function(e){t.race[e]?(delete t.race[e],$(`#evolution-${e}`).removeClass("hl"),"sludge"===e&&Object.keys(_i).forEach((function(e){"junker"!==e&&"sludge"!==e&&$(`#evolution-${e}`).removeClass("is-hidden")}))):(t.race[e]=1,$(`#evolution-${e}`).addClass("hl"),"sludge"===e&&(Object.keys(_i).forEach((function(e){"junker"!==e&&"sludge"!==e&&$(`#evolution-${e}`).addClass("is-hidden")})),t.race.junker&&delete t.race.junker),"orbit_decay"===e&&(delete t.race.cataclysm,t.race.lone_survivor&&(delete t.race.lone_survivor,["nerfed","badgenes"].forEach((function(e){delete t.race[es[e]]}))))),Vr(),ro()}(e):function(e){if(t.race.sludge||Object.keys(_i).forEach((function(e){"junker"!==e&&"sludge"!==e&&$(`#evolution-${e}`).removeClass("is-hidden")})),t.race[e])delete t.race[e],$(`#evolution-${e}`).removeClass("hl"),["nerfed","badgenes"].forEach((function(e){delete t.race[es[e]]}));else{["junker","cataclysm","banana","truepath","lone_survivor"].forEach((function(e){delete t.race[e],$(`#evolution-${e}`).removeClass("hl")})),t.race[e]=1,$(`#evolution-${e}`).addClass("hl"),"junker"===e&&(Object.keys(_i).forEach((function(e){"junker"!==e&&"sludge"!==e&&$(`#evolution-${e}`).addClass("is-hidden")})),t.race.sludge&&delete t.race.sludge),"cataclysm"!==e&&"lone_survivor"!==e||delete t.race.orbit_decay,"truepath"===e||"lone_survivor"===e?(t.race.nerfed=1,["crispr","plasmid","mastery"].forEach((function(e){delete t.race[es[e]]}))):(["nerfed","badgenes"].forEach((function(e){delete t.race[es[e]]})),"antimatter"===t.race.universe?(t.race.weak_mastery=1,$("#evolution-mastery").hasClass("hl")||$("#evolution-mastery").addClass("hl")):(t.race.no_plasmid=1,$("#evolution-plasmid").hasClass("hl")||$("#evolution-plasmid").addClass("hl")));let a="truepath"===e||"lone_survivor"===e?["badgenes","trade","craft"]:["crispr","trade","craft"];for(let e=0;eOc(ts[e].e),highlight:()=>!!t.race[e],queue_complete:()=>0})),Zr.evolution.bunker={id:"evolution-bunker",title:z("evo_bunker"),desc:()=>`
      ${z("evo_bunker")}
      ${z("evo_challenge")}
      `,reqs:{evo:6},grant:["evo_challenge",1],condition:()=>t.genes.challenge&&100===t.evolution.final&&!t.race.evoFinalMenu,cost:{DNA:()=>10},effect:z("evo_bunker_effect"),action(){return!!Cs($(this)[0])},queue_complete:()=>t.tech.evo_challenge?0:1,flair:z("evo_bunker_flair")};const Zs={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 Vs(e){t.race.toxic&&(e*=1+di.toxic.vars()[0]/100);let a=Oi("shroomi");return a>0&&(e*=1+di.toxic.vars(1)[0]/100*a),"corpocracy"===t.civic.govern.type&&(e*=2.5),"socialist"===t.civic.govern.type&&(e*=.8),t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=2&&(e*=1.1),t.race.inflation&&(e*=1+t.race.inflation/1250),t.tech.isolation&&(e*=1+.5*(c.colony||0)),e*Oe("psychic_cash")}const Js=["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 Ys(e,a){return t.race.lone_survivor?17.5*u/Ja[e]*a:12.5*(u||1)/Ja[e]*a**.75}function Xs(e,t){return e*((1+(t=void 0===t?.0025:t))**e-1)}function ei(e,t,a){return e<=0?a?"has-text-success":"has-text-danger":e>=t?a?"has-text-danger":"has-text-success":e<=t/3?a?"has-text-info":"has-text-caution":e<=.66*t?"has-text-warning":e
      ${z("power_grid_header")}
      Distribute Low Power
      `),ic({el:"#powerModeSwitch",data:t.settings}),Object.keys(e).forEach((function(a){if(!e[a].s)return;let r="";"power"===a&&(r=qc(7,12,!1)),e[a].r&&e[a].rs&&t[e[a].r][e[a].rs]?($("#powerGrid").append(`
      ${e[a].n} {{ support }}/{{ s_max }}
      `),ic({el:`#pg${a}sup`,data:t[e[a].r][e[a].rs]})):$("#powerGrid").append(`
      ${e[a].n}${r}
      `);let s=$(`
      `);$("#powerGrid").append(s);let i=0;for(let r=0;r`);o.append(` ${u}${d}`),o.append('{{ on | off }} {{ on }}'),o.append('« »'),s.append(o),ic({el:`#pg${l.id}${a}`,data:t[n][c[1]],methods:{power_on(){let e=b();for(let a=0;a0;a++)t[n][c[1]].on--;l.postPower&&setTimeout((function(){l.postPower(!1)}),250)},higher(){let t=$(`#pg${l.id}${a}`).attr("data-idx"),r=$(`#pg${l.id}${a}`).prevAll('.circuit:not(".inactive")').attr("data-idx");if(r>=0){let s=e[a].l;s.splice(r,0,s.splice(t,1)[0]),e[a].l=s,ai()}},lower(){let t=$(`#pg${l.id}${a}`).attr("data-idx"),r=$(`#pg${l.id}${a}`).nextAll('.circuit:not(".inactive")').attr("data-idx");if(rt[n][c[1]].count-e,idx(e){let t=xc(18,11);return 10===e&&t.length>0?"1"+t:e}}})}else{let e=$(`
      `);e.append(`${u}${d}`),s.append(e)}}!function(e){let t=$(`#grid${e}`)[0],a=ri();Sortable.create(t,{onEnd(t){let r=a[e].l;r.splice(t.newDraggableIndex,0,r.splice(t.oldDraggableIndex,1)[0]),a[e].l=r,ai()}})}(a);let c=$(`
      `);$("#powerGrid").append(c),ic({el:`#${a}GridReset`,data:{},methods:{resetGrid(e){Ni(e,!0),ai()}}})}))}function ri(){return{power:{l:t.power,n:z("power"),s:!0,r:!1,rs:!1},moon:{l:t.support.moon,n:z("space_moon_info_name"),s:t.settings.space.moon,r:"space",rs:"moon_base"},red:{l:t.support.red,n:ea().red,s:t.settings.space.red,r:"space",rs:"spaceport"},belt:{l:t.support.belt,n:z("space_belt_info_name"),s:t.settings.space.belt,r:"space",rs:"space_station"},alpha:{l:t.support.alpha,n:z("interstellar_alpha_name"),s:t.settings.space.alpha,r:"interstellar",rs:"starport"},nebula:{l:t.support.nebula,n:z("interstellar_nebula_name"),s:t.settings.space.nebula,r:"interstellar",rs:"nexus"},gateway:{l:t.support.gateway,n:z("galaxy_gateway"),s:t.settings.space.gateway,r:"galaxy",rs:"starbase"},alien2:{l:t.support.alien2,n:z("galaxy_alien",[_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name]),s:t.settings.space.alien2,r:"galaxy",rs:"foothold"},lake:{l:t.support.lake,n:z("portal_lake_name"),s:t.settings.portal.lake,r:"portal",rs:"harbour"},spire:{l:t.support.spire,n:z("portal_spire_name"),s:t.settings.portal.spire,r:"portal",rs:"purifier"},titan:{l:t.support.titan,n:ea().titan,s:t.settings.space.titan,r:"space",rs:"electrolysis"},enceladus:{l:t.support.enceladus,n:ea().enceladus,s:t.settings.space.enceladus,r:"space",rs:"titan_spaceport"},eris:{l:t.support.eris,n:ea().eris,s:t.settings.space.eris,r:"space",rs:"drone_control"},tau_home:{l:t.support.tau_home,n:z("tau_planet",[_i[t.race.species].home]),s:t.settings.tau.home,r:"tauceti",rs:"orbital_station"},tau_red:{l:t.support.tau_red,n:z("tau_planet",[ea().red]),s:t.settings.tau.red,r:"tauceti",rs:"orbital_platform"},tau_roid:{l:t.support.tau_roid,n:z("tau_roid_title"),s:t.settings.tau.roid,r:"tauceti",rs:"patrol_ship"}}}function si(e){e=e||ri(),Object.keys(e).forEach((function(e){let t=$(`#grid${e}`)[0];if(t){let e=Sortable.get(t);e&&e.destroy()}}))}const ii=new Date,ci=Ic(),oi=Kc(),ni=["diverse","arrogant","angry","lazy","paranoid","greedy","puny","dumb","nearsighted","gluttony","slow","hard_of_hearing","pessimistic","solitary","pyrophobia","skittish","nyctophilia","frail","atrophy","invertebrate","pathetic","invertebrate","unorganized","slow_regen","snowy","mistrustful","fragrant","freespirit","hooved","heavy","gnawer"];function li(e,a){if(t.settings.boring)return t.race.hrt&&delete t.race.hrt,!1;switch(e){case"elven":case"capybara":case"centaur":case"wendigo":case"entish":case"yeti":return!!(11===ii.getMonth()&&ii.getDate()>=17||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0);case"wolven":case"vulpine":return!!(ci.active||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0);case"arraak":return!!(10===ii.getMonth()&&ii.getDate()>=22&&ii.getDate()<=28||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0);case"seraph":return!!(1===ii.getMonth()&&14===ii.getDate()||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0);case"junker":return!!(oi.active||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0)}return!1}const ui={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}},di={adaptable:{name:z("trait_adaptable_name"),desc:z("trait_adaptable"),type:"genus",val:3,vars(e){switch(e||t.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:z("trait_wasteful_name"),desc:z("trait_wasteful"),type:"genus",val:-3,vars(e){switch(e||t.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:z("trait_xenophobic_name"),desc:z("trait_xenophobic"),type:"genus",val:-5},carnivore:{name:z("trait_carnivore_name"),desc:z("trait_carnivore"),type:"genus",val:3,vars(e){switch(e||t.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:z("trait_beast_name"),desc:z("trait_beast"),type:"genus",val:2,vars(e){switch(e||t.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:z("trait_cautious_name"),desc:z("trait_cautious"),type:"genus",val:-2,vars(e){switch(e||t.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:z("trait_herbivore_name"),desc:z("trait_herbivore"),type:"genus",val:-7},instinct:{name:z("trait_instinct_name"),desc:z("trait_instinct"),type:"genus",val:5,vars(e){switch(e||t.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:z("trait_small_name"),desc:z("trait_small"),type:"genus",val:6,vars(e){switch(e||t.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:z("trait_weak_name"),desc:z("trait_weak"),type:"genus",val:-3,vars(e){switch(e||t.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:z("trait_large_name"),desc:z("trait_large"),type:"genus",val:-5,vars(e){switch(e||t.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:z("trait_strong_name"),desc:z("trait_strong"),type:"genus",val:5,vars(e){switch(e||t.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:z("trait_cold_blooded_name"),desc:z("trait_cold_blooded"),type:"genus",val:-2,vars(e){switch(e||t.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:z("trait_scales_name"),desc:z("trait_scales"),type:"genus",val:5,vars(e){switch(e||t.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:z("trait_flier_name"),desc:z("trait_flier"),type:"genus",val:3,vars(e){switch(e||t.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:z("trait_hollow_bones_name"),desc:z("trait_hollow_bones"),type:"genus",val:2,vars(e){switch(e||t.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:z("trait_sky_lover_name"),desc:z("trait_sky_lover"),type:"genus",val:-2,vars(e){switch(e||t.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:z("trait_rigid_name"),desc:z("trait_rigid"),type:"genus",val:-2,vars(e){switch(e||t.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:z("trait_high_pop_name"),desc:z("trait_high_pop"),type:"genus",val:3,vars(e){switch(e||t.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:z("trait_fast_growth_name"),desc:z("trait_fast_growth"),type:"genus",val:2,vars(e){switch(e||t.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:z("trait_high_metabolism_name"),desc:z("trait_high_metabolism"),type:"genus",val:-1,vars(e){switch(e||t.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:z("trait_photosynth_name"),desc:z("trait_photosynth"),type:"genus",val:3,vars(e){switch(e||t.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:z("trait_sappy_name"),desc:z("trait_sappy",[z("resource_Amber_name")]),type:"genus",val:4,vars(e){switch(e||t.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:z("trait_asymmetrical_name"),desc:z("trait_asymmetrical"),type:"genus",val:-3,vars(e){switch(e||t.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:z("trait_detritivore_name"),desc:z("trait_detritivore"),type:"genus",val:2,vars(e){switch(e||t.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:z("trait_spores_name"),desc:z("trait_spores"),type:"genus",val:2,vars(e){switch(e||t.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:z("trait_spongy_name"),desc:z("trait_spongy"),type:"genus",val:-2},submerged:{name:z("trait_submerged_name"),desc:z("trait_submerged"),type:"genus",val:3},low_light:{name:z("trait_low_light_name"),desc:z("trait_low_light"),type:"genus",val:-2,vars(e){switch(e||t.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:z("trait_elusive_name"),desc:z("trait_elusive"),type:"genus",val:7,vars(e){switch(e||t.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:z("trait_iron_allergy_name"),desc:z("trait_iron_allergy"),type:"genus",val:-4,vars(e){switch(e||t.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:z("trait_smoldering_name"),desc:z("trait_smoldering"),type:"genus",val:7,vars(e){switch(e||t.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:z("trait_cold_intolerance_name"),desc:z("trait_cold_intolerance"),type:"genus",val:-4,vars(e){switch(e||t.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:z("trait_chilled_name"),desc:z("trait_chilled"),type:"genus",val:7,vars(e){switch(e||t.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:z("trait_heat_intolerance_name"),desc:z("trait_heat_intolerance"),type:"genus",val:-4,vars(e){switch(e||t.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:z("trait_scavenger_name"),desc:z("trait_scavenger"),type:"genus",val:3,vars(e){switch(e||t.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:z("trait_nomadic_name"),desc:z("trait_nomadic"),type:"genus",val:-5},immoral:{name:z("trait_immoral_name"),desc:z("trait_immoral"),type:"genus",val:4,vars(e){switch(e||t.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:z("trait_evil_name"),desc:z("trait_evil"),type:"genus",val:0},blissful:{name:z("trait_blissful_name"),desc:z("trait_blissful"),type:"genus",val:3,vars(e){switch(e||t.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:z("trait_pompous_name"),desc:z("trait_pompous"),type:"genus",val:-6,vars(e){switch(e||t.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:z("trait_holy_name"),desc:z("trait_holy"),type:"genus",val:4,vars(e){switch(e||t.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:z("trait_artifical_name"),desc:z("trait_artifical"),type:"genus",val:5,vars(e){switch(e||t.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:z("trait_powered_name"),desc:z("trait_powered"),type:"genus",val:-6,vars(e){switch(e||t.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:z("trait_psychic_name"),desc:z("trait_psychic"),type:"genus",val:10,vars(e){switch(e||t.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:z("trait_tormented_name"),desc:z("trait_tormented"),type:"genus",val:-25,vars(e){switch(e||t.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:z("trait_darkness_name"),desc:z("trait_darkness"),type:"genus",val:1,vars(e){switch(e||t.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:z("trait_unfathomable_name"),desc:z("trait_unfathomable"),type:"genus",val:15,vars(e){switch(e||t.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:z("trait_creative_name"),desc:z("trait_creative"),type:"major",val:8,vars(e){switch(e||t.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:z("trait_diverse_name"),desc:z("trait_diverse"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_studious_name"),desc:z("trait_studious"),type:"major",val:2,vars(e){switch(e||t.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:z("trait_arrogant_name"),desc:z("trait_arrogant"),type:"major",val:-2,vars(e){switch(e||t.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:z("trait_brute_name"),desc:z("trait_brute"),type:"major",val:7,vars(e){switch(e||t.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:z("trait_angry_name"),desc:z("trait_angry"),type:"major",val:-1,vars(e){switch(e||t.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:z("trait_lazy_name"),desc:z("trait_lazy"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_curious_name"),desc:z("trait_curious"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_pack_mentality_name"),desc:z("trait_pack_mentality"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_tracker_name"),desc:z("trait_tracker"),type:"major",val:2,vars(e){switch(e||t.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:z("trait_playful_name"),desc:z("trait_playful"),type:"major",val:5,vars(e){switch(e||t.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:z("trait_freespirit_name"),desc:z("trait_freespirit"),type:"major",val:-3,vars(e){switch(e||t.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:z("trait_beast_of_burden_name"),desc:z("trait_beast_of_burden"),type:"major",val:3},sniper:{name:z("trait_sniper_name"),desc:z("trait_sniper"),type:"major",val:6,vars(e){switch(e||t.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:z("trait_hooved_name"),desc:z("trait_hooved"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_rage_name"),desc:z("trait_rage"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_heavy_name"),desc:z("trait_heavy"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_gnawer_name"),desc:z("trait_gnawer"),type:"major",val:-1,vars(e){switch(e||t.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:z("trait_calm_name"),desc:z("trait_calm"),type:"major",val:6,vars(e){switch(e||t.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:z("trait_pack_rat_name"),desc:z("trait_pack_rat"),type:"major",val:3,vars(e){switch(e||t.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:z("trait_paranoid_name"),desc:z("trait_paranoid"),type:"major",val:-3,vars(e){switch(e||t.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:z("trait_greedy_name"),desc:z("trait_greedy"),type:"major",val:-5,vars(e){switch(e||t.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:z("trait_merchant_name"),desc:z("trait_merchant"),type:"major",val:3,vars(e){switch(e||t.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:z("trait_smart_name"),desc:z("trait_smart"),type:"major",val:6,vars(e){switch(e||t.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:z("trait_puny_name"),desc:z("trait_puny"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_dumb_name"),desc:z("trait_dumb"),type:"major",val:-5,vars(e){switch(e||t.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:z("trait_tough_name"),desc:z("trait_tough"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_nearsighted_name"),desc:z("trait_nearsighted"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_intelligent_name"),desc:z("trait_intelligent"),type:"major",val:7,vars(e){switch(e||t.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:z("trait_regenerative_name"),desc:z("trait_regenerative"),type:"major",val:8,vars:e=>[4],vars(e){switch(e||t.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:z("trait_gluttony_name"),desc:z("trait_gluttony"),type:"major",val:-2,vars(e){switch(e||t.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:z("trait_slow_name"),desc:z("trait_slow"),type:"major",val:-5,vars(e){switch(e||t.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:z("trait_armored_name"),desc:z("trait_armored"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_optimistic_name"),desc:z("trait_optimistic"),type:"major",val:5,vars(e){switch(e||t.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:z("trait_chameleon_name"),desc:z("trait_chameleon"),type:"major",val:6,vars(e){switch(e||t.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:z("trait_slow_digestion_name"),desc:z("trait_slow_digestion"),type:"major",val:1,vars(e){switch(e||t.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:z("trait_hard_of_hearing_name"),desc:z("trait_hard_of_hearing"),type:"major",val:-3,vars(e){switch(e||t.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:z("trait_resourceful_name"),desc:z("trait_resourceful"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_selenophobia_name"),desc:z("trait_selenophobia"),type:"major",val:-6,vars(e){switch(e||t.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:z("trait_leathery_name"),desc:z("trait_leathery"),type:"major",val:2,vars(e){switch(e||t.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:z("trait_pessimistic_name"),desc:z("trait_pessimistic"),type:"major",val:-1,vars(e){switch(e||t.race.pessimistic||1){case.25:return[4];case.5:return[3];case 1:return[2];case 2:case 3:return[1]}}},hoarder:{name:z("trait_hoarder_name"),desc:z("trait_hoarder"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_solitary_name"),desc:z("trait_solitary"),type:"major",val:-1,vars(e){switch(e||t.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:z("trait_kindling_kindred_name"),desc:z("trait_kindling_kindred"),type:"major",val:8,vars(e){switch(e||t.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:z("trait_pyrophobia_name"),desc:z("trait_pyrophobia"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_hyper_name"),desc:z("trait_hyper"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_skittish_name"),desc:z("trait_skittish"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_fragrant_name"),desc:z("trait_fragrant"),type:"major",val:-3,vars(e){switch(e||t.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:z("trait_sticky_name"),desc:z("trait_sticky"),type:"major",val:3,vars(e){switch(e||t.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:z("trait_infectious_name"),desc:z("trait_infectious"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_parasite_name"),desc:z("trait_parasite"),type:"major",val:-4},toxic:{name:z("trait_toxic_name"),desc:z("trait_toxic"),type:"major",val:5,vars(e){switch(e||t.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:z("trait_nyctophilia_name"),desc:z("trait_nyctophilia"),type:"major",val:-3,vars(e){switch(e||t.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:z("trait_infiltrator_name"),desc:z("trait_infiltrator"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_hibernator_name"),desc:z("trait_hibernator"),type:"major",val:-3,vars(e){switch(e||t.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:z("trait_cannibalize_name"),desc:z("trait_cannibalize"),type:"major",val:5,vars(e){switch(e||t.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:z("trait_frail_name"),desc:z("trait_frail"),type:"major",val:-5,vars(e){switch(e||t.race.frail||1){case.25:return[2,2];case.5:return[1,2];case 1:return[1,1];case 2:case 3:return[1,0]}}},malnutrition:{name:z("trait_malnutrition_name"),desc:z("trait_malnutrition"),type:"major",val:1,vars(e){switch(e||t.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:z("trait_claws_name"),desc:z("trait_claws"),type:"major",val:5,vars(e){switch(e||t.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:z("trait_atrophy_name"),desc:z("trait_atrophy"),type:"major",val:-1,vars(e){switch(e||t.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:z("trait_hivemind_name"),desc:z("trait_hivemind"),type:"major",val:9,vars(e){switch(e||t.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:z("trait_tunneler_name"),desc:z("trait_tunneler"),type:"major",val:2,vars(e){switch(e||t.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:z("trait_blood_thirst_name"),desc:z("trait_blood_thirst"),type:"major",val:5,vars(e){switch(e||t.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:z("trait_apex_predator_name"),desc:z("trait_apex_predator"),type:"major",val:6,vars(e){switch(e||t.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:z("trait_invertebrate_name"),desc:z("trait_invertebrate"),type:"major",val:-2,vars(e){switch(e||t.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:z("trait_suction_grip_name"),desc:z("trait_suction_grip"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_befuddle_name"),desc:z("trait_befuddle"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_environmentalist_name"),desc:z("trait_environmentalist"),type:"major",val:-5},unorganized:{name:z("trait_unorganized_name"),desc:z("trait_unorganized"),type:"major",val:-2,vars(e){switch(e||t.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:z("trait_musical_name"),desc:z("trait_musical"),type:"major",val:5,vars(e){switch(e||t.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:z("trait_revive_name"),desc:z("trait_revive"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_slow_regen_name"),desc:z("trait_slow_regen"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_forge_name"),desc:z("trait_forge"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_autoignition_name"),desc:z("trait_autoignition"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_blurry_name"),desc:z("trait_blurry"),type:"major",val:5,vars(e){switch(e||t.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:z("trait_snowy_name"),desc:z("trait_snowy"),type:"major",val:-3,vars(e){switch(e||t.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:z("trait_ravenous_name"),desc:z("trait_ravenous"),type:"major",val:-5,vars(e){switch(e||t.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:z("trait_ghostly_name"),desc:z("trait_ghostly"),type:"major",val:5,vars(e){switch(e||t.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:z("trait_lawless_name"),desc:z("trait_lawless"),type:"major",val:3,vars(e){switch(e||t.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:z("trait_mistrustful_name"),desc:z("trait_mistrustful"),type:"major",val:-1,vars(e){switch(e||t.race.mistrustful||1){case.25:return[4];case.5:return[3];case 1:return[2];case 2:case 3:return[1]}}},humpback:{name:z("trait_humpback_name"),desc:z("trait_humpback"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_thalassophobia_name"),desc:z("trait_thalassophobia"),type:"major",val:-4},fiery:{name:z("trait_fiery_name"),desc:z("trait_fiery"),type:"major",val:10,vars(e){switch(e||t.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:z("trait_terrifying_name"),desc:z("trait_terrifying"),type:"major",val:6,vars(e){switch(e||t.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:z("trait_slaver_name"),desc:z("trait_slaver"),type:"major",val:12,vars(e){switch(e||t.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:z("trait_compact_name"),desc:z("trait_compact"),type:"major",val:10,vars(e){switch(e||t.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:z("trait_conniving_name"),desc:z("trait_conniving"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_pathetic_name"),desc:z("trait_pathetic"),type:"major",val:-5,vars(e){switch(e||t.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:z("trait_spiritual_name"),desc:z("trait_spiritual"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_truthful_name"),desc:z("trait_truthful"),type:"major",val:-7,vars(e){switch(e||t.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:z("trait_unified_name"),desc:z("trait_unified"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_rainbow_name"),desc:z("trait_rainbow"),type:"major",val:3,vars(e){switch(e||t.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:z("trait_magnificent_name"),desc:z("trait_magnificent"),type:"major",val:6,vars(e){switch(e||t.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:z("trait_noble_name"),desc:z("trait_noble"),type:"major",val:-3,vars(e){switch(e||t.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:z("trait_imitation_name"),desc:z("trait_imitation"),type:"major",val:6,vars(e){switch(e||t.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:z("trait_emotionless_name"),desc:z("trait_emotionless"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_logical_name"),desc:z("trait_logical"),type:"major",val:6,vars(e){switch(e||t.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:z("trait_shapeshifter_name"),desc:z("trait_shapeshifter"),type:"major",val:10,vars(e){switch(e||t.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:z("trait_deconstructor_name"),desc:z("trait_deconstructor"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_linked_name"),desc:z("trait_linked"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_dark_dweller_name"),desc:z("trait_dark_dweller"),type:"major",val:-3,vars(e){switch(e||t.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:z("trait_swift_name"),desc:z("trait_swift"),type:"major",val:10,vars(e){switch(e||t.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:z("trait_anthropophagite_name"),desc:z("trait_anthropophagite"),type:"major",val:-2,vars(e){switch(e||t.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:z("trait_living_tool_name"),desc:z("trait_living_tool"),type:"major",val:12,vars(e){switch(e||t.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:z("trait_bloated_name"),desc:z("trait_bloated"),type:"major",val:-10,vars(e){switch(e||t.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:z("trait_ooze_name"),desc:z("trait_ooze"),type:"major",val:-50,vars(e){switch(e||t.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:z("trait_soul_eater_name"),desc:z("trait_soul_eater"),type:"special",val:0},untapped:{name:z("trait_untapped_name"),desc:z("trait_untapped"),type:"special",val:0},emfield:{name:z("trait_emfield_name"),desc:z("trait_emfield"),type:"special",val:-20},tactical:{name:z("trait_tactical_name"),desc:z("trait_tactical"),type:"minor",vars:e=>[5]},analytical:{name:z("trait_analytical_name"),desc:z("trait_analytical"),type:"minor",vars:e=>[1]},promiscuous:{name:z("trait_promiscuous_name"),desc:z("trait_promiscuous"),type:"minor",vars:e=>[1,.02]},resilient:{name:z("trait_resilient_name"),desc:z("trait_resilient"),type:"minor",vars:e=>[2]},cunning:{name:z("trait_cunning_name"),desc:z("trait_cunning"),type:"minor",vars:e=>[5]},hardy:{name:z("trait_hardy_name"),desc:z("trait_hardy"),type:"minor",vars:e=>[1]},ambidextrous:{name:z("trait_ambidextrous_name"),desc:z("trait_ambidextrous"),type:"minor",vars:e=>[3,2]},industrious:{name:z("trait_industrious_name"),desc:z("trait_industrious"),type:"minor",vars:e=>[2]},content:{name:z("trait_content_name"),desc:z("trait_content"),type:"minor"},fibroblast:{name:z("trait_fibroblast_name"),desc:z("trait_fibroblast"),type:"minor",vars:e=>[2]},metallurgist:{name:z("trait_metallurgist_name"),desc:z("trait_metallurgist"),type:"minor",vars:e=>[4]},gambler:{name:z("trait_gambler_name"),desc:z("trait_gambler"),type:"minor",vars:e=>[4]},persuasive:{name:z("trait_persuasive_name"),desc:z("trait_persuasive"),type:"minor",vars:e=>[1]},fortify:{name:z("trait_fortify_name"),desc:z("trait_fortify"),type:"special"},mastery:{name:z("trait_mastery_name"),desc:z("trait_mastery"),type:"special",vars:e=>[1]}},_i={protoplasm:{name:z("race_protoplasm"),desc:z("race_protoplasm_desc"),type:"organism",home:z("race_prehistoric"),entity:"ooze",traits:{},solar:{red:z("race_human_solar_red"),hell:z("race_human_solar_hell"),gas:z("race_human_solar_gas"),gas_moon:z("race_human_solar_gas_moon"),dwarf:z("race_human_solar_dwarf")},fanaticism:"none",basic:()=>!1},human:{name:z("race_human"),desc:z("race_human_desc"),type:"humanoid",home:z("race_human_home"),entity:z("race_human_entity"),traits:{creative:1,diverse:1},solar:{red:z("race_human_solar_red"),hell:z("race_human_solar_hell"),gas:z("race_human_solar_gas"),gas_moon:z("race_human_solar_gas_moon"),dwarf:z("race_human_solar_dwarf")},fanaticism:"creative",basic:()=>!0},elven:{name:z("race_elven"),desc:z(li("elven")?"race_xmas_elf_desc":"race_elven_desc"),type:"humanoid",home:z(li("elven")?"race_xmas_elf_home":"race_elven_home"),entity:z("race_elven_entity"),traits:{studious:1,arrogant:1},solar:{red:z(li("elven")?"race_xmas_elf_solar_red":"race_elven_solar_red"),hell:z(li("elven")?"race_xmas_elf_solar_hell":"race_elven_solar_hell"),gas:z(li("elven")?"race_xmas_elf_solar_gas":"race_elven_solar_gas"),gas_moon:z(li("elven")?"race_xmas_elf_solar_gas_moon":"race_elven_solar_gas_moon"),dwarf:z(li("elven")?"race_xmas_elf_solar_dwarf":"race_elven_solar_dwarf")},fanaticism:"studious",basic:()=>!0},orc:{name:z("race_orc"),desc:z("race_orc_desc"),type:"humanoid",home:z("race_orc_home"),entity:z("race_orc_entity"),traits:{brute:1,angry:1},solar:{red:z("race_orc_solar_red"),hell:z("race_orc_solar_hell"),gas:z("race_orc_solar_gas"),gas_moon:z("race_orc_solar_gas_moon"),dwarf:z("race_orc_solar_dwarf")},fanaticism:"brute",basic:()=>!0},cath:{name:z("race_cath"),desc:z("race_cath_desc"),type:"carnivore",home:z("race_cath_home"),entity:z("race_cath_entity"),traits:{lazy:1,curious:1},solar:{red:z("race_cath_solar_red"),hell:z("race_cath_solar_hell"),gas:z("race_cath_solar_gas"),gas_moon:z("race_cath_solar_gas_moon"),dwarf:z("race_cath_solar_dwarf")},fanaticism:"curious",basic:()=>!0},wolven:{name:li("wolven")?z("race_rabbit"):z("race_wolven"),desc:li("wolven")?z("race_rabbit_desc"):z("race_wolven_desc"),type:"carnivore",home:li("wolven")?z("race_rabbit_home"):z("race_wolven_home"),entity:li("wolven")?z("race_rabbit_entity"):z("race_wolven_entity"),traits:{pack_mentality:1,tracker:1},solar:{red:li("wolven")?z("race_rabbit_solar_red"):z("race_wolven_solar_red"),hell:li("wolven")?z("race_rabbit_solar_hell"):z("race_wolven_solar_hell"),gas:li("wolven")?z("race_rabbit_solar_gas"):z("race_wolven_solar_gas"),gas_moon:li("wolven")?z("race_rabbit_solar_gas_moon"):z("race_wolven_solar_gas_moon"),dwarf:li("wolven")?z("race_rabbit_solar_dwarf"):z("race_wolven_solar_dwarf")},fanaticism:"tracker",basic:()=>!0},vulpine:{name:li("vulpine")?z("race_chocolate_rabbit"):z("magic"===t.race.universe?"race_kitsune":"race_vulpine"),desc:()=>li("vulpine")?z("race_chocolate_rabbit_desc"):z("race_vulpine_desc",[z("magic"===t.race.universe?"race_kitsune":"race_vulpine"),t.race.hasOwnProperty("fox_color")?z(`color_${t.race.fox_color}`):z("color_red")]),type:"carnivore",home:li("vulpine")?z("race_chocolate_rabbit_home"):z("race_vulpine_home"),entity:z("race_vulpine_entity"),traits:{playful:1,freespirit:1},solar:{red:li("vulpine")?z("race_chocolate_rabbit_solar_red"):z("race_vulpine_solar_red"),hell:li("vulpine")?z("race_chocolate_rabbit_solar_hell"):z("race_vulpine_solar_hell"),gas:li("vulpine")?z("race_chocolate_rabbit_solar_gas"):z("race_vulpine_solar_gas"),gas_moon:li("vulpine")?z("race_chocolate_rabbit_solar_gas_moon"):z("race_vulpine_solar_gas_moon"),dwarf:li("vulpine")?z("race_chocolate_rabbit_solar_dwarf"):z("race_vulpine_solar_dwarf")},fanaticism:"playful",basic:()=>!0},centaur:{name:z(li("centaur")?"race_reindeer":"race_centaur"),desc:z(li("centaur")?"race_reindeer_desc":"race_centaur_desc"),type:"herbivore",home:z(li("centaur")?"race_reindeer_home":"race_centaur_home"),entity:z(li("centaur")?"race_reindeer_entity":"race_centaur_entity"),traits:{sniper:1,hooved:1},solar:{red:z(li("centaur")?"race_reindeer_solar_red":"race_centaur_solar_red"),hell:z(li("centaur")?"race_reindeer_solar_hell":"race_centaur_solar_hell"),gas:z(li("centaur")?"race_reindeer_solar_gas":"race_centaur_solar_gas"),gas_moon:z(li("centaur")?"race_reindeer_solar_gas_moon":"race_centaur_solar_gas_moon"),dwarf:z(li("centaur")?"race_reindeer_solar_dwarf":"race_centaur_solar_dwarf")},fanaticism:"sniper",basic:()=>!0},rhinotaur:{name:z("race_rhinotaur"),desc:z("race_rhinotaur_desc"),type:"herbivore",home:z("race_rhinotaur_home"),entity:z("race_rhinotaur_entity"),traits:{rage:1,heavy:1},solar:{red:z("race_rhinotaur_solar_red"),hell:z("race_rhinotaur_solar_hell"),gas:z("race_rhinotaur_solar_gas"),gas_moon:z("race_rhinotaur_solar_gas_moon"),dwarf:z("race_rhinotaur_solar_dwarf")},fanaticism:"rage",basic:()=>!0},capybara:{name:z(li("capybara")?"race_donkey":"race_capybara"),desc:z(li("capybara")?"race_donkey_desc":"race_capybara_desc"),type:"herbivore",home:z(li("capybara")?"race_donkey_home":"race_capybara_home"),entity:z(li("capybara")?"race_donkey_entity":"race_capybara_entity"),traits:{gnawer:1,calm:1},solar:{red:z(li("capybara")?"race_donkey_solar_red":"race_capybara_solar_red"),hell:z(li("capybara")?"race_donkey_solar_hell":"race_capybara_solar_hell"),gas:z(li("capybara")?"race_donkey_solar_gas":"race_capybara_solar_gas"),gas_moon:z(li("capybara")?"race_donkey_solar_gas_moon":"race_capybara_solar_gas_moon"),dwarf:z(li("capybara")?"race_donkey_solar_dwarf":"race_capybara_solar_dwarf")},fanaticism:"calm",basic:()=>!0},kobold:{name:z("race_kobold"),desc:z("race_kobold_desc"),type:"small",home:z("race_kobold_home"),entity:z("race_kobold_entity"),traits:{pack_rat:1,paranoid:1},solar:{red:z("race_kobold_solar_red"),hell:z("race_kobold_solar_hell"),gas:z("race_kobold_solar_gas"),gas_moon:z("race_kobold_solar_gas_moon"),dwarf:z("race_kobold_solar_dwarf")},fanaticism:"pack_rat",basic:()=>!0},goblin:{name:z("race_goblin"),desc:z("race_goblin_desc"),type:"small",home:z("race_goblin_home"),entity:z("race_goblin_entity"),traits:{greedy:1,merchant:1},solar:{red:z("race_goblin_solar_red"),hell:z("race_goblin_solar_hell"),gas:z("race_goblin_solar_gas"),gas_moon:z("race_goblin_solar_gas_moon"),dwarf:z("race_goblin_solar_dwarf")},fanaticism:"merchant",basic:()=>!0},gnome:{name:z("race_gnome"),desc:z("race_gnome_desc"),type:"small",home:z("race_gnome_home"),entity:z("race_gnome_entity"),traits:{smart:1,puny:1},solar:{red:z("race_gnome_solar_red"),hell:z("race_gnome_solar_hell"),gas:z("race_gnome_solar_gas"),gas_moon:z("race_gnome_solar_gas_moon"),dwarf:z("race_gnome_solar_dwarf")},fanaticism:"smart",basic:()=>!0},ogre:{name:z("race_ogre"),desc:z("race_ogre_desc"),type:"giant",home:z("race_ogre_home"),entity:z("race_ogre_entity"),traits:{dumb:1,tough:1},solar:{red:z("race_ogre_solar_red"),hell:z("race_ogre_solar_hell"),gas:z("race_ogre_solar_gas"),gas_moon:z("race_ogre_solar_gas_moon"),dwarf:z("race_ogre_solar_dwarf")},fanaticism:"tough",basic:()=>!0},cyclops:{name:z("race_cyclops"),desc:z("race_cyclops_desc"),type:"giant",home:z("race_cyclops_home"),entity:z("race_cyclops_entity"),traits:{nearsighted:1,intelligent:1},solar:{red:z("race_cyclops_solar_red"),hell:z("race_cyclops_solar_hell"),gas:z("race_cyclops_solar_gas"),gas_moon:z("race_cyclops_solar_gas_moon"),dwarf:z("race_cyclops_solar_dwarf")},fanaticism:"intelligent",basic:()=>!0},troll:{name:z("race_troll"),desc:z("race_troll_desc"),type:"giant",home:z("race_troll_home"),entity:z("race_troll_entity"),traits:{regenerative:1,gluttony:1},solar:{red:z("race_troll_solar_red"),hell:z("race_troll_solar_hell"),gas:z("race_troll_solar_gas"),gas_moon:z("race_troll_solar_gas_moon"),dwarf:z("race_troll_solar_dwarf")},fanaticism:"regenerative",basic:()=>!0},tortoisan:{name:z("race_tortoisan"),desc:()=>z("race_tortoisan_desc",[t.race.hasOwnProperty("shell_color")?z(`color_${t.race.shell_color}`):z("color_green")]),type:"reptilian",home:z("race_tortoisan_home"),entity:z("race_tortoisan_entity"),traits:{slow:1,armored:1},solar:{red:z("race_tortoisan_solar_red"),hell:z("race_tortoisan_solar_hell"),gas:z("race_tortoisan_solar_gas"),gas_moon:z("race_tortoisan_solar_gas_moon"),dwarf:z("race_tortoisan_solar_dwarf")},fanaticism:"armored",basic:()=>!0},gecko:{name:z("race_gecko"),desc:z("race_gecko_desc"),type:"reptilian",home:z("race_gecko_home"),entity:z("race_gecko_entity"),traits:{optimistic:1,chameleon:1},solar:{red:z("race_gecko_solar_red"),hell:z("race_gecko_solar_hell"),gas:z("race_gecko_solar_gas"),gas_moon:z("race_gecko_solar_gas_moon"),dwarf:z("race_gecko_solar_dwarf")},fanaticism:"optimistic",basic:()=>!0},slitheryn:{name:z("race_slitheryn"),desc:z("race_slitheryn_desc"),type:"reptilian",home:z("race_slitheryn_home"),entity:z("race_slitheryn_entity"),traits:{slow_digestion:1,hard_of_hearing:1},solar:{red:z("race_slitheryn_solar_red"),hell:z("race_slitheryn_solar_hell"),gas:z("race_slitheryn_solar_gas"),gas_moon:z("race_slitheryn_solar_gas_moon"),dwarf:z("race_slitheryn_solar_dwarf")},fanaticism:"slow_digestion",basic:()=>!0},arraak:{name:z(li("arraak")?"race_turkey":"race_arraak"),desc:z(li("arraak")?"race_turkey_desc":"race_arraak_desc"),type:"avian",home:z(li("arraak")?"race_turkey_home":"race_arraak_home"),entity:z("race_arraak_entity"),traits:{resourceful:1,selenophobia:1},solar:{red:z(li("arraak")?"race_turkey_solar_red":"race_arraak_solar_red"),hell:z(li("arraak")?"race_turkey_solar_hell":"race_arraak_solar_hell"),gas:z(li("arraak")?"race_turkey_solar_gas":"race_arraak_solar_gas"),gas_moon:z(li("arraak")?"race_turkey_solar_gas_moon":"race_arraak_solar_gas_moon"),dwarf:z(li("arraak")?"race_turkey_solar_dwarf":"race_arraak_solar_dwarf")},fanaticism:"resourceful",basic:()=>!0},pterodacti:{name:z("race_pterodacti"),desc:z("race_pterodacti_desc"),type:"avian",home:z("race_pterodacti_home"),entity:z("race_pterodacti_entity"),traits:{leathery:1,pessimistic:1},solar:{red:z("race_pterodacti_solar_red"),hell:z("race_pterodacti_solar_hell"),gas:z("race_pterodacti_solar_gas"),gas_moon:z("race_pterodacti_solar_gas_moon"),dwarf:z("race_pterodacti_solar_dwarf")},fanaticism:"leathery",basic:()=>!0},dracnid:{name:z("race_dracnid"),desc:z("race_dracnid_desc"),type:"avian",home:z("race_dracnid_home"),entity:z("race_dracnid_entity"),traits:{hoarder:1,solitary:1},solar:{red:z("race_dracnid_solar_red"),hell:z("race_dracnid_solar_hell"),gas:z("race_dracnid_solar_gas"),gas_moon:z("race_dracnid_solar_gas_moon"),dwarf:z("race_dracnid_solar_dwarf")},fanaticism:"hoarder",basic:()=>!0},entish:{name:z(li("entish")?"race_spruce":"race_entish"),desc:z(li("entish")?"race_spruce_desc":"race_entish_desc"),type:"plant",home:z(li("entish")?"race_spruce_home":"race_entish_home"),entity:z(li("entish")?"race_spruce_entity":"race_entish_entity"),traits:{kindling_kindred:1,pyrophobia:1},solar:{red:z(li("entish")?"race_spruce_solar_red":"race_entish_solar_red"),hell:z(li("entish")?"race_spruce_solar_hell":"race_entish_solar_hell"),gas:z(li("entish")?"race_spruce_solar_gas":"race_entish_solar_gas"),gas_moon:z(li("entish")?"race_spruce_solar_gas_moon":"race_entish_solar_gas_moon"),dwarf:z(li("entish")?"race_spruce_solar_dwarf":"race_entish_solar_dwarf")},fanaticism:"kindling_kindred",basic:()=>!0},cacti:{name:z("race_cacti"),desc:z("race_cacti_desc"),type:"plant",home:z("race_cacti_home"),entity:z("race_cacti_entity"),traits:{hyper:1,skittish:1},solar:{red:z("race_cacti_solar_red"),hell:z("race_cacti_solar_hell"),gas:z("race_cacti_solar_gas"),gas_moon:z("race_cacti_solar_gas_moon"),dwarf:z("race_cacti_solar_dwarf")},fanaticism:"hyper",basic:()=>!0},pinguicula:{name:z("race_pinguicula"),desc:z("race_pinguicula_desc"),type:"plant",home:z("race_pinguicula_home"),entity:z("race_pinguicula_entity"),traits:{fragrant:1,sticky:1},solar:{red:z("race_pinguicula_solar_red"),hell:z("race_pinguicula_solar_hell"),gas:z("race_pinguicula_solar_gas"),gas_moon:z("race_pinguicula_solar_gas_moon"),dwarf:z("race_pinguicula_solar_dwarf")},fanaticism:"sticky",basic:()=>!0},sporgar:{name:z("race_sporgar"),desc:z("race_sporgar_desc"),type:"fungi",home:z("race_sporgar_home"),entity:z("race_sporgar_entity"),traits:{infectious:1,parasite:1},solar:{red:z("race_sporgar_solar_red"),hell:z("race_sporgar_solar_hell"),gas:z("race_sporgar_solar_gas"),gas_moon:z("race_sporgar_solar_gas_moon"),dwarf:z("race_sporgar_solar_dwarf")},fanaticism:"infectious",basic:()=>!1},shroomi:{name:z("race_shroomi"),desc:z("race_shroomi_desc"),type:"fungi",home:z("race_shroomi_home"),entity:z("race_shroomi_entity"),traits:{toxic:1,nyctophilia:1},solar:{red:z("race_shroomi_solar_red"),hell:z("race_shroomi_solar_hell"),gas:z("race_shroomi_solar_gas"),gas_moon:z("race_shroomi_solar_gas_moon"),dwarf:z("race_shroomi_solar_dwarf")},fanaticism:"toxic",basic:()=>!0},moldling:{name:z("race_moldling"),desc:z("race_moldling_desc"),type:"fungi",home:z("race_moldling_home"),entity:z("race_moldling_entity"),traits:{infiltrator:1,hibernator:1},solar:{red:z("race_moldling_solar_red"),hell:z("race_moldling_solar_hell"),gas:z("race_moldling_solar_gas"),gas_moon:z("race_moldling_solar_gas_moon"),dwarf:z("race_moldling_solar_dwarf")},fanaticism:"infiltrator",basic:()=>!0},mantis:{name:z("race_mantis"),desc:z("race_mantis_desc"),type:"insectoid",home:z("race_mantis_home"),entity:z("race_mantis_entity"),traits:{cannibalize:1,malnutrition:1},solar:{red:z("race_mantis_solar_red"),hell:z("race_mantis_solar_hell"),gas:z("race_mantis_solar_gas"),gas_moon:z("race_mantis_solar_gas_moon"),dwarf:z("race_mantis_solar_dwarf")},fanaticism:"cannibalize",basic:()=>!0},scorpid:{name:z("race_scorpid"),desc:z("race_scorpid_desc"),type:"insectoid",home:z("race_scorpid_home"),entity:z("race_scorpid_entity"),traits:{claws:1,atrophy:1},solar:{red:z("race_scorpid_solar_red"),hell:z("race_scorpid_solar_hell"),gas:z("race_scorpid_solar_gas"),gas_moon:z("race_scorpid_solar_gas_moon"),dwarf:z("race_scorpid_solar_dwarf")},fanaticism:"claws",basic:()=>!0},antid:{name:z("race_antid"),desc:z("race_antid_desc"),type:"insectoid",home:z("race_antid_home"),entity:z("race_antid_entity"),traits:{hivemind:1,tunneler:1},solar:{red:z("race_antid_solar_red"),hell:z("race_antid_solar_hell"),gas:z("race_antid_solar_gas"),gas_moon:z("race_antid_solar_gas_moon"),dwarf:z("race_antid_solar_dwarf")},fanaticism:"hivemind",basic:()=>!0},sharkin:{name:z("race_sharkin"),desc:z("race_sharkin_desc"),type:"aquatic",home:z("race_sharkin_home"),entity:z("race_sharkin_entity"),traits:{blood_thirst:1,apex_predator:1},solar:{red:z("race_sharkin_solar_red"),hell:z("race_sharkin_solar_hell"),gas:z("race_sharkin_solar_gas"),gas_moon:z("race_sharkin_solar_gas_moon"),dwarf:z("race_sharkin_solar_dwarf")},fanaticism:"blood_thirst",basic:()=>!!["oceanic","swamp"].includes(t.city.biome)},octigoran:{name:z("race_octigoran"),desc:z("race_octigoran_desc"),type:"aquatic",home:z("race_octigoran_home"),entity:z("race_octigoran_entity"),traits:{invertebrate:1,suction_grip:1},solar:{red:z("race_octigoran_solar_red"),hell:z("race_octigoran_solar_hell"),gas:z("race_octigoran_solar_gas"),gas_moon:z("race_octigoran_solar_gas_moon"),dwarf:z("race_octigoran_solar_dwarf")},fanaticism:"suction_grip",basic:()=>!!["oceanic","swamp"].includes(t.city.biome)},dryad:{name:z("race_dryad"),desc:z("race_dryad_desc"),type:"fey",home:z("race_dryad_home"),entity:z("race_dryad_entity"),traits:{befuddle:1,environmentalist:1,kindling_kindred:1},solar:{red:z("race_dryad_solar_red"),hell:z("race_dryad_solar_hell"),gas:z("race_dryad_solar_gas"),gas_moon:z("race_dryad_solar_gas_moon"),dwarf:z("race_dryad_solar_dwarf")},fanaticism:"befuddle",basic:()=>!!["forest","swamp","taiga"].includes(t.city.biome)},satyr:{name:z("race_satyr"),desc:z("race_satyr_desc"),type:"fey",home:z("race_satyr_home"),entity:z("race_satyr_entity"),traits:{unorganized:1,musical:1},solar:{red:z("race_satyr_solar_red"),hell:z("race_satyr_solar_hell"),gas:z("race_satyr_solar_gas"),gas_moon:z("race_satyr_solar_gas_moon"),dwarf:z("race_satyr_solar_dwarf")},fanaticism:"musical",basic:()=>!!["forest","swamp","taiga"].includes(t.city.biome)},phoenix:{name:z("race_phoenix"),desc:z("race_phoenix_desc"),type:"heat",home:z("race_phoenix_home"),entity:z("race_phoenix_entity"),traits:{revive:1,slow_regen:1},solar:{red:z("race_phoenix_solar_red"),hell:z("race_phoenix_solar_hell"),gas:z("race_phoenix_solar_gas"),gas_moon:z("race_phoenix_solar_gas_moon"),dwarf:z("race_phoenix_solar_dwarf")},fanaticism:"revive",basic:()=>!!["volcanic","ashland"].includes(t.city.biome)},salamander:{name:z("race_salamander"),desc:z("race_salamander_desc"),type:"heat",home:z("race_salamander_home"),entity:z("race_salamander_entity"),traits:{forge:1,autoignition:1},solar:{red:z("race_salamander_solar_red"),hell:z("race_salamander_solar_hell"),gas:z("race_salamander_solar_gas"),gas_moon:z("race_salamander_solar_gas_moon"),dwarf:z("race_salamander_solar_dwarf")},fanaticism:"forge",basic:()=>!!["volcanic","ashland"].includes(t.city.biome)},yeti:{name:z(li("yeti")?"race_snowman":"race_yeti"),desc:z(li("yeti")?"race_snowman_desc":"race_yeti_desc"),type:"polar",home:z(li("yeti")?"race_snowman_home":"race_yeti_home"),entity:z(li("yeti")?"race_snowman_entity":"race_yeti_entity"),traits:{blurry:1,snowy:1},solar:{red:z(li("yeti")?"race_snowman_solar_red":"race_yeti_solar_red"),hell:z(li("yeti")?"race_snowman_solar_hell":"race_yeti_solar_hell"),gas:z(li("yeti")?"race_snowman_solar_gas":"race_yeti_solar_gas"),gas_moon:z(li("yeti")?"race_snowman_solar_gas_moon":"race_yeti_solar_gas_moon"),dwarf:z(li("yeti")?"race_snowman_solar_dwarf":"race_yeti_solar_dwarf")},fanaticism:"blurry",basic:()=>!!["tundra","taiga"].includes(t.city.biome)},wendigo:{name:z(li("wendigo")?"race_krampus":"race_wendigo"),desc:z(li("wendigo")?"race_krampus_desc":"race_wendigo_desc"),type:"polar",home:z(li("wendigo")?"race_krampus_home":"race_wendigo_home"),entity:z(li("wendigo")?"race_krampus_entity":"race_wendigo_entity"),traits:{ravenous:1,ghostly:1,soul_eater:1},solar:{red:z(li("wendigo")?"race_krampus_solar_red":"race_wendigo_solar_red"),hell:z(li("wendigo")?"race_krampus_solar_hell":"race_wendigo_solar_hell"),gas:z(li("wendigo")?"race_krampus_solar_gas":"race_wendigo_solar_gas"),gas_moon:z(li("wendigo")?"race_krampus_solar_gas_moon":"race_wendigo_solar_gas_moon"),dwarf:z(li("wendigo")?"race_krampus_solar_dwarf":"race_wendigo_solar_dwarf")},fanaticism:"ghostly",basic:()=>!!["tundra","taiga"].includes(t.city.biome)},tuskin:{name:z("race_tuskin"),desc:z("race_tuskin_desc"),type:"sand",home:z("race_tuskin_home"),entity:z("race_tuskin_entity"),traits:{lawless:1,mistrustful:1},solar:{red:z("race_tuskin_solar_red"),hell:z("race_tuskin_solar_hell"),gas:z("race_tuskin_solar_gas"),gas_moon:z("race_tuskin_solar_gas_moon"),dwarf:z("race_tuskin_solar_dwarf")},fanaticism:"lawless",basic:()=>!!["desert","ashland"].includes(t.city.biome)},kamel:{name:z("race_kamel"),desc:z("race_kamel_desc"),type:"sand",home:z("race_kamel_home"),entity:z("race_kamel_entity"),traits:{humpback:1,thalassophobia:1},solar:{red:z("race_kamel_solar_red"),hell:z("race_kamel_solar_hell"),gas:z("race_kamel_solar_gas"),gas_moon:z("race_kamel_solar_gas_moon"),dwarf:z("race_kamel_solar_dwarf")},fanaticism:"humpback",basic:()=>!!["desert","ashland"].includes(t.city.biome)},balorg:{name:z("race_balorg"),desc:z("race_balorg_desc"),type:"demonic",home:z("race_balorg_home"),entity:z("race_balorg_entity"),traits:{fiery:1,terrifying:1,slaver:1},solar:{red:z("race_balorg_solar_red"),hell:z("race_balorg_solar_hell"),gas:z("race_balorg_solar_gas"),gas_moon:z("race_balorg_solar_gas_moon"),dwarf:z("race_balorg_solar_dwarf")},fanaticism:"fiery",basic:()=>"hellscape"===t.city.biome},imp:{name:z("race_imp"),desc:z("race_imp_desc"),type:"demonic",home:z("race_imp_home"),entity:z("race_imp_entity"),traits:{compact:1,conniving:1,pathetic:1},solar:{red:z("race_imp_solar_red"),hell:z("race_imp_solar_hell"),gas:z("race_imp_solar_gas"),gas_moon:z("race_imp_solar_gas_moon"),dwarf:z("race_imp_solar_dwarf")},fanaticism:"conniving",basic:()=>"hellscape"===t.city.biome},seraph:{name:z(li("seraph")?"race_cherub":"race_seraph"),desc:z(li("seraph")?"race_cherub_desc":"race_seraph_desc"),type:"angelic",home:z(li("seraph")?"race_cherub_home":"race_seraph_home"),entity:z(li("seraph")?"race_cherub_entity":"race_seraph_entity"),traits:{unified:1,spiritual:1,truthful:1},solar:{red:z(li("seraph")?"race_cherub_solar_red":"race_seraph_solar_red"),hell:z(li("seraph")?"race_cherub_solar_hell":"race_seraph_solar_hell"),gas:z(li("seraph")?"race_cherub_solar_gas":"race_seraph_solar_gas"),gas_moon:z(li("seraph")?"race_cherub_solar_gas_moon":"race_seraph_solar_gas_moon"),dwarf:z(li("seraph")?"race_cherub_solar_dwarf":"race_seraph_solar_dwarf")},fanaticism:"spiritual",basic:()=>"eden"===t.city.biome},unicorn:{name:z("race_unicorn"),desc:z("race_unicorn_desc"),type:"angelic",home:z("race_unicorn_home"),entity:z("race_unicorn_entity"),traits:{rainbow:1,magnificent:1,noble:1},solar:{red:z("race_unicorn_solar_red"),hell:z("race_unicorn_solar_hell"),gas:z("race_unicorn_solar_gas"),gas_moon:z("race_unicorn_solar_gas_moon"),dwarf:z("race_unicorn_solar_dwarf")},fanaticism:"magnificent",basic:()=>"eden"===t.city.biome},synth:{name:z("race_synth"),desc(){let e=t.race.hasOwnProperty("srace")?t.race.srace:"human";return z("race_synth_desc",[_i[e].name])},type:"synthetic",home:z("race_synth_home"),entity:z("race_synth_entity"),traits:{imitation:1,emotionless:1,logical:1},solar:{red:z("race_synth_solar_red"),hell:z("race_synth_solar_hell"),gas:z("race_synth_solar_gas"),gas_moon:z("race_synth_solar_gas_moon"),dwarf:z("race_synth_solar_dwarf")},fanaticism:"logical",basic:()=>!1},nano:{name:z("race_nano"),desc:z("race_nano_desc"),type:"synthetic",home:z("race_nano_home"),entity:z("race_nano_entity"),traits:{deconstructor:1,linked:1,shapeshifter:1},solar:{red:z("race_nano_solar_red"),hell:z("race_nano_solar_hell"),gas:z("race_nano_solar_gas"),gas_moon:z("race_nano_solar_gas_moon"),dwarf:z("race_nano_solar_dwarf")},fanaticism:"shapeshifter",basic:()=>!1},ghast:{name:z("race_ghast"),desc:z("race_ghast_desc"),type:"eldritch",home:z("race_ghast_home"),entity:z("race_ghast_entity"),traits:{dark_dweller:1,swift:1,anthropophagite:1},solar:{red:z("race_ghast_solar_red"),hell:z("race_ghast_solar_hell"),gas:z("race_ghast_solar_gas"),gas_moon:z("race_ghast_solar_gas_moon"),dwarf:z("race_ghast_solar_dwarf")},fanaticism:"swift",basic:()=>!1},shoggoth:{name:z("race_shoggoth"),desc:z("race_shoggoth_desc"),type:"eldritch",home:z("race_shoggoth_home"),entity:z("race_shoggoth_entity"),traits:{living_tool:1,bloated:1},solar:{red:z("race_shoggoth_solar_red"),hell:z("race_shoggoth_solar_hell"),gas:z("race_shoggoth_solar_gas"),gas_moon:z("race_shoggoth_solar_gas_moon"),dwarf:z("race_shoggoth_solar_dwarf")},fanaticism:"living_tool",basic:()=>!1},junker:{name:li("junker")?z("race_ghoul"):z("race_junker"),desc:li("junker")?z("race_ghoul_desc"):z("race_junker_desc"),type:t.race.hasOwnProperty("jtype")?t.race.jtype:"humanoid",home:li("junker")?z("race_ghoul_home"):z("race_junker_home"),entity:li("junker")?z("race_ghoul_entity"):z("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:li("junker")?z("race_ghoul_solar_red"):z("race_junker_solar_red"),hell:li("junker")?z("race_ghoul_solar_hell"):z("race_junker_solar_hell"),gas:li("junker")?z("race_ghoul_solar_gas"):z("race_junker_solar_gas"),gas_moon:li("junker")?z("race_ghoul_solar_gas_moon"):z("race_junker_solar_gas_moon"),dwarf:li("junker")?z("race_ghoul_solar_dwarf"):z("race_junker_solar_dwarf")},fanaticism:"none",basic:()=>!1},sludge:{name:z("race_sludge"),desc:z("race_sludge_desc"),type:t.race.hasOwnProperty("jtype")?t.race.jtype:"humanoid",home:z("race_sludge_home"),entity:z("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:z("race_sludge_solar_red"),hell:z("race_sludge_solar_hell"),gas:z("race_sludge_solar_gas"),gas_moon:z("race_sludge_solar_gas_moon"),dwarf:z("race_sludge_solar_dwarf")},fanaticism:"ooze",basic:()=>!1},custom:function(){if(t.hasOwnProperty("custom")&&t.custom.hasOwnProperty("race0")){let e={};for(let a=0;adi[a].val&&(a=t.custom.race0.traits[e]);return{name:t.custom.race0.name,desc:t.custom.race0.desc,type:t.custom.race0.genus,home:t.custom.race0.home,entity:t.custom.race0.entity,traits:e,solar:{red:t.custom.race0.red,hell:t.custom.race0.hell,gas:t.custom.race0.gas,gas_moon:t.custom.race0.gas_moon,dwarf:t.custom.race0.dwarf},fanaticism:a,basic:()=>!1}}return{}}()},pi={organism:{},humanoid:{},carnivore:{},herbivore:{},omnivore:{},small:{},giant:{},reptilian:{},avian:{},insectoid:{},plant:{},fungi:{},aquatic:{},fey:{},heat:{},polar:{},sand:{},demonic:{},angelic:{},synthetic:{},eldritch:{}};function hi(e,a){let r=1,s=D("theorist",1);!s||"factory"!==a&&"miner"!==a&&"lumberjack"!==a||(r*=1-s/100);let i=D("inspirational",0);!i||"farmer"!==a&&"factory"!==a&&"miner"!==a&&"lumberjack"!==a||(r*=1+i/100);let c=D("dirty_jobs",2);if(c&&"miner"===a&&(r*=1+c/100),t.race.rejuvenated&&["lumberjack","miner","factory"].includes(a)&&(r*=1.1),"lumberjack"===a&&t.race.evil&&!t.race.soul_eater&&(t.race.living_tool?r*=1+di.living_tool.vars()[0]*(t.tech.science&&t.tech.science>0?.3*t.tech.science:0):r*=1+.4*(t.tech.reclaimer-1)),!t.race.powered||"factory"!==a&&"miner"!==a&&"lumberjack"!==a||(r*=1+di.powered.vars()[1]/100),t.race.artifical&&"science"===a&&(r*=1+di.artifical.vars()[0]/100),t.race.hivemind&&"farmer"!==a&&!t.race.lone_survivor){let s=di.hivemind.vars()[0],i=.05;t.race.high_pop&&"army"!==a&&"hellArmy"!==a&&(s*=di.high_pop.vars()[0],i=.5/(di.hivemind.vars()[0]*di.high_pop.vars()[0])),r*=e<=s?e*i+(1-s*i):1-("army"===a||"hellArmy"===a?.99:t.race.high_pop?.985:.98)**(e-s)+1}let o=Oi("antid");if(o>0&&(r*=1+(1-("army"===a||"hellArmy"===a?.99:t.race.high_pop?.985:.98)**(e*o/4))/2),t.race.cold_blooded&&"army"!==a&&"hellArmy"!==a&&"factory"!==a&&"science"!==a){switch(t.city.calendar.temp){case 0:r*=1-di.cold_blooded.vars()[0]/100;break;case 2:r*=1+di.cold_blooded.vars()[1]/100;break;default:r*=1}switch(t.city.calendar.weather){case 0:r*=1-di.cold_blooded.vars()[0]/100;break;case 2:r*=1+di.cold_blooded.vars()[1]/100;break;default:r*=1}}t.race.cannibalize&&t.city.s_alter&&t.city.s_alter.count>0&&("miner"===a&&t.city.s_alter.mine>0&&(r*=1+di.cannibalize.vars()[0]/100),"lumberjack"===a&&t.city.s_alter.harvest>0&&(r*=1+di.cannibalize.vars()[0]/100),("army"===a||"hellArmy"===a)&&t.city.s_alter.rage>0&&(r*=1+di.cannibalize.vars()[0]/100),"science"===a&&t.city.s_alter.mind>0&&(r*=1+di.cannibalize.vars()[0]/100));let n=Oi("mantis");n>0&&("miner"===a&&(r*=1+di.cannibalize.vars(1)[0]/100*n),"lumberjack"===a&&(r*=1+di.cannibalize.vars(1)[0]/100*n),"army"!==a&&"hellArmy"!==a||(r*=1+di.cannibalize.vars(1)[0]/100*n),"science"===a&&(r*=1+di.cannibalize.vars(1)[0]/100*n)),!t.race.humpback||"miner"!==a&&"lumberjack"!==a||(r*=1+di.humpback.vars()[0]/100);let l=Oi("kamel");l>0&&("miner"===a||"lumberjack"===a)&&(r*=1+di.humpback.vars(1)[0]/100*l),t.city.ptrait.includes("magnetic")&&"miner"===a&&(r*=Fi.magnetic.vars()[2]),!t.race.weak||"miner"!==a&&"lumberjack"!==a||(r*=1-di.weak.vars()[0]/100),t.race.hydrophilic&&0===t.city.calendar.weather&&t.city.calendar.temp>0&&"factory"!==a&&(r*=.75),t.race.toxic&&"factory"===a&&(r*=1+di.toxic.vars()[2]/100);let u=Oi("shroomi");if(u>0&&"factory"===a&&(r*=1+di.toxic.vars(1)[2]/100*u),t.race.hardy&&"factory"===a&&(r*=1+di.hardy.vars()[0]*t.race.hardy/100),t.race.analytical&&"science"===a&&(r*=1+di.analytical.vars()[0]*t.race.analytical/100),t.race.ooze&&(r*=1-di.ooze.vars()[0]/100),"democracy"===t.civic.govern.type&&(r*=1-re.democracy()[1]/100),!t.tech.cyber_worker||"lumberjack"!==a&&"miner"!==a||(r*=1.25),"hunting"===a){t.race.tracker&&(r*=1+di.tracker.vars()[0]/100);let e=Oi("wolven");e>0&&(r*=1+di.tracker.vars(1)[0]/100*e),t.race.beast&&(r*=1+(1===t.city.calendar.wind?di.beast.vars()[1]:di.beast.vars()[0])/100),t.race.apex_predator&&(r*=1+di.apex_predator.vars()[1]/100);let a=Oi("sharkin");a>0&&(r*=1+di.apex_predator.vars(1)[1]/100*a),t.race.fiery&&(r*=1+di.fiery.vars()[1]/100);let s=Oi("balorg");s>0&&(r*=1+di.fiery.vars(1)[1]/100*s),t.race.fragrant&&(r*=1-di.fragrant.vars()[0]/100),t.city.ptrait.includes("rage")&&(r*=Fi.rage.vars()[1]),t.race.cunning&&(r*=1+di.cunning.vars()[0]*t.race.cunning/100),"savanna"===t.city.biome&&(r*=Si.savanna.vars()[1]),t.race.dark_dweller&&2===t.city.calendar.weather&&(r*=1-di.dark_dweller.vars()[0]/100)}if("magic"===t.race.universe&&(r*="science"===a?.6:"army"===a||"hellArmy"===a?.75:.8,t.race.witch_hunter&&(r*=.75),t.race.hasOwnProperty("casting")&&t.race.casting["hellArmy"===a?"army":a])){let e=t.race.casting["hellArmy"===a?"army":a];t.race.witch_hunter?r*=1+e/(e+75)*2.5:r*=1+e/(e+75)}return t.race.living_tool&&"miner"===a&&(r*=1+di.living_tool.vars()[0]*(t.tech.science&&t.tech.science>0?.12*t.tech.science:0)),t.race.high_pop&&(r=Pe(r)),r}function mi(e){let a=[];Object.keys(di).forEach((function(e){"minor"!==di[e].type||t.race[e]||a.push(e)})),0===a.length&&Object.keys(di).forEach((function(e){"minor"===di[e].type&&a.push(e)}));let r=a[Math.floor(g(0,a.length))];return t.race[r]?t.race[r]+=e:t.race[r]=e,r}function gi(e,a,r){t.race.purgatory[e].hasOwnProperty(a)?(t[e][a]=t.race.purgatory[e][a],delete t.race.purgatory[e][a]):r&&(t[e][a]=r)}function fi(e,a,r,s){t.race.purgatory[e].hasOwnProperty(a)?(t[e][a]=t.race.purgatory[e][a],delete t.race.purgatory[e][a]):t.race.purgatory[e].hasOwnProperty(r)?(t[e][a]=t.race.purgatory[e][r],delete t.race.purgatory[e][r]):s&&(t[e][a]=s)}function vi(e,a){t[e].hasOwnProperty(a)&&(t.race.purgatory[e][a]=t[e][a],delete t[e][a])}function yi(e,a){if(t.race.purgatory[e].hasOwnProperty(a))return t.race.purgatory[e][a]}function bi(){wi("Lumber"),wi("Plywood"),Gi(["city-graveyard","city-lumber_yard","city-sawmill"]),Ri(["reclaimer","axe","saw"]),vi("city","sawmill"),vi("city","graveyard"),vi("city","lumber_yard"),vi("tech","axe"),vi("tech","reclaimer"),vi("tech","saw"),t.civic.lumberjack.display=!1,t.civic.lumberjack.workers=0,"lumberjack"===t.civic.d_job&&(t.civic.d_job=t.race.carnivore||t.race.soul_eater?"hunter":"unemployed"),t.race.casting&&(t.race.casting.total-=t.race.casting.lumberjack,t.race.casting.lumberjack=0,Qs()),t.city.s_alter&&(t.city.s_alter.harvest=0)}function wi(e){t.resource[e].display=!1,t.race.alchemy&&t.race.alchemy.hasOwnProperty(e)&&(t.resource.Mana.diff+=t.race.alchemy[e],t.race.alchemy[e]=0),t.interstellar.mass_ejector&&t.interstellar.mass_ejector.hasOwnProperty(e)&&(t.interstellar.mass_ejector.total-=t.interstellar.mass_ejector[e],t.interstellar.mass_ejector[e]=0),t.city.nanite_factory&&t.city.nanite_factory.hasOwnProperty(e)&&(t.city.nanite_factory[e]=0),t.portal.transport&&t.portal.transport.cargo.hasOwnProperty(e)&&(t.portal.transport.cargo.used-=t.portal.transport.cargo[e],t.portal.transport.cargo[e]=0),t.tech.foundry&&t.city.foundry.hasOwnProperty(e)&&(t.civic.craftsman.workers-=t.city.foundry[e],t.city.foundry.crafting-=t.city.foundry[e],t.city.foundry[e]=0,ma()),t.resource[e].hasOwnProperty("trade")&&(t.city.market.trade-=Math.abs(t.resource[e].trade),t.resource[e].trade=0),t.resource.Crates.amount+=t.resource[e].crates,t.resource[e].crates=0,t.resource.Containers.amount+=t.resource[e].containers,t.resource[e].containers=0}function $i(){let e=_s(Zr.tech.agriculture),a=_s(Zr.tech.smokehouse),r=_s(Zr.tech.reclaimer)||_s(Zr.tech.stone_axe),i=_s(Zr.tech.alt_lodge),c=_s(Zr.tech.wind_plant),o=[],n=[];if(!t.race.artifical){if(["agriculture","farm","hunting","s_lodge","wind_plant","compost","soul_eater"].forEach((function(e){vi("tech",e)})),["silo","farm","mill","windmill","smokehouse","lodge","compost","soul_well"].forEach((function(e){vi("city",e)})),i){gi("tech","s_lodge");let e=yi("tech","farm")>=1||yi("tech","hunting")>=2?1:0;e>0&&(!t.tech.s_lodge||t.tech.s_lodge=1&&fi("city","lodge","farm",{count:0})}if(a){gi("tech","hunting");let e=yi("tech","farm")>=1||yi("tech","s_lodge")>=1?2:yi("tech","agriculture")>=3?1:0;e>0&&(!t.tech.hunting||t.tech.hunting=1&&fi("city","smokehouse","silo",{count:0}),t.tech.hunting>=2&&!i&&fi("city","lodge","farm",{count:0})}else n.push("hunting"),o.push("city-smokehouse"),i||n.push("city-lodge");if(e){gi("tech","farm");let e=yi("tech","hunting")>=2||yi("tech","s_lodge")>=1?1:0;e>0&&(!t.tech.farm||t.tech.farm=1?3:yi("tech","s_lodge")>=1?1:0;a>0&&(!t.tech.agriculture||t.tech.agriculture=1&&fi("city","farm","lodge",{count:0}),t.tech.agriculture>=3&&fi("city","silo","smokehouse",{count:0}),t.tech.agriculture>=4&&!c&&fi("city","mill","windmill",{count:0,on:0})}else n.push("agriculture","farm"),o.push("city-farm","city-silo","city-mill");t.race.soul_eater?(gi("tech","soul_eater"),gi("city","soul_well")):(o.push("city-soul_well"),n.push("soul_eater")),t.race.detritivore?(gi("tech","compost"),gi("city","compost")):(n.push("compost"),o.push("city-compost")),c?(gi("tech","wind_plant"),t.tech.wind_plant>=1&&fi("city","windmill","mill",{count:0,on:0})):(n.push("wind_plant"),o.push("city-windmill"),delete s[z("city_mill_title2")])}let l=[],u=[];!t.race.orbit_decayed&&e&&t.tech.agriculture>=1&&t.city.farm.count>0?l.push("farmer"):u.push("farmer"),t.race.carnivore&&!t.race.herbivore||t.race.soul_eater||t.race.unfathomable?(l.push("hunter"),u.push("unemployed")):(u.push("hunter"),l.push("unemployed")),!t.race.orbit_decayed&&r?l.push("lumberjack"):u.push("lumberjack"),l.forEach((function(e){t.civic[e].display||(t.civic[e].workers=0,t.civic[e].display=!0)})),u.forEach((function(e){t.civic[e].display&&(t.civic.d_job===e&&(t.civic.d_job=l[0]),t.civic[l[0]].workers+=t.civic[e].workers,t.civic[e].workers=0,t.civic[e].display=!1)})),t.race.casting&&(e||(t.race.casting.total-=t.race.casting.farmer,t.race.casting.farmer=0),Qs()),Gi(o),Ri(n),or("Food")}function xi(a){switch(a){case"high_pop":t.resource[t.race.species].amount=Math.round(t.resource[t.race.species].amount*di.high_pop.vars()[0]),t.civic.hasOwnProperty("garrison")&&(t.civic.garrison.workers=Math.round(t.civic.garrison.workers*di.high_pop.vars()[0]));break;case"kindling_kindred":if(t.race.smoldering)break;bi();break;case"smoldering":if(t.resource.Chrysotile.display=!0,t.race.kindling_kindred)break;bi();break;case"forge":Qs();break;case"soul_eater":da("lumberjack");case"detritivore":case"carnivore":case"herbivore":$i();break;case"unfathomable":for($i(),t.city.hasOwnProperty("surfaceDwellers")||(t.city.surfaceDwellers=[]);t.city.surfaceDwellers.lengthdi.unfathomable.vars()[0]&&(t.city.surfaceDwellers.length=di.unfathomable.vars()[0]),t.race.psychic&&Ai();break;case"flier":or("Stone"),or("Brick"),t.resource.Cement.display=!1,t.civic.cement_worker.display=!1,t.civic.cement_worker.workers=0,vi("tech","cement"),vi("city","cement_plant");break;case"sappy":"quarry_worker"===t.civic.d_job&&(t.civic.d_job="unemployed"),t.civic.quarry_worker.display=!1,t.civic.quarry_worker.workers=0,or("Stone"),vi("tech","hammer"),vi("city","rock_quarry");break;case"apex_predator":Ri(["armor"]),vi("tech","armor");break;case"environmentalist":delete s[z("city_coal_power")],delete s[z("city_mana_engine")],delete s[z("city_oil_power")];break;case"terrifying":Object.keys(t.resource).forEach((function(e){t.resource[e].hasOwnProperty("trade")&&(t.resource[e].trade=0)})),t.settings.showMarket=!1,0===t.settings.marketTabs&&(t.settings.marketTabs=1),Gi(["city-trade"]),Ri(["trade"]),vi("tech","trade"),vi("city","trade");break;case"slaver":gi("tech","slaves"),t.tech.slaves>=1&&(gi("city","slave_pen",{count:0,slaves:0}),t.city.slave_pen.count>0&&!t.race.orbit_decayed&&(t.resource.Slave.display=!0));break;case"cannibalize":gi("tech","sacrifice"),t.tech.mining&&(t.city.s_alter={count:0,rage:0,mind:0,regen:0,mine:0,harvest:0});break;case"magnificent":t.tech.theology>=2&&gi("city","shrine",{count:0,morale:0,metal:0,know:0,tax:0});break;case"unified":t.tech.world_control=1,t.tech.unify=2,sc($("#garrison")),sc($("#c_garrison")),ve($("#garrison"),!0),ve($("#c_garrison"),!1);for(let e=0;e<3;e++){if(t.civic.foreign[`gov${e}`].occ){let a=ua("federation"===t.civic.govern.type?15:20);t.civic.garrison.max+=a,t.civic.garrison.workers+=a,t.civic.foreign[`gov${e}`].occ=!1}t.civic.foreign[`gov${e}`].buy=!1,t.civic.foreign[`gov${e}`].anx=!1,t.civic.foreign[`gov${e}`].sab=0,t.civic.foreign[`gov${e}`].act="none"}B("spy"),B("spyop");break;case"noble":t.civic.taxes.tax_rate<10?t.civic.taxes.tax_rate=10:t.civic.taxes.tax_rate>20&&(t.civic.taxes.tax_rate=20);break;case"toxic":"troll"===t.race.species&&t.tech.science&&t.tech.science>=8&&eo("godwin");break;case"thalassophobia":Gi(["city-wharf"]),Ri(["wharf"]),vi("city","wharf");break;case"hooved":t.resource.Horseshoe.display=!0,t.race.hasOwnProperty("shoecnt")||(t.race.shoecnt=0);break;case"slow":e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w?(Ki("stop"),Ki("start")):window.location.reload();case"hyper":e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w?(Ki("stop"),Ki("start")):window.location.reload();case"calm":t.tech.primitive>=3&&(gi("city","meditation",{count:0}),t.race.orbit_decayed||(t.resource.Zen.display=!0));break;case"blood_thirst":t.race.blood_thirst_count=1;break;case"deconstructor":t.resource.Nanite.display=!0,gi("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":Mi(!1,!0);break;case"imitation":qi(!0);break;case"evil":or("Lumber"),or("Furs"),or("Plywood");break;case"psychic":t.tech.psychic&&(t.resource.Energy.display=!0,t.settings.showPsychic=!0);break;case"ooze":t.tech.high_tech||"custom"===t.race.species||"sludge"===t.race.species||(t.race.gross_enabled=1),uc(!0)}}function ki(a,r){switch(a){case"high_pop":t.resource[t.race.species].amount=Math.round(t.resource[t.race.species].amount/di.high_pop.vars(r)[0]),t.civic.hasOwnProperty("garrison")&&(t.civic.garrison.workers=Math.round(t.civic.garrison.workers/di.high_pop.vars(r)[0]));break;case"kindling_kindred":if(t.race.smoldering)break;t.resource.Lumber.display=!0,t.tech.foundry&&(t.resource.Plywood.display=!0),t.race.casting&&Qs(),gi("city","sawmill"),gi("city","graveyard"),gi("city","lumber_yard"),gi("tech","axe"),gi("tech","reclaimer"),gi("tech","saw"),!t.tech.axe&&!t.tech.reclaimer||t.race.orbit_decayed||(t.civic.lumberjack.display=!0);break;case"smoldering":if(wi("Chrysotile"),t.race.kindling_kindred)break;t.resource.Lumber.display=!0,t.tech.foundry&&(t.resource.Plywood.display=!0),t.race.casting&&Qs(),gi("city","sawmill"),gi("city","graveyard"),gi("city","lumber_yard"),gi("tech","axe"),gi("tech","reclaimer"),gi("tech","saw"),!t.tech.axe&&!t.tech.reclaimer||t.race.orbit_decayed||(t.civic.lumberjack.display=!0);break;case"forge":Qs();break;case"soul_eater":da("lumberjack");case"detritivore":case"carnivore":case"herbivore":case"unfathomable":$i(),t.race.psychic&&Ai();break;case"flier":or("Stone"),or("Brick"),gi("tech","cement"),t.tech.cement&&(gi("city","cement_plant"),t.resource.Cement.display=!0,t.civic.cement_worker.display=!0);break;case"sappy":or("Stone"),gi("tech","hammer"),t.tech.mining>=1&&(gi("city","rock_quarry",{count:0,asbestos:0}),(t.city.rock_quarry&&t.city.rock_quarry.count>0||t.race.lone_survivor)&&(t.civic.quarry_worker.display=!0));break;case"apex_predator":gi("tech","armor");break;case"environmentalist":delete s[z("city_hydro_power")],delete s[z("city_wind_power")];break;case"terrifying":t.settings.showMarket=!0,gi("tech","trade"),gi("city","trade");break;case"slaver":Gi(["city-slave_pen"]),Ri(["slaves"]),vi("city","slave_pen"),vi("tech","slaves"),t.resource.Slave.amount=0,t.resource.Slave.max=0,t.resource.Slave.display=!1,B("slave");break;case"cannibalize":Gi(["city-s_alter"]),Ri(["sacrifice"]),vi("tech","sacrifice"),delete t.city.s_alter,B("sacrifice");break;case"magnificent":Gi(["city-shrine"]),vi("city","shrine");break;case"thalassophobia":t.tech.wharf&&gi("city","wharf",{count:0});break;case"hooved":Gi(["city-horseshoe","space-horseshoe"]),t.resource.Horseshoe.display=!1,B("horseshoe");break;case"slow":e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w?(Ki("stop"),Ki("start")):window.location.reload();case"hyper":e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w?(Ki("stop"),Ki("start")):window.location.reload();case"calm":Gi(["city-meditation"]),t.resource.Zen.display=!1,vi("city","meditation");break;case"blood_thirst":delete t.race.blood_thirst_count;break;case"deconstructor":Gi(["city-nanite_factory"]),t.resource.Nanite.display=!1,vi("city","nanite_factory");break;case"shapeshifter":sc($("#sshifter")),Mi();break;case"imitation":t.race.iTraits&&(Object.keys(t.race.iTraits).forEach((function(e){if("imitation"!==e)if(0===t.race.iTraits[e]){let a=t.race[e];delete t.race[e],ki(e,a)}else t.race[e]=t.race.iTraits[e]})),delete t.race.iTraits);break;case"evil":or("Lumber"),or("Furs"),or("Plywood");break;case"psychic":t.resource.Energy.display=!1,t.settings.showPsychic=!1;break;case"ooze":delete t.race.gross_enabled,uc(!0)}}function qi(e){if(t.race.imitation&&t.race.srace){t.race.iTraits||(t.race.iTraits={}),t.race.shapeshifter&&Mi(t.race.ss_genus===_i[t.race.srace].type&&"none",!0);let a=[];if(Object.keys(ui[_i[t.race.srace].type]).forEach((function(e){t.race[e]||a.push(e)})),"custom"===t.race.srace){let e=["evil","evil"];Object.keys(_i[t.race.srace].traits).forEach((function(t){di[t].val>di[e[0]].val?e[0]=t:di[t].val=0?t.race[e]=di.shapeshifter.vars()[0]:t.race[e]=di.shapeshifter.vars()[1],xi(e),r.push(e))})),t.race.ss_genus=e),a){sc($("#sshifter")),t.race.ss_genus=t.race.hasOwnProperty("ss_genus")?t.race.ss_genus:"none";let e="";Object.keys(ui).forEach((function(a){"synthetic"!==a&&"eldritch"!==a&&a!==_i[t.race.species].type&&(!t.race.imitation||a!==_i[t.race.srace].type)&&t.stats.achieve[`genus_${a}`]&&t.stats.achieve[`genus_${a}`].l>0&&(e+=`{{ '${a}' | genus }}`)})),$("#sshifter").append(`${z("trait_shapeshifter_name")}: \n \n {{ 'none' | genus }}${e}\n `),ic({el:"#sshifter",data:t.race,methods:{setShape(e){Mi(e)}},filters:{genus:e=>z(`genelab_genus_${e}`)}})}t.race.ss_traits=r}function Pi(e,a){if(a=a||{},t.race[e]&&!a.force)switch(t.race[e]){case.25:return t.race[e]=a.down?.25:.5,!a.down;case.5:return t.race[e]=a.down?.25:1,!0;case 1:return t.race[e]=a.down?.5:2,!0;case 2:return t.race[e]=a.down?1:3,!0;case 3:return t.race[e]=a.down?2:3,!!a.down}else if(a.set)return t.race[e]=a.set,!0;return!1}function Oi(e){if(t.race.unfathomable&&t.city.surfaceDwellers&&t.city.surfaceDwellers.includes(e)&&t.city.captive_housing){let a=t.city.surfaceDwellers.indexOf(e),r=t.city.captive_housing[`race${a}`];if(r>100&&(r=100),r>t.civic.torturer.workers){let e=r-t.civic.torturer.workers;r-=Math.ceil(e/3)}return r/100*((t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg?t.stats.achieve.nightmare.mg:0)/5)}return 0}function Ci(e,a){switch(e){case"name":{let e={hooved:ji(!1),promiscuous:t.race.artifical?z("trait_promiscuous_synth_name"):di.promiscuous.name};return a?e[a]?e[a]:di[a].name:e}case"desc":{let e={hooved:ji(!0),promiscuous:t.race.artifical?z("trait_promiscuous_synth"):di.promiscuous.desc};return a?e[a]?e[a]:di[a].desc:e}}}function ji(e){return t.race.sludge?z(e?"trait_hooved_slime":"trait_hooved_slime_name"):["cath","wolven","dracnid","seraph","cyclops","kobold","tuskin","sharkin"].includes(t.race.species)?z(e?`trait_hooved_${t.race.species}`:`trait_hooved_${t.race.species}_name`):["humanoid","avian","plant","fungi","reptilian","fey","synthetic"].includes(_i[t.race.species].type)?z(e?`trait_hooved_${_i[t.race.species].type}`:`trait_hooved_${_i[t.race.species].type}_name`):e?di.hooved.desc:di.hooved.name}Object.keys(pi).forEach((function(e){let t="organism"===e?"humanoid":e;pi[e].solar={titan:z(`genus_${t}_solar_titan`),enceladus:z(`genus_${t}_solar_enceladus`),triton:z(`genus_${t}_solar_triton`),eris:z(`genus_${t}_solar_eris`)}}));const Si={grassland:{label:z("biome_grassland_name"),desc:z("biome_grassland"),vars:()=>t.race.rejuvenated?[1.25]:[1.2],wiki:["%"]},oceanic:{label:z("biome_oceanic_name"),desc:z("biome_oceanic"),vars:()=>t.race.rejuvenated?[1.25,1.12,.92]:[1.12,1.06,.95],wiki:["%","%","%"]},forest:{label:z("biome_forest_name"),desc:z("biome_forest"),vars:()=>t.race.rejuvenated?[1.35]:[1.2],wiki:["%"]},desert:{label:z("biome_desert_name"),desc:z("biome_desert"),vars:()=>t.race.rejuvenated?[1.35,1.18,.6]:[1.2,1.1,.75],wiki:["%","%","%"]},volcanic:{label:z("biome_volcanic_name"),desc:z("biome_volcanic"),vars:()=>t.race.rejuvenated?[.8,1.25,1.15]:[.9,1.12,1.08],wiki:["%","%","%"]},tundra:{label:z("biome_tundra_name"),desc:z("biome_tundra"),vars:()=>t.race.rejuvenated?[1.5,.8]:[1.25,.9],wiki:["%","%"]},savanna:{label:z("biome_savanna_name"),desc:z("biome_savanna"),vars:()=>t.race.rejuvenated?[1.18,1.25,.75]:[1.1,1.18,.8],wiki:["%","%","%"]},swamp:{label:z("biome_swamp_name"),desc:z("biome_swamp"),vars:()=>t.race.rejuvenated?[1.6,1.35,1.15,.78]:[1.4,1.25,1.1,.88],wiki:["%","%","%","%"]},ashland:{label:z("biome_ashland_name"),desc:z("biome_ashland"),vars:()=>t.race.rejuvenated?[.55,1.35,1.2]:[.62,1.25,1.1],wiki:["%","%","%"]},taiga:{label:z("biome_taiga_name"),desc:z("biome_taiga"),vars:()=>t.race.rejuvenated?[1.2,1.65,.88]:[1.1,1.5,.92],wiki:["%","%","%"]},hellscape:{label:z("biome_hellscape_name"),desc:z("biome_hellscape"),vars:()=>t.race.rejuvenated?[.2]:[.25],wiki:["%"]},eden:{label:z("biome_eden_name"),desc:z("biome_eden")}},Fi={toxic:{label:z("planet_toxic"),desc:z("planet_toxic_desc"),vars:()=>t.race.rejuvenated?[2,1.5]:[1,1.25],wiki:["A","-%"]},mellow:{label:z("planet_mellow"),desc:z("planet_mellow_desc"),vars:()=>t.race.rejuvenated?[2,3,.88]:[1.5,2,.9],wiki:["%","A","%"]},rage:{label:z("planet_rage"),desc:z("planet_rage_desc"),vars:()=>t.race.rejuvenated?[1.1,1.05,1]:[1.05,1.02,1],wiki:["%","%","A"]},stormy:{label:z("planet_stormy"),desc:z("planet_stormy_desc")},ozone:{label:z("planet_ozone"),desc:z("planet_ozone_desc"),vars:()=>t.race.rejuvenated?[.18]:[.25],wiki:["-A"]},magnetic:{label:z("planet_magnetic"),desc:z("planet_magnetic_desc"),vars:()=>t.race.rejuvenated?[2,150,.98]:[1,100,.985],wiki:["A","A","%"]},trashed:{label:z("planet_trashed"),desc:z("planet_trashed_desc"),vars:()=>t.race.rejuvenated?[.8,1.2]:[.75,1],wiki:["%","%"]},elliptical:{label:z("planet_elliptical"),desc:z("planet_elliptical_desc")},flare:{label:z("planet_flare"),desc:z("planet_flare_desc")},dense:{label:z("planet_dense"),desc:z("planet_dense_desc"),vars:()=>t.race.rejuvenated?[1.5,1.2,1.35]:[1.2,1,1.2],wiki:["%","A","%"]},unstable:{label:z("planet_unstable"),desc:z("planet_unstable_desc")},permafrost:{label:z("planet_permafrost"),desc:z("planet_permafrost_desc"),vars:()=>t.race.rejuvenated?[.7,125]:[.75,100],wiki:["%","A"]},retrograde:{label:z("planet_retrograde"),desc:z("planet_retrograde_desc")}};function zi(e){e=e||[];let t=Object.keys(_i).filter((function(t){return _i[t].basic()&&!e.includes(t)}));return t[jc(t)]}function Ai(){if(!t.settings.tabLoad&&(2!==t.settings.civTabs||6!==t.settings.govTabs))return;let e=$("#psychicPowers");sc(e),t.race.psychic&&t.tech.psychic&&(function(e){let a=$('
      ');e.append(a),a.append($(`
      ${z("psychic_boost_title")}
      `));let r=$("
      ");a.append(r);let s="";if(Object.keys(Ja).forEach((function(e){t.resource[e].display&&(s+=`${t.resource[e].name}`)})),r.append(`
      ${s}
      `),a.append('
      '),t.tech.psychic>=4){let e=$(`
      ${z("psychic_channel")}
      `),t=$('{{ c.boost }}'),r=$(`«`),s=$(`»`);e.append(r),e.append(t),e.append(s),a.append(e)}let i=t.tech.psychic>=5?60:75,c=t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg?t.stats.achieve.nightmare.mg:0;ic({el:"#psychicBoost",data:{b:t.race.psychicPowers.boost,c:t.tech.psychic>=4?t.race.psychicPowers.channel:{}},methods:{boostVal(){t.resource.Energy.amount>=i&&(t.resource.Energy.amount-=i,t.race.psychicPowers.boostTime=72*c)},add(){let e=b();for(let a=0;a0;a++)t.race.psychicPowers.channel.boost--}},filters:{boost:e=>z("psychic_boost_button",[t.resource[e]?t.resource[e].name:"N/A",i]),boostTime:()=>t.race.psychicPowers.boostTime>0?z("psychic_boost_time",[t.race.psychicPowers.boostTime]):""}});const o=document.getElementById("psyhscrolltarget");o.addEventListener("wheel",(e=>{e.preventDefault(),o.scrollLeft+=e.deltaY})),Ei("psychicBoost",(function(){return z("psychic_boost_desc",[di.psychic.vars()[3]])}),{elm:"#psychicBoost > div > button"})}(e),function(e){let a=$('
      ');e.append(a),a.append($(`
      ${z("psychic_murder_title")}
      `)),a.append('
      ');let r=t.tech.psychic>=5?8:10;ic({el:"#psychicKill",data:{},methods:{murder(){t.resource.Energy.amount>=r&&t.resource[t.race.species].amount>=1&&(t.resource.Energy.amount-=r,t.resource[t.race.species].amount--,t.stats.psykill++,t.race.anthropophagite&&Ji("Food",1e4*di.anthropophagite.vars()[0]),10===t.stats.psykill&&Ai())}},filters:{kill:()=>z("psychic_murder_button",[r])}}),Ei("psychicKill",(function(){return z("psychic_murder_desc")}),{elm:"#psychicKill > div > button"})}(e),t.tech.psychic>=2&&function(e){let a=$('
      ');if(e.append(a),a.append($(`
      ${z("psychic_assault_title")}
      `)),a.append('
      '),t.tech.psychic>=4){let e=$(`
      ${z("psychic_channel")}
      `),t=$('{{ assault }}'),r=$(`«`),s=$(`»`);e.append(r),e.append(t),e.append(s),a.append(e)}let r=t.tech.psychic>=5?36:45,s=t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg?t.stats.achieve.nightmare.mg:0;ic({el:"#psychicAssault",data:t.tech.psychic>=4?t.race.psychicPowers.channel:{},methods:{boostVal(){t.resource.Energy.amount>=r&&(t.resource.Energy.amount-=r,t.race.psychicPowers.assaultTime=72*s)},add(){let e=b();for(let a=0;a0;a++)t.race.psychicPowers.channel.assault--}},filters:{boost:()=>z("psychic_boost_button",[z("psychic_attack"),r]),boostTime:()=>t.race.psychicPowers.assaultTime>0?z("psychic_boost_time",[t.race.psychicPowers.assaultTime]):""}}),Ei("psychicAssault",(function(){return z("psychic_assault_desc",[di.psychic.vars()[3]])}),{elm:"#psychicAssault > div > button"})}(e),t.tech.psychic>=3&&(t.race.psychicPowers.cash||(t.race.psychicPowers.cash=0),function(e){let a=$('
      ');if(e.append(a),a.append($(`
      ${z("psychic_profit_title")}
      `)),a.append('
      '),t.tech.psychic>=4){let e=$(`
      ${z("psychic_channel")}
      `),t=$('{{ cash }}'),r=$(`«`),s=$(`»`);e.append(r),e.append(t),e.append(s),a.append(e)}let r=t.tech.psychic>=5?52:65,s=t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg?t.stats.achieve.nightmare.mg:0;ic({el:"#psychicFinance",data:t.tech.psychic>=4?t.race.psychicPowers.channel:{},methods:{boostVal(){t.resource.Energy.amount>=r&&(t.resource.Energy.amount-=r,t.race.psychicPowers.cash=72*s)},add(){let e=b();for(let a=0;a0;a++)t.race.psychicPowers.channel.cash--}},filters:{boost:()=>z("psychic_boost_button",[z("psychic_profit"),r]),boostTime:()=>t.race.psychicPowers.cash>0?z("psychic_boost_time",[t.race.psychicPowers.cash]):""}}),Ei("psychicFinance",(function(){return z("psychic_profit_desc",[di.psychic.vars()[3]])}),{elm:"#psychicFinance > div > button"})}(e)),t.tech.psychicthrall&&t.tech.unfathomable&&t.race.unfathomable&&(t.tech.psychicthrall>=2&&function(e){let a=$('
      ');e.append(a),a.append($(`
      ${z("psychic_stun_title")}
      `)),a.append('
      ');let r=t.tech.psychic>=5?80:100;ic({el:"#psychicCapture",data:{},methods:{stun(){if(t.resource.Energy.amount>=r&&t.tech.unfathomable){let e=0;if(t.city.hasOwnProperty("surfaceDwellers"))for(let a=0;az("psychic_stun_button",[r])}}),Ei("psychicCapture",(function(){return z("psychic_stun_desc")}),{elm:"#psychicCapture > div > button"})}(e),function(e){let a=$('
      ');e.append(a),a.append($(`
      ${z("psychic_mind_break_title")}
      `)),a.append('
      ');let r=t.tech.psychic>=5?64:80;ic({el:"#psychicMindBreak",data:{},methods:{breakMind(){if(t.resource.Energy.amount>=r&&t.tech.unfathomable){let e=[];if(t.city.hasOwnProperty("surfaceDwellers"))for(let a=0;a0&&e.push(a);if(e.length>0){let a=e[Math.rand(0,e.length)];t.city.captive_housing[`jailrace${a}`]--,t.city.captive_housing[`race${a}`]++,t.resource.Energy.amount-=r}}}},filters:{break:()=>z("psychic_mind_break_button",[r])}}),Ei("psychicMindBreak",(function(){return z("psychic_mind_break_desc")}),{elm:"#psychicMindBreak > div > button"})}(e)))}var Ti=!1;function Ei(e,a,r){r||(r={}),r.hasOwnProperty("elm")||(r.elm="#"+e),r.hasOwnProperty("bind")||(r.bind=!0),r.hasOwnProperty("unbind")||(r.unbind=!0),r.hasOwnProperty("placement")||(r.placement="bottom"),r.bind&&$(r.elm).on(r.bind_mouse_enter?"mouseenter":"mouseover",(function(){(Ti||$("#popper").length>0)&&Ii();let s=r.wide?" wide":"",i=r.classes?r.classes:"has-background-light has-text-dark pop-desc";var c=$(`
      `);r.attach?$(r.attach).append(c):$("#main").append(c),a&&c.append("function"==typeof a?a({this:this,popper:c}):a),Ti=Popper.createPopper(r.self?this:$(r.elm)[0],document.querySelector("#popper"),{placement:r.placement,modifiers:[{name:"flip",enabled:!0},{name:"offset",options:{offset:r.offset?r.offset:[0,0]}}]}),c.show(),r.hasOwnProperty("in")&&"function"==typeof r.in&&r.in({this:this,popper:c,id:"popper"}),Ec("firework")&&t[t.race.cataclysm||t.race.orbit_decayed?"space":"city"].firework.on>0&&$(c).append('')})),r.unbind&&("ontouchstart"in document.documentElement&&navigator.userAgent.match(t.settings.touch)?$(r.elm).on("touchend",(function(e){Ii(),r.hasOwnProperty("out")&&"function"==typeof r.out&&r.out({this:this,popper:$("#popper"),id:"popper"})})):$(r.elm).on(r.bind_mouse_enter?"mouseleave":"mouseout",(function(){Ii(),r.hasOwnProperty("out")&&"function"==typeof r.out&&r.out({this:this,popper:$("#popper"),id:"popper"})})))}function Ii(e){e&&$("#popper").data("id")!==e||($("#popper").hide(),Ti&&(Ti.destroy(),Ti=!1),sc($("#popper"),!0))}function Ki(e){switch(e){case"stop":P.w?P.w.postMessage({loop:"clear"}):(clearInterval(O.main_loop),clearInterval(O.mid_loop),clearInterval(O.long_loop)),t.settings.at>0&&(t.settings.at=d.t),P.s=!1;break;case"start":{let e=250,a=1e3,r=5e3;if(t.race.slow){let t=1+di.slow.vars()[0]/100;e=Math.floor(e*t),a=Math.floor(a*t),r=Math.floor(r*t)}if(t.race.hyper){let t=1-di.hyper.vars()[0]/100;e=Math.floor(e*t),a=Math.floor(a*t),r=Math.floor(r*t)}P.mt=e,Li(),d.t>0&&(e=Math.ceil(.5*e),a=Math.ceil(.5*a),r=Math.ceil(.5*r)),P.w?(P.w.postMessage({loop:"short",period:e}),P.w.postMessage({loop:"mid",period:a}),P.w.postMessage({loop:"long",period:r})):(O.main_loop=setInterval((function(){fastLoop()}),e),O.mid_loop=setInterval((function(){midLoop()}),a),O.long_loop=setInterval((function(){longLoop()}),r)),P.s=!0}}}function Li(){let e=Date.now()-t.stats.current;t.stats.hasOwnProperty("current")&&(e>=12e4||t.settings.at>0)&&(t.settings.at>11520&&(t.settings.at=0),e>=12e4&&(t.settings.at+=Math.floor(e/3333)),t.settings.at>11520&&(t.settings.at=11520),d.t=t.settings.at)}function Ni(e,t){let a=ri(),r=[];switch(e){case"power":r=["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":r=["spc_moon:helium_mine","spc_moon:iridium_mine","spc_moon:observatory"];break;case"red":r=["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":r=["spc_belt:elerium_ship","spc_belt:iridium_ship","spc_belt:iron_ship"];break;case"alpha":r=["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":r=["int_nebula:harvester","int_nebula:elerium_prospector"];break;case"gateway":r=["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":r=["gxy_alien2:armed_miner","gxy_alien2:ore_processor","gxy_alien2:scavenger"];break;case"lake":r=["prtl_lake:bireme","prtl_lake:transport"];break;case"spire":r=["prtl_spire:port","prtl_spire:base_camp","prtl_spire:mechbay"];break;case"titan":r=["spc_titan:titan_quarters","spc_titan:titan_mine","spc_titan:g_factory","spc_titan:decoder"];break;case"enceladus":r=["spc_enceladus:water_freighter","spc_enceladus:operating_base","spc_enceladus:zero_g_lab"];break;case"eris":r=["spc_eris:shock_trooper","spc_eris:tank"];break;case"tau_home":r=["tau_home:colony","tau_home:tau_factory","tau_home:mining_pit","tau_home:infectious_disease_lab"];break;case"tau_red":r=["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":r=["tau_roid:mining_ship","tau_roid:whaling_ship"]}t&&(a[e].l.length=0),r.forEach((function(t){a[e].l.includes(t)||a[e].l.push(t)})),a[e].l.length>r.length&&a[e].l.forEach((function(t){r.includes(t)||a[e].l.splice(a[e].l.indexOf(t),1)}))}function Di(e){(e=e||m).forEach((function(e){h[e]=[],t.settings.msgFilters[h.view].vis||($(`#msgQueueFilter-${h.view}`).removeClass("is-active"),$(`#msgQueueFilter-${e}`).addClass("is-active"),h.view=e)}))}function Bi(e,a,r,s,i){if(s=s||[],i||s.includes("all")||s.push("all"),a=a||"warning",s.includes(h.view)){let r=$('

      '+e+"

      ");$("#msgQueueLog").prepend(r),$("#msgQueueLog").children().length>t.settings.msgFilters[h.view].max&&$("#msgQueueLog").children().last().remove()}s.forEach((function(r){h[r].unshift({msg:e,color:a}),h[r].length>t.settings.msgFilters[r].max&&h[r].pop()})),r||s.forEach((function(r){t.lastMsg[r]&&(t.lastMsg[r].unshift({m:e,c:a}),t.lastMsg[r].length>t.settings.msgFilters[r].save&&t.lastMsg[r].splice(t.settings.msgFilters[r].save))}))}function Gi(e){for(let a=t.queue.queue.length-1;a>=0;a--)e.includes(t.queue.queue[a].id)&&t.queue.queue.splice(a,1)}function Ri(e){for(let a=t.r_queue.queue.length-1;a>=0;a--)e.includes(Zr.tech[t.r_queue.queue[a].type].grant[0])&&t.r_queue.queue.splice(a,1)}function Hi(){let e=t.tech.queue>=2?t.tech.queue>=3?8:5:3;t.stats.feat.journeyman&&t.stats.feat.journeyman>=2&&t.stats.achieve.seeder&&t.stats.achieve.seeder.l>=2&&(e+=Math.min(t.stats.achieve.seeder.l,t.stats.feat.journeyman)>=4?2:1),t.genes.queue&&t.genes.queue>=2&&(e*=2);let a=D("pragmatist",0);a&&(e=Math.round(e*(1+a/100))),t.queue.max=e}function Ui(){let e=3;if(t.stats.feat.journeyman&&t.stats.achieve.seeder&&t.stats.achieve.seeder.l>0){let a=Math.min(t.stats.achieve.seeder.l,t.stats.feat.journeyman);e+=a>=3?a>=5?3:2:1}t.genes.queue&&t.genes.queue>=2&&(e*=2);let a=D("theorist",0);a&&(e=Math.round(e*(1+a/100))),t.r_queue.max=e}function Wi(){!function(){let e=$("#buildQueue .buildList")[0];if(e){let t=Sortable.get(e);t&&t.destroy()}}(),sc($("#buildQueue")),$("#buildQueue").append($(`\n

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

      \n \n `));let e=$('
        ');$("#buildQueue").append(e),e.append($('
      • {{ item.label }}{{ item.q | count }} [{{ item.time | time }}{{ item.t_max | max_t(item.time) }}]
      • '));try{ic({el:"#buildQueue",data:t.queue,methods:{remove(e){let a=b();for(let r=0;r0&&(t.queue.queue[e].q-=t.queue.queue[e].qs),t.queue.queue[e].q<=0){Ii(`q${t.queue.queue[e].id}${e}`),t.queue.queue.splice(e,1),Wi();break}},setID:e=>`q${t.queue.queue[e].id}${e}`,setData(e,a){let r,s=t.queue.queue[e].id.split("-");"arpa"===s[0].substring(0,4)?r=s[0].substring(4):"city"===s[0]||"evolution"===s[0]||"starDock"===s[0]?r=Zr[s[0]][s[1]]:Object.keys(Zr[s[0]]).forEach((function(e){Zr[s[0]][e].hasOwnProperty(s[1])&&(r=Zr[s[0]][e][s[1]])}));let i={};if(r.cost){let e=fc(r);Object.keys(e).forEach((function(t){let r=e[t]();r>0&&(i[`${a}-${t}`]=r)}))}return i},pauseQueue(){$("#pausequeue").removeClass("play"),$("#pausequeue").removeClass("pause"),t.queue.pause?(t.queue.pause=!1,$("#pausequeue").addClass("play")):(t.queue.pause=!0,$("#pausequeue").addClass("pause"))},pausedesc:()=>t.queue.pause?z("queue_play"):z("queue_pause")},filters:{time:e=>cc(e),count:e=>e>1?` (${e})`:"",max_t:(e,t)=>t===e||t<0?"":` / ${cc(e)}`,used_q(){let e=0;for(let a=0;a=4&&(r.tech.whitehole=3,r.resource.Soul_Gem.amount+=10,r.resource.Knowledge.amount+=15e5,r.stats.know-=15e5),r.tech.hasOwnProperty("quaked")&&2===r.tech.quaked&&(r.tech.quaked=1,r.resource.Knowledge.amount+=5e5,r.stats.know-=5e5),r.tech.hasOwnProperty("corrupted_ai")&&3===r.tech.corrupted_ai&&(r.tech.corrupted_ai=1,r.resource.Knowledge.amount+=5e6,r.stats.know-=5e6)),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(r))),window.location.reload())};const Zi=!1;function Vi(e,t){try{t.debug_mode=Zi,gtag("event",e,t)}catch(e){}}function Ji(e,a,r,s){let i=t.resource[e].amount+a,c=!0;return i>t.resource[e].max&&-1!=t.resource[e].max?i=t.resource[e].max:i<0&&((!s||s&&-1*i>s)&&(c=!1),i=0),Number.isNaN(i)||(t.resource[e].amount=i,r||(t.resource[e].delta+=a,"Mana"===e&&a>0&&(t.resource[e].gen_d+=a))),c}function Yi(e){let a=_i[t.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"}const r=e?[z("civics_gov_tp_name0"),z("civics_gov_tp_name1"),z("civics_gov_tp_name2"),z("civics_gov_tp_name3"),z("civics_gov_tp_name4"),z("civics_gov_tp_name5"),z("civics_gov_tp_name6"),z("civics_gov_tp_name7"),z("civics_gov_tp_name8"),z("civics_gov_tp_name9")]:[_i[t.race.species].name,_i[t.race.species].home,z(`biome_${t.city.biome}_name`),z(`evo_${a}_title`),z("civics_gov_name0"),z("civics_gov_name1"),z("civics_gov_name2"),z("civics_gov_name3"),z("civics_gov_name4"),z("civics_gov_name5"),z("civics_gov_name6"),z("civics_gov_name7"),z("civics_gov_name8"),z("civics_gov_name9"),z("civics_gov_name10"),z("civics_gov_name11")];return{s0:Math.rand(0,14),s1:r[Math.rand(0,r.length)]}}function Xi(e,a,r,s,i){i||(i="city"),"micro"===t.race.universe&&(s-=lc("micro",!1)),t.race.small?s-=di.small.vars()[0]:t.race.large&&(s+=di.large.vars()[0]),t.race.compact&&(s-=di.compact.vars()[0]),!t.race.tunneler||"mine"!==e&&"coal_mine"!==e||(s-=di.tunneler.vars()[0]),!t.tech.housing_reduction||"basic_housing"!==e&&"cottage"!==e||(s-=.02*t.tech.housing_reduction),t.tech.housing_reduction&&"captive_housing"===e&&(s-=.01*t.tech.housing_reduction),"basic_housing"===e&&(t.race.solitary&&(s-=di.solitary.vars()[0]),t.race.pack_mentality&&(s+=di.pack_mentality.vars()[0])),"cottage"===e&&(t.race.solitary&&(s+=di.solitary.vars()[1]),t.race.pack_mentality&&(s-=di.pack_mentality.vars()[1])),"apartment"===e&&t.race.pack_mentality&&(s-=di.pack_mentality.vars()[1]),t.genes.creep&&!t.race.no_crispr?s-=.01*t.genes.creep:t.genes.creep&&t.race.no_crispr&&(s-=.002*t.genes.creep);let c=D("noquestions",0);c&&(s-=c),s<1.005&&(s=1.005);var o="citizen"===e?t.resource[t.race.species].amount:t[i][e]?t[i][e].count:0;return a&&(o+=a),Math.round(s**o*r)}function ec(e,a,r,s,i,c){i||(i="space"),c=c||1.005,"micro"===t.race.universe&&(s-=lc("micro",!0)),t.genes.creep&&!t.race.no_crispr?s-=.01*t.genes.creep:t.genes.creep&&t.race.no_crispr&&(s-=.002*t.genes.creep),t.race.small&&(s-=di.small.vars()[1]),t.race.compact&&(s-=di.compact.vars()[1]),t.prestige.Harmony.count>0&&t.stats.achieve.ascended&&(s-=tc());let o=D("noquestions",0);o&&(s-=o),s0&&t.stats.achieve.ascended){let e=0;switch(t.race.universe){case"heavy":t.stats.achieve.ascended.hasOwnProperty("h")&&(e=t.stats.achieve.ascended.h*t.prestige.Harmony.count);break;case"antimatter":t.stats.achieve.ascended.hasOwnProperty("a")&&(e=t.stats.achieve.ascended.a*t.prestige.Harmony.count);break;case"evil":t.stats.achieve.ascended.hasOwnProperty("e")&&(e=t.stats.achieve.ascended.e*t.prestige.Harmony.count);break;case"micro":t.stats.achieve.ascended.hasOwnProperty("m")&&(e=t.stats.achieve.ascended.m*t.prestige.Harmony.count);break;case"magic":t.stats.achieve.ascended.hasOwnProperty("mg")&&(e=t.stats.achieve.ascended.mg*t.prestige.Harmony.count);break;default:t.stats.achieve.ascended.hasOwnProperty("l")&&(e=t.stats.achieve.ascended.l*t.prestige.Harmony.count)}if(e>0)return e=.01*(Math.log(50+e)-3.912023005428146),+e.toFixed(5)}return 0}function ac(e,a,r,s){if(s=void 0===s||s,e.cost){let i=0,c=!1,o=!(!a||!a.id[e.id])&&a.id[e.id],n=fc(e,o),l=!!a&&{},u=!!a&&{};a&&(Object.keys(a.r).forEach((function(e){l[e]=a.r[e]})),Object.keys(a.rr).forEach((function(e){u[e]=a.rr[e]})));let d=!1;t.interstellar.hasOwnProperty("mass_ejector")&&t.genes.governor&&t.tech.governor&&t.race.governor&&t.race.governor.g&&t.race.governor.tasks&&Object.keys(t.race.governor.tasks).forEach((function(e){"trash"===t.race.governor.tasks[e]&&(d=!0)}));let _={};return Object.keys(n).forEach((function(e){if(i>=0&&!t.prestige.hasOwnProperty(e)&&!["Morale","HellArmy","Structs","Bool"].includes(e)){var r=Number(o?n[e](o):n[e]());if(r>0){let o="Species"===e?t.race.species:e,n="Supply"===e?t.portal.purifier.supply:Number(t.resource[o].amount),p="Supply"===e?t.portal.purifier.sup_max:t.resource[o].max,h="Supply"===e?t.portal.purifier.diff:t.resource[o].diff;if(d&&t.interstellar.mass_ejector[e]&&(h+=t.interstellar.mass_ejector[e],t.race.governor.config.trash.hasOwnProperty(e)&&(h-=Math.min(t.race.governor.config.trash[e].v,t.interstellar.mass_ejector[e]))),a&&(n+=h*(s?a.t.t:a.t.rt),a.r.hasOwnProperty(o)||(a.r[o]=0),a.rr.hasOwnProperty(o)||(a.rr[o]=0),s?(n-=Number(a.r[o]),a.r[o]+=r,a.rr[o]+=r):(n-=Number(a.rr[o]),a.rr[o]+=r),p>=0&&n>p&&(n=p)),r>n)if(h>0){let e=(r-n)/h;e>i&&(c=o,i=e),_[o]=e}else a&&(a.r=l,a.rr=u),i=-9999999,_[o]=99999999-h,(_[c]&&_[o]>_[c]||!_[c])&&(c=o)}}})),a&&i>=0&&(void 0===a.id[e.id]?a.id[e.id]=1:a.id[e.id]++,s&&(a.t.t+=i),a.t.rt+=i),r?{t:i,r:c,s:_}:i}return 0}function rc(e,a,r,s){let i=!(!r||!r.id[e.id])&&r.id[e.id],c=Le(e.cost,i),o=0,n=!!r&&{},l=!!r&&{},u=!1;r&&(Object.keys(r.r).forEach((function(e){n[e]=r.r[e]})),Object.keys(r.rr).forEach((function(e){l[e]=r.rr[e]})));let d=!1;t.interstellar.hasOwnProperty("mass_ejector")&&t.genes.governor&&t.tech.governor&&t.race.governor&&t.race.governor.g&&t.race.governor.tasks&&Object.keys(t.race.governor.tasks).forEach((function(e){"trash"===t.race.governor.tasks[e]&&(d=!0)}));let _={};return Object.keys(c).forEach((function(e){if(o>=0){let s=Number(c[e](i))*a;if(s>0){let a=Number(t.resource[e].amount),i=t.resource[e].diff;if(r&&(d&&t.interstellar.mass_ejector[e]&&(i+=t.interstellar.mass_ejector[e],t.race.governor.config.trash.hasOwnProperty(e)&&(i-=Math.min(t.race.governor.config.trash[e].v,t.interstellar.mass_ejector[e]))),a+=i*r.t.t,r.r[e]?(a-=Number(r.r[e]),r.r[e]+=s):r.r[e]=s,r.rr[e]?r.rr[e]+=s:r.rr[e]=s,t.resource[e].max>=0&&a>t.resource[e].max&&(a=t.resource[e].max)),s>a)if(i>0){let t=(s-a)/i;t>o&&(o=t,u=e),_[e]=t}else r&&(r.r=n,r.rr=l),o=-9999999,_[e]=99999999-i,(_[u]&&_[e]>_[u]||!_[u])&&(u=e)}}})),r&&o>=0&&(void 0===r.id[e.id]?r.id[e.id]=1:r.id[e.id]++,r.t.t+=o,r.t.rt+=o),s?{t:o,r:u,s:_}:o}function sc(e,t){if(e.find(".vb").each((function(){try{$(this)[0].__vue__.$destroy()}catch(e){}})),t){try{e[0].__vue__.$destroy()}catch(e){}e.remove()}else e.empty()}function ic(e,t){if(t=t||"create",$(e.el).length>0&&void 0!==$(e.el)[0].__vue__)try{"update"===t?$(e.el)[0].__vue__.$forceUpdate():$(e.el)[0].__vue__.$destroy()}catch(e){}"create"===t&&(new Vue(e),$(e.el).addClass("vb"))}function cc(e){let t;if(e<0)t=z("time_never");else if((e=+e.toFixed(0))>60){let a=e%60,r=(e-a)/60;if(r>=60){let e=r%60,a=(r-e)/60;a>24?(e=a%24,t=`${(a-e)/24}d ${e}h`):(e=("0"+e).slice(-2),t=`${a}h ${e}m`)}else a=("0"+a).slice(-2),t=`${r}m ${a}s`}else t=`${e}s`;return t}function oc(e){return"antimatter"===t.race.universe&&(e=+(e*=lc("antimatter")).toFixed(2)),"leo"===W()&&(e=+(e*=1+U("leo")[0]/100).toFixed(2)),e}function nc(e){return t.race.emfield?+(1.5*e).toFixed(2):e}function lc(e,a,r,s){s||(s={});let i=void 0!==s.dark?s.dark:t.prestige.Dark.count,c=void 0!==s.harmony?s.harmony:t.prestige.Harmony.count,o=void 0!==s.sludge?s.sludge:t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge[Xc(e)]?t.stats.achieve.extinct_sludge[Xc(e)]:0;switch(e){case"standard":return"standard"===t.race.universe||r?(c>0&&(i*=1+.001*c),o&&(i*=1+.03*o),1+i/200):0;case"evil":return"evil"===t.race.universe||r?(c>0&&(i*=1+.01*c),o&&(i*=1+.03*o),1+(Math.log2(10+i)-3.321928094887362)/5):1;case"micro":return"micro"===t.race.universe||r?a?(c>0&&(i*=1+.01*c),i=.01+(Math.log(100+i)-4.605170185988092)/35,o&&(i*=1+.03*o),i>.04&&(i=.04),+i.toFixed(5)):(c>0&&(i*=1+.01*c),i=.02+(Math.log(100+i)-4.605170185988092)/20,o&&(i*=1+.03*o),i>.06&&(i=.06),+i.toFixed(5)):0;case"heavy":return"heavy"===t.race.universe||r?(c>0&&(i*=1+.01*c),o&&(i*=1+.03*o),.995**i):1;case"antimatter":return"antimatter"===t.race.universe||r?(c>0&&(i*=1+.01*c),o&&(i*=1+.03*o),1+(Math.log(50+i)-3.912023005428146)/5):0;case"magic":return"magic"===t.race.universe||r?(c>0&&(i*=1+.01*c),o&&(i*=1+.03*o),1+(Math.log(50+i)-3.912023005428146)/3):0}return 0}const uc=function(e){return dc&&!e?dc:t.genes.challenge&&t.genes.challenge>=2?dc=_c(t.race.universe):0};var dc;function _c(e,a){if(t.genes.challenge&&t.genes.challenge>=2){let r=Yc(e=e||t.race.universe),s="standard"===e?.25:.15,i=t.genes.challenge>=3?.15:.1;t.genes.challenge>=4&&"standard"!==e&&(s+=.05,i-=.05),t.race.weak_mastery&&"antimatter"===e&&(s/=10,i/=10),t.race.nerfed&&(s/="antimatter"===e?5:2,i/="antimatter"===e?5:2),t.race.ooze&&(s*=1-di.ooze.vars()[2]/100,i*=1-di.ooze.vars()[2]/100);let c=t.stats.feat.grandmaster&&t.stats.achieve.corrupted&&t.stats.achieve.corrupted.l>0?Math.min(t.stats.achieve.corrupted.l,t.stats.feat.grandmaster):0;c>0&&(s*=1+c/100,i*=1+c/100);let o=r.aLvl*s,n=0;return"standard"!==e&&(n=r.uLvl*i),t.genes.challenge>=5&&t.race.hasOwnProperty("mastery")&&(o*=1+di.mastery.vars()[0]*t.race.mastery/100,n*=1+di.mastery.vars()[0]*t.race.mastery/100),a?{g:o,u:n,m:o+n}:o+n}return a?{g:0,u:0,m:0}:0}const pc=function(e){if(!hc||e){let e=0;Object.keys(t.pillars).forEach((function(a){_i[a]&&t.race.species===a?e+=4:_i[a]&&e++})),hc=[1+e/100,1+2*e/100]}return hc};var hc;function mc(e,a,r,s){r=r||0;let i=(s=s||{}).genes;void 0===i&&(i=so()-1,i>4&&(i=4));let c=s.uni||t.race.universe;if("micro"===c&&(e*=.25),"antimatter"===c&&(e*=1.1),"heavy"===c&&"mad"!==a)switch(i){case 1:e*=1.1;break;case 2:e*=1.15;break;case 3:e*=1.2;break;case 4:e*=1.25;break;default:e*=1.05}switch((void 0!==s.tp?s.tp:t.race.truepath)&&(e*=1.1),i){case 1:return+(1.05*e).toFixed(r);case 2:return+(1.12*e).toFixed(r);case 3:return+(1.25*e).toFixed(r);case 4:return+(1.45*e).toFixed(r);default:return+e.toFixed(r)}}function gc(e,a){let r={plasmid:0,phage:0,dark:0,harmony:0,artifact:0,cores:0};a||(a={});let s=a.genes,i=a.uni;i=i||t.race.universe;let c=0;if(void 0===a.cit){let e=t.civic.hasOwnProperty("garrison")?t.civic.garrison.workers:0;for(let a=0;a<3;a++)t.civic.foreign[`gov${a}`].occ&&(e+=ua("federation"===t.civic.govern.type?15:20));c=t.race.high_pop?Math.round(t.resource[t.race.species].amount/di.high_pop.vars()[0])+Math.round(e/di.high_pop.vars()[0]):t.resource[t.race.species].amount+e}else c=a.high_pop?Math.round(a.cit/di.high_pop.vars(a.high_pop)[0])+Math.round(a.sol/di.high_pop.vars(a.high_pop)[0]):a.cit+a.sol;let o=999,n=1e6,l=100,u=0,d=150;switch(e){case"mad":o=3,n=1e5,l=1.1,d=150,(void 0!==a.synth?a.synth:"synthetic"===_i[t.race.species].type)&&(o=5,n=125e3,d=100);break;case"cataclysm":case"bioseed":o=3,n=5e4,l=1.015,u=1,d=400;break;case"ai":o=2.5,n=45e3,l=1.014,u=2,d=600;break;case"vacuum":case"bigbang":o=2.2,n=4e4,l=1.012,u=2.5,d=800;break;case"ascend":case"terraform":o=1.15,n=3e4,l=1.008,u=4,d=2e3;break;case"matrix":o=1.5,n=32e3,l=1.01,u=3.2,d=1800;break;case"retire":o=1.15,n=32e3,l=1.006,u=3.2,d=1800;break;case"eden":o=1,n=18e3,l=1.004,u=2.5,d=1800}if(d=void 0!==s?Math.floor(d*(1+(s+(a.tp?1:0))/8)):Math.floor(d*(1+(so()-(t.race.truepath?0:1))/8)),void 0===a.plas){let s=void 0!==a.know?a.know:t.stats.know,i=Math.round(c/o);for(;s>n;)i++,s-=n,n*=l;if(t.race.cataclysm?i+=300:t.race.lone_survivor&&(i+=800),r.plasmid=mc(i,e,!1,a),!a.rawPlasmids&&r.plasmid>d){let e=r.plasmid-d;r.plasmid=d,e=Math.floor(e/(e+d)*d),r.plasmid+=e}}else r.plasmid=a.plas;if(r.phage=r.plasmid>0?mc(Math.floor(Math.log2(r.plasmid)*Math.E*u),e,!1,a):0,"bigbang"===e){let e=a.exotic,s=a.mass;void 0===e&&t.interstellar&&t.interstellar.stellar_engine&&(e=t.interstellar.stellar_engine.exotic,s=t.interstellar.stellar_engine.mass);let i=+Math.log(1+40*e).toFixed(3);i+=+(Math.log2(s-7)/2.5).toFixed(3),i=mc(i,"bigbang",3,a),r.dark=i}else if("vacuum"===e){let e=void 0!==a.mana?a.mana:t.resource.Mana.gen,s=+(Math.log2(e)/5).toFixed(3);s=mc(s,"vacuum",3,a),r.dark=s}if(["ascend","descend","terraform"].includes(e)){let c=1;if(void 0===s?(c=so(),c>5&&(c=5)):c=s+1,"ascend"===e||"terraform"===e){switch(i){case"micro":c*=.25;break;case"heavy":c*=1.2;break;case"antimatter":c*=1.1}r.harmony=parseFloat(c.toFixed(2))}else if("descend"===e){let e="micro"===i?1:c,s=a.floor;void 0!==s?s++:s=t.portal.hasOwnProperty("spire")?t.portal.spire.count:0,[50,100].forEach((function(t){s>t&&e++})),r.artifact=e}}return"ai"===e&&(r.cores="micro"===i?2:5),r}function fc(e,a,r){let s=e.cost||{};if((s.RNA||s.DNA)&&t.genes.evolve){var i={};return Object.keys(s).forEach((function(e){"RNA"!==e&&"DNA"!==e||(i[e]=function(){return Math.round(.8*s[e](a,r))})})),i}return s=function(e,a,r){if(t.race.bloated){let t=1+di.bloated.vars()[0]/100;var s={};return Object.keys(e).forEach((function(i){["Food","Lumber","Stone","Furs","Copper","Iron","Aluminium","Cement","Coal","Steel","Titanium","Alloy","Polymer","Iridium"].includes(i)?s[i]=function(){return e[i](a,r)*t}:s[i]=function(){return e[i](a,r)}})),s}return e}(s,a,r),s=function(e,a,r,s){if((s?s.truepath:t.race.truepath)&&(!a.hasOwnProperty("path")||!a.path.includes("truepath"))){var i={};return Object.keys(e).forEach((function(t){"Money"===t?i[t]=function(){return Math.round(3*e[t](r,s))}:["Structs","Knowledge","Custom","Soul_Gem","Plasmid","Phage","Dark","Harmony","Blood_Stone","Artifact","Corrupt_Gem","Codex","Demonic_Essence","Horseshoe"].includes(t)?i[t]=function(){return e[t](r,s)}:i[t]=function(){return Math.round(2*e[t](r,s))}})),i}return e}(s,e,a,r),s=function(e,a,r){if(t.race.lone_survivor){var s={};return Object.keys(e).forEach((function(t){["Structs","Custom","Soul_Gem","Plasmid","Phage","Dark","Harmony","Blood_Stone","Artifact","Corrupt_Gem","Codex","Demonic_Essence","Horseshoe"].includes(t)?s[t]=function(){return e[t](a,r)}:["Knowledge"].includes(t)?s[t]=function(){return Math.round(.5*e[t](a,r))}:["Money"].includes(t)?s[t]=function(){return Math.round(.22*e[t](a,r))}:["Plywood","Brick","Wrought_Iron","Sheet_Metal","Mythril","Quantium"].includes(t)?s[t]=function(){return Math.round(.14*e[t](a,r))}:s[t]=function(){return Math.round(.28*e[t](a,r))}})),s}return e}(s,a,r),s=function(e,a,r){if(t.race.inflation){var s={};return Object.keys(e).forEach((function(i){if("Money"===i){let c=1+t.race.inflation/75;s[i]=function(){return Math.round(e[i](a,r)*c)}}else s[i]=function(){return e[i](a,r)}})),s}return e}(s,a,r),s=function(e,a,r){if("technocracy"===t.civic.govern.type){let t=1+re.technocracy()[1]/100;var s={};return Object.keys(e).forEach((function(i){if("Knowledge"===i){let t=1-re.technocracy()[0]/100;s[i]=function(){return Math.round(e[i](a,r)*t)}}else s[i]="Money"===i||"Structs"===i||"Custom"===i?function(){return e[i](a,r)}:function(){return Math.round(e[i](a,r)*t)}})),s}return e}(s,a,r),s=function(e,a,r){if(t.race.flier&&(e.Stone||e.Cement)){var s={};let t=1-di.flier.vars()[0]/100;return Object.keys(e).forEach((function(i){"Stone"!==i||e.Cement?"Cement"===i?e.Stone?s.Stone=function(){return Math.round(e.Stone(a,r)*t+1.8*e[i](a,r)*t)||0}:s.Stone=function(){return Math.round(1.75*e[i](a,r)*t)}:s[i]=function(){return e[i](a,r)}:s[i]=function(){return Math.round(e[i](a,r)*t)||0}})),s}return e}(s,a,r),s=function(e,a,r){if(t.race.kindling_kindred&&(e.Lumber||e.Plywood)){var s={};let t=1+di.kindling_kindred.vars()[0]/100;return Object.keys(e).forEach((function(i){"Lumber"!==i&&"Plywood"!==i&&"Structs"!==i?s[i]=function(){return Math.round(e[i](a,r)*t)||0}:"Structs"===i&&(s[i]=function(){return e[i](a,r)})})),s}if(t.race.unfathomable&&t.city.captive_housing){let t=Oi("entish");if(t>0){s={};let i=1-.4*t;return Object.keys(e).forEach((function(t){s[t]="Lumber"===t&&"Plywood"===t?function(){return Math.round(e[t](a,r)*i)||0}:function(){return e[t](a,r)}})),s}}return e}(s,a,r),s=function(e,a,r){if(t.race.smoldering){let s={};return Object.keys(e).forEach((function(t){if("Lumber"===t||"Plywood"===t){let i="Plywood"===t?2:1;s.Chrysotile=function(){return Math.round(e[t](a,r)*i)||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(t)?s[t]=function(){return e[t](a,r)}:s[t]=function(){return Math.round(.9*e[t](a,r))}})),!s.hasOwnProperty("Chrysotile")&&e.hasOwnProperty("Money")&&t.tech.primitive&&t.tech.primitive>=3&&(s.Chrysotile=function(){let t=e.Money(a,r)||0;return t>0?Math.round(t/50):0}),s}return e}(s,a,r),s=function(e,a,r){let s=D("pragmatist",1),i=Oi("gnome");if((t.race.smart||t.race.dumb||s||i>0)&&e.Knowledge){var c={};return Object.keys(e).forEach((function(o){c[o]="Knowledge"===o?function(){let c=e[o](a,r);return t.race.smart&&(c*=1-di.smart.vars()[0]/100),i>0&&(c*=1-di.smart.vars(1)[0]/100*i),t.race.dumb&&(c*=1+di.dumb.vars()[0]/100),s&&(c*=1+s/100),Math.round(c)}:function(){return e[o](a,r)}})),c}return e}(s,a,r),s=function(e,a,r){if(e.Cement&&t.tech.cement&&t.tech.cement>=2){let i=t.tech.cement>=3?.8:.9;var s={};return Object.keys(e).forEach((function(t){s[t]="Cement"===t?function(){return Math.round(e[t](a,r)*i)||0}:function(){return e[t](a,r)}})),s}return e}(s,a,r),s=function(e,t,a){let r=D("extravagant",0);if(r){var s={};return Object.keys(e).forEach((function(i){if("Money"===i){let c=1+r/100;s[i]=function(){return Math.round(e[i](t,a)*c)}}else s[i]=function(){return e[i](t,a)}})),s}return e}(s,a,r),s=function(e,a,r){if(t.race.heavy){var s={};return Object.keys(e).forEach((function(t){s[t]="Stone"===t||"Cement"===t||"Wrought_Iron"===t?function(){return Math.round(e[t](a,r)*(1+di.heavy.vars()[1]/100))}:function(){return e[t](a,r)}})),s}return e}(s,a,r),function(e,a,r){let s=Oi("pterodacti");if((t.race.hollow_bones||s>0)&&(e.Plywood||e.Brick||e.Wrought_Iron||e.Sheet_Metal||e.Mythril||e.Aerogel||e.Nanoweave||e.Scarletite||e.Quantium)){var i={};return Object.keys(e).forEach((function(c){i[c]="Plywood"===c||"Brick"===c||"Wrought_Iron"===c||"Sheet_Metal"===c||"Mythril"===c||"Aerogel"===c||"Nanoweave"===c||"Scarletite"===c||"Quantium"===c?function(){let i=e[c](a,r);return t.race.hollow_bones&&(i*=1-di.hollow_bones.vars()[0]/100),s>0&&(i*=1-di.hollow_bones.vars(3)[0]/100*s),Math.round(i)}:function(){return e[c](a,r)}})),i}return e}(s,a,r)}function vc(e){return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e}function yc(e){switch(e){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'\n ';case"sun":return'';case"firework":return'';case"floppy":return'';case"slime":return'';case"lightning":return'\n \n '}}function bc(e){switch(e){case"star":return"0 0 640 640";case"atom":return"0 0 100 88.379";case"heavy":case"mask":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"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":case"martini":return"0 0 15 15";case"party":return"0 0 528.69 983.1";case"lightbulb":return"0 0 100 156";case"bunny":case"ant":return"0 0 128 128";case"egg":return"0 0 273.61 295.02";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 wc(e,a){if("feat"===a)switch(e){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 t.settings.icon}function $c(e,t,a,r,s){let i="";return r&&(i=`id="${r}" `),`${yc(e)}`}function xc(e,a){let r=Ic();const s=new Date;return r.active&&!t.special.egg[s.getFullYear()][`egg${e}`]?$c("egg",a||16,2,`egg${e}`,'role="button" aria-label="Egg" '):""}function kc(e){$(`#egg${e}`).click((function(){let a=(new Date).getFullYear();t.special.egg[a][`egg${e}`]||(t.special.egg[a][`egg${e}`]=!0,e<=12?"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=9,t.stats.antiplasmid+=9,Bi(z("city_egg_msg",[9,z("resource_AntiPlasmid_plural_name")]),"success",!1,["events"])):(t.prestige.Plasmid.count+=9,t.stats.plasmid+=9,Bi(z("city_egg_msg",[9,z("resource_Plasmid_plural_name")]),"success",!1,["events"])):(t.prestige.Phage.count+=4,t.stats.phage+=4,Bi(z("city_egg_msg",[4,z("resource_Phage_name")]),"success",!1,["events"])),$(`#egg${e}`).remove(),$(".popper").hide())}))}function qc(e,a,r){let s=Kc();const i=(new Date).getFullYear();let c=r?"trick":"treat";return s.active&&!t.special.trick[i][`${c}${e}`]?$c(r?"ghost":"candycorn",a||16,2,`${c}${e}`,`role="button" aria-label="${r?"Ghost":"Candy Corn"}" `):""}function Mc(e,a){const r=(new Date).getFullYear();let s=a?"trick":"treat";$(`#${s}${e}`).click((function(){t.special.trick[r][`${s}${e}`]||(t.special.trick[r][`${s}${e}`]=!0,a?(t.prestige.Phage.count+=2,t.stats.phage+=2,Bi(z("city_ghost_msg",[2,z("resource_Phage_name")]),"success",!1,["events"])):"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=13,t.stats.antiplasmid+=13,Bi(z("city_trick_msg",[13,z("resource_AntiPlasmid_plural_name")]),"success",!1,["events"])):(t.prestige.Plasmid.count+=13,t.stats.plasmid+=13,Bi(z("city_trick_msg",[13,z("resource_Plasmid_plural_name")]),"success",!1,["events"])),$(`#${s}${e}`).remove(),setTimeout((function(){1===e&&a&&$(".popper").hide()}),250))}))}function Pc(e,a,r,s,i,c){return t.stats.achieve[e]&&(i?t.stats.achieve[e][c]-1:t.stats.achieve[e][c])>0?`

        ${yc(r)}${Sc(t.stats.achieve[e][c])} ${s}

        `:""}function Oc(e,a,r,s,i){a||(a=10),r||(r=wc(e,"achievement"));let c="";if(i)switch(i){case"standard":c+=Pc(e,a,r,z(t.settings.icon),s,"l");break;case"antimatter":c+=Pc(e,a,"atom",z("universe_antimatter"),s,"a");break;case"evil":c+=Pc(e,a,"evil",z("universe_evil"),s,"e");break;case"heavy":c+=Pc(e,a,"heavy",z("universe_heavy"),s,"h");break;case"micro":c+=Pc(e,a,"micro",z("universe_micro"),s,"m");break;case"magic":c+=Pc(e,a,"magic",z("universe_magic"),s,"mg")}else c+=Pc(e,a,r,z(t.settings.icon),s,"l"),c+=Pc(e,a,"atom",z("universe_antimatter"),s,"a"),c+=Pc(e,a,"evil",z("universe_evil"),s,"e"),c+=Pc(e,a,"heavy",z("universe_heavy"),s,"h"),c+=Pc(e,a,"micro",z("universe_micro"),s,"m"),c+=Pc(e,a,"magic",z("universe_magic"),s,"mg");return c}function Cc(e,t){return(t=t||{})[e]?t[e]:e<=1?1:t[e]=Cc(e-1,t)+Cc(e-2,t)}function jc(e){var t=Object.keys(e);return t[t.length*Math.random()<<0]}function Sc(e){switch(e){case 1:return z("basic");case 2:return z("plain");case 3:return z("bronze");case 4:return z("silver");case 5:return z("gold");default:return""}}function Fc(e,a){let r=0;if(a)Object.keys(a.ascended).forEach((function(e){r+=a.ascended[e]}));else if(t.stats.achieve.ascended)for(let e=0;e=1&&(s+=t.stats.achieve.technophobe.l);let i=0;for(let t=0;t=0&&(i>s&&(a-=s-i),i++),r-=a}return r}function zc(){t.stats.reset++,t.stats.tdays+=t.stats.days,t.stats.days=0,t.stats.tknow+=t.stats.know,t.stats.know=0,t.stats.tstarved+=t.stats.starved,t.stats.starved=0,t.stats.tdied+=t.stats.died,t.stats.died=0,t.stats.tsac+=t.stats.sac,t.stats.sac=0,t.stats.tcattle+=t.stats.cattle,t.stats.cattle=0,t.stats.tmurders+=t.stats.murders,t.stats.murders=0,t.stats.tpsykill+=t.stats.psykill,t.stats.psykill=0}function Ac(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e)){var t=[];return e.forEach((function(e){t.push(Ac(e))})),t}let a=new e.constructor;for(var r in e)e.hasOwnProperty(r)&&(a[r]=Ac(e[r]));return a}function Tc(e,a,r){switch(e){case"reverse":{let e=a.toLowerCase().split("").reverse().join("");return e.charAt(0).toUpperCase()+e.slice(1)}case"name":return Ec("fool",2021)?Tc("reverse",_i[t.race.species].name):_i[t.race.species].name;case"curve":return 1-(1-a)**(r||1.5)}return!1}function Ec(e,a){switch(e){case"easter":return Ic();case"halloween":return Kc();case"fool":{const e=new Date;return!(t.settings.boring||3!==e.getMonth()||1!==e.getDate()||a&&e.getFullYear()!==a)}case"launch_day":{const e=new Date;return!t.settings.boring&&4===e.getMonth()&&6===e.getDate()}case"summer":{const e=new Date;return!t.settings.boring&&5===e.getMonth()&&[20,21,22].includes(e.getDate())?(t.city.hasOwnProperty("foundry")&&!t.city.foundry.hasOwnProperty("Thermite")&&(t.city.foundry.Thermite=0),t.resource.hasOwnProperty("Thermite")||(t.resource.Thermite={name:z("resource_Thermite_name"),display:!1,value:0,amount:0,crates:0,diff:0,delta:0,max:-1,rate:0}),!0):(t.city.hasOwnProperty("foundry")&&t.city.foundry.hasOwnProperty("Thermite")&&(t.city.foundry.crafting-=t.city.foundry.Thermite,t.civic.craftsman.workers-=t.city.foundry.Thermite,t.civic[t.civic.d_job].workers+=t.city.foundry.Thermite,delete t.city.foundry.Thermite),!1)}case"firework":{const e=new Date;if(!t.settings.boring&&6===e.getMonth()&&[1,2,3,4].includes(e.getDate())){let e=t.race.cataclysm||t.race.orbit_decayed?"space":"city";return t[e].hasOwnProperty("firework")||(t[e].firework={count:0,on:0}),!0}return(t.city.hasOwnProperty("firework")||t.space.hasOwnProperty("firework"))&&(delete t.city.firework,delete t.space.firework),!1}}return!1}function Ic(){const e=new Date;let a=e.getFullYear();t.special.egg.hasOwnProperty(a)||(t.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}),t.special.egg.hasOwnProperty(a)&&!t.special.egg[a].hasOwnProperty("egg13")&&(t.special.egg[a].egg13=!1,t.special.egg[a].egg14=!1,t.special.egg[a].egg15=!1),t.special.egg.hasOwnProperty(a)&&!t.special.egg[a].hasOwnProperty("egg16")&&(t.special.egg[a].egg16=!1,t.special.egg[a].egg17=!1,t.special.egg[a].egg18=!1);let r=Math.floor,s=a%19,i=r(a/100),c=(i-r(i/4)-r((8*i+13)/25)+19*s+15)%30,o=c-r(c/28)*(1-r(29/(c+1))*r((21-s)/11)),n=o-(a+r(a/4)+o+2-i+r(i/4))%7,l=3+r((n+40)/44),u=n+28-31*r(l/4),d={date:[l-1,u],active:!1,endDate:[l-1,u],hint:!1,hintDate:[l-1,u],solve:!1,solveDate:[l-1,u]};return t.settings.boring||(d.endDate[1]+=10,(2===d.endDate[0]&&d.endDate[1]>31||3===d.endDate[0]&&d.endDate[1]>30)&&(d.endDate[1]-=2===d.endDate[0]?31:30,d.endDate[0]++),d.hintDate[1]+=1,(2===d.hintDate[0]&&d.hintDate[1]>31||3===d.hintDate[0]&&d.hintDate[1]>30)&&(d.hintDate[1]-=2===d.hintDate[0]?31:30,d.hintDate[0]++),d.solveDate[1]+=3,(2===d.solveDate[0]&&d.solveDate[1]>31||3===d.solveDate[0]&&d.solveDate[1]>30)&&(d.solveDate[1]-=2===d.solveDate[0]?31:30,d.solveDate[0]++),e.getMonth()>=d.date[0]&&e.getDate()>=d.date[1]&&e.getMonth()<=d.endDate[0]&&e.getDate()<=d.endDate[1]&&(d.active=!0,e.getMonth()>=d.hintDate[0]&&e.getDate()>=d.hintDate[1]&&e.getMonth()<=d.endDate[0]&&e.getDate()<=d.endDate[1]&&(d.hint=!0),e.getMonth()>=d.solveDate[0]&&e.getDate()>=d.solveDate[1]&&e.getMonth()<=d.endDate[0]&&e.getDate()<=d.endDate[1]&&(d.solve=!0))),d}function Kc(){const e=new Date;let a=e.getFullYear();t.special.trick.hasOwnProperty(a)||(t.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 r={date:[9,28],active:!1,endDate:[10,4],hint:!1,hintDate:[9,29],solve:!1,solveDate:[9,31]};if(t.settings.boring)return r;let s=new Date(`${r.date[0]+1}/${r.date[1]}/${a}`),i=new Date(`${r.endDate[0]+1}/${r.endDate[1]}/${a}`);return e>=s&&e<=i&&(r.active=!0,e>=new Date(`${r.hintDate[0]+1}/${r.hintDate[1]}/${a}`)&&e<=i&&(r.hint=!0),e>=new Date(`${r.solveDate[0]+1}/${r.solveDate[1]}/${a}`)&&e<=i&&(r.solve=!0)),r}function Lc(){return t.race.magnificent&&t.city.hasOwnProperty("shrine")&&t.city.shrine.count>0}function Nc(e){let a={mult:1,add:0};if(Lc())switch(e){case"metal":a.mult+=+t.city.shrine.metal/100*di.magnificent.vars()[3];break;case"tax":a.mult+=+t.city.shrine.tax/100*di.magnificent.vars()[2];break;case"know":a.add+=+t.city.shrine.know*di.magnificent.vars()[0],a.mult+=+t.city.shrine.know*di.magnificent.vars()[1]/100;break;case"morale":a.add+=t.city.shrine.morale*di.magnificent.vars()[4]}return a}const Dc={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 Bc(e,a){let r=di[e].hasOwnProperty("vars")?di[e].vars(a):[];return Dc.hasOwnProperty(e)&&("fibroblast"===e?r=[5*r[0]]:"hivemind"===e&&t.race.high_pop?r=[r[0]*di.high_pop.vars()[0]]:"imitation"===e?r.push(_i[t.race.srace||"protoplasm"].name):"elusive"===e?r=[Math.round(100*(1/30/(1/(30+r[0]))-1))]:"chameleon"===e?r=[r[0],Math.round(100*(1/30/(1/(30+r[1]))-1))]:"blood_thirst"===e?r=[Math.ceil(Math.log2(r[0]))]:"selenophobia"===e?r=[14-r[0],r[0]]:"hooved"===e?r.unshift(Gc()):"anthropophagite"===e?r=[1e4*r[0]]:Dc[e]||(r=[])),r}function Gc(e){return t.race.sludge?e?"craft":z("resource_Beaker_name"):"cath"===t.race.species?e?"craft":z("resource_Box_name"):"wolven"===t.race.species?e?"craft":z("resource_ChewToy_name"):"dracnid"===t.race.species?e?"craft":z("resource_Hoard_name"):"seraph"===t.race.species?e?"forge":z("resource_Halo_name"):"cyclops"===t.race.species?e?"craft":z("resource_Monocle_name"):"kobold"===t.race.species?e?"craft":z("resource_Candle_name"):"tuskin"===t.race.species?e?"craft":z("resource_Goggles_name"):"sharkin"===t.race.species?e?"craft":z("resource_ToothSharpener_name"):"humanoid"===_i[t.race.species].type?e?"craft":z("resource_Sandals_name"):"avian"===_i[t.race.species].type?e?"craft":z("resource_Perch_name"):"plant"===_i[t.race.species].type?e?"craft":z("resource_Planter_name"):"fungi"===_i[t.race.species].type?e?"craft":z("resource_DampCloth_name"):"reptilian"===_i[t.race.species].type?e?"craft":z("resource_HeatRock_name"):"fey"===_i[t.race.species].type?e?"craft":z("resource_PixieDust_name"):"synthetic"===_i[t.race.species].type?e?"craft":z("resource_Battery_name"):e?"forge":z("resource_Horseshoe_name")}const Rc={infiltrator:[z("wiki_trait_effect_infiltrator_ex1"),z("wiki_trait_effect_infiltrator_ex2",[[`${z("tech_steel")}`,`${z("tech_electricity")}`,`${z("tech_electronics")}`,`${z("tech_fission")}`,`${z("tech_rocketry")}`,`${z("tech_artificial_intelligence")}`,`${z("tech_quantum_computing")}`,`${z("tech_virtual_reality")}`,`${z("tech_shields")}`,`${z("tech_ai_core")}`,`${z("tech_graphene_processing")}`,`${z("tech_nanoweave")}`,`${z("tech_orichalcum_analysis")}`,`${z("tech_infernium_fuel")}`].join(", ")])],heavy:[z("wiki_trait_effect_heavy_ex1",[Hc("Stone"),Hc("Cement"),Hc("Wrought_Iron")])],sniper:[z("wiki_trait_effect_sniper_ex1")],hooved:[z("wiki_trait_effect_hooved_ex1",[Gc(!1)]),z("wiki_trait_effect_hooved_ex2",[`${t.resource.hasOwnProperty("Lumber")?t.resource.Lumber.name:z("resource_Lumber_name")}`,`${t.resource.hasOwnProperty("Copper")?t.resource.Copper.name:z("resource_Copper_name")}`,`${t.resource.hasOwnProperty("Iron")?t.resource.Iron.name:z("resource_Iron_name")}`,`${t.resource.hasOwnProperty("Steel")?t.resource.Steel.name:z("resource_Steel_name")}`,`${t.resource.hasOwnProperty("Adamantite")?t.resource.Adamantite.name:z("resource_Adamantite_name")}`,`${t.resource.hasOwnProperty("Orichalcum")?t.resource.Orichalcum.name:z("resource_Orichalcum_name")}`,12,75,150,500,5e3]),z("wiki_trait_effect_hooved_ex3"),z("wiki_trait_effect_hooved_ex4",['5',Gc(!1)]),z("wiki_trait_effect_hooved_ex5",[`${t.resource.hasOwnProperty("Lumber")?t.resource.Lumber.name:z("resource_Lumber_name")}`,`${t.resource.hasOwnProperty("Copper")?t.resource.Copper.name:z("resource_Copper_name")}`])],instinct:[z("wiki_trait_effect_instinct_ex1",[6.67,z("galaxy_chthonian"),10])],logical:[z("wiki_trait_effect_logical_ex1",[t.tech.hasOwnProperty("science")?t.tech.science:0,t.tech.hasOwnProperty("high_tech")?t.tech.high_tech:0])],high_pop:[z("wiki_trait_effect_high_pop_ex1")],flier:[z("wiki_trait_effect_flier_ex1")],unfathomable:[z("wiki_trait_effect_unfathomable_ex1"),z("wiki_trait_effect_unfathomable_ex2")]};function Hc(e){return`${t.hasOwnProperty("resource")&&t.resource.hasOwnProperty(e)?t.resource[e].name:z(`resource_${e}_name`)}`}function Uc(e,a,r){let s=r.fanatic||!1,i=r.tpage||!1,c=r.trank||!1,o=r.wiki||!1,n="",l=Ci("name",a),u=Ci("desc",a);i&&["genus","major"].includes(di[a].type)&&(n=`«${z("wiki_trait_rank")} {{ rank }}»`),o&&e.append(`

        ${l}

        ${n}
        `),o&&(i&&di[a].hasOwnProperty("val")?e.append(`
        ${z(`wiki_trait_${di[a].type}`)}${z("wiki_trait_value",[di[a].val])}
        `):e.append(`
        ${z(`wiki_trait_${di[a].type}`)}
        `)),s&&o&&e.append(`
        ${z("wiki_trait_fanaticism",[s])}
        `),e.append(`
        ${u}
        `);let d="warning";if(di[a].hasOwnProperty("val")&&(d=di[a].val>=0?"success":"danger"),i&&["genus","major"].includes(di[a].type)?e.append(`
        `):(o||t.stats.feat.journeyman&&t.stats.achieve.seeder&&t.stats.achieve.seeder.l>0)&&e.append(`
        ${z(`wiki_trait_effect_${a}`,Bc(a,c))}
        `),Rc[a]&&o&&Rc[a].forEach((function(t){e.append(`
        ${t}
        `)})),i&&["genus","major"].includes(di[a].type)){let e={rank:t.race[a]||1};ic({el:`#${di[a].type}_${a}`,data:e,methods:{getTraitDesc:e=>z(`wiki_trait_effect_${a}`,Bc(a,e)),up(){switch(e.rank){case.25:e.rank=.5;break;case.5:e.rank=1;break;case 1:e.rank=2;break;case 2:case 3:e.rank=3}},down(){switch(e.rank){case.25:case.5:e.rank=.25;break;case 1:e.rank=.5;break;case 2:e.rank=1;break;case 3:e.rank=2}}}})}}const Wc={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"],challenge:["joyless","steelen","dissipated","technophobe","wheelbarrow","iron_will","failed_history","banana","pathfinder","ashanddust","exodus","obsolete","bluepill","retired","gross","lamentis","overlord","adam_eve"]},Qc={colonist:[Tc("name")]},Zc={trade:[750,50]},Vc={};Object.keys(Wc).forEach((function(e){Wc[e].forEach((t=>Vc[t]={name:z(`achieve_${t}_name`),desc:Zc[t]?z(`achieve_${t}_desc`,Zc[t]):z(`achieve_${t}_desc`),flair:Qc[t]?z(`achieve_${t}_flair`,Qc[t]):z(`achieve_${t}_flair`),type:e}))}));const Jc={utopia:{name:z("feat_utopia_name"),desc:z("feat_utopia_desc"),flair:z("feat_utopia_flair")},take_no_advice:{name:z("feat_take_no_advice_name"),desc:z("feat_take_no_advice_desc"),flair:z("feat_take_no_advice_flair")},ill_advised:{name:z("feat_ill_advised_name"),desc:z("feat_ill_advised_desc"),flair:z("feat_ill_advised_flair")},organ_harvester:{name:z("feat_organ_harvester_name"),desc:z("feat_organ_harvester_desc"),flair:z("feat_organ_harvester_flair")},the_misery:{name:z("feat_the_misery_name"),desc:z("feat_the_misery_desc"),flair:z("feat_the_misery_flair")},energetic:{name:z("feat_energetic_name"),desc:z("feat_energetic_desc"),flair:z("feat_energetic_flair")},garbage_pie:{name:z("feat_garbage_pie_name"),desc:z("feat_garbage_pie_desc"),flair:z("feat_garbage_pie_flair")},finish_line:{name:z("feat_finish_line_name"),desc:z("feat_finish_line_desc"),flair:z("feat_finish_line_flair")},blank_slate:{name:z("feat_blank_slate_name"),desc:z("feat_blank_slate_desc"),flair:z("feat_blank_slate_flair")},supermassive:{name:z("feat_supermassive_name"),desc:z("feat_supermassive_desc"),flair:z("feat_supermassive_flair")},steelem:{name:z("feat_steelem_name"),desc:z("feat_steelem_desc"),flair:z("feat_steelem_flair")},banana:{name:z("feat_banana_name"),desc:z("feat_banana_desc",[500,500]),flair:z("feat_banana_flair")},rocky_road:{name:z("feat_rocky_road_name"),desc:z("feat_rocky_road_desc"),flair:z("feat_rocky_road_flair")},demon_slayer:{name:z("feat_demon_slayer_name"),desc:z("feat_demon_slayer_desc"),flair:z("feat_demon_slayer_flair")},equilibrium:{name:z("feat_equilibrium_name"),desc:z("feat_equilibrium_desc"),flair:z("feat_equilibrium_flair")},digital_ascension:{name:z("feat_digital_ascension_name"),desc:z("feat_digital_ascension_desc"),flair:z("feat_digital_ascension_flair")},novice:{name:z("feat_novice_name"),desc:z("feat_achievement_hunter_desc",[10]),flair:z("feat_novice_flair")},journeyman:{name:z("feat_journeyman_name"),desc:z("feat_achievement_hunter_desc",[25]),flair:z("feat_journeyman_flair")},adept:{name:z("feat_adept_name"),desc:z("feat_achievement_hunter_desc",[50]),flair:z("feat_adept_flair")},master:{name:z("feat_master_name"),desc:z("feat_achievement_hunter_desc",[75]),flair:z("feat_master_flair")},grandmaster:{name:z("feat_grandmaster_name"),desc:z("feat_achievement_hunter_desc",[100]),flair:z("feat_grandmaster_flair")},nephilim:{name:z("feat_nephilim_name"),desc:z("feat_nephilim_desc"),flair:z("feat_nephilim_flair")},twisted:{name:z("feat_twisted_name"),desc:z("feat_twisted_desc"),flair:z("feat_twisted_flair")},slime_lord:{name:z("feat_slime_lord_name"),desc:z("feat_slime_lord_desc"),flair:z("feat_slime_lord_flair")},annihilation:{name:z("feat_annihilation_name"),desc:z("feat_annihilation_desc"),flair:z("feat_annihilation_flair")},friday:{name:z("feat_friday_name"),desc:z("feat_friday_desc"),flair:z("feat_friday_flair")},valentine:{name:z("feat_love_name"),desc:z("feat_love_desc"),flair:z("feat_love_flair")},leprechaun:{name:z("feat_leprechaun_name"),desc:z("feat_leprechaun_desc"),flair:z("feat_leprechaun_flair")},easter:{name:z("feat_easter_name"),desc:z("feat_easter_desc"),flair:z("feat_easter_flair")},egghunt:{name:z("feat_egghunt_name"),desc:z("feat_egghunt_desc"),flair:z("feat_egghunt_flair")},launch_day:{name:z("feat_launch_day_name"),desc:z("feat_launch_day_desc"),flair:z("feat_launch_day_flair")},solstice:{name:z("feat_solstice_name"),desc:z("feat_solstice_desc"),flair:z("feat_solstice_flair")},firework:{name:z("feat_firework_name"),desc:z("feat_firework_desc"),flair:z("feat_firework_flair")},halloween:{name:z("feat_boo_name"),desc:z("feat_boo_desc"),flair:z("feat_boo_flair")},trickortreat:{name:z("feat_trickortreat_name"),desc:z("feat_trickortreat_desc"),flair:z("feat_trickortreat_flair")},thanksgiving:{name:z("feat_gobble_gobble_name"),desc:z("feat_gobble_gobble_desc"),flair:z("feat_gobble_gobble_flair")},xmas:{name:z("feat_xmas_name"),desc:z("feat_xmas_desc"),flair:z("feat_xmas_flair")},fool:{name:z("feat_fool_name"),desc:z("feat_fool_desc"),flair:z("feat_fool_flair")}};{let e=Yc();e.aLvl,e.uLvl}function Yc(e){let a=Xc(e=e||t.race.universe),r=0,s=0;return Object.keys(Vc).forEach((function(e){t.stats.achieve[e]&&(r+=t.stats.achieve[e].l>5?5:t.stats.achieve[e].l,t.stats.achieve[e][a]&&(s+=t.stats.achieve[e][a]>5?5:t.stats.achieve[e][a]))})),{aLvl:r,uLvl:s}}function Xc(e){switch(e=e||t.race.universe){case"evil":return"e";case"antimatter":return"a";case"heavy":return"h";case"micro":return"m";case"magic":return"mg";default:return"l"}}function eo(e,a,r,s){if("micro"!==t.race.universe&&!0===a)return!1;t.settings.msgFilters.achievements.unlocked||(t.settings.msgFilters.achievements.unlocked=!0,t.settings.msgFilters.achievements.vis=!0);let i=so(),c=!1,o=!1;(void 0===r||r>i)&&(r=i);let n=!0;if(void 0===t.stats.achieve[e]&&(t.stats.achieve[e]={l:0},n=!1),("micro"===t.race.universe&&!0===a||"micro"!==t.race.universe&&!0!==a)&&t.stats.achieve[e]&&t.stats.achieve[e].ls)&&(r=s),!t.stats.feat[e]||t.stats.feat[e]&&t.stats.feat[e]5?5:t.stats.achieve[e].l,t.stats.achieve[e][o]&&(c+=t.stats.achieve[e][o]>5?5:t.stats.achieve[e][o]);let s=Oc(e,16,l,n);n&&t.stats.achieve[e].l>1||!n?a.append($(`
        ${Vc[e].name}${Vc[e].desc}${s}
        `)):n&&1===t.stats.achieve[e].l&&r--}})),n&&!t.stats.feat.fool){let e=$(`
        ${Jc.fool.name}${z("feat_fool_spoof")}
        `);a.append(e)}else Object.keys(Jc).forEach((function(e){let r=wc(e,"feat");if(t.stats.feat[e]){let s=t.stats.feat[e]>1?`

        ${yc(r)}

        `:"";if("easter"===e){let e=xc(4,14);e.length>0&&(s=e)}a.append($(`
        ${Jc[e].name}${Jc[e].desc}${s}
        `))}}));let l=qc(5,12,!1);a.prepend(`
        ${z("achieve_draw_achieve_earned",[r,s])}${l}
        `),ic({el:"#achievePanel",methods:{flair:e=>Vc[e].flair,feat:e=>Jc[e].flair}}),n&&!t.stats.feat.fool&&$("#thefool").on("mouseover",(function(){"micro"===t.race.universe?to("fool",!0):to("fool"),ao()}))}function ro(){let e=so();$("#topBar span.flair")&&sc($("#topBar span.flair"),!0);let a=xc(1,14);if(a.length>0&&$("#topBar .planet").after($(a)),e>1&&0===$("#topBar .planet .flair").length){if(0===a.length){let t=wc("topbar","challenge");$("#topBar .planet").after(`${yc(t)}`)}let r="";t.race.no_plasmid&&(r+=`
        ${z("evo_challenge_plasmid")}
        `),t.race.weak_mastery&&(r+=`
        ${z("evo_challenge_mastery")}
        `),t.race.no_trade&&(r+=`
        ${z("evo_challenge_trade")}
        `),t.race.no_craft&&(r+=`
        ${z("evo_challenge_craft")}
        `),t.race.no_crispr&&(r+=`
        ${z("evo_challenge_crispr")}
        `),t.race.nerfed&&(r+=`
        ${z("evo_challenge_nerfed")}
        `),t.race.badgenes&&(r+=`
        ${z("evo_challenge_badgenes")}
        `),r.length>0&&$("#topBar .planetWrap .flair").append($(`
        Active Challenge Genes
        ${r}
        `)),Ei("topbarPlanet",(function(e){let t=$('
        ');e.popper.append(t),t.append($(r))}),{elm:"#topBar .planetWrap .flair",classes:"has-background-light has-text-dark"})}}function so(){let e=1;return t.race.no_plasmid&&e++,t.race.no_trade&&e++,t.race.no_craft&&e++,t.race.no_crispr&&e++,t.race.weak_mastery&&e++,t.race.nerfed&&e++,t.race.badgenes&&e++,e>5&&(e=5),e}function io(){let e=so();for(let a=e;a>=0;a--)co("extinct_","mass_extinction",25,a),"evil"===t.race.universe&&oo("extinct_","vigilante",12,a),co("genus_","creator",9,a),co("biome_","explorer",6,a),"heavy"===t.race.universe&&oo("genus_","heavyweight",8,a);if(t.tech.supercollider&&t.tech.supercollider>=99&&eo("blackhole"),t.stats.starved>=100&&eo("mass_starvation"),Math.round(Math.log2(t.civic.garrison.protest+t.civic.garrison.fatigue))>=8&&eo("warmonger"),t.stats.died>=250&&eo("red_tactics"),t.interstellar.stellar_engine&&t.interstellar.stellar_engine.mass>=12&&eo("landfill"),t.interstellar.stellar_engine&&t.interstellar.stellar_engine.mass>=100&&to("supermassive"),t.tech.piracy&&t.tech.chthonian&&t.tech.chthonian>=2&&t.galaxy&&1===It("gxy_stargate")&&1===It("gxy_gateway")&&1===It("gxy_gorddon")&&1===It("gxy_alien1")&&1===It("gxy_alien2")&&1===It("gxy_chthonian")&&eo("neutralized"),Ec("summer")&&t.resource.hasOwnProperty("Thermite")){let e=1e5+9e3*t.stats.reset;e>1e6&&(e=1e6),t.resource.Thermite.amount>e&&to("solstice","micro"===t.race.universe)}if(Ec("firework")&&t[t.race.cataclysm||t.race.orbit_decayed?"space":"city"].firework.on>0&&to("firework","micro"===t.race.universe),t.city.morale.current>=200&&(eo("paradise"),t.city.morale.current>=500&&to("utopia")),t.resource.hasOwnProperty("Money")&&t.resource.Money.amount>=1e9&&eo("scrooge"),t.resource.hasOwnProperty("Money")&&t.race.inflation&&t.resource.Money.amount>=25e10&&eo("wheelbarrow"),t.civic.hasOwnProperty("govern")&&t.galaxy.hasOwnProperty("trade")&&t.city.hasOwnProperty("market")&&t.galaxy.trade.cur>=50&&t.city.market.trade>=750&&"federation"===t.civic.govern.type&&eo("trade"),t.tech.pillars){let e={},a=0,r=5;if(Object.keys(t.pillars).forEach((function(s){_i[s]&&((!e[_i[s].type]||t.pillars[s]>e[_i[s].type])&&(e[_i[s].type]=t.pillars[s]),t.pillars[s]=Object.keys(ui).length){let t=5;Object.keys(e).forEach((function(a){e[a]=Object.keys(_i).length-1&&eo("resonance"),a>=50&&to("equilibrium",!1,r)}if(t.portal.hasOwnProperty("mechbay")&&t.tech.hasOwnProperty("hell_spire")&&t.tech.hell_spire>=9){let e=Object.keys(ja).length,a={};Object.keys(t.stats.spire).forEach((function(r){let s={};Object.keys(t.stats.spire[r]).forEach((function(e){ja[e]&&((!a.hasOwnProperty(e)||a[e]0&&(s[e]=t.stats.spire[r][e]))})),Object.keys(s).length===e&&eo("gladiator",!1,Math.min(...Object.values(s)),r)})),Object.keys(a).length===e&&eo("gladiator",!1,Math.min(...Object.values(a)),"l")}if(t.race.banana){let e=Xc();t.tech.hasOwnProperty("monuments")&&t.tech.monuments>=50&&(t.stats.banana.b5[e]=!0,"m"!==e&&"l"!==e&&(t.stats.banana.b5.l=!0));let a=0,r=0;["b1","b2","b3","b4","b5"].forEach((function(s){t.stats.banana[s].l&&a++,"l"!==e&&t.stats.banana[s][e]&&r++})),a>0&&eo("banana",!1,a,"l"),r>0&&"l"!==e&&eo("banana",!1,r,e),t.interstellar.hasOwnProperty("stellar_engine")&&t.interstellar.stellar_engine.mass>=12&&0===t.interstellar.stellar_engine.exotic&&(t.stats.banana.b3[e]=!0,"m"!==e&&"l"!==e&&(t.stats.banana.b3.l=!0))}["l",Xc()].forEach((function(e){let a=0;["ashanddust","exodus","obsolete","bluepill","retired"].forEach((function(r){t.stats.achieve[r]&&t.stats.achieve[r][e]&&t.stats.achieve[r][e]>=5&&a++})),a>0&&eo("pathfinder",!1,a,e)}));const a=new Date;let r=Ec("easter"),s=Ec("halloween"),i=a.getFullYear();if(!t.settings.boring&&13===a.getDate()&&5===a.getDay()&&t.resource[t.race.species].amount>=1){let e=!1;e=to("friday","micro"===t.race.universe),e&&t.resource[t.race.species].amount--}else if(t.settings.boring||1!==a.getMonth()||14!==a.getDate())if(t.settings.boring||2!==a.getMonth()||17!==a.getDate())if(r.active){to("easter","micro"===t.race.universe);let e=0;for(let a=1;a<=18;a++)t.special.egg[i][`egg${a}`]&&e++;e>=12&&to("egghunt","micro"===t.race.universe)}else if(Ec("launch_day"))to("launch_day","micro"===t.race.universe);else if(s.active){let e=0;for(let a=1;a<=7;a++)t.special.trick[i][`trick${a}`]&&e++;for(let a=1;a<=7;a++)t.special.trick[i][`treat${a}`]&&e++;e>=12&&to("trickortreat","micro"===t.race.universe),9===a.getMonth()&&31===a.getDate()&&to("halloween","micro"===t.race.universe)}else!t.settings.boring&&10===a.getMonth()&&a.getDate()>=22&&a.getDate()<=28?to("thanksgiving","micro"===t.race.universe):t.settings.boring||11!==a.getMonth()||25!=a.getDate()||to("xmas","micro"===t.race.universe);else to("leprechaun","micro"===t.race.universe);else to("valentine","micro"===t.race.universe);!t.settings.boring&&3===a.getMonth()&&a.getDate()>=1&&a.getDate()<=3&&t.stats.feat.hasOwnProperty("fool")&&t.stats.feat.fool>0&&to("fool","micro"===t.race.universe),t.stats.dkills>=666e6&&to("demon_slayer");for(let a=e;a>=1;a--){let e=0;const r=Object.keys(Vc);for(const s of r)t.stats.achieve[s]&&t.stats.achieve[s].l>=a&&e++;let s=[{c:10,f:"novice"},{c:25,f:"journeyman"},{c:50,f:"adept"},{c:75,f:"master"},{c:100,f:"grandmaster"}];for(let r=0;r<5;r++)e>=s[r].c&&(!t.stats.feat[s[r].f]||t.stats.feat[s[r].f]=s&&i++;if(i>=r&&(eo(a,!1,s),"standard"!==t.race.universe))switch(t.race.universe){case"evil":t.stats.achieve[a].e=void 0;break;case"antimatter":t.stats.achieve[a].a=void 0;break;case"heavy":t.stats.achieve[a].h=void 0;break;case"micro":t.stats.achieve[a].m=void 0;break;case"magic":t.stats.achieve[a].mg=void 0}}"standard"!==t.race.universe&&oo(e,a,r,s)}function oo(e,a,r,s){let i=!1;switch(t.race.universe){case"evil":(void 0===t.stats.achieve[a]||void 0===t.stats.achieve[a].e||t.stats.achieve[a].e=s&&i++;break;case"antimatter":t.stats.achieve[a]&&t.stats.achieve[a].a&&t.stats.achieve[a].a>=s&&i++;break;case"heavy":t.stats.achieve[a]&&t.stats.achieve[a].h&&t.stats.achieve[a].h>=s&&i++;break;case"micro":t.stats.achieve[a]&&t.stats.achieve[a].m&&t.stats.achieve[a].m>=s&&i++;break;case"magic":t.stats.achieve[a]&&t.stats.achieve[a].mg&&t.stats.achieve[a].mg>=s&&i++}i>=r&&eo(a,!1,s)}}const no={mastery:{name:z("mastery"),desc(){let e="";return Object.keys(aa).forEach((function(a){let r=_c(a,!0);"standard"===a?e+=`${aa[a].name}: ${z("perks_mastery_general",[`${+r.g.toFixed(2)}%`])}`:t.stats.achieve.whitehole&&(e+=`${aa[a].name}: ${z("perks_mastery_general",[`${+r.g.toFixed(2)}%`])}, ${z("perks_mastery_universe",[`${+r.u.toFixed(2)}%`])}`)})),e},active:()=>!!(t.genes.challenge&&t.genes.challenge>=2),notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_unlocked_title")}`])]},blackhole:{name:z("achieve_blackhole_name"),desc:e=>z("achieve_perks_blackhole",[e?"5/10/15/20/25":t.stats.achieve.blackhole?5*t.stats.achieve.blackhole.l:5]),active:()=>!!(t.stats.achieve.blackhole&&t.stats.achieve.blackhole.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_blackhole_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_blackhole_name")}`])]},trade:{name:z("achieve_trade_name"),desc:e=>z("achieve_perks_trade",[e?"2/4/6/8/10":t.stats.achieve.trade?2*t.stats.achieve.trade.l:2,e?"1/2/3/4/5":t.stats.achieve.trade?t.stats.achieve.trade.l:1]),active:()=>!!(t.stats.achieve.trade&&t.stats.achieve.trade.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_trade_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_trade_name")}`])]},creator:{name:z("achieve_creator_name"),desc:e=>z("achieve_perks_creator",[e?"1.5/2/2.5/3/3.5":1+(t.stats.achieve.creator?.5*t.stats.achieve.creator.l:.5)]),active:()=>!!(t.stats.achieve.creator&&t.stats.achieve.creator.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_creator_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_creator_name")}`])]},mass_extinction:{name:z("achieve_mass_extinction_name"),group:[{desc:()=>z("achieve_perks_mass_extinction"),active:()=>!!(t.stats.achieve.mass_extinction&&t.stats.achieve.mass_extinction.l>=1)},{desc(e){let a=t.stats.achieve.mass_extinction?t.stats.achieve.mass_extinction.l:1;return z("achieve_perks_mass_extinction2",[e?"0/50/100/150/200":50*(a-1)])},active:()=>!!(t.stats.achieve.mass_extinction&&t.stats.achieve.mass_extinction.l>1)}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_mass_extinction_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_mass_extinction_name")}`])]},doomed:{name:z("achieve_doomed_name"),desc:e=>z("achieve_perks_doomed"),active:()=>t.stats.portals>=1,notes:[z("wiki_perks_achievement_note",[`${z("achieve_doomed_name")}`])]},explorer:{name:z("achieve_explorer_name"),desc:e=>z("achieve_perks_explorer",[e?"1/2/3/4/5":t.stats.achieve.explorer?t.stats.achieve.explorer.l:1]),active:()=>!!(t.stats.achieve.explorer&&t.stats.achieve.explorer.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_explorer_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_explorer_name")}`])]},miners_dream:{name:z("achieve_miners_dream_name"),desc:e=>z("achieve_perks_miners_dream",[e?"1/2/3/5/7":t.stats.achieve.miners_dream?t.stats.achieve.miners_dream.l>=4?2*t.stats.achieve.miners_dream.l-3:t.stats.achieve.miners_dream.l:0]),active:()=>!!(t.stats.achieve.miners_dream&&t.stats.achieve.miners_dream.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_miners_dream_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_miners_dream_name")}`])]},extinct_junker:{name:z("achieve_extinct_junker_name"),desc:()=>z("achieve_perks_enlightened"),active:()=>!!(t.stats.achieve.extinct_junker&&t.stats.achieve.extinct_junker.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_extinct_junker_name")}`])]},joyless:{name:z("achieve_joyless_name"),desc:e=>z("achieve_perks_joyless",[e?"2/4/6/8/10":t.stats.achieve.joyless?2*t.stats.achieve.joyless.l:2]),active:()=>!!(t.stats.achieve.joyless&&t.stats.achieve.joyless.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_joyless_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_joyless_name")}`])]},steelen:{name:z("achieve_steelen_name"),desc:e=>z("achieve_perks_steelen",[e?"2/4/6/8/10":t.stats.achieve.steelen?2*t.stats.achieve.steelen.l:2]),active:()=>!!(t.stats.achieve.steelen&&t.stats.achieve.steelen.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_steelen_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_steelen_name")}`])]},wheelbarrow:{name:z("achieve_wheelbarrow_name"),desc:e=>z("achieve_perks_wheelbarrow",[e?"2/4/6/8/10":t.stats.achieve.wheelbarrow?2*t.stats.achieve.wheelbarrow.l:2]),active:()=>!!(t.stats.achieve.wheelbarrow&&t.stats.achieve.wheelbarrow.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_wheelbarrow_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_wheelbarrow_name")}`])]},extinct_sludge:{name:z("achieve_extinct_sludge_name"),group:[{desc:e=>z("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.l:3,z("universe_standard")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.l>=1)},{desc:e=>z("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.h:3,z("universe_heavy")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.h>=1)},{desc:e=>z("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.a:3,z("universe_antimatter")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.a>=1)},{desc:e=>z("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.e:3,z("universe_evil")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.e>=1)},{desc:e=>z("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.m:3,z("universe_micro")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.m>=1)},{desc:e=>z("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.mg:3,z("universe_magic")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.mg>=1)}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_extinct_sludge_name")}`]),z("wiki_perks_achievement_note_universe_scale",[`${z("achieve_extinct_sludge_name")}`])]},whitehole:{name:z("achieve_whitehole_name"),group:[{desc:()=>z("achieve_perks_whitehole"),active:()=>!!t.stats.achieve.whitehole},{desc:e=>z("achieve_perks_whitehole2",[e?"5/10/15/20/25":t.stats.achieve.whitehole?5*t.stats.achieve.whitehole.l:5]),active:()=>!!t.stats.achieve.whitehole},{desc:e=>z("achieve_perks_whitehole3",[e?"1/2/3/4/5":t.stats.achieve.whitehole?t.stats.achieve.whitehole.l:1]),active:()=>!!t.stats.achieve.whitehole}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_whitehole_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_whitehole_name")}`])]},heavyweight:{name:z("achieve_heavyweight_name"),desc:e=>z("achieve_perks_heavyweight",[e?"4/8/12/16/20":t.stats.achieve.heavyweight?4*t.stats.achieve.heavyweight.l:4]),active:()=>!!t.stats.achieve.heavyweight,notes:[z("wiki_perks_achievement_note",[`${z("achieve_heavyweight_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_heavyweight_name")}`])]},dissipated:{name:z("achieve_dissipated_name"),group:[{desc:()=>z("achieve_perks_dissipated1",[1]),active:()=>!!(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=1)},{desc:e=>z("achieve_perks_dissipated2",[e?"1/2":t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=5?2:1]),active:()=>!!(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=3)},{desc:()=>z("achieve_perks_dissipated3",[1]),active:()=>!!(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=2)},{desc:()=>z("achieve_perks_dissipated4",[1]),active:()=>!!(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=4)}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_dissipated_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_dissipated_name")}`])]},banana:{name:z("achieve_banana_name"),group:[{desc:()=>z("achieve_perks_banana1",[50]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=1)},{desc:()=>z("achieve_perks_banana2",[1]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=2)},{desc:()=>z("achieve_perks_banana3",[10]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=3)},{desc:()=>z("achieve_perks_banana4",[3]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=4)},{desc:()=>z("achieve_perks_banana5",[.01]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=5)}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_banana_name")}`]),z("wiki_perks_achievement_note_task",[`${z("achieve_banana_name")}`]),z("wiki_perks_achievement_note_task_num",[1,`${z("wiki_achieve_banana1")}`]),z("wiki_perks_achievement_note_task_num",[2,`${z("wiki_achieve_banana2")}`]),z("wiki_perks_achievement_note_task_num",[3,`${z("wiki_achieve_banana3")}`]),z("wiki_perks_achievement_note_task_num",[4,`${z("wiki_achieve_banana4",[500])}`]),z("wiki_perks_achievement_note_task_num",[5,`${z("wiki_achieve_banana5",[50])}`])]},anarchist:{name:z("achieve_anarchist_name"),desc:e=>z("achieve_perks_anarchist",[e?"10/20/30/40/50":t.stats.achieve.anarchist?10*t.stats.achieve.anarchist.l:10]),active:()=>!!(t.stats.achieve.anarchist&&t.stats.achieve.anarchist.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_anarchist_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_anarchist_name")}`])]},ascended:{name:z("achieve_ascended_name"),group:[{desc(e){let a;if(e)a="1-30";else if(a=0,t.stats.achieve.ascended)for(let e=0;e!!(t.stats.achieve.ascended&&t.stats.achieve.ascended.l>=1)},{desc:()=>z("achieve_perks_ascended2",[tc()]),active:()=>!!(t.stats.achieve.ascended&&t.stats.achieve.ascended[Xc()]>=1)}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_ascended_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_ascended_name")}`]),z("wiki_perks_achievement_note_universe",[`${z("achieve_ascended_name")}`])]},technophobe:{name:z("achieve_technophobe_name"),group:[{desc:()=>z("achieve_perks_technophobe1",[25]),active:()=>!!(t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=1)},{desc(e){let a;if(e)a="10/25/30/35/40/45/50";else{a=t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=4?25:10;for(let e=1;e=5&&(a+=5)}return z("achieve_perks_technophobe2",[a])},active:()=>!!(t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=2)},{desc(e){let a;if(e)a="1/2/3/4/5/6";else{a=1;for(let e=1;e=5&&(a+=1)}return z(e||a>1?"achieve_perks_technophobe3a":"achieve_perks_technophobe3",[a])},active:()=>!!(t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=3)},{desc:()=>z("achieve_perks_technophobe4",[10]),active:()=>!!(t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=5)},{desc:e=>z("achieve_perks_technophobe5",[e?"1/2/3/4/5":t.stats.achieve.technophobe?t.stats.achieve.technophobe.l:0]),active:()=>!!(t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=1)}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_technophobe_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_technophobe_name")}`]),z("wiki_perks_achievement_note_universe",[`${z("achieve_technophobe_name")}`])]},iron_will:{name:z("achieve_iron_will_name"),group:[{desc:()=>z("achieve_perks_iron_will1",[.15]),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=1)},{desc:()=>z("achieve_perks_iron_will2",[10]),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=2)},{desc:()=>z("achieve_perks_iron_will3",[6]),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=3)},{desc:()=>z("achieve_perks_iron_will4",[1]),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=4)},{desc:()=>z("achieve_perks_iron_will5"),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=5)}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_iron_will_name")}`]),z("wiki_perks_achievement_note_ironwill",[`${z("evo_challenge_cataclysm")}`]),z("wiki_perks_achievement_note_ironwill2",[1,`${z("space_red_ziggurat_title")}`]),z("wiki_perks_achievement_note_ironwill3",[2,`${z("tech_elerium_mining")}`]),z("wiki_perks_achievement_note_ironwill3",[3,`${z("tech_lasers")}`]),z("wiki_perks_achievement_note_ironwill3",[4,`${z("tech_generational_ship")}`]),z("wiki_perks_achievement_note_ironwill4",[5,`${z("wiki_resets_bioseed")}`])]},failed_history:{name:z("achieve_failed_history_name"),desc:()=>z("achieve_perks_failed_history",[2]),active:()=>!!(t.stats.achieve.failed_history&&t.stats.achieve.failed_history.l>=5),notes:[z("wiki_perks_achievement_note",[`${z("achieve_failed_history_name")}`]),z("wiki_perks_achievement_note_failed_history",[`${z("evo_challenge_cataclysm")}`])]},lamentis:{name:z("achieve_lamentis_name"),group:[{desc:()=>z("achieve_perks_lamentis1",["10%"]),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=1)},{desc:()=>z("achieve_perks_lamentis2",["10%"]),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=2)},{desc:()=>z("achieve_perks_lamentis3",["10%"]),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=3)},{desc:()=>z("achieve_perks_lamentis4"),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=4)},{desc:()=>z("achieve_perks_lamentis5"),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=5)}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_lamentis_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_lamentis_name")}`])]},soul_sponge:{name:z("achieve_soul_sponge_name"),desc:e=>z("achieve_perks_soul_sponge",[e?"100/200/300/400/500":t.stats.achieve.soul_sponge?100*t.stats.achieve.soul_sponge.mg:100]),active:()=>!!(t.stats.achieve.soul_sponge&&t.stats.achieve.soul_sponge.mg>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_soul_sponge_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_soul_sponge_name")}`])]},nightmare:{name:z("achieve_nightmare_name"),desc:()=>z("achieve_perks_nightmare"),active:()=>!!(t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_nightmare_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_nightmare_name")}`])]},gladiator:{name:z("achieve_gladiator_name"),desc:e=>z("achieve_perks_gladiator",[e?"20/40/60/80/100":t.stats.achieve.gladiator?20*t.stats.achieve.gladiator.l:20]),active:()=>!!(t.stats.achieve.gladiator&&t.stats.achieve.gladiator.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_gladiator_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_gladiator_name")}`])]},pathfinder:{name:z("achieve_pathfinder_name"),group:[{desc:()=>z("achieve_perks_pathfinder1",[10]),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=1)},{desc:()=>z("achieve_perks_pathfinder2",[10]),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=2)},{desc:()=>z("achieve_perks_pathfinder3"),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=3)},{desc:()=>z("achieve_perks_pathfinder4"),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=4)},{desc:()=>z("achieve_perks_pathfinder5"),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=5)}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_pathfinder_name")}`]),z("wiki_perks_achievement_note_pathfinder",[`${z("evo_challenge_truepath")}`]),z("wiki_perks_achievement_note_pathfinder_reset",[`${z("wiki_resets_mad")}`]),z("wiki_perks_achievement_note_pathfinder_reset",[`${z("wiki_resets_bioseed")}`]),z("wiki_perks_achievement_note_pathfinder_reset",[`${z("wiki_resets_ai")}`]),z("wiki_perks_achievement_note_pathfinder_reset",[`${z("wiki_resets_matrix")}`]),z("wiki_perks_achievement_note_pathfinder_reset",[`${z("wiki_resets_retired")}`])]},overlord:{name:z("achieve_overlord_name"),desc(){let e=`
        ${z("achieve_perks_overlord1",[10])}
        `;return e+=`
        ${z("achieve_perks_overlord2")}
        `,e+=`
        ${z("achieve_perks_overlord3")}
        `,e+=`
        ${z("achieve_perks_overlord4")}
        `,e},active:()=>!!(t.stats.achieve.overlord&&t.stats.achieve.overlord.l>=5),notes:[z("wiki_perks_achievement_note",[`${z("achieve_overlord_name")}`])]},adam_eve:{name:z("achieve_adam_eve_name"),desc:()=>z("achieve_perks_adam_eve"),active:()=>!!(t.stats.achieve.adam_eve&&t.stats.achieve.adam_eve.l>=5),notes:[]},creep:{name:z("wiki_arpa_crispr_creep"),desc:e=>z("arpa_perks_creep",[e?"0.01/0.02/0.03/0.04/0.05":t.genes.creep?.01*t.genes.creep:0]),active:()=>!!t.genes.creep,notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_genetic_memory_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_animus_title")}`,`${z("arpa_genepool_divine_remembrance_title")}`,`${z("arpa_genepool_divine_proportion_title")}`,`${z("arpa_genepool_genetic_repository_title")}`].join(", ")])]},store:{name:z("wiki_arpa_crispr_store"),desc(e){let a=e?"0.04/0.06/0.08":t.genes.store&&t.genes.store>1?2===t.genes.store?.06:.08:.04;return z(t.genes.store&&t.genes.store>=4?"arpa_perks_store2":"arpa_perks_store1",[a])},active:()=>!!t.genes.store,notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_spatial_reasoning_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_spatial_superiority_title")}`,`${z("arpa_genepool_spatial_supremacy_title")}`,`${z("arpa_genepool_dimensional_warping_title")}`].join(", ")])]},evolve:{name:z("wiki_arpa_crispr_evolve"),group:[{desc:()=>z("arpa_perks_evolve"),active:()=>!!t.genes.evolve},{desc:()=>z("arpa_genepool_recombination_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=2)},{desc:()=>z("arpa_genepool_homologous_recombination_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=3)},{desc:()=>z("arpa_genepool_genetic_reshuffling_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=4)},{desc:()=>z("arpa_genepool_recombinant_dna_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=5)},{desc:()=>z("arpa_genepool_chimeric_dna_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=6)},{desc:()=>z("arpa_genepool_molecular_cloning_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=7)},{desc:()=>z("arpa_genepool_transgenes_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=8)}],notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_morphogenesis_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_recombination_title")}`,`${z("arpa_genepool_homologous_recombination_title")}`,`${z("arpa_genepool_genetic_reshuffling_title")}`,`${z("arpa_genepool_recombinant_dna_title")}`,`${z("arpa_genepool_chimeric_dna_title")}`,`${z("arpa_genepool_molecular_cloning_title")}`,`${z("arpa_genepool_transgenes_title")}`].join(", ")])]},birth:{name:z("wiki_arpa_crispr_birth"),desc:()=>z("arpa_perks_birth"),active:()=>!!t.genes.birth,notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_replication_title")}`])]},enhance:{name:z("wiki_arpa_crispr_enhance"),desc:()=>z("arpa_perks_enhance"),active:()=>!!t.genes.enhance,notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_enhanced_muscle_fiber_title")}`])]},crafty:{name:z("wiki_arpa_crispr_crafty"),group:[{desc:()=>z("arpa_genepool_artificer_desc"),active:()=>!!t.genes.crafty},{desc:e=>z("arpa_genepool_crafting_desc",[e?"50/100":t.genes.crafty&&t.genes.crafty>=3?100:50]),active:()=>!!(t.genes.crafty&&t.genes.crafty>=2)}],notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_artificer_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_detail_oriented_title")}`,`${z("arpa_genepool_rigorous_title")}`].join(", ")])]},governor:{name:z("wiki_arpa_crispr_governor"),desc:()=>z("arpa_perks_governor"),active:()=>!!t.genes.governor,notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_governance_title")}`])]},synthesis:{name:z("wiki_arpa_crispr_synthesis"),desc:e=>z("arpa_genepool_synthesis_desc",[e?"2/3/4":t.genes.synthesis&&t.genes.synthesis>=2?t.genes.synthesis>=3?4:3:2,e?"10/25/50":t.genes.synthesis&&t.genes.synthesis>=2?t.genes.synthesis>=3?50:25:10]),active:()=>!!t.genes.synthesis,notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_synthesis_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_karyokinesis_title")}`,`${z("arpa_genepool_cytokinesis_title")}`].join(", ")])]},challenge:{name:z("wiki_arpa_crispr_challenge"),group:[{desc:()=>z("arpa_perks_challenge"),active:()=>!!t.genes.challenge},{desc:()=>z("arpa_genepool_unlocked_desc"),active:()=>!!(t.genes.challenge&&t.genes.challenge>=2)},{desc:e=>z("arpa_perks_challenge2",[e?"60/80":t.genes.challenge&&t.genes.challenge>=4?80:60,e?"60/40":t.genes.challenge&&t.genes.challenge>=4?40:60]),active:()=>!!(t.genes.challenge&&t.genes.challenge>=3)},{desc:()=>z("arpa_perks_challenge3"),active:()=>!!(t.genes.challenge&&t.genes.challenge>=5)}],notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_hardened_genes_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_unlocked_title")}`,`${z("arpa_genepool_universal_title")}`,`${z("arpa_genepool_standard_title")}`,`${z("arpa_genepool_mastered_title")}`].join(", ")]),z("wiki_perks_crispr_note_challenge",[z("arpa_genepool_universal_title"),z("arpa_genepool_standard_title")])]},ancients:{name:z("wiki_arpa_crispr_ancients"),group:[{desc:()=>z("arpa_perks_ancients"),active:()=>!!t.genes.ancients},{desc:()=>t.genes.ancients&&t.genes.ancients>=4?z("arpa_perks_ancients3"):z("arpa_perks_ancients2"),active:()=>!!(t.genes.ancients&&t.genes.ancients>=2)},{desc:e=>z("arpa_perks_ancients4",[e?"25/50":t.genes.ancients&&t.genes.ancients>=5?50:25]),active:()=>!!(t.genes.ancients&&t.genes.ancients>=3)}],notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_ancients_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_faith_title")}`,`${z("arpa_genepool_devotion_title")}`,`${z("arpa_genepool_acolyte_title")}`,`${z("arpa_genepool_conviction_title")}`].join(", ")])]},trader:{name:z("wiki_arpa_crispr_trader"),desc:()=>z("arpa_genepool_negotiator_desc"),active:()=>!!t.genes.trader,notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_negotiator_title")}`])]},transcendence:{name:z("wiki_arpa_crispr_transcendence"),desc:()=>z("arpa_genepool_transcendence_desc"),active:()=>!!t.genes.transcendence,notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_transcendence_title")}`])]},queue:{name:z("wiki_arpa_crispr_queue"),group:[{desc:()=>z("arpa_genepool_geographer_desc"),active:()=>!!t.genes.queue},{desc:()=>z("arpa_genepool_architect_desc"),active:()=>!!(t.genes.queue&&t.genes.queue>=2)}],notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_geographer_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_architect_title")}`].join(", ")])]},plasma:{name:z("wiki_arpa_crispr_plasma"),desc:e=>z("arpa_genepool_mitosis_desc",[e?"3/5":t.genes.plasma>=2?5:3]),active:()=>!!t.genes.plasma,notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_mitosis_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_metaphase_title")}`].join(", ")])]},mutation:{name:z("wiki_arpa_crispr_mutation"),group:[{desc:()=>t.genes.mutation&&t.genes.mutation>1?z("arpa_perks_mutation2"):z("arpa_perks_mutation1"),active:()=>!!t.genes.mutation},{desc:()=>z("arpa_perks_mutation3"),active:()=>!!(t.genes.mutation&&t.genes.mutation>=3)}],notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_mutation_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_transformation_title")}`,`${z("arpa_genepool_metamorphosis_title")}`].join(", ")])]},bleed:{name:z("wiki_arpa_crispr_bleed"),group:[{desc:()=>z("arpa_genepool_bleeding_effect_desc",[2.5]),active:()=>!!t.genes.bleed},{desc:()=>z("arpa_genepool_synchronicity_desc",[25]),active:()=>!!(t.genes.bleed&&t.genes.bleed>=2)},{desc:()=>z("arpa_genepool_astral_awareness_desc"),active:()=>!!(t.genes.bleed&&t.genes.bleed>=3)}],notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_bleeding_effect_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_synchronicity_title")}`,`${z("arpa_genepool_astral_awareness_title")}`].join(", ")]),z("wiki_perks_crispr_note_bleed",[`${z("arpa_genepool_bleeding_effect_title")}`])]},blood:{name:z("wiki_arpa_crispr_blood"),group:[{desc:()=>z("arpa_genepool_blood_remembrance_desc"),active:()=>!!t.genes.blood},{desc:()=>z("arpa_genepool_blood_sacrifice_desc"),active:()=>!!(t.genes.blood&&t.genes.blood>=2)},{desc:()=>z("arpa_genepool_essence_absorber_desc"),active:()=>!!(t.genes.blood&&t.genes.blood>=3)}],notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_blood_remembrance_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_blood_sacrifice_title")}`,`${z("arpa_genepool_essence_absorber_title")}`].join(", ")]),z("wiki_perks_crispr_note_blood",[z("arpa_genepool_blood_remembrance_title")])]},spire:{name:z("wiki_arpa_blood_spire"),group:[{desc:()=>z("arpa_blood_purify_desc"),active:()=>!!t.blood.spire},{desc:()=>z("arpa_blood_chum_desc"),active:()=>!!(t.blood.spire&&t.blood.spire>=2)}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_purify_title")}`]),z("wiki_perks_blood_note_upgrade",[[`${z("arpa_blood_chum_title")}`].join(", ")])]},lust:{name:z("wiki_arpa_blood_lust"),group:[{desc:e=>z("arpa_perks_lust",[e?.2:.2*(t.blood.lust?t.blood.lust:1)]),active:()=>!!t.blood.lust}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_lust_title")}`]),z("wiki_perks_blood_note_repeat",[z("arpa_blood_lust_title")])]},illuminate:{name:z("wiki_arpa_blood_illuminate"),group:[{desc:e=>z("arpa_perks_illuminate",[e?.01:.01*(t.blood.illuminate?t.blood.illuminate:1)]),active:()=>!!t.blood.illuminate}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_illuminate_title")}`]),z("wiki_perks_blood_note_repeat",[z("arpa_blood_illuminate_title")])]},greed:{name:z("wiki_arpa_blood_greed"),group:[{desc:e=>z("arpa_perks_greed",[e?1:1*(t.blood.greed?t.blood.greed:1)]),active:()=>!!t.blood.greed}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_greed_title")}`]),z("wiki_perks_blood_note_repeat",[z("arpa_blood_greed_title")])]},hoarder:{name:z("wiki_arpa_blood_hoarder"),group:[{desc:e=>z("arpa_perks_hoarder",[e?1:1*(t.blood.hoarder?t.blood.hoarder:1)]),active:()=>!!t.blood.hoarder}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_hoarder_title")}`]),z("wiki_perks_blood_note_repeat",[z("arpa_blood_hoarder_title")])]},artisan:{name:z("wiki_arpa_blood_artisan"),group:[{desc:e=>z("arpa_perks_artisan",[e?1:1*(t.blood.artisan?t.blood.artisan:1)]),active:()=>!!t.blood.artisan}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_artisan_title")}`]),z("wiki_perks_blood_note_repeat",[z("arpa_blood_artisan_title")])]},attract:{name:z("wiki_arpa_blood_attract"),group:[{desc:e=>z("arpa_perks_attract",[e?5:5*(t.blood.attract?t.blood.attract:1)]),active:()=>!!t.blood.attract}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_attract_title")}`]),z("wiki_perks_blood_note_repeat",[z("arpa_blood_attract_title")])]},wrath:{name:z("wiki_arpa_blood_wrath"),group:[{desc:e=>z("arpa_perks_wrath",[e?5:5*(t.blood.wrath?t.blood.wrath:1)]),active:()=>!!t.blood.wrath}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_wrath_title")}`]),z("wiki_perks_blood_note_repeat",[z("arpa_blood_wrath_title")])]},prepared:{name:z("wiki_arpa_blood_prepared"),group:[{desc:()=>z("arpa_blood_prepared_desc"),active:()=>!!t.blood.prepared},{desc:()=>z("arpa_blood_compact_desc"),active:()=>!!(t.blood.prepared&&t.blood.prepared>=2)}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_prepared_title")}`]),z("wiki_perks_blood_note_upgrade",[[`${z("arpa_blood_compact_title")}`].join(", ")])]},unbound:{name:z("wiki_arpa_blood_unbound"),group:[{desc:()=>z("arpa_blood_unbound_desc"),active:()=>!!t.blood.unbound},{desc:()=>z("arpa_blood_shadow_war_desc"),active:()=>!!(t.blood.unbound&&t.blood.unbound>=3)},{desc:e=>z("arpa_perks_unbound_resist",[e?"10/5":t.blood.unbound&&t.blood.unbound>=4?5:10]),active:()=>!!(t.blood.unbound&&t.blood.unbound>=2)}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_unbound_title")}`]),z("wiki_perks_blood_note_upgrade",[[`${z("arpa_blood_unbound_resistance_title")}`,`${z("arpa_blood_shadow_war_title")}`,`${z("arpa_blood_unbound_immunity_title")}`].join(", ")])]},aware:{name:z("wiki_arpa_blood_aware"),group:[{desc:()=>z("arpa_blood_blood_aware_desc"),active:()=>!!t.blood.aware}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_blood_aware_title")}`])]},harmonic:{name:z("harmonic"),group:[{desc(e){let t=pc();return z("perks_harmonic",[e?`1-${Object.keys(_i).length+2}`:+(100*(t[0]-1)).toFixed(0),e?"2-"+2*(Object.keys(_i).length+2):+(100*(t[1]-1)).toFixed(0)])},active(){let e=pc();return!!(t.pillars&&e[0]>1)}},{desc:e=>(pc(),z("perks_harmonic2",[z("portal_west_tower"),z("portal_east_tower"),e?"12-"+12*(Object.keys(_i).length-1):12*Object.keys(t.pillars).length])),active(){let e=pc();return!!(t.pillars&&e[0]>1)}}],notes:[z("wiki_perks_harmonic_note1"),z("wiki_perks_harmonic_note2")]},novice:{name:z("perk_novice"),desc(e){let a=t.stats.feat.novice&&t.stats.achieve.apocalypse&&t.stats.achieve.apocalypse.l>0?Math.min(t.stats.achieve.apocalypse.l,t.stats.feat.novice):1;return`
        ${z("achieve_perks_novice",[e?"0.5/1/1.5/2/2.5":a/2,e?"0.25/0.5/0.75/1/1.25":a/4])}
        ${z("achieve_perks_novice2")}
        `},active:()=>!!(t.stats.feat.novice&&t.stats.mad>0),notes:[z("wiki_perks_progress_note1",[10,z("wiki_resets_mad")]),z("wiki_perks_progress_note2")]},journeyman:{name:z("perk_journeyman"),desc(e){let a=t.stats.feat.journeyman&&t.stats.achieve.seeder&&t.stats.achieve.seeder.l>0?Math.min(t.stats.achieve.seeder.l,t.stats.feat.journeyman):1;return e||a>1?`
        ${z("achieve_perks_journeyman2",[e?"1/2/3":a>=3?a>=5?3:2:1,e?"1/2":a>=4?2:1])}
        ${z("achieve_perks_journeyman3")}
        `:`
        ${z("achieve_perks_journeyman1",[1])}
        ${z("achieve_perks_journeyman3")}
        `},active:()=>!!(t.stats.feat.journeyman&&t.stats.bioseed>0),notes:[z("wiki_perks_progress_note1",[25,z("wiki_resets_bioseed")]),z("wiki_perks_progress_note2")]},adept:{name:z("perk_adept"),desc(e){let a=t.stats.feat.adept&&t.stats.achieve.whitehole&&t.stats.achieve.whitehole.l>0?Math.min(t.stats.achieve.whitehole.l,t.stats.feat.adept):1;return z("achieve_perks_adept",[e?"100/200/300/400/500":100*a,e?"60/120/180/240/300":60*a])},active:()=>!!(t.stats.feat.adept&&t.stats.achieve.whitehole&&t.stats.achieve.whitehole.l>0),notes:[z("wiki_perks_progress_note1",[50,z("wiki_resets_blackhole")]),z("wiki_perks_progress_note2")]},master:{name:z("perk_master"),desc(e){let a=t.stats.feat.master&&t.stats.achieve.ascended&&t.stats.achieve.ascended.l>0?Math.min(t.stats.achieve.ascended.l,t.stats.feat.master):1;return z("achieve_perks_master",[e?"1/2/3/4/5":a,e?"2/4/6/8/10":2*a,z("evo_mitochondria_title"),z("evo_eukaryotic_title"),z("evo_membrane_title"),z("evo_organelles_title"),z("evo_nucleus_title")])},active:()=>!!(t.stats.feat.master&&t.stats.achieve.ascended&&t.stats.achieve.ascended.l>0),notes:[z("wiki_perks_progress_note1",[75,z("wiki_resets_ascension")]),z("wiki_perks_progress_note2")]},grandmaster:{name:z("perk_grandmaster"),desc(e){let a=t.stats.feat.grandmaster&&t.stats.achieve.corrupted&&t.stats.achieve.corrupted.l>0?Math.min(t.stats.achieve.corrupted.l,t.stats.feat.grandmaster):1;return z("achieve_perks_grandmaster",[e?"1/2/3/4/5":a])},active:()=>!!(t.stats.feat.grandmaster&&t.stats.achieve.corrupted&&t.stats.achieve.corrupted.l>0),notes:[z("wiki_perks_progress_note1",[100,z("wiki_resets_infusion")]),z("wiki_perks_progress_note2")]}};function lo(){sc($("#perksPanel"));let e=$("#perksPanel"),t=!1;Object.keys(no).forEach((function(a){if(no[a].hasOwnProperty("group")){let r=!1,s=$(`
        ${no[a].name}
        `);no[a].group.forEach((function(e){e.active()&&(r=!0,s.append($(`
        ${e.desc()}
        `)))})),r&&(t=!0,e.append(s))}else no[a].active()&&(t=!0,e.append($(`
        ${no[a].name}${no[a].desc()}
        `)))})),t||e.append($(`
        ${z("perks_none")}
        `))}const uo={dna_replication:{reqs:{race:"protoplasm",resource:"DNA"},type:"major",effect(){var e=Math.rand(1,Math.round(t.resource.DNA.max/3)),a=t.resource.DNA.amount+e;return a>t.resource.DNA.max&&(a=t.resource.DNA.max),t.resource.DNA.amount=a,z("event_dna",[e.toLocaleString()])}},rna_meteor:{reqs:{race:"protoplasm",resource:"RNA"},type:"major",effect(){var e=Math.rand(1,Math.round(t.resource.RNA.max/2)),a=t.resource.RNA.amount+e;return a>t.resource.RNA.max&&(a=t.resource.RNA.max),t.resource.RNA.amount=a,z("event_rna",[e.toLocaleString()])}},inspiration:{reqs:{resource:"Knowledge"},type:"major",effect:()=>(t.race.inspired=Math.rand(300,600),z("event_inspiration"))},motivation:{reqs:{tech:"primitive"},type:"major",effect:()=>(t.race.motivated=Math.rand(300,600),z("event_motivation"))},fire:{reqs:{resource:"Lumber",nogenus:"aquatic",notrait:"evil"},type:"major",effect(){var e=Math.rand(1,Math.round(t.resource.Lumber.amount/4)),a=t.resource.Lumber.amount-e;return a<0&&(a=0),t.resource.Lumber.amount=a,z("event_fire",[e.toLocaleString()])}},flare:{reqs:{tech:"primitive"},type:"major",condition:()=>!!t.city.ptrait.includes("flare"),effect(){let e=0,a=_i[t.race.species].home;t.race.cataclysm||t.race.orbit_decayed?(t.space.hasOwnProperty("living_quarters")&&(e+=Math.round(c.living_quarters*Zr.space.spc_red.living_quarters.citizens())),a=_i[t.race.species].solar.red):(t.city.hasOwnProperty("basic_housing")&&(e+=t.city.basic_housing.count*Zr.city.basic_housing.citizens()),t.city.hasOwnProperty("cottage")&&(e+=t.city.cottage.count*Zr.city.cottage.citizens()),t.city.hasOwnProperty("apartment")&&(e+=i.apartment*Zr.city.apartment.citizens())),e>t.resource[t.race.species].amount&&(e=t.resource[t.race.species].amount),e=Math.floor(.1*e);let r=Math.rand(0,e);if(t.resource[t.race.species].amount-=r,t.civic[t.civic.d_job].workers-=r,t.civic[t.civic.d_job].workers<0&&(t.civic[t.civic.d_job].workers=0),"oceanic"!==t.city.biome){let e=400;"forest"===t.city.biome?e*=2:"desert"!==t.city.biome&&"volcanic"!==t.city.biome||(e/=2),t.city.firestorm=Math.rand(e,10*e)}return z("oceanic"===t.city.biome?"event_flare2":"event_flare",[a,r.toLocaleString()])}},raid:{reqs:{tech:"military",notech:"world_control"},type:"major",condition:()=>!(de("gov0")&&de("gov1")&&de("gov2")||t.race.truepath||t.race.cataclysm||!(t.civic.foreign.gov0.hstl>60||t.civic.foreign.gov1.hstl>60||t.civic.foreign.gov2.hstl>60)),effect(){let e=qe(Me(),"army",t.civic.garrison.wounded),a=t.tech.high_tech?t.tech.high_tech+1:1,r=Math.rand(25,50)*a,s=t.civic.garrison.wounded>Me()?Me():t.civic.garrison.wounded,i=Math.floor(g(0,s)),c=Math.floor(g(0,Me()-s));if(t.race.instinct&&(i=Math.round(i/2),c=Math.round(c/2)),t.civic.garrison.workers-=i,t.civic.garrison.wounded+=c,t.stats.died+=i,t.civic.garrison.wounded>t.civic.garrison.workers&&(t.civic.garrison.wounded=t.civic.garrison.workers),t.race.blood_thirst&&(t.race.blood_thirst_count+=Math.ceil(r/5),t.race.blood_thirst_count>di.blood_thirst.vars()[0]&&(t.race.blood_thirst_count=di.blood_thirst.vars()[0])),e>r)return z("event_raid1",[i.toLocaleString(),c.toLocaleString()]);{let e=Math.rand(1,Math.round(t.resource.Money.amount/4));if(e<=0)return z("event_raid1",[i.toLocaleString(),c.toLocaleString()]);{let a=t.resource.Money.amount-e;return a<0&&(a=0),t.resource.Money.amount=a,z("event_raid2",[e.toLocaleString(),i.toLocaleString(),c.toLocaleString()])}}}},siege:{reqs:{tech:"military",notech:"world_control"},type:"major",condition:()=>!(de("gov0")||de("gov1")||de("gov2"))&&!t.race.truepath&&t.civic.foreign.gov0.hstl>80&&t.civic.foreign.gov1.hstl>80&&t.civic.foreign.gov2.hstl>80,effect(){let e=qe(Me(),"army",t.civic.garrison.wounded),a=t.tech.high_tech?t.tech.high_tech+1:1,r=(t.civic.foreign.gov0.mil+t.civic.foreign.gov1.mil+t.civic.foreign.gov2.mil)*a,s=t.civic.garrison.wounded>Me()?Me():t.civic.garrison.wounded,i=Math.floor(g(0,s)),c=Math.floor(g(0,Me()-s));if(t.race.instinct&&(i=Math.round(i/2),c=Math.round(c/2)),t.civic.garrison.workers-=i,t.civic.garrison.wounded+=c,t.stats.died+=i,t.civic.garrison.wounded>t.civic.garrison.workers&&(t.civic.garrison.wounded=t.civic.garrison.workers),t.race.blood_thirst&&(t.race.blood_thirst_count+=Math.ceil(r/5),t.race.blood_thirst_count>di.blood_thirst.vars()[0]&&(t.race.blood_thirst_count=di.blood_thirst.vars()[0])),e>r)return z("event_siege1",[i.toLocaleString(),c.toLocaleString()]);var o=Math.rand(1,Math.round(t.resource.Money.amount/2)),n=t.resource.Money.amount-o;return n<0&&(n=0),t.resource.Money.amount=n,z("event_siege2",[o.toLocaleString(),i.toLocaleString(),c.toLocaleString()])}},pillage0:{reqs:{tech:"military",notech:"world_control"},type:"major",condition:()=>!(!t.race.truepath||t.tech.isolation||de("gov0")||!(t.civic.foreign.gov0.hstl>60)),effect:()=>ho("gov0")},pillage1:{reqs:{tech:"military",notech:"world_control"},type:"major",condition:()=>!(!t.race.truepath||t.tech.isolation||de("gov1")||!(t.civic.foreign.gov1.hstl>60)),effect:()=>ho("gov1")},pillage2:{reqs:{tech:"military",notech:"world_control"},type:"major",condition:()=>!(!t.race.truepath||t.tech.isolation||de("gov2")||!(t.civic.foreign.gov2.hstl>60)),effect:()=>ho("gov2")},pillage3:{reqs:{tech:"military"},type:"major",condition:()=>!!(t.race.truepath&&!t.tech.isolation&&t.tech.rival&&t.civic.foreign.gov3.hstl>60),effect:()=>ho("gov3",!0)},witch_hunt_crusade:{reqs:{tech:"magic"},type:"major",condition:()=>!!(t.race.witch_hunter&&t.resource.Sus.amount>=100),effect:()=>ho("witchhunt",!0)},terrorist:{reqs:{tech:"world_control",notrait:"truepath"},type:"major",effect(){let e=Math.floor(g(0,t.civic.garrison.wounded)),a=Math.floor(g(0,t.civic.garrison.workers-t.civic.garrison.wounded));return t.race.instinct&&(e=Math.round(e/2),a=Math.round(a/2)),t.civic.garrison.workers-=e,t.civic.garrison.wounded+=a,t.stats.died+=e,t.civic.garrison.wounded>t.civic.garrison.workers&&(t.civic.garrison.wounded=t.civic.garrison.workers),t.race.blood_thirst&&(t.race.blood_thirst_count+=1e3,t.race.blood_thirst_count>di.blood_thirst.vars()[0]&&(t.race.blood_thirst_count=di.blood_thirst.vars()[0])),0===e?z("event_terrorist1",[a.toLocaleString()]):z("event_terrorist2",[a.toLocaleString(),e.toLocaleString()])}},quake:{reqs:{tech:"wsc",notech:"quaked"},type:"major",condition:()=>!!t.city.ptrait.includes("unstable"),effect:()=>(t.tech.quaked=1,gs(),z("event_quake",[t.race.cataclysm||t.race.orbit_decayed?_i[t.race.species].solar.red:_i[t.race.species].home]))},doom:{reqs:{tech:"wsc",notech:"portal_guard"},type:"major",condition:()=>!!(t.space.space_barracks&&t.space.space_barracks.on>0),effect:()=>(eo("doomed"),t.stats.portals++,z(t.race.evil?"event_doom_alt":"event_doom",[_i[t.race.species].solar.dwarf]))},demon_influx:{reqs:{tech:"portal_guard"},type:"major",effect(){let e=Math.rand(2500,5e3);return t.portal.fortress.threat+=e,z("event_demon_influx",[e.toLocaleString()])}},ruins:{reqs:{trait:"ancient_ruins",resource:"Knowledge"},type:"major",effect(){let e=["Iron","Copper","Steel","Cement"];for(var a=0;at.resource[r].max?t.resource[r].amount=t.resource[r].max:t.resource[r].amount+=e}}return z("event_ruins")}},tax_revolt:{reqs:{low_morale:99,notrait:"blissful",tech:"primitive"},type:"major",condition(){let e="oligarchy"===t.civic.govern.type?45:25,a=D("aristocrat",2);return a&&(e-=a),t.civic.taxes.tax_rate>e},effect:()=>function(){let e=["Soul_Gem","Corrupt_Gem","Codex","Demonic_Essence"],a="oligarchy"===t.civic.govern.type?45:25,r=D("aristocrat",2);r&&(a-=r);let s=.04*(t.civic.taxes.tax_rate-a);return Object.keys(t.resource).forEach((function(a){if(!e.includes(a)){let e=Math.rand(1,Math.round(t.resource[a].amount*s)),r=t.resource[a].amount-e;r<0&&(r=0),t.resource[a].amount=r}})),z("event_tax_revolt")}()},slave_death1:po("major","death1"),slave_death2:po("major","death2"),slave_death3:po("major","death3"),protest:{reqs:{tech:"primitive"},type:"major",condition:()=>"republic"===t.civic.govern.type,effect(){switch(t.civic.govern.protest=Math.rand(30,60),Math.rand(0,10)){case 0:return z("event_protest0",[Ks("small")]);case 1:return z("event_protest1");case 2:return z("event_protest2");case 3:return t.civic.govern.protest=Math.rand(45,75),z("event_protest3");case 4:return z("event_protest4");case 5:return t.civic.govern.protest=Math.rand(45,75),z("event_protest5");case 6:return z("event_protest6");case 7:return z("event_protest7");case 8:return z("event_protest8");case 9:return t.civic.govern.protest=Math.rand(60,90),z("event_protest9")}}},scandal:{reqs:{tech:"govern"},type:"major",condition:()=>!!D("muckraker",0),effect(){switch(t.civic.govern.scandal=Math.rand(15,90),Math.rand(0,10)){case 0:return z("event_scandal0");case 1:return z("event_scandal1");case 2:return z("event_scandal2");case 3:return z("event_scandal3");case 4:return z("event_scandal4");case 5:return z("event_scandal5");case 6:return z("event_scandal6");case 7:return z("event_scandal7");case 8:return z("event_scandal8");case 9:return z("event_scandal9")}}},spy:{reqs:{tech:"primitive",notech:"world_control"},type:"major",condition(){if(t.race.elusive)return!1;if(Oi("satyr")>.25)return!1;for(let e=0;e<3;e++)if(t.civic.foreign[`gov${e}`].spy>0&&!t.civic.foreign[`gov${e}`].occ&&!t.civic.foreign[`gov${e}`].anx&&!t.civic.foreign[`gov${e}`].buy)return!0;return!1},effect(){let e=[];for(let a=0;a<3;a++)t.civic.foreign[`gov${a}`].spy>0&&!t.civic.foreign[`gov${a}`].occ&&!t.civic.foreign[`gov${a}`].anx&&!t.civic.foreign[`gov${a}`].buy&&e.push(a);let a=e[Math.rand(0,e.length)];return t.civic.foreign[`gov${a}`].spy--,0===t.civic.foreign[`gov${a}`].spy&&(t.civic.foreign[`gov${a}`].act="none",t.civic.foreign[`gov${a}`].sab=0),z("event_spy",[te(a)])}},mine_collapse:{reqs:{tech:"mining"},type:"major",condition:()=>t.resource[t.race.species].amount>0&&t.civic.miner.workers>0,effect:()=>(t.resource[t.race.species].amount--,t.civic.miner.workers--,z("event_mine_collapse"))},m_curious:{reqs:{tech:"primitive",trait:"curious"},condition:()=>t.resource[t.race.species].amount>=40,type:"major",effect(){switch(Math.rand(0,5)){case 0:{let e="Money",a=Math.rand(5e4,5e6);switch(Math.rand(0,5)){case 0:t.resource.Steel.display&&(e="Steel",a=Math.rand(100,1e5));break;case 1:t.resource.Bolognium.display&&(e="Bolognium",a=Math.rand(500,5e4));break;case 2:t.resource.Alloy.display&&(e="Alloy",a=Math.rand(250,1e6));break;case 3:t.resource.Adamantite.display&&(e="Adamantite",a=Math.rand(1e3,25e4));break;case 4:t.resource.Soul_Gem.display&&(e="Soul_Gem",a=1)}return t.resource[e].amount+=a,t.resource[e].max>=0&&t.resource[e].amount>t.resource[e].max&&(t.resource[e].amount=t.resource[e].max),z("event_m_curious0","Money"===e?[_i[t.race.species].name,"$",a.toLocaleString()]:[_i[t.race.species].name,a.toLocaleString(),t.resource[e].name])}case 1:return t.resource[t.race.species].amount-=10,t.civic[t.civic.d_job].workers-=10,t.civic[t.civic.d_job].workers<0&&(t.civic[t.civic.d_job].workers=0),z("event_m_curious1",[_i[t.race.species].name]);case 2:return t.race.inspired=Math.rand(600,1200),z("event_m_curious2",[_i[t.race.species].name]);case 3:return t.race.distracted=Math.rand(200,600),z("event_m_curious3",[_i[t.race.species].name]);case 4:return"cath"===t.race.species?(t.race.stimulated=Math.rand(500,1e3),z("event_m_curious4a",[_i[t.race.species].name])):z("event_m_curious4b",[_i[t.race.species].name])}}},curious1:{reqs:{tech:"primitive",trait:"curious"},type:"minor",effect:()=>z(`event_curious${Math.rand(0,5)}`,[_i[t.race.species].name])},curious2:{reqs:{tech:"primitive",trait:"curious"},type:"minor",effect:()=>z(`event_curious${Math.rand(5,10)}`,[_i[t.race.species].name])},slave_escape1:po("minor","escape1"),slave_escape2:po("minor","escape2"),slave_escape3:po("minor","death4"),shooting_star:_o("shooting_star","primitive"),tumbleweed:_o("tumbleweed","primitive"),flashmob:_o("flashmob","high_tech"),witch_hunt:{reqs:{tech:"magic"},type:"minor",condition:()=>!!(t.race.witch_hunter&&t.resource.Sus.amount>=50&&t.civic.scientist.workers>0),effect:()=>(t.resource[t.race.species].amount--,t.civic.scientist.workers--,t.civic.scientist.assigned--,z("witch_hunter_witch_hunt"))},heatwave:{reqs:{tech:"primitive"},type:"minor",condition:()=>!t.race.cataclysm&&!t.race.orbit_decayed&&2!==t.city.calendar.temp,effect:()=>(t.city.calendar.temp=2,t.city.cold=0,z("event_heatwave"))},coldsnap:{reqs:{tech:"primitive"},type:"minor",condition:()=>!t.race.cataclysm&&!t.race.orbit_decayed&&0!==t.city.calendar.temp,effect:()=>(t.city.calendar.temp=0,t.city.hot=0,z("event_coldsnap"))},cucumber:_o("cucumber","primitive"),planking:_o("planking","high_tech"),furryfish:_o("furryfish","primitive"),meteor_shower:_o("meteor_shower","primitive"),hum:_o("hum","high_tech"),bloodrain:_o("bloodrain","primitive"),haunting:_o("haunting","science"),mothman:_o("mothman","science"),dejavu:_o("dejavu","theology"),dollar:_o("dollar","currency",(function(){let e=Math.rand(1,10);return t.resource.Money.amount+=e,t.resource.Money.amount>t.resource.Money.max&&(t.resource.Money.amount=t.resource.Money.max),e})),pickpocket:_o("pickpocket","currency",(function(){let e=Math.rand(1,10);return t.resource.Money.amount-=e,t.resource.Money.amount<0&&(t.resource.Money.amount=0),e})),bird:_o("bird","primitive"),contest:{reqs:{tech:"science"},type:"minor",effect(){let e=Math.rand(0,3),t=Math.rand(0,10);return z("event_contest",[z(`event_contest_place${e}`),z(`event_contest_type${t}`)])}},cloud:_o("cloud","primitive",(function(){return z(`event_cloud_type${Math.rand(0,11)}`)})),dark_cloud:{reqs:{tech:"primitive"},type:"minor",condition:()=>!t.race.cataclysm&&!t.race.orbit_decayed&&0!==t.city.calendar.weather,effect:()=>(t.city.calendar.weather=0,z("event_dark_cloud"))},gloom:{reqs:{tech:"primitive"},type:"minor",condition:()=>!t.race.cataclysm&&!t.race.orbit_decayed&&1!==t.city.calendar.weather,effect:()=>(t.city.calendar.weather=1,z("event_gloom"))},tracks:_o("tracks","primitive"),hoax:_o("hoax","primitive"),burial:_o("burial","primitive"),artifacts:_o("artifacts","high_tech"),parade:_o("parade","world_control"),crop_circle:_o("crop_circle","agriculture"),llama:_o("llama","primitive",(function(){let e=Math.rand(25,100);return t.resource.Food.amount-=e,t.resource.Food.amount<0&&(t.resource.Food.amount=0),e}),(function(){return!(t.race.carnivore||t.race.soul_eater||t.race.detritivore||t.race.artifical)})),cat:_o("cat","primitive"),omen:_o("omen","primitive"),theft:_o("theft","primitive",(function(){return z(`event_theft_type${Math.rand(0,10)}`)})),compass:_o("compass","mining"),bone:_o("bone","primitive"),delicacy:_o("delicacy","high_tech"),prank:_o("prank","primitive",(function(){return z(`event_prank_type${Math.rand(0,10)}`)})),graffiti:_o("graffiti","science"),soul:_o("soul","soul_eater"),cheese:{reqs:{tech:"banking"},type:"minor",condition:()=>!!(t.tech.banking&&t.tech.banking>=7),effect(){let e=t.stats.hasOwnProperty("reset")?t.stats.reset+1:1;return t.race.cheese=Math.rand(10,10+e),z("event_cheese")}},tremor:_o("tremor","primitive"),rumor:_o("rumor","primitive",(function(){return z(`event_rumor_type${Math.rand(0,10)}`)}))};function _o(e,t,a,r){return{reqs:{tech:t},condition(){let e=!0;return"function"==typeof r&&(e=r()),e},type:"minor",effect(){let t=!1;return"function"==typeof a&&(t=a()),t?z(`event_${e}`,[t]):z(`event_${e}`)}}}function po(e,a){return{reqs:{trait:"slaver",tech:"slaves"},condition:()=>!(t.race.cataclysm||t.race.orbit_decayed||t.tech.isolation),type:e,effect:()=>t.city.slave_pen&&t.city.slave_pen.slaves>0?(t.city.slave_pen.slaves--,t.resource.Slave.amount=t.city.slave_pen.slaves,z(`event_slave_${a}`)):z("event_slave_none")}}function ho(e,a){let r=qe(Me(),"army",t.civic.garrison.wounded),s=t.tech.high_tech?t.tech.high_tech+1:1,i=("witchhunt"===e?1e3:t.civic.foreign[e].mil)*(1+Math.floor(g(0,10)-5)/10)*s,c=t.civic.garrison.wounded>Me()?Me():t.civic.garrison.wounded,o=Me()>0?Math.floor(g(1,c)):0,n=Math.floor(g(0,Me()-c));t.race.instinct&&(o=Math.round(o/2),n=Math.round(n/2)),t.civic.garrison.workers-=o,t.civic.garrison.wounded+=n,t.stats.died+=o,t.civic.garrison.wounded>t.civic.garrison.workers&&(t.civic.garrison.wounded=t.civic.garrison.workers),t.race.blood_thirst&&(t.race.blood_thirst_count+=Math.ceil(i/5),t.race.blood_thirst_count>di.blood_thirst.vars()[0]&&(t.race.blood_thirst_count=di.blood_thirst.vars()[0]));let l="witchhunt"===e?z("witch_hunter_crusade"):z(`civics_gov${t.civic.foreign[e].name.s0}`,[t.civic.foreign[e].name.s1]);if(r>i)return z("event_pillaged1",[l,o.toLocaleString(),n.toLocaleString()]);{let e=a?2:4,r=[],s=Object.keys(Va);return s.push("Money"),s.forEach((function(a){if(t.resource[a]&&t.resource[a].display&&t.resource[a].amount>0){let s=Math.rand(1,Math.round(t.resource[a].amount/e)),i=t.resource[a].amount-s;i<0&&(i=0),t.resource[a].amount=i,"Money"===a?r.push(`$${q(s)}`):r.push(`${q(s)} ${t.resource[a].name}`)}})),z("event_pillaged2",[l,o.toLocaleString(),n.toLocaleString(),r.join(", ")])}}function mo(e){let a=[];return Object.keys(uo).forEach((function(r){let s=!0;e!==uo[r].type&&(s=!1),("major"===e&&t.event.l===r||"minor"===e&&t.m_event.l===r)&&(s=!1),uo[r].reqs&&Object.keys(uo[r].reqs).forEach((function(e){switch(e){case"race":uo[r].reqs[e]!==t.race.species&&(s=!1);break;case"genus":uo[r].reqs[e]!==_i[t.race.species].type&&(s=!1);break;case"nogenus":uo[r].reqs[e]===_i[t.race.species].type&&(s=!1);break;case"resource":t.resource[uo[r].reqs[e]]&&t.resource[uo[r].reqs[e]].display||(s=!1);break;case"trait":t.race[uo[r].reqs[e]]||(s=!1);break;case"notrait":t.race[uo[r].reqs[e]]&&(s=!1);break;case"tech":t.tech[uo[r].reqs[e]]||(s=!1);break;case"notech":t.tech[uo[r].reqs[e]]&&(s=!1);break;case"high_tax_rate":t.civic.taxes.tax_rate<=uo[r].reqs[e]&&(s=!1);break;case"low_morale":t.city.morale.current>=uo[r].reqs[e]&&(s=!1);break;case"biome":t.city.biome!==uo[r].reqs[e]&&(s=!1);break;default:s=!1}})),s&&uo[r].condition&&!uo[r].condition()&&(s=!1),s&&a.push(r)})),a}const go=[{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 fo(){t.settings.expose&&(window.evolve={actions:Ac(Zr),races:Ac(_i),traits:Ac(di),tradeRatio:Ac(Va),craftCost:Ac(Xa()),atomic_mass:Ac(Ja),f_rate:Ac(Zs),checkAffordable:Ac(js),adjustCosts:Ac(fc),armyRating:Ac(qe),tradeBuyPrice:Ac(br),tradeSellPrice:Ac(yr),fuel_adjust:Ac(Yt),int_fuel_adjust:Ac(Xt),alevel:Ac(so),messageQueue:Ac(Bi),loc:Ac(z),shipCosts:Ac(dt),updateDebugData:Ac(vo),global:{},breakdown:{}})}function vo(){t.settings.expose&&(window.evolve.global=Ac(t),window.evolve.craftCost=Ac(Xa()),window.evolve.breakdown=Ac(r))}$(document).ready((function(){if(window.matchMedia){var e=$('head > link[rel="icon"][media]');$.each(e,(function(t,a){var r=window.matchMedia(a.media);function s(){r.matches&&(e.remove(),e=$(a).appendTo("head"))}r.addListener(s),s()}))}}));var yo=!1;window.addEventListener("storage",(e=>{!1===yo&&Bi(z("multitab_warning"),"danger",!0),yo=!0})),t.settings.expose&&fo();var bo={showCiv:1,showCivic:2,showResearch:3,showResources:4,showGenetics:5,showAchieve:6,settings:7};$(document).keydown((function(e){let a=(e=e||window.event).key||e.keyCode;Object.keys(y).forEach((function(e){a===t.settings.keyMap[e]&&(y[e]=!0)})),$("input").is(":focus")||$("textarea").is(":focus")||Object.keys(bo).forEach((function(e){if(a===t.settings.keyMap[e]&&0!==t.settings.civTabs&&("settings"===e||t.settings[e])){if(t.settings.civTabs!==bo[e])t.settings.civTabs=bo[e];else{let a=t.settings,r=null,s=null;switch(bo[e]){case bo.showCiv:r="spaceTabs",s=[a.showCity,a.showSpace,a.showDeep,a.showGalactic,a.showPortal,a.showOuter,a.showTau];break;case bo.showCivic:r="govTabs",s=["Government",a.showIndustry,a.showPowerGrid,a.showMil,a.showMechLab,a.showShipYard,a.showPsychic];break;case bo.showResearch:r="resTabs",s=["New","Completed"];break;case bo.showResources:r="marketTabs",s=[a.showMarket,a.showStorage,a.showEjector,a.showCargo,a.showAlchemy];break;case bo.showGenetics:a=t.settings.arpa,r="arpaTabs",s=[a.physics,a.genetics,a.crispr,a.blood];break;case bo.showAchieve:r="statsTabs",s=["Stats","Achievements","Perks"];break;default:r="",s=[]}for(let e=1;e\n

        Top Bar

        \n {{ race.species | planet }}{{ race.universe | universe }}${z("evo_challenge_simulation")}\n \n \n \n \n \n ${z("year")} {{ city.calendar.year }}\n ${z("day")} {{ city.calendar.day }}\n \n \n {{ s.at | remain }}\n \n \n \n \n `);let e=$('
        '),a=$('
        ');$("body").append(e),e.append(a),a.append(`
        \n
        \n

        Race Info

        \n
        {{ name() }}
        \n
        ${z("morale")} {{ city.morale.current | mRound }}%
        \n
        MW {{ city.power | replicate | approx }}
        \n
        \n
        \n
        \n
        \n
        \n

        ${z("message_log")}

        \n \n \n \n \n \n ${z("message_log_clear")}\n ${z("message_log_clear_all")}\n
        \n

        ${z("message_filters")}

        \n
        \n

        ${z("messages")}

        \n
        \n
        \n
        \n

        ${z("tab_resources")}

        \n
        `),m.forEach((function(e){$("#msgQueueFilters").append(`\n ${z("message_log_"+e)}\n `)})),ic({el:"#msgQueue",data:{m:h,s:t.settings.msgFilters},methods:{swapFilter(e){if(h.view!==e){$(`#msgQueueFilter-${h.view}`).removeClass("is-active"),$(`#msgQueueFilter-${e}`).addClass("is-active"),h.view=e;let t=$("#msgQueueLog");sc(t),h[e].forEach((function(e){t.append($('

        '+e.msg+"

        "))}))}},clearLog(e){Di(e=e?[e]:e),sc($("#msgQueueLog")),e?t.lastMsg[e]=[]:Object.keys(t.lastMsg).forEach((function(e){t.lastMsg[e]=[]}))},trigModal(){this.$buefy.modal.open({parent:this,component:{template:''}});let e=setInterval((function(){if($("#modalBox").length>0){clearInterval(e);let r=xc(16,12);$("#modalBox").append($(`

        ${z("message_log")}${r.length>0?r:""}

        `));var a=$('
        ');$("#modalBox").append(a);let s=$(`\n
        \n
        \n ${z("message_log_settings_visible")}\n
        \n
        \n `),i=$(`\n
        \n
        \n
        \n ${z("message_log_settings_length")}\n
        \n
        \n `),c=$(`\n
        \n
        \n
        \n ${z("message_log_settings_save")}\n
        \n
        \n `);a.append(s),a.append(i),a.append(c);let o="",n="",l="",u={},d={};m.forEach((function(e){o+=`
        ${z("message_log_"+e)}
        `,n+=`
        ${z("message_log_"+e)}
        `,l+=`
        ${z("message_log_"+e)}
        `,u[e]=t.settings.msgFilters[e].max,d[e]=t.settings.msgFilters[e].save})),s.append(o),i.append(n),c.append(l),i.append(`\n
        \n \n
        \n `),c.append(`\n
        \n \n
        \n `),ic({el:"#specialModal",data:{s:t.settings.msgFilters,mi:u,si:d},methods:{check(e){if(!t.settings.msgFilters[e].vis&&h.view===e){let e=!1;Object.keys(t.settings.msgFilters).forEach((function(a){if(t.settings.msgFilters[a].vis&&!e){e=!0,$(`#msgQueueFilter-${h.view}`).removeClass("is-active"),$(`#msgQueueFilter-${a}`).addClass("is-active"),h.view=a;let t=$("#msgQueueLog");sc(t),h[a].forEach((function(e){t.append($('

        '+e.msg+"

        "))}))}}))}},checkDisabled(e,a){if(!t.settings.msgFilters[e].vis)return!1;let r=0;return Object.keys(t.settings.msgFilters).forEach((function(e){t.settings.msgFilters[e].vis&&r++})),1===r},maxVal(e){u[e]<1&&(u[e]=1)},saveVal(e){d[e]<0?d[e]=0:d[e]>t.settings.msgFilters[e].max&&(d[e]=t.settings.msgFilters[e].max)},applyMax(){m.forEach((function(e){let a=u[e];t.settings.msgFilters[e].max=a,a');a.append(r);let s=$('
        ');r.append(s),s.append('

        Tab Navigation

        ');let i=$('');s.append(i);let c=$('\n \n ');i.append(c);let o=$('\n \n
        \n
        ');i.append(o);let n=$('\n \n
        \n
        ');i.append(n);let l=$('\n \n
        \n
        ');i.append(l);let u=$('\n \n
        \n
        ');i.append(u);let d=$('\n \n
        \n
        ');i.append(d);let _=$('\n \n
        \n
        ');i.append(_);let p="",g=[{i:"nuclear",f:"steelem",r:2},{i:"zombie",f:"the_misery",r:2},{i:"fire",f:"ill_advised",r:2},{i:"mask",f:"friday",r:1},{i:"skull",f:"demon_slayer",r:2},{i:"taijitu",f:"equilibrium",r:2},{i:"martini",f:"utopia",r:2},{i:"lightbulb",f:"energetic",r:2},{i:"trash",f:"garbage_pie",r:2},{i:"banana",f:"banana",r:2},{i:"turtle",f:"finish_line",r:2},{i:"floppy",f:"digital_ascension",r:2},{i:"slime",f:"slime_lord",r:2},{i:"lightning",f:"annihilation",r:2},{i:"heart",f:"valentine",r:1},{i:"clover",f:"leprechaun",r:1},{i:"bunny",f:"easter",r:1},{i:"egg",f:"egghunt",r:1},{i:"rocket",f:"launch_day",r:1},{i:"sun",f:"solstice",r:1},{i:"firework",f:"firework",r:1},{i:"ghost",f:"halloween",r:1},{i:"candy",f:"trickortreat",r:1},{i:"turkey",f:"thanksgiving",r:1},{i:"present",f:"xmas",r:1}],f=so();f<2&&(f=2);for(let e=0;e=g[e].r?p+=`${$c(g[e].i,16,f)} {{ '${g[e].i}' | label }}`:t.settings.icon===g[e].i&&(t.settings.icon="star");let v=xc(9,14),y="";v.length>0&&(y=`${v}`);let b=qc(5,12,!0),w="";b.length>0&&(w=`${b}`);let x="",k="";Object.keys(A).length>1&&Object.keys(A).forEach((function(e){t.settings.locale===e&&(k=A[e]),x+=`${A[e]}`}));let q=$(`\n \n
        \n {{ 'theme' | label }} \n \n \n {{ 'theme_dark' | label }}\n {{ 'theme_light' | label }}\n {{ 'theme_night' | label }}\n {{ 'theme_darkNight' | label }}\n {{ 'theme_redgreen' | label }}\n {{ 'theme_gruvboxLight' | label }}\n {{ 'theme_gruvboxDark' | label }}\n {{ 'theme_orangeSoda' | label }}\n {{ 'theme_dracula' | label }}\n ${y}\n \n {{ 'units' | label }} \n \n \n {{ 'metric' | label }}\n {{ 'scientific' | label }}\n {{ 'sln' | label }}\n ${w}\n \n\n {{ 'icons' | label }} \n \n \n ${$c("star",16,f)} {{ 'star' | label }}\n ${p}\n \n
        \n
        \n {{ 'locale' | label }} \n \n \n ${x}\n \n\n {{ 'font' | label }} \n \n \n {{ 'standard' | label }}\n {{ 'large_log' | label }}\n {{ 'large_all' | label }}\n \n\n {{ 'q_merge' | label }} \n \n \n {{ 'merge_never' | label }}\n {{ 'merge_nearby' | label }}\n {{ 'merge_all' | label }}\n \n
        \n {{ 'pause' | label }}\n {{ 'm_keys' | label }}\n {{ 'c_cat' | label }}\n {{ 'q_key' | label }}\n {{ 'q_any' | label }}\n {{ 'q_any_res' | label }}\n {{ 's_pack_on' | label }}\n {{ 'expose' | label }}\n {{ 'tabLoad' | label }}\n {{ 'boring' | label }}\n {{ 'touch' | label }}\n
        \n
        ${z("key_mappings")}
        \n
        ${z("multiplier",[10])}
        \n
        ${z("multiplier",[25])}
        \n
        ${z("multiplier",[100])}
        \n
        ${z("q_key")}
        \n
        \n
        \n
        ${z("tab_mappings")}
        \n
        ${z("tab_civil")}
        \n
        ${z("tab_civics")}
        \n
        ${z("tab_research")}
        \n
        ${z("tab_resources")}
        \n
        ${z("tech_arpa")}
        \n
        ${z("tab_stats")}
        \n
        ${z("tab_settings")}
        \n
        \n
        \n \n \n \n
        \n
        \n {{ | sPack}}\n
        \n
        \n \n \n \n \n \n \n \n
        \n
        \n \n {{ 'enable_reset' | label }}\n
        \n
        \n

        \n {{ 'reset_warn' | label }}\n

        \n

        \n \n \n

        \n
        \n
        \n
        \n
        \n
        `);i.append(q);let M=$('\n \n
        \n
        ');i.append(M),a.append('
        ');let P=xc(15,8);$("body").append(`\n
        \n \n

        \n ${P.length>0?`Ev${P}lve`:"Evolve"}\n by\n Demagorddon\n

        \n
        \n \n

        External Links

        \n \n
        \n
        \n `)}();var wo=t.revision?t.revision:"";t.beta?$("#topBar .version > a").html(`v${t.version} Beta ${t.beta}${wo}`):$("#topBar .version > a").html("v"+t.version+wo),Di(),t.lastMsg&&Object.keys(t.lastMsg).forEach((function(e){t.lastMsg[e].reverse().forEach((function(t){Bi(t.m,t.c,!0,[e],!0)})),t.lastMsg[e].reverse()})),$("#msgQueue").height(t.settings.msgQueueHeight),$("#buildQueue").height(t.settings.buildQueueHeight),!0===t.queue.rename&&(Ls(!0),t.queue.rename=!1),t.settings.sPackMsg=e.getItem("string_pack_name")?z("string_pack_using",[e.getItem("string_pack_name")]):z("string_pack_none"),t.queue.display&&Hi(),t.r_queue.display&&Ui(),ic({el:"#mainColumn div:first-child",data:{s:t.settings},methods:{swapTab:e=>(t.settings.tabLoad||jt(e),e),saveImport(){$("#importExport").val().length>0&&importGame($("#importExport").val())},saveExport(){$("#importExport").val(window.exportGame()),$("#importExport").select(),document.execCommand("copy")},saveExportFile(){const e=new Date;((e,t,a)=>{const r=document.createElement("a"),s=new Blob([e],{type:"text/plain"});r.href=URL.createObjectURL(s),r.download=t,r.click(),URL.revokeObjectURL(r.href)})(window.exportGame(),`evolve-${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}-${e.getHours()}-${e.getMinutes()}.txt`)},importStringFile(){let a=document.getElementById("stringPackFile").files[0];if(a){let r=new FileReader,s=document.getElementById("stringPackFile").files[0].name;r.readAsText(a,"UTF-8"),r.onload=function(a){try{JSON.parse(a.target.result)}catch{return void(t.settings.sPackMsg=z("string_pack_error",[s]))}t.settings.sPackMsg=z("string_pack_using",[s]),e.setItem("string_pack_name",s),e.setItem("string_pack",LZString.compressToUTF16(a.target.result)),t.settings.sPackOn&&(t.queue.rename=!0,e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w&&P.w.terminate(),window.location.reload())},r.onerror=function(e){console.error("error reading file")}}},clearStringFile(){e.getItem("string_pack")&&(t.settings.sPackMsg=z("string_pack_none"),e.removeItem("string_pack_name"),e.removeItem("string_pack"),t.settings.sPackOn&&(t.queue.rename=!0,e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w&&P.w.terminate(),window.location.reload()))},stringPackOn(){e.getItem("string_pack")&&(t.queue.rename=!0,e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w&&P.w.terminate(),window.location.reload())},restoreGame(){let t=e.getItem("evolveBak")||!1;this.$buefy.dialog.confirm({title:z("restore"),message:z("restore_warning"),ariaModal:!0,confirmText:z("restore"),onConfirm(){t&&importGame(t,!0)}})},lChange(a){t.settings.locale=a,t.queue.rename=!0,e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w&&P.w.terminate(),window.location.reload()},setTheme(e){t.settings.theme=e,$("html").removeClass(),$("html").addClass(e),$("html").addClass(t.settings.font)},numNotation(e){t.settings.affix=e},icon(a){t.settings.icon=a,e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w&&P.w.terminate(),window.location.reload()},remove(e){t.r_queue.queue.splice(e,1)},font(e){t.settings.font=e,$("html").removeClass("standard"),$("html").removeClass("large_log"),$("html").removeClass("large_all"),$("html").addClass(e)},q_merge(e){t.settings.q_merge=e},toggleTabLoad(){Ct()},unpause(){$("#pausegame").removeClass("play"),$("#pausegame").removeClass("pause"),t.settings.pause?$("#pausegame").addClass("pause"):$("#pausegame").addClass("play"),t.settings.pause||P.s||Ki("start")}},filters:{namecase:e=>e.replace(/(?:^|\s)\w/g,(function(e){return e.toUpperCase()})),label:e=>Ot(e),sPack:()=>t.settings.sPackMsg,notation(e){switch(e){case"si":return z("metric");case"sci":return z("scientific");case"sln":return z("sln")}}}}),["1","3","4","5","6","7","8","9","10","11","12","13","14","15","16"].forEach((function(e){Ei(`settings${e}`,(function(){return z(`settings${e}`)}),{elm:`#settings span.settings${e}`})})),Ei("stringPack",(function(){return z("string_example",['
        {\n "year": "Galactic Standard Year",\n "resource_Food_name": "Nom Noms"\n}
        '])})),t.new&&(Bi(z("new"),"warning",!1,["progress"]),t.new=!1),t.city.mass_driver&&(i.mass_driver=t.city.mass_driver.on),t.portal.turret&&(i.turret=t.portal.turret.on),t.interstellar.fusion&&(o.fusion=t.interstellar.fusion.on),t.portal.hell_forge&&(i.hell_forge=t.portal.hell_forge.on),t.space.sam&&(i.sam=t.space.sam.on),t.space.operating_base&&(i.operating_base=t.space.operating_base.on,c.operating_base=t.space.operating_base.on),t.space.fob&&(i.fob=t.space.fob.on),t.tauceti.fusion_generator&&(i.fusion_generator=t.tauceti.fusion_generator.on),na(!0),sr(),Ct(),Wi(),t.race.shapeshifter&&Mi(!1,!0),Object.keys(ri()).forEach((function(e){Ni(e)})),x(),ic({el:"#race",data:{race:t.race,city:t.city},methods:{name:()=>Tc("name")},filters:{replicate:e=>t.race.hasOwnProperty("governor")&&t.race.governor.hasOwnProperty("tasks")&&t.race.hasOwnProperty("replicator")&&Object.values(t.race.governor.tasks).includes("replicate")&&t.race.governor.config.replicate.pow.on&&t.race.replicator.pow>0?e+t.race.replicator.pow:e,approx:e=>+e.toFixed(2),mRound:e=>+e.toFixed(1)}}),Ei("race",(function(){return"string"==typeof _i[t.race.species].desc?_i[t.race.species].desc:_i[t.race.species].desc()}),{elm:"#race > .name"});var $o=125;if(Ei("morale",(function(e){if(0!==t.city.morale.unemployed){let a=t.city.morale.unemployed>0?"success":"danger";e.popper.append(``)}if(0!==t.city.morale.stress){let a=t.city.morale.stress>0?"success":"danger";e.popper.append(``)}let a=100+t.city.morale.unemployed+t.city.morale.stress;if(Object.keys(t.city.morale).forEach((function(r){if(!["current","unemployed","stress","season","cap","potential"].includes(r)&&0!==t.city.morale[r]){a+=t.city.morale[r];let s=t.city.morale[r]>0?"success":"danger",i=t.city.morale[r];if("entertain"===r&&"democracy"===t.civic.govern.type&&(i/=1+re.democracy()[0]/100),e.popper.append(``),"entertain"===r&&"democracy"===t.civic.govern.type){let t=re.democracy()[0];e.popper.append(``)}}})),0!==t.city.morale.season){a+=t.city.morale.season;let r=0===t.city.calendar.season?z("morale_spring"):1===t.city.calendar.season?z("morale_summer"):z("morale_winter"),s=t.city.morale.season>0?"success":"danger";e.popper.append(``)}if("corpocracy"===t.civic.govern.type){let t=re.corpocracy()[3];a-=t,e.popper.append(``)}if("republic"===t.civic.govern.type){let t=re.republic()[1];a+=t,e.popper.append(``)}if("federation"===t.civic.govern.type){let t=re.federation()[1];a+=t,e.popper.append(``)}let r=D("militant",1);if(r&&(a-=r,e.popper.append(``)),t.race.cheese){let r=t.stats.hasOwnProperty("reset")?t.stats.reset+1:1,s=+(r/(r+10)*11).toFixed(2);a+=s,e.popper.append(``)}if(t.race.motivated){let r=Math.ceil(t.race.motivated**.4);a+=r,e.popper.append(``)}if(t.civic.homeless){let r=t.civic.homeless/2;a-=r,e.popper.append(``)}if(t.tech.vax_c||t.tech.vax_f){let r=t.tech.vax_c?10:50;a-=r,e.popper.append(``)}else if(t.tech.vax_s){let t=20;a+=t,e.popper.append(``)}t.city.tormented&&(a-=t.city.tormented,e.popper.append(``)),a=+a.toFixed(1);let s=$("
        ");e.popper.append(s),s.append(``),s.append(``),s.append(``)}),{classes:"has-background-light has-text-dark"}),Ei("powerStatus",(function(e){let a=+(t.city.power_total-t.city.power).toFixed(2);Object.keys(s).forEach((function(t){if(s[t]){let a=+s[t].toFixed(2);e.popper.append(``)}})),e.popper.append(``);let r=+t.city.power.toFixed(2);t.city.power>0?e.popper.append(``):e.popper.append(``)}),{classes:"has-background-light has-text-dark"}),t.settings.pause?$("#pausegame").addClass("pause"):$("#pausegame").addClass("play"),ic({el:"#topBar",data:{city:t.city,race:t.race,s:t.settings},methods:{sign:()=>H("sign"),getAstroSign:()=>H("astrology"),weather:()=>H("weather"),temp:()=>H("temp"),moon:()=>H("moon"),showUniverse:()=>"standard"!==t.race.universe&&"bigbang"!==t.race.universe,showSim:()=>!!t.sim,atRemain:()=>z("accelerated_time"),pause(){$("#pausegame").removeClass("play"),$("#pausegame").removeClass("pause"),t.settings.pause?(t.settings.pause=!1,$("#pausegame").addClass("play")):(t.settings.pause=!0,$("#pausegame").addClass("pause")),t.settings.pause||P.s||Ki("start")},pausedesc:()=>t.settings.pause?z("game_play"):z("game_pause")},filters:{planet:e=>_i[e].home,universe:e=>"standard"===e||"bigbang"===e?"":aa[e].name,remain(e){let t=Math.ceil(2.5*e/60);if(t>0){let e=Math.floor(t/60);return t-=60*e,`${e}:${t.toString().padStart(2,"0")}`}}}}),["astroSign"].forEach((function(e){Ei(`${e}`,(function(){return H("sign")}),{elm:$(`#${e}`)})})),Ei("topBarPlanet",(function(e){if("protoplasm"===t.race.species)e.popper.append($(`${z("infant")}`));else{let a=_i[t.race.species].home,r=Tc("name"),s=Si[t.city.biome].label,i=t.city.ptrait;if(i.length>0){let e="";i.forEach((function(a){Fi.hasOwnProperty(a)&&("mellow"===a&&"entish"===t.race.species?e+=`${z("planet_mellow_eg")} `:e+=`${Fi[a].label} `)})),s=`${e}${s}`}let c=t.city.calendar.orbit,o=qs(t.city.geology),n="";if(t.race.truepath&&(n+=`
        ${z("evo_challenge_truepath_recap")}
        `),t.race.junker&&(n+=`
        ${z("evo_challenge_junker_desc")} ${z("evo_challenge_junker_conditions")}
        `),t.race.joyless&&(n+=`
        ${z("evo_challenge_joyless_desc")} ${z("evo_challenge_joyless_conditions")}
        `),t.race.steelen&&(n+=`
        ${z("evo_challenge_steelen_desc")} ${z("evo_challenge_steelen_conditions")}
        `),t.race.decay&&(n+=`
        ${z("evo_challenge_decay_desc")} ${z("evo_challenge_decay_conditions")}
        `),t.race.emfield&&(n+=`
        ${z("evo_challenge_emfield_desc")} ${z("evo_challenge_emfield_conditions")}
        `),t.race.inflation&&(n+=`
        ${z("evo_challenge_inflation_desc")} ${z("evo_challenge_inflation_conditions")}
        `),t.race.banana&&(n+=`
        ${z("evo_challenge_banana_desc")} ${z("wiki_achieve_banana1")}. ${z("wiki_achieve_banana2")}. ${z("wiki_achieve_banana3")}. ${z("wiki_achieve_banana4",[500])}. ${z("wiki_achieve_banana5",[50])}.
        `),t.race.witch_hunter&&(n+=`
        ${z("evo_challenge_witch_hunter_desc")}
        `),t.race.nonstandard&&(n+=`
        ${z("evo_challenge_nonstandard_desc")}
        `),t.race.gravity_well&&(n+=`
        ${z("evo_challenge_gravity_well_desc")}
        `),t.race.warlord&&(n+=`
        ${z("evo_challenge_warlord_desc")}
        `),t.race.lone_survivor&&(n+=`
        ${z("evo_challenge_lone_survivor_desc")}
        `),t.race.sludge&&(n+=`
        ${z("evo_challenge_sludge_desc")} ${z("evo_challenge_sludge_conditions")}
        `),t.race.orbit_decay){let e=t.race.orbit_decayed?"":z("evo_challenge_orbit_decay_impact",[t.race.orbit_decay-t.stats.days]);n+=`
        ${t.race.orbit_decayed?z("evo_challenge_orbit_decay_impacted",[_i[t.race.species].home]):z("evo_challenge_orbit_decay_desc")} ${z("evo_challenge_orbit_decay_conditions")} ${e}
        `,uc()>=100&&"antimatter"!==t.race.universe?n+=`
        ${z("evo_challenge_cataclysm_warn")}
        `:n+=`
        ${z("evo_challenge_scenario_warn")}
        `}t.race.cataclysm&&(uc()>=50&&"antimatter"!==t.race.universe?n+=`
        ${z("evo_challenge_cataclysm_desc")}
        ${z("evo_challenge_cataclysm_warn")}
        `:n+=`
        ${z("evo_challenge_cataclysm_desc")}
        ${z("evo_challenge_scenario_warn")}
        `),e.popper.append($(`
        ${z(t.race.cataclysm?"no_home":"home",[a,r,s,c])}
        ${o}${n}`))}}),{elm:"#topBar .planetWrap .planet",classes:"has-background-light has-text-dark"}),Ei("topBarUniverse",(function(e){e.popper.append($(`
        ${aa[t.race.universe].desc}
        `)),e.popper.append($(`
        ${aa[t.race.universe].effect}
        `))}),{elm:"#topBar .planetWrap .universe",classes:"has-background-light has-text-dark"}),Ei("topBarSimulation",(function(e){e.popper.append($(`
        ${z("evo_challenge_simulation_topbar")}
        `))}),{elm:"#topBar .planetWrap .simulation",classes:"has-background-light has-text-dark"}),t.race.orbit_decay&&!t.race.orbit_decayed&&Ei("infoTimer",(function(){return t.race.orbit_decayed?"":z("evo_challenge_orbit_decay_impact",[t.race.orbit_decay-t.stats.days])}),{elm:"#infoTimer",classes:"has-background-light has-text-dark"}),ro(),"protoplasm"===t.race.species){t.resource.RNA.display=!0;let e=t.stats.feat.master&&t.stats.achieve.ascended&&t.stats.achieve.ascended.l>0?Math.min(t.stats.achieve.ascended.l,t.stats.feat.master):0;if(t.sim&&(e=5),e>0&&!t.evolution.mloaded){let a=["dna","membrane","organelles","nucleus","eukaryotic_cell","mitochondria"];for(let e=0;e0?Math.min(t.stats.achieve.corrupted.l,t.stats.feat.grandmaster):0;t.sim&&(a=5),a>=5&&!t.evolution.gmloaded&&(t.tech.evo=6,t.evolution.gselect=!0,t.evolution.gmloaded=1,t.evolution.final=80,t.tech.evo_humanoid=1,t.tech.evo_giant=1,t.tech.evo_small=1,t.tech.evo_animalism=2,t.tech.evo_demonic=1,t.tech.evo_angelic=1,t.tech.evo_insectoid=1,t.tech.evo_eggshell=2,t.tech.evo_eldritch=1,t.tech.evo_sand=1,t.tech.evo_polar=1,t.tech.evo_heat=1,t.tech.evo_fey=1,t.tech.evo_aquatic=1),"bigbang"===t.race.universe?(t.seed=t.race.seed,function(){let e=["standard","heavy","antimatter","evil","micro","magic"];for(let a=0;a`),c=$(`${aa[r].name}`);i.append(c),$("#evolution").append(i),$("#"+s).on("click",(function(){t.race.universe=r,sc($("#evolution")),ra(),Ii()})),Ei(s,(function(e){e.popper.append($(`
        ${aa[r].name}
        `)),e.popper.append($(`
        ${aa[r].desc}
        `)),e.popper.append($(`
        ${aa[r].effect}
        `))}),{classes:"has-background-light has-text-dark"})}}()):t.race.seeded&&!t.race.chose?(t.seed=t.race.seed,ra()):as()}else t.portal.hasOwnProperty("soul_forge")&&t.portal.soul_forge.on&&(i.soul_forge=1),R();Oo(!0),$("#lbl_city").html("Village"),window.Worker&&(P.w=new Worker("evolve/evolve.js"),P.w.addEventListener("message",(function(a){switch(a.data){case"fast":!function(){t.race.no_craft||$(".craft").each((function(e){"number"==typeof $(this).data("val")&&$(this).html(q($(this).data("val")*b(),1))}));const e=new Date,a=W();r.p.Global={};var d=1;let _=!1,p=Gr("raw");if(t.prestige.Plasmid.count>0&&("antimatter"!==t.race.universe||t.genes.bleed&&"antimatter"===t.race.universe)&&(r.p.Global[z("resource_Plasmid_name")]=100*p[1]+"%",_=!0),t.prestige.AntiPlasmid.count>0&&("antimatter"===t.race.universe||t.genes.bleed&&t.genes.bleed>=2&&"antimatter"!==t.race.universe)&&(r.p.Global[z("resource_AntiPlasmid_name")]=100*p[2]+"%",_=!0),_&&(d+=p[0]),(t.race.no_plasmid||"antimatter"===t.race.universe)&&((t.race.cataclysm||t.race.orbit_decayed)&&t.space.ziggurat&&t.space.ziggurat.count||t.city.temple&&t.city.temple.count)){let e=Br();r.p.Global[z("faith")]=100*e+"%",d*=1+e}if(t.race.untapped&&t.race.untapped>0){let e=+(t.race.untapped/(t.race.untapped+20)/10+24e-5).toFixed(4);r.p.Global[z("trait_untapped_bd")]=100*e+"%",d*=1+e}if(t.race.rainbow_active&&t.race.rainbow_active>1&&(r.p.Global[z("trait_rainbow_bd")]=`${di.rainbow.vars()[0]}%`,d*=1+di.rainbow.vars()[0]/100),t.tech.world_control){let e=25;"federation"===t.civic.govern.type&&(e=re.federation()[2]),t.race.unified&&(e+=di.unified.vars()[0]),"taurus"===a&&(e+=U("taurus")[0]),r.p.Global[z("tech_unification")]=`${e}%`,d*=1+e/100}else{let e=0;for(let a=0;a<3;a++)(t.civic.foreign[`gov${a}`].occ||t.civic.foreign[`gov${a}`].anx||t.civic.foreign[`gov${a}`].buy)&&(e+="federation"===t.civic.govern.type?5+re.federation()[0]:5);e>0&&(r.p.Global[z("civics_garrison_occupy")]=`${e}%`,d*=1+e/100)}if(t.genes.challenge&&t.genes.challenge>=2){let e=uc();r.p.Global[z("mastery")]=e+"%",d*=1+e/100}if(t.pillars){let e=pc();r.p.Global[z("harmonic")]=100*(e[0]-1)+"%",d*=e[0]}if(t.race.ascended&&(r.p.Global[z("achieve_ascended_name")]="5%",d*=1.05),t.race.corruption){let e=2*t.race.corruption;r.p.Global[z("achieve_corrupted_name")]=`${e}%`,d*=1+e/100}if(t.race.rejuvenated){let e=t.stats.days<996?(1e3-t.stats.days)/2e3:.02;r.p.Global[z("rejuvenated")]=100*e+"%",d*=1+e}let h=Oi("octigoran");if(t.race.suction_grip||h>0){let e=0;t.race.suction_grip&&(e+=di.suction_grip.vars()[0]),h>0&&(e+=+(di.suction_grip.vars(1)[0]*h).toFixed(2)),r.p.Global[z("trait_suction_grip_bd")]=e+"%",d*=1+e/100}let m=Oi("cyclops");if(t.race.intelligent||m>0){let e=0;t.race.intelligent&&(e+=la(t.civic.scientist.workers,"scientist")*di.intelligent.vars()[1]+la(t.civic.professor.workers,"professor")*di.intelligent.vars()[0]),m>0&&(e+=la(t.civic.scientist.workers,"scientist")*di.intelligent.vars(1)[1]*m+la(t.civic.professor.workers,"professor")*di.intelligent.vars(1)[0]*m),t.race.high_pop&&(e=Pe(e)),r.p.Global[z("trait_intelligent_bd")]=e+"%",d*=1+e/100}if(t.race.slaver&&t.city.slave_pen&&t.city.slave_pen){let e=t.city.slave_pen.slaves*di.slaver.vars()[0];r.p.Global[z("trait_slaver_bd")]=e+"%",d*=1+e/100}if((t.city.ptrait.includes("trashed")||t.race.scavenger||t.race.servants&&t.race.servants.force_scavenger)&&t.civic.scavenger){let e=t.city.ptrait.includes("trashed")||t.race.scavenger?la(t.civic.scavenger.workers,"scavenger"):0;if(t.race.servants&&(e+=ua(t.race.servants.jobs.scavenger)),e>0){let a=e*di.scavenger.vars()[0];t.city.ptrait.includes("trashed")&&t.race.scavenger&&(a*=1+di.scavenger.vars()[1]/100),t.city.ptrait.includes("trashed")&&(a*=Fi.trashed.vars()[1]),t.race.high_pop&&(a=Pe(a)),r.p.Global[z("job_scavenger")]=a+"%",d*=1+a/100}}if(t.race.unfathomable&&t.city.surfaceDwellers&&t.city.captive_housing){let e=0,a=t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg?t.stats.achieve.nightmare.mg:0;if(t.city.hasOwnProperty("surfaceDwellers")){for(let a=0;at.civic.torturer.workers*a/2){let r=e-t.civic.torturer.workers*a/2;e-=Math.ceil(r/3)}}if(e>0){let s=e*di.unfathomable.vars()[2]*a/5;t.race.psychic&&(s*=1+di.psychic.vars()[1]/100),r.p.Global[z("trait_unfathomable_bd")]=s+"%",d*=1+s/100}}if(t.city.ptrait.includes("mellow")&&(r.p.Global[z("planet_mellow_bd")]="-10%",d*=Fi.mellow.vars()[2]),t.city.ptrait.includes("ozone")&&t.city.sun){let e=t.city.sun*Fi.ozone.vars()[0];r.p.Global[z("planet_ozone_bd")]=`-${e}%`,d*=1-e/100}let g=Oi("phoenix");if((t.race.smoldering||g>0)&&t.city.hot){let e=0;t.race.smoldering&&(t.city.hot>100?(e+=100*di.smoldering.vars()[1],e+=(t.city.hot-100)*di.smoldering.vars()[2]):e+=t.city.hot*di.smoldering.vars()[1]),g>0&&(t.city.hot>100?(e+=100*di.smoldering.vars(.25)[1]*g,e+=(t.city.hot-100)*di.smoldering.vars(.25)[2]*g):e+=t.city.hot*di.smoldering.vars(.25)[1]*g),r.p.Global[z("trait_smoldering_name")]=`${e}%`,d*=1+e/100}if(t.race.heat_intolerance&&t.city.hot){let e=t.city.hot*di.heat_intolerance.vars()[0];r.p.Global[z("hot")]=`-${e}%`,d*=1-e/100}if(t.race.chilled&&t.city.cold){let e=0;t.city.cold>100?(e+=100*di.chilled.vars()[1],e+=(t.city.cold-100)*di.chilled.vars()[2]):e=t.city.cold*di.chilled.vars()[1],r.p.Global[z("trait_chilled_name")]=`${e}%`,d*=1+e/100}if(t.race.cold_intolerance&&t.city.cold){let e=t.city.cold*di.cold_intolerance.vars()[0];r.p.Global[z("cold")]=`-${e}%`,d*=1-e/100}if("anarchy"===t.civic.govern.type&&t.resource[t.race.species].amount>=ua(10)){let e=(t.resource[t.race.species].amount-(ua(10)-1))*(t.race.high_pop?.25/di.high_pop.vars()[0]:.25);r.p.Global[z("govern_anarchy")]=`-${e}%`,d*=1-e/100}if(t.civic.govern.protest&&t.civic.govern.protest>0&&(r.p.Global[z("event_protest")]="-30%",d*=.7),t.civic.govern.scandal&&t.civic.govern.scandal>0){let e=D("muckraker",0);e&&(r.p.Global[z("event_scandal")]=`-${e}%`,d*=1-e/100)}if(Oi("capybara")>0||t.race.calm&&t.city.meditation&&t.resource.Zen.display){let e=t.resource.Zen.amount,a=Oi("capybara");a>0&&(e+=Math.round(500*a));let s=e/(e+5e3);r.p.Global[z("trait_calm_bd")]=`+${(100*s).toFixed(2)}%`,d*=1+s}if(t.city.firestorm&&t.city.firestorm>0&&(t.city.firestorm--,r.p.Global[z("event_flare_bd")]="-20%",d*=.8),"aquatic"===_i[t.race.species].type&&!["swamp","oceanic"].includes(t.city.biome)||"fey"===_i[t.race.species].type&&!["forest","swamp","taiga"].includes(t.city.biome)||"heat"===_i[t.race.species].type&&!["ashland","volcanic"].includes(t.city.biome)||"polar"===_i[t.race.species].type&&!["tundra","taiga"].includes(t.city.biome)||"sand"===_i[t.race.species].type&&!["ashland","desert"].includes(t.city.biome)||"demonic"===_i[t.race.species].type&&"hellscape"!==t.city.biome||"angelic"===_i[t.race.species].type&&"eden"!==t.city.biome){let e=1;e=t.blood.unbound&&t.blood.unbound>=4?t.race.rejuvenated?.975:.95:t.blood.unbound&&t.blood.unbound>=2?t.race.rejuvenated?.95:.9:t.race.rejuvenated?.9:.8,r.p.Global[z("unsuited")]=`-${Math.round(100*(1-e))}%`,d*=e}if(t.race.hibernator&&3===t.city.calendar.season&&(d*=1-di.hibernator.vars()[1]/100,r.p.Global[z("morale_winter")]=`-${di.hibernator.vars()[1]}%`),"magic"===t.race.universe&&t.tech.syphon){let e=t.tech.syphon/8;r.p.Global[z("arpa_syphon_damage")]=`-${e}%`,d*=1-e/100}r.p.consume={},["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"].forEach((function(e){r.p.consume[e]={},r.p[e]={}}));var f=.25;if("protoplasm"===t.race.species){if(t.evolution.nucleus&&t.resource.DNA.amount=5&&(v*=2),Ji("DNA",v*d*f),Ji("RNA",-2*e*f)}if(t.evolution.organelles){let e=t.race.rapid_mutation?2:1;t.tech.evo&&t.tech.evo>=2&&e++,Ji("RNA",t.evolution.organelles.count*e*d*f)}if((t.stats.feat.novice&&t.stats.achieve.apocalypse&&t.stats.achieve.apocalypse.l>0||t.sim)&&"bigbang"!==t.race.universe&&(!t.race.seeded||t.race.seeded&&t.race.chose)){let e=t.sim?5:Math.min(t.stats.achieve.apocalypse.l,t.stats.feat.novice);Ji("RNA",e/2*f*d),t.resource.DNA.display&&Ji("DNA",e/4*f*d)}t.resource.RNA.amount>=2&&!t.evolution.dna?(t.evolution.dna=1,t.resource.DNA.display=!0,t.stats.achieve.mass_extinction&&t.stats.achieve.mass_extinction.l>1&&(Ji("RNA",t.resource.RNA.max),Ji("DNA",t.resource.RNA.max)),as()):t.resource.RNA.amount>=10&&!t.evolution.membrane?(t.evolution.membrane={count:0},as()):t.resource.DNA.amount>=4&&!t.evolution.organelles?(t.evolution.organelles={count:0},as()):t.evolution.organelles&&t.evolution.organelles.count>=2&&!t.evolution.nucleus?(t.evolution.nucleus={count:0},as()):t.evolution.nucleus&&t.evolution.nucleus.count>=1&&!t.evolution.eukaryotic_cell?(t.evolution.eukaryotic_cell={count:0},as()):t.evolution.eukaryotic_cell&&t.evolution.eukaryotic_cell.count>=1&&!t.evolution.mitochondria?(t.evolution.mitochondria={count:0},as()):t.evolution.mitochondria&&!t.tech.evo&&(t.tech.evo=1,as())}else{let _=function(){let e=1;if(t.space.ziggurat&&t.space.ziggurat.count>0){let a=t.tech.ancient_study?.006:.004;if(t.tech.ancient_deify&&t.tech.ancient_deify>=2&&c.exotic_lab&&(a+=1e-4*c.exotic_lab),"theocracy"===t.civic.govern.type&&t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display){let e=2e-5;t.race.high_pop&&(e=Pe(e)),a+=e*t.civic.priest.workers}t.race.ooze&&(a*=1-di.ooze.vars()[1]/100),t.race.high_pop&&(a=Pe(a)),e+=t.space.ziggurat.count*t.civic.colonist.workers*a}return e}(),p=100,h=1,m=1;if(t.race.quarantine&&t.race.qDays){let e=1-(t.race.qDays<=1e3?t.race.qDays:1e3)/1e3;switch(t.race.quarantine){case 1:h=.5+.5*e;break;case 2:h=.25+.25*e,m=.5+.5*e;break;case 3:h=.1+.15*e,m=.25+.25*e;break;case 4:h=.08+.02*e,m=.12+.13*e}if(t.race.vax&&t.tech.focus_cure&&t.tech.focus_cure>=4){let e=+t.race.vax.toFixed(2)/100;e>1&&(e=1),h+=(1-h)*e,m+=(1-m)*e}}if(0===t.city.calendar.season&&t.city.calendar.year>0){let e=t.race.chilled||t.race.smoldering?0:5;p+=e,t.city.morale.season=e}else 1===t.city.calendar.season&&t.race.smoldering?(p+=di.smoldering.vars()[0],t.city.morale.season=di.smoldering.vars()[0]):3===t.city.calendar.season?t.race.chilled?(p+=di.chilled.vars()[0],t.city.morale.season=di.chilled.vars()[0]):(p-=t.race.leathery?di.leathery.vars()[0]:5,t.city.morale.season=t.race.leathery?-di.leathery.vars()[0]:-5):t.city.morale.season=0;if(t.race.cheese){let e=t.stats.hasOwnProperty("reset")?t.stats.reset+1:1;p+=+(e/(e+10)*11).toFixed(2)}if(t.civic.homeless&&(p-=t.civic.homeless/2),t.tech.vax_c||t.tech.vax_f?p-=t.tech.vax_c?10:50:t.tech.vax_s&&(p+=20),t.tech.m_boost?(t.city.morale.leadership=20,p+=20):t.city.morale.leadership=0,Lc()){let e=Nc("morale");t.city.morale.shrine=e.add,p+=e.add}else t.city.morale.shrine=0;let g=D("militant",1);if(g&&(p-=g),"corpocracy"===t.civic.govern.type&&(p-=re.corpocracy()[3]),"republic"===t.civic.govern.type&&(p+=re.republic()[1]),"federation"===t.civic.govern.type&&(p+=re.federation()[1]),t.race.blood_thirst&&t.race.blood_thirst_count>=1){let e=Math.ceil(Math.log2(t.race.blood_thirst_count));t.city.morale.blood_thirst=e,p+=e}else t.city.morale.blood_thirst=0;let v=0;0===t.city.calendar.weather?t.city.calendar.temp>0&&(v=1===t.city.calendar.wind?t.race.skittish?-di.skittish.vars()[0]:t.race.leathery?-di.leathery.vars()[0]:-5:t.race.leathery?0:-2):2===t.city.calendar.weather?t.race.nyctophilia?v=-di.nyctophilia.vars()[0]:(0===t.city.calendar.wind&&t.city.calendar.temp<2||1===t.city.calendar.wind&&2===t.city.calendar.temp)&&(v=2):t.race.nyctophilia&&(v=di.nyctophilia.vars()[1]),!t.race.snowy||0===t.city.calendar.temp&&0===t.city.calendar.weather||(v-=t.city.calendar.temp>=2?di.snowy.vars()[1]:di.snowy.vars()[0]),t.city.morale.weather=t.race.submerged?0:v,p+=t.race.submerged?0:v,t.race.motivated&&(p+=Math.ceil(t.race.motivated**.4));let b=0,q=5;t.city.morale.unemployed=0,t.city.ptrait.includes("mellow")?q*=Fi.mellow.vars()[0]:(p-=t.civic.unemployed.workers,t.city.morale.unemployed=-t.civic.unemployed.workers);let M=Oi("vulpine");if(t.civic.hunter.display&&(t.race.playful||M>0)){let e=0;M>0&&(e+=di.playful.vars(1)[0]*M),t.race.playful&&(e+=di.playful.vars()[0]),p+=t.civic.hunter.workers*e,t.city.morale.unemployed=t.civic.hunter.workers*e}else b-=t.civic.hunter.workers/q;t.race.optimistic&&(b+=di.optimistic.vars()[0]);let P=Oi("gecko");if(P>0&&(b+=di.optimistic.vars(1)[0]*P),t.race.pessimistic&&(b-=di.pessimistic.vars()[0]),t.civic.garrison){let e=2;t.city.ptrait.includes("mellow")&&(e*=Fi.mellow.vars()[0]);let a=t.civic.garrison.max/e;t.race.high_pop&&(a/=di.high_pop.vars()[0]),b-=a}if(r.p.consume.Money[z("trade")]=0,t.tech.trade||t.race.banana&&t.tech.primitive&&t.tech.primitive>=3){let e=0,s=D("dealmaker",0);Object.keys(t.resource).forEach((function(i){if(t.resource[i].trade>0){e+=t.resource[i].trade;let c=br(i)*t.resource[i].trade;if(t.resource.Money.amount>=c*f){let e=Va[i];s&&(e*=1+s/100),t.race.persuasive&&(e*=1+di.persuasive.vars()[0]*t.race.persuasive/100),t.race.merchant&&(e*=1+di.merchant.vars()[1]/100);let o=Oi("goblin");if(o>0&&(e*=1+di.merchant.vars(1)[1]/100*o),"capricorn"===a&&(e*=1+U("capricorn")[0]/100),t.genes.trader&&(e*=1+uc()/100),t.stats.achieve.hasOwnProperty("trade")){let a=2*t.stats.achieve.trade.l;a>10&&(a=10),e*=1+a/100}t.race.truepath&&(e*=1-t.civic.foreign.gov3.hstl/101),Ji(i,t.resource[i].trade*f*e),Ji("Money",-c*f),r.p.consume.Money[z("trade")]-=c,r.p.consume[i][z("trade")]=t.resource[i].trade*e}Co()}else if(t.resource[i].trade<0){e-=t.resource[i].trade;let a=yr(i)*t.resource[i].trade,s=Va[i];if(t.stats.achieve.hasOwnProperty("trade")){let e=t.stats.achieve.trade.l;e>5&&(e=5),s*=1-e/100}t.resource[i].amount>=s*f&&(Ji(i,t.resource[i].trade*f*s),Ji("Money",-a*f),r.p.consume.Money[z("trade")]-=a,r.p.consume[i][z("trade")]=t.resource[i].trade*s),Co()}})),t.city.market.trade=e}if(0===r.p.consume.Money[z("trade")]&&delete r.p.consume.Money[z("trade")],t.tech.alchemy){let e=0,a=0,s=0;Object.keys(t.race.alchemy).forEach((function(i){if(t.race.alchemy[i]>0){let c=Number(t.race.alchemy[i]);if(t.resource.Mana.amount=f){let s=t.resource[i].basic&&t.tech.alchemy>=2?8*Va[i]:2*Va[i];t.race.witch_hunter&&(s*=3),t.stats.achieve.soul_sponge&&t.stats.achieve.soul_sponge.mg&&(s*=t.stats.achieve.soul_sponge.mg+1),Ji(i,c*f*s),Ji("Mana",-c*f),Ji("Crystal",-.15*c*f),e-=c,a-=.15*c,r.p.consume[i][z("tab_alchemy")]=c*s,"magic"===t.race.universe&&!t.resource[i].basic&&t.tech.alchemy>=2&&eo("fullmetal")}}})),t.race.totTransmute=s,r.p.consume.Mana[z("tab_alchemy")]=e,r.p.consume.Crystal[z("tab_alchemy")]=a}if(t.galaxy.trade&&(n.hasOwnProperty("freighter")||n.hasOwnProperty("super_freighter"))){let e=0;t.galaxy.freighter&&(e+=2*n.freighter),t.galaxy.super_freighter&&(e+=5*n.super_freighter),t.galaxy.trade.max=e;let s=0,i=_r();for(let c=0;c0&&(u*=1+di.merchant.vars(1)[1]/100*p),"capricorn"===a&&(u*=1+U("capricorn")[0]/100),t.genes.trader&&(u*=1+uc()/100),t.stats.achieve.hasOwnProperty("trade")){let e=t.stats.achieve.trade.l;e>5&&(e=5),u*=1+e/50,n*=1-e/100}s+=t.galaxy.trade[`f${c}`],s>e&&(t.galaxy.trade[`f${c}`]-=s-e,t.galaxy.trade[`f${c}`]<0&&(t.galaxy.trade[`f${c}`]=0));let h=It("gxy_gorddon");for(let e=0;e0&&(r.p.consume[o][z("trade")]?r.p.consume[o][z("trade")]-=d:r.p.consume[o][z("trade")]=-d),_>0&&(r.p.consume[l][z("trade")]?r.p.consume[l][z("trade")]+=_:r.p.consume[l][z("trade")]=_),h<1&&(r.p.consume[l][z("galaxy_piracy")]?r.p.consume[l][z("galaxy_piracy")]+=-(1-h)*_:r.p.consume[l][z("galaxy_piracy")]=-(1-h)*_),0===r.p.consume[o][z("trade")]&&delete r.p.consume[o][z("trade")],0===r.p.consume[l][z("trade")]&&delete r.p.consume[l][z("trade")]}t.galaxy.trade.cur=s}t.race.deconstructor&&t.city.nanite_factory&&Js.forEach((function(e){if(t.resource[e].display){let a=t.city.nanite_factory[e]*f;if(a>0&&(t.resource[e].amount=1e3){let e=t.race.lone_survivor?100:1e4;C-=e,O+=e,s[z("tau_star_ringworld")]=e}if(t.interstellar.orichalcum_sphere&&t.interstellar.orichalcum_sphere.count>0){let e=0;e=t.interstellar.orichalcum_sphere.count>=100?oc(1750):oc(750+8*t.interstellar.orichalcum_sphere.count),C-=e,O+=e,s[z("interstellar_dyson_sphere_title")]=e,delete s[z("tech_dyson_net")]}else if(t.interstellar.dyson_sphere&&t.interstellar.dyson_sphere.count>0){let e=0;e=t.interstellar.dyson_sphere.count>=100?oc(750):oc(175+5*t.interstellar.dyson_sphere.count),C-=e,O+=e,s[z("interstellar_dyson_sphere_title")]=e,delete s[z("tech_dyson_net")]}else if(t.interstellar.dyson&&t.interstellar.dyson.count>=1){let e=0;e=t.interstellar.dyson.count>=100?oc(175):oc(1.25*t.interstellar.dyson.count),C-=e,O+=e,s[z("tech_dyson_net")]=e}if(t.interstellar.stellar_engine&&t.interstellar.stellar_engine.count>=100){let e=t.tech.gravity&&t.tech.gravity>=2?13.5:7.5,a=t.interstellar.stellar_engine.mass;t.tech.roid_eject&&(a+=.225*t.tech.roid_eject*(1+t.tech.roid_eject/12));let r=oc(20+(a-8)*e+t.interstellar.stellar_engine.exotic*e*10);C-=r,O+=r,s[z("tech_stellar_engine")]=r}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(e){let a=Et(e.r),c="city"===e.r?e.r:a,o="city"===e.r?Zr.city:Zr[a][e.r],n="string"==typeof o[e.s].title?o[e.s].title:o[e.s].title();if(t[c][e.s]&&t[c][e.s].on){let a=o[e.s].powered();if(i[e.s]=t[c][e.s].on,o[e.s].hasOwnProperty("p_fuel")){let t=o[e.s].p_fuel();Array.isArray(t)||(t=[t]);for(let a=0;a=3&&i.coal_power){let e=.35*i.coal_power*Oe("psychic_boost","Uranium");r.p.Uranium[z("city_coal_ash")]=e/65/d,Ji("Uranium",e*f/65)}if(t.space.hydrogen_plant){let e=Zr.space.spc_titan.hydrogen_plant.powered();t.space.hydrogen_plant.on>t.space.electrolysis.on&&(t.space.hydrogen_plant.on=t.space.electrolysis.on);let a=t.space.hydrogen_plant.on*e;C+=a,O-=a,s[z("space_hydrogen_plant_title")]=-a}if(t.portal.inferno_power){let e=Zr.portal.prtl_ruins.inferno_power.fuel,a=t.portal.inferno_power.on;Object.keys(e).forEach((function(s){let i=a*e[s];for(;i*f>t.resource[s].amount+(t.resource[s].diff>0?t.resource[s].diff*f:0)&&i>0;)a--,i-=e[s];r.p.consume[s][z("portal_inferno_power_title")]=-i,Ji(s,-i*f)}));let i=a*Zr.portal.prtl_ruins.inferno_power.powered();C+=i,O-=i,s[z("portal_inferno_power_title")]=-i}if(t.space.swarm_satellite&&t.space.swarm_control){let e=t.space.swarm_satellite.count;e>t.space.swarm_control.s_max&&(e=t.space.swarm_control.s_max),t.space.swarm_control.support=e;let a=.35;t.tech.swarm>=4&&(a+=.15*(t.tech.swarm-3)),t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=1&&(a+=.15),t.blood.illuminate&&(a+=.01*t.blood.illuminate),a=+a.toFixed(2);let r=oc(e*a);C-=r,O+=r,s[z("space_sun_swarm_satellite_title")]=r}if(t.city.mill&&t.tech.agriculture&&t.tech.agriculture>=6){let e=oc(t.city.mill.on*Zr.city.mill.powered());C+=e,O-=e,s[z("city_mill_title2")]=-e}if(t.city.windmill&&t.tech.wind_plant){let e=oc(t.city.windmill.count*Zr.city.windmill.powered());C+=e,O-=e,s[z("city_mill_title2")]=-e}if(t.race.powered){let e=di.powered.vars()[0]*t.resource[t.race.species].amount;t.race.discharge&&t.race.discharge>0&&(e=+(1.25*e).toFixed(3)),O-=e}t.race.replicator&&(t.city.replicator={count:t.race.replicator.pow,on:t.race.replicator.pow});let j=t.power;if(t.settings.lowPowerBalance){let e=0;for(let a=0;a=0;y--){let e=j[y].split(":"),c=Et(e[0]),o="city"===e[0]?e[0]:c,n="city"===e[0]?Zr.city:Zr[c][e[0]];if(t[o][e[1]]&&t[o][e[1]].on&&(i[e[1]]=t[o][e[1]].on,n[e[1]].hasOwnProperty("p_fuel"))){let t=n[e[1]].p_fuel();Array.isArray(t)||(t=[t]);for(let s=0;sO&&i[r[1]]>0){let e="city"===r[0]?"city":Et(r[0]),s="city"===r[0]?Zr.city:Zr[e][r[0]],c=s[r[1]].powerBalancer();if(c){let o=i[r[1]];c.forEach((function(i){let c=0;if(i.hasOwnProperty("r")&&i.hasOwnProperty("k")){let n=t[e][r[1]][i.k]?t[e][r[1]][i.k]:0;t.resource[i.r].odif&&t.resource[i.r].odif<0&&(t.resource[i.r].odif=0);let l=t.resource[i.r].diff+(t.resource[i.r].odif?t.resource[i.r].odif:0);for(;l-c*n>n&&o>0&&a>O;)o--,c++,a-=s[r[1]].powered();t.resource[i.r].odif=n*c}else if(i.hasOwnProperty("s")){let n=s[r[1]].support();t[e][r[1]].soff&&t[e][r[1]].soff<0&&(t[e][r[1]].soff=0);let l=i.s+(t[e][r[1]].soff?t[e][r[1]].soff:0);for(;l-n*c>=n&&o>0&&a>O;)o--,c++,a-=s[r[1]].powered();t[e][r[1]].soff=n*c}})),i[r[1]]=o}}}for(y=j.length-1;y>=0;y--){let e=j[y].split(":"),r=Et(e[0]),s="city"===e[0]?e[0]:r,c="city"===e[0]?Zr.city:Zr[r][e[0]];if(t[s][e[1]]&&t[s][e[1]].on){let r=c[e[1]].powered();for(;a>O&&i[e[1]]>0;)a-=r,i[e[1]]--;i[e[1]]!==t[s][e[1]].on?($(`#${s}-${e[1]} .on`).addClass("warn"),$(`#${s}-${e[1]} .on`).prop("title",`ON ${i[e[1]]}/${t[s][e[1]].on}`)):($(`#${s}-${e[1]} .on`).removeClass("warn"),$(`#${s}-${e[1]} .on`).prop("title","ON"))}else i[e[1]]=0,$(`#${s}-${e[1]} .on`).removeClass("warn"),$(`#${s}-${e[1]} .on`).prop("title","ON")}O-=e}else for(y=0;yO&&o>0;)o-=c[e[1]].powered(),i[e[1]]--;if(O-=t[s][e[1]].on*a,c[e[1]].hasOwnProperty("p_fuel")){let t=c[e[1]].p_fuel();Array.isArray(t)||(t=[t]);for(let a=0;at.resource.Elerium.amount&&a>0;)a-=e,i.foothold--;r.p.consume.Elerium[z("galaxy_foothold")]=-a,Ji("Elerium",-a*f)}[{a:"space",r:"spc_moon",s:"moon_base",g:"moon"},{a:"space",r:"spc_red",s:"spaceport",g:"red"},{a:"space",r:"spc_titan",s:"electrolysis",g:"titan"},{a:"space",r:"spc_titan",r2:"spc_enceladus",s:"titan_spaceport",g:"enceladus"},{a:"space",r:"spc_eris",s:"drone_control",g:"eris"},{a:"tauceti",r:"tau_home",s:"orbital_station",g:"tau_home"},{a:"tauceti",r:"tau_red",s:"orbital_platform",g:"tau_red"},{a:"tauceti",r:"tau_roid",s:"patrol_ship",g:"tau_roid",oc:!0}].forEach((function(e){if(e.r2=e.r2||e.r,t[e.a][e.s]&&t[e.a][e.s].count>0){if(j.includes(`${e.r}:${e.s}`)||(i[e.s]=t[e.a][e.s].on),Zr[e.a][e.r][e.s].hasOwnProperty("support_fuel")){let a=Zr[e.a][e.r][e.s].support_fuel();Array.isArray(a)||(a=[a]);for(let s=0;s=2?i.nav_beacon*Zr.space.spc_home.nav_beacon.support():0;break;case"red":t[e.a][e.s].s_max+=t.tech.mars&&t.tech.mars>=3?i.red_tower*Zr.space.spc_red.red_tower.support():0,t[e.a][e.s].s_max+=t.tech.luna&&t.tech.luna>=3?i.nav_beacon*Zr.space.spc_home.nav_beacon.support():0;break;case"tau_home":t[e.a][e.s].s_max+=i.tau_farm?i.tau_farm:0}}if(t[e.a][e.s]&&"spc_eris"===e.r&&!i.ai_core2&&(t[e.a][e.s].s_max=0),t[e.a][e.s]){let s=0,i=t.support[e.g].map((e=>e.split(":")[1]));for(var a=0;at[e.a][e.s].s_max&&!e.oc?(l-=s+l-t[e.a][e.s].s_max,$(`#${o} .on`).addClass("warn"),$(`#${o} .on`).prop("title",`ON ${l}/${t[e.a][i[a]].on}`)):($(`#${o} .on`).removeClass("warn"),$(`#${o} .on`).prop("title","ON")),Zr[e.a][e.r2][i[a]].hasOwnProperty("support_fuel")){let t=Zr[e.a][e.r2][i[a]].support_fuel();Array.isArray(t)||(t=[t]);for(let s=0;s0){let e=i.red_factory*Yt(1,!0);Ji("Helium_3",-e*f),r.p.consume.Helium_3[z("space_red_factory_title")]=-e}if(i.int_factory&&i.int_factory>0){let e=i.int_factory*Xt(5);Ji("Deuterium",-e*f),r.p.consume.Deuterium[z("interstellar_int_factory_title")]=-e}if(c.water_freighter&&c.water_freighter>0){let e=Yt(5,!0),t=c.water_freighter*e;for(let a=0;a0){let e=+Xt(5),a=i.starport*e;r.p.consume.Helium_3[z("interstellar_alpha_starport_title")]=-a;for(let t=0;te.split(":")[1]));for(y=0;yt.interstellar.starport.s_max?(r-=e+r-t.interstellar.starport.s_max,$(`#${s} .on`).addClass("warn"),$(`#${s} .on`).prop("title",`ON ${r}/${t.interstellar[a[y]].on}`)):($(`#${s} .on`).removeClass("warn"),$(`#${s} .on`).prop("title","ON")),e+=r,o[a[y]]=r}else o[a[y]]=0;if(t.interstellar.starport.support=e,t.interstellar.hasOwnProperty("mining_droid")&&t.interstellar.mining_droid.count>0){let e=o.mining_droid,a=t.interstellar.mining_droid.on,r=a>0?e/a:0,s=a;["adam","uran","coal","alum"].forEach((function(e){s-=t.interstellar.mining_droid[e],s<0&&(t.interstellar.mining_droid[e]+=s,s=0),F[e]=t.interstellar.mining_droid[e]*r}))}}if(t.galaxy.starbase&&t.galaxy.starbase.count>0){let e=+Xt(25),a=i.starbase*e;r.p.consume.Helium_3[z("galaxy_starbase")]=-a;for(let t=0;te.split(":")[1]));for(y=0;yt.galaxy.starbase.s_max?(r-=e+r-t.galaxy.starbase.s_max,$(`#${s} .on`).addClass("warn"),$(`#${s} .on`).prop("title",`ON ${r}/${t.galaxy[a[y]].on}`)):($(`#${s} .on`).removeClass("warn"),$(`#${s} .on`).prop("title","ON")),e+=r*-Zr.galaxy.gxy_gateway[a[y]].support(),n[a[y]]=r}else n[a[y]]=0;t.galaxy.starbase.support=e}if(t.galaxy.foothold&&t.galaxy.foothold.count>0){t.galaxy.foothold.s_max=i.foothold*Zr.galaxy.gxy_alien2.foothold.support();let e=0,a=t.support.alien2.map((e=>e.split(":")[1]));for(y=0;yt.galaxy.foothold.s_max?(r-=e+r-t.galaxy.foothold.s_max,$(`#${s} .on`).addClass("warn"),$(`#${s} .on`).prop("title",`ON ${r}/${t.galaxy[a[y]].on}`)):($(`#${s} .on`).removeClass("warn"),$(`#${s} .on`).prop("title","ON")),e+=r*-Zr.galaxy.gxy_alien2[a[y]].support(),n[a[y]]=r}else n[a[y]]=0;t.galaxy.foothold.support=e}if(t.portal.guard_post){if(t.portal.guard_post.s_max=t.portal.guard_post.count*Zr.portal.prtl_ruins.guard_post.support(),t.portal.guard_post.on>0){let e=t.portal.fortress.garrison-t.portal.fortress.patrols*t.portal.fortress.patrol_size;if(i.soul_forge){let t=wa();t<=e&&(e-=t)}ee.split(":")[1]));for(y=0;yt.portal.harbour.s_max?(r-=e+r-t.portal.harbour.s_max,$(`#${s} .on`).addClass("warn"),$(`#${s} .on`).prop("title",`ON ${r}/${t.portal[a[y]].on}`)):($(`#${s} .on`).removeClass("warn"),$(`#${s} .on`).prop("title","ON")),e+=r*-Zr.portal.prtl_lake[a[y]].support(),n[a[y]]=r}else n[a[y]]=0;t.portal.harbour.support=e}if(t.portal.purifier){t.portal.purifier.s_max=i.purifier*Zr.portal.prtl_spire.purifier.support();let e=0,a=t.support.spire.map((e=>e.split(":")[1]));for(y=0;yt.portal.purifier.s_max?(r-=e+r-t.portal.purifier.s_max,$(`#${s} .on`).addClass("warn"),$(`#${s} .on`).prop("title",`ON ${r}/${t.portal[a[y]].on}`)):($(`#${s} .on`).removeClass("warn"),$(`#${s} .on`).prop("title","ON")),e+=r*-Zr.portal.prtl_spire[a[y]].support(),l[a[y]]=r}else l[a[y]]=0;t.portal.purifier.support=e}if(t.space.space_station&&t.space.space_station.count>0){let e=+Yt(2.5,!0),t=i.space_station*e;r.p.consume.Helium_3[z("space_belt_station_title")]=-t;for(let a=0;ae.split(":")[1]));for(y=0;yt.space.space_station.s_max){let i=e+r*-Zr.space.spc_belt[a[y]].support()-t.space.space_station.s_max;r-=Math.ceil(i/-Zr.space.spc_belt[a[y]].support()),$(`#${s} .on`).addClass("warn"),$(`#${s} .on`).prop("title",`ON ${r}/${t.space[a[y]].on}`)}else $(`#${s} .on`).removeClass("warn"),$(`#${s} .on`).prop("title","ON");e+=r*-Zr.space.spc_belt[a[y]].support(),c[a[y]]=r}else c[a[y]]=0;t.space.space_station.support=e}if(t.interstellar.nexus&&t.interstellar.nexus.count>0){let e=350,a=i.nexus*e;r.p.consume.Money[z("interstellar_nexus_bd")]=-a;for(let t=0;te.split(":")[1]));for(y=0;yt.interstellar.nexus.s_max?(r-=e+r-t.interstellar.nexus.s_max,$(`#${s} .on`).addClass("warn"),$(`#${s} .on`).prop("title",`ON ${r}/${t.interstellar[a[y]].on}`)):($(`#${s} .on`).removeClass("warn"),$(`#${s} .on`).prop("title","ON")),e+=r,o[a[y]]=r}else o[a[y]]=0;t.interstellar.nexus.support=e}if(t.interstellar.xfer_station&&i.xfer_station){let e=.28,t=i.xfer_station*e;r.p.consume.Uranium[z("interstellar_xfer_station_title")]=-t;for(let a=0;a0){let e=+Yt(2,!0),t=i.outpost*e;r.p.consume.Oil[z("space_gas_moon_outpost_bd")]=-t;for(let a=0;a0){let e=+Xt(3),t=i.neutron_miner*e;r.p.consume.Helium_3[z("interstellar_neutron_miner_title")]=-t;for(let a=0;ae.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 A=0,T=0,E=0;for(let e=0;eZr[a][r][i].ship.civ()&&(t.civic[t.civic.d_job].workers-=Zr[a][r][i].ship.civ(),t.civic.crew.workers+=Zr[a][r][i].ship.civ(),t[a][i].crew+=Zr[a][r][i].ship.civ()),t[a][i].crew>t[a][i].on*Zr[a][r][i].ship.civ()&&(t.civic[t.civic.d_job].workers+=Zr[a][r][i].ship.civ(),t.civic.crew.workers-=Zr[a][r][i].ship.civ(),t[a][i].crew-=Zr[a][r][i].ship.civ()),t.civic.crew.assigned=t.civic.crew.workers,A+=t[a][i].crew,E+=t[a][i].crew),Zr[a][r][i].ship.mil&&t[a][i].hasOwnProperty("mil")){if(t[a][i].mil!==t[a][i].on*Zr[a][r][i].ship.mil()&&(t[a][i].mil=t[a][i].on*Zr[a][r][i].ship.mil()),t.civic.garrison.workers-t.portal.fortress.garrison<0){let e=t.civic.garrison.workers-t.portal.fortress.garrison;t[a][i].mil-=e}T+t[a][i].mil>t.civic.garrison.workers-t.portal.fortress.garrison&&(t[a][i].mil=t.civic.garrison.workers-t.portal.fortress.garrison-T),t[a][i].mil<0&&(t[a][i].mil=0),T+=t[a][i].mil}t[a][i].crew0)&&(T+=ct(e))})),t.civic.garrison.crew=T),Object.keys(oa).forEach((function(e){if(t.civic[e]&&("crew"!==e&&(E+=t.civic[e].workers,E>t.resource[t.race.species].amount&&(t.civic[e].workers-=E-t.resource[t.race.species].amount),t.civic[e].workers<0&&(t.civic[e].workers=0)),"unemployed"!==e&&"hunter"!==e&&"forager"!==e)){let a=t.civic[e].stress;if(t.city.ptrait.includes("mellow")&&(a+=Fi.mellow.vars()[1]),t.race.content){let r="hell_surveyor"===e?.2:.4;a+=t.race.content*r}t.city.ptrait.includes("dense")&&"miner"===e&&(a-=Fi.dense.vars()[1]),t.race.freespirit&&"farmer"!==e&&"lumberjack"!==e&&"quarry_worker"!==e&&"crystal_miner"!==e&&"scavenger"!==e&&(a/=1+di.freespirit.vars()[0]/100);let r=t.civic[e].workers;t.race.high_pop&&(r/=di.high_pop.vars()[0]),t.race.sky_lover&&["miner","coal_miner","crystal_miner","pit_miner"].includes(e)&&(r*=1+di.sky_lover.vars()[0]/100),b-=r/a}})),t.civic[t.civic.d_job].workers+=t.resource[t.race.species].amount-E,t.civic[t.civic.d_job].workers<0&&(t.civic[t.civic.d_job].workers=0),Object.keys(oa).forEach((function(e){"craftsman"!==e&&t.civic[e]&&t.civic[e].workers0&&t.civic[e].workers40){let e=t.civic.taxes.tax_rate-40;t.city.morale.tax-=.5*e,p-=.5*e}if("oligarchy"===t.civic.govern.type&&t.civic.taxes.tax_rate>20){let e=t.civic.taxes.tax_rate-20;t.city.morale.tax+=.5*e,p+=.5*e}if(("autocracy"!==t.civic.govern.type&&!t.race.blood_thirst||t.race.immoral)&&t.civic.garrison.protest+t.civic.garrison.fatigue>2){let e=t.race.immoral?1+di.immoral.vars()[0]/100:1,a=Math.round(Math.log2(t.civic.garrison.protest+t.civic.garrison.fatigue)*e);t.city.morale.warmonger=t.race.immoral?a:-a,p+=t.city.morale.warmonger}else t.city.morale.warmonger=0;let K=100;if(K+=t.city.casino?i.casino:0,K+=t.space.spc_casino?i.spc_casino:0,K+=t.tauceti.tauceti_casino?i.tauceti_casino:0,t.city.amphitheatre){let e=D("athleticism",0);K+=e?t.city.amphitheatre.count*e:t.city.amphitheatre.count}if(c.vr_center&&(K+=2*c.vr_center),o.zoo&&(K+=2*o.zoo),i.resort&&(K+=2*i.resort),t.tech.superstar){let e=t.race.high_pop?Pe(1):1;K+=la(t.civic.entertainer.workers,"entertainer")*e}if($o=K,t.tech.monuments){let e=D("gaslighter",2),a=e?2-e:2;$o+=t.tech.monuments*a}if(t.civic.taxes.tax_rate<20&&!t.race.banana&&($o+=10-Math.floor(t.civic.taxes.tax_rate/2)),t.stats.achieve.joyless&&($o+=2*t.stats.achieve.joyless.l),t.race.motivated){let e=Math.ceil(t.race.motivated**.4);$o+=Math.round(e/2)}let L=50;if(t.race.optimistic&&(L+=di.optimistic.vars()[1]),P>0&&(L+=Math.round(di.optimistic.vars(1)[1]*P)),t.race.truepath&&(L-=25),t.civic.govern.fr>0){let e=p/2;t.city.morale.rev=e,p-=e,L-=10}else t.city.morale.rev=0;if(t.race.tormented)if(p>100){let e=p-100;e=Math.ceil(e*di.tormented.vars()[0]/100),p-=e,t.city.tormented=e}else t.city.tormented=0;else delete t.city.tormented;if(t.city.morale.potential=+p.toFixed(1),p$o&&(p=$o),t.city.morale.cap=$o,t.city.morale.current=p,t.city.morale.current<100)if(t.race.blissful){let e=t.city.morale.current-100,a=di.blissful.vars()[0]/100;d*=1+e*a/100,r.p.Global[z("morale")]=e*a+"%"}else d*=t.city.morale.current/100,r.p.Global[z("morale")]=t.city.morale.current-100+"%";else d*=1+(t.city.morale.current-100)/200,r.p.Global[z("morale")]=(t.city.morale.current-100)/2+"%";if(t.race.lazy&&2===t.city.calendar.temp&&(r.p.Global[z("trait_lazy_bd")]="-"+di.lazy.vars()[0]+"%",d*=1-di.lazy.vars()[0]/100),t.race.distracted&&(r.p.Global[z("event_m_curious3_bd")]="-5%",d*=.95),t.race.stimulated&&(r.p.Global[z("event_m_curious4_bd")]="+10%",d*=1.1),t.race.selenophobia){let e=t.city.calendar.moon>14?28-t.city.calendar.moon:t.city.calendar.moon;r.p.Global[z("moon_phase")]=-e+di.selenophobia.vars()[0]+"%",e=1+di.selenophobia.vars()[0]/100-e/100,d*=e}if(t.interstellar.mass_ejector){let e=0,a=0,s=0;Object.keys(t.interstellar.mass_ejector).forEach((function(c){if(Ja[c]){let o=t.interstellar.mass_ejector[c];e+o>1e3*i.mass_ejector&&(o=1e3*i.mass_ejector-e),e+=o,o>0&&(r.p.consume[c][z("interstellar_blackhole_name")]=-o),o*f>t.resource[c].amount&&(o=t.resource[c].amount/f),o<0&&(o=0),Ji(c,-.25*o),a+=o*Ja[c],"magic"===t.race.universe||"Elerium"!==c&&"Infernite"!==c||(s+=o*Ja[c])}})),t.interstellar.mass_ejector.mass=a,t.interstellar.mass_ejector.total=e,t.interstellar.stellar_engine.mass+=a/1e10*f,t.interstellar.stellar_engine.exotic+=s/1e10*f}if(t.portal.transport&&t.portal.purifier){let e=0,a=0,s=t.blood.spire&&t.blood.spire>=2?.8:.85;if(Object.keys(t.portal.transport.cargo).forEach((function(i){if(Ya[i]){let c=t.portal.transport.cargo[i];e+c>5*n.transport&&(c=5*n.transport-e),e+=c;let o=c*Ya[i].out;for(;o*f>t.resource[i].amount&&o>0;)o-=Ya[i].out,c--;o>0&&(r.p.consume[i][z("portal_transport_title")]=-o);let l=1-s**(n.bireme||0);Ji(i,-.25*o),a+=Number(c*Ya[i].in*f*l)}})),t.portal.mechbay)for(let e=0;et.portal.purifier.sup_max&&(t.portal.purifier.supply=t.portal.purifier.sup_max)}if(t.race.carnivore&&!t.race.herbivore&&!t.race.soul_eater&&!t.race.artifical&&t.resource.Food.amount>10){let e=di.carnivore.vars()[0]/100,a=+((t.resource.Food.amount-10)*e).toFixed(3);t.city.smokehouse&&(a*=.9**t.city.smokehouse.count),Ji("Food",-a*f),r.p.consume.Food[z("spoilage")]=-a}if(t.race.gnawer){let e=t.race.kindling_kindred||t.race.smoldering?"Stone":"Lumber";if(t.resource[e].display){let a=(t.resource[t.race.species].amount+t.civic.garrison.workers)*di.gnawer.vars()[0];r.p.consume[e][z("trait_gnawer_bd")]=-a,Ji(e,-a*f)}}var x=!0;if(t.resource[t.race.species].amount>=1||t.city.farm||t.city.soul_well||t.city.compost||t.city.tourist_center||t.city.transmitter){let e=0,s="virgo"===a?1+U("virgo")[0]/100:1;if(t.race.artifical)t.city.transmitter&&(e=i.transmitter*Oe("transmitter")*Oe("psychic_boost","Food"),r.p.Food[z("city_transmitter")]=e+"v",t.city.transmitter.lpmod=Oe("transmitter")*d*Oe("psychic_boost","Food"));else if(t.race.detritivore){if(t.city.compost){let a=t.city.compost.on;if(!t.race.kindling_kindred){let e=.5,s=a*e;for(;s*f>t.resource.Lumber.amount&&s>0;)s-=e,a--;r.p.consume.Lumber[z("city_compost_heap")]=-s,Ji("Lumber",-s*f)}let s=di.detritivore.vars()[0]/100,i=a*(1.2+t.tech.compost*s);i*="grassland"===t.city.biome?Si.grassland.vars()[0]:1,i*="savanna"===t.city.biome?Si.savanna.vars()[0]:1,i*="ashland"===t.city.biome?Si.ashland.vars()[0]:1,i*="volcanic"===t.city.biome?Si.volcanic.vars()[0]:1,i*="hellscape"===t.city.biome?Si.hellscape.vars()[0]:1,i*=t.city.ptrait.includes("trashed")?Fi.trashed.vars()[0]:1,i*=Oe("psychic_boost","Food"),r.p.Food[z("city_compost_heap")]=i+"v",e+=i}}else if(t.race.carnivore||t.race.soul_eater){let a=ke(),s=la(t.civic.hunter.workers,"hunter");if(s*=hi(s,"hunting"),t.race.servants&&(s+=t.race.servants.jobs.hunter),s*=a*(t.race.carnivore?2:.5),t.race.ghostly&&(s*=1+di.ghostly.vars()[0]/100),s*=Oe("psychic_boost","Food"),r.p.Food[z(t.race.unfathomable?"job_raider":"job_hunter")]=s+"v",t.race.carnivore&&t.city.lodge&&s>0&&(s*=1+t.city.lodge.count/20,r.p.Food[`ᄂ${z("city_lodge")}`]=5*t.city.lodge.count+"%"),t.city.soul_well){let e=t.city.soul_well.count*(t.race.ghostly?2+di.ghostly.vars()[1]:2);s+=e*Oe("psychic_boost","Food"),r.p.Food[z("city_soul_well")]=e+"v"}e+=s}else if(t.race.unfathomable){if(t.city.captive_housing){let a=ke(),s=la(t.civic.hunter.workers,"hunter")*a;s*=hi(s,"hunting"),t.race.servants&&(s+=t.race.servants.jobs.hunter*a);let i=.008*s;if(t.city.captive_housing.cattle0&&(s-=Math.round(t.city.captive_housing.cattle**1.25),s=t.city.captive_housing.cattle**2&&(t.city.captive_housing.cattle++,t.city.captive_housing.cattleCatch=0),t.city.captive_housing.cattle>0&&t.resource.Food.amount<.01*t.resource.Food.max&&(t.city.captive_housing.cattle--,t.resource.Food.amount+=1e3,t.stats.cattle++)),t.city.captive_housing.cattle>0){let a=t.city.captive_housing.cattle/3*Oe("psychic_boost","Food");r.p.Food[z("city_captive_housing_cattle_bd")]=a+"v",e+=a}}}else if(t.city.farm||t.race.forager){let a=1;if(t.race.submerged||(0===t.city.calendar.temp&&(0===t.city.calendar.weather?a*=t.race.chilled?1+di.chilled.vars()[3]/100:.7:a*=t.race.chilled?1+di.chilled.vars()[4]/100:.85),2===t.city.calendar.weather&&(a*=t.race.chilled?1-di.chilled.vars()[5]/100:1.1)),t.race.forager){let a=1+(t.tech.foraging?.75*t.tech.foraging:0),s=la(t.civic.forager.workers,"forager");t.race.servants&&(s+=t.race.servants.jobs.forager);let i=s*a*.35;r.p.Food[z("job_forager")]=i+"v",e+=i}if(t.city.farm){let i=la(t.civic.farmer.workers,"farmer"),c=0;i>ua(t.city.farm.count)&&(c=i-ua(t.city.farm.count),i=ua(t.city.farm.count));let o=i*ha(!0)+c*ha(!1);if(t.race.servants){let e=ua(t.race.servants.jobs.farmer),a=0,r=ua(t.city.farm.count)-i;e>r&&(a=e-r,e=r),o+=e*ha(!0,!0)+a*ha(!1,!0)}let n=1;if(t.city.mill){let e=t.tech.agriculture>=5?.05:.03;n+=(t.city.mill.count-t.city.mill.on)*e}r.p.Food[z("job_farmer")]=o+"v",e+=o*s*a*n*h*Oe("psychic_boost","Food"),o>0&&(r.p.Food[`ᄂ${z("city_mill_title1")}`]=100*(n-1)+"%",r.p.Food[`ᄂ${z("sign_virgo")}+0`]=100*(s-1)+"%",r.p.Food[`ᄂ${z("morale_weather")}`]=100*(a-1)+"%",r.p.Food[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%")}}if(t.tauceti.tau_farm&&i.tau_farm){let e=1+.5*(c.colony||0),t=Oe("tau_farm","food")*i.tau_farm*Oe("psychic_boost","Food"),a=t*d*e;r.p.Food[z("tau_home_tau_farm")]=t+"v",t>0&&(r.p.Food[`ᄂ${z("tau_home_colony")}`]=100*(e-1)+"%"),Ji("Food",a*f)}let n=0;t.tech.military&&(n=t.race.herbivore&&!t.race.carnivore||t.race.artifical?0:qe(Me(),"hunting")/3);let l=0,u=mt("spc_red");t.tech.mars&&(l=c.biodome*la(t.civic.colonist.workers,"colonist")*Oe("biodome","food")*Oe("psychic_boost","Food"),(t.race.cataclysm||t.race.orbit_decayed)&&(l+=c.biodome*Oe("biodome","cat_food")*Oe("psychic_boost","Food"))),r.p.Food[Zr.space.spc_red.biodome.title()]=l+"v",l>0&&(r.p.Food[`ᄂ${z("space_syndicate")}+0`]=-100*(1-u)+"%",r.p.Food[`ᄂ${z("space_red_ziggurat_title")}+0`]=100*(_-1)+"%",r.p.Food[`ᄂ${z("sign_virgo")}+0`]=100*(s-1)+"%");let p=e+n*h+l*u*_*s;p*=d;let m=t.civic.garrison.workers;t.race.parasite&&!t.tech.isolation&&(m-=2,m<0&&(m=0));let g=t.resource[t.race.species].amount+m-.5*(t.civic.unemployed.workers+la(t.civic.hunter.workers,"hunter"));t.race.forager&&(g-=la(t.civic.forager.workers,"forager")),g*=t.race.gluttony?1+di.gluttony.vars()[0]/100:1,t.race.high_metabolism&&(g*=1+di.high_metabolism.vars()[0]/100),t.race.sticky&&(g*=1-di.sticky.vars()[0]/100);let v=Oi("pinguicula");if(v>0&&(g*=1-di.sticky.vars(1)[0]/100*v),t.race.photosynth)switch(t.city.calendar.weather){case 0:g*=0===t.city.calendar.temp?1:1-di.photosynth.vars()[2]/100;break;case 1:g*=1-di.photosynth.vars()[1]/100;break;case 2:g*=1-di.photosynth.vars()[0]/100}t.race.ravenous&&(g*=1+di.ravenous.vars()[0]/100,g+=t.resource.Food.amount/di.ravenous.vars()[1]),t.race.hibernator&&3===t.city.calendar.season&&(g*=1-di.hibernator.vars()[0]/100),t.race.high_pop&&(g/=di.high_pop.vars()[0]),r.p.consume.Food[Tc("name")]=-g;let y=0;t.city.tourist_center&&(y=50*t.city.tourist_center.on,r.p.consume.Food[z("tech_tourism")]=-y);let b=0;t.space.spaceport&&(b=i.spaceport*(t.race.cataclysm||t.race.orbit_decayed?2:25),r.p.consume.Food[z("space_red_spaceport_title")]=-b);let w=0;t.interstellar.starport&&(w=100*i.starport,r.p.consume.Food[z("interstellar_alpha_starport_title")]=-w);let $=0;t.galaxy.starbase&&($=i.s_gate*i.starbase*250,r.p.consume.Food[z("galaxy_starbase")]=-$);let k=0;t.space.space_station&&(k=i.space_station*(t.race.cataclysm?1:10),r.p.consume.Food[z("space_belt_station_title")]=-k);let q=0;t.space.space_barracks&&!t.race.cataclysm&&(q=10*t.space.space_barracks.on,r.p.consume.Food[z("tech_space_marines_bd")]=-q);let M=0;t.galaxy.embassy&&(M=i.s_gate*i.embassy*7500,r.p.consume.Food[z("galaxy_embassy")]=-M);let P=0;t.interstellar.zoo&&(P=12e3*o.zoo,r.p.consume.Food[z("tech_zoo")]=-P);let O=p-g-y-b-w-$-k-q-M-P;if(r.p.Food[z("soldiers")]=n+"v",n>0&&(r.p.Food[`ᄂ${z("quarantine")}+1`]=100*(h-1)+"%"),!Ji("Food",O*f))if(t.race.anthropophagite&&t.resource[t.race.species].amount>1)t.resource[t.race.species].amount--,Ji("Food",1e4*di.anthropophagite.vars()[0]),t.stats.murders++;else{x=!1;let e=1.25;t.race.slow_digestion&&(e+=di.slow_digestion.vars()[0]);let a=Oi("slitheryn");a>0&&(e+=di.slow_digestion.vars(1)[0]*a),t.race.humpback&&(e+=di.humpback.vars()[0]),t.race.atrophy&&(e-=di.atrophy.vars()[0]),p1&&0===Math.rand(0,400)&&(t.resource[t.race.species].amount--,Ji("Food",1e4*di.anthropophagite.vars()[0]),t.stats.murders++)}if(t.portal.fortress&&t.portal.fortress.walls<100&&(Ji("Stone",-50)&&(t.portal.fortress.repair++,r.p.consume.Stone[z("portal_fortress_name")]=-200),t.portal.fortress.repair>=Zr.portal.prtl_fortress.info.repair()&&(t.portal.fortress.repair=0,t.portal.fortress.walls++)),t.race.psychic&&t.resource.Energy.display){let e={},t=di.psychic.vars()[2];e[z("trait_psychic_name")]=t+"v",Ji("Energy",t*f),r.p.Energy=e}if(t.civic.homeless>0){let e=Math.min(t.civic.homeless,t.resource[t.race.species].max-t.resource[t.race.species].amount);t.civic.homeless-=e,t.resource[t.race.species].amount+=e}else if(x&&t.resource.Food.amount>0&&t.resource[t.race.species].max>t.resource[t.race.species].amount)if(t.race.artifical||t.race.spongy&&0===t.city.calendar.weather);else if(!t.race.parasite||0!==t.city.calendar.wind||t.race.cataclysm||t.race.orbit_decayed)if(t.race.vax&&t.race.vax>=100);else{var k=t.tech.reproduction?t.tech.reproduction:0;t.tech.reproduction&&1===e.getMonth()&&14===e.getDate()&&(k+=5),t.race.fast_growth&&(k*=di.fast_growth.vars()[0],k+=di.fast_growth.vars()[1]),t.race.spores&&1===t.city.calendar.wind&&(t.race.parasite?k+=di.spores.vars()[2]:(k+=di.spores.vars()[0],k*=di.spores.vars()[1])),t.tech.reproduction&&t.tech.reproduction>=2&&t.city.hospital&&(k+=t.city.hospital.count),t.genes.birth&&(k+=t.genes.birth),t.race.promiscuous&&(k+=di.promiscuous.vars()[0]*t.race.promiscuous),"libra"===a&&(k*=1+U("libra")[0]/100),t.race.high_pop&&(k*=di.high_pop.vars()[2]),"taiga"===t.city.biome&&(k*=Si.taiga.vars()[1]);let r=t.city.ptrait.includes("toxic")?t.resource[t.race.species].amount*Fi.toxic.vars()[1]:t.resource[t.race.species].amount;t.race.parasite&&(t.race.cataclysm||t.race.orbit_decayed)&&(k=Math.round(k/5),r*=3),Math.rand(0,1.810792884997279*r)<=k&&t.resource[t.race.species].amount++}let N=0,B=0;if(i.s_gate){let e=["freighter","super_freighter","minelayer","raider"];for(let a=0;a0;if(i.s_gate&&o&&t[a][c]&&(t[a][c].crew>0||t[a][c].mil>0)){let e=0;if(Zr[a][r][c].ship.civ()>0&&(e=Math.floor(t[a][c].crew/Zr[a][r][c].ship.civ())),Zr[a][r][c].ship.mil()>0){let s=Math.floor(t[a][c].mil/Zr[a][r][c].ship.mil());(0===Zr[a][r][c].ship.civ()||st.resource.Helium_3.amount+(t.resource.Helium_3.diff>0?t.resource.Helium_3.diff*f:0)&&i>0;)i-=s,e--;Ji("Helium_3",-i*f),N+=i}if(Zr[a][r][c].ship.hasOwnProperty("deuterium")){let s=+Xt(Zr[a][r][c].ship.deuterium).toFixed(2),i=e*s;for(;i*f>t.resource.Deuterium.amount+(t.resource.Deuterium.diff>0?t.resource.Deuterium.diff*f:0)&&i>0;)i-=s,e--;Ji("Deuterium",-i*f),B+=i}n.hasOwnProperty(c)?n[c]=n[c]>e?e:n[c]:n[c]=e}else n[c]=0}}if(r.p.consume.Helium_3[z("galaxy_fuel_consume")]=-N,r.p.consume.Deuterium[z("galaxy_fuel_consume")]=-B,t.space.shipyard&&t.space.shipyard.ships){let e={Oil:0,Helium_3:0,Uranium:0,Elerium:0};t.space.shipyard.ships.forEach((function(a){if("spc_dwarf"!==a.location){let r=ut(a);r.res&&r.burn>0?r.burn*f0?t.resource[r.res].diff*f:0)?(Ji(r.res,-r.burn*f),a.fueled=!0,e[r.res]+=r.burn):a.fueled=!1:a.fueled=!0}})),r.p.consume.Oil[z("outer_shipyard_fleet")]=-e.Oil,r.p.consume.Helium_3[z("outer_shipyard_fleet")]=-e.Helium_3,r.p.consume.Uranium[z("outer_shipyard_fleet")]=-e.Uranium,r.p.consume.Elerium[z("outer_shipyard_fleet")]=-e.Elerium}t.race.emfield&&(t.race.discharge&&t.race.discharge>0?t.race.discharge--:(t.race.emfield++,0===Math.rand(0,500)&&(t.race.discharge=t.race.emfield,t.race.emfield=1)));let G=x?1:.5;if(t.race.angry&&!1===x&&(G-=di.angry.vars()[0]/100),t.race.malnutrition&&!1===x&&(G+=di.malnutrition.vars()[0]/100),t.resource.Furs.display){if(t.race.evil||t.race.artifical||t.race.unfathomable){let e=ke(),a=la(t.civic.hunter.workers,"hunter");if(a*=hi(a,"hunting"),t.race.servants&&(a+=ua(t.race.servants.jobs.hunter)),a*=e/20,"savanna"===t.city.biome&&(a*=Si.savanna.vars()[1]),t.race.high_pop&&(a=Pe(a)),a*=Oe("psychic_boost","Furs"),r.p.Furs[z(t.race.unfathomable?"job_raider":"job_hunter")]=a+"v",a>0&&(r.p.Furs[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%"),Ji("Furs",a*G*d*f*h),!t.race.soul_eater&&t.race.evil){let e=la(t.civic.lumberjack.workers,"lumberjack");e*=hi(e,"lumberjack"),t.race.servants&&(e+=t.race.servants.jobs.lumberjack),e/=4,e*=Oe("psychic_boost","Furs"),r.p.Furs[z("job_reclaimer")]=e+"v",e>0&&(r.p.Furs[`ᄂ${z("quarantine")}+1`]=100*(h-1)+"%"),Ji("Furs",e*G*d*f*h)}}let e=qe(Me(),"hunting")/10;if("oceanic"===t.city.biome?e*=Si.oceanic.vars()[2]:"tundra"===t.city.biome&&(e*=Si.tundra.vars()[0]),e*=Oe("psychic_boost","Furs"),r.p.Furs[z("soldiers")]=e+"v",e>0&&(r.p.Furs[`ᄂ${z("quarantine")}+2`]=100*(h-1)+"%"),Ji("Furs",e*G*d*h*f),t.race.forager){let e=1+(t.tech.foraging?.5*t.tech.foraging:0),a=la(t.civic.forager.workers,"forager");t.race.servants&&(a+=t.race.servants.jobs.forager);let s=a*e*.05*Oe("psychic_boost","Furs");r.p.Furs[z("job_forager")]=s+"v",s>0&&(r.p.Furs[`ᄂ${z("quarantine")}+3`]=100*(h-1)+"%"),Ji("Furs",s*G*h*f)}}if(t.resource.Furs.display&&t.tech.isolation&&t.tauceti.womling_farm){let e=t.tauceti.womling_farm.farmers*Oe("psychic_boost","Furs"),a=e*d;r.p.Furs[z("tau_red_womlings")]=e+"v",Ji("Furs",a)}if(t.race.unfathomable&&t.civic.hunter.display){let e=ke(),a=la(t.civic.hunter.workers,"hunter");a*=hi(a,"hunting"),t.race.servants&&(a+=ua(t.race.servants.jobs.hunter)),a*=e/20,t.race.high_pop&&(a=Pe(a)),["Lumber","Chrysotile","Stone","Crystal","Copper","Iron","Aluminium","Cement","Coal","Oil","Uranium","Steel","Titanium","Alloy","Polymer","Iridium"].forEach((function(e){if(t.resource[e].display){let s=a*Oe("psychic_boost",e)*Va[e]/5;["Crystal","Uranium"].includes(e)?s*=.2:["Alloy","Polymer","Iridium"].includes(e)?s*=.35:["Steel","Cement"].includes(e)?s*=.85:["Titanium"].includes(e)&&(s*=.65),r.p[e][z(t.race.unfathomable?"job_raider":"job_hunter")]=s+"v",s>0&&(r.p[e][`ᄂ${z("quarantine")}+99`]=100*(h-1)+"%"),Ji(e,s*G*d*f*h)}}))}{let e=t.tech.primitive&&t.tech.primitive>=3?1:0;t.race.ancient_ruins&&e++,t.stats.achieve.extinct_junker&&t.stats.achieve.extinct_junker.l>=1&&e++,t.city.ptrait.includes("magnetic")&&(e+=Fi.magnetic.vars()[0]),t.race.ascended&&(e+=2);let s=la(t.civic.professor.workers,"professor"),o=t.race.studious?t.civic.professor.impact+di.studious.vars()[0]:t.civic.professor.impact,n=Oi("elven");n>0&&(o+=di.studious.vars(1)[0]*n),s*=o,s*=t.race.pompous?1-di.pompous.vars()[0]/100:1,s*=hi(la(t.civic.professor.workers,"professor"),"science"),t.tech.anthropology&&t.tech.anthropology>=3&&(s*=1+.05*(t.race.cataclysm||t.race.orbit_decayed?t.space.ziggurat?t.space.ziggurat.count:0:t.city.temple.count)),"theocracy"===t.civic.govern.type&&(s*=1-re.theocracy()[1]/100);let l=la(t.civic.scientist.workers,"scientist");if(l*=t.civic.scientist.impact,l*=hi(la(t.civic.scientist.workers,"scientist"),"science"),t.tech.science>=6&&t.city.wardenclyffe){let e=la(t.civic.professor.workers,"professor");t.race.high_pop&&(e=Pe(e)),l*=1+e*i.wardenclyffe*.01}t.space.satellite&&(l*=1+.01*t.space.satellite.count),"theocracy"===t.civic.govern.type&&(l*=1-re.theocracy()[2]/100);let u=.05,_=D("muckraker",2);_&&(u-=_/100),t.race.autoignition&&(u-=di.autoignition.vars()[0]/100,u<0&&(u=0));let p=t.city.library?1+t.city.library.count*u:1,h="gemini"===a?1+U("gemini")[0]/100:1,m=0;if(t.arpa.sequence&&t.arpa.sequence.on&&t.arpa.sequence.time>0){let e=50+10*t.race.mutation;t.arpa.sequence.boost&&(e*=4),e*f<=t.resource.Knowledge.amount?(m=e,ko=!0):ko=!1}else t.arpa.hasOwnProperty("sequence")&&null===t.arpa.sequence.time&&(t.arpa.sequence.time=t.arpa.sequence.max),ko=!1;let g=t.tauceti.hasOwnProperty("womling_lab")?t.tauceti.womling_lab.scientist*(t.tech.womling_gene?10:8):0,v=t.tech.isolation?1+.75*(c.infectious_disease_lab||0):1,y=s+l+g;if(y*=G*d,y+=e*d,y*=p*v,r.p.Knowledge[z("job_professor")]=s+"v",r.p.Knowledge[z("job_scientist")]=l+"v",r.p.Knowledge[z("tau_red_womlings")]=g+"v",r.p.Knowledge[z("hunger")]=100*(G-1)+"%",r.p.Knowledge[t.race.unfathomable?z("tech_moondial"):z("tech_sundial")]=e+"v",t.race.inspired&&(r.p.Knowledge[z("event_inspiration_bd")]="100%",y*=2),t.city.library&&(r.p.Knowledge[z("city_library")]=100*(p-1)+"%"),"gemini"===a&&(r.p.Knowledge[z(`sign_${a}`)]=100*(h-1)+"%"),t.tech.isolation&&c.infectious_disease_lab&&(r.p.Knowledge[Zr.tauceti.tau_home.infectious_disease_lab.title()]=100*(v-1)+"%"),"technocracy"===t.civic.govern.type&&(r.p.Knowledge[z("govern_technocracy")]=re.technocracy()[2]+"%",y*=1+re.technocracy()[2]/100),m>0&&(y-=m,r.p.consume.Knowledge[z("genome_bd")]=-m),Ji("Knowledge",y*f),t.tech.tau_gas2&&t.tech.tau_gas2>=6&&(!t.tech.alien_data||t.tech.alien_data<6)&&t.tauceti.alien_space_station&&i.alien_space_station){let e=t.tauceti.alien_space_station.focus/100*y;r.p.consume.Knowledge[z("tau_gas2_alien_station")]=-e,Ji("Knowledge",-e*f),t.tauceti.alien_space_station.decrypted+=+e.toFixed(3),t.stats.know+=+e.toFixed(0),t.tauceti.alien_space_station.decrypted>=(t.race.lone_survivor?1e6:25e7)&&!t.tech.alien_data?(t.tech.alien_data=1,Bi(z("tau_gas2_alien_station_data1",[z("tech_dist_womling")]),"success",!1,["progress"]),gs()):t.tauceti.alien_space_station.decrypted>=(t.race.lone_survivor?2e6:5e8)&&t.tech.alien_data&&1===t.tech.alien_data?(t.tech.alien_data=2,t.race.tau_food_item=Math.rand(0,10),Bi(z("tau_gas2_alien_station_data2",[z(`tau_gas2_alien_station_data2_r${t.race.tau_food_item||0}`)]),"success",!1,["progress"]),gs()):t.tauceti.alien_space_station.decrypted>=(t.race.lone_survivor?3e6:75e7)&&t.tech.alien_data&&2===t.tech.alien_data?(t.tech.alien_data=3,Bi(z("tau_gas2_alien_station_data3"),"success",!1,["progress"]),gs()):t.tauceti.alien_space_station.decrypted>=(t.race.lone_survivor?48e5:12e8)&&t.tech.alien_data&&3===t.tech.alien_data?(t.tech.alien_data=4,t.race.tau_junk_item=Math.rand(0,10),Bi(z("tau_gas2_alien_station_data4",[z(`tau_gas2_alien_station_data4_r${t.race.tau_junk_item||0}`)]),"success",!1,["progress"]),gs()):t.tauceti.alien_space_station.decrypted>=(t.race.lone_survivor?6e6:15e8)&&t.tech.alien_data&&4===t.tech.alien_data?(t.tech.alien_data=5,Bi(z("tau_gas2_alien_station_data5"),"success",!1,["progress"]),gs()):t.tauceti.alien_space_station.decrypted>=(t.race.lone_survivor?1e7:25e8)&&t.tech.alien_data&&5===t.tech.alien_data&&(t.tech.alien_data=6,t.tauceti.alien_space_station.decrypted=25e8,t.race.lone_survivor?(t.settings.tau.star=!0,t.tech.matrix=2,t.tauceti.ringworld={count:0},Bi(z("tau_gas2_alien_station_data6_alt"),"success",!1,["progress"])):Bi(z("tau_gas2_alien_station_data6"),"success",!1,["progress"]),gs())}}let R=0;if(t.city.factory){let e=(i.factory||0)+(i.red_factory||0)+2*(i.int_factory||0)+(c.tau_factory||0)*(t.tech.isolation?5:3),a=t.city.factory.on+(t.space.red_factory?t.space.red_factory.on:0)+(t.interstellar.int_factory?2*t.interstellar.int_factory.on:0)+(t.tauceti.tau_factory?t.tauceti.tau_factory.on*(t.tech.isolation?5:3):0),s=a>0?e/a:0,o=a;["Lux","Furs","Alloy","Polymer","Nano","Stanene"].forEach((function(e){o-=t.city.factory[e],o<0&&(t.city.factory[e]+=o,o=0)}));let l=t.tech.factory||0,p=t.tech.isolation?1+.5*(c.colony||0):1;if(t.city.factory.Lux&&t.city.factory.Lux>0){let e=t.city.factory.Lux*Zs.Lux.fur[l]*s,a=t.city.factory.Lux;for(;e*f>t.resource.Furs.amount&&e>0;)e-=Zs.Lux.fur[l]*s,a--;r.p.consume.Furs[z("city_factory")]=-e,Ji("Furs",-e*f);let i=t.resource[t.race.species].amount*Zs.Lux.demand[l]*s;i=Vs(i);let c=a*i*p;R=c*G,t.race.discharge&&t.race.discharge>0&&(c*=.5),c*=d,Ji("Money",c*f)}if(t.city.factory.Furs&&t.city.factory.Furs>0){let e=Zs.Furs.money[l]*s,a=Zs.Furs.polymer[l]*s,i=t.city.factory.Furs*e,c=t.city.factory.Furs*a,o=t.city.factory.Furs;for(;c*f>t.resource.Polymer.amount&&c>0;)c-=a,i-=e,o--;for(;i*f>t.resource.Money.amount&&i>0;)c-=a,i-=e,o--;r.p.consume.Money[z("city_factory")]=-i,r.p.consume.Polymer[z("city_factory")]=-c,Ji("Money",-i*f),Ji("Polymer",-c*f);let n=o*Zs.Furs.output[l]*s*Oe("psychic_boost","Furs");t.race.toxic&&(n*=1+di.toxic.vars()[0]/100);let _=Oi("shroomi");_>0&&(n*=1+di.toxic.vars(1)[0]/100*_),"corpocracy"===t.civic.govern.type&&(n*=1+re.corpocracy()[4]/100),"socialist"===t.civic.govern.type&&(n*=1+re.socialist()[1]/100),t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=2&&(n*=1.1);let h=n*p;if(h*=G*d,r.p.Furs[z("city_factory")]=n+"v",h>0&&(p>0&&(r.p.Furs[`ᄂ${z("tau_home_colony")}`]=100*(p-1)+"%"),t.race.discharge&&t.race.discharge>0&&(h*=.5,r.p.Furs[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),t.tech.q_factory)){let e=(u-1)/8+1;h*=e,r.p.Furs[`ᄂ${z("quantum")}`]=100*(e-1)+"%"}Ji("Furs",h*f)}if(t.city.factory.Alloy&&t.city.factory.Alloy>0){let e=t.city.factory.Alloy*Zs.Alloy.copper[l]*s,a=t.city.factory.Alloy*Zs.Alloy.aluminium[l]*s,i=t.city.factory.Alloy;for(;e*f>t.resource.Copper.amount&&e>0;)e-=Zs.Alloy.copper[l]*s,a-=Zs.Alloy.aluminium[l]*s,i--;for(;a*f>t.resource.Aluminium.amount&&a>0;)e-=Zs.Alloy.copper[l]*s,a-=Zs.Alloy.aluminium[l]*s,i--;r.p.consume.Copper[z("city_factory")]=-e,r.p.consume.Aluminium[z("city_factory")]=-a,Ji("Copper",-e*f),Ji("Aluminium",-a*f);let c=i*Zs.Alloy.output[l]*s*Oe("psychic_boost","Alloy");t.race.toxic&&(c*=1+di.toxic.vars()[0]/100);let o=Oi("shroomi");o>0&&(c*=1+di.toxic.vars(1)[0]/100*o),t.tech.alloy&&(c*=1.37),t.race.metallurgist&&(c*=1+di.metallurgist.vars()[0]*t.race.metallurgist/100),"corpocracy"===t.civic.govern.type&&(c*=1+re.corpocracy()[4]/100),"socialist"===t.civic.govern.type&&(c*=1+re.socialist()[1]/100),t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=2&&(c*=1.1);let n=c*p;if(n*=G*d,r.p.Alloy[z("city_factory")]=c+"v",n>0){if(p>0&&(r.p.Alloy[`ᄂ${z("tau_home_colony")}`]=100*(p-1)+"%"),t.race.discharge&&t.race.discharge>0&&(n*=.5,r.p.Alloy[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),t.tech.q_factory){let e=(u-1)/2+1;n*=e,r.p.Alloy[`ᄂ${z("quantum")}`]=100*(e-1)+"%"}r.p.Alloy[z("hunger")]=100*(G-1)+"%"}Ji("Alloy",n*f)}else r.p.Alloy=0;if(t.city.factory.Polymer&&t.city.factory.Polymer>0){let e=t.race.kindling_kindred||t.race.smoldering?Zs.Polymer.oil_kk[l]*s:Zs.Polymer.oil[l]*s,a=t.race.kindling_kindred||t.race.smoldering?0:Zs.Polymer.lumber[l]*s,i=t.city.factory.Polymer*e,c=t.city.factory.Polymer*a,o=t.city.factory.Polymer;for(;c*f>t.resource.Lumber.amount&&c>0;)c-=a,i-=e,o--;for(;i*f>t.resource.Oil.amount&&i>0;)c-=a,i-=e,o--;r.p.consume.Lumber[z("city_factory")]=-c,r.p.consume.Oil[z("city_factory")]=-i,Ji("Lumber",-c*f),Ji("Oil",-i*f);let n=o*Zs.Polymer.output[l]*s*Oe("psychic_boost","Polymer");t.race.toxic&&(n*=1+di.toxic.vars()[0]/100);let _=Oi("shroomi");_>0&&(n*=1+di.toxic.vars(1)[0]/100*_),t.tech.polymer>=2&&(n*=1.42),"corpocracy"===t.civic.govern.type&&(n*=1+re.corpocracy()[4]/100),"socialist"===t.civic.govern.type&&(n*=1+re.socialist()[1]/100),t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=2&&(n*=1.1);let h=n*p;if(h*=G*d,r.p.Polymer[z("city_factory")]=n+"v",h>0&&(p>0&&(r.p.Polymer[`ᄂ${z("tau_home_colony")}`]=100*(p-1)+"%"),t.race.discharge&&t.race.discharge>0&&(h*=.5,r.p.Polymer[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),t.tech.q_factory)){let e=(u-1)/2+1;h*=e,r.p.Polymer[`ᄂ${z("quantum")}`]=100*(e-1)+"%"}r.p.Polymer[z("hunger")]=100*(G-1)+"%",Ji("Polymer",h*f)}if(i.s_gate&&t.galaxy.raider&&n.raider>0){let e=2.3*n.raider*Oe("psychic_boost","Polymer"),t=It("gxy_chthonian"),a=e*d*t*G*_;r.p.Polymer[z("galaxy_raider")]=e+"v",e>0&&(r.p.Polymer[`ᄂ${z("galaxy_piracy")}`]=-100*(1-t)+"%",r.p.Polymer[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%"),Ji("Polymer",a*f)}if(t.city.factory.Nano&&t.city.factory.Nano>0){let e=Zs.Nano_Tube.coal[l]*s,a=Zs.Nano_Tube.neutronium[l]*s,i=t.city.factory.Nano*e,c=t.city.factory.Nano*a,o=t.city.factory.Nano;for(;c*f>t.resource.Neutronium.amount&&c>0;)c-=a,i-=e,o--;for(;i*f>t.resource.Coal.amount&&i>0;)c-=a,i-=e,o--;r.p.consume.Coal[z("city_factory")]=-i,r.p.consume.Neutronium[z("city_factory")]=-c,Ji("Neutronium",-c*f),Ji("Coal",-i*f);let n=o*Zs.Nano_Tube.output[l]*s*Oe("psychic_boost","Nano_Tube");t.race.toxic&&(n*=1+di.toxic.vars()[1]/100);let _=Oi("shroomi");_>0&&(n*=1+di.toxic.vars(1)[1]/100*_),t.tech.polymer>=2&&(n*=1.42),"corpocracy"===t.civic.govern.type&&(n*=1+re.corpocracy()[4]/100),"socialist"===t.civic.govern.type&&(n*=1+re.socialist()[1]/100),t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=2&&(n*=1.1);let h=n*p;if(h*=G*d,r.p.Nano_Tube[z("city_factory")]=n+"v",h>0){if(p>0&&(r.p.Nano_Tube[`ᄂ${z("tau_home_colony")}`]=100*(p-1)+"%"),t.race.discharge&&t.race.discharge>0&&(h*=.5,r.p.Nano_Tube[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),t.tech.q_factory){let e=(u-1)/2+1;h*=e,r.p.Nano_Tube[`ᄂ${z("quantum")}`]=100*(e-1)+"%"}r.p.Nano_Tube[z("hunger")]=100*(G-1)+"%"}Ji("Nano_Tube",h*f)}else r.p.Nano_Tube=0;if(t.city.factory.Stanene&&t.city.factory.Stanene>0){let e=Zs.Stanene.aluminium[l]*s,a=Zs.Stanene.nano[l]*s,i=t.city.factory.Stanene*e,c=t.city.factory.Stanene*a,o=t.city.factory.Stanene;for(;i*f>t.resource.Aluminium.amount&&i>0;)c-=a,i-=e,o--;for(;c*f>t.resource.Nano_Tube.amount&&c>0;)c-=a,i-=e,o--;r.p.consume.Aluminium[z("city_factory")]=r.p.consume.Aluminium[z("city_factory")]?r.p.consume.Aluminium[z("city_factory")]-i:-i,r.p.consume.Nano_Tube[z("city_factory")]=-c,Ji("Aluminium",-i*f),Ji("Nano_Tube",-c*f);let n=o*Zs.Stanene.output[l]*s*Oe("psychic_boost","Stanene");t.race.toxic&&(n*=1+di.toxic.vars()[1]/100);let _=Oi("shroomi");_>0&&(n*=1+di.toxic.vars(1)[1]/100*_),"corpocracy"===t.civic.govern.type&&(n*=1+re.corpocracy()[4]/100),"socialist"===t.civic.govern.type&&(n*=1+re.socialist()[1]/100),t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=2&&(n*=1.1);let h=n*p;if(h*=G*d,r.p.Stanene[z("city_factory")]=n+"v",h>0){if(p>0&&(r.p.Stanene[`ᄂ${z("tau_home_colony")}`]=100*(p-1)+"%"),t.race.discharge&&t.race.discharge>0&&(h*=.5,r.p.Stanene[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),t.tech.q_factory){let e=(u-1)/2+1;h*=e,r.p.Stanene[`ᄂ${z("quantum")}`]=100*(e-1)+"%"}r.p.Stanene[z("hunger")]=100*(G-1)+"%"}Ji("Stanene",h*f)}else r.p.Stanene=0}if(t.resource.Furs.display&&(r.p.Furs[z("hunger")]=100*(G-1)+"%"),t.resource.Cement.display){let e=t.race.high_pop?3/di.high_pop.vars()[0]:3;"ashland"===t.city.biome&&(e*=Si.ashland.vars()[1]);let a=la(t.civic.cement_worker.workers,"cement_worker")*e,s=la(t.civic.cement_worker.workers,"cement_worker");for(;a*f>t.resource.Stone.amount&&a>0;)a-=e,s--;let o=t.tech.isolation?1+.5*(c.colony||0):1;r.p.consume.Stone[z(t.tech.isolation?"job_cement_worker_bd":"city_cement_plant_bd")]=-a,Ji("Stone",-a*f);let n=t.tech.cement>=4?1.2:1;n*=t.civic.cement_worker.impact,n*=hi(la(t.civic.cement_worker.workers,"cement_worker"),"factory"),"ashland"===t.city.biome&&(n*=Si.ashland.vars()[1]),t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=3&&(n*=1.1);let l=s*n*Oe("psychic_boost","Cement");"corpocracy"===t.civic.govern.type&&(l*=1+re.corpocracy()[4]/100),"socialist"===t.civic.govern.type&&(l*=1+re.socialist()[1]/100);let _=1,p=1;if(t.city.powered&&i.cement_plant){let e=t.tech.cement>=6?.08:.05;_+=i.cement_plant*e,p+=e}let m=1;if(t.tech.ai_core&&i.citadel>0){let e=+(u/1.75).toFixed(1)/100;m+=i.citadel*e}let g=t.tech.isolation?1+.08*c.mining_pit:1,v=t.tech.isolation?1:h;r.p.Cement[z(t.tech.isolation?"job_cement_worker_bd":"city_cement_plant_bd")]=l+"v",l>0&&(t.tech.isolation&&(r.p.Cement[`ᄂ${z("tau_home_colony")}+0`]=100*(o-1)+"%",r.p.Cement[`ᄂ${z("tau_home_mining_pit")}+0`]=100*(g-1)+"%"),r.p.Cement[`ᄂ${z("power")}+0`]=100*(_-1)+"%",r.p.Cement[`ᄂ${z("quarantine")}+0`]=100*(v-1)+"%"),t.race.discharge&&t.race.discharge>0&&i.cement_plant>0&&(_=.5*(_-1)+1,p=.5*(p-1)+1,r.p.Cement[`ᄂ${z("evo_challenge_discharge")}`]="-50%");let y=l*m*o*g;t.city.cement_plant&&(t.city.cement_plant.cnvay=+(y*G*v*d*(p-1)).toFixed(5)),y*=_*G*v*d,t.tech.ai_core&&i.citadel>0&&(r.p.Cement[z("interstellar_citadel_effect_bd")]=100*(m-1)+"%"),r.p.Cement[z("hunger")]=100*(G-1)+"%",Ji("Cement",y*f)}let H=Nc("metal"),W=0,Q=0,Z=0;if(t.city.smelter&&(t.city.smelter.count>0||t.race.cataclysm||t.race.orbit_decayed||t.tech.isolation)){let e=t.city.smelter.count;i.stellar_forge&&t.tech.star_forge&&t.tech.star_forge>=2&&(e+=2*i.stellar_forge),i.hell_forge&&(e+=3*i.hell_forge),i.ore_refinery&&(e+=i.ore_refinery*(t.tech.isolation?12:4)),t.tech.m_smelting&&t.space.hell_smelter&&(e+=2*t.space.hell_smelter.count),(t.race.cataclysm||t.race.orbit_decayed)&&t.space.geothermal&&(e+=t.space.geothermal.on),t.city.smelter.cap=e,t.tech.star_forge>=2?(t.city.smelter.StarCap=2*i.stellar_forge,t.city.smelter.Star=t.city.smelter.StarCap):t.city.smelter.StarCap=0,t.race.forge&&(t.city.smelter.Wood=0,t.city.smelter.Coal=0,t.city.smelter.Oil=t.city.smelter.cap-t.city.smelter.Star-t.city.smelter.Inferno),!t.race.kindling_kindred&&!t.race.smoldering||t.race.evil||(t.city.smelter.Wood=0);let a=t.race.kindling_kindred||t.race.smoldering?.15:.25,s=0;if(["Wood","Coal","Oil","Star","Inferno"].forEach((function(e){s+t.city.smelter[e]>t.city.smelter.cap&&(t.city.smelter[e]=t.city.smelter.cap-s),s+=t.city.smelter[e]})),t.city.smelter.Iron+t.city.smelter.Steel+t.city.smelter.Iridium>t.city.smelter.Wood+t.city.smelter.Coal+t.city.smelter.Oil+t.city.smelter.Star+t.city.smelter.Inferno){let e=t.city.smelter.Wood+t.city.smelter.Coal+t.city.smelter.Oil+t.city.smelter.Star+t.city.smelter.Inferno,a=t.city.smelter.Iron+t.city.smelter.Steel+t.city.smelter.Iridium-e;t.city.smelter.Iron-=a,t.city.smelter.Iron<0&&(a=t.city.smelter.Iron,t.city.smelter.Iron=0,t.city.smelter.Iridium+=a,t.city.smelter.Iridium<0&&(a=t.city.smelter.Iridium,t.city.smelter.Iridium=0),t.city.smelter.Steel+=a,t.city.smelter.Steel<0&&(t.city.smelter.Steel=0))}else if(t.city.smelter.Iron+t.city.smelter.Steel+t.city.smelter.Iridium=2);t.resource.Iridium.display&&e||t.resource.Steel.display&&t.tech.smelting>=2&&!t.race.steelen||t.city.smelter.Iron++}if(t.city.smelter.Star>t.city.smelter.StarCap){let e=t.city.smelter.Star-t.city.smelter.StarCap;t.city.smelter.Star=t.city.smelter.StarCap,t.city.smelter.Oil+=e}let c=t.race.forge?0:t.city.smelter.Wood*(!t.race.evil||t.race.soul_eater&&"wendigo"!==t.race.species?3:1),o=t.race.forge?0:t.city.smelter.Coal*a,n=t.race.forge?0:.35*t.city.smelter.Oil;W=t.city.smelter.Iron;let l=t.city.smelter.Steel;Z=t.city.smelter.Iridium;let u=t.race.forge?t.city.smelter.Wood+t.city.smelter.Coal+t.city.smelter.Oil:t.city.smelter.Oil;Q=t.city.smelter.Star;let _=t.city.smelter.Inferno;for(t.race.steelen&&(W+=l,l=0);W+l+Z>t.city.smelter.Wood+t.city.smelter.Coal+t.city.smelter.Oil+t.city.smelter.Star+t.city.smelter.Inferno;)l>0?l--:W>0?W--:Z--;let p=t.race.soul_eater&&"wendigo"!==t.race.species?"Food":t.race.evil?"Furs":"Lumber";for(;c*f>t.resource[p].amount&&c>0;)c-=!t.race.evil||t.race.soul_eater&&"wendigo"!==t.race.species?3:1,l>0?l--:W>0?W--:Z--;for(;o*f>t.resource.Coal.amount&&o>0;)o-=a,l>0?l--:W>0?W--:Z--;for(;n*f>t.resource.Oil.amount&&n>0;)n-=.35,u--,l>0?l--:W>0?W--:Z--;if(_>0){let e={Oil:35,Coal:50,Infernite:.5};Object.keys(e).forEach((function(a){for(;e[a]*_*f>t.resource[a].amount&&_>0;)_--,l>0?l--:W>0?W--:Z--})),n+=e.Oil*_,o+=e.Coal*_;let a=e.Infernite*_;r.p.consume.Infernite[z("city_smelter")]=-a,Ji("Infernite",-a*f)}W*=t.tech.smelting>=3?1.2:1,Z>0&&(Z=1+.05*Z);let h=D("dirty_jobs",2);h&&(W*=1+h/100,Z*=1+h/100),t.tech.smelting>=7&&(W*=1.25,Z*=1.25),u>0&&(W*=1+u/200,Z*=1+u/200),_>0&&(W*=1+_/125,Z*=1+_/125),Q>0&&(W*=1+Q/500,Z*=1+Q/75),t.race.pyrophobia&&(W*=1-di.pyrophobia.vars()[0]/100,Z*=1-di.pyrophobia.vars()[0]/100);let m=Oi("salamander");if(m>0&&(W*=1.2*m,Z*=1.2*m),Z<1&&(Z=1),t.race.evil?t.race.soul_eater&&"wendigo"!==t.race.species&&!t.race.artifical?r.p.consume.Food[z("city_smelter")]=-c:r.p.consume.Furs[z("city_smelter")]=-c:r.p.consume.Lumber[z("city_smelter")]=-c,r.p.consume.Coal[z("city_smelter")]=-o,r.p.consume.Oil[z("city_smelter")]=-n,Ji(p,-c*f),Ji("Coal",-o*f),Ji("Oil",-n*f),o>0&&t.tech.uranium&&t.tech.uranium>=3){let e=o;t.city.geology.Uranium&&(e*=t.city.geology.Uranium+1);let a=e/65/d*Oe("psychic_boost","Uranium");r.p.Uranium[z("city_coal_ash")]=r.p.Uranium[z("city_coal_ash")]?r.p.Uranium[z("city_coal_ash")]+a:a,Ji("Uranium",e*f/65)}if(t.resource.Steel.display){let e=2*l,a=.25*l;for(;e*f>t.resource.Iron.amount&&e>0||a*f>t.resource.Coal.amount&&a>0;)e-=2,a-=.25,l--;r.p.consume.Coal[z("city_smelter")]-=a,r.p.consume.Iron[z("city_smelter")]=-e,Ji("Iron",-e*f),Ji("Coal",-a*f);let s=1;for(t.stats.achieve.steelen&&t.stats.achieve.steelen.l>=1&&(s*=1+2*t.stats.achieve.steelen.l/100),t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=2&&(s*=1.1),y=4;y<=6;y++)t.tech.smelting>=y&&(s*=1.2);t.tech.smelting>=7&&(s*=1.25),u>0&&(l*=1+u/200),_>0&&(l*=1+_/125),Q&&(l*=1+Q/500),h&&(l*=1+h/100),m>0&&(l*=1.2*m);let i=l*s*Oe("psychic_boost","Steel");t.race.pyrophobia&&(i*=1-di.pyrophobia.vars()[0]/100);let c=i;if(c*=G*d*H.mult,r.p.Steel[z("city_smelter")]=i+"v",r.p.Steel[z("city_shrine")]=(100*(H.mult-1)).toFixed(1)+"%",r.p.Steel[z("hunger")]=100*(G-1)+"%",Ji("Steel",c*f),t.tech.titanium&&t.tech.titanium>=1){let e=i*G*Oe("psychic_boost","Titanium");Q>0&&(c*=1+Q/50),t.city.geology.Titanium&&(c*=t.city.geology.Titanium+1),"oceanic"===t.city.biome&&(c*=Si.oceanic.vars()[1]),c*=H.mult;let a=t.tech.titanium>=3?10:25;Ji("Titanium",c*f/a),r.p.Titanium[z("resource_Steel_name")]=e/a+"v"}}}let V=t.race.truepath?"space":"interstellar";if(t[V].g_factory&&t[V].g_factory.count>0){let e=t.race.truepath?c.g_factory:o.g_factory,a=t[V].g_factory.on,s=a>0?e/a:0,n=a;(t.race.kindling_kindred||t.race.smoldering)&&(t[V].g_factory.Lumber=0),["Oil","Coal","Lumber"].forEach((function(e){n-=t[V].g_factory[e],n<0&&(t[V].g_factory[e]+=n,n=0)}));let l=t[V].g_factory.Lumber+t[V].g_factory.Coal+t[V].g_factory.Oil;if(l>0){let e=350*t[V].g_factory.Lumber*s,a=25*t[V].g_factory.Coal*s,c=15*t[V].g_factory.Oil*s;for(;e*f>t.resource.Lumber.amount&&e>0;)e-=350*s,l--;for(;a*f>t.resource.Coal.amount&&a>0;)a-=25*s,l--;for(;c*f>t.resource.Oil.amount&&c>0;)c-=15*s,l--;l*=Oe("g_factory")*Oe("psychic_boost","Graphene"),r.p.consume.Lumber[z("interstellar_g_factory_bd")]=-e,r.p.consume.Coal[z("interstellar_g_factory_bd")]=-a,r.p.consume.Oil[z("interstellar_g_factory_bd")]=-c,Ji("Lumber",-e*f),Ji("Coal",-a*f),Ji("Oil",-c*f),"corpocracy"===t.civic.govern.type&&(l*=1+re.corpocracy()[4]/100),"socialist"===t.civic.govern.type&&(l*=1+re.socialist()[1]/100);let o=1;t.tech.ai_core>=3&&(o+=+(u/5).toFixed(1)/100*i.citadel);let n=t.race.truepath?mt("spc_titan"):1,p=l*o*_*G*d*n*s;r.p.Graphene[z("interstellar_g_factory_bd")]=l+"v",t.tech.isolation&&l>0&&(p*=S,S>1&&(r.p.Graphene[`ᄂ${z("tau_red_womlings")}+0`]=100*(S-1)+"%")),l>0&&(r.p.Graphene[`ᄂ${z("space_syndicate")}`]=-100*(1-n)+"%",r.p.Graphene[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%"),t.race.discharge&&t.race.discharge>0&&(p*=.5,r.p.Graphene[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),i.citadel>0&&(r.p.Graphene[z("interstellar_citadel_effect_bd")]=100*(o-1)+"%"),r.p.Graphene[z("hunger")]=100*(G-1)+"%",Ji("Graphene",p*f)}else r.p.Graphene=0}if(t.galaxy.vitreloy_plant&&i.vitreloy_plant>0){let e=5e4*i.vitreloy_plant,a=2.5*i.vitreloy_plant,s=100*i.vitreloy_plant,c=i.vitreloy_plant;for(;e*f>t.resource.Money.amount&&e>0;)e-=350,c--;for(;a*f>t.resource.Bolognium.amount&&a>0;)a-=25,c--;for(;s*f>t.resource.Stanene.amount&&s>0;)s-=15,c--;if(c>0){c*=Oe("vitreloy_plant")*Oe("psychic_boost","Vitreloy"),r.p.consume.Money[z("galaxy_vitreloy_plant_bd")]=-e,r.p.consume.Bolognium[z("galaxy_vitreloy_plant_bd")]=-a,r.p.consume.Stanene[z("galaxy_vitreloy_plant_bd")]=-s,Ji("Money",-e*f),Ji("Bolognium",-a*f),Ji("Stanene",-s*f);let i=It("gxy_alien1");r.p.Vitreloy[z("galaxy_vitreloy_plant_bd")]=c+"v",t.race.discharge&&t.race.discharge>0&&(c*=.5,r.p.Vitreloy[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),r.p.Vitreloy[z("hunger")]=100*(G-1)+"%",c>0&&(r.p.Vitreloy[`ᄂ${z("galaxy_piracy")}+0`]=-100*(1-i)+"%",r.p.Vitreloy[`ᄂ${z("space_red_ziggurat_title")}+0`]=100*(_-1)+"%"),Ji("Vitreloy",c*G*d*i*f*_)}}if(i.s_gate&&t.galaxy.raider&&n.raider>0){let e=.05*n.raider*Oe("psychic_boost","Vitreloy"),t=It("gxy_chthonian"),a=e*d*t*G*_;r.p.Vitreloy[z("galaxy_raider")]=e+"v",e>0&&(r.p.Vitreloy[`ᄂ${z("galaxy_piracy")}+1`]=-100*(1-t)+"%",r.p.Vitreloy[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%"),Ji("Vitreloy",a*f)}if(!t.tech.isolation&&t.space.lander&&t.space.crashed_ship&&100===t.space.crashed_ship.count){let e=mt("spc_triton"),a=c.lander*Oe("lander"),s=a*d*e*G;r.p.Cipher[z("space_lander_title")]=a+"v",r.p.Cipher[`ᄂ${z("space_syndicate")}+0`]=-100*(1-e)+"%",r.p.Cipher[`ᄂ${z("hunger")}`]=100*(G-1)+"%",Ji("Cipher",s*f),t.resource.Cipher.display&&t.tech.outer&&2===t.tech.outer&&(t.tech.outer=3,gs())}if(!t.tech.isolation&&t.space.digsite&&100===t.space.digsite.count){t.tech.dig_control||(t.tech.dig_control=1,gs());let e=mt("spc_eris"),a=c.shock_trooper*Oe("shock_trooper"),s=c.tank*Oe("tank");c.shock_trooper&&(r.p.Cipher[z("space_shock_trooper_title")]=a+"v",r.p.Cipher[`ᄂ${z("space_syndicate")}+1`]=-100*(1-e)+"%"),c.tank&&(r.p.Cipher[z("space_tank_title")]=s+"v",r.p.Cipher[`ᄂ${z("space_syndicate")}+2`]=-100*(1-e)+"%"),Ji("Cipher",(a+s)*d*e*f)}if(t.tech.isolation&&t.tauceti.alien_outpost&&i.alien_outpost){let e=Oe("alien_outpost"),t=1+.5*(c.colony||0);r.p.Cipher[z("tech_alien_outpost")]=e+"v",e>0&&(r.p.Cipher[`ᄂ${z("tau_home_colony")}`]=100*(t-1)+"%"),Ji("Cipher",e*d*t*f)}let J={};if(t.tauceti.ore_refinery&&t.tauceti.mining_ship&&t.tech.tau_roid&&t.tech.tau_roid>=4){if(t.tauceti.ore_refinery.max=1e3*t.tauceti.ore_refinery.count,t.tauceti.ore_refinery.fill>0){let e=i.ore_refinery*Oe("ore_refinery");e>t.tauceti.ore_refinery.fill&&(e=t.tauceti.ore_refinery.fill),t.tauceti.ore_refinery.fill-=e*f;let a=t.tech.tau_roid>=5?.6:.64,r=t.tech.tau_roid>=5?.35:.36;J.iron=e*a*(100-t.tauceti.mining_ship.common)/100*Oe("mining_ship_ore","iron")*Oe("psychic_boost","Iron"),J.aluminium=e*a*t.tauceti.mining_ship.common/100*Oe("mining_ship_ore","aluminium")*Oe("psychic_boost","Aluminium"),J.iridium=e*r*(100-t.tauceti.mining_ship.uncommon)/100*Oe("mining_ship_ore","iridium")*Oe("psychic_boost","Iridium"),J.neutronium=e*r*t.tauceti.mining_ship.uncommon/100*Oe("mining_ship_ore","neutronium")*Oe("psychic_boost","Neutronium"),t.tech.tau_roid>=5&&(J.orichalcum=.05*e*(100-t.tauceti.mining_ship.rare)/10*Oe("mining_ship_ore","orichalcum")*Oe("psychic_boost","Orichalcum"),J.elerium=.05*e*t.tauceti.mining_ship.rare/10*Oe("mining_ship_ore","elerium")*Oe("psychic_boost","Elerium"))}let e=c.mining_ship*Oe("mining_ship");t.tauceti.ore_refinery.fill+=e*f,t.tauceti.ore_refinery.fill>t.tauceti.ore_refinery.max&&(t.tauceti.ore_refinery.fill=t.tauceti.ore_refinery.max)}if(t.race.cataclysm||t.race.orbit_decayed){if(t.tech.mars&&c.biodome&&!t.race.kindling_kindred&&!t.race.smoldering){let e=c.biodome*la(t.civic.colonist.workers,"colonist")*Oe("biodome","lumber")*Oe("psychic_boost","Lumber");r.p.Lumber[Zr.space.spc_red.biodome.title()]=e+"v",e>0&&(r.p.Lumber[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%"),r.p.Lumber[z("hunger")]=100*(G-1)+"%",Ji("Lumber",e*G*d*f*_)}}else if(t.race.soul_eater&&"wendigo"!==t.race.species&&t.race.evil){let e=t.tech.military?t.tech.military>=5?t.tech.military-1:t.tech.military:1,a=la(t.civic.hunter.workers,"hunter");a*=hi(a,"hunting"),t.race.servants&&(a+=ua(t.race.servants.jobs.hunter)),a*=e/2,t.race.high_pop&&(a=Pe(a)),a*=Oe("psychic_boost","Lumber");let s=qe(Me(),"hunting")/3;s*=Oe("psychic_boost","Lumber"),r.p.Lumber[z(t.race.unfathomable?"job_raider":"job_hunter")]=a+"v",r.p.Lumber[z("soldiers")]=s+"v",r.p.Lumber[z("hunger")]=100*(G-1)+"%",Ji("Lumber",a*G*d*f),Ji("Lumber",s*G*d*f)}else if(t.race.evil){let e=la(t.civic.lumberjack.workers,"lumberjack");e*=hi(e,"lumberjack"),t.race.servants&&(e+=t.race.servants.jobs.lumberjack),e*=Oe("psychic_boost","Lumber");let a=1;t.city.graveyard&&(a+=.08*t.city.graveyard.count);let s=qe(Me(),"hunting")/5;if(s*=Oe("psychic_boost","Lumber"),r.p.Lumber[z("job_reclaimer")]=e+"v",e>0&&(r.p.Lumber[`ᄂ${z("city_graveyard")}`]=100*(a-1)+"%",r.p.Lumber[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%"),r.p.Lumber[z("soldiers")]=s+"v",s>0&&(r.p.Lumber[`ᄂ${z("quarantine")}+1`]=100*(h-1)+"%"),t.race.forager){let e=1,a=la(t.civic.forager.workers,"forager");t.race.servants&&(a+=t.race.servants.jobs.forager);let s=a*e*.25;r.p.Lumber[z("job_forager")]=s+"v",s>0&&(r.p.Lumber[`ᄂ${z("quarantine")}+2`]=100*(h-1)+"%"),Ji("Lumber",s*G*d*h*f)}r.p.Lumber[z("hunger")]=100*(G-1)+"%",Ji("Lumber",e*G*a*d*h*f),Ji("Lumber",s*G*d*h*f)}else{let e=la(t.civic.lumberjack.workers,"lumberjack");e*=hi(e,"lumberjack"),t.race.servants&&(e+=t.race.servants.jobs.lumberjack),e*="forest"===t.city.biome?Si.forest.vars()[0]:1,e*="savanna"===t.city.biome?Si.savanna.vars()[2]:1,e*="desert"===t.city.biome?Si.desert.vars()[2]:1,e*="swamp"===t.city.biome?Si.swamp.vars()[2]:1,e*="taiga"===t.city.biome?Si.taiga.vars()[0]:1,e*=t.civic.lumberjack.impact,t.race.living_tool?e*=di.living_tool.vars()[0]*(t.tech.science&&t.tech.science>0?.25*t.tech.science:0)+1:e*=1+(t.tech.axe&&t.tech.axe>1?.35*(t.tech.axe-1):0),e*=Oe("psychic_boost","Lumber");let a=1;if(t.city.sawmill){let e=t.tech.saw>=2?.08:.05;a*=t.city.sawmill.count*e+1}let s=1,c=1;t.city.powered&&t.city.sawmill&&i.sawmill&&(s+=.04*i.sawmill,c+=.04);let o=1;t.city.lumber_yard&&(o+=.02*t.city.lumber_yard.count),r.p.Lumber[z("job_lumberjack")]=e+"v",e>0&&(r.p.Lumber[`ᄂ${z("city_lumber_yard")}`]=100*(o-1)+"%",r.p.Lumber[`ᄂ${z("city_sawmill")}`]=100*(a-1)+"%",r.p.Lumber[`ᄂ${z("power")}`]=100*(s-1)+"%",r.p.Lumber[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%"),t.race.discharge&&t.race.discharge>0&&i.sawmill>0&&(s=.5*(s-1)+1,c=.5*(c-1)+1,r.p.Lumber[`ᄂ${z("evo_challenge_discharge")}`]="-50%");let n=e*a*o;if(t.city.sawmill&&(t.city.sawmill.psaw=+(n*G*h*d*(c-1)).toFixed(5)),n*=s*G*h*d,t.race.forager){let e=1,a=la(t.civic.forager.workers,"forager");t.race.servants&&(a+=t.race.servants.jobs.forager);let s=a*e*.25*Oe("psychic_boost","Lumber");r.p.Lumber[z("job_forager")]=s+"v",Ji("Lumber",s*G*d*f)}r.p.Lumber[z("hunger")]=100*(G-1)+"%",Ji("Lumber",n*f)}let Y=t.city.metal_refinery?6*t.city.metal_refinery.count:0;if(Y*=h,t.race.sappy){if(t.tech.mining&&t.resource[t.race.species].amount>0){let e=t.resource[t.race.species].amount*di.sappy.vars()[0]*Oe("psychic_boost","Stone");t.race.high_pop&&(e=Pe(e));let a=Oi("cacti");if(a>0&&(e*=1+.32*a),r.p.Stone[Tc("name")]=e+"v",t.city.hasOwnProperty("basic_housing")){let a=.025*t.city.basic_housing.count;e*=1+a,r.p.Stone[`ᄂ${Ks("small")}`]=100*a+"%"}let s=0;t.civic.hasOwnProperty("garrison")&&(s=t.civic.garrison.workers*di.sappy.vars()[0],t.race.high_pop&&(s=Pe(s)),r.p.Stone[z("soldiers")]=s+"v");let i=(e+s)*G*d;r.p.Stone[z("hunger")]=100*(G-1)+"%",Ji("Stone",i*f)}}else{let e=la(t.civic.quarry_worker.workers,"quarry_worker");e*=hi(e,"miner");let a=Oi("cacti");a>0&&(e*=1+.32*a),t.race.servants&&(e+=t.race.servants.jobs.quarry_worker),e*=t.civic.quarry_worker.impact*Oe("psychic_boost","Stone"),t.race.living_tool?e*=di.living_tool.vars()[0]*(t.tech.science&&t.tech.science>0?.06*t.tech.science:0)+1:e*=1+(t.tech.hammer&&t.tech.hammer>0?.4*t.tech.hammer:0),"desert"===t.city.biome&&(e*=Si.desert.vars()[0]),"swamp"===t.city.biome&&(e*=Si.swamp.vars()[3]),t.tech.explosives&&t.tech.explosives>=2&&(e*=t.tech.explosives>=3?1.75:1.5);let s=0;t.race.smoldering&&t.resource.Chrysotile.display&&t.city.rock_quarry&&(s=e*Oe("psychic_boost","Chrysotile"),e*=(100-t.city.rock_quarry.asbestos)/100,s*=t.city.rock_quarry.asbestos/100);let o=1,n=1,l=1;t.city.rock_quarry&&(t.city.rock_quarry.on&&(o+=.04*i.rock_quarry,n+=.04),l+=.02*t.city.rock_quarry.count),r.p.Stone[z("workers")]=e+"v",e>0&&(r.p.Stone[`ᄂ${z("city_rock_quarry")}`]=100*(l-1)+"%",r.p.Stone[`ᄂ${z("power")}`]=100*(o-1)+"%",r.p.Stone[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%"),t.race.smoldering&&t.resource.Chrysotile.display&&(r.p.Chrysotile[z("workers")]=s+"v",s>0&&(r.p.Chrysotile[`ᄂ${z("city_rock_quarry")}`]=100*(l-1)+"%",r.p.Chrysotile[`ᄂ${z("power")}`]=100*(o-1)+"%")),t.race.discharge&&t.race.discharge>0&&i.rock_quarry>0&&(o=.5*(o-1)+1,n=.5*(n-1)+1,r.p.Stone[`ᄂ${z("evo_challenge_discharge")}`]="-50%",t.race.smoldering&&t.resource.Chrysotile.display&&(r.p.Chrysotile[`ᄂ${z("evo_challenge_discharge")}`]="-50%")),(t.race.cataclysm||t.race.orbit_decayed)&&(t.tech.mars&&c.red_mine&&(e=c.red_mine*la(t.civic.colonist.workers,"colonist")*Oe("red_mine","stone")*Oe("psychic_boost","Stone"),r.p.Stone[z("space_red_mine_title")]=e+"v",e>0&&(r.p.Stone[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%"),t.race.smoldering&&t.resource.Chrysotile.display&&(s=c.red_mine*la(t.civic.colonist.workers,"colonist")*Oe("red_mine","asbestos")*Oe("psychic_boost","Chrysotile"),r.p.Chrysotile[z("space_red_mine_title")]=s+"v",s>0&&(r.p.Chrysotile[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%"),s*=_),e*=_),o=1,n=1,l=1);let u=e*l;if(t.city.rock_quarry&&(t.city.rock_quarry.cnvay=+(u*G*h*d*(n-1)).toFixed(5)),u*=o*G*h*d,t.race.forager&&t.resource.Stone.display){let e=1,a=la(t.civic.forager.workers,"forager");t.race.servants&&(a+=t.race.servants.jobs.forager);let s=a*e*.22*Oe("psychic_boost","Stone");r.p.Stone[z("job_forager")]=s+"v",s>0&&(r.p.Stone[`ᄂ${z("quarantine")}+1`]=100*(h-1)+"%"),Ji("Stone",s*G*d*h*f)}if(r.p.Stone[z("hunger")]=100*(G-1)+"%",Ji("Stone",u*f),t.race.smoldering&&t.resource.Chrysotile.display){let e=s*o*l;e*=G*d,r.p.Chrysotile[z("hunger")]=100*(G-1)+"%",Ji("Chrysotile",e*f)}if(t.city.metal_refinery&&t.city.metal_refinery.count>0||t.race.cataclysm||t.race.orbit_decayed){let a=e*l*(t.race.cataclysm?.16:.08);t.city.geology.Aluminium&&(a*=t.city.geology.Aluminium+1),a*=Oe("psychic_boost","Aluminium");let s=a*H.mult*G*h*d;if(t.city.metal_refinery.cnvay=+(s*(n-1)).toFixed(5),t.city.rock_quarry.almcvy=t.city.metal_refinery.cnvay,s*=o,t.tech.alumina>=2){Y+=6*i.metal_refinery*h;let e=6*h/100;t.city.metal_refinery.pwr=+(s*e).toFixed(5)}s*=1+Y/100,r.p.Aluminium[`${t.race.cataclysm||t.race.orbit_decayed?z("space_red_mine_title"):z("workers")}+1`]=a+"v",a>0&&(r.p.Aluminium[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%"),r.p.Aluminium[z("city_shrine")]=(100*(H.mult-1)).toFixed(1)+"%",r.p.Aluminium[z("hunger")]=100*(G-1)+"%",Ji("Aluminium",s*f)}}if(t.resource.Water.display){if(c.water_freighter){let e=mt("spc_enceladus"),t=Oe("water_freighter")*c.water_freighter*Oe("psychic_boost","Water"),a=t*G*d*e*_;r.p.Water[z("space_water_freighter_title")]=t+"v",t>0&&(r.p.Water[`ᄂ${z("space_syndicate")}`]=-100*(1-e)+"%",r.p.Water[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%",r.p.Water[`ᄂ${z("hunger")}`]=100*(G-1)+"%"),Ji("Water",a*f)}if(t.tech.isolation&&t.tauceti.tau_farm&&i.tau_farm){let e=1+.5*(c.colony||0),t=Oe("tau_farm","water")*i.tau_farm*Oe("psychic_boost","Water"),a=t*d*e;r.p.Water[z("tau_home_tau_farm")]=t+"v",t>0&&(r.p.Water[`ᄂ${z("tau_home_colony")}`]=100*(e-1)+"%"),Ji("Water",a*f)}}if(t.resource.Mana.display){if(t.race.casting&&["farmer","miner","lumberjack","science","factory","army","hunting","crafting"].forEach((function(e){if(t.race.casting[e]&&t.race.casting[e]>0){let a=Xs(t.race.casting[e]);r.p.consume.Mana[z(`modal_pylon_spell_${e}`)]=-a;let s=t.resource.Mana.diff>0?t.resource.Mana.diff*f:0;Ji("Mana",-a*f,!1,s)||t.race.casting[e]--}else delete r.p.consume.Mana[z(`modal_pylon_spell_${e}`)]})),t.city.pylon||t.space.pylon||t.tauceti.pylon){let e=0,a="city_pylon";(t.race.cataclysm||t.race.orbit_decayed)&&t.space.pylon?(e=.005*t.space.pylon.count,a="space_red_pylon"):t.tech.isolation&&t.tauceti.pylon?(e=.0125*t.tauceti.pylon.count,a="tau_home_pylon"):t.city.pylon&&(e=.01*t.city.pylon.count),e*=lc("magic");let s=e*G*d;if(r.p.Mana[z(a)]=e+"v",t.tech.nexus){let e=5*t.tech.nexus;s*=1+e/100,r.p.Mana[`ᄂ${z("arpa_projects_nexus_title")}`]=e+"%"}Ji("Mana",s*f)}if(t.tech.cleric&&t.civic.priest.display){let e=.0025*la(t.civic.priest.workers,"priest");t.race.high_pop&&(e=Pe(e)),e*=lc("magic");let a=e*G*d;r.p.Mana[z("job_priest")]=e+"v",Ji("Mana",a*f)}if("magic"===t.race.universe&&t.civic.scientist.display){let e=.025*la(t.civic.scientist.workers,"scientist");t.race.high_pop&&(e=Pe(e)),e*=lc("magic");let a=e*G*d;r.p.Mana[z("job_wizard")]=e+"v","magocracy"===t.civic.govern.type&&(a*=1+re.magocracy()[0]/100,r.p.Mana[`ᄂ${z("govern_magocracy")}`]=re.magocracy()[0]+"%"),Ji("Mana",a*f)}if("magic"===t.race.universe&&t.tech.syphon){let e=t.tech.syphon/3;e*=lc("magic");let a=e*G*d;r.p.Mana[z("arpa_syphon_title")]=e+"v",Ji("Mana",a*f)}r.p.Mana[z("hunger")]=100*(G-1)+"%"}if(t.resource.Crystal.display){let e=la(t.civic.crystal_miner.workers,"crystal_miner");if(e*=hi(e,"miner"),t.race.servants&&(e+=t.race.servants.jobs.crystal_miner),e*=t.civic.crystal_miner.impact*Oe("psychic_boost","Crystal"),r.p.Crystal[z("job_crystal_miner")]=e+"v","magocracy"===t.civic.govern.type){let t=re.magocracy()[1];e*=1+t/100,r.p.Crystal[`ᄂ${z("govern_magocracy")}`]=`${t}%`}let a=e*G*d;r.p.Crystal[z("hunger")]=100*(G-1)+"%",Ji("Crystal",a*f)}if(t.resource.Copper.display||t.resource.Iron.display){let e=la(t.civic.miner.workers,"miner");e*=hi(e,"miner"),e*=t.civic.miner.impact,t.race.tough&&(e*=1+di.tough.vars()[0]/100);let a=Oi("ogre");a>0&&(e*=1+di.tough.vars(1)[0]/100*a),t.race.industrious&&(e*=1+di.industrious.vars()[0]*t.race.industrious/100),t.city.ptrait.includes("dense")&&(e*=Fi.dense.vars()[0]),t.city.ptrait.includes("permafrost")&&(e*=Fi.permafrost.vars()[0]),t.race.living_tool||(e*=1+(t.tech.pickaxe&&t.tech.pickaxe>0?.15*t.tech.pickaxe:0)),t.tech.explosives&&t.tech.explosives>=2&&(e*=t.tech.explosives>=3?1.4:1.25);let s=1,o=1;if(t.city.mine.on&&(s+=.05*i.mine,o+=1.05),t.resource.Copper.display){let a=1/7;t.tech.copper&&(a*=1.2);let c=e*a*Oe("psychic_boost","Copper");t.city.geology.Copper&&(c*=t.city.geology.Copper+1),"volcanic"===t.city.biome?c*=Si.volcanic.vars()[1]:"ashland"===t.city.biome&&(c*=Si.ashland.vars()[2]);let n=s,l=o;r.p.Copper[z("job_miner")]=c+"v",c>0&&(r.p.Copper[`ᄂ${z("power")}`]=100*(n-1)+"%",r.p.Copper[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%",t.race.discharge&&t.race.discharge>0&&i.mine>0&&(n=.5*(n-1)+1,l=.5*(l-1)+1,r.p.Copper[`ᄂ${z("evo_challenge_discharge")}`]="-50%"));let u=c*H.mult;if(t.city.mine.cpow=+(u*G*h*d*(l-1)).toFixed(5),u*=n*G*h*d,Ji("Copper",u*f),t.race.forager&&t.tech.dowsing){let e=t.tech.dowsing>=2?5:1,a=la(t.civic.forager.workers,"forager");t.race.servants&&(a+=t.race.servants.jobs.forager);let s=a*e*.025*Oe("psychic_boost","Copper");t.city.geology.Copper&&(s*=t.city.geology.Copper+1),"volcanic"===t.city.biome?s*=Si.volcanic.vars()[1]:"ashland"===t.city.biome&&(s*=Si.ashland.vars()[2]),r.p.Copper[z("job_forager")]=s+"v",s>0&&(r.p.Copper[`ᄂ${z("quarantine")}+1`]=100*(h-1)+"%"),Ji("Copper",s*G*d*h*f)}}if(t.resource.Iron.display){let a=e*(1/4)*Oe("psychic_boost","Iron");t.race.iron_allergy&&(a*=1-di.iron_allergy.vars()[0]/100);let o=1+.1*W;t.city.geology.Iron&&(a*=t.city.geology.Iron+1),"volcanic"===t.city.biome?a*=Si.volcanic.vars()[2]:"ashland"===t.city.biome&&(a*=Si.ashland.vars()[2]);let n=0,l=mt("spc_belt");c.iron_ship&&(n=c.iron_ship*Oe("iron_ship")*Oe("psychic_boost","Iron"),n*=l);let u=s,p=s;r.p.Iron[z("job_miner")]=a+"v",a>0&&(r.p.Iron[`ᄂ${z("power")}`]=100*(u-1)+"%",t.race.discharge&&t.race.discharge>0&&i.mine>0&&(u=.5*(u-1)+1,p=.5*(p-1)+1,r.p.Iron[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),r.p.Iron[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%");let g=0,v=0;if(t.tech.isolation&&t.race.lone_survivor){{let e=la(t.civic.pit_miner.workers,"pit_miner");e*=hi(e,"miner");let a=1+.5*(c.colony||0),s=e*Oe("psychic_boost","Iron");s*=Oe("mining_pit","iron"),g=s*a,r.p.Iron[z("job_pit_miner")]=s+"v",s>0&&(r.p.Iron[`ᄂ${z("tau_home_colony")}`]=100*(a-1)+"%")}if(t.tauceti.hasOwnProperty("womling_mine")&&t.tauceti.hasOwnProperty("overseer")){let e=t.tauceti.overseer.prod/100,a=t.tauceti.womling_mine.miners*Oe("womling_mine","iron")*Oe("psychic_boost","Iron");r.p.Iron[z("tau_red_womlings")]=a+"v",v=a*e,a>0&&(r.p.Iron[`ᄂ${z("tau_red_womling_prod_label")}`]=-100*(1-e)+"%")}}let y=J.iron?J.iron*S:0,b=(a*u*h+n*m*_+y+g+v)*o*H.mult;if(t.city.mine.ipow=+(a*h*G*d*(p-1)).toFixed(5),b*=G*d,r.p.Iron[z("job_space_miner")]=n+"v",n>0&&(r.p.Iron[`ᄂ${z("space_syndicate")}`]=-100*(1-l)+"%",r.p.Iron[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%",r.p.Iron[`ᄂ${z("quarantine")}+1`]=100*(m-1)+"%"),J.iron&&J.iron>0&&(r.p.Iron[z("tau_roid_mining_ship")]=J.iron+"v",S>1&&(r.p.Iron[`ᄂ${z("tau_red_womlings")}+0`]=100*(S-1)+"%")),r.p.Iron[z("city_smelter")]=100*(o-1)+"%",r.p.Iron[z("city_shrine")]=(100*(H.mult-1)).toFixed(1)+"%",t.race.forager&&t.tech.dowsing){let e=t.tech.dowsing>=2?5:1,a=la(t.civic.forager.workers,"forager");t.race.servants&&(a+=t.race.servants.jobs.forager);let s=a*e*.035*Oe("psychic_boost","Iron");t.city.geology.Iron&&(s*=t.city.geology.Iron+1),"volcanic"===t.city.biome?s*=Si.volcanic.vars()[2]:"ashland"===t.city.biome&&(s*=Si.ashland.vars()[2]),r.p.Iron[z("job_forager")]=s+"v",Ji("Iron",s*G*d*f)}if(r.p.Iron[z("hunger")]=100*(G-1)+"%",Ji("Iron",b*f),t.tech.titanium&&t.tech.titanium>=2){let e=(c.iron_ship?Pe(la(t.civic.miner.workers,"miner"))/4+c.iron_ship/2:la(t.civic.miner.workers,"miner")/4)*W*.1;b=e*d,Q>0&&(b*=1+Q/50),t.city.geology.Titanium&&(b*=t.city.geology.Titanium+1),"oceanic"===t.city.biome&&(b*=Si.oceanic.vars()[0]),b*=H.mult*Oe("psychic_boost","Titanium");let a=t.tech.titanium>=3?10:25;Ji("Titanium",b*f/a),r.p.Titanium[z("resource_Iron_name")]=e/a+"v"}}if(t.race.sappy){if(t.city.metal_refinery&&t.city.metal_refinery.count>0||t.race.cataclysm||t.race.orbit_decayed){let a=0;t.race.cataclysm||t.race.orbit_decayed?t.tech.mars&&c.red_mine&&(a=c.red_mine*la(t.civic.colonist.workers,"colonist")*Oe("red_mine","aluminium")):a=e*s*.088,t.city.geology.Aluminium&&(a*=t.city.geology.Aluminium+1),a*=Oe("psychic_boost","Aluminium");let o=a*H.mult*G*d;t.tech.alumina>=2&&(Y+=6*i.metal_refinery),o*=1+Y/100,r.p.Aluminium[`${t.race.cataclysm||t.race.orbit_decayed?z("space_red_mine_title"):z("job_miner")}+2`]=a+"v",(t.race.cataclysm||t.race.orbit_decayed&&a>0&&_>0)&&(o*=_,r.p.Aluminium[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%"),r.p.Aluminium[z("city_shrine")]=100*(H.mult-1)+"%",r.p.Aluminium[z("hunger")]=100*(G-1)+"%",Ji("Aluminium",o*f)}if(t.race.smoldering&&t.resource.Chrysotile.display){let a=e/2*Oe("psychic_boost","Chrysotile"),c=s;r.p.Chrysotile[z("job_miner")]=a+"v",a>0&&(r.p.Chrysotile[`ᄂ${z("power")}`]=100*(c-1)+"%",t.race.discharge&&t.race.discharge>0&&i.mine>0&&(c=.5*(c-1)+1,r.p.Chrysotile[`ᄂ${z("evo_challenge_discharge")}`]="-50%"));let o=a*c;o*=G*d,r.p.Chrysotile[z("hunger")]=100*(G-1)+"%",Ji("Chrysotile",o*f)}}}if(t.interstellar.mining_droid&&F.alum>0){let e=2.75*F.alum*Oe("psychic_boost","Aluminium"),t=e*H.mult*d*_;t*=1+Y/100,r.p.Aluminium[z("interstellar_mining_droid_title")]=e+"v",e>0&&(r.p.Aluminium[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%"),Ji("Aluminium",t*f)}if(t.resource.Aluminium.display&&t.space.titan_mine){let e=mt("spc_titan"),a=i.ai_colonist?la(t.civic.titan_colonist.workers,"titan_colonist")+ua(i.ai_colonist):la(t.civic.titan_colonist.workers,"titan_colonist"),s=Oe("titan_mine","aluminium")*c.titan_mine*a*Oe("psychic_boost","Aluminium"),o=s*H.mult*d*m*e*_;o*=1+Y/100,r.p.Aluminium[`${z("city_mine")}+0`]=+s.toFixed(3)+"v",s>0&&(r.p.Aluminium[`ᄂ${z("space_syndicate")}`]=-100*(1-e)+"%",r.p.Aluminium[`ᄂ${z("space_red_ziggurat_title")}+2`]=100*(_-1)+"%",r.p.Aluminium[`ᄂ${z("quarantine")}+2`]=100*(m-1)+"%"),Ji("Aluminium",o*f)}if(t.resource.Aluminium.display&&J.aluminium&&J.aluminium>0){let e=J.aluminium*H.mult*d*S;e*=1+Y/100,r.p.Aluminium[z("tau_roid_mining_ship")]=J.aluminium+"v",S>1&&(r.p.Aluminium[`ᄂ${z("tau_red_womlings")}+0`]=100*(S-1)+"%"),Ji("Aluminium",e*f)}if(Y>0&&(r.p.Aluminium[z("city_metal_refinery")]=Y+"%",r.p.Aluminium[`ᄂ${z("quarantine")}+1`]=100*(h-1)+"%"),c.red_mine&&c.red_mine>0){let e=mt("spc_red"),a=c.red_mine*la(t.civic.colonist.workers,"colonist")*Oe("red_mine","copper").f;a*=Oe("psychic_boost","Copper"),r.p.Copper[z("space_red_mine_desc_bd",[ea().red])]=a+"v",a>0&&(r.p.Copper[`ᄂ${z("space_syndicate")}`]=-100*(1-e)+"%",r.p.Copper[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%",r.p.Copper[`ᄂ${z("quarantine")}+1`]=100*(m-1)+"%"),Ji("Copper",a*H.mult*f*d*m*G*e*_);let s=c.red_mine*la(t.civic.colonist.workers,"colonist")*G*Oe("red_mine","titanium").f;s*=Oe("psychic_boost","Titanium"),r.p.Titanium[z("space_red_mine_desc_bd",[ea().red])]=s+"v",s>0&&(r.p.Titanium[`ᄂ${z("space_syndicate")}`]=-100*(1-e)+"%",r.p.Titanium[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%",r.p.Titanium[`ᄂ${z("quarantine")}+0`]=100*(m-1)+"%"),Ji("Titanium",s*H.mult*f*d*m*e*_)}if(Lc()&&(r.p.Copper[z("city_shrine")]=(100*(H.mult-1)).toFixed(1)+"%",r.p.Titanium[z("city_shrine")]=(100*(H.mult-1)).toFixed(1)+"%"),r.p.Copper[z("hunger")]=100*(G-1)+"%",r.p.Uranium.hasOwnProperty(z("city_coal_ash"))&&(r.p.Uranium[z("city_coal_ash")]=r.p.Uranium[z("city_coal_ash")]+"v"),t.resource.Coal.display){let e=la(t.civic.coal_miner.workers,"coal_miner");e*=hi(e,"miner"),t.race.tough&&(e*=1+di.tough.vars()[0]/100);let a=Oi("ogre");a>0&&(e*=1+di.tough.vars(1)[0]/100*a),t.race.resilient&&(e*=1+di.resilient.vars()[0]*t.race.resilient/100),t.tech.explosives&&t.tech.explosives>=2&&(e*=t.tech.explosives>=3?1.4:1.25),t.city.geology.Coal&&(e*=t.city.geology.Coal+1);let s=1,o=1;t.city.coal_mine.on&&(s+=.05*i.coal_mine,o+=.05),e*=t.civic.coal_miner.impact*Oe("psychic_boost","Coal"),r.p.Coal[z("job_coal_miner")]=e+"v",e>0&&(r.p.Coal[`ᄂ${z("power")}`]=100*(s-1)+"%",r.p.Coal[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%"),t.race.discharge&&t.race.discharge>0&&i.coal_mine>0&&(s=.5*(s-1)+1,o=.5*(o-1)+1,r.p.Coal[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),t.race.cataclysm&&c.iridium_mine&&(e=c.iridium_mine*Oe("iridium_mine","coal"),e*=t.civic.coal_miner.impact*Oe("psychic_boost","Coal"),r.p.Coal[z("space_moon_iridium_mine_title")]=e+"v",e>0&&(r.p.Coal[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%",r.p.Coal[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%"),s=1*_);let n=e;if(t.city.coal_mine.cpow=+(n*G*h*d*(o-1)).toFixed(5),n*=s*G*h*d,r.p.Coal[z("hunger")]=100*(G-1)+"%",t.interstellar.mining_droid&&F.coal>0){let e=3.75*F.coal*Oe("psychic_boost","Coal"),t=e*d*_;r.p.Coal[z("interstellar_mining_droid_title")]=e+"v",e>0&&(r.p.Coal[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%"),Ji("Coal",t*f)}if(Ji("Coal",n*f),t.resource.Uranium.display){let e=n/(t.race.cataclysm?48:115)*Oe("psychic_boost","Uranium");t.city.coal_mine.upow=+(t.city.coal_mine.cpow/(t.race.cataclysm?48:115)).toFixed(5),t.city.geology.Uranium&&(e*=t.city.geology.Uranium+1),Ji("Uranium",e*f),r.p.Uranium[t.race.cataclysm?z("space_moon_iridium_mine_title"):z("job_coal_miner")]=e/d+"v"}}if(t.interstellar.mining_droid&&F.uran>0){let e=.12*F.uran*Oe("psychic_boost","Uranium"),t=e*d*_;r.p.Uranium[z("interstellar_mining_droid_title")]=e+"v",e>0&&(r.p.Uranium[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%"),Ji("Uranium",t*f)}if(t.space.uranium_mine&&i.uranium_mine){let e=mt("spc_kuiper"),a=i.uranium_mine*Oe("uranium_mine")*Oe("psychic_boost","Uranium"),s=a*d*m*e*_;r.p.Uranium[z("space_kuiper_mine",[t.resource.Uranium.name])]=a+"v",a>0&&(r.p.Uranium[`ᄂ${z("space_syndicate")}`]=-100*(1-e)+"%",r.p.Uranium[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%",r.p.Uranium[`ᄂ${z("quarantine")}+0`]=100*(m-1)+"%"),Ji("Uranium",s*f)}if(t.resource.Oil.display){let e=0;if(t.tauceti.whaling_station&&t.tauceti.whaling_ship){if(t.tauceti.whaling_station.max=750*t.tauceti.whaling_station.count,t.tauceti.whaling_station.fill>0){let a=i.whaling_station*Oe("whaling_station");a>t.tauceti.whaling_station.fill&&(a=t.tauceti.whaling_station.fill),t.tauceti.whaling_station.fill-=a*f,e=a*Oe("whaling_ship_oil")*Oe("psychic_boost","Oil")}let a=c.whaling_ship*Oe("whaling_ship");t.tauceti.whaling_station.fill+=a*f,t.tauceti.whaling_station.fill>t.tauceti.whaling_station.max&&(t.tauceti.whaling_station.fill=t.tauceti.whaling_station.max)}let a=t.space.oil_extractor?i.oil_extractor*Oe("oil_extractor"):0,s=t.city.oil_well?Oe("oil_well")*t.city.oil_well.count:0;a*=Oe("psychic_boost","Oil"),s*=Oe("psychic_boost","Oil");let o=mt("spc_gas_moon"),n=s*h+a*m*o*_+e*S;n*=G*d,t.space.oil_extractor&&(t.space.oil_extractor.lpmod=Oe("oil_extractor")*m*o*_),r.p.Oil[z("city_oil_well")]=s+"v",s>0&&(r.p.Oil[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%"),r.p.Oil[z("space_gas_moon_oil_extractor_title")]=a+"v",a>0&&(r.p.Oil[`ᄂ${z("space_syndicate")}`]=-100*(1-o)+"%",r.p.Oil[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%",r.p.Oil[`ᄂ${z("quarantine")}+1`]=100*(m-1)+"%"),r.p.Oil[z("tau_roid_whaling_ship")]=e+"v",S>1&&(r.p.Oil[`ᄂ${z("tau_red_womlings")}+0`]=100*(S-1)+"%"),r.p.Oil[z("hunger")]=100*(G-1)+"%",Ji("Oil",n*f)}if(c.iridium_mine){let e=c.iridium_mine*Oe("iridium_mine","iridium").f;e*=Oe("psychic_boost","Iridium");let t=mt("spc_moon"),a=e*G*H.mult*d*t*m*Z*_;r.p.Iridium[z("space_moon_iridium_mine_title")]=e+"v",e>0&&(r.p.Iridium[`ᄂ${z("city_smelter")}+0`]=100*(Z-1)+"%",r.p.Iridium[`ᄂ${z("space_syndicate")}+0`]=-100*(1-t)+"%",r.p.Iridium[`ᄂ${z("space_red_ziggurat_title")}+0`]=100*(_-1)+"%",r.p.Iridium[`ᄂ${z("quarantine")}+0`]=100*(m-1)+"%"),Ji("Iridium",a*f)}if(c.iridium_ship){let e=c.iridium_ship*Oe("iridium_ship");e*=Oe("psychic_boost","Iridium");let t=mt("spc_belt"),a=e*G*H.mult*d*t*m*Z*_;r.p.Iridium[z("job_space_miner")]=e+"v",e>0&&(r.p.Iridium[`ᄂ${z("city_smelter")}+1`]=100*(Z-1)+"%",r.p.Iridium[`ᄂ${z("space_syndicate")}+1`]=-100*(1-t)+"%",r.p.Iridium[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%",r.p.Iridium[`ᄂ${z("quarantine")}+1`]=100*(m-1)+"%"),Ji("Iridium",a*f)}if(i.s_gate&&t.resource.Adamantite.display&&t.galaxy.armed_miner&&n.armed_miner>0){let e=.65*n.armed_miner*Oe("psychic_boost","Iridium"),t=1+.1*n.ore_processor,a=It("gxy_alien2"),s=e*d*a*t*G*H.mult*Z*_;r.p.Iridium[z("galaxy_armed_miner_bd")]=e+"v",e>0&&(r.p.Iridium[`ᄂ${z("galaxy_ore_processor")}`]=-100*(1-t)+"%",r.p.Iridium[`ᄂ${z("city_smelter")}+2`]=100*(Z-1)+"%",r.p.Iridium[`ᄂ${z("galaxy_piracy")}`]=-100*(1-a)+"%",r.p.Iridium[`ᄂ${z("space_red_ziggurat_title")}+2`]=100*(_-1)+"%"),Ji("Iridium",s*f)}if(t.resource.Iridium.display&&J.iridium&&J.iridium>0){let e=J.iridium*H.mult*d*Z*G*S;r.p.Iridium[z("tau_roid_mining_ship")]=J.iridium+"v",r.p.Iridium[`ᄂ${z("city_smelter")}+3`]=100*(Z-1)+"%",S>1&&(r.p.Iridium[`ᄂ${z("tau_red_womlings")}+0`]=100*(S-1)+"%"),Ji("Iridium",e*f)}if(t.space.moon_base&&c.helium_mine){let e=c.helium_mine*Oe("helium_mine").f;e*=Oe("psychic_boost","Helium_3");let t=mt("spc_moon"),a=e*G*d*t*m*_;r.p.Helium_3[z("space_moon_helium_mine_title")]=e+"v",e>0&&(r.p.Helium_3[`ᄂ${z("space_syndicate")}+0`]=-100*(1-t)+"%",r.p.Helium_3[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%",r.p.Helium_3[`ᄂ${z("quarantine")}+0`]=100*(m-1)+"%"),Ji("Helium_3",a*f)}if(t.space.gas_mining&&i.gas_mining){let e=i.gas_mining*Oe("gas_mining");e*=Oe("psychic_boost","Helium_3");let t=mt("spc_gas"),a=e*G*d*t*m*_;r.p.Helium_3[z("space_gas_mining_title")]=e+"v",e>0&&(r.p.Helium_3[`ᄂ${z("space_syndicate")}+1`]=-100*(1-t)+"%",r.p.Helium_3[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%",r.p.Helium_3[`ᄂ${z("quarantine")}+1`]=100*(m-1)+"%"),Ji("Helium_3",a*f)}if(i.refueling_station){let e=i.refueling_station*Oe("refueling_station");e*=Oe("psychic_boost","Helium_3");let t=e*G*d*S;r.p.Helium_3[z("tau_gas_refueling_station_title")]=e+"v",S>1&&(r.p.Helium_3[`ᄂ${z("tau_red_womlings")}+0`]=100*(S-1)+"%"),Ji("Helium_3",t*f)}if(t.interstellar.harvester&&o.harvester){let e=o.harvester*Oe("harvester","helium");e*=Oe("psychic_boost","Helium_3");let a=e*G*d*_;if(r.p.Helium_3[z("interstellar_harvester_title")]=e+"v",e>0&&(r.p.Helium_3[`ᄂ${z("space_red_ziggurat_title")}+2`]=100*(_-1)+"%",t.race.discharge&&t.race.discharge>0&&(a*=.5,r.p.Helium_3[`ᄂ${z("evo_challenge_discharge")}`]="-50%")),Ji("Helium_3",a*f),t.tech.ram_scoop){let e=o.harvester*Oe("harvester","deuterium");e*=Oe("psychic_boost","Deuterium");let t=e*G*d*_;r.p.Deuterium[z("interstellar_harvester_title")]=e+"v",e>0&&(r.p.Deuterium[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%"),Ji("Deuterium",t*f),r.p.Deuterium[z("hunger")]=100*(G-1)+"%"}}if(i.s_gate&&t.galaxy.raider&&n.raider>0){let e=.65*n.raider*Oe("psychic_boost","Deuterium"),t=It("gxy_chthonian"),a=e*d*t*G*_;r.p.Deuterium[z("galaxy_raider")]=e+"v",e>0&&(r.p.Deuterium[`ᄂ${z("galaxy_piracy")}`]=-100*(1-t)+"%",r.p.Deuterium[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%"),Ji("Deuterium",a*f)}if(r.p.Helium_3[z("hunger")]=100*(G-1)+"%",i.outpost){let e=Oe("outpost",!0),a=Oe("psychic_boost","Neutronium");r.p.Neutronium[z("space_gas_moon_outpost_bd")]=e.b*a*i.outpost+"v",t.tech.drone&&(r.p.Neutronium[`ᄂ${z("tech_worker_drone")}`]=100*e.d+"%");let s=mt("spc_gas_moon"),c=i.outpost*e.n*a*G*d*m*s*_;t.space.outpost.lpmod=e.n*a*G*d*m*s*_,e.b>0&&(r.p.Neutronium[`ᄂ${z("space_syndicate")}+0`]=-100*(1-s)+"%",r.p.Neutronium[`ᄂ${z("space_red_ziggurat_title")}+0`]=100*(_-1)+"%",r.p.Neutronium[`ᄂ${z("quarantine")}+0`]=100*(m-1)+"%",t.race.discharge&&t.race.discharge>0&&(c*=.5,t.space.outpost.lpmod*=.5,r.p.Neutronium[`ᄂ${z("evo_challenge_discharge")}+0`]="-50%")),Ji("Neutronium",c*f)}if(i.neutron_miner){let e=i.neutron_miner*Oe("neutron_miner")*Oe("psychic_boost","Neutronium"),a=e*G*d*_;r.p.Neutronium[z("interstellar_neutron_miner_bd")]=e+"v",t.interstellar.neutron_miner.lpmod=Oe("neutron_miner")*G*d*_,e>0&&(r.p.Neutronium[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%",t.race.discharge&&t.race.discharge>0&&(a*=.5,t.interstellar.neutron_miner.lpmod*=.5,r.p.Neutronium[`ᄂ${z("evo_challenge_discharge")}+1`]="-50%")),Ji("Neutronium",a*f)}if(i.s_gate&&t.galaxy.raider&&n.raider>0){let e=.8*n.raider*Oe("psychic_boost","Neutronium"),t=It("gxy_chthonian"),a=e*d*t*G*_;r.p.Neutronium[z("galaxy_raider")]=e+"v",e>0&&(r.p.Neutronium[`ᄂ${z("galaxy_piracy")}`]=-100*(1-t)+"%",r.p.Neutronium[`ᄂ${z("space_red_ziggurat_title")}+2`]=100*(_-1)+"%"),Ji("Neutronium",a*f)}if(t.space.neutronium_mine&&i.neutronium_mine){let e=mt("spc_kuiper"),a=i.neutronium_mine*Oe("neutronium_mine")*Oe("psychic_boost","Neutronium"),s=a*d*m*e*_;r.p.Neutronium[z("space_kuiper_mine",[t.resource.Neutronium.name])]=a+"v",a>0&&(r.p.Neutronium[`ᄂ${z("space_syndicate")}+1`]=-100*(1-e)+"%",r.p.Neutronium[`ᄂ${z("space_red_ziggurat_title")}+3`]=100*(_-1)+"%",r.p.Neutronium[`ᄂ${z("quarantine")}+1`]=100*(m-1)+"%"),Ji("Neutronium",s*f)}if(t.resource.Neutronium.display&&J.neutronium&&J.neutronium>0){let e=J.neutronium*d*S;r.p.Neutronium[z("tau_roid_mining_ship")]=J.neutronium+"v",S>1&&(r.p.Neutronium[`ᄂ${z("tau_red_womlings")}+0`]=100*(S-1)+"%"),Ji("Neutronium",e*f)}if(c.elerium_ship){let e=c.elerium_ship*Oe("elerium_ship")*Oe("psychic_boost","Elerium"),a=mt("spc_belt"),s=e*G*d*m*a*_;r.p.Elerium[z("job_space_miner")]=e+"v",e>0&&(r.p.Elerium[`ᄂ${z("space_syndicate")}+0`]=-100*(1-a)+"%",r.p.Elerium[`ᄂ${z("space_red_ziggurat_title")}+0`]=100*(_-1)+"%",r.p.Elerium[`ᄂ${z("quarantine")}+0`]=100*(m-1)+"%",t.race.discharge&&t.race.discharge>0&&(s*=.75,r.p.Elerium[`ᄂ${z("evo_challenge_discharge")}`]="-25%")),Ji("Elerium",s*f)}if(o.elerium_prospector){let e=o.elerium_prospector*Oe("elerium_prospector")*Oe("psychic_boost","Elerium"),t=e*G*d*_;r.p.Elerium[z("interstellar_elerium_prospector_bd")]=e+"v",e>0&&(r.p.Elerium[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%"),Ji("Elerium",t*f)}if(t.space.elerium_mine&&i.elerium_mine){let e=mt("spc_kuiper"),a=i.elerium_mine*Oe("elerium_mine")*Oe("psychic_boost","Elerium"),s=a*d*m*e*G*_;r.p.Elerium[z("space_kuiper_mine",[t.resource.Elerium.name])]=a+"v",a>0&&(r.p.Elerium[`ᄂ${z("space_syndicate")}+1`]=-100*(1-e)+"%",r.p.Elerium[`ᄂ${z("space_red_ziggurat_title")}+2`]=100*(_-1)+"%",r.p.Elerium[`ᄂ${z("quarantine")}+1`]=100*(m-1)+"%"),Ji("Elerium",s*f)}if(t.resource.Elerium.display&&J.elerium&&J.elerium>0){let e=J.elerium*d*S;r.p.Elerium[z("tau_roid_mining_ship")]=J.elerium+"v",S>1&&(r.p.Elerium[`ᄂ${z("tau_red_womlings")}+0`]=100*(S-1)+"%"),Ji("Elerium",e*f)}if(r.p.Elerium[z("hunger")]=100*(G-1)+"%",t.resource.Adamantite.display&&t.interstellar.mining_droid&&F.adam>0){let e=.075*F.adam*Oe("psychic_boost","Adamantite"),a=e*H.mult*d*_;if(r.p.Adamantite[z("interstellar_mining_droid_title")]=e+"v",e>0){if(t.interstellar.processing&&o.processing){let e=.12;t.tech.ai_core&&t.tech.ai_core>=2&&i.citadel>0&&(e+=.02*i.citadel);let s=o.processing*e;a*=1+s,r.p.Adamantite[`ᄂ${z("interstellar_processing_title")}`]=100*s+"%",t.race.discharge&&t.race.discharge>0&&(a*=.5,r.p.Adamantite[`ᄂ${z("evo_challenge_discharge")}`]="-50%")}r.p.Adamantite[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%"}Ji("Adamantite",a*f)}if(i.s_gate&&t.resource.Adamantite.display&&t.galaxy.armed_miner&&n.armed_miner>0){let e=.23*n.armed_miner*Oe("psychic_boost","Adamantite"),t=1+.1*n.ore_processor,a=It("gxy_alien2"),s=e*d*a*t*H.mult*_;r.p.Adamantite[z("galaxy_armed_miner_bd")]=e+"v",e>0&&(r.p.Adamantite[`ᄂ${z("galaxy_ore_processor")}`]=-100*(1-t)+"%",r.p.Adamantite[`ᄂ${z("galaxy_piracy")}`]=-100*(1-a)+"%",r.p.Adamantite[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%"),Ji("Adamantite",s*f)}if(t.resource.Adamantite.display&&t.space.titan_mine){let e=mt("spc_titan"),a=i.ai_colonist?la(t.civic.titan_colonist.workers,"titan_colonist")+ua(i.ai_colonist):la(t.civic.titan_colonist.workers,"titan_colonist"),s=Oe("titan_mine","adamantite")*c.titan_mine*a*Oe("psychic_boost","Adamantite"),o=s*H.mult*d*m*e*_;r.p.Adamantite[z("city_mine")]=s+"v",s>0&&(r.p.Adamantite[`ᄂ${z("space_syndicate")}`]=-100*(1-e)+"%",r.p.Adamantite[`ᄂ${z("space_red_ziggurat_title")}+2`]=100*(_-1)+"%",r.p.Adamantite[`ᄂ${z("quarantine")}+0`]=100*(m-1)+"%"),Ji("Adamantite",o*f)}if(t.resource.Infernite.display){if(t.civic.hell_surveyor.workers>0){let e=t.tech.infernite>=3?.015:.01,a=la(t.civic.hell_surveyor.workers,"hell_surveyor")*e*Oe("psychic_boost","Infernite"),s=1;if(t.tech.infernite>=2&&i.sensor_drone){let e=t.tech.infernite>=4?t.tech.infernite>=6?.5:.2:.1;s=1+i.sensor_drone*e}let c=a*s*d;r.p.Infernite[z("job_hell_surveyor")]=a+"v",r.p.Infernite[`ᄂ${z("portal_sensor_drone_title")}`]=100*(s-1)+"%",Ji("Infernite",c*f)}if(i.infernite_mine){let e=Oe("infernite_mine"),a=i.infernite_mine*e*Oe("psychic_boost","Infernite"),s=a*d;t.portal.infernite_mine.lpmod=e*d,r.p.Infernite[z("city_mine")]=a+"v",Ji("Infernite",s*f)}}if(i.s_gate&&t.resource.Bolognium.display&&t.galaxy.bolognium_ship&&n.bolognium_ship>0){let e=n.bolognium_ship*Oe("bolognium_ship")*Oe("psychic_boost","Bolognium"),a=It("gxy_gateway"),s=e*d*a*_;r.p.Bolognium[z("galaxy_bolognium_ship")]=e+"v",e>0&&(r.p.Bolognium[`ᄂ${z("galaxy_piracy")}+0`]=-100*(1-a)+"%",r.p.Bolognium[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%",t.race.discharge&&t.race.discharge>0&&(s*=.5,r.p.Bolognium[`ᄂ${z("evo_challenge_discharge")}+0`]="-50%")),Ji("Bolognium",s*f)}if(t.civic.pit_miner.display)if(tt()){let e=la(t.civic.pit_miner.workers,"pit_miner");e*=hi(e,"miner");let a=1+.5*(c.colony||0);{let t=e*Oe("psychic_boost","Bolognium");t*=Oe("mining_pit","bolognium");let s=t*d*a;r.p.Bolognium[z("job_pit_miner")]=t+"v",t>0&&(r.p.Bolognium[`ᄂ${z("tau_home_colony")}`]=100*(a-1)+"%"),Ji("Bolognium",s*f)}{let t=e*Oe("psychic_boost","Stone");t*=Oe("mining_pit","stone");let s=t*d*a;r.p.Stone[z("job_pit_miner")]=t+"v",t>0&&(r.p.Stone[`ᄂ${z("tau_home_colony")}`]=100*(a-1)+"%"),Ji("Stone",s*f)}{let t=e*Oe("psychic_boost","Adamantite");t*=Oe("mining_pit","adamantite");let s=t*H.mult*d*a;r.p.Adamantite[z("job_pit_miner")]=t+"v",t>0&&(r.p.Adamantite[`ᄂ${z("tau_home_colony")}`]=100*(a-1)+"%"),Ji("Adamantite",s*f)}if(t.tech.isolation){{let t=e*Oe("psychic_boost","Copper");t*=Oe("mining_pit","copper");let s=t*H.mult*d*a;r.p.Copper[z("job_pit_miner")]=t+"v",t>0&&(r.p.Copper[`ᄂ${z("tau_home_colony")}`]=100*(a-1)+"%"),Ji("Copper",s*f)}{let t=e*Oe("psychic_boost","Coal");t*=Oe("mining_pit","coal");let s=t*d*a;r.p.Coal[z("job_pit_miner")]=t+"v",t>0&&(r.p.Coal[`ᄂ${z("tau_home_colony")}`]=100*(a-1)+"%"),Ji("Coal",s*f)}if(t.race.lone_survivor){let t=e*Oe("psychic_boost","Aluminium");t*=Oe("mining_pit","aluminium");let s=t*H.mult*d*a;r.p.Aluminium[z("job_pit_miner")]=t+"v",t>0&&(r.p.Aluminium[`ᄂ${z("tau_home_colony")}`]=100*(a-1)+"%"),Ji("Aluminium",s*f)}{let t=e*Oe("psychic_boost","Chrysotile");t*=Oe("mining_pit","chrysotile");let s=t*d*a*G;r.p.Chrysotile[z("job_pit_miner")]=t+"v",t>0&&(r.p.Chrysotile[`ᄂ${z("tau_home_colony")}`]=100*(a-1)+"%",r.p.Chrysotile[z("hunger")]=100*(G-1)+"%"),Ji("Chrysotile",s*f)}}}else{let e={},a=la(t.civic.pit_miner.workers,"pit_miner");a*=hi(a,"miner"),a*=Oe("mining_pit","materials");let s=1+.5*(c.colony||0),i=a*d*s;e[z("job_pit_miner")]=a+"v",a>0&&(e[`ᄂ${z("tau_home_colony")}`]=100*(s-1)+"%"),r.p.Materials=e,Ji("Materials",i*f)}if(t.tauceti.tau_farm&&i.tau_farm){let e=1+.5*(c.colony||0);if(!t.race.kindling_kindred&&!t.race.smoldering){let t=Oe("tau_farm","lumber")*i.tau_farm*Oe("psychic_boost","Lumber"),a=t*d*e;r.p.Lumber[z("tau_home_tau_farm")]=t+"v",t>0&&(r.p.Lumber[`ᄂ${z("tau_home_colony")}`]=100*(e-1)+"%"),Ji("Lumber",a*f)}}if(Lc()&&(r.p.Adamantite[z("city_shrine")]=(100*(H.mult-1)).toFixed(1)+"%"),i.s_gate&&t.resource.Bolognium.display&&t.galaxy.armed_miner&&n.armed_miner>0){let e=.032*n.armed_miner*Oe("psychic_boost","Bolognium"),a=1+.1*n.ore_processor,s=It("gxy_alien2"),i=e*d*s*a*_;r.p.Bolognium[z("galaxy_armed_miner_bd")]=e+"v",e>0&&(r.p.Bolognium[`ᄂ${z("galaxy_ore_processor")}`]=-100*(1-a)+"%",r.p.Bolognium[`ᄂ${z("galaxy_piracy")}+1`]=-100*(1-s)+"%",r.p.Bolognium[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%",t.race.discharge&&t.race.discharge>0&&(i*=.5,r.p.Bolognium[`ᄂ${z("evo_challenge_discharge")}+1`]="-50%")),Ji("Bolognium",i*f)}if(i.s_gate&&t.resource.Orichalcum.display&&t.galaxy.excavator&&i.excavator>0){let e=i.excavator*Oe("excavator")*Oe("psychic_boost","Orichalcum"),a=It("gxy_chthonian"),s=e*d*a*_;t.galaxy.excavator.lpmod=Oe("excavator")*d*a*_,r.p.Orichalcum[z("galaxy_excavator")]=e+"v",e>0&&(r.p.Orichalcum[`ᄂ${z("galaxy_piracy")}`]=-100*(1-a)+"%",r.p.Orichalcum[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%",t.race.discharge&&t.race.discharge>0&&(s*=.5,t.galaxy.excavator.lpmod*=.5,r.p.Orichalcum[`ᄂ${z("evo_challenge_discharge")}`]="-50%")),Ji("Orichalcum",s*f)}if(t.space.orichalcum_mine&&i.orichalcum_mine){let e=mt("spc_kuiper"),a=i.orichalcum_mine*Oe("orichalcum_mine")*Oe("psychic_boost","Orichalcum"),s=a*d*m*e*_;r.p.Orichalcum[z("space_kuiper_mine",[t.resource.Orichalcum.name])]=a+"v",a>0&&(r.p.Orichalcum[`ᄂ${z("space_syndicate")}`]=-100*(1-e)+"%",r.p.Orichalcum[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%",r.p.Orichalcum[`ᄂ${z("quarantine")}+0`]=100*(m-1)+"%"),Ji("Orichalcum",s*f)}if(t.resource.Orichalcum.display&&J.orichalcum&&J.orichalcum>0){let e=J.orichalcum*d*S;r.p.Orichalcum[z("tau_roid_mining_ship")]=J.orichalcum+"v",S>1&&(r.p.Orichalcum[`ᄂ${z("tau_red_womlings")}+0`]=100*(S-1)+"%"),Ji("Orichalcum",e*f)}if(t.race.truepath&&t.tech.tau_red&&t.tech.tau_red>=5&&t.tauceti.womling_mine&&t.tauceti.overseer){let e=t.tauceti.womling_mine.miners*Oe("womling_mine","unobtainium")*Oe("psychic_boost","Unobtainium"),a=t.tauceti.overseer.prod/100,s=e*a*d;if(r.p.Unobtainium[z("tau_red_womlings")]=e+"v",e>0&&(r.p.Unobtainium[`ᄂ${z("tau_red_womling_prod_label")}`]=-100*(1-a)+"%"),Ji("Unobtainium",s*f),t.tech.isolation){let e=t.tauceti.womling_mine.miners*Oe("womling_mine","uranium")*Oe("psychic_boost","Uranium");r.p.Uranium[z("tau_red_womlings")]=e+"v";let s=e*a*d;e>0&&(r.p.Uranium[`ᄂ${z("tau_red_womling_prod_label")}`]=-100*(1-a)+"%"),Ji("Uranium",s*f);let i=t.tauceti.womling_mine.miners*Oe("womling_mine","titanium")*Oe("psychic_boost","Titanium");r.p.Titanium[z("tau_red_womlings")]=i+"v";let c=i*a*H.mult*d;if(i>0&&(r.p.Titanium[`ᄂ${z("tau_red_womling_prod_label")}`]=-100*(1-a)+"%"),Ji("Titanium",c*f),t.race.lone_survivor){let e=t.tauceti.womling_mine.miners*Oe("womling_mine","copper")*Oe("psychic_boost","Copper");r.p.Copper[z("tau_red_womlings")]=e+"v";let s=e*a*H.mult*d;s>0&&(r.p.Copper[`ᄂ${z("tau_red_womling_prod_label")}`]=-100*(1-a)+"%"),Ji("Copper",s*f);let i=t.tauceti.womling_mine.miners*Oe("womling_mine","aluminium")*Oe("psychic_boost","Aluminium");r.p.Aluminium[z("tau_red_womlings")]=i+"v";let c=i*a*H.mult*d;i>0&&(r.p.Aluminium[`ᄂ${z("tau_red_womling_prod_label")}`]=-100*(1-a)+"%"),Ji("Aluminium",c*f);let o=t.tauceti.womling_mine.miners*Oe("womling_mine","iridium")*Oe("psychic_boost","Iridium");r.p.Iridium[z("tau_red_womlings")]=o+"v";let n=o*a*H.mult*d;o>0&&(r.p.Iridium[`ᄂ${z("tau_red_womling_prod_label")}`]=-100*(1-a)+"%"),Ji("Iridium",n*f);let l=t.tauceti.womling_mine.miners*Oe("womling_mine","neutronium")*Oe("psychic_boost","Neutronium");r.p.Neutronium[z("tau_red_womlings")]=l+"v";let u=l*a*G*d;l>0&&(r.p.Neutronium[`ᄂ${z("tau_red_womling_prod_label")}`]=-100*(1-a)+"%"),Ji("Neutronium",u*f)}}}r.p.Neutronium[z("hunger")]=100*(G-1)+"%",Lc()&&(r.p.Iridium[z("city_shrine")]=(100*(H.mult-1)).toFixed(1)+"%"),r.p.Iridium[z("hunger")]=100*(G-1)+"%";let X=R?R*d:0;if(t.tech.currency>=1){let e=t.resource[t.race.species].amount+t.civic.garrison.workers-t.civic.unemployed.workers;if(t.race.high_pop&&(e=Pe(e)),e*=t.race.truepath?.2:.4,t.race.greedy&&(e*=1-di.greedy.vars()[0]/100),t.tech.isolation&&(e*=15),e*=Oe("psychic_cash"),x){if(t.tech.banking&&t.tech.banking>=2){let a=+la(t.civic.banker.impact,"banker");t.tech.banking>=10&&(a+=.02*t.tech.stock_exchange),t.race.truthful&&(a*=1-di.truthful.vars()[0]/100),"republic"===t.civic.govern.type&&(a*=1+re.republic()[0]/100),t.race.high_pop&&(a=Pe(a)),e*=1+t.civic.banker.workers*a}}else e/=2;e*=t.civic.taxes.tax_rate/20,"oligarchy"===t.civic.govern.type&&(e*=1-re.oligarchy()[0]/100),"corpocracy"===t.civic.govern.type&&(e*=.5),"socialist"===t.civic.govern.type&&(e*=1-re.socialist()[3]/100),t.race.banana&&(e*=.05);let a=1;if(t.tech.anthropology&&t.tech.anthropology>=4)if(t.race.truepath){let e=t.resource[t.race.species].amount*t.city.temple.count*.08;r.p.Money[z("city_temple")]=e+"v",Ji("Money",+(e*d*f).toFixed(2))}else a+=.025*(t.race.cataclysm||t.race.orbit_decayed?t.space.ziggurat?t.space.ziggurat.count:0:t.city.temple.count);let s=0;if(!t.tech.world_control&&"federation"!==t.civic.govern.type)for(let a=0;a<3;a++)t.civic.foreign[`gov${a}`].buy&&(s+=.2*e);let i=Nc("tax"),c=(e-s)*a*i.mult;c*=d,r.p.Money[z("morale_tax")]=e+"v",e>0&&(r.p.Money[`ᄂ${z("civics_spy_purchase_bd")}`]=-s+"v",r.p.Money[t.race.cataclysm||t.race.orbit_decayed?`ᄂ${z("space_red_ziggurat_title")}`:`ᄂ${z("city_temple")}`]=100*(a-1)+"%",r.p.Money[`ᄂ${z("city_shrine")}`]=100*(i.mult-1)+"%"),r.p.Money[z("city_factory")]=R+"v",t.race.discharge&&t.race.discharge>0&&R>0&&(r.p.Money[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),Ji("Money",+(c*f).toFixed(2)),X+=c}if(t.race.truepath&&t.tauceti.overseer){let e=(t.tauceti.overseer.loyal+t.tauceti.overseer.morale)/200,a=t.tauceti.overseer.pop;i.womling_station&&(a+=2*i.womling_station);let s=a*e*(t.tech.isolation?25:12),c=i.tau_cultural_center?1+.08*i.tau_cultural_center:1,o=s*d*c;r.p.Money[z("tau_red_womlings")]=s+"v",r.p.Money[`ᄂ${z("tech_cultural_center")}`]=100*(c-1)+"%",Ji("Money",+(o*f).toFixed(2))}if(t.tech.gambling&&(i.casino||i.spc_casino||i.tauceti_casino)){let e=0;i.casino&&(e+=i.casino),i.spc_casino&&(e+=i.spc_casino),i.tauceti_casino&&(e+=i.tauceti_casino);let a=Math.log2(1+t.resource[t.race.species].amount),s=2.5;t.race.gambler&&(s*=1+di.gambler.vars()[0]*t.race.gambler/100),a*=s,t.tech.gambling>=2&&(a*=t.tech.gambling>=5?2:1.5),t.tech.stock_exchange&&t.tech.gambling>=4&&(a*=1+.01*t.tech.stock_exchange),"corpocracy"===t.civic.govern.type&&(a*=1+re.corpocracy()[0]/100),"socialist"===t.civic.govern.type&&(a*=1-re.socialist()[3]/100),t.race.inflation&&(a*=1+t.race.inflation/1250),t.tech.isolation&&(a*=1.25,t.tech.iso_gambling&&(a*=1+.05*la(t.civic.banker.workers,"banker"))),a*=Oe("psychic_cash");let c=D("racketeer",1);c&&(a*=1+c/100),a*=e,r.p.Money[z("city_casino")]=a+"v",Ji("Money",+(a*f*d*G).toFixed(2)),X+=a*d*G}if(t.city.tourist_center){let e=0,s=t.tech.monument&&t.tech.monument>=3&&i.s_gate?3:1;t.city.amphitheatre&&(e+=t.city.tourist_center.on*t.city.amphitheatre.count*s),t.city.casino&&(e+=t.city.tourist_center.on*t.city.casino.count*5*s),t.space.spc_casino&&(e+=t.city.tourist_center.on*t.space.spc_casino.count*5*s),t.tech.monuments&&(e+=t.city.tourist_center.on*t.tech.monuments*2*s),t.city.trade&&t.stats.achieve.banana&&t.stats.achieve.banana.l>=4&&(e+=t.city.tourist_center.on*t.city.trade.count*3*s);let c=D("pious",1);c&&t.city.temple&&(e+=t.city.tourist_center.on*t.city.temple.count*c*s),"corpocracy"===t.civic.govern.type&&(e*=1+re.corpocracy()[2]/100),"socialist"===t.civic.govern.type&&(e*=1-re.socialist()[3]/100),"aquarius"===a&&(e*=1+U("aquarius")[0]/100),e*=Oe("psychic_cash"),r.p.Money[z("tech_tourism")]=Math.round(e)+"v","aquarius"===a&&(r.p.Money[`ᄂ${z("sign_aquarius")}`]=U("aquarius")[0]+"%"),Ji("Money",+(e*f*d*G).toFixed(2)),X+=e*d*G}if(t.tauceti.tau_cultural_center){let e=0;t.tauceti.tauceti_casino&&(e+=i.tau_cultural_center*i.tauceti_casino*20),t.tech.monuments&&(e+=i.tau_cultural_center*t.tech.monuments*5),t.tech.tau_culture&&t.tech.tau_culture>=2&&(e+=i.tau_cultural_center*c.colony*15),"corpocracy"===t.civic.govern.type?e*=1+re.corpocracy()[2]/100:"socialist"===t.civic.govern.type&&(e*=1-re.socialist()[3]/100),e*=Oe("psychic_cash"),r.p.Money[z("tech_cultural_center")]=Math.round(e)+"v","aquarius"===a&&(e*=1+U("aquarius")[0]/100,e[`ᄂ${z("sign_aquarius")}`]=U("aquarius")[0]+"%"),Ji("Money",+(e*f*d*G).toFixed(2)),X+=e*d*G}if(t.tech.tau_junksale){let e=40*c.womling_village,t=i.tau_cultural_center?1+.08*i.tau_cultural_center:1;r.p.Money[z("tau_red_womling_village")]=Math.round(e)+"v",r.p.Money[`ᄂ${z("tech_cultural_center")}+1`]=100*(t-1)+"%",Ji("Money",+(e*t*f*d*G).toFixed(2)),X+=e*t*d*G}{let e=D("racketeer",0);if(e){let t=-Math.round(X*(e/100));r.p.consume.Money[z("gov_trait_racketeer_bd")]=t,Ji("Money",+(t*f).toFixed(2))}}{let e=D("pious",0);if(e){let t=-Math.round(X*(e/100));r.p.consume.Money[z("gov_trait_pious_bd")]=t,Ji("Money",+(t*f).toFixed(2))}}if(t.tech.foundry){let e=t.race.resourceful?1-di.resourceful.vars()[0]/100:1;Oi("arraak")>0&&di.resourceful.vars(1)[0];let a=Xa(),s={};er("","",!0),Object.keys(a).forEach((function(i){if("Thermite"===i&&!Ec("summer"))return;r.p[i]={};let c=la(t.city.foundry[i],"craftsman");t.race.servants&&t.race.servants.hasOwnProperty("sjobs")&&t.race.servants.sjobs.hasOwnProperty(i)&&(c+=ua(t.race.servants.sjobs[i]));let o=er(i,"auto").multiplier,n=t.genes.crafty?2:1,l=Math.floor(t.resource[a[i][0].r].amount/(a[i][0].a*n*e/140));for(let r=1;r0&&(r.p.consume[e][z("job_craftsman")]=-s[e])}))}!t.settings.showResearch&&(t.resource.Lumber.amount>=5||t.resource.Stone.amount>=6)&&(t.settings.showResearch=!0),t.city.power_total=-C,t.city.power=O,t.city.power<0?($("#powerMeter").addClass("low"),$("#powerMeter").removeClass("neutral"),$("#powerMeter").removeClass("high")):t.city.power>0?($("#powerMeter").removeClass("low"),$("#powerMeter").removeClass("neutral"),$("#powerMeter").addClass("high")):($("#powerMeter").removeClass("low"),$("#powerMeter").addClass("neutral"),$("#powerMeter").removeClass("high")),i.world_controller&&i.world_controller>0?0===t.tech.wsc&&(t.tech.wsc=1,gs()):0!==t.tech.wsc&&(t.tech.wsc=0,gs()),t.tech.portal>=2&&(t.portal.fortress.garrison>0?t.tech.portal_guard=1:t.tech.portal_guard=0),t.race.decay&&Object.keys(Va).forEach((function(e){if(t.resource[e].amount>50){let a=+((t.resource[e].amount-50)*(.001*Va[e])).toFixed(3);Ji(e,-a*f),r.p.consume[e][z("evo_challenge_decay")]=-a}else delete r.p.consume[e][z("evo_challenge_decay")]})),xo&&(t.tech.piracy&&Ht(),t.settings.portal.ruins&&(ic({el:"#srprtl_ruins"},"update"),ic({el:"#foundry"},"update")),t.settings.portal.gate&&ic({el:"#srprtl_gate"},"update"))}if(t.civic.garrison&&t.civic.garrison.workers=2?.08:.05;t.blood.lust&&(a+=.002*t.blood.lust);let r=D("militant",0);r&&(a*=1+r/100),e*=1+(t.race.orbit_decayed&&t.space.space_barracks?t.space.space_barracks.on:t.city.boot_camp.count)*a}t.race.beast&&(e*=1+di.beast.vars()[2]/100),t.civic.garrison.rate=e*f,t.race.brute&&(t.civic.garrison.rate+=di.brute.vars()[1]/40*f);let a=Oi("orc");a>0&&(t.civic.garrison.rate+=di.brute.vars(1)[1]/40*a*f),t.civic.garrison.progress+=t.civic.garrison.rate,t.civic.garrison.progress>=100&&(t.civic.garrison.progress=0,t.civic.garrison.workers++,t.portal.fortress&&t.portal.fortress.assigned&&t.portal.fortress.garrison0?($("#portal-carport .count").hasClass("has-text-alert")||$("#portal-carport .count").addClass("has-text-alert"),t.portal.carport.repair++,t.portal.carport.repair>=Zr.portal.prtl_fortress.carport.repair()&&(t.portal.carport.repair=0,t.portal.carport.damaged--)):$("#portal-carport .count").hasClass("has-text-alert")&&$("#portal-carport .count").removeClass("has-text-alert")),Object.keys(t.resource).forEach((function(e){(t.resource[e].rate>0||0===t.resource[e].rate&&-1===t.resource[e].max)&&function(e,a){let s=1e3;if(t.race.slow){let e=1+di.slow.vars()[0]/100;s=Math.floor(s*e)}if(t.race.hyper){let e=1-di.hyper.vars()[0]/100;s=Math.floor(s*e)}t.resource[e].diff=+(t.resource[e].delta/(a/s)).toFixed(2),t.resource[e].delta=0,t.resource[e].hasOwnProperty("gen")&&t.resource[e].hasOwnProperty("gen_d")&&(t.resource[e].gen=+(t.resource[e].gen_d/(a/s)).toFixed(2),t.resource[e].gen_d=0);let i=$(`#res${e} .diff`);t.race.decay?t.resource[e].diff<0?t.resource[e].diff>=r.p.consume[e][z("evo_challenge_decay")]?i.hasClass("has-text-warning")||(i.removeClass("has-text-danger"),i.addClass("has-text-warning")):i.hasClass("has-text-danger")||(i.removeClass("has-text-warning"),i.addClass("has-text-danger")):t.resource[e].diff>=0&&(i.hasClass("has-text-danger")||i.hasClass("has-text-warning"))&&(i.removeClass("has-text-danger"),i.removeClass("has-text-warning")):t.resource[e].diff<0&&!i.hasClass("has-text-danger")?i.addClass("has-text-danger"):t.resource[e].diff>=0&&i.hasClass("has-text-danger")&&i.removeClass("has-text-danger")}(e,P.mt)})),t.settings.expose&&(window.evolve||fo(),vo()),Ec("easter").active)for(y=1;y<=18;y++)$(`#egg${y}`).length>0&&!$(`#egg${y}`).hasClass("binded")&&(kc(y),$(`#egg${y}`).addClass("binded"));if(Ec("halloween").active){for(y=1;y<=7;y++)$(`#treat${y}`).length>0&&!$(`#treat${y}`).hasClass("binded")&&(Mc(y,!1),$(`#treat${y}`).addClass("binded"));for(y=1;y<=7;y++)$(`#trick${y}`).length>0&&!$(`#trick${y}`).hasClass("binded")&&(Mc(y,!0),$(`#trick${y}`).addClass("binded"))}xo=!1}();break;case"mid":!function(){const e=W();if("protoplasm"===t.race.species){let e=100;t.stats.achieve.mass_extinction&&t.stats.achieve.mass_extinction.l>1&&(e+=50*(t.stats.achieve.mass_extinction.l-1));var a={RNA:e,DNA:e};if(t.evolution.membrane){let e=t.evolution.mitochondria?5*t.evolution.mitochondria.count+5:5;a.RNA+=t.evolution.membrane.count*e}if(t.evolution.eukaryotic_cell){let e=t.evolution.mitochondria?10*t.evolution.mitochondria.count+10:10;a.DNA+=t.evolution.eukaryotic_cell.count*e}t.resource.RNA.max=a.RNA,t.resource.DNA.max=a.DNA,Object.keys(Zr.evolution).forEach((function(e){if(Zr.evolution[e]&&Zr.evolution[e].cost){let t=Zr.evolution[e],a=$("#"+t.id);a.length>0&&(js(t)?a.hasClass("cna")&&a.removeClass("cna"):a.hasClass("cna")||a.addClass("cna"),js(t,!0)?a.hasClass("cnam")&&a.removeClass("cnam"):a.hasClass("cnam")||a.addClass("cnam"))}}))}else{a={Money:1e3,Slave:0,Mana:0,Energy:100,Sus:100,Knowledge:t.stats.achieve.extinct_junker&&t.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};var s={unemployed:-1,hunter:-1,forager:-1,farmer:-1,lumberjack:-1,quarry_worker:-1,crystal_miner:-1,scavenger:-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(t.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):t.race.lone_survivor&&(a.Money+=1e9,a.Knowledge+=1e5,a.Food+=9e3,a.Water+=1e4,a.Elerium+=999),t.stats.feat.adept&&t.stats.achieve.whitehole&&t.stats.achieve.whitehole.l>0){let e=Math.min(t.stats.achieve.whitehole.l,t.stats.feat.adept);a.Lumber+=60*e,a.Stone+=60*e}t.race.hasOwnProperty("psychicPowers")&&t.race.psychicPowers.hasOwnProperty("channel")&&(a.Energy-=t.race.psychicPowers.channel.boost,a.Energy-=t.race.psychicPowers.channel.assault,a.Energy-=t.race.psychicPowers.channel.cash,a.Energy<0&&(a.Energy=100,t.race.psychicPowers.channel.boost=0,t.race.psychicPowers.channel.assault=0,t.race.psychicPowers.channel.cash=0));var d={[z("base")]:a.Money+"v"},_={},p={},h={[z("base")]:a.Mana+"v"},m={[z("base")]:a.Mana+"v"},f={[z("base")]:a.Knowledge+"v"},v={},y={},b={},w={[z("base")]:a.Food+"v"},x={[z("base")]:a.Lumber+"v"},k={[z("base")]:a.Stone+"v"},q={[z("base")]:a.Chrysotile+"v"},M={[z("base")]:a.Crystal+"v"},P={[z("base")]:a.Furs+"v"},O={[z("base")]:a.Copper+"v"},C={[z("base")]:a.Iron+"v"},j={[z("base")]:a.Cement+"v"},S={[z("base")]:a.Coal+"v"},F={[z("base")]:a.Oil+"v"},A={[z("base")]:a.Uranium+"v"},T={[z("base")]:a.Steel+"v"},E={[z("base")]:a.Aluminium+"v"},I={[z("base")]:a.Titanium+"v"},K={[z("base")]:a.Alloy+"v"},L={[z("base")]:a.Polymer+"v"},N={[z("base")]:a.Iridium+"v"},B={[z("base")]:a.Helium_3+"v"},G={[z("base")]:a.Water+"v"},R={[z("base")]:a.Deuterium+"v"},H={[z("base")]:a.Neutronium+"v"},Q={[z("base")]:a.Adamantite+"v"},Z={[z("base")]:a.Infernite+"v"},V={[z("base")]:a.Elerium+"v"},J={[z("base")]:a.Nano_Tube+"v"},Y={[z("base")]:a.Graphene+"v"},X={[z("base")]:a.Stanene+"v"},ee={[z("base")]:a.Bolognium+"v"},ae={[z("base")]:a.Vitreloy+"v"},re={[z("base")]:a.Orichalcum+"v"},se={[z("base")]:a.Unobtainium+"v"},ie={[z("base")]:a.Cipher+"v"},ce={[z("base")]:a.Nanite+"v"},oe={[z("base")]:a.Materials+"v"};if(r.c={Money:d,[t.race.species]:_,Slave:p,Mana:h,Sus:m,Knowledge:f,Zen:v,Crates:y,Containers:b,Food:w,Lumber:x,Stone:k,Chrysotile:q,Crystal:M,Furs:P,Copper:O,Iron:C,Cement:j,Coal:S,Oil:F,Uranium:A,Steel:T,Aluminium:E,Titanium:I,Alloy:K,Polymer:L,Iridium:N,Helium_3:B,Water:G,Deuterium:R,Neutronium:H,Adamantite:Q,Infernite:Z,Elerium:V,Nano_Tube:J,Graphene:Y,Stanene:X,Bolognium:ee,Vitreloy:ae,Orichalcum:re,Unobtainium:se,Nanite:ce,Cipher:ie,Materials:oe},a[t.race.species]=0,t.race.unfathomable&&t.city.captive_housing){let e=t.tech.military?t.tech.military>=5?t.tech.military-1:t.tech.military:1,a=la(t.civic.hunter.workers,"hunter")*e;a*=hi(a,"hunting"),t.race.swift&&(a*=1+di.swift.vars()[1]/100),t.race.servants&&(a+=t.race.servants.jobs.hunter*e);let r=0,s=0,i=[];if(t.city.hasOwnProperty("surfaceDwellers"))for(let e=0;e0&&i.push(e)}let c=Math.round(40/di.unfathomable.vars()[1]);if(r=2&&t.civic.torturer.workers>0&&i.length>0&&Math.rand(0,Math.ceil((s+1)**1.45))0&&(t.race.psychicPowers.boostTime--,(t.race.psychicPowers.boostTime<0||t.race.psychicPowers.boostTime>360)&&(t.race.psychicPowers.boostTime=0)),t.race.psychicPowers&&t.race.psychicPowers.assaultTime&&t.race.psychicPowers.assaultTime>0&&(t.race.psychicPowers.assaultTime--,(t.race.psychicPowers.assaultTime<0||t.race.psychicPowers.assaultTime>360)&&(t.race.psychicPowers.assaultTime=0)),t.race.psychicPowers&&t.race.psychicPowers.cash&&t.race.psychicPowers.cash>0&&(t.race.psychicPowers.cash--,(t.race.psychicPowers.cash<0||t.race.psychicPowers.cash>360)&&(t.race.psychicPowers.cash=0))),t.city.nanite_factory){let e=t.city.nanite_factory.count*Nr(2500);a.Nanite+=e,ce[z("city_nanite_factory")]=e+"v"}if(i.transmitter&&t.race.artifical){let e=i.transmitter*Nr(100);a.Food+=e,w[z("city_transmitter")]=e+"v"}if(t.city.pylon||t.space.pylon||t.tauceti.pylon){let e=0,r="city_pylon";(t.race.cataclysm||t.race.orbit_decayed)&&t.space.pylon?(e=Nr(2)*t.space.pylon.count,r="space_red_pylon"):t.tech.isolation&&t.tauceti.pylon?(e=Nr(2)*t.tauceti.pylon.count,r="tau_home_pylon"):t.city.pylon&&(e=Nr(5)*t.city.pylon.count),a.Mana+=e,h[z(r)]=e+"v"}if(t.city.captive_housing){let e=t.city.captive_housing.count;t.city.captive_housing.raceCap=e*(t.tech.unfathomable&&t.tech.unfathomable>=3?3:2),t.city.captive_housing.cattleCap=5*e}if(t.city.farm&&t.tech.farm){let e=t.city.farm.count*Zr.city.farm.citizens();a[t.race.species]+=e,_[z("city_farm")]=e+"v"}if(t.city.wharf){let e=t.tech.world_control?15:10;t.tech.particles&&t.tech.particles>=2&&(e*=2),a.Crates+=t.city.wharf.count*e,y[z("city_wharf")]=t.city.wharf.count*e+"v",a.Containers+=t.city.wharf.count*e,b[z("city_wharf")]=t.city.wharf.count*e+"v"}if(t.space.munitions_depot){let e=25;a.Crates+=t.space.munitions_depot.count*e,y[z("tech_munitions_depot")]=t.space.munitions_depot.count*e+"v",a.Containers+=t.space.munitions_depot.count*e,b[z("tech_munitions_depot")]=t.space.munitions_depot.count*e+"v"}if(t.interstellar.cargo_yard){a.Crates+=50*t.interstellar.cargo_yard.count,y[z("interstellar_cargo_yard_title")]=50*t.interstellar.cargo_yard.count+"v",a.Containers+=50*t.interstellar.cargo_yard.count,b[z("interstellar_cargo_yard_title")]=50*t.interstellar.cargo_yard.count+"v";let e=t.interstellar.cargo_yard.count*Nr(200);a.Neutronium+=e,H[z("interstellar_cargo_yard_title")]=e+"v",e=t.interstellar.cargo_yard.count*Nr(150),a.Infernite+=e,Z[z("interstellar_cargo_yard_title")]=e+"v"}if(t.interstellar.neutron_miner&&i.neutron_miner){let e=i.neutron_miner*Nr(500);a.Neutronium+=e,H[z("interstellar_neutron_miner_title")]=e+"v"}if(t.city.storage_yard){let e=t.tech.container>=3?20:10;t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=1&&(e+=10),t.tech.world_control&&(e+=10),t.tech.particles&&t.tech.particles>=2&&(e*=2),a.Crates+=t.city.storage_yard.count*e,y[z("city_storage_yard")]=t.city.storage_yard.count*e+"v"}if(t.space.garage){let e=t.tech.particles>=4?20+t.tech.supercollider:20;(t.tech.world_control||t.race.cataclysm)&&(e+=10),a.Containers+=t.space.garage.count*e,b[z("space_red_garage_title")]=t.space.garage.count*e+"v",(t.race.cataclysm||t.race.orbit_decayed)&&(a.Crates+=t.space.garage.count*e,y[z("space_red_garage_title")]=t.space.garage.count*e+"v")}if(t.tech.tp_depot&&(a.Containers+=50*t.tech.tp_depot,b[z("galaxy_gateway_depot")]=50*t.tech.tp_depot+"v",a.Crates+=50*t.tech.tp_depot,y[z("galaxy_gateway_depot")]=50*t.tech.tp_depot+"v"),t.city.warehouse){let e=t.tech.steel_container>=2?20:10;t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=2&&(e+=10),t.tech.world_control&&(e+=10),t.tech.particles&&t.tech.particles>=2&&(e*=2),a.Containers+=t.city.warehouse.count*e,b[z("city_warehouse")]=t.city.warehouse.count*e+"v"}if(t.city.rock_quarry){let e=os(t.city.rock_quarry.count*Nr(100));a.Stone+=e,k[z("city_rock_quarry")]=e+"v",a.Chrysotile+=e,q[z("city_rock_quarry")]=e+"v"}if(t.city.lumber_yard){let e=os(t.city.lumber_yard.count*Nr(100));a.Lumber+=e,x[z("city_lumber_yard")]=e+"v"}else if(t.city.graveyard){let e=os(t.city.graveyard.count*Nr(100));a.Lumber+=e,x[z("city_graveyard")]=e+"v"}if(t.city.sawmill){let e=os(t.city.sawmill.count*Nr(200));a.Lumber+=e,x[z("city_sawmill")]=e+"v"}if(t.city.mine&&(s.miner+=ua(t.city.mine.count)),t.city.coal_mine&&(s.coal_miner+=ua(t.city.coal_mine.count)),t.city.bank&&(s.banker+=ua(t.city.bank.count)),t.city.amphitheatre){let e=D("athleticism",1);s.entertainer+=ua(e?t.city.amphitheatre.count*e:t.city.amphitheatre.count)}if(t.city.casino&&(s.entertainer+=ua(t.city.casino.count)),t.space.spc_casino&&(s.entertainer+=ua(t.space.spc_casino.count),t.race.orbit_decayed&&(s.banker+=ua(t.space.spc_casino.count))),t.tauceti.tauceti_casino&&(s.entertainer+=ua(t.tauceti.tauceti_casino.count),t.tech.isolation)){s.banker+=ua(t.tauceti.tauceti_casino.count);let e=i.tauceti_casino*Zr.tauceti.tau_home.tauceti_casino.citizens();a[t.race.species]+=e,_[z("city_casino")]=e+"v"}if(t.galaxy.resort&&(s.entertainer+=ua(2*i.resort)),t.city.cement_plant&&(s.cement_worker+=ua(2*t.city.cement_plant.count)),t.race.orbit_decayed&&i.red_factory&&(s.cement_worker+=ua(i.red_factory)),t.race.parasite&&!t.tech.isolation&&(s.garrison+=ua(2)),t.city.garrison&&(s.garrison+=t.city.garrison.on*(t.tech.military>=5?ua(3):ua(2)),t.race.chameleon&&(s.garrison-=t.city.garrison.on)),t.space.space_barracks){let e=t.tech.marines>=2?ua(4):ua(2);s.garrison+=t.space.space_barracks.on*e}if(t.interstellar.cruiser&&(s.garrison+=o.cruiser*ua(3)),i.s_gate&&t.galaxy.starbase){let e=t.tech.marines>=2?ua(8):ua(5);s.garrison+=i.starbase*e}if(t.race.orbit_decayed&&t.space.hasOwnProperty("red_mine")&&(s.miner+=ua(c.red_mine),s.coal_miner+=ua(c.red_mine)),!t.tech.world_control){let e=ua("federation"===t.civic.govern.type?15:20);for(let a=2;a>=0;a--)t.civic.foreign[`gov${a}`].occ&&(s.garrison-=e,s.garrison<0&&(t.civic.foreign[`gov${a}`].occ=!1,s.garrison+=e,t.civic.garrison.workers+=e,Bi(z("civics_garrison_autodeoccupy_desc",[te(a)]),"danger",!1,["spy"])))}if(t.race.slaver&&t.tech.slaves&&t.city.slave_pen&&(a.Slave=4*t.city.slave_pen.count,p[z("city_slave_pen")]=4*t.city.slave_pen.count+"v",a.Slavet.resource.Zen.max&&(t.resource.Zen.amount=t.resource.Zen.max);let e=t.resource.Zen.amount/(t.resource.Zen.amount+5e3);v[z("trait_calm_desc")]=`+${(100*e).toFixed(2)}%`}if(t.city.basic_housing){let e=t.city.basic_housing.count*Zr.city.basic_housing.citizens();a[t.race.species]+=e,_[Ks("small")]=e+"v"}if(t.tauceti.tau_housing&&t.tech.isolation){let e=t.tauceti.tau_housing.count*Zr.tauceti.tau_home.tau_housing.citizens();a[t.race.species]+=e,_[Ks("small")]=e+"v"}if(t.city.cottage){let e=t.city.cottage.count*Zr.city.cottage.citizens();if(a[t.race.species]+=e,_[Ks("medium")]=e+"v",t.tech.home_safe){let e=t.city.cottage.count*Nr(t.tech.home_safe>=2?t.tech.home_safe>=3?5e3:2e3:1e3);a.Money+=e,d[Ks("medium")]=e+"v"}}if(t.city.apartment){let e=i.apartment*Zr.city.apartment.citizens();if(a[t.race.species]+=e,_[Ks("large")]=e+"v",t.tech.home_safe){let e=i.apartment*Nr(t.tech.home_safe>=2?t.tech.home_safe>=3?1e4:5e3:2e3);a.Money+=e,d[Ks("large")]=e+"v"}}if(i.s_gate&&t.galaxy.consulate&&t.galaxy.consulate.count>=1){let e=Zr.galaxy.gxy_alien1.consulate.citizens();a[t.race.species]+=e,_[z("galaxy_consulate")]=e+"v"}if(i.s_gate&&i.embassy&&t.tech.xeno>=11){let e=Zr.galaxy.gxy_gorddon.embassy.citizens();a[t.race.species]+=e,_[z("galaxy_embassy")]=e+"v"}if(i.s_gate&&i.embassy&&t.galaxy.dormitory){let e=i.dormitory*Zr.galaxy.gxy_gorddon.dormitory.citizens();a[t.race.species]+=e,_[z("galaxy_dormitory")]=e+"v"}if(i.arcology){let e=i.arcology*Zr.portal.prtl_ruins.arcology.citizens();a[t.race.species]+=e,_[z("portal_arcology_title")]=e+"v",s.garrison+=i.arcology*ua(5),a.Containers+=i.arcology*Math.round(u)*10,b[z("portal_arcology_title")]=i.arcology*Math.round(u)*10+"v",a.Crates+=i.arcology*Math.round(u)*10,y[z("portal_arcology_title")]=i.arcology*Math.round(u)*10+"v";let r=Ca("ruins"),c=i.arcology*Nr(8*Us()*r.supress);a.Money+=c,d[z("portal_arcology_title")]=c+"v"}if(c.colony){let e=t.tech.isolation?900:250;a.Containers+=c.colony*e,b[z("tau_home_colony")]=c.colony*e+"v",a.Crates+=c.colony*e,y[z("tau_home_colony")]=c.colony*e+"v";let r=c.colony*Zr.tauceti.tau_home.colony.citizens();a[t.race.species]+=r,_[z("tau_home_colony")]=r+"v"}if(i.operating_base&&(s.garrison+=Math.min(c.operating_base,i.operating_base)*ua(4)),i.fob&&(s.garrison+=ua(10)),t.space.living_quarters){let e=Math.round(c.living_quarters*Zr.space.spc_red.living_quarters.citizens());if(a[t.race.species]+=e,s.colonist+=ua(c.living_quarters),_[`${ea().red}`]=e+"v",(t.race.cataclysm||t.race.orbit_decayed)&&t.tech.home_safe){let e=c.living_quarters*Nr(t.tech.home_safe>=2?t.tech.home_safe>=3?1e5:5e4:25e3);a.Money+=e,d[z("space_red_living_quarters_title")]=e+"v"}}if(c.biodome&&(t.race.artifical||t.race.orbit_decayed)){let e=c.biodome*Nr(t.race.artifical?500:100);a.Food+=e,w[z("space_red_signal_tower_title")]=e+"v"}if(t.space.titan_quarters){let e=Math.round(c.titan_quarters*Zr.space.spc_titan.titan_quarters.citizens());a[t.race.species]+=e,s.titan_colonist+=ua(c.titan_quarters),_[`${ea().titan}`]=e+"v"}if(t.interstellar.habitat&&i.habitat){let e=i.habitat*Zr.interstellar.int_alpha.habitat.citizens();a[t.race.species]+=e,_[z("interstellar_habitat_title")]=e+"v"}if(t.interstellar.luxury_condo&&i.luxury_condo){let e=i.luxury_condo*Zr.interstellar.int_alpha.luxury_condo.citizens();a[t.race.species]+=e,_[z("tech_luxury_condo")]=e+"v";let r=i.luxury_condo*Nr(75e4);a.Money+=r,d[z("tech_luxury_condo")]=r+"v"}if(t.city.lodge){let e=t.city.lodge.count*Zr.city.lodge.citizens();a[t.race.species]+=e,_[z("city_lodge")]=e+"v"}if(t.space.outpost){let e=t.space.outpost.count*Nr(500);a.Neutronium+=e,H[z("space_gas_moon_outpost_title")]=e+"v"}if(t.city.shed){var ne=ns();let e=t.tech.storage<=2?z("city_shed_title1"):t.tech.storage>=4?z("city_shed_title3"):z("city_shed_title2");for(const s of Zr.city.shed.res())if(t.resource[s].display){let i=t.city.shed.count*Nr(Zr.city.shed.val(s)*ne);a[s]+=i,r.c[s][e]=i+"v"}}if(t.race.lone_survivor&&(_[z("base")]="1v",a[t.race.species]=1),t.interstellar.warehouse){ne=ns();let e=z("interstellar_alpha_name");for(const s of Zr.interstellar.int_alpha.warehouse.res())if(t.resource[s].display){let i=t.interstellar.warehouse.count*Nr(Zr.interstellar.int_alpha.warehouse.val(s)*ne);a[s]+=i,r.c[s][e]=i+"v"}}if(t.space.storehouse){ne=wt("storehouse",!1);var le=wt("storehouse",!0);let e=z("space_storehouse_title");for(const s of Zr.space.spc_titan.storehouse.res())if(t.resource[s].display){let i=Zr.space.spc_titan.storehouse.heavy(s),c=t.space.storehouse.count*Nr(Zr.space.spc_titan.storehouse.val(s)*(i?le:ne));a[s]+=c,r.c[s][e]=c+"v"}}if(t.tauceti.repository){ne=wt("repository");let e=z("tech_repository");for(const s of Zr.tauceti.tau_home.repository.res())if(t.resource[s].display){let i=t.tauceti.repository.count*Nr(Zr.tauceti.tau_home.repository.val(s)*ne);a[s]+=i,r.c[s][e]=i+"v"}if(t.tech.isolation){let e=250;a.Containers+=t.tauceti.repository.count*e,b[z("tech_repository")]=t.tauceti.repository.count*e+"v",a.Crates+=t.tauceti.repository.count*e,y[z("tech_repository")]=t.tauceti.repository.count*e+"v"}}if(t.tech.isolation&&i.tau_farm&&t.race.artifical){let e=i.tau_farm*Nr(350);a.Food+=e,w[z("tau_home_tau_farm")]=e+"v"}if(t.galaxy.gateway_depot){let e=t.tech.world_control?150:100;a.Crates+=t.galaxy.gateway_depot.count*e,y[z("galaxy_gateway_depot")]=t.galaxy.gateway_depot.count*e+"v",a.Containers+=t.galaxy.gateway_depot.count*e,b[z("galaxy_gateway_depot")]=t.galaxy.gateway_depot.count*e+"v";let r=z("galaxy_gateway_depot"),s=Lt();if(t.resource.Uranium.display){let e=t.galaxy.gateway_depot.count*Nr(3e3*s);a.Uranium+=e,A[r]=e+"v"}if(t.resource.Nano_Tube.display){let e=t.galaxy.gateway_depot.count*Nr(25e4*s);a.Nano_Tube+=e,J[r]=e+"v"}if(t.resource.Neutronium.display){let e=t.galaxy.gateway_depot.count*Nr(9001*s);a.Neutronium+=e,H[r]=e+"v"}if(t.resource.Infernite.display){let e=t.galaxy.gateway_depot.count*Nr(6660*s);a.Infernite+=e,Z[r]=e+"v"}if(t.resource.Elerium.display&&i.gateway_depot&&i.s_gate){let e=i.gateway_depot*Nr(200);a.Elerium+=e,V[r]=e+"v"}}if(t.resource.Infernite.display&&t.portal.fortress){let e=Nr(1e3);a.Infernite+=e,Z[z("portal_fortress_name")]=e+"v"}if(t.space.garage){ne=Zr.space.spc_red.garage.multiplier(!1),le=Zr.space.spc_red.garage.multiplier(!0);let e=z("space_red_garage_title");for(const s of Zr.space.spc_red.garage.res())if(t.resource[s].display){let i=Zr.space.spc_red.garage.heavy(s),c=t.space.garage.count*Nr(Zr.space.spc_red.garage.val(s)*(i?le:ne));a[s]+=c,r.c[s][e]=c+"v"}}if(t.portal.harbour&&i.harbour){let e=z("portal_harbour_title");for(const s of Zr.portal.prtl_lake.harbour.res())if(t.resource[s].display){let t=i.harbour*Nr(Zr.portal.prtl_lake.harbour.val(s));a[s]+=t,r.c[s][e]=t+"v"}}if(t.city.silo){let e=os(t.city.silo.count*Nr(500));a.Food+=e,w[z("city_silo")]=e+"v"}if(t.city.compost){let e=os(t.city.compost.count*Nr(200));a.Food+=e,w[z("city_compost_heap")]=e+"v"}if(t.city.soul_well){let e=os(t.city.soul_well.count*Nr(500));a.Food+=e,w[z("city_soul_well")]=e+"v"}if(t.city.smokehouse){let e=os(t.city.smokehouse.count*Nr(100));a.Food+=e,w[z("city_smokehouse")]=e+"v"}if(t.city.oil_well){let e=t.city.oil_well.count*Nr(500);a.Oil+=e,F[z("city_oil_well")]=e+"v"}if(t.city.oil_depot){let e=t.city.oil_depot.count*Nr(1e3);e*=t.tech.world_control?1.5:1,a.Oil+=e,F[z("city_oil_depot")]=e+"v",t.tech.uranium>=2&&(e=t.city.oil_depot.count*Nr(250),e*=t.tech.world_control?1.5:1,a.Uranium+=e,A[z("city_oil_depot")]=e+"v"),t.resource.Helium_3.display&&(e=t.city.oil_depot.count*Nr(400),e*=t.tech.world_control?1.5:1,a.Helium_3+=e,B[z("city_oil_depot")]=e+"v")}if(t.space.propellant_depot){let e=t.space.propellant_depot.count*Nr(1250);e*=t.tech.world_control?1.5:1,a.Oil+=e,F[z("space_home_propellant_depot_title")]=e+"v",t.resource.Helium_3.display&&(e=t.space.propellant_depot.count*Nr(1e3),e*=t.tech.world_control?1.5:1,a.Helium_3+=e,B[z("space_home_propellant_depot_title")]=e+"v")}if(i.orbital_station){let e=i.orbital_station*Nr(15e3);a.Helium_3+=e,B[z("tau_home_orbital_station")]=e+"v"}if(i.refueling_station){let e=i.refueling_station*Nr(1e4);if(a.Helium_3+=e,B[z("tau_gas_refueling_station_title")]=e+"v",t.tech.tau_whale>=2){let e=i.refueling_station*Nr(6500);a.Oil+=e,F[z("tau_gas_refueling_station_title")]=e+"v"}}if(i.orbital_platform){let e=i.orbital_platform*Nr(17500);a.Oil+=e,F[z("tau_red_orbital_platform")]=e+"v"}if(t.space.gas_storage){let e=t.space.gas_storage.count*Nr(3500);e*=t.tech.world_control?1.5:1,a.Oil+=e,F[`${ea().gas} ${z("depot")}`]=e+"v",e=t.space.gas_storage.count*Nr(2500),e*=t.tech.world_control?1.5:1,a.Helium_3+=e,B[`${ea().gas} ${z("depot")}`]=e+"v",e=t.space.gas_storage.count*Nr(1e3),e*=t.tech.world_control?1.5:1,a.Uranium+=e,A[`${ea().gas} ${z("depot")}`]=e+"v"}if(i.xfer_station){let e=i.xfer_station*Nr(5e3);if(a.Helium_3+=e,B[z("interstellar_xfer_station_title")]=e+"v",e=i.xfer_station*Nr(4e3),a.Oil+=e,F[z("interstellar_xfer_station_title")]=e+"v",e=i.xfer_station*Nr(2500),a.Uranium+=e,A[z("interstellar_xfer_station_title")]=e+"v",t.resource.Deuterium.display){let e=i.xfer_station*Nr(2e3);a.Deuterium+=e,R[z("interstellar_xfer_station_title")]=e+"v"}}if(t.space.helium_mine){let e=t.space.helium_mine.count*Nr(100);a.Helium_3+=e,B[z("space_moon_helium_mine_title")]=e+"v"}if(Lc()){let e=Nc("know");a.Knowledge+=e.add,f[z("city_shrine")]=e.add+"v"}t.city.temple&&t.genes.ancients&&t.genes.ancients>=2&&(s.priest+=ua(t.city.temple.count)),t.space.ziggurat&&t.genes.ancients&&t.genes.ancients>=4&&(s.priest+=ua(t.space.ziggurat.count));let W=It("gxy_alien2");if(t.city.university){let e=Zr.city.university.knowVal()*t.city.university.count;s.professor+=ua(t.city.university.count),a.Knowledge+=e,f[z("city_university")]=e+"v"}if(t.race.lone_survivor&&t.tauceti.alien_outpost&&(s.professor+=ua(t.tauceti.alien_outpost.count)),t.city.library){let e=125;t.race.nearsighted&&(e*=1-di.nearsighted.vars()[0]/100),t.race.studious&&(e*=1+di.studious.vars()[1]/100);let r=Oi("elven");if(r>0&&(e*=1+di.studious.vars(1)[1]/100*r),t.tech.science&&t.tech.science>=8&&(e*=1.4),t.tech.science&&t.tech.science>=5){let a=la(t.civic.scientist.workers,"scientist");t.race.high_pop&&(a=Pe(a)),e*=1+.12*a}t.tech.anthropology&&t.tech.anthropology>=2&&(e*=1+.05*(t.race.cataclysm||t.race.orbit_decayed?t.space.ziggurat?t.space.ziggurat.count:0:t.city.temple.count));let s=D("teacher",0);s&&(e*=1+s/100);let i=D("athleticism",2);i&&(e*=1-i/100);let c=D("muckraker",1);c&&(e*=1+c/100);let o=Math.round(t.city.library.count*e);a.Knowledge+=o,f[z("city_library")]=o+"v",t.tech.science&&t.tech.science>=3&&(t.civic.professor.impact=.5+.01*t.city.library.count)}if(t.city.wardenclyffe){let e=1e3;t.city.ptrait.includes("magnetic")&&(e+=Fi.magnetic.vars()[1]);let r=t.city.wardenclyffe.count*e;s.scientist+=ua(t.city.wardenclyffe.count);let c=t.tech.science>=7?1500:1e3;if(r+=i.wardenclyffe*c,t.tech.supercollider){let e=t.tech.tp_particles||t.tech.particles&&t.tech.particles>=3?12.5:25;r*=t.tech.supercollider/e+1}t.space.satellite&&(r*=1+.04*t.space.satellite.count);let o=D("athleticism",2);if(o&&(r*=1-o/100),a.Knowledge+=r,f[Es()]=r+"v","magic"===t.race.universe){let e=t.city.wardenclyffe.count*Nr(8);a.Mana+=e,h[Es()]=e+"v"}if(t.race.artifical){let e=i.wardenclyffe*Nr(250);a.Food+=e,w[Es()]=e+"v"}}if(t.race.logical){let e=t.tech.hasOwnProperty("high_tech")?t.tech.high_tech:0;e+=t.tech.hasOwnProperty("science")?t.tech.science:0;let r=t.resource[t.race.species].amount*di.logical.vars()[1]*e;a.Knowledge+=r,f[_i[t.race.species].name]=r+"v"}if(t.portal.sensor_drone){let e=i.sensor_drone*(t.tech.infernite>=6?2500:1e3);a.Knowledge+=e,f[z("portal_sensor_drone_title")]=e+"v"}if(t.space.satellite){let e=t.space.satellite.count*(t.race.cataclysm||t.race.orbit_decayed?2e3:750);if((t.race.cataclysm||t.race.orbit_decayed)&&t.tech.supercollider){let a=t.tech.tp_particles||t.tech.particles&&t.tech.particles>=3?5:10;e*=t.tech.supercollider/a+1}a.Knowledge+=e,f[z("space_home_satellite_title")]=e+"v"}if(t.space.observatory&&t.space.observatory.count>0){let e=5e3*c.observatory;t.race.cataclysm&&t.space.satellite&&t.space.satellite.count>0&&(e*=1+.25*t.space.satellite.count),a.Knowledge+=e,f[z("space_moon_observatory_title")]=e+"v",t.race.cataclysm&&(s.professor+=ua(c.observatory))}if(t.interstellar.laboratory&&o.laboratory>0){t.tech.science>=16&&(s.scientist+=ua(o.laboratory));let e=1e4*o.laboratory;if(t.tech.science>=15&&(e*=1+.02*(t.race.cataclysm?c.exotic_lab:t.city.wardenclyffe.count)),t.race.cataclysm&&i.s_gate&&n.scavenger&&(e*=1+n.scavenger*It("gxy_alien2")*.75),t.tech.science>=21&&(e*=1.45),a.Knowledge+=e,f[z("magic"===t.race.universe?"tech_sanctum":"interstellar_laboratory_title")]=e+"v","magic"===t.race.universe){let e=o.laboratory*Nr(12);a.Mana+=e,h[z("magic"===t.race.universe?"tech_sanctum":"interstellar_laboratory_title")]=e+"v"}}if(t.city.biolab){let e=3e3;t.portal.sensor_drone&&t.tech.science>=14&&(e*=1+.02*i.sensor_drone),t.tech.science>=20&&(e*=3),t.tech.science>=21&&(e*=1.45),t.tech.biotech>=1&&(e*=2.5),a.Knowledge+=i.biolab*e,f[z("city_biolab")]=i.biolab*e+"v"}if(t.space.zero_g_lab&&Math.min(c.zero_g_lab,i.zero_g_lab)>0){let e=Math.min(c.zero_g_lab,i.zero_g_lab),r=mt("spc_enceladus"),s=Math.round(1e4*e*r);if(a.Knowledge+=s,f[z("tech_zero_g_lab")]=s+"v",t.resource.Cipher.display){let t=1e4*e;a.Cipher+=t,ie[z("tech_zero_g_lab")]=t+"v"}}if(t.tech.isolation&&t.tauceti.alien_outpost&&t.resource.Cipher.display){let e=2e5;a.Cipher+=e,ie[z("tech_alien_outpost")]=e+"v"}if(t.portal.archaeology){let e=Ca("ruins"),r=25e4;t.race.high_pop&&(r=Pe(r));let s=Math.round(r*e.supress);a.Knowledge+=la(t.civic.archaeologist.workers,"archaeologist")*s,f[z("portal_archaeology_bd")]=la(t.civic.archaeologist.workers,"archaeologist")*s+"v"}if(i.embassy&&t.galaxy.symposium){let e=1750*i.dormitory,r=650*t.galaxy.trade.cur,s=0;if(t.tech.xeno>=7){let e=t.galaxy.defense.gxy_gorddon.scout_ship*(Zr.galaxy.gxy_gateway.scout_ship.ship.civ()+Zr.galaxy.gxy_gateway.scout_ship.ship.mil());e+=t.galaxy.defense.gxy_gorddon.corvette_ship*(Zr.galaxy.gxy_gateway.corvette_ship.ship.civ()+Zr.galaxy.gxy_gateway.corvette_ship.ship.mil()),e+=t.galaxy.defense.gxy_gorddon.frigate_ship*(Zr.galaxy.gxy_gateway.frigate_ship.ship.civ()+Zr.galaxy.gxy_gateway.frigate_ship.ship.mil()),e+=t.galaxy.defense.gxy_gorddon.cruiser_ship*(Zr.galaxy.gxy_gateway.cruiser_ship.ship.civ()+Zr.galaxy.gxy_gateway.cruiser_ship.ship.mil()),e+=t.galaxy.defense.gxy_gorddon.dreadnought*(Zr.galaxy.gxy_gateway.dreadnought.ship.civ()+Zr.galaxy.gxy_gateway.dreadnought.ship.mil()),n.freighter&&(e+=n.freighter*(Zr.galaxy.gxy_gorddon.freighter.ship.civ()+Zr.galaxy.gxy_gorddon.freighter.ship.mil())),s=300*+Pe(e).toFixed(2)}let c=(e+r+s)*i.symposium;a.Knowledge+=c,f[z("galaxy_symposium")]=c+"v"}if(t.city.bank||t.race.cataclysm&&i.spaceport){let e=t.race.cataclysm||t.race.orbit_decayed?4*Us():Us(),r=t.race.cataclysm||t.race.orbit_decayed?i.spaceport:t.city.bank.count,s=r*Nr(e);if(a.Money+=s,t.race.cataclysm||t.race.orbit_decayed?d[z("space_red_spaceport_title")]=s+"v":d[z("city_bank")]=s+"v",t.interstellar.exchange){let s=Nr(o.exchange*(e*r/18));t.race.inflation&&(s*=2),t.tech.banking>=13&&(t.galaxy.freighter&&(s*=1+.03*n.freighter),t.galaxy.super_freighter&&(s*=1+.08*n.super_freighter)),s=Math.round(s),a.Money+=s,d[z("interstellar_exchange_bd")]=s+"v"}}if(t.space.titan_bank){let e=2*Us(),r=t.space.titan_bank.count*Nr(e);a.Money+=r,d[`${ea().titan} ${z("city_bank")}`]=r+"v"}if(t.tauceti.colony&&t.tech.isolation){let e=25*Us(),r=t.tauceti.colony.count*Nr(e);a.Money+=r,d[z("tau_home_colony")]=r+"v"}if(t.city.casino||t.space.spc_casino||t.tauceti.tauceti_casino){let e=0;t.city.casino&&t.city.casino.count>0&&(e+=t.city.casino.count),t.space.spc_casino&&t.space.spc_casino.count>0&&(e+=t.space.spc_casino.count),t.tauceti.tauceti_casino&&t.tauceti.tauceti_casino.count>0&&(e+=t.tauceti.tauceti_casino.count);let r=t.tech.gambling>=3?6e4:4e4;t.tech.gambling>=5&&(r+=t.tech.gambling>=6?24e4:6e4);let s=e*Nr(r);t.race.gambler&&(s*=1+di.gambler.vars()[0]*t.race.gambler/100),t.tech.world_control&&(s=Math.round(1.25*s)),t.tech.stock_exchange&&t.tech.gambling>=4&&(s*=1+.05*t.tech.stock_exchange),t.race.inflation&&(s*=1+t.race.inflation/100),t.tech.isolation&&(s*=5.5),a.Money+=s,d[z("city_casino")]=s+"v"}if(t.galaxy.resort){let e=i.resort*Nr(t.tech.world_control?1875e3:15e5);a.Money+=e,d[z("galaxy_resort")]=e+"v"}if(t.tech.banking>=4){let e=250;t.tech.banking>=11?e=1e3:t.tech.banking>=6&&(e=600);let r=e*(t.resource[t.race.species].amount+t.civic.garrison.workers);t.race.high_pop&&(r=Pe(r)),a.Money+=r,d[z("tech_bonds")]=r+"v"}if(i.moon_base){let e=i.moon_base*Nr(500);a.Iridium+=e,N[z("space_moon_base_title")]=e+"v"}if(i.space_station&&(s.space_miner+=ua(3*i.space_station),t.tech.asteroid>=5)){let e=i.space_station*Nr(5);a.Elerium+=e,V[z("space_belt_station_title")]=e+"v"}if(c.exotic_lab){let e=c.exotic_lab*Nr(10);a.Elerium+=e,V[z("space_red_exotic_lab_bd")]=e+"v";let r=500;if(t.tech.science>=13&&t.interstellar.laboratory&&(r+=25*o.laboratory),t.tech.ancient_study&&t.tech.ancient_study>=2&&(r+=15*t.space.ziggurat.count),t.tech.mass>=2){let e=la(t.civic.scientist.workers,"scientist");t.race.high_pop&&(e=Pe(e)),r+=i.mass_driver*e}t.race.cataclysm&&c.observatory&&(r*=1+.25*c.observatory),(t.race.cataclysm||t.race.orbit_decayed)&&t.portal.sensor_drone&&t.tech.science>=14&&(r*=1+.02*i.sensor_drone),t.tech.science>=21&&(r*=1.45),t.race.high_pop&&(r=Pe(r));let n=c.exotic_lab*la(t.civic.colonist.workers,"colonist")*r;a.Knowledge+=n,f[z("tech_exotic_bd")]=n+"v",(t.race.cataclysm||t.race.orbit_decayed)&&(s.scientist+=ua(c.exotic_lab))}if(t.tech.isolation&&c.infectious_disease_lab&&(s.professor+=ua(2*c.infectious_disease_lab),s.scientist+=ua(c.infectious_disease_lab)),c.decoder){let e=i.ai_colonist?la(t.civic.titan_colonist.workers,"titan_colonist")+ua(i.ai_colonist):la(t.civic.titan_colonist.workers,"titan_colonist"),r=c.decoder*e*2500;t.race.high_pop&&(r=Pe(r)),i.ai_core2&&(r*=1.25),a.Knowledge+=r,f[z("space_decoder_title")]=r+"v"}if(i.elerium_contain){let e=i.elerium_contain*Nr(100);a.Elerium+=e,V[z("space_dwarf_elerium_contain_title")]=e+"v"}if(t.city.foundry&&(s.craftsman+=ua(t.city.foundry.count)),c.fabrication&&(s.craftsman+=ua(c.fabrication),t.race.cataclysm&&(s.cement_worker+=ua(c.fabrication))),t.tech.isolation&&c.tau_factory&&(s.craftsman+=ua(5*c.tau_factory),s.cement_worker+=ua(2*c.tau_factory)),i.womling_station&&(s.craftsman+=ua(1*i.womling_station),s.cement_worker+=ua(1*i.womling_station)),i.stellar_forge&&(s.craftsman+=ua(2*i.stellar_forge)),t.portal.carport&&(s.hell_surveyor+=t.portal.carport.count-t.portal.carport.damaged),i.archaeology&&(s.archaeologist+=ua(2*i.archaeology)),i.nexus){let e=i.nexus*Nr(4e3);a.Helium_3+=e,B[z("interstellar_nexus_title")]=e+"v";let t=i.nexus*Nr(3500);a.Oil+=t,F[z("interstellar_nexus_title")]=t+"v";let r=i.nexus*Nr(3e3);a.Deuterium+=r,R[z("interstellar_nexus_title")]=r+"v";let s=i.nexus*Nr(25);a.Elerium+=s,V[z("interstellar_nexus_title")]=s+"v"}if(i.s_gate&&t.galaxy.gateway_station){let e=i.gateway_station*Nr(2e3);a.Helium_3+=e,B[z("galaxy_gateway_station")]=e+"v";let t=i.gateway_station*Nr(4500);a.Deuterium+=t,R[z("galaxy_gateway_station")]=t+"v";let r=i.gateway_station*Nr(50);a.Elerium+=r,V[z("galaxy_gateway_station")]=r+"v"}if(i.s_gate&&i.telemetry_beacon){let e=t.tech.telemetry?1200:800;t.tech.science>=17&&(e+=25*n.scout_ship);let r=i.telemetry_beacon**2*e;a.Knowledge+=r,f[z("galaxy_telemetry_beacon_bd")]=r+"v"}if(i.s_gate&&n.scavenger){let e=n.scavenger*Math.round(25e3*W);a.Knowledge+=e,f[z("galaxy_scavenger")]=e+"v"}if(r.t_route={},t.city.market.mtrade=0,t.race.banana&&(t.city.market.mtrade++,r.t_route[z("base")]=1),t.city.trade){let e=t.race.nomadic||t.race.xenophobic?t.tech.trade:t.tech.trade+1;if(t.tech.trade&&t.tech.trade>=3&&e--,t.race.flier&&(e+=di.flier.vars()[1]),t.city.market.mtrade+=e*t.city.trade.count,r.t_route[z("city_trade")]=e*t.city.trade.count,t.tech.fanaticism&&t.tech.fanaticism>=3){let e=t.race.cataclysm||t.race.orbit_decayed?t.space.ziggurat?t.space.ziggurat.count:0:t.city.temple.count;t.city.market.mtrade+=e,r.t_route[t.race.cataclysm?z("space_red_ziggurat_title"):z("city_temple")]=e}}if(t.city.wharf){let e=2*t.city.wharf.count;t.city.market.mtrade+=e,r.t_route[z("city_wharf")]=e}if(t.space.gps&&t.space.gps.count>=4){let e=2*t.space.gps.count;t.city.market.mtrade+=2*t.space.gps.count,r.t_route[z("space_home_gps_title")]=e}if(t.city.storage_yard&&t.tech.trade&&t.tech.trade>=3){let e=t.city.storage_yard.count;t.city.market.mtrade+=e,r.t_route[z("city_storage_yard")]=e}if(t.tech.railway){let e=0;e=t.race.cataclysm||t.race.orbit_decayed?t.space.gps?Math.floor(t.space.gps.count/3):0:t.city.storage_yard?Math.floor(t.city.storage_yard.count/6):0,t.stats.achieve.banana&&t.stats.achieve.banana.l>=2&&e++,t.city.market.mtrade+=t.tech.railway*e,r.t_route[z("arpa_projects_railway_title")]=t.tech.railway*e}if(i.titan_spaceport){let e=i.titan_spaceport*Nr(250);a.Water+=e,G[z("space_red_spaceport_title")]=e+"v"}if(t.tauceti.mining_pit&&(s.pit_miner+=ua(c.mining_pit*(t.tech.isolation?6:8)),a.Materials+=1e6*c.mining_pit),t.civic.torturer.display&&t.tech.unfathomable&&t.tech.unfathomable>=2&&(s.torturer=t.city.captive_housing.count),"magic"===t.race.universe&&t.race.witch_hunter){let e=0;if(t.city.wardenclyffe){let a=t.city.wardenclyffe.count;a+=i.wardenclyffe,t.tech.roguemagic&&t.tech.roguemagic>=6&&(a/=2),m[Es()]=a+"v",e+=a}if(t.civic.scientist.workers>0){let a=t.civic.scientist.workers;"magocracy"===t.civic.govern.type&&(a/=2),a=Pe(a),m[z("job_wizard")]=a+"v",e+=a}if(t.city.coal_power&&!t.race.environmentalist){let a=i.coal_power;t.tech.roguemagic&&t.tech.roguemagic>=6&&(a/=2),m[z("city_mana_engine")]=a+"v",e+=a}if(t.city.pylon||t.space.pylon||t.tauceti.pylon){let a=0,r="city_pylon";(t.race.cataclysm||t.race.orbit_decayed)&&t.space.pylon?(a=t.space.pylon.count,r="space_red_pylon"):t.tech.isolation&&t.tauceti.pylon?(a=t.tauceti.pylon.count,r="tau_home_pylon"):t.city.pylon&&(a=t.city.pylon.count),t.tech.roguemagic&&t.tech.roguemagic>=5&&(a/=3),m[z(r)]=a+"v",e+=a}if(t.race.casting){let a=t.race.casting.total;t.tech.roguemagic&&t.tech.roguemagic>=2&&(t.tech.roguemagic>=4&&(a/=4),a-=Pe(t.civic.priest.workers),a<0&&(a=0)),m[z("tech_rituals")]=a+"v",e+=a}if(t.race.totTransmute&&t.race.totTransmute>0){let a=t.race.totTransmute/5;m[z("tech_alchemy")]=a+"v",e+=a}let a=0;if(t.tech.explosives&&(a+=4),t.tech.military&&(t.tech.military>=10?a+=28:t.tech.military>=9?a+=24:t.tech.military>=8?a+=20:t.tech.military>=7?a+=16:t.tech.military>=6?a+=12:t.tech.military>=4?a+=8:t.tech.military>=3&&(a+=4)),m[z("witch_hunter_magic_tech")]=a+"v",e+=a,t.tech.roguemagic||(m[z("overt")]=5*e-e+"v",e*=5),t.tech.nexus){let a=.15*t.tech.nexus;m[z("arpa_projects_nexus_title")]=a+"v",e+=a}if(t.tech.syphon){let a=2.5*t.tech.syphon;m[z("arpa_syphon_title")]=a+"v",e+=a}if(t.portal.hasOwnProperty("soul_capacitor")){let a=i.soul_capacitor||0;t.portal.soul_capacitor.ecap=25e5*a,m[z("portal_soul_capacitor_title")]=a/3+"v",e+=a/3}if(t.tech.roguemagic&&t.tech.roguemagic>=3&&t.city.conceal_ward){let a=t.city.conceal_ward.count;t.tech.roguemagic>=8&&(a*=1.25),m[z("city_conceal_ward")]=-a+"v",e-=a}e<0&&(e=0),e=Math.floor(e),t.resource.Sus.amount=e,e>=50&&!t.race.witch_hunter_warned?(t.race.witch_hunter_warned=1,Bi(z("witch_hunter_warning"),"danger",!1,["progress"])):e>=80&&t.race.witch_hunter_warned&&1===t.race.witch_hunter_warned&&(t.race.witch_hunter_warned=2,Bi(z("witch_hunter_warning2"),"danger",!1,["progress"])),e>=100&&(t.civic.foreign.gov0.hstl=100,t.civic.foreign.gov1.hstl=100,t.civic.foreign.gov2.hstl=100,t.race.truepath&&(t.civic.foreign.gov3.hstl=100))}if(r.gt_route={},t.galaxy.freighter&&(r.gt_route[z("galaxy_freighter")]=2*n.freighter),t.galaxy.super_freighter&&(r.gt_route[z("galaxy_super_freighter")]=5*n.super_freighter),t.galaxy.bolognium_ship&&(s.crew+=t.galaxy.bolognium_ship.on*Zr.galaxy.gxy_gateway.bolognium_ship.ship.civ()),t.galaxy.scout_ship&&(s.crew+=t.galaxy.scout_ship.on*Zr.galaxy.gxy_gateway.scout_ship.ship.civ()),t.galaxy.corvette_ship&&(s.crew+=t.galaxy.corvette_ship.on*Zr.galaxy.gxy_gateway.corvette_ship.ship.civ()),t.galaxy.frigate_ship&&(s.crew+=t.galaxy.frigate_ship.on*Zr.galaxy.gxy_gateway.frigate_ship.ship.civ()),t.galaxy.cruiser_ship&&(s.crew+=t.galaxy.cruiser_ship.on*Zr.galaxy.gxy_gateway.cruiser_ship.ship.civ()),t.galaxy.dreadnought&&(s.crew+=t.galaxy.dreadnought.on*Zr.galaxy.gxy_gateway.dreadnought.ship.civ()),t.galaxy.freighter&&(s.crew+=t.galaxy.freighter.on*Zr.galaxy.gxy_gorddon.freighter.ship.civ()),t.galaxy.super_freighter&&(s.crew+=t.galaxy.super_freighter.on*Zr.galaxy.gxy_alien1.super_freighter.ship.civ()),t.galaxy.armed_miner&&(s.crew+=t.galaxy.armed_miner.on*Zr.galaxy.gxy_alien2.armed_miner.ship.civ()),t.galaxy.scavenger&&(s.crew+=t.galaxy.scavenger.on*Zr.galaxy.gxy_alien2.scavenger.ship.civ()),t.portal.transport&&(s.crew+=t.portal.transport.on*Zr.portal.prtl_lake.transport.ship.civ()),t.tauceti.infectious_disease_lab){let e=39616;if(t.tech.supercollider&&t.tech.isolation){let a=t.tech.tp_particles||t.tech.particles&&t.tech.particles>=3?12.5:25;e*=t.tech.supercollider/a+1}if(a.Knowledge+=i.infectious_disease_lab*Math.round(e),f[Zr.tauceti.tau_home.infectious_disease_lab.title()]=i.infectious_disease_lab*e+"v",t.tech.isolation){let e=c.infectious_disease_lab*Nr(375);a.Elerium+=e,V[Zr.tauceti.tau_home.infectious_disease_lab.title()]=e+"v"}}if(t.race.truepath&&t.tauceti.overseer&&t.tech.tau_red&&t.tech.tau_red>=5){let e=0,r=t.tauceti.overseer.injured,s=0,i=0,o=0;t.race.womling_friend?(i+=25+c.overseer*Zr.tauceti.tau_red.overseer.val(),s+=75+c.womling_fun*Zr.tauceti.tau_red.womling_fun.val()):t.race.womling_god?(i+=75+c.overseer*Zr.tauceti.tau_red.overseer.val(),s+=40+c.womling_fun*Zr.tauceti.tau_red.womling_fun.val()):t.race.womling_lord&&(i+=c.overseer*Zr.tauceti.tau_red.overseer.val(),s+=30+c.womling_fun*Zr.tauceti.tau_red.womling_fun.val());let n=t.tech.womling_pop&&t.tech.womling_pop>=2?6:5;e=c.womling_village*n;let l=2*c.womling_farm;l>e&&(l=e);let u=t.tech.womling_pop?8:6;t.tech.womling_gene&&(u+=2),e>l*u&&(e=l*u);let d=e-l-r,_=0;if(c.womling_lab){_=c.womling_lab,_>d&&(_=d),d-=_;let e=_*Math.round(25e3*t.tauceti.overseer.prod/100);if(a.Knowledge+=e,f[z("interstellar_laboratory_title")]=e+"v",Math.rand(0,10)=5?4.9:5;t.race.lone_survivor&&(e-=.1),t.tauceti.womling_lab.tech>=Math.round((t.tech.womling_tech+2)**e)&&(t.tech.womling_tech++,t.tauceti.womling_lab.tech=0,Bi(z("tau_red_womling_advancement",[t.tech.womling_tech]),"advanced",!1,["progress"]),gs())}}let p=6*c.womling_mine;p>d&&(p=d),d-=p;let h=t.tech.tech_womling_firstaid?3:4;if(0===Math.rand(0,10)){let e=Math.rand(0,p+_);e>r&&(r=e)}else r>0&&0===Math.rand(0,h)&&r--;t.tauceti.hasOwnProperty("womling_farm")&&(t.tauceti.womling_farm.farmers=l),t.tauceti.hasOwnProperty("womling_mine")&&(t.tauceti.womling_mine.miners=p),t.tauceti.hasOwnProperty("womling_lab")&&(t.tauceti.womling_lab.scientist=_),i-=p,s-=p,s-=l,s-=r,i>100?i=100:i<0&&(i=0),s>100?s=100:s<0&&(s=0),o=Math.round((i+s)/2),t.tauceti.overseer.loyal=i,t.tauceti.overseer.morale=s,t.tauceti.overseer.pop=e,t.tauceti.overseer.working=l+p+_,t.tauceti.overseer.injured=r,t.tauceti.overseer.prod=o}["inspired","distracted","stimulated","motivated"].forEach((function(e){t.race[e]&&(t.race[e]--,t.race[e]<=0&&delete t.race[e])}));let ue=t.resource[t.race.species].amount-a[t.race.species];if(ue>0&&(t.race.orbit_decayed&&t.stats.days===t.race.orbit_decay?Bi(z("tragic_death",[ue]),"danger"):(Bi(z(1===ue?"abandon1":"abandon2",[ue]),"danger"),t.civic.homeless+=ue)),i.world_controller){let e=.25;t.interstellar.far_reach&&i.far_reach>0&&(e+=.01*i.far_reach),t.tech.science>=19&&(e+=.15);let r=Math.round(a.Knowledge*e);a.Knowledge+=r,f[z("space_dwarf_collider_title")]=r+"v"}if(i.alien_outpost){let e=0;t.tech.isolation&&(e=t.race.lone_survivor?35e5:65e5,a.Knowledge+=e);let r=.2,s=Math.round(a.Knowledge*r);a.Knowledge+=s,f[z("tech_alien_outpost")]=s+e+"v"}let _e=a.Crates,pe=a.Containers;if(Object.keys(a).forEach((function(e){a.Crates-=t.resource[e].crates})),Object.keys(a).forEach((function(e){a.Containers-=t.resource[e].containers})),a.Crates<0){let e=0-a.Crates;Object.keys(a).forEach((function(r){if(e>0){let s=t.resource[r].crates;s>e&&(s=e),a.Crates+=s,t.resource[r].crates-=s,e-=s}}))}if(a.Containers<0){let e=0-a.Containers;Object.keys(a).forEach((function(r){if(e>0){let s=t.resource[r].containers;s>e&&(s=e),a.Containers+=s,t.resource[r].containers-=s,e-=s}}))}y[z("crates_used")]=a.Crates-_e+"v",b[z("crates_used")]=a.Containers-pe+"v";let he=Cr(),me=jr();Object.keys(a).forEach((function(e){let s=t.resource[e].crates*he;a[e]+=s;let i=t.resource[e].containers*me;a[e]+=i,r.c[e]&&(r.c[e][z("resource_Crates_plural")]=s+"v",r.c[e][z("resource_Containers_plural")]=i+"v"),t.resource[e].max=a[e],t.resource[e].amount>t.resource[e].max&&"Sus"!=e?t.resource[e].amount=t.resource[e].max:t.resource[e].amount<0&&(t.resource[e].amount=0),t.resource[e].amount>=.99*t.resource[e].max?$(`#res${e} .count`).hasClass("has-text-warning")||$(`#res${e} .count`).addClass("has-text-warning"):$(`#res${e} .count`).hasClass("has-text-warning")&&$(`#res${e} .count`).removeClass("has-text-warning")}));let ge=!1,fe=0,ve=0;if(Object.keys(s).forEach((function(e){-1===t.civic[e].max&&t.civic[e].display&&"unemployed"!==e&&"scavenger"!==e&&ve++})),Object.keys(s).forEach((function(e){t.civic[e].max=s[e],t.civic[e].workers>t.civic[e].max&&-1!==t.civic[e].max?t.civic[e].workers=t.civic[e].max:t.civic[e].workers<0&&(t.civic[e].workers=0),t.race.servants&&(-1!==t.civic[e].max||t.race.servants.jobs.hasOwnProperty(e)||(t.race.servants.jobs[e]=0,ge=!0),t.race.servants.jobs.hasOwnProperty(e)&&(!t.civic[e].display&&("scavenger"!==e||ve>0)?t.race.servants.jobs[e]=0:fe+=t.race.servants.jobs[e],fe>t.race.servants.max&&t.race.servants.jobs[e]>0&&(t.race.servants.jobs[e]--,fe--)))})),ge?pa():t.race.servants&&(t.race.servants.force_scavenger=0===ve,t.race.servants.used=fe),t.race.servants&&t.race.servants.hasOwnProperty("smax")&&t.race.servants.smax>0){let e=0;Object.keys(t.race.servants.sjobs).forEach((function(a){t.resource[a].display||(t.race.servants.sjobs[a]=0),e+=t.race.servants.sjobs[a],e>t.race.servants.smax&&(t.race.servants.sjobs[a]-=e-t.race.servants.smax),t.race.servants.sjobs[a]<0&&(t.race.servants.sjobs[a]=0)})),t.race.servants.sused=e}if(t.civic.space_miner.display&&t.space.space_station&&(t.space.space_station.s_max=la(t.civic.space_miner.workers,"space_miner")),t.portal.hasOwnProperty("transport")){let e=0;n.transport&&(e=5*n.transport),t.portal.transport.cargo.max=e}if(t.portal.hasOwnProperty("purifier")){let e=100,a=1e4;l.base_camp&&(a*=1+.4*l.base_camp),l.port&&(e+=l.port*a),t.portal.purifier.sup_max=Math.round(e)}let ye=t.race.truepath?5:3,be=t.race.blurry?2:0,we=Oi("yeti");we>=.25&&(be+=we>=.5?2:1);for(let a=0;a0&&(t.civic.foreign[`gov${a}`].trn--,0===t.civic.foreign[`gov${a}`].trn&&t.civic.foreign[`gov${a}`].spy++),t.civic.foreign[`gov${a}`].sab>0&&(t.civic.foreign[`gov${a}`].sab--,0===t.civic.foreign[`gov${a}`].sab))switch(t.civic.foreign[`gov${a}`].act){case"influence":if(0===Math.floor(g(0,4+be)))So(a);else{let r=Math.floor(g(t.tech.spy>=5?2:1,t.tech.spy>=5?8:6));"scorpio"===e&&(r+=U("scorpio")[1]),t.civic.foreign[`gov${a}`].hstl-=r,t.civic.foreign[`gov${a}`].hstl<0&&(t.civic.foreign[`gov${a}`].hstl=0),Bi(z("civics_spy_influence_success",[te(a),r]),"success",!1,["spy"])}break;case"sabotage":if(0===Math.floor(g(0,3+be)))So(a);else{let r=Math.floor(g(t.tech.spy>=5?2:1,t.tech.spy>=5?8:6));"scorpio"===e&&(r+=U("scorpio")[1]),t.civic.foreign[`gov${a}`].mil-=r,t.civic.foreign[`gov${a}`].mil<50&&(t.civic.foreign[`gov${a}`].mil=50),Bi(z("civics_spy_sabotage_success",[te(a),r]),"success",!1,["spy"])}break;case"incite":if(0===Math.floor(g(0,2+Math.floor(be/2))))So(a);else{let r=Math.floor(g(t.tech.spy>=5?2:1,t.tech.spy>=5?8:6));"scorpio"===e&&(r+=U("scorpio")[1]),t.civic.foreign[`gov${a}`].unrest+=r,t.civic.foreign[`gov${a}`].unrest>100&&(t.civic.foreign[`gov${a}`].unrest=100),Bi(z("civics_spy_incite_success",[te(a),r]),"success",!1,["spy"])}break;case"annex":if(a>=3)break;let r=!t.tech.gov_fed&&!de();t.civic.foreign[`gov${a}`].anx=!0,Bi(z("civics_spy_annex_success",[te(a)]),"success",!1,["spy"]),r&&gs();break;case"purchase":if(a>=3)break;let s=!t.tech.gov_fed&&!de();t.civic.foreign[`gov${a}`].buy=!0,Bi(z("civics_spy_purchase_success",[te(a)]),"success",!1,["spy"]),s&&gs()}if(t.race.banana){let e=!1,a=0;if(Object.keys(t.resource).forEach((function(r){t.resource[r].hasOwnProperty("trade")&&t.resource[r].trade<0&&(e?t.resource[r].trade=0:e=r),t.resource[r].hasOwnProperty("trade")&&t.resource[r].trade>0&&(a+=t.resource[r].trade)})),t.resource[e]&&t.resource[e].trade<=-500){let e=Xc();t.stats.banana.b4[e]=!0,"m"!==e&&"l"!==e&&(t.stats.banana.b4.l=!0),a>=500&&to("banana")}}if(t.galaxy.defense){let e=["dreadnought","cruiser_ship","frigate_ship","corvette_ship","scout_ship"];for(let a=0;an[e[a]]){let i=r-n[e[a]];t.galaxy.defense[s][e[a]]-=i}t.galaxy.defense[s][e[a]]<0&&(t.galaxy.defense[s][e[a]]=0)}})),r=2&&$e.push("slave_market"),$e.forEach((function(e){if(Zr.city[e]&&Zr.city[e].cost){let a=Zr.city[e],r=$("#"+a.id);if(js(a)?r.hasClass("cna")&&r.removeClass("cna"):r.hasClass("cna")||r.addClass("cna"),js(a,!0)?r.hasClass("cnam")&&r.removeClass("cnam"):r.hasClass("cnam")||r.addClass("cnam"),t.city[e]){let r=ac(a,!1,!0);t.city[e].time=cc(r.t),t.city[e].bn=r.r}}})),Object.keys(Zr.tech).forEach((function(e){if(Zr.tech[e]&&Zr.tech[e].cost){let t=Zr.tech[e],a=$("#"+t.id);a.length>0&&(js(t)?a.hasClass("cna")&&a.removeClass("cna"):a.hasClass("cna")||a.addClass("cna"),js(t,!0)?a.hasClass("cnam")&&a.removeClass("cnam"):a.hasClass("cnam")||a.addClass("cnam"))}}));let xe=["space","interstellar","galaxy","portal","tauceti"];for(let e=0;e0&&t.city.ptrait.includes("toxic")&&(e+=Fi.toxic.vars()[0]),t.arpa.sequence.labs=e,t.arpa.sequence.time-=t.arpa.sequence.boost?2*e:e,t.arpa.sequence.progress=t.arpa.sequence.max-t.arpa.sequence.time,t.arpa.sequence.time<=0){if(t.arpa.sequence.max=5e4*(1+t.race.mutation**2),t.race.adaptable){let e=1-di.adaptable.vars()[0]/100;t.arpa.sequence.max=Math.floor(t.arpa.sequence.max*e)}if(t.arpa.sequence.progress=0,t.arpa.sequence.time=t.arpa.sequence.max,2===t.tech.genetics)Bi(z("genome",[Tc("name")]),"success",!1,["progress"]),t.tech.genetics=3;else{t.race.mutation++;let e=mi(1),a=1+(t.genes.synthesis?t.genes.synthesis:0),r=2**(t.race.mutation-1)*a;t.stats.achieve.creator&&(r=Math.round(r*(1+.5*t.stats.achieve.creator.l))),t.resource.Genes.amount+=r,t.resource.Genes.display=!0;let s=t.genes.plasma?t.race.mutation:1;t.genes.plasma&&s>3&&(s=t.genes.plasma>=2?s>5?5:s:3);let i=s>1?"_plural":"";"antimatter"===t.race.universe?(i=z("resource_AntiPlasmid"+i+"_name"),t.stats.antiplasmid+=s,t.prestige.AntiPlasmid.count+=s,eo("cross")):(i=z("resource_Plasmid"+i+"_name"),t.stats.plasmid+=s,t.prestige.Plasmid.count+=s),Ce("Crispr"),Bi(z("gene_therapy",[z("trait_"+e+"_name"),r,s,i]),"success",!1,["progress"])}Ce("Genetics"),gs()}}if(t.city.foundry){let e=t.civic.craftsman.workers;(t.race.kindling_kindred||t.race.smoldering)&&t.city.foundry.Plywood>0&&(t.civic.craftsman.workers-=t.city.foundry.Plywood,t.city.foundry.crafting-=t.city.foundry.Plywood,t.city.foundry.Plywood=0);let a=Xa();Object.keys(a).forEach((function(a){for(;t.city.foundry[a]>e&&t.city.foundry[a]>0;)t.city.foundry[a]--,t.city.foundry.crafting--;e-=t.city.foundry[a]}))}3===t.tech.foundry&&(t.race.kindling_kindred||t.race.smoldering)&&(t.tech.foundry=4,gs()),(t.race.kindling_kindred||t.race.smoldering)&&(t.civic.lumberjack.workers=0,t.resource.Lumber.crates=0,t.resource.Lumber.containers=0,t.resource.Lumber.trade=0),(t.race.kindling_kindred||t.race.smoldering)&&t.city.foundry&&t.city.foundry.Plywood&&(t.city.foundry.Plywood=0),Ec("fool",2023)&&!t.race.hooved?t.resource.Horseshoe.display=!0:t.race.hooved||(t.resource.Horseshoe.display=!1),Oo(!1);let ke=c.iron_ship+c.iridium_ship;if(ke>0&&t.tech.asteroid&&3===t.tech.asteroid&&Math.rand(0,250)<=ke&&(t.tech.asteroid=4,t.resource.Elerium.display=!0,Ji("Elerium",1),gs(),Bi(z("discover_elerium"),"info",!1,["progress"])),t.tech.asteroid&&4===t.tech.asteroid&&0===t.resource.Elerium.amount&&Ji("Elerium",1),i.outpost>0&&t.tech.gas_moon&&1===t.tech.gas_moon&&Math.rand(0,100)<=i.outpost&&(t.space.oil_extractor={count:0,on:0},t.tech.gas_moon=2,Bi(z("discover_oil",[ea().gas_moon]),"info",!1,["progress"]),Ht()),t.portal.hasOwnProperty("mechbay")&&t.tech.hell_spire&&t.tech.hell_spire>=9){t.portal.spire.boss||Ea(),Ta();let e=0;for(let a=0;a=2&&t.portal.waygate.progress<100?e+=Ga(r,!0):e+=Ga(r,!1)}if(t.portal.hasOwnProperty("waygate")&&t.tech.hasOwnProperty("waygate")&&1===t.portal.waygate.on&&t.tech.waygate>=2&&t.portal.waygate.progress<100?(t.portal.waygate.progress+=e,t.portal.waygate.time=cc(0===e?-1:(100-t.portal.waygate.progress)/e),t.portal.spire.time=cc(-1)):(t.portal.spire.progress+=e,t.portal.spire.time=cc(0===e?-1:(100-t.portal.spire.progress)/e),t.tech.waygate&&t.tech.waygate>=2&&(t.portal.waygate.time=cc(-1))),t.portal.hasOwnProperty("waygate")&&1===t.portal.waygate.on&&t.portal.waygate.progress>=100&&(t.portal.waygate.progress=100,t.portal.waygate.on=0,t.tech.waygate=3,t.resource.Demonic_Essence.display=!0,t.resource.Demonic_Essence.amount=1,gs()),t.portal.spire.progress>=100){t.portal.spire.progress=0;let e=Number(so()),a=e;t.genes.blood&&t.genes.blood>=2&&(a*=2),t.prestige.Blood_Stone.count+=a,t.stats.blood+=a,Ce("Blood"),t.tech.hasOwnProperty("b_stone")||(t.tech.b_stone=1,gs()),Bi(`${z("portal_spire_conquest",[z(`portal_mech_boss_${t.portal.spire.boss}`),t.portal.spire.count])} ${z(1===a?"portal_spire_conquest_stone":"portal_spire_conquest_stones",[a])}`,"info",!1,["progress","hell"]),t.portal.spire.count++,t.portal.spire.count>10&&(t.tech.hell_spire=10,gs());let r=Xc();t.stats.spire.hasOwnProperty(r)||(t.stats.spire[r]={s0:0,s1:0,s2:0,s3:0,s4:0}),t.portal.spire.count>t.stats.spire[r]["s"+(e-1)]&&(t.stats.spire[r]["s"+(e-1)]=t.portal.spire.count),(!t.stats.spire[r].hasOwnProperty(t.portal.spire.boss)||e>t.stats.spire[r][t.portal.spire.boss])&&(t.stats.spire[r][t.portal.spire.boss]=e),Ea(),xa()}}if(t.race.cannibalize&&t.city.s_alter&&(t.city.s_alter.rage>0&&t.city.s_alter.rage--,t.city.s_alter.regen>0&&t.city.s_alter.regen--,t.city.s_alter.mind>0&&t.city.s_alter.mind--,t.city.s_alter.mine>0&&t.city.s_alter.mine--,t.city.s_alter.harvest>0&&t.city.s_alter.harvest--,$('#popper[data-id="city-s_alter"]').length>0&&Os(Zr.city.s_alter,"city","s_alter")),t.race.casting){let e=0;["farmer","miner","lumberjack","science","factory","army","hunting","crafting"].forEach((function(a){t.race.casting[a]&&(e+=t.race.casting[a])})),t.race.casting.total=e}if(t.tech.r_queue&&t.r_queue.display){let e=-1,a=!1,r=!1,s=0,i=0,c={t:{t:0,rt:0},r:{},rr:{},id:{}};for(let o=0;o=l.grant[1]){t.r_queue.queue.splice(o,1),Ii(`rq${a.id}`);break}if(js(l,!0)){t.r_queue.queue[o].cna=!1;let u=ds(n.type,!1),d=t.settings.qAny_res?ac(l):ac(l,c,!1,u);d>=0?(!r&&js(l)&&u?(a=l,e=o,t.settings.qAny_res&&(r=!0)):(u&&(s+=d),i+=d),!t.settings.qAny_res&&u&&(r=!0),t.r_queue.queue[o].time=u?s:i):t.r_queue.queue[o].time=d,t.r_queue.queue[o].req=!!u}else t.r_queue.queue[o].cna=!0,t.r_queue.queue[o].time=-1;t.r_queue.queue[o].qa=!!t.settings.qAny_res}e>=0&&a&&!t.r_queue.pause&&a.action()&&(Bi(z("research_success",[t.r_queue.queue[e].label]),"success",!1,["queue","research_queue"]),hs(t.r_queue.queue[e].type),a.post&&a.post(),t.r_queue.queue.splice(e,1),Ii(`rq${a.id}`),Gs()),t.r_queue.queue.length>t.r_queue.max&&t.r_queue.queue.splice(t.r_queue.max);let o={},n=[];ds("club",o);for(let e=0;e0)for(let e=n.length-1;e>=0;e--)t.r_queue.queue.splice(n[e],1)}t.arpa.sequence&&t.arpa.sequence.auto&&t.tech.genetics&&t.tech.genetics>=8&&Po(),i.soul_forge&&ic({el:"#fort"},"update"),io()}if(t.tech.queue&&t.queue.display){let e=-1,a=!1,r=!1,s=["space","interstellar","galaxy","portal","tauceti"],i=0,c={t:{t:0,rt:0},r:{},rr:{},id:{}},o=!1;for(let n=0;n=0){i+=s,l.time=i;for(let e=1;e=0&&(t.settings.qAny&&!t.queue.pause&&l.time>1?Ue(l.type,100,!0):r||(a=u,e=n,o=!0,r=!0))}else if(js(u,!0)){l.cna=!1;let s=ac(u,c);if(l.bres=!1,s>=0){!r&&js(u)?(a=u,e=n,o=!1,t.settings.qAny&&(r=!0)):i+=s,t.settings.qAny||(r=!0),l.time=i;let d=!1;for(let e=1;e=0&&a&&!t.queue.pause){let r=!1;if(o){let r=t.queue.queue[e].label;Ue(t.queue.queue[e].type,100,!0,!0)&&(Bi(z("build_success",[r]),"success",!1,["queue","building_queue"]),t.queue.queue[e].q>1?t.queue.queue[e].q--:(Ii(`q${a.id}${e}`),t.queue.queue.splice(e,1),Wi()))}else{let s=t.queue.queue[e].q,i=t.queue.queue[e],c=a.queue_complete?a.queue_complete():1;for(let i=0;i1?t.queue.queue[e].q--:(Ii(`q${a.id}${e}`),t.queue.queue.splice(e,1),Wi()),t.race.inflation&&t.tech.primitive&&(a.hasOwnProperty("inflation")&&!a.inflation||t.race.inflation++);r&&bs(a,i.action,i.type)}}let n=!1,l=0,u=[],d=!1;for(let e=0;et.queue.max){let a=Math.ceil(t.queue.queue[e].q/t.queue.queue[e].qs)-(l-t.queue.max);0===a?t.queue.queue.splice(e):(t.queue.queue[e].q=a*t.queue.queue[e].qs,t.queue.queue.splice(e+1))}if("merge_nearby"===t.settings.q_merge){if(n===t.queue.queue[e].id){Ii(`q${t.queue.queue[e].id}${e}`),t.queue.queue[e-1].q+=t.queue.queue[e].q,t.queue.queue.splice(e,1),Wi();break}n=t.queue.queue[e].id}else if("merge_all"===t.settings.q_merge){let a=!1;for(let r=0;r=0&&a>t.resource[r].max,i=e.attr("data-ok")?e.attr("data-ok"):"has-text-dark";t.resource[r].amount+t.resource[r].diff$("#buildQueue").get(0).clientHeight&&a++,ei&&(a-=i-e),e=i),ac&&(e-=e+a-c,ec&&(a-=e+a-c,a0&&$("#mechList").css("height",`calc(100vh - 11.5rem - ${$("#mechAssembly").height()}px)`),$("#shipList").length>0&&$("#shipList").css("height",`calc(100vh - 11.5rem - ${$("#shipPlans").height()}px)`)}();break;case"long":!function(){const a=new Date,r=W();if("protoplasm"!==t.race.species){let a=ri(),s=!1;if(Object.keys(a).forEach((function(e){a[e].l.forEach((function(t){let r=t.split(":"),i=Et(r[0]),c="city"===r[0]?r[0]:i,o="city"===r[0]?Zr.city[r[1]]:Zr[i][r[0]][r[1]],n=$(`#pg${o.id}${e}`);a[e].s&&(0===n.length||ti(o,c,r[0],r[1])&&n.hasClass("inactive"))&&(s=!0)}))})),s&&ai(),t.tech.syphon&&t.tech.syphon>=80){P.w&&P.w.terminate();let a=$('
        ');$("body").append(a),setTimeout((function(){a.addClass("burn")}),125),setTimeout((function(){a.addClass("b")}),150),setTimeout((function(){a.addClass("c")}),2e3),setTimeout((function(){!function(){if(t.tech.syphon>=80&&"magic"===t.race.universe){t.tech.syphon=79,t.arpa.syphon.rank=79,t.arpa.syphon.complete=99,t.queue.queue=[],t.stats.current=Date.now(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),C(),Vi("reset",{end:"vacuum"}),eo(`extinct_${t.race.species}`),eo("pw_apocalypse"),t.space.hasOwnProperty("spaceport")&&0===t.space.spaceport.count&&eo("red_dead"),t.race.modified||"balorg"!==t.race.species||eo("pass"),t.race.junker&&"junker"===t.race.species&&to("the_misery"),t.race.decay&&eo("dissipated"),t.race.steelen&&to("steelem");let a=t.race.species,r=t.race.gods,s=t.city.calendar.orbit,i=t.city.biome,c=t.city.ptrait,o=gc("vacuum");io(),t.stats.blackhole++,zc(),t.prestige.Phage.count+=o.phage,t.stats.phage+=o.phage,"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=o.plasmid,t.stats.antiplasmid+=o.plasmid):(t.prestige.Plasmid.count+=o.plasmid,t.stats.plasmid+=o.plasmid),t.prestige.Dark.count=+(t.prestige.Dark.count+o.dark).toFixed(3),t.stats.dark=+(t.stats.dark+o.dark).toFixed(3),t.stats.universes++;let n=!!t.race.hasOwnProperty("srace")&&t.race.srace,l=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0;t.race={species:"protoplasm",gods:a,old_gods:r,universe:"bigbang",seeded:!0,bigbang:!0,probes:4,seed:Math.floor(g(1e4)),ascended:!1},l>0&&(t.race.corruption=l),n&&(t.race.srace=n),Z({orbit:s,biome:i,ptrait:c,geology:!1}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}}()}),4e3)}if(t.portal.fortress&&function(){let e={start:t.portal.fortress.threat,foundGem:!1,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=t.tech.armor?t.tech.armor:0;t.race.armored&&(a+=di.armored.vars()[1]);let r=Oi("tortoisan");r>0&&(a+=Math.floor(di.armored.vars(1)[1]*r)),t.race.scales&&(a+=di.scales.vars()[2]);let s=!1;if(i.soul_forge){let e=t.portal.fortress.garrison-t.portal.fortress.patrols*t.portal.fortress.patrol_size;wa()<=e?(s=!0,$("#portal-soul_forge .on").removeClass("altwarn")):(s=!1,$("#portal-soul_forge .on").addClass("altwarn"))}else $("#portal-soul_forge .on").addClass("altwarn");let c=0;if(t.tech.portal>=3&&i.war_drone){e.drones={};for(let a=0;a=Math.rand(0,999)){let a=Math.rand(Math.floor(t.portal.fortress.threat/50),Math.floor(t.portal.fortress.threat/10)),i=t.tech.portal>=7?Math.rand(50,125):Math.rand(25,75);a=5?9e3:1e4)-t.portal.fortress.pity;if("evil"===t.race.universe&&t.prestige.Dark.count>1){let e=t.prestige.Dark.count;t.prestige.Harmony.count>0&&(e*=1+.01*t.prestige.Harmony.count),o-=Math.round(2*Math.log2(e))}t.tech.portal>=4&&i.attractor&&(o=Math.round(o*.948**i.attractor)),t.race.ghostly&&(o=Math.round(o*((100-di.ghostly.vars()[2])/100)));let n=Oi("wendigo");n>0&&(o=Math.round(o*((100-di.ghostly.vars(1)[2])/100*n))),o<12&&(o=12);let l=0,u=i.war_droid?i.war_droid:0,d=!1,h=0;t.civic.garrison.wounded>t.civic.garrison.workers-t.portal.fortress.garrison&&(h=t.civic.garrison.wounded-(t.civic.garrison.workers-t.portal.fortress.garrison),h>t.portal.fortress.garrison-t.portal.fortress.patrols*t.portal.fortress.patrol_size?(h-=t.portal.fortress.garrison-t.portal.fortress.patrols*t.portal.fortress.patrol_size,h/=t.portal.fortress.patrols):h=0);let m=+(h%1).toFixed(10);e.patrols={};for(let r=0;r1/t.portal.fortress.patrols*r?Math.ceil(h):Math.floor(h);if(Math.rand(0,t.portal.fortress.threat)>=Math.rand(0,999)){c.encounter=!0;let r=t.portal.fortress.patrol_size;u>0&&(c.droid=!0,r+=t.tech.hdroid?ua(2):ua(1),u--);let _=Math.round(qe(r,"hellArmy",n)),p=Math.rand(Math.floor(t.portal.fortress.threat/50),Math.floor(t.portal.fortress.threat/10));t.race.blood_thirst&&(t.race.blood_thirst_count+=Math.rand(0,Math.ceil(p/10)),t.race.blood_thirst_count>di.blood_thirst.vars()[0]&&(t.race.blood_thirst_count=di.blood_thirst.vars()[0]));let h=30+Math.max(t.race.chameleon?di.chameleon.vars()[1]:0,t.race.elusive?di.elusive.vars()[0]:0);if(0===Math.rand(0,h)){c.ambush=!0,l+=Pa(Math.round(p*(1+3*Math.random())),0,!0,c);let e=Math.round(_/2);p0){let a=35-Math.floor(i.attractor/3);a<5&&(a=5);let s=Math.round(r/a);for(let a=0;at.civic.garrison.workers&&(t.civic.garrison.wounded=t.civic.garrison.workers);let f=t.portal.fortress.nocrew?t.civic.garrison.workers-t.civic.garrison.crew:t.civic.garrison.workers;if(f0&&"Yes"===t.portal.fortress.notify&&Bi(g>0?z("fortress_patrol_casualties_revive",[l,g]):z("fortress_patrol_casualties",[l]),!1,!1,["hell"]),t.portal.fortress.garrison>0&&t.portal.fortress.siege>0&&t.portal.fortress.siege--,t.portal.fortress.siege<=900&&t.portal.fortress.garrison>0&&1>Math.rand(0,t.portal.fortress.siege)){let a={destroyed:!1,damage:0,kills:0,surveyors:0,soldiers:0},r=Ma(t.portal.fortress.garrison),i=r/35>1?r/35:1,c=Math.round(t.portal.fortress.threat/2),o=0,n=0,l=!1;for(;c>0&&t.portal.fortress.walls>0;){let e=Math.round(Math.rand(1,i+1));if(e>c&&(e=c),c-=e,t.portal.fortress.threat-=e,t.stats.dkills+=e,s&&(t.portal.soul_forge.kills+=e,Oa(e)),n+=e,c>0&&(o++,t.portal.fortress.walls--,0===t.portal.fortress.walls)){a.destroyed=!0,l=!0;break}}a.damage=o,a.kills=n,e.stats.kills.sieges=n,l?(Bi(z("fortress_lost"),!1,!1,["hell"]),a.surveyors=t.civic.hell_surveyor.workers,t.resource[t.race.species].amount-=t.civic.hell_surveyor.workers,t.civic.hell_surveyor.workers=0,t.civic.hell_surveyor.assigned=0,a.soldiers=t.portal.fortress.garrison,e.stats.died+=t.portal.fortress.garrison,t.portal.fortress.patrols=0,t.stats.died+=t.portal.fortress.garrison,t.civic.garrison.workers-=t.portal.fortress.garrison,t.portal.fortress.garrison=0,t.portal.fortress.assigned=0):Bi(z("fortress_sieged",[n,o]),!1,!1,["hell"]),t.portal.fortress.siege=999,e.stats.sieges++,e.siege=a}if(t.portal.fortress.threat<1e4){let a=(1e4-t.portal.fortress.threat)/2500+1;t.tech.portal>=4&&i.attractor&&(a*=1+.22*i.attractor);let r=Math.rand(Math.round(10*a),Math.round(50*a));t.portal.fortress.threat+=r,e.demons=r}if(t.civic.hell_surveyor.display&&t.civic.hell_surveyor.workers>0){let a=1e3,r=D("nopain",1);r&&(a*=1+r/100),t.race.blurry&&(a*=1+di.blurry.vars()[0]/100);let s=Oi("yeti");s>0&&(a*=1+di.blurry.vars(1)[0]/100*s),t.race.instinct&&(a*=1+di.instinct.vars()[0]/100),t.tech.infernite&&t.tech.infernite>=5&&(a+=250);let n=t.portal.fortress.threat/a,l=t.civic.hell_surveyor.workers>10?10:t.civic.hell_surveyor.workers;if(n>10-Math.rand(0,l+1)){let a=Math.round(n),r=Math.rand(0,a+1);r>t.civic.hell_surveyor.workers&&(r=t.civic.hell_surveyor.workers),1===r&&"Yes"===t.portal.fortress.s_ntfy?Bi(z("fortress_killed"),!1,!1,["hell"]):r>1&&"Yes"===t.portal.fortress.s_ntfy&&Bi(z("fortress_eviscerated",[r]),!1,!1,["hell"]),r>0&&(e.surveyors=r,e.stats.surveyors=r,t.civic.hell_surveyor.workers-=r,t.civic.hell_surveyor.max-=r,t.resource[t.race.species].amount-=r,t.portal.carport.damaged+=r)}if(e.surveyor_finds={},t.civic.hell_surveyor.workers>0&&c>0)for(let a=0;a100&&(s=100),r.bodies=s,s>0){let a=25-Math.floor(i.attractor/5);a<5&&(a=5);let c=Math.round(s/a);for(let a=0;a=1e6&&t.tech.gateway&&!t.tech.hell_pit&&(t.tech.hell_pit=1,t.settings.portal.pit=!0,Bi(z("portal_hell_pit_found"),"info",!1,["progress","hell"]),xa()),t.tech.hell_pit){if(s&&t.tech.hell_pit>=5&&i.soul_attractor){let a=t.blood.attract?5*t.blood.attract:0,r=i.soul_attractor*Math.rand(40+a,120+a);t.portal.soul_forge.kills+=r,e.soul_attractors=r,Oa(r)}if(s&&t.tech.hell_gun&&i.gun_emplacement){e.gun_emplacements={};let a=0;for(let r=0;r=2?Math.rand(35,75):Math.rand(20,40);a+=s,e.gun_emplacements[r+1].kills=s}e.stats.kills.guns=a,t.portal.soul_forge.kills+=a,Oa(a),t.stats.dkills+=a;let r=t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=5?6750:7500;t.tech.hell_pit>=7&&i.soul_attractor>0&&(r*=.94**i.soul_attractor);for(let a=0;a=5?4500:5e3;0===Math.rand(0,r)&&(e.soul_forge.gem=!0,e.stats.gems.soul_forge++,t.resource.Soul_Gem.amount++)}let a=t.tech.hell_pit>=6?75e4:1e6;if(t.tech.hell_pit>=7&&i.soul_attractor>0&&(a*=.97**i.soul_attractor),s&&t.portal.soul_forge.kills>=Math.round(a)){e.soul_forge.gem_craft=!0,t.portal.soul_forge.kills=0;let a=10-i.soul_attractor>0?10-i.soul_attractor:1;t.tech.high_tech>=16&&!t.tech.corrupt&&0===Math.rand(0,a+1)?(e.soul_forge.corrupt=!0,t.resource.Corrupt_Gem.amount++,t.resource.Corrupt_Gem.display=!0,Bi(z("portal_corrupt_gem"),"info",!1,["progress","hell"]),t.tech.corrupt=1,gs()):(t.resource.Soul_Gem.amount++,e.stats.gems.crafted++)}}if(t.tech.hell_gate&&t.tech.hell_gate>=3&&s&&i.gate_turret){e.gate_turrets={};let a=0,r=t.tech.hell_gun>=2?65:40,s=t.tech.hell_gun>=2?100:60;for(let t=0;t=5?2700:3e3;for(let a=0;a0&&t.civic.govern.rev--,t.civic.govern.fr>0&&t.civic.govern.fr--,t.civic.govern.rev<0&&(t.civic.govern.rev=0),t.city.ptrait.includes("trashed")||t.race.scavenger?t.civic.scavenger.display=!0:(t.civic.scavenger.display=!1,t.civic.scavenger.workers=0),t.civic.homeless>0){let e=t.arpa.railway?t.arpa.railway.rank:0,a=Math.floor(e/(e+25)*10);Math.rand(0,10)<=a&&t.civic.homeless--}if(t.tech.currency&&t.tech.currency>=2){let e=D("risktaker",0)?2:4;Object.keys(Za).forEach((function(a){let r=t.race.truepath?2*Za[a]:Za[a];if("Copper"===a&&t.tech.high_tech&&t.tech.high_tech>=2&&(r*=2),"Titanium"===a&&(t.tech.titanium&&t.tech.titanium>0?r*=t.resource.Alloy.display?1:2.5:r*=5),t.resource[a].display&&0===Math.rand(0,e)){let e=3*r,s=r/2,i=(Math.rand(0,200)-100)/100,c=t.resource[a].value+i;ce&&(c=e-r),t.resource[a].value=c}}))}if(t.race.blood_thirst&&(t.race.hasOwnProperty("blood_thirst_count")||(t.race.blood_thirst_count=1),t.race.blood_thirst_count>1&&t.race.blood_thirst_count--),t.race.truepath&&t.civic.foreign.gov3.mil<500&&0===Math.rand(0,50)&&t.civic.foreign.gov3.mil++,t.civic.garrison.wounded>0){let e=t.race.regenerative?di.regenerative.vars()[0]:1,a=t.city.hospital?t.city.hospital.count:0;if(t.race.orbit_decayed&&t.race.truepath?a=Math.min(c.operating_base,i.operating_base):t.race.artifical&&t.city.boot_camp&&(a=t.city.boot_camp.count),t.race.rejuvenated&&t.stats.achieve.lamentis){let e=t.stats.achieve.lamentis.l;e>5&&(e=5),a+=e}"cancer"===r&&(a+=U("cancer")[0]),t.tech.medic&&t.tech.medic>=2&&(a*=t.tech.medic),t.race.fibroblast&&(a+=di.fibroblast.vars()[0]*t.race.fibroblast),t.race.cannibalize&&t.city.s_alter&&t.city.s_alter.regen>0&&(a>=20?a*=1+di.cannibalize.vars()[0]/100:a+=Math.floor(di.cannibalize.vars()[0]/5));let s=Oi("mantis");s>0&&(a>=20?a*=1+di.cannibalize.vars(1)[0]/100*s:a+=Math.floor(di.cannibalize.vars(1)[0]/5*s)),t.race.high_pop&&(a*=di.high_pop.vars()[2]);let o=D("nopain",0);o&&(a*=1+o/100);let n=Oi("troll");n>0&&(a+=Math.round(20*di.regenerative.vars(1)[0]*n));let l=20;if(t.race.slow_regen&&(l*=1+di.slow_regen.vars()[0]/100),a=Math.round(a),a>0){for(;a>=l;)e++,a-=l;Math.rand(0,a)>Math.rand(0,l)&&e++}t.civic.garrison.wounded-=e,t.civic.garrison.wounded<0&&(t.civic.garrison.wounded=0)}t.civic.garrison.fatigue&&t.civic.garrison.fatigue>0&&t.civic.garrison.fatigue--,t.civic.garrison.protest&&t.civic.garrison.protest>0&&t.civic.garrison.protest--;let o=t.tech.mercs&&t.tech.mercs>=2?3:4;if(t.civic.garrison.m_use&&t.civic.garrison.m_use>0&&0===Math.rand(0,o)&&t.civic.garrison.m_use--,t.race.rainbow_active&&t.race.rainbow_active>1&&t.race.rainbow_active--,t.city.calendar.day>0){if(t.city.calendar.day++,t.stats.days++,t.city.calendar.day>t.city.calendar.orbit&&(t.city.calendar.day=1,t.city.calendar.year++),t.race.cataclysm||t.race.orbit_decayed)t.city.calendar.season=-1;else{let e=t.city.ptrait.includes("elliptical")?6:4,a=Math.round(t.city.calendar.orbit/e),r=t.city.calendar.day,s=0;for(;r>a;)r-=a,s++;if(t.city.ptrait.includes("elliptical"))switch(s){case 0:t.city.calendar.season=0;break;case 1:case 2:t.city.calendar.season=1;break;case 3:t.city.calendar.season=2;break;default:t.city.calendar.season=3}else t.city.calendar.season=s}if(t.race.cataclysm||t.race.orbit_decayed)t.city.calendar.wind=0,t.city.calendar.temp=1,t.city.calendar.weather=-1;else if(0===Math.rand(0,5)){let e=Math.rand(0,3),a=Math.rand(0,5),r=Math.rand(0,3);switch(t.city.biome){case"oceanic":case"swamp":0===Math.rand(0,2)&&a>0&&a--;break;case"tundra":case"taiga":3===t.city.calendar.season?e=0:0===Math.rand(0,2)&&e>0&&e--;break;case"desert":0===Math.rand(0,2)&&a<4&&a++;break;case"ashland":0===Math.rand(0,2)&&(a<1?a++:a>2&&a--);case"volcanic":1===t.city.calendar.season?e=2:0===Math.rand(0,2)&&e<2&&!t.city.ptrait.includes("permafrost")&&e++}switch(t.city.calendar.season){case 0:0===Math.rand(0,3)&&a>0&&a--;break;case 1:0===Math.rand(0,3)&&e<2&&e++;break;case 2:0===Math.rand(0,3)&&r>0&&r--;break;case 3:0===Math.rand(0,3)&&e>0&&e--}if(t.city.ptrait.includes("stormy")&&r>0&&(t.race.rejuvenated||0===Math.rand(0,2))&&r--,0===a?(t.race.rainbow&&(t.race.rainbow_active=1),t.city.calendar.weather=0):a>=1&&a<=2?(t.race.rainbow&&(t.race.rainbow_active=1),t.city.calendar.weather=1):(t.race.rainbow&&0===t.city.calendar.weather&&(t.race.rainbow_active=Math.rand(10,20)),t.city.calendar.weather=2,t.race.darkness&&0===Math.rand(0,7-di.darkness.vars()[0])&&(t.city.calendar.weather=1)),0===e){let e=t.city.calendar.temp-1;e<0&&(e=0),1===t.city.calendar.season&&0===e&&(e=1),0!==e||"hellscape"!==t.city.biome||t.city.ptrait.includes("permafrost")||(e=1),0===e&&"eden"===t.city.biome&&3!==t.city.calendar.season&&(e=1),t.city.calendar.temp=e}else if(2===e){let e=t.city.calendar.temp+1;e>2&&(e=2),3===t.city.calendar.season&&2===e&&(e=1),2===e&&"eden"===t.city.biome&&1!==t.city.calendar.season&&(e=1),t.city.calendar.temp=e}t.city.calendar.wind=0===r?1:0}2===t.city.calendar.weather?t.city.sun++:t.city.sun=0,0===t.city.calendar.temp?t.city.cold++:t.city.cold=0,2===t.city.calendar.temp?t.city.hot++:t.city.hot=0,t.race.orbit_decayed||(t.city.ptrait.includes("retrograde")?(t.city.calendar.moon--,t.city.calendar.moon<0&&(t.city.calendar.moon=27)):(t.city.calendar.moon++,t.city.calendar.moon>27&&(t.city.calendar.moon=0))),R()}if(!(t.race.cataclysm||t.race.orbit_decayed||t.race.lone_survivor||t.race.vax)){let e=Math.floor(5e7/(1+t.race.mutation))-t.stats.days;if(0===t.race.deterioration&&e<4e7){t.race.deterioration=1;let a=Math.round(e/t.city.calendar.orbit);Bi(z("deterioration1",[Tc("name"),a]),"danger",!1,["progress"])}else if(1===t.race.deterioration&&e<2e7){t.race.deterioration=2;let a=Math.round(e/t.city.calendar.orbit);Bi(z("deterioration2",[Tc("name"),a]),"danger",!1,["progress"])}else if(2===t.race.deterioration&&e<5e6){t.race.deterioration=3;let a=Math.round(e/t.city.calendar.orbit);Bi(z("deterioration3",[Tc("name"),a]),"danger",!1,["progress"])}else if(3===t.race.deterioration&&e<1e6){t.race.deterioration=4;let a=Math.round(e/t.city.calendar.orbit);Bi(z("deterioration4",[Tc("name"),a]),"danger",!1,["progress"])}else 4===t.race.deterioration&&e<=0&&(t.race.deterioration=5,t.race.decayed=t.stats.days,t.tech.decay=1,Bi(z("deterioration5",[Tc("name")]),"danger",!1,["progress"]),gs())}if(t.tech.decay&&t.tech.decay>=2){let e=0;t.genes.minor.fortify&&(e+=t.genes.minor.fortify),t.race.minor.fortify&&(e+=t.race.minor.fortify),t.tech.decay>=3&&(e*=100),t.race.gene_fortify=e}else t.race.gene_fortify=0;if(!t.tech.genesis&&t.race.deterioration>=1&&t.tech.high_tech&&t.tech.high_tech>=10&&(t.tech.genesis=1,Bi(z("genesis"),"special",!1,["progress"]),gs()),t.settings.cLabels&&0===$("#city-dist-outskirts").length&&ms(),!t.settings.cLabels&&$("#city-dist-outskirts").length>0&&ms(),t.tech.xeno&&t.tech.xeno>=5&&!t.tech.piracy&&0===Math.rand(0,5)&&(t.tech.piracy=1,Bi(z("galaxy_piracy_msg",[_i[t.galaxy.alien2.id].name]),"info",!1,["progress"]),Ht()),t.race.cheese&&(t.race.cheese--,t.race.cheese<=0&&delete t.race.cheese),t.tech.piracy&&(t.tech.piracy<1e3||t.tech.xeno>=8&&t.tech.piracy<2500||t.tech.conflict&&t.tech.piracy<5e3)&&t.tech.piracy++,t.portal.archaeology&&t.tech.hasOwnProperty("hell_ruins")&&t.tech.hell_ruins>=2&&!t.tech.hell_vault){let e=Ca("ruins"),a=25e4;t.race.high_pop&&(a=Pe(a)),a=Math.round(a*e.supress)*la(t.civic.archaeologist.workers,"archaeologist")/1e3,Math.rand(0,1e4)+1<=a&&(t.tech.hell_vault=1,Bi(z("portal_ruins_vault"),"info",!1,["progress"]),xa())}if(t.tech.syndicate&&t.race.truepath){let e=Bt();if(Object.keys(e).forEach((function(a){if(e[a].info.hasOwnProperty("syndicate")&&e[a].info.syndicate()){let r=e[a].info.hasOwnProperty("syndicate_cap")?e[a].info.syndicate_cap():500;t.space.syndicate.hasOwnProperty(a)||(t.space.syndicate[a]=0);let s="spc_triton"===a?5:10;t.space.syndicate[a]r&&(t.space.syndicate[a]=r)}})),t.space.hasOwnProperty("shipyard")&&t.space.shipyard.hasOwnProperty("ships")){let e=0,a=0,r=!1;t.space.shipyard.ships.forEach((function(s){if(s.transit>0&&s.fueled){s.transit--;let e=1-s.transit/s.dist,t=Math.abs(s.origin.x-s.destination.x)*e,a=Math.abs(s.origin.y-s.destination.y)*e;s.origin.x<=s.destination.x?s.xy.x=s.origin.x+t:s.xy.x=s.origin.x-t,s.origin.y<=s.destination.y?s.xy.y=s.origin.y+a:s.xy.y=s.origin.y-a}if(0===s.transit&&(s.xy=yt(s.location),s.origin=Ac(s.xy),s.dist=0),s.damage>0&&i.shipyard&&s.damage--,"spc_dwarf"!==s.location&&0===Math.rand(0,10)){let e="spc_triton"===s.location?2:1;switch(s.armor){case"steel":s.damage+=Math.rand(1,8*e);break;case"alloy":s.damage+=Math.rand(1,6*e);break;case"neutronium":s.damage+=Math.rand(1,4*e)}s.damage>90&&(s.damage=90)}t.tech.hasOwnProperty("eris_scan")&&"spc_eris"===s.location&&0===s.transit&&(e+=gt(s)),t.tech.hasOwnProperty("tauceti")&&"tauceti"===s.location&&0===s.transit&&(a+=gt(s),r=s.name)})),t.tech.hasOwnProperty("eris_scan")&&t.tech.hasOwnProperty("eris")&&1===t.tech.eris&&e>50&&(t.tech.eris_scan+=e-50,t.tech.eris_scan>=100&&(t.tech.eris_scan=100,t.tech.eris=2,Bi(z("space_eris_scan",[ea().eris]),"info",!1,["progress"]),Ht())),t.tech.hasOwnProperty("tauceti")&&t.tech.tauceti>=1&&a>=1&&1===t.tech.tauceti&&(t.tauceti.orbital_station={count:0,on:0,support:0,s_max:0},t.tauceti.orbital_platform={count:0,on:0,support:0,s_max:0},t.tech.tauceti=2,t.settings.showTau=!0,t.settings.tau.home=!0,t.settings.tau.red=!0,t.settings.tau.gas=!1,t.settings.tau.roid=!1,Bi(z("tau_scan",[r]),"info",!1,["progress"]),at()),t.space.hasOwnProperty("position")&&Object.keys(ft).forEach((function(e){if(t.space.position.hasOwnProperty(e)){let a=-1===ft[e].orbit?t.city.calendar.orbit:ft[e].orbit;if(-2===a)return;0===a?t.space.position[e]=0:(t.space.position[e]+=+(360/a).toFixed(4),t.space.position[e]>=360&&(t.space.position[e]-=360))}})),$("#mapCanvas").length>0&&Pt()}t.tech.triton&&t.tech.triton>=3&&function(){if(t.space.fob){if(t.space.fob.enemy<=1e3){let e=t.tech.outer&&t.tech.outer>=4?125:100;t.space.fob.enemy+=Math.rand(25,e)}let e=Math.ceil(ua(t.space.fob.enemy)/5),a=t.civic.garrison.wounded-Me();a<0&&(a=0);let r=qe(t.space.fob.troops,"army",a),s=Math.rand(0,a+1);t.civic.garrison.workers-=s,t.stats.died+=s,t.civic.garrison.wounded-=s,t.space.fob.enemy-=Math.rand(0,r),t.space.fob.enemy<0&&(t.space.fob.enemy=0);let i=Math.rand(0,t.space.fob.troops+1);if(i>e&&(i=e),t.race.armored&&(i-=ua(1)),t.race.scales&&(i-=ua(1)),t.tech.armor&&(i-=ua(t.tech.armor)),i<0&&(i=0),t.race.revive&&s>0){let e=Math.round(Math.rand(0,s+1));t.civic.garrison.workers+=e}t.civic.garrison.wounded+=i,t.civic.garrison.wounded>Me(!1,!0)&&(t.civic.garrison.wounded=Me(!1,!0));{let e=t.civic.garrison.wounded-Me();e<0&&(e=0);let a=t.space.fob.enemy-qe(t.space.fob.troops,"army",e);a<=0&&t.space.crashed_ship.count<100?t.space.crashed_ship.count++:a>0&&t.space.crashed_ship.count>0&&t.space.crashed_ship.count--,100===t.space.crashed_ship.count&&(t.resource.Cipher.display=!0)}}}(),t.tech.eris&&t.tech.eris>=3&&function(){if(t.space.digsite){if(t.space.digsite.enemy<=1e4){let e=250;t.space.digsite.enemy+=Math.rand(25,e)}let e=qe(c.shock_trooper,"army",0);c.tank&&(e+=100*c.tank),e*=mt("spc_eris"),t.space.digsite.enemy-=Math.rand(0,e),t.space.digsite.enemy<0?t.space.digsite.enemy=0:t.space.digsite.enemy>1e4&&(t.space.digsite.enemy=1e4),t.space.digsite.count=Math.floor(100-t.space.digsite.enemy/100)}}()}if((t.stats.matrix>0||t.stats.retire>0)&&!t.race.servants&&0===Math.rand(0,25)){let e=t.stats.matrix+t.stats.retire+t.stats.eden,a=t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=5?2:0;a+=Math.min(t.stats.matrix,t.stats.retire),t.stats.achieve.overlord&&t.stats.achieve.overlord.l>=5&&ta.forEach((function(r){t.stats.achieve.overlord[r]>=5&&(a++,e+=2)})),t.race.servants={max:e,used:0,smax:a,sused:0,jobs:{},sjobs:{},force_scavenger:!1},Bi(e+a===1?z("civics_servants_msg1"):z("civics_servants_msg2",[e+a]),"caution",!1,["events","major_events"])}if(t.race.truepath&&t.tech.focus_cure&&t.tech.focus_cure>=2&&t.tauceti.infectious_disease_lab)if(t.tauceti.infectious_disease_lab.cure<100){let e=(c.infectious_disease_lab||0)/100;e>1&&(e=1);let a=+Tc("curve",e).toFixed(5)/5;t.tauceti.infectious_disease_lab.cure+=a,t.tauceti.infectious_disease_lab.cure>100&&(t.tauceti.infectious_disease_lab.cure=100)}else if(t.tauceti.infectious_disease_lab.cure>=100&&2===t.tech.focus_cure)t.tech.focus_cure=3,"synthetic"===_i[t.race.species].type?Bi(z("tech_decode_virus_msg2s"),"info",!1,["progress"]):Bi(z("tech_decode_virus_msg2"),"info",!1,["progress"]);else if(t.tech.focus_cure>=4&&t.race.hasOwnProperty("vax")){let e=t.race.artifical?t.city.boot_camp.count:t.city.hospital.count;if(t.race.orbit_decayed&&(e=Math.min(c.operating_base,i.operating_base)),4===t.tech.focus_cure&&t.race.vax<25)t.race.vax+=Math.rand(0,2*e)/150;else if(4===t.tech.focus_cure&&t.race.vax>=25)t.tech.focus_cure=5,Bi(z("tech_vaccine_campaign_msg1"),"info",!1,["progress"]);else if(5===t.tech.focus_cure&&t.race.vax<50)t.race.vax+=Math.rand(0,2*e)/450;else if(5===t.tech.focus_cure&&t.race.vax<75)t.race.vax+=Math.rand(0,2*e)/1200;else if(6===t.tech.focus_cure&&t.race.vax<100){let a=1e3;t.tech.vax_p?a=250:t.tech.vax_s?a=390:t.tech.vax_f?a=25:t.tech.vax_c&&(a=125),t.race.vax+=Math.rand(0,2*e)/a}else t.race.vax>=100&&t.tech.focus_cure<=6&&(t.race.vax=100,t.tech.focus_cure=7,Bi(z("tech_vaccine_campaign_msg2"),"info",!1,["progress"]),B("assemble"))}if(t.race.infiltrator){let e=t.tech.world_control?"trait_infiltrator_steal_alt":"trait_infiltrator_steal",a=di.infiltrator.vars()[0]/100;t.resource.Knowledge.max>=Zr.tech.steel.cost.Knowledge()*a&&!t.race.steelen&&t.tech.smelting&&1===t.tech.smelting&&(Bi(z(e,[z("tech_steel")]),"info",!1,["progress"]),t.resource.Steel.display=!0,t.tech.smelting=2,Qs(),gs()),t.resource.Knowledge.max>=Zr.tech.electricity.cost.Knowledge()*a&&t.tech.high_tech&&1===t.tech.high_tech&&(Bi(z(e,[z("tech_electricity")]),"info",!1,["progress"]),t.tech.high_tech=2,t.city.power=0,t.city.powered=!0,t.city.coal_power={count:0,on:0},t.settings.showPowerGrid=!0,ai(),gs(),ms()),t.resource.Knowledge.max>=Zr.tech.electronics.cost.Knowledge()*a&&t.tech.high_tech&&3===t.tech.high_tech&&t.tech.titanium&&(Bi(z(e,[z("tech_electronics")]),"info",!1,["progress"]),t.tech.high_tech=4,t.race.terrifying&&(t.tech.gambling=1,t.city.casino={count:0},t.space.spc_casino={count:0}),gs(),ms()),t.resource.Knowledge.max>=Zr.tech.fission.cost.Knowledge()*a&&t.tech.high_tech&&4===t.tech.high_tech&&t.tech.uranium&&(Bi(z(e,[z("tech_fission")]),"info",!1,["progress"]),t.tech.high_tech=5,t.city.fission_power={count:0,on:0},gs(),ms()),t.resource.Knowledge.max>=Zr.tech.rocketry.cost.Knowledge()*a&&t.tech.high_tech&&6===t.tech.high_tech&&(Bi(z(e,[z("tech_rocketry")]),"info",!1,["progress"]),t.tech.high_tech=7,t.race.truepath&&!t.tech.rival&&(t.tech.rival=1,Bi(z("civics_rival_unlocked",[te(3)]),"info",!1,["progress","combat"])),Ce("Physics"),gs(),ms()),t.resource.Knowledge.max>=Zr.tech.artifical_intelligence.cost.Knowledge()*a&&t.tech.high_tech&&9===t.tech.high_tech&&(Bi(z(e,[z("tech_artificial_intelligence")]),"info",!1,["progress"]),t.tech.high_tech=10,gs(),ms()),t.resource.Knowledge.max>=Zr.tech.quantum_computing.cost.Knowledge()*a&&t.tech.high_tech&&10===t.tech.high_tech&&t.tech.nano&&(Bi(z(e,[z("tech_quantum_computing")]),"info",!1,["progress"]),t.tech.high_tech=11,gs(),ms()),t.resource.Knowledge.max>=Zr.tech[t.race.truepath?"virtual_reality_tp":"virtual_reality"].cost.Knowledge()*a&&t.tech.high_tech&&11===t.tech.high_tech&&t.tech.stanene&&(t.tech.infernite&&t.tech.alpha&&t.tech.alpha>=2||t.race.truepath)&&(Bi(z(e,[z("tech_virtual_reality")]),"info",!1,["progress"]),t.tech.high_tech=12,gs(),ms()),t.race.truepath?(t.resource.Knowledge.max>=Zr.tech.quantium.cost.Knowledge()*a&&t.tech.supercollider&&t.tech.supercollider>=10&&t.tech.enceladus&&t.tech.enceladus>=3&&!t.tech.quantium&&(Bi(z(e,[z("tech_quantium")]),"info",!1,["progress"]),t.tech.quantium=1,t.resource.Quantium.display=!0,gs(),ma()),t.resource.Knowledge.max>=Zr.tech.alien_biotech.cost.Knowledge()*a&&t.tech.genetics&&t.tech.genetics>=8&&t.tech.kuiper&&!t.tech.biotech&&(Bi(z(e,[z("tech_alien_biotech")]),"info",!1,["progress"]),t.tech.biotech=1,gs())):(t.resource.Knowledge.max>=Zr.tech.shields.cost.Knowledge()*a&&t.tech.high_tech&&13===t.tech.high_tech&&(Bi(z(e,[z("tech_shields")]),"info",!1,["progress"]),t.tech.high_tech=14,t.settings.space.neutron=!0,t.settings.space.blackhole=!0,gs(),ms()),t.resource.Knowledge.max>=Zr.tech.ai_core.cost.Knowledge()*a&&t.tech.high_tech&&14===t.tech.high_tech&&t.tech.blackhole&&t.tech.blackhole>=3&&(Bi(z(e,[z("tech_ai_core")]),"info",!1,["progress"]),t.tech.high_tech=15,t.interstellar.citadel={count:0,on:0},gs(),ms()),t.resource.Knowledge.max>=Zr.tech.graphene_processing.cost.Knowledge()*a&&t.tech.ai_core&&2===t.tech.ai_core&&(Bi(z(e,[z("tech_graphene_processing")]),"info",!1,["progress"]),t.tech.ai_core=3,gs()),t.resource.Knowledge.max>=Zr.tech.nanoweave.cost.Knowledge()*a&&t.tech.science&&t.tech.science>=18&&!t.tech.nanoweave&&(Bi(z(e,[z("tech_nanoweave")]),"info",!1,["progress"]),t.tech.nanoweave=1,t.resource.Nanoweave.display=!0,gs(),ma()),t.resource.Knowledge.max>=Zr.tech.orichalcum_analysis.cost.Knowledge()*a&&t.tech.high_tech&&16===t.tech.high_tech&&t.tech.chthonian&&t.tech.chthonian>=3&&(Bi(z(e,[z("tech_orichalcum_analysis")]),"info",!1,["progress"]),Bi(z("tech_orichalcum_analysis_result"),"info",!1,["progress"]),t.tech.high_tech=17,gs(),ms()),t.resource.Knowledge.max>=Zr.tech.infernium_fuel.cost.Knowledge()*a&&t.tech.smelting&&7===t.tech.smelting&&t.tech.hell_ruins&&t.tech.hell_ruins>=4&&(Bi(z(e,[z("tech_infernium_fuel")]),"info",!1,["progress"]),t.tech.smelting=8,Qs(),gs()))}let l=Oi("moldling");if(l>0){let e="trait_infiltrator_thrall",a=di.infiltrator.vars(1)[0]/100*l;l>=.02&&t.resource.Knowledge.max>=Zr.tech.smelting.cost.Knowledge()*a&&ds("smelting",!1)&&!t.tech.smelting&&(Bi(z(e,[z("tech_smelting")]),"info",!1,["progress"]),t.tech.smelting=1,t.city.smelter={count:0,cap:0,Wood:0,Coal:0,Oil:0,Star:0,StarCap:0,Inferno:0,Iron:0,Steel:0,Iridium:0},t.race.steelen&&(t.tech.smelting=2),gs()),l>=.04&&t.resource.Knowledge.max>=Zr.tech.dynamite.cost.Knowledge()*a&&ds("dynamite",!1)&&t.tech.explosives&&1===t.tech.explosives&&(Bi(z(e,[z("tech_dynamite")]),"info",!1,["progress"]),t.tech.explosives=2,gs()),l>=.8&&t.resource.Knowledge.max>=Zr.tech.portland_cement.cost.Knowledge()*a&&ds("portland_cement",!1)&&t.tech.cement&&3===t.tech.cement&&(Bi(z(e,[z("tech_portland_cement")]),"info",!1,["progress"]),t.tech.cement=4,gs()),l>=.12&&t.resource.Knowledge.max>=Zr.tech.oxygen_converter.cost.Knowledge()*a&&ds("oxygen_converter",!1)&&t.tech.smelting&&4===t.tech.smelting&&(Bi(z(e,[z("tech_oxygen_converter")]),"info",!1,["progress"]),t.tech.smelting=5,gs()),l>=.15&&t.resource.Knowledge.max>=Zr.tech.machinery.cost.Knowledge()*a&&ds("machinery",!1)&&t.tech.foundry&&6===t.tech.foundry&&(Bi(z(e,[z("tech_machinery")]),"info",!1,["progress"]),t.tech.foundry=7,gs()),l>=.2&&t.resource.Knowledge.max>=Zr.tech.uranium_storage.cost.Knowledge()*a&&ds("uranium_storage",!1)&&t.tech.uranium&&1===t.tech.uranium&&(Bi(z(e,[z("tech_uranium_storage")]),"info",!1,["progress"]),t.tech.uranium=1,gs()),l>=.25&&t.resource.Knowledge.max>=Zr.tech.synthetic_fur.cost.Knowledge()*a&&ds("synthetic_fur",!1)&&!t.tech.synthetic_fur&&(Bi(z(e,[Zr.tech.synthetic_fur.title()]),"info",!1,["progress"]),t.tech.synthetic_fur=1,gs()),l>=.35&&t.resource.Knowledge.max>=Zr.tech.rover.cost.Knowledge()*a&&ds("rover",!1)&&t.tech.space_explore&&1===t.tech.space_explore&&(Bi(z(e,[z("tech_rover")]),"info",!1,["progress"]),t.tech.space_explore=2,t.settings.space.moon=!0,t.space.moon_base={count:0,on:0,support:0,s_max:0},gs());let r="trait_infiltrator_thrall_alt";l>=.4&&t.resource.Knowledge.max>=Zr.tech.starcharts.cost.Knowledge()*a&&ds("starcharts",!1)&&t.tech.space_explore&&3===t.tech.space_explore&&(Bi(z(r,[z("tech_starcharts")]),"info",!1,["progress"]),t.tech.space_explore=4,gs()),l>=.5&&t.resource.Knowledge.max>=Zr.tech.nano_tubes.cost.Knowledge()*a&&ds("nano_tubes",!1)&&!t.tech.nano&&(Bi(z(r,[z("tech_nano_tubes")]),"info",!1,["progress"]),t.tech.nano=1,t.resource.Nano_Tube.display=!0,gs()),t.race.truepath?(l>=.65&&t.resource.Knowledge.max>=Zr.tech.stanene_tp.cost.Knowledge()*a&&ds("stanene_tp",!1)&&!t.tech.stanene&&(Bi(z(r,[z("tech_stanene")]),"info",!1,["progress"]),t.tech.stanene=1,t.resource.Stanene.display=!0,gs()),l>=.8&&t.resource.Knowledge.max>=Zr.tech.anitgrav_bunk.cost.Knowledge()*a&&ds("anitgrav_bunk",!1)&&t.tech.marines&&1===t.tech.marines&&(Bi(z(r,[z("tech_anitgrav_bunk")]),"info",!1,["progress"]),t.tech.marines=2,gs())):(l>=.65&&t.resource.Knowledge.max>=Zr.tech.stanene.cost.Knowledge()*a&&ds("stanene",!1)&&!t.tech.stanene&&(Bi(z(r,[z("tech_stanene")]),"info",!1,["progress"]),t.tech.stanene=1,t.resource.Stanene.display=!0,gs()),l>=.78&&t.resource.Knowledge.max>=Zr.tech.hydroponics.cost.Knowledge()*a&&ds("hydroponics",!1)&&t.tech.mars&&5===t.tech.mars&&(Bi(z(r,[z("tech_hydroponics")]),"info",!1,["progress"]),t.tech.mars=6,gs()),l>=.92&&t.resource.Knowledge.max>=Zr.tech.orichalcum_panels.cost.Knowledge()*a&&ds("orichalcum_panels",!1)&&t.tech.swarm&&5===t.tech.swarm&&(Bi(z(r,[z("tech_orichalcum_panels")]),"info",!1,["progress"]),t.tech.swarm=6,gs()),l>=1&&t.resource.Knowledge.max>=Zr.tech.cybernetics.cost.Knowledge()*a&&ds("cybernetics",!1)&&t.tech.high_tech&&17===t.tech.high_tech&&(Bi(z(r,[z("tech_cybernetics")]),"info",!1,["progress"]),t.tech.high_tech=18,gs()))}t.race.truepath&&t.tech.tauceti&&3===t.tech.tauceti&&t.space.hasOwnProperty("jump_gate")&&t.tauceti.hasOwnProperty("jump_gate")&&t.space.jump_gate.count>=100&&t.tauceti.jump_gate.count>=100&&(t.tech.tauceti=4,t.resource.Materials.display=!1,t.resource.Bolognium.display=!0,Ht(),at(),gs()),t.race.truepath&&t.tech.tauceti&&!t.race.lone_survivor?5!==t.tech.tauceti||t.tech.plague||0!==Math.rand(0,50)?t.tech.plague&&t.tech.tau_roid&&t.tech.tau_whale&&(1===t.tech.plague&&(t.tech.tau_roid>=4||t.tech.tau_whale>=2)&&0===Math.rand(0,50)?(t.tech.plague=2,t.race.quarantine=1,t.race.qDays=0,Bi(z("tau_plague2",[te(3)]),"info",!1,["progress"])):2===t.tech.plague&&t.tech.tau_roid>=5&&t.tech.tau_whale>=2&&0===Math.rand(0,50)?(t.tech.plague=3,t.race.quarantine=2,t.race.qDays=0,Bi(z("tau_plague3",[te(3),_i[t.race.species].home]),"info",!1,["progress"])):t.tech.isolation?t.tech.plague<5&&0===Math.rand(0,50)&&(t.tech.plague=5,Bi(z("tau_plague5b",[_i[t.race.species].home]),"info",!1,["progress"]),gs()):3===t.tech.plague&&t.tech.disease&&t.tech.disease>=2&&0===Math.rand(0,50)?(t.tech.plague=4,t.race.quarantine=3,t.race.qDays=0,Bi(z("tau_plague5a",[_i[t.race.species].home]),"info",!1,["progress"])):4===t.tech.plague&&t.tech.disease&&t.tech.disease>=3&&0===Math.rand(0,50)&&(t.tech.plague=5,t.race.quarantine=4,t.race.qDays=0,Bi(z("tau_plague5a",[_i[t.race.species].home]),"info",!1,["progress"])),t.race.quarantine&&(t.race.hasOwnProperty("qDays")||(t.race.qDays=0),t.race.qDays++)):(t.tech.plague=1,Bi(z("tau_plague",[te(3)]),"info",!1,["progress"])):t.tech.tau_gas&&t.tech.tau_gas>=4&&!t.tech.plague&&t.race.lone_survivor&&(t.tech.plague=5),t.civic.govern.protest&&t.civic.govern.protest>0&&t.civic.govern.protest--,t.civic.govern.scandal&&t.civic.govern.scandal>0&&t.civic.govern.scandal--;{let e=me("tax_cap"),a=me("tax_cap",!0);t.civic.taxes.tax_rate>e?t.civic.taxes.tax_rate=e:t.civic.taxes.tax_rate0){let e=0;for(let a=0;a3&&(s=t.genes.plasma>=2?s>5?5:s:3),e+=s}t.race.p_mutation=e}!t.tech.whitehole&&t.interstellar.stellar_engine&&t.interstellar.stellar_engine.exotic>=.025?(t.tech.whitehole=1,t.tech.stablized&&delete t.tech.stablized,Bi(z("interstellar_blackhole_unstable"),"danger",!1,["progress"]),gs()):t.interstellar.stellar_engine&&t.interstellar.stellar_engine.exotic>=.025&&t.tech.whitehole&&t.tech.stablized&&(delete t.tech.stablized,gs()),!t.tech.xeno&&t.galaxy.scout_ship&&t.galaxy.scout_ship.on>0&&0===Math.rand(0,10)&&(t.tech.xeno=1,t.galaxy.scout_ship.count--,t.galaxy.scout_ship.on--,t.galaxy.scout_ship.crew--,t.galaxy.scout_ship.mil--,t.resource[t.race.species].amount--,t.civic.garrison.workers--,t.civic.garrison.crew--,Bi(z("galaxy_encounter"),"info",!1,["progress"]),gs()),t.galaxy.scavenger&&t.tech.conflict&&4===t.tech.conflict&&n.scavenger>0&&Math.rand(0,50)<=n.scavenger&&(t.tech.conflict=5,Bi(z("galaxy_scavenger_find"),"info",!1,["progress"]),gs()),t.tech.syndicate||t.race.lone_survivor||!t.tech.outer||0!==Math.rand(0,20)||(Bi(z("outer_syndicate",[te(4)]),"info",!1,["progress"]),t.tech.syndicate=1,t.space.syndicate={}),!t.tech.corrupted_ai&&i.ai_core2&&100===$t()&&(t.tech.corrupted_ai=1,gs()),t.arpa.sequence&&t.arpa.sequence.auto&&t.tech.genetics&&7===t.tech.genetics&&Po(),t.race.orbit_decay&&(t.race.orbit_decayed||$("#infoTimer").html("T-"+(t.race.orbit_decay-t.stats.days)),function(){if(t.race.orbit_decay&&t.stats.hasOwnProperty("days")&&t.stats.days>=t.race.orbit_decay&&!t.race.orbit_decayed){t.race.orbit_decayed=!0,Bi(z("evo_challenge_orbit_decayed_msg",[_i[t.race.species].home]),"info",!1,["progress"]),"magic"===t.race.universe&&(t.city.pylon&&(t.space.pylon={count:Math.ceil(t.city.pylon.count/2)}),t.race.casting&&Object.keys(t.race.casting).forEach((function(e){t.race.casting[0]=0}))),Object.keys(Zr.city).forEach((function(e){t.city.hasOwnProperty(e)&&t.city[e].hasOwnProperty("count")&&(t.race.hooved&&Zr.city[e].cost.hasOwnProperty("Horseshoe")&&(t.race.shoecnt-=Zr.city[e].cost.Horseshoe()*t.city[e].count),t.city[e].count=0,t.city[e].hasOwnProperty("on")&&(t.city[e].on=0))})),t.race.hooved&&t.race.shoecnt<5&&(t.race.shoecnt=5),t.resource.Zen.display&&(t.resource.Zen.display=!1),t.resource.Slave.display&&(t.resource.Slave.display=!1,t.resource.Slave.amount=0,B("slave")),t.race.deconstructor&&Js.forEach((function(e){t.city.nanite_factory[e]=0})),Object.keys(t.resource).forEach((function(e){t.resource[e].hasOwnProperty("trade")&&(t.resource[e].trade=0)})),t.space.red_university={count:0},Object.keys(Zr.space.spc_moon).forEach((function(e){t.space.hasOwnProperty(e)&&t.space[e].hasOwnProperty("count")&&(t.space[e].count=0,t.space[e].hasOwnProperty("on")&&(t.space[e].on=0))})),Object.keys(oa).forEach((function(e){"colonist"!==e&&(t.civic[e].workers=0,t.civic[e].assigned=0)})),["bolognium_ship","scout_ship","corvette_ship","frigate_ship","cruiser_ship","dreadnought","freighter","super_freighter","armed_miner","scavenger"].forEach((function(e){t.galaxy[e]&&(t.galaxy[e].on=0)})),t.portal.transport&&(t.portal.transport.on=0),["forager","farmer","lumberjack","quarry_worker"].forEach((function(e){t.civic[e].display=!1})),t.civic.hunter.display?t.civic.d_job="hunter":t.civic.d_job="unemployed";for(let e of Object.values(t.race.purgatory.city))e.hasOwnProperty("count")&&(e.count=0),e.hasOwnProperty("on")&&(e.on=0);if(t.queue.hasOwnProperty("queue"))for(let e=t.queue.queue.length-1;e>=0;e--){let a=t.queue.queue[e];("city"===a.action||"space"===a.action&&Zr.space.spc_moon[a.type])&&t.queue.queue.splice(e,1)}t.arpa.sequence&&(t.arpa.sequence.on=!1,t.arpa.sequence.boost=!1),t.city.calendar.moon=0,document.getElementById("moon").removeAttribute("class"),$("#moon").addClass("moon wi wi-moon-new"),t.settings.spaceTabs=1,t.settings.space.moon=!1,t.settings.showCity=!1,sc($("#infoTimer")),Ht()}}()),function(){if(t.genes.governor&&t.tech.governor&&t.race.governor&&t.race.governor.g&&t.race.governor.tasks){let e=[0,1,2];t.genes.governor>=2&&(e.push(e.length),D("organizer",0)&&e.push(e.length)),D("organizer",0)&&e.push(e.length),e.forEach((function(e){G[t.race.governor.tasks[`t${e}`]]&&G[t.race.governor.tasks[`t${e}`]].req()&&G[t.race.governor.tasks[`t${e}`]].task()}))}}()}if(!t.race.seeded||t.race.seeded&&t.race.chose){if(0===Math.rand(0,t.event.t)){let e=mo("major");if(e.length>0){let a=e[Math.floor(g(0,e.length))];Bi(uo[a].effect(),"caution",!1,["events","major_events"]),t.event.l=a}t.event.t=999,"pisces"===r&&(t.event.t-=U("pisces")[0])}else t.event.t--;if("protoplasm"!==t.race.species)if(0===Math.rand(0,t.m_event.t)){let e=mo("minor");if(e.length>0){let a=e[Math.floor(g(0,e.length))];Bi(uo[a].effect(),!1,!1,["events","minor_events"]),t.m_event.l=a}t.m_event.t=850,"pisces"===r&&(t.m_event.t-=U("pisces")[1])}else t.m_event.t--;if(t.race.witch_hunter&&t.resource.Sus.amount>=100){let e=300-t.resource.Sus.amount;e<1&&(e=1),0===Math.rand(0,e)&&Bi(uo.witch_hunt_crusade.effect(),"caution",!1,["events","major_events"])}if(t.race.witch_hunter&&t.resource.Sus.amount>=50&&t.civic.scientist.workers>0){let e=250-2*t.resource.Sus.amount;e<50&&(e=50),0===Math.rand(0,e)&&Bi(uo.witch_hunt.effect(),!1,!1,["events","minor_events"])}}11===a.getMonth()&&a.getDate()>=17&&a.getDate()<=24?(t.special.gift[`g${a.getFullYear()}`]=!0,t.tech.santa=1):delete t.tech.santa,Ec("fool")?$("body").hasClass("fool")||($("body").addClass("fool"),ao({fool:!0})):$("body").hasClass("fool")&&($("body").removeClass("fool"),ao()),t.stats.current=Date.now(),t.race.hasOwnProperty("geck")||e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),"protoplasm"!==t.race.species&&(t.stats.days+t.stats.tdays)%1e5==99999&&Bi(z("backup_warning"),"advanced",!0),--Mo<=0&&(Mo=60,Vi("page_view",{page_title:"Game Loop"})),t.settings.pause&&P.s&&Ki("stop"),d.t>0&&(d.t--,t.settings.at--,(t.settings.at<=0||d.t<=0)&&(t.settings.at=0,Ki("stop"),Ki("start")))}()}}),!1)),Ki("start"),jo();var xo=!0,ko=t.arpa.sequence&&t.arpa.sequence.on?t.arpa.sequence.on:0;let qo={1:1.1,2:1.25,3:1.5};var Mo=60;function Po(){if(t.resource.Knowledge.amount>=2e5&&t.resource.Knowledge.amount>=t.resource.Knowledge.max-1e4){t.resource.Knowledge.amount-=2e5;let e=t.genes.synthesis?qo[t.genes.synthesis]:1;t.resource.Genes.amount+=e}}function Oo(e){if(t.tech.high_tech&&t.tech.high_tech>=11){let r=t.resource.Knowledge.max,s=25e4,c=0;for(;r>s;)r-=s,s*=1.1,c++;if(c+=+(r/s).toFixed(2),t.interstellar.citadel){let a=e?t.interstellar.citadel.on:i.citadel;t.tech.high_tech&&t.tech.high_tech>=15&&a>0&&(c*=1+.05*a)}if(t.space.ai_core2){let a=e?t.space.ai_core2.on:i.ai_core2;t.tech.titan_ai_core&&a>0&&(c*=1.25)}if(t.stats.achieve.obsolete&&t.stats.achieve.obsolete.l>=5&&t.prestige.AICore.count>0&&(c*=2-.99**t.prestige.AICore.count),t.race.linked){let e=di.linked.vars()[0]/100*t.resource[t.race.species].amount;e>di.linked.vars()[1]/100&&(e-=di.linked.vars()[1]/100,e/=e+200-di.linked.vars()[1],e+=di.linked.vars()[1]/100),c*=1+e}a=+c.toFixed(3),u=a}var a}function Co(){!1===t.resource.Steel.display&&0===Math.rand(0,1250)&&(t.resource.Steel.display=!0,Ji("Steel",1),Bi(z("steel_sample"),"info",!1,["progress"]))}function jo(){["#resources > .resource",".tab-item > .market-item","#galaxyTrade > .market-item"].forEach((function(e){let t=!1;$(`${e}:visible`).each((function(){t?($(this).addClass("alt"),t=!1):($(this).removeClass("alt"),t=!0)}))}))}function So(e){let a=!(!t.race.elusive&&0!==Math.floor(g(0,3))),r=Oi("satyr");if(r>0&&Math.floor(g(0,100))<=100*r&&(a=!0),!a&&t.civic.foreign[`gov${e}`].spy>0&&(t.civic.foreign[`gov${e}`].spy-=1),a||0!==Math.floor(g(0,4)))Bi(z(a?"event_spy_fail":"event_spy",[te(e)]),"danger",!1,["spy"]);else{Bi(z("event_spy_sellout",[te(e)]),"danger",!1,["spy"]);let a=t.race.mistrustful?5+di.mistrustful.vars()[0]:5;t.civic.foreign[`gov${e}`].hstl+=Math.floor(g(1,a)),t.civic.foreign[`gov${e}`].hstl>100&&(t.civic.foreign[`gov${e}`].hstl=100)}}O.version_check=setInterval((function(){$.ajax({url:"https://pmotschmann.github.io/Evolve/package.json",type:"GET",dataType:"json",success:function(e){e.version&&e.version!=t.version&&!t.beta&&$("#topBar .version > a").html(`${z("update_avail")} v`+t.version+wo)}})}),9e5),Ei("versionLog",function(e){let t=0;for(t=0;t=0;a--){e.append(`

        v${go[a].version}${go[a].hasOwnProperty("revision")?go[a].revision:""}

        ${go[a].date}
        `);for(let t=0;t${go[a].changes[t]}`)}return e}($('
        ')),{wide:!0}),t.race.start_cataclysm&&t.race.start_cataclysm&&(delete t.race.start_cataclysm,Ns())})(); \ No newline at end of file +(()=>{"use strict";var e=window.localStorage,t={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}},a={},r={c:{},p:{}},s={},i={},c={},o={},n={},l={},u=0,d={t:0};var _={},p={},h={view:"all"};const m=["all","progress","queue","building_queue","research_queue","combat","spy","events","major_events","minor_events","achievements","hell"];function g(e,a,r){return a=a||1,e=e||0,t[r?"warseed":"seed"]=(9301*t[r?"warseed":"seed"]+49297)%233280,e+t[r?"warseed":"seed"]/233280*(a-e)}Math.rand=function(e,t){return Math.floor(Math.random()*(t-e))+e},t.seed=2,t.warseed=2;{let a=e.getItem("evolved")||!1;if(a){let e=JSON.parse(LZString.decompressFromUTF16(a));e?t=e:v()}else v()}if(t.version||(t.version="0.2.0"),w(t.version)<2060&&Object.keys(t.resource).forEach((function(e){t.resource[e].crates&&(t.resource[e].crates=Math.ceil(t.resource[e].crates/5)),t.resource[e].containers&&(t.resource[e].containers=Math.ceil(t.resource[e].containers/5))})),w(t.version)<2062&&void 0!==t.civic.taxes)switch(Number(t.civic.taxes.tax_rate)){case 0:t.civic.taxes.tax_rate=0;break;case 1:t.civic.taxes.tax_rate=10;break;case 2:t.civic.taxes.tax_rate=20;break;case 3:t.civic.taxes.tax_rate=30;break;case 4:t.civic.taxes.tax_rate=40;break;case 5:t.civic.taxes.tax_rate=50}if(2062===w(t.version)&&void 0!==t.civic.taxes&&2==t.civic.taxes.tax_rate&&(t.civic.taxes.tax_rate=20),w(t.version)<2065&&void 0!==t.race&&"sporgar"===t.race.species&&(delete t.race.crafty,delete t.race.hydrophilic,t.race.infectious=1,t.race.parasite=1,!t.tech.military&&t.tech.primitive&&t.tech.primitive>=3&&(t.civic.garrison.display=!0,t.settings.showCivic=!0,t.city.garrison={count:0})),w(t.version)<3002&&t.space&&(t.tech.space&&t.tech.space>=4&&(t.space.living_quarters||(t.space.living_quarters={count:0,on:0}),t.space.garage||(t.space.garage={count:0}),t.space.red_mine||(t.space.red_mine={count:0,on:0}),t.space.fabrication||(t.space.fabrication={count:0,on:0}),t.space.laboratory||(t.space.laboratory={count:0,on:0})),t.tech.space&&t.tech.space>=3&&(t.space.iridium_mine||(t.space.iridium_mine={count:0,on:0}),t.space.helium_mine||(t.space.helium_mine={count:0,on:0})),t.tech.hell&&(t.space.geothermal||(t.space.geothermal={count:0,on:0}))),w(t.version)<3004&&t.settings&&t.settings.space&&t.settings.space.belt&&(t.space.space_station={count:0,on:0,support:0,s_max:0}),w(t.version)<4001&&t.city&&t.city.factory&&!t.city.factory.Nano&&(t.city.factory.Nano=0),w(t.version)<4003&&t.stats.achieve&&Object.keys(t.stats.achieve).forEach((function(e){t.stats.achieve[e]=1})),w(t.version)<4028&&t.stats.achieve&&t.stats.achieve.genus_demonic&&(t.stats.achieve.biome_hellscape=t.stats.achieve.genus_demonic),w(t.version)<4029&&t.race.mutation&&t.race.mutation>0){t.resource.Genes={name:"Genes",display:!0,value:0,amount:0,crates:0,diff:0,delta:0,max:-2,rate:0};for(let e=0;e=3&&(t.tech.wind_plant=1,t.tech.hunting=2);let e=["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 e=1;t.race.no_trade&&e++,t.race.no_craft&&e++,t.race.no_crispr&&e++,t.race.weak_mastery&&e++,t.stats.achieve.cross={l:e,a:e}}if(w(t.version)<7e3&&(t.civic.govern||(t.civic.govern={type:"oligarchy",rev:0,fr:0})),w(t.version)<7004&&t.queue&&t.queue.queue)for(let e=0;e0&&(t.stats.harmony=parseFloat(t.stats.harmony.toFixed(2)),t.race.Harmony.count=parseFloat(t.race.Harmony.count.toFixed(2))),w(t.version)<8017&&t.city.garrison&&(t.city.garrison.on=t.city.garrison.count),w(t.version)<9005&&t.race.hasOwnProperty("terrifying")&&t.tech.hasOwnProperty("gambling")&&!t.space.hasOwnProperty("spc_casino")&&(t.space.spc_casino={count:0,on:0}),w(t.version)<9009&&t.genes.hasOwnProperty("ancients")&&t.genes.ancients>=3&&(4===t.genes.ancients?t.genes.ancients=5:t.race.Plasmid.count+=300),w(t.version)<9010&&(["species","gods","old_gods"].forEach((e=>{"orge"===t.race[e]&&(t.race[e]="ogre")})),t.stats.hasOwnProperty("achieve")&&t.stats.achieve.hasOwnProperty("extinct_orge")&&(t.stats.achieve.extinct_ogre=t.stats.achieve.extinct_orge,delete t.stats.achieve.extinct_orge),t.resource.hasOwnProperty("orge")&&(t.resource.ogre=t.resource.orge,delete t.resource.orge),t.city&&t.city.factory&&!t.city.factory.Furs&&(t.city.factory.Furs=0)),w(t.version)<9014&&(["seraph","unicorn","custom"].forEach((e=>{t.race.species===e&&("custom"===e&&t.hasOwnProperty("custom")&&"angelic"===t.custom.race0.genus||"custom"!==e)&&(t.race.holy=1)})),t.hasOwnProperty("arpa")&&t.arpa.hasOwnProperty("sequence")&&(t.arpa.sequence.labs=0)),w(t.version)<1e5&&(delete t.city.lumber,delete t.city.stone,t.stats.dark=0,t.race.Dark&&(t.stats.dark=t.race.Dark.count),t.city.hasOwnProperty("smelter")&&(t.city.smelter.hasOwnProperty("Star")||(t.city.smelter.Star=0),t.city.smelter.hasOwnProperty("StarCap")||(t.city.smelter.StarCap=0),t.city.smelter.hasOwnProperty("Inferno")||(t.city.smelter.Inferno=0)),t.hasOwnProperty("warseed")||(t.warseed=t.seed+1,Math.war=t.hasOwnProperty("warseed")?t.warseed:t.seed),t.portal.hasOwnProperty("bireme")&&(t.portal.bireme.crew=0,t.portal.bireme.mil=0),t.portal.hasOwnProperty("transport")&&(t.portal.transport.crew=0,t.portal.transport.mil=0,t.portal.transport.cargo||(t.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})),t.hasOwnProperty("settings")&&t.settings.portal&&t.settings.portal.spire&&!t.portal.hasOwnProperty("purifier")&&(t.settings.portal.spire=!1),t.portal.hasOwnProperty("mechbay")&&!Array.isArray(t.portal.mechbay.mechs)&&(t.portal.mechbay.mechs=[]),t.portal.transport&&t.portal.transport.count>=1&&!t.tech.hell_spire&&(t.tech.hell_spire=1,t.settings.portal.spire=!0,t.settings.showCargo=!0,t.portal.purifier={count:0,on:0,support:0,s_max:0,supply:0,sup_max:100,diff:0},t.portal.port={count:0,on:0}),t.tech.hasOwnProperty("waygate")&&!t.portal.hasOwnProperty("waygate")&&delete t.tech.waygate,t.hasOwnProperty("blood")||(t.blood={})),w(t.version)<100013&&t.hasOwnProperty("settings")&&t.settings.hasOwnProperty("showPowerGrid")&&t.hasOwnProperty("race")&&t.race.infiltrator&&t.hasOwnProperty("tech")&&t.tech.hasOwnProperty("high_tech")&&t.tech.high_tech>=2&&(t.settings.showPowerGrid=!0),w(t.version)<100014&&(t.race.Dark&&(t.stats.dark=t.race.Dark.count),t.race.casting&&t.race.evil&&(t.race.casting.total-=t.race.casting.lumberjack,t.race.casting.lumberjack=0),t.queue&&t.queue.queue))for(let e=0;e=2,events:!0,major_events:!0,minor_events:!0,achievements:t.stats.achieve&&Object.keys(t.stats.achieve).length>0||t.stats.feat&&Object.keys(t.stats.feat).length>0,hell:t.settings.showPortal||t.stats.blackhole||t.stats.ascend||t.stats.descend}),t.race.hasOwnProperty("inflation")&&["supercollider","stock_exchange","launch_facility","monuments","railway","roid_eject","nexus","syphon"].forEach((function(e){t.tech.hasOwnProperty(e)&&(t.race.inflation+=10*t.tech[e])}))),w(t.version)<101012&&t.civic.garrison&&(t.civic.garrison.rate=0),w(t.version)<101014&&(t.hasOwnProperty("settings")&&t.settings.hasOwnProperty("msgFilters")&&Object.keys(t.settings.msgFilters).forEach((function(e){t.settings.msgFilters[e]={unlocked:!!t.settings.msgFilters[e],vis:!!t.settings.msgFilters[e],max:60,save:3}})),t.hasOwnProperty("lastMsg")&&t.lastMsg)){let e={};m.forEach((function(t){e[t]=[]})),t.lastMsg.forEach((function(t){t.t?t.t.forEach((function(a){e[a].push({m:t.m,c:t.c})})):e.all.push({m:t.m,c:t.c})})),t.lastMsg=e}if(w(t.version)<=101014&&!t.revision&&t.race.cataclysm&&t.race.universe&&"magic"===t.race.universe&&t.tech.magic&&t.tech.magic>=2&&(t.space.pylon={count:0}),w(t.version)<101015&&t.hasOwnProperty("special")&&t.special.hasOwnProperty("trick")&&(t.special.trick[2020]=JSON.parse(JSON.stringify(t.special.trick)),delete t.special.trick.trick1,delete t.special.trick.trick2,delete t.special.trick.trick3,delete t.special.trick.trick4,delete t.special.trick.trick5,delete t.special.trick.trick6,delete t.special.trick.trick7,delete t.special.trick.trick8,delete t.special.trick.trick9,delete t.special.trick.trick10,delete t.special.trick.trick11,delete t.special.trick.trick12),w(t.version)<102e3&&(t.hasOwnProperty("portal")&&t.portal.hasOwnProperty("fortress")&&!t.portal.fortress.hasOwnProperty("nocrew")&&(t.portal.fortress.nocrew=!1),t.city.hasOwnProperty("smelter")&&!t.city.smelter.hasOwnProperty("Iridium")&&(t.city.smelter.Iridium=0),t.hasOwnProperty("portal")&&t.portal.hasOwnProperty("mechbay")&&!t.portal.mechbay.hasOwnProperty("active")&&(t.portal.mechbay.active=0,t.portal.mechbay.scouts=0)),w(t.version)<102001&&(t.race.blood_thirst&&t.race.blood_thirst>3&&(t.race.blood_thirst=1),t.race.rainbow&&t.race.rainbow>3&&(t.race.rainbow=1)),w(t.version)<102005&&!t.stats.cores&&t.race.hasOwnProperty("AICore")&&(t.stats.cores=t.race.AICore.count),w(t.version)<102006&&t.race.artifical&&(t.race.calm&&(t.resource.hasOwnProperty("Zen")&&(t.resource.Zen.display=!0),t.city.meditation={count:0}),t.race.cannibalize&&(t.city.s_alter={count:0,rage:0,mind:0,regen:0,mine:0,harvest:0}),t.race.magnificent&&(t.city.shrine={count:0,morale:0,metal:0,know:0,tax:0})),w(t.version)<102007&&t.stats.hasOwnProperty("achieve")&&delete t.stats.achieve.extinct_sludge,w(t.version)<102012&&(t.city.hasOwnProperty("ptrait")&&(t.city.ptrait="none"===t.city.ptrait?[]:[t.city.ptrait]),t.tech.hell_ruins&&t.tech.hell_ruins>=3&&(t.tech.hell_vault=1)),w(t.version)<102015){if(t.race.hasOwnProperty("governor")&&t.race.governor.hasOwnProperty("tasks"))for(let e in t.race.governor.tasks)"asssemble"===t.race.governor.tasks[e]&&(t.race.governor.tasks[e]="assemble");t.settings&&t.settings.hasOwnProperty("restoreCheck")&&delete t.settings.restoreCheck}if(w(t.version)<102017&&(t.portal.hasOwnProperty("fortress")&&(t.portal.observe={settings:{expanded:!1,average:!1,hyperSlow:!1,display:"game_days",dropKills:!0,dropGems:!0},stats:{total:{start:{year:t.city.calendar.year,day:t.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:t.city.calendar.year,day:t.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:{}}),t.tech.hasOwnProperty("genetics")&&t.tech.genetics>1&&t.hasOwnProperty("arpa")&&(t.arpa.hasOwnProperty("sequence")||(t.arpa.sequence={max:5e4,progress:0,time:5e4,on:!1}),t.arpa.sequence.boost||(t.arpa.sequence.boost=!1),t.arpa.sequence.auto||(t.arpa.sequence.auto=!1),t.arpa.sequence.labs||(t.arpa.sequence.labs=0))),w(t.version)<102021&&t.hasOwnProperty("custom")&&!t.custom.hasOwnProperty("race0")){let e=t.race.hasOwnProperty("species")?t.race.species:"protoplasm";t.galaxy.hasOwnProperty("alien1")&&"custom"===t.galaxy.alien1.id&&(t.galaxy.alien1.id="human"===e?"elven":"human"),t.galaxy.hasOwnProperty("alien2")&&"custom"===t.galaxy.alien2.id&&(t.galaxy.alien2.id="orc"===e||"orc"===t.galaxy.alien1.id?"cath":"orc")}function f(){["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(e){t.stats.hasOwnProperty(e)||(t.stats[e]=0)})),t.stats.achieve||(t.stats.achieve={}),t.stats.feat||(t.stats.feat={}),t.stats.hasOwnProperty("womling")||(t.stats.womling={god:{l:0},lord:{l:0},friend:{l:0}}),t.stats.spire||(t.stats.spire={}),t.stats.synth||(t.stats.synth={}),t.stats.hasOwnProperty("banana")||(t.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}})}if(w(t.version)<103e3&&(t.hasOwnProperty("tauceti")||(t.tauceti={}),"protoplasm"===t.race.species&&(t.evolution.hasOwnProperty("sexual_reproduction")&&(t.tech.evo=t.evolution.sexual_reproduction.count>0?2:1,delete t.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(e){if(t.evolution.hasOwnProperty(e[0])&&t.evolution[e[0]].count>0)for(let[a,r]of Object.entries(e[1]))t.tech[a]=r;delete t.evolution[e[0]]})),t.evolution.mloaded=1,t.evolution.gmloaded=1)),w(t.version)<103001&&(t.hasOwnProperty("prestige")||(t.prestige={}),t.race.Plasmid&&t.race.Plasmid.hasOwnProperty("anti")&&(t.prestige.AntiPlasmid={count:t.race.Plasmid.anti}),["Plasmid","Phage","AICore","Dark","Harmony"].forEach((function(e){t.race.hasOwnProperty(e)&&(t.prestige[e]={count:t.race[e].count},delete t.race[e])})),["Artifact","Blood_Stone"].forEach((function(e){t.resource.hasOwnProperty(e)&&(t.prestige[e]={count:t.resource[e].amount},delete t.resource[e])})),!t.stats.hasOwnProperty("synth")&&t.race.hasOwnProperty("srace")&&(t.stats.synth={},t.stats.synth[t.race.srace]=!0),t.race.hasOwnProperty("governor")&&t.race.governor.hasOwnProperty("config")&&t.race.governor.config.hasOwnProperty("trash")&&["Infernite","Elerium","Copper","Iron"].forEach((function(e){t.race.governor.config.trash.hasOwnProperty(e)&&"number"==typeof t.race.governor.config.trash[e]&&(t.race.governor.config.trash[e]={v:t.race.governor.config.trash[e],s:!0})}))),w(t.version)<103002&&t.portal.hasOwnProperty("observe")&&t.portal.observe.hasOwnProperty("stats")&&(t.portal.observe.stats.period.gems.surveyors=0,t.portal.observe.stats.total.gems.surveyors=0),t.version="1.3.9",delete t.revision,delete t.beta,t.hasOwnProperty("prestige")||(t.prestige={}),["Plasmid","AntiPlasmid","Phage","Dark","Harmony","AICore","Artifact","Blood_Stone"].forEach((function(e){t.prestige.hasOwnProperty(e)||(t.prestige[e]={count:0})})),t.hasOwnProperty("power")||(t.power=[]),t.hasOwnProperty("support")||(t.support={}),["moon","red","belt","alpha","nebula","gateway","alien2","lake","spire","titan","enceladus","eris","tau_home","tau_red","tau_roid"].forEach((function(e){t.support.hasOwnProperty(e)||(t.support[e]=[])})),t.civic.cement_worker&&.25===t.civic.cement_worker.impact&&(t.civic.cement_worker.impact=.4),t.settings||(t.settings={showEvolve:!0,showAchieve:!1,animated:!0,disableReset:!1,font:"standard",q_merge:"merge_nearby",cLabels:!0,theme:"gruvboxDark",locale:"en-US",icon:"star"}),t.settings.space||(t.settings.space={}),t.settings.space.hasOwnProperty("home")||(t.settings.space.home=!0),j(!1),t.settings.icon||(t.settings.icon="star"),t.settings.showResources||(t.settings.showResources=t.settings.showMarket),t.settings.showStorage||(t.city.warehouse||t.city.storage_yard?t.settings.showStorage=!0:t.settings.showStorage=!1),t.settings.hasOwnProperty("touch")||(t.settings.touch=!1),t.settings.hasOwnProperty("lowPowerBalance")||(t.settings.lowPowerBalance=!1),t.queue||(t.queue={display:!1,queue:[]}),t.r_queue||(t.r_queue={display:!1,queue:[]}),t.queue.rename||(t.queue.rename=!1),t.queue.max||(t.queue.max=0),t.r_queue.max||(t.r_queue.max=0),t.queue.pause||(t.queue.pause=!1),t.r_queue.pause||(t.r_queue.pause=!1),t.lastMsg||(t.lastMsg={}),t.settings.msgFilters||(t.settings.msgFilters={}),["all","progress","events","major_events","minor_events"].forEach((function(e){t.settings.msgFilters[e]||(t.settings.msgFilters[e]={unlocked:!0,vis:!0,max:60,save:3})})),m.forEach((function(e){t.lastMsg[e]||(t.lastMsg[e]=[]),t.settings.msgFilters[e]||(t.settings.msgFilters[e]={unlocked:!1,vis:!1,max:60,save:3})})),t.settings.msgQueueHeight||(t.settings.msgQueueHeight=$("#msgQueue").outerHeight(),t.settings.buildQueueHeight=$("#buildQueue").outerHeight()),t.space||(t.space={}),t.starDock||(t.starDock={}),t.interstellar||(t.interstellar={}),t.galaxy||(t.galaxy={}),t.interstellar.mass_ejector&&!t.interstellar.mass_ejector.Bolognium&&(t.interstellar.mass_ejector.Bolognium=0),t.interstellar.mass_ejector&&!t.interstellar.mass_ejector.Vitreloy&&(t.interstellar.mass_ejector.Vitreloy=0),t.interstellar.mass_ejector&&!t.interstellar.mass_ejector.Orichalcum&&(t.interstellar.mass_ejector.Orichalcum=0),t.interstellar.mass_ejector&&!t.interstellar.mass_ejector.Nanoweave&&(t.interstellar.mass_ejector.Nanoweave=0),t.interstellar.mass_ejector&&!t.interstellar.mass_ejector.Scarletite&&(t.interstellar.mass_ejector.Scarletite=0),t.hasOwnProperty("pillars")||(t.pillars={}),t.settings.space.alpha||(t.settings.space.alpha=!1,t.settings.space.proxima=!1,t.settings.space.nebula=!1,t.settings.space.neutron=!1,t.settings.space.blackhole=!1),t.settings.showAchieve||(t.settings.showAchieve=!1),t.settings.locale||(t.settings.locale="en-us"),void 0===t.settings.pause&&(t.settings.pause=!1),void 0===t.settings.mKeys&&(t.settings.mKeys=!0),void 0===t.settings.keyMap&&(t.settings.keyMap={x10:"Control",x25:"Shift",x100:"Alt",q:"q"}),void 0===t.settings.keyMap.showCiv&&(t.settings.keyMap.showCiv="1",t.settings.keyMap.showCivic="2",t.settings.keyMap.showResearch="3",t.settings.keyMap.showResources="4",t.settings.keyMap.showGenetics="5",t.settings.keyMap.showAchieve="6",t.settings.keyMap.settings="7"),delete t.settings.keyMap.d,void 0===t.settings.qAny&&(t.settings.qAny=!1),void 0===t.settings.sPackOn&&(t.settings.sPackOn=!0),void 0===t.settings.qAny_res&&(t.settings.qAny_res=!1),void 0===t.settings.sPackMsg&&(t.settings.sPackMsg=!1),void 0===t.settings.expose&&(t.settings.expose=!1),void 0===t.settings.tabLoad&&(t.settings.tabLoad=!1),void 0===t.settings.boring&&(t.settings.boring=!1),t.settings.hasOwnProperty("mtorder")||(t.settings.mtorder=[]),f(),t.race.seeded||(t.race.seeded=!1),t.race.deterioration||(t.race.deterioration=0),t.race.gene_fortify||(t.race.gene_fortify=0),t.race.old_gods||(t.race.old_gods="none"),t.race.universe||(t.race.universe="standard"),t.genes.minor||(t.genes.minor={}),t.race.minor||(t.race.minor={}),t.hasOwnProperty("govern")||(t.govern={governor:{},candidate:[],policy:{}}),t.settings.hasOwnProperty("showMil")||(t.settings.showMil=!0),t.settings.hasOwnProperty("showPowerGrid")||(t.settings.showPowerGrid=!!(t.hasOwnProperty("tech")&&t.tech.hasOwnProperty("high_tech")&&t.tech.high_tech>=2)),t.settings.affix||(t.settings.affix="si"),t.special||(t.special={}),t.special.gift||(t.special.gift={}),t.special.hasOwnProperty("egg")||(t.special.egg={}),t.special.hasOwnProperty("trick")||(t.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}),t.civic.govern||(t.civic.govern={type:"oligarchy",rev:2e3,fr:0}),t.civic.govern.fr=0,t.hasOwnProperty("custom")||(t.custom={}),t.custom.hasOwnProperty("planet")&&t.custom.planet.hasOwnProperty("biome")&&delete t.custom.planet,t.city.hasOwnProperty("smelter")&&!t.city.smelter.hasOwnProperty("cap")&&(t.city.smelter.cap=0),t.civic.homeless||(t.civic.homeless=0),t.civic.foreign||(t.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}}),void 0===t.civic.foreign.gov0.trn&&(t.civic.foreign.gov0.trn=0,t.civic.foreign.gov1.trn=0,t.civic.foreign.gov2.trn=0,t.civic.foreign.gov0.sab=0,t.civic.foreign.gov1.sab=0,t.civic.foreign.gov2.sab=0,t.civic.foreign.gov0.act="none",t.civic.foreign.gov1.act="none",t.civic.foreign.gov2.act="none"),void 0!==t.civic.foreign.gov0.name&&"evo_organism_title"===t.civic.foreign.gov0.name.s1&&(t.civic.foreign.gov0.name.s1="Northern"),void 0!==t.civic.foreign.gov1.name&&"evo_organism_title"===t.civic.foreign.gov1.name.s1&&(t.civic.foreign.gov1.name.s1="Southern"),void 0!==t.civic.foreign.gov2.name&&"evo_organism_title"===t.civic.foreign.gov2.name.s1&&(t.civic.foreign.gov2.name.s1="Divine"),!t.race.evil&&t.race.immoral&&void 0!==t.race&&"wendigo"!==t.race.species)delete t.race.immoral;else if(void 0!==t.race&&"wendigo"===t.race.species){const e=new Date;t.settings.hasOwnProperty("boring")&&!t.settings.boring&&11===e.getMonth()&&e.getDate()>=17&&(t.race.immoral=3)}if(t.hasOwnProperty("special")&&t.special.hasOwnProperty("gift")){const e=new Date(t.stats.start),a=new Date;Object.keys(t.special.gift).forEach((function(r){let s=Number(r.substring(1,5));(s=1?t.civic.d_job="farmer":t.civic.d_job="unemployed"),t.settings.animated=!0,t.settings.disableReset=!1,t.arpa&&t.arpa.launch_facility&&t.arpa.launch_facility.rank>0&&!t.tech.space&&(t.tech.space=1);var y={x10:!1,x25:!1,x100:!1,q:!1};function b(){let e=1;return t.settings.mKeys&&(y.x10&&(e*=10),y.x25&&(e*=25),y.x100&&(e*=100)),e}function w(e){let t=e.split(".",3);return t[0]*=1e5,t[1]*=1e3,Number(t[0])+Number(t[1])+Number(t[2])}function x(){if($(window).width()>=1400&&$("#msgQueue:not(.right)")){let e=$("#buildQueue").detach();e.addClass("right"),e.removeClass("has-text-info");let t=$("#msgQueue").detach();t.addClass("right"),t.removeClass("has-text-info"),t.css("resize","none"),$("#queueColumn").addClass("is-one-quarter"),$("#queueColumn").append(e),$("#queueColumn").append(t),$("#mainColumn").removeClass("is-three-quarters"),$("#mainColumn").addClass("is-half")}else if($(window).width()<1400&&$("#msgQueue").hasClass("right")){let e=$("#buildQueue").detach();e.removeClass("right"),e.addClass("has-text-info");let t=$("#msgQueue").detach();t.removeClass("right"),t.addClass("has-text-info"),t.css("resize","vertical"),$("#queueColumn").removeClass("is-one-quarter"),$("#sideQueue").append(e),$("#sideQueue").append(t),$("#mainColumn").removeClass("is-half"),$("#mainColumn").addClass("is-three-quarters")}}var k={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 q(e,a,r){let s=0,i="",c=e<0;return c&&(e*=-1),e<=9999?s=+e.toFixed(a):e<1e6?(i=k[t.settings.affix][0],s=r?+(e/1e3).toFixed(1):Math.floor(e/100)/10):e<1e9?(i=k[t.settings.affix][1],s=r?+(e/1e6).toFixed(1):Math.floor(e/1e4)/100):e<1e12?(i=k[t.settings.affix][2],s=r?+(e/1e9).toFixed(1):Math.floor(e/1e7)/100):e<1e15?(i=k[t.settings.affix][3],s=r?+(e/1e12).toFixed(1):Math.floor(e/1e10)/100):e<1e18?(i=k[t.settings.affix][4],s=r?+(e/1e15).toFixed(1):Math.floor(e/1e13)/100):e<1e21?(i=k[t.settings.affix][5],s=r?+(e/1e18).toFixed(1):Math.floor(e/1e16)/100):e<1e24?(i=k[t.settings.affix][6],s=r?+(e/1e21).toFixed(1):Math.floor(e/1e19)/100):(i=k[t.settings.affix][7],s=r?+(e/1e24).toFixed(1):Math.floor(e/1e22)/100),s>=100&&(s=+s.toFixed(1)),c&&(s*=-1),s+i}function M(e,t){var a=document.createElement("div"),r="speak-"+Date.now();a.setAttribute("id",r),a.setAttribute("aria-live",t||"polite"),a.classList.add("sr-only"),document.body.appendChild(a),window.setTimeout((function(){document.getElementById(r).innerHTML=e}),100),window.setTimeout((function(){document.body.removeChild(document.getElementById(r))}),1e3)}$(window).resize((function(){x()})),window.soft_reset=function(a){try{a=a&&"replicator"===a?"replicator":"soft",gtag("event","reset",{end:a})}catch(e){}a||C();let r=!!t.race.hasOwnProperty("srace")&&t.race.srace,s=t.race.hasOwnProperty("geck")?t.race.geck:0;t.race.hasOwnProperty("gecked")&&(s+=t.race.gecked,t.stats.geck-=t.race.gecked);let i={species:"protoplasm",universe:t.race.universe,seeded:t.race.seeded,probes:t.race.probes,seed:t.race.seed,ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended,rejuvenated:!!t.race.hasOwnProperty("rejuvenated")&&t.race.rejuvenated};s>0&&(i.geck=s),r&&(i.srace=r),t.race.bigbang&&(i.bigbang=!0),t.race.gods&&(i.gods=t.race.gods),t.race.old_gods&&(i.old_gods=t.race.old_gods),t.race.rapid_mutation&&t.race.rapid_mutation>0&&(i.rapid_mutation=t.race.rapid_mutation),t.race.ancient_ruins&&t.race.ancient_ruins>0&&(i.ancient_ruins=t.race.ancient_ruins),t.race.bigbang&&(i.universe="bigbang"),t.race.hasOwnProperty("corruption")&&(i.corruption=t.race.corruption),t.race=i;let c=t.city.calendar.orbit,o=t.city.biome,n=t.city.ptrait,l=t.city.geology;t.city={calendar:{day:0,year:0,weather:2,temp:1,moon:0,wind:0,orbit:c},biome:o,ptrait:n,geology:l},t.tech.theology&&t.tech.theology>=1?t.tech={theology:1}:t.tech={},S(),t.new=!0,t.seed=Math.rand(0,1e4),t.warseed=Math.rand(0,1e4),t.stats.current=Date.now(),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()};var P={w:!1,s:!1,mt:250},O={};function C(){m.forEach((function(e){"achievements"!==e&&(t.lastMsg[e]=[])}))}function j(e){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(r){"base"===r?a[r].forEach((function(a){t.settings.hasOwnProperty(a)&&!e||(t.settings[a]=!1)})):(t.settings.hasOwnProperty(r)||(t.settings[r]={}),a[r].forEach((function(a){t.settings[r].hasOwnProperty(a)&&!e||(t.settings[r][a]=!1)})))})),["civTabs","govTabs","govTabs2","hellTabs","resTabs","spaceTabs","marketTabs","statsTabs"].forEach((function(a){t.settings.hasOwnProperty(a)&&!e||(t.settings[a]=0)}))}function S(){P.w&&P.w.terminate(),t.queue={display:!1,queue:[]},t.r_queue={display:!1,queue:[]},t.space={},t.interstellar={},t.galaxy={},t.portal={},t.starDock={},t.tauceti={},t.civic={new:0},t.civic.foreign={gov0:{unrest:0,hstl:Math.floor(g(80,100)),mil:Math.floor(g(75,125)),eco:Math.floor(g(60,90)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov1:{unrest:0,hstl:Math.floor(g(0,20)),mil:Math.floor(g(125,175)),eco:Math.floor(g(80,120)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov2:{unrest:0,hstl:Math.floor(g(40,60)),mil:Math.floor(g(200,300)),eco:Math.floor(g(130,170)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1}},t.genes.blood||(t.prestige.Blood_Stone.count=0),t.resource={},t.evolution={},t.event={t:100,l:!1},t.m_event={t:499,l:!1},t.stats.days=0,t.stats.know=0,t.stats.starved=0,t.stats.died=0,t.stats.attacks=0,t.stats.dkills=0,t.stats.cfood=0,t.stats.cstone=0,t.stats.clumber=0,t.stats.sac=0,t.stats.cattle=0,t.stats.murders=0,t.settings.at=0,t.settings.showEvolve=!0,t.settings.space.home=!0,j(!0),t.settings.disableReset=!1,t.settings.pause=!1,t.arpa={},delete t.race.hrt,t.genes.queue&&(t.tech.queue=1,t.queue.display=!0)}let F;function z(e,a){let r=F[e];if(!r)return t.settings.expose&&(console.error(`string ${e} not found`),console.log(F)),e;if(a)if(a instanceof Array){for(let s=0;s{r=e})),"en-US"!=a){let e;try{$.getJSON(`strings/strings.${a}.json`,(t=>{e=t}))}catch(e){console.error(e,e.stack)}const s=r.length;e&&Object.assign(r,e),r.length!=s&&t.settings.expose&&console.error(`string.${a}.json has extra keys.`)}let s=e.getItem("string_pack")||!1;if(s&&t.settings.sPackOn){let e;try{e=JSON.parse(LZString.decompressFromUTF16(s))}catch(e){console.error(e,e.stack)}const a=r.length;e&&Object.assign(r,e),r.length!=a&&t.settings.expose&&console.error("string pack has extra keys.")}$.ajaxSetup({async:!0}),F=r}(t.settings.locale);const A={"en-US":"English (US)","es-ES":"Spanish (ESP)","pt-BR":"Português (BR)","zh-CN":"简体中文","zh-TW":"繁體中文","ko-KR":"한국어","cs-CZ":"Čeština","ru-RU":"Русский","im-PL":"Igpay-Atinlay"},T={soldier:{name:z("governor_soldier"),desc:z("governor_soldier_desc"),title:[z("governor_soldier_t1"),z("governor_soldier_t2"),z("governor_soldier_t3")],traits:{tactician:1,militant:1}},criminal:{name:z("governor_criminal"),desc:z("governor_criminal_desc"),title:[z("governor_criminal_t1"),z("governor_criminal_t2"),{m:z("governor_criminal_t3m"),f:z("governor_criminal_t3f")}],traits:{noquestions:1,racketeer:1}},entrepreneur:{name:z("governor_entrepreneur"),desc:z("governor_entrepreneur_desc"),title:[z("governor_entrepreneur_t1"),z("governor_entrepreneur_t2"),{m:z("governor_entrepreneur_t3m"),f:z("governor_entrepreneur_t3f")}],traits:{dealmaker:1,risktaker:1}},educator:{name:z("governor_educator"),desc:z("governor_educator_desc"),title:[z("governor_educator_t1"),z("governor_educator_t2"),z("governor_educator_t3")],traits:{teacher:1,theorist:1}},spiritual:{name:z("governor_spiritual"),desc:z("governor_spiritual_desc"),title:[z("governor_spiritual_t1"),z("governor_spiritual_t2"),z("governor_spiritual_t3")],traits:{inspirational:1,pious:1}},bluecollar:{name:z("governor_bluecollar"),desc:z("governor_bluecollar_desc"),title:[{m:z("governor_bluecollar_t1m"),f:z("governor_bluecollar_t1f")},z("governor_bluecollar_t2"),{m:z("governor_bluecollar_t3m"),f:z("governor_bluecollar_t3f")}],traits:{pragmatist:1,dirty_jobs:1}},noble:{name:z("governor_noble"),desc:z("governor_noble_desc"),title:[{m:z("governor_noble_t1m"),f:z("governor_noble_t1f")},{m:z("governor_noble_t2m"),f:z("governor_noble_t2f")},{m:z("governor_noble_t3m"),f:z("governor_noble_t3f")},{m:z("governor_noble_t4m"),f:z("governor_noble_t4f")}],traits:{extravagant:1,aristocrat:1}},media:{name:z("governor_media"),desc:z("governor_media_desc"),title:[z("governor_media_t1"),{m:z("governor_media_t2m"),f:z("governor_media_t2f")},z("governor_media_t3")],traits:{gaslighter:1,muckraker:1}},sports:{name:z("governor_sports"),desc:z("governor_sports_desc"),title:[z("governor_sports_t1"),z("governor_sports_t2"),z("governor_sports_t3")],traits:{athleticism:1,nopain:1}},bureaucrat:{name:z("governor_bureaucrat"),desc:z("governor_bureaucrat_desc"),title:[z("governor_bureaucrat_t1"),{m:z("governor_bureaucrat_t2m"),f:z("governor_bureaucrat_t2f")},z("governor_bureaucrat_t3")],traits:{organizer:1}}},E={tactician:{name:z("gov_trait_tactician"),effect(){return z("gov_trait_tactician_effect",[$(this)[0].vars()[0]])},vars:()=>[25]},militant:{name:z("gov_trait_militant"),effect(){return z("gov_trait_militant_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[25,10]},noquestions:{name:z("gov_trait_noquestions"),effect(){return z("gov_trait_noquestions_effect",[$(this)[0].vars()[0]])},vars:()=>[.005]},racketeer:{name:z("gov_trait_racketeer"),effect(){return z("gov_trait_racketeer_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[20,35]},dealmaker:{name:z("gov_trait_dealmaker"),effect(){return z("gov_trait_dealmaker_effect",[$(this)[0].vars()[0]])},vars:()=>[125]},risktaker:{name:z("gov_trait_risktaker"),effect(){return z("gov_trait_risktaker_effect",[$(this)[0].vars()[0]])},vars:()=>[12]},teacher:{name:z("gov_trait_teacher"),effect(){return z("gov_trait_teacher_effect",[$(this)[0].vars()[0]])},vars:()=>[6]},theorist:{name:z("gov_trait_theorist"),effect(){return z("gov_trait_theorist_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[50,4]},inspirational:{name:z("gov_trait_inspirational"),effect(){return z("gov_trait_inspirational_effect",[$(this)[0].vars()[0]])},vars:()=>[20]},pious:{name:z("gov_trait_pious"),effect(){let e=$(this)[0].vars()[1],a=t.tech.monument&&t.tech.monument>=3&&i.s_gate?3:1;return e=("corpocracy"===t.civic.govern.type?2*e:e)*a,z("gov_trait_pious_effect",[$(this)[0].vars()[0],e])},vars:()=>[10,5]},pragmatist:{name:z("gov_trait_pragmatist"),effect(){return z("gov_trait_pragmatist_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[50,2]},dirty_jobs:{name:z("gov_trait_dirty_jobs"),effect(){return z("gov_trait_dirty_jobs_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars:()=>[.015,1,10]},extravagant:{name:z("gov_trait_extravagant"),effect(){return z("gov_trait_extravagant_effect",[$(this)[0].vars()[0],Ks("large",!0),$(this)[0].vars()[1],$(this)[0].vars()[2]+5])},vars:()=>[10,1.25,1]},aristocrat:{name:z("gov_trait_aristocrat"),effect(){return z("gov_trait_aristocrat_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars:()=>[50,20,10]},gaslighter:{name:z("gov_trait_gaslighter"),effect(){return z("gov_trait_gaslighter_effect",[$(this)[0].vars()[0],Es(),$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars:()=>[1,1,.5]},muckraker:{name:z("gov_trait_muckraker"),effect(){return z("gov_trait_muckraker_effect",[$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars:()=>[8,12,3]},athleticism:{name:z("gov_trait_athleticism"),effect(){return z("gov_trait_athleticism_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2],Es()])},vars:()=>[1.5,2,4]},nopain:{name:z("gov_trait_nopain"),effect(){return z("gov_trait_nopain_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[50,10]},organizer:{name:z("gov_trait_organizer"),effect(){return z("gov_trait_organizer_effect",[$(this)[0].vars()[0]])},vars:()=>[t.genes.governor&&t.genes.governor>=2?2:1]}},I={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 K(e){let a=[],r=_i[t.race.species].type,s=Object.keys(T),i=JSON.parse(JSON.stringify(I[r]));e=e||s.length;for(let t=0;t');$("#r_govern1").append(e);let a=$('
        ');e.append(a);let r=$("
        ");r.append($(`
        ${z("governor_office",[t.race.governor.g.n])}
        `)),r.append($(`
        ${z("governor_background")}: ${T[t.race.governor.g.bg].name}
        `)),a.append(r),a.append($(`
        ${z("governor_fire")}
        `));let s=[0,1,2];t.genes.governor&&t.genes.governor>=2&&(s.push(s.length),D("organizer",0)&&s.push(s.length)),D("organizer",0)&&s.push(s.length),s.forEach((function(t){let a=`{{ 'none' | label }}`;Object.keys(G).forEach((function(e){G[e].req()&&(a+=`{{ '${e}' | label }}`)})),e.append(`
        ${z("gov_task",[t+1])}\n \n ${a}\n
        `)})),t.race.governor.hasOwnProperty("config")||(t.race.governor.config={});let i=$('
        ');e.append(i);{t.race.governor.config.hasOwnProperty("storage")||(t.race.governor.config.storage={crt:1e3,cnt:1e3});let e=$(`
        ${z("gov_task_storage")}
        `);i.append(e);let a=$('
        ');e.append(a);let r=t.race.kindling_kindred||t.race.smoldering?t.race.smoldering?"Chrysotile":"Stone":"Plywood",s="Steel";a.append($(`${z("gov_task_storage_reserve",[t.resource[r].name])}`)),a.append($(`${z("gov_task_storage_reserve",[t.resource[s].name])}`))}{t.race.governor.config.hasOwnProperty("bal_storage")||(t.race.governor.config.bal_storage={}),t.race.governor.config.bal_storage.hasOwnProperty("adv")||(t.race.governor.config.bal_storage.adv=!1);let e=$(`
        ${z("gov_task_bal_storage")}
        ${z("advanced")}
        `);i.append(e);let a=$('
        ');e.append(a),Object.keys(t.resource).forEach((function(e){t.resource[e].stackable?(t.race.governor.config.bal_storage.hasOwnProperty(e)||(t.race.governor.config.bal_storage[e]="2"),a.append($(`
        ${t.resource[e].name}\n \n 0x\n 1/2\n 1x\n 2x\n 3x\n 4x\n \n
        `))):t.race.governor.config.bal_storage.hasOwnProperty(e)&&delete t.race.governor.config.bal_storage[e]}))}{t.race.governor.config.hasOwnProperty("merc")||(t.race.governor.config.merc={buffer:1,reserve:100});let e=$(`
        ${z("gov_task_merc")}
        `);i.append(e);let a=$('
        ');e.append(a),a.append($(`${z("gov_task_merc_buffer")}`)),a.append($(`${z("gov_task_merc_reserve")}`))}{t.race.governor.config.hasOwnProperty("spy")||(t.race.governor.config.spy={reserve:100});let e=$(`
        ${z("gov_task_spy")}
        `);i.append(e);let a=$('
        ');e.append(a),a.append($(`${z("gov_task_merc_reserve")}`))}{t.race.governor.config.hasOwnProperty("spyop")||(t.race.governor.config.spyop={},Object.keys(t.civic.foreign).forEach((function(e){t.race.governor.config.spyop[e]="gov3"===e?["influence","sabotage"]:["sabotage","incite","influence"]})));let e=$(`
        ${z("gov_task_spyop")}
        `);i.append(e),Object.keys(t.civic.foreign).forEach((function(a){if(a.substr(3,1)<3&&!t.tech.world_control||"gov3"===a&&t.tech.rival){let r=$("
        ");e.append(r),r.append(`\n

        ${z("gov_task_spyop_priority",[te(a.substring(3))])}

        \n
          \n `);let s=$(`#spyopConfig${a}`);t.race.governor.config.spyop[a].forEach((function(e){s.append(`\n
        • ${z("civics_spy_"+e)}
        • \n `)}))}}))}{t.race.governor.config.hasOwnProperty("tax")||(t.race.governor.config.tax={min:20});let e=$(`
          ${z("gov_task_tax")}
          `);i.append(e);let a=$('
          ');e.append(a),a.append($(`${z("gov_task_tax_min")}`))}{t.race.governor.config.hasOwnProperty("slave")||(t.race.governor.config.slave={reserve:100});let e=$(`
          ${z("gov_task_slave")}
          `);i.append(e);let a=$('
          ');e.append(a),a.append($(`${z("gov_task_merc_reserve")}`))}{t.race.governor.config.hasOwnProperty("trash")||(t.race.governor.config.trash={}),["Infernite","Elerium","Copper","Iron"].forEach((function(e){t.race.governor.config.trash.hasOwnProperty(e)&&"object"==typeof t.race.governor.config.trash[e]&&null!==t.race.governor.config.trash[e]||(t.race.governor.config.trash[e]={v:0,s:!0})}));let e=$(`
          ${z("gov_task_trash")}
          `);i.append(e);let a=$('
          ');e.append(a),Object.keys(t.race.governor.config.trash).forEach((function(e){a.append($(`
          `))}))}{t.race.governor.config.hasOwnProperty("replicate")||(t.race.governor.config.replicate={}),t.race.governor.config.replicate.hasOwnProperty("pow")||(t.race.governor.config.replicate.pow={on:!1,cap:1e4,buffer:0}),t.race.governor.config.replicate.hasOwnProperty("res")||(t.race.governor.config.replicate.res={que:!0,neg:!0,cap:!0});let e=$(`
          ${z("gov_task_replicate")}
          `);i.append(e);let a=$('
          ');e.append(a),a.append($(`
          ${z("gov_task_replicate_auto")}
          `)),a.append($(`${z("gov_task_replicate_pmax")}`)),a.append($(`${z("gov_task_replicate_buff")}`));let r=$('
          ');e.append(r),r.append($(`
          ${z("gov_task_replicate_que")}
          `)),r.append($(`
          ${z("gov_task_replicate_neg")}
          `)),r.append($(`
          ${z("gov_task_replicate_cap")}
          `))}ic({el:"#govOffice",data:{t:t.race.governor.tasks,c:t.race.governor.config,r:t.resource},methods:{setTask(e,a){t.race.governor.tasks[`t${a}`]=e,Vi("govtask",{task:e}),ic({el:"#race"},"update")},showTask:e=>Object.values(t.race.governor.tasks).includes(e),activeTask(e){let a=[];return t.race.hasOwnProperty("governor")&&Object.keys(t.race.governor.tasks).forEach((function(e){"none"!==t.race.governor.tasks[e]&&a.push(t.race.governor.tasks[e])})),!a.includes(e)},showStrRes:e=>t.resource[e].display,bStrEx:()=>t.race.governor.config.bal_storage.adv?"m":"",fire(){let e=(10+(t.race.governor.hasOwnProperty("f")?t.race.governor.f:0))**2-50,a="antimatter"===t.race.universe?"AntiPlasmid":"Plasmid";t.prestige[a].count>=e&&(t.prestige[a].count-=e,t.race.governor.candidates=K(10),t.race.governor.hasOwnProperty("f")?t.race.governor.f++:t.race.governor.f=1,delete t.race.governor.g,delete t.race.governor.tasks,Ls(!1,["city-amphitheatre","city-apartment"]),Hi(),Ui(),L())},fireText(){let e=(10+(t.race.governor.hasOwnProperty("f")?t.race.governor.f:0))**2-50;return`
          ${z("governor_fire")}
          ${e} ${z("antimatter"===t.race.universe?"resource_AntiPlasmid_plural_name":"resource_Plasmid_plural_name")}
          `},trashStrat(e){t.race.governor.config.trash[e].s=!t.race.governor.config.trash[e].s},trashLabel:e=>z(t.race.governor.config.trash[e].s?"gov_task_trash_max":"gov_task_trash_min",[t.resource[e].name])},filters:{label:e=>G[e]?"string"==typeof G[e].name?G[e].name:G[e].name():z(`gov_task_${e}`)}}),Ei("govOffice",(function(){let e="";return Object.keys(T[t.race.governor.g.bg].traits).forEach((function(t){e+=(E[t].hasOwnProperty("effect")?E[t].effect():"")+" "})),e}),{elm:"#govOffice .bg"}),Object.keys(t.civic.foreign).forEach((function(e){!function(e){let a=$(`#spyopConfig${e}`)[0];a&&Sortable.create(a,{onEnd(a){let r=t.race.governor.config.spyop[e];r.splice(a.newDraggableIndex,0,r.splice(a.oldDraggableIndex,1)[0]),t.race.governor.config.spyop[e]=r,L()}})}(e)}))}():function(){let e=$('
          ');$("#r_govern1").append(e),t.race.hasOwnProperty("governor")&&t.race.governor.hasOwnProperty("candidates")||(t.race.governor={candidates:K(10)}),e.append($(`
          ${z("governor_candidate")}${z("governor_background")}
          `));for(let a=0;a${r.t} ${r.n}${T[r.bg].name}
          `))}ic({el:"#candidates",data:t.race.governor,methods:{appoint(e){if(t.genes.governor&&t.tech.governor){let a=t.race.governor.candidates[e];t.race.governor.g=a,delete t.race.governor.candidates,t.race.governor.tasks={t0:"none",t1:"none",t2:"none",t3:"none",t4:"none",t5:"none"},Ls(!1,["city-amphitheatre","city-apartment"]),Hi(),Ui(),L(),Vi("governor",{appoint:t.race.governor.g.bg})}}}}),t.race.governor.candidates.forEach((function(e){Ei(`candidates-${e.bg}`,(function(){let t="";return Object.keys(T[e.bg].traits).forEach((function(e){t+=(E[e].hasOwnProperty("effect")?E[e].effect():"")+" "})),t}),{elm:`#candidates .${e.bg} .bg`})}))}())}function N(){Object.keys(t.civic.foreign).forEach((function(e){let t=$(`#spyopConfig${e}`)[0];if(t){let e=Sortable.get(t);e&&e.destroy()}}))}function D(e,a){return!(!t.race.hasOwnProperty("governor")||!t.race.governor.hasOwnProperty("g"))&&!!T[t.race.governor.g.bg].traits[e]&&E[e].vars()[a]}function B(e){if(t.genes.governor&&t.tech.governor&&t.race.governor&&t.race.governor.g&&t.race.governor.tasks)for(let a=0;at.civic.taxes.display,task(){if($(this)[0].req()){let e=1;t.civic.taxes.tax_rate>=40&&(e+=.5),"oligarchy"===t.civic.govern.type&&t.civic.taxes.tax_rate>=20&&(e-=.5);let a=me("tax_cap",!1);if(t.city.morale.current<100&&t.civic.taxes.tax_rate>("oligarchy"===t.civic.govern.type?45:25))for(;t.city.morale.current<100&&t.civic.taxes.tax_rate>("oligarchy"===t.civic.govern.type?45:25);)me("adj_tax","sub");else t.city.morale.potential>=t.city.morale.cap+e&&t.civic.taxes.tax_ratet.race.governor.config.tax.min&&me("adj_tax","sub")}}},storage:{name:z("gov_task_storage"),req:()=>!!(ls("storage_yard")&&t.tech.container&&t.resource.Crates.display),task(){if($(this)[0].req()){if(t.resource.Crates.amountr&&Mr("crate",Math.floor((t.resource[e].amount-r)/a))}if(ls("warehouse")&&t.resource.Containers.display&&t.resource.Containers.amounta&&Mr("container",Math.floor((t.resource.Steel.amount-a)/e))}}}},bal_storage:{name:z("gov_task_bal_storage"),req:()=>!!(ls("storage_yard")&&t.tech.container&&t.resource.Crates.display),task(){if($(this)[0].req()){let e=t.resource.Crates.amount,a=e,r=t.resource.Containers.amount,s=r,i=0,c=Object.keys(t.resource).slice().reverse();c.forEach((function(a){t.resource[a].display&&t.resource[a].stackable?(e+=t.resource[a].crates,r+=t.resource[a].containers,i++):(t.resource[a].crates=0,t.resource[a].containers=0)}));let o=Math.floor(e/i),n=Math.floor(r/i),l={Food:{m:.1,cap:100},Coal:{m:.25}};t.race.artifical&&delete l.Food,Object.keys(t.race.governor.config.bal_storage).forEach((function(e){let a=Number(t.race.governor.config.bal_storage[e]);"Coal"===e?l[e]={m:.125*a}:"Food"===e?l[e]={m:.05*a,cap:50*a}:t.resource[e]&&(l[e]={m:a})})),Object.keys(l).forEach((function(a){if(t.resource[a].display)if(l[a].hasOwnProperty("cap")){i--;{let r=Math.floor(o*l[a].m);l[a].hasOwnProperty("cap")&&r>l[a].cap&&(r=l[a].cap),t.resource[a].crates=r,e-=r}if(t.resource.Containers.display){let e=Math.floor(n*l[a].m);l[a].hasOwnProperty("cap")&&e>l[a].cap&&(e=l[a].cap),t.resource[a].containers=e,r-=e}}else i+=l[a].m-1})),o=0!==i?Math.floor(e/i):0,n=0!==i?Math.floor(r/i):0,e-=Math.floor(o*i),r-=Math.floor(n*i),c.forEach((function(a){if((!l[a]||!l[a].hasOwnProperty("cap"))&&(!t.race.artifical||"Food"!==a)&&t.resource[a].display&&t.resource[a].stackable){let s=l[a]?l[a].m:1,i=Math.floor(o>0?o*s:0);if(t.resource[a].crates=i,t.resource.Containers.display){let e=Math.floor(n>0?n*s:0);t.resource[a].containers=e}if(e>0&&s>=1){let r=Math.ceil(s/2);e0&&s>=1){let e=Math.ceil(s/2);r0&&(e>0||r>0);)u--,c.forEach((function(a){l[a]&&l[a].hasOwnProperty("cap")||t.race.artifical&&"Food"===a||t.resource[a].display&&t.resource[a].stackable&&(e>0&&(t.resource[a].crates++,e--),r>0&&(t.resource[a].containers++,r--))}));t.resource.Crates.amount=e,t.resource.Containers.amount=r,i&&(t.resource.Crates.max-=a,t.resource.Containers.max-=s)}}},assemble:{name:z("gov_task_assemble"),req:()=>!(!t.race.artifical||t.tech.focus_cure&&!(t.tech.focus_cure<7)),task(){$(this)[0].req()&&t.resource[t.race.species].max>t.resource[t.race.species].amount&&Zr.city.assembly.action()}},clone:{name:z("gov_task_clone"),req:()=>!!t.tech.cloning,task(){$(this)[0].req()&&t.resource[t.race.species].max>t.resource[t.race.species].amount&&Zr.tauceti.tau_home.cloning_facility.action()}},merc:{name:z("gov_task_merc"),req:()=>!(!ls("garrison")||!t.tech.mercs),task(){if($(this)[0].req()){let e=t.resource.Money.max*(t.race.governor.config.merc.reserve/100);for(;t.civic.garrison.max>t.civic.garrison.workers+t.race.governor.config.merc.buffer&&t.resource.Money.amount>=me("m_cost")&&(t.resource.Money.amount+t.resource.Money.diff>=e||t.resource.Money.diff>=me("m_cost"));)me("m_buy")}}},spy:{name:z("gov_task_spy"),req:()=>!(t.tech.isolation||(!t.race.truepath||!t.tech.spy)&&(!t.tech.spy||t.tech.world_control||t.race.cataclysm)),task(){if($(this)[0].req()){let e=t.resource.Money.max*(t.race.governor.config.spy.reserve/100),a=t.race.truepath&&t.tech.rival?4:3;for(let r=t.tech.world_control?3:0;r=a&&(t.resource.Money.diff>=a||t.resource.Money.amount+t.resource.Money.diff>=e)&&me("t_spy",r)}}}},spyop:{name:z("gov_task_spyop"),req:()=>!(t.tech.isolation||!(t.race.truepath&&t.tech.spy&&t.tech.spy>=2)&&(!(t.tech.spy&&t.tech.spy>=2)||t.tech.world_control||t.race.cataclysm)),task(){if($(this)[0].req()){let e=t.race.truepath&&t.tech.rival?[0,1,2,3]:[0,1,2];t.tech.world_control&&(e=[3]),e.forEach((function(e){0===t.civic.foreign[`gov${e}`].sab&&t.civic.foreign[`gov${e}`].spy>0&&!t.civic.foreign[`gov${e}`].anx&&!t.civic.foreign[`gov${e}`].buy&&!t.civic.foreign[`gov${e}`].occ&&t.race.governor.config.spyop[`gov${e}`].every((function(a){switch(a){case"influence":if(t.civic.foreign[`gov${e}`].hstl>0&&t.civic.foreign[`gov${e}`].spy>1)return me("s_influence",e),!1;break;case"sabotage":if(t.civic.foreign[`gov${e}`].mil>50)return me("s_sabotage",e),!1;break;case"incite":if(t.civic.foreign[`gov${e}`].unrest<100&&t.civic.foreign[`gov${e}`].spy>2&&e<3)return me("s_incite",e),!1}return!0}))}))}}},slave:{name:z("gov_task_slave"),req:()=>!(t.race.orbit_decayed||!ls("slave_market")||!t.race.slaver||!t.city.slave_pen),task(){let e=t.resource.Money.max*(t.race.governor.config.slave.reserve/100),a=25e3;t.race.inflation&&(a*=1+t.race.inflation/100);let r=D("extravagant",0);r&&(a*=1+r/100),$(this)[0].req()&&t.resource.Money.amount>=a&&(t.resource.Money.diff>=a||t.resource.Money.amount+t.resource.Money.diff>=e)&&4*t.city.slave_pen.count>t.city.slave_pen.slaves&&Zr.city.slave_market.action()}},sacrifice:{name:z("gov_task_sacrifice"),req:()=>!!(ls("s_alter")&&t.city.hasOwnProperty("s_alter")&&t.city.s_alter.count>=1),task(){$(this)[0].req()&&t.resource[t.race.species].amount===t.resource[t.race.species].max&&(!t.race.kindling_kindred&&!t.race.smoldering&&t.city.s_alter.harvest<=1e4||t.city.s_alter.mind<=1e4||t.city.s_alter.mine<=1e4||t.city.s_alter.rage<=1e4||t.city.s_alter.regen<=1e4)&&Zr.city.s_alter.action()}},horseshoe:{name:()=>z(`city_${Gc(!0)}`,[Gc(!1)]),req:()=>!!t.race.hooved,task(){let e=Zr.city.horseshoe.cost;if($(this)[0].req()&&js(e)){e=fc(Zr.city.horseshoe);let a="Copper",r=10;Object.keys(e).forEach((function(t){e[t]()>0&&(a=t,r=e[t]())})),t.resource[a].amount>r&&(t.resource[a].diff>=r||t.resource[a].amount+t.resource[a].diff>=t.resource[a].max)&&Zr.city.horseshoe.action()}}},trash:{name:z("gov_task_trash"),req:()=>!!(t.interstellar.mass_ejector&&t.interstellar.mass_ejector.count>=1),task(){let e=function(e){return"magic"===t.race.universe?Ja[e]:["Elerium","Infernite"].includes(e)?10*Ja[e]:Ja[e]},a=1e3*i.mass_ejector;Object.keys(Ja).sort(((t,a)=>e(t)0&&(i=0),t.race.governor.config.trash[e]||t.interstellar.mass_ejector.hasOwnProperty(e)&&t.resource[e].display&&t.resource[e].max>0&&t.interstellar.mass_ejector[e]+t.resource[e].diff>0&&t.resource[e].amount+s-i>=.999*t.resource[e].max-1){let r=t.resource[e].amount+s-i>=.999*t.resource[e].max-1||t.race.governor.config.trash[e]&&!t.race.governor.config.trash[e].s?Math.floor(t.interstellar.mass_ejector[e]+t.resource[e].diff):0;t.race.governor.config.trash[e]&&r=.999*t.resource[e].max-1?r:r-Math.abs(t.race.governor.config.trash[e].v)),r>a&&(r=a),r<0&&(r=0),t.race.artifical&&"Food"===e&&(r=0),t.interstellar.mass_ejector[e]=r,a-=r}else t.interstellar.mass_ejector[e]=0})),t.interstellar.mass_ejector.total=1e3*i.mass_ejector-a}},mech:{name:z("gov_task_mech"),req:()=>!!(t.stats.achieve.hasOwnProperty("corrupted")&&t.stats.achieve.corrupted.l>0&&("prtl_spire","mechbay",Rt(ga,"prtl_spire","mechbay"))&&t.portal.hasOwnProperty("mechbay")),task(){if($(this)[0].req()){let e="large",a=Sa(e,!1),r=a.c,s=a.s,i=za(e),c={type:{}};["small","medium","large","titan","collector"].forEach((function(e){c.type[e]=0,c[e]={chassis:{},weapon:{},equip:{}},["hover","spider","wheel","tread","biped","quad"].forEach((function(t){c[e].chassis[t]=0})),["plasma","laser","kinetic","shotgun","missile","flame","sonic","tesla"].map((e=>({sort:Math.random(),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)).forEach((function(t){c[e].weapon[t]=0})),["shields","flare","seals","grapple","sonar","ablative","radiator","infrared","coolant","stabilizer"].forEach((function(t){c[e].equip[t]=0}))})),t.portal.mechbay.mechs.forEach((function(e){c.type[e.size]++,c[e.size].chassis[e.chassis]++,e.hardpoint.forEach((function(t){c[e.size].weapon[t]++})),e.equip.forEach((function(t){c[e.size].equip[t]++}))})),c.type.large>=6&&c.type.small<12||c.type.large>=12&&c.type.titan>=2&&c.type.small<24?(e="small",a=Sa(e,!1),r=a.c,s=a.s,i=za(e)):c.type.large>=6&&c.type.medium<12?(e="medium",a=Sa(e,!1),r=a.c,s=a.s,i=za(e)):c.type.large>=12&&c.type.titan<2&&(a=Sa("titan",!1),a.c<=t.portal.purifier.sup_max&&(e="titan",r=a.c,s=a.s,i=za(e)));let o=t.portal.mechbay.max-t.portal.mechbay.bay;if(o=3){if(t.queue.queue.some((e=>["portal-purifier","portal-port","portal-base_camp","portal-mechbay","portal-waygate"].includes(e.id))))return;for(let i=0;it.portal.purifier.sup_max&&(l=t.portal.purifier.sup_max),l>=r&&t.resource.Soul_Gem.amount+n>=s){if(t.resource.Soul_Gem.amount+=n,t.resource.Soul_Gem.amount-=s,t.portal.purifier.supply=l,t.portal.purifier.supply-=r,t.portal.mechbay.mechs[i].infernal=!0,"small"===o.size&&0===o.equip.length)t.portal.mechbay.mechs[i].equip.push("special");else if("medium"===o.size&&1===o.equip.length||"large"===o.size&&2===o.equip.length||"titan"===o.size&&o.equip.length<5){let a="???";Object.keys(c[e].equip).forEach((function(t){("???"===a||c[e].equip[t]=r&&o>=i&&t.resource.Soul_Gem.amount>=s){let a=99,o="hover";Object.keys(c[e].chassis).forEach((function(t){c[e].chassis[t]!(!t.tech.replicator||!t.race.replicator),task(){if(t.race.governor.config.replicate.pow.on){let e=t.race.governor.config.replicate.pow.cap,a=t.race.governor.config.replicate.pow.buffer;if(t.city.power0){let e=t.city.power<0?Math.abs(t.city.power)+a:a-t.city.power;t.race.replicator.pow-=e,t.race.replicator.pow<0&&(t.race.replicator.pow=0)}else t.city.power>a&&t.race.replicator.powe&&(t.race.replicator.pow=e)):t.race.replicator.pow>e&&(t.race.replicator.pow=e);t.race.replicator.pow=Math.floor(t.race.replicator.pow)}let e=!1;for(let a=0;t.race.governor.config.replicate.res.que&&at.resource[e].display)),t.race.governor.config.replicate.res.neg&&t.resource[a[0]].diff<0&&(t.resource[a[0]].amount<=.95*t.resource[a[0]].max||-1===t.resource[a[0]].max))t.race.replicator.res=a[0];else if(-1!==t.resource[t.race.replicator.res].max&&t.race.governor.config.replicate.res.cap&&t.resource[t.race.replicator.res].amount>=t.resource[t.race.replicator.res].max){let r=a.filter((e=>t.resource[e].max>0));for(let a=0;a-1===t.resource[e].max));e.length>0&&(t.race.replicator.res=e[0])}}}}}};function R(){switch(t.city.calendar.moon){case 0:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-1"):$("#moon").removeClass("wi-moon-waning-crescent-6"),$("#moon").addClass("wi-moon-new");break;case 1:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-2"):$("#moon").removeClass("wi-moon-new"),$("#moon").addClass("wi-moon-waxing-crescent-1");break;case 2:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-3"):$("#moon").removeClass("wi-moon-waxing-crescent-1"),$("#moon").addClass("wi-moon-waxing-crescent-2");break;case 3:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-4"):$("#moon").removeClass("wi-moon-waxing-crescent-2"),$("#moon").addClass("wi-moon-waxing-crescent-3");break;case 4:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-5"):$("#moon").removeClass("wi-moon-waxing-crescent-3"),$("#moon").addClass("wi-moon-waxing-crescent-4");break;case 5:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-6"):$("#moon").removeClass("wi-moon-waxing-crescent-4"),$("#moon").addClass("wi-moon-waxing-crescent-5");break;case 6:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-first-quarter"):$("#moon").removeClass("wi-moon-waxing-crescent-5"),$("#moon").addClass("wi-moon-waxing-crescent-6");break;case 7:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-1"):$("#moon").removeClass("wi-moon-waxing-crescent-6"),$("#moon").addClass("wi-moon-first-quarter");break;case 8:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-2"):$("#moon").removeClass("wi-moon-first-quarter"),$("#moon").addClass("wi-moon-waxing-gibbous-1");break;case 9:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-3"):$("#moon").removeClass("wi-moon-waxing-gibbous-1"),$("#moon").addClass("wi-moon-waxing-gibbous-2");break;case 10:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-4"):$("#moon").removeClass("wi-moon-waxing-gibbous-2"),$("#moon").addClass("wi-moon-waxing-gibbous-3");break;case 11:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-5"):$("#moon").removeClass("wi-moon-waxing-gibbous-3"),$("#moon").addClass("wi-moon-waxing-gibbous-4");break;case 12:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-6"):$("#moon").removeClass("wi-moon-waxing-gibbous-4"),$("#moon").addClass("wi-moon-waxing-gibbous-5");break;case 13:sc($("#moon")),t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-full"):$("#moon").removeClass("wi-moon-waxing-gibbous-5"),$("#moon").addClass("wi-moon-waxing-gibbous-6");break;case 14:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-1"):$("#moon").removeClass("wi-moon-waxing-gibbous-6");let e=xc(2);e.length>0?$("#moon").append(e):$("#moon").addClass("wi-moon-full");break;case 15:sc($("#moon")),t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-2"):$("#moon").removeClass("wi-moon-full"),$("#moon").addClass("wi-moon-waning-gibbous-1");break;case 16:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-3"):$("#moon").removeClass("wi-moon-waning-gibbous-1"),$("#moon").addClass("wi-moon-waning-gibbous-2");break;case 17:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-4"):$("#moon").removeClass("wi-moon-waning-gibbous-2"),$("#moon").addClass("wi-moon-waning-gibbous-3");break;case 18:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-5"):$("#moon").removeClass("wi-moon-waning-gibbous-3"),$("#moon").addClass("wi-moon-waning-gibbous-4");break;case 19:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-6"):$("#moon").removeClass("wi-moon-waning-gibbous-4"),$("#moon").addClass("wi-moon-waning-gibbous-5");break;case 20:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-third-quarter"):$("#moon").removeClass("wi-moon-waning-gibbous-5"),$("#moon").addClass("wi-moon-waning-gibbous-6");break;case 21:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-1"):$("#moon").removeClass("wi-moon-waning-gibbous-6"),$("#moon").addClass("wi-moon-third-quarter");break;case 22:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-2"):$("#moon").removeClass("wi-moon-third-quarter"),$("#moon").addClass("wi-moon-waning-crescent-1");break;case 23:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-3"):$("#moon").removeClass("wi-moon-waning-crescent-1"),$("#moon").addClass("wi-moon-waning-crescent-2");break;case 24:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-4"):$("#moon").removeClass("wi-moon-waning-crescent-2"),$("#moon").addClass("wi-moon-waning-crescent-3");break;case 25:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-5"):$("#moon").removeClass("wi-moon-waning-crescent-3"),$("#moon").addClass("wi-moon-waning-crescent-4");break;case 26:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-6"):$("#moon").removeClass("wi-moon-waning-crescent-4"),$("#moon").addClass("wi-moon-waning-crescent-5");break;case 27:t.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-new"):$("#moon").removeClass("wi-moon-waning-crescent-5"),$("#moon").addClass("wi-moon-waning-crescent-6")}let e;$("#temp").removeClass("wi-thermometer"),$("#temp").removeClass("wi-thermometer-exterior"),0===t.city.calendar.temp?$("#temp").addClass("wi-thermometer-exterior"):2===t.city.calendar.temp&&$("#temp").addClass("wi-thermometer"),$("#weather").removeClass("wi-day-sunny"),$("#weather").removeClass("wi-day-windy"),$("#weather").removeClass("wi-cloud"),$("#weather").removeClass("wi-cloudy-gusts"),$("#weather").removeClass("wi-rain"),$("#weather").removeClass("wi-storm-showers"),$("#weather").removeClass("wi-snow"),$("#weather").removeClass("wi-snow-wind"),0===t.city.calendar.weather?e=0===t.city.calendar.temp?0===t.city.calendar.wind?"wi-snow":"wi-snow-wind":0===t.city.calendar.wind?"wi-rain":"wi-storm-showers":1===t.city.calendar.weather?e=0===t.city.calendar.wind?"wi-cloud":"wi-cloudy-gusts":2===t.city.calendar.weather&&(e=0===t.city.calendar.wind?"wi-day-sunny":"wi-day-windy"),$("#weather").addClass(e)}function H(e){switch(e){case"moon":return t.race.orbit_decayed?z("moon0"):0===t.city.calendar.moon?z("moon1"):t.city.calendar.moon>0&&t.city.calendar.moon<7?z("moon2"):7===t.city.calendar.moon?z("moon3"):t.city.calendar.moon>7&&t.city.calendar.moon<14?z("moon4"):14===t.city.calendar.moon?z("moon5"):t.city.calendar.moon>14&&t.city.calendar.moon<21?z("moon6"):21===t.city.calendar.moon?z("moon7"):t.city.calendar.moon>21?z("moon8"):void 0;case"weather":return function(){switch(t.city.calendar.weather){case 0:return 0===t.city.calendar.temp?1===t.city.calendar.wind?z("snowstorm"):z("snow"):1===t.city.calendar.wind?z("thunderstorm"):z("rain");case 1:return 1===t.city.calendar.wind?z("cloudy_windy"):z("cloudy");case 2:return 1===t.city.calendar.wind?z("sunny_windy"):z("sunny")}}();case"temp":return function(){switch(t.city.calendar.temp){case 0:return z("cold");case 1:return z("moderate");case 2:return z("hot")}}();case"sign":return function(){let e=W(),t=`
          ${z("sign_description",[z(`sign_${e}`),z(`sign_${e}_desc`)])}
          `;return t+=`
          ${function(e){return"pisces"===e||"cancer"===e?z(`sign_${e}_effect`):z(`sign_${e}_effect`,[U(e)[0]])}(e)}
          `,t}();case"astrology":return z(`sign_${W()}_symbol`)}}function U(e){switch(e){case"aries":case"capricorn":return[10];case"taurus":return[2];case"gemini":case"aquarius":return[20];case"cancer":case"sagittarius":return[5];case"leo":return[4];case"virgo":return[15];case"libra":return[25];case"scorpio":return[12,1];case"pisces":return[49,25]}}function W(){const e=new Date;return 0===e.getMonth()&&e.getDate()>=20||1===e.getMonth()&&e.getDate()<=18?"aquarius":1===e.getMonth()&&e.getDate()>=19||2===e.getMonth()&&e.getDate()<=20?"pisces":2===e.getMonth()&&e.getDate()>=21||3===e.getMonth()&&e.getDate()<=19?"aries":3===e.getMonth()&&e.getDate()>=20||4===e.getMonth()&&e.getDate()<=20?"taurus":4===e.getMonth()&&e.getDate()>=21||5===e.getMonth()&&e.getDate()<=21?"gemini":5===e.getMonth()&&e.getDate()>=22||6===e.getMonth()&&e.getDate()<=22?"cancer":6===e.getMonth()&&e.getDate()>=23||7===e.getMonth()&&e.getDate()<=22?"leo":7===e.getMonth()&&e.getDate()>=23||8===e.getMonth()&&e.getDate()<=22?"virgo":8===e.getMonth()&&e.getDate()>=23||9===e.getMonth()&&e.getDate()<=22?"libra":9===e.getMonth()&&e.getDate()>=23||10===e.getMonth()&&e.getDate()<=22?"scorpio":10===e.getMonth()&&e.getDate()>=23||11===e.getMonth()&&e.getDate()<=21?"sagittarius":11===e.getMonth()&&e.getDate()>=22||0===e.getMonth()&&e.getDate()<=19?"capricorn":"time itself is broken"}function Q(){P.w&&P.w.terminate(),C(),Vi("reset",{end:"descension"}),eo("squished",!0),eo(`extinct_${t.race.species}`),t.race.witch_hunter&&"magic"===t.race.universe?eo("nightmare"):eo("corrupted"),"angelic"===_i[t.race.species].type&&to("twisted"),t.race.junker&&"junker"===t.race.species&&to("the_misery"),!t.race.modified&&t.race.junker&&"junker"===t.race.species&&to("garbage_pie"),t.race.cataclysm&&to("finish_line"),t.race.ooze&&"sludge"===t.race.species&&to("slime_lord");let a=gc("descend");t.prestige.Artifact.count+=a.artifact,t.stats.artifact+=a.artifact;let r=Xc();t.stats.spire.hasOwnProperty(r)&&(t.stats.spire[r].hasOwnProperty("lord")?t.stats.spire[r].lord++:t.stats.spire[r].lord=1,t.tech.dl_reset?t.stats.spire[r].dlstr=0:t.stats.spire[r].hasOwnProperty("dlstr")?t.stats.spire[r].dlstr++:t.stats.spire[r].dlstr=1);let s=t.race.species,i=t.race.gods,c=t.city.calendar.orbit,o=t.city.biome,n=t.city.ptrait,l=t.city.geology;t.stats.descend++,zc(),io();let u=!!t.race.hasOwnProperty("srace")&&t.race.srace;t.race={species:"protoplasm",gods:s,old_gods:i,universe:t.race.universe,seeded:!1,seed:Math.floor(g(1e4)),corruption:5,ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended},u&&(t.race.srace=u),Z({orbit:c,biome:o,ptrait:n,geology:l}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}function Z(e){t.city={calendar:{day:0,year:0,weather:2,temp:1,moon:0,wind:0,orbit:e.orbit},biome:e.biome,ptrait:e.ptrait},e.geology&&(t.city.geology=e.geology),t.tech={theology:1},S(),t.new=!0,t.seed=Math.rand(0,1e4)}function V(){let e=Xc();t.race.womling_friend?("m"!==e&&t.stats.womling.friend.l++,"l"!==e&&(t.stats.womling.friend.hasOwnProperty(e)||(t.stats.womling.friend[e]=0),t.stats.womling.friend[e]++)):t.race.womling_lord?("m"!==e&&t.stats.womling.lord.l++,"l"!==e&&(t.stats.womling.lord.hasOwnProperty(e)||(t.stats.womling.lord[e]=0),t.stats.womling.lord[e]++)):t.race.womling_god&&("m"!==e&&t.stats.womling.god.l++,"l"!==e&&(t.stats.womling.god.hasOwnProperty(e)||(t.stats.womling.god[e]=0),t.stats.womling.god[e]++)),t.stats.womling.friend.l>0&&t.stats.womling.lord.l>0&&t.stats.womling.god.l>0&&eo("overlord","m"===e,so(),"l"),t.stats.womling.friend[e]>0&&t.stats.womling.lord[e]>0&&t.stats.womling.god[e]>0&&eo("overlord","m"===e,so(),e)}function J(e){if(t.civic.taxes||(t.civic.taxes={tax_rate:20,display:!1}),!e&&(t.settings.tabLoad||2===t.settings.civTabs&&0===t.settings.govTabs)){var a=$('
          '),r=$(`\n \n \n \n \n \n \n `);a.append(r),$("#r_civics").append(a),ic({el:"#government .govTabs2",data:{t:t.civic.taxes,s:t.settings},methods:{vis:()=>!!t.tech.govern}}),function(e){var a=$('
          ');e.append(a);var r=$(`
          ${z("civics_government_type")} {{ type | govern }}
          `);a.append(r);var s=$("
          ");a.append(s);var i=$('');s.append(i);var c={template:''};ic({el:"#govType",data:t.civic.govern,filters:{govern:e=>z(`govern_${e}`),set:e=>z("anarchy"===e?"civics_set_gov":"civics_revolution")},methods:{trigModal(){this.$buefy.modal.open({parent:this,component:c});var e=setInterval((function(){$("#modalBox").length>0&&(clearInterval(e),function(){$("#modalBox").append($(`

          ${z("civics_government_type")}

          `));let e=xc(6,10);e.length>0&&$("#modalBoxTitle").append(e);let a=qc(6,14,!1);a.length>0&&$("#modalBoxTitle").append(a);var r=$('
          ');$("#modalBox").append(r),t.tech.govern&&("autocracy"!==t.civic.govern.type&&r.append($(``)),"democracy"!==t.civic.govern.type&&r.append($(``)),"oligarchy"!==t.civic.govern.type&&r.append($(``)),t.tech.gov_theo&&"theocracy"!==t.civic.govern.type&&r.append($(``)),t.tech.govern>=2&&"republic"!==t.civic.govern.type&&r.append($(``)),t.tech.gov_soc&&"socialist"!==t.civic.govern.type&&r.append($(``)),t.tech.gov_corp&&"corpocracy"!==t.civic.govern.type&&r.append($(``)),t.tech.govern>=3&&"technocracy"!==t.civic.govern.type&&r.append($(``)),t.tech.gov_fed&&"federation"!==t.civic.govern.type&&r.append($(``)),t.tech.gov_mage&&"magocracy"!==t.civic.govern.type&&r.append($(``))),ic({el:"#govModal",data:t.civic.govern,methods:{setGov(e){if(0===t.civic.govern.rev){let a=t.genes.governor&&"anarchy"===t.civic.govern.type;t.civic.govern.type=e;let r=1e3;t.tech.high_tech&&(r+=250,t.tech.high_tech>=3&&(r+=250),t.tech.high_tech>=6&&(r+=250)),t.tech.space_explore&&t.tech.space_explore>=3&&(r+=250),t.race.unorganized&&(r=Math.round(r*(1+di.unorganized.vars()[0]/100))),t.stats.achieve.anarchist&&(r=Math.round(r*(1-t.stats.achieve.anarchist.l/10))),t.race.lawless&&(r=Math.round(r/(100-di.lawless.vars()[0])));let s=Oi("tuskin");s>0&&(r=Math.round(r/(100-di.lawless.vars(1)[0]*s)));let i=D("aristocrat",0);i&&(r=Math.round(r*(1-i/100))),t.civic.govern.rev=r+t.civic.govern.fr,a&&gs(),ic({el:"#govModal"},"destroy"),$(".modal-background").click(),Ii()}}}}),Ei("GovPop",(function(e){let a=$(e.this).data("gov"),r=t.tech.unify&&t.tech.unify>=2&&"federation"===a?"federation_alt":a;return"theocracy"===r&&t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display&&(r="theocracy_alt"),$(`
          ${se(a)}
          ${ae()[r]}
          `)}),{elm:"#govModal button",self:!0,classes:"has-background-light has-text-dark"})}())}),50)},startrev(){t.civic.govern.fr=t.civic.govern.rev,t.civic.govern.rev=0},force:()=>t.civic.govern.rev>0?z("civics_force_rev_desc"):z("civics_force_rev_desc2"),vis:()=>!!t.tech.govern}}),Ei("govLabel",(function(){let e=t.tech.unify&&t.tech.unify>=2&&"federation"===t.civic.govern.type?"federation_alt":t.civic.govern.type;return"theocracy"===e&&t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display&&(e="theocracy_alt"),$(`
          ${se(t.civic.govern.type)}
          ${ae()[e]}
          `)})),Ei("govTypeChange",(function(){return t.civic.govern.rev>0?z("civics_change_desc",[t.civic.govern.rev]):z("civics_change_desc2")}),{elm:"#govType .change"})}($("#r_govern0")),function(e){var a=$('
          ');e.append(a);var r=$(`

          ${z("civics_tax_rates")}

          `);a.append(r);var s=$(''),i=$('«'),c=$('»');a.append(i),a.append(s),a.append(c),ic({el:"#tax_rates",data:t.civic.taxes,filters:{tax_level(e){let a=xc(11,14),r=qc(2,14,!1);return a.length>0&&(0===e&&!t.race.noble||10===e&&t.race.noble)?a:13===e&&r.length>0?r:`${e}%`}},methods:{add(){he("add")},sub(){he("sub")}}}),Ei("taxRateLabel",(function(){return z("civics_tax_rates_desc")}),{classes:"has-background-light has-text-dark"})}($("#r_govern0"));var s=$('
          ');$("#r_govern0").append(s),L()}}function Y(){if(X(),t.settings.tabLoad||2===t.settings.civTabs&&3===t.settings.govTabs){var a=$('
          ');$("#military").append(a),$("#military").append($('
          ')),ve(a,!0),function(){if(t.race.sludge)return!1;if(0===$("#mad").length){let s="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name");var a=$('
          ');$("#military").append(a);var r=$('
          ');a.append(r),r.append($(`
          ${z("civics_mad_reset_desc",[s])}
          `));let i=!(!t.race.hrt||!["wolven","vulpine"].includes(t.race.hrt));r.append($(`
          `)),r.append($(`
          `)),t.civic.mad.armed||($("#mad").addClass("armed"),$("#mad .arm").html(z(i?"civics_mad_disarm_grenades":"civics_mad_disarm_missiles"))),ic({el:"#mad",data:t.civic.mad,methods:{launch(){if(!t.civic.mad.armed&&!t.race.cataclysm){$("body").addClass("nuke");let a=$('
          ');$("body").append(a),setTimeout((function(){a.addClass("burn")}),500),setTimeout((function(){a.addClass("b")}),600),setTimeout((function(){!function(){if(!t.civic.mad.armed&&!t.race.cataclysm){t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),C(),Vi("reset",{end:"mad"});let a=t.race.species,r=t.race.gods,s=t.city.calendar.orbit,i=t.city.biome,c=t.city.ptrait,o=t.city.geology,n=gc("mad");t.stats.mad++,zc(),"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=n.plasmid,t.stats.antiplasmid+=n.plasmid):(t.prestige.Plasmid.count+=n.plasmid,t.stats.plasmid+=n.plasmid),eo("apocalypse"),eo("squished",!0),eo(`extinct_${a}`),"anarchy"===t.civic.govern.type&&eo("anarchist"),"hellscape"===t.city.biome&&"demonic"!==_i[t.race.species].type&&to("take_no_advice"),t.race.truepath&&eo("ashanddust"),io();let l=!!t.race.hasOwnProperty("srace")&&t.race.srace,u=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0;t.race={species:"protoplasm",gods:a,old_gods:r,rapid_mutation:1,ancient_ruins:1,universe:t.race.universe,seeded:!1,ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended},u>0&&(t.race.corruption=u),l&&(t.race.srace=l),Z({orbit:s,biome:i,ptrait:c,geology:o}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}}()}),4e3)}},arm(){t.civic.mad.armed?($("#mad .arm").html(z(i?"civics_mad_disarm_grenades":"civics_mad_disarm_missiles")),t.civic.mad.armed=!1,$("#mad").addClass("armed")):($("#mad .arm").html(z(i?"civics_mad_arm_grenades":"civics_mad_arm_missiles")),t.civic.mad.armed=!0,$("#mad").removeClass("armed"))}}}),["mdarm","mdlaunch"].forEach((function(e){Ei(`mad${e}`,(function(){return"{{ label() }}"}),{elm:`#mad .${e}`,in:function(a){ic({el:`#${a.id} > span`,data:{test:"val"},methods:{label(){switch(e){case"mdarm":return t.tech.world_control&&!t.race.truepath?z("civics_mad_missiles_world_control_desc"):z(i?"civics_mad_missiles_desc_easter":"civics_mad_missiles_desc");case"mdlaunch":{let e=gc("mad"),a="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name");return z("civics_mad_missiles_warning",[e.plasmid,a])}}}}})},out:function(e){ic({el:`#${e.id} > span`},"destroy")}})}))}}()}}function X(){t.civic.garrison||(t.civic.garrison={display:!1,disabled:!1,rate:0,progress:0,tactic:0,workers:0,wounded:0,raid:0,max:0}),t.civic.garrison.mercs||(t.civic.garrison.mercs=!1),t.civic.garrison.fatigue||(t.civic.garrison.fatigue=0),t.civic.garrison.protest||(t.civic.garrison.protest=0),t.civic.garrison.m_use||(t.civic.garrison.m_use=0),t.civic.garrison.crew||(t.civic.garrison.crew=0),t.civic.mad||(t.civic.mad={display:!1,armed:!0})}function ee(e){if(t.race.truepath){if(t.civic.foreign[`gov${e}`].hstl<10)return 1+(10-t.civic.foreign[`gov${e}`].hstl)/40;if(t.civic.foreign[`gov${e}`].hstl>60)return 1-(-60+t.civic.foreign[`gov${e}`].hstl)/160}return 1}function te(e){if(void 0===t.civic.foreign[`gov${e}`].name){let a=Yi();t.civic.foreign[`gov${e}`].name={s0:a.s0,s1:a.s1}}return z(`civics_gov${t.civic.foreign[`gov${e}`].name.s0}`,[t.civic.foreign[`gov${e}`].name.s1])}const ae=function(){return{anarchy:z("govern_anarchy_effect"),autocracy:z("govern_autocracy_effect",re.autocracy()),democracy:z("govern_democracy_effect",re.democracy()),oligarchy:t.tech.high_tech&&t.tech.high_tech>=12?z("govern_oligarchy_effect_alt",[re.oligarchy()[1]]):z("govern_oligarchy_effect",[re.oligarchy()[0],re.oligarchy()[1]]),theocracy:z("govern_theocracy_effect",re.theocracy()),theocracy_alt:z("govern_theocracy_effect_alt",re.theocracy()),republic:z("govern_republic_effect",re.republic()),socialist:z("govern_socialist_effect",re.socialist()),corpocracy:z("govern_corpocracy_effect",re.corpocracy()),technocracy:t.tech.high_tech&&t.tech.high_tech>=16?z("govern_technocracy_effect_alt",[re.technocracy()[0],re.technocracy()[2]]):z("govern_technocracy_effect",re.technocracy()),federation:z("govern_federation_effect",[re.federation()[0],re.federation()[1]]),federation_alt:z("govern_federation_effect_alt",[25,re.federation()[2],re.federation()[1]]),magocracy:z("govern_magocracy_effect",re.magocracy())}},re={autocracy:()=>[t.tech.high_tech&&t.tech.high_tech>=2?t.tech.high_tech>=12?10:18:25,D("organizer",0)?40:35],democracy:()=>[t.tech.high_tech&&t.tech.high_tech>=2?t.tech.high_tech>=12?30:25:20,D("organizer",0)?1:5],oligarchy:()=>[t.tech.high_tech&&t.tech.high_tech>=12?0:t.tech.high_tech&&t.tech.high_tech>=2?2:5,D("organizer",0)?25:20],theocracy:()=>[12,D("organizer",0)?10:25,t.tech.high_tech&&t.tech.high_tech>=12?t.tech.high_tech>=16?25:40:50],republic:()=>[D("organizer",0)?30:25,t.tech.high_tech&&t.tech.high_tech>=12?t.tech.high_tech>=16?40:30:20],socialist:()=>[t.tech.high_tech&&t.tech.high_tech>=12?t.tech.high_tech>=16?50:42:35,D("organizer",0)?12:10,10,D("organizer",0)?10:20],corpocracy:()=>[D("organizer",0)?220:200,D("organizer",0)?175:150,D("organizer",0)?110:100,t.tech.high_tech&&t.tech.high_tech>=12?5:10,t.tech.high_tech&&t.tech.high_tech>=16?40:30],technocracy:()=>[8,t.tech.high_tech&&t.tech.high_tech>=16?0:t.tech.high_tech&&t.tech.high_tech>=12?1:2,D("organizer",0)?18:10],federation:()=>[3,D("organizer",0)?12:10,t.tech.high_tech&&t.tech.high_tech>=12?t.tech.high_tech>=16?40:36:32],magocracy:()=>[D("organizer",0)?30:25,t.tech.high_tech&&t.tech.high_tech>=12?t.tech.high_tech>=16?50:40:25]};function se(e){return t.race.witch_hunter&&"magocracy"===e?z("witch_hunter_magocracy"):z(`govern_${e}_desc`)}function ie(){if(0===$("#foreign").length&&!t.race.cataclysm&&(!t.tech.world_control||t.race.truepath)&&!t.tech.isolation){let a=$('
          ');a.append($(`

          ${z("civics_foreign")}

          `)),$("#r_govern0").append(a);var e={template:''};let r=t.race.truepath?5:3;for(let e=0;e{{ '${e}' | gov }} - ${z("civics_garrison_occupy")} - ${z("civics_garrison_annex")} - ${z("civics_garrison_purchase")}
          `);a.append(t);let r=$("
          ");r.append($(``)),r.append($(``)),r.append($(``)),t.append(r),t.append($(`
          ${z("civics_gov_mil_rate")}: {{ f${e}.mil | military(${e}) }} ({{ f${e}.mil }})
          `)),t.append($(`
          ${z("civics_gov_relations")}: {{ f${e}.hstl | relation }} ({{ f${e}.hstl | hate }})
          `)),t.append($(`
          ${z("civics_gov_eco_rate")}: {{ f${e}.eco | eco(${e}) }} ({{ f${e}.eco }})
          `)),t.append($(`
          ${z("civics_gov_unrest")}: {{ f${e}.unrest | discontent(${e}) }} ({{ f${e}.unrest | turmoil }})
          `))}let s={f0:t.civic.foreign.gov0,f1:t.civic.foreign.gov1,f2:t.civic.foreign.gov2,t:t.tech};t.race.truepath&&(s.f3=t.civic.foreign.gov3,s.f4=t.civic.foreign.gov4),ic({el:"#foreign",data:s,filters:{military:(e,a)=>t.civic.foreign[`gov${a}`].spy>=1?z(e<50?"civics_gov_v_weak":e<75?"civics_gov_weak":e>300?"civics_gov_superpower":e>200?"civics_gov_v_strong":e>160?"civics_gov_strong":e>125?"civics_gov_above_average":"civics_gov_average"):"???",relation:e=>z(e>80?"civics_gov_hated":e>60?"civics_gov_hostile":e>40?"civics_gov_poor":e>25?"civics_gov_neutral":e>10?"civics_gov_liked":"civics_gov_good"),eco:(e,a)=>t.civic.foreign[`gov${a}`].spy>=2?z(e<60?"civics_gov_weak":e<80?"civics_gov_recession":e>120?"civics_gov_strong":"civics_gov_average"):"???",discontent:(e,a)=>t.civic.foreign[`gov${a}`].spy>=3?z(e<=0?"civics_gov_none":e<30?"civics_gov_low":e<60?"civics_gov_medium":e<90?"civics_gov_high":"civics_gov_extreme"):"???",gov:e=>te(e),sab:e=>"none"===e?"":z(`civics_spy_${e}`),hate:e=>100-e+"%",turmoil:e=>`${e}%`},methods:{campaign(e){we(e)},battleAssessment:e=>be(e),trigModal(a){this.$buefy.modal.open({parent:this,component:e});var r=setInterval((function(){$("#modalBox").length>0&&(clearInterval(r),function(e){$("#modalBox").append($(`

          ${z("civics_espionage_actions")}

          `));var a=$('
          ');$("#modalBox").append(a),t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${e}`].spy>=1&&(a.append($(``)),a.append($(``)),e<3&&a.append($(``)),e<3&&t.civic.foreign[`gov${e}`].hstl<=50&&t.civic.foreign[`gov${e}`].unrest>=50&&a.append($(``)),e<3&&t.civic.foreign[`gov${e}`].spy>=3&&a.append($(``))),ic({el:"#espModal",data:t.civic.foreign[`gov${e}`],methods:{influence(e){t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${e}`].spy>=1&&(_e("influence",e),ic({el:"#espModal"},"destroy"),$(".modal-background").click(),Ii())},sabotage(e){t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${e}`].spy>=1&&(_e("sabotage",e),ic({el:"#espModal"},"destroy"),$(".modal-background").click(),$("#popGov").hide(),Ii())},incite(e){e>=3||t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${e}`].spy>=1&&(_e("incite",e),ic({el:"#espModal"},"destroy"),$(".modal-background").click(),Ii())},annex(a){if(!(a>=3)&&t.civic.foreign[`gov${e}`].hstl<=50&&t.civic.foreign[`gov${e}`].unrest>=50&&t.city.morale.current>=200+t.civic.foreign[`gov${e}`].hstl-t.civic.foreign[`gov${e}`].unrest&&t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${a}`].spy>=1&&0===t.civic.foreign[`gov${a}`].sab){let e=t.tech.spy>=4?150:300;t.race.befuddle&&(e=Math.round(e*(1-di.befuddle.vars()[0]/100)));let r=Oi("dryad");r>0&&(e=Math.round(e*(1-di.befuddle.vars(1)[0]/100*r))),t.civic.foreign[`gov${a}`].sab=e,t.civic.foreign[`gov${a}`].act="annex",ic({el:"#espModal"},"destroy"),$(".modal-background").click(),Ii()}},purchase(e){if(e>=3)return;let a=ue(e);if(a<=t.resource.Money.amount&&t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${e}`].spy>=3&&0===t.civic.foreign[`gov${e}`].sab){t.resource.Money.amount-=a;let r=t.tech.spy>=4?150:300;t.race.befuddle&&(r=Math.round(r*(1-di.befuddle.vars()[0]/100)));let s=Oi("dryad");s>0&&(r=Math.round(r*(1-di.befuddle.vars(1)[0]/100*s))),t.civic.foreign[`gov${e}`].sab=r,t.civic.foreign[`gov${e}`].act="purchase",ic({el:"#espModal"},"destroy"),$(".modal-background").click(),Ii()}}}}),Ei("GovLabel",(function(a){let r=$(a.this).data("esp"),s="";if("purchase"===r){let t=ue(e).toLocaleString();s=z(`civics_spy_${r}_desc`,[te(e),t])}else if("annex"===r)if(t.city.morale.current>=200+t.civic.foreign[`gov${e}`].hstl-t.civic.foreign[`gov${e}`].unrest)s=z(`civics_spy_${r}_desc`,[te(e)]);else{let a=200+t.civic.foreign[`gov${e}`].hstl-t.civic.foreign[`gov${e}`].unrest;s=z(`civics_spy_${r}_goal`,[te(e),a])}else s=z(`civics_spy_${r}_desc`,[te(e)]);let i="";return("influence"===r&&0===t.civic.foreign[`gov${e}`].hstl||"sabotage"===r&&t.civic.foreign[`gov${e}`].spy>=2&&50===t.civic.foreign[`gov${e}`].mil||"incite"===r&&t.civic.foreign[`gov${e}`].spy>=4&&100===t.civic.foreign[`gov${e}`].unrest)&&(i=`
          ${z("civics_spy_warning")}
          `),$(`${i}
          ${s}
          `)}),{elm:"#espModal button",self:!0,classes:"has-background-light has-text-dark"})}(a))}),50)},spy_disabled:e=>t.civic.foreign[`gov${e}`].trn>0||ne(e)>t.resource.Money.amount,spy(e){le(e)},spyDesc:e=>ce(e),espDesc:()=>oe(),vis:()=>!(!t.civic.garrison.display||t.tech.world_control&&!t.race.truepath||t.race.cataclysm||t.tech.isolation),gvis:e=>!t.tech.isolation&&(e<=2?!t.tech.world_control:3===e&&!!t.tech.rival)}});for(let e=0;e{{ label() }}"}),{elm:`#gov${e} .attack`,in:function(t){ic({el:`#${t.id} > span`,data:{test:"val"},methods:{label:()=>be(e)}})},out:function(e){ic({el:e.id},"destroy")}}),Ei(`gov${e}ts`,(function(){return"{{ label() }}"}),{elm:`#gov${e} .tspy`,in:function(t){ic({el:`#${t.id} > span`,data:{test:"val"},methods:{label:()=>ce(e)}})},out:function(e){ic({el:e.id},"destroy")}}),Ei(`gov${e}s`,(function(){return oe()}),{elm:`#gov${e} .sspy`});t.race.truepath&&Ei("garRivaldesc1",(function(){return z("civics_gov_tp_rival",[te(3),_i[t.race.species].home])}),{elm:"#gov3 > span"})}}function ce(e){return t.civic.foreign[`gov${e}`].trn>0?z("civics_progress"):z("civics_gov_spy_desc",[q(ne(e))])}function oe(){return z("civics_gov_esp_desc")}function ne(e){let a=Math.round(t.civic.foreign[`gov${e}`].mil/2+t.civic.foreign[`gov${e}`].hstl/2-t.civic.foreign[`gov${e}`].unrest)+10;return a<50&&(a=50),t.race.infiltrator&&(a/=3),"scorpio"===W()&&(a*=1-U("scorpio")[0]/100),Math.round(a**(t.civic.foreign[`gov${e}`].spy+1))+500}function le(e){if(t.tech.spy&&0===t.civic.foreign[`gov${e}`].trn){let a=ne(e);if(t.resource.Money.amount>=a){t.resource.Money.amount-=a;let r=300;t.tech.spy>=3&&t.city.boot_camp&&(r-=10*(t.race.orbit_decayed&&t.space.space_barracks?t.space.space_barracks.on:t.city.boot_camp.count),r<10&&(r=10)),t.race.infiltrator&&(r=Math.round(r/2)),t.civic.foreign[`gov${e}`].trn=r}}}function ue(e){let a=15384*t.civic.foreign[`gov${e}`].eco;return a*=1+1.6*t.civic.foreign[`gov${e}`].hstl/100,a*=1-.25*t.civic.foreign[`gov${e}`].unrest/100,+a.toFixed(0)}function de(e){return e?t.tech.world_control||t.civic.foreign[e].occ||t.civic.foreign[e].anx||t.civic.foreign[e].buy:t.civic.foreign.gov0.occ||t.civic.foreign.gov1.occ||t.civic.foreign.gov2.occ||t.civic.foreign.gov0.anx||t.civic.foreign.gov1.anx||t.civic.foreign.gov2.anx||t.civic.foreign.gov0.buy||t.civic.foreign.gov1.buy||t.civic.foreign.gov2.buy}function _e(e,a){switch(e){case"influence":if(t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${a}`].spy>=1&&0===t.civic.foreign[`gov${a}`].sab){let e=t.tech.spy>=4?200:300;t.race.befuddle&&(e=Math.round(e*(1-di.befuddle.vars()[0]/100)));let r=Oi("dryad");r>0&&(e=Math.round(e*(1-di.befuddle.vars(1)[0]/100*r))),t.civic.foreign[`gov${a}`].sab=e,t.civic.foreign[`gov${a}`].act="influence"}break;case"sabotage":if(t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${a}`].spy>=1&&0===t.civic.foreign[`gov${a}`].sab){let e=t.tech.spy>=4?400:600;t.race.befuddle&&(e=Math.round(e*(1-di.befuddle.vars()[0]/100)));let r=Oi("dryad");r>0&&(e=Math.round(e*(1-di.befuddle.vars(1)[0]/100*r))),t.civic.foreign[`gov${a}`].sab=e,t.civic.foreign[`gov${a}`].act="sabotage"}break;case"incite":if(a>=3)break;if(t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${a}`].spy>=1&&0===t.civic.foreign[`gov${a}`].sab){let e=t.tech.spy>=4?600:900;t.race.befuddle&&(e=Math.round(e*(1-di.befuddle.vars()[0]/100)));let r=Oi("dryad");r>0&&(e=Math.round(e*(1-di.befuddle.vars(1)[0]/100*r))),t.civic.foreign[`gov${a}`].sab=e,t.civic.foreign[`gov${a}`].act="incite"}}}function pe(e){let a=!!(t.tech.currency&&t.tech.currency>=5);if(e)return!a&&!t.race.terrifying||t.race.noble?t.race.noble?di.noble.vars()[0]:10:0;{let e=30;t.race.noble?e=di.noble.vars()[1]:(a||t.race.terrifying)&&(e+=20),"oligarchy"===t.civic.govern.type&&(e+=re.oligarchy()[1]);let r=D("aristocrat",1);return r&&(e+=r),e}}function he(e,a){switch(e){case"add":{let e=a||b(),r=pe(!1);t.race.noble?(t.civic.taxes.tax_rate+=e,t.civic.taxes.tax_rate>("oligarchy"===t.civic.govern.type?40:20)&&(t.civic.taxes.tax_rate="oligarchy"===t.civic.govern.type?40:20)):t.civic.taxes.tax_rater&&(t.civic.taxes.tax_rate=r))}break;case"sub":{let e=a||b(),r=pe(!0);t.civic.taxes.tax_rate>r&&(t.civic.taxes.tax_rate-=e,t.civic.taxes.tax_rate25e3&&(e=25e3),t.civic.garrison.m_use>0&&(e*=1.1**t.civic.garrison.m_use),t.race.brute&&(e*=1-di.brute.vars()[0]/100);let a=Oi("orc");return a>0&&(e*=1-di.brute.vars(1)[0]/100*a),t.race.inflation&&(e*=1+t.race.inflation/500),t.race.high_pop&&(e*=di.high_pop.vars()[1]/100),Math.round(e)}function fe(e){if(t.tech.mercs){let a=e||b(),r=!0;for(;r&&a>0;){let e=ge();t.civic.garrison.workers=e?(t.resource.Money.amount-=e,t.civic.garrison.workers++,t.civic.garrison.m_use++):r=!1,a--}}}function ve(e,a){sc(e),t.tech.world_control&&!t.race.truepath?e.append($(`

          ${z("civics_garrison")}

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

          ${z("civics_garrison")}

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

          ${z("tab_tauceti")}

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

          ${r}

          ${s}
          `):e.append(`

          ${r}

          {{ support }}/{{ s_max }}${s}
          `),ic({el:`#sr${a}`,data:t.tauceti[i],filters:{filter(){return Ve[a].info.filter(...arguments)}}})}else e.append(`

          ${r}

          ${s}
          `);Ei(a,(function(){return"string"==typeof Ve[a].info.desc?Ve[a].info.desc:Ve[a].info.desc()}),{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(Ve[a]).forEach((function(e){"info"!==e&&Rt(Ve,a,e)&&vs(Ve[a][e],"tauceti",e)})),Ve[a].info.hasOwnProperty("extra")&&Ve[a].info.extra(a)}}))}function rt(){if((t.settings.tabLoad||2===t.settings.civTabs&&5===t.settings.govTabs)&&(vt(),_t(),sc($("#dwarfShipYard")),t.space.hasOwnProperty("shipyard")&&t.settings.showShipYard)){let e=$("#dwarfShipYard");t.space.shipyard.hasOwnProperty("blueprint")||(t.space.shipyard.blueprint={class:"corvette",armor:"steel",weapon:"railgun",engine:"ion",power:"diesel",sensor:"radar",name:st()});let a=$('
          ');e.append(a);let r=$('
          ');a.append(r),r.append(`
          ${z("outer_shipyard_registry")}:
          `),r.append(`
          ${z("crew")}
          `),r.append(`
          ${z("power")}
          `),r.append(`
          ${z("firepower")}
          `),r.append(`
          ${z("outer_shipyard_sensors")}
          `),r.append(`
          ${z("speed")}
          `),r.append(`
          ${z("outer_shipyard_fuel")}
          `),a.append('
          ');let s=$('
          ');a.append(s);let i={class:["corvette","frigate","destroyer","cruiser","battlecruiser","dreadnought","explorer"],power:["solar","diesel","fission","fusion","elerium"],weapon:["railgun","laser","p_laser","plasma","phaser","disruptor"],armor:["steel","alloy","neutronium"],engine:["ion","tie","pulse","photon","vacuum","emdrive"],sensor:["visual","radar","lidar","quantum"]};Object.keys(i).forEach((function(e){let t="";i[e].forEach((function(a,r){t+=`${z(`outer_shipyard_${e}_${a}`)}`})),s.append(`\n ${t}\n `)}));let c=$('
          ');c.append(``),c.append(`${z("outer_shipyard_fleet_details")}`),c.append(`${z("outer_shipyard_fleet_sort")}`),a.append(c),c.append(`
          ${z("outer_shipyard_park",[ea().dwarf])}${z("outer_shipyard_map")}`),it();let o={template:''};ic({el:"#shipPlans",data:{b:t.space.shipyard.blueprint,s:t.space.shipyard},methods:{setVal(e,a){"class"===e&&"explorer"===a?(t.space.shipyard.blueprint.engine="emdrive",t.space.shipyard.blueprint.weapon="railgun",t.tech.syard_armor>=3&&(t.space.shipyard.blueprint.armor="neutronium"),t.tech.syard_sensor>=4&&(t.space.shipyard.blueprint.sensor="quantum"),t.tech.syard_power>=4&&(t.space.shipyard.blueprint.power="elerium")):"class"===e&&"explorer"!==a&&"explorer"===t.space.shipyard.blueprint.class&&(t.space.shipyard.blueprint.engine="ion"),t.space.shipyard.blueprint[e]=a,it()},avail(e,a,r){if(!("class"!==e&&"engine"!==e||!t.tech.tauceti||"emdrive"!==r&&"explorer"!==r))return!0;if("explorer"===t.space.shipyard.blueprint.class){if("weapon"===e)return 1===a;if("engine"===e)return 6===a;if("sensor"===e)return 4===a}return t.tech[`syard_${e}`]>a},crewText:()=>ct(t.space.shipyard.blueprint),powerText(){let e=ot(t.space.shipyard.blueprint);return e<0?`${e}kW`:`${e}kW`},fireText:()=>nt(t.space.shipyard.blueprint),sensorText:()=>gt(t.space.shipyard.blueprint)+"km",speedText(){let e=7.695363719135802*lt(t.space.shipyard.blueprint);return Math.round(e)+"km/s"},fuelText(){let e=ut(t.space.shipyard.blueprint);return e.res?`-${e.burn} ${t.resource[e.res].name}`:"N/A"},build(){if(ot(t.space.shipyard.blueprint)>=0){let e=dt(t.space.shipyard.blueprint),a={};if(Object.keys(e).forEach((function(t){a[t]=function(){return e[t]}})),Cs(!1,a)){let e=Ac(t.space.shipyard.blueprint);e.location="spc_dwarf",e.xy=yt("spc_dwarf"),e.origin=Ac(e.xy),e.destination=Ac(e.xy),e.transit=0,e.dist=0,e.damage=0,e.fueled=!1,0===e.name.length&&(e.name=st());let a=1,r=e.name;for(;t.space.shipyard.ships.filter((e=>e.name===r)).length>0;)a++,r=e.name+` ${a}`;e.name=r,t.space.shipyard.ships.push(e),pt(),it(),t.space.shipyard.blueprint.name=st()}}},trigModal(){this.$buefy.modal.open({parent:this,component:o});let e=setInterval((function(){$("#modalBox").length>0&&(clearInterval(e),$("#modalBox").append($('

          Solar System

          ')),function(e){let t=$('
          ').appendTo(e),a={},r={},s=!1;Mt={},qt=20,t.append($('').on("mouseup mouseover mouseout",(()=>s=!1)).on("mousedown",(e=>{s=!0,r.x=e.clientX-Mt.x,r.y=e.clientY-Mt.y})).on("mousemove",(e=>{s&&(Mt.x=e.clientX-r.x,Mt.y=e.clientY-r.y,Pt())})).on("wheel",(e=>(e.originalEvent.deltaY<0?(qt/=.8,Mt.x=a.x+(Mt.x-a.x)/.8,Mt.y=a.y+(Mt.y-a.y)/.8,Pt()):(qt*=.8,Mt.x=a.x+.8*(Mt.x-a.x),Mt.y=a.y+.8*(Mt.y-a.y),Pt()),!1))),$('').on("click",(()=>{qt/=.8,Mt.x=a.x+(Mt.x-a.x)/.8,Mt.y=a.y+(Mt.y-a.y)/.8,Pt()})),$('').on("click",(()=>{qt*=.8,Mt.x=a.x+.8*(Mt.x-a.x),Mt.y=a.y+.8*(Mt.y-a.y),Pt()})));let i=document.getElementById("mapCanvas").getBoundingClientRect();a.x=i.width/2,a.y=i.height/2,Mt.x=a.x,Mt.y=a.y,Pt()}($("#modalBox")))}),50)},redraw(){pt()}},filters:{lbl:(e,t)=>z(`outer_shipyard_${t}_${e}`)}}),Object.keys(i).forEach((function(e){for(let t=0;t<$(`#shipPlans .${e}`).length;t++)Ei(`shipPlans${e}${t}`,(function(t){let a=$(t.this).attr("data-val");return z(`outer_shipyard_${e}_${a}_desc`)}),{elm:`#shipPlans .${e}.a${t}`,placement:"right"})})),e.append($('
          ')),pt()}}function st(){let e=["Trident","Spacewolf","Excalibur","Neptune","Deimos","Phobos","Enterprise","Intrepid","Daedalus","Odyssey","Endurance","Horizon","Hyperion","Icarus","Aurora","Axiom","Nemesis","Normandy","Orion","Prometheus","Vanguard","Discovery","Voyager","Defiant","Titan","Liberty","Destiny","Phoenix","Nautilus","Barracuda","Dolphin","Cuttlefish","Tiger Shark","Stingray","Swordfish","Triton","Dragon","Scorpion","Hagfish","Marlin","Galileo","Raven","Sarcophagus","Excelsior","Scimitar","Vengeance","Nomad","Nova","Olympus","Aegis","Agamemnon","Charon","Achilles","Apollo","Hermes","Hydra","Medusa","Talos","Zeus","Heracles","Cerberus","Acheron","Damocles","Juno","Persephone","Solaris","Victory","Hawk","Fury","Razor","Stinger","Outrider","Falcon","Vulture","Nirvana","Retribution","Swordbreaker","Valkyrie","Athena","Avalon","Merlin","Argonaut","Serenity","Gunstar","Ranger","Tantive","Cygnus","Nostromo","Reliant","Narcissus","Liberator","Sulaco","Infinity","Resolute","Wasp","Hornet","Independence","Gilgamesh","Midway","Concordia","Goliath","Cosmos","Express","Tigers Claw","Oberon","Minnow","Majestic","Spartacus","Colossi","Vigilant","Remorseless","Caelestis","Inquisitor","Atlas","Avenger","Dauntless","Nihilus","Thanatos","Stargazer","Xyzzy","Kraken","Xerxes","Spitfire","McShipFace","Monitor","Merrimack","Constitution","Ghost","Pequod","Arcadia","Corsair","Inferno","Jenny","Revenge","Red October","Jackdaw","Thorn","Caleuche","Valencia","Ourang","Deering","Baychimo","Octavius","Joyita","Lovibond","Celeste","Dutchman"],a=e[Math.rand(0,e.length)];return t.space.shipyard.ships.filter((e=>e.name===a)).length>0&&(a=function(){let e=["al","an","ar","as","at","ea","ed","en","er","es","ha","he","hi","in","is","it","le","me","nd","ne","ng","nt","on","or","ou","re","se","st","te","th","ti","to","ve","wa","all","and","are","but","ent","era","ere","eve","for","had","hat","hen","her","hin","his","ing","ion","ith","not","ome","oul","our","sho","ted","ter","tha","the","thi","tio","uld","ver","was","wit","you"],t=Math.rand(2,5),a="";for(let r=0;r${t.resource[a].name}${q(e[a])}`):$("#shipYardCosts").append(` | ${t.resource[a].name} ${q(e[a])}`)}))}function ct(e){switch(e.class){case"corvette":return ua(2);case"frigate":return ua(3);case"destroyer":return ua(4);case"cruiser":return ua(6);case"battlecruiser":return ua(8);case"dreadnought":case"explorer":return ua(10)}}function ot(e,t){let a=0,r=1,s=1;switch(e.class){case"frigate":r=1.1,s=1.2;break;case"destroyer":r=1.5,s=1.65;break;case"cruiser":r=2,s=2.5;break;case"battlecruiser":r=2.5,s=3.5;break;case"dreadnought":r=5,s=6.5;break;case"explorer":r=6,s=2}switch(e.power){case"solar":a=Math.round(50*r);break;case"diesel":a=Math.round(100*r);break;case"fission":a=Math.round(150*r);break;case"fusion":a=Math.round(("explorer"===e.class||t?174:175)*r);break;case"elerium":a=Math.round(200*r)}switch(a=Math.round(oc(a)),e.weapon){case"railgun":a-=Math.round(10*s);break;case"laser":a-=Math.round(30*s);break;case"p_laser":a-=Math.round(18*s);break;case"plasma":a-=Math.round(50*s);break;case"phaser":a-=Math.round(65*s);break;case"disruptor":a-=Math.round(100*s)}switch(e.engine){case"ion":a-=Math.round(25*s);break;case"tie":a-=Math.round(50*s);break;case"pulse":a-=Math.round(40*s);break;case"photon":a-=Math.round(75*s);break;case"vacuum":a-=Math.round(120*s);break;case"emdrive":a-=Math.round(("explorer"===e.class||t?515:1024)*s)}switch(e.sensor){case"radar":a-=Math.round(10*s);break;case"lidar":a-=Math.round(25*s);break;case"quantum":a-=Math.round(75*s)}return a}function nt(e){let t=0;switch(e.weapon){case"railgun":t=36;break;case"laser":t=64;break;case"p_laser":t=54;break;case"plasma":t=90;break;case"phaser":t=114;break;case"disruptor":t=156}switch(e.class){case"corvette":return t;case"frigate":return Math.round(1.5*t);case"destroyer":return Math.round(2.75*t);case"cruiser":return Math.round(5.5*t);case"battlecruiser":return Math.round(10*t);case"dreadnought":return Math.round(22*t);case"explorer":return Math.round(1.2*t)}}function lt(e){let a=1;switch(e.class){case"corvette":a="neutronium"===e.armor?1.1:1;break;case"frigate":a="neutronium"===e.armor?1.35:1.25;break;case"destroyer":a="neutronium"===e.armor?1.95:1.8;break;case"cruiser":a="neutronium"===e.armor?3.5:3;break;case"battlecruiser":a="neutronium"===e.armor?4.8:4;break;case"dreadnought":a="neutronium"===e.armor?7.5:6;break;case"explorer":a=1}let r="spc_dwarf"===e.location&&i.m_relay&&0===e.transit&&t.space.m_relay&&t.space.m_relay.charged>=1e4?3:1;switch(e.engine){case"ion":return 12/a*r;case"tie":return 22/a*r;case"pulse":return 18/a*r;case"photon":return 30/a*r;case"vacuum":return 42/a*r;case"emdrive":return 37500/a*r}}function ut(e){let t=!1,a=0;switch(e.power){case"diesel":t="Oil",a=8;break;case"fission":t="Uranium",a=.5;break;case"fusion":t="Helium_3",a=12;break;case"elerium":t="Elerium",a=1}switch(e.class){case"frigate":a*=1.25;break;case"destroyer":a*=1.5;break;case"cruiser":a*=2;break;case"battlecruiser":a*=3;break;case"dreadnought":a*=5;break;case"explorer":a*=25}return{res:t,burn:+a.toFixed(2)}}function dt(e){let a={},r=1,s=1,i=1;switch(e.class){case"corvette":a.Money=25e5,a.Aluminium=5e5,r=1,s=1,i=2;break;case"frigate":a.Money=5e6,a.Aluminium=125e4,r=1.1,s=1.09,i=1.5;break;case"destroyer":a.Money=15e6,a.Aluminium=35e5,r=1.2,s=1.18,i=1.2;break;case"cruiser":a.Money=5e7,a.Adamantite=1e6,r=1.3,s=1.25;break;case"battlecruiser":a.Money=125e6,a.Adamantite=26e5,r=1.35,s=1.3,i=.8;break;case"dreadnought":a.Money=5e8,a.Adamantite=8e6,r=1.4,s=1.35,i=.5;break;case"explorer":a.Money=8e8,a.Adamantite=95e5,r=1.45,s=1}switch(e.armor){case"steel":a.Steel=Math.round(35e4**r);break;case"alloy":a.Alloy=Math.round(25e4**r);break;case"neutronium":a.Neutronium=Math.round(1e4**r)}switch(e.engine){case"ion":a.Titanium=Math.round(75e3**s);break;case"tie":a.Titanium=Math.round(15e4**s);break;case"pulse":a.Titanium=Math.round(125e3**s);break;case"photon":a.Titanium=Math.round(21e4**s);break;case"vacuum":a.Titanium=Math.round(3e5**s);break;case"emdrive":a.Titanium=Math.round(125e4**s)}let c=!!["dreadnought","explorer"].includes(e.class);switch(e.power){case"solar":case"diesel":a[c?"Orichalcum":"Copper"]=Math.round(4e4**r),a.Iridium=Math.round(15e3**s);break;case"fission":a[c?"Orichalcum":"Copper"]=Math.round(5e4**r),a.Iridium=Math.round(3e4**s);break;case"fusion":a[c?"Orichalcum":"Copper"]=Math.round(5e4**r),a.Iridium=Math.round(4e4**s);break;case"elerium":a[c?"Orichalcum":"Copper"]=Math.round(6e4**r),a.Iridium=Math.round(55e3**s)}if("explorer"!==e.class)switch(e.sensor){case"radar":a.Money=Math.round(a.Money**1.04);break;case"lidar":a.Money=Math.round(a.Money**1.08);break;case"quantum":a.Money=Math.round(a.Money**1.12)}switch(e.weapon){case"railgun":a.Iron=Math.round(25e3**r);break;case"laser":a.Iridium=Math.round(a.Iridium**1.05),a.Nano_Tube=Math.round(12e3**r);break;case"p_laser":a.Iridium=Math.round(a.Iridium**1.035),a.Nano_Tube=Math.round(12e3**r);break;case"plasma":a.Iridium=Math.round(a.Iridium**1.1),a.Nano_Tube=Math.round(2e4**r);break;case"phaser":a.Iridium=Math.round(a.Iridium**1.15),a.Quantium=Math.round(18e3**r);break;case"disruptor":a.Iridium=Math.round(a.Iridium**1.2),a.Quantium=Math.round(35e3**r)}"explorer"===e.class&&(a.Iron*=10,a.Titanium*=5,a.Iridium*=50);let o=0;t.space.shipyard.ships.forEach((function(t){t.class===e.class&&o++}));let n=1+(o-2)/25*i;return Object.keys(a).forEach((function(t){"explorer"===e.class?a[t]=Math.ceil(a[t]*(3*(o+1))):o<2?a[t]=Math.ceil(a[t]*(0===o?.75:.9)):o>2&&(a[t]=Math.ceil(a[t]*n))})),a}function _t(){let e=$("#shipList")[0];if(e){let t=Sortable.get(e);t&&t.destroy()}}function pt(){if(_t(),sc($("#shipList")),t.tech.isolation)return;let e=$("#shipList");if(t.space.shipyard.sort){let e={spc_dwarf:"a"};t.space.shipyard.ships=t.space.shipyard.ships.sort(((t,a)=>(e[t.location]?e[t.location]:t.location).localeCompare(e[a.location]?e[a.location]:a.location)))}const a=Bt();for(let r=0;r${e}`}}else Object.keys(a).forEach((function(e){if(s.location!==e&&(a[e].info.syndicate()||"spc_dwarf"===e)&&(!t.race.orbit_decayed||t.race.orbit_decayed&&"spc_moon"!==e)){let t="string"==typeof a[e].info.name?a[e].info.name:a[e].info.name();i+=`${t}`}}));let c="tauceti"===s.location?z("tech_era_tauceti"):"string"==typeof a[s.location].info.name?a[s.location].info.name:a[s.location].info.name(),o=`\n ${i}\n `;if(t.space.shipyard.expand){let t=`${z(`outer_shipyard_engine_${s.engine}`)} ${z(`outer_shipyard_class_${s.class}`)}`,a=$(`
          `),i=$(`
          ${s.name} | ${z("outer_shipyard_scrap")} | ${t} | ${z(`outer_shipyard_weapon_${s.weapon}`)} | ${z(`outer_shipyard_power_${s.power}`)} | ${z(`outer_shipyard_armor_${s.armor}`)} | ${z(`outer_shipyard_sensor_${s.sensor}`)}
          `),c=$('
          '),n=$('
          '),l=$(`
          ${o}
          `);c.append(`${z("crew")} `),c.append(`${z("firepower")} `),c.append(`${z("outer_shipyard_sensors")} `),c.append(`${z("speed")} `),c.append(`${z("outer_shipyard_fuel")} `),c.append(`${z("outer_shipyard_hull")} `),n.append(``),a.append(i),a.append(c),a.append(n),a.append(l),e.append(a)}else{let t=$(`
          `),a=$('
          '),i=$('
          '),c=$(`
          ${o}
          `);a.append(`${s.name} | `),a.append(`${z("firepower")} `),a.append(`${z("outer_shipyard_sensors")} `),a.append(`${z("speed")} `),a.append(`${z("outer_shipyard_fuel")} `),a.append(`${z("outer_shipyard_hull")} `),i.append(``),t.append(a),t.append(i),t.append(c),e.append(t)}ic({el:`#shipReg${r}`,data:t.space.shipyard.ships[r],methods:{scrap(e){t.space.shipyard.ships[e]&&"spc_dwarf"===t.space.shipyard.ships[e].location&&(t.space.shipyard.ships.splice(e,1),pt(),it())},scrapAllowed:e=>!(!t.space.shipyard.ships[e]||"spc_dwarf"!==t.space.shipyard.ships[e].location),setLoc(e,a){let r=t.space.shipyard.ships[a];if(e!==r.location){let s=ct(r),i=r.transit>0||"spc_dwarf"!==r.location;if(i||t.civic.garrison.workers-t.civic.garrison.crew>=s){let c=ht(r,e),o=bt(r.xy,c),n=lt(r);r.location=e,r.transit=Math.round(o/n),r.dist=Math.round(o/n),r.origin=Ac(r.xy),r.destination={x:c.x,y:c.y},i||(t.civic.garrison.crew+=s),pt(),Ii(`ship${a}loc${e}`)}}},crewText:e=>ct(t.space.shipyard.ships[e]),fireText:e=>nt(t.space.shipyard.ships[e]),sensorText:e=>gt(t.space.shipyard.ships[e])+"km",speedText(e){let a=7.695363719135802*lt(t.space.shipyard.ships[e]);return Math.round(a)+"km/s"},fuelText(e){let a=ut(t.space.shipyard.ships[e]);return a.res?`${a.burn} ${t.resource[a.res].name}/s`:"N/A"},hullText:e=>100-t.space.shipyard.ships[e].damage+"%",hullDamage:e=>t.space.shipyard.ships[e].damage<=10?"has-text-success":t.space.shipyard.ships[e].damage>=40&&t.space.shipyard.ships[e].damage<65?"has-text-caution":t.space.shipyard.ships[e].damage>=65?"has-text-danger":"",dest(e){let r="explorer"===s.class?z("tech_era_tauceti"):"string"==typeof a[t.space.shipyard.ships[e].location].info.name?a[t.space.shipyard.ships[e].location].info.name:a[t.space.shipyard.ships[e].location].info.name();return z("outer_shipyard_arrive",[r,t.space.shipyard.ships[e].transit])},show:e=>t.space.shipyard.ships[e].transit>0}}),"explorer"===s.class?"tauceti"!==s.location&&Ei(`ship${r}loctauceti`,(function(){return z("transit_time",[Math.round(bt(s.xy,ht(s,"tauceti"))/lt(s))])}),{elm:`#ship${r}loc .tauceti`,placement:"left"}):Object.keys(a).forEach((function(e){(a[e].info.syndicate()||"spc_dwarf"===e)&&s.location!==e&&Ei(`ship${r}loc${e}`,(function(){return z("transit_time",[Math.round(bt(s.xy,ht(s,e))/lt(s))])}),{elm:`#ship${r}loc .${e}`,placement:"left"})}))}!function(){let e=$("#shipList")[0];Sortable.create(e,{onEnd(e){let a=t.space.shipyard.ships;a.splice(e.newDraggableIndex,0,a.splice(e.oldDraggableIndex,1)[0]),t.space.shipyard.ships=a,pt()}})}()}function ht(e,a){if(-2===ft[a].orbit)return yt(a);let r=Math.sqrt((e.xy.x-kt(a))**2+e.xy.y**2),s=lt(e)/225,i=xt(1,a),c=Math.abs(r-ft[a].dist),o=Math.abs(r+ft[a].dist),n=Math.abs(r-ft[a].dist*i),l=Math.abs(r+ft[a].dist*i),u=Math.floor(Math.min(c,n,o,l)/s),d=Math.ceil(Math.max(c,n,o,l)/s);r>=ft[a].dist&&r<=ft[a].dist*i&&(u=0);let _=360/(-1===ft[a].orbit?t.city.calendar.orbit:ft[a].orbit),p=(t.space.position[a]+u*_)%360,h=Math.PI/180;for(let t=u;t<=d;t++){let r=xt(Math.cos(p*h)*ft[a].dist,a);r+=kt(a);let i=Math.sin(p*h)*ft[a].dist;if(Math.sqrt((r-e.xy.x)**2+(i-e.xy.y)**2)/s<=t)return{x:r,y:i};p=(p+_)%360}return yt(a)}function mt(e,a){if(!t.tech.isolation&&t.tech.syndicate&&t.race.truepath&&t.space.syndicate&&t.space.syndicate.hasOwnProperty(e)){let r=1e3,s=0;switch(t.civic.foreign.gov3.hstl<10?s=250-25*t.civic.foreign.gov3.hstl:t.civic.foreign.gov3.hstl>60&&(s=-13*(t.civic.foreign.gov3.hstl-60)),e){case"spc_home":case"spc_moon":case"spc_red":case"spc_hell":r=1250+s;break;case"spc_gas":case"spc_gas_moon":case"spc_belt":r=1020+s;break;case"spc_titan":case"spc_enceladus":case"spc_triton":case"spc_kuiper":case"spc_eris":r=Zr.space[e].info.syndicate_cap()}let o=t.space.syndicate[e],n=0,l=0,u=0;if(t.space.hasOwnProperty("shipyard")&&t.space.shipyard.hasOwnProperty("ships")){if(t.space.shipyard.ships.forEach((function(t){if(t.location===e&&0===t.transit&&t.fueled){let e=nt(t);n+=t.damage>0?Math.round(e*(100-t.damage)/100):e,l+=gt(t)}})),"spc_enceladus"===e&&Math.min(c.operating_base,i.operating_base)>0){let e=Math.min(c.operating_base,i.operating_base);n+=50*e}else"spc_titan"===e&&i.sam>0?n+=25*i.sam:"spc_triton"===e&&i.fob>0&&(n+=500,l+=10);l>100&&(l=Math.round((l-100)/(l-100+200)*100)+100),n=Math.round(n*((l+25)/125)),n>o&&(u=n-o),o=o-n>0?o-n:0}return a?{p:1-+(o/r).toFixed(4),r:o,s:l,o:u}:1-+(o/r).toFixed(4)}return a?{p:1,r:0,s:0,o:0}:1}function gt(e){let t=1;switch(e.class){case"corvette":case"frigate":t=2;break;case"destroyer":case"cruiser":t=1.5;break;case"explorer":t=5;break;default:t=1}switch(e.sensor){case"visual":return 1;case"radar":return 10*t;case"lidar":return 18*t;case"quantum":return 32*t}}const ft={spc_sun:{dist:0,orbit:0,size:2},spc_home:{dist:1,orbit:-1,size:.6},spc_moon:{dist:1.01,orbit:-1,size:.1,moon:!0},spc_red:{dist:1.524,orbit:687,size:.5},spc_hell:{dist:.4,orbit:88,size:.4},spc_venus:{dist:.7,orbit:225,size:.5},spc_gas:{dist:5.203,orbit:4330,size:1.25},spc_gas_moon:{dist:5.204,orbit:4330,size:.2,moon:!0},spc_belt:{dist:2.7,orbit:1642,size:.5,belt:!0},spc_dwarf:{dist:2.77,orbit:1682,size:.5},spc_saturn:{dist:9.539,orbit:10751,size:1.1},spc_titan:{dist:9.536,orbit:10751,size:.2,moon:!0},spc_enceladus:{dist:9.542,orbit:10751,size:.1,moon:!0},spc_uranus:{dist:19.8,orbit:30660,size:1},spc_neptune:{dist:30.08,orbit:60152,size:1},spc_triton:{dist:30.1,orbit:60152,size:.1,moon:!0},spc_kuiper:{dist:39.5,orbit:90498,size:.5,belt:!0},spc_eris:{dist:68,orbit:204060,size:.5,size:.5},tauceti:{dist:752568.8,orbit:-2,size:2}};function vt(){t.space.position||(t.space.position={}),Object.keys(ft).forEach((function(e){t.space.position.hasOwnProperty(e)||(t.space.position[e]=Math.rand(0,360))})),t.space.position.spc_home=t.space.position.spc_moon,t.space.position.spc_gas_moon=t.space.position.spc_gas,t.space.position.spc_titan=t.space.position.spc_enceladus,t.space.position.spc_saturn=t.space.position.spc_titan,t.space.position.spc_neptune=t.space.position.spc_triton}function yt(e){let a=xt(+Math.cos(t.space.position[e]*(Math.PI/180)).toFixed(5)*ft[e].dist,e),r=+Math.sin(t.space.position[e]*(Math.PI/180)).toFixed(5)*ft[e].dist;return a+=kt(e),{x:a,y:r}}function bt(e,t){return Math.ceil(225*Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2))}function wt(e,a){let r=1;switch(t.race.pack_rat&&(r*=1+di.pack_rat.vars()[1]/100),t.stats.achieve.blackhole&&(r*=1+.05*t.stats.achieve.blackhole.l),t.tech.world_control&&(r*=3),e){case"storehouse":i.titan_spaceport&&(r*=1+.25*i.titan_spaceport),a&&t.tech.shelving&&(r*=2),t.tech.shelving&&t.tech.shelving>=3&&(r*=1.5);case"repository":t.tech.isolation&&(r*=3,t.tech.tp_depot&&(r*=1+t.tech.tp_depot/20))}return r}function $t(){let e=0;return i.ai_colonist&&c.decoder&&(e+=i.ai_colonist*c.decoder*.35),c.shock_trooper&&(e+=2*c.shock_trooper),c.tank&&(e+=2*c.tank),e>100&&(e=100),e}function xt(e,a){if(-2!==ft[a].orbit){let r=1.075+ft[a].dist/100;t.city.ptrait.includes("elliptical")&&(r="spc_home"===a?1.5:1.275+ft[a].dist/100),e*=r}return e}function kt(e){if(-2!==ft[e].orbit){let a=ft[e].dist/3;return t.city.ptrait.includes("elliptical")&&"spc_home"===e&&(a+=.15),"spc_eris"===e&&(a+=25),a}return 0}var qt,Mt;function Pt(){let e=document.getElementById("mapCanvas"),a=e.getContext("2d");e.width=e.getBoundingClientRect().width,e.height=e.getBoundingClientRect().height,a.save(),a.fillStyle="#000000",a.fillRect(0,0,e.width,e.height),a.translate(Mt.x,Mt.y),a.scale(qt,qt);let r={};for(let[e,t]of Object.entries(ft))r[e]=yt(e);a.lineWidth=1/qt,a.strokeStyle="#c0c0c0";for(let[e,r]of Object.entries(ft))if(!r.moon&&-2!==r.orbit){a.beginPath(),r.belt||t.race.orbit_decayed&&"spc_home"===e?a.setLineDash([.01,.01]):a.setLineDash([]);let s=kt(e);a.ellipse(s,0,xt(r.dist,e),r.dist,0,0,2*Math.PI,!0),a.stroke()}a.fillStyle="#0000ff",a.strokeStyle="#0000ff";for(let e of t.space.shipyard.ships)e.transit>0&&(a.beginPath(),a.setLineDash([.1,.4]),a.moveTo(e.xy.x,e.xy.y),a.lineTo(e.destination.x,e.destination.y),a.stroke());for(let[e,s]of Object.entries(ft)){if(t.race.orbit_decayed&&["spc_home","spc_moon"].includes(e))continue;let i="558888";if(Zr.space[e]&&Zr.space[e].info.syndicate()&&t.settings.space[e.substring(4)]){let t=mt(e);i=((Math.round(255*(1-t))<<16)+(Math.round(255*t)<<8)).toString(16).padStart(6,0)}"spc_dwarf"===e?i="7132a8":"spc_sun"!==e&&"tauceti"!==e||(i="f8ff2b"),a.fillStyle="#"+i,a.beginPath();let c=s.size/10;if(s.moon)switch(e){case"spc_moon":a.arc(r[e].x+.05,r[e].y+.05,c,0,2*Math.PI,!0);break;case"spc_titan":a.arc(r[e].x-.2,r[e].y-.2,c,0,2*Math.PI,!0);break;default:a.arc(r[e].x+.2,r[e].y+.2,c,0,2*Math.PI,!0)}else{let t=s.size/10;a.arc(r[e].x,r[e].y,t,0,2*Math.PI,!0)}a.fill()}a.fillStyle="#0000ff",a.strokeStyle="#0000ff";for(let e of t.space.shipyard.ships)e.transit>0&&(a.beginPath(),a.arc(e.xy.x,e.xy.y,.1,0,2*Math.PI,!0),a.fill());a.shadowOffsetX=2,a.shadowOffsetY=2,a.shadowBlur=2,a.shadowColor="rgba(0, 0, 0, 0.5)",a.fillStyle="#009aff",a.font=20/qt+"px serif";for(let e of t.space.shipyard.ships)e.transit>0&&a.fillText(e.name,e.xy.x+.15,e.xy.y-.15);a.fillStyle="#ffa500",a.font=25/qt+"px serif";for(let[e,s]of Object.entries(ft))if(Zr.space[e]&&t.settings.space[e.substring(4)]){if(t.race.orbit_decayed&&["spc_home"].includes(e))continue;let i=Zr.space[e].info.name,c="function"==typeof i?i():i;if(s.moon)switch(e){case"spc_moon":a.fillText(c,r[e].x+.1,r[e].y+.1);break;case"spc_titan":a.fillText(c,r[e].x-.3,r[e].y-.3);break;default:a.fillText(c,r[e].x+.25,r[e].y+.2)}else"spc_sun"===e||a.fillText(c,r[e].x,r[e].y-.2*s.size)}a.restore()}function Ot(e){switch(e){case"city":return t.resource[t.race.species]?t.resource[t.race.species].amount<=5?z("tab_city1"):t.resource[t.race.species].amount<=20?z("tab_city2"):t.resource[t.race.species].amount<=75?z("tab_city3"):t.resource[t.race.species].amount<=250?z("tab_city4"):t.resource[t.race.species].amount<=600?z("tab_city5"):t.resource[t.race.species].amount<=1200?z("tab_city6"):t.resource[t.race.species].amount<=2500?z("tab_city7"):z("tab_city8"):z("tab_city1");case"local_space":return z("sol_system",[t.race.truepath?_i[t.race.species].home:Tc("name")]);case"outer_local_space":return z("outer_sol_system",[t.race.truepath?_i[t.race.species].home:Tc("name")]);case"old":return z("tab_old_res");case"new":return z("tab_new_res");case"old_sr":return z("tab_old_sr_res");case"new_sr":return z("tab_new_sr_res");default:return z(e)}}function Ct(){t.settings.tabLoad?(jt("mTabCivil"),jt("mTabCivic"),jt("mTabResearch"),jt("mTabResource"),jt("mTabArpa"),jt("mTabStats"),jt("mTabObserve")):jt(t.settings.civTabs)}function jt(e){switch(t.settings.tabLoad?Vi("page_view",{page_title:"Evolve - All Tabs"}):(Rs(),si(),Aa(),Be(),N(),_t(),sc($("#mTabCivil")),sc($("#mTabCivic")),sc($("#mTabResearch")),sc($("#mTabResource")),sc($("#mTabArpa")),sc($("#mTabStats")),sc($("#mTabObserve"))),e){case 0:t.settings.tabLoad||(Vi("page_view",{page_title:"Evolve - Evolution"}),as());break;case 1:case"mTabCivil":t.settings.tabLoad||Vi("page_view",{page_title:"Evolve - Civilization"}),$("#mTabCivil").append('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),ic({el:"#mTabCivil",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(sc($("#city")),sc($("#space")),sc($("#interstellar")),sc($("#galaxy")),sc($("#portal")),sc($("#outerSol")),sc($("#tauCeti")),e){case 0:ms();break;case 1:case 2:case 3:case 5:Ht();break;case 4:xa();break;case 6:at()}return e}},filters:{label:e=>Ot(e)}}),"protoplasm"!==t.race.species&&(ms(),Ht(),xa(),at()),t.race.noexport&&("Race"===t.race.noexport?(sc($("#city")),sa()):"Planet"===t.race.noexport&&(sc($("#city")),ia()));break;case 2:case"mTabCivic":t.settings.tabLoad||Vi("page_view",{page_title:"Evolve - Civics"}),$("#mTabCivic").append('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),ic({el:"#mTabCivic",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(si(),N(),Aa(),_t(),sc($("#civic")),sc($("#industry")),sc($("#powerGrid")),sc($("#military")),sc($("#mechLab")),sc($("#dwarfShipYard")),sc($("#psychicPowers")),e){case 0:$("#civic").append($('
          ')),na(),$("#civics").append($('
          ')),J(),"protoplasm"===t.race.species||t.race.start_cataclysm||(X(),ve($("#c_garrison"),!1),ie()),t.race.shapeshifter&&Mi(!1,!0);break;case 1:Qs();break;case 2:Object.keys(ri()).forEach((function(e){Ni(e)})),ai();break;case 3:"protoplasm"===t.race.species||t.race.start_cataclysm||(Y(),qa($("#fortress"),!1));break;case 4:"protoplasm"===t.race.species||t.race.start_cataclysm||Fa();break;case 5:t.race.truepath&&"protoplasm"!==t.race.species&&!t.race.start_cataclysm&&rt();break;case 6:t.race.psychic&&t.tech.psychic&&"protoplasm"!==t.race.species&&Ai()}return e}},filters:{label:e=>Ot(e)}}),Object.keys(ri()).forEach((function(e){Ni(e)})),ai(),$("#civic").append($('
          ')),na(),$("#civics").append($('
          ')),J(),"protoplasm"===t.race.species||t.race.start_cataclysm||(Y(),ve($("#c_garrison"),!1),qa($("#fortress"),!1),ie(),Fa(),t.race.truepath&&rt(),t.race.psychic&&t.tech.psychic&&Ai()),t.race.shapeshifter&&Mi(!1,!0),Qs();break;case 3:case"mTabResearch":t.settings.tabLoad||Vi("page_view",{page_title:"Evolve - Research"}),$("#mTabResearch").append('
          \n \n \n \n \n \n \n \n '),ic({el:"#mTabResearch",data:{s:t.settings,rq:t.r_queue},filters:{label:e=>Ot(e)}}),Gs(),"protoplasm"!==t.race.species&&gs();break;case 4:case"mTabResource":t.settings.tabLoad||Vi("page_view",{page_title:"Evolve - Resources"}),$("#mTabResource").append('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),ic({el:"#mTabResource",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(sc($("#market")),sc($("#resStorage")),sc($("#resEjector")),sc($("#resCargo")),sc($("#resAlchemy")),e){case 0:rr("market");break;case 1:rr("storage");break;case 2:rr("ejector");break;case 3:rr("supply");break;case 4:rr("alchemy")}return e}},filters:{label:e=>Ot(e)}}),ar(),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let r=a.resource[e].color,s=a.resource[e].tradable;if(a.resource[e].stackable){var i=$(`
          `);$("#resStorage").append(i),vr(`#stack-${e}`,i,e,r)}s&&(i=$(`
          `),$("#market").append(i),dr(`#market-${e}`,i,e,r,!0)),Ja[e]&&Tr(e,r),Ya[e]&&Ir(e,r),Va[e]&&"magic"===t.race.universe&&(t.resource[e].basic=s,Lr(e,r,s))})),ir();break;case 5:case"mTabArpa":t.settings.tabLoad||Vi("page_view",{page_title:"Evolve - Arpa"}),$("#mTabArpa").append(`
          \n \n \n \n \n \n \n
          `),ic({el:"#mTabArpa",data:{s:t.settings},filters:{label:e=>Ot(e)}}),Ce("Physics"),Ce("Genetics"),Ce("Crispr"),Ce("Blood");break;case 6:case"mTabStats":t.settings.tabLoad||Vi("page_view",{page_title:"Evolve - Stats"}),$("#mTabStats").append('\n \n \n \n \n \n \n \n \n \n '),ic({el:"#mTabStats",data:{s:t.settings},filters:{label:e=>Ot(e)}}),function(){sc($("#achieve")),sc($("#stats"));let e=$('
          ');$("#stats").append(e);let a=$('
          ');$("#perks").append(a);let r=$('
          ');$("#achieve").append(r),function(){sc($("#statsPanel"));let e=$("#statsPanel");if(e.append(`
          ${z("achieve_stats_overall")}
          `),e.append(`
          ${z("achieve_stats_plasmid_earned")} {{ s.plasmid | format }}
          `),t.stats.antiplasmid>0&&e.append(`
          ${z("achieve_stats_antiplasmid_earned")} {{ s.antiplasmid | format }}
          `),t.stats.phage>0&&e.append(`
          ${z("achieve_stats_phage_earned")} {{ s.phage | format }}
          `),t.stats.dark>0&&e.append(`
          ${z("achieve_stats_dark_earned")} {{ s.dark | format }}
          `),t.stats.harmony>0&&e.append(`
          ${z("achieve_stats_harmony_earned")} {{ s.harmony | format }}
          `),t.stats.blood>0&&e.append(`
          ${z("achieve_stats_blood_earned")} {{ s.blood | format }}
          `),t.stats.artifact>0&&e.append(`
          ${z("achieve_stats_artifact_earned")} {{ s.artifact | format }}
          `),e.append(`
          ${z("achieve_stats_knowledge_spent")} {{ s.know | t_know | format }}
          `),e.append(`
          ${z("achieve_stats_starved_to_death")} {{ s.starved | t_starved | format }}
          `),e.append(`
          ${z("achieve_stats_died_in_combat")} {{ s.died | t_died | format }}
          `),e.append(`
          ${z("achieve_stats_game_days_played")} {{ s.days | played | format }}
          `),t.stats.portals>0&&e.append(`
          ${z("achieve_stats_portals")} {{ s.portals | format }}
          `),e.append(`
          ${z("achieve_stats_total_resets")} {{ s.reset | format }}
          `),t.stats.mad>0&&e.append(`
          ${z("achieve_stats_mad_resets")} {{ s.mad | format }}
          `),t.stats.bioseed>0&&e.append(`
          ${z("achieve_stats_bioseed_resets")} {{ s.bioseed | format }}
          `),t.stats.cataclysm>0&&e.append(`
          ${z("achieve_stats_cataclysm_resets")} {{ s.cataclysm | format }}
          `),t.stats.blackhole>0&&e.append(`
          ${z("achieve_stats_blackhole_resets")} {{ s.blackhole | format }}
          `),t.stats.ascend>0&&e.append(`
          ${z("achieve_stats_ascension_resets")} {{ s.ascend | format }}
          `),t.stats.descend>0&&e.append(`
          ${z("achieve_stats_descension_resets")} {{ s.descend | format }}
          `),t.stats.aiappoc>0&&e.append(`
          ${z("achieve_stats_aiappoc_resets")} {{ s.aiappoc | format }}
          `),t.stats.matrix>0&&e.append(`
          ${z("achieve_stats_matrix_resets")} {{ s.matrix | format }}
          `),t.stats.retire>0&&e.append(`
          ${z("achieve_stats_retire_resets")} {{ s.retire | format }}
          `),t.stats.eden>0&&e.append(`
          ${z("achieve_stats_eden_resets")} {{ s.eden | format }}
          `),t.stats.terraform>0&&e.append(`
          ${z("achieve_stats_terraform_resets")} {{ s.terraform | format }}
          `),t.stats.geck>0&&e.append(`
          ${z("achieve_stats_gecks")} {{ s.geck | format }}
          `),e.append(`
          ${z("achieve_stats_current_game")}
          `),e.append(`
          ${z("achieve_stats_knowledge_spent")} {{ s.know | format }}
          `),e.append(`
          ${z("achieve_stats_starved_to_death")} {{ s.starved | format }}
          `),e.append(`
          ${z("achieve_stats_died_in_combat")} {{ s.died | format }}
          `),e.append(`
          ${z("achieve_stats_attacks_made")} {{ s.attacks | format }}
          `),e.append(`
          ${z("achieve_stats_game_days_played")} {{ s.days | format }}
          `),t.stats.dkills>0&&e.append(`
          ${z("achieve_stats_demons_kills")} {{ s.dkills | format }}
          `),t.stats.sac>0&&e.append(`
          ${z("achieve_stats_sacrificed")} {{ s.sac | format }}
          `),t.stats.murders>0&&e.append(`
          ${z("achieve_stats_murders")} {{ s.murders | format }}
          `),t.stats.psykill>0&&e.append(`
          ${z("achieve_stats_psymurders")} {{ s.psykill | format }}
          `),t.resource.hasOwnProperty("Thermite")&&t.resource.Thermite.amount>0&&e.append(`
          ${z("achieve_stats_thermite")} {{ r.Thermite.amount | res }}
          `),Kc().active){let a="";(t.stats.cfood>=13||t.race.cataclysm||t.race.orbit_decayed)&&(a=`${qc(7,12,!0)}`),e.append(`
          ${z("achieve_stats_trickortreat")} {{ s.cfood | format }} ${a}
          `)}ic({el:"#statsPanel",data:{s:t.stats,r:t.resource},filters:{played:e=>e+t.stats.tdays,t_know:e=>e+t.stats.tknow,t_starved:e=>e+t.stats.tstarved,t_died:e=>e+t.stats.tdied,format:e=>e.toLocaleString(),res:e=>(+e.toFixed(2)).toLocaleString()}})}(),lo(),$("body").hasClass("fool")?ao({fool:!0}):ao()}();break;case 7:t.settings.tabLoad||Vi("page_view",{page_title:"Evolve - Settings"});break;default:t.settings.tabLoad||Vi("page_view",{page_title:"Evolve - Hell Observation"}),t.portal.observe&&Ra(!0)}$("#popper").length>0&&0===$(`#${$("#popper").data("id")}`).length&&Ii()}const St={spc_home:{info:{name:()=>_i[t.race.species].home,desc:z("space_home_info_desc"),zone:"inner",syndicate:()=>!1},test_launch:{id:"space-test_launch",title:z("space_home_test_launch_title"),desc:z("space_home_test_launch_desc"),reqs:{space:1},grant:["space",2],queue_complete:()=>t.tech.space>=2?0:1,cost:{Money:()=>1e5,Oil:(e,t)=>Yt(7500,!1,t)},effect:z("space_home_test_launch_effect"),action(){if(Cs($(this)[0])){if(t.race.truepath){let e=1;if(de("gov0")||e++,de("gov1")||e++,de("gov2")||e++,0!==Math.floor(g(0,e)))return Bi(z("space_home_test_launch_action_fail"),"danger",!1,["progress"]),0}return t.space.satellite={count:0},Bi(z("space_home_test_launch_action"),"info",!1,["progress"]),!0}return!1}},satellite:{id:"space-satellite",title:z("space_home_satellite_title"),desc:z("space_home_satellite_desc"),reqs:{space:2},cost:{Money:e=>ec("satellite",e,72e3,1.22),Knowledge:e=>ec("satellite",e,28e3,1.22),Oil:(e,t)=>ec("satellite",e,Yt(3200,!1,t),1.22),Alloy:e=>ec("satellite",e,8e3,1.22)},effect(){let e=t.race.cataclysm||t.race.orbit_decayed?2e3:750;if((t.race.cataclysm||t.race.orbit_decayed)&&t.tech.supercollider){let a=t.tech.particles&&t.tech.particles>=3?5:10;e*=t.tech.supercollider/a+1}let a=t.race.cataclysm?z("space_moon_observatory_title"):t.race.orbit_decayed?z("city_university"):Es(),r=`
          ${z("space_home_satellite_effect2",[a,t.race.cataclysm?25:t.race.orbit_decayed?12:4])}
          `;return`
          ${z("plus_max_resource",[e,z("resource_Knowledge_name")])}
          ${r}
          ${z("space_home_satellite_effect3",[t.civic.scientist?t.civic.scientist.name:z("job_scientist")])}
          `},action(){return!!Cs($(this)[0])&&(Dt("satellite"),t.resource.Knowledge.max+=750,!0)}},gps:{id:"space-gps",title:z("space_home_gps_title"),desc:()=>t.space.hasOwnProperty("gps")&&t.space.gps.count<4?`
          ${z("space_home_gps_desc")}
          ${z("space_home_gps_desc_req")}
          `:`
          ${z("space_home_gps_desc")}
          `,reqs:{satellite:1},not_trait:["terrifying"],cost:{Money:e=>ec("gps",e,75e3,1.18),Knowledge:e=>ec("gps",e,5e4,1.18),Copper:e=>ec("gps",e,6500,1.18),Oil:(e,t)=>ec("gps",e,Yt(3500,!1,t),1.18),Titanium:e=>ec("gps",e,8e3,1.18)},effect:e=>(e||0)+(t.space.hasOwnProperty("gps")?t.space.gps.count:0)<4?z("space_home_gps_effect_req"):`
          ${z("space_home_gps_effect")}
          ${z("space_home_gps_effect2",[2])}
          `,action(){return!!Cs($(this)[0])&&(Dt("gps"),!0)}},propellant_depot:{id:"space-propellant_depot",title:z("space_home_propellant_depot_title"),desc:z("space_home_propellant_depot_desc"),reqs:{space_explore:1},cost:{Money:e=>ec("propellant_depot",e,55e3,1.35),Aluminium:e=>ec("propellant_depot",e,22e3,1.35),Oil:(e,t)=>ec("propellant_depot",e,Yt(5500,!1,t),1.35)},effect(){let e=Nr(1250)*(t.tech.world_control?1.5:1);if(t.resource.Helium_3.display){let a=Nr(1e3)*(t.tech.world_control?1.5:1);return`
          ${z("plus_max_resource",[e,z("resource_Oil_name")])}
          ${z("plus_max_resource",[a,z("resource_Helium_3_name")])}
          `}return`
          ${z("plus_max_resource",[e,z("resource_Oil_name")])}
          `},action(){return!!Cs($(this)[0])&&(Dt("propellant_depot"),t.resource.Oil.max+=Nr(1250)*(t.tech.world_control?1.5:1),t.resource.Helium_3.display&&(t.resource.Helium_3.max+=Nr(1e3)*(t.tech.world_control?1.5:1)),!0)}},nav_beacon:{id:"space-nav_beacon",title:()=>t.race.orbit_decayed?z("space_home_broadcast_beacon_title"):z("space_home_nav_beacon_title"),desc:`
          ${z("space_home_nav_beacon_desc")}
          ${z("requires_power")}
          `,reqs:{luna:2},cost:{Money:e=>ec("nav_beacon",e,75e3,1.32),Copper:e=>ec("nav_beacon",e,38e3,1.32),Aluminium:e=>ec("nav_beacon",e,44e3,1.32),Oil:(e,t)=>ec("nav_beacon",e,Yt(12500,!1,t),1.32),Iridium:e=>ec("nav_beacon",e,1200,1.32)},powered:()=>nc(2),powerBalancer:()=>t.tech.luna&&t.tech.luna>=3?[{s:t.space.moon_base.s_max-t.space.moon_base.support},{s:t.space.spaceport.s_max-t.space.spaceport.support}]:[{s:t.space.moon_base.s_max-t.space.moon_base.support}],support:()=>1,effect(){let e="";return t.race.orbit_decayed&&t.tech.broadcast&&(e=`
          ${z("space_red_vr_center_effect1",[t.tech.broadcast/2])}
          `),`${t.race.orbit_decayed?"":`
          ${z("space_home_nav_beacon_effect1")}
          `}${t.tech.luna>=3?`
          ${z("space_red_spaceport_effect1",[ea().red,1])}
          `:""}${e}
          ${z("space_home_nav_beacon_effect2",[$(this)[0].powered()])}
          `},action(){return!!Cs($(this)[0])&&(Dt("nav_beacon"),ks($(this)[0]),!0)}}},spc_moon:{info:{name:z("space_moon_info_name"),desc:()=>z("space_moon_info_desc",[_i[t.race.species].home]),support:"moon_base",zone:"inner",syndicate:()=>!0},moon_mission:{id:"space-moon_mission",title:z("space_moon_mission_title"),desc:z("space_moon_mission_desc"),reqs:{space:2,space_explore:2},grant:["space",3],queue_complete:()=>t.tech.space>=3?0:1,cost:{Oil:(e,t)=>+Yt(12e3,!1,t).toFixed(0)},effect:z("space_moon_mission_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("space_moon_mission_action"),"info",!1,["progress"]),t.space.iridium_mine={count:0,on:0},t.space.helium_mine={count:0,on:0},!0)}},moon_base:{id:"space-moon_base",title:z("space_moon_base_title"),desc:()=>`
          ${z("space_moon_base_desc")}
          ${z("requires_power_combo",[t.resource.Oil.name])}
          `,reqs:{space:3},cost:{Money:e=>ec("moon_base",e,22e3,1.32),Cement:e=>ec("moon_base",e,18e3,1.32),Alloy:e=>ec("moon_base",e,7800,1.32),Polymer:e=>ec("moon_base",e,12500,1.32)},effect(e){let t=Nr(500),a=+Yt($(this)[0].support_fuel().a,!0,e).toFixed(2);return`
          ${z("space_moon_base_effect1")}
          ${z("plus_max_resource",[t,z("resource_Iridium_name")])}
          ${z("space_moon_base_effect3",[a,$(this)[0].powered()])}
          `},support:()=>2,support_fuel:()=>({r:"Oil",a:2}),powered:()=>nc(4),powerBalancer:()=>[{s:t.space.moon_base.s_max-t.space.moon_base.support}],refresh:!0,action(){if(Cs($(this)[0])){if(Dt("moon_base"),ks($(this)[0]),1===t.space.moon_base.count&&(t.tech.moon=1),!t.tech.luna&&(t.tech.luna=1,t.race.truepath)){let e=z("space_moon_base_msg",[te(3)]);t.civic.foreign.gov3.hstl<10?e=`${e} ${z("space_moon_base_msg_ally")}`:t.civic.foreign.gov3.hstl>60&&(e=`${e} ${z("space_moon_base_msg_hstl")}`),Bi(e,"info",!1,["progress"])}return t.race.orbit_decay&&t.race.orbit_decay>t.stats.days+2500&&(t.race.orbit_decay=t.stats.days+2500,Bi(z("evo_challenge_orbit_decayed_accelerated",[t.race.orbit_decay-t.stats.days]),"info",!1,["progress"])),!0}return!1}},iridium_mine:{id:"space-iridium_mine",title:z("space_moon_iridium_mine_title"),desc:`
          ${z("space_moon_iridium_mine_desc")}
          ${z("space_support",[z("space_moon_info_name")])}
          `,reqs:{space:3,luna:1},cost:{Money:e=>ec("iridium_mine",e,42e3,1.35),Lumber:e=>ec("iridium_mine",e,9e3,1.35),Titanium:e=>ec("iridium_mine",e,17500,1.35)},effect(){let e=Oe("iridium_mine","iridium"),a=+e.b.toFixed(3),r="";t.race.truepath&&(t.civic.foreign.gov3.hstl<10?r=`
          ${z("space_rival_ally",[+(100*e.g).toFixed(1)])}
          `:t.civic.foreign.gov3.hstl>60&&(r=`
          ${z("space_rival_war",[+(100*e.g).toFixed(1)])}
          `));let s=t.race.cataclysm?`
          ${z("produce",[+Oe("iridium_mine","coal").toFixed(2),t.resource.Coal.name])}
          `:"",i=t.race.cataclysm?`
          ${z("produce",[+(Oe("iridium_mine","coal")/48).toFixed(3),t.resource.Uranium.name])}
          `:"";return`
          ${z("space_used_support",[z("space_moon_info_name")])}
          ${z("space_moon_iridium_mine_effect",[a])}
          ${r}${s}${i}`},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(t.resource.Iridium.display=!0,Dt("iridium_mine"),t.resource.Mythril.display||(t.resource.Mythril.display=!0,ma()),t.space.moon_base.support${z("space_moon_helium_mine_desc")}
          ${z("space_support",[z("space_moon_info_name")])}
          `,reqs:{space:3,luna:1},cost:{Money:e=>ec("helium_mine",e,38e3,1.35),Aluminium:e=>ec("helium_mine",e,9e3,1.35),Steel:e=>ec("helium_mine",e,17500,1.35)},effect(){let e=Nr(100),a=Oe("helium_mine"),r=+a.b.toFixed(3),s="";return t.race.truepath&&(t.civic.foreign.gov3.hstl<10?s=`
          ${z("space_rival_ally",[+(100*a.g).toFixed(1)])}
          `:t.civic.foreign.gov3.hstl>60&&(s=`
          ${z("space_rival_war",[+(100*a.g).toFixed(1)])}
          `)),`
          ${z("space_used_support",[z("space_moon_info_name")])}
          ${z("space_moon_helium_mine_effect",[r])}
          ${s}
          ${z("plus_max_resource",[e,z("resource_Helium_3_name")])}
          `},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(t.resource.Helium_3.display=!0,Dt("helium_mine"),t.space.moon_base.support${z("space_moon_observatory_desc")}
          ${z("space_support",[z("space_moon_info_name")])}
          `,reqs:{science:9,luna:1},cost:{Money:e=>ec("observatory",e,2e5,1.28),Knowledge:e=>ec("observatory",e,69e3,1.28),Stone:e=>ec("observatory",e,125e3,1.28),Iron:e=>ec("observatory",e,65e3,1.28),Iridium:e=>ec("observatory",e,1250,1.28)},effect(){let e="";t.race.cataclysm&&(e=`
          ${z("city_university_effect",[ua(1)])}
          `);let a=5e3;t.race.cataclysm&&t.space.satellite&&t.space.satellite.count>0&&(a*=1+.25*t.space.satellite.count);let r=t.race.cataclysm?`
          ${z("space_moon_observatory_cata_effect",[25])}
          `:`
          ${z("space_moon_observatory_effect",[5])}
          `;return`
          ${z("space_used_support",[z("space_moon_info_name")])}
          ${e}
          ${z("plus_max_resource",[a,z("resource_Knowledge_name")])}
          ${r}`},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("observatory"),t.space.moon_base.supportea().red,desc:()=>z("space_red_info_desc",[ea().red]),support:"spaceport",zone:"inner",syndicate:()=>!0},red_mission:{id:"space-red_mission",title:()=>z("space_mission_title",[ea().red]),desc:()=>z("space_mission_desc",[ea().red]),reqs:{space:3,space_explore:3},grant:["space",4],queue_complete:()=>t.tech.space>=4?0:1,cost:{Helium_3:(e,t)=>+Yt(4500,!1,t).toFixed(0)},effect:()=>z("space_red_mission_effect",[ea().red]),action(){return!!Cs($(this)[0])&&(Bi(z("space_red_mission_action",[ea().red]),"info",!1,["progress"]),t.space.living_quarters={count:0,on:0},t.space.garage={count:0},t.space.red_mine={count:0,on:0},t.space.fabrication={count:0,on:0},!0)}},spaceport:{id:"space-spaceport",title:z("space_red_spaceport_title"),desc:()=>`
          ${z("space_red_spaceport_desc")}
          ${z("requires_power_space",[t.resource.Food.name])}
          `,reqs:{space:4},cost:{Money:e=>ec("spaceport",e,47500,1.32),Iridium:e=>ec("spaceport",e,1750,1.32),Mythril:e=>ec("spaceport",e,25,1.32),Titanium:e=>ec("spaceport",e,22500,1.32)},effect(e){let a=+Yt($(this)[0].support_fuel().a,!0,e).toFixed(2),r="";return(t.race.cataclysm||t.race.orbit_decayed)&&(r=`
          ${z("plus_max_resource",[`$${Nr(4*Us())}`,z("resource_Money_name")])}
          `),`
          ${z("space_red_spaceport_effect1",[ea().red,$(this)[0].support()])}
          ${r}
          ${z("space_red_spaceport_effect2",[a,$(this)[0].powered()])}
          ${z("spend",[t.race.cataclysm?2:25,t.resource.Food.name])}
          `},support(){let e=t.race.cataclysm||t.race.orbit_decayed?4:3;return t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=4&&e++,e},support_fuel:()=>({r:"Helium_3",a:1.25}),powered:()=>nc(5),powerBalancer:()=>[{s:t.space.spaceport.s_max-t.space.spaceport.support}],refresh:!0,action(){return!!Cs($(this)[0])&&(Dt("spaceport"),ks($(this)[0]),t.tech.mars||(t.tech.mars=1),t.race.orbit_decay&&t.race.orbit_decay>t.stats.days+1e3&&(t.race.orbit_decay=t.stats.days+1e3,Bi(z("evo_challenge_orbit_decayed_accelerated",[t.race.orbit_decay-t.stats.days]),"info",!1,["progress"])),!0)}},red_tower:{id:"space-red_tower",title:z("space_red_tower_title"),desc:()=>`
          ${z("space_red_tower_desc")}
          ${z("requires_power")}
          `,reqs:{mars:3},cost:{Money:e=>ec("red_tower",e,225e3,1.28),Iron:e=>ec("red_tower",e,22e3,1.28),Cement:e=>ec("red_tower",e,15e3,1.28),Alloy:e=>ec("red_tower",e,8e3,1.28)},effect(){return`
          ${z("space_red_spaceport_effect1",[ea().red,t.race.cataclysm?2:1])}
          ${z("minus_power",[$(this)[0].powered()])}
          `},powered:()=>nc(2),powerBalancer:()=>[{s:t.space.spaceport.s_max-t.space.spaceport.support}],support:()=>t.race.cataclysm?2:1,action(){return!!Cs($(this)[0])&&(Dt("red_tower"),ks($(this)[0]),!0)}},captive_housing:Jr("captive_housing","space"),terraformer:{id:"space-terraformer",title:z("space_terraformer"),desc:e=>!t.space.hasOwnProperty("terraformer")||t.space.terraformer.count<100||e?`
          ${z("space_terraformer")}
          ${z("requires_segmemts",[100])}
          `+(t.space.hasOwnProperty("terraformer")&&t.space.terraformer.count>=100?`
          ${z("requires_power")}
          `:""):`
          ${z("space_terraformer")}
          `,reqs:{terraforming:1},condition:()=>!(t.space.terraformer.count>=100),queue_size:5,queue_complete:()=>100-t.space.terraformer.count,cost:{Money:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100?t.race.truepath?75e5:75e6:0,Alloy:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100?t.race.truepath?25e4:75e4:0,Neutronium:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100?125e3:0,Elerium:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100?1e3:0,Bolognium:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100?t.race.truepath?0:1e5:0,Orichalcum:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100?t.race.truepath?12e3:25e4:0,Soul_Gem:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100?t.race.truepath?0:1:0,Nanoweave:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100?t.race.truepath?0:75e3:0,Quantium:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100&&t.race.truepath?75e3:0,Cipher:e=>(e||0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0)<100&&t.race.truepath?1e3:0},effect(e){let a=(e?e.count:0)+(t.space.hasOwnProperty("terraformer")?t.space.terraformer.count:0);if(a<100){let e=100-a;return`
          ${z("space_terraformer_effect")}
          ${z("space_dwarf_collider_effect2",[e])}
          `}return St.spc_red.atmo_terraformer.effect(e)},action(){return!!(Cs($(this)[0])&&t.space.terraformer.count<100)&&(Dt("terraformer","space"),t.space.terraformer.count>=100&&(t.tech.terraforming=2,t.space.atmo_terraformer={count:1,on:0},Ht(),Ii()),!0)}},atmo_terraformer:{id:"space-atmo_terraformer",title:z("space_terraformer"),desc:()=>`
          ${z("space_terraformer")}
          ${z("requires_power")}
          `,wiki:!1,reqs:{terraforming:2},condition:()=>t.space.terraformer.count>=100,queue_complete:()=>0,cost:{},powered:e=>nc((e?e.truepath:t.race.truepath)?500:5e3),postPower(e){e?setTimeout((function(){t.tech.terraforming=i.atmo_terraformer?3:2,Ht()}),250):(t.tech.terraforming=2,Ht())},effect(e){let t=At(),a=$(this)[0].powered(e),r=a>0?`
          ${z("minus_power",[a])}
          `:"";return`
          ${z("space_terraformer_effect2")}
          ${t}${r}`},action:()=>!1},terraform:{id:"space-terraform",title:z("space_terraform"),desc:z("space_terraform"),reqs:{terraforming:3},queue_complete:()=>0,no_multi:!0,cost:{},effect(){let e=At();return`
          ${z("space_terraform_effect")}
          ${e}`},action(){return!!Cs($(this)[0])&&(ia(),!0)}},assembly:Jr("assembly","space"),living_quarters:{id:"space-living_quarters",title:z("space_red_living_quarters_title"),desc:()=>`
          ${z("space_red_living_quarters_desc")}
          ${z("space_support",[ea().red])}
          `,reqs:{mars:1},cost:{Money:e=>ec("living_quarters",e,Zt(38e3),1.28),Steel:e=>ec("living_quarters",e,Zt(15e3),1.28),Polymer:e=>ec("living_quarters",e,Zt(9500),1.28),Horseshoe:()=>t.race.hooved?2:0},effect(){let e=$(this)[0].citizens(),a="";return(t.race.cataclysm||t.race.orbit_decayed)&&(a=`
          ${z("plus_max_resource",[`$${Nr(t.tech.home_safe>=2?t.tech.home_safe>=3?"100000":"50000":"25000")}`,z("resource_Money_name")])}
          `),`
          ${z("space_used_support",[ea().red])}
          ${a}
          ${z("plus_max_resource",[ua(1),t.race.truepath?z("job_colonist_tp",[ea().red]):z("colonist")])}
          ${z("plus_max_resource",[e,z("citizen")])}
          `},support:()=>-1,powered:()=>nc(1),action(){if(Cs($(this)[0])){if(Dt("living_quarters"),t.civic.colonist.display=!0,t.space.spaceport.support0)){let e=t.civic[t.civic.d_job].workers-ua(1)<0?t.civic[t.civic.d_job].workers:ua(1);t.civic[t.civic.d_job].workers-=e,t.civic.colonist.workers+=e}return!0}return!1},citizens(){let e=t.race.cataclysm||t.race.orbit_decayed?2:1;return c.biodome&&(e+=(t.tech.mars>=6?.1:.05)*c.biodome),+ua(e).toFixed(2)}},pylon:{id:"space-pylon",title:z("space_red_pylon"),desc:z("space_red_pylon"),reqs:{magic:2},condition:()=>!(!t.race.cataclysm&&!t.race.orbit_decayed),cost:{Money:e=>ec("pylon",e,10,1.48),Stone:e=>ec("pylon",e,12,1.42),Crystal:e=>ec("pylon",e,8,1.42)-3},effect(){let e=Nr(2);return`
          ${z("gain",[+(.005*lc("magic")).toFixed(3),t.resource.Mana.name])}
          ${z("plus_max_resource",[e,t.resource.Mana.name])}
          `},special:()=>!!(t.tech.magic&&t.tech.magic>=3),action(){return!!Cs($(this)[0])&&(t.space.pylon.count++,t.resource.Mana.max+=Nr(2),!0)}},vr_center:{id:"space-vr_center",title:z("space_red_vr_center_title"),desc:()=>`
          ${z("space_red_vr_center_desc")}
          ${z("space_support",[ea().red])}
          `,reqs:{mars:1,broadcast:3},cost:{Money:e=>ec("vr_center",e,38e4,1.25),Copper:e=>ec("vr_center",e,55e3,1.25),Stanene:e=>ec("vr_center",e,1e5,1.25),Soul_Gem:e=>ec("vr_center",e,1,1.25)},effect(){let e=D("gaslighter",1),a=e?e+1:1;return t.race.orbit_decayed&&(a+=2),`
          ${z("space_used_support",[ea().red])}
          ${z("space_red_vr_center_effect1",[a])}
          ${z("space_red_vr_center_effect2",[2])}
          `},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("vr_center"),t.space.spaceport.support`
          ${z("space_red_garage_desc")}
          `,reqs:{mars:1},cost:{Money:e=>ec("garage",e,75e3,1.28),Iron:e=>ec("garage",e,12e3,1.28),Brick:e=>ec("garage",e,3e3,1.28),Sheet_Metal:e=>ec("garage",e,1500,1.28)},wide:!0,res(){let e=["Copper","Iron","Cement","Steel","Titanium","Alloy","Nano_Tube","Neutronium","Infernite"];return(t.race.cataclysm||t.race.orbit_decayed)&&(e.push("Polymer"),e.push("Coal"),e.push("Lumber"),e.push("Chrysotile"),e.push("Stone"),e.push("Furs")),e},heavy:e=>!!["Copper","Iron","Steel","Titanium","Neutronium","Infernite"].includes(e),val(e){switch(e){case"Copper":return 6500;case"Iron":return 5500;case"Cement":return t.race.cataclysm?10500:6e3;case"Steel":return 4500;case"Titanium":return 3500;case"Alloy":case"Polymer":return 2500;case"Nano_Tube":return 25e3;case"Neutronium":return 125;case"Infernite":return 75;case"Coal":return 1500;case"Lumber":case"Chrysotile":case"Stone":return 7500;case"Furs":return 2200;default:return 0}},multiplier(e){let a=t.tech.particles>=4?1+t.tech.supercollider/20:1;return(t.tech.world_control||t.race.cataclysm||t.race.orbit_decayed)&&(a*=2),t.tech.shelving&&t.tech.shelving>=3&&(a*=1.5),a*=t.stats.achieve.blackhole?1+.05*t.stats.achieve.blackhole.l:1,e&&t.tech.shelving&&t.tech.shelving>=2?3*a:a},effect(){let e=$(this)[0].multiplier(!1),a=$(this)[0].multiplier(!0),r=t.tech.particles>=4?20+t.tech.supercollider:20;(t.tech.world_control||t.race.cataclysm||t.race.orbit_decayed)&&(r+=10);let s=t.race.cataclysm||t.race.orbit_decayed?`${z("plus_max_resource",[r,z("resource_Crates_name")])}`:"",i='
          ';i+=`${z("plus_max_resource",[r,z("resource_Containers_name")])}${s}`;for(const r of $(this)[0].res())if(t.resource[r].display){let s=$(this)[0].heavy(r);i+=`${z("plus_max_resource",[q(+(Nr($(this)[0].val(r))*(s?a:e)).toFixed(0),1),t.resource[r].name])}`}return i+="
          ",i},action(){if(Cs($(this)[0])){Dt("garage");let e=$(this)[0].multiplier(!1),a=$(this)[0].multiplier(!0);for(const r of $(this)[0].res())if(t.resource[r].display){let s=$(this)[0].heavy(r);t.resource[r].max+=Nr($(this)[0].val(r))*(s?a:e)}return!0}return!1}},red_mine:{id:"space-red_mine",title:z("space_red_mine_title"),desc:()=>`
          ${z("space_red_mine_desc")}
          ${z("space_support",[ea().red])}
          `,reqs:{mars:1},cost:{Money:e=>ec("red_mine",e,5e4,1.32),Lumber:e=>ec("red_mine",e,65e3,1.32),Iron:e=>ec("red_mine",e,33e3,1.32)},effect(){let e=Oe("red_mine","copper"),a=Oe("red_mine","titanium"),r=+e.b.toFixed(3),s=+a.b.toFixed(3),i="";t.race.truepath&&(t.civic.foreign.gov3.hstl<10?i=`
          ${z("space_rival_ally",[+(100*e.g).toFixed(1)])}
          `:t.civic.foreign.gov3.hstl>60&&(i=`
          ${z("space_rival_war",[+(100*e.g).toFixed(1)])}
          `));let c=t.race.orbit_decayed?`
          ${z("city_mine_effect1",[ua(1)])}
          ${z("city_coal_mine_effect1",[ua(1)])}
          `:"",o=t.race.cataclysm||t.race.orbit_decayed&&!t.race.sappy?`
          ${z("space_red_mine_effect",[+Oe("red_mine","stone").toFixed(2),t.resource.Stone.name])}
          `:"",n=t.race.cataclysm||t.race.orbit_decayed&&t.race.smoldering?`
          ${z("space_red_mine_effect",[+Oe("red_mine","asbestos").toFixed(2),t.resource.Chrysotile.name])}
          `:"",l=t.race.cataclysm||t.race.orbit_decayed?`
          ${z("space_red_mine_effect",[+Oe("red_mine","aluminium").toFixed(2),t.resource.Aluminium.name])}
          `:"";return`
          ${z("space_used_support",[ea().red])}
          ${c}
          ${z("space_red_mine_effect",[r,t.resource.Copper.name])}
          ${z("space_red_mine_effect",[s,t.resource.Titanium.name])}
          ${i}${n}${o}${l}`},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("red_mine"),t.space.spaceport.support`
          ${z("space_red_fabrication_desc")}
          ${z("space_support",[ea().red])}
          `,reqs:{mars:1},cost:{Money:e=>ec("fabrication",e,9e4,1.32),Copper:e=>ec("fabrication",e,25e3,1.32),Cement:e=>ec("fabrication",e,12e3,1.32),Wrought_Iron:e=>ec("fabrication",e,1200,1.32)},effect(){let e=t.race.cataclysm&&!t.race.flier?`
          ${z("city_cement_plant_effect1",[ua(1)])}
          `:"",a=t.race.cataclysm||t.race.orbit_decayed?5:2;return t.race.high_pop&&(a=Pe(a)),`
          ${z("space_used_support",[ea().red])}
          ${z("space_red_fabrication_effect1",[ua(1)])}
          ${e}
          ${z("space_red_fabrication_effect2",[a])}
          `},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("fabrication"),t.space.spaceport.support`
          ${z("space_red_factory_desc")}
          ${z("requires_power_combo",[t.resource.Helium_3.name])}
          `,reqs:{mars:4},cost:{Money:e=>ec("red_factory",e,75e3,1.32),Brick:e=>ec("red_factory",e,1e4,1.32),Coal:e=>ec("red_factory",e,7500,1.32),Mythril:e=>ec("red_factory",e,50,1.32)},effect(e){let a=`
          ${z("space_red_factory_effect1")}
          `;return t.tech.foundry>=7&&(a+=`
          ${z("space_red_factory_effect2")}
          `),t.race.orbit_decayed&&!t.race.flier&&(a+=`
          ${z("city_cement_plant_effect1",[ua(1)])}
          `),a+=`
          ${z("space_red_factory_effect3",[+Yt(1,!0,e).toFixed(2),$(this)[0].powered()])}
          `,a},powered:()=>nc(3),special:!0,action(){return!!Cs($(this)[0])&&(t.space.red_factory.count++,ks($(this)[0])&&t.city.factory.Alloy++,t.settings.showIndustry=!0,Qs(),!0)}},nanite_factory:Jr("nanite_factory","space"),biodome:{id:"space-biodome",title:()=>t.race.artifical?z("space_red_signal_tower_title"):t.race.soul_eater?z("space_red_asphodel_title"):z("space_red_biodome_title"),desc(){let e;return e=t.race.artifical?`
          ${z("space_red_signal_tower_title")}
          `:t.race.soul_eater?`
          ${z("space_red_asphodel_desc")}
          `:t.race.carnivore?`
          ${z("space_red_biodome_desc_carn")}
          `:`
          ${z("space_red_biodome_desc",[ea().red])}
          `,`
          ${e}
          ${z("space_support",[ea().red])}
          `},reqs:{mars:2},cost:{Money:e=>ec("biodome",e,45e3,1.28),Lumber:e=>ec("biodome",e,65e3,1.28),Brick:e=>ec("biodome",e,1e3,1.28),Nanite:e=>t.race.deconstructor?ec("biodome",e,75,1.28):0},effect(){let e=+Oe("biodome","food").toFixed(2),a=t.race.cataclysm||t.race.orbit_decayed?`
          ${z("produce",[+Oe("biodome","cat_food").toFixed(2),t.resource.Food.name])}
          `:"",r=!t.race.cataclysm&&!t.race.orbit_decayed||t.race.kindling_kindred?"":`
          ${z("space_red_mine_effect",[+Oe("biodome","lumber").toFixed(2),t.resource.Lumber.name])}
          `,s=t.tech.mars>=6?.1:.05,i=t.race.artifical?z("city_transmitter_effect",[Nr(500)]):z("plus_max_resource",[Nr(100),z("resource_Food_name")]),c=t.race.artifical||t.race.orbit_decayed?`
          ${i}${z("space_used_support",[ea().red])}
          ${a}
          ${z("space_red_biodome_effect",[e,t.resource.Food.name])}
          ${z("space_red_biodome_effect2",[+ua(s).toFixed(2)])}
          ${r}${c}`},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("biodome"),t.race.cataclysm||(eo("colonist"),t.race.joyless&&(eo("joyless"),delete t.race.joyless,gs())),t.space.spaceport.supportt.race.artifical?z("space_red_signal_tower_flair"):t.race.soul_eater?z("space_red_asphodel_flair"):t.race.carnivore?z("space_red_biodome_flair_carn"):z("space_red_biodome_flair")},red_university:{id:"space-red_university",title:z("city_university"),desc:()=>z("city_university_desc",[ea().red]),reqs:{mars:1},trait:["orbit_decayed"],cost:{Money:e=>ec("university",e,900,1.5,"city")-500,Lumber:e=>ec("university",e,500,1.36,"city")-200,Stone:e=>ec("university",e,750,1.36,"city")-350,Crystal:e=>"magic"===t.race.universe?ec("university",e,5,1.36,"city"):0},wiki:!1,effect:()=>Zr.city.university.effect(),action(){if(Cs($(this)[0])){let e=t.tech.science&&t.tech.science>=8?700:500;if(t.tech.supercollider){let a=t.tech.particles&&t.tech.particles>=3?12.5:25;e*=t.tech.supercollider/a+1}return t.resource.Knowledge.max+=e,t.city.university.count++,t.space.red_university.count=t.city.university.count,t.civic.professor.display=!0,t.civic.professor.max=t.city.university.count,!0}return!1}},exotic_lab:{id:"space-exotic_lab",title:z("space_red_exotic_lab_title"),desc:()=>`
          ${z("space_red_exotic_lab_desc")}
          ${z("space_support",[ea().red])}
          `,reqs:{mars:5},cost:{Money:e=>ec("exotic_lab",e,75e4,1.28),Steel:e=>ec("exotic_lab",e,1e5,1.28),Mythril:e=>ec("exotic_lab",e,1e3,1.28),Elerium:e=>ec("exotic_lab",e,20,1.28)-4},effect(){let e=500;t.tech.science>=13&&t.interstellar.laboratory&&o.laboratory&&(e+=25*o.laboratory),t.tech.ancient_study&&t.tech.ancient_study>=2&&(e+=15*t.space.ziggurat.count),t.tech.mass>=2&&i.mass_driver&&(e+=Pe(i.mass_driver*t.civic.scientist.workers)),t.tech.science>=21&&(e*=1.45),t.race.high_pop&&(e=Pe(e));let a=Nr(10),r="",s="";return(t.race.cataclysm||t.race.orbit_decayed)&&(r=`
          ${z("city_wardenclyffe_effect1",[ua(1),t.civic.scientist.name])}
          `,e*=1+.25*c.observatory,t.tech.science>=15&&(s=`
          ${z("city_wardenclyffe_effect4",[2])}
          `)),`
          ${z("space_used_support",[ea().red])}
          ${r}${s}
          ${z("space_red_exotic_lab_effect1",[+e.toFixed(0)])}
          ${z("plus_max_resource",[a,z("resource_Elerium_name")])}
          `},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("exotic_lab"),t.space.spaceport.support`
          ${z("space_red_exotic_lab_flair1")}
          ${z("space_red_exotic_lab_flair2")}
          `},ziggurat:{id:"space-ziggurat",title:z("space_red_ziggurat_title"),desc:()=>`
          ${z("space_red_ziggurat_desc",["none"!==t.race.old_gods?_i[t.race.old_gods.toLowerCase()].entity:_i[t.race.species].entity])}
          `,reqs:{theology:4},cost:{Money:e=>ec("ziggurat",e,6e5,1.28),Stone:e=>ec("ziggurat",e,25e4,1.28),Aluminium:e=>ec("ziggurat",e,7e4,1.28),Mythril:e=>ec("ziggurat",e,250,1.28)},effect(){let e=t.tech.ancient_study?.6:.4;if(t.tech.ancient_deify&&t.tech.ancient_deify>=2&&c.exotic_lab&&(e+=.01*c.exotic_lab),"theocracy"===t.civic.govern.type&&t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display){let a=.002;t.race.high_pop&&(a=Pe(a)),e+=a*t.civic.priest.workers}t.race.ooze&&(e*=1-di.ooze.vars()[1]/100),t.race.high_pop&&(e=Pe(e)),e=+e.toFixed(2);let a=t.race.truepath?[e,_i[t.race.species].home]:[e],r=`
          ${z(t.race.truepath?"space_red_ziggurat_effect_tp":"space_red_ziggurat_effect",a)}
          `;return t.tech.ancient_study&&t.tech.ancient_study>=2&&(r+=`
          ${z("interstellar_laboratory_effect",[3])}
          `),(t.race.cataclysm||t.race.orbit_decayed)&&(r+=ss()),t.genes.ancients&&t.genes.ancients>=4&&(r+=`
          ${z("city_temple_effect6",[ua(1)])}
          `),r},action(){return!!Cs($(this)[0])&&(Dt("ziggurat"),t.genes.ancients&&t.genes.ancients>=4&&(t.civic.priest.display=!0),t.race.cataclysm&&eo("iron_will",!1,1),!0)}},space_barracks:{id:"space-space_barracks",title:z("space_red_space_barracks_title"),desc:()=>`
          ${z("space_red_space_barracks_desc")}
          ${z("space_red_space_barracks_desc_req")}
          `,reqs:{marines:1},cost:{Money:e=>ec("space_barracks",e,35e4,1.28),Alloy:e=>ec("space_barracks",e,65e3,1.28),Iridium:e=>ec("space_barracks",e,22500,1.28),Wrought_Iron:e=>ec("space_barracks",e,12500,1.28),Horseshoe:()=>t.race.hooved?2:0},effect(e){let a=t.race.orbit_decayed?Zr.city.boot_camp.effect():"",r=+Yt(2,!0,e).toFixed(2),s=t.tech.marines>=2?ua(4):ua(2),i=t.race.cataclysm?"":`
          ${z("space_red_space_barracks_effect3",[t.resource.Food.name])}
          `;return`
          ${z("plus_max_soldiers",[s])}
          ${a}
          ${z("space_red_space_barracks_effect2",[r])}
          ${i}`},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("space_barracks"),t.space.space_barracks.on++,!0)},flair:()=>z("space_red_space_barracks_flair")},bonfire:Jr("bonfire","space"),horseshoe:Jr("horseshoe","space")},spc_hell:{info:{name:()=>ea().hell,desc:()=>z("space_hell_info_desc",[ea().hell]),zone:"inner",syndicate:()=>!1},hell_mission:{id:"space-hell_mission",title:()=>z("space_mission_title",[ea().hell]),desc:()=>z("space_mission_desc",[ea().hell]),reqs:{space:3,space_explore:3},grant:["hell",1],queue_complete:()=>t.tech.hell>=1?0:1,cost:{Helium_3:(e,t)=>+Yt(6500,!1,t).toFixed(0)},effect:()=>z("space_hell_mission_effect1",[ea().hell]),action(){return!!Cs($(this)[0])&&(Bi(z("space_hell_mission_action",[ea().hell]),"info",!1,["progress"]),t.space.geothermal={count:0,on:0},!0)}},geothermal:{id:"space-geothermal",title:z("space_hell_geothermal_title"),desc:()=>`
          ${z("space_hell_geothermal_desc")}
          ${z("space_hell_geothermal_desc_req")}
          `,reqs:{hell:1},cost:{Money:e=>ec("geothermal",e,38e3,1.35),Steel:e=>ec("geothermal",e,15e3,1.35),Polymer:e=>ec("geothermal",e,9500,1.35)},effect(e){let a=+Yt($(this)[0].p_fuel().a,!0,e).toFixed(2);return`${t.race.cataclysm||t.race.orbit_decayed?`
          ${z("interstellar_stellar_forge_effect3",[1])}
          `:""}${z("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}, ${z("space_belt_station_effect3",[a])}`},special:()=>!(!t.race.cataclysm&&!t.race.orbit_decayed),powered(){let e=-8;return t.race.forge&&(e-=di.forge.vars()[0]),t.stats.achieve.failed_history&&t.stats.achieve.failed_history.l>=5&&(e-=2),oc(e)},p_fuel:()=>({r:"Helium_3",a:.5}),action(){return!!Cs($(this)[0])&&(Dt("geothermal"),t.space.geothermal.on++,!0)}},hell_smelter:{id:"space-hell_smelter",title:()=>z("space_hell_smelter_title",[ea().hell]),desc:()=>z("space_hell_smelter_title",[ea().hell]),reqs:{hell:1,m_smelting:1},path:["truepath"],cost:{Money:e=>ec("hell_smelter",e,25e4,1.24),Adamantite:e=>ec("hell_smelter",e,15e3,1.24)},effect:()=>`
          ${z("interstellar_stellar_forge_effect3",[2])}
          `,special:!0,action(){return!!Cs($(this)[0])&&(Dt("hell_smelter"),t.city.smelter.cap+=2,t.city.smelter.Steel+=2,t.city.smelter.Oil+=2,!0)}},spc_casino:{id:"space-spc_casino",title:z("city_casino"),desc:z("city_casino"),category:"commercial",reqs:{hell:1,gambling:1},condition:()=>!!(t.race.cataclysm||t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=5),cost:{Money:e=>ec("spc_casino",e,4e5,1.35),Furs:e=>ec("spc_casino",e,75e3,1.35),Cement:e=>ec("spc_casino",e,1e5,1.35),Plywood:e=>ec("spc_casino",e,2e4,1.35)},effect(){let e=is();return e+=`
          ${z("minus_power",[$(this)[0].powered()])}
          `,e},powered:()=>nc(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=2?2:3),action(){return!!Cs($(this)[0])&&(t.space.spc_casino.count++,t.race.joyless||(t.civic.entertainer.max+=ua(1),t.civic.entertainer.display=!0),ks($(this)[0]),!0)},flair:z("city_casino_flair")},swarm_plant:{id:"space-swarm_plant",title:z("space_hell_swarm_plant_title"),desc:()=>`
          ${z("space_hell_swarm_plant_desc")}
          `,reqs:{solar:4,hell:1},cost:{Money:e=>ec("swarm_plant",e,Vt(75e3),1.28),Iron:e=>ec("swarm_plant",e,Vt(65e3),1.28),Neutronium:e=>ec("swarm_plant",e,Vt(75),1.28),Brick:e=>ec("swarm_plant",e,Vt(2500),1.28),Mythril:e=>ec("swarm_plant",e,Vt(100),1.28)},effect(){let e=t.tech.swarm?.88:.94;return t.tech.swarm>=3&&(e-=u/100),e<.05&&(e=.05),e=+(100*(1-e)).toFixed(2),z("space_hell_swarm_plant_effect1",[e])},action(){return!!Cs($(this)[0])&&(Dt("swarm_plant"),!0)}},firework:Jr("firework","space")},spc_sun:{info:{name:()=>z("space_sun_info_name"),desc:()=>z("space_sun_info_desc",[_i[t.race.species].home]),support:"swarm_control",zone:"inner",syndicate:()=>!1},sun_mission:{id:"space-sun_mission",title:()=>z("space_sun_mission_title"),desc:()=>z("space_sun_mission_desc"),reqs:{space_explore:4},grant:["solar",1],queue_complete:()=>t.tech.solar>=1?0:1,cost:{Helium_3:(e,t)=>+Yt(15e3,!1,t).toFixed(0)},effect:()=>z("space_sun_mission_effect1"),action(){return!!Cs($(this)[0])}},swarm_control:{id:"space-swarm_control",title:z("space_sun_swarm_control_title"),desc:()=>`
          ${z("space_sun_swarm_control_desc")}
          `,reqs:{solar:3},cost:{Money:e=>ec("swarm_control",e,1e5,1.3),Knowledge:e=>ec("swarm_control",e,6e4,1.3),Alloy:e=>ec("swarm_control",e,7500,1.3),Helium_3:(e,t)=>ec("swarm_control",e,Yt(2e3,!1,t),1.3),Mythril:e=>ec("swarm_control",e,250,1.3)},effect(){return z("space_sun_swarm_control_effect1",[$(this)[0].support()])},support:()=>t.tech.swarm&&t.tech.swarm>=2?t.tech.high_tech>=11?11+Math.round(u):12:10,action(){return!!Cs($(this)[0])&&(Dt("swarm_control"),t.space.swarm_control.s_max+=$(this)[0].support(),!0)}},swarm_satellite:{id:"space-swarm_satellite",title:z("space_sun_swarm_satellite_title"),desc:()=>`
          ${z("space_sun_swarm_satellite_desc")}
          ${z("space_sun_swarm_satellite_desc_req")}
          `,reqs:{solar:3},cost:{Money:e=>ec("swarm_satellite",e,Jt(5e3),1.1),Copper:e=>ec("swarm_satellite",e,Jt(2500),1.1),Iridium:e=>ec("swarm_satellite",e,Jt(150),1.1),Helium_3:(e,t)=>ec("swarm_satellite",e,Jt(Yt(50,!1,t)),1.1)},effect(){let e=.35;return t.tech.swarm>=4&&(e+=.15*(t.tech.swarm-3)),t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=1&&(e+=.15),t.blood.illuminate&&(e+=.01*t.blood.illuminate),e=+e.toFixed(2),`${z("space_dwarf_reactor_effect1",[oc(e)])}, ${z("space_sun_swarm_satellite_effect1",[1])}`},support:()=>-1,action(){return!!Cs($(this)[0])&&(Dt("swarm_satellite"),t.space.swarm_control.support++,!0)}},jump_gate:{id:"space-jump_gate",title:z("tau_jump_gate"),desc:e=>!t.space.hasOwnProperty("jump_gate")||t.space.jump_gate.count<100||e?`
          ${z("tau_jump_gate")}
          ${z("requires_segmemts",[100])}
          `:`
          ${z("tau_jump_gate")}
          `,reqs:{tauceti:3},path:["truepath"],queue_size:10,queue_complete:()=>100-t.space.jump_gate.count,cost:{Money:e=>(e||0)+(t.space.hasOwnProperty("jump_gate")?t.space.jump_gate.count:0)<100?1e6:0,Alloy:e=>(e||0)+(t.space.hasOwnProperty("jump_gate")?t.space.jump_gate.count:0)<100?5e4:0,Adamantite:e=>(e||0)+(t.space.hasOwnProperty("jump_gate")?t.space.jump_gate.count:0)<100?12500:0,Graphene:e=>(e||0)+(t.space.hasOwnProperty("jump_gate")?t.space.jump_gate.count:0)<100?42e3:0,Orichalcum:e=>(e||0)+(t.space.hasOwnProperty("jump_gate")?t.space.jump_gate.count:0)<100?35e3:0,Quantium:e=>(e||0)+(t.space.hasOwnProperty("jump_gate")?t.space.jump_gate.count:0)<100?25e3:0},effect(e){let a=(e||0)+(t.space.hasOwnProperty("jump_gate")?t.space.jump_gate.count:0);if(a<100){let e=100-a;return`
          ${z("tau_jump_gate_effect")}
          ${z("space_dwarf_collider_effect2",[e])}
          `}return z("tau_jump_gate_effect")},action(){return!!(Cs($(this)[0])&&t.space.jump_gate.count<100)&&(t.space.jump_gate.count++,!0)}}},spc_gas:{info:{name:()=>ea().gas,desc:()=>z("space_gas_info_desc",[ea().gas,_i[t.race.species].home]),zone:"outer",syndicate:()=>!0},gas_mission:{id:"space-gas_mission",title:()=>z("space_mission_title",[ea().gas]),desc:()=>z("space_mission_desc",[ea().gas]),reqs:{space:4,space_explore:4},grant:["space",5],queue_complete:()=>t.tech.space>=5?0:1,cost:{Helium_3:(e,t)=>+Yt(12500,!1,t).toFixed(0)},effect:()=>z("space_gas_mission_effect",[ea().gas]),action(){return!!Cs($(this)[0])&&(Bi(z("space_gas_mission_action",[ea().gas]),"info",!1,["progress"]),t.settings.space.gas_moon=!0,t.settings.space.belt=!0,t.space.space_station={count:0,on:0,support:0,s_max:0},!0)}},gas_mining:{id:"space-gas_mining",title:z("space_gas_mining_title"),desc:()=>`
          ${z("space_gas_mining_desc")}
          ${z("requires_power")}
          `,reqs:{gas_giant:1},cost:{Money:e=>ec("gas_mining",e,25e4,1.32),Uranium:e=>ec("gas_mining",e,500,1.32),Alloy:e=>ec("gas_mining",e,1e4,1.32),Helium_3:(e,t)=>ec("gas_mining",e,Yt(2500,!1,t),1.32),Mythril:e=>ec("gas_mining",e,25,1.32)},effect(){return`
          ${z("space_gas_mining_effect1",[+Oe("gas_mining").toFixed(2)])}
          ${z("minus_power",[$(this)[0].powered()])}
          `},powered:()=>nc(2),action(){return!!Cs($(this)[0])&&(Dt("gas_mining"),ks($(this)[0]),!0)}},gas_storage:{id:"space-gas_storage",title:()=>z("space_gas_storage_title",[ea().gas]),desc:()=>`
          ${z("space_gas_storage_desc")}
          `,reqs:{gas_giant:1},cost:{Money:e=>ec("gas_storage",e,125e3,1.32),Iridium:e=>ec("gas_storage",e,3e3,1.32),Sheet_Metal:e=>ec("gas_storage",e,2e3,1.32),Helium_3:(e,t)=>ec("gas_storage",e,Yt(1e3,!1,t),1.32)},effect(){let e=Nr(3500)*(t.tech.world_control?1.5:1),a=Nr(2500)*(t.tech.world_control?1.5:1),r=Nr(1e3)*(t.tech.world_control?1.5:1);return`
          ${z("plus_max_resource",[e,z("resource_Oil_name")])}
          ${z("plus_max_resource",[a,z("resource_Helium_3_name")])}
          ${z("plus_max_resource",[r,z("resource_Uranium_name")])}
          `},action(){return!!Cs($(this)[0])&&(Dt("gas_storage"),!0)}},star_dock:{id:"space-star_dock",title:()=>z("space_gas_star_dock_title"),desc:()=>`
          ${z("space_gas_star_dock_title")}
          ${z("space_gas_star_dock_desc_req")}
          `,reqs:{genesis:3},queue_complete:()=>1-t.space.star_dock.count,cost:{Money:e=>(e||0)+(t.space.hasOwnProperty("star_dock")?t.space.star_dock.count:0)===0?15e5:0,Steel:e=>(e||0)+(t.space.hasOwnProperty("star_dock")?t.space.star_dock.count:0)===0?5e5:0,Helium_3:(e,a)=>(e||0)+(t.space.hasOwnProperty("star_dock")?t.space.star_dock.count:0)===0?Math.round(Yt(1e4,!1,a)):0,Nano_Tube:e=>(e||0)+(t.space.hasOwnProperty("star_dock")?t.space.star_dock.count:0)===0?25e4:0,Mythril:e=>(e||0)+(t.space.hasOwnProperty("star_dock")?t.space.star_dock.count:0)===0?1e4:0},effect:()=>`
          ${z("space_gas_star_dock_effect1")}
          `,special:!0,action(){return!(0!==t.space.star_dock.count||!Cs($(this)[0])||(Dt("star_dock"),0))}}},spc_gas_moon:{info:{name:()=>ea().gas_moon,desc:()=>z("space_gas_moon_info_desc",[ea().gas_moon,ea().gas]),zone:"outer",syndicate:()=>!0},gas_moon_mission:{id:"space-gas_moon_mission",title:()=>z("space_mission_title",[ea().gas_moon]),desc:()=>z("space_mission_desc",[ea().gas_moon]),reqs:{space:5},grant:["space",6],queue_complete:()=>t.tech.space>=6?0:1,cost:{Helium_3:(e,t)=>+Yt(3e4,!1,t).toFixed(0)},effect:()=>z("space_gas_moon_mission_effect",[ea().gas_moon]),action(){return!!Cs($(this)[0])&&(Bi(z("space_gas_moon_mission_action",[ea().gas_moon]),"info",!1,["progress"]),t.space.outpost={count:0,on:0},t.tech.gas_moon=1,!0)}},outpost:{id:"space-outpost",title:z("space_gas_moon_outpost_title"),desc:()=>`
          ${z("space_gas_moon_outpost_desc")}
          ${z("requires_power_combo",[t.resource.Oil.name])}
          `,reqs:{gas_moon:1},cost:{Money:e=>ec("outpost",e,666e3,1.3),Titanium:e=>ec("outpost",e,18e3,1.3),Iridium:e=>ec("outpost",e,2500,1.3),Helium_3:(e,t)=>ec("outpost",e,Yt(6e3,!1,t),1.3),Mythril:e=>ec("outpost",e,300,1.3)},effect(e){let t=+Oe("outpost").toFixed(3),a=Nr(500),r=+Yt(2,!0,e).toFixed(2);return`
          ${z("space_gas_moon_outpost_effect1",[t])}
          ${z("plus_max_resource",[a,z("resource_Neutronium_name")])}
          ${z("space_gas_moon_outpost_effect3",[r,$(this)[0].powered()])}
          `},powered:()=>nc(3),powerBalancer:()=>[{r:"Neutronium",k:"lpmod"}],action(){return!!Cs($(this)[0])&&(Dt("outpost"),t.resource.Neutronium.display=!0,ks($(this)[0]),!0)}},drone:{id:"space-drone",title:z("space_gas_moon_drone_title"),desc:()=>`
          ${z("space_gas_moon_drone_desc")}
          `,reqs:{gas_moon:1,drone:1},cost:{Money:e=>ec("drone",e,25e4,1.3),Steel:e=>ec("drone",e,2e4,1.3),Neutronium:e=>ec("drone",e,500,1.3),Elerium:e=>ec("drone",e,25,1.3),Nano_Tube:e=>ec("drone",e,45e3,1.3)},effect:()=>`
          ${z("space_gas_moon_drone_effect1",[t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=3?12:6])}
          `,action(){return!!Cs($(this)[0])&&(Dt("drone"),!0)}},oil_extractor:{id:"space-oil_extractor",title:z("space_gas_moon_oil_extractor_title"),desc:()=>`
          ${z("space_gas_moon_oil_extractor_title")}
          ${z("requires_power")}
          `,reqs:{gas_moon:2},cost:{Money:e=>ec("oil_extractor",e,666e3,1.3),Polymer:e=>ec("oil_extractor",e,7500,1.3),Helium_3:(e,t)=>ec("oil_extractor",e,Yt(2500,!1,t),1.3),Wrought_Iron:e=>ec("oil_extractor",e,5e3,1.3)},effect(){return`${z("space_gas_moon_oil_extractor_effect1",[+Oe("oil_extractor").toFixed(2)])}, ${z("minus_power",[$(this)[0].powered()])}`},powered:()=>nc(1),powerBalancer:()=>[{r:"Oil",k:"lpmod"}],action(){return!!Cs($(this)[0])&&(Dt("oil_extractor"),ks($(this)[0]),!0)}}},spc_belt:{info:{name:()=>z("space_belt_info_name"),desc:()=>t.space.space_station&&t.space.space_station.count>0?`
          ${z("space_belt_info_desc",[ea().red,ea().gas])}
          ${z("space_belt_info_desc2")}
          `:z("space_belt_info_desc",[ea().red,ea().gas]),support:"space_station",zone:"inner",syndicate:()=>!0},belt_mission:{id:"space-belt_mission",title:()=>z("space_belt_mission_title"),desc:()=>z("space_belt_mission_desc"),reqs:{space:5},grant:["asteroid",1],queue_complete:()=>t.tech.asteroid>=1?0:1,cost:{Helium_3:(e,t)=>+Yt(25e3,!1,t).toFixed(0)},effect:()=>z("space_belt_mission_effect1"),action(){return!!Cs($(this)[0])&&(Bi(z("space_belt_mission_action"),"info",!1,["progress"]),t.settings.space.dwarf=!0,!0)}},space_station:{id:"space-space_station",title:z("space_belt_station_title"),desc:()=>`
          ${z("space_belt_station_desc")}
          ${z("requires_power_space",[t.resource.Food.name])}
          `,reqs:{asteroid:2},cost:{Money:e=>ec("space_station",e,25e4,1.3),Iron:e=>ec("space_station",e,85e3,1.3),Polymer:e=>ec("space_station",e,18e3,1.3),Iridium:e=>ec("space_station",e,2800,1.28),Helium_3:(e,t)=>ec("space_station",e,Yt(2e3,!1,t),1.3),Mythril:e=>ec("space_station",e,75,1.25)},effect(e){let a=+Yt(2.5,!0,e).toFixed(2),r=t.race.cataclysm?1:10,s=Nr(5),i=t.tech.asteroid>=5?`
          ${z("plus_max_resource",[s,z("resource_Elerium_name")])}
          `:"";return`
          ${z("plus_max_space_miners",[ua(3)])}
          ${i}
          ${z("space_belt_station_effect3",[a])}
          ${z("space_belt_station_effect4",[r,$(this)[0].powered(),t.resource.Food.name])}
          `},support:()=>ua(3),powered:()=>nc(3),refresh:!0,action(){if(Cs($(this)[0])){if(Dt("space_station"),t.civic.space_miner.display=!0,t.tech.asteroid<3&&(t.tech.asteroid=3),ks($(this)[0])&&t.civic[t.civic.d_job].workers>0){let e=ua(3);t.civic[t.civic.d_job].workers-e<0&&(e=t.civic[t.civic.d_job].workers),t.civic[t.civic.d_job].workers-=e,t.civic.space_miner.workers+=e}return t.race.orbit_decay&&t.race.orbit_decay>t.stats.days+1e3&&(t.race.orbit_decay=t.stats.days+1e3,Bi(z("evo_challenge_orbit_decayed_accelerated",[t.race.orbit_decay-t.stats.days]),"info",!1,["progress"])),!0}return!1}},elerium_ship:{id:"space-elerium_ship",title:z("space_belt_elerium_ship_title"),desc:()=>z("space_belt_elerium_ship_title"),reqs:{asteroid:5},cost:{Money:e=>ec("elerium_ship",e,5e5,1.3),Uranium:e=>ec("elerium_ship",e,2500,1.3),Titanium:e=>ec("elerium_ship",e,1e4,1.3),Mythril:e=>ec("elerium_ship",e,500,1.3),Helium_3:(e,t)=>ec("elerium_ship",e,Yt(5e3,!1,t),1.3)},effect(){let e=+Oe("elerium_ship").toFixed(4);return`
          ${z("space_belt_elerium_ship_effect1",[ua(2)])}
          ${z("space_belt_elerium_ship_effect2",[e])}
          `},support:()=>ua(-2),powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("elerium_ship"),t.space.space_station.support+1z("space_belt_iridium_ship_title"),reqs:{asteroid:3},cost:{Money:e=>ec("iridium_ship",e,12e4,1.3),Uranium:e=>ec("iridium_ship",e,1e3,1.3),Alloy:e=>ec("iridium_ship",e,48e3,1.3),Iridium:e=>ec("iridium_ship",e,2800,1.3),Helium_3:(e,t)=>ec("iridium_ship",e,Yt(1800,!1,t),1.3)},effect(){let e=+Oe("iridium_ship").toFixed(3);return`
          ${z("space_belt_iridium_ship_effect1",[ua(1)])}
          ${z("space_belt_iridium_ship_effect2",[e])}
          `},support:()=>ua(-1),powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("iridium_ship"),t.space.space_station.supportz("space_belt_iron_ship_title"),reqs:{asteroid:3},cost:{Money:e=>ec("iron_ship",e,8e4,1.3),Steel:e=>ec("iron_ship",e,42e3,1.3),Aluminium:e=>ec("iron_ship",e,38e3,1.3),Polymer:e=>ec("iron_ship",e,16e3,1.3),Helium_3:(e,t)=>ec("iron_ship",e,Yt(1200,!1,t),1.3)},effect(){let e=+Oe("iron_ship").toFixed(2);return t.tech.solar&&t.tech.solar>=5?`
          ${z("space_belt_iron_ship_effect1",[ua(1)])}
          ${z("space_belt_iron_ship_effect2",[e])}
          ${z("space_belt_iron_ship_effect3")}
          `:`
          ${z("space_belt_iron_ship_effect1",[ua(1)])}
          ${z("space_belt_iron_ship_effect2",[e])}
          `},support:()=>ua(-1),powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("iron_ship"),t.space.space_station.supportea().dwarf,desc:()=>z("space_dwarf_info_desc",[ea().dwarf]),zone:"inner",syndicate:()=>!1},dwarf_mission:{id:"space-dwarf_mission",title:()=>z("space_mission_title",[ea().dwarf]),desc:()=>z("space_mission_desc",[ea().dwarf]),reqs:{asteroid:1,elerium:1},grant:["dwarf",1],queue_complete:()=>t.tech.dwarf>=1?0:1,cost:{Helium_3:(e,t)=>+Yt(45e3,!1,t).toFixed(0)},effect:()=>z("space_dwarf_mission_effect1",[ea().dwarf]),action(){return!!Cs($(this)[0])&&(Bi(z("space_dwarf_mission_action",[ea().dwarf]),"info",!1,["progress"]),t.space.elerium_contain={count:0,on:0},!0)}},elerium_contain:{id:"space-elerium_contain",title:z("space_dwarf_elerium_contain_title"),desc:()=>`
          ${z("space_dwarf_elerium_contain_title")}
          ${z("requires_power")}
          `,reqs:{dwarf:1},cost:{Money:e=>ec("elerium_contain",e,8e5,1.28),Cement:e=>ec("elerium_contain",e,12e4,1.28),Iridium:e=>ec("elerium_contain",e,5e4,1.28),Neutronium:e=>ec("elerium_contain",e,250,1.28)},effect(){return`
          ${z("plus_max_resource",[Nr(100),z("resource_Elerium_name")])}
          ${z("minus_power",[$(this)[0].powered()])}
          `},powered:()=>nc(6),action(){return!!Cs($(this)[0])&&(Dt("elerium_contain"),ks($(this)[0]),!0)}},e_reactor:{id:"space-e_reactor",title:z("space_dwarf_reactor_title"),desc:()=>`
          ${z("space_dwarf_reactor_title")}
          ${z("space_dwarf_reactor_desc_req")}
          `,reqs:{elerium:2},cost:{Money:e=>ec("e_reactor",e,125e4,1.28),Steel:e=>ec("e_reactor",e,35e4,1.28),Neutronium:e=>ec("e_reactor",e,1250,1.28),Mythril:e=>ec("e_reactor",e,2500,1.28)},effect(){let e=$(this)[0].p_fuel().a;return`
          ${z("space_dwarf_reactor_effect1",[-1*$(this)[0].powered()])}
          ${z("space_dwarf_reactor_effect2",[e])}
          `},powered:()=>oc(-25),p_fuel:()=>({r:"Elerium",a:.05}),action(){return!!Cs($(this)[0])&&(Dt("e_reactor"),t.space.e_reactor.on++,!0)}},world_collider:{id:"space-world_collider",title:z("space_dwarf_collider_title"),desc(e){if(!t.space.hasOwnProperty("world_collider")||t.space.world_collider.count<1859||e)return`
          ${z("space_dwarf_collider_desc")}
          ${z("space_dwarf_collider_desc_req")}
          `+(t.space.hasOwnProperty("world_collider")&&t.space.world_collider.count>=1859?`
          ${z("requires_power")}
          `:"")},reqs:{science:10},path:["standard"],condition:()=>t.space.world_collider.count<1859,queue_size:100,queue_complete:()=>1859-t.space.world_collider.count,cost:{Money:e=>(e||0)+(t.space.hasOwnProperty("world_collider")?t.space.world_collider.count:0)<1859?25e3:0,Copper:e=>(e||0)+(t.space.hasOwnProperty("world_collider")?t.space.world_collider.count:0)<1859?750:0,Alloy:e=>(e||0)+(t.space.hasOwnProperty("world_collider")?t.space.world_collider.count:0)<1859?125:0,Neutronium:e=>(e||0)+(t.space.hasOwnProperty("world_collider")?t.space.world_collider.count:0)<1859?12:0,Elerium:e=>(e||0)+(t.space.hasOwnProperty("world_collider")?t.space.world_collider.count:0)<1859?1:0,Mythril:e=>(e||0)+(t.space.hasOwnProperty("world_collider")?t.space.world_collider.count:0)<1859?10:0},effect(e){let a=(e||0)+(t.space.hasOwnProperty("world_collider")?t.space.world_collider.count:0);if(a<1859){let e=1859-a;return`
          ${z("space_dwarf_collider_effect1")}
          ${z("space_dwarf_collider_effect2",[e])}
          `}return St.spc_dwarf.world_controller.effect()},action(){if(t.space.world_collider.count<1859&&Cs($(this)[0])){if(Dt("world_collider"),t.space.world_collider.count>=1859){if(t.tech.science=11,t.space.world_controller={count:1,on:0},gs(),Ht(),t.race.banana){let e=Xc();t.stats.banana.b2[e]=!0,"m"!==e&&"l"!==e&&(t.stats.banana.b2.l=!0)}Ii()}return!0}return!1},flair:z("space_dwarf_collider_flair")},world_controller:{id:"space-world_controller",title:z("space_dwarf_collider_title"),desc:()=>`
          ${z("space_dwarf_collider_title")}
          ${z("requires_power")}
          `,wiki:!1,reqs:{science:11},path:["standard"],condition:()=>!(t.space.world_collider.count<1859),queue_complete:()=>0,cost:{},effect(){let e=25;return t.interstellar.far_reach&&i.far_reach>0&&(e+=1*i.far_reach),t.tech.science>=19&&(e+=15),`
          ${z("plus_max_resource",[e+"%",z("resource_Knowledge_name")])}
          ${z("space_dwarf_controller_effect3")}
          ${z("minus_power",[$(this)[0].powered()])}
          `},powered:()=>nc(20),action:()=>!1,flair:z("space_dwarf_controller_flair")},shipyard:{id:"space-shipyard",title:z("outer_shipyard_title"),desc:()=>`
          ${z("outer_shipyard_title")}
          ${z("requires_power")}
          `,reqs:{shipyard:1},path:["truepath"],cost:{Money:e=>(e||0)+(t.space.hasOwnProperty("shipyard")?t.space.shipyard.count:0)<1?1e7:0,Aluminium:e=>(e||0)+(t.space.hasOwnProperty("shipyard")?t.space.shipyard.count:0)<1?1e6:0,Titanium:e=>(e||0)+(t.space.hasOwnProperty("shipyard")?t.space.shipyard.count:0)<1?65e4:0,Iridium:e=>(e||0)+(t.space.hasOwnProperty("shipyard")?t.space.shipyard.count:0)<1?25e4:0,Neutronium:e=>(e||0)+(t.space.hasOwnProperty("shipyard")?t.space.shipyard.count:0)<1?1e4:0,Mythril:e=>(e||0)+(t.space.hasOwnProperty("shipyard")?t.space.shipyard.count:0)<1?5e5:0},queue_complete:()=>1-t.space.shipyard.count,effect(){return`
          ${z("outer_shipyard_effect")}
          ${z("minus_power",[$(this)[0].powered()])}
          `},powered:()=>nc(50),special:!0,sAction(){i.shipyard&&(t.settings.civTabs=2,t.settings.govTabs=5,t.settings.tabLoad||(jt("mTabCivic"),Ii("space-shipyard")))},action(){return!!(t.space.shipyard.count<1&&Cs($(this)[0]))&&(Dt("shipyard"),ks($(this)[0])&&(t.settings.showShipYard=!0),t.tech.syard_class=2,t.tech.syard_armor=3,t.tech.syard_weapon=1,t.tech.syard_engine=2,t.tech.syard_power=3,t.tech.syard_sensor=3,!0)}},mass_relay:{id:"space-mass_relay",title:z("space_dwarf_mass_relay_title"),desc(e){if(!t.space.hasOwnProperty("mass_relay")||t.space.mass_relay.count<100||e)return`
          ${z("space_dwarf_mass_relay_title")}
          ${z("requires_segmemts",[100])}
          `},reqs:{outer:5},path:["truepath"],condition:()=>t.space.mass_relay.count<100,queue_size:5,queue_complete:()=>100-t.space.mass_relay.count,cost:{Money:e=>(e||0)+(t.space.hasOwnProperty("mass_relay")?t.space.mass_relay.count:0)<100?1e7:0,Neutronium:e=>(e||0)+(t.space.hasOwnProperty("mass_relay")?t.space.mass_relay.count:0)<100?7500:0,Adamantite:e=>(e||0)+(t.space.hasOwnProperty("mass_relay")?t.space.mass_relay.count:0)<100?18e3:0,Elerium:e=>(e||0)+(t.space.hasOwnProperty("mass_relay")?t.space.mass_relay.count:0)<100?125:0,Stanene:e=>(e||0)+(t.space.hasOwnProperty("mass_relay")?t.space.mass_relay.count:0)<100?1e5:0,Quantium:e=>(e||0)+(t.space.hasOwnProperty("mass_relay")?t.space.mass_relay.count:0)<100?25e3:0},effect(e){let a=(e||0)+(t.space.hasOwnProperty("mass_relay")?t.space.mass_relay.count:0);if(a<100){let e=100-a;return`
          ${z("space_dwarf_mass_relay_effect")}
          ${z("space_dwarf_collider_effect2",[e])}
          `}return St.spc_dwarf.m_relay.effect()},action(){return!!(t.space.mass_relay.count<100&&Cs($(this)[0]))&&(t.space.mass_relay.count++,t.space.mass_relay.count>=100&&(t.tech.outer=6,t.space.m_relay={count:1,on:1,charged:0},gs(),Ht(),Ii()),!0)}},m_relay:{id:"space-m_relay",title:z("space_dwarf_mass_relay_title"),desc:()=>`
          ${z("space_dwarf_mass_relay_title")}
          ${z("requires_power")}
          `,reqs:{outer:6},path:["truepath"],condition:()=>t.space.mass_relay.count>=100,wiki:!1,queue_complete:()=>0,cost:{},powered:()=>nc(100),effect(){let e=Math.floor(t.space.m_relay.charged/10)/10;return`
          ${z("space_dwarf_mass_relay_effect2",[ea().dwarf])}
          ${z("minus_power",[$(this)[0].powered()])}
          ${z("space_dwarf_mass_relay_charged",[e])}
          `},action:()=>!1}},spc_titan:et().spc_titan,spc_enceladus:et().spc_enceladus,spc_triton:et().spc_triton,spc_kuiper:et().spc_kuiper,spc_eris:et().spc_eris},Ft={int_alpha:{info:{name:z("interstellar_alpha_name"),desc:()=>t.tech.alpha?z("interstellar_alpha_desc2",[_i[t.race.species].home]):z("interstellar_alpha_desc1",[_i[t.race.species].home]),support:"starport"},alpha_mission:{id:"interstellar-alpha_mission",title:z("space_mission_title",[z("interstellar_alpha_name")]),desc:z("space_mission_desc",[z("interstellar_alpha_name")]),reqs:{ftl:2},grant:["alpha",1],queue_complete:()=>t.tech.alpha>=1?0:1,cost:{Helium_3:()=>+Xt(4e4).toFixed(0)},effect:z("interstellar_alpha_mission_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("interstellar_alpha_mission_result"),"info",!1,["progress"]),t.interstellar.nexus={count:0,on:0,support:0,s_max:0},t.interstellar.warehouse={count:0},!0)}},starport:{id:"interstellar-starport",title:z("interstellar_alpha_starport_title"),desc:()=>`
          ${z("interstellar_alpha_starport_desc")}
          ${z("requires_power_space",[t.resource.Food.name])}
          `,reqs:{alpha:1},cost:{Money:e=>ec("starport",e,1e6,1.3,"interstellar"),Aluminium:e=>ec("starport",e,4e5,1.3,"interstellar"),Neutronium:e=>ec("starport",e,1e3,1.3,"interstellar"),Elerium:e=>ec("starport",e,100,1.3,"interstellar")},effect(){let e=+Xt(5).toFixed(2);return`
          ${z("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
          ${z("interstellar_alpha_starport_effect2",[e,$(this)[0].powered()])}
          ${z("interstellar_alpha_starport_effect3",[100,t.resource.Food.name])}
          `},support:()=>5,powered:()=>nc(10),powerBalancer:()=>[{s:t.interstellar.starport.s_max-t.interstellar.starport.support}],refresh:!0,action(){return!!Cs($(this)[0])&&(Dt("starport","interstellar"),t.settings.space.proxima=!0,t.settings.space.nebula=!0,ks($(this)[0]),1===t.tech.alpha&&(t.tech.alpha=2,t.interstellar.mining_droid={count:0,on:0,adam:0,uran:0,coal:0,alum:0}),t.race.orbit_decay&&t.race.orbit_decay>t.stats.days+100&&(t.race.orbit_decay=t.stats.days+100,Bi(z("evo_challenge_orbit_decayed_accelerated",[t.race.orbit_decay-t.stats.days]),"info",!1,["progress"])),!0)}},habitat:{id:"interstellar-habitat",title:z("interstellar_habitat_title"),desc:`
          ${z("interstellar_habitat_desc")}
          ${z("requires_power")}
          `,reqs:{alpha:3},cost:{Money:e=>ec("habitat",e,8e5,1.25,"interstellar"),Furs:e=>ec("habitat",e,38e3,1.25,"interstellar"),Adamantite:e=>ec("habitat",e,3200,1.25,"interstellar"),Plywood:e=>ec("habitat",e,1e4,1.25,"interstellar"),Horseshoe:()=>t.race.hooved?1:0},effect(){let e=$(this)[0].citizens();return`
          ${z("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
          ${z("plus_max_citizens",[e])}, ${z("minus_power",[$(this)[0].powered()])}
          `},support:()=>1,powered:()=>nc(2),powerBalancer:()=>[{s:t.interstellar.starport.s_max-t.interstellar.starport.support}],action(){return!!Cs($(this)[0])&&(Dt("habitat","interstellar"),ks($(this)[0])&&(t.resource[t.race.species].max+=$(this)[0].citizens()),!0)},citizens(){let e=1;return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e}},mining_droid:{id:"interstellar-mining_droid",title:z("interstellar_mining_droid_title"),desc:`
          ${z("interstellar_mining_droid_title")}
          ${z("space_support",[z("interstellar_alpha_name")])}
          `,reqs:{alpha:2},cost:{Money:e=>ec("mining_droid",e,65e4,1.28,"interstellar"),Steel:e=>ec("mining_droid",e,12e4,1.28,"interstellar"),Nano_Tube:e=>ec("mining_droid",e,75e3,1.28,"interstellar"),Elerium:e=>ec("mining_droid",e,50,1.28,"interstellar")},effect:()=>`
          ${z("space_used_support",[z("interstellar_alpha_name")])}
          ${z("interstellar_mining_droid_effect")}
          `,support:()=>-1,powered:()=>nc(1),special:!0,refresh:!0,action(){return!!Cs($(this)[0])&&(Dt("mining_droid","interstellar"),t.resource.Adamantite.display=!0,t.interstellar.starport.support${z("interstellar_processing_title")}
          ${z("space_support",[z("interstellar_alpha_name")])}
          `,reqs:{droids:1},cost:{Money:e=>ec("processing",e,35e4,1.28,"interstellar"),Iron:e=>ec("processing",e,18e4,1.28,"interstellar"),Aluminium:e=>ec("processing",e,6e4,1.28,"interstellar"),Iridium:e=>ec("processing",e,5e3,1.28,"interstellar")},effect(){let e=12;return t.tech.ai_core&&t.tech.ai_core>=2&&i.citadel>0&&(e+=2*i.citadel),`
          ${z("space_used_support",[z("interstellar_alpha_name")])}
          ${z("interstellar_processing_effect",[e])}
          `},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("processing","interstellar"),t.interstellar.starport.support`
          ${z("interstellar_fusion_title")}
          ${z("requires_power_support_combo",[z("interstellar_alpha_name"),t.resource.Deuterium.name])}
          `,reqs:{fusion:1},cost:{Money:e=>ec("fusion",e,99e4,1.28,"interstellar"),Iridium:e=>ec("fusion",e,44e3,1.28,"interstellar"),Infernite:e=>ec("fusion",e,350,1.28,"interstellar"),Brick:e=>ec("fusion",e,18e3,1.28,"interstellar")},effect(){return`
          ${z("space_used_support",[z("interstellar_alpha_name")])}
          ${z("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}, ${z("interstellar_fusion_effect",[1.25])}
          `},support:()=>-1,powered:()=>oc(-22),p_fuel:()=>({r:"Deuterium",a:1.25}),action(){return!!Cs($(this)[0])&&(Dt("fusion","interstellar"),t.interstellar.starport.support"magic"===t.race.universe?z("tech_sanctum"):z("interstellar_laboratory_title"),desc:`
          ${z("magic"===t.race.universe?"tech_sanctum":"interstellar_laboratory_title")}
          ${z("space_support",[z("interstellar_alpha_name")])}
          `,reqs:{science:12},cost:{Money:e=>ec("laboratory",e,75e4,1.28,"interstellar"),Crystal:e=>"magic"===t.race.universe?ec("laboratory",e,1200,1.28,"interstellar"):0,Titanium:e=>ec("laboratory",e,12e4,1.28,"interstellar"),Alloy:e=>ec("laboratory",e,95e3,1.28,"interstellar"),Mythril:e=>ec("laboratory",e,8500,1.28,"interstellar")},effect(){let e=1e4;t.tech.science>=15&&(e*=1+.02*(t.race.cataclysm||t.race.orbit_decayed?c.exotic_lab:t.city.wardenclyffe.count)),(t.race.cataclysm||t.race.orbit_decayed&&i.s_gate&&n.scavenger)&&(e*=1+n.scavenger*+(.75*It("gxy_alien2")).toFixed(1)),t.tech.science>=21&&(e*=1.45),e=Math.round(e);let a="";t.tech.science>=16&&(a=`
          ${z("city_wardenclyffe_effect1",[ua(1),t.civic.scientist.name])}
          `);let r=`
          ${z("space_used_support",[z("interstellar_alpha_name")])}
          ${a}
          ${z("city_max_knowledge",[e])}
          `;return t.tech.science>=13&&(r+=`
          ${z("interstellar_laboratory_effect",[5])}
          `),"magic"===t.race.universe&&(r+=`
          ${z("plus_max_resource",[Nr(12),t.resource.Mana.name])}
          `),r},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("laboratory","interstellar"),t.interstellar.starport.support${z("interstellar_exchange_title")}
          ${z("space_support",[z("interstellar_alpha_name")])}
          `,reqs:{banking:12},cost:{Money:e=>ec("exchange",e,68e4,1.28,"interstellar"),Stone:e=>ec("exchange",e,115e3,1.28,"interstellar"),Adamantite:e=>ec("exchange",e,55e3,1.28,"interstellar"),Graphene:e=>ec("exchange",e,78e3,1.28,"interstellar")},effect(){let e=t.race.cataclysm||t.race.orbit_decayed?i.spaceport:t.city.bank?t.city.bank.count:0,a=t.race.cataclysm||t.race.orbit_decayed?4*Us():Us(),r=Nr(t.city.bank?a*e/18:0);return t.race.inflation&&(r*=2),t.tech.banking>=13&&(t.galaxy.freighter&&(r*=1+.03*n.freighter),t.galaxy.super_freighter&&(r*=1+.08*n.super_freighter)),r=+r.toFixed(0),`
          ${z("space_used_support",[z("interstellar_alpha_name")])}
          ${z("plus_max_resource",[`$${r.toLocaleString()}`,z("resource_Money_name")])}
          `},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("exchange","interstellar"),t.interstellar.starport.support${z("interstellar_g_factory_title")}
          ${z("space_support",[z("interstellar_alpha_name")])}
          `,reqs:{graphene:1},cost:{Money:e=>ec("g_factory",e,95e4,1.28,"interstellar"),Copper:e=>ec("g_factory",e,165e3,1.28,"interstellar"),Cement:e=>ec("g_factory",e,22e4,1.28,"interstellar"),Infernite:e=>ec("g_factory",e,750,1.28,"interstellar")},effect:()=>`
          ${z("space_used_support",[z("interstellar_alpha_name")])}
          ${z("interstellar_g_factory_effect")}
          `,support:()=>-1,powered:()=>nc(1),special:!0,action(){return!!Cs($(this)[0])&&(Dt("g_factory","interstellar"),t.resource.Graphene.display=!0,t.interstellar.starport.support`
          ${z("interstellar_int_factory_title")}
          ${z("requires_power_combo",[t.resource.Deuterium.name])}
          `,reqs:{alpha:4},cost:{Money:e=>ec("int_factory",e,25e6,1.26,"interstellar"),Coal:e=>ec("int_factory",e,1e7,1.26,"interstellar"),Brick:e=>ec("int_factory",e,75e4,1.26,"interstellar"),Bolognium:e=>ec("int_factory",e,5e4,1.26,"interstellar")},effect(){let e=+Xt(5).toFixed(2);return`
          ${z("interstellar_int_factory_effect")}
          ${z("city_crafted_mats",[10])}
          ${z("interstellar_fusion_effect",[e])} ${z("minus_power",[$(this)[0].powered()])}
          `},powered:()=>nc(5),special:!0,action(){return!!Cs($(this)[0])&&(Dt("int_factory","interstellar"),ks($(this)[0])&&(t.city.factory.Alloy+=2,Qs()),!0)}},luxury_condo:{id:"interstellar-luxury_condo",title:z("tech_luxury_condo"),desc:`
          ${z("tech_luxury_condo")}
          ${z("requires_power")}
          `,reqs:{alpha:5},cost:{Money:e=>ec("luxury_condo",e,25e6,1.25,"interstellar"),Neutronium:e=>ec("luxury_condo",e,75e3,1.25,"interstellar"),Stanene:e=>ec("luxury_condo",e,23e4,1.25,"interstellar"),Orichalcum:e=>ec("luxury_condo",e,65e3,1.25,"interstellar"),Nanoweave:e=>ec("luxury_condo",e,12500,1.25,"interstellar"),Horseshoe:()=>t.race.hooved?2:0},effect(){let e=$(this)[0].citizens(),t=Nr(75e4);return`
          ${z("plus_max_citizens",[e])}, ${z("minus_power",[$(this)[0].powered()])}
          ${z("plus_max_resource",[`$${t.toLocaleString()}`,z("resource_Money_name")])}
          `},powered:()=>nc(3),action(){return!!Cs($(this)[0])&&(Dt("luxury_condo","interstellar"),ks($(this)[0])&&(t.resource[t.race.species].max+=2),!0)},citizens(){let e=2;return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e}},zoo:{id:"interstellar-zoo",title:z("tech_zoo"),desc:()=>`
          ${z("tech_zoo")}
          ${z("requires_power_support_combo",[z("interstellar_alpha_name"),t.resource.Food.name])}
          `,reqs:{zoo:1},cost:{Money:e=>ec("zoo",e,5e7,1.24,"interstellar"),Polymer:e=>ec("zoo",e,6e6,1.24,"interstellar"),Infernite:e=>ec("zoo",e,75e3,1.24,"interstellar"),Brick:e=>ec("zoo",e,2e6,1.24,"interstellar")},effect:()=>`
          ${z("space_used_support",[z("interstellar_alpha_name")])}
          ${z("space_red_vr_center_effect1",[5])}
          ${z("space_red_vr_center_effect2",[2])}
          ${z("interstellar_alpha_starport_effect3",[12e3,t.resource.Food.name])}
          `,powered:()=>nc(3),action(){return!!Cs($(this)[0])&&(Dt("zoo","interstellar"),t.interstellar.starport.supportt.tech.storage<=2?z("city_shed_title1"):t.tech.storage>=4?z("city_shed_title3"):z("city_shed_title2"),desc(){let e=t.tech.storage>=3?t.tech.storage>=4?z("city_shed_desc_size3"):z("city_shed_desc_size2"):z("city_shed_desc_size1");return z("city_shed_desc",[e])},reqs:{alpha:2},cost:{Money:e=>ec("warehouse",e,175e3,1.28,"interstellar"),Lumber:e=>ec("warehouse",e,1e5,1.28,"interstellar"),Aluminium:e=>ec("warehouse",e,12e4,1.28,"interstellar"),Cement:e=>ec("warehouse",e,45e3,1.28,"interstellar")},res(){let e=["Lumber","Stone","Chrysotile","Furs","Copper","Iron","Aluminium","Cement","Coal","Nano_Tube","Neutronium","Adamantite","Infernite"];return t.tech.storage>=3&&t.resource.Steel.display&&e.push("Steel"),t.tech.storage>=4&&t.resource.Titanium.display&&e.push("Titanium"),e},val(e){switch(e){case"Lumber":case"Stone":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 e='
          ',a=ns();for(const r of $(this)[0].res())t.resource[r].display&&(e+=`${z("plus_max_resource",[q(+(Nr($(this)[0].val(r))*a).toFixed(0),1),t.resource[r].name])}`);return e+="
          ",e},action(){if(Cs($(this)[0])){Dt("warehouse","interstellar");let e=ns();for(const a of $(this)[0].res())t.resource[a].display&&(t.resource[a].max+=Nr($(this)[0].val(a)*e));return!0}return!1}}},int_proxima:{info:{name:z("interstellar_proxima_name"),desc:()=>t.tech.proxima?z("interstellar_proxima_desc2"):z("interstellar_proxima_desc1")},proxima_mission:{id:"interstellar-proxima_mission",title:z("space_mission_title",[z("interstellar_proxima_name")]),desc:z("space_mission_desc",[z("interstellar_proxima_name")]),reqs:{alpha:1},grant:["proxima",1],queue_complete:()=>t.tech.proxima>=1?0:1,cost:{Helium_3:()=>+Xt(42e3).toFixed(0)},effect:z("interstellar_proxima_mission_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.xfer_station={count:0,on:0},Bi(z("interstellar_proxima_mission_result"),"info",!1,["progress"]),!0)}},xfer_station:{id:"interstellar-xfer_station",title:z("interstellar_xfer_station_title"),desc:()=>`
          ${z("interstellar_xfer_station_desc")}
          ${z("requires_power_combo",[t.resource.Uranium.name])}
          `,reqs:{proxima:1},cost:{Money:e=>ec("xfer_station",e,12e5,1.28,"interstellar"),Neutronium:e=>ec("xfer_station",e,1500,1.28,"interstellar"),Adamantite:e=>ec("xfer_station",e,6e3,1.28,"interstellar"),Polymer:e=>ec("xfer_station",e,12e3,1.28,"interstellar"),Wrought_Iron:e=>ec("xfer_station",e,3500,1.28,"interstellar")},effect(){let e=Nr(5e3),a=Nr(4e3),r=Nr(2500),s="";return t.resource.Deuterium.display&&(s=`
          ${z("plus_max_resource",[Nr(2e3),z("resource_Deuterium_name")])}
          `),`
          ${z("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
          ${z("plus_max_resource",[a,z("resource_Oil_name")])}
          ${z("plus_max_resource",[e,z("resource_Helium_3_name")])}
          ${z("plus_max_resource",[r,z("resource_Uranium_name")])}
          ${s}
          ${z("city_fission_power_effect",[.28])}
          ${z("minus_power",[$(this)[0].powered()])}
          `},support:()=>1,powered:()=>nc(1),powerBalancer:()=>[{s:t.interstellar.starport.s_max-t.interstellar.starport.support}],refresh:!0,action(){return!!Cs($(this)[0])&&(Dt("xfer_station","interstellar"),ks($(this)[0])&&(t.resource.Uranium.max+=Nr(2500),t.resource.Helium_3.max+=Nr(5e3),t.resource.Oil.max+=Nr(4e3),t.resource.Deuterium.max+=Nr(2e3)),1===t.tech.proxima&&(t.tech.proxima=2,t.interstellar.cargo_yard={count:0}),!0)}},cargo_yard:{id:"interstellar-cargo_yard",title:z("interstellar_cargo_yard_title"),desc:z("interstellar_cargo_yard_title"),reqs:{proxima:2},cost:{Money:e=>ec("cargo_yard",e,275e3,1.28,"interstellar"),Graphene:e=>ec("cargo_yard",e,7500,1.28,"interstellar"),Mythril:e=>ec("cargo_yard",e,6e3,1.28,"interstellar")},effect(){let e=Nr(200),a=Nr(150),r=`
          ${z("plus_max_resource",[50,z("resource_Crates_name")])}
          ${z("plus_max_resource",[50,z("resource_Containers_name")])}
          `;return r+=`
          ${z("plus_max_resource",[e,z("resource_Neutronium_name")])}
          ${z("plus_max_resource",[a,z("resource_Infernite_name")])}
          `,t.tech.storage>=7&&(r+=`
          ${z("interstellar_cargo_yard_effect",[+u.toFixed(3)])}
          `),r},action(){return!!Cs($(this)[0])&&(Dt("cargo_yard","interstellar"),!0)}},cruiser:{id:"interstellar-cruiser",title:z("interstellar_cruiser_title"),desc:z("interstellar_cruiser_title"),reqs:{cruiser:1},cost:{Money:e=>ec("cruiser",e,875e3,1.28,"interstellar"),Aluminium:e=>ec("cruiser",e,195e3,1.28,"interstellar"),Deuterium:e=>ec("cruiser",e,+Xt(1500).toFixed(0),1.28,"interstellar"),Neutronium:e=>ec("cruiser",e,2e3,1.28,"interstellar"),Aerogel:e=>ec("cruiser",e,250,1.28,"interstellar"),Horseshoe:()=>t.race.hooved?3:0},powered:()=>nc(1),effect(){let e=+Xt(6).toFixed(2);return`
          ${z("plus_max_soldiers",[ua(3)])}
          ${z("space_belt_station_effect3",[e])}
          `},action(){return!!Cs($(this)[0])&&(Dt("cruiser","interstellar"),t.interstellar.cruiser.on++,!0)}},dyson:{id:"interstellar-dyson",title:z("interstellar_dyson_title"),desc:e=>!t.interstellar.hasOwnProperty("dyson")||t.interstellar.dyson.count<100||e?`
          ${z("interstellar_dyson_title")}
          ${z("requires_segmemts",[100])}
          `:`
          ${z("interstellar_dyson_title")}
          `,reqs:{proxima:3},queue_size:10,queue_complete:()=>100-t.interstellar.dyson.count,condition:()=>!(t.interstellar.dyson.count>=100&&t.tech.dyson),cost:{Money:e=>(e||0)+(t.interstellar.hasOwnProperty("dyson")?t.interstellar.dyson.count:0)<100?25e4:0,Adamantite:e=>(e||0)+(t.interstellar.hasOwnProperty("dyson")?t.interstellar.dyson.count:0)<100?1e4:0,Infernite:e=>(e||0)+(t.interstellar.hasOwnProperty("dyson")?t.interstellar.dyson.count:0)<100?25:0,Stanene:e=>(e||0)+(t.interstellar.hasOwnProperty("dyson")?t.interstellar.dyson.count:0)<100?1e5:0},effect(e){let a=(e||0)+(t.interstellar.hasOwnProperty("dyson")?t.interstellar.dyson.count:0);if(a<100){let e=a>0?`
          ${z("space_dwarf_reactor_effect1",[oc(1.25*a)])}
          `:"",t=100-a;return`
          ${z("interstellar_dyson_effect")}
          ${e}
          ${z("space_dwarf_collider_effect2",[t])}
          `}return z("interstellar_dyson_complete",[oc(175)])},action(){return!!(Cs($(this)[0])&&t.interstellar.dyson.count<100)&&(Dt("dyson","interstellar"),t.interstellar.dyson.count>=100&&gs(),!0)}},dyson_sphere:{id:"interstellar-dyson_sphere",title:z("interstellar_dyson_sphere_title"),desc:e=>!t.interstellar.hasOwnProperty("dyson_sphere")||t.interstellar.dyson_sphere.count<100||e?`
          ${z("interstellar_dyson_sphere_title")}
          ${z("requires_segmemts",[100])}
          `:`
          ${z("interstellar_dyson_sphere_title")}
          `,reqs:{proxima:3,dyson:1},queue_size:10,queue_complete:()=>100-t.interstellar.dyson_sphere.count,condition:()=>!!(t.interstellar.dyson.count>=100&&t.tech.dyson&&1===t.tech.dyson),cost:{Money:e=>(e||0)+(t.interstellar.hasOwnProperty("dyson_sphere")?t.interstellar.dyson_sphere.count:0)<100?5e6:0,Bolognium:e=>(e||0)+(t.interstellar.hasOwnProperty("dyson_sphere")?t.interstellar.dyson_sphere.count:0)<100?25e3:0,Vitreloy:e=>(e||0)+(t.interstellar.hasOwnProperty("dyson_sphere")?t.interstellar.dyson_sphere.count:0)<100?1250:0,Aerogel:e=>(e||0)+(t.interstellar.hasOwnProperty("dyson_sphere")?t.interstellar.dyson_sphere.count:0)<100?75e3:0},effect(e){let a=(e||0)+(t.interstellar.hasOwnProperty("dyson_sphere")?t.interstellar.dyson_sphere.count:0);if(a<100){let e=175+5*a,t=100-a;return`
          ${z("interstellar_dyson_sphere_effect")}
          ${z("space_dwarf_reactor_effect1",[oc(e)])}
          ${z("space_dwarf_collider_effect2",[t])}
          `}return z("interstellar_dyson_sphere_complete",[oc(750)])},action(){return!!(Cs($(this)[0])&&t.interstellar.dyson_sphere.count<100)&&(Dt("dyson_sphere","interstellar"),t.interstellar.dyson_sphere.count>=100&&gs(),!0)}},orichalcum_sphere:{id:"interstellar-orichalcum_sphere",title:z("interstellar_dyson_sphere_title"),desc:e=>!t.interstellar.hasOwnProperty("orichalcum_sphere")||t.interstellar.orichalcum_sphere.count<100||e?`
          ${z("interstellar_orichalcum_sphere_desc")}
          ${z("requires_segmemts",[100])}
          `:`
          ${z("interstellar_orichalcum_sphere_desc")}
          `,reqs:{proxima:3,dyson:2},queue_size:10,queue_complete:()=>100-t.interstellar.orichalcum_sphere.count,condition:()=>!!(t.interstellar.dyson_sphere.count>=100&&t.tech.dyson&&2===t.tech.dyson),cost:{Money:e=>(e||0)+(t.interstellar.hasOwnProperty("orichalcum_sphere")?t.interstellar.orichalcum_sphere.count:0)<100?25e6:0,Orichalcum:e=>(e||0)+(t.interstellar.hasOwnProperty("orichalcum_sphere")?t.interstellar.orichalcum_sphere.count:0)<100?75e3:0},effect(e){let a=(e||0)+(t.interstellar.hasOwnProperty("orichalcum_sphere")?t.interstellar.orichalcum_sphere.count:0);if(a<100){let e=750+8*a,t=100-a;return`
          ${z("interstellar_orichalcum_sphere_effect")}
          ${z("space_dwarf_reactor_effect1",[oc(e)])}
          ${z("space_dwarf_collider_effect2",[t])}
          `}return z("interstellar_dyson_sphere_complete",[oc(1750)])},action(){return!!(Cs($(this)[0])&&t.interstellar.orichalcum_sphere.count<100)&&(Dt("orichalcum_sphere","interstellar"),t.interstellar.orichalcum_sphere.count>=100&&eo("blacken_the_sun"),!0)}}},int_nebula:{info:{name:z("interstellar_nebula_name"),desc:()=>t.tech.nebula?z("interstellar_nebula_desc2"):z("interstellar_nebula_desc1"),support:"nexus"},nebula_mission:{id:"interstellar-nebula_mission",title:z("space_mission_title",[z("interstellar_nebula_name")]),desc:z("space_mission_desc",[z("interstellar_nebula_name")]),reqs:{alpha:1},grant:["nebula",1],queue_complete:()=>t.tech.nebula>=1?0:1,cost:{Helium_3:()=>+Xt(55e3).toFixed(0)},effect:z("interstellar_nebula_mission_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("interstellar_nebula_mission_result"),"info",!1,["progress"]),!0)}},nexus:{id:"interstellar-nexus",title:z("interstellar_nexus_title"),desc:()=>`
          ${z("interstellar_nexus_title")}
          ${z("requires_power_combo",[t.resource.Money.name])}
          `,reqs:{nebula:1},cost:{Money:e=>ec("nexus",e,9e5,1.24,"interstellar"),Adamantite:e=>ec("nexus",e,7500,1.24,"interstellar"),Infernite:e=>ec("nexus",e,250,1.24,"interstellar"),Sheet_Metal:e=>ec("nexus",e,14e3,1.24,"interstellar"),Nano_Tube:e=>ec("nexus",e,17500,1.24,"interstellar")},effect(){let e=Nr(3500),t=Nr(4e3),a=Nr(3e3),r=Nr(25);return`
          ${z("interstellar_nexus_effect1",[$(this)[0].support()])}
          ${z("plus_max_resource",[e,z("resource_Oil_name")])}
          ${z("plus_max_resource",[t,z("resource_Helium_3_name")])}
          ${z("plus_max_resource",[a,z("resource_Deuterium_name")])}
          ${z("plus_max_resource",[r,z("resource_Elerium_name")])}
          ${z("interstellar_nexus_effect2",[$(this)[0].powered(),350])}
          `},support:()=>2,powered:()=>nc(8),powerBalancer:()=>[{s:t.interstellar.nexus.s_max-t.interstellar.nexus.support}],refresh:!0,action(){return!!Cs($(this)[0])&&(Dt("nexus","interstellar"),t.resource.Deuterium.display=!0,1===t.tech.nebula&&(t.interstellar.harvester={count:0,on:0},t.tech.nebula=2),ks($(this)[0])&&(t.resource.Oil.max+=Nr(2500),t.resource.Helium_3.max+=Nr(4e3),t.resource.Deuterium.max+=Nr(3e3),t.resource.Elerium.max+=Nr(25)),!0)}},harvester:{id:"interstellar-harvester",title:z("interstellar_harvester_title"),desc:`
          ${z("interstellar_harvester_title")}
          ${z("space_support",[z("interstellar_nebula_name")])}
          `,reqs:{nebula:2},cost:{Money:e=>ec("harvester",e,65e4,1.28,"interstellar"),Copper:e=>ec("harvester",e,8e4,1.28,"interstellar"),Alloy:e=>ec("harvester",e,45e3,1.28,"interstellar"),Iridium:e=>ec("harvester",e,8e3,1.28,"interstellar")},effect(){let e=+Oe("harvester","helium").toFixed(3),a=+Oe("harvester","deuterium").toFixed(3),r=t.tech.ram_scoop?`
          ${z("interstellar_harvester_effect",[a])}
          `:"";return`
          ${z("space_used_support",[z("interstellar_nebula_name")])}
          ${z("space_gas_mining_effect1",[e])}
          ${r}`},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("harvester","interstellar"),t.interstellar.nexus.support${z("interstellar_elerium_prospector_title")}
          ${z("space_support",[z("interstellar_nebula_name")])}
          `,reqs:{nebula:3},cost:{Money:e=>ec("elerium_prospector",e,825e3,1.28,"interstellar"),Steel:e=>ec("elerium_prospector",e,18e3,1.28,"interstellar"),Polymer:e=>ec("elerium_prospector",e,22e3,1.28,"interstellar"),Graphene:e=>ec("elerium_prospector",e,82e3,1.28,"interstellar"),Stanene:e=>ec("elerium_prospector",e,57e3,1.28,"interstellar")},effect(){let e=+Oe("elerium_prospector").toFixed(3);return`
          ${z("space_used_support",[z("interstellar_nebula_name")])}
          ${z("space_belt_elerium_ship_effect2",[e])}
          `},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("elerium_prospector","interstellar"),t.interstellar.nexus.supportt.tech.neutron?z("interstellar_neutron_desc2",[_i[t.race.species].home]):z("interstellar_neutron_desc1")},neutron_mission:{id:"interstellar-neutron_mission",title:z("space_mission_title",[z("interstellar_neutron_name")]),desc:z("space_mission_desc",[z("interstellar_neutron_name")]),reqs:{nebula:1,high_tech:14},grant:["neutron",1],queue_complete:()=>t.tech.neutron>=1?0:1,cost:{Helium_3:()=>+Xt(6e4).toFixed(0),Deuterium:()=>+Xt(1e4).toFixed(0)},effect:z("interstellar_neutron_mission_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.neutron_miner={count:0,on:0},Bi(z("interstellar_neutron_mission_result"),"info",!1,["progress"]),!0)}},neutron_miner:{id:"interstellar-neutron_miner",title:z("interstellar_neutron_miner_title"),desc:()=>`
          ${z("interstellar_neutron_miner_desc")}
          ${z("requires_power_combo",[t.resource.Helium_3.name])}
          `,reqs:{neutron:1},cost:{Money:e=>ec("neutron_miner",e,1e6,1.32,"interstellar"),Titanium:e=>ec("neutron_miner",e,45e3,1.32,"interstellar"),Stanene:e=>ec("neutron_miner",e,88e3,1.32,"interstellar"),Elerium:e=>ec("neutron_miner",e,20,1.32,"interstellar"),Aerogel:e=>ec("neutron_miner",e,50,1.32,"interstellar")},effect(){let e=+Oe("neutron_miner").toFixed(3),t=Nr(500),a=+Xt(3).toFixed(2);return`
          ${z("space_gas_moon_outpost_effect1",[e])}
          ${z("plus_max_resource",[t,z("resource_Neutronium_name")])}
          ${z("interstellar_alpha_starport_effect2",[a,$(this)[0].powered()])}
          `},powered:()=>nc(6),powerBalancer:()=>[{r:"Neutronium",k:"lpmod"}],action(){return!!Cs($(this)[0])&&(Dt("neutron_miner","interstellar"),ks($(this)[0]),!0)}},citadel:{id:"interstellar-citadel",title:z("interstellar_citadel_title"),desc:`
          ${z("interstellar_citadel_desc")}
          ${z("requires_power")}
          `,reqs:{neutron:1,high_tech:15},cost:{Money:e=>ec("citadel",e,5e6,1.25,"interstellar"),Knowledge:e=>ec("citadel",e,15e5,1.15,"interstellar"),Graphene:e=>ec("citadel",e,5e4,1.25,"interstellar"),Stanene:e=>ec("citadel",e,1e5,1.25,"interstellar"),Elerium:e=>ec("citadel",e,250,1.25,"interstellar"),Soul_Gem:e=>ec("citadel",e,1,1.25,"interstellar")},wide:!0,effect(){let e=`
          ${z("interstellar_citadel_stat",[+u.toFixed(1)])}
          ${z("interstellar_citadel_effect",[5])}
          `;if(t.tech.ai_core){let a=+(u/1.75).toFixed(1);t.race.flier||(e+=`
          ${z("interstellar_citadel_effect2",[a])}
          `),t.tech.ai_core>=2&&(e+=`
          ${z("interstellar_citadel_effect3",[2])}
          `),t.tech.ai_core>=3&&(e+=`
          ${z("interstellar_citadel_effect4",[+(u/5).toFixed(1)])}
          `)}return`${e}
          ${z("interstellar_citadel_power",[$(this)[0].powered(),nc(2.5)])}
          `},powered:()=>i.citadel&&i.citadel>1?nc(30+2.5*(i.citadel-1)):nc(30),action(){return!!Cs($(this)[0])&&(Dt("citadel","interstellar"),ks($(this)[0]),!0)},flair:()=>z("interstellar_citadel_flair")},stellar_forge:{id:"interstellar-stellar_forge",title:z("interstellar_stellar_forge_title"),desc:`
          ${z("interstellar_stellar_forge_title")}
          ${z("requires_power")}
          `,reqs:{star_forge:1},cost:{Money:e=>ec("stellar_forge",e,12e5,1.25,"interstellar"),Iridium:e=>ec("stellar_forge",e,25e4,1.25,"interstellar"),Bolognium:e=>ec("stellar_forge",e,35e3,1.25,"interstellar"),Aerogel:e=>ec("stellar_forge",e,75e3,1.25,"interstellar")},effect(){let e=`
          ${z("city_foundry_effect1",[ua(2)])}
          ${z("interstellar_stellar_forge_effect",[10])}
          ${z("interstellar_stellar_forge_effect2",[5])}
          `;return t.tech.star_forge&&t.tech.star_forge>=2&&(e+=`
          ${z("interstellar_stellar_forge_effect3",[2])}
          `),`${e}
          ${z("minus_power",[$(this)[0].powered()])}
          `},powered:()=>nc(3),special:!0,action(){return!!Cs($(this)[0])&&(Dt("stellar_forge","interstellar"),ks($(this)[0])&&t.tech.star_forge>=2&&(t.city.smelter.cap+=2,t.city.smelter.Star+=2,t.city.smelter.StarCap+=2,t.city.smelter.Iron+=2),!0)},flair:()=>z("interstellar_stellar_forge_flair")}},int_blackhole:{info:{name:z("interstellar_blackhole_name"),desc(){let e=_i[t.race.species].home;if(t.tech.blackhole>=5){let a=+t.interstellar.stellar_engine.mass.toFixed(10),r=+t.interstellar.stellar_engine.exotic.toFixed(10);if(t.tech.roid_eject&&(a+=.225*t.tech.roid_eject*(1+t.tech.roid_eject/12)),t.tech.whitehole){let s=gc("bigbang"),i="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name");return`
          ${z("interstellar_blackhole_desc4",[e,a,r])}
          ${z("interstellar_blackhole_desc5",[s.plasmid,s.phage,s.dark,i])}
          `}return t.interstellar.stellar_engine.exotic>0?z("interstellar_blackhole_desc4",[e,a,r]):z("interstellar_blackhole_desc3",[e,a])}return t.tech.blackhole?z("interstellar_blackhole_desc2",[e]):z("interstellar_blackhole_desc1",[e])}},blackhole_mission:{id:"interstellar-blackhole_mission",title:z("space_mission_title",[z("interstellar_blackhole_name")]),desc:z("space_mission_desc",[z("interstellar_blackhole_name")]),reqs:{nebula:1},grant:["blackhole",1],queue_complete:()=>t.tech.blackhole>=1?0:1,cost:{Helium_3:()=>+Xt(75e3).toFixed(0),Deuterium:()=>+Xt(25e3).toFixed(0)},effect:z("interstellar_blackhole_mission_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.far_reach={count:0,on:0},Bi(z("interstellar_blackhole_mission_result"),"info",!1,["progress"]),!0)}},far_reach:{id:"interstellar-far_reach",title:z("interstellar_far_reach"),desc:`
          ${z("interstellar_far_reach_desc")}
          ${z("requires_power")}
          `,reqs:{blackhole:1},cost:{Money:e=>ec("far_reach",e,1e6,1.32,"interstellar"),Knowledge:e=>ec("far_reach",e,1e5,1.32,"interstellar"),Neutronium:e=>ec("far_reach",e,2500,1.32,"interstellar"),Elerium:e=>ec("far_reach",e,100,1.32,"interstellar"),Aerogel:e=>ec("far_reach",e,1e3,1.32,"interstellar")},effect(){return`
          ${z("interstellar_far_reach_effect",[1])}
          ${z("minus_power",[$(this)[0].powered()])}
          `},powered:()=>nc(5),action(){return!!Cs($(this)[0])&&(Dt("far_reach","interstellar"),ks($(this)[0]),1===t.tech.blackhole&&(t.tech.blackhole=2,gs()),!0)},flair:z("interstellar_far_reach_flair")},stellar_engine:{id:"interstellar-stellar_engine",title:z("interstellar_stellar_engine"),desc:e=>!t.interstellar.hasOwnProperty("stellar_engine")||t.interstellar.stellar_engine.count<100||e?`
          ${z("interstellar_stellar_engine")}
          ${z("requires_segmemts",[100])}
          `:`
          ${z("interstellar_stellar_engine")}
          `,reqs:{blackhole:3},queue_size:10,queue_complete:()=>100-t.interstellar.stellar_engine.count,cost:{Money:e=>(e||0)+(t.interstellar.hasOwnProperty("stellar_engine")?t.interstellar.stellar_engine.count:0)<100?5e5:0,Neutronium:e=>(e||0)+(t.interstellar.hasOwnProperty("stellar_engine")?t.interstellar.stellar_engine.count:0)<100?450:0,Adamantite:e=>(e||0)+(t.interstellar.hasOwnProperty("stellar_engine")?t.interstellar.stellar_engine.count:0)<100?17500:0,Infernite:e=>(e||0)+(t.interstellar.hasOwnProperty("stellar_engine")?t.interstellar.stellar_engine.count:0)<100?225:0,Graphene:e=>(e||0)+(t.interstellar.hasOwnProperty("stellar_engine")?t.interstellar.stellar_engine.count:0)<100?45e3:0,Mythril:e=>(e||0)+(t.interstellar.hasOwnProperty("stellar_engine")?t.interstellar.stellar_engine.count:0)<100?250:0,Aerogel:e=>(e||0)+(t.interstellar.hasOwnProperty("stellar_engine")?t.interstellar.stellar_engine.count:0)<100?75:0},effect(e){let a=(e||0)+(t.interstellar.hasOwnProperty("stellar_engine")?t.interstellar.stellar_engine.count:0);if(a<100){let e=100-a;return`
          ${z("interstellar_stellar_engine_effect")}
          ${z("space_dwarf_collider_effect2",[e])}
          `}{let e=t.tech.gravity&&t.tech.gravity>=2?13.5:7.5,a=t.interstellar.stellar_engine?t.interstellar.stellar_engine.mass:8;t.tech.roid_eject&&(a+=.225*t.tech.roid_eject*(1+t.tech.roid_eject/12));let r=oc(+(20+(a-8)*e+(t.interstellar.stellar_engine?t.interstellar.stellar_engine.exotic:0)*e*10).toFixed(2));if(t.tech.blackhole>=5){let e=+t.interstellar.stellar_engine.exotic.toFixed(10),s=t.interstellar.stellar_engine.exotic>0?z("interstellar_stellar_engine_effect3",[a,e]):z("interstellar_stellar_engine_effect2",[a]);return`
          ${z("interstellar_stellar_engine_complete",[r])}
          ${s}
          `}return z("interstellar_stellar_engine_complete",[r])}},action(){return!!(Cs($(this)[0])&&t.interstellar.stellar_engine.count<100)&&(Dt("stellar_engine","interstellar"),t.interstellar.stellar_engine.count>=100&&3===t.tech.blackhole&&(t.tech.blackhole=4,gs()),!0)}},mass_ejector:{id:"interstellar-mass_ejector",title:z("interstellar_mass_ejector"),desc:`
          ${z("interstellar_mass_ejector")}
          ${z("requires_power")}
          `,reqs:{blackhole:5},cost:{Money:e=>ec("mass_ejector",e,75e4,1.25,"interstellar"),Adamantite:e=>ec("mass_ejector",e,125e3,1.25,"interstellar"),Infernite:e=>ec("mass_ejector",e,275,1.25,"interstellar"),Elerium:e=>ec("mass_ejector",e,100,1.25,"interstellar"),Mythril:e=>ec("mass_ejector",e,1e4,1.25,"interstellar")},effect(){return`
          ${z("interstellar_mass_ejector_effect")}, ${z("minus_power",[$(this)[0].powered()])}
          `},powered:()=>nc(3),special:!0,sAction(){t.settings.civTabs=4,t.settings.marketTabs=2,t.settings.tabLoad||(jt("mTabResource"),Ii("interstellar-mass_ejector"))},action(){return!!Cs($(this)[0])&&(0===t.interstellar.mass_ejector.count&&Bi(z("interstellar_mass_ejector_msg"),"info",!1,["progress"]),t.settings.showEjector=!0,Dt("mass_ejector","interstellar"),ks($(this)[0]),sc($("#resources")),sr(),!0)},flair:()=>z("interstellar_mass_ejector_flair")},jump_ship:{id:"interstellar-jump_ship",title:z("interstellar_jump_ship"),desc:z("interstellar_jump_ship_desc"),reqs:{stargate:1},grant:["stargate",2],queue_complete:()=>t.tech.stargate>=2?0:1,cost:{Money:()=>2e7,Copper:()=>24e5,Aluminium:()=>4e6,Titanium:()=>125e4,Adamantite:()=>75e4,Stanene:()=>9e5,Aerogel:()=>1e5},effect:z("interstellar_jump_ship_effect"),action(){return!!Cs($(this)[0])}},wormhole_mission:{id:"interstellar-wormhole_mission",title:z("space_mission_title",[z("interstellar_wormhole_name")]),desc:z("space_mission_desc",[z("interstellar_wormhole_name")]),reqs:{stargate:2},grant:["stargate",3],queue_complete:()=>t.tech.stargate>=3?0:1,cost:{Helium_3:()=>+Xt(15e4).toFixed(0),Deuterium:()=>+Xt(75e3).toFixed(0)},effect:z("interstellar_wormhole_mission_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.stargate={count:0},t.galaxy.gateway_station={count:0,on:0},Bi(z("interstellar_wormhole_mission_result"),"info",!1,["progress"]),!0)}},stargate:{id:"interstellar-stargate",title:z("interstellar_stargate"),desc:e=>!t.interstellar.hasOwnProperty("stargate")||t.interstellar.stargate.count<200||e?`
          ${z("interstellar_stargate")}
          ${z("requires_segmemts",[200])}
          `+(t.interstellar.hasOwnProperty("stargate")&&t.interstellar.stargate.count>=200?`
          ${z("requires_power")}
          `:""):`
          ${z("interstellar_stargate")}
          `,reqs:{stargate:3},condition:()=>!(t.interstellar.stargate.count>=200),queue_size:10,queue_complete:()=>200-t.interstellar.stargate.count,cost:{Money:e=>(e||0)+(t.interstellar.hasOwnProperty("stargate")?t.interstellar.stargate.count:0)<200?1e6:0,Neutronium:e=>(e||0)+(t.interstellar.hasOwnProperty("stargate")?t.interstellar.stargate.count:0)<200?4800:0,Infernite:e=>(e||0)+(t.interstellar.hasOwnProperty("stargate")?t.interstellar.stargate.count:0)<200?666:0,Elerium:e=>(e||0)+(t.interstellar.hasOwnProperty("stargate")?t.interstellar.stargate.count:0)<200?75:0,Nano_Tube:e=>(e||0)+(t.interstellar.hasOwnProperty("stargate")?t.interstellar.stargate.count:0)<200?12e3:0,Stanene:e=>(e||0)+(t.interstellar.hasOwnProperty("stargate")?t.interstellar.stargate.count:0)<200?6e4:0,Mythril:e=>(e||0)+(t.interstellar.hasOwnProperty("stargate")?t.interstellar.stargate.count:0)<200?3200:0},effect(e){let a=(e||0)+(t.interstellar.hasOwnProperty("stargate")?t.interstellar.stargate.count:0);if(a<200){let e=200-a;return`
          ${z("interstellar_stargate_effect")}
          ${z("space_dwarf_collider_effect2",[e])}
          `}return Ft.int_blackhole.s_gate.effect()},action(){return!!(Cs($(this)[0])&&t.interstellar.stargate.count<200)&&(Dt("stargate","interstellar"),t.interstellar.stargate.count>=200&&(t.tech.stargate=4,t.interstellar.s_gate={count:1,on:0},t.city.power>=Ft.int_blackhole.s_gate.powered()&&t.interstellar.s_gate.on++,Wt(),Ii()),!0)}},s_gate:{id:"interstellar-s_gate",title:z("interstellar_stargate"),desc:()=>`
          ${z("interstellar_stargate")}
          ${z("requires_power")}
          `,reqs:{stargate:4},condition:()=>t.interstellar.stargate.count>=200,wiki:!1,queue_complete:()=>0,cost:{},powered:()=>nc(250),effect(){return`
          ${z("interstellar_s_gate_effect")}
          ${z("minus_power",[$(this)[0].powered()])}
          `},action:()=>!1}},int_sirius:{info:{name:()=>t.tech.ascension>=3?z("interstellar_sirius_b_name"):z("interstellar_sirius_name"),desc:()=>t.tech.ascension>=3?z("interstellar_sirius_b_desc"):z("interstellar_sirius_desc",[_i[t.race.species].home])},sirius_mission:{id:"interstellar-sirius_mission",title:z("space_mission_title",[z("interstellar_sirius_name")]),desc:z("space_mission_desc",[z("interstellar_sirius_name")]),reqs:{ascension:2},grant:["ascension",3],queue_complete:()=>t.tech.ascension>=3?0:1,cost:{Helium_3:()=>+Xt(48e4).toFixed(0),Deuterium:()=>+Xt(225e3).toFixed(0)},effect:()=>z("interstellar_sirius_mission_effect",[Tc("name"),_i[t.race.species].home]),action(){return!!Cs($(this)[0])}},sirius_b:{id:"interstellar-sirius_b",title:z("interstellar_sirius_b"),desc:z("interstellar_sirius_b"),reqs:{ascension:3},grant:["ascension",4],queue_complete:()=>t.tech.ascension>=4?0:1,cost:{Knowledge:()=>2e7},effect:()=>z("interstellar_sirius_b_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.space_elevator={count:0},!0)}},space_elevator:{id:"interstellar-space_elevator",title:z("interstellar_space_elevator"),desc:e=>!t.interstellar.hasOwnProperty("space_elevator")||t.interstellar.space_elevator.count<100||e?`
          ${z("interstellar_space_elevator")}
          ${z("requires_segmemts",[100])}
          `:`
          ${z("interstellar_space_elevator")}
          `,reqs:{ascension:4},condition:()=>!(t.interstellar.space_elevator.count>=100),queue_size:5,queue_complete:()=>100-t.interstellar.space_elevator.count,cost:{Money:e=>(e||0)+(t.interstellar.hasOwnProperty("space_elevator")?t.interstellar.space_elevator.count:0)<100?2e7:0,Nano_Tube:e=>(e||0)+(t.interstellar.hasOwnProperty("space_elevator")?t.interstellar.space_elevator.count:0)<100?5e5:0,Bolognium:e=>(e||0)+(t.interstellar.hasOwnProperty("space_elevator")?t.interstellar.space_elevator.count:0)<100?1e5:0,Mythril:e=>(e||0)+(t.interstellar.hasOwnProperty("space_elevator")?t.interstellar.space_elevator.count:0)<100?125e3:0},effect(e){let a=`
          ${z("interstellar_space_elevator_effect")}
          `,r=(e||0)+(t.interstellar.hasOwnProperty("space_elevator")?t.interstellar.space_elevator.count:0);return r<100&&(a+=`
          ${z("space_dwarf_collider_effect2",[100-r])}
          `),a},action(){return!!(Cs($(this)[0])&&t.interstellar.space_elevator.count<100)&&(Dt("space_elevator","interstellar"),t.interstellar.space_elevator.count>=100&&(t.tech.ascension=5,t.interstellar.gravity_dome={count:0},Wt(),Ii()),!0)}},gravity_dome:{id:"interstellar-gravity_dome",title:z("interstellar_gravity_dome"),desc:e=>!t.interstellar.hasOwnProperty("gravity_dome")||t.interstellar.gravity_dome.count<100||e?`
          ${z("interstellar_gravity_dome")}
          ${z("requires_segmemts",[100])}
          `:`
          ${z("interstellar_gravity_dome")}
          `,reqs:{ascension:5},condition:()=>!(t.interstellar.gravity_dome.count>=100),queue_size:5,queue_complete:()=>100-t.interstellar.gravity_dome.count,cost:{Money:e=>(e||0)+(t.interstellar.hasOwnProperty("gravity_dome")?t.interstellar.gravity_dome.count:0)<100?35e6:0,Cement:e=>(e||0)+(t.interstellar.hasOwnProperty("gravity_dome")?t.interstellar.gravity_dome.count:0)<100?125e4:0,Adamantite:e=>(e||0)+(t.interstellar.hasOwnProperty("gravity_dome")?t.interstellar.gravity_dome.count:0)<100?65e4:0,Aerogel:e=>(e||0)+(t.interstellar.hasOwnProperty("gravity_dome")?t.interstellar.gravity_dome.count:0)<100?18e4:0},effect(e){let a=`
          ${z("interstellar_gravity_dome_effect",[_i[t.race.species].home])}
          `,r=(e||0)+(t.interstellar.hasOwnProperty("gravity_dome")?t.interstellar.gravity_dome.count:0);return r<100&&(a+=`
          ${z("space_dwarf_collider_effect2",[100-r])}
          `),a},action(){return!!(Cs($(this)[0])&&t.interstellar.gravity_dome.count<100)&&(Dt("gravity_dome","interstellar"),t.interstellar.gravity_dome.count>=100&&(t.tech.ascension=6,t.interstellar.ascension_machine={count:0},t.interstellar.thermal_collector={count:0},Wt(),Ii()),!0)}},ascension_machine:{id:"interstellar-ascension_machine",title:z("interstellar_ascension_machine"),desc:e=>!t.interstellar.hasOwnProperty("ascension_machine")||t.interstellar.ascension_machine.count<100||e?`
          ${z("interstellar_ascension_machine")}
          ${z("requires_segmemts",[100])}
          `+(t.interstellar.hasOwnProperty("ascension_machine")&&t.interstellar.ascension_machine.count>=100?`
          ${z("requires_power")}
          `:""):`
          ${z("interstellar_ascension_machine")}
          `,reqs:{ascension:6},condition:()=>!(t.interstellar.ascension_machine.count>=100),queue_size:5,queue_complete:()=>100-t.interstellar.ascension_machine.count,cost:{Money:e=>(e||0)+(t.interstellar.hasOwnProperty("ascension_machine")?t.interstellar.ascension_machine.count:0)<100?75e6:0,Alloy:e=>(e||0)+(t.interstellar.hasOwnProperty("ascension_machine")?t.interstellar.ascension_machine.count:0)<100?75e4:0,Neutronium:e=>(e||0)+(t.interstellar.hasOwnProperty("ascension_machine")?t.interstellar.ascension_machine.count:0)<100?125e3:0,Elerium:e=>(e||0)+(t.interstellar.hasOwnProperty("ascension_machine")?t.interstellar.ascension_machine.count:0)<100?1e3:0,Orichalcum:e=>(e||0)+(t.interstellar.hasOwnProperty("ascension_machine")?t.interstellar.ascension_machine.count:0)<100?25e4:0,Nanoweave:e=>(e||0)+(t.interstellar.hasOwnProperty("ascension_machine")?t.interstellar.ascension_machine.count:0)<100?75e3:0},effect(e){let a=(e||0)+(t.interstellar.hasOwnProperty("ascension_machine")?t.interstellar.ascension_machine.count:0);if(a<100){let e=100-a;return`
          ${z("interstellar_ascension_machine_effect",[Tc("name")])}
          ${z("space_dwarf_collider_effect2",[e])}
          `}return Ft.int_sirius.ascension_trigger.effect()},action(){return!!(Cs($(this)[0])&&t.interstellar.ascension_machine.count<100)&&(Dt("ascension_machine","interstellar"),t.interstellar.ascension_machine.count>=100&&(t.tech.ascension=7,t.interstellar.ascension_trigger={count:1,on:0},Wt(),Ii()),!0)}},ascension_trigger:{id:"interstellar-ascension_trigger",title:z("interstellar_ascension_machine"),desc:()=>`
          ${z("interstellar_ascension_machine")}
          ${z("requires_power")}
          `,wiki:!1,reqs:{ascension:7},condition:()=>t.interstellar.ascension_machine.count>=100,queue_complete:()=>0,cost:{},powered(){let e=100;if(t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=2){e+=t.stats.achieve.technophobe.l>=4?25:10;for(let a=1;a=5&&(e+=5)}let a=Math.round(nc(1e4)-e*(t.interstellar.hasOwnProperty("thermal_collector")?t.interstellar.thermal_collector.count:0));return a<0&&(a=0),a},postPower(e){e?setTimeout((function(){t.tech.ascension=i.ascension_trigger?8:7,Wt()}),250):(t.tech.ascension=7,Wt())},effect(){let e=zt(),t=$(this)[0].powered(),a=t>0?`
          ${z("minus_power",[t])}
          `:"";return`
          ${z("interstellar_ascension_trigger_effect")}
          ${e}${a}`},action:()=>!1},ascend:{id:"interstellar-ascend",title:z("interstellar_ascend"),desc:z("interstellar_ascend"),reqs:{ascension:8},queue_complete:()=>0,no_multi:!0,cost:{},effect(){let e=zt();return`
          ${z("interstellar_ascend_effect")}
          ${e}`},action(){return!!Cs($(this)[0])&&(sa(),!0)}},thermal_collector:{id:"interstellar-thermal_collector",title:z("interstellar_thermal_collector"),desc:z("interstellar_thermal_collector"),reqs:{ascension:6},cost:{Money:e=>ec("thermal_collector",e,5e6,1.08,"interstellar"),Infernite:e=>ec("thermal_collector",e,25e3,1.08,"interstellar"),Stanene:e=>ec("thermal_collector",e,1e6,1.08,"interstellar"),Vitreloy:e=>ec("thermal_collector",e,1e5,1.08,"interstellar")},effect(){let e=100;if(t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=2){e+=t.stats.achieve.technophobe.l>=4?25:10;for(let a=1;a=5&&(e+=5)}return z("interstellar_thermal_collector_effect",[e])},action(){return!!Cs($(this)[0])&&(Dt("thermal_collector","interstellar"),!0)}}}};function zt(){let e=gc("ascend"),a="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name");return`
          ${z("interstellar_ascension_trigger_effect2",[e.plasmid,a])}
          ${z("interstellar_ascension_trigger_effect2",[e.phage,z("resource_Phage_name")])}
          ${z("interstellar_ascension_trigger_effect2",[e.harmony,z("resource_Harmony_name")])}
          ${z("interstellar_ascension_trigger_effect3")}
          `}function At(){let e=gc("terraform"),a="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name");return`
          ${z("interstellar_ascension_trigger_effect2",[e.plasmid,a])}
          ${z("interstellar_ascension_trigger_effect2",[e.phage,z("resource_Phage_name")])}
          ${z("interstellar_ascension_trigger_effect2",[e.harmony,z("resource_Harmony_name")])}
          ${z("space_terraformer_effect3")}
          `}const Tt={gxy_gateway:{info:{name:z("galaxy_gateway"),desc:()=>z("galaxy_gateway_desc"),control:()=>({name:Tc("name"),color:"success"}),support:"starbase"},gateway_mission:{id:"galaxy-gateway_mission",title:z("galaxy_gateway_mission"),desc:z("galaxy_gateway_mission"),reqs:{gateway:1},grant:["gateway",2],queue_complete:()=>t.tech.gateway>=2?0:1,cost:{Helium_3:()=>+Xt(212e3).toFixed(0),Deuterium:()=>+Xt(11e4).toFixed(0)},effect:z("galaxy_gateway_mission_effect"),action(){return!!Cs($(this)[0])&&(Kt(),t.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)}},starbase:{id:"galaxy-starbase",title:z("galaxy_starbase"),desc:()=>`
          ${z("galaxy_starbase")}
          ${z("requires_power_space",[t.resource.Food.name])}
          `,reqs:{gateway:2},cost:{Money:e=>ec("starbase",e,42e5,1.25,"galaxy"),Elerium:e=>ec("starbase",e,1e3,1.25,"galaxy"),Mythril:e=>ec("starbase",e,9e4,1.25,"galaxy"),Graphene:e=>ec("starbase",e,32e4,1.25,"galaxy"),Horseshoe:()=>t.race.hooved?5:0},effect(){let e=+Xt(25).toFixed(2),a=t.tech.marines>=2?ua(8):ua(5);return`
          ${z("galaxy_defense_platform_effect",[25])}
          ${z("galaxy_gateway_support",[$(this)[0].support()])}
          ${z("plus_max_soldiers",[a])}
          ${z("interstellar_alpha_starport_effect2",[e,$(this)[0].powered()])}
          ${z("interstellar_alpha_starport_effect3",[250,t.resource.Food.name])}
          `},support:()=>2,powered:()=>nc(i.s_gate?12:0),powerBalancer:()=>[{s:t.galaxy.starbase.s_max-t.galaxy.starbase.support}],refresh:!0,action(){return!!Cs($(this)[0])&&(Dt("starbase","galaxy"),ks($(this)[0]),2===t.tech.gateway&&(t.galaxy.bolognium_ship={count:0,on:0,crew:0},t.tech.gateway=3),!0)}},ship_dock:{id:"galaxy-ship_dock",title:z("galaxy_ship_dock"),desc:`
          ${z("galaxy_ship_dock")}
          ${z("requires_power")}
          `,reqs:{gateway:4},cost:{Money:e=>ec("ship_dock",e,36e5,1.25,"galaxy"),Steel:e=>ec("ship_dock",e,88e4,1.25,"galaxy"),Aluminium:e=>ec("ship_dock",e,12e5,1.25,"galaxy"),Bolognium:e=>ec("ship_dock",e,75e3,1.25,"galaxy")},effect(){return`
          ${z("galaxy_ship_dock_effect",[.25])}
          ${z("minus_power",[$(this)[0].powered()])}
          `},support:()=>i.starbase?.25*i.starbase:0,powered:()=>nc(i.s_gate?4:0),powerBalancer:()=>[{s:t.galaxy.starbase.s_max-t.galaxy.starbase.support}],action(){return!!Cs($(this)[0])&&(Dt("ship_dock","galaxy"),ks($(this)[0]),!0)}},bolognium_ship:{id:"galaxy-bolognium_ship",title:z("galaxy_bolognium_ship"),desc:()=>`
          ${z("galaxy_bolognium_ship_desc")}
          ${z("galaxy_starbase_support",[z("resource_Helium_3_name")])}
          `,reqs:{gateway:3},cost:{Money:e=>ec("bolognium_ship",e,14e5,1.22,"galaxy"),Iron:e=>ec("bolognium_ship",e,56e4,1.22,"galaxy"),Infernite:e=>ec("bolognium_ship",e,1800,1.22,"galaxy"),Nano_Tube:e=>ec("bolognium_ship",e,475e3,1.22,"galaxy")},effect(){let e=+Oe("bolognium_ship").toFixed(3),a=+Xt($(this)[0].ship.helium).toFixed(2);return`
          ${z("gain",[e,z("resource_Bolognium_name")])}
          ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
          ${z("galaxy_gateway_used_support",[-$(this)[0].support()])}
          ${z("spend",[a,t.resource.Helium_3.name])}
          `},support:()=>-1,ship:{civ:()=>t.race.high_pop?2*di.high_pop.vars()[0]:2,mil:()=>0,helium:5},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("bolognium_ship","galaxy"),t.resource.Bolognium.display=!0,t.civic.crew.display=!0,t.galaxy.starbase.support`
          ${z("galaxy_scout_ship")}
          ${z("galaxy_starbase_support",[z("resource_Helium_3_name")])}
          `,reqs:{andromeda:1},cost:{Money:e=>ec("scout_ship",e,16e5,1.25,"galaxy"),Titanium:e=>ec("scout_ship",e,325e3,1.25,"galaxy"),Graphene:e=>ec("scout_ship",e,118e3,1.25,"galaxy"),Soul_Gem:e=>ec("scout_ship",e,1,1.02,"galaxy")},effect(){let e=+Xt($(this)[0].ship.helium).toFixed(2),a=t.tech.science>=17?`
          ${z("galaxy_scout_ship_effect2",[25])}
          `:"";return`
          ${z("galaxy_ship_rating",[$(this)[0].ship.rating()])}
          ${z("galaxy_scout_ship_effect")}
          ${a}
          ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
          ${z("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
          ${z("galaxy_gateway_used_support",[-$(this)[0].support()])}
          ${z("spend",[e,t.resource.Helium_3.name])}
          `},support:()=>-1,ship:{civ:()=>t.race.high_pop?1*di.high_pop.vars()[0]:1,mil:()=>t.race.high_pop?1*di.high_pop.vars()[0]:1,helium:6,rating:()=>t.race.banana?7:10},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("scout_ship","galaxy"),t.galaxy.defense.gxy_gateway.scout_ship++,t.galaxy.starbase.support`
          ${z("galaxy_corvette_ship")}
          ${z("galaxy_starbase_support",[z("resource_Helium_3_name")])}
          `,reqs:{andromeda:2},cost:{Money:e=>ec("corvette_ship",e,45e5,1.25,"galaxy"),Steel:e=>ec("corvette_ship",e,175e4,1.25,"galaxy"),Infernite:e=>ec("corvette_ship",e,16e3,1.25,"galaxy"),Bolognium:e=>ec("corvette_ship",e,35e3,1.25,"galaxy"),Soul_Gem:e=>ec("corvette_ship",e,1,1.25,"galaxy")},effect(){let e=+Xt($(this)[0].ship.helium).toFixed(2);return`
          ${z("galaxy_ship_rating",[$(this)[0].ship.rating()])}
          ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
          ${z("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
          ${z("galaxy_gateway_used_support",[-$(this)[0].support()])}
          ${z("spend",[e,t.resource.Helium_3.name])}
          `},support:()=>-1,ship:{civ:()=>t.race.high_pop?2*di.high_pop.vars()[0]:2,mil:()=>t.race.high_pop?3*di.high_pop.vars()[0]:3,helium:10,rating:()=>t.race.banana?21:30},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("corvette_ship","galaxy"),t.galaxy.defense.gxy_gateway.corvette_ship++,t.galaxy.starbase.support`
          ${z("galaxy_frigate_ship")}
          ${z("galaxy_starbase_support",[z("resource_Helium_3_name")])}
          `,reqs:{andromeda:3},cost:{Money:e=>ec("frigate_ship",e,18e6,1.25,"galaxy"),Elerium:e=>ec("frigate_ship",e,1250,1.25,"galaxy"),Mythril:e=>ec("frigate_ship",e,35e4,1.25,"galaxy"),Sheet_Metal:e=>ec("frigate_ship",e,8e5,1.25,"galaxy"),Soul_Gem:e=>ec("frigate_ship",e,2,1.25,"galaxy")},effect(){let e=+Xt($(this)[0].ship.helium).toFixed(2);return`
          ${z("galaxy_ship_rating",[$(this)[0].ship.rating()])}
          ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
          ${z("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
          ${z("galaxy_gateway_used_support",[-$(this)[0].support()])}
          ${z("spend",[e,t.resource.Helium_3.name])}
          `},support:()=>-2,ship:{civ:()=>t.race.high_pop?3*di.high_pop.vars()[0]:3,mil:()=>t.race.high_pop?5*di.high_pop.vars()[0]:5,helium:25,rating:()=>t.race.banana?56:80},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("frigate_ship","galaxy"),t.galaxy.defense.gxy_gateway.frigate_ship++,t.galaxy.starbase.support+1`
          ${z("galaxy_cruiser_ship")}
          ${z("galaxy_starbase_support",[z("resource_Deuterium_name")])}
          `,reqs:{andromeda:4},cost:{Money:e=>ec("cruiser_ship",e,75e6,1.25,"galaxy"),Copper:e=>ec("cruiser_ship",e,6e6,1.25,"galaxy"),Adamantite:e=>ec("cruiser_ship",e,1e6,1.25,"galaxy"),Vitreloy:e=>ec("cruiser_ship",e,75e4,1.25,"galaxy"),Elerium:e=>ec("cruiser_ship",e,1800,1.25,"galaxy"),Soul_Gem:e=>ec("cruiser_ship",e,5,1.25,"galaxy")},effect(){let e=+Xt($(this)[0].ship.deuterium).toFixed(2);return`
          ${z("galaxy_ship_rating",[$(this)[0].ship.rating()])}
          ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
          ${z("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
          ${z("galaxy_gateway_used_support",[-$(this)[0].support()])}
          ${z("spend",[e,t.resource.Deuterium.name])}
          `},support:()=>-3,ship:{civ:()=>t.race.high_pop?6*di.high_pop.vars()[0]:6,mil:()=>t.race.high_pop?10*di.high_pop.vars()[0]:10,deuterium:25,rating:()=>t.race.banana?175:250},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("cruiser_ship","galaxy"),t.galaxy.defense.gxy_gateway.cruiser_ship++,t.galaxy.starbase.support+2`
          ${z("galaxy_dreadnought")}
          ${z("galaxy_starbase_support",[z("resource_Deuterium_name")])}
          `,reqs:{andromeda:5},cost:{Money:e=>ec("dreadnought",e,225e6,1.25,"galaxy"),Neutronium:e=>ec("dreadnought",e,25e4,1.25,"galaxy"),Bolognium:e=>ec("dreadnought",e,15e5,1.25,"galaxy"),Vitreloy:e=>ec("dreadnought",e,1e6,1.25,"galaxy"),Infernite:e=>ec("dreadnought",e,4e5,1.25,"galaxy"),Aerogel:e=>ec("dreadnought",e,8e5,1.25,"galaxy"),Soul_Gem:e=>ec("dreadnought",e,25,1.25,"galaxy")},effect(){let e=+Xt($(this)[0].ship.deuterium).toFixed(2);return`
          ${z("galaxy_ship_rating",[$(this)[0].ship.rating()])}
          ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
          ${z("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
          ${z("galaxy_gateway_used_support",[-$(this)[0].support()])}
          ${z("spend",[e,t.resource.Deuterium.name])}
          `},support:()=>-5,ship:{civ:()=>t.race.high_pop?10*di.high_pop.vars()[0]:10,mil:()=>t.race.high_pop?20*di.high_pop.vars()[0]:20,deuterium:80,rating:()=>t.race.banana?1260:1800},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("dreadnought","galaxy"),t.galaxy.defense.gxy_gateway.dreadnought++,t.galaxy.starbase.support+2t.tech.piracy?z("galaxy_stargate_desc_alt"):z("galaxy_stargate_desc"),control:()=>({name:Tc("name"),color:"success"})},gateway_station:{id:"galaxy-gateway_station",title:z("galaxy_gateway_station"),desc:()=>`
          ${z("galaxy_gateway_station_desc")}
          ${z("requires_power")}
          `,reqs:{stargate:4},cost:{Money:e=>ec("gateway_station",e,5e6,1.25,"galaxy"),Aluminium:e=>ec("gateway_station",e,52e4,1.25,"galaxy"),Polymer:e=>ec("gateway_station",e,35e4,1.25,"galaxy"),Neutronium:e=>ec("gateway_station",e,17500,1.25,"galaxy")},effect(){let e=Nr(2e3),a=Nr(4500),r=Nr(50),s="";return t.tech.gateway&&t.tech.gateway>=2&&(s=`
          ${z("galaxy_gateway_support",[$(this)[0].support()])}
          `),`${s}
          ${z("plus_max_resource",[e,z("resource_Helium_3_name")])}
          ${z("plus_max_resource",[a,z("resource_Deuterium_name")])}
          ${z("plus_max_resource",[r,z("resource_Elerium_name")])}
          ${z("minus_power",[$(this)[0].powered()])}
          `},support:()=>.5,powered:()=>nc(i.s_gate?4:0),powerBalancer:()=>!t.galaxy.hasOwnProperty("starbase")&&[{s:t.galaxy.starbase.s_max-t.galaxy.starbase.support}],refresh:!0,action(){return!!Cs($(this)[0])&&(Dt("gateway_station","galaxy"),t.resource.Helium_3.max+=Nr(2e3),t.resource.Deuterium.max+=Nr(4500),4===t.tech.stargate&&(t.galaxy.telemetry_beacon={count:0,on:0},t.tech.stargate=5),ks($(this)[0]),!0)}},telemetry_beacon:{id:"galaxy-telemetry_beacon",title:z("galaxy_telemetry_beacon"),desc:()=>`
          ${z("galaxy_telemetry_beacon")}
          ${z("requires_power")}
          `,reqs:{stargate:5},cost:{Money:e=>ec("telemetry_beacon",e,225e4,1.25,"galaxy"),Copper:e=>ec("telemetry_beacon",e,685e3,1.25,"galaxy"),Alloy:e=>ec("telemetry_beacon",e,425e3,1.25,"galaxy"),Iridium:e=>ec("telemetry_beacon",e,177e3,1.25,"galaxy")},effect(){let e=t.tech.telemetry?1200:800;t.tech.science>=17&&(e+=25*n.scout_ship);let a=i.telemetry_beacon?e*i.telemetry_beacon:0,r="";return t.tech.gateway&&t.tech.gateway>=2&&(r=`
          ${z("galaxy_gateway_support",[$(this)[0].support()])}
          `),`${r}
          ${z("galaxy_telemetry_beacon_effect1",[e])}
          ${z("galaxy_telemetry_beacon_effect2",[a])}
          ${z("minus_power",[$(this)[0].powered()])}
          `},support:()=>t.tech.telemetry?.75:.5,powered:()=>nc(i.s_gate?4:0),powerBalancer:()=>!t.galaxy.hasOwnProperty("starbase")&&[{s:t.galaxy.starbase.s_max-t.galaxy.starbase.support}],postPower(e){let a=e?i.telemetry_beacon+b():i.telemetry_beacon-b();a>t.galaxy.telemetry_beacon.count?a=t.galaxy.telemetry_beacon.count:a<0&&(a=0),i.telemetry_beacon=a,Os($(this)[0],"galaxy","telemetry_beacon")},action(){return!!Cs($(this)[0])&&(Dt("telemetry_beacon","galaxy"),ks($(this)[0])&&(t.resource.Knowledge.max+=1750),t.tech.gateway||(t.galaxy.starbase={count:0,on:0,support:0,s_max:0},t.settings.space.gateway=!0,t.tech.gateway=1,Qt()),!0)}},gateway_depot:{id:"galaxy-gateway_depot",title:z("galaxy_gateway_depot"),desc:`
          ${z("galaxy_gateway_depot")}
          `,reqs:{gateway:5},cost:{Money:e=>ec("gateway_depot",e,4e6,1.25,"galaxy"),Neutronium:e=>ec("gateway_depot",e,8e4,1.25,"galaxy"),Stanene:e=>ec("gateway_depot",e,5e5,1.25,"galaxy"),Vitreloy:e=>ec("gateway_depot",e,2500,1.25,"galaxy")},wide:!0,effect(){let e=t.tech.world_control?150:100,a=Nr(200),r=Lt(),s=q(+Nr(3e3*r).toFixed(0),1),i=q(+Nr(25e4*r).toFixed(0),1),c=q(+Nr(9001*r).toFixed(0),1),o=q(+Nr(6660*r).toFixed(0),1),n='
          ';return n+=`${z("plus_max_crates",[e])}${z("plus_max_containers",[e])}`,n+=`${z("plus_max_resource",[s,t.resource.Uranium.name])}`,n+=`${z("plus_max_resource",[i,t.resource.Nano_Tube.name])}`,n+=`${z("plus_max_resource",[c,t.resource.Neutronium.name])}`,n+=`${z("plus_max_resource",[o,t.resource.Infernite.name])}`,n+="
          ",`${n}
          ${z("galaxy_gateway_depot_effect",[a,z("resource_Elerium_name")])}
          ${z("minus_power",[$(this)[0].powered()])}
          `},powered:()=>nc(i.s_gate?10:0),action(){if(Cs($(this)[0])){Dt("gateway_depot","galaxy");let e=Lt();return t.resource.Uranium.max+=Nr(3e3*e),t.resource.Nano_Tube.max+=Nr(25e4*e),t.resource.Neutronium.max+=Nr(9001*e),t.resource.Infernite.max+=Nr(6660*e),ks($(this)[0]),!0}return!1}},defense_platform:{id:"galaxy-defense_platform",title:z("galaxy_defense_platform"),desc:()=>`
          ${z("galaxy_defense_platform")}
          ${z("requires_power")}
          `,reqs:{stargate:6},cost:{Money:e=>ec("defense_platform",e,75e4,1.25,"galaxy"),Adamantite:e=>ec("defense_platform",e,425e3,1.25,"galaxy"),Elerium:e=>ec("defense_platform",e,800,1.25,"galaxy"),Vitreloy:e=>ec("defense_platform",e,1250,1.25,"galaxy"),Wrought_Iron:e=>ec("defense_platform",e,75e3,1.25,"galaxy")},effect(){return`
          ${z("galaxy_defense_platform_effect",[20])}
          ${z("minus_power",[$(this)[0].powered()])}
          `},powered:()=>nc(i.s_gate?5:0),postPower(e){ic({el:"#gxy_stargate"},"update")},action(){return!!Cs($(this)[0])&&(Dt("defense_platform","galaxy"),ks($(this)[0]),!0)},post(){ic({el:"#gxy_stargate"},"update")}}},gxy_gorddon:{info:{name:z("galaxy_gorddon"),desc:()=>z("galaxy_gorddon_desc"),control:()=>({name:_i[t.galaxy.alien1.id].name,color:"advanced"})},gorddon_mission:{id:"galaxy-gorddon_mission",title:z("galaxy_gorddon_mission"),desc:z("galaxy_gorddon_mission_desc"),reqs:{xeno:2},grant:["xeno",3],queue_complete:()=>t.tech.xeno>=3?0:1,cost:{Structs:()=>({galaxy:{scout_ship:{s:"gxy_gateway",count:2,on:2},corvette_ship:{s:"gxy_gateway",count:1,on:1}}}),Helium_3:()=>+Xt(23e4).toFixed(0),Deuterium:()=>+Xt(125e3).toFixed(0)},effect:z("galaxy_gorddon_mission_effect"),action(){if(Cs($(this)[0])){Kt(),t.galaxy.defense.gxy_gateway.scout_ship-=2,t.galaxy.defense.gxy_gorddon.scout_ship+=2,t.galaxy.defense.gxy_gateway.corvette_ship--,t.galaxy.defense.gxy_gorddon.corvette_ship++;let e=_i[t.galaxy.alien1.id].name,a=_i[t.galaxy.alien1.id].entity,r=_i[t.galaxy.alien2.id].name;return Bi(z("galaxy_gorddon_mission_result",[a,e,_i[t.galaxy.alien2.id].entity,r]),"info",!1,["progress"]),!0}return!1}},embassy:{id:"galaxy-embassy",title:z("galaxy_embassy"),desc:()=>`
          ${z("galaxy_embassy")}
          ${z("requires_power_combo",[t.resource.Food.name])}
          `,reqs:{xeno:4},queue_complete:()=>1-t.galaxy.embassy.count,cost:{Money:e=>(e||0)+(t.galaxy.hasOwnProperty("embassy")?t.galaxy.embassy.count:0)<1?3e7:0,Lumber:e=>(e||0)+(t.galaxy.hasOwnProperty("embassy")?t.galaxy.embassy.count:0)<1?38e6:0,Stone:e=>(e||0)+(t.galaxy.hasOwnProperty("embassy")?t.galaxy.embassy.count:0)<1?32e6:0,Furs:e=>(e||0)+(t.galaxy.hasOwnProperty("embassy")?t.galaxy.embassy.count:0)<1?18e6:0,Wrought_Iron:e=>(e||0)+(t.galaxy.hasOwnProperty("embassy")?t.galaxy.embassy.count:0)<1?6e6:0},effect(){let e="";return t.tech.xeno>=11&&(e=`
          ${z("plus_max_citizens",[$(this)[0].citizens()])}
          `),`
          ${z("galaxy_embassy_effect",[_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name])}
          ${e}
          ${z("interstellar_alpha_starport_effect3",[7500,t.resource.Food.name])}
          ${z("minus_power",[$(this)[0].powered()])}
          `},powered:()=>nc(i.s_gate?25:0),refresh:!0,action(){return!!(t.galaxy.embassy.count<1&&Cs($(this)[0]))&&(Dt("embassy","galaxy"),ks($(this)[0]),4===t.tech.xeno&&(t.tech.xeno=5,t.galaxy.freighter={count:0,on:0,crew:0},t.galaxy.trade={max:0,cur:0,f0:0,f1:0,f2:0,f3:0,f4:0,f5:0,f6:0,f7:0,f8:0},sc($("#resources")),sr(),Bi(z("galaxy_embassy_complete",[_i[t.galaxy.alien1.id].name,_i[t.galaxy.alien2.id].name]),"info",!1,["progress"])),!0)},citizens(){let e=20;return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e}},dormitory:{id:"galaxy-dormitory",title:z("galaxy_dormitory"),desc:()=>`
          ${z("galaxy_dormitory")}
          ${z("requires_power")}
          `,reqs:{xeno:6},cost:{Money:e=>ec("dormitory",e,1e7,1.25,"galaxy"),Furs:e=>ec("dormitory",e,7e5,1.25,"galaxy"),Cement:e=>ec("dormitory",e,12e5,1.25,"galaxy"),Plywood:e=>ec("dormitory",e,85e3,1.25,"galaxy"),Horseshoe:()=>t.race.hooved?3:0},effect(){return`
          ${z("requires_res",[z("galaxy_embassy")])}
          ${z("plus_max_citizens",[$(this)[0].citizens()])}
          ${z("minus_power",[$(this)[0].powered()])}
          `},powered:()=>nc(3),action(){return!!Cs($(this)[0])&&(Dt("dormitory","galaxy"),ks($(this)[0]),!0)},citizens(){let e=3;return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e}},symposium:{id:"galaxy-symposium",title:z("galaxy_symposium"),desc:()=>`
          ${z("galaxy_symposium")}
          ${z("requires_power")}
          `,reqs:{xeno:6},cost:{Money:e=>ec("symposium",e,8e6,1.25,"galaxy"),Food:e=>t.race.ravenous?0:ec("symposium",e,t.race.artifical?45e3:125e3,1.25,"galaxy"),Lumber:e=>ec("symposium",e,46e4,1.25,"galaxy"),Brick:e=>ec("symposium",e,261600,1.25,"galaxy")},effect(){let e="";return t.tech.xeno>=7&&(e=`
          ${z("galaxy_symposium_effect3",[+Pe(300).toFixed(2)])}
          `),`
          ${z("galaxy_symposium_effect",[1750])}
          ${z("galaxy_symposium_effect2",[650])}
          ${e}
          ${z("minus_power",[$(this)[0].powered()])}
          `},powered:()=>nc(4),action(){return!!Cs($(this)[0])&&(Dt("symposium","galaxy"),ks($(this)[0]),!0)}},freighter:{id:"galaxy-freighter",title:z("galaxy_freighter"),desc:()=>`
          ${z("galaxy_freighter")}
          ${z("galaxy_crew_fuel",[z("resource_Helium_3_name")])}
          `,reqs:{xeno:5},cost:{Money:e=>ec("freighter",e,6e6,1.2,"galaxy"),Uranium:e=>ec("freighter",e,1e4,1.2,"galaxy"),Adamantite:e=>ec("freighter",e,46e4,1.2,"galaxy"),Stanene:e=>ec("freighter",e,261600,1.2,"galaxy"),Bolognium:e=>ec("freighter",e,66e3,1.2,"galaxy")},effect(){let e=+Xt($(this)[0].ship.helium).toFixed(2),a="";return t.tech.banking>=13&&(a=`
          ${z("interstellar_exchange_boost",[3])}
          `),`
          ${z("galaxy_freighter_effect",[2,_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name])}
          ${a}
          ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
          ${z("spend",[e,t.resource.Helium_3.name])}
          `},ship:{civ:()=>t.race.high_pop?3*di.high_pop.vars()[0]:3,mil:()=>0,helium:12},special:!0,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("freighter","galaxy"),t.galaxy.freighter.on++,t.resource.Vitreloy.display=!0,!0)}}},gxy_alien1:{info:{name:()=>z("galaxy_alien",[_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].home]),desc:()=>z("galaxy_alien1_desc",[_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].home,_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),control:()=>({name:_i[t.galaxy.alien1.id].name,color:"advanced"})},consulate:{id:"galaxy-consulate",title:z("galaxy_consulate"),desc:()=>z("galaxy_consulate_desc",[_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].home]),reqs:{xeno:8},queue_complete:()=>1-t.galaxy.consulate.count,cost:{Money:e=>(e||0)+(t.galaxy.hasOwnProperty("consulate")?t.galaxy.consulate.count:0)<1?9e7:0,Stone:e=>(e||0)+(t.galaxy.hasOwnProperty("consulate")?t.galaxy.consulate.count:0)<1?75e6:0,Furs:e=>(e||0)+(t.galaxy.hasOwnProperty("consulate")?t.galaxy.consulate.count:0)<1?3e7:0,Iron:e=>(e||0)+(t.galaxy.hasOwnProperty("consulate")?t.galaxy.consulate.count:0)<1?45e6:0,Horseshoe:e=>t.race.hooved&&(e||0)+(t.galaxy.hasOwnProperty("consulate")?t.galaxy.consulate.count:0)<1?10:0},effect(){return z("plus_max_citizens",[$(this)[0].citizens()])},refresh:!0,action(){return!!(Cs($(this)[0])&&t.galaxy.consulate.count<1)&&(Dt("consulate","galaxy"),t.galaxy.resort={count:0,on:0},t.galaxy.super_freighter={count:0,on:0,crew:0},t.tech.xeno=9,!0)},citizens(){let e=10;return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e}},resort:{id:"galaxy-resort",title:z("galaxy_resort"),desc:()=>`
          ${z("galaxy_resort")}
          ${z("requires_power")}
          `,reqs:{xeno:9},cost:{Money:e=>ec("resort",e,33e6,1.25,"galaxy"),Stone:e=>ec("resort",e,25e6,1.25,"galaxy"),Furs:e=>ec("resort",e,1e7,1.25,"galaxy"),Oil:e=>ec("resort",e,Xt(125e3),1.25,"galaxy")},effect(){return`
          ${z("plus_max_citizens",[3])}
          ${z("minus_power",[$(this)[0].powered()])}
          `},effect(){let e=Nr(t.tech.world_control?1875e3:15e5),a=t.race.joyless?"":`
          ${z("city_max_entertainer",[ua(2)])}
          `;return`
          ${z("plus_max_resource",[`$${e.toLocaleString()}`,z("resource_Money_name")])}
          ${a}
          ${z("space_red_vr_center_effect2",[2])}
          ${z("minus_power",[$(this)[0].powered()])}
          `},powered:()=>nc(5),action(){return!!Cs($(this)[0])&&(Dt("resort","galaxy"),ks($(this)[0]),!0)}},vitreloy_plant:{id:"galaxy-vitreloy_plant",title:z("galaxy_vitreloy_plant"),desc:()=>`
          ${z("galaxy_vitreloy_plant")}
          ${z("galaxy_vitreloy_plant_desc")}
          `,reqs:{xeno:10},cost:{Money:e=>ec("vitreloy_plant",e,35e6,1.25,"galaxy"),Cement:e=>ec("vitreloy_plant",e,18e5,1.25,"galaxy"),Neutronium:e=>ec("vitreloy_plant",e,25e4,1.25,"galaxy"),Iridium:e=>ec("vitreloy_plant",e,85e4,1.25,"galaxy"),Aerogel:e=>ec("vitreloy_plant",e,4e5,1.25,"galaxy")},effect(){return`
          ${z("galaxy_vitreloy_plant_effect",[+Oe("vitreloy_plant").toFixed(2)])}
          ${z("galaxy_vitreloy_plant_effect2",[2.5,100])}
          ${z("galaxy_vitreloy_plant_effect3",[5e4,$(this)[0].powered()])}
          `},powered:()=>nc(10),action(){return!!Cs($(this)[0])&&(Dt("vitreloy_plant","galaxy"),ks($(this)[0]),!0)}},super_freighter:{id:"galaxy-super_freighter",title:z("galaxy_super_freighter"),desc:()=>`
          ${z("galaxy_super_freighter")}
          ${z("galaxy_crew_fuel",[z("resource_Helium_3_name")])}
          `,reqs:{xeno:9},cost:{Money:e=>ec("super_freighter",e,28e6,1.2,"galaxy"),Aluminium:e=>ec("super_freighter",e,35e5,1.2,"galaxy"),Alloy:e=>ec("super_freighter",e,1e6,1.2,"galaxy"),Graphene:e=>ec("super_freighter",e,75e4,1.2,"galaxy")},effect(){let e=+Xt($(this)[0].ship.helium).toFixed(2),a="";return t.tech.banking>=13&&(a=`
          ${z("interstellar_exchange_boost",[8])}
          `),`
          ${z("galaxy_freighter_effect",[5,_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name])}
          ${a}
          ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
          ${z("spend",[e,t.resource.Helium_3.name])}
          `},ship:{civ:()=>t.race.high_pop?5*di.high_pop.vars()[0]:5,mil:()=>0,helium:25},special:!0,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("super_freighter","galaxy"),t.galaxy.super_freighter.on++,!0)}}},gxy_alien2:{info:{name:()=>z("galaxy_alien",[_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red]),desc:()=>z("galaxy_alien2_desc",[_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red,_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name]),control:()=>({name:_i[t.galaxy.alien2.id].name,color:"danger"}),support:"foothold"},alien2_mission:{id:"galaxy-alien2_mission",title:()=>z("galaxy_alien2_mission",[_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red]),desc:()=>z("galaxy_alien2_mission_desc",[_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red]),reqs:{andromeda:4},grant:["conflict",1],queue_complete:()=>t.tech.conflict>=1?0:1,cost:{Custom(){if(t.galaxy.hasOwnProperty("defense")&&t.galaxy.defense.hasOwnProperty("gxy_alien2")){let e=0;return Object.keys(t.galaxy.defense.gxy_alien2).forEach((function(a){e+=Tt.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_alien2[a]})),{label:z("galaxy_fleet_rating",[`400`]),met:!(e<400)}}return{label:z("galaxy_fleet_rating",['400']),met:!1}}},effect(){let e=0;t.galaxy.hasOwnProperty("defense")&&t.galaxy.defense.hasOwnProperty("gxy_alien2")&&Object.keys(t.galaxy.defense.gxy_alien2).forEach((function(a){e+=Tt.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_alien2[a]}));let a=e>=650?`${z("galaxy_piracy_low")}`:`${z("galaxy_piracy_avg")}`;return`
          ${z("galaxy_alien2_mission_effect2",[e])}
          ${z("galaxy_alien2_mission_effect3",[a])}
          ${z("galaxy_alien2_mission_effect",[_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name])}
          `},action(){if(Cs($(this)[0])){let e=0;if(Object.keys(t.galaxy.defense.gxy_alien2).forEach((function(a){e+=Tt.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_alien2[a]})),e>=400){if(Bi(z("galaxy_alien2_mission_result2",[_i[t.galaxy.alien2.id].solar.red]),"info",!1,["progress"]),e<650){let e=80;t.race.instinct&&(e/=2);let a=[];Object.keys(t.galaxy.defense.gxy_alien2).forEach((function(r){for(let s=0;s0&&(e-=Tt.gxy_gateway[r].ship.rating(),a.push(r))})),Bi(z("galaxy_chthonian_mission_result_losses",[a.map((e=>z(`galaxy_${e}`))).join(", ")]),"danger",!1,["progress"]);for(let e=0;e`
          ${z("galaxy_foothold")}
          ${z("requires_power_combo",[t.resource.Elerium.name])}
          `,reqs:{conflict:1},cost:{Money:e=>ec("foothold",e,25e6,1.25,"galaxy"),Titanium:e=>ec("foothold",e,3e6,1.25,"galaxy"),Polymer:e=>ec("foothold",e,175e4,1.25,"galaxy"),Iridium:e=>ec("foothold",e,9e5,1.25,"galaxy"),Bolognium:e=>ec("foothold",e,5e4,1.25,"galaxy")},effect(){return`
          ${z("galaxy_defense_platform_effect",[50])}
          ${z("galaxy_foothold_effect",[$(this)[0].support(),_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red])}
          ${z("galaxy_foothold_effect2",[2.5,$(this)[0].powered()])}
          `},support:()=>4,powered:()=>nc(i.s_gate?20:0),powerBalancer:()=>[{s:t.galaxy.foothold.s_max-t.galaxy.foothold.support}],action(){return!!Cs($(this)[0])&&(Dt("foothold","galaxy"),ks($(this)[0]),1===t.tech.conflict&&(t.galaxy.armed_miner={count:0,on:0,crew:0,mil:0},t.tech.conflict=2,Qt(),gs()),!0)}},armed_miner:{id:"galaxy-armed_miner",title:z("galaxy_armed_miner"),desc:()=>`
          ${z("galaxy_armed_miner")}
          `,reqs:{conflict:2},cost:{Money:e=>ec("armed_miner",e,5e6,1.25,"galaxy"),Steel:e=>ec("armed_miner",e,18e5,1.25,"galaxy"),Stanene:e=>ec("armed_miner",e,1975e3,1.25,"galaxy"),Vitreloy:e=>ec("armed_miner",e,2e4,1.25,"galaxy"),Soul_Gem:e=>ec("armed_miner",e,1,1.25,"galaxy")},effect(){let e=+Xt($(this)[0].ship.helium).toFixed(2);return`
          ${z("galaxy_ship_rating",[$(this)[0].ship.rating()])}
          ${z("gain",[.032,z("resource_Bolognium_name")])}
          ${z("gain",[.23,z("resource_Adamantite_name")])}
          ${z("gain",[.65,z("resource_Iridium_name")])}
          ${z("galaxy_alien2_support",[$(this)[0].support(),_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red])}
          ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
          ${z("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
          ${z("spend",[e,t.resource.Helium_3.name])}
          `},ship:{civ:()=>t.race.high_pop?2*di.high_pop.vars()[0]:2,mil:()=>t.race.high_pop?1*di.high_pop.vars()[0]:1,helium:10,rating:()=>t.race.banana?4:5},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("armed_miner","galaxy"),t.galaxy.foothold.support`
          ${z("galaxy_ore_processor")}
          `,reqs:{conflict:3},cost:{Money:e=>ec("ore_processor",e,3e6,1.25,"galaxy"),Iron:e=>ec("ore_processor",e,5e6,1.25,"galaxy"),Coal:e=>ec("ore_processor",e,375e4,1.25,"galaxy"),Graphene:e=>ec("ore_processor",e,225e4,1.25,"galaxy")},effect(){return`
          ${z("galaxy_ore_processor_effect",[10])}
          ${z("galaxy_alien2_support",[$(this)[0].support(),_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red])}
          `},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("ore_processor","galaxy"),t.galaxy.foothold.supportec("scavenger",e,75e5,1.25,"galaxy"),Alloy:e=>ec("scavenger",e,125e4,1.25,"galaxy"),Aluminium:e=>ec("scavenger",e,68e5,1.25,"galaxy"),Neutronium:e=>ec("scavenger",e,75e3,1.25,"galaxy"),Elerium:e=>ec("scavenger",e,750,1.25,"galaxy")},effect(){let e=It("gxy_alien2"),a=Math.round(25e3*e),r=+Xt($(this)[0].ship.helium).toFixed(2),s=t.race.cataclysm?`
          ${z("galaxy_scavenger_effect2_cata",[+(100*e*.75).toFixed(1)])}
          `:`
          ${z("galaxy_scavenger_effect2",[+(100*e/4).toFixed(1)])}
          `;return`
          ${z("galaxy_scavenger_effect",[a])}
          ${s}
          ${z("galaxy_alien2_support",[$(this)[0].support(),_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red])}
          ${z("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
          ${z("spend",[r,t.resource.Helium_3.name])}
          `},ship:{civ:()=>t.race.high_pop?1*di.high_pop.vars()[0]:1,mil:()=>0,helium:12},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("scavenger","galaxy"),t.galaxy.foothold.supportz("galaxy_chthonian"),desc:()=>z("galaxy_chthonian_desc",[_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name]),control:()=>({name:_i[t.galaxy.alien2.id].name,color:"danger"})},chthonian_mission:{id:"galaxy-chthonian_mission",title:()=>z("galaxy_alien2_mission",[z("galaxy_chthonian")]),desc:()=>z("galaxy_alien2_mission_desc",[z("galaxy_chthonian")]),reqs:{chthonian:1},grant:["chthonian",2],queue_complete:()=>t.tech.chthonian>=2?0:1,cost:{Custom(){if(t.galaxy.hasOwnProperty("defense")&&t.galaxy.defense.hasOwnProperty("gxy_chthonian")){let e=0;return Object.keys(t.galaxy.defense.gxy_chthonian).forEach((function(a){e+=Tt.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_chthonian[a]})),{label:z("galaxy_fleet_rating",[`1250`]),met:!(e<1250)}}return{label:z("galaxy_fleet_rating",['1250']),met:!1}}},effect(){let e=0;t.galaxy.hasOwnProperty("defense")&&t.galaxy.defense.hasOwnProperty("gxy_chthonian")&&Object.keys(t.galaxy.defense.gxy_chthonian).forEach((function(a){e+=Tt.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_chthonian[a]}));let a=e>=4500?`${z("galaxy_piracy_low")}`:e>=2500?`${z("galaxy_piracy_avg")}`:`${z("galaxy_piracy_high")}`;return`
          ${z("galaxy_alien2_mission_effect2",[e])}
          ${z("galaxy_alien2_mission_effect3",[a])}
          ${z("galaxy_alien2_mission_effect",[z("galaxy_chthonian")])}
          `},action(){if(Cs($(this)[0])){let e=0;if(Object.keys(t.galaxy.defense.gxy_chthonian).forEach((function(a){e+=Tt.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_chthonian[a]})),e>=1250){let a=500,r=[];Bi(z("galaxy_chthonian_mission_result"),"info",!1,["progress"]),e>=2500&&(a=e>=4500?80:160),t.race.instinct&&(a/=2),Object.keys(t.galaxy.defense.gxy_chthonian).forEach((function(e){for(let s=0;s0&&(a-=Tt.gxy_gateway[e].ship.rating(),r.push(e))})),Bi(z("galaxy_chthonian_mission_result_losses",[r.map((e=>z(`galaxy_${e}`))).join(", ")]),"danger",!1,["progress"]);for(let e=0;e`
          ${z("galaxy_minelayer")}
          `,reqs:{chthonian:2},cost:{Money:e=>ec("minelayer",e,9e6,1.25,"galaxy"),Iron:e=>ec("minelayer",e,48e5,1.25,"galaxy"),Nano_Tube:e=>ec("minelayer",e,125e4,1.25,"galaxy"),Nanoweave:e=>ec("minelayer",e,1e5,1.25,"galaxy")},effect(){let e=+Xt($(this)[0].ship.helium).toFixed(2);return`
          ${z("galaxy_defense_platform_effect",[$(this)[0].ship.rating()])}
          ${z("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
          ${z("spend",[e,t.resource.Helium_3.name])}
          `},ship:{civ:()=>0,mil:()=>t.race.high_pop?1*di.high_pop.vars()[0]:1,helium:8,rating:()=>t.race.banana?35:50},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("minelayer","galaxy"),t.galaxy.minelayer.on++,!0)},postPower(){ic({el:"#gxy_chthonian"},"update")},post(){ic({el:"#gxy_chthonian"},"update")}},excavator:{id:"galaxy-excavator",title:z("galaxy_excavator"),desc:()=>`
          ${z("galaxy_excavator")}
          `,reqs:{chthonian:3},cost:{Money:e=>ec("excavator",e,12e6,1.25,"galaxy"),Polymer:e=>ec("excavator",e,44e5,1.25,"galaxy"),Iridium:e=>ec("excavator",e,36e5,1.25,"galaxy"),Mythril:e=>ec("excavator",e,18e4,1.25,"galaxy")},effect(){return`
          ${z("gain",[+Oe("excavator").toFixed(3),z("resource_Orichalcum_name")])}
          ${z("minus_power",[$(this)[0].powered()])}
          `},powered:()=>nc(8),powerBalancer:()=>[{r:"Orichalcum",p:Oe("excavator")}],action(){return!!Cs($(this)[0])&&(Dt("excavator","galaxy"),ks($(this)[0]),!0)}},raider:{id:"galaxy-raider",title:z("galaxy_raider"),desc:()=>`
          ${z("galaxy_raider")}
          `,reqs:{chthonian:3},cost:{Money:e=>ec("raider",e,12e6,1.25,"galaxy"),Titanium:e=>ec("raider",e,125e4,1.25,"galaxy"),Bolognium:e=>ec("raider",e,6e5,1.25,"galaxy"),Vitreloy:e=>ec("raider",e,125e3,1.25,"galaxy"),Stanene:e=>ec("raider",e,825e3,1.25,"galaxy")},effect(){let e=+Xt($(this)[0].ship.helium).toFixed(2);return It("gxy_chthonian"),`
          ${z("galaxy_ship_rating",[$(this)[0].ship.rating()])}
          ${z("gain",[.65,z("resource_Deuterium_name")])}
          ${z("gain",[.05,z("resource_Vitreloy_name")])}
          ${z("gain",[2.3,z("resource_Polymer_name")])}
          ${z("gain",[.8,z("resource_Neutronium_name")])}
          ${z("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
          ${z("spend",[e,t.resource.Helium_3.name])}
          `},ship:{civ:()=>0,mil:()=>t.race.high_pop?2*di.high_pop.vars()[0]:2,helium:18,rating:()=>t.race.banana?9:12},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("raider","galaxy"),t.galaxy.raider.on++,!0)},postPower(){ic({el:"#gxy_chthonian"},"update")},post(){ic({el:"#gxy_chthonian"},"update")}}}};function Et(e){let t="space";return"int_"===e.substr(0,4)?t="interstellar":"prtl_"===e.substr(0,5)?t="portal":"gxy_"===e.substr(0,4)?t="galaxy":"tau_"===e.substr(0,4)&&(t="tauceti"),t}function It(e,a,r){if(t.tech.piracy&&!t.race.truepath){let s=0,c=["dreadnought","cruiser_ship","frigate_ship","corvette_ship","scout_ship"];for(let a=0;ao?o:s))/o)*l+(1-l))*(a?1:It("gxy_stargate")):(1-(o-(s>o?o:s))/o)*l+(1-l)}return 1}function Kt(){let e=["protoplasm",t.race.species];t.city.hasOwnProperty("surfaceDwellers")&&e.push(...t.city.surfaceDwellers),t.custom.hasOwnProperty("race0")||e.push("custom");let a=Object.keys(_i).filter((function(t){return!["demonic","eldritch"].includes(_i[t].type)&&!e.includes(t)})),r=jc(a);t.galaxy.alien1={id:a[r]},e.push(a[r]),a=Object.keys(_i).filter((function(t){return!["angelic"].includes(_i[t].type)&&!e.includes(t)}));let s=jc(a);t.galaxy.alien2={id:a[s]}}function Lt(){let e=1;return t.race.pack_rat&&(e*=1.05),t.stats.achieve.blackhole&&(e*=1+.05*t.stats.achieve.blackhole.l),e*=t.tech.world_control?2:1,e}const Nt={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},laboratory:{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 Dt(e,a){a||(a="space"),t[a][e]||(t[a][e]=Nt[e]),t[a][e].count++}function Bt(e,t){return e&&t?St[e][t]:St}function Gt(e,t,a){switch(e){case"space":return Rt(St,t,a);case"interstellar":return Rt(Ft,t,a);case"galaxy":return Rt(Tt,t,a)}}function Rt(e,a,r){let s=t.race.truepath?"truepath":"standard";if(e[a][r].hasOwnProperty("path")&&!e[a][r].path.includes(s))return!1;var i=!0;return Object.keys(e[a][r].reqs).forEach((function(s){(!t.tech[s]||t.tech[s]=e[a][r].grant[1]&&(i=!1),i}function Ht(){(t.settings.tabLoad||1===t.settings.civTabs)&&(Ut("inner"),t.race.truepath&&Ut("outer"),Wt(),Qt())}function Ut(e){if(e||(e=5===t.settings.spaceTabs?"outer":"inner"),!t.settings.tabLoad&&(1!==t.settings.civTabs||![1,5].includes(t.settings.spaceTabs)||1===t.settings.civTabs&&1===t.settings.spaceTabs&&"inner"!==e||5===t.settings.spaceTabs&&"outer"!==e))return;let a="inner"===e?$("#space"):$("#outerSol");if(sc(a),a.append($(`

          ${z("inner"===e?"tab_space":"tab_outer_space")}

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

          ${s}

          {{ support }}/{{ s_max }}
          `),ic({el:`#sr${r}`,data:t.space[e]})}else a.append(`

          ${s}

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

          ${z("tab_interstellar")}

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

          ${r}

          {{ support }}/{{ s_max }}
          `),ic({el:`#sr${a}`,data:t.interstellar[s]})}else e.append(`

          ${r}

          `);Ei(a,(function(){return"string"==typeof Ft[a].info.desc?Ft[a].info.desc:Ft[a].info.desc()}),{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(Ft[a]).forEach((function(e){"info"!==e&&Rt(Ft,a,e)&&vs(Ft[a][e],"interstellar",e)}))}}))}function Qt(){if(!t.settings.tabLoad&&(1!==t.settings.civTabs||3!==t.settings.spaceTabs))return;let e=$("#galaxy");if(sc(e),e.append($(`

          ${z("tab_galactic")}

          `)),!t.settings.showGalactic)return!1;!function(e,a){if(t.tech.piracy&&!t.race.truepath){let r=$(`

          ${z("galaxy_armada")}

          `);e.append(r);let s=t.tech.world_control?z("civics_garrison_peacekeepers"):z("civics_garrison_soldiers");r.append($("|")),r.append($(`${s} {{ g.workers | stationed }} / {{ g.max | s_max }}`)),r.append($("|")),r.append($(`${z("job_crew_mil")} {{ g.crew }}`)),r.append($("|")),r.append($(`${z("job_crew_civ")} {{ c.workers }} / {{ c.max }}`)),ic({el:`#h${a}`,data:{g:t.civic.garrison,c:t.civic.crew},filters:{stationed:e=>Me(),s_max:e=>Me(!0)}}),["soldier","crew1","crew2"].forEach((function(e){Ei(`h${a}${e}`,(function(){switch(e){case"soldier":return ye();case"crew1":return z("civics_garrison_crew_desc");case"crew2":return z("job_crew_desc")}}),{elm:`#h${a} span.${e}`})}));let i=$(`
          `);e.append(i);let c=["scout_ship","corvette_ship","frigate_ship","cruiser_ship","dreadnought"],o=[];for(let e=0;e<6;e++){let e=$('
          ');o.push(e),i.append(e)}for(let e=0;e${Tt.gxy_gateway[c[e]].title}`);o[e+1].append(t)}o[0].append($("")),o[0].append($(`${Tt.gxy_gateway.info.name}`));for(let e=0;e{{ gateway.${c[e]} }}`);o[e+1].append(t)}Object.keys(t.galaxy.defense).forEach((function(e){let a=e.substring(4);if(t.settings.space[a]&&"gateway"!==a){let r=$(`${"string"==typeof Tt[e].info.name?Tt[e].info.name:Tt[e].info.name()}`);o[0].append(r);for(let r=0;r'),s=$(`«`),i=$(`{{ ${a}.${c[r]} }}`),n=$(`»`);o[r+1].append(t),t.append(s),t.append(i),t.append(n)}}})),ic({el:`#${a}`,data:{stargate:t.galaxy.defense.gxy_stargate,gateway:t.galaxy.defense.gxy_gateway,gorddon:t.galaxy.defense.gxy_gorddon,alien1:t.galaxy.defense.gxy_alien1,alien2:t.galaxy.defense.gxy_alien2,chthonian:t.galaxy.defense.gxy_chthonian,t:t.tech},methods:{sub(e,a){if(t.galaxy.defense[e][a]>0){let r=b();r>t.galaxy.defense[e][a]&&(r=t.galaxy.defense[e][a]),t.galaxy.defense.gxy_gateway[a]+=r,t.galaxy.defense[e][a]-=r}},add(e,a){if(t.galaxy.defense.gxy_gateway[a]>0){let r=b();r>t.galaxy.defense.gxy_gateway[a]&&(r=t.galaxy.defense.gxy_gateway[a]),t.galaxy.defense.gxy_gateway[a]-=r,t.galaxy.defense[e][a]+=r}}}}),Object.keys(t.galaxy.defense).forEach((function(e){let a=e.substring(4);t.settings.space[a]&&Ei(`armada${a}`,(function(){return`
          ${"string"==typeof Tt[e].info.desc?Tt[e].info.desc:Tt[e].info.desc()}
          `}))}));for(let e=0;e`);e.append(s);let i=$(`

          ${r}

          `);s.append(i),t.tech.xeno&&t.tech.xeno>=3&&s.append(`{{ r.control().name }}`);let c={el:`#${a}`,data:{r:Tt[a].info},methods:{threat(e){let a=t.race.infiltrator?1:2;if(t.galaxy.defense[e].scout_ship>=a){let t=100*(1-It(e,!0));return t=t<1?Math.ceil(t):Math.round(t),0===t?"has-text-success":t<=20?"has-text-advanced":t<=40?"has-text-info":t<=60?"has-text-warning":t<=80?"has-text-caution":"has-text-danger"}return"has-text-danger"}},filters:{pirate(e){let a=t.race.infiltrator?1:2;if(t.galaxy.defense[e].scout_ship>=a){let a=100*(1-It(e,!0));a=a<1?Math.ceil(a):Math.round(a);let r=t.race.infiltrator?3:4;return t.galaxy.defense[e].scout_ship>=r?`${a}%`:z(0===a?"galaxy_piracy_none":a<=20?"galaxy_piracy_vlow":a<=40?"galaxy_piracy_low":a<=60?"galaxy_piracy_avg":a<=80?"galaxy_piracy_high":"galaxy_piracy_vhigh")}return"???"},defense:e=>It(e,!0,!0)}};if(Tt[a].info.support){let e=Tt[a].info.support;t.galaxy[e]&&(t.galaxy[e].hasOwnProperty("support")||(t.galaxy[e].support=0,t.galaxy[e].s_max=0),s.append('{{ s.support }}/{{ s.s_max }}'),c.data.s=t.galaxy[e])}t.tech.piracy&&s.append(`
          ${z("galaxy_piracy_threat",[_i[t.galaxy.alien2.id].name])}{{ '${a}' | pirate }}|${z("galaxy_armada")}: {{ '${a}' | defense }}
          `),ic(c),Ei(a,(function(){return"string"==typeof Tt[a].info.desc?Tt[a].info.desc:Tt[a].info.desc()}),{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),Ei(a,(function(){return z("galaxy_control",[Tt[a].info.control().name,r])}),{elm:`#${a} .regionControl`,classes:"has-background-light has-text-dark"}),Object.keys(Tt[a]).forEach((function(e){"info"!==e&&Rt(Tt,a,e)&&vs(Tt[a][e],"galaxy",e)}))}}))}function Zt(e){return t.tech.space_housing&&(e*=.8**t.tech.space_housing),e}function Vt(e){return t.tech.solar&&t.tech.solar>=5&&c.iron_ship&&(e*=.95**c.iron_ship),e}function Jt(e){if(t.space.swarm_plant){let a=t.tech.swarm?.88:.94;t.tech.swarm>=3&&(a-=u/100),a<.05&&(a=.05),e*=a**t.space.swarm_plant.count}return e}function Yt(e,a,r){return r=r||{},"heavy"===t.race.universe&&(e*=1.25+.5*lc("heavy")),t.race.truepath&&(e*=a?2.5:1.25),t.city.mass_driver&&i.mass_driver?e*=(t.race.truepath?.94:.95)**i.mass_driver:r.mass_driver&&(e*=.95**r.mass_driver),t.stats.achieve.heavyweight&&(e*=.96**t.stats.achieve.heavyweight.l),t.city.ptrait.includes("dense")&&(e*=Fi.dense.vars()[2]),t.race.cataclysm&&(e*=.2),t.race.heavy&&(e*=1+di.heavy.vars()[0]/100),Ec("launch_day")&&(e*=.95),e}function Xt(e){return"heavy"===t.race.universe&&(e*=1.2+.3*lc("heavy")),t.stats.achieve.heavyweight&&(e*=.96**t.stats.achieve.heavyweight.l),t.race.heavy&&(e*=1+di.heavy.vars()[0]/100),Ec("launch_day")&&(e*=.95),e}function ea(){let e={red:_i[t.race.species].solar.red,hell:_i[t.race.species].solar.hell,gas:_i[t.race.species].solar.gas,gas_moon:_i[t.race.species].solar.gas_moon,dwarf:_i[t.race.species].solar.dwarf,titan:pi[_i[t.race.species].type].solar.titan,enceladus:pi[_i[t.race.species].type].solar.enceladus,triton:pi[_i[t.race.species].type].solar.triton,eris:pi[_i[t.race.species].type].solar.eris};if("custom"===t.race.species)for(let a of["titan","enceladus","triton","eris"])t.custom.race0.hasOwnProperty(a)&&(e[a]=t.custom.race0[a]);return e}const ta=["l","h","a","e","m","mg"],aa={standard:{name:z("universe_standard"),desc:z("universe_standard_desc"),effect:z("universe_standard_effect")},heavy:{name:z("universe_heavy"),desc:z("universe_heavy_desc"),effect:z("universe_heavy_effect",[5])},antimatter:{name:z("universe_antimatter"),desc:z("universe_antimatter_desc"),effect:z("universe_antimatter_effect")},evil:{name:z("universe_evil"),desc:z("universe_evil_desc"),effect:z("universe_evil_effect")},micro:{name:z("universe_micro"),desc:z("universe_micro_desc"),effect:z("universe_micro_effect",[75])},magic:{name:z("universe_magic"),desc:z("universe_magic_desc"),effect:z("universe_magic_effect")}};function ra(){let e=[];if(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=4&&t.custom.hasOwnProperty("planet")&&Object.keys(aa).forEach((function(a){let r=Xc(a);t.custom.planet.hasOwnProperty(r)&&t.custom.planet[r].s&&e.push(`${r}:s`)})),t.race.geck&&t.race.geck>0){let e=$(`
          ${z("gecks_remaining")}: {{ geck }}
          `);$("#evolution").append(e),ic({el:"#geck",data:t.race})}if(0===t.race.probes)ws({custom:e});else{let a=!1;for(let r=0;r'),s={ascended:{},technophobe:t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l?t.stats.achieve.technophobe.l:0};if(a?a.append(r):$("#city").append(r),r.append(`

          ${z("genelab_title")}

          - ${z("genelab_genes")} {{ g.genes }} - ${z("trait_untapped_name")}: {{ g.genes | untapped }}
          `),a){r.append(`\n
          ${z("achieve_ascended_name")}
          \n `);let e=$("
          ");r.append(e),Object.keys(aa).forEach((function(a){s.ascended[a]=t.stats.achieve.ascended&&t.stats.achieve.ascended.hasOwnProperty(Xc(a))?t.stats.achieve.ascended[Xc(a)]:0,e.append(`\n
          ${z("universe_"+a)}
          \n `)})),r.append(`\n
          ${z("achieve_technophobe_name")}
          \n
          \n
          \n
          \n `)}let i=$(`
          ${z("genelab_name")}
          ${z("genelab_entity")}
          ${z("genelab_home")}
          ${z("genelab_desc")}
          `);r.append(i);let c=$(`
          \n
          ${z("genelab_red")}
          \n
          ${z("genelab_hell")}
          \n
          ${z("genelab_gas")}
          \n
          ${z("genelab_gas_moon")}
          \n
          ${z("genelab_dwarf")}
          `);r.append(c);let o=$(`
          \n
          ${z("genelab_titan")}
          \n
          ${z("genelab_enceladus")}
          \n
          ${z("genelab_triton")}
          \n
          ${z("genelab_eris")}
          `);r.append(o);let n=$('
          ');r.append(n);let l=!1,u=`
          ${z("genelab_genus")}
          ",n.append($(u));let d=`
          ${z("genelab_traits")}
          ",n.append($(d));let h=`\n
          \n \n
          \n
          \n
          \n \n \n \n
          \n
          \n {{ err.msg }}\n
          \n `;a||(h+=`\n
          \n \n
          \n `),r.append(h);var m=t.hasOwnProperty("custom")&&t.custom.hasOwnProperty("race0")?{name:t.custom.race0.name,desc:t.custom.race0.desc,entity:t.custom.race0.entity,home:t.custom.race0.home,red:t.custom.race0.red,hell:t.custom.race0.hell,gas:t.custom.race0.gas,gas_moon:t.custom.race0.gas_moon,dwarf:t.custom.race0.dwarf,titan:t.custom.race0.titan||ea().titan,enceladus:t.custom.race0.enceladus||ea().enceladus,triton:t.custom.race0.triton||ea().triton,eris:t.custom.race0.eris||ea().eris,genes:0,genus:t.custom.race0.genus,traitlist:t.custom.race0.traits}:{name:"Zombie",desc:"Zombies aren't so much a species as they are the shambling remains of a race who succumbed to a nightmarish virus. Yet somehow they continue to drone on.",entity:"rotting bipedal creatures",home:"Grave",red:"Brains",hell:"Rigor Mortis",gas:"Decompose",gas_moon:"Bones",dwarf:"Double Tap",titan:"Necromancer",enceladus:"Skeleton",triton:"Rot",eris:"Zombieland",genes:10,genus:l,traitlist:[]};for(let e=m.traitlist.length-1;e>=0;e--)di.hasOwnProperty(m.traitlist[e])&&"major"===di[m.traitlist[e]].type||m.traitlist.splice(e,1);m.genes=Fc(m,!!a&&s);let f={msg:""};ic({el:"#celestialLab",data:{g:m,w:s,err:f},methods:{val(e){"technophobe"===e?s.technophobe<0?s.technophobe=0:s.technophobe>5&&(s.technophobe=5):s.ascended[e]<0?s.ascended[e]=0:s.ascended[e]>5&&(s.ascended[e]=5)},geneEdit(){m.genes=Fc(m,!!a&&s)},setRace(){Fc(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&&(t.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},function(){C(),Vi("reset",{end:"ascend"});let a=t.race.species,r=t.race.gods,s=t.city.calendar.orbit,i=t.city.biome,c=t.city.ptrait,o=t.city.geology,n=gc("ascend");t.stats.ascend++,zc(),t.prestige.Phage.count+=n.phage,t.stats.phage+=n.phage,"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=n.plasmid,t.stats.antiplasmid+=n.plasmid):(t.prestige.Plasmid.count+=n.plasmid,t.stats.plasmid+=n.plasmid),t.prestige.Harmony.count=parseFloat((t.prestige.Harmony.count+n.harmony).toFixed(2)),t.stats.harmony=parseFloat((t.stats.harmony+n.harmony).toFixed(2)),c.forEach((function(e){Fi.hasOwnProperty(e)&&eo(`atmo_${e}`)})),void 0===t.tech.world_control&&eo("cult_of_personality");let l=0;Object.keys(t.city.geology).forEach((function(e){t.city.geology[e]>0&&l++})),l>=4&&eo("miners_dream"),t.galaxy.hasOwnProperty("dreadnought")&&0!==t.galaxy.dreadnought.count||eo("dreaded"),t.race.modified||"synth"!==t.race.species&&"nano"!==t.race.species||!t.race.emfield||to("digital_ascension"),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&eo("gross"),io();let u=!!t.race.hasOwnProperty("srace")&&t.race.srace,d=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0;t.race={species:"protoplasm",gods:a,old_gods:r,universe:t.race.universe,seeded:!1,seed:Math.floor(g(1e4)),ascended:!0},d>0&&(t.race.corruption=d),u&&(t.race.srace=u),Object.keys(o).forEach((function(e){o[e]+=.02})),Z({orbit:s,biome:i,ptrait:c,geology:o}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}())},allowed:e=>!("synthetic"===m.genus||!["deconstructor","imitation"].includes(e)||(m.traitlist.includes(e)&&m.traitlist.splice(m.traitlist.indexOf(e),1),0)),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=l,m.traitlist=[],m.genes=Fc(m,!!a&&s)},customImport(){let e=document.getElementById("customFile").files[0];if(e){let r=new FileReader;r.readAsText(e,"UTF-8"),r.onload=function(r){let i="";try{i=JSON.parse(r.target.result)}catch{return void(f.msg=z("string_pack_error",[e.name]))}let c=!1;if(Object.keys(m).forEach((function(e){i[e]&&typeof m[e]!=typeof i[e]&&(c=!0)})),c)return f.msg=z("string_pack_error",[e.name]),void console.log("format fail");Object.keys(m).forEach((function(e){i[e]&&(m[e]=i[e])})),["name","home","red","hell","gas","gas_moon","dwarf","titan","enceladus","triton","eris"].forEach((function(e){!i[e]&&["titan","enceladus","triton","eris"].includes(e)?m[e]=z(`genus_${m.genus}_solar_${e}`):m[e].length>20&&(m[e]=m[e].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)),a||t.stats.achieve[`genus_${m.genus}`]&&t.stats.achieve[`genus_${m.genus}`].l>0||(m.genus=l);let o=[];for(let e=0;e{const r=document.createElement("a"),s=new Blob([e],{type:"text/plain"});r.href=URL.createObjectURL(s),r.download=t,r.click(),URL.revokeObjectURL(r.href)})(JSON.stringify(m,null,4),`evolve-custom-${m.name}.txt`)}},filters:{cost(e){if(di[e].val>=0){let r=2;a?r+=s.technophobe:t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=1&&(r+=t.stats.achieve.technophobe.l);let i=di[e].val,c=0;for(let e=0;e=0&&c++;return m.traitlist.includes(e)&&c--,c>r&&(i+=c-r),i}return di[e].val},untapped:e=>`+${e>0?+(100*(e/(e+20)/10+24e-5)).toFixed(3):0}%`}}),Object.keys(ui).forEach((function(e){t.stats.achieve[`genus_${e}`]&&t.stats.achieve[`genus_${e}`].l>0&&Ei(`celestialLabgenusSelection${e}`,(function(){let t=$(`
          ${z(`genelab_genus_${e}_desc`)}
          `);return Object.keys(ui[e]).forEach((function(e){if(di[e]){let a=$("
          ");Uc(a,e,{trank:1}),t.append(a)}})),t}),{elm:`#celestialLab .genus_selection .${e}`,classes:"w30",wide:!0})})),Object.keys(p).sort().forEach((function(e){di.hasOwnProperty(e)&&"major"===di[e].type&&Ei(`celestialLabtraitSelection${e}`,(function(){let t=$("
          ");return Uc(t,e,{trank:1}),t}),{elm:`#celestialLab .trait_selection .t${e}`,classes:"w30",wide:!0})}))}function ia(a){a||t.race.noexport||(P.w&&P.w.terminate(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),eo(`biome_${t.city.biome}`),eo(`genus_${_i[t.race.species].type}`),eo("lamentis"),"junker"===t.race.species&&to("the_misery"),t.race.noexport="Planet",sc($("#city")),t.settings.showCity=!0,t.settings.showCivic=!1,t.settings.showResearch=!1,t.settings.showResources=!1,t.settings.showGenetics=!1,t.settings.showSpace=!1,t.settings.showDeep=!1,t.settings.showGalactic=!1,t.settings.showPortal=!1,t.settings.spaceTabs=0);let r=$('
          '),s={ascended:{},lamentis:t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l?t.stats.achieve.lamentis.l:0};a?a.append(r):$("#city").append(r),r.append(`

          ${z("planetlab_title")}

          - ${z("planetlab_points")} {{ p.pts }}
          `);let i=$('
          ');r.append(i);let c=!1,o=`
          ${z("wiki_planet_biome")}
          ",i.append($(o));let n=`
          ${z("wiki_planet_trait")}
          ",i.append($(n));let l={},u=["Copper","Iron","Aluminium","Coal","Oil","Titanium","Uranium"];t.stats.achieve.whitehole&&u.push("Iridium");let d=`
          ${z("planetlab_res")}
          ",i.append($(d));let _={biome:c,pts:0,traitlist:[],geology:l,orbit:t.city.calendar.orbit};if(t.custom.hasOwnProperty("planet")){let e=Xc();if(t.custom.planet.hasOwnProperty(e)){let a="s";t.custom.planet[e][a]&&(_=Ac(t.custom.planet[e][a]),_.orbit=t.city.calendar.orbit,u.forEach((function(e){_.geology.hasOwnProperty(e)?_.geology[e]*=100:_.geology[e]=0})))}}_.pts=ca(_);let p=`
          \n
          \n \n
          \n `;a||(p+=`\n
          \n \n
          \n `),p+="
          ",r.append(p),ic({el:"#celestialLab",data:{p:_,w:s},methods:{pEdit(){_.pts=ca(_)},setPlanet(){if(ca(_)>=0){Object.keys(_.geology).forEach((function(e){0===_.geology[e]?delete _.geology[e]:_.geology[e]/=100})),t.custom.hasOwnProperty("planet")||(t.custom.planet={});let a=Xc();t.custom.planet.hasOwnProperty(a)||(t.custom.planet[a]={s:!1});let r="s";t.custom.planet[a][r]=Ac(_),delete t.custom.planet[a][r].pts,function(a){C(),Vi("reset",{end:"terraform"});let r=t.race.species,s=t.race.gods,i=t.city.calendar.orbit,c=a.biome,o=a.traitlist,n=a.geology,l=gc("terraform");t.stats.terraform++,zc(),t.prestige.Phage.count+=l.phage,t.stats.phage+=l.phage,"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=l.plasmid,t.stats.antiplasmid+=l.plasmid):(t.prestige.Plasmid.count+=l.plasmid,t.stats.plasmid+=l.plasmid),t.prestige.Harmony.count=parseFloat((t.prestige.Harmony.count+l.harmony).toFixed(2)),t.stats.harmony=parseFloat((t.stats.harmony+l.harmony).toFixed(2)),o.forEach((function(e){Fi.hasOwnProperty(e)&&eo(`atmo_${e}`)})),void 0===t.tech.world_control&&eo("cult_of_personality");let u=0;Object.keys(t.city.geology).forEach((function(e){t.city.geology[e]>0&&u++})),u>=4&&eo("miners_dream"),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&eo("gross"),io();let d=!!t.race.hasOwnProperty("srace")&&t.race.srace,_=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0;t.race={species:"protoplasm",gods:r,old_gods:s,universe:t.race.universe,seeded:!1,seed:Math.floor(g(1e4)),ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended,rejuvenated:!0},_>0&&(t.race.corruption=_),d&&(t.race.srace=d),Z({orbit:i,biome:c,ptrait:o,geology:n}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}(_)}},reset(){_.traitlist=[],Object.keys(_.geology).forEach((function(e){_.geology[e]=0})),_.pts=ca(_)},less(e){_.geology[e]-=b(),_.geology[e]<-20&&(_.geology[e]=-20)},more(e){_.geology[e]+=b();let a=30;t.stats.achieve.whitehole&&(a+=5*t.stats.achieve.whitehole.l),"eden"===_.biome&&(a+=5),_.geology[e]>a&&(_.geology[e]=a)}},filters:{res:e=>_.geology[e]}})}function ca(e,a){let r=("eden"===e.biome?0:10)+(t.stats.achieve.lamentis?10*t.stats.achieve.lamentis.l:0);t.race.truepath&&(r*=2),r-=e.traitlist.length**3;let s=0;return Object.keys(e.geology).forEach((function(t){0!==e.geology[t]&&(r-=e.geology[t],s++)})),s>3&&(r-=(s-3)**2),r}const oa={unemployed:function(e){let a=z("job_unemployed_desc");return"unemployed"!==t.civic.d_job||e||(a=a+" "+z("job_default",[z("job_unemployed")])),a},hunter:function(e){let a=z("job_hunter_desc",[t.resource.Food.name]);return t.race.unfathomable&&(a=z("job_eld_hunter_desc")),t.race.artifical?a=t.race.soul_eater?z("job_art_demon_hunter_desc",[t.resource.Furs.name,t.resource.Lumber.name]):z("job_art_hunter_desc",[t.resource.Furs.name]):t.race.soul_eater&&"wendigo"!==t.race.species&&(a=z(t.race.evil?"job_evil_hunter_desc":"job_not_evil_hunter_desc",[t.resource.Food.name,t.resource.Lumber.name,t.resource.Furs.name])),"hunter"!==t.civic.d_job||e||(a=a+" "+z("job_default",[t.race.unfathomable?z("job_raider"):z("job_hunter")])),a},forager:function(e){let a=z("job_forager_desc");return"forager"!==t.civic.d_job||e||(a=a+" "+z("job_default",[z("job_forager")])),a},farmer:function(e){let a=+ha(!0,e).toFixed(2),r=+ha(!1,e).toFixed(2);e||(a=+la(a,"farmer").toFixed(2),r=+la(r,"farmer").toFixed(2));let s=t.race.high_pop&&!e?z("job_farmer_desc_hp",[a,t.resource.Food.name,ua(1),r,ua(1)*t.city.farm.count]):z("job_farmer_desc",[a,t.resource.Food.name,t.city.farm.count,r]);return"farmer"!==t.civic.d_job||e||(s=s+" "+z("job_default",[z("job_farmer")])),s},lumberjack:function(e){let a=e&&t.race.servants?t.race.servants.jobs.lumberjack:t.civic.lumberjack.workers,r=t.civic.lumberjack.impact;if(e||(a=+la(a,"lumberjack").toFixed(2),r=+la(r,"lumberjack").toFixed(2)),!t.race.evil||t.race.soul_eater&&"wendigo"!==t.race.species){let s=1+(t.tech.axe&&t.tech.axe>0?.35*(t.tech.axe-1):0);e||(s*=hi(a,"lumberjack")),"forest"===t.city.biome&&(r*=Si.forest.vars()[0]),"savanna"===t.city.biome&&(r*=Si.savanna.vars()[2]),"desert"===t.city.biome&&(r*=Si.desert.vars()[2]),"swamp"===t.city.biome&&(r*=Si.swamp.vars()[2]),"taiga"===t.city.biome&&(r*=Si.taiga.vars()[0]);let i=z("job_lumberjack_desc",[+(r*s).toFixed(2),t.resource.Lumber.name]);return"lumberjack"!==t.civic.d_job||e||(i=i+" "+z("job_default",[z("job_lumberjack")])),i}{let s=1;e||(s*=hi(a,"lumberjack"));let i=+(r*s).toFixed(2),c=+(r/4*s).toFixed(2),o="wendigo"===t.race.species?z("job_reclaimer_desc2",[i]):z("job_reclaimer_desc",[i,c]);return"lumberjack"!==t.civic.d_job||e||(o=o+" "+z("job_default",[z("job_reclaimer")])),o}},quarry_worker:function(e){let a=e&&t.race.servants?t.race.servants.jobs.quarry_worker:t.civic.quarry_worker.workers,r=t.civic.quarry_worker.impact;e||(a=+la(a,"quarry_worker").toFixed(2),r=+la(r,"quarry_worker").toFixed(2));let s=1+(t.tech.hammer&&t.tech.hammer>0?.4*t.tech.hammer:0);e||(s*=hi(a,"miner")),"desert"===t.city.biome&&(s*=Si.desert.vars()[0]),"swamp"===t.city.biome&&(s*=Si.swamp.vars()[3]),t.tech.explosives&&t.tech.explosives>=2&&(s*=t.tech.explosives>=3?1.75:1.5);let i=+(r*s).toFixed(1),c=t.resource.Aluminium.display?z("job_quarry_worker_desc2",[i,t.resource.Stone.name,t.resource.Aluminium.name]):z("job_quarry_worker_desc1",[i,t.resource.Stone.name]);return t.race.smoldering&&(c=c+" "+z("job_quarry_worker_smoldering",[t.resource.Chrysotile.name])),"quarry_worker"!==t.civic.d_job||e||(c=c+" "+z("job_default",[z("job_quarry_worker")])),c},crystal_miner:function(e){let a=e&&t.race.servants?t.race.servants.jobs.crystal_miner:t.civic.crystal_miner.workers,r=t.civic.crystal_miner.impact,s=1;e||(a=+la(a,"crystal_miner").toFixed(2),r=+la(r,"crystal_miner").toFixed(2),s*=hi(a,"miner"));let i=z("job_crystal_miner_desc",[+(r*s).toFixed(2),t.resource.Crystal.name]);return"crystal_miner"!==t.civic.d_job||e||(i=i+" "+z("job_default",[z("job_crystal_miner")])),i},scavenger:function(e){let a=di.scavenger.vars()[0];t.city.ptrait.includes("trashed")&&t.race.scavenger&&(a*=1+di.scavenger.vars()[1]/100),t.race.high_pop&&!e&&(a*=di.high_pop.vars()[1]/100),e||(a=+la(a,"scavenger").toFixed(2));let r=z("job_scavenger_desc",[_i[t.race.species].home,a]);return"scavenger"!==t.civic.d_job||e||(r=r+" "+z("job_default",[z("job_scavenger")])),r},torturer:function(){return z("job_torturer_desc")},miner:function(){return t.tech.mining>=3?t.race.sappy&&t.tech.alumina?z("job_miner_desc2_amber"):z("job_miner_desc2"):z("job_miner_desc1")},coal_miner:function(){return t.tech.uranium?z("job_coal_miner_desc2"):z("job_coal_miner_desc1")},craftsman:function(){return z("job_craftsman_desc")},cement_worker:function(){let e=t.race.high_pop?3/di.high_pop.vars()[0]:3;"ashland"===t.city.biome&&(e*=Si.ashland.vars()[1]),e=+la(e,"cement_worker").toFixed(2);let a=+la(t.civic.cement_worker.impact,"cement_worker").toFixed(2)*(t.tech.cement>=4?1.2:1)*hi(t.civic.cement_worker.workers,"factory");return"ashland"===t.city.biome&&(a*=Si.ashland.vars()[1]),a=+a.toFixed(2),t.race.sappy?z("job_cement_worker_amber_desc",[a]):z("job_cement_worker_desc",[a,e])},banker:function(){let e=100*+la(t.civic.banker.impact,"banker").toFixed(2);return t.tech.banking>=10&&(e+=2*t.tech.stock_exchange),t.race.truthful&&(e*=1-di.truthful.vars()[0]/100),"republic"===t.civic.govern.type&&(e*=1.25),t.race.high_pop&&(e*=di.high_pop.vars()[1]/100),e=+e.toFixed(0),z("job_banker_desc",[e])},entertainer:function(){let e=t.tech.theatre;t.race.musical&&(e+=di.musical.vars()[0]),t.race.emotionless&&(e*=1-di.emotionless.vars()[0]/100),t.race.high_pop&&(e*=di.high_pop.vars()[1]/100),e=+la(e,"entertainer").toFixed(2);let a=t.race.high_pop?di.high_pop.vars()[1]/100:1;return a=+la(a,"entertainer").toFixed(2),t.tech.superstar?z("job_entertainer_desc2",[e,a]):z("job_entertainer_desc",[+e.toFixed(2)])},priest:function(){let e="";return e="theocracy"===t.civic.govern.type&&t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display?z("job_priest_desc2"):z("job_priest_desc"),t.tech.cleric&&(e+=` ${z("job_priest_desc3")}`),e},professor:function(){let e=+la(1,"professor"),a=+(t.race.studious?t.civic.professor.impact+di.studious.vars()[0]:t.civic.professor.impact),r=Oi("elven");return r>0&&(a+=di.studious.vars(1)[0]*r),e*=a,e*=t.race.pompous?1-di.pompous.vars()[0]/100:1,e*=hi(t.civic.professor.workers,"science"),t.tech.anthropology&&t.tech.anthropology>=3&&(e*=1+.05*t.city.temple.count),"theocracy"===t.civic.govern.type&&(e*=.75),e=+e.toFixed(2),z("job_professor_desc",[e])},scientist:function(){let e=+la(t.civic.scientist.impact,"scientist").toFixed(2);return e*=hi(t.civic.scientist.workers,"science"),t.tech.science>=6&&t.city.wardenclyffe&&(e*=1+t.civic.professor.workers*t.city.wardenclyffe.on*.01),t.space.satellite&&(e*=1+.01*t.space.satellite.count),"theocracy"===t.civic.govern.type&&(e*=t.tech.high_tech&&t.tech.high_tech>=12?t.tech.high_tech>=16?.75:.6:.5),e=+e.toFixed(2),"magic"===t.race.universe?z("job_wizard_desc",[e,+(.025*lc("magic")).toFixed(4)]):z("job_scientist_desc",[e])},colonist:()=>z(t.race.truepath?"job_colonist_desc_tp":"job_colonist_desc",[ea().red]),titan_colonist:()=>z("job_colonist_desc_tp",[ea().titan]),space_miner:()=>z("job_space_miner_desc"),hell_surveyor:()=>z("job_hell_surveyor_desc"),archaeologist(){let e=75*(i.arcology||0),a=(qe(t.portal.guard_post.on,"hellArmy",0)+e)/5e3;a=a>1?1:a;let r=25e4;return t.race.high_pop&&(r*=di.high_pop.vars()[1]/100),z("job_archaeologist_desc",[Math.round(r*a).toLocaleString()])},pit_miner:()=>z("job_pit_miner_desc",[z("tau_planet",[_i[t.race.species].home])]),crew:()=>z("job_crew_desc")};function na(e){e||$("#civics").append($(`

          ${z("civics_jobs")}

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

          {{ civic.${e}.name }}

          {{ civic.${e}.workers | adjust('${e}') }} / {{ civic.${e}.max | adjust('${e}') }}
          `);l.append(t)}else{c=c||"info";let t=o?$(`

          {{ civic.${e}.name }}

          {{ sjob.${e} }}
          `):$(``);l.append(t)}if(l.append(u),$(o?"#servants":"#jobs").append(l),"crew"!==e){var d=$(`«`),_=$(`»`);u.append(d),u.append(_)}ic(o?{el:`#${n}`,data:{civic:t.civic,sjob:t.race.servants.jobs},methods:{showJob:e=>t.civic[e].display||"scavenger"===e&&t.race.servants.force_scavenger,add(){let a=b();for(let r=0;rt.race.servants.used;r++)t.race.servants.jobs[e]++,t.race.servants.used++},sub(){let a=b();for(let r=0;r0;r++)t.race.servants.jobs[e]--,t.race.servants.used--}}}:{el:`#${n}`,data:{civic:t.civic},methods:{showJob:e=>t.civic[e].display,add(){let a=b();for(let r=0;r0;r++)t.civic[e].workers++,t.civic[t.civic.d_job].workers--,t.civic[e].assigned=t.civic[e].workers},sub(){let a=b();for(let r=0;r0;r++)t.civic[e].workers--,t.civic[t.civic.d_job].workers++,t.civic[e].assigned=t.civic[e].workers},level:e=>0===t.civic[e].workers?"count has-text-danger":t.civic[e].workers===t.civic[e].max?"count has-text-success":t.civic[e].workers<=t.civic[e].max/3?"count has-text-caution":t.civic[e].workers<=.66*t.civic[e].max?"count has-text-warning":t.civic[e].workerst.civic.d_job===e},filters:{d_state:e=>t.civic.d_job===e?"*":"",event(a){if("unemployed"===e&&t.civic.unemployed.display||"hunter"===e&&!t.civic.unemployed.display){let e=xc(3,14);if(0===a&&e.length>0)return e}return a},adjust:(e,t)=>"titan_colonist"===t&&i.ai_colonist?e+ua(i.ai_colonist):e}}),Ei(n,(function(){return oa[e](o)}),{elm:`#${n} .job_label`,classes:"has-background-light has-text-dark"})}}function pa(){if(sc($("#servants")),t.race.servants){var e=$(`

          ${z("civics_servants")}

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

          ${z(e?"civics_skilled_servants":"craftsman_assigned")}

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

          ${r}

          {{ f.${s} }} / {{ p.on | maxScar }}
          `):"Quantium"===s&&(t.space.hasOwnProperty("zero_g_lab")||t.tauceti.hasOwnProperty("infectious_disease_lab"))?$(`

          ${r}

          {{ f.${s} }} / {{ e.on | maxQuantium }}
          `):$(`

          ${r}

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

          ${z("tab_portal")}

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

          ${r}

          ${s}
          `):e.append(`

          ${r}

          {{ support }}/{{ s_max }}${s}
          `),ic({el:`#sr${a}`,data:t.portal[i],filters:{filter(){return ga[a].info.filter(...arguments)}}})}else e.append(`

          ${r}

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

          ${z("portal_fortress_name")}

          `));let c=$("
          ");s.append(c);let o=$(`${z("fortress_defense")} {{ f.garrison | defensive }}`);c.append(o);let n=$(`${z("fortress_spotted")} {{ f.threat }}`);c.append(n);let l=$('{{ f.threat | threat }}');c.append(l);let u=$("
          ");s.append(u),u.append($(`${z("fortress_wall")} {{ f.walls }}%`));let d=$("
          ");s.append(d),d.append($(`${z("fortress_army")}`)),d.append($('«')),d.append($('{{ f.garrison | patrolling }}')),d.append($('»')),d.append($(`${z("fortress_patrol")}`)),d.append($('«')),d.append($('{{ f.patrols }}')),d.append($('»')),d.append($(`${z("fortress_patrol_size")}`)),d.append($('«')),d.append($('{{ f.patrol_size }}')),d.append($('»')),d.append($(``));let _="light"===t.settings.theme?' type="is-light"':' type="is-dark"',p=$("
          ");d.append(p),p.append($(`${z("fortress_patrol_reports")}`)),p.append($(`${z("fortress_surv_reports")}`)),p.append($(`${z("fortress_nocrew")}`)),a&&s.append($(`
          ${z("civics_garrison_training")} - ${z("arpa_to_complete")} {{ g.rate, g.progress | trainTime }} {{ g.progress }}%
          `)),ic({el:`#${r}`,data:{f:t.portal.fortress,g:t.civic.garrison,s:t.settings},methods:{defense:()=>z("fortress_defense"),hostiles:()=>ka("hostiles"),threatLevel:()=>ka("threatLevel"),aNext(){let e=b();t.portal.fortress.garrisont.civic.garrison.workers&&(t.portal.fortress.garrison=t.civic.garrison.workers),t.portal.fortress.assigned=t.portal.fortress.garrison,ic({el:"#garrison"},"update"))},aLast(){let e=b(),a=t.portal.fortress.patrols*t.portal.fortress.patrol_size;i.soul_forge&&(a+=wa()),t.portal.hasOwnProperty("guard_post")&&(a+=ua(t.portal.guard_post.on)),t.portal.fortress.garrison>a&&(t.portal.fortress.garrison-=e,t.portal.fortress.garrison0&&(t.portal.fortress.patrols-=e,t.portal.fortress.patrols<0&&(t.portal.fortress.patrols=0))},patSizeInc(){let e=b();t.portal.fortress.patrol_size1&&(t.portal.fortress.patrol_size-=e,t.portal.fortress.patrol_size<1&&(t.portal.fortress.patrol_size=1))},wall(){let e=t.portal.fortress.walls;return e>=75?"has-text-success":e<=25?"has-text-danger":"has-text-warning"},threaten(){let e=t.portal.fortress.threat;return e<1e3?"has-text-success":e>=2e3?"has-text-danger":"has-text-warning"},hire(){let e=b(),a=!0;for(;a&&e>0;){let r=Math.round(1.24**t.civic.garrison.workers*75)-50;r>25e3&&(r=25e3),t.civic.garrison.m_use>0&&(r*=1.1**t.civic.garrison.m_use),t.race.brute&&(r/=2),r=Math.round(r),t.civic.garrison.workers=r?(t.resource.Money.amount-=r,t.civic.garrison.workers++,t.civic.garrison.m_use++,t.portal.fortress.garrison++,t.portal.fortress.assigned=t.portal.fortress.garrison,ic({el:"#garrison"},"update")):a=!1,e--}},hireLabel:()=>ka("hireLabel"),observation(){t.settings.civTabs=$("#mainTabs > nav ul li").length-1,t.settings.tabLoad||Ra()}},filters:{defensive:e=>Ma(e),patrolling(e){let a=e-t.portal.fortress.patrols*t.portal.fortress.patrol_size;if(i.soul_forge){let e=wa();e<=a&&(a-=e)}return t.portal.hasOwnProperty("guard_post")&&(a-=ua(t.portal.guard_post.on)),a},threat:e=>z(e<1e3?"fortress_threat_level1":e<1500?"fortress_threat_level2":e>=5e3?"fortress_threat_level6":e>=3e3?"fortress_threat_level5":e>=2e3?"fortress_threat_level4":"fortress_threat_level3"),trainTime:(e,t)=>cc(0===e?-1:(100-t)/(4*e))}}),["hostiles","threatLevel","armyLabel","patLabel","patSizeLabel","hireLabel"].forEach((function(e){Ei(`hf${r}${e}`,(function(){switch(e){case"hostiles":case"threatLevel":return ka("hostiles");case"armyLabel":return z("fortress_stationed");case"patLabel":return z("fortress_patrol_desc",[t.portal.fortress.patrols]);case"patSizeLabel":return z("fortress_patrol_size_desc",[t.portal.fortress.patrol_size]);case"hireLabel":return ka("hireLabel")}}),{elm:`#${r} span.${e}`})})),Ei(`hf${r}observe`,(function(){return z("hell_observation_tooltip")}),{elm:`#${r} button.observe`})}function Ma(e){let a=e-t.portal.fortress.patrols*t.portal.fortress.patrol_size;if(i.soul_forge){let e=wa();e<=a&&(a-=e)}t.portal.hasOwnProperty("guard_post")&&(a-=ua(t.portal.guard_post.on));let r=0;if(t.civic.garrison.wounded>t.civic.garrison.workers-t.portal.fortress.garrison&&(r=t.civic.garrison.wounded-(t.civic.garrison.workers-t.portal.fortress.garrison),r>a&&(r=a)),i.war_droid){let e=i.war_droid-t.portal.fortress.patrols>0?i.war_droid-t.portal.fortress.patrols:0;a+=t.tech.hdroid?ua(2*e):ua(e)}let s=t.tech.turret?t.tech.turret>=2?70:50:35;return Math.round(qe(a,"hellArmy",r))+(i.turret?i.turret*s:0)}function Pa(e,a,r,s){let i=Math.round(Math.log2(e/t.portal.fortress.patrol_size/(a||1)))-Math.rand(0,a),c=0;if(i>0){i>t.portal.fortress.patrol_size&&(i=t.portal.fortress.patrol_size),i=Math.rand(r?1:0,i+1),c=Math.rand(0,i+1);let e=i-c;if(t.race.instinct){let t=Math.floor(c*(di.instinct.vars()[1]/100));c-=t,e+=t}s.wounded=e,s.died=c,t.civic.garrison.wounded+=e,t.civic.garrison.workers-=c,t.stats.died+=c}return c}function Oa(e){t.race.witch_hunter&&t.portal.hasOwnProperty("soul_capacitor")&&i.soul_capacitor>0&&(t.portal.soul_capacitor.energy+=e,t.portal.soul_capacitor.energy>t.portal.soul_capacitor.ecap&&(t.portal.soul_capacitor.energy=t.portal.soul_capacitor.ecap))}function Ca(e,a){switch(e){case"ruins":{let e=a||ua(i.guard_post),r=75*(i.arcology||0),s=qe(e,"hellArmy",0);t.race.holy&&(s*=1+di.holy.vars()[1]/100);let c=Oi("unicorn");c>0&&(s*=1+di.holy.vars(1)[1]/100*c);let o=(s+r)/5e3;return{supress:o>1?1:o,rating:s+r}}case"gate":{let e=Ca("ruins",a),r=100*(i.gate_turret||0);t.race.holy&&(r*=1+di.holy.vars()[1]/100);let s=Oi("unicorn");s>0&&(r*=1+di.holy.vars(1)[1]/100*s);let c=(e.rating+r)/7500;return{supress:c>1?1:c,rating:e.rating+r}}default:return 0}}const ja={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 Sa(e,a){let r=9999,s=1e7;switch(e){case"small":{let e=t.blood.prepared&&t.blood.prepared>=2?5e4:75e3;s=a?2.5*e:e,r=a?20:1}break;case"medium":s=a?45e4:18e4,r=a?100:4;break;case"large":s=a?925e3:375e3,r=a?500:20;break;case"titan":s=a?15e5:75e4,r=a?1500:75;break;case"collector":{let e=t.blood.prepared&&t.blood.prepared>=2?8e3:1e4;s=a?2.5*e:e,r=1}}return{s:r,c:s}}function Fa(){if((t.settings.tabLoad||2===t.settings.civTabs&&4===t.settings.govTabs)&&(sc($("#mechLab")),t.portal.hasOwnProperty("mechbay")&&t.settings.showMechLab)){let e=$("#mechLab");t.portal.mechbay.hasOwnProperty("blueprint")||(t.portal.mechbay.blueprint={size:"small",hardpoint:["laser"],chassis:"tread",equip:[],infernal:!1});let a=$('
          ');e.append(a);let r=$(`
          ${z("portal_mech_assembly")} - {{ b.size | slabel }} {{ b.chassis | clabel }}
          `);a.append(r),r.append(` | ${z("portal_mech_bay_space")}: {{ m.bay }} / {{ m.max }}`),r.append(` | ${z("portal_mech_sup_avail")}: {{ p.supply | round }} / {{ p.sup_max }}`);let s=t.blood.prepared&&t.blood.prepared>=3?`${z("portal_mech_infernal")} (${z("portal_mech_infernal_effect",[25])})`:"";a.append(`
          ${z("portal_mech_space")} {{ b.size | bay }} | ${z("portal_mech_cost")} {{ b.size | price }} | ${z("portal_mech_soul",[t.resource.Soul_Gem.name])} {{ b.size | soul }}${s}
          `),a.append("
          {{ b.size | desc }}
          ");let i=$('
          ');a.append(i);let c="";["small","medium","large","titan","collector"].forEach((function(e,t){c+=`${z(`portal_mech_size_${e}`)}`})),i.append(`\n ${c}\n `);let o="";["wheel","tread","biped","quad","spider","hover"].forEach((function(e,t){o+=`${z(`portal_mech_chassis_${e}`)}`})),i.append(`\n ${o}\n `);for(let e=0;e<4;e++){let t="";["laser","kinetic","shotgun","missile","flame","plasma","sonic","tesla"].forEach((function(a,r){t+=`${z(`portal_mech_weapon_${a}`)}`})),i.append(`\n ${t}\n `)}let n=t.blood.prepared?5:4;for(let e=0;e{{ '${a}' | equipment }}`})),i.append(`\n ${t}\n `)}a.append(`
          `),ic({el:"#mechAssembly",data:{p:t.portal.purifier,m:t.portal.mechbay,b:t.portal.mechbay.blueprint},methods:{build(){let e=Sa(t.portal.mechbay.blueprint.size,t.portal.mechbay.blueprint.infernal),a=e.c,r=e.s,s=za(t.portal.mechbay.blueprint.size),i=t.portal.mechbay.max-t.portal.mechbay.bay;if(t.portal.purifier.supply>=a&&i>=s&&t.resource.Soul_Gem.amount>=r){t.portal.purifier.supply-=a,t.resource.Soul_Gem.amount-=r;let e=Ac(t.portal.mechbay.blueprint);t.portal.mechbay.mechs.push(e),t.portal.mechbay.bay+=s,t.portal.mechbay.active++}},setSize(e){switch(t.portal.mechbay.blueprint.size=e,"collector"===e?t.portal.mechbay.blueprint.hardpoint.length=0:"small"===e||"medium"===e?(0===t.portal.mechbay.blueprint.hardpoint.length&&t.portal.mechbay.blueprint.hardpoint.push("laser"),t.portal.mechbay.blueprint.hardpoint.length=1):(0===t.portal.mechbay.blueprint.hardpoint.length&&t.portal.mechbay.blueprint.hardpoint.push("laser"),1===t.portal.mechbay.blueprint.hardpoint.length&&t.portal.mechbay.blueprint.hardpoint.push(t.portal.mechbay.blueprint.hardpoint.includes("laser")?"plasma":"laser"),"titan"===e?2===t.portal.mechbay.blueprint.hardpoint.length&&(t.portal.mechbay.blueprint.hardpoint.push(t.portal.mechbay.blueprint.hardpoint.includes("laser")?"shotgun":"laser"),t.portal.mechbay.blueprint.hardpoint.push(t.portal.mechbay.blueprint.hardpoint.includes("laser")?"kinetic":"laser")):t.portal.mechbay.blueprint.hardpoint.length=2),e){case"small":t.blood.prepared&&t.portal.mechbay.blueprint.equip.push("special"),t.portal.mechbay.blueprint.equip.length=t.blood.prepared?1:0;break;case"medium":t.portal.mechbay.blueprint.equip.length<1&&t.portal.mechbay.blueprint.equip.push("special"),t.blood.prepared&&t.portal.mechbay.blueprint.equip.push("shields"),t.portal.mechbay.blueprint.equip.length=t.blood.prepared?2:1;break;case"collector":case"large":t.portal.mechbay.blueprint.equip.length<1&&t.portal.mechbay.blueprint.equip.push("special"),t.portal.mechbay.blueprint.equip.length<2&&t.portal.mechbay.blueprint.equip.push("shields"),t.blood.prepared&&t.portal.mechbay.blueprint.equip.push("grapple"),t.portal.mechbay.blueprint.equip.length=t.blood.prepared?3:2;break;case"titan":t.portal.mechbay.blueprint.equip.length<1&&t.portal.mechbay.blueprint.equip.push("special"),t.portal.mechbay.blueprint.equip.length<2&&t.portal.mechbay.blueprint.equip.push("shields"),t.portal.mechbay.blueprint.equip.length<3&&t.portal.mechbay.blueprint.equip.push("grapple"),t.portal.mechbay.blueprint.equip.length<4&&t.portal.mechbay.blueprint.equip.push("seals"),t.blood.prepared&&t.portal.mechbay.blueprint.equip.push("stabilizer"),t.portal.mechbay.blueprint.equip.length=t.blood.prepared?5:4}},setType(e){t.portal.mechbay.blueprint.chassis=e},setWep(e,a){t.portal.mechbay.blueprint.hardpoint[a]=e,ic({el:"#mechAssembly"},"update")},setEquip(e,a){t.portal.mechbay.blueprint.equip[a]=e,ic({el:"#mechAssembly"},"update")},vis:e=>"collector"!==t.portal.mechbay.blueprint.size&&(0===e||"large"===t.portal.mechbay.blueprint.size&&e<2||"titan"===t.portal.mechbay.blueprint.size),eVis(e){let a=t.blood.prepared?1:0;switch(t.portal.mechbay.blueprint.size){case"small":return 1===a&&0===e;case"medium":return e<=0+a;case"collector":case"large":return e<=1+a;case"titan":return!0}}},filters:{bay:e=>za(e),price:e=>Sa(e,t.portal.mechbay.blueprint.infernal).c,soul:e=>Sa(e,t.portal.mechbay.blueprint.infernal).s,slabel:e=>z(`portal_mech_size_${e}`),clabel:e=>z(`portal_mech_chassis_${e}`),wlabel:e=>z(`portal_mech_weapon_${e}`),desc:e=>z(`portal_mech_size_${e}_desc`),round:e=>Math.round(e),equipment(e){if("special"!==e)return z(`portal_mech_equip_${e}`);let a="jumpjet";switch(t.portal.mechbay.blueprint.size){case"large":a="battery";break;case"titan":a="target"}return z(`portal_mech_equip_${a}`)}}}),["size","chassis","weapon","equip"].forEach((function(e){let a=1;"weapon"===e?a=4:"equip"===e&&(a=n);for(let r=0;r');e.append(l),Aa(),sc($("#mechList")),$("#mechList").append(`\n
          \n ${z("portal_mech_scrap")}\n | ${z("portal_mech")} #{{index + 1}}: \n {{ mech.infernal ? "${z("portal_mech_infernal")} " : "" }}{{ mech | size }} {{ mech | chassis }}\n
          \n
          \n \n
          \n
          \n \n
          \n
          \n
          `),ic({el:"#mechList",data:t.portal.mechbay,methods:{scrap(e){if(t.portal.mechbay.mechs[e]){let a=Sa(t.portal.mechbay.mechs[e].size,t.portal.mechbay.mechs[e].infernal),r=za(t.portal.mechbay.mechs[e].size);t.portal.purifier.supply+=Math.floor(a.c/3),t.resource.Soul_Gem.amount+=Math.floor(a.s/2),t.portal.purifier.supply>t.portal.purifier.sup_max&&(t.portal.purifier.supply=t.portal.purifier.sup_max),t.portal.mechbay.mechs.splice(e,1),t.portal.mechbay.bay-=r,t.portal.mechbay.active--}}},filters:{equipment(e,t){if("special"!==e)return z(`portal_mech_equip_${e}`);let a="jumpjet";switch(t){case"large":a="battery";break;case"titan":a="target"}return z(`portal_mech_equip_${a}`)},weapon:e=>z(`portal_mech_weapon_${e}`),size:e=>z(`portal_mech_size_${e.size}`),chassis:e=>z(`portal_mech_chassis_${e.chassis}`)}}),function(){let e=$("#mechList")[0];Sortable.create(e,{onEnd(e){let a=e.from.querySelectorAll(":scope > .mechRow");e.from.insertBefore(e.item,a[e.oldIndex+(e.oldIndex>e.newIndex)]);let r=t.portal.mechbay.mechs;r.splice(e.newDraggableIndex,0,r.splice(e.oldDraggableIndex,1)[0]),Ta()}})}(),$("#mechList .scrap").each((function(e,a){Ei(`mechList-scrap${e}`,(function(){let a=Sa(t.portal.mechbay.mechs[e].size,t.portal.mechbay.mechs[e].infernal);return z("portal_mech_scrap_refund",[Math.floor(a.c/3),Math.floor(a.s/2)])}),{elm:a})}))}}function za(e){switch(e){case"small":return 2;case"medium":return t.blood.prepared&&t.blood.prepared>=2?4:5;case"large":return t.blood.prepared&&t.blood.prepared>=2?8:10;case"titan":return t.blood.prepared&&t.blood.prepared>=2?20:25;case"collector":return 1;case"default":return 25}}function Aa(){let e=$("#mechList")[0];if(e){let t=Sortable.get(e);t&&t.destroy()}}function Ta(){let e=25*(l.mechbay||0),a=0,r=0,s=0;for(let i of t.portal.mechbay.mechs)a+=za(i.size),a<=e&&(r++,"small"===i.size&&s++);t.portal.mechbay.bay=a,t.portal.mechbay.max=e,t.portal.mechbay.active=r,t.portal.mechbay.scouts=s}function Ea(){let e=["sand","swamp","forest","jungle","rocky","gravel","muddy","grass","brush","concrete"];if(t.portal.spire.type=e[Math.floor(g(0,e.length))],t.portal.spire.count>=10){t.portal.spire.status={};let e=["freeze","hot","corrosive","humid","windy","hilly","mountain","radioactive","quake","dust","river","tar","steam","flooded","fog","rain","hail","chasm","dark","gravity"];if(Ia(e[Math.floor(g(0,e.length))]),t.portal.spire.count>=25&&t.portal.spire.count<=100){let a=105-t.portal.spire.count;Math.floor(g(0,a)<=5)&&Ia(e[Math.floor(g(0,e.length))])}else if(t.portal.spire.count>100&&t.portal.spire.count<=250){Ia(e[Math.floor(g(0,e.length))]);let a=260-t.portal.spire.count;Math.floor(g(0,a)<=10)&&Ia(e[Math.floor(g(0,e.length))])}else if(t.portal.spire.count>250&&t.portal.spire.count<=1e3){Ia(e[Math.floor(g(0,e.length))]),Ia(e[Math.floor(g(0,e.length))]);let a=1025-t.portal.spire.count;Math.floor(g(0,a)<=25)&&Ia(e[Math.floor(g(0,e.length))])}else t.portal.spire.count>1e3&&(Ia(e[Math.floor(g(0,e.length))]),Ia(e[Math.floor(g(0,e.length))]),Ia(e[Math.floor(g(0,e.length))]))}let a=Object.keys(ja).filter((function(e){let a=Object.keys(ja[e].nozone);return!a.some((e=>Object.keys(t.portal.spire.status).includes(e)))&&!a.includes(t.portal.spire.type)}));t.portal.spire.boss=a[Math.floor(g(0,a.length))]}function Ia(e){t.portal.spire.status.freeze||t.portal.spire.status.hot?"freeze"!==e&&"hot"!==e&&(t.portal.spire.status[e]=!0):t.portal.spire.status.rain||t.portal.spire.status.hail?"rain"!==e&&"hail"!==e&&(t.portal.spire.status[e]=!0):t.portal.spire.status[e]=!0}function Ka(e,a,r){return!e.equip.includes("special")||"small"!==e.size&&"medium"!==e.size&&"collector"!==e.size||a<1&&(a+=(1-a)*(r.includes("gravity")?.1:.2)),"small"!==e.size&&a<1&&(a+=(r.includes("fog")||r.includes("dark")?.005:.01)*t.portal.mechbay.scouts)>1&&(a=1),a}function La(e,t){return t<1&&0!==t&&e.equip.includes("special")&&"titan"===e.size&&(t+=.25*(1-t)),e.equip.includes("special")&&"large"===e.size&&(t*=1.02),t}function Na(e,t){let a=1;switch(t){case"freeze":e.equip.includes("radiator")||(a=.25);break;case"hot":e.equip.includes("coolant")||(a=.25);break;case"corrosive":e.equip.includes("ablative")||(a=e.equip.includes("shields")?.75:.25);break;case"humid":case"rain":e.equip.includes("seals")||(a=.75);break;case"windy":"hover"===e.chassis&&(a=.5);break;case"hilly":"spider"!==e.chassis&&(a=.75);break;case"mountain":"spider"===e.chassis||e.equip.includes("grapple")||(a=e.equip.includes("flare")?.75:.5);break;case"radioactive":e.equip.includes("shields")||(a=.5);break;case"quake":e.equip.includes("stabilizer")||(a=.25);break;case"dust":e.equip.includes("seals")||(a=.5);break;case"river":"hover"!==e.chassis&&(a=.65);break;case"tar":"quad"!==e.chassis&&(a="tread"===e.chassis||"wheel"===e.chassis?.5:.75);break;case"steam":e.equip.includes("shields")||(a=.75);break;case"flooded":"hover"!==e.chassis&&(a=.35);break;case"fog":e.equip.includes("sonar")||(a=.2);break;case"hail":e.equip.includes("ablative")||e.equip.includes("shields")||(a=.75);break;case"chasm":e.equip.includes("grapple")||(a=.1);break;case"dark":e.equip.includes("infrared")||(a=e.equip.includes("flare")?.25:.1);break;case"gravity":switch(e.size){case"medium":a=.8;break;case"large":a=.45;break;case"titan":a=.25}}return a}function Da(e,a){let r=a||t.portal.spire.type,s=1;switch(e.chassis){case"wheel":switch(r){case"sand":s=["small","medium"].includes(e.size)?.9:.85;break;case"swamp":s=["small","medium"].includes(e.size)?.35:.18;break;case"jungle":s=["small","medium"].includes(e.size)?.92:.85;break;case"rocky":s=["small","medium"].includes(e.size)?.65:.5;break;case"gravel":s=["small","medium"].includes(e.size)?1:.95;break;case"muddy":s=["small","medium"].includes(e.size)?.85:.58;break;case"grass":s=["small","medium"].includes(e.size)?1.3:1.2;break;case"brush":s=["small","medium"].includes(e.size)?.9:.8;break;case"concrete":s=["small","medium"].includes(e.size)?1.1:1}break;case"tread":switch(r){case"sand":s=["small","medium"].includes(e.size)?1.15:1.1;break;case"swamp":s=["small","medium"].includes(e.size)?.55:.4;break;case"forest":s=["small","medium"].includes(e.size)?1:.95;break;case"jungle":s=["small","medium"].includes(e.size)?.95:.9;break;case"rocky":s=["small","medium"].includes(e.size)?.65:.5;break;case"gravel":s=["small","medium"].includes(e.size)?1.3:1.2;break;case"muddy":s=["small","medium"].includes(e.size)?.88:.72}break;case"biped":switch(r){case"sand":s=["small","medium"].includes(e.size)?.78:.65;break;case"swamp":s=["small","medium"].includes(e.size)?.68:.5;break;case"forest":s=["small","medium"].includes(e.size)?1:.95;break;case"jungle":s=["small","medium"].includes(e.size)?.82:.7;break;case"rocky":s=["small","medium"].includes(e.size)?.48:.4;break;case"muddy":s=["small","medium"].includes(e.size)?.85:.7;break;case"grass":s=["small","medium"].includes(e.size)?1.25:1.2;break;case"brush":s=["small","medium"].includes(e.size)?.92:.85}break;case"quad":switch(r){case"sand":s=["small","medium"].includes(e.size)?.86:.75;break;case"swamp":s=["small","medium"].includes(e.size)?.58:.42;break;case"forest":s=["small","medium"].includes(e.size)?1.25:1.2;break;case"rocky":case"brush":s=["small","medium"].includes(e.size)?.95:.9;break;case"gravel":s=["small","medium"].includes(e.size)?.9:.8;break;case"muddy":s=["small","medium"].includes(e.size)?.68:.5;break;case"grass":s=["small","medium"].includes(e.size)?1:.95}break;case"spider":switch(r){case"sand":s=["small","medium"].includes(e.size)?.75:.65;break;case"swamp":s=["small","medium"].includes(e.size)?.9:.78;break;case"forest":s=["small","medium"].includes(e.size)?.82:.75;break;case"jungle":s=["small","medium"].includes(e.size)?.77:.65;break;case"rocky":s=["small","medium"].includes(e.size)?1.25:1.2;break;case"gravel":s=["small","medium"].includes(e.size)?.86:.75;break;case"muddy":s=["small","medium"].includes(e.size)?.92:.82;break;case"brush":s=["small","medium"].includes(e.size)?1:.95}break;case"hover":switch(r){case"swamp":s=["small","medium"].includes(e.size)?1.35:1.2;break;case"forest":s=["small","medium"].includes(e.size)?.65:.48;break;case"jungle":s=["small","medium"].includes(e.size)?.55:.35;break;case"rocky":s=["small","medium"].includes(e.size)?.82:.68;break;case"muddy":s=["small","medium"].includes(e.size)?1.15:1.08;break;case"brush":s=["small","medium"].includes(e.size)?.78:.7}}return s}function Ba(e){let a=e.infernal?31.25:25,r=Da(e),s=[];return Object.keys(t.portal.spire.status).forEach((function(t){s.push(t),a*=Na(e,t)})),a*=Ka(e,r,s),a}function Ga(e,a){let r=function(e){switch(e){case"small":return.0025;case"medium":return.0075;case"large":return.01;case"titan":return.012;default:return 0}}(e.size);if(0===r)return 0;if(e.hasOwnProperty("infernal")&&e.infernal&&t.blood.prepared&&t.blood.prepared>=3&&(r*=1.25),a){t.stats.achieve.gladiator&&t.stats.achieve.gladiator.l>0&&(r*=1+.1*t.stats.achieve.gladiator.l),t.blood.wrath&&(r*=1+t.blood.wrath/20),"titan"===e.size&&(r*=1.1);let a=Xc();t.stats.spire.hasOwnProperty(a)&&t.stats.spire[a].hasOwnProperty("dlstr")?r/=100+25*t.stats.spire[a].dlstr:r/=100;let s=0;for(let t=0;t0&&(r*=1+.2*t.stats.achieve.gladiator.l),t.blood.wrath&&(r*=1+t.blood.wrath/20),"concrete"===t.portal.spire.type)switch(e.size){case"small":r*=.92;break;case"medium":r*=.95;break;case"titan":r*=1.25}let a=Da(e),s=[];Object.keys(t.portal.spire.status).forEach((function(t){s.push(t),r*=Na(e,t)})),r*=Ka(e,a,s),r/=t.portal.spire.count;let i=0;for(let a=0;a nav ul li").length-1&&!e)return;let a=$("#mTabObserve");sc(a);let r=$('
          ');if(a.append(r),r.append(`\n \n \n \n \n \n \n `),ic({el:"#hellObservations",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(sc($("#h_Report")),sc($("#h_Analysis")),e){case 0:Wa();break;case 1:Ha()}return e}}}),t.settings.tabLoad)Wa(),Ha();else switch(t.settings.hellTabs){case 0:Wa();break;case 1:Ha()}}function Ha(){if(!t.settings.tabLoad&&1!==t.settings.hellTabs)return;let e=$("#h_Analysis"),a=$('
          ');e.append(a);let r=$("
          ");a.append(r);let s=$('
          ');a.append(s);let i=$('
          ');s.append(i);let c=$('
          '),o=$('
          ');i.append(c),i.append(o),r.append(`\n
          \n

          ${z("tab_settings")}

          \n
          \n
          \n ${z("hell_analysis_expanded")}\n ${z("hell_analysis_average")}\n ${z("hell_analysis_hyperSlow")}\n
          \n
          \n ${z("hell_analysis_time_game_days")}\n ${z("hell_analysis_time_seconds")}\n ${z("hell_analysis_time_minutes")}\n ${z("hell_analysis_time_hours")}\n ${z("hell_analysis_time_days")}\n
          \n `),ic({el:"#hellAnalysis",data:{s:t.portal.observe.settings,r:t.race}});let n=function(e,t){e=e.toFixed(t);let a=Math.floor(e),r=(+(e-a).toFixed(t)).toString().substring(1);return a.toLocaleString()+r},l=function(e,a,r){if(e){switch("game_days"!==r&&t.portal.observe.settings.hyperSlow&&(t.race.slow&&(a*=1+di.slow.vars()[0]/100),t.race.hyper&&(a*=1-di.hyper.vars()[0]/100)),e/=a,r){case"seconds":e/=5;break;case"minutes":e*=12;break;case"hours":e*=720;break;case"days":e*=17280}e=t.portal.observe.settings.expanded?n(e,5):q(e,5,!0)}return z("hell_analysis_time_average",[e,z(`hell_analysis_time_${r}_abbr`)])},u=function(e,a){if(!e)return;let r=$(`#${e}`);sc(r),r.append(`\n

          ${z("hell_analysis_"+a)}

          ${"period"===a?'

          {{ | resetLabel }}

          ':""}
          \n

          {{ st.${a}.start | startLabel }}

          \n

          {{ st.${a}.days, s.display | time }}

          \n

          {{ st.${a}.kills, 'kills', s.average | genericMulti }}

          {{ s.dropKills | dropdownLabel }}

          \n
          \n

          {{ st.${a}.kills.drones, 'kills_drones', s.average | genericSub }}

          \n

          {{ st.${a}.kills.patrols, 'kills_patrols', s.average | genericSub }}

          \n

          {{ st.${a}.kills.sieges, 'kills_sieges', s.average | genericSub }}

          \n

          {{ st.${a}.kills.guns, 'kills_guns', s.average | genericSub }}

          \n

          {{ st.${a}.kills.soul_forge, 'kills_soul_forge', s.average | genericSub }}

          \n

          {{ st.${a}.kills.turrets, 'kills_turrets', s.average | genericSub }}

          \n
          \n

          {{ st.${a}.gems, 'gems', s.average | genericMulti }}

          {{ s.dropGems | dropdownLabel }}

          \n
          \n

          {{ st.${a}.gems.patrols, 'gems_patrols', s.average | genericSub }}

          \n

          {{ st.${a}.gems.guns, 'gems_guns', s.average | genericSub }}

          \n

          {{ st.${a}.gems.soul_forge, 'gems_soul_forge', s.average | genericSub }}

          \n

          {{ st.${a}.gems.crafted, 'gems_crafted', s.average | genericSub }}

          \n

          {{ st.${a}.gems.turrets, 'gems_turrets', s.average | genericSub }}

          \n

          {{ st.${a}.gems.surveyors, 'gems_surveyors', s.average | genericSub }}

          \n
          \n

          {{ st.${a}.wounded, 'wounded', s.average | generic }}

          \n

          {{ st.${a}.died, 'died', s.average | generic }}

          \n

          {{ st.${a}.revived, 'revived', s.average | generic }}

          \n

          {{ st.${a}.surveyors, 'surveyors', s.average | generic }}

          \n

          {{ st.${a}.sieges, 'sieges', s.average | generic }}

          \n `),ic({el:`#${e}`,data:{st:t.portal.observe.stats,s:t.portal.observe.settings,p:t.portal,r:t.race,sg:t.resource.Soul_Gem},methods:{resetObservations(){Object.keys(t.portal.observe.stats.period).forEach((function(e){["kills","gems"].includes(e)?Object.keys(t.portal.observe.stats.period[e]).forEach((function(a){t.portal.observe.stats.period[e][a]=0})):"start"===e?t.portal.observe.stats.period.start={year:t.city.calendar.year,day:t.city.calendar.day}:t.portal.observe.stats.period[e]=0}))},toggleDropdown(e){t.portal.observe.settings[e]=!t.portal.observe.settings[e]}},filters:{generic:(e,r,s)=>z("hell_analysis_number_display",s?[z(`hell_analysis_${r}`),l(e,t.portal.observe.stats[a].days,t.portal.observe.settings.display)]:[z(`hell_analysis_${r}`),t.portal.observe.settings.expanded?(+e.toFixed(5)).toLocaleString():q(e,5,!0)]),genericSub:(e,r,s)=>s?"ᄂ"+z("hell_analysis_number_display",[z(`hell_analysis_${r}`),l(e,t.portal.observe.stats[a].days,t.portal.observe.settings.display)]):"ᄂ"+z("hell_analysis_number_display",[z(`hell_analysis_${r}`),t.portal.observe.settings.expanded?(+e.toFixed(5)).toLocaleString():q(e,5,!0)]),genericMulti(e,r,s){let i=0;return Object.keys(e).forEach((function(t){i+=e[t]})),z("hell_analysis_number_display",s?[z(`hell_analysis_${r}`),l(i,t.portal.observe.stats[a].days,t.portal.observe.settings.display)]:[z(`hell_analysis_${r}`),t.portal.observe.settings.expanded?(+i.toFixed(5)).toLocaleString():q(i,5,!0)])},time(e,a){switch("game_days"!==a&&t.portal.observe.settings.hyperSlow&&(t.race.slow&&(e*=1+di.slow.vars()[0]/100),t.race.hyper&&(e*=1-di.hyper.vars()[0]/100)),a){case"seconds":e*=5;break;case"minutes":e/=12;break;case"hours":e/=720;break;case"days":e/=17280}return z("hell_analysis_time",[z(`hell_analysis_time_${a}`),t.portal.observe.settings.expanded?n(e,8):q(e,5,!0)])},resetLabel:()=>z("hell_analysis_period_reset"),startLabel:e=>z("hell_analysis_start",[e.year,e.day]),dropdownLabel:e=>e?"⮝":"⮟"}})};u("hellAnalysisTotal","total"),u("hellAnalysisPeriod","period"),a=$("#hellAnalysis");let d=$("
          ");a.append(d),d.append(`

          ${z("hell_graph_create")}

          `);let _=$('
          ');d.append(_),ic({el:"#hellGraphCreator",methods:{createGraph(){this.$buefy.modal.open({parent:this,component:{template:''}});let e=setInterval((function(){if($("#modalBox").length>0){clearInterval(e),$("#modalBox").append($(`

          ${z("hell_graph_title")}

          `));var a=$('
          ');$("#modalBox").append(a);let r=$('
          ');a.append(r);let s={chartType:"pie",name:"",chartName:"",data:[],radioFake:"",showGroups:!0},i={show:!1,message:""};r.append(`\n

          ${z("hell_graph_name")}

          \n `),r.append(`\n
          \n
          \n

          ${z("hell_graph_type")}

          \n
          \n
          \n ${z("hell_graph_pie")}\n
          \n
          \n `);let c=$('
          ');r.append(c),c.append(`

          ${z("hell_graph_data")}

          `),Object.keys(t.portal.observe.stats).forEach((function(e){["kills","gems"].forEach((function(t){c.append(`
          \n ${z("hell_graph_datapoint",[z(`hell_analysis_${e}`),z(`hell_analysis_${t}`)])}\n
          `)}))})),r.append(`\n
          \n
          \n

          {{ e.message }}

          \n
          \n
          \n \n
          \n
          \n `),ic({el:"#specialModal",data:{s,e:i,sg:t.resource.Soul_Gem},methods:{nameUpdate(e){s.chartName!==e&&(i.show=!1,s.chartName=e)},dataOptions(e){switch(e){case"pie":s.showGroups=!0;break;case"bar":s.showGroups=!1}},setData(e,t){i.show=!1,s.data=[e,t]},createGraph(){if(!s.name)return i.show=!0,void(i.message=z("hell_graph_error_name_blank"));if(0===s.data.length)return i.show=!0,void(i.message=z("hell_graph_error_data_missing"));let e=[],a=[];"pie"===s.chartType&&Object.keys(t.portal.observe.stats[s.data[0]][s.data[1]]).forEach((function(t){e.push(z(`hell_analysis_${s.data[1]}_${t}`)),a.push([s.data[0],s.data[1],t])}));let r=function(e,a,r,s,i){let c=`hellGraph-${t.portal.observe.graphID}`;return t.portal.observe.graphID++,t.portal.observe.graphs[c]={id:c,chartID:`${c}-chart`,name:e,type:a,labels:r,data:s,settings:i},c}(s.chartName,s.chartType,e,a,{title:s.chartName});Ua(_,t.portal.observe.graphs[r]),document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape"})),document.dispatchEvent(new KeyboardEvent("keyup",{key:"Escape"}))}}})}}),50)}}}),Object.keys(t.portal.observe.graphs).forEach((function(e){Ua(_,t.portal.observe.graphs[e])}))}function Ua(e,a){let r=a.id;p[r]&&p[r].graph.destroy();let s=$(`
          `);e.append(s),s.append(`
          \n
          \n

          \n

          Delete

          \n
          \n
          \n

          ${a.name}

          \n
          \n
          `);let i=$('
          ');s.append(i),ic({el:`#graph-${r}-controls`,methods:{deleteGraph(){p[r].graph.destroy(),delete p[r],delete t.portal.observe.graphs[r],sc($(`#graph-${r}-container`),!0)}}});let c=$(``);i.append(c),p[r]={data:a.data},"pie"===a.type&&(p[r].graph=function(e,a,r,s){let i=[];return r.forEach((function(e){i.push(3===e.length?t.portal.observe.stats[e[0]][e[1]][e[2]]:t.portal.observe.stats[e[0]][e[1]])})),new Chart(e,{type:"pie",data:{labels:a,datasets:[{data:i,backgroundColor:["rgb(255, 99, 132)","rgb(54, 162, 235)","rgb(255, 205, 86)","rgb(201, 203, 207)","rgb(75, 192, 192)","#B86BFF","#48c774"],hoverOffset:4}]},options:{plugins:{legend:{display:!1}}}})}(c,a.labels,a.data,a.settings))}function Wa(){if(!t.settings.tabLoad&&0!==t.settings.hellTabs)return;Qa();let e="",a=$("#h_Report"),r=$('
          ');a.append(r);let s=$('
          ');r.append(s),s.append(`

          ${z("hell_report_log")}

          \n \n \n\t\t \n \n
          `);let i=$('
          ');s.append(i),r.append($('
          '));let c={year:0,day:0};Object.keys(_).length&&(c.year=Object.keys(_)[0].split("-")[1],c.day=Object.keys(_[`year-${c.year}`])[0].split("-")[1]);let o=function(a,r){for(Qa(!0)&&(e="",a=Object.keys(_)[0].split("-")[1],r=Object.keys(_[`year-${c.year}`])[0].split("-")[1]);a${z("year")+" "+a+" | "+z("day")+" "+r}${_[`year-${a}`][`day-${r}`].foundGem?'':""}\n `+e;r=1}for(;r${z("year")+" "+a+" | "+z("day")+" "+r}${_[`year-${a}`][`day-${r}`].foundGem?``:""}\n `+e;c.year=a,c.day=r;let s=$("#hellReportList");sc(s),s.append(e),ic({el:"#hellReportList",methods:{reportLoad(e,t){n(e,t)}}})},n=function(e,a){if(!e||!a)return;let r=$("#hellReportDisplay");sc(r);let s=_[`year-${e}`][`day-${a}`],i=$('
          ');r.append(i);let c=0,o=0;if(Object.keys(s.stats.kills).forEach((function(e){c+=s.stats.kills[e]})),Object.keys(s.stats.gems).forEach((function(e){o+=s.stats.gems[e]})),i.append(`

          ${z("hell_report_log_stats",[e,a])}

          `),i.append(`
          \n

          ${z("hell_report_log_stats_kills",[c])}

          \n

          ${z("hell_report_log_stats_gems",[o])}

          \n

          ${z("hell_report_log_stats_wounded",[s.stats.wounded])}

          \n

          ${z("hell_report_log_stats_died",[s.stats.died])}

          \n
          `),r.append(`

          ${z("hell_report_log_report",[e,a])}

          `),r.append(`

          ${z("hell_report_log_start",[s.start])}

          `),s.drones&&Object.keys(s.drones).forEach((function(e){let t=s.drones[e],a=z("hell_report_log_obj_counter",[z("portal_war_drone_title"),e]);t.encounter?r.append(`

          ${z("hell_report_log_encounter",[a,t.kills])}

          `):r.append(`

          ${z("hell_report_log_encounter_fail",[a])}

          `)})),s.patrols&&Object.keys(s.patrols).forEach((function(e){let a=s.patrols[e],i=z("hell_report_log_obj_counter",[z("hell_report_log_patrol"),e]);if(i=a.droid?z("hell_report_log_patrol_droid",[i]):i,a.encounter){let e=$("

          ");a.ambush?e.append(`${z("hell_report_log_patrol_ambush",[i,a.kills])}`):e.append(`${z("hell_report_log_encounter",[i,a.kills])}`),a.wounded&&e.append(`${a.wounded>1?z("hell_report_log_patrol_wounded_plural",[a.wounded]):z("hell_report_log_patrol_wounded")}`),a.died&&e.append(`${a.died>1?z("hell_report_log_patrol_killed_plural",[a.died]):z("hell_report_log_patrol_killed")}`),a.gem>0&&e.append(`${z("hell_report_log_soul_find",[t.resource.Soul_Gem.name,a.gem])}`),r.append(e)}else r.append(`

          ${z("hell_report_log_encounter_fail",[i])}

          `)})),s.surveyor_finds&&Object.keys(s.surveyor_finds).forEach((function(e){let a=s.surveyor_finds[e],i=z("hell_report_log_obj_counter",[z("job_hell_surveyor"),e]),c=$("

          ");c.append(`${z("hell_report_log_search",[i,a.bodies])}`),a.gem>0&&c.append(`${z("hell_report_log_soul_search",[t.resource.Soul_Gem.name,a.gem])}`),r.append(c)})),s.revived&&r.append(`

          ${s.revived>1?z("hell_report_log_revived_plural",[s.revived]):z("hell_report_log_revived")}

          `),s.patrols_lost&&r.append(`

          ${z("hell_report_log_patrols_lost",[s.patrols_lost])}

          `),s.siege&&(s.siege.destroyed?r.append(`

          ${z("hell_report_log_siege",[s.siege.surveyors,s.siege.soldiers,s.siege.kills])}

          `):r.append(`

          ${z("hell_report_log_siege_fail",[s.siege.damage,s.siege.kills])}

          `)),s.demons&&r.append(`

          ${z("hell_report_log_demons",[s.demons])}

          `),s.surveyors&&r.append(`

          ${s.surveyors>1?z("hell_report_log_surveyors_plural",[s.surveyors]):z("hell_report_log_surveyors")}

          `),s.soul_attractors&&r.append(`

          ${z("hell_report_log_soul_attractors",[s.soul_attractors])}

          `),s.gun_emplacements&&Object.keys(s.gun_emplacements).forEach((function(e){let a=$("

          "),i=s.gun_emplacements[e],c=z("hell_report_log_obj_counter",[z("portal_gun_emplacement_title"),e]);a.append($(`${z("hell_report_log_misc_kills",[c,i.kills,z("portal_pit_name")])}`)),i.gem&&a.append(`${z("hell_report_log_soul_find",[t.resource.Soul_Gem.name,1])}`),r.append(a)})),s.soul_forge){let e=$("

          ");e.append(`${z("hell_report_log_soul_forge",[s.soul_forge.kills])}`),s.soul_forge.gem&&e.append(`${z("hell_report_log_soul_find",[t.resource.Soul_Gem.name,1])}`),s.soul_forge.gem_craft&&e.append(`${z("hell_report_log_soul_craft",[s.soul_forge.corrupt?z("resource_Corrupt_Gem_name"):t.resource.Soul_Gem.name])}`),r.append(e)}s.gate_turrets&&Object.keys(s.gate_turrets).forEach((function(e){let a=$("

          "),i=s.gate_turrets[e],c=z("hell_report_log_obj_counter",[z("portal_gate_turret_title"),e]);a.append(`${z("hell_report_log_misc_kills",[c,i.kills,z("portal_gate_name")])}`),i.gem&&a.append(`${z("hell_report_log_soul_find",[t.resource.Soul_Gem.name,1])}`),r.append(a)})),ic({el:"#hellReportDisplay",data:{g:t.resource.Soul_Gem}})};if(0!==c.day){o(c.year,c.day);let e=c.year,a=c.day;a-1==0?(e--,a=t.city.calendar.orbit):a--,n(e,a)}else c.year=t.city.calendar.year,c.day=t.city.calendar.day;ic({el:"#hellReportLogTitle",methods:{updateList(){o(c.year,c.day)}}}),Ei("hellReportLogs",(function(){return z("hell_report_log_tooltip",[2500])}),{elm:"#hellReport .reportList div:first-child h2"})}function Qa(e){if(!document.getElementById("hellReportList")||e){let e=!1,a=2500,r=(Object.keys(_).length-1)*t.city.calendar.orbit+t.city.calendar.day;if(r>a){let s=Object.keys(_[Object.keys(_)[0]]).length;for(r-t.city.calendar.orbit+s>a&&(e=!0,r-=s,delete _[Object.keys(_)[0]]);r>a;)r-=t.city.calendar.orbit,delete _[Object.keys(_)[0]]}return e}}const Za={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},Va={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},Ja={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 Xa(){let e={Plywood:[{r:"Lumber",a:100}],Brick:t.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(t.race.wasteful){let t=1+di.wasteful.vars()[0]/100;Object.keys(e).forEach((function(a){for(let r=0;r=2){let e=t.tech.foundry>=5?t.tech.foundry>=8?.08:.05:.03;tr.general.add.push({name:z("city_foundry"),manual:t.city.foundry.count*e,auto:t.city.foundry.count*e})}if(t.tech.foundry>=3&&Object.keys(tr).forEach((function(e){t.city.foundry[e]&&t.city.foundry[e]>1&&tr[e].add.push({name:z("tech_apprentices"),manual:(t.city.foundry[e]-1)*Pe(.03),auto:(t.city.foundry[e]-1)*Pe(.03)})})),t.tech.foundry>=4&&t.city.sawmill&&tr.Plywood.add.push({name:z("city_sawmill"),manual:.02*t.city.sawmill.count,auto:.02*t.city.sawmill.count}),t.tech.foundry>=6&&tr.Brick.add.push({name:z("city_foundry"),manual:.02*t.city.foundry.count,auto:.02*t.city.foundry.count}),t.tech.foundry>=7&&(tr.general.add.push({name:z("city_factory")+` (${z("tab_city5")})`,manual:.05*i.factory,auto:.05*i.factory}),t.tech.mars>=4&&tr.general.add.push({name:z("city_factory")+` (${z("tab_space")})`,manual:.05*i.red_factory,auto:.05*i.red_factory}),t.interstellar.int_factory&&i.int_factory&&tr.general.add.push({name:z("interstellar_int_factory_title"),manual:.1*i.int_factory,auto:.1*i.int_factory})),t.space.fabrication&&c.fabrication&&tr.general.add.push({name:z("space_red_fabrication_title"),manual:c.fabrication*t.civic.colonist.workers*Pe(e?.05:.02),auto:c.fabrication*t.civic.colonist.workers*Pe(e?.05:.02)}),i.stellar_forge&&(tr.Mythril.add.push({name:z("interstellar_stellar_forge_title"),manual:.05*i.stellar_forge,auto:.05*i.stellar_forge}),tr.general.add.push({name:z("interstellar_stellar_forge_title"),manual:0,auto:.1*i.stellar_forge})),i.hell_forge){let e=Ca("ruins");tr.general.add.push({name:z("portal_hell_forge_title"),manual:0,auto:.75*i.hell_forge*e.supress}),tr.Scarletite.multi.push({name:z("portal_ruins_supressed"),manual:1,auto:e.supress})}if(t.tauceti.tau_factory&&c.tau_factory&&tr.general.add.push({name:z("tau_home_tau_factory"),manual:0,auto:c.tau_factory*(t.tech.isolation?2.75:.9)}),t.tech.isolation&&t.tauceti.colony&&c.colony&&tr.general.add.push({name:z("tau_home_colony"),manual:.5*c.colony,auto:.5*c.colony}),c.zero_g_lab&&i.zero_g_lab||c.infectious_disease_lab&&i.infectious_disease_lab){let e=mt("spc_enceladus");tr.Quantium.multi.push({name:z("space_syndicate"),manual:1,auto:e})}if(t.tech.alien_crafting&&c.infectious_disease_lab&&i.infectious_disease_lab){let e=1+.65*Math.min(c.infectious_disease_lab,i.infectious_disease_lab);tr.Quantium.multi.push({name:z("tech_infectious_disease_lab_alt"),manual:1,auto:e})}if(t.race.crafty&&tr.general.add.push({name:z("wiki_arpa_crispr_crafty"),manual:.03,auto:.03}),t.race.ambidextrous&&tr.general.add.push({name:z("trait_ambidextrous_name"),manual:di.ambidextrous.vars()[0]*t.race.ambidextrous/100,auto:di.ambidextrous.vars()[0]*t.race.ambidextrous/100}),t.race.rigid&&tr.general.add.push({name:z("trait_rigid_name"),manual:-di.rigid.vars()[0]/100,auto:-di.rigid.vars()[0]/100}),"socialist"===t.civic.govern.type&&tr.general.multi.push({name:z("govern_socialist"),manual:1+re.socialist()[0]/100,auto:1+re.socialist()[0]/100}),t.race.casting&&t.race.casting.crafting){let e=1+t.race.casting.crafting/(t.race.casting.crafting+75),a=1+2*t.race.casting.crafting/(2*t.race.casting.crafting+75);tr.general.multi.push({name:z("modal_pylon_casting"),manual:e,auto:a})}"magic"===t.race.universe&&tr.general.multi.push({name:z("universe_magic"),manual:.8,auto:.8}),t.tech.v_train&&tr.general.multi.push({name:z("tech_vocational_training"),manual:1,auto:2}),t.genes.crafty&&tr.general.multi.push({name:z("tab_arpa_crispr")+" "+z("wiki_arpa_crispr_crafty"),manual:1,auto:1+.5*(t.genes.crafty-1)}),t.race.living_tool&&tr.general.multi.push({name:z("trait_living_tool_name"),manual:1,auto:1+di.living_tool.vars()[1]/100}),t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=1&&tr.general.multi.push({name:z("evo_challenge_orbit_decay"),manual:1,auto:1.1}),t.race.ambidextrous&&tr.general.multi.push({name:z("trait_ambidextrous_name"),manual:1,auto:1+di.ambidextrous.vars()[1]*t.race.ambidextrous/100}),t.blood.artisan&&tr.general.multi.push({name:z("tab_arpa_blood")+" "+z("arpa_blood_artisan_title"),manual:1,auto:1+t.blood.artisan/100});let a=Br();a>0&&tr.general.multi.push({name:z("faith"),manual:1,auto:1+a/("antimatter"===t.race.universe?1.5:3)}),t.prestige.Plasmid.count>0&&tr.general.multi.push({name:z("resource_Plasmid_plural_name"),manual:Gr()/8+1,auto:Gr()/8+1}),t.genes.challenge&&t.genes.challenge>=2&&tr.general.multi.push({name:z("mastery"),manual:1+uc()/(t.race.weak_mastery?50:100),auto:1+uc()/(t.race.weak_mastery?50:100)})}});var tr;function ar(e){if(e)switch(e){case"market":Sr();break;case"storage":Fr();break;case"ejector":Ar();break;case"supply":Er();break;case"alchemy":Kr()}else Sr(),Fr(),Ar(),Er(),Kr()}function rr(e){"market"===e?(ar("market"),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let t=a.resource[e].color;if(a.resource[e].tradable){var r=$(`
          `);$("#market").append(r),dr(`#market-${e}`,r,e,t,!0)}})),ir()):"storage"===e?(ar("storage"),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let t=a.resource[e].color;if(a.resource[e].stackable){var r=$(`
          `);$("#resStorage").append(r),vr(`#stack-${e}`,r,e,t)}})),ir()):"ejector"===e?(ar("ejector"),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let t=a.resource[e].color;Ja[e]&&Tr(e,t)}))):"supply"===e?(ar("supply"),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let t=a.resource[e].color;Ya[e]&&Ir(e,t)}))):"alchemy"===e&&(ar("alchemy"),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let r=a.resource[e].color,s=a.resource[e].tradable;Va[e]&&"magic"===t.race.universe&&(t.resource[e].basic=s,Lr(e,r,s))})))}function sr(e){if("protoplasm"===t.race.species){let a=100;t.stats.achieve.mass_extinction&&t.stats.achieve.mass_extinction.l>1&&(a+=50*(t.stats.achieve.mass_extinction.l-1)),cr("RNA",e,a,1,!1),cr("DNA",e,a,1,!1)}cr("Money",e,1e3,1,!1,!1,"success"),cr(t.race.species,e,0,0,!1,!1,"warning"),cr("Slave",e,0,0,!1,!1,"warning"),cr("Mana",e,0,1,!1,!1,"warning"),cr("Energy",e,0,0,!1,!1,"warning"),cr("Sus",e,0,0,!1,!1,"warning"),cr("Knowledge",e,100,1,!1,!1,"warning"),cr("Zen",e,0,0,!1,!1,"warning"),cr("Crates",e,0,0,!1,!1,"warning"),cr("Containers",e,0,0,!1,!1,"warning"),cr("Food",e,250,1,!0,!0),cr("Lumber",e,200,1,!0,!0),cr("Chrysotile",e,200,1,!0,!0),cr("Stone",e,200,1,!0,!0),cr("Crystal",e,200,1,!0,!0),cr("Furs",e,100,1,!0,!0),cr("Copper",e,100,1,!0,!0),cr("Iron",e,100,1,!0,!0),cr("Aluminium",e,50,1,!0,!0),cr("Cement",e,100,1,!0,!0),cr("Coal",e,50,1,!0,!0),cr("Oil",e,0,1,!0,!1),cr("Uranium",e,10,1,!0,!1),cr("Steel",e,50,1,!0,!0),cr("Titanium",e,50,1,!0,!0),cr("Alloy",e,50,1,!0,!0),cr("Polymer",e,50,1,!0,!0),cr("Iridium",e,0,1,!0,!0),cr("Helium_3",e,0,1,!0,!1),cr("Water",e,0,1,!1,!1,"advanced"),cr("Deuterium",e,0,1,!1,!1,"advanced"),cr("Neutronium",e,0,1,!1,!1,"advanced"),cr("Adamantite",e,0,1,!1,!0,"advanced"),cr("Infernite",e,0,1,!1,!1,"advanced"),cr("Elerium",e,1,1,!1,!1,"advanced"),cr("Nano_Tube",e,0,1,!1,!1,"advanced"),cr("Graphene",e,0,1,!1,!0,"advanced"),cr("Stanene",e,0,1,!1,!0,"advanced"),cr("Bolognium",e,0,1,!1,!0,"advanced"),cr("Vitreloy",e,0,1,!1,!0,"advanced"),cr("Orichalcum",e,0,1,!1,!0,"advanced"),cr("Unobtainium",e,0,1,!1,!1,"advanced"),cr("Materials",e,0,1,!1,!1,"advanced"),cr("Horseshoe",e,-2,0,!1,!1,"advanced"),cr("Nanite",e,0,1,!1,!1,"advanced"),cr("Genes",e,-2,0,!1,!1,"advanced"),cr("Soul_Gem",e,-2,0,!1,!1,"advanced"),cr("Plywood",e,-1,0,!1,!1,"danger"),cr("Brick",e,-1,0,!1,!1,"danger"),cr("Wrought_Iron",e,-1,0,!1,!1,"danger"),cr("Sheet_Metal",e,-1,0,!1,!1,"danger"),cr("Mythril",e,-1,0,!1,!1,"danger"),cr("Aerogel",e,-1,0,!1,!1,"danger"),cr("Nanoweave",e,-1,0,!1,!1,"danger"),cr("Scarletite",e,-1,0,!1,!1,"danger"),cr("Quantium",e,-1,0,!1,!1,"danger"),cr("Corrupt_Gem",e,-2,0,!1,!1,"caution"),cr("Codex",e,-2,0,!1,!1,"caution"),cr("Cipher",e,0,1,!1,!1,"caution"),cr("Demonic_Essence",e,-2,0,!1,!1,"caution"),e||(nr("Blood_Stone","caution"),nr("Artifact","caution"),nr("Plasmid"),nr("AntiPlasmid"),nr("Phage"),nr("Dark"),nr("Harmony"),nr("AICore"))}function ir(){"protoplasm"!==t.race.species&&(function(){if(!t.settings.tabLoad&&(4!==t.settings.civTabs||0!==t.settings.marketTabs))return;let e=t.race.no_trade?" nt":"";var a=$(`
          ${z("resource_market_trade_routes")} / {{ mtrade }}
          `);a.append($(`${z("cancel_all_routes")}`)),$("#market").append(a),ic({el:"#tradeTotal",data:t.city.market,methods:{zero(){Object.keys(t.resource).forEach((function(e){t.resource[e].trade&&(t.city.market.trade-=Math.abs(t.resource[e].trade),t.resource[e].trade=0,xr(e))}))}},filters:{tdeCnt(e){let a=xc(17,11);return(100===e&&!t.tech.isolation&&!t.race.cataclysm||10===e&&(t.tech.isolation||t.race.cataclysm))&&a.length>0?"10"+a:e}}}),Ei("tradeTotalPopover",(function(){let e=$('
          ');return r.hasOwnProperty("t_route")&&Object.keys(r.t_route).forEach((function(t){r.t_route[t]>0&&e.append(``)})),e.append(``),e}),{elm:"#tradeTotalPopover > span"})}(),(t.settings.tabLoad||4===t.settings.civTabs&&0===t.settings.marketTabs)&&($("#market").append($(`

          ${z("galaxy_trade")}

          `)),pr()),function(){if(t.settings.tabLoad||4===t.settings.civTabs&&1===t.settings.marketTabs){var e=$(`
          ${z("resource_Crates_name")}{{ cr.amount }} / {{ cr.max }}${z("resource_Containers_name")}{{ cn.amount }} / {{ cn.max }}
          `);$("#resStorage").append(e),ic({el:"#crateTotal",data:{cr:t.resource.Crates,cn:t.resource.Containers}})}}())}function cr(e,r,s,i,c,o,n){if(n=n||"info",t.resource[e]||(t.resource[e]={}),or(e),t.race.artifical&&"Food"===e&&(o=!1),r)return;var l;t.resource[e].hasOwnProperty("display")||(t.resource[e].display=!1),t.resource[e].hasOwnProperty("value")||(t.resource[e].value=t.race.truepath?2*Za[e]:Za[e]),t.resource[e].hasOwnProperty("amount")||(t.resource[e].amount=0),t.resource[e].hasOwnProperty("max")||(t.resource[e].max=s),t.resource[e].hasOwnProperty("diff")||(t.resource[e].diff=0),t.resource[e].hasOwnProperty("delta")||(t.resource[e].delta=0),t.resource[e].hasOwnProperty("rate")||(t.resource[e].rate=i),"Mana"===e&&(t.resource[e].gen=0,t.resource[e].gen_d=0),t.resource[e].stackable=o,t.resource[e].crates||(t.resource[e].crates=0),t.resource[e].containers||(t.resource[e].containers=0),!t.resource[e].trade&&c&&(t.resource[e].trade=0),l=-1===t.resource[e].max||-2===t.resource[e].max?$(`

          {{ name | namespace }}

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

          {{ name | namespace }}

          {{ amount | size }} / {{ max | size }}
          `),o?l.append($(`+`)):(-1!==s||-1===s&&0===i&&t.race.no_craft||"Scarletite"===e||"Quantium"===e)&&l.append($(""));let u=!1;if(0!==i||-1===s&&0===i&&t.race.no_craft||"Scarletite"===e||"Quantium"===e)l.append($(`{{ diff | diffSize }} /s`));else if(-1!==s||t.race.no_craft||"Scarletite"===e||"Quantium"===e)l.append($(""));else{let t=$('');l.append(t);let a=[1,5];for(let r=0;r+${a[r]}`));t.append($(`+A`)),u=!0}$("#resources").append(l);var d={template:''};if(ic({el:`#res${e}`,data:t.resource[e],filters:{size:function(e){return e?q(e,0):e},diffSize:function(a){return"Horseshoe"===e&&!t.race.hooved&&Ec("fool",2023)&&(a=5),q(a,2)},namespace:e=>e.replace("_"," ")},methods:{resRate:e=>`${e} ${q(t.resource[e].diff,2)} per second`,trigModal(){this.$buefy.modal.open({parent:this,component:d});var a=setInterval((function(){$("#modalBox").length>0&&(clearInterval(a),function(e){$("#modalBox").append($('

          {{ name }} - {{ amount | size }}/{{ max | size }}

          '));let a=$('
          ');if($("#modalBox").append(a),"Food"===e&&!t.race.artifical||t.race.artifical&&"Coal"===e){let e=xc(7,10);e.length>0&&$("#modalBoxTitle").prepend(e)}if("Stone"===e){let e=qc(1,12,!1);e.length>0&&$("#modalBoxTitle").prepend(e)}let r=$('
          ');a.append(r),r.append($(`
          ${z("resource_modal_crate_owned")} {{ crates.amount }}/{{ crates.max }}${z("resource_modal_crate_assigned")} {{ res.crates }}
          `));let s=$(``),i=$(``),c=$(``);if(r.append(s),r.append(i),r.append(c),ic({el:"#modalCrates",data:{crates:t.resource.Crates,res:t.resource[e]},methods:{buildCrate(){Pr()},subCrate(e){hr(e)},addCrate(e){mr(e)}}}),t.resource.Containers.display){let r=$('
          ');a.append(r),r.append($(`
          ${z("resource_modal_container_owned")} {{ containers.amount }}/{{ containers.max }}${z("resource_modal_container_assigned")} {{ res.containers }}
          `));let s=$(``),i=$(``),c=$(``);r.append(s),r.append(i),r.append(c),ic({el:"#modalContainers",data:{containers:t.resource.Containers,res:t.resource[e]},methods:{buildContainer(){Or()},removeContainer(e){gr(e)},addContainer(e){fr(e)}}})}ic({el:"#modalBoxTitle",data:t.resource[e],filters:{size:function(e){return q(e,0)},diffSize:function(e){return q(e,2)}}}),["modalCrates","modalContainers"].forEach((function(e){["assign","unassign","construct"].forEach((function(t){Ei(`${e}${t}`,function(e,t){if("modalContainers"===e){let e=jr();switch(t){case"assign":return z("resource_modal_container_assign_desc",[e]);case"unassign":return z("resource_modal_container_unassign_desc",[e]);case"construct":return qr()}}else{let e=Cr();switch(t){case"assign":return z("resource_modal_crate_assign_desc",[e]);case"unassign":return z("resource_modal_crate_unassign_desc",[e]);case"construct":return kr()}}}(e,t),{elm:$(`#${e} > .${t}`),attach:"#main"})}))}))}(e))}),50)},showTrigger:()=>t.resource.Crates.display,craft(e,a){if(!t.race.no_craft){let r=er(e,"manual").multiplier,s=Xa(),i=Math.floor(t.resource[s[e][0].r].amount/s[e][0].a);for(let a=1;a${t.resource[s[e][i].r].name} ${c}`}return r}}}),$r(`cnt${e}`,e,"c"),u){let a=[1,5,"A"];for(let r=0;r"),i=e,c=a[r],o=+(100*er(i,"manual").multiplier).toFixed(0);s.append($(`
          ${z("manual_crafting_hover_bonus",[o.toLocaleString(),t.resource[i].name])}
          `));let n=Xa(),l=$(`
          ${z("manual_crafting_hover_craft")}
          `),u=0;if("number"!=typeof c){if(u=t.resource[n[i][0].r].amount/n[i][0].a,n[i].length>1)for(let e=1;e${q(o/100*u,1)} ${t.resource[i].name}`))}else{u=b()*c;let e=q(o/100*u,1);l.append($(`${e} ${t.resource[i].name}`))}let d=$(`
          ${z("manual_crafting_hover_use")}
          `);for(let e=0;e${q(u*n[i][e].a,1)} ${t.resource[n[i][e].r].name}`)),e+1, "));return s.append(l),s.append(d),s};wr(`inc${e}${a[r]}`,e,"manual",s)}}o&&Ei(`con${e}`,(function(){var a=$(`
          ${z("resource_Crates_plural")} ${t.resource[e].crates}
          `);return t.tech.steel_container&&a.append($(`
          ${z("resource_Containers_plural")} ${t.resource[e].containers}
          `)),a})),e!==t.race.species&&"Crates"!==e&&"Containers"!==e&&-1!==s?$r(`inc${e}`,e,"p"):-1===s&&wr(`inc${e}`,e,"auto"),$(`#res${e}`).on("mouseover",(function(){$(`.res-${e}`).each((function(){t.resource[e].amount>=$(this).attr(`data-${e}`)?$(this).addClass("hl-ca"):$(this).addClass("hl-cna")}))})),$(`#res${e}`).on("mouseout",(function(){$(`.res-${e}`).each((function(){$(this).removeClass("hl-ca"),$(this).removeClass("hl-cna")}))})),void 0===a.resource&&(a.resource={}),a.resource[e]={color:n,tradable:c,stackable:o}}function or(e){if(e===t.race.species?t.resource[e].name=Tc("name"):t.resource[e].name="Money"===e?"$":z(`resource_${e}_name`),Ec("fool",2022))switch(e){case"Lumber":t.resource[e].name=z("resource_Stone_name");break;case"Stone":t.resource[e].name=z("resource_Lumber_name");break;case"Copper":t.resource[e].name=z("resource_Iron_name");break;case"Iron":t.resource[e].name=z("resource_Copper_name");break;case"Steel":t.resource[e].name=z("resource_Titanium_name");break;case"Titanium":t.resource[e].name=z("resource_Steel_name");break;case"Coal":t.resource[e].name=z("resource_Oil_name");break;case"Oil":t.resource[e].name=z("resource_Coal_name");break;case"Alloy":t.resource[e].name=z("resource_Polymer_name");break;case"Polymer":t.resource[e].name=z("resource_Alloy_name");break;case"Graphene":t.resource[e].name=z("resource_Stanene_name");break;case"Stanene":t.resource[e].name=z("resource_Graphene_name");break;case"Plywood":t.resource[e].name=z("resource_Brick_name");break;case"Brick":t.resource[e].name=z("resource_Plywood_name");break;case"Genes":t.resource[e].name=z("resource_Soul_Gem_name");break;case"Soul_Gem":t.resource[e].name=z("resource_Genes_name");break;case"Slave":t.resource[e].name=z("resource_Peon_name")}if("Horseshoe"===e&&(t.resource[e].name=Gc()),t.race.artifical&&"Genes"===e&&(t.resource[e].name=z("resource_Program_name")),t.race.sappy)"Stone"===e&&(t.resource[e].name=z("resource_Amber_name"));else if(t.race.flier)switch(e){case"Stone":t.resource[e].name=z("resource_Clay_name");break;case"Brick":t.resource[e].name=z("resource_Mud_Brick_name")}if(t.race.soul_eater&&"Food"===e&&(t.resource[e].name=z("resource_Souls_name")),t.race.evil)switch(e){case"Lumber":t.resource[e].name=z("resource_Bones_name");break;case"Furs":t.resource[e].name=z("resource_Flesh_name");break;case"Plywood":t.resource[e].name=z("resource_Boneweave_name")}if(t.race.artifical&&"Food"===e&&(t.resource[e].name=z("resource_Signal_name")),Ec("halloween").active)switch(e){case"Food":t.resource[e].name=z("resource_Candy_name");break;case"Lumber":t.resource[e].name=z("resource_Bones_name");break;case"Stone":t.resource[e].name=z("resource_RockCandy_name");break;case"Furs":t.resource[e].name=z("resource_Webs_name");break;case"Plywood":t.resource[e].name=z("resource_Boneweave_name");break;case"Brick":t.resource[e].name=z("resource_Tombstone_name");break;case"Soul_Gem":t.resource[e].name=z("resource_CandyCorn_name")}}function nr(e,a){if($(`#res${e}`).length){let t=$(`#res${e}`);return t.detach(),void $("#resources").append(t)}a=a||"special";var r=$(`
          ${z(`resource_${e}_name`)}{{ count | round }}
          `);$("#resources").append(r),ic({el:`#res${e}`,data:t.prestige[e],filters:{round:e=>+e.toFixed(3)}}),"Artifact"!==e&&"Blood_Stone"!==e&&Ei(`res${e}`,(function(){let a=$("
          ");switch(e){case"Plasmid":let r=t.race.no_plasmid?Math.min(t.race.p_mutation,t.prestige.Plasmid.count):t.prestige.Plasmid.count;if(a.append($(`${z(`resource_${e}_desc`,[r,+(100*Gr("plasmid")).toFixed(2)])}`)),t.genes.store&&("antimatter"!==t.race.universe||t.genes.bleed>=3)){let e=Nr(1,"plasmid");e>1&&a.append($(` ${z("resource_Plasmid_desc2",[+(100*(e-1)).toFixed(2)])}`))}break;case"AntiPlasmid":a.append($(`${z(`resource_${e}_desc`,[t.prestige.AntiPlasmid.count,+(100*Gr("antiplasmid")).toFixed(2)])}`));let s=Nr(1,"anti");t.genes.store&&("antimatter"===t.race.universe||t.genes.bleed>=3)&&s>1&&a.append($(` ${z("resource_Plasmid_desc2",[+(100*(s-1)).toFixed(2)])}`));break;case"Phage":a.append($(`${z(t.prestige.AntiPlasmid.count>0?"resource_Phage_desc2":"resource_Phage_desc",[250+t.prestige.Phage.count])}`));let i=Nr(1,"phage");t.genes.store&&t.genes.store>=4&&i>1&&a.append($(` ${z("resource_Plasmid_desc2",[+(100*(i-1)).toFixed(2)])}`));break;case"Dark":switch(t.race.universe){case"standard":a.append($(`${z(`resource_${e}_desc_s`,[+(100*(lc("standard")-1)).toFixed(2)])}`));break;case"evil":a.append($(`${z(`resource_${e}_desc_e`,[+(100*(lc("evil")-1)).toFixed(2)])}`));break;case"micro":a.append($(`${z(`resource_${e}_desc_m`,[lc("micro",!1),lc("micro",!0)])}`));break;case"heavy":let t=lc("heavy"),r=.25+.5*t,s=.2+.3*t;a.append($(`${z(`resource_${e}_desc_h`,[+(100*r).toFixed(4),+(100*s).toFixed(4)])}`));break;case"antimatter":a.append($(`${z(`resource_${e}_desc_a`,[+(100*(lc("antimatter")-1)).toFixed(2)])}`));break;case"magic":a.append($(`${z(`resource_${e}_desc_mg`,[z("resource_Mana_name"),+(100*(lc("magic")-1)).toFixed(2)])}`))}break;case"Harmony":a.append($(`${z(`resource_${e}_desc`,["standard"===t.race.universe?.1:1,tc()])}`));break;case"AICore":let c=+(100*(1-.99**t.prestige.AICore.count)).toFixed(2);a.append($(`${z(`resource_${e}_desc`,[c])}`))}return a}))}function lr(e){let a=t.tech.currency>=6?-1e6:t.tech.currency>=4?-100:-25;if(t.race.banana){let r=!1;if(Object.keys(t.resource).forEach((function(e){t.resource[e].hasOwnProperty("trade")&&t.resource[e].trade<0&&(r=e)})),r&&r!==e)return!1;a=t.tech.currency>=6?-1e6:t.tech.currency>=4?-25:-10}return!(t.resource[e].trade<=a)}function ur(e){let a=t.tech.currency>=6?1e6:t.tech.currency>=4?100:25;return!(t.resource[e].trade>=a)}function dr(e,a,r,s,i){if((t.settings.tabLoad||4===t.settings.civTabs&&0===t.settings.marketTabs)&&(!t.race.artifical||"Food"!==r)){if(i&&a.append($(`

          {{ r.name | namespace }}

          `)),t.race.no_trade||(a.append($(`${z("resource_market_buy")}`)),a.append($(`\${{ r.value | buy }}`)),a.append($(`${z("resource_market_sell")}`)),a.append($(`\${{ r.value | sell }}`))),i&&(t.race.banana&&"Food"===r||t.tech.trade&&!t.race.terrifying)){let e=$(`${z("resource_market_routes")}`);a.append(e),e.append($(`-`)),e.append($('')),e.append($(`+`)),e.append($(`${z("cancel_routes")}`)),xr(r)}ic({el:e,data:{r:t.resource[r],m:t.city.market},methods:{aSell(e){let a=1===Va[e]?z("resource_market_unit"):z("resource_market_units"),r=yr(e),s=Va[e];if(t.stats.achieve.hasOwnProperty("trade")){let e=t.stats.achieve.trade.l;e>5&&(e=5),s*=1-e/100}return s=+s.toFixed(3),z("resource_market_auto_sell_desc",[s,a,r])},aBuy(e){let a=Va[e],r=D("dealmaker",0);r&&(a*=1+r/100),t.race.persuasive&&(a*=1+t.race.persuasive/100),t.race.merchant&&(a*=1+di.merchant.vars()[1]/100);let s=Oi("goblin");if(s>0&&(a*=1+di.merchant.vars(1)[1]/100*s),t.genes.trader&&(a*=1+uc()/100),t.stats.achieve.hasOwnProperty("trade")){let e=t.stats.achieve.trade.l;e>5&&(e=5),a*=1+e/50}t.race.truepath&&(a*=1-t.civic.foreign.gov3.hstl/101),a=+a.toFixed(3);let i=z(1===a?"resource_market_unit":"resource_market_units");return z("resource_market_auto_buy_desc",[a,i,br(e)])},purchase(e){if(!t.race.no_trade&&!t.settings.pause){let a=t.city.market.qty,r=t.resource[e].value;t.race.arrogant&&(r*=1+di.arrogant.vars()[0]/100),t.race.conniving&&(r*=1-di.conniving.vars()[0]/100);let s=Oi("imp");s>0&&(r*=1-di.conniving.vars(1)[0]/100*s);let i=Math.floor(Math.min(a,t.resource.Money.amount/r,t.resource[e].max-t.resource[e].amount));i>0&&(t.resource[e].amount+=i,t.resource.Money.amount-=Math.round(r*i),t.resource[e].value+=Number((i/Math.rand(1e3,1e4)).toFixed(2)))}},sell(e){if(!t.race.no_trade&&!t.settings.pause){let a=t.city.market.qty,r=4;t.race.merchant&&(r*=1-di.merchant.vars()[0]/100);let s=Oi("goblin");s>0&&(r*=1-di.merchant.vars(1)[0]/100*s),t.race.asymmetrical&&(r*=1+di.asymmetrical.vars()[0]/100),t.race.conniving&&(r*=1-di.conniving.vars()[1]/100);let i=Oi("imp");i>0&&(r*=1-di.conniving.vars(1)[1]/100*i);let c=t.resource[e].value/r,o=Math.floor(Math.min(a,t.resource[e].amount,(t.resource.Money.max-t.resource.Money.amount)/c));o>0&&(t.resource[e].amount-=o,t.resource.Money.amount+=Math.round(c*o),t.resource[e].value-=Number((o/Math.rand(1e3,1e4)).toFixed(2)),t.resource[e].value0&&(a+=t.resource[r].trade)})),e<=a)break}if(t.resource[e].trade>=0){if(!(ur(e)&&t.city.market.trade(t.race.arrogant&&(e*=1+di.arrogant.vars()[0]/100),q(e*t.city.market.qty,0)),sell(e){let a=4;t.race.merchant&&(a*=1-di.merchant.vars()[0]/100);let r=Oi("goblin");return r>0&&(a*=1-di.merchant.vars(1)[0]/100*r),t.race.asymmetrical&&(a*=1+di.asymmetrical.vars()[0]/100),q(e*t.city.market.qty/a,0)},trade(e){if("Stone"===r&&(31===e||-31===e)){let e=qc(3,12,!1);if(e.length>0)return e}return e<0?"-"+(e=0-e):e>0?`+${e}`:0},namespace:e=>e.replace("_"," ")}})}}function _r(){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:t.race.kindling_kindred||t.race.smoldering?t.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 pr(e){let a=e||$("#galaxyTrade");if(e||sc($("#galaxyTrade")),t.galaxy.trade){a.append($(`
          ${z("galaxy_trade")}
          `));let e=_r();for(let r=0;r');a.append(s),s.append($(`${t.resource[e[r].buy.res].name}`)),s.append($(`+{{ '${r}' | t_vol }}/s`)),s.append($(`${t.resource[e[r].sell.res].name}`)),s.append($(`-{{ '${r}' | s_vol }}/s`));let i=$(`${z("resource_market_routes")}`);s.append(i);let c=z("galaxy_freighter_assign",[t.resource[e[r].buy.res].name,t.resource[e[r].sell.res].name]),o=z("galaxy_freighter_unassign",[t.resource[e[r].buy.res].name,t.resource[e[r].sell.res].name]);i.append($(`-`)),i.append($(`{{ g.f${r} }}`)),i.append($(`+`)),i.append($(`${z("cancel_routes")}`))}let r=$(`
          ${z("resource_market_galactic_trade_routes")} {{ g.cur }} / {{ g.max }}
          `);r.append($(`${z("cancel_all_routes")}`)),a.append(r)}ic({el:e?"#specialModal":"#galaxyTrade",data:{g:t.galaxy.trade,t:t.tech},methods:{less(e){let a=b();t.galaxy.trade[`f${e}`]>=a?(t.galaxy.trade[`f${e}`]-=a,t.galaxy.trade.cur-=a):(t.galaxy.trade.cur-=t.galaxy.trade[`f${e}`],t.galaxy.trade[`f${e}`]=0)},more(e){let a=b();t.galaxy.trade.curt.galaxy.trade.max-t.galaxy.trade.cur&&(a=t.galaxy.trade.max-t.galaxy.trade.cur),t.galaxy.trade[`f${e}`]+=a,t.galaxy.trade.cur+=a)},zero(e){if(e)t.galaxy.trade.cur-=t.galaxy.trade[`f${e}`],t.galaxy.trade[`f${e}`]=0;else{let e=_r();for(let a=0;ae},filters:{t_vol(e){let a=_r()[e].buy.vol;t.race.persuasive&&(a*=1+t.race.persuasive/100),t.race.merchant&&(a*=1+di.merchant.vars()[1]/100);let r=Oi("goblin");if(r>0&&(a*=1+di.merchant.vars(1)[1]/100*r),t.genes.trader&&(a*=1+uc()/100),t.stats.achieve.hasOwnProperty("trade")){let e=t.stats.achieve.trade.l;e>5&&(e=5),a*=1+e/50}return a=+a.toFixed(2),a},s_vol(e){let a=_r()[e].sell.vol;if(t.stats.achieve.hasOwnProperty("trade")){let e=t.stats.achieve.trade.l;e>5&&(e=5),a*=1-e/100}return a=+a.toFixed(2),a}}}),Ei("galacticTradeTotal",(function(){let e=$('
          ');return r.hasOwnProperty("gt_route")&&Object.keys(r.gt_route).forEach((function(t){r.gt_route[t]>0&&e.append(``)})),e.append(``),e}),{elm:"#galacticTradeTotal > span"})}function hr(e){let a=b(),r=Cr();a>t.resource[e].crates&&(a=t.resource[e].crates),a>0&&(t.resource.Crates.amount+=a,t.resource.Crates.max+=a,t.resource[e].crates-=a,t.resource[e].max-=r*a)}function mr(e){let a=b(),r=Cr();a>t.resource.Crates.amount&&(a=t.resource.Crates.amount),a>0&&(t.resource.Crates.amount-=a,t.resource.Crates.max-=a,t.resource[e].crates+=a,t.resource[e].max+=r*a)}function gr(e){let a=b(),r=jr();a>t.resource[e].containers&&(a=t.resource[e].containers),a>0&&(t.resource.Containers.amount+=a,t.resource.Containers.max+=a,t.resource[e].containers-=a,t.resource[e].max-=r*a)}function fr(e){let a=b(),r=jr();a>t.resource.Containers.amount&&(a=t.resource.Containers.amount),a>0&&(t.resource.Containers.amount-=a,t.resource.Containers.max-=a,t.resource[e].containers+=a,t.resource[e].max+=r*a)}function vr(e,a,r,s){if(t.settings.tabLoad||4===t.settings.civTabs&&1===t.settings.marketTabs){if(a.append($(`

          {{ name }}

          `)),t.resource.Crates.display){let e=$(`${z("resource_Crates_name")}`);a.append(e),e.append($(`«`)),e.append($(``)),e.append($(`»`))}if(t.resource.Containers.display){let e=$(`${z("resource_Containers_name")}`);a.append(e),e.append($(`«`)),e.append($('')),e.append($(`»`))}ic({el:e,data:t.resource[r],methods:{addCrate(e){mr(e)},subCrate(e){hr(e)},addCon(e){fr(e)},subCon(e){gr(e)}},filters:{trick(e){if("Stone"===r&&10===t.resource[r].crates&&31===t.resource[r].containers){let e=qc(4,13,!0);if(e.length>0)return e}return e},cCnt(e,a){if("Food"===a&&!t.race.artifical||t.race.artifical&&"Coal"===a){let t=xc(13,10);if(10===e&&t.length>0)return"1"+t}return e}}})}}function yr(e){let a=4;t.race.merchant&&(a*=1-di.merchant.vars()[0]/100);let r=Oi("goblin");r>0&&(a*=1-di.merchant.vars(1)[0]/100*r),t.race.asymmetrical&&(a*=1+di.asymmetrical.vars()[0]/100),t.race.conniving&&a--;let s=t.resource[e].value*Va[e]/a;if(t.city.wharf&&(s*=1+.01*t.city.wharf.count),t.space.gps&&t.space.gps.count>3&&(s*=1+.01*t.space.gps.count),t.tech.railway){let e=t.stats.achieve.banana&&t.stats.achieve.banana.l>=1?.03:.02;s*=1+t.tech.railway*e}return t.race.truepath&&!t.race.lone_survivor&&(s*=1-t.civic.foreign.gov3.hstl/101),t.race.inflation&&(s*=1+t.race.inflation/500),t.race.witch_hunter&&t.resource.Sus.amount>50&&(s*=1-(t.resource.Sus.amount-50)/52),s*=Oe("psychic_cash"),s=+s.toFixed(1),s}function br(e){let a=t.resource[e].value;t.race.arrogant&&(a*=1+di.arrogant.vars()[0]/100),t.race.conniving&&(a*=1-di.conniving.vars()[0]/100);let r=Oi("imp");r>0&&(a*=1-di.conniving.vars(1)[0]/100*r);let s=a*Va[e];return t.city.wharf&&(s*=.99**t.city.wharf.count),t.space.gps&&t.space.gps.count>3&&(s*=.99**t.space.gps.count),t.tech.railway&&(s*=(t.stats.achieve.banana&&t.stats.achieve.banana.l>=1?.97:.98)**t.tech.railway),t.race.truepath&&!t.race.lone_survivor&&(s*=1+t.civic.foreign.gov3.hstl/101),t.race.inflation&&(s*=1+t.race.inflation/300),t.race.quarantine&&(s*=1+Math.round(t.race.quarantine**3.5)),t.race.witch_hunter&&t.resource.Sus.amount>50&&(s*=1+(t.resource.Sus.amount-50)/8),s=+s.toFixed(1),s}function wr(e,a,s,i){Ei(`${e}`,(function(){let e=$('
          {{ res.name | namespace }}
          '),c=$('
          ');e.append(c);let o=er(a,s),n=$("
          ");c.append(n),"auto"===s&&r.p[a]&&Object.keys(r.p[a]).forEach((function(e){let t=r.p[a][e],s=parseFloat(t.slice(0,-1));if(0!=s&&!isNaN(s)){let t=s>0?"success":"danger",r=e.replace(/\+.+$/,"");e=e.replace(/'/g,"\\'"),n.append(``)}})),Object.keys(o.multi_bd).forEach((function(e){let t=o.multi_bd[e],a=parseFloat(t.slice(0,-1));if(0!=a&&!isNaN(a)){let t=a>0?"success":"danger",r=e.replace(/\+.+$/,"");e=e.replace(/'/g,"\\'"),n.append(``)}}));let l=$('
          '),u=$(`
          ${z("craft_tools_multi")}
          `);l.append(u);let d=0;if(Object.keys(o.add_bd).forEach((function(e){let t=o.add_bd[e],a=parseFloat(t.slice(0,-1));if(0!=a&&!isNaN(a)){d++;let t=a>0?"success":"danger",r=e.replace(/\+.+$/,"");e=e.replace(/'/g,"\\'"),l.append(``)}})),d>0&&c.append(l),r.p.consume&&r.p.consume[a]){let e=$('
          '),t=0;Object.keys(r.p.consume[a]).forEach((function(s){let i=r.p.consume[a][s];if(0!=i&&!isNaN(i)){t++;let r=i>0?"success":"danger",c=s.replace(/\+.+$/,"");s=s.replace(/'/g,"\\'"),e.append(``)}})),t>0&&c.append(e)}return t.resource[a].diff<0&&t.resource[a].amount>0&&e.append(``),i&&(e.append(''),e.append(i)),e}),{in:function(){ic({el:"#popper > div",data:{[a]:r.p[a],res:t.resource[a],consume:r.p.consume,craft:er(a,s)},filters:{translate(e){let t=e[e.length-1],a=parseFloat(e.slice(0,-1)),r=a>0&&a<1||a<0&&a>-1?4:a>0&&a<10||a<0&&a>-10?3:2;a=+a.toFixed(r);let s="%"===t?"%":"";return a>0?"+"+q(a,r)+s:a<0?q(a,r)+s:void 0},fix:e=>e+"v",counter(e){let r=+(e/-t.resource[a].diff).toFixed(0);if(r>60){let e=r%60,t=(r-e)/60;if(t>=60){let e=t%60;return`${(t-e)/60}h ${e}m`}return`${t}m ${e}s`}return`${r}s`},namespace:e=>e.replace("_"," ")}})},out:function(){ic({el:"#popper > div"},"destroy")},classes:"breakdown has-background-light has-text-dark",prop:{modifiers:{preventOverflow:{enabled:!1},hide:{enabled:!1}}}})}function $r(e,a,s){Ei(`${e}`,(function(){let e=$('
          {{ res.name | namespace }}
          '),i=$('
          ');e.append(i);let c=!1;if(r[s][a]){let e=$("
          ");i.append(e);let t=[a];t.push("Global");for(var o=0;o0?"success":"danger",s=t.replace(/\+.+$/,"");t=t.replace(/'/g,"\\'"),e.append(``)}}))}}if(r[s].consume&&r[s].consume[a]){let e=$(`
          `),t=0;Object.keys(r[s].consume[a]).forEach((function(i){let c=r[s].consume[a][i];if(0!=c&&!isNaN(c)){t++;let r=c>0?"success":"danger",s=i.replace(/\+.+$/,"");i=i.replace(/'/g,"\\'"),e.append(``)}})),t>0&&i.append(e)}if("p"===s){let r=t.resource[a].diff>0?"success":"danger";e.append(``)}return e}),{in:function(){ic({el:"#popper > div",data:{Global:r[s].Global,[a]:r[s][a],consume:r[s].consume,res:t.resource[a]},filters:{translate(e){let t=e[e.length-1],a=parseFloat(e.slice(0,-1)),r=a>0&&a<1||a<0&&a>-1?4:a>0&&a<10||a<0&&a>-10?3:2,s="%"===t?"%":"";return a>0?"+"+q(a,r)+s:a<0?q(a,r)+s:void 0},fix:e=>e+"v",counter(e){let r=t.resource[a].diff,s=0;if(r<0?(r*=-1,s=+(e/r).toFixed(0)):s=+((t.resource[a].max-e)/r).toFixed(0),s===1/0||Number.isNaN(s))return"Never";if(s>60){let e=s%60,t=(s-e)/60;if(t>=60){let e=t%60;return`${(t-e)/60}h ${e}m`}return`${t}m ${e}s`}return`${s}s`},direction:e=>z(e>=0?"to_full":"to_empty"),namespace:e=>e.replace("_"," ")}})},out:function(){ic({el:"#popper > div"},"destroy")},classes:"breakdown has-background-light has-text-dark",prop:{modifiers:{preventOverflow:{enabled:!1},hide:{enabled:!1}}}})}function xr(e){$(`#market-${e} .trade .current`).removeClass("has-text-warning"),$(`#market-${e} .trade .current`).removeClass("has-text-danger"),$(`#market-${e} .trade .current`).removeClass("has-text-success"),t.resource[e].trade>0?$(`#market-${e} .trade .current`).addClass("has-text-success"):t.resource[e].trade<0?$(`#market-${e} .trade .current`).addClass("has-text-danger"):$(`#market-${e} .trade .current`).addClass("has-text-warning")}function kr(){let e=t.race.kindling_kindred||t.race.smoldering?t.race.smoldering?t.resource.Chrysotile.name:t.resource.Stone.name:t.resource.Plywood?t.resource.Plywood.name:z("resource_Plywood_name");return z("resource_modal_crate_construct_desc",[t.race.kindling_kindred||t.race.smoldering?200:10,e,Cr()])}function qr(){return z("resource_modal_container_construct_desc",[125,jr()])}function Mr(e,t){switch(e){case"crate":Pr(t);break;case"container":Or(t)}}function Pr(e){let a=e||b(),r=t.race.kindling_kindred||t.race.smoldering?t.race.smoldering?"Chrysotile":"Stone":"Plywood",s=t.race.kindling_kindred||t.race.smoldering?200:10;a+t.resource.Crates.amount>t.resource.Crates.max&&(a=t.resource.Crates.max-t.resource.Crates.amount),t.resource[r].amount=s*a&&t.resource.Crates.amountt.resource.Containers.max&&(a=t.resource.Containers.max-t.resource.Containers.amount),t.resource.Steel.amount<125*a&&(a=Math.floor(t.resource.Steel.amount/125)),t.resource.Steel.amount>=125*a&&t.resource.Containers.amount=2?500:350;t.tech.container&&t.tech.container>=4&&(e+=t.tech.container>=5?500:250),t.tech.container&&t.tech.container>=6&&(e+=t.tech.container>=7?1200:500),t.tech.container&&t.tech.container>=8&&(e+=4e3),t.race.pack_rat&&(e*=1+di.pack_rat.vars()[0]/100);let a=Oi("kobold");return a>0&&(e*=1+di.pack_rat.vars(1)[0]/100*a),t.stats.achieve.banana&&t.stats.achieve.banana.l>=3&&(e*=1.1),e*=t.stats.achieve.blackhole?1+.05*t.stats.achieve.blackhole.l:1,Math.round(Nr(e))}function jr(){let e=t.tech.steel_container&&t.tech.steel_container>=3?1200:800;t.tech.steel_container&&t.tech.steel_container>=4&&(e+=t.tech.steel_container>=5?1e3:400),t.tech.steel_container&&t.tech.steel_container>=6&&(e+=t.tech.steel_container>=7?7500:1e3),t.tech.steel_container&&t.tech.steel_container>=8&&(e+=8e3),t.race.pack_rat&&(e*=1+di.pack_rat.vars()[0]/100);let a=Oi("kobold");return a>0&&(e*=1+di.pack_rat.vars(1)[0]/100*a),e*=t.stats.achieve.blackhole?1+.05*t.stats.achieve.blackhole.l:1,Math.round(Nr(e))}function Sr(){if(!t.settings.tabLoad&&(4!==t.settings.civTabs||0!==t.settings.marketTabs))return;let e=$(`

          ${z("resource_market")}

          `);sc($("#market")),$("#market").append(e),function(){if(!t.settings.tabLoad&&(4!==t.settings.civTabs||0!==t.settings.marketTabs))return;let e=$("#market-qty");sc(e),t.race.no_trade||(e.append($(`

          ${z("resource_trade_qty")}

          `)),e.append($('-+'))),ic({el:"#market-qty",data:t.city.market,methods:{val(){t.city.market.qty<1?t.city.market.qty=1:t.city.market.qty>zr()&&(t.city.market.qty=zr())},limit:()=>zr(),less(){t.city.market.qty-=b()},more(){t.city.market.qty+=b()}}})}()}function Fr(){if(!t.settings.tabLoad&&(4!==t.settings.civTabs||1!==t.settings.marketTabs))return;let e=$(`

          ${z("tab_storage")}

          `);sc($("#resStorage")),$("#resStorage").append(e),t.resource.Crates&&t.resource.Containers&&(e.append($(``)),e.append($(``)),ic({el:"#createHead",data:{cr:t.resource.Crates,cn:t.resource.Containers},methods:{crate(){Pr()},container(){Or()},buildCrateDesc:()=>kr(),buildContainerDesc:()=>qr()}}))}function zr(){return t.tech.currency>=6?1e6:t.tech.currency>=4?5e3:100}function Ar(){if((t.settings.tabLoad||4===t.settings.civTabs&&2===t.settings.marketTabs)&&(sc($("#resEjector")),t.interstellar.mass_ejector)){let e=$(`

          ${z("interstellar_mass_ejector_vol")}

          `);$("#resEjector").append(e);let a=$('');e.append(a),a.append($(`{{ total }} / {{ on | max }}{{ on | real }}${z("interstellar_mass_ejector_mass")}: {{ mass | approx }} kt/s`)),ic({el:"#eject",data:t.interstellar.mass_ejector,filters:{max:e=>1e3*e,real:e=>i.mass_ejectorq(e,2)}})}}function Tr(e,a){if((t.settings.tabLoad||4===t.settings.civTabs&&2===t.settings.marketTabs)&&(!t.race.artifical||"Food"!==e)&&Ja[e]&&t.interstellar.mass_ejector){"magic"===t.race.universe||"Elerium"!==e&&"Infernite"!==e||(a="caution");let r=$(`

          ${t.resource[e].name}

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

          ${z("portal_transport_supply")}

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

          ${t.resource[e].name}

          `);$("#resCargo").append(r);let s=$('');r.append(s),s.append($(`«`)),s.append($(`{{ e.${e} }}`)),s.append($(`»`));let i=q(Ya[e].out);s.append($(`${z("portal_transport_item",[`${i}`,`${Ya[e].in}`])}`)),t.portal.transport.cargo.hasOwnProperty(e)||(t.portal.transport.cargo[e]=0),ic({el:`#supply${e}`,data:{r:t.resource[e],e:t.portal.transport.cargo},methods:{supplyMore(e){let a=b();a+t.portal.transport.cargo.used>t.portal.transport.cargo.max&&(a=t.portal.transport.cargo.max-t.portal.transport.cargo.used,t.portal.transport.cargo[e]+a<0&&(a=-t.portal.transport.cargo[e])),t.portal.transport.cargo[e]+=a,t.portal.transport.cargo.used+=a},supplyLess(e){let a=b();a>t.portal.transport.cargo[e]&&(a=t.portal.transport.cargo[e]),t.portal.transport.cargo[e]>0&&(t.portal.transport.cargo[e]-=a,t.portal.transport.cargo.used-=a)}}})}}function Kr(){(t.settings.tabLoad||4===t.settings.civTabs&&4===t.settings.marketTabs)&&sc($("#resAlchemy"))}function Lr(e,a,r){if((t.settings.tabLoad||4===t.settings.civTabs&&4===t.settings.marketTabs)&&(!t.race.artifical||"Food"!==e)&&t.tech.alchemy&&(r||t.tech.alchemy>=2)&&"Crystal"!==e){let s=$(`

          ${t.resource[e].name}

          `);$("#resAlchemy").append(s);let i=$('');s.append(i),i.append($(`«`)),i.append($(`{{ a.${e} }}`)),i.append($(`»`)),t.race.alchemy.hasOwnProperty(e)||(t.race.alchemy[e]=0),ic({el:`#alchemy${e}`,data:{r:t.resource[e],a:t.race.alchemy},methods:{addSpell(e){let a=b();for(let r=0;r=1;r++)t.race.alchemy[e]++,t.resource.Mana.diff--},subSpell(e){let a=b();for(let r=0;r0;r++)t.race.alchemy[e]--,t.resource.Mana.diff++}}}),Ei(`alchemy${e}`,(function(){let a=r&&t.tech.alchemy>=2?8*Va[e]:2*Va[e];return t.race.witch_hunter&&(a*=3),t.stats.achieve.soul_sponge&&t.stats.achieve.soul_sponge.mg&&(a*=t.stats.achieve.soul_sponge.mg+1),$(`
          ${z("resource_alchemy",[1,z("resource_Mana_name"),.15,z("resource_Crystal_name"),+a.toFixed(2),t.resource[e].name])}
          `)}),{elm:`#alchemy${e} h3`})}}const Nr=(Dr={},function(e,a,r){let s=a||"a",i=[t.race.universe,t.prestige.Plasmid.count,t.prestige.AntiPlasmid.count,t.prestige.Phage.count,t.race.no_plasmid||"0",t.race.p_mutation||"0",t.race.nerfed||"0",t.genes.store||"0",t.genes.bleed||"0",t.city.temple?t.city.temple.count:"0",t.space.ziggurat?t.space.ziggurat.count:"0",t.race.cataclysm?t.race.cataclysm:"0",t.race.orbit_decayed?t.race.orbit_decayed:"0",t.genes.ancients||"0",t.civic.priest?t.civic.priest.workers:"0"].join("-");if(Dr[s]||(Dr[s]={}),!Dr[s][i]||r){let e=1,r=!(!t.race.cataclysm&&!t.race.orbit_decayed);if(t.genes.store){let r=0;if(!a||a&&("plasmid"===a&&"antimatter"!==t.race.universe||"anti"===a&&"antimatter"===t.race.universe)){r="antimatter"===t.race.universe?t.prestige.AntiPlasmid.count:t.prestige.Plasmid.count;let e=r;t.race.no_plasmid?e=Math.min(t.race.p_mutation,r):t.race.nerfed&&(e=Math.floor(r/("antimatter"===t.race.universe?2:5))),r=Math.round(e*(t.race.nerfed?.5:1))}(!a||a&&"phage"===a)&&t.genes.store>=4&&(r+=Math.round(t.prestige.Phage.count*(t.race.nerfed?1/3:1)));let s=t.genes.store>=2?t.genes.store>=3?1250:1666:2500;if("antimatter"===t.race.universe&&(s*=2),t.genes.bleed&&t.genes.bleed>=3&&(!a||a&&("plasmid"===a&&"antimatter"===t.race.universe||"anti"===a&&"antimatter"!==t.race.universe))){let e="antimatter"===t.race.universe?t.prestige.Plasmid.count/5:t.prestige.AntiPlasmid.count/10;r+=Math.round(e*(t.race.nerfed?.5:1))}e*=1+r/s}if("standard"===t.race.universe&&(e*=lc("standard")),"antimatter"===t.race.universe&&(!r&&t.city.temple&&t.city.temple.count||r&&t.space.ziggurat&&t.space.ziggurat.count)){let a=.06;if(t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display){let e=t.genes.ancients>=5?.0012:t.genes.ancients>=3?.001:8e-4;t.race.high_pop&&(e=Pe(e)),a+=e*t.civic.priest.workers}e*=1+(r?t.space.ziggurat.count:t.city.temple.count)*a}!a&&t.pillars&&(e*=pc()[1]),Dr[s]={},Dr[s][i]=e}return a?Dr[s][i]*e:Math.round(Dr[s][i]*e)});var Dr;function Br(){if(t.race.no_plasmid||"antimatter"===t.race.universe){let e=!(!t.race.cataclysm&&!t.race.orbit_decayed);if(e&&t.space.ziggurat&&t.space.ziggurat.count||t.city.temple&&t.city.temple.count){let a=t.tech.anthropology&&t.tech.anthropology>=1?.016:.01;if(t.tech.fanaticism&&t.tech.fanaticism>=2){let e=t.civic.professor.workers*("antimatter"===t.race.universe?2e-4:4e-4);t.race.high_pop&&(e=Pe(e)),a+=e}if(t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display){let e=t.genes.ancients>=5?15e-5:t.genes.ancients>=3?125e-6:1e-4;t.race.high_pop&&(e=Pe(e)),a+=e*t.civic.priest.workers}"antimatter"===t.race.universe?a/=t.race.nerfed?3:2:t.race.nerfed&&(a/=2),t.race.spiritual&&(a*=1+di.spiritual.vars()[0]/100);let r=Oi("seraph");return r>0&&(a*=1+di.spiritual.vars(1)[0]/100*r),"theocracy"===t.civic.govern.type&&(a*=1.12),t.race.ooze&&(a*=1-di.ooze.vars()[1]/100),(e?t.space.ziggurat.count:t.city.temple.count)*a}}return 0}const Gr=(Rr={},function(e){let a=[t.race.universe,t.prestige.Plasmid.count,t.prestige.AntiPlasmid.count,t.prestige.Phage.count,t.civic.govern.type,t.civic.professor.assigned,t.genes.bleed||"0",t.race.decayed||"0",t.race.gene_fortify||"0",t.tech.anthropology||"0",t.tech.fanaticism||"0",t.race.nerfed||"0",t.race.no_plasmid||"0",t.genes.ancients||"0",t.city.temple?t.city.temple.count:"0",t.space.ziggurat?t.space.ziggurat.count:"0",t.civic.priest?t.civic.priest.workers:"0",t.race.orbit_decayed?t.race.orbit_decayed:"0",t.race.spiritual||"0",t.tech.outpost_boost||"0",i.alien_outpost||"0"].join("-");if(!Rr[a]){let e=0,r=0;if("antimatter"!==t.race.universe||t.genes.bleed){let a=t.race.no_plasmid?Math.min(t.race.p_mutation,t.prestige.Plasmid.count):t.prestige.Plasmid.count;"antimatter"===t.race.universe&&t.genes.bleed&&(a*=.025),t.race.decayed&&(a-=Math.round((t.stats.days-t.race.decayed)/(300+6*t.race.gene_fortify)));let r=250+t.prestige.Phage.count;e=a>r?+(Math.log(r+50)-3.91202).toFixed(5)/2.888+Math.log(a+1-r)/Math.LN2/250:a<0?0:+(Math.log(a+50)-3.91202).toFixed(5)/2.888,t.tech.outpost_boost&&t.race.truepath&&i.alien_outpost&&(e*=2);let s=0;if(t.race.orbit_decayed&&t.space.ziggurat?s=t.space.ziggurat.count:t.city.temple&&(s=t.city.temple.count),s>0&&!t.race.no_plasmid&&"antimatter"!==t.race.universe){let a=t.tech.anthropology&&t.tech.anthropology>=1?.08:.05;if(t.tech.fanaticism&&t.tech.fanaticism>=2){let e=.002*t.civic.professor.workers;t.race.high_pop&&(e=Pe(e)),a+=e}if(t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display){let e=t.genes.ancients>=5?.0015:t.genes.ancients>=3?.00125:.001;t.race.high_pop&&(e=Pe(e)),a+=e*t.civic.priest.workers}t.race.spiritual&&(a*=1+di.spiritual.vars()[0]/100);let r=Oi("seraph");r>0&&(a*=1+di.spiritual.vars(1)[0]/100*r),"theocracy"===t.civic.govern.type&&(a*=1.12),t.race.ooze&&(a*=1-di.ooze.vars()[1]/100),t.race.orbit_decayed&&t.race.truepath&&(a*=.1),e*=1+s*a}}if("antimatter"===t.race.universe||t.genes.bleed&&t.genes.bleed>=2){let e=t.prestige.AntiPlasmid.count;"antimatter"!==t.race.universe&&t.genes.bleed&&t.genes.bleed>=2&&(e*=.25),t.race.decayed&&(e-=Math.round((t.stats.days-t.race.decayed)/(300+6*t.race.gene_fortify)));let a=250+t.prestige.Phage.count;r=e>a?+(Math.log(a+50)-3.91202).toFixed(5)/2.888+Math.log(e+1-a)/Math.LN2/250:e<0?0:+(Math.log(e+50)-3.91202).toFixed(5)/2.888,t.tech.outpost_boost&&t.race.truepath&&i.alien_outpost&&(r*=2),r/=3}t.race.nerfed&&("antimatter"===t.race.universe?(e/=2,r/=2):(e/=5,r/=5)),(Rr={})[a]=[(1+e)*(1+r)-1,e,r]}return e&&"raw"===e?Rr[a]:e&&"plasmid"===e?Rr[a][1]:e&&"antiplasmid"===e?Rr[a][2]:Rr[a][0]});var Rr;const Hr={club:{id:"tech-club",title:z("tech_club"),desc:z("tech_club_desc"),category:"agriculture",era:"primitive",reqs:{},grant:["primitive",1],cost:{Lumber:()=>t.race.kindling_kindred||t.race.smoldering?0:5,Stone:()=>t.race.kindling_kindred||t.race.smoldering?5:0},action(){return!!Cs($(this)[0])&&(t.resource.Food.display=!0,!0)}},bone_tools:{id:"tech-bone_tools",title:z("tech_bone_tools"),desc:z("tech_bone_tools_desc"),category:"stone_gathering",era:"primitive",reqs:{primitive:1},grant:["primitive",2],condition:()=>!(t.race.soul_eater&&!t.race.evil),cost:{Food:()=>t.race.evil&&!t.race.smoldering?0:10,Lumber:()=>t.race.evil&&!t.race.smoldering?10:0},action(){return!!Cs($(this)[0])&&(t.resource.Stone.display=!0,t.race.smoldering&&(t.resource.Chrysotile.display=!0),!0)}},wooden_tools:{id:"tech-wooden_tools",title:()=>t.race.kindling_kindred?z("tech_bone_tools"):z("tech_wooden_tools"),desc:()=>t.race.kindling_kindred?z("tech_bone_tools_desc"):z("tech_wooden_tools_desc"),category:"stone_gathering",era:"primitive",reqs:{primitive:1},grant:["primitive",2],condition:()=>!(!t.race.soul_eater||t.race.evil),cost:{Lumber:()=>10},action(){return!!Cs($(this)[0])&&(t.resource.Stone.display=!0,t.race.smoldering&&(t.resource.Chrysotile.display=!0),!0)}},sundial:{id:"tech-sundial",title:()=>t.race.unfathomable?z("tech_moondial"):z("tech_sundial"),desc:()=>t.race.unfathomable?z("tech_moondial_desc"):z("tech_sundial_desc"),category:"science",era:"primitive",reqs:{primitive:2},grant:["primitive",3],cost:{Lumber:()=>8,Stone:()=>10},effect:()=>t.race.unfathomable?z("tech_moondial_effect"):z("tech_sundial_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_sundial_msg"),"info",!1,["progress"]),t.resource.Knowledge.display=!0,t.city.calendar.day++,t.race.infectious&&(t.civic.garrison.display=!0,t.settings.showCivic=!0,t.city.garrison={count:0,on:0}),t.race.banana&&!t.race.terrifying&&(t.settings.showResources=!0,t.settings.showMarket=!0,t.resource.Money.display=!0,t.city.market.active=!0,t.tech.currency=2),t.race.calm&&(t.resource.Zen.display=!0,t.city.meditation={count:0}),!0)}},housing:{id:"tech-housing",title:z("tech_housing"),desc:z("tech_housing_desc"),category:"housing",era:"civilized",reqs:{primitive:3},grant:["housing",1],cost:{Knowledge:()=>10},effect:z("tech_housing_effect"),action(){return!!Cs($(this)[0])&&(t.city.basic_housing={count:0},!0)}},cottage:{id:"tech-cottage",title:()=>Ks("medium"),desc:z("tech_cottage_desc"),category:"housing",era:"civilized",reqs:{housing:1,cement:1,mining:3},grant:["housing",2],cost:{Knowledge:()=>3600},effect:z("tech_cottage_effect"),action(){return!!Cs($(this)[0])&&(t.city.cottage={count:0},!0)}},apartment:{id:"tech-apartment",title:()=>Ks("large"),desc:()=>Ks("large"),category:"housing",era:"discovery",reqs:{housing:2,high_tech:2},grant:["housing",3],cost:{Knowledge:()=>15750},effect:z("tech_apartment_effect"),action(){return!!Cs($(this)[0])&&(t.city.apartment={count:0,on:0},!0)}},arcology:{id:"tech-arcology",title:z("tech_arcology"),desc:z("tech_arcology"),category:"housing",era:"dimensional",reqs:{hell_ruins:4,housing:3,high_tech:17},grant:["housing",4],cost:{Knowledge:()=>25e6},effect:()=>z("tech_arcology_effect"),action(){return!!Cs($(this)[0])&&(t.portal.arcology={count:0,on:0},!0)}},steel_beams:{id:"tech-steel_beams",title:z("tech_steel_beams"),desc:z("tech_housing_cost"),category:"housing",era:"discovery",reqs:{housing:2,smelting:2},not_trait:["cataclysm","lone_survivor"],grant:["housing_reduction",1],cost:{Knowledge:()=>11250,Steel:()=>2500},effect:()=>z("tech_steel_beams_effect",[Ks("small"),Ks("medium")]),action(){return!!Cs($(this)[0])}},mythril_beams:{id:"tech-mythril_beams",title:z("tech_mythril_beams"),desc:z("tech_housing_cost"),category:"housing",era:"early_space",reqs:{housing_reduction:1,space:3},grant:["housing_reduction",2],cost:{Knowledge:()=>175e3,Mythril:()=>1e3},effect:()=>z("tech_mythril_beams_effect",[Ks("small"),Ks("medium")]),action(){return!!Cs($(this)[0])}},neutronium_walls:{id:"tech-neutronium_walls",title:z("tech_neutronium_walls"),desc:z("tech_housing_cost"),category:"housing",era:"deep_space",reqs:{housing_reduction:2,gas_moon:1},grant:["housing_reduction",3],cost:{Knowledge:()=>3e5,Neutronium:()=>850},effect:()=>z("tech_neutronium_walls_effect",[Ks("small"),Ks("medium")]),action(){return!!Cs($(this)[0])}},bolognium_alloy_beams:{id:"tech-bolognium_alloy_beams",title:z("tech_bolognium_alloy_beams"),desc:z("tech_housing_cost"),category:"housing",era:"intergalactic",reqs:{housing_reduction:3,gateway:3},grant:["housing_reduction",4],cost:{Knowledge:()=>375e4,Adamantite:()=>25e5,Bolognium:()=>1e5},effect:()=>z("tech_bolognium_alloy_beams_effect",[Ks("small"),Ks("medium")]),action(){return!!Cs($(this)[0])}},aphrodisiac:{id:"tech-aphrodisiac",title:z("tech_aphrodisiac"),desc:z("tech_aphrodisiac_desc"),category:"housing",era:"civilized",reqs:{housing:2},grant:["reproduction",1],not_trait:["artifical"],cost:{Knowledge:()=>4500},effect:z("tech_aphrodisiac_effect"),action(){return!!Cs($(this)[0])}},fertility_clinic:{id:"tech-fertility_clinic",title:z("tech_fertility_clinic"),desc:z("tech_fertility_clinic"),category:"housing",era:"intergalactic",reqs:{reproduction:1,xeno:6},not_trait:["cataclysm"],grant:["reproduction",2],cost:{Knowledge:()=>45e5},effect:z("tech_fertility_clinic_effect"),action(){return!!Cs($(this)[0])}},captive_housing:{id:"tech-captive_housing",title:z("tech_captive_housing"),desc:z("tech_captive_housing"),category:"eldritch",era:"civilized",reqs:{housing:1},trait:["unfathomable"],grant:["unfathomable",1],cost:{Knowledge:()=>12},effect:z("tech_captive_housing_effect"),action(){return!!Cs($(this)[0])&&(t.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)}},torture:{id:"tech-torture",title:z("tech_torture"),desc:z("tech_torture"),category:"eldritch",era:"civilized",reqs:{unfathomable:1},trait:["unfathomable"],grant:["unfathomable",2],cost:{Knowledge:()=>25},effect:z("tech_torture_effect"),action(){return!!Cs($(this)[0])&&(t.civic.torturer.display=!0,!0)}},thrall_quarters:{id:"tech-thrall_quarters",title:z("tech_thrall_quarters"),desc:z("tech_thrall_quarters"),category:"eldritch",era:"civilized",reqs:{unfathomable:2,high_tech:6},trait:["unfathomable"],grant:["unfathomable",3],cost:{Knowledge:()=>95e3,Cement:()=>5e4,Wrought_Iron:()=>12500},effect:z("tech_thrall_quarters_effect"),action(){return!!Cs($(this)[0])&&(t.civic.torturer.display=!0,!0)}},psychic_energy:{id:"tech-psychic_energy",title:z("tech_psychic_energy"),desc:z("tech_psychic_energy"),category:"eldritch",era:"civilized",reqs:{housing:1},condition:()=>t.settings.showCivic,trait:["psychic"],grant:["psychic",1],cost:{Knowledge:()=>15},effect:z("tech_psychic_energy_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Energy.display=!0,t.settings.showPsychic=!0,t.race.psychicPowers={boost:{r:"Food"},boostTime:0},!0)},post(){Ai()}},psychic_attack:{id:"tech-psychic_attack",title:z("tech_psychic_attack"),desc:z("tech_psychic_attack"),category:"eldritch",era:"civilized",reqs:{psychic:1,military:1},condition:()=>t.stats.psykill>=10,trait:["psychic"],grant:["psychic",2],cost:{Knowledge:()=>100},effect:z("tech_psychic_attack_effect"),action(){return!!Cs($(this)[0])&&(t.race.psychicPowers.assaultTime=0,!0)},post(){Ai()}},psychic_finance:{id:"tech-psychic_finance",title:z("tech_psychic_finance"),desc:z("tech_psychic_finance"),category:"eldritch",era:"civilized",reqs:{psychic:2,high_tech:4},trait:["psychic"],grant:["psychic",3],cost:{Knowledge:()=>65e3},effect:z("tech_psychic_finance_effect"),action(){return!!Cs($(this)[0])&&(t.race.psychicPowers.cash=0,!0)},post(){Ai()}},psychic_channeling:{id:"tech-psychic_channeling",title:z("tech_psychic_channeling"),desc:z("tech_psychic_channeling"),category:"eldritch",era:"deep_space",reqs:{psychic:3,high_tech:10},trait:["psychic"],grant:["psychic",4],cost:{Knowledge:()=>36e4},effect:z("tech_psychic_channeling_effect"),action(){return!!Cs($(this)[0])&&(t.race.psychicPowers.channel={cash:0,assault:0,boost:0},!0)},post(){Ai()}},psychic_efficiency:{id:"tech-psychic_efficiency",title:z("tech_psychic_efficiency"),desc:z("tech_psychic_efficiency"),category:"eldritch",era:"intergalactic",reqs:{psychic:4,high_tech:16},trait:["psychic"],grant:["psychic",5],cost:{Knowledge:()=>525e4},effect:z("tech_psychic_efficiency_effect"),action(){return!!Cs($(this)[0])},post(){Ai()}},mind_break:{id:"tech-mind_break",title:z("tech_mind_break"),desc:z("tech_mind_break"),category:"eldritch",era:"civilized",reqs:{psychic:2,high_tech:1,unfathomable:2},trait:["psychic"],grant:["psychicthrall",1],cost:{Knowledge:()=>7e3},effect:z("tech_mind_break_effect"),action(){return!!Cs($(this)[0])},post(){Ai()}},psychic_stun:{id:"tech-psychic_stun",title:z("tech_psychic_stun"),desc:z("tech_psychic_stun"),category:"eldritch",era:"civilized",reqs:{psychicthrall:1,high_tech:3,unfathomable:2},trait:["psychic"],grant:["psychicthrall",2],cost:{Knowledge:()=>32e3},effect:z("tech_psychic_stun_effect"),action(){return!!Cs($(this)[0])},post(){Ai()}},spear:{id:"tech-spear",title:z("tech_spear"),desc:z("tech_spear_desc"),category:"foraging",era:"civilized",reqs:{primitive:3,storage:1},trait:["forager"],grant:["foraging",1],cost:{Knowledge:()=>110,Stone:()=>75},effect:z("tech_spear_effect"),action(){return!!Cs($(this)[0])}},bronze_spear:{id:"tech-bronze_spear",title:z("tech_bronze_spear"),desc:z("tech_bronze_spear_desc"),category:"foraging",era:"civilized",reqs:{foraging:1,mining:2},trait:["forager"],grant:["foraging",2],cost:{Knowledge:()=>525,Copper:()=>50},effect:z("tech_bronze_spear_effect"),action(){return!!Cs($(this)[0])}},iron_spear:{id:"tech-iron_spear",title:z("tech_iron_spear"),desc:z("tech_iron_spear_desc"),category:"foraging",era:"civilized",reqs:{foraging:2,mining:3},trait:["forager"],grant:["foraging",3],cost:{Knowledge:()=>t.city.ptrait.includes("unstable")?1650:3300,Iron:()=>375},effect:z("tech_bronze_spear_effect"),action(){return!!Cs($(this)[0])}},dowsing_rod:{id:"tech-dowsing_rod",title:z("tech_dowsing_rod"),desc:z("tech_dowsing_rod_desc"),category:"foraging",era:"civilized",reqs:{foraging:1,mining:2},trait:["forager"],grant:["dowsing",1],cost:{Knowledge:()=>450,Lumber:()=>750},effect:z("tech_dowsing_rod_effect"),action(){return!!Cs($(this)[0])}},metal_detector:{id:"tech-metal_detector",title:z("tech_metal_detector"),desc:z("tech_metal_detector_desc"),category:"foraging",era:"civilized",reqs:{dowsing:1,high_tech:4},trait:["forager"],grant:["dowsing",2],cost:{Knowledge:()=>65e3},effect:z("tech_metal_detector_effect"),action(){return!!Cs($(this)[0])}},smokehouse:{id:"tech-smokehouse",title:()=>t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?z("city_smokehouse_easter"):z("tech_smokehouse"),desc:()=>t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?z("tech_smokehouse_easter_desc"):z("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:()=>80},effect:()=>t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?z("tech_smokehouse_easter_effect"):z("tech_smokehouse_effect"),action(){return!!Cs($(this)[0])&&(fi("city","smokehouse","silo",{count:0}),!0)},post(){t.tech.s_lodge&&(t.tech.hunting=2)}},lodge:{id:"tech-lodge",title:z("tech_lodge"),desc:z("tech_lodge"),wiki:!!t.race.carnivore,category:"agriculture",era:"civilized",reqs:{hunting:1,housing:1,currency:1},condition:()=>!t.tech.s_lodge,grant:["hunting",2],cost:{Knowledge:()=>180},effect:z("tech_lodge_effect"),action(){return!!Cs($(this)[0])&&(fi("city","lodge","farm",{count:0}),!0)}},alt_lodge:{id:"tech-alt_lodge",title(){return this.condition()?z("tech_lodge_alt"):z("tech_lodge")},desc(){return this.condition()?z("tech_lodge_alt"):z("tech_lodge")},wiki:!t.race.carnivore,category:"housing",era:"civilized",reqs:{housing:1,currency:1},grant:["s_lodge",1],condition:()=>!!(("wendigo"===t.race.species||t.race.detritivore)&&!t.race.carnivore&&!t.race.herbivore||t.race.carnivore&&t.race.soul_eater||t.race.artifical||t.race.unfathomable),cost:{Knowledge:()=>t.race.artifical?1e4:180},effect(){return this.condition()?z("tech_lodge_effect_alt"):z("tech_lodge_effect")},action(){return!!Cs($(this)[0])&&(fi("city","lodge","farm",{count:0}),!0)}},soul_well:{id:"tech-soul_well",title:z("tech_soul_well"),desc:z("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:()=>10},effect:z("tech_soul_well_effect"),action(){return!!Cs($(this)[0])&&(t.city.soul_well={count:0},!0)}},compost:{id:"tech-compost",title:z("tech_compost"),desc:z("tech_compost_desc"),category:"compost",era:"civilized",reqs:{primitive:3},trait:["detritivore"],not_trait:["cataclysm","artifical","lone_survivor"],grant:["compost",1],cost:{Knowledge:()=>10},effect:z("tech_compost_effect"),action(){return!!Cs($(this)[0])&&(t.city.compost={count:0,on:0},!0)}},hot_compost:{id:"tech-hot_compost",title:z("tech_hot_compost"),desc:z("tech_hot_compost"),category:"compost",era:"civilized",reqs:{compost:1},trait:["detritivore"],grant:["compost",2],cost:{Knowledge:()=>100},effect:z("tech_hot_compost_effect"),action(){return!!Cs($(this)[0])}},mulching:{id:"tech-mulching",title:z("tech_mulching"),desc:z("tech_mulching"),category:"compost",era:"civilized",reqs:{compost:2,mining:3},trait:["detritivore"],grant:["compost",3],cost:{Knowledge:()=>3200},effect:z("tech_mulching_effect"),action(){return!!Cs($(this)[0])}},adv_mulching:{id:"tech-adv_mulching",title:z("tech_adv_mulching"),desc:z("tech_adv_mulching"),category:"compost",era:"discovery",reqs:{compost:3,high_tech:2},trait:["detritivore"],grant:["compost",4],cost:{Knowledge:()=>16e3},effect:z("tech_adv_mulching_effect"),action(){return!!Cs($(this)[0])}},agriculture:{id:"tech-agriculture",title:z("tech_agriculture"),desc:z("tech_agriculture_desc"),category:"agriculture",era:"civilized",reqs:{primitive:3},condition:()=>!(!t.race.herbivore&&(t.race.carnivore||t.race.detritivore||t.race.soul_eater)),not_trait:["cataclysm","artifical","lone_survivor","unfathomable"],grant:["agriculture",1],cost:{Knowledge:()=>10},effect:z("tech_agriculture_effect"),action(){return!!Cs($(this)[0])&&(fi("city","farm","lodge",{count:0}),!0)}},farm_house:{id:"tech-farm_house",title:z("tech_farm_house"),desc:z("tech_farm_house_desc"),category:"housing",era:"civilized",reqs:{agriculture:1,housing:1,currency:1},grant:["farm",1],cost:{Money:()=>50,Knowledge:()=>180},effect:z("tech_farm_house_effect"),action(){return!!Cs($(this)[0])}},irrigation:{id:"tech-irrigation",title:z("tech_irrigation"),desc:z("tech_irrigation_desc"),category:"agriculture",era:"civilized",reqs:{agriculture:1},grant:["agriculture",2],cost:{Knowledge:()=>55},effect:z("tech_irrigation_effect"),action(){return!!Cs($(this)[0])}},silo:{id:"tech-silo",title:z("tech_silo"),desc:z("tech_silo_desc"),category:"storage",era:"civilized",reqs:{agriculture:2,storage:1},grant:["agriculture",3],cost:{Knowledge:()=>80},effect:z("tech_silo_effect"),action(){return!!Cs($(this)[0])&&(fi("city","silo","smokehouse",{count:0}),!0)}},mill:{id:"tech-mill",title:z("tech_mill"),desc:z("tech_mill_desc"),category:"agriculture",era:"civilized",reqs:{agriculture:3,mining:3},grant:["agriculture",4],cost:{Knowledge:()=>5400},effect:z("tech_mill_effect"),action(){return!!Cs($(this)[0])&&(fi("city","mill","windmill",{count:0,on:0}),!0)}},windmill:{id:"tech-windmill",title:z("tech_windmill"),desc:z("tech_windmill_desc"),category:"agriculture",era:"discovery",reqs:{agriculture:4,high_tech:1},grant:["agriculture",5],cost:{Knowledge:()=>16200},effect:z("tech_windmill_effect"),action(){return!!Cs($(this)[0])}},windturbine:{id:"tech-windturbine",title:z("tech_windturbine"),desc:z("tech_windturbine"),category:"power_generation",era:"globalized",reqs:{agriculture:5,high_tech:4},grant:["agriculture",6],cost:{Knowledge:()=>66e3},effect:z("tech_windturbine_effect"),action(){return!!Cs($(this)[0])}},wind_plant:{id:"tech-wind_plant",title:()=>t.race.unfathomable?z("tech_watermill"):z("tech_windmill"),desc:()=>t.race.unfathomable?z("tech_watermill"):z("tech_windmill"),category:"power_generation",era:"globalized",reqs:{high_tech:4},condition:()=>!!(t.race.carnivore||t.race.detritivore||t.race.artifical||t.race.soul_eater||t.race.unfathomable),not_trait:["herbivore"],grant:["wind_plant",1],cost:{Knowledge:()=>66e3},effect:()=>t.race.unfathomable?z("tech_watermill_effect"):z("tech_wind_plant_effect"),action(){return!!Cs($(this)[0])&&(fi("city","windmill","mill",{count:0,on:0}),!0)}},gmfood:{id:"tech-gmfood",title:z("tech_gmfood"),desc:z("tech_gmfood_desc"),category:"agriculture",era:"globalized",reqs:{agriculture:6,genetics:1},grant:["agriculture",7],cost:{Knowledge:()=>95e3},effect:z("tech_gmfood_effect"),action(){return!!Cs($(this)[0])}},foundry:{id:"tech-foundry",title:z("tech_foundry"),desc:z("tech_foundry"),category:"crafting",era:"civilized",reqs:{mining:2},grant:["foundry",1],cost:{Knowledge:()=>650},effect:z("tech_foundry_effect"),action(){return!!Cs($(this)[0])&&(t.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)}},artisans:{id:"tech-artisans",title:z("tech_artisans"),desc:z("tech_artisans"),category:"crafting",era:"civilized",reqs:{foundry:1},grant:["foundry",2],cost:{Knowledge:()=>1500},effect:z("tech_artisans_effect"),action(){return!!Cs($(this)[0])}},apprentices:{id:"tech-apprentices",title:z("tech_apprentices"),desc:z("tech_apprentices"),category:"crafting",era:"civilized",reqs:{foundry:2},grant:["foundry",3],cost:{Knowledge:()=>3200},effect:z("tech_apprentices_effect"),action(){return!!Cs($(this)[0])}},carpentry:{id:"tech-carpentry",title:z("tech_carpentry"),desc:z("tech_carpentry"),category:"crafting",era:"civilized",reqs:{foundry:3,saw:1},grant:["foundry",4],not_trait:["evil"],cost:{Knowledge:()=>5200},effect:z("tech_carpentry_effect"),action(){return!!Cs($(this)[0])}},demonic_craftsman:{id:"tech-demonic_craftsman",title:z("tech_master_craftsman"),desc:z("tech_master_craftsman"),category:"crafting",era:"discovery",wiki:!!t.race.evil,reqs:{foundry:3},grant:["foundry",5],trait:["evil"],cost:{Knowledge:()=>12e3},effect:z("tech_master_craftsman_effect"),action(){return!!Cs($(this)[0])}},master_craftsman:{id:"tech-master_craftsman",title:z("tech_master_craftsman"),desc:z("tech_master_craftsman"),category:"crafting",era:"discovery",wiki:!t.race.evil,reqs:{foundry:4},grant:["foundry",5],not_trait:["evil"],cost:{Knowledge:()=>12e3},effect:z("tech_master_craftsman_effect"),action(){return!!Cs($(this)[0])}},brickworks:{id:"tech-brickworks",title:z("tech_brickworks"),desc:z("tech_brickworks"),category:"crafting",era:"discovery",reqs:{foundry:5},grant:["foundry",6],cost:{Knowledge:()=>18500},effect:z("tech_brickworks_effect"),action(){return!!Cs($(this)[0])}},machinery:{id:"tech-machinery",title:z("tech_machinery"),desc:z("tech_machinery"),category:"crafting",era:"globalized",reqs:{foundry:6,high_tech:4},grant:["foundry",7],cost:{Knowledge:()=>66e3},effect:z("tech_machinery_effect"),action(){return!!Cs($(this)[0])}},cnc_machine:{id:"tech-cnc_machine",title:z("tech_cnc_machine"),desc:z("tech_cnc_machine"),category:"crafting",era:"globalized",reqs:{foundry:7,high_tech:8},grant:["foundry",8],cost:{Knowledge:()=>132e3},effect:z("tech_cnc_machine_effect"),action(){return!!Cs($(this)[0])}},vocational_training:{id:"tech-vocational_training",title:z("tech_vocational_training"),desc:z("tech_vocational_training"),category:"crafting",era:"industrialized",reqs:{foundry:1,high_tech:3},grant:["v_train",1],cost:{Knowledge:()=>3e4},effect:z("tech_vocational_training_effect"),action(){return!!Cs($(this)[0])}},stellar_forge:{id:"tech-stellar_forge",title:z("tech_stellar_forge"),desc:z("tech_stellar_forge"),category:"crafting",era:"intergalactic",reqs:{foundry:8,high_tech:15,gateway:3,neutron:1},grant:["star_forge",1],cost:{Knowledge:()=>45e5},effect:z("tech_stellar_forge_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.stellar_forge={count:0,on:0},!0)}},stellar_smelting:{id:"tech-stellar_smelting",title:z("tech_stellar_smelting"),desc:z("tech_stellar_smelting"),category:"crafting",era:"intergalactic",reqs:{star_forge:1,xeno:4},grant:["star_forge",2],cost:{Knowledge:()=>5e6,Vitreloy:()=>1e4},effect:z("tech_stellar_smelting_effect"),action(){return!!Cs($(this)[0])},post(){Qs()}},assembly_line:{id:"tech-assembly_line",title:z("tech_assembly_line"),desc:z("tech_assembly_line"),category:"crafting",era:"globalized",reqs:{high_tech:4},grant:["factory",1],cost:{Knowledge:()=>72e3,Copper:()=>125e3},effect:`${z("tech_assembly_line_effect")} ${z("tech_factory_warning")}`,action(){return!!Cs($(this)[0])}},automation:{id:"tech-automation",title:z("tech_automation"),desc:z("tech_automation"),category:"crafting",era:"early_space",reqs:{high_tech:8,factory:1},grant:["factory",2],cost:{Knowledge:()=>165e3},effect:`${z("tech_automation_effect")} ${z("tech_factory_warning")}`,action(){return!!Cs($(this)[0])}},laser_cutters:{id:"tech-laser_cutters",title:z("tech_laser_cutters"),desc:z("tech_laser_cutters"),category:"crafting",era:"deep_space",reqs:{high_tech:9,factory:2},grant:["factory",3],cost:{Knowledge:()=>3e5,Elerium:()=>200},effect:`${z("tech_laser_cutters_effect")} ${z("tech_factory_warning")}`,action(){return!!Cs($(this)[0])}},high_tech_factories:{id:"tech-high_tech_factories",title:z("tech_high_tech_factories"),desc:z("tech_high_tech_factories"),category:"crafting",era:"intergalactic",reqs:{high_tech:17,alpha:4,factory:3},grant:["factory",4],cost:{Knowledge:()=>135e5,Vitreloy:()=>5e5,Orichalcum:()=>3e5},effect:`${z("tech_high_tech_factories_effect")} ${z("tech_factory_warning")}`,action(){return!!Cs($(this)[0])}},theatre:{id:"tech-theatre",title:z("tech_theatre"),desc:z("tech_theatre"),category:"entertainment",era:"civilized",reqs:{housing:1,currency:1,cement:1},grant:["theatre",1],not_trait:["joyless"],cost:{Knowledge:()=>750},effect:z("tech_theatre_effect"),action(){return!!Cs($(this)[0])&&(t.city.amphitheatre={count:0},!0)}},playwright:{id:"tech-playwright",title:z("tech_playwright"),desc:z("tech_playwright"),category:"entertainment",era:"civilized",reqs:{theatre:1,science:2},grant:["theatre",2],cost:{Knowledge:()=>1080},effect:z("tech_playwright_effect"),action(){return!!Cs($(this)[0])}},magic:{id:"tech-magic",title:()=>"magic"===t.race.universe?z("tech_illusionist"):z("tech_magic"),desc:()=>"magic"===t.race.universe?z("tech_illusionist"):z("tech_magic"),category:"entertainment",era:"discovery",reqs:{theatre:2,high_tech:1},grant:["theatre",3],cost:{Knowledge:()=>7920},effect:z("tech_magic_effect"),effect:()=>"magic"===t.race.universe?z("tech_illusionist_effect"):z("tech_magic_effect"),action(){return!!Cs($(this)[0])}},superstars:{id:"tech-superstars",title:z("tech_superstars"),desc:z("tech_superstars"),category:"entertainment",era:"interstellar",reqs:{theatre:3,high_tech:12},grant:["superstar",1],cost:{Knowledge:()=>66e4},effect:z("tech_superstars_effect"),action(){return!!Cs($(this)[0])}},radio:{id:"tech-radio",title:z("tech_radio"),desc:z("tech_radio"),category:"entertainment",era:"discovery",reqs:{theatre:3,high_tech:2},grant:["broadcast",1],cost:{Knowledge:()=>16200},effect:()=>z("tech_radio_effect",[Es()]),action(){return!!Cs($(this)[0])}},tv:{id:"tech-tv",title:z("tech_tv"),desc:z("tech_tv"),category:"entertainment",era:"globalized",reqs:{broadcast:1,high_tech:4},grant:["broadcast",2],cost:{Knowledge:()=>67500},effect:()=>z("tech_tv_effect",[Es()]),action(){return!!Cs($(this)[0])}},vr_center:{id:"tech-vr_center",title:z("tech_vr_center"),desc:z("tech_vr_center"),category:"entertainment",era:"interstellar",reqs:{broadcast:2,high_tech:12,stanene:1},grant:["broadcast",3],cost:{Knowledge:()=>62e4},effect:()=>z("tech_vr_center_effect"),action(){return!!Cs($(this)[0])&&(t.space.vr_center={count:0,on:0},!0)}},zoo:{id:"tech-zoo",title:z("tech_zoo"),desc:z("tech_zoo"),category:"entertainment",era:"dimensional",reqs:{hell_ruins:2},grant:["zoo",1],cost:{Knowledge:()=>225e5},effect:()=>z("tech_zoo_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.zoo={count:0,on:0},!0)}},casino:{id:"tech-casino",title:z("tech_casino"),desc:z("tech_casino"),category:"entertainment",era:"globalized",reqs:{high_tech:4,currency:5},grant:["gambling",1],cost:{Knowledge:()=>95e3},effect:z("tech_casino_effect"),action(){return!!Cs($(this)[0])&&(t.city.casino={count:0,on:0},t.space.spc_casino={count:0,on:0},!0)}},dazzle:{id:"tech-dazzle",title:z("tech_dazzle"),desc:z("tech_dazzle"),category:"banking",era:"globalized",reqs:{gambling:1},grant:["gambling",2],cost:{Knowledge:()=>125e3},effect:z("tech_dazzle_effect"),action(){return!!Cs($(this)[0])}},casino_vault:{id:"tech-casino_vault",title:z("tech_casino_vault"),desc:z("tech_casino_vault"),category:"banking",era:"early_space",reqs:{gambling:2,space:3},grant:["gambling",3],cost:{Knowledge:()=>145e3,Iridium:()=>2500},effect:z("tech_casino_vault_effect"),action(){return!!Cs($(this)[0])}},otb:{id:"tech-otb",title:z("tech_otb"),desc:z("tech_otb"),category:"banking",era:"deep_space",reqs:{gambling:3,banking:10,high_tech:10},grant:["gambling",4],cost:{Knowledge:()=>39e4},effect:z("tech_otb_effect"),action(){return!!Cs($(this)[0])}},online_gambling:{id:"tech-online_gambling",title:z("tech_online_gambling"),desc:z("tech_online_gambling"),category:"banking",era:"interstellar",reqs:{gambling:4,banking:12},grant:["gambling",5],cost:{Knowledge:()=>8e5},effect:z("tech_online_gambling_effect"),action(){return!!Cs($(this)[0])}},bolognium_vaults:{id:"tech-bolognium_vaults",title:z("tech_bolognium_vaults"),desc:z("tech_bolognium_vaults"),category:"banking",era:"intergalactic",reqs:{gambling:5,gateway:3},grant:["gambling",6],cost:{Knowledge:()=>39e5,Bolognium:()=>18e4},effect:z("tech_bolognium_vaults_effect"),action(){return!!Cs($(this)[0])}},mining:{id:"tech-mining",title:()=>t.race.sappy?z("tech_amber"):z("tech_mining"),desc:()=>t.race.sappy?z("tech_amber"):z("tech_mining_desc"),category:"mining",era:"civilized",reqs:{primitive:3},grant:["mining",1],cost:{Knowledge:()=>45},effect:()=>t.race.sappy?z("tech_amber_effect"):z(t.race.flier?"tech_mining_effect_alt":"tech_mining_effect"),action(){return!!Cs($(this)[0])&&(t.city.rock_quarry={count:0,on:0,asbestos:50},t.race.cannibalize&&(t.city.s_alter={count:0,rage:0,mind:0,regen:0,mine:0,harvest:0}),!0)}},bayer_process:{id:"tech-bayer_process",title:z("tech_bayer_process"),desc:z("tech_bayer_process_desc"),category:"mining",era:"civilized",reqs:{smelting:2},grant:["alumina",1],cost:{Knowledge:()=>4500},effect:()=>t.race.sappy?z("tech_bayer_process_effect_alt"):z("tech_bayer_process_effect"),action(){return!!Cs($(this)[0])&&(t.city.metal_refinery={count:0,on:0},ma(),!0)}},elysis_process:{id:"tech-elysis_process",title:z("tech_elysis_process"),desc:z("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:()=>675e3,Graphene:()=>45e3,Stanene:()=>75e3},effect:z("tech_elysis_process_effect"),action(){return!!Cs($(this)[0])}},smelting:{id:"tech-smelting",title:z("tech_smelting"),desc:z("tech_smelting_desc"),category:"mining",era:"civilized",reqs:{mining:3},grant:["smelting",1],cost:{Knowledge:()=>4050},effect:z("tech_smelting_effect"),action(){return!!Cs($(this)[0])&&(t.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)},post(){t.race.steelen&&(t.tech.smelting=2,gs())}},steel:{id:"tech-steel",title:z("tech_steel"),desc:z("tech_steel_desc"),category:"mining",era:"civilized",reqs:{smelting:1,mining:4},grant:["smelting",2],condition:()=>!t.race.steelen,cost:{Knowledge:()=>4950,Steel:()=>25},effect:z("tech_steel_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Steel.display=!0,!0)},post(){Qs(),Ai()}},blast_furnace:{id:"tech-blast_furnace",title:z("tech_blast_furnace"),desc:z("tech_blast_furnace"),category:"mining",era:"discovery",reqs:{smelting:2},grant:["smelting",3],cost:{Knowledge:()=>13500,Coal:()=>2e3},effect:z("tech_blast_furnace_effect"),action(){return!!Cs($(this)[0])},post(){t.race.steelen&&(t.tech.smelting=6,gs())}},bessemer_process:{id:"tech-bessemer_process",title:z("tech_bessemer_process"),desc:z("tech_bessemer_process"),category:"mining",era:"discovery",reqs:{smelting:3},grant:["smelting",4],condition:()=>!t.race.steelen,cost:{Knowledge:()=>19800,Coal:()=>5e3},effect:z("tech_bessemer_process_effect"),action(){return!!Cs($(this)[0])}},oxygen_converter:{id:"tech-oxygen_converter",title:z("tech_oxygen_converter"),desc:z("tech_oxygen_converter"),category:"mining",era:"industrialized",reqs:{smelting:4,high_tech:3},grant:["smelting",5],condition:()=>!t.race.steelen,cost:{Knowledge:()=>46800,Coal:()=>1e4},effect:z("tech_oxygen_converter_effect"),action(){return!!Cs($(this)[0])}},electric_arc_furnace:{id:"tech-electric_arc_furnace",title:z("tech_electric_arc_furnace"),desc:z("tech_electric_arc_furnace"),category:"mining",era:"globalized",reqs:{smelting:5,high_tech:4},grant:["smelting",6],condition:()=>!t.race.steelen,cost:{Knowledge:()=>85500,Copper:()=>25e3},effect:z("tech_electric_arc_furnace_effect"),action(){return!!Cs($(this)[0])}},hellfire_furnace:{id:"tech-hellfire_furnace",title:z("tech_hellfire_furnace"),desc:z("tech_hellfire_furnace"),category:"mining",era:"interstellar",reqs:{smelting:6,infernite:1},grant:["smelting",7],cost:{Knowledge:()=>615e3,Infernite:()=>2e3,Soul_Gem:()=>2},effect:z("tech_hellfire_furnace_effect"),action(){return!!Cs($(this)[0])}},infernium_fuel:{id:"tech-infernium_fuel",title:z("tech_infernium_fuel"),desc:z("tech_infernium_fuel"),category:"mining",era:"dimensional",reqs:{smelting:7,hell_ruins:4},grant:["smelting",8],cost:{Knowledge:()=>275e5,Coal:()=>45e6,Oil:()=>5e5,Infernite:()=>75e4},effect:z("tech_infernium_fuel_effect"),action(){return!!Cs($(this)[0])},post(){Qs()}},iridium_smelting_perk:{id:"tech-iridium_smelting_perk",title:z("tech_iridium_smelting"),desc:z("tech_iridium_smelting"),category:"mining",era:"early_space",path:["standard"],reqs:{smelting:6,space:3},condition:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=3),grant:["irid_smelting",1],cost:{Knowledge:()=>35e4,Mythril:()=>2500},effect:z("tech_iridium_smelting_effect"),action(){return!!Cs($(this)[0])}},rotary_kiln:{id:"tech-rotary_kiln",title:z("tech_rotary_kiln"),desc:z("tech_rotary_kiln"),category:"mining",era:"industrialized",reqs:{smelting:3,high_tech:3},grant:["copper",1],cost:{Knowledge:()=>57600,Coal:()=>8e3},effect:z("tech_rotary_kiln_effect"),action(){return!!Cs($(this)[0])}},metal_working:{id:"tech-metal_working",title:z("tech_metal_working"),desc:z("tech_metal_working_desc"),category:"mining",era:"civilized",reqs:{mining:1},grant:["mining",2],cost:{Knowledge:()=>350},effect:z("tech_metal_working_effect"),action(){return!!Cs($(this)[0])&&(t.city.mine={count:0,on:0},!0)}},iron_mining:{id:"tech-iron_mining",title:z("tech_iron_mining"),desc:z("tech_iron_mining_desc"),category:"mining",era:"civilized",reqs:{mining:2},grant:["mining",3],cost:{Knowledge:()=>t.city.ptrait.includes("unstable")?500:2500},effect:z("tech_iron_mining_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Iron.display=!0,t.city.foundry&&t.city.foundry.count>0&&(t.resource.Wrought_Iron.display=!0,ma()),!0)},post(){Ai()}},coal_mining:{id:"tech-coal_mining",title:z("tech_coal_mining"),desc:z("tech_coal_mining_desc"),category:"power_generation",era:"civilized",reqs:{mining:3},grant:["mining",4],cost:{Knowledge:()=>4320},effect:z("tech_coal_mining_effect"),action(){return!!Cs($(this)[0])&&(t.city.coal_mine={count:0,on:0},t.resource.Coal.display=!0,!0)},post(){Ai()}},storage:{id:"tech-storage",title:z("tech_storage"),desc:z("tech_storage_desc"),category:"storage",era:"civilized",reqs:{primitive:3,currency:1},grant:["storage",1],cost:{Knowledge:()=>20},effect:z("tech_storage_effect"),action(){return!!Cs($(this)[0])&&(t.city.shed={count:0},!0)}},reinforced_shed:{id:"tech-reinforced_shed",title:z("tech_reinforced_shed"),desc:z("tech_reinforced_shed_desc"),category:"storage",era:"civilized",reqs:{storage:1,cement:1,mining:3},grant:["storage",2],cost:{Money:()=>3750,Knowledge:()=>2550,Iron:()=>750,Cement:()=>500},effect:z("tech_reinforced_shed_effect"),action(){return!!Cs($(this)[0])}},barns:{id:"tech-barns",title:z("tech_barns"),desc:z("tech_barns_desc"),category:"storage",era:"discovery",reqs:{storage:2,smelting:2,alumina:1},grant:["storage",3],cost:{Knowledge:()=>15750,Aluminium:()=>3e3,Steel:()=>3e3},effect:z("tech_barns_effect"),action(){return!!Cs($(this)[0])},post(){Ls(!1,["city-shed"])}},warehouse:{id:"tech-warehouse",title:z("tech_warehouse"),desc:z("tech_warehouse_desc"),category:"storage",era:"industrialized",reqs:{storage:3,high_tech:3,smelting:2},grant:["storage",4],cost:{Knowledge:()=>40500,Titanium:()=>3e3},effect:z("tech_warehouse_effect"),action(){return!!Cs($(this)[0])},post(){Ls(!1,["city-shed"])}},cameras:{id:"tech-cameras",title:z("tech_cameras"),desc:z("tech_cameras_desc"),category:"storage",era:"globalized",reqs:{storage:4,high_tech:4},grant:["storage",5],cost:{Money:()=>9e4,Knowledge:()=>65e3},effect:z("tech_cameras_effect"),action(){return!!Cs($(this)[0])}},pocket_dimensions:{id:"tech-pocket_dimensions",title:z("tech_pocket_dimensions"),desc:z("tech_pocket_dimensions_desc"),category:"storage",era:"early_space",path:["standard"],reqs:{particles:1,storage:5},grant:["storage",6],cost:{Knowledge:()=>108e3},effect:z("tech_pocket_dimensions_effect"),action(){return!!Cs($(this)[0])}},ai_logistics:{id:"tech-ai_logistics",title:z("tech_ai_logistics"),desc:z("tech_ai_logistics"),category:"storage",era:"interstellar",reqs:{storage:6,proxima:2,science:13},grant:["storage",7],cost:{Knowledge:()=>65e4},effect:z("tech_ai_logistics_effect"),action(){return!!Cs($(this)[0])}},containerization:{id:"tech-containerization",title:z("tech_containerization"),desc:z("tech_containerization_desc"),category:"storage",era:"civilized",reqs:{cement:1,mining:1,storage:1,science:1},grant:["container",1],cost:{Knowledge:()=>2700},effect:z("tech_containerization_effect"),action(){return!!Cs($(this)[0])&&(t.city.storage_yard={count:0},!0)}},reinforced_crates:{id:"tech-reinforced_crates",title:z("tech_reinforced_crates"),desc:z("tech_reinforced_crates"),category:"storage",era:"civilized",reqs:{container:1,smelting:2},grant:["container",2],cost:{Knowledge:()=>6750,Sheet_Metal:()=>100},effect(){if(t.race.smoldering||t.race.kindling_kindred||t.race.evil){let e=z("resource_Bones_name");return t.race.smoldering?e=z("resource_Chrysotile_name"):t.race.kindling_kindred&&(e=z("resource_Stone_name")),z("tech_reinforced_crates_alt_effect",[e])}return z("tech_reinforced_crates_effect")},action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},cranes:{id:"tech-cranes",title:z("tech_cranes"),desc:z("tech_cranes_desc"),category:"storage",era:"discovery",reqs:{container:2,high_tech:2},grant:["container",3],cost:{Knowledge:()=>18e3,Copper:()=>1e3,Steel:()=>2500},effect:z("tech_cranes_effect"),action(){return!!Cs($(this)[0])}},titanium_crates:{id:"tech-titanium_crates",title:()=>z("tech_titanium_crates",[t.resource.Titanium.name]),desc:()=>z("tech_titanium_crates",[t.resource.Titanium.name]),category:"storage",era:"globalized",reqs:{container:3,titanium:1},grant:["container",4],cost:{Knowledge:()=>67500,Titanium:()=>1e3},effect:()=>z("tech_titanium_crates_effect",[t.resource.Titanium.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},mythril_crates:{id:"tech-mythril_crates",title:()=>z("tech_mythril_crates",[t.resource.Mythril.name]),desc:()=>z("tech_mythril_crates",[t.resource.Mythril.name]),category:"storage",era:"early_space",reqs:{container:4,space:3},grant:["container",5],cost:{Knowledge:()=>145e3,Mythril:()=>350},effect:()=>z("tech_mythril_crates_effect",[t.resource.Mythril.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},infernite_crates:{id:"tech-infernite_crates",title:()=>z("tech_crates",[t.resource.Infernite.name]),desc:()=>z("tech_infernite_crates_desc",[t.resource.Infernite.name]),category:"storage",era:"interstellar",reqs:{container:5,infernite:1},grant:["container",6],cost:{Knowledge:()=>575e3,Infernite:()=>1e3},effect:()=>z("tech_infernite_crates_effect",[t.resource.Infernite.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},graphene_crates:{id:"tech-graphene_crates",title:()=>z("tech_crates",[t.resource.Graphene.name]),desc:()=>z("tech_crates",[t.resource.Graphene.name]),category:"storage",era:"interstellar",path:["standard","truepath"],reqs:{container:6,graphene:1},grant:["container",7],cost:{Knowledge:()=>725e3,Graphene:()=>75e3},effect:()=>z("tech_graphene_crates_effect",[t.resource.Graphene.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},bolognium_crates:{id:"tech-bolognium_crates",title:()=>z("tech_crates",[t.resource.Bolognium.name]),desc:()=>z("tech_crates",[t.resource.Bolognium.name]),category:"storage",era:"intergalactic",reqs:{container:7,gateway:3},grant:["container",8],cost:{Knowledge:()=>342e4,Bolognium:()=>9e4},effect:()=>z("tech_bolognium_crates_effect",[t.resource.Bolognium.name]),action(){return!!Cs($(this)[0])}},steel_containers:{id:"tech-steel_containers",title:()=>z("tech_containers",[t.resource.Steel.name]),desc:()=>z("tech_steel_containers_desc",[t.resource.Steel.name]),category:"storage",era:"discovery",reqs:{smelting:2,container:1},grant:["steel_container",1],cost:{Knowledge:()=>9e3,Steel:()=>250},effect(){if(t.race.smoldering||t.race.kindling_kindred||t.race.evil){let e=t.race.kindling_kindred||t.race.smoldering?t.race.smoldering?"Chrysotile":"Stone":"Plywood";return z("tech_steel_containers_alt_effect",[t.resource[e].name,t.resource.Steel.name])}return z("tech_steel_containers_effect",[t.resource.Steel.name])},action(){return!!Cs($(this)[0])&&(t.city.warehouse={count:0},!0)}},gantry_crane:{id:"tech-gantry_crane",title:z("tech_gantry_crane"),desc:z("tech_gantry_crane_desc"),category:"storage",era:"discovery",reqs:{steel_container:1,high_tech:2},grant:["steel_container",2],cost:{Knowledge:()=>22500,Steel:()=>5e3},effect:z("tech_gantry_crane_effect"),action(){return!!Cs($(this)[0])}},alloy_containers:{id:"tech-alloy_containers",title:()=>z("tech_containers",[t.resource.Alloy.name]),desc:()=>z("tech_alloy_containers_desc",[t.resource.Alloy.name]),category:"storage",era:"industrialized",reqs:{steel_container:2,storage:4},grant:["steel_container",3],cost:{Knowledge:()=>49500,Alloy:()=>2500},effect:()=>z("tech_alloy_containers_effect",[t.resource.Alloy.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},mythril_containers:{id:"tech-mythril_containers",title:()=>z("tech_containers",[t.resource.Mythril.name]),desc:()=>z("tech_mythril_containers_desc",[t.resource.Mythril.name]),category:"storage",era:"early_space",reqs:{steel_container:3,space:3},grant:["steel_container",4],cost:{Knowledge:()=>165e3,Mythril:()=>500},effect:()=>z("tech_mythril_containers_effect",[t.resource.Mythril.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},adamantite_containers:{id:"tech-adamantite_containers",title:()=>z("tech_containers",[t.resource.Adamantite.name]),desc:()=>z("tech_adamantite_containers_desc",[t.resource.Adamantite.name]),category:"storage",era:"interstellar",reqs:{steel_container:4,alpha:2},grant:["steel_container",5],cost:{Knowledge:()=>525e3,Adamantite:()=>17500},effect:()=>z("tech_adamantite_containers_effect",[t.resource.Adamantite.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},aerogel_containers:{id:"tech-aerogel_containers",title:()=>z("tech_containers",[t.resource.Aerogel.name]),desc:()=>z("tech_containers",[t.resource.Aerogel.name]),category:"storage",era:"interstellar",reqs:{steel_container:5,aerogel:1},grant:["steel_container",6],cost:{Knowledge:()=>775e3,Aerogel:()=>500},effect:()=>z("tech_aerogel_containers_effect",[t.resource.Aerogel.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},bolognium_containers:{id:"tech-bolognium_containers",title:()=>z("tech_containers",[t.resource.Bolognium.name]),desc:()=>z("tech_containers",[t.resource.Bolognium.name]),category:"storage",era:"intergalactic",reqs:{steel_container:6,gateway:3},grant:["steel_container",7],cost:{Knowledge:()=>35e5,Bolognium:()=>125e3},effect:()=>z("tech_bolognium_containers_effect",[t.resource.Bolognium.name]),action(){return!!Cs($(this)[0])}},nanoweave_containers:{id:"tech-nanoweave_containers",title:()=>z("tech_nanoweave_containers",[t.resource.Nanoweave.name]),desc:()=>z("tech_nanoweave_containers",[t.resource.Nanoweave.name]),category:"storage",era:"intergalactic",reqs:{steel_container:7,nanoweave:1},grant:["steel_container",8],cost:{Knowledge:()=>9e6,Nanoweave:()=>5e4},effect:()=>z("tech_nanoweave_containers_effect",[t.resource.Nanoweave.name]),action(){return!!Cs($(this)[0])}},evil_planning:{id:"tech-evil_planning",title:z("tech_urban_planning"),desc:z("tech_urban_planning"),category:"queues",era:"civilized",wiki:!!t.race.terrifying,reqs:{banking:2},grant:["queue",1],trait:["terrifying"],cost:{Knowledge:()=>2500},effect:z("tech_urban_planning_effect"),action(){return!!Cs($(this)[0])&&(t.queue.display=!0,!0)},post(){Hi()}},urban_planning:{id:"tech-urban_planning",title:z("tech_urban_planning"),desc:z("tech_urban_planning"),category:"queues",era:"civilized",wiki:!t.race.terrifying,reqs:{banking:2,currency:2},grant:["queue",1],not_trait:["terrifying"],cost:{Knowledge:()=>2500},effect:z("tech_urban_planning_effect"),action(){return!!Cs($(this)[0])&&(t.queue.display=!0,t.settings.msgFilters.queue.unlocked||(t.settings.msgFilters.queue.unlocked=!0,t.settings.msgFilters.queue.vis=!0),!0)},post(){Hi()}},zoning_permits:{id:"tech-zoning_permits",title:z("tech_zoning_permits"),desc:z("tech_zoning_permits"),category:"queues",era:"industrialized",reqs:{queue:1,high_tech:3},grant:["queue",2],cost:{Knowledge:()=>28e3},effect:()=>z("tech_zoning_permits_effect",[t.genes.queue&&t.genes.queue>=2?4:2]),action(){return!!Cs($(this)[0])},post(){Hi()}},urbanization:{id:"tech-urbanization",title:z("tech_urbanization"),desc:z("tech_urbanization"),category:"queues",era:"globalized",reqs:{queue:2,high_tech:6},grant:["queue",3],cost:{Knowledge:()=>95e3},effect:()=>z("tech_urbanization_effect",[t.genes.queue&&t.genes.queue>=2?6:3]),action(){return!!Cs($(this)[0])},post(){Hi()}},assistant:{id:"tech-assistant",title:z("tech_assistant"),desc:z("tech_assistant"),category:"queues",era:"civilized",reqs:{queue:1,science:4},grant:["r_queue",1],cost:{Knowledge:()=>5e3},effect:z("tech_assistant_effect"),action(){return!!Cs($(this)[0])&&(t.r_queue.display=!0,t.settings.msgFilters.building_queue.unlocked||(t.settings.msgFilters.building_queue.unlocked=!0,t.settings.msgFilters.building_queue.vis=!0,t.settings.msgFilters.research_queue.unlocked=!0,t.settings.msgFilters.research_queue.vis=!0),!0)},post(){Ui(),t.settings.tabLoad&&$("#resQueue").removeAttr("style")}},government:{id:"tech-government",title:z("tech_government"),desc:z("tech_government_desc"),category:"government",era:"civilized",reqs:{currency:1},grant:["govern",1],cost:{Knowledge:()=>750},effect:z("tech_government_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#govType"},"update"),ic({el:"#foreign"},"update"),ic({el:"#government .govTabs2"},"update"),t.settings.tabLoad&&$("#government .govTabs2").removeAttr("style")}},theocracy:{id:"tech-theocracy",title:z("govern_theocracy"),desc:z("govern_theocracy"),category:"government",era:"civilized",reqs:{govern:1,theology:2},grant:["gov_theo",1],cost:{Knowledge:()=>1200},effect:z("tech_theocracy_effect"),action(){return!!Cs($(this)[0])}},republic:{id:"tech-republic",title:z("govern_republic"),desc:z("govern_republic"),category:"government",era:"discovery",reqs:{govern:1},condition:()=>!!(t.tech.trade&&t.tech.trade>=2||t.race.terrifying),grant:["govern",2],cost:{Knowledge:()=>17e3},effect:z("tech_republic_effect"),action(){return!!Cs($(this)[0])}},socialist:{id:"tech-socialist",title:z("govern_socialist"),desc:z("govern_socialist"),category:"government",era:"discovery",reqs:{govern:1},condition:()=>!!(t.tech.trade&&t.tech.trade>=2||t.race.terrifying),grant:["gov_soc",1],cost:{Knowledge:()=>17e3},effect:z("tech_socialist_effect"),action(){return!!Cs($(this)[0])}},corpocracy:{id:"tech-corpocracy",title:z("govern_corpocracy"),desc:z("govern_corpocracy"),category:"government",era:"industrialized",reqs:{govern:2,high_tech:3},grant:["gov_corp",1],cost:{Knowledge:()=>26e3},effect:z("tech_corpocracy_effect"),action(){return!!Cs($(this)[0])}},technocracy:{id:"tech-technocracy",title:z("govern_technocracy"),desc:z("govern_technocracy"),category:"government",era:"industrialized",reqs:{govern:2,high_tech:3},grant:["govern",3],cost:{Knowledge:()=>26e3},effect:z("tech_technocracy_effect"),action(){return!!Cs($(this)[0])}},federation:{id:"tech-federation",title:z("govern_federation"),desc:z("govern_federation"),category:"government",era:"early_space",reqs:{govern:2},condition:()=>t.tech.unify&&t.tech.unify>=2||de(),grant:["gov_fed",1],cost:{Knowledge:()=>3e4},effect:z("tech_federation_effect"),action(){return!!Cs($(this)[0])}},magocracy:{id:"tech-magocracy",title:z("govern_magocracy"),desc:z("govern_magocracy"),category:"government",era:"industrialized",reqs:{govern:2,high_tech:3},condition:()=>"magic"===t.race.universe,grant:["gov_mage",1],cost:{Knowledge:()=>26e3},effect:z("tech_magocracy_effect"),action(){return!!Cs($(this)[0])}},governor:{id:"tech-governor",title:z("tech_governor"),desc:z("tech_governor"),category:"government",era:"civilized",reqs:{govern:1},condition:()=>!(!t.genes.governor||"anarchy"===t.civic.govern.type),grant:["governor",1],cost:{Knowledge:()=>1e3},effect:z("tech_governor_effect"),action(){return!!Cs($(this)[0])&&(t.settings.showGovernor=!0,!0)},post(){L()}},spy:{id:"tech-spy",title:z("tech_spy"),desc:z("tech_spy"),category:"spies",era:"civilized",reqs:{govern:1},grant:["spy",1],cost:{Knowledge:()=>1250},effect:z("tech_spy_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#foreign"},"update")}},espionage:{id:"tech-espionage",title:z("tech_espionage"),desc:z("tech_espionage"),category:"spies",era:"discovery",reqs:{spy:1,high_tech:1},grant:["spy",2],cost:{Knowledge:()=>7500},effect:z("tech_espionage_effect"),action(){return!!Cs($(this)[0])&&(t.settings.msgFilters.spy.unlocked||(t.settings.msgFilters.spy.unlocked=!0,t.settings.msgFilters.spy.vis=!0),!0)},post(){ic({el:"#foreign"},"update")}},spy_training:{id:"tech-spy_training",title:z("tech_spy_training"),desc:z("tech_spy_training"),category:"spies",era:"discovery",reqs:{spy:2,boot_camp:1},grant:["spy",3],cost:{Knowledge:()=>1e4},effect:z("tech_spy_training_effect"),action(){return!!Cs($(this)[0])}},spy_gadgets:{id:"tech-spy_gadgets",title:z("tech_spy_gadgets"),desc:z("tech_spy_gadgets"),category:"spies",era:"discovery",reqs:{spy:3,high_tech:2},grant:["spy",4],cost:{Knowledge:()=>15e3},effect:z("tech_spy_gadgets_effect"),action(){return!!Cs($(this)[0])}},code_breakers:{id:"tech-code_breakers",title:z("tech_code_breakers"),desc:z("tech_code_breakers"),category:"spies",era:"industrialized",reqs:{spy:4,high_tech:4},grant:["spy",5],cost:{Knowledge:()=>55e3},effect:z("tech_code_breakers_effect"),action(){return!!Cs($(this)[0])}},currency:{id:"tech-currency",title:z("tech_currency"),desc:z("tech_currency_desc"),category:"banking",era:"civilized",reqs:{housing:1},grant:["currency",1],cost:{Knowledge:()=>22,Lumber:()=>10},effect:z("tech_currency_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Money.display=!0,!0)}},market:{id:"tech-market",title:z("tech_market"),desc:z("tech_market_desc"),category:"banking",era:"civilized",reqs:{banking:1,govern:1},not_trait:["terrifying"],grant:["currency",2],cost:{Knowledge:()=>t.race.banana?300:1800},effect:z("tech_market_effect"),action(){return!!Cs($(this)[0])&&(t.settings.showResources=!0,t.settings.showMarket=!0,!0)}},tax_rates:{id:"tech-tax_rates",title:z("tech_tax_rates"),desc:z("tech_tax_rates_desc"),category:"banking",era:"civilized",reqs:{banking:2,currency:2,queue:1},not_trait:["terrifying"],grant:["currency",3],cost:{Knowledge:()=>3375},effect:z("tech_tax_rates_effect"),action(){return!!Cs($(this)[0])&&(t.civic.taxes.display=!0,!0)}},large_trades:{id:"tech-large_trades",title:z("tech_large_trades"),desc:z("tech_large_trades_desc"),category:"market",era:"civilized",reqs:{currency:3},not_trait:["terrifying"],grant:["currency",4],cost:{Knowledge:()=>6750},effect:z("tech_large_trades_effect"),action(){return!!Cs($(this)[0])},post(){t.race.noble&&(t.tech.currency=5,gs())}},corruption:{id:"tech-corruption",title:z("tech_corruption"),desc:z("tech_corruption_desc"),category:"banking",era:"industrialized",reqs:{currency:4,high_tech:3},not_trait:["terrifying","noble"],grant:["currency",5],cost:{Knowledge:()=>36e3},effect:z("tech_corruption_effect"),action(){return!!Cs($(this)[0])}},massive_trades:{id:"tech-massive_trades",title:z("tech_massive_trades"),desc:z("tech_massive_trades_desc"),category:"market",era:"globalized",reqs:{currency:5,high_tech:4},not_trait:["terrifying"],grant:["currency",6],cost:{Knowledge:()=>108e3},effect:z("tech_massive_trades_effect"),action(){return!!Cs($(this)[0])}},trade:{id:"tech-trade",title:z("tech_trade"),desc:z("tech_trade_desc"),category:"market",era:"civilized",reqs:{currency:2,military:1},not_trait:["terrifying"],grant:["trade",1],cost:{Knowledge:()=>t.race.banana?1200:4500},effect:z("tech_trade_effect"),action(){return!!Cs($(this)[0])&&(t.city.trade={count:0},t.city.market.active=!0,!0)}},diplomacy:{id:"tech-diplomacy",title:z("tech_diplomacy"),desc:z("tech_diplomacy_desc"),category:"market",era:"discovery",reqs:{trade:1,high_tech:1},not_trait:["terrifying"],grant:["trade",2],cost:{Knowledge:()=>16200},effect:z("tech_diplomacy_effect"),action(){return!!Cs($(this)[0])}},freight:{id:"tech-freight",title:z("tech_freight"),desc:z("tech_freight_desc"),category:"market",era:"industrialized",reqs:{trade:2,high_tech:3},not_trait:["terrifying"],grant:["trade",3],cost:{Knowledge:()=>37800},effect:z("tech_freight_effect"),action(){return!!Cs($(this)[0])},post(){t.tech.high_tech>=6&&Ce("Physics")}},wharf:{id:"tech-wharf",title:z("tech_wharf"),desc:z("tech_wharf_desc"),category:"market",era:"industrialized",reqs:{trade:1,high_tech:3,oil:1},not_trait:["thalassophobia"],grant:["wharf",1],cost:{Knowledge:()=>44e3},effect:z("tech_wharf_effect"),action(){return!!Cs($(this)[0])&&(t.city.wharf={count:0},!0)}},banking:{id:"tech-banking",title:z("tech_banking"),desc:z("tech_banking_desc"),category:"banking",era:"civilized",reqs:{currency:1},grant:["banking",1],cost:{Knowledge:()=>90},effect:z("tech_banking_effect"),action(){return!!Cs($(this)[0])&&(t.city.bank={count:0},!0)}},investing:{id:"tech-investing",title:z("tech_investing"),desc:z("tech_investing_desc"),category:"banking",era:"civilized",reqs:{banking:1},grant:["banking",2],cost:{Money:()=>2500,Knowledge:()=>900},effect:z("tech_investing_effect"),action(){return!!Cs($(this)[0])&&(t.civic.banker.display=!0,!0)}},vault:{id:"tech-vault",title:z("tech_vault"),desc:z("tech_vault_desc"),category:"banking",era:"civilized",reqs:{banking:2,cement:1},grant:["banking",3],cost:{Money:()=>2e3,Knowledge:()=>3600,Iron:()=>500,Cement:()=>750},effect:z("tech_vault_effect"),action(){return!!Cs($(this)[0])}},bonds:{id:"tech-bonds",title:z("tech_bonds"),desc:z("tech_bonds"),category:"banking",era:"civilized",reqs:{banking:3},grant:["banking",4],cost:{Money:()=>2e4,Knowledge:()=>5e3},effect:z("tech_bonds_effect"),action(){return!!Cs($(this)[0])}},steel_vault:{id:"tech-steel_vault",title:z("tech_steel_vault"),desc:z("tech_steel_vault"),category:"banking",era:"civilized",reqs:{banking:4,smelting:2},grant:["banking",5],cost:{Money:()=>3e4,Knowledge:()=>6750,Steel:()=>3e3},effect:z("tech_steel_vault_effect"),action(){return!!Cs($(this)[0])}},eebonds:{id:"tech-eebonds",title:z("tech_eebonds"),desc:z("tech_eebonds"),category:"banking",era:"discovery",reqs:{banking:5,high_tech:1},grant:["banking",6],cost:{Money:()=>75e3,Knowledge:()=>18e3},effect:z("tech_eebonds_effect"),action(){return!!Cs($(this)[0])}},swiss_banking:{id:"tech-swiss_banking",title:Wr(),desc:Wr(),category:"banking",era:"industrialized",reqs:{banking:6},grant:["banking",7],cost:{Money:()=>125e3,Knowledge:()=>45e3},effect:z("tech_swiss_banking_effect"),action(){return!!Cs($(this)[0])}},safety_deposit:{id:"tech-safety_deposit",title:z("tech_safety_deposit"),desc:z("tech_safety_deposit"),category:"banking",era:"globalized",reqs:{banking:7,high_tech:4},grant:["banking",8],cost:{Money:()=>25e4,Knowledge:()=>67500},effect:z("tech_safety_deposit_effect"),action(){return!!Cs($(this)[0])}},stock_market:{id:"tech-stock_market",title:z("tech_stock_market"),desc:z("tech_stock_market"),category:"arpa",era:"globalized",reqs:{banking:8,high_tech:6},grant:["banking",9],cost:{Money:()=>325e3,Knowledge:()=>108e3},effect:z("tech_stock_market_effect"),action(){return!!Cs($(this)[0])},post(){Ce("Physics")}},hedge_funds:{id:"tech-hedge_funds",title:z("tech_hedge_funds"),desc:z("tech_hedge_funds"),category:"banking",era:"early_space",reqs:{banking:9,stock_exchange:1},grant:["banking",10],cost:{Money:()=>375e3,Knowledge:()=>126e3},effect:z("tech_hedge_funds_effect"),action(){return!!Cs($(this)[0])}},four_oh_one:{id:"tech-four_oh_one",title:z("tech_four_oh_one"),desc:z("tech_four_oh_one"),category:"banking",era:"early_space",reqs:{banking:10},grant:["banking",11],cost:{Money:()=>425e3,Knowledge:()=>144e3},effect:z("tech_four_oh_one_effect"),action(){return!!Cs($(this)[0])},flair:()=>z("tech_four_oh_one_flair")},exchange:{id:"tech-exchange",title:z("tech_exchange"),desc:z("tech_exchange"),category:"banking",era:"interstellar",reqs:{banking:11,alpha:2,graphene:1},grant:["banking",12],cost:{Money:()=>1e6,Knowledge:()=>675e3},effect:z("tech_exchange_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.exchange={count:0,on:0},!0)}},foreign_investment:{id:"tech-foreign_investment",title:z("tech_foreign_investment"),desc:z("tech_foreign_investment"),category:"banking",era:"intergalactic",reqs:{banking:12,xeno:10},grant:["banking",13],cost:{Money:()=>1e8,Knowledge:()=>8e6},effect:z("tech_foreign_investment_effect"),action(){return!!Cs($(this)[0])}},mythril_vault:{id:"tech-mythril_vault",title:z("tech_mythril_vault"),desc:z("tech_mythril_vault"),category:"banking",era:"early_space",reqs:{banking:5,space:3},grant:["vault",1],cost:{Money:()=>5e5,Knowledge:()=>15e4,Mythril:()=>750},effect:z("tech_mythril_vault_effect"),action(){return!!Cs($(this)[0])}},neutronium_vault:{id:"tech-neutronium_vault",title:z("tech_neutronium_vault"),desc:z("tech_neutronium_vault"),category:"banking",era:"deep_space",reqs:{vault:1,gas_moon:1},grant:["vault",2],cost:{Money:()=>75e4,Knowledge:()=>28e4,Neutronium:()=>650},effect:z("tech_neutronium_vault_effect"),action(){return!!Cs($(this)[0])}},adamantite_vault:{id:"tech-adamantite_vault",title:z("tech_adamantite_vault"),desc:z("tech_adamantite_vault"),category:"banking",era:"interstellar",reqs:{vault:2,alpha:2},grant:["vault",3],cost:{Money:()=>2e6,Knowledge:()=>56e4,Adamantite:()=>2e4},effect:z("tech_adamantite_vault_effect"),action(){return!!Cs($(this)[0])}},graphene_vault:{id:"tech-graphene_vault",title:z("tech_graphene_vault"),desc:z("tech_graphene_vault"),category:"banking",era:"interstellar",path:["standard","truepath"],reqs:{vault:3,graphene:1},grant:["vault",4],cost:{Money:()=>3e6,Knowledge:()=>75e4,Graphene:()=>4e5},effect:z("tech_graphene_vault_effect"),action(){return!!Cs($(this)[0])}},home_safe:{id:"tech-home_safe",title:z("tech_home_safe"),desc:z("tech_home_safe"),category:"banking",era:"discovery",reqs:{banking:5},grant:["home_safe",1],cost:{Money:()=>42e3,Knowledge:()=>8e3,Steel:()=>4500},effect:z("tech_home_safe_effect"),action(){return!!Cs($(this)[0])}},fire_proof_safe:{id:"tech-fire_proof_safe",title:z("tech_fire_proof_safe"),desc:z("tech_fire_proof_safe"),category:"banking",era:"early_space",reqs:{home_safe:1,space:3},grant:["home_safe",2],cost:{Money:()=>25e4,Knowledge:()=>12e4,Iridium:()=>1e3},effect:z("tech_fire_proof_safe_effect"),action(){return!!Cs($(this)[0])}},tamper_proof_safe:{id:"tech-tamper_proof_safe",title:z("tech_tamper_proof_safe"),desc:z("tech_tamper_proof_safe"),category:"banking",era:"interstellar",reqs:{home_safe:2,infernite:1},grant:["home_safe",3],cost:{Money:()=>25e5,Knowledge:()=>6e5,Infernite:()=>800},effect:z("tech_tamper_proof_safe_effect"),action(){return!!Cs($(this)[0])}},monument:{id:"tech-monument",title:z("tech_monument"),desc:z("tech_monument"),category:"arpa",era:"globalized",reqs:{high_tech:6},grant:["monument",1],cost:{Knowledge:()=>12e4},effect:z("tech_monument_effect"),action(){return!!Cs($(this)[0])&&(t.arpa.m_type=Ce("Monument"),!0)},post(){Ce("Physics")}},tourism:{id:"tech-tourism",title:z("tech_tourism"),desc:z("tech_tourism"),category:"banking",era:"early_space",reqs:{monuments:2,monument:1},not_trait:["cataclysm","lone_survivor"],grant:["monument",2],cost:{Knowledge:()=>15e4},effect:z("tech_tourism_effect"),action(){return!!Cs($(this)[0])&&(t.city.tourist_center={count:0,on:0},!0)}},xeno_tourism:{id:"tech-xeno_tourism",title:z("tech_xeno_tourism"),desc:z("tech_xeno_tourism"),category:"banking",era:"intergalactic",reqs:{monument:2,xeno:10,monuments:10},not_trait:["cataclysm"],grant:["monument",3],cost:{Knowledge:()=>8e6},effect:z("tech_xeno_tourism_effect"),action(){return!!Cs($(this)[0])}},science:{id:"tech-science",title:z("tech_science"),desc:z("tech_science_desc"),category:"science",era:"civilized",reqs:{housing:1},grant:["science",1],cost:{Knowledge:()=>65},effect:z("tech_science_effect"),action(){return!!Cs($(this)[0])&&(t.city.university={count:0},!0)}},library:{id:"tech-library",title:z("tech_library"),desc:z("tech_library_desc"),category:"science",era:"civilized",reqs:{science:1,cement:1},grant:["science",2],cost:{Knowledge:()=>720},effect:z("tech_library_effect"),action(){return!!Cs($(this)[0])&&(t.city.library={count:0},!0)}},thesis:{id:"tech-thesis",title:z("tech_thesis"),desc:z("tech_thesis_desc"),category:"science",era:"civilized",reqs:{science:2},grant:["science",3],cost:{Knowledge:()=>1125},effect:z("tech_thesis_effect"),action(){return!!Cs($(this)[0])}},research_grant:{id:"tech-research_grant",title:z("tech_research_grant"),desc:z("tech_research_grant_desc"),category:"science",era:"civilized",reqs:{science:3},grant:["science",4],cost:{Knowledge:()=>3240},effect:z("tech_research_grant_effect"),action(){return!!Cs($(this)[0])}},scientific_journal:{id:"tech-scientific_journal",title:()=>"magic"===t.race.universe?z("tech_magic_tomes"):z("tech_scientific_journal"),desc:()=>"magic"===t.race.universe?z("tech_magic_tomes_desc"):z("tech_scientific_journal_desc"),category:"science",era:"industrialized",reqs:{science:4,high_tech:3},grant:["science",5],cost:{Knowledge:()=>27e3},effect:()=>"magic"===t.race.universe?z("tech_magic_tomes_effect"):z("tech_scientific_journal_effect"),action(){return!!Cs($(this)[0])}},adjunct_professor:{id:"tech-adjunct_professor",title:z("tech_adjunct_professor"),desc:z("tech_adjunct_professor"),category:"science",era:"industrialized",reqs:{science:5},grant:["science",6],cost:{Knowledge:()=>36e3},effect:()=>z("tech_adjunct_professor_effect",[Es(),t.civic.scientist?t.civic.scientist.name:z("job_scientist")]),action(){return!!Cs($(this)[0])}},tesla_coil:{id:"tech-tesla_coil",title:z("tech_tesla_coil"),desc:z("tech_tesla_coil_desc"),category:"science",era:"industrialized",reqs:{science:6,high_tech:3},grant:["science",7],cost:{Knowledge:()=>51750},effect:()=>z("tech_tesla_coil_effect",[Es()]),action(){return!!Cs($(this)[0])}},internet:{id:"tech-internet",title:z("tech_internet"),desc:z("tech_internet"),category:"science",era:"globalized",reqs:{science:7,high_tech:4},grant:["science",8],cost:{Knowledge:()=>61200},effect:z("tech_internet_effect"),action(){return!!Cs($(this)[0])&&(t.race.toxic&&"troll"===t.race.species&&eo("godwin"),!0)}},observatory:{id:"tech-observatory",title:z("tech_observatory"),desc:z("tech_observatory"),category:"science",era:"early_space",reqs:{science:8,space:3,luna:1},grant:["science",9],cost:{Knowledge:()=>148e3},effect:z("tech_observatory_effect"),action(){return!!Cs($(this)[0])&&(t.space.observatory={count:0,on:0},!0)}},world_collider:{id:"tech-world_collider",title:z("tech_world_collider"),desc:z("tech_world_collider"),category:"science",era:"deep_space",path:["standard"],reqs:{science:9,elerium:2},grant:["science",10],cost:{Knowledge:()=>35e4},effect:()=>z("tech_world_collider_effect",[ea().dwarf]),action(){return!!Cs($(this)[0])&&(t.space.world_collider={count:0},t.space.world_controller={count:0,on:0},!0)},flair:`
          ${z("tech_world_collider_flair1")}
          ${z("tech_world_collider_flair2")}
          `},laboratory:{id:"tech-laboratory",title:()=>"magic"===t.race.universe?z("tech_sanctum"):z("tech_laboratory"),desc:()=>"magic"===t.race.universe?z("tech_sanctum"):z("tech_laboratory_desc"),category:"science",era:"interstellar",reqs:{science:11,alpha:2},grant:["science",12],cost:{Knowledge:()=>5e5},effect:()=>"magic"===t.race.universe?z("tech_sanctum_effect"):z("tech_laboratory_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.laboratory={count:0,on:0},!0)},flair:()=>"magic"===t.race.universe?z("tech_sanctum_flair"):z("tech_laboratory_flair")},virtual_assistant:{id:"tech-virtual_assistant",title:z("tech_virtual_assistant"),desc:z("tech_virtual_assistant"),category:"science",era:"interstellar",reqs:{science:12,high_tech:12},grant:["science",13],cost:{Knowledge:()=>635e3},effect:()=>"magic"===t.race.universe?z("tech_virtual_assistant_magic_effect"):z("tech_virtual_assistant_effect"),action(){return!!Cs($(this)[0])}},dimensional_readings:{id:"tech-dimensional_readings",title:z("tech_dimensional_readings"),desc:z("tech_dimensional_readings"),category:"science",era:"interstellar",reqs:{science:13,infernite:2},grant:["science",14],cost:{Knowledge:()=>75e4},effect:()=>z("tech_dimensional_readings_effect"),action(){return!!Cs($(this)[0])}},quantum_entanglement:{id:"tech-quantum_entanglement",title:z("tech_quantum_entanglement"),desc:z("tech_quantum_entanglement"),category:"science",era:"interstellar",reqs:{science:14,neutron:1},grant:["science",15],cost:{Knowledge:()=>85e4,Neutronium:()=>7500,Soul_Gem:()=>2},effect:()=>z("tech_quantum_entanglement_effect",[2,"magic"===t.race.universe?z("tech_sanctum"):z("interstellar_laboratory_title"),Es()]),action(){return!!Cs($(this)[0])}},expedition:{id:"tech-expedition",title:()=>"magic"===t.race.universe?z("tech_expedition_wiz"):z("tech_expedition"),desc:()=>"magic"===t.race.universe?z("tech_expedition_wiz"):z("tech_expedition"),category:"science",era:"intergalactic",reqs:{science:15,xeno:4},grant:["science",16],cost:{Knowledge:()=>535e4},effect:()=>"magic"===t.race.universe?z("tech_expedition_wiz_effect"):z("tech_expedition_effect"),action(){return!!Cs($(this)[0])}},subspace_sensors:{id:"tech-subspace_sensors",title:z("tech_subspace_sensors"),desc:z("tech_subspace_sensors"),category:"science",era:"intergalactic",reqs:{science:16,high_tech:16},grant:["science",17],cost:{Knowledge:()=>6e6},effect:()=>z("tech_subspace_sensors_effect"),action(){return!!Cs($(this)[0])}},alien_database:{id:"tech-alien_database",title:z("tech_alien_database"),desc:z("tech_alien_database"),category:"progress",era:"intergalactic",reqs:{science:17,conflict:5},grant:["science",18],cost:{Knowledge:()=>825e4},effect:()=>z("tech_alien_database_effect"),action(){return!!Cs($(this)[0])}},orichalcum_capacitor:{id:"tech-orichalcum_capacitor",title:z("tech_orichalcum_capacitor"),desc:z("tech_orichalcum_capacitor"),category:"science",era:"intergalactic",reqs:{science:18,high_tech:17},grant:["science",19],cost:{Knowledge:()=>125e5,Orichalcum:()=>25e4},effect:()=>z("tech_orichalcum_capacitor_effect"),action(){return!!Cs($(this)[0])}},advanced_biotech:{id:"tech-advanced_biotech",title:z("tech_advanced_biotech"),desc:z("tech_advanced_biotech"),category:"science",era:"dimensional",reqs:{science:19,high_tech:18},grant:["science",20],cost:{Knowledge:()=>255e5},effect:()=>z("tech_advanced_biotech_effect"),action(){return!!Cs($(this)[0])}},codex_infinium:{id:"tech-codex_infinium",title:z("tech_codex_infinium"),desc:z("tech_codex_infinium"),category:"science",era:"dimensional",reqs:{science:20,sphinx_bribe:1},grant:["science",21],cost:{Knowledge:()=>401e5,Codex:()=>1},effect:()=>z("tech_codex_infinium_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Codex.display=!1,!0)}},bioscience:{id:"tech-bioscience",title:z("tech_bioscience"),desc:z("tech_bioscience_desc"),category:"science",era:"globalized",reqs:{science:8},grant:["genetics",1],cost:{Knowledge:()=>67500},effect:z("tech_bioscience_effect"),action(){return!!Cs($(this)[0])&&(t.city.biolab={count:0},!0)}},genetics:{id:"tech-genetics",title:z("tech_genetics"),desc:z("tech_genetics"),category:"arpa",era:"globalized",reqs:{genetics:1,high_tech:6},grant:["genetics",2],cost:{Knowledge:()=>108e3},effect:z("tech_genetics_effect"),action(){return!!Cs($(this)[0])&&(t.settings.arpa.genetics=!0,t.arpa.sequence||(t.arpa.sequence={max:5e4,progress:0,time:5e4,on:!t.race.cataclysm&&!t.race.orbit_decayed,boost:!1,auto:!1,labs:0}),!0)},post(){Ce("Genetics")}},crispr:{id:"tech-crispr",title:z("tech_crispr"),desc:z("tech_crispr"),category:"genes",era:"globalized",reqs:{genetics:3},grant:["genetics",4],cost:{Knowledge:()=>125e3},effect:()=>t.race.artifical?z("tech_crispr_effect_artifical"):z("tech_crispr_effect"),action(){return!!Cs($(this)[0])&&(t.settings.arpa.crispr=!0,t.settings.arpa.arpaTabs=2,!0)},post(){Ce("Genetics"),Ce("Crispr")}},shotgun_sequencing:{id:"tech-shotgun_sequencing",title:z("tech_shotgun_sequencing"),desc:()=>t.race.artifical?z("tech_shotgun_sequencing_desc_artifical"):z("tech_shotgun_sequencing_desc"),category:"genes",era:"early_space",reqs:{genetics:4},grant:["genetics",5],cost:{Knowledge:()=>165e3},effect:()=>t.race.artifical?z("tech_shotgun_sequencing_effect_artifical"):z("tech_shotgun_sequencing_effect"),action(){return!!Cs($(this)[0])&&(t.arpa.sequence.boost=!0,!0)},post(){Ce("Genetics")}},de_novo_sequencing:{id:"tech-de_novo_sequencing",title:z("tech_de_novo_sequencing"),desc:z("tech_de_novo_sequencing"),category:"genes",era:"early_space",reqs:{genetics:5},grant:["genetics",6],cost:{Knowledge:()=>22e4},effect:()=>t.race.artifical?z("tech_de_novo_sequencing_effect_artifical"):z("tech_de_novo_sequencing_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Genes.display=!0,!0)},post(){Ce("Genetics")}},dna_sequencer:{id:"tech-dna_sequencer",title:()=>t.race.artifical?z("tech_code_sequencer"):z("tech_dna_sequencer"),desc:()=>t.race.artifical?z("tech_code_sequencer"):z("tech_dna_sequencer"),category:"genes",era:"deep_space",reqs:{genetics:6},grant:["genetics",7],cost:{Knowledge:()=>3e5},effect:()=>t.race.artifical?z("tech_code_sequencer_effect"):z("tech_dna_sequencer_effect"),action(){return!!Cs($(this)[0])&&(t.arpa.sequence.auto=!0,!0)},post(){Ce("Genetics")}},rapid_sequencing:{id:"tech-rapid_sequencing",title:()=>t.race.artifical?z("tech_agile_development"):z("tech_rapid_sequencing"),desc:()=>t.race.artifical?z("tech_agile_development"):z("tech_rapid_sequencing"),category:"genes",era:"interstellar",path:["standard","truepath"],reqs:{genetics:7,high_tech:12},grant:["genetics",8],cost:{Knowledge:()=>8e5},effect:()=>t.race.artifical?z("tech_agile_development_effect"):z("tech_rapid_sequencing_effect"),action(){return!!Cs($(this)[0])}},mad_science:{id:"tech-mad_science",title:()=>"magic"===t.race.universe?z("tech_sages"):z("tech_mad_science"),desc:()=>"magic"===t.race.universe?z("tech_sages"):z("tech_mad_science"),category:"science",era:"discovery",reqs:{science:2,smelting:2},grant:["high_tech",1],cost:{Money:()=>1e4,Mana:()=>"magic"===t.race.universe?50:0,Knowledge:()=>6750,Crystal:()=>"magic"===t.race.universe?1e3:0,Aluminium:()=>750},effect:()=>"magic"===t.race.universe?z("tech_sages_effect"):z("tech_mad_science_effect"),action(){return!!Cs($(this)[0])&&(t.race.terrifying&&(t.civic.taxes.display=!0),t.city.wardenclyffe={count:0,on:0},!0)}},electricity:{id:"tech-electricity",title:z("tech_electricity"),desc:z("tech_electricity"),category:"power_generation",era:"discovery",reqs:{high_tech:1},grant:["high_tech",2],cost:{Knowledge:()=>13500,Copper:()=>1e3},effect:z("tech_electricity_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_electricity_msg"),"info",!1,["progress"]),t.city.power=0,t.city.powered=!0,t.city.coal_power={count:0,on:0},t.settings.showPowerGrid=!0,ai(),!0)}},matter_replicator:{id:"tech-matter_replicator",title:()=>"antimatter"!==t.race.universe||t.race.amexplode?z("tech_replicator"):z("tech_antireplicator"),desc:()=>"antimatter"!==t.race.universe||t.race.amexplode?z("tech_replicator"):z("tech_antireplicator"),category:"special",era:"discovery",reqs:{high_tech:2},condition:()=>!!(t.stats.achieve.adam_eve&&t.stats.achieve.adam_eve.l>=5),not_trait:["lone_survivor"],grant:["replicator",1],cost:{Knowledge:()=>25e3},effect:()=>"antimatter"!==t.race.universe||t.race.amexplode?z("tech_replicator_effect_alt"):z("tech_antireplicator_effect_alt"),action(){if(Cs($(this)[0])){if("antimatter"===t.race.universe&&t.race.amexplode){to("annihilation"),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),$("body").addClass("nuke");let a=$('
          ');$("body").append(a),setTimeout((function(){a.addClass("burn")}),500),setTimeout((function(){a.addClass("b")}),600),setTimeout((function(){window.soft_reset()}),4e3)}else t.race.replicator={res:"Stone",pow:1};return!0}return!1},post(){L()}},industrialization:{id:"tech-industrialization",title:z("tech_industrialization"),desc:z("tech_industrialization"),category:"progress",era:"industrialized",reqs:{high_tech:2,cement:2,steel_container:1},grant:["high_tech",3],cost:{Knowledge:()=>25200},effect:z("tech_industrialization_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Titanium.display=!0,t.city.factory={count:0,on:0,Lux:0,Furs:0,Alloy:0,Polymer:0,Nano:0,Stanene:0},!0)},post(){Ai()}},electronics:{id:"tech-electronics",title:z("tech_electronics"),desc:z("tech_electronics"),category:"progress",era:"industrialized",reqs:{high_tech:3,titanium:1},grant:["high_tech",4],cost:{Knowledge:()=>5e4},effect:z("tech_electronics_effect"),action(){return!!Cs($(this)[0])&&(t.race.terrifying&&(t.tech.gambling=1,t.city.casino={count:0,on:0},t.space.spc_casino={count:0,on:0}),!0)}},fission:{id:"tech-fission",title:z("tech_fission"),desc:z("tech_fission"),category:"progress",era:"globalized",reqs:{high_tech:4,uranium:1},grant:["high_tech",5],cost:{Knowledge:()=>77400,Uranium:()=>10},effect:z("tech_fission_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_fission_msg"),"info",!1,["progress"]),t.city.fission_power={count:0,on:0},!0)}},arpa:{id:"tech-arpa",title:z("tech_arpa"),desc:z("tech_arpa_desc"),category:"arpa",era:"globalized",reqs:{high_tech:5},grant:["high_tech",6],cost:{Knowledge:()=>9e4},effect:z("tech_arpa_effect"),action(){return!!Cs($(this)[0])&&(t.settings.showGenetics=!0,t.settings.arpa.physics=!0,t.race.truepath&&!t.tech.unify&&(t.tech.unify=1),!0)},post(){Ce("Physics")}},rocketry:{id:"tech-rocketry",title:z("tech_rocketry"),desc:z("tech_rocketry"),category:"arpa",era:"globalized",reqs:{high_tech:6},grant:["high_tech",7],cost:{Knowledge:()=>112500,Oil:()=>t.city.ptrait.includes("dense")?8e3:6800},effect:z("tech_rocketry_effect"),action(){return!!Cs($(this)[0])&&(t.race.truepath&&!t.tech.rival&&(t.tech.rival=1,Bi(z("civics_rival_unlocked",[te(3)]),"info",!1,["progress","combat"])),!0)},post(){Ce("Physics")}},robotics:{id:"tech-robotics",title:z("tech_robotics"),desc:z("tech_robotics"),category:"progress",era:"globalized",reqs:{high_tech:7},grant:["high_tech",8],cost:{Knowledge:()=>125e3},effect:z("tech_robotics_effect"),action(){return!!Cs($(this)[0])}},lasers:{id:"tech-lasers",title:z("tech_lasers"),desc:z("tech_lasers_desc"),category:"progress",era:"deep_space",reqs:{high_tech:8,space:3,supercollider:1,elerium:1},grant:["high_tech",9],cost:{Knowledge:()=>28e4,Elerium:()=>100},effect:z("tech_lasers_effect"),action(){return!!Cs($(this)[0])&&(t.race.cataclysm&&eo("iron_will",!1,3),!0)}},artifical_intelligence:{id:"tech-artifical_intelligence",title:z("tech_artificial_intelligence"),desc:z("tech_artificial_intelligence"),category:"progress",era:"deep_space",reqs:{high_tech:9},grant:["high_tech",10],cost:{Knowledge:()=>325e3},effect:z("tech_artificial_intelligence_effect"),action(){return!!Cs($(this)[0])},flair:()=>z("tech_artificial_intelligence_flair")},quantum_computing:{id:"tech-quantum_computing",title:z("tech_quantum_computing"),desc:z("tech_quantum_computing"),category:"progress",era:"deep_space",reqs:{high_tech:10,nano:1},grant:["high_tech",11],cost:{Knowledge:()=>435e3,Elerium:()=>250,Nano_Tube:()=>1e5},effect:z("tech_quantum_computing_effect"),action(){return!!Cs($(this)[0])},flair:()=>z("tech_quantum_computing_flair")},virtual_reality:{id:"tech-virtual_reality",title:z("tech_virtual_reality"),desc:z("tech_virtual_reality"),category:"progress",era:"interstellar",reqs:{high_tech:11,alpha:2,infernite:1,stanene:1},grant:["high_tech",12],cost:{Knowledge:()=>6e5,Stanene:()=>1250,Soul_Gem:()=>1},effect:z("tech_virtual_reality_effect"),action(){return!!Cs($(this)[0])},flair:()=>z("tech_virtual_reality_flair")},plasma:{id:"tech-plasma",title:z("tech_plasma"),desc:z("tech_plasma"),category:"progress",era:"interstellar",path:["standard","truepath"],reqs:{high_tech:12},grant:["high_tech",13],cost:{Knowledge:()=>755e3,Infernite:()=>t.race.truepath?0:1e3,Stanene:()=>t.race.truepath?1e6:25e4},effect:z("tech_plasma_effect"),action(){return!!Cs($(this)[0])}},shields:{id:"tech-shields",title:z("tech_shields"),desc:z("tech_shields"),category:"stellar_engine",era:"interstellar",reqs:{high_tech:13},grant:["high_tech",14],cost:{Knowledge:()=>85e4},effect:z("tech_shields_effect"),action(){return!!Cs($(this)[0])&&(t.settings.space.neutron=!0,t.settings.space.blackhole=!0,!0)}},ai_core:{id:"tech-ai_core",title:z("tech_ai_core"),desc:z("tech_ai_core"),category:"ai_core",era:"interstellar",reqs:{high_tech:14,science:15,blackhole:3},grant:["high_tech",15],cost:{Knowledge:()=>15e5},effect:z("tech_ai_core_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.citadel={count:0,on:0},!0)}},metaphysics:{id:"tech-metaphysics",title:z("tech_metaphysics"),desc:z("tech_metaphysics"),category:"progress",era:"intergalactic",reqs:{high_tech:15,xeno:5},grant:["high_tech",16],cost:{Knowledge:()=>5e6,Vitreloy:()=>1e4,Soul_Gem:()=>10},effect:()=>z("tech_metaphysics_effect"),action(){return!!Cs($(this)[0])}},orichalcum_analysis:{id:"tech-orichalcum_analysis",title:z("tech_orichalcum_analysis"),desc:z("tech_orichalcum_analysis"),category:"progress",era:"intergalactic",reqs:{high_tech:16,chthonian:3},grant:["high_tech",17],cost:{Knowledge:()=>122e5,Orichalcum:()=>1e5},effect:()=>z("tech_orichalcum_analysis_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_orichalcum_analysis_result"),"info",!1,["progress"]),!0)}},cybernetics:{id:"tech-cybernetics",title:z("tech_cybernetics"),desc:z("tech_cybernetics"),category:"progress",era:"dimensional",reqs:{high_tech:17,hell_ruins:4},grant:["high_tech",18],cost:{Knowledge:()=>25e6,Adamantite:()=>125e5,Stanene:()=>5e7,Vitreloy:()=>1e7},effect:()=>z("tech_cybernetics_effect"),action(){return!!Cs($(this)[0])}},blood_pact:{id:"tech-blood_pact",title:z("tech_blood_pact"),desc:z("tech_blood_pact"),category:"hell_dimension",era:"dimensional",reqs:{high_tech:18,b_stone:1},grant:["b_stone",2],cost:{Knowledge:()=>52e6,Blood_Stone:()=>1},effect:()=>z("tech_blood_pact_effect"),action(){return!!Cs($(this)[0])&&(t.settings.arpa.blood=!0,Ce("Crispr"),!0)},post(){Ce("Blood")}},purify:{id:"tech-purify",title:z("tech_purify"),desc:z("tech_purify"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:3,b_stone:2},grant:["b_stone",3],cost:{Knowledge:()=>525e5,Blood_Stone:()=>1},effect:()=>z("tech_purify_effect"),action(){return!!Cs($(this)[0])}},waygate:{id:"tech-waygate",title:z("tech_waygate"),desc:z("tech_waygate"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:10,b_stone:2},grant:["waygate",1],cost:{Knowledge:()=>55e6},effect:()=>z("tech_waygate_effect"),action(){return!!Cs($(this)[0])&&(t.portal.waygate={count:0,progress:0,on:0},!0)}},demonic_infusion:{id:"tech-demonic_infusion",title:z("tech_demonic_infusion"),desc:z("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:()=>vc(1e3),Knowledge:()=>55e6,Demonic_Essence:()=>1},effect:()=>`
          ${z("tech_demonic_infusion_effect")}
          ${z("tech_demonic_infusion_effect2",[gc("descend").artifact])}
          `,action(){return t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),Cs($(this)[0])&&Q(),!1}},gate_key:{id:"tech-gate_key",title:z("tech_gate_key"),desc:z("tech_gate_key"),category:"hell_dimension",era:"dimensional",reqs:{hell_gate:1},grant:["hell_gate",2],cost:{Knowledge:()=>3e7},effect:()=>z("tech_gate_key_effect"),action(){return!!Cs($(this)[0])&&(t.portal.west_tower={count:0,on:0},t.portal.east_tower={count:0,on:0},!0)}},gate_turret:{id:"tech-gate_turret",title:z("tech_gate_turret"),desc:z("tech_gate_turret"),category:"hell_dimension",era:"dimensional",reqs:{hell_gate:2},grant:["hell_gate",3],cost:{Knowledge:()=>32e6},effect:()=>z("tech_gate_turret_effect"),action(){return!!Cs($(this)[0])&&(t.portal.gate_turret={count:0,on:0},!0)}},infernite_mine:{id:"tech-infernite_mine",title:z("tech_infernite_mine"),desc:z("tech_infernite_mine"),category:"hell_dimension",era:"dimensional",reqs:{hell_gate:3},grant:["hell_gate",4],cost:{Knowledge:()=>325e5},effect:()=>z("tech_infernite_mine_effect"),action(){return!!Cs($(this)[0])&&(t.portal.infernite_mine={count:0,on:0},!0)}},study_corrupt_gem:{id:"tech-study_corrupt_gem",title:z("tech_study_corrupt_gem"),desc:z("tech_study_corrupt_gem"),category:"hell_dimension",era:"intergalactic",reqs:{high_tech:16,corrupt:1},grant:["corrupt",2],trait:["witch_hunter"],cost:{Mana:()=>t.race.no_plasmid?1e4:3e4,Knowledge:()=>185e5,Corrupt_Gem:()=>1},effect:()=>z("tech_study_corrupt_gem_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_study_corrupt_gem_result"),"info",!1,["progress","hell"]),t.resource.Corrupt_Gem.display=!1,!0)}},soul_binding:{id:"tech-soul_binding",title:z("tech_soul_binding"),desc:z("tech_soul_binding"),category:"hell_dimension",era:"intergalactic",reqs:{corrupt:2,science:19},grant:["forbidden",1],trait:["witch_hunter"],cost:{Knowledge:()=>19e6},effect:()=>z("tech_soul_binding_effect"),action(){return!!Cs($(this)[0])}},soul_capacitor:{id:"tech-soul_capacitor",title:z("tech_soul_capacitor"),desc:z("tech_soul_capacitor"),category:"hell_dimension",era:"intergalactic",reqs:{forbidden:1},grant:["forbidden",2],trait:["witch_hunter"],cost:{Knowledge:()=>195e5},effect:()=>z("tech_soul_capacitor_effect"),action(){return!!Cs($(this)[0])&&(t.portal.soul_capacitor={count:0,on:0,energy:0,ecap:0},!0)}},soul_capacitor:{id:"tech-soul_capacitor",title:z("tech_soul_capacitor"),desc:z("tech_soul_capacitor"),category:"hell_dimension",era:"intergalactic",reqs:{forbidden:1},grant:["forbidden",2],trait:["witch_hunter"],cost:{Knowledge:()=>195e5},effect:()=>z("tech_soul_capacitor_effect"),action(){return!!Cs($(this)[0])&&(t.portal.soul_capacitor={count:0,on:0,energy:0,ecap:0},!0)}},absorption_chamber:{id:"tech-absorption_chamber",title:z("tech_absorption_chamber"),desc:z("tech_absorption_chamber"),category:"hell_dimension",era:"intergalactic",reqs:{forbidden:2},grant:["forbidden",3],trait:["witch_hunter"],cost:{Knowledge:()=>2e7},effect:()=>z("tech_absorption_chamber_effect"),action(){return!!Cs($(this)[0])&&(t.portal.absorption_chamber={count:0},!0)}},corrupt_gem_analysis:{id:"tech-corrupt_gem_analysis",title:z("tech_corrupt_gem_analysis"),desc:z("tech_corrupt_gem_analysis"),category:"hell_dimension",era:"dimensional",reqs:{high_tech:16,corrupt:1},grant:["corrupt",2],not_trait:["witch_hunter"],cost:{Species:()=>1,Knowledge:()=>22e6,Corrupt_Gem:()=>1},effect:()=>z("tech_corrupt_gem_analysis_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_corrupt_gem_analysis_result"),"info",!1,["progress","hell"]),t.resource.Corrupt_Gem.display=!1,!0)}},hell_search:{id:"tech-hell_search",title:z("tech_hell_search"),desc:z("tech_hell_search"),category:"hell_dimension",era:"dimensional",reqs:{corrupt:2},grant:["hell_ruins",1],cost:{Knowledge:()=>221e5,Structs:()=>({portal:{sensor_drone:{s:"prtl_badlands",count:25,on:25}}})},effect:()=>z("tech_hell_search_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_hell_search_result"),"info",!1,["progress","hell"]),t.settings.portal.ruins=!0,t.settings.portal.gate=!0,t.portal.guard_post={count:0,on:0,support:0,s_max:0},!0)}},codex_infernium:{id:"tech-codex_infernium",title:z("tech_codex_infernium"),desc:z("tech_codex_infernium"),category:"progress",era:"dimensional",reqs:{hell_ruins:3},grant:["hell_ruins",4],cost:{Knowledge:()=>235e5,Codex:()=>1},effect:()=>z("tech_codex_infernium_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Codex.display=!1,!0)}},lake_analysis:{id:"tech-lake_analysis",title:z("tech_lake_analysis"),desc:z("tech_lake_analysis"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:2},grant:["hell_lake",3],cost:{Knowledge:()=>34e6},effect:()=>z("tech_lake_analysis_effect"),action(){return!!Cs($(this)[0])}},lake_threat:{id:"tech-lake_threat",title:z("tech_lake_threat"),desc:z("tech_lake_threat"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:3},grant:["hell_lake",4],cost:{Knowledge:()=>345e5},effect:()=>z("tech_lake_threat_effect"),action(){return!!Cs($(this)[0])&&(t.portal.bireme={count:0,on:0,crew:0,mil:0},Bi(z("tech_lake_threat_result"),"info",!1,["progress","hell"]),!0)}},lake_transport:{id:"tech-lake_transport",title:z("tech_lake_transport"),desc:z("tech_lake_transport"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:4},grant:["hell_lake",5],cost:{Knowledge:()=>35e6},effect:()=>z("tech_lake_transport_effect"),action(){return!!Cs($(this)[0])&&(t.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)}},cooling_tower:{id:"tech-cooling_tower",title:z("tech_cooling_tower"),desc:z("tech_cooling_tower"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:5},grant:["hell_lake",6],cost:{Knowledge:()=>375e5},effect:()=>z("tech_cooling_tower_effect"),action(){return!!Cs($(this)[0])&&(t.portal.cooling_tower={count:0,on:0},!0)}},miasma:{id:"tech-miasma",title:z("tech_miasma"),desc:z("tech_miasma"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:2},grant:["hell_spire",3],cost:{Knowledge:()=>3825e4},effect:()=>z("tech_miasma_effect"),action(){return!!Cs($(this)[0])&&(t.portal.port={count:0},!0)}},incorporeal:{id:"tech-incorporeal",title:z("tech_incorporeal"),desc:z("tech_incorporeal"),category:"special",era:"intergalactic",reqs:{science:19},grant:["ascension",1],not_trait:["orbit_decay","witch_hunter"],cost:{Knowledge:()=>175e5,Phage:()=>25},effect:()=>z("tech_incorporeal_effect"),action(){return!!Cs($(this)[0])}},tech_ascension:{id:"tech-tech_ascension",title:z("tech_ascension"),desc:z("tech_ascension"),category:"special",era:"intergalactic",reqs:{ascension:1},grant:["ascension",2],not_trait:["orbit_decay","witch_hunter"],cost:{Knowledge:()=>185e5,Plasmid:()=>100},effect:()=>z("tech_ascension_effect"),action(){return!!Cs($(this)[0])&&(t.settings.space.sirius=!0,!0)}},terraforming:{id:"tech-terraforming",title:z("tech_terraforming"),desc:z("tech_terraforming"),category:"special",era:"intergalactic",reqs:{science:19},path:["standard"],grant:["terraforming",1],trait:["orbit_decay"],cost:{Knowledge:()=>18e6},effect:()=>z("tech_terraforming_effect",[ea().red]),action(){return!!Cs($(this)[0])&&(t.space.terraformer={count:0},!0)}},cement_processing:{id:"tech-cement_processing",title:z("tech_cement_processing"),desc:z("tech_cement_processing"),category:"ai_core",era:"interstellar",reqs:{high_tech:15},not_trait:["flier"],grant:["ai_core",1],cost:{Knowledge:()=>175e4},effect:z("tech_cement_processing_effect"),action(){return!!Cs($(this)[0])}},adamantite_processing_flier:{id:"tech-adamantite_processing_flier",title:z("tech_adamantite_processing"),desc:z("tech_adamantite_processing"),category:"ai_core",era:"interstellar",reqs:{high_tech:15},trait:["flier"],grant:["ai_core",2],cost:{Knowledge:()=>2e6},effect:z("tech_adamantite_processing_effect"),action(){return!!Cs($(this)[0])}},adamantite_processing:{id:"tech-adamantite_processing",title:z("tech_adamantite_processing"),desc:z("tech_adamantite_processing"),category:"ai_core",era:"interstellar",reqs:{ai_core:1},not_trait:["flier"],grant:["ai_core",2],cost:{Knowledge:()=>2e6},effect:z("tech_adamantite_processing_effect"),action(){return!!Cs($(this)[0])}},graphene_processing:{id:"tech-graphene_processing",title:z("tech_graphene_processing"),desc:z("tech_graphene_processing"),category:"ai_core",era:"intergalactic",reqs:{ai_core:2},grant:["ai_core",3],cost:{Knowledge:()=>25e5},effect:z("tech_graphene_processing_effect"),action(){return!!Cs($(this)[0])}},fusion_power:{id:"tech-fusion_power",title:z("tech_fusion_power"),desc:z("tech_fusion_power"),category:"power_generation",era:"interstellar",reqs:{ram_scoop:1},grant:["fusion",1],cost:{Knowledge:()=>64e4},effect:z("tech_fusion_power_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.fusion={count:0,on:0},!0)}},infernium_power:{id:"tech-infernium_power",title:z("tech_infernium_power"),desc:z("tech_infernium_power"),category:"power_generation",era:"dimensional",reqs:{smelting:8,hell_ruins:4},grant:["inferno_power",1],cost:{Knowledge:()=>3e7},effect:z("tech_infernium_power_effect"),action(){return!!Cs($(this)[0])&&(t.portal.inferno_power={count:0,on:0},!0)}},thermomechanics:{id:"tech-thermomechanics",title:z("tech_thermomechanics"),desc:z("tech_thermomechanics_desc"),category:"crafting",era:"industrialized",reqs:{high_tech:4},grant:["alloy",1],cost:{Knowledge:()=>6e4},effect:()=>z("tech_thermomechanics_effect"),action(){return!!Cs($(this)[0])}},quantum_manufacturing:{id:"tech-quantum_manufacturing",title:z("tech_quantum_manufacturing"),desc:z("tech_quantum_manufacturing"),category:"crafting",era:"deep_space",reqs:{high_tech:11},grant:["q_factory",1],cost:{Knowledge:()=>465e3},effect:z("tech_quantum_manufacturing_effect"),action(){return!!Cs($(this)[0])}},worker_drone:{id:"tech-worker_drone",title:z("tech_worker_drone"),desc:z("tech_worker_drone"),category:"mining",era:"deep_space",reqs:{nano:1},grant:["drone",1],cost:{Knowledge:()=>4e5},effect:()=>z("tech_worker_drone_effect",[ea().gas_moon]),action(){return!!Cs($(this)[0])&&(t.space.drone={count:0},!0)}},uranium:{id:"tech-uranium",title:z("tech_uranium"),desc:z("tech_uranium"),category:"power_generation",era:"globalized",reqs:{high_tech:4},grant:["uranium",1],cost:{Knowledge:()=>72e3},effect:z("tech_uranium_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Uranium.display=!0,!0)},post(){Ai()}},uranium_storage:{id:"tech-uranium_storage",title:z("tech_uranium_storage"),desc:z("tech_uranium_storage"),category:"storage",era:"globalized",reqs:{uranium:1},grant:["uranium",2],cost:{Knowledge:()=>75600,Alloy:()=>2500},effect:z("tech_uranium_storage_effect"),action(){return!!Cs($(this)[0])}},uranium_ash:{id:"tech-uranium_ash",title:z("tech_uranium_ash"),desc:z("tech_uranium_ash"),category:"power_generation",era:"globalized",reqs:{uranium:2},grant:["uranium",3],cost:{Knowledge:()=>122e3},effect:z("tech_uranium_ash_effect"),action(){return!!Cs($(this)[0])}},breeder_reactor:{id:"tech-breeder_reactor",title:z("tech_breeder_reactor"),desc:z("tech_breeder_reactor"),category:"power_generation",era:"early_space",reqs:{high_tech:5,uranium:3,space:3},grant:["uranium",4],cost:{Knowledge:()=>16e4,Uranium:()=>250,Iridium:()=>1e3},effect:z("tech_breeder_reactor_effect"),action(){return!!Cs($(this)[0])}},mine_conveyor:{id:"tech-mine_conveyor",title:z("tech_mine_conveyor"),desc:z("tech_mine_conveyor"),category:"mining",era:"discovery",reqs:{high_tech:2},grant:["mine_conveyor",1],cost:{Knowledge:()=>16200,Copper:()=>2250,Steel:()=>1750},effect:z("tech_mine_conveyor_effect"),action(){return!!Cs($(this)[0])}},oil_well:{id:"tech-oil_well",title:z("tech_oil_well"),desc:z("tech_oil_well"),category:"power_generation",era:"industrialized",reqs:{high_tech:3},grant:["oil",1],cost:{Knowledge:()=>27e3},effect:z("tech_oil_well_effect"),action(){return!!Cs($(this)[0])&&(t.city.oil_well={count:0},!0)}},oil_depot:{id:"tech-oil_depot",title:z("tech_oil_depot"),desc:z("tech_oil_depot"),category:"storage",era:"industrialized",reqs:{oil:1},grant:["oil",2],cost:{Knowledge:()=>32e3},effect:z("tech_oil_depot_effect"),action(){return!!Cs($(this)[0])&&(t.city.oil_depot={count:0},!0)}},oil_power:{id:"tech-oil_power",title:()=>t.race.environmentalist?z("city_wind_power"):z("tech_oil_power"),desc:()=>t.race.environmentalist?z("city_wind_power"):z("tech_oil_power"),category:"power_generation",era:"industrialized",reqs:{oil:2},grant:["oil",3],cost:{Knowledge:()=>44e3},effect:()=>t.race.environmentalist?z("tech_wind_power_effect"):z("tech_oil_power_effect"),action(){return!!Cs($(this)[0])&&(t.city.oil_power={count:0,on:0},!0)}},titanium_drills:{id:"tech-titanium_drills",title:z("tech_titanium_drills"),desc:z("tech_titanium_drills"),category:"power_generation",era:"industrialized",reqs:{oil:3},grant:["oil",4],cost:{Knowledge:()=>54e3,Titanium:()=>3500},effect:z("tech_titanium_drills_effect"),action(){return!!Cs($(this)[0])}},alloy_drills:{id:"tech-alloy_drills",title:z("tech_alloy_drills"),desc:z("tech_alloy_drills"),category:"power_generation",era:"globalized",reqs:{oil:4},grant:["oil",5],cost:{Knowledge:()=>77e3,Alloy:()=>1e3},effect:z("tech_alloy_drills_effect"),action(){return!!Cs($(this)[0])}},fracking:{id:"tech-fracking",title:z("tech_fracking"),desc:z("tech_fracking"),category:"power_generation",era:"globalized",reqs:{oil:5,high_tech:6},grant:["oil",6],cost:{Knowledge:()=>132e3},effect:z("tech_fracking_effect"),action(){return!!Cs($(this)[0])}},mythril_drills:{id:"tech-mythril_drills",title:z("tech_mythril_drills"),desc:z("tech_mythril_drills"),category:"power_generation",era:"early_space",reqs:{oil:6,space:3},grant:["oil",7],cost:{Knowledge:()=>165e3,Mythril:()=>100},effect:z("tech_mythril_drills_effect"),action(){return!!Cs($(this)[0])}},mass_driver:{id:"tech-mass_driver",title:z("tech_mass_driver"),desc:z("tech_mass_driver"),category:"power_generation",era:"early_space",reqs:{oil:6,space:3},grant:["mass",1],cost:{Knowledge:()=>16e4},effect:z("tech_mass_driver_effect"),action(){return!!Cs($(this)[0])&&(t.city.mass_driver={count:0,on:0},!0)}},orichalcum_driver:{id:"tech-orichalcum_driver",title:z("tech_orichalcum_driver"),desc:z("tech_orichalcum_driver"),category:"science",era:"intergalactic",reqs:{mass:1,science:19},grant:["mass",2],not_trait:["orbit_decayed"],cost:{Knowledge:()=>14e6,Orichalcum:()=>4e5},effect:()=>z("tech_orichalcum_driver_effect"),action(){return!!Cs($(this)[0])&&(t.space.terraformer={count:0},!0)}},polymer:{id:"tech-polymer",title:z("tech_polymer"),desc:z("tech_polymer"),category:"crafting",era:"globalized",reqs:{genetics:1},grant:["polymer",1],cost:{Knowledge:()=>8e4,Oil:()=>5e3,Alloy:()=>450},effect:z("tech_polymer_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Polymer.display=!0,Bi(z("tech_polymer_avail"),"info",!1,["progress"]),!0)},post(){Qs(),Ai()}},fluidized_bed_reactor:{id:"tech-fluidized_bed_reactor",title:z("tech_fluidized_bed_reactor"),desc:z("tech_fluidized_bed_reactor"),category:"crafting",era:"globalized",reqs:{polymer:1,high_tech:6},grant:["polymer",2],cost:{Knowledge:()=>99e3},effect:z("tech_fluidized_bed_reactor_effect"),action(){return!!Cs($(this)[0])}},synthetic_fur:{id:"tech-synthetic_fur",title:()=>t.race.evil?z("tech_faux_leather"):z("tech_synthetic_fur"),desc:()=>t.race.evil?z("tech_faux_leather"):z("tech_synthetic_fur"),category:"crafting",era:"globalized",reqs:{polymer:1},grant:["synthetic_fur",1],cost:{Knowledge:()=>1e5,Polymer:()=>2500},effect:()=>t.race.evil?z("tech_faux_leather_effect"):z("tech_synthetic_fur_effect"),action(){return!!Cs($(this)[0])},post(){Qs()}},nanoweave:{id:"tech-nanoweave",title:z("tech_nanoweave"),desc:z("tech_nanoweave"),category:"crafting",era:"intergalactic",reqs:{science:18},grant:["nanoweave",1],cost:{Knowledge:()=>85e5,Nano_Tube:()=>5e6,Vitreloy:()=>25e4},effect:z("tech_nanoweave_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Nanoweave.display=!0,Bi(z("tech_nanoweave_avail"),"info",!1,["progress"]),ma(),!0)},post(){Ai()}},stanene:{id:"tech-stanene",title:z("tech_stanene"),desc:z("tech_stanene"),category:"crafting",era:"interstellar",reqs:{infernite:1},grant:["stanene",1],cost:{Knowledge:()=>59e4,Aluminium:()=>5e5,Infernite:()=>1e3},effect:z("tech_stanene_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Stanene.display=!0,Bi(z("tech_stanene_avail"),"info",!1,["progress"]),!0)},post(){Qs(),Ai()}},nano_tubes:{id:"tech-nano_tubes",title:z("tech_nano_tubes"),desc:z("tech_nano_tubes"),category:"crafting",era:"deep_space",reqs:{high_tech:10},grant:["nano",1],cost:{Knowledge:()=>375e3,Coal:()=>1e5,Neutronium:()=>1e3},effect:z("tech_nano_tubes_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Nano_Tube.display=!0,Bi(z("tech_nano_tubes_msg"),"info",!1,["progress"]),!0)},post(){Qs(),Ai()}},scarletite:{id:"tech-scarletite",title:z("tech_scarletite"),desc:z("tech_scarletite"),category:"crafting",era:"dimensional",reqs:{hell_ruins:4},grant:["scarletite",1],cost:{Knowledge:()=>2675e4,Iron:()=>1e8,Adamantite:()=>15e6,Orichalcum:()=>8e6},effect:z("tech_scarletite_effect"),action(){if(Cs($(this)[0])){if(t.resource.Scarletite.display=!0,t.portal.hell_forge={count:0,on:0},Bi(z("tech_scarletite_avail"),"info",!1,["progress"]),ma(),"micro"===t.race.universe||t.pillars[t.race.species]){let e=so();e>t.pillars[t.race.species]&&(t.pillars[t.race.species]=e),t.tech.pillars=2}else t.tech.fusable=1;return!0}return!1},post(){Ai()}},pillars:{id:"tech-pillars",title:z("tech_pillars"),desc:z("tech_pillars"),category:"hell_dimension",era:"dimensional",reqs:{scarletite:1,fusable:1},grant:["pillars",1],cost:{Knowledge:()=>3e7},effect:z("tech_pillars_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_pillars_msg",[_i[t.race.species].entity]),"info",!1,["progress","hell"]),!0)}},reclaimer:{id:"tech-reclaimer",title:z("tech_reclaimer"),desc:z("tech_reclaimer_desc"),category:"reclaimer",era:"civilized",reqs:{primitive:3},grant:["reclaimer",1],trait:["evil"],condition:()=>!(t.race.kindling_kindred||t.race.smoldering||"wendigo"!==t.race.species&&t.race.soul_eater),cost:{Knowledge:()=>45,Lumber:()=>20,Stone:()=>20},effect:z("tech_reclaimer_effect"),action(){return!!Cs($(this)[0])&&(t.civic.lumberjack.name=z("job_reclaimer"),t.civic.lumberjack.display=!0,t.city.graveyard={count:0},!0)}},shovel:{id:"tech-shovel",title:z("tech_shovel"),desc:z("tech_shovel"),category:"reclaimer",era:"civilized",reqs:{reclaimer:1,mining:2},grant:["reclaimer",2],trait:["evil"],not_trait:["living_tool"],condition:()=>!(t.race.kindling_kindred||t.race.smoldering||"wendigo"!==t.race.species&&t.race.soul_eater),cost:{Knowledge:()=>540,Copper:()=>25},effect:z("tech_shovel_effect"),action(){return!!Cs($(this)[0])}},iron_shovel:{id:"tech-iron_shovel",title:z("tech_iron_shovel"),desc:z("tech_iron_shovel"),category:"reclaimer",era:"civilized",reqs:{reclaimer:2,mining:3},grant:["reclaimer",3],trait:["evil"],not_trait:["living_tool"],condition:()=>!(t.race.kindling_kindred||t.race.smoldering||"wendigo"!==t.race.species&&t.race.soul_eater),cost:{Knowledge:()=>2700,Iron:()=>250},effect:z("tech_iron_shovel_effect"),action(){return!!Cs($(this)[0])}},steel_shovel:{id:"tech-steel_shovel",title:z("tech_steel_shovel"),desc:z("tech_steel_shovel"),category:"reclaimer",era:"discovery",reqs:{reclaimer:3,smelting:2},grant:["reclaimer",4],trait:["evil"],not_trait:["living_tool"],condition:()=>!(t.race.kindling_kindred||t.race.smoldering||"wendigo"!==t.race.species&&t.race.soul_eater),cost:{Knowledge:()=>9e3,Steel:()=>250},effect:z("tech_steel_shovel_effect"),action(){return!!Cs($(this)[0])}},titanium_shovel:{id:"tech-titanium_shovel",title:z("tech_titanium_shovel"),desc:z("tech_titanium_shovel"),category:"reclaimer",era:"industrialized",reqs:{reclaimer:4,high_tech:3},grant:["reclaimer",5],trait:["evil"],not_trait:["living_tool"],condition:()=>!(t.race.kindling_kindred||t.race.smoldering||"wendigo"!==t.race.species&&t.race.soul_eater),cost:{Knowledge:()=>38e3,Titanium:()=>350},effect:z("tech_titanium_shovel_effect"),action(){return!!Cs($(this)[0])}},alloy_shovel:{id:"tech-alloy_shovel",title:z("tech_alloy_shovel"),desc:z("tech_alloy_shovel"),category:"reclaimer",era:"globalized",reqs:{reclaimer:5,high_tech:4},grant:["reclaimer",6],trait:["evil"],not_trait:["living_tool"],condition:()=>!(t.race.kindling_kindred||t.race.smoldering||"wendigo"!==t.race.species&&t.race.soul_eater),cost:{Knowledge:()=>67500,Alloy:()=>750},effect:z("tech_alloy_shovel_effect"),action(){return!!Cs($(this)[0])}},mythril_shovel:{id:"tech-mythril_shovel",title:z("tech_mythril_shovel"),desc:z("tech_mythril_shovel"),category:"reclaimer",era:"early_space",reqs:{reclaimer:6,space:3},grant:["reclaimer",7],trait:["evil"],not_trait:["living_tool"],condition:()=>!(t.race.kindling_kindred||t.race.smoldering||"wendigo"!==t.race.species&&t.race.soul_eater),cost:{Knowledge:()=>16e4,Mythril:()=>880},effect:z("tech_mythril_shovel_effect"),action(){return!!Cs($(this)[0])}},adamantite_shovel:{id:"tech-adamantite_shovel",title:z("tech_adamantite_shovel"),desc:z("tech_adamantite_shovel"),category:"reclaimer",era:"interstellar",reqs:{reclaimer:7,alpha:2},grant:["reclaimer",8],trait:["evil"],condition:()=>!(t.race.kindling_kindred||t.race.smoldering||"wendigo"!==t.race.species&&t.race.soul_eater),cost:{Knowledge:()=>525e3,Adamantite:()=>1e4},effect:z("tech_adamantite_shovel_effect"),action(){return!!Cs($(this)[0])}},stone_axe:{id:"tech-stone_axe",title:()=>z("tech_stone_axe"),desc:()=>z("tech_stone_axe_desc"),category:"lumber_gathering",reqs:{primitive:3},era:"civilized",grant:["axe",1],not_trait:["kindling_kindred","smoldering","evil","cataclysm"],cost:{Knowledge:()=>45,Lumber:()=>20,Stone:()=>20},effect:()=>t.race.living_tool?z("tech_basic_livingtools"):t.race.sappy?z("tech_amber_axe_effect"):z("tech_stone_axe_effect"),action(){return!!Cs($(this)[0])&&(t.civic.lumberjack.display=!0,t.city.lumber_yard={count:0},!0)}},copper_axes:{id:"tech-copper_axes",title:z("tech_copper_axes"),desc:z("tech_copper_axes_desc"),category:"lumber_gathering",era:"civilized",reqs:{axe:1,mining:2},not_trait:["living_tool"],grant:["axe",2],cost:{Knowledge:()=>540,Copper:()=>25},effect:z("tech_copper_axes_effect"),action(){return!!Cs($(this)[0])}},iron_saw:{id:"tech-iron_saw",title:z("tech_iron_saw"),desc:z("tech_iron_saw_desc"),category:"lumber_gathering",era:"civilized",reqs:{axe:1,mining:3},grant:["saw",1],not_trait:["lone_survivor"],cost:{Knowledge:()=>3375,Iron:()=>400},effect:z("tech_iron_saw_effect"),action(){return!!Cs($(this)[0])&&(t.city.sawmill={count:0,on:0},!0)}},steel_saw:{id:"tech-steel_saw",title:z("tech_steel_saw"),desc:z("tech_steel_saw_desc"),category:"lumber_gathering",era:"discovery",reqs:{smelting:2,saw:1},grant:["saw",2],cost:{Knowledge:()=>10800,Steel:()=>400},effect:z("tech_steel_saw_effect"),action(){return!!Cs($(this)[0])}},iron_axes:{id:"tech-iron_axes",title:z("tech_iron_axes"),desc:z("tech_iron_axes_desc"),category:"lumber_gathering",era:"civilized",reqs:{axe:2,mining:3},not_trait:["living_tool"],grant:["axe",3],cost:{Knowledge:()=>t.city.ptrait.includes("unstable")?1350:2700,Iron:()=>250},effect:z("tech_iron_axes_effect"),action(){return!!Cs($(this)[0])}},steel_axes:{id:"tech-steel_axes",title:z("tech_steel_axes"),desc:z("tech_steel_axes_desc"),category:"lumber_gathering",era:"discovery",reqs:{axe:3,smelting:2},not_trait:["living_tool"],grant:["axe",4],cost:{Knowledge:()=>9e3,Steel:()=>250},effect:z("tech_steel_axes_effect"),action(){return!!Cs($(this)[0])}},titanium_axes:{id:"tech-titanium_axes",title:z("tech_titanium_axes"),desc:z("tech_titanium_axes_desc"),category:"lumber_gathering",era:"industrialized",reqs:{axe:4,high_tech:3},not_trait:["living_tool"],grant:["axe",5],cost:{Knowledge:()=>38e3,Titanium:()=>350},effect:z("tech_titanium_axes_effect"),action(){return!!Cs($(this)[0])}},chainsaws:{id:"tech-chainsaws",title:z("tech_chainsaws"),desc:z("tech_chainsaws_desc"),category:"lumber_gathering",era:"interstellar",reqs:{axe:5,alpha:2},not_trait:["living_tool"],grant:["axe",6],cost:{Knowledge:()=>56e4,Oil:()=>1e4,Adamantite:()=>2e3},effect:z("tech_chainsaws_effect"),action(){return!!Cs($(this)[0])},flair:()=>`
          ${z("tech_chainsaws_flair1")}
          ${z("tech_chainsaws_flair2")}
          `},copper_sledgehammer:{id:"tech-copper_sledgehammer",title:z("tech_copper_sledgehammer"),desc:z("tech_copper_sledgehammer_desc"),category:"stone_gathering",era:"civilized",reqs:{mining:2},not_trait:["cataclysm","sappy","living_tool"],grant:["hammer",1],cost:{Knowledge:()=>540,Copper:()=>25},effect:z("tech_copper_sledgehammer_effect"),action(){return!!Cs($(this)[0])}},iron_sledgehammer:{id:"tech-iron_sledgehammer",title:z("tech_iron_sledgehammer"),desc:z("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:()=>t.city.ptrait.includes("unstable")?1350:2700,Iron:()=>250},effect:z("tech_iron_sledgehammer_effect"),action(){return!!Cs($(this)[0])}},steel_sledgehammer:{id:"tech-steel_sledgehammer",title:z("tech_steel_sledgehammer"),desc:z("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:()=>7200,Steel:()=>250},effect:z("tech_steel_sledgehammer_effect"),action(){return!!Cs($(this)[0])}},titanium_sledgehammer:{id:"tech-titanium_sledgehammer",title:z("tech_titanium_sledgehammer"),desc:z("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:()=>4e4,Titanium:()=>400},effect:z("tech_titanium_sledgehammer_effect"),action(){return!!Cs($(this)[0])}},copper_pickaxe:{id:"tech-copper_pickaxe",title:z("tech_copper_pickaxe"),desc:z("tech_copper_pickaxe_desc"),category:"mining",era:"civilized",reqs:{mining:2},not_trait:["cataclysm","living_tool"],grant:["pickaxe",1],cost:{Knowledge:()=>675,Copper:()=>25},effect:z("tech_copper_pickaxe_effect"),action(){return!!Cs($(this)[0])}},iron_pickaxe:{id:"tech-iron_pickaxe",title:z("tech_iron_pickaxe"),desc:z("tech_iron_pickaxe_desc"),category:"mining",era:"civilized",reqs:{pickaxe:1,mining:3},not_trait:["cataclysm","living_tool"],grant:["pickaxe",2],cost:{Knowledge:()=>t.city.ptrait.includes("unstable")?1600:3200,Iron:()=>250},effect:z("tech_iron_pickaxe_effect"),action(){return!!Cs($(this)[0])}},steel_pickaxe:{id:"tech-steel_pickaxe",title:z("tech_steel_pickaxe"),desc:z("tech_steel_pickaxe_desc"),category:"mining",era:"discovery",reqs:{pickaxe:2,smelting:2},not_trait:["living_tool"],grant:["pickaxe",3],cost:{Knowledge:()=>9e3,Steel:()=>250},effect:z("tech_steel_pickaxe_effect"),action(){return!!Cs($(this)[0])}},jackhammer:{id:"tech-jackhammer",title:z("tech_jackhammer"),desc:z("tech_jackhammer_desc"),category:"mining",era:"discovery",reqs:{pickaxe:3,high_tech:2},not_trait:["living_tool"],grant:["pickaxe",4],cost:{Knowledge:()=>22500,Copper:()=>5e3},effect:z("tech_jackhammer_effect"),action(){return!!Cs($(this)[0])}},jackhammer_mk2:{id:"tech-jackhammer_mk2",title:z("tech_jackhammer_mk2"),desc:z("tech_jackhammer_mk2"),category:"mining",era:"globalized",reqs:{pickaxe:4,high_tech:4},not_trait:["living_tool"],grant:["pickaxe",5],cost:{Knowledge:()=>67500,Titanium:()=>2e3,Alloy:()=>500},effect:z("tech_jackhammer_mk2_effect"),action(){return!!Cs($(this)[0])}},adamantite_hammer:{id:"tech-adamantite_hammer",title:z("tech_adamantite_hammer"),desc:z("tech_adamantite_hammer"),category:"mining",era:"interstellar",reqs:{pickaxe:5,alpha:2},not_trait:["living_tool"],grant:["pickaxe",6],cost:{Knowledge:()=>535e3,Adamantite:()=>12500},effect:z("tech_adamantite_hammer_effect"),action(){return!!Cs($(this)[0])}},copper_hoe:{id:"tech-copper_hoe",title:z("tech_copper_hoe"),desc:z("tech_copper_hoe_desc"),category:"agriculture",era:"civilized",reqs:{mining:2,agriculture:1},not_trait:["cataclysm","living_tool"],grant:["hoe",1],cost:{Knowledge:()=>720,Copper:()=>50},effect:z("tech_copper_hoe_effect"),action(){return!!Cs($(this)[0])}},iron_hoe:{id:"tech-iron_hoe",title:z("tech_iron_hoe"),desc:z("tech_iron_hoe_desc"),category:"agriculture",era:"civilized",reqs:{hoe:1,mining:3,agriculture:1},not_trait:["living_tool"],grant:["hoe",2],cost:{Knowledge:()=>t.city.ptrait.includes("unstable")?1800:3600,Iron:()=>500},effect:z("tech_iron_hoe_effect"),action(){return!!Cs($(this)[0])}},steel_hoe:{id:"tech-steel_hoe",title:z("tech_steel_hoe"),desc:z("tech_steel_hoe_desc"),category:"agriculture",era:"discovery",reqs:{hoe:2,smelting:2,agriculture:1},not_trait:["living_tool"],grant:["hoe",3],cost:{Knowledge:()=>12600,Steel:()=>500},effect:z("tech_steel_hoe_effect"),action(){return!!Cs($(this)[0])}},titanium_hoe:{id:"tech-titanium_hoe",title:z("tech_titanium_hoe"),desc:z("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:()=>44e3,Titanium:()=>500},effect:z("tech_titanium_hoe_effect"),action(){return!!Cs($(this)[0])}},adamantite_hoe:{id:"tech-adamantite_hoe",title:z("tech_adamantite_hoe"),desc:z("tech_adamantite_hoe_desc"),category:"agriculture",era:"interstellar",reqs:{hoe:4,alpha:2},not_trait:["living_tool"],grant:["hoe",5],cost:{Knowledge:()=>53e4,Adamantite:()=>1e3},effect:z("tech_adamantite_hoe_effect"),action(){return!!Cs($(this)[0])}},cyber_limbs:{id:"tech-cyber_limbs",title:z("tech_cyber_limbs"),desc:z("tech_cyber_limbs"),category:"mining",era:"dimensional",reqs:{high_tech:18},grant:["cyber_worker",1],cost:{Knowledge:()=>27e6},effect:z("tech_cyber_limbs_effect"),action(){return!!Cs($(this)[0])}},slave_pens:{id:"tech-slave_pens",title:z("tech_slave_pens"),desc:z("tech_slave_pens"),category:"slaves",era:"civilized",reqs:{military:1,mining:1},not_trait:["cataclysm","lone_survivor"],grant:["slaves",1],trait:["slaver"],cost:{Knowledge:()=>150},effect:z("tech_slave_pens_effect"),action(){return!!Cs($(this)[0])&&(t.city.slave_pen={count:0,slaves:0},!0)}},slave_market:{id:"tech-slave_market",title:z("tech_slave_market"),desc:z("tech_slave_market"),category:"slaves",era:"discovery",reqs:{slaves:1,high_tech:1},grant:["slaves",2],trait:["slaver"],cost:{Knowledge:()=>8e3},effect:z("tech_slave_market_effect"),action(){return!!Cs($(this)[0])}},ceremonial_dagger:{id:"tech-ceremonial_dagger",title:z("tech_ceremonial_dagger"),desc:z("tech_ceremonial_dagger"),category:"sacrifice",era:"civilized",reqs:{mining:1},grant:["sacrifice",1],trait:["cannibalize"],not_trait:["cataclysm","lone_survivor"],cost:{Knowledge:()=>60},effect:z("tech_ceremonial_dagger_effect"),action(){return!!Cs($(this)[0])}},last_rites:{id:"tech-last_rites",title:z("tech_last_rites"),desc:z("tech_last_rites"),category:"sacrifice",era:"civilized",reqs:{sacrifice:1,theology:2},grant:["sacrifice",2],trait:["cannibalize"],cost:{Knowledge:()=>1e3},effect:z("tech_last_rites_effect"),action(){return!!Cs($(this)[0])}},ancient_infusion:{id:"tech-ancient_infusion",title:z("tech_ancient_infusion"),desc:z("tech_ancient_infusion"),category:"sacrifice",era:"early_space",reqs:{sacrifice:2,theology:4},grant:["sacrifice",3],trait:["cannibalize"],cost:{Knowledge:()=>182e3},effect:z("tech_ancient_infusion_effect"),action(){return!!Cs($(this)[0])}},garrison:{id:"tech-garrison",title:z("tech_garrison"),desc:z("tech_garrison_desc"),category:"military",era:"civilized",reqs:{science:1,housing:1},grant:["military",1],cost:{Knowledge:()=>70},effect:z("tech_garrison_effect"),action(){return!!Cs($(this)[0])&&(t.city.garrison={count:0,on:0},!0)}},mercs:{id:"tech-mercs",title:z("tech_mercs"),desc:z("tech_mercs_desc"),category:"military",era:"civilized",reqs:{military:1},grant:["mercs",1],not_trait:["lone_survivor"],cost:{Money:()=>1e4,Knowledge:()=>4500},effect:z("tech_mercs_effect"),action(){return!!Cs($(this)[0])&&(t.civic.garrison.mercs=!0,!0)}},signing_bonus:{id:"tech-signing_bonus",title:z("tech_signing_bonus"),desc:z("tech_signing_bonus_desc"),category:"military",era:"industrialized",reqs:{mercs:1,high_tech:3},grant:["mercs",2],cost:{Money:()=>5e4,Knowledge:()=>32e3},effect:z("tech_signing_bonus_effect"),action(){return!!Cs($(this)[0])}},hospital:{id:"tech-hospital",title:z("tech_hospital"),desc:z("tech_hospital"),category:"military",era:"civilized",reqs:{military:1,alumina:1},grant:["medic",1],not_trait:["artifical"],cost:{Knowledge:()=>5e3},effect:z("tech_hospital_effect"),action(){return!!Cs($(this)[0])&&(t.city.hospital={count:0},!0)}},bac_tanks:{id:"tech-bac_tanks",title:()=>t.race.artifical?z("tech_repair_subroutines"):z("tech_bac_tanks"),desc:()=>t.race.artifical?z("tech_repair_subroutines"):z("tech_bac_tanks_desc"),category:"military",era:"interstellar",reqs:{medic:1,infernite:1},grant:["medic",2],cost:{Knowledge:()=>6e5,Infernite:()=>250},effect:()=>t.race.artifical?z("tech_repair_subroutines_effect"):z("tech_bac_tanks_effect"),action(){return!!Cs($(this)[0])}},boot_camp:{id:"tech-boot_camp",title:z("tech_boot_camp"),desc:z("tech_boot_camp_desc"),category:"military",era:"discovery",reqs:{high_tech:1},grant:["boot_camp",1],cost:{Knowledge:()=>8e3},effect:z("tech_boot_camp_effect"),action(){return!!Cs($(this)[0])&&(t.city.boot_camp={count:0},!0)}},vr_training:{id:"tech-vr_training",title:z("tech_vr_training"),desc:z("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:()=>625e3},effect:()=>z("tech_vr_training_effect"),action(){return!!Cs($(this)[0])}},bows:{id:"tech-bows",title:z("tech_bows"),desc:z("tech_bows_desc"),category:"military",era:"civilized",reqs:{military:1},grant:["military",2],cost:{Knowledge:()=>225,Lumber:()=>250},effect:z("tech_bows_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update")}},flintlock_rifle:{id:"tech-flintlock_rifle",title:()=>"magic"===t.race.universe?z("tech_magic_arrow"):z("tech_flintlock_rifle"),desc:()=>"magic"===t.race.universe?z("tech_magic_arrow"):z("tech_flintlock_rifle"),category:"military",era:"civilized",reqs:{military:2,explosives:1},grant:["military",3],cost:{Knowledge:()=>5400,Coal:()=>"magic"===t.race.universe?0:750,Mana:()=>"magic"===t.race.universe?100:0},effect:()=>"magic"===t.race.universe?z("tech_magic_arrow_effect"):z("tech_flintlock_rifle_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update")}},machine_gun:{id:"tech-machine_gun",title:()=>"magic"===t.race.universe?z("tech_fire_mage"):z("tech_machine_gun"),desc:()=>"magic"===t.race.universe?z("tech_fire_mage"):z("tech_machine_gun"),category:"military",era:"industrialized",reqs:{military:3,oil:1},grant:["military",4],cost:{Mana:()=>"magic"===t.race.universe?300:0,Knowledge:()=>33750,Oil:()=>1500},effect:z("tech_machine_gun_effect"),effect:()=>"magic"===t.race.universe?z("tech_fire_mage_effect"):z("tech_machine_gun_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update")}},bunk_beds:{id:"tech-bunk_beds",title:z("tech_bunk_beds"),desc:z("tech_bunk_beds"),category:"military",era:"globalized",reqs:{military:4,high_tech:4},grant:["military",5],cost:{Knowledge:()=>76500,Furs:()=>25e3,Alloy:()=>3e3},effect:z("tech_bunk_beds_effect"),action(){return!!Cs($(this)[0])}},rail_guns:{id:"tech-rail_guns",title:()=>"magic"===t.race.universe?z("tech_lightning_caster"):z("tech_rail_guns"),desc:()=>"magic"===t.race.universe?z("tech_lightning_caster"):z("tech_rail_guns"),category:"military",era:"early_space",reqs:{military:5,mass:1},grant:["military",6],cost:{Mana:()=>"magic"===t.race.universe?450:0,Knowledge:()=>2e5,Iridium:()=>2500},effect:()=>"magic"===t.race.universe?z("tech_lightning_caster_effect"):z("tech_rail_guns_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update")}},laser_rifles:{id:"tech-laser_rifles",title:()=>"magic"===t.race.universe?z("tech_mana_rifles"):z("tech_laser_rifles"),desc:()=>"magic"===t.race.universe?z("tech_mana_rifles"):z("tech_laser_rifles"),category:"military",era:"deep_space",reqs:{military:6,high_tech:9,elerium:1},grant:["military",7],cost:{Knowledge:()=>325e3,Elerium:()=>250},effect:()=>"magic"===t.race.universe?z("tech_mana_rifles_effect"):z("tech_laser_rifles_effect"),action(){return!!Cs($(this)[0])&&("sharkin"===t.race.species&&eo("laser_shark"),!0)},post(){ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update")}},plasma_rifles:{id:"tech-plasma_rifles",title:()=>"magic"===t.race.universe?z("tech_focused_rifles"):z("tech_plasma_rifles"),desc:()=>"magic"===t.race.universe?z("tech_focused_rifles"):z("tech_plasma_rifles"),category:"military",era:"interstellar",reqs:{military:7,high_tech:13},grant:["military",8],path:["standard","truepath"],cost:{Knowledge:()=>78e4,Elerium:()=>t.race.truepath?1e3:500},effect:()=>"magic"===t.race.universe?z("tech_focused_rifles_effect"):z("tech_plasma_rifles_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update")}},disruptor_rifles:{id:"tech-disruptor_rifles",title:()=>"magic"===t.race.universe?z("tech_magic_missile"):z("tech_disruptor_rifles"),desc:()=>"magic"===t.race.universe?z("tech_magic_missile"):z("tech_disruptor_rifles"),category:"military",era:"interstellar",reqs:{military:8,high_tech:14,science:15,infernite:1},grant:["military",9],cost:{Knowledge:()=>1e6,Infernite:()=>1e3},effect:()=>"magic"===t.race.universe?z("tech_magic_missile_effect"):z("tech_disruptor_rifles_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update")}},gauss_rifles:{id:"tech-gauss_rifles",title:()=>"magic"===t.race.universe?z("tech_magicword_kill"):z("tech_gauss_rifles"),desc:()=>"magic"===t.race.universe?z("tech_magicword_kill"):z("tech_gauss_rifles"),category:"military",era:"intergalactic",reqs:{military:9,science:18},grant:["military",10],cost:{Knowledge:()=>95e5,Bolognium:()=>1e5},effect:()=>"magic"===t.race.universe?z("tech_magicword_kill_effect"):z("tech_gauss_rifles_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update")}},cyborg_soldiers:{id:"tech-cyborg_soldiers",title:z("tech_cyborg_soldiers"),desc:z("tech_cyborg_soldiers"),category:"military",era:"dimensional",reqs:{military:10,high_tech:18},grant:["military",11],cost:{Knowledge:()=>26e6,Adamantite:()=>8e6,Bolognium:()=>4e6,Orichalcum:()=>6e6},effect:z("tech_cyborg_soldiers_effect"),action(){return!!Cs($(this)[0])},post(){ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update")}},space_marines:{id:"tech-space_marines",title:z("tech_space_marines"),desc:z("tech_space_marines_desc"),category:"military",era:"early_space",reqs:{space:3,mars:2},grant:["marines",1],cost:{Knowledge:()=>21e4},effect:()=>`
          ${z("tech_space_marines_effect",[ea().red])}
          `,action(){return!!Cs($(this)[0])&&(t.space.space_barracks={count:0,on:0},!0)},flair:z("tech_space_marines_flair")},hammocks:{id:"tech-hammocks",title:z("tech_hammocks"),desc:z("tech_hammocks"),category:"military",era:"intergalactic",reqs:{marines:1,nanoweave:1},grant:["marines",2],cost:{Knowledge:()=>89e5,Nanoweave:()=>3e4},effect:()=>z("tech_hammocks_effect"),action(){return!!Cs($(this)[0])}},cruiser:{id:"tech-cruiser",title:z("tech_cruiser"),desc:z("tech_cruiser"),category:"military",era:"interstellar",reqs:{high_tech:14,proxima:2,aerogel:1},grant:["cruiser",1],cost:{Knowledge:()=>86e4},effect:z("tech_cruiser_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.cruiser={count:0,on:0},!0)}},armor:{id:"tech-armor",title:z("tech_armor"),desc:z("tech_armor_desc"),category:"military",era:"civilized",reqs:{military:1},not_trait:["apex_predator"],grant:["armor",1],cost:{Money:()=>250,Knowledge:()=>225,Furs:()=>250},effect:z("tech_armor_effect"),action(){return!!Cs($(this)[0])}},plate_armor:{id:"tech-plate_armor",title:z("tech_plate_armor"),desc:z("tech_plate_armor_desc"),category:"military",era:"civilized",reqs:{armor:1,mining:3},grant:["armor",2],cost:{Knowledge:()=>3400,Iron:()=>600},effect:z("tech_plate_armor_effect"),action(){return!!Cs($(this)[0])}},kevlar:{id:"tech-kevlar",title:z("tech_kevlar"),desc:z("tech_kevlar_desc"),category:"military",era:"globalized",reqs:{armor:2,polymer:1},grant:["armor",3],cost:{Knowledge:()=>86e3,Polymer:()=>750},effect:z("tech_kevlar_effect"),action(){return!!Cs($(this)[0])}},nanoweave_vest:{id:"tech-nanoweave_vest",title:z("tech_nanoweave_vest"),desc:z("tech_nanoweave_vest"),category:"military",era:"intergalactic",reqs:{armor:3,nanoweave:1},grant:["armor",4],cost:{Knowledge:()=>925e4,Nanoweave:()=>75e3},effect:z("tech_nanoweave_vest_effect"),action(){return!!Cs($(this)[0])}},laser_turret:{id:"tech-laser_turret",title:z("tech_laser_turret"),desc:z("tech_laser_turret"),category:"hell_dimension",era:"interstellar",reqs:{high_tech:9,portal:2},grant:["turret",1],cost:{Knowledge:()=>6e5,Elerium:()=>100},effect:()=>`
          ${z("tech_laser_turret_effect1")}
          ${z("tech_laser_turret_effect2")}
          `,action(){return!!Cs($(this)[0])},post(){ic({el:"#fort"},"update"),Ls(!1,["portal-turret"])}},plasma_turret:{id:"tech-plasma_turret",title:z("tech_plasma_turret"),desc:z("tech_plasma_turret"),category:"hell_dimension",era:"interstellar",reqs:{high_tech:13,turret:1},grant:["turret",2],cost:{Knowledge:()=>76e4,Elerium:()=>350},effect:()=>`
          ${z("tech_plasma_turret_effect")}
          ${z("tech_laser_turret_effect2")}
          `,action(){return!!Cs($(this)[0])},post(){ic({el:"#fort"},"update"),Ls(!1,["portal-turret"])}},black_powder:{id:"tech-black_powder",title:()=>"magic"===t.race.universe?z("tech_magic_powder"):z("tech_black_powder"),desc:()=>"magic"===t.race.universe?z("tech_magic_powder_desc"):z("tech_black_powder_desc"),category:"progress",era:"civilized",reqs:{mining:4},grant:["explosives",1],cost:{Knowledge:()=>4500,Mana:()=>"magic"===t.race.universe?100:0,Crystal:()=>"magic"===t.race.universe?250:0,Coal:()=>"magic"===t.race.universe?300:500},effect:()=>"magic"===t.race.universe?z("tech_magic_powder_effect"):z("tech_black_powder_effect"),action(){return!!Cs($(this)[0])}},dynamite:{id:"tech-dynamite",title:z("tech_dynamite"),desc:z("tech_dynamite"),category:"mining",era:"civilized",reqs:{explosives:1},grant:["explosives",2],cost:{Knowledge:()=>4800,Coal:()=>750},effect:z("tech_dynamite_effect"),action(){return!!Cs($(this)[0])}},anfo:{id:"tech-anfo",title:z("tech_anfo"),desc:z("tech_anfo"),category:"mining",era:"industrialized",reqs:{explosives:2,oil:1},grant:["explosives",3],cost:{Knowledge:()=>42e3,Oil:()=>2500},effect:z("tech_anfo_effect"),action(){return!!Cs($(this)[0])}},mad:{id:"tech-mad",title:z("tech_mad"),desc:z("tech_mad_desc"),category:"special",era:"globalized",reqs:{uranium:1,explosives:3,high_tech:7},not_trait:["cataclysm","lone_survivor"],grant:["mad",1],condition:()=>!(t.race.sludge||t.race.truepath&&!t.tech.world_control),cost:{Knowledge:()=>12e4,Oil:()=>t.city.ptrait.includes("dense")?1e4:8500,Uranium:()=>1250},effect:()=>t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?z("tech_mad_effect_easter"):z("tech_mad_effect"),action(){return!!Cs($(this)[0])&&(t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?Bi(z("tech_mad_info_easter"),"info",!1,["progress"]):Bi(z("tech_mad_info"),"info",!1,["progress"]),t.civic.mad.display=!0,!0)}},cement:{id:"tech-cement",title:z("tech_cement"),desc:z("tech_cement_desc"),category:"cement",era:"civilized",reqs:{mining:1,storage:1,science:1},not_trait:["flier"],grant:["cement",1],cost:{Knowledge:()=>500},effect:z("tech_cement_effect"),action(){return!!Cs($(this)[0])&&(t.city.cement_plant={count:0,on:0},!0)}},rebar:{id:"tech-rebar",title:z("tech_rebar"),desc:z("tech_rebar"),category:"cement",era:"civilized",reqs:{mining:3,cement:1},not_trait:["flier"],grant:["cement",2],cost:{Knowledge:()=>3200,Iron:()=>750},effect:z("tech_rebar_effect"),action(){return!!Cs($(this)[0])}},steel_rebar:{id:"tech-steel_rebar",title:z("tech_steel_rebar"),desc:z("tech_steel_rebar"),category:"cement",era:"civilized",reqs:{smelting:2,cement:2},not_trait:["flier"],grant:["cement",3],cost:{Knowledge:()=>6750,Steel:()=>750},effect:z("tech_steel_rebar_effect"),action(){return!!Cs($(this)[0])}},portland_cement:{id:"tech-portland_cement",title:z("tech_portland_cement"),desc:z("tech_portland_cement"),category:"cement",era:"industrialized",reqs:{cement:3,high_tech:3},not_trait:["flier"],grant:["cement",4],cost:{Knowledge:()=>32e3},effect:z("tech_portland_cement_effect"),action(){return!!Cs($(this)[0])}},screw_conveyor:{id:"tech-screw_conveyor",title:z("tech_screw_conveyor"),desc:z("tech_screw_conveyor"),category:"cement",era:"globalized",reqs:{cement:4,high_tech:4},not_trait:["flier"],grant:["cement",5],cost:{Knowledge:()=>72e3},effect:z("tech_screw_conveyor_effect"),action(){return!!Cs($(this)[0])}},adamantite_screws:{id:"tech-adamantite_screws",title:z("tech_adamantite_screws"),desc:z("tech_adamantite_screws"),category:"cement",era:"interstellar",reqs:{cement:5,alpha:2},not_trait:["cataclysm","flier"],grant:["cement",6],cost:{Knowledge:()=>5e5,Adamantite:()=>1e4},effect:z("tech_adamantite_screws_effect",[3]),action(){return!!Cs($(this)[0])}},hunter_process:{id:"tech-hunter_process",title:z("tech_hunter_process"),desc:z("tech_hunter_process"),category:"mining",era:"industrialized",reqs:{high_tech:3,smelting:2},grant:["titanium",1],cost:{Knowledge:()=>45e3,Titanium:()=>1e3},effect:z("tech_hunter_process_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Titanium.value=Za.Titanium,!0)}},kroll_process:{id:"tech-kroll_process",title:z("tech_kroll_process"),desc:z("tech_kroll_process"),category:"mining",era:"globalized",reqs:{titanium:1,high_tech:4},grant:["titanium",2],cost:{Knowledge:()=>78e3,Titanium:()=>1e4},effect:z("tech_kroll_process_effect"),action(){return!!Cs($(this)[0])}},cambridge_process:{id:"tech-cambridge_process",title:z("tech_cambridge_process"),desc:z("tech_cambridge_process"),category:"mining",era:"early_space",reqs:{titanium:2,supercollider:1},grant:["titanium",3],cost:{Knowledge:()=>135e3,Titanium:()=>17500},effect:z("tech_cambridge_process_effect"),action(){return!!Cs($(this)[0])}},pynn_partical:{id:"tech-pynn_partical",title:z("tech_pynn_partical"),desc:z("tech_pynn_partical"),category:"progress",era:"early_space",path:["standard"],reqs:{supercollider:1},grant:["particles",1],cost:{Knowledge:()=>1e5},effect:z("tech_pynn_partical_effect"),action(){return!!Cs($(this)[0])}},matter_compression:{id:"tech-matter_compression",title:z("tech_matter_compression"),desc:z("tech_matter_compression"),category:"storage",era:"early_space",path:["standard"],reqs:{particles:1},grant:["particles",2],cost:{Knowledge:()=>112500},effect:z("tech_matter_compression_effect"),action(){return!!Cs($(this)[0])}},higgs_boson:{id:"tech-higgs_boson",title:z("tech_higgs_boson"),desc:z("tech_higgs_boson"),category:"science",era:"early_space",path:["standard"],reqs:{particles:2,supercollider:2},grant:["particles",3],cost:{Knowledge:()=>125e3},effect:z("tech_higgs_boson_effect"),action(){return!!Cs($(this)[0])}},dimensional_compression:{id:"tech-dimensional_compression",title:z("tech_dimensional_compression"),desc:z("tech_dimensional_compression"),category:"storage",era:"interstellar",reqs:{particles:3,science:11,supercollider:3},grant:["particles",4],cost:{Knowledge:()=>425e3},effect:z("tech_dimensional_compression_effect"),action(){return!!Cs($(this)[0])}},theology:{id:"tech-theology",title:z("tech_theology"),desc:z("tech_theology"),category:"religion",era:"civilized",reqs:{theology:1,housing:1,cement:1},grant:["theology",2],cost:{Knowledge:()=>900},effect:z("tech_theology_effect"),action(){return!!Cs($(this)[0])&&(t.city.temple={count:0},t.race.magnificent&&(t.city.shrine={count:0,morale:0,metal:0,know:0,tax:0}),t.genes.ancients&&t.genes.ancients>=2&&(t.civic.priest.display=!0),!0)}},fanaticism:{id:"tech-fanaticism",title:z("tech_fanaticism"),desc:z("tech_fanaticism"),category:"religion",era:"civilized",wiki:!t.genes.transcendence,reqs:{theology:2},grant:["theology",3],not_gene:["transcendence"],no_queue:()=>!!t.r_queue.queue.some((e=>"tech-anthropology"===e.id)),cost:{Knowledge:()=>2500},effect:`
          ${z("tech_fanaticism_effect")}
          ${z("tech_fanaticism_warning")}
          `,action(){return!!Cs($(this)[0])&&(t.tech.fanaticism=1,t.race.gods===t.race.species&&eo("second_evolution"),Ds(t.race.gods),!0)}},alt_fanaticism:{id:"tech-alt_fanaticism",title:z("tech_fanaticism"),desc:z("tech_fanaticism"),category:"religion",era:"civilized",wiki:!!t.genes.transcendence,reqs:{theology:2},grant:["fanaticism",1],gene:["transcendence"],cost:{Knowledge:()=>2500},effect:`
          ${z("tech_fanaticism_effect")}
          `,action(){return!!Cs($(this)[0])&&(2===t.tech.theology&&(t.tech.theology=3),t.race.gods===t.race.species&&eo("second_evolution"),Ds(t.race.gods),!0)}},ancient_theology:{id:"tech-ancient_theology",title:z("tech_ancient_theology"),desc:z("tech_ancient_theology"),category:"religion",era:"early_space",reqs:{theology:3,mars:2},grant:["theology",4],condition:()=>!!t.genes.ancients,cost:{Knowledge:()=>18e4},effect:()=>z("tech_ancient_theology_effect",["none"!==t.race.old_gods?_i[t.race.old_gods.toLowerCase()].entity:_i[t.race.species].entity,"none"!==t.race.gods?_i[t.race.gods.toLowerCase()].entity:_i[t.race.species].entity]),action(){return!!Cs($(this)[0])&&(t.space.ziggurat={count:0},!0)}},study:{id:"tech-study",title:z("tech_study"),desc:z("tech_study_desc"),category:"religion",era:"early_space",reqs:{theology:4},grant:["theology",5],no_queue:()=>!!t.r_queue.queue.some((e=>"tech-deify"===e.id)),cost:{Knowledge:()=>195e3},effect:()=>`
          ${z("tech_study_effect",["none"!==t.race.old_gods?_i[t.race.old_gods.toLowerCase()].entity:_i[t.race.species].entity])}
          ${z("tech_study_warning")}
          `,action(){return!!Cs($(this)[0])&&(t.tech.ancient_study=1,!0)}},encoding:{id:"tech-encoding",title:z("tech_encoding"),desc:z("tech_encoding_desc"),category:"religion",era:"deep_space",reqs:{ancient_study:1,mars:5},grant:["ancient_study",2],cost:{Knowledge:()=>268e3},effect:()=>`
          ${z("tech_encoding_effect")}
          `,action(){return!!Cs($(this)[0])}},deify:{id:"tech-deify",title:z("tech_deify"),desc:z("tech_deify_desc"),category:"religion",era:"early_space",reqs:{theology:4},grant:["theology",5],no_queue:()=>!!t.r_queue.queue.some((e=>"tech-study"===e.id)),cost:{Knowledge:()=>195e3},effect:()=>`
          ${z("tech_deify_effect",["none"!==t.race.old_gods?_i[t.race.old_gods.toLowerCase()].entity:_i[t.race.species].entity])}
          ${z("tech_deify_warning")}
          `,action(){return!!Cs($(this)[0])&&(t.tech.ancient_deify=1,Ds(t.race.old_gods),Ce("Genetics"),!0)}},infusion:{id:"tech-infusion",title:z("tech_infusion"),desc:z("tech_infusion_desc"),category:"religion",era:"deep_space",reqs:{ancient_deify:1,mars:5},grant:["ancient_deify",2],cost:{Knowledge:()=>268e3},effect:()=>`
          ${z("tech_infusion_effect")}
          `,action(){return!!Cs($(this)[0])}},indoctrination:{id:"tech-indoctrination",title:z("tech_indoctrination"),desc:z("tech_indoctrination"),category:"religion",era:"civilized",reqs:{fanaticism:1},grant:["fanaticism",2],cost:{Knowledge:()=>5e3},effect:z("tech_indoctrination_effect"),action(){return!!Cs($(this)[0])},post(){t.race.terrifying&&(t.tech.fanaticism=3,gs())}},missionary:{id:"tech-missionary",title:z("tech_missionary"),desc:z("tech_missionary"),category:"religion",era:"discovery",reqs:{fanaticism:2},not_trait:["terrifying"],grant:["fanaticism",3],cost:{Knowledge:()=>1e4},effect:z("tech_missionary_effect"),action(){return!!Cs($(this)[0])}},zealotry:{id:"tech-zealotry",title:z("tech_zealotry"),desc:z("tech_zealotry"),category:"religion",era:"discovery",reqs:{fanaticism:3},grant:["fanaticism",4],cost:{Knowledge:()=>25e3},effect:z("tech_zealotry_effect"),action(){return!!Cs($(this)[0])}},anthropology:{id:"tech-anthropology",title:z("tech_anthropology"),desc:z("tech_anthropology"),category:"religion",era:"civilized",wiki:!t.genes.transcendence,reqs:{theology:2},grant:["theology",3],not_gene:["transcendence"],no_queue:()=>!!t.r_queue.queue.some((e=>"tech-fanaticism"===e.id)),cost:{Knowledge:()=>2500},effect:`
          ${z("tech_anthropology_effect")}
          ${z("tech_anthropology_warning")}
          `,action(){return!!Cs($(this)[0])&&(t.tech.anthropology=1,!0)}},alt_anthropology:{id:"tech-alt_anthropology",title:z("tech_anthropology"),desc:z("tech_anthropology"),category:"religion",era:"civilized",wiki:!!t.genes.transcendence,reqs:{theology:2},grant:["anthropology",1],gene:["transcendence"],cost:{Knowledge:()=>2500},effect:`
          ${z("tech_anthropology_effect")}
          `,action(){return!!Cs($(this)[0])&&(2===t.tech.theology&&(t.tech.theology=3),!0)}},mythology:{id:"tech-mythology",title:z("tech_mythology"),desc:z("tech_mythology"),category:"religion",era:"civilized",reqs:{anthropology:1},grant:["anthropology",2],cost:{Knowledge:()=>5e3},effect:z("tech_mythology_effect"),action(){return!!Cs($(this)[0])}},archaeology:{id:"tech-archaeology",title:z("tech_archaeology"),desc:z("tech_archaeology"),category:"science",era:"discovery",reqs:{anthropology:2},grant:["anthropology",3],cost:{Knowledge:()=>1e4},effect:z("tech_archaeology_effect"),action(){return!!Cs($(this)[0])}},merchandising:{id:"tech-merchandising",title:z("tech_merchandising"),desc:z("tech_merchandising"),category:"banking",era:"discovery",reqs:{anthropology:3},grant:["anthropology",4],cost:{Knowledge:()=>25e3},effect:()=>t.race.truepath?z("tech_merchandising_effect_tp"):z("tech_merchandising_effect"),action(){return!!Cs($(this)[0])}},astrophysics:{id:"tech-astrophysics",title:z("tech_astrophysics"),desc:z("tech_astrophysics_desc"),category:"storage",era:"early_space",reqs:{space:2},grant:["space_explore",1],cost:{Knowledge:()=>125e3},effect:z("tech_astrophysics_effect"),action(){return!!Cs($(this)[0])&&(t.space.propellant_depot={count:0},!0)}},rover:{id:"tech-rover",title:z("tech_rover"),desc:z("tech_rover"),category:"space_exploration",era:"early_space",reqs:{space_explore:1},grant:["space_explore",2],cost:{Knowledge:()=>135e3,Alloy:()=>22e3,Polymer:()=>18e3,Uranium:()=>750},effect:z("tech_rover_effect"),action(){return!!Cs($(this)[0])&&(t.settings.space.moon=!0,t.space.moon_base={count:0,on:0,support:0,s_max:0},!0)}},probes:{id:"tech-probes",title:z("tech_probes"),desc:z("tech_probes"),category:"space_exploration",era:"early_space",reqs:{space_explore:2},grant:["space_explore",3],cost:{Knowledge:()=>168e3,Steel:()=>1e5,Iridium:()=>5e3,Uranium:()=>2250,Helium_3:()=>3500},effect:z("tech_probes_effect"),action(){return!!Cs($(this)[0])&&(t.settings.space.red=!0,t.settings.space.hell=!0,t.space.spaceport={count:0,on:0,support:0,s_max:0},!0)}},starcharts:{id:"tech-starcharts",title:z("tech_starcharts"),desc:z("tech_starcharts"),category:"space_exploration",era:"early_space",reqs:{space_explore:3,science:9},grant:["space_explore",4],cost:{Knowledge:()=>185e3},effect:z("tech_starcharts_effect"),action(){return!!Cs($(this)[0])&&(t.settings.space.gas=!0,t.settings.space.sun=!0,t.race.truepath&&(t.settings.showOuter=!0),t.space.swarm_control={count:0,support:0,s_max:0},!0)}},colonization:{id:"tech-colonization",title:z("tech_colonization"),desc:()=>z("tech_colonization_desc",[ea().red]),category:"agriculture",era:"early_space",reqs:{space:4,mars:1},grant:["mars",2],cost:{Knowledge:()=>172e3},effect:()=>z(t.race.artifical?"tech_colonization_artifical_effect":"tech_colonization_effect",[ea().red]),action(){return!!Cs($(this)[0])&&(t.space.biodome={count:0,on:0},!0)}},red_tower:{id:"tech-red_tower",title:()=>z("tech_red_tower",[ea().red]),desc:()=>z("tech_red_tower",[ea().red]),category:"space_exploration",era:"early_space",reqs:{mars:2},grant:["mars",3],cost:{Knowledge:()=>195e3},effect:()=>z("tech_red_tower_effect",[ea().red]),action(){return!!Cs($(this)[0])&&(t.space.red_tower={count:0,on:0},!0)}},space_manufacturing:{id:"tech-space_manufacturing",title:z("tech_space_manufacturing"),desc:z("tech_space_manufacturing_desc"),category:"crafting",era:"early_space",reqs:{mars:3},grant:["mars",4],cost:{Knowledge:()=>22e4},effect:()=>z("tech_space_manufacturing_effect",[ea().red]),action(){return!!Cs($(this)[0])&&(t.space.red_factory={count:0,on:0},!0)}},exotic_lab:{id:"tech-exotic_lab",title:z("tech_exotic_lab"),desc:z("tech_exotic_lab_desc"),category:"science",era:"deep_space",reqs:{mars:4,asteroid:5},grant:["mars",5],cost:{Knowledge:()=>25e4},effect:z("tech_exotic_lab_effect"),action(){return!!Cs($(this)[0])&&(t.space.exotic_lab={count:0,on:0},!0)}},hydroponics:{id:"tech-hydroponics",title:z("tech_hydroponics"),desc:()=>z("tech_hydroponics"),category:"agriculture",era:"intergalactic",reqs:{mars:5,gateway:3},grant:["mars",6],cost:{Knowledge:()=>3e6,Bolognium:()=>5e5},effect:()=>z("tech_hydroponics_effect"),action(){return!!Cs($(this)[0])}},dyson_sphere:{id:"tech-dyson_sphere",title:z("tech_dyson_sphere"),desc:z("tech_dyson_sphere"),category:"power_generation",era:"early_space",reqs:{solar:1},grant:["solar",2],cost:{Knowledge:()=>195e3},effect:z("tech_dyson_sphere_effect"),action(){return!!Cs($(this)[0])}},dyson_swarm:{id:"tech-dyson_swarm",title:z("tech_dyson_swarm"),desc:z("tech_dyson_swarm"),category:"power_generation",era:"early_space",reqs:{solar:2},grant:["solar",3],cost:{Knowledge:()=>21e4},effect:z("tech_dyson_swarm_effect"),action(){return!!Cs($(this)[0])&&(t.space.swarm_satellite={count:0},!0)}},swarm_plant:{id:"tech-swarm_plant",title:z("tech_swarm_plant"),desc:z("tech_swarm_plant"),category:"power_generation",era:"deep_space",reqs:{solar:3,hell:1,gas_moon:1},grant:["solar",4],cost:{Knowledge:()=>25e4},effect:()=>z("tech_swarm_plant_effect",[_i[t.race.species].home,ea().hell]),action(){return!!Cs($(this)[0])&&(t.space.swarm_plant={count:0},!0)}},space_sourced:{id:"tech-space_sourced",title:z("tech_space_sourced"),desc:z("tech_space_sourced_desc"),category:"power_generation",era:"deep_space",reqs:{solar:4,asteroid:3},grant:["solar",5],cost:{Knowledge:()=>3e5},effect:z("tech_space_sourced_effect"),action(){return!!Cs($(this)[0])}},swarm_plant_ai:{id:"tech-swarm_plant_ai",title:z("tech_swarm_plant_ai"),desc:z("tech_swarm_plant_ai"),category:"power_generation",era:"deep_space",reqs:{solar:4,high_tech:10},grant:["swarm",1],cost:{Knowledge:()=>335e3},effect:z("tech_swarm_plant_ai_effect"),action(){return!!Cs($(this)[0])}},swarm_control_ai:{id:"tech-swarm_control_ai",title:z("tech_swarm_control_ai"),desc:z("tech_swarm_control_ai"),category:"power_generation",era:"deep_space",reqs:{swarm:1},grant:["swarm",2],cost:{Knowledge:()=>36e4},effect:z("tech_swarm_control_ai_effect"),action(){return!!Cs($(this)[0])}},quantum_swarm:{id:"tech-quantum_swarm",title:z("tech_quantum_swarm"),desc:z("tech_quantum_swarm"),category:"power_generation",era:"deep_space",reqs:{swarm:2,high_tech:11},grant:["swarm",3],cost:{Knowledge:()=>45e4},effect:z("tech_quantum_swarm_effect"),action(){return!!Cs($(this)[0])}},perovskite_cell:{id:"tech-perovskite_cell",title:z("tech_perovskite_cell"),desc:z("tech_perovskite_cell"),category:"power_generation",era:"interstellar",reqs:{swarm:3},grant:["swarm",4],path:["standard","truepath"],cost:{Knowledge:()=>525e3,Titanium:()=>1e5},effect:z("tech_perovskite_cell_effect"),action(){return!!Cs($(this)[0])}},swarm_convection:{id:"tech-swarm_convection",title:z("tech_swarm_convection"),desc:z("tech_swarm_convection"),category:"power_generation",era:"interstellar",reqs:{swarm:4,stanene:1},grant:["swarm",5],path:["standard","truepath"],cost:{Knowledge:()=>725e3,Stanene:()=>1e5},effect:z("tech_swarm_convection_effect"),action(){return!!Cs($(this)[0])}},orichalcum_panels:{id:"tech-orichalcum_panels",title:z("tech_orichalcum_panels"),desc:z("tech_orichalcum_panels"),category:"power_generation",era:"intergalactic",reqs:{high_tech:17,swarm:5},grant:["swarm",6],cost:{Knowledge:()=>14e6,Orichalcum:()=>125e3},effect:()=>z("tech_orichalcum_panels_effect"),action(){return!!Cs($(this)[0])}},dyson_net:{id:"tech-dyson_net",title:z("tech_dyson_net"),desc:z("tech_dyson_net"),category:"power_generation",era:"interstellar",reqs:{solar:3,proxima:2,stanene:1},grant:["proxima",3],cost:{Knowledge:()=>8e5},effect:z("tech_dyson_net_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.dyson={count:0},!0)}},dyson_sphere2:{id:"tech-dyson_sphere2",title:z("tech_dyson_sphere"),desc:z("tech_dyson_sphere"),category:"power_generation",era:"intergalactic",reqs:{proxima:3,piracy:1},grant:["dyson",1],cost:{Knowledge:()=>5e6},effect:z("tech_dyson_sphere2_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.dyson_sphere={count:0},!0)}},orichalcum_sphere:{id:"tech-orichalcum_sphere",title:z("tech_orichalcum_sphere"),desc:z("tech_orichalcum_sphere"),category:"power_generation",era:"intergalactic",reqs:{dyson:1,science:19},condition:()=>!!(t.interstellar.dyson_sphere&&t.interstellar.dyson_sphere.count>=100),grant:["dyson",2],cost:{Knowledge:()=>175e5,Orichalcum:()=>25e4},effect:z("tech_orichalcum_sphere_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.orichalcum_sphere={count:0},!0)}},gps:{id:"tech-gps",title:z("tech_gps"),desc:z("tech_gps"),category:"market",era:"early_space",reqs:{space_explore:1},not_trait:["terrifying"],grant:["satellite",1],cost:{Knowledge:()=>15e4},effect:z("tech_gps_effect"),action(){return!!Cs($(this)[0])&&(t.space.gps={count:0},!0)}},nav_beacon:{id:"tech-nav_beacon",title:z("tech_nav_beacon"),desc:z("tech_nav_beacon"),category:"space_exploration",era:"early_space",reqs:{luna:1},grant:["luna",2],cost:{Knowledge:()=>18e4},effect:z("tech_nav_beacon_effect"),action(){return!!Cs($(this)[0])&&(t.space.nav_beacon={count:0,on:0},!0)}},subspace_signal:{id:"tech-subspace_signal",title:z("tech_subspace_signal"),desc:z("tech_subspace_signal"),category:"space_exploration",era:"interstellar",reqs:{science:13,luna:2,stanene:1},grant:["luna",3],cost:{Knowledge:()=>7e5,Stanene:()=>125e3},effect:()=>z("tech_subspace_signal_effect",[ea().red]),action(){return!!Cs($(this)[0])}},atmospheric_mining:{id:"tech-atmospheric_mining",title:z("tech_atmospheric_mining"),desc:z("tech_atmospheric_mining"),category:"power_generation",era:"early_space",reqs:{space:5},grant:["gas_giant",1],cost:{Knowledge:()=>19e4},effect:z("tech_atmospheric_mining_effect"),action(){return!!Cs($(this)[0])&&(t.space.gas_mining={count:0,on:0},t.space.gas_storage={count:0},!0)}},helium_attractor:{id:"tech-helium_attractor",title:z("tech_helium_attractor"),desc:z("tech_helium_attractor"),category:"power_generation",era:"deep_space",reqs:{gas_giant:1,elerium:1},grant:["helium",1],cost:{Knowledge:()=>29e4,Elerium:()=>250},effect:()=>z("tech_helium_attractor_effect",[ea().gas]),action(){return!!Cs($(this)[0])}},ram_scoops:{id:"tech-ram_scoops",title:z("tech_ram_scoops"),desc:z("tech_ram_scoops"),category:"power_generation",era:"interstellar",reqs:{nebula:2},grant:["ram_scoop",1],cost:{Knowledge:()=>58e4},effect:()=>z("tech_ram_scoops_effect"),action(){return!!Cs($(this)[0])}},elerium_prospecting:{id:"tech-elerium_prospecting",title:z("tech_elerium_prospecting"),desc:z("tech_elerium_prospecting"),category:"space_mining",era:"interstellar",reqs:{nebula:2},grant:["nebula",3],cost:{Knowledge:()=>61e4},effect:()=>z("tech_elerium_prospecting_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.elerium_prospector={count:0,on:0},!0)}},zero_g_mining:{id:"tech-zero_g_mining",title:z("tech_zero_g_mining"),desc:z("tech_zero_g_mining"),category:"space_mining",era:"early_space",reqs:{asteroid:1,high_tech:8},grant:["asteroid",2],cost:{Knowledge:()=>21e4},effect:z("tech_zero_g_mining_effect"),action(){return!!Cs($(this)[0])&&(t.space.space_station={count:0,on:0,support:0,s_max:0},t.space.iridium_ship={count:0,on:0},t.space.iron_ship={count:0,on:0},!0)}},elerium_mining:{id:"tech-elerium_mining",title:z("tech_elerium_mining"),desc:z("tech_elerium_mining"),category:"space_mining",era:"deep_space",reqs:{asteroid:4},grant:["asteroid",5],cost:{Knowledge:()=>235e3,Elerium:()=>t.race.truepath?.5:1},effect:z("tech_elerium_mining_effect"),action(){return!!Cs($(this)[0])&&(t.space.elerium_ship={count:0,on:0},t.race.cataclysm&&eo("iron_will",!1,2),!0)}},laser_mining:{id:"tech-laser_mining",title:z("tech_laser_mining"),desc:z("tech_laser_mining"),category:"space_mining",era:"deep_space",reqs:{asteroid:5,elerium:1,high_tech:9},grant:["asteroid",6],cost:{Knowledge:()=>35e4},effect:z("tech_laser_mining_effect"),action(){return!!Cs($(this)[0])}},plasma_mining:{id:"tech-plasma_mining",title:z("tech_plasma_mining"),desc:z("tech_plasma_mining"),category:"space_mining",era:"interstellar",reqs:{asteroid:6,high_tech:13},grant:["asteroid",7],path:["standard","truepath"],cost:{Knowledge:()=>825e3},effect:z("tech_plasma_mining_effect"),action(){return!!Cs($(this)[0])}},elerium_tech:{id:"tech-elerium_tech",title:z("tech_elerium_tech"),desc:z("tech_elerium_tech"),category:"space_mining",era:"deep_space",reqs:{asteroid:5},grant:["elerium",1],cost:{Knowledge:()=>275e3,Elerium:()=>20},effect:z("tech_elerium_tech_effect"),action(){return!!Cs($(this)[0])}},elerium_reactor:{id:"tech-elerium_reactor",title:z("tech_elerium_reactor"),desc:z("tech_elerium_reactor"),category:"power_generation",era:"deep_space",reqs:{dwarf:1,elerium:1},grant:["elerium",2],cost:{Knowledge:()=>325e3,Elerium:()=>180},effect:z("tech_elerium_reactor_effect"),action(){return!!Cs($(this)[0])&&(t.space.e_reactor={count:0,on:0},!0)}},neutronium_housing:{id:"tech-neutronium_housing",title:z("tech_neutronium_housing"),desc:z("tech_neutronium_housing"),category:"housing",era:"deep_space",reqs:{gas_moon:1},grant:["space_housing",1],cost:{Knowledge:()=>275e3,Neutronium:()=>350},effect:()=>z("tech_neutronium_housing_effect",[ea().red]),action(){return!!Cs($(this)[0])}},unification:{id:"tech-unification",title:z("tech_unification"),desc:()=>z("tech_unification_desc",[_i[t.race.species].home]),category:"special",era:"early_space",path:["standard"],reqs:{mars:2},grant:["unify",1],cost:{Knowledge:()=>2e5},effect:z("tech_unification_effect"),action(){return!!Cs($(this)[0])}},unification2:{id:"tech-unification2",title:z("tech_unification"),desc:()=>z("tech_unification_desc",[_i[t.race.species].home]),category:"special",era:"early_space",path:["standard"],reqs:{unify:1},grant:["unify",2],cost:{Bool(){let e=0;for(let a=0;a<3;a++)(t.civic.foreign[`gov${a}`].occ||t.civic.foreign[`gov${a}`].buy||t.civic.foreign[`gov${a}`].anx)&&e++;return 3===e}},effect(){let e=t.race.banana?`
          ${z("tech_unification_banana")}
          `:"";return`
          ${z("tech_unification_effect2")}
          ${z("tech_unification_warning")}
          ${e}`},action(){return!!Cs($(this)[0])&&(t.race.banana&&(t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),delete t.race.banana),t.civic.foreign.gov0.occ&&t.civic.foreign.gov1.occ&&t.civic.foreign.gov2.occ&&eo("world_domination"),t.civic.foreign.gov0.anx&&t.civic.foreign.gov1.anx&&t.civic.foreign.gov2.anx&&eo("illuminati"),t.civic.foreign.gov0.buy&&t.civic.foreign.gov1.buy&&t.civic.foreign.gov2.buy&&eo("syndicate"),0===t.stats.attacks&&eo("pacifist"),Ur(),!0)}},unite:{id:"tech-unite",title:z("tech_unite"),desc:()=>z("tech_unite_desc"),category:"special",era:"globalized",path:["truepath"],reqs:{unify:1},grant:["unify",2],cost:{Bool(){let e=0;for(let a=0;a<3;a++)(t.civic.foreign[`gov${a}`].occ||t.civic.foreign[`gov${a}`].buy||t.civic.foreign[`gov${a}`].anx)&&e++;return 3===e}},effect:()=>`
          ${z("tech_unite_effect")}
          ${z("tech_unification_effect2")}
          `,action(){return!!Cs($(this)[0])&&(t.race.banana&&(t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),delete t.race.banana),t.civic.foreign.gov0.occ&&t.civic.foreign.gov1.occ&&t.civic.foreign.gov2.occ&&eo("world_domination"),t.civic.foreign.gov0.anx&&t.civic.foreign.gov1.anx&&t.civic.foreign.gov2.anx&&eo("illuminati"),t.civic.foreign.gov0.buy&&t.civic.foreign.gov1.buy&&t.civic.foreign.gov2.buy&&eo("syndicate"),0===t.stats.attacks&&eo("pacifist"),Ur(),t.race.truepath&&!t.tech.rival&&(t.tech.rival=1,Bi(z("civics_rival_unlocked",[te(3)]),"info",!1,["progress","combat"])),!0)}},genesis:{id:"tech-genesis",title:z("tech_genesis"),desc:z("tech_genesis"),category:"special",era:"deep_space",reqs:{high_tech:10,genesis:1},grant:["genesis",2],cost:{Knowledge:()=>35e4},effect:z("tech_genesis_effect"),action(){return!!Cs($(this)[0])}},star_dock:{id:"tech-star_dock",title:z("tech_star_dock"),desc:z("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:()=>38e4},effect:z("tech_star_dock_effect"),action(){return!!Cs($(this)[0])&&(t.space.star_dock={count:0,ship:0,probe:0,template:t.race.species},!0)}},interstellar:{id:"tech-interstellar",title:z("tech_interstellar"),desc:z("tech_interstellar"),category:"space_exploration",era:"deep_space",reqs:{genesis:3},grant:["genesis",4],cost:{Knowledge:()=>4e5},effect:z("tech_interstellar_effect"),action(){return!!Cs($(this)[0])&&(t.starDock.probes={count:0},!0)}},genesis_ship:{id:"tech-genesis_ship",title:()=>t.race.cataclysm?z("tech_generational_ship"):z("tech_genesis_ship"),desc:()=>t.race.cataclysm?z("tech_generational_ship"):z("tech_genesis_ship"),category:"special",era:"deep_space",reqs:{genesis:4},grant:["genesis",5],cost:{Knowledge:()=>425e3},effect:()=>t.race.cataclysm?z("tech_generational_effect"):z("tech_genesis_ship_effect"),action(){return!!Cs($(this)[0])&&(t.starDock.seeder={count:0},t.race.cataclysm&&eo("iron_will",!1,4),!0)}},geck:{id:"tech-geck",title:()=>z("tech_geck"),desc:()=>z("tech_geck_desc"),category:"special",era:"deep_space",reqs:{genesis:5},grant:["geck",1],condition:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=5),cost:{Knowledge:()=>5e5},effect:()=>z("tech_geck_effect"),action(){return!!Cs($(this)[0])&&(t.starDock.geck={count:0},!0)}},genetic_decay:{id:"tech-genetic_decay",title:z("tech_genetic_decay"),desc:z("tech_genetic_decay"),category:"genes",era:"early_space",reqs:{decay:1},grant:["decay",2],cost:{Knowledge:()=>2e5},effect:z("tech_genetic_decay_effect"),action(){return!!Cs($(this)[0])}},stabilize_decay:{id:"tech-stabilize_decay",title:z("tech_stabilize_decay"),desc:z("tech_stabilize_decay"),category:"genes",era:"dimensional",reqs:{decay:2,high_tech:18},grant:["decay",3],cost:{Knowledge:()=>5e7,Blood_Stone:()=>1},effect:z("tech_stabilize_decay_effect"),action(){return!!Cs($(this)[0])}},tachyon:{id:"tech-tachyon",title:z("tech_tachyon"),desc:z("tech_tachyon"),category:"progress",era:"interstellar",reqs:{wsc:1},grant:["ftl",1],cost:{Knowledge:()=>435e3},effect:z("tech_tachyon_effect"),action(){return!!Cs($(this)[0])}},warp_drive:{id:"tech-warp_drive",title:z("tech_warp_drive"),desc:z("tech_warp_drive"),category:"space_exploration",era:"interstellar",reqs:{ftl:1},grant:["ftl",2],cost:{Knowledge:()=>45e4},effect:z("tech_warp_drive_effect"),action(){return!!Cs($(this)[0])&&(t.settings.showDeep=!0,t.settings.space.alpha=!0,t.interstellar.starport={count:0,on:0,support:0,s_max:0},!0)}},habitat:{id:"tech-habitat",title:z("tech_habitat"),desc:z("tech_habitat_desc"),category:"housing",era:"interstellar",reqs:{alpha:2,droids:1},grant:["alpha",3],cost:{Knowledge:()=>48e4},effect:z("tech_habitat_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.habitat={count:0,on:0},!0)}},graphene:{id:"tech-graphene",title:z("tech_graphene"),desc:z("tech_graphene"),category:"crafting",era:"interstellar",reqs:{alpha:3,infernite:1},grant:["graphene",1],cost:{Knowledge:()=>54e4,Adamantite:()=>1e4},effect:z("tech_graphene_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.g_factory={count:0,on:0,Lumber:0,Coal:0,Oil:0},!0)}},aerogel:{id:"tech-aerogel",title:z("tech_aerogel"),desc:z("tech_aerogel"),category:"crafting",era:"interstellar",reqs:{graphene:1,science:13},grant:["aerogel",1],cost:{Knowledge:()=>75e4,Graphene:()=>5e4,Infernite:()=>500},effect:z("tech_aerogel_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Aerogel.display=!0,ma(),!0)},post(){Ai()}},mega_manufacturing:{id:"tech-mega_manufacturing",title:z("tech_mega_manufacturing"),desc:z("tech_mega_manufacturing"),category:"crafting",era:"intergalactic",reqs:{high_tech:16,alpha:3},grant:["alpha",4],cost:{Knowledge:()=>565e4},effect:()=>z("tech_mega_manufacturing_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.int_factory={count:0,on:0},!0)}},luxury_condo:{id:"tech-luxury_condo",title:z("tech_luxury_condo"),desc:z("tech_luxury_condo"),category:"housing",era:"intergalactic",reqs:{high_tech:17,alpha:4},grant:["alpha",5],cost:{Knowledge:()=>15e6},effect:()=>z("tech_luxury_condo_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.luxury_condo={count:0,on:0},!0)}},stellar_engine:{id:"tech-stellar_engine",title:z("tech_stellar_engine"),desc:z("tech_stellar_engine"),category:"stellar_engine",era:"interstellar",reqs:{blackhole:2},grant:["blackhole",3],cost:{Knowledge:()=>1e6},effect:z("tech_stellar_engine_effect"),action(){return!!Cs($(this)[0])&&(t.interstellar.stellar_engine={count:0,mass:8,exotic:0},!0)}},mass_ejector:{id:"tech-mass_ejector",title:z("tech_mass_ejector"),desc:z("tech_mass_ejector"),category:"stellar_engine",era:"interstellar",reqs:{blackhole:4},grant:["blackhole",5],cost:{Knowledge:()=>11e5},effect:z("tech_mass_ejector_effect"),action(){return!!Cs($(this)[0])&&(t.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)}},asteroid_redirect:{id:"tech-asteroid_redirect",title:z("tech_asteroid_redirect"),desc:z("tech_asteroid_redirect"),category:"stellar_engine",era:"intergalactic",reqs:{blackhole:5,gateway:3},grant:["blackhole",6],cost:{Knowledge:()=>35e5},effect:z("tech_asteroid_redirect_effect"),action(){return!!Cs($(this)[0])},post(){Ce("Physics")}},exotic_infusion:{id:"tech-exotic_infusion",title:z("tech_exotic_infusion"),desc:z("tech_exotic_infusion"),category:"stellar_engine",era:"interstellar",reqs:{whitehole:1},grant:["whitehole",2],cost:{Knowledge:()=>15e5,Soul_Gem:()=>10},effect:()=>`
          ${z("tech_exotic_infusion_effect",[t.resource.Soul_Gem.name])}
          ${z("tech_exotic_infusion_effect2")}
          `,action(){return!!js($(this)[0])},flair:()=>z("tech_exotic_infusion_flair")},infusion_check:{id:"tech-infusion_check",title:z("tech_infusion_check"),desc:z("tech_infusion_check"),category:"stellar_engine",era:"interstellar",reqs:{whitehole:2},grant:["whitehole",3],cost:{Knowledge:()=>15e5,Soul_Gem:()=>10},effect:()=>`
          ${z("tech_infusion_check_effect")}
          ${z("tech_exotic_infusion_effect2")}
          `,action(){return!!js($(this)[0])},flair:()=>z("tech_infusion_check_flair")},infusion_confirm:{id:"tech-infusion_confirm",title:z("tech_infusion_confirm"),desc:z("tech_infusion_confirm"),category:"stellar_engine",era:"interstellar",reqs:{whitehole:3},grant:["whitehole",4],cost:{Knowledge:()=>15e5,Soul_Gem:()=>10},effect(){let e=gc("bigbang"),a="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name"),r=`
          ${z("wiki_tech_infusion_confirm_gains",[e.plasmid,e.phage,e.dark,a])}
          `;return`
          ${z("tech_infusion_confirm_effect")}
          ${z("tech_exotic_infusion_effect2")}
          ${r}`},action(){if(Cs($(this)[0])){if(t.tech.whitehole>=4)return;t.tech.whitehole=4;let a=$('
          ');return $("body").append(a),setTimeout((function(){a.addClass("burn")}),125),setTimeout((function(){a.addClass("b")}),150),setTimeout((function(){a.addClass("c")}),2e3),setTimeout((function(){!function(){switch(t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),C(),Vi("reset",{end:"blackhole"}),eo(`extinct_${t.race.species}`),t.race.universe){case"heavy":eo("heavy");break;case"antimatter":eo("canceled");break;case"evil":eo("eviltwin");break;case"micro":eo("microbang",!0);break;case"standard":eo("whitehole")}t.space.hasOwnProperty("spaceport")&&0===t.space.spaceport.count&&eo("red_dead"),eo("squished",!0),"evil"===t.race.universe&&"angelic"===_i[t.race.species].type&&to("nephilim"),t.race.junker&&"junker"===t.race.species&&to("the_misery"),t.race.decay&&eo("dissipated"),t.race.steelen&&to("steelem");let a=t.race.species,r=t.race.gods,s=t.city.calendar.orbit,i=t.city.biome,c=t.city.ptrait,o=gc("bigbang");io(),t.stats.blackhole++,zc(),t.prestige.Phage.count+=o.phage,t.stats.phage+=o.phage,"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=o.plasmid,t.stats.antiplasmid+=o.plasmid):(t.prestige.Plasmid.count+=o.plasmid,t.stats.plasmid+=o.plasmid),t.prestige.Dark.count=+(t.prestige.Dark.count+o.dark).toFixed(3),t.stats.dark=+(t.stats.dark+o.dark).toFixed(3),t.stats.universes++;let n=!!t.race.hasOwnProperty("srace")&&t.race.srace,l=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0;t.race={species:"protoplasm",gods:a,old_gods:r,universe:"bigbang",seeded:!0,bigbang:!0,probes:4,seed:Math.floor(g(1e4)),ascended:!1},l>0&&(t.race.corruption=l),n&&(t.race.srace=n),Z({orbit:s,biome:i,ptrait:c,geology:!1}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}()}),4e3),!1}return!1},flair:()=>z("tech_infusion_confirm_flair")},stabilize_blackhole:{id:"tech-stabilize_blackhole",title:z("tech_stabilize_blackhole"),desc:()=>`
          ${z("tech_stabilize_blackhole")}
          ${z("tech_stabilize_blackhole2")}
          `,category:"stellar_engine",era:"interstellar",reqs:{whitehole:1},grant:["stablized",1],cost:{Knowledge:()=>15e5,Neutronium:()=>2e4},effect:z("tech_stabilize_blackhole_effect"),action(){if(Cs($(this)[0])){if(t.interstellar.stellar_engine.mass+=2e4*Ja.Neutronium/1e10,t.interstellar.stellar_engine.mass+=40*t.interstellar.stellar_engine.exotic,t.interstellar.stellar_engine.exotic=0,delete t.tech.whitehole,t.race.banana&&t.interstellar.stellar_engine.mass>=12){let e=Xc();t.stats.banana.b3[e]=!0,"m"!==e&&"l"!==e&&(t.stats.banana.b3.l=!0)}return!0}return!1}},veil:{id:"tech-veil",title:z("tech_veil"),desc:z("tech_veil"),category:"magic",era:"interstellar",reqs:{blackhole:2},condition:()=>"magic"===t.race.universe,grant:["veil",1],cost:{Knowledge:()=>125e4},effect:z("tech_veil_effect"),action(){return!!Cs($(this)[0])}},mana_syphon:{id:"tech-mana_syphon",title:z("tech_mana_syphon"),desc:z("tech_mana_syphon"),category:"magic",era:"interstellar",reqs:{veil:1},condition:()=>"magic"===t.race.universe,grant:["veil",2],cost:{Knowledge:()=>15e5},effect:z("tech_mana_syphon_effect"),action(){return!!Cs($(this)[0])},post(){Ce("Physics")}},gravitational_waves:{id:"tech-gravitational_waves",title:z("tech_gravitational_waves"),desc:z("tech_gravitational_waves"),category:"power_generation",era:"interstellar",reqs:{blackhole:4},grant:["gravity",1],cost:{Knowledge:()=>125e4},effect:z("tech_gravitational_waves_effect"),action(){return!!Cs($(this)[0])}},gravity_convection:{id:"tech-gravity_convection",title:z("tech_gravity_convection"),desc:z("tech_gravity_convection"),category:"power_generation",era:"interstellar",reqs:{gravity:1},grant:["gravity",2],cost:{Knowledge:()=>135e4},effect:z("tech_gravity_convection_effect"),action(){return!!Cs($(this)[0])}},wormholes:{id:"tech-wormholes",title:z("tech_wormholes"),desc:z("tech_wormholes"),category:"space_exploration",era:"intergalactic",reqs:{gravity:1,science:15},grant:["stargate",1],cost:{Knowledge:()=>225e4},effect:z("tech_wormholes_effect"),action(){return!!Cs($(this)[0])}},portal:{id:"tech-portal",title:z("tech_portal"),desc:z("tech_portal_desc"),category:"hell_dimension",era:"interstellar",reqs:{wsc:1},grant:["portal",1],cost:{Knowledge:()=>5e5},effect:z("tech_portal_effect"),action(){return!!Cs($(this)[0])}},fortifications:{id:"tech-fortifications",title:z("tech_fort"),desc:z("tech_fort_desc"),category:"hell_dimension",era:"interstellar",reqs:{portal:1},grant:["portal",2],cost:{Knowledge:()=>55e4,Stone:()=>1e6},effect:z("tech_fort_effect"),action(){return!!Cs($(this)[0])&&(t.settings.showPortal=!0,t.settings.portal.fortress=!0,t.settings.msgFilters.hell.unlocked||(t.settings.msgFilters.hell.unlocked=!0,t.settings.msgFilters.hell.vis=!0),t.portal.fortress={threat:1e4,garrison:0,walls:100,repair:0,patrols:0,patrol_size:10,siege:999,notify:"Yes",s_ntfy:"Yes",nocrew:!1},t.portal.turret={count:0,on:0},t.portal.carport={count:0,damaged:0,repair:0},"demonic"===_i[t.race.species].type?eo("blood_war"):eo("pandemonium"),t.portal.observe={settings:{expanded:!1,average:!1,hyperSlow:!1,display:"game_days",dropKills:!0,dropGems:!0},stats:{total:{start:{year:t.city.calendar.year,day:t.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:t.city.calendar.year,day:t.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)},post(){Ra()}},war_drones:{id:"tech-war_drones",title:z("tech_war_drones"),desc:z("tech_war_drones"),category:"hell_dimension",era:"interstellar",reqs:{portal:2,graphene:1},grant:["portal",3],cost:{Knowledge:()=>7e5},effect:z("tech_war_drones_effect"),action(){return!!Cs($(this)[0])&&(t.settings.portal.badlands=!0,t.portal.war_drone={count:0,on:0},!0)}},demon_attractor:{id:"tech-demon_attractor",title:z("tech_demon_attractor"),desc:z("tech_demon_attractor"),category:"hell_dimension",era:"interstellar",reqs:{portal:3,stanene:1},grant:["portal",4],cost:{Knowledge:()=>745e3},effect:z("tech_demon_attractor_effect"),action(){return!!Cs($(this)[0])&&(t.portal.attractor={count:0,on:0},!0)}},combat_droids:{id:"tech-combat_droids",title:z("tech_combat_droids"),desc:z("tech_combat_droids"),category:"hell_dimension",era:"interstellar",reqs:{portal:4},grant:["portal",5],cost:{Knowledge:()=>762e3,Soul_Gem:()=>1},effect:z("tech_combat_droids_effect"),action(){return!!Cs($(this)[0])&&(t.portal.war_droid={count:0,on:0},!0)},flair:()=>z("tech_combat_droids_flair")},repair_droids:{id:"tech-repair_droids",title:z("tech_repair_droids"),desc:z("tech_repair_droids"),category:"hell_dimension",era:"interstellar",reqs:{portal:5},grant:["portal",6],cost:{Knowledge:()=>794e3,Soul_Gem:()=>1},effect:z("tech_repair_droids_effect"),action(){return!!Cs($(this)[0])&&(t.portal.repair_droid={count:0,on:0},!0)}},advanced_predators:{id:"tech-advanced_predators",title:z("tech_advanced_predators"),desc:z("tech_advanced_predators"),category:"hell_dimension",era:"intergalactic",reqs:{portal:6,xeno:4},grant:["portal",7],cost:{Knowledge:()=>5e6,Bolognium:()=>5e5,Vitreloy:()=>25e4},effect:z("tech_advanced_predators_effect"),action(){return!!Cs($(this)[0])}},enhanced_droids:{id:"tech-enhanced_droids",title:z("tech_enhanced_droids"),desc:z("tech_enhanced_droids"),category:"hell_dimension",era:"interstellar",reqs:{portal:5,military:9},grant:["hdroid",1],cost:{Knowledge:()=>105e4},effect:z("tech_enhanced_droids_effect"),action(){return!!Cs($(this)[0])}},sensor_drone:{id:"tech-sensor_drone",title:z("tech_sensor_drone"),desc:z("tech_sensor_drone"),category:"hell_dimension",era:"interstellar",reqs:{portal:3,infernite:1,stanene:1,graphene:1},grant:["infernite",2],cost:{Knowledge:()=>725e3},effect:z("tech_sensor_drone_effect"),action(){return!!Cs($(this)[0])&&(t.portal.sensor_drone={count:0,on:0},!0)}},map_terrain:{id:"tech-map_terrain",title:z("tech_map_terrain"),desc:z("tech_map_terrain"),category:"hell_dimension",era:"interstellar",reqs:{infernite:2},grant:["infernite",3],cost:{Knowledge:()=>948e3},effect:()=>z("tech_map_terrain_effect"),action(){return!!Cs($(this)[0])}},calibrated_sensors:{id:"tech-calibrated_sensors",title:z("tech_calibrated_sensors"),desc:z("tech_calibrated_sensors"),category:"hell_dimension",era:"interstellar",reqs:{infernite:3},grant:["infernite",4],cost:{Knowledge:()=>1125e3,Infernite:()=>3500},effect:()=>z("tech_calibrated_sensors_effect"),action(){return!!Cs($(this)[0])}},shield_generator:{id:"tech-shield_generator",title:z("tech_shield_generator"),desc:z("tech_shield_generator"),category:"hell_dimension",era:"intergalactic",reqs:{high_tech:14,gateway:3,infernite:4},grant:["infernite",5],cost:{Knowledge:()=>268e4,Bolognium:()=>75e3},effect:()=>z("tech_shield_generator_effect"),action(){return!!Cs($(this)[0])}},enhanced_sensors:{id:"tech-enhanced_sensors",title:z("tech_enhanced_sensors"),desc:z("tech_enhanced_sensors"),category:"hell_dimension",era:"intergalactic",reqs:{infernite:5,xeno:4},grant:["infernite",6],cost:{Knowledge:()=>475e4,Vitreloy:()=>25e3},effect:()=>z("tech_enhanced_sensors_effect"),action(){return!!Cs($(this)[0])}},xeno_linguistics:{id:"tech-xeno_linguistics",title:z("tech_xeno_linguistics"),desc:z("tech_xeno_linguistics"),category:"andromeda",era:"intergalactic",reqs:{xeno:1},grant:["xeno",2],cost:{Knowledge:()=>3e6},effect:()=>z("tech_xeno_linguistics_effect"),action(){return!!Cs($(this)[0])&&(t.settings.space.gorddon=!0,!0)}},xeno_culture:{id:"tech-xeno_culture",title:z("tech_xeno_culture"),desc:z("tech_xeno_culture"),category:"progress",era:"intergalactic",reqs:{xeno:3},grant:["xeno",4],cost:{Knowledge:()=>34e5},effect:()=>z("tech_xeno_culture_effect",[_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name,_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].entity]),action(){return!!Cs($(this)[0])&&(t.galaxy.embassy={count:0,on:0},!0)}},cultural_exchange:{id:"tech-cultural_exchange",title:z("tech_cultural_exchange"),desc:z("tech_cultural_exchange"),category:"andromeda",era:"intergalactic",reqs:{xeno:5},grant:["xeno",6],cost:{Knowledge:()=>355e4},effect:()=>z("tech_cultural_exchange_effect",[_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),action(){return!!Cs($(this)[0])&&(t.galaxy.symposium={count:0,on:0},t.galaxy.dormitory={count:0,on:0},!0)}},shore_leave:{id:"tech-shore_leave",title:z("tech_shore_leave"),desc:z("tech_shore_leave"),category:"science",era:"intergalactic",reqs:{andromeda:3,xeno:6},grant:["xeno",7],cost:{Knowledge:()=>46e5},effect:()=>z("tech_shore_leave_effect"),action(){return!!Cs($(this)[0])}},xeno_gift:{id:"tech-xeno_gift",title:z("tech_xeno_gift"),desc:z("tech_xeno_gift"),category:"andromeda",era:"intergalactic",reqs:{high_tech:16,xeno:7},grant:["xeno",8],cost:{Knowledge:()=>65e5,Infernite:()=>125e3},effect:()=>z("tech_xeno_gift_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.consulate={count:0},t.settings.space.alien1=!0,Bi(z("tech_xeno_gift_msg",[_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),"info",!1,["progress"]),!0)}},industrial_partnership:{id:"tech-industrial_partnership",title:z("tech_industrial_partnership"),desc:()=>z("tech_industrial_partnership"),category:"andromeda",era:"intergalactic",reqs:{xeno:9},grant:["xeno",10],cost:{Knowledge:()=>725e4},effect:()=>z("tech_industrial_partnership_effect",[_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),action(){return!!Cs($(this)[0])&&(t.galaxy.vitreloy_plant={count:0,on:0},!0)}},embassy_housing:{id:"tech-embassy_housing",title:z("tech_embassy_housing"),desc:()=>z("tech_embassy_housing"),category:"andromeda",era:"intergalactic",reqs:{xeno:10,science:18},grant:["xeno",11],cost:{Knowledge:()=>1075e4},effect:()=>z("tech_embassy_housing_effect",[_i[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),action(){return!!Cs($(this)[0])}},advanced_telemetry:{id:"tech-advanced_telemetry",title:z("tech_advanced_telemetry"),desc:z("tech_advanced_telemetry"),category:"science",era:"intergalactic",reqs:{xeno:5},grant:["telemetry",1],cost:{Knowledge:()=>42e5,Vitreloy:()=>1e4},effect:()=>z("tech_advanced_telemetry_effect"),action(){return!!Cs($(this)[0])}},defense_platform:{id:"tech-defense_platform",title:z("galaxy_defense_platform"),desc:z("galaxy_defense_platform"),category:"andromeda",era:"intergalactic",reqs:{stargate:5,piracy:1},grant:["stargate",6],cost:{Knowledge:()=>485e4},effect:z("tech_defense_platform_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.defense_platform={count:0,on:0},!0)}},scout_ship:{id:"tech-scout_ship",title:z("galaxy_scout_ship"),desc:z("galaxy_scout_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{gateway:3},grant:["andromeda",1],cost:{Knowledge:()=>26e5},effect:()=>z("tech_scout_ship_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.scout_ship={count:0,on:0,crew:0,mil:0},!0)}},corvette_ship:{id:"tech-corvette_ship",title:z("galaxy_corvette_ship"),desc:z("galaxy_corvette_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:1,xeno:1},grant:["andromeda",2],cost:{Knowledge:()=>32e5},effect:()=>z("tech_corvette_ship_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.corvette_ship={count:0,on:0,crew:0,mil:0},!0)}},frigate_ship:{id:"tech-frigate_ship",title:z("galaxy_frigate_ship"),desc:z("galaxy_frigate_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:2,xeno:6},grant:["andromeda",3],cost:{Knowledge:()=>4e6},effect:()=>z("tech_frigate_ship_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.frigate_ship={count:0,on:0,crew:0,mil:0},Ht(),!0)}},cruiser_ship:{id:"tech-cruiser_ship",title:z("galaxy_cruiser_ship"),desc:z("galaxy_cruiser_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:3,xeno:10},grant:["andromeda",4],cost:{Knowledge:()=>75e5},effect:()=>z("tech_cruiser_ship_effect",[_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name]),action(){return!!Cs($(this)[0])&&(t.galaxy.cruiser_ship={count:0,on:0,crew:0,mil:0},t.galaxy.foothold={count:0,on:0,support:0,s_max:0},t.settings.space.alien2=!0,Ht(),!0)}},dreadnought:{id:"tech-dreadnought",title:z("galaxy_dreadnought"),desc:z("galaxy_dreadnought"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:4,science:18},grant:["andromeda",5],cost:{Knowledge:()=>1e7},effect:()=>z("tech_dreadnought_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.dreadnought={count:0,on:0,crew:0,mil:0},Ht(),!0)}},ship_dock:{id:"tech-ship_dock",title:z("galaxy_ship_dock"),desc:z("galaxy_ship_dock"),category:"andromeda_ships",era:"intergalactic",reqs:{gateway:3,xeno:6},grant:["gateway",4],cost:{Knowledge:()=>39e5},effect:()=>z("tech_ship_dock_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.ship_dock={count:0,on:0},!0)}},ore_processor:{id:"tech-ore_processor",title:z("galaxy_ore_processor"),desc:z("galaxy_ore_processor"),category:"space_mining",era:"intergalactic",reqs:{conflict:2},grant:["conflict",3],cost:{Knowledge:()=>75e5},effect:()=>z("tech_ore_processor_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.ore_processor={count:0,on:0},!0)}},scavenger:{id:"tech-scavenger",title:z("galaxy_scavenger"),desc:z("galaxy_scavenger"),category:"science",era:"intergalactic",reqs:{conflict:3},grant:["conflict",4],cost:{Knowledge:()=>8e6},effect:()=>z("tech_scavenger_effect",[_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name]),action(){return!!Cs($(this)[0])&&(t.galaxy.scavenger={count:0,on:0,crew:0},!0)}},coordinates:{id:"tech-coordinates",title:z("tech_coordinates"),desc:z("tech_coordinates"),category:"andromeda",era:"intergalactic",reqs:{science:18,conflict:5},grant:["chthonian",1],cost:{Knowledge:()=>1e7},effect:()=>z("tech_coordinates_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.minelayer={count:0,on:0,crew:0,mil:0},t.settings.space.chthonian=!0,!0)}},chthonian_survey:{id:"tech-chthonian_survey",title:z("tech_chthonian_survey"),desc:z("tech_chthonian_survey"),category:"space_mining",era:"intergalactic",reqs:{chthonian:2},grant:["chthonian",3],cost:{Knowledge:()=>118e5},effect:()=>z("tech_chthonian_survey_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Orichalcum.display=!0,t.galaxy.excavator={count:0,on:0},t.galaxy.raider={count:0,on:0,crew:0,mil:0},Bi(z("tech_chthonian_survey_result"),"info",!1,["progress"]),!0)},post(){Ai()}},gateway_depot:{id:"tech-gateway_depot",title:z("galaxy_gateway_depot"),desc:z("galaxy_gateway_depot"),category:"storage",era:"intergalactic",reqs:{gateway:4},grant:["gateway",5],cost:{Knowledge:()=>435e4},effect:()=>z("tech_gateway_depot_effect"),action(){return!!Cs($(this)[0])&&(t.galaxy.gateway_depot={count:0,on:0},!0)}},soul_forge:{id:"tech-soul_forge",title:z("portal_soul_forge_title"),desc:z("portal_soul_forge_title"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:3},grant:["hell_pit",4],cost:{Knowledge:()=>275e4},effect:()=>z("tech_soul_forge_effect"),action(){return!!Cs($(this)[0])&&(t.portal.soul_forge={count:0,on:0,kills:0},!0)}},soul_attractor:{id:"tech-soul_attractor",title:z("portal_soul_attractor_title"),desc:z("portal_soul_attractor_title"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:4,high_tech:16},grant:["hell_pit",5],cost:{Knowledge:()=>55e5},effect:()=>z("tech_soul_attractor_effect"),action(){return!!Cs($(this)[0])&&(t.portal.soul_attractor={count:0,on:0},!0)}},soul_absorption:{id:"tech-soul_absorption",title:z("tech_soul_absorption"),desc:z("tech_soul_absorption"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:5},grant:["hell_pit",6],cost:{Knowledge:()=>6e6,Infernite:()=>25e4},effect:()=>z("tech_soul_absorption_effect"),action(){return!!Cs($(this)[0])}},soul_link:{id:"tech-soul_link",title:z("tech_soul_link"),desc:z("tech_soul_link"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:6},grant:["hell_pit",7],cost:{Knowledge:()=>75e5,Vitreloy:()=>25e4},effect:()=>z("tech_soul_link_effect"),action(){return!!Cs($(this)[0])}},gun_emplacement:{id:"tech-gun_emplacement",title:z("portal_gun_emplacement_title"),desc:z("portal_gun_emplacement_title"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:4},grant:["hell_gun",1],cost:{Knowledge:()=>3e6},effect:()=>z("tech_gun_emplacement_effect"),action(){return!!Cs($(this)[0])&&(t.portal.gun_emplacement={count:0,on:0},!0)}},advanced_emplacement:{id:"tech-advanced_emplacement",title:z("tech_advanced_emplacement"),desc:z("tech_advanced_emplacement"),category:"hell_dimension",era:"intergalactic",reqs:{hell_gun:1,high_tech:17},grant:["hell_gun",2],cost:{Knowledge:()=>125e5,Orichalcum:()=>18e4},effect:()=>z("tech_advanced_emplacement_effect"),action(){return!!Cs($(this)[0])}},dial_it_to_11:{id:"tech-dial_it_to_11",title:z("tech_dial_it_to_11"),desc:z("tech_dial_it_to_11"),category:"science",wiki:!1,era:"deep_space",reqs:{quaked:1},grant:["quaked",2],cost:{Knowledge:()=>5e5},condition:()=>!(t.race.sludge&&!t.race.cataclysm),effect(){let e=gc("cataclysm"),a="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name");return`
          ${z("tech_dial_it_to_11_effect",[ea().dwarf,t.race.cataclysm?ea().red:_i[t.race.species].home])}
          ${z("tech_dial_it_to_11_effect2")}
          ${z("star_dock_genesis_effect2",[e.plasmid,a])}
          ${z("star_dock_genesis_effect3",[e.phage])}
          `},action(){return!!Cs($(this)[0])&&($("#main").addClass("earthquake"),setTimeout((function(){$("#main").removeClass("earthquake"),function(){if(t.city.ptrait.includes("unstable")&&t.tech.quaked){P.w&&P.w.terminate(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),Vi("reset",{end:"cataclysm"}),C();let a=gc("cataclysm");t.stats.cataclysm++,zc(),t.prestige.Phage.count+=a.phage,t.stats.phage+=a.phage,"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=a.plasmid,t.stats.antiplasmid+=a.plasmid):(t.prestige.Plasmid.count+=a.plasmid,t.stats.plasmid+=a.plasmid),eo("squished",!0),eo(`extinct_${t.race.species}`),"hellscape"===t.city.biome&&"demonic"!==_i[t.race.species].type&&to("take_no_advice"),io(),eo("shaken"),t.race.cataclysm&&eo("failed_history");let r=!!t.race.hasOwnProperty("srace")&&t.race.srace,s=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0;t.race={species:t.race.species,gods:t.race.gods,old_gods:t.race.old_gods,universe:t.race.universe,seeded:!1,ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended},s>0&&(t.race.corruption=s),r&&(t.race.srace=r),Z({orbit:t.city.calendar.orbit,biome:t.city.biome,ptrait:t.city.ptrait,geology:t.city.geology}),"antimatter"===t.race.universe?t.race.weak_mastery=1:t.race.no_plasmid=1;let i=["crispr","trade","craft"];for(let e=0;ez("tech_dial_it_to_11_flair")},limit_collider:{id:"tech-limit_collider",title:z("tech_limit_collider"),desc:z("tech_limit_collider"),category:"science",wiki:!1,era:"deep_space",reqs:{quaked:1},grant:["quaked",2],cost:{Knowledge:()=>5e5},effect:()=>z("tech_limit_collider_effect"),action(){return!!Cs($(this)[0])}},mana:{id:"tech-mana",title:z("tech_mana"),desc:z("tech_mana"),category:"magic",era:"civilized",reqs:{primitive:3},grant:["magic",1],condition:()=>"magic"===t.race.universe,cost:{Knowledge:()=>25},effect:()=>z("tech_mana_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Mana.display=!0,t.resource.Crystal.display=!0,t.civic.crystal_miner.display=!0,t.race.witch_hunter&&(t.resource.Sus.display=!0),!0)},flair:z("tech_mana_flair"),post(){Ai()}},ley_lines:{id:"tech-ley_lines",title:z("tech_ley_lines"),desc:z("tech_ley_lines"),category:"magic",era:"civilized",reqs:{magic:1},grant:["magic",2],condition:()=>"magic"===t.race.universe,cost:{Knowledge:()=>40},effect:()=>z("tech_ley_lines_effect"),action(){return!!Cs($(this)[0])&&(t.tech.isolation?t.tauceti.pylon={count:0}:t.race.cataclysm||t.race.orbit_decayed?t.space.pylon={count:0}:t.city.pylon={count:0},!0)}},rituals:{id:"tech-rituals",title:z("tech_rituals"),desc:z("tech_rituals"),category:"magic",era:"civilized",reqs:{magic:2},grant:["magic",3],condition:()=>"magic"===t.race.universe,cost:{Mana:()=>25,Knowledge:()=>750,Crystal:()=>50},effect:()=>z("tech_rituals_effect"),action(){return!!Cs($(this)[0])&&(t.race.casting={farmer:0,miner:0,lumberjack:0,science:0,factory:0,army:0,hunting:0,crafting:0,total:0},t.settings.showIndustry=!0,!0)},post(){Qs()}},crafting_ritual:{id:"tech-crafting_ritual",title:z("tech_crafting_ritual"),desc:z("tech_crafting_ritual"),category:"magic",era:"discovery",reqs:{magic:3,foundry:5},grant:["magic",4],condition:()=>"magic"===t.race.universe,cost:{Mana:()=>100,Knowledge:()=>15e3,Crystal:()=>2500},effect:()=>z("tech_crafting_ritual_effect"),action(){return!!Cs($(this)[0])&&(t.race.casting.crafting=0,!0)},post(){Qs()}},mana_nexus:{id:"tech-mana_nexus",title:z("tech_mana_nexus"),desc:z("tech_mana_nexus"),category:"magic",era:"early_space",reqs:{magic:4,space:3,luna:1},grant:["magic",5],condition:()=>"magic"===t.race.universe,cost:{Mana:()=>500,Knowledge:()=>16e4,Crystal:()=>2500},effect:()=>z("tech_mana_nexus_effect"),action(){return!!Cs($(this)[0])},post(){Ce("Physics")}},clerics:{id:"tech-clerics",title:z("tech_clerics"),desc:z("tech_clerics"),category:"magic",era:"civilized",reqs:{magic:3},grant:["cleric",1],condition:()=>!!("magic"===t.race.universe&&t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display),cost:{Mana:()=>100,Knowledge:()=>2e3,Crystal:()=>100},effect:()=>z("tech_clerics_effect"),action(){return!!Cs($(this)[0])}},conjuring:{id:"tech-conjuring",title:z("tech_conjuring"),desc:z("tech_conjuring_desc"),category:"magic",era:"civilized",reqs:{magic:1},grant:["conjuring",1],not_trait:["cataclysm"],condition:()=>"magic"===t.race.universe,cost:{Mana:()=>2,Crystal:()=>5},effect:()=>z("tech_conjuring_effect"),action(){return!!Cs($(this)[0])}},res_conjuring:{id:"tech-res_conjuring",title:z("tech_res_conjuring"),desc:z("tech_res_conjuring"),category:"magic",era:"civilized",reqs:{conjuring:1},grant:["conjuring",2],not_trait:["cataclysm"],condition:()=>"magic"===t.race.universe,cost:{Mana:()=>5,Crystal:()=>10},effect:()=>z("tech_res_conjuring_effect"),action(){return!!Cs($(this)[0])}},alchemy:{id:"tech-alchemy",title:z("tech_alchemy"),desc:z("tech_alchemy"),category:"magic",era:"discovery",reqs:{magic:3,high_tech:1},grant:["alchemy",1],condition:()=>"magic"===t.race.universe,cost:{Mana:()=>100,Knowledge:()=>1e4,Crystal:()=>250},effect:()=>z("tech_alchemy_effect"),action(){return!!Cs($(this)[0])&&(t.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},t.settings.showAlchemy=!0,!0)},post(){sc($("#resources")),sr(),t.settings.tabLoad&&rr("alchemy")}},transmutation:{id:"tech-transmutation",title:z("tech_transmutation"),desc:z("tech_transmutation"),category:"magic",era:"intergalactic",reqs:{alchemy:1,high_tech:16},grant:["alchemy",2],condition:()=>"magic"===t.race.universe,cost:{Mana:()=>1250,Knowledge:()=>55e5,Crystal:()=>1e6},effect:()=>z("tech_transmutation_effect"),action(){return!!Cs($(this)[0])},post(){sc($("#resources")),sr()}},secret_society:{id:"tech-secret_society",title:z("tech_secret_society"),desc:z("tech_secret_society"),category:"magic",era:"civilized",reqs:{magic:1},grant:["roguemagic",1],condition:()=>!("magic"!==t.race.universe||!t.race.witch_hunter),cost:{Mana:()=>10,Knowledge:()=>45},effect:()=>z("tech_secret_society_effect"),action(){return!!Cs($(this)[0])}},cultists:{id:"tech-cultists",title:z("tech_cultists"),desc:z("tech_cultists"),category:"magic",era:"civilized",reqs:{roguemagic:1,cleric:1},grant:["roguemagic",2],condition:()=>!("magic"!==t.race.universe||!t.race.witch_hunter),cost:{Mana:()=>250,Knowledge:()=>2125},effect:()=>z("tech_cultists_effect"),action(){return!!Cs($(this)[0])}},conceal_ward:{id:"tech-conceal_ward",title:z("tech_conceal_ward"),desc:z("tech_conceal_ward"),category:"magic",era:"discovery",reqs:{roguemagic:2,theatre:3},grant:["roguemagic",3],condition:()=>!("magic"!==t.race.universe||!t.race.witch_hunter),cost:{Mana:()=>500,Knowledge:()=>8200,Crystal:()=>1e3},effect:()=>z("tech_conceal_ward_effect"),action(){return!!Cs($(this)[0])&&(t.city.conceal_ward={count:0},t.space.conceal_ward={count:0},!0)}},subtle_rituals:{id:"tech-subtle_rituals",title:z("tech_subtle_rituals"),desc:z("tech_subtle_rituals"),category:"magic",era:"discovery",reqs:{roguemagic:3,magic:4},grant:["roguemagic",4],condition:()=>!("magic"!==t.race.universe||!t.race.witch_hunter),cost:{Mana:()=>100,Knowledge:()=>15e3,Crystal:()=>2500},effect:()=>z("tech_subtle_rituals_effect"),action(){return!!Cs($(this)[0])}},pylon_camouflage:{id:"tech-pylon_camouflage",title:z("tech_pylon_camouflage"),desc:z("tech_pylon_camouflage"),category:"magic",era:"industrialized",reqs:{roguemagic:4,high_tech:3},grant:["roguemagic",5],condition:()=>!("magic"!==t.race.universe||!t.race.witch_hunter),cost:{Mana:()=>1e3,Knowledge:()=>3e4,Crystal:()=>3750},effect:()=>z("tech_pylon_camouflage_effect"),action(){return!!Cs($(this)[0])}},fake_tech:{id:"tech-fake_tech",title:z("tech_fake_tech"),desc:z("tech_fake_tech"),category:"magic",era:"industrialized",reqs:{roguemagic:5,high_tech:4},grant:["roguemagic",6],condition:()=>!("magic"!==t.race.universe||!t.race.witch_hunter),cost:{Mana:()=>2250,Knowledge:()=>6e4},effect:()=>z("tech_fake_tech_effect"),action(){return!!Cs($(this)[0])}},concealment:{id:"tech-concealment",title:z("tech_concealment"),desc:z("tech_concealment"),category:"magic",era:"early_space",reqs:{roguemagic:6,magic:5},grant:["roguemagic",7],condition:()=>!("magic"!==t.race.universe||!t.race.witch_hunter),cost:{Mana:()=>3e3,Knowledge:()=>185e3},effect:()=>z("tech_concealment_effect"),action(){return!!Cs($(this)[0])}},improved_concealment:{id:"tech-improved_concealment",title:z("tech_improved_concealment"),desc:z("tech_improved_concealment"),category:"magic",era:"intergalactic",reqs:{roguemagic:7,forbidden:1},grant:["roguemagic",8],condition:()=>!("magic"!==t.race.universe||!t.race.witch_hunter),cost:{Mana:()=>t.race.no_plasmid?6e3:15e3,Knowledge:()=>2e7},effect:()=>z("tech_improved_concealment_effect"),action(){return!!Cs($(this)[0])}},outerplane_summon:{id:"tech-outerplane_summon",title:z("tech_outerplane_summon"),desc:z("tech_outerplane_summon"),category:"magic",era:"dimensional",reqs:{roguemagic:8,forbidden:4,hell_spire:10,b_stone:2,waygate:3},grant:["forbidden",5],condition:()=>!("magic"!==t.race.universe||!t.race.witch_hunter),cost:{Mana:()=>t.race.no_plasmid?12e3:4e4,Knowledge:()=>6e7,Demonic_Essence:()=>1},effect:()=>z("tech_outerplane_summon_effect"),action(){return!!Cs($(this)[0])}},dark_bomb:{id:"tech-dark_bomb",title:z("tech_dark_bomb"),desc:z("tech_dark_bomb"),category:"hell_dimension",era:"dimensional",reqs:{},reqs:{hell_spire:10,b_stone:2,waygate:2,sphinx_bribe:1},condition(){let e=Xc();return!!(t.stats.spire.hasOwnProperty(e)&&t.stats.spire[e].hasOwnProperty("dlstr")&&t.stats.spire[e].dlstr>0)},grant:["dl_reset",1],cost:{Knowledge:()=>65e6,Soul_Gem:()=>5e3,Blood_Stone:()=>25,Dark:()=>1,Supply:()=>1e6},effect:()=>z("tech_dark_bomb_effect"),action(){return!!Cs($(this)[0])&&(t.portal.waygate.progress=100,t.portal.waygate.on=0,t.tech.waygate=3,t.resource.Demonic_Essence.display=!0,t.resource.Demonic_Essence.amount=1,!0)},flair:()=>z("tech_dark_bomb_flair")},bribe_sphinx:{id:"tech-bribe_sphinx",title:z("portal_sphinx_bribe"),desc:z("portal_sphinx_bribe"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:8},grant:["sphinx_bribe",1],cost:{Soul_Gem:()=>250,Supply:()=>5e5},effect:()=>z("tech_bribe_sphinx_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Codex.display=!0,t.resource.Codex.amount=1,Bi(z("tech_bribe_sphinx_msg"),"info",!1,["progress","hell"]),!0)}},alien_biotech:{id:"tech-alien_biotech",title:z("tech_alien_biotech"),desc:z("tech_alien_biotech"),category:"science",era:"solar",reqs:{genetics:8,kuiper:1},grant:["biotech",1],path:["truepath"],cost:{Knowledge:()=>24e5,Orichalcum:()=>125e3,Cipher:()=>15e3},effect:()=>z(t.race.orbit_decayed?"tech_alien_biotech_effect_alt":"tech_alien_biotech_effect"),action(){return!!Cs($(this)[0])}},zero_g_lab:{id:"tech-zero_g_lab",title:z("tech_zero_g_lab"),desc:z("tech_zero_g_lab"),category:"science",era:"solar",path:["truepath"],reqs:{high_tech:13,graphene:1,enceladus:2},grant:["enceladus",3],cost:{Knowledge:()=>9e5},effect:z("tech_zero_g_lab_effect"),action(){return!!Cs($(this)[0])&&(t.space.zero_g_lab={count:0,on:0},!0)}},operating_base:{id:"tech-operating_base",title:z("tech_operating_base"),desc:z("tech_operating_base"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{enceladus:3,triton:1},grant:["enceladus",4],cost:{Knowledge:()=>14e5},effect:()=>z("tech_operating_base_effect",[ea().enceladus]),action(){return!!Cs($(this)[0])&&(t.space.operating_base={count:0,on:0},!0)}},munitions_depot:{id:"tech-munitions_depot",title:z("tech_munitions_depot"),desc:z("tech_munitions_depot"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{enceladus:4},grant:["enceladus",5],cost:{Knowledge:()=>15e5},effect:()=>z("tech_munitions_depot_effect"),action(){return!!Cs($(this)[0])&&(t.space.munitions_depot={count:0},!0)}},fob:{id:"tech-fob",title:z("tech_fob"),desc:z("tech_fob"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{triton:1},grant:["triton",2],cost:{Knowledge:()=>145e4},effect:()=>z("tech_fob_effect",[ea().triton]),action(){return!!Cs($(this)[0])&&(t.space.fob={count:0,on:0,troops:0,enemy:0},t.space.lander={count:0,on:0},t.space.crashed_ship={count:0},!0)}},bac_tanks_tp:{id:"tech-bac_tanks_tp",title:z("tech_bac_tanks"),desc:z("tech_bac_tanks_desc"),category:"military",era:"solar",path:["truepath"],reqs:{medic:1,triton:2},grant:["medic",2],cost:{Knowledge:()=>175e4},effect:z("tech_bac_tanks_effect"),action(){return!!Cs($(this)[0])}},medkit:{id:"tech-medkit",title:z("tech_medkit"),desc:z("tech_medkit"),category:"military",era:"solar",path:["truepath"],reqs:{medic:2,outer:4},grant:["medic",3],cost:{Knowledge:()=>225e4,Quantium:()=>25e4,Cipher:()=>8e3},effect:z("tech_medkit_effect"),action(){return!!Cs($(this)[0])}},sam_site:{id:"tech-sam_site",title:z("tech_sam_site"),desc:z("tech_sam_site"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{titan:6,triton:1},grant:["titan",7],cost:{Knowledge:()=>1475e3},effect:()=>z("tech_sam_site_effect",[ea().titan]),action(){return!!Cs($(this)[0])&&(t.space.sam={count:0,on:0},!0)}},data_cracker:{id:"tech-data_cracker",title:z("tech_data_cracker"),desc:z("tech_data_cracker"),category:"science",era:"solar",path:["truepath"],reqs:{titan:7,kuiper:1},grant:["titan",8],cost:{Knowledge:()=>275e4,Cipher:()=>25e3},effect:()=>z("tech_data_cracker_effect",[t.resource.Cipher.name]),action(){return!!Cs($(this)[0])&&(t.space.decoder={count:0,on:0},!0)}},ai_core_tp:{id:"tech-ai_core_tp",title:z("tech_ai_core"),desc:z("tech_ai_core"),category:"ai_core",era:"solar",path:["truepath"],reqs:{titan:8},grant:["titan",9],cost:{Knowledge:()=>3e6,Cipher:()=>1e5},effect:z("tech_ai_core_effect"),action(){return!!Cs($(this)[0])&&(t.space.ai_core={count:0},!0)}},ai_optimizations:{id:"tech-ai_optimizations",title:z("tech_ai_optimizations"),desc:z("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:()=>375e4,Cipher:()=>75e3},effect:z("tech_ai_optimizations_effect"),action(){return!!Cs($(this)[0])},class:"synth"},synthetic_life:{id:"tech-synthetic_life",title:z("tech_synthetic_life"),desc:z("tech_synthetic_life"),category:"ai_core",era:"solar",path:["truepath"],reqs:{titan_ai_core:2},grant:["titan_ai_core",3],cost:{Knowledge:()=>4e6,Cipher:()=>75e3},effect:z("tech_synthetic_life_effect"),action(){return!!Cs($(this)[0])&&(t.space.ai_colonist={count:0,on:0},!0)},class:"synth"},protocol66:{id:"tech-protocol66",title:z("tech_protocol66"),desc:z("tech_protocol66"),category:"ai_core",era:"solar",path:["truepath"],reqs:{titan_ai_core:3,corrupted_ai:1},grant:["corrupted_ai",2],cost:{Knowledge:()=>5e6},effect:z("tech_protocol66_effect"),action(){return!!js($(this)[0])},flair:z("tech_protocol66_flair"),class:"synth"},protocol66a:{id:"tech-protocol66a",title:z("tech_protocol66"),desc:z("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:()=>5e6},effect(){let e=gc("ai"),a="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name"),r=`
          ${z("tech_protocol66a_effect_gains",[e.plasmid,a,e.phage,e.cores])}
          `;return`
          ${z("tech_protocol66a_effect")}
          ${r}`},action(){return!!Cs($(this)[0])&&(P.w&&P.w.terminate(),Ii(),$("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(){!function(){t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),C(),Vi("reset",{end:"ai apocalypse"}),eo(`extinct_${t.race.species}`),eo("obsolete"),eo("squished",!0),t.race.junker&&"junker"===t.race.species&&to("the_misery");let a=t.race.species,r=t.race.gods,s=t.city.calendar.orbit,i=t.city.biome,c=t.city.ptrait,o=t.city.geology,n=gc("ai");io(),t.stats.aiappoc++,zc(),t.prestige.Phage.count+=n.phage,t.stats.phage+=n.phage,"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=n.plasmid,t.stats.antiplasmid+=n.plasmid):(t.prestige.Plasmid.count+=n.plasmid,t.stats.plasmid+=n.plasmid),t.prestige.AICore.count+=n.cores,t.stats.cores+=n.cores;let l="synthetic"!==_i[a].type?a:t.race.hasOwnProperty("srace")?t.race.srace:a;t.stats.synth[l]=!0;let u=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0;t.race={species:"protoplasm",gods:a,old_gods:r,srace:l,universe:t.race.universe,seeded:!1,seed:Math.floor(g(1e4)),ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended},u>0&&(t.race.corruption=u),Z({orbit:s,biome:i,ptrait:c,geology:o}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}()}),4e3),!0)},flair:z("tech_protocol66a_flair"),class:"synth"},terraforming_tp:{id:"tech-terraforming_tp",title:z("tech_terraforming"),desc:z("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:()=>5e6},effect:()=>z("tech_terraforming_effect",[ea().red]),action(){return!!Cs($(this)[0])&&(t.space.terraformer={count:0},!0)}},quantium:{id:"tech-quantium",title:z("tech_quantium"),desc:z("tech_quantium"),category:"crafting",era:"solar",path:["truepath"],reqs:{supercollider:10,enceladus:3},grant:["quantium",1],cost:{Knowledge:()=>1e6,Elerium:()=>1e3,Nano_Tube:()=>1e6,Graphene:()=>1e6},effect:z("tech_quantium_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Quantium.display=!0,!0)},post(){Ai()}},anitgrav_bunk:{id:"tech-anitgrav_bunk",title:z("tech_anitgrav_bunk"),desc:z("tech_anitgrav_bunk"),category:"military",era:"solar",path:["truepath"],reqs:{marines:1,quantium:1},grant:["marines",2],cost:{Knowledge:()=>125e4,Quantium:()=>5e5},effect:()=>z("tech_anitgrav_bunk_effect",[z("space_red_space_barracks_title")]),action(){return!!Cs($(this)[0])}},higgs_boson_tp:{id:"tech-higgs_boson_tp",title:z("tech_higgs_boson"),desc:z("tech_higgs_boson"),category:"science",era:"early_space",path:["truepath"],reqs:{supercollider:2},grant:["tp_particles",1],cost:{Knowledge:()=>125e3},effect:z("tech_higgs_boson_effect"),action(){return!!Cs($(this)[0])}},long_range_probes:{id:"tech-long_range_probes",title:z("tech_long_range_probes"),desc:z("tech_long_range_probes"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{high_tech:10,elerium:1},grant:["outer",1],cost:{Knowledge:()=>4e5,Uranium:()=>2e4,Iridium:()=>25e4,Neutronium:()=>3e3,Elerium:()=>350},effect:z("tech_long_range_probes_effect"),action(){return!!Cs($(this)[0])&&(t.settings.space.titan=!0,t.settings.space.enceladus=!0,t.space.titan_spaceport={count:0,on:0,support:0,s_max:0},t.space.electrolysis={count:0,on:0,support:0,s_max:0},!0)}},strange_signal:{id:"tech-strange_signal",title:z("tech_strange_signal"),desc:z("tech_strange_signal"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:1,syard_sensor:4},grant:["outer",2],cost:{Knowledge:()=>135e4},effect:z("tech_strange_signal_effect"),action(){return!!Cs($(this)[0])&&(t.settings.space.triton=!0,!0)}},data_analysis:{id:"tech-data_analysis",title:z("tech_data_analysis"),desc:z("tech_data_analysis"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:3},grant:["outer",4],cost:{Knowledge:()=>18e5,Cipher:()=>12500},effect:z("tech_data_analysis_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_data_analysis_result"),"info",!1,["progress"]),t.space.syndicate.spc_titan+=500,t.space.syndicate.spc_enceladus+=250,t.space.syndicate.spc_triton+=1e3,!0)}},mass_relay:{id:"tech-mass_relay",title:z("tech_mass_relay"),desc:z("tech_mass_relay"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:4},grant:["outer",5],cost:{Knowledge:()=>22e5,Cipher:()=>4e4},effect:z("tech_mass_relay_effect"),action(){return!!Cs($(this)[0])&&(t.space.mass_relay={count:0},!0)}},nav_data:{id:"tech-nav_data",title:z("tech_nav_data"),desc:z("tech_nav_data"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:6},grant:["outer",7],cost:{Knowledge:()=>225e4,Cipher:()=>6e4},effect:z("tech_nav_data_effect"),action(){return!!Cs($(this)[0])&&(t.settings.space.eris=!0,t.settings.space.kuiper=!0,t.tech.eris_scan=0,t.space.drone_control={count:0,on:0,support:0,s_max:0},Bi(z("tech_nav_data_result",[ea().eris]),"info",!1,["progress"]),!0)}},sensor_logs:{id:"tech-sensor_logs",title:z("tech_sensor_logs"),desc:z("tech_sensor_logs"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:7},grant:["outer",8],cost:{Knowledge:()=>35e5,Cipher:()=>65e3},effect:z("tech_sensor_logs_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_sensor_logs_result"),"info",!1,["progress"]),!0)}},dronewar:{id:"tech-dronewar",title:z("tech_dronewar"),desc:z("tech_dronewar"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{eris:2,titan_ai_core:1},grant:["eris",3],cost:{Knowledge:()=>32e5,Cipher:()=>25e3},effect:()=>z("tech_dronewar_effect",[ea().eris]),action(){return!!Cs($(this)[0])&&(t.space.shock_trooper={count:0,on:0},t.space.digsite={count:0,enemy:1e4},!0)}},drone_tank:{id:"tech-drone_tank",title:z("tech_drone_tank"),desc:z("tech_drone_tank"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{eris:3},grant:["eris",4],cost:{Knowledge:()=>34e5,Cipher:()=>5e4},effect:z("tech_drone_tank_effect"),action(){return!!Cs($(this)[0])&&(t.space.tank={count:0,on:0},!0)}},stanene_tp:{id:"tech-stanene_tp",title:z("tech_stanene"),desc:z("tech_stanene"),category:"crafting",era:"solar",path:["truepath"],reqs:{titan:1,enceladus:1},grant:["stanene",1],cost:{Knowledge:()=>525e3,Aluminium:()=>5e5,Nano_Tube:()=>1e5},effect:z("tech_stanene_effect"),action(){return!!Cs($(this)[0])&&(t.resource.Stanene.display=!0,Bi(z("tech_stanene_avail"),"info",!1,["progress"]),!0)},post(){Qs(),Ai()}},graphene_tp:{id:"tech-graphene_tp",title:z("tech_graphene"),desc:z("tech_graphene"),category:"crafting",era:"solar",path:["truepath"],reqs:{titan:5},grant:["graphene",1],cost:{Knowledge:()=>64e4,Adamantite:()=>25e3},effect:z("tech_graphene_effect"),action(){return!!Cs($(this)[0])&&(t.space.g_factory={count:0,on:0,Lumber:0,Coal:0,Oil:0},!0)}},virtual_reality_tp:{id:"tech-virtual_reality_tp",title:z("tech_virtual_reality"),desc:z("tech_virtual_reality"),category:"progress",era:"solar",path:["truepath"],reqs:{high_tech:11,titan:4,stanene:1},grant:["high_tech",12],cost:{Knowledge:()=>616e3,Nano_Tube:()=>1e6,Stanene:()=>125e3},effect:z("tech_virtual_reality_effect"),action(){return!!Cs($(this)[0])},flair:()=>z("tech_virtual_reality_flair")},electrolysis:{id:"tech-electrolysis",title:z("tech_electrolysis"),desc:z("tech_electrolysis"),category:"power_generation",era:"solar",path:["truepath"],reqs:{titan:2,enceladus:1},grant:["titan",3],cost:{Knowledge:()=>465e3},effect:()=>z("tech_electrolysis_effect",[ea().titan,t.resource.Water.name]),action(){return!!Cs($(this)[0])&&(t.space.titan_quarters={count:0,on:0},t.space.titan_mine={count:0,on:0,ratio:90},!0)}},storehouse:{id:"tech-storehouse",title:()=>z("tech_storehouse",[ea().titan]),desc:()=>z("tech_storehouse",[ea().titan]),category:"storage",era:"solar",path:["truepath"],reqs:{titan:4},grant:["titan",5],cost:{Knowledge:()=>5e5},effect:()=>z("tech_storehouse_effect",[ea().titan]),action(){return!!Cs($(this)[0])&&(t.space.storehouse={count:0},!0)}},adamantite_vault_tp:{id:"tech-adamantite_vault_tp",title:z("tech_adamantite_vault"),desc:z("tech_adamantite_vault"),category:"banking",era:"solar",path:["truepath"],reqs:{vault:2,titan:4},grant:["vault",3],cost:{Money:()=>2e6,Knowledge:()=>56e4,Adamantite:()=>2e4},effect:z("tech_adamantite_vault_effect"),action(){return!!Cs($(this)[0])}},titan_bank:{id:"tech-titan_bank",title:()=>z("tech_titan_bank",[ea().titan]),desc:()=>z("tech_titan_bank",[ea().titan]),category:"storage",era:"solar",path:["truepath"],reqs:{titan:5},grant:["titan",6],cost:{Knowledge:()=>6e5},effect:()=>z("tech_titan_bank_effect",[ea().titan]),action(){return!!Cs($(this)[0])&&(t.space.titan_bank={count:0},!0)}},hydrogen_plant:{id:"tech-hydrogen_plant",title:z("tech_hydrogen_plant"),desc:z("tech_hydrogen_plant"),category:"power_generation",era:"solar",path:["truepath"],reqs:{titan:4,stanene:1},grant:["titan_power",1],cost:{Knowledge:()=>55e4},effect:()=>z("tech_hydrogen_plant_effect"),action(){return!!Cs($(this)[0])&&(t.space.hydrogen_plant={count:0,on:0},!0)}},water_mining:{id:"tech-water_mining",title:z("tech_water_mining"),desc:z("tech_water_mining"),category:"power_generation",era:"solar",path:["truepath"],reqs:{titan:2,enceladus:1},grant:["enceladus",2],cost:{Knowledge:()=>45e4},effect:()=>z("tech_water_mining_effect",[ea().enceladus,_i[t.race.species].home,t.resource.Water.name]),action(){return!!Cs($(this)[0])&&(t.space.water_freighter={count:0,on:0},!0)}},mercury_smelting:{id:"tech-mercury_smelting",title:z("tech_mercury_smelting"),desc:z("tech_mercury_smelting"),category:"mining",era:"solar",path:["truepath"],reqs:{hell:1,titan:4,smelting:6},grant:["m_smelting",1],cost:{Knowledge:()=>625e3,Adamantite:()=>5e4},effect:()=>z("tech_mercury_smelting_effect",[ea().hell]),action(){return!!Cs($(this)[0])&&(t.space.hell_smelter={count:0},!0)}},iridium_smelting:{id:"tech-iridium_smelting",title:z("tech_iridium_smelting"),desc:z("tech_iridium_smelting"),category:"mining",era:"solar",path:["truepath"],reqs:{m_smelting:1,graphene:1},grant:["m_smelting",2],cost:{Knowledge:()=>825e3,Graphene:()=>125e3},effect:z("tech_iridium_smelting_effect"),action(){return!!Cs($(this)[0])}},adamantite_crates:{id:"tech-adamantite_crates",title:z("tech_adamantite_crates"),desc:z("tech_adamantite_crates_desc"),category:"storage",era:"solar",path:["truepath"],reqs:{container:5,titan:4},grant:["container",6],cost:{Knowledge:()=>525e3,Adamantite:()=>12500},effect:z("tech_adamantite_crates_effect"),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},bolognium_crates_tp:{id:"tech-bolognium_crates_tp",title:()=>z("tech_crates",[t.resource.Bolognium.name]),desc:()=>z("tech_crates",[t.resource.Bolognium.name]),category:"storage",era:"tauceti",path:["truepath"],reqs:{container:7,tauceti:4},grant:["container",8],cost:{Knowledge:()=>616e4,Bolognium:()=>75e4},effect:()=>z("tech_bolognium_crates_effect",[t.resource.Bolognium.name]),action(){return!!Cs($(this)[0])}},adamantite_containers_tp:{id:"tech-adamantite_containers_tp",title:()=>z("tech_containers",[t.resource.Adamantite.name]),desc:()=>z("tech_adamantite_containers_desc",[t.resource.Adamantite.name]),category:"storage",era:"solar",path:["truepath"],reqs:{steel_container:4,titan:4},grant:["steel_container",5],cost:{Knowledge:()=>575e3,Adamantite:()=>17500},effect:()=>z("tech_adamantite_containers_effect",[t.resource.Adamantite.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},quantium_containers:{id:"tech-quantium_containers",title:()=>z("tech_containers",[t.resource.Quantium.name]),desc:()=>z("tech_containers",[t.resource.Quantium.name]),category:"storage",era:"solar",path:["truepath"],reqs:{steel_container:5,quantium:1},grant:["steel_container",6],cost:{Knowledge:()=>115e4,Quantium:()=>1e5},effect:()=>z("tech_quantium_containers_effect",[t.resource.Quantium.name]),action(){return!!Cs($(this)[0])&&(ic({el:"#createHead"},"update"),!0)}},unobtainium_containers:{id:"tech-unobtainium_containers",title:()=>z("tech_containers",[t.resource.Unobtainium.name]),desc:()=>z("tech_containers",[t.resource.Unobtainium.name]),category:"storage",era:"tauceti",path:["truepath"],reqs:{steel_container:6,tau_red:7},grant:["steel_container",7],cost:{Knowledge:()=>725e4,Unobtainium:()=>7500},effect:()=>z("tech_bolognium_containers_effect",[t.resource.Unobtainium.name]),action(){return!!Cs($(this)[0])}},reinforced_shelving:{id:"tech-reinforced_shelving",title:z("tech_reinforced_shelving"),desc:z("tech_reinforced_shelving"),category:"storage",era:"solar",path:["truepath"],reqs:{graphene:1,titan:5},grant:["shelving",1],cost:{Knowledge:()=>85e4,Adamantite:()=>35e4,Graphene:()=>25e4},effect:z("tech_reinforced_shelving_effect"),action(){return!!Cs($(this)[0])}},garage_shelving:{id:"tech-garage_shelving",title:z("tech_garage_shelving"),desc:z("tech_garage_shelving"),category:"storage",era:"solar",path:["truepath"],reqs:{shelving:1,quantium:1},grant:["shelving",2],cost:{Knowledge:()=>125e4,Quantium:()=>75e3},effect:z("tech_garage_shelving_effect"),action(){return!!Cs($(this)[0])}},warehouse_shelving:{id:"tech-warehouse_shelving",title:z("tech_warehouse_shelving"),desc:z("tech_warehouse_shelving"),category:"storage",era:"solar",path:["truepath"],reqs:{shelving:2,quantium:1,outer:4},grant:["shelving",3],cost:{Knowledge:()=>225e4,Quantium:()=>1e6,Cipher:()=>25e3},effect:z("tech_warehouse_shelving_effect"),action(){return!!Cs($(this)[0])}},elerium_extraction:{id:"tech-elerium_extraction",title:z("tech_elerium_extraction"),desc:z("tech_elerium_extraction"),category:"mining",era:"solar",path:["truepath"],reqs:{kuiper:1},grant:["kuiper",2],cost:{Knowledge:()=>25e5,Orichalcum:()=>1e5,Cipher:()=>12e3},effect:()=>z("tech_elerium_extraction_effect"),action(){return!!Cs($(this)[0])&&(t.space.elerium_mine={count:0,on:0},!0)}},orichalcum_panels_tp:{id:"tech-orichalcum_panels_tp",title:z("tech_orichalcum_panels"),desc:z("tech_orichalcum_panels"),category:"power_generation",era:"solar",path:["truepath"],reqs:{kuiper:1,swarm:5},grant:["swarm",6],cost:{Knowledge:()=>24e5,Orichalcum:()=>125e3},effect:()=>z("tech_orichalcum_panels_effect"),action(){return!!Cs($(this)[0])}},shipyard:{id:"tech-shipyard",title:()=>z("tech_shipyard",[ea().dwarf]),desc:()=>z("tech_shipyard",[ea().dwarf]),category:"space_militarization",era:"solar",path:["truepath"],reqs:{outer:1,syndicate:1},grant:["shipyard",1],cost:{Knowledge:()=>42e4},effect:()=>z("tech_shipyard_effect",[ea().dwarf]),action(){return!!Cs($(this)[0])&&(t.space.shipyard={count:0,on:0,ships:[],expand:!0,sort:!0},vt(),!0)}},ship_lasers:{id:"tech-ship_lasers",title:z("tech_ship_lasers"),desc:z("tech_ship_lasers"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{military:7,syard_weapon:1},grant:["syard_weapon",2],cost:{Knowledge:()=>425e3,Elerium:()=>500},effect:z("tech_ship_lasers_effect"),action(){return!!Cs($(this)[0])}},pulse_lasers:{id:"tech-pulse_lasers",title:z("tech_pulse_lasers"),desc:z("tech_pulse_lasers"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_weapon:2},grant:["syard_weapon",3],cost:{Knowledge:()=>5e5,Elerium:()=>750},effect:z("tech_pulse_lasers_effect"),action(){return!!Cs($(this)[0])}},ship_plasma:{id:"tech-ship_plasma",title:z("tech_ship_plasma"),desc:z("tech_ship_plasma"),category:"space_militarization",era:"solar",reqs:{high_tech:13,syard_weapon:3},grant:["syard_weapon",4],path:["truepath"],cost:{Knowledge:()=>88e4,Elerium:()=>2500},effect:z("tech_ship_plasma_effect"),action(){return!!Cs($(this)[0])}},ship_phaser:{id:"tech-ship_phaser",title:z("tech_ship_phaser"),desc:z("tech_ship_phaser"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_weapon:4,quantium:1},grant:["syard_weapon",5],cost:{Knowledge:()=>1225e3,Quantium:()=>75e3},effect:z("tech_ship_phaser_effect"),action(){return!!Cs($(this)[0])}},ship_disruptor:{id:"tech-ship_disruptor",title:z("tech_ship_disruptor"),desc:z("tech_ship_disruptor"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_weapon:5,outer:4},grant:["syard_weapon",6],cost:{Knowledge:()=>2e6,Cipher:()=>25e3},effect:z("tech_ship_disruptor_effect"),action(){return!!Cs($(this)[0])}},destroyer_ship:{id:"tech-destroyer_ship",title:z("tech_destroyer_ship"),desc:z("tech_destroyer_ship"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_class:2},grant:["syard_class",3],cost:{Knowledge:()=>465e3},effect:z("tech_destroyer_ship_effect"),action(){return!!Cs($(this)[0])}},cruiser_ship_tp:{id:"tech-cruiser_ship_tp",title:z("tech_cruiser_ship"),desc:z("tech_cruiser_ship"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_class:3,titan:4},grant:["syard_class",4],cost:{Knowledge:()=>75e4,Adamantite:()=>5e4},effect:z("tech_cruiser_ship_tp"),action(){return!!Cs($(this)[0])}},h_cruiser_ship:{id:"tech-h_cruiser_ship",title:z("tech_h_cruiser_ship"),desc:z("tech_h_cruiser_ship"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_class:4,triton:1},grant:["syard_class",5],cost:{Knowledge:()=>15e5},effect:z("tech_h_cruiser_ship_effect"),action(){return!!Cs($(this)[0])}},dreadnought_ship:{id:"tech-dreadnought_ship",title:z("tech_dreadnought_ship"),desc:z("tech_dreadnought_ship"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_class:5,kuiper:1},grant:["syard_class",6],cost:{Knowledge:()=>25e5,Cipher:()=>1e4},effect:z("tech_dreadnought_ship_effect"),action(){return!!Cs($(this)[0])}},pulse_engine:{id:"tech-pulse_engine",title:z("outer_shipyard_engine_pulse"),desc:z("outer_shipyard_engine_pulse"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_engine:2,stanene:1},grant:["syard_engine",3],cost:{Knowledge:()=>555e3,Stanene:()=>25e4},effect:z("tech_pulse_engine_effect"),action(){return!!Cs($(this)[0])}},photon_engine:{id:"tech-photon_engine",title:z("outer_shipyard_engine_photon"),desc:z("outer_shipyard_engine_photon"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_engine:3,quantium:1},grant:["syard_engine",4],cost:{Knowledge:()=>115e4,Quantium:()=>5e4},effect:z("tech_photon_engine_effect"),action(){return!!Cs($(this)[0])}},vacuum_drive:{id:"tech-vacuum_drive",title:z("outer_shipyard_engine_vacuum"),desc:z("outer_shipyard_engine_vacuum"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_engine:4,outer:4},grant:["syard_engine",5],cost:{Knowledge:()=>185e4,Cipher:()=>1e4},effect:z("outer_shipyard_engine_vacuum_desc"),action(){return!!Cs($(this)[0])}},ship_fusion:{id:"tech-ship_fusion",title:z("tech_fusion_generator"),desc:z("tech_fusion_generator"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_power:3,quantium:1},grant:["syard_power",4],cost:{Knowledge:()=>11e5,Quantium:()=>65e3},effect:z("tech_fusion_generator_effect"),action(){return!!Cs($(this)[0])}},ship_elerium:{id:"tech-ship_elerium",title:z("tech_elerium_generator"),desc:z("tech_elerium_generator"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_power:4,outer:4},grant:["syard_power",5],cost:{Knowledge:()=>19e5,Cipher:()=>18e3},effect:z("tech_elerium_generator_effect"),action(){return!!Cs($(this)[0])}},quantum_signatures:{id:"tech-quantum_signatures",title:z("tech_quantum_signatures"),desc:z("tech_quantum_signatures"),category:"progress",era:"solar",path:["truepath"],reqs:{quantium:1,syard_sensor:3},grant:["syard_sensor",4],cost:{Knowledge:()=>105e4,Quantium:()=>1e4},effect:z("tech_quantum_signatures_effect"),action(){return!!Cs($(this)[0])}},interstellar_drive:{id:"tech-interstellar_drive",title:z("tech_interstellar_drive"),desc:z("tech_interstellar_drive"),category:"progress",era:"tauceti",path:["truepath"],reqs:{outer:8,titan_ai_core:2,syard_sensor:4},grant:["tauceti",1],cost:{Knowledge:()=>45e5,Quantium:()=>25e4,Cipher:()=>75e3},effect:z("tech_interstellar_drive_effect"),action(){return!!Cs($(this)[0])}},alien_outpost:{id:"tech-alien_outpost",title:z("tech_alien_outpost"),desc:z("tech_alien_outpost"),category:"science",era:"tauceti",path:["truepath"],reqs:{tauceti:2,tau_home:3},grant:["tau_home",4],cost:{Knowledge:()=>5e6,Cipher:()=>1e5},effect:z("tech_alien_outpost_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.alien_outpost={count:1,on:0},t.tauceti.jump_gate={count:0},t.space.jump_gate={count:0},Bi(z("tech_alien_outpost_msg"),"info",!1,["progress"]),!0)}},jumpgates:{id:"tech-jumpgates",title:z("tech_jumpgates"),desc:z("tech_jumpgates"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tauceti:2,tau_home:4},grant:["tauceti",3],cost:{Knowledge:()=>6e6},effect:z("tech_jumpgates_effect"),action(){return!!Cs($(this)[0])}},system_survey:{id:"tech-system_survey",title:z("tech_system_survey"),desc:z("tech_system_survey"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tauceti:4,womling_tech:1},grant:["tauceti",5],cost:{Knowledge:()=>7e6},effect:z("tech_system_survey_effect"),action(){return!!Cs($(this)[0])&&(t.settings.tau.roid=!0,t.settings.tau.gas=!0,t.tauceti.patrol_ship={count:0,on:0,support:0,s_max:0},!0)}},repository:{id:"tech-repository",title:z("tech_repository"),desc:z("tech_repository"),category:"storage",era:"tauceti",path:["truepath"],reqs:{tauceti:4,tau_home:4},grant:["tau_home",5],cost:{Knowledge:()=>65e5},effect:z("tech_repository_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.repository={count:0},!0)}},fusion_generator:{id:"tech-fusion_generator",title:z("tech_fusion_power"),desc:z("tech_fusion_power"),category:"power_generation",era:"tauceti",path:["truepath"],reqs:{tau_home:5},grant:["tau_home",6],cost:{Knowledge:()=>675e4},effect:z("tech_tau_fusion_power_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.fusion_generator={count:0,on:0},!0)}},tau_cultivation:{id:"tech-tau_cultivation",title:z("tech_tau_cultivation"),desc:z("tech_tau_cultivation"),category:"agriculture",era:"tauceti",path:["truepath"],reqs:{tau_home:6},grant:["tau_home",7],cost:{Knowledge:()=>69e5},effect:()=>z("tech_tau_cultivation_effect",[_i[t.race.species].home]),action(){return!!Cs($(this)[0])&&(t.tauceti.tau_farm={count:0,on:0},!0)}},tau_manufacturing:{id:"tech-tau_manufacturing",title:z("tech_tau_manufacturing"),desc:z("tech_tau_manufacturing"),category:"crafting",era:"tauceti",path:["truepath"],reqs:{tau_home:7},grant:["tau_home",8],cost:{Knowledge:()=>725e4},effect:()=>z("tech_tau_manufacturing_effect",[_i[t.race.species].home]),action(){return!!Cs($(this)[0])&&(t.tauceti.tau_factory={count:0,on:0},!0)}},weasels:{id:"tech-weasels",title:z("tech_weasels"),desc:z("tech_weasels"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:2},grant:["tau_red",3],cost:{Knowledge:()=>625e4},effect:()=>z("tech_weasels_effect",[z("tau_planet",[ea().red])]),action(){return!!Cs($(this)[0])&&(Bi(z("tech_weasels_msg",[z("tau_planet",[ea().red])]),"info",!1,["progress"]),!0)}},jeff:{id:"tech-jeff",title:z("tech_jeff"),desc:z("tech_jeff"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:3},grant:["tau_red",4],cost:{Knowledge:()=>638e4},effect:()=>z("tech_jeff_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_jeff_effect_msg",[]),"info",!1,["progress"]),!0)}},womling_fun:{id:"tech-womling_fun",title:z("tech_womling_fun"),desc:z("tech_womling_fun"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:5},grant:["tau_red",6],cost:{Knowledge:()=>665e4},effect:()=>z("tech_womling_fun_effect"),action(){return!!Cs($(this)[0])}},womling_lab:{id:"tech-womling_lab",title:z("tech_womling_lab"),desc:z("tech_womling_lab"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:6},grant:["tau_red",7],cost:{Knowledge:()=>69e5},effect:()=>z("tech_womling_lab_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.womling_lab={count:0,on:0,scientist:0,tech:0},t.tech.womling_tech=0,!0)}},womling_mining:{id:"tech-womling_mining",title:z("tech_womling_mining"),desc:z("tech_womling_mining"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:1},grant:["womling_mining",1],cost:{Knowledge:()=>71e5},effect:()=>z("tech_womling_mining_effect"),action(){return!!Cs($(this)[0])}},womling_firstaid:{id:"tech-womling_firstaid",title:z("tech_womling_firstaid"),desc:z("tech_womling_firstaid"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:2},grant:["womling_firstaid",1],cost:{Knowledge:()=>735e4},effect:()=>z("tech_womling_firstaid_effect"),action(){return!!Cs($(this)[0])}},womling_logistics:{id:"tech-womling_logistics",title:z("tech_womling_logistics"),desc:z("tech_womling_logistics"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:3},grant:["womling_logistics",1],cost:{Knowledge:()=>765e4},effect:()=>z("tech_womling_logistics_effect",[z("tau_red_orbital_platform")]),action(){return!!Cs($(this)[0])}},womling_repulser:{id:"tech-womling_repulser",title:z("tech_womling_repulser"),desc:z("tech_womling_repulser"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:4,womling_logistics:1},grant:["womling_logistics",2],cost:{Knowledge:()=>79e5},effect:()=>z("tech_womling_repulser_effect",[t.resource.Oil.name,z("tau_red_orbital_platform")]),action(){return!!Cs($(this)[0])}},womling_farming:{id:"tech-womling_farming",title:z("tech_womling_farming"),desc:z("tech_womling_farming"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:5},grant:["womling_pop",1],cost:{Knowledge:()=>82e5},effect:()=>z("tech_womling_farming_effect"),action(){return!!Cs($(this)[0])}},womling_housing:{id:"tech-womling_housing",title:z("tech_womling_housing"),desc:z("tech_womling_housing"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:6,womling_pop:1},grant:["womling_pop",2],cost:{Knowledge:()=>85e5},effect:()=>z("tech_womling_housing_effect"),action(){return!!Cs($(this)[0])}},womling_support:{id:"tech-womling_support",title:z("tech_womling_support"),desc:z("tech_womling_support"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:7,tau_gas:4},grant:["womling_technicians",1],cost:{Knowledge:()=>885e4},effect:()=>`
          ${z("tech_womling_support_effect")}
          `,action(){return!!Cs($(this)[0])&&(t.tauceti.womling_station={count:0,on:0},!0)}},womling_recycling:{id:"tech-womling_recycling",title:z("tech_womling_recycling"),desc:z("tech_womling_recycling"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:8},grant:["womling_recycling",1],cost:{Knowledge:()=>955e4},effect:()=>`
          ${z("tech_womling_recycling_effect")}
          `,action(){return!!Cs($(this)[0])}},asteroid_analysis:{id:"tech-asteroid_analysis",title:z("tech_asteroid_analysis"),desc:z("tech_asteroid_analysis"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tau_roid:1},grant:["tau_roid",2],cost:{Knowledge:()=>735e4},effect:()=>z("tech_asteroid_analysis_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_asteroid_analysis_msg"),"info",!1,["progress"]),!0)}},shark_repellent:{id:"tech-shark_repellent",title:z("tech_shark_repellent"),desc:z("tech_shark_repellent"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tau_roid:2},grant:["tau_roid",3],cost:{Knowledge:()=>74e5},effect:()=>z("tech_shark_repellent_effect"),action(){return!!Cs($(this)[0])&&(Bi(z("tech_shark_repellent_msg"),"info",!1,["progress"]),!0)}},belt_mining:{id:"tech-belt_mining",title:z("tech_belt_mining"),desc:z("tech_belt_mining"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{tau_gas:3,tau_roid:3},grant:["tau_gas",4],cost:{Knowledge:()=>765e4},effect:()=>z("tech_belt_mining_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.ore_refinery={count:0,on:0,max:0,fill:0},t.tauceti.mining_ship={count:0,on:0,common:50,uncommon:50,rare:50},!0)}},adv_belt_mining:{id:"tech-adv_belt_mining",title:z("tech_adv_belt_mining"),desc:z("tech_adv_belt_mining"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{tau_roid:4},grant:["tau_roid",5],cost:{Knowledge:()=>79e5},effect:()=>z("tech_adv_belt_mining_effect"),action(){return!!Cs($(this)[0])}},space_whaling:{id:"tech-space_whaling",title:z("tech_space_whaling"),desc:z("tech_space_whaling"),category:"whaling",era:"tauceti",path:["truepath"],reqs:{tau_gas:3,tau_roid:3},grant:["tau_whale",1],cost:{Knowledge:()=>75e5},effect:()=>z("tech_space_whaling_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.whaling_station={count:0,on:0,max:0,fill:0},t.tauceti.whaling_ship={count:0,on:0},!0)}},infectious_disease_lab:{id:"tech-infectious_disease_lab",title:()=>z(t.race.artifical?"tech_infectious_disease_lab_s":"tech_infectious_disease_lab"),desc:()=>z(t.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:()=>825e4},effect:()=>z(t.race.artifical?"tech_infectious_disease_lab_effect_s":"tech_infectious_disease_lab_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.infectious_disease_lab={count:0,on:0,cure:0},!0)}},isolation_protocol:{id:"tech-isolation_protocol",title:z("tech_isolation_protocol"),desc:z("tech_isolation_protocol"),category:"plague",era:"tauceti",path:["truepath"],reqs:{disease:2},grant:["disease",3],not_trait:["lone_survivor"],cost:{Knowledge:()=>85e5},effect:()=>`
          ${z("tech_isolation_protocol_effect",[z("tab_tauceti")])}
          ${z("tech_isolation_protocol_warning")}
          `,action(){return!!Cs($(this)[0])&&(t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),t.tech.isolation=1,function(){let e={city:{},space:{},ships:[]};e.ships=[...t.space.shipyard.ships],t.space.shipyard.ships=[],t.settings.spaceTabs=6,t.settings.showSpace=!1,t.settings.showOuter=!1,t.settings.showCity=!1,t.settings.showShipYard=!1,5===t.settings.govTabs&&(t.settings.govTabs=0),_t(),sc($("#shipList")),Object.keys(Zr.city).forEach((function(a){t.city.hasOwnProperty(a)&&t.city[a].hasOwnProperty("count")&&(t.race.hooved&&Zr.city[a].cost.hasOwnProperty("Horseshoe")&&(t.race.shoecnt-=Zr.city[a].cost.Horseshoe()*t.city[a].count),e.city[a]={c:t.city[a].count},t.city[a].count=0,t.city[a].hasOwnProperty("on")&&(e.city[a].o=t.city[a].on,t.city[a].on=0))})),["spc_home","spc_moon","spc_red","spc_hell","spc_sun","spc_gas","spc_gas_moon","spc_belt","spc_dwarf","spc_titan","spc_enceladus","spc_triton","spc_kuiper","spc_eris"].forEach((function(a){Object.keys(Zr.space[a]).forEach((function(r){t.space.hasOwnProperty(r)&&t.space[r].hasOwnProperty("count")&&(t.race.hooved&&Zr.space[a][r].cost.hasOwnProperty("Horseshoe")&&(t.race.shoecnt-=Zr.space[a][r].cost.Horseshoe()*t.space[r].count),e.space[r]={c:t.space[r].count},t.space[r].count=0,t.space[r].hasOwnProperty("on")&&(e.space[r].o=t.space[r].on,t.space[r].on=0))}))})),t.race.hooved&&t.race.shoecnt<5&&(t.race.shoecnt=5),t.resource.Zen.display&&(t.resource.Zen.display=!1),t.resource.Slave.display&&(t.resource.Slave.display=!1,t.resource.Slave.amount=0,B("slave")),t.race.deconstructor&&Js.forEach((function(e){t.city.nanite_factory[e]=0})),Object.keys(t.resource).forEach((function(e){t.resource[e].hasOwnProperty("trade")&&(t.resource[e].trade=0)})),Object.keys(oa).forEach((function(e){["professor","scientist","pit_miner","cement_worker","craftsman"].includes(e)||(t.civic[e].workers=0,t.civic[e].assigned=0)})),["forager","farmer","lumberjack","quarry_worker","miner","coal_miner","priest","colonist","titan_colonist","space_miner"].forEach((function(e){t.civic[e].display=!1})),t.civic.hunter.display?t.civic.d_job="hunter":t.civic.d_job="unemployed",t.arpa.sequence&&(t.arpa.sequence.on=!1,t.arpa.sequence.boost=!1);for(let e of Object.values(t.race.purgatory.city))e.hasOwnProperty("count")&&(e.count=0),e.hasOwnProperty("on")&&(e.on=0);for(let e of Object.values(t.race.purgatory.space))e.hasOwnProperty("count")&&(e.count=0),e.hasOwnProperty("on")&&(e.on=0);if(t.queue.hasOwnProperty("queue"))for(let e=t.queue.queue.length-1;e>=0;e--){let a=t.queue.queue[e];"city"!==a.action&&"space"!==a.action&&"starDock"!==a.action||t.queue.queue.splice(e,1)}t.tech.magic&&t.tech.magic>=2&&(t.tauceti.pylon={count:0},t.race.casting&&Object.keys(t.race.casting).forEach((function(e){t.race.casting[0]=0}))),t.tauceti.tauceti_casino={count:0,on:0},t.tauceti.tau_housing={count:0};let a=c.colony*Ve.tau_home.colony.citizens();t.resource[t.race.species].amount>a&&(t.resource[t.race.species].amount=a),B("spy"),B("spyop"),sc($("#infoTimer")),t.race.inactive=e}(),!0)}},focus_cure:{id:"tech-focus_cure",title:z("tech_focus_cure"),desc:z("tech_focus_cure"),category:"plague",era:"tauceti",path:["truepath"],reqs:{disease:2},grant:["disease",3],not_trait:["lone_survivor"],cost:{Knowledge:()=>85e5},effect:()=>`
          ${z("tech_focus_cure_effect",[z("tab_tauceti")])}
          ${z("tech_focus_cure_warning")}
          `,action(){return!!Cs($(this)[0])&&(t.tech.focus_cure=1,!0)}},decode_virus:{id:"tech-decode_virus",title:z("tech_decode_virus"),desc:z("tech_decode_virus"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:1},grant:["focus_cure",2],cost:{Knowledge:()=>9e6},effect:()=>`
          ${z(t.race.artifical?"tech_decode_virus_effect_s":"tech_decode_virus_effect")}
          `,action(){return!!Cs($(this)[0])&&(t.race.artifical?Bi(z("tech_decode_virus_msg1s",[Zr.tauceti.tau_home.infectious_disease_lab.title()]),"info",!1,["progress"]):Bi(z("tech_decode_virus_msg1",[Zr.tauceti.tau_home.infectious_disease_lab.title()]),"info",!1,["progress"]),!0)}},vaccine_campaign:{id:"tech-vaccine_campaign",title:z("tech_vaccine_campaign"),desc:z("tech_vaccine_campaign"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:3},grant:["focus_cure",4],cost:{Knowledge:()=>925e4},effect:()=>`
          ${z("tech_vaccine_campaign_effect",[t.race.artifical?Zr.city.boot_camp.title():Zr.city.hospital.title])}
          `,action(){return!!Cs($(this)[0])&&(t.race.vax=0,!0)}},vax_strat1:{id:"tech-vax_strat1",title:z("tech_vax_strat1"),desc:z("tech_vax_strat1"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge:()=>95e5},effect:()=>`
          ${z("tech_vax_strat1_effect")}
          ${z("tech_vax_warning")}
          `,action(){return!!Cs($(this)[0])&&(t.tech.vax_p=1,Bi(z("tech_vax_strat1_msg"),"info",!1,["progress"]),!0)}},vax_strat2:{id:"tech-vax_strat2",title:z("tech_vax_strat2"),desc:z("tech_vax_strat2"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge:()=>95e5},effect:()=>`
          ${z("tech_vax_strat2_effect")}
          ${z("tech_vax_warning")}
          `,action(){return!!Cs($(this)[0])&&(t.tech.vax_f=1,Bi(z("tech_vax_strat2_msg"),"info",!1,["progress"]),!0)}},vax_strat3:{id:"tech-vax_strat3",title:z("tech_vax_strat3"),desc:z("tech_vax_strat3"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge:()=>95e5},effect:()=>`
          ${z("tech_vax_strat3_effect")}
          ${z("tech_vax_warning")}
          `,action(){return!!Cs($(this)[0])&&(t.tech.vax_s=1,Bi(z("tech_vax_strat3_msg"),"info",!1,["progress"]),!0)}},vax_strat4:{id:"tech-vax_strat4",title:z("tech_vax_strat4"),desc:z("tech_vax_strat4"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge:()=>95e5},effect:()=>`
          ${z("tech_vax_strat4_effect")}
          ${z("tech_vax_warning")}
          `,action(){return!!Cs($(this)[0])&&(t.tech.vax_c=1,Bi(z("tech_vax_strat4_msg"),"info",!1,["progress"]),!0)}},cloning:{id:"tech-cloning",title:z("tech_cloning"),desc:z("tech_cloning"),category:"housing",era:"tauceti",path:["truepath"],reqs:{focus_cure:7},grant:["cloning",1],cost:{Knowledge:()=>975e4},effect:()=>`
          ${z(t.race.artifical?"tech_cloning_effect_s":"tech_cloning_effect")}
          `,action(){return!!Cs($(this)[0])&&(t.tauceti.cloning_facility={count:0,on:0},!0)}},clone_degradation:{id:"tech-clone_degradation",title:z("tech_clone_degradation"),desc:z("tech_clone_degradation"),category:"progress",era:"tauceti",path:["truepath"],reqs:{cloning:1},grant:["cloning",2],cost:{Knowledge:()=>1e7},effect:()=>`
          ${z("tech_clone_degradation_effect")}
          `,action(){return!!Cs($(this)[0])&&(Bi(z("tech_clone_degradation_msg"),"info",!1,["progress"]),!0)}},digital_paradise:{id:"tech-digital_paradise",title:z("tech_digital_paradise"),desc:z("tech_digital_paradise"),category:"progress",era:"tauceti",path:["truepath"],reqs:{cloning:2},grant:["matrix",1],cost:{Knowledge:()=>105e5,Cipher:()=>2e5},effect:()=>`
          ${z("tech_digital_paradise_effect")}
          `,action(){return!!Cs($(this)[0])}},ringworld:{id:"tech-ringworld",title:z("tech_ringworld"),desc:z("tech_ringworld"),category:"progress",era:"tauceti",path:["truepath"],reqs:{matrix:1},grant:["matrix",2],cost:{Money:()=>3e9,Knowledge:()=>11e6},effect:()=>`
          ${z("tech_ringworld_effect")}
          `,action(){return!!Cs($(this)[0])&&(t.settings.tau.star=!0,t.tauceti.ringworld={count:0},!0)}},iso_gambling:{id:"tech-iso_gambling",title:z("tech_iso_gambling"),desc:z("tech_iso_gambling"),category:"banking",era:"tauceti",reqs:{gambling:4,isolation:1},grant:["iso_gambling",1],cost:{Knowledge:()=>865e4},effect:z("tech_iso_gambling_effect",[5]),action(){return!!Cs($(this)[0])}},outpost_boost:{id:"tech-outpost_boost",title:()=>z("tech_outpost_boost"),desc:()=>z("tech_outpost_boost"),category:"special",era:"tauceti",path:["truepath"],reqs:{tau_home:4,isolation:1},grant:["outpost_boost",1],cost:{Knowledge:()=>89e5},effect:()=>z("tech_outpost_boost_effect"),action(){return!!Cs($(this)[0])},flair:()=>z("tech_outpost_boost_flair")},cultural_center:{id:"tech-cultural_center",title:z("tech_cultural_center"),desc:z("tech_cultural_center"),category:"banking",era:"tauceti",path:["truepath"],reqs:{iso_gambling:1,isolation:1},grant:["tau_culture",1],cost:{Knowledge:()=>885e4},effect:z("tech_cultural_center_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.tau_cultural_center={count:0,on:0},!0)},flair:()=>z("tech_cultural_center_flair")},outer_tau_survey:{id:"tech-outer_tau_survey",title:z("tech_outer_tau_survey"),desc:z("tech_outer_tau_survey"),category:"progress",era:"tauceti",path:["truepath"],reqs:{outpost_boost:1,plague:5},grant:["tau_gas2",1],cost:{Knowledge:()=>91e5,Helium_3:()=>+Xt(5e6).toFixed(0)},effect:z("tech_outer_tau_survey_effect"),action(){return!!Cs($(this)[0])&&(t.settings.tau.gas2=!0,!0)}},alien_research:{id:"tech-alien_research",title:z("tech_alien_research"),desc:z("tech_alien_research"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tau_gas2:5},grant:["tau_gas2",6],cost:{Knowledge:()=>935e4},effect:z("tech_alien_research_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.alien_space_station.decrypted=0,t.tauceti.alien_space_station.focus=95,Bi(z("tech_alien_research_msg"),"info",!1,["progress"]),!0)}},womling_gene_therapy:{id:"tech-womling_gene_therapy",title:z("tech_womling_gene_therapy"),desc:z("tech_womling_gene_therapy"),category:"womling",era:"tauceti",path:["truepath"],reqs:{alien_data:1},grant:["womling_gene",1],cost:{Knowledge:()=>952e4},effect:z("tech_womling_gene_therapy_effect"),action(){return!!Cs($(this)[0])}},food_culture:{id:"tech-food_culture",title:()=>z("tech_food_culture",[z(`tau_gas2_alien_station_data2_r${t.race.tau_food_item||0}`)]),desc:()=>z("tech_food_culture",[z(`tau_gas2_alien_station_data2_r${t.race.tau_food_item||0}`)]),category:"banking",era:"tauceti",path:["truepath"],reqs:{alien_data:2,tau_culture:1},grant:["tau_culture",2],cost:{Knowledge:()=>941e4},effect:()=>z("tech_food_culture_effect",[z(`tau_gas2_alien_station_data2_r${t.race.tau_food_item||0}`),z("tech_cultural_center")]),action(){return!!Cs($(this)[0])}},advanced_refinery:{id:"tech-advanced_refinery",title:z("tech_advanced_refinery"),desc:z("tech_advanced_refinery"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{alien_data:3},grant:["tau_ore_mining",1],cost:{Knowledge:()=>968e4},effect:()=>z("tech_advanced_refinery_effect"),action(){return!!Cs($(this)[0])}},advanced_pit_mining:{id:"tech-advanced_pit_mining",title:z("tech_advanced_pit_mining"),desc:z("tech_advanced_pit_mining"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{alien_data:3},grant:["tau_pit_mining",1],cost:{Knowledge:()=>972e4},effect:()=>z("tech_advanced_pit_mining_effect"),action(){return!!Cs($(this)[0])}},useless_junk:{id:"tech-useless_junk",title:z("tech_useless_junk"),desc:z("tech_useless_junk"),category:"womling",era:"tauceti",path:["truepath"],reqs:{alien_data:4},grant:["tau_junksale",1],cost:{Knowledge:()=>955e4},effect:()=>z("tech_useless_junk_effect",[z(`tau_gas2_alien_station_data4_r${t.race.tau_junk_item||0}`),z("tau_red_womlings")]),action(){return!!Cs($(this)[0])}},advanced_asteroid_mining:{id:"tech-advanced_asteroid_mining",title:z("tech_advanced_asteroid_mining"),desc:z("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:()=>975e4},effect:()=>z("tech_advanced_asteroid_mining_effect",[z("tau_roid_mining_ship")]),action(){return!!Cs($(this)[0])}},advanced_material_synthesis:{id:"tech-advanced_material_synthesis",title:z("tech_advanced_material_synthesis"),desc:z("tech_advanced_material_synthesis"),category:"crafting",era:"tauceti",path:["truepath"],reqs:{alien_data:5,disease:1},grant:["alien_crafting",1],cost:{Knowledge:()=>988e4},effect:()=>z("tech_advanced_material_synthesis_effect",[t.resource.Quantium.name]),action(){return!!Cs($(this)[0])}},matrioshka_brain:{id:"tech-matrioshka_brain",title:z("tech_matrioshka_brain"),desc:z("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:()=>1e7},effect:()=>z("tech_matrioshka_brain_effect",[Zr.tauceti.tau_gas2.info.name()]),action(){return!!Cs($(this)[0])&&(t.tauceti.matrioshka_brain={count:0},!0)}},ignition_device:{id:"tech-ignition_device",title:z("tech_ignition_device"),desc:z("tech_ignition_device"),category:"progress",era:"tauceti",path:["truepath"],reqs:{alien_data:6,tau_gas2:7},grant:["tau_gas2",8],cost:{Knowledge:()=>105e5},effect:()=>z("tech_ignition_device_effect",[Zr.tauceti.tau_gas2.info.name()]),action(){return!!Cs($(this)[0])&&(t.tauceti.ignition_device={count:0},t.tauceti.hasOwnProperty("matrioshka_brain")||(t.tauceti.matrioshka_brain={count:0}),!0)}},replicator:{id:"tech-replicator",title:()=>"antimatter"===t.race.universe?z("tech_antireplicator"):z("tech_replicator"),desc:()=>"antimatter"===t.race.universe?z("tech_antireplicator"):z("tech_replicator"),category:"special",era:"tauceti",path:["truepath"],reqs:{tau_home:4,isolation:1},trait:["lone_survivor"],grant:["replicator",1],cost:{Knowledge:()=>625e4},effect:()=>"antimatter"===t.race.universe?z("tech_antireplicator_effect"):z("tech_replicator_effect"),action(){return!!Cs($(this)[0])&&(t.race.replicator={res:"Unobtainium",pow:1},!0)}},womling_unlock:{id:"tech-womling_unlock",title:z("tech_womling_unlock"),desc:z("tech_womling_unlock"),category:"womling",era:"tauceti",path:["truepath"],reqs:{replicator:1},trait:["lone_survivor"],grant:["tau_red",4],cost:{Knowledge:()=>65e5},effect:()=>z("tech_womling_unlock_effect",[z("tau_planet",[ea().red])]),action(){return!!Cs($(this)[0])&&(t.settings.tau.red=!0,t.tauceti.orbital_platform.count=1,t.tauceti.orbital_platform.on=1,!0)}},garden_of_eden:{id:"tech-garden_of_eden",title:z("tech_garden_of_eden"),desc:z("tech_garden_of_eden"),category:"special",era:"tauceti",path:["truepath"],reqs:{eden:1},grant:["eden",2],cost:{Knowledge:()=>1e7},effect:()=>z("tech_garden_of_eden_effect"),action(){return!!Cs($(this)[0])&&(t.tauceti.goe_facility={count:0},!0)}}};function Ur(){t.tech.world_control=1,sc($("#garrison")),sc($("#c_garrison")),ve($("#garrison"),!0),ve($("#c_garrison"),!1);for(let e=0;e<3;e++){if(t.civic.foreign[`gov${e}`].occ){let a=ua("federation"===t.civic.govern.type?15:20);t.civic.garrison.max+=a,t.civic.garrison.workers+=a,t.civic.foreign[`gov${e}`].occ=!1}t.civic.foreign[`gov${e}`].buy=!1,t.civic.foreign[`gov${e}`].anx=!1,t.civic.foreign[`gov${e}`].sab=0,t.civic.foreign[`gov${e}`].act="none"}B("spy"),B("spyop")}function Wr(e,a){let r=["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ín","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 r;let s=(t.stats.hasOwnProperty("reset")?t.stats.reset:0)%r.length;return e?z(`cheese_${r[s]}`):z("tech_swiss_bank",[z(`cheese_${r[s]}`)])}const Qr={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"]},Zr={evolution:{rna:{id:"evolution-rna",title:z("resource_RNA_name"),desc:()=>z("evo_rna",[t.race.rapid_mutation?2:1]),condition:()=>t.resource.hasOwnProperty("RNA")&&t.resource.RNA.display&&!t.race.evoFinalMenu,action:()=>(t.resource.RNA.amount0},dna:{id:"evolution-dna",title:z("evo_dna_title"),desc:z("evo_dna_desc"),condition:()=>t.resource.hasOwnProperty("DNA")&&t.resource.DNA.display&&!t.race.evoFinalMenu,cost:{RNA:()=>2},action:()=>(t.resource.RNA.amount>=2&&t.resource.DNA.amount0},membrane:{id:"evolution-membrane",title:z("evo_membrane_title"),desc:z("evo_membrane_desc"),condition:()=>t.evolution.hasOwnProperty("membrane")&&!t.race.evoFinalMenu,cost:{RNA:e=>cs("membrane",2,2,e)},effect:()=>z("evo_membrane_effect",[t.evolution.mitochondria?5*t.evolution.mitochondria.count+5:5]),action(){return!!Cs($(this)[0])&&(t.resource.RNA.max+=t.evolution.mitochondria?5*t.evolution.mitochondria.count+5:5,t.evolution.membrane.count++,!0)}},organelles:{id:"evolution-organelles",title:z("evo_organelles_title"),desc:z("evo_organelles_desc"),condition:()=>t.evolution.hasOwnProperty("organelles")&&!t.race.evoFinalMenu,cost:{RNA:e=>cs("organelles",12,8,e),DNA:e=>cs("organelles",4,4,e)},effect(){let e=t.race.rapid_mutation?2:1;return t.tech.evo&&t.tech.evo>=2&&e++,z("evo_organelles_effect",[e])},action(){return!!Cs($(this)[0])&&(t.evolution.organelles.count++,!0)}},nucleus:{id:"evolution-nucleus",title:z("evo_nucleus_title"),desc:z("evo_nucleus_desc"),condition:()=>t.evolution.hasOwnProperty("nucleus")&&!t.race.evoFinalMenu,cost:{RNA:e=>cs("nucleus",38,t.tech.evo&&t.tech.evo>=4?16:32,e),DNA:e=>cs("nucleus",18,t.tech.evo&&t.tech.evo>=4?12:16,e)},effect:()=>z("evo_nucleus_effect",[t.tech.evo&&t.tech.evo>=5?2:1]),action(){return!!Cs($(this)[0])&&(t.evolution.nucleus.count++,!0)}},eukaryotic_cell:{id:"evolution-eukaryotic_cell",title:z("evo_eukaryotic_title"),desc:z("evo_eukaryotic_desc"),condition:()=>t.evolution.hasOwnProperty("eukaryotic_cell")&&!t.race.evoFinalMenu,cost:{RNA:e=>cs("eukaryotic_cell",20,20,e),DNA:e=>cs("eukaryotic_cell",40,12,e)},effect:()=>z("evo_eukaryotic_effect",[t.evolution.mitochondria?10*t.evolution.mitochondria.count+10:10]),action(){return!!Cs($(this)[0])&&(t.evolution.eukaryotic_cell.count++,t.resource.DNA.max+=t.evolution.mitochondria?10*t.evolution.mitochondria.count+10:10,!0)}},mitochondria:{id:"evolution-mitochondria",title:z("evo_mitochondria_title"),desc:z("evo_mitochondria_desc"),condition:()=>t.evolution.hasOwnProperty("mitochondria")&&!t.race.evoFinalMenu,cost:{RNA:e=>cs("mitochondria",75,50,e),DNA:e=>cs("mitochondria",65,35,e)},effect:z("evo_mitochondria_effect"),action(){return!!Cs($(this)[0])&&(t.evolution.mitochondria.count++,!0)}},sexual_reproduction:{id:"evolution-sexual_reproduction",title:z("evo_sexual_reproduction_title"),desc:z("evo_sexual_reproduction_desc"),reqs:{evo:1},grant:["evo",2],condition:()=>t.tech.evo&&1===t.tech.evo,cost:{DNA:()=>150},effect:z("evo_sexual_reproduction_effect"),action(){return!!Cs($(this)[0])&&(t.evolution.final=20,!0)},queue_complete:()=>t.tech.evo&&1===t.tech.evo?1:0},phagocytosis:{id:"evolution-phagocytosis",title:z("evo_phagocytosis_title"),desc:z("evo_phagocytosis_desc"),reqs:{evo:2},grant:["evo",3],condition:()=>t.tech.evo&&2===t.tech.evo,cost:{DNA:()=>175},effect:z("evo_phagocytosis_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_animal=1,t.evolution.final=40,!0)},queue_complete:()=>t.tech.evo&&2===t.tech.evo?1:0},chloroplasts:{id:"evolution-chloroplasts",title:()=>t.evolution.gselect?z("genelab_genus_plant"):z("evo_chloroplasts_title"),desc:z("evo_chloroplasts_desc"),reqs:{evo:2},grant:["evo",3],condition:()=>Yr(2),cost:{DNA:()=>175},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
          ${z("evo_chloroplasts_effect")}
          ${z("evo_warn_unwise")}
          `:z("evo_chloroplasts_effect"),action(){return!!Cs($(this)[0])&&(t.evolution.gselect?(t.tech.evo=7,t.tech.evo_plant=2,t.evolution.final=100):(t.tech.evo_plant=1,t.evolution.final=40),!0)},queue_complete:()=>t.tech.evo&&2===t.tech.evo?1:0,emblem:()=>Oc("genus_plant")},chitin:{id:"evolution-chitin",title:()=>t.evolution.gselect?z("genelab_genus_fungi"):z("evo_chitin_title"),desc:z("evo_chitin_desc"),reqs:{evo:2},grant:["evo",3],condition:()=>Yr(2),cost:{DNA:()=>175},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
          ${z("evo_chitin_effect")}
          ${z("evo_warn_unwise")}
          `:z("evo_chitin_effect"),action(){return!!Cs($(this)[0])&&(t.evolution.gselect?(t.tech.evo=7,t.tech.evo_fungi=2,t.evolution.final=100):(t.tech.evo_fungi=1,t.evolution.final=40),!0)},queue_complete:()=>t.tech.evo&&2===t.tech.evo?1:0,emblem:()=>Oc("genus_fungi")},exterminate:{id:"evolution-exterminate",title:()=>t.evolution.gselect?z("genelab_genus_synthetic"):z("evo_exterminate_title"),desc:z("evo_exterminate_desc"),reqs:{evo:2},grant:["evo",7],condition:()=>Yr(2)&&t.stats.achieve.obsolete&&t.stats.achieve.obsolete.l>=5,cost:{DNA:()=>200},effect:()=>z("evo_exterminate_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_synthetic=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&2===t.tech.evo?1:0,emblem:()=>Oc("genus_synthetic")},multicellular:{id:"evolution-multicellular",title:z("evo_multicellular_title"),desc:z("evo_multicellular_desc"),reqs:{evo:3},grant:["evo",4],condition:()=>t.tech.evo&&3===t.tech.evo,cost:{DNA:()=>200},effect:z("evo_multicellular_effect"),action(){return!!Cs($(this)[0])&&(t.evolution.final=60,!0)},queue_complete:()=>t.tech.evo&&3===t.tech.evo?1:0},spores:{id:"evolution-spores",title:z("evo_spores_title"),desc:z("evo_spores_desc"),reqs:{evo:4,evo_fungi:1},grant:["evo",5],condition:()=>t.tech.evo&&4===t.tech.evo,cost:{DNA:()=>230},effect:z("evo_nucleus_boost"),action(){return!!Cs($(this)[0])&&(t.evolution.final=80,!0)},queue_complete:()=>t.tech.evo&&4===t.tech.evo?1:0},poikilohydric:{id:"evolution-poikilohydric",title:z("evo_poikilohydric_title"),desc:z("evo_poikilohydric_desc"),reqs:{evo:4,evo_plant:1},grant:["evo",5],condition:()=>t.tech.evo&&4===t.tech.evo,cost:{DNA:()=>230},effect:z("evo_nucleus_boost"),action(){return!!Cs($(this)[0])&&(t.evolution.final=80,!0)},queue_complete:()=>t.tech.evo&&4===t.tech.evo?1:0},bilateral_symmetry:{id:"evolution-bilateral_symmetry",title:z("evo_bilateral_symmetry_title"),desc:z("evo_bilateral_symmetry_desc"),reqs:{evo:4,evo_animal:1},grant:["evo",5],condition:()=>t.tech.evo&&4===t.tech.evo,cost:{DNA:()=>230},effect:z("evo_nucleus_boost"),action(){return!!Cs($(this)[0])&&(t.evolution.final=80,t.tech.evo_insectoid=1,t.tech.evo_mammals=1,t.tech.evo_eggshell=1,t.tech.evo_eldritch=1,t.tech.evo_aquatic=1,t.tech.evo_fey=1,t.tech.evo_sand=1,t.tech.evo_heat=1,t.tech.evo_polar=1,!0)},queue_complete:()=>t.tech.evo&&4===t.tech.evo?1:0},bryophyte:{id:"evolution-bryophyte",title:z("evo_bryophyte_title"),desc:z("evo_bryophyte_desc"),reqs:{evo:5},grant:["evo",7],condition:()=>!(!t.tech.evo_plant&&!t.tech.evo_fungi)&&Yr(5),cost:{DNA:()=>260},effect:z("evo_bryophyte_effect"),action(){return!!Cs($(this)[0])&&(t.evolution.final=100,t.tech.evo_fungi&&(t.tech.evo_fungi=2),t.tech.evo_plant&&(t.tech.evo_plant=2),!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0},athropods:{id:"evolution-athropods",title:z("evo_athropods_title"),desc:z("evo_athropods_desc"),reqs:{evo:5,evo_insectoid:1},grant:["evo",7],condition:()=>Yr(5),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
          ${z("evo_athropods_effect")}
          ${z("evo_warn_unwise")}
          `:z("evo_athropods_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_insectoid=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Oc("genus_insectoid")},mammals:{id:"evolution-mammals",title:z("evo_mammals_title"),desc:z("evo_mammals_desc"),reqs:{evo:5,evo_mammals:1},grant:["evo",6],condition:()=>t.tech.evo&&5===t.tech.evo,cost:{DNA:()=>245},effect:z("evo_mammals_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_humanoid=1,t.tech.evo_giant=1,t.tech.evo_small=1,t.tech.evo_animalism=1,t.tech.evo_demonic=1,t.tech.evo_angelic=1,t.evolution.final=90,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0},humanoid:{id:"evolution-humanoid",title:z("evo_humanoid_title"),desc:z("evo_humanoid_desc"),reqs:{evo:6,evo_humanoid:1},grant:["evo",7],condition:()=>Yr(6),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
          ${z("evo_humanoid_effect")}
          ${z("evo_warn_unwise")}
          `:z("evo_humanoid_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_humanoid=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Oc("genus_humanoid")},gigantism:{id:"evolution-gigantism",title:z("evo_gigantism_title"),desc:z("evo_gigantism_desc"),reqs:{evo:6,evo_giant:1},grant:["evo",7],condition:()=>Yr(6),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
          ${z("evo_gigantism_effect")}
          ${z("evo_warn_unwise")}
          `:z("evo_gigantism_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_giant=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Oc("genus_giant")},dwarfism:{id:"evolution-dwarfism",title:z("evo_dwarfism_title"),desc:z("evo_dwarfism_desc"),reqs:{evo:6,evo_small:1},grant:["evo",7],condition:()=>Yr(6),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
          ${z("evo_dwarfism_effect")}
          ${z("evo_warn_unwise")}
          `:z("evo_dwarfism_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_small=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Oc("genus_small")},animalism:{id:"evolution-animalism",title:z("evo_animalism_title"),desc:z("evo_animalism_desc"),reqs:{evo:6,evo_animalism:1},grant:["evo",7],condition:()=>Yr(6)&&t.tech.evo_animalism&&1===t.tech.evo_animalism,cost:{DNA:()=>250},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
          ${z("evo_animalism_effect")}
          ${z("evo_warn_unwise")}
          `:z("evo_animalism_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_animalism=2,t.evolution.final=95,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo&&1===t.tech.evo_animalism?1:0},carnivore:{id:"evolution-carnivore",title:z("evo_carnivore_title"),desc:z("evo_carnivore_desc"),reqs:{evo_animalism:2},grant:["evo_animalism",3],condition:()=>Yr(7)&&t.tech.evo_animalism&&2===t.tech.evo_animalism,cost:{DNA:()=>255},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
          ${z("evo_carnivore_effect")}
          ${z("evo_warn_unwise")}
          `:z("evo_carnivore_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo=7,t.tech.evo_carnivore=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&7===t.tech.evo&&2===t.tech.evo_animalism?1:0,emblem:()=>Oc("genus_carnivore")},herbivore:{id:"evolution-herbivore",title:z("evo_herbivore_title"),desc:z("evo_herbivore_desc"),reqs:{evo_animalism:2},grant:["evo_animalism",3],condition:()=>Yr(7)&&t.tech.evo_animalism&&2===t.tech.evo_animalism,cost:{DNA:()=>255},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
          ${z("evo_herbivore_effect")}
          ${z("evo_warn_unwise")}
          `:z("evo_herbivore_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo=7,t.tech.evo_herbivore=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&7===t.tech.evo&&2===t.tech.evo_animalism?1:0,emblem:()=>Oc("genus_herbivore")},omnivore:{id:"evolution-omnivore",title:z("evo_omnivore_title"),desc:z("evo_omnivore_desc"),reqs:{evo_animalism:2,locked:1},grant:["evo_animalism",3],condition:()=>Yr(7)&&t.tech.evo_animalism&&2===t.tech.evo_animalism,cost:{DNA:()=>255},wiki:!1,effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
          ${z("evo_omnivore_effect")}
          ${z("evo_warn_unwise")}
          `:z("evo_omnivore_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_omnivore=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&7===t.tech.evo&&2===t.tech.evo_animalism?1:0,emblem:()=>Oc("genus_omnivore")},celestial:{id:"evolution-celestial",title:z("evo_celestial_title"),desc:z("evo_celestial_desc"),reqs:{evo:6,evo_angelic:1},grant:["evo",7],condition:()=>!!("eden"===t.city.biome||t.blood.unbound&&t.blood.unbound>=3)&&Yr(6),cost:{DNA:()=>260},effect:()=>z("evo_celestial_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_angelic=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Oc("genus_angelic")},demonic:{id:"evolution-demonic",title:z("evo_demonic_title"),desc:z("evo_demonic_desc"),reqs:{evo:6,evo_demonic:1},grant:["evo",7],condition:()=>!!("hellscape"===t.city.biome||t.blood.unbound&&t.blood.unbound>=3)&&Yr(6),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"===t.race.universe?`
          ${z("evo_demonic_effect")}
          ${z("evo_warn_unwise")}
          `:z("evo_demonic_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_demonic=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Oc("genus_demonic")},eldritch:{id:"evolution-eldritch",title:z("evo_eldritch_title"),desc:z("evo_eldritch_desc"),reqs:{evo:5,evo_eldritch:1},grant:["evo",7],condition:()=>!(!t.stats.achieve.nightmare||!t.stats.achieve.nightmare.mg)&&Yr(5),cost:{DNA:()=>260},effect:z("evo_eldritch_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_eldritch=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Oc("genus_eldritch")},aquatic:{id:"evolution-aquatic",title:z("evo_aquatic_title"),desc:z("evo_aquatic_desc"),reqs:{evo:5,evo_aquatic:1},grant:["evo",7],condition:()=>!(!["oceanic","swamp"].includes(t.city.biome)&&!t.blood.unbound)&&Yr(5),cost:{DNA:()=>260},effect:z("evo_aquatic_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_aquatic=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Oc("genus_aquatic")},fey:{id:"evolution-fey",title:z("evo_fey_title"),desc:z("evo_fey_desc"),reqs:{evo:5,evo_fey:1},grant:["evo",7],condition:()=>!(!["forest","swamp","taiga"].includes(t.city.biome)&&!t.blood.unbound)&&Yr(5),cost:{DNA:()=>260},effect:z("evo_fey_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_fey=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Oc("genus_fey")},heat:{id:"evolution-heat",title:z("evo_heat_title"),desc:z("evo_heat_desc"),reqs:{evo:5,evo_heat:1},grant:["evo",7],condition:()=>!(!["volcanic","ashland"].includes(t.city.biome)&&!t.blood.unbound)&&Yr(5),cost:{DNA:()=>260},effect:z("evo_heat_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_heat=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Oc("genus_heat")},polar:{id:"evolution-polar",title:z("evo_polar_title"),desc:z("evo_polar_desc"),reqs:{evo:5,evo_polar:1},grant:["evo",7],condition:()=>!(!["tundra","taiga"].includes(t.city.biome)&&!t.blood.unbound)&&Yr(5),cost:{DNA:()=>260},effect:z("evo_polar_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_polar=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Oc("genus_polar")},sand:{id:"evolution-sand",title:z("evo_sand_title"),desc:z("evo_sand_desc"),reqs:{evo:5,evo_sand:1},grant:["evo",7],condition:()=>!(!["desert","ashland"].includes(t.city.biome)&&!t.blood.unbound)&&Yr(5),cost:{DNA:()=>260},effect:z("evo_sand_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_sand=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Oc("genus_sand")},eggshell:{id:"evolution-eggshell",title:z("evo_eggshell_title"),desc:z("evo_eggshell_desc"),reqs:{evo:5,evo_eggshell:1},grant:["evo",6],condition:()=>t.tech.evo&&5===t.tech.evo&&!t.evolution.gselect,cost:{DNA:()=>245},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
          ${z("evo_eggshell_effect")}
          ${z("evo_warn_unwise")}
          `:z("evo_eggshell_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_eggshell=2,t.evolution.final=90,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0},endothermic:{id:"evolution-endothermic",title:()=>t.evolution.gselect?z("genelab_genus_avian"):z("evo_endothermic_title"),desc:z("evo_endothermic_desc"),reqs:{evo:6,evo_eggshell:2},grant:["evo",7],condition:()=>Yr(6),cost:{DNA:()=>260},effect:z("evo_endothermic_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_avian=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Oc("genus_avian")},ectothermic:{id:"evolution-ectothermic",title:()=>t.evolution.gselect?z("genelab_genus_reptilian"):z("evo_ectothermic_title"),desc:z("evo_ectothermic_desc"),reqs:{evo:6,evo_eggshell:2},grant:["evo",7],condition:()=>Yr(6),cost:{DNA:()=>260},effect:z("evo_ectothermic_effect"),action(){return!!Cs($(this)[0])&&(t.tech.evo_reptilian=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Oc("genus_reptilian")},sentience:{id:"evolution-sentience",title:z("evo_sentience_title"),desc:z("evo_sentience_desc"),reqs:{evo:7},grant:["evo",8],condition:()=>t.tech.evo&&7===t.tech.evo&&100===t.evolution.final,cost:{RNA:()=>300,DNA:()=>300},effect:()=>t.evolution.exterminate?z("evo_sentience_ai_effect"):z("evo_sentience_effect"),action(){if(Cs($(this)[0])){let e=[],a="humanoid";for(let e in ui)if(t.tech[`evo_${e}`]&&t.tech[`evo_${e}`]>=2){a=e;break}if(t.race.junker||t.race.sludge){let r=t.race.sludge?"sludge":"junker";t.race.jtype=a,e.push(r)}else for(let t in Xr){let r=Xr[t];_i[r].type===a&&e.push(r)}t.race.species=e[Math.floor(g(0,e.length))],t.stats.achieve[`extinct_${t.race.species}`]&&t.stats.achieve[`extinct_${t.race.species}`].l>=1&&(t.race.species=e[Math.floor(g(0,e.length))]),Ns()}return!1},emblem(){for(let e in Xr){let a=Xr[e];if(t.tech[`evo_${_i[a].type}`]&&t.tech[`evo_${_i[a].type}`]>=2)return Oc(`genus_${_i[a].type}`)}return""},queue_complete:()=>t.tech.evo&&7===t.tech.evo?1:0}},city:{gift:{id:"city-gift",title:z("city_gift"),desc:z("city_gift_desc"),wiki:!1,category:"outskirts",reqs:{primitive:1},queue_complete:()=>0,not_tech:["santa"],not_trait:["cataclysm","lone_survivor"],class:["hgift"],condition(){const e=new Date;if(11!==e.getMonth()||11===e.getMonth()&&(e.getDate()<=16||e.getDate()>=25)){let e=!1;return t.special&&t.special.gift&&Object.keys(t.special.gift).forEach((function(a){t.special.gift[a]&&(e=!0)})),e}return!1},count(){let e=0;return t.special&&t.special.gift&&Object.keys(t.special.gift).forEach((function(a){t.special.gift[a]&&e++})),e},action(){if(!t.settings.pause){const e=new Date;let a=!1;if(t.special&&t.special.gift&&Object.keys(t.special.gift).forEach((function(e){t.special.gift[e]&&(a=e)})),11!==e.getMonth()||11===e.getMonth()&&(e.getDate()<=16||e.getDate()>=25))if("g2019"===a)t.special&&t.special.gift&&(delete t.special.gift[a],"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=100,t.stats.antiplasmid+=100,Bi(z("city_gift_msg",[100,z("arpa_genepool_effect_antiplasmid")]),"info",!1,["events"])):(t.prestige.Plasmid.count+=100,t.stats.plasmid+=100,Bi(z("city_gift_msg",[100,z("arpa_genepool_effect_plasmid")]),"info",!1,["events"])),ms());else if(t.special&&t.special.gift){delete t.special.gift[a];let e=100+(t.stats.hasOwnProperty("reset")?t.stats.reset:0)+(t.stats.hasOwnProperty("mad")?t.stats.mad:0),r=(t.stats.hasOwnProperty("bioseed")?t.stats.bioseed:0)+(t.stats.hasOwnProperty("cataclysm")?t.stats.cataclysm:0),s=[];if(t.stats.died+t.stats.tdied>0){let e=t.stats.died+t.stats.tdied;t.resource.Coal.amount+=e,s.push(`${e.toLocaleString()} ${z("resource_Coal_name")}`)}if("antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=e,t.stats.antiplasmid+=e,s.push(`${e.toLocaleString()} ${z("resource_AntiPlasmid_plural_name")}`)):(t.prestige.Plasmid.count+=e,t.stats.plasmid+=e,s.push(`${e.toLocaleString()} ${z("resource_Plasmid_plural_name")}`)),r>0&&(t.prestige.Phage.count+=r,t.stats.phage+=r,s.push(`${r.toLocaleString()} ${z("resource_Phage_name")}`)),t.stats.hasOwnProperty("achieve")){let e=t.stats.achieve.whitehole?t.stats.achieve.whitehole.l:0;e+=t.stats.achieve.heavy?t.stats.achieve.heavy.l:0,e+=t.stats.achieve.canceled?t.stats.achieve.canceled.l:0,e+=t.stats.achieve.eviltwin?t.stats.achieve.eviltwin.l:0,e+=t.stats.achieve.microbang?t.stats.achieve.microbang.l:0,e+=t.stats.achieve.pw_apocalypse?t.stats.achieve.pw_apocalypse.l:0;let r=t.stats.achieve.ascended?t.stats.achieve.ascended.l:0,i=t.stats.achieve.corrupted?t.stats.achieve.corrupted.l:0,c=t.stats.achieve.obsolete?t.stats.achieve.obsolete.l:0;if(e>30&&(e=30),r>5&&(r=5),i>5&&(i=5),e>0){let a=+(e/7.5).toFixed(2);t.prestige.Dark.count+=a,t.stats.dark+=a,s.push(`${a} ${z("resource_Dark_name")}`)}if(r>0&&(t.prestige.Harmony.count+=r,t.stats.harmony+=r,s.push(`${r} ${z("resource_Harmony_name")}`)),i>0){let e=5*i,a=i;t.prestige.Blood_Stone.count+=e,t.stats.blood+=e,t.prestige.Artifact.count+=a,t.stats.artifact+=a,s.push(`${e} ${z("resource_Blood_Stone_name")}`),s.push(`${a} ${z("resource_Artifact_name")}`)}"g2020"!==a&&c>0&&(t.prestige.AICore.count+=c,t.stats.cores+=c,s.push(`${c} ${z("resource_AICore_name")}`))}Bi(z("city_gift2_msg",[s.join(", ")]),"info",!1,["events"]),ms()}}return!1},touchlabel:z("open")},food:{id:"city-food",title:()=>Kc().active?t.tech.conjuring?z("city_trick_conjure"):z("city_trick"):t.tech.conjuring?z("city_food_conjure"):z("city_food"),desc(){let e=$(this)[0].val(!1);return Kc().active?t.tech.conjuring?z("city_trick_conjure_desc",[e]):z("city_trick_desc",[e]):t.tech.conjuring?z("city_food_conjure_desc",[e]):z("city_food_desc",[e])},category:"outskirts",reqs:{primitive:1},not_trait:["soul_eater","cataclysm","artifical"],queue_complete:()=>0,cost:{Mana:()=>t.tech.conjuring?1:0},action(){return t.settings.pause||(t.resource.Food.amount=1&&(a*=10,t.resource.Food.amountKc().active?t.tech.conjuring&&t.tech.conjuring>=2?z("city_dig_conjour"):z("city_dig"):t.tech.conjuring&&t.tech.conjuring>=2?z("city_lumber_conjure"):z("city_lumber"),desc(){let e=$(this)[0].val(!1);return Kc().active?t.tech.conjuring&&t.tech.conjuring>=2?z("city_dig_conjour_desc",[e]):z("city_dig_desc",[e]):t.tech.conjuring&&t.tech.conjuring>=2?z("city_lumber_conjure_desc",[e]):z("city_lumber_desc",[e])},category:"outskirts",reqs:{},not_trait:["evil","cataclysm"],queue_complete:()=>0,cost:{Mana:()=>t.tech.conjuring&&t.tech.conjuring>=2?1:0},action(){return t.settings.pause||(t.resource.Lumber.amount=2&&t.resource.Mana.amount>=1&&(a*=10,t.resource.Lumber.amountt.tech.conjuring&&t.tech.conjuring>=2?z("city_conjour",[t.resource.Stone.name]):z("city_gather",[t.resource.Stone.name]),desc(){let e=$(this)[0].val(!1);return t.tech.conjuring&&t.tech.conjuring>=2?z("city_stone_conjour_desc",[e,t.resource.Stone.name]):z(t.race.sappy?"city_amber_desc":"city_stone_desc",[e,t.resource.Stone.name])},category:"outskirts",reqs:{primitive:2},not_trait:["cataclysm","lone_survivor"],queue_complete:()=>0,cost:{Mana:()=>t.tech.conjuring&&t.tech.conjuring>=2?1:0},action(){return t.settings.pause||(t.resource.Stone.amount=2&&t.resource.Mana.amount>=1&&(a*=10,t.resource.Stone.amountt.tech.conjuring&&t.tech.conjuring>=2?z("city_chrysotile_conjour"):z("city_gather",[t.resource.Chrysotile.name]),desc(){let e=$(this)[0].val(!1);return t.tech.conjuring&&t.tech.conjuring>=2?z("city_stone_conjour_desc",[e,t.resource.Chrysotile.name]):z("city_stone_desc",[e,t.resource.Chrysotile.name])},category:"outskirts",reqs:{primitive:2},trait:["smoldering"],not_trait:["cataclysm","lone_survivor"],queue_complete:()=>0,cost:{Mana:()=>t.tech.conjuring&&t.tech.conjuring>=2?1:0},action(){return t.settings.pause||t.resource.Chrysotile.amount=2&&t.resource.Mana.amount>=1&&(a*=10,t.resource.Chrysotile.amountt.race.soul_eater?t.tech.primitive?t.resource.hasOwnProperty("furs")&&t.resource.Furs.display?z("city_evil_desc3"):z("city_evil_desc2"):z("city_evil_desc1"):t.resource.hasOwnProperty("furs")&&t.resource.Furs.display?z("city_evil_desc4"):z("city_evil_desc1"),category:"outskirts",reqs:{},trait:["evil"],not_trait:["kindling_kindred","smoldering","cataclysm"],queue_complete:()=>0,action(){if(!t.settings.pause){let e=t.race.strong?di.strong.vars()[0]:1;t.genes.enhance&&(e*=2),t.race.smoldering||(t.resource.Lumber.amount25e3},queue_complete:()=>t.city.slave_pen?4*t.city.slave_pen.count-t.city.slave_pen.slaves:0,action(){return!!(t.city.slave_pen&&4*t.city.slave_pen.count>t.city.slave_pen.slaves&&Cs($(this)[0]))&&(t.city.slave_pen.slaves++,t.resource.Slave.amount=t.city.slave_pen.slaves,!0)},touchlabel:z("purchase")},s_alter:{id:"city-s_alter",title:z("city_s_alter"),desc:()=>t.city.hasOwnProperty("s_alter")&&t.city.s_alter.count>=1?`
          ${z("city_s_alter")}
          ${z("city_s_alter_desc")}
          `:z("city_s_alter"),category:"outskirts",reqs:{mining:1},trait:["cannibalize"],not_trait:["cataclysm","lone_survivor"],inflation:!1,cost:{Stone:e=>(e||0)+(t.city.hasOwnProperty("s_alter")?t.city.s_alter.count:0)>=1?0:100},effect(){let e=`
          ${z("city_s_alter_sacrifice",[t.civic[t.civic.d_job]?t.civic[t.civic.d_job].workers:0])}
          `;if(t.city.hasOwnProperty("s_alter")&&t.city.s_alter.rage>0&&(e+=`
          ${z("city_s_alter_rage",[di.cannibalize.vars()[0],cc(t.city.s_alter.rage)])}
          `),t.city.hasOwnProperty("s_alter")&&t.city.s_alter.regen>0&&(e+=`
          ${z("city_s_alter_regen",[di.cannibalize.vars()[0],cc(t.city.s_alter.regen)])}
          `),t.city.hasOwnProperty("s_alter")&&t.city.s_alter.mind>0&&(e+=`
          ${z("city_s_alter_mind",[di.cannibalize.vars()[0],cc(t.city.s_alter.mind)])}
          `),t.city.hasOwnProperty("s_alter")&&t.city.s_alter.mine>0&&(e+=`
          ${z("city_s_alter_mine",[di.cannibalize.vars()[0],cc(t.city.s_alter.mine)])}
          `),t.city.hasOwnProperty("s_alter")&&t.city.s_alter.harvest>0){let a=t.race.evil&&!t.race.soul_eater?z("job_reclaimer"):z("job_lumberjack");e+=`
          ${z("city_s_alter_harvest",[di.cannibalize.vars()[0],cc(t.city.s_alter.harvest),a])}
          `}return e},action(){if(Cs($(this)[0])){if(0===t.city.s_alter.count)t.city.s_alter.count++;else if(t.civic[t.civic.d_job].workers>0){t.resource[t.race.species].amount--,t.civic[t.civic.d_job].workers--,t.stats.sac++,t.resource.Food.amount+=Math.rand(250,1e3);let e=300,a=600;if(t.tech.sacrifice)switch(t.tech.sacrifice){case 1:e=600,a=1500;break;case 2:e=1800,a=3600;break;case 3:e=5400,a=16200}switch(t.race.kindling_kindred||t.race.smoldering?Math.rand(0,4):Math.rand(0,5)){case 0:t.city.s_alter.rage+=Math.rand(e,a);break;case 1:t.city.s_alter.mind+=Math.rand(e,a);break;case 2:t.city.s_alter.regen+=Math.rand(e,a);break;case 3:t.city.s_alter.mine+=Math.rand(e,a);break;case 4:t.city.s_alter.harvest+=Math.rand(e,a)}}return!0}return!1},touchlabel:z("tech_dist_sacrifice")},basic_housing:{id:"city-basic_housing",title:()=>Is(),desc:z("city_basic_housing_desc"),desc(){return 1===$(this)[0].citizens()?z("city_basic_housing_desc"):z("city_basic_housing_desc_plural",[$(this)[0].citizens()])},category:"residential",reqs:{housing:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>(e=e||0,(t.city.basic_housing?t.city.basic_housing.count:0)+e>=5?Xi("basic_housing",e,20,1.17):0),Lumber:e=>t.race.kindling_kindred||t.race.smoldering?0:Xi("basic_housing",e,10,1.23),Stone:e=>t.race.kindling_kindred?Xi("basic_housing",e,10,1.23):0,Chrysotile:e=>t.race.smoldering?Xi("basic_housing",e,10,1.23):0,Horseshoe:()=>t.race.hooved?1:0},effect(){let e=$(this)[0].citizens();return t.race.sappy?`
          ${z("plus_max_resource",[e,z("citizen")])}
          ${z("city_grove_effect",[2.5])}
          `:z("plus_max_resource",[e,z("citizen")])},action(){return!!Cs($(this)[0])&&(t.resource[t.race.species].display=!0,t.resource[t.race.species].max+=$(this)[0].citizens(),t.city.basic_housing.count++,t.settings.showCivic=!0,!0)},citizens(){let e=1;return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e}},cottage:{id:"city-cottage",title:()=>Ks("medium"),desc(){return z("city_cottage_desc",[$(this)[0].citizens()])},category:"residential",reqs:{housing:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("cottage",e,900,1.15),Plywood:e=>Xi("cottage",e,25,1.25),Brick:e=>Xi("cottage",e,20,1.25),Wrought_Iron:e=>Xi("cottage",e,15,1.25),Iron:e=>t.city.ptrait.includes("unstable")?Xi("cottage",e,5,1.25):0,Horseshoe:()=>t.race.hooved?2:0},effect(){let e=$(this)[0].citizens();if(t.tech.home_safe){let a=Nr(t.tech.home_safe>=2?t.tech.home_safe>=3?5e3:2e3:1e3);return`
          ${z("plus_max_citizens",[e])}
          ${z("plus_max_resource",[`$${a.toLocaleString()}`,z("resource_Money_name")])}
          `}return z("plus_max_citizens",[e])},action(){return!!Cs($(this)[0])&&(t.resource[t.race.species].max+=$(this)[0].citizens(),t.city.cottage.count++,!0)},citizens(){let e=2;return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e}},apartment:{id:"city-apartment",title:()=>Ks("large"),desc(){return`
          ${z("city_apartment_desc",[$(this)[0].citizens()])}
          ${z("requires_power")}
          `},category:"residential",reqs:{housing:3},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("apartment",e,1750,1.26)-500,Crystal:e=>"magic"===t.race.universe?Xi("apartment",e,25,1.22):0,Furs:e=>Xi("apartment",e,725,1.32)-500,Copper:e=>Xi("apartment",e,650,1.32)-500,Cement:e=>Xi("apartment",e,700,1.32)-500,Steel:e=>Xi("apartment",e,800,1.32)-500,Horseshoe:()=>t.race.hooved?5:0},effect(){let e=D("extravagant",2),a=$(this)[0].citizens();if(t.tech.home_safe){let r=Nr(t.tech.home_safe>=2?t.tech.home_safe>=3?1e4:5e3:2e3);return e&&(r*=2),`
          ${z("plus_max_citizens",[a])}. ${z("minus_power",[$(this)[0].powered()])}
          ${z("plus_max_resource",[`$${r.toLocaleString()}`,z("resource_Money_name")])}
          `}return`${z("plus_max_citizens",[a])}. ${z("minus_power",[$(this)[0].powered()])}`},powered:()=>nc(D("extravagant",1)||1),action(){return!!Cs($(this)[0])&&(t.city.apartment.count++,ks($(this)[0])&&(t.resource[t.race.species].max+=$(this)[0].citizens()),!0)},citizens(){let e=D("extravagant",2),a=e?5+e:5;return t.race.high_pop&&(a*=di.high_pop.vars()[0]),a}},lodge:{id:"city-lodge",title:z("city_lodge"),desc:()=>t.race.detritivore?z("city_lodge_desc_alt"):z("city_lodge_desc"),category:"residential",reqs:{housing:1,currency:1},not_trait:["cataclysm","lone_survivor"],condition:()=>!!((t.race.soul_eater||t.race.detritivore||t.race.artifical||t.race.unfathomable)&&t.tech.s_lodge||t.tech.hunting&&t.tech.hunting>=2),cost:{Money:e=>Xi("lodge",e,50,1.32),Lumber:e=>Xi("lodge",e,20,1.36),Stone:e=>Xi("lodge",e,10,1.36),Horseshoe:()=>t.race.hooved?1:0},effect(){let e=$(this)[0].citizens();return t.race.carnivore&&!t.race.artifical?`
          ${z("plus_max_resource",[e,z("citizen")])}
          ${z("city_lodge_effect",[5])}
          `:z("plus_max_resource",[e,z("citizen")])},action(){return!!Cs($(this)[0])&&(t.city.lodge.count++,t.resource[t.race.species].display=!0,t.resource[t.race.species].max+=1,t.settings.showCivic=!0,!0)},citizens(){let e=1;return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e}},smokehouse:{id:"city-smokehouse",title:()=>t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?z("city_smokehouse_easter"):z("city_smokehouse"),desc:z("city_smokehouse_desc"),category:"trade",reqs:{hunting:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("smokehouse",e,85,1.32),Lumber:e=>Xi("smokehouse",e,65,1.36),Stone:e=>Xi("smokehouse",e,50,1.36)},effect:()=>`
          ${z("plus_max_resource",[os(Nr(100)),z("resource_Food_name")])}
          ${z("city_smokehouse_effect",[10])}
          `,action(){return!!Cs($(this)[0])&&(t.city.smokehouse.count++,t.resource.Food.max+=os(Nr(100)),!0)}},soul_well:{id:"city-soul_well",title:z("city_soul_well"),desc:z("city_soul_well_desc"),category:"trade",reqs:{soul_eater:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>(e=e||0,(t.city.soul_well?t.city.soul_well.count:0)+e>=3?Xi("soul_well",e,50,1.32):0),Lumber:e=>Xi("soul_well",e,20,1.36),Stone:e=>Xi("soul_well",e,10,1.36)},effect(){let e=os(Nr(500));return`
          ${z("city_soul_well_effect",[t.race.ghostly?2+di.ghostly.vars()[1]:2])}
          ${z("plus_max_resource",[e,z("resource_Souls_name")])}
          `},action(){return!!Cs($(this)[0])&&(t.city.soul_well.count++,t.resource.Food.max+=os(Nr(500)),!0)}},slave_pen:{id:"city-slave_pen",title:z("city_slave_pen"),desc:z("city_slave_pen"),category:"commercial",reqs:{slaves:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("slave_pen",e,250,1.32),Lumber:e=>Xi("slave_pen",e,100,1.36),Stone:e=>Xi("slave_pen",e,75,1.36),Copper:e=>Xi("slave_pen",e,10,1.36),Nanite:e=>t.race.deconstructor?Xi("slave_pen",e,4,1.36):0},effect(){let e=t.city.slave_pen?4*t.city.slave_pen.count:4,a=t.city.slave_pen?t.city.slave_pen.slaves:0;return`
          ${z("city_slave_pen_effect",[4])}
          ${z("city_slave_pen_effect2",[a,e])}
          `},action(){return!!Cs($(this)[0])&&(t.city.slave_pen.count++,t.resource.Slave.display=!0,t.resource.Slave.amount=t.city.slave_pen.slaves,t.resource.Slave.max=4*t.city.slave_pen.count,!0)}},transmitter:{id:"city-transmitter",title:z("city_transmitter"),desc:()=>`
          ${z("city_transmitter_desc")}
          ${z("requires_power")}
          `,category:"residential",reqs:{high_tech:4},trait:["artifical"],cost:{Money:e=>t.city.transmitter&&t.city.transmitter.count>=3?Xi("transmitter",e,50,1.32):0,Copper:e=>Xi("transmitter",e,20,1.36),Steel:e=>Xi("transmitter",e,10,1.36)},effect(){let e=+Oe("transmitter").toFixed(2),a=Nr(100);return`
          ${z("gain",[e,t.resource.Food.name])}
          ${z("city_transmitter_effect",[a])}
          ${z("minus_power",[$(this)[0].powered()])}
          `},powered:()=>nc(.5),powerBalancer:()=>[{r:"Food",k:"lpmod"}],action(){return!!Cs($(this)[0])&&(t.city.transmitter.count++,ks($(this)[0]),!0)}},captive_housing:Jr("captive_housing","city"),farm:{id:"city-farm",title:z("city_farm"),desc:z("city_farm_desc"),category:"residential",reqs:{agriculture:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>(e=e||0,(t.city.farm?t.city.farm.count:0)+e>=3?Xi("farm",e,50,1.32):0),Lumber:e=>Xi("farm",e,20,1.36),Stone:e=>Xi("farm",e,10,1.36),Horseshoe:e=>t.race.hooved&&(t.city.farm?t.city.farm.count:0)+(e||0)>=2?1:0},effect(){let e=$(this)[0].citizens();return t.tech.farm?`
          ${z("city_farm_effect")}
          ${z("plus_max_resource",[e,z("citizen")])}
          `:z("city_farm_effect")},action(){return!!Cs($(this)[0])&&(t.city.farm.count++,t.civic.farmer.display=!0,t.tech.farm&&(t.resource[t.race.species].display=!0,t.resource[t.race.species].max+=$(this)[0].citizens(),t.settings.showCivic=!0),!0)},citizens(){let e=1;return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e},flair:()=>t.tech.agriculture>=7?z("city_farm_flair2"):z("city_farm_flair1")},compost:{id:"city-compost",title:z("city_compost_heap"),desc:z("city_compost_heap_desc"),category:"residential",reqs:{compost:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>(e=e||0,(t.city.compost?t.city.compost.count:0)+e>=3?Xi("compost",e,50,1.32):0),Lumber:e=>Xi("compost",e,12,1.36),Stone:e=>Xi("compost",e,12,1.36)},effect(){let e=1.2+.8*(t.tech.compost?t.tech.compost:0);e*="grassland"===t.city.biome?Si.grassland.vars()[0]:1,e*="savanna"===t.city.biome?Si.savanna.vars()[0]:1,e*="ashland"===t.city.biome?Si.ashland.vars()[0]:1,e*="volcanic"===t.city.biome?Si.volcanic.vars()[0]:1,e*="hellscape"===t.city.biome?Si.hellscape.vars()[0]:1,e*=t.city.ptrait.includes("trashed")?Fi.trashed.vars()[0]:1,e=+e.toFixed(2);let a=os(Nr(200)),r=t.race.kindling_kindred?"":`
          ${z("city_compost_heap_effect2",[.5,t.resource.Lumber.name])}
          `;return`
          ${z("city_compost_heap_effect",[e])}
          ${z("city_compost_heap_effect3",[a])}
          ${r}`},switchable:()=>!0,action(){return!!Cs($(this)[0])&&(t.city.compost.count++,t.city.compost.on++,t.resource.Food.max+=os(Nr(200)),!0)}},mill:{id:"city-mill",title:()=>t.tech.agriculture>=5?z("city_mill_title2"):z("city_mill_title1"),desc(){let e=t.tech.agriculture>=5?5:3;return t.tech.agriculture>=6?z("city_mill_desc2",[e,-1*$(this)[0].powered()]):z("city_mill_desc1",[e])},category:"utility",reqs:{agriculture:4},not_tech:["wind_plant"],not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("mill",e,1e3,1.31),Lumber:e=>Xi("mill",e,600,1.33),Iron:e=>Xi("mill",e,150,1.33),Cement:e=>Xi("mill",e,125,1.33)},powered:()=>t.race.environmentalist?-1.5:-1,power_reqs:{agriculture:6},effect:()=>t.tech.agriculture>=6&&`${z("city_on")} ${z("city_mill_effect1")} ${z("city_off")} ${z("city_mill_effect2")}`,action(){return!!Cs($(this)[0])&&(t.city.mill.count++,!0)}},windmill:{id:"city-windmill",title:()=>t.race.unfathomable?z("tech_watermill"):z("city_mill_title2"),desc:()=>t.race.unfathomable?z("tech_watermill"):z("city_mill_title2"),wiki:!1,category:"utility",reqs:{wind_plant:1},not_trait:["cataclysm","lone_survivor"],powered:()=>t.race.environmentalist?-1.5:-1,power_reqs:{false:1},cost:{Money:e=>Xi("windmill",e,1e3,1.31),Lumber:e=>Xi("windmill",e,600,1.33),Iron:e=>Xi("windmill",e,150,1.33),Cement:e=>Xi("windmill",e,125,1.33)},effect(){return`
          ${z("space_dwarf_reactor_effect1",[-1*$(this)[0].powered()])}
          `},action(){return!!Cs($(this)[0])&&(t.city.windmill.count++,!0)}},silo:{id:"city-silo",title:z("city_silo"),desc:z("city_food_storage"),category:"trade",reqs:{agriculture:3},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("silo",e,85,1.32),Lumber:e=>Xi("silo",e,65,1.36),Stone:e=>Xi("silo",e,50,1.36),Iron:e=>(t.city.silo?t.city.silo.count:0)+(e||0)>=4&&t.city.ptrait.includes("unstable")?Xi("silo",e,10,1.36):0},effect:()=>z("plus_max_resource",[os(Nr(500)),z("resource_Food_name")]),action(){return!!Cs($(this)[0])&&(t.city.silo.count++,t.resource.Food.max+=os(Nr(500)),!0)}},assembly:Jr("assembly","city"),garrison:{id:"city-garrison",title:()=>t.race.flier?z("city_garrison_flier"):z("city_garrison"),desc:z("city_garrison_desc"),category:"military",reqs:{military:1,housing:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("garrison",e,240,1.5),Stone:e=>Xi("garrison",e,260,1.46),Iron:e=>(t.city.garrison?t.city.garrison.count:0)+(e||0)>=4&&t.city.ptrait.includes("unstable")?Xi("garrison",e,50,1.4):0,Horseshoe:()=>t.race.hooved?t.race.chameleon?1:2:0},effect(){let e=t.tech.military>=5?ua(3):ua(2);return t.race.chameleon&&e--,z("plus_max_resource",[e,z("civics_garrison_soldiers")])},switchable:()=>!0,action(){if(Cs($(this)[0])){t.settings.showMil=!0,t.settings.msgFilters.combat.unlocked||(t.settings.msgFilters.combat.unlocked=!0,t.settings.msgFilters.combat.vis=!0),t.civic.garrison.display||(t.civic.garrison.display=!0,ic({el:"#garrison"},"update"),ic({el:"#c_garrison"},"update"));let e=t.tech.military>=5?3:2;return t.race.chameleon&&(e-=t.city.garrison.count),t.civic.garrison.max+=e,t.city.garrison.count++,t.city.garrison.on++,t.resource.Furs.display=!0,!0}return!1}},hospital:{id:"city-hospital",title:z("city_hospital"),desc:z("city_hospital_desc"),category:"military",reqs:{medic:1},not_trait:["cataclysm","artifical"],cost:{Money:e=>Xi("hospital",e,22e3,1.32),Furs:e=>Xi("hospital",e,4e3,1.32),Iron:e=>t.city.ptrait.includes("unstable")?Xi("hospital",e,500,1.32):0,Aluminium:e=>Xi("hospital",e,1e4,1.32)},effect(){let e=t.tech.reproduction&&t.tech.reproduction>=2?`
          ${z("city_hospital_effect2")}
          `:"",a=`
          ${z("city_hospital_effect",[5*t.tech.medic])}
          ${e}`;return!t.race.artifical&&t.race.hasOwnProperty("vax")&&(a+=`
          ${z("tau_home_disease_lab_vax",[+t.race.vax.toFixed(2)])}
          `),a},action(){return!!Cs($(this)[0])&&(t.city.hospital.count++,!0)}},boot_camp:{id:"city-boot_camp",title:()=>t.race.artifical?z("city_boot_camp_art"):z("city_boot_camp"),desc:()=>t.race.artifical?z("city_boot_camp_art_desc",[_i[t.race.species].name]):z("city_boot_camp_desc"),category:"military",reqs:{boot_camp:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("boot_camp",e,5e4,1.32),Lumber:e=>Xi("boot_camp",e,21500,1.32),Iron:e=>t.city.ptrait.includes("unstable")?Xi("boot_camp",e,300,1.32):0,Aluminium:e=>Xi("boot_camp",e,12e3,1.32),Brick:e=>Xi("boot_camp",e,1400,1.32)},effect(){let e=t.tech.boot_camp>=2?8:5;t.blood.lust&&(e+=.2*t.blood.lust);let a=D("militant",0);a&&(e*=1+a/100);let r=t.tech.spy&&t.tech.spy>=3?`
          ${z("city_boot_camp_effect",[e])}
          ${z("city_boot_camp_effect2",[10])}
          `:`
          ${z("city_boot_camp_effect",[e])}
          `;return t.race.artifical&&!t.race.orbit_decayed&&(r+=`
          ${z("city_boot_camp_art_effect",[5*(t.tech.medic||1)])}
          `),t.race.artifical&&t.race.hasOwnProperty("vax")&&(desc+=`
          ${z("tau_home_disease_lab_vax",[+t.race.vax.toFixed(2)])}
          `),r},action(){return!!Cs($(this)[0])&&(t.city.boot_camp.count++,!0)}},shed:{id:"city-shed",title:()=>t.tech.storage<=2?z("city_shed_title1"):t.tech.storage>=4?z("city_shed_title3"):z("city_shed_title2"),desc(){let e=t.tech.storage>=3?t.tech.storage>=4?z("city_shed_desc_size3"):z("city_shed_desc_size2"):z("city_shed_desc_size1");return z("city_shed_desc",[e])},category:"trade",reqs:{storage:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("shed",e,75,1.22),Lumber:e=>t.tech.storage&&t.tech.storage<4?Xi("shed",e,55,1.32):0,Stone:e=>t.tech.storage&&t.tech.storage<3?Xi("shed",e,45,1.32):0,Iron:e=>t.tech.storage&&t.tech.storage>=4?Xi("shed",e,22,1.32):0,Cement:e=>t.tech.storage&&t.tech.storage>=3?Xi("shed",e,18,1.32):0},res(){let e=["Lumber","Stone","Chrysotile","Crystal","Furs","Copper","Iron","Aluminium","Cement","Coal"];return t.tech.storage>=3&&t.resource.Steel.display&&e.push("Steel"),t.tech.storage>=4&&t.resource.Titanium.display&&e.push("Titanium"),t.tech.shelving&&t.tech.shelving>=3&&t.resource.Graphene.display&&e.push("Graphene"),t.tech.shelving&&t.tech.shelving>=3&&t.resource.Stanene.display&&e.push("Stanene"),t.race.unfathomable&&e.push("Food"),e},val(e){switch(e){case"Food":return 50;case"Lumber":case"Stone":case"Chrysotile":return 300;case"Crystal":return 8;case"Furs":case"Iron":return 125;case"Copper":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 e='
          ',a=ns();for(const r of $(this)[0].res())t.resource[r].display&&(e+=`${z("plus_max_resource",[q(+(Nr($(this)[0].val(r))*a).toFixed(0),1),t.resource[r].name])}`);return e+="
          ",e},wide:!0,action(){if(Cs($(this)[0])){t.city.shed.count++;let e=ns();for(const a of $(this)[0].res())t.resource[a].display&&(t.resource[a].max+=Nr($(this)[0].val(a)*e));return!0}return!1}},storage_yard:{id:"city-storage_yard",title:z("city_storage_yard"),desc:z("city_storage_yard_desc"),category:"trade",reqs:{container:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("storage_yard",e,10,Hs(1.36)),Brick:e=>Xi("storage_yard",e,3,Hs(1.35)),Wrought_Iron:e=>Xi("storage_yard",e,5,Hs(1.35))},effect(){let e=t.tech.container>=3?20:10;return t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=1&&(e+=10),t.tech.world_control&&(e+=10),t.tech.particles&&t.tech.particles>=2&&(e*=2),t.tech.trade&&t.tech.trade>=3?`
          ${z("plus_max_resource",[e,z("resource_Crates_name")])}
          ${z("city_trade_effect",[1])}
          `:z("plus_max_resource",[e,z("resource_Crates_name")])},action(){if(Cs($(this)[0])){!1===t.resource.Crates.display&&Bi(z("city_storage_yard_msg"),"info",!1,["progress"]),t.city.storage_yard.count++,t.settings.showResources=!0,t.settings.showStorage=!0,t.settings.showMarket||(t.settings.marketTabs=1);let e=t.tech.container>=3?20:10;return t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=1&&(e+=10),t.tech.world_control&&(e+=10),t.tech.particles&&t.tech.particles>=2&&(e*=2),t.resource.Crates.max+=e,t.resource.Crates.display||(t.resource.Crates.display=!0,sc($("#resources")),sr(),t.settings.tabLoad&&(rr("storage"),L())),!0}return!1}},warehouse:{id:"city-warehouse",title:z("city_warehouse"),desc:z("city_warehouse_desc"),category:"trade",reqs:{steel_container:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("warehouse",e,400,Hs(1.26)),Cement:e=>Xi("warehouse",e,75,Hs(1.26)),Sheet_Metal:e=>Xi("warehouse",e,25,Hs(1.25))},effect(){let e=t.tech.steel_container>=2?20:10;return t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=2&&(e+=10),t.tech.world_control&&(e+=10),t.tech.particles&&t.tech.particles>=2&&(e*=2),z("plus_max_resource",[e,z("resource_Containers_name")])},action(){if(Cs($(this)[0])){!1===t.resource.Containers.display&&Bi(z("city_warehouse_msg"),"info",!1,["progress"]),t.city.warehouse.count++,t.settings.showResources=!0,t.settings.showStorage=!0;let e=t.tech.steel_container>=2?20:10;return t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=2&&(e+=10),t.tech.world_control&&(e+=10),t.tech.particles&&t.tech.particles>=2&&(e*=2),t.resource.Containers.max+=e,t.resource.Containers.display||(t.resource.Containers.display=!0,sc($("#resources")),sr(),t.settings.tabLoad&&rr("storage")),!0}return!1}},bank:{id:"city-bank",title:z("city_bank"),desc:()=>z("city_bank_desc",[_i[t.race.species].home]),category:"commercial",reqs:{banking:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("bank",e,250,1.35),Lumber:e=>Xi("bank",e,75,1.32),Stone:e=>Xi("bank",e,100,1.35),Iron:e=>(t.city.bank?t.city.bank.count:0)+(e||0)>=2&&t.city.ptrait.includes("unstable")?Xi("bank",e,30,1.3):0},effect(){let e=Us();return e=Nr(e),e=(+e.toFixed(0)).toLocaleString(),t.tech.banking>=2?`
          ${z("plus_max_resource",[`$${e}`,z("resource_Money_name")])}
          ${z("plus_max_resource",[ua(1),z("banker_name")])}
          `:z("plus_max_resource",[`$${e}`,z("resource_Money_name")])},action(){return!!Cs($(this)[0])&&(t.resource.Money.max+=Nr(1800),t.city.bank.count++,t.civic.banker.max=ua(t.city.bank.count),!0)}},pylon:{id:"city-pylon",title:z("city_pylon"),desc:z("city_pylon"),category:"industrial",reqs:{magic:2},not_trait:["cataclysm","orbit_decayed"],cost:{Money:e=>(e=e||0,(t.city.pylon?t.city.pylon.count:0)+e>=2?Xi("pylon",e,10,1.48):0),Stone:e=>Xi("pylon",e,12,1.42),Crystal:e=>Xi("pylon",e,8,1.42)-3},effect(){let e=Nr(5);return`
          ${z("gain",[+(.01*lc("magic")).toFixed(3),t.resource.Mana.name])}
          ${z("plus_max_resource",[e,t.resource.Mana.name])}
          `},special:()=>!!(t.tech.magic&&t.tech.magic>=3),action(){return!!Cs($(this)[0])&&(t.city.pylon.count++,t.resource.Mana.max+=Nr(5),!0)}},conceal_ward:{id:"city-conceal_ward",title:z("city_conceal_ward"),desc:z("city_conceal_ward"),category:"industrial",reqs:{roguemagic:3},not_trait:["cataclysm","orbit_decayed"],cost:{Money:e=>Xi("conceal_ward",e,500,1.25),Mana:e=>{return Xi("conceal_ward",e,(a=42,t.tech.nexus&&t.tech.roguemagic&&t.tech.roguemagic>=7&&(a*=.92**t.tech.nexus),a),1.25);var a},Crystal:e=>Xi("conceal_ward",e,5,1.25)},effect:()=>`
          ${z("city_conceal_ward_effect",[t.tech.roguemagic&&t.tech.roguemagic>=8?1.25:1])}
          `,action(){return!!Cs($(this)[0])&&(t.city.conceal_ward.count++,!0)}},graveyard:{id:"city-graveyard",title:z("city_graveyard"),desc:z("city_graveyard_desc"),category:"industrial",reqs:{reclaimer:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>(e=e||0,(t.city.graveyard?t.city.graveyard.count:0)+e>=5?Xi("graveyard",e,5,1.85):0),Lumber:e=>Xi("graveyard",e,2,1.95),Stone:e=>Xi("graveyard",e,6,1.9)},effect(){let e=os(Nr(100));return`
          ${z("city_graveyard_effect",[8])}
          ${z("plus_max_resource",[e,t.resource.Lumber.name])}
          `},action(){return!!Cs($(this)[0])&&(t.city.graveyard.count++,t.resource.Lumber.max+=os(Nr(100)),!0)}},lumber_yard:{id:"city-lumber_yard",title:z("city_lumber_yard"),desc:z("city_lumber_yard_desc"),category:"industrial",reqs:{axe:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>(e=e||0,(t.city.lumber_yard?t.city.lumber_yard.count:0)+e>=5?Xi("lumber_yard",e,5,1.85):0),Lumber:e=>Xi("lumber_yard",e,6,1.9),Stone:e=>Xi("lumber_yard",e,2,1.95)},effect(){let e=os(Nr(100));return`
          ${z("city_lumber_yard_effect",[2])}
          ${z("plus_max_resource",[e,t.resource.Lumber.name])}
          `},action(){return!!Cs($(this)[0])&&(t.city.lumber_yard.count++,t.civic.lumberjack.display=!0,t.resource.Lumber.max+=os(Nr(100)),!0)}},sawmill:{id:"city-sawmill",title:z("city_sawmill"),desc:z("city_sawmill_desc"),category:"industrial",reqs:{saw:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("sawmill",e,3e3,1.26),Iron:e=>Xi("sawmill",e,400,1.26),Cement:e=>Xi("sawmill",e,420,1.26)},effect(){let e=t.tech.saw>=2?8:5,a=`
          ${z("plus_max_resource",[os(Nr(200)),t.resource.Lumber.name])}
          ${z("city_lumber_yard_effect",[e])}
          `;return t.tech.foundry&&t.tech.foundry>=4&&(a+=`
          ${z("city_sawmill_effect2",[2])}
          `),t.city.powered&&(a+=`
          ${z("city_sawmill_effect3",[4,$(this)[0].powered()])}
          `),a},powered:()=>nc(1),powerBalancer:()=>!!t.city.sawmill.hasOwnProperty("psaw")&&[{r:"Lumber",k:"psaw"}],action(){return!!Cs($(this)[0])&&(t.city.sawmill.count++,t.resource.Lumber.max+=os(Nr(200)),ks($(this)[0]),!0)}},rock_quarry:{id:"city-rock_quarry",title:()=>t.race.flier?z("city_rock_quarry_alt"):z("city_rock_quarry"),desc:()=>t.race.flier?z("city_rock_quarry_desc_alt",[t.resource.Stone.name]):z("city_rock_quarry_desc"),category:"industrial",reqs:{mining:1},not_trait:["cataclysm","sappy"],cost:{Money:e=>(e=e||0,(t.city.rock_quarry?t.city.rock_quarry.count:0)+e>=2?Xi("rock_quarry",e,20,1.45):0),Lumber:e=>Xi("rock_quarry",e,50,1.36),Stone:e=>Xi("rock_quarry",e,10,1.36)},effect(){let e=os(Nr(100)),a=t.race.smoldering?`
          ${z("plus_max_resource",[e,t.resource.Chrysotile.name])}
          `:"";return t.tech.mine_conveyor?`
          ${z("city_rock_quarry_effect1",[2])}
          ${z("plus_max_resource",[e,t.resource.Stone.name])}
          ${a}
          ${z("city_rock_quarry_effect2",[4,$(this)[0].powered()])}
          `:`
          ${z("city_rock_quarry_effect1",[2])}
          ${z("plus_max_resource",[e,t.resource.Stone.name])}
          ${a}`},special:()=>!!t.race.smoldering,powered:()=>nc(1),powerBalancer:()=>!!t.city.rock_quarry.hasOwnProperty("cnvay")&&(t.city.hasOwnProperty("metal_refinery")&&t.city.rock_quarry.hasOwnProperty("almcvy")?[{r:"Stone",k:"cnvay"},{r:"Aluminium",k:"almcvy"}]:[{r:"Stone",k:"cnvay"}]),power_reqs:{mine_conveyor:1},action(){if(Cs($(this)[0])){t.city.rock_quarry.count++,t.civic.quarry_worker.display=!0;let e=os(Nr(100));return t.resource.Stone.max+=e,t.race.smoldering&&t.resource.Chrysotile.display&&(t.settings.showCivic=!0,t.settings.showIndustry=!0,t.resource.Chrysotile.max+=e),t.tech.mine_conveyor&&ks($(this)[0]),!0}return!1}},cement_plant:{id:"city-cement_plant",title:z("city_cement_plant"),desc:z("city_cement_plant_desc"),category:"industrial",reqs:{cement:1},not_trait:["cataclysm","lone_survivor","flier"],cost:{Money:e=>Xi("cement_plant",e,3e3,1.5),Lumber:e=>Xi("cement_plant",e,1800,1.36),Stone:e=>Xi("cement_plant",e,2e3,1.32),Iron:e=>t.city.ptrait.includes("unstable")?Xi("cement_plant",e,275,1.32):0},effect(){if(t.tech.cement>=5){let e=t.tech.cement>=6?8:5;return`
          ${z("city_cement_plant_effect1",[ua(2)])}
          ${z("city_cement_plant_effect2",[$(this)[0].powered(),e])}
          `}return z("city_cement_plant_effect1",[ua(2)])},powered:()=>nc(2),powerBalancer:()=>!!t.city.cement_plant.hasOwnProperty("cnvay")&&[{r:"Cement",k:"cnvay"}],power_reqs:{cement:5},action(){return!!Cs($(this)[0])&&(t.resource.Cement.display=!0,t.city.cement_plant.count++,t.civic.cement_worker.display=!0,t.civic.cement_worker.max=t.city.cement_plant.count*ua(2),t.tech.cement&&t.tech.cement>=5&&ks($(this)[0]),!0)}},foundry:{id:"city-foundry",title:z("city_foundry"),desc:z("city_foundry_desc"),category:"industrial",reqs:{foundry:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("foundry",e,750,1.36),Stone:e=>Xi("foundry",e,100,1.36),Copper:e=>Xi("foundry",e,250,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Xi("foundry",e,40,1.36):0},effect(){let e=`
          ${z("city_foundry_effect1",[ua(1)])}
          `;return t.tech.foundry>=2&&(e+=`
          ${z("city_crafted_mats",[t.tech.foundry>=5?t.tech.foundry>=8?8:5:3])}
          `),t.tech.foundry>=6&&(e+=`
          ${z("city_foundry_effect2",[2])}
          `),e},action(){return!!Cs($(this)[0])&&(0===t.city.foundry.count&&(t.race.no_craft?Bi(z("city_foundry_msg2"),"info",!1,["progress"]):Bi(z("city_foundry_msg1"),"info",!1,["progress"])),t.city.foundry.count++,t.civic.craftsman.max+=ua(1),t.civic.craftsman.display=!0,t.race.kindling_kindred||t.race.smoldering||(t.resource.Plywood.display=!0),t.resource.Brick.display=!0,t.resource.Iron.display&&(t.resource.Wrought_Iron.display=!0),t.resource.Aluminium.display&&(t.resource.Sheet_Metal.display=!0),ma(),!0)}},factory:{id:"city-factory",title:z("city_factory"),desc:`
          ${z("city_factory_desc")}
          ${z("requires_power")}
          `,category:"industrial",reqs:{high_tech:3},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("factory",e,25e3,zs(1.32)),Cement:e=>Xi("factory",e,1e3,zs(1.32)),Steel:e=>Xi("factory",e,7500,zs(1.32)),Titanium:e=>Xi("factory",e,2500,zs(1.32))},effect(){let e=`
          ${z("city_factory_effect")}
          ${z("minus_power",[$(this)[0].powered()])}
          `;return t.tech.foundry>=7&&(e+=`
          ${z("city_crafted_mats",[5])}
          `),e},powered:()=>nc(3),special:!0,action(){return!!Cs($(this)[0])&&(t.city.factory.count++,t.resource.Alloy.display=!0,t.tech.polymer&&(t.resource.Polymer.display=!0),ks($(this)[0])&&t.city.factory.Alloy++,t.settings.showIndustry=!0,Qs(),!0)}},nanite_factory:Jr("nanite_factory","city"),smelter:{id:"city-smelter",title:z("city_smelter"),desc:z("city_smelter_desc"),category:"industrial",reqs:{smelting:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("smelter",e,1e3,zs(1.32)),Iron:e=>Xi("smelter",e,500,zs(1.33))},effect(){var e=t.tech.smelting>=3?t.tech.smelting>=7?15:12:10;return t.race.pyrophobia&&(e*=.9),t.tech.smelting>=2&&!t.race.steelen?z("city_smelter_effect2",[e]):z("city_smelter_effect1",[e])},special:!0,action(){return!!Cs($(this)[0])&&(t.city.smelter.count++,t.race.kindling_kindred||t.race.smoldering||t.race.artifical?t.race.artifical?t.city.smelter.Oil++:t.race.evil?t.city.smelter.Wood++:t.city.smelter.Coal++:t.city.smelter.Wood++,t.city.smelter.Iron++,t.settings.showIndustry=!0,Qs(),!0)},flair:`
          ${z("city_smelter_flair1")}
          ${z("city_smelter_flair2")}
          `},metal_refinery:{id:"city-metal_refinery",title:z("city_metal_refinery"),desc:z("city_metal_refinery_desc"),category:"industrial",reqs:{alumina:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("metal_refinery",e,2500,1.35),Iron:e=>t.city.ptrait.includes("unstable")?Xi("metal_refinery",e,125,1.35):0,Steel:e=>Xi("metal_refinery",e,350,1.35)},powered:()=>nc(2),powerBalancer:()=>!!t.city.metal_refinery.hasOwnProperty("pwr")&&[{r:"Aluminium",k:"cnvay"}],power_reqs:{alumina:2},effect(){let e=t.race.sappy?"city_metal_refinery_effect_alt":"city_metal_refinery_effect";return t.tech.alumina>=2?`${z(e,[6])} ${z("city_metal_refinery_effect2",[6,12,$(this)[0].powered()])}`:z(e,[6])},action(){return!!Cs($(this)[0])&&(t.city.metal_refinery.count++,t.resource.Aluminium.display=!0,t.city.foundry&&t.city.foundry.count>0&&!t.resource.Sheet_Metal.display&&(t.resource.Sheet_Metal.display=!0,ma()),t.tech.alumina>=2&&ks($(this)[0]),!0)}},mine:{id:"city-mine",title:z("city_mine"),desc:z("city_mine_desc"),category:"industrial",reqs:{mining:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("mine",e,60,zs(1.6)),Lumber:e=>Xi("mine",e,175,zs(1.38))},effect(){return t.tech.mine_conveyor?`
          ${z("city_mine_effect1",[ua(1)])}
          ${z("city_mine_effect2",[$(this)[0].powered(),5])}
          `:z("city_mine_effect1",[ua(1)])},powered:()=>nc(1),powerBalancer:()=>!(!t.city.mine.hasOwnProperty("cpow")||!t.city.mine.hasOwnProperty("ipow"))&&[{r:"Copper",k:"cpow"},{r:"Iron",k:"ipow"}],power_reqs:{mine_conveyor:1},action(){return!!Cs($(this)[0])&&(t.city.mine.count++,t.resource.Copper.display=!0,t.civic.miner.display=!0,t.civic.miner.max=ua(t.city.mine.count),t.tech.mine_conveyor&&ks($(this)[0]),!0)},flair:()=>"avian"===_i[t.race.species].type?z("city_mine_flair_avian"):""},coal_mine:{id:"city-coal_mine",title:z("city_coal_mine"),desc:z("city_coal_mine_desc"),category:"industrial",reqs:{mining:4},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("coal_mine",e,480,zs(1.4)),Lumber:e=>Xi("coal_mine",e,250,zs(1.36)),Iron:e=>t.city.ptrait.includes("unstable")?Xi("coal_mine",e,28,zs(1.36)):0,Wrought_Iron:e=>Xi("coal_mine",e,18,zs(1.36))},effect(){return t.tech.mine_conveyor?`
          ${z("city_coal_mine_effect1",[ua(1)])}
          ${z("city_coal_mine_effect2",[$(this)[0].powered(),5])}
          `:z("city_coal_mine_effect1",[ua(1)])},powered:()=>nc(1),powerBalancer:()=>t.city.coal_mine.hasOwnProperty("cpow")&&t.city.coal_mine.hasOwnProperty("upow")&&t.resource.Uranium.display?[{r:"Coal",k:"cpow"},{r:"Uranium",k:"upow"}]:!!t.city.coal_mine.hasOwnProperty("cpow")&&[{r:"Coal",k:"cpow"}],power_reqs:{mine_conveyor:1},action(){return!!Cs($(this)[0])&&(t.city.coal_mine.count++,t.resource.Coal.display=!0,t.civic.coal_miner.display=!0,t.civic.coal_miner.max=ua(t.city.coal_mine.count),t.tech.mine_conveyor&&ks($(this)[0]),!0)}},oil_well:{id:"city-oil_well",title:z("city_oil_well"),desc:z("city_oil_well_desc"),category:"industrial",reqs:{oil:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("oil_well",e,5e3,zs(1.5)),Iron:e=>t.city.ptrait.includes("unstable")?Xi("oil_well",e,450,zs(1.5)):0,Cement:e=>Xi("oil_well",e,5250,zs(1.5)),Steel:e=>Xi("oil_well",e,6e3,zs(1.5))},effect:()=>z("city_oil_well_effect",[+Oe("oil_well").toFixed(2),Nr(500)]),action(){return!!Cs($(this)[0])&&(t.city.oil_well.count++,t.resource.Oil.max+=Nr(500),1===t.city.oil_well.count&&(t.resource.Oil.display=!0,Qs()),!0)},flair:z("city_oil_well_flair")},oil_depot:{id:"city-oil_depot",title:z("city_oil_depot"),desc:z("city_oil_depot_desc"),category:"trade",reqs:{oil:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("oil_depot",e,2500,zs(1.46)),Iron:e=>t.city.ptrait.includes("unstable")?Xi("oil_depot",e,325,zs(1.36)):0,Cement:e=>Xi("oil_depot",e,3750,zs(1.46)),Sheet_Metal:e=>Xi("oil_depot",e,100,zs(1.45))},effect(){let e=Nr(1e3);e*=t.tech.world_control?1.5:1;let a=`
          ${z("plus_max_resource",[e,t.resource.Oil.name])}.
          `;if(t.resource.Helium_3.display){let e=Nr(400);e*=t.tech.world_control?1.5:1,a+=`
          ${z("plus_max_resource",[e,t.resource.Helium_3.name])}.
          `}if(t.tech.uranium>=2){let e=Nr(250);e*=t.tech.world_control?1.5:1,a+=`
          ${z("plus_max_resource",[e,t.resource.Uranium.name])}.
          `}return a},action(){return!!Cs($(this)[0])&&(t.city.oil_depot.count++,t.resource.Oil.max+=Nr(1e3)*(t.tech.world_control?1.5:1),t.resource.Helium_3.display&&(t.resource.Helium_3.max+=Nr(400)*(t.tech.world_control?1.5:1)),t.tech.uranium>=2&&(t.resource.Uranium.max+=Nr(250)*(t.tech.world_control?1.5:1)),!0)}},trade:{id:"city-trade",title:z("city_trade"),desc:z("city_trade_desc"),category:"trade",reqs:{trade:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("trade",e,500,1.36),Lumber:e=>Xi("trade",e,125,1.36),Stone:e=>Xi("trade",e,50,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Xi("trade",e,15,1.36):0,Furs:e=>Xi("trade",e,65,1.36)},effect(){let e=t.race.xenophobic||t.race.nomadic?t.tech.trade:t.tech.trade+1;return t.tech.trade&&t.tech.trade>=3&&e--,t.race.flier&&(e+=di.flier.vars()[1]),z("city_trade_effect",[e])},action(){if(Cs($(this)[0])){t.city.trade.count++;let e=t.race.xenophobic||t.race.nomadic?t.tech.trade:t.tech.trade+1;return t.tech.trade&&t.tech.trade>=3&&e--,t.city.market.mtrade+=e,!0}return!1}},wharf:{id:"city-wharf",title:z("city_wharf"),desc:z("city_wharf_desc"),category:"trade",era:"industrialized",reqs:{wharf:1},not_trait:["thalassophobia","cataclysm"],cost:{Money:e=>Xi("wharf",e,62e3,1.32),Lumber:e=>Xi("wharf",e,44e3,1.32),Iron:e=>t.city.ptrait.includes("unstable")?Xi("wharf",e,200,1.32):0,Cement:e=>Xi("wharf",e,3e3,1.32),Oil:e=>Xi("wharf",e,750,1.32)},effect(){let e=t.tech.world_control?15:10;return t.tech.particles&&t.tech.particles>=2&&(e*=2),`
          ${z("city_trade_effect",[2])}
          ${z("city_wharf_effect")}
          ${z("plus_max_crates",[e])}
          ${z("plus_max_containers",[e])}
          `},action(){if(Cs($(this)[0])){!1===t.resource.Containers.display&&(Bi(z("city_warehouse_msg"),"info",!1,["progress"]),t.resource.Containers.display=!0,sc($("#resources")),sr()),t.city.wharf.count++,t.city.market.mtrade+=2;let e=t.tech.world_control?15:10;return t.tech.particles&&t.tech.particles>=2&&(e*=2),t.resource.Crates.max+=e,t.resource.Containers.max+=e,!0}return!1}},tourist_center:{id:"city-tourist_center",title:z("city_tourist_center"),desc:z("city_tourist_center_desc"),category:"commercial",reqs:{monument:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("tourist_center",e,1e5,1.36),Stone:e=>Xi("tourist_center",e,25e3,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Xi("tourist_center",e,1e3,1.36):0,Furs:e=>Xi("tourist_center",e,7500,1.36),Plywood:e=>Xi("tourist_center",e,5e3,1.36)},effect(){let e=t.tech.monument&&t.tech.monument>=3&&i.s_gate?3:1,a=("corpocracy"===t.civic.govern.type?2:1)*e,r=("corpocracy"===t.civic.govern.type?10:5)*e,s=("corpocracy"===t.civic.govern.type?4:2)*e,c="";t.stats.achieve.banana&&t.stats.achieve.banana.l>=4&&(c=`
          ${z("city_tourist_center_effect5",[("corpocracy"===t.civic.govern.type?6:3)*e])}
          `);let o="",n=D("pious",1);return n&&(o=`
          ${z("city_tourist_center_effect6",[("corpocracy"===t.civic.govern.type?2*n:n)*e])}
          `),`
          ${z("city_tourist_center_effect1",[t.resource.Food.name])}
          ${z("city_tourist_center_effect2",[a,Zr.city.amphitheatre.title()])}
          ${z("city_tourist_center_effect3",[r])}
          ${z("city_tourist_center_effect4",[s])}
          ${c}${o}`},powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(t.city.tourist_center.count++,t.city.tourist_center.on++,!0)}},amphitheatre:{id:"city-amphitheatre",title:()=>z(D("athleticism",0)?"city_stadium":"city_amphitheatre"),desc:()=>z(D("athleticism",0)?"city_stadium":"city_amphitheatre_desc"),category:"commercial",reqs:{theatre:1},not_trait:["joyless","cataclysm"],cost:{Money:e=>Xi("amphitheatre",e,500,1.55),Lumber:e=>Xi("amphitheatre",e,50,1.75),Stone:e=>Xi("amphitheatre",e,200,1.75),Iron:e=>t.city.ptrait.includes("unstable")?Xi("amphitheatre",e,18,1.36):0},effect(){let e=D("athleticism",0);return`
          ${z("city_max_entertainer",[ua(D("athleticism",1)||1)])}
          ${z("city_max_morale",[e||1])}
          `},action(){return!!Cs($(this)[0])&&(t.city.amphitheatre.count++,t.civic.entertainer.max+=ua(1),t.civic.entertainer.display=!0,!0)},flair:()=>z(D("athleticism",0)?"city_stadium_flair":"city_amphitheatre_flair")},casino:{id:"city-casino",title:z("city_casino"),desc:z("city_casino"),category:"commercial",reqs:{gambling:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("casino",e,35e4,1.35),Iron:e=>t.city.ptrait.includes("unstable")?Xi("casino",e,2e3,1.35):0,Furs:e=>Xi("casino",e,6e4,1.35),Plywood:e=>Xi("casino",e,1e4,1.35),Brick:e=>Xi("casino",e,6e3,1.35)},effect(){let e=is();return e+=`
          ${z("minus_power",[$(this)[0].powered()])}
          `,e},powered:()=>nc(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=2?2:3),action(){return!!Cs($(this)[0])&&(t.city.casino.count++,t.race.joyless||(t.civic.entertainer.max+=ua(1),t.civic.entertainer.display=!0),ks($(this)[0]),!0)},flair:z("city_casino_flair")},temple:{id:"city-temple",title:z("city_temple"),desc:()=>z("city_temple_desc",["none"!==t.race.gods?_i[t.race.gods.toLowerCase()].entity:_i[t.race.species].entity]),category:"commercial",reqs:{theology:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("temple",e,50,1.36),Lumber:e=>Xi("temple",e,25,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Xi("temple",e,6,1.36):0,Furs:e=>Xi("temple",e,15,1.36),Cement:e=>Xi("temple",e,10,1.36)},effect(){let e=ss();return t.genes.ancients&&t.genes.ancients>=2&&(e+=`
          ${z("city_temple_effect6",[ua(1)])}
          `),e},action(){return!!Cs($(this)[0])&&(t.genes.ancients&&t.genes.ancients>=2&&(t.civic.priest.display=!0),t.city.temple.count++,!0)}},shrine:{id:"city-shrine",title:z("city_shrine"),desc:()=>z("city_shrine_desc"),category:"commercial",reqs:{theology:2},trait:["magnificent"],not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("shrine",e,75,1.32),Stone:e=>Xi("shrine",e,65,1.32),Furs:e=>Xi("shrine",e,10,1.32),Copper:e=>Xi("shrine",e,15,1.32)},effect(){let e=`
          ${z("city_shrine_effect")}
          `;if(t.city.shrine&&t.city.shrine.morale>0&&(e+=`
          ${z("city_shrine_morale",[+Nc("morale").add.toFixed(1)])}
          `),t.city.shrine&&t.city.shrine.metal>0&&(e+=`
          ${z("city_shrine_metal",[+(100*(Nc("metal").mult-1)).toFixed(1)])}
          `),t.city.shrine&&t.city.shrine.know>0){let t=Nc("know");e+=`
          ${z("city_shrine_know",[(+t.add.toFixed(1)).toLocaleString()])}
          `,e+=`
          ${z("city_shrine_know2",[+(100*(t.mult-1)).toFixed(1)])}
          `}return t.city.shrine&&t.city.shrine.tax>0&&(e+=`
          ${z("city_shrine_tax",[+(100*(Nc("tax").mult-1)).toFixed(1)])}
          `),e},action(){if(Cs($(this)[0])){if(t.city.shrine.count++,t.city.calendar.moon>0&&t.city.calendar.moon<7)t.city.shrine.morale++;else if(t.city.calendar.moon>7&&t.city.calendar.moon<14)t.city.shrine.metal++;else if(t.city.calendar.moon>14&&t.city.calendar.moon<21)t.city.shrine.know++;else if(t.city.calendar.moon>21)t.city.shrine.tax++;else switch(Math.floor(g(0,4))){case 0:t.city.shrine.morale++;break;case 1:t.city.shrine.metal++;break;case 2:t.city.shrine.know++;break;case 3:t.city.shrine.tax++}return!0}return!1}},meditation:{id:"city-meditation",title:z("city_meditation"),desc:z("city_meditation"),category:"commercial",reqs:{primitive:3},trait:["calm"],not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("meditation",e,50,1.2),Stone:e=>Xi("meditation",e,25,1.2),Furs:e=>Xi("meditation",e,8,1.2)},effect(){let e=t.resource.Zen.amount/(t.resource.Zen.amount+5e3);return`
          ${z("city_meditation_effect",[di.calm.vars()[0]])}
          ${z("city_meditation_effect2",[2])}
          ${z("city_meditation_effect3",[1])}
          ${z("city_meditation_effect4",[`${(100*e).toFixed(2)}%`])}
          `},action(){return!!Cs($(this)[0])&&(t.city.meditation.count++,t.resource.Zen.max+=di.calm.vars()[0],!0)}},university:{id:"city-university",title:z("city_university"),desc:()=>z("city_university_desc",[_i[t.race.species].home]),category:"science",reqs:{science:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("university",e,900,1.5)-500,Lumber:e=>Xi("university",e,500,1.36)-200,Stone:e=>Xi("university",e,750,1.36)-350,Crystal:e=>"magic"===t.race.universe?Xi("university",e,5,1.36):0,Iron:e=>(t.city.university?t.city.university.count:0)+(e||0)>=3&&t.city.ptrait.includes("unstable")?Xi("university",e,25,1.36):0},effect(){let e=+$(this)[0].knowVal().toFixed(0);return`
          ${z("city_university_effect",[ua(1)])}
          ${z("city_max_knowledge",[e.toLocaleString()])}
          `},knowVal(){let e=1,a=t.tech.science&&t.tech.science>=8?700:500;t.city.ptrait.includes("permafrost")&&(a+=Fi.permafrost.vars()[1]),t.tech.science>=4&&(e+=.02*t.city.library.count),t.space.observatory&&t.space.observatory.count>0&&(e+=.05*c.observatory),t.portal.sensor_drone&&t.tech.science>=14&&(e+=.02*i.sensor_drone),t.race.hard_of_hearing&&(e*=1-di.hard_of_hearing.vars()[0]/100),t.race.curious&&(e*=1+di.curious.vars()[0]/100*t.resource[t.race.species].amount);let r=Oi("cath");if(r>0&&(e*=1+di.curious.vars(3)[0]*r),i.s_gate&&n.scavenger){let t=It("gxy_alien2");e*=1+n.scavenger*t/4}let s=D("teacher",0);s&&(e*=1+s/100);let o=D("athleticism",2);o&&(e*=1-o/100),Lc()&&(e*=Nc("know").mult);let l=a*e;if(t.tech.supercollider){let e=t.tech.tp_particles||t.tech.particles&&t.tech.particles>=3?12.5:25;l*=t.tech.supercollider/e+1}return t.race.orbit_decayed&&(t.space.satellite&&(l*=1+.12*t.space.satellite.count),t.tech.biotech&&t.tech.biotech>=1&&(l*=2)),l},action(){if(Cs($(this)[0])){let e=t.tech.science&&t.tech.science>=8?700:500;if(t.tech.science>=4&&(e*=1+.02*t.city.library.count),t.tech.supercollider){let a=t.tech.particles&&t.tech.particles>=3?12.5:25;e*=t.tech.supercollider/a+1}return t.resource.Knowledge.max+=e,t.city.university.count++,t.civic.professor.display=!0,t.civic.professor.max=t.city.university.count,!0}return!1}},library:{id:"city-library",title:z("city_library"),desc:()=>z("city_library_desc",[_i[t.race.species].home]),category:"science",reqs:{science:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("library",e,45,1.2),Crystal:e=>"magic"===t.race.universe?Xi("library",e,2,1.2):0,Iron:e=>t.city.ptrait.includes("unstable")?Xi("library",e,4,1.2):0,Furs:e=>Xi("library",e,22,1.2),Plywood:e=>Xi("library",e,20,1.2),Brick:e=>Xi("library",e,15,1.2)},effect(){let e=125;t.race.nearsighted&&(e*=1-di.nearsighted.vars()[0]/100),t.race.studious&&(e*=1+di.studious.vars()[1]/100);let a=Oi("elven");if(a>0&&(e*=1+di.studious.vars(1)[1]/100*a),t.tech.science&&t.tech.science>=8&&(e*=1.4),t.tech.anthropology&&t.tech.anthropology>=2&&(e*=1+.05*t.city.temple.count),t.tech.science&&t.tech.science>=5){let a=la(t.civic.scientist.workers,"scientist");t.race.high_pop&&(a=Pe(a)),e*=1+.12*a}let r=D("teacher",0);r&&(e*=1+r/100);let s=D("athleticism",2);s&&(e*=1-s/100);let i=D("muckraker",1);i&&(e*=1+i/100),e=+e.toFixed(0);let c=D("muckraker",2),o=c?5-c:5;return t.race.autoignition&&(o-=di.autoignition.vars()[0],o<0&&(o=0)),`
          ${z("city_max_knowledge",[e.toLocaleString()])}
          ${z("city_library_effect",[o])}
          `},action(){if(Cs($(this)[0])){let e=125;return t.race.nearsighted&&(e*=1-di.nearsighted.vars()[0]/100),t.tech.science&&t.tech.science>=8&&(e*=1.4),t.tech.anthropology&&t.tech.anthropology>=2&&(e*=1+.05*t.city.temple.count),t.tech.science&&t.tech.science>=5&&(e*=1+.12*la(t.civic.scientist.workers,"scientist")),e=+e.toFixed(1),t.resource.Knowledge.max+=e,t.city.library.count++,t.tech.science&&t.tech.science>=3&&(t.civic.professor.impact=.5+.01*t.city.library.count),!0}return!1},flair:z("city_library_flair")},wardenclyffe:{id:"city-wardenclyffe",title:()=>Es(),desc:z("city_wardenclyffe_desc"),category:"science",reqs:{high_tech:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("wardenclyffe",e,5e3,1.22),Knowledge:e=>Xi("wardenclyffe",e,t.race.logical?1e3-di.logical.vars()[0]:1e3,1.22),Crystal:e=>"magic"===t.race.universe?Xi("wardenclyffe",e,100,1.22):0,Copper:e=>Xi("wardenclyffe",e,500,1.22),Iron:e=>t.city.ptrait.includes("unstable")?Xi("wardenclyffe",e,75,1.22):0,Cement:e=>Xi("wardenclyffe",e,350,1.22),Sheet_Metal:e=>Xi("wardenclyffe",e,125,1.2),Nanite:e=>t.race.deconstructor?Xi("wardenclyffe",e,50,1.18):0},effect(){let e=1e3;if(t.city.ptrait.includes("magnetic")&&(e+=Fi.magnetic.vars()[1]),t.tech.supercollider){let a=t.tech.particles&&t.tech.particles>=3?12.5:25;e*=t.tech.supercollider/a+1}t.space.satellite&&(e*=1+.04*t.space.satellite.count);let a=D("athleticism",2);a&&(e*=1-a/100),e=+e.toFixed(0);let r=`
          ${z("city_wardenclyffe_effect1",[ua(1),t.civic.scientist?t.civic.scientist.name:z("job_scientist")])}
          ${z("city_max_knowledge",[e.toLocaleString()])}
          `;if(t.city.powered){let e=t.tech.science>=7?2500:2e3;if(t.city.ptrait.includes("magnetic")&&(e+=Fi.magnetic.vars()[1]),t.space.satellite&&(e*=1+.04*t.space.satellite.count),t.tech.supercollider){let a=t.tech.particles&&t.tech.particles>=3?12.5:25;e*=t.tech.supercollider/a+1}let a=D("athleticism",2);if(a&&(e*=1-a/100),e=+e.toFixed(1),t.tech.science>=15&&(r+=`
          ${z("city_wardenclyffe_effect4",[2])}
          `),"magic"===t.race.universe&&(r+=`
          ${z("plus_max_resource",[Nr(8),t.resource.Mana.name])}
          `),t.tech.broadcast){let a=t.tech.broadcast;r+=`
          ${z("city_wardenclyffe_effect3",[$(this)[0].powered(),e.toLocaleString(),a])}
          `}else r+=`
          ${z("city_wardenclyffe_effect2",[$(this)[0].powered(),e.toLocaleString()])}
          `;t.race.artifical&&(r+=`
          ${z("city_transmitter_effect",[Nr(250)])}nc(2),action(){if(Cs($(this)[0])){let e=1e3;if(t.city.wardenclyffe.count++,t.civic.scientist.display=!0,t.civic.scientist.max=t.city.wardenclyffe.count,ks($(this)[0])&&(e=t.tech.science>=7?2500:2e3),t.tech.supercollider){let a=t.tech.particles&&t.tech.particles>=3?12.5:25;e*=t.tech.supercollider/a+1}return t.resource.Knowledge.max+=e,!0}return!1},flair:()=>"magic"===t.race.universe?`
          ${z("city_wizard_tower_flair")}
          `:t.race.evil?`
          ${z("city_babel_flair")}
          `:`
          ${z("city_wardenclyffe_flair1")}
          ${z("city_wardenclyffe_flair2")}
          `},biolab:{id:"city-biolab",title:z("city_biolab"),desc:`
          ${z("city_biolab_desc")}
          ${z("requires_power")}
          `,category:"science",reqs:{genetics:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("biolab",e,25e3,1.3),Knowledge:e=>Xi("biolab",e,5e3,1.3),Copper:e=>Xi("biolab",e,1250,1.3),Iron:e=>t.city.ptrait.includes("unstable")?Xi("biolab",e,160,1.3):0,Alloy:e=>Xi("biolab",e,350,1.3)},effect(){let e=3e3;return t.portal.sensor_drone&&t.tech.science>=14&&(e*=1+.02*i.sensor_drone),t.tech.science>=20&&(e*=3),t.tech.science>=21&&(e*=1.45),t.tech.biotech>=1&&(e*=2.5),e=+e.toFixed(0),`${z("city_max_knowledge",[e.toLocaleString()])}, ${z("minus_power",[$(this)[0].powered()])}`},powered:()=>nc(2),action(){return!!Cs($(this)[0])&&(t.city.biolab.count++,ks($(this)[0])&&(t.resource.Knowledge.max+=3e3),!0)}},coal_power:{id:"city-coal_power",title:()=>t.race.environmentalist?z("city_hydro_power"):z("magic"===t.race.universe?"city_mana_engine":"city_coal_power"),desc:()=>t.race.environmentalist?`
          ${z("city_hydro_power_desc")}
          `:`
          ${z("magic"===t.race.universe?"city_mana_engine_desc":"city_coal_power_desc")}
          ${z("requires_res",[z("magic"===t.race.universe?"resource_Mana_name":"resource_Coal_name")])}
          `,category:"utility",reqs:{high_tech:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("coal_power",e,1e4,zs(1.22)),Crystal:e=>"magic"===t.race.universe?Xi("coal_power",e,125,zs(1.22)):0,Copper:e=>Xi("coal_power",e,1800,zs(1.22))-1e3,Iron:e=>t.city.ptrait.includes("unstable")?Xi("coal_power",e,175,zs(1.22)):0,Cement:e=>Xi("coal_power",e,600,zs(1.22)),Steel:e=>Xi("coal_power",e,2e3,zs(1.22))-1e3},effect(){let e="magic"===t.race.universe?.05:.35,a=-$(this)[0].powered();return t.race.environmentalist?`+${a}MW`:`+${a}MW. ${z("magic"===t.race.universe?"city_mana_engine_effect":"city_coal_power_effect",[e])}`},powered(){let e=t.race.environmentalist?t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=1?-5:-4:t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=1?-6:-5,a=D("dirty_jobs",1);return a&&(e-=a),oc(e)},p_fuel:()=>"magic"===t.race.universe?{r:"Mana",a:t.race.environmentalist?0:.05}:{r:"Coal",a:t.race.environmentalist?0:.35},action(){return!!Cs($(this)[0])&&(t.city.coal_power.count++,t.city.coal_power.on++,t.city.power+=5,!0)}},oil_power:{id:"city-oil_power",title:()=>t.race.environmentalist?z("city_wind_power"):z("city_oil_power"),desc:()=>t.race.environmentalist?`
          ${z("city_wind_power_desc")}
          `:`
          ${z("city_oil_power_desc")}
          ${z("requires_res",[z("resource_Oil_name")])}
          `,category:"utility",reqs:{oil:3},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("oil_power",e,5e4,zs(1.22)),Copper:e=>Xi("oil_power",e,6500,zs(1.22))+1e3,Iron:e=>t.city.ptrait.includes("unstable")?Xi("oil_power",e,180,zs(1.22)):0,Aluminium:e=>Xi("oil_power",e,12e3,zs(1.22)),Cement:e=>Xi("oil_power",e,5600,zs(1.22))+1e3},effect(){let e=-$(this)[0].powered();return t.race.environmentalist?`+${e}MW`:`+${e}MW. ${z("city_oil_power_effect",[.65])}`},powered(){let e=0;if(t.race.environmentalist)if(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=3){let a=1===t.city.calendar.wind?-7:-5;e=t.stats.achieve.dissipated.l>=5?a-2:a-1}else e=1===t.city.calendar.wind?-7:-5;else e=t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=3?t.stats.achieve.dissipated.l>=5?-8:-7:-6;let a=D("dirty_jobs",1);return a&&(e-=a),oc(e)},p_fuel:()=>({r:"Oil",a:t.race.environmentalist?0:.65}),action(){return!!Cs($(this)[0])&&(t.city.oil_power.count++,t.city.oil_power.on++,t.city.power+=6,!0)}},fission_power:{id:"city-fission_power",title:z("city_fission_power"),desc:`
          ${z("city_fission_power_desc")}
          ${z("requires_res",[z("resource_Uranium_name")])}
          `,category:"utility",reqs:{high_tech:5},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("fission_power",e,25e4,1.36),Copper:e=>Xi("fission_power",e,13500,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Xi("fission_power",e,1750,1.36):0,Cement:e=>Xi("fission_power",e,10800,1.36),Titanium:e=>Xi("fission_power",e,7500,1.36)},effect(){return`+${-$(this)[0].powered()}MW. ${z("city_fission_power_effect",[.1])}`},powered:()=>oc(t.tech.uranium>=4?-18:-14),p_fuel:()=>({r:"Uranium",a:.1}),action(){return!!Cs($(this)[0])&&(t.city.fission_power.count++,t.city.fission_power.on++,t.city.power+=14,!0)}},mass_driver:{id:"city-mass_driver",title:z("city_mass_driver"),desc:`
          ${z("city_mass_driver_desc")}
          ${z("requires_power")}
          `,category:"utility",reqs:{mass:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Xi("mass_driver",e,375e3,1.32),Copper:e=>Xi("mass_driver",e,33e3,1.32),Iron:e=>Xi("mass_driver",e,42500,1.32),Iridium:e=>Xi("mass_driver",e,2200,1.32)},effect(){return`${t.tech.mass>=2?`
          ${z("city_mass_driver_effect2",[1,t.civic.scientist.name])}
          `:""}${z("city_mass_driver_effect",[t.race.truepath?6:5,Tc("name")])} ${z("minus_power",[$(this)[0].powered()])}`},powered(){let e=t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=4?4:5;return nc(t.tech.mass>=2?e-1:e)},action(){return!!Cs($(this)[0])&&(t.city.mass_driver.count++,ks($(this)[0]),!0)}},replicator:{id:"city-replicator",title:z("tech_replicator"),desc:z("tech_replicator"),category:"utility",reqs:{special_hack:1},cost:{},wiki:!1,effect:()=>"fake structure",powered:()=>1,action:()=>!1}},tech:Hr,arpa:Ce("PhysicsTech"),genes:Ce("GeneTech"),blood:Ce("BloodTech"),space:Bt(),interstellar:Ft,galaxy:Tt,starDock:{probes:{id:"starDock-probes",title:z("star_dock_probe"),desc:()=>`
          ${z("star_dock_probe_desc")}
          `,reqs:{genesis:4},cost:{Money:e=>Xi("probes",e,35e4,t.race.truepath?1.125:1.25,"starDock"),Alloy:e=>Xi("probes",e,75e3,t.race.truepath?1.125:1.25,"starDock"),Polymer:e=>Xi("probes",e,85e3,t.race.truepath?1.125:1.25,"starDock"),Iridium:e=>Xi("probes",e,12e3,t.race.truepath?1.125:1.25,"starDock"),Mythril:e=>Xi("probes",e,3500,t.race.truepath?1.125:1.25,"starDock")},effect:()=>`
          ${z("star_dock_probe_effect")}
          `,action(){return!!Cs($(this)[0])&&(t.starDock.probes.count++,!0)}},geck:{id:"starDock-geck",title:z("tech_geck"),desc:()=>`
          ${z("tech_geck_desc")}
          `,reqs:{geck:1},condition:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=5),queue_complete:()=>0,no_multi:!0,cost:{Money:e=>Xi("geck",e,1e6,1.25,"starDock"),Elerium:e=>Xi("geck",e,1e3,1.25,"starDock"),Plasmid:e=>Xi("geck",e,25,1.4,"starDock")},effect:()=>`
          ${z("star_dock_geck_effect")}
          `,action(){return!!Cs($(this)[0])&&(t.starDock.geck.count++,!0)}},seeder:{id:"starDock-seeder",title:()=>t.race.cataclysm?z("star_dock_exodus"):z("star_dock_seeder"),desc(){let e=t.race.cataclysm?z("star_dock_exodus"):z("star_dock_seeder");return t.starDock.seeder&&t.starDock.seeder.count>=100?`
          ${e}
          ${z("star_dock_seeder_desc2")}
          `:`
          ${e}
          ${z("star_dock_seeder_desc1")}
          `},reqs:{genesis:5},queue_size:10,queue_complete:()=>100-t.starDock.seeder.count,cost:{Money:e=>(e||0)+(t.starDock.hasOwnProperty("seeder")?t.starDock.seeder.count:0)<100?1e5:0,Steel:e=>(e||0)+(t.starDock.hasOwnProperty("seeder")?t.starDock.seeder.count:0)<100?25e3:0,Neutronium:e=>(e||0)+(t.starDock.hasOwnProperty("seeder")?t.starDock.seeder.count:0)<100?240:0,Elerium:e=>(e||0)+(t.starDock.hasOwnProperty("seeder")?t.starDock.seeder.count:0)<100?10:0,Nano_Tube:e=>(e||0)+(t.starDock.hasOwnProperty("seeder")?t.starDock.seeder.count:0)<100?12e3:0},effect(e){let a=(e||0)+(t.starDock.seeder?t.starDock.seeder.count:0),r=a<100?z("star_dock_seeder_status1",[100-a]):z("star_dock_seeder_status2");return`
          ${t.race.cataclysm?z("star_dock_exodus_effect"):z("star_dock_seeder_effect")}
          ${r}
          `},action(){return!!(t.starDock.seeder.count<100&&Cs($(this)[0]))&&(t.starDock.seeder.count++,t.starDock.seeder.count>=100&&(t.tech.genesis=6,Ii("starDock-seeder"),sc($("#modalBox")),As(Zr.space.spc_gas.star_dock,"star_dock")),!0)}},prep_ship:{id:"starDock-prep_ship",title:z("star_dock_prep"),desc:()=>`
          ${t.race.cataclysm?z("star_dock_prep_cata_desc"):z("star_dock_prep_desc")}
          ${z("star_dock_genesis_desc2")}
          `,reqs:{genesis:6},queue_complete:()=>0,cost:{},effect(){let e=gc("bioseed"),a="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name");return`
          ${t.race.cataclysm?z("star_dock_prep_cata_effect"):z("star_dock_prep_effect")}
          ${z("star_dock_genesis_effect2",[e.plasmid,a])}
          ${z("star_dock_genesis_effect3",[e.phage])}
          `},action:()=>(t.tech.genesis=7,Ii("starDock-prep_ship"),sc($("#modalBox")),As(Zr.space.spc_gas.star_dock,"star_dock"),!0)},launch_ship:{id:"starDock-launch_ship",title:z("star_dock_genesis"),desc:()=>`
          ${t.race.cataclysm?z("star_dock_prep_cata_effect"):z("star_dock_genesis_desc1")}
          ${z("star_dock_genesis_desc2")}
          `,reqs:{genesis:7},queue_complete:()=>0,cost:{},effect(){let e=gc("bioseed"),a="antimatter"===t.race.universe?z("resource_AntiPlasmid_plural_name"):z("resource_Plasmid_plural_name");return`
          ${t.race.cataclysm?z("star_dock_genesis_cata_effect1"):z("star_dock_genesis_effect1")}
          ${z("star_dock_genesis_effect2",[e.plasmid,a])}
          ${z("star_dock_genesis_effect3",[e.phage])}
          `},action:()=>(function(){t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),C(),Vi("reset",{end:"bioseed"});let a=t.race.species,r=t.race.gods,s=_i[a].type,i=t.city.calendar.orbit,c=t.city.biome,o=t.city.ptrait,n=gc("bioseed");t.stats.bioseed++,zc(),t.prestige.Phage.count+=n.phage,t.stats.phage+=n.phage,"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=n.plasmid,t.stats.antiplasmid+=n.plasmid):(t.prestige.Plasmid.count+=n.plasmid,t.stats.plasmid+=n.plasmid),eo("seeder"),eo(`biome_${c}`),o.forEach((function(e){Fi.hasOwnProperty(e)&&eo(`atmo_${e}`)})),eo(`genus_${s}`),t.race.truepath&&eo("exodus"),o.includes("dense")&&"heavy"===t.race.universe&&eo("double_density"),t.race.junker&&"junker"===t.race.species&&to("organ_harvester"),"hellscape"===t.city.biome&&"demonic"!==_i[t.race.species].type&&to("ill_advised"),void 0===t.tech.world_control&&eo("cult_of_personality"),t.race.cataclysm&&eo("iron_will",!1,5),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&eo("gross");let l=0,u=0;Object.keys(t.city.geology).forEach((function(e){t.city.geology[e]>0?l++:t.city.geology[e]<0&&u++})),l>=4&&eo("miners_dream"),u>=3&&to("rocky_road"),t.race.steelen&&t.race.steelen>=1&&eo("steelen"),"micro"===t.race.universe&&(t.race.small||t.race.compact?eo("macro",!0):eo("marble",!0)),io();let d=!!t.race.hasOwnProperty("srace")&&t.race.srace,_=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0,p=t.starDock.probes.count+1,h=t.starDock.hasOwnProperty("geck")?t.starDock.geck.count:0;t.stats.achieve.explorer&&(p+=t.stats.achieve.explorer.l),t.race={species:"protoplasm",gods:a,old_gods:r,universe:t.race.universe,seeded:!0,probes:p,geck:h,seed:Math.floor(g(1e4)),ascended:!1},_>0&&(t.race.corruption=_),d&&(t.race.srace=d),Z({orbit:i,biome:c,ptrait:o,geology:!1}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}(),!1)}},portal:$a(),tauceti:Ve};function Vr(){let a=$("#evolution .evolving").nextAll();Object.values(a).forEach((function(e){sc($(e),!0)})),sc($("#evolution .evolving"),!0),t.evolution.bunker={count:1},Ps(Zr.evolution.bunker.id),Ts(),t.race.truepath||t.race.lone_survivor?(t.evolution.nerfed={count:0},t.evolution.badgenes={count:0}):("antimatter"===t.race.universe?t.evolution.mastery={count:0}:t.evolution.plasmid={count:0},t.evolution.crispr={count:0}),t.evolution.trade={count:0},t.evolution.craft={count:0},t.evolution.junker={count:0},t.evolution.joyless={count:0},t.evolution.steelen={count:0},(t.stats.achieve.whitehole||t.sim)&&(t.evolution.decay={count:0}),(t.stats.achieve.ascended||t.sim)&&(t.evolution.emfield={count:0}),(t.stats.achieve.scrooge||t.sim)&&(t.evolution.inflation={count:0}),(t.stats.achieve.shaken||t.sim)&&(t.evolution.cataclysm={count:0}),(t.stats.achieve.whitehole||t.stats.achieve.ascended||t.sim)&&(t.evolution.banana={count:0},t.evolution.orbit_decay={count:0}),"standard"===t.race.universe&&(t.stats.achieve.whitehole||t.sim),"heavy"===t.race.universe&&(t.stats.achieve.seeder&&t.stats.achieve.seeder.h||t.sim),"magic"===t.race.universe&&(t.stats.achieve.ascended&&t.stats.achieve.ascended.mg||t.sim)&&(t.evolution.witch_hunter={count:0}),"evil"===t.race.universe&&(t.stats.achieve.corrupted&&t.stats.achieve.corrupted.e||t.sim),(t.stats.achieve.ascended||t.stats.achieve.corrupted||t.sim)&&(t.evolution.truepath={count:0}),((t.stats.achieve.ascended||t.stats.achieve.corrupted)&&t.stats.achieve.extinct_junker||t.sim)&&(t.evolution.sludge={count:0}),(t.stats.achieve.bluepill||t.sim)&&(t.evolution.simulation={count:0}),(t.stats.achieve.retired||t.sim)&&(t.evolution.lone_survivor={count:0}),function(){let e=$('
          ');$("#evolution").append(e),e.append($(`

          ${z("evo_challenge_genes")}

          `)),e.append($(`
          ${z("evo_challenge_genes_desc")}
          `)),t.genes.challenge&&t.genes.challenge>=2&&e.append($(`
          ${z("evo_challenge_genes_mastery")}
          `))}(),t.race.truepath||t.race.lone_survivor?fs("evolution","nerfed"):"antimatter"===t.race.universe?fs("evolution","mastery"):fs("evolution","plasmid"),fs("evolution","trade"),fs("evolution","craft"),t.race.truepath||t.race.lone_survivor?fs("evolution","badgenes"):fs("evolution","crispr"),function(){let e=$('
          ');$("#evolution").append(e),e.append($(`

          ${z("evo_challenge_run")}

          `)),e.append($(`
          ${z("evo_challenge_run_desc")}
          `))}(),fs("evolution","joyless"),fs("evolution","steelen"),(t.stats.achieve.whitehole||t.sim)&&fs("evolution","decay"),(t.stats.achieve.ascended||t.sim)&&fs("evolution","emfield"),(t.stats.achieve.scrooge||t.sim)&&fs("evolution","inflation"),((t.stats.achieve.ascended||t.stats.achieve.corrupted)&&t.stats.achieve.extinct_junker||t.sim)&&fs("evolution","sludge"),(t.stats.achieve.whitehole||t.stats.achieve.ascended||t.sim)&&fs("evolution","orbit_decay"),"standard"===t.race.universe&&(t.stats.achieve.whitehole||t.sim),"heavy"===t.race.universe&&(t.stats.achieve.seeder&&t.stats.achieve.seeder.h||t.sim),"magic"===t.race.universe&&(t.stats.achieve.ascended&&t.stats.achieve.ascended.mg||t.sim)&&fs("evolution","witch_hunter"),"evil"===t.race.universe&&(t.stats.achieve.corrupted&&t.stats.achieve.corrupted.e||t.sim),t.hasOwnProperty("beta")&&!t.sim&&fs("evolution","simulation"),function(){let e=$('
          ');$("#evolution").append(e),e.append($(`

          ${z("evo_scenario")}

          `)),e.append($(`
          ${z("evo_scenario_desc")}
          `))}(),fs("evolution","junker"),(t.stats.achieve.shaken||t.sim)&&fs("evolution","cataclysm"),(t.stats.achieve.whitehole||t.stats.achieve.ascended||t.sim)&&fs("evolution","banana"),(t.stats.achieve.ascended||t.stats.achieve.corrupted||t.sim)&&fs("evolution","truepath"),(t.stats.achieve.retired||t.sim)&&fs("evolution","lone_survivor"),t.sim?function(){let a=$('
          ');$("#evolution").append(a),a.append($(`

          ${z("evo_challenge_simulation")}

          `)),a.append($(`
          ${z("evo_challenge_simulation_desc")}
          `)),a.append($(``)),ic({el:"#simSection",data:{},methods:{exitsim(){t.hasOwnProperty("sim")&&(t.stats=Ac(t.sim.stats),t.prestige=Ac(t.sim.prestige),t.genes=Ac(t.sim.genes),t.blood=Ac(t.sim.blood),t.pillars=Ac(t.sim.pillars),t.race=Ac(t.sim.race),delete t.sim,t.race.species="protoplasm",delete t.race.simulation,e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w&&P.w.terminate(),window.location.reload())}}})}():t.race.simulation&&function(){let e=$('
          ');$("#evolution").append(e),e.append($(`

          ${z("evo_challenge_simulation")}

          `)),e.append($(`
          ${z("evo_challenge_simulation_desc")}
          `));let a=$($('
          '));e.append(a),t.race.simConfig||(t.race.simConfig={}),["Plasmid","AntiPlasmid","Phage","Dark","Harmony","AICore","Artifact","Blood_Stone"].forEach((function(e){t.race.simConfig[e]=t.race.simConfig[e]||0,a.append($(`
          ${z(`resource_${e}_name`)}
          `))})),ic({el:"#simSection",data:t.race.simConfig})}()}function Jr(e,a){let r=t.race.orbit_decay?"orbit_decayed":"cataclysm",s=function(e,t,a){return"space"===a?e.hasOwnProperty("trait")?e.trait.push(t):e.trait=[t]:"tauceti"===a?e.reqs.isolation=1:e.hasOwnProperty("not_trait")?e.not_trait.push(t):e.not_trait=[t],e};switch(e){case"bonfire":return s({id:`${a}-bonfire`,title:z("city_bonfire"),desc:z("city_bonfire_desc"),category:"outskirts",wiki:!1,reqs:{primitive:3},condition:()=>Ec("summer"),queue_complete:()=>0,effect(){let e=2.5*t.resource.Thermite.diff/(2.5*t.resource.Thermite.diff+500)*500,a=1e5+9e3*t.stats.reset;a>1e6&&(a=1e6);let r=t.resource.Thermite.amount${z("city_bonfire_effect3",[a.toLocaleString()])}
          ${z("city_bonfire_effect4",[(+t.resource.Thermite.amount.toFixed(0)).toLocaleString(),a.toLocaleString()])}
          `:"";return`
          ${z("city_bonfire_effect",[t.resource.Thermite.diff])}
          ${z("city_bonfire_effect2",[+e.toFixed(1)])}
          ${r}`},action:()=>!1,flair:()=>z("city_bonfire_flair")},r,a);case"firework":return s({id:`${a}-firework`,title:z("city_firework"),desc:z("city_firework"),category:"outskirts",wiki:!1,reqs:{mining:3},condition:()=>Ec("firework")&&t[a].firework&&(t.tech.cement||t.race.flier),cost:{Money:()=>0===t[a].firework.count?5e4:0,Iron:()=>0===t[a].firework.count?7500:0,Cement:()=>0===t[a].firework.count?1e4:0},queue_complete:()=>1-t[a].firework.count,switchable:()=>!0,effect:()=>0===t[a].firework.count?z("city_firework_build"):z("city_firework_effect"),action(){return!(0!==t[a].firework.count||!Cs($(this)[0])||(t[a].firework.count=1,0))}},r,a);case"assembly":{let e=function(e){let a=Pe(e);return t.race.promiscuous&&(a/=1+di.promiscuous.vars()[1]*t.race.promiscuous),Math.round(a)};return s({id:`${a}-assembly`,title:z("city_assembly"),desc:()=>z("city_assembly_desc",[_i[t.race.species].name]),category:"military",reqs:{},trait:["artifical"],queue_complete:()=>t.resource[t.race.species].max-t.resource[t.race.species].amount,cost:{Money:a=>t.resource[t.race.species].amount?Xi("citizen",a,e(125),1.01):0,Copper:a=>t.race.deconstructor?0:t.resource[t.race.species].amount>=5?Xi("citizen",a,e(50),1.01):0,Aluminium:a=>t.race.deconstructor?0:t.resource[t.race.species].amount>=5?Xi("citizen",a,e(50),1.01):0,Nanite:a=>t.race.deconstructor&&t.resource[t.race.species].amount>=3?Xi("citizen",a,e(500),1.01):0},effect(){let e="";return t.resource[t.race.species].max===t.resource[t.race.species].amount&&(e=`
          ${z("city_assembly_effect_warn")}
          `),`
          ${z("city_assembly_effect",[_i[t.race.species].name])}
          ${e}`},action(){return!!(t.race.vax&&t.race.vax>=100)||!!(t.resource[t.race.species].max>t.resource[t.race.species].amount&&Cs($(this)[0]))&&(t.resource[t.race.species].amount++,!0)}},r,a)}case"nanite_factory":return s({id:`${a}-nanite_factory`,title:z("city_nanite_factory"),desc:z("city_nanite_factory"),category:"industrial",reqs:{},trait:["deconstructor"],region:"city",cost:{Money:e=>Xi("nanite_factory",e,25e3,zs(1.25)),Copper:e=>Xi("nanite_factory",e,1200,zs(1.25)),Steel:e=>Xi("nanite_factory",e,1e3,zs(1.25))},effect(){let e=Nr(2500);return`
          ${z("city_nanite_factory_effect",[t.resource.Nanite.name])}
          ${z("plus_max_resource",[e,t.resource.Nanite.name])}.
          `},special:!0,action(){return!!Cs($(this)[0])&&(t.city.nanite_factory.count++,t.settings.showIndustry=!0,Qs(),!0)},flair:z("city_nanite_factory_flair")},r,a);case"captive_housing":return s({id:`${a}-captive_housing`,title:z("city_captive_housing"),desc:z("city_captive_housing_desc"),category:"residential",reqs:{unfathomable:1},trait:["unfathomable"],region:"city",cost:{Money:e=>Xi("captive_housing",e,40,1.35),Lumber:e=>Xi("captive_housing",e,30,1.35),Stone:e=>Xi("captive_housing",e,18,1.35)},effect(){let e="";t.race.artifical||t.race.detritivore||t.race.carnivore||t.race.soul_eater||(e+=`
          ${z("city_captive_housing_cattle",[t.city.hasOwnProperty("captive_housing")?t.city.captive_housing.cattle:0,t.city.hasOwnProperty("captive_housing")?t.city.captive_housing.cattleCap:0])}
          `);let a=0;if(t.city.hasOwnProperty("surfaceDwellers"))for(let r=0;r${z("city_captive_housing_broken",[_i[s].name,i])}`,e+=`
          ${z("city_captive_housing_untrained",[_i[s].name,c])}
          `}return e+=`
          ${z("city_captive_housing_capacity",[a,t.city.hasOwnProperty("captive_housing")?t.city.captive_housing.raceCap:0])}
          `,t.tech.unfathomable&&t.tech.unfathomable>=2&&(e+=`
          ${z("plus_max_resource",[1,z("job_torturer")])}
          `),e},action(){if(Cs($(this)[0])){t.city.captive_housing.count++;let e=t.city.captive_housing.count;return t.city.captive_housing.raceCap=e*(t.tech.unfathomable&&t.tech.unfathomable>=3?3:2),t.city.captive_housing.cattleCap=5*e,!0}return!1}},r,a);case"horseshoe":return s({id:`${a}-horseshoe`,title:()=>z(`city_${Gc(!0)}`,[Gc(!1)]),desc:()=>z(`city_${Gc(!0)}_desc`,[Gc(!1)]),category:"outskirts",reqs:{primitive:3},condition:()=>t.race.hooved||Ec("fool",2023),inflation:!1,cost:{Lumber(e){let a=(t.race.shoecnt||0)+(e||0);return t.race.kindling_kindred||t.race.smoldering||t.resource.Copper.display&&!(a<=12)?0:Math.round((a>12?25:5)*(a<=5?1:a-4)*(di.hooved.vars()[0]/100))},Copper(e){let a=(t.race.shoecnt||0)+(e||0),r=!t.race.kindling_kindred&&!t.race.smoldering;return(!r||r&&a>12&&t.resource.Copper.display)&&(!t.resource.Iron.display||a<=75)?Math.round((a>75?20:5)*(a<=12?1:a-11)*(di.hooved.vars()[0]/100)):0},Iron(e){let a=(t.race.shoecnt||0)+(e||0);return t.resource.Iron.display&&a>75&&(!t.resource.Steel.display||a<=150)?Math.round((a<=150?12:28)*a*(di.hooved.vars()[0]/100)):0},Steel(e){let a=(t.race.shoecnt||0)+(e||0);return t.resource.Steel.display&&a>150&&(!t.resource.Adamantite.display||a<=500)?Math.round((a<=500?40:100)*a*(di.hooved.vars()[0]/100)):0},Adamantite(e){let a=(t.race.shoecnt||0)+(e||0);return t.resource.Adamantite.display&&a>500&&(!t.resource.Orichalcum.display||a<=5e3)?Math.round((a<=5e3?5:25)*a*(di.hooved.vars()[0]/100)):0},Orichalcum(e){let a=(t.race.shoecnt||0)+(e||0);return t.resource.Orichalcum.display&&a>5e3?Math.round((25*a-12e4)*(di.hooved.vars()[0]/100)):0}},action(){return!(t.race.hooved||!Ec("fool",2023))||!(!t.resource.Horseshoe.display||!Cs($(this)[0]))&&(t.resource.Horseshoe.amount++,t.race.shoecnt++,!(5001===t.race.shoecnt&&t.resource.Orichalcum.display||501===t.race.shoecnt&&t.resource.Adamantite.display||151===t.race.shoecnt&&t.resource.Steel.display||76===t.race.shoecnt&&t.resource.Iron.display||13===t.race.shoecnt&&t.resource.Copper.display&&t.resource.Lumber.display)||0)}},r,a)}}function Yr(e,a){a=a||"evo";let r=t.evolution.final||0;return(t.tech[a]&&t.tech[a]===e||t.evolution.gselect)&&r<100}const Xr=["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"];if(Xr.forEach((e=>Zr.evolution[e]={id:`evolution-${e}`,title:()=>_i[e].name,desc:()=>`${z("evo_evolve")} ${_i[e].name}`,reqs:{evo:7},grant:["evo",8],condition:()=>(t.race.seeded||t.stats.achieve.mass_extinction&&t.stats.achieve.mass_extinction.l>=1||t.stats.achieve[`extinct_${e}`]&&t.stats.achieve[`extinct_${e}`].l>=1)&&t.tech[`evo_${_i[e].type}`]>=2&&100===t.evolution.final&&!t.race.evoFinalMenu,cost:{RNA:()=>320,DNA:()=>320},race:!0,effect:()=>`${"string"==typeof _i[e].desc?_i[e].desc:_i[e].desc()} ${z("evo_complete")}`,action(){if(Cs($(this)[0])){if(["synth","custom"].includes(e))return function(e){if(("synth"===e||"custom"===e&&t.custom.race0.traits.includes("imitation"))&&Object.keys(t.stats.synth).length>1)return t.race.evoFinalMenu=e,as(),!0;t.race.species=e,Ns()}(e);t.race.species=e,Ns()}return!1},queue_complete:()=>t.tech.evo&&7===t.tech.evo?1:0,emblem:()=>Oc(`extinct_${e}`)})),Object.keys(t.stats.synth).length>1){let e=Ac(Xr);e.push("junker"),e.push("sludge"),e.forEach((e=>Zr.evolution[`s-${e}`]={id:`evolution-s-${e}`,title:()=>_i[e].name,desc:()=>`${z("evo_imitate")} ${_i[e].name}`,reqs:{evo:8},grant:["evo",9],condition:()=>t.stats.synth[e]&&t.race.evoFinalMenu,cost:{},race:!0,effect:()=>z("evo_imitate_race",[_i[e].name]),action:()=>(t.stats.synth[e]&&(t.race.species=t.race.evoFinalMenu,t.race.srace=e,Ns()),!1),queue_complete:()=>t.tech.evo&&8===t.tech.evo?1:0}))}const es={plasmid:"no_plasmid",mastery:"weak_mastery",trade:"no_trade",craft:"no_craft",crispr:"no_crispr",nerfed:"nerfed",badgenes:"badgenes"};Object.keys(es).forEach((e=>Zr.evolution[e]={id:`evolution-${e}`,title:z(`evo_challenge_${e}`),desc:z(`evo_challenge_${e}`),condition:()=>t.evolution.hasOwnProperty(e),cost:{DNA:()=>10},challenge:!0,effect:()=>rs(e),action(){return Cs($(this)[0])&&(t.race[es[e]]?(delete t.race[es[e]],$(`#${$(this)[0].id}`).removeClass("hl"),(t.race.truepath||t.race.lone_survivor)&&(delete t.race.nerfed,delete t.race.badgenes),["junker","cataclysm","banana","truepath","lone_survivor"].forEach((function(e){delete t.race[e],$(`#evolution-${e}`).removeClass("hl")}))):(t.race[es[e]]=1,$(`#${$(this)[0].id}`).addClass("hl")),Vr(),ro()),!1},highlight:()=>!!t.race[es[e]],queue_complete:()=>0}));const ts={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"},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"}};function as(){if((t.settings.tabLoad||0===t.settings.civTabs)&&"bigbang"!==t.race.universe&&(!t.race.seeded||t.race.chose)){if(t.tech.evo_challenge){let e=$("#evolution .evolving").nextAll();Object.values(e).forEach((function(e){sc($(e),!0)})),sc($("#evolution .evolving"),!0)}Object.keys(Zr.evolution).forEach((function(e){if(!Zr.evolution[e].challenge){Ps(Zr.evolution[e].id);var a=!0;Zr.evolution[e].hasOwnProperty("reqs")&&Object.keys(Zr.evolution[e].reqs).forEach((function(r){(!t.tech[r]||t.tech[r]=2&&Ts(),t.tech.evo_challenge&&Vr())}}function rs(e){switch(e){case"nerfed":return z(`evo_challenge_${e}_effect`,"antimatter"===t.race.universe?["20%","50%","50%","33%"]:["50%","20%","50%","33%"]);case"badgenes":return z(`evo_challenge_${e}_effect`,[1,2]);case"orbit_decay":return uc()>=100?`
          ${z("evo_challenge_orbit_decay_effect",[5e3])}
          ${z("evo_challenge_scenario_failwarn")}
          `:`
          ${z("evo_challenge_orbit_decay_effect",[5e3])}
          ${z("evo_challenge_scenario_failwarn")}
          ${z("evo_challenge_scenario_warn")}
          `;case"junker":return"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
          ${z("evo_challenge_junker_effect")}
          ${z("evo_warn_unwise")}
          `:z("evo_challenge_junker_effect");case"cataclysm":return uc()>=50?`
          ${z("evo_challenge_cataclysm_effect")}
          ${z("evo_challenge_cataclysm_warn")}
          `:`
          ${z("evo_challenge_cataclysm_effect")}
          ${z("evo_challenge_scenario_warn")}
          `;default:return z(`evo_challenge_${e}_effect`)}}function ss(){let e;if("antimatter"===t.race.universe||t.race.no_plasmid){let a=t.tech.anthropology&&t.tech.anthropology>=1?1.6:1;if(t.tech.fanaticism&&t.tech.fanaticism>=2){let e=la(t.civic.professor.workers,"professor")*("antimatter"===t.race.universe?.02:.04);t.race.high_pop&&(e=Pe(e)),a+=+e.toFixed(2)}if(t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display){let e=t.genes.ancients>=5?.015:t.genes.ancients>=3?.0125:.01;t.race.high_pop&&(e=Pe(e)),a+=e*la(t.civic.priest.workers,"priest")}"antimatter"===t.race.universe&&(a/=2),t.race.spiritual&&(a*=1+di.spiritual.vars()[0]/100);let r=Oi("seraph");if(r>0&&(a*=1+di.spiritual.vars(1)[0]/100*r),"theocracy"===t.civic.govern.type&&(a*=1+re.theocracy()[0]/100),t.race.ooze&&(a*=1-di.ooze.vars()[1]/100),a=+a.toFixed(3),e=`
          ${z("city_temple_effect1",[a])}
          `,"antimatter"===t.race.universe){let a=6;if(t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display){let e=t.genes.ancients>=5?.12:t.genes.ancients>=3?.1:.08;t.race.high_pop&&(e=Pe(e)),a+=e*la(t.civic.priest.workers,"priest")}e+=`
          ${z("city_temple_effect5",[a.toFixed(2)])}
          `}}else{let a=t.tech.anthropology&&t.tech.anthropology>=1?8:5;if(t.tech.fanaticism&&t.tech.fanaticism>=2){let e=.2*la(t.civic.professor.workers,"professor");t.race.high_pop&&(e=Pe(e)),a+=+e.toFixed(1)}if(t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display){let e=t.genes.ancients>=5?.15:t.genes.ancients>=3?.125:.1;t.race.high_pop&&(e=Pe(e)),a+=e*la(t.civic.priest.workers,"priest")}t.race.spiritual&&(a*=1+di.spiritual.vars()[0]/100);let r=Oi("seraph");r>0&&(a*=1+di.spiritual.vars(1)[0]/100*r),"theocracy"===t.civic.govern.type&&(a*=1+re.theocracy()[0]/100),t.race.ooze&&(a*=1-di.ooze.vars()[1]/100),t.race.orbit_decayed&&t.race.truepath&&(a*=.1),a=+a.toFixed(3),e=`
          ${z("city_temple_effect2",[a])}
          `}return t.tech.fanaticism&&t.tech.fanaticism>=3&&(e+=`
          ${z("city_temple_effect3")}
          `),t.tech.anthropology&&t.tech.anthropology>=4&&(e+=`
          ${t.race.truepath?z("city_temple_effect_tp",[2,25]):z("city_temple_effect4")}
          `),e}function is(){let e=t.tech.gambling>=3?6e4:4e4;t.tech.gambling>=5&&(e+=t.tech.gambling>=6?24e4:6e4),e=Nr(e),t.race.gambler&&(e*=1+.04*t.race.gambler),t.tech.world_control&&(e*=1.25),t.race.truepath&&(e*=1.5),t.tech.stock_exchange&&t.tech.gambling>=4&&(e*=1+.05*t.tech.stock_exchange),t.race.inflation&&(e*=1+t.race.inflation/100),t.tech.isolation&&(e*=5.5),e=Math.round(e);let a=t.race.joyless?"":`
          ${z("city_max_entertainer",[ua(1)])}
          `,r=t.race.orbit_decayed||t.tech.isolation?`
          ${z("plus_max_resource",[ua(1),z("banker_name")])}
          `:"",s=`
          ${z("plus_max_resource",[`$${e.toLocaleString()}`,z("resource_Money_name")])}
          ${a}${r}
          ${z("city_max_morale",[1])}
          `,i=Math.log2(1+t.resource[t.race.species].amount)*(t.race.gambler?2.5+t.race.gambler/10:2.5);return t.tech.gambling&&t.tech.gambling>=2&&(i*=t.tech.gambling>=5?2:1.5),t.tech.stock_exchange&&t.tech.gambling>=4&&(i*=1+.01*t.tech.stock_exchange),"corpocracy"===t.civic.govern.type&&(i*=3),"socialist"===t.civic.govern.type&&(i*=.8),t.race.inflation&&(i*=1+t.race.inflation/1250),t.tech.isolation&&(i*=1.25,t.tech.iso_gambling&&(i*=1+.05*la(t.civic.banker.workers,"banker"))),i=+i.toFixed(2),s+=`
          ${z("tech_casino_effect2",[i])}
          `,s}function cs(e,a,r,s){return((t.evolution.hasOwnProperty(e)?t.evolution[e].count:0)+(s||0))*r+a}function os(e){return t.stats.achieve.blackhole&&(e*=1+.05*t.stats.achieve.blackhole.l),Math.round(e)}function ns(){let e=1.25*(t.tech.storage-1)+1;t.tech.storage>=3&&(e*=t.tech.storage>=4?3:1.5),t.race.pack_rat&&(e*=1+di.pack_rat.vars()[1]/100);let a=Oi("kobold");return a>0&&(e*=1+di.pack_rat.vars(1)[1]/100*a),t.tech.storage>=6&&(e*=1+t.tech.supercollider/20),t.tech.tp_depot&&(e*=1+t.tech.tp_depot/20),t.tech.shelving&&t.tech.shelving>=3&&(e*=1.5),t.stats.achieve.blackhole&&(e*=1+.05*t.stats.achieve.blackhole.l),e*=t.tech.world_control?3:1,t.race.ascended&&(e*=1.1),t.blood.hoarder&&(e*=1+t.blood.hoarder/100),t.tech.storage>=7&&t.interstellar.cargo_yard&&(e*=1+t.interstellar.cargo_yard.count*u/100),e}function ls(e){if((t.race.kindling_kindred||t.race.smoldering)&&"lumber"===e)return!1;if((t.race.kindling_kindred||t.race.smoldering)&&"stone"===e)return!0;let a=t.race.truepath?"truepath":"standard";if(Zr.city[e].hasOwnProperty("path")&&!Zr.city[e].path.includes(a))return!1;var r=!0;return Object.keys(Zr.city[e].reqs).forEach((function(a){(!t.tech[a]||t.tech[a]=3&&(s=!0,t.r_queue.queue.forEach((function(e){ds(e.type,!1)&&(a[Zr[e.action][e.type].grant[0]]={v:Zr[e.action][e.type].grant[1],a:e.type})})),Object.keys(i).forEach((function(r){let i=t.tech[r]||0;us(r,t.tech[r])||(!a[r]||a[r].vi+1)&&(s=!1)}))),!(!r&&!s||t.tech[Zr.tech[e].grant[0]]&&!(t.tech[Zr.tech[e].grant[0]]`).appendTo("#city").append(`

          ${z(`city_dist_${a}`)}

          `),e[a].forEach((function(e){fs("city",e)})),Ei(`dist-${a}`,(function(){return z(`city_dist_${a}_desc`)}),{elm:`#city-dist-${a} h3`,classes:"has-background-light has-text-dark"})}}))}function gs(){if(!t.settings.tabLoad&&3!==t.settings.civTabs)return;let e={},a={},r={},s=[],i=[],c=[];["primitive","civilized","discovery","industrialized","globalized","early_space","deep_space","interstellar","intergalactic"].forEach((function(e){r[e]=[]}));const o={interstellar:"solar"};let n={};Object.keys(Zr.tech).forEach((function(l){if(!function(e){let a=t.race.truepath?"truepath":"standard";return!(!Qr[a].includes(Zr.tech[e].era)&&!Zr.tech[e].hasOwnProperty("path")||Zr.tech[e].hasOwnProperty("path")&&!Zr.tech[e].path.includes(a))}(l))return;Ps(Zr.tech[l].id);let u=function(e){let a=Zr.tech[e].grant[0];if(t.tech[a]&&t.tech[a]>=Zr.tech[e].grant[1]){if("fanaticism"!==e&&"anthropology"!==e&&"deify"!==e&&"study"!==e)return!0;if("fanaticism"===e&&t.tech.fanaticism)return!0;if("anthropology"===e&&t.tech.anthropology)return!0;if("deify"===e&&t.tech.ancient_deify)return!0;if("study"===e&&t.tech.ancient_study)return!0}return!1}(l),d=Zr.tech[l],_="category"in d?d.category:"research";if(u||-1!==s.indexOf(_)||s.push(_),u&&-1===i.indexOf(_)&&i.push(_),-1===c.indexOf(_)&&c.push(_),!0===u)_ in a||(a[_]=[]),a[_].push(l);else{let a=Zr.tech[l];if(!_s(a))return;let s=ds(l,n);if(!s)return;_ in e||(e[_]=[]);let i=t.race.truepath&&o[a.era]?o[a.era]:a.era;r.hasOwnProperty(i)||(r[i]=[]),r[i].push({t:l,p:"precog"===s})}})),sc($("#tech")),Object.keys(r).forEach((function(e){r[e].length>0&&($("#tech").append(`

          ${z(`tech_era_${e}`)}

          `),r[e].sort((function(e,t){return null==Zr.tech[e.t].cost.Knowledge?-1:null==Zr.tech[t.t].cost.Knowledge||Zr.tech[e.t].cost.Knowledge()>Zr.tech[t.t].cost.Knowledge()?1:-1})),r[e].forEach((function(e){fs("tech",e.t,!1,!!e.p&&n)})))})),c.forEach((function(e){sc($(`#tech-dist-${e}`),!0),sc($(`#tech-dist-old-${e}`),!0)})),i.forEach((function(e){if(!(e in a))return;$(`
          `).appendTo("#oldTech").append(`

          ${z(`tech_dist_${e}`)}

          `);let t=qc(4,12,!1);t.length>0&&"science"===e&&$("#tech-dist-old-science h3").append(t),a[e].forEach((function(e){fs("tech",e,!0,!1)}))}))}function fs(e,t,a,r){vs(Zr[e][t],e,t,a,r)}function vs(e,a,r,s,i){if(!1===_s(e))return;let c=a;"outerSol"===a&&(a="space"),e.region&&(a=e.region),e.powered&&!t[a][r].on&&(t[a][r].on=0);let o=e.id;Ps(o);let n="";i&&e&&e.reqs&&Object.keys(e.reqs).forEach((function(e){i[e]&&(n+=` data-req-${e}="${i[e].a}"`)}));let l,u=e.highlight&&e.highlight()?$(`
          `):$(`
          `);if(js(e,!1,["genes","blood"].includes(a))||u.addClass("cna"),js(e,!0,["genes","blood"].includes(a))||u.addClass("cnam"),s)l=$('{{ title }}');else{let t="",r="";if(e.cost){let s="genes"!==a&&"blood"!==a?fc(e):e.cost;Object.keys(s).forEach((function(e){let a=s[e]();a>0&&(t+=` res-${e}`,r+=` data-${e}="${a}"`)}))}let s="";e.class&&(s="function"==typeof e.class?` ${e.class()}`:` ${e.class}`),i&&(s=" precog");let c=e.highlight?e.highlight()?`${z("active")}`:`${z("not_active")}`:"";l=$(`${c}{{ title }} description`)}if(u.append(l),e.hasOwnProperty("special")&&("function"==typeof e.special&&e.special()||!0===e.special)){let e=$('
          \n \n
          ');u.append(e)}if(e.on||e.off){if(e.on){let e=$('');u.append(e)}if(e.off){let e=$('');u.append(e)}}else if(e.powered&&t.tech.high_tech&&t.tech.high_tech>=2&&ps(e)||e.switchable&&e.switchable()){let t=$(``),a=$(``);u.append(t),u.append(a)}if(e.count){let t=e.count();t>1&&l.append($(`${t}`))}else"tech"!==a&&t[a]&&t[a][r]&&t[a][r].count>=0?l.append($('{{ act.count }}')):"blood"===a&&t[a]&&t[a][e.grant[0]]&&t[a][e.grant[0]]>0&&"*"===e.grant[1]&&l.append($(` ${t[a][e.grant[0]]} `));if("tech"!==a&&t[a]&&t[a][r]&&void 0!==t[a][r].repair&&l.append($('
          ')),s?$("#oldTech").append(u):$("#"+c).append(u),"tech"!==a&&t[a]&&t[a][r]&&0===t[a][r].count&&($(`#${o} .count`).css("display","none"),$(`#${o} .special`).css("display","none"),$(`#${o} .on`).css("display","none"),$(`#${o} .off`).css("display","none")),e.emblem){let t=e.emblem();u.append($(t))}let d={template:''};ic({el:"#"+o,data:{title:"string"==typeof e.title?e.title:e.title(),act:t[a][r]},methods:{action(){"ontouchstart"in document.documentElement&&navigator.userAgent.match(t.settings.touch)||ys(e,a,r)},describe(){M(function(e,a){let r="string"==typeof e.desc?e.desc:e.desc();if(r+=". ",e.cost&&!a){r=js(e)?r+z("affordable")+". ":r+z("not_affordable")+". ",r+="Costs: ";let a=e.id.split("-")[0];var s="genes"!==a&&"blood"!==a?fc(e):e.cost;Object.keys(s).forEach((function(e){if("Custom"===e){let t=s[e]();r+=t.label}else if("Structs"===e){let a=s[e]();Object.keys(a).forEach((function(e){Object.keys(a[e]).forEach((function(s){let i="";if(a[e][s].hasOwnProperty("s")){let t=a[e][s].s;i="string"==typeof Zr[e][t][s].title?Zr[e][t][s].title:Zr[e][t][s].title()}else i="string"==typeof Zr[e][s].title?Zr[e][s].title:Zr[e][s].title();r+=`${i}. `,t[e][s]?a[e][s].count>t[e][s].count?r+=`${z("insufficient")} ${i}. `:a[e][s].hasOwnProperty("on")&&a[e][s].on>t[e][s].on&&(r+=`${z("insufficient")} ${i} enabled. `):r+=`${z("insufficient")} ${i}. `}))}))}else if(t.prestige.hasOwnProperty(e)){let a=s[e]();if(a>0){"Plasmid"===e&&"antimatter"===t.race.universe&&(e="AntiPlasmid");let s=z(`resource_${e}_name`);r+=`${s}: ${a}. `,t.prestige[e].count0){let s=z(`resource_${e}_name`);r+=`${s}: ${a}. `,t.portal.purifier.supply0){let e="Money"===i?"$":t.resource[i].name+": ";e=e.replace("_"," ");let s=q(a,1);r+=`${e}${s}. `,t.resource[i].amount0&&(clearInterval(t),As(e,r))}),50)}},on_label:()=>`on: ${t[a][r].on}`,off_label:()=>"off: "+(t[a][r].count-t[a][r].on),power_on(){let s=b();for(let e=0;e0;e++)t[a][r].on--;e.postPower&&setTimeout((function(){e.postPower(!1)}),250)},repair:()=>t[a][r].repair,repairMax:()=>e.repair()},filters:{val(t){switch(t){case"on":return e.on();case"off":return e.off()}},p_off(e,s){let i=t[a][r].count-e;if("city-casino"===s&&!t.race.cataclysm&&!t.race.orbit_decayed||"space-spc_casino"===s&&(t.race.cataclysm||t.race.orbit_decayed)||"tauceti-tauceti_casino"===s&&t.tech.isolation){let e=xc(5,12);if(0===i&&e.length>0)return e}return i},p_on(e,a){if("city-biolab"===a&&!t.race.cataclysm&&!t.race.orbit_decayed||(t.race.cataclysm||t.race.orbit_decayed)&&"space-exotic_lab"===a||t.tech.isolation&&"tauceti-infectious_disease_lab"===a){let t=xc(12,12);if(0===e&&t.length>0)return t}else if("city-garrison"===a||"space-space_barracks"===a){let t=qc(1,14,!0);if(e===("city-garrison"===a?13:0)&&t.length>0)return t}return e},title:e=>e,options:e=>z("action_options",[e])}}),Ei(o,(function(){}),{in:function(i){Ms(i.popper,e,t[a][r],s,a,r)},out:function(){ic({el:"#popTimer"},"destroy")},attach:"starDock"===a?"body .modal":"#main",wide:e.wide})}function ys(e,a,r){if("spcdock-launch_ship"===e.id)e.action();else switch(a){case"tech":if(t.settings.qKey&&y.q||!ds(r,!1)||!e.action()){if((!e.no_queue||!e.no_queue())&&t.tech.r_queue&&t.r_queue.queue.length0){let n=t.settings.qKey?s:1;n>t.queue.max-i&&(n=t.queue.max-i);let l=e.queue_size?e.queue_size:1;if(e.region&&(a=e.id.split("-")[0]),"merge_never"!==t.settings.q_merge)t.queue.queue.length>0&&t.queue.queue[t.queue.queue.length-1].id===e.id?t.queue.queue[t.queue.queue.length-1].q+=Math.min(o,l*n):t.queue.queue.push({id:e.id,action:a,type:r,label:"string"==typeof e.title?e.title:e.title(),cna:!1,time:0,q:Math.min(o,l*n),qs:l,t_max:0,bres:!1});else for(let s=0;s0;s++)t.queue.queue.push({id:e.id,action:a,type:r,label:"string"==typeof e.title?e.title:e.title(),cna:!1,time:0,q:Math.min(o,l),qs:l,t_max:0,bres:!1}),o-=l;c=!0}}break}t.race.inflation&&t.tech.primitive&&(e.hasOwnProperty("inflation")&&!e.inflation||t.race.inflation++),i=!0}if(i&&(bs(e,a,r),t.tech.queue&&e.queue_complete)){let a=e.queue_complete();for(let r=0,s=0;sa?(i.q=a,a=0):a-=i.q)}}c&&Wi();break}}}function bs(e,a,r){if(!js(e)){let t=e.id;$(`#${t}`).addClass("cna")}if(e.grant){let a=e.grant[0];(!t.tech[a]||t.tech[a]=4&&t.custom.planet&&e.custom&&e.custom.length>0&&0===Math.floor(g(0,10))){c=e.custom[Math.floor(g(0,e.custom.length))];let o=c.split(":");if(t.custom.planet[o[0]]&&t.custom.planet[o[0]][o[1]]){let e=Ac(t.custom.planet[o[0]][o[1]]);a=e.biome,r=e.traitlist,s=e.orbit,i=e.geology,r.sort()}else c=!1}if(!c){a=xs("biome",e),r=xs("trait",e,{biome:a}),r.sort();let c=Math.floor(g(0,3)),o=30;t.stats.achieve.whitehole&&(o+=5*t.stats.achieve.whitehole.l,c+=t.stats.achieve.whitehole.l),"eden"===a&&(o+=5);for(let e=0;e`),_=$(`${u}`);d.append(_),$("#evolution").append(d);let p=!1,h=0;return Ei(n,(function(e){p=e,$s(e,u,a,s,r,i,h)}),{classes:"has-background-light has-text-dark"}),$("#"+n).on("click",(function(){if(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=5&&t.race.hasOwnProperty("geck")&&t.race.geck>0){if(Object.keys(i).forEach((function(e){i[e]+=Math.floor(g(0,7))/100})),h>0){let t=8-h;t<1&&(t=1),0===Math.floor(g(0,t))&&(a=xs("biome",e))}if(0===Math.floor(g(0,2))){let t=xs("trait",e,{biome:a,cap:1});if(t.length>0){if(r.includes(t[0])){let e=r.indexOf(t[0]);r.splice(e,1)}else void 0!==t[0]&&r.push(t[0]);l="",r.forEach((function(e){Fi.hasOwnProperty(e)&&(l+=`${Fi[e].label} `)}))}}u=`${l}${Si[a].label} ${o}`,$(`#${n} .aTitle`).html(u),h++,t.race.geck--,t.race.hasOwnProperty("gecked")||(t.race.gecked=0),t.race.gecked++,sc(p.popper),$s(p,u,a,s,r,i,h)}else delete t.race.geck,t.race.gecked&&(t.stats.geck+=t.race.gecked),t.race.chose=n,t.city.biome=a,t.city.calendar.orbit=s,t.city.geology=i,t.city.ptrait=r,h>0&&(t.race.rejuvenated=!0),sc($("#evolution")),Ii(),as()})),c||("eden"===a?"hellscape":a)}function $s(e,t,a,r,s,i,c){e.popper.append($(`
          ${z("set_planet",[t,Si[a].label,r])}
          `)),e.popper.append($(`
          ${Si[a].desc}
          `)),s.length>0&&s.forEach((function(t){e.popper.append($(`
          ${Fi[t].desc}
          `))}));let o=qs(i);o.length>0&&e.popper.append($(`
          ${o}
          `)),c&&c>0&&e.popper.append($(`
          ${z("rejuvenated")}
          `))}function xs(e,a,r){if(r=r||{},"biome"===e){let e="grassland",r=!a.hell&&t.stats.portals>=1?7:6,s=0===Math.floor(g(0,3)),i=Xc();switch(Math.floor(g(0,r))){case 0:e=s&&t.stats.achieve.biome_grassland&&t.stats.achieve.biome_grassland[i]&&t.stats.achieve.biome_grassland[i]>0?"savanna":"grassland";break;case 1:e=s&&t.stats.achieve.biome_oceanic&&t.stats.achieve.biome_oceanic[i]&&t.stats.achieve.biome_oceanic[i]>0?"swamp":"oceanic";break;case 2:e=s&&t.stats.achieve.biome_forest&&t.stats.achieve.biome_forest[i]&&t.stats.achieve.biome_forest[i]>0?0===Math.floor(g(0,2))?"taiga":"swamp":"forest";break;case 3:e=s&&t.stats.achieve.biome_desert&&t.stats.achieve.biome_desert[i]&&t.stats.achieve.biome_desert[i]>0?"ashland":"desert";break;case 4:e=s&&t.stats.achieve.biome_volcanic&&t.stats.achieve.biome_volcanic[i]&&t.stats.achieve.biome_volcanic[i]>0?"ashland":"volcanic";break;case 5:e=s&&t.stats.achieve.biome_tundra&&t.stats.achieve.biome_tundra[i]&&t.stats.achieve.biome_tundra[i]>0?"taiga":"tundra";break;case 6:e="evil"===t.race.universe?"eden":"hellscape";break;default:e="grassland"}return e}if("trait"===e){let e=[],t=r.cap||2;for(let a=0;a0&&(s+=t.race.replicator.pow),!(t.city.hasOwnProperty("powered")&&s>=e.powered()&&(t[r[0]][r[1]].on++,t.race.hasOwnProperty("governor")&&t.race.governor.hasOwnProperty("tasks")&&t.race.hasOwnProperty("replicator")&&Object.values(t.race.governor.tasks).includes("replicate")&&t.race.governor.config.replicate.pow.on&&t.race.replicator.pow>0&&(t.city.power-=e.powered(),G.replicate.task()),a&&"function"==typeof a))||a(e)}return!1}function qs(e){let a="";if(Object.keys(e).length>0){let r="",s="",i=t.stats.achieve.miners_dream?t.stats.achieve.miners_dream.l>=4?2*t.stats.achieve.miners_dream.l-3:t.stats.achieve.miners_dream.l:0;t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=0&&i++;for(let t in e)if(0!==t)if(e[t]>0){let a=`
          ${z(`resource_${t}_name`)}`;i>0?(a+=`: +${Math.round(100*(e[t]+1)-100)}%`,i--):a+=`: ${z("bonus")}`,a+="
          ",r+=a}else if(e[t]<0){let a=`
          ${z(`resource_${t}_name`)}`;i>0?(a+=`: ${Math.round(100*(e[t]+1)-100)}%`,i--):a+=`: ${z("malus")}`,a+="
          ",s+=a}a=`
          ${r}${s}
          `}return a}function Ms(e,a,r,s,i,c,o){sc(e);var n="string"==typeof a.desc?a.desc:a.desc();o=o||!1;let l=!1;!(i&&c&&"ontouchstart"in document.documentElement&&navigator.userAgent.match(/Mobi/)&&t.settings.touch)||(l=$(`${a.hasOwnProperty("touchlabel")?a.touchlabel:z("construct")}`),e.append(l),$("#touchButton").on("touchstart",(function(){ys(a,i,c)}))),e.append($(`
          ${n}
          `));let u=a.id.split("-")[0];a.category&&"tech"===u&&!s&&e.append($(`
          ${z("tech_dist_category")}: ${z(`tech_dist_${a.category}`)}
          `));let d=ac(a,!1,!0);if(a.cost&&!s){let r=!0;var _=$('
          '),p="genes"!==u&&"blood"!==u?fc(a):a.cost;Object.keys(p).forEach((function(e){if("Custom"===e){let t=p[e]();_.append($(`
          ${t.label}
          `)),r=!1}else if("Structs"===e){let a=p[e]();Object.keys(a).forEach((function(e){Object.keys(a[e]).forEach((function(s){let i=a[e][s].hasOwnProperty("on")?a[e][s].on:a[e][s].count,c="has-text-dark",o="";t[e][s]?a[e][s].count>t[e][s].count?(c="has-text-danger",o=' (blocking resource)'):a[e][s].hasOwnProperty("on")&&a[e][s].on>t[e][s].on&&(c="has-text-alert"):(c="has-text-danger",o=' (blocking resource)');let n="";if(a[e][s].hasOwnProperty("s")){let t=a[e][s].s;n="string"==typeof Zr[e][t][s].title?Zr[e][t][s].title:Zr[e][t][s].title()}else n="string"==typeof Zr[e][s].title?Zr[e][s].title:Zr[e][s].title();r=!1,_.append($(`
          ${n}: ${i}${o}
          `))}))}))}else if(t.prestige.hasOwnProperty(e)){let a=p[e]();if(a>0){"Plasmid"===e&&"antimatter"===t.race.universe&&(e="AntiPlasmid");let s=z(`resource_${e}_name`),i="has-text-dark",c="";t.prestige[e].count(blocking resource)'),r=!1,_.append($(`
          ${s}: ${a}${c}
          `))}}else if("Supply"===e){let a=p[e]();if(a>0){let s=z(`resource_${e}_name`),i="has-text-dark",c="";t.portal.purifier.supply(blocking resource)'),r=!1,_.append($(`
          ${s}: ${a}${c}
          `))}}else if("Morale"!==e&&"Army"!==e&&"Bool"!==e){let a=p[e]();if(a>0){let s="",i="Species"===e?t.race.species:e;if("HellArmy"===e){let c=z("fortress_troops"),o="has-text-dark";t.portal.fortress.garrison-t.portal.fortress.patrols*t.portal.fortress.patrol_size(blocking resource)'):o="has-text-alert"),r=!1,_.append($(`
          ${c}: ${a}${s}
          `))}else{let s="Money"===i?"$":t.resource[i].name+": ";s=s.replace("_"," ");let c="has-text-dark",n="";t.resource[i].amount(blocking resource)'):c="has-text-alert",o&&o!==e&&d.r===i?(c+=" grad-from-left",n=' (first blocking resource)'):o&&o===e&&d.r!==i&&(c+=" grad-from-left-warn")):o&&o===e&&(c+=" grad-from-right",n=' (last blocking resource)');let l=q(a,1);r=!1,_.append($(`
          ${s}${l}${n}
          `))}}}})),r||e.append(_)}if(a.effect){var h="string"==typeof a.effect?a.effect:a.effect();h&&e.append($(`
          ${h}
          `))}if(a.flair){var m="string"==typeof a.flair?a.flair:a.flair();e.append($(`
          ${m}
          `)),e.addClass("flair")}if(a.reqs){let t=[];if(Object.keys(a.reqs).forEach((function(e){let r=$(`#${a.id}`).attr(`data-req-${e}`);r&&t.push("string"==typeof Zr.tech[r].title?Zr.tech[r].title:Zr.tech[r].title())})),t.length>0){let a=t.join(", ");e.append($(`
          ${z("requires_tech",[a])}
          `))}}if(!s&&"blood"!==a.id.substring(0,5)&&!js(a)&&js(a,!0)){if("string"==typeof r&&"notimer"===r)return;if(r&&r.time)e.append($('
          {{ time | timer }}
          ')),ic({el:"#popTimer",data:r,filters:{timer:e=>z("action_ready",[e])}});else{let t=cc(d.t);e.append($(`
          ${z("action_ready",[t])}
          `))}}("portal-spire"===a.id||"portal-waygate"===a.id&&t.tech.waygate>=2)&&r&&r.time&&(e.append($('
          {{ time | timer }}
          ')),ic({el:"#popTimer",data:r,filters:{timer:e=>z("floor_clearing",[!a.hasOwnProperty("mscan")||a.hasOwnProperty("mscan")&&a.mscan()>0?e:"???"])}}))}function Ps(e){sc($(`#${e}`),!0),Ii(e)}function Os(e,a,r){var s=e.id;t[a]&&t[a][r]&&t[a][r].count&&($(`#${s} .count`).html(t[a][r].count),t[a][r]&&t[a][r].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&&Ms($("#popper"),e,t[a][r],!1,a,r)}function Cs(e,a){return!!Ss(a=a||fc(e))&&(Object.keys(a).forEach((function(e){if(t.prestige.hasOwnProperty(e)){let r=a[e]();"Plasmid"===e&&"antimatter"===t.race.universe&&(e="AntiPlasmid"),t.prestige[e].count-=r}else if("Supply"===e){let r=a[e]();t.portal.purifier.supply-=r}else if("Morale"!==e&&"Army"!==e&&"HellArmy"!==e&&"Structs"!==e&&"Bool"!==e&&"Custom"!==e){let r=a[e](),s="Species"===e?t.race.species:e;t.resource[s].amount-=r,"Knowledge"===s&&(t.stats.know+=r)}})),!0)}function js(e,a,r){if(e.cost){let c=r?e.cost:fc(e);return a?(s=c,i=!0,Object.keys(s).forEach((function(e){if("Custom"===e);else if("Structs"===e){if(!Fs(s[e]()))return void(i=!1)}else if(t.prestige.hasOwnProperty(e)){let a=e;if("Plasmid"===e&&"antimatter"===t.race.universe&&(e="AntiPlasmid"),t.prestige[e].count0||t.resource[r].max>=0&&a>Number(t.resource[r].max)&&-1!==Number(t.resource[r].max))return void(i=!1)}})),i):Ss(c)}var s,i;return!0}function Ss(e){var a=!0;return Object.keys(e).forEach((function(r){if("Custom"===r){if(!e[r]().met)return void(a=!1)}else if("Structs"===r){if(!Fs(e[r]()))return void(a=!1)}else if(t.prestige.hasOwnProperty(r)){let s=r;if("Plasmid"===r&&"antimatter"===t.race.universe&&(r="AntiPlasmid"),t.prestige[r].count=0&&s>t.resource[i].max;if(s>Number(t.resource[i].amount)+t.resource[i].diff||c)return void(a=!1)}})),a}function Fs(e){let a=!0;return Object.keys(e).forEach((function(r){t.hasOwnProperty(r)?Object.keys(e[r]).forEach((function(s){t[r].hasOwnProperty(s)?(t[r][s].count${r}

          `));var s=$('
          ');switch($("#modalBox").append(s),a){case"smelter":case"hell_smelter":case"stellar_forge":case"hell_forge":case"geothermal":case"ore_refinery":Ws("smelter",s);break;case"factory":case"red_factory":case"int_factory":case"tau_factory":Ws("factory",s);break;case"star_dock":!function(e){if(t.tech.genesis<4){let t=$(`
          ${z("stardock_warn")}
          `);return void e.append(t)}let a=$('
          ');e.append(a),vs(Zr.starDock.probes,"starDock","probes"),t.tech.geck&&t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=5&&vs(Zr.starDock.geck,"starDock","geck"),t.tech.genesis>=5&&vs(Zr.starDock.seeder,"starDock","seeder"),6===t.tech.genesis&&vs(Zr.starDock.prep_ship,"starDock","prep_ship"),t.tech.genesis>=7&&vs(Zr.starDock.launch_ship,"starDock","launch_ship")}(s);break;case"mining_droid":Ws("droid",s);break;case"g_factory":case"refueling_station":Ws("graphene",s);break;case"freighter":case"super_freighter":pr(s);break;case"pylon":Ws("pylon",s);break;case"rock_quarry":Ws("rock_quarry",s);break;case"titan_mine":Ws("titan_mine",s);break;case"mining_ship":Ws("mining_ship",s);break;case"alien_space_station":Ws("alien_space_station",s);break;case"nanite_factory":Ws("nanite_factory",s);break;case"alien_outpost":Ws("replicator",s)}}function Ts(){sc($("#evolution .evolving"),!0);let e=$(`
          ${t.evolution.final}%
          `);$("#evolution").append(e)}function Es(){return"magic"===t.race.universe?z("city_wizard_tower_title"):t.race.evil?z("city_babel_title"):z("city_wardenclyffe")}function Is(){switch(t.race.species){case"orc":return z("city_basic_housing_orc_title");case"wolven":return z("city_basic_housing_wolven_title");case"sporgar":return z("city_basic_housing_sporgar_title");case"dracnid":case"balorg":return z("city_basic_housing_title7");case"imp":return z("city_basic_housing_title8");case"seraph":return z("city_basic_housing_seraph_title");case"unicorn":return z("city_basic_housing_unicorn_title")}switch(_i[t.race.species].type){case"avian":return z("city_basic_housing_nest_title");case"plant":return z("city_basic_housing_entish_title");case"sand":return z("city_basic_housing_sand_title");case"polar":return z("city_basic_housing_polar_title");case"eldritch":return z("city_basic_housing_eldritch_title")}return t.city.ptrait.includes("trashed")?z("city_basic_housing_trash_title"):z("city_basic_housing_title")}function Ks(e,a){switch(e){case"small":return Is();case"medium":return function(){switch(t.race.species){case"sporgar":return z("city_cottage_title2");case"balorg":return z("city_cottage_title3");case"imp":return z("city_basic_housing_title7");case"seraph":return z("city_cottage_title4");case"unicorn":return z("city_cottage_title5");case"dracnid":return z("city_cottage_title7")}switch(_i[t.race.species].type){case"avian":return z("city_cottage_title6");case"eldritch":return z("city_cottage_title8")}return z("city_cottage_title1")}();case"large":return function(e){if(!e&&D("extravagant",0))return z("city_mansion");if("sporgar"===t.race.species)return z("city_apartment_title2");switch(_i[t.race.species].type){case"avian":return z("city_apartment_title5");case"sand":return z("city_apartment_title6");case"demonic":return z("city_apartment_title3");case"angelic":return z("city_apartment_title4");case"giant":return z("city_apartment_title7");case"eldritch":return z("city_apartment_title8")}return z("city_apartment_title1")}(a)}}function Ls(e,a){if(t.tech.queue&&t.queue.display){let e=["space","interstellar","galaxy","portal","tauceti"];for(let r=0;r-1)if(e.includes(s.action)){let e=!0;Object.keys(Zr[s.action]).forEach((function(a){Zr[s.action][a][s.type]&&e&&(t.queue.queue[r].label="string"==typeof Zr[s.action][a][s.type].title?Zr[s.action][a][s.type].title:Zr[s.action][a][s.type].title(),e=!1)}))}else Zr[s.action][s.type]&&(t.queue.queue[r].label="string"==typeof Zr[s.action][s.type].title?Zr[s.action][s.type].title:Zr[s.action][s.type].title())}}if(e&&t.tech.r_queue&&t.r_queue.display)for(let e=0;e=4&&Pi(e)})),Object.keys(_i[t.race.species].traits).forEach((function(e){Pi(e,{set:_i[t.race.species].traits[e]})})),t.race.imitation&&t.race.srace&&qi(!1),Object.keys(t.tech).forEach((function(e){"evo_"===e.substring(0,4)&&delete t.tech[e]})),delete t.tech.evo,t.evolution={};const i=new Date;!t.settings.boring&&11===i.getMonth()&&i.getDate()>=17&&("elven"===t.race.species?(Pi("slaver",{set:2}),Pi("resourceful",{set:.5}),Pi("small",{set:.25})):"capybara"===t.race.species?(Pi("beast_of_burden",{set:1}),Pi("pack_rat",{set:.5}),Pi("musical",{set:.25})):"centaur"===t.race.species?(Pi("beast_of_burden",{set:1}),Pi("curious",{set:.5}),Pi("blissful",{set:.25})):"wendigo"===t.race.species?(Pi("immoral",{set:3}),Pi("cannibalize",{set:.5}),Pi("claws",{set:.25})):"yeti"===t.race.species?(Pi("scavenger",{set:3}),Pi("regenerative",{set:.5}),Pi("musical",{set:.25})):"entish"===t.race.species&&(Pi("photosynth",{set:3}),Pi("optimistic",{set:.5}),Pi("armored",{set:.25})));const c=Ec("easter");if("wolven"===t.race.species&&c.active?(Pi("hyper",{set:1}),Pi("fast_growth",{set:1}),Pi("rainbow",{set:1}),Pi("optimistic",{set:1})):"vulpine"===t.race.species&&c.active&&(Pi("cannibalize",{set:2}),Pi("rage",{set:1}),Pi("blood_thirst",{set:1}),Pi("sticky",{set:1})),t.race.no_crispr||t.race.badgenes){let e=t.race.badgenes?3:1;for(let a=0;a=2)for(let e=1;e<8;e++)t.genes.evolve>=e+1&&mi(e);let l=Yi();t.civic.foreign.gov0.name={s0:l.s0,s1:l.s1};let u=Yi();for(;l.s0===u.s0&&l.s1===u.s1;)u=Yi();t.civic.foreign.gov1.name={s0:u.s0,s1:u.s1};let d=Yi();for(;l.s0===d.s0&&l.s1===d.s1||u.s0===d.s0&&u.s1===d.s1;)d=Yi();if(t.civic.foreign.gov2.name={s0:d.s0,s1:d.s1},t.race.truepath||t.race.lone_survivor){t.civic.foreign.gov0.mil=Math.round(1.5*t.civic.foreign.gov0.mil),t.civic.foreign.gov1.mil=Math.round(1.4*t.civic.foreign.gov1.mil),t.civic.foreign.gov2.mil=Math.round(1.25*t.civic.foreign.gov2.mil),t.civic.foreign.gov3={unrest:0,hstl:Math.floor(g(20,40)),mil:Math.floor(g(650,750)),eco:Math.floor(g(250,300)),spy:0,esp:0,trn:0,sab:0,act:"none"};let e=Yi(!0);t.civic.foreign.gov3.name={s0:e.s0,s1:e.s1},t.civic.foreign.gov4={unrest:0,hstl:100,mil:300,eco:100,spy:0,esp:0,trn:0,sab:0,act:"none"};let a=Yi(!0);for(;a.s1===e.s1;)a=Yi(!0);t.civic.foreign.gov4.name={s0:99,s1:a.s1}}if(t.race.cataclysm?Bi(z("cataclysm_sentience",[_i[t.race.species].home,Tc("name")]),"info",!1,["progress"]):Bi(z("sentience",[z("genelab_genus_"+_i[t.race.species].type),_i[t.race.species].entity,Tc("name")]),"info",!1,["progress"]),t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=1&&(t.resource.Steel.display=!0,t.resource.Steel.amount=25,t.stats.achieve.technophobe.l>=3)){t.race.truepath||(t.resource.Soul_Gem.display=!0);let e=1;for(let a=1;a=5&&e++;t.resource.Soul_Gem.amount=e}if("tortoisan"===t.race.species){let e=Math.floor(g(100));t.race.shell_color=99===e?"rainbow":e>=97&&e<=98?"white":e>=93&&e<=96?"red":e>=89&&e<=92?"orange":e>=85&&e<=88?"yellow":e>=75&&e<=84?"purple":e>=65&&e<=74?"blue":"green"}if("vulpine"===t.race.species){let e=Math.floor(g(100));t.race.fox_color=e>=85?"white":e>=70&&e<=84?"tan":e>=55&&e<=69?"silver":e>=35&&e<=54?"grey":"red"}if(pc(!0),t.blood.aware&&(t.settings.arpa.blood=!0,t.tech.b_stone=2),na(!0),X(),J(!0),t.race.shapeshifter&&Mi(!1,!0),t.race.carnivore||t.race.soul_eater||t.race.unfathomable?(t.civic.d_job="hunter",t.civic.hunter.display=!0):t.race.forager?(t.civic.d_job="forager",t.civic.forager.display=!0):(t.civic.d_job="unemployed",t.civic.unemployed.display=!0),t.race.hooved&&(t.resource.Horseshoe.display=!0,t.resource.Horseshoe.amount=5,t.race.shoecnt=5),t.race.deconstructor&&(t.resource.Nanite.display=!0,t.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},t.settings.showIndustry=!0),uc(!0),(t.race.truepath||t.race.lone_survivor)&&Object.keys(Za).forEach((function(e){t.resource.hasOwnProperty(e)&&(t.resource[e].value=2*Za[e])})),li(t.race.species,!0),Vi("sentience",{species:t.race.species,challenge:so()-1}),t.stats.feat.adept&&t.stats.achieve.whitehole&&t.stats.achieve.whitehole.l>0){let e=Math.min(t.stats.achieve.whitehole.l,t.stats.feat.adept);t.resource.Food.amount+=100*e,t.resource.Stone.max+=60*e,t.resource.Stone.amount+=100*e,t.race.smoldering?(t.resource.Chrysotile.max+=60*e,t.resource.Chrysotile.amount+=100*e):(t.resource.Lumber.max+=60*e,t.resource.Lumber.amount+=100*e)}t.race.cataclysm?t.race.cataclysm&&(t.tech.unify=2,t.tech.spy=5,t.tech.primitive=3,t.tech.currency=6,t.tech.govern=3,t.tech.boot_camp=1,t.tech.medic=1,t.tech.military=5,t.tech.marines=1,t.tech.explosives=3,t.tech.trade=3,t.tech.wharf=1,t.tech.banking=6,t.tech.gambling=1,t.tech.home_safe=1,t.tech.housing=3,t.tech.smelting=3,t.tech.copper=1,t.tech.storage=5,t.tech.container=4,t.tech.steel_container=3,t.tech.mining=4,t.tech.oil=7,t.tech.mass=1,t.tech.alumina=1,t.tech.titanium=2,t.tech.polymer=2,t.tech.uranium=4,t.tech.foundry=7,t.tech.factory=1,t.tech.theatre=3,t.tech.broadcast=2,t.tech.mine_conveyor=1,t.tech.science=9,t.tech.high_tech=7,t.tech.genetics=1,t.tech.theology=2,t.tech.space=6,t.tech.solar=3,t.tech.luna=2,t.tech.hell=1,t.tech.mars=5,t.tech.gas_giant=1,t.tech.gas_moon=2,t.tech.asteroid=3,t.tech.satellite=1,t.tech.space_explore=4,t.tech.genesis=2,t.settings.showSpace=!0,t.settings.space.home=!0,t.settings.space.moon=!0,t.settings.space.red=!0,t.settings.space.hell=!0,t.settings.space.sun=!0,t.settings.space.gas=!0,t.settings.space.gas_moon=!0,t.settings.space.belt=!0,t.settings.space.dwarf=!0,t.settings.showCity=!1,t.settings.showIndustry=!0,t.settings.showPowerGrid=!0,t.settings.showResearch=!0,t.settings.showCivic=!0,t.settings.showMil=!0,t.settings.showResources=!0,t.settings.showMarket=!0,t.settings.showStorage=!0,t.settings.civTabs=1,t.settings.spaceTabs=1,t.settings.showGenetics=!0,t.settings.arpa.physics=!0,t.resource[t.race.species].display=!0,t.resource.Knowledge.display=!0,t.resource.Money.display=!0,t.resource.Food.display=!0,t.resource.Stone.display=!0,t.resource.Furs.display=!0,t.resource.Copper.display=!0,t.resource.Iron.display=!0,t.resource.Aluminium.display=!0,t.resource.Cement.display=!0,t.resource.Coal.display=!0,t.resource.Oil.display=!0,t.resource.Uranium.display=!0,t.resource.Steel.display=!0,t.resource.Titanium.display=!0,t.resource.Alloy.display=!0,t.resource.Polymer.display=!0,t.resource.Iridium.display=!0,t.resource.Helium_3.display=!0,t.resource.Brick.display=!0,t.resource.Wrought_Iron.display=!0,t.resource.Sheet_Metal.display=!0,t.resource.Mythril.display=!0,t.resource.Crates.display=!0,t.resource.Containers.display=!0,t.race.kindling_kindred||t.race.smoldering||(t.resource.Lumber.display=!0,t.resource.Plywood.display=!0,t.resource.Lumber.max=9e4,t.resource.Lumber.amount=9e4,t.resource.Plywood.amount=5e4),t.race.smoldering&&(t.resource.Chrysotile.display=!0,t.resource.Chrysotile.max=9e4,t.resource.Chrysotile.amount=9e4),t.resource[t.race.species].max=8,t.resource[t.race.species].amount=8,t.resource.Crates.amount=20,t.resource.Containers.amount=20,t.resource.Money.max=225e3,t.resource.Money.amount=225e3,t.resource.Food.max=1e3,t.resource.Food.amount=1e3,t.resource.Oil.max=1e3,t.resource.Oil.amount=1e3,t.resource.Helium_3.max=1e3,t.resource.Helium_3.amount=1e3,t.resource.Uranium.max=1e3,t.resource.Uranium.amount=1e3,t.resource.Stone.max=9e4,t.resource.Stone.amount=9e4,t.resource.Furs.max=4e4,t.resource.Furs.amount=4e4,t.resource.Copper.max=75e3,t.resource.Copper.amount=75e3,t.resource.Iron.max=75e3,t.resource.Iron.amount=75e3,t.resource.Steel.max=75e3,t.resource.Steel.amount=75e3,t.resource.Aluminium.max=75e3,t.resource.Aluminium.amount=75e3,t.resource.Cement.max=75e3,t.resource.Cement.amount=75e3,t.resource.Titanium.max=75e3,t.resource.Titanium.amount=75e3,t.resource.Coal.max=1e4,t.resource.Coal.amount=1e4,t.resource.Alloy.max=2e4,t.resource.Alloy.amount=2e4,t.resource.Polymer.max=2e4,t.resource.Polymer.amount=2e4,t.resource.Iridium.max=1e3,t.resource.Iridium.amount=1e3,t.resource.Brick.amount=5e4,t.resource.Wrought_Iron.amount=5e4,t.resource.Sheet_Metal.amount=5e4,t.resource.Mythril.amount=8e3,t.resource.Iridium.crates=5,t.resource.Iridium.containers=5,t.civic.taxes.display=!0,t.civic.professor.display=!0,t.civic.scientist.display=!0,t.civic.colonist.display=!0,t.civic.space_miner.display=!0,t.race.flier||(t.tech.cement=5,t.civic.cement_worker.display=!0,t.civic.cement_worker.max=1,t.civic.cement_worker.workers=1),t.civic.colonist.max=4,t.civic.colonist.workers=4,t.civic.space_miner.max=3,t.civic.space_miner.workers=2,t.civic.professor.max=1,t.civic.professor.workers=1,t.city.calendar.day++,t.city.market.active=!0,t.city.power=0,t.city.powered=!0,t.race.artifical&&(t.city.transmitter={count:0,on:0}),t.city.factory={count:0,on:0,Lux:0,Furs:0,Alloy:0,Polymer:1,Nano:0,Stanene:0},t.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},t.city.smelter={count:0,cap:2,Wood:0,Coal:0,Oil:2,Star:0,StarCap:0,Inferno:0,Iron:1,Steel:1,Iridium:0},t.city.fission_power={count:0,on:0},t.city.oil_power={count:0,on:0},t.city.coal_power={count:0,on:0},t.city.mass_driver={count:0,on:0},t.city.mine={count:0,on:0},t.city.coal_mine={count:0,on:0},t.city.oil_well={count:0},t.city.oil_depot={count:0},t.city.garrison={count:0,on:0},t.city.basic_housing={count:0},t.city.cottage={count:0},t.city.apartment={count:0,on:0},t.city.amphitheatre={count:0},t.city.casino={count:0,on:0},t.city.rock_quarry={count:0,on:0,asbestos:50},t.city.metal_refinery={count:0,on:0},t.city.storage_yard={count:0},t.city.warehouse={count:0},t.city.trade={count:0},t.city.wharf={count:0},t.city.bank={count:0},t.city.tourist_center={count:0,on:0},t.city.university={count:0},t.city.library={count:0},t.city.wardenclyffe={count:0,on:0},t.city.biolab={count:0,on:0},t.city.lumber_yard={count:0},t.city.sawmill={count:0,on:0},t.city.temple={count:0},t.space.satellite={count:1},t.space.propellant_depot={count:1},t.space.gps={count:4},t.space.nav_beacon={count:1,on:1},t.space.moon_base={count:1,on:1,support:3,s_max:3},t.space.iridium_mine={count:1,on:1},t.space.helium_mine={count:1,on:1},t.space.observatory={count:1,on:1},t.space.spaceport={count:2,on:2,support:8,s_max:10},t.space.red_tower={count:1,on:1},t.space.living_quarters={count:4,on:4},t.space.vr_center={count:0,on:0},t.space.garage={count:1},t.space.red_mine={count:1,on:1},t.space.fabrication={count:1,on:1},t.space.red_factory={count:1,on:1},t.space.exotic_lab={count:1,on:1},t.space.ziggurat={count:0},t.space.space_barracks={count:1,on:1},t.space.biodome={count:2,on:2},t.space.laboratory={count:0,on:0},t.space.geothermal={count:2,on:2},t.space.spc_casino={count:0,on:0},t.space.swarm_plant={count:0},t.space.swarm_control={count:5,support:40,s_max:50},t.space.swarm_satellite={count:40},t.space.gas_mining={count:2,on:2},t.space.gas_storage={count:1},t.space.outpost={count:0,on:0},t.space.drone={count:0},t.space.oil_extractor={count:2,on:2},t.space.space_station={count:1,on:1,support:0,s_max:3},t.space.iridium_ship={count:1,on:1},t.space.elerium_ship={count:0,on:0},t.space.elerium_prospector={count:0,on:0},t.space.iron_ship={count:1,on:1},t.space.elerium_contain={count:0,on:0},t.civic.garrison={display:!0,disabled:!1,progress:0,tactic:0,workers:2,wounded:0,raid:0,max:2},ms(),gs(),Ht(),Ce("Physics"),ma()):t.race.lone_survivor?t.race.lone_survivor&&(t.tech.alloy=1,t.tech.alumina=2,t.tech.asteroid=7,t.tech.banking=11,t.tech.biotech=1,t.tech.boot_camp=2,t.tech.broadcast=2,t.tech.container=7,t.tech.copper=1,t.tech.currency=6,t.tech.disease=2,t.tech.drone=1,t.tech.elerium=2,t.tech.explosives=3,t.tech.factory=3,t.tech.foundry=8,t.tech.gambling=4,t.tech.gas_giant=1,t.tech.gas_moon=2,t.tech.genesis=2,t.tech.genetics=2,t.tech.gov_corp=1,t.tech.gov_fed=1,t.tech.gov_soc=1,t.tech.gov_theo=1,t.tech.govern=3,t.tech.graphene=1,t.tech.helium=1,t.tech.hell=1,t.tech.high_tech=13,t.tech.home_safe=2,t.tech.housing=3,t.tech.housing_reduction=3,t.tech.kuiper=2,t.tech.launch_facility=1,t.tech.luna=2,t.tech.m_smelting=2,t.tech.marines=2,t.tech.mars=5,t.tech.mass=1,t.tech.medic=3,t.tech.military=8,t.tech.mine_conveyor=1,t.tech.mining=4,t.tech.monument=1,t.tech.nano=1,t.tech.oil=7,t.tech.outer=8,t.tech.pickaxe=5,t.tech.polymer=2,t.tech.primitive=3,t.tech.q_factory=1,t.tech.quantium=1,t.tech.queue=3,t.tech.r_queue=1,t.tech.reproduction=1,t.tech.rival=1,t.tech.satellite=1,t.tech.science=9,t.tech.shelving=3,t.tech.shipyard=1,t.tech.smelting=6,t.tech.solar=5,t.tech.space=6,t.tech.space_explore=4,t.tech.space_housing=1,t.tech.spy=5,t.tech.stanene=1,t.tech.steel_container=6,t.tech.storage=5,t.tech.swarm=6,t.tech.syard_armor=3,t.tech.syard_class=6,t.tech.syard_engine=5,t.tech.syard_power=5,t.tech.syard_sensor=4,t.tech.syard_weapon=6,t.tech.syndicate=0,t.tech.synthetic_fur=1,t.tech.tau_home=6,t.tech.tauceti=4,t.tech.theatre=3,t.tech.theology=2,t.tech.titan=9,t.tech.titan_ai_core=3,t.tech.titan_power=1,t.tech.titanium=3,t.tech.trade=3,t.tech.unify=2,t.tech.uranium=4,t.tech.v_train=1,t.tech.vault=4,t.tech.wharf=1,t.tech.world_control=1,t.tech.wsc=0,t.race.flier||(t.tech.cement=5,t.resource.Cement.display=!0),"magic"===t.race.universe&&(t.tech.gov_mage=1,t.tech.magic=4,t.tech.conjuring=2,t.resource.Mana.display=!0,t.resource.Crystal.display=!0,t.civic.crystal_miner.display=!0,t.tauceti.pylon={count:0},t.race.casting={farmer:0,miner:0,lumberjack:0,science:0,factory:0,army:0,hunting:0,crafting:0,total:0,crafting:0}),t.settings.showSpace=!1,t.settings.showTau=!0,t.settings.tau.home=!0,t.settings.showCity=!1,t.settings.showIndustry=!0,t.settings.showPowerGrid=!0,t.settings.showResearch=!0,t.settings.showCivic=!0,t.settings.showMil=!0,t.settings.showResources=!0,t.settings.showMarket=!0,t.settings.showStorage=!0,t.settings.civTabs=1,t.settings.spaceTabs=6,t.settings.showGenetics=!0,t.settings.arpa.physics=!0,t.settings.arpa.genetics=!0,t.resource[t.race.species].display=!0,t.resource.Knowledge.display=!0,t.resource.Money.display=!0,t.resource.Crates.display=!0,t.resource.Containers.display=!0,t.resource.Food.display=!0,t.resource.Stone.display=!0,t.resource.Furs.display=!0,t.resource.Copper.display=!0,t.resource.Iron.display=!0,t.resource.Aluminium.display=!0,t.resource.Coal.display=!0,t.resource.Oil.display=!0,t.resource.Uranium.display=!0,t.resource.Steel.display=!0,t.resource.Titanium.display=!0,t.resource.Alloy.display=!0,t.resource.Polymer.display=!0,t.resource.Iridium.display=!0,t.resource.Helium_3.display=!0,t.resource.Water.display=!0,t.resource.Neutronium.display=!0,t.resource.Adamantite.display=!0,t.resource.Elerium.display=!0,t.resource.Nano_Tube.display=!0,t.resource.Graphene.display=!0,t.resource.Stanene.display=!0,t.resource.Orichalcum.display=!0,t.resource.Bolognium.display=!0,t.resource.Unobtainium.display=!0,t.resource.Brick.display=!0,t.resource.Wrought_Iron.display=!0,t.resource.Sheet_Metal.display=!0,t.resource.Mythril.display=!0,t.resource.Quantium.display=!0,t.resource.Cipher.display=!0,t.race.kindling_kindred||t.race.smoldering||(t.civic.lumberjack.display=!0,t.resource.Lumber.display=!0,t.resource.Plywood.display=!0,t.resource.Lumber.max=1e7,t.resource.Lumber.amount=1e7,t.resource.Plywood.amount=25e5,t.resource.Lumber.crates=25,t.resource.Lumber.containers=25,t.tech.axe=5),t.race.smoldering&&(t.resource.Chrysotile.display=!0,t.resource.Chrysotile.max=5e6,t.resource.Chrysotile.amount=5e6),t.race.sappy||(t.tech.hammer=4),t.race.apex_predator||(t.tech.armor=3),t.resource[t.race.species].max=1,t.resource[t.race.species].amount=1,t.resource.Crates.amount=1e3,t.resource.Containers.amount=1e3,t.resource.Money.max=1e9,t.resource.Money.amount=1e9,t.resource.Knowledge.max=8e6,t.resource.Knowledge.amount=8e6,t.resource.Food.max=1e4,t.resource.Food.amount=1e4,t.resource.Oil.max=5e5,t.resource.Oil.amount=5e5,t.resource.Helium_3.max=5e5,t.resource.Helium_3.amount=5e5,t.resource.Water.max=25e3,t.resource.Water.amount=25e3,t.resource.Uranium.max=5e5,t.resource.Uranium.amount=5e5,t.resource.Stone.max=1e7,t.resource.Stone.amount=1e7,t.resource.Furs.max=5e6,t.resource.Furs.amount=5e6,t.resource.Copper.max=5e6,t.resource.Copper.amount=5e6,t.resource.Iron.max=5e6,t.resource.Iron.amount=5e6,t.resource.Steel.max=5e6,t.resource.Steel.amount=5e6,t.resource.Aluminium.max=5e6,t.resource.Aluminium.amount=5e6,t.resource.Cement.max=5e6,t.resource.Cement.amount=5e6,t.resource.Titanium.max=5e6,t.resource.Titanium.amount=5e6,t.resource.Coal.max=5e6,t.resource.Coal.amount=5e6,t.resource.Alloy.max=5e6,t.resource.Alloy.amount=5e6,t.resource.Polymer.max=5e6,t.resource.Polymer.amount=5e6,t.resource.Iridium.max=5e6,t.resource.Iridium.amount=5e6,t.resource.Neutronium.max=5e5,t.resource.Neutronium.amount=5e5,t.resource.Adamantite.max=5e6,t.resource.Adamantite.amount=5e6,t.resource.Elerium.max=1e3,t.resource.Elerium.amount=1e3,t.resource.Nano_Tube.max=5e6,t.resource.Nano_Tube.amount=5e6,t.resource.Graphene.max=5e6,t.resource.Graphene.amount=5e6,t.resource.Stanene.max=5e6,t.resource.Stanene.amount=5e6,t.resource.Bolognium.max=5e6,t.resource.Bolognium.amount=5e6,t.resource.Orichalcum.max=5e6,t.resource.Orichalcum.amount=5e6,t.resource.Brick.amount=25e5,t.resource.Wrought_Iron.amount=25e5,t.resource.Sheet_Metal.amount=25e5,t.resource.Mythril.amount=25e5,t.resource.Quantium.amount=25e5,t.race.artifical||(t.resource.Food.crates=10,t.resource.Food.containers=10),t.resource.Stone.crates=25,t.resource.Stone.containers=25,t.resource.Furs.crates=25,t.resource.Furs.containers=25,t.resource.Coal.crates=10,t.resource.Coal.containers=10,t.resource.Copper.crates=25,t.resource.Copper.containers=25,t.resource.Iron.crates=25,t.resource.Iron.containers=25,t.resource.Aluminium.crates=25,t.resource.Aluminium.containers=25,t.resource.Steel.crates=25,t.resource.Steel.containers=25,t.resource.Titanium.crates=25,t.resource.Titanium.containers=25,t.resource.Alloy.crates=25,t.resource.Alloy.containers=25,t.resource.Polymer.crates=25,t.resource.Polymer.containers=25,t.resource.Iridium.crates=25,t.resource.Iridium.containers=25,t.resource.Adamantite.crates=25,t.resource.Adamantite.containers=25,t.resource.Graphene.crates=25,t.resource.Graphene.containers=25,t.resource.Stanene.crates=25,t.resource.Stanene.containers=25,t.resource.Bolognium.crates=25,t.resource.Bolognium.containers=25,t.resource.Orichalcum.crates=25,t.resource.Orichalcum.containers=25,t.civic.taxes.display=!0,t.race.flier||(t.civic.cement_worker.display=!0,t.resource.Cement.crates=25,t.resource.Cement.containers=25),t.race.sappy||(t.civic.quarry_worker.display=!0),t.civic.professor.display=!0,t.civic.scientist.display=!0,t.civic.banker.display=!0,t.civic.pit_miner.display=!0,t.civic.professor.max=1,t.civic.professor.workers=1,t.city.calendar.day++,t.city.market.active=!0,t.city.power=0,t.city.powered=!0,t.race.artifical&&(t.city.transmitter={count:0,on:0}),t.city.factory={count:0,on:0,Lux:0,Furs:0,Alloy:0,Polymer:1,Nano:0,Stanene:0},t.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},t.city.smelter={count:0,cap:2,Wood:0,Coal:0,Oil:2,Star:0,StarCap:0,Inferno:0,Iron:1,Steel:1,Iridium:0},t.city.amphitheatre={count:0},t.city.apartment={count:0,on:0},t.city.bank={count:0},t.city.basic_housing={count:0},t.city.biolab={count:0,on:0},t.city.boot_camp={count:0},t.city.casino={count:0,on:0},t.city.cement_plant={count:0,on:0},t.city.coal_mine={count:0,on:0},t.city.coal_power={count:0,on:0},t.city.cottage={count:0},t.city.fission_power={count:0,on:0},t.city.garrison={count:0,on:0},t.city.hospital={count:0},t.city.library={count:0},t.city.lumber_yard={count:0},t.city.mass_driver={count:0,on:0},t.city.metal_refinery={count:0,on:0},t.city.mine={count:0,on:0},t.city.oil_depot={count:0},t.city.oil_power={count:0,on:0},t.city.oil_well={count:0},t.city.rock_quarry={count:0,on:0,asbestos:50},t.city.sawmill={count:0,on:0},t.city.shed={count:0,on:0},t.city.storage_yard={count:0},t.city.temple={count:0},t.city.tourist_center={count:0,on:0},t.city.trade={count:0},t.city.university={count:0},t.city.wardenclyffe={count:0,on:0},t.city.warehouse={count:0},t.city.wharf={count:0},t.space.ai_colonist={count:0,on:0},t.space.ai_core={count:100},t.space.ai_core2={count:0,on:0},t.space.biodome={count:0,on:0},t.space.crashed_ship={count:100},t.space.decoder={count:0,on:0},t.space.digsite={count:0},t.space.drone={count:0},t.space.drone_control={count:0,on:0},t.space.e_reactor={count:0,on:0},t.space.electrolysis={count:0,on:0,support:0,s_max:0},t.space.elerium_contain={count:0,on:0},t.space.elerium_mine={count:0,on:0},t.space.elerium_ship={count:0,on:0},t.space.exotic_lab={count:0,on:0},t.space.fabrication={count:0,on:0},t.space.fob={count:0,on:0,troops:0,enemy:0},t.space.g_factory={count:0,on:0,Lumber:0,Coal:0,Oil:0},t.space.garage={count:0},t.space.gas_mining={count:0,on:0},t.space.gas_storage={count:0},t.space.geothermal={count:0,on:0},t.space.gps={count:0},t.space.helium_mine={count:0,on:0},t.space.hell_smelter={count:0,on:0},t.space.hydrogen_plant={count:0,on:0},t.space.iridium_mine={count:0,on:0},t.space.iridium_ship={count:0,on:0},t.space.iron_ship={count:0,on:0},t.space.lander={count:0,on:0},t.space.living_quarters={count:0,on:0},t.space.m_relay={count:0,on:0},t.space.mass_relay={count:100},t.space.moon_base={count:0,on:0,support:0,s_max:0},t.space.munitions_depot={count:0},t.space.nav_beacon={count:0,on:0},t.space.neutronium_mine={count:0,on:0},t.space.observatory={count:0,on:0},t.space.oil_extractor={count:0,on:0},t.space.operating_base={count:0,on:0},t.space.orichalcum_mine={count:0,on:0},t.space.outpost={count:0,on:0},t.space.propellant_depot={count:0},t.space.red_factory={count:0,on:0},t.space.red_mine={count:0,on:0},t.space.red_tower={count:0,on:0},t.space.satellite={count:0},t.space.shipyard={count:0,on:0,ships:[],expand:!1,sort:!0},t.space.shock_trooper={count:0,on:0},t.space.space_barracks={count:0,on:0},t.space.space_station={count:0,on:0,support:0,s_max:0},t.space.spaceport={count:0,on:0,support:0,s_max:0},t.space.spc_casino={count:0,on:0},t.space.storehouse={count:0},t.space.swarm_control={count:0,support:0,s_max:0},t.space.swarm_plant={count:0},t.space.swarm_satellite={count:0},t.space.tank={count:0,on:0},t.space.titan_bank={count:0},t.space.titan_mine={count:0,on:0},t.space.titan_quarters={count:0,on:0},t.space.titan_spaceport={count:0,on:0,support:0,s_max:0},t.space.uranium_mine={count:0,on:0},t.space.vr_center={count:0,on:0},t.space.water_freighter={count:0,on:0},t.space.zero_g_lab={count:0,on:0},t.space.ziggurat={count:0},t.tauceti.alien_outpost={count:1,on:1},t.tauceti.colony={count:1,on:1},t.tauceti.fusion_generator={count:1,on:1},t.tauceti.infectious_disease_lab={count:0,on:0,cure:0},t.tauceti.mining_pit={count:1,on:1},t.tauceti.orbital_platform={count:0,on:0,support:0,s_max:0},t.tauceti.orbital_station={count:1,on:1,support:0,s_max:0},t.tauceti.refueling_station={count:0,on:0},t.tauceti.repository={count:2},t.tauceti.tauceti_casino={count:0,on:0},t.civic.garrison={display:!0,disabled:!1,progress:0,tactic:0,workers:2,wounded:0,raid:0,max:2},t.arpa.sequence={max:5e4,progress:0,time:5e4,on:!0,boost:!1,auto:!1,labs:0},t.tech.stock_exchange=0,t.tech.monuments=0,t.tech.supercollider=0,t.tech.tp_depot=0,t.tech.railway=0,t.tech.isolation=1,t.race.truepath=1,t.arpa.m_type=Ce("Monument"),gs(),at(),Ce("Physics"),ma()):t.race.artifical&&t.race.artifical&&(t.tech.spy=5,t.tech.primitive=3,t.tech.currency=6,t.tech.govern=3,t.tech.boot_camp=1,t.tech.medic=1,t.tech.military=5,t.tech.explosives=3,t.tech.trade=3,t.tech.banking=6,t.tech.home_safe=1,t.tech.housing=3,t.tech.smelting=3,t.tech.copper=1,t.tech.storage=5,t.tech.container=4,t.tech.steel_container=3,t.tech.mining=4,t.tech.pickaxe=2,t.tech.hammer=2,t.tech.oil=3,t.tech.alumina=1,t.tech.titanium=1,t.tech.foundry=7,t.tech.factory=1,t.tech.theatre=3,t.tech.broadcast=1,t.tech.science=7,t.tech.high_tech=4,t.tech.theology=2,t.settings.showIndustry=!0,t.settings.showPowerGrid=!0,t.settings.showResearch=!0,t.settings.showCivic=!0,t.settings.showMil=!0,t.settings.showResources=!0,t.settings.showMarket=!0,t.settings.showStorage=!0,t.resource[t.race.species].display=!0,t.resource.Knowledge.display=!0,t.resource.Money.display=!0,t.resource.Food.display=!0,t.resource.Money.amount=1e3,t.resource.Stone.display=!0,t.resource.Furs.display=!0,t.resource.Copper.display=!0,t.resource.Iron.display=!0,t.resource.Aluminium.display=!0,t.resource.Coal.display=!0,t.resource.Oil.display=!0,t.resource.Steel.display=!0,t.resource.Titanium.display=!0,t.resource.Brick.display=!0,t.resource.Wrought_Iron.display=!0,t.resource.Sheet_Metal.display=!0,t.resource.Crates.display=!0,t.resource.Containers.display=!0,t.race.flier||(t.tech.cement=5,t.resource.Cement.display=!0),t.race.kindling_kindred||t.race.smoldering||(t.race.evil?(t.tech.reclaimer=3,t.city.graveyard={count:1}):(t.tech.axe=3,t.tech.saw=2,t.city.lumber_yard={count:1},t.city.sawmill={count:0,on:0}),t.resource.Lumber.display=!0,t.resource.Plywood.display=!0,t.civic.lumberjack.display=!0),t.race.smoldering&&(t.resource.Chrysotile.display=!0),t.resource[t.race.species].max=0,t.resource[t.race.species].amount=0,t.resource.Crates.amount=10,t.resource.Containers.amount=10,t.civic.taxes.display=!0,t.civic.miner.display=!0,t.civic.coal_miner.display=!0,t.civic.quarry_worker.display=!0,t.civic.professor.display=!0,t.civic.scientist.display=!0,t.race.flier||(t.civic.cement_worker.display=!0),t.civic.banker.display=!0,t.city.calendar.day++,t.city.market.active=!0,t.city.power=7.5,t.city.powered=!0,t.city.factory={count:0,on:0,Lux:0,Furs:0,Alloy:0,Polymer:1,Nano:0,Stanene:0},t.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},t.city.smelter={count:1,cap:0,Wood:0,Coal:0,Oil:1,Star:0,StarCap:0,Inferno:0,Iron:1,Steel:0,Iridium:0},t.city.oil_power={count:1,on:1},t.city.coal_power={count:0,on:0},t.city.transmitter={count:1,on:1},t.city.mine={count:1,on:0},t.city.coal_mine={count:1,on:0},t.city.oil_well={count:1},t.city.oil_depot={count:1},t.city.cement_plant={count:1,on:0},t.city.garrison={count:0,on:0},t.city.boot_camp={count:0},t.city.basic_housing={count:0},t.city.cottage={count:0},t.city.apartment={count:0,on:0},t.city.amphitheatre={count:0},t.city.rock_quarry={count:1,on:0,asbestos:50},t.city.metal_refinery={count:1,on:0},t.city.shed={count:2},t.city.storage_yard={count:1},t.city.warehouse={count:1},t.city.trade={count:0},t.city.wharf={count:0},t.city.bank={count:1},t.city.university={count:1},t.city.library={count:1},t.city.wardenclyffe={count:0,on:0},t.city.temple={count:0},t.race.calm&&(t.resource.Zen.display=!0,t.city.meditation={count:0}),t.race.cannibalize&&(t.city.s_alter={count:0,rage:0,mind:0,regen:0,mine:0,harvest:0}),t.race.magnificent&&(t.city.shrine={count:0,morale:0,metal:0,know:0,tax:0}),t.civic.govern.type="technocracy",t.civic.garrison={display:!0,disabled:!1,progress:0,tactic:0,workers:0,wounded:0,raid:0,max:0},ms(),gs(),ma()),t.settings.tabLoad?(ms(),Y(),ve($("#c_garrison"),!1),ie(),t.race.cataclysm||t.race.lone_survivor?(sc($("#r_civics")),J(),Qs(),ar("market"),ar("storage"),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let t=a.resource[e].color,r=a.resource[e].tradable;if(a.resource[e].stackable){var s=$(`
          `);$("#resStorage").append(s),vr(`#stack-${e}`,s,e,t)}r&&(s=$(`
          `),$("#market").append(s),dr(`#market-${e}`,s,e,t,!0))})),ir(),Ce("Genetics"),Ce("Crispr"),Ce("Blood")):t.sim&&(Ce("Crispr"),Ce("Blood"))):jt("mTabCivil"),t.queue.hasOwnProperty("queue")&&(t.queue.queue=[]),(t.race.slow||t.race.hyper||"junker"===t.race.species)&&(e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w&&P.w.terminate(),window.location.reload())}function Ds(e){switch(_i[e].fanaticism){case"smart":t.race.dumb?(mi(5),Ce("Genetics")):Bs("smart");break;case"infectious":Bs("infectious"),"human"===t.race.species&&eo("infested");break;case"blood_thirst":Bs("blood_thirst"),"entish"===t.race.species&&eo("madagascar_tree");break;case"none":mi(5),Ce("Genetics");break;default:Bs(_i[e].fanaticism)}}function Bs(e){t.race[e]?Pi(e)?"imitation"===e?qi(!0):"shapeshifter"===e&&Mi(t.race.ss_genus):(mi(5),Ce("Genetics")):(t.race[e]=1,xi(e))}function Gs(){if(!t.settings.tabLoad&&3!==t.settings.civTabs)return;Rs(),sc($("#resQueue")),$("#resQueue").append($(`\n

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

          \n \n `));let e=$('
            ');$("#resQueue").append(e),e.append($('
          • {{ item.label }} [{{ item.time | time }}]
          • '));try{ic({el:"#resQueue",data:t.r_queue,methods:{remove(e){Ii(`rq${t.r_queue.queue[e].id}`),t.r_queue.queue.splice(e,1),Gs(),gs()},setID:e=>`rq${t.r_queue.queue[e].id}`,pauseRQueue(){$("#pauserqueue").removeClass("play"),$("#pauserqueue").removeClass("pause"),t.r_queue.pause?(t.r_queue.pause=!1,$("#pauserqueue").addClass("play")):(t.r_queue.pause=!0,$("#pauserqueue").addClass("pause"))},pausedesc:()=>t.r_queue.pause?z("r_queue_play"):z("r_queue_pause")},filters:{time:e=>cc(e)}}),function(){let e=$("#resQueue .buildList")[0];Sortable.create(e,{onEnd(e){let a=t.r_queue.queue;a.splice(e.newDraggableIndex,0,a.splice(e.oldDraggableIndex,1)[0]),t.r_queue.queue=a,Gs()}}),function(){for(let e=0;e=5?e-.01:e}function Us(){let e=1800;t.tech.vault>=1?e=7500*(t.tech.vault+1):t.tech.banking>=5?e=9e3:t.tech.banking>=3&&(e=4e3),t.race.paranoid&&(e*=1-di.paranoid.vars()[0]/100),t.race.hoarder&&(e*=1+di.hoarder.vars()[0]/100);let a=Oi("dracnid");a>0&&(e*=1+di.hoarder.vars(1)[0]/100*a),t.tech.banking>=7&&(e*=1+Pe(.05*la(t.civic.banker.workers,"banker"))),t.tech.banking>=8&&(e+=Pe(25*t.resource[t.race.species].amount)),t.tech.stock_exchange&&(e*=1+.1*t.tech.stock_exchange),t.tech.world_control&&(e*=1.25),t.race.truepath&&(e*=1.25),t.blood.greed&&(e*=1+t.blood.greed/100),t.stats.achieve.wheelbarrow&&(e*=1+t.stats.achieve.wheelbarrow.l/50),t.race.inflation&&(e*=1+t.race.inflation/125);let r=D("risktaker",0);return r&&(e*=1+r/100),e}function Ws(e,a,r){switch(e){case"smelter":!function(e,a){let r=$(`
            ${z("modal_smelter_fuel")}: {{s.count | on}}/{{ s.cap }}
            `);if(e.append(r),e.hasClass("modalBody")){let e=xc(10);e.length>0&&r.prepend(e)}if(a&&t.race.forge&&t.race.steelen){let e=qc(3,12,!0);e.length>0&&r.prepend(e)}let s=e.hasClass("modalBody")?"mSmelterFuels":"smelterFuels",i=$(`
            `);if(e.append(i),!t.race.forge){if(!t.race.kindling_kindred&&!t.race.smoldering||t.race.evil){let e=t.race.evil?t.race.soul_eater&&"wendigo"!==t.race.species&&!t.race.artifical?t.resource.Food.name:t.resource.Furs.name:t.resource.Lumber.name,a=$(`${e} {{ s.Wood }}`),r=$('«'),s=$('»');i.append(r),i.append(a),i.append(s)}if(t.resource.Coal.display){let e=$(`${t.resource.Coal.name} `),a=$('«'),r=$('»');i.append(a),i.append(e),i.append(r)}}if(t.race.forge){let e=$(`${z("trait_forge_name")} {{ s.Oil }}`);i.append(e)}else if(t.resource.Oil.display){let e=$(`${t.resource.Oil.name} {{ s.Oil }}`),a=$('«'),r=$('»');i.append(a),i.append(e),i.append(r)}if(t.tech.star_forge&&t.tech.star_forge>=2){let e=$(`${z("star")} {{ s.Star }}`);i.append(e)}if(t.tech.smelting&&t.tech.smelting>=8){let e=$(`${z("modal_smelter_inferno")} {{ s.Inferno }}`),t=$('«'),a=$('»');i.append(t),i.append(e),i.append(a)}let c=$('
            ');e.append(c);let o=!!(t.tech.irid_smelting||t.tech.m_smelting&&t.tech.m_smelting>=2);if(t.resource.Iridium.display&&o||t.resource.Steel.display&&t.tech.smelting>=2&&!t.race.steelen){let a=$(`
            `);e.append(a),a.append(`
            ${z("modal_smelter_type")}: {{s.count | son}}/{{ s.cap | on }}
            `);let r=$('
            ');a.append(r);let s=$(`${t.resource.Iron.name} {{ s.Iron }}`),i=$('«'),c=$('»');if(r.append(i),r.append(s),r.append(c),t.resource.Steel.display&&t.tech.smelting>=2&&!t.race.steelen){let e=$(`${t.resource.Steel.name} {{ s.Steel }}`),a=$('«'),s=$('»');r.append(a),r.append(e),r.append(s)}if(t.resource.Iridium.display&&o){let e=$(`${t.resource.Iridium.name} {{ s.Iridium }}`),a=$('«'),s=$('»');r.append(a),r.append(e),r.append(s)}}function n(e){switch(e){case"wood":return z("modal_build_wood",[t.race.evil?t.race.soul_eater&&"wendigo"!==t.race.species&&!t.race.artifical?t.resource.Food.name:t.resource.Furs.name:t.resource.Lumber.name,t.race.evil&&!t.race.soul_eater||"wendigo"===t.race.species?1:3]);case"coal":{let e=t.race.kindling_kindred?.15:.25;return t.tech.uranium&&t.tech.uranium>=3?z("modal_build_coal2",[e,z("resource_Coal_name"),z("resource_Uranium_name")]):z("modal_build_coal1",[e,z("resource_Coal_name")])}case"oil":return t.race.forge?z("modal_build_forge"):z("modal_build_oil",["0.35",z("resource_Oil_name")]);case"star":return t.tech.irid_smelting?z("modal_build_star2",[z("resource_Titanium_name"),z("resource_Iridium_name")]):z("modal_build_star",[z("resource_Titanium_name")]);case"inferno":{let e=35,t=.5;return z("modal_build_inferno",[50,z("resource_Coal_name"),e,z("resource_Oil_name"),t,z("resource_Infernite_name")])}}}function l(e){if("steel"===e){let e=t.tech.smelting>=4?1.2:1;return t.tech.smelting>=5&&(e*=1.2),t.tech.smelting>=6&&(e*=1.2),t.tech.smelting>=7&&(e*=1.25),t.race.pyrophobia&&(e*=.9),z("modal_smelter_steel",[+e.toFixed(3),z("resource_Steel_name"),z("resource_Coal_name"),z("resource_Iron_name")])}if("iridium"===e){let e=t.tech.smelting>=7?6.25:5;return t.race.pyrophobia&&(e*=.9),z("modal_smelter_iron",[+e.toFixed(3),z("resource_Iridium_name")])}{let e=t.tech.smelting>=3?t.tech.smelting>=7?15:12:10;return t.race.pyrophobia&&(e*=.9),z("modal_smelter_iron",[+e.toFixed(3),z("resource_Iron_name")])}}ic({el:a||"#specialModal",data:{s:t.city.smelter,lum:t.resource.Lumber,coal:t.resource.Coal,oil:t.resource.Oil,food:t.resource.Food,fur:t.resource.Furs},methods:{addFuel(e){let a=b();for(let r=0;r=t.city.smelter.StarCap)break;if(a0))break;"Wood"!==e&&t.city.smelter.Wood>0?(t.city.smelter.Wood--,t.city.smelter[e]++):"Coal"!==e&&t.city.smelter.Coal>0?(t.city.smelter.Coal--,t.city.smelter[e]++):"Oil"!==e&&t.city.smelter.Oil>0?(t.city.smelter.Oil--,t.city.smelter[e]++):"Inferno"!==e&&t.city.smelter.Inferno>0&&(t.city.smelter.Inferno--,t.city.smelter[e]++)}}},subFuel(e){let a=b();for(let r=0;r0;r++){t.city.smelter[e]--,t.race.forge&&"Inferno"===e&&t.city.smelter.Oil++;let a=t.city.smelter.Wood+t.city.smelter.Coal+t.city.smelter.Oil+t.city.smelter.Star+t.city.smelter.Inferno;t.city.smelter.Iron+t.city.smelter.Steel+t.city.smelter.Iridium>a&&(t.city.smelter.Iron>0?t.city.smelter.Iron--:t.city.smelter.Steel>0?t.city.smelter.Steel--:t.city.smelter.Iridium>0&&t.city.smelter.Iridium--)}},mLabel:e=>l(e),addMetal(e){let a=b();for(let r=0;r0&&"Iron"!==e)t.city.smelter.Iron--,t.city.smelter[e]++;else if(t.city.smelter.Steel>0&&"Steel"!==e)t.city.smelter.Steel--,t.city.smelter[e]++;else{if(!(t.city.smelter.Iridium>0&&"Iridium"!==e))break;t.city.smelter.Iridium--,t.city.smelter[e]++}}},subMetal(e){let a=b();t.city.smelter[e]-=a,t.city.smelter[e]<0&&(t.city.smelter[e]=0)},buildLabel:e=>n(e),ariaCount:e=>` ${t.city.smelter[e]} ${e} fueled.`,ariaProd:e=>`. ${t.city.smelter[e]} producing ${e}.`,net:e=>t.resource[e].diff>=0?"has-text-success":"has-text-danger",level:()=>ei(t.city.smelter.Wood+t.city.smelter.Coal+t.city.smelter.Oil+t.city.smelter.Star+t.city.smelter.Inferno,t.city.smelter.count)},filters:{on:e=>t.city.smelter.Wood+t.city.smelter.Coal+t.city.smelter.Oil+t.city.smelter.Star+t.city.smelter.Inferno,son:e=>t.city.smelter.Iron+t.city.smelter.Steel+t.city.smelter.Iridium,diffSize:e=>e>0?`+${q(e,2)}`:q(e,2),spook(e){if(a&&((t.race.kindling_kindred||t.race.smoldering)&&(6===t.city.smelter.Steel||6===t.city.smelter.Iron)||6===t.city.smelter.Wood)&&6===t.city.smelter.Coal&&6===t.city.smelter.Oil){let e=qc(3,12,!0);if(e.length>0)return e}return e},altspook(e){if(a&&t.race.forge&&6===t.city.smelter.Steel){let e=qc(3,12,!0);if(e.length>0)return e}return e}}});let u=e.hasClass("modalBody")?"mSmelterFuels":"smelterFuels";if(["wood","coal","oil","star","inferno"].forEach((function(e){Ei(`${u}${e}`,(function(){return n(e)}),{elm:$(`#${u} > .${e}`),attach:"#main"})})),t.resource.Steel.display&&t.tech.smelting>=2&&!t.race.steelen||t.resource.Iridium.display&&o){let a=e.hasClass("modalBody")?"mSmelterMats":"smelterMats";["iron","steel","iridium"].forEach((function(e){("steel"!==e||t.resource.Steel.display&&!t.race.steelen)&&("iridium"!==e||t.resource.Iridium.display&&o)&&Ei(`${a}${e}`,(function(){return l(e)}),{elm:$(`#${a} span.${e}`),attach:"#main"})}))}}(a,r);break;case"factory":!function(e,a){let r=$(`
            ${z("modal_factory_operate")}: {{count | on}}/{{ on | max }}
            `);e.append(r);let s=$(`
            ${z("modal_factory_lux")}
            `);e.append(s);let o=$(''),n=$('«'),l=$('»');if(s.append(n),s.append(o),s.append(l),t.tech.synthetic_fur){let a=$(`
            ${t.race.evil?z("resource_Flesh_name"):z("resource_Furs_name")}
            `);e.append(a);let r=$('{{ Furs }}'),s=$('«'),i=$('»');a.append(s),a.append(r),a.append(i)}let u=$(`
            ${z("resource_Alloy_name")}
            `);e.append(u);let d=$('{{ Alloy }}'),_=$('«'),p=$('»');if(u.append(_),u.append(d),u.append(p),t.tech.polymer){let t=$(`
            ${z("resource_Polymer_name")}
            `);e.append(t);let a=$('{{ Polymer }}'),r=$('«'),s=$('»');t.append(r),t.append(a),t.append(s)}if(t.tech.nano){let t=$(`
            ${z("resource_Nano_Tube_name")}
            `);e.append(t);let a=$('{{ Nano }}'),r=$('«'),s=$('»');t.append(r),t.append(a),t.append(s)}if(t.tech.stanene){let t=$(`
            ${z("resource_Stanene_name")}
            `);e.append(t);let a=$('{{ Stanene }}'),r=$('«'),s=$('»');t.append(r),t.append(a),t.append(s)}function h(e){let a=!!t.tech.factory;switch(e){case"Lux":{let e=+t.resource[t.race.species].amount*(a?Zs.Lux.demand[t.tech.factory]:Zs.Lux.demand[0]);return e=Vs(e).toFixed(2),z("modal_factory_lux_label",[a?Zs.Lux.fur[t.tech.factory]:Zs.Lux.fur[0],t.resource.Furs.name,e])}case"Furs":{let e=a?Zs.Furs.money[t.tech.factory]:Zs.Furs.money[0],r=a?Zs.Furs.polymer[t.tech.factory]:Zs.Furs.polymer[0];return z("modal_factory_alloy_label",[e,z("resource_Money_name"),r,z("resource_Polymer_name"),t.race.evil?z("resource_Flesh_name"):z("resource_Furs_name")])}case"Alloy":{let e=a?Zs.Alloy.copper[t.tech.factory]:Zs.Alloy.copper[0],r=a?Zs.Alloy.aluminium[t.tech.factory]:Zs.Alloy.aluminium[0];return z("modal_factory_alloy_label",[e,z("resource_Copper_name"),r,z("resource_Aluminium_name"),z("resource_Alloy_name")])}case"Polymer":if(t.race.kindling_kindred||t.race.smoldering)return z("modal_factory_polymer_label2",[a?Zs.Polymer.oil_kk[t.tech.factory]:Zs.Polymer.oil_kk[0],z("resource_Oil_name"),z("resource_Polymer_name")]);{let e=a?Zs.Polymer.oil[t.tech.factory]:Zs.Polymer.oil[0],r=a?Zs.Polymer.lumber[t.tech.factory]:Zs.Polymer.lumber[0];return z("modal_factory_polymer_label1",[e,z("resource_Oil_name"),r,t.resource.Lumber.name,z("resource_Polymer_name")])}case"Nano":{let e=a?Zs.Nano_Tube.coal[t.tech.factory]:Zs.Nano_Tube.coal[0],r=a?Zs.Nano_Tube.neutronium[t.tech.factory]:Zs.Nano_Tube.neutronium[0];return z("modal_factory_nano_label",[e,z("resource_Coal_name"),r,z("resource_Neutronium_name"),z("resource_Nano_Tube_name")])}case"Stanene":{let e=a?Zs.Stanene.aluminium[t.tech.factory]:Zs.Stanene.aluminium[0],r=a?Zs.Stanene.nano[t.tech.factory]:Zs.Stanene.nano[0];return z("modal_factory_stanene_label",[e,z("resource_Aluminium_name"),r,z("resource_Nano_Tube_name"),z("resource_Stanene_name")])}}}ic({el:a||"#specialModal",data:t.city.factory,methods:{subItem:function(e){let a=b();for(var r=0;r0;r++)t.city.factory[e]--},addItem:function(e){let a=t.space.red_factory?t.space.red_factory.on+t.city.factory.on:t.city.factory.on;t.interstellar.int_factory&&i.int_factory&&(a+=2*i.int_factory),t.tauceti.tau_factory&&c.tau_factory&&(a+=c.tau_factory*(t.tech.isolation?5:3));let r=b();for(var s=0;s0))break;t.city.factory.Alloy--,t.city.factory[e]++}}},buildLabel:function(e){return h(e)},ariaProd:e=>`. ${t.city.factory[e]} factories producing ${e}.`,level(){let e=t.city.factory.Lux+t.city.factory.Furs+t.city.factory.Alloy+t.city.factory.Polymer+t.city.factory.Nano+t.city.factory.Stanene,a=t.space.red_factory?t.space.red_factory.on+t.city.factory.on:t.city.factory.on;return t.interstellar.int_factory&&i.int_factory&&(a+=2*i.int_factory),t.tauceti.tau_factory&&c.tau_factory&&(a+=c.tau_factory*(t.tech.isolation?5:3)),ei(e,a)}},filters:{on:()=>t.city.factory.Lux+t.city.factory.Furs+t.city.factory.Alloy+t.city.factory.Polymer+t.city.factory.Nano+t.city.factory.Stanene,max(){let e=t.space.red_factory?t.space.red_factory.on+t.city.factory.on:t.city.factory.on;return t.interstellar.int_factory&&i.int_factory&&(e+=2*i.int_factory),t.tauceti.tau_factory&&c.tau_factory&&(e+=c.tau_factory*(t.tech.isolation?5:3)),e},spook(e){if(3===t.city.factory.Lux&&a){let e=qc(6,12,!0);if(e.length>0)return e}return e}}}),["Lux","Furs","Alloy","Polymer","Nano","Stanene"].forEach((function(t){let a=e.hasClass("modalBody")?"specialModal":"iFactory";Ei(`${a}${t}`,(function(){return h(t)}),{elm:$(`#${a} .factory > .${t}`),attach:"#main"})}))}(a,r);break;case"droid":!function(e,a){let r=$(`
            ${z("modal_factory_operate")}: {{count | on}}/{{ on | max }}
            `);e.append(r);let s=$(`
            ${z("resource_Adamantite_name")}
            `);e.append(s);let i=$('{{ adam }}'),c=$('«'),o=$('»');s.append(c),s.append(i),s.append(o);let n=$(`
            ${z("resource_Uranium_name")}
            `);e.append(n);let l=$('{{ uran }}'),u=$('«'),d=$('»');n.append(u),n.append(l),n.append(d);let _=$(`
            ${z("resource_Coal_name")}
            `);e.append(_);let p=$('{{ coal }}'),h=$('«'),m=$('»');_.append(h),_.append(p),_.append(m);let g=$(`
            ${z("resource_Aluminium_name")}
            `);e.append(g);let f=$('{{ alum }}'),v=$('«'),y=$('»');function w(e){switch(e){case"adam":return z("modal_droid_res_label",[z("resource_Adamantite_name")]);case"uran":return z("modal_droid_res_label",[z("resource_Uranium_name")]);case"coal":return z("modal_droid_res_label",[z("resource_Coal_name")]);case"alum":return z("modal_droid_res_label",[z("resource_Aluminium_name")])}}g.append(v),g.append(f),g.append(y),ic({el:a||"#specialModal",data:t.interstellar.mining_droid,methods:{subItem:function(e){let a=b();for(var r=0;r0;r++)t.interstellar.mining_droid[e]--},addItem:function(e){let a=b();for(var r=0;r`. ${t.interstellar.mining_droid[e]} driod mining ${e}.`,level:()=>ei(t.interstellar.mining_droid.adam+t.interstellar.mining_droid.uran+t.interstellar.mining_droid.coal+t.interstellar.mining_droid.alum,t.interstellar.mining_droid.on)},filters:{on:()=>t.interstellar.mining_droid.adam+t.interstellar.mining_droid.uran+t.interstellar.mining_droid.coal+t.interstellar.mining_droid.alum,max:()=>t.interstellar.mining_droid.on}}),["adam","uran","coal","alum"].forEach((function(t){let a=e.hasClass("modalBody")?"specialModal":"iDroid";Ei(`${a}${t}`,(function(){return w(t)}),{elm:$(`#${a} .factory > .${t}`),attach:"#main"})}))}(a,r);break;case"graphene":!function(e,a){let r=t.race.truepath?"space":"interstellar",s=$(`
            ${z("modal_smelter_fuel")}: {{count | on}}/{{ on | max }}
            `);e.append(s);let i=$("
            ");if(e.append(i),!t.race.kindling_kindred&&!t.race.smoldering){let e=t.resource.Lumber.name,a=$(`${e} {{ Lumber }}`),r=$('«'),s=$('»');i.append(r),i.append(a),i.append(s)}if(t.resource.Coal.display){let e=$(`${t.resource.Coal.name} {{ Coal }}`),a=$('«'),r=$('»');i.append(a),i.append(e),i.append(r)}if(t.resource.Oil.display){let e=$(`${t.resource.Oil.name} {{ Oil }}`),a=$('«'),r=$('»');i.append(a),i.append(e),i.append(r)}function c(e){switch(e){case"wood":return z("modal_graphene_produce",[350,t.race.evil?z("resource_Bones_name"):z("resource_Lumber_name"),z("resource_Graphene_name")]);case"coal":return z("modal_graphene_produce",[25,z("resource_Coal_name"),z("resource_Graphene_name")]);case"oil":return z("modal_graphene_produce",[15,z("resource_Oil_name"),z("resource_Graphene_name")])}}ic({el:a||"#specialModal",data:t[r].g_factory,methods:{subWood(){let e=b();for(let a=0;a0;a++)t[r].g_factory.Lumber--},addWood(){let e=b();for(let a=0;a0))break;t[r].g_factory.Oil>t[r].g_factory.Coal?t[r].g_factory.Coal>0?t[r].g_factory.Coal--:t[r].g_factory.Oil--:t[r].g_factory.Oil>0?t[r].g_factory.Oil--:t[r].g_factory.Coal--,t[r].g_factory.Lumber++}},subCoal(){let e=b();for(let a=0;a0;a++)t[r].g_factory.Coal--},addCoal(){let e=b();for(let a=0;a0))break;t[r].g_factory.Lumber>0?t[r].g_factory.Lumber--:t[r].g_factory.Oil--,t[r].g_factory.Coal++}},subOil(){let e=b();for(let a=0;a0;a++)t[r].g_factory.Oil--},addOil(){let e=b();for(let a=0;a0))break;t[r].g_factory.Lumber>0?t[r].g_factory.Lumber--:t[r].g_factory.Coal--,t[r].g_factory.Oil++}},buildLabel:e=>c(e),ariaCount:e=>` ${t[r].g_factory[e]} ${e} fueled.`,ariaProd:e=>`. ${t[r].g_factory[e]} producing ${e}.`,level:()=>ei(t[r].g_factory.Lumber+t[r].g_factory.Coal+t[r].g_factory.Oil,t[r].g_factory.on)},filters:{on:function(e){return t[r].g_factory.Lumber+t[r].g_factory.Coal+t[r].g_factory.Oil}}}),["wood","coal","oil"].forEach((function(t){let a=e.hasClass("modalBody")?"specialModal":"iGraphene";Ei(`${a}${t}`,(function(){return c(t)}),{elm:$(`#${a} > div > .${t}`),attach:"#main"})}))}(a,r);break;case"pylon":!function(e,a){let r=$(`
            ${z("modal_pylon_casting")}: {{total | drain}}
            `);e.append(r);let s=$('
            ');e.append(s);let i=[];function c(e){let a=+Xs(t.race.casting[e]).toFixed(4),r=+(Xs(t.race.casting[e]+1)-Xs(t.race.casting[e])).toFixed(4),s=+(t.race.casting[e]/(t.race.casting[e]+75)*100).toFixed(2);return"crafting"===e?z("modal_pylon_casting_label_crafting",[a,s,+(2*t.race.casting[e]/(2*t.race.casting[e]+75)*100).toFixed(2),r]):z("modal_pylon_casting_label",[z(`modal_pylon_spell_${e}`),a,r,s])}i=t.race.orbit_decayed?["miner","science","factory","army","hunting","crafting"]:t.race.cataclysm?["science","factory","army","hunting","crafting"]:t.race.unfathomable?["miner","lumberjack","science","factory","army","hunting","crafting"]:["farmer","miner","lumberjack","science","factory","army","hunting","crafting"],t.tech.magic&&t.tech.magic>=3&&i.forEach((function(e){if("crafting"!==e&&"lumberjack"!==e&&"farmer"!==e||"farmer"===e&&!t.race.detritivore&&!t.race.carnivore&&!t.race.soul_eater&&!t.race.artifical||"lumberjack"===e&&!t.race.kindling_kindred&&!t.race.smoldering&&!t.race.evil||"crafting"===e&&t.tech.magic>=4){let t=$(`${z(`modal_pylon_spell_${e}`)} {{ ${e} }}`),a=$(`«`),r=$(`»`);s.append(a),s.append(t),s.append(r)}})),ic({el:a||"#specialModal",data:t.race.casting,methods:{buildLabel:e=>c(e),addSpell(e){let a=b();for(let r=0;r=a))break;t.race.casting[e]++,t.race.casting.total++,t.resource.Mana.diff-=a}},subSpell(e){let a=b();for(let r=0;r0;r++)t.race.casting[e]--,t.race.casting.total--},ariaCount:e=>` ${e} casting.`,level:()=>ei(t.race.casting.total,t.resource.Mana.gen,!0)},filters:{drain:function(e){let a=0;return i.forEach((function(e){t.race.casting[e]&&t.race.casting[e]>0&&(a+=Xs(t.race.casting[e]))})),z("modal_pylon_casting_cost",[+a.toFixed(3)])}}}),i.forEach((function(t){let a=e.hasClass("modalBody")?"specialModal":"iPylon";Ei(`${a}${t}`,(function(){return c(t)}),{elm:$(`#${a} > .pylon > .${t}`),attach:"#main"})}))}(a,r);break;case"rock_quarry":!function(e,a){e.append($(`
            ${z("modal_quarry_ratio",[t.resource.Chrysotile.name])}
            `));let r=$('
            «»
            ');e.append(r),ic({el:a||"#specialModal",data:t.city.rock_quarry,methods:{sub(){let e=b();t.city.rock_quarry.asbestos>0&&(t.city.rock_quarry.asbestos-=e,t.city.rock_quarry.asbestos<0&&(t.city.rock_quarry.asbestos=0))},add(){let e=b();t.city.rock_quarry.asbestos<100&&(t.city.rock_quarry.asbestos+=e,t.city.rock_quarry.asbestos>100&&(t.city.rock_quarry.asbestos=100))}}})}(a,r);break;case"titan_mine":!function(e,a){e.append($(`
            ${z("modal_quarry_ratio",[t.resource.Adamantite.name])}
            `));let r=$('
            «»
            ');e.append(r),ic({el:a||"#specialModal",data:t.space.titan_mine,methods:{sub(){let e=b();t.space.titan_mine.ratio>0&&(t.space.titan_mine.ratio-=e,t.space.titan_mine.ratio<0&&(t.space.titan_mine.ratio=0))},add(){let e=b();t.space.titan_mine.ratio<100&&(t.space.titan_mine.ratio+=e,t.space.titan_mine.ratio>100&&(t.space.titan_mine.ratio=100))}}})}(a,r);break;case"nanite_factory":!function(e,a){let r=$(`
            ${z("modal_factory_operate")}: {{count | on}}/{{ count | max }}
            `);e.append(r);let s=e.hasClass("modalBody")?"mNFactoryRes":"NFactoryRes",i=$(`
            `);e.append(i),Js.forEach((function(e){if(t.resource[e].display){let a=$(`${t.resource[e].name} {{ ${e} }}`),r=$(`«`),s=$(`»`);i.append(r),i.append(a),i.append(s)}})),ic({el:a||"#specialModal",data:t.city.nanite_factory,methods:{subItem:function(e){let a=b();t.city.nanite_factory[e]-=a,t.city.nanite_factory[e]<0&&(t.city.nanite_factory[e]=0)},addItem:function(e){let a=b(),r=0;Js.forEach((function(e){r+=t.city.nanite_factory[e]}));let s=50*t.city.nanite_factory.count-r;a>s&&(a=s),a>0&&(t.city.nanite_factory[e]+=a)},eatLabel:e=>`Consume ${e} to produce ${t.resource.Nanite.name}`,level(){let e=0;Js.forEach((function(a){e+=t.city.nanite_factory[a]}));let a=t.city.nanite_factory.count;return ei(e,a)}},filters:{on(){let e=0;return Js.forEach((function(a){e+=t.city.nanite_factory[a]})),e},max:()=>50*t.city.nanite_factory.count}}),Js.forEach((function(a){let r=e.hasClass("modalBody")?"specialModal":"iNFactory";Ei(`${r}${a}`,(function(){return function(e){let a=+(Ja[e]/100*(di.deconstructor.vars()[0]/100)).toFixed(4),r=+(t.city.nanite_factory[e]*a).toFixed(4);return z("modal_nfactory_resource_label",[1,t.resource[e].name,a,t.resource.Nanite.name,t.city.nanite_factory[e],r])}(a)}),{elm:$(`#${r} > .fuels > .${a}`),attach:"#main"})}))}(a,r);break;case"mining_ship":!function(e,a){e.append($(`
            ${z("tau_roid_mining_ship_ratio",[t.resource.Iron.name,t.resource.Aluminium.name])}
            `));let r=$('
            «»
            ');e.append(r),e.append($(`
            ${z("tau_roid_mining_ship_ratio",[t.resource.Iridium.name,t.resource.Neutronium.name])}
            `));let s=$('
            «»
            ');if(e.append(s),t.tech.tau_roid>=5){e.append($(`
            ${z("tau_roid_mining_ship_ratio",[t.resource.Orichalcum.name,t.resource.Elerium.name])}
            `));let a=$('
            «»
            ');e.append(a)}ic({el:a||"#specialModal",data:t.tauceti.mining_ship,methods:{sub(e){let a=b();t.tauceti.mining_ship[e]>0&&(t.tauceti.mining_ship[e]-=a,t.tauceti.mining_ship[e]<0&&(t.tauceti.mining_ship[e]=0))},add(e){let a=b();t.tauceti.mining_ship[e]<100&&(t.tauceti.mining_ship[e]+=a,t.tauceti.mining_ship[e]>100&&(t.tauceti.mining_ship[e]=100))}}})}(a,r);break;case"alien_space_station":!function(e,a){e.append($(`
            ${z("tau_gas2_alien_station_focus",[t.resource.Knowledge.name])}
            `));let r=$('
            «»
            ');e.append(r),ic({el:a||"#specialModal",data:t.tauceti.alien_space_station,methods:{sub(e){let a=b();t.tauceti.alien_space_station[e]>0&&(t.tauceti.alien_space_station[e]-=a,t.tauceti.alien_space_station[e]<0&&(t.tauceti.alien_space_station[e]=0))},add(e){let a=b();t.tauceti.alien_space_station[e]<100&&(t.tauceti.alien_space_station[e]+=a,t.tauceti.alien_space_station[e]>100&&(t.tauceti.alien_space_station[e]=100))}}})}(a,r);break;case"replicator":!function(e,a){if(t.race.replicator){e.append($(`
            ${"antimatter"===t.race.universe?z("tech_antireplicator"):z("tech_replicator")}
            `));let r=$('
            ');if(e.append(r),a){let e="";Object.keys(Ja).forEach((function(a){e+=`${t.resource[a].name}`})),r.append(`
            \n ${e}\n
            `)}else{let e="";Object.keys(Ja).forEach((function(a){t.resource[a].display&&(e+=`${t.resource[a].name}`)})),r.append(`
            ${e}
            `)}let s=a?$("
            "):$('
            ');r.append(s);let i=$('{{ pow }}MW'),c=$('«'),o=$('»');if(s.append(c),s.append(i),s.append(o),e.append('
            {{ res | result }}
            '),ic({el:a||"#specialModal",data:t.race.replicator,methods:{less(){let e=b();t.race.replicator.pow>0&&(t.race.replicator.pow-=e,t.race.replicator.pow<0&&(t.race.replicator.pow=0))},more(){let e=b();t.race.replicator.pow+=e},setVal(e){t.resource[e].display&&(t.race.replicator.res=e)},avail:e=>t.resource[e].display,aria:()=>t.race.replicator.pow+"MW"},filters:{resName:e=>t.resource[e].name,result:e=>z("tau_replicator",[Ys(e,t.race.replicator.pow).toFixed(3),t.resource[e].name])}}),!a){const e=document.getElementById("hscrolltarget");e.addEventListener("wheel",(t=>{t.preventDefault(),e.scrollLeft+=t.deltaY}))}}}(a,r)}}function Qs(){if(t.settings.tabLoad||2===t.settings.civTabs&&1===t.settings.govTabs){if(sc($("#industry")),t.city.smelter&&(t.city.smelter.count>0||t.race.cataclysm||t.race.orbit_decayed||t.tech.isolation)){var e=$(`

            ${z("city_smelter")}

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

            ${z("city_factory")}

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

            ${z("interstellar_mining_droid_title")}

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

            ${z("interstellar_g_factory_title")}

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

            ${z("city_pylon")}

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

            ${z("city_rock_quarry")}

            `);$("#industry").append(c),Ws("rock_quarry",c,"#iQuarry")}if(t.space.titan_mine&&t.space.titan_mine.count>0&&(c=$(`

            ${z("city_mine")}

            `),$("#industry").append(c),Ws("titan_mine",c,"#iTMine")),t.tech.tau_roid&&t.tech.tau_roid>=4&&t.tauceti.mining_ship){var o=$(`

            ${z("tau_roid_mining_ship")}

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

            ${z("tau_gas2_alien_station")}

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

            ${z("city_nanite_factory")}

            `);$("#industry").append(l),Ws("nanite_factory",l,"#iNFactory")}if(t.race.replicator&&t.tech.replicator){var u=$(`

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

            `);$("#industry").append(u),Ws("replicator",u,"#iReplicator")}}}Object.keys(ts).forEach((e=>Zr.evolution[e]={id:`evolution-${e}`,title:z(`evo_challenge_${e}`),desc(){let a="";return"micro"===t.race.universe&&(a+=`
            ${z("evo_challenge_micro_warn")}
            `),a+=`
            ${z(`evo_challenge_${e}_desc`)}
            `,["sludge","junker"].includes(e)&&(a+=`
            ${z("evo_start")}
            `),a},condition:()=>t.evolution.hasOwnProperty(e),cost:{DNA:()=>"c"===ts[e].t?25:50},challenge:!0,effect:()=>rs(e),action(){return Cs($(this)[0])&&("c"===ts[e].t?function(e){t.race[e]?(delete t.race[e],$(`#evolution-${e}`).removeClass("hl"),"sludge"===e&&Object.keys(_i).forEach((function(e){"junker"!==e&&"sludge"!==e&&$(`#evolution-${e}`).removeClass("is-hidden")}))):(t.race[e]=1,$(`#evolution-${e}`).addClass("hl"),"sludge"===e&&(Object.keys(_i).forEach((function(e){"junker"!==e&&"sludge"!==e&&$(`#evolution-${e}`).addClass("is-hidden")})),t.race.junker&&delete t.race.junker),"orbit_decay"===e&&(delete t.race.cataclysm,t.race.lone_survivor&&(delete t.race.lone_survivor,["nerfed","badgenes"].forEach((function(e){delete t.race[es[e]]}))))),Vr(),ro()}(e):function(e){if(t.race.sludge||Object.keys(_i).forEach((function(e){"junker"!==e&&"sludge"!==e&&$(`#evolution-${e}`).removeClass("is-hidden")})),t.race[e])delete t.race[e],$(`#evolution-${e}`).removeClass("hl"),["nerfed","badgenes"].forEach((function(e){delete t.race[es[e]]}));else{["junker","cataclysm","banana","truepath","lone_survivor"].forEach((function(e){delete t.race[e],$(`#evolution-${e}`).removeClass("hl")})),t.race[e]=1,$(`#evolution-${e}`).addClass("hl"),"junker"===e&&(Object.keys(_i).forEach((function(e){"junker"!==e&&"sludge"!==e&&$(`#evolution-${e}`).addClass("is-hidden")})),t.race.sludge&&delete t.race.sludge),"cataclysm"!==e&&"lone_survivor"!==e||delete t.race.orbit_decay,"truepath"===e||"lone_survivor"===e?(t.race.nerfed=1,["crispr","plasmid","mastery"].forEach((function(e){delete t.race[es[e]]}))):(["nerfed","badgenes"].forEach((function(e){delete t.race[es[e]]})),"antimatter"===t.race.universe?(t.race.weak_mastery=1,$("#evolution-mastery").hasClass("hl")||$("#evolution-mastery").addClass("hl")):(t.race.no_plasmid=1,$("#evolution-plasmid").hasClass("hl")||$("#evolution-plasmid").addClass("hl")));let a="truepath"===e||"lone_survivor"===e?["badgenes","trade","craft"]:["crispr","trade","craft"];for(let e=0;eOc(ts[e].e),highlight:()=>!!t.race[e],queue_complete:()=>0})),Zr.evolution.bunker={id:"evolution-bunker",title:z("evo_bunker"),desc:()=>`
            ${z("evo_bunker")}
            ${z("evo_challenge")}
            `,reqs:{evo:6},grant:["evo_challenge",1],condition:()=>t.genes.challenge&&100===t.evolution.final&&!t.race.evoFinalMenu,cost:{DNA:()=>10},effect:z("evo_bunker_effect"),action(){return!!Cs($(this)[0])},queue_complete:()=>t.tech.evo_challenge?0:1,flair:z("evo_bunker_flair")};const Zs={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 Vs(e){t.race.toxic&&(e*=1+di.toxic.vars()[0]/100);let a=Oi("shroomi");return a>0&&(e*=1+di.toxic.vars(1)[0]/100*a),"corpocracy"===t.civic.govern.type&&(e*=2.5),"socialist"===t.civic.govern.type&&(e*=.8),t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=2&&(e*=1.1),t.race.inflation&&(e*=1+t.race.inflation/1250),t.tech.isolation&&(e*=1+.5*(c.colony||0)),e*Oe("psychic_cash")}const Js=["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 Ys(e,a){return t.race.lone_survivor?17.5*u/Ja[e]*a:12.5*(u||1)/Ja[e]*a**.75}function Xs(e,t){return e*((1+(t=void 0===t?.0025:t))**e-1)}function ei(e,t,a){return e<=0?a?"has-text-success":"has-text-danger":e>=t?a?"has-text-danger":"has-text-success":e<=t/3?a?"has-text-info":"has-text-caution":e<=.66*t?"has-text-warning":e
            ${z("power_grid_header")}
            Distribute Low Power
            `),ic({el:"#powerModeSwitch",data:t.settings}),Object.keys(e).forEach((function(a){if(!e[a].s)return;let r="";"power"===a&&(r=qc(7,12,!1)),e[a].r&&e[a].rs&&t[e[a].r][e[a].rs]?($("#powerGrid").append(`
            ${e[a].n} {{ support }}/{{ s_max }}
            `),ic({el:`#pg${a}sup`,data:t[e[a].r][e[a].rs]})):$("#powerGrid").append(`
            ${e[a].n}${r}
            `);let s=$(`
            `);$("#powerGrid").append(s);let i=0;for(let r=0;r`);o.append(` ${u}${d}`),o.append('{{ on | off }} {{ on }}'),o.append('« »'),s.append(o),ic({el:`#pg${l.id}${a}`,data:t[n][c[1]],methods:{power_on(){let e=b();for(let a=0;a0;a++)t[n][c[1]].on--;l.postPower&&setTimeout((function(){l.postPower(!1)}),250)},higher(){let t=$(`#pg${l.id}${a}`).attr("data-idx"),r=$(`#pg${l.id}${a}`).prevAll('.circuit:not(".inactive")').attr("data-idx");if(r>=0){let s=e[a].l;s.splice(r,0,s.splice(t,1)[0]),e[a].l=s,ai()}},lower(){let t=$(`#pg${l.id}${a}`).attr("data-idx"),r=$(`#pg${l.id}${a}`).nextAll('.circuit:not(".inactive")').attr("data-idx");if(rt[n][c[1]].count-e,idx(e){let t=xc(18,11);return 10===e&&t.length>0?"1"+t:e}}})}else{let e=$(`
            `);e.append(`${u}${d}`),s.append(e)}}!function(e){let t=$(`#grid${e}`)[0],a=ri();Sortable.create(t,{onEnd(t){let r=a[e].l;r.splice(t.newDraggableIndex,0,r.splice(t.oldDraggableIndex,1)[0]),a[e].l=r,ai()}})}(a);let c=$(`
            `);$("#powerGrid").append(c),ic({el:`#${a}GridReset`,data:{},methods:{resetGrid(e){Ni(e,!0),ai()}}})}))}function ri(){return{power:{l:t.power,n:z("power"),s:!0,r:!1,rs:!1},moon:{l:t.support.moon,n:z("space_moon_info_name"),s:t.settings.space.moon,r:"space",rs:"moon_base"},red:{l:t.support.red,n:ea().red,s:t.settings.space.red,r:"space",rs:"spaceport"},belt:{l:t.support.belt,n:z("space_belt_info_name"),s:t.settings.space.belt,r:"space",rs:"space_station"},alpha:{l:t.support.alpha,n:z("interstellar_alpha_name"),s:t.settings.space.alpha,r:"interstellar",rs:"starport"},nebula:{l:t.support.nebula,n:z("interstellar_nebula_name"),s:t.settings.space.nebula,r:"interstellar",rs:"nexus"},gateway:{l:t.support.gateway,n:z("galaxy_gateway"),s:t.settings.space.gateway,r:"galaxy",rs:"starbase"},alien2:{l:t.support.alien2,n:z("galaxy_alien",[_i[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name]),s:t.settings.space.alien2,r:"galaxy",rs:"foothold"},lake:{l:t.support.lake,n:z("portal_lake_name"),s:t.settings.portal.lake,r:"portal",rs:"harbour"},spire:{l:t.support.spire,n:z("portal_spire_name"),s:t.settings.portal.spire,r:"portal",rs:"purifier"},titan:{l:t.support.titan,n:ea().titan,s:t.settings.space.titan,r:"space",rs:"electrolysis"},enceladus:{l:t.support.enceladus,n:ea().enceladus,s:t.settings.space.enceladus,r:"space",rs:"titan_spaceport"},eris:{l:t.support.eris,n:ea().eris,s:t.settings.space.eris,r:"space",rs:"drone_control"},tau_home:{l:t.support.tau_home,n:z("tau_planet",[_i[t.race.species].home]),s:t.settings.tau.home,r:"tauceti",rs:"orbital_station"},tau_red:{l:t.support.tau_red,n:z("tau_planet",[ea().red]),s:t.settings.tau.red,r:"tauceti",rs:"orbital_platform"},tau_roid:{l:t.support.tau_roid,n:z("tau_roid_title"),s:t.settings.tau.roid,r:"tauceti",rs:"patrol_ship"}}}function si(e){e=e||ri(),Object.keys(e).forEach((function(e){let t=$(`#grid${e}`)[0];if(t){let e=Sortable.get(t);e&&e.destroy()}}))}const ii=new Date,ci=Ic(),oi=Kc(),ni=["diverse","arrogant","angry","lazy","paranoid","greedy","puny","dumb","nearsighted","gluttony","slow","hard_of_hearing","pessimistic","solitary","pyrophobia","skittish","nyctophilia","frail","atrophy","invertebrate","pathetic","invertebrate","unorganized","slow_regen","snowy","mistrustful","fragrant","freespirit","hooved","heavy","gnawer"];function li(e,a){if(t.settings.boring)return t.race.hrt&&delete t.race.hrt,!1;switch(e){case"elven":case"capybara":case"centaur":case"wendigo":case"entish":case"yeti":return!!(11===ii.getMonth()&&ii.getDate()>=17||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0);case"wolven":case"vulpine":return!!(ci.active||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0);case"arraak":return!!(10===ii.getMonth()&&ii.getDate()>=22&&ii.getDate()<=28||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0);case"seraph":return!!(1===ii.getMonth()&&14===ii.getDate()||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0);case"junker":return!!(oi.active||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0)}return!1}const ui={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}},di={adaptable:{name:z("trait_adaptable_name"),desc:z("trait_adaptable"),type:"genus",val:3,vars(e){switch(e||t.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:z("trait_wasteful_name"),desc:z("trait_wasteful"),type:"genus",val:-3,vars(e){switch(e||t.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:z("trait_xenophobic_name"),desc:z("trait_xenophobic"),type:"genus",val:-5},carnivore:{name:z("trait_carnivore_name"),desc:z("trait_carnivore"),type:"genus",val:3,vars(e){switch(e||t.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:z("trait_beast_name"),desc:z("trait_beast"),type:"genus",val:2,vars(e){switch(e||t.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:z("trait_cautious_name"),desc:z("trait_cautious"),type:"genus",val:-2,vars(e){switch(e||t.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:z("trait_herbivore_name"),desc:z("trait_herbivore"),type:"genus",val:-7},instinct:{name:z("trait_instinct_name"),desc:z("trait_instinct"),type:"genus",val:5,vars(e){switch(e||t.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:z("trait_small_name"),desc:z("trait_small"),type:"genus",val:6,vars(e){switch(e||t.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:z("trait_weak_name"),desc:z("trait_weak"),type:"genus",val:-3,vars(e){switch(e||t.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:z("trait_large_name"),desc:z("trait_large"),type:"genus",val:-5,vars(e){switch(e||t.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:z("trait_strong_name"),desc:z("trait_strong"),type:"genus",val:5,vars(e){switch(e||t.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:z("trait_cold_blooded_name"),desc:z("trait_cold_blooded"),type:"genus",val:-2,vars(e){switch(e||t.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:z("trait_scales_name"),desc:z("trait_scales"),type:"genus",val:5,vars(e){switch(e||t.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:z("trait_flier_name"),desc:z("trait_flier"),type:"genus",val:3,vars(e){switch(e||t.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:z("trait_hollow_bones_name"),desc:z("trait_hollow_bones"),type:"genus",val:2,vars(e){switch(e||t.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:z("trait_sky_lover_name"),desc:z("trait_sky_lover"),type:"genus",val:-2,vars(e){switch(e||t.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:z("trait_rigid_name"),desc:z("trait_rigid"),type:"genus",val:-2,vars(e){switch(e||t.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:z("trait_high_pop_name"),desc:z("trait_high_pop"),type:"genus",val:3,vars(e){switch(e||t.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:z("trait_fast_growth_name"),desc:z("trait_fast_growth"),type:"genus",val:2,vars(e){switch(e||t.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:z("trait_high_metabolism_name"),desc:z("trait_high_metabolism"),type:"genus",val:-1,vars(e){switch(e||t.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:z("trait_photosynth_name"),desc:z("trait_photosynth"),type:"genus",val:3,vars(e){switch(e||t.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:z("trait_sappy_name"),desc:z("trait_sappy",[z("resource_Amber_name")]),type:"genus",val:4,vars(e){switch(e||t.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:z("trait_asymmetrical_name"),desc:z("trait_asymmetrical"),type:"genus",val:-3,vars(e){switch(e||t.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:z("trait_detritivore_name"),desc:z("trait_detritivore"),type:"genus",val:2,vars(e){switch(e||t.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:z("trait_spores_name"),desc:z("trait_spores"),type:"genus",val:2,vars(e){switch(e||t.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:z("trait_spongy_name"),desc:z("trait_spongy"),type:"genus",val:-2},submerged:{name:z("trait_submerged_name"),desc:z("trait_submerged"),type:"genus",val:3},low_light:{name:z("trait_low_light_name"),desc:z("trait_low_light"),type:"genus",val:-2,vars(e){switch(e||t.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:z("trait_elusive_name"),desc:z("trait_elusive"),type:"genus",val:7,vars(e){switch(e||t.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:z("trait_iron_allergy_name"),desc:z("trait_iron_allergy"),type:"genus",val:-4,vars(e){switch(e||t.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:z("trait_smoldering_name"),desc:z("trait_smoldering"),type:"genus",val:7,vars(e){switch(e||t.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:z("trait_cold_intolerance_name"),desc:z("trait_cold_intolerance"),type:"genus",val:-4,vars(e){switch(e||t.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:z("trait_chilled_name"),desc:z("trait_chilled"),type:"genus",val:7,vars(e){switch(e||t.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:z("trait_heat_intolerance_name"),desc:z("trait_heat_intolerance"),type:"genus",val:-4,vars(e){switch(e||t.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:z("trait_scavenger_name"),desc:z("trait_scavenger"),type:"genus",val:3,vars(e){switch(e||t.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:z("trait_nomadic_name"),desc:z("trait_nomadic"),type:"genus",val:-5},immoral:{name:z("trait_immoral_name"),desc:z("trait_immoral"),type:"genus",val:4,vars(e){switch(e||t.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:z("trait_evil_name"),desc:z("trait_evil"),type:"genus",val:0},blissful:{name:z("trait_blissful_name"),desc:z("trait_blissful"),type:"genus",val:3,vars(e){switch(e||t.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:z("trait_pompous_name"),desc:z("trait_pompous"),type:"genus",val:-6,vars(e){switch(e||t.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:z("trait_holy_name"),desc:z("trait_holy"),type:"genus",val:4,vars(e){switch(e||t.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:z("trait_artifical_name"),desc:z("trait_artifical"),type:"genus",val:5,vars(e){switch(e||t.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:z("trait_powered_name"),desc:z("trait_powered"),type:"genus",val:-6,vars(e){switch(e||t.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:z("trait_psychic_name"),desc:z("trait_psychic"),type:"genus",val:10,vars(e){switch(e||t.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:z("trait_tormented_name"),desc:z("trait_tormented"),type:"genus",val:-25,vars(e){switch(e||t.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:z("trait_darkness_name"),desc:z("trait_darkness"),type:"genus",val:1,vars(e){switch(e||t.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:z("trait_unfathomable_name"),desc:z("trait_unfathomable"),type:"genus",val:15,vars(e){switch(e||t.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:z("trait_creative_name"),desc:z("trait_creative"),type:"major",val:8,vars(e){switch(e||t.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:z("trait_diverse_name"),desc:z("trait_diverse"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_studious_name"),desc:z("trait_studious"),type:"major",val:2,vars(e){switch(e||t.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:z("trait_arrogant_name"),desc:z("trait_arrogant"),type:"major",val:-2,vars(e){switch(e||t.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:z("trait_brute_name"),desc:z("trait_brute"),type:"major",val:7,vars(e){switch(e||t.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:z("trait_angry_name"),desc:z("trait_angry"),type:"major",val:-1,vars(e){switch(e||t.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:z("trait_lazy_name"),desc:z("trait_lazy"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_curious_name"),desc:z("trait_curious"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_pack_mentality_name"),desc:z("trait_pack_mentality"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_tracker_name"),desc:z("trait_tracker"),type:"major",val:2,vars(e){switch(e||t.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:z("trait_playful_name"),desc:z("trait_playful"),type:"major",val:5,vars(e){switch(e||t.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:z("trait_freespirit_name"),desc:z("trait_freespirit"),type:"major",val:-3,vars(e){switch(e||t.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:z("trait_beast_of_burden_name"),desc:z("trait_beast_of_burden"),type:"major",val:3},sniper:{name:z("trait_sniper_name"),desc:z("trait_sniper"),type:"major",val:6,vars(e){switch(e||t.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:z("trait_hooved_name"),desc:z("trait_hooved"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_rage_name"),desc:z("trait_rage"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_heavy_name"),desc:z("trait_heavy"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_gnawer_name"),desc:z("trait_gnawer"),type:"major",val:-1,vars(e){switch(e||t.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:z("trait_calm_name"),desc:z("trait_calm"),type:"major",val:6,vars(e){switch(e||t.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:z("trait_pack_rat_name"),desc:z("trait_pack_rat"),type:"major",val:3,vars(e){switch(e||t.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:z("trait_paranoid_name"),desc:z("trait_paranoid"),type:"major",val:-3,vars(e){switch(e||t.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:z("trait_greedy_name"),desc:z("trait_greedy"),type:"major",val:-5,vars(e){switch(e||t.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:z("trait_merchant_name"),desc:z("trait_merchant"),type:"major",val:3,vars(e){switch(e||t.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:z("trait_smart_name"),desc:z("trait_smart"),type:"major",val:6,vars(e){switch(e||t.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:z("trait_puny_name"),desc:z("trait_puny"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_dumb_name"),desc:z("trait_dumb"),type:"major",val:-5,vars(e){switch(e||t.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:z("trait_tough_name"),desc:z("trait_tough"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_nearsighted_name"),desc:z("trait_nearsighted"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_intelligent_name"),desc:z("trait_intelligent"),type:"major",val:7,vars(e){switch(e||t.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:z("trait_regenerative_name"),desc:z("trait_regenerative"),type:"major",val:8,vars:e=>[4],vars(e){switch(e||t.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:z("trait_gluttony_name"),desc:z("trait_gluttony"),type:"major",val:-2,vars(e){switch(e||t.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:z("trait_slow_name"),desc:z("trait_slow"),type:"major",val:-5,vars(e){switch(e||t.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:z("trait_armored_name"),desc:z("trait_armored"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_optimistic_name"),desc:z("trait_optimistic"),type:"major",val:5,vars(e){switch(e||t.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:z("trait_chameleon_name"),desc:z("trait_chameleon"),type:"major",val:6,vars(e){switch(e||t.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:z("trait_slow_digestion_name"),desc:z("trait_slow_digestion"),type:"major",val:1,vars(e){switch(e||t.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:z("trait_hard_of_hearing_name"),desc:z("trait_hard_of_hearing"),type:"major",val:-3,vars(e){switch(e||t.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:z("trait_resourceful_name"),desc:z("trait_resourceful"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_selenophobia_name"),desc:z("trait_selenophobia"),type:"major",val:-6,vars(e){switch(e||t.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:z("trait_leathery_name"),desc:z("trait_leathery"),type:"major",val:2,vars(e){switch(e||t.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:z("trait_pessimistic_name"),desc:z("trait_pessimistic"),type:"major",val:-1,vars(e){switch(e||t.race.pessimistic||1){case.25:return[4];case.5:return[3];case 1:return[2];case 2:case 3:return[1]}}},hoarder:{name:z("trait_hoarder_name"),desc:z("trait_hoarder"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_solitary_name"),desc:z("trait_solitary"),type:"major",val:-1,vars(e){switch(e||t.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:z("trait_kindling_kindred_name"),desc:z("trait_kindling_kindred"),type:"major",val:8,vars(e){switch(e||t.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:z("trait_pyrophobia_name"),desc:z("trait_pyrophobia"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_hyper_name"),desc:z("trait_hyper"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_skittish_name"),desc:z("trait_skittish"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_fragrant_name"),desc:z("trait_fragrant"),type:"major",val:-3,vars(e){switch(e||t.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:z("trait_sticky_name"),desc:z("trait_sticky"),type:"major",val:3,vars(e){switch(e||t.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:z("trait_infectious_name"),desc:z("trait_infectious"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_parasite_name"),desc:z("trait_parasite"),type:"major",val:-4},toxic:{name:z("trait_toxic_name"),desc:z("trait_toxic"),type:"major",val:5,vars(e){switch(e||t.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:z("trait_nyctophilia_name"),desc:z("trait_nyctophilia"),type:"major",val:-3,vars(e){switch(e||t.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:z("trait_infiltrator_name"),desc:z("trait_infiltrator"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_hibernator_name"),desc:z("trait_hibernator"),type:"major",val:-3,vars(e){switch(e||t.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:z("trait_cannibalize_name"),desc:z("trait_cannibalize"),type:"major",val:5,vars(e){switch(e||t.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:z("trait_frail_name"),desc:z("trait_frail"),type:"major",val:-5,vars(e){switch(e||t.race.frail||1){case.25:return[2,2];case.5:return[1,2];case 1:return[1,1];case 2:case 3:return[1,0]}}},malnutrition:{name:z("trait_malnutrition_name"),desc:z("trait_malnutrition"),type:"major",val:1,vars(e){switch(e||t.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:z("trait_claws_name"),desc:z("trait_claws"),type:"major",val:5,vars(e){switch(e||t.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:z("trait_atrophy_name"),desc:z("trait_atrophy"),type:"major",val:-1,vars(e){switch(e||t.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:z("trait_hivemind_name"),desc:z("trait_hivemind"),type:"major",val:9,vars(e){switch(e||t.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:z("trait_tunneler_name"),desc:z("trait_tunneler"),type:"major",val:2,vars(e){switch(e||t.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:z("trait_blood_thirst_name"),desc:z("trait_blood_thirst"),type:"major",val:5,vars(e){switch(e||t.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:z("trait_apex_predator_name"),desc:z("trait_apex_predator"),type:"major",val:6,vars(e){switch(e||t.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:z("trait_invertebrate_name"),desc:z("trait_invertebrate"),type:"major",val:-2,vars(e){switch(e||t.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:z("trait_suction_grip_name"),desc:z("trait_suction_grip"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_befuddle_name"),desc:z("trait_befuddle"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_environmentalist_name"),desc:z("trait_environmentalist"),type:"major",val:-5},unorganized:{name:z("trait_unorganized_name"),desc:z("trait_unorganized"),type:"major",val:-2,vars(e){switch(e||t.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:z("trait_musical_name"),desc:z("trait_musical"),type:"major",val:5,vars(e){switch(e||t.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:z("trait_revive_name"),desc:z("trait_revive"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_slow_regen_name"),desc:z("trait_slow_regen"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_forge_name"),desc:z("trait_forge"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_autoignition_name"),desc:z("trait_autoignition"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_blurry_name"),desc:z("trait_blurry"),type:"major",val:5,vars(e){switch(e||t.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:z("trait_snowy_name"),desc:z("trait_snowy"),type:"major",val:-3,vars(e){switch(e||t.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:z("trait_ravenous_name"),desc:z("trait_ravenous"),type:"major",val:-5,vars(e){switch(e||t.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:z("trait_ghostly_name"),desc:z("trait_ghostly"),type:"major",val:5,vars(e){switch(e||t.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:z("trait_lawless_name"),desc:z("trait_lawless"),type:"major",val:3,vars(e){switch(e||t.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:z("trait_mistrustful_name"),desc:z("trait_mistrustful"),type:"major",val:-1,vars(e){switch(e||t.race.mistrustful||1){case.25:return[4];case.5:return[3];case 1:return[2];case 2:case 3:return[1]}}},humpback:{name:z("trait_humpback_name"),desc:z("trait_humpback"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_thalassophobia_name"),desc:z("trait_thalassophobia"),type:"major",val:-4},fiery:{name:z("trait_fiery_name"),desc:z("trait_fiery"),type:"major",val:10,vars(e){switch(e||t.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:z("trait_terrifying_name"),desc:z("trait_terrifying"),type:"major",val:6,vars(e){switch(e||t.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:z("trait_slaver_name"),desc:z("trait_slaver"),type:"major",val:12,vars(e){switch(e||t.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:z("trait_compact_name"),desc:z("trait_compact"),type:"major",val:10,vars(e){switch(e||t.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:z("trait_conniving_name"),desc:z("trait_conniving"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_pathetic_name"),desc:z("trait_pathetic"),type:"major",val:-5,vars(e){switch(e||t.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:z("trait_spiritual_name"),desc:z("trait_spiritual"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_truthful_name"),desc:z("trait_truthful"),type:"major",val:-7,vars(e){switch(e||t.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:z("trait_unified_name"),desc:z("trait_unified"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_rainbow_name"),desc:z("trait_rainbow"),type:"major",val:3,vars(e){switch(e||t.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:z("trait_magnificent_name"),desc:z("trait_magnificent"),type:"major",val:6,vars(e){switch(e||t.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:z("trait_noble_name"),desc:z("trait_noble"),type:"major",val:-3,vars(e){switch(e||t.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:z("trait_imitation_name"),desc:z("trait_imitation"),type:"major",val:6,vars(e){switch(e||t.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:z("trait_emotionless_name"),desc:z("trait_emotionless"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_logical_name"),desc:z("trait_logical"),type:"major",val:6,vars(e){switch(e||t.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:z("trait_shapeshifter_name"),desc:z("trait_shapeshifter"),type:"major",val:10,vars(e){switch(e||t.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:z("trait_deconstructor_name"),desc:z("trait_deconstructor"),type:"major",val:-4,vars(e){switch(e||t.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:z("trait_linked_name"),desc:z("trait_linked"),type:"major",val:4,vars(e){switch(e||t.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:z("trait_dark_dweller_name"),desc:z("trait_dark_dweller"),type:"major",val:-3,vars(e){switch(e||t.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:z("trait_swift_name"),desc:z("trait_swift"),type:"major",val:10,vars(e){switch(e||t.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:z("trait_anthropophagite_name"),desc:z("trait_anthropophagite"),type:"major",val:-2,vars(e){switch(e||t.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:z("trait_living_tool_name"),desc:z("trait_living_tool"),type:"major",val:12,vars(e){switch(e||t.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:z("trait_bloated_name"),desc:z("trait_bloated"),type:"major",val:-10,vars(e){switch(e||t.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:z("trait_ooze_name"),desc:z("trait_ooze"),type:"major",val:-50,vars(e){switch(e||t.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:z("trait_soul_eater_name"),desc:z("trait_soul_eater"),type:"special",val:0},untapped:{name:z("trait_untapped_name"),desc:z("trait_untapped"),type:"special",val:0},emfield:{name:z("trait_emfield_name"),desc:z("trait_emfield"),type:"special",val:-20},tactical:{name:z("trait_tactical_name"),desc:z("trait_tactical"),type:"minor",vars:e=>[5]},analytical:{name:z("trait_analytical_name"),desc:z("trait_analytical"),type:"minor",vars:e=>[1]},promiscuous:{name:z("trait_promiscuous_name"),desc:z("trait_promiscuous"),type:"minor",vars:e=>[1,.02]},resilient:{name:z("trait_resilient_name"),desc:z("trait_resilient"),type:"minor",vars:e=>[2]},cunning:{name:z("trait_cunning_name"),desc:z("trait_cunning"),type:"minor",vars:e=>[5]},hardy:{name:z("trait_hardy_name"),desc:z("trait_hardy"),type:"minor",vars:e=>[1]},ambidextrous:{name:z("trait_ambidextrous_name"),desc:z("trait_ambidextrous"),type:"minor",vars:e=>[3,2]},industrious:{name:z("trait_industrious_name"),desc:z("trait_industrious"),type:"minor",vars:e=>[2]},content:{name:z("trait_content_name"),desc:z("trait_content"),type:"minor"},fibroblast:{name:z("trait_fibroblast_name"),desc:z("trait_fibroblast"),type:"minor",vars:e=>[2]},metallurgist:{name:z("trait_metallurgist_name"),desc:z("trait_metallurgist"),type:"minor",vars:e=>[4]},gambler:{name:z("trait_gambler_name"),desc:z("trait_gambler"),type:"minor",vars:e=>[4]},persuasive:{name:z("trait_persuasive_name"),desc:z("trait_persuasive"),type:"minor",vars:e=>[1]},fortify:{name:z("trait_fortify_name"),desc:z("trait_fortify"),type:"special"},mastery:{name:z("trait_mastery_name"),desc:z("trait_mastery"),type:"special",vars:e=>[1]}},_i={protoplasm:{name:z("race_protoplasm"),desc:z("race_protoplasm_desc"),type:"organism",home:z("race_prehistoric"),entity:"ooze",traits:{},solar:{red:z("race_human_solar_red"),hell:z("race_human_solar_hell"),gas:z("race_human_solar_gas"),gas_moon:z("race_human_solar_gas_moon"),dwarf:z("race_human_solar_dwarf")},fanaticism:"none",basic:()=>!1},human:{name:z("race_human"),desc:z("race_human_desc"),type:"humanoid",home:z("race_human_home"),entity:z("race_human_entity"),traits:{creative:1,diverse:1},solar:{red:z("race_human_solar_red"),hell:z("race_human_solar_hell"),gas:z("race_human_solar_gas"),gas_moon:z("race_human_solar_gas_moon"),dwarf:z("race_human_solar_dwarf")},fanaticism:"creative",basic:()=>!0},elven:{name:z("race_elven"),desc:z(li("elven")?"race_xmas_elf_desc":"race_elven_desc"),type:"humanoid",home:z(li("elven")?"race_xmas_elf_home":"race_elven_home"),entity:z("race_elven_entity"),traits:{studious:1,arrogant:1},solar:{red:z(li("elven")?"race_xmas_elf_solar_red":"race_elven_solar_red"),hell:z(li("elven")?"race_xmas_elf_solar_hell":"race_elven_solar_hell"),gas:z(li("elven")?"race_xmas_elf_solar_gas":"race_elven_solar_gas"),gas_moon:z(li("elven")?"race_xmas_elf_solar_gas_moon":"race_elven_solar_gas_moon"),dwarf:z(li("elven")?"race_xmas_elf_solar_dwarf":"race_elven_solar_dwarf")},fanaticism:"studious",basic:()=>!0},orc:{name:z("race_orc"),desc:z("race_orc_desc"),type:"humanoid",home:z("race_orc_home"),entity:z("race_orc_entity"),traits:{brute:1,angry:1},solar:{red:z("race_orc_solar_red"),hell:z("race_orc_solar_hell"),gas:z("race_orc_solar_gas"),gas_moon:z("race_orc_solar_gas_moon"),dwarf:z("race_orc_solar_dwarf")},fanaticism:"brute",basic:()=>!0},cath:{name:z("race_cath"),desc:z("race_cath_desc"),type:"carnivore",home:z("race_cath_home"),entity:z("race_cath_entity"),traits:{lazy:1,curious:1},solar:{red:z("race_cath_solar_red"),hell:z("race_cath_solar_hell"),gas:z("race_cath_solar_gas"),gas_moon:z("race_cath_solar_gas_moon"),dwarf:z("race_cath_solar_dwarf")},fanaticism:"curious",basic:()=>!0},wolven:{name:li("wolven")?z("race_rabbit"):z("race_wolven"),desc:li("wolven")?z("race_rabbit_desc"):z("race_wolven_desc"),type:"carnivore",home:li("wolven")?z("race_rabbit_home"):z("race_wolven_home"),entity:li("wolven")?z("race_rabbit_entity"):z("race_wolven_entity"),traits:{pack_mentality:1,tracker:1},solar:{red:li("wolven")?z("race_rabbit_solar_red"):z("race_wolven_solar_red"),hell:li("wolven")?z("race_rabbit_solar_hell"):z("race_wolven_solar_hell"),gas:li("wolven")?z("race_rabbit_solar_gas"):z("race_wolven_solar_gas"),gas_moon:li("wolven")?z("race_rabbit_solar_gas_moon"):z("race_wolven_solar_gas_moon"),dwarf:li("wolven")?z("race_rabbit_solar_dwarf"):z("race_wolven_solar_dwarf")},fanaticism:"tracker",basic:()=>!0},vulpine:{name:li("vulpine")?z("race_chocolate_rabbit"):z("magic"===t.race.universe?"race_kitsune":"race_vulpine"),desc:()=>li("vulpine")?z("race_chocolate_rabbit_desc"):z("race_vulpine_desc",[z("magic"===t.race.universe?"race_kitsune":"race_vulpine"),t.race.hasOwnProperty("fox_color")?z(`color_${t.race.fox_color}`):z("color_red")]),type:"carnivore",home:li("vulpine")?z("race_chocolate_rabbit_home"):z("race_vulpine_home"),entity:z("race_vulpine_entity"),traits:{playful:1,freespirit:1},solar:{red:li("vulpine")?z("race_chocolate_rabbit_solar_red"):z("race_vulpine_solar_red"),hell:li("vulpine")?z("race_chocolate_rabbit_solar_hell"):z("race_vulpine_solar_hell"),gas:li("vulpine")?z("race_chocolate_rabbit_solar_gas"):z("race_vulpine_solar_gas"),gas_moon:li("vulpine")?z("race_chocolate_rabbit_solar_gas_moon"):z("race_vulpine_solar_gas_moon"),dwarf:li("vulpine")?z("race_chocolate_rabbit_solar_dwarf"):z("race_vulpine_solar_dwarf")},fanaticism:"playful",basic:()=>!0},centaur:{name:z(li("centaur")?"race_reindeer":"race_centaur"),desc:z(li("centaur")?"race_reindeer_desc":"race_centaur_desc"),type:"herbivore",home:z(li("centaur")?"race_reindeer_home":"race_centaur_home"),entity:z(li("centaur")?"race_reindeer_entity":"race_centaur_entity"),traits:{sniper:1,hooved:1},solar:{red:z(li("centaur")?"race_reindeer_solar_red":"race_centaur_solar_red"),hell:z(li("centaur")?"race_reindeer_solar_hell":"race_centaur_solar_hell"),gas:z(li("centaur")?"race_reindeer_solar_gas":"race_centaur_solar_gas"),gas_moon:z(li("centaur")?"race_reindeer_solar_gas_moon":"race_centaur_solar_gas_moon"),dwarf:z(li("centaur")?"race_reindeer_solar_dwarf":"race_centaur_solar_dwarf")},fanaticism:"sniper",basic:()=>!0},rhinotaur:{name:z("race_rhinotaur"),desc:z("race_rhinotaur_desc"),type:"herbivore",home:z("race_rhinotaur_home"),entity:z("race_rhinotaur_entity"),traits:{rage:1,heavy:1},solar:{red:z("race_rhinotaur_solar_red"),hell:z("race_rhinotaur_solar_hell"),gas:z("race_rhinotaur_solar_gas"),gas_moon:z("race_rhinotaur_solar_gas_moon"),dwarf:z("race_rhinotaur_solar_dwarf")},fanaticism:"rage",basic:()=>!0},capybara:{name:z(li("capybara")?"race_donkey":"race_capybara"),desc:z(li("capybara")?"race_donkey_desc":"race_capybara_desc"),type:"herbivore",home:z(li("capybara")?"race_donkey_home":"race_capybara_home"),entity:z(li("capybara")?"race_donkey_entity":"race_capybara_entity"),traits:{gnawer:1,calm:1},solar:{red:z(li("capybara")?"race_donkey_solar_red":"race_capybara_solar_red"),hell:z(li("capybara")?"race_donkey_solar_hell":"race_capybara_solar_hell"),gas:z(li("capybara")?"race_donkey_solar_gas":"race_capybara_solar_gas"),gas_moon:z(li("capybara")?"race_donkey_solar_gas_moon":"race_capybara_solar_gas_moon"),dwarf:z(li("capybara")?"race_donkey_solar_dwarf":"race_capybara_solar_dwarf")},fanaticism:"calm",basic:()=>!0},kobold:{name:z("race_kobold"),desc:z("race_kobold_desc"),type:"small",home:z("race_kobold_home"),entity:z("race_kobold_entity"),traits:{pack_rat:1,paranoid:1},solar:{red:z("race_kobold_solar_red"),hell:z("race_kobold_solar_hell"),gas:z("race_kobold_solar_gas"),gas_moon:z("race_kobold_solar_gas_moon"),dwarf:z("race_kobold_solar_dwarf")},fanaticism:"pack_rat",basic:()=>!0},goblin:{name:z("race_goblin"),desc:z("race_goblin_desc"),type:"small",home:z("race_goblin_home"),entity:z("race_goblin_entity"),traits:{greedy:1,merchant:1},solar:{red:z("race_goblin_solar_red"),hell:z("race_goblin_solar_hell"),gas:z("race_goblin_solar_gas"),gas_moon:z("race_goblin_solar_gas_moon"),dwarf:z("race_goblin_solar_dwarf")},fanaticism:"merchant",basic:()=>!0},gnome:{name:z("race_gnome"),desc:z("race_gnome_desc"),type:"small",home:z("race_gnome_home"),entity:z("race_gnome_entity"),traits:{smart:1,puny:1},solar:{red:z("race_gnome_solar_red"),hell:z("race_gnome_solar_hell"),gas:z("race_gnome_solar_gas"),gas_moon:z("race_gnome_solar_gas_moon"),dwarf:z("race_gnome_solar_dwarf")},fanaticism:"smart",basic:()=>!0},ogre:{name:z("race_ogre"),desc:z("race_ogre_desc"),type:"giant",home:z("race_ogre_home"),entity:z("race_ogre_entity"),traits:{dumb:1,tough:1},solar:{red:z("race_ogre_solar_red"),hell:z("race_ogre_solar_hell"),gas:z("race_ogre_solar_gas"),gas_moon:z("race_ogre_solar_gas_moon"),dwarf:z("race_ogre_solar_dwarf")},fanaticism:"tough",basic:()=>!0},cyclops:{name:z("race_cyclops"),desc:z("race_cyclops_desc"),type:"giant",home:z("race_cyclops_home"),entity:z("race_cyclops_entity"),traits:{nearsighted:1,intelligent:1},solar:{red:z("race_cyclops_solar_red"),hell:z("race_cyclops_solar_hell"),gas:z("race_cyclops_solar_gas"),gas_moon:z("race_cyclops_solar_gas_moon"),dwarf:z("race_cyclops_solar_dwarf")},fanaticism:"intelligent",basic:()=>!0},troll:{name:z("race_troll"),desc:z("race_troll_desc"),type:"giant",home:z("race_troll_home"),entity:z("race_troll_entity"),traits:{regenerative:1,gluttony:1},solar:{red:z("race_troll_solar_red"),hell:z("race_troll_solar_hell"),gas:z("race_troll_solar_gas"),gas_moon:z("race_troll_solar_gas_moon"),dwarf:z("race_troll_solar_dwarf")},fanaticism:"regenerative",basic:()=>!0},tortoisan:{name:z("race_tortoisan"),desc:()=>z("race_tortoisan_desc",[t.race.hasOwnProperty("shell_color")?z(`color_${t.race.shell_color}`):z("color_green")]),type:"reptilian",home:z("race_tortoisan_home"),entity:z("race_tortoisan_entity"),traits:{slow:1,armored:1},solar:{red:z("race_tortoisan_solar_red"),hell:z("race_tortoisan_solar_hell"),gas:z("race_tortoisan_solar_gas"),gas_moon:z("race_tortoisan_solar_gas_moon"),dwarf:z("race_tortoisan_solar_dwarf")},fanaticism:"armored",basic:()=>!0},gecko:{name:z("race_gecko"),desc:z("race_gecko_desc"),type:"reptilian",home:z("race_gecko_home"),entity:z("race_gecko_entity"),traits:{optimistic:1,chameleon:1},solar:{red:z("race_gecko_solar_red"),hell:z("race_gecko_solar_hell"),gas:z("race_gecko_solar_gas"),gas_moon:z("race_gecko_solar_gas_moon"),dwarf:z("race_gecko_solar_dwarf")},fanaticism:"optimistic",basic:()=>!0},slitheryn:{name:z("race_slitheryn"),desc:z("race_slitheryn_desc"),type:"reptilian",home:z("race_slitheryn_home"),entity:z("race_slitheryn_entity"),traits:{slow_digestion:1,hard_of_hearing:1},solar:{red:z("race_slitheryn_solar_red"),hell:z("race_slitheryn_solar_hell"),gas:z("race_slitheryn_solar_gas"),gas_moon:z("race_slitheryn_solar_gas_moon"),dwarf:z("race_slitheryn_solar_dwarf")},fanaticism:"slow_digestion",basic:()=>!0},arraak:{name:z(li("arraak")?"race_turkey":"race_arraak"),desc:z(li("arraak")?"race_turkey_desc":"race_arraak_desc"),type:"avian",home:z(li("arraak")?"race_turkey_home":"race_arraak_home"),entity:z("race_arraak_entity"),traits:{resourceful:1,selenophobia:1},solar:{red:z(li("arraak")?"race_turkey_solar_red":"race_arraak_solar_red"),hell:z(li("arraak")?"race_turkey_solar_hell":"race_arraak_solar_hell"),gas:z(li("arraak")?"race_turkey_solar_gas":"race_arraak_solar_gas"),gas_moon:z(li("arraak")?"race_turkey_solar_gas_moon":"race_arraak_solar_gas_moon"),dwarf:z(li("arraak")?"race_turkey_solar_dwarf":"race_arraak_solar_dwarf")},fanaticism:"resourceful",basic:()=>!0},pterodacti:{name:z("race_pterodacti"),desc:z("race_pterodacti_desc"),type:"avian",home:z("race_pterodacti_home"),entity:z("race_pterodacti_entity"),traits:{leathery:1,pessimistic:1},solar:{red:z("race_pterodacti_solar_red"),hell:z("race_pterodacti_solar_hell"),gas:z("race_pterodacti_solar_gas"),gas_moon:z("race_pterodacti_solar_gas_moon"),dwarf:z("race_pterodacti_solar_dwarf")},fanaticism:"leathery",basic:()=>!0},dracnid:{name:z("race_dracnid"),desc:z("race_dracnid_desc"),type:"avian",home:z("race_dracnid_home"),entity:z("race_dracnid_entity"),traits:{hoarder:1,solitary:1},solar:{red:z("race_dracnid_solar_red"),hell:z("race_dracnid_solar_hell"),gas:z("race_dracnid_solar_gas"),gas_moon:z("race_dracnid_solar_gas_moon"),dwarf:z("race_dracnid_solar_dwarf")},fanaticism:"hoarder",basic:()=>!0},entish:{name:z(li("entish")?"race_spruce":"race_entish"),desc:z(li("entish")?"race_spruce_desc":"race_entish_desc"),type:"plant",home:z(li("entish")?"race_spruce_home":"race_entish_home"),entity:z(li("entish")?"race_spruce_entity":"race_entish_entity"),traits:{kindling_kindred:1,pyrophobia:1},solar:{red:z(li("entish")?"race_spruce_solar_red":"race_entish_solar_red"),hell:z(li("entish")?"race_spruce_solar_hell":"race_entish_solar_hell"),gas:z(li("entish")?"race_spruce_solar_gas":"race_entish_solar_gas"),gas_moon:z(li("entish")?"race_spruce_solar_gas_moon":"race_entish_solar_gas_moon"),dwarf:z(li("entish")?"race_spruce_solar_dwarf":"race_entish_solar_dwarf")},fanaticism:"kindling_kindred",basic:()=>!0},cacti:{name:z("race_cacti"),desc:z("race_cacti_desc"),type:"plant",home:z("race_cacti_home"),entity:z("race_cacti_entity"),traits:{hyper:1,skittish:1},solar:{red:z("race_cacti_solar_red"),hell:z("race_cacti_solar_hell"),gas:z("race_cacti_solar_gas"),gas_moon:z("race_cacti_solar_gas_moon"),dwarf:z("race_cacti_solar_dwarf")},fanaticism:"hyper",basic:()=>!0},pinguicula:{name:z("race_pinguicula"),desc:z("race_pinguicula_desc"),type:"plant",home:z("race_pinguicula_home"),entity:z("race_pinguicula_entity"),traits:{fragrant:1,sticky:1},solar:{red:z("race_pinguicula_solar_red"),hell:z("race_pinguicula_solar_hell"),gas:z("race_pinguicula_solar_gas"),gas_moon:z("race_pinguicula_solar_gas_moon"),dwarf:z("race_pinguicula_solar_dwarf")},fanaticism:"sticky",basic:()=>!0},sporgar:{name:z("race_sporgar"),desc:z("race_sporgar_desc"),type:"fungi",home:z("race_sporgar_home"),entity:z("race_sporgar_entity"),traits:{infectious:1,parasite:1},solar:{red:z("race_sporgar_solar_red"),hell:z("race_sporgar_solar_hell"),gas:z("race_sporgar_solar_gas"),gas_moon:z("race_sporgar_solar_gas_moon"),dwarf:z("race_sporgar_solar_dwarf")},fanaticism:"infectious",basic:()=>!1},shroomi:{name:z("race_shroomi"),desc:z("race_shroomi_desc"),type:"fungi",home:z("race_shroomi_home"),entity:z("race_shroomi_entity"),traits:{toxic:1,nyctophilia:1},solar:{red:z("race_shroomi_solar_red"),hell:z("race_shroomi_solar_hell"),gas:z("race_shroomi_solar_gas"),gas_moon:z("race_shroomi_solar_gas_moon"),dwarf:z("race_shroomi_solar_dwarf")},fanaticism:"toxic",basic:()=>!0},moldling:{name:z("race_moldling"),desc:z("race_moldling_desc"),type:"fungi",home:z("race_moldling_home"),entity:z("race_moldling_entity"),traits:{infiltrator:1,hibernator:1},solar:{red:z("race_moldling_solar_red"),hell:z("race_moldling_solar_hell"),gas:z("race_moldling_solar_gas"),gas_moon:z("race_moldling_solar_gas_moon"),dwarf:z("race_moldling_solar_dwarf")},fanaticism:"infiltrator",basic:()=>!0},mantis:{name:z("race_mantis"),desc:z("race_mantis_desc"),type:"insectoid",home:z("race_mantis_home"),entity:z("race_mantis_entity"),traits:{cannibalize:1,malnutrition:1},solar:{red:z("race_mantis_solar_red"),hell:z("race_mantis_solar_hell"),gas:z("race_mantis_solar_gas"),gas_moon:z("race_mantis_solar_gas_moon"),dwarf:z("race_mantis_solar_dwarf")},fanaticism:"cannibalize",basic:()=>!0},scorpid:{name:z("race_scorpid"),desc:z("race_scorpid_desc"),type:"insectoid",home:z("race_scorpid_home"),entity:z("race_scorpid_entity"),traits:{claws:1,atrophy:1},solar:{red:z("race_scorpid_solar_red"),hell:z("race_scorpid_solar_hell"),gas:z("race_scorpid_solar_gas"),gas_moon:z("race_scorpid_solar_gas_moon"),dwarf:z("race_scorpid_solar_dwarf")},fanaticism:"claws",basic:()=>!0},antid:{name:z("race_antid"),desc:z("race_antid_desc"),type:"insectoid",home:z("race_antid_home"),entity:z("race_antid_entity"),traits:{hivemind:1,tunneler:1},solar:{red:z("race_antid_solar_red"),hell:z("race_antid_solar_hell"),gas:z("race_antid_solar_gas"),gas_moon:z("race_antid_solar_gas_moon"),dwarf:z("race_antid_solar_dwarf")},fanaticism:"hivemind",basic:()=>!0},sharkin:{name:z("race_sharkin"),desc:z("race_sharkin_desc"),type:"aquatic",home:z("race_sharkin_home"),entity:z("race_sharkin_entity"),traits:{blood_thirst:1,apex_predator:1},solar:{red:z("race_sharkin_solar_red"),hell:z("race_sharkin_solar_hell"),gas:z("race_sharkin_solar_gas"),gas_moon:z("race_sharkin_solar_gas_moon"),dwarf:z("race_sharkin_solar_dwarf")},fanaticism:"blood_thirst",basic:()=>!!["oceanic","swamp"].includes(t.city.biome)},octigoran:{name:z("race_octigoran"),desc:z("race_octigoran_desc"),type:"aquatic",home:z("race_octigoran_home"),entity:z("race_octigoran_entity"),traits:{invertebrate:1,suction_grip:1},solar:{red:z("race_octigoran_solar_red"),hell:z("race_octigoran_solar_hell"),gas:z("race_octigoran_solar_gas"),gas_moon:z("race_octigoran_solar_gas_moon"),dwarf:z("race_octigoran_solar_dwarf")},fanaticism:"suction_grip",basic:()=>!!["oceanic","swamp"].includes(t.city.biome)},dryad:{name:z("race_dryad"),desc:z("race_dryad_desc"),type:"fey",home:z("race_dryad_home"),entity:z("race_dryad_entity"),traits:{befuddle:1,environmentalist:1,kindling_kindred:1},solar:{red:z("race_dryad_solar_red"),hell:z("race_dryad_solar_hell"),gas:z("race_dryad_solar_gas"),gas_moon:z("race_dryad_solar_gas_moon"),dwarf:z("race_dryad_solar_dwarf")},fanaticism:"befuddle",basic:()=>!!["forest","swamp","taiga"].includes(t.city.biome)},satyr:{name:z("race_satyr"),desc:z("race_satyr_desc"),type:"fey",home:z("race_satyr_home"),entity:z("race_satyr_entity"),traits:{unorganized:1,musical:1},solar:{red:z("race_satyr_solar_red"),hell:z("race_satyr_solar_hell"),gas:z("race_satyr_solar_gas"),gas_moon:z("race_satyr_solar_gas_moon"),dwarf:z("race_satyr_solar_dwarf")},fanaticism:"musical",basic:()=>!!["forest","swamp","taiga"].includes(t.city.biome)},phoenix:{name:z("race_phoenix"),desc:z("race_phoenix_desc"),type:"heat",home:z("race_phoenix_home"),entity:z("race_phoenix_entity"),traits:{revive:1,slow_regen:1},solar:{red:z("race_phoenix_solar_red"),hell:z("race_phoenix_solar_hell"),gas:z("race_phoenix_solar_gas"),gas_moon:z("race_phoenix_solar_gas_moon"),dwarf:z("race_phoenix_solar_dwarf")},fanaticism:"revive",basic:()=>!!["volcanic","ashland"].includes(t.city.biome)},salamander:{name:z("race_salamander"),desc:z("race_salamander_desc"),type:"heat",home:z("race_salamander_home"),entity:z("race_salamander_entity"),traits:{forge:1,autoignition:1},solar:{red:z("race_salamander_solar_red"),hell:z("race_salamander_solar_hell"),gas:z("race_salamander_solar_gas"),gas_moon:z("race_salamander_solar_gas_moon"),dwarf:z("race_salamander_solar_dwarf")},fanaticism:"forge",basic:()=>!!["volcanic","ashland"].includes(t.city.biome)},yeti:{name:z(li("yeti")?"race_snowman":"race_yeti"),desc:z(li("yeti")?"race_snowman_desc":"race_yeti_desc"),type:"polar",home:z(li("yeti")?"race_snowman_home":"race_yeti_home"),entity:z(li("yeti")?"race_snowman_entity":"race_yeti_entity"),traits:{blurry:1,snowy:1},solar:{red:z(li("yeti")?"race_snowman_solar_red":"race_yeti_solar_red"),hell:z(li("yeti")?"race_snowman_solar_hell":"race_yeti_solar_hell"),gas:z(li("yeti")?"race_snowman_solar_gas":"race_yeti_solar_gas"),gas_moon:z(li("yeti")?"race_snowman_solar_gas_moon":"race_yeti_solar_gas_moon"),dwarf:z(li("yeti")?"race_snowman_solar_dwarf":"race_yeti_solar_dwarf")},fanaticism:"blurry",basic:()=>!!["tundra","taiga"].includes(t.city.biome)},wendigo:{name:z(li("wendigo")?"race_krampus":"race_wendigo"),desc:z(li("wendigo")?"race_krampus_desc":"race_wendigo_desc"),type:"polar",home:z(li("wendigo")?"race_krampus_home":"race_wendigo_home"),entity:z(li("wendigo")?"race_krampus_entity":"race_wendigo_entity"),traits:{ravenous:1,ghostly:1,soul_eater:1},solar:{red:z(li("wendigo")?"race_krampus_solar_red":"race_wendigo_solar_red"),hell:z(li("wendigo")?"race_krampus_solar_hell":"race_wendigo_solar_hell"),gas:z(li("wendigo")?"race_krampus_solar_gas":"race_wendigo_solar_gas"),gas_moon:z(li("wendigo")?"race_krampus_solar_gas_moon":"race_wendigo_solar_gas_moon"),dwarf:z(li("wendigo")?"race_krampus_solar_dwarf":"race_wendigo_solar_dwarf")},fanaticism:"ghostly",basic:()=>!!["tundra","taiga"].includes(t.city.biome)},tuskin:{name:z("race_tuskin"),desc:z("race_tuskin_desc"),type:"sand",home:z("race_tuskin_home"),entity:z("race_tuskin_entity"),traits:{lawless:1,mistrustful:1},solar:{red:z("race_tuskin_solar_red"),hell:z("race_tuskin_solar_hell"),gas:z("race_tuskin_solar_gas"),gas_moon:z("race_tuskin_solar_gas_moon"),dwarf:z("race_tuskin_solar_dwarf")},fanaticism:"lawless",basic:()=>!!["desert","ashland"].includes(t.city.biome)},kamel:{name:z("race_kamel"),desc:z("race_kamel_desc"),type:"sand",home:z("race_kamel_home"),entity:z("race_kamel_entity"),traits:{humpback:1,thalassophobia:1},solar:{red:z("race_kamel_solar_red"),hell:z("race_kamel_solar_hell"),gas:z("race_kamel_solar_gas"),gas_moon:z("race_kamel_solar_gas_moon"),dwarf:z("race_kamel_solar_dwarf")},fanaticism:"humpback",basic:()=>!!["desert","ashland"].includes(t.city.biome)},balorg:{name:z("race_balorg"),desc:z("race_balorg_desc"),type:"demonic",home:z("race_balorg_home"),entity:z("race_balorg_entity"),traits:{fiery:1,terrifying:1,slaver:1},solar:{red:z("race_balorg_solar_red"),hell:z("race_balorg_solar_hell"),gas:z("race_balorg_solar_gas"),gas_moon:z("race_balorg_solar_gas_moon"),dwarf:z("race_balorg_solar_dwarf")},fanaticism:"fiery",basic:()=>"hellscape"===t.city.biome},imp:{name:z("race_imp"),desc:z("race_imp_desc"),type:"demonic",home:z("race_imp_home"),entity:z("race_imp_entity"),traits:{compact:1,conniving:1,pathetic:1},solar:{red:z("race_imp_solar_red"),hell:z("race_imp_solar_hell"),gas:z("race_imp_solar_gas"),gas_moon:z("race_imp_solar_gas_moon"),dwarf:z("race_imp_solar_dwarf")},fanaticism:"conniving",basic:()=>"hellscape"===t.city.biome},seraph:{name:z(li("seraph")?"race_cherub":"race_seraph"),desc:z(li("seraph")?"race_cherub_desc":"race_seraph_desc"),type:"angelic",home:z(li("seraph")?"race_cherub_home":"race_seraph_home"),entity:z(li("seraph")?"race_cherub_entity":"race_seraph_entity"),traits:{unified:1,spiritual:1,truthful:1},solar:{red:z(li("seraph")?"race_cherub_solar_red":"race_seraph_solar_red"),hell:z(li("seraph")?"race_cherub_solar_hell":"race_seraph_solar_hell"),gas:z(li("seraph")?"race_cherub_solar_gas":"race_seraph_solar_gas"),gas_moon:z(li("seraph")?"race_cherub_solar_gas_moon":"race_seraph_solar_gas_moon"),dwarf:z(li("seraph")?"race_cherub_solar_dwarf":"race_seraph_solar_dwarf")},fanaticism:"spiritual",basic:()=>"eden"===t.city.biome},unicorn:{name:z("race_unicorn"),desc:z("race_unicorn_desc"),type:"angelic",home:z("race_unicorn_home"),entity:z("race_unicorn_entity"),traits:{rainbow:1,magnificent:1,noble:1},solar:{red:z("race_unicorn_solar_red"),hell:z("race_unicorn_solar_hell"),gas:z("race_unicorn_solar_gas"),gas_moon:z("race_unicorn_solar_gas_moon"),dwarf:z("race_unicorn_solar_dwarf")},fanaticism:"magnificent",basic:()=>"eden"===t.city.biome},synth:{name:z("race_synth"),desc(){let e=t.race.hasOwnProperty("srace")?t.race.srace:"human";return z("race_synth_desc",[_i[e].name])},type:"synthetic",home:z("race_synth_home"),entity:z("race_synth_entity"),traits:{imitation:1,emotionless:1,logical:1},solar:{red:z("race_synth_solar_red"),hell:z("race_synth_solar_hell"),gas:z("race_synth_solar_gas"),gas_moon:z("race_synth_solar_gas_moon"),dwarf:z("race_synth_solar_dwarf")},fanaticism:"logical",basic:()=>!1},nano:{name:z("race_nano"),desc:z("race_nano_desc"),type:"synthetic",home:z("race_nano_home"),entity:z("race_nano_entity"),traits:{deconstructor:1,linked:1,shapeshifter:1},solar:{red:z("race_nano_solar_red"),hell:z("race_nano_solar_hell"),gas:z("race_nano_solar_gas"),gas_moon:z("race_nano_solar_gas_moon"),dwarf:z("race_nano_solar_dwarf")},fanaticism:"shapeshifter",basic:()=>!1},ghast:{name:z("race_ghast"),desc:z("race_ghast_desc"),type:"eldritch",home:z("race_ghast_home"),entity:z("race_ghast_entity"),traits:{dark_dweller:1,swift:1,anthropophagite:1},solar:{red:z("race_ghast_solar_red"),hell:z("race_ghast_solar_hell"),gas:z("race_ghast_solar_gas"),gas_moon:z("race_ghast_solar_gas_moon"),dwarf:z("race_ghast_solar_dwarf")},fanaticism:"swift",basic:()=>!1},shoggoth:{name:z("race_shoggoth"),desc:z("race_shoggoth_desc"),type:"eldritch",home:z("race_shoggoth_home"),entity:z("race_shoggoth_entity"),traits:{living_tool:1,bloated:1},solar:{red:z("race_shoggoth_solar_red"),hell:z("race_shoggoth_solar_hell"),gas:z("race_shoggoth_solar_gas"),gas_moon:z("race_shoggoth_solar_gas_moon"),dwarf:z("race_shoggoth_solar_dwarf")},fanaticism:"living_tool",basic:()=>!1},junker:{name:li("junker")?z("race_ghoul"):z("race_junker"),desc:li("junker")?z("race_ghoul_desc"):z("race_junker_desc"),type:t.race.hasOwnProperty("jtype")?t.race.jtype:"humanoid",home:li("junker")?z("race_ghoul_home"):z("race_junker_home"),entity:li("junker")?z("race_ghoul_entity"):z("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:li("junker")?z("race_ghoul_solar_red"):z("race_junker_solar_red"),hell:li("junker")?z("race_ghoul_solar_hell"):z("race_junker_solar_hell"),gas:li("junker")?z("race_ghoul_solar_gas"):z("race_junker_solar_gas"),gas_moon:li("junker")?z("race_ghoul_solar_gas_moon"):z("race_junker_solar_gas_moon"),dwarf:li("junker")?z("race_ghoul_solar_dwarf"):z("race_junker_solar_dwarf")},fanaticism:"none",basic:()=>!1},sludge:{name:z("race_sludge"),desc:z("race_sludge_desc"),type:t.race.hasOwnProperty("jtype")?t.race.jtype:"humanoid",home:z("race_sludge_home"),entity:z("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:z("race_sludge_solar_red"),hell:z("race_sludge_solar_hell"),gas:z("race_sludge_solar_gas"),gas_moon:z("race_sludge_solar_gas_moon"),dwarf:z("race_sludge_solar_dwarf")},fanaticism:"ooze",basic:()=>!1},custom:function(){if(t.hasOwnProperty("custom")&&t.custom.hasOwnProperty("race0")){let e={};for(let a=0;adi[a].val&&(a=t.custom.race0.traits[e]);return{name:t.custom.race0.name,desc:t.custom.race0.desc,type:t.custom.race0.genus,home:t.custom.race0.home,entity:t.custom.race0.entity,traits:e,solar:{red:t.custom.race0.red,hell:t.custom.race0.hell,gas:t.custom.race0.gas,gas_moon:t.custom.race0.gas_moon,dwarf:t.custom.race0.dwarf},fanaticism:a,basic:()=>!1}}return{}}()},pi={organism:{},humanoid:{},carnivore:{},herbivore:{},omnivore:{},small:{},giant:{},reptilian:{},avian:{},insectoid:{},plant:{},fungi:{},aquatic:{},fey:{},heat:{},polar:{},sand:{},demonic:{},angelic:{},synthetic:{},eldritch:{}};function hi(e,a){let r=1,s=D("theorist",1);!s||"factory"!==a&&"miner"!==a&&"lumberjack"!==a||(r*=1-s/100);let i=D("inspirational",0);!i||"farmer"!==a&&"factory"!==a&&"miner"!==a&&"lumberjack"!==a||(r*=1+i/100);let c=D("dirty_jobs",2);if(c&&"miner"===a&&(r*=1+c/100),t.race.rejuvenated&&["lumberjack","miner","factory"].includes(a)&&(r*=1.1),"lumberjack"===a&&t.race.evil&&!t.race.soul_eater&&(t.race.living_tool?r*=1+di.living_tool.vars()[0]*(t.tech.science&&t.tech.science>0?.3*t.tech.science:0):r*=1+.4*(t.tech.reclaimer-1)),!t.race.powered||"factory"!==a&&"miner"!==a&&"lumberjack"!==a||(r*=1+di.powered.vars()[1]/100),t.race.artifical&&"science"===a&&(r*=1+di.artifical.vars()[0]/100),t.race.hivemind&&"farmer"!==a&&!t.race.lone_survivor){let s=di.hivemind.vars()[0],i=.05;t.race.high_pop&&"army"!==a&&"hellArmy"!==a&&(s*=di.high_pop.vars()[0],i=.5/(di.hivemind.vars()[0]*di.high_pop.vars()[0])),r*=e<=s?e*i+(1-s*i):1-("army"===a||"hellArmy"===a?.99:t.race.high_pop?.985:.98)**(e-s)+1}let o=Oi("antid");if(o>0&&(r*=1+(1-("army"===a||"hellArmy"===a?.99:t.race.high_pop?.985:.98)**(e*o/4))/2),t.race.cold_blooded&&"army"!==a&&"hellArmy"!==a&&"factory"!==a&&"science"!==a){switch(t.city.calendar.temp){case 0:r*=1-di.cold_blooded.vars()[0]/100;break;case 2:r*=1+di.cold_blooded.vars()[1]/100;break;default:r*=1}switch(t.city.calendar.weather){case 0:r*=1-di.cold_blooded.vars()[0]/100;break;case 2:r*=1+di.cold_blooded.vars()[1]/100;break;default:r*=1}}t.race.cannibalize&&t.city.s_alter&&t.city.s_alter.count>0&&("miner"===a&&t.city.s_alter.mine>0&&(r*=1+di.cannibalize.vars()[0]/100),"lumberjack"===a&&t.city.s_alter.harvest>0&&(r*=1+di.cannibalize.vars()[0]/100),("army"===a||"hellArmy"===a)&&t.city.s_alter.rage>0&&(r*=1+di.cannibalize.vars()[0]/100),"science"===a&&t.city.s_alter.mind>0&&(r*=1+di.cannibalize.vars()[0]/100));let n=Oi("mantis");n>0&&("miner"===a&&(r*=1+di.cannibalize.vars(1)[0]/100*n),"lumberjack"===a&&(r*=1+di.cannibalize.vars(1)[0]/100*n),"army"!==a&&"hellArmy"!==a||(r*=1+di.cannibalize.vars(1)[0]/100*n),"science"===a&&(r*=1+di.cannibalize.vars(1)[0]/100*n)),!t.race.humpback||"miner"!==a&&"lumberjack"!==a||(r*=1+di.humpback.vars()[0]/100);let l=Oi("kamel");l>0&&("miner"===a||"lumberjack"===a)&&(r*=1+di.humpback.vars(1)[0]/100*l),t.city.ptrait.includes("magnetic")&&"miner"===a&&(r*=Fi.magnetic.vars()[2]),!t.race.weak||"miner"!==a&&"lumberjack"!==a||(r*=1-di.weak.vars()[0]/100),t.race.hydrophilic&&0===t.city.calendar.weather&&t.city.calendar.temp>0&&"factory"!==a&&(r*=.75),t.race.toxic&&"factory"===a&&(r*=1+di.toxic.vars()[2]/100);let u=Oi("shroomi");if(u>0&&"factory"===a&&(r*=1+di.toxic.vars(1)[2]/100*u),t.race.hardy&&"factory"===a&&(r*=1+di.hardy.vars()[0]*t.race.hardy/100),t.race.analytical&&"science"===a&&(r*=1+di.analytical.vars()[0]*t.race.analytical/100),t.race.ooze&&(r*=1-di.ooze.vars()[0]/100),"democracy"===t.civic.govern.type&&(r*=1-re.democracy()[1]/100),!t.tech.cyber_worker||"lumberjack"!==a&&"miner"!==a||(r*=1.25),"hunting"===a){t.race.tracker&&(r*=1+di.tracker.vars()[0]/100);let e=Oi("wolven");e>0&&(r*=1+di.tracker.vars(1)[0]/100*e),t.race.beast&&(r*=1+(1===t.city.calendar.wind?di.beast.vars()[1]:di.beast.vars()[0])/100),t.race.apex_predator&&(r*=1+di.apex_predator.vars()[1]/100);let a=Oi("sharkin");a>0&&(r*=1+di.apex_predator.vars(1)[1]/100*a),t.race.fiery&&(r*=1+di.fiery.vars()[1]/100);let s=Oi("balorg");s>0&&(r*=1+di.fiery.vars(1)[1]/100*s),t.race.fragrant&&(r*=1-di.fragrant.vars()[0]/100),t.city.ptrait.includes("rage")&&(r*=Fi.rage.vars()[1]),t.race.cunning&&(r*=1+di.cunning.vars()[0]*t.race.cunning/100),"savanna"===t.city.biome&&(r*=Si.savanna.vars()[1]),t.race.dark_dweller&&2===t.city.calendar.weather&&(r*=1-di.dark_dweller.vars()[0]/100)}if("magic"===t.race.universe&&(r*="science"===a?.6:"army"===a||"hellArmy"===a?.75:.8,t.race.witch_hunter&&(r*=.75),t.race.hasOwnProperty("casting")&&t.race.casting["hellArmy"===a?"army":a])){let e=t.race.casting["hellArmy"===a?"army":a];t.race.witch_hunter?r*=1+e/(e+75)*2.5:r*=1+e/(e+75)}return t.race.living_tool&&"miner"===a&&(r*=1+di.living_tool.vars()[0]*(t.tech.science&&t.tech.science>0?.12*t.tech.science:0)),t.race.high_pop&&(r=Pe(r)),r}function mi(e){let a=[];Object.keys(di).forEach((function(e){"minor"!==di[e].type||t.race[e]||a.push(e)})),0===a.length&&Object.keys(di).forEach((function(e){"minor"===di[e].type&&a.push(e)}));let r=a[Math.floor(g(0,a.length))];return t.race[r]?t.race[r]+=e:t.race[r]=e,r}function gi(e,a,r){t.race.purgatory[e].hasOwnProperty(a)?(t[e][a]=t.race.purgatory[e][a],delete t.race.purgatory[e][a]):r&&(t[e][a]=r)}function fi(e,a,r,s){t.race.purgatory[e].hasOwnProperty(a)?(t[e][a]=t.race.purgatory[e][a],delete t.race.purgatory[e][a]):t.race.purgatory[e].hasOwnProperty(r)?(t[e][a]=t.race.purgatory[e][r],delete t.race.purgatory[e][r]):s&&(t[e][a]=s)}function vi(e,a){t[e].hasOwnProperty(a)&&(t.race.purgatory[e][a]=t[e][a],delete t[e][a])}function yi(e,a){if(t.race.purgatory[e].hasOwnProperty(a))return t.race.purgatory[e][a]}function bi(){wi("Lumber"),wi("Plywood"),Gi(["city-graveyard","city-lumber_yard","city-sawmill"]),Ri(["reclaimer","axe","saw"]),vi("city","sawmill"),vi("city","graveyard"),vi("city","lumber_yard"),vi("tech","axe"),vi("tech","reclaimer"),vi("tech","saw"),t.civic.lumberjack.display=!1,t.civic.lumberjack.workers=0,"lumberjack"===t.civic.d_job&&(t.civic.d_job=t.race.carnivore||t.race.soul_eater?"hunter":"unemployed"),t.race.casting&&(t.race.casting.total-=t.race.casting.lumberjack,t.race.casting.lumberjack=0,Qs()),t.city.s_alter&&(t.city.s_alter.harvest=0)}function wi(e){t.resource[e].display=!1,t.race.alchemy&&t.race.alchemy.hasOwnProperty(e)&&(t.resource.Mana.diff+=t.race.alchemy[e],t.race.alchemy[e]=0),t.interstellar.mass_ejector&&t.interstellar.mass_ejector.hasOwnProperty(e)&&(t.interstellar.mass_ejector.total-=t.interstellar.mass_ejector[e],t.interstellar.mass_ejector[e]=0),t.city.nanite_factory&&t.city.nanite_factory.hasOwnProperty(e)&&(t.city.nanite_factory[e]=0),t.portal.transport&&t.portal.transport.cargo.hasOwnProperty(e)&&(t.portal.transport.cargo.used-=t.portal.transport.cargo[e],t.portal.transport.cargo[e]=0),t.tech.foundry&&t.city.foundry.hasOwnProperty(e)&&(t.civic.craftsman.workers-=t.city.foundry[e],t.city.foundry.crafting-=t.city.foundry[e],t.city.foundry[e]=0,ma()),t.resource[e].hasOwnProperty("trade")&&(t.city.market.trade-=Math.abs(t.resource[e].trade),t.resource[e].trade=0),t.resource.Crates.amount+=t.resource[e].crates,t.resource[e].crates=0,t.resource.Containers.amount+=t.resource[e].containers,t.resource[e].containers=0}function $i(){let e=_s(Zr.tech.agriculture),a=_s(Zr.tech.smokehouse),r=_s(Zr.tech.reclaimer)||_s(Zr.tech.stone_axe),i=_s(Zr.tech.alt_lodge),c=_s(Zr.tech.wind_plant),o=[],n=[];if(!t.race.artifical){if(["agriculture","farm","hunting","s_lodge","wind_plant","compost","soul_eater"].forEach((function(e){vi("tech",e)})),["silo","farm","mill","windmill","smokehouse","lodge","compost","soul_well"].forEach((function(e){vi("city",e)})),i){gi("tech","s_lodge");let e=yi("tech","farm")>=1||yi("tech","hunting")>=2?1:0;e>0&&(!t.tech.s_lodge||t.tech.s_lodge=1&&fi("city","lodge","farm",{count:0})}if(a){gi("tech","hunting");let e=yi("tech","farm")>=1||yi("tech","s_lodge")>=1?2:yi("tech","agriculture")>=3?1:0;e>0&&(!t.tech.hunting||t.tech.hunting=1&&fi("city","smokehouse","silo",{count:0}),t.tech.hunting>=2&&!i&&fi("city","lodge","farm",{count:0})}else n.push("hunting"),o.push("city-smokehouse"),i||n.push("city-lodge");if(e){gi("tech","farm");let e=yi("tech","hunting")>=2||yi("tech","s_lodge")>=1?1:0;e>0&&(!t.tech.farm||t.tech.farm=1?3:yi("tech","s_lodge")>=1?1:0;a>0&&(!t.tech.agriculture||t.tech.agriculture=1&&fi("city","farm","lodge",{count:0}),t.tech.agriculture>=3&&fi("city","silo","smokehouse",{count:0}),t.tech.agriculture>=4&&!c&&fi("city","mill","windmill",{count:0,on:0})}else n.push("agriculture","farm"),o.push("city-farm","city-silo","city-mill");t.race.soul_eater?(gi("tech","soul_eater"),gi("city","soul_well")):(o.push("city-soul_well"),n.push("soul_eater")),t.race.detritivore?(gi("tech","compost"),gi("city","compost")):(n.push("compost"),o.push("city-compost")),c?(gi("tech","wind_plant"),t.tech.wind_plant>=1&&fi("city","windmill","mill",{count:0,on:0})):(n.push("wind_plant"),o.push("city-windmill"),delete s[z("city_mill_title2")])}let l=[],u=[];!t.race.orbit_decayed&&e&&t.tech.agriculture>=1&&t.city.farm.count>0?l.push("farmer"):u.push("farmer"),t.race.carnivore&&!t.race.herbivore||t.race.soul_eater||t.race.unfathomable?(l.push("hunter"),u.push("unemployed")):(u.push("hunter"),l.push("unemployed")),!t.race.orbit_decayed&&r?l.push("lumberjack"):u.push("lumberjack"),l.forEach((function(e){t.civic[e].display||(t.civic[e].workers=0,t.civic[e].display=!0)})),u.forEach((function(e){t.civic[e].display&&(t.civic.d_job===e&&(t.civic.d_job=l[0]),t.civic[l[0]].workers+=t.civic[e].workers,t.civic[e].workers=0,t.civic[e].display=!1)})),t.race.casting&&(e||(t.race.casting.total-=t.race.casting.farmer,t.race.casting.farmer=0),Qs()),Gi(o),Ri(n),or("Food")}function xi(a){switch(a){case"high_pop":t.resource[t.race.species].amount=Math.round(t.resource[t.race.species].amount*di.high_pop.vars()[0]),t.civic.hasOwnProperty("garrison")&&(t.civic.garrison.workers=Math.round(t.civic.garrison.workers*di.high_pop.vars()[0]));break;case"kindling_kindred":if(t.race.smoldering)break;bi();break;case"smoldering":if(t.resource.Chrysotile.display=!0,t.race.kindling_kindred)break;bi();break;case"forge":Qs();break;case"soul_eater":da("lumberjack");case"detritivore":case"carnivore":case"herbivore":$i();break;case"unfathomable":for($i(),t.city.hasOwnProperty("surfaceDwellers")||(t.city.surfaceDwellers=[]);t.city.surfaceDwellers.lengthdi.unfathomable.vars()[0]&&(t.city.surfaceDwellers.length=di.unfathomable.vars()[0]),t.race.psychic&&Ai();break;case"flier":or("Stone"),or("Brick"),t.resource.Cement.display=!1,t.civic.cement_worker.display=!1,t.civic.cement_worker.workers=0,vi("tech","cement"),vi("city","cement_plant");break;case"sappy":"quarry_worker"===t.civic.d_job&&(t.civic.d_job="unemployed"),t.civic.quarry_worker.display=!1,t.civic.quarry_worker.workers=0,or("Stone"),vi("tech","hammer"),vi("city","rock_quarry");break;case"apex_predator":Ri(["armor"]),vi("tech","armor");break;case"environmentalist":delete s[z("city_coal_power")],delete s[z("city_mana_engine")],delete s[z("city_oil_power")];break;case"terrifying":Object.keys(t.resource).forEach((function(e){t.resource[e].hasOwnProperty("trade")&&(t.resource[e].trade=0)})),t.settings.showMarket=!1,0===t.settings.marketTabs&&(t.settings.marketTabs=1),Gi(["city-trade"]),Ri(["trade"]),vi("tech","trade"),vi("city","trade");break;case"slaver":gi("tech","slaves"),t.tech.slaves>=1&&(gi("city","slave_pen",{count:0,slaves:0}),t.city.slave_pen.count>0&&!t.race.orbit_decayed&&(t.resource.Slave.display=!0));break;case"cannibalize":gi("tech","sacrifice"),t.tech.mining&&(t.city.s_alter={count:0,rage:0,mind:0,regen:0,mine:0,harvest:0});break;case"magnificent":t.tech.theology>=2&&gi("city","shrine",{count:0,morale:0,metal:0,know:0,tax:0});break;case"unified":t.tech.world_control=1,t.tech.unify=2,sc($("#garrison")),sc($("#c_garrison")),ve($("#garrison"),!0),ve($("#c_garrison"),!1);for(let e=0;e<3;e++){if(t.civic.foreign[`gov${e}`].occ){let a=ua("federation"===t.civic.govern.type?15:20);t.civic.garrison.max+=a,t.civic.garrison.workers+=a,t.civic.foreign[`gov${e}`].occ=!1}t.civic.foreign[`gov${e}`].buy=!1,t.civic.foreign[`gov${e}`].anx=!1,t.civic.foreign[`gov${e}`].sab=0,t.civic.foreign[`gov${e}`].act="none"}B("spy"),B("spyop");break;case"noble":t.civic.taxes.tax_rate<10?t.civic.taxes.tax_rate=10:t.civic.taxes.tax_rate>20&&(t.civic.taxes.tax_rate=20);break;case"toxic":"troll"===t.race.species&&t.tech.science&&t.tech.science>=8&&eo("godwin");break;case"thalassophobia":Gi(["city-wharf"]),Ri(["wharf"]),vi("city","wharf");break;case"hooved":t.resource.Horseshoe.display=!0,t.race.hasOwnProperty("shoecnt")||(t.race.shoecnt=0);break;case"slow":e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w?(Ki("stop"),Ki("start")):window.location.reload();case"hyper":e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w?(Ki("stop"),Ki("start")):window.location.reload();case"calm":t.tech.primitive>=3&&(gi("city","meditation",{count:0}),t.race.orbit_decayed||(t.resource.Zen.display=!0));break;case"blood_thirst":t.race.blood_thirst_count=1;break;case"deconstructor":t.resource.Nanite.display=!0,gi("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":Mi(!1,!0);break;case"imitation":qi(!0);break;case"evil":or("Lumber"),or("Furs"),or("Plywood");break;case"psychic":t.tech.psychic&&(t.resource.Energy.display=!0,t.settings.showPsychic=!0);break;case"ooze":t.tech.high_tech||"custom"===t.race.species||"sludge"===t.race.species||(t.race.gross_enabled=1),uc(!0)}}function ki(a,r){switch(a){case"high_pop":t.resource[t.race.species].amount=Math.round(t.resource[t.race.species].amount/di.high_pop.vars(r)[0]),t.civic.hasOwnProperty("garrison")&&(t.civic.garrison.workers=Math.round(t.civic.garrison.workers/di.high_pop.vars(r)[0]));break;case"kindling_kindred":if(t.race.smoldering)break;t.resource.Lumber.display=!0,t.tech.foundry&&(t.resource.Plywood.display=!0),t.race.casting&&Qs(),gi("city","sawmill"),gi("city","graveyard"),gi("city","lumber_yard"),gi("tech","axe"),gi("tech","reclaimer"),gi("tech","saw"),!t.tech.axe&&!t.tech.reclaimer||t.race.orbit_decayed||(t.civic.lumberjack.display=!0);break;case"smoldering":if(wi("Chrysotile"),t.race.kindling_kindred)break;t.resource.Lumber.display=!0,t.tech.foundry&&(t.resource.Plywood.display=!0),t.race.casting&&Qs(),gi("city","sawmill"),gi("city","graveyard"),gi("city","lumber_yard"),gi("tech","axe"),gi("tech","reclaimer"),gi("tech","saw"),!t.tech.axe&&!t.tech.reclaimer||t.race.orbit_decayed||(t.civic.lumberjack.display=!0);break;case"forge":Qs();break;case"soul_eater":da("lumberjack");case"detritivore":case"carnivore":case"herbivore":case"unfathomable":$i(),t.race.psychic&&Ai();break;case"flier":or("Stone"),or("Brick"),gi("tech","cement"),t.tech.cement&&(gi("city","cement_plant"),t.resource.Cement.display=!0,t.civic.cement_worker.display=!0);break;case"sappy":or("Stone"),gi("tech","hammer"),t.tech.mining>=1&&(gi("city","rock_quarry",{count:0,asbestos:0}),(t.city.rock_quarry&&t.city.rock_quarry.count>0||t.race.lone_survivor)&&(t.civic.quarry_worker.display=!0));break;case"apex_predator":gi("tech","armor");break;case"environmentalist":delete s[z("city_hydro_power")],delete s[z("city_wind_power")];break;case"terrifying":t.settings.showMarket=!0,gi("tech","trade"),gi("city","trade");break;case"slaver":Gi(["city-slave_pen"]),Ri(["slaves"]),vi("city","slave_pen"),vi("tech","slaves"),t.resource.Slave.amount=0,t.resource.Slave.max=0,t.resource.Slave.display=!1,B("slave");break;case"cannibalize":Gi(["city-s_alter"]),Ri(["sacrifice"]),vi("tech","sacrifice"),delete t.city.s_alter,B("sacrifice");break;case"magnificent":Gi(["city-shrine"]),vi("city","shrine");break;case"thalassophobia":t.tech.wharf&&gi("city","wharf",{count:0});break;case"hooved":Gi(["city-horseshoe","space-horseshoe"]),t.resource.Horseshoe.display=!1,B("horseshoe");break;case"slow":e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w?(Ki("stop"),Ki("start")):window.location.reload();case"hyper":e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w?(Ki("stop"),Ki("start")):window.location.reload();case"calm":Gi(["city-meditation"]),t.resource.Zen.display=!1,vi("city","meditation");break;case"blood_thirst":delete t.race.blood_thirst_count;break;case"deconstructor":Gi(["city-nanite_factory"]),t.resource.Nanite.display=!1,vi("city","nanite_factory");break;case"shapeshifter":sc($("#sshifter")),Mi();break;case"imitation":t.race.iTraits&&(Object.keys(t.race.iTraits).forEach((function(e){if("imitation"!==e)if(0===t.race.iTraits[e]){let a=t.race[e];delete t.race[e],ki(e,a)}else t.race[e]=t.race.iTraits[e]})),delete t.race.iTraits);break;case"evil":or("Lumber"),or("Furs"),or("Plywood");break;case"psychic":t.resource.Energy.display=!1,t.settings.showPsychic=!1;break;case"ooze":delete t.race.gross_enabled,uc(!0)}}function qi(e){if(t.race.imitation&&t.race.srace){t.race.iTraits||(t.race.iTraits={}),t.race.shapeshifter&&Mi(t.race.ss_genus===_i[t.race.srace].type&&"none",!0);let a=[];if(Object.keys(ui[_i[t.race.srace].type]).forEach((function(e){t.race[e]||a.push(e)})),"custom"===t.race.srace){let e=["evil","evil"];Object.keys(_i[t.race.srace].traits).forEach((function(t){di[t].val>di[e[0]].val?e[0]=t:di[t].val=0?t.race[e]=di.shapeshifter.vars()[0]:t.race[e]=di.shapeshifter.vars()[1],xi(e),r.push(e))})),t.race.ss_genus=e),a){sc($("#sshifter")),t.race.ss_genus=t.race.hasOwnProperty("ss_genus")?t.race.ss_genus:"none";let e="";Object.keys(ui).forEach((function(a){"synthetic"!==a&&"eldritch"!==a&&a!==_i[t.race.species].type&&(!t.race.imitation||a!==_i[t.race.srace].type)&&t.stats.achieve[`genus_${a}`]&&t.stats.achieve[`genus_${a}`].l>0&&(e+=`{{ '${a}' | genus }}`)})),$("#sshifter").append(`${z("trait_shapeshifter_name")}: \n \n {{ 'none' | genus }}${e}\n `),ic({el:"#sshifter",data:t.race,methods:{setShape(e){Mi(e)}},filters:{genus:e=>z(`genelab_genus_${e}`)}})}t.race.ss_traits=r}function Pi(e,a){if(a=a||{},t.race[e]&&!a.force)switch(t.race[e]){case.25:return t.race[e]=a.down?.25:.5,!a.down;case.5:return t.race[e]=a.down?.25:1,!0;case 1:return t.race[e]=a.down?.5:2,!0;case 2:return t.race[e]=a.down?1:3,!0;case 3:return t.race[e]=a.down?2:3,!!a.down}else if(a.set)return t.race[e]=a.set,!0;return!1}function Oi(e){if(t.race.unfathomable&&t.city.surfaceDwellers&&t.city.surfaceDwellers.includes(e)&&t.city.captive_housing){let a=t.city.surfaceDwellers.indexOf(e),r=t.city.captive_housing[`race${a}`];if(r>100&&(r=100),r>t.civic.torturer.workers){let e=r-t.civic.torturer.workers;r-=Math.ceil(e/3)}return r/100*((t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg?t.stats.achieve.nightmare.mg:0)/5)}return 0}function Ci(e,a){switch(e){case"name":{let e={hooved:ji(!1),promiscuous:t.race.artifical?z("trait_promiscuous_synth_name"):di.promiscuous.name};return a?e[a]?e[a]:di[a].name:e}case"desc":{let e={hooved:ji(!0),promiscuous:t.race.artifical?z("trait_promiscuous_synth"):di.promiscuous.desc};return a?e[a]?e[a]:di[a].desc:e}}}function ji(e){return t.race.sludge?z(e?"trait_hooved_slime":"trait_hooved_slime_name"):["cath","wolven","dracnid","seraph","cyclops","kobold","tuskin","sharkin"].includes(t.race.species)?z(e?`trait_hooved_${t.race.species}`:`trait_hooved_${t.race.species}_name`):["humanoid","avian","plant","fungi","reptilian","fey","synthetic"].includes(_i[t.race.species].type)?z(e?`trait_hooved_${_i[t.race.species].type}`:`trait_hooved_${_i[t.race.species].type}_name`):e?di.hooved.desc:di.hooved.name}Object.keys(pi).forEach((function(e){let t="organism"===e?"humanoid":e;pi[e].solar={titan:z(`genus_${t}_solar_titan`),enceladus:z(`genus_${t}_solar_enceladus`),triton:z(`genus_${t}_solar_triton`),eris:z(`genus_${t}_solar_eris`)}}));const Si={grassland:{label:z("biome_grassland_name"),desc:z("biome_grassland"),vars:()=>t.race.rejuvenated?[1.25]:[1.2],wiki:["%"]},oceanic:{label:z("biome_oceanic_name"),desc:z("biome_oceanic"),vars:()=>t.race.rejuvenated?[1.25,1.12,.92]:[1.12,1.06,.95],wiki:["%","%","%"]},forest:{label:z("biome_forest_name"),desc:z("biome_forest"),vars:()=>t.race.rejuvenated?[1.35]:[1.2],wiki:["%"]},desert:{label:z("biome_desert_name"),desc:z("biome_desert"),vars:()=>t.race.rejuvenated?[1.35,1.18,.6]:[1.2,1.1,.75],wiki:["%","%","%"]},volcanic:{label:z("biome_volcanic_name"),desc:z("biome_volcanic"),vars:()=>t.race.rejuvenated?[.8,1.25,1.15]:[.9,1.12,1.08],wiki:["%","%","%"]},tundra:{label:z("biome_tundra_name"),desc:z("biome_tundra"),vars:()=>t.race.rejuvenated?[1.5,.8]:[1.25,.9],wiki:["%","%"]},savanna:{label:z("biome_savanna_name"),desc:z("biome_savanna"),vars:()=>t.race.rejuvenated?[1.18,1.25,.75]:[1.1,1.18,.8],wiki:["%","%","%"]},swamp:{label:z("biome_swamp_name"),desc:z("biome_swamp"),vars:()=>t.race.rejuvenated?[1.6,1.35,1.15,.78]:[1.4,1.25,1.1,.88],wiki:["%","%","%","%"]},ashland:{label:z("biome_ashland_name"),desc:z("biome_ashland"),vars:()=>t.race.rejuvenated?[.55,1.35,1.2]:[.62,1.25,1.1],wiki:["%","%","%"]},taiga:{label:z("biome_taiga_name"),desc:z("biome_taiga"),vars:()=>t.race.rejuvenated?[1.2,1.65,.88]:[1.1,1.5,.92],wiki:["%","%","%"]},hellscape:{label:z("biome_hellscape_name"),desc:z("biome_hellscape"),vars:()=>t.race.rejuvenated?[.2]:[.25],wiki:["%"]},eden:{label:z("biome_eden_name"),desc:z("biome_eden")}},Fi={toxic:{label:z("planet_toxic"),desc:z("planet_toxic_desc"),vars:()=>t.race.rejuvenated?[2,1.5]:[1,1.25],wiki:["A","-%"]},mellow:{label:z("planet_mellow"),desc:z("planet_mellow_desc"),vars:()=>t.race.rejuvenated?[2,3,.88]:[1.5,2,.9],wiki:["%","A","%"]},rage:{label:z("planet_rage"),desc:z("planet_rage_desc"),vars:()=>t.race.rejuvenated?[1.1,1.05,1]:[1.05,1.02,1],wiki:["%","%","A"]},stormy:{label:z("planet_stormy"),desc:z("planet_stormy_desc")},ozone:{label:z("planet_ozone"),desc:z("planet_ozone_desc"),vars:()=>t.race.rejuvenated?[.18]:[.25],wiki:["-A"]},magnetic:{label:z("planet_magnetic"),desc:z("planet_magnetic_desc"),vars:()=>t.race.rejuvenated?[2,150,.98]:[1,100,.985],wiki:["A","A","%"]},trashed:{label:z("planet_trashed"),desc:z("planet_trashed_desc"),vars:()=>t.race.rejuvenated?[.8,1.2]:[.75,1],wiki:["%","%"]},elliptical:{label:z("planet_elliptical"),desc:z("planet_elliptical_desc")},flare:{label:z("planet_flare"),desc:z("planet_flare_desc")},dense:{label:z("planet_dense"),desc:z("planet_dense_desc"),vars:()=>t.race.rejuvenated?[1.5,1.2,1.35]:[1.2,1,1.2],wiki:["%","A","%"]},unstable:{label:z("planet_unstable"),desc:z("planet_unstable_desc")},permafrost:{label:z("planet_permafrost"),desc:z("planet_permafrost_desc"),vars:()=>t.race.rejuvenated?[.7,125]:[.75,100],wiki:["%","A"]},retrograde:{label:z("planet_retrograde"),desc:z("planet_retrograde_desc")}};function zi(e){e=e||[];let t=Object.keys(_i).filter((function(t){return _i[t].basic()&&!e.includes(t)}));return t[jc(t)]}function Ai(){if(!t.settings.tabLoad&&(2!==t.settings.civTabs||6!==t.settings.govTabs))return;let e=$("#psychicPowers");sc(e),t.race.psychic&&t.tech.psychic&&(function(e){let a=$('
            ');e.append(a),a.append($(`
            ${z("psychic_boost_title")}
            `));let r=$("
            ");a.append(r);let s="";if(Object.keys(Ja).forEach((function(e){t.resource[e].display&&(s+=`${t.resource[e].name}`)})),r.append(`
            ${s}
            `),a.append('
            '),t.tech.psychic>=4){let e=$(`
            ${z("psychic_channel")}
            `),t=$('{{ c.boost }}'),r=$(`«`),s=$(`»`);e.append(r),e.append(t),e.append(s),a.append(e)}let i=t.tech.psychic>=5?60:75,c=t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg?t.stats.achieve.nightmare.mg:0;ic({el:"#psychicBoost",data:{b:t.race.psychicPowers.boost,c:t.tech.psychic>=4?t.race.psychicPowers.channel:{}},methods:{boostVal(){t.resource.Energy.amount>=i&&(t.resource.Energy.amount-=i,t.race.psychicPowers.boostTime=72*c)},add(){let e=b();for(let a=0;a0;a++)t.race.psychicPowers.channel.boost--}},filters:{boost:e=>z("psychic_boost_button",[t.resource[e]?t.resource[e].name:"N/A",i]),boostTime:()=>t.race.psychicPowers.boostTime>0?z("psychic_boost_time",[t.race.psychicPowers.boostTime]):""}});const o=document.getElementById("psyhscrolltarget");o.addEventListener("wheel",(e=>{e.preventDefault(),o.scrollLeft+=e.deltaY})),Ei("psychicBoost",(function(){return z("psychic_boost_desc",[di.psychic.vars()[3]])}),{elm:"#psychicBoost > div > button"})}(e),function(e){let a=$('
            ');e.append(a),a.append($(`
            ${z("psychic_murder_title")}
            `)),a.append('
            ');let r=t.tech.psychic>=5?8:10;ic({el:"#psychicKill",data:{},methods:{murder(){t.resource.Energy.amount>=r&&t.resource[t.race.species].amount>=1&&(t.resource.Energy.amount-=r,t.resource[t.race.species].amount--,t.stats.psykill++,t.race.anthropophagite&&Ji("Food",1e4*di.anthropophagite.vars()[0]),10===t.stats.psykill&&Ai())}},filters:{kill:()=>z("psychic_murder_button",[r])}}),Ei("psychicKill",(function(){return z("psychic_murder_desc")}),{elm:"#psychicKill > div > button"})}(e),t.tech.psychic>=2&&function(e){let a=$('
            ');if(e.append(a),a.append($(`
            ${z("psychic_assault_title")}
            `)),a.append('
            '),t.tech.psychic>=4){let e=$(`
            ${z("psychic_channel")}
            `),t=$('{{ assault }}'),r=$(`«`),s=$(`»`);e.append(r),e.append(t),e.append(s),a.append(e)}let r=t.tech.psychic>=5?36:45,s=t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg?t.stats.achieve.nightmare.mg:0;ic({el:"#psychicAssault",data:t.tech.psychic>=4?t.race.psychicPowers.channel:{},methods:{boostVal(){t.resource.Energy.amount>=r&&(t.resource.Energy.amount-=r,t.race.psychicPowers.assaultTime=72*s)},add(){let e=b();for(let a=0;a0;a++)t.race.psychicPowers.channel.assault--}},filters:{boost:()=>z("psychic_boost_button",[z("psychic_attack"),r]),boostTime:()=>t.race.psychicPowers.assaultTime>0?z("psychic_boost_time",[t.race.psychicPowers.assaultTime]):""}}),Ei("psychicAssault",(function(){return z("psychic_assault_desc",[di.psychic.vars()[3]])}),{elm:"#psychicAssault > div > button"})}(e),t.tech.psychic>=3&&(t.race.psychicPowers.cash||(t.race.psychicPowers.cash=0),function(e){let a=$('
            ');if(e.append(a),a.append($(`
            ${z("psychic_profit_title")}
            `)),a.append('
            '),t.tech.psychic>=4){let e=$(`
            ${z("psychic_channel")}
            `),t=$('{{ cash }}'),r=$(`«`),s=$(`»`);e.append(r),e.append(t),e.append(s),a.append(e)}let r=t.tech.psychic>=5?52:65,s=t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg?t.stats.achieve.nightmare.mg:0;ic({el:"#psychicFinance",data:t.tech.psychic>=4?t.race.psychicPowers.channel:{},methods:{boostVal(){t.resource.Energy.amount>=r&&(t.resource.Energy.amount-=r,t.race.psychicPowers.cash=72*s)},add(){let e=b();for(let a=0;a0;a++)t.race.psychicPowers.channel.cash--}},filters:{boost:()=>z("psychic_boost_button",[z("psychic_profit"),r]),boostTime:()=>t.race.psychicPowers.cash>0?z("psychic_boost_time",[t.race.psychicPowers.cash]):""}}),Ei("psychicFinance",(function(){return z("psychic_profit_desc",[di.psychic.vars()[3]])}),{elm:"#psychicFinance > div > button"})}(e)),t.tech.psychicthrall&&t.tech.unfathomable&&t.race.unfathomable&&(t.tech.psychicthrall>=2&&function(e){let a=$('
            ');e.append(a),a.append($(`
            ${z("psychic_stun_title")}
            `)),a.append('
            ');let r=t.tech.psychic>=5?80:100;ic({el:"#psychicCapture",data:{},methods:{stun(){if(t.resource.Energy.amount>=r&&t.tech.unfathomable){let e=0;if(t.city.hasOwnProperty("surfaceDwellers"))for(let a=0;az("psychic_stun_button",[r])}}),Ei("psychicCapture",(function(){return z("psychic_stun_desc")}),{elm:"#psychicCapture > div > button"})}(e),function(e){let a=$('
            ');e.append(a),a.append($(`
            ${z("psychic_mind_break_title")}
            `)),a.append('
            ');let r=t.tech.psychic>=5?64:80;ic({el:"#psychicMindBreak",data:{},methods:{breakMind(){if(t.resource.Energy.amount>=r&&t.tech.unfathomable){let e=[];if(t.city.hasOwnProperty("surfaceDwellers"))for(let a=0;a0&&e.push(a);if(e.length>0){let a=e[Math.rand(0,e.length)];t.city.captive_housing[`jailrace${a}`]--,t.city.captive_housing[`race${a}`]++,t.resource.Energy.amount-=r}}}},filters:{break:()=>z("psychic_mind_break_button",[r])}}),Ei("psychicMindBreak",(function(){return z("psychic_mind_break_desc")}),{elm:"#psychicMindBreak > div > button"})}(e)))}var Ti=!1;function Ei(e,a,r){r||(r={}),r.hasOwnProperty("elm")||(r.elm="#"+e),r.hasOwnProperty("bind")||(r.bind=!0),r.hasOwnProperty("unbind")||(r.unbind=!0),r.hasOwnProperty("placement")||(r.placement="bottom"),r.bind&&$(r.elm).on(r.bind_mouse_enter?"mouseenter":"mouseover",(function(){(Ti||$("#popper").length>0)&&Ii();let s=r.wide?" wide":"",i=r.classes?r.classes:"has-background-light has-text-dark pop-desc";var c=$(`
            `);r.attach?$(r.attach).append(c):$("#main").append(c),a&&c.append("function"==typeof a?a({this:this,popper:c}):a),Ti=Popper.createPopper(r.self?this:$(r.elm)[0],document.querySelector("#popper"),{placement:r.placement,modifiers:[{name:"flip",enabled:!0},{name:"offset",options:{offset:r.offset?r.offset:[0,0]}}]}),c.show(),r.hasOwnProperty("in")&&"function"==typeof r.in&&r.in({this:this,popper:c,id:"popper"}),Ec("firework")&&t[t.race.cataclysm||t.race.orbit_decayed?"space":"city"].firework.on>0&&$(c).append('')})),r.unbind&&("ontouchstart"in document.documentElement&&navigator.userAgent.match(t.settings.touch)?$(r.elm).on("touchend",(function(e){Ii(),r.hasOwnProperty("out")&&"function"==typeof r.out&&r.out({this:this,popper:$("#popper"),id:"popper"})})):$(r.elm).on(r.bind_mouse_enter?"mouseleave":"mouseout",(function(){Ii(),r.hasOwnProperty("out")&&"function"==typeof r.out&&r.out({this:this,popper:$("#popper"),id:"popper"})})))}function Ii(e){e&&$("#popper").data("id")!==e||($("#popper").hide(),Ti&&(Ti.destroy(),Ti=!1),sc($("#popper"),!0))}function Ki(e){switch(e){case"stop":P.w?P.w.postMessage({loop:"clear"}):(clearInterval(O.main_loop),clearInterval(O.mid_loop),clearInterval(O.long_loop)),t.settings.at>0&&(t.settings.at=d.t),P.s=!1;break;case"start":{let e=250,a=1e3,r=5e3;if(t.race.slow){let t=1+di.slow.vars()[0]/100;e=Math.floor(e*t),a=Math.floor(a*t),r=Math.floor(r*t)}if(t.race.hyper){let t=1-di.hyper.vars()[0]/100;e=Math.floor(e*t),a=Math.floor(a*t),r=Math.floor(r*t)}P.mt=e,Li(),d.t>0&&(e=Math.ceil(.5*e),a=Math.ceil(.5*a),r=Math.ceil(.5*r)),P.w?(P.w.postMessage({loop:"short",period:e}),P.w.postMessage({loop:"mid",period:a}),P.w.postMessage({loop:"long",period:r})):(O.main_loop=setInterval((function(){fastLoop()}),e),O.mid_loop=setInterval((function(){midLoop()}),a),O.long_loop=setInterval((function(){longLoop()}),r)),P.s=!0}}}function Li(){let e=Date.now()-t.stats.current;t.stats.hasOwnProperty("current")&&(e>=12e4||t.settings.at>0)&&(t.settings.at>11520&&(t.settings.at=0),e>=12e4&&(t.settings.at+=Math.floor(e/3333)),t.settings.at>11520&&(t.settings.at=11520),d.t=t.settings.at)}function Ni(e,t){let a=ri(),r=[];switch(e){case"power":r=["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":r=["spc_moon:helium_mine","spc_moon:iridium_mine","spc_moon:observatory"];break;case"red":r=["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":r=["spc_belt:elerium_ship","spc_belt:iridium_ship","spc_belt:iron_ship"];break;case"alpha":r=["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":r=["int_nebula:harvester","int_nebula:elerium_prospector"];break;case"gateway":r=["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":r=["gxy_alien2:armed_miner","gxy_alien2:ore_processor","gxy_alien2:scavenger"];break;case"lake":r=["prtl_lake:bireme","prtl_lake:transport"];break;case"spire":r=["prtl_spire:port","prtl_spire:base_camp","prtl_spire:mechbay"];break;case"titan":r=["spc_titan:titan_quarters","spc_titan:titan_mine","spc_titan:g_factory","spc_titan:decoder"];break;case"enceladus":r=["spc_enceladus:water_freighter","spc_enceladus:operating_base","spc_enceladus:zero_g_lab"];break;case"eris":r=["spc_eris:shock_trooper","spc_eris:tank"];break;case"tau_home":r=["tau_home:colony","tau_home:tau_factory","tau_home:mining_pit","tau_home:infectious_disease_lab"];break;case"tau_red":r=["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":r=["tau_roid:mining_ship","tau_roid:whaling_ship"]}t&&(a[e].l.length=0),r.forEach((function(t){a[e].l.includes(t)||a[e].l.push(t)})),a[e].l.length>r.length&&a[e].l.forEach((function(t){r.includes(t)||a[e].l.splice(a[e].l.indexOf(t),1)}))}function Di(e){(e=e||m).forEach((function(e){h[e]=[],t.settings.msgFilters[h.view].vis||($(`#msgQueueFilter-${h.view}`).removeClass("is-active"),$(`#msgQueueFilter-${e}`).addClass("is-active"),h.view=e)}))}function Bi(e,a,r,s,i){if(s=s||[],i||s.includes("all")||s.push("all"),a=a||"warning",s.includes(h.view)){let r=$('

            '+e+"

            ");$("#msgQueueLog").prepend(r),$("#msgQueueLog").children().length>t.settings.msgFilters[h.view].max&&$("#msgQueueLog").children().last().remove()}s.forEach((function(r){h[r].unshift({msg:e,color:a}),h[r].length>t.settings.msgFilters[r].max&&h[r].pop()})),r||s.forEach((function(r){t.lastMsg[r]&&(t.lastMsg[r].unshift({m:e,c:a}),t.lastMsg[r].length>t.settings.msgFilters[r].save&&t.lastMsg[r].splice(t.settings.msgFilters[r].save))}))}function Gi(e){for(let a=t.queue.queue.length-1;a>=0;a--)e.includes(t.queue.queue[a].id)&&t.queue.queue.splice(a,1)}function Ri(e){for(let a=t.r_queue.queue.length-1;a>=0;a--)e.includes(Zr.tech[t.r_queue.queue[a].type].grant[0])&&t.r_queue.queue.splice(a,1)}function Hi(){let e=t.tech.queue>=2?t.tech.queue>=3?8:5:3;t.stats.feat.journeyman&&t.stats.feat.journeyman>=2&&t.stats.achieve.seeder&&t.stats.achieve.seeder.l>=2&&(e+=Math.min(t.stats.achieve.seeder.l,t.stats.feat.journeyman)>=4?2:1),t.genes.queue&&t.genes.queue>=2&&(e*=2);let a=D("pragmatist",0);a&&(e=Math.round(e*(1+a/100))),t.queue.max=e}function Ui(){let e=3;if(t.stats.feat.journeyman&&t.stats.achieve.seeder&&t.stats.achieve.seeder.l>0){let a=Math.min(t.stats.achieve.seeder.l,t.stats.feat.journeyman);e+=a>=3?a>=5?3:2:1}t.genes.queue&&t.genes.queue>=2&&(e*=2);let a=D("theorist",0);a&&(e=Math.round(e*(1+a/100))),t.r_queue.max=e}function Wi(){!function(){let e=$("#buildQueue .buildList")[0];if(e){let t=Sortable.get(e);t&&t.destroy()}}(),sc($("#buildQueue")),$("#buildQueue").append($(`\n

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

            \n \n `));let e=$('
              ');$("#buildQueue").append(e),e.append($('
            • {{ item.label }}{{ item.q | count }} [{{ item.time | time }}{{ item.t_max | max_t(item.time) }}]
            • '));try{ic({el:"#buildQueue",data:t.queue,methods:{remove(e){let a=b();for(let r=0;r0&&(t.queue.queue[e].q-=t.queue.queue[e].qs),t.queue.queue[e].q<=0){Ii(`q${t.queue.queue[e].id}${e}`),t.queue.queue.splice(e,1),Wi();break}},setID:e=>`q${t.queue.queue[e].id}${e}`,setData(e,a){let r,s=t.queue.queue[e].id.split("-");"arpa"===s[0].substring(0,4)?r=s[0].substring(4):"city"===s[0]||"evolution"===s[0]||"starDock"===s[0]?r=Zr[s[0]][s[1]]:Object.keys(Zr[s[0]]).forEach((function(e){Zr[s[0]][e].hasOwnProperty(s[1])&&(r=Zr[s[0]][e][s[1]])}));let i={};if(r.cost){let e=fc(r);Object.keys(e).forEach((function(t){let r=e[t]();r>0&&(i[`${a}-${t}`]=r)}))}return i},pauseQueue(){$("#pausequeue").removeClass("play"),$("#pausequeue").removeClass("pause"),t.queue.pause?(t.queue.pause=!1,$("#pausequeue").addClass("play")):(t.queue.pause=!0,$("#pausequeue").addClass("pause"))},pausedesc:()=>t.queue.pause?z("queue_play"):z("queue_pause")},filters:{time:e=>cc(e),count:e=>e>1?` (${e})`:"",max_t:(e,t)=>t===e||t<0?"":` / ${cc(e)}`,used_q(){let e=0;for(let a=0;a=4&&(r.tech.whitehole=3,r.resource.Soul_Gem.amount+=10,r.resource.Knowledge.amount+=15e5,r.stats.know-=15e5),r.tech.hasOwnProperty("quaked")&&2===r.tech.quaked&&(r.tech.quaked=1,r.resource.Knowledge.amount+=5e5,r.stats.know-=5e5),r.tech.hasOwnProperty("corrupted_ai")&&3===r.tech.corrupted_ai&&(r.tech.corrupted_ai=1,r.resource.Knowledge.amount+=5e6,r.stats.know-=5e6)),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(r))),window.location.reload())};const Zi=!1;function Vi(e,t){try{t.debug_mode=Zi,gtag("event",e,t)}catch(e){}}function Ji(e,a,r,s){let i=t.resource[e].amount+a,c=!0;return i>t.resource[e].max&&-1!=t.resource[e].max?i=t.resource[e].max:i<0&&((!s||s&&-1*i>s)&&(c=!1),i=0),Number.isNaN(i)||(t.resource[e].amount=i,r||(t.resource[e].delta+=a,"Mana"===e&&a>0&&(t.resource[e].gen_d+=a))),c}function Yi(e){let a=_i[t.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"}const r=e?[z("civics_gov_tp_name0"),z("civics_gov_tp_name1"),z("civics_gov_tp_name2"),z("civics_gov_tp_name3"),z("civics_gov_tp_name4"),z("civics_gov_tp_name5"),z("civics_gov_tp_name6"),z("civics_gov_tp_name7"),z("civics_gov_tp_name8"),z("civics_gov_tp_name9")]:[_i[t.race.species].name,_i[t.race.species].home,z(`biome_${t.city.biome}_name`),z(`evo_${a}_title`),z("civics_gov_name0"),z("civics_gov_name1"),z("civics_gov_name2"),z("civics_gov_name3"),z("civics_gov_name4"),z("civics_gov_name5"),z("civics_gov_name6"),z("civics_gov_name7"),z("civics_gov_name8"),z("civics_gov_name9"),z("civics_gov_name10"),z("civics_gov_name11")];return{s0:Math.rand(0,14),s1:r[Math.rand(0,r.length)]}}function Xi(e,a,r,s,i){i||(i="city"),"micro"===t.race.universe&&(s-=lc("micro",!1)),t.race.small?s-=di.small.vars()[0]:t.race.large&&(s+=di.large.vars()[0]),t.race.compact&&(s-=di.compact.vars()[0]),!t.race.tunneler||"mine"!==e&&"coal_mine"!==e||(s-=di.tunneler.vars()[0]),!t.tech.housing_reduction||"basic_housing"!==e&&"cottage"!==e||(s-=.02*t.tech.housing_reduction),t.tech.housing_reduction&&"captive_housing"===e&&(s-=.01*t.tech.housing_reduction),"basic_housing"===e&&(t.race.solitary&&(s-=di.solitary.vars()[0]),t.race.pack_mentality&&(s+=di.pack_mentality.vars()[0])),"cottage"===e&&(t.race.solitary&&(s+=di.solitary.vars()[1]),t.race.pack_mentality&&(s-=di.pack_mentality.vars()[1])),"apartment"===e&&t.race.pack_mentality&&(s-=di.pack_mentality.vars()[1]),t.genes.creep&&!t.race.no_crispr?s-=.01*t.genes.creep:t.genes.creep&&t.race.no_crispr&&(s-=.002*t.genes.creep);let c=D("noquestions",0);c&&(s-=c),s<1.005&&(s=1.005);var o="citizen"===e?t.resource[t.race.species].amount:t[i][e]?t[i][e].count:0;return a&&(o+=a),Math.round(s**o*r)}function ec(e,a,r,s,i,c){i||(i="space"),c=c||1.005,"micro"===t.race.universe&&(s-=lc("micro",!0)),t.genes.creep&&!t.race.no_crispr?s-=.01*t.genes.creep:t.genes.creep&&t.race.no_crispr&&(s-=.002*t.genes.creep),t.race.small&&(s-=di.small.vars()[1]),t.race.compact&&(s-=di.compact.vars()[1]),t.prestige.Harmony.count>0&&t.stats.achieve.ascended&&(s-=tc());let o=D("noquestions",0);o&&(s-=o),s0&&t.stats.achieve.ascended){let e=0;switch(t.race.universe){case"heavy":t.stats.achieve.ascended.hasOwnProperty("h")&&(e=t.stats.achieve.ascended.h*t.prestige.Harmony.count);break;case"antimatter":t.stats.achieve.ascended.hasOwnProperty("a")&&(e=t.stats.achieve.ascended.a*t.prestige.Harmony.count);break;case"evil":t.stats.achieve.ascended.hasOwnProperty("e")&&(e=t.stats.achieve.ascended.e*t.prestige.Harmony.count);break;case"micro":t.stats.achieve.ascended.hasOwnProperty("m")&&(e=t.stats.achieve.ascended.m*t.prestige.Harmony.count);break;case"magic":t.stats.achieve.ascended.hasOwnProperty("mg")&&(e=t.stats.achieve.ascended.mg*t.prestige.Harmony.count);break;default:t.stats.achieve.ascended.hasOwnProperty("l")&&(e=t.stats.achieve.ascended.l*t.prestige.Harmony.count)}if(e>0)return e=.01*(Math.log(50+e)-3.912023005428146),+e.toFixed(5)}return 0}function ac(e,a,r,s){if(s=void 0===s||s,e.cost){let i=0,c=!1,o=!(!a||!a.id[e.id])&&a.id[e.id],n=fc(e,o),l=!!a&&{},u=!!a&&{};a&&(Object.keys(a.r).forEach((function(e){l[e]=a.r[e]})),Object.keys(a.rr).forEach((function(e){u[e]=a.rr[e]})));let d=!1;t.interstellar.hasOwnProperty("mass_ejector")&&t.genes.governor&&t.tech.governor&&t.race.governor&&t.race.governor.g&&t.race.governor.tasks&&Object.keys(t.race.governor.tasks).forEach((function(e){"trash"===t.race.governor.tasks[e]&&(d=!0)}));let _={};return Object.keys(n).forEach((function(e){if(i>=0&&!t.prestige.hasOwnProperty(e)&&!["Morale","HellArmy","Structs","Bool"].includes(e)){var r=Number(o?n[e](o):n[e]());if(r>0){let o="Species"===e?t.race.species:e,n="Supply"===e?t.portal.purifier.supply:Number(t.resource[o].amount),p="Supply"===e?t.portal.purifier.sup_max:t.resource[o].max,h="Supply"===e?t.portal.purifier.diff:t.resource[o].diff;if(d&&t.interstellar.mass_ejector[e]&&(h+=t.interstellar.mass_ejector[e],t.race.governor.config.trash.hasOwnProperty(e)&&(h-=Math.min(t.race.governor.config.trash[e].v,t.interstellar.mass_ejector[e]))),a&&(n+=h*(s?a.t.t:a.t.rt),a.r.hasOwnProperty(o)||(a.r[o]=0),a.rr.hasOwnProperty(o)||(a.rr[o]=0),s?(n-=Number(a.r[o]),a.r[o]+=r,a.rr[o]+=r):(n-=Number(a.rr[o]),a.rr[o]+=r),p>=0&&n>p&&(n=p)),r>n)if(h>0){let e=(r-n)/h;e>i&&(c=o,i=e),_[o]=e}else a&&(a.r=l,a.rr=u),i=-9999999,_[o]=99999999-h,(_[c]&&_[o]>_[c]||!_[c])&&(c=o)}}})),a&&i>=0&&(void 0===a.id[e.id]?a.id[e.id]=1:a.id[e.id]++,s&&(a.t.t+=i),a.t.rt+=i),r?{t:i,r:c,s:_}:i}return 0}function rc(e,a,r,s){let i=!(!r||!r.id[e.id])&&r.id[e.id],c=Le(e.cost,i),o=0,n=!!r&&{},l=!!r&&{},u=!1;r&&(Object.keys(r.r).forEach((function(e){n[e]=r.r[e]})),Object.keys(r.rr).forEach((function(e){l[e]=r.rr[e]})));let d=!1;t.interstellar.hasOwnProperty("mass_ejector")&&t.genes.governor&&t.tech.governor&&t.race.governor&&t.race.governor.g&&t.race.governor.tasks&&Object.keys(t.race.governor.tasks).forEach((function(e){"trash"===t.race.governor.tasks[e]&&(d=!0)}));let _={};return Object.keys(c).forEach((function(e){if(o>=0){let s=Number(c[e](i))*a;if(s>0){let a=Number(t.resource[e].amount),i=t.resource[e].diff;if(r&&(d&&t.interstellar.mass_ejector[e]&&(i+=t.interstellar.mass_ejector[e],t.race.governor.config.trash.hasOwnProperty(e)&&(i-=Math.min(t.race.governor.config.trash[e].v,t.interstellar.mass_ejector[e]))),a+=i*r.t.t,r.r[e]?(a-=Number(r.r[e]),r.r[e]+=s):r.r[e]=s,r.rr[e]?r.rr[e]+=s:r.rr[e]=s,t.resource[e].max>=0&&a>t.resource[e].max&&(a=t.resource[e].max)),s>a)if(i>0){let t=(s-a)/i;t>o&&(o=t,u=e),_[e]=t}else r&&(r.r=n,r.rr=l),o=-9999999,_[e]=99999999-i,(_[u]&&_[e]>_[u]||!_[u])&&(u=e)}}})),r&&o>=0&&(void 0===r.id[e.id]?r.id[e.id]=1:r.id[e.id]++,r.t.t+=o,r.t.rt+=o),s?{t:o,r:u,s:_}:o}function sc(e,t){if(e.find(".vb").each((function(){try{$(this)[0].__vue__.$destroy()}catch(e){}})),t){try{e[0].__vue__.$destroy()}catch(e){}e.remove()}else e.empty()}function ic(e,t){if(t=t||"create",$(e.el).length>0&&void 0!==$(e.el)[0].__vue__)try{"update"===t?$(e.el)[0].__vue__.$forceUpdate():$(e.el)[0].__vue__.$destroy()}catch(e){}"create"===t&&(new Vue(e),$(e.el).addClass("vb"))}function cc(e){let t;if(e<0)t=z("time_never");else if((e=+e.toFixed(0))>60){let a=e%60,r=(e-a)/60;if(r>=60){let e=r%60,a=(r-e)/60;a>24?(e=a%24,t=`${(a-e)/24}d ${e}h`):(e=("0"+e).slice(-2),t=`${a}h ${e}m`)}else a=("0"+a).slice(-2),t=`${r}m ${a}s`}else t=`${e}s`;return t}function oc(e){return"antimatter"===t.race.universe&&(e=+(e*=lc("antimatter")).toFixed(2)),"leo"===W()&&(e=+(e*=1+U("leo")[0]/100).toFixed(2)),e}function nc(e){return t.race.emfield?+(1.5*e).toFixed(2):e}function lc(e,a,r,s){s||(s={});let i=void 0!==s.dark?s.dark:t.prestige.Dark.count,c=void 0!==s.harmony?s.harmony:t.prestige.Harmony.count,o=void 0!==s.sludge?s.sludge:t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge[Xc(e)]?t.stats.achieve.extinct_sludge[Xc(e)]:0;switch(e){case"standard":return"standard"===t.race.universe||r?(c>0&&(i*=1+.001*c),o&&(i*=1+.03*o),1+i/200):0;case"evil":return"evil"===t.race.universe||r?(c>0&&(i*=1+.01*c),o&&(i*=1+.03*o),1+(Math.log2(10+i)-3.321928094887362)/5):1;case"micro":return"micro"===t.race.universe||r?a?(c>0&&(i*=1+.01*c),i=.01+(Math.log(100+i)-4.605170185988092)/35,o&&(i*=1+.03*o),i>.04&&(i=.04),+i.toFixed(5)):(c>0&&(i*=1+.01*c),i=.02+(Math.log(100+i)-4.605170185988092)/20,o&&(i*=1+.03*o),i>.06&&(i=.06),+i.toFixed(5)):0;case"heavy":return"heavy"===t.race.universe||r?(c>0&&(i*=1+.01*c),o&&(i*=1+.03*o),.995**i):1;case"antimatter":return"antimatter"===t.race.universe||r?(c>0&&(i*=1+.01*c),o&&(i*=1+.03*o),1+(Math.log(50+i)-3.912023005428146)/5):0;case"magic":return"magic"===t.race.universe||r?(c>0&&(i*=1+.01*c),o&&(i*=1+.03*o),1+(Math.log(50+i)-3.912023005428146)/3):0}return 0}const uc=function(e){return dc&&!e?dc:t.genes.challenge&&t.genes.challenge>=2?dc=_c(t.race.universe):0};var dc;function _c(e,a){if(t.genes.challenge&&t.genes.challenge>=2){let r=Yc(e=e||t.race.universe),s="standard"===e?.25:.15,i=t.genes.challenge>=3?.15:.1;t.genes.challenge>=4&&"standard"!==e&&(s+=.05,i-=.05),t.race.weak_mastery&&"antimatter"===e&&(s/=10,i/=10),t.race.nerfed&&(s/="antimatter"===e?5:2,i/="antimatter"===e?5:2),t.race.ooze&&(s*=1-di.ooze.vars()[2]/100,i*=1-di.ooze.vars()[2]/100);let c=t.stats.feat.grandmaster&&t.stats.achieve.corrupted&&t.stats.achieve.corrupted.l>0?Math.min(t.stats.achieve.corrupted.l,t.stats.feat.grandmaster):0;c>0&&(s*=1+c/100,i*=1+c/100);let o=r.aLvl*s,n=0;return"standard"!==e&&(n=r.uLvl*i),t.genes.challenge>=5&&t.race.hasOwnProperty("mastery")&&(o*=1+di.mastery.vars()[0]*t.race.mastery/100,n*=1+di.mastery.vars()[0]*t.race.mastery/100),a?{g:o,u:n,m:o+n}:o+n}return a?{g:0,u:0,m:0}:0}const pc=function(e){if(!hc||e){let e=0;Object.keys(t.pillars).forEach((function(a){_i[a]&&t.race.species===a?e+=4:_i[a]&&e++})),hc=[1+e/100,1+2*e/100]}return hc};var hc;function mc(e,a,r,s){r=r||0;let i=(s=s||{}).genes;void 0===i&&(i=so()-1,i>4&&(i=4));let c=s.uni||t.race.universe;if("micro"===c&&(e*=.25),"antimatter"===c&&(e*=1.1),"heavy"===c&&"mad"!==a)switch(i){case 1:e*=1.1;break;case 2:e*=1.15;break;case 3:e*=1.2;break;case 4:e*=1.25;break;default:e*=1.05}switch((void 0!==s.tp?s.tp:t.race.truepath)&&(e*=1.1),i){case 1:return+(1.05*e).toFixed(r);case 2:return+(1.12*e).toFixed(r);case 3:return+(1.25*e).toFixed(r);case 4:return+(1.45*e).toFixed(r);default:return+e.toFixed(r)}}function gc(e,a){let r={plasmid:0,phage:0,dark:0,harmony:0,artifact:0,cores:0};a||(a={});let s=a.genes,i=a.uni;i=i||t.race.universe;let c=0;if(void 0===a.cit){let e=t.civic.hasOwnProperty("garrison")?t.civic.garrison.workers:0;for(let a=0;a<3;a++)t.civic.foreign[`gov${a}`].occ&&(e+=ua("federation"===t.civic.govern.type?15:20));c=t.race.high_pop?Math.round(t.resource[t.race.species].amount/di.high_pop.vars()[0])+Math.round(e/di.high_pop.vars()[0]):t.resource[t.race.species].amount+e}else c=a.high_pop?Math.round(a.cit/di.high_pop.vars(a.high_pop)[0])+Math.round(a.sol/di.high_pop.vars(a.high_pop)[0]):a.cit+a.sol;let o=999,n=1e6,l=100,u=0,d=150;switch(e){case"mad":o=3,n=1e5,l=1.1,d=150,(void 0!==a.synth?a.synth:"synthetic"===_i[t.race.species].type)&&(o=5,n=125e3,d=100);break;case"cataclysm":case"bioseed":o=3,n=5e4,l=1.015,u=1,d=400;break;case"ai":o=2.5,n=45e3,l=1.014,u=2,d=600;break;case"vacuum":case"bigbang":o=2.2,n=4e4,l=1.012,u=2.5,d=800;break;case"ascend":case"terraform":o=1.15,n=3e4,l=1.008,u=4,d=2e3;break;case"matrix":o=1.5,n=32e3,l=1.01,u=3.2,d=1800;break;case"retire":o=1.15,n=32e3,l=1.006,u=3.2,d=1800;break;case"eden":o=1,n=18e3,l=1.004,u=2.5,d=1800}if(d=void 0!==s?Math.floor(d*(1+(s+(a.tp?1:0))/8)):Math.floor(d*(1+(so()-(t.race.truepath?0:1))/8)),void 0===a.plas){let s=void 0!==a.know?a.know:t.stats.know,i=Math.round(c/o);for(;s>n;)i++,s-=n,n*=l;if(t.race.cataclysm?i+=300:t.race.lone_survivor&&(i+=800),r.plasmid=mc(i,e,!1,a),!a.rawPlasmids&&r.plasmid>d){let e=r.plasmid-d;r.plasmid=d,e=Math.floor(e/(e+d)*d),r.plasmid+=e}}else r.plasmid=a.plas;if(r.phage=r.plasmid>0?mc(Math.floor(Math.log2(r.plasmid)*Math.E*u),e,!1,a):0,"bigbang"===e){let e=a.exotic,s=a.mass;void 0===e&&t.interstellar&&t.interstellar.stellar_engine&&(e=t.interstellar.stellar_engine.exotic,s=t.interstellar.stellar_engine.mass);let i=+Math.log(1+40*e).toFixed(3);i+=+(Math.log2(s-7)/2.5).toFixed(3),i=mc(i,"bigbang",3,a),r.dark=i}else if("vacuum"===e){let e=void 0!==a.mana?a.mana:t.resource.Mana.gen,s=+(Math.log2(e)/5).toFixed(3);s=mc(s,"vacuum",3,a),r.dark=s}if(["ascend","descend","terraform"].includes(e)){let c=1;if(void 0===s?(c=so(),c>5&&(c=5)):c=s+1,"ascend"===e||"terraform"===e){switch(i){case"micro":c*=.25;break;case"heavy":c*=1.2;break;case"antimatter":c*=1.1}r.harmony=parseFloat(c.toFixed(2))}else if("descend"===e){let e="micro"===i?1:c,s=a.floor;void 0!==s?s++:s=t.portal.hasOwnProperty("spire")?t.portal.spire.count:0,[50,100].forEach((function(t){s>t&&e++})),r.artifact=e}}return"ai"===e&&(r.cores="micro"===i?2:5),r}function fc(e,a,r){let s=e.cost||{};if((s.RNA||s.DNA)&&t.genes.evolve){var i={};return Object.keys(s).forEach((function(e){"RNA"!==e&&"DNA"!==e||(i[e]=function(){return Math.round(.8*s[e](a,r))})})),i}return s=function(e,a,r){if(t.race.bloated){let t=1+di.bloated.vars()[0]/100;var s={};return Object.keys(e).forEach((function(i){["Food","Lumber","Stone","Furs","Copper","Iron","Aluminium","Cement","Coal","Steel","Titanium","Alloy","Polymer","Iridium"].includes(i)?s[i]=function(){return e[i](a,r)*t}:s[i]=function(){return e[i](a,r)}})),s}return e}(s,a,r),s=function(e,a,r,s){if((s?s.truepath:t.race.truepath)&&(!a.hasOwnProperty("path")||!a.path.includes("truepath"))){var i={};return Object.keys(e).forEach((function(t){"Money"===t?i[t]=function(){return Math.round(3*e[t](r,s))}:["Structs","Knowledge","Custom","Soul_Gem","Plasmid","Phage","Dark","Harmony","Blood_Stone","Artifact","Corrupt_Gem","Codex","Demonic_Essence","Horseshoe"].includes(t)?i[t]=function(){return e[t](r,s)}:i[t]=function(){return Math.round(2*e[t](r,s))}})),i}return e}(s,e,a,r),s=function(e,a,r){if(t.race.lone_survivor){var s={};return Object.keys(e).forEach((function(t){["Structs","Custom","Soul_Gem","Plasmid","Phage","Dark","Harmony","Blood_Stone","Artifact","Corrupt_Gem","Codex","Demonic_Essence","Horseshoe"].includes(t)?s[t]=function(){return e[t](a,r)}:["Knowledge"].includes(t)?s[t]=function(){return Math.round(.5*e[t](a,r))}:["Money"].includes(t)?s[t]=function(){return Math.round(.22*e[t](a,r))}:["Plywood","Brick","Wrought_Iron","Sheet_Metal","Mythril","Quantium"].includes(t)?s[t]=function(){return Math.round(.14*e[t](a,r))}:s[t]=function(){return Math.round(.28*e[t](a,r))}})),s}return e}(s,a,r),s=function(e,a,r){if(t.race.inflation){var s={};return Object.keys(e).forEach((function(i){if("Money"===i){let c=1+t.race.inflation/75;s[i]=function(){return Math.round(e[i](a,r)*c)}}else s[i]=function(){return e[i](a,r)}})),s}return e}(s,a,r),s=function(e,a,r){if("technocracy"===t.civic.govern.type){let t=1+re.technocracy()[1]/100;var s={};return Object.keys(e).forEach((function(i){if("Knowledge"===i){let t=1-re.technocracy()[0]/100;s[i]=function(){return Math.round(e[i](a,r)*t)}}else s[i]="Money"===i||"Structs"===i||"Custom"===i?function(){return e[i](a,r)}:function(){return Math.round(e[i](a,r)*t)}})),s}return e}(s,a,r),s=function(e,a,r){if(t.race.flier&&(e.Stone||e.Cement)){var s={};let t=1-di.flier.vars()[0]/100;return Object.keys(e).forEach((function(i){"Stone"!==i||e.Cement?"Cement"===i?e.Stone?s.Stone=function(){return Math.round(e.Stone(a,r)*t+1.8*e[i](a,r)*t)||0}:s.Stone=function(){return Math.round(1.75*e[i](a,r)*t)}:s[i]=function(){return e[i](a,r)}:s[i]=function(){return Math.round(e[i](a,r)*t)||0}})),s}return e}(s,a,r),s=function(e,a,r){if(t.race.kindling_kindred&&(e.Lumber||e.Plywood)){var s={};let t=1+di.kindling_kindred.vars()[0]/100;return Object.keys(e).forEach((function(i){"Lumber"!==i&&"Plywood"!==i&&"Structs"!==i?s[i]=function(){return Math.round(e[i](a,r)*t)||0}:"Structs"===i&&(s[i]=function(){return e[i](a,r)})})),s}if(t.race.unfathomable&&t.city.captive_housing){let t=Oi("entish");if(t>0){s={};let i=1-.4*t;return Object.keys(e).forEach((function(t){s[t]="Lumber"===t&&"Plywood"===t?function(){return Math.round(e[t](a,r)*i)||0}:function(){return e[t](a,r)}})),s}}return e}(s,a,r),s=function(e,a,r){if(t.race.smoldering){let s={};return Object.keys(e).forEach((function(t){if("Lumber"===t||"Plywood"===t){let i="Plywood"===t?2:1;s.Chrysotile=function(){return Math.round(e[t](a,r)*i)||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(t)?s[t]=function(){return e[t](a,r)}:s[t]=function(){return Math.round(.9*e[t](a,r))}})),!s.hasOwnProperty("Chrysotile")&&e.hasOwnProperty("Money")&&t.tech.primitive&&t.tech.primitive>=3&&(s.Chrysotile=function(){let t=e.Money(a,r)||0;return t>0?Math.round(t/50):0}),s}return e}(s,a,r),s=function(e,a,r){let s=D("pragmatist",1),i=Oi("gnome");if((t.race.smart||t.race.dumb||s||i>0)&&e.Knowledge){var c={};return Object.keys(e).forEach((function(o){c[o]="Knowledge"===o?function(){let c=e[o](a,r);return t.race.smart&&(c*=1-di.smart.vars()[0]/100),i>0&&(c*=1-di.smart.vars(1)[0]/100*i),t.race.dumb&&(c*=1+di.dumb.vars()[0]/100),s&&(c*=1+s/100),Math.round(c)}:function(){return e[o](a,r)}})),c}return e}(s,a,r),s=function(e,a,r){if(e.Cement&&t.tech.cement&&t.tech.cement>=2){let i=t.tech.cement>=3?.8:.9;var s={};return Object.keys(e).forEach((function(t){s[t]="Cement"===t?function(){return Math.round(e[t](a,r)*i)||0}:function(){return e[t](a,r)}})),s}return e}(s,a,r),s=function(e,t,a){let r=D("extravagant",0);if(r){var s={};return Object.keys(e).forEach((function(i){if("Money"===i){let c=1+r/100;s[i]=function(){return Math.round(e[i](t,a)*c)}}else s[i]=function(){return e[i](t,a)}})),s}return e}(s,a,r),s=function(e,a,r){if(t.race.heavy){var s={};return Object.keys(e).forEach((function(t){s[t]="Stone"===t||"Cement"===t||"Wrought_Iron"===t?function(){return Math.round(e[t](a,r)*(1+di.heavy.vars()[1]/100))}:function(){return e[t](a,r)}})),s}return e}(s,a,r),function(e,a,r){let s=Oi("pterodacti");if((t.race.hollow_bones||s>0)&&(e.Plywood||e.Brick||e.Wrought_Iron||e.Sheet_Metal||e.Mythril||e.Aerogel||e.Nanoweave||e.Scarletite||e.Quantium)){var i={};return Object.keys(e).forEach((function(c){i[c]="Plywood"===c||"Brick"===c||"Wrought_Iron"===c||"Sheet_Metal"===c||"Mythril"===c||"Aerogel"===c||"Nanoweave"===c||"Scarletite"===c||"Quantium"===c?function(){let i=e[c](a,r);return t.race.hollow_bones&&(i*=1-di.hollow_bones.vars()[0]/100),s>0&&(i*=1-di.hollow_bones.vars(3)[0]/100*s),Math.round(i)}:function(){return e[c](a,r)}})),i}return e}(s,a,r)}function vc(e){return t.race.high_pop&&(e*=di.high_pop.vars()[0]),e}function yc(e){switch(e){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'\n ';case"sun":return'';case"firework":return'';case"floppy":return'';case"slime":return'';case"lightning":return'\n \n '}}function bc(e){switch(e){case"star":return"0 0 640 640";case"atom":return"0 0 100 88.379";case"heavy":case"mask":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"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":case"martini":return"0 0 15 15";case"party":return"0 0 528.69 983.1";case"lightbulb":return"0 0 100 156";case"bunny":case"ant":return"0 0 128 128";case"egg":return"0 0 273.61 295.02";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 wc(e,a){if("feat"===a)switch(e){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 t.settings.icon}function $c(e,t,a,r,s){let i="";return r&&(i=`id="${r}" `),`${yc(e)}`}function xc(e,a){let r=Ic();const s=new Date;return r.active&&!t.special.egg[s.getFullYear()][`egg${e}`]?$c("egg",a||16,2,`egg${e}`,'role="button" aria-label="Egg" '):""}function kc(e){$(`#egg${e}`).click((function(){let a=(new Date).getFullYear();t.special.egg[a][`egg${e}`]||(t.special.egg[a][`egg${e}`]=!0,e<=12?"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=9,t.stats.antiplasmid+=9,Bi(z("city_egg_msg",[9,z("resource_AntiPlasmid_plural_name")]),"success",!1,["events"])):(t.prestige.Plasmid.count+=9,t.stats.plasmid+=9,Bi(z("city_egg_msg",[9,z("resource_Plasmid_plural_name")]),"success",!1,["events"])):(t.prestige.Phage.count+=4,t.stats.phage+=4,Bi(z("city_egg_msg",[4,z("resource_Phage_name")]),"success",!1,["events"])),$(`#egg${e}`).remove(),$(".popper").hide())}))}function qc(e,a,r){let s=Kc();const i=(new Date).getFullYear();let c=r?"trick":"treat";return s.active&&!t.special.trick[i][`${c}${e}`]?$c(r?"ghost":"candycorn",a||16,2,`${c}${e}`,`role="button" aria-label="${r?"Ghost":"Candy Corn"}" `):""}function Mc(e,a){const r=(new Date).getFullYear();let s=a?"trick":"treat";$(`#${s}${e}`).click((function(){t.special.trick[r][`${s}${e}`]||(t.special.trick[r][`${s}${e}`]=!0,a?(t.prestige.Phage.count+=2,t.stats.phage+=2,Bi(z("city_ghost_msg",[2,z("resource_Phage_name")]),"success",!1,["events"])):"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=13,t.stats.antiplasmid+=13,Bi(z("city_trick_msg",[13,z("resource_AntiPlasmid_plural_name")]),"success",!1,["events"])):(t.prestige.Plasmid.count+=13,t.stats.plasmid+=13,Bi(z("city_trick_msg",[13,z("resource_Plasmid_plural_name")]),"success",!1,["events"])),$(`#${s}${e}`).remove(),setTimeout((function(){1===e&&a&&$(".popper").hide()}),250))}))}function Pc(e,a,r,s,i,c){return t.stats.achieve[e]&&(i?t.stats.achieve[e][c]-1:t.stats.achieve[e][c])>0?`

              ${yc(r)}${Sc(t.stats.achieve[e][c])} ${s}

              `:""}function Oc(e,a,r,s,i){a||(a=10),r||(r=wc(e,"achievement"));let c="";if(i)switch(i){case"standard":c+=Pc(e,a,r,z(t.settings.icon),s,"l");break;case"antimatter":c+=Pc(e,a,"atom",z("universe_antimatter"),s,"a");break;case"evil":c+=Pc(e,a,"evil",z("universe_evil"),s,"e");break;case"heavy":c+=Pc(e,a,"heavy",z("universe_heavy"),s,"h");break;case"micro":c+=Pc(e,a,"micro",z("universe_micro"),s,"m");break;case"magic":c+=Pc(e,a,"magic",z("universe_magic"),s,"mg")}else c+=Pc(e,a,r,z(t.settings.icon),s,"l"),c+=Pc(e,a,"atom",z("universe_antimatter"),s,"a"),c+=Pc(e,a,"evil",z("universe_evil"),s,"e"),c+=Pc(e,a,"heavy",z("universe_heavy"),s,"h"),c+=Pc(e,a,"micro",z("universe_micro"),s,"m"),c+=Pc(e,a,"magic",z("universe_magic"),s,"mg");return c}function Cc(e,t){return(t=t||{})[e]?t[e]:e<=1?1:t[e]=Cc(e-1,t)+Cc(e-2,t)}function jc(e){var t=Object.keys(e);return t[t.length*Math.random()<<0]}function Sc(e){switch(e){case 1:return z("basic");case 2:return z("plain");case 3:return z("bronze");case 4:return z("silver");case 5:return z("gold");default:return""}}function Fc(e,a){let r=0;if(a)Object.keys(a.ascended).forEach((function(e){r+=a.ascended[e]}));else if(t.stats.achieve.ascended)for(let e=0;e=1&&(s+=t.stats.achieve.technophobe.l);let i=0;for(let t=0;t=0&&(i>s&&(a-=s-i),i++),r-=a}return r}function zc(){t.stats.reset++,t.stats.tdays+=t.stats.days,t.stats.days=0,t.stats.tknow+=t.stats.know,t.stats.know=0,t.stats.tstarved+=t.stats.starved,t.stats.starved=0,t.stats.tdied+=t.stats.died,t.stats.died=0,t.stats.tsac+=t.stats.sac,t.stats.sac=0,t.stats.tcattle+=t.stats.cattle,t.stats.cattle=0,t.stats.tmurders+=t.stats.murders,t.stats.murders=0,t.stats.tpsykill+=t.stats.psykill,t.stats.psykill=0}function Ac(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e)){var t=[];return e.forEach((function(e){t.push(Ac(e))})),t}let a=new e.constructor;for(var r in e)e.hasOwnProperty(r)&&(a[r]=Ac(e[r]));return a}function Tc(e,a,r){switch(e){case"reverse":{let e=a.toLowerCase().split("").reverse().join("");return e.charAt(0).toUpperCase()+e.slice(1)}case"name":return Ec("fool",2021)?Tc("reverse",_i[t.race.species].name):_i[t.race.species].name;case"curve":return 1-(1-a)**(r||1.5)}return!1}function Ec(e,a){switch(e){case"easter":return Ic();case"halloween":return Kc();case"fool":{const e=new Date;return!(t.settings.boring||3!==e.getMonth()||1!==e.getDate()||a&&e.getFullYear()!==a)}case"launch_day":{const e=new Date;return!t.settings.boring&&4===e.getMonth()&&6===e.getDate()}case"summer":{const e=new Date;return!t.settings.boring&&5===e.getMonth()&&[20,21,22].includes(e.getDate())?(t.city.hasOwnProperty("foundry")&&!t.city.foundry.hasOwnProperty("Thermite")&&(t.city.foundry.Thermite=0),t.resource.hasOwnProperty("Thermite")||(t.resource.Thermite={name:z("resource_Thermite_name"),display:!1,value:0,amount:0,crates:0,diff:0,delta:0,max:-1,rate:0}),!0):(t.city.hasOwnProperty("foundry")&&t.city.foundry.hasOwnProperty("Thermite")&&(t.city.foundry.crafting-=t.city.foundry.Thermite,t.civic.craftsman.workers-=t.city.foundry.Thermite,t.civic[t.civic.d_job].workers+=t.city.foundry.Thermite,delete t.city.foundry.Thermite),!1)}case"firework":{const e=new Date;if(!t.settings.boring&&6===e.getMonth()&&[1,2,3,4].includes(e.getDate())){let e=t.race.cataclysm||t.race.orbit_decayed?"space":"city";return t[e].hasOwnProperty("firework")||(t[e].firework={count:0,on:0}),!0}return(t.city.hasOwnProperty("firework")||t.space.hasOwnProperty("firework"))&&(delete t.city.firework,delete t.space.firework),!1}}return!1}function Ic(){const e=new Date;let a=e.getFullYear();t.special.egg.hasOwnProperty(a)||(t.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}),t.special.egg.hasOwnProperty(a)&&!t.special.egg[a].hasOwnProperty("egg13")&&(t.special.egg[a].egg13=!1,t.special.egg[a].egg14=!1,t.special.egg[a].egg15=!1),t.special.egg.hasOwnProperty(a)&&!t.special.egg[a].hasOwnProperty("egg16")&&(t.special.egg[a].egg16=!1,t.special.egg[a].egg17=!1,t.special.egg[a].egg18=!1);let r=Math.floor,s=a%19,i=r(a/100),c=(i-r(i/4)-r((8*i+13)/25)+19*s+15)%30,o=c-r(c/28)*(1-r(29/(c+1))*r((21-s)/11)),n=o-(a+r(a/4)+o+2-i+r(i/4))%7,l=3+r((n+40)/44),u=n+28-31*r(l/4),d={date:[l-1,u],active:!1,endDate:[l-1,u],hint:!1,hintDate:[l-1,u],solve:!1,solveDate:[l-1,u]};return t.settings.boring||(d.endDate[1]+=10,(2===d.endDate[0]&&d.endDate[1]>31||3===d.endDate[0]&&d.endDate[1]>30)&&(d.endDate[1]-=2===d.endDate[0]?31:30,d.endDate[0]++),d.hintDate[1]+=1,(2===d.hintDate[0]&&d.hintDate[1]>31||3===d.hintDate[0]&&d.hintDate[1]>30)&&(d.hintDate[1]-=2===d.hintDate[0]?31:30,d.hintDate[0]++),d.solveDate[1]+=3,(2===d.solveDate[0]&&d.solveDate[1]>31||3===d.solveDate[0]&&d.solveDate[1]>30)&&(d.solveDate[1]-=2===d.solveDate[0]?31:30,d.solveDate[0]++),e.getMonth()>=d.date[0]&&e.getDate()>=d.date[1]&&e.getMonth()<=d.endDate[0]&&e.getDate()<=d.endDate[1]&&(d.active=!0,e.getMonth()>=d.hintDate[0]&&e.getDate()>=d.hintDate[1]&&e.getMonth()<=d.endDate[0]&&e.getDate()<=d.endDate[1]&&(d.hint=!0),e.getMonth()>=d.solveDate[0]&&e.getDate()>=d.solveDate[1]&&e.getMonth()<=d.endDate[0]&&e.getDate()<=d.endDate[1]&&(d.solve=!0))),d}function Kc(){const e=new Date;let a=e.getFullYear();t.special.trick.hasOwnProperty(a)||(t.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 r={date:[9,28],active:!1,endDate:[10,4],hint:!1,hintDate:[9,29],solve:!1,solveDate:[9,31]};if(t.settings.boring)return r;let s=new Date(`${r.date[0]+1}/${r.date[1]}/${a}`),i=new Date(`${r.endDate[0]+1}/${r.endDate[1]}/${a}`);return e>=s&&e<=i&&(r.active=!0,e>=new Date(`${r.hintDate[0]+1}/${r.hintDate[1]}/${a}`)&&e<=i&&(r.hint=!0),e>=new Date(`${r.solveDate[0]+1}/${r.solveDate[1]}/${a}`)&&e<=i&&(r.solve=!0)),r}function Lc(){return t.race.magnificent&&t.city.hasOwnProperty("shrine")&&t.city.shrine.count>0}function Nc(e){let a={mult:1,add:0};if(Lc())switch(e){case"metal":a.mult+=+t.city.shrine.metal/100*di.magnificent.vars()[3];break;case"tax":a.mult+=+t.city.shrine.tax/100*di.magnificent.vars()[2];break;case"know":a.add+=+t.city.shrine.know*di.magnificent.vars()[0],a.mult+=+t.city.shrine.know*di.magnificent.vars()[1]/100;break;case"morale":a.add+=t.city.shrine.morale*di.magnificent.vars()[4]}return a}const Dc={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 Bc(e,a){let r=di[e].hasOwnProperty("vars")?di[e].vars(a):[];return Dc.hasOwnProperty(e)&&("fibroblast"===e?r=[5*r[0]]:"hivemind"===e&&t.race.high_pop?r=[r[0]*di.high_pop.vars()[0]]:"imitation"===e?r.push(_i[t.race.srace||"protoplasm"].name):"elusive"===e?r=[Math.round(100*(1/30/(1/(30+r[0]))-1))]:"chameleon"===e?r=[r[0],Math.round(100*(1/30/(1/(30+r[1]))-1))]:"blood_thirst"===e?r=[Math.ceil(Math.log2(r[0]))]:"selenophobia"===e?r=[14-r[0],r[0]]:"hooved"===e?r.unshift(Gc()):"anthropophagite"===e?r=[1e4*r[0]]:Dc[e]||(r=[])),r}function Gc(e){return t.race.sludge?e?"craft":z("resource_Beaker_name"):"cath"===t.race.species?e?"craft":z("resource_Box_name"):"wolven"===t.race.species?e?"craft":z("resource_ChewToy_name"):"dracnid"===t.race.species?e?"craft":z("resource_Hoard_name"):"seraph"===t.race.species?e?"forge":z("resource_Halo_name"):"cyclops"===t.race.species?e?"craft":z("resource_Monocle_name"):"kobold"===t.race.species?e?"craft":z("resource_Candle_name"):"tuskin"===t.race.species?e?"craft":z("resource_Goggles_name"):"sharkin"===t.race.species?e?"craft":z("resource_ToothSharpener_name"):"humanoid"===_i[t.race.species].type?e?"craft":z("resource_Sandals_name"):"avian"===_i[t.race.species].type?e?"craft":z("resource_Perch_name"):"plant"===_i[t.race.species].type?e?"craft":z("resource_Planter_name"):"fungi"===_i[t.race.species].type?e?"craft":z("resource_DampCloth_name"):"reptilian"===_i[t.race.species].type?e?"craft":z("resource_HeatRock_name"):"fey"===_i[t.race.species].type?e?"craft":z("resource_PixieDust_name"):"synthetic"===_i[t.race.species].type?e?"craft":z("resource_Battery_name"):e?"forge":z("resource_Horseshoe_name")}const Rc={infiltrator:[z("wiki_trait_effect_infiltrator_ex1"),z("wiki_trait_effect_infiltrator_ex2",[[`${z("tech_steel")}`,`${z("tech_electricity")}`,`${z("tech_electronics")}`,`${z("tech_fission")}`,`${z("tech_rocketry")}`,`${z("tech_artificial_intelligence")}`,`${z("tech_quantum_computing")}`,`${z("tech_virtual_reality")}`,`${z("tech_shields")}`,`${z("tech_ai_core")}`,`${z("tech_graphene_processing")}`,`${z("tech_nanoweave")}`,`${z("tech_orichalcum_analysis")}`,`${z("tech_infernium_fuel")}`].join(", ")])],heavy:[z("wiki_trait_effect_heavy_ex1",[Hc("Stone"),Hc("Cement"),Hc("Wrought_Iron")])],sniper:[z("wiki_trait_effect_sniper_ex1")],hooved:[z("wiki_trait_effect_hooved_ex1",[Gc(!1)]),z("wiki_trait_effect_hooved_ex2",[`${t.resource.hasOwnProperty("Lumber")?t.resource.Lumber.name:z("resource_Lumber_name")}`,`${t.resource.hasOwnProperty("Copper")?t.resource.Copper.name:z("resource_Copper_name")}`,`${t.resource.hasOwnProperty("Iron")?t.resource.Iron.name:z("resource_Iron_name")}`,`${t.resource.hasOwnProperty("Steel")?t.resource.Steel.name:z("resource_Steel_name")}`,`${t.resource.hasOwnProperty("Adamantite")?t.resource.Adamantite.name:z("resource_Adamantite_name")}`,`${t.resource.hasOwnProperty("Orichalcum")?t.resource.Orichalcum.name:z("resource_Orichalcum_name")}`,12,75,150,500,5e3]),z("wiki_trait_effect_hooved_ex3"),z("wiki_trait_effect_hooved_ex4",['5',Gc(!1)]),z("wiki_trait_effect_hooved_ex5",[`${t.resource.hasOwnProperty("Lumber")?t.resource.Lumber.name:z("resource_Lumber_name")}`,`${t.resource.hasOwnProperty("Copper")?t.resource.Copper.name:z("resource_Copper_name")}`])],instinct:[z("wiki_trait_effect_instinct_ex1",[6.67,z("galaxy_chthonian"),10])],logical:[z("wiki_trait_effect_logical_ex1",[t.tech.hasOwnProperty("science")?t.tech.science:0,t.tech.hasOwnProperty("high_tech")?t.tech.high_tech:0])],high_pop:[z("wiki_trait_effect_high_pop_ex1")],flier:[z("wiki_trait_effect_flier_ex1")],unfathomable:[z("wiki_trait_effect_unfathomable_ex1"),z("wiki_trait_effect_unfathomable_ex2")]};function Hc(e){return`${t.hasOwnProperty("resource")&&t.resource.hasOwnProperty(e)?t.resource[e].name:z(`resource_${e}_name`)}`}function Uc(e,a,r){let s=r.fanatic||!1,i=r.tpage||!1,c=r.trank||!1,o=r.wiki||!1,n="",l=Ci("name",a),u=Ci("desc",a);i&&["genus","major"].includes(di[a].type)&&(n=`«${z("wiki_trait_rank")} {{ rank }}»`),o&&e.append(`

              ${l}

              ${n}
              `),o&&(i&&di[a].hasOwnProperty("val")?e.append(`
              ${z(`wiki_trait_${di[a].type}`)}${z("wiki_trait_value",[di[a].val])}
              `):e.append(`
              ${z(`wiki_trait_${di[a].type}`)}
              `)),s&&o&&e.append(`
              ${z("wiki_trait_fanaticism",[s])}
              `),e.append(`
              ${u}
              `);let d="warning";if(di[a].hasOwnProperty("val")&&(d=di[a].val>=0?"success":"danger"),i&&["genus","major"].includes(di[a].type)?e.append(`
              `):(o||t.stats.feat.journeyman&&t.stats.achieve.seeder&&t.stats.achieve.seeder.l>0)&&e.append(`
              ${z(`wiki_trait_effect_${a}`,Bc(a,c))}
              `),Rc[a]&&o&&Rc[a].forEach((function(t){e.append(`
              ${t}
              `)})),i&&["genus","major"].includes(di[a].type)){let e={rank:t.race[a]||1};ic({el:`#${di[a].type}_${a}`,data:e,methods:{getTraitDesc:e=>z(`wiki_trait_effect_${a}`,Bc(a,e)),up(){switch(e.rank){case.25:e.rank=.5;break;case.5:e.rank=1;break;case 1:e.rank=2;break;case 2:case 3:e.rank=3}},down(){switch(e.rank){case.25:case.5:e.rank=.25;break;case 1:e.rank=.5;break;case 2:e.rank=1;break;case 3:e.rank=2}}}})}}const Wc={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"],challenge:["joyless","steelen","dissipated","technophobe","wheelbarrow","iron_will","failed_history","banana","pathfinder","ashanddust","exodus","obsolete","bluepill","retired","gross","lamentis","overlord","adam_eve"]},Qc={colonist:[Tc("name")]},Zc={trade:[750,50]},Vc={};Object.keys(Wc).forEach((function(e){Wc[e].forEach((t=>Vc[t]={name:z(`achieve_${t}_name`),desc:Zc[t]?z(`achieve_${t}_desc`,Zc[t]):z(`achieve_${t}_desc`),flair:Qc[t]?z(`achieve_${t}_flair`,Qc[t]):z(`achieve_${t}_flair`),type:e}))}));const Jc={utopia:{name:z("feat_utopia_name"),desc:z("feat_utopia_desc"),flair:z("feat_utopia_flair")},take_no_advice:{name:z("feat_take_no_advice_name"),desc:z("feat_take_no_advice_desc"),flair:z("feat_take_no_advice_flair")},ill_advised:{name:z("feat_ill_advised_name"),desc:z("feat_ill_advised_desc"),flair:z("feat_ill_advised_flair")},organ_harvester:{name:z("feat_organ_harvester_name"),desc:z("feat_organ_harvester_desc"),flair:z("feat_organ_harvester_flair")},the_misery:{name:z("feat_the_misery_name"),desc:z("feat_the_misery_desc"),flair:z("feat_the_misery_flair")},energetic:{name:z("feat_energetic_name"),desc:z("feat_energetic_desc"),flair:z("feat_energetic_flair")},garbage_pie:{name:z("feat_garbage_pie_name"),desc:z("feat_garbage_pie_desc"),flair:z("feat_garbage_pie_flair")},finish_line:{name:z("feat_finish_line_name"),desc:z("feat_finish_line_desc"),flair:z("feat_finish_line_flair")},blank_slate:{name:z("feat_blank_slate_name"),desc:z("feat_blank_slate_desc"),flair:z("feat_blank_slate_flair")},supermassive:{name:z("feat_supermassive_name"),desc:z("feat_supermassive_desc"),flair:z("feat_supermassive_flair")},steelem:{name:z("feat_steelem_name"),desc:z("feat_steelem_desc"),flair:z("feat_steelem_flair")},banana:{name:z("feat_banana_name"),desc:z("feat_banana_desc",[500,500]),flair:z("feat_banana_flair")},rocky_road:{name:z("feat_rocky_road_name"),desc:z("feat_rocky_road_desc"),flair:z("feat_rocky_road_flair")},demon_slayer:{name:z("feat_demon_slayer_name"),desc:z("feat_demon_slayer_desc"),flair:z("feat_demon_slayer_flair")},equilibrium:{name:z("feat_equilibrium_name"),desc:z("feat_equilibrium_desc"),flair:z("feat_equilibrium_flair")},digital_ascension:{name:z("feat_digital_ascension_name"),desc:z("feat_digital_ascension_desc"),flair:z("feat_digital_ascension_flair")},novice:{name:z("feat_novice_name"),desc:z("feat_achievement_hunter_desc",[10]),flair:z("feat_novice_flair")},journeyman:{name:z("feat_journeyman_name"),desc:z("feat_achievement_hunter_desc",[25]),flair:z("feat_journeyman_flair")},adept:{name:z("feat_adept_name"),desc:z("feat_achievement_hunter_desc",[50]),flair:z("feat_adept_flair")},master:{name:z("feat_master_name"),desc:z("feat_achievement_hunter_desc",[75]),flair:z("feat_master_flair")},grandmaster:{name:z("feat_grandmaster_name"),desc:z("feat_achievement_hunter_desc",[100]),flair:z("feat_grandmaster_flair")},nephilim:{name:z("feat_nephilim_name"),desc:z("feat_nephilim_desc"),flair:z("feat_nephilim_flair")},twisted:{name:z("feat_twisted_name"),desc:z("feat_twisted_desc"),flair:z("feat_twisted_flair")},slime_lord:{name:z("feat_slime_lord_name"),desc:z("feat_slime_lord_desc"),flair:z("feat_slime_lord_flair")},annihilation:{name:z("feat_annihilation_name"),desc:z("feat_annihilation_desc"),flair:z("feat_annihilation_flair")},friday:{name:z("feat_friday_name"),desc:z("feat_friday_desc"),flair:z("feat_friday_flair")},valentine:{name:z("feat_love_name"),desc:z("feat_love_desc"),flair:z("feat_love_flair")},leprechaun:{name:z("feat_leprechaun_name"),desc:z("feat_leprechaun_desc"),flair:z("feat_leprechaun_flair")},easter:{name:z("feat_easter_name"),desc:z("feat_easter_desc"),flair:z("feat_easter_flair")},egghunt:{name:z("feat_egghunt_name"),desc:z("feat_egghunt_desc"),flair:z("feat_egghunt_flair")},launch_day:{name:z("feat_launch_day_name"),desc:z("feat_launch_day_desc"),flair:z("feat_launch_day_flair")},solstice:{name:z("feat_solstice_name"),desc:z("feat_solstice_desc"),flair:z("feat_solstice_flair")},firework:{name:z("feat_firework_name"),desc:z("feat_firework_desc"),flair:z("feat_firework_flair")},halloween:{name:z("feat_boo_name"),desc:z("feat_boo_desc"),flair:z("feat_boo_flair")},trickortreat:{name:z("feat_trickortreat_name"),desc:z("feat_trickortreat_desc"),flair:z("feat_trickortreat_flair")},thanksgiving:{name:z("feat_gobble_gobble_name"),desc:z("feat_gobble_gobble_desc"),flair:z("feat_gobble_gobble_flair")},xmas:{name:z("feat_xmas_name"),desc:z("feat_xmas_desc"),flair:z("feat_xmas_flair")},fool:{name:z("feat_fool_name"),desc:z("feat_fool_desc"),flair:z("feat_fool_flair")}};{let e=Yc();e.aLvl,e.uLvl}function Yc(e){let a=Xc(e=e||t.race.universe),r=0,s=0;return Object.keys(Vc).forEach((function(e){t.stats.achieve[e]&&(r+=t.stats.achieve[e].l>5?5:t.stats.achieve[e].l,t.stats.achieve[e][a]&&(s+=t.stats.achieve[e][a]>5?5:t.stats.achieve[e][a]))})),{aLvl:r,uLvl:s}}function Xc(e){switch(e=e||t.race.universe){case"evil":return"e";case"antimatter":return"a";case"heavy":return"h";case"micro":return"m";case"magic":return"mg";default:return"l"}}function eo(e,a,r,s){if("micro"!==t.race.universe&&!0===a)return!1;t.settings.msgFilters.achievements.unlocked||(t.settings.msgFilters.achievements.unlocked=!0,t.settings.msgFilters.achievements.vis=!0);let i=so(),c=!1,o=!1;(void 0===r||r>i)&&(r=i);let n=!0;if(void 0===t.stats.achieve[e]&&(t.stats.achieve[e]={l:0},n=!1),("micro"===t.race.universe&&!0===a||"micro"!==t.race.universe&&!0!==a)&&t.stats.achieve[e]&&t.stats.achieve[e].ls)&&(r=s),!t.stats.feat[e]||t.stats.feat[e]&&t.stats.feat[e]5?5:t.stats.achieve[e].l,t.stats.achieve[e][o]&&(c+=t.stats.achieve[e][o]>5?5:t.stats.achieve[e][o]);let s=Oc(e,16,l,n);n&&t.stats.achieve[e].l>1||!n?a.append($(`
              ${Vc[e].name}${Vc[e].desc}${s}
              `)):n&&1===t.stats.achieve[e].l&&r--}})),n&&!t.stats.feat.fool){let e=$(`
              ${Jc.fool.name}${z("feat_fool_spoof")}
              `);a.append(e)}else Object.keys(Jc).forEach((function(e){let r=wc(e,"feat");if(t.stats.feat[e]){let s=t.stats.feat[e]>1?`

              ${yc(r)}

              `:"";if("easter"===e){let e=xc(4,14);e.length>0&&(s=e)}a.append($(`
              ${Jc[e].name}${Jc[e].desc}${s}
              `))}}));let l=qc(5,12,!1);a.prepend(`
              ${z("achieve_draw_achieve_earned",[r,s])}${l}
              `),ic({el:"#achievePanel",methods:{flair:e=>Vc[e].flair,feat:e=>Jc[e].flair}}),n&&!t.stats.feat.fool&&$("#thefool").on("mouseover",(function(){"micro"===t.race.universe?to("fool",!0):to("fool"),ao()}))}function ro(){let e=so();$("#topBar span.flair")&&sc($("#topBar span.flair"),!0);let a=xc(1,14);if(a.length>0&&$("#topBar .planet").after($(a)),e>1&&0===$("#topBar .planet .flair").length){if(0===a.length){let t=wc("topbar","challenge");$("#topBar .planet").after(`${yc(t)}`)}let r="";t.race.no_plasmid&&(r+=`
              ${z("evo_challenge_plasmid")}
              `),t.race.weak_mastery&&(r+=`
              ${z("evo_challenge_mastery")}
              `),t.race.no_trade&&(r+=`
              ${z("evo_challenge_trade")}
              `),t.race.no_craft&&(r+=`
              ${z("evo_challenge_craft")}
              `),t.race.no_crispr&&(r+=`
              ${z("evo_challenge_crispr")}
              `),t.race.nerfed&&(r+=`
              ${z("evo_challenge_nerfed")}
              `),t.race.badgenes&&(r+=`
              ${z("evo_challenge_badgenes")}
              `),r.length>0&&$("#topBar .planetWrap .flair").append($(`
              Active Challenge Genes
              ${r}
              `)),Ei("topbarPlanet",(function(e){let t=$('
              ');e.popper.append(t),t.append($(r))}),{elm:"#topBar .planetWrap .flair",classes:"has-background-light has-text-dark"})}}function so(){let e=1;return t.race.no_plasmid&&e++,t.race.no_trade&&e++,t.race.no_craft&&e++,t.race.no_crispr&&e++,t.race.weak_mastery&&e++,t.race.nerfed&&e++,t.race.badgenes&&e++,e>5&&(e=5),e}function io(){let e=so();for(let a=e;a>=0;a--)co("extinct_","mass_extinction",25,a),"evil"===t.race.universe&&oo("extinct_","vigilante",12,a),co("genus_","creator",9,a),co("biome_","explorer",6,a),"heavy"===t.race.universe&&oo("genus_","heavyweight",8,a);if(t.tech.supercollider&&t.tech.supercollider>=99&&eo("blackhole"),t.stats.starved>=100&&eo("mass_starvation"),Math.round(Math.log2(t.civic.garrison.protest+t.civic.garrison.fatigue))>=8&&eo("warmonger"),t.stats.died>=250&&eo("red_tactics"),t.interstellar.stellar_engine&&t.interstellar.stellar_engine.mass>=12&&eo("landfill"),t.interstellar.stellar_engine&&t.interstellar.stellar_engine.mass>=100&&to("supermassive"),t.tech.piracy&&t.tech.chthonian&&t.tech.chthonian>=2&&t.galaxy&&1===It("gxy_stargate")&&1===It("gxy_gateway")&&1===It("gxy_gorddon")&&1===It("gxy_alien1")&&1===It("gxy_alien2")&&1===It("gxy_chthonian")&&eo("neutralized"),Ec("summer")&&t.resource.hasOwnProperty("Thermite")){let e=1e5+9e3*t.stats.reset;e>1e6&&(e=1e6),t.resource.Thermite.amount>e&&to("solstice","micro"===t.race.universe)}if(Ec("firework")&&t[t.race.cataclysm||t.race.orbit_decayed?"space":"city"].firework.on>0&&to("firework","micro"===t.race.universe),t.city.morale.current>=200&&(eo("paradise"),t.city.morale.current>=500&&to("utopia")),t.resource.hasOwnProperty("Money")&&t.resource.Money.amount>=1e9&&eo("scrooge"),t.resource.hasOwnProperty("Money")&&t.race.inflation&&t.resource.Money.amount>=25e10&&eo("wheelbarrow"),t.civic.hasOwnProperty("govern")&&t.galaxy.hasOwnProperty("trade")&&t.city.hasOwnProperty("market")&&t.galaxy.trade.cur>=50&&t.city.market.trade>=750&&"federation"===t.civic.govern.type&&eo("trade"),t.tech.pillars){let e={},a=0,r=5;if(Object.keys(t.pillars).forEach((function(s){_i[s]&&((!e[_i[s].type]||t.pillars[s]>e[_i[s].type])&&(e[_i[s].type]=t.pillars[s]),t.pillars[s]=Object.keys(ui).length){let t=5;Object.keys(e).forEach((function(a){e[a]=Object.keys(_i).length-1&&eo("resonance"),a>=50&&to("equilibrium",!1,r)}if(t.portal.hasOwnProperty("mechbay")&&t.tech.hasOwnProperty("hell_spire")&&t.tech.hell_spire>=9){let e=Object.keys(ja).length,a={};Object.keys(t.stats.spire).forEach((function(r){let s={};Object.keys(t.stats.spire[r]).forEach((function(e){ja[e]&&((!a.hasOwnProperty(e)||a[e]0&&(s[e]=t.stats.spire[r][e]))})),Object.keys(s).length===e&&eo("gladiator",!1,Math.min(...Object.values(s)),r)})),Object.keys(a).length===e&&eo("gladiator",!1,Math.min(...Object.values(a)),"l")}if(t.race.banana){let e=Xc();t.tech.hasOwnProperty("monuments")&&t.tech.monuments>=50&&(t.stats.banana.b5[e]=!0,"m"!==e&&"l"!==e&&(t.stats.banana.b5.l=!0));let a=0,r=0;["b1","b2","b3","b4","b5"].forEach((function(s){t.stats.banana[s].l&&a++,"l"!==e&&t.stats.banana[s][e]&&r++})),a>0&&eo("banana",!1,a,"l"),r>0&&"l"!==e&&eo("banana",!1,r,e),t.interstellar.hasOwnProperty("stellar_engine")&&t.interstellar.stellar_engine.mass>=12&&0===t.interstellar.stellar_engine.exotic&&(t.stats.banana.b3[e]=!0,"m"!==e&&"l"!==e&&(t.stats.banana.b3.l=!0))}["l",Xc()].forEach((function(e){let a=0;["ashanddust","exodus","obsolete","bluepill","retired"].forEach((function(r){t.stats.achieve[r]&&t.stats.achieve[r][e]&&t.stats.achieve[r][e]>=5&&a++})),a>0&&eo("pathfinder",!1,a,e)}));const a=new Date;let r=Ec("easter"),s=Ec("halloween"),i=a.getFullYear();if(!t.settings.boring&&13===a.getDate()&&5===a.getDay()&&t.resource[t.race.species].amount>=1){let e=!1;e=to("friday","micro"===t.race.universe),e&&t.resource[t.race.species].amount--}else if(t.settings.boring||1!==a.getMonth()||14!==a.getDate())if(t.settings.boring||2!==a.getMonth()||17!==a.getDate())if(r.active){to("easter","micro"===t.race.universe);let e=0;for(let a=1;a<=18;a++)t.special.egg[i][`egg${a}`]&&e++;e>=12&&to("egghunt","micro"===t.race.universe)}else if(Ec("launch_day"))to("launch_day","micro"===t.race.universe);else if(s.active){let e=0;for(let a=1;a<=7;a++)t.special.trick[i][`trick${a}`]&&e++;for(let a=1;a<=7;a++)t.special.trick[i][`treat${a}`]&&e++;e>=12&&to("trickortreat","micro"===t.race.universe),9===a.getMonth()&&31===a.getDate()&&to("halloween","micro"===t.race.universe)}else!t.settings.boring&&10===a.getMonth()&&a.getDate()>=22&&a.getDate()<=28?to("thanksgiving","micro"===t.race.universe):t.settings.boring||11!==a.getMonth()||25!=a.getDate()||to("xmas","micro"===t.race.universe);else to("leprechaun","micro"===t.race.universe);else to("valentine","micro"===t.race.universe);!t.settings.boring&&3===a.getMonth()&&a.getDate()>=1&&a.getDate()<=3&&t.stats.feat.hasOwnProperty("fool")&&t.stats.feat.fool>0&&to("fool","micro"===t.race.universe),t.stats.dkills>=666e6&&to("demon_slayer");for(let a=e;a>=1;a--){let e=0;const r=Object.keys(Vc);for(const s of r)t.stats.achieve[s]&&t.stats.achieve[s].l>=a&&e++;let s=[{c:10,f:"novice"},{c:25,f:"journeyman"},{c:50,f:"adept"},{c:75,f:"master"},{c:100,f:"grandmaster"}];for(let r=0;r<5;r++)e>=s[r].c&&(!t.stats.feat[s[r].f]||t.stats.feat[s[r].f]=s&&i++;if(i>=r&&(eo(a,!1,s),"standard"!==t.race.universe))switch(t.race.universe){case"evil":t.stats.achieve[a].e=void 0;break;case"antimatter":t.stats.achieve[a].a=void 0;break;case"heavy":t.stats.achieve[a].h=void 0;break;case"micro":t.stats.achieve[a].m=void 0;break;case"magic":t.stats.achieve[a].mg=void 0}}"standard"!==t.race.universe&&oo(e,a,r,s)}function oo(e,a,r,s){let i=!1;switch(t.race.universe){case"evil":(void 0===t.stats.achieve[a]||void 0===t.stats.achieve[a].e||t.stats.achieve[a].e=s&&i++;break;case"antimatter":t.stats.achieve[a]&&t.stats.achieve[a].a&&t.stats.achieve[a].a>=s&&i++;break;case"heavy":t.stats.achieve[a]&&t.stats.achieve[a].h&&t.stats.achieve[a].h>=s&&i++;break;case"micro":t.stats.achieve[a]&&t.stats.achieve[a].m&&t.stats.achieve[a].m>=s&&i++;break;case"magic":t.stats.achieve[a]&&t.stats.achieve[a].mg&&t.stats.achieve[a].mg>=s&&i++}i>=r&&eo(a,!1,s)}}const no={mastery:{name:z("mastery"),desc(){let e="";return Object.keys(aa).forEach((function(a){let r=_c(a,!0);"standard"===a?e+=`${aa[a].name}: ${z("perks_mastery_general",[`${+r.g.toFixed(2)}%`])}`:t.stats.achieve.whitehole&&(e+=`${aa[a].name}: ${z("perks_mastery_general",[`${+r.g.toFixed(2)}%`])}, ${z("perks_mastery_universe",[`${+r.u.toFixed(2)}%`])}`)})),e},active:()=>!!(t.genes.challenge&&t.genes.challenge>=2),notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_unlocked_title")}`])]},blackhole:{name:z("achieve_blackhole_name"),desc:e=>z("achieve_perks_blackhole",[e?"5/10/15/20/25":t.stats.achieve.blackhole?5*t.stats.achieve.blackhole.l:5]),active:()=>!!(t.stats.achieve.blackhole&&t.stats.achieve.blackhole.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_blackhole_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_blackhole_name")}`])]},trade:{name:z("achieve_trade_name"),desc:e=>z("achieve_perks_trade",[e?"2/4/6/8/10":t.stats.achieve.trade?2*t.stats.achieve.trade.l:2,e?"1/2/3/4/5":t.stats.achieve.trade?t.stats.achieve.trade.l:1]),active:()=>!!(t.stats.achieve.trade&&t.stats.achieve.trade.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_trade_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_trade_name")}`])]},creator:{name:z("achieve_creator_name"),desc:e=>z("achieve_perks_creator",[e?"1.5/2/2.5/3/3.5":1+(t.stats.achieve.creator?.5*t.stats.achieve.creator.l:.5)]),active:()=>!!(t.stats.achieve.creator&&t.stats.achieve.creator.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_creator_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_creator_name")}`])]},mass_extinction:{name:z("achieve_mass_extinction_name"),group:[{desc:()=>z("achieve_perks_mass_extinction"),active:()=>!!(t.stats.achieve.mass_extinction&&t.stats.achieve.mass_extinction.l>=1)},{desc(e){let a=t.stats.achieve.mass_extinction?t.stats.achieve.mass_extinction.l:1;return z("achieve_perks_mass_extinction2",[e?"0/50/100/150/200":50*(a-1)])},active:()=>!!(t.stats.achieve.mass_extinction&&t.stats.achieve.mass_extinction.l>1)}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_mass_extinction_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_mass_extinction_name")}`])]},doomed:{name:z("achieve_doomed_name"),desc:e=>z("achieve_perks_doomed"),active:()=>t.stats.portals>=1,notes:[z("wiki_perks_achievement_note",[`${z("achieve_doomed_name")}`])]},explorer:{name:z("achieve_explorer_name"),desc:e=>z("achieve_perks_explorer",[e?"1/2/3/4/5":t.stats.achieve.explorer?t.stats.achieve.explorer.l:1]),active:()=>!!(t.stats.achieve.explorer&&t.stats.achieve.explorer.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_explorer_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_explorer_name")}`])]},miners_dream:{name:z("achieve_miners_dream_name"),desc:e=>z("achieve_perks_miners_dream",[e?"1/2/3/5/7":t.stats.achieve.miners_dream?t.stats.achieve.miners_dream.l>=4?2*t.stats.achieve.miners_dream.l-3:t.stats.achieve.miners_dream.l:0]),active:()=>!!(t.stats.achieve.miners_dream&&t.stats.achieve.miners_dream.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_miners_dream_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_miners_dream_name")}`])]},extinct_junker:{name:z("achieve_extinct_junker_name"),desc:()=>z("achieve_perks_enlightened"),active:()=>!!(t.stats.achieve.extinct_junker&&t.stats.achieve.extinct_junker.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_extinct_junker_name")}`])]},joyless:{name:z("achieve_joyless_name"),desc:e=>z("achieve_perks_joyless",[e?"2/4/6/8/10":t.stats.achieve.joyless?2*t.stats.achieve.joyless.l:2]),active:()=>!!(t.stats.achieve.joyless&&t.stats.achieve.joyless.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_joyless_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_joyless_name")}`])]},steelen:{name:z("achieve_steelen_name"),desc:e=>z("achieve_perks_steelen",[e?"2/4/6/8/10":t.stats.achieve.steelen?2*t.stats.achieve.steelen.l:2]),active:()=>!!(t.stats.achieve.steelen&&t.stats.achieve.steelen.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_steelen_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_steelen_name")}`])]},wheelbarrow:{name:z("achieve_wheelbarrow_name"),desc:e=>z("achieve_perks_wheelbarrow",[e?"2/4/6/8/10":t.stats.achieve.wheelbarrow?2*t.stats.achieve.wheelbarrow.l:2]),active:()=>!!(t.stats.achieve.wheelbarrow&&t.stats.achieve.wheelbarrow.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_wheelbarrow_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_wheelbarrow_name")}`])]},extinct_sludge:{name:z("achieve_extinct_sludge_name"),group:[{desc:e=>z("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.l:3,z("universe_standard")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.l>=1)},{desc:e=>z("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.h:3,z("universe_heavy")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.h>=1)},{desc:e=>z("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.a:3,z("universe_antimatter")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.a>=1)},{desc:e=>z("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.e:3,z("universe_evil")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.e>=1)},{desc:e=>z("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.m:3,z("universe_micro")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.m>=1)},{desc:e=>z("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.mg:3,z("universe_magic")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.mg>=1)}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_extinct_sludge_name")}`]),z("wiki_perks_achievement_note_universe_scale",[`${z("achieve_extinct_sludge_name")}`])]},whitehole:{name:z("achieve_whitehole_name"),group:[{desc:()=>z("achieve_perks_whitehole"),active:()=>!!t.stats.achieve.whitehole},{desc:e=>z("achieve_perks_whitehole2",[e?"5/10/15/20/25":t.stats.achieve.whitehole?5*t.stats.achieve.whitehole.l:5]),active:()=>!!t.stats.achieve.whitehole},{desc:e=>z("achieve_perks_whitehole3",[e?"1/2/3/4/5":t.stats.achieve.whitehole?t.stats.achieve.whitehole.l:1]),active:()=>!!t.stats.achieve.whitehole}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_whitehole_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_whitehole_name")}`])]},heavyweight:{name:z("achieve_heavyweight_name"),desc:e=>z("achieve_perks_heavyweight",[e?"4/8/12/16/20":t.stats.achieve.heavyweight?4*t.stats.achieve.heavyweight.l:4]),active:()=>!!t.stats.achieve.heavyweight,notes:[z("wiki_perks_achievement_note",[`${z("achieve_heavyweight_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_heavyweight_name")}`])]},dissipated:{name:z("achieve_dissipated_name"),group:[{desc:()=>z("achieve_perks_dissipated1",[1]),active:()=>!!(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=1)},{desc:e=>z("achieve_perks_dissipated2",[e?"1/2":t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=5?2:1]),active:()=>!!(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=3)},{desc:()=>z("achieve_perks_dissipated3",[1]),active:()=>!!(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=2)},{desc:()=>z("achieve_perks_dissipated4",[1]),active:()=>!!(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=4)}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_dissipated_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_dissipated_name")}`])]},banana:{name:z("achieve_banana_name"),group:[{desc:()=>z("achieve_perks_banana1",[50]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=1)},{desc:()=>z("achieve_perks_banana2",[1]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=2)},{desc:()=>z("achieve_perks_banana3",[10]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=3)},{desc:()=>z("achieve_perks_banana4",[3]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=4)},{desc:()=>z("achieve_perks_banana5",[.01]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=5)}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_banana_name")}`]),z("wiki_perks_achievement_note_task",[`${z("achieve_banana_name")}`]),z("wiki_perks_achievement_note_task_num",[1,`${z("wiki_achieve_banana1")}`]),z("wiki_perks_achievement_note_task_num",[2,`${z("wiki_achieve_banana2")}`]),z("wiki_perks_achievement_note_task_num",[3,`${z("wiki_achieve_banana3")}`]),z("wiki_perks_achievement_note_task_num",[4,`${z("wiki_achieve_banana4",[500])}`]),z("wiki_perks_achievement_note_task_num",[5,`${z("wiki_achieve_banana5",[50])}`])]},anarchist:{name:z("achieve_anarchist_name"),desc:e=>z("achieve_perks_anarchist",[e?"10/20/30/40/50":t.stats.achieve.anarchist?10*t.stats.achieve.anarchist.l:10]),active:()=>!!(t.stats.achieve.anarchist&&t.stats.achieve.anarchist.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_anarchist_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_anarchist_name")}`])]},ascended:{name:z("achieve_ascended_name"),group:[{desc(e){let a;if(e)a="1-30";else if(a=0,t.stats.achieve.ascended)for(let e=0;e!!(t.stats.achieve.ascended&&t.stats.achieve.ascended.l>=1)},{desc:()=>z("achieve_perks_ascended2",[tc()]),active:()=>!!(t.stats.achieve.ascended&&t.stats.achieve.ascended[Xc()]>=1)}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_ascended_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_ascended_name")}`]),z("wiki_perks_achievement_note_universe",[`${z("achieve_ascended_name")}`])]},technophobe:{name:z("achieve_technophobe_name"),group:[{desc:()=>z("achieve_perks_technophobe1",[25]),active:()=>!!(t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=1)},{desc(e){let a;if(e)a="10/25/30/35/40/45/50";else{a=t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=4?25:10;for(let e=1;e=5&&(a+=5)}return z("achieve_perks_technophobe2",[a])},active:()=>!!(t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=2)},{desc(e){let a;if(e)a="1/2/3/4/5/6";else{a=1;for(let e=1;e=5&&(a+=1)}return z(e||a>1?"achieve_perks_technophobe3a":"achieve_perks_technophobe3",[a])},active:()=>!!(t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=3)},{desc:()=>z("achieve_perks_technophobe4",[10]),active:()=>!!(t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=5)},{desc:e=>z("achieve_perks_technophobe5",[e?"1/2/3/4/5":t.stats.achieve.technophobe?t.stats.achieve.technophobe.l:0]),active:()=>!!(t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=1)}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_technophobe_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_technophobe_name")}`]),z("wiki_perks_achievement_note_universe",[`${z("achieve_technophobe_name")}`])]},iron_will:{name:z("achieve_iron_will_name"),group:[{desc:()=>z("achieve_perks_iron_will1",[.15]),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=1)},{desc:()=>z("achieve_perks_iron_will2",[10]),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=2)},{desc:()=>z("achieve_perks_iron_will3",[6]),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=3)},{desc:()=>z("achieve_perks_iron_will4",[1]),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=4)},{desc:()=>z("achieve_perks_iron_will5"),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=5)}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_iron_will_name")}`]),z("wiki_perks_achievement_note_ironwill",[`${z("evo_challenge_cataclysm")}`]),z("wiki_perks_achievement_note_ironwill2",[1,`${z("space_red_ziggurat_title")}`]),z("wiki_perks_achievement_note_ironwill3",[2,`${z("tech_elerium_mining")}`]),z("wiki_perks_achievement_note_ironwill3",[3,`${z("tech_lasers")}`]),z("wiki_perks_achievement_note_ironwill3",[4,`${z("tech_generational_ship")}`]),z("wiki_perks_achievement_note_ironwill4",[5,`${z("wiki_resets_bioseed")}`])]},failed_history:{name:z("achieve_failed_history_name"),desc:()=>z("achieve_perks_failed_history",[2]),active:()=>!!(t.stats.achieve.failed_history&&t.stats.achieve.failed_history.l>=5),notes:[z("wiki_perks_achievement_note",[`${z("achieve_failed_history_name")}`]),z("wiki_perks_achievement_note_failed_history",[`${z("evo_challenge_cataclysm")}`])]},lamentis:{name:z("achieve_lamentis_name"),group:[{desc:()=>z("achieve_perks_lamentis1",["10%"]),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=1)},{desc:()=>z("achieve_perks_lamentis2",["10%"]),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=2)},{desc:()=>z("achieve_perks_lamentis3",["10%"]),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=3)},{desc:()=>z("achieve_perks_lamentis4"),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=4)},{desc:()=>z("achieve_perks_lamentis5"),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=5)}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_lamentis_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_lamentis_name")}`])]},soul_sponge:{name:z("achieve_soul_sponge_name"),desc:e=>z("achieve_perks_soul_sponge",[e?"100/200/300/400/500":t.stats.achieve.soul_sponge?100*t.stats.achieve.soul_sponge.mg:100]),active:()=>!!(t.stats.achieve.soul_sponge&&t.stats.achieve.soul_sponge.mg>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_soul_sponge_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_soul_sponge_name")}`])]},nightmare:{name:z("achieve_nightmare_name"),desc:()=>z("achieve_perks_nightmare"),active:()=>!!(t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_nightmare_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_nightmare_name")}`])]},gladiator:{name:z("achieve_gladiator_name"),desc:e=>z("achieve_perks_gladiator",[e?"20/40/60/80/100":t.stats.achieve.gladiator?20*t.stats.achieve.gladiator.l:20]),active:()=>!!(t.stats.achieve.gladiator&&t.stats.achieve.gladiator.l>=1),notes:[z("wiki_perks_achievement_note",[`${z("achieve_gladiator_name")}`]),z("wiki_perks_achievement_note_scale",[`${z("achieve_gladiator_name")}`])]},pathfinder:{name:z("achieve_pathfinder_name"),group:[{desc:()=>z("achieve_perks_pathfinder1",[10]),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=1)},{desc:()=>z("achieve_perks_pathfinder2",[10]),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=2)},{desc:()=>z("achieve_perks_pathfinder3"),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=3)},{desc:()=>z("achieve_perks_pathfinder4"),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=4)},{desc:()=>z("achieve_perks_pathfinder5"),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=5)}],notes:[z("wiki_perks_achievement_note",[`${z("achieve_pathfinder_name")}`]),z("wiki_perks_achievement_note_pathfinder",[`${z("evo_challenge_truepath")}`]),z("wiki_perks_achievement_note_pathfinder_reset",[`${z("wiki_resets_mad")}`]),z("wiki_perks_achievement_note_pathfinder_reset",[`${z("wiki_resets_bioseed")}`]),z("wiki_perks_achievement_note_pathfinder_reset",[`${z("wiki_resets_ai")}`]),z("wiki_perks_achievement_note_pathfinder_reset",[`${z("wiki_resets_matrix")}`]),z("wiki_perks_achievement_note_pathfinder_reset",[`${z("wiki_resets_retired")}`])]},overlord:{name:z("achieve_overlord_name"),desc(){let e=`
              ${z("achieve_perks_overlord1",[10])}
              `;return e+=`
              ${z("achieve_perks_overlord2")}
              `,e+=`
              ${z("achieve_perks_overlord3")}
              `,e+=`
              ${z("achieve_perks_overlord4")}
              `,e},active:()=>!!(t.stats.achieve.overlord&&t.stats.achieve.overlord.l>=5),notes:[z("wiki_perks_achievement_note",[`${z("achieve_overlord_name")}`])]},adam_eve:{name:z("achieve_adam_eve_name"),desc:()=>z("achieve_perks_adam_eve"),active:()=>!!(t.stats.achieve.adam_eve&&t.stats.achieve.adam_eve.l>=5),notes:[]},creep:{name:z("wiki_arpa_crispr_creep"),desc:e=>z("arpa_perks_creep",[e?"0.01/0.02/0.03/0.04/0.05":t.genes.creep?.01*t.genes.creep:0]),active:()=>!!t.genes.creep,notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_genetic_memory_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_animus_title")}`,`${z("arpa_genepool_divine_remembrance_title")}`,`${z("arpa_genepool_divine_proportion_title")}`,`${z("arpa_genepool_genetic_repository_title")}`].join(", ")])]},store:{name:z("wiki_arpa_crispr_store"),desc(e){let a=e?"0.04/0.06/0.08":t.genes.store&&t.genes.store>1?2===t.genes.store?.06:.08:.04;return z(t.genes.store&&t.genes.store>=4?"arpa_perks_store2":"arpa_perks_store1",[a])},active:()=>!!t.genes.store,notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_spatial_reasoning_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_spatial_superiority_title")}`,`${z("arpa_genepool_spatial_supremacy_title")}`,`${z("arpa_genepool_dimensional_warping_title")}`].join(", ")])]},evolve:{name:z("wiki_arpa_crispr_evolve"),group:[{desc:()=>z("arpa_perks_evolve"),active:()=>!!t.genes.evolve},{desc:()=>z("arpa_genepool_recombination_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=2)},{desc:()=>z("arpa_genepool_homologous_recombination_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=3)},{desc:()=>z("arpa_genepool_genetic_reshuffling_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=4)},{desc:()=>z("arpa_genepool_recombinant_dna_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=5)},{desc:()=>z("arpa_genepool_chimeric_dna_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=6)},{desc:()=>z("arpa_genepool_molecular_cloning_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=7)},{desc:()=>z("arpa_genepool_transgenes_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=8)}],notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_morphogenesis_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_recombination_title")}`,`${z("arpa_genepool_homologous_recombination_title")}`,`${z("arpa_genepool_genetic_reshuffling_title")}`,`${z("arpa_genepool_recombinant_dna_title")}`,`${z("arpa_genepool_chimeric_dna_title")}`,`${z("arpa_genepool_molecular_cloning_title")}`,`${z("arpa_genepool_transgenes_title")}`].join(", ")])]},birth:{name:z("wiki_arpa_crispr_birth"),desc:()=>z("arpa_perks_birth"),active:()=>!!t.genes.birth,notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_replication_title")}`])]},enhance:{name:z("wiki_arpa_crispr_enhance"),desc:()=>z("arpa_perks_enhance"),active:()=>!!t.genes.enhance,notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_enhanced_muscle_fiber_title")}`])]},crafty:{name:z("wiki_arpa_crispr_crafty"),group:[{desc:()=>z("arpa_genepool_artificer_desc"),active:()=>!!t.genes.crafty},{desc:e=>z("arpa_genepool_crafting_desc",[e?"50/100":t.genes.crafty&&t.genes.crafty>=3?100:50]),active:()=>!!(t.genes.crafty&&t.genes.crafty>=2)}],notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_artificer_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_detail_oriented_title")}`,`${z("arpa_genepool_rigorous_title")}`].join(", ")])]},governor:{name:z("wiki_arpa_crispr_governor"),desc:()=>z("arpa_perks_governor"),active:()=>!!t.genes.governor,notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_governance_title")}`])]},synthesis:{name:z("wiki_arpa_crispr_synthesis"),desc:e=>z("arpa_genepool_synthesis_desc",[e?"2/3/4":t.genes.synthesis&&t.genes.synthesis>=2?t.genes.synthesis>=3?4:3:2,e?"10/25/50":t.genes.synthesis&&t.genes.synthesis>=2?t.genes.synthesis>=3?50:25:10]),active:()=>!!t.genes.synthesis,notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_synthesis_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_karyokinesis_title")}`,`${z("arpa_genepool_cytokinesis_title")}`].join(", ")])]},challenge:{name:z("wiki_arpa_crispr_challenge"),group:[{desc:()=>z("arpa_perks_challenge"),active:()=>!!t.genes.challenge},{desc:()=>z("arpa_genepool_unlocked_desc"),active:()=>!!(t.genes.challenge&&t.genes.challenge>=2)},{desc:e=>z("arpa_perks_challenge2",[e?"60/80":t.genes.challenge&&t.genes.challenge>=4?80:60,e?"60/40":t.genes.challenge&&t.genes.challenge>=4?40:60]),active:()=>!!(t.genes.challenge&&t.genes.challenge>=3)},{desc:()=>z("arpa_perks_challenge3"),active:()=>!!(t.genes.challenge&&t.genes.challenge>=5)}],notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_hardened_genes_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_unlocked_title")}`,`${z("arpa_genepool_universal_title")}`,`${z("arpa_genepool_standard_title")}`,`${z("arpa_genepool_mastered_title")}`].join(", ")]),z("wiki_perks_crispr_note_challenge",[z("arpa_genepool_universal_title"),z("arpa_genepool_standard_title")])]},ancients:{name:z("wiki_arpa_crispr_ancients"),group:[{desc:()=>z("arpa_perks_ancients"),active:()=>!!t.genes.ancients},{desc:()=>t.genes.ancients&&t.genes.ancients>=4?z("arpa_perks_ancients3"):z("arpa_perks_ancients2"),active:()=>!!(t.genes.ancients&&t.genes.ancients>=2)},{desc:e=>z("arpa_perks_ancients4",[e?"25/50":t.genes.ancients&&t.genes.ancients>=5?50:25]),active:()=>!!(t.genes.ancients&&t.genes.ancients>=3)}],notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_ancients_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_faith_title")}`,`${z("arpa_genepool_devotion_title")}`,`${z("arpa_genepool_acolyte_title")}`,`${z("arpa_genepool_conviction_title")}`].join(", ")])]},trader:{name:z("wiki_arpa_crispr_trader"),desc:()=>z("arpa_genepool_negotiator_desc"),active:()=>!!t.genes.trader,notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_negotiator_title")}`])]},transcendence:{name:z("wiki_arpa_crispr_transcendence"),desc:()=>z("arpa_genepool_transcendence_desc"),active:()=>!!t.genes.transcendence,notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_transcendence_title")}`])]},queue:{name:z("wiki_arpa_crispr_queue"),group:[{desc:()=>z("arpa_genepool_geographer_desc"),active:()=>!!t.genes.queue},{desc:()=>z("arpa_genepool_architect_desc"),active:()=>!!(t.genes.queue&&t.genes.queue>=2)}],notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_geographer_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_architect_title")}`].join(", ")])]},plasma:{name:z("wiki_arpa_crispr_plasma"),desc:e=>z("arpa_genepool_mitosis_desc",[e?"3/5":t.genes.plasma>=2?5:3]),active:()=>!!t.genes.plasma,notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_mitosis_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_metaphase_title")}`].join(", ")])]},mutation:{name:z("wiki_arpa_crispr_mutation"),group:[{desc:()=>t.genes.mutation&&t.genes.mutation>1?z("arpa_perks_mutation2"):z("arpa_perks_mutation1"),active:()=>!!t.genes.mutation},{desc:()=>z("arpa_perks_mutation3"),active:()=>!!(t.genes.mutation&&t.genes.mutation>=3)}],notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_mutation_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_transformation_title")}`,`${z("arpa_genepool_metamorphosis_title")}`].join(", ")])]},bleed:{name:z("wiki_arpa_crispr_bleed"),group:[{desc:()=>z("arpa_genepool_bleeding_effect_desc",[2.5]),active:()=>!!t.genes.bleed},{desc:()=>z("arpa_genepool_synchronicity_desc",[25]),active:()=>!!(t.genes.bleed&&t.genes.bleed>=2)},{desc:()=>z("arpa_genepool_astral_awareness_desc"),active:()=>!!(t.genes.bleed&&t.genes.bleed>=3)}],notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_bleeding_effect_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_synchronicity_title")}`,`${z("arpa_genepool_astral_awareness_title")}`].join(", ")]),z("wiki_perks_crispr_note_bleed",[`${z("arpa_genepool_bleeding_effect_title")}`])]},blood:{name:z("wiki_arpa_crispr_blood"),group:[{desc:()=>z("arpa_genepool_blood_remembrance_desc"),active:()=>!!t.genes.blood},{desc:()=>z("arpa_genepool_blood_sacrifice_desc"),active:()=>!!(t.genes.blood&&t.genes.blood>=2)},{desc:()=>z("arpa_genepool_essence_absorber_desc"),active:()=>!!(t.genes.blood&&t.genes.blood>=3)}],notes:[z("wiki_perks_crispr_note",[`${z("arpa_genepool_blood_remembrance_title")}`]),z("wiki_perks_crispr_note_upgrade",[[`${z("arpa_genepool_blood_sacrifice_title")}`,`${z("arpa_genepool_essence_absorber_title")}`].join(", ")]),z("wiki_perks_crispr_note_blood",[z("arpa_genepool_blood_remembrance_title")])]},spire:{name:z("wiki_arpa_blood_spire"),group:[{desc:()=>z("arpa_blood_purify_desc"),active:()=>!!t.blood.spire},{desc:()=>z("arpa_blood_chum_desc"),active:()=>!!(t.blood.spire&&t.blood.spire>=2)}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_purify_title")}`]),z("wiki_perks_blood_note_upgrade",[[`${z("arpa_blood_chum_title")}`].join(", ")])]},lust:{name:z("wiki_arpa_blood_lust"),group:[{desc:e=>z("arpa_perks_lust",[e?.2:.2*(t.blood.lust?t.blood.lust:1)]),active:()=>!!t.blood.lust}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_lust_title")}`]),z("wiki_perks_blood_note_repeat",[z("arpa_blood_lust_title")])]},illuminate:{name:z("wiki_arpa_blood_illuminate"),group:[{desc:e=>z("arpa_perks_illuminate",[e?.01:.01*(t.blood.illuminate?t.blood.illuminate:1)]),active:()=>!!t.blood.illuminate}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_illuminate_title")}`]),z("wiki_perks_blood_note_repeat",[z("arpa_blood_illuminate_title")])]},greed:{name:z("wiki_arpa_blood_greed"),group:[{desc:e=>z("arpa_perks_greed",[e?1:1*(t.blood.greed?t.blood.greed:1)]),active:()=>!!t.blood.greed}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_greed_title")}`]),z("wiki_perks_blood_note_repeat",[z("arpa_blood_greed_title")])]},hoarder:{name:z("wiki_arpa_blood_hoarder"),group:[{desc:e=>z("arpa_perks_hoarder",[e?1:1*(t.blood.hoarder?t.blood.hoarder:1)]),active:()=>!!t.blood.hoarder}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_hoarder_title")}`]),z("wiki_perks_blood_note_repeat",[z("arpa_blood_hoarder_title")])]},artisan:{name:z("wiki_arpa_blood_artisan"),group:[{desc:e=>z("arpa_perks_artisan",[e?1:1*(t.blood.artisan?t.blood.artisan:1)]),active:()=>!!t.blood.artisan}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_artisan_title")}`]),z("wiki_perks_blood_note_repeat",[z("arpa_blood_artisan_title")])]},attract:{name:z("wiki_arpa_blood_attract"),group:[{desc:e=>z("arpa_perks_attract",[e?5:5*(t.blood.attract?t.blood.attract:1)]),active:()=>!!t.blood.attract}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_attract_title")}`]),z("wiki_perks_blood_note_repeat",[z("arpa_blood_attract_title")])]},wrath:{name:z("wiki_arpa_blood_wrath"),group:[{desc:e=>z("arpa_perks_wrath",[e?5:5*(t.blood.wrath?t.blood.wrath:1)]),active:()=>!!t.blood.wrath}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_wrath_title")}`]),z("wiki_perks_blood_note_repeat",[z("arpa_blood_wrath_title")])]},prepared:{name:z("wiki_arpa_blood_prepared"),group:[{desc:()=>z("arpa_blood_prepared_desc"),active:()=>!!t.blood.prepared},{desc:()=>z("arpa_blood_compact_desc"),active:()=>!!(t.blood.prepared&&t.blood.prepared>=2)}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_prepared_title")}`]),z("wiki_perks_blood_note_upgrade",[[`${z("arpa_blood_compact_title")}`].join(", ")])]},unbound:{name:z("wiki_arpa_blood_unbound"),group:[{desc:()=>z("arpa_blood_unbound_desc"),active:()=>!!t.blood.unbound},{desc:()=>z("arpa_blood_shadow_war_desc"),active:()=>!!(t.blood.unbound&&t.blood.unbound>=3)},{desc:e=>z("arpa_perks_unbound_resist",[e?"10/5":t.blood.unbound&&t.blood.unbound>=4?5:10]),active:()=>!!(t.blood.unbound&&t.blood.unbound>=2)}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_unbound_title")}`]),z("wiki_perks_blood_note_upgrade",[[`${z("arpa_blood_unbound_resistance_title")}`,`${z("arpa_blood_shadow_war_title")}`,`${z("arpa_blood_unbound_immunity_title")}`].join(", ")])]},aware:{name:z("wiki_arpa_blood_aware"),group:[{desc:()=>z("arpa_blood_blood_aware_desc"),active:()=>!!t.blood.aware}],notes:[z("wiki_perks_blood_note",[`${z("arpa_blood_blood_aware_title")}`])]},harmonic:{name:z("harmonic"),group:[{desc(e){let t=pc();return z("perks_harmonic",[e?`1-${Object.keys(_i).length+2}`:+(100*(t[0]-1)).toFixed(0),e?"2-"+2*(Object.keys(_i).length+2):+(100*(t[1]-1)).toFixed(0)])},active(){let e=pc();return!!(t.pillars&&e[0]>1)}},{desc:e=>(pc(),z("perks_harmonic2",[z("portal_west_tower"),z("portal_east_tower"),e?"12-"+12*(Object.keys(_i).length-1):12*Object.keys(t.pillars).length])),active(){let e=pc();return!!(t.pillars&&e[0]>1)}}],notes:[z("wiki_perks_harmonic_note1"),z("wiki_perks_harmonic_note2")]},novice:{name:z("perk_novice"),desc(e){let a=t.stats.feat.novice&&t.stats.achieve.apocalypse&&t.stats.achieve.apocalypse.l>0?Math.min(t.stats.achieve.apocalypse.l,t.stats.feat.novice):1;return`
              ${z("achieve_perks_novice",[e?"0.5/1/1.5/2/2.5":a/2,e?"0.25/0.5/0.75/1/1.25":a/4])}
              ${z("achieve_perks_novice2")}
              `},active:()=>!!(t.stats.feat.novice&&t.stats.mad>0),notes:[z("wiki_perks_progress_note1",[10,z("wiki_resets_mad")]),z("wiki_perks_progress_note2")]},journeyman:{name:z("perk_journeyman"),desc(e){let a=t.stats.feat.journeyman&&t.stats.achieve.seeder&&t.stats.achieve.seeder.l>0?Math.min(t.stats.achieve.seeder.l,t.stats.feat.journeyman):1;return e||a>1?`
              ${z("achieve_perks_journeyman2",[e?"1/2/3":a>=3?a>=5?3:2:1,e?"1/2":a>=4?2:1])}
              ${z("achieve_perks_journeyman3")}
              `:`
              ${z("achieve_perks_journeyman1",[1])}
              ${z("achieve_perks_journeyman3")}
              `},active:()=>!!(t.stats.feat.journeyman&&t.stats.bioseed>0),notes:[z("wiki_perks_progress_note1",[25,z("wiki_resets_bioseed")]),z("wiki_perks_progress_note2")]},adept:{name:z("perk_adept"),desc(e){let a=t.stats.feat.adept&&t.stats.achieve.whitehole&&t.stats.achieve.whitehole.l>0?Math.min(t.stats.achieve.whitehole.l,t.stats.feat.adept):1;return z("achieve_perks_adept",[e?"100/200/300/400/500":100*a,e?"60/120/180/240/300":60*a])},active:()=>!!(t.stats.feat.adept&&t.stats.achieve.whitehole&&t.stats.achieve.whitehole.l>0),notes:[z("wiki_perks_progress_note1",[50,z("wiki_resets_blackhole")]),z("wiki_perks_progress_note2")]},master:{name:z("perk_master"),desc(e){let a=t.stats.feat.master&&t.stats.achieve.ascended&&t.stats.achieve.ascended.l>0?Math.min(t.stats.achieve.ascended.l,t.stats.feat.master):1;return z("achieve_perks_master",[e?"1/2/3/4/5":a,e?"2/4/6/8/10":2*a,z("evo_mitochondria_title"),z("evo_eukaryotic_title"),z("evo_membrane_title"),z("evo_organelles_title"),z("evo_nucleus_title")])},active:()=>!!(t.stats.feat.master&&t.stats.achieve.ascended&&t.stats.achieve.ascended.l>0),notes:[z("wiki_perks_progress_note1",[75,z("wiki_resets_ascension")]),z("wiki_perks_progress_note2")]},grandmaster:{name:z("perk_grandmaster"),desc(e){let a=t.stats.feat.grandmaster&&t.stats.achieve.corrupted&&t.stats.achieve.corrupted.l>0?Math.min(t.stats.achieve.corrupted.l,t.stats.feat.grandmaster):1;return z("achieve_perks_grandmaster",[e?"1/2/3/4/5":a])},active:()=>!!(t.stats.feat.grandmaster&&t.stats.achieve.corrupted&&t.stats.achieve.corrupted.l>0),notes:[z("wiki_perks_progress_note1",[100,z("wiki_resets_infusion")]),z("wiki_perks_progress_note2")]}};function lo(){sc($("#perksPanel"));let e=$("#perksPanel"),t=!1;Object.keys(no).forEach((function(a){if(no[a].hasOwnProperty("group")){let r=!1,s=$(`
              ${no[a].name}
              `);no[a].group.forEach((function(e){e.active()&&(r=!0,s.append($(`
              ${e.desc()}
              `)))})),r&&(t=!0,e.append(s))}else no[a].active()&&(t=!0,e.append($(`
              ${no[a].name}${no[a].desc()}
              `)))})),t||e.append($(`
              ${z("perks_none")}
              `))}const uo={dna_replication:{reqs:{race:"protoplasm",resource:"DNA"},type:"major",effect(){var e=Math.rand(1,Math.round(t.resource.DNA.max/3)),a=t.resource.DNA.amount+e;return a>t.resource.DNA.max&&(a=t.resource.DNA.max),t.resource.DNA.amount=a,z("event_dna",[e.toLocaleString()])}},rna_meteor:{reqs:{race:"protoplasm",resource:"RNA"},type:"major",effect(){var e=Math.rand(1,Math.round(t.resource.RNA.max/2)),a=t.resource.RNA.amount+e;return a>t.resource.RNA.max&&(a=t.resource.RNA.max),t.resource.RNA.amount=a,z("event_rna",[e.toLocaleString()])}},inspiration:{reqs:{resource:"Knowledge"},type:"major",effect:()=>(t.race.inspired=Math.rand(300,600),z("event_inspiration"))},motivation:{reqs:{tech:"primitive"},type:"major",effect:()=>(t.race.motivated=Math.rand(300,600),z("event_motivation"))},fire:{reqs:{resource:"Lumber",nogenus:"aquatic",notrait:"evil"},type:"major",effect(){var e=Math.rand(1,Math.round(t.resource.Lumber.amount/4)),a=t.resource.Lumber.amount-e;return a<0&&(a=0),t.resource.Lumber.amount=a,z("event_fire",[e.toLocaleString()])}},flare:{reqs:{tech:"primitive"},type:"major",condition:()=>!!t.city.ptrait.includes("flare"),effect(){let e=0,a=_i[t.race.species].home;t.race.cataclysm||t.race.orbit_decayed?(t.space.hasOwnProperty("living_quarters")&&(e+=Math.round(c.living_quarters*Zr.space.spc_red.living_quarters.citizens())),a=_i[t.race.species].solar.red):(t.city.hasOwnProperty("basic_housing")&&(e+=t.city.basic_housing.count*Zr.city.basic_housing.citizens()),t.city.hasOwnProperty("cottage")&&(e+=t.city.cottage.count*Zr.city.cottage.citizens()),t.city.hasOwnProperty("apartment")&&(e+=i.apartment*Zr.city.apartment.citizens())),e>t.resource[t.race.species].amount&&(e=t.resource[t.race.species].amount),e=Math.floor(.1*e);let r=Math.rand(0,e);if(t.resource[t.race.species].amount-=r,t.civic[t.civic.d_job].workers-=r,t.civic[t.civic.d_job].workers<0&&(t.civic[t.civic.d_job].workers=0),"oceanic"!==t.city.biome){let e=400;"forest"===t.city.biome?e*=2:"desert"!==t.city.biome&&"volcanic"!==t.city.biome||(e/=2),t.city.firestorm=Math.rand(e,10*e)}return z("oceanic"===t.city.biome?"event_flare2":"event_flare",[a,r.toLocaleString()])}},raid:{reqs:{tech:"military",notech:"world_control"},type:"major",condition:()=>!(de("gov0")&&de("gov1")&&de("gov2")||t.race.truepath||t.race.cataclysm||!(t.civic.foreign.gov0.hstl>60||t.civic.foreign.gov1.hstl>60||t.civic.foreign.gov2.hstl>60)),effect(){let e=qe(Me(),"army",t.civic.garrison.wounded),a=t.tech.high_tech?t.tech.high_tech+1:1,r=Math.rand(25,50)*a,s=t.civic.garrison.wounded>Me()?Me():t.civic.garrison.wounded,i=Math.floor(g(0,s)),c=Math.floor(g(0,Me()-s));if(t.race.instinct&&(i=Math.round(i/2),c=Math.round(c/2)),t.civic.garrison.workers-=i,t.civic.garrison.wounded+=c,t.stats.died+=i,t.civic.garrison.wounded>t.civic.garrison.workers&&(t.civic.garrison.wounded=t.civic.garrison.workers),t.race.blood_thirst&&(t.race.blood_thirst_count+=Math.ceil(r/5),t.race.blood_thirst_count>di.blood_thirst.vars()[0]&&(t.race.blood_thirst_count=di.blood_thirst.vars()[0])),e>r)return z("event_raid1",[i.toLocaleString(),c.toLocaleString()]);{let e=Math.rand(1,Math.round(t.resource.Money.amount/4));if(e<=0)return z("event_raid1",[i.toLocaleString(),c.toLocaleString()]);{let a=t.resource.Money.amount-e;return a<0&&(a=0),t.resource.Money.amount=a,z("event_raid2",[e.toLocaleString(),i.toLocaleString(),c.toLocaleString()])}}}},siege:{reqs:{tech:"military",notech:"world_control"},type:"major",condition:()=>!(de("gov0")||de("gov1")||de("gov2"))&&!t.race.truepath&&t.civic.foreign.gov0.hstl>80&&t.civic.foreign.gov1.hstl>80&&t.civic.foreign.gov2.hstl>80,effect(){let e=qe(Me(),"army",t.civic.garrison.wounded),a=t.tech.high_tech?t.tech.high_tech+1:1,r=(t.civic.foreign.gov0.mil+t.civic.foreign.gov1.mil+t.civic.foreign.gov2.mil)*a,s=t.civic.garrison.wounded>Me()?Me():t.civic.garrison.wounded,i=Math.floor(g(0,s)),c=Math.floor(g(0,Me()-s));if(t.race.instinct&&(i=Math.round(i/2),c=Math.round(c/2)),t.civic.garrison.workers-=i,t.civic.garrison.wounded+=c,t.stats.died+=i,t.civic.garrison.wounded>t.civic.garrison.workers&&(t.civic.garrison.wounded=t.civic.garrison.workers),t.race.blood_thirst&&(t.race.blood_thirst_count+=Math.ceil(r/5),t.race.blood_thirst_count>di.blood_thirst.vars()[0]&&(t.race.blood_thirst_count=di.blood_thirst.vars()[0])),e>r)return z("event_siege1",[i.toLocaleString(),c.toLocaleString()]);var o=Math.rand(1,Math.round(t.resource.Money.amount/2)),n=t.resource.Money.amount-o;return n<0&&(n=0),t.resource.Money.amount=n,z("event_siege2",[o.toLocaleString(),i.toLocaleString(),c.toLocaleString()])}},pillage0:{reqs:{tech:"military",notech:"world_control"},type:"major",condition:()=>!(!t.race.truepath||t.tech.isolation||de("gov0")||!(t.civic.foreign.gov0.hstl>60)),effect:()=>ho("gov0")},pillage1:{reqs:{tech:"military",notech:"world_control"},type:"major",condition:()=>!(!t.race.truepath||t.tech.isolation||de("gov1")||!(t.civic.foreign.gov1.hstl>60)),effect:()=>ho("gov1")},pillage2:{reqs:{tech:"military",notech:"world_control"},type:"major",condition:()=>!(!t.race.truepath||t.tech.isolation||de("gov2")||!(t.civic.foreign.gov2.hstl>60)),effect:()=>ho("gov2")},pillage3:{reqs:{tech:"military"},type:"major",condition:()=>!!(t.race.truepath&&!t.tech.isolation&&t.tech.rival&&t.civic.foreign.gov3.hstl>60),effect:()=>ho("gov3",!0)},witch_hunt_crusade:{reqs:{tech:"magic"},type:"major",condition:()=>!!(t.race.witch_hunter&&t.resource.Sus.amount>=100),effect:()=>ho("witchhunt",!0)},terrorist:{reqs:{tech:"world_control",notrait:"truepath"},type:"major",effect(){let e=Math.floor(g(0,t.civic.garrison.wounded)),a=Math.floor(g(0,t.civic.garrison.workers-t.civic.garrison.wounded));return t.race.instinct&&(e=Math.round(e/2),a=Math.round(a/2)),t.civic.garrison.workers-=e,t.civic.garrison.wounded+=a,t.stats.died+=e,t.civic.garrison.wounded>t.civic.garrison.workers&&(t.civic.garrison.wounded=t.civic.garrison.workers),t.race.blood_thirst&&(t.race.blood_thirst_count+=1e3,t.race.blood_thirst_count>di.blood_thirst.vars()[0]&&(t.race.blood_thirst_count=di.blood_thirst.vars()[0])),0===e?z("event_terrorist1",[a.toLocaleString()]):z("event_terrorist2",[a.toLocaleString(),e.toLocaleString()])}},quake:{reqs:{tech:"wsc",notech:"quaked"},type:"major",condition:()=>!!t.city.ptrait.includes("unstable"),effect:()=>(t.tech.quaked=1,gs(),z("event_quake",[t.race.cataclysm||t.race.orbit_decayed?_i[t.race.species].solar.red:_i[t.race.species].home]))},doom:{reqs:{tech:"wsc",notech:"portal_guard"},type:"major",condition:()=>!!(t.space.space_barracks&&t.space.space_barracks.on>0),effect:()=>(eo("doomed"),t.stats.portals++,z(t.race.evil?"event_doom_alt":"event_doom",[_i[t.race.species].solar.dwarf]))},demon_influx:{reqs:{tech:"portal_guard"},type:"major",effect(){let e=Math.rand(2500,5e3);return t.portal.fortress.threat+=e,z("event_demon_influx",[e.toLocaleString()])}},ruins:{reqs:{trait:"ancient_ruins",resource:"Knowledge"},type:"major",effect(){let e=["Iron","Copper","Steel","Cement"];for(var a=0;at.resource[r].max?t.resource[r].amount=t.resource[r].max:t.resource[r].amount+=e}}return z("event_ruins")}},tax_revolt:{reqs:{low_morale:99,notrait:"blissful",tech:"primitive"},type:"major",condition(){let e="oligarchy"===t.civic.govern.type?45:25,a=D("aristocrat",2);return a&&(e-=a),t.civic.taxes.tax_rate>e},effect:()=>function(){let e=["Soul_Gem","Corrupt_Gem","Codex","Demonic_Essence"],a="oligarchy"===t.civic.govern.type?45:25,r=D("aristocrat",2);r&&(a-=r);let s=.04*(t.civic.taxes.tax_rate-a);return Object.keys(t.resource).forEach((function(a){if(!e.includes(a)){let e=Math.rand(1,Math.round(t.resource[a].amount*s)),r=t.resource[a].amount-e;r<0&&(r=0),t.resource[a].amount=r}})),z("event_tax_revolt")}()},slave_death1:po("major","death1"),slave_death2:po("major","death2"),slave_death3:po("major","death3"),protest:{reqs:{tech:"primitive"},type:"major",condition:()=>"republic"===t.civic.govern.type,effect(){switch(t.civic.govern.protest=Math.rand(30,60),Math.rand(0,10)){case 0:return z("event_protest0",[Ks("small")]);case 1:return z("event_protest1");case 2:return z("event_protest2");case 3:return t.civic.govern.protest=Math.rand(45,75),z("event_protest3");case 4:return z("event_protest4");case 5:return t.civic.govern.protest=Math.rand(45,75),z("event_protest5");case 6:return z("event_protest6");case 7:return z("event_protest7");case 8:return z("event_protest8");case 9:return t.civic.govern.protest=Math.rand(60,90),z("event_protest9")}}},scandal:{reqs:{tech:"govern"},type:"major",condition:()=>!!D("muckraker",0),effect(){switch(t.civic.govern.scandal=Math.rand(15,90),Math.rand(0,10)){case 0:return z("event_scandal0");case 1:return z("event_scandal1");case 2:return z("event_scandal2");case 3:return z("event_scandal3");case 4:return z("event_scandal4");case 5:return z("event_scandal5");case 6:return z("event_scandal6");case 7:return z("event_scandal7");case 8:return z("event_scandal8");case 9:return z("event_scandal9")}}},spy:{reqs:{tech:"primitive",notech:"world_control"},type:"major",condition(){if(t.race.elusive)return!1;if(Oi("satyr")>.25)return!1;for(let e=0;e<3;e++)if(t.civic.foreign[`gov${e}`].spy>0&&!t.civic.foreign[`gov${e}`].occ&&!t.civic.foreign[`gov${e}`].anx&&!t.civic.foreign[`gov${e}`].buy)return!0;return!1},effect(){let e=[];for(let a=0;a<3;a++)t.civic.foreign[`gov${a}`].spy>0&&!t.civic.foreign[`gov${a}`].occ&&!t.civic.foreign[`gov${a}`].anx&&!t.civic.foreign[`gov${a}`].buy&&e.push(a);let a=e[Math.rand(0,e.length)];return t.civic.foreign[`gov${a}`].spy--,0===t.civic.foreign[`gov${a}`].spy&&(t.civic.foreign[`gov${a}`].act="none",t.civic.foreign[`gov${a}`].sab=0),z("event_spy",[te(a)])}},mine_collapse:{reqs:{tech:"mining"},type:"major",condition:()=>t.resource[t.race.species].amount>0&&t.civic.miner.workers>0,effect:()=>(t.resource[t.race.species].amount--,t.civic.miner.workers--,z("event_mine_collapse"))},m_curious:{reqs:{tech:"primitive",trait:"curious"},condition:()=>t.resource[t.race.species].amount>=40,type:"major",effect(){switch(Math.rand(0,5)){case 0:{let e="Money",a=Math.rand(5e4,5e6);switch(Math.rand(0,5)){case 0:t.resource.Steel.display&&(e="Steel",a=Math.rand(100,1e5));break;case 1:t.resource.Bolognium.display&&(e="Bolognium",a=Math.rand(500,5e4));break;case 2:t.resource.Alloy.display&&(e="Alloy",a=Math.rand(250,1e6));break;case 3:t.resource.Adamantite.display&&(e="Adamantite",a=Math.rand(1e3,25e4));break;case 4:t.resource.Soul_Gem.display&&(e="Soul_Gem",a=1)}return t.resource[e].amount+=a,t.resource[e].max>=0&&t.resource[e].amount>t.resource[e].max&&(t.resource[e].amount=t.resource[e].max),z("event_m_curious0","Money"===e?[_i[t.race.species].name,"$",a.toLocaleString()]:[_i[t.race.species].name,a.toLocaleString(),t.resource[e].name])}case 1:return t.resource[t.race.species].amount-=10,t.civic[t.civic.d_job].workers-=10,t.civic[t.civic.d_job].workers<0&&(t.civic[t.civic.d_job].workers=0),z("event_m_curious1",[_i[t.race.species].name]);case 2:return t.race.inspired=Math.rand(600,1200),z("event_m_curious2",[_i[t.race.species].name]);case 3:return t.race.distracted=Math.rand(200,600),z("event_m_curious3",[_i[t.race.species].name]);case 4:return"cath"===t.race.species?(t.race.stimulated=Math.rand(500,1e3),z("event_m_curious4a",[_i[t.race.species].name])):z("event_m_curious4b",[_i[t.race.species].name])}}},curious1:{reqs:{tech:"primitive",trait:"curious"},type:"minor",effect:()=>z(`event_curious${Math.rand(0,5)}`,[_i[t.race.species].name])},curious2:{reqs:{tech:"primitive",trait:"curious"},type:"minor",effect:()=>z(`event_curious${Math.rand(5,10)}`,[_i[t.race.species].name])},slave_escape1:po("minor","escape1"),slave_escape2:po("minor","escape2"),slave_escape3:po("minor","death4"),shooting_star:_o("shooting_star","primitive"),tumbleweed:_o("tumbleweed","primitive"),flashmob:_o("flashmob","high_tech"),witch_hunt:{reqs:{tech:"magic"},type:"minor",condition:()=>!!(t.race.witch_hunter&&t.resource.Sus.amount>=50&&t.civic.scientist.workers>0),effect:()=>(t.resource[t.race.species].amount--,t.civic.scientist.workers--,t.civic.scientist.assigned--,z("witch_hunter_witch_hunt"))},heatwave:{reqs:{tech:"primitive"},type:"minor",condition:()=>!t.race.cataclysm&&!t.race.orbit_decayed&&2!==t.city.calendar.temp,effect:()=>(t.city.calendar.temp=2,t.city.cold=0,z("event_heatwave"))},coldsnap:{reqs:{tech:"primitive"},type:"minor",condition:()=>!t.race.cataclysm&&!t.race.orbit_decayed&&0!==t.city.calendar.temp,effect:()=>(t.city.calendar.temp=0,t.city.hot=0,z("event_coldsnap"))},cucumber:_o("cucumber","primitive"),planking:_o("planking","high_tech"),furryfish:_o("furryfish","primitive"),meteor_shower:_o("meteor_shower","primitive"),hum:_o("hum","high_tech"),bloodrain:_o("bloodrain","primitive"),haunting:_o("haunting","science"),mothman:_o("mothman","science"),dejavu:_o("dejavu","theology"),dollar:_o("dollar","currency",(function(){let e=Math.rand(1,10);return t.resource.Money.amount+=e,t.resource.Money.amount>t.resource.Money.max&&(t.resource.Money.amount=t.resource.Money.max),e})),pickpocket:_o("pickpocket","currency",(function(){let e=Math.rand(1,10);return t.resource.Money.amount-=e,t.resource.Money.amount<0&&(t.resource.Money.amount=0),e})),bird:_o("bird","primitive"),contest:{reqs:{tech:"science"},type:"minor",effect(){let e=Math.rand(0,3),t=Math.rand(0,10);return z("event_contest",[z(`event_contest_place${e}`),z(`event_contest_type${t}`)])}},cloud:_o("cloud","primitive",(function(){return z(`event_cloud_type${Math.rand(0,11)}`)})),dark_cloud:{reqs:{tech:"primitive"},type:"minor",condition:()=>!t.race.cataclysm&&!t.race.orbit_decayed&&0!==t.city.calendar.weather,effect:()=>(t.city.calendar.weather=0,z("event_dark_cloud"))},gloom:{reqs:{tech:"primitive"},type:"minor",condition:()=>!t.race.cataclysm&&!t.race.orbit_decayed&&1!==t.city.calendar.weather,effect:()=>(t.city.calendar.weather=1,z("event_gloom"))},tracks:_o("tracks","primitive"),hoax:_o("hoax","primitive"),burial:_o("burial","primitive"),artifacts:_o("artifacts","high_tech"),parade:_o("parade","world_control"),crop_circle:_o("crop_circle","agriculture"),llama:_o("llama","primitive",(function(){let e=Math.rand(25,100);return t.resource.Food.amount-=e,t.resource.Food.amount<0&&(t.resource.Food.amount=0),e}),(function(){return!(t.race.carnivore||t.race.soul_eater||t.race.detritivore||t.race.artifical)})),cat:_o("cat","primitive"),omen:_o("omen","primitive"),theft:_o("theft","primitive",(function(){return z(`event_theft_type${Math.rand(0,10)}`)})),compass:_o("compass","mining"),bone:_o("bone","primitive"),delicacy:_o("delicacy","high_tech"),prank:_o("prank","primitive",(function(){return z(`event_prank_type${Math.rand(0,10)}`)})),graffiti:_o("graffiti","science"),soul:_o("soul","soul_eater"),cheese:{reqs:{tech:"banking"},type:"minor",condition:()=>!!(t.tech.banking&&t.tech.banking>=7),effect(){let e=t.stats.hasOwnProperty("reset")?t.stats.reset+1:1;return t.race.cheese=Math.rand(10,10+e),z("event_cheese")}},tremor:_o("tremor","primitive"),rumor:_o("rumor","primitive",(function(){return z(`event_rumor_type${Math.rand(0,10)}`)}))};function _o(e,t,a,r){return{reqs:{tech:t},condition(){let e=!0;return"function"==typeof r&&(e=r()),e},type:"minor",effect(){let t=!1;return"function"==typeof a&&(t=a()),t?z(`event_${e}`,[t]):z(`event_${e}`)}}}function po(e,a){return{reqs:{trait:"slaver",tech:"slaves"},condition:()=>!(t.race.cataclysm||t.race.orbit_decayed||t.tech.isolation),type:e,effect:()=>t.city.slave_pen&&t.city.slave_pen.slaves>0?(t.city.slave_pen.slaves--,t.resource.Slave.amount=t.city.slave_pen.slaves,z(`event_slave_${a}`)):z("event_slave_none")}}function ho(e,a){let r=qe(Me(),"army",t.civic.garrison.wounded),s=t.tech.high_tech?t.tech.high_tech+1:1,i=("witchhunt"===e?1e3:t.civic.foreign[e].mil)*(1+Math.floor(g(0,10)-5)/10)*s,c=t.civic.garrison.wounded>Me()?Me():t.civic.garrison.wounded,o=Me()>0?Math.floor(g(1,c)):0,n=Math.floor(g(0,Me()-c));t.race.instinct&&(o=Math.round(o/2),n=Math.round(n/2)),t.civic.garrison.workers-=o,t.civic.garrison.wounded+=n,t.stats.died+=o,t.civic.garrison.wounded>t.civic.garrison.workers&&(t.civic.garrison.wounded=t.civic.garrison.workers),t.race.blood_thirst&&(t.race.blood_thirst_count+=Math.ceil(i/5),t.race.blood_thirst_count>di.blood_thirst.vars()[0]&&(t.race.blood_thirst_count=di.blood_thirst.vars()[0]));let l="witchhunt"===e?z("witch_hunter_crusade"):z(`civics_gov${t.civic.foreign[e].name.s0}`,[t.civic.foreign[e].name.s1]);if(r>i)return z("event_pillaged1",[l,o.toLocaleString(),n.toLocaleString()]);{let e=a?2:4,r=[],s=Object.keys(Va);return s.push("Money"),s.forEach((function(a){if(t.resource[a]&&t.resource[a].display&&t.resource[a].amount>0){let s=Math.rand(1,Math.round(t.resource[a].amount/e)),i=t.resource[a].amount-s;i<0&&(i=0),t.resource[a].amount=i,"Money"===a?r.push(`$${q(s)}`):r.push(`${q(s)} ${t.resource[a].name}`)}})),z("event_pillaged2",[l,o.toLocaleString(),n.toLocaleString(),r.join(", ")])}}function mo(e){let a=[];return Object.keys(uo).forEach((function(r){let s=!0;e!==uo[r].type&&(s=!1),("major"===e&&t.event.l===r||"minor"===e&&t.m_event.l===r)&&(s=!1),uo[r].reqs&&Object.keys(uo[r].reqs).forEach((function(e){switch(e){case"race":uo[r].reqs[e]!==t.race.species&&(s=!1);break;case"genus":uo[r].reqs[e]!==_i[t.race.species].type&&(s=!1);break;case"nogenus":uo[r].reqs[e]===_i[t.race.species].type&&(s=!1);break;case"resource":t.resource[uo[r].reqs[e]]&&t.resource[uo[r].reqs[e]].display||(s=!1);break;case"trait":t.race[uo[r].reqs[e]]||(s=!1);break;case"notrait":t.race[uo[r].reqs[e]]&&(s=!1);break;case"tech":t.tech[uo[r].reqs[e]]||(s=!1);break;case"notech":t.tech[uo[r].reqs[e]]&&(s=!1);break;case"high_tax_rate":t.civic.taxes.tax_rate<=uo[r].reqs[e]&&(s=!1);break;case"low_morale":t.city.morale.current>=uo[r].reqs[e]&&(s=!1);break;case"biome":t.city.biome!==uo[r].reqs[e]&&(s=!1);break;default:s=!1}})),s&&uo[r].condition&&!uo[r].condition()&&(s=!1),s&&a.push(r)})),a}const go=[{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 fo(){t.settings.expose&&(window.evolve={actions:Ac(Zr),races:Ac(_i),traits:Ac(di),tradeRatio:Ac(Va),craftCost:Ac(Xa()),atomic_mass:Ac(Ja),f_rate:Ac(Zs),checkAffordable:Ac(js),adjustCosts:Ac(fc),armyRating:Ac(qe),tradeBuyPrice:Ac(br),tradeSellPrice:Ac(yr),fuel_adjust:Ac(Yt),int_fuel_adjust:Ac(Xt),alevel:Ac(so),messageQueue:Ac(Bi),loc:Ac(z),shipCosts:Ac(dt),updateDebugData:Ac(vo),global:{},breakdown:{}})}function vo(){t.settings.expose&&(window.evolve.global=Ac(t),window.evolve.craftCost=Ac(Xa()),window.evolve.breakdown=Ac(r))}$(document).ready((function(){if(window.matchMedia){var e=$('head > link[rel="icon"][media]');$.each(e,(function(t,a){var r=window.matchMedia(a.media);function s(){r.matches&&(e.remove(),e=$(a).appendTo("head"))}r.addListener(s),s()}))}}));var yo=!1;window.addEventListener("storage",(e=>{!1===yo&&Bi(z("multitab_warning"),"danger",!0),yo=!0})),t.settings.expose&&fo();var bo={showCiv:1,showCivic:2,showResearch:3,showResources:4,showGenetics:5,showAchieve:6,settings:7};$(document).keydown((function(e){let a=(e=e||window.event).key||e.keyCode;Object.keys(y).forEach((function(e){a===t.settings.keyMap[e]&&(y[e]=!0)})),$("input").is(":focus")||$("textarea").is(":focus")||Object.keys(bo).forEach((function(e){if(a===t.settings.keyMap[e]&&0!==t.settings.civTabs&&("settings"===e||t.settings[e])){if(t.settings.civTabs!==bo[e])t.settings.civTabs=bo[e];else{let a=t.settings,r=null,s=null;switch(bo[e]){case bo.showCiv:r="spaceTabs",s=[a.showCity,a.showSpace,a.showDeep,a.showGalactic,a.showPortal,a.showOuter,a.showTau];break;case bo.showCivic:r="govTabs",s=["Government",a.showIndustry,a.showPowerGrid,a.showMil,a.showMechLab,a.showShipYard,a.showPsychic];break;case bo.showResearch:r="resTabs",s=["New","Completed"];break;case bo.showResources:r="marketTabs",s=[a.showMarket,a.showStorage,a.showEjector,a.showCargo,a.showAlchemy];break;case bo.showGenetics:a=t.settings.arpa,r="arpaTabs",s=[a.physics,a.genetics,a.crispr,a.blood];break;case bo.showAchieve:r="statsTabs",s=["Stats","Achievements","Perks"];break;default:r="",s=[]}for(let e=1;e\n

              Top Bar

              \n {{ race.species | planet }}{{ race.universe | universe }}${z("evo_challenge_simulation")}\n \n \n \n \n \n ${z("year")} {{ city.calendar.year }}\n ${z("day")} {{ city.calendar.day }}\n \n \n {{ s.at | remain }}\n \n \n \n \n `);let e=$('
              '),a=$('
              ');$("body").append(e),e.append(a),a.append(`
              \n
              \n

              Race Info

              \n
              {{ name() }}
              \n
              ${z("morale")} {{ city.morale.current | mRound }}%
              \n
              MW {{ city.power | replicate | approx }}
              \n
              \n
              \n
              \n
              \n
              \n

              ${z("message_log")}

              \n \n \n \n \n \n ${z("message_log_clear")}\n ${z("message_log_clear_all")}\n
              \n

              ${z("message_filters")}

              \n
              \n

              ${z("messages")}

              \n
              \n
              \n
              \n

              ${z("tab_resources")}

              \n
              `),m.forEach((function(e){$("#msgQueueFilters").append(`\n ${z("message_log_"+e)}\n `)})),ic({el:"#msgQueue",data:{m:h,s:t.settings.msgFilters},methods:{swapFilter(e){if(h.view!==e){$(`#msgQueueFilter-${h.view}`).removeClass("is-active"),$(`#msgQueueFilter-${e}`).addClass("is-active"),h.view=e;let t=$("#msgQueueLog");sc(t),h[e].forEach((function(e){t.append($('

              '+e.msg+"

              "))}))}},clearLog(e){Di(e=e?[e]:e),sc($("#msgQueueLog")),e?t.lastMsg[e]=[]:Object.keys(t.lastMsg).forEach((function(e){t.lastMsg[e]=[]}))},trigModal(){this.$buefy.modal.open({parent:this,component:{template:''}});let e=setInterval((function(){if($("#modalBox").length>0){clearInterval(e);let r=xc(16,12);$("#modalBox").append($(`

              ${z("message_log")}${r.length>0?r:""}

              `));var a=$('
              ');$("#modalBox").append(a);let s=$(`\n
              \n
              \n ${z("message_log_settings_visible")}\n
              \n
              \n `),i=$(`\n
              \n
              \n
              \n ${z("message_log_settings_length")}\n
              \n
              \n `),c=$(`\n
              \n
              \n
              \n ${z("message_log_settings_save")}\n
              \n
              \n `);a.append(s),a.append(i),a.append(c);let o="",n="",l="",u={},d={};m.forEach((function(e){o+=`
              ${z("message_log_"+e)}
              `,n+=`
              ${z("message_log_"+e)}
              `,l+=`
              ${z("message_log_"+e)}
              `,u[e]=t.settings.msgFilters[e].max,d[e]=t.settings.msgFilters[e].save})),s.append(o),i.append(n),c.append(l),i.append(`\n
              \n \n
              \n `),c.append(`\n
              \n \n
              \n `),ic({el:"#specialModal",data:{s:t.settings.msgFilters,mi:u,si:d},methods:{check(e){if(!t.settings.msgFilters[e].vis&&h.view===e){let e=!1;Object.keys(t.settings.msgFilters).forEach((function(a){if(t.settings.msgFilters[a].vis&&!e){e=!0,$(`#msgQueueFilter-${h.view}`).removeClass("is-active"),$(`#msgQueueFilter-${a}`).addClass("is-active"),h.view=a;let t=$("#msgQueueLog");sc(t),h[a].forEach((function(e){t.append($('

              '+e.msg+"

              "))}))}}))}},checkDisabled(e,a){if(!t.settings.msgFilters[e].vis)return!1;let r=0;return Object.keys(t.settings.msgFilters).forEach((function(e){t.settings.msgFilters[e].vis&&r++})),1===r},maxVal(e){u[e]<1&&(u[e]=1)},saveVal(e){d[e]<0?d[e]=0:d[e]>t.settings.msgFilters[e].max&&(d[e]=t.settings.msgFilters[e].max)},applyMax(){m.forEach((function(e){let a=u[e];t.settings.msgFilters[e].max=a,a');a.append(r);let s=$('
              ');r.append(s),s.append('

              Tab Navigation

              ');let i=$('');s.append(i);let c=$('\n \n ');i.append(c);let o=$('\n \n
              \n
              ');i.append(o);let n=$('\n \n
              \n
              ');i.append(n);let l=$('\n \n
              \n
              ');i.append(l);let u=$('\n \n
              \n
              ');i.append(u);let d=$('\n \n
              \n
              ');i.append(d);let _=$('\n \n
              \n
              ');i.append(_);let p="",g=[{i:"nuclear",f:"steelem",r:2},{i:"zombie",f:"the_misery",r:2},{i:"fire",f:"ill_advised",r:2},{i:"mask",f:"friday",r:1},{i:"skull",f:"demon_slayer",r:2},{i:"taijitu",f:"equilibrium",r:2},{i:"martini",f:"utopia",r:2},{i:"lightbulb",f:"energetic",r:2},{i:"trash",f:"garbage_pie",r:2},{i:"banana",f:"banana",r:2},{i:"turtle",f:"finish_line",r:2},{i:"floppy",f:"digital_ascension",r:2},{i:"slime",f:"slime_lord",r:2},{i:"lightning",f:"annihilation",r:2},{i:"heart",f:"valentine",r:1},{i:"clover",f:"leprechaun",r:1},{i:"bunny",f:"easter",r:1},{i:"egg",f:"egghunt",r:1},{i:"rocket",f:"launch_day",r:1},{i:"sun",f:"solstice",r:1},{i:"firework",f:"firework",r:1},{i:"ghost",f:"halloween",r:1},{i:"candy",f:"trickortreat",r:1},{i:"turkey",f:"thanksgiving",r:1},{i:"present",f:"xmas",r:1}],f=so();f<2&&(f=2);for(let e=0;e=g[e].r?p+=`${$c(g[e].i,16,f)} {{ '${g[e].i}' | label }}`:t.settings.icon===g[e].i&&(t.settings.icon="star");let v=xc(9,14),y="";v.length>0&&(y=`${v}`);let b=qc(5,12,!0),w="";b.length>0&&(w=`${b}`);let x="",k="";Object.keys(A).length>1&&Object.keys(A).forEach((function(e){t.settings.locale===e&&(k=A[e]),x+=`${A[e]}`}));let q=$(`\n \n
              \n {{ 'theme' | label }} \n \n \n {{ 'theme_dark' | label }}\n {{ 'theme_light' | label }}\n {{ 'theme_night' | label }}\n {{ 'theme_darkNight' | label }}\n {{ 'theme_redgreen' | label }}\n {{ 'theme_gruvboxLight' | label }}\n {{ 'theme_gruvboxDark' | label }}\n {{ 'theme_orangeSoda' | label }}\n {{ 'theme_dracula' | label }}\n ${y}\n \n {{ 'units' | label }} \n \n \n {{ 'metric' | label }}\n {{ 'scientific' | label }}\n {{ 'sln' | label }}\n ${w}\n \n\n {{ 'icons' | label }} \n \n \n ${$c("star",16,f)} {{ 'star' | label }}\n ${p}\n \n
              \n
              \n {{ 'locale' | label }} \n \n \n ${x}\n \n\n {{ 'font' | label }} \n \n \n {{ 'standard' | label }}\n {{ 'large_log' | label }}\n {{ 'large_all' | label }}\n \n\n {{ 'q_merge' | label }} \n \n \n {{ 'merge_never' | label }}\n {{ 'merge_nearby' | label }}\n {{ 'merge_all' | label }}\n \n
              \n {{ 'pause' | label }}\n {{ 'm_keys' | label }}\n {{ 'c_cat' | label }}\n {{ 'q_key' | label }}\n {{ 'q_any' | label }}\n {{ 'q_any_res' | label }}\n {{ 's_pack_on' | label }}\n {{ 'expose' | label }}\n {{ 'tabLoad' | label }}\n {{ 'boring' | label }}\n {{ 'touch' | label }}\n
              \n
              ${z("key_mappings")}
              \n
              ${z("multiplier",[10])}
              \n
              ${z("multiplier",[25])}
              \n
              ${z("multiplier",[100])}
              \n
              ${z("q_key")}
              \n
              \n
              \n
              ${z("tab_mappings")}
              \n
              ${z("tab_civil")}
              \n
              ${z("tab_civics")}
              \n
              ${z("tab_research")}
              \n
              ${z("tab_resources")}
              \n
              ${z("tech_arpa")}
              \n
              ${z("tab_stats")}
              \n
              ${z("tab_settings")}
              \n
              \n
              \n \n \n \n
              \n
              \n {{ | sPack}}\n
              \n
              \n \n \n \n \n \n \n \n
              \n
              \n \n {{ 'enable_reset' | label }}\n
              \n
              \n

              \n {{ 'reset_warn' | label }}\n

              \n

              \n \n \n

              \n
              \n
              \n
              \n
              \n
              `);i.append(q);let M=$('\n \n
              \n
              ');i.append(M),a.append('
              ');let P=xc(15,8);$("body").append(`\n
              \n \n

              \n ${P.length>0?`Ev${P}lve`:"Evolve"}\n by\n Demagorddon\n

              \n
              \n \n

              External Links

              \n \n
              \n
              \n `)}();var wo=t.revision?t.revision:"";t.beta?$("#topBar .version > a").html(`v${t.version} Beta ${t.beta}${wo}`):$("#topBar .version > a").html("v"+t.version+wo),Di(),t.lastMsg&&Object.keys(t.lastMsg).forEach((function(e){t.lastMsg[e].reverse().forEach((function(t){Bi(t.m,t.c,!0,[e],!0)})),t.lastMsg[e].reverse()})),$("#msgQueue").height(t.settings.msgQueueHeight),$("#buildQueue").height(t.settings.buildQueueHeight),!0===t.queue.rename&&(Ls(!0),t.queue.rename=!1),t.settings.sPackMsg=e.getItem("string_pack_name")?z("string_pack_using",[e.getItem("string_pack_name")]):z("string_pack_none"),t.queue.display&&Hi(),t.r_queue.display&&Ui(),ic({el:"#mainColumn div:first-child",data:{s:t.settings},methods:{swapTab:e=>(t.settings.tabLoad||jt(e),e),saveImport(){$("#importExport").val().length>0&&importGame($("#importExport").val())},saveExport(){$("#importExport").val(window.exportGame()),$("#importExport").select(),document.execCommand("copy")},saveExportFile(){const e=new Date;((e,t,a)=>{const r=document.createElement("a"),s=new Blob([e],{type:"text/plain"});r.href=URL.createObjectURL(s),r.download=t,r.click(),URL.revokeObjectURL(r.href)})(window.exportGame(),`evolve-${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}-${e.getHours()}-${e.getMinutes()}.txt`)},importStringFile(){let a=document.getElementById("stringPackFile").files[0];if(a){let r=new FileReader,s=document.getElementById("stringPackFile").files[0].name;r.readAsText(a,"UTF-8"),r.onload=function(a){try{JSON.parse(a.target.result)}catch{return void(t.settings.sPackMsg=z("string_pack_error",[s]))}t.settings.sPackMsg=z("string_pack_using",[s]),e.setItem("string_pack_name",s),e.setItem("string_pack",LZString.compressToUTF16(a.target.result)),t.settings.sPackOn&&(t.queue.rename=!0,e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w&&P.w.terminate(),window.location.reload())},r.onerror=function(e){console.error("error reading file")}}},clearStringFile(){e.getItem("string_pack")&&(t.settings.sPackMsg=z("string_pack_none"),e.removeItem("string_pack_name"),e.removeItem("string_pack"),t.settings.sPackOn&&(t.queue.rename=!0,e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w&&P.w.terminate(),window.location.reload()))},stringPackOn(){e.getItem("string_pack")&&(t.queue.rename=!0,e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w&&P.w.terminate(),window.location.reload())},restoreGame(){let t=e.getItem("evolveBak")||!1;this.$buefy.dialog.confirm({title:z("restore"),message:z("restore_warning"),ariaModal:!0,confirmText:z("restore"),onConfirm(){t&&importGame(t,!0)}})},lChange(a){t.settings.locale=a,t.queue.rename=!0,e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w&&P.w.terminate(),window.location.reload()},setTheme(e){t.settings.theme=e,$("html").removeClass(),$("html").addClass(e),$("html").addClass(t.settings.font)},numNotation(e){t.settings.affix=e},icon(a){t.settings.icon=a,e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),P.w&&P.w.terminate(),window.location.reload()},remove(e){t.r_queue.queue.splice(e,1)},font(e){t.settings.font=e,$("html").removeClass("standard"),$("html").removeClass("large_log"),$("html").removeClass("large_all"),$("html").addClass(e)},q_merge(e){t.settings.q_merge=e},toggleTabLoad(){Ct()},unpause(){$("#pausegame").removeClass("play"),$("#pausegame").removeClass("pause"),t.settings.pause?$("#pausegame").addClass("pause"):$("#pausegame").addClass("play"),t.settings.pause||P.s||Ki("start")}},filters:{namecase:e=>e.replace(/(?:^|\s)\w/g,(function(e){return e.toUpperCase()})),label:e=>Ot(e),sPack:()=>t.settings.sPackMsg,notation(e){switch(e){case"si":return z("metric");case"sci":return z("scientific");case"sln":return z("sln")}}}}),["1","3","4","5","6","7","8","9","10","11","12","13","14","15","16"].forEach((function(e){Ei(`settings${e}`,(function(){return z(`settings${e}`)}),{elm:`#settings span.settings${e}`})})),Ei("stringPack",(function(){return z("string_example",['
              {\n "year": "Galactic Standard Year",\n "resource_Food_name": "Nom Noms"\n}
              '])})),t.new&&(Bi(z("new"),"warning",!1,["progress"]),t.new=!1),t.city.mass_driver&&(i.mass_driver=t.city.mass_driver.on),t.portal.turret&&(i.turret=t.portal.turret.on),t.interstellar.fusion&&(o.fusion=t.interstellar.fusion.on),t.portal.hell_forge&&(i.hell_forge=t.portal.hell_forge.on),t.space.sam&&(i.sam=t.space.sam.on),t.space.operating_base&&(i.operating_base=t.space.operating_base.on,c.operating_base=t.space.operating_base.on),t.space.fob&&(i.fob=t.space.fob.on),t.tauceti.fusion_generator&&(i.fusion_generator=t.tauceti.fusion_generator.on),na(!0),sr(),Ct(),Wi(),t.race.shapeshifter&&Mi(!1,!0),Object.keys(ri()).forEach((function(e){Ni(e)})),x(),ic({el:"#race",data:{race:t.race,city:t.city},methods:{name:()=>Tc("name")},filters:{replicate:e=>t.race.hasOwnProperty("governor")&&t.race.governor.hasOwnProperty("tasks")&&t.race.hasOwnProperty("replicator")&&Object.values(t.race.governor.tasks).includes("replicate")&&t.race.governor.config.replicate.pow.on&&t.race.replicator.pow>0?e+t.race.replicator.pow:e,approx:e=>+e.toFixed(2),mRound:e=>+e.toFixed(1)}}),Ei("race",(function(){return"string"==typeof _i[t.race.species].desc?_i[t.race.species].desc:_i[t.race.species].desc()}),{elm:"#race > .name"});var $o=125;if(Ei("morale",(function(e){if(0!==t.city.morale.unemployed){let a=t.city.morale.unemployed>0?"success":"danger";e.popper.append(``)}if(0!==t.city.morale.stress){let a=t.city.morale.stress>0?"success":"danger";e.popper.append(``)}let a=100+t.city.morale.unemployed+t.city.morale.stress;if(Object.keys(t.city.morale).forEach((function(r){if(!["current","unemployed","stress","season","cap","potential"].includes(r)&&0!==t.city.morale[r]){a+=t.city.morale[r];let s=t.city.morale[r]>0?"success":"danger",i=t.city.morale[r];if("entertain"===r&&"democracy"===t.civic.govern.type&&(i/=1+re.democracy()[0]/100),e.popper.append(``),"entertain"===r&&"democracy"===t.civic.govern.type){let t=re.democracy()[0];e.popper.append(``)}}})),0!==t.city.morale.season){a+=t.city.morale.season;let r=0===t.city.calendar.season?z("morale_spring"):1===t.city.calendar.season?z("morale_summer"):z("morale_winter"),s=t.city.morale.season>0?"success":"danger";e.popper.append(``)}if("corpocracy"===t.civic.govern.type){let t=re.corpocracy()[3];a-=t,e.popper.append(``)}if("republic"===t.civic.govern.type){let t=re.republic()[1];a+=t,e.popper.append(``)}if("federation"===t.civic.govern.type){let t=re.federation()[1];a+=t,e.popper.append(``)}let r=D("militant",1);if(r&&(a-=r,e.popper.append(``)),t.race.cheese){let r=t.stats.hasOwnProperty("reset")?t.stats.reset+1:1,s=+(r/(r+10)*11).toFixed(2);a+=s,e.popper.append(``)}if(t.race.motivated){let r=Math.ceil(t.race.motivated**.4);a+=r,e.popper.append(``)}if(t.civic.homeless){let r=t.civic.homeless/2;a-=r,e.popper.append(``)}if(t.tech.vax_c||t.tech.vax_f){let r=t.tech.vax_c?10:50;a-=r,e.popper.append(``)}else if(t.tech.vax_s){let t=20;a+=t,e.popper.append(``)}t.city.tormented&&(a-=t.city.tormented,e.popper.append(``)),a=+a.toFixed(1);let s=$("
              ");e.popper.append(s),s.append(``),s.append(``),s.append(``)}),{classes:"has-background-light has-text-dark"}),Ei("powerStatus",(function(e){let a=+(t.city.power_total-t.city.power).toFixed(2);Object.keys(s).forEach((function(t){if(s[t]){let a=+s[t].toFixed(2);e.popper.append(``)}})),e.popper.append(``);let r=+t.city.power.toFixed(2);t.city.power>0?e.popper.append(``):e.popper.append(``)}),{classes:"has-background-light has-text-dark"}),t.settings.pause?$("#pausegame").addClass("pause"):$("#pausegame").addClass("play"),ic({el:"#topBar",data:{city:t.city,race:t.race,s:t.settings},methods:{sign:()=>H("sign"),getAstroSign:()=>H("astrology"),weather:()=>H("weather"),temp:()=>H("temp"),moon:()=>H("moon"),showUniverse:()=>"standard"!==t.race.universe&&"bigbang"!==t.race.universe,showSim:()=>!!t.sim,atRemain:()=>z("accelerated_time"),pause(){$("#pausegame").removeClass("play"),$("#pausegame").removeClass("pause"),t.settings.pause?(t.settings.pause=!1,$("#pausegame").addClass("play")):(t.settings.pause=!0,$("#pausegame").addClass("pause")),t.settings.pause||P.s||Ki("start")},pausedesc:()=>t.settings.pause?z("game_play"):z("game_pause")},filters:{planet:e=>_i[e].home,universe:e=>"standard"===e||"bigbang"===e?"":aa[e].name,remain(e){let t=Math.ceil(2.5*e/60);if(t>0){let e=Math.floor(t/60);return t-=60*e,`${e}:${t.toString().padStart(2,"0")}`}}}}),["astroSign"].forEach((function(e){Ei(`${e}`,(function(){return H("sign")}),{elm:$(`#${e}`)})})),Ei("topBarPlanet",(function(e){if("protoplasm"===t.race.species)e.popper.append($(`${z("infant")}`));else{let a=_i[t.race.species].home,r=Tc("name"),s=Si[t.city.biome].label,i=t.city.ptrait;if(i.length>0){let e="";i.forEach((function(a){Fi.hasOwnProperty(a)&&("mellow"===a&&"entish"===t.race.species?e+=`${z("planet_mellow_eg")} `:e+=`${Fi[a].label} `)})),s=`${e}${s}`}let c=t.city.calendar.orbit,o=qs(t.city.geology),n="";if(t.race.truepath&&(n+=`
              ${z("evo_challenge_truepath_recap")}
              `),t.race.junker&&(n+=`
              ${z("evo_challenge_junker_desc")} ${z("evo_challenge_junker_conditions")}
              `),t.race.joyless&&(n+=`
              ${z("evo_challenge_joyless_desc")} ${z("evo_challenge_joyless_conditions")}
              `),t.race.steelen&&(n+=`
              ${z("evo_challenge_steelen_desc")} ${z("evo_challenge_steelen_conditions")}
              `),t.race.decay&&(n+=`
              ${z("evo_challenge_decay_desc")} ${z("evo_challenge_decay_conditions")}
              `),t.race.emfield&&(n+=`
              ${z("evo_challenge_emfield_desc")} ${z("evo_challenge_emfield_conditions")}
              `),t.race.inflation&&(n+=`
              ${z("evo_challenge_inflation_desc")} ${z("evo_challenge_inflation_conditions")}
              `),t.race.banana&&(n+=`
              ${z("evo_challenge_banana_desc")} ${z("wiki_achieve_banana1")}. ${z("wiki_achieve_banana2")}. ${z("wiki_achieve_banana3")}. ${z("wiki_achieve_banana4",[500])}. ${z("wiki_achieve_banana5",[50])}.
              `),t.race.witch_hunter&&(n+=`
              ${z("evo_challenge_witch_hunter_desc")}
              `),t.race.nonstandard&&(n+=`
              ${z("evo_challenge_nonstandard_desc")}
              `),t.race.gravity_well&&(n+=`
              ${z("evo_challenge_gravity_well_desc")}
              `),t.race.warlord&&(n+=`
              ${z("evo_challenge_warlord_desc")}
              `),t.race.lone_survivor&&(n+=`
              ${z("evo_challenge_lone_survivor_desc")}
              `),t.race.sludge&&(n+=`
              ${z("evo_challenge_sludge_desc")} ${z("evo_challenge_sludge_conditions")}
              `),t.race.orbit_decay){let e=t.race.orbit_decayed?"":z("evo_challenge_orbit_decay_impact",[t.race.orbit_decay-t.stats.days]);n+=`
              ${t.race.orbit_decayed?z("evo_challenge_orbit_decay_impacted",[_i[t.race.species].home]):z("evo_challenge_orbit_decay_desc")} ${z("evo_challenge_orbit_decay_conditions")} ${e}
              `,uc()>=100&&"antimatter"!==t.race.universe?n+=`
              ${z("evo_challenge_cataclysm_warn")}
              `:n+=`
              ${z("evo_challenge_scenario_warn")}
              `}t.race.cataclysm&&(uc()>=50&&"antimatter"!==t.race.universe?n+=`
              ${z("evo_challenge_cataclysm_desc")}
              ${z("evo_challenge_cataclysm_warn")}
              `:n+=`
              ${z("evo_challenge_cataclysm_desc")}
              ${z("evo_challenge_scenario_warn")}
              `),e.popper.append($(`
              ${z(t.race.cataclysm?"no_home":"home",[a,r,s,c])}
              ${o}${n}`))}}),{elm:"#topBar .planetWrap .planet",classes:"has-background-light has-text-dark"}),Ei("topBarUniverse",(function(e){e.popper.append($(`
              ${aa[t.race.universe].desc}
              `)),e.popper.append($(`
              ${aa[t.race.universe].effect}
              `))}),{elm:"#topBar .planetWrap .universe",classes:"has-background-light has-text-dark"}),Ei("topBarSimulation",(function(e){e.popper.append($(`
              ${z("evo_challenge_simulation_topbar")}
              `))}),{elm:"#topBar .planetWrap .simulation",classes:"has-background-light has-text-dark"}),t.race.orbit_decay&&!t.race.orbit_decayed&&Ei("infoTimer",(function(){return t.race.orbit_decayed?"":z("evo_challenge_orbit_decay_impact",[t.race.orbit_decay-t.stats.days])}),{elm:"#infoTimer",classes:"has-background-light has-text-dark"}),ro(),"protoplasm"===t.race.species){t.resource.RNA.display=!0;let e=t.stats.feat.master&&t.stats.achieve.ascended&&t.stats.achieve.ascended.l>0?Math.min(t.stats.achieve.ascended.l,t.stats.feat.master):0;if(t.sim&&(e=5),e>0&&!t.evolution.mloaded){let a=["dna","membrane","organelles","nucleus","eukaryotic_cell","mitochondria"];for(let e=0;e0?Math.min(t.stats.achieve.corrupted.l,t.stats.feat.grandmaster):0;t.sim&&(a=5),a>=5&&!t.evolution.gmloaded&&(t.tech.evo=6,t.evolution.gselect=!0,t.evolution.gmloaded=1,t.evolution.final=80,t.tech.evo_humanoid=1,t.tech.evo_giant=1,t.tech.evo_small=1,t.tech.evo_animalism=2,t.tech.evo_demonic=1,t.tech.evo_angelic=1,t.tech.evo_insectoid=1,t.tech.evo_eggshell=2,t.tech.evo_eldritch=1,t.tech.evo_sand=1,t.tech.evo_polar=1,t.tech.evo_heat=1,t.tech.evo_fey=1,t.tech.evo_aquatic=1),"bigbang"===t.race.universe?(t.seed=t.race.seed,function(){let e=["standard","heavy","antimatter","evil","micro","magic"];for(let a=0;a`),c=$(`${aa[r].name}`);i.append(c),$("#evolution").append(i),$("#"+s).on("click",(function(){t.race.universe=r,sc($("#evolution")),ra(),Ii()})),Ei(s,(function(e){e.popper.append($(`
              ${aa[r].name}
              `)),e.popper.append($(`
              ${aa[r].desc}
              `)),e.popper.append($(`
              ${aa[r].effect}
              `))}),{classes:"has-background-light has-text-dark"})}}()):t.race.seeded&&!t.race.chose?(t.seed=t.race.seed,ra()):as()}else t.portal.hasOwnProperty("soul_forge")&&t.portal.soul_forge.on&&(i.soul_forge=1),R();Oo(!0),$("#lbl_city").html("Village"),window.Worker&&(P.w=new Worker("evolve/evolve.js"),P.w.addEventListener("message",(function(a){switch(a.data){case"fast":!function(){t.race.no_craft||$(".craft").each((function(e){"number"==typeof $(this).data("val")&&$(this).html(q($(this).data("val")*b(),1))}));const e=new Date,a=W();r.p.Global={};var d=1;let _=!1,p=Gr("raw");if(t.prestige.Plasmid.count>0&&("antimatter"!==t.race.universe||t.genes.bleed&&"antimatter"===t.race.universe)&&(r.p.Global[z("resource_Plasmid_name")]=100*p[1]+"%",_=!0),t.prestige.AntiPlasmid.count>0&&("antimatter"===t.race.universe||t.genes.bleed&&t.genes.bleed>=2&&"antimatter"!==t.race.universe)&&(r.p.Global[z("resource_AntiPlasmid_name")]=100*p[2]+"%",_=!0),_&&(d+=p[0]),(t.race.no_plasmid||"antimatter"===t.race.universe)&&((t.race.cataclysm||t.race.orbit_decayed)&&t.space.ziggurat&&t.space.ziggurat.count||t.city.temple&&t.city.temple.count)){let e=Br();r.p.Global[z("faith")]=100*e+"%",d*=1+e}if(t.race.untapped&&t.race.untapped>0){let e=+(t.race.untapped/(t.race.untapped+20)/10+24e-5).toFixed(4);r.p.Global[z("trait_untapped_bd")]=100*e+"%",d*=1+e}if(t.race.rainbow_active&&t.race.rainbow_active>1&&(r.p.Global[z("trait_rainbow_bd")]=`${di.rainbow.vars()[0]}%`,d*=1+di.rainbow.vars()[0]/100),t.tech.world_control){let e=25;"federation"===t.civic.govern.type&&(e=re.federation()[2]),t.race.unified&&(e+=di.unified.vars()[0]),"taurus"===a&&(e+=U("taurus")[0]),r.p.Global[z("tech_unification")]=`${e}%`,d*=1+e/100}else{let e=0;for(let a=0;a<3;a++)(t.civic.foreign[`gov${a}`].occ||t.civic.foreign[`gov${a}`].anx||t.civic.foreign[`gov${a}`].buy)&&(e+="federation"===t.civic.govern.type?5+re.federation()[0]:5);e>0&&(r.p.Global[z("civics_garrison_occupy")]=`${e}%`,d*=1+e/100)}if(t.genes.challenge&&t.genes.challenge>=2){let e=uc();r.p.Global[z("mastery")]=e+"%",d*=1+e/100}if(t.pillars){let e=pc();r.p.Global[z("harmonic")]=100*(e[0]-1)+"%",d*=e[0]}if(t.race.ascended&&(r.p.Global[z("achieve_ascended_name")]="5%",d*=1.05),t.race.corruption){let e=2*t.race.corruption;r.p.Global[z("achieve_corrupted_name")]=`${e}%`,d*=1+e/100}if(t.race.rejuvenated){let e=t.stats.days<996?(1e3-t.stats.days)/2e3:.02;r.p.Global[z("rejuvenated")]=100*e+"%",d*=1+e}let h=Oi("octigoran");if(t.race.suction_grip||h>0){let e=0;t.race.suction_grip&&(e+=di.suction_grip.vars()[0]),h>0&&(e+=+(di.suction_grip.vars(1)[0]*h).toFixed(2)),r.p.Global[z("trait_suction_grip_bd")]=e+"%",d*=1+e/100}let m=Oi("cyclops");if(t.race.intelligent||m>0){let e=0;t.race.intelligent&&(e+=la(t.civic.scientist.workers,"scientist")*di.intelligent.vars()[1]+la(t.civic.professor.workers,"professor")*di.intelligent.vars()[0]),m>0&&(e+=la(t.civic.scientist.workers,"scientist")*di.intelligent.vars(1)[1]*m+la(t.civic.professor.workers,"professor")*di.intelligent.vars(1)[0]*m),t.race.high_pop&&(e=Pe(e)),r.p.Global[z("trait_intelligent_bd")]=e+"%",d*=1+e/100}if(t.race.slaver&&t.city.slave_pen&&t.city.slave_pen){let e=t.city.slave_pen.slaves*di.slaver.vars()[0];r.p.Global[z("trait_slaver_bd")]=e+"%",d*=1+e/100}if((t.city.ptrait.includes("trashed")||t.race.scavenger||t.race.servants&&t.race.servants.force_scavenger)&&t.civic.scavenger){let e=t.city.ptrait.includes("trashed")||t.race.scavenger?la(t.civic.scavenger.workers,"scavenger"):0;if(t.race.servants&&(e+=ua(t.race.servants.jobs.scavenger)),e>0){let a=e*di.scavenger.vars()[0];t.city.ptrait.includes("trashed")&&t.race.scavenger&&(a*=1+di.scavenger.vars()[1]/100),t.city.ptrait.includes("trashed")&&(a*=Fi.trashed.vars()[1]),t.race.high_pop&&(a=Pe(a)),r.p.Global[z("job_scavenger")]=a+"%",d*=1+a/100}}if(t.race.unfathomable&&t.city.surfaceDwellers&&t.city.captive_housing){let e=0,a=t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg?t.stats.achieve.nightmare.mg:0;if(t.city.hasOwnProperty("surfaceDwellers")){for(let a=0;at.civic.torturer.workers*a/2){let r=e-t.civic.torturer.workers*a/2;e-=Math.ceil(r/3)}}if(e>0){let s=e*di.unfathomable.vars()[2]*a/5;t.race.psychic&&(s*=1+di.psychic.vars()[1]/100),r.p.Global[z("trait_unfathomable_bd")]=s+"%",d*=1+s/100}}if(t.city.ptrait.includes("mellow")&&(r.p.Global[z("planet_mellow_bd")]="-10%",d*=Fi.mellow.vars()[2]),t.city.ptrait.includes("ozone")&&t.city.sun){let e=t.city.sun*Fi.ozone.vars()[0];r.p.Global[z("planet_ozone_bd")]=`-${e}%`,d*=1-e/100}let g=Oi("phoenix");if((t.race.smoldering||g>0)&&t.city.hot){let e=0;t.race.smoldering&&(t.city.hot>100?(e+=100*di.smoldering.vars()[1],e+=(t.city.hot-100)*di.smoldering.vars()[2]):e+=t.city.hot*di.smoldering.vars()[1]),g>0&&(t.city.hot>100?(e+=100*di.smoldering.vars(.25)[1]*g,e+=(t.city.hot-100)*di.smoldering.vars(.25)[2]*g):e+=t.city.hot*di.smoldering.vars(.25)[1]*g),r.p.Global[z("trait_smoldering_name")]=`${e}%`,d*=1+e/100}if(t.race.heat_intolerance&&t.city.hot){let e=t.city.hot*di.heat_intolerance.vars()[0];r.p.Global[z("hot")]=`-${e}%`,d*=1-e/100}if(t.race.chilled&&t.city.cold){let e=0;t.city.cold>100?(e+=100*di.chilled.vars()[1],e+=(t.city.cold-100)*di.chilled.vars()[2]):e=t.city.cold*di.chilled.vars()[1],r.p.Global[z("trait_chilled_name")]=`${e}%`,d*=1+e/100}if(t.race.cold_intolerance&&t.city.cold){let e=t.city.cold*di.cold_intolerance.vars()[0];r.p.Global[z("cold")]=`-${e}%`,d*=1-e/100}if("anarchy"===t.civic.govern.type&&t.resource[t.race.species].amount>=ua(10)){let e=(t.resource[t.race.species].amount-(ua(10)-1))*(t.race.high_pop?.25/di.high_pop.vars()[0]:.25);r.p.Global[z("govern_anarchy")]=`-${e}%`,d*=1-e/100}if(t.civic.govern.protest&&t.civic.govern.protest>0&&(r.p.Global[z("event_protest")]="-30%",d*=.7),t.civic.govern.scandal&&t.civic.govern.scandal>0){let e=D("muckraker",0);e&&(r.p.Global[z("event_scandal")]=`-${e}%`,d*=1-e/100)}if(Oi("capybara")>0||t.race.calm&&t.city.meditation&&t.resource.Zen.display){let e=t.resource.Zen.amount,a=Oi("capybara");a>0&&(e+=Math.round(500*a));let s=e/(e+5e3);r.p.Global[z("trait_calm_bd")]=`+${(100*s).toFixed(2)}%`,d*=1+s}if(t.city.firestorm&&t.city.firestorm>0&&(t.city.firestorm--,r.p.Global[z("event_flare_bd")]="-20%",d*=.8),"aquatic"===_i[t.race.species].type&&!["swamp","oceanic"].includes(t.city.biome)||"fey"===_i[t.race.species].type&&!["forest","swamp","taiga"].includes(t.city.biome)||"heat"===_i[t.race.species].type&&!["ashland","volcanic"].includes(t.city.biome)||"polar"===_i[t.race.species].type&&!["tundra","taiga"].includes(t.city.biome)||"sand"===_i[t.race.species].type&&!["ashland","desert"].includes(t.city.biome)||"demonic"===_i[t.race.species].type&&"hellscape"!==t.city.biome||"angelic"===_i[t.race.species].type&&"eden"!==t.city.biome){let e=1;e=t.blood.unbound&&t.blood.unbound>=4?t.race.rejuvenated?.975:.95:t.blood.unbound&&t.blood.unbound>=2?t.race.rejuvenated?.95:.9:t.race.rejuvenated?.9:.8,r.p.Global[z("unsuited")]=`-${Math.round(100*(1-e))}%`,d*=e}if(t.race.hibernator&&3===t.city.calendar.season&&(d*=1-di.hibernator.vars()[1]/100,r.p.Global[z("morale_winter")]=`-${di.hibernator.vars()[1]}%`),"magic"===t.race.universe&&t.tech.syphon){let e=t.tech.syphon/8;r.p.Global[z("arpa_syphon_damage")]=`-${e}%`,d*=1-e/100}r.p.consume={},["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"].forEach((function(e){r.p.consume[e]={},r.p[e]={}}));var f=.25;if("protoplasm"===t.race.species){if(t.evolution.nucleus&&t.resource.DNA.amount=5&&(v*=2),Ji("DNA",v*d*f),Ji("RNA",-2*e*f)}if(t.evolution.organelles){let e=t.race.rapid_mutation?2:1;t.tech.evo&&t.tech.evo>=2&&e++,Ji("RNA",t.evolution.organelles.count*e*d*f)}if((t.stats.feat.novice&&t.stats.achieve.apocalypse&&t.stats.achieve.apocalypse.l>0||t.sim)&&"bigbang"!==t.race.universe&&(!t.race.seeded||t.race.seeded&&t.race.chose)){let e=t.sim?5:Math.min(t.stats.achieve.apocalypse.l,t.stats.feat.novice);Ji("RNA",e/2*f*d),t.resource.DNA.display&&Ji("DNA",e/4*f*d)}t.resource.RNA.amount>=2&&!t.evolution.dna?(t.evolution.dna=1,t.resource.DNA.display=!0,t.stats.achieve.mass_extinction&&t.stats.achieve.mass_extinction.l>1&&(Ji("RNA",t.resource.RNA.max),Ji("DNA",t.resource.RNA.max)),as()):t.resource.RNA.amount>=10&&!t.evolution.membrane?(t.evolution.membrane={count:0},as()):t.resource.DNA.amount>=4&&!t.evolution.organelles?(t.evolution.organelles={count:0},as()):t.evolution.organelles&&t.evolution.organelles.count>=2&&!t.evolution.nucleus?(t.evolution.nucleus={count:0},as()):t.evolution.nucleus&&t.evolution.nucleus.count>=1&&!t.evolution.eukaryotic_cell?(t.evolution.eukaryotic_cell={count:0},as()):t.evolution.eukaryotic_cell&&t.evolution.eukaryotic_cell.count>=1&&!t.evolution.mitochondria?(t.evolution.mitochondria={count:0},as()):t.evolution.mitochondria&&!t.tech.evo&&(t.tech.evo=1,as())}else{let _=function(){let e=1;if(t.space.ziggurat&&t.space.ziggurat.count>0){let a=t.tech.ancient_study?.006:.004;if(t.tech.ancient_deify&&t.tech.ancient_deify>=2&&c.exotic_lab&&(a+=1e-4*c.exotic_lab),"theocracy"===t.civic.govern.type&&t.genes.ancients&&t.genes.ancients>=2&&t.civic.priest.display){let e=2e-5;t.race.high_pop&&(e=Pe(e)),a+=e*t.civic.priest.workers}t.race.ooze&&(a*=1-di.ooze.vars()[1]/100),t.race.high_pop&&(a=Pe(a)),e+=t.space.ziggurat.count*t.civic.colonist.workers*a}return e}(),p=100,h=1,m=1;if(t.race.quarantine&&t.race.qDays){let e=1-(t.race.qDays<=1e3?t.race.qDays:1e3)/1e3;switch(t.race.quarantine){case 1:h=.5+.5*e;break;case 2:h=.25+.25*e,m=.5+.5*e;break;case 3:h=.1+.15*e,m=.25+.25*e;break;case 4:h=.08+.02*e,m=.12+.13*e}if(t.race.vax&&t.tech.focus_cure&&t.tech.focus_cure>=4){let e=+t.race.vax.toFixed(2)/100;e>1&&(e=1),h+=(1-h)*e,m+=(1-m)*e}}if(0===t.city.calendar.season&&t.city.calendar.year>0){let e=t.race.chilled||t.race.smoldering?0:5;p+=e,t.city.morale.season=e}else 1===t.city.calendar.season&&t.race.smoldering?(p+=di.smoldering.vars()[0],t.city.morale.season=di.smoldering.vars()[0]):3===t.city.calendar.season?t.race.chilled?(p+=di.chilled.vars()[0],t.city.morale.season=di.chilled.vars()[0]):(p-=t.race.leathery?di.leathery.vars()[0]:5,t.city.morale.season=t.race.leathery?-di.leathery.vars()[0]:-5):t.city.morale.season=0;if(t.race.cheese){let e=t.stats.hasOwnProperty("reset")?t.stats.reset+1:1;p+=+(e/(e+10)*11).toFixed(2)}if(t.civic.homeless&&(p-=t.civic.homeless/2),t.tech.vax_c||t.tech.vax_f?p-=t.tech.vax_c?10:50:t.tech.vax_s&&(p+=20),t.tech.m_boost?(t.city.morale.leadership=20,p+=20):t.city.morale.leadership=0,Lc()){let e=Nc("morale");t.city.morale.shrine=e.add,p+=e.add}else t.city.morale.shrine=0;let g=D("militant",1);if(g&&(p-=g),"corpocracy"===t.civic.govern.type&&(p-=re.corpocracy()[3]),"republic"===t.civic.govern.type&&(p+=re.republic()[1]),"federation"===t.civic.govern.type&&(p+=re.federation()[1]),t.race.blood_thirst&&t.race.blood_thirst_count>=1){let e=Math.ceil(Math.log2(t.race.blood_thirst_count));t.city.morale.blood_thirst=e,p+=e}else t.city.morale.blood_thirst=0;let v=0;0===t.city.calendar.weather?t.city.calendar.temp>0&&(v=1===t.city.calendar.wind?t.race.skittish?-di.skittish.vars()[0]:t.race.leathery?-di.leathery.vars()[0]:-5:t.race.leathery?0:-2):2===t.city.calendar.weather?t.race.nyctophilia?v=-di.nyctophilia.vars()[0]:(0===t.city.calendar.wind&&t.city.calendar.temp<2||1===t.city.calendar.wind&&2===t.city.calendar.temp)&&(v=2):t.race.nyctophilia&&(v=di.nyctophilia.vars()[1]),!t.race.snowy||0===t.city.calendar.temp&&0===t.city.calendar.weather||(v-=t.city.calendar.temp>=2?di.snowy.vars()[1]:di.snowy.vars()[0]),t.city.morale.weather=t.race.submerged?0:v,p+=t.race.submerged?0:v,t.race.motivated&&(p+=Math.ceil(t.race.motivated**.4));let b=0,q=5;t.city.morale.unemployed=0,t.city.ptrait.includes("mellow")?q*=Fi.mellow.vars()[0]:(p-=t.civic.unemployed.workers,t.city.morale.unemployed=-t.civic.unemployed.workers);let M=Oi("vulpine");if(t.civic.hunter.display&&(t.race.playful||M>0)){let e=0;M>0&&(e+=di.playful.vars(1)[0]*M),t.race.playful&&(e+=di.playful.vars()[0]),p+=t.civic.hunter.workers*e,t.city.morale.unemployed=t.civic.hunter.workers*e}else b-=t.civic.hunter.workers/q;t.race.optimistic&&(b+=di.optimistic.vars()[0]);let P=Oi("gecko");if(P>0&&(b+=di.optimistic.vars(1)[0]*P),t.race.pessimistic&&(b-=di.pessimistic.vars()[0]),t.civic.garrison){let e=2;t.city.ptrait.includes("mellow")&&(e*=Fi.mellow.vars()[0]);let a=t.civic.garrison.max/e;t.race.high_pop&&(a/=di.high_pop.vars()[0]),b-=a}if(r.p.consume.Money[z("trade")]=0,t.tech.trade||t.race.banana&&t.tech.primitive&&t.tech.primitive>=3){let e=0,s=D("dealmaker",0);Object.keys(t.resource).forEach((function(i){if(t.resource[i].trade>0){e+=t.resource[i].trade;let c=br(i)*t.resource[i].trade;if(t.resource.Money.amount>=c*f){let e=Va[i];s&&(e*=1+s/100),t.race.persuasive&&(e*=1+di.persuasive.vars()[0]*t.race.persuasive/100),t.race.merchant&&(e*=1+di.merchant.vars()[1]/100);let o=Oi("goblin");if(o>0&&(e*=1+di.merchant.vars(1)[1]/100*o),"capricorn"===a&&(e*=1+U("capricorn")[0]/100),t.genes.trader&&(e*=1+uc()/100),t.stats.achieve.hasOwnProperty("trade")){let a=2*t.stats.achieve.trade.l;a>10&&(a=10),e*=1+a/100}t.race.truepath&&(e*=1-t.civic.foreign.gov3.hstl/101),Ji(i,t.resource[i].trade*f*e),Ji("Money",-c*f),r.p.consume.Money[z("trade")]-=c,r.p.consume[i][z("trade")]=t.resource[i].trade*e}Co()}else if(t.resource[i].trade<0){e-=t.resource[i].trade;let a=yr(i)*t.resource[i].trade,s=Va[i];if(t.stats.achieve.hasOwnProperty("trade")){let e=t.stats.achieve.trade.l;e>5&&(e=5),s*=1-e/100}t.resource[i].amount>=s*f&&(Ji(i,t.resource[i].trade*f*s),Ji("Money",-a*f),r.p.consume.Money[z("trade")]-=a,r.p.consume[i][z("trade")]=t.resource[i].trade*s),Co()}})),t.city.market.trade=e}if(0===r.p.consume.Money[z("trade")]&&delete r.p.consume.Money[z("trade")],t.tech.alchemy){let e=0,a=0,s=0;Object.keys(t.race.alchemy).forEach((function(i){if(t.race.alchemy[i]>0){let c=Number(t.race.alchemy[i]);if(t.resource.Mana.amount=f){let s=t.resource[i].basic&&t.tech.alchemy>=2?8*Va[i]:2*Va[i];t.race.witch_hunter&&(s*=3),t.stats.achieve.soul_sponge&&t.stats.achieve.soul_sponge.mg&&(s*=t.stats.achieve.soul_sponge.mg+1),Ji(i,c*f*s),Ji("Mana",-c*f),Ji("Crystal",-.15*c*f),e-=c,a-=.15*c,r.p.consume[i][z("tab_alchemy")]=c*s,"magic"===t.race.universe&&!t.resource[i].basic&&t.tech.alchemy>=2&&eo("fullmetal")}}})),t.race.totTransmute=s,r.p.consume.Mana[z("tab_alchemy")]=e,r.p.consume.Crystal[z("tab_alchemy")]=a}if(t.galaxy.trade&&(n.hasOwnProperty("freighter")||n.hasOwnProperty("super_freighter"))){let e=0;t.galaxy.freighter&&(e+=2*n.freighter),t.galaxy.super_freighter&&(e+=5*n.super_freighter),t.galaxy.trade.max=e;let s=0,i=_r();for(let c=0;c0&&(u*=1+di.merchant.vars(1)[1]/100*p),"capricorn"===a&&(u*=1+U("capricorn")[0]/100),t.genes.trader&&(u*=1+uc()/100),t.stats.achieve.hasOwnProperty("trade")){let e=t.stats.achieve.trade.l;e>5&&(e=5),u*=1+e/50,n*=1-e/100}s+=t.galaxy.trade[`f${c}`],s>e&&(t.galaxy.trade[`f${c}`]-=s-e,t.galaxy.trade[`f${c}`]<0&&(t.galaxy.trade[`f${c}`]=0));let h=It("gxy_gorddon");for(let e=0;e0&&(r.p.consume[o][z("trade")]?r.p.consume[o][z("trade")]-=d:r.p.consume[o][z("trade")]=-d),_>0&&(r.p.consume[l][z("trade")]?r.p.consume[l][z("trade")]+=_:r.p.consume[l][z("trade")]=_),h<1&&(r.p.consume[l][z("galaxy_piracy")]?r.p.consume[l][z("galaxy_piracy")]+=-(1-h)*_:r.p.consume[l][z("galaxy_piracy")]=-(1-h)*_),0===r.p.consume[o][z("trade")]&&delete r.p.consume[o][z("trade")],0===r.p.consume[l][z("trade")]&&delete r.p.consume[l][z("trade")]}t.galaxy.trade.cur=s}t.race.deconstructor&&t.city.nanite_factory&&Js.forEach((function(e){if(t.resource[e].display){let a=t.city.nanite_factory[e]*f;if(a>0&&(t.resource[e].amount=1e3){let e=t.race.lone_survivor?100:1e4;C-=e,O+=e,s[z("tau_star_ringworld")]=e}if(t.interstellar.orichalcum_sphere&&t.interstellar.orichalcum_sphere.count>0){let e=0;e=t.interstellar.orichalcum_sphere.count>=100?oc(1750):oc(750+8*t.interstellar.orichalcum_sphere.count),C-=e,O+=e,s[z("interstellar_dyson_sphere_title")]=e,delete s[z("tech_dyson_net")]}else if(t.interstellar.dyson_sphere&&t.interstellar.dyson_sphere.count>0){let e=0;e=t.interstellar.dyson_sphere.count>=100?oc(750):oc(175+5*t.interstellar.dyson_sphere.count),C-=e,O+=e,s[z("interstellar_dyson_sphere_title")]=e,delete s[z("tech_dyson_net")]}else if(t.interstellar.dyson&&t.interstellar.dyson.count>=1){let e=0;e=t.interstellar.dyson.count>=100?oc(175):oc(1.25*t.interstellar.dyson.count),C-=e,O+=e,s[z("tech_dyson_net")]=e}if(t.interstellar.stellar_engine&&t.interstellar.stellar_engine.count>=100){let e=t.tech.gravity&&t.tech.gravity>=2?13.5:7.5,a=t.interstellar.stellar_engine.mass;t.tech.roid_eject&&(a+=.225*t.tech.roid_eject*(1+t.tech.roid_eject/12));let r=oc(20+(a-8)*e+t.interstellar.stellar_engine.exotic*e*10);C-=r,O+=r,s[z("tech_stellar_engine")]=r}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(e){let a=Et(e.r),c="city"===e.r?e.r:a,o="city"===e.r?Zr.city:Zr[a][e.r],n="string"==typeof o[e.s].title?o[e.s].title:o[e.s].title();if(t[c][e.s]&&t[c][e.s].on){let a=o[e.s].powered();if(i[e.s]=t[c][e.s].on,o[e.s].hasOwnProperty("p_fuel")){let t=o[e.s].p_fuel();Array.isArray(t)||(t=[t]);for(let a=0;a=3&&i.coal_power){let e=.35*i.coal_power*Oe("psychic_boost","Uranium");r.p.Uranium[z("city_coal_ash")]=e/65/d,Ji("Uranium",e*f/65)}if(t.space.hydrogen_plant){let e=Zr.space.spc_titan.hydrogen_plant.powered();t.space.hydrogen_plant.on>t.space.electrolysis.on&&(t.space.hydrogen_plant.on=t.space.electrolysis.on);let a=t.space.hydrogen_plant.on*e;C+=a,O-=a,s[z("space_hydrogen_plant_title")]=-a}if(t.portal.inferno_power){let e=Zr.portal.prtl_ruins.inferno_power.fuel,a=t.portal.inferno_power.on;Object.keys(e).forEach((function(s){let i=a*e[s];for(;i*f>t.resource[s].amount+(t.resource[s].diff>0?t.resource[s].diff*f:0)&&i>0;)a--,i-=e[s];r.p.consume[s][z("portal_inferno_power_title")]=-i,Ji(s,-i*f)}));let i=a*Zr.portal.prtl_ruins.inferno_power.powered();C+=i,O-=i,s[z("portal_inferno_power_title")]=-i}if(t.space.swarm_satellite&&t.space.swarm_control){let e=t.space.swarm_satellite.count;e>t.space.swarm_control.s_max&&(e=t.space.swarm_control.s_max),t.space.swarm_control.support=e;let a=.35;t.tech.swarm>=4&&(a+=.15*(t.tech.swarm-3)),t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=1&&(a+=.15),t.blood.illuminate&&(a+=.01*t.blood.illuminate),a=+a.toFixed(2);let r=oc(e*a);C-=r,O+=r,s[z("space_sun_swarm_satellite_title")]=r}if(t.city.mill&&t.tech.agriculture&&t.tech.agriculture>=6){let e=oc(t.city.mill.on*Zr.city.mill.powered());C+=e,O-=e,s[z("city_mill_title2")]=-e}if(t.city.windmill&&t.tech.wind_plant){let e=oc(t.city.windmill.count*Zr.city.windmill.powered());C+=e,O-=e,s[z("city_mill_title2")]=-e}if(t.race.powered){let e=di.powered.vars()[0]*t.resource[t.race.species].amount;t.race.discharge&&t.race.discharge>0&&(e=+(1.25*e).toFixed(3)),O-=e}t.race.replicator&&(t.city.replicator={count:t.race.replicator.pow,on:t.race.replicator.pow});let j=t.power;if(t.settings.lowPowerBalance){let e=0;for(let a=0;a=0;y--){let e=j[y].split(":"),c=Et(e[0]),o="city"===e[0]?e[0]:c,n="city"===e[0]?Zr.city:Zr[c][e[0]];if(t[o][e[1]]&&t[o][e[1]].on&&(i[e[1]]=t[o][e[1]].on,n[e[1]].hasOwnProperty("p_fuel"))){let t=n[e[1]].p_fuel();Array.isArray(t)||(t=[t]);for(let s=0;sO&&i[r[1]]>0){let e="city"===r[0]?"city":Et(r[0]),s="city"===r[0]?Zr.city:Zr[e][r[0]],c=s[r[1]].powerBalancer();if(c){let o=i[r[1]];c.forEach((function(i){let c=0;if(i.hasOwnProperty("r")&&i.hasOwnProperty("k")){let n=t[e][r[1]][i.k]?t[e][r[1]][i.k]:0;t.resource[i.r].odif&&t.resource[i.r].odif<0&&(t.resource[i.r].odif=0);let l=t.resource[i.r].diff+(t.resource[i.r].odif?t.resource[i.r].odif:0);for(;l-c*n>n&&o>0&&a>O;)o--,c++,a-=s[r[1]].powered();t.resource[i.r].odif=n*c}else if(i.hasOwnProperty("s")){let n=s[r[1]].support();t[e][r[1]].soff&&t[e][r[1]].soff<0&&(t[e][r[1]].soff=0);let l=i.s+(t[e][r[1]].soff?t[e][r[1]].soff:0);for(;l-n*c>=n&&o>0&&a>O;)o--,c++,a-=s[r[1]].powered();t[e][r[1]].soff=n*c}})),i[r[1]]=o}}}for(y=j.length-1;y>=0;y--){let e=j[y].split(":"),r=Et(e[0]),s="city"===e[0]?e[0]:r,c="city"===e[0]?Zr.city:Zr[r][e[0]];if(t[s][e[1]]&&t[s][e[1]].on){let r=c[e[1]].powered();for(;a>O&&i[e[1]]>0;)a-=r,i[e[1]]--;i[e[1]]!==t[s][e[1]].on?($(`#${s}-${e[1]} .on`).addClass("warn"),$(`#${s}-${e[1]} .on`).prop("title",`ON ${i[e[1]]}/${t[s][e[1]].on}`)):($(`#${s}-${e[1]} .on`).removeClass("warn"),$(`#${s}-${e[1]} .on`).prop("title","ON"))}else i[e[1]]=0,$(`#${s}-${e[1]} .on`).removeClass("warn"),$(`#${s}-${e[1]} .on`).prop("title","ON")}O-=e}else for(y=0;yO&&o>0;)o-=c[e[1]].powered(),i[e[1]]--;if(O-=t[s][e[1]].on*a,c[e[1]].hasOwnProperty("p_fuel")){let t=c[e[1]].p_fuel();Array.isArray(t)||(t=[t]);for(let a=0;at.resource.Elerium.amount&&a>0;)a-=e,i.foothold--;r.p.consume.Elerium[z("galaxy_foothold")]=-a,Ji("Elerium",-a*f)}[{a:"space",r:"spc_moon",s:"moon_base",g:"moon"},{a:"space",r:"spc_red",s:"spaceport",g:"red"},{a:"space",r:"spc_titan",s:"electrolysis",g:"titan"},{a:"space",r:"spc_titan",r2:"spc_enceladus",s:"titan_spaceport",g:"enceladus"},{a:"space",r:"spc_eris",s:"drone_control",g:"eris"},{a:"tauceti",r:"tau_home",s:"orbital_station",g:"tau_home"},{a:"tauceti",r:"tau_red",s:"orbital_platform",g:"tau_red"},{a:"tauceti",r:"tau_roid",s:"patrol_ship",g:"tau_roid",oc:!0}].forEach((function(e){if(e.r2=e.r2||e.r,t[e.a][e.s]&&t[e.a][e.s].count>0){if(j.includes(`${e.r}:${e.s}`)||(i[e.s]=t[e.a][e.s].on),Zr[e.a][e.r][e.s].hasOwnProperty("support_fuel")){let a=Zr[e.a][e.r][e.s].support_fuel();Array.isArray(a)||(a=[a]);for(let s=0;s=2?i.nav_beacon*Zr.space.spc_home.nav_beacon.support():0;break;case"red":t[e.a][e.s].s_max+=t.tech.mars&&t.tech.mars>=3?i.red_tower*Zr.space.spc_red.red_tower.support():0,t[e.a][e.s].s_max+=t.tech.luna&&t.tech.luna>=3?i.nav_beacon*Zr.space.spc_home.nav_beacon.support():0;break;case"tau_home":t[e.a][e.s].s_max+=i.tau_farm?i.tau_farm:0}}if(t[e.a][e.s]&&"spc_eris"===e.r&&!i.ai_core2&&(t[e.a][e.s].s_max=0),t[e.a][e.s]){let s=0,i=t.support[e.g].map((e=>e.split(":")[1]));for(var a=0;at[e.a][e.s].s_max&&!e.oc?(l-=s+l-t[e.a][e.s].s_max,$(`#${o} .on`).addClass("warn"),$(`#${o} .on`).prop("title",`ON ${l}/${t[e.a][i[a]].on}`)):($(`#${o} .on`).removeClass("warn"),$(`#${o} .on`).prop("title","ON")),Zr[e.a][e.r2][i[a]].hasOwnProperty("support_fuel")){let t=Zr[e.a][e.r2][i[a]].support_fuel();Array.isArray(t)||(t=[t]);for(let s=0;s0){let e=i.red_factory*Yt(1,!0);Ji("Helium_3",-e*f),r.p.consume.Helium_3[z("space_red_factory_title")]=-e}if(i.int_factory&&i.int_factory>0){let e=i.int_factory*Xt(5);Ji("Deuterium",-e*f),r.p.consume.Deuterium[z("interstellar_int_factory_title")]=-e}if(c.water_freighter&&c.water_freighter>0){let e=Yt(5,!0),t=c.water_freighter*e;for(let a=0;a0){let e=+Xt(5),a=i.starport*e;r.p.consume.Helium_3[z("interstellar_alpha_starport_title")]=-a;for(let t=0;te.split(":")[1]));for(y=0;yt.interstellar.starport.s_max?(r-=e+r-t.interstellar.starport.s_max,$(`#${s} .on`).addClass("warn"),$(`#${s} .on`).prop("title",`ON ${r}/${t.interstellar[a[y]].on}`)):($(`#${s} .on`).removeClass("warn"),$(`#${s} .on`).prop("title","ON")),e+=r,o[a[y]]=r}else o[a[y]]=0;if(t.interstellar.starport.support=e,t.interstellar.hasOwnProperty("mining_droid")&&t.interstellar.mining_droid.count>0){let e=o.mining_droid,a=t.interstellar.mining_droid.on,r=a>0?e/a:0,s=a;["adam","uran","coal","alum"].forEach((function(e){s-=t.interstellar.mining_droid[e],s<0&&(t.interstellar.mining_droid[e]+=s,s=0),F[e]=t.interstellar.mining_droid[e]*r}))}}if(t.galaxy.starbase&&t.galaxy.starbase.count>0){let e=+Xt(25),a=i.starbase*e;r.p.consume.Helium_3[z("galaxy_starbase")]=-a;for(let t=0;te.split(":")[1]));for(y=0;yt.galaxy.starbase.s_max?(r-=e+r-t.galaxy.starbase.s_max,$(`#${s} .on`).addClass("warn"),$(`#${s} .on`).prop("title",`ON ${r}/${t.galaxy[a[y]].on}`)):($(`#${s} .on`).removeClass("warn"),$(`#${s} .on`).prop("title","ON")),e+=r*-Zr.galaxy.gxy_gateway[a[y]].support(),n[a[y]]=r}else n[a[y]]=0;t.galaxy.starbase.support=e}if(t.galaxy.foothold&&t.galaxy.foothold.count>0){t.galaxy.foothold.s_max=i.foothold*Zr.galaxy.gxy_alien2.foothold.support();let e=0,a=t.support.alien2.map((e=>e.split(":")[1]));for(y=0;yt.galaxy.foothold.s_max?(r-=e+r-t.galaxy.foothold.s_max,$(`#${s} .on`).addClass("warn"),$(`#${s} .on`).prop("title",`ON ${r}/${t.galaxy[a[y]].on}`)):($(`#${s} .on`).removeClass("warn"),$(`#${s} .on`).prop("title","ON")),e+=r*-Zr.galaxy.gxy_alien2[a[y]].support(),n[a[y]]=r}else n[a[y]]=0;t.galaxy.foothold.support=e}if(t.portal.guard_post){if(t.portal.guard_post.s_max=t.portal.guard_post.count*Zr.portal.prtl_ruins.guard_post.support(),t.portal.guard_post.on>0){let e=t.portal.fortress.garrison-t.portal.fortress.patrols*t.portal.fortress.patrol_size;if(i.soul_forge){let t=wa();t<=e&&(e-=t)}ee.split(":")[1]));for(y=0;yt.portal.harbour.s_max?(r-=e+r-t.portal.harbour.s_max,$(`#${s} .on`).addClass("warn"),$(`#${s} .on`).prop("title",`ON ${r}/${t.portal[a[y]].on}`)):($(`#${s} .on`).removeClass("warn"),$(`#${s} .on`).prop("title","ON")),e+=r*-Zr.portal.prtl_lake[a[y]].support(),n[a[y]]=r}else n[a[y]]=0;t.portal.harbour.support=e}if(t.portal.purifier){t.portal.purifier.s_max=i.purifier*Zr.portal.prtl_spire.purifier.support();let e=0,a=t.support.spire.map((e=>e.split(":")[1]));for(y=0;yt.portal.purifier.s_max?(r-=e+r-t.portal.purifier.s_max,$(`#${s} .on`).addClass("warn"),$(`#${s} .on`).prop("title",`ON ${r}/${t.portal[a[y]].on}`)):($(`#${s} .on`).removeClass("warn"),$(`#${s} .on`).prop("title","ON")),e+=r*-Zr.portal.prtl_spire[a[y]].support(),l[a[y]]=r}else l[a[y]]=0;t.portal.purifier.support=e}if(t.space.space_station&&t.space.space_station.count>0){let e=+Yt(2.5,!0),t=i.space_station*e;r.p.consume.Helium_3[z("space_belt_station_title")]=-t;for(let a=0;ae.split(":")[1]));for(y=0;yt.space.space_station.s_max){let i=e+r*-Zr.space.spc_belt[a[y]].support()-t.space.space_station.s_max;r-=Math.ceil(i/-Zr.space.spc_belt[a[y]].support()),$(`#${s} .on`).addClass("warn"),$(`#${s} .on`).prop("title",`ON ${r}/${t.space[a[y]].on}`)}else $(`#${s} .on`).removeClass("warn"),$(`#${s} .on`).prop("title","ON");e+=r*-Zr.space.spc_belt[a[y]].support(),c[a[y]]=r}else c[a[y]]=0;t.space.space_station.support=e}if(t.interstellar.nexus&&t.interstellar.nexus.count>0){let e=350,a=i.nexus*e;r.p.consume.Money[z("interstellar_nexus_bd")]=-a;for(let t=0;te.split(":")[1]));for(y=0;yt.interstellar.nexus.s_max?(r-=e+r-t.interstellar.nexus.s_max,$(`#${s} .on`).addClass("warn"),$(`#${s} .on`).prop("title",`ON ${r}/${t.interstellar[a[y]].on}`)):($(`#${s} .on`).removeClass("warn"),$(`#${s} .on`).prop("title","ON")),e+=r,o[a[y]]=r}else o[a[y]]=0;t.interstellar.nexus.support=e}if(t.interstellar.xfer_station&&i.xfer_station){let e=.28,t=i.xfer_station*e;r.p.consume.Uranium[z("interstellar_xfer_station_title")]=-t;for(let a=0;a0){let e=+Yt(2,!0),t=i.outpost*e;r.p.consume.Oil[z("space_gas_moon_outpost_bd")]=-t;for(let a=0;a0){let e=+Xt(3),t=i.neutron_miner*e;r.p.consume.Helium_3[z("interstellar_neutron_miner_title")]=-t;for(let a=0;ae.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 A=0,T=0,E=0;for(let e=0;eZr[a][r][i].ship.civ()&&(t.civic[t.civic.d_job].workers-=Zr[a][r][i].ship.civ(),t.civic.crew.workers+=Zr[a][r][i].ship.civ(),t[a][i].crew+=Zr[a][r][i].ship.civ()),t[a][i].crew>t[a][i].on*Zr[a][r][i].ship.civ()&&(t.civic[t.civic.d_job].workers+=Zr[a][r][i].ship.civ(),t.civic.crew.workers-=Zr[a][r][i].ship.civ(),t[a][i].crew-=Zr[a][r][i].ship.civ()),t.civic.crew.assigned=t.civic.crew.workers,A+=t[a][i].crew,E+=t[a][i].crew),Zr[a][r][i].ship.mil&&t[a][i].hasOwnProperty("mil")){if(t[a][i].mil!==t[a][i].on*Zr[a][r][i].ship.mil()&&(t[a][i].mil=t[a][i].on*Zr[a][r][i].ship.mil()),t.civic.garrison.workers-t.portal.fortress.garrison<0){let e=t.civic.garrison.workers-t.portal.fortress.garrison;t[a][i].mil-=e}T+t[a][i].mil>t.civic.garrison.workers-t.portal.fortress.garrison&&(t[a][i].mil=t.civic.garrison.workers-t.portal.fortress.garrison-T),t[a][i].mil<0&&(t[a][i].mil=0),T+=t[a][i].mil}t[a][i].crew0)&&(T+=ct(e))})),t.civic.garrison.crew=T),Object.keys(oa).forEach((function(e){if(t.civic[e]&&("crew"!==e&&(E+=t.civic[e].workers,E>t.resource[t.race.species].amount&&(t.civic[e].workers-=E-t.resource[t.race.species].amount),t.civic[e].workers<0&&(t.civic[e].workers=0)),"unemployed"!==e&&"hunter"!==e&&"forager"!==e)){let a=t.civic[e].stress;if(t.city.ptrait.includes("mellow")&&(a+=Fi.mellow.vars()[1]),t.race.content){let r="hell_surveyor"===e?.2:.4;a+=t.race.content*r}t.city.ptrait.includes("dense")&&"miner"===e&&(a-=Fi.dense.vars()[1]),t.race.freespirit&&"farmer"!==e&&"lumberjack"!==e&&"quarry_worker"!==e&&"crystal_miner"!==e&&"scavenger"!==e&&(a/=1+di.freespirit.vars()[0]/100);let r=t.civic[e].workers;t.race.high_pop&&(r/=di.high_pop.vars()[0]),t.race.sky_lover&&["miner","coal_miner","crystal_miner","pit_miner"].includes(e)&&(r*=1+di.sky_lover.vars()[0]/100),b-=r/a}})),t.civic[t.civic.d_job].workers+=t.resource[t.race.species].amount-E,t.civic[t.civic.d_job].workers<0&&(t.civic[t.civic.d_job].workers=0),Object.keys(oa).forEach((function(e){"craftsman"!==e&&t.civic[e]&&t.civic[e].workers0&&t.civic[e].workers40){let e=t.civic.taxes.tax_rate-40;t.city.morale.tax-=.5*e,p-=.5*e}if("oligarchy"===t.civic.govern.type&&t.civic.taxes.tax_rate>20){let e=t.civic.taxes.tax_rate-20;t.city.morale.tax+=.5*e,p+=.5*e}if(("autocracy"!==t.civic.govern.type&&!t.race.blood_thirst||t.race.immoral)&&t.civic.garrison.protest+t.civic.garrison.fatigue>2){let e=t.race.immoral?1+di.immoral.vars()[0]/100:1,a=Math.round(Math.log2(t.civic.garrison.protest+t.civic.garrison.fatigue)*e);t.city.morale.warmonger=t.race.immoral?a:-a,p+=t.city.morale.warmonger}else t.city.morale.warmonger=0;let K=100;if(K+=t.city.casino?i.casino:0,K+=t.space.spc_casino?i.spc_casino:0,K+=t.tauceti.tauceti_casino?i.tauceti_casino:0,t.city.amphitheatre){let e=D("athleticism",0);K+=e?t.city.amphitheatre.count*e:t.city.amphitheatre.count}if(c.vr_center&&(K+=2*c.vr_center),o.zoo&&(K+=2*o.zoo),i.resort&&(K+=2*i.resort),t.tech.superstar){let e=t.race.high_pop?Pe(1):1;K+=la(t.civic.entertainer.workers,"entertainer")*e}if($o=K,t.tech.monuments){let e=D("gaslighter",2),a=e?2-e:2;$o+=t.tech.monuments*a}if(t.civic.taxes.tax_rate<20&&!t.race.banana&&($o+=10-Math.floor(t.civic.taxes.tax_rate/2)),t.stats.achieve.joyless&&($o+=2*t.stats.achieve.joyless.l),t.race.motivated){let e=Math.ceil(t.race.motivated**.4);$o+=Math.round(e/2)}let L=50;if(t.race.optimistic&&(L+=di.optimistic.vars()[1]),P>0&&(L+=Math.round(di.optimistic.vars(1)[1]*P)),t.race.truepath&&(L-=25),t.civic.govern.fr>0){let e=p/2;t.city.morale.rev=e,p-=e,L-=10}else t.city.morale.rev=0;if(t.race.tormented)if(p>100){let e=p-100;e=Math.ceil(e*di.tormented.vars()[0]/100),p-=e,t.city.tormented=e}else t.city.tormented=0;else delete t.city.tormented;if(t.city.morale.potential=+p.toFixed(1),p$o&&(p=$o),t.city.morale.cap=$o,t.city.morale.current=p,t.city.morale.current<100)if(t.race.blissful){let e=t.city.morale.current-100,a=di.blissful.vars()[0]/100;d*=1+e*a/100,r.p.Global[z("morale")]=e*a+"%"}else d*=t.city.morale.current/100,r.p.Global[z("morale")]=t.city.morale.current-100+"%";else d*=1+(t.city.morale.current-100)/200,r.p.Global[z("morale")]=(t.city.morale.current-100)/2+"%";if(t.race.lazy&&2===t.city.calendar.temp&&(r.p.Global[z("trait_lazy_bd")]="-"+di.lazy.vars()[0]+"%",d*=1-di.lazy.vars()[0]/100),t.race.distracted&&(r.p.Global[z("event_m_curious3_bd")]="-5%",d*=.95),t.race.stimulated&&(r.p.Global[z("event_m_curious4_bd")]="+10%",d*=1.1),t.race.selenophobia){let e=t.city.calendar.moon>14?28-t.city.calendar.moon:t.city.calendar.moon;r.p.Global[z("moon_phase")]=-e+di.selenophobia.vars()[0]+"%",e=1+di.selenophobia.vars()[0]/100-e/100,d*=e}if(t.interstellar.mass_ejector){let e=0,a=0,s=0;Object.keys(t.interstellar.mass_ejector).forEach((function(c){if(Ja[c]){let o=t.interstellar.mass_ejector[c];e+o>1e3*i.mass_ejector&&(o=1e3*i.mass_ejector-e),e+=o,o>0&&(r.p.consume[c][z("interstellar_blackhole_name")]=-o),o*f>t.resource[c].amount&&(o=t.resource[c].amount/f),o<0&&(o=0),Ji(c,-.25*o),a+=o*Ja[c],"magic"===t.race.universe||"Elerium"!==c&&"Infernite"!==c||(s+=o*Ja[c])}})),t.interstellar.mass_ejector.mass=a,t.interstellar.mass_ejector.total=e,t.interstellar.stellar_engine.mass+=a/1e10*f,t.interstellar.stellar_engine.exotic+=s/1e10*f}if(t.portal.transport&&t.portal.purifier){let e=0,a=0,s=t.blood.spire&&t.blood.spire>=2?.8:.85;if(Object.keys(t.portal.transport.cargo).forEach((function(i){if(Ya[i]){let c=t.portal.transport.cargo[i];e+c>5*n.transport&&(c=5*n.transport-e),e+=c;let o=c*Ya[i].out;for(;o*f>t.resource[i].amount&&o>0;)o-=Ya[i].out,c--;o>0&&(r.p.consume[i][z("portal_transport_title")]=-o);let l=1-s**(n.bireme||0);Ji(i,-.25*o),a+=Number(c*Ya[i].in*f*l)}})),t.portal.mechbay)for(let e=0;et.portal.purifier.sup_max&&(t.portal.purifier.supply=t.portal.purifier.sup_max)}if(t.race.carnivore&&!t.race.herbivore&&!t.race.soul_eater&&!t.race.artifical&&t.resource.Food.amount>10){let e=di.carnivore.vars()[0]/100,a=+((t.resource.Food.amount-10)*e).toFixed(3);t.city.smokehouse&&(a*=.9**t.city.smokehouse.count),Ji("Food",-a*f),r.p.consume.Food[z("spoilage")]=-a}if(t.race.gnawer){let e=t.race.kindling_kindred||t.race.smoldering?"Stone":"Lumber";if(t.resource[e].display){let a=(t.resource[t.race.species].amount+t.civic.garrison.workers)*di.gnawer.vars()[0];r.p.consume[e][z("trait_gnawer_bd")]=-a,Ji(e,-a*f)}}var x=!0;if(t.resource[t.race.species].amount>=1||t.city.farm||t.city.soul_well||t.city.compost||t.city.tourist_center||t.city.transmitter){let e=0,s="virgo"===a?1+U("virgo")[0]/100:1;if(t.race.artifical)t.city.transmitter&&(e=i.transmitter*Oe("transmitter")*Oe("psychic_boost","Food"),r.p.Food[z("city_transmitter")]=e+"v",t.city.transmitter.lpmod=Oe("transmitter")*d*Oe("psychic_boost","Food"));else if(t.race.detritivore){if(t.city.compost){let a=t.city.compost.on;if(!t.race.kindling_kindred){let e=.5,s=a*e;for(;s*f>t.resource.Lumber.amount&&s>0;)s-=e,a--;r.p.consume.Lumber[z("city_compost_heap")]=-s,Ji("Lumber",-s*f)}let s=di.detritivore.vars()[0]/100,i=a*(1.2+t.tech.compost*s);i*="grassland"===t.city.biome?Si.grassland.vars()[0]:1,i*="savanna"===t.city.biome?Si.savanna.vars()[0]:1,i*="ashland"===t.city.biome?Si.ashland.vars()[0]:1,i*="volcanic"===t.city.biome?Si.volcanic.vars()[0]:1,i*="hellscape"===t.city.biome?Si.hellscape.vars()[0]:1,i*=t.city.ptrait.includes("trashed")?Fi.trashed.vars()[0]:1,i*=Oe("psychic_boost","Food"),r.p.Food[z("city_compost_heap")]=i+"v",e+=i}}else if(t.race.carnivore||t.race.soul_eater){let a=ke(),s=la(t.civic.hunter.workers,"hunter");if(s*=hi(s,"hunting"),t.race.servants&&(s+=t.race.servants.jobs.hunter),s*=a*(t.race.carnivore?2:.5),t.race.ghostly&&(s*=1+di.ghostly.vars()[0]/100),s*=Oe("psychic_boost","Food"),r.p.Food[z(t.race.unfathomable?"job_raider":"job_hunter")]=s+"v",t.race.carnivore&&t.city.lodge&&s>0&&(s*=1+t.city.lodge.count/20,r.p.Food[`ᄂ${z("city_lodge")}`]=5*t.city.lodge.count+"%"),t.city.soul_well){let e=t.city.soul_well.count*(t.race.ghostly?2+di.ghostly.vars()[1]:2);s+=e*Oe("psychic_boost","Food"),r.p.Food[z("city_soul_well")]=e+"v"}e+=s}else if(t.race.unfathomable){if(t.city.captive_housing){let a=ke(),s=la(t.civic.hunter.workers,"hunter")*a;s*=hi(s,"hunting"),t.race.servants&&(s+=t.race.servants.jobs.hunter*a);let i=.008*s;if(t.city.captive_housing.cattle0&&(s-=Math.round(t.city.captive_housing.cattle**1.25),s=t.city.captive_housing.cattle**2&&(t.city.captive_housing.cattle++,t.city.captive_housing.cattleCatch=0),t.city.captive_housing.cattle>0&&t.resource.Food.amount<.01*t.resource.Food.max&&(t.city.captive_housing.cattle--,t.resource.Food.amount+=1e3,t.stats.cattle++)),t.city.captive_housing.cattle>0){let a=t.city.captive_housing.cattle/3*Oe("psychic_boost","Food");r.p.Food[z("city_captive_housing_cattle_bd")]=a+"v",e+=a}}}else if(t.city.farm||t.race.forager){let a=1;if(t.race.submerged||(0===t.city.calendar.temp&&(0===t.city.calendar.weather?a*=t.race.chilled?1+di.chilled.vars()[3]/100:.7:a*=t.race.chilled?1+di.chilled.vars()[4]/100:.85),2===t.city.calendar.weather&&(a*=t.race.chilled?1-di.chilled.vars()[5]/100:1.1)),t.race.forager){let a=1+(t.tech.foraging?.75*t.tech.foraging:0),s=la(t.civic.forager.workers,"forager");t.race.servants&&(s+=t.race.servants.jobs.forager);let i=s*a*.35;r.p.Food[z("job_forager")]=i+"v",e+=i}if(t.city.farm){let i=la(t.civic.farmer.workers,"farmer"),c=0;i>ua(t.city.farm.count)&&(c=i-ua(t.city.farm.count),i=ua(t.city.farm.count));let o=i*ha(!0)+c*ha(!1);if(t.race.servants){let e=ua(t.race.servants.jobs.farmer),a=0,r=ua(t.city.farm.count)-i;e>r&&(a=e-r,e=r),o+=e*ha(!0,!0)+a*ha(!1,!0)}let n=1;if(t.city.mill){let e=t.tech.agriculture>=5?.05:.03;n+=(t.city.mill.count-t.city.mill.on)*e}r.p.Food[z("job_farmer")]=o+"v",e+=o*s*a*n*h*Oe("psychic_boost","Food"),o>0&&(r.p.Food[`ᄂ${z("city_mill_title1")}`]=100*(n-1)+"%",r.p.Food[`ᄂ${z("sign_virgo")}+0`]=100*(s-1)+"%",r.p.Food[`ᄂ${z("morale_weather")}`]=100*(a-1)+"%",r.p.Food[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%")}}if(t.tauceti.tau_farm&&i.tau_farm){let e=1+.5*(c.colony||0),t=Oe("tau_farm","food")*i.tau_farm*Oe("psychic_boost","Food"),a=t*d*e;r.p.Food[z("tau_home_tau_farm")]=t+"v",t>0&&(r.p.Food[`ᄂ${z("tau_home_colony")}`]=100*(e-1)+"%"),Ji("Food",a*f)}let n=0;t.tech.military&&(n=t.race.herbivore&&!t.race.carnivore||t.race.artifical?0:qe(Me(),"hunting")/3);let l=0,u=mt("spc_red");t.tech.mars&&(l=c.biodome*la(t.civic.colonist.workers,"colonist")*Oe("biodome","food")*Oe("psychic_boost","Food"),(t.race.cataclysm||t.race.orbit_decayed)&&(l+=c.biodome*Oe("biodome","cat_food")*Oe("psychic_boost","Food"))),r.p.Food[Zr.space.spc_red.biodome.title()]=l+"v",l>0&&(r.p.Food[`ᄂ${z("space_syndicate")}+0`]=-100*(1-u)+"%",r.p.Food[`ᄂ${z("space_red_ziggurat_title")}+0`]=100*(_-1)+"%",r.p.Food[`ᄂ${z("sign_virgo")}+0`]=100*(s-1)+"%");let p=e+n*h+l*u*_*s;p*=d;let m=t.civic.garrison.workers;t.race.parasite&&!t.tech.isolation&&(m-=2,m<0&&(m=0));let g=t.resource[t.race.species].amount+m-.5*(t.civic.unemployed.workers+la(t.civic.hunter.workers,"hunter"));t.race.forager&&(g-=la(t.civic.forager.workers,"forager")),g*=t.race.gluttony?1+di.gluttony.vars()[0]/100:1,t.race.high_metabolism&&(g*=1+di.high_metabolism.vars()[0]/100),t.race.sticky&&(g*=1-di.sticky.vars()[0]/100);let v=Oi("pinguicula");if(v>0&&(g*=1-di.sticky.vars(1)[0]/100*v),t.race.photosynth)switch(t.city.calendar.weather){case 0:g*=0===t.city.calendar.temp?1:1-di.photosynth.vars()[2]/100;break;case 1:g*=1-di.photosynth.vars()[1]/100;break;case 2:g*=1-di.photosynth.vars()[0]/100}t.race.ravenous&&(g*=1+di.ravenous.vars()[0]/100,g+=t.resource.Food.amount/di.ravenous.vars()[1]),t.race.hibernator&&3===t.city.calendar.season&&(g*=1-di.hibernator.vars()[0]/100),t.race.high_pop&&(g/=di.high_pop.vars()[0]),r.p.consume.Food[Tc("name")]=-g;let y=0;t.city.tourist_center&&(y=50*t.city.tourist_center.on,r.p.consume.Food[z("tech_tourism")]=-y);let b=0;t.space.spaceport&&(b=i.spaceport*(t.race.cataclysm||t.race.orbit_decayed?2:25),r.p.consume.Food[z("space_red_spaceport_title")]=-b);let w=0;t.interstellar.starport&&(w=100*i.starport,r.p.consume.Food[z("interstellar_alpha_starport_title")]=-w);let $=0;t.galaxy.starbase&&($=i.s_gate*i.starbase*250,r.p.consume.Food[z("galaxy_starbase")]=-$);let k=0;t.space.space_station&&(k=i.space_station*(t.race.cataclysm?1:10),r.p.consume.Food[z("space_belt_station_title")]=-k);let q=0;t.space.space_barracks&&!t.race.cataclysm&&(q=10*t.space.space_barracks.on,r.p.consume.Food[z("tech_space_marines_bd")]=-q);let M=0;t.galaxy.embassy&&(M=i.s_gate*i.embassy*7500,r.p.consume.Food[z("galaxy_embassy")]=-M);let P=0;t.interstellar.zoo&&(P=12e3*o.zoo,r.p.consume.Food[z("tech_zoo")]=-P);let O=p-g-y-b-w-$-k-q-M-P;if(r.p.Food[z("soldiers")]=n+"v",n>0&&(r.p.Food[`ᄂ${z("quarantine")}+1`]=100*(h-1)+"%"),!Ji("Food",O*f))if(t.race.anthropophagite&&t.resource[t.race.species].amount>1)t.resource[t.race.species].amount--,Ji("Food",1e4*di.anthropophagite.vars()[0]),t.stats.murders++;else{x=!1;let e=1.25;t.race.slow_digestion&&(e+=di.slow_digestion.vars()[0]);let a=Oi("slitheryn");a>0&&(e+=di.slow_digestion.vars(1)[0]*a),t.race.humpback&&(e+=di.humpback.vars()[0]),t.race.atrophy&&(e-=di.atrophy.vars()[0]),p1&&0===Math.rand(0,400)&&(t.resource[t.race.species].amount--,Ji("Food",1e4*di.anthropophagite.vars()[0]),t.stats.murders++)}if(t.portal.fortress&&t.portal.fortress.walls<100&&(Ji("Stone",-50)&&(t.portal.fortress.repair++,r.p.consume.Stone[z("portal_fortress_name")]=-200),t.portal.fortress.repair>=Zr.portal.prtl_fortress.info.repair()&&(t.portal.fortress.repair=0,t.portal.fortress.walls++)),t.race.psychic&&t.resource.Energy.display){let e={},t=di.psychic.vars()[2];e[z("trait_psychic_name")]=t+"v",Ji("Energy",t*f),r.p.Energy=e}if(t.civic.homeless>0){let e=Math.min(t.civic.homeless,t.resource[t.race.species].max-t.resource[t.race.species].amount);t.civic.homeless-=e,t.resource[t.race.species].amount+=e}else if(x&&t.resource.Food.amount>0&&t.resource[t.race.species].max>t.resource[t.race.species].amount)if(t.race.artifical||t.race.spongy&&0===t.city.calendar.weather);else if(!t.race.parasite||0!==t.city.calendar.wind||t.race.cataclysm||t.race.orbit_decayed)if(t.race.vax&&t.race.vax>=100);else{var k=t.tech.reproduction?t.tech.reproduction:0;t.tech.reproduction&&1===e.getMonth()&&14===e.getDate()&&(k+=5),t.race.fast_growth&&(k*=di.fast_growth.vars()[0],k+=di.fast_growth.vars()[1]),t.race.spores&&1===t.city.calendar.wind&&(t.race.parasite?k+=di.spores.vars()[2]:(k+=di.spores.vars()[0],k*=di.spores.vars()[1])),t.tech.reproduction&&t.tech.reproduction>=2&&t.city.hospital&&(k+=t.city.hospital.count),t.genes.birth&&(k+=t.genes.birth),t.race.promiscuous&&(k+=di.promiscuous.vars()[0]*t.race.promiscuous),"libra"===a&&(k*=1+U("libra")[0]/100),t.race.high_pop&&(k*=di.high_pop.vars()[2]),"taiga"===t.city.biome&&(k*=Si.taiga.vars()[1]);let r=t.city.ptrait.includes("toxic")?t.resource[t.race.species].amount*Fi.toxic.vars()[1]:t.resource[t.race.species].amount;t.race.parasite&&(t.race.cataclysm||t.race.orbit_decayed)&&(k=Math.round(k/5),r*=3),Math.rand(0,1.810792884997279*r)<=k&&t.resource[t.race.species].amount++}let N=0,B=0;if(i.s_gate){let e=["freighter","super_freighter","minelayer","raider"];for(let a=0;a0;if(i.s_gate&&o&&t[a][c]&&(t[a][c].crew>0||t[a][c].mil>0)){let e=0;if(Zr[a][r][c].ship.civ()>0&&(e=Math.floor(t[a][c].crew/Zr[a][r][c].ship.civ())),Zr[a][r][c].ship.mil()>0){let s=Math.floor(t[a][c].mil/Zr[a][r][c].ship.mil());(0===Zr[a][r][c].ship.civ()||st.resource.Helium_3.amount+(t.resource.Helium_3.diff>0?t.resource.Helium_3.diff*f:0)&&i>0;)i-=s,e--;Ji("Helium_3",-i*f),N+=i}if(Zr[a][r][c].ship.hasOwnProperty("deuterium")){let s=+Xt(Zr[a][r][c].ship.deuterium).toFixed(2),i=e*s;for(;i*f>t.resource.Deuterium.amount+(t.resource.Deuterium.diff>0?t.resource.Deuterium.diff*f:0)&&i>0;)i-=s,e--;Ji("Deuterium",-i*f),B+=i}n.hasOwnProperty(c)?n[c]=n[c]>e?e:n[c]:n[c]=e}else n[c]=0}}if(r.p.consume.Helium_3[z("galaxy_fuel_consume")]=-N,r.p.consume.Deuterium[z("galaxy_fuel_consume")]=-B,t.space.shipyard&&t.space.shipyard.ships){let e={Oil:0,Helium_3:0,Uranium:0,Elerium:0};t.space.shipyard.ships.forEach((function(a){if("spc_dwarf"!==a.location){let r=ut(a);r.res&&r.burn>0?r.burn*f0?t.resource[r.res].diff*f:0)?(Ji(r.res,-r.burn*f),a.fueled=!0,e[r.res]+=r.burn):a.fueled=!1:a.fueled=!0}})),r.p.consume.Oil[z("outer_shipyard_fleet")]=-e.Oil,r.p.consume.Helium_3[z("outer_shipyard_fleet")]=-e.Helium_3,r.p.consume.Uranium[z("outer_shipyard_fleet")]=-e.Uranium,r.p.consume.Elerium[z("outer_shipyard_fleet")]=-e.Elerium}t.race.emfield&&(t.race.discharge&&t.race.discharge>0?t.race.discharge--:(t.race.emfield++,0===Math.rand(0,500)&&(t.race.discharge=t.race.emfield,t.race.emfield=1)));let G=x?1:.5;if(t.race.angry&&!1===x&&(G-=di.angry.vars()[0]/100),t.race.malnutrition&&!1===x&&(G+=di.malnutrition.vars()[0]/100),t.resource.Furs.display){if(t.race.evil||t.race.artifical||t.race.unfathomable){let e=ke(),a=la(t.civic.hunter.workers,"hunter");if(a*=hi(a,"hunting"),t.race.servants&&(a+=ua(t.race.servants.jobs.hunter)),a*=e/20,"savanna"===t.city.biome&&(a*=Si.savanna.vars()[1]),t.race.high_pop&&(a=Pe(a)),a*=Oe("psychic_boost","Furs"),r.p.Furs[z(t.race.unfathomable?"job_raider":"job_hunter")]=a+"v",a>0&&(r.p.Furs[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%"),Ji("Furs",a*G*d*f*h),!t.race.soul_eater&&t.race.evil){let e=la(t.civic.lumberjack.workers,"lumberjack");e*=hi(e,"lumberjack"),t.race.servants&&(e+=t.race.servants.jobs.lumberjack),e/=4,e*=Oe("psychic_boost","Furs"),r.p.Furs[z("job_reclaimer")]=e+"v",e>0&&(r.p.Furs[`ᄂ${z("quarantine")}+1`]=100*(h-1)+"%"),Ji("Furs",e*G*d*f*h)}}let e=qe(Me(),"hunting")/10;if("oceanic"===t.city.biome?e*=Si.oceanic.vars()[2]:"tundra"===t.city.biome&&(e*=Si.tundra.vars()[0]),e*=Oe("psychic_boost","Furs"),r.p.Furs[z("soldiers")]=e+"v",e>0&&(r.p.Furs[`ᄂ${z("quarantine")}+2`]=100*(h-1)+"%"),Ji("Furs",e*G*d*h*f),t.race.forager){let e=1+(t.tech.foraging?.5*t.tech.foraging:0),a=la(t.civic.forager.workers,"forager");t.race.servants&&(a+=t.race.servants.jobs.forager);let s=a*e*.05*Oe("psychic_boost","Furs");r.p.Furs[z("job_forager")]=s+"v",s>0&&(r.p.Furs[`ᄂ${z("quarantine")}+3`]=100*(h-1)+"%"),Ji("Furs",s*G*h*f)}}if(t.resource.Furs.display&&t.tech.isolation&&t.tauceti.womling_farm){let e=t.tauceti.womling_farm.farmers*Oe("psychic_boost","Furs"),a=e*d;r.p.Furs[z("tau_red_womlings")]=e+"v",Ji("Furs",a)}if(t.race.unfathomable&&t.civic.hunter.display){let e=ke(),a=la(t.civic.hunter.workers,"hunter");a*=hi(a,"hunting"),t.race.servants&&(a+=ua(t.race.servants.jobs.hunter)),a*=e/20,t.race.high_pop&&(a=Pe(a)),["Lumber","Chrysotile","Stone","Crystal","Copper","Iron","Aluminium","Cement","Coal","Oil","Uranium","Steel","Titanium","Alloy","Polymer","Iridium"].forEach((function(e){if(t.resource[e].display){let s=a*Oe("psychic_boost",e)*Va[e]/5;["Crystal","Uranium"].includes(e)?s*=.2:["Alloy","Polymer","Iridium"].includes(e)?s*=.35:["Steel","Cement"].includes(e)?s*=.85:["Titanium"].includes(e)&&(s*=.65),r.p[e][z(t.race.unfathomable?"job_raider":"job_hunter")]=s+"v",s>0&&(r.p[e][`ᄂ${z("quarantine")}+99`]=100*(h-1)+"%"),Ji(e,s*G*d*f*h)}}))}{let e=t.tech.primitive&&t.tech.primitive>=3?1:0;t.race.ancient_ruins&&e++,t.stats.achieve.extinct_junker&&t.stats.achieve.extinct_junker.l>=1&&e++,t.city.ptrait.includes("magnetic")&&(e+=Fi.magnetic.vars()[0]),t.race.ascended&&(e+=2);let s=la(t.civic.professor.workers,"professor"),o=t.race.studious?t.civic.professor.impact+di.studious.vars()[0]:t.civic.professor.impact,n=Oi("elven");n>0&&(o+=di.studious.vars(1)[0]*n),s*=o,s*=t.race.pompous?1-di.pompous.vars()[0]/100:1,s*=hi(la(t.civic.professor.workers,"professor"),"science"),t.tech.anthropology&&t.tech.anthropology>=3&&(s*=1+.05*(t.race.cataclysm||t.race.orbit_decayed?t.space.ziggurat?t.space.ziggurat.count:0:t.city.temple.count)),"theocracy"===t.civic.govern.type&&(s*=1-re.theocracy()[1]/100);let l=la(t.civic.scientist.workers,"scientist");if(l*=t.civic.scientist.impact,l*=hi(la(t.civic.scientist.workers,"scientist"),"science"),t.tech.science>=6&&t.city.wardenclyffe){let e=la(t.civic.professor.workers,"professor");t.race.high_pop&&(e=Pe(e)),l*=1+e*i.wardenclyffe*.01}t.space.satellite&&(l*=1+.01*t.space.satellite.count),"theocracy"===t.civic.govern.type&&(l*=1-re.theocracy()[2]/100);let u=.05,_=D("muckraker",2);_&&(u-=_/100),t.race.autoignition&&(u-=di.autoignition.vars()[0]/100,u<0&&(u=0));let p=t.city.library?1+t.city.library.count*u:1,h="gemini"===a?1+U("gemini")[0]/100:1,m=0;if(t.arpa.sequence&&t.arpa.sequence.on&&t.arpa.sequence.time>0){let e=50+10*t.race.mutation;t.arpa.sequence.boost&&(e*=4),e*f<=t.resource.Knowledge.amount?(m=e,ko=!0):ko=!1}else t.arpa.hasOwnProperty("sequence")&&null===t.arpa.sequence.time&&(t.arpa.sequence.time=t.arpa.sequence.max),ko=!1;let g=t.tauceti.hasOwnProperty("womling_lab")?t.tauceti.womling_lab.scientist*(t.tech.womling_gene?10:8):0,v=t.tech.isolation?1+.75*(c.infectious_disease_lab||0):1,y=s+l+g;if(y*=G*d,y+=e*d,y*=p*v,r.p.Knowledge[z("job_professor")]=s+"v",r.p.Knowledge[z("job_scientist")]=l+"v",r.p.Knowledge[z("tau_red_womlings")]=g+"v",r.p.Knowledge[z("hunger")]=100*(G-1)+"%",r.p.Knowledge[t.race.unfathomable?z("tech_moondial"):z("tech_sundial")]=e+"v",t.race.inspired&&(r.p.Knowledge[z("event_inspiration_bd")]="100%",y*=2),t.city.library&&(r.p.Knowledge[z("city_library")]=100*(p-1)+"%"),"gemini"===a&&(r.p.Knowledge[z(`sign_${a}`)]=100*(h-1)+"%"),t.tech.isolation&&c.infectious_disease_lab&&(r.p.Knowledge[Zr.tauceti.tau_home.infectious_disease_lab.title()]=100*(v-1)+"%"),"technocracy"===t.civic.govern.type&&(r.p.Knowledge[z("govern_technocracy")]=re.technocracy()[2]+"%",y*=1+re.technocracy()[2]/100),m>0&&(y-=m,r.p.consume.Knowledge[z("genome_bd")]=-m),Ji("Knowledge",y*f),t.tech.tau_gas2&&t.tech.tau_gas2>=6&&(!t.tech.alien_data||t.tech.alien_data<6)&&t.tauceti.alien_space_station&&i.alien_space_station){let e=t.tauceti.alien_space_station.focus/100*y;r.p.consume.Knowledge[z("tau_gas2_alien_station")]=-e,Ji("Knowledge",-e*f),t.tauceti.alien_space_station.decrypted+=+e.toFixed(3),t.stats.know+=+e.toFixed(0),t.tauceti.alien_space_station.decrypted>=(t.race.lone_survivor?1e6:25e7)&&!t.tech.alien_data?(t.tech.alien_data=1,Bi(z("tau_gas2_alien_station_data1",[z("tech_dist_womling")]),"success",!1,["progress"]),gs()):t.tauceti.alien_space_station.decrypted>=(t.race.lone_survivor?2e6:5e8)&&t.tech.alien_data&&1===t.tech.alien_data?(t.tech.alien_data=2,t.race.tau_food_item=Math.rand(0,10),Bi(z("tau_gas2_alien_station_data2",[z(`tau_gas2_alien_station_data2_r${t.race.tau_food_item||0}`)]),"success",!1,["progress"]),gs()):t.tauceti.alien_space_station.decrypted>=(t.race.lone_survivor?3e6:75e7)&&t.tech.alien_data&&2===t.tech.alien_data?(t.tech.alien_data=3,Bi(z("tau_gas2_alien_station_data3"),"success",!1,["progress"]),gs()):t.tauceti.alien_space_station.decrypted>=(t.race.lone_survivor?48e5:12e8)&&t.tech.alien_data&&3===t.tech.alien_data?(t.tech.alien_data=4,t.race.tau_junk_item=Math.rand(0,10),Bi(z("tau_gas2_alien_station_data4",[z(`tau_gas2_alien_station_data4_r${t.race.tau_junk_item||0}`)]),"success",!1,["progress"]),gs()):t.tauceti.alien_space_station.decrypted>=(t.race.lone_survivor?6e6:15e8)&&t.tech.alien_data&&4===t.tech.alien_data?(t.tech.alien_data=5,Bi(z("tau_gas2_alien_station_data5"),"success",!1,["progress"]),gs()):t.tauceti.alien_space_station.decrypted>=(t.race.lone_survivor?1e7:25e8)&&t.tech.alien_data&&5===t.tech.alien_data&&(t.tech.alien_data=6,t.tauceti.alien_space_station.decrypted=25e8,t.race.lone_survivor?(t.settings.tau.star=!0,t.tech.matrix=2,t.tauceti.ringworld={count:0},Bi(z("tau_gas2_alien_station_data6_alt"),"success",!1,["progress"])):Bi(z("tau_gas2_alien_station_data6"),"success",!1,["progress"]),gs())}}let R=0;if(t.city.factory){let e=(i.factory||0)+(i.red_factory||0)+2*(i.int_factory||0)+(c.tau_factory||0)*(t.tech.isolation?5:3),a=t.city.factory.on+(t.space.red_factory?t.space.red_factory.on:0)+(t.interstellar.int_factory?2*t.interstellar.int_factory.on:0)+(t.tauceti.tau_factory?t.tauceti.tau_factory.on*(t.tech.isolation?5:3):0),s=a>0?e/a:0,o=a;["Lux","Furs","Alloy","Polymer","Nano","Stanene"].forEach((function(e){o-=t.city.factory[e],o<0&&(t.city.factory[e]+=o,o=0)}));let l=t.tech.factory||0,p=t.tech.isolation?1+.5*(c.colony||0):1;if(t.city.factory.Lux&&t.city.factory.Lux>0){let e=t.city.factory.Lux*Zs.Lux.fur[l]*s,a=t.city.factory.Lux;for(;e*f>t.resource.Furs.amount&&e>0;)e-=Zs.Lux.fur[l]*s,a--;r.p.consume.Furs[z("city_factory")]=-e,Ji("Furs",-e*f);let i=t.resource[t.race.species].amount*Zs.Lux.demand[l]*s;i=Vs(i);let c=a*i*p;R=c*G,t.race.discharge&&t.race.discharge>0&&(c*=.5),c*=d,Ji("Money",c*f)}if(t.city.factory.Furs&&t.city.factory.Furs>0){let e=Zs.Furs.money[l]*s,a=Zs.Furs.polymer[l]*s,i=t.city.factory.Furs*e,c=t.city.factory.Furs*a,o=t.city.factory.Furs;for(;c*f>t.resource.Polymer.amount&&c>0;)c-=a,i-=e,o--;for(;i*f>t.resource.Money.amount&&i>0;)c-=a,i-=e,o--;r.p.consume.Money[z("city_factory")]=-i,r.p.consume.Polymer[z("city_factory")]=-c,Ji("Money",-i*f),Ji("Polymer",-c*f);let n=o*Zs.Furs.output[l]*s*Oe("psychic_boost","Furs");t.race.toxic&&(n*=1+di.toxic.vars()[0]/100);let _=Oi("shroomi");_>0&&(n*=1+di.toxic.vars(1)[0]/100*_),"corpocracy"===t.civic.govern.type&&(n*=1+re.corpocracy()[4]/100),"socialist"===t.civic.govern.type&&(n*=1+re.socialist()[1]/100),t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=2&&(n*=1.1);let h=n*p;if(h*=G*d,r.p.Furs[z("city_factory")]=n+"v",h>0&&(p>0&&(r.p.Furs[`ᄂ${z("tau_home_colony")}`]=100*(p-1)+"%"),t.race.discharge&&t.race.discharge>0&&(h*=.5,r.p.Furs[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),t.tech.q_factory)){let e=(u-1)/8+1;h*=e,r.p.Furs[`ᄂ${z("quantum")}`]=100*(e-1)+"%"}Ji("Furs",h*f)}if(t.city.factory.Alloy&&t.city.factory.Alloy>0){let e=t.city.factory.Alloy*Zs.Alloy.copper[l]*s,a=t.city.factory.Alloy*Zs.Alloy.aluminium[l]*s,i=t.city.factory.Alloy;for(;e*f>t.resource.Copper.amount&&e>0;)e-=Zs.Alloy.copper[l]*s,a-=Zs.Alloy.aluminium[l]*s,i--;for(;a*f>t.resource.Aluminium.amount&&a>0;)e-=Zs.Alloy.copper[l]*s,a-=Zs.Alloy.aluminium[l]*s,i--;r.p.consume.Copper[z("city_factory")]=-e,r.p.consume.Aluminium[z("city_factory")]=-a,Ji("Copper",-e*f),Ji("Aluminium",-a*f);let c=i*Zs.Alloy.output[l]*s*Oe("psychic_boost","Alloy");t.race.toxic&&(c*=1+di.toxic.vars()[0]/100);let o=Oi("shroomi");o>0&&(c*=1+di.toxic.vars(1)[0]/100*o),t.tech.alloy&&(c*=1.37),t.race.metallurgist&&(c*=1+di.metallurgist.vars()[0]*t.race.metallurgist/100),"corpocracy"===t.civic.govern.type&&(c*=1+re.corpocracy()[4]/100),"socialist"===t.civic.govern.type&&(c*=1+re.socialist()[1]/100),t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=2&&(c*=1.1);let n=c*p;if(n*=G*d,r.p.Alloy[z("city_factory")]=c+"v",n>0){if(p>0&&(r.p.Alloy[`ᄂ${z("tau_home_colony")}`]=100*(p-1)+"%"),t.race.discharge&&t.race.discharge>0&&(n*=.5,r.p.Alloy[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),t.tech.q_factory){let e=(u-1)/2+1;n*=e,r.p.Alloy[`ᄂ${z("quantum")}`]=100*(e-1)+"%"}r.p.Alloy[z("hunger")]=100*(G-1)+"%"}Ji("Alloy",n*f)}else r.p.Alloy=0;if(t.city.factory.Polymer&&t.city.factory.Polymer>0){let e=t.race.kindling_kindred||t.race.smoldering?Zs.Polymer.oil_kk[l]*s:Zs.Polymer.oil[l]*s,a=t.race.kindling_kindred||t.race.smoldering?0:Zs.Polymer.lumber[l]*s,i=t.city.factory.Polymer*e,c=t.city.factory.Polymer*a,o=t.city.factory.Polymer;for(;c*f>t.resource.Lumber.amount&&c>0;)c-=a,i-=e,o--;for(;i*f>t.resource.Oil.amount&&i>0;)c-=a,i-=e,o--;r.p.consume.Lumber[z("city_factory")]=-c,r.p.consume.Oil[z("city_factory")]=-i,Ji("Lumber",-c*f),Ji("Oil",-i*f);let n=o*Zs.Polymer.output[l]*s*Oe("psychic_boost","Polymer");t.race.toxic&&(n*=1+di.toxic.vars()[0]/100);let _=Oi("shroomi");_>0&&(n*=1+di.toxic.vars(1)[0]/100*_),t.tech.polymer>=2&&(n*=1.42),"corpocracy"===t.civic.govern.type&&(n*=1+re.corpocracy()[4]/100),"socialist"===t.civic.govern.type&&(n*=1+re.socialist()[1]/100),t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=2&&(n*=1.1);let h=n*p;if(h*=G*d,r.p.Polymer[z("city_factory")]=n+"v",h>0&&(p>0&&(r.p.Polymer[`ᄂ${z("tau_home_colony")}`]=100*(p-1)+"%"),t.race.discharge&&t.race.discharge>0&&(h*=.5,r.p.Polymer[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),t.tech.q_factory)){let e=(u-1)/2+1;h*=e,r.p.Polymer[`ᄂ${z("quantum")}`]=100*(e-1)+"%"}r.p.Polymer[z("hunger")]=100*(G-1)+"%",Ji("Polymer",h*f)}if(i.s_gate&&t.galaxy.raider&&n.raider>0){let e=2.3*n.raider*Oe("psychic_boost","Polymer"),t=It("gxy_chthonian"),a=e*d*t*G*_;r.p.Polymer[z("galaxy_raider")]=e+"v",e>0&&(r.p.Polymer[`ᄂ${z("galaxy_piracy")}`]=-100*(1-t)+"%",r.p.Polymer[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%"),Ji("Polymer",a*f)}if(t.city.factory.Nano&&t.city.factory.Nano>0){let e=Zs.Nano_Tube.coal[l]*s,a=Zs.Nano_Tube.neutronium[l]*s,i=t.city.factory.Nano*e,c=t.city.factory.Nano*a,o=t.city.factory.Nano;for(;c*f>t.resource.Neutronium.amount&&c>0;)c-=a,i-=e,o--;for(;i*f>t.resource.Coal.amount&&i>0;)c-=a,i-=e,o--;r.p.consume.Coal[z("city_factory")]=-i,r.p.consume.Neutronium[z("city_factory")]=-c,Ji("Neutronium",-c*f),Ji("Coal",-i*f);let n=o*Zs.Nano_Tube.output[l]*s*Oe("psychic_boost","Nano_Tube");t.race.toxic&&(n*=1+di.toxic.vars()[1]/100);let _=Oi("shroomi");_>0&&(n*=1+di.toxic.vars(1)[1]/100*_),t.tech.polymer>=2&&(n*=1.42),"corpocracy"===t.civic.govern.type&&(n*=1+re.corpocracy()[4]/100),"socialist"===t.civic.govern.type&&(n*=1+re.socialist()[1]/100),t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=2&&(n*=1.1);let h=n*p;if(h*=G*d,r.p.Nano_Tube[z("city_factory")]=n+"v",h>0){if(p>0&&(r.p.Nano_Tube[`ᄂ${z("tau_home_colony")}`]=100*(p-1)+"%"),t.race.discharge&&t.race.discharge>0&&(h*=.5,r.p.Nano_Tube[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),t.tech.q_factory){let e=(u-1)/2+1;h*=e,r.p.Nano_Tube[`ᄂ${z("quantum")}`]=100*(e-1)+"%"}r.p.Nano_Tube[z("hunger")]=100*(G-1)+"%"}Ji("Nano_Tube",h*f)}else r.p.Nano_Tube=0;if(t.city.factory.Stanene&&t.city.factory.Stanene>0){let e=Zs.Stanene.aluminium[l]*s,a=Zs.Stanene.nano[l]*s,i=t.city.factory.Stanene*e,c=t.city.factory.Stanene*a,o=t.city.factory.Stanene;for(;i*f>t.resource.Aluminium.amount&&i>0;)c-=a,i-=e,o--;for(;c*f>t.resource.Nano_Tube.amount&&c>0;)c-=a,i-=e,o--;r.p.consume.Aluminium[z("city_factory")]=r.p.consume.Aluminium[z("city_factory")]?r.p.consume.Aluminium[z("city_factory")]-i:-i,r.p.consume.Nano_Tube[z("city_factory")]=-c,Ji("Aluminium",-i*f),Ji("Nano_Tube",-c*f);let n=o*Zs.Stanene.output[l]*s*Oe("psychic_boost","Stanene");t.race.toxic&&(n*=1+di.toxic.vars()[1]/100);let _=Oi("shroomi");_>0&&(n*=1+di.toxic.vars(1)[1]/100*_),"corpocracy"===t.civic.govern.type&&(n*=1+re.corpocracy()[4]/100),"socialist"===t.civic.govern.type&&(n*=1+re.socialist()[1]/100),t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=2&&(n*=1.1);let h=n*p;if(h*=G*d,r.p.Stanene[z("city_factory")]=n+"v",h>0){if(p>0&&(r.p.Stanene[`ᄂ${z("tau_home_colony")}`]=100*(p-1)+"%"),t.race.discharge&&t.race.discharge>0&&(h*=.5,r.p.Stanene[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),t.tech.q_factory){let e=(u-1)/2+1;h*=e,r.p.Stanene[`ᄂ${z("quantum")}`]=100*(e-1)+"%"}r.p.Stanene[z("hunger")]=100*(G-1)+"%"}Ji("Stanene",h*f)}else r.p.Stanene=0}if(t.resource.Furs.display&&(r.p.Furs[z("hunger")]=100*(G-1)+"%"),t.resource.Cement.display){let e=t.race.high_pop?3/di.high_pop.vars()[0]:3;"ashland"===t.city.biome&&(e*=Si.ashland.vars()[1]);let a=la(t.civic.cement_worker.workers,"cement_worker")*e,s=la(t.civic.cement_worker.workers,"cement_worker");for(;a*f>t.resource.Stone.amount&&a>0;)a-=e,s--;let o=t.tech.isolation?1+.5*(c.colony||0):1;r.p.consume.Stone[z(t.tech.isolation?"job_cement_worker_bd":"city_cement_plant_bd")]=-a,Ji("Stone",-a*f);let n=t.tech.cement>=4?1.2:1;n*=t.civic.cement_worker.impact,n*=hi(la(t.civic.cement_worker.workers,"cement_worker"),"factory"),"ashland"===t.city.biome&&(n*=Si.ashland.vars()[1]),t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=3&&(n*=1.1);let l=s*n*Oe("psychic_boost","Cement");"corpocracy"===t.civic.govern.type&&(l*=1+re.corpocracy()[4]/100),"socialist"===t.civic.govern.type&&(l*=1+re.socialist()[1]/100);let _=1,p=1;if(t.city.powered&&i.cement_plant){let e=t.tech.cement>=6?.08:.05;_+=i.cement_plant*e,p+=e}let m=1;if(t.tech.ai_core&&i.citadel>0){let e=+(u/1.75).toFixed(1)/100;m+=i.citadel*e}let g=t.tech.isolation?1+.08*c.mining_pit:1,v=t.tech.isolation?1:h;r.p.Cement[z(t.tech.isolation?"job_cement_worker_bd":"city_cement_plant_bd")]=l+"v",l>0&&(t.tech.isolation&&(r.p.Cement[`ᄂ${z("tau_home_colony")}+0`]=100*(o-1)+"%",r.p.Cement[`ᄂ${z("tau_home_mining_pit")}+0`]=100*(g-1)+"%"),r.p.Cement[`ᄂ${z("power")}+0`]=100*(_-1)+"%",r.p.Cement[`ᄂ${z("quarantine")}+0`]=100*(v-1)+"%"),t.race.discharge&&t.race.discharge>0&&i.cement_plant>0&&(_=.5*(_-1)+1,p=.5*(p-1)+1,r.p.Cement[`ᄂ${z("evo_challenge_discharge")}`]="-50%");let y=l*m*o*g;t.city.cement_plant&&(t.city.cement_plant.cnvay=+(y*G*v*d*(p-1)).toFixed(5)),y*=_*G*v*d,t.tech.ai_core&&i.citadel>0&&(r.p.Cement[z("interstellar_citadel_effect_bd")]=100*(m-1)+"%"),r.p.Cement[z("hunger")]=100*(G-1)+"%",Ji("Cement",y*f)}let H=Nc("metal"),W=0,Q=0,Z=0;if(t.city.smelter&&(t.city.smelter.count>0||t.race.cataclysm||t.race.orbit_decayed||t.tech.isolation)){let e=t.city.smelter.count;i.stellar_forge&&t.tech.star_forge&&t.tech.star_forge>=2&&(e+=2*i.stellar_forge),i.hell_forge&&(e+=3*i.hell_forge),i.ore_refinery&&(e+=i.ore_refinery*(t.tech.isolation?12:4)),t.tech.m_smelting&&t.space.hell_smelter&&(e+=2*t.space.hell_smelter.count),(t.race.cataclysm||t.race.orbit_decayed)&&t.space.geothermal&&(e+=t.space.geothermal.on),t.city.smelter.cap=e,t.tech.star_forge>=2?(t.city.smelter.StarCap=2*i.stellar_forge,t.city.smelter.Star=t.city.smelter.StarCap):t.city.smelter.StarCap=0,t.race.forge&&(t.city.smelter.Wood=0,t.city.smelter.Coal=0,t.city.smelter.Oil=t.city.smelter.cap-t.city.smelter.Star-t.city.smelter.Inferno),!t.race.kindling_kindred&&!t.race.smoldering||t.race.evil||(t.city.smelter.Wood=0);let a=t.race.kindling_kindred||t.race.smoldering?.15:.25,s=0;if(["Wood","Coal","Oil","Star","Inferno"].forEach((function(e){s+t.city.smelter[e]>t.city.smelter.cap&&(t.city.smelter[e]=t.city.smelter.cap-s),s+=t.city.smelter[e]})),t.city.smelter.Iron+t.city.smelter.Steel+t.city.smelter.Iridium>t.city.smelter.Wood+t.city.smelter.Coal+t.city.smelter.Oil+t.city.smelter.Star+t.city.smelter.Inferno){let e=t.city.smelter.Wood+t.city.smelter.Coal+t.city.smelter.Oil+t.city.smelter.Star+t.city.smelter.Inferno,a=t.city.smelter.Iron+t.city.smelter.Steel+t.city.smelter.Iridium-e;t.city.smelter.Iron-=a,t.city.smelter.Iron<0&&(a=t.city.smelter.Iron,t.city.smelter.Iron=0,t.city.smelter.Iridium+=a,t.city.smelter.Iridium<0&&(a=t.city.smelter.Iridium,t.city.smelter.Iridium=0),t.city.smelter.Steel+=a,t.city.smelter.Steel<0&&(t.city.smelter.Steel=0))}else if(t.city.smelter.Iron+t.city.smelter.Steel+t.city.smelter.Iridium=2);t.resource.Iridium.display&&e||t.resource.Steel.display&&t.tech.smelting>=2&&!t.race.steelen||t.city.smelter.Iron++}if(t.city.smelter.Star>t.city.smelter.StarCap){let e=t.city.smelter.Star-t.city.smelter.StarCap;t.city.smelter.Star=t.city.smelter.StarCap,t.city.smelter.Oil+=e}let c=t.race.forge?0:t.city.smelter.Wood*(!t.race.evil||t.race.soul_eater&&"wendigo"!==t.race.species?3:1),o=t.race.forge?0:t.city.smelter.Coal*a,n=t.race.forge?0:.35*t.city.smelter.Oil;W=t.city.smelter.Iron;let l=t.city.smelter.Steel;Z=t.city.smelter.Iridium;let u=t.race.forge?t.city.smelter.Wood+t.city.smelter.Coal+t.city.smelter.Oil:t.city.smelter.Oil;Q=t.city.smelter.Star;let _=t.city.smelter.Inferno;for(t.race.steelen&&(W+=l,l=0);W+l+Z>t.city.smelter.Wood+t.city.smelter.Coal+t.city.smelter.Oil+t.city.smelter.Star+t.city.smelter.Inferno;)l>0?l--:W>0?W--:Z--;let p=t.race.soul_eater&&"wendigo"!==t.race.species?"Food":t.race.evil?"Furs":"Lumber";for(;c*f>t.resource[p].amount&&c>0;)c-=!t.race.evil||t.race.soul_eater&&"wendigo"!==t.race.species?3:1,l>0?l--:W>0?W--:Z--;for(;o*f>t.resource.Coal.amount&&o>0;)o-=a,l>0?l--:W>0?W--:Z--;for(;n*f>t.resource.Oil.amount&&n>0;)n-=.35,u--,l>0?l--:W>0?W--:Z--;if(_>0){let e={Oil:35,Coal:50,Infernite:.5};Object.keys(e).forEach((function(a){for(;e[a]*_*f>t.resource[a].amount&&_>0;)_--,l>0?l--:W>0?W--:Z--})),n+=e.Oil*_,o+=e.Coal*_;let a=e.Infernite*_;r.p.consume.Infernite[z("city_smelter")]=-a,Ji("Infernite",-a*f)}W*=t.tech.smelting>=3?1.2:1,Z>0&&(Z=1+.05*Z);let h=D("dirty_jobs",2);h&&(W*=1+h/100,Z*=1+h/100),t.tech.smelting>=7&&(W*=1.25,Z*=1.25),u>0&&(W*=1+u/200,Z*=1+u/200),_>0&&(W*=1+_/125,Z*=1+_/125),Q>0&&(W*=1+Q/500,Z*=1+Q/75),t.race.pyrophobia&&(W*=1-di.pyrophobia.vars()[0]/100,Z*=1-di.pyrophobia.vars()[0]/100);let m=Oi("salamander");if(m>0&&(W*=1.2*m,Z*=1.2*m),Z<1&&(Z=1),t.race.evil?t.race.soul_eater&&"wendigo"!==t.race.species&&!t.race.artifical?r.p.consume.Food[z("city_smelter")]=-c:r.p.consume.Furs[z("city_smelter")]=-c:r.p.consume.Lumber[z("city_smelter")]=-c,r.p.consume.Coal[z("city_smelter")]=-o,r.p.consume.Oil[z("city_smelter")]=-n,Ji(p,-c*f),Ji("Coal",-o*f),Ji("Oil",-n*f),o>0&&t.tech.uranium&&t.tech.uranium>=3){let e=o;t.city.geology.Uranium&&(e*=t.city.geology.Uranium+1);let a=e/65/d*Oe("psychic_boost","Uranium");r.p.Uranium[z("city_coal_ash")]=r.p.Uranium[z("city_coal_ash")]?r.p.Uranium[z("city_coal_ash")]+a:a,Ji("Uranium",e*f/65)}if(t.resource.Steel.display){let e=2*l,a=.25*l;for(;e*f>t.resource.Iron.amount&&e>0||a*f>t.resource.Coal.amount&&a>0;)e-=2,a-=.25,l--;r.p.consume.Coal[z("city_smelter")]-=a,r.p.consume.Iron[z("city_smelter")]=-e,Ji("Iron",-e*f),Ji("Coal",-a*f);let s=1;for(t.stats.achieve.steelen&&t.stats.achieve.steelen.l>=1&&(s*=1+2*t.stats.achieve.steelen.l/100),t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=2&&(s*=1.1),y=4;y<=6;y++)t.tech.smelting>=y&&(s*=1.2);t.tech.smelting>=7&&(s*=1.25),u>0&&(l*=1+u/200),_>0&&(l*=1+_/125),Q&&(l*=1+Q/500),h&&(l*=1+h/100),m>0&&(l*=1.2*m);let i=l*s*Oe("psychic_boost","Steel");t.race.pyrophobia&&(i*=1-di.pyrophobia.vars()[0]/100);let c=i;if(c*=G*d*H.mult,r.p.Steel[z("city_smelter")]=i+"v",r.p.Steel[z("city_shrine")]=(100*(H.mult-1)).toFixed(1)+"%",r.p.Steel[z("hunger")]=100*(G-1)+"%",Ji("Steel",c*f),t.tech.titanium&&t.tech.titanium>=1){let e=i*G*Oe("psychic_boost","Titanium");Q>0&&(c*=1+Q/50),t.city.geology.Titanium&&(c*=t.city.geology.Titanium+1),"oceanic"===t.city.biome&&(c*=Si.oceanic.vars()[1]),c*=H.mult;let a=t.tech.titanium>=3?10:25;Ji("Titanium",c*f/a),r.p.Titanium[z("resource_Steel_name")]=e/a+"v"}}}let V=t.race.truepath?"space":"interstellar";if(t[V].g_factory&&t[V].g_factory.count>0){let e=t.race.truepath?c.g_factory:o.g_factory,a=t[V].g_factory.on,s=a>0?e/a:0,n=a;(t.race.kindling_kindred||t.race.smoldering)&&(t[V].g_factory.Lumber=0),["Oil","Coal","Lumber"].forEach((function(e){n-=t[V].g_factory[e],n<0&&(t[V].g_factory[e]+=n,n=0)}));let l=t[V].g_factory.Lumber+t[V].g_factory.Coal+t[V].g_factory.Oil;if(l>0){let e=350*t[V].g_factory.Lumber*s,a=25*t[V].g_factory.Coal*s,c=15*t[V].g_factory.Oil*s;for(;e*f>t.resource.Lumber.amount&&e>0;)e-=350*s,l--;for(;a*f>t.resource.Coal.amount&&a>0;)a-=25*s,l--;for(;c*f>t.resource.Oil.amount&&c>0;)c-=15*s,l--;l*=Oe("g_factory")*Oe("psychic_boost","Graphene"),r.p.consume.Lumber[z("interstellar_g_factory_bd")]=-e,r.p.consume.Coal[z("interstellar_g_factory_bd")]=-a,r.p.consume.Oil[z("interstellar_g_factory_bd")]=-c,Ji("Lumber",-e*f),Ji("Coal",-a*f),Ji("Oil",-c*f),"corpocracy"===t.civic.govern.type&&(l*=1+re.corpocracy()[4]/100),"socialist"===t.civic.govern.type&&(l*=1+re.socialist()[1]/100);let o=1;t.tech.ai_core>=3&&(o+=+(u/5).toFixed(1)/100*i.citadel);let n=t.race.truepath?mt("spc_titan"):1,p=l*o*_*G*d*n*s;r.p.Graphene[z("interstellar_g_factory_bd")]=l+"v",t.tech.isolation&&l>0&&(p*=S,S>1&&(r.p.Graphene[`ᄂ${z("tau_red_womlings")}+0`]=100*(S-1)+"%")),l>0&&(r.p.Graphene[`ᄂ${z("space_syndicate")}`]=-100*(1-n)+"%",r.p.Graphene[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%"),t.race.discharge&&t.race.discharge>0&&(p*=.5,r.p.Graphene[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),i.citadel>0&&(r.p.Graphene[z("interstellar_citadel_effect_bd")]=100*(o-1)+"%"),r.p.Graphene[z("hunger")]=100*(G-1)+"%",Ji("Graphene",p*f)}else r.p.Graphene=0}if(t.galaxy.vitreloy_plant&&i.vitreloy_plant>0){let e=5e4*i.vitreloy_plant,a=2.5*i.vitreloy_plant,s=100*i.vitreloy_plant,c=i.vitreloy_plant;for(;e*f>t.resource.Money.amount&&e>0;)e-=350,c--;for(;a*f>t.resource.Bolognium.amount&&a>0;)a-=25,c--;for(;s*f>t.resource.Stanene.amount&&s>0;)s-=15,c--;if(c>0){c*=Oe("vitreloy_plant")*Oe("psychic_boost","Vitreloy"),r.p.consume.Money[z("galaxy_vitreloy_plant_bd")]=-e,r.p.consume.Bolognium[z("galaxy_vitreloy_plant_bd")]=-a,r.p.consume.Stanene[z("galaxy_vitreloy_plant_bd")]=-s,Ji("Money",-e*f),Ji("Bolognium",-a*f),Ji("Stanene",-s*f);let i=It("gxy_alien1");r.p.Vitreloy[z("galaxy_vitreloy_plant_bd")]=c+"v",t.race.discharge&&t.race.discharge>0&&(c*=.5,r.p.Vitreloy[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),r.p.Vitreloy[z("hunger")]=100*(G-1)+"%",c>0&&(r.p.Vitreloy[`ᄂ${z("galaxy_piracy")}+0`]=-100*(1-i)+"%",r.p.Vitreloy[`ᄂ${z("space_red_ziggurat_title")}+0`]=100*(_-1)+"%"),Ji("Vitreloy",c*G*d*i*f*_)}}if(i.s_gate&&t.galaxy.raider&&n.raider>0){let e=.05*n.raider*Oe("psychic_boost","Vitreloy"),t=It("gxy_chthonian"),a=e*d*t*G*_;r.p.Vitreloy[z("galaxy_raider")]=e+"v",e>0&&(r.p.Vitreloy[`ᄂ${z("galaxy_piracy")}+1`]=-100*(1-t)+"%",r.p.Vitreloy[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%"),Ji("Vitreloy",a*f)}if(!t.tech.isolation&&t.space.lander&&t.space.crashed_ship&&100===t.space.crashed_ship.count){let e=mt("spc_triton"),a=c.lander*Oe("lander"),s=a*d*e*G;r.p.Cipher[z("space_lander_title")]=a+"v",r.p.Cipher[`ᄂ${z("space_syndicate")}+0`]=-100*(1-e)+"%",r.p.Cipher[`ᄂ${z("hunger")}`]=100*(G-1)+"%",Ji("Cipher",s*f),t.resource.Cipher.display&&t.tech.outer&&2===t.tech.outer&&(t.tech.outer=3,gs())}if(!t.tech.isolation&&t.space.digsite&&100===t.space.digsite.count){t.tech.dig_control||(t.tech.dig_control=1,gs());let e=mt("spc_eris"),a=c.shock_trooper*Oe("shock_trooper"),s=c.tank*Oe("tank");c.shock_trooper&&(r.p.Cipher[z("space_shock_trooper_title")]=a+"v",r.p.Cipher[`ᄂ${z("space_syndicate")}+1`]=-100*(1-e)+"%"),c.tank&&(r.p.Cipher[z("space_tank_title")]=s+"v",r.p.Cipher[`ᄂ${z("space_syndicate")}+2`]=-100*(1-e)+"%"),Ji("Cipher",(a+s)*d*e*f)}if(t.tech.isolation&&t.tauceti.alien_outpost&&i.alien_outpost){let e=Oe("alien_outpost"),t=1+.5*(c.colony||0);r.p.Cipher[z("tech_alien_outpost")]=e+"v",e>0&&(r.p.Cipher[`ᄂ${z("tau_home_colony")}`]=100*(t-1)+"%"),Ji("Cipher",e*d*t*f)}let J={};if(t.tauceti.ore_refinery&&t.tauceti.mining_ship&&t.tech.tau_roid&&t.tech.tau_roid>=4){if(t.tauceti.ore_refinery.max=1e3*t.tauceti.ore_refinery.count,t.tauceti.ore_refinery.fill>0){let e=i.ore_refinery*Oe("ore_refinery");e>t.tauceti.ore_refinery.fill&&(e=t.tauceti.ore_refinery.fill),t.tauceti.ore_refinery.fill-=e*f;let a=t.tech.tau_roid>=5?.6:.64,r=t.tech.tau_roid>=5?.35:.36;J.iron=e*a*(100-t.tauceti.mining_ship.common)/100*Oe("mining_ship_ore","iron")*Oe("psychic_boost","Iron"),J.aluminium=e*a*t.tauceti.mining_ship.common/100*Oe("mining_ship_ore","aluminium")*Oe("psychic_boost","Aluminium"),J.iridium=e*r*(100-t.tauceti.mining_ship.uncommon)/100*Oe("mining_ship_ore","iridium")*Oe("psychic_boost","Iridium"),J.neutronium=e*r*t.tauceti.mining_ship.uncommon/100*Oe("mining_ship_ore","neutronium")*Oe("psychic_boost","Neutronium"),t.tech.tau_roid>=5&&(J.orichalcum=.05*e*(100-t.tauceti.mining_ship.rare)/10*Oe("mining_ship_ore","orichalcum")*Oe("psychic_boost","Orichalcum"),J.elerium=.05*e*t.tauceti.mining_ship.rare/10*Oe("mining_ship_ore","elerium")*Oe("psychic_boost","Elerium"))}let e=c.mining_ship*Oe("mining_ship");t.tauceti.ore_refinery.fill+=e*f,t.tauceti.ore_refinery.fill>t.tauceti.ore_refinery.max&&(t.tauceti.ore_refinery.fill=t.tauceti.ore_refinery.max)}if(t.race.cataclysm||t.race.orbit_decayed){if(t.tech.mars&&c.biodome&&!t.race.kindling_kindred&&!t.race.smoldering){let e=c.biodome*la(t.civic.colonist.workers,"colonist")*Oe("biodome","lumber")*Oe("psychic_boost","Lumber");r.p.Lumber[Zr.space.spc_red.biodome.title()]=e+"v",e>0&&(r.p.Lumber[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%"),r.p.Lumber[z("hunger")]=100*(G-1)+"%",Ji("Lumber",e*G*d*f*_)}}else if(t.race.soul_eater&&"wendigo"!==t.race.species&&t.race.evil){let e=t.tech.military?t.tech.military>=5?t.tech.military-1:t.tech.military:1,a=la(t.civic.hunter.workers,"hunter");a*=hi(a,"hunting"),t.race.servants&&(a+=ua(t.race.servants.jobs.hunter)),a*=e/2,t.race.high_pop&&(a=Pe(a)),a*=Oe("psychic_boost","Lumber");let s=qe(Me(),"hunting")/3;s*=Oe("psychic_boost","Lumber"),r.p.Lumber[z(t.race.unfathomable?"job_raider":"job_hunter")]=a+"v",r.p.Lumber[z("soldiers")]=s+"v",r.p.Lumber[z("hunger")]=100*(G-1)+"%",Ji("Lumber",a*G*d*f),Ji("Lumber",s*G*d*f)}else if(t.race.evil){let e=la(t.civic.lumberjack.workers,"lumberjack");e*=hi(e,"lumberjack"),t.race.servants&&(e+=t.race.servants.jobs.lumberjack),e*=Oe("psychic_boost","Lumber");let a=1;t.city.graveyard&&(a+=.08*t.city.graveyard.count);let s=qe(Me(),"hunting")/5;if(s*=Oe("psychic_boost","Lumber"),r.p.Lumber[z("job_reclaimer")]=e+"v",e>0&&(r.p.Lumber[`ᄂ${z("city_graveyard")}`]=100*(a-1)+"%",r.p.Lumber[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%"),r.p.Lumber[z("soldiers")]=s+"v",s>0&&(r.p.Lumber[`ᄂ${z("quarantine")}+1`]=100*(h-1)+"%"),t.race.forager){let e=1,a=la(t.civic.forager.workers,"forager");t.race.servants&&(a+=t.race.servants.jobs.forager);let s=a*e*.25;r.p.Lumber[z("job_forager")]=s+"v",s>0&&(r.p.Lumber[`ᄂ${z("quarantine")}+2`]=100*(h-1)+"%"),Ji("Lumber",s*G*d*h*f)}r.p.Lumber[z("hunger")]=100*(G-1)+"%",Ji("Lumber",e*G*a*d*h*f),Ji("Lumber",s*G*d*h*f)}else{let e=la(t.civic.lumberjack.workers,"lumberjack");e*=hi(e,"lumberjack"),t.race.servants&&(e+=t.race.servants.jobs.lumberjack),e*="forest"===t.city.biome?Si.forest.vars()[0]:1,e*="savanna"===t.city.biome?Si.savanna.vars()[2]:1,e*="desert"===t.city.biome?Si.desert.vars()[2]:1,e*="swamp"===t.city.biome?Si.swamp.vars()[2]:1,e*="taiga"===t.city.biome?Si.taiga.vars()[0]:1,e*=t.civic.lumberjack.impact,t.race.living_tool?e*=di.living_tool.vars()[0]*(t.tech.science&&t.tech.science>0?.25*t.tech.science:0)+1:e*=1+(t.tech.axe&&t.tech.axe>1?.35*(t.tech.axe-1):0),e*=Oe("psychic_boost","Lumber");let a=1;if(t.city.sawmill){let e=t.tech.saw>=2?.08:.05;a*=t.city.sawmill.count*e+1}let s=1,c=1;t.city.powered&&t.city.sawmill&&i.sawmill&&(s+=.04*i.sawmill,c+=.04);let o=1;t.city.lumber_yard&&(o+=.02*t.city.lumber_yard.count),r.p.Lumber[z("job_lumberjack")]=e+"v",e>0&&(r.p.Lumber[`ᄂ${z("city_lumber_yard")}`]=100*(o-1)+"%",r.p.Lumber[`ᄂ${z("city_sawmill")}`]=100*(a-1)+"%",r.p.Lumber[`ᄂ${z("power")}`]=100*(s-1)+"%",r.p.Lumber[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%"),t.race.discharge&&t.race.discharge>0&&i.sawmill>0&&(s=.5*(s-1)+1,c=.5*(c-1)+1,r.p.Lumber[`ᄂ${z("evo_challenge_discharge")}`]="-50%");let n=e*a*o;if(t.city.sawmill&&(t.city.sawmill.psaw=+(n*G*h*d*(c-1)).toFixed(5)),n*=s*G*h*d,t.race.forager){let e=1,a=la(t.civic.forager.workers,"forager");t.race.servants&&(a+=t.race.servants.jobs.forager);let s=a*e*.25*Oe("psychic_boost","Lumber");r.p.Lumber[z("job_forager")]=s+"v",Ji("Lumber",s*G*d*f)}r.p.Lumber[z("hunger")]=100*(G-1)+"%",Ji("Lumber",n*f)}let Y=t.city.metal_refinery?6*t.city.metal_refinery.count:0;if(Y*=h,t.race.sappy){if(t.tech.mining&&t.resource[t.race.species].amount>0){let e=t.resource[t.race.species].amount*di.sappy.vars()[0]*Oe("psychic_boost","Stone");t.race.high_pop&&(e=Pe(e));let a=Oi("cacti");if(a>0&&(e*=1+.32*a),r.p.Stone[Tc("name")]=e+"v",t.city.hasOwnProperty("basic_housing")){let a=.025*t.city.basic_housing.count;e*=1+a,r.p.Stone[`ᄂ${Ks("small")}`]=100*a+"%"}let s=0;t.civic.hasOwnProperty("garrison")&&(s=t.civic.garrison.workers*di.sappy.vars()[0],t.race.high_pop&&(s=Pe(s)),r.p.Stone[z("soldiers")]=s+"v");let i=(e+s)*G*d;r.p.Stone[z("hunger")]=100*(G-1)+"%",Ji("Stone",i*f)}}else{let e=la(t.civic.quarry_worker.workers,"quarry_worker");e*=hi(e,"miner");let a=Oi("cacti");a>0&&(e*=1+.32*a),t.race.servants&&(e+=t.race.servants.jobs.quarry_worker),e*=t.civic.quarry_worker.impact*Oe("psychic_boost","Stone"),t.race.living_tool?e*=di.living_tool.vars()[0]*(t.tech.science&&t.tech.science>0?.06*t.tech.science:0)+1:e*=1+(t.tech.hammer&&t.tech.hammer>0?.4*t.tech.hammer:0),"desert"===t.city.biome&&(e*=Si.desert.vars()[0]),"swamp"===t.city.biome&&(e*=Si.swamp.vars()[3]),t.tech.explosives&&t.tech.explosives>=2&&(e*=t.tech.explosives>=3?1.75:1.5);let s=0;t.race.smoldering&&t.resource.Chrysotile.display&&t.city.rock_quarry&&(s=e*Oe("psychic_boost","Chrysotile"),e*=(100-t.city.rock_quarry.asbestos)/100,s*=t.city.rock_quarry.asbestos/100);let o=1,n=1,l=1;t.city.rock_quarry&&(t.city.rock_quarry.on&&(o+=.04*i.rock_quarry,n+=.04),l+=.02*t.city.rock_quarry.count),r.p.Stone[z("workers")]=e+"v",e>0&&(r.p.Stone[`ᄂ${z("city_rock_quarry")}`]=100*(l-1)+"%",r.p.Stone[`ᄂ${z("power")}`]=100*(o-1)+"%",r.p.Stone[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%"),t.race.smoldering&&t.resource.Chrysotile.display&&(r.p.Chrysotile[z("workers")]=s+"v",s>0&&(r.p.Chrysotile[`ᄂ${z("city_rock_quarry")}`]=100*(l-1)+"%",r.p.Chrysotile[`ᄂ${z("power")}`]=100*(o-1)+"%")),t.race.discharge&&t.race.discharge>0&&i.rock_quarry>0&&(o=.5*(o-1)+1,n=.5*(n-1)+1,r.p.Stone[`ᄂ${z("evo_challenge_discharge")}`]="-50%",t.race.smoldering&&t.resource.Chrysotile.display&&(r.p.Chrysotile[`ᄂ${z("evo_challenge_discharge")}`]="-50%")),(t.race.cataclysm||t.race.orbit_decayed)&&(t.tech.mars&&c.red_mine&&(e=c.red_mine*la(t.civic.colonist.workers,"colonist")*Oe("red_mine","stone")*Oe("psychic_boost","Stone"),r.p.Stone[z("space_red_mine_title")]=e+"v",e>0&&(r.p.Stone[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%"),t.race.smoldering&&t.resource.Chrysotile.display&&(s=c.red_mine*la(t.civic.colonist.workers,"colonist")*Oe("red_mine","asbestos")*Oe("psychic_boost","Chrysotile"),r.p.Chrysotile[z("space_red_mine_title")]=s+"v",s>0&&(r.p.Chrysotile[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%"),s*=_),e*=_),o=1,n=1,l=1);let u=e*l;if(t.city.rock_quarry&&(t.city.rock_quarry.cnvay=+(u*G*h*d*(n-1)).toFixed(5)),u*=o*G*h*d,t.race.forager&&t.resource.Stone.display){let e=1,a=la(t.civic.forager.workers,"forager");t.race.servants&&(a+=t.race.servants.jobs.forager);let s=a*e*.22*Oe("psychic_boost","Stone");r.p.Stone[z("job_forager")]=s+"v",s>0&&(r.p.Stone[`ᄂ${z("quarantine")}+1`]=100*(h-1)+"%"),Ji("Stone",s*G*d*h*f)}if(r.p.Stone[z("hunger")]=100*(G-1)+"%",Ji("Stone",u*f),t.race.smoldering&&t.resource.Chrysotile.display){let e=s*o*l;e*=G*d,r.p.Chrysotile[z("hunger")]=100*(G-1)+"%",Ji("Chrysotile",e*f)}if(t.city.metal_refinery&&t.city.metal_refinery.count>0||t.race.cataclysm||t.race.orbit_decayed){let a=e*l*(t.race.cataclysm?.16:.08);t.city.geology.Aluminium&&(a*=t.city.geology.Aluminium+1),a*=Oe("psychic_boost","Aluminium");let s=a*H.mult*G*h*d;if(t.city.metal_refinery.cnvay=+(s*(n-1)).toFixed(5),t.city.rock_quarry.almcvy=t.city.metal_refinery.cnvay,s*=o,t.tech.alumina>=2){Y+=6*i.metal_refinery*h;let e=6*h/100;t.city.metal_refinery.pwr=+(s*e).toFixed(5)}s*=1+Y/100,r.p.Aluminium[`${t.race.cataclysm||t.race.orbit_decayed?z("space_red_mine_title"):z("workers")}+1`]=a+"v",a>0&&(r.p.Aluminium[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%"),r.p.Aluminium[z("city_shrine")]=(100*(H.mult-1)).toFixed(1)+"%",r.p.Aluminium[z("hunger")]=100*(G-1)+"%",Ji("Aluminium",s*f)}}if(t.resource.Water.display){if(c.water_freighter){let e=mt("spc_enceladus"),t=Oe("water_freighter")*c.water_freighter*Oe("psychic_boost","Water"),a=t*G*d*e*_;r.p.Water[z("space_water_freighter_title")]=t+"v",t>0&&(r.p.Water[`ᄂ${z("space_syndicate")}`]=-100*(1-e)+"%",r.p.Water[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%",r.p.Water[`ᄂ${z("hunger")}`]=100*(G-1)+"%"),Ji("Water",a*f)}if(t.tech.isolation&&t.tauceti.tau_farm&&i.tau_farm){let e=1+.5*(c.colony||0),t=Oe("tau_farm","water")*i.tau_farm*Oe("psychic_boost","Water"),a=t*d*e;r.p.Water[z("tau_home_tau_farm")]=t+"v",t>0&&(r.p.Water[`ᄂ${z("tau_home_colony")}`]=100*(e-1)+"%"),Ji("Water",a*f)}}if(t.resource.Mana.display){if(t.race.casting&&["farmer","miner","lumberjack","science","factory","army","hunting","crafting"].forEach((function(e){if(t.race.casting[e]&&t.race.casting[e]>0){let a=Xs(t.race.casting[e]);r.p.consume.Mana[z(`modal_pylon_spell_${e}`)]=-a;let s=t.resource.Mana.diff>0?t.resource.Mana.diff*f:0;Ji("Mana",-a*f,!1,s)||t.race.casting[e]--}else delete r.p.consume.Mana[z(`modal_pylon_spell_${e}`)]})),t.city.pylon||t.space.pylon||t.tauceti.pylon){let e=0,a="city_pylon";(t.race.cataclysm||t.race.orbit_decayed)&&t.space.pylon?(e=.005*t.space.pylon.count,a="space_red_pylon"):t.tech.isolation&&t.tauceti.pylon?(e=.0125*t.tauceti.pylon.count,a="tau_home_pylon"):t.city.pylon&&(e=.01*t.city.pylon.count),e*=lc("magic");let s=e*G*d;if(r.p.Mana[z(a)]=e+"v",t.tech.nexus){let e=5*t.tech.nexus;s*=1+e/100,r.p.Mana[`ᄂ${z("arpa_projects_nexus_title")}`]=e+"%"}Ji("Mana",s*f)}if(t.tech.cleric&&t.civic.priest.display){let e=.0025*la(t.civic.priest.workers,"priest");t.race.high_pop&&(e=Pe(e)),e*=lc("magic");let a=e*G*d;r.p.Mana[z("job_priest")]=e+"v",Ji("Mana",a*f)}if("magic"===t.race.universe&&t.civic.scientist.display){let e=.025*la(t.civic.scientist.workers,"scientist");t.race.high_pop&&(e=Pe(e)),e*=lc("magic");let a=e*G*d;r.p.Mana[z("job_wizard")]=e+"v","magocracy"===t.civic.govern.type&&(a*=1+re.magocracy()[0]/100,r.p.Mana[`ᄂ${z("govern_magocracy")}`]=re.magocracy()[0]+"%"),Ji("Mana",a*f)}if("magic"===t.race.universe&&t.tech.syphon){let e=t.tech.syphon/3;e*=lc("magic");let a=e*G*d;r.p.Mana[z("arpa_syphon_title")]=e+"v",Ji("Mana",a*f)}r.p.Mana[z("hunger")]=100*(G-1)+"%"}if(t.resource.Crystal.display){let e=la(t.civic.crystal_miner.workers,"crystal_miner");if(e*=hi(e,"miner"),t.race.servants&&(e+=t.race.servants.jobs.crystal_miner),e*=t.civic.crystal_miner.impact*Oe("psychic_boost","Crystal"),r.p.Crystal[z("job_crystal_miner")]=e+"v","magocracy"===t.civic.govern.type){let t=re.magocracy()[1];e*=1+t/100,r.p.Crystal[`ᄂ${z("govern_magocracy")}`]=`${t}%`}let a=e*G*d;r.p.Crystal[z("hunger")]=100*(G-1)+"%",Ji("Crystal",a*f)}if(t.resource.Copper.display||t.resource.Iron.display){let e=la(t.civic.miner.workers,"miner");e*=hi(e,"miner"),e*=t.civic.miner.impact,t.race.tough&&(e*=1+di.tough.vars()[0]/100);let a=Oi("ogre");a>0&&(e*=1+di.tough.vars(1)[0]/100*a),t.race.industrious&&(e*=1+di.industrious.vars()[0]*t.race.industrious/100),t.city.ptrait.includes("dense")&&(e*=Fi.dense.vars()[0]),t.city.ptrait.includes("permafrost")&&(e*=Fi.permafrost.vars()[0]),t.race.living_tool||(e*=1+(t.tech.pickaxe&&t.tech.pickaxe>0?.15*t.tech.pickaxe:0)),t.tech.explosives&&t.tech.explosives>=2&&(e*=t.tech.explosives>=3?1.4:1.25);let s=1,o=1;if(t.city.mine.on&&(s+=.05*i.mine,o+=1.05),t.resource.Copper.display){let a=1/7;t.tech.copper&&(a*=1.2);let c=e*a*Oe("psychic_boost","Copper");t.city.geology.Copper&&(c*=t.city.geology.Copper+1),"volcanic"===t.city.biome?c*=Si.volcanic.vars()[1]:"ashland"===t.city.biome&&(c*=Si.ashland.vars()[2]);let n=s,l=o;r.p.Copper[z("job_miner")]=c+"v",c>0&&(r.p.Copper[`ᄂ${z("power")}`]=100*(n-1)+"%",r.p.Copper[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%",t.race.discharge&&t.race.discharge>0&&i.mine>0&&(n=.5*(n-1)+1,l=.5*(l-1)+1,r.p.Copper[`ᄂ${z("evo_challenge_discharge")}`]="-50%"));let u=c*H.mult;if(t.city.mine.cpow=+(u*G*h*d*(l-1)).toFixed(5),u*=n*G*h*d,Ji("Copper",u*f),t.race.forager&&t.tech.dowsing){let e=t.tech.dowsing>=2?5:1,a=la(t.civic.forager.workers,"forager");t.race.servants&&(a+=t.race.servants.jobs.forager);let s=a*e*.025*Oe("psychic_boost","Copper");t.city.geology.Copper&&(s*=t.city.geology.Copper+1),"volcanic"===t.city.biome?s*=Si.volcanic.vars()[1]:"ashland"===t.city.biome&&(s*=Si.ashland.vars()[2]),r.p.Copper[z("job_forager")]=s+"v",s>0&&(r.p.Copper[`ᄂ${z("quarantine")}+1`]=100*(h-1)+"%"),Ji("Copper",s*G*d*h*f)}}if(t.resource.Iron.display){let a=e*(1/4)*Oe("psychic_boost","Iron");t.race.iron_allergy&&(a*=1-di.iron_allergy.vars()[0]/100);let o=1+.1*W;t.city.geology.Iron&&(a*=t.city.geology.Iron+1),"volcanic"===t.city.biome?a*=Si.volcanic.vars()[2]:"ashland"===t.city.biome&&(a*=Si.ashland.vars()[2]);let n=0,l=mt("spc_belt");c.iron_ship&&(n=c.iron_ship*Oe("iron_ship")*Oe("psychic_boost","Iron"),n*=l);let u=s,p=s;r.p.Iron[z("job_miner")]=a+"v",a>0&&(r.p.Iron[`ᄂ${z("power")}`]=100*(u-1)+"%",t.race.discharge&&t.race.discharge>0&&i.mine>0&&(u=.5*(u-1)+1,p=.5*(p-1)+1,r.p.Iron[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),r.p.Iron[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%");let g=0,v=0;if(t.tech.isolation&&t.race.lone_survivor){{let e=la(t.civic.pit_miner.workers,"pit_miner");e*=hi(e,"miner");let a=1+.5*(c.colony||0),s=e*Oe("psychic_boost","Iron");s*=Oe("mining_pit","iron"),g=s*a,r.p.Iron[z("job_pit_miner")]=s+"v",s>0&&(r.p.Iron[`ᄂ${z("tau_home_colony")}`]=100*(a-1)+"%")}if(t.tauceti.hasOwnProperty("womling_mine")&&t.tauceti.hasOwnProperty("overseer")){let e=t.tauceti.overseer.prod/100,a=t.tauceti.womling_mine.miners*Oe("womling_mine","iron")*Oe("psychic_boost","Iron");r.p.Iron[z("tau_red_womlings")]=a+"v",v=a*e,a>0&&(r.p.Iron[`ᄂ${z("tau_red_womling_prod_label")}`]=-100*(1-e)+"%")}}let y=J.iron?J.iron*S:0,b=(a*u*h+n*m*_+y+g+v)*o*H.mult;if(t.city.mine.ipow=+(a*h*G*d*(p-1)).toFixed(5),b*=G*d,r.p.Iron[z("job_space_miner")]=n+"v",n>0&&(r.p.Iron[`ᄂ${z("space_syndicate")}`]=-100*(1-l)+"%",r.p.Iron[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%",r.p.Iron[`ᄂ${z("quarantine")}+1`]=100*(m-1)+"%"),J.iron&&J.iron>0&&(r.p.Iron[z("tau_roid_mining_ship")]=J.iron+"v",S>1&&(r.p.Iron[`ᄂ${z("tau_red_womlings")}+0`]=100*(S-1)+"%")),r.p.Iron[z("city_smelter")]=100*(o-1)+"%",r.p.Iron[z("city_shrine")]=(100*(H.mult-1)).toFixed(1)+"%",t.race.forager&&t.tech.dowsing){let e=t.tech.dowsing>=2?5:1,a=la(t.civic.forager.workers,"forager");t.race.servants&&(a+=t.race.servants.jobs.forager);let s=a*e*.035*Oe("psychic_boost","Iron");t.city.geology.Iron&&(s*=t.city.geology.Iron+1),"volcanic"===t.city.biome?s*=Si.volcanic.vars()[2]:"ashland"===t.city.biome&&(s*=Si.ashland.vars()[2]),r.p.Iron[z("job_forager")]=s+"v",Ji("Iron",s*G*d*f)}if(r.p.Iron[z("hunger")]=100*(G-1)+"%",Ji("Iron",b*f),t.tech.titanium&&t.tech.titanium>=2){let e=(c.iron_ship?Pe(la(t.civic.miner.workers,"miner"))/4+c.iron_ship/2:la(t.civic.miner.workers,"miner")/4)*W*.1;b=e*d,Q>0&&(b*=1+Q/50),t.city.geology.Titanium&&(b*=t.city.geology.Titanium+1),"oceanic"===t.city.biome&&(b*=Si.oceanic.vars()[0]),b*=H.mult*Oe("psychic_boost","Titanium");let a=t.tech.titanium>=3?10:25;Ji("Titanium",b*f/a),r.p.Titanium[z("resource_Iron_name")]=e/a+"v"}}if(t.race.sappy){if(t.city.metal_refinery&&t.city.metal_refinery.count>0||t.race.cataclysm||t.race.orbit_decayed){let a=0;t.race.cataclysm||t.race.orbit_decayed?t.tech.mars&&c.red_mine&&(a=c.red_mine*la(t.civic.colonist.workers,"colonist")*Oe("red_mine","aluminium")):a=e*s*.088,t.city.geology.Aluminium&&(a*=t.city.geology.Aluminium+1),a*=Oe("psychic_boost","Aluminium");let o=a*H.mult*G*d;t.tech.alumina>=2&&(Y+=6*i.metal_refinery),o*=1+Y/100,r.p.Aluminium[`${t.race.cataclysm||t.race.orbit_decayed?z("space_red_mine_title"):z("job_miner")}+2`]=a+"v",(t.race.cataclysm||t.race.orbit_decayed&&a>0&&_>0)&&(o*=_,r.p.Aluminium[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%"),r.p.Aluminium[z("city_shrine")]=100*(H.mult-1)+"%",r.p.Aluminium[z("hunger")]=100*(G-1)+"%",Ji("Aluminium",o*f)}if(t.race.smoldering&&t.resource.Chrysotile.display){let a=e/2*Oe("psychic_boost","Chrysotile"),c=s;r.p.Chrysotile[z("job_miner")]=a+"v",a>0&&(r.p.Chrysotile[`ᄂ${z("power")}`]=100*(c-1)+"%",t.race.discharge&&t.race.discharge>0&&i.mine>0&&(c=.5*(c-1)+1,r.p.Chrysotile[`ᄂ${z("evo_challenge_discharge")}`]="-50%"));let o=a*c;o*=G*d,r.p.Chrysotile[z("hunger")]=100*(G-1)+"%",Ji("Chrysotile",o*f)}}}if(t.interstellar.mining_droid&&F.alum>0){let e=2.75*F.alum*Oe("psychic_boost","Aluminium"),t=e*H.mult*d*_;t*=1+Y/100,r.p.Aluminium[z("interstellar_mining_droid_title")]=e+"v",e>0&&(r.p.Aluminium[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%"),Ji("Aluminium",t*f)}if(t.resource.Aluminium.display&&t.space.titan_mine){let e=mt("spc_titan"),a=i.ai_colonist?la(t.civic.titan_colonist.workers,"titan_colonist")+ua(i.ai_colonist):la(t.civic.titan_colonist.workers,"titan_colonist"),s=Oe("titan_mine","aluminium")*c.titan_mine*a*Oe("psychic_boost","Aluminium"),o=s*H.mult*d*m*e*_;o*=1+Y/100,r.p.Aluminium[`${z("city_mine")}+0`]=+s.toFixed(3)+"v",s>0&&(r.p.Aluminium[`ᄂ${z("space_syndicate")}`]=-100*(1-e)+"%",r.p.Aluminium[`ᄂ${z("space_red_ziggurat_title")}+2`]=100*(_-1)+"%",r.p.Aluminium[`ᄂ${z("quarantine")}+2`]=100*(m-1)+"%"),Ji("Aluminium",o*f)}if(t.resource.Aluminium.display&&J.aluminium&&J.aluminium>0){let e=J.aluminium*H.mult*d*S;e*=1+Y/100,r.p.Aluminium[z("tau_roid_mining_ship")]=J.aluminium+"v",S>1&&(r.p.Aluminium[`ᄂ${z("tau_red_womlings")}+0`]=100*(S-1)+"%"),Ji("Aluminium",e*f)}if(Y>0&&(r.p.Aluminium[z("city_metal_refinery")]=Y+"%",r.p.Aluminium[`ᄂ${z("quarantine")}+1`]=100*(h-1)+"%"),c.red_mine&&c.red_mine>0){let e=mt("spc_red"),a=c.red_mine*la(t.civic.colonist.workers,"colonist")*Oe("red_mine","copper").f;a*=Oe("psychic_boost","Copper"),r.p.Copper[z("space_red_mine_desc_bd",[ea().red])]=a+"v",a>0&&(r.p.Copper[`ᄂ${z("space_syndicate")}`]=-100*(1-e)+"%",r.p.Copper[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%",r.p.Copper[`ᄂ${z("quarantine")}+1`]=100*(m-1)+"%"),Ji("Copper",a*H.mult*f*d*m*G*e*_);let s=c.red_mine*la(t.civic.colonist.workers,"colonist")*G*Oe("red_mine","titanium").f;s*=Oe("psychic_boost","Titanium"),r.p.Titanium[z("space_red_mine_desc_bd",[ea().red])]=s+"v",s>0&&(r.p.Titanium[`ᄂ${z("space_syndicate")}`]=-100*(1-e)+"%",r.p.Titanium[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%",r.p.Titanium[`ᄂ${z("quarantine")}+0`]=100*(m-1)+"%"),Ji("Titanium",s*H.mult*f*d*m*e*_)}if(Lc()&&(r.p.Copper[z("city_shrine")]=(100*(H.mult-1)).toFixed(1)+"%",r.p.Titanium[z("city_shrine")]=(100*(H.mult-1)).toFixed(1)+"%"),r.p.Copper[z("hunger")]=100*(G-1)+"%",r.p.Uranium.hasOwnProperty(z("city_coal_ash"))&&(r.p.Uranium[z("city_coal_ash")]=r.p.Uranium[z("city_coal_ash")]+"v"),t.resource.Coal.display){let e=la(t.civic.coal_miner.workers,"coal_miner");e*=hi(e,"miner"),t.race.tough&&(e*=1+di.tough.vars()[0]/100);let a=Oi("ogre");a>0&&(e*=1+di.tough.vars(1)[0]/100*a),t.race.resilient&&(e*=1+di.resilient.vars()[0]*t.race.resilient/100),t.tech.explosives&&t.tech.explosives>=2&&(e*=t.tech.explosives>=3?1.4:1.25),t.city.geology.Coal&&(e*=t.city.geology.Coal+1);let s=1,o=1;t.city.coal_mine.on&&(s+=.05*i.coal_mine,o+=.05),e*=t.civic.coal_miner.impact*Oe("psychic_boost","Coal"),r.p.Coal[z("job_coal_miner")]=e+"v",e>0&&(r.p.Coal[`ᄂ${z("power")}`]=100*(s-1)+"%",r.p.Coal[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%"),t.race.discharge&&t.race.discharge>0&&i.coal_mine>0&&(s=.5*(s-1)+1,o=.5*(o-1)+1,r.p.Coal[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),t.race.cataclysm&&c.iridium_mine&&(e=c.iridium_mine*Oe("iridium_mine","coal"),e*=t.civic.coal_miner.impact*Oe("psychic_boost","Coal"),r.p.Coal[z("space_moon_iridium_mine_title")]=e+"v",e>0&&(r.p.Coal[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%",r.p.Coal[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%"),s=1*_);let n=e;if(t.city.coal_mine.cpow=+(n*G*h*d*(o-1)).toFixed(5),n*=s*G*h*d,r.p.Coal[z("hunger")]=100*(G-1)+"%",t.interstellar.mining_droid&&F.coal>0){let e=3.75*F.coal*Oe("psychic_boost","Coal"),t=e*d*_;r.p.Coal[z("interstellar_mining_droid_title")]=e+"v",e>0&&(r.p.Coal[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%"),Ji("Coal",t*f)}if(Ji("Coal",n*f),t.resource.Uranium.display){let e=n/(t.race.cataclysm?48:115)*Oe("psychic_boost","Uranium");t.city.coal_mine.upow=+(t.city.coal_mine.cpow/(t.race.cataclysm?48:115)).toFixed(5),t.city.geology.Uranium&&(e*=t.city.geology.Uranium+1),Ji("Uranium",e*f),r.p.Uranium[t.race.cataclysm?z("space_moon_iridium_mine_title"):z("job_coal_miner")]=e/d+"v"}}if(t.interstellar.mining_droid&&F.uran>0){let e=.12*F.uran*Oe("psychic_boost","Uranium"),t=e*d*_;r.p.Uranium[z("interstellar_mining_droid_title")]=e+"v",e>0&&(r.p.Uranium[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%"),Ji("Uranium",t*f)}if(t.space.uranium_mine&&i.uranium_mine){let e=mt("spc_kuiper"),a=i.uranium_mine*Oe("uranium_mine")*Oe("psychic_boost","Uranium"),s=a*d*m*e*_;r.p.Uranium[z("space_kuiper_mine",[t.resource.Uranium.name])]=a+"v",a>0&&(r.p.Uranium[`ᄂ${z("space_syndicate")}`]=-100*(1-e)+"%",r.p.Uranium[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%",r.p.Uranium[`ᄂ${z("quarantine")}+0`]=100*(m-1)+"%"),Ji("Uranium",s*f)}if(t.resource.Oil.display){let e=0;if(t.tauceti.whaling_station&&t.tauceti.whaling_ship){if(t.tauceti.whaling_station.max=750*t.tauceti.whaling_station.count,t.tauceti.whaling_station.fill>0){let a=i.whaling_station*Oe("whaling_station");a>t.tauceti.whaling_station.fill&&(a=t.tauceti.whaling_station.fill),t.tauceti.whaling_station.fill-=a*f,e=a*Oe("whaling_ship_oil")*Oe("psychic_boost","Oil")}let a=c.whaling_ship*Oe("whaling_ship");t.tauceti.whaling_station.fill+=a*f,t.tauceti.whaling_station.fill>t.tauceti.whaling_station.max&&(t.tauceti.whaling_station.fill=t.tauceti.whaling_station.max)}let a=t.space.oil_extractor?i.oil_extractor*Oe("oil_extractor"):0,s=t.city.oil_well?Oe("oil_well")*t.city.oil_well.count:0;a*=Oe("psychic_boost","Oil"),s*=Oe("psychic_boost","Oil");let o=mt("spc_gas_moon"),n=s*h+a*m*o*_+e*S;n*=G*d,t.space.oil_extractor&&(t.space.oil_extractor.lpmod=Oe("oil_extractor")*m*o*_),r.p.Oil[z("city_oil_well")]=s+"v",s>0&&(r.p.Oil[`ᄂ${z("quarantine")}+0`]=100*(h-1)+"%"),r.p.Oil[z("space_gas_moon_oil_extractor_title")]=a+"v",a>0&&(r.p.Oil[`ᄂ${z("space_syndicate")}`]=-100*(1-o)+"%",r.p.Oil[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%",r.p.Oil[`ᄂ${z("quarantine")}+1`]=100*(m-1)+"%"),r.p.Oil[z("tau_roid_whaling_ship")]=e+"v",S>1&&(r.p.Oil[`ᄂ${z("tau_red_womlings")}+0`]=100*(S-1)+"%"),r.p.Oil[z("hunger")]=100*(G-1)+"%",Ji("Oil",n*f)}if(c.iridium_mine){let e=c.iridium_mine*Oe("iridium_mine","iridium").f;e*=Oe("psychic_boost","Iridium");let t=mt("spc_moon"),a=e*G*H.mult*d*t*m*Z*_;r.p.Iridium[z("space_moon_iridium_mine_title")]=e+"v",e>0&&(r.p.Iridium[`ᄂ${z("city_smelter")}+0`]=100*(Z-1)+"%",r.p.Iridium[`ᄂ${z("space_syndicate")}+0`]=-100*(1-t)+"%",r.p.Iridium[`ᄂ${z("space_red_ziggurat_title")}+0`]=100*(_-1)+"%",r.p.Iridium[`ᄂ${z("quarantine")}+0`]=100*(m-1)+"%"),Ji("Iridium",a*f)}if(c.iridium_ship){let e=c.iridium_ship*Oe("iridium_ship");e*=Oe("psychic_boost","Iridium");let t=mt("spc_belt"),a=e*G*H.mult*d*t*m*Z*_;r.p.Iridium[z("job_space_miner")]=e+"v",e>0&&(r.p.Iridium[`ᄂ${z("city_smelter")}+1`]=100*(Z-1)+"%",r.p.Iridium[`ᄂ${z("space_syndicate")}+1`]=-100*(1-t)+"%",r.p.Iridium[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%",r.p.Iridium[`ᄂ${z("quarantine")}+1`]=100*(m-1)+"%"),Ji("Iridium",a*f)}if(i.s_gate&&t.resource.Adamantite.display&&t.galaxy.armed_miner&&n.armed_miner>0){let e=.65*n.armed_miner*Oe("psychic_boost","Iridium"),t=1+.1*n.ore_processor,a=It("gxy_alien2"),s=e*d*a*t*G*H.mult*Z*_;r.p.Iridium[z("galaxy_armed_miner_bd")]=e+"v",e>0&&(r.p.Iridium[`ᄂ${z("galaxy_ore_processor")}`]=-100*(1-t)+"%",r.p.Iridium[`ᄂ${z("city_smelter")}+2`]=100*(Z-1)+"%",r.p.Iridium[`ᄂ${z("galaxy_piracy")}`]=-100*(1-a)+"%",r.p.Iridium[`ᄂ${z("space_red_ziggurat_title")}+2`]=100*(_-1)+"%"),Ji("Iridium",s*f)}if(t.resource.Iridium.display&&J.iridium&&J.iridium>0){let e=J.iridium*H.mult*d*Z*G*S;r.p.Iridium[z("tau_roid_mining_ship")]=J.iridium+"v",r.p.Iridium[`ᄂ${z("city_smelter")}+3`]=100*(Z-1)+"%",S>1&&(r.p.Iridium[`ᄂ${z("tau_red_womlings")}+0`]=100*(S-1)+"%"),Ji("Iridium",e*f)}if(t.space.moon_base&&c.helium_mine){let e=c.helium_mine*Oe("helium_mine").f;e*=Oe("psychic_boost","Helium_3");let t=mt("spc_moon"),a=e*G*d*t*m*_;r.p.Helium_3[z("space_moon_helium_mine_title")]=e+"v",e>0&&(r.p.Helium_3[`ᄂ${z("space_syndicate")}+0`]=-100*(1-t)+"%",r.p.Helium_3[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%",r.p.Helium_3[`ᄂ${z("quarantine")}+0`]=100*(m-1)+"%"),Ji("Helium_3",a*f)}if(t.space.gas_mining&&i.gas_mining){let e=i.gas_mining*Oe("gas_mining");e*=Oe("psychic_boost","Helium_3");let t=mt("spc_gas"),a=e*G*d*t*m*_;r.p.Helium_3[z("space_gas_mining_title")]=e+"v",e>0&&(r.p.Helium_3[`ᄂ${z("space_syndicate")}+1`]=-100*(1-t)+"%",r.p.Helium_3[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%",r.p.Helium_3[`ᄂ${z("quarantine")}+1`]=100*(m-1)+"%"),Ji("Helium_3",a*f)}if(i.refueling_station){let e=i.refueling_station*Oe("refueling_station");e*=Oe("psychic_boost","Helium_3");let t=e*G*d*S;r.p.Helium_3[z("tau_gas_refueling_station_title")]=e+"v",S>1&&(r.p.Helium_3[`ᄂ${z("tau_red_womlings")}+0`]=100*(S-1)+"%"),Ji("Helium_3",t*f)}if(t.interstellar.harvester&&o.harvester){let e=o.harvester*Oe("harvester","helium");e*=Oe("psychic_boost","Helium_3");let a=e*G*d*_;if(r.p.Helium_3[z("interstellar_harvester_title")]=e+"v",e>0&&(r.p.Helium_3[`ᄂ${z("space_red_ziggurat_title")}+2`]=100*(_-1)+"%",t.race.discharge&&t.race.discharge>0&&(a*=.5,r.p.Helium_3[`ᄂ${z("evo_challenge_discharge")}`]="-50%")),Ji("Helium_3",a*f),t.tech.ram_scoop){let e=o.harvester*Oe("harvester","deuterium");e*=Oe("psychic_boost","Deuterium");let t=e*G*d*_;r.p.Deuterium[z("interstellar_harvester_title")]=e+"v",e>0&&(r.p.Deuterium[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%"),Ji("Deuterium",t*f),r.p.Deuterium[z("hunger")]=100*(G-1)+"%"}}if(i.s_gate&&t.galaxy.raider&&n.raider>0){let e=.65*n.raider*Oe("psychic_boost","Deuterium"),t=It("gxy_chthonian"),a=e*d*t*G*_;r.p.Deuterium[z("galaxy_raider")]=e+"v",e>0&&(r.p.Deuterium[`ᄂ${z("galaxy_piracy")}`]=-100*(1-t)+"%",r.p.Deuterium[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%"),Ji("Deuterium",a*f)}if(r.p.Helium_3[z("hunger")]=100*(G-1)+"%",i.outpost){let e=Oe("outpost",!0),a=Oe("psychic_boost","Neutronium");r.p.Neutronium[z("space_gas_moon_outpost_bd")]=e.b*a*i.outpost+"v",t.tech.drone&&(r.p.Neutronium[`ᄂ${z("tech_worker_drone")}`]=100*e.d+"%");let s=mt("spc_gas_moon"),c=i.outpost*e.n*a*G*d*m*s*_;t.space.outpost.lpmod=e.n*a*G*d*m*s*_,e.b>0&&(r.p.Neutronium[`ᄂ${z("space_syndicate")}+0`]=-100*(1-s)+"%",r.p.Neutronium[`ᄂ${z("space_red_ziggurat_title")}+0`]=100*(_-1)+"%",r.p.Neutronium[`ᄂ${z("quarantine")}+0`]=100*(m-1)+"%",t.race.discharge&&t.race.discharge>0&&(c*=.5,t.space.outpost.lpmod*=.5,r.p.Neutronium[`ᄂ${z("evo_challenge_discharge")}+0`]="-50%")),Ji("Neutronium",c*f)}if(i.neutron_miner){let e=i.neutron_miner*Oe("neutron_miner")*Oe("psychic_boost","Neutronium"),a=e*G*d*_;r.p.Neutronium[z("interstellar_neutron_miner_bd")]=e+"v",t.interstellar.neutron_miner.lpmod=Oe("neutron_miner")*G*d*_,e>0&&(r.p.Neutronium[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%",t.race.discharge&&t.race.discharge>0&&(a*=.5,t.interstellar.neutron_miner.lpmod*=.5,r.p.Neutronium[`ᄂ${z("evo_challenge_discharge")}+1`]="-50%")),Ji("Neutronium",a*f)}if(i.s_gate&&t.galaxy.raider&&n.raider>0){let e=.8*n.raider*Oe("psychic_boost","Neutronium"),t=It("gxy_chthonian"),a=e*d*t*G*_;r.p.Neutronium[z("galaxy_raider")]=e+"v",e>0&&(r.p.Neutronium[`ᄂ${z("galaxy_piracy")}`]=-100*(1-t)+"%",r.p.Neutronium[`ᄂ${z("space_red_ziggurat_title")}+2`]=100*(_-1)+"%"),Ji("Neutronium",a*f)}if(t.space.neutronium_mine&&i.neutronium_mine){let e=mt("spc_kuiper"),a=i.neutronium_mine*Oe("neutronium_mine")*Oe("psychic_boost","Neutronium"),s=a*d*m*e*_;r.p.Neutronium[z("space_kuiper_mine",[t.resource.Neutronium.name])]=a+"v",a>0&&(r.p.Neutronium[`ᄂ${z("space_syndicate")}+1`]=-100*(1-e)+"%",r.p.Neutronium[`ᄂ${z("space_red_ziggurat_title")}+3`]=100*(_-1)+"%",r.p.Neutronium[`ᄂ${z("quarantine")}+1`]=100*(m-1)+"%"),Ji("Neutronium",s*f)}if(t.resource.Neutronium.display&&J.neutronium&&J.neutronium>0){let e=J.neutronium*d*S;r.p.Neutronium[z("tau_roid_mining_ship")]=J.neutronium+"v",S>1&&(r.p.Neutronium[`ᄂ${z("tau_red_womlings")}+0`]=100*(S-1)+"%"),Ji("Neutronium",e*f)}if(c.elerium_ship){let e=c.elerium_ship*Oe("elerium_ship")*Oe("psychic_boost","Elerium"),a=mt("spc_belt"),s=e*G*d*m*a*_;r.p.Elerium[z("job_space_miner")]=e+"v",e>0&&(r.p.Elerium[`ᄂ${z("space_syndicate")}+0`]=-100*(1-a)+"%",r.p.Elerium[`ᄂ${z("space_red_ziggurat_title")}+0`]=100*(_-1)+"%",r.p.Elerium[`ᄂ${z("quarantine")}+0`]=100*(m-1)+"%",t.race.discharge&&t.race.discharge>0&&(s*=.75,r.p.Elerium[`ᄂ${z("evo_challenge_discharge")}`]="-25%")),Ji("Elerium",s*f)}if(o.elerium_prospector){let e=o.elerium_prospector*Oe("elerium_prospector")*Oe("psychic_boost","Elerium"),t=e*G*d*_;r.p.Elerium[z("interstellar_elerium_prospector_bd")]=e+"v",e>0&&(r.p.Elerium[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%"),Ji("Elerium",t*f)}if(t.space.elerium_mine&&i.elerium_mine){let e=mt("spc_kuiper"),a=i.elerium_mine*Oe("elerium_mine")*Oe("psychic_boost","Elerium"),s=a*d*m*e*G*_;r.p.Elerium[z("space_kuiper_mine",[t.resource.Elerium.name])]=a+"v",a>0&&(r.p.Elerium[`ᄂ${z("space_syndicate")}+1`]=-100*(1-e)+"%",r.p.Elerium[`ᄂ${z("space_red_ziggurat_title")}+2`]=100*(_-1)+"%",r.p.Elerium[`ᄂ${z("quarantine")}+1`]=100*(m-1)+"%"),Ji("Elerium",s*f)}if(t.resource.Elerium.display&&J.elerium&&J.elerium>0){let e=J.elerium*d*S;r.p.Elerium[z("tau_roid_mining_ship")]=J.elerium+"v",S>1&&(r.p.Elerium[`ᄂ${z("tau_red_womlings")}+0`]=100*(S-1)+"%"),Ji("Elerium",e*f)}if(r.p.Elerium[z("hunger")]=100*(G-1)+"%",t.resource.Adamantite.display&&t.interstellar.mining_droid&&F.adam>0){let e=.075*F.adam*Oe("psychic_boost","Adamantite"),a=e*H.mult*d*_;if(r.p.Adamantite[z("interstellar_mining_droid_title")]=e+"v",e>0){if(t.interstellar.processing&&o.processing){let e=.12;t.tech.ai_core&&t.tech.ai_core>=2&&i.citadel>0&&(e+=.02*i.citadel);let s=o.processing*e;a*=1+s,r.p.Adamantite[`ᄂ${z("interstellar_processing_title")}`]=100*s+"%",t.race.discharge&&t.race.discharge>0&&(a*=.5,r.p.Adamantite[`ᄂ${z("evo_challenge_discharge")}`]="-50%")}r.p.Adamantite[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%"}Ji("Adamantite",a*f)}if(i.s_gate&&t.resource.Adamantite.display&&t.galaxy.armed_miner&&n.armed_miner>0){let e=.23*n.armed_miner*Oe("psychic_boost","Adamantite"),t=1+.1*n.ore_processor,a=It("gxy_alien2"),s=e*d*a*t*H.mult*_;r.p.Adamantite[z("galaxy_armed_miner_bd")]=e+"v",e>0&&(r.p.Adamantite[`ᄂ${z("galaxy_ore_processor")}`]=-100*(1-t)+"%",r.p.Adamantite[`ᄂ${z("galaxy_piracy")}`]=-100*(1-a)+"%",r.p.Adamantite[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%"),Ji("Adamantite",s*f)}if(t.resource.Adamantite.display&&t.space.titan_mine){let e=mt("spc_titan"),a=i.ai_colonist?la(t.civic.titan_colonist.workers,"titan_colonist")+ua(i.ai_colonist):la(t.civic.titan_colonist.workers,"titan_colonist"),s=Oe("titan_mine","adamantite")*c.titan_mine*a*Oe("psychic_boost","Adamantite"),o=s*H.mult*d*m*e*_;r.p.Adamantite[z("city_mine")]=s+"v",s>0&&(r.p.Adamantite[`ᄂ${z("space_syndicate")}`]=-100*(1-e)+"%",r.p.Adamantite[`ᄂ${z("space_red_ziggurat_title")}+2`]=100*(_-1)+"%",r.p.Adamantite[`ᄂ${z("quarantine")}+0`]=100*(m-1)+"%"),Ji("Adamantite",o*f)}if(t.resource.Infernite.display){if(t.civic.hell_surveyor.workers>0){let e=t.tech.infernite>=3?.015:.01,a=la(t.civic.hell_surveyor.workers,"hell_surveyor")*e*Oe("psychic_boost","Infernite"),s=1;if(t.tech.infernite>=2&&i.sensor_drone){let e=t.tech.infernite>=4?t.tech.infernite>=6?.5:.2:.1;s=1+i.sensor_drone*e}let c=a*s*d;r.p.Infernite[z("job_hell_surveyor")]=a+"v",r.p.Infernite[`ᄂ${z("portal_sensor_drone_title")}`]=100*(s-1)+"%",Ji("Infernite",c*f)}if(i.infernite_mine){let e=Oe("infernite_mine"),a=i.infernite_mine*e*Oe("psychic_boost","Infernite"),s=a*d;t.portal.infernite_mine.lpmod=e*d,r.p.Infernite[z("city_mine")]=a+"v",Ji("Infernite",s*f)}}if(i.s_gate&&t.resource.Bolognium.display&&t.galaxy.bolognium_ship&&n.bolognium_ship>0){let e=n.bolognium_ship*Oe("bolognium_ship")*Oe("psychic_boost","Bolognium"),a=It("gxy_gateway"),s=e*d*a*_;r.p.Bolognium[z("galaxy_bolognium_ship")]=e+"v",e>0&&(r.p.Bolognium[`ᄂ${z("galaxy_piracy")}+0`]=-100*(1-a)+"%",r.p.Bolognium[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%",t.race.discharge&&t.race.discharge>0&&(s*=.5,r.p.Bolognium[`ᄂ${z("evo_challenge_discharge")}+0`]="-50%")),Ji("Bolognium",s*f)}if(t.civic.pit_miner.display)if(tt()){let e=la(t.civic.pit_miner.workers,"pit_miner");e*=hi(e,"miner");let a=1+.5*(c.colony||0);{let t=e*Oe("psychic_boost","Bolognium");t*=Oe("mining_pit","bolognium");let s=t*d*a;r.p.Bolognium[z("job_pit_miner")]=t+"v",t>0&&(r.p.Bolognium[`ᄂ${z("tau_home_colony")}`]=100*(a-1)+"%"),Ji("Bolognium",s*f)}{let t=e*Oe("psychic_boost","Stone");t*=Oe("mining_pit","stone");let s=t*d*a;r.p.Stone[z("job_pit_miner")]=t+"v",t>0&&(r.p.Stone[`ᄂ${z("tau_home_colony")}`]=100*(a-1)+"%"),Ji("Stone",s*f)}{let t=e*Oe("psychic_boost","Adamantite");t*=Oe("mining_pit","adamantite");let s=t*H.mult*d*a;r.p.Adamantite[z("job_pit_miner")]=t+"v",t>0&&(r.p.Adamantite[`ᄂ${z("tau_home_colony")}`]=100*(a-1)+"%"),Ji("Adamantite",s*f)}if(t.tech.isolation){{let t=e*Oe("psychic_boost","Copper");t*=Oe("mining_pit","copper");let s=t*H.mult*d*a;r.p.Copper[z("job_pit_miner")]=t+"v",t>0&&(r.p.Copper[`ᄂ${z("tau_home_colony")}`]=100*(a-1)+"%"),Ji("Copper",s*f)}{let t=e*Oe("psychic_boost","Coal");t*=Oe("mining_pit","coal");let s=t*d*a;r.p.Coal[z("job_pit_miner")]=t+"v",t>0&&(r.p.Coal[`ᄂ${z("tau_home_colony")}`]=100*(a-1)+"%"),Ji("Coal",s*f)}if(t.race.lone_survivor){let t=e*Oe("psychic_boost","Aluminium");t*=Oe("mining_pit","aluminium");let s=t*H.mult*d*a;r.p.Aluminium[z("job_pit_miner")]=t+"v",t>0&&(r.p.Aluminium[`ᄂ${z("tau_home_colony")}`]=100*(a-1)+"%"),Ji("Aluminium",s*f)}{let t=e*Oe("psychic_boost","Chrysotile");t*=Oe("mining_pit","chrysotile");let s=t*d*a*G;r.p.Chrysotile[z("job_pit_miner")]=t+"v",t>0&&(r.p.Chrysotile[`ᄂ${z("tau_home_colony")}`]=100*(a-1)+"%",r.p.Chrysotile[z("hunger")]=100*(G-1)+"%"),Ji("Chrysotile",s*f)}}}else{let e={},a=la(t.civic.pit_miner.workers,"pit_miner");a*=hi(a,"miner"),a*=Oe("mining_pit","materials");let s=1+.5*(c.colony||0),i=a*d*s;e[z("job_pit_miner")]=a+"v",a>0&&(e[`ᄂ${z("tau_home_colony")}`]=100*(s-1)+"%"),r.p.Materials=e,Ji("Materials",i*f)}if(t.tauceti.tau_farm&&i.tau_farm){let e=1+.5*(c.colony||0);if(!t.race.kindling_kindred&&!t.race.smoldering){let t=Oe("tau_farm","lumber")*i.tau_farm*Oe("psychic_boost","Lumber"),a=t*d*e;r.p.Lumber[z("tau_home_tau_farm")]=t+"v",t>0&&(r.p.Lumber[`ᄂ${z("tau_home_colony")}`]=100*(e-1)+"%"),Ji("Lumber",a*f)}}if(Lc()&&(r.p.Adamantite[z("city_shrine")]=(100*(H.mult-1)).toFixed(1)+"%"),i.s_gate&&t.resource.Bolognium.display&&t.galaxy.armed_miner&&n.armed_miner>0){let e=.032*n.armed_miner*Oe("psychic_boost","Bolognium"),a=1+.1*n.ore_processor,s=It("gxy_alien2"),i=e*d*s*a*_;r.p.Bolognium[z("galaxy_armed_miner_bd")]=e+"v",e>0&&(r.p.Bolognium[`ᄂ${z("galaxy_ore_processor")}`]=-100*(1-a)+"%",r.p.Bolognium[`ᄂ${z("galaxy_piracy")}+1`]=-100*(1-s)+"%",r.p.Bolognium[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%",t.race.discharge&&t.race.discharge>0&&(i*=.5,r.p.Bolognium[`ᄂ${z("evo_challenge_discharge")}+1`]="-50%")),Ji("Bolognium",i*f)}if(i.s_gate&&t.resource.Orichalcum.display&&t.galaxy.excavator&&i.excavator>0){let e=i.excavator*Oe("excavator")*Oe("psychic_boost","Orichalcum"),a=It("gxy_chthonian"),s=e*d*a*_;t.galaxy.excavator.lpmod=Oe("excavator")*d*a*_,r.p.Orichalcum[z("galaxy_excavator")]=e+"v",e>0&&(r.p.Orichalcum[`ᄂ${z("galaxy_piracy")}`]=-100*(1-a)+"%",r.p.Orichalcum[`ᄂ${z("space_red_ziggurat_title")}`]=100*(_-1)+"%",t.race.discharge&&t.race.discharge>0&&(s*=.5,t.galaxy.excavator.lpmod*=.5,r.p.Orichalcum[`ᄂ${z("evo_challenge_discharge")}`]="-50%")),Ji("Orichalcum",s*f)}if(t.space.orichalcum_mine&&i.orichalcum_mine){let e=mt("spc_kuiper"),a=i.orichalcum_mine*Oe("orichalcum_mine")*Oe("psychic_boost","Orichalcum"),s=a*d*m*e*_;r.p.Orichalcum[z("space_kuiper_mine",[t.resource.Orichalcum.name])]=a+"v",a>0&&(r.p.Orichalcum[`ᄂ${z("space_syndicate")}`]=-100*(1-e)+"%",r.p.Orichalcum[`ᄂ${z("space_red_ziggurat_title")}+1`]=100*(_-1)+"%",r.p.Orichalcum[`ᄂ${z("quarantine")}+0`]=100*(m-1)+"%"),Ji("Orichalcum",s*f)}if(t.resource.Orichalcum.display&&J.orichalcum&&J.orichalcum>0){let e=J.orichalcum*d*S;r.p.Orichalcum[z("tau_roid_mining_ship")]=J.orichalcum+"v",S>1&&(r.p.Orichalcum[`ᄂ${z("tau_red_womlings")}+0`]=100*(S-1)+"%"),Ji("Orichalcum",e*f)}if(t.race.truepath&&t.tech.tau_red&&t.tech.tau_red>=5&&t.tauceti.womling_mine&&t.tauceti.overseer){let e=t.tauceti.womling_mine.miners*Oe("womling_mine","unobtainium")*Oe("psychic_boost","Unobtainium"),a=t.tauceti.overseer.prod/100,s=e*a*d;if(r.p.Unobtainium[z("tau_red_womlings")]=e+"v",e>0&&(r.p.Unobtainium[`ᄂ${z("tau_red_womling_prod_label")}`]=-100*(1-a)+"%"),Ji("Unobtainium",s*f),t.tech.isolation){let e=t.tauceti.womling_mine.miners*Oe("womling_mine","uranium")*Oe("psychic_boost","Uranium");r.p.Uranium[z("tau_red_womlings")]=e+"v";let s=e*a*d;e>0&&(r.p.Uranium[`ᄂ${z("tau_red_womling_prod_label")}`]=-100*(1-a)+"%"),Ji("Uranium",s*f);let i=t.tauceti.womling_mine.miners*Oe("womling_mine","titanium")*Oe("psychic_boost","Titanium");r.p.Titanium[z("tau_red_womlings")]=i+"v";let c=i*a*H.mult*d;if(i>0&&(r.p.Titanium[`ᄂ${z("tau_red_womling_prod_label")}`]=-100*(1-a)+"%"),Ji("Titanium",c*f),t.race.lone_survivor){let e=t.tauceti.womling_mine.miners*Oe("womling_mine","copper")*Oe("psychic_boost","Copper");r.p.Copper[z("tau_red_womlings")]=e+"v";let s=e*a*H.mult*d;s>0&&(r.p.Copper[`ᄂ${z("tau_red_womling_prod_label")}`]=-100*(1-a)+"%"),Ji("Copper",s*f);let i=t.tauceti.womling_mine.miners*Oe("womling_mine","aluminium")*Oe("psychic_boost","Aluminium");r.p.Aluminium[z("tau_red_womlings")]=i+"v";let c=i*a*H.mult*d;i>0&&(r.p.Aluminium[`ᄂ${z("tau_red_womling_prod_label")}`]=-100*(1-a)+"%"),Ji("Aluminium",c*f);let o=t.tauceti.womling_mine.miners*Oe("womling_mine","iridium")*Oe("psychic_boost","Iridium");r.p.Iridium[z("tau_red_womlings")]=o+"v";let n=o*a*H.mult*d;o>0&&(r.p.Iridium[`ᄂ${z("tau_red_womling_prod_label")}`]=-100*(1-a)+"%"),Ji("Iridium",n*f);let l=t.tauceti.womling_mine.miners*Oe("womling_mine","neutronium")*Oe("psychic_boost","Neutronium");r.p.Neutronium[z("tau_red_womlings")]=l+"v";let u=l*a*G*d;l>0&&(r.p.Neutronium[`ᄂ${z("tau_red_womling_prod_label")}`]=-100*(1-a)+"%"),Ji("Neutronium",u*f)}}}r.p.Neutronium[z("hunger")]=100*(G-1)+"%",Lc()&&(r.p.Iridium[z("city_shrine")]=(100*(H.mult-1)).toFixed(1)+"%"),r.p.Iridium[z("hunger")]=100*(G-1)+"%";let X=R?R*d:0;if(t.tech.currency>=1){let e=t.resource[t.race.species].amount+t.civic.garrison.workers-t.civic.unemployed.workers;if(t.race.high_pop&&(e=Pe(e)),e*=t.race.truepath?.2:.4,t.race.greedy&&(e*=1-di.greedy.vars()[0]/100),t.tech.isolation&&(e*=15),e*=Oe("psychic_cash"),x){if(t.tech.banking&&t.tech.banking>=2){let a=+la(t.civic.banker.impact,"banker");t.tech.banking>=10&&(a+=.02*t.tech.stock_exchange),t.race.truthful&&(a*=1-di.truthful.vars()[0]/100),"republic"===t.civic.govern.type&&(a*=1+re.republic()[0]/100),t.race.high_pop&&(a=Pe(a)),e*=1+t.civic.banker.workers*a}}else e/=2;e*=t.civic.taxes.tax_rate/20,"oligarchy"===t.civic.govern.type&&(e*=1-re.oligarchy()[0]/100),"corpocracy"===t.civic.govern.type&&(e*=.5),"socialist"===t.civic.govern.type&&(e*=1-re.socialist()[3]/100),t.race.banana&&(e*=.05);let a=1;if(t.tech.anthropology&&t.tech.anthropology>=4)if(t.race.truepath){let e=t.resource[t.race.species].amount*t.city.temple.count*.08;r.p.Money[z("city_temple")]=e+"v",Ji("Money",+(e*d*f).toFixed(2))}else a+=.025*(t.race.cataclysm||t.race.orbit_decayed?t.space.ziggurat?t.space.ziggurat.count:0:t.city.temple.count);let s=0;if(!t.tech.world_control&&"federation"!==t.civic.govern.type)for(let a=0;a<3;a++)t.civic.foreign[`gov${a}`].buy&&(s+=.2*e);let i=Nc("tax"),c=(e-s)*a*i.mult;c*=d,r.p.Money[z("morale_tax")]=e+"v",e>0&&(r.p.Money[`ᄂ${z("civics_spy_purchase_bd")}`]=-s+"v",r.p.Money[t.race.cataclysm||t.race.orbit_decayed?`ᄂ${z("space_red_ziggurat_title")}`:`ᄂ${z("city_temple")}`]=100*(a-1)+"%",r.p.Money[`ᄂ${z("city_shrine")}`]=100*(i.mult-1)+"%"),r.p.Money[z("city_factory")]=R+"v",t.race.discharge&&t.race.discharge>0&&R>0&&(r.p.Money[`ᄂ${z("evo_challenge_discharge")}`]="-50%"),Ji("Money",+(c*f).toFixed(2)),X+=c}if(t.race.truepath&&t.tauceti.overseer){let e=(t.tauceti.overseer.loyal+t.tauceti.overseer.morale)/200,a=t.tauceti.overseer.pop;i.womling_station&&(a+=2*i.womling_station);let s=a*e*(t.tech.isolation?25:12),c=i.tau_cultural_center?1+.08*i.tau_cultural_center:1,o=s*d*c;r.p.Money[z("tau_red_womlings")]=s+"v",r.p.Money[`ᄂ${z("tech_cultural_center")}`]=100*(c-1)+"%",Ji("Money",+(o*f).toFixed(2))}if(t.tech.gambling&&(i.casino||i.spc_casino||i.tauceti_casino)){let e=0;i.casino&&(e+=i.casino),i.spc_casino&&(e+=i.spc_casino),i.tauceti_casino&&(e+=i.tauceti_casino);let a=Math.log2(1+t.resource[t.race.species].amount),s=2.5;t.race.gambler&&(s*=1+di.gambler.vars()[0]*t.race.gambler/100),a*=s,t.tech.gambling>=2&&(a*=t.tech.gambling>=5?2:1.5),t.tech.stock_exchange&&t.tech.gambling>=4&&(a*=1+.01*t.tech.stock_exchange),"corpocracy"===t.civic.govern.type&&(a*=1+re.corpocracy()[0]/100),"socialist"===t.civic.govern.type&&(a*=1-re.socialist()[3]/100),t.race.inflation&&(a*=1+t.race.inflation/1250),t.tech.isolation&&(a*=1.25,t.tech.iso_gambling&&(a*=1+.05*la(t.civic.banker.workers,"banker"))),a*=Oe("psychic_cash");let c=D("racketeer",1);c&&(a*=1+c/100),a*=e,r.p.Money[z("city_casino")]=a+"v",Ji("Money",+(a*f*d*G).toFixed(2)),X+=a*d*G}if(t.city.tourist_center){let e=0,s=t.tech.monument&&t.tech.monument>=3&&i.s_gate?3:1;t.city.amphitheatre&&(e+=t.city.tourist_center.on*t.city.amphitheatre.count*s),t.city.casino&&(e+=t.city.tourist_center.on*t.city.casino.count*5*s),t.space.spc_casino&&(e+=t.city.tourist_center.on*t.space.spc_casino.count*5*s),t.tech.monuments&&(e+=t.city.tourist_center.on*t.tech.monuments*2*s),t.city.trade&&t.stats.achieve.banana&&t.stats.achieve.banana.l>=4&&(e+=t.city.tourist_center.on*t.city.trade.count*3*s);let c=D("pious",1);c&&t.city.temple&&(e+=t.city.tourist_center.on*t.city.temple.count*c*s),"corpocracy"===t.civic.govern.type&&(e*=1+re.corpocracy()[2]/100),"socialist"===t.civic.govern.type&&(e*=1-re.socialist()[3]/100),"aquarius"===a&&(e*=1+U("aquarius")[0]/100),e*=Oe("psychic_cash"),r.p.Money[z("tech_tourism")]=Math.round(e)+"v","aquarius"===a&&(r.p.Money[`ᄂ${z("sign_aquarius")}`]=U("aquarius")[0]+"%"),Ji("Money",+(e*f*d*G).toFixed(2)),X+=e*d*G}if(t.tauceti.tau_cultural_center){let e=0;t.tauceti.tauceti_casino&&(e+=i.tau_cultural_center*i.tauceti_casino*20),t.tech.monuments&&(e+=i.tau_cultural_center*t.tech.monuments*5),t.tech.tau_culture&&t.tech.tau_culture>=2&&(e+=i.tau_cultural_center*c.colony*15),"corpocracy"===t.civic.govern.type?e*=1+re.corpocracy()[2]/100:"socialist"===t.civic.govern.type&&(e*=1-re.socialist()[3]/100),e*=Oe("psychic_cash"),r.p.Money[z("tech_cultural_center")]=Math.round(e)+"v","aquarius"===a&&(e*=1+U("aquarius")[0]/100,e[`ᄂ${z("sign_aquarius")}`]=U("aquarius")[0]+"%"),Ji("Money",+(e*f*d*G).toFixed(2)),X+=e*d*G}if(t.tech.tau_junksale){let e=40*c.womling_village,t=i.tau_cultural_center?1+.08*i.tau_cultural_center:1;r.p.Money[z("tau_red_womling_village")]=Math.round(e)+"v",r.p.Money[`ᄂ${z("tech_cultural_center")}+1`]=100*(t-1)+"%",Ji("Money",+(e*t*f*d*G).toFixed(2)),X+=e*t*d*G}{let e=D("racketeer",0);if(e){let t=-Math.round(X*(e/100));r.p.consume.Money[z("gov_trait_racketeer_bd")]=t,Ji("Money",+(t*f).toFixed(2))}}{let e=D("pious",0);if(e){let t=-Math.round(X*(e/100));r.p.consume.Money[z("gov_trait_pious_bd")]=t,Ji("Money",+(t*f).toFixed(2))}}if(t.tech.foundry){let e=t.race.resourceful?1-di.resourceful.vars()[0]/100:1;Oi("arraak")>0&&di.resourceful.vars(1)[0];let a=Xa(),s={};er("","",!0),Object.keys(a).forEach((function(i){if("Thermite"===i&&!Ec("summer"))return;r.p[i]={};let c=la(t.city.foundry[i],"craftsman");t.race.servants&&t.race.servants.hasOwnProperty("sjobs")&&t.race.servants.sjobs.hasOwnProperty(i)&&(c+=ua(t.race.servants.sjobs[i]));let o=er(i,"auto").multiplier,n=t.genes.crafty?2:1,l=Math.floor(t.resource[a[i][0].r].amount/(a[i][0].a*n*e/140));for(let r=1;r0&&(r.p.consume[e][z("job_craftsman")]=-s[e])}))}!t.settings.showResearch&&(t.resource.Lumber.amount>=5||t.resource.Stone.amount>=6)&&(t.settings.showResearch=!0),t.city.power_total=-C,t.city.power=O,t.city.power<0?($("#powerMeter").addClass("low"),$("#powerMeter").removeClass("neutral"),$("#powerMeter").removeClass("high")):t.city.power>0?($("#powerMeter").removeClass("low"),$("#powerMeter").removeClass("neutral"),$("#powerMeter").addClass("high")):($("#powerMeter").removeClass("low"),$("#powerMeter").addClass("neutral"),$("#powerMeter").removeClass("high")),i.world_controller&&i.world_controller>0?0===t.tech.wsc&&(t.tech.wsc=1,gs()):0!==t.tech.wsc&&(t.tech.wsc=0,gs()),t.tech.portal>=2&&(t.portal.fortress.garrison>0?t.tech.portal_guard=1:t.tech.portal_guard=0),t.race.decay&&Object.keys(Va).forEach((function(e){if(t.resource[e].amount>50){let a=+((t.resource[e].amount-50)*(.001*Va[e])).toFixed(3);Ji(e,-a*f),r.p.consume[e][z("evo_challenge_decay")]=-a}else delete r.p.consume[e][z("evo_challenge_decay")]})),xo&&(t.tech.piracy&&Ht(),t.settings.portal.ruins&&(ic({el:"#srprtl_ruins"},"update"),ic({el:"#foundry"},"update")),t.settings.portal.gate&&ic({el:"#srprtl_gate"},"update"))}if(t.civic.garrison&&t.civic.garrison.workers=2?.08:.05;t.blood.lust&&(a+=.002*t.blood.lust);let r=D("militant",0);r&&(a*=1+r/100),e*=1+(t.race.orbit_decayed&&t.space.space_barracks?t.space.space_barracks.on:t.city.boot_camp.count)*a}t.race.beast&&(e*=1+di.beast.vars()[2]/100),t.civic.garrison.rate=e*f,t.race.brute&&(t.civic.garrison.rate+=di.brute.vars()[1]/40*f);let a=Oi("orc");a>0&&(t.civic.garrison.rate+=di.brute.vars(1)[1]/40*a*f),t.civic.garrison.progress+=t.civic.garrison.rate,t.civic.garrison.progress>=100&&(t.civic.garrison.progress=0,t.civic.garrison.workers++,t.portal.fortress&&t.portal.fortress.assigned&&t.portal.fortress.garrison0?($("#portal-carport .count").hasClass("has-text-alert")||$("#portal-carport .count").addClass("has-text-alert"),t.portal.carport.repair++,t.portal.carport.repair>=Zr.portal.prtl_fortress.carport.repair()&&(t.portal.carport.repair=0,t.portal.carport.damaged--)):$("#portal-carport .count").hasClass("has-text-alert")&&$("#portal-carport .count").removeClass("has-text-alert")),Object.keys(t.resource).forEach((function(e){(t.resource[e].rate>0||0===t.resource[e].rate&&-1===t.resource[e].max)&&function(e,a){let s=1e3;if(t.race.slow){let e=1+di.slow.vars()[0]/100;s=Math.floor(s*e)}if(t.race.hyper){let e=1-di.hyper.vars()[0]/100;s=Math.floor(s*e)}t.resource[e].diff=+(t.resource[e].delta/(a/s)).toFixed(2),t.resource[e].delta=0,t.resource[e].hasOwnProperty("gen")&&t.resource[e].hasOwnProperty("gen_d")&&(t.resource[e].gen=+(t.resource[e].gen_d/(a/s)).toFixed(2),t.resource[e].gen_d=0);let i=$(`#res${e} .diff`);t.race.decay?t.resource[e].diff<0?t.resource[e].diff>=r.p.consume[e][z("evo_challenge_decay")]?i.hasClass("has-text-warning")||(i.removeClass("has-text-danger"),i.addClass("has-text-warning")):i.hasClass("has-text-danger")||(i.removeClass("has-text-warning"),i.addClass("has-text-danger")):t.resource[e].diff>=0&&(i.hasClass("has-text-danger")||i.hasClass("has-text-warning"))&&(i.removeClass("has-text-danger"),i.removeClass("has-text-warning")):t.resource[e].diff<0&&!i.hasClass("has-text-danger")?i.addClass("has-text-danger"):t.resource[e].diff>=0&&i.hasClass("has-text-danger")&&i.removeClass("has-text-danger")}(e,P.mt)})),t.settings.expose&&(window.evolve||fo(),vo()),Ec("easter").active)for(y=1;y<=18;y++)$(`#egg${y}`).length>0&&!$(`#egg${y}`).hasClass("binded")&&(kc(y),$(`#egg${y}`).addClass("binded"));if(Ec("halloween").active){for(y=1;y<=7;y++)$(`#treat${y}`).length>0&&!$(`#treat${y}`).hasClass("binded")&&(Mc(y,!1),$(`#treat${y}`).addClass("binded"));for(y=1;y<=7;y++)$(`#trick${y}`).length>0&&!$(`#trick${y}`).hasClass("binded")&&(Mc(y,!0),$(`#trick${y}`).addClass("binded"))}xo=!1}();break;case"mid":!function(){const e=W();if("protoplasm"===t.race.species){let e=100;t.stats.achieve.mass_extinction&&t.stats.achieve.mass_extinction.l>1&&(e+=50*(t.stats.achieve.mass_extinction.l-1));var a={RNA:e,DNA:e};if(t.evolution.membrane){let e=t.evolution.mitochondria?5*t.evolution.mitochondria.count+5:5;a.RNA+=t.evolution.membrane.count*e}if(t.evolution.eukaryotic_cell){let e=t.evolution.mitochondria?10*t.evolution.mitochondria.count+10:10;a.DNA+=t.evolution.eukaryotic_cell.count*e}t.resource.RNA.max=a.RNA,t.resource.DNA.max=a.DNA,Object.keys(Zr.evolution).forEach((function(e){if(Zr.evolution[e]&&Zr.evolution[e].cost){let t=Zr.evolution[e],a=$("#"+t.id);a.length>0&&(js(t)?a.hasClass("cna")&&a.removeClass("cna"):a.hasClass("cna")||a.addClass("cna"),js(t,!0)?a.hasClass("cnam")&&a.removeClass("cnam"):a.hasClass("cnam")||a.addClass("cnam"))}}))}else{a={Money:1e3,Slave:0,Mana:0,Energy:100,Sus:100,Knowledge:t.stats.achieve.extinct_junker&&t.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};var s={unemployed:-1,hunter:-1,forager:-1,farmer:-1,lumberjack:-1,quarry_worker:-1,crystal_miner:-1,scavenger:-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(t.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):t.race.lone_survivor&&(a.Money+=1e9,a.Knowledge+=1e5,a.Food+=9e3,a.Water+=1e4,a.Elerium+=999),t.stats.feat.adept&&t.stats.achieve.whitehole&&t.stats.achieve.whitehole.l>0){let e=Math.min(t.stats.achieve.whitehole.l,t.stats.feat.adept);a.Lumber+=60*e,a.Stone+=60*e}t.race.hasOwnProperty("psychicPowers")&&t.race.psychicPowers.hasOwnProperty("channel")&&(a.Energy-=t.race.psychicPowers.channel.boost,a.Energy-=t.race.psychicPowers.channel.assault,a.Energy-=t.race.psychicPowers.channel.cash,a.Energy<0&&(a.Energy=100,t.race.psychicPowers.channel.boost=0,t.race.psychicPowers.channel.assault=0,t.race.psychicPowers.channel.cash=0));var d={[z("base")]:a.Money+"v"},_={},p={},h={[z("base")]:a.Mana+"v"},m={[z("base")]:a.Mana+"v"},f={[z("base")]:a.Knowledge+"v"},v={},y={},b={},w={[z("base")]:a.Food+"v"},x={[z("base")]:a.Lumber+"v"},k={[z("base")]:a.Stone+"v"},q={[z("base")]:a.Chrysotile+"v"},M={[z("base")]:a.Crystal+"v"},P={[z("base")]:a.Furs+"v"},O={[z("base")]:a.Copper+"v"},C={[z("base")]:a.Iron+"v"},j={[z("base")]:a.Cement+"v"},S={[z("base")]:a.Coal+"v"},F={[z("base")]:a.Oil+"v"},A={[z("base")]:a.Uranium+"v"},T={[z("base")]:a.Steel+"v"},E={[z("base")]:a.Aluminium+"v"},I={[z("base")]:a.Titanium+"v"},K={[z("base")]:a.Alloy+"v"},L={[z("base")]:a.Polymer+"v"},N={[z("base")]:a.Iridium+"v"},B={[z("base")]:a.Helium_3+"v"},G={[z("base")]:a.Water+"v"},R={[z("base")]:a.Deuterium+"v"},H={[z("base")]:a.Neutronium+"v"},Q={[z("base")]:a.Adamantite+"v"},Z={[z("base")]:a.Infernite+"v"},V={[z("base")]:a.Elerium+"v"},J={[z("base")]:a.Nano_Tube+"v"},Y={[z("base")]:a.Graphene+"v"},X={[z("base")]:a.Stanene+"v"},ee={[z("base")]:a.Bolognium+"v"},ae={[z("base")]:a.Vitreloy+"v"},re={[z("base")]:a.Orichalcum+"v"},se={[z("base")]:a.Unobtainium+"v"},ie={[z("base")]:a.Cipher+"v"},ce={[z("base")]:a.Nanite+"v"},oe={[z("base")]:a.Materials+"v"};if(r.c={Money:d,[t.race.species]:_,Slave:p,Mana:h,Sus:m,Knowledge:f,Zen:v,Crates:y,Containers:b,Food:w,Lumber:x,Stone:k,Chrysotile:q,Crystal:M,Furs:P,Copper:O,Iron:C,Cement:j,Coal:S,Oil:F,Uranium:A,Steel:T,Aluminium:E,Titanium:I,Alloy:K,Polymer:L,Iridium:N,Helium_3:B,Water:G,Deuterium:R,Neutronium:H,Adamantite:Q,Infernite:Z,Elerium:V,Nano_Tube:J,Graphene:Y,Stanene:X,Bolognium:ee,Vitreloy:ae,Orichalcum:re,Unobtainium:se,Nanite:ce,Cipher:ie,Materials:oe},a[t.race.species]=0,t.race.unfathomable&&t.city.captive_housing){let e=t.tech.military?t.tech.military>=5?t.tech.military-1:t.tech.military:1,a=la(t.civic.hunter.workers,"hunter")*e;a*=hi(a,"hunting"),t.race.swift&&(a*=1+di.swift.vars()[1]/100),t.race.servants&&(a+=t.race.servants.jobs.hunter*e);let r=0,s=0,i=[];if(t.city.hasOwnProperty("surfaceDwellers"))for(let e=0;e0&&i.push(e)}let c=Math.round(40/di.unfathomable.vars()[1]);if(r=2&&t.civic.torturer.workers>0&&i.length>0&&Math.rand(0,Math.ceil((s+1)**1.45))0&&(t.race.psychicPowers.boostTime--,(t.race.psychicPowers.boostTime<0||t.race.psychicPowers.boostTime>360)&&(t.race.psychicPowers.boostTime=0)),t.race.psychicPowers&&t.race.psychicPowers.assaultTime&&t.race.psychicPowers.assaultTime>0&&(t.race.psychicPowers.assaultTime--,(t.race.psychicPowers.assaultTime<0||t.race.psychicPowers.assaultTime>360)&&(t.race.psychicPowers.assaultTime=0)),t.race.psychicPowers&&t.race.psychicPowers.cash&&t.race.psychicPowers.cash>0&&(t.race.psychicPowers.cash--,(t.race.psychicPowers.cash<0||t.race.psychicPowers.cash>360)&&(t.race.psychicPowers.cash=0))),t.city.nanite_factory){let e=t.city.nanite_factory.count*Nr(2500);a.Nanite+=e,ce[z("city_nanite_factory")]=e+"v"}if(i.transmitter&&t.race.artifical){let e=i.transmitter*Nr(100);a.Food+=e,w[z("city_transmitter")]=e+"v"}if(t.city.pylon||t.space.pylon||t.tauceti.pylon){let e=0,r="city_pylon";(t.race.cataclysm||t.race.orbit_decayed)&&t.space.pylon?(e=Nr(2)*t.space.pylon.count,r="space_red_pylon"):t.tech.isolation&&t.tauceti.pylon?(e=Nr(2)*t.tauceti.pylon.count,r="tau_home_pylon"):t.city.pylon&&(e=Nr(5)*t.city.pylon.count),a.Mana+=e,h[z(r)]=e+"v"}if(t.city.captive_housing){let e=t.city.captive_housing.count;t.city.captive_housing.raceCap=e*(t.tech.unfathomable&&t.tech.unfathomable>=3?3:2),t.city.captive_housing.cattleCap=5*e}if(t.city.farm&&t.tech.farm){let e=t.city.farm.count*Zr.city.farm.citizens();a[t.race.species]+=e,_[z("city_farm")]=e+"v"}if(t.city.wharf){let e=t.tech.world_control?15:10;t.tech.particles&&t.tech.particles>=2&&(e*=2),a.Crates+=t.city.wharf.count*e,y[z("city_wharf")]=t.city.wharf.count*e+"v",a.Containers+=t.city.wharf.count*e,b[z("city_wharf")]=t.city.wharf.count*e+"v"}if(t.space.munitions_depot){let e=25;a.Crates+=t.space.munitions_depot.count*e,y[z("tech_munitions_depot")]=t.space.munitions_depot.count*e+"v",a.Containers+=t.space.munitions_depot.count*e,b[z("tech_munitions_depot")]=t.space.munitions_depot.count*e+"v"}if(t.interstellar.cargo_yard){a.Crates+=50*t.interstellar.cargo_yard.count,y[z("interstellar_cargo_yard_title")]=50*t.interstellar.cargo_yard.count+"v",a.Containers+=50*t.interstellar.cargo_yard.count,b[z("interstellar_cargo_yard_title")]=50*t.interstellar.cargo_yard.count+"v";let e=t.interstellar.cargo_yard.count*Nr(200);a.Neutronium+=e,H[z("interstellar_cargo_yard_title")]=e+"v",e=t.interstellar.cargo_yard.count*Nr(150),a.Infernite+=e,Z[z("interstellar_cargo_yard_title")]=e+"v"}if(t.interstellar.neutron_miner&&i.neutron_miner){let e=i.neutron_miner*Nr(500);a.Neutronium+=e,H[z("interstellar_neutron_miner_title")]=e+"v"}if(t.city.storage_yard){let e=t.tech.container>=3?20:10;t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=1&&(e+=10),t.tech.world_control&&(e+=10),t.tech.particles&&t.tech.particles>=2&&(e*=2),a.Crates+=t.city.storage_yard.count*e,y[z("city_storage_yard")]=t.city.storage_yard.count*e+"v"}if(t.space.garage){let e=t.tech.particles>=4?20+t.tech.supercollider:20;(t.tech.world_control||t.race.cataclysm)&&(e+=10),a.Containers+=t.space.garage.count*e,b[z("space_red_garage_title")]=t.space.garage.count*e+"v",(t.race.cataclysm||t.race.orbit_decayed)&&(a.Crates+=t.space.garage.count*e,y[z("space_red_garage_title")]=t.space.garage.count*e+"v")}if(t.tech.tp_depot&&(a.Containers+=50*t.tech.tp_depot,b[z("galaxy_gateway_depot")]=50*t.tech.tp_depot+"v",a.Crates+=50*t.tech.tp_depot,y[z("galaxy_gateway_depot")]=50*t.tech.tp_depot+"v"),t.city.warehouse){let e=t.tech.steel_container>=2?20:10;t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=2&&(e+=10),t.tech.world_control&&(e+=10),t.tech.particles&&t.tech.particles>=2&&(e*=2),a.Containers+=t.city.warehouse.count*e,b[z("city_warehouse")]=t.city.warehouse.count*e+"v"}if(t.city.rock_quarry){let e=os(t.city.rock_quarry.count*Nr(100));a.Stone+=e,k[z("city_rock_quarry")]=e+"v",a.Chrysotile+=e,q[z("city_rock_quarry")]=e+"v"}if(t.city.lumber_yard){let e=os(t.city.lumber_yard.count*Nr(100));a.Lumber+=e,x[z("city_lumber_yard")]=e+"v"}else if(t.city.graveyard){let e=os(t.city.graveyard.count*Nr(100));a.Lumber+=e,x[z("city_graveyard")]=e+"v"}if(t.city.sawmill){let e=os(t.city.sawmill.count*Nr(200));a.Lumber+=e,x[z("city_sawmill")]=e+"v"}if(t.city.mine&&(s.miner+=ua(t.city.mine.count)),t.city.coal_mine&&(s.coal_miner+=ua(t.city.coal_mine.count)),t.city.bank&&(s.banker+=ua(t.city.bank.count)),t.city.amphitheatre){let e=D("athleticism",1);s.entertainer+=ua(e?t.city.amphitheatre.count*e:t.city.amphitheatre.count)}if(t.city.casino&&(s.entertainer+=ua(t.city.casino.count)),t.space.spc_casino&&(s.entertainer+=ua(t.space.spc_casino.count),t.race.orbit_decayed&&(s.banker+=ua(t.space.spc_casino.count))),t.tauceti.tauceti_casino&&(s.entertainer+=ua(t.tauceti.tauceti_casino.count),t.tech.isolation)){s.banker+=ua(t.tauceti.tauceti_casino.count);let e=i.tauceti_casino*Zr.tauceti.tau_home.tauceti_casino.citizens();a[t.race.species]+=e,_[z("city_casino")]=e+"v"}if(t.galaxy.resort&&(s.entertainer+=ua(2*i.resort)),t.city.cement_plant&&(s.cement_worker+=ua(2*t.city.cement_plant.count)),t.race.orbit_decayed&&i.red_factory&&(s.cement_worker+=ua(i.red_factory)),t.race.parasite&&!t.tech.isolation&&(s.garrison+=ua(2)),t.city.garrison&&(s.garrison+=t.city.garrison.on*(t.tech.military>=5?ua(3):ua(2)),t.race.chameleon&&(s.garrison-=t.city.garrison.on)),t.space.space_barracks){let e=t.tech.marines>=2?ua(4):ua(2);s.garrison+=t.space.space_barracks.on*e}if(t.interstellar.cruiser&&(s.garrison+=o.cruiser*ua(3)),i.s_gate&&t.galaxy.starbase){let e=t.tech.marines>=2?ua(8):ua(5);s.garrison+=i.starbase*e}if(t.race.orbit_decayed&&t.space.hasOwnProperty("red_mine")&&(s.miner+=ua(c.red_mine),s.coal_miner+=ua(c.red_mine)),!t.tech.world_control){let e=ua("federation"===t.civic.govern.type?15:20);for(let a=2;a>=0;a--)t.civic.foreign[`gov${a}`].occ&&(s.garrison-=e,s.garrison<0&&(t.civic.foreign[`gov${a}`].occ=!1,s.garrison+=e,t.civic.garrison.workers+=e,Bi(z("civics_garrison_autodeoccupy_desc",[te(a)]),"danger",!1,["spy"])))}if(t.race.slaver&&t.tech.slaves&&t.city.slave_pen&&(a.Slave=4*t.city.slave_pen.count,p[z("city_slave_pen")]=4*t.city.slave_pen.count+"v",a.Slavet.resource.Zen.max&&(t.resource.Zen.amount=t.resource.Zen.max);let e=t.resource.Zen.amount/(t.resource.Zen.amount+5e3);v[z("trait_calm_desc")]=`+${(100*e).toFixed(2)}%`}if(t.city.basic_housing){let e=t.city.basic_housing.count*Zr.city.basic_housing.citizens();a[t.race.species]+=e,_[Ks("small")]=e+"v"}if(t.tauceti.tau_housing&&t.tech.isolation){let e=t.tauceti.tau_housing.count*Zr.tauceti.tau_home.tau_housing.citizens();a[t.race.species]+=e,_[Ks("small")]=e+"v"}if(t.city.cottage){let e=t.city.cottage.count*Zr.city.cottage.citizens();if(a[t.race.species]+=e,_[Ks("medium")]=e+"v",t.tech.home_safe){let e=t.city.cottage.count*Nr(t.tech.home_safe>=2?t.tech.home_safe>=3?5e3:2e3:1e3);a.Money+=e,d[Ks("medium")]=e+"v"}}if(t.city.apartment){let e=i.apartment*Zr.city.apartment.citizens();if(a[t.race.species]+=e,_[Ks("large")]=e+"v",t.tech.home_safe){let e=i.apartment*Nr(t.tech.home_safe>=2?t.tech.home_safe>=3?1e4:5e3:2e3);a.Money+=e,d[Ks("large")]=e+"v"}}if(i.s_gate&&t.galaxy.consulate&&t.galaxy.consulate.count>=1){let e=Zr.galaxy.gxy_alien1.consulate.citizens();a[t.race.species]+=e,_[z("galaxy_consulate")]=e+"v"}if(i.s_gate&&i.embassy&&t.tech.xeno>=11){let e=Zr.galaxy.gxy_gorddon.embassy.citizens();a[t.race.species]+=e,_[z("galaxy_embassy")]=e+"v"}if(i.s_gate&&i.embassy&&t.galaxy.dormitory){let e=i.dormitory*Zr.galaxy.gxy_gorddon.dormitory.citizens();a[t.race.species]+=e,_[z("galaxy_dormitory")]=e+"v"}if(i.arcology){let e=i.arcology*Zr.portal.prtl_ruins.arcology.citizens();a[t.race.species]+=e,_[z("portal_arcology_title")]=e+"v",s.garrison+=i.arcology*ua(5),a.Containers+=i.arcology*Math.round(u)*10,b[z("portal_arcology_title")]=i.arcology*Math.round(u)*10+"v",a.Crates+=i.arcology*Math.round(u)*10,y[z("portal_arcology_title")]=i.arcology*Math.round(u)*10+"v";let r=Ca("ruins"),c=i.arcology*Nr(8*Us()*r.supress);a.Money+=c,d[z("portal_arcology_title")]=c+"v"}if(c.colony){let e=t.tech.isolation?900:250;a.Containers+=c.colony*e,b[z("tau_home_colony")]=c.colony*e+"v",a.Crates+=c.colony*e,y[z("tau_home_colony")]=c.colony*e+"v";let r=c.colony*Zr.tauceti.tau_home.colony.citizens();a[t.race.species]+=r,_[z("tau_home_colony")]=r+"v"}if(i.operating_base&&(s.garrison+=Math.min(c.operating_base,i.operating_base)*ua(4)),i.fob&&(s.garrison+=ua(10)),t.space.living_quarters){let e=Math.round(c.living_quarters*Zr.space.spc_red.living_quarters.citizens());if(a[t.race.species]+=e,s.colonist+=ua(c.living_quarters),_[`${ea().red}`]=e+"v",(t.race.cataclysm||t.race.orbit_decayed)&&t.tech.home_safe){let e=c.living_quarters*Nr(t.tech.home_safe>=2?t.tech.home_safe>=3?1e5:5e4:25e3);a.Money+=e,d[z("space_red_living_quarters_title")]=e+"v"}}if(c.biodome&&(t.race.artifical||t.race.orbit_decayed)){let e=c.biodome*Nr(t.race.artifical?500:100);a.Food+=e,w[z("space_red_signal_tower_title")]=e+"v"}if(t.space.titan_quarters){let e=Math.round(c.titan_quarters*Zr.space.spc_titan.titan_quarters.citizens());a[t.race.species]+=e,s.titan_colonist+=ua(c.titan_quarters),_[`${ea().titan}`]=e+"v"}if(t.interstellar.habitat&&i.habitat){let e=i.habitat*Zr.interstellar.int_alpha.habitat.citizens();a[t.race.species]+=e,_[z("interstellar_habitat_title")]=e+"v"}if(t.interstellar.luxury_condo&&i.luxury_condo){let e=i.luxury_condo*Zr.interstellar.int_alpha.luxury_condo.citizens();a[t.race.species]+=e,_[z("tech_luxury_condo")]=e+"v";let r=i.luxury_condo*Nr(75e4);a.Money+=r,d[z("tech_luxury_condo")]=r+"v"}if(t.city.lodge){let e=t.city.lodge.count*Zr.city.lodge.citizens();a[t.race.species]+=e,_[z("city_lodge")]=e+"v"}if(t.space.outpost){let e=t.space.outpost.count*Nr(500);a.Neutronium+=e,H[z("space_gas_moon_outpost_title")]=e+"v"}if(t.city.shed){var ne=ns();let e=t.tech.storage<=2?z("city_shed_title1"):t.tech.storage>=4?z("city_shed_title3"):z("city_shed_title2");for(const s of Zr.city.shed.res())if(t.resource[s].display){let i=t.city.shed.count*Nr(Zr.city.shed.val(s)*ne);a[s]+=i,r.c[s][e]=i+"v"}}if(t.race.lone_survivor&&(_[z("base")]="1v",a[t.race.species]=1),t.interstellar.warehouse){ne=ns();let e=z("interstellar_alpha_name");for(const s of Zr.interstellar.int_alpha.warehouse.res())if(t.resource[s].display){let i=t.interstellar.warehouse.count*Nr(Zr.interstellar.int_alpha.warehouse.val(s)*ne);a[s]+=i,r.c[s][e]=i+"v"}}if(t.space.storehouse){ne=wt("storehouse",!1);var le=wt("storehouse",!0);let e=z("space_storehouse_title");for(const s of Zr.space.spc_titan.storehouse.res())if(t.resource[s].display){let i=Zr.space.spc_titan.storehouse.heavy(s),c=t.space.storehouse.count*Nr(Zr.space.spc_titan.storehouse.val(s)*(i?le:ne));a[s]+=c,r.c[s][e]=c+"v"}}if(t.tauceti.repository){ne=wt("repository");let e=z("tech_repository");for(const s of Zr.tauceti.tau_home.repository.res())if(t.resource[s].display){let i=t.tauceti.repository.count*Nr(Zr.tauceti.tau_home.repository.val(s)*ne);a[s]+=i,r.c[s][e]=i+"v"}if(t.tech.isolation){let e=250;a.Containers+=t.tauceti.repository.count*e,b[z("tech_repository")]=t.tauceti.repository.count*e+"v",a.Crates+=t.tauceti.repository.count*e,y[z("tech_repository")]=t.tauceti.repository.count*e+"v"}}if(t.tech.isolation&&i.tau_farm&&t.race.artifical){let e=i.tau_farm*Nr(350);a.Food+=e,w[z("tau_home_tau_farm")]=e+"v"}if(t.galaxy.gateway_depot){let e=t.tech.world_control?150:100;a.Crates+=t.galaxy.gateway_depot.count*e,y[z("galaxy_gateway_depot")]=t.galaxy.gateway_depot.count*e+"v",a.Containers+=t.galaxy.gateway_depot.count*e,b[z("galaxy_gateway_depot")]=t.galaxy.gateway_depot.count*e+"v";let r=z("galaxy_gateway_depot"),s=Lt();if(t.resource.Uranium.display){let e=t.galaxy.gateway_depot.count*Nr(3e3*s);a.Uranium+=e,A[r]=e+"v"}if(t.resource.Nano_Tube.display){let e=t.galaxy.gateway_depot.count*Nr(25e4*s);a.Nano_Tube+=e,J[r]=e+"v"}if(t.resource.Neutronium.display){let e=t.galaxy.gateway_depot.count*Nr(9001*s);a.Neutronium+=e,H[r]=e+"v"}if(t.resource.Infernite.display){let e=t.galaxy.gateway_depot.count*Nr(6660*s);a.Infernite+=e,Z[r]=e+"v"}if(t.resource.Elerium.display&&i.gateway_depot&&i.s_gate){let e=i.gateway_depot*Nr(200);a.Elerium+=e,V[r]=e+"v"}}if(t.resource.Infernite.display&&t.portal.fortress){let e=Nr(1e3);a.Infernite+=e,Z[z("portal_fortress_name")]=e+"v"}if(t.space.garage){ne=Zr.space.spc_red.garage.multiplier(!1),le=Zr.space.spc_red.garage.multiplier(!0);let e=z("space_red_garage_title");for(const s of Zr.space.spc_red.garage.res())if(t.resource[s].display){let i=Zr.space.spc_red.garage.heavy(s),c=t.space.garage.count*Nr(Zr.space.spc_red.garage.val(s)*(i?le:ne));a[s]+=c,r.c[s][e]=c+"v"}}if(t.portal.harbour&&i.harbour){let e=z("portal_harbour_title");for(const s of Zr.portal.prtl_lake.harbour.res())if(t.resource[s].display){let t=i.harbour*Nr(Zr.portal.prtl_lake.harbour.val(s));a[s]+=t,r.c[s][e]=t+"v"}}if(t.city.silo){let e=os(t.city.silo.count*Nr(500));a.Food+=e,w[z("city_silo")]=e+"v"}if(t.city.compost){let e=os(t.city.compost.count*Nr(200));a.Food+=e,w[z("city_compost_heap")]=e+"v"}if(t.city.soul_well){let e=os(t.city.soul_well.count*Nr(500));a.Food+=e,w[z("city_soul_well")]=e+"v"}if(t.city.smokehouse){let e=os(t.city.smokehouse.count*Nr(100));a.Food+=e,w[z("city_smokehouse")]=e+"v"}if(t.city.oil_well){let e=t.city.oil_well.count*Nr(500);a.Oil+=e,F[z("city_oil_well")]=e+"v"}if(t.city.oil_depot){let e=t.city.oil_depot.count*Nr(1e3);e*=t.tech.world_control?1.5:1,a.Oil+=e,F[z("city_oil_depot")]=e+"v",t.tech.uranium>=2&&(e=t.city.oil_depot.count*Nr(250),e*=t.tech.world_control?1.5:1,a.Uranium+=e,A[z("city_oil_depot")]=e+"v"),t.resource.Helium_3.display&&(e=t.city.oil_depot.count*Nr(400),e*=t.tech.world_control?1.5:1,a.Helium_3+=e,B[z("city_oil_depot")]=e+"v")}if(t.space.propellant_depot){let e=t.space.propellant_depot.count*Nr(1250);e*=t.tech.world_control?1.5:1,a.Oil+=e,F[z("space_home_propellant_depot_title")]=e+"v",t.resource.Helium_3.display&&(e=t.space.propellant_depot.count*Nr(1e3),e*=t.tech.world_control?1.5:1,a.Helium_3+=e,B[z("space_home_propellant_depot_title")]=e+"v")}if(i.orbital_station){let e=i.orbital_station*Nr(15e3);a.Helium_3+=e,B[z("tau_home_orbital_station")]=e+"v"}if(i.refueling_station){let e=i.refueling_station*Nr(1e4);if(a.Helium_3+=e,B[z("tau_gas_refueling_station_title")]=e+"v",t.tech.tau_whale>=2){let e=i.refueling_station*Nr(6500);a.Oil+=e,F[z("tau_gas_refueling_station_title")]=e+"v"}}if(i.orbital_platform){let e=i.orbital_platform*Nr(17500);a.Oil+=e,F[z("tau_red_orbital_platform")]=e+"v"}if(t.space.gas_storage){let e=t.space.gas_storage.count*Nr(3500);e*=t.tech.world_control?1.5:1,a.Oil+=e,F[`${ea().gas} ${z("depot")}`]=e+"v",e=t.space.gas_storage.count*Nr(2500),e*=t.tech.world_control?1.5:1,a.Helium_3+=e,B[`${ea().gas} ${z("depot")}`]=e+"v",e=t.space.gas_storage.count*Nr(1e3),e*=t.tech.world_control?1.5:1,a.Uranium+=e,A[`${ea().gas} ${z("depot")}`]=e+"v"}if(i.xfer_station){let e=i.xfer_station*Nr(5e3);if(a.Helium_3+=e,B[z("interstellar_xfer_station_title")]=e+"v",e=i.xfer_station*Nr(4e3),a.Oil+=e,F[z("interstellar_xfer_station_title")]=e+"v",e=i.xfer_station*Nr(2500),a.Uranium+=e,A[z("interstellar_xfer_station_title")]=e+"v",t.resource.Deuterium.display){let e=i.xfer_station*Nr(2e3);a.Deuterium+=e,R[z("interstellar_xfer_station_title")]=e+"v"}}if(t.space.helium_mine){let e=t.space.helium_mine.count*Nr(100);a.Helium_3+=e,B[z("space_moon_helium_mine_title")]=e+"v"}if(Lc()){let e=Nc("know");a.Knowledge+=e.add,f[z("city_shrine")]=e.add+"v"}t.city.temple&&t.genes.ancients&&t.genes.ancients>=2&&(s.priest+=ua(t.city.temple.count)),t.space.ziggurat&&t.genes.ancients&&t.genes.ancients>=4&&(s.priest+=ua(t.space.ziggurat.count));let W=It("gxy_alien2");if(t.city.university){let e=Zr.city.university.knowVal()*t.city.university.count;s.professor+=ua(t.city.university.count),a.Knowledge+=e,f[z("city_university")]=e+"v"}if(t.race.lone_survivor&&t.tauceti.alien_outpost&&(s.professor+=ua(t.tauceti.alien_outpost.count)),t.city.library){let e=125;t.race.nearsighted&&(e*=1-di.nearsighted.vars()[0]/100),t.race.studious&&(e*=1+di.studious.vars()[1]/100);let r=Oi("elven");if(r>0&&(e*=1+di.studious.vars(1)[1]/100*r),t.tech.science&&t.tech.science>=8&&(e*=1.4),t.tech.science&&t.tech.science>=5){let a=la(t.civic.scientist.workers,"scientist");t.race.high_pop&&(a=Pe(a)),e*=1+.12*a}t.tech.anthropology&&t.tech.anthropology>=2&&(e*=1+.05*(t.race.cataclysm||t.race.orbit_decayed?t.space.ziggurat?t.space.ziggurat.count:0:t.city.temple.count));let s=D("teacher",0);s&&(e*=1+s/100);let i=D("athleticism",2);i&&(e*=1-i/100);let c=D("muckraker",1);c&&(e*=1+c/100);let o=Math.round(t.city.library.count*e);a.Knowledge+=o,f[z("city_library")]=o+"v",t.tech.science&&t.tech.science>=3&&(t.civic.professor.impact=.5+.01*t.city.library.count)}if(t.city.wardenclyffe){let e=1e3;t.city.ptrait.includes("magnetic")&&(e+=Fi.magnetic.vars()[1]);let r=t.city.wardenclyffe.count*e;s.scientist+=ua(t.city.wardenclyffe.count);let c=t.tech.science>=7?1500:1e3;if(r+=i.wardenclyffe*c,t.tech.supercollider){let e=t.tech.tp_particles||t.tech.particles&&t.tech.particles>=3?12.5:25;r*=t.tech.supercollider/e+1}t.space.satellite&&(r*=1+.04*t.space.satellite.count);let o=D("athleticism",2);if(o&&(r*=1-o/100),a.Knowledge+=r,f[Es()]=r+"v","magic"===t.race.universe){let e=t.city.wardenclyffe.count*Nr(8);a.Mana+=e,h[Es()]=e+"v"}if(t.race.artifical){let e=i.wardenclyffe*Nr(250);a.Food+=e,w[Es()]=e+"v"}}if(t.race.logical){let e=t.tech.hasOwnProperty("high_tech")?t.tech.high_tech:0;e+=t.tech.hasOwnProperty("science")?t.tech.science:0;let r=t.resource[t.race.species].amount*di.logical.vars()[1]*e;a.Knowledge+=r,f[_i[t.race.species].name]=r+"v"}if(t.portal.sensor_drone){let e=i.sensor_drone*(t.tech.infernite>=6?2500:1e3);a.Knowledge+=e,f[z("portal_sensor_drone_title")]=e+"v"}if(t.space.satellite){let e=t.space.satellite.count*(t.race.cataclysm||t.race.orbit_decayed?2e3:750);if((t.race.cataclysm||t.race.orbit_decayed)&&t.tech.supercollider){let a=t.tech.tp_particles||t.tech.particles&&t.tech.particles>=3?5:10;e*=t.tech.supercollider/a+1}a.Knowledge+=e,f[z("space_home_satellite_title")]=e+"v"}if(t.space.observatory&&t.space.observatory.count>0){let e=5e3*c.observatory;t.race.cataclysm&&t.space.satellite&&t.space.satellite.count>0&&(e*=1+.25*t.space.satellite.count),a.Knowledge+=e,f[z("space_moon_observatory_title")]=e+"v",t.race.cataclysm&&(s.professor+=ua(c.observatory))}if(t.interstellar.laboratory&&o.laboratory>0){t.tech.science>=16&&(s.scientist+=ua(o.laboratory));let e=1e4*o.laboratory;if(t.tech.science>=15&&(e*=1+.02*(t.race.cataclysm?c.exotic_lab:t.city.wardenclyffe.count)),t.race.cataclysm&&i.s_gate&&n.scavenger&&(e*=1+n.scavenger*It("gxy_alien2")*.75),t.tech.science>=21&&(e*=1.45),a.Knowledge+=e,f[z("magic"===t.race.universe?"tech_sanctum":"interstellar_laboratory_title")]=e+"v","magic"===t.race.universe){let e=o.laboratory*Nr(12);a.Mana+=e,h[z("magic"===t.race.universe?"tech_sanctum":"interstellar_laboratory_title")]=e+"v"}}if(t.city.biolab){let e=3e3;t.portal.sensor_drone&&t.tech.science>=14&&(e*=1+.02*i.sensor_drone),t.tech.science>=20&&(e*=3),t.tech.science>=21&&(e*=1.45),t.tech.biotech>=1&&(e*=2.5),a.Knowledge+=i.biolab*e,f[z("city_biolab")]=i.biolab*e+"v"}if(t.space.zero_g_lab&&Math.min(c.zero_g_lab,i.zero_g_lab)>0){let e=Math.min(c.zero_g_lab,i.zero_g_lab),r=mt("spc_enceladus"),s=Math.round(1e4*e*r);if(a.Knowledge+=s,f[z("tech_zero_g_lab")]=s+"v",t.resource.Cipher.display){let t=1e4*e;a.Cipher+=t,ie[z("tech_zero_g_lab")]=t+"v"}}if(t.tech.isolation&&t.tauceti.alien_outpost&&t.resource.Cipher.display){let e=2e5;a.Cipher+=e,ie[z("tech_alien_outpost")]=e+"v"}if(t.portal.archaeology){let e=Ca("ruins"),r=25e4;t.race.high_pop&&(r=Pe(r));let s=Math.round(r*e.supress);a.Knowledge+=la(t.civic.archaeologist.workers,"archaeologist")*s,f[z("portal_archaeology_bd")]=la(t.civic.archaeologist.workers,"archaeologist")*s+"v"}if(i.embassy&&t.galaxy.symposium){let e=1750*i.dormitory,r=650*t.galaxy.trade.cur,s=0;if(t.tech.xeno>=7){let e=t.galaxy.defense.gxy_gorddon.scout_ship*(Zr.galaxy.gxy_gateway.scout_ship.ship.civ()+Zr.galaxy.gxy_gateway.scout_ship.ship.mil());e+=t.galaxy.defense.gxy_gorddon.corvette_ship*(Zr.galaxy.gxy_gateway.corvette_ship.ship.civ()+Zr.galaxy.gxy_gateway.corvette_ship.ship.mil()),e+=t.galaxy.defense.gxy_gorddon.frigate_ship*(Zr.galaxy.gxy_gateway.frigate_ship.ship.civ()+Zr.galaxy.gxy_gateway.frigate_ship.ship.mil()),e+=t.galaxy.defense.gxy_gorddon.cruiser_ship*(Zr.galaxy.gxy_gateway.cruiser_ship.ship.civ()+Zr.galaxy.gxy_gateway.cruiser_ship.ship.mil()),e+=t.galaxy.defense.gxy_gorddon.dreadnought*(Zr.galaxy.gxy_gateway.dreadnought.ship.civ()+Zr.galaxy.gxy_gateway.dreadnought.ship.mil()),n.freighter&&(e+=n.freighter*(Zr.galaxy.gxy_gorddon.freighter.ship.civ()+Zr.galaxy.gxy_gorddon.freighter.ship.mil())),s=300*+Pe(e).toFixed(2)}let c=(e+r+s)*i.symposium;a.Knowledge+=c,f[z("galaxy_symposium")]=c+"v"}if(t.city.bank||t.race.cataclysm&&i.spaceport){let e=t.race.cataclysm||t.race.orbit_decayed?4*Us():Us(),r=t.race.cataclysm||t.race.orbit_decayed?i.spaceport:t.city.bank.count,s=r*Nr(e);if(a.Money+=s,t.race.cataclysm||t.race.orbit_decayed?d[z("space_red_spaceport_title")]=s+"v":d[z("city_bank")]=s+"v",t.interstellar.exchange){let s=Nr(o.exchange*(e*r/18));t.race.inflation&&(s*=2),t.tech.banking>=13&&(t.galaxy.freighter&&(s*=1+.03*n.freighter),t.galaxy.super_freighter&&(s*=1+.08*n.super_freighter)),s=Math.round(s),a.Money+=s,d[z("interstellar_exchange_bd")]=s+"v"}}if(t.space.titan_bank){let e=2*Us(),r=t.space.titan_bank.count*Nr(e);a.Money+=r,d[`${ea().titan} ${z("city_bank")}`]=r+"v"}if(t.tauceti.colony&&t.tech.isolation){let e=25*Us(),r=t.tauceti.colony.count*Nr(e);a.Money+=r,d[z("tau_home_colony")]=r+"v"}if(t.city.casino||t.space.spc_casino||t.tauceti.tauceti_casino){let e=0;t.city.casino&&t.city.casino.count>0&&(e+=t.city.casino.count),t.space.spc_casino&&t.space.spc_casino.count>0&&(e+=t.space.spc_casino.count),t.tauceti.tauceti_casino&&t.tauceti.tauceti_casino.count>0&&(e+=t.tauceti.tauceti_casino.count);let r=t.tech.gambling>=3?6e4:4e4;t.tech.gambling>=5&&(r+=t.tech.gambling>=6?24e4:6e4);let s=e*Nr(r);t.race.gambler&&(s*=1+di.gambler.vars()[0]*t.race.gambler/100),t.tech.world_control&&(s=Math.round(1.25*s)),t.tech.stock_exchange&&t.tech.gambling>=4&&(s*=1+.05*t.tech.stock_exchange),t.race.inflation&&(s*=1+t.race.inflation/100),t.tech.isolation&&(s*=5.5),a.Money+=s,d[z("city_casino")]=s+"v"}if(t.galaxy.resort){let e=i.resort*Nr(t.tech.world_control?1875e3:15e5);a.Money+=e,d[z("galaxy_resort")]=e+"v"}if(t.tech.banking>=4){let e=250;t.tech.banking>=11?e=1e3:t.tech.banking>=6&&(e=600);let r=e*(t.resource[t.race.species].amount+t.civic.garrison.workers);t.race.high_pop&&(r=Pe(r)),a.Money+=r,d[z("tech_bonds")]=r+"v"}if(i.moon_base){let e=i.moon_base*Nr(500);a.Iridium+=e,N[z("space_moon_base_title")]=e+"v"}if(i.space_station&&(s.space_miner+=ua(3*i.space_station),t.tech.asteroid>=5)){let e=i.space_station*Nr(5);a.Elerium+=e,V[z("space_belt_station_title")]=e+"v"}if(c.exotic_lab){let e=c.exotic_lab*Nr(10);a.Elerium+=e,V[z("space_red_exotic_lab_bd")]=e+"v";let r=500;if(t.tech.science>=13&&t.interstellar.laboratory&&(r+=25*o.laboratory),t.tech.ancient_study&&t.tech.ancient_study>=2&&(r+=15*t.space.ziggurat.count),t.tech.mass>=2){let e=la(t.civic.scientist.workers,"scientist");t.race.high_pop&&(e=Pe(e)),r+=i.mass_driver*e}t.race.cataclysm&&c.observatory&&(r*=1+.25*c.observatory),(t.race.cataclysm||t.race.orbit_decayed)&&t.portal.sensor_drone&&t.tech.science>=14&&(r*=1+.02*i.sensor_drone),t.tech.science>=21&&(r*=1.45),t.race.high_pop&&(r=Pe(r));let n=c.exotic_lab*la(t.civic.colonist.workers,"colonist")*r;a.Knowledge+=n,f[z("tech_exotic_bd")]=n+"v",(t.race.cataclysm||t.race.orbit_decayed)&&(s.scientist+=ua(c.exotic_lab))}if(t.tech.isolation&&c.infectious_disease_lab&&(s.professor+=ua(2*c.infectious_disease_lab),s.scientist+=ua(c.infectious_disease_lab)),c.decoder){let e=i.ai_colonist?la(t.civic.titan_colonist.workers,"titan_colonist")+ua(i.ai_colonist):la(t.civic.titan_colonist.workers,"titan_colonist"),r=c.decoder*e*2500;t.race.high_pop&&(r=Pe(r)),i.ai_core2&&(r*=1.25),a.Knowledge+=r,f[z("space_decoder_title")]=r+"v"}if(i.elerium_contain){let e=i.elerium_contain*Nr(100);a.Elerium+=e,V[z("space_dwarf_elerium_contain_title")]=e+"v"}if(t.city.foundry&&(s.craftsman+=ua(t.city.foundry.count)),c.fabrication&&(s.craftsman+=ua(c.fabrication),t.race.cataclysm&&(s.cement_worker+=ua(c.fabrication))),t.tech.isolation&&c.tau_factory&&(s.craftsman+=ua(5*c.tau_factory),s.cement_worker+=ua(2*c.tau_factory)),i.womling_station&&(s.craftsman+=ua(1*i.womling_station),s.cement_worker+=ua(1*i.womling_station)),i.stellar_forge&&(s.craftsman+=ua(2*i.stellar_forge)),t.portal.carport&&(s.hell_surveyor+=t.portal.carport.count-t.portal.carport.damaged),i.archaeology&&(s.archaeologist+=ua(2*i.archaeology)),i.nexus){let e=i.nexus*Nr(4e3);a.Helium_3+=e,B[z("interstellar_nexus_title")]=e+"v";let t=i.nexus*Nr(3500);a.Oil+=t,F[z("interstellar_nexus_title")]=t+"v";let r=i.nexus*Nr(3e3);a.Deuterium+=r,R[z("interstellar_nexus_title")]=r+"v";let s=i.nexus*Nr(25);a.Elerium+=s,V[z("interstellar_nexus_title")]=s+"v"}if(i.s_gate&&t.galaxy.gateway_station){let e=i.gateway_station*Nr(2e3);a.Helium_3+=e,B[z("galaxy_gateway_station")]=e+"v";let t=i.gateway_station*Nr(4500);a.Deuterium+=t,R[z("galaxy_gateway_station")]=t+"v";let r=i.gateway_station*Nr(50);a.Elerium+=r,V[z("galaxy_gateway_station")]=r+"v"}if(i.s_gate&&i.telemetry_beacon){let e=t.tech.telemetry?1200:800;t.tech.science>=17&&(e+=25*n.scout_ship);let r=i.telemetry_beacon**2*e;a.Knowledge+=r,f[z("galaxy_telemetry_beacon_bd")]=r+"v"}if(i.s_gate&&n.scavenger){let e=n.scavenger*Math.round(25e3*W);a.Knowledge+=e,f[z("galaxy_scavenger")]=e+"v"}if(r.t_route={},t.city.market.mtrade=0,t.race.banana&&(t.city.market.mtrade++,r.t_route[z("base")]=1),t.city.trade){let e=t.race.nomadic||t.race.xenophobic?t.tech.trade:t.tech.trade+1;if(t.tech.trade&&t.tech.trade>=3&&e--,t.race.flier&&(e+=di.flier.vars()[1]),t.city.market.mtrade+=e*t.city.trade.count,r.t_route[z("city_trade")]=e*t.city.trade.count,t.tech.fanaticism&&t.tech.fanaticism>=3){let e=t.race.cataclysm||t.race.orbit_decayed?t.space.ziggurat?t.space.ziggurat.count:0:t.city.temple.count;t.city.market.mtrade+=e,r.t_route[t.race.cataclysm?z("space_red_ziggurat_title"):z("city_temple")]=e}}if(t.city.wharf){let e=2*t.city.wharf.count;t.city.market.mtrade+=e,r.t_route[z("city_wharf")]=e}if(t.space.gps&&t.space.gps.count>=4){let e=2*t.space.gps.count;t.city.market.mtrade+=2*t.space.gps.count,r.t_route[z("space_home_gps_title")]=e}if(t.city.storage_yard&&t.tech.trade&&t.tech.trade>=3){let e=t.city.storage_yard.count;t.city.market.mtrade+=e,r.t_route[z("city_storage_yard")]=e}if(t.tech.railway){let e=0;e=t.race.cataclysm||t.race.orbit_decayed?t.space.gps?Math.floor(t.space.gps.count/3):0:t.city.storage_yard?Math.floor(t.city.storage_yard.count/6):0,t.stats.achieve.banana&&t.stats.achieve.banana.l>=2&&e++,t.city.market.mtrade+=t.tech.railway*e,r.t_route[z("arpa_projects_railway_title")]=t.tech.railway*e}if(i.titan_spaceport){let e=i.titan_spaceport*Nr(250);a.Water+=e,G[z("space_red_spaceport_title")]=e+"v"}if(t.tauceti.mining_pit&&(s.pit_miner+=ua(c.mining_pit*(t.tech.isolation?6:8)),a.Materials+=1e6*c.mining_pit),t.civic.torturer.display&&t.tech.unfathomable&&t.tech.unfathomable>=2&&(s.torturer=t.city.captive_housing.count),"magic"===t.race.universe&&t.race.witch_hunter){let e=0;if(t.city.wardenclyffe){let a=t.city.wardenclyffe.count;a+=i.wardenclyffe,t.tech.roguemagic&&t.tech.roguemagic>=6&&(a/=2),m[Es()]=a+"v",e+=a}if(t.civic.scientist.workers>0){let a=t.civic.scientist.workers;"magocracy"===t.civic.govern.type&&(a/=2),a=Pe(a),m[z("job_wizard")]=a+"v",e+=a}if(t.city.coal_power&&!t.race.environmentalist){let a=i.coal_power;t.tech.roguemagic&&t.tech.roguemagic>=6&&(a/=2),m[z("city_mana_engine")]=a+"v",e+=a}if(t.city.pylon||t.space.pylon||t.tauceti.pylon){let a=0,r="city_pylon";(t.race.cataclysm||t.race.orbit_decayed)&&t.space.pylon?(a=t.space.pylon.count,r="space_red_pylon"):t.tech.isolation&&t.tauceti.pylon?(a=t.tauceti.pylon.count,r="tau_home_pylon"):t.city.pylon&&(a=t.city.pylon.count),t.tech.roguemagic&&t.tech.roguemagic>=5&&(a/=3),m[z(r)]=a+"v",e+=a}if(t.race.casting){let a=t.race.casting.total;t.tech.roguemagic&&t.tech.roguemagic>=2&&(t.tech.roguemagic>=4&&(a/=4),a-=Pe(t.civic.priest.workers),a<0&&(a=0)),m[z("tech_rituals")]=a+"v",e+=a}if(t.race.totTransmute&&t.race.totTransmute>0){let a=t.race.totTransmute/5;m[z("tech_alchemy")]=a+"v",e+=a}let a=0;if(t.tech.explosives&&(a+=4),t.tech.military&&(t.tech.military>=10?a+=28:t.tech.military>=9?a+=24:t.tech.military>=8?a+=20:t.tech.military>=7?a+=16:t.tech.military>=6?a+=12:t.tech.military>=4?a+=8:t.tech.military>=3&&(a+=4)),m[z("witch_hunter_magic_tech")]=a+"v",e+=a,t.tech.roguemagic||(m[z("overt")]=5*e-e+"v",e*=5),t.tech.nexus){let a=.15*t.tech.nexus;m[z("arpa_projects_nexus_title")]=a+"v",e+=a}if(t.tech.syphon){let a=2.5*t.tech.syphon;m[z("arpa_syphon_title")]=a+"v",e+=a}if(t.portal.hasOwnProperty("soul_capacitor")){let a=i.soul_capacitor||0;t.portal.soul_capacitor.ecap=25e5*a,m[z("portal_soul_capacitor_title")]=a/3+"v",e+=a/3}if(t.tech.roguemagic&&t.tech.roguemagic>=3&&t.city.conceal_ward){let a=t.city.conceal_ward.count;t.tech.roguemagic>=8&&(a*=1.25),m[z("city_conceal_ward")]=-a+"v",e-=a}e<0&&(e=0),e=Math.floor(e),t.resource.Sus.amount=e,e>=50&&!t.race.witch_hunter_warned?(t.race.witch_hunter_warned=1,Bi(z("witch_hunter_warning"),"danger",!1,["progress"])):e>=80&&t.race.witch_hunter_warned&&1===t.race.witch_hunter_warned&&(t.race.witch_hunter_warned=2,Bi(z("witch_hunter_warning2"),"danger",!1,["progress"])),e>=100&&(t.civic.foreign.gov0.hstl=100,t.civic.foreign.gov1.hstl=100,t.civic.foreign.gov2.hstl=100,t.race.truepath&&(t.civic.foreign.gov3.hstl=100))}if(r.gt_route={},t.galaxy.freighter&&(r.gt_route[z("galaxy_freighter")]=2*n.freighter),t.galaxy.super_freighter&&(r.gt_route[z("galaxy_super_freighter")]=5*n.super_freighter),t.galaxy.bolognium_ship&&(s.crew+=t.galaxy.bolognium_ship.on*Zr.galaxy.gxy_gateway.bolognium_ship.ship.civ()),t.galaxy.scout_ship&&(s.crew+=t.galaxy.scout_ship.on*Zr.galaxy.gxy_gateway.scout_ship.ship.civ()),t.galaxy.corvette_ship&&(s.crew+=t.galaxy.corvette_ship.on*Zr.galaxy.gxy_gateway.corvette_ship.ship.civ()),t.galaxy.frigate_ship&&(s.crew+=t.galaxy.frigate_ship.on*Zr.galaxy.gxy_gateway.frigate_ship.ship.civ()),t.galaxy.cruiser_ship&&(s.crew+=t.galaxy.cruiser_ship.on*Zr.galaxy.gxy_gateway.cruiser_ship.ship.civ()),t.galaxy.dreadnought&&(s.crew+=t.galaxy.dreadnought.on*Zr.galaxy.gxy_gateway.dreadnought.ship.civ()),t.galaxy.freighter&&(s.crew+=t.galaxy.freighter.on*Zr.galaxy.gxy_gorddon.freighter.ship.civ()),t.galaxy.super_freighter&&(s.crew+=t.galaxy.super_freighter.on*Zr.galaxy.gxy_alien1.super_freighter.ship.civ()),t.galaxy.armed_miner&&(s.crew+=t.galaxy.armed_miner.on*Zr.galaxy.gxy_alien2.armed_miner.ship.civ()),t.galaxy.scavenger&&(s.crew+=t.galaxy.scavenger.on*Zr.galaxy.gxy_alien2.scavenger.ship.civ()),t.portal.transport&&(s.crew+=t.portal.transport.on*Zr.portal.prtl_lake.transport.ship.civ()),t.tauceti.infectious_disease_lab){let e=39616;if(t.tech.supercollider&&t.tech.isolation){let a=t.tech.tp_particles||t.tech.particles&&t.tech.particles>=3?12.5:25;e*=t.tech.supercollider/a+1}if(a.Knowledge+=i.infectious_disease_lab*Math.round(e),f[Zr.tauceti.tau_home.infectious_disease_lab.title()]=i.infectious_disease_lab*e+"v",t.tech.isolation){let e=c.infectious_disease_lab*Nr(375);a.Elerium+=e,V[Zr.tauceti.tau_home.infectious_disease_lab.title()]=e+"v"}}if(t.race.truepath&&t.tauceti.overseer&&t.tech.tau_red&&t.tech.tau_red>=5){let e=0,r=t.tauceti.overseer.injured,s=0,i=0,o=0;t.race.womling_friend?(i+=25+c.overseer*Zr.tauceti.tau_red.overseer.val(),s+=75+c.womling_fun*Zr.tauceti.tau_red.womling_fun.val()):t.race.womling_god?(i+=75+c.overseer*Zr.tauceti.tau_red.overseer.val(),s+=40+c.womling_fun*Zr.tauceti.tau_red.womling_fun.val()):t.race.womling_lord&&(i+=c.overseer*Zr.tauceti.tau_red.overseer.val(),s+=30+c.womling_fun*Zr.tauceti.tau_red.womling_fun.val());let n=t.tech.womling_pop&&t.tech.womling_pop>=2?6:5;e=c.womling_village*n;let l=2*c.womling_farm;l>e&&(l=e);let u=t.tech.womling_pop?8:6;t.tech.womling_gene&&(u+=2),e>l*u&&(e=l*u);let d=e-l-r,_=0;if(c.womling_lab){_=c.womling_lab,_>d&&(_=d),d-=_;let e=_*Math.round(25e3*t.tauceti.overseer.prod/100);if(a.Knowledge+=e,f[z("interstellar_laboratory_title")]=e+"v",Math.rand(0,10)=5?4.9:5;t.race.lone_survivor&&(e-=.1),t.tauceti.womling_lab.tech>=Math.round((t.tech.womling_tech+2)**e)&&(t.tech.womling_tech++,t.tauceti.womling_lab.tech=0,Bi(z("tau_red_womling_advancement",[t.tech.womling_tech]),"advanced",!1,["progress"]),gs())}}let p=6*c.womling_mine;p>d&&(p=d),d-=p;let h=t.tech.tech_womling_firstaid?3:4;if(0===Math.rand(0,10)){let e=Math.rand(0,p+_);e>r&&(r=e)}else r>0&&0===Math.rand(0,h)&&r--;t.tauceti.hasOwnProperty("womling_farm")&&(t.tauceti.womling_farm.farmers=l),t.tauceti.hasOwnProperty("womling_mine")&&(t.tauceti.womling_mine.miners=p),t.tauceti.hasOwnProperty("womling_lab")&&(t.tauceti.womling_lab.scientist=_),i-=p,s-=p,s-=l,s-=r,i>100?i=100:i<0&&(i=0),s>100?s=100:s<0&&(s=0),o=Math.round((i+s)/2),t.tauceti.overseer.loyal=i,t.tauceti.overseer.morale=s,t.tauceti.overseer.pop=e,t.tauceti.overseer.working=l+p+_,t.tauceti.overseer.injured=r,t.tauceti.overseer.prod=o}["inspired","distracted","stimulated","motivated"].forEach((function(e){t.race[e]&&(t.race[e]--,t.race[e]<=0&&delete t.race[e])}));let ue=t.resource[t.race.species].amount-a[t.race.species];if(ue>0&&(t.race.orbit_decayed&&t.stats.days===t.race.orbit_decay?Bi(z("tragic_death",[ue]),"danger"):(Bi(z(1===ue?"abandon1":"abandon2",[ue]),"danger"),t.civic.homeless+=ue)),i.world_controller){let e=.25;t.interstellar.far_reach&&i.far_reach>0&&(e+=.01*i.far_reach),t.tech.science>=19&&(e+=.15);let r=Math.round(a.Knowledge*e);a.Knowledge+=r,f[z("space_dwarf_collider_title")]=r+"v"}if(i.alien_outpost){let e=0;t.tech.isolation&&(e=t.race.lone_survivor?35e5:65e5,a.Knowledge+=e);let r=.2,s=Math.round(a.Knowledge*r);a.Knowledge+=s,f[z("tech_alien_outpost")]=s+e+"v"}let _e=a.Crates,pe=a.Containers;if(Object.keys(a).forEach((function(e){a.Crates-=t.resource[e].crates})),Object.keys(a).forEach((function(e){a.Containers-=t.resource[e].containers})),a.Crates<0){let e=0-a.Crates;Object.keys(a).forEach((function(r){if(e>0){let s=t.resource[r].crates;s>e&&(s=e),a.Crates+=s,t.resource[r].crates-=s,e-=s}}))}if(a.Containers<0){let e=0-a.Containers;Object.keys(a).forEach((function(r){if(e>0){let s=t.resource[r].containers;s>e&&(s=e),a.Containers+=s,t.resource[r].containers-=s,e-=s}}))}y[z("crates_used")]=a.Crates-_e+"v",b[z("crates_used")]=a.Containers-pe+"v";let he=Cr(),me=jr();Object.keys(a).forEach((function(e){let s=t.resource[e].crates*he;a[e]+=s;let i=t.resource[e].containers*me;a[e]+=i,r.c[e]&&(r.c[e][z("resource_Crates_plural")]=s+"v",r.c[e][z("resource_Containers_plural")]=i+"v"),t.resource[e].max=a[e],t.resource[e].amount>t.resource[e].max&&"Sus"!=e?t.resource[e].amount=t.resource[e].max:t.resource[e].amount<0&&(t.resource[e].amount=0),t.resource[e].amount>=.99*t.resource[e].max?$(`#res${e} .count`).hasClass("has-text-warning")||$(`#res${e} .count`).addClass("has-text-warning"):$(`#res${e} .count`).hasClass("has-text-warning")&&$(`#res${e} .count`).removeClass("has-text-warning")}));let ge=!1,fe=0,ve=0;if(Object.keys(s).forEach((function(e){-1===t.civic[e].max&&t.civic[e].display&&"unemployed"!==e&&"scavenger"!==e&&ve++})),Object.keys(s).forEach((function(e){t.civic[e].max=s[e],t.civic[e].workers>t.civic[e].max&&-1!==t.civic[e].max?t.civic[e].workers=t.civic[e].max:t.civic[e].workers<0&&(t.civic[e].workers=0),t.race.servants&&(-1!==t.civic[e].max||t.race.servants.jobs.hasOwnProperty(e)||(t.race.servants.jobs[e]=0,ge=!0),t.race.servants.jobs.hasOwnProperty(e)&&(!t.civic[e].display&&("scavenger"!==e||ve>0)?t.race.servants.jobs[e]=0:fe+=t.race.servants.jobs[e],fe>t.race.servants.max&&t.race.servants.jobs[e]>0&&(t.race.servants.jobs[e]--,fe--)))})),ge?pa():t.race.servants&&(t.race.servants.force_scavenger=0===ve,t.race.servants.used=fe),t.race.servants&&t.race.servants.hasOwnProperty("smax")&&t.race.servants.smax>0){let e=0;Object.keys(t.race.servants.sjobs).forEach((function(a){t.resource[a].display||(t.race.servants.sjobs[a]=0),e+=t.race.servants.sjobs[a],e>t.race.servants.smax&&(t.race.servants.sjobs[a]-=e-t.race.servants.smax),t.race.servants.sjobs[a]<0&&(t.race.servants.sjobs[a]=0)})),t.race.servants.sused=e}if(t.civic.space_miner.display&&t.space.space_station&&(t.space.space_station.s_max=la(t.civic.space_miner.workers,"space_miner")),t.portal.hasOwnProperty("transport")){let e=0;n.transport&&(e=5*n.transport),t.portal.transport.cargo.max=e}if(t.portal.hasOwnProperty("purifier")){let e=100,a=1e4;l.base_camp&&(a*=1+.4*l.base_camp),l.port&&(e+=l.port*a),t.portal.purifier.sup_max=Math.round(e)}let ye=t.race.truepath?5:3,be=t.race.blurry?2:0,we=Oi("yeti");we>=.25&&(be+=we>=.5?2:1);for(let a=0;a0&&(t.civic.foreign[`gov${a}`].trn--,0===t.civic.foreign[`gov${a}`].trn&&t.civic.foreign[`gov${a}`].spy++),t.civic.foreign[`gov${a}`].sab>0&&(t.civic.foreign[`gov${a}`].sab--,0===t.civic.foreign[`gov${a}`].sab))switch(t.civic.foreign[`gov${a}`].act){case"influence":if(0===Math.floor(g(0,4+be)))So(a);else{let r=Math.floor(g(t.tech.spy>=5?2:1,t.tech.spy>=5?8:6));"scorpio"===e&&(r+=U("scorpio")[1]),t.civic.foreign[`gov${a}`].hstl-=r,t.civic.foreign[`gov${a}`].hstl<0&&(t.civic.foreign[`gov${a}`].hstl=0),Bi(z("civics_spy_influence_success",[te(a),r]),"success",!1,["spy"])}break;case"sabotage":if(0===Math.floor(g(0,3+be)))So(a);else{let r=Math.floor(g(t.tech.spy>=5?2:1,t.tech.spy>=5?8:6));"scorpio"===e&&(r+=U("scorpio")[1]),t.civic.foreign[`gov${a}`].mil-=r,t.civic.foreign[`gov${a}`].mil<50&&(t.civic.foreign[`gov${a}`].mil=50),Bi(z("civics_spy_sabotage_success",[te(a),r]),"success",!1,["spy"])}break;case"incite":if(0===Math.floor(g(0,2+Math.floor(be/2))))So(a);else{let r=Math.floor(g(t.tech.spy>=5?2:1,t.tech.spy>=5?8:6));"scorpio"===e&&(r+=U("scorpio")[1]),t.civic.foreign[`gov${a}`].unrest+=r,t.civic.foreign[`gov${a}`].unrest>100&&(t.civic.foreign[`gov${a}`].unrest=100),Bi(z("civics_spy_incite_success",[te(a),r]),"success",!1,["spy"])}break;case"annex":if(a>=3)break;let r=!t.tech.gov_fed&&!de();t.civic.foreign[`gov${a}`].anx=!0,Bi(z("civics_spy_annex_success",[te(a)]),"success",!1,["spy"]),r&&gs();break;case"purchase":if(a>=3)break;let s=!t.tech.gov_fed&&!de();t.civic.foreign[`gov${a}`].buy=!0,Bi(z("civics_spy_purchase_success",[te(a)]),"success",!1,["spy"]),s&&gs()}if(t.race.banana){let e=!1,a=0;if(Object.keys(t.resource).forEach((function(r){t.resource[r].hasOwnProperty("trade")&&t.resource[r].trade<0&&(e?t.resource[r].trade=0:e=r),t.resource[r].hasOwnProperty("trade")&&t.resource[r].trade>0&&(a+=t.resource[r].trade)})),t.resource[e]&&t.resource[e].trade<=-500){let e=Xc();t.stats.banana.b4[e]=!0,"m"!==e&&"l"!==e&&(t.stats.banana.b4.l=!0),a>=500&&to("banana")}}if(t.galaxy.defense){let e=["dreadnought","cruiser_ship","frigate_ship","corvette_ship","scout_ship"];for(let a=0;an[e[a]]){let i=r-n[e[a]];t.galaxy.defense[s][e[a]]-=i}t.galaxy.defense[s][e[a]]<0&&(t.galaxy.defense[s][e[a]]=0)}})),r=2&&$e.push("slave_market"),$e.forEach((function(e){if(Zr.city[e]&&Zr.city[e].cost){let a=Zr.city[e],r=$("#"+a.id);if(js(a)?r.hasClass("cna")&&r.removeClass("cna"):r.hasClass("cna")||r.addClass("cna"),js(a,!0)?r.hasClass("cnam")&&r.removeClass("cnam"):r.hasClass("cnam")||r.addClass("cnam"),t.city[e]){let r=ac(a,!1,!0);t.city[e].time=cc(r.t),t.city[e].bn=r.r}}})),Object.keys(Zr.tech).forEach((function(e){if(Zr.tech[e]&&Zr.tech[e].cost){let t=Zr.tech[e],a=$("#"+t.id);a.length>0&&(js(t)?a.hasClass("cna")&&a.removeClass("cna"):a.hasClass("cna")||a.addClass("cna"),js(t,!0)?a.hasClass("cnam")&&a.removeClass("cnam"):a.hasClass("cnam")||a.addClass("cnam"))}}));let xe=["space","interstellar","galaxy","portal","tauceti"];for(let e=0;e0&&t.city.ptrait.includes("toxic")&&(e+=Fi.toxic.vars()[0]),t.arpa.sequence.labs=e,t.arpa.sequence.time-=t.arpa.sequence.boost?2*e:e,t.arpa.sequence.progress=t.arpa.sequence.max-t.arpa.sequence.time,t.arpa.sequence.time<=0){if(t.arpa.sequence.max=5e4*(1+t.race.mutation**2),t.race.adaptable){let e=1-di.adaptable.vars()[0]/100;t.arpa.sequence.max=Math.floor(t.arpa.sequence.max*e)}if(t.arpa.sequence.progress=0,t.arpa.sequence.time=t.arpa.sequence.max,2===t.tech.genetics)Bi(z("genome",[Tc("name")]),"success",!1,["progress"]),t.tech.genetics=3;else{t.race.mutation++;let e=mi(1),a=1+(t.genes.synthesis?t.genes.synthesis:0),r=2**(t.race.mutation-1)*a;t.stats.achieve.creator&&(r=Math.round(r*(1+.5*t.stats.achieve.creator.l))),t.resource.Genes.amount+=r,t.resource.Genes.display=!0;let s=t.genes.plasma?t.race.mutation:1;t.genes.plasma&&s>3&&(s=t.genes.plasma>=2?s>5?5:s:3);let i=s>1?"_plural":"";"antimatter"===t.race.universe?(i=z("resource_AntiPlasmid"+i+"_name"),t.stats.antiplasmid+=s,t.prestige.AntiPlasmid.count+=s,eo("cross")):(i=z("resource_Plasmid"+i+"_name"),t.stats.plasmid+=s,t.prestige.Plasmid.count+=s),Ce("Crispr"),Bi(z("gene_therapy",[z("trait_"+e+"_name"),r,s,i]),"success",!1,["progress"])}Ce("Genetics"),gs()}}if(t.city.foundry){let e=t.civic.craftsman.workers;(t.race.kindling_kindred||t.race.smoldering)&&t.city.foundry.Plywood>0&&(t.civic.craftsman.workers-=t.city.foundry.Plywood,t.city.foundry.crafting-=t.city.foundry.Plywood,t.city.foundry.Plywood=0);let a=Xa();Object.keys(a).forEach((function(a){for(;t.city.foundry[a]>e&&t.city.foundry[a]>0;)t.city.foundry[a]--,t.city.foundry.crafting--;e-=t.city.foundry[a]}))}3===t.tech.foundry&&(t.race.kindling_kindred||t.race.smoldering)&&(t.tech.foundry=4,gs()),(t.race.kindling_kindred||t.race.smoldering)&&(t.civic.lumberjack.workers=0,t.resource.Lumber.crates=0,t.resource.Lumber.containers=0,t.resource.Lumber.trade=0),(t.race.kindling_kindred||t.race.smoldering)&&t.city.foundry&&t.city.foundry.Plywood&&(t.city.foundry.Plywood=0),Ec("fool",2023)&&!t.race.hooved?t.resource.Horseshoe.display=!0:t.race.hooved||(t.resource.Horseshoe.display=!1),Oo(!1);let ke=c.iron_ship+c.iridium_ship;if(ke>0&&t.tech.asteroid&&3===t.tech.asteroid&&Math.rand(0,250)<=ke&&(t.tech.asteroid=4,t.resource.Elerium.display=!0,Ji("Elerium",1),gs(),Bi(z("discover_elerium"),"info",!1,["progress"])),t.tech.asteroid&&4===t.tech.asteroid&&0===t.resource.Elerium.amount&&Ji("Elerium",1),i.outpost>0&&t.tech.gas_moon&&1===t.tech.gas_moon&&Math.rand(0,100)<=i.outpost&&(t.space.oil_extractor={count:0,on:0},t.tech.gas_moon=2,Bi(z("discover_oil",[ea().gas_moon]),"info",!1,["progress"]),Ht()),t.portal.hasOwnProperty("mechbay")&&t.tech.hell_spire&&t.tech.hell_spire>=9){t.portal.spire.boss||Ea(),Ta();let e=0;for(let a=0;a=2&&t.portal.waygate.progress<100?e+=Ga(r,!0):e+=Ga(r,!1)}if(t.portal.hasOwnProperty("waygate")&&t.tech.hasOwnProperty("waygate")&&1===t.portal.waygate.on&&t.tech.waygate>=2&&t.portal.waygate.progress<100?(t.portal.waygate.progress+=e,t.portal.waygate.time=cc(0===e?-1:(100-t.portal.waygate.progress)/e),t.portal.spire.time=cc(-1)):(t.portal.spire.progress+=e,t.portal.spire.time=cc(0===e?-1:(100-t.portal.spire.progress)/e),t.tech.waygate&&t.tech.waygate>=2&&(t.portal.waygate.time=cc(-1))),t.portal.hasOwnProperty("waygate")&&1===t.portal.waygate.on&&t.portal.waygate.progress>=100&&(t.portal.waygate.progress=100,t.portal.waygate.on=0,t.tech.waygate=3,t.resource.Demonic_Essence.display=!0,t.resource.Demonic_Essence.amount=1,gs()),t.portal.spire.progress>=100){t.portal.spire.progress=0;let e=Number(so()),a=e;t.genes.blood&&t.genes.blood>=2&&(a*=2),t.prestige.Blood_Stone.count+=a,t.stats.blood+=a,Ce("Blood"),t.tech.hasOwnProperty("b_stone")||(t.tech.b_stone=1,gs()),Bi(`${z("portal_spire_conquest",[z(`portal_mech_boss_${t.portal.spire.boss}`),t.portal.spire.count])} ${z(1===a?"portal_spire_conquest_stone":"portal_spire_conquest_stones",[a])}`,"info",!1,["progress","hell"]),t.portal.spire.count++,t.portal.spire.count>10&&(t.tech.hell_spire=10,gs());let r=Xc();t.stats.spire.hasOwnProperty(r)||(t.stats.spire[r]={s0:0,s1:0,s2:0,s3:0,s4:0}),t.portal.spire.count>t.stats.spire[r]["s"+(e-1)]&&(t.stats.spire[r]["s"+(e-1)]=t.portal.spire.count),(!t.stats.spire[r].hasOwnProperty(t.portal.spire.boss)||e>t.stats.spire[r][t.portal.spire.boss])&&(t.stats.spire[r][t.portal.spire.boss]=e),Ea(),xa()}}if(t.race.cannibalize&&t.city.s_alter&&(t.city.s_alter.rage>0&&t.city.s_alter.rage--,t.city.s_alter.regen>0&&t.city.s_alter.regen--,t.city.s_alter.mind>0&&t.city.s_alter.mind--,t.city.s_alter.mine>0&&t.city.s_alter.mine--,t.city.s_alter.harvest>0&&t.city.s_alter.harvest--,$('#popper[data-id="city-s_alter"]').length>0&&Os(Zr.city.s_alter,"city","s_alter")),t.race.casting){let e=0;["farmer","miner","lumberjack","science","factory","army","hunting","crafting"].forEach((function(a){t.race.casting[a]&&(e+=t.race.casting[a])})),t.race.casting.total=e}if(t.tech.r_queue&&t.r_queue.display){let e=-1,a=!1,r=!1,s=0,i=0,c={t:{t:0,rt:0},r:{},rr:{},id:{}};for(let o=0;o=l.grant[1]){t.r_queue.queue.splice(o,1),Ii(`rq${a.id}`);break}if(js(l,!0)){t.r_queue.queue[o].cna=!1;let u=ds(n.type,!1),d=t.settings.qAny_res?ac(l):ac(l,c,!1,u);d>=0?(!r&&js(l)&&u?(a=l,e=o,t.settings.qAny_res&&(r=!0)):(u&&(s+=d),i+=d),!t.settings.qAny_res&&u&&(r=!0),t.r_queue.queue[o].time=u?s:i):t.r_queue.queue[o].time=d,t.r_queue.queue[o].req=!!u}else t.r_queue.queue[o].cna=!0,t.r_queue.queue[o].time=-1;t.r_queue.queue[o].qa=!!t.settings.qAny_res}e>=0&&a&&!t.r_queue.pause&&a.action()&&(Bi(z("research_success",[t.r_queue.queue[e].label]),"success",!1,["queue","research_queue"]),hs(t.r_queue.queue[e].type),a.post&&a.post(),t.r_queue.queue.splice(e,1),Ii(`rq${a.id}`),Gs()),t.r_queue.queue.length>t.r_queue.max&&t.r_queue.queue.splice(t.r_queue.max);let o={},n=[];ds("club",o);for(let e=0;e0)for(let e=n.length-1;e>=0;e--)t.r_queue.queue.splice(n[e],1)}t.arpa.sequence&&t.arpa.sequence.auto&&t.tech.genetics&&t.tech.genetics>=8&&Po(),i.soul_forge&&ic({el:"#fort"},"update"),io()}if(t.tech.queue&&t.queue.display){let e=-1,a=!1,r=!1,s=["space","interstellar","galaxy","portal","tauceti"],i=0,c={t:{t:0,rt:0},r:{},rr:{},id:{}},o=!1;const n=function(e){const a=t.queue.queue[e];if(s.includes(a.action))for(const e in Zr[a.action])if(Zr[a.action][e][a.type])return Zr[a.action][e][a.type];return Zr[a.action][a.type]};for(let s=0;si?e:(t=parseInt(t,10),a===i&&t>s?e:-1===e.id||a=0){i+=n,l.time=i;for(let e=1;e=0&&(t.settings.qAny&&!t.queue.pause&&l.time>1?Ue(l.type,100,!0):r||(a=u,e=s,o=!0,r=!0))}else if(js(u,!0)){l.cna=!1;let n=ac(u,c);if(l.bres=!1,n>=0){!r&&js(u)?(a=u,e=s,o=!1,t.settings.qAny&&(r=!0)):i+=n,t.settings.qAny||(r=!0),l.time=i;let d=!1;for(let e=1;e=0&&a&&!t.queue.pause){let r=!1;if(o){let r=t.queue.queue[e].label;Ue(t.queue.queue[e].type,100,!0,!0)&&(Bi(z("build_success",[r]),"success",!1,["queue","building_queue"]),t.queue.queue[e].q>1?t.queue.queue[e].q--:(Ii(`q${a.id}${e}`),t.queue.queue.splice(e,1),Wi()))}else{let s=t.queue.queue[e].q,i=t.queue.queue[e],c=a.queue_complete?a.queue_complete():1;for(let i=0;i1?t.queue.queue[e].q--:(Ii(`q${a.id}${e}`),t.queue.queue.splice(e,1),Wi()),t.race.inflation&&t.tech.primitive&&(a.hasOwnProperty("inflation")&&!a.inflation||t.race.inflation++);r&&bs(a,i.action,i.type)}}let l=!1,u=0,d=[],_=!1;for(let e=0;et.queue.max){let a=Math.ceil(t.queue.queue[e].q/t.queue.queue[e].qs)-(u-t.queue.max);0===a?t.queue.queue.splice(e):(t.queue.queue[e].q=a*t.queue.queue[e].qs,t.queue.queue.splice(e+1))}if("merge_nearby"===t.settings.q_merge){if(l===t.queue.queue[e].id){Ii(`q${t.queue.queue[e].id}${e}`),t.queue.queue[e-1].q+=t.queue.queue[e].q,t.queue.queue.splice(e,1),Wi();break}l=t.queue.queue[e].id}else if("merge_all"===t.settings.q_merge){let a=!1;for(let r=0;r=0&&a>t.resource[r].max,i=e.attr("data-ok")?e.attr("data-ok"):"has-text-dark";t.resource[r].amount+t.resource[r].diff$("#buildQueue").get(0).clientHeight&&a++,ei&&(a-=i-e),e=i),ac&&(e-=e+a-c,ec&&(a-=e+a-c,a0&&$("#mechList").css("height",`calc(100vh - 11.5rem - ${$("#mechAssembly").height()}px)`),$("#shipList").length>0&&$("#shipList").css("height",`calc(100vh - 11.5rem - ${$("#shipPlans").height()}px)`)}();break;case"long":!function(){const a=new Date,r=W();if("protoplasm"!==t.race.species){let a=ri(),s=!1;if(Object.keys(a).forEach((function(e){a[e].l.forEach((function(t){let r=t.split(":"),i=Et(r[0]),c="city"===r[0]?r[0]:i,o="city"===r[0]?Zr.city[r[1]]:Zr[i][r[0]][r[1]],n=$(`#pg${o.id}${e}`);a[e].s&&(0===n.length||ti(o,c,r[0],r[1])&&n.hasClass("inactive"))&&(s=!0)}))})),s&&ai(),t.tech.syphon&&t.tech.syphon>=80){P.w&&P.w.terminate();let a=$('
              ');$("body").append(a),setTimeout((function(){a.addClass("burn")}),125),setTimeout((function(){a.addClass("b")}),150),setTimeout((function(){a.addClass("c")}),2e3),setTimeout((function(){!function(){if(t.tech.syphon>=80&&"magic"===t.race.universe){t.tech.syphon=79,t.arpa.syphon.rank=79,t.arpa.syphon.complete=99,t.queue.queue=[],t.stats.current=Date.now(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),C(),Vi("reset",{end:"vacuum"}),eo(`extinct_${t.race.species}`),eo("pw_apocalypse"),t.space.hasOwnProperty("spaceport")&&0===t.space.spaceport.count&&eo("red_dead"),t.race.modified||"balorg"!==t.race.species||eo("pass"),t.race.junker&&"junker"===t.race.species&&to("the_misery"),t.race.decay&&eo("dissipated"),t.race.steelen&&to("steelem");let a=t.race.species,r=t.race.gods,s=t.city.calendar.orbit,i=t.city.biome,c=t.city.ptrait,o=gc("vacuum");io(),t.stats.blackhole++,zc(),t.prestige.Phage.count+=o.phage,t.stats.phage+=o.phage,"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=o.plasmid,t.stats.antiplasmid+=o.plasmid):(t.prestige.Plasmid.count+=o.plasmid,t.stats.plasmid+=o.plasmid),t.prestige.Dark.count=+(t.prestige.Dark.count+o.dark).toFixed(3),t.stats.dark=+(t.stats.dark+o.dark).toFixed(3),t.stats.universes++;let n=!!t.race.hasOwnProperty("srace")&&t.race.srace,l=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0;t.race={species:"protoplasm",gods:a,old_gods:r,universe:"bigbang",seeded:!0,bigbang:!0,probes:4,seed:Math.floor(g(1e4)),ascended:!1},l>0&&(t.race.corruption=l),n&&(t.race.srace=n),Z({orbit:s,biome:i,ptrait:c,geology:!1}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}}()}),4e3)}if(t.portal.fortress&&function(){let e={start:t.portal.fortress.threat,foundGem:!1,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=t.tech.armor?t.tech.armor:0;t.race.armored&&(a+=di.armored.vars()[1]);let r=Oi("tortoisan");r>0&&(a+=Math.floor(di.armored.vars(1)[1]*r)),t.race.scales&&(a+=di.scales.vars()[2]);let s=!1;if(i.soul_forge){let e=t.portal.fortress.garrison-t.portal.fortress.patrols*t.portal.fortress.patrol_size;wa()<=e?(s=!0,$("#portal-soul_forge .on").removeClass("altwarn")):(s=!1,$("#portal-soul_forge .on").addClass("altwarn"))}else $("#portal-soul_forge .on").addClass("altwarn");let c=0;if(t.tech.portal>=3&&i.war_drone){e.drones={};for(let a=0;a=Math.rand(0,999)){let a=Math.rand(Math.floor(t.portal.fortress.threat/50),Math.floor(t.portal.fortress.threat/10)),i=t.tech.portal>=7?Math.rand(50,125):Math.rand(25,75);a=5?9e3:1e4)-t.portal.fortress.pity;if("evil"===t.race.universe&&t.prestige.Dark.count>1){let e=t.prestige.Dark.count;t.prestige.Harmony.count>0&&(e*=1+.01*t.prestige.Harmony.count),o-=Math.round(2*Math.log2(e))}t.tech.portal>=4&&i.attractor&&(o=Math.round(o*.948**i.attractor)),t.race.ghostly&&(o=Math.round(o*((100-di.ghostly.vars()[2])/100)));let n=Oi("wendigo");n>0&&(o=Math.round(o*((100-di.ghostly.vars(1)[2])/100*n))),o<12&&(o=12);let l=0,u=i.war_droid?i.war_droid:0,d=!1,h=0;t.civic.garrison.wounded>t.civic.garrison.workers-t.portal.fortress.garrison&&(h=t.civic.garrison.wounded-(t.civic.garrison.workers-t.portal.fortress.garrison),h>t.portal.fortress.garrison-t.portal.fortress.patrols*t.portal.fortress.patrol_size?(h-=t.portal.fortress.garrison-t.portal.fortress.patrols*t.portal.fortress.patrol_size,h/=t.portal.fortress.patrols):h=0);let m=+(h%1).toFixed(10);e.patrols={};for(let r=0;r1/t.portal.fortress.patrols*r?Math.ceil(h):Math.floor(h);if(Math.rand(0,t.portal.fortress.threat)>=Math.rand(0,999)){c.encounter=!0;let r=t.portal.fortress.patrol_size;u>0&&(c.droid=!0,r+=t.tech.hdroid?ua(2):ua(1),u--);let _=Math.round(qe(r,"hellArmy",n)),p=Math.rand(Math.floor(t.portal.fortress.threat/50),Math.floor(t.portal.fortress.threat/10));t.race.blood_thirst&&(t.race.blood_thirst_count+=Math.rand(0,Math.ceil(p/10)),t.race.blood_thirst_count>di.blood_thirst.vars()[0]&&(t.race.blood_thirst_count=di.blood_thirst.vars()[0]));let h=30+Math.max(t.race.chameleon?di.chameleon.vars()[1]:0,t.race.elusive?di.elusive.vars()[0]:0);if(0===Math.rand(0,h)){c.ambush=!0,l+=Pa(Math.round(p*(1+3*Math.random())),0,!0,c);let e=Math.round(_/2);p0){let a=35-Math.floor(i.attractor/3);a<5&&(a=5);let s=Math.round(r/a);for(let a=0;at.civic.garrison.workers&&(t.civic.garrison.wounded=t.civic.garrison.workers);let f=t.portal.fortress.nocrew?t.civic.garrison.workers-t.civic.garrison.crew:t.civic.garrison.workers;if(f0&&"Yes"===t.portal.fortress.notify&&Bi(g>0?z("fortress_patrol_casualties_revive",[l,g]):z("fortress_patrol_casualties",[l]),!1,!1,["hell"]),t.portal.fortress.garrison>0&&t.portal.fortress.siege>0&&t.portal.fortress.siege--,t.portal.fortress.siege<=900&&t.portal.fortress.garrison>0&&1>Math.rand(0,t.portal.fortress.siege)){let a={destroyed:!1,damage:0,kills:0,surveyors:0,soldiers:0},r=Ma(t.portal.fortress.garrison),i=r/35>1?r/35:1,c=Math.round(t.portal.fortress.threat/2),o=0,n=0,l=!1;for(;c>0&&t.portal.fortress.walls>0;){let e=Math.round(Math.rand(1,i+1));if(e>c&&(e=c),c-=e,t.portal.fortress.threat-=e,t.stats.dkills+=e,s&&(t.portal.soul_forge.kills+=e,Oa(e)),n+=e,c>0&&(o++,t.portal.fortress.walls--,0===t.portal.fortress.walls)){a.destroyed=!0,l=!0;break}}a.damage=o,a.kills=n,e.stats.kills.sieges=n,l?(Bi(z("fortress_lost"),!1,!1,["hell"]),a.surveyors=t.civic.hell_surveyor.workers,t.resource[t.race.species].amount-=t.civic.hell_surveyor.workers,t.civic.hell_surveyor.workers=0,t.civic.hell_surveyor.assigned=0,a.soldiers=t.portal.fortress.garrison,e.stats.died+=t.portal.fortress.garrison,t.portal.fortress.patrols=0,t.stats.died+=t.portal.fortress.garrison,t.civic.garrison.workers-=t.portal.fortress.garrison,t.portal.fortress.garrison=0,t.portal.fortress.assigned=0):Bi(z("fortress_sieged",[n,o]),!1,!1,["hell"]),t.portal.fortress.siege=999,e.stats.sieges++,e.siege=a}if(t.portal.fortress.threat<1e4){let a=(1e4-t.portal.fortress.threat)/2500+1;t.tech.portal>=4&&i.attractor&&(a*=1+.22*i.attractor);let r=Math.rand(Math.round(10*a),Math.round(50*a));t.portal.fortress.threat+=r,e.demons=r}if(t.civic.hell_surveyor.display&&t.civic.hell_surveyor.workers>0){let a=1e3,r=D("nopain",1);r&&(a*=1+r/100),t.race.blurry&&(a*=1+di.blurry.vars()[0]/100);let s=Oi("yeti");s>0&&(a*=1+di.blurry.vars(1)[0]/100*s),t.race.instinct&&(a*=1+di.instinct.vars()[0]/100),t.tech.infernite&&t.tech.infernite>=5&&(a+=250);let n=t.portal.fortress.threat/a,l=t.civic.hell_surveyor.workers>10?10:t.civic.hell_surveyor.workers;if(n>10-Math.rand(0,l+1)){let a=Math.round(n),r=Math.rand(0,a+1);r>t.civic.hell_surveyor.workers&&(r=t.civic.hell_surveyor.workers),1===r&&"Yes"===t.portal.fortress.s_ntfy?Bi(z("fortress_killed"),!1,!1,["hell"]):r>1&&"Yes"===t.portal.fortress.s_ntfy&&Bi(z("fortress_eviscerated",[r]),!1,!1,["hell"]),r>0&&(e.surveyors=r,e.stats.surveyors=r,t.civic.hell_surveyor.workers-=r,t.civic.hell_surveyor.max-=r,t.resource[t.race.species].amount-=r,t.portal.carport.damaged+=r)}if(e.surveyor_finds={},t.civic.hell_surveyor.workers>0&&c>0)for(let a=0;a100&&(s=100),r.bodies=s,s>0){let a=25-Math.floor(i.attractor/5);a<5&&(a=5);let c=Math.round(s/a);for(let a=0;a=1e6&&t.tech.gateway&&!t.tech.hell_pit&&(t.tech.hell_pit=1,t.settings.portal.pit=!0,Bi(z("portal_hell_pit_found"),"info",!1,["progress","hell"]),xa()),t.tech.hell_pit){if(s&&t.tech.hell_pit>=5&&i.soul_attractor){let a=t.blood.attract?5*t.blood.attract:0,r=i.soul_attractor*Math.rand(40+a,120+a);t.portal.soul_forge.kills+=r,e.soul_attractors=r,Oa(r)}if(s&&t.tech.hell_gun&&i.gun_emplacement){e.gun_emplacements={};let a=0;for(let r=0;r=2?Math.rand(35,75):Math.rand(20,40);a+=s,e.gun_emplacements[r+1].kills=s}e.stats.kills.guns=a,t.portal.soul_forge.kills+=a,Oa(a),t.stats.dkills+=a;let r=t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=5?6750:7500;t.tech.hell_pit>=7&&i.soul_attractor>0&&(r*=.94**i.soul_attractor);for(let a=0;a=5?4500:5e3;0===Math.rand(0,r)&&(e.soul_forge.gem=!0,e.stats.gems.soul_forge++,t.resource.Soul_Gem.amount++)}let a=t.tech.hell_pit>=6?75e4:1e6;if(t.tech.hell_pit>=7&&i.soul_attractor>0&&(a*=.97**i.soul_attractor),s&&t.portal.soul_forge.kills>=Math.round(a)){e.soul_forge.gem_craft=!0,t.portal.soul_forge.kills=0;let a=10-i.soul_attractor>0?10-i.soul_attractor:1;t.tech.high_tech>=16&&!t.tech.corrupt&&0===Math.rand(0,a+1)?(e.soul_forge.corrupt=!0,t.resource.Corrupt_Gem.amount++,t.resource.Corrupt_Gem.display=!0,Bi(z("portal_corrupt_gem"),"info",!1,["progress","hell"]),t.tech.corrupt=1,gs()):(t.resource.Soul_Gem.amount++,e.stats.gems.crafted++)}}if(t.tech.hell_gate&&t.tech.hell_gate>=3&&s&&i.gate_turret){e.gate_turrets={};let a=0,r=t.tech.hell_gun>=2?65:40,s=t.tech.hell_gun>=2?100:60;for(let t=0;t=5?2700:3e3;for(let a=0;a0&&t.civic.govern.rev--,t.civic.govern.fr>0&&t.civic.govern.fr--,t.civic.govern.rev<0&&(t.civic.govern.rev=0),t.city.ptrait.includes("trashed")||t.race.scavenger?t.civic.scavenger.display=!0:(t.civic.scavenger.display=!1,t.civic.scavenger.workers=0),t.civic.homeless>0){let e=t.arpa.railway?t.arpa.railway.rank:0,a=Math.floor(e/(e+25)*10);Math.rand(0,10)<=a&&t.civic.homeless--}if(t.tech.currency&&t.tech.currency>=2){let e=D("risktaker",0)?2:4;Object.keys(Za).forEach((function(a){let r=t.race.truepath?2*Za[a]:Za[a];if("Copper"===a&&t.tech.high_tech&&t.tech.high_tech>=2&&(r*=2),"Titanium"===a&&(t.tech.titanium&&t.tech.titanium>0?r*=t.resource.Alloy.display?1:2.5:r*=5),t.resource[a].display&&0===Math.rand(0,e)){let e=3*r,s=r/2,i=(Math.rand(0,200)-100)/100,c=t.resource[a].value+i;ce&&(c=e-r),t.resource[a].value=c}}))}if(t.race.blood_thirst&&(t.race.hasOwnProperty("blood_thirst_count")||(t.race.blood_thirst_count=1),t.race.blood_thirst_count>1&&t.race.blood_thirst_count--),t.race.truepath&&t.civic.foreign.gov3.mil<500&&0===Math.rand(0,50)&&t.civic.foreign.gov3.mil++,t.civic.garrison.wounded>0){let e=t.race.regenerative?di.regenerative.vars()[0]:1,a=t.city.hospital?t.city.hospital.count:0;if(t.race.orbit_decayed&&t.race.truepath?a=Math.min(c.operating_base,i.operating_base):t.race.artifical&&t.city.boot_camp&&(a=t.city.boot_camp.count),t.race.rejuvenated&&t.stats.achieve.lamentis){let e=t.stats.achieve.lamentis.l;e>5&&(e=5),a+=e}"cancer"===r&&(a+=U("cancer")[0]),t.tech.medic&&t.tech.medic>=2&&(a*=t.tech.medic),t.race.fibroblast&&(a+=di.fibroblast.vars()[0]*t.race.fibroblast),t.race.cannibalize&&t.city.s_alter&&t.city.s_alter.regen>0&&(a>=20?a*=1+di.cannibalize.vars()[0]/100:a+=Math.floor(di.cannibalize.vars()[0]/5));let s=Oi("mantis");s>0&&(a>=20?a*=1+di.cannibalize.vars(1)[0]/100*s:a+=Math.floor(di.cannibalize.vars(1)[0]/5*s)),t.race.high_pop&&(a*=di.high_pop.vars()[2]);let o=D("nopain",0);o&&(a*=1+o/100);let n=Oi("troll");n>0&&(a+=Math.round(20*di.regenerative.vars(1)[0]*n));let l=20;if(t.race.slow_regen&&(l*=1+di.slow_regen.vars()[0]/100),a=Math.round(a),a>0){for(;a>=l;)e++,a-=l;Math.rand(0,a)>Math.rand(0,l)&&e++}t.civic.garrison.wounded-=e,t.civic.garrison.wounded<0&&(t.civic.garrison.wounded=0)}t.civic.garrison.fatigue&&t.civic.garrison.fatigue>0&&t.civic.garrison.fatigue--,t.civic.garrison.protest&&t.civic.garrison.protest>0&&t.civic.garrison.protest--;let o=t.tech.mercs&&t.tech.mercs>=2?3:4;if(t.civic.garrison.m_use&&t.civic.garrison.m_use>0&&0===Math.rand(0,o)&&t.civic.garrison.m_use--,t.race.rainbow_active&&t.race.rainbow_active>1&&t.race.rainbow_active--,t.city.calendar.day>0){if(t.city.calendar.day++,t.stats.days++,t.city.calendar.day>t.city.calendar.orbit&&(t.city.calendar.day=1,t.city.calendar.year++),t.race.cataclysm||t.race.orbit_decayed)t.city.calendar.season=-1;else{let e=t.city.ptrait.includes("elliptical")?6:4,a=Math.round(t.city.calendar.orbit/e),r=t.city.calendar.day,s=0;for(;r>a;)r-=a,s++;if(t.city.ptrait.includes("elliptical"))switch(s){case 0:t.city.calendar.season=0;break;case 1:case 2:t.city.calendar.season=1;break;case 3:t.city.calendar.season=2;break;default:t.city.calendar.season=3}else t.city.calendar.season=s}if(t.race.cataclysm||t.race.orbit_decayed)t.city.calendar.wind=0,t.city.calendar.temp=1,t.city.calendar.weather=-1;else if(0===Math.rand(0,5)){let e=Math.rand(0,3),a=Math.rand(0,5),r=Math.rand(0,3);switch(t.city.biome){case"oceanic":case"swamp":0===Math.rand(0,2)&&a>0&&a--;break;case"tundra":case"taiga":3===t.city.calendar.season?e=0:0===Math.rand(0,2)&&e>0&&e--;break;case"desert":0===Math.rand(0,2)&&a<4&&a++;break;case"ashland":0===Math.rand(0,2)&&(a<1?a++:a>2&&a--);case"volcanic":1===t.city.calendar.season?e=2:0===Math.rand(0,2)&&e<2&&!t.city.ptrait.includes("permafrost")&&e++}switch(t.city.calendar.season){case 0:0===Math.rand(0,3)&&a>0&&a--;break;case 1:0===Math.rand(0,3)&&e<2&&e++;break;case 2:0===Math.rand(0,3)&&r>0&&r--;break;case 3:0===Math.rand(0,3)&&e>0&&e--}if(t.city.ptrait.includes("stormy")&&r>0&&(t.race.rejuvenated||0===Math.rand(0,2))&&r--,0===a?(t.race.rainbow&&(t.race.rainbow_active=1),t.city.calendar.weather=0):a>=1&&a<=2?(t.race.rainbow&&(t.race.rainbow_active=1),t.city.calendar.weather=1):(t.race.rainbow&&0===t.city.calendar.weather&&(t.race.rainbow_active=Math.rand(10,20)),t.city.calendar.weather=2,t.race.darkness&&0===Math.rand(0,7-di.darkness.vars()[0])&&(t.city.calendar.weather=1)),0===e){let e=t.city.calendar.temp-1;e<0&&(e=0),1===t.city.calendar.season&&0===e&&(e=1),0!==e||"hellscape"!==t.city.biome||t.city.ptrait.includes("permafrost")||(e=1),0===e&&"eden"===t.city.biome&&3!==t.city.calendar.season&&(e=1),t.city.calendar.temp=e}else if(2===e){let e=t.city.calendar.temp+1;e>2&&(e=2),3===t.city.calendar.season&&2===e&&(e=1),2===e&&"eden"===t.city.biome&&1!==t.city.calendar.season&&(e=1),t.city.calendar.temp=e}t.city.calendar.wind=0===r?1:0}2===t.city.calendar.weather?t.city.sun++:t.city.sun=0,0===t.city.calendar.temp?t.city.cold++:t.city.cold=0,2===t.city.calendar.temp?t.city.hot++:t.city.hot=0,t.race.orbit_decayed||(t.city.ptrait.includes("retrograde")?(t.city.calendar.moon--,t.city.calendar.moon<0&&(t.city.calendar.moon=27)):(t.city.calendar.moon++,t.city.calendar.moon>27&&(t.city.calendar.moon=0))),R()}if(!(t.race.cataclysm||t.race.orbit_decayed||t.race.lone_survivor||t.race.vax)){let e=Math.floor(5e7/(1+t.race.mutation))-t.stats.days;if(0===t.race.deterioration&&e<4e7){t.race.deterioration=1;let a=Math.round(e/t.city.calendar.orbit);Bi(z("deterioration1",[Tc("name"),a]),"danger",!1,["progress"])}else if(1===t.race.deterioration&&e<2e7){t.race.deterioration=2;let a=Math.round(e/t.city.calendar.orbit);Bi(z("deterioration2",[Tc("name"),a]),"danger",!1,["progress"])}else if(2===t.race.deterioration&&e<5e6){t.race.deterioration=3;let a=Math.round(e/t.city.calendar.orbit);Bi(z("deterioration3",[Tc("name"),a]),"danger",!1,["progress"])}else if(3===t.race.deterioration&&e<1e6){t.race.deterioration=4;let a=Math.round(e/t.city.calendar.orbit);Bi(z("deterioration4",[Tc("name"),a]),"danger",!1,["progress"])}else 4===t.race.deterioration&&e<=0&&(t.race.deterioration=5,t.race.decayed=t.stats.days,t.tech.decay=1,Bi(z("deterioration5",[Tc("name")]),"danger",!1,["progress"]),gs())}if(t.tech.decay&&t.tech.decay>=2){let e=0;t.genes.minor.fortify&&(e+=t.genes.minor.fortify),t.race.minor.fortify&&(e+=t.race.minor.fortify),t.tech.decay>=3&&(e*=100),t.race.gene_fortify=e}else t.race.gene_fortify=0;if(!t.tech.genesis&&t.race.deterioration>=1&&t.tech.high_tech&&t.tech.high_tech>=10&&(t.tech.genesis=1,Bi(z("genesis"),"special",!1,["progress"]),gs()),t.settings.cLabels&&0===$("#city-dist-outskirts").length&&ms(),!t.settings.cLabels&&$("#city-dist-outskirts").length>0&&ms(),t.tech.xeno&&t.tech.xeno>=5&&!t.tech.piracy&&0===Math.rand(0,5)&&(t.tech.piracy=1,Bi(z("galaxy_piracy_msg",[_i[t.galaxy.alien2.id].name]),"info",!1,["progress"]),Ht()),t.race.cheese&&(t.race.cheese--,t.race.cheese<=0&&delete t.race.cheese),t.tech.piracy&&(t.tech.piracy<1e3||t.tech.xeno>=8&&t.tech.piracy<2500||t.tech.conflict&&t.tech.piracy<5e3)&&t.tech.piracy++,t.portal.archaeology&&t.tech.hasOwnProperty("hell_ruins")&&t.tech.hell_ruins>=2&&!t.tech.hell_vault){let e=Ca("ruins"),a=25e4;t.race.high_pop&&(a=Pe(a)),a=Math.round(a*e.supress)*la(t.civic.archaeologist.workers,"archaeologist")/1e3,Math.rand(0,1e4)+1<=a&&(t.tech.hell_vault=1,Bi(z("portal_ruins_vault"),"info",!1,["progress"]),xa())}if(t.tech.syndicate&&t.race.truepath){let e=Bt();if(Object.keys(e).forEach((function(a){if(e[a].info.hasOwnProperty("syndicate")&&e[a].info.syndicate()){let r=e[a].info.hasOwnProperty("syndicate_cap")?e[a].info.syndicate_cap():500;t.space.syndicate.hasOwnProperty(a)||(t.space.syndicate[a]=0);let s="spc_triton"===a?5:10;t.space.syndicate[a]r&&(t.space.syndicate[a]=r)}})),t.space.hasOwnProperty("shipyard")&&t.space.shipyard.hasOwnProperty("ships")){let e=0,a=0,r=!1;t.space.shipyard.ships.forEach((function(s){if(s.transit>0&&s.fueled){s.transit--;let e=1-s.transit/s.dist,t=Math.abs(s.origin.x-s.destination.x)*e,a=Math.abs(s.origin.y-s.destination.y)*e;s.origin.x<=s.destination.x?s.xy.x=s.origin.x+t:s.xy.x=s.origin.x-t,s.origin.y<=s.destination.y?s.xy.y=s.origin.y+a:s.xy.y=s.origin.y-a}if(0===s.transit&&(s.xy=yt(s.location),s.origin=Ac(s.xy),s.dist=0),s.damage>0&&i.shipyard&&s.damage--,"spc_dwarf"!==s.location&&0===Math.rand(0,10)){let e="spc_triton"===s.location?2:1;switch(s.armor){case"steel":s.damage+=Math.rand(1,8*e);break;case"alloy":s.damage+=Math.rand(1,6*e);break;case"neutronium":s.damage+=Math.rand(1,4*e)}s.damage>90&&(s.damage=90)}t.tech.hasOwnProperty("eris_scan")&&"spc_eris"===s.location&&0===s.transit&&(e+=gt(s)),t.tech.hasOwnProperty("tauceti")&&"tauceti"===s.location&&0===s.transit&&(a+=gt(s),r=s.name)})),t.tech.hasOwnProperty("eris_scan")&&t.tech.hasOwnProperty("eris")&&1===t.tech.eris&&e>50&&(t.tech.eris_scan+=e-50,t.tech.eris_scan>=100&&(t.tech.eris_scan=100,t.tech.eris=2,Bi(z("space_eris_scan",[ea().eris]),"info",!1,["progress"]),Ht())),t.tech.hasOwnProperty("tauceti")&&t.tech.tauceti>=1&&a>=1&&1===t.tech.tauceti&&(t.tauceti.orbital_station={count:0,on:0,support:0,s_max:0},t.tauceti.orbital_platform={count:0,on:0,support:0,s_max:0},t.tech.tauceti=2,t.settings.showTau=!0,t.settings.tau.home=!0,t.settings.tau.red=!0,t.settings.tau.gas=!1,t.settings.tau.roid=!1,Bi(z("tau_scan",[r]),"info",!1,["progress"]),at()),t.space.hasOwnProperty("position")&&Object.keys(ft).forEach((function(e){if(t.space.position.hasOwnProperty(e)){let a=-1===ft[e].orbit?t.city.calendar.orbit:ft[e].orbit;if(-2===a)return;0===a?t.space.position[e]=0:(t.space.position[e]+=+(360/a).toFixed(4),t.space.position[e]>=360&&(t.space.position[e]-=360))}})),$("#mapCanvas").length>0&&Pt()}t.tech.triton&&t.tech.triton>=3&&function(){if(t.space.fob){if(t.space.fob.enemy<=1e3){let e=t.tech.outer&&t.tech.outer>=4?125:100;t.space.fob.enemy+=Math.rand(25,e)}let e=Math.ceil(ua(t.space.fob.enemy)/5),a=t.civic.garrison.wounded-Me();a<0&&(a=0);let r=qe(t.space.fob.troops,"army",a),s=Math.rand(0,a+1);t.civic.garrison.workers-=s,t.stats.died+=s,t.civic.garrison.wounded-=s,t.space.fob.enemy-=Math.rand(0,r),t.space.fob.enemy<0&&(t.space.fob.enemy=0);let i=Math.rand(0,t.space.fob.troops+1);if(i>e&&(i=e),t.race.armored&&(i-=ua(1)),t.race.scales&&(i-=ua(1)),t.tech.armor&&(i-=ua(t.tech.armor)),i<0&&(i=0),t.race.revive&&s>0){let e=Math.round(Math.rand(0,s+1));t.civic.garrison.workers+=e}t.civic.garrison.wounded+=i,t.civic.garrison.wounded>Me(!1,!0)&&(t.civic.garrison.wounded=Me(!1,!0));{let e=t.civic.garrison.wounded-Me();e<0&&(e=0);let a=t.space.fob.enemy-qe(t.space.fob.troops,"army",e);a<=0&&t.space.crashed_ship.count<100?t.space.crashed_ship.count++:a>0&&t.space.crashed_ship.count>0&&t.space.crashed_ship.count--,100===t.space.crashed_ship.count&&(t.resource.Cipher.display=!0)}}}(),t.tech.eris&&t.tech.eris>=3&&function(){if(t.space.digsite){if(t.space.digsite.enemy<=1e4){let e=250;t.space.digsite.enemy+=Math.rand(25,e)}let e=qe(c.shock_trooper,"army",0);c.tank&&(e+=100*c.tank),e*=mt("spc_eris"),t.space.digsite.enemy-=Math.rand(0,e),t.space.digsite.enemy<0?t.space.digsite.enemy=0:t.space.digsite.enemy>1e4&&(t.space.digsite.enemy=1e4),t.space.digsite.count=Math.floor(100-t.space.digsite.enemy/100)}}()}if((t.stats.matrix>0||t.stats.retire>0)&&!t.race.servants&&0===Math.rand(0,25)){let e=t.stats.matrix+t.stats.retire+t.stats.eden,a=t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=5?2:0;a+=Math.min(t.stats.matrix,t.stats.retire),t.stats.achieve.overlord&&t.stats.achieve.overlord.l>=5&&ta.forEach((function(r){t.stats.achieve.overlord[r]>=5&&(a++,e+=2)})),t.race.servants={max:e,used:0,smax:a,sused:0,jobs:{},sjobs:{},force_scavenger:!1},Bi(e+a===1?z("civics_servants_msg1"):z("civics_servants_msg2",[e+a]),"caution",!1,["events","major_events"])}if(t.race.truepath&&t.tech.focus_cure&&t.tech.focus_cure>=2&&t.tauceti.infectious_disease_lab)if(t.tauceti.infectious_disease_lab.cure<100){let e=(c.infectious_disease_lab||0)/100;e>1&&(e=1);let a=+Tc("curve",e).toFixed(5)/5;t.tauceti.infectious_disease_lab.cure+=a,t.tauceti.infectious_disease_lab.cure>100&&(t.tauceti.infectious_disease_lab.cure=100)}else if(t.tauceti.infectious_disease_lab.cure>=100&&2===t.tech.focus_cure)t.tech.focus_cure=3,"synthetic"===_i[t.race.species].type?Bi(z("tech_decode_virus_msg2s"),"info",!1,["progress"]):Bi(z("tech_decode_virus_msg2"),"info",!1,["progress"]);else if(t.tech.focus_cure>=4&&t.race.hasOwnProperty("vax")){let e=t.race.artifical?t.city.boot_camp.count:t.city.hospital.count;if(t.race.orbit_decayed&&(e=Math.min(c.operating_base,i.operating_base)),4===t.tech.focus_cure&&t.race.vax<25)t.race.vax+=Math.rand(0,2*e)/150;else if(4===t.tech.focus_cure&&t.race.vax>=25)t.tech.focus_cure=5,Bi(z("tech_vaccine_campaign_msg1"),"info",!1,["progress"]);else if(5===t.tech.focus_cure&&t.race.vax<50)t.race.vax+=Math.rand(0,2*e)/450;else if(5===t.tech.focus_cure&&t.race.vax<75)t.race.vax+=Math.rand(0,2*e)/1200;else if(6===t.tech.focus_cure&&t.race.vax<100){let a=1e3;t.tech.vax_p?a=250:t.tech.vax_s?a=390:t.tech.vax_f?a=25:t.tech.vax_c&&(a=125),t.race.vax+=Math.rand(0,2*e)/a}else t.race.vax>=100&&t.tech.focus_cure<=6&&(t.race.vax=100,t.tech.focus_cure=7,Bi(z("tech_vaccine_campaign_msg2"),"info",!1,["progress"]),B("assemble"))}if(t.race.infiltrator){let e=t.tech.world_control?"trait_infiltrator_steal_alt":"trait_infiltrator_steal",a=di.infiltrator.vars()[0]/100;t.resource.Knowledge.max>=Zr.tech.steel.cost.Knowledge()*a&&!t.race.steelen&&t.tech.smelting&&1===t.tech.smelting&&(Bi(z(e,[z("tech_steel")]),"info",!1,["progress"]),t.resource.Steel.display=!0,t.tech.smelting=2,Qs(),gs()),t.resource.Knowledge.max>=Zr.tech.electricity.cost.Knowledge()*a&&t.tech.high_tech&&1===t.tech.high_tech&&(Bi(z(e,[z("tech_electricity")]),"info",!1,["progress"]),t.tech.high_tech=2,t.city.power=0,t.city.powered=!0,t.city.coal_power={count:0,on:0},t.settings.showPowerGrid=!0,ai(),gs(),ms()),t.resource.Knowledge.max>=Zr.tech.electronics.cost.Knowledge()*a&&t.tech.high_tech&&3===t.tech.high_tech&&t.tech.titanium&&(Bi(z(e,[z("tech_electronics")]),"info",!1,["progress"]),t.tech.high_tech=4,t.race.terrifying&&(t.tech.gambling=1,t.city.casino={count:0},t.space.spc_casino={count:0}),gs(),ms()),t.resource.Knowledge.max>=Zr.tech.fission.cost.Knowledge()*a&&t.tech.high_tech&&4===t.tech.high_tech&&t.tech.uranium&&(Bi(z(e,[z("tech_fission")]),"info",!1,["progress"]),t.tech.high_tech=5,t.city.fission_power={count:0,on:0},gs(),ms()),t.resource.Knowledge.max>=Zr.tech.rocketry.cost.Knowledge()*a&&t.tech.high_tech&&6===t.tech.high_tech&&(Bi(z(e,[z("tech_rocketry")]),"info",!1,["progress"]),t.tech.high_tech=7,t.race.truepath&&!t.tech.rival&&(t.tech.rival=1,Bi(z("civics_rival_unlocked",[te(3)]),"info",!1,["progress","combat"])),Ce("Physics"),gs(),ms()),t.resource.Knowledge.max>=Zr.tech.artifical_intelligence.cost.Knowledge()*a&&t.tech.high_tech&&9===t.tech.high_tech&&(Bi(z(e,[z("tech_artificial_intelligence")]),"info",!1,["progress"]),t.tech.high_tech=10,gs(),ms()),t.resource.Knowledge.max>=Zr.tech.quantum_computing.cost.Knowledge()*a&&t.tech.high_tech&&10===t.tech.high_tech&&t.tech.nano&&(Bi(z(e,[z("tech_quantum_computing")]),"info",!1,["progress"]),t.tech.high_tech=11,gs(),ms()),t.resource.Knowledge.max>=Zr.tech[t.race.truepath?"virtual_reality_tp":"virtual_reality"].cost.Knowledge()*a&&t.tech.high_tech&&11===t.tech.high_tech&&t.tech.stanene&&(t.tech.infernite&&t.tech.alpha&&t.tech.alpha>=2||t.race.truepath)&&(Bi(z(e,[z("tech_virtual_reality")]),"info",!1,["progress"]),t.tech.high_tech=12,gs(),ms()),t.race.truepath?(t.resource.Knowledge.max>=Zr.tech.quantium.cost.Knowledge()*a&&t.tech.supercollider&&t.tech.supercollider>=10&&t.tech.enceladus&&t.tech.enceladus>=3&&!t.tech.quantium&&(Bi(z(e,[z("tech_quantium")]),"info",!1,["progress"]),t.tech.quantium=1,t.resource.Quantium.display=!0,gs(),ma()),t.resource.Knowledge.max>=Zr.tech.alien_biotech.cost.Knowledge()*a&&t.tech.genetics&&t.tech.genetics>=8&&t.tech.kuiper&&!t.tech.biotech&&(Bi(z(e,[z("tech_alien_biotech")]),"info",!1,["progress"]),t.tech.biotech=1,gs())):(t.resource.Knowledge.max>=Zr.tech.shields.cost.Knowledge()*a&&t.tech.high_tech&&13===t.tech.high_tech&&(Bi(z(e,[z("tech_shields")]),"info",!1,["progress"]),t.tech.high_tech=14,t.settings.space.neutron=!0,t.settings.space.blackhole=!0,gs(),ms()),t.resource.Knowledge.max>=Zr.tech.ai_core.cost.Knowledge()*a&&t.tech.high_tech&&14===t.tech.high_tech&&t.tech.blackhole&&t.tech.blackhole>=3&&(Bi(z(e,[z("tech_ai_core")]),"info",!1,["progress"]),t.tech.high_tech=15,t.interstellar.citadel={count:0,on:0},gs(),ms()),t.resource.Knowledge.max>=Zr.tech.graphene_processing.cost.Knowledge()*a&&t.tech.ai_core&&2===t.tech.ai_core&&(Bi(z(e,[z("tech_graphene_processing")]),"info",!1,["progress"]),t.tech.ai_core=3,gs()),t.resource.Knowledge.max>=Zr.tech.nanoweave.cost.Knowledge()*a&&t.tech.science&&t.tech.science>=18&&!t.tech.nanoweave&&(Bi(z(e,[z("tech_nanoweave")]),"info",!1,["progress"]),t.tech.nanoweave=1,t.resource.Nanoweave.display=!0,gs(),ma()),t.resource.Knowledge.max>=Zr.tech.orichalcum_analysis.cost.Knowledge()*a&&t.tech.high_tech&&16===t.tech.high_tech&&t.tech.chthonian&&t.tech.chthonian>=3&&(Bi(z(e,[z("tech_orichalcum_analysis")]),"info",!1,["progress"]),Bi(z("tech_orichalcum_analysis_result"),"info",!1,["progress"]),t.tech.high_tech=17,gs(),ms()),t.resource.Knowledge.max>=Zr.tech.infernium_fuel.cost.Knowledge()*a&&t.tech.smelting&&7===t.tech.smelting&&t.tech.hell_ruins&&t.tech.hell_ruins>=4&&(Bi(z(e,[z("tech_infernium_fuel")]),"info",!1,["progress"]),t.tech.smelting=8,Qs(),gs()))}let l=Oi("moldling");if(l>0){let e="trait_infiltrator_thrall",a=di.infiltrator.vars(1)[0]/100*l;l>=.02&&t.resource.Knowledge.max>=Zr.tech.smelting.cost.Knowledge()*a&&ds("smelting",!1)&&!t.tech.smelting&&(Bi(z(e,[z("tech_smelting")]),"info",!1,["progress"]),t.tech.smelting=1,t.city.smelter={count:0,cap:0,Wood:0,Coal:0,Oil:0,Star:0,StarCap:0,Inferno:0,Iron:0,Steel:0,Iridium:0},t.race.steelen&&(t.tech.smelting=2),gs()),l>=.04&&t.resource.Knowledge.max>=Zr.tech.dynamite.cost.Knowledge()*a&&ds("dynamite",!1)&&t.tech.explosives&&1===t.tech.explosives&&(Bi(z(e,[z("tech_dynamite")]),"info",!1,["progress"]),t.tech.explosives=2,gs()),l>=.8&&t.resource.Knowledge.max>=Zr.tech.portland_cement.cost.Knowledge()*a&&ds("portland_cement",!1)&&t.tech.cement&&3===t.tech.cement&&(Bi(z(e,[z("tech_portland_cement")]),"info",!1,["progress"]),t.tech.cement=4,gs()),l>=.12&&t.resource.Knowledge.max>=Zr.tech.oxygen_converter.cost.Knowledge()*a&&ds("oxygen_converter",!1)&&t.tech.smelting&&4===t.tech.smelting&&(Bi(z(e,[z("tech_oxygen_converter")]),"info",!1,["progress"]),t.tech.smelting=5,gs()),l>=.15&&t.resource.Knowledge.max>=Zr.tech.machinery.cost.Knowledge()*a&&ds("machinery",!1)&&t.tech.foundry&&6===t.tech.foundry&&(Bi(z(e,[z("tech_machinery")]),"info",!1,["progress"]),t.tech.foundry=7,gs()),l>=.2&&t.resource.Knowledge.max>=Zr.tech.uranium_storage.cost.Knowledge()*a&&ds("uranium_storage",!1)&&t.tech.uranium&&1===t.tech.uranium&&(Bi(z(e,[z("tech_uranium_storage")]),"info",!1,["progress"]),t.tech.uranium=1,gs()),l>=.25&&t.resource.Knowledge.max>=Zr.tech.synthetic_fur.cost.Knowledge()*a&&ds("synthetic_fur",!1)&&!t.tech.synthetic_fur&&(Bi(z(e,[Zr.tech.synthetic_fur.title()]),"info",!1,["progress"]),t.tech.synthetic_fur=1,gs()),l>=.35&&t.resource.Knowledge.max>=Zr.tech.rover.cost.Knowledge()*a&&ds("rover",!1)&&t.tech.space_explore&&1===t.tech.space_explore&&(Bi(z(e,[z("tech_rover")]),"info",!1,["progress"]),t.tech.space_explore=2,t.settings.space.moon=!0,t.space.moon_base={count:0,on:0,support:0,s_max:0},gs());let r="trait_infiltrator_thrall_alt";l>=.4&&t.resource.Knowledge.max>=Zr.tech.starcharts.cost.Knowledge()*a&&ds("starcharts",!1)&&t.tech.space_explore&&3===t.tech.space_explore&&(Bi(z(r,[z("tech_starcharts")]),"info",!1,["progress"]),t.tech.space_explore=4,gs()),l>=.5&&t.resource.Knowledge.max>=Zr.tech.nano_tubes.cost.Knowledge()*a&&ds("nano_tubes",!1)&&!t.tech.nano&&(Bi(z(r,[z("tech_nano_tubes")]),"info",!1,["progress"]),t.tech.nano=1,t.resource.Nano_Tube.display=!0,gs()),t.race.truepath?(l>=.65&&t.resource.Knowledge.max>=Zr.tech.stanene_tp.cost.Knowledge()*a&&ds("stanene_tp",!1)&&!t.tech.stanene&&(Bi(z(r,[z("tech_stanene")]),"info",!1,["progress"]),t.tech.stanene=1,t.resource.Stanene.display=!0,gs()),l>=.8&&t.resource.Knowledge.max>=Zr.tech.anitgrav_bunk.cost.Knowledge()*a&&ds("anitgrav_bunk",!1)&&t.tech.marines&&1===t.tech.marines&&(Bi(z(r,[z("tech_anitgrav_bunk")]),"info",!1,["progress"]),t.tech.marines=2,gs())):(l>=.65&&t.resource.Knowledge.max>=Zr.tech.stanene.cost.Knowledge()*a&&ds("stanene",!1)&&!t.tech.stanene&&(Bi(z(r,[z("tech_stanene")]),"info",!1,["progress"]),t.tech.stanene=1,t.resource.Stanene.display=!0,gs()),l>=.78&&t.resource.Knowledge.max>=Zr.tech.hydroponics.cost.Knowledge()*a&&ds("hydroponics",!1)&&t.tech.mars&&5===t.tech.mars&&(Bi(z(r,[z("tech_hydroponics")]),"info",!1,["progress"]),t.tech.mars=6,gs()),l>=.92&&t.resource.Knowledge.max>=Zr.tech.orichalcum_panels.cost.Knowledge()*a&&ds("orichalcum_panels",!1)&&t.tech.swarm&&5===t.tech.swarm&&(Bi(z(r,[z("tech_orichalcum_panels")]),"info",!1,["progress"]),t.tech.swarm=6,gs()),l>=1&&t.resource.Knowledge.max>=Zr.tech.cybernetics.cost.Knowledge()*a&&ds("cybernetics",!1)&&t.tech.high_tech&&17===t.tech.high_tech&&(Bi(z(r,[z("tech_cybernetics")]),"info",!1,["progress"]),t.tech.high_tech=18,gs()))}t.race.truepath&&t.tech.tauceti&&3===t.tech.tauceti&&t.space.hasOwnProperty("jump_gate")&&t.tauceti.hasOwnProperty("jump_gate")&&t.space.jump_gate.count>=100&&t.tauceti.jump_gate.count>=100&&(t.tech.tauceti=4,t.resource.Materials.display=!1,t.resource.Bolognium.display=!0,Ht(),at(),gs()),t.race.truepath&&t.tech.tauceti&&!t.race.lone_survivor?5!==t.tech.tauceti||t.tech.plague||0!==Math.rand(0,50)?t.tech.plague&&t.tech.tau_roid&&t.tech.tau_whale&&(1===t.tech.plague&&(t.tech.tau_roid>=4||t.tech.tau_whale>=2)&&0===Math.rand(0,50)?(t.tech.plague=2,t.race.quarantine=1,t.race.qDays=0,Bi(z("tau_plague2",[te(3)]),"info",!1,["progress"])):2===t.tech.plague&&t.tech.tau_roid>=5&&t.tech.tau_whale>=2&&0===Math.rand(0,50)?(t.tech.plague=3,t.race.quarantine=2,t.race.qDays=0,Bi(z("tau_plague3",[te(3),_i[t.race.species].home]),"info",!1,["progress"])):t.tech.isolation?t.tech.plague<5&&0===Math.rand(0,50)&&(t.tech.plague=5,Bi(z("tau_plague5b",[_i[t.race.species].home]),"info",!1,["progress"]),gs()):3===t.tech.plague&&t.tech.disease&&t.tech.disease>=2&&0===Math.rand(0,50)?(t.tech.plague=4,t.race.quarantine=3,t.race.qDays=0,Bi(z("tau_plague5a",[_i[t.race.species].home]),"info",!1,["progress"])):4===t.tech.plague&&t.tech.disease&&t.tech.disease>=3&&0===Math.rand(0,50)&&(t.tech.plague=5,t.race.quarantine=4,t.race.qDays=0,Bi(z("tau_plague5a",[_i[t.race.species].home]),"info",!1,["progress"])),t.race.quarantine&&(t.race.hasOwnProperty("qDays")||(t.race.qDays=0),t.race.qDays++)):(t.tech.plague=1,Bi(z("tau_plague",[te(3)]),"info",!1,["progress"])):t.tech.tau_gas&&t.tech.tau_gas>=4&&!t.tech.plague&&t.race.lone_survivor&&(t.tech.plague=5),t.civic.govern.protest&&t.civic.govern.protest>0&&t.civic.govern.protest--,t.civic.govern.scandal&&t.civic.govern.scandal>0&&t.civic.govern.scandal--;{let e=me("tax_cap"),a=me("tax_cap",!0);t.civic.taxes.tax_rate>e?t.civic.taxes.tax_rate=e:t.civic.taxes.tax_rate0){let e=0;for(let a=0;a3&&(s=t.genes.plasma>=2?s>5?5:s:3),e+=s}t.race.p_mutation=e}!t.tech.whitehole&&t.interstellar.stellar_engine&&t.interstellar.stellar_engine.exotic>=.025?(t.tech.whitehole=1,t.tech.stablized&&delete t.tech.stablized,Bi(z("interstellar_blackhole_unstable"),"danger",!1,["progress"]),gs()):t.interstellar.stellar_engine&&t.interstellar.stellar_engine.exotic>=.025&&t.tech.whitehole&&t.tech.stablized&&(delete t.tech.stablized,gs()),!t.tech.xeno&&t.galaxy.scout_ship&&t.galaxy.scout_ship.on>0&&0===Math.rand(0,10)&&(t.tech.xeno=1,t.galaxy.scout_ship.count--,t.galaxy.scout_ship.on--,t.galaxy.scout_ship.crew--,t.galaxy.scout_ship.mil--,t.resource[t.race.species].amount--,t.civic.garrison.workers--,t.civic.garrison.crew--,Bi(z("galaxy_encounter"),"info",!1,["progress"]),gs()),t.galaxy.scavenger&&t.tech.conflict&&4===t.tech.conflict&&n.scavenger>0&&Math.rand(0,50)<=n.scavenger&&(t.tech.conflict=5,Bi(z("galaxy_scavenger_find"),"info",!1,["progress"]),gs()),t.tech.syndicate||t.race.lone_survivor||!t.tech.outer||0!==Math.rand(0,20)||(Bi(z("outer_syndicate",[te(4)]),"info",!1,["progress"]),t.tech.syndicate=1,t.space.syndicate={}),!t.tech.corrupted_ai&&i.ai_core2&&100===$t()&&(t.tech.corrupted_ai=1,gs()),t.arpa.sequence&&t.arpa.sequence.auto&&t.tech.genetics&&7===t.tech.genetics&&Po(),t.race.orbit_decay&&(t.race.orbit_decayed||$("#infoTimer").html("T-"+(t.race.orbit_decay-t.stats.days)),function(){if(t.race.orbit_decay&&t.stats.hasOwnProperty("days")&&t.stats.days>=t.race.orbit_decay&&!t.race.orbit_decayed){t.race.orbit_decayed=!0,Bi(z("evo_challenge_orbit_decayed_msg",[_i[t.race.species].home]),"info",!1,["progress"]),"magic"===t.race.universe&&(t.city.pylon&&(t.space.pylon={count:Math.ceil(t.city.pylon.count/2)}),t.race.casting&&Object.keys(t.race.casting).forEach((function(e){t.race.casting[0]=0}))),Object.keys(Zr.city).forEach((function(e){t.city.hasOwnProperty(e)&&t.city[e].hasOwnProperty("count")&&(t.race.hooved&&Zr.city[e].cost.hasOwnProperty("Horseshoe")&&(t.race.shoecnt-=Zr.city[e].cost.Horseshoe()*t.city[e].count),t.city[e].count=0,t.city[e].hasOwnProperty("on")&&(t.city[e].on=0))})),t.race.hooved&&t.race.shoecnt<5&&(t.race.shoecnt=5),t.resource.Zen.display&&(t.resource.Zen.display=!1),t.resource.Slave.display&&(t.resource.Slave.display=!1,t.resource.Slave.amount=0,B("slave")),t.race.deconstructor&&Js.forEach((function(e){t.city.nanite_factory[e]=0})),Object.keys(t.resource).forEach((function(e){t.resource[e].hasOwnProperty("trade")&&(t.resource[e].trade=0)})),t.space.red_university={count:0},Object.keys(Zr.space.spc_moon).forEach((function(e){t.space.hasOwnProperty(e)&&t.space[e].hasOwnProperty("count")&&(t.space[e].count=0,t.space[e].hasOwnProperty("on")&&(t.space[e].on=0))})),Object.keys(oa).forEach((function(e){"colonist"!==e&&(t.civic[e].workers=0,t.civic[e].assigned=0)})),["bolognium_ship","scout_ship","corvette_ship","frigate_ship","cruiser_ship","dreadnought","freighter","super_freighter","armed_miner","scavenger"].forEach((function(e){t.galaxy[e]&&(t.galaxy[e].on=0)})),t.portal.transport&&(t.portal.transport.on=0),["forager","farmer","lumberjack","quarry_worker"].forEach((function(e){t.civic[e].display=!1})),t.civic.hunter.display?t.civic.d_job="hunter":t.civic.d_job="unemployed";for(let e of Object.values(t.race.purgatory.city))e.hasOwnProperty("count")&&(e.count=0),e.hasOwnProperty("on")&&(e.on=0);if(t.queue.hasOwnProperty("queue"))for(let e=t.queue.queue.length-1;e>=0;e--){let a=t.queue.queue[e];("city"===a.action||"space"===a.action&&Zr.space.spc_moon[a.type])&&t.queue.queue.splice(e,1)}t.arpa.sequence&&(t.arpa.sequence.on=!1,t.arpa.sequence.boost=!1),t.city.calendar.moon=0,document.getElementById("moon").removeAttribute("class"),$("#moon").addClass("moon wi wi-moon-new"),t.settings.spaceTabs=1,t.settings.space.moon=!1,t.settings.showCity=!1,sc($("#infoTimer")),Ht()}}()),function(){if(t.genes.governor&&t.tech.governor&&t.race.governor&&t.race.governor.g&&t.race.governor.tasks){let e=[0,1,2];t.genes.governor>=2&&(e.push(e.length),D("organizer",0)&&e.push(e.length)),D("organizer",0)&&e.push(e.length),e.forEach((function(e){G[t.race.governor.tasks[`t${e}`]]&&G[t.race.governor.tasks[`t${e}`]].req()&&G[t.race.governor.tasks[`t${e}`]].task()}))}}()}if(!t.race.seeded||t.race.seeded&&t.race.chose){if(0===Math.rand(0,t.event.t)){let e=mo("major");if(e.length>0){let a=e[Math.floor(g(0,e.length))];Bi(uo[a].effect(),"caution",!1,["events","major_events"]),t.event.l=a}t.event.t=999,"pisces"===r&&(t.event.t-=U("pisces")[0])}else t.event.t--;if("protoplasm"!==t.race.species)if(0===Math.rand(0,t.m_event.t)){let e=mo("minor");if(e.length>0){let a=e[Math.floor(g(0,e.length))];Bi(uo[a].effect(),!1,!1,["events","minor_events"]),t.m_event.l=a}t.m_event.t=850,"pisces"===r&&(t.m_event.t-=U("pisces")[1])}else t.m_event.t--;if(t.race.witch_hunter&&t.resource.Sus.amount>=100){let e=300-t.resource.Sus.amount;e<1&&(e=1),0===Math.rand(0,e)&&Bi(uo.witch_hunt_crusade.effect(),"caution",!1,["events","major_events"])}if(t.race.witch_hunter&&t.resource.Sus.amount>=50&&t.civic.scientist.workers>0){let e=250-2*t.resource.Sus.amount;e<50&&(e=50),0===Math.rand(0,e)&&Bi(uo.witch_hunt.effect(),!1,!1,["events","minor_events"])}}11===a.getMonth()&&a.getDate()>=17&&a.getDate()<=24?(t.special.gift[`g${a.getFullYear()}`]=!0,t.tech.santa=1):delete t.tech.santa,Ec("fool")?$("body").hasClass("fool")||($("body").addClass("fool"),ao({fool:!0})):$("body").hasClass("fool")&&($("body").removeClass("fool"),ao()),t.stats.current=Date.now(),t.race.hasOwnProperty("geck")||e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),"protoplasm"!==t.race.species&&(t.stats.days+t.stats.tdays)%1e5==99999&&Bi(z("backup_warning"),"advanced",!0),--Mo<=0&&(Mo=60,Vi("page_view",{page_title:"Game Loop"})),t.settings.pause&&P.s&&Ki("stop"),d.t>0&&(d.t--,t.settings.at--,(t.settings.at<=0||d.t<=0)&&(t.settings.at=0,Ki("stop"),Ki("start")))}()}}),!1)),Ki("start"),jo();var xo=!0,ko=t.arpa.sequence&&t.arpa.sequence.on?t.arpa.sequence.on:0;let qo={1:1.1,2:1.25,3:1.5};var Mo=60;function Po(){if(t.resource.Knowledge.amount>=2e5&&t.resource.Knowledge.amount>=t.resource.Knowledge.max-1e4){t.resource.Knowledge.amount-=2e5;let e=t.genes.synthesis?qo[t.genes.synthesis]:1;t.resource.Genes.amount+=e}}function Oo(e){if(t.tech.high_tech&&t.tech.high_tech>=11){let r=t.resource.Knowledge.max,s=25e4,c=0;for(;r>s;)r-=s,s*=1.1,c++;if(c+=+(r/s).toFixed(2),t.interstellar.citadel){let a=e?t.interstellar.citadel.on:i.citadel;t.tech.high_tech&&t.tech.high_tech>=15&&a>0&&(c*=1+.05*a)}if(t.space.ai_core2){let a=e?t.space.ai_core2.on:i.ai_core2;t.tech.titan_ai_core&&a>0&&(c*=1.25)}if(t.stats.achieve.obsolete&&t.stats.achieve.obsolete.l>=5&&t.prestige.AICore.count>0&&(c*=2-.99**t.prestige.AICore.count),t.race.linked){let e=di.linked.vars()[0]/100*t.resource[t.race.species].amount;e>di.linked.vars()[1]/100&&(e-=di.linked.vars()[1]/100,e/=e+200-di.linked.vars()[1],e+=di.linked.vars()[1]/100),c*=1+e}a=+c.toFixed(3),u=a}var a}function Co(){!1===t.resource.Steel.display&&0===Math.rand(0,1250)&&(t.resource.Steel.display=!0,Ji("Steel",1),Bi(z("steel_sample"),"info",!1,["progress"]))}function jo(){["#resources > .resource",".tab-item > .market-item","#galaxyTrade > .market-item"].forEach((function(e){let t=!1;$(`${e}:visible`).each((function(){t?($(this).addClass("alt"),t=!1):($(this).removeClass("alt"),t=!0)}))}))}function So(e){let a=!(!t.race.elusive&&0!==Math.floor(g(0,3))),r=Oi("satyr");if(r>0&&Math.floor(g(0,100))<=100*r&&(a=!0),!a&&t.civic.foreign[`gov${e}`].spy>0&&(t.civic.foreign[`gov${e}`].spy-=1),a||0!==Math.floor(g(0,4)))Bi(z(a?"event_spy_fail":"event_spy",[te(e)]),"danger",!1,["spy"]);else{Bi(z("event_spy_sellout",[te(e)]),"danger",!1,["spy"]);let a=t.race.mistrustful?5+di.mistrustful.vars()[0]:5;t.civic.foreign[`gov${e}`].hstl+=Math.floor(g(1,a)),t.civic.foreign[`gov${e}`].hstl>100&&(t.civic.foreign[`gov${e}`].hstl=100)}}O.version_check=setInterval((function(){$.ajax({url:"https://pmotschmann.github.io/Evolve/package.json",type:"GET",dataType:"json",success:function(e){e.version&&e.version!=t.version&&!t.beta&&$("#topBar .version > a").html(`${z("update_avail")} v`+t.version+wo)}})}),9e5),Ei("versionLog",function(e){let t=0;for(t=0;t=0;a--){e.append(`

              v${go[a].version}${go[a].hasOwnProperty("revision")?go[a].revision:""}

              ${go[a].date}
              `);for(let t=0;t${go[a].changes[t]}`)}return e}($('
              ')),{wide:!0}),t.race.start_cataclysm&&t.race.start_cataclysm&&(delete t.race.start_cataclysm,Ns())})(); \ No newline at end of file diff --git a/src/main.js b/src/main.js index 29a0ca23db..604c614e8c 100644 --- a/src/main.js +++ b/src/main.js @@ -9705,7 +9705,7 @@ function midLoop(){ checkAchievements(); } - if (global.tech['queue'] && global.queue.display){ + if (global.tech.queue && global.queue.display) { let idx = -1; let c_action = false; let stop = false; @@ -9713,24 +9713,64 @@ function midLoop(){ let time = 0; let spent = { t: {t:0,rt:0}, r: {}, rr: {}, id: {}}; let arpa = false; - for (let i=0; i thisItemTime) { return acc; } + id = parseInt(id, 10); + if (time === thisItemTime && id > i) { return acc; } + if (acc.id === -1 || time < acc.time) { + return { id, time }; + } + return acc; + }, { id: -1 }); + + if (fastestItem.id === -1) { + break; + } + + timeCheck(getAction(fastestItem.id), spent); + queueItemsProcessed.push(fastestItem.id); + } + + time = spent.t.t; } if (struct.action === 'arpa'){