diff --git a/evolve/main.js b/evolve/main.js index 8303e695f..8c3226d6f 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.8",t.revision="a",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:5e4,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:25e3,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:6e4,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.evolution.sexual_reproduction&&t.evolution.sexual_reproduction.count>0&&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.evolution.bilateral_symmetry&&t.evolution.bilateral_symmetry.count>0||t.evolution.poikilohydric&&t.evolution.poikilohydric.count>0||t.evolution.spores&&t.evolution.spores.count>0?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.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)}

        `:""}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.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){a!==t.settings.keyMap[e]||0===t.settings.civTabs||"settings"!==e&&!t.settings[e]||(t.settings.civTabs=bo[e],t.settings.tabLoad||jt(t.settings.civTabs))}))})),$(document).keyup((function(e){let a=(e=e||window.event).key||e.keyCode;Object.keys(y).forEach((function(e){a===t.settings.keyMap[e]&&(y[e]=!1)}))})),$(document).mousemove((function(e){e=e||window.event,Object.keys(t.settings.keyMap).forEach((function(a){switch(t.settings.keyMap[a]){case"Shift":case 16:y[a]=!!e.shiftKey;break;case"Control":case 17:y[a]=!!e.ctrlKey;break;case"Alt":case 18:y[a]=!!e.altKey;break;case"Meta":case 91:y[a]=!!e.metaKey}}))})),function(){sc($("body")),$("html").addClass(t.settings.font),$("body").append(`
        \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.amount0||t.evolution.poikilohydric&&t.evolution.poikilohydric.count>0||t.evolution.spores&&t.evolution.spores.count>0)&&(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].diffi&&(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:{consume:{}}},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.8",t.revision="a",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[s].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:5e4,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:25e3,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:6e4,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.evolution.sexual_reproduction&&t.evolution.sexual_reproduction.count>0&&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.evolution.bilateral_symmetry&&t.evolution.bilateral_symmetry.count>0||t.evolution.poikilohydric&&t.evolution.poikilohydric.count>0||t.evolution.spores&&t.evolution.spores.count>0?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.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(s){if("Custom"===s){if(!e[s]().met)return void(a=!1)}else if("Structs"===s){if(!Fs(e[s]()))return void(a=!1)}else if(t.prestige.hasOwnProperty(s)){let r=s;if("Plasmid"===s&&"antimatter"===t.race.universe&&(s="AntiPlasmid"),t.prestige[s].count=0&&i>t.resource[c].max;if(i>Number(t.resource[c].amount)||o)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)}

              `:""}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.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){a!==t.settings.keyMap[e]||0===t.settings.civTabs||"settings"!==e&&!t.settings[e]||(t.settings.civTabs=bo[e],t.settings.tabLoad||jt(t.settings.civTabs))}))})),$(document).keyup((function(e){let a=(e=e||window.event).key||e.keyCode;Object.keys(y).forEach((function(e){a===t.settings.keyMap[e]&&(y[e]=!1)}))})),$(document).mousemove((function(e){e=e||window.event,Object.keys(t.settings.keyMap).forEach((function(a){switch(t.settings.keyMap[a]){case"Shift":case 16:y[a]=!!e.shiftKey;break;case"Control":case 17:y[a]=!!e.ctrlKey;break;case"Alt":case 18:y[a]=!!e.altKey;break;case"Meta":case 91:y[a]=!!e.metaKey}}))})),function(){sc($("body")),$("html").addClass(t.settings.font),$("body").append(`
              \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 {{ 'keep_resource_buffer' | 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","17"].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.amount0||t.evolution.poikilohydric&&t.evolution.poikilohydric.count>0||t.evolution.spores&&t.evolution.spores.count>0)&&(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].diffi&&(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/actions.js b/src/actions.js index 48d5a04e5..6b5324717 100644 --- a/src/actions.js +++ b/src/actions.js @@ -1,4 +1,4 @@ -import { global, save, seededRandom, webWorker, keyMultiplier, keyMap, srSpeak, sizeApproximation, p_on, support_on, gal_on, quantum_level, tmp_vars, setupStats } from './vars.js'; +import { global, save, seededRandom, webWorker, keyMultiplier, keyMap, srSpeak, sizeApproximation, breakdown, p_on, support_on, gal_on, quantum_level, tmp_vars, setupStats } from './vars.js'; import { loc } from './locale.js'; import { timeCheck, timeFormat, vBind, popover, clearPopper, flib, tagEvent, clearElement, costMultiplier, darkEffect, genCivName, powerModifier, powerCostMod, calcPrestige, adjustCosts, modRes, messageQueue, buildQueue, format_emblem, shrineBonusActive, calc_mastery, calcPillar, calcGenomeScore, getShrineBonus, eventActive, easterEgg, getHalloween, trickOrTreat, deepClone, hoovedRename } from './functions.js'; import { unlockAchieve, challengeIcon, alevel, universeAffix } from './achieve.js'; @@ -6690,9 +6690,14 @@ export function checkCosts(costs){ if (testCost === 0){ return; } + if(global.settings.keepResourceBuffer){ + for (let consumer in breakdown.p.consume[res]){ + testCost += Math.max(0, -(breakdown.p.consume[res][consumer])) + } + } let f_res = res === 'Species' ? global.race.species : res; let fail_max = global.resource[f_res].max >= 0 && testCost > global.resource[f_res].max ? true : false; - if (testCost > Number(global.resource[f_res].amount) + global.resource[f_res].diff || fail_max){ + if (testCost > Number(global.resource[f_res].amount) || fail_max){ test = false; return; } diff --git a/src/arpa.js b/src/arpa.js index e929458f0..6b399e4d8 100644 --- a/src/arpa.js +++ b/src/arpa.js @@ -1,4 +1,4 @@ -import { global, keyMultiplier, sizeApproximation, srSpeak } from './vars.js'; +import { global, keyMultiplier, breakdown, sizeApproximation, srSpeak } from './vars.js'; import { clearElement, popover, clearPopper, flib, fibonacci, eventActive, timeFormat, vBind, messageQueue, adjustCosts, calcQueueMax, calcRQueueMax, buildQueue, calcPrestige, calc_mastery, darkEffect, easterEgg, getTraitDesc, removeFromQueue, arpaTimeCheck, deepClone } from './functions.js'; import { actions, updateQueueNames, drawTech, drawCity, addAction, removeAction, wardenLabel, checkCosts } from './actions.js'; import { races, traits, cleanAddTrait, cleanRemoveTrait, traitSkin, fathomCheck } from './races.js'; @@ -1595,6 +1595,11 @@ function checkArpaCosts(costs){ var test = true; Object.keys(costs).forEach(function (res){ var testCost = Number(costs[res]()) / 100; + if(global.settings.keepResourceBuffer){ + for (let consumer in breakdown.p.consume[res]){ + testCost += Math.max(0, -(breakdown.p.consume[res][consumer])) + } + } if (testCost > Number(global['resource'][res].amount)) { test = false; return false; diff --git a/src/index.js b/src/index.js index f16ebb981..4e3fd647d 100644 --- a/src/index.js +++ b/src/index.js @@ -201,7 +201,7 @@ export function mainVue(){ } }); - ['1','3','4','5','6','7','8','9','10','11','12','13','14','15','16'].forEach(function(k){ + ['1','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17'].forEach(function(k){ popover(`settings${k}`, function(){ return loc(`settings${k}`); }, @@ -1303,6 +1303,7 @@ export function index(){ {{ 'q_key' | label }} {{ 'q_any' | label }} {{ 'q_any_res' | label }} + {{ 'keep_resource_buffer' | label }} {{ 's_pack_on' | label }} {{ 'expose' | label }} {{ 'tabLoad' | label }} diff --git a/src/vars.js b/src/vars.js index 4ec3b0348..837fe955e 100644 --- a/src/vars.js +++ b/src/vars.js @@ -31,7 +31,9 @@ export var global = { export var tmp_vars = {}; export var breakdown = { c: {}, - p: {} + p: { + consume: {} + } }; export var power_generated = {}; export var p_on = {}; @@ -1791,6 +1793,10 @@ if (global.city['foundry'] && !global.city.foundry['Quantium']){ global.city.foundry['Quantium'] = 0; } +if (!global.settings['keepResourceBuffer']){ + global.settings['keepResourceBuffer'] = false; +} + if (!global.settings['arpa']){ global.settings['arpa'] = { arpaTabs: 0, diff --git a/strings/strings.json b/strings/strings.json index b6546e347..397e0ce71 100644 --- a/strings/strings.json +++ b/strings/strings.json @@ -118,6 +118,8 @@ "settings14": "Do not enforce research queue order", "settings15": "How the Building Queue manages merging similar items in the queue. It can merge similar items if they're nearby each other in the queue, regardless of where they are in the queue, or never merge them at all.", "settings16": "Enable Experimental Touch Device enhancements", + "settings17": "Only allow building structures when enough resources to pay fuel/crafting/trade costs will be left over.", + "keep_resource_buffer": "Keep Resource Buffer", "enable_reset": "Enable Reset Buttons", "reset_warn": "Warning: This completely resets all your progress and cannot be undone. This is NOT a prestige mechanic; you are wiping out your game data. Keep this button disabled.", "reset_soft": "Soft Reset Game", diff --git a/wiki/wiki.js b/wiki/wiki.js index bd8d55646..24dbd681a 100644 --- a/wiki/wiki.js +++ b/wiki/wiki.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:{}},i={},s={},n={},c={},o={},l={},_=0,d={t:0};var p={},u={},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:f()}else f()}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 v(){["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.8",t.revision="a",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),S(!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=[]),v(),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 i=Number(r.substring(1,5));(i=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 k(){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 x={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 i=0,s="",n=e<0;return n&&(e*=-1),e<=9999?i=+e.toFixed(a):e<1e6?(s=x[t.settings.affix][0],i=r?+(e/1e3).toFixed(1):Math.floor(e/100)/10):e<1e9?(s=x[t.settings.affix][1],i=r?+(e/1e6).toFixed(1):Math.floor(e/1e4)/100):e<1e12?(s=x[t.settings.affix][2],i=r?+(e/1e9).toFixed(1):Math.floor(e/1e7)/100):e<1e15?(s=x[t.settings.affix][3],i=r?+(e/1e12).toFixed(1):Math.floor(e/1e10)/100):e<1e18?(s=x[t.settings.affix][4],i=r?+(e/1e15).toFixed(1):Math.floor(e/1e13)/100):e<1e21?(s=x[t.settings.affix][5],i=r?+(e/1e18).toFixed(1):Math.floor(e/1e16)/100):e<1e24?(s=x[t.settings.affix][6],i=r?+(e/1e21).toFixed(1):Math.floor(e/1e19)/100):(s=x[t.settings.affix][7],i=r?+(e/1e24).toFixed(1):Math.floor(e/1e22)/100),i>=100&&(i=+i.toFixed(1)),n&&(i*=-1),i+s}function P(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(){k()})),window.soft_reset=function(a){try{a=a&&"replicator"===a?"replicator":"soft",gtag("event","reset",{end:a})}catch(e){}a||M();let r=!!t.race.hasOwnProperty("srace")&&t.race.srace,i=t.race.hasOwnProperty("geck")?t.race.geck:0;t.race.hasOwnProperty("gecked")&&(i+=t.race.gecked,t.stats.geck-=t.race.gecked);let s={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};i>0&&(s.geck=i),r&&(s.srace=r),t.race.bigbang&&(s.bigbang=!0),t.race.gods&&(s.gods=t.race.gods),t.race.old_gods&&(s.old_gods=t.race.old_gods),t.race.rapid_mutation&&t.race.rapid_mutation>0&&(s.rapid_mutation=t.race.rapid_mutation),t.race.ancient_ruins&&t.race.ancient_ruins>0&&(s.ancient_ruins=t.race.ancient_ruins),t.race.bigbang&&(s.universe="bigbang"),t.race.hasOwnProperty("corruption")&&(s.corruption=t.race.corruption),t.race=s;let n=t.city.calendar.orbit,c=t.city.biome,o=t.city.ptrait,l=t.city.geology;t.city={calendar:{day:0,year:0,weather:2,temp:1,moon:0,wind:0,orbit:n},biome:c,ptrait:o,geology:l},t.tech.theology&&t.tech.theology>=1?t.tech={theology:1}:t.tech={},C(),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 j={w:!1,s:!1,mt:250},O={};function M(){m.forEach((function(e){"achievements"!==e&&(t.lastMsg[e]=[])}))}function S(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 C(){j.w&&j.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,S(!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 z;function F(e,a){let r=z[e];if(!r)return t.settings.expose&&(console.error(`string ${e} not found`),console.log(z)),e;if(a)if(a instanceof Array){for(let i=0;i{r=e})),"en-US"!=a){let e;try{$.getJSON(`strings/strings.${a}.json`,(t=>{e=t}))}catch(e){console.error(e,e.stack)}const i=r.length;e&&Object.assign(r,e),r.length!=i&&t.settings.expose&&console.error(`string.${a}.json has extra keys.`)}let i=e.getItem("string_pack")||!1;if(i&&t.settings.sPackOn){let e;try{e=JSON.parse(LZString.decompressFromUTF16(i))}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}),z=r}(t.settings.locale);const A={soldier:{name:F("governor_soldier"),desc:F("governor_soldier_desc"),title:[F("governor_soldier_t1"),F("governor_soldier_t2"),F("governor_soldier_t3")],traits:{tactician:1,militant:1}},criminal:{name:F("governor_criminal"),desc:F("governor_criminal_desc"),title:[F("governor_criminal_t1"),F("governor_criminal_t2"),{m:F("governor_criminal_t3m"),f:F("governor_criminal_t3f")}],traits:{noquestions:1,racketeer:1}},entrepreneur:{name:F("governor_entrepreneur"),desc:F("governor_entrepreneur_desc"),title:[F("governor_entrepreneur_t1"),F("governor_entrepreneur_t2"),{m:F("governor_entrepreneur_t3m"),f:F("governor_entrepreneur_t3f")}],traits:{dealmaker:1,risktaker:1}},educator:{name:F("governor_educator"),desc:F("governor_educator_desc"),title:[F("governor_educator_t1"),F("governor_educator_t2"),F("governor_educator_t3")],traits:{teacher:1,theorist:1}},spiritual:{name:F("governor_spiritual"),desc:F("governor_spiritual_desc"),title:[F("governor_spiritual_t1"),F("governor_spiritual_t2"),F("governor_spiritual_t3")],traits:{inspirational:1,pious:1}},bluecollar:{name:F("governor_bluecollar"),desc:F("governor_bluecollar_desc"),title:[{m:F("governor_bluecollar_t1m"),f:F("governor_bluecollar_t1f")},F("governor_bluecollar_t2"),{m:F("governor_bluecollar_t3m"),f:F("governor_bluecollar_t3f")}],traits:{pragmatist:1,dirty_jobs:1}},noble:{name:F("governor_noble"),desc:F("governor_noble_desc"),title:[{m:F("governor_noble_t1m"),f:F("governor_noble_t1f")},{m:F("governor_noble_t2m"),f:F("governor_noble_t2f")},{m:F("governor_noble_t3m"),f:F("governor_noble_t3f")},{m:F("governor_noble_t4m"),f:F("governor_noble_t4f")}],traits:{extravagant:1,aristocrat:1}},media:{name:F("governor_media"),desc:F("governor_media_desc"),title:[F("governor_media_t1"),{m:F("governor_media_t2m"),f:F("governor_media_t2f")},F("governor_media_t3")],traits:{gaslighter:1,muckraker:1}},sports:{name:F("governor_sports"),desc:F("governor_sports_desc"),title:[F("governor_sports_t1"),F("governor_sports_t2"),F("governor_sports_t3")],traits:{athleticism:1,nopain:1}},bureaucrat:{name:F("governor_bureaucrat"),desc:F("governor_bureaucrat_desc"),title:[F("governor_bureaucrat_t1"),{m:F("governor_bureaucrat_t2m"),f:F("governor_bureaucrat_t2f")},F("governor_bureaucrat_t3")],traits:{organizer:1}}},I={tactician:{name:F("gov_trait_tactician"),effect(){return F("gov_trait_tactician_effect",[$(this)[0].vars()[0]])},vars:()=>[25]},militant:{name:F("gov_trait_militant"),effect(){return F("gov_trait_militant_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[25,10]},noquestions:{name:F("gov_trait_noquestions"),effect(){return F("gov_trait_noquestions_effect",[$(this)[0].vars()[0]])},vars:()=>[.005]},racketeer:{name:F("gov_trait_racketeer"),effect(){return F("gov_trait_racketeer_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[20,35]},dealmaker:{name:F("gov_trait_dealmaker"),effect(){return F("gov_trait_dealmaker_effect",[$(this)[0].vars()[0]])},vars:()=>[125]},risktaker:{name:F("gov_trait_risktaker"),effect(){return F("gov_trait_risktaker_effect",[$(this)[0].vars()[0]])},vars:()=>[12]},teacher:{name:F("gov_trait_teacher"),effect(){return F("gov_trait_teacher_effect",[$(this)[0].vars()[0]])},vars:()=>[6]},theorist:{name:F("gov_trait_theorist"),effect(){return F("gov_trait_theorist_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[50,4]},inspirational:{name:F("gov_trait_inspirational"),effect(){return F("gov_trait_inspirational_effect",[$(this)[0].vars()[0]])},vars:()=>[20]},pious:{name:F("gov_trait_pious"),effect(){let e=$(this)[0].vars()[1],a=t.tech.monument&&t.tech.monument>=3&&s.s_gate?3:1;return e=("corpocracy"===t.civic.govern.type?2*e:e)*a,F("gov_trait_pious_effect",[$(this)[0].vars()[0],e])},vars:()=>[10,5]},pragmatist:{name:F("gov_trait_pragmatist"),effect(){return F("gov_trait_pragmatist_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[50,2]},dirty_jobs:{name:F("gov_trait_dirty_jobs"),effect(){return F("gov_trait_dirty_jobs_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars:()=>[.015,1,10]},extravagant:{name:F("gov_trait_extravagant"),effect(){return F("gov_trait_extravagant_effect",[$(this)[0].vars()[0],ui("large",!0),$(this)[0].vars()[1],$(this)[0].vars()[2]+5])},vars:()=>[10,1.25,1]},aristocrat:{name:F("gov_trait_aristocrat"),effect(){return F("gov_trait_aristocrat_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars:()=>[50,20,10]},gaslighter:{name:F("gov_trait_gaslighter"),effect(){return F("gov_trait_gaslighter_effect",[$(this)[0].vars()[0],di(),$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars:()=>[1,1,.5]},muckraker:{name:F("gov_trait_muckraker"),effect(){return F("gov_trait_muckraker_effect",[$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars:()=>[8,12,3]},athleticism:{name:F("gov_trait_athleticism"),effect(){return F("gov_trait_athleticism_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2],di()])},vars:()=>[1.5,2,4]},nopain:{name:F("gov_trait_nopain"),effect(){return F("gov_trait_nopain_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[50,10]},organizer:{name:F("gov_trait_organizer"),effect(){return F("gov_trait_organizer_effect",[$(this)[0].vars()[0]])},vars:()=>[t.genes.governor&&t.genes.governor>=2?2:1]}},T={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 L(e){let a=[],r=Di[t.race.species].type,i=Object.keys(A),s=JSON.parse(JSON.stringify(T[r]));e=e||i.length;for(let t=0;t');$("#r_govern1").append(e);let a=$('
              ');e.append(a);let r=$("
              ");r.append($(`
              ${F("governor_office",[t.race.governor.g.n])}
              `)),r.append($(`
              ${F("governor_background")}: ${A[t.race.governor.g.bg].name}
              `)),a.append(r),a.append($(`
              ${F("governor_fire")}
              `));let i=[0,1,2];t.genes.governor&&t.genes.governor>=2&&(i.push(i.length),D("organizer",0)&&i.push(i.length)),D("organizer",0)&&i.push(i.length),i.forEach((function(t){let a=`{{ 'none' | label }}`;Object.keys(G).forEach((function(e){G[e].req()&&(a+=`{{ '${e}' | label }}`)})),e.append(`
              ${F("gov_task",[t+1])}\n \n ${a}\n
              `)})),t.race.governor.hasOwnProperty("config")||(t.race.governor.config={});let s=$('
              ');e.append(s);{t.race.governor.config.hasOwnProperty("storage")||(t.race.governor.config.storage={crt:1e3,cnt:1e3});let e=$(`
              ${F("gov_task_storage")}
              `);s.append(e);let a=$('
              ');e.append(a);let r=t.race.kindling_kindred||t.race.smoldering?t.race.smoldering?"Chrysotile":"Stone":"Plywood",i="Steel";a.append($(`${F("gov_task_storage_reserve",[t.resource[r].name])}`)),a.append($(`${F("gov_task_storage_reserve",[t.resource[i].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=$(`
              ${F("gov_task_bal_storage")}
              ${F("advanced")}
              `);s.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=$(`
              ${F("gov_task_merc")}
              `);s.append(e);let a=$('
              ');e.append(a),a.append($(`${F("gov_task_merc_buffer")}`)),a.append($(`${F("gov_task_merc_reserve")}`))}{t.race.governor.config.hasOwnProperty("spy")||(t.race.governor.config.spy={reserve:100});let e=$(`
              ${F("gov_task_spy")}
              `);s.append(e);let a=$('
              ');e.append(a),a.append($(`${F("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=$(`
              ${F("gov_task_spyop")}
              `);s.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

              ${F("gov_task_spyop_priority",[X(a.substring(3))])}

              \n
                \n `);let i=$(`#spyopConfig${a}`);t.race.governor.config.spyop[a].forEach((function(e){i.append(`\n
              • ${F("civics_spy_"+e)}
              • \n `)}))}}))}{t.race.governor.config.hasOwnProperty("tax")||(t.race.governor.config.tax={min:20});let e=$(`
                ${F("gov_task_tax")}
                `);s.append(e);let a=$('
                ');e.append(a),a.append($(`${F("gov_task_tax_min")}`))}{t.race.governor.config.hasOwnProperty("slave")||(t.race.governor.config.slave={reserve:100});let e=$(`
                ${F("gov_task_slave")}
                `);s.append(e);let a=$('
                ');e.append(a),a.append($(`${F("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=$(`
                ${F("gov_task_trash")}
                `);s.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=$(`
                ${F("gov_task_replicate")}
                `);s.append(e);let a=$('
                ');e.append(a),a.append($(`
                ${F("gov_task_replicate_auto")}
                `)),a.append($(`${F("gov_task_replicate_pmax")}`)),a.append($(`${F("gov_task_replicate_buff")}`));let r=$('
                ');e.append(r),r.append($(`
                ${F("gov_task_replicate_que")}
                `)),r.append($(`
                ${F("gov_task_replicate_neg")}
                `)),r.append($(`
                ${F("gov_task_replicate_cap")}
                `))}zs({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,$s("govtask",{task:e}),zs({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=L(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,hi(!1,["city-amphitheatre","city-apartment"]),fs(),ys(),E())},fireText(){let e=(10+(t.race.governor.hasOwnProperty("f")?t.race.governor.f:0))**2-50;return`
                ${F("governor_fire")}
                ${e} ${F("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=>F(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():F(`gov_task_${e}`)}}),_s("govOffice",(function(){let e="";return Object.keys(A[t.race.governor.g.bg].traits).forEach((function(t){e+=(I[t].hasOwnProperty("effect")?I[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,E()}})}(e)}))}():function(){let e=$('
                ');$("#r_govern1").append(e),t.race.hasOwnProperty("governor")&&t.race.governor.hasOwnProperty("candidates")||(t.race.governor={candidates:L(10)}),e.append($(`
                ${F("governor_candidate")}${F("governor_background")}
                `));for(let a=0;a${r.t} ${r.n}${A[r.bg].name}
                `))}zs({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"},hi(!1,["city-amphitheatre","city-apartment"]),fs(),ys(),E(),$s("governor",{appoint:t.race.governor.g.bg})}}}}),t.race.governor.candidates.forEach((function(e){_s(`candidates-${e.bg}`,(function(){let t="";return Object.keys(A[e.bg].traits).forEach((function(e){t+=(I[e].hasOwnProperty("effect")?I[e].effect():"")+" "})),t}),{elm:`#candidates .${e.bg} .bg`})}))}())}function K(){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"))&&!!A[t.race.governor.g.bg].traits[e]&&I[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=pe("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);)pe("adj_tax","sub");else t.city.morale.potential>=t.city.morale.cap+e&&t.civic.taxes.tax_ratet.race.governor.config.tax.min&&pe("adj_tax","sub")}}},storage:{name:F("gov_task_storage"),req:()=>!!(Rr("storage_yard")&&t.tech.container&&t.resource.Crates.display),task(){if($(this)[0].req()){if(t.resource.Crates.amountr&&cr("crate",Math.floor((t.resource[e].amount-r)/a))}if(Rr("warehouse")&&t.resource.Containers.display&&t.resource.Containers.amounta&&cr("container",Math.floor((t.resource.Steel.amount-a)/e))}}}},bal_storage:{name:F("gov_task_bal_storage"),req:()=>!!(Rr("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,i=r,s=0,n=Object.keys(t.resource).slice().reverse();n.forEach((function(a){t.resource[a].display&&t.resource[a].stackable?(e+=t.resource[a].crates,r+=t.resource[a].containers,s++):(t.resource[a].crates=0,t.resource[a].containers=0)}));let c=Math.floor(e/s),o=Math.floor(r/s),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")){s--;{let r=Math.floor(c*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(o*l[a].m);l[a].hasOwnProperty("cap")&&e>l[a].cap&&(e=l[a].cap),t.resource[a].containers=e,r-=e}}else s+=l[a].m-1})),c=0!==s?Math.floor(e/s):0,o=0!==s?Math.floor(r/s):0,e-=Math.floor(c*s),r-=Math.floor(o*s),n.forEach((function(a){if((!l[a]||!l[a].hasOwnProperty("cap"))&&(!t.race.artifical||"Food"!==a)&&t.resource[a].display&&t.resource[a].stackable){let i=l[a]?l[a].m:1,s=Math.floor(c>0?c*i:0);if(t.resource[a].crates=s,t.resource.Containers.display){let e=Math.floor(o>0?o*i:0);t.resource[a].containers=e}if(e>0&&i>=1){let r=Math.ceil(i/2);e0&&i>=1){let e=Math.ceil(i/2);r0&&(e>0||r>0);)_--,n.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,s&&(t.resource.Crates.max-=a,t.resource.Containers.max-=i)}}},assemble:{name:F("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&&Sr.city.assembly.action()}},clone:{name:F("gov_task_clone"),req:()=>!!t.tech.cloning,task(){$(this)[0].req()&&t.resource[t.race.species].max>t.resource[t.race.species].amount&&Sr.tauceti.tau_home.cloning_facility.action()}},merc:{name:F("gov_task_merc"),req:()=>!(!Rr("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>=pe("m_cost")&&(t.resource.Money.amount+t.resource.Money.diff>=e||t.resource.Money.diff>=pe("m_cost"));)pe("m_buy")}}},spy:{name:F("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)&&pe("t_spy",r)}}}},spyop:{name:F("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 pe("s_influence",e),!1;break;case"sabotage":if(t.civic.foreign[`gov${e}`].mil>50)return pe("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 pe("s_incite",e),!1}return!0}))}))}}},slave:{name:F("gov_task_slave"),req:()=>!(t.race.orbit_decayed||!Rr("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&&Sr.city.slave_market.action()}},sacrifice:{name:F("gov_task_sacrifice"),req:()=>!!(Rr("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)&&Sr.city.s_alter.action()}},horseshoe:{name:()=>F(`city_${mn(!0)}`,[mn(!1)]),req:()=>!!t.race.hooved,task(){let e=Sr.city.horseshoe.cost;if($(this)[0].req()&&si(e)){e=Rs(Sr.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)&&Sr.city.horseshoe.action()}}},trash:{name:F("gov_task_trash"),req:()=>!!(t.interstellar.mass_ejector&&t.interstellar.mass_ejector.count>=1),task(){let e=function(e){return"magic"===t.race.universe?Aa[e]:["Elerium","Infernite"].includes(e)?10*Aa[e]:Aa[e]},a=1e3*s.mass_ejector;Object.keys(Aa).sort(((t,a)=>e(t)0&&(s=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+i-s>=.999*t.resource[e].max-1){let r=t.resource[e].amount+i-s>=.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*s.mass_ejector-a}},mech:{name:F("gov_task_mech"),req:()=>!!(t.stats.achieve.hasOwnProperty("corrupted")&&t.stats.achieve.corrupted.l>0&&("prtl_spire","mechbay",Lt(ca,"prtl_spire","mechbay"))&&t.portal.hasOwnProperty("mechbay")),task(){if($(this)[0].req()){let e="large",a=ya(e,!1),r=a.c,i=a.s,s=wa(e),n={type:{}};["small","medium","large","titan","collector"].forEach((function(e){n.type[e]=0,n[e]={chassis:{},weapon:{},equip:{}},["hover","spider","wheel","tread","biped","quad"].forEach((function(t){n[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){n[e].weapon[t]=0})),["shields","flare","seals","grapple","sonar","ablative","radiator","infrared","coolant","stabilizer"].forEach((function(t){n[e].equip[t]=0}))})),t.portal.mechbay.mechs.forEach((function(e){n.type[e.size]++,n[e.size].chassis[e.chassis]++,e.hardpoint.forEach((function(t){n[e.size].weapon[t]++})),e.equip.forEach((function(t){n[e.size].equip[t]++}))})),n.type.large>=6&&n.type.small<12||n.type.large>=12&&n.type.titan>=2&&n.type.small<24?(e="small",a=ya(e,!1),r=a.c,i=a.s,s=wa(e)):n.type.large>=6&&n.type.medium<12?(e="medium",a=ya(e,!1),r=a.c,i=a.s,s=wa(e)):n.type.large>=12&&n.type.titan<2&&(a=ya("titan",!1),a.c<=t.portal.purifier.sup_max&&(e="titan",r=a.c,i=a.s,s=wa(e)));let c=t.portal.mechbay.max-t.portal.mechbay.bay;if(c=3){if(t.queue.queue.some((e=>["portal-purifier","portal-port","portal-base_camp","portal-mechbay","portal-waygate"].includes(e.id))))return;for(let s=0;st.portal.purifier.sup_max&&(l=t.portal.purifier.sup_max),l>=r&&t.resource.Soul_Gem.amount+o>=i){if(t.resource.Soul_Gem.amount+=o,t.resource.Soul_Gem.amount-=i,t.portal.purifier.supply=l,t.portal.purifier.supply-=r,t.portal.mechbay.mechs[s].infernal=!0,"small"===c.size&&0===c.equip.length)t.portal.mechbay.mechs[s].equip.push("special");else if("medium"===c.size&&1===c.equip.length||"large"===c.size&&2===c.equip.length||"titan"===c.size&&c.equip.length<5){let a="???";Object.keys(n[e].equip).forEach((function(t){("???"===a||n[e].equip[t]=r&&c>=s&&t.resource.Soul_Gem.amount>=i){let a=99,c="hover";Object.keys(n[e].chassis).forEach((function(t){n[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 N(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 R(){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 H(){j.w&&j.w.terminate(),M(),$s("reset",{end:"descension"}),Pn("squished",!0),Pn(`extinct_${t.race.species}`),t.race.witch_hunter&&"magic"===t.race.universe?Pn("nightmare"):Pn("corrupted"),"angelic"===Di[t.race.species].type&&jn("twisted"),t.race.junker&&"junker"===t.race.species&&jn("the_misery"),!t.race.modified&&t.race.junker&&"junker"===t.race.species&&jn("garbage_pie"),t.race.cataclysm&&jn("finish_line"),t.race.ooze&&"sludge"===t.race.species&&jn("slime_lord");let a=Ns("descend");t.prestige.Artifact.count+=a.artifact,t.stats.artifact+=a.artifact;let r=qn();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 i=t.race.species,s=t.race.gods,n=t.city.calendar.orbit,c=t.city.biome,o=t.city.ptrait,l=t.city.geology;t.stats.descend++,sn(),Cn();let _=!!t.race.hasOwnProperty("srace")&&t.race.srace;t.race={species:"protoplasm",gods:i,old_gods:s,universe:t.race.universe,seeded:!1,seed:Math.floor(g(1e4)),corruption:5,ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended},_&&(t.race.srace=_),U({orbit:n,biome:c,ptrait:o,geology:l}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}function U(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},C(),t.new=!0,t.seed=Math.rand(0,1e4)}function V(){let e=qn();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&&Pn("overlord","m"===e,Sn(),"l"),t.stats.womling.friend[e]>0&&t.stats.womling.lord[e]>0&&t.stats.womling.god[e]>0&&Pn("overlord","m"===e,Sn(),e)}function W(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),zs({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=$(`
                ${F("civics_government_type")} {{ type | govern }}
                `);a.append(r);var i=$("
                ");a.append(i);var s=$('');i.append(s);var n={template:''};zs({el:"#govType",data:t.civic.govern,filters:{govern:e=>F(`govern_${e}`),set:e=>F("anarchy"===e?"civics_set_gov":"civics_revolution")},methods:{trigModal(){this.$buefy.modal.open({parent:this,component:n});var e=setInterval((function(){$("#modalBox").length>0&&(clearInterval(e),function(){$("#modalBox").append($(`

                ${F("civics_government_type")}

                `));let e=Js(6,10);e.length>0&&$("#modalBoxTitle").append(e);let a=Zs(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($(``))),zs({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+Ki.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-Ki.lawless.vars()[0])));let i=as("tuskin");i>0&&(r=Math.round(r/(100-Ki.lawless.vars(1)[0]*i)));let s=D("aristocrat",0);s&&(r=Math.round(r*(1-s/100))),t.civic.govern.rev=r+t.civic.govern.fr,a&&Jr(),zs({el:"#govModal"},"destroy"),$(".modal-background").click(),ds()}}}}),_s("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"),$(`
                ${te(a)}
                ${Y()[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?F("civics_force_rev_desc"):F("civics_force_rev_desc2"),vis:()=>!!t.tech.govern}}),_s("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"),$(`
                ${te(t.civic.govern.type)}
                ${Y()[e]}
                `)})),_s("govTypeChange",(function(){return t.civic.govern.rev>0?F("civics_change_desc",[t.civic.govern.rev]):F("civics_change_desc2")}),{elm:"#govType .change"})}($("#r_govern0")),function(e){var a=$('
                ');e.append(a);var r=$(`

                ${F("civics_tax_rates")}

                `);a.append(r);var i=$(''),s=$('«'),n=$('»');a.append(s),a.append(i),a.append(n),zs({el:"#tax_rates",data:t.civic.taxes,filters:{tax_level(e){let a=Js(11,14),r=Zs(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(){de("add")},sub(){de("sub")}}}),_s("taxRateLabel",(function(){return F("civics_tax_rates_desc")}),{classes:"has-background-light has-text-dark"})}($("#r_govern0"));var i=$('
                ');$("#r_govern0").append(i),E()}}function Q(){if(J(),t.settings.tabLoad||2===t.settings.civTabs&&3===t.settings.govTabs){var a=$('
                ');$("#military").append(a),$("#military").append($('
                ')),me(a,!0),function(){if(t.race.sludge)return!1;if(0===$("#mad").length){let i="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name");var a=$('
                ');$("#military").append(a);var r=$('
                ');a.append(r),r.append($(`
                ${F("civics_mad_reset_desc",[i])}
                `));let s=!(!t.race.hrt||!["wolven","vulpine"].includes(t.race.hrt));r.append($(`
                `)),r.append($(`
                `)),t.civic.mad.armed||($("#mad").addClass("armed"),$("#mad .arm").html(F(s?"civics_mad_disarm_grenades":"civics_mad_disarm_missiles"))),zs({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))),M(),$s("reset",{end:"mad"});let a=t.race.species,r=t.race.gods,i=t.city.calendar.orbit,s=t.city.biome,n=t.city.ptrait,c=t.city.geology,o=Ns("mad");t.stats.mad++,sn(),"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),Pn("apocalypse"),Pn("squished",!0),Pn(`extinct_${a}`),"anarchy"===t.civic.govern.type&&Pn("anarchist"),"hellscape"===t.city.biome&&"demonic"!==Di[t.race.species].type&&jn("take_no_advice"),t.race.truepath&&Pn("ashanddust"),Cn();let l=!!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:a,old_gods:r,rapid_mutation:1,ancient_ruins:1,universe:t.race.universe,seeded:!1,ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended},_>0&&(t.race.corruption=_),l&&(t.race.srace=l),U({orbit:i,biome:s,ptrait:n,geology:c}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}}()}),4e3)}},arm(){t.civic.mad.armed?($("#mad .arm").html(F(s?"civics_mad_disarm_grenades":"civics_mad_disarm_missiles")),t.civic.mad.armed=!1,$("#mad").addClass("armed")):($("#mad .arm").html(F(s?"civics_mad_arm_grenades":"civics_mad_arm_missiles")),t.civic.mad.armed=!0,$("#mad").removeClass("armed"))}}}),["mdarm","mdlaunch"].forEach((function(e){_s(`mad${e}`,(function(){return"{{ label() }}"}),{elm:`#mad .${e}`,in:function(a){zs({el:`#${a.id} > span`,data:{test:"val"},methods:{label(){switch(e){case"mdarm":return t.tech.world_control&&!t.race.truepath?F("civics_mad_missiles_world_control_desc"):F(s?"civics_mad_missiles_desc_easter":"civics_mad_missiles_desc");case"mdlaunch":{let e=Ns("mad"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name");return F("civics_mad_missiles_warning",[e.plasmid,a])}}}}})},out:function(e){zs({el:`#${e.id} > span`},"destroy")}})}))}}()}}function J(){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 Z(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 X(e){if(void 0===t.civic.foreign[`gov${e}`].name){let a=qs();t.civic.foreign[`gov${e}`].name={s0:a.s0,s1:a.s1}}return F(`civics_gov${t.civic.foreign[`gov${e}`].name.s0}`,[t.civic.foreign[`gov${e}`].name.s1])}const Y=function(){return{anarchy:F("govern_anarchy_effect"),autocracy:F("govern_autocracy_effect",ee.autocracy()),democracy:F("govern_democracy_effect",ee.democracy()),oligarchy:t.tech.high_tech&&t.tech.high_tech>=12?F("govern_oligarchy_effect_alt",[ee.oligarchy()[1]]):F("govern_oligarchy_effect",[ee.oligarchy()[0],ee.oligarchy()[1]]),theocracy:F("govern_theocracy_effect",ee.theocracy()),theocracy_alt:F("govern_theocracy_effect_alt",ee.theocracy()),republic:F("govern_republic_effect",ee.republic()),socialist:F("govern_socialist_effect",ee.socialist()),corpocracy:F("govern_corpocracy_effect",ee.corpocracy()),technocracy:t.tech.high_tech&&t.tech.high_tech>=16?F("govern_technocracy_effect_alt",[ee.technocracy()[0],ee.technocracy()[2]]):F("govern_technocracy_effect",ee.technocracy()),federation:F("govern_federation_effect",[ee.federation()[0],ee.federation()[1]]),federation_alt:F("govern_federation_effect_alt",[25,ee.federation()[2],ee.federation()[1]]),magocracy:F("govern_magocracy_effect",ee.magocracy())}},ee={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 te(e){return t.race.witch_hunter&&"magocracy"===e?F("witch_hunter_magocracy"):F(`govern_${e}_desc`)}function ae(){if(0===$("#foreign").length&&!t.race.cataclysm&&(!t.tech.world_control||t.race.truepath)&&!t.tech.isolation){let a=$('
                ');a.append($(`

                ${F("civics_foreign")}

                `)),$("#r_govern0").append(a);var e={template:''};let r=t.race.truepath?5:3;for(let e=0;e{{ '${e}' | gov }} - ${F("civics_garrison_occupy")} - ${F("civics_garrison_annex")} - ${F("civics_garrison_purchase")}
                `);a.append(t);let r=$("
                ");r.append($(``)),r.append($(``)),r.append($(``)),t.append(r),t.append($(`
                ${F("civics_gov_mil_rate")}: {{ f${e}.mil | military(${e}) }} ({{ f${e}.mil }})
                `)),t.append($(`
                ${F("civics_gov_relations")}: {{ f${e}.hstl | relation }} ({{ f${e}.hstl | hate }})
                `)),t.append($(`
                ${F("civics_gov_eco_rate")}: {{ f${e}.eco | eco(${e}) }} ({{ f${e}.eco }})
                `)),t.append($(`
                ${F("civics_gov_unrest")}: {{ f${e}.unrest | discontent(${e}) }} ({{ f${e}.unrest | turmoil }})
                `))}let i={f0:t.civic.foreign.gov0,f1:t.civic.foreign.gov1,f2:t.civic.foreign.gov2,t:t.tech};t.race.truepath&&(i.f3=t.civic.foreign.gov3,i.f4=t.civic.foreign.gov4),zs({el:"#foreign",data:i,filters:{military:(e,a)=>t.civic.foreign[`gov${a}`].spy>=1?F(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=>F(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?F(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?F(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=>X(e),sab:e=>"none"===e?"":F(`civics_spy_${e}`),hate:e=>100-e+"%",turmoil:e=>`${e}%`},methods:{campaign(e){fe(e)},battleAssessment:e=>ve(e),trigModal(a){this.$buefy.modal.open({parent:this,component:e});var r=setInterval((function(){$("#modalBox").length>0&&(clearInterval(r),function(e){$("#modalBox").append($(`

                ${F("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($(``))),zs({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&&(le("influence",e),zs({el:"#espModal"},"destroy"),$(".modal-background").click(),ds())},sabotage(e){t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${e}`].spy>=1&&(le("sabotage",e),zs({el:"#espModal"},"destroy"),$(".modal-background").click(),$("#popGov").hide(),ds())},incite(e){e>=3||t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${e}`].spy>=1&&(le("incite",e),zs({el:"#espModal"},"destroy"),$(".modal-background").click(),ds())},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-Ki.befuddle.vars()[0]/100)));let r=as("dryad");r>0&&(e=Math.round(e*(1-Ki.befuddle.vars(1)[0]/100*r))),t.civic.foreign[`gov${a}`].sab=e,t.civic.foreign[`gov${a}`].act="annex",zs({el:"#espModal"},"destroy"),$(".modal-background").click(),ds()}},purchase(e){if(e>=3)return;let a=ce(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-Ki.befuddle.vars()[0]/100)));let i=as("dryad");i>0&&(r=Math.round(r*(1-Ki.befuddle.vars(1)[0]/100*i))),t.civic.foreign[`gov${e}`].sab=r,t.civic.foreign[`gov${e}`].act="purchase",zs({el:"#espModal"},"destroy"),$(".modal-background").click(),ds()}}}}),_s("GovLabel",(function(a){let r=$(a.this).data("esp"),i="";if("purchase"===r){let t=ce(e).toLocaleString();i=F(`civics_spy_${r}_desc`,[X(e),t])}else if("annex"===r)if(t.city.morale.current>=200+t.civic.foreign[`gov${e}`].hstl-t.civic.foreign[`gov${e}`].unrest)i=F(`civics_spy_${r}_desc`,[X(e)]);else{let a=200+t.civic.foreign[`gov${e}`].hstl-t.civic.foreign[`gov${e}`].unrest;i=F(`civics_spy_${r}_goal`,[X(e),a])}else i=F(`civics_spy_${r}_desc`,[X(e)]);let s="";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)&&(s=`
                ${F("civics_spy_warning")}
                `),$(`${s}
                ${i}
                `)}),{elm:"#espModal button",self:!0,classes:"has-background-light has-text-dark"})}(a))}),50)},spy_disabled:e=>t.civic.foreign[`gov${e}`].trn>0||se(e)>t.resource.Money.amount,spy(e){ne(e)},spyDesc:e=>re(e),espDesc:()=>ie(),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){zs({el:`#${t.id} > span`,data:{test:"val"},methods:{label:()=>ve(e)}})},out:function(e){zs({el:e.id},"destroy")}}),_s(`gov${e}ts`,(function(){return"{{ label() }}"}),{elm:`#gov${e} .tspy`,in:function(t){zs({el:`#${t.id} > span`,data:{test:"val"},methods:{label:()=>re(e)}})},out:function(e){zs({el:e.id},"destroy")}}),_s(`gov${e}s`,(function(){return ie()}),{elm:`#gov${e} .sspy`});t.race.truepath&&_s("garRivaldesc1",(function(){return F("civics_gov_tp_rival",[X(3),Di[t.race.species].home])}),{elm:"#gov3 > span"})}}function re(e){return t.civic.foreign[`gov${e}`].trn>0?F("civics_progress"):F("civics_gov_spy_desc",[q(se(e))])}function ie(){return F("civics_gov_esp_desc")}function se(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"===R()&&(a*=1-N("scorpio")[0]/100),Math.round(a**(t.civic.foreign[`gov${e}`].spy+1))+500}function ne(e){if(t.tech.spy&&0===t.civic.foreign[`gov${e}`].trn){let a=se(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 ce(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 oe(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 le(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-Ki.befuddle.vars()[0]/100)));let r=as("dryad");r>0&&(e=Math.round(e*(1-Ki.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-Ki.befuddle.vars()[0]/100)));let r=as("dryad");r>0&&(e=Math.round(e*(1-Ki.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-Ki.befuddle.vars()[0]/100)));let r=as("dryad");r>0&&(e=Math.round(e*(1-Ki.befuddle.vars(1)[0]/100*r))),t.civic.foreign[`gov${a}`].sab=e,t.civic.foreign[`gov${a}`].act="incite"}}}function _e(e){let a=!!(t.tech.currency&&t.tech.currency>=5);if(e)return!a&&!t.race.terrifying||t.race.noble?t.race.noble?Ki.noble.vars()[0]:10:0;{let e=30;t.race.noble?e=Ki.noble.vars()[1]:(a||t.race.terrifying)&&(e+=20),"oligarchy"===t.civic.govern.type&&(e+=ee.oligarchy()[1]);let r=D("aristocrat",1);return r&&(e+=r),e}}function de(e,a){switch(e){case"add":{let e=a||b(),r=_e(!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=_e(!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-Ki.brute.vars()[0]/100);let a=as("orc");return a>0&&(e*=1-Ki.brute.vars(1)[0]/100*a),t.race.inflation&&(e*=1+t.race.inflation/500),t.race.high_pop&&(e*=Ki.high_pop.vars()[1]/100),Math.round(e)}function he(e){if(t.tech.mercs){let a=e||b(),r=!0;for(;r&&a>0;){let e=ue();t.civic.garrison.workers=e?(t.resource.Money.amount-=e,t.civic.garrison.workers++,t.civic.garrison.m_use++):r=!1,a--}}}function me(e,a){Cs(e),t.tech.world_control&&!t.race.truepath?e.append($(`

                ${F("civics_garrison")}

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

                ${F("civics_garrison")}

                - ${F("rating")} {{ g.workers | hell | rating }} / {{ g.raid | rating }}
                `));var r=$('
                ');e.append(r);var i=$('
                ');r.append(i);let s=t.tech.world_control&&!t.race.truepath?F("civics_garrison_peacekeepers"):F("civics_garrison_soldiers");if(t.tech.isolation||(i.append($(`
                ${s} / {{ g.max | s_max }}
                `)),i.append($(`
                ${F("civics_garrison_crew")} {{ g.crew }}
                `)),i.append($(`
                ${F("civics_garrison_wounded")}
                `)),r.append($(`
                `))),a){let a="";t.tech.isolation&&(a=Js(8,12)),e.append($(`
                ${F("civics_garrison_training")} - ${F("arpa_to_complete")} {{ g.rate, g.progress | trainTime }}${a} {{ g.progress }}%
                `))}var n=$('
                ');e.append(n);var c=$('
                ');if(n.append(c),(!t.tech.world_control||t.race.truepath)&&!t.race.cataclysm&&!t.tech.isolation){var o=$(`
                ${F("civics_garrison_campaign")}
                `);c.append(o);var l=$('{{ g.tactic | tactics }}'),_=$('«'),d=$('»');o.append(_),o.append(l),o.append(d);var p=$(`
                ${F("civics_garrison_battalion")}
                `);c.append(p);var u=$('{{ g.raid }}'),h=$('«'),m=$('»');p.append(h),p.append(u),p.append(m),a&&(t.race.truepath&&t.tech.rival&&n.append($(`
                ${X(3)}
                `)),t.tech.world_control||(n.append($(`
                ${X(0)}
                `)),n.append($(`
                ${X(1)}
                `)),n.append($(`
                ${X(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),zs({el:a?"#garrison":"#c_garrison",data:g,methods:{hire(){he()},campaign(e){fe(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.raidke()&&(t.civic.garrison.raid=ke()))},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 F("civics_garrison_tactic_ambush");case 1:return F("civics_garrison_tactic_raid");case 2:return F("civics_garrison_tactic_pillage");case 3:return F("civics_garrison_tactic_assault");case 4:return F("civics_garrison_tactic_siege")}},rating:e=>+we(e,"army").toFixed(1),hell:e=>ke(),stationed(e){let r=ke(),i=t.race.cataclysm?13:31,s=r===i&&!a&&Zs(2,14,!0);return r===i&&s.length>0?s:r},s_max:e=>ke(!0),wounded(e){let t=Js(8,12);return a&&0===e&&t.length>0?t:on("fool",2021)?ke()-e:e},trainTime:(e,t)=>Fs(0===e?-1:(100-t)/(4*e))}}),["tactic","bat","soldier","crew","wounded","hmerc","defenseRating","offenseRating"].forEach((function(e){_s(a?`garrison${e}`:`cGarrison${e}`,(function(){return"{{ label() }}"}),{elm:`${a?"#garrison":"#c_garrison"} .${e}`,in:function(a){zs({el:`#${a.id} > span`,data:{test:"val"},methods:{label(){switch(e){case"tactic":switch(t.civic.garrison.tactic){case 0:return F("civics_garrison_tactic_ambush_desc");case 1:return F("civics_garrison_tactic_raid_desc");case 2:return F("civics_garrison_tactic_pillage_desc");case 3:return F("civics_garrison_tactic_assault_desc");case 4:return F("civics_garrison_tactic_siege_desc",[aa("federation"===t.civic.govern.type?15:20)])}case"bat":return F("civics_garrison_army_label");case"soldier":return ge();case"crew":return F("civics_garrison_crew_desc");case"wounded":return F("civics_garrison_wounded_desc");case"hmerc":return F("civics_garrison_hire_mercenary_cost",[Math.round(ue()).toLocaleString()]);case"defenseRating":return F("civics_garrison_defensive_rate");case"offenseRating":return F("civics_garrison_offensive_rate")}}}})},out:function(e){zs({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){zs({el:`#${e.id} > span`,data:{test:"val"},methods:{label:()=>ve(t)}})},out:function(e){zs({el:e.id},"destroy")}});t.race.truepath&&!t.tech.isolation&&_s("garRivaldesc2",(function(){return F("civics_gov_tp_rival",[X(3),Di[t.race.species].home])}),{elm:"#garrison .gov3 > div"})}}function ge(){let e=we(ke(),"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 i="civics_garrison_soldier_loot"+a.length/2;return F(t.race.evil&&t.race.soul_eater?"civics_garrison_soldier_evil_desc":"civics_garrison_soldier_desc")+F(i,a)}function ve(e){if(t.civic.foreign[`gov${e}`].occ)return F("civics_garrison_deoccupy_desc");if(t.civic.foreign[`gov${e}`].buy||t.civic.foreign[`gov${e}`].anx)return F("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 F("civics_garrison_no_spy");let a=we(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*=ss.swamp.vars()[0]),on("fool",2021)&&(r/=1.25),ake()?t.civic.garrison.raid=ke():t.civic.garrison.raid<0&&(t.civic.garrison.raid=0),0===t.civic.garrison.raid)return void ms(F("civics_garrison_campaign_no_soldier"),"warning",!1,["combat"]);t.stats.attacks++;let a=t.race.claws?20:16,r=t.race.puny?3:5,i=Math.floor(g(r,a,!0))/10,s=we(t.civic.garrison.raid,"army")*i,n=0;switch(t.civic.garrison.tactic){case 0:n=g(0,10,!0),t.civic.foreign[`gov${e}`].hstl+=Math.floor(g(0,2,!0));break;case 1:n=g(5,50,!0),t.civic.foreign[`gov${e}`].hstl+=Math.floor(g(0,3,!0));break;case 2:n=g(25,100,!0),t.civic.foreign[`gov${e}`].hstl+=Math.floor(g(1,5,!0));break;case 3:n=g(50,200,!0),t.civic.foreign[`gov${e}`].hstl+=Math.floor(g(4,12,!0));break;case 4:n=g(100,500,!0),t.civic.foreign[`gov${e}`].hstl+=Math.floor(g(10,25,!0))}n=Math.floor(n*t.civic.foreign[`gov${e}`].mil/100),t.race.banana&&(n*=2),"swamp"===t.city.biome&&(n*=ss.swamp.vars()[0]),t.race.mistrustful&&(t.civic.foreign[`gov${e}`].hstl+=Ki.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(n/5),t.race.blood_thirst_count>Ki.blood_thirst.vars()[0]&&(t.race.blood_thirst_count=Ki.blood_thirst.vars()[0]));let c=0;if(t.civic.garrison.raid>t.civic.garrison.workers-t.civic.garrison.crew-t.civic.garrison.wounded&&(c=t.civic.garrison.raid-(t.civic.garrison.workers-t.civic.garrison.crew-t.civic.garrison.wounded)),t.civic.garrison.fatigue++,s>n){let a=Math.floor(t.civic.garrison.raid/(5-t.civic.garrison.tactic));a+=c,t.city.ptrait.includes("rage")&&(a+=ns.rage.vars()[2]),a<1&&(a=1),a>ye()&&(a=ye());let r=Math.floor(g(0,a,!0));t.race.frail&&(r+=Ki.frail.vars()[0]);let i=0;if(t.race.scales&&(i+=Ki.scales.vars()[0]),t.tech.armor&&(i+=t.tech.armor),t.race.high_pop&&(i+=Math.floor(g(0,i*Ki.high_pop.vars()[0],!0))),t.race.armored){let e=1-Ki.armored.vars()[0]/100;i+=Math.floor(r*e)}let s=as("tortoisan");if(s>0){let e=1-Ki.armored.vars(1)[0]/100*s;i+=Math.floor(r*e)}if(t.civic.garrison.raid>c&&(r-=i),r<0&&(r=0),r>t.civic.garrison.raid&&(r=t.civic.garrison.raid),t.race.instinct){let e=Math.floor(r*(Ki.instinct.vars()[1]/100));r-=e,c+=e}t.civic.garrison.workers-=r,t.stats.died+=r,t.civic.garrison.protest+=r,r>c?(t.civic.garrison.wounded-=c,c=0):(t.civic.garrison.wounded-=r,c-=r),t.civic.garrison.wounded+=Math.floor(g(c,t.civic.garrison.raid-r,!0));let n={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},o=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"],_=3===e&&t.race.truepath?["Titanium","Oil","Iridium","Alloy","Polymer"]:["Cement","Steel"];t.race.artifical&&o.shift(),t.race.smoldering&&o.push("Chrysotile"),t.race.terrifying&&3!==e&&_.push("Titanium"),t.tech.magic&&_.push("Crystal");let d=["Money"];switch(t.civic.garrison.tactic){case 0:{let e=["Money"].concat(o,l);d.push(o[Math.floor(g(0,o.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(o,l,_);d.push(o[Math.floor(g(0,o.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(o,l,_),a=l.concat(_);d.push(o[Math.floor(g(0,o.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(o,l,_);d.push(o[Math.floor(g(0,o.length,!0))]),d.push(l[Math.floor(g(0,l.length,!0))]),d.push(_[Math.floor(g(0,_.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(o,l,_);d.push(o[Math.floor(g(0,o.length,!0))]),d.push(l[Math.floor(g(0,l.length,!0))]),d.push(_[Math.floor(g(0,_.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 p=t.race.terrifying&&3!==e?Ki.terrifying.vars()[0]:12,u=t.race.terrifying&&3!==e?Ki.terrifying.vars()[1]:32;d.forEach((function(e){switch(e){case"Money":n[e]+=Math.floor(g(100,375,!0));break;case"Food":n[e]+=Math.floor(g(40,175,!0));break;case"Lumber":case"Stone":n[e]+=Math.floor(g(50,250,!0));break;case"Copper":case"Iron":case"Aluminium":n[e]+=Math.floor(g(35,125,!0));break;case"Coal":case"Cement":n[e]+=Math.floor(g(25,100,!0));break;case"Steel":case"Chrysotile":n[e]+=Math.floor(g(20,65,!0));break;case"Titanium":n[e]+=Math.floor(g(p,u,!0));break;case"Crystal":n[e]+=Math.floor(g(1,5,!0));break;case"Oil":n[e]+=Math.floor(g(20,50,!0));break;case"Iridium":n[e]+=Math.floor(g(2,30,!0));break;case"Alloy":case"Polymer":n[e]+=Math.floor(g(5,38,!0))}}));let h=F("civics_garrison_gained");t.resource.Money.display&&n.Money>0&&(n.Money=be(n.Money,e),h+=F("civics_garrison_quant_money",[n.Money]),xs("Money",n.Money)),o.concat(l,_).forEach((function(a){n[a]>0&&(t.resource[a].display||"Steel"===a||"Titanium"===a)&&(n[a]=be(n[a],e),h+=F("civics_garrison_quant_res",[n[a],t.resource[a].name]),xs(a,n[a]),"Steel"!==a&&"Titanium"!==a||(t.resource[a].display=!0))})),h=h.slice(0,-2),h+=".",ms(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/Ki.revive.vars()[0]),!0));break;case 1:m=Math.floor(g(0,Math.floor(r/Ki.revive.vars()[1]),!0));break;case 2:m=Math.floor(g(0,Math.floor(r/Ki.revive.vars()[2]),!0))}t.civic.garrison.workers+=m}if(ms(m>0?F("civics_garrison_victorious_revive",[r,m]):F("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,ms(F("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,Ki.infectious.vars()[0],!0));break;case 1:e=Math.floor(g(0,Ki.infectious.vars()[1],!0));break;case 2:e=Math.floor(g(0,Ki.infectious.vars()[2],!0));break;case 3:e=Math.floor(g(0,Ki.infectious.vars()[3],!0));break;case 4:e=Math.floor(g(0,Ki.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),ms(1===e?F("civics_garrison_soldier_infected"):F("civics_garrison_soldiers_infected",[e]),"special",!1,["combat"]))}let v=aa("federation"===t.civic.govern.type?15:20);if(e<=2&&4===t.civic.garrison.tactic&&t.civic.garrison.workers>=v){let a=!t.tech.gov_fed&&!oe();if(t.civic.garrison.workers-=v,t.civic.foreign[`gov${e}`].occ=!0,t.civic.foreign[`gov${e}`].sab=0,t.civic.foreign[`gov${e}`].act="none",a&&Jr(),t.race.banana){let e=qn();t.stats.banana.b1[e]=!0,"m"!==e&&"l"!==e&&(t.stats.banana.b1.l=!0)}}}else{let e=t.civic.garrison.raid;e+=c,0===t.civic.garrison.tactic&&(e=Math.floor(e/2)),t.city.ptrait.includes("rage")&&(e+=ns.rage.vars()[2]),e<1&&(e=1),e>ye()&&(e=ye());let a=Math.floor(g(1,e,!0));t.race.frail&&(a+=t.civic.garrison.tactic+Ki.frail.vars()[1]);let r=0;if(t.race.scales&&(r+=Ki.scales.vars()[1]),t.tech.armor&&(r+=t.tech.armor),t.race.high_pop&&(r+=Math.floor(g(0,Math.floor(r*Ki.high_pop.vars()[0]/2),!0))),t.race.armored){let e=Ki.armored.vars()[0]/100;r+=Math.floor(a*e)}let i=as("tortoisan");if(i>0){let e=Ki.armored.vars(1)[0]/100*i;r+=Math.floor(a*e)}if(t.civic.garrison.raid>c&&(a-=r),t.race.instinct){let e=Math.floor(a*(Ki.instinct.vars()[1]/100));a-=e,c+=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>c?(t.civic.garrison.wounded-=c,c=0):(t.civic.garrison.wounded-=a,c-=a),t.civic.garrison.wounded+=1+Math.floor(g(c,t.civic.garrison.raid-a,!0));let s=0;if(t.race.revive){switch(t.city.calendar.temp){case 0:s=Math.floor(g(0,Math.floor(a/Ki.revive.vars()[3]),!0));break;case 1:s=Math.floor(g(0,Math.floor(a/Ki.revive.vars()[4]),!0));break;case 2:s=Math.floor(g(0,Math.floor(a/Ki.revive.vars()[5]),!0))}t.civic.garrison.workers+=s}ms(s>0?F("civics_garrison_defeat_revive",[a,s]):F("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 ye(){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=aa(e)),a>e&&(a=e),a}function be(e,a){let r=ye();t.race.high_pop&&(r/=aa(1));let i=e*Math.log(r+1);switch(t.race.invertebrate&&(i*=1-Ki.invertebrate.vars()[0]/100),"evil"===t.race.universe&&(i*=Ts("evil")),t.civic.garrison.tactic){case 1:i*=4;break;case 2:i*=30;break;case 3:i*=100;break;case 4:i*=400}return t.race.banana&&(i*=.5),"swamp"===t.city.biome&&(i*=ss.swamp.vars()[1]),Math.floor(i*t.civic.foreign[`gov${a}`].eco/100)}function we(e,a,r){if(!t.civic.hasOwnProperty("garrison"))return 1;let i=0;"number"==typeof r?i=r:e>t.civic.garrison.workers-t.civic.garrison.wounded&&(i=e-(t.civic.garrison.workers-t.civic.garrison.wounded));let s=function(){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+Ki.sniper.vars()[0]/100*e);let a=as("centaur");a>0&&(e*=1+Ki.sniper.vars(1)[0]/100*e*a),e+=t.tech.military>=11?2:1}return e}(),n=as("rhinotaur"),c=e-i/2;(t.race.rage||n>0)&&(c=e+(t.race.rage?i*Ki.rage.vars()[1]/100:0)+(n>0?i*Ki.rage.vars(1)[1]/100*n:0));let o=t.tech.military?c*s:c;if("army"===a||"hellArmy"===a){t.race.rage&&(o*=1+Ki.rage.vars()[0]/100*(t.civic.garrison.wounded||0)),n>0&&(o*=1+Ki.rage.vars(1)[0]/100*n*(t.civic.garrison.wounded||0)),t.race.puny&&(o*=1-Ki.puny.vars()[0]/100),t.race.claws&&(o*=1+Ki.claws.vars()[0]/100);let r=as("scorpid");r>0&&(o*=1+Ki.claws.vars(1)[0]/100*r),t.race.chameleon&&(o*=1+Ki.chameleon.vars()[0]/100),t.race.cautious&&0===t.city.calendar.weather&&(o*=1-Ki.cautious.vars()[0]/100),t.race.apex_predator&&(o*=1+Ki.apex_predator.vars()[0]/100);let i=as("sharkin");i>0&&(o*=1+Ki.apex_predator.vars(1)[0]/100*i),t.race.swift&&(o*=1+Ki.swift.vars()[0]/100),t.race.fiery&&(o*=1+Ki.fiery.vars()[0]/100);let s=as("balorg");s>0&&(o*=1+Ki.fiery.vars(1)[0]/100*s),t.race.sticky&&(o*=1+Ki.sticky.vars()[1]/100);let c=as("pinguicula");c>0&&(o*=1+Ki.sticky.vars(1)[1]/100*c),t.race.pathetic&&(o*=1-Ki.pathetic.vars()[0]/100),t.race.tactical&&(o*=1+Ki.tactical.vars()[0]*t.race.tactical/100),t.tech.fanaticism&&t.tech.fanaticism>=4&&(o*=1+.01*t.city.temple.count),t.race.holy&&"hellArmy"===a&&(o*=1+Ki.holy.vars()[0]/100);let l=as("unicorn");l>0&&"hellArmy"===a&&(o*=1+Ki.holy.vars(1)[0]/100*l),t.race.banana&&"hellArmy"===a&&(o*=.8),"aries"===R()&&(o*=1+N("aries")[0]/100);let _=D("tactician",0);if(_&&(o*=1+_/100),t.city.ptrait.includes("rage")&&(o*=ns.rage.vars()[0]),t.race.parasite&&(1===e?o+=2:e>1&&(o+=4)),t.tech.psychic&&t.race.psychicPowers&&t.race.psychicPowers.hasOwnProperty("assaultTime")){let e=0;if(t.race.psychicPowers.assaultTime>0&&(e+=Ki.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+=+(Ki.psychic.vars()[3]/5e4*a*t.race.psychicPowers.channel.assault).toFixed(3)}o*=1+e}}return"hunting"===a&&t.race.unfathomable&&(o*=.66),t.race.rejuvenated&&(o*=1.05),"autocracy"===t.civic.govern.type&&(o*=1+ee.autocracy()[1]/100),o=Math.floor(o),o*Gi(e,a)}function ke(e,a){if(!t.civic.garrison)return 0;let r=e?"max":"workers",i=t.portal.fortress?t.portal.fortress.garrison:0,s=t.space.fob&&!a?t.space.fob.troops:0;return t.civic.garrison[r]-t.civic.garrison.crew-i-s}function $e(e){return t.race.high_pop&&(e*=Ki.high_pop.vars()[1]/100),e}function xe(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*=ss.desert.vars()[1]:"tundra"===t.city.biome?e*=ss.tundra.vars()[1]:"taiga"===t.city.biome&&(e*=ss.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=Z(3);return{b:a,g:r-1,f:a*r}}case"coal":return.55}case"helium_mine":{let e=.18,t=Z(3);return{b:e,g:t-1,f:e*t}}case"red_mine":switch(a){case"copper":{let e=$e(.25),t=Z(3);return{b:e,g:t-1,f:e*t}}case"titanium":{let e=$e(.02),t=Z(3);return{b:e,g:t-1,f:e*t}}case"stone":return $e(.75);case"asbestos":return $e(1.25);case"aluminium":return $e(.066)}case"biodome":switch(a){case"food":return $e(.25);case"cat_food":return 2;case"lumber":return $e(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*(s.ai_colonist?t.civic.titan_colonist.workers+aa(s.ai_colonist):t.civic.titan_colonist.workers);return t.race.high_pop&&(e=$e(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*va("gate").supress;case"water_freighter":return 1.25;case"titan_mine":switch(a){case"adamantite":return $e(.02)*(t.space.titan_mine?t.space.titan_mine.ratio:50)/100;case"aluminium":return $e(.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+Ki.tough.vars()[0]/100);let r=as("ogre");return r>0&&(e*=1+Ki.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=cn("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=cn("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+=Ki.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+=+(Ki.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+=Ki.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+=+(Ki.psychic.vars()[3]/5e4*a*t.race.psychicPowers.channel.cash).toFixed(3)}return 1+e}return 1}}function qe(e){switch(e){case"Physics":Le();break;case"Genetics":Ke();break;case"Monument":return ze();case"PhysicsTech":return Pe;case"GeneTech":return Oe;case"BloodTech":return Me;case"Crispr":De();break;case"Blood":Be()}}const Pe={lhc:{title:()=>on("fool",2022)?F("arpa_projects_railway_title"):F("arpa_projects_lhc_title"),desc:()=>on("fool",2022)?F("arpa_projects_railway_desc"):F("arpa_projects_lhc_desc"),reqs:{high_tech:6},grant:"supercollider",effect(e){if(on("fool",2022)&&!e)return Pe.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?F("arpa_projects_lhc_cataclysm3",[a]):F("arpa_projects_lhc_effect3",[a,t.race.orbit_decayed?F("space_home_satellite_title"):di()]):t.race.cataclysm?F("arpa_projects_lhc_cataclysm2",[a]):F("arpa_projects_lhc_effect2",[a,t.race.orbit_decayed?F("space_home_satellite_title"):di()]):t.race.cataclysm?F("arpa_projects_lhc_cataclysm1",[a]):t.tech.isolation?F("arpa_projects_lhc_iso1",[a,F("tech_infectious_disease_lab_alt")]):F("arpa_projects_lhc_effect1",[a,t.race.orbit_decayed?F("space_home_satellite_title"):di()])},cost:{Money:(e,t)=>Te("lhc",e,25e5,1.05,t),Knowledge:(e,t)=>Te("lhc",e,5e5,1.05,t),Copper:(e,t)=>Te("lhc",e,125e3,1.05,t),Cement:(e,t)=>Te("lhc",e,25e4,1.05,t),Aluminium:(e,t)=>Te("lhc",e,35e4,1.05,t),Titanium:(e,t)=>Te("lhc",e,5e4,1.05,t),Polymer:(e,t)=>Te("lhc",e,12e3,1.05,t)}},stock_exchange:{title:F("arpa_projects_stock_exchange_title"),desc:F("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?F("arpa_projects_stock_exchange_cataclysm2"):F("arpa_projects_stock_exchange_cataclysm1"):t.tech.gambling&&t.tech.gambling>=4?F("arpa_projects_stock_exchange_effect3"):F("arpa_projects_stock_exchange_effect2"):F("arpa_projects_stock_exchange_effect1"),cost:{Money:(e,t)=>Te("stock_exchange",e,3e6,1.06,t),Plywood:(e,t)=>Te("stock_exchange",e,25e3,1.06,t),Brick:(e,t)=>Te("stock_exchange",e,2e4,1.06,t),Wrought_Iron:(e,t)=>Te("stock_exchange",e,1e4,1.06,t)}},tp_depot:{title:F("galaxy_gateway_depot"),desc:F("arpa_projects_depot_desc"),reqs:{high_tech:6,storage:4},grant:"tp_depot",path:["truepath"],effect:()=>F(t.tech.isolation?"arpa_projects_depot_effect_iso":"arpa_projects_depot_effect",[5,50]),cost:{Money:(e,t)=>Te("tp_depot",e,18e5,1.08,t),Stone:(e,t)=>Te("tp_depot",e,75e4,1.08,t),Iron:(e,t)=>Te("tp_depot",e,25e4,1.08,t),Alloy:(e,t)=>Te("tp_depot",e,3e4,1.08,t)}},launch_facility:{id:"arpalaunch_facility",title:F("arpa_projects_launch_facility_title"),desc:F("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:()=>F("arpa_projects_launch_facility_effect1"),cost:{Money:e=>Te("launch_facility",e,2e6,1.1),Knowledge:e=>Te("launch_facility",e,5e5,1.1),Cement:e=>Te("launch_facility",e,15e4,1.1),Oil:e=>Te("launch_facility",e,2e4,1.1),Sheet_Metal:e=>Te("launch_facility",e,15e3,1.1),Alloy:e=>Te("launch_facility",e,25e3,1.1)}},monument:{title(e){if(e)return F("arpa_project_monument_title");switch(t.arpa.m_type){case"Obelisk":return F("arpa_project_monument_obelisk");case"Statue":return F("arpa_project_monument_statue");case"Sculpture":return F("arpa_project_monument_sculpture");case"Monolith":return F("arpa_project_monument_monolith");case"Pillar":return F("arpa_project_monument_pillar");case"Megalith":return F("arpa_project_monument_megalith")}},desc:F("arpa_projects_monument_desc"),reqs:{monument:1},grant:"monuments",effect(){let e=D("gaslighter",2);return F("arpa_projects_monument_effect1",[e?2-e:2])},cost:{Stone:(e,t)=>Fe("Stone",e,t),Aluminium:(e,t)=>Fe("Aluminium",e,t),Cement:(e,t)=>Fe("Cement",e,t),Steel:(e,t)=>Fe("Steel",e,t),Lumber:(e,t)=>Fe("Lumber",e,t),Crystal:(e,t)=>Fe("Crystal",e,t)}},railway:{title:()=>on("fool",2022)?F("arpa_projects_lhc_title"):F("arpa_projects_railway_title"),desc:()=>on("fool",2022)?F("arpa_projects_lhc_desc"):F("arpa_projects_railway_desc"),reqs:{high_tech:6,trade:3},grant:"railway",effect(e){if(on("fool",2022)&&!e)return Pe.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,F("arpa_projects_railway_cataclysm1",[a,r,3,1])):(a+=t.city.storage_yard?Math.floor(t.city.storage_yard.count/6):0,F("arpa_projects_railway_effect1",[a,r,6,1]))},cost:{Money:(e,t)=>Te("railway",e,25e5,1.08,t),Lumber:(e,t)=>Te("railway",e,75e4,1.08,t),Iron:(e,t)=>Te("railway",e,3e5,1.08,t),Steel:(e,t)=>Te("railway",e,45e4,1.08,t)}},roid_eject:{title:()=>F("arpa_projects_roid_eject_title",[je()]),desc:()=>F(t.tech.roid_eject<=10?"arpa_projects_roid_eject_desc":"arpa_projects_roid_eject_desc2",[je()]),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),`
                ${F("arpa_projects_roid_eject_effect1")}
                ${F("arpa_projects_roid_eject_effect2",[+e.toFixed(3),+a.toFixed(3),je()])}
                `},cost:{Money:(e,t)=>Te("roid_eject",e,1875e4,1.075,t),Deuterium:(e,t)=>Te("roid_eject",e,375e3,1.075,t),Bolognium:(e,t)=>Te("roid_eject",e,15e3,1.075,t)}},nexus:{title:F("arpa_projects_nexus_title"),desc:F("arpa_projects_nexus_desc"),reqs:{magic:5},grant:"nexus",effect:()=>t.tech.roguemagic&&t.tech.roguemagic>=7?`
                ${F("arpa_projects_nexus_effect1",[5])}
                ${F("witch_hunter_nexus",[8])}
                `:F("arpa_projects_nexus_effect1",[5]),cost:{Money:(e,t)=>Te("nexus",e,5e6,1.12,t),Crystal:(e,t)=>Te("nexus",e,6e4,1.12,t),Iridium:(e,t)=>Te("nexus",e,35e3,1.12,t)}},syphon:{title:F("arpa_syphon_title"),desc(){let e="";return e=t.tech.syphon&&t.tech.syphon>=0?`
                ${F("arpa_syphon_desc")}
                ${F("arpa_syphon_desc_warn2")}
                `:`
                ${F("arpa_syphon_desc")}
                ${F("arpa_syphon_desc_warn1")}
                `,t.race.witch_hunter&&(e+=`
                ${F("witch_hunter_suspicion")}
                `),e},reqs:{veil:2},grant:"syphon",effect(){let e=+(1/3*Ts("magic")).toFixed(3);if(t.tech.syphon&&t.tech.syphon>=60){let t=Ns("vacuum"),a=F("resource_Plasmid_plural_name");return`
                ${F("arpa_syphon_effect_main",[e])}
                ${F("arpa_syphon_effect4")}
                ${F("arpa_syphon_effect_reward",[t.plasmid,t.phage,t.dark,a,80])}
                `}return t.tech.syphon&&t.tech.syphon>=40?`
                ${F("arpa_syphon_effect_main",[e])}
                ${F("arpa_syphon_effect3")}
                `:t.tech.syphon&&t.tech.syphon>=20?`
                ${F("arpa_syphon_effect_main",[e])}
                ${F("arpa_syphon_effect2")}
                `:`
                ${F("arpa_syphon_effect_main",[e])}
                ${F("arpa_syphon_effect1")}
                `},cost:{Money:(e,t)=>Te("syphon",e,75e5,1.025,t),Mana:(e,t)=>Te("syphon",e,5e3,1.025,t),Crystal:(e,t)=>Te("syphon",e,1e5,1.025,t),Infernite:(e,t)=>Te("syphon",e,1e4,1.025,t)}}};function je(){return!t.tech.roid_eject||t.tech.roid_eject<=10?F("arpa_projects_roid_eject_asteroid"):t.tech.roid_eject<=25?F("arpa_projects_roid_eject_moon"):t.tech.roid_eject<=40?F("arpa_projects_roid_eject_dwarf"):t.tech.roid_eject<=60?F("arpa_projects_roid_eject_planet"):F("arpa_projects_roid_eject_remnant")}const Oe={genetic_memory:{id:"genes-genetic_memory",title:F("arpa_genepool_genetic_memory_title"),desc:F("arpa_genepool_genetic_memory_desc"),reqs:{},grant:["creep",1],cost:{Plasmid:()=>25},action:()=>!!Se("genetic_memory")},animus:{id:"genes-animus",title:F("arpa_genepool_animus_title"),desc:F("arpa_genepool_animus_desc"),reqs:{creep:1},grant:["creep",2],cost:{Plasmid:()=>75},action:()=>!!Se("animus")},divine_remembrance:{id:"genes-divine_remembrance",title:F("arpa_genepool_divine_remembrance_title"),desc:F("arpa_genepool_divine_remembrance_desc"),reqs:{creep:2},grant:["creep",3],cost:{Plasmid:()=>225},action:()=>!!Se("divine_remembrance")},divine_proportion:{id:"genes-divine_proportion",title:F("arpa_genepool_divine_proportion_title"),desc:F("arpa_genepool_divine_proportion_desc"),reqs:{creep:3},grant:["creep",4],cost:{Plasmid:()=>618},action:()=>!!Se("divine_proportion")},genetic_repository:{id:"genes-genetic_repository",title:F("arpa_genepool_genetic_repository_title"),desc:F("arpa_genepool_genetic_repository_desc"),reqs:{creep:4},grant:["creep",5],cost:{Plasmid:()=>999},action:()=>!!Se("genetic_repository")},spatial_reasoning:{id:"genes-spatial_reasoning",title:F("arpa_genepool_spatial_reasoning_title"),desc:F("arpa_genepool_spatial_reasoning_desc"),reqs:{},grant:["store",1],cost:{Plasmid:()=>50},action:()=>!!Se("spatial_reasoning")},spatial_superiority:{id:"genes-spatial_superiority",title:F("arpa_genepool_spatial_superiority_title"),desc:F("arpa_genepool_spatial_superiority_desc"),reqs:{store:1},grant:["store",2],cost:{Plasmid:()=>125},action:()=>!!Se("spatial_superiority")},spatial_supremacy:{id:"genes-spatial_supremacy",title:F("arpa_genepool_spatial_supremacy_title"),desc:F("arpa_genepool_spatial_supremacy_desc"),reqs:{store:2},grant:["store",3],cost:{Plasmid:()=>325},action:()=>!!Se("spatial_supremacy")},dimensional_warping:{id:"genes-dimensional_warping",title:F("arpa_genepool_dimensional_warping_title"),desc:F("arpa_genepool_dimensional_warping_desc"),reqs:{store:3},grant:["store",4],cost:{Plasmid:()=>500},action:()=>!!Se("dimensional_warping")},enhanced_muscle_fiber:{id:"genes-enhanced_muscle_fiber",title:F("arpa_genepool_enhanced_muscle_fiber_title"),desc:F("arpa_genepool_enhanced_muscle_fiber_desc"),reqs:{},grant:["enhance",1],cost:{Plasmid:()=>25},action:()=>!!Se("enhanced_muscle_fiber")},morphogenesis:{id:"genes-morphogenesis",title:F("arpa_genepool_morphogenesis_title"),desc:F("arpa_genepool_morphogenesis_desc"),reqs:{},grant:["evolve",1],cost:{Plasmid:()=>10},action:()=>!!Se("morphogenesis")},recombination:{id:"genes-recombination",title:F("arpa_genepool_recombination_title"),desc:F("arpa_genepool_recombination_desc"),reqs:{evolve:1},grant:["evolve",2],cost:{Plasmid:()=>35},action:()=>!!Se("recombination")},homologous_recombination:{id:"genes-homologous_recombination",title:F("arpa_genepool_homologous_recombination_title"),desc:F("arpa_genepool_homologous_recombination_desc"),reqs:{evolve:2},grant:["evolve",3],cost:{Plasmid:()=>70},action:()=>!!Se("homologous_recombination")},genetic_reshuffling:{id:"genes-genetic_reshuffling",title:F("arpa_genepool_genetic_reshuffling_title"),desc:F("arpa_genepool_genetic_reshuffling_desc"),reqs:{evolve:3},grant:["evolve",4],cost:{Plasmid:()=>175},action:()=>!!Se("genetic_reshuffling")},recombinant_dna:{id:"genes-recombinant_dna",title:F("arpa_genepool_recombinant_dna_title"),desc:F("arpa_genepool_recombinant_dna_desc"),reqs:{evolve:4},grant:["evolve",5],cost:{Plasmid:()=>440},action:()=>!!Se("recombinant_dna")},chimeric_dna:{id:"genes-chimeric_dna",title:F("arpa_genepool_chimeric_dna_title"),desc:F("arpa_genepool_chimeric_dna_desc"),reqs:{evolve:5},grant:["evolve",6],cost:{Plasmid:()=>1100},action:()=>!!Se("chimeric_dna")},molecular_cloning:{id:"genes-molecular_cloning",title:F("arpa_genepool_molecular_cloning_title"),desc:F("arpa_genepool_molecular_cloning_desc"),reqs:{evolve:6},grant:["evolve",7],cost:{Plasmid:()=>2750},action:()=>!!Se("molecular_cloning")},transgenes:{id:"genes-transgenes",title:F("arpa_genepool_transgenes_title"),desc:F("arpa_genepool_transgenes_desc"),reqs:{evolve:7},grant:["evolve",8],cost:{Plasmid:()=>6875},action:()=>!!Se("transgenes")},synthesis:{id:"genes-synthesis",title:F("arpa_genepool_synthesis_title"),desc:F("arpa_genepool_synthesis_desc",[2,10]),reqs:{evolve:1},grant:["synthesis",1],cost:{Plasmid:()=>25},action:()=>!!Se("synthesis")},karyokinesis:{id:"genes-karyokinesis",title:F("arpa_genepool_karyokinesis_title"),desc:F("arpa_genepool_synthesis_desc",[3,25]),reqs:{synthesis:1},grant:["synthesis",2],cost:{Plasmid:()=>40},action:()=>!!Se("karyokinesis")},cytokinesis:{id:"genes-cytokinesis",title:F("arpa_genepool_cytokinesis_title"),desc:F("arpa_genepool_synthesis_desc",[4,50]),reqs:{synthesis:2},grant:["synthesis",3],cost:{Plasmid:()=>55},action:()=>!!Se("cytokinesis")},mitosis:{id:"genes-mitosis",title:F("arpa_genepool_mitosis_title"),desc:F("arpa_genepool_mitosis_desc",[3]),reqs:{synthesis:3,evolve:2},grant:["plasma",1],cost:{Plasmid:()=>90},action:()=>!!Se("mitosis")},metaphase:{id:"genes-metaphase",title:F("arpa_genepool_metaphase_title"),desc:F("arpa_genepool_mitosis_desc",[5]),reqs:{plasma:1},grant:["plasma",2],cost:{Plasmid:()=>165},action:()=>!!Se("mitosis")},mutation:{id:"genes-mutation",title:F("arpa_genepool_mutation_title"),desc:F("arpa_genepool_mutation_desc"),reqs:{synthesis:3,creep:5},grant:["mutation",1],cost:{Plasmid:()=>1250},action:()=>!!Se("mutation")&&(t.genes.mutation=1,Ke(),!0)},transformation:{id:"genes-transformation",title:F("arpa_genepool_transformation_title"),desc:F("arpa_genepool_transformation_desc"),reqs:{mutation:1},grant:["mutation",2],cost:{Plasmid:()=>1500},action:()=>!!Se("transformation")&&(t.genes.mutation=2,Ke(),!0)},metamorphosis:{id:"genes-metamorphosis",title:F("arpa_genepool_metamorphosis_title"),desc:F("arpa_genepool_metamorphosis_desc"),reqs:{mutation:2},grant:["mutation",3],cost:{Plasmid:()=>1750},action:()=>!!Se("metamorphosis")&&(t.genes.mutation=3,Ke(),!0)},replication:{id:"genes-replication",title:F("arpa_genepool_replication_title"),desc:F("arpa_genepool_replication_desc"),reqs:{evolve:1},grant:["birth",1],cost:{Plasmid:()=>65},action:()=>!!Se("replication")},artificer:{id:"genes-artificer",title:F("arpa_genepool_artificer_title"),desc:F("arpa_genepool_artificer_desc"),reqs:{evolve:1},grant:["crafty",1],cost:{Plasmid:()=>45},action:()=>!!Se("artificer")},detail_oriented:{id:"genes-detail_oriented",title:F("arpa_genepool_detail_oriented_title"),desc:F("arpa_genepool_crafting_desc",["50"]),reqs:{crafty:1},grant:["crafty",2],cost:{Plasmid:()=>90},action:()=>!!Se("detail_oriented")},rigorous:{id:"genes-rigorous",title:F("arpa_genepool_rigorous_title"),desc:F("arpa_genepool_crafting_desc",["100"]),reqs:{crafty:2},grant:["crafty",3],cost:{Plasmid:()=>135},action:()=>!!Se("rigorous")},geographer:{id:"genes-geographer",title:F("arpa_genepool_geographer_title"),desc:F("arpa_genepool_geographer_desc"),reqs:{store:1},grant:["queue",1],cost:{Plasmid:()=>75},action:()=>!!Se("geographer")},architect:{id:"genes-architect",title:F("arpa_genepool_architect_title"),desc:F("arpa_genepool_architect_desc"),reqs:{queue:1},grant:["queue",2],cost:{Plasmid:()=>160},action:()=>!!Se("architect"),post(){fs(),ys()}},precognition:{id:"genes-precognition",title:F("arpa_genepool_precognition_title"),desc:F("arpa_genepool_precognition_desc"),reqs:{queue:2},grant:["queue",3],condition:()=>t.stats.aiappoc>0,cost:{Plasmid:()=>3500,Phage:()=>100,AICore:()=>1},action:()=>!!Se("precognition")},governance:{id:"genes-governance",title:F("arpa_genepool_governance_title"),desc:F("arpa_genepool_governance_desc"),reqs:{queue:2},grant:["governor",1],cost:{Plasmid:()=>300,Phage:()=>25},action:()=>!!Se("governance")},civil_service:{id:"genes-civil_service",title:F("arpa_genepool_civil_service_title"),desc:F("arpa_genepool_civil_service_desc"),reqs:{governor:1},grant:["governor",2],cost:{Plasmid:()=>1e3,Harmony:()=>1},action:()=>!!Se("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");E()}},hardened_genes:{id:"genes-hardened_genes",title:F("arpa_genepool_hardened_genes_title"),desc:F("arpa_genepool_hardened_genes_desc"),reqs:{},grant:["challenge",1],cost:{Plasmid:()=>5},action:()=>!!Se("hardened_genes")},unlocked:{id:"genes-unlocked",title:F("arpa_genepool_unlocked_title"),desc:F("arpa_genepool_unlocked_desc"),reqs:{challenge:1},grant:["challenge",2],cost:{Plasmid:()=>50},action:()=>!!Se("unlocked"),post(){Ls(!0)}},universal:{id:"genes-universal",title:F("arpa_genepool_universal_title"),desc:F("arpa_genepool_universal_desc"),reqs:{challenge:2},grant:["challenge",3],condition:()=>"standard"!==t.race.universe,cost:{Plasmid:()=>400},action:()=>!!Se("universal"),post(){Ls(!0)}},standard:{id:"genes-standard",title:F("arpa_genepool_standard_title"),desc:F("arpa_genepool_standard_desc"),reqs:{challenge:3},grant:["challenge",4],condition:()=>"standard"!==t.race.universe,cost:{Plasmid:()=>2500},action:()=>!!Se("standard"),post(){Ls(!0)}},mastered:{id:"genes-mastered",title:F("arpa_genepool_mastered_title"),desc:F("arpa_genepool_mastered_desc"),reqs:{challenge:4},grant:["challenge",5],cost:{Plasmid:()=>4e3},action:()=>!!Se("mastered")},negotiator:{id:"genes-negotiator",title:F("arpa_genepool_negotiator_title"),desc:F("arpa_genepool_negotiator_desc"),reqs:{challenge:2},grant:["trader",1],cost:{Plasmid:()=>750},action:()=>!!Se("negotiator")&&(t.genes.trader=1,Ne(),!0)},ancients:{id:"genes-ancients",title:F("arpa_genepool_ancients_title"),desc:F("arpa_genepool_ancients_desc"),reqs:{evolve:2},condition:()=>!!t.genes.old_gods,grant:["ancients",1],cost:{Plasmid:()=>120},action:()=>!!Se("ancients")&&(t.genes.ancients=1,Jr(),!0)},faith:{id:"genes-faith",title:F("arpa_genepool_faith_title"),desc:F("arpa_genepool_faith_desc"),reqs:{ancients:1},grant:["ancients",2],cost:{Plasmid:()=>300},action:()=>!!Se("faith")&&(t.civic.priest.display=!0,!0)},devotion:{id:"genes-devotion",title:F("arpa_genepool_devotion_title"),desc:F("arpa_genepool_devotion_desc"),reqs:{ancients:2},grant:["ancients",3],cost:{Plasmid:()=>600},action:()=>!!Se("devotion")},acolyte:{id:"genes-acolyte",title:F("arpa_genepool_acolyte_title"),desc:F("arpa_genepool_acolyte_desc"),reqs:{ancients:3},grant:["ancients",4],cost:{Plasmid:()=>1e3},action:()=>!!Se("acolyte")},conviction:{id:"genes-conviction",title:F("arpa_genepool_conviction_title"),desc:F("arpa_genepool_conviction_desc"),reqs:{ancients:4},grant:["ancients",5],cost:{Plasmid:()=>1500},action:()=>!!Se("conviction")},transcendence:{id:"genes-transcendence",title:F("arpa_genepool_transcendence_title"),desc:F("arpa_genepool_transcendence_desc"),reqs:{ancients:1,mutation:3},grant:["transcendence",1],cost:{Plasmid:()=>3e3},action:()=>!!Se("transcendence")&&(t.genes.transcendence=1,Jr(),!0)},bleeding_effect:{id:"genes-bleeding_effect",title:F("arpa_genepool_bleeding_effect_title"),desc:F("arpa_genepool_bleeding_effect_desc",[2.5]),reqs:{creep:2},grant:["bleed",1],condition:()=>"antimatter"===t.race.universe,cost:{Plasmid:()=>100},action:()=>!!Se("bleeding_effect")},synchronicity:{id:"genes-synchronicity",title:F("arpa_genepool_synchronicity_title"),desc:F("arpa_genepool_synchronicity_desc",[25]),reqs:{bleed:1},grant:["bleed",2],cost:{Plasmid:()=>500},action:()=>!!Se("synchronicity")},astral_awareness:{id:"genes-astral_awareness",title:F("arpa_genepool_astral_awareness_title"),desc:F("arpa_genepool_astral_awareness_desc"),reqs:{bleed:2},grant:["bleed",3],cost:{Plasmid:()=>1e3},action:()=>!!Se("astral_awareness")},blood_remembrance:{id:"genes-blood_remembrance",title:F("arpa_genepool_blood_remembrance_title"),desc:F("arpa_genepool_blood_remembrance_desc"),reqs:{},grant:["blood",1],condition:()=>t.prestige.Blood_Stone.count>=1,cost:{Plasmid:()=>1e3,Phage:()=>10},action:()=>!!Se("blood_remembrance")},blood_sacrifice:{id:"genes-blood_sacrifice",title:F("arpa_genepool_blood_sacrifice_title"),desc:F("arpa_genepool_blood_sacrifice_desc"),reqs:{blood:1},grant:["blood",2],cost:{Plasmid:()=>3e3,Phage:()=>100,Artifact:()=>1},action:()=>!!Se("blood_sacrifice")},essence_absorber:{id:"genes-essence_absorber",title:F("arpa_genepool_essence_absorber_title"),desc:F("arpa_genepool_essence_absorber_desc"),reqs:{blood:2},grant:["blood",3],cost:{Plasmid:()=>7500,Phage:()=>250,Artifact:()=>1},action:()=>!!Se("essence_absorber"),post(){Be()}}},Me={purify:{id:"blood-purify",title:F("arpa_blood_purify_title"),desc:F("arpa_blood_purify_desc"),reqs:{},grant:["spire",1],cost:{Blood_Stone:()=>10},action(){return!!Ce($(this)[0].cost)}},chum:{id:"blood-chum",title:F("arpa_blood_chum_title"),desc:F("arpa_blood_chum_desc"),reqs:{spire:1},grant:["spire",2],cost:{Blood_Stone:()=>25},action(){return!!Ce($(this)[0].cost)}},lust:{id:"blood-lust",title:F("arpa_blood_lust_title"),desc:F("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:()=>`${F("arpa_blood_repeat")}`,action(){return!!Ce($(this)[0].cost)}},illuminate:{id:"blood-illuminate",title:F("arpa_blood_illuminate_title"),desc:F("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:()=>`${F("arpa_blood_repeat")}`,action(){return!!Ce($(this)[0].cost)}},greed:{id:"blood-greed",title:F("arpa_blood_greed_title"),desc:F("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:()=>`${F("arpa_blood_repeat")}`,action(){return!!Ce($(this)[0].cost)}},hoarder:{id:"blood-hoarder",title:F("arpa_blood_hoarder_title"),desc:F("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:()=>`${F("arpa_blood_repeat")}`,action(){return!!Ce($(this)[0].cost)}},artisan:{id:"blood-artisan",title:F("arpa_blood_artisan_title"),desc:F("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:()=>`${F("arpa_blood_repeat")}`,action(){return!!Ce($(this)[0].cost)}},attract:{id:"blood-attract",title:F("arpa_blood_attract_title"),desc:F("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:()=>`${F("arpa_blood_repeat")}`,action(){return!!Ce($(this)[0].cost)}},wrath:{id:"blood-wrath",title:F("arpa_blood_wrath_title"),desc:F("arpa_blood_wrath_desc"),reqs:{},grant:["wrath","*"],cost:{Blood_Stone:e=>2*((e||0)+(t.blood.wrath||0))+2,Artifact:()=>1},effect:()=>`${F("arpa_blood_repeat")}`,action(){return!!Ce($(this)[0].cost)}},prepared:{id:"blood-prepared",title:F("arpa_blood_prepared_title"),desc:F("arpa_blood_prepared_desc"),reqs:{},grant:["prepared",1],condition:()=>!!(t.genes.blood&&t.genes.blood>=3),cost:{Blood_Stone:()=>50},action(){return!!Ce($(this)[0].cost)},post(){ba()}},compact:{id:"blood-compact",title:F("arpa_blood_compact_title"),desc:F("arpa_blood_compact_desc"),reqs:{prepared:1},grant:["prepared",2],condition:()=>!!(t.genes.blood&&t.genes.blood>=3),cost:{Blood_Stone:()=>75},action(){return!!Ce($(this)[0].cost)}},infernal:{id:"blood-infernal",title:F("arpa_blood_infernal_title"),desc:F("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!!Ce($(this)[0].cost)}},unbound:{id:"blood-unbound",title:F("arpa_blood_unbound_title"),desc:F("arpa_blood_unbound_desc"),reqs:{},grant:["unbound",1],cost:{Blood_Stone:()=>50},action(){return!!Ce($(this)[0].cost)}},unbound_resistance:{id:"blood-unbound_resistance",title:F("arpa_blood_unbound_resistance_title"),desc:F("arpa_blood_unbound_resistance_desc"),reqs:{unbound:1},grant:["unbound",2],cost:{Blood_Stone:()=>100},action(){return!!Ce($(this)[0].cost)}},shadow_war:{id:"blood-shadow_war",title:F("arpa_blood_shadow_war_title"),desc:F("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!!Ce($(this)[0].cost)}},unbound_immunity:{id:"blood-unbound_immunity",title:F("arpa_blood_unbound_immunity_title"),desc:F("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!!Ce($(this)[0].cost)}},blood_aware:{id:"blood-blood_aware",title:F("arpa_blood_blood_aware_title"),desc:F("arpa_blood_blood_aware_desc"),reqs:{},grant:["aware",1],condition:()=>!!(t.genes.blood&&t.genes.blood>=3),cost:{Blood_Stone:()=>10},action(){return!!Ce($(this)[0].cost)}}};function Se(e){let a=!0,r=Oe[e].cost;return Object.keys(r).forEach((function(e){let i=e;"Plasmid"===e&&"antimatter"===t.race.universe&&(e="AntiPlasmid"),t.prestige[e].countNumber(t.resource[r].amount))return a=!1,!1})),a}(e=Ie(e))&&(Object.keys(e).forEach((function(a){t.resource[a].amount-=e[a]()/100})),!0)}function Ie(e,a,r){return e=function(e,a,r){if(r&&r.creative||!r&&t.race.creative){var i={};let t=as("human");return Object.keys(e).forEach((function(s){i[s]=function(){let i=e[s](a,r);return i*=1-Ki.creative.vars()[1]/100,t>0&&(i*=1-Ki.creative.vars(1)[1]/100*t),i}})),i}return e}(e,a,r),Rs({cost:e},a,r)}function Te(e,a,r,i,s){var n=t.arpa[e]?t.arpa[e].rank:0;return(s&&s.creative||!s&&t.race.creative)&&"syphon"!==e&&(i-=Ki.creative.vars()[0]),a&&(n+=a),Math.round(i**n*r)}function Le(){if(t.tech.high_tech&&t.tech.high_tech>=6){let e=$("#arpaPhysics");Cs(e),Object.keys(Pe).forEach((function(a){!function(e,a){if(function(e){if(Pe[e].condition&&!Pe[e].condition())return!1;let a=t.race.truepath?"truepath":"standard";if(Pe[e].hasOwnProperty("path")&&!Pe[e].path.includes(a))return!1;var r=!0;return Object.keys(Pe[e].reqs).forEach((function(a){(!t.tech[a]||t.tech[a]=Pe[a].rank)return;let r=$(`
                `);e.append(r);let i="string"==typeof Pe[a].title?Pe[a].title:Pe[a].title(),s=$(`
                ${i}{{ rank | level }}
                `);r.append(s);let n=$('
                {{ complete }}%
                ');s.append(n);let c=$('
                ');r.append(c),c.append($(``)),c.append($(``)),c.append($(``)),c.append($(``)),c.append($(``)),zs({el:`#arpa${a}`,data:t.arpa[a],methods:{queue(e){if(t.tech.queue){let r=b();for(let i=0;i0))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 Pe[e].title?Pe[e].title:Pe[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})}bs()}}},build(e,a){!function(e,a,r,i){let s=!1;100===a&&(a=100-t.arpa[e].complete);for(let r=0;r=100&&(t.arpa[e].rank++,t.arpa[e].complete=0,t.tech[Pe[e].grant]=t.arpa[e].rank,s=!0,"monument"===e&&(t.arpa.m_type=ze(),$(`#arpa${e} .head .desc`).html(Pe[e].title()),hi(!1,["arpamonument"])),"roid_eject"===e&&($(`#arpa${e} .head .desc`).html(Pe[e].title()),hi(!1,["arparoid_eject"])),"launch_facility"===e&&(t.settings.showSpace=!0,t.tech.space=1,ds("popArpalaunch_facility"),[1,10,25,100].forEach((function(e){ds(`popArpalaunch_facility${e}`)})),gs(["arpalaunch_facility"]),Le(),Et(),ms(F("arpa_projects_launch_facility_msg"),"info",!1,["progress"])),t.race.inflation&&(t.race.inflation+=10),Jr()));{let t=[1,10,25,100],a=$("#popper"),r=a.data("id");for(let i=0;iP(Pe[a].desc),srLevel:()=>P(Pe[a].effect()),arpaProjectSRCosts(e,a){let r="100"===e?100-t.arpa[a].complete:e;var i=`Construct ${r}%. Costs:`,s=Ie(Pe[a].cost);return Object.keys(s).forEach((function(e){var a=+(s[e]()*(r/100)).toFixed(0);if(a>0){var n="Money"===e?"$":t.resource[e].name+": ",c=t.resource[e].amount>=a?"":` ${F("insufficient")} ${t.resource[e].name}.`;i+=` ${n} ${q(a,2)}.${c}`}})),i}},filters:{remain:e=>100-e,level:e=>F("arpa_level",[e])}}),_s(`popArpa${a}`,(function(){return Pe[a].desc}),{elm:`#arpa${a} .head .desc`,classes:"has-background-light has-text-dark"}),_s(`popArpa${a}`,(function(){return Pe[a].effect()}),{elm:`#arpa${a} .head .rank`,classes:"has-background-light has-text-dark"});let o=[1,10,25,100];for(let e=0;e1){let a=$('
                ');e.append(a);let r=t.tech.genetics>2?F("arpa_gene_mutation"):F("arpa_sequence_genome");t.race.artifical&&(r=t.tech.genetics>2?F("arpa_code_modification"):F("arpa_decompile_source"));let i=$(`
                ${r} - ${F("arpa_to_complete")}
                `);a.append(i);let s=$(`{{ progress }}%`);a.append(s);let n=t.tech.genetics>2?F("arpa_mutate"):F("arpa_sequence");t.race.artifical&&(n=t.tech.genetics>2?F("arpa_modify"):F("arpa_decompile"));let c=$(``);if(a.append(c),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"),zs({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=>F(t.race.artifical?"arpa_boost_artifical_label":"arpa_boost_label")+(e?t.arpa.sequence.boost?F("city_on"):F("city_off"):""),novo(){let e=b();for(let a=0;a=2e5;a++)t.resource.Knowledge.amount-=2e5,t.resource.Genes.amount++},novoLabel:()=>F(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=>F(t.race.artifical?"arpa_auto_compile_label":"arpa_auto_seq_label")+(e?t.arpa.sequence.boost?F("city_on"):F("city_off"):"")},filters:{timer(e){if(t.arpa.sequence.on&&t.arpa.sequence.labs>0)return t.arpa.sequence.boost?Fs(e/(2*t.arpa.sequence.labs)):Fs(e/t.arpa.sequence.labs);{let e=Js(14,12);return e.length>0?e:F("time_never")}}}}),_s("popArpaSeq",(function(){return t.tech.genetics>2?t.race.artifical?F("arpa_modify_desc"):F("arpa_mutate_desc"):t.race.artifical?F("arpa_decompile_desc"):F("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){Ki[e]&&"minor"===Ki[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,i=[];t.settings.mtorder.forEach((function(e){(Ki[e]&&"minor"===Ki[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=$(`
                `),i=$(`${t.resource.Genes.name} (${t.race.minor[a]||0})`);if(r.append(i),t.prestige.Phage.count>0){let e=$(`${F("resource_Phage_name")} (${t.genes.minor[a]||0})`);r.append(e)}let s=t.race[a]>1?`(${t.race[a]}) `:"";r.append(`${s}${rs("name",a)}`),e.append(r)}(a,e),i.push(e))})),e.append(`
                ${F("arpa_race_genetic_traids",[cn("name")])}
                `);let s=rs("name"),n=[],c=[],o=$('
                ');e.append(o);let l=nn(t.race);on("fool",2023)&&(l.hooved=1),Object.keys(l).forEach((function(e){if(Ki[e]&&"minor"!==Ki[e].type&&"special"!==Ki[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"===Ki[e].type&&t.genes.mutation||"genus"===Ki[e].type&&t.genes.mutation&&t.genes.mutation>=2)){let t=$('
                '),a=$(`${F("arpa_remove_button")}`);n.push(e),t.append(a),t.append($(`${s[e]?s[e]:Ki[e].name} (${F("arpa_genepool_rank",[l[e]])})`)),o.append(t)}else c.push(e),o.append(`
                ${s[e]?s[e]:Ki[e].name} (${F("arpa_genepool_rank",[l[e]])})
                `)}}));let _=[];if(t.genes.mutation&&t.genes.mutation>=3&&("sludge"!==t.race.species||!t.race.modified)){e.append(`
                ${F("arpa_race_genetic_gain")}
                `);let a=["dumb","smart"];Object.keys(Di).forEach((function(e){"junker"!==e&&"sludge"!==e&&"custom"!==e&&Di[e].type===Di[t.race.species].type&&Object.keys(Di[e].traits).forEach((function(e){if(!t.race[e]&&"soul_eater"!==e){let r=a.indexOf(e);if(-1===r)_.push(e);else{let i=!1;switch(r%2){case 0:t.race[a[r+1]]&&(i=!0);break;case 1:t.race[a[r-1]]&&(i=!0)}i||_.push(e)}}}))}));let r=$('
                ');e.append(r);for(let e=0;e<_.length;e++){let t=_[e],a=$('
                '),i=$(`${F("arpa_gain_button")}`);a.append(i),a.append($(`${s[t]?s[t]:Ki[t].name}`)),r.append(a)}}r&&e.prepend(`
                ${F("arpa_race_genetic_minor_traits",[cn("name")])}
                `);let d=function(e){let a=5*Ki[e].val;return"custom"!==t.race.species&&"sludge"!==t.race.species||(a*=10),a<0&&(a*=-1),F("arpa_remove",[rs("name",e),a,"antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name")])},p=function(e){let a=5*Ki[e].val;return"custom"!==t.race.species&&"sludge"!==t.race.species||(a*=10),a<0&&(a*=-1),F("arpa_gain",[rs("name",e),a,"antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name")])},u=function(e){let a=en(t.race.minor[e]?t.race.minor[e]+4:4);return"mastery"===e&&(a*=5),F("arpa_gene_buy",[rs("name",e),q(a),t.resource.Genes.name])},h=function(e){let a=en(t.genes.minor[e]?t.genes.minor[e]+4:4);return"mastery"===e&&(a*=2),F("arpa_phage_buy",[rs("name",e),q(a),F("resource_Phage_name")])};zs({el:"#geneticBreakdown",data:{genes:t.genes,race:t.race},methods:{gene(e){let a=0,r=b(),i=!0,s=!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,s=!0):i=!1,a++}s&&("mastery"===e&&Ls(!0),Ke(),"persuasive"===e&&Ne())},phage(e){let a=0,r=b(),i=!0,s=!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,s=!0):i=!1,a++}s&&("mastery"===e&&Ls(!0),Ke(),"persuasive"===e&&Ne())},purge(e){if("sludge"===t.race.species&&(t.race.modified||"ooze"===e))return;let a=5*Ki[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 i=t.race[e];delete t.race[e],t.race.modified?t.race.modified++:t.race.modified=1,Xi(e,i),Ke(),Jr(),Qr();let s=0;Object.keys(t.race).forEach((function(e){!Ki[e]||"major"!=Ki[e].type&&"genus"!=Ki[e].type||"evil"===e||s++})),0===s&&jn("blank_slate")}},gain(e){if("sludge"===t.race.species&&t.race.modified)return;let a=5*Ki[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,Zi(e),Ke(),Jr(),Qr())},geneCost:e=>u(e),phageCost:e=>h(e),traitEffect:e=>F(`trait_${e}_effect`),removeCost:e=>d(e),addCost:e=>p(e),genePurchasable(e){let a=en(t.race.minor[e]?t.race.minor[e]+4:4);return"mastery"===e&&(a*=5),t.resource.Genes.amount>=a},phagePurchasable(e){let a=en(t.genes.minor[e]?t.genes.minor[e]+4:4);return"mastery"===e&&(a*=2),t.prestige.Phage.count>=a}}}),i.forEach((function(e){_s(`popGenetrait${e}`,(function(){return u(e)}),{elm:`#geneticBreakdown .t-${e} .gbuy`,classes:"has-background-light has-text-dark"}),t.prestige.Phage.count>0&&_s(`popGenetrait${e}`,(function(){return h(e)}),{elm:`#geneticBreakdown .t-${e} .pbuy`,classes:"has-background-light has-text-dark"}),_s(`popGenetrait${e}`,(function(){return t.stats.feat.novice&&t.stats.achieve.apocalypse&&t.stats.achieve.apocalypse.l>0?`
                ${rs("desc",e)}
                ${F(`trait_${e}_effect`)}
                `:rs("desc",e)}),{elm:`#geneticBreakdown .t-${e} .name`,classes:"has-background-light has-text-dark"})})),n.forEach((function(e){_s(`popRemoveBkdwn${e}`,(function(){return d(e)}),{elm:`#geneticBreakdown .remove${e}`,classes:"has-background-light has-text-dark"});let a=`raceTrait${e}`,r=$("
                ");fn(r,e,{trank:t.race[e]}),_s(a,r,{wide:!0,classes:"w30"})})),c.forEach((function(e){let a=`raceTrait${e}`,r=$("
                ");fn(r,e,{trank:t.race[e]}),_s(a,r,{elm:`#geneticBreakdown .trait${e}`,wide:!0,classes:"w30"})})),_.forEach((function(e){_s(`popAddBkdwn${e}`,(function(){return p(e)}),{elm:`#geneticBreakdown .add${e}`,classes:"has-background-light has-text-dark"});let a=`raceTrait${e}`,r=$("
                ");fn(r,e,{trank:t.race[e]}),_s(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,Ke()}})}()}}function De(){(t.tech.genetics&&t.tech.genetics>3||t.sim)&&(Cs($("#arpaCrispr")),$("#arpaCrispr").append(`
                ${F("arpa_crispr_desc")}
                `),$("#arpaCrispr").append('
                '),Object.keys(Sr.genes).forEach((function(e){ai(Sr.genes[e].id),function(e){var a=!0;return Object.keys(Sr.genes[e].reqs).forEach((function(r){(!t.genes[r]||t.genes[r]=2&&(Cs($("#arpaBlood")),$("#arpaBlood").append(`
                ${F("arpa_blood_desc")}
                `),$("#arpaBlood").append('
                '),Object.keys(Sr.blood).forEach((function(e){ai(Sr.blood[e].id),function(e){var a=!0;return Object.keys(Sr.blood[e].reqs).forEach((function(r){(!t.blood[r]||t.blood[r]
                "),s=Ie(Pe[a].cost);let n=Ss(Pe[a],r/100,!1,!0);return Object.keys(s).forEach((function(e){var a=+(s[e]()*(r/100)).toFixed(0);if(a>0){var c="Money"===e?"$":t.resource[e].name+": ",o=t.resource[e].amount>=a?"has-text-dark":e===n.r?"has-text-danger":"has-text-alert";i.append($(`
                ${c}${q(a,2)}
                `))}})),i}function Ne(){Object.keys(t.resource).forEach((function(e){zs({el:`#market-${e}`},"update")})),zs({el:"#galaxyTrade"},"update")}const Re={spc_titan:{info:{name:()=>Vt().titan,desc:()=>F("space_titan_info_desc",[Vt().titan,Di[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:()=>F("space_mission_title",[Vt().titan]),desc:()=>F("space_mission_desc",[Vt().titan]),reqs:{outer:1},grant:["titan",1],path:["truepath"],queue_complete:()=>t.tech.titan>=1?0:1,cost:{Helium_3:(e,t)=>+Ht(25e4,!1,t).toFixed(0),Elerium:()=>100},effect:()=>F("space_titan_mission_effect",[Vt().titan]),action(){return!!ii($(this)[0])&&(ms(F("space_titan_mission_action",[Vt().titan,Di[t.race.species].home]),"info",!1,["progress"]),!0)}},titan_spaceport:{id:"space-titan_spaceport",title:F("space_red_spaceport_title"),desc:`
                ${F("space_red_spaceport_desc")}
                ${F("requires_power")}
                `,reqs:{titan:1},path:["truepath"],cost:{Money:e=>js("titan_spaceport",e,25e5,1.32),Lumber:e=>js("titan_spaceport",e,75e4,1.32),Cement:e=>js("titan_spaceport",e,35e4,1.32),Mythril:e=>js("titan_spaceport",e,1e4,1.32)},effect(){let e=t.resource.Water.display?`
                ${F("plus_max_resource",[q(wr(250)),t.resource.Water.name])}
                `:"";return`${t.tech.enceladus&&t.tech.enceladus>=2?`
                +${F("galaxy_alien2_support",[$(this)[0].support(),Vt().enceladus])}
                `:""}${e}${t.tech.titan&&t.tech.titan>=5?`
                ${F("space_titan_spaceport_storage",[25])}
                `:""}
                ${F("minus_power",[$(this)[0].powered()])}
                `},support:()=>2,powered:()=>Is(10),action(){return!!ii($(this)[0])&&(t.space.titan_spaceport.count++,ei($(this)[0]),!0)},post(){1===t.tech.titan&&(t.tech.titan=2,Jr())}},electrolysis:{id:"space-electrolysis",title:F("space_electrolysis_title"),desc:()=>`
                ${F("space_electrolysis_title")}
                ${F("space_electrolysis_req",[t.resource.Water.name])}
                `,reqs:{titan:3},path:["truepath"],cost:{Money:e=>js("electrolysis",e,1e6,1.25),Copper:e=>js("electrolysis",e,185e3,1.25),Steel:e=>js("electrolysis",e,22e4,1.25),Polymer:e=>js("electrolysis",e,38e4,1.25)},effect(){return`
                +${F("galaxy_alien2_support",[$(this)[0].support(),Vt().titan])}
                ${F("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&&s.ai_core2?3:2,support_fuel:()=>({r:"Water",a:35}),powered:()=>Is(8),action(){return!!ii($(this)[0])&&(t.space.electrolysis.count++,ei($(this)[0]),!0)},post(){3===t.tech.titan&&(t.tech.titan=4,Jr())}},hydrogen_plant:{id:"space-hydrogen_plant",title:F("space_hydrogen_plant_title"),desc:()=>`
                ${F("space_hydrogen_plant_title")}
                ${F("space_hydrogen_plant_req")}
                `,reqs:{titan_power:1},path:["truepath"],cost:{Money:e=>js("hydrogen_plant",e,15e5,1.28),Iridium:e=>js("hydrogen_plant",e,292e3,1.28),Stanene:e=>js("hydrogen_plant",e,599e3,1.28),Cement:e=>js("hydrogen_plant",e,18e4,1.28)},effect(){return`${F("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}, ${F("space_hydrogen_plant_effect",[1,F("space_electrolysis_title")])}`},support:()=>2,powered:()=>As(-22),action(){return!!ii($(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:F("interstellar_habitat_title"),desc:()=>`
                ${F("interstellar_habitat_title")}
                ${F("space_habitat_req",[Vt().titan,t.resource.Food.name,t.resource.Water.name])}
                `,reqs:{titan:4},path:["truepath"],cost:{Money:e=>js("titan_quarters",e,12e5,1.28),Furs:e=>js("titan_quarters",e,85e3,1.28),Plywood:e=>js("titan_quarters",e,1e5,1.28),Horseshoe:()=>t.race.hooved?1:0},effect(){let e=aa(1);return`
                ${F("space_used_support",[Vt().titan])}
                ${F("plus_max_resource",[aa(1),t.race.truepath?F("job_colonist_tp",[Vt().titan]):F("colonist")])}
                ${F("plus_max_resource",[e,F("citizen")])}
                ${F("spend",[$(this)[0].support_fuel()[0].a,t.resource[$(this)[0].support_fuel()[0].r].name])}
                ${F("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:()=>Is(1),action(){if(ii($(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-aa(1)<0?t.civic[t.civic.d_job].workers:aa(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*=Ki.high_pop.vars()[0]),e}},titan_mine:{id:"space-titan_mine",title:F("space_red_mine_title"),desc:()=>`
                ${F("space_red_mine_desc")}
                ${F("space_support",[Vt().titan])}
                `,reqs:{titan:4},condition:()=>!!(t.space.titan_quarters&&t.space.titan_quarters.count>0),path:["truepath"],cost:{Money:e=>js("titan_mine",e,475e3,1.28),Lumber:e=>js("titan_mine",e,568e3,1.28),Wrought_Iron:e=>js("titan_mine",e,25e4,1.28)},effect(){let e=xe("titan_mine","adamantite"),a=xe("titan_mine","aluminium"),r=+e.toFixed(3),i=+a.toFixed(3);return`
                ${F("space_used_support",[Vt().titan])}
                ${F("space_red_mine_effect",[r,t.resource.Adamantite.name])}
                ${F("space_red_mine_effect",[i,t.resource.Aluminium.name])}
                `},support:()=>-1,powered:()=>Is(1),special:()=>!0,action(){return!!ii($(this)[0])&&(t.space.titan_mine.count++,t.resource.Adamantite.display=!0,t.space.electrolysis.supportjs("storehouse",e,175e3,1.28),Lumber:e=>js("storehouse",e,1e5,1.28),Aluminium:e=>js("storehouse",e,12e4,1.28),Cement:e=>js("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=gt("storehouse",!1),r=gt("storehouse",!0);for(const i of $(this)[0].res())if(t.resource[i].display){let s=$(this)[0].heavy(i);e+=`${F("plus_max_resource",[q(+(wr($(this)[0].val(i))*(s?r:a)).toFixed(0),1),t.resource[i].name])}`}return e+="
                ",e},action(){if(ii($(this)[0])){t.space.storehouse.count++;let e=gt("storehouse",!1),a=gt("storehouse",!0);for(const r of $(this)[0].res())if(t.resource[r].display){let i=$(this)[0].heavy(r);t.resource[r].max+=wr($(this)[0].val(r))*(i?a:e)}return!0}return!1}},titan_bank:{id:"space-titan_bank",title:F("city_bank"),desc:()=>F("city_bank_desc",[Vt().titan]),reqs:{titan:6},path:["truepath"],cost:{Money:e=>js("titan_bank",e,25e5,1.32),Titanium:e=>js("titan_bank",e,38e4,1.32),Neutronium:e=>js("titan_bank",e,5e3,1.32)},effect(){let e=2*wi();return e=wr(e),e=(+e.toFixed(0)).toLocaleString(),F("plus_max_resource",[`$${e}`,F("resource_Money_name")])},action(){return!!ii($(this)[0])&&(t.resource.Money.max+=wr(1800),t.space.titan_bank.count++,!0)}},g_factory:{id:"space-g_factory",title:F("interstellar_g_factory_title"),desc:()=>`
                ${F("interstellar_g_factory_title")}
                ${F("space_support",[Vt().titan])}
                `,reqs:{graphene:1},path:["truepath"],cost:{Money:e=>js("g_factory",e,95e4,1.28),Copper:e=>js("g_factory",e,165e3,1.28),Stone:e=>js("g_factory",e,22e4,1.28),Adamantite:e=>js("g_factory",e,12500,1.28)},effect(){let e=.05;return t.race.high_pop&&(e=+$e(e).toFixed(3)),`
                ${F("space_used_support",[Vt().titan])}
                ${F("space_red_mine_effect",[e,t.resource.Graphene.name])}
                ${F("interstellar_g_factory_effect")}
                `},support:()=>-1,powered:()=>Is(1),special:!0,action(){return!!ii($(this)[0])&&(t.space.g_factory.count++,t.resource.Graphene.display=!0,t.space.electrolysis.support`
                ${F("space_sam_desc")}
                ${F("requires_power")}
                `,reqs:{titan:7},path:["truepath"],cost:{Money:e=>js("sam",e,25e5,1.28),Steel:e=>js("sam",e,45e4,1.28),Elerium:e=>js("sam",e,120,1.28),Brick:e=>js("sam",e,16e4,1.28)},effect(){return`
                ${F("galaxy_defense_platform_effect",[25])}
                ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(5),action(){return!!ii($(this)[0])&&(t.space.sam.count++,ei($(this)[0]),!0)},post(){zs({el:"#spc_titansynd"},"update")}},decoder:{id:"space-decoder",title:F("space_decoder_title"),desc:()=>`
                ${F("space_decoder_title")}
                ${F("requires_power_support_combo",[Vt().titan,t.resource.Cipher.name])}
                `,reqs:{titan:8},path:["truepath"],cost:{Money:e=>js("decoder",e,125e5,1.275),Elerium:e=>js("decoder",e,750,1.275),Orichalcum:e=>js("decoder",e,33e4,1.275),Quantium:e=>js("decoder",e,18e4,1.275)},effect(){let e=$(this)[0].support_fuel().a,a=2500;t.race.high_pop&&(a=$e(a)),s.ai_core2&&(a*=1.25);let r=`
                ${F("space_used_support",[Vt().titan])}
                `;return r+=`
                ${F("space_red_exotic_lab_effect1",[a])}
                `,r+`
                ${F("spend",[e,t.resource[$(this)[0].support_fuel().r].name])}
                `},support:()=>-1,powered:()=>Is(1),support_fuel:()=>({r:"Cipher",a:.06}),action(){return!!ii($(this)[0])&&(t.space.decoder.count++,t.space.electrolysis.support!t.space.hasOwnProperty("ai_core")||t.space.ai_core.count<100||e?`
                ${F("space_ai_core")}
                ${F("requires_segmemts",[100])}
                `+(t.space.hasOwnProperty("ai_core")&&t.space.ai_core.count>=100?`
                ${F("requires_power")}
                `:""):`
                ${F("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=`
                ${F("space_ai_core_effect")}
                `,r=(e||0)+(t.space.hasOwnProperty("ai_core")?t.space.ai_core.count:0);return r<100?(a+=`
                ${F("space_dwarf_collider_effect2",[100-r])}
                `,a):Re.spc_titan.ai_core2.effect()},action(){return!!(ii($(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>=Re.spc_titan.ai_core2.powered()&&t.space.ai_core2.on++,Et(),Jr()),!0)}},ai_core2:{id:"space-ai_core2",title:F("space_ai_core"),desc(){return`
                ${F("space_ai_core")}
                ${F("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:()=>Is(100),p_fuel:()=>({r:"Water",a:1e3}),effect(){let e=`
                ${F("interstellar_citadel_stat",[+_.toFixed(1)])}
                `;return e+=`
                ${F("interstellar_citadel_effect",[25])}
                ${F("space_ai_core_effect2",[25])}
                `,t.tech.titan_ai_core&&t.tech.titan_ai_core>=2&&(e+=`
                ${F("space_ai_core_effect3",[50])}
                `),e+=`
                ${F("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+=`
                ${F("space_ai_core_effect4",[+function(){let e=0;return s.ai_colonist&&n.decoder&&(e+=s.ai_colonist*n.decoder*.35),n.shock_trooper&&(e+=2*n.shock_trooper),n.tank&&(e+=2*n.tank),e>100&&(e=100),e}().toFixed(1)])}
                `),e},action:()=>!1,flair:()=>t.space.hasOwnProperty("ai_core2")&&t.space.ai_core2.on>=1?F("space_ai_core_flair"):F("space_ai_core_flair2")},ai_colonist:{id:"space-ai_colonist",title:F("space_ai_colonist_title"),desc:()=>`
                ${F("space_ai_colonist_title")}
                ${F("requires_power")}
                `,reqs:{titan_ai_core:3},path:["truepath"],cost:{Money:e=>js("ai_colonist",e,112e6,1.35),Alloy:e=>js("ai_colonist",e,75e4,1.35),Elerium:e=>js("ai_colonist",e,500,1.35),Nano_Tube:e=>js("ai_colonist",e,525e3,1.35),Quantium:e=>js("ai_colonist",e,15e4,1.35),Cipher:e=>js("ai_colonist",e,1e4,1.35)},effect(){return`
                ${F("plus_max_resource",[aa(1),t.race.truepath?F("job_colonist_tp",[Vt().titan]):F("colonist")])}
                ${F("space_ai_colonist_effect",[aa(1),Vt().titan])}
                ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(10),action(){return!!ii($(this)[0])&&(t.space.ai_colonist.count++,ei($(this)[0]),!0)},flair:F("tech_combat_droids_flair")}},spc_enceladus:{info:{name:()=>Vt().enceladus,desc:()=>F("space_enceladus_info_desc",[Vt().enceladus,Di[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:()=>F("space_mission_title",[Vt().enceladus]),desc:()=>F("space_mission_desc",[Vt().enceladus]),reqs:{outer:1},grant:["enceladus",1],path:["truepath"],queue_complete:()=>t.tech.enceladus>=1?0:1,cost:{Helium_3:(e,t)=>+Ht(25e4,!1,t).toFixed(0),Elerium:()=>100},effect:()=>F("space_titan_mission_effect",[Vt().enceladus]),action(){return!!ii($(this)[0])&&(ms(F("space_enceladus_mission_action",[Vt().enceladus]),"info",!1,["progress"]),t.resource.Water.display=!0,!0)}},water_freighter:{id:"space-water_freighter",title:F("space_water_freighter_title"),desc:()=>`
                ${F("space_water_freighter_title")}
                ${F("space_support",[Vt().enceladus])}
                `,reqs:{enceladus:2},path:["truepath"],cost:{Money:e=>js("water_freighter",e,45e4,1.25),Iron:e=>js("water_freighter",e,362e3,1.25),Nano_Tube:e=>js("water_freighter",e,125e3,1.25),Sheet_Metal:e=>js("water_freighter",e,75e3,1.25)},effect(e){let a=+Ht(5,!0,e).toFixed(2),r=+xe("water_freighter").toFixed(2);return`
                ${F("space_used_support",[Vt().enceladus])}
                ${F("produce",[r,t.resource.Water.name])}
                ${F("space_belt_station_effect3",[a])}
                `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(t.space.water_freighter.count++,t.space.titan_spaceport.support`
                ${F("tech_zero_g_lab")}
                ${F("requires_power_support",[Vt().enceladus])}
                `,reqs:{enceladus:3},path:["truepath"],cost:{Money:e=>js("zero_g_lab",e,5e6,1.25),Alloy:e=>js("zero_g_lab",e,125e3,1.25),Graphene:e=>js("zero_g_lab",e,225e3,1.25),Stanene:e=>js("zero_g_lab",e,6e5,1.25)},effect(){let e=_t("spc_enceladus"),a=Math.round(1e4*e),r=`
                ${F("space_used_support",[Vt().enceladus])}
                ${F("city_max_knowledge",[a])}
                `;return t.resource.Quantium.display&&(r+=`
                ${F("space_zero_g_lab_effect",[aa(1)])}
                `),t.resource.Cipher.display&&(r+=`
                ${F("plus_max_resource",[1e4,t.resource.Cipher.name])}
                `),r+`
                ${F("minus_power",[$(this)[0].powered()])}
                `},support:()=>-1,powered:()=>Is(12),action(){return!!ii($(this)[0])&&(t.space.zero_g_lab.count++,t.space.titan_spaceport.support`
                ${F("tech_operating_base")}
                ${F("requires_power_support",[Vt().enceladus])}
                `,reqs:{enceladus:4},path:["truepath"],cost:{Money:e=>js("operating_base",e,75e5,1.3),Furs:e=>js("operating_base",e,5e5,1.3),Adamantite:e=>js("operating_base",e,375e3,1.3),Stanene:e=>js("operating_base",e,75e4,1.3),Mythril:e=>js("operating_base",e,225e3,1.3),Horseshoe:()=>t.race.hooved?4:0},effect(){let e=`
                ${F("space_used_support",[Vt().enceladus])}
                `;return e+=`
                ${F("galaxy_defense_platform_effect",[50])}
                `,e+=F("plus_max_resource",[aa(4),F("civics_garrison_soldiers")]),t.race.orbit_decayed&&(e+=`
                ${F("city_hospital_effect",[5*t.tech.medic])}
                `),e+`
                ${F("minus_power",[$(this)[0].powered()])}
                `},support:()=>-1,powered:()=>Is(10),action(){return!!ii($(this)[0])&&(t.space.operating_base.count++,t.space.titan_spaceport.supportjs("munitions_depot",e,5e6,1.22),Iron:e=>js("munitions_depot",e,185e3,1.22),Sheet_Metal:e=>js("munitions_depot",e,1e5,1.22)},effect:()=>`
                ${F("plus_max_crates",[25])}
                ${F("plus_max_containers",[25])}
                `,action(){return!!ii($(this)[0])&&(t.space.munitions_depot.count++,t.resource.Crates.max+=25,t.resource.Containers.max+=25,!0)}}},spc_triton:{info:{name:()=>Vt().triton,desc:()=>F("space_triton_info_desc",[Vt().triton,Di[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(`
                ${F("space_ground_resist")}
                `),zs({el:`#${e}resist`,data:t.space.fob,methods:{threat(e,a){let r=t.civic.garrison.wounded-ke();r<0&&(r=0);let i=+(e-we(a,"army",r)).toFixed(0);return i<0?0:i}}}))}},triton_mission:{id:"space-triton_mission",title:()=>F("space_mission_title",[Vt().triton]),desc:()=>F("space_mission_desc",[Vt().triton]),reqs:{outer:2},grant:["triton",1],path:["truepath"],queue_complete:()=>t.tech.triton>=1?0:1,cost:{Helium_3:(e,t)=>+Ht(6e5,!1,t).toFixed(0),Elerium:()=>2500},effect:()=>F("space_triton_mission_effect",[Vt().triton]),action(){return!!ii($(this)[0])&&(ms(F("space_triton_mission_action",[Vt().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:F("space_fob_title"),desc:()=>`
                ${F("tech_fob")}
                ${F("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:js("fob",e,25e7,1.1),Copper:e=>(e||0)+(t.space.hasOwnProperty("fob")?t.space.fob.count:0)>=1?0:js("fob",e,8e6,1.1),Uranium:e=>(e||0)+(t.space.hasOwnProperty("fob")?t.space.fob.count:0)>=1?0:js("fob",e,5e4,1.1),Nano_Tube:e=>(e||0)+(t.space.hasOwnProperty("fob")?t.space.fob.count:0)>=1?0:js("fob",e,25e5,1.1),Graphene:e=>(e||0)+(t.space.hasOwnProperty("fob")?t.space.fob.count:0)>=1?0:js("fob",e,3e6,1.1),Sheet_Metal:e=>(e||0)+(t.space.hasOwnProperty("fob")?t.space.fob.count:0)>=1?0:js("fob",e,75e5,1.1),Quantium:e=>(e||0)+(t.space.hasOwnProperty("fob")?t.space.fob.count:0)>=1?0:js("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=ke(),r=ke(!0),i=`
                ${F("galaxy_defense_platform_effect",[500])}
                `;i+=F("plus_max_resource",[aa(10),F("civics_garrison_soldiers")]),i+=`
                ${F("civics_garrison_soldiers")}: ${a} / ${r}
                `,i+=`
                ${F("civics_garrison_wounded")}: ${t.civic.garrison?t.civic.garrison.wounded:0}
                `,i+=`
                ${F("space_fob_landed",[t.space.fob?t.space.fob.troops:0])}
                `;let s=+Ht(125,!0,e).toFixed(2);return i+`
                ${F("requires_power_combo_effect",[$(this)[0].powered(),s,t.resource.Helium_3.name])}
                `},powered:()=>Is(50),action(){return!!(t.space.fob.count<1&&ii($(this)[0]))&&(t.space.fob.count++,ei($(this)[0]),!0)},post(){2===t.tech.triton&&(t.tech.triton=3,Jr(),Et(),ms(F("space_fob_msg"),"info",!1,["progress"]))}},lander:{id:"space-lander",title:F("space_lander_title"),desc:()=>`
                ${F("space_lander_title")}
                ${F("requires_soldiers")}
                ${F("space_red_space_barracks_desc_req")}
                `,reqs:{triton:3},path:["truepath"],cost:{Money:e=>js("lander",e,24e5,1.15),Aluminium:e=>js("lander",e,185e3,1.15),Neutronium:e=>js("lander",e,1e4,1.15),Nano_Tube:e=>js("lander",e,158e3,1.15)},powered:()=>Is(1),effect(e){let a=+Ht(50,!0,e).toFixed(2),r="";return t.space.crashed_ship&&100===t.space.crashed_ship.count&&(r=`
                ${F("space_lander_effect3",[xe("lander"),t.resource.Cipher.name])}
                `),`
                ${F("space_lander_effect",[Vt().triton])}
                ${r}
                ${F("space_lander_effect2",[aa(3)])}
                ${F("space_red_space_barracks_effect2",[a])}
                `},action(){return!!ii($(this)[0])&&(t.space.lander.count++,t.space.lander.on++,!0)}},crashed_ship:{id:"space-crashed_ship",title:F("space_crashed_ship_title"),desc:()=>`
                ${F("space_crashed_ship_title")}
                `,reqs:{triton:3},path:["truepath"],queue_complete:()=>0,cost:{},effect:()=>`
                ${F("space_crashed_ship_effect",[t.space.crashed_ship?t.space.crashed_ship.count:0])}
                `,action:()=>!1}},spc_kuiper:{info:{name:()=>F("space_kuiper_title"),desc:()=>F("space_kuiper_desc"),zone:"outer",syndicate:()=>!!t.tech.kuiper,syndicate_cap:()=>2500},kuiper_mission:{id:"space-kuiper_mission",title:()=>F("space_mission_title",[F("space_kuiper_title")]),desc:()=>F("space_mission_desc",[F("space_kuiper_title")]),reqs:{outer:7},grant:["kuiper",1],path:["truepath"],queue_complete:()=>t.tech.kuiper>=1?0:1,cost:{Helium_3:(e,t)=>+Ht(1e6,!1,t).toFixed(0),Elerium:()=>1e3},effect:()=>F("space_kuiper_mission_effect"),action(){return!!ii($(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,ms(F("space_kuiper_mission_action"),"info",!1,["progress"]),!0)}},orichalcum_mine:{id:"space-orichalcum_mine",title:()=>F("space_kuiper_mine",[t.resource.Orichalcum.name]),desc:()=>`
                ${F("space_kuiper_mine",[t.resource.Orichalcum.name])}
                ${F("requires_power_combo",[t.resource.Oil.name])}
                `,reqs:{kuiper:1},path:["truepath"],cost:{Money:e=>js("orichalcum_mine",e,25e6,1.25),Graphene:e=>js("orichalcum_mine",e,9e5,1.25),Elerium:e=>js("orichalcum_mine",e,200,1.25),Mythril:e=>js("orichalcum_mine",e,45e4,1.25),Quantium:e=>js("orichalcum_mine",e,15e4,1.25)},effect(e){let a=+xe("orichalcum_mine").toFixed(3),r=+Ht($(this)[0].p_fuel().a,!0,e).toFixed(1);return`
                ${F("gain",[a,F("resource_Orichalcum_name")])}
                ${F("requires_power_combo_effect",[$(this)[0].powered(),r,t.resource[$(this)[0].p_fuel().r].name])}
                `},powered:()=>Is(10),p_fuel:()=>({r:"Oil",a:200}),action(){return!!ii($(this)[0])&&(t.space.orichalcum_mine.count++,t.resource.Orichalcum.display=!0,ei($(this)[0]),!0)}},uranium_mine:{id:"space-uranium_mine",title:()=>F("space_kuiper_mine",[t.resource.Uranium.name]),desc:()=>`
                ${F("space_kuiper_mine",[t.resource.Uranium.name])}
                ${F("requires_power_combo",[t.resource.Oil.name])}
                `,reqs:{kuiper:1},path:["truepath"],cost:{Money:e=>js("uranium_mine",e,5e6,1.25),Iridium:e=>js("uranium_mine",e,25e4,1.25),Steel:e=>js("uranium_mine",e,62e4,1.25)},effect(e){let a=+xe("uranium_mine").toFixed(3),r=+Ht($(this)[0].p_fuel().a,!0,e).toFixed(1);return`
                ${F("gain",[a,F("resource_Uranium_name")])}
                ${F("requires_power_combo_effect",[$(this)[0].powered(),r,t.resource[$(this)[0].p_fuel().r].name])}
                `},powered:()=>Is(5),p_fuel:()=>({r:"Oil",a:60}),action(){return!!ii($(this)[0])&&(t.space.uranium_mine.count++,ei($(this)[0]),!0)}},neutronium_mine:{id:"space-neutronium_mine",title:()=>F("space_kuiper_mine",[t.resource.Neutronium.name]),desc:()=>`
                ${F("space_kuiper_mine",[t.resource.Neutronium.name])}
                ${F("requires_power_combo",[t.resource.Oil.name])}
                `,reqs:{kuiper:1},path:["truepath"],cost:{Money:e=>js("neutronium_mine",e,8e6,1.25),Adamantite:e=>js("neutronium_mine",e,65e4,1.25),Stanene:e=>js("neutronium_mine",e,125e4,1.25)},effect(e){let a=+xe("neutronium_mine").toFixed(3),r=+Ht($(this)[0].p_fuel().a,!0,e).toFixed(1);return`
                ${F("gain",[a,F("resource_Neutronium_name")])}
                ${F("requires_power_combo_effect",[$(this)[0].powered(),r,t.resource[$(this)[0].p_fuel().r].name])}
                `},powered:()=>Is(8),p_fuel:()=>({r:"Oil",a:60}),action(){return!!ii($(this)[0])&&(t.space.neutronium_mine.count++,ei($(this)[0]),!0)}},elerium_mine:{id:"space-elerium_mine",title:()=>F("space_kuiper_mine",[t.resource.Elerium.name]),desc:()=>`
                ${F("space_kuiper_mine",[t.resource.Elerium.name])}
                ${F("requires_power_combo",[t.resource.Oil.name])}
                `,reqs:{kuiper:2},path:["truepath"],cost:{Money:e=>js("elerium_mine",e,2e7,1.25),Titanium:e=>js("elerium_mine",e,25e4,1.25),Neutronium:e=>js("elerium_mine",e,12e4,1.25),Orichalcum:e=>js("elerium_mine",e,175e3,1.25)},effect(e){let a=+xe("elerium_mine").toFixed(3),r=+Ht($(this)[0].p_fuel().a,!0,e).toFixed(1);return`
                ${F("gain",[a,F("resource_Elerium_name")])}
                ${F("requires_power_combo_effect",[$(this)[0].powered(),r,t.resource[$(this)[0].p_fuel().r].name])}
                `},powered:()=>Is(12),p_fuel:()=>({r:"Oil",a:125}),action(){return!!ii($(this)[0])&&(t.space.elerium_mine.count++,ei($(this)[0]),!0)}}},spc_eris:{info:{name:()=>Vt().eris,desc:()=>F("space_eris_info_desc",[Vt().eris]),support:"drone_control",zone:"outer",syndicate:()=>!!t.tech.eris,syndicate_cap:()=>7500,extra(e){t.tech.eris&&1===t.tech.eris&&($(`#${e}`).append(`
                ${F("space_scanned")} {{ eris_scan }}%
                `),zs({el:`#${e}scanned`,data:t.tech}))}},eris_mission:{id:"space-eris_mission",title:()=>F("space_mission_title",[Vt().eris]),desc:()=>F("space_mission_desc",[Vt().eris]),reqs:{outer:7},grant:["eris",1],path:["truepath"],queue_complete:()=>t.tech.eris>=1?0:1,cost:{Helium_3:(e,t)=>+Ht(125e4,!1,t).toFixed(0),Elerium:()=>1250},effect:()=>F("space_eris_mission_effect",[Vt().eris]),action(){return!!ii($(this)[0])&&(t.space.syndicate.spc_eris=4e3,ms(F("space_eris_mission_action",[Vt().eris]),"info",!1,["progress"]),!0)}},drone_control:{id:"space-drone_control",title:()=>F("space_drone_control",[Vt().titan]),desc(){return`
                ${F("space_drone_control",[Vt().titan])}
                ${F("requires_power_combo",[t.resource[$(this)[0].p_fuel().r].name])}
                `},reqs:{eris:3},path:["truepath"],cost:{Money:e=>js("drone_control",e,75e6,1.3),Neutronium:e=>js("drone_control",e,1e5,1.3),Stanene:e=>js("drone_control",e,45e4,1.3),Quantium:e=>js("drone_control",e,3e5,1.3)},effect(){let e=$(this)[0].p_fuel().a;return`
                +${F("galaxy_alien2_support",[$(this)[0].support(),Vt().eris])}
                ${F("requires_power_combo_effect",[$(this)[0].powered(),e,t.resource[$(this)[0].p_fuel().r].name])}
                `},support:()=>5,powered:()=>Is(25),p_fuel:()=>({r:"Uranium",a:5}),action(){return!!ii($(this)[0])&&(t.space.drone_control.count++,ei($(this)[0]),!0)}},shock_trooper:{id:"space-shock_trooper",title:F("space_shock_trooper_title"),desc:()=>`
                ${F("space_shock_trooper_title")}
                ${F("space_support",[Vt().eris])}
                `,reqs:{eris:3},path:["truepath"],cost:{Money:e=>js("shock_trooper",e,425e4,1.225),Polymer:e=>js("shock_trooper",e,375e3,1.225),Adamantite:e=>js("shock_trooper",e,5e5,1.225),Graphene:e=>js("shock_trooper",e,22e4,1.225),Elerium:e=>js("shock_trooper",e,350,1.225)},effect(){let e=Math.round(we(1,"army",0)*_t("spc_eris")),a=`
                ${F("space_used_support",[Vt().eris])}
                `;return t.space.digsite&&100===t.space.digsite.count&&(a=`
                ${F("space_lander_effect3",[xe("shock_trooper"),t.resource.Cipher.name])}
                `),a+`
                ${F("space_digsite_offense",[e])}
                `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(t.space.shock_trooper.count++,t.space.drone_control.support`
                ${F("space_tank_title")}
                ${F("space_support",[Vt().eris])}
                `,reqs:{eris:4},path:["truepath"],cost:{Money:e=>js("tank",e,1e8,1.25),Alloy:e=>js("tank",e,125e4,1.25),Orichalcum:e=>js("tank",e,6e5,1.25),Mythril:e=>js("tank",e,5e5,1.25),Uranium:e=>js("tank",e,25e3,1.25)},effect(){let e=Math.round(100*_t("spc_eris")),a=`
                ${F("space_used_support",[Vt().eris])}
                `;return t.space.digsite&&100===t.space.digsite.count&&(a=`
                ${F("space_lander_effect3",[xe("tank"),t.resource.Cipher.name])}
                `),a+`
                ${F("space_digsite_offense",[e])}
                `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(t.space.tank.count++,t.space.drone_control.support`
                ${F("space_digsite_title")}
                `,reqs:{eris:3},path:["truepath"],queue_complete:()=>0,cost:{},effect:()=>`
                ${F("space_crashed_ship_effect",[t.space.digsite?t.space.digsite.count:0])}
                `,action:()=>!1}}},He={tau_star:{info:{name:()=>F("tab_tauceti"),desc:()=>F("tau_star",[F("tab_tauceti"),F("space_sun_info_name")])},ringworld:{id:"tauceti-ringworld",title:F("tau_star_ringworld"),desc:e=>!t.tauceti.hasOwnProperty("ringworld")||t.tauceti.ringworld.count<1e3||e?`
                ${F("tau_star_ringworld")}
                ${F("requires_segmemts",[1e3])}
                `:`
                ${F("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?We(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+=`
                ${F("tau_star_ringworld_effect")}
                `,a+=`
                ${F("space_dwarf_collider_effect2",[e])}
                `}else a+=`
                ${F("space_dwarf_reactor_effect1",[t.race.lone_survivor?100:1e4])}
                `;return a},action(){return!!(ii($(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}),Ze(),ds()),!0)}},matrix:{id:"tauceti-matrix",title:F("tau_star_matrix"),desc:()=>`
                ${F("tau_star_matrix")}
                ${F("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=s.matrix?4:3,Ze()}),250):(t.tech.matrix=3,Ze())},effect(){let e=Ue(),t=$(this)[0].powered(),a=t>0?`
                ${F("minus_power",[t])}
                `:"";return`
                ${F("tau_star_matrix_effect")}
                ${e}${a}`},action:()=>!1},blue_pill:{id:"tauceti-blue_pill",title:F("tau_star_blue_pill"),desc:F("tau_star_blue_pill"),wiki:!1,reqs:{matrix:4},queue_complete:()=>0,no_multi:!0,cost:{},effect(){let e=Ue();return`
                ${F("tau_star_blue_pill_effect")}
                ${e}`},action(){if(ii($(this)[0])){$("body").append('');const a=document.getElementById("matrix"),r=a.getContext("2d"),i=a.width=document.body.offsetWidth,s=a.height=document.body.offsetHeight,n=Math.floor(i/20)+1,c=Array(n).fill(0);function o(){r.fillStyle="#0001",r.fillRect(0,0,i,s),r.fillStyle="#0f0",r.font="15pt monospace",c.forEach(((e,t)=>{const a=String.fromCharCode(Math.rand(65382,65438)),i=20*t;r.fillText(a,i,e),e>100+1e4*Math.random()?c[t]=0:c[t]=e+20}))}return setInterval(o,50),setTimeout((function(){!function(){j.w&&j.w.terminate(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),M(),$s("reset",{end:"matrix"});let a=t.race.species,r=t.race.gods,i=Di[a].type,s=t.city.calendar.orbit,n=t.city.biome,c=t.city.ptrait,o=t.city.geology,l=Ns("matrix");Pn(`biome_${n}`),c.forEach((function(e){ns.hasOwnProperty(e)&&Pn(`atmo_${e}`)})),Pn(`genus_${i}`),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&Pn("gross"),Pn("bluepill"),V(),Cn(),t.stats.matrix++,sn(),"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 _=!!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),_&&(t.race.srace=_),U({orbit:s,biome:n,ptrait:c,geology:o}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}()}),5e3),!0}return!1}},goe_facility:{id:"tauceti-goe_facility",title:F("tau_star_goe_facility"),desc:()=>`
                ${F("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=Ns("eden"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name");return`
                ${F("interstellar_ascension_trigger_effect2",[e.plasmid,a])}
                ${F("interstellar_ascension_trigger_effect2",[e.phage,F("resource_Phage_name")])}
                ${F("tau_star_matrix_servants",[1])}
                `}();return`
                ${F("tau_star_goe_facility_effect")}
                ${e}`},action(){if(ii($(this)[0])){let a=Rs(He.tau_star.goe_facility);return Object.keys(a).forEach((function(e){t.resource[e].amount+=a[e]()})),function(){j.w&&j.w.terminate(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),M(),$s("reset",{end:"eden"});let a=t.race.species,r=t.race.gods,i=Di[a].type,s=t.city.calendar.orbit,n=t.city.biome,c=t.city.ptrait,o=t.city.geology,l=Ns("eden");Pn(`biome_${n}`),c.forEach((function(e){ns.hasOwnProperty(e)&&Pn(`atmo_${e}`)})),Pn(`genus_${i}`),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&Pn("gross"),Pn("adam_eve"),V(),Cn(),t.stats.eden++,sn(),"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 _=!!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),_&&(t.race.srace=_),U({orbit:s,biome:n,ptrait:c,geology:o}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}(),!1}return!1}}},tau_home:{info:{name:()=>F("tau_planet",[Di[t.race.species].home]),desc:()=>F("tau_home",[Di[t.race.species].home]),support:"orbital_station",extra(e){t.tech.tau_home&&t.tech.tau_home>=2&&!Je()&&($(`#${e}`).append(`
                ${F("resource_Materials_name")} {{ amount | round }} / {{ max }}
                `),zs({el:`#${e}Mats`,data:t.resource.Materials,methods:{tauShow:()=>!Je()},filters:{round:e=>+e.toFixed(0)}}))}},home_mission:{id:"tauceti-home_mission",title:()=>F("tau_new_mission_title",[Di[t.race.species].home]),desc:()=>F("tau_new_mission_title",[Di[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:()=>F("tau_new_mission_effect",[Di[t.race.species].home]),action(){return!!ii($(this)[0])&&(t.tauceti.colony={count:0,on:0},t.tauceti.mining_pit={count:0,on:0},ms(F("tau_home_mission_result",[Di[t.race.species].home]),"info",!1,["progress"]),!0)}},dismantle:{id:"tauceti-dismantle",title:()=>F("tau_home_dismantle"),desc:()=>F("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 F("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&&ii($(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>=He.tau_home.orbital_station.powered()){t.tauceti.orbital_station.on++,t.tauceti.colony.on++,t.tauceti.mining_pit.on++;let e=aa(4);t.civic[t.civic.d_job].workers${F("tau_home_orbital_station")}
                ${F("requires_power")}
                `,reqs:{tau_home:2},path:["truepath"],cost:{Money:e=>js("orbital_station",e,8e7,1.3,"tauceti"),Materials:e=>Je()?0:js("orbital_station",e,5e5,1.3,"tauceti"),Helium_3:e=>Je()?js("orbital_station",e,Ut(25e4),1.3,"tauceti"):0,Copper:e=>Je()?js("orbital_station",e,125e4,1.3,"tauceti"):0,Adamantite:e=>Je()?js("orbital_station",e,9e5,1.3,"tauceti"):0},effect(){let e=wr(15e3),a=+Ut($(this)[0].support_fuel().a).toFixed(1),r=`
                ${F("space_red_spaceport_effect1",[F("tau_planet",[Di[t.race.species].home]),$(this)[0].support()])}
                `;return r+=`
                ${F("plus_max_resource",[e.toLocaleString(),t.resource.Helium_3.name])}
                `,r+=`
                ${F("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:()=>Is(t.tech.isolation?t.race.lone_survivor?4:6:30),refresh:!0,action(){return!!ii($(this)[0])&&(t.tauceti.orbital_station.count++,ei($(this)[0]),!0)}},colony:{id:"tauceti-colony",title:F("tau_home_colony"),desc:()=>`
                ${F("tau_home_colony_desc",[Di[t.race.species].home])}
                ${F("requires_power_support_combo",[Di[t.race.species].home,t.resource.Food.name])}
                `,reqs:{tau_home:2},path:["truepath"],cost:{Money:e=>js("colony",e,1575e4,1.225,"tauceti"),Materials:e=>Je()?0:js("colony",e,65e4,1.225,"tauceti"),Furs:e=>Je()?js("colony",e,72e4,1.225,"tauceti"):0,Graphene:e=>Je()?js("colony",e,485e3,1.225,"tauceti"):0,Brick:e=>Je()?js("colony",e,We(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),i=`
                ${F("tau_new_support",[$(this)[0].support(),Di[t.race.species].home])}
                `;if(t.race.lone_survivor||(i+=`
                ${F("plus_max_citizens",[e])}
                `),t.tech.isolation){let e=25*wi();e=wr(e),e=(+e.toFixed(0)).toLocaleString(),i+=`
                ${F("plus_max_resource",[`$${e}`,F("resource_Money_name")])}
                `}if(i+=`
                ${F("tau_home_colony_effect",[50,Di[t.race.species].home])}
                `,t.tech.isolation){let e=D("gaslighter",0);i+=`
                ${F("space_red_vr_center_effect1",[2*(e?e+t.tech.broadcast:t.tech.broadcast)])}
                `}return i+=`
                ${F("plus_max_resource",[a,F("resource_Crates_name")])}
                ${F("plus_max_resource",[a,F("resource_Containers_name")])}
                `,t.race.lone_survivor?i+=`
                ${F("gain",[-r,t.resource[$(this)[0].support_fuel().r].name])}
                `:i+=`
                ${F("spend",[r,t.resource[$(this)[0].support_fuel().r].name])}
                `,i},support:()=>-2,support_fuel:()=>({r:"Food",a:t.tech.isolation?t.race.lone_survivor?-2:75:1e3}),powered:()=>Is(1),action(){return!!ii($(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*=Ki.high_pop.vars()[0]),t.race.lone_survivor?0:e}},tau_housing:{id:"tauceti-tau_housing",title:()=>ui("small"),desc:F("city_basic_housing_desc"),desc(){return 1===$(this)[0].citizens()?F("city_basic_housing_desc"):F("city_basic_housing_desc_plural",[$(this)[0].citizens()])},category:"residential",reqs:{housing:1,isolation:1},condition:()=>!t.race.lone_survivor,cost:{Money:e=>js("tau_housing",e,15e4,1.15,"tauceti"),Lumber:e=>t.race.kindling_kindred||t.race.smoldering?0:js("tau_housing",e,125e3,1.25,"tauceti"),Stone:e=>t.race.kindling_kindred?js("tau_housing",e,125e3,1.25,"tauceti"):0,Chrysotile:e=>t.race.smoldering?js("tau_housing",e,5e4,1.25,"tauceti"):0,Horseshoe:()=>t.race.hooved?1:0},effect(){let e=$(this)[0].citizens();return t.race.sappy?`
                ${F("plus_max_resource",[e,F("citizen")])}
                ${F("city_grove_effect",[2.5])}
                `:F("plus_max_resource",[e,F("citizen")])},action(){return!!ii($(this)[0])&&(t.tauceti.tau_housing.count++,!0)},citizens(){let e=1;return t.race.high_pop&&(e*=Ki.high_pop.vars()[0]),e}},captive_housing:zr("captive_housing","tauceti"),pylon:{id:"tauceti-pylon",title:F("tau_home_pylon"),desc:F("tau_home_pylon"),reqs:{magic:2},condition:()=>!(!t.tech.isolation||!t.tauceti.hasOwnProperty("pylon")),cost:{Money:e=>js("pylon",e,50,1.48,"tauceti"),Stone:e=>js("pylon",e,100,1.42,"tauceti"),Crystal:e=>js("pylon",e,8,1.42,"tauceti")-3},effect(){let e=wr(2);return`
                ${F("gain",[+(.0125*Ts("magic")).toFixed(3),t.resource.Mana.name])}
                ${F("plus_max_resource",[e,t.resource.Mana.name])}
                `},special:()=>!!(t.tech.magic&&t.tech.magic>=3),action(){return!!ii($(this)[0])&&(t.tauceti.pylon.count++,t.resource.Mana.max+=wr(2),!0)}},cloning_facility:{id:"tauceti-cloning_facility",title:F("tau_home_cloning"),desc:()=>F("tau_home_cloning_desc",[Di[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?js("citizen",e,Math.round((t.race.high_pop?1e5:125e3)/aa(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?js("citizen",e,Math.round(50/aa(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?js("citizen",e,Math.round(50/aa(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?js("citizen",e,Math.round(500/aa(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=`
                ${F("city_assembly_effect_warn")}
                `),`
                ${F("tau_home_cloning_effect",[Di[t.race.species].name])}
                ${e}`},action(){return!!(t.resource[t.race.species].max>t.resource[t.race.species].amount&&ii($(this)[0]))&&(t.resource[t.race.species].amount++,!0)}},horseshoe:zr("horseshoe","tauceti"),bonfire:zr("bonfire","tauceti"),firework:zr("firework","tauceti"),assembly:zr("assembly","tauceti"),nanite_factory:zr("nanite_factory","tauceti"),tau_farm:{id:"tauceti-tau_farm",title:F("tau_home_tau_farm"),desc:()=>`
                ${F("tau_home_tau_farm")}
                ${F("requires_power")}
                `,reqs:{tau_home:7},path:["truepath"],cost:{Money:e=>js("tau_farm",e,135e6,1.25,"tauceti"),Stone:e=>js("tau_farm",e,921e4,1.25,"tauceti"),Steel:e=>js("tau_farm",e,6295e3,1.25,"tauceti"),Water:e=>js("tau_farm",e,1e4,1.25,"tauceti")},effect(){let e=`
                ${F("space_red_spaceport_effect1",[F("tau_planet",[Di[t.race.species].home]),$(this)[0].support()])}
                `;return e+=`
                ${F("produce",[+xe("tau_farm","food").toFixed(2),t.resource.Food.name])}
                `,t.race.kindling_kindred||t.race.smoldering||(e+=`
                ${F("produce",[+xe("tau_farm","lumber").toFixed(2),t.resource.Lumber.name])}
                `),t.tech.isolation&&(e+=`
                ${F("produce",[+xe("tau_farm","water").toFixed(2),t.resource.Water.name])}
                `,t.race.artifical&&(e+=`
                ${F("city_transmitter_effect",[wr(350)])}
                `)),e+=`
                ${F("minus_power",[$(this)[0].powered()])}
                `,e},support:()=>1,powered:()=>As(t.tech.isolation?1:4),action(){return!!ii($(this)[0])&&(t.tauceti.tau_farm.count++,ei($(this)[0]),!0)}},mining_pit:{id:"tauceti-mining_pit",title:F("tau_home_mining_pit"),desc:()=>`
                ${F("tau_home_mining_pit")}
                ${F("space_support",[Di[t.race.species].home])}
                `,reqs:{tau_home:2},path:["truepath"],cost:{Money:e=>js("mining_pit",e,425e4,1.225,"tauceti"),Materials:e=>Je()?0:js("mining_pit",e,35e4,1.225,"tauceti"),Lumber:e=>Je()?js("mining_pit",e,235e4,1.225,"tauceti"):0,Iron:e=>Je()?js("mining_pit",e,835e3,1.225,"tauceti"):0},effect(){let e=`
                ${F("tau_new_support",[$(this)[0].support(),Di[t.race.species].home])}
                `;if(e+=`
                ${F("plus_max_resource",[aa(t.tech.isolation?6:8),F("job_pit_miner")])}
                `,Je())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+=`
                ${F("tau_home_mining_pit_effect2cs",a)}
                `):e+=`
                ${F("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+=`
                ${F("tau_home_mining_pit_effect2bs",a)}
                `):e+=`
                ${F("tau_home_mining_pit_effect2b",a)}
                `}e+=`
                ${F("tau_gas_womling_station_effect",[8,t.resource.Cement.name])}
                `}else e+=`
                ${F("tau_home_mining_pit_effect2",[t.resource.Bolognium.name,t.resource.Adamantite.name,t.resource.Stone.name])}
                `;else e+=`
                ${F("plus_max_resource",[1e6,F("resource_Materials_name")])}
                `,e+=`
                ${F("tau_home_mining_pit_effect",[t.resource.Materials.name])}
                `;return e},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(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:F("tau_home_excavate"),desc:()=>`
                ${F("tau_home_excavate")}
                `,reqs:{tau_home:2},grant:["tau_home",3],path:["truepath"],cost:{Money:e=>165e7,Materials:e=>75e4},effect:()=>F("tau_home_excavate_effect"),action(){return!!ii($(this)[0])&&(ms(F("tau_home_excavate_msg"),"info",!1,["progress"]),!0)}},alien_outpost:{id:"tauceti-alien_outpost",title:F("tech_alien_outpost"),desc:()=>`
                ${F("tech_alien_outpost")}
                ${F("requires_power")}
                `,reqs:{tau_home:4},path:["truepath"],cost:{},queue_complete:()=>0,effect(){let e=`
                ${F("plus_max_resource",["20%",F("resource_Knowledge_name")])}
                `;return t.tech.isolation&&(e+=`
                ${F("plus_max_resource",[(t.race.lone_survivor?35e5:65e5).toLocaleString(),F("resource_Knowledge_name")])}
                `,e+=`
                ${F("plus_max_resource",[2e5.toLocaleString(),t.resource.Cipher.name])}
                `,e+=`
                ${F("space_lander_effect3",[xe("alien_outpost"),t.resource.Cipher.name])}
                `),t.tech.outpost_boost&&(e+=`
                ${F("tech_alien_outpost_effect2")}
                `),t.race.lone_survivor&&(e+=`
                ${F("city_wardenclyffe_effect1",[aa(1),t.civic.professor.name])}
                `),e+=`
                ${F("minus_power",[$(this)[0].powered()])}
                `,e},powered:()=>Is(t.tech.isolation?t.race.lone_survivor?8:25:100),special:()=>!!t.tech.replicator,action:()=>!1},jump_gate:{id:"tauceti-jump_gate",title:F("tau_jump_gate"),desc:e=>!t.tauceti.hasOwnProperty("jump_gate")||t.tauceti.jump_gate.count<100||e?`
                ${F("tau_jump_gate")}
                ${F("requires_segmemts",[100])}
                `:`
                ${F("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`
                ${F("tau_jump_gate_effect")}
                ${F("space_dwarf_collider_effect2",[e])}
                `}return F("tau_jump_gate_effect")},action(){return!!(ii($(this)[0])&&t.tauceti.jump_gate.count<100)&&(t.tauceti.jump_gate.count++,!0)}},fusion_generator:{id:"tauceti-fusion_generator",title:F("tech_fusion_generator"),desc:()=>`
                ${F("tech_fusion_generator")}
                ${F("requires_res",[t.resource.Helium_3.name])}
                `,reqs:{tau_home:6},path:["truepath"],cost:{Money:e=>js("fusion_generator",e,188e6,1.25,"tauceti"),Iridium:e=>js("fusion_generator",e,555e4,1.25,"tauceti"),Stanene:e=>js("fusion_generator",e,7003500,1.25,"tauceti"),Sheet_Metal:e=>js("fusion_generator",e,We(95e3),1.25,"tauceti")},effect(){let e=+Ut($(this)[0].p_fuel().a).toFixed(1),a=`
                ${F("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}
                `;return t.race.lone_survivor?a+=`
                ${F("gain",[-e,t.resource[$(this)[0].p_fuel().r].name])}
                `:a+=`
                ${F("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:()=>As(-32),action(){return!!ii($(this)[0])&&(t.tauceti.fusion_generator.count++,t.tauceti.fusion_generator.on++,!0)}},repository:{id:"tauceti-repository",title:F("tech_repository"),desc:F("tech_repository"),reqs:{tau_home:5},path:["truepath"],cost:{Money:e=>js("repository",e,1028e4,1.28,"tauceti"),Iron:e=>js("repository",e,18e5,1.28,"tauceti"),Cement:e=>js("repository",e,15e5,1.28,"tauceti"),Neutronium:e=>js("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=gt("repository");for(const r of $(this)[0].res())t.resource[r].display&&(e+=`${F("plus_max_resource",[q(+(wr($(this)[0].val(r))*a).toFixed(0),1),t.resource[r].name])}`);return t.tech.isolation&&(e+=`${F("plus_max_resource",[250,F("resource_Crates_name")])}${F("plus_max_resource",[250,F("resource_Containers_name")])}`),e+="
                ",e},action(){if(ii($(this)[0])){t.tauceti.repository.count++;let e=gt("repository");for(const a of $(this)[0].res())t.resource[a].display&&(t.resource[a].max+=wr($(this)[0].val(a))*e);return!0}return!1}},tau_factory:{id:"tauceti-tau_factory",title:F("tau_home_tau_factory"),desc:()=>`
                ${F("tau_home_tau_factory")}
                ${F("requires_power_support",[Di[t.race.species].home])}
                `,reqs:{tau_home:8},path:["truepath"],cost:{Money:e=>js("tau_factory",e,269e6,1.25,"tauceti"),Titanium:e=>js("tau_factory",e,3e6,1.25,"tauceti"),Elerium:e=>js("tau_factory",e,850,1.25,"tauceti"),Bolognium:e=>js("tau_factory",e,25e4,1.25,"tauceti"),Quantium:e=>js("tau_factory",e,We(425e3),1.25,"tauceti")},effect(){let e=`
                ${F("tau_new_support",[$(this)[0].support(),Di[t.race.species].home])}
                `;return e+=`
                ${F("tau_home_tau_factory_effect",[t.tech.isolation?5:3])}
                `,t.tech.isolation&&(t.race.flier||(e+=`
                ${F("city_cement_plant_effect1",[aa(2)])}
                `),e+=`
                ${F("space_red_fabrication_effect1",[aa(5)])}
                `),e+=`
                ${F("city_crafted_mats",[t.tech.isolation?275:90])}
                `,e+=`
                ${F("minus_power",[$(this)[0].powered()])}
                `,e},special:!0,support:()=>-1,powered:()=>Is(t.tech.isolation?2:5),action(){return!!ii($(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?F("tech_infectious_disease_lab_alt"):F(t.race.artifical?"tech_infectious_disease_lab_s":"tech_infectious_disease_lab"),desc(){return`
                ${$(this)[0].title()}
                ${F("requires_power_support",[Di[t.race.species].home])}
                `},reqs:{disease:1},path:["truepath"],cost:{Money:e=>js("infectious_disease_lab",e,1e9,1.25,"tauceti"),Alloy:e=>js("infectious_disease_lab",e,325e5,1.25,"tauceti"),Polymer:e=>js("infectious_disease_lab",e,5e7,1.25,"tauceti"),Bolognium:e=>js("infectious_disease_lab",e,25e5,1.25,"tauceti"),Unobtainium:e=>js("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=`
                ${F("tau_new_support",[$(this)[0].support(),Di[t.race.species].home])}
                `;return a+=`
                ${F("city_max_knowledge",[Math.round(e).toLocaleString()])}
                `,t.tech.isolation&&(a+=`
                ${F("plus_max_resource",[wr(375),F("resource_Elerium_name")])}
                `,a+=`
                ${F("city_wardenclyffe_effect1",[aa(2),t.civic.professor.name])}
                `,a+=`
                ${F("city_wardenclyffe_effect1",[aa(1),t.civic.scientist.name])}
                `,a+=`
                ${F("space_zero_g_lab_effect",[aa(1)])}
                `,a+=`
                ${F("city_library_effect",[75])}
                `),t.tech.alien_crafting&&(a+=`
                ${F("tau_gas_womling_station_effect",[65,t.resource.Quantium.name])}
                `),t.tech.focus_cure&&(a+=`
                ${F("tau_home_disease_lab_cure",[+t.tauceti.infectious_disease_lab.cure.toFixed(1)])}
                `,t.race.hasOwnProperty("vax")&&(a+=`
                ${F("tau_home_disease_lab_vax",[+t.race.vax.toFixed(2)])}
                `)),a+=`
                ${F("minus_power",[$(this)[0].powered()])}
                `,a},support:()=>-1,powered:()=>Is(t.tech.isolation?t.race.lone_survivor?2:8:35),action(){return!!ii($(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,ms(F("tau_plague4",[F("tab_tauceti")]),"info",!1,["progress"]),Jr())}},tauceti_casino:{id:"tauceti-tauceti_casino",title:F("city_casino"),desc:F("city_casino"),category:"commercial",reqs:{gambling:1,isolation:1},cost:{Money:e=>js("tauceti_casino",e,145e4,1.35,"tauceti"),Furs:e=>js("tauceti_casino",e,95e3,1.35,"tauceti"),Cement:e=>js("tauceti_casino",e,12e4,1.35,"tauceti"),Plywood:e=>js("tauceti_casino",e,We(55e3),1.35,"tauceti")},effect(){let e=$(this)[0].citizens(),a=t.race.lone_survivor?"":`
                ${F("plus_max_resource",[e,F("citizen")])}
                `;return a+=Dr(),a+=`
                ${F("minus_power",[$(this)[0].powered()])}
                `,a},powered:()=>Is(t.race.lone_survivor?1:2),action(){return!!ii($(this)[0])&&(t.tauceti.tauceti_casino.count++,t.race.joyless||(t.civic.entertainer.max+=aa(1),t.civic.entertainer.display=!0),ei($(this)[0]),!0)},citizens(){let e=1;return t.race.high_pop&&(e*=Ki.high_pop.vars()[0]),t.race.lone_survivor?0:e},flair:F("city_casino_flair")},tau_cultural_center:{id:"tauceti-tau_cultural_center",title:F("tech_cultural_center"),desc(){return`
                ${F("tech_cultural_center")}
                ${F("space_electrolysis_req",[t.resource[$(this)[0].p_fuel().r].name])}
                `},category:"commercial",reqs:{tau_culture:1},path:["truepath"],cost:{Money:e=>js("tau_cultural_center",e,9145e4,1.35,"tauceti"),Copper:e=>js("tau_cultural_center",e,585e4,1.35,"tauceti"),Coal:e=>js("tau_cultural_center",e,465e3,1.35,"tauceti"),Polymer:e=>js("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,i=15*e,s=`
                ${F("tau_home_cultureal_effect1",[$(this)[0].p_fuel().a,t.resource[$(this)[0].p_fuel().r].name,$(this)[0].title])}
                `;return s+=`
                ${F("city_tourist_center_effect3",[a])}
                `,s+=`
                ${F("city_tourist_center_effect4",[r])}
                `,s+=`
                ${F("tau_home_cultureal_effect2",[8,F("tau_red_womlings")])}
                `,t.tech.tau_culture>=2&&(s+=`
                ${F("tau_home_cultureal_effect3",[i,F(`tau_gas2_alien_station_data2_r${t.race.tau_food_item||0}`)])}
                `),s+=`
                ${F("minus_power",[$(this)[0].powered()])}
                `,s},powered:()=>Is(1),p_fuel:()=>({r:"Food",a:t.race.lone_survivor?25:500}),action(){return!!ii($(this)[0])&&(t.tauceti.tau_cultural_center.count++,t.tauceti.tau_cultural_center.on++,!0)}}},tau_red:{info:{name:()=>F("tau_planet",[Vt().red]),desc:()=>F("tau_red",[Vt().red]),support:"orbital_platform",extra(e){t.tech.tau_red&&t.tech.tau_red>=5&&($(`#${e}`).append(`
                ${F("tau_red_womling_prod")} {{ prod }}%
                `),zs({el:`#${e}Womlings`,data:t.tauceti.overseer}))}},red_mission:{id:"tauceti-red_mission",title:()=>F("tau_new_mission_title",[Vt().red]),desc:()=>F("tau_new_mission_title",[Vt().red]),reqs:{tauceti:2},grant:["tau_red",1],path:["truepath"],queue_complete:()=>t.tech.tau_red>=1?0:1,cost:{Money:()=>1e9},effect:()=>F("tau_new_mission_effect",[Vt().red]),action(){return!!ii($(this)[0])&&(t.tauceti.settlement={count:0,on:0},ms(F("tau_red_mission_result",[Vt().red]),"info",!1,["progress"]),!0)}},orbital_platform:{id:"tauceti-orbital_platform",title:F("tau_red_orbital_platform"),desc:`
                ${F("tau_red_orbital_platform")}
                ${F("requires_power")}
                `,reqs:{tau_red:1,tauceti:4},path:["truepath"],cost:{Money:e=>js("orbital_platform",e,5e7,1.3,"tauceti"),Oil:e=>{return Je()?js("orbital_platform",e,Ut((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=>js("orbital_platform",e,178e4,1.3,"tauceti"),Bolognium:e=>js("orbital_platform",e,45e4,1.3,"tauceti")},effect(){let e=wr(17500),a=+Ut($(this)[0].support_fuel().a).toFixed(1),r=`
                ${F("space_red_spaceport_effect1",[F("tau_planet",[Vt().red]),$(this)[0].support()])}
                `;return r+=`
                ${F("plus_max_resource",[e.toLocaleString(),t.resource.Oil.name])}
                `,r+=`
                ${F("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:()=>Is(t.tech.isolation?t.race.lone_survivor?2:3:18),refresh:!0,action(){return!(!Je()||!ii($(this)[0])||(t.tauceti.orbital_platform.count++,ei($(this)[0]),1===t.tech.tau_red&&(t.tech.tau_red=2,ms(F("tau_red_orbital_platform_msg",[F("tau_planet",[Vt().red]),F("tau_planet",[Di[t.race.species].home])]),"info",!1,["progress"])),0))}},contact:{id:"tauceti-contact",title:()=>F("tau_red_contact"),desc:()=>F("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:()=>F("tau_red_contact_effect"),action(){return!!ii($(this)[0])&&(t.race.womling_friend=1,Ve(),!0)}},introduce:{id:"tauceti-introduce",title:()=>F("tau_red_introduce"),desc:()=>F("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:()=>F("tau_red_introduce_effect"),action(){return!!ii($(this)[0])&&(t.race.womling_god=1,Ve(),!0)}},subjugate:{id:"tauceti-subjugate",title:()=>F("tau_red_subjugate"),desc:()=>F("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:()=>F("tau_red_subjugate_effect"),action(){return!!ii($(this)[0])&&(t.race.womling_lord=1,Ve(),!0)}},jeff:{id:"tauceti-jeff",title:()=>F("tau_red_jeff"),desc:()=>F("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${F("tau_red_jeff_effect1",[t.tauceti.overseer?t.tauceti.overseer.pop:0])}
                `;return a+=`
                ${F("tau_red_jeff_effect2",[t.tauceti.overseer?t.tauceti.overseer.working:0])}
                `,a+=`
                ${F("tau_red_jeff_effect3",[e])}
                `,a+=`
                ${F("tau_red_jeff_effect4",[t.tauceti.overseer?t.tauceti.overseer.loyal:0])}
                `,a+=`
                ${F("tau_red_jeff_effect5",[t.tauceti.overseer?t.tauceti.overseer.morale:0])}
                `,t.tech.hasOwnProperty("womling_tech")&&(a+=`
                ${F("tau_red_jeff_effect6",[t.tech.womling_tech])}
                `),a+=`
                ${F("job_farmer")}: ${t.tauceti.womling_farm?t.tauceti.womling_farm.farmers:0}
                `,a+=`
                ${F("job_miner")}: ${t.tauceti.womling_mine?t.tauceti.womling_mine.miners:0}
                `,t.tauceti.womling_lab&&(a+=`
                ${F("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()}
                ${F("space_support",[Vt().red])}
                `},name:()=>t.race.womling_lord?F("tau_red_overseer"):t.race.womling_god?F("tau_red_womgod"):F("tau_red_womally"),reqs:{tau_red:5},path:["truepath"],cost:{Money:e=>js("overseer",e,6e6,1.28,"tauceti"),Cement:e=>js("overseer",e,245e4,1.28,"tauceti"),Alloy:e=>t.race.womling_friend?js("overseer",e,185e4,1.28,"tauceti"):0,Neutronium:e=>t.race.womling_lord?js("overseer",e,165e3,1.28,"tauceti"):0,Titanium:e=>t.race.womling_god?js("overseer",e,225e4,1.28,"tauceti"):0},effect(){let e=`
                ${F("tau_new_support",[$(this)[0].support(),Vt().red])}
                `;return e+=`
                ${F("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:()=>Is(1),action(){return!!ii($(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:F("tau_red_womling_village"),desc:()=>`
                ${F("tau_red_womling_village")}
                ${F("space_support",[Vt().red])}
                `,reqs:{tau_red:5},path:["truepath"],cost:{Money:e=>js("womling_village",e,1e7,1.28,"tauceti"),Stone:e=>js("womling_village",e,225e4,1.28,"tauceti"),Plywood:e=>js("womling_village",e,We(125e4),1.28,"tauceti"),Wrought_Iron:e=>js("womling_village",e,We(4e5),1.28,"tauceti")},effect(){let e=t.tech.womling_pop&&t.tech.womling_pop>=2?6:5,a=`
                ${F("tau_new_support",[$(this)[0].support(),Vt().red])}
                `;return a+=`
                ${F("tau_red_womling_village_effect",[e])}
                `,t.tech.tau_junksale&&(a+=`
                ${F("tau_red_womling_village_effect2",[40,F(`tau_gas2_alien_station_data4_r${t.race.tau_junk_item||0}`)])}
                `),a},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(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:F("tau_red_womling_farm"),desc:()=>`
                ${F("tau_red_womling_farm")}
                ${F("space_support",[Vt().red])}
                `,reqs:{tau_red:5},path:["truepath"],cost:{Money:e=>js("womling_farm",e,24e6,1.28,"tauceti"),Iron:e=>js("womling_farm",e,95e5,1.28,"tauceti"),Water:e=>js("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=`
                ${F("tau_new_support",[$(this)[0].support(),Vt().red])}
                `;return r+=`
                ${F("tau_red_womling_farm_effect",[e])}
                `,r+=`
                ${F("tau_red_womling_employ",[2])}
                `,t.tech.isolation&&(r+=`
                ${F("tau_red_womling_generate",[t.resource.Furs.name])}
                `),r+=`
                ${F("tau_red_womling_farm_effect2",[e/2*a])}
                `,r},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(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:F("tau_red_womling_mine"),desc:()=>`
                ${F("tau_red_womling_mine")}
                ${F("space_support",[Vt().red])}
                `,reqs:{tau_red:5},path:["truepath"],cost:{Money:e=>js("womling_mine",e,125e5,1.28,"tauceti"),Lumber:e=>js("womling_mine",e,128e5,1.28,"tauceti"),Steel:e=>js("womling_mine",e,45e5,1.28,"tauceti")},effect(){let e=`
                ${F("tau_new_support",[$(this)[0].support(),Vt().red])}
                `;return t.tech.isolation?t.race.lone_survivor?e+=`
                ${F("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+=`
                ${F("tau_red_womling_mine_effect_b",[t.resource.Unobtainium.name,t.resource.Uranium.name,t.resource.Titanium.name])}
                `:e+=`
                ${F("tau_red_womling_mine_effect_a",[t.resource.Unobtainium.name])}
                `,e+=`
                ${F("tau_red_womling_employ",[6])}
                `,e},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(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:()=>F("tau_red_womling_mine_flair")},womling_fun:{id:"tauceti-womling_fun",title(){return $(this)[0].name()},desc(){return`
                ${$(this)[0].name()}
                ${F("space_support",[Vt().red])}
                `},name:()=>t.race.womling_lord?F("tau_red_womling_fun1"):t.race.womling_god?F("tau_red_womling_fun2"):F("tau_red_womling_fun3"),reqs:{tau_red:6},path:["truepath"],cost:{Money:e=>js("womling_fun",e,38e5,1.28,"tauceti"),Food:e=>t.race.womling_friend?js("womling_fun",e,175e3,1.28,"tauceti"):0,Lumber:e=>js("womling_fun",e,5e5,1.28,"tauceti"),Stone:e=>js("womling_fun",e,5e5,1.28,"tauceti"),Furs:e=>t.race.womling_lord||t.race.womling_god?js("womling_fun",e,835e3,1.28,"tauceti"):0,Copper:e=>t.race.womling_lord?js("womling_fun",e,1125e3,1.28,"tauceti"):0,Alloy:e=>t.race.womling_god?js("womling_fun",e,656e3,1.28,"tauceti"):0,Water:e=>t.race.womling_friend?js("womling_fun",e,3500,1.28,"tauceti"):0},effect(){let e=`
                ${F("tau_new_support",[$(this)[0].support(),Vt().red])}
                `;return e+=`
                ${F("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:()=>Is(1),action(){return!!ii($(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:F("interstellar_laboratory_title"),desc:()=>`
                ${F("interstellar_laboratory_title")}
                ${F("space_support",[Vt().red])}
                `,reqs:{tau_red:7},path:["truepath"],cost:{Money:e=>js("womling_lab",e,65e6,1.28,"tauceti"),Elerium:e=>js("womling_lab",e,1200,1.28,"tauceti"),Orichalcum:e=>js("womling_lab",e,25e5,1.28,"tauceti"),Unobtainium:e=>js("womling_lab",e,1e4,1.28,"tauceti"),Quantium:e=>js("womling_lab",e,We(95e3),1.28,"tauceti")},effect(){let e=t.tauceti.hasOwnProperty("overseer")?t.tauceti.overseer.prod:100,a=Math.round(25e3*e/100),r=`
                ${F("tau_new_support",[$(this)[0].support(),Vt().red])}
                `;return r+=`
                ${F("tau_red_womling_lab_effect",[a])}
                `,r+=`
                ${F("tau_red_womling_employ_single",[1])}
                `,r},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(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",i="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]+i)%3){case 1:return F("tau_planet",[Vt().gas]);case 2:return F("tau_gas_title0a",[Vt().gas]);default:return F("tau_gas_title0b",[Vt().gas])}}case 2:switch(Math.round(t.stats.reset+i)%3){case 1:return F("tau_gas_title1a");case 2:return F("tau_gas_title1b");default:return F("tau_gas_title1c")}case 3:switch(Math.round(t.stats.mad+i)%3){case 1:return F("tau_gas_title2a");case 2:return F("tau_gas_title2b");default:return F("tau_gas_title2c")}case 4:switch(Math.round(t.stats.bioseed+i)%3){case 1:return F("tau_gas_title3a",[Di[t.race.gods].solar.gas]);case 2:return F("tau_gas_title3b",[Di[t.race.old_gods].name]);default:return F("tau_gas_title3c",[Di[t.race.species].name])}case 5:switch(Math.round(t.stats.portals+i)%3){case 1:return F("tau_gas_title4a",[Vt().gas]);case 2:return F("tau_gas_title4b",[cn("reverse",Vt().gas)]);default:return F("tau_gas_title4c")}case 6:switch(Math.round(t.stats.womling.friend.l+t.stats.womling.lord.l+t.stats.womling.god.l+i)%3){case 1:return F("tau_gas_title5a");case 2:return F("tau_gas_title5b");default:return F("tau_gas_title5c")}case 7:switch(Math.round(t.stats.tdays+i)%3){case 1:return F("tau_gas_title6a");case 2:return F("tau_gas_title6b");default:return F("tau_gas_title6c")}default:return F("gas_name"===r?"tau_gas_title":"tau_gas2_title")}return F("gas_name"===r?"tau_gas_title":"tau_gas2_title")},desc:()=>F("tau_gas_desc")},gas_contest:{id:"tauceti-gas_contest",title:()=>F("tau_gas_contest_title"),desc:()=>F("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?F("tau_gas_contest_effect_alt"):F("tau_gas_contest_effect"),action(){return!!ii($(this)[0])}},refueling_station:{id:"tauceti-refueling_station",title:()=>F("tau_gas_refueling_station_title"),desc:()=>`
                ${F("tau_gas_refueling_station_title")}
                ${F("requires_power")}
                `,reqs:{tau_gas:2},path:["truepath"],cost:{Money:e=>js("refueling_station",e,68e6,1.28,"tauceti"),Graphene:e=>js("refueling_station",e,25e5,1.28,"tauceti"),Unobtainium:e=>js("refueling_station",e,5500,1.28,"tauceti"),Mythril:e=>js("refueling_station",e,We(6e4),1.28,"tauceti")},powered:()=>Is(t.tech.isolation?2:5),effect(){let e=+xe("refueling_station").toFixed(2),a=wr(1e4),r=`
                ${F("space_gas_mining_effect1",[e])}
                `;return r+=`
                ${F("plus_max_resource",[a.toLocaleString(),t.resource.Helium_3.name])}
                `,t.tech.tau_whale>=2&&(r+=`
                ${F("plus_max_resource",[wr(6500).toLocaleString(),t.resource.Oil.name])}
                `),t.tech.isolation&&(r+=`
                ${F("interstellar_g_factory_effect")}
                `),r+=`
                ${F("minus_power",[$(this)[0].powered()])}
                `,r},special:()=>!!t.tech.isolation,action(){return!!ii($(this)[0])&&(t.tauceti.refueling_station.count++,ei($(this)[0]),!0)},post(){2===t.tech.tau_gas&&(t.tech.tau_gas=3,Jr())}},ore_refinery:{id:"tauceti-ore_refinery",title:()=>F("tau_gas_ore_refinery_title"),desc:()=>`
                ${F("tau_gas_ore_refinery_title")}
                ${F("requires_power")}
                `,reqs:{tau_gas:4},path:["truepath"],cost:{Money:e=>js("ore_refinery",e,52e6,1.28,"tauceti"),Iridium:e=>js("ore_refinery",e,16e5,1.28,"tauceti"),Unobtainium:e=>js("ore_refinery",e,800,1.28,"tauceti"),Sheet_Metal:e=>js("ore_refinery",e,We(118e3),1.28,"tauceti")},powered:()=>Is(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=+xe("ore_refinery").toFixed(2),i=`
                ${F("tau_gas_ore_refinery_effect",[+e.toFixed(2)])}
                `;return i+=`
                ${F("tau_gas_ore_refinery_effect2",[a])}
                `,i+=`
                ${F("tau_gas_ore_refinery_effect3",[r])}
                `,i+=`
                ${F("interstellar_stellar_forge_effect3",[t.tech.isolation?12:4])}
                `,i+=`
                ${F("minus_power",[$(this)[0].powered()])}
                `,i},special:!0,action(){return!!ii($(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,Ze(),Jr())}},whaling_station:{id:"tauceti-whaling_station",title:()=>F("tau_gas_whaling_station_title"),desc:()=>`
                ${F("tau_gas_whaling_station_title")}
                ${F("requires_power")}
                `,reqs:{tau_whale:1},path:["truepath"],cost:{Money:e=>js("whaling_station",e,72e6,1.28,"tauceti"),Steel:e=>js("whaling_station",e,18e5,1.28,"tauceti"),Polymer:e=>js("whaling_station",e,955e3,1.28,"tauceti"),Orichalcum:e=>js("whaling_station",e,268e3,1.28,"tauceti")},powered:()=>Is(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=+xe("whaling_station").toFixed(2),i=`
                ${F("tau_gas_whaling_station_effect",[+e.toFixed(2)])}
                `;return i+=`
                ${F("tau_gas_whaling_station_effect2",[a])}
                `,i+=`
                ${F("tau_gas_whaling_station_effect3",[r])}
                `,i+=`
                ${F("minus_power",[$(this)[0].powered()])}
                `,i},action(){return!!ii($(this)[0])&&(t.tauceti.whaling_station.count++,ei($(this)[0]),!0)},post(){1===t.tech.tau_whale&&(t.tech.tau_whale=2,Ze())}},womling_station:{id:"tauceti-womling_station",title:()=>F("tau_gas_womling_station_title"),desc:()=>`
                ${F("tau_gas_womling_station_desc")}
                ${F("requires_power")}
                `,reqs:{womling_technicians:1},path:["truepath"],cost:{Money:e=>js("womling_station",e,1334e5,1.26,"tauceti"),Furs:e=>js("womling_station",e,3805e3,1.26,"tauceti"),Aluminium:e=>js("womling_station",e,85e5,1.26,"tauceti"),Nano_Tube:e=>js("womling_station",e,909e3,1.26,"tauceti")},powered:()=>Is(t.tech.isolation?3:6),effect(){let e=t.tech.isolation?30:8;t.tech.womling_gene&&(e*=1.25);let a=`
                ${F("tau_gas_womling_station_effect",[e,He.tau_gas.info.name()])}
                `;return t.race.flier||(a+=`
                ${F("city_cement_plant_effect1",[aa(1)])}
                `),a+=`
                ${F("space_red_fabrication_effect1",[aa(1)])}
                `,a+=`
                ${F("minus_power",[$(this)[0].powered()])}
                `,a},action(){return!!ii($(this)[0])&&(t.tauceti.womling_station.count++,ei($(this)[0]),!0)}}},tau_roid:{info:{name:()=>F("tau_roid_title"),desc:()=>F("tau_roid_desc"),support:"patrol_ship"},roid_mission:{id:"tauceti-roid_mission",title:()=>F("space_mission_title",[F("tau_roid_title")]),desc:()=>F("space_mission_desc",[F("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)=>+Ut(125e4).toFixed(0)},effect:()=>F("tau_roid_mission_effect",[F("tau_roid_title")]),action(){return!!ii($(this)[0])&&(ms(F("tau_roid_mission_result"),"info",!1,["progress"]),!0)}},patrol_ship:{id:"tauceti-patrol_ship",title:F("tau_roid_patrol_ship"),desc:()=>`
                ${F("tau_roid_patrol_ship")}
                ${F("requires_res",[t.resource.Helium_3.name])}
                `,reqs:{tau_roid:3},path:["truepath"],cost:{Money:e=>js("patrol_ship",e,45e6,1.25,"tauceti"),Adamantite:e=>js("patrol_ship",e,18e5,1.25,"tauceti"),Elerium:e=>js("patrol_ship",e,520,1.25,"tauceti"),Stanene:e=>js("patrol_ship",e,2675e3,1.25,"tauceti"),Bolognium:e=>js("patrol_ship",e,115e4,1.25,"tauceti")},effect(){let e=+Ut($(this)[0].support_fuel().a).toFixed(1),a=`
                ${F("tau_roid_patrol_ship_security",[$(this)[0].support()])}
                `;return a+=`
                ${F("tau_roid_patrol_ship_effect")}
                `,a+=`
                ${F("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:()=>Is(1),refresh:!0,action(){return!!ii($(this)[0])&&(t.tauceti.patrol_ship.count++,t.tauceti.patrol_ship.on++,!0)}},mining_ship:{id:"tauceti-mining_ship",title:F("tau_roid_mining_ship"),desc:()=>`
                ${F("tau_roid_mining_ship")}
                `,reqs:{tau_roid:4},path:["truepath"],cost:{Money:e=>js("mining_ship",e,28e6,1.28,"tauceti"),Uranium:e=>js("mining_ship",e,12500,1.28,"tauceti"),Titanium:e=>js("mining_ship",e,22e5,1.28,"tauceti"),Alloy:e=>js("mining_ship",e,175e4,1.28,"tauceti")},effect(){let e=+Ut($(this)[0].support_fuel().a).toFixed(1),a=`
                ${F("tau_roid_mining_ship_effect",[+xe("mining_ship").toFixed(2)])}
                `;return a+=`
                ${F("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:()=>Is(1),special:!0,action(){return!!ii($(this)[0])&&(t.tauceti.mining_ship.count++,t.tauceti.mining_ship.on++,!0)}},whaling_ship:{id:"tauceti-whaling_ship",title:F("tau_roid_whaling_ship"),desc:()=>`
                ${F("tau_roid_whaling_ship")}
                `,reqs:{tau_whale:2},path:["truepath"],cost:{Money:e=>js("whaling_ship",e,35e6,1.28,"tauceti"),Aluminium:e=>js("whaling_ship",e,34e5,1.28,"tauceti"),Neutronium:e=>js("whaling_ship",e,168e3,1.28,"tauceti"),Nano_Tube:e=>js("whaling_ship",e,8e5,1.28,"tauceti")},effect(){let e=+Ut($(this)[0].support_fuel().a).toFixed(1),a=`
                ${F("tau_roid_whaling_ship_effect",[+xe("whaling_ship").toFixed(2)])}
                `;return a+=`
                ${F("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:()=>Is(1),action(){return!!ii($(this)[0])&&(t.tauceti.whaling_ship.count++,t.tauceti.whaling_ship.on++,!0)}}},tau_gas2:{info:{name:e=>He.tau_gas.info.name(e||t.race.gas_name2||!1,"gas_name2"),desc:()=>F("tau_gas2_desc",[He.tau_gas.info.name()])},gas_contest2:{id:"tauceti-gas_contest2",title:()=>F("tau_gas2_contest_title"),desc:()=>F("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:()=>F("tau_gas2_contest_effect"),action(){return!!ii($(this)[0])},flair:()=>F("tau_gas2_contest_flair")},alien_station_survey:{id:"tauceti-alien_station_survey",title:F("tau_gas2_alien_station"),desc:F("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:()=>F("tau_gas2_alien_station_repair_effect",[He.tau_gas2.info.name()]),action(){return!!ii($(this)[0])&&(t.tauceti.alien_station={count:0},ms(F("tau_gas2_alien_station_msg",[He.tau_gas2.info.name()]),"info",!1,["progress"]),!0)}},alien_station:{id:"tauceti-alien_station",title:F("tau_gas2_alien_station"),desc:e=>!t.tauceti.hasOwnProperty("alien_station")||t.tauceti.alien_station.count<100||e?`
                ${F("tau_gas2_alien_station")}
                `+(t.tauceti.hasOwnProperty("alien_station")&&t.tauceti.alien_station.count>=100?`
                ${F("space_dwarf_reactor_desc_req")}
                `:`
                ${F("tau_gas2_alien_station_repair")}
                `):`
                ${F("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?We(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+=`
                ${F("tau_gas2_alien_station_repaired",[r])}
                `,a):He.tau_gas2.alien_space_station.effect(e)},action(){return!!(ii($(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),Ze()}},alien_space_station:{id:"tauceti-alien_space_station",title:F("tau_gas2_alien_station"),desc:()=>`
                ${F("tau_gas2_alien_station")}
                ${F("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=`
                ${F("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+=`
                ${F("tau_gas2_alien_station_effect",[r])}
                `}return a+=`
                ${F("spend",[e,t.resource[$(this)[0].p_fuel().r].name])}
                `,a},p_fuel:()=>({r:"Elerium",a:t.race.lone_survivor?1:10}),powered:()=>As(-75),action:()=>!1},matrioshka_brain:{id:"tauceti-matrioshka_brain",title:F("tech_matrioshka_brain"),desc:e=>!t.tauceti.hasOwnProperty("matrioshka_brain")||t.tauceti.matrioshka_brain.count<1e3||e?`
                ${F("tech_matrioshka_brain")}
                ${F("requires_segmemts",[1e3])}
                `:`
                ${F("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?We(64e3):0},effect(e){let a="",r=(e||0)+(t.tauceti.hasOwnProperty("matrioshka_brain")?t.tauceti.matrioshka_brain.count:0);return r<1e3&&(a+=`
                ${F("tau_gas2_matrioshka_brain_seg",[1e3-r])}
                `),a},action(){return!!(ii($(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:F("tech_ignition_device"),desc:e=>!t.tauceti.hasOwnProperty("ignition_device")||t.tauceti.ignition_device.count<10||e?`
                ${F("tech_ignition_device")}
                ${F("requires_segmemts",[10])}
                `:`
                ${F("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?We(8e6):0},effect(e){let a="",r=(e||0)+(t.tauceti.hasOwnProperty("ignition_device")?t.tauceti.ignition_device.count:0);return r<10&&(a+=`
                ${F("tau_gas2_ignition_device_seg",[10-r])}
                `),a},action(){return!!(ii($(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:()=>F("tau_gas2_ignite_gas_giant",[He.tau_gas2.info.name()]),desc:()=>F("tau_gas2_ignite_gas_giant",[He.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=`
                ${F("tau_gas2_ignite_gas_giant_effect",[F("tech_matrioshka_brain")])}
                `;return t.tech.m_brain?(e+=`
                ${F("tau_gas2_ignite_gas_giant_effect3")}
                `,e+=function(){let e=Ns("retire"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name"),r=t.stats.retire+1===t.stats.matrix?`
                ${F("tau_star_matrix_skilled",[1])}
                `:"";return`
                ${F("interstellar_ascension_trigger_effect2",[e.plasmid,a])}
                ${F("interstellar_ascension_trigger_effect2",[e.phage,F("resource_Phage_name")])}
                ${F("tau_star_matrix_servants",[1])}
                ${r}`}()):e+=`
                ${F("tau_gas2_ignite_gas_giant_effect2",[F("tech_matrioshka_brain")])}
                `,e},action(){return!(!t.tech.m_brain||!ii($(this)[0])||(function(){j.w&&j.w.terminate(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),M(),$s("reset",{end:"retire"});let a=t.race.species,r=t.race.gods,i=Di[a].type,s=t.city.calendar.orbit,n=t.city.biome,c=t.city.ptrait,o=t.city.geology,l=Ns("retire");Pn(`biome_${n}`),c.forEach((function(e){ns.hasOwnProperty(e)&&Pn(`atmo_${e}`)})),Pn(`genus_${i}`),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&Pn("gross"),Pn("retired"),V(),Cn(),t.stats.retire++,sn(),"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 _=!!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),_&&(t.race.srace=_),U({orbit:s,biome:n,ptrait:c,geology:o}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}(),0))}}}};for(let e=1;e<9;e++)He.tau_gas[`gas_contest-a${e}`]={id:`tauceti-gas_contest-a${e}`,title:()=>He.tau_gas.info.name(e),desc:()=>He.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:()=>F(8===e?"tau_gas_contest_reject":"tau_gas_contest_pick",[He.tau_gas.info.name(e)]),action(){return!!ii($(this)[0])&&(t.race.gas_name=e,t.tauceti.refueling_station={count:0,on:0},!0)}},He.tau_gas2[`gas_contest-b${e}`]={id:`tauceti-gas_contest-b${e}`,title:()=>He.tau_gas2.info.name(e),desc:()=>He.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:()=>F(8===e?"tau_gas2_contest_reject":"tau_gas_contest_pick",[He.tau_gas2.info.name(e)]),action(){return!!ii($(this)[0])&&(t.race.gas_name2=e,!0)}};function Ue(){let e=Ns("matrix"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name"),r=t.stats.retire===t.stats.matrix+1?`
                ${F("tau_star_matrix_skilled",[1])}
                `:"";return`
                ${F("interstellar_ascension_trigger_effect2",[e.plasmid,a])}
                ${F("interstellar_ascension_trigger_effect2",[e.phage,F("resource_Phage_name")])}
                ${F("tau_star_matrix_servants",[1])}
                ${r}`}function Ve(){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 We(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 Qe(){return Re}function Je(){return!!(t.tech.tauceti&&t.tech.tauceti>=4)}function Ze(){if(!t.settings.tabLoad&&(1!==t.settings.civTabs||6!==t.settings.spaceTabs))return;let e=$("#tauceti");Cs(e),e.append($(`

                ${F("tab_tauceti")}

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

                ${r}

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

                ${r}

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

                ${r}

                ${i}
                `);_s(a,(function(){return"string"==typeof He[a].info.desc?He[a].info.desc:He[a].info.desc()}),{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(He[a]).forEach((function(e){"info"!==e&&Lt(He,a,e)&&Xr(He[a][e],"tauceti",e)})),He[a].info.hasOwnProperty("extra")&&He[a].info.extra(a)}}))}function Xe(){if((t.settings.tabLoad||2===t.settings.civTabs&&5===t.settings.govTabs)&&(ut(),ct(),Cs($("#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:Ye()});let a=$('
                ');e.append(a);let r=$('
                ');a.append(r),r.append(`
                ${F("outer_shipyard_registry")}:
                `),r.append(`
                ${F("crew")}
                `),r.append(`
                ${F("power")}
                `),r.append(`
                ${F("firepower")}
                `),r.append(`
                ${F("outer_shipyard_sensors")}
                `),r.append(`
                ${F("speed")}
                `),r.append(`
                ${F("outer_shipyard_fuel")}
                `),a.append('
                ');let i=$('
                ');a.append(i);let s={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(s).forEach((function(e){let t="";s[e].forEach((function(a,r){t+=`${F(`outer_shipyard_${e}_${a}`)}`})),i.append(`\n ${t}\n `)}));let n=$('
                ');n.append(``),n.append(`${F("outer_shipyard_fleet_details")}`),n.append(`${F("outer_shipyard_fleet_sort")}`),a.append(n),n.append(`
                ${F("outer_shipyard_park",[Vt().dwarf])}${F("outer_shipyard_map")}`),et();let c={template:''};zs({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,et()},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:()=>tt(t.space.shipyard.blueprint),powerText(){let e=at(t.space.shipyard.blueprint);return e<0?`${e}kW`:`${e}kW`},fireText:()=>rt(t.space.shipyard.blueprint),sensorText:()=>dt(t.space.shipyard.blueprint)+"km",speedText(){let e=7.695363719135802*it(t.space.shipyard.blueprint);return Math.round(e)+"km/s"},fuelText(){let e=st(t.space.shipyard.blueprint);return e.res?`-${e.burn} ${t.resource[e.res].name}`:"N/A"},build(){if(at(t.space.shipyard.blueprint)>=0){let e=nt(t.space.shipyard.blueprint),a={};if(Object.keys(e).forEach((function(t){a[t]=function(){return e[t]}})),ii(!1,a)){let e=nn(t.space.shipyard.blueprint);e.location="spc_dwarf",e.xy=ht("spc_dwarf"),e.origin=nn(e.xy),e.destination=nn(e.xy),e.transit=0,e.dist=0,e.damage=0,e.fueled=!1,0===e.name.length&&(e.name=Ye());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),ot(),et(),t.space.shipyard.blueprint.name=Ye()}}},trigModal(){this.$buefy.modal.open({parent:this,component:c});let e=setInterval((function(){$("#modalBox").length>0&&(clearInterval(e),$("#modalBox").append($('

                Solar System

                ')),function(e){let t=$('
                ').appendTo(e),a={},r={},i=!1;bt={},yt=20,t.append($('').on("mouseup mouseover mouseout",(()=>i=!1)).on("mousedown",(e=>{i=!0,r.x=e.clientX-bt.x,r.y=e.clientY-bt.y})).on("mousemove",(e=>{i&&(bt.x=e.clientX-r.x,bt.y=e.clientY-r.y,wt())})).on("wheel",(e=>(e.originalEvent.deltaY<0?(yt/=.8,bt.x=a.x+(bt.x-a.x)/.8,bt.y=a.y+(bt.y-a.y)/.8,wt()):(yt*=.8,bt.x=a.x+.8*(bt.x-a.x),bt.y=a.y+.8*(bt.y-a.y),wt()),!1))),$('').on("click",(()=>{yt/=.8,bt.x=a.x+(bt.x-a.x)/.8,bt.y=a.y+(bt.y-a.y)/.8,wt()})),$('').on("click",(()=>{yt*=.8,bt.x=a.x+.8*(bt.x-a.x),bt.y=a.y+.8*(bt.y-a.y),wt()})));let s=document.getElementById("mapCanvas").getBoundingClientRect();a.x=s.width/2,a.y=s.height/2,bt.x=a.x,bt.y=a.y,wt()}($("#modalBox")))}),50)},redraw(){ot()}},filters:{lbl:(e,t)=>F(`outer_shipyard_${t}_${e}`)}}),Object.keys(s).forEach((function(e){for(let t=0;t<$(`#shipPlans .${e}`).length;t++)_s(`shipPlans${e}${t}`,(function(t){let a=$(t.this).attr("data-val");return F(`outer_shipyard_${e}_${a}_desc`)}),{elm:`#shipPlans .${e}.a${t}`,placement:"right"})})),e.append($('
                ')),ot()}}function Ye(){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 tt(e){switch(e.class){case"corvette":return aa(2);case"frigate":return aa(3);case"destroyer":return aa(4);case"cruiser":return aa(6);case"battlecruiser":return aa(8);case"dreadnought":case"explorer":return aa(10)}}function at(e,t){let a=0,r=1,i=1;switch(e.class){case"frigate":r=1.1,i=1.2;break;case"destroyer":r=1.5,i=1.65;break;case"cruiser":r=2,i=2.5;break;case"battlecruiser":r=2.5,i=3.5;break;case"dreadnought":r=5,i=6.5;break;case"explorer":r=6,i=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(As(a)),e.weapon){case"railgun":a-=Math.round(10*i);break;case"laser":a-=Math.round(30*i);break;case"p_laser":a-=Math.round(18*i);break;case"plasma":a-=Math.round(50*i);break;case"phaser":a-=Math.round(65*i);break;case"disruptor":a-=Math.round(100*i)}switch(e.engine){case"ion":a-=Math.round(25*i);break;case"tie":a-=Math.round(50*i);break;case"pulse":a-=Math.round(40*i);break;case"photon":a-=Math.round(75*i);break;case"vacuum":a-=Math.round(120*i);break;case"emdrive":a-=Math.round(("explorer"===e.class||t?515:1024)*i)}switch(e.sensor){case"radar":a-=Math.round(10*i);break;case"lidar":a-=Math.round(25*i);break;case"quantum":a-=Math.round(75*i)}return a}function rt(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 it(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&&s.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 st(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 nt(e){let a={},r=1,i=1,s=1;switch(e.class){case"corvette":a.Money=25e5,a.Aluminium=5e5,r=1,i=1,s=2;break;case"frigate":a.Money=5e6,a.Aluminium=125e4,r=1.1,i=1.09,s=1.5;break;case"destroyer":a.Money=15e6,a.Aluminium=35e5,r=1.2,i=1.18,s=1.2;break;case"cruiser":a.Money=5e7,a.Adamantite=1e6,r=1.3,i=1.25;break;case"battlecruiser":a.Money=125e6,a.Adamantite=26e5,r=1.35,i=1.3,s=.8;break;case"dreadnought":a.Money=5e8,a.Adamantite=8e6,r=1.4,i=1.35,s=.5;break;case"explorer":a.Money=8e8,a.Adamantite=95e5,r=1.45,i=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**i);break;case"tie":a.Titanium=Math.round(15e4**i);break;case"pulse":a.Titanium=Math.round(125e3**i);break;case"photon":a.Titanium=Math.round(21e4**i);break;case"vacuum":a.Titanium=Math.round(3e5**i);break;case"emdrive":a.Titanium=Math.round(125e4**i)}let n=!!["dreadnought","explorer"].includes(e.class);switch(e.power){case"solar":case"diesel":a[n?"Orichalcum":"Copper"]=Math.round(4e4**r),a.Iridium=Math.round(15e3**i);break;case"fission":a[n?"Orichalcum":"Copper"]=Math.round(5e4**r),a.Iridium=Math.round(3e4**i);break;case"fusion":a[n?"Orichalcum":"Copper"]=Math.round(5e4**r),a.Iridium=Math.round(4e4**i);break;case"elerium":a[n?"Orichalcum":"Copper"]=Math.round(6e4**r),a.Iridium=Math.round(55e3**i)}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 c=0;t.space.shipyard.ships.forEach((function(t){t.class===e.class&&c++}));let o=1+(c-2)/25*s;return Object.keys(a).forEach((function(t){"explorer"===e.class?a[t]=Math.ceil(a[t]*(3*(c+1))):c<2?a[t]=Math.ceil(a[t]*(0===c?.75:.9)):c>2&&(a[t]=Math.ceil(a[t]*o))})),a}function ct(){let e=$("#shipList")[0];if(e){let t=Sortable.get(e);t&&t.destroy()}}function ot(){if(ct(),Cs($("#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=It();for(let r=0;r${e}`}}else Object.keys(a).forEach((function(e){if(i.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();s+=`${t}`}}));let n="tauceti"===i.location?F("tech_era_tauceti"):"string"==typeof a[i.location].info.name?a[i.location].info.name:a[i.location].info.name(),c=`\n ${s}\n `;if(t.space.shipyard.expand){let t=`${F(`outer_shipyard_engine_${i.engine}`)} ${F(`outer_shipyard_class_${i.class}`)}`,a=$(`
                `),s=$(`
                ${i.name} | ${F("outer_shipyard_scrap")} | ${t} | ${F(`outer_shipyard_weapon_${i.weapon}`)} | ${F(`outer_shipyard_power_${i.power}`)} | ${F(`outer_shipyard_armor_${i.armor}`)} | ${F(`outer_shipyard_sensor_${i.sensor}`)}
                `),n=$('
                '),o=$('
                '),l=$(`
                ${c}
                `);n.append(`${F("crew")} `),n.append(`${F("firepower")} `),n.append(`${F("outer_shipyard_sensors")} `),n.append(`${F("speed")} `),n.append(`${F("outer_shipyard_fuel")} `),n.append(`${F("outer_shipyard_hull")} `),o.append(``),a.append(s),a.append(n),a.append(o),a.append(l),e.append(a)}else{let t=$(`
                `),a=$('
                '),s=$('
                '),n=$(`
                ${c}
                `);a.append(`${i.name} | `),a.append(`${F("firepower")} `),a.append(`${F("outer_shipyard_sensors")} `),a.append(`${F("speed")} `),a.append(`${F("outer_shipyard_fuel")} `),a.append(`${F("outer_shipyard_hull")} `),s.append(``),t.append(a),t.append(s),t.append(n),e.append(t)}zs({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),ot(),et())},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 i=tt(r),s=r.transit>0||"spc_dwarf"!==r.location;if(s||t.civic.garrison.workers-t.civic.garrison.crew>=i){let n=lt(r,e),c=mt(r.xy,n),o=it(r);r.location=e,r.transit=Math.round(c/o),r.dist=Math.round(c/o),r.origin=nn(r.xy),r.destination={x:n.x,y:n.y},s||(t.civic.garrison.crew+=i),ot(),ds(`ship${a}loc${e}`)}}},crewText:e=>tt(t.space.shipyard.ships[e]),fireText:e=>rt(t.space.shipyard.ships[e]),sensorText:e=>dt(t.space.shipyard.ships[e])+"km",speedText(e){let a=7.695363719135802*it(t.space.shipyard.ships[e]);return Math.round(a)+"km/s"},fuelText(e){let a=st(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"===i.class?F("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 F("outer_shipyard_arrive",[r,t.space.shipyard.ships[e].transit])},show:e=>t.space.shipyard.ships[e].transit>0}}),"explorer"===i.class?"tauceti"!==i.location&&_s(`ship${r}loctauceti`,(function(){return F("transit_time",[Math.round(mt(i.xy,lt(i,"tauceti"))/it(i))])}),{elm:`#ship${r}loc .tauceti`,placement:"left"}):Object.keys(a).forEach((function(e){(a[e].info.syndicate()||"spc_dwarf"===e)&&i.location!==e&&_s(`ship${r}loc${e}`,(function(){return F("transit_time",[Math.round(mt(i.xy,lt(i,e))/it(i))])}),{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,ot()}})}()}function lt(e,a){if(-2===pt[a].orbit)return ht(a);let r=Math.sqrt((e.xy.x-ft(a))**2+e.xy.y**2),i=it(e)/225,s=vt(1,a),n=Math.abs(r-pt[a].dist),c=Math.abs(r+pt[a].dist),o=Math.abs(r-pt[a].dist*s),l=Math.abs(r+pt[a].dist*s),_=Math.floor(Math.min(n,o,c,l)/i),d=Math.ceil(Math.max(n,o,c,l)/i);r>=pt[a].dist&&r<=pt[a].dist*s&&(_=0);let p=360/(-1===pt[a].orbit?t.city.calendar.orbit:pt[a].orbit),u=(t.space.position[a]+_*p)%360,h=Math.PI/180;for(let t=_;t<=d;t++){let r=vt(Math.cos(u*h)*pt[a].dist,a);r+=ft(a);let s=Math.sin(u*h)*pt[a].dist;if(Math.sqrt((r-e.xy.x)**2+(s-e.xy.y)**2)/i<=t)return{x:r,y:s};u=(u+p)%360}return ht(a)}function _t(e,a){if(!t.tech.isolation&&t.tech.syndicate&&t.race.truepath&&t.space.syndicate&&t.space.syndicate.hasOwnProperty(e)){let r=1e3,i=0;switch(t.civic.foreign.gov3.hstl<10?i=250-25*t.civic.foreign.gov3.hstl:t.civic.foreign.gov3.hstl>60&&(i=-13*(t.civic.foreign.gov3.hstl-60)),e){case"spc_home":case"spc_moon":case"spc_red":case"spc_hell":r=1250+i;break;case"spc_gas":case"spc_gas_moon":case"spc_belt":r=1020+i;break;case"spc_titan":case"spc_enceladus":case"spc_triton":case"spc_kuiper":case"spc_eris":r=Sr.space[e].info.syndicate_cap()}let c=t.space.syndicate[e],o=0,l=0,_=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=rt(t);o+=t.damage>0?Math.round(e*(100-t.damage)/100):e,l+=dt(t)}})),"spc_enceladus"===e&&Math.min(n.operating_base,s.operating_base)>0){let e=Math.min(n.operating_base,s.operating_base);o+=50*e}else"spc_titan"===e&&s.sam>0?o+=25*s.sam:"spc_triton"===e&&s.fob>0&&(o+=500,l+=10);l>100&&(l=Math.round((l-100)/(l-100+200)*100)+100),o=Math.round(o*((l+25)/125)),o>c&&(_=o-c),c=c-o>0?c-o:0}return a?{p:1-+(c/r).toFixed(4),r:c,s:l,o:_}:1-+(c/r).toFixed(4)}return a?{p:1,r:0,s:0,o:0}:1}function dt(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 pt={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 ut(){t.space.position||(t.space.position={}),Object.keys(pt).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 ht(e){let a=vt(+Math.cos(t.space.position[e]*(Math.PI/180)).toFixed(5)*pt[e].dist,e),r=+Math.sin(t.space.position[e]*(Math.PI/180)).toFixed(5)*pt[e].dist;return a+=ft(e),{x:a,y:r}}function mt(e,t){return Math.ceil(225*Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2))}function gt(e,a){let r=1;switch(t.race.pack_rat&&(r*=1+Ki.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":s.titan_spaceport&&(r*=1+.25*s.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 vt(e,a){if(-2!==pt[a].orbit){let r=1.075+pt[a].dist/100;t.city.ptrait.includes("elliptical")&&(r="spc_home"===a?1.5:1.275+pt[a].dist/100),e*=r}return e}function ft(e){if(-2!==pt[e].orbit){let a=pt[e].dist/3;return t.city.ptrait.includes("elliptical")&&"spc_home"===e&&(a+=.15),"spc_eris"===e&&(a+=25),a}return 0}var yt,bt;function wt(){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(bt.x,bt.y),a.scale(yt,yt);let r={};for(let[e,t]of Object.entries(pt))r[e]=ht(e);a.lineWidth=1/yt,a.strokeStyle="#c0c0c0";for(let[e,r]of Object.entries(pt))if(!r.moon&&-2!==r.orbit){a.beginPath(),r.belt||t.race.orbit_decayed&&"spc_home"===e?a.setLineDash([.01,.01]):a.setLineDash([]);let i=ft(e);a.ellipse(i,0,vt(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,i]of Object.entries(pt)){if(t.race.orbit_decayed&&["spc_home","spc_moon"].includes(e))continue;let s="558888";if(Sr.space[e]&&Sr.space[e].info.syndicate()&&t.settings.space[e.substring(4)]){let t=_t(e);s=((Math.round(255*(1-t))<<16)+(Math.round(255*t)<<8)).toString(16).padStart(6,0)}"spc_dwarf"===e?s="7132a8":"spc_sun"!==e&&"tauceti"!==e||(s="f8ff2b"),a.fillStyle="#"+s,a.beginPath();let n=i.size/10;if(i.moon)switch(e){case"spc_moon":a.arc(r[e].x+.05,r[e].y+.05,n,0,2*Math.PI,!0);break;case"spc_titan":a.arc(r[e].x-.2,r[e].y-.2,n,0,2*Math.PI,!0);break;default:a.arc(r[e].x+.2,r[e].y+.2,n,0,2*Math.PI,!0)}else{let t=i.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/yt+"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/yt+"px serif";for(let[e,i]of Object.entries(pt))if(Sr.space[e]&&t.settings.space[e.substring(4)]){if(t.race.orbit_decayed&&["spc_home"].includes(e))continue;let s=Sr.space[e].info.name,n="function"==typeof s?s():s;if(i.moon)switch(e){case"spc_moon":a.fillText(n,r[e].x+.1,r[e].y+.1);break;case"spc_titan":a.fillText(n,r[e].x-.3,r[e].y-.3);break;default:a.fillText(n,r[e].x+.25,r[e].y+.2)}else"spc_sun"===e||a.fillText(n,r[e].x,r[e].y-.2*i.size)}a.restore()}function kt(e){switch(e){case"city":return t.resource[t.race.species]?t.resource[t.race.species].amount<=5?F("tab_city1"):t.resource[t.race.species].amount<=20?F("tab_city2"):t.resource[t.race.species].amount<=75?F("tab_city3"):t.resource[t.race.species].amount<=250?F("tab_city4"):t.resource[t.race.species].amount<=600?F("tab_city5"):t.resource[t.race.species].amount<=1200?F("tab_city6"):t.resource[t.race.species].amount<=2500?F("tab_city7"):F("tab_city8"):F("tab_city1");case"local_space":return F("sol_system",[t.race.truepath?Di[t.race.species].home:cn("name")]);case"outer_local_space":return F("outer_sol_system",[t.race.truepath?Di[t.race.species].home:cn("name")]);case"old":return F("tab_old_res");case"new":return F("tab_new_res");case"old_sr":return F("tab_old_sr_res");case"new_sr":return F("tab_new_sr_res");default:return F(e)}}function $t(e){switch(t.settings.tabLoad?$s("page_view",{page_title:"Evolve - All Tabs"}):(yi(),zi(),ka(),Ee(),K(),ct(),Cs($("#mTabCivil")),Cs($("#mTabCivic")),Cs($("#mTabResearch")),Cs($("#mTabResource")),Cs($("#mTabArpa")),Cs($("#mTabStats")),Cs($("#mTabObserve"))),e){case 0:t.settings.tabLoad||($s("page_view",{page_title:"Evolve - Evolution"}),Lr());break;case 1:case"mTabCivil":t.settings.tabLoad||$s("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 '),zs({el:"#mTabCivil",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(Cs($("#city")),Cs($("#space")),Cs($("#interstellar")),Cs($("#galaxy")),Cs($("#portal")),Cs($("#outerSol")),Cs($("#tauCeti")),e){case 0:Qr();break;case 1:case 2:case 3:case 5:Et();break;case 4:ha();break;case 6:Ze()}return e}},filters:{label:e=>kt(e)}}),"protoplasm"!==t.race.species&&(Qr(),Et(),ha(),Ze()),t.race.noexport&&("Race"===t.race.noexport?(Cs($("#city")),Jt()):"Planet"===t.race.noexport&&(Cs($("#city")),Zt()));break;case 2:case"mTabCivic":t.settings.tabLoad||$s("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 '),zs({el:"#mTabCivic",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(zi(),K(),ka(),ct(),Cs($("#civic")),Cs($("#industry")),Cs($("#powerGrid")),Cs($("#military")),Cs($("#mechLab")),Cs($("#dwarfShipYard")),Cs($("#psychicPowers")),e){case 0:$("#civic").append($('
                ')),ea(),$("#civics").append($('
                ')),W(),"protoplasm"===t.race.species||t.race.start_cataclysm||(J(),me($("#c_garrison"),!1),ae()),t.race.shapeshifter&&es(!1,!0);break;case 1:$i();break;case 2:Object.keys(Ci()).forEach((function(e){hs(e)})),Si();break;case 3:"protoplasm"===t.race.species||t.race.start_cataclysm||(Q(),ga($("#fortress"),!1));break;case 4:"protoplasm"===t.race.species||t.race.start_cataclysm||ba();break;case 5:t.race.truepath&&"protoplasm"!==t.race.species&&!t.race.start_cataclysm&&Xe();break;case 6:t.race.psychic&&t.tech.psychic&&"protoplasm"!==t.race.species&&os()}return e}},filters:{label:e=>kt(e)}}),Object.keys(Ci()).forEach((function(e){hs(e)})),Si(),$("#civic").append($('
                ')),ea(),$("#civics").append($('
                ')),W(),"protoplasm"===t.race.species||t.race.start_cataclysm||(Q(),me($("#c_garrison"),!1),ga($("#fortress"),!1),ae(),ba(),t.race.truepath&&Xe(),t.race.psychic&&t.tech.psychic&&os()),t.race.shapeshifter&&es(!1,!0),$i();break;case 3:case"mTabResearch":t.settings.tabLoad||$s("page_view",{page_title:"Evolve - Research"}),$("#mTabResearch").append('
                \n \n \n \n \n \n \n \n '),zs({el:"#mTabResearch",data:{s:t.settings,rq:t.r_queue},filters:{label:e=>kt(e)}}),fi(),"protoplasm"!==t.race.species&&Jr();break;case 4:case"mTabResource":t.settings.tabLoad||$s("page_view",{page_title:"Evolve - Resources"}),$("#mTabResource").append('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),zs({el:"#mTabResource",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(Cs($("#market")),Cs($("#resStorage")),Cs($("#resEjector")),Cs($("#resCargo")),Cs($("#resAlchemy")),e){case 0:Da("market");break;case 1:Da("storage");break;case 2:Da("ejector");break;case 3:Da("supply");break;case 4:Da("alchemy")}return e}},filters:{label:e=>kt(e)}}),Ka(),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let r=a.resource[e].color,i=a.resource[e].tradable;if(a.resource[e].stackable){var s=$(`
                `);$("#resStorage").append(s),tr(`#stack-${e}`,s,e,r)}i&&(s=$(`
                `),$("#market").append(s),Wa(`#market-${e}`,s,e,r,!0)),Aa[e]&&gr(e,r),Ia[e]&&fr(e,r),Fa[e]&&"magic"===t.race.universe&&(t.resource[e].basic=i,br(e,r,i))})),Ga();break;case 5:case"mTabArpa":t.settings.tabLoad||$s("page_view",{page_title:"Evolve - Arpa"}),$("#mTabArpa").append(`
                \n \n \n \n \n \n \n
                `),zs({el:"#mTabArpa",data:{s:t.settings},filters:{label:e=>kt(e)}}),qe("Physics"),qe("Genetics"),qe("Crispr"),qe("Blood");break;case 6:case"mTabStats":t.settings.tabLoad||$s("page_view",{page_title:"Evolve - Stats"}),$("#mTabStats").append('\n \n \n \n \n \n \n \n \n \n '),zs({el:"#mTabStats",data:{s:t.settings},filters:{label:e=>kt(e)}}),function(){Cs($("#achieve")),Cs($("#stats"));let e=$('
                ');$("#stats").append(e);let a=$('
                ');$("#perks").append(a);let r=$('
                ');$("#achieve").append(r),function(){Cs($("#statsPanel"));let e=$("#statsPanel");if(e.append(`
                ${F("achieve_stats_overall")}
                `),e.append(`
                ${F("achieve_stats_plasmid_earned")} {{ s.plasmid | format }}
                `),t.stats.antiplasmid>0&&e.append(`
                ${F("achieve_stats_antiplasmid_earned")} {{ s.antiplasmid | format }}
                `),t.stats.phage>0&&e.append(`
                ${F("achieve_stats_phage_earned")} {{ s.phage | format }}
                `),t.stats.dark>0&&e.append(`
                ${F("achieve_stats_dark_earned")} {{ s.dark | format }}
                `),t.stats.harmony>0&&e.append(`
                ${F("achieve_stats_harmony_earned")} {{ s.harmony | format }}
                `),t.stats.blood>0&&e.append(`
                ${F("achieve_stats_blood_earned")} {{ s.blood | format }}
                `),t.stats.artifact>0&&e.append(`
                ${F("achieve_stats_artifact_earned")} {{ s.artifact | format }}
                `),e.append(`
                ${F("achieve_stats_knowledge_spent")} {{ s.know | t_know | format }}
                `),e.append(`
                ${F("achieve_stats_starved_to_death")} {{ s.starved | t_starved | format }}
                `),e.append(`
                ${F("achieve_stats_died_in_combat")} {{ s.died | t_died | format }}
                `),e.append(`
                ${F("achieve_stats_game_days_played")} {{ s.days | played | format }}
                `),t.stats.portals>0&&e.append(`
                ${F("achieve_stats_portals")} {{ s.portals | format }}
                `),e.append(`
                ${F("achieve_stats_total_resets")} {{ s.reset | format }}
                `),t.stats.mad>0&&e.append(`
                ${F("achieve_stats_mad_resets")} {{ s.mad | format }}
                `),t.stats.bioseed>0&&e.append(`
                ${F("achieve_stats_bioseed_resets")} {{ s.bioseed | format }}
                `),t.stats.cataclysm>0&&e.append(`
                ${F("achieve_stats_cataclysm_resets")} {{ s.cataclysm | format }}
                `),t.stats.blackhole>0&&e.append(`
                ${F("achieve_stats_blackhole_resets")} {{ s.blackhole | format }}
                `),t.stats.ascend>0&&e.append(`
                ${F("achieve_stats_ascension_resets")} {{ s.ascend | format }}
                `),t.stats.descend>0&&e.append(`
                ${F("achieve_stats_descension_resets")} {{ s.descend | format }}
                `),t.stats.aiappoc>0&&e.append(`
                ${F("achieve_stats_aiappoc_resets")} {{ s.aiappoc | format }}
                `),t.stats.matrix>0&&e.append(`
                ${F("achieve_stats_matrix_resets")} {{ s.matrix | format }}
                `),t.stats.retire>0&&e.append(`
                ${F("achieve_stats_retire_resets")} {{ s.retire | format }}
                `),t.stats.eden>0&&e.append(`
                ${F("achieve_stats_eden_resets")} {{ s.eden | format }}
                `),t.stats.terraform>0&&e.append(`
                ${F("achieve_stats_terraform_resets")} {{ s.terraform | format }}
                `),t.stats.geck>0&&e.append(`
                ${F("achieve_stats_gecks")} {{ s.geck | format }}
                `),e.append(`
                ${F("achieve_stats_current_game")}
                `),e.append(`
                ${F("achieve_stats_knowledge_spent")} {{ s.know | format }}
                `),e.append(`
                ${F("achieve_stats_starved_to_death")} {{ s.starved | format }}
                `),e.append(`
                ${F("achieve_stats_died_in_combat")} {{ s.died | format }}
                `),e.append(`
                ${F("achieve_stats_attacks_made")} {{ s.attacks | format }}
                `),e.append(`
                ${F("achieve_stats_game_days_played")} {{ s.days | format }}
                `),t.stats.dkills>0&&e.append(`
                ${F("achieve_stats_demons_kills")} {{ s.dkills | format }}
                `),t.stats.sac>0&&e.append(`
                ${F("achieve_stats_sacrificed")} {{ s.sac | format }}
                `),t.stats.murders>0&&e.append(`
                ${F("achieve_stats_murders")} {{ s.murders | format }}
                `),t.stats.psykill>0&&e.append(`
                ${F("achieve_stats_psymurders")} {{ s.psykill | format }}
                `),t.resource.hasOwnProperty("Thermite")&&t.resource.Thermite.amount>0&&e.append(`
                ${F("achieve_stats_thermite")} {{ r.Thermite.amount | res }}
                `),_n().active){let a="";(t.stats.cfood>=13||t.race.cataclysm||t.race.orbit_decayed)&&(a=`${Zs(7,12,!0)}`),e.append(`
                ${F("achieve_stats_trickortreat")} {{ s.cfood | format }} ${a}
                `)}zs({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()}})}(),In(),$("body").hasClass("fool")?On({fool:!0}):On()}();break;case 7:t.settings.tabLoad||$s("page_view",{page_title:"Evolve - Settings"});break;default:t.settings.tabLoad||$s("page_view",{page_title:"Evolve - Hell Observation"}),t.portal.observe&&ja(!0)}$("#popper").length>0&&0===$(`#${$("#popper").data("id")}`).length&&ds()}const xt={spc_home:{info:{name:()=>Di[t.race.species].home,desc:F("space_home_info_desc"),zone:"inner",syndicate:()=>!1},test_launch:{id:"space-test_launch",title:F("space_home_test_launch_title"),desc:F("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)=>Ht(7500,!1,t)},effect:F("space_home_test_launch_effect"),action(){if(ii($(this)[0])){if(t.race.truepath){let e=1;if(oe("gov0")||e++,oe("gov1")||e++,oe("gov2")||e++,0!==Math.floor(g(0,e)))return ms(F("space_home_test_launch_action_fail"),"danger",!1,["progress"]),0}return t.space.satellite={count:0},ms(F("space_home_test_launch_action"),"info",!1,["progress"]),!0}return!1}},satellite:{id:"space-satellite",title:F("space_home_satellite_title"),desc:F("space_home_satellite_desc"),reqs:{space:2},cost:{Money:e=>js("satellite",e,72e3,1.22),Knowledge:e=>js("satellite",e,28e3,1.22),Oil:(e,t)=>js("satellite",e,Ht(3200,!1,t),1.22),Alloy:e=>js("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?F("space_moon_observatory_title"):t.race.orbit_decayed?F("city_university"):di(),r=`
                ${F("space_home_satellite_effect2",[a,t.race.cataclysm?25:t.race.orbit_decayed?12:4])}
                `;return`
                ${F("plus_max_resource",[e,F("resource_Knowledge_name")])}
                ${r}
                ${F("space_home_satellite_effect3",[t.civic.scientist?t.civic.scientist.name:F("job_scientist")])}
                `},action(){return!!ii($(this)[0])&&(At("satellite"),t.resource.Knowledge.max+=750,!0)}},gps:{id:"space-gps",title:F("space_home_gps_title"),desc:()=>t.space.hasOwnProperty("gps")&&t.space.gps.count<4?`
                ${F("space_home_gps_desc")}
                ${F("space_home_gps_desc_req")}
                `:`
                ${F("space_home_gps_desc")}
                `,reqs:{satellite:1},not_trait:["terrifying"],cost:{Money:e=>js("gps",e,75e3,1.18),Knowledge:e=>js("gps",e,5e4,1.18),Copper:e=>js("gps",e,6500,1.18),Oil:(e,t)=>js("gps",e,Ht(3500,!1,t),1.18),Titanium:e=>js("gps",e,8e3,1.18)},effect:e=>(e||0)+(t.space.hasOwnProperty("gps")?t.space.gps.count:0)<4?F("space_home_gps_effect_req"):`
                ${F("space_home_gps_effect")}
                ${F("space_home_gps_effect2",[2])}
                `,action(){return!!ii($(this)[0])&&(At("gps"),!0)}},propellant_depot:{id:"space-propellant_depot",title:F("space_home_propellant_depot_title"),desc:F("space_home_propellant_depot_desc"),reqs:{space_explore:1},cost:{Money:e=>js("propellant_depot",e,55e3,1.35),Aluminium:e=>js("propellant_depot",e,22e3,1.35),Oil:(e,t)=>js("propellant_depot",e,Ht(5500,!1,t),1.35)},effect(){let e=wr(1250)*(t.tech.world_control?1.5:1);if(t.resource.Helium_3.display){let a=wr(1e3)*(t.tech.world_control?1.5:1);return`
                ${F("plus_max_resource",[e,F("resource_Oil_name")])}
                ${F("plus_max_resource",[a,F("resource_Helium_3_name")])}
                `}return`
                ${F("plus_max_resource",[e,F("resource_Oil_name")])}
                `},action(){return!!ii($(this)[0])&&(At("propellant_depot"),t.resource.Oil.max+=wr(1250)*(t.tech.world_control?1.5:1),t.resource.Helium_3.display&&(t.resource.Helium_3.max+=wr(1e3)*(t.tech.world_control?1.5:1)),!0)}},nav_beacon:{id:"space-nav_beacon",title:()=>t.race.orbit_decayed?F("space_home_broadcast_beacon_title"):F("space_home_nav_beacon_title"),desc:`
                ${F("space_home_nav_beacon_desc")}
                ${F("requires_power")}
                `,reqs:{luna:2},cost:{Money:e=>js("nav_beacon",e,75e3,1.32),Copper:e=>js("nav_beacon",e,38e3,1.32),Aluminium:e=>js("nav_beacon",e,44e3,1.32),Oil:(e,t)=>js("nav_beacon",e,Ht(12500,!1,t),1.32),Iridium:e=>js("nav_beacon",e,1200,1.32)},powered:()=>Is(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=`
                ${F("space_red_vr_center_effect1",[t.tech.broadcast/2])}
                `),`${t.race.orbit_decayed?"":`
                ${F("space_home_nav_beacon_effect1")}
                `}${t.tech.luna>=3?`
                ${F("space_red_spaceport_effect1",[Vt().red,1])}
                `:""}${e}
                ${F("space_home_nav_beacon_effect2",[$(this)[0].powered()])}
                `},action(){return!!ii($(this)[0])&&(At("nav_beacon"),ei($(this)[0]),!0)}}},spc_moon:{info:{name:F("space_moon_info_name"),desc:()=>F("space_moon_info_desc",[Di[t.race.species].home]),support:"moon_base",zone:"inner",syndicate:()=>!0},moon_mission:{id:"space-moon_mission",title:F("space_moon_mission_title"),desc:F("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)=>+Ht(12e3,!1,t).toFixed(0)},effect:F("space_moon_mission_effect"),action(){return!!ii($(this)[0])&&(ms(F("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:F("space_moon_base_title"),desc:()=>`
                ${F("space_moon_base_desc")}
                ${F("requires_power_combo",[t.resource.Oil.name])}
                `,reqs:{space:3},cost:{Money:e=>js("moon_base",e,22e3,1.32),Cement:e=>js("moon_base",e,18e3,1.32),Alloy:e=>js("moon_base",e,7800,1.32),Polymer:e=>js("moon_base",e,12500,1.32)},effect(e){let t=wr(500),a=+Ht($(this)[0].support_fuel().a,!0,e).toFixed(2);return`
                ${F("space_moon_base_effect1")}
                ${F("plus_max_resource",[t,F("resource_Iridium_name")])}
                ${F("space_moon_base_effect3",[a,$(this)[0].powered()])}
                `},support:()=>2,support_fuel:()=>({r:"Oil",a:2}),powered:()=>Is(4),powerBalancer:()=>[{s:t.space.moon_base.s_max-t.space.moon_base.support}],refresh:!0,action(){if(ii($(this)[0])){if(At("moon_base"),ei($(this)[0]),1===t.space.moon_base.count&&(t.tech.moon=1),!t.tech.luna&&(t.tech.luna=1,t.race.truepath)){let e=F("space_moon_base_msg",[X(3)]);t.civic.foreign.gov3.hstl<10?e=`${e} ${F("space_moon_base_msg_ally")}`:t.civic.foreign.gov3.hstl>60&&(e=`${e} ${F("space_moon_base_msg_hstl")}`),ms(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,ms(F("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:F("space_moon_iridium_mine_title"),desc:`
                ${F("space_moon_iridium_mine_desc")}
                ${F("space_support",[F("space_moon_info_name")])}
                `,reqs:{space:3,luna:1},cost:{Money:e=>js("iridium_mine",e,42e3,1.35),Lumber:e=>js("iridium_mine",e,9e3,1.35),Titanium:e=>js("iridium_mine",e,17500,1.35)},effect(){let e=xe("iridium_mine","iridium"),a=+e.b.toFixed(3),r="";t.race.truepath&&(t.civic.foreign.gov3.hstl<10?r=`
                ${F("space_rival_ally",[+(100*e.g).toFixed(1)])}
                `:t.civic.foreign.gov3.hstl>60&&(r=`
                ${F("space_rival_war",[+(100*e.g).toFixed(1)])}
                `));let i=t.race.cataclysm?`
                ${F("produce",[+xe("iridium_mine","coal").toFixed(2),t.resource.Coal.name])}
                `:"",s=t.race.cataclysm?`
                ${F("produce",[+(xe("iridium_mine","coal")/48).toFixed(3),t.resource.Uranium.name])}
                `:"";return`
                ${F("space_used_support",[F("space_moon_info_name")])}
                ${F("space_moon_iridium_mine_effect",[a])}
                ${r}${i}${s}`},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(t.resource.Iridium.display=!0,At("iridium_mine"),t.resource.Mythril.display||(t.resource.Mythril.display=!0,na()),t.space.moon_base.support${F("space_moon_helium_mine_desc")}
                ${F("space_support",[F("space_moon_info_name")])}
                `,reqs:{space:3,luna:1},cost:{Money:e=>js("helium_mine",e,38e3,1.35),Aluminium:e=>js("helium_mine",e,9e3,1.35),Steel:e=>js("helium_mine",e,17500,1.35)},effect(){let e=wr(100),a=xe("helium_mine"),r=+a.b.toFixed(3),i="";return t.race.truepath&&(t.civic.foreign.gov3.hstl<10?i=`
                ${F("space_rival_ally",[+(100*a.g).toFixed(1)])}
                `:t.civic.foreign.gov3.hstl>60&&(i=`
                ${F("space_rival_war",[+(100*a.g).toFixed(1)])}
                `)),`
                ${F("space_used_support",[F("space_moon_info_name")])}
                ${F("space_moon_helium_mine_effect",[r])}
                ${i}
                ${F("plus_max_resource",[e,F("resource_Helium_3_name")])}
                `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(t.resource.Helium_3.display=!0,At("helium_mine"),t.space.moon_base.support${F("space_moon_observatory_desc")}
                ${F("space_support",[F("space_moon_info_name")])}
                `,reqs:{science:9,luna:1},cost:{Money:e=>js("observatory",e,2e5,1.28),Knowledge:e=>js("observatory",e,69e3,1.28),Stone:e=>js("observatory",e,125e3,1.28),Iron:e=>js("observatory",e,65e3,1.28),Iridium:e=>js("observatory",e,1250,1.28)},effect(){let e="";t.race.cataclysm&&(e=`
                ${F("city_university_effect",[aa(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?`
                ${F("space_moon_observatory_cata_effect",[25])}
                `:`
                ${F("space_moon_observatory_effect",[5])}
                `;return`
                ${F("space_used_support",[F("space_moon_info_name")])}
                ${e}
                ${F("plus_max_resource",[a,F("resource_Knowledge_name")])}
                ${r}`},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("observatory"),t.space.moon_base.supportVt().red,desc:()=>F("space_red_info_desc",[Vt().red]),support:"spaceport",zone:"inner",syndicate:()=>!0},red_mission:{id:"space-red_mission",title:()=>F("space_mission_title",[Vt().red]),desc:()=>F("space_mission_desc",[Vt().red]),reqs:{space:3,space_explore:3},grant:["space",4],queue_complete:()=>t.tech.space>=4?0:1,cost:{Helium_3:(e,t)=>+Ht(4500,!1,t).toFixed(0)},effect:()=>F("space_red_mission_effect",[Vt().red]),action(){return!!ii($(this)[0])&&(ms(F("space_red_mission_action",[Vt().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:F("space_red_spaceport_title"),desc:()=>`
                ${F("space_red_spaceport_desc")}
                ${F("requires_power_space",[t.resource.Food.name])}
                `,reqs:{space:4},cost:{Money:e=>js("spaceport",e,47500,1.32),Iridium:e=>js("spaceport",e,1750,1.32),Mythril:e=>js("spaceport",e,25,1.32),Titanium:e=>js("spaceport",e,22500,1.32)},effect(e){let a=+Ht($(this)[0].support_fuel().a,!0,e).toFixed(2),r="";return(t.race.cataclysm||t.race.orbit_decayed)&&(r=`
                ${F("plus_max_resource",[`$${wr(4*wi())}`,F("resource_Money_name")])}
                `),`
                ${F("space_red_spaceport_effect1",[Vt().red,$(this)[0].support()])}
                ${r}
                ${F("space_red_spaceport_effect2",[a,$(this)[0].powered()])}
                ${F("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:()=>Is(5),powerBalancer:()=>[{s:t.space.spaceport.s_max-t.space.spaceport.support}],refresh:!0,action(){return!!ii($(this)[0])&&(At("spaceport"),ei($(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,ms(F("evo_challenge_orbit_decayed_accelerated",[t.race.orbit_decay-t.stats.days]),"info",!1,["progress"])),!0)}},red_tower:{id:"space-red_tower",title:F("space_red_tower_title"),desc:()=>`
                ${F("space_red_tower_desc")}
                ${F("requires_power")}
                `,reqs:{mars:3},cost:{Money:e=>js("red_tower",e,225e3,1.28),Iron:e=>js("red_tower",e,22e3,1.28),Cement:e=>js("red_tower",e,15e3,1.28),Alloy:e=>js("red_tower",e,8e3,1.28)},effect(){return`
                ${F("space_red_spaceport_effect1",[Vt().red,t.race.cataclysm?2:1])}
                ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(2),powerBalancer:()=>[{s:t.space.spaceport.s_max-t.space.spaceport.support}],support:()=>t.race.cataclysm?2:1,action(){return!!ii($(this)[0])&&(At("red_tower"),ei($(this)[0]),!0)}},captive_housing:zr("captive_housing","space"),terraformer:{id:"space-terraformer",title:F("space_terraformer"),desc:e=>!t.space.hasOwnProperty("terraformer")||t.space.terraformer.count<100||e?`
                ${F("space_terraformer")}
                ${F("requires_segmemts",[100])}
                `+(t.space.hasOwnProperty("terraformer")&&t.space.terraformer.count>=100?`
                ${F("requires_power")}
                `:""):`
                ${F("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`
                ${F("space_terraformer_effect")}
                ${F("space_dwarf_collider_effect2",[e])}
                `}return xt.spc_red.atmo_terraformer.effect(e)},action(){return!!(ii($(this)[0])&&t.space.terraformer.count<100)&&(At("terraformer","space"),t.space.terraformer.count>=100&&(t.tech.terraforming=2,t.space.atmo_terraformer={count:1,on:0},Et(),ds()),!0)}},atmo_terraformer:{id:"space-atmo_terraformer",title:F("space_terraformer"),desc:()=>`
                ${F("space_terraformer")}
                ${F("requires_power")}
                `,wiki:!1,reqs:{terraforming:2},condition:()=>t.space.terraformer.count>=100,queue_complete:()=>0,cost:{},powered:e=>Is((e?e.truepath:t.race.truepath)?500:5e3),postPower(e){e?setTimeout((function(){t.tech.terraforming=s.atmo_terraformer?3:2,Et()}),250):(t.tech.terraforming=2,Et())},effect(e){let t=jt(),a=$(this)[0].powered(e),r=a>0?`
                ${F("minus_power",[a])}
                `:"";return`
                ${F("space_terraformer_effect2")}
                ${t}${r}`},action:()=>!1},terraform:{id:"space-terraform",title:F("space_terraform"),desc:F("space_terraform"),reqs:{terraforming:3},queue_complete:()=>0,no_multi:!0,cost:{},effect(){let e=jt();return`
                ${F("space_terraform_effect")}
                ${e}`},action(){return!!ii($(this)[0])&&(Zt(),!0)}},assembly:zr("assembly","space"),living_quarters:{id:"space-living_quarters",title:F("space_red_living_quarters_title"),desc:()=>`
                ${F("space_red_living_quarters_desc")}
                ${F("space_support",[Vt().red])}
                `,reqs:{mars:1},cost:{Money:e=>js("living_quarters",e,Gt(38e3),1.28),Steel:e=>js("living_quarters",e,Gt(15e3),1.28),Polymer:e=>js("living_quarters",e,Gt(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=`
                ${F("plus_max_resource",[`$${wr(t.tech.home_safe>=2?t.tech.home_safe>=3?"100000":"50000":"25000")}`,F("resource_Money_name")])}
                `),`
                ${F("space_used_support",[Vt().red])}
                ${a}
                ${F("plus_max_resource",[aa(1),t.race.truepath?F("job_colonist_tp",[Vt().red]):F("colonist")])}
                ${F("plus_max_resource",[e,F("citizen")])}
                `},support:()=>-1,powered:()=>Is(1),action(){if(ii($(this)[0])){if(At("living_quarters"),t.civic.colonist.display=!0,t.space.spaceport.support0)){let e=t.civic[t.civic.d_job].workers-aa(1)<0?t.civic[t.civic.d_job].workers:aa(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 n.biodome&&(e+=(t.tech.mars>=6?.1:.05)*n.biodome),+aa(e).toFixed(2)}},pylon:{id:"space-pylon",title:F("space_red_pylon"),desc:F("space_red_pylon"),reqs:{magic:2},condition:()=>!(!t.race.cataclysm&&!t.race.orbit_decayed),cost:{Money:e=>js("pylon",e,10,1.48),Stone:e=>js("pylon",e,12,1.42),Crystal:e=>js("pylon",e,8,1.42)-3},effect(){let e=wr(2);return`
                ${F("gain",[+(.005*Ts("magic")).toFixed(3),t.resource.Mana.name])}
                ${F("plus_max_resource",[e,t.resource.Mana.name])}
                `},special:()=>!!(t.tech.magic&&t.tech.magic>=3),action(){return!!ii($(this)[0])&&(t.space.pylon.count++,t.resource.Mana.max+=wr(2),!0)}},vr_center:{id:"space-vr_center",title:F("space_red_vr_center_title"),desc:()=>`
                ${F("space_red_vr_center_desc")}
                ${F("space_support",[Vt().red])}
                `,reqs:{mars:1,broadcast:3},cost:{Money:e=>js("vr_center",e,38e4,1.25),Copper:e=>js("vr_center",e,55e3,1.25),Stanene:e=>js("vr_center",e,1e5,1.25),Soul_Gem:e=>js("vr_center",e,1,1.25)},effect(){let e=D("gaslighter",1),a=e?e+1:1;return t.race.orbit_decayed&&(a+=2),`
                ${F("space_used_support",[Vt().red])}
                ${F("space_red_vr_center_effect1",[a])}
                ${F("space_red_vr_center_effect2",[2])}
                `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("vr_center"),t.space.spaceport.support`
                ${F("space_red_garage_desc")}
                `,reqs:{mars:1},cost:{Money:e=>js("garage",e,75e3,1.28),Iron:e=>js("garage",e,12e3,1.28),Brick:e=>js("garage",e,3e3,1.28),Sheet_Metal:e=>js("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 i=t.race.cataclysm||t.race.orbit_decayed?`${F("plus_max_resource",[r,F("resource_Crates_name")])}`:"",s='
                ';s+=`${F("plus_max_resource",[r,F("resource_Containers_name")])}${i}`;for(const r of $(this)[0].res())if(t.resource[r].display){let i=$(this)[0].heavy(r);s+=`${F("plus_max_resource",[q(+(wr($(this)[0].val(r))*(i?a:e)).toFixed(0),1),t.resource[r].name])}`}return s+="
                ",s},action(){if(ii($(this)[0])){At("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 i=$(this)[0].heavy(r);t.resource[r].max+=wr($(this)[0].val(r))*(i?a:e)}return!0}return!1}},red_mine:{id:"space-red_mine",title:F("space_red_mine_title"),desc:()=>`
                ${F("space_red_mine_desc")}
                ${F("space_support",[Vt().red])}
                `,reqs:{mars:1},cost:{Money:e=>js("red_mine",e,5e4,1.32),Lumber:e=>js("red_mine",e,65e3,1.32),Iron:e=>js("red_mine",e,33e3,1.32)},effect(){let e=xe("red_mine","copper"),a=xe("red_mine","titanium"),r=+e.b.toFixed(3),i=+a.b.toFixed(3),s="";t.race.truepath&&(t.civic.foreign.gov3.hstl<10?s=`
                ${F("space_rival_ally",[+(100*e.g).toFixed(1)])}
                `:t.civic.foreign.gov3.hstl>60&&(s=`
                ${F("space_rival_war",[+(100*e.g).toFixed(1)])}
                `));let n=t.race.orbit_decayed?`
                ${F("city_mine_effect1",[aa(1)])}
                ${F("city_coal_mine_effect1",[aa(1)])}
                `:"",c=t.race.cataclysm||t.race.orbit_decayed&&!t.race.sappy?`
                ${F("space_red_mine_effect",[+xe("red_mine","stone").toFixed(2),t.resource.Stone.name])}
                `:"",o=t.race.cataclysm||t.race.orbit_decayed&&t.race.smoldering?`
                ${F("space_red_mine_effect",[+xe("red_mine","asbestos").toFixed(2),t.resource.Chrysotile.name])}
                `:"",l=t.race.cataclysm||t.race.orbit_decayed?`
                ${F("space_red_mine_effect",[+xe("red_mine","aluminium").toFixed(2),t.resource.Aluminium.name])}
                `:"";return`
                ${F("space_used_support",[Vt().red])}
                ${n}
                ${F("space_red_mine_effect",[r,t.resource.Copper.name])}
                ${F("space_red_mine_effect",[i,t.resource.Titanium.name])}
                ${s}${o}${c}${l}`},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("red_mine"),t.space.spaceport.support`
                ${F("space_red_fabrication_desc")}
                ${F("space_support",[Vt().red])}
                `,reqs:{mars:1},cost:{Money:e=>js("fabrication",e,9e4,1.32),Copper:e=>js("fabrication",e,25e3,1.32),Cement:e=>js("fabrication",e,12e3,1.32),Wrought_Iron:e=>js("fabrication",e,1200,1.32)},effect(){let e=t.race.cataclysm&&!t.race.flier?`
                ${F("city_cement_plant_effect1",[aa(1)])}
                `:"",a=t.race.cataclysm||t.race.orbit_decayed?5:2;return t.race.high_pop&&(a=$e(a)),`
                ${F("space_used_support",[Vt().red])}
                ${F("space_red_fabrication_effect1",[aa(1)])}
                ${e}
                ${F("space_red_fabrication_effect2",[a])}
                `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("fabrication"),t.space.spaceport.support`
                ${F("space_red_factory_desc")}
                ${F("requires_power_combo",[t.resource.Helium_3.name])}
                `,reqs:{mars:4},cost:{Money:e=>js("red_factory",e,75e3,1.32),Brick:e=>js("red_factory",e,1e4,1.32),Coal:e=>js("red_factory",e,7500,1.32),Mythril:e=>js("red_factory",e,50,1.32)},effect(e){let a=`
                ${F("space_red_factory_effect1")}
                `;return t.tech.foundry>=7&&(a+=`
                ${F("space_red_factory_effect2")}
                `),t.race.orbit_decayed&&!t.race.flier&&(a+=`
                ${F("city_cement_plant_effect1",[aa(1)])}
                `),a+=`
                ${F("space_red_factory_effect3",[+Ht(1,!0,e).toFixed(2),$(this)[0].powered()])}
                `,a},powered:()=>Is(3),special:!0,action(){return!!ii($(this)[0])&&(t.space.red_factory.count++,ei($(this)[0])&&t.city.factory.Alloy++,t.settings.showIndustry=!0,$i(),!0)}},nanite_factory:zr("nanite_factory","space"),biodome:{id:"space-biodome",title:()=>t.race.artifical?F("space_red_signal_tower_title"):t.race.soul_eater?F("space_red_asphodel_title"):F("space_red_biodome_title"),desc(){let e;return e=t.race.artifical?`
                ${F("space_red_signal_tower_title")}
                `:t.race.soul_eater?`
                ${F("space_red_asphodel_desc")}
                `:t.race.carnivore?`
                ${F("space_red_biodome_desc_carn")}
                `:`
                ${F("space_red_biodome_desc",[Vt().red])}
                `,`
                ${e}
                ${F("space_support",[Vt().red])}
                `},reqs:{mars:2},cost:{Money:e=>js("biodome",e,45e3,1.28),Lumber:e=>js("biodome",e,65e3,1.28),Brick:e=>js("biodome",e,1e3,1.28),Nanite:e=>t.race.deconstructor?js("biodome",e,75,1.28):0},effect(){let e=+xe("biodome","food").toFixed(2),a=t.race.cataclysm||t.race.orbit_decayed?`
                ${F("produce",[+xe("biodome","cat_food").toFixed(2),t.resource.Food.name])}
                `:"",r=!t.race.cataclysm&&!t.race.orbit_decayed||t.race.kindling_kindred?"":`
                ${F("space_red_mine_effect",[+xe("biodome","lumber").toFixed(2),t.resource.Lumber.name])}
                `,i=t.tech.mars>=6?.1:.05,s=t.race.artifical?F("city_transmitter_effect",[wr(500)]):F("plus_max_resource",[wr(100),F("resource_Food_name")]),n=t.race.artifical||t.race.orbit_decayed?`
                ${s}${F("space_used_support",[Vt().red])}
                ${a}
                ${F("space_red_biodome_effect",[e,t.resource.Food.name])}
                ${F("space_red_biodome_effect2",[+aa(i).toFixed(2)])}
                ${r}${n}`},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("biodome"),t.race.cataclysm||(Pn("colonist"),t.race.joyless&&(Pn("joyless"),delete t.race.joyless,Jr())),t.space.spaceport.supportt.race.artifical?F("space_red_signal_tower_flair"):t.race.soul_eater?F("space_red_asphodel_flair"):t.race.carnivore?F("space_red_biodome_flair_carn"):F("space_red_biodome_flair")},red_university:{id:"space-red_university",title:F("city_university"),desc:()=>F("city_university_desc",[Vt().red]),reqs:{mars:1},trait:["orbit_decayed"],cost:{Money:e=>js("university",e,900,1.5,"city")-500,Lumber:e=>js("university",e,500,1.36,"city")-200,Stone:e=>js("university",e,750,1.36,"city")-350,Crystal:e=>"magic"===t.race.universe?js("university",e,5,1.36,"city"):0},wiki:!1,effect:()=>Sr.city.university.effect(),action(){if(ii($(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:F("space_red_exotic_lab_title"),desc:()=>`
                ${F("space_red_exotic_lab_desc")}
                ${F("space_support",[Vt().red])}
                `,reqs:{mars:5},cost:{Money:e=>js("exotic_lab",e,75e4,1.28),Steel:e=>js("exotic_lab",e,1e5,1.28),Mythril:e=>js("exotic_lab",e,1e3,1.28),Elerium:e=>js("exotic_lab",e,20,1.28)-4},effect(){let e=500;t.tech.science>=13&&t.interstellar.laboratory&&c.laboratory&&(e+=25*c.laboratory),t.tech.ancient_study&&t.tech.ancient_study>=2&&(e+=15*t.space.ziggurat.count),t.tech.mass>=2&&s.mass_driver&&(e+=$e(s.mass_driver*t.civic.scientist.workers)),t.tech.science>=21&&(e*=1.45),t.race.high_pop&&(e=$e(e));let a=wr(10),r="",i="";return(t.race.cataclysm||t.race.orbit_decayed)&&(r=`
                ${F("city_wardenclyffe_effect1",[aa(1),t.civic.scientist.name])}
                `,e*=1+.25*n.observatory,t.tech.science>=15&&(i=`
                ${F("city_wardenclyffe_effect4",[2])}
                `)),`
                ${F("space_used_support",[Vt().red])}
                ${r}${i}
                ${F("space_red_exotic_lab_effect1",[+e.toFixed(0)])}
                ${F("plus_max_resource",[a,F("resource_Elerium_name")])}
                `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("exotic_lab"),t.space.spaceport.support`
                ${F("space_red_exotic_lab_flair1")}
                ${F("space_red_exotic_lab_flair2")}
                `},ziggurat:{id:"space-ziggurat",title:F("space_red_ziggurat_title"),desc:()=>`
                ${F("space_red_ziggurat_desc",["none"!==t.race.old_gods?Di[t.race.old_gods.toLowerCase()].entity:Di[t.race.species].entity])}
                `,reqs:{theology:4},cost:{Money:e=>js("ziggurat",e,6e5,1.28),Stone:e=>js("ziggurat",e,25e4,1.28),Aluminium:e=>js("ziggurat",e,7e4,1.28),Mythril:e=>js("ziggurat",e,250,1.28)},effect(){let e=t.tech.ancient_study?.6:.4;if(t.tech.ancient_deify&&t.tech.ancient_deify>=2&&n.exotic_lab&&(e+=.01*n.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=$e(a)),e+=a*t.civic.priest.workers}t.race.ooze&&(e*=1-Ki.ooze.vars()[1]/100),t.race.high_pop&&(e=$e(e)),e=+e.toFixed(2);let a=t.race.truepath?[e,Di[t.race.species].home]:[e],r=`
                ${F(t.race.truepath?"space_red_ziggurat_effect_tp":"space_red_ziggurat_effect",a)}
                `;return t.tech.ancient_study&&t.tech.ancient_study>=2&&(r+=`
                ${F("interstellar_laboratory_effect",[3])}
                `),(t.race.cataclysm||t.race.orbit_decayed)&&(r+=Kr()),t.genes.ancients&&t.genes.ancients>=4&&(r+=`
                ${F("city_temple_effect6",[aa(1)])}
                `),r},action(){return!!ii($(this)[0])&&(At("ziggurat"),t.genes.ancients&&t.genes.ancients>=4&&(t.civic.priest.display=!0),t.race.cataclysm&&Pn("iron_will",!1,1),!0)}},space_barracks:{id:"space-space_barracks",title:F("space_red_space_barracks_title"),desc:()=>`
                ${F("space_red_space_barracks_desc")}
                ${F("space_red_space_barracks_desc_req")}
                `,reqs:{marines:1},cost:{Money:e=>js("space_barracks",e,35e4,1.28),Alloy:e=>js("space_barracks",e,65e3,1.28),Iridium:e=>js("space_barracks",e,22500,1.28),Wrought_Iron:e=>js("space_barracks",e,12500,1.28),Horseshoe:()=>t.race.hooved?2:0},effect(e){let a=t.race.orbit_decayed?Sr.city.boot_camp.effect():"",r=+Ht(2,!0,e).toFixed(2),i=t.tech.marines>=2?aa(4):aa(2),s=t.race.cataclysm?"":`
                ${F("space_red_space_barracks_effect3",[t.resource.Food.name])}
                `;return`
                ${F("plus_max_soldiers",[i])}
                ${a}
                ${F("space_red_space_barracks_effect2",[r])}
                ${s}`},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("space_barracks"),t.space.space_barracks.on++,!0)},flair:()=>F("space_red_space_barracks_flair")},bonfire:zr("bonfire","space"),horseshoe:zr("horseshoe","space")},spc_hell:{info:{name:()=>Vt().hell,desc:()=>F("space_hell_info_desc",[Vt().hell]),zone:"inner",syndicate:()=>!1},hell_mission:{id:"space-hell_mission",title:()=>F("space_mission_title",[Vt().hell]),desc:()=>F("space_mission_desc",[Vt().hell]),reqs:{space:3,space_explore:3},grant:["hell",1],queue_complete:()=>t.tech.hell>=1?0:1,cost:{Helium_3:(e,t)=>+Ht(6500,!1,t).toFixed(0)},effect:()=>F("space_hell_mission_effect1",[Vt().hell]),action(){return!!ii($(this)[0])&&(ms(F("space_hell_mission_action",[Vt().hell]),"info",!1,["progress"]),t.space.geothermal={count:0,on:0},!0)}},geothermal:{id:"space-geothermal",title:F("space_hell_geothermal_title"),desc:()=>`
                ${F("space_hell_geothermal_desc")}
                ${F("space_hell_geothermal_desc_req")}
                `,reqs:{hell:1},cost:{Money:e=>js("geothermal",e,38e3,1.35),Steel:e=>js("geothermal",e,15e3,1.35),Polymer:e=>js("geothermal",e,9500,1.35)},effect(e){let a=+Ht($(this)[0].p_fuel().a,!0,e).toFixed(2);return`${t.race.cataclysm||t.race.orbit_decayed?`
                ${F("interstellar_stellar_forge_effect3",[1])}
                `:""}${F("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}, ${F("space_belt_station_effect3",[a])}`},special:()=>!(!t.race.cataclysm&&!t.race.orbit_decayed),powered(){let e=-8;return t.race.forge&&(e-=Ki.forge.vars()[0]),t.stats.achieve.failed_history&&t.stats.achieve.failed_history.l>=5&&(e-=2),As(e)},p_fuel:()=>({r:"Helium_3",a:.5}),action(){return!!ii($(this)[0])&&(At("geothermal"),t.space.geothermal.on++,!0)}},hell_smelter:{id:"space-hell_smelter",title:()=>F("space_hell_smelter_title",[Vt().hell]),desc:()=>F("space_hell_smelter_title",[Vt().hell]),reqs:{hell:1,m_smelting:1},path:["truepath"],cost:{Money:e=>js("hell_smelter",e,25e4,1.24),Adamantite:e=>js("hell_smelter",e,15e3,1.24)},effect:()=>`
                ${F("interstellar_stellar_forge_effect3",[2])}
                `,special:!0,action(){return!!ii($(this)[0])&&(At("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:F("city_casino"),desc:F("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=>js("spc_casino",e,4e5,1.35),Furs:e=>js("spc_casino",e,75e3,1.35),Cement:e=>js("spc_casino",e,1e5,1.35),Plywood:e=>js("spc_casino",e,2e4,1.35)},effect(){let e=Dr();return e+=`
                ${F("minus_power",[$(this)[0].powered()])}
                `,e},powered:()=>Is(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=2?2:3),action(){return!!ii($(this)[0])&&(t.space.spc_casino.count++,t.race.joyless||(t.civic.entertainer.max+=aa(1),t.civic.entertainer.display=!0),ei($(this)[0]),!0)},flair:F("city_casino_flair")},swarm_plant:{id:"space-swarm_plant",title:F("space_hell_swarm_plant_title"),desc:()=>`
                ${F("space_hell_swarm_plant_desc")}
                `,reqs:{solar:4,hell:1},cost:{Money:e=>js("swarm_plant",e,Nt(75e3),1.28),Iron:e=>js("swarm_plant",e,Nt(65e3),1.28),Neutronium:e=>js("swarm_plant",e,Nt(75),1.28),Brick:e=>js("swarm_plant",e,Nt(2500),1.28),Mythril:e=>js("swarm_plant",e,Nt(100),1.28)},effect(){let e=t.tech.swarm?.88:.94;return t.tech.swarm>=3&&(e-=_/100),e<.05&&(e=.05),e=+(100*(1-e)).toFixed(2),F("space_hell_swarm_plant_effect1",[e])},action(){return!!ii($(this)[0])&&(At("swarm_plant"),!0)}},firework:zr("firework","space")},spc_sun:{info:{name:()=>F("space_sun_info_name"),desc:()=>F("space_sun_info_desc",[Di[t.race.species].home]),support:"swarm_control",zone:"inner",syndicate:()=>!1},sun_mission:{id:"space-sun_mission",title:()=>F("space_sun_mission_title"),desc:()=>F("space_sun_mission_desc"),reqs:{space_explore:4},grant:["solar",1],queue_complete:()=>t.tech.solar>=1?0:1,cost:{Helium_3:(e,t)=>+Ht(15e3,!1,t).toFixed(0)},effect:()=>F("space_sun_mission_effect1"),action(){return!!ii($(this)[0])}},swarm_control:{id:"space-swarm_control",title:F("space_sun_swarm_control_title"),desc:()=>`
                ${F("space_sun_swarm_control_desc")}
                `,reqs:{solar:3},cost:{Money:e=>js("swarm_control",e,1e5,1.3),Knowledge:e=>js("swarm_control",e,6e4,1.3),Alloy:e=>js("swarm_control",e,7500,1.3),Helium_3:(e,t)=>js("swarm_control",e,Ht(2e3,!1,t),1.3),Mythril:e=>js("swarm_control",e,250,1.3)},effect(){return F("space_sun_swarm_control_effect1",[$(this)[0].support()])},support:()=>t.tech.swarm&&t.tech.swarm>=2?t.tech.high_tech>=11?11+Math.round(_):12:10,action(){return!!ii($(this)[0])&&(At("swarm_control"),t.space.swarm_control.s_max+=$(this)[0].support(),!0)}},swarm_satellite:{id:"space-swarm_satellite",title:F("space_sun_swarm_satellite_title"),desc:()=>`
                ${F("space_sun_swarm_satellite_desc")}
                ${F("space_sun_swarm_satellite_desc_req")}
                `,reqs:{solar:3},cost:{Money:e=>js("swarm_satellite",e,Rt(5e3),1.1),Copper:e=>js("swarm_satellite",e,Rt(2500),1.1),Iridium:e=>js("swarm_satellite",e,Rt(150),1.1),Helium_3:(e,t)=>js("swarm_satellite",e,Rt(Ht(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),`${F("space_dwarf_reactor_effect1",[As(e)])}, ${F("space_sun_swarm_satellite_effect1",[1])}`},support:()=>-1,action(){return!!ii($(this)[0])&&(At("swarm_satellite"),t.space.swarm_control.support++,!0)}},jump_gate:{id:"space-jump_gate",title:F("tau_jump_gate"),desc:e=>!t.space.hasOwnProperty("jump_gate")||t.space.jump_gate.count<100||e?`
                ${F("tau_jump_gate")}
                ${F("requires_segmemts",[100])}
                `:`
                ${F("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`
                ${F("tau_jump_gate_effect")}
                ${F("space_dwarf_collider_effect2",[e])}
                `}return F("tau_jump_gate_effect")},action(){return!!(ii($(this)[0])&&t.space.jump_gate.count<100)&&(t.space.jump_gate.count++,!0)}}},spc_gas:{info:{name:()=>Vt().gas,desc:()=>F("space_gas_info_desc",[Vt().gas,Di[t.race.species].home]),zone:"outer",syndicate:()=>!0},gas_mission:{id:"space-gas_mission",title:()=>F("space_mission_title",[Vt().gas]),desc:()=>F("space_mission_desc",[Vt().gas]),reqs:{space:4,space_explore:4},grant:["space",5],queue_complete:()=>t.tech.space>=5?0:1,cost:{Helium_3:(e,t)=>+Ht(12500,!1,t).toFixed(0)},effect:()=>F("space_gas_mission_effect",[Vt().gas]),action(){return!!ii($(this)[0])&&(ms(F("space_gas_mission_action",[Vt().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:F("space_gas_mining_title"),desc:()=>`
                ${F("space_gas_mining_desc")}
                ${F("requires_power")}
                `,reqs:{gas_giant:1},cost:{Money:e=>js("gas_mining",e,25e4,1.32),Uranium:e=>js("gas_mining",e,500,1.32),Alloy:e=>js("gas_mining",e,1e4,1.32),Helium_3:(e,t)=>js("gas_mining",e,Ht(2500,!1,t),1.32),Mythril:e=>js("gas_mining",e,25,1.32)},effect(){return`
                ${F("space_gas_mining_effect1",[+xe("gas_mining").toFixed(2)])}
                ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(2),action(){return!!ii($(this)[0])&&(At("gas_mining"),ei($(this)[0]),!0)}},gas_storage:{id:"space-gas_storage",title:()=>F("space_gas_storage_title",[Vt().gas]),desc:()=>`
                ${F("space_gas_storage_desc")}
                `,reqs:{gas_giant:1},cost:{Money:e=>js("gas_storage",e,125e3,1.32),Iridium:e=>js("gas_storage",e,3e3,1.32),Sheet_Metal:e=>js("gas_storage",e,2e3,1.32),Helium_3:(e,t)=>js("gas_storage",e,Ht(1e3,!1,t),1.32)},effect(){let e=wr(3500)*(t.tech.world_control?1.5:1),a=wr(2500)*(t.tech.world_control?1.5:1),r=wr(1e3)*(t.tech.world_control?1.5:1);return`
                ${F("plus_max_resource",[e,F("resource_Oil_name")])}
                ${F("plus_max_resource",[a,F("resource_Helium_3_name")])}
                ${F("plus_max_resource",[r,F("resource_Uranium_name")])}
                `},action(){return!!ii($(this)[0])&&(At("gas_storage"),!0)}},star_dock:{id:"space-star_dock",title:()=>F("space_gas_star_dock_title"),desc:()=>`
                ${F("space_gas_star_dock_title")}
                ${F("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(Ht(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:()=>`
                ${F("space_gas_star_dock_effect1")}
                `,special:!0,action(){return!(0!==t.space.star_dock.count||!ii($(this)[0])||(At("star_dock"),0))}}},spc_gas_moon:{info:{name:()=>Vt().gas_moon,desc:()=>F("space_gas_moon_info_desc",[Vt().gas_moon,Vt().gas]),zone:"outer",syndicate:()=>!0},gas_moon_mission:{id:"space-gas_moon_mission",title:()=>F("space_mission_title",[Vt().gas_moon]),desc:()=>F("space_mission_desc",[Vt().gas_moon]),reqs:{space:5},grant:["space",6],queue_complete:()=>t.tech.space>=6?0:1,cost:{Helium_3:(e,t)=>+Ht(3e4,!1,t).toFixed(0)},effect:()=>F("space_gas_moon_mission_effect",[Vt().gas_moon]),action(){return!!ii($(this)[0])&&(ms(F("space_gas_moon_mission_action",[Vt().gas_moon]),"info",!1,["progress"]),t.space.outpost={count:0,on:0},t.tech.gas_moon=1,!0)}},outpost:{id:"space-outpost",title:F("space_gas_moon_outpost_title"),desc:()=>`
                ${F("space_gas_moon_outpost_desc")}
                ${F("requires_power_combo",[t.resource.Oil.name])}
                `,reqs:{gas_moon:1},cost:{Money:e=>js("outpost",e,666e3,1.3),Titanium:e=>js("outpost",e,18e3,1.3),Iridium:e=>js("outpost",e,2500,1.3),Helium_3:(e,t)=>js("outpost",e,Ht(6e3,!1,t),1.3),Mythril:e=>js("outpost",e,300,1.3)},effect(e){let t=+xe("outpost").toFixed(3),a=wr(500),r=+Ht(2,!0,e).toFixed(2);return`
                ${F("space_gas_moon_outpost_effect1",[t])}
                ${F("plus_max_resource",[a,F("resource_Neutronium_name")])}
                ${F("space_gas_moon_outpost_effect3",[r,$(this)[0].powered()])}
                `},powered:()=>Is(3),powerBalancer:()=>[{r:"Neutronium",k:"lpmod"}],action(){return!!ii($(this)[0])&&(At("outpost"),t.resource.Neutronium.display=!0,ei($(this)[0]),!0)}},drone:{id:"space-drone",title:F("space_gas_moon_drone_title"),desc:()=>`
                ${F("space_gas_moon_drone_desc")}
                `,reqs:{gas_moon:1,drone:1},cost:{Money:e=>js("drone",e,25e4,1.3),Steel:e=>js("drone",e,2e4,1.3),Neutronium:e=>js("drone",e,500,1.3),Elerium:e=>js("drone",e,25,1.3),Nano_Tube:e=>js("drone",e,45e3,1.3)},effect:()=>`
                ${F("space_gas_moon_drone_effect1",[t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=3?12:6])}
                `,action(){return!!ii($(this)[0])&&(At("drone"),!0)}},oil_extractor:{id:"space-oil_extractor",title:F("space_gas_moon_oil_extractor_title"),desc:()=>`
                ${F("space_gas_moon_oil_extractor_title")}
                ${F("requires_power")}
                `,reqs:{gas_moon:2},cost:{Money:e=>js("oil_extractor",e,666e3,1.3),Polymer:e=>js("oil_extractor",e,7500,1.3),Helium_3:(e,t)=>js("oil_extractor",e,Ht(2500,!1,t),1.3),Wrought_Iron:e=>js("oil_extractor",e,5e3,1.3)},effect(){return`${F("space_gas_moon_oil_extractor_effect1",[+xe("oil_extractor").toFixed(2)])}, ${F("minus_power",[$(this)[0].powered()])}`},powered:()=>Is(1),powerBalancer:()=>[{r:"Oil",k:"lpmod"}],action(){return!!ii($(this)[0])&&(At("oil_extractor"),ei($(this)[0]),!0)}}},spc_belt:{info:{name:()=>F("space_belt_info_name"),desc:()=>t.space.space_station&&t.space.space_station.count>0?`
                ${F("space_belt_info_desc",[Vt().red,Vt().gas])}
                ${F("space_belt_info_desc2")}
                `:F("space_belt_info_desc",[Vt().red,Vt().gas]),support:"space_station",zone:"inner",syndicate:()=>!0},belt_mission:{id:"space-belt_mission",title:()=>F("space_belt_mission_title"),desc:()=>F("space_belt_mission_desc"),reqs:{space:5},grant:["asteroid",1],queue_complete:()=>t.tech.asteroid>=1?0:1,cost:{Helium_3:(e,t)=>+Ht(25e3,!1,t).toFixed(0)},effect:()=>F("space_belt_mission_effect1"),action(){return!!ii($(this)[0])&&(ms(F("space_belt_mission_action"),"info",!1,["progress"]),t.settings.space.dwarf=!0,!0)}},space_station:{id:"space-space_station",title:F("space_belt_station_title"),desc:()=>`
                ${F("space_belt_station_desc")}
                ${F("requires_power_space",[t.resource.Food.name])}
                `,reqs:{asteroid:2},cost:{Money:e=>js("space_station",e,25e4,1.3),Iron:e=>js("space_station",e,85e3,1.3),Polymer:e=>js("space_station",e,18e3,1.3),Iridium:e=>js("space_station",e,2800,1.28),Helium_3:(e,t)=>js("space_station",e,Ht(2e3,!1,t),1.3),Mythril:e=>js("space_station",e,75,1.25)},effect(e){let a=+Ht(2.5,!0,e).toFixed(2),r=t.race.cataclysm?1:10,i=wr(5),s=t.tech.asteroid>=5?`
                ${F("plus_max_resource",[i,F("resource_Elerium_name")])}
                `:"";return`
                ${F("plus_max_space_miners",[aa(3)])}
                ${s}
                ${F("space_belt_station_effect3",[a])}
                ${F("space_belt_station_effect4",[r,$(this)[0].powered(),t.resource.Food.name])}
                `},support:()=>aa(3),powered:()=>Is(3),refresh:!0,action(){if(ii($(this)[0])){if(At("space_station"),t.civic.space_miner.display=!0,t.tech.asteroid<3&&(t.tech.asteroid=3),ei($(this)[0])&&t.civic[t.civic.d_job].workers>0){let e=aa(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,ms(F("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:F("space_belt_elerium_ship_title"),desc:()=>F("space_belt_elerium_ship_title"),reqs:{asteroid:5},cost:{Money:e=>js("elerium_ship",e,5e5,1.3),Uranium:e=>js("elerium_ship",e,2500,1.3),Titanium:e=>js("elerium_ship",e,1e4,1.3),Mythril:e=>js("elerium_ship",e,500,1.3),Helium_3:(e,t)=>js("elerium_ship",e,Ht(5e3,!1,t),1.3)},effect(){let e=+xe("elerium_ship").toFixed(4);return`
                ${F("space_belt_elerium_ship_effect1",[aa(2)])}
                ${F("space_belt_elerium_ship_effect2",[e])}
                `},support:()=>aa(-2),powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("elerium_ship"),t.space.space_station.support+1F("space_belt_iridium_ship_title"),reqs:{asteroid:3},cost:{Money:e=>js("iridium_ship",e,12e4,1.3),Uranium:e=>js("iridium_ship",e,1e3,1.3),Alloy:e=>js("iridium_ship",e,48e3,1.3),Iridium:e=>js("iridium_ship",e,2800,1.3),Helium_3:(e,t)=>js("iridium_ship",e,Ht(1800,!1,t),1.3)},effect(){let e=+xe("iridium_ship").toFixed(3);return`
                ${F("space_belt_iridium_ship_effect1",[aa(1)])}
                ${F("space_belt_iridium_ship_effect2",[e])}
                `},support:()=>aa(-1),powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("iridium_ship"),t.space.space_station.supportF("space_belt_iron_ship_title"),reqs:{asteroid:3},cost:{Money:e=>js("iron_ship",e,8e4,1.3),Steel:e=>js("iron_ship",e,42e3,1.3),Aluminium:e=>js("iron_ship",e,38e3,1.3),Polymer:e=>js("iron_ship",e,16e3,1.3),Helium_3:(e,t)=>js("iron_ship",e,Ht(1200,!1,t),1.3)},effect(){let e=+xe("iron_ship").toFixed(2);return t.tech.solar&&t.tech.solar>=5?`
                ${F("space_belt_iron_ship_effect1",[aa(1)])}
                ${F("space_belt_iron_ship_effect2",[e])}
                ${F("space_belt_iron_ship_effect3")}
                `:`
                ${F("space_belt_iron_ship_effect1",[aa(1)])}
                ${F("space_belt_iron_ship_effect2",[e])}
                `},support:()=>aa(-1),powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("iron_ship"),t.space.space_station.supportVt().dwarf,desc:()=>F("space_dwarf_info_desc",[Vt().dwarf]),zone:"inner",syndicate:()=>!1},dwarf_mission:{id:"space-dwarf_mission",title:()=>F("space_mission_title",[Vt().dwarf]),desc:()=>F("space_mission_desc",[Vt().dwarf]),reqs:{asteroid:1,elerium:1},grant:["dwarf",1],queue_complete:()=>t.tech.dwarf>=1?0:1,cost:{Helium_3:(e,t)=>+Ht(45e3,!1,t).toFixed(0)},effect:()=>F("space_dwarf_mission_effect1",[Vt().dwarf]),action(){return!!ii($(this)[0])&&(ms(F("space_dwarf_mission_action",[Vt().dwarf]),"info",!1,["progress"]),t.space.elerium_contain={count:0,on:0},!0)}},elerium_contain:{id:"space-elerium_contain",title:F("space_dwarf_elerium_contain_title"),desc:()=>`
                ${F("space_dwarf_elerium_contain_title")}
                ${F("requires_power")}
                `,reqs:{dwarf:1},cost:{Money:e=>js("elerium_contain",e,8e5,1.28),Cement:e=>js("elerium_contain",e,12e4,1.28),Iridium:e=>js("elerium_contain",e,5e4,1.28),Neutronium:e=>js("elerium_contain",e,250,1.28)},effect(){return`
                ${F("plus_max_resource",[wr(100),F("resource_Elerium_name")])}
                ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(6),action(){return!!ii($(this)[0])&&(At("elerium_contain"),ei($(this)[0]),!0)}},e_reactor:{id:"space-e_reactor",title:F("space_dwarf_reactor_title"),desc:()=>`
                ${F("space_dwarf_reactor_title")}
                ${F("space_dwarf_reactor_desc_req")}
                `,reqs:{elerium:2},cost:{Money:e=>js("e_reactor",e,125e4,1.28),Steel:e=>js("e_reactor",e,35e4,1.28),Neutronium:e=>js("e_reactor",e,1250,1.28),Mythril:e=>js("e_reactor",e,2500,1.28)},effect(){let e=$(this)[0].p_fuel().a;return`
                ${F("space_dwarf_reactor_effect1",[-1*$(this)[0].powered()])}
                ${F("space_dwarf_reactor_effect2",[e])}
                `},powered:()=>As(-25),p_fuel:()=>({r:"Elerium",a:.05}),action(){return!!ii($(this)[0])&&(At("e_reactor"),t.space.e_reactor.on++,!0)}},world_collider:{id:"space-world_collider",title:F("space_dwarf_collider_title"),desc(e){if(!t.space.hasOwnProperty("world_collider")||t.space.world_collider.count<1859||e)return`
                ${F("space_dwarf_collider_desc")}
                ${F("space_dwarf_collider_desc_req")}
                `+(t.space.hasOwnProperty("world_collider")&&t.space.world_collider.count>=1859?`
                ${F("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`
                ${F("space_dwarf_collider_effect1")}
                ${F("space_dwarf_collider_effect2",[e])}
                `}return xt.spc_dwarf.world_controller.effect()},action(){if(t.space.world_collider.count<1859&&ii($(this)[0])){if(At("world_collider"),t.space.world_collider.count>=1859){if(t.tech.science=11,t.space.world_controller={count:1,on:0},Jr(),Et(),t.race.banana){let e=qn();t.stats.banana.b2[e]=!0,"m"!==e&&"l"!==e&&(t.stats.banana.b2.l=!0)}ds()}return!0}return!1},flair:F("space_dwarf_collider_flair")},world_controller:{id:"space-world_controller",title:F("space_dwarf_collider_title"),desc:()=>`
                ${F("space_dwarf_collider_title")}
                ${F("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&&s.far_reach>0&&(e+=1*s.far_reach),t.tech.science>=19&&(e+=15),`
                ${F("plus_max_resource",[e+"%",F("resource_Knowledge_name")])}
                ${F("space_dwarf_controller_effect3")}
                ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(20),action:()=>!1,flair:F("space_dwarf_controller_flair")},shipyard:{id:"space-shipyard",title:F("outer_shipyard_title"),desc:()=>`
                ${F("outer_shipyard_title")}
                ${F("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`
                ${F("outer_shipyard_effect")}
                ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(50),special:!0,sAction(){s.shipyard&&(t.settings.civTabs=2,t.settings.govTabs=5,t.settings.tabLoad||($t("mTabCivic"),ds("space-shipyard")))},action(){return!!(t.space.shipyard.count<1&&ii($(this)[0]))&&(At("shipyard"),ei($(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:F("space_dwarf_mass_relay_title"),desc(e){if(!t.space.hasOwnProperty("mass_relay")||t.space.mass_relay.count<100||e)return`
                ${F("space_dwarf_mass_relay_title")}
                ${F("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`
                ${F("space_dwarf_mass_relay_effect")}
                ${F("space_dwarf_collider_effect2",[e])}
                `}return xt.spc_dwarf.m_relay.effect()},action(){return!!(t.space.mass_relay.count<100&&ii($(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},Jr(),Et(),ds()),!0)}},m_relay:{id:"space-m_relay",title:F("space_dwarf_mass_relay_title"),desc:()=>`
                ${F("space_dwarf_mass_relay_title")}
                ${F("requires_power")}
                `,reqs:{outer:6},path:["truepath"],condition:()=>t.space.mass_relay.count>=100,wiki:!1,queue_complete:()=>0,cost:{},powered:()=>Is(100),effect(){let e=Math.floor(t.space.m_relay.charged/10)/10;return`
                ${F("space_dwarf_mass_relay_effect2",[Vt().dwarf])}
                ${F("minus_power",[$(this)[0].powered()])}
                ${F("space_dwarf_mass_relay_charged",[e])}
                `},action:()=>!1}},spc_titan:Qe().spc_titan,spc_enceladus:Qe().spc_enceladus,spc_triton:Qe().spc_triton,spc_kuiper:Qe().spc_kuiper,spc_eris:Qe().spc_eris},qt={int_alpha:{info:{name:F("interstellar_alpha_name"),desc:()=>t.tech.alpha?F("interstellar_alpha_desc2",[Di[t.race.species].home]):F("interstellar_alpha_desc1",[Di[t.race.species].home]),support:"starport"},alpha_mission:{id:"interstellar-alpha_mission",title:F("space_mission_title",[F("interstellar_alpha_name")]),desc:F("space_mission_desc",[F("interstellar_alpha_name")]),reqs:{ftl:2},grant:["alpha",1],queue_complete:()=>t.tech.alpha>=1?0:1,cost:{Helium_3:()=>+Ut(4e4).toFixed(0)},effect:F("interstellar_alpha_mission_effect"),action(){return!!ii($(this)[0])&&(ms(F("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:F("interstellar_alpha_starport_title"),desc:()=>`
                ${F("interstellar_alpha_starport_desc")}
                ${F("requires_power_space",[t.resource.Food.name])}
                `,reqs:{alpha:1},cost:{Money:e=>js("starport",e,1e6,1.3,"interstellar"),Aluminium:e=>js("starport",e,4e5,1.3,"interstellar"),Neutronium:e=>js("starport",e,1e3,1.3,"interstellar"),Elerium:e=>js("starport",e,100,1.3,"interstellar")},effect(){let e=+Ut(5).toFixed(2);return`
                ${F("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
                ${F("interstellar_alpha_starport_effect2",[e,$(this)[0].powered()])}
                ${F("interstellar_alpha_starport_effect3",[100,t.resource.Food.name])}
                `},support:()=>5,powered:()=>Is(10),powerBalancer:()=>[{s:t.interstellar.starport.s_max-t.interstellar.starport.support}],refresh:!0,action(){return!!ii($(this)[0])&&(At("starport","interstellar"),t.settings.space.proxima=!0,t.settings.space.nebula=!0,ei($(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,ms(F("evo_challenge_orbit_decayed_accelerated",[t.race.orbit_decay-t.stats.days]),"info",!1,["progress"])),!0)}},habitat:{id:"interstellar-habitat",title:F("interstellar_habitat_title"),desc:`
                ${F("interstellar_habitat_desc")}
                ${F("requires_power")}
                `,reqs:{alpha:3},cost:{Money:e=>js("habitat",e,8e5,1.25,"interstellar"),Furs:e=>js("habitat",e,38e3,1.25,"interstellar"),Adamantite:e=>js("habitat",e,3200,1.25,"interstellar"),Plywood:e=>js("habitat",e,1e4,1.25,"interstellar"),Horseshoe:()=>t.race.hooved?1:0},effect(){let e=$(this)[0].citizens();return`
                ${F("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
                ${F("plus_max_citizens",[e])}, ${F("minus_power",[$(this)[0].powered()])}
                `},support:()=>1,powered:()=>Is(2),powerBalancer:()=>[{s:t.interstellar.starport.s_max-t.interstellar.starport.support}],action(){return!!ii($(this)[0])&&(At("habitat","interstellar"),ei($(this)[0])&&(t.resource[t.race.species].max+=$(this)[0].citizens()),!0)},citizens(){let e=1;return t.race.high_pop&&(e*=Ki.high_pop.vars()[0]),e}},mining_droid:{id:"interstellar-mining_droid",title:F("interstellar_mining_droid_title"),desc:`
                ${F("interstellar_mining_droid_title")}
                ${F("space_support",[F("interstellar_alpha_name")])}
                `,reqs:{alpha:2},cost:{Money:e=>js("mining_droid",e,65e4,1.28,"interstellar"),Steel:e=>js("mining_droid",e,12e4,1.28,"interstellar"),Nano_Tube:e=>js("mining_droid",e,75e3,1.28,"interstellar"),Elerium:e=>js("mining_droid",e,50,1.28,"interstellar")},effect:()=>`
                ${F("space_used_support",[F("interstellar_alpha_name")])}
                ${F("interstellar_mining_droid_effect")}
                `,support:()=>-1,powered:()=>Is(1),special:!0,refresh:!0,action(){return!!ii($(this)[0])&&(At("mining_droid","interstellar"),t.resource.Adamantite.display=!0,t.interstellar.starport.support${F("interstellar_processing_title")}
                ${F("space_support",[F("interstellar_alpha_name")])}
                `,reqs:{droids:1},cost:{Money:e=>js("processing",e,35e4,1.28,"interstellar"),Iron:e=>js("processing",e,18e4,1.28,"interstellar"),Aluminium:e=>js("processing",e,6e4,1.28,"interstellar"),Iridium:e=>js("processing",e,5e3,1.28,"interstellar")},effect(){let e=12;return t.tech.ai_core&&t.tech.ai_core>=2&&s.citadel>0&&(e+=2*s.citadel),`
                ${F("space_used_support",[F("interstellar_alpha_name")])}
                ${F("interstellar_processing_effect",[e])}
                `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("processing","interstellar"),t.interstellar.starport.support`
                ${F("interstellar_fusion_title")}
                ${F("requires_power_support_combo",[F("interstellar_alpha_name"),t.resource.Deuterium.name])}
                `,reqs:{fusion:1},cost:{Money:e=>js("fusion",e,99e4,1.28,"interstellar"),Iridium:e=>js("fusion",e,44e3,1.28,"interstellar"),Infernite:e=>js("fusion",e,350,1.28,"interstellar"),Brick:e=>js("fusion",e,18e3,1.28,"interstellar")},effect(){return`
                ${F("space_used_support",[F("interstellar_alpha_name")])}
                ${F("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}, ${F("interstellar_fusion_effect",[1.25])}
                `},support:()=>-1,powered:()=>As(-22),p_fuel:()=>({r:"Deuterium",a:1.25}),action(){return!!ii($(this)[0])&&(At("fusion","interstellar"),t.interstellar.starport.support"magic"===t.race.universe?F("tech_sanctum"):F("interstellar_laboratory_title"),desc:`
                ${F("magic"===t.race.universe?"tech_sanctum":"interstellar_laboratory_title")}
                ${F("space_support",[F("interstellar_alpha_name")])}
                `,reqs:{science:12},cost:{Money:e=>js("laboratory",e,75e4,1.28,"interstellar"),Crystal:e=>"magic"===t.race.universe?js("laboratory",e,1200,1.28,"interstellar"):0,Titanium:e=>js("laboratory",e,12e4,1.28,"interstellar"),Alloy:e=>js("laboratory",e,95e3,1.28,"interstellar"),Mythril:e=>js("laboratory",e,8500,1.28,"interstellar")},effect(){let e=1e4;t.tech.science>=15&&(e*=1+.02*(t.race.cataclysm||t.race.orbit_decayed?n.exotic_lab:t.city.wardenclyffe.count)),(t.race.cataclysm||t.race.orbit_decayed&&s.s_gate&&o.scavenger)&&(e*=1+o.scavenger*+(.75*St("gxy_alien2")).toFixed(1)),t.tech.science>=21&&(e*=1.45),e=Math.round(e);let a="";t.tech.science>=16&&(a=`
                ${F("city_wardenclyffe_effect1",[aa(1),t.civic.scientist.name])}
                `);let r=`
                ${F("space_used_support",[F("interstellar_alpha_name")])}
                ${a}
                ${F("city_max_knowledge",[e])}
                `;return t.tech.science>=13&&(r+=`
                ${F("interstellar_laboratory_effect",[5])}
                `),"magic"===t.race.universe&&(r+=`
                ${F("plus_max_resource",[wr(12),t.resource.Mana.name])}
                `),r},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("laboratory","interstellar"),t.interstellar.starport.support${F("interstellar_exchange_title")}
                ${F("space_support",[F("interstellar_alpha_name")])}
                `,reqs:{banking:12},cost:{Money:e=>js("exchange",e,68e4,1.28,"interstellar"),Stone:e=>js("exchange",e,115e3,1.28,"interstellar"),Adamantite:e=>js("exchange",e,55e3,1.28,"interstellar"),Graphene:e=>js("exchange",e,78e3,1.28,"interstellar")},effect(){let e=t.race.cataclysm||t.race.orbit_decayed?s.spaceport:t.city.bank?t.city.bank.count:0,a=t.race.cataclysm||t.race.orbit_decayed?4*wi():wi(),r=wr(t.city.bank?a*e/18:0);return t.race.inflation&&(r*=2),t.tech.banking>=13&&(t.galaxy.freighter&&(r*=1+.03*o.freighter),t.galaxy.super_freighter&&(r*=1+.08*o.super_freighter)),r=+r.toFixed(0),`
                ${F("space_used_support",[F("interstellar_alpha_name")])}
                ${F("plus_max_resource",[`$${r.toLocaleString()}`,F("resource_Money_name")])}
                `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("exchange","interstellar"),t.interstellar.starport.support${F("interstellar_g_factory_title")}
                ${F("space_support",[F("interstellar_alpha_name")])}
                `,reqs:{graphene:1},cost:{Money:e=>js("g_factory",e,95e4,1.28,"interstellar"),Copper:e=>js("g_factory",e,165e3,1.28,"interstellar"),Cement:e=>js("g_factory",e,22e4,1.28,"interstellar"),Infernite:e=>js("g_factory",e,750,1.28,"interstellar")},effect:()=>`
                ${F("space_used_support",[F("interstellar_alpha_name")])}
                ${F("interstellar_g_factory_effect")}
                `,support:()=>-1,powered:()=>Is(1),special:!0,action(){return!!ii($(this)[0])&&(At("g_factory","interstellar"),t.resource.Graphene.display=!0,t.interstellar.starport.support`
                ${F("interstellar_int_factory_title")}
                ${F("requires_power_combo",[t.resource.Deuterium.name])}
                `,reqs:{alpha:4},cost:{Money:e=>js("int_factory",e,25e6,1.26,"interstellar"),Coal:e=>js("int_factory",e,1e7,1.26,"interstellar"),Brick:e=>js("int_factory",e,75e4,1.26,"interstellar"),Bolognium:e=>js("int_factory",e,5e4,1.26,"interstellar")},effect(){let e=+Ut(5).toFixed(2);return`
                ${F("interstellar_int_factory_effect")}
                ${F("city_crafted_mats",[10])}
                ${F("interstellar_fusion_effect",[e])} ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(5),special:!0,action(){return!!ii($(this)[0])&&(At("int_factory","interstellar"),ei($(this)[0])&&(t.city.factory.Alloy+=2,$i()),!0)}},luxury_condo:{id:"interstellar-luxury_condo",title:F("tech_luxury_condo"),desc:`
                ${F("tech_luxury_condo")}
                ${F("requires_power")}
                `,reqs:{alpha:5},cost:{Money:e=>js("luxury_condo",e,25e6,1.25,"interstellar"),Neutronium:e=>js("luxury_condo",e,75e3,1.25,"interstellar"),Stanene:e=>js("luxury_condo",e,23e4,1.25,"interstellar"),Orichalcum:e=>js("luxury_condo",e,65e3,1.25,"interstellar"),Nanoweave:e=>js("luxury_condo",e,12500,1.25,"interstellar"),Horseshoe:()=>t.race.hooved?2:0},effect(){let e=$(this)[0].citizens(),t=wr(75e4);return`
                ${F("plus_max_citizens",[e])}, ${F("minus_power",[$(this)[0].powered()])}
                ${F("plus_max_resource",[`$${t.toLocaleString()}`,F("resource_Money_name")])}
                `},powered:()=>Is(3),action(){return!!ii($(this)[0])&&(At("luxury_condo","interstellar"),ei($(this)[0])&&(t.resource[t.race.species].max+=2),!0)},citizens(){let e=2;return t.race.high_pop&&(e*=Ki.high_pop.vars()[0]),e}},zoo:{id:"interstellar-zoo",title:F("tech_zoo"),desc:()=>`
                ${F("tech_zoo")}
                ${F("requires_power_support_combo",[F("interstellar_alpha_name"),t.resource.Food.name])}
                `,reqs:{zoo:1},cost:{Money:e=>js("zoo",e,5e7,1.24,"interstellar"),Polymer:e=>js("zoo",e,6e6,1.24,"interstellar"),Infernite:e=>js("zoo",e,75e3,1.24,"interstellar"),Brick:e=>js("zoo",e,2e6,1.24,"interstellar")},effect:()=>`
                ${F("space_used_support",[F("interstellar_alpha_name")])}
                ${F("space_red_vr_center_effect1",[5])}
                ${F("space_red_vr_center_effect2",[2])}
                ${F("interstellar_alpha_starport_effect3",[12e3,t.resource.Food.name])}
                `,powered:()=>Is(3),action(){return!!ii($(this)[0])&&(At("zoo","interstellar"),t.interstellar.starport.supportt.tech.storage<=2?F("city_shed_title1"):t.tech.storage>=4?F("city_shed_title3"):F("city_shed_title2"),desc(){let e=t.tech.storage>=3?t.tech.storage>=4?F("city_shed_desc_size3"):F("city_shed_desc_size2"):F("city_shed_desc_size1");return F("city_shed_desc",[e])},reqs:{alpha:2},cost:{Money:e=>js("warehouse",e,175e3,1.28,"interstellar"),Lumber:e=>js("warehouse",e,1e5,1.28,"interstellar"),Aluminium:e=>js("warehouse",e,12e4,1.28,"interstellar"),Cement:e=>js("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=Nr();for(const r of $(this)[0].res())t.resource[r].display&&(e+=`${F("plus_max_resource",[q(+(wr($(this)[0].val(r))*a).toFixed(0),1),t.resource[r].name])}`);return e+="
                ",e},action(){if(ii($(this)[0])){At("warehouse","interstellar");let e=Nr();for(const a of $(this)[0].res())t.resource[a].display&&(t.resource[a].max+=wr($(this)[0].val(a)*e));return!0}return!1}}},int_proxima:{info:{name:F("interstellar_proxima_name"),desc:()=>t.tech.proxima?F("interstellar_proxima_desc2"):F("interstellar_proxima_desc1")},proxima_mission:{id:"interstellar-proxima_mission",title:F("space_mission_title",[F("interstellar_proxima_name")]),desc:F("space_mission_desc",[F("interstellar_proxima_name")]),reqs:{alpha:1},grant:["proxima",1],queue_complete:()=>t.tech.proxima>=1?0:1,cost:{Helium_3:()=>+Ut(42e3).toFixed(0)},effect:F("interstellar_proxima_mission_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.xfer_station={count:0,on:0},ms(F("interstellar_proxima_mission_result"),"info",!1,["progress"]),!0)}},xfer_station:{id:"interstellar-xfer_station",title:F("interstellar_xfer_station_title"),desc:()=>`
                ${F("interstellar_xfer_station_desc")}
                ${F("requires_power_combo",[t.resource.Uranium.name])}
                `,reqs:{proxima:1},cost:{Money:e=>js("xfer_station",e,12e5,1.28,"interstellar"),Neutronium:e=>js("xfer_station",e,1500,1.28,"interstellar"),Adamantite:e=>js("xfer_station",e,6e3,1.28,"interstellar"),Polymer:e=>js("xfer_station",e,12e3,1.28,"interstellar"),Wrought_Iron:e=>js("xfer_station",e,3500,1.28,"interstellar")},effect(){let e=wr(5e3),a=wr(4e3),r=wr(2500),i="";return t.resource.Deuterium.display&&(i=`
                ${F("plus_max_resource",[wr(2e3),F("resource_Deuterium_name")])}
                `),`
                ${F("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
                ${F("plus_max_resource",[a,F("resource_Oil_name")])}
                ${F("plus_max_resource",[e,F("resource_Helium_3_name")])}
                ${F("plus_max_resource",[r,F("resource_Uranium_name")])}
                ${i}
                ${F("city_fission_power_effect",[.28])}
                ${F("minus_power",[$(this)[0].powered()])}
                `},support:()=>1,powered:()=>Is(1),powerBalancer:()=>[{s:t.interstellar.starport.s_max-t.interstellar.starport.support}],refresh:!0,action(){return!!ii($(this)[0])&&(At("xfer_station","interstellar"),ei($(this)[0])&&(t.resource.Uranium.max+=wr(2500),t.resource.Helium_3.max+=wr(5e3),t.resource.Oil.max+=wr(4e3),t.resource.Deuterium.max+=wr(2e3)),1===t.tech.proxima&&(t.tech.proxima=2,t.interstellar.cargo_yard={count:0}),!0)}},cargo_yard:{id:"interstellar-cargo_yard",title:F("interstellar_cargo_yard_title"),desc:F("interstellar_cargo_yard_title"),reqs:{proxima:2},cost:{Money:e=>js("cargo_yard",e,275e3,1.28,"interstellar"),Graphene:e=>js("cargo_yard",e,7500,1.28,"interstellar"),Mythril:e=>js("cargo_yard",e,6e3,1.28,"interstellar")},effect(){let e=wr(200),a=wr(150),r=`
                ${F("plus_max_resource",[50,F("resource_Crates_name")])}
                ${F("plus_max_resource",[50,F("resource_Containers_name")])}
                `;return r+=`
                ${F("plus_max_resource",[e,F("resource_Neutronium_name")])}
                ${F("plus_max_resource",[a,F("resource_Infernite_name")])}
                `,t.tech.storage>=7&&(r+=`
                ${F("interstellar_cargo_yard_effect",[+_.toFixed(3)])}
                `),r},action(){return!!ii($(this)[0])&&(At("cargo_yard","interstellar"),!0)}},cruiser:{id:"interstellar-cruiser",title:F("interstellar_cruiser_title"),desc:F("interstellar_cruiser_title"),reqs:{cruiser:1},cost:{Money:e=>js("cruiser",e,875e3,1.28,"interstellar"),Aluminium:e=>js("cruiser",e,195e3,1.28,"interstellar"),Deuterium:e=>js("cruiser",e,+Ut(1500).toFixed(0),1.28,"interstellar"),Neutronium:e=>js("cruiser",e,2e3,1.28,"interstellar"),Aerogel:e=>js("cruiser",e,250,1.28,"interstellar"),Horseshoe:()=>t.race.hooved?3:0},powered:()=>Is(1),effect(){let e=+Ut(6).toFixed(2);return`
                ${F("plus_max_soldiers",[aa(3)])}
                ${F("space_belt_station_effect3",[e])}
                `},action(){return!!ii($(this)[0])&&(At("cruiser","interstellar"),t.interstellar.cruiser.on++,!0)}},dyson:{id:"interstellar-dyson",title:F("interstellar_dyson_title"),desc:e=>!t.interstellar.hasOwnProperty("dyson")||t.interstellar.dyson.count<100||e?`
                ${F("interstellar_dyson_title")}
                ${F("requires_segmemts",[100])}
                `:`
                ${F("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?`
                ${F("space_dwarf_reactor_effect1",[As(1.25*a)])}
                `:"",t=100-a;return`
                ${F("interstellar_dyson_effect")}
                ${e}
                ${F("space_dwarf_collider_effect2",[t])}
                `}return F("interstellar_dyson_complete",[As(175)])},action(){return!!(ii($(this)[0])&&t.interstellar.dyson.count<100)&&(At("dyson","interstellar"),t.interstellar.dyson.count>=100&&Jr(),!0)}},dyson_sphere:{id:"interstellar-dyson_sphere",title:F("interstellar_dyson_sphere_title"),desc:e=>!t.interstellar.hasOwnProperty("dyson_sphere")||t.interstellar.dyson_sphere.count<100||e?`
                ${F("interstellar_dyson_sphere_title")}
                ${F("requires_segmemts",[100])}
                `:`
                ${F("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`
                ${F("interstellar_dyson_sphere_effect")}
                ${F("space_dwarf_reactor_effect1",[As(e)])}
                ${F("space_dwarf_collider_effect2",[t])}
                `}return F("interstellar_dyson_sphere_complete",[As(750)])},action(){return!!(ii($(this)[0])&&t.interstellar.dyson_sphere.count<100)&&(At("dyson_sphere","interstellar"),t.interstellar.dyson_sphere.count>=100&&Jr(),!0)}},orichalcum_sphere:{id:"interstellar-orichalcum_sphere",title:F("interstellar_dyson_sphere_title"),desc:e=>!t.interstellar.hasOwnProperty("orichalcum_sphere")||t.interstellar.orichalcum_sphere.count<100||e?`
                ${F("interstellar_orichalcum_sphere_desc")}
                ${F("requires_segmemts",[100])}
                `:`
                ${F("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`
                ${F("interstellar_orichalcum_sphere_effect")}
                ${F("space_dwarf_reactor_effect1",[As(e)])}
                ${F("space_dwarf_collider_effect2",[t])}
                `}return F("interstellar_dyson_sphere_complete",[As(1750)])},action(){return!!(ii($(this)[0])&&t.interstellar.orichalcum_sphere.count<100)&&(At("orichalcum_sphere","interstellar"),t.interstellar.orichalcum_sphere.count>=100&&Pn("blacken_the_sun"),!0)}}},int_nebula:{info:{name:F("interstellar_nebula_name"),desc:()=>t.tech.nebula?F("interstellar_nebula_desc2"):F("interstellar_nebula_desc1"),support:"nexus"},nebula_mission:{id:"interstellar-nebula_mission",title:F("space_mission_title",[F("interstellar_nebula_name")]),desc:F("space_mission_desc",[F("interstellar_nebula_name")]),reqs:{alpha:1},grant:["nebula",1],queue_complete:()=>t.tech.nebula>=1?0:1,cost:{Helium_3:()=>+Ut(55e3).toFixed(0)},effect:F("interstellar_nebula_mission_effect"),action(){return!!ii($(this)[0])&&(ms(F("interstellar_nebula_mission_result"),"info",!1,["progress"]),!0)}},nexus:{id:"interstellar-nexus",title:F("interstellar_nexus_title"),desc:()=>`
                ${F("interstellar_nexus_title")}
                ${F("requires_power_combo",[t.resource.Money.name])}
                `,reqs:{nebula:1},cost:{Money:e=>js("nexus",e,9e5,1.24,"interstellar"),Adamantite:e=>js("nexus",e,7500,1.24,"interstellar"),Infernite:e=>js("nexus",e,250,1.24,"interstellar"),Sheet_Metal:e=>js("nexus",e,14e3,1.24,"interstellar"),Nano_Tube:e=>js("nexus",e,17500,1.24,"interstellar")},effect(){let e=wr(3500),t=wr(4e3),a=wr(3e3),r=wr(25);return`
                ${F("interstellar_nexus_effect1",[$(this)[0].support()])}
                ${F("plus_max_resource",[e,F("resource_Oil_name")])}
                ${F("plus_max_resource",[t,F("resource_Helium_3_name")])}
                ${F("plus_max_resource",[a,F("resource_Deuterium_name")])}
                ${F("plus_max_resource",[r,F("resource_Elerium_name")])}
                ${F("interstellar_nexus_effect2",[$(this)[0].powered(),350])}
                `},support:()=>2,powered:()=>Is(8),powerBalancer:()=>[{s:t.interstellar.nexus.s_max-t.interstellar.nexus.support}],refresh:!0,action(){return!!ii($(this)[0])&&(At("nexus","interstellar"),t.resource.Deuterium.display=!0,1===t.tech.nebula&&(t.interstellar.harvester={count:0,on:0},t.tech.nebula=2),ei($(this)[0])&&(t.resource.Oil.max+=wr(2500),t.resource.Helium_3.max+=wr(4e3),t.resource.Deuterium.max+=wr(3e3),t.resource.Elerium.max+=wr(25)),!0)}},harvester:{id:"interstellar-harvester",title:F("interstellar_harvester_title"),desc:`
                ${F("interstellar_harvester_title")}
                ${F("space_support",[F("interstellar_nebula_name")])}
                `,reqs:{nebula:2},cost:{Money:e=>js("harvester",e,65e4,1.28,"interstellar"),Copper:e=>js("harvester",e,8e4,1.28,"interstellar"),Alloy:e=>js("harvester",e,45e3,1.28,"interstellar"),Iridium:e=>js("harvester",e,8e3,1.28,"interstellar")},effect(){let e=+xe("harvester","helium").toFixed(3),a=+xe("harvester","deuterium").toFixed(3),r=t.tech.ram_scoop?`
                ${F("interstellar_harvester_effect",[a])}
                `:"";return`
                ${F("space_used_support",[F("interstellar_nebula_name")])}
                ${F("space_gas_mining_effect1",[e])}
                ${r}`},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("harvester","interstellar"),t.interstellar.nexus.support${F("interstellar_elerium_prospector_title")}
                ${F("space_support",[F("interstellar_nebula_name")])}
                `,reqs:{nebula:3},cost:{Money:e=>js("elerium_prospector",e,825e3,1.28,"interstellar"),Steel:e=>js("elerium_prospector",e,18e3,1.28,"interstellar"),Polymer:e=>js("elerium_prospector",e,22e3,1.28,"interstellar"),Graphene:e=>js("elerium_prospector",e,82e3,1.28,"interstellar"),Stanene:e=>js("elerium_prospector",e,57e3,1.28,"interstellar")},effect(){let e=+xe("elerium_prospector").toFixed(3);return`
                ${F("space_used_support",[F("interstellar_nebula_name")])}
                ${F("space_belt_elerium_ship_effect2",[e])}
                `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("elerium_prospector","interstellar"),t.interstellar.nexus.supportt.tech.neutron?F("interstellar_neutron_desc2",[Di[t.race.species].home]):F("interstellar_neutron_desc1")},neutron_mission:{id:"interstellar-neutron_mission",title:F("space_mission_title",[F("interstellar_neutron_name")]),desc:F("space_mission_desc",[F("interstellar_neutron_name")]),reqs:{nebula:1,high_tech:14},grant:["neutron",1],queue_complete:()=>t.tech.neutron>=1?0:1,cost:{Helium_3:()=>+Ut(6e4).toFixed(0),Deuterium:()=>+Ut(1e4).toFixed(0)},effect:F("interstellar_neutron_mission_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.neutron_miner={count:0,on:0},ms(F("interstellar_neutron_mission_result"),"info",!1,["progress"]),!0)}},neutron_miner:{id:"interstellar-neutron_miner",title:F("interstellar_neutron_miner_title"),desc:()=>`
                ${F("interstellar_neutron_miner_desc")}
                ${F("requires_power_combo",[t.resource.Helium_3.name])}
                `,reqs:{neutron:1},cost:{Money:e=>js("neutron_miner",e,1e6,1.32,"interstellar"),Titanium:e=>js("neutron_miner",e,45e3,1.32,"interstellar"),Stanene:e=>js("neutron_miner",e,88e3,1.32,"interstellar"),Elerium:e=>js("neutron_miner",e,20,1.32,"interstellar"),Aerogel:e=>js("neutron_miner",e,50,1.32,"interstellar")},effect(){let e=+xe("neutron_miner").toFixed(3),t=wr(500),a=+Ut(3).toFixed(2);return`
                ${F("space_gas_moon_outpost_effect1",[e])}
                ${F("plus_max_resource",[t,F("resource_Neutronium_name")])}
                ${F("interstellar_alpha_starport_effect2",[a,$(this)[0].powered()])}
                `},powered:()=>Is(6),powerBalancer:()=>[{r:"Neutronium",k:"lpmod"}],action(){return!!ii($(this)[0])&&(At("neutron_miner","interstellar"),ei($(this)[0]),!0)}},citadel:{id:"interstellar-citadel",title:F("interstellar_citadel_title"),desc:`
                ${F("interstellar_citadel_desc")}
                ${F("requires_power")}
                `,reqs:{neutron:1,high_tech:15},cost:{Money:e=>js("citadel",e,5e6,1.25,"interstellar"),Knowledge:e=>js("citadel",e,15e5,1.15,"interstellar"),Graphene:e=>js("citadel",e,5e4,1.25,"interstellar"),Stanene:e=>js("citadel",e,1e5,1.25,"interstellar"),Elerium:e=>js("citadel",e,250,1.25,"interstellar"),Soul_Gem:e=>js("citadel",e,1,1.25,"interstellar")},wide:!0,effect(){let e=`
                ${F("interstellar_citadel_stat",[+_.toFixed(1)])}
                ${F("interstellar_citadel_effect",[5])}
                `;if(t.tech.ai_core){let a=+(_/1.75).toFixed(1);t.race.flier||(e+=`
                ${F("interstellar_citadel_effect2",[a])}
                `),t.tech.ai_core>=2&&(e+=`
                ${F("interstellar_citadel_effect3",[2])}
                `),t.tech.ai_core>=3&&(e+=`
                ${F("interstellar_citadel_effect4",[+(_/5).toFixed(1)])}
                `)}return`${e}
                ${F("interstellar_citadel_power",[$(this)[0].powered(),Is(2.5)])}
                `},powered:()=>s.citadel&&s.citadel>1?Is(30+2.5*(s.citadel-1)):Is(30),action(){return!!ii($(this)[0])&&(At("citadel","interstellar"),ei($(this)[0]),!0)},flair:()=>F("interstellar_citadel_flair")},stellar_forge:{id:"interstellar-stellar_forge",title:F("interstellar_stellar_forge_title"),desc:`
                ${F("interstellar_stellar_forge_title")}
                ${F("requires_power")}
                `,reqs:{star_forge:1},cost:{Money:e=>js("stellar_forge",e,12e5,1.25,"interstellar"),Iridium:e=>js("stellar_forge",e,25e4,1.25,"interstellar"),Bolognium:e=>js("stellar_forge",e,35e3,1.25,"interstellar"),Aerogel:e=>js("stellar_forge",e,75e3,1.25,"interstellar")},effect(){let e=`
                ${F("city_foundry_effect1",[aa(2)])}
                ${F("interstellar_stellar_forge_effect",[10])}
                ${F("interstellar_stellar_forge_effect2",[5])}
                `;return t.tech.star_forge&&t.tech.star_forge>=2&&(e+=`
                ${F("interstellar_stellar_forge_effect3",[2])}
                `),`${e}
                ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(3),special:!0,action(){return!!ii($(this)[0])&&(At("stellar_forge","interstellar"),ei($(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:()=>F("interstellar_stellar_forge_flair")}},int_blackhole:{info:{name:F("interstellar_blackhole_name"),desc(){let e=Di[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 i=Ns("bigbang"),s="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name");return`
                ${F("interstellar_blackhole_desc4",[e,a,r])}
                ${F("interstellar_blackhole_desc5",[i.plasmid,i.phage,i.dark,s])}
                `}return t.interstellar.stellar_engine.exotic>0?F("interstellar_blackhole_desc4",[e,a,r]):F("interstellar_blackhole_desc3",[e,a])}return t.tech.blackhole?F("interstellar_blackhole_desc2",[e]):F("interstellar_blackhole_desc1",[e])}},blackhole_mission:{id:"interstellar-blackhole_mission",title:F("space_mission_title",[F("interstellar_blackhole_name")]),desc:F("space_mission_desc",[F("interstellar_blackhole_name")]),reqs:{nebula:1},grant:["blackhole",1],queue_complete:()=>t.tech.blackhole>=1?0:1,cost:{Helium_3:()=>+Ut(75e3).toFixed(0),Deuterium:()=>+Ut(25e3).toFixed(0)},effect:F("interstellar_blackhole_mission_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.far_reach={count:0,on:0},ms(F("interstellar_blackhole_mission_result"),"info",!1,["progress"]),!0)}},far_reach:{id:"interstellar-far_reach",title:F("interstellar_far_reach"),desc:`
                ${F("interstellar_far_reach_desc")}
                ${F("requires_power")}
                `,reqs:{blackhole:1},cost:{Money:e=>js("far_reach",e,1e6,1.32,"interstellar"),Knowledge:e=>js("far_reach",e,1e5,1.32,"interstellar"),Neutronium:e=>js("far_reach",e,2500,1.32,"interstellar"),Elerium:e=>js("far_reach",e,100,1.32,"interstellar"),Aerogel:e=>js("far_reach",e,1e3,1.32,"interstellar")},effect(){return`
                ${F("interstellar_far_reach_effect",[1])}
                ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(5),action(){return!!ii($(this)[0])&&(At("far_reach","interstellar"),ei($(this)[0]),1===t.tech.blackhole&&(t.tech.blackhole=2,Jr()),!0)},flair:F("interstellar_far_reach_flair")},stellar_engine:{id:"interstellar-stellar_engine",title:F("interstellar_stellar_engine"),desc:e=>!t.interstellar.hasOwnProperty("stellar_engine")||t.interstellar.stellar_engine.count<100||e?`
                ${F("interstellar_stellar_engine")}
                ${F("requires_segmemts",[100])}
                `:`
                ${F("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`
                ${F("interstellar_stellar_engine_effect")}
                ${F("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=As(+(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),i=t.interstellar.stellar_engine.exotic>0?F("interstellar_stellar_engine_effect3",[a,e]):F("interstellar_stellar_engine_effect2",[a]);return`
                ${F("interstellar_stellar_engine_complete",[r])}
                ${i}
                `}return F("interstellar_stellar_engine_complete",[r])}},action(){return!!(ii($(this)[0])&&t.interstellar.stellar_engine.count<100)&&(At("stellar_engine","interstellar"),t.interstellar.stellar_engine.count>=100&&3===t.tech.blackhole&&(t.tech.blackhole=4,Jr()),!0)}},mass_ejector:{id:"interstellar-mass_ejector",title:F("interstellar_mass_ejector"),desc:`
                ${F("interstellar_mass_ejector")}
                ${F("requires_power")}
                `,reqs:{blackhole:5},cost:{Money:e=>js("mass_ejector",e,75e4,1.25,"interstellar"),Adamantite:e=>js("mass_ejector",e,125e3,1.25,"interstellar"),Infernite:e=>js("mass_ejector",e,275,1.25,"interstellar"),Elerium:e=>js("mass_ejector",e,100,1.25,"interstellar"),Mythril:e=>js("mass_ejector",e,1e4,1.25,"interstellar")},effect(){return`
                ${F("interstellar_mass_ejector_effect")}, ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(3),special:!0,sAction(){t.settings.civTabs=4,t.settings.marketTabs=2,t.settings.tabLoad||($t("mTabResource"),ds("interstellar-mass_ejector"))},action(){return!!ii($(this)[0])&&(0===t.interstellar.mass_ejector.count&&ms(F("interstellar_mass_ejector_msg"),"info",!1,["progress"]),t.settings.showEjector=!0,At("mass_ejector","interstellar"),ei($(this)[0]),Cs($("#resources")),Ba(),!0)},flair:()=>F("interstellar_mass_ejector_flair")},jump_ship:{id:"interstellar-jump_ship",title:F("interstellar_jump_ship"),desc:F("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:F("interstellar_jump_ship_effect"),action(){return!!ii($(this)[0])}},wormhole_mission:{id:"interstellar-wormhole_mission",title:F("space_mission_title",[F("interstellar_wormhole_name")]),desc:F("space_mission_desc",[F("interstellar_wormhole_name")]),reqs:{stargate:2},grant:["stargate",3],queue_complete:()=>t.tech.stargate>=3?0:1,cost:{Helium_3:()=>+Ut(15e4).toFixed(0),Deuterium:()=>+Ut(75e3).toFixed(0)},effect:F("interstellar_wormhole_mission_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.stargate={count:0},t.galaxy.gateway_station={count:0,on:0},ms(F("interstellar_wormhole_mission_result"),"info",!1,["progress"]),!0)}},stargate:{id:"interstellar-stargate",title:F("interstellar_stargate"),desc:e=>!t.interstellar.hasOwnProperty("stargate")||t.interstellar.stargate.count<200||e?`
                ${F("interstellar_stargate")}
                ${F("requires_segmemts",[200])}
                `+(t.interstellar.hasOwnProperty("stargate")&&t.interstellar.stargate.count>=200?`
                ${F("requires_power")}
                `:""):`
                ${F("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`
                ${F("interstellar_stargate_effect")}
                ${F("space_dwarf_collider_effect2",[e])}
                `}return qt.int_blackhole.s_gate.effect()},action(){return!!(ii($(this)[0])&&t.interstellar.stargate.count<200)&&(At("stargate","interstellar"),t.interstellar.stargate.count>=200&&(t.tech.stargate=4,t.interstellar.s_gate={count:1,on:0},t.city.power>=qt.int_blackhole.s_gate.powered()&&t.interstellar.s_gate.on++,Dt(),ds()),!0)}},s_gate:{id:"interstellar-s_gate",title:F("interstellar_stargate"),desc:()=>`
                ${F("interstellar_stargate")}
                ${F("requires_power")}
                `,reqs:{stargate:4},condition:()=>t.interstellar.stargate.count>=200,wiki:!1,queue_complete:()=>0,cost:{},powered:()=>Is(250),effect(){return`
                ${F("interstellar_s_gate_effect")}
                ${F("minus_power",[$(this)[0].powered()])}
                `},action:()=>!1}},int_sirius:{info:{name:()=>t.tech.ascension>=3?F("interstellar_sirius_b_name"):F("interstellar_sirius_name"),desc:()=>t.tech.ascension>=3?F("interstellar_sirius_b_desc"):F("interstellar_sirius_desc",[Di[t.race.species].home])},sirius_mission:{id:"interstellar-sirius_mission",title:F("space_mission_title",[F("interstellar_sirius_name")]),desc:F("space_mission_desc",[F("interstellar_sirius_name")]),reqs:{ascension:2},grant:["ascension",3],queue_complete:()=>t.tech.ascension>=3?0:1,cost:{Helium_3:()=>+Ut(48e4).toFixed(0),Deuterium:()=>+Ut(225e3).toFixed(0)},effect:()=>F("interstellar_sirius_mission_effect",[cn("name"),Di[t.race.species].home]),action(){return!!ii($(this)[0])}},sirius_b:{id:"interstellar-sirius_b",title:F("interstellar_sirius_b"),desc:F("interstellar_sirius_b"),reqs:{ascension:3},grant:["ascension",4],queue_complete:()=>t.tech.ascension>=4?0:1,cost:{Knowledge:()=>2e7},effect:()=>F("interstellar_sirius_b_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.space_elevator={count:0},!0)}},space_elevator:{id:"interstellar-space_elevator",title:F("interstellar_space_elevator"),desc:e=>!t.interstellar.hasOwnProperty("space_elevator")||t.interstellar.space_elevator.count<100||e?`
                ${F("interstellar_space_elevator")}
                ${F("requires_segmemts",[100])}
                `:`
                ${F("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=`
                ${F("interstellar_space_elevator_effect")}
                `,r=(e||0)+(t.interstellar.hasOwnProperty("space_elevator")?t.interstellar.space_elevator.count:0);return r<100&&(a+=`
                ${F("space_dwarf_collider_effect2",[100-r])}
                `),a},action(){return!!(ii($(this)[0])&&t.interstellar.space_elevator.count<100)&&(At("space_elevator","interstellar"),t.interstellar.space_elevator.count>=100&&(t.tech.ascension=5,t.interstellar.gravity_dome={count:0},Dt(),ds()),!0)}},gravity_dome:{id:"interstellar-gravity_dome",title:F("interstellar_gravity_dome"),desc:e=>!t.interstellar.hasOwnProperty("gravity_dome")||t.interstellar.gravity_dome.count<100||e?`
                ${F("interstellar_gravity_dome")}
                ${F("requires_segmemts",[100])}
                `:`
                ${F("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=`
                ${F("interstellar_gravity_dome_effect",[Di[t.race.species].home])}
                `,r=(e||0)+(t.interstellar.hasOwnProperty("gravity_dome")?t.interstellar.gravity_dome.count:0);return r<100&&(a+=`
                ${F("space_dwarf_collider_effect2",[100-r])}
                `),a},action(){return!!(ii($(this)[0])&&t.interstellar.gravity_dome.count<100)&&(At("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},Dt(),ds()),!0)}},ascension_machine:{id:"interstellar-ascension_machine",title:F("interstellar_ascension_machine"),desc:e=>!t.interstellar.hasOwnProperty("ascension_machine")||t.interstellar.ascension_machine.count<100||e?`
                ${F("interstellar_ascension_machine")}
                ${F("requires_segmemts",[100])}
                `+(t.interstellar.hasOwnProperty("ascension_machine")&&t.interstellar.ascension_machine.count>=100?`
                ${F("requires_power")}
                `:""):`
                ${F("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`
                ${F("interstellar_ascension_machine_effect",[cn("name")])}
                ${F("space_dwarf_collider_effect2",[e])}
                `}return qt.int_sirius.ascension_trigger.effect()},action(){return!!(ii($(this)[0])&&t.interstellar.ascension_machine.count<100)&&(At("ascension_machine","interstellar"),t.interstellar.ascension_machine.count>=100&&(t.tech.ascension=7,t.interstellar.ascension_trigger={count:1,on:0},Dt(),ds()),!0)}},ascension_trigger:{id:"interstellar-ascension_trigger",title:F("interstellar_ascension_machine"),desc:()=>`
                ${F("interstellar_ascension_machine")}
                ${F("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(Is(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=s.ascension_trigger?8:7,Dt()}),250):(t.tech.ascension=7,Dt())},effect(){let e=Pt(),t=$(this)[0].powered(),a=t>0?`
                ${F("minus_power",[t])}
                `:"";return`
                ${F("interstellar_ascension_trigger_effect")}
                ${e}${a}`},action:()=>!1},ascend:{id:"interstellar-ascend",title:F("interstellar_ascend"),desc:F("interstellar_ascend"),reqs:{ascension:8},queue_complete:()=>0,no_multi:!0,cost:{},effect(){let e=Pt();return`
                ${F("interstellar_ascend_effect")}
                ${e}`},action(){return!!ii($(this)[0])&&(Jt(),!0)}},thermal_collector:{id:"interstellar-thermal_collector",title:F("interstellar_thermal_collector"),desc:F("interstellar_thermal_collector"),reqs:{ascension:6},cost:{Money:e=>js("thermal_collector",e,5e6,1.08,"interstellar"),Infernite:e=>js("thermal_collector",e,25e3,1.08,"interstellar"),Stanene:e=>js("thermal_collector",e,1e6,1.08,"interstellar"),Vitreloy:e=>js("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 F("interstellar_thermal_collector_effect",[e])},action(){return!!ii($(this)[0])&&(At("thermal_collector","interstellar"),!0)}}}};function Pt(){let e=Ns("ascend"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name");return`
                ${F("interstellar_ascension_trigger_effect2",[e.plasmid,a])}
                ${F("interstellar_ascension_trigger_effect2",[e.phage,F("resource_Phage_name")])}
                ${F("interstellar_ascension_trigger_effect2",[e.harmony,F("resource_Harmony_name")])}
                ${F("interstellar_ascension_trigger_effect3")}
                `}function jt(){let e=Ns("terraform"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name");return`
                ${F("interstellar_ascension_trigger_effect2",[e.plasmid,a])}
                ${F("interstellar_ascension_trigger_effect2",[e.phage,F("resource_Phage_name")])}
                ${F("interstellar_ascension_trigger_effect2",[e.harmony,F("resource_Harmony_name")])}
                ${F("space_terraformer_effect3")}
                `}const Ot={gxy_gateway:{info:{name:F("galaxy_gateway"),desc:()=>F("galaxy_gateway_desc"),control:()=>({name:cn("name"),color:"success"}),support:"starbase"},gateway_mission:{id:"galaxy-gateway_mission",title:F("galaxy_gateway_mission"),desc:F("galaxy_gateway_mission"),reqs:{gateway:1},grant:["gateway",2],queue_complete:()=>t.tech.gateway>=2?0:1,cost:{Helium_3:()=>+Ut(212e3).toFixed(0),Deuterium:()=>+Ut(11e4).toFixed(0)},effect:F("galaxy_gateway_mission_effect"),action(){return!!ii($(this)[0])&&(Ct(),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:F("galaxy_starbase"),desc:()=>`
                ${F("galaxy_starbase")}
                ${F("requires_power_space",[t.resource.Food.name])}
                `,reqs:{gateway:2},cost:{Money:e=>js("starbase",e,42e5,1.25,"galaxy"),Elerium:e=>js("starbase",e,1e3,1.25,"galaxy"),Mythril:e=>js("starbase",e,9e4,1.25,"galaxy"),Graphene:e=>js("starbase",e,32e4,1.25,"galaxy"),Horseshoe:()=>t.race.hooved?5:0},effect(){let e=+Ut(25).toFixed(2),a=t.tech.marines>=2?aa(8):aa(5);return`
                ${F("galaxy_defense_platform_effect",[25])}
                ${F("galaxy_gateway_support",[$(this)[0].support()])}
                ${F("plus_max_soldiers",[a])}
                ${F("interstellar_alpha_starport_effect2",[e,$(this)[0].powered()])}
                ${F("interstellar_alpha_starport_effect3",[250,t.resource.Food.name])}
                `},support:()=>2,powered:()=>Is(s.s_gate?12:0),powerBalancer:()=>[{s:t.galaxy.starbase.s_max-t.galaxy.starbase.support}],refresh:!0,action(){return!!ii($(this)[0])&&(At("starbase","galaxy"),ei($(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:F("galaxy_ship_dock"),desc:`
                ${F("galaxy_ship_dock")}
                ${F("requires_power")}
                `,reqs:{gateway:4},cost:{Money:e=>js("ship_dock",e,36e5,1.25,"galaxy"),Steel:e=>js("ship_dock",e,88e4,1.25,"galaxy"),Aluminium:e=>js("ship_dock",e,12e5,1.25,"galaxy"),Bolognium:e=>js("ship_dock",e,75e3,1.25,"galaxy")},effect(){return`
                ${F("galaxy_ship_dock_effect",[.25])}
                ${F("minus_power",[$(this)[0].powered()])}
                `},support:()=>s.starbase?.25*s.starbase:0,powered:()=>Is(s.s_gate?4:0),powerBalancer:()=>[{s:t.galaxy.starbase.s_max-t.galaxy.starbase.support}],action(){return!!ii($(this)[0])&&(At("ship_dock","galaxy"),ei($(this)[0]),!0)}},bolognium_ship:{id:"galaxy-bolognium_ship",title:F("galaxy_bolognium_ship"),desc:()=>`
                ${F("galaxy_bolognium_ship_desc")}
                ${F("galaxy_starbase_support",[F("resource_Helium_3_name")])}
                `,reqs:{gateway:3},cost:{Money:e=>js("bolognium_ship",e,14e5,1.22,"galaxy"),Iron:e=>js("bolognium_ship",e,56e4,1.22,"galaxy"),Infernite:e=>js("bolognium_ship",e,1800,1.22,"galaxy"),Nano_Tube:e=>js("bolognium_ship",e,475e3,1.22,"galaxy")},effect(){let e=+xe("bolognium_ship").toFixed(3),a=+Ut($(this)[0].ship.helium).toFixed(2);return`
                ${F("gain",[e,F("resource_Bolognium_name")])}
                ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                ${F("galaxy_gateway_used_support",[-$(this)[0].support()])}
                ${F("spend",[a,t.resource.Helium_3.name])}
                `},support:()=>-1,ship:{civ:()=>t.race.high_pop?2*Ki.high_pop.vars()[0]:2,mil:()=>0,helium:5},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("bolognium_ship","galaxy"),t.resource.Bolognium.display=!0,t.civic.crew.display=!0,t.galaxy.starbase.support`
                ${F("galaxy_scout_ship")}
                ${F("galaxy_starbase_support",[F("resource_Helium_3_name")])}
                `,reqs:{andromeda:1},cost:{Money:e=>js("scout_ship",e,16e5,1.25,"galaxy"),Titanium:e=>js("scout_ship",e,325e3,1.25,"galaxy"),Graphene:e=>js("scout_ship",e,118e3,1.25,"galaxy"),Soul_Gem:e=>js("scout_ship",e,1,1.02,"galaxy")},effect(){let e=+Ut($(this)[0].ship.helium).toFixed(2),a=t.tech.science>=17?`
                ${F("galaxy_scout_ship_effect2",[25])}
                `:"";return`
                ${F("galaxy_ship_rating",[$(this)[0].ship.rating()])}
                ${F("galaxy_scout_ship_effect")}
                ${a}
                ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                ${F("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
                ${F("galaxy_gateway_used_support",[-$(this)[0].support()])}
                ${F("spend",[e,t.resource.Helium_3.name])}
                `},support:()=>-1,ship:{civ:()=>t.race.high_pop?1*Ki.high_pop.vars()[0]:1,mil:()=>t.race.high_pop?1*Ki.high_pop.vars()[0]:1,helium:6,rating:()=>t.race.banana?7:10},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("scout_ship","galaxy"),t.galaxy.defense.gxy_gateway.scout_ship++,t.galaxy.starbase.support`
                ${F("galaxy_corvette_ship")}
                ${F("galaxy_starbase_support",[F("resource_Helium_3_name")])}
                `,reqs:{andromeda:2},cost:{Money:e=>js("corvette_ship",e,45e5,1.25,"galaxy"),Steel:e=>js("corvette_ship",e,175e4,1.25,"galaxy"),Infernite:e=>js("corvette_ship",e,16e3,1.25,"galaxy"),Bolognium:e=>js("corvette_ship",e,35e3,1.25,"galaxy"),Soul_Gem:e=>js("corvette_ship",e,1,1.25,"galaxy")},effect(){let e=+Ut($(this)[0].ship.helium).toFixed(2);return`
                ${F("galaxy_ship_rating",[$(this)[0].ship.rating()])}
                ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                ${F("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
                ${F("galaxy_gateway_used_support",[-$(this)[0].support()])}
                ${F("spend",[e,t.resource.Helium_3.name])}
                `},support:()=>-1,ship:{civ:()=>t.race.high_pop?2*Ki.high_pop.vars()[0]:2,mil:()=>t.race.high_pop?3*Ki.high_pop.vars()[0]:3,helium:10,rating:()=>t.race.banana?21:30},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("corvette_ship","galaxy"),t.galaxy.defense.gxy_gateway.corvette_ship++,t.galaxy.starbase.support`
                ${F("galaxy_frigate_ship")}
                ${F("galaxy_starbase_support",[F("resource_Helium_3_name")])}
                `,reqs:{andromeda:3},cost:{Money:e=>js("frigate_ship",e,18e6,1.25,"galaxy"),Elerium:e=>js("frigate_ship",e,1250,1.25,"galaxy"),Mythril:e=>js("frigate_ship",e,35e4,1.25,"galaxy"),Sheet_Metal:e=>js("frigate_ship",e,8e5,1.25,"galaxy"),Soul_Gem:e=>js("frigate_ship",e,2,1.25,"galaxy")},effect(){let e=+Ut($(this)[0].ship.helium).toFixed(2);return`
                ${F("galaxy_ship_rating",[$(this)[0].ship.rating()])}
                ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                ${F("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
                ${F("galaxy_gateway_used_support",[-$(this)[0].support()])}
                ${F("spend",[e,t.resource.Helium_3.name])}
                `},support:()=>-2,ship:{civ:()=>t.race.high_pop?3*Ki.high_pop.vars()[0]:3,mil:()=>t.race.high_pop?5*Ki.high_pop.vars()[0]:5,helium:25,rating:()=>t.race.banana?56:80},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("frigate_ship","galaxy"),t.galaxy.defense.gxy_gateway.frigate_ship++,t.galaxy.starbase.support+1`
                ${F("galaxy_cruiser_ship")}
                ${F("galaxy_starbase_support",[F("resource_Deuterium_name")])}
                `,reqs:{andromeda:4},cost:{Money:e=>js("cruiser_ship",e,75e6,1.25,"galaxy"),Copper:e=>js("cruiser_ship",e,6e6,1.25,"galaxy"),Adamantite:e=>js("cruiser_ship",e,1e6,1.25,"galaxy"),Vitreloy:e=>js("cruiser_ship",e,75e4,1.25,"galaxy"),Elerium:e=>js("cruiser_ship",e,1800,1.25,"galaxy"),Soul_Gem:e=>js("cruiser_ship",e,5,1.25,"galaxy")},effect(){let e=+Ut($(this)[0].ship.deuterium).toFixed(2);return`
                ${F("galaxy_ship_rating",[$(this)[0].ship.rating()])}
                ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                ${F("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
                ${F("galaxy_gateway_used_support",[-$(this)[0].support()])}
                ${F("spend",[e,t.resource.Deuterium.name])}
                `},support:()=>-3,ship:{civ:()=>t.race.high_pop?6*Ki.high_pop.vars()[0]:6,mil:()=>t.race.high_pop?10*Ki.high_pop.vars()[0]:10,deuterium:25,rating:()=>t.race.banana?175:250},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("cruiser_ship","galaxy"),t.galaxy.defense.gxy_gateway.cruiser_ship++,t.galaxy.starbase.support+2`
                ${F("galaxy_dreadnought")}
                ${F("galaxy_starbase_support",[F("resource_Deuterium_name")])}
                `,reqs:{andromeda:5},cost:{Money:e=>js("dreadnought",e,225e6,1.25,"galaxy"),Neutronium:e=>js("dreadnought",e,25e4,1.25,"galaxy"),Bolognium:e=>js("dreadnought",e,15e5,1.25,"galaxy"),Vitreloy:e=>js("dreadnought",e,1e6,1.25,"galaxy"),Infernite:e=>js("dreadnought",e,4e5,1.25,"galaxy"),Aerogel:e=>js("dreadnought",e,8e5,1.25,"galaxy"),Soul_Gem:e=>js("dreadnought",e,25,1.25,"galaxy")},effect(){let e=+Ut($(this)[0].ship.deuterium).toFixed(2);return`
                ${F("galaxy_ship_rating",[$(this)[0].ship.rating()])}
                ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                ${F("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
                ${F("galaxy_gateway_used_support",[-$(this)[0].support()])}
                ${F("spend",[e,t.resource.Deuterium.name])}
                `},support:()=>-5,ship:{civ:()=>t.race.high_pop?10*Ki.high_pop.vars()[0]:10,mil:()=>t.race.high_pop?20*Ki.high_pop.vars()[0]:20,deuterium:80,rating:()=>t.race.banana?1260:1800},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("dreadnought","galaxy"),t.galaxy.defense.gxy_gateway.dreadnought++,t.galaxy.starbase.support+2t.tech.piracy?F("galaxy_stargate_desc_alt"):F("galaxy_stargate_desc"),control:()=>({name:cn("name"),color:"success"})},gateway_station:{id:"galaxy-gateway_station",title:F("galaxy_gateway_station"),desc:()=>`
                ${F("galaxy_gateway_station_desc")}
                ${F("requires_power")}
                `,reqs:{stargate:4},cost:{Money:e=>js("gateway_station",e,5e6,1.25,"galaxy"),Aluminium:e=>js("gateway_station",e,52e4,1.25,"galaxy"),Polymer:e=>js("gateway_station",e,35e4,1.25,"galaxy"),Neutronium:e=>js("gateway_station",e,17500,1.25,"galaxy")},effect(){let e=wr(2e3),a=wr(4500),r=wr(50),i="";return t.tech.gateway&&t.tech.gateway>=2&&(i=`
                ${F("galaxy_gateway_support",[$(this)[0].support()])}
                `),`${i}
                ${F("plus_max_resource",[e,F("resource_Helium_3_name")])}
                ${F("plus_max_resource",[a,F("resource_Deuterium_name")])}
                ${F("plus_max_resource",[r,F("resource_Elerium_name")])}
                ${F("minus_power",[$(this)[0].powered()])}
                `},support:()=>.5,powered:()=>Is(s.s_gate?4:0),powerBalancer:()=>!t.galaxy.hasOwnProperty("starbase")&&[{s:t.galaxy.starbase.s_max-t.galaxy.starbase.support}],refresh:!0,action(){return!!ii($(this)[0])&&(At("gateway_station","galaxy"),t.resource.Helium_3.max+=wr(2e3),t.resource.Deuterium.max+=wr(4500),4===t.tech.stargate&&(t.galaxy.telemetry_beacon={count:0,on:0},t.tech.stargate=5),ei($(this)[0]),!0)}},telemetry_beacon:{id:"galaxy-telemetry_beacon",title:F("galaxy_telemetry_beacon"),desc:()=>`
                ${F("galaxy_telemetry_beacon")}
                ${F("requires_power")}
                `,reqs:{stargate:5},cost:{Money:e=>js("telemetry_beacon",e,225e4,1.25,"galaxy"),Copper:e=>js("telemetry_beacon",e,685e3,1.25,"galaxy"),Alloy:e=>js("telemetry_beacon",e,425e3,1.25,"galaxy"),Iridium:e=>js("telemetry_beacon",e,177e3,1.25,"galaxy")},effect(){let e=t.tech.telemetry?1200:800;t.tech.science>=17&&(e+=25*o.scout_ship);let a=s.telemetry_beacon?e*s.telemetry_beacon:0,r="";return t.tech.gateway&&t.tech.gateway>=2&&(r=`
                ${F("galaxy_gateway_support",[$(this)[0].support()])}
                `),`${r}
                ${F("galaxy_telemetry_beacon_effect1",[e])}
                ${F("galaxy_telemetry_beacon_effect2",[a])}
                ${F("minus_power",[$(this)[0].powered()])}
                `},support:()=>t.tech.telemetry?.75:.5,powered:()=>Is(s.s_gate?4:0),powerBalancer:()=>!t.galaxy.hasOwnProperty("starbase")&&[{s:t.galaxy.starbase.s_max-t.galaxy.starbase.support}],postPower(e){let a=e?s.telemetry_beacon+b():s.telemetry_beacon-b();a>t.galaxy.telemetry_beacon.count?a=t.galaxy.telemetry_beacon.count:a<0&&(a=0),s.telemetry_beacon=a,ri($(this)[0],"galaxy","telemetry_beacon")},action(){return!!ii($(this)[0])&&(At("telemetry_beacon","galaxy"),ei($(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,Bt()),!0)}},gateway_depot:{id:"galaxy-gateway_depot",title:F("galaxy_gateway_depot"),desc:`
                ${F("galaxy_gateway_depot")}
                `,reqs:{gateway:5},cost:{Money:e=>js("gateway_depot",e,4e6,1.25,"galaxy"),Neutronium:e=>js("gateway_depot",e,8e4,1.25,"galaxy"),Stanene:e=>js("gateway_depot",e,5e5,1.25,"galaxy"),Vitreloy:e=>js("gateway_depot",e,2500,1.25,"galaxy")},wide:!0,effect(){let e=t.tech.world_control?150:100,a=wr(200),r=zt(),i=q(+wr(3e3*r).toFixed(0),1),s=q(+wr(25e4*r).toFixed(0),1),n=q(+wr(9001*r).toFixed(0),1),c=q(+wr(6660*r).toFixed(0),1),o='
                ';return o+=`${F("plus_max_crates",[e])}${F("plus_max_containers",[e])}`,o+=`${F("plus_max_resource",[i,t.resource.Uranium.name])}`,o+=`${F("plus_max_resource",[s,t.resource.Nano_Tube.name])}`,o+=`${F("plus_max_resource",[n,t.resource.Neutronium.name])}`,o+=`${F("plus_max_resource",[c,t.resource.Infernite.name])}`,o+="
                ",`${o}
                ${F("galaxy_gateway_depot_effect",[a,F("resource_Elerium_name")])}
                ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(s.s_gate?10:0),action(){if(ii($(this)[0])){At("gateway_depot","galaxy");let e=zt();return t.resource.Uranium.max+=wr(3e3*e),t.resource.Nano_Tube.max+=wr(25e4*e),t.resource.Neutronium.max+=wr(9001*e),t.resource.Infernite.max+=wr(6660*e),ei($(this)[0]),!0}return!1}},defense_platform:{id:"galaxy-defense_platform",title:F("galaxy_defense_platform"),desc:()=>`
                ${F("galaxy_defense_platform")}
                ${F("requires_power")}
                `,reqs:{stargate:6},cost:{Money:e=>js("defense_platform",e,75e4,1.25,"galaxy"),Adamantite:e=>js("defense_platform",e,425e3,1.25,"galaxy"),Elerium:e=>js("defense_platform",e,800,1.25,"galaxy"),Vitreloy:e=>js("defense_platform",e,1250,1.25,"galaxy"),Wrought_Iron:e=>js("defense_platform",e,75e3,1.25,"galaxy")},effect(){return`
                ${F("galaxy_defense_platform_effect",[20])}
                ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(s.s_gate?5:0),postPower(e){zs({el:"#gxy_stargate"},"update")},action(){return!!ii($(this)[0])&&(At("defense_platform","galaxy"),ei($(this)[0]),!0)},post(){zs({el:"#gxy_stargate"},"update")}}},gxy_gorddon:{info:{name:F("galaxy_gorddon"),desc:()=>F("galaxy_gorddon_desc"),control:()=>({name:Di[t.galaxy.alien1.id].name,color:"advanced"})},gorddon_mission:{id:"galaxy-gorddon_mission",title:F("galaxy_gorddon_mission"),desc:F("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:()=>+Ut(23e4).toFixed(0),Deuterium:()=>+Ut(125e3).toFixed(0)},effect:F("galaxy_gorddon_mission_effect"),action(){if(ii($(this)[0])){Ct(),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=Di[t.galaxy.alien1.id].name,a=Di[t.galaxy.alien1.id].entity,r=Di[t.galaxy.alien2.id].name;return ms(F("galaxy_gorddon_mission_result",[a,e,Di[t.galaxy.alien2.id].entity,r]),"info",!1,["progress"]),!0}return!1}},embassy:{id:"galaxy-embassy",title:F("galaxy_embassy"),desc:()=>`
                ${F("galaxy_embassy")}
                ${F("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=`
                ${F("plus_max_citizens",[$(this)[0].citizens()])}
                `),`
                ${F("galaxy_embassy_effect",[Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name])}
                ${e}
                ${F("interstellar_alpha_starport_effect3",[7500,t.resource.Food.name])}
                ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(s.s_gate?25:0),refresh:!0,action(){return!!(t.galaxy.embassy.count<1&&ii($(this)[0]))&&(At("embassy","galaxy"),ei($(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},Cs($("#resources")),Ba(),ms(F("galaxy_embassy_complete",[Di[t.galaxy.alien1.id].name,Di[t.galaxy.alien2.id].name]),"info",!1,["progress"])),!0)},citizens(){let e=20;return t.race.high_pop&&(e*=Ki.high_pop.vars()[0]),e}},dormitory:{id:"galaxy-dormitory",title:F("galaxy_dormitory"),desc:()=>`
                ${F("galaxy_dormitory")}
                ${F("requires_power")}
                `,reqs:{xeno:6},cost:{Money:e=>js("dormitory",e,1e7,1.25,"galaxy"),Furs:e=>js("dormitory",e,7e5,1.25,"galaxy"),Cement:e=>js("dormitory",e,12e5,1.25,"galaxy"),Plywood:e=>js("dormitory",e,85e3,1.25,"galaxy"),Horseshoe:()=>t.race.hooved?3:0},effect(){return`
                ${F("requires_res",[F("galaxy_embassy")])}
                ${F("plus_max_citizens",[$(this)[0].citizens()])}
                ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(3),action(){return!!ii($(this)[0])&&(At("dormitory","galaxy"),ei($(this)[0]),!0)},citizens(){let e=3;return t.race.high_pop&&(e*=Ki.high_pop.vars()[0]),e}},symposium:{id:"galaxy-symposium",title:F("galaxy_symposium"),desc:()=>`
                ${F("galaxy_symposium")}
                ${F("requires_power")}
                `,reqs:{xeno:6},cost:{Money:e=>js("symposium",e,8e6,1.25,"galaxy"),Food:e=>t.race.ravenous?0:js("symposium",e,t.race.artifical?45e3:125e3,1.25,"galaxy"),Lumber:e=>js("symposium",e,46e4,1.25,"galaxy"),Brick:e=>js("symposium",e,261600,1.25,"galaxy")},effect(){let e="";return t.tech.xeno>=7&&(e=`
                ${F("galaxy_symposium_effect3",[+$e(300).toFixed(2)])}
                `),`
                ${F("galaxy_symposium_effect",[1750])}
                ${F("galaxy_symposium_effect2",[650])}
                ${e}
                ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(4),action(){return!!ii($(this)[0])&&(At("symposium","galaxy"),ei($(this)[0]),!0)}},freighter:{id:"galaxy-freighter",title:F("galaxy_freighter"),desc:()=>`
                ${F("galaxy_freighter")}
                ${F("galaxy_crew_fuel",[F("resource_Helium_3_name")])}
                `,reqs:{xeno:5},cost:{Money:e=>js("freighter",e,6e6,1.2,"galaxy"),Uranium:e=>js("freighter",e,1e4,1.2,"galaxy"),Adamantite:e=>js("freighter",e,46e4,1.2,"galaxy"),Stanene:e=>js("freighter",e,261600,1.2,"galaxy"),Bolognium:e=>js("freighter",e,66e3,1.2,"galaxy")},effect(){let e=+Ut($(this)[0].ship.helium).toFixed(2),a="";return t.tech.banking>=13&&(a=`
                ${F("interstellar_exchange_boost",[3])}
                `),`
                ${F("galaxy_freighter_effect",[2,Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name])}
                ${a}
                ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                ${F("spend",[e,t.resource.Helium_3.name])}
                `},ship:{civ:()=>t.race.high_pop?3*Ki.high_pop.vars()[0]:3,mil:()=>0,helium:12},special:!0,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("freighter","galaxy"),t.galaxy.freighter.on++,t.resource.Vitreloy.display=!0,!0)}}},gxy_alien1:{info:{name:()=>F("galaxy_alien",[Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].home]),desc:()=>F("galaxy_alien1_desc",[Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].home,Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),control:()=>({name:Di[t.galaxy.alien1.id].name,color:"advanced"})},consulate:{id:"galaxy-consulate",title:F("galaxy_consulate"),desc:()=>F("galaxy_consulate_desc",[Di[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 F("plus_max_citizens",[$(this)[0].citizens()])},refresh:!0,action(){return!!(ii($(this)[0])&&t.galaxy.consulate.count<1)&&(At("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*=Ki.high_pop.vars()[0]),e}},resort:{id:"galaxy-resort",title:F("galaxy_resort"),desc:()=>`
                ${F("galaxy_resort")}
                ${F("requires_power")}
                `,reqs:{xeno:9},cost:{Money:e=>js("resort",e,33e6,1.25,"galaxy"),Stone:e=>js("resort",e,25e6,1.25,"galaxy"),Furs:e=>js("resort",e,1e7,1.25,"galaxy"),Oil:e=>js("resort",e,Ut(125e3),1.25,"galaxy")},effect(){return`
                ${F("plus_max_citizens",[3])}
                ${F("minus_power",[$(this)[0].powered()])}
                `},effect(){let e=wr(t.tech.world_control?1875e3:15e5),a=t.race.joyless?"":`
                ${F("city_max_entertainer",[aa(2)])}
                `;return`
                ${F("plus_max_resource",[`$${e.toLocaleString()}`,F("resource_Money_name")])}
                ${a}
                ${F("space_red_vr_center_effect2",[2])}
                ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(5),action(){return!!ii($(this)[0])&&(At("resort","galaxy"),ei($(this)[0]),!0)}},vitreloy_plant:{id:"galaxy-vitreloy_plant",title:F("galaxy_vitreloy_plant"),desc:()=>`
                ${F("galaxy_vitreloy_plant")}
                ${F("galaxy_vitreloy_plant_desc")}
                `,reqs:{xeno:10},cost:{Money:e=>js("vitreloy_plant",e,35e6,1.25,"galaxy"),Cement:e=>js("vitreloy_plant",e,18e5,1.25,"galaxy"),Neutronium:e=>js("vitreloy_plant",e,25e4,1.25,"galaxy"),Iridium:e=>js("vitreloy_plant",e,85e4,1.25,"galaxy"),Aerogel:e=>js("vitreloy_plant",e,4e5,1.25,"galaxy")},effect(){return`
                ${F("galaxy_vitreloy_plant_effect",[+xe("vitreloy_plant").toFixed(2)])}
                ${F("galaxy_vitreloy_plant_effect2",[2.5,100])}
                ${F("galaxy_vitreloy_plant_effect3",[5e4,$(this)[0].powered()])}
                `},powered:()=>Is(10),action(){return!!ii($(this)[0])&&(At("vitreloy_plant","galaxy"),ei($(this)[0]),!0)}},super_freighter:{id:"galaxy-super_freighter",title:F("galaxy_super_freighter"),desc:()=>`
                ${F("galaxy_super_freighter")}
                ${F("galaxy_crew_fuel",[F("resource_Helium_3_name")])}
                `,reqs:{xeno:9},cost:{Money:e=>js("super_freighter",e,28e6,1.2,"galaxy"),Aluminium:e=>js("super_freighter",e,35e5,1.2,"galaxy"),Alloy:e=>js("super_freighter",e,1e6,1.2,"galaxy"),Graphene:e=>js("super_freighter",e,75e4,1.2,"galaxy")},effect(){let e=+Ut($(this)[0].ship.helium).toFixed(2),a="";return t.tech.banking>=13&&(a=`
                ${F("interstellar_exchange_boost",[8])}
                `),`
                ${F("galaxy_freighter_effect",[5,Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name])}
                ${a}
                ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                ${F("spend",[e,t.resource.Helium_3.name])}
                `},ship:{civ:()=>t.race.high_pop?5*Ki.high_pop.vars()[0]:5,mil:()=>0,helium:25},special:!0,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("super_freighter","galaxy"),t.galaxy.super_freighter.on++,!0)}}},gxy_alien2:{info:{name:()=>F("galaxy_alien",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red]),desc:()=>F("galaxy_alien2_desc",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red,Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name]),control:()=>({name:Di[t.galaxy.alien2.id].name,color:"danger"}),support:"foothold"},alien2_mission:{id:"galaxy-alien2_mission",title:()=>F("galaxy_alien2_mission",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red]),desc:()=>F("galaxy_alien2_mission_desc",[Di[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+=Ot.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_alien2[a]})),{label:F("galaxy_fleet_rating",[`400`]),met:!(e<400)}}return{label:F("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+=Ot.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_alien2[a]}));let a=e>=650?`${F("galaxy_piracy_low")}`:`${F("galaxy_piracy_avg")}`;return`
                ${F("galaxy_alien2_mission_effect2",[e])}
                ${F("galaxy_alien2_mission_effect3",[a])}
                ${F("galaxy_alien2_mission_effect",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name])}
                `},action(){if(ii($(this)[0])){let e=0;if(Object.keys(t.galaxy.defense.gxy_alien2).forEach((function(a){e+=Ot.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_alien2[a]})),e>=400){if(ms(F("galaxy_alien2_mission_result2",[Di[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 i=0;i0&&(e-=Ot.gxy_gateway[r].ship.rating(),a.push(r))})),ms(F("galaxy_chthonian_mission_result_losses",[a.map((e=>F(`galaxy_${e}`))).join(", ")]),"danger",!1,["progress"]);for(let e=0;e`
                ${F("galaxy_foothold")}
                ${F("requires_power_combo",[t.resource.Elerium.name])}
                `,reqs:{conflict:1},cost:{Money:e=>js("foothold",e,25e6,1.25,"galaxy"),Titanium:e=>js("foothold",e,3e6,1.25,"galaxy"),Polymer:e=>js("foothold",e,175e4,1.25,"galaxy"),Iridium:e=>js("foothold",e,9e5,1.25,"galaxy"),Bolognium:e=>js("foothold",e,5e4,1.25,"galaxy")},effect(){return`
                ${F("galaxy_defense_platform_effect",[50])}
                ${F("galaxy_foothold_effect",[$(this)[0].support(),Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red])}
                ${F("galaxy_foothold_effect2",[2.5,$(this)[0].powered()])}
                `},support:()=>4,powered:()=>Is(s.s_gate?20:0),powerBalancer:()=>[{s:t.galaxy.foothold.s_max-t.galaxy.foothold.support}],action(){return!!ii($(this)[0])&&(At("foothold","galaxy"),ei($(this)[0]),1===t.tech.conflict&&(t.galaxy.armed_miner={count:0,on:0,crew:0,mil:0},t.tech.conflict=2,Bt(),Jr()),!0)}},armed_miner:{id:"galaxy-armed_miner",title:F("galaxy_armed_miner"),desc:()=>`
                ${F("galaxy_armed_miner")}
                `,reqs:{conflict:2},cost:{Money:e=>js("armed_miner",e,5e6,1.25,"galaxy"),Steel:e=>js("armed_miner",e,18e5,1.25,"galaxy"),Stanene:e=>js("armed_miner",e,1975e3,1.25,"galaxy"),Vitreloy:e=>js("armed_miner",e,2e4,1.25,"galaxy"),Soul_Gem:e=>js("armed_miner",e,1,1.25,"galaxy")},effect(){let e=+Ut($(this)[0].ship.helium).toFixed(2);return`
                ${F("galaxy_ship_rating",[$(this)[0].ship.rating()])}
                ${F("gain",[.032,F("resource_Bolognium_name")])}
                ${F("gain",[.23,F("resource_Adamantite_name")])}
                ${F("gain",[.65,F("resource_Iridium_name")])}
                ${F("galaxy_alien2_support",[$(this)[0].support(),Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red])}
                ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                ${F("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
                ${F("spend",[e,t.resource.Helium_3.name])}
                `},ship:{civ:()=>t.race.high_pop?2*Ki.high_pop.vars()[0]:2,mil:()=>t.race.high_pop?1*Ki.high_pop.vars()[0]:1,helium:10,rating:()=>t.race.banana?4:5},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("armed_miner","galaxy"),t.galaxy.foothold.support`
                ${F("galaxy_ore_processor")}
                `,reqs:{conflict:3},cost:{Money:e=>js("ore_processor",e,3e6,1.25,"galaxy"),Iron:e=>js("ore_processor",e,5e6,1.25,"galaxy"),Coal:e=>js("ore_processor",e,375e4,1.25,"galaxy"),Graphene:e=>js("ore_processor",e,225e4,1.25,"galaxy")},effect(){return`
                ${F("galaxy_ore_processor_effect",[10])}
                ${F("galaxy_alien2_support",[$(this)[0].support(),Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red])}
                `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("ore_processor","galaxy"),t.galaxy.foothold.supportjs("scavenger",e,75e5,1.25,"galaxy"),Alloy:e=>js("scavenger",e,125e4,1.25,"galaxy"),Aluminium:e=>js("scavenger",e,68e5,1.25,"galaxy"),Neutronium:e=>js("scavenger",e,75e3,1.25,"galaxy"),Elerium:e=>js("scavenger",e,750,1.25,"galaxy")},effect(){let e=St("gxy_alien2"),a=Math.round(25e3*e),r=+Ut($(this)[0].ship.helium).toFixed(2),i=t.race.cataclysm?`
                ${F("galaxy_scavenger_effect2_cata",[+(100*e*.75).toFixed(1)])}
                `:`
                ${F("galaxy_scavenger_effect2",[+(100*e/4).toFixed(1)])}
                `;return`
                ${F("galaxy_scavenger_effect",[a])}
                ${i}
                ${F("galaxy_alien2_support",[$(this)[0].support(),Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red])}
                ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                ${F("spend",[r,t.resource.Helium_3.name])}
                `},ship:{civ:()=>t.race.high_pop?1*Ki.high_pop.vars()[0]:1,mil:()=>0,helium:12},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("scavenger","galaxy"),t.galaxy.foothold.supportF("galaxy_chthonian"),desc:()=>F("galaxy_chthonian_desc",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name]),control:()=>({name:Di[t.galaxy.alien2.id].name,color:"danger"})},chthonian_mission:{id:"galaxy-chthonian_mission",title:()=>F("galaxy_alien2_mission",[F("galaxy_chthonian")]),desc:()=>F("galaxy_alien2_mission_desc",[F("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+=Ot.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_chthonian[a]})),{label:F("galaxy_fleet_rating",[`1250`]),met:!(e<1250)}}return{label:F("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+=Ot.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_chthonian[a]}));let a=e>=4500?`${F("galaxy_piracy_low")}`:e>=2500?`${F("galaxy_piracy_avg")}`:`${F("galaxy_piracy_high")}`;return`
                ${F("galaxy_alien2_mission_effect2",[e])}
                ${F("galaxy_alien2_mission_effect3",[a])}
                ${F("galaxy_alien2_mission_effect",[F("galaxy_chthonian")])}
                `},action(){if(ii($(this)[0])){let e=0;if(Object.keys(t.galaxy.defense.gxy_chthonian).forEach((function(a){e+=Ot.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_chthonian[a]})),e>=1250){let a=500,r=[];ms(F("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 i=0;i0&&(a-=Ot.gxy_gateway[e].ship.rating(),r.push(e))})),ms(F("galaxy_chthonian_mission_result_losses",[r.map((e=>F(`galaxy_${e}`))).join(", ")]),"danger",!1,["progress"]);for(let e=0;e`
                ${F("galaxy_minelayer")}
                `,reqs:{chthonian:2},cost:{Money:e=>js("minelayer",e,9e6,1.25,"galaxy"),Iron:e=>js("minelayer",e,48e5,1.25,"galaxy"),Nano_Tube:e=>js("minelayer",e,125e4,1.25,"galaxy"),Nanoweave:e=>js("minelayer",e,1e5,1.25,"galaxy")},effect(){let e=+Ut($(this)[0].ship.helium).toFixed(2);return`
                ${F("galaxy_defense_platform_effect",[$(this)[0].ship.rating()])}
                ${F("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
                ${F("spend",[e,t.resource.Helium_3.name])}
                `},ship:{civ:()=>0,mil:()=>t.race.high_pop?1*Ki.high_pop.vars()[0]:1,helium:8,rating:()=>t.race.banana?35:50},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("minelayer","galaxy"),t.galaxy.minelayer.on++,!0)},postPower(){zs({el:"#gxy_chthonian"},"update")},post(){zs({el:"#gxy_chthonian"},"update")}},excavator:{id:"galaxy-excavator",title:F("galaxy_excavator"),desc:()=>`
                ${F("galaxy_excavator")}
                `,reqs:{chthonian:3},cost:{Money:e=>js("excavator",e,12e6,1.25,"galaxy"),Polymer:e=>js("excavator",e,44e5,1.25,"galaxy"),Iridium:e=>js("excavator",e,36e5,1.25,"galaxy"),Mythril:e=>js("excavator",e,18e4,1.25,"galaxy")},effect(){return`
                ${F("gain",[+xe("excavator").toFixed(3),F("resource_Orichalcum_name")])}
                ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(8),powerBalancer:()=>[{r:"Orichalcum",p:xe("excavator")}],action(){return!!ii($(this)[0])&&(At("excavator","galaxy"),ei($(this)[0]),!0)}},raider:{id:"galaxy-raider",title:F("galaxy_raider"),desc:()=>`
                ${F("galaxy_raider")}
                `,reqs:{chthonian:3},cost:{Money:e=>js("raider",e,12e6,1.25,"galaxy"),Titanium:e=>js("raider",e,125e4,1.25,"galaxy"),Bolognium:e=>js("raider",e,6e5,1.25,"galaxy"),Vitreloy:e=>js("raider",e,125e3,1.25,"galaxy"),Stanene:e=>js("raider",e,825e3,1.25,"galaxy")},effect(){let e=+Ut($(this)[0].ship.helium).toFixed(2);return St("gxy_chthonian"),`
                ${F("galaxy_ship_rating",[$(this)[0].ship.rating()])}
                ${F("gain",[.65,F("resource_Deuterium_name")])}
                ${F("gain",[.05,F("resource_Vitreloy_name")])}
                ${F("gain",[2.3,F("resource_Polymer_name")])}
                ${F("gain",[.8,F("resource_Neutronium_name")])}
                ${F("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
                ${F("spend",[e,t.resource.Helium_3.name])}
                `},ship:{civ:()=>0,mil:()=>t.race.high_pop?2*Ki.high_pop.vars()[0]:2,helium:18,rating:()=>t.race.banana?9:12},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("raider","galaxy"),t.galaxy.raider.on++,!0)},postPower(){zs({el:"#gxy_chthonian"},"update")},post(){zs({el:"#gxy_chthonian"},"update")}}}};function Mt(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 St(e,a,r){if(t.tech.piracy&&!t.race.truepath){let i=0,n=["dreadnought","cruiser_ship","frigate_ship","corvette_ship","scout_ship"];for(let a=0;ac?c:i))/c)*l+(1-l))*(a?1:St("gxy_stargate")):(1-(c-(i>c?c:i))/c)*l+(1-l)}return 1}function Ct(){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(Di).filter((function(t){return!["demonic","eldritch"].includes(Di[t].type)&&!e.includes(t)})),r=tn(a);t.galaxy.alien1={id:a[r]},e.push(a[r]),a=Object.keys(Di).filter((function(t){return!["angelic"].includes(Di[t].type)&&!e.includes(t)}));let i=tn(a);t.galaxy.alien2={id:a[i]}}function zt(){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 Ft={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 At(e,a){a||(a="space"),t[a][e]||(t[a][e]=Ft[e]),t[a][e].count++}function It(e,t){return e&&t?xt[e][t]:xt}function Tt(e,t,a){switch(e){case"space":return Lt(xt,t,a);case"interstellar":return Lt(qt,t,a);case"galaxy":return Lt(Ot,t,a)}}function Lt(e,a,r){let i=t.race.truepath?"truepath":"standard";if(e[a][r].hasOwnProperty("path")&&!e[a][r].path.includes(i))return!1;var s=!0;return Object.keys(e[a][r].reqs).forEach((function(i){(!t.tech[i]||t.tech[i]=e[a][r].grant[1]&&(s=!1),s}function Et(){(t.settings.tabLoad||1===t.settings.civTabs)&&(Kt("inner"),t.race.truepath&&Kt("outer"),Dt(),Bt())}function Kt(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(Cs(a),a.append($(`

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

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

                ${i}

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

                ${i}

                `);t.race.truepath&&xt[r].info.hasOwnProperty("syndicate")&&xt[r].info.syndicate()&&t.tech.syndicate&&($(`#${r}`).append(`
                `),$(`#${r}synd`).append(`${F("space_syndicate")} `),$(`#${r}synd`).append(`${F("space_scan_effectiveness")} `),$(`#${r}synd`).append(`${F("space_overkill")} `),zs({el:`#${r}synd`,data:t.space.syndicate,methods:{threat(e){if(t.space.hasOwnProperty("shipyard")&&t.space.shipyard.hasOwnProperty("ships")){let t=_t(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")?+((_t(e,!0).s+25)/1.25).toFixed(1)+"%":F("galaxy_piracy_none"),overkill(e){if(t.space.hasOwnProperty("shipyard")&&t.space.shipyard.hasOwnProperty("ships")){let t=_t(e,!0);return t.s>=100?t.o:0}return 0}}}),xt[r].info.hasOwnProperty("extra")&&xt[r].info.extra(r))}_s(r,(function(){return"string"==typeof xt[r].info.desc?xt[r].info.desc:xt[r].info.desc()}),{elm:`#${r} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(xt[r]).forEach((function(t){"info"!==t&&Lt(xt,r,t)&&Xr(xt[r][t],"inner"===e?"space":"outerSol",t)}))}}))}function Dt(){if(!t.settings.tabLoad&&(1!==t.settings.civTabs||2!==t.settings.spaceTabs))return;let e=$("#interstellar");if(Cs(e),e.append($(`

                ${F("tab_interstellar")}

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

                ${r}

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

                ${r}

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

                ${F("tab_galactic")}

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

                ${F("galaxy_armada")}

                `);e.append(r);let i=t.tech.world_control?F("civics_garrison_peacekeepers"):F("civics_garrison_soldiers");r.append($("|")),r.append($(`${i} {{ g.workers | stationed }} / {{ g.max | s_max }}`)),r.append($("|")),r.append($(`${F("job_crew_mil")} {{ g.crew }}`)),r.append($("|")),r.append($(`${F("job_crew_civ")} {{ c.workers }} / {{ c.max }}`)),zs({el:`#h${a}`,data:{g:t.civic.garrison,c:t.civic.crew},filters:{stationed:e=>ke(),s_max:e=>ke(!0)}}),["soldier","crew1","crew2"].forEach((function(e){_s(`h${a}${e}`,(function(){switch(e){case"soldier":return ge();case"crew1":return F("civics_garrison_crew_desc");case"crew2":return F("job_crew_desc")}}),{elm:`#h${a} span.${e}`})}));let s=$(`
                `);e.append(s);let n=["scout_ship","corvette_ship","frigate_ship","cruiser_ship","dreadnought"],c=[];for(let e=0;e<6;e++){let e=$('
                ');c.push(e),s.append(e)}for(let e=0;e${Ot.gxy_gateway[n[e]].title}`);c[e+1].append(t)}c[0].append($("")),c[0].append($(`${Ot.gxy_gateway.info.name}`));for(let e=0;e{{ gateway.${n[e]} }}`);c[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 Ot[e].info.name?Ot[e].info.name:Ot[e].info.name()}`);c[0].append(r);for(let r=0;r'),i=$(`«`),s=$(`{{ ${a}.${n[r]} }}`),o=$(`»`);c[r+1].append(t),t.append(i),t.append(s),t.append(o)}}})),zs({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]&&_s(`armada${a}`,(function(){return`
                ${"string"==typeof Ot[e].info.desc?Ot[e].info.desc:Ot[e].info.desc()}
                `}))}));for(let e=0;e`);e.append(i);let s=$(`

                ${r}

                `);i.append(s),t.tech.xeno&&t.tech.xeno>=3&&i.append(`{{ r.control().name }}`);let n={el:`#${a}`,data:{r:Ot[a].info},methods:{threat(e){let a=t.race.infiltrator?1:2;if(t.galaxy.defense[e].scout_ship>=a){let t=100*(1-St(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-St(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}%`:F(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=>St(e,!0,!0)}};if(Ot[a].info.support){let e=Ot[a].info.support;t.galaxy[e]&&(t.galaxy[e].hasOwnProperty("support")||(t.galaxy[e].support=0,t.galaxy[e].s_max=0),i.append('{{ s.support }}/{{ s.s_max }}'),n.data.s=t.galaxy[e])}t.tech.piracy&&i.append(`
                ${F("galaxy_piracy_threat",[Di[t.galaxy.alien2.id].name])}{{ '${a}' | pirate }}|${F("galaxy_armada")}: {{ '${a}' | defense }}
                `),zs(n),_s(a,(function(){return"string"==typeof Ot[a].info.desc?Ot[a].info.desc:Ot[a].info.desc()}),{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),_s(a,(function(){return F("galaxy_control",[Ot[a].info.control().name,r])}),{elm:`#${a} .regionControl`,classes:"has-background-light has-text-dark"}),Object.keys(Ot[a]).forEach((function(e){"info"!==e&&Lt(Ot,a,e)&&Xr(Ot[a][e],"galaxy",e)}))}}))}function Gt(e){return t.tech.space_housing&&(e*=.8**t.tech.space_housing),e}function Nt(e){return t.tech.solar&&t.tech.solar>=5&&n.iron_ship&&(e*=.95**n.iron_ship),e}function Rt(e){if(t.space.swarm_plant){let a=t.tech.swarm?.88:.94;t.tech.swarm>=3&&(a-=_/100),a<.05&&(a=.05),e*=a**t.space.swarm_plant.count}return e}function Ht(e,a,r){return r=r||{},"heavy"===t.race.universe&&(e*=1.25+.5*Ts("heavy")),t.race.truepath&&(e*=a?2.5:1.25),t.city.mass_driver&&s.mass_driver?e*=(t.race.truepath?.94:.95)**s.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*=ns.dense.vars()[2]),t.race.cataclysm&&(e*=.2),t.race.heavy&&(e*=1+Ki.heavy.vars()[0]/100),on("launch_day")&&(e*=.95),e}function Ut(e){return"heavy"===t.race.universe&&(e*=1.2+.3*Ts("heavy")),t.stats.achieve.heavyweight&&(e*=.96**t.stats.achieve.heavyweight.l),t.race.heavy&&(e*=1+Ki.heavy.vars()[0]/100),on("launch_day")&&(e*=.95),e}function Vt(){let e={red:Di[t.race.species].solar.red,hell:Di[t.race.species].solar.hell,gas:Di[t.race.species].solar.gas,gas_moon:Di[t.race.species].solar.gas_moon,dwarf:Di[t.race.species].solar.dwarf,titan:Bi[Di[t.race.species].type].solar.titan,enceladus:Bi[Di[t.race.species].type].solar.enceladus,triton:Bi[Di[t.race.species].type].solar.triton,eris:Bi[Di[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 Wt=["l","h","a","e","m","mg"],Qt={standard:{name:F("universe_standard"),desc:F("universe_standard_desc"),effect:F("universe_standard_effect")},heavy:{name:F("universe_heavy"),desc:F("universe_heavy_desc"),effect:F("universe_heavy_effect",[5])},antimatter:{name:F("universe_antimatter"),desc:F("universe_antimatter_desc"),effect:F("universe_antimatter_effect")},evil:{name:F("universe_evil"),desc:F("universe_evil_desc"),effect:F("universe_evil_effect")},micro:{name:F("universe_micro"),desc:F("universe_micro_desc"),effect:F("universe_micro_effect",[75])},magic:{name:F("universe_magic"),desc:F("universe_magic_desc"),effect:F("universe_magic_effect")}};function Jt(a){a||t.race.noexport||(j.w&&j.w.terminate(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),Pn(`biome_${t.city.biome}`),Pn(`genus_${Di[t.race.species].type}`),t.race.witch_hunter&&"magic"===t.race.universe?Pn("soul_sponge"):(Pn("ascended"),0===t.interstellar.thermal_collector.count&&jn("energetic")),"junker"===t.race.species&&jn("the_misery"),!t.race.modified&&t.race.junker&&"junker"===t.race.species&&jn("garbage_pie"),t.race.emfield&&Pn("technophobe"),t.race.cataclysm&&jn("finish_line"),t.race.noexport="Race",Cs($("#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=$('
                '),i={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(`

                ${F("genelab_title")}

                - ${F("genelab_genes")} {{ g.genes }} - ${F("trait_untapped_name")}: {{ g.genes | untapped }}
                `),a){r.append(`\n
                ${F("achieve_ascended_name")}
                \n `);let e=$("
                ");r.append(e),Object.keys(Qt).forEach((function(a){i.ascended[a]=t.stats.achieve.ascended&&t.stats.achieve.ascended.hasOwnProperty(qn(a))?t.stats.achieve.ascended[qn(a)]:0,e.append(`\n
                ${F("universe_"+a)}
                \n `)})),r.append(`\n
                ${F("achieve_technophobe_name")}
                \n
                \n
                \n
                \n `)}let s=$(`
                ${F("genelab_name")}
                ${F("genelab_entity")}
                ${F("genelab_home")}
                ${F("genelab_desc")}
                `);r.append(s);let n=$(`
                \n
                ${F("genelab_red")}
                \n
                ${F("genelab_hell")}
                \n
                ${F("genelab_gas")}
                \n
                ${F("genelab_gas_moon")}
                \n
                ${F("genelab_dwarf")}
                `);r.append(n);let c=$(`
                \n
                ${F("genelab_titan")}
                \n
                ${F("genelab_enceladus")}
                \n
                ${F("genelab_triton")}
                \n
                ${F("genelab_eris")}
                `);r.append(c);let o=$('
                ');r.append(o);let l=!1,_=`
                ${F("genelab_genus")}
                ",o.append($(_));let d=`
                ${F("genelab_traits")}
                ",o.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||Vt().titan,enceladus:t.custom.race0.enceladus||Vt().enceladus,triton:t.custom.race0.triton||Vt().triton,eris:t.custom.race0.eris||Vt().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--)Ki.hasOwnProperty(m.traitlist[e])&&"major"===Ki[m.traitlist[e]].type||m.traitlist.splice(e,1);m.genes=rn(m,!!a&&i);let v={msg:""};zs({el:"#celestialLab",data:{g:m,w:i,err:v},methods:{val(e){"technophobe"===e?i.technophobe<0?i.technophobe=0:i.technophobe>5&&(i.technophobe=5):i.ascended[e]<0?i.ascended[e]=0:i.ascended[e]>5&&(i.ascended[e]=5)},geneEdit(){m.genes=rn(m,!!a&&i)},setRace(){rn(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(){M(),$s("reset",{end:"ascend"});let a=t.race.species,r=t.race.gods,i=t.city.calendar.orbit,s=t.city.biome,n=t.city.ptrait,c=t.city.geology,o=Ns("ascend");t.stats.ascend++,sn(),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.Harmony.count=parseFloat((t.prestige.Harmony.count+o.harmony).toFixed(2)),t.stats.harmony=parseFloat((t.stats.harmony+o.harmony).toFixed(2)),n.forEach((function(e){ns.hasOwnProperty(e)&&Pn(`atmo_${e}`)})),void 0===t.tech.world_control&&Pn("cult_of_personality");let l=0;Object.keys(t.city.geology).forEach((function(e){t.city.geology[e]>0&&l++})),l>=4&&Pn("miners_dream"),t.galaxy.hasOwnProperty("dreadnought")&&0!==t.galaxy.dreadnought.count||Pn("dreaded"),t.race.modified||"synth"!==t.race.species&&"nano"!==t.race.species||!t.race.emfield||jn("digital_ascension"),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&Pn("gross"),Cn();let _=!!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),_&&(t.race.srace=_),Object.keys(c).forEach((function(e){c[e]+=.02})),U({orbit:i,biome:s,ptrait:n,geology:c}),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=rn(m,!!a&&i)},customImport(){let e=document.getElementById("customFile").files[0];if(e){let r=new FileReader;r.readAsText(e,"UTF-8"),r.onload=function(r){let s="";try{s=JSON.parse(r.target.result)}catch{return void(v.msg=F("string_pack_error",[e.name]))}let n=!1;if(Object.keys(m).forEach((function(e){s[e]&&typeof m[e]!=typeof s[e]&&(n=!0)})),n)return v.msg=F("string_pack_error",[e.name]),void console.log("format fail");Object.keys(m).forEach((function(e){s[e]&&(m[e]=s[e])})),["name","home","red","hell","gas","gas_moon","dwarf","titan","enceladus","triton","eris"].forEach((function(e){!s[e]&&["titan","enceladus","triton","eris"].includes(e)?m[e]=F(`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 c=[];for(let e=0;e{const r=document.createElement("a"),i=new Blob([e],{type:"text/plain"});r.href=URL.createObjectURL(i),r.download=t,r.click(),URL.revokeObjectURL(r.href)})(JSON.stringify(m,null,4),`evolve-custom-${m.name}.txt`)}},filters:{cost(e){if(Ki[e].val>=0){let r=2;a?r+=i.technophobe:t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=1&&(r+=t.stats.achieve.technophobe.l);let s=Ki[e].val,n=0;for(let e=0;e=0&&n++;return m.traitlist.includes(e)&&n--,n>r&&(s+=n-r),s}return Ki[e].val},untapped:e=>`+${e>0?+(100*(e/(e+20)/10+24e-5)).toFixed(3):0}%`}}),Object.keys(Ei).forEach((function(e){t.stats.achieve[`genus_${e}`]&&t.stats.achieve[`genus_${e}`].l>0&&_s(`celestialLabgenusSelection${e}`,(function(){let t=$(`
                ${F(`genelab_genus_${e}_desc`)}
                `);return Object.keys(Ei[e]).forEach((function(e){if(Ki[e]){let a=$("
                ");fn(a,e,{trank:1}),t.append(a)}})),t}),{elm:`#celestialLab .genus_selection .${e}`,classes:"w30",wide:!0})})),Object.keys(u).sort().forEach((function(e){Ki.hasOwnProperty(e)&&"major"===Ki[e].type&&_s(`celestialLabtraitSelection${e}`,(function(){let t=$("
                ");return fn(t,e,{trank:1}),t}),{elm:`#celestialLab .trait_selection .t${e}`,classes:"w30",wide:!0})}))}function Zt(a){a||t.race.noexport||(j.w&&j.w.terminate(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),Pn(`biome_${t.city.biome}`),Pn(`genus_${Di[t.race.species].type}`),Pn("lamentis"),"junker"===t.race.species&&jn("the_misery"),t.race.noexport="Planet",Cs($("#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=$('
                '),i={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(`

                ${F("planetlab_title")}

                - ${F("planetlab_points")} {{ p.pts }}
                `);let s=$('
                ');r.append(s);let n=!1,c=`
                ${F("wiki_planet_biome")}
                ",s.append($(c));let o=`
                ${F("wiki_planet_trait")}
                ",s.append($(o));let l={},_=["Copper","Iron","Aluminium","Coal","Oil","Titanium","Uranium"];t.stats.achieve.whitehole&&_.push("Iridium");let d=`
                ${F("planetlab_res")}
                ",s.append($(d));let p={biome:n,pts:0,traitlist:[],geology:l,orbit:t.city.calendar.orbit};if(t.custom.hasOwnProperty("planet")){let e=qn();if(t.custom.planet.hasOwnProperty(e)){let a="s";t.custom.planet[e][a]&&(p=nn(t.custom.planet[e][a]),p.orbit=t.city.calendar.orbit,_.forEach((function(e){p.geology.hasOwnProperty(e)?p.geology[e]*=100:p.geology[e]=0})))}}p.pts=Xt(p);let u=`
                \n
                \n \n
                \n `;a||(u+=`\n
                \n \n
                \n `),u+="
                ",r.append(u),zs({el:"#celestialLab",data:{p,w:i},methods:{pEdit(){p.pts=Xt(p)},setPlanet(){if(Xt(p)>=0){Object.keys(p.geology).forEach((function(e){0===p.geology[e]?delete p.geology[e]:p.geology[e]/=100})),t.custom.hasOwnProperty("planet")||(t.custom.planet={});let a=qn();t.custom.planet.hasOwnProperty(a)||(t.custom.planet[a]={s:!1});let r="s";t.custom.planet[a][r]=nn(p),delete t.custom.planet[a][r].pts,function(a){M(),$s("reset",{end:"terraform"});let r=t.race.species,i=t.race.gods,s=t.city.calendar.orbit,n=a.biome,c=a.traitlist,o=a.geology,l=Ns("terraform");t.stats.terraform++,sn(),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)),c.forEach((function(e){ns.hasOwnProperty(e)&&Pn(`atmo_${e}`)})),void 0===t.tech.world_control&&Pn("cult_of_personality");let _=0;Object.keys(t.city.geology).forEach((function(e){t.city.geology[e]>0&&_++})),_>=4&&Pn("miners_dream"),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&Pn("gross"),Cn();let d=!!t.race.hasOwnProperty("srace")&&t.race.srace,p=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0;t.race={species:"protoplasm",gods:r,old_gods:i,universe:t.race.universe,seeded:!1,seed:Math.floor(g(1e4)),ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended,rejuvenated:!0},p>0&&(t.race.corruption=p),d&&(t.race.srace=d),U({orbit:s,biome:n,ptrait:c,geology:o}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}(p)}},reset(){p.traitlist=[],Object.keys(p.geology).forEach((function(e){p.geology[e]=0})),p.pts=Xt(p)},less(e){p.geology[e]-=b(),p.geology[e]<-20&&(p.geology[e]=-20)},more(e){p.geology[e]+=b();let a=30;t.stats.achieve.whitehole&&(a+=5*t.stats.achieve.whitehole.l),"eden"===p.biome&&(a+=5),p.geology[e]>a&&(p.geology[e]=a)}},filters:{res:e=>p.geology[e]}})}function Xt(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 i=0;return Object.keys(e.geology).forEach((function(t){0!==e.geology[t]&&(r-=e.geology[t],i++)})),i>3&&(r-=(i-3)**2),r}const Yt={unemployed:function(e){let a=F("job_unemployed_desc");return"unemployed"!==t.civic.d_job||e||(a=a+" "+F("job_default",[F("job_unemployed")])),a},hunter:function(e){let a=F("job_hunter_desc",[t.resource.Food.name]);return t.race.unfathomable&&(a=F("job_eld_hunter_desc")),t.race.artifical?a=t.race.soul_eater?F("job_art_demon_hunter_desc",[t.resource.Furs.name,t.resource.Lumber.name]):F("job_art_hunter_desc",[t.resource.Furs.name]):t.race.soul_eater&&"wendigo"!==t.race.species&&(a=F(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+" "+F("job_default",[t.race.unfathomable?F("job_raider"):F("job_hunter")])),a},forager:function(e){let a=F("job_forager_desc");return"forager"!==t.civic.d_job||e||(a=a+" "+F("job_default",[F("job_forager")])),a},farmer:function(e){let a=+sa(!0,e).toFixed(2),r=+sa(!1,e).toFixed(2);e||(a=+ta(a,"farmer").toFixed(2),r=+ta(r,"farmer").toFixed(2));let i=t.race.high_pop&&!e?F("job_farmer_desc_hp",[a,t.resource.Food.name,aa(1),r,aa(1)*t.city.farm.count]):F("job_farmer_desc",[a,t.resource.Food.name,t.city.farm.count,r]);return"farmer"!==t.civic.d_job||e||(i=i+" "+F("job_default",[F("job_farmer")])),i},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=+ta(a,"lumberjack").toFixed(2),r=+ta(r,"lumberjack").toFixed(2)),!t.race.evil||t.race.soul_eater&&"wendigo"!==t.race.species){let i=1+(t.tech.axe&&t.tech.axe>0?.35*(t.tech.axe-1):0);e||(i*=Gi(a,"lumberjack")),"forest"===t.city.biome&&(r*=ss.forest.vars()[0]),"savanna"===t.city.biome&&(r*=ss.savanna.vars()[2]),"desert"===t.city.biome&&(r*=ss.desert.vars()[2]),"swamp"===t.city.biome&&(r*=ss.swamp.vars()[2]),"taiga"===t.city.biome&&(r*=ss.taiga.vars()[0]);let s=F("job_lumberjack_desc",[+(r*i).toFixed(2),t.resource.Lumber.name]);return"lumberjack"!==t.civic.d_job||e||(s=s+" "+F("job_default",[F("job_lumberjack")])),s}{let i=1;e||(i*=Gi(a,"lumberjack"));let s=+(r*i).toFixed(2),n=+(r/4*i).toFixed(2),c="wendigo"===t.race.species?F("job_reclaimer_desc2",[s]):F("job_reclaimer_desc",[s,n]);return"lumberjack"!==t.civic.d_job||e||(c=c+" "+F("job_default",[F("job_reclaimer")])),c}},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=+ta(a,"quarry_worker").toFixed(2),r=+ta(r,"quarry_worker").toFixed(2));let i=1+(t.tech.hammer&&t.tech.hammer>0?.4*t.tech.hammer:0);e||(i*=Gi(a,"miner")),"desert"===t.city.biome&&(i*=ss.desert.vars()[0]),"swamp"===t.city.biome&&(i*=ss.swamp.vars()[3]),t.tech.explosives&&t.tech.explosives>=2&&(i*=t.tech.explosives>=3?1.75:1.5);let s=+(r*i).toFixed(1),n=t.resource.Aluminium.display?F("job_quarry_worker_desc2",[s,t.resource.Stone.name,t.resource.Aluminium.name]):F("job_quarry_worker_desc1",[s,t.resource.Stone.name]);return t.race.smoldering&&(n=n+" "+F("job_quarry_worker_smoldering",[t.resource.Chrysotile.name])),"quarry_worker"!==t.civic.d_job||e||(n=n+" "+F("job_default",[F("job_quarry_worker")])),n},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,i=1;e||(a=+ta(a,"crystal_miner").toFixed(2),r=+ta(r,"crystal_miner").toFixed(2),i*=Gi(a,"miner"));let s=F("job_crystal_miner_desc",[+(r*i).toFixed(2),t.resource.Crystal.name]);return"crystal_miner"!==t.civic.d_job||e||(s=s+" "+F("job_default",[F("job_crystal_miner")])),s},scavenger:function(e){let a=Ki.scavenger.vars()[0];t.city.ptrait.includes("trashed")&&t.race.scavenger&&(a*=1+Ki.scavenger.vars()[1]/100),t.race.high_pop&&!e&&(a*=Ki.high_pop.vars()[1]/100),e||(a=+ta(a,"scavenger").toFixed(2));let r=F("job_scavenger_desc",[Di[t.race.species].home,a]);return"scavenger"!==t.civic.d_job||e||(r=r+" "+F("job_default",[F("job_scavenger")])),r},torturer:function(){return F("job_torturer_desc")},miner:function(){return t.tech.mining>=3?t.race.sappy&&t.tech.alumina?F("job_miner_desc2_amber"):F("job_miner_desc2"):F("job_miner_desc1")},coal_miner:function(){return t.tech.uranium?F("job_coal_miner_desc2"):F("job_coal_miner_desc1")},craftsman:function(){return F("job_craftsman_desc")},cement_worker:function(){let e=t.race.high_pop?3/Ki.high_pop.vars()[0]:3;"ashland"===t.city.biome&&(e*=ss.ashland.vars()[1]),e=+ta(e,"cement_worker").toFixed(2);let a=+ta(t.civic.cement_worker.impact,"cement_worker").toFixed(2)*(t.tech.cement>=4?1.2:1)*Gi(t.civic.cement_worker.workers,"factory");return"ashland"===t.city.biome&&(a*=ss.ashland.vars()[1]),a=+a.toFixed(2),t.race.sappy?F("job_cement_worker_amber_desc",[a]):F("job_cement_worker_desc",[a,e])},banker:function(){let e=100*+ta(t.civic.banker.impact,"banker").toFixed(2);return t.tech.banking>=10&&(e+=2*t.tech.stock_exchange),t.race.truthful&&(e*=1-Ki.truthful.vars()[0]/100),"republic"===t.civic.govern.type&&(e*=1.25),t.race.high_pop&&(e*=Ki.high_pop.vars()[1]/100),e=+e.toFixed(0),F("job_banker_desc",[e])},entertainer:function(){let e=t.tech.theatre;t.race.musical&&(e+=Ki.musical.vars()[0]),t.race.emotionless&&(e*=1-Ki.emotionless.vars()[0]/100),t.race.high_pop&&(e*=Ki.high_pop.vars()[1]/100),e=+ta(e,"entertainer").toFixed(2);let a=t.race.high_pop?Ki.high_pop.vars()[1]/100:1;return a=+ta(a,"entertainer").toFixed(2),t.tech.superstar?F("job_entertainer_desc2",[e,a]):F("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?F("job_priest_desc2"):F("job_priest_desc"),t.tech.cleric&&(e+=` ${F("job_priest_desc3")}`),e},professor:function(){let e=+ta(1,"professor"),a=+(t.race.studious?t.civic.professor.impact+Ki.studious.vars()[0]:t.civic.professor.impact),r=as("elven");return r>0&&(a+=Ki.studious.vars(1)[0]*r),e*=a,e*=t.race.pompous?1-Ki.pompous.vars()[0]/100:1,e*=Gi(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),F("job_professor_desc",[e])},scientist:function(){let e=+ta(t.civic.scientist.impact,"scientist").toFixed(2);return e*=Gi(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?F("job_wizard_desc",[e,+(.025*Ts("magic")).toFixed(4)]):F("job_scientist_desc",[e])},colonist:()=>F(t.race.truepath?"job_colonist_desc_tp":"job_colonist_desc",[Vt().red]),titan_colonist:()=>F("job_colonist_desc_tp",[Vt().titan]),space_miner:()=>F("job_space_miner_desc"),hell_surveyor:()=>F("job_hell_surveyor_desc"),archaeologist(){let e=75*(s.arcology||0),a=(we(t.portal.guard_post.on,"hellArmy",0)+e)/5e3;a=a>1?1:a;let r=25e4;return t.race.high_pop&&(r*=Ki.high_pop.vars()[1]/100),F("job_archaeologist_desc",[Math.round(r*a).toLocaleString()])},pit_miner:()=>F("job_pit_miner_desc",[F("tau_planet",[Di[t.race.species].home])]),crew:()=>F("job_crew_desc")};function ea(e){e||$("#civics").append($(`

                ${F("civics_jobs")}

                `)),ia("unemployed",e,0,0,"warning"),ia("hunter",e,0,0),ia("forager",e,0,0),ia("farmer",e,.82,5),ia("lumberjack",e,1,5),ia("quarry_worker",e,1,5),ia("crystal_miner",e,.1,5),ia("scavenger",e,.12,5),ia("torturer",e,1,3,"advanced"),ia("miner",e,1,4,"advanced"),ia("coal_miner",e,.2,4,"advanced"),ia("craftsman",e,1,5,"advanced"),ia("cement_worker",e,.4,5,"advanced"),ia("entertainer",e,1,10,"advanced"),ia("priest",e,1,3,"advanced"),ia("professor",e,.5,6,"advanced"),ia("scientist",e,1,5,"advanced"),ia("banker",e,.1,6,"advanced"),ia("colonist",e,1,5,"advanced"),ia("titan_colonist",e,1,5,"advanced"),ia("space_miner",e,1,5,"advanced"),ia("hell_surveyor",e,1,1,"advanced"),ia("archaeologist",e,1,1,"advanced"),ia("pit_miner",e,1,4.5,"advanced"),ia("crew",e,1,4,"alert"),e||t.race.start_cataclysm||(na(),t.race.servants&&function(){if(Cs($("#servants")),t.race.servants){var e=$(`

                ${F("civics_servants")}

                {{ s.used }} / {{ s.max }}
                `);$("#servants").append(e),["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].forEach((function(e){ia(e,"servant")})),zs({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`),_=c?$('
                '):$(`
                `);if(n&&"unemployed"!==e){let t=$(`

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

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

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

                {{ sjob.${e} }}
                `):$(``);l.append(t)}if(l.append(_),$(c?"#servants":"#jobs").append(l),"crew"!==e){var d=$(`«`),p=$(`»`);_.append(d),_.append(p)}zs(c?{el:`#${o}`,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:`#${o}`,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=Js(3,14);if(0===a&&e.length>0)return e}return a},adjust:(e,t)=>"titan_colonist"===t&&s.ai_colonist?e+aa(s.ai_colonist):e}}),_s(o,(function(){return Yt[e](c)}),{elm:`#${o} .job_label`,classes:"has-background-light has-text-dark"})}}function sa(e,a){let r=t.civic.farmer.impact;return e&&(r+=t.tech.agriculture&&t.tech.agriculture>=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?ss.grassland.vars()[0]:1,r*="savanna"===t.city.biome?ss.savanna.vars()[0]:1,r*="ashland"===t.city.biome?ss.ashland.vars()[0]:1,r*="volcanic"===t.city.biome?ss.volcanic.vars()[0]:1,r*="hellscape"===t.city.biome?ss.hellscape.vars()[0]:1,r*=t.city.ptrait.includes("trashed")?ns.trashed.vars()[0]:1,a||(r*=Gi(t.civic.farmer.workers,"farmer")),r*=t.tech.agriculture>=7?1.1:1,r*=t.race.low_light?1-Ki.low_light.vars()[0]/100:1,a&&(r*=aa(1)),r}function na(e){if(Cs($(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 }}",i=$(`

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

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

                ${r}

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

                ${r}

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

                ${r}

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

                ${F("tab_portal")}

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

                ${r}

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

                ${r}

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

                ${r}

                ${i}
                `);_s(a,(function(){return"string"==typeof ca[a].info.desc?ca[a].info.desc:ca[a].info.desc()}),{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),"prtl_fortress"===a&&ga(e,!0),Object.keys(ca[a]).forEach((function(e){"info"!==e&&Lt(ca,a,e)&&Xr(ca[a][e],"portal",e)}))}}))}function ma(e){switch(e){case"hostiles":return t.portal.fortress.threat>=2e3?`${F("fortress_threat",[t.portal.fortress.threat])} ${F("fortress_threat_high")}`:t.portal.fortress.threat<1e3?`${F("fortress_threat",[t.portal.fortress.threat])} ${F("fortress_threat_low")}`:`${F("fortress_threat",[t.portal.fortress.threat])} ${F("fortress_threat_medium")}`;case"threatLevel":{let e=t.portal.fortress.threat;return e<1e3?`${F("fortress_threat_level")} ${F("fortress_threat_level1")}`:e<1500?`${F("fortress_threat_level")} ${F("fortress_threat_level2")}`:e>=5e3?`${F("fortress_threat_level")} ${F("fortress_threat_level6")}`:e>=3e3?`${F("fortress_threat_level")} ${F("fortress_threat_level5")}`:e>=2e3?`${F("fortress_threat_level")} ${F("fortress_threat_level4")}`:`${F("fortress_threat_level")} ${F("fortress_threat_level3")}`}case"hireLabel":return F("civics_garrison_hire_mercenary_cost",[Math.round(pe("m_cost")).toLocaleString()])}}function ga(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",i=a?$(`
                `):$("#gFort");a?e.append(i):(i.length>0?Cs(i):(i=$(`
                `),e.append(i)),i.append(`

                ${F("portal_fortress_name")}

                `));let n=$("
                ");i.append(n);let c=$(`${F("fortress_defense")} {{ f.garrison | defensive }}`);n.append(c);let o=$(`${F("fortress_spotted")} {{ f.threat }}`);n.append(o);let l=$('{{ f.threat | threat }}');n.append(l);let _=$("
                ");i.append(_),_.append($(`${F("fortress_wall")} {{ f.walls }}%`));let d=$("
                ");i.append(d),d.append($(`${F("fortress_army")}`)),d.append($('«')),d.append($('{{ f.garrison | patrolling }}')),d.append($('»')),d.append($(`${F("fortress_patrol")}`)),d.append($('«')),d.append($('{{ f.patrols }}')),d.append($('»')),d.append($(`${F("fortress_patrol_size")}`)),d.append($('«')),d.append($('{{ f.patrol_size }}')),d.append($('»')),d.append($(``));let p="light"===t.settings.theme?' type="is-light"':' type="is-dark"',u=$("
                ");d.append(u),u.append($(`${F("fortress_patrol_reports")}`)),u.append($(`${F("fortress_surv_reports")}`)),u.append($(`${F("fortress_nocrew")}`)),a&&i.append($(`
                ${F("civics_garrison_training")} - ${F("arpa_to_complete")} {{ g.rate, g.progress | trainTime }} {{ g.progress }}%
                `)),zs({el:`#${r}`,data:{f:t.portal.fortress,g:t.civic.garrison,s:t.settings},methods:{defense:()=>F("fortress_defense"),hostiles:()=>ma("hostiles"),threatLevel:()=>ma("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,zs({el:"#garrison"},"update"))},aLast(){let e=b(),a=t.portal.fortress.patrols*t.portal.fortress.patrol_size;s.soul_forge&&(a+=pa()),t.portal.hasOwnProperty("guard_post")&&(a+=aa(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,zs({el:"#garrison"},"update")):a=!1,e--}},hireLabel:()=>ma("hireLabel"),observation(){t.settings.civTabs=$("#mainTabs > nav ul li").length-1,t.settings.tabLoad||ja()}},filters:{defensive:e=>function(e){let a=e-t.portal.fortress.patrols*t.portal.fortress.patrol_size;if(s.soul_forge){let e=pa();e<=a&&(a-=e)}t.portal.hasOwnProperty("guard_post")&&(a-=aa(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)),s.war_droid){let e=s.war_droid-t.portal.fortress.patrols>0?s.war_droid-t.portal.fortress.patrols:0;a+=t.tech.hdroid?aa(2*e):aa(e)}let i=t.tech.turret?t.tech.turret>=2?70:50:35;return Math.round(we(a,"hellArmy",r))+(s.turret?s.turret*i:0)}(e),patrolling(e){let a=e-t.portal.fortress.patrols*t.portal.fortress.patrol_size;if(s.soul_forge){let e=pa();e<=a&&(a-=e)}return t.portal.hasOwnProperty("guard_post")&&(a-=aa(t.portal.guard_post.on)),a},threat:e=>F(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)=>Fs(0===e?-1:(100-t)/(4*e))}}),["hostiles","threatLevel","armyLabel","patLabel","patSizeLabel","hireLabel"].forEach((function(e){_s(`hf${r}${e}`,(function(){switch(e){case"hostiles":case"threatLevel":return ma("hostiles");case"armyLabel":return F("fortress_stationed");case"patLabel":return F("fortress_patrol_desc",[t.portal.fortress.patrols]);case"patSizeLabel":return F("fortress_patrol_size_desc",[t.portal.fortress.patrol_size]);case"hireLabel":return ma("hireLabel")}}),{elm:`#${r} span.${e}`})})),_s(`hf${r}observe`,(function(){return F("hell_observation_tooltip")}),{elm:`#${r} button.observe`})}function va(e,a){switch(e){case"ruins":{let e=a||aa(s.guard_post),r=75*(s.arcology||0),i=we(e,"hellArmy",0);t.race.holy&&(i*=1+Ki.holy.vars()[1]/100);let n=as("unicorn");n>0&&(i*=1+Ki.holy.vars(1)[1]/100*n);let c=(i+r)/5e3;return{supress:c>1?1:c,rating:i+r}}case"gate":{let e=va("ruins",a),r=100*(s.gate_turret||0);t.race.holy&&(r*=1+Ki.holy.vars()[1]/100);let i=as("unicorn");i>0&&(r*=1+Ki.holy.vars(1)[1]/100*i);let n=(e.rating+r)/7500;return{supress:n>1?1:n,rating:e.rating+r}}default:return 0}}const fa={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 ya(e,a){let r=9999,i=1e7;switch(e){case"small":{let e=t.blood.prepared&&t.blood.prepared>=2?5e4:75e3;i=a?2.5*e:e,r=a?20:1}break;case"medium":i=a?45e4:18e4,r=a?100:4;break;case"large":i=a?925e3:375e3,r=a?500:20;break;case"titan":i=a?15e5:75e4,r=a?1500:75;break;case"collector":{let e=t.blood.prepared&&t.blood.prepared>=2?8e3:1e4;i=a?2.5*e:e,r=1}}return{s:r,c:i}}function ba(){if((t.settings.tabLoad||2===t.settings.civTabs&&4===t.settings.govTabs)&&(Cs($("#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=$(`
                ${F("portal_mech_assembly")} - {{ b.size | slabel }} {{ b.chassis | clabel }}
                `);a.append(r),r.append(` | ${F("portal_mech_bay_space")}: {{ m.bay }} / {{ m.max }}`),r.append(` | ${F("portal_mech_sup_avail")}: {{ p.supply | round }} / {{ p.sup_max }}`);let i=t.blood.prepared&&t.blood.prepared>=3?`${F("portal_mech_infernal")} (${F("portal_mech_infernal_effect",[25])})`:"";a.append(`
                ${F("portal_mech_space")} {{ b.size | bay }} | ${F("portal_mech_cost")} {{ b.size | price }} | ${F("portal_mech_soul",[t.resource.Soul_Gem.name])} {{ b.size | soul }}${i}
                `),a.append("
                {{ b.size | desc }}
                ");let s=$('
                ');a.append(s);let n="";["small","medium","large","titan","collector"].forEach((function(e,t){n+=`${F(`portal_mech_size_${e}`)}`})),s.append(`\n ${n}\n `);let c="";["wheel","tread","biped","quad","spider","hover"].forEach((function(e,t){c+=`${F(`portal_mech_chassis_${e}`)}`})),s.append(`\n ${c}\n `);for(let e=0;e<4;e++){let t="";["laser","kinetic","shotgun","missile","flame","plasma","sonic","tesla"].forEach((function(a,r){t+=`${F(`portal_mech_weapon_${a}`)}`})),s.append(`\n ${t}\n `)}let o=t.blood.prepared?5:4;for(let e=0;e{{ '${a}' | equipment }}`})),s.append(`\n ${t}\n `)}a.append(`
                `),zs({el:"#mechAssembly",data:{p:t.portal.purifier,m:t.portal.mechbay,b:t.portal.mechbay.blueprint},methods:{build(){let e=ya(t.portal.mechbay.blueprint.size,t.portal.mechbay.blueprint.infernal),a=e.c,r=e.s,i=wa(t.portal.mechbay.blueprint.size),s=t.portal.mechbay.max-t.portal.mechbay.bay;if(t.portal.purifier.supply>=a&&s>=i&&t.resource.Soul_Gem.amount>=r){t.portal.purifier.supply-=a,t.resource.Soul_Gem.amount-=r;let e=nn(t.portal.mechbay.blueprint);t.portal.mechbay.mechs.push(e),t.portal.mechbay.bay+=i,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,zs({el:"#mechAssembly"},"update")},setEquip(e,a){t.portal.mechbay.blueprint.equip[a]=e,zs({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=>wa(e),price:e=>ya(e,t.portal.mechbay.blueprint.infernal).c,soul:e=>ya(e,t.portal.mechbay.blueprint.infernal).s,slabel:e=>F(`portal_mech_size_${e}`),clabel:e=>F(`portal_mech_chassis_${e}`),wlabel:e=>F(`portal_mech_weapon_${e}`),desc:e=>F(`portal_mech_size_${e}_desc`),round:e=>Math.round(e),equipment(e){if("special"!==e)return F(`portal_mech_equip_${e}`);let a="jumpjet";switch(t.portal.mechbay.blueprint.size){case"large":a="battery";break;case"titan":a="target"}return F(`portal_mech_equip_${a}`)}}}),["size","chassis","weapon","equip"].forEach((function(e){let a=1;"weapon"===e?a=4:"equip"===e&&(a=o);for(let r=0;r');e.append(l),ka(),Cs($("#mechList")),$("#mechList").append(`\n
                \n ${F("portal_mech_scrap")}\n | ${F("portal_mech")} #{{index + 1}}: \n {{ mech.infernal ? "${F("portal_mech_infernal")} " : "" }}{{ mech | size }} {{ mech | chassis }}\n
                \n
                \n \n
                \n
                \n \n
                \n
                \n
                `),zs({el:"#mechList",data:t.portal.mechbay,methods:{scrap(e){if(t.portal.mechbay.mechs[e]){let a=ya(t.portal.mechbay.mechs[e].size,t.portal.mechbay.mechs[e].infernal),r=wa(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 F(`portal_mech_equip_${e}`);let a="jumpjet";switch(t){case"large":a="battery";break;case"titan":a="target"}return F(`portal_mech_equip_${a}`)},weapon:e=>F(`portal_mech_weapon_${e}`),size:e=>F(`portal_mech_size_${e.size}`),chassis:e=>F(`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]),$a()}})}(),$("#mechList .scrap").each((function(e,a){_s(`mechList-scrap${e}`,(function(){let a=ya(t.portal.mechbay.mechs[e].size,t.portal.mechbay.mechs[e].infernal);return F("portal_mech_scrap_refund",[Math.floor(a.c/3),Math.floor(a.s/2)])}),{elm:a})}))}}function wa(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 ka(){let e=$("#mechList")[0];if(e){let t=Sortable.get(e);t&&t.destroy()}}function $a(){let e=25*(l.mechbay||0),a=0,r=0,i=0;for(let s of t.portal.mechbay.mechs)a+=wa(s.size),a<=e&&(r++,"small"===s.size&&i++);t.portal.mechbay.bay=a,t.portal.mechbay.max=e,t.portal.mechbay.active=r,t.portal.mechbay.scouts=i}function xa(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 qa(e,a){let r=a||t.portal.spire.type,i=1;switch(e.chassis){case"wheel":switch(r){case"sand":i=["small","medium"].includes(e.size)?.9:.85;break;case"swamp":i=["small","medium"].includes(e.size)?.35:.18;break;case"jungle":i=["small","medium"].includes(e.size)?.92:.85;break;case"rocky":i=["small","medium"].includes(e.size)?.65:.5;break;case"gravel":i=["small","medium"].includes(e.size)?1:.95;break;case"muddy":i=["small","medium"].includes(e.size)?.85:.58;break;case"grass":i=["small","medium"].includes(e.size)?1.3:1.2;break;case"brush":i=["small","medium"].includes(e.size)?.9:.8;break;case"concrete":i=["small","medium"].includes(e.size)?1.1:1}break;case"tread":switch(r){case"sand":i=["small","medium"].includes(e.size)?1.15:1.1;break;case"swamp":i=["small","medium"].includes(e.size)?.55:.4;break;case"forest":i=["small","medium"].includes(e.size)?1:.95;break;case"jungle":i=["small","medium"].includes(e.size)?.95:.9;break;case"rocky":i=["small","medium"].includes(e.size)?.65:.5;break;case"gravel":i=["small","medium"].includes(e.size)?1.3:1.2;break;case"muddy":i=["small","medium"].includes(e.size)?.88:.72}break;case"biped":switch(r){case"sand":i=["small","medium"].includes(e.size)?.78:.65;break;case"swamp":i=["small","medium"].includes(e.size)?.68:.5;break;case"forest":i=["small","medium"].includes(e.size)?1:.95;break;case"jungle":i=["small","medium"].includes(e.size)?.82:.7;break;case"rocky":i=["small","medium"].includes(e.size)?.48:.4;break;case"muddy":i=["small","medium"].includes(e.size)?.85:.7;break;case"grass":i=["small","medium"].includes(e.size)?1.25:1.2;break;case"brush":i=["small","medium"].includes(e.size)?.92:.85}break;case"quad":switch(r){case"sand":i=["small","medium"].includes(e.size)?.86:.75;break;case"swamp":i=["small","medium"].includes(e.size)?.58:.42;break;case"forest":i=["small","medium"].includes(e.size)?1.25:1.2;break;case"rocky":case"brush":i=["small","medium"].includes(e.size)?.95:.9;break;case"gravel":i=["small","medium"].includes(e.size)?.9:.8;break;case"muddy":i=["small","medium"].includes(e.size)?.68:.5;break;case"grass":i=["small","medium"].includes(e.size)?1:.95}break;case"spider":switch(r){case"sand":i=["small","medium"].includes(e.size)?.75:.65;break;case"swamp":i=["small","medium"].includes(e.size)?.9:.78;break;case"forest":i=["small","medium"].includes(e.size)?.82:.75;break;case"jungle":i=["small","medium"].includes(e.size)?.77:.65;break;case"rocky":i=["small","medium"].includes(e.size)?1.25:1.2;break;case"gravel":i=["small","medium"].includes(e.size)?.86:.75;break;case"muddy":i=["small","medium"].includes(e.size)?.92:.82;break;case"brush":i=["small","medium"].includes(e.size)?1:.95}break;case"hover":switch(r){case"swamp":i=["small","medium"].includes(e.size)?1.35:1.2;break;case"forest":i=["small","medium"].includes(e.size)?.65:.48;break;case"jungle":i=["small","medium"].includes(e.size)?.55:.35;break;case"rocky":i=["small","medium"].includes(e.size)?.82:.68;break;case"muddy":i=["small","medium"].includes(e.size)?1.15:1.08;break;case"brush":i=["small","medium"].includes(e.size)?.78:.7}}return i}function Pa(e){switch(e){case"small":return.0025;case"medium":return.0075;case"large":return.01;case"titan":return.012;default:return 0}}function ja(e){if(!t.settings.tabLoad&&t.settings.civTabs!==$("#mainTabs > nav ul li").length-1&&!e)return;let a=$("#mTabObserve");Cs(a);let r=$('
                ');if(a.append(r),r.append(`\n \n \n \n \n \n \n `),zs({el:"#hellObservations",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(Cs($("#h_Report")),Cs($("#h_Analysis")),e){case 0:Sa();break;case 1:Oa()}return e}}}),t.settings.tabLoad)Sa(),Oa();else switch(t.settings.hellTabs){case 0:Sa();break;case 1:Oa()}}function Oa(){if(!t.settings.tabLoad&&1!==t.settings.hellTabs)return;let e=$("#h_Analysis"),a=$('
                ');e.append(a);let r=$("
                ");a.append(r);let i=$('
                ');a.append(i);let s=$('
                ');i.append(s);let n=$('
                '),c=$('
                ');s.append(n),s.append(c),r.append(`\n
                \n

                ${F("tab_settings")}

                \n
                \n
                \n ${F("hell_analysis_expanded")}\n ${F("hell_analysis_average")}\n ${F("hell_analysis_hyperSlow")}\n
                \n
                \n ${F("hell_analysis_time_game_days")}\n ${F("hell_analysis_time_seconds")}\n ${F("hell_analysis_time_minutes")}\n ${F("hell_analysis_time_hours")}\n ${F("hell_analysis_time_days")}\n
                \n `),zs({el:"#hellAnalysis",data:{s:t.portal.observe.settings,r:t.race}});let o=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+Ki.slow.vars()[0]/100),t.race.hyper&&(a*=1-Ki.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?o(e,5):q(e,5,!0)}return F("hell_analysis_time_average",[e,F(`hell_analysis_time_${r}_abbr`)])},_=function(e,a){if(!e)return;let r=$(`#${e}`);Cs(r),r.append(`\n

                ${F("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 `),zs({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,i)=>F("hell_analysis_number_display",i?[F(`hell_analysis_${r}`),l(e,t.portal.observe.stats[a].days,t.portal.observe.settings.display)]:[F(`hell_analysis_${r}`),t.portal.observe.settings.expanded?(+e.toFixed(5)).toLocaleString():q(e,5,!0)]),genericSub:(e,r,i)=>i?"ᄂ"+F("hell_analysis_number_display",[F(`hell_analysis_${r}`),l(e,t.portal.observe.stats[a].days,t.portal.observe.settings.display)]):"ᄂ"+F("hell_analysis_number_display",[F(`hell_analysis_${r}`),t.portal.observe.settings.expanded?(+e.toFixed(5)).toLocaleString():q(e,5,!0)]),genericMulti(e,r,i){let s=0;return Object.keys(e).forEach((function(t){s+=e[t]})),F("hell_analysis_number_display",i?[F(`hell_analysis_${r}`),l(s,t.portal.observe.stats[a].days,t.portal.observe.settings.display)]:[F(`hell_analysis_${r}`),t.portal.observe.settings.expanded?(+s.toFixed(5)).toLocaleString():q(s,5,!0)])},time(e,a){switch("game_days"!==a&&t.portal.observe.settings.hyperSlow&&(t.race.slow&&(e*=1+Ki.slow.vars()[0]/100),t.race.hyper&&(e*=1-Ki.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 F("hell_analysis_time",[F(`hell_analysis_time_${a}`),t.portal.observe.settings.expanded?o(e,8):q(e,5,!0)])},resetLabel:()=>F("hell_analysis_period_reset"),startLabel:e=>F("hell_analysis_start",[e.year,e.day]),dropdownLabel:e=>e?"⮝":"⮟"}})};_("hellAnalysisTotal","total"),_("hellAnalysisPeriod","period"),a=$("#hellAnalysis");let d=$("
                ");a.append(d),d.append(`

                ${F("hell_graph_create")}

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

                ${F("hell_graph_title")}

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

                ${F("hell_graph_name")}

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

                ${F("hell_graph_type")}

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

                ${F("hell_graph_data")}

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

                {{ e.message }}

                \n
                \n
                \n \n
                \n
                \n `),zs({el:"#specialModal",data:{s:i,e:s,sg:t.resource.Soul_Gem},methods:{nameUpdate(e){i.chartName!==e&&(s.show=!1,i.chartName=e)},dataOptions(e){switch(e){case"pie":i.showGroups=!0;break;case"bar":i.showGroups=!1}},setData(e,t){s.show=!1,i.data=[e,t]},createGraph(){if(!i.name)return s.show=!0,void(s.message=F("hell_graph_error_name_blank"));if(0===i.data.length)return s.show=!0,void(s.message=F("hell_graph_error_data_missing"));let e=[],a=[];"pie"===i.chartType&&Object.keys(t.portal.observe.stats[i.data[0]][i.data[1]]).forEach((function(t){e.push(F(`hell_analysis_${i.data[1]}_${t}`)),a.push([i.data[0],i.data[1],t])}));let r=function(e,a,r,i,s){let n=`hellGraph-${t.portal.observe.graphID}`;return t.portal.observe.graphID++,t.portal.observe.graphs[n]={id:n,chartID:`${n}-chart`,name:e,type:a,labels:r,data:i,settings:s},n}(i.chartName,i.chartType,e,a,{title:i.chartName});Ma(p,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){Ma(p,t.portal.observe.graphs[e])}))}function Ma(e,a){let r=a.id;u[r]&&u[r].graph.destroy();let i=$(`
                `);e.append(i),i.append(`
                \n
                \n

                \n

                Delete

                \n
                \n
                \n

                ${a.name}

                \n
                \n
                `);let s=$('
                ');i.append(s),zs({el:`#graph-${r}-controls`,methods:{deleteGraph(){u[r].graph.destroy(),delete u[r],delete t.portal.observe.graphs[r],Cs($(`#graph-${r}-container`),!0)}}});let n=$(``);s.append(n),u[r]={data:a.data},"pie"===a.type&&(u[r].graph=function(e,a,r,i){let s=[];return r.forEach((function(e){s.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:s,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}}}})}(n,a.labels,a.data,a.settings))}function Sa(){if(!t.settings.tabLoad&&0!==t.settings.hellTabs)return;Ca();let e="",a=$("#h_Report"),r=$('
                ');a.append(r);let i=$('
                ');r.append(i),i.append(`

                ${F("hell_report_log")}

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

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

                `),s.append(`
                \n

                ${F("hell_report_log_stats_kills",[n])}

                \n

                ${F("hell_report_log_stats_gems",[c])}

                \n

                ${F("hell_report_log_stats_wounded",[i.stats.wounded])}

                \n

                ${F("hell_report_log_stats_died",[i.stats.died])}

                \n
                `),r.append(`

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

                `),r.append(`

                ${F("hell_report_log_start",[i.start])}

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

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

                `):r.append(`

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

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

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

                ${F("hell_report_log_encounter_fail",[s])}

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

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

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

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

                ${F("hell_report_log_patrols_lost",[i.patrols_lost])}

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

                ${F("hell_report_log_siege",[i.siege.surveyors,i.siege.soldiers,i.siege.kills])}

                `):r.append(`

                ${F("hell_report_log_siege_fail",[i.siege.damage,i.siege.kills])}

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

                ${F("hell_report_log_demons",[i.demons])}

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

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

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

                ${F("hell_report_log_soul_attractors",[i.soul_attractors])}

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

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

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

                "),s=i.gate_turrets[e],n=F("hell_report_log_obj_counter",[F("portal_gate_turret_title"),e]);a.append(`${F("hell_report_log_misc_kills",[n,s.kills,F("portal_gate_name")])}`),s.gem&&a.append(`${F("hell_report_log_soul_find",[t.resource.Soul_Gem.name,1])}`),r.append(a)})),zs({el:"#hellReportDisplay",data:{g:t.resource.Soul_Gem}})};if(0!==n.day){c(n.year,n.day);let e=n.year,a=n.day;a-1==0?(e--,a=t.city.calendar.orbit):a--,o(e,a)}else n.year=t.city.calendar.year,n.day=t.city.calendar.day;zs({el:"#hellReportLogTitle",methods:{updateList(){c(n.year,n.day)}}}),_s("hellReportLogs",(function(){return F("hell_report_log_tooltip",[2500])}),{elm:"#hellReport .reportList div:first-child h2"})}function Ca(e){if(!document.getElementById("hellReportList")||e){let e=!1,a=2500,r=(Object.keys(p).length-1)*t.city.calendar.orbit+t.city.calendar.day;if(r>a){let i=Object.keys(p[Object.keys(p)[0]]).length;for(r-t.city.calendar.orbit+i>a&&(e=!0,r-=i,delete p[Object.keys(p)[0]]);r>a;)r-=t.city.calendar.orbit,delete p[Object.keys(p)[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},Fa={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},Aa={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},Ia={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 Ta(){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+Ki.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;Ea.general.add.push({name:F("city_foundry"),manual:t.city.foundry.count*e,auto:t.city.foundry.count*e})}if(t.tech.foundry>=3&&Object.keys(Ea).forEach((function(e){t.city.foundry[e]&&t.city.foundry[e]>1&&Ea[e].add.push({name:F("tech_apprentices"),manual:(t.city.foundry[e]-1)*$e(.03),auto:(t.city.foundry[e]-1)*$e(.03)})})),t.tech.foundry>=4&&t.city.sawmill&&Ea.Plywood.add.push({name:F("city_sawmill"),manual:.02*t.city.sawmill.count,auto:.02*t.city.sawmill.count}),t.tech.foundry>=6&&Ea.Brick.add.push({name:F("city_foundry"),manual:.02*t.city.foundry.count,auto:.02*t.city.foundry.count}),t.tech.foundry>=7&&(Ea.general.add.push({name:F("city_factory")+` (${F("tab_city5")})`,manual:.05*s.factory,auto:.05*s.factory}),t.tech.mars>=4&&Ea.general.add.push({name:F("city_factory")+` (${F("tab_space")})`,manual:.05*s.red_factory,auto:.05*s.red_factory}),t.interstellar.int_factory&&s.int_factory&&Ea.general.add.push({name:F("interstellar_int_factory_title"),manual:.1*s.int_factory,auto:.1*s.int_factory})),t.space.fabrication&&n.fabrication&&Ea.general.add.push({name:F("space_red_fabrication_title"),manual:n.fabrication*t.civic.colonist.workers*$e(e?.05:.02),auto:n.fabrication*t.civic.colonist.workers*$e(e?.05:.02)}),s.stellar_forge&&(Ea.Mythril.add.push({name:F("interstellar_stellar_forge_title"),manual:.05*s.stellar_forge,auto:.05*s.stellar_forge}),Ea.general.add.push({name:F("interstellar_stellar_forge_title"),manual:0,auto:.1*s.stellar_forge})),s.hell_forge){let e=va("ruins");Ea.general.add.push({name:F("portal_hell_forge_title"),manual:0,auto:.75*s.hell_forge*e.supress}),Ea.Scarletite.multi.push({name:F("portal_ruins_supressed"),manual:1,auto:e.supress})}if(t.tauceti.tau_factory&&n.tau_factory&&Ea.general.add.push({name:F("tau_home_tau_factory"),manual:0,auto:n.tau_factory*(t.tech.isolation?2.75:.9)}),t.tech.isolation&&t.tauceti.colony&&n.colony&&Ea.general.add.push({name:F("tau_home_colony"),manual:.5*n.colony,auto:.5*n.colony}),n.zero_g_lab&&s.zero_g_lab||n.infectious_disease_lab&&s.infectious_disease_lab){let e=_t("spc_enceladus");Ea.Quantium.multi.push({name:F("space_syndicate"),manual:1,auto:e})}if(t.tech.alien_crafting&&n.infectious_disease_lab&&s.infectious_disease_lab){let e=1+.65*Math.min(n.infectious_disease_lab,s.infectious_disease_lab);Ea.Quantium.multi.push({name:F("tech_infectious_disease_lab_alt"),manual:1,auto:e})}if(t.race.crafty&&Ea.general.add.push({name:F("wiki_arpa_crispr_crafty"),manual:.03,auto:.03}),t.race.ambidextrous&&Ea.general.add.push({name:F("trait_ambidextrous_name"),manual:Ki.ambidextrous.vars()[0]*t.race.ambidextrous/100,auto:Ki.ambidextrous.vars()[0]*t.race.ambidextrous/100}),t.race.rigid&&Ea.general.add.push({name:F("trait_rigid_name"),manual:-Ki.rigid.vars()[0]/100,auto:-Ki.rigid.vars()[0]/100}),"socialist"===t.civic.govern.type&&Ea.general.multi.push({name:F("govern_socialist"),manual:1+ee.socialist()[0]/100,auto:1+ee.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);Ea.general.multi.push({name:F("modal_pylon_casting"),manual:e,auto:a})}"magic"===t.race.universe&&Ea.general.multi.push({name:F("universe_magic"),manual:.8,auto:.8}),t.tech.v_train&&Ea.general.multi.push({name:F("tech_vocational_training"),manual:1,auto:2}),t.genes.crafty&&Ea.general.multi.push({name:F("tab_arpa_crispr")+" "+F("wiki_arpa_crispr_crafty"),manual:1,auto:1+.5*(t.genes.crafty-1)}),t.race.living_tool&&Ea.general.multi.push({name:F("trait_living_tool_name"),manual:1,auto:1+Ki.living_tool.vars()[1]/100}),t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=1&&Ea.general.multi.push({name:F("evo_challenge_orbit_decay"),manual:1,auto:1.1}),t.race.ambidextrous&&Ea.general.multi.push({name:F("trait_ambidextrous_name"),manual:1,auto:1+Ki.ambidextrous.vars()[1]*t.race.ambidextrous/100}),t.blood.artisan&&Ea.general.multi.push({name:F("tab_arpa_blood")+" "+F("arpa_blood_artisan_title"),manual:1,auto:1+t.blood.artisan/100});let a=function(){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=$e(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=$e(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+Ki.spiritual.vars()[0]/100);let r=as("seraph");return r>0&&(a*=1+Ki.spiritual.vars(1)[0]/100*r),"theocracy"===t.civic.govern.type&&(a*=1.12),t.race.ooze&&(a*=1-Ki.ooze.vars()[1]/100),(e?t.space.ziggurat.count:t.city.temple.count)*a}}return 0}();a>0&&Ea.general.multi.push({name:F("faith"),manual:1,auto:1+a/("antimatter"===t.race.universe?1.5:3)}),t.prestige.Plasmid.count>0&&Ea.general.multi.push({name:F("resource_Plasmid_plural_name"),manual:$r()/8+1,auto:$r()/8+1}),t.genes.challenge&&t.genes.challenge>=2&&Ea.general.multi.push({name:F("mastery"),manual:1+Ls()/(t.race.weak_mastery?50:100),auto:1+Ls()/(t.race.weak_mastery?50:100)})}});var Ea;function Ka(e){if(e)switch(e){case"market":pr();break;case"storage":ur();break;case"ejector":mr();break;case"supply":vr();break;case"alchemy":yr()}else pr(),ur(),mr(),vr(),yr()}function Da(e){"market"===e?(Ka("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),Wa(`#market-${e}`,r,e,t,!0)}})),Ga()):"storage"===e?(Ka("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),tr(`#stack-${e}`,r,e,t)}})),Ga()):"ejector"===e?(Ka("ejector"),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let t=a.resource[e].color;Aa[e]&&gr(e,t)}))):"supply"===e?(Ka("supply"),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let t=a.resource[e].color;Ia[e]&&fr(e,t)}))):"alchemy"===e&&(Ka("alchemy"),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let r=a.resource[e].color,i=a.resource[e].tradable;Fa[e]&&"magic"===t.race.universe&&(t.resource[e].basic=i,br(e,r,i))})))}function Ba(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)),Na("RNA",e,a,1,!1),Na("DNA",e,a,1,!1)}Na("Money",e,1e3,1,!1,!1,"success"),Na(t.race.species,e,0,0,!1,!1,"warning"),Na("Slave",e,0,0,!1,!1,"warning"),Na("Mana",e,0,1,!1,!1,"warning"),Na("Energy",e,0,0,!1,!1,"warning"),Na("Sus",e,0,0,!1,!1,"warning"),Na("Knowledge",e,100,1,!1,!1,"warning"),Na("Zen",e,0,0,!1,!1,"warning"),Na("Crates",e,0,0,!1,!1,"warning"),Na("Containers",e,0,0,!1,!1,"warning"),Na("Food",e,250,1,!0,!0),Na("Lumber",e,200,1,!0,!0),Na("Chrysotile",e,200,1,!0,!0),Na("Stone",e,200,1,!0,!0),Na("Crystal",e,200,1,!0,!0),Na("Furs",e,100,1,!0,!0),Na("Copper",e,100,1,!0,!0),Na("Iron",e,100,1,!0,!0),Na("Aluminium",e,50,1,!0,!0),Na("Cement",e,100,1,!0,!0),Na("Coal",e,50,1,!0,!0),Na("Oil",e,0,1,!0,!1),Na("Uranium",e,10,1,!0,!1),Na("Steel",e,50,1,!0,!0),Na("Titanium",e,50,1,!0,!0),Na("Alloy",e,50,1,!0,!0),Na("Polymer",e,50,1,!0,!0),Na("Iridium",e,0,1,!0,!0),Na("Helium_3",e,0,1,!0,!1),Na("Water",e,0,1,!1,!1,"advanced"),Na("Deuterium",e,0,1,!1,!1,"advanced"),Na("Neutronium",e,0,1,!1,!1,"advanced"),Na("Adamantite",e,0,1,!1,!0,"advanced"),Na("Infernite",e,0,1,!1,!1,"advanced"),Na("Elerium",e,1,1,!1,!1,"advanced"),Na("Nano_Tube",e,0,1,!1,!1,"advanced"),Na("Graphene",e,0,1,!1,!0,"advanced"),Na("Stanene",e,0,1,!1,!0,"advanced"),Na("Bolognium",e,0,1,!1,!0,"advanced"),Na("Vitreloy",e,0,1,!1,!0,"advanced"),Na("Orichalcum",e,0,1,!1,!0,"advanced"),Na("Unobtainium",e,0,1,!1,!1,"advanced"),Na("Materials",e,0,1,!1,!1,"advanced"),Na("Horseshoe",e,-2,0,!1,!1,"advanced"),Na("Nanite",e,0,1,!1,!1,"advanced"),Na("Genes",e,-2,0,!1,!1,"advanced"),Na("Soul_Gem",e,-2,0,!1,!1,"advanced"),Na("Plywood",e,-1,0,!1,!1,"danger"),Na("Brick",e,-1,0,!1,!1,"danger"),Na("Wrought_Iron",e,-1,0,!1,!1,"danger"),Na("Sheet_Metal",e,-1,0,!1,!1,"danger"),Na("Mythril",e,-1,0,!1,!1,"danger"),Na("Aerogel",e,-1,0,!1,!1,"danger"),Na("Nanoweave",e,-1,0,!1,!1,"danger"),Na("Scarletite",e,-1,0,!1,!1,"danger"),Na("Quantium",e,-1,0,!1,!1,"danger"),Na("Corrupt_Gem",e,-2,0,!1,!1,"caution"),Na("Codex",e,-2,0,!1,!1,"caution"),Na("Cipher",e,0,1,!1,!1,"caution"),Na("Demonic_Essence",e,-2,0,!1,!1,"caution"),e||(Ha("Blood_Stone","caution"),Ha("Artifact","caution"),Ha("Plasmid"),Ha("AntiPlasmid"),Ha("Phage"),Ha("Dark"),Ha("Harmony"),Ha("AICore"))}function Ga(){"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=$(`
                ${F("resource_market_trade_routes")} / {{ mtrade }}
                `);a.append($(`${F("cancel_all_routes")}`)),$("#market").append(a),zs({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,ir(e))}))}},filters:{tdeCnt(e){let a=Js(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}}}),_s("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($(`

                ${F("galaxy_trade")}

                `)),Ja()),function(){if(t.settings.tabLoad||4===t.settings.civTabs&&1===t.settings.marketTabs){var e=$(`
                ${F("resource_Crates_name")}{{ cr.amount }} / {{ cr.max }}${F("resource_Containers_name")}{{ cn.amount }} / {{ cn.max }}
                `);$("#resStorage").append(e),zs({el:"#crateTotal",data:{cr:t.resource.Crates,cn:t.resource.Containers}})}}())}function Na(e,r,i,s,n,c,o){if(o=o||"info",t.resource[e]||(t.resource[e]={}),Ra(e),t.race.artifical&&"Food"===e&&(c=!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=i),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=s),"Mana"===e&&(t.resource[e].gen=0,t.resource[e].gen_d=0),t.resource[e].stackable=c,t.resource[e].crates||(t.resource[e].crates=0),t.resource[e].containers||(t.resource[e].containers=0),!t.resource[e].trade&&n&&(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 }}
                `),c?l.append($(`+`)):(-1!==i||-1===i&&0===s&&t.race.no_craft||"Scarletite"===e||"Quantium"===e)&&l.append($(""));let _=!1;if(0!==s||-1===i&&0===s&&t.race.no_craft||"Scarletite"===e||"Quantium"===e)l.append($(`{{ diff | diffSize }} /s`));else if(-1!==i||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`)),_=!0}$("#resources").append(l);var d={template:''};if(zs({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&&on("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=Js(7,10);e.length>0&&$("#modalBoxTitle").prepend(e)}if("Stone"===e){let e=Zs(1,12,!1);e.length>0&&$("#modalBoxTitle").prepend(e)}let r=$('
                ');a.append(r),r.append($(`
                ${F("resource_modal_crate_owned")} {{ crates.amount }}/{{ crates.max }}${F("resource_modal_crate_assigned")} {{ res.crates }}
                `));let i=$(``),s=$(``),n=$(``);if(r.append(i),r.append(s),r.append(n),zs({el:"#modalCrates",data:{crates:t.resource.Crates,res:t.resource[e]},methods:{buildCrate(){or()},subCrate(e){Za(e)},addCrate(e){Xa(e)}}}),t.resource.Containers.display){let r=$('
                ');a.append(r),r.append($(`
                ${F("resource_modal_container_owned")} {{ containers.amount }}/{{ containers.max }}${F("resource_modal_container_assigned")} {{ res.containers }}
                `));let i=$(``),s=$(``),n=$(``);r.append(i),r.append(s),r.append(n),zs({el:"#modalContainers",data:{containers:t.resource.Containers,res:t.resource[e]},methods:{buildContainer(){lr()},removeContainer(e){Ya(e)},addContainer(e){er(e)}}})}zs({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){_s(`${e}${t}`,function(e,t){if("modalContainers"===e){let e=dr();switch(t){case"assign":return F("resource_modal_container_assign_desc",[e]);case"unassign":return F("resource_modal_container_unassign_desc",[e]);case"construct":return nr()}}else{let e=_r();switch(t){case"assign":return F("resource_modal_crate_assign_desc",[e]);case"unassign":return F("resource_modal_crate_unassign_desc",[e]);case"construct":return sr()}}}(e,t),{elm:$(`#${e} > .${t}`),attach:"#main"})}))}))}(e))}),50)},showTrigger:()=>t.resource.Crates.display,craft(e,a){if(!t.race.no_craft){let r=La(e,"manual").multiplier,i=Ta(),s=Math.floor(t.resource[i[e][0].r].amount/i[e][0].a);for(let a=1;a${t.resource[i[e][s].r].name} ${n}`}return r}}}),rr(`cnt${e}`,e,"c"),_){let a=[1,5,"A"];for(let r=0;r"),s=e,n=a[r],c=+(100*La(s,"manual").multiplier).toFixed(0);i.append($(`
                ${F("manual_crafting_hover_bonus",[c.toLocaleString(),t.resource[s].name])}
                `));let o=Ta(),l=$(`
                ${F("manual_crafting_hover_craft")}
                `),_=0;if("number"!=typeof n){if(_=t.resource[o[s][0].r].amount/o[s][0].a,o[s].length>1)for(let e=1;e${q(c/100*_,1)} ${t.resource[s].name}`))}else{_=b()*n;let e=q(c/100*_,1);l.append($(`${e} ${t.resource[s].name}`))}let d=$(`
                ${F("manual_crafting_hover_use")}
                `);for(let e=0;e${q(_*o[s][e].a,1)} ${t.resource[o[s][e].r].name}`)),e+1, "));return i.append(l),i.append(d),i};ar(`inc${e}${a[r]}`,e,"manual",i)}}c&&_s(`con${e}`,(function(){var a=$(`
                ${F("resource_Crates_plural")} ${t.resource[e].crates}
                `);return t.tech.steel_container&&a.append($(`
                ${F("resource_Containers_plural")} ${t.resource[e].containers}
                `)),a})),e!==t.race.species&&"Crates"!==e&&"Containers"!==e&&-1!==i?rr(`inc${e}`,e,"p"):-1===i&&ar(`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:o,tradable:n,stackable:c}}function Ra(e){if(e===t.race.species?t.resource[e].name=cn("name"):t.resource[e].name="Money"===e?"$":F(`resource_${e}_name`),on("fool",2022))switch(e){case"Lumber":t.resource[e].name=F("resource_Stone_name");break;case"Stone":t.resource[e].name=F("resource_Lumber_name");break;case"Copper":t.resource[e].name=F("resource_Iron_name");break;case"Iron":t.resource[e].name=F("resource_Copper_name");break;case"Steel":t.resource[e].name=F("resource_Titanium_name");break;case"Titanium":t.resource[e].name=F("resource_Steel_name");break;case"Coal":t.resource[e].name=F("resource_Oil_name");break;case"Oil":t.resource[e].name=F("resource_Coal_name");break;case"Alloy":t.resource[e].name=F("resource_Polymer_name");break;case"Polymer":t.resource[e].name=F("resource_Alloy_name");break;case"Graphene":t.resource[e].name=F("resource_Stanene_name");break;case"Stanene":t.resource[e].name=F("resource_Graphene_name");break;case"Plywood":t.resource[e].name=F("resource_Brick_name");break;case"Brick":t.resource[e].name=F("resource_Plywood_name");break;case"Genes":t.resource[e].name=F("resource_Soul_Gem_name");break;case"Soul_Gem":t.resource[e].name=F("resource_Genes_name");break;case"Slave":t.resource[e].name=F("resource_Peon_name")}if("Horseshoe"===e&&(t.resource[e].name=mn()),t.race.artifical&&"Genes"===e&&(t.resource[e].name=F("resource_Program_name")),t.race.sappy)"Stone"===e&&(t.resource[e].name=F("resource_Amber_name"));else if(t.race.flier)switch(e){case"Stone":t.resource[e].name=F("resource_Clay_name");break;case"Brick":t.resource[e].name=F("resource_Mud_Brick_name")}if(t.race.soul_eater&&"Food"===e&&(t.resource[e].name=F("resource_Souls_name")),t.race.evil)switch(e){case"Lumber":t.resource[e].name=F("resource_Bones_name");break;case"Furs":t.resource[e].name=F("resource_Flesh_name");break;case"Plywood":t.resource[e].name=F("resource_Boneweave_name")}if(t.race.artifical&&"Food"===e&&(t.resource[e].name=F("resource_Signal_name")),on("halloween").active)switch(e){case"Food":t.resource[e].name=F("resource_Candy_name");break;case"Lumber":t.resource[e].name=F("resource_Bones_name");break;case"Stone":t.resource[e].name=F("resource_RockCandy_name");break;case"Furs":t.resource[e].name=F("resource_Webs_name");break;case"Plywood":t.resource[e].name=F("resource_Boneweave_name");break;case"Brick":t.resource[e].name=F("resource_Tombstone_name");break;case"Soul_Gem":t.resource[e].name=F("resource_CandyCorn_name")}}function Ha(e,a){if($(`#res${e}`).length){let t=$(`#res${e}`);return t.detach(),void $("#resources").append(t)}a=a||"special";var r=$(`
                ${F(`resource_${e}_name`)}{{ count | round }}
                `);$("#resources").append(r),zs({el:`#res${e}`,data:t.prestige[e],filters:{round:e=>+e.toFixed(3)}}),"Artifact"!==e&&"Blood_Stone"!==e&&_s(`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($(`${F(`resource_${e}_desc`,[r,+(100*$r("plasmid")).toFixed(2)])}`)),t.genes.store&&("antimatter"!==t.race.universe||t.genes.bleed>=3)){let e=wr(1,"plasmid");e>1&&a.append($(` ${F("resource_Plasmid_desc2",[+(100*(e-1)).toFixed(2)])}`))}break;case"AntiPlasmid":a.append($(`${F(`resource_${e}_desc`,[t.prestige.AntiPlasmid.count,+(100*$r("antiplasmid")).toFixed(2)])}`));let i=wr(1,"anti");t.genes.store&&("antimatter"===t.race.universe||t.genes.bleed>=3)&&i>1&&a.append($(` ${F("resource_Plasmid_desc2",[+(100*(i-1)).toFixed(2)])}`));break;case"Phage":a.append($(`${F(t.prestige.AntiPlasmid.count>0?"resource_Phage_desc2":"resource_Phage_desc",[250+t.prestige.Phage.count])}`));let s=wr(1,"phage");t.genes.store&&t.genes.store>=4&&s>1&&a.append($(` ${F("resource_Plasmid_desc2",[+(100*(s-1)).toFixed(2)])}`));break;case"Dark":switch(t.race.universe){case"standard":a.append($(`${F(`resource_${e}_desc_s`,[+(100*(Ts("standard")-1)).toFixed(2)])}`));break;case"evil":a.append($(`${F(`resource_${e}_desc_e`,[+(100*(Ts("evil")-1)).toFixed(2)])}`));break;case"micro":a.append($(`${F(`resource_${e}_desc_m`,[Ts("micro",!1),Ts("micro",!0)])}`));break;case"heavy":let t=Ts("heavy"),r=.25+.5*t,i=.2+.3*t;a.append($(`${F(`resource_${e}_desc_h`,[+(100*r).toFixed(4),+(100*i).toFixed(4)])}`));break;case"antimatter":a.append($(`${F(`resource_${e}_desc_a`,[+(100*(Ts("antimatter")-1)).toFixed(2)])}`));break;case"magic":a.append($(`${F(`resource_${e}_desc_mg`,[F("resource_Mana_name"),+(100*(Ts("magic")-1)).toFixed(2)])}`))}break;case"Harmony":a.append($(`${F(`resource_${e}_desc`,["standard"===t.race.universe?.1:1,Os()])}`));break;case"AICore":let n=+(100*(1-.99**t.prestige.AICore.count)).toFixed(2);a.append($(`${F(`resource_${e}_desc`,[n])}`))}return a}))}function Ua(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 Va(e){let a=t.tech.currency>=6?1e6:t.tech.currency>=4?100:25;return!(t.resource[e].trade>=a)}function Wa(e,a,r,i,s){if((t.settings.tabLoad||4===t.settings.civTabs&&0===t.settings.marketTabs)&&(!t.race.artifical||"Food"!==r)){if(s&&a.append($(`

                {{ r.name | namespace }}

                `)),t.race.no_trade||(a.append($(`${F("resource_market_buy")}`)),a.append($(`\${{ r.value | buy }}`)),a.append($(`${F("resource_market_sell")}`)),a.append($(`\${{ r.value | sell }}`))),s&&(t.race.banana&&"Food"===r||t.tech.trade&&!t.race.terrifying)){let e=$(`${F("resource_market_routes")}`);a.append(e),e.append($(`-`)),e.append($('')),e.append($(`+`)),e.append($(`${F("cancel_routes")}`)),ir(r)}zs({el:e,data:{r:t.resource[r],m:t.city.market},methods:{aSell(e){let a=1===Fa[e]?F("resource_market_unit"):F("resource_market_units"),r=function(e){let a=4;t.race.merchant&&(a*=1-Ki.merchant.vars()[0]/100);let r=as("goblin");r>0&&(a*=1-Ki.merchant.vars(1)[0]/100*r),t.race.asymmetrical&&(a*=1+Ki.asymmetrical.vars()[0]/100),t.race.conniving&&a--;let i=t.resource[e].value*Fa[e]/a;if(t.city.wharf&&(i*=1+.01*t.city.wharf.count),t.space.gps&&t.space.gps.count>3&&(i*=1+.01*t.space.gps.count),t.tech.railway){let e=t.stats.achieve.banana&&t.stats.achieve.banana.l>=1?.03:.02;i*=1+t.tech.railway*e}return t.race.truepath&&!t.race.lone_survivor&&(i*=1-t.civic.foreign.gov3.hstl/101),t.race.inflation&&(i*=1+t.race.inflation/500),t.race.witch_hunter&&t.resource.Sus.amount>50&&(i*=1-(t.resource.Sus.amount-50)/52),i*=xe("psychic_cash"),i=+i.toFixed(1),i}(e),i=Fa[e];if(t.stats.achieve.hasOwnProperty("trade")){let e=t.stats.achieve.trade.l;e>5&&(e=5),i*=1-e/100}return i=+i.toFixed(3),F("resource_market_auto_sell_desc",[i,a,r])},aBuy(e){let a=Fa[e],r=D("dealmaker",0);r&&(a*=1+r/100),t.race.persuasive&&(a*=1+t.race.persuasive/100),t.race.merchant&&(a*=1+Ki.merchant.vars()[1]/100);let i=as("goblin");if(i>0&&(a*=1+Ki.merchant.vars(1)[1]/100*i),t.genes.trader&&(a*=1+Ls()/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 s=F(1===a?"resource_market_unit":"resource_market_units"),n=function(e){let a=t.resource[e].value;t.race.arrogant&&(a*=1+Ki.arrogant.vars()[0]/100),t.race.conniving&&(a*=1-Ki.conniving.vars()[0]/100);let r=as("imp");r>0&&(a*=1-Ki.conniving.vars(1)[0]/100*r);let i=a*Fa[e];return t.city.wharf&&(i*=.99**t.city.wharf.count),t.space.gps&&t.space.gps.count>3&&(i*=.99**t.space.gps.count),t.tech.railway&&(i*=(t.stats.achieve.banana&&t.stats.achieve.banana.l>=1?.97:.98)**t.tech.railway),t.race.truepath&&!t.race.lone_survivor&&(i*=1+t.civic.foreign.gov3.hstl/101),t.race.inflation&&(i*=1+t.race.inflation/300),t.race.quarantine&&(i*=1+Math.round(t.race.quarantine**3.5)),t.race.witch_hunter&&t.resource.Sus.amount>50&&(i*=1+(t.resource.Sus.amount-50)/8),i=+i.toFixed(1),i}(e);return F("resource_market_auto_buy_desc",[a,s,n])},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+Ki.arrogant.vars()[0]/100),t.race.conniving&&(r*=1-Ki.conniving.vars()[0]/100);let i=as("imp");i>0&&(r*=1-Ki.conniving.vars(1)[0]/100*i);let s=Math.floor(Math.min(a,t.resource.Money.amount/r,t.resource[e].max-t.resource[e].amount));s>0&&(t.resource[e].amount+=s,t.resource.Money.amount-=Math.round(r*s),t.resource[e].value+=Number((s/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-Ki.merchant.vars()[0]/100);let i=as("goblin");i>0&&(r*=1-Ki.merchant.vars(1)[0]/100*i),t.race.asymmetrical&&(r*=1+Ki.asymmetrical.vars()[0]/100),t.race.conniving&&(r*=1-Ki.conniving.vars()[1]/100);let s=as("imp");s>0&&(r*=1-Ki.conniving.vars(1)[1]/100*s);let n=t.resource[e].value/r,c=Math.floor(Math.min(a,t.resource[e].amount,(t.resource.Money.max-t.resource.Money.amount)/n));c>0&&(t.resource[e].amount-=c,t.resource.Money.amount+=Math.round(n*c),t.resource[e].value-=Number((c/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(!(Va(e)&&t.city.market.trade(t.race.arrogant&&(e*=1+Ki.arrogant.vars()[0]/100),q(e*t.city.market.qty,0)),sell(e){let a=4;t.race.merchant&&(a*=1-Ki.merchant.vars()[0]/100);let r=as("goblin");return r>0&&(a*=1-Ki.merchant.vars(1)[0]/100*r),t.race.asymmetrical&&(a*=1+Ki.asymmetrical.vars()[0]/100),q(e*t.city.market.qty/a,0)},trade(e){if("Stone"===r&&(31===e||-31===e)){let e=Zs(3,12,!1);if(e.length>0)return e}return e<0?"-"+(e=0-e):e>0?`+${e}`:0},namespace:e=>e.replace("_"," ")}})}}function Qa(){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 Ja(e){let a=e||$("#galaxyTrade");if(e||Cs($("#galaxyTrade")),t.galaxy.trade){a.append($(`
                ${F("galaxy_trade")}
                `));let e=Qa();for(let r=0;r');a.append(i),i.append($(`${t.resource[e[r].buy.res].name}`)),i.append($(`+{{ '${r}' | t_vol }}/s`)),i.append($(`${t.resource[e[r].sell.res].name}`)),i.append($(`-{{ '${r}' | s_vol }}/s`));let s=$(`${F("resource_market_routes")}`);i.append(s);let n=F("galaxy_freighter_assign",[t.resource[e[r].buy.res].name,t.resource[e[r].sell.res].name]),c=F("galaxy_freighter_unassign",[t.resource[e[r].buy.res].name,t.resource[e[r].sell.res].name]);s.append($(`-`)),s.append($(`{{ g.f${r} }}`)),s.append($(`+`)),s.append($(`${F("cancel_routes")}`))}let r=$(`
                ${F("resource_market_galactic_trade_routes")} {{ g.cur }} / {{ g.max }}
                `);r.append($(`${F("cancel_all_routes")}`)),a.append(r)}zs({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=Qa();for(let a=0;ae},filters:{t_vol(e){let a=Qa()[e].buy.vol;t.race.persuasive&&(a*=1+t.race.persuasive/100),t.race.merchant&&(a*=1+Ki.merchant.vars()[1]/100);let r=as("goblin");if(r>0&&(a*=1+Ki.merchant.vars(1)[1]/100*r),t.genes.trader&&(a*=1+Ls()/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=Qa()[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}}}),_s("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 Za(e){let a=b(),r=_r();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 Xa(e){let a=b(),r=_r();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 Ya(e){let a=b(),r=dr();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 er(e){let a=b(),r=dr();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 tr(e,a,r,i){if(t.settings.tabLoad||4===t.settings.civTabs&&1===t.settings.marketTabs){if(a.append($(`

                {{ name }}

                `)),t.resource.Crates.display){let e=$(`${F("resource_Crates_name")}`);a.append(e),e.append($(`«`)),e.append($(``)),e.append($(`»`))}if(t.resource.Containers.display){let e=$(`${F("resource_Containers_name")}`);a.append(e),e.append($(`«`)),e.append($('')),e.append($(`»`))}zs({el:e,data:t.resource[r],methods:{addCrate(e){Xa(e)},subCrate(e){Za(e)},addCon(e){er(e)},subCon(e){Ya(e)}},filters:{trick(e){if("Stone"===r&&10===t.resource[r].crates&&31===t.resource[r].containers){let e=Zs(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=Js(13,10);if(10===e&&t.length>0)return"1"+t}return e}}})}}function ar(e,a,i,s){_s(`${e}`,(function(){let e=$('
                {{ res.name | namespace }}
                '),n=$('
                ');e.append(n);let c=La(a,i),o=$("
                ");n.append(o),"auto"===i&&r.p[a]&&Object.keys(r.p[a]).forEach((function(e){let t=r.p[a][e],i=parseFloat(t.slice(0,-1));if(0!=i&&!isNaN(i)){let t=i>0?"success":"danger",r=e.replace(/\+.+$/,"");e=e.replace(/'/g,"\\'"),o.append(``)}})),Object.keys(c.multi_bd).forEach((function(e){let t=c.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,"\\'"),o.append(``)}}));let l=$('
                '),_=$(`
                ${F("craft_tools_multi")}
                `);l.append(_);let d=0;if(Object.keys(c.add_bd).forEach((function(e){let t=c.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&&n.append(l),r.p.consume&&r.p.consume[a]){let e=$('
                '),t=0;Object.keys(r.p.consume[a]).forEach((function(i){let s=r.p.consume[a][i];if(0!=s&&!isNaN(s)){t++;let r=s>0?"success":"danger",n=i.replace(/\+.+$/,"");i=i.replace(/'/g,"\\'"),e.append(``)}})),t>0&&n.append(e)}return t.resource[a].diff<0&&t.resource[a].amount>0&&e.append(``),s&&(e.append(''),e.append(s)),e}),{in:function(){zs({el:"#popper > div",data:{[a]:r.p[a],res:t.resource[a],consume:r.p.consume,craft:La(a,i)},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 i="%"===t?"%":"";return a>0?"+"+q(a,r)+i:a<0?q(a,r)+i: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(){zs({el:"#popper > div"},"destroy")},classes:"breakdown has-background-light has-text-dark",prop:{modifiers:{preventOverflow:{enabled:!1},hide:{enabled:!1}}}})}function rr(e,a,i){_s(`${e}`,(function(){let e=$('
                {{ res.name | namespace }}
                '),s=$('
                ');e.append(s);let n=!1;if(r[i][a]){let e=$("
                ");s.append(e);let t=[a];t.push("Global");for(var c=0;c0?"success":"danger",i=t.replace(/\+.+$/,"");t=t.replace(/'/g,"\\'"),e.append(``)}}))}}if(r[i].consume&&r[i].consume[a]){let e=$(`
                `),t=0;Object.keys(r[i].consume[a]).forEach((function(s){let n=r[i].consume[a][s];if(0!=n&&!isNaN(n)){t++;let r=n>0?"success":"danger",i=s.replace(/\+.+$/,"");s=s.replace(/'/g,"\\'"),e.append(``)}})),t>0&&s.append(e)}if("p"===i){let r=t.resource[a].diff>0?"success":"danger";e.append(``)}return e}),{in:function(){zs({el:"#popper > div",data:{Global:r[i].Global,[a]:r[i][a],consume:r[i].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,i="%"===t?"%":"";return a>0?"+"+q(a,r)+i:a<0?q(a,r)+i:void 0},fix:e=>e+"v",counter(e){let r=t.resource[a].diff,i=0;if(r<0?(r*=-1,i=+(e/r).toFixed(0)):i=+((t.resource[a].max-e)/r).toFixed(0),i===1/0||Number.isNaN(i))return"Never";if(i>60){let e=i%60,t=(i-e)/60;if(t>=60){let e=t%60;return`${(t-e)/60}h ${e}m`}return`${t}m ${e}s`}return`${i}s`},direction:e=>F(e>=0?"to_full":"to_empty"),namespace:e=>e.replace("_"," ")}})},out:function(){zs({el:"#popper > div"},"destroy")},classes:"breakdown has-background-light has-text-dark",prop:{modifiers:{preventOverflow:{enabled:!1},hide:{enabled:!1}}}})}function ir(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 sr(){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:F("resource_Plywood_name");return F("resource_modal_crate_construct_desc",[t.race.kindling_kindred||t.race.smoldering?200:10,e,_r()])}function nr(){return F("resource_modal_container_construct_desc",[125,dr()])}function cr(e,t){switch(e){case"crate":or(t);break;case"container":lr(t)}}function or(e){let a=e||b(),r=t.race.kindling_kindred||t.race.smoldering?t.race.smoldering?"Chrysotile":"Stone":"Plywood",i=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=i*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+Ki.pack_rat.vars()[0]/100);let a=as("kobold");return a>0&&(e*=1+Ki.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(wr(e))}function dr(){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+Ki.pack_rat.vars()[0]/100);let a=as("kobold");return a>0&&(e*=1+Ki.pack_rat.vars(1)[0]/100*a),e*=t.stats.achieve.blackhole?1+.05*t.stats.achieve.blackhole.l:1,Math.round(wr(e))}function pr(){if(!t.settings.tabLoad&&(4!==t.settings.civTabs||0!==t.settings.marketTabs))return;let e=$(`

                ${F("resource_market")}

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

                ${F("resource_trade_qty")}

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

                ${F("tab_storage")}

                `);Cs($("#resStorage")),$("#resStorage").append(e),t.resource.Crates&&t.resource.Containers&&(e.append($(``)),e.append($(``)),zs({el:"#createHead",data:{cr:t.resource.Crates,cn:t.resource.Containers},methods:{crate(){or()},container(){lr()},buildCrateDesc:()=>sr(),buildContainerDesc:()=>nr()}}))}function hr(){return t.tech.currency>=6?1e6:t.tech.currency>=4?5e3:100}function mr(){if((t.settings.tabLoad||4===t.settings.civTabs&&2===t.settings.marketTabs)&&(Cs($("#resEjector")),t.interstellar.mass_ejector)){let e=$(`

                ${F("interstellar_mass_ejector_vol")}

                `);$("#resEjector").append(e);let a=$('');e.append(a),a.append($(`{{ total }} / {{ on | max }}{{ on | real }}${F("interstellar_mass_ejector_mass")}: {{ mass | approx }} kt/s`)),zs({el:"#eject",data:t.interstellar.mass_ejector,filters:{max:e=>1e3*e,real:e=>s.mass_ejectorq(e,2)}})}}function gr(e,a){if((t.settings.tabLoad||4===t.settings.civTabs&&2===t.settings.marketTabs)&&(!t.race.artifical||"Food"!==e)&&Aa[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 i=$('');r.append(i),i.append($(`«`)),i.append($(`{{ e.${e} }}`)),i.append($(`»`)),i.append($(`${F("interstellar_mass_ejector_per")}: ${Aa[e]} kt`)),t.interstellar.mass_ejector.hasOwnProperty(e)||(t.interstellar.mass_ejector[e]=0),zs({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*s.mass_ejector&&(a=1e3*s.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 vr(){if((t.settings.tabLoad||4===t.settings.civTabs&&3===t.settings.marketTabs)&&(Cs($("#resCargo")),t.portal.transport)){let e=$(`

                ${F("portal_transport_supply")}

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

                ${t.resource[e].name}

                `);$("#resCargo").append(r);let i=$('');r.append(i),i.append($(`«`)),i.append($(`{{ e.${e} }}`)),i.append($(`»`));let s=q(Ia[e].out);i.append($(`${F("portal_transport_item",[`${s}`,`${Ia[e].in}`])}`)),t.portal.transport.cargo.hasOwnProperty(e)||(t.portal.transport.cargo[e]=0),zs({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 yr(){(t.settings.tabLoad||4===t.settings.civTabs&&4===t.settings.marketTabs)&&Cs($("#resAlchemy"))}function br(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 i=$(`

                ${t.resource[e].name}

                `);$("#resAlchemy").append(i);let s=$('');i.append(s),s.append($(`«`)),s.append($(`{{ a.${e} }}`)),s.append($(`»`)),t.race.alchemy.hasOwnProperty(e)||(t.race.alchemy[e]=0),zs({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++}}}),_s(`alchemy${e}`,(function(){let a=r&&t.tech.alchemy>=2?8*Fa[e]:2*Fa[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),$(`
                ${F("resource_alchemy",[1,F("resource_Mana_name"),.15,F("resource_Crystal_name"),+a.toFixed(2),t.resource[e].name])}
                `)}),{elm:`#alchemy${e} h3`})}}const wr=(kr={},function(e,a,r){let i=a||"a",s=[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(kr[i]||(kr[i]={}),!kr[i][s]||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 i=t.genes.store>=2?t.genes.store>=3?1250:1666:2500;if("antimatter"===t.race.universe&&(i*=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/i}if("standard"===t.race.universe&&(e*=Ts("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=$e(e)),a+=e*t.civic.priest.workers}e*=1+(r?t.space.ziggurat.count:t.city.temple.count)*a}!a&&t.pillars&&(e*=Ds()[1]),kr[i]={},kr[i][s]=e}return a?kr[i][s]*e:Math.round(kr[i][s]*e)});var kr;const $r=(xr={},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",s.alien_outpost||"0"].join("-");if(!xr[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&&s.alien_outpost&&(e*=2);let i=0;if(t.race.orbit_decayed&&t.space.ziggurat?i=t.space.ziggurat.count:t.city.temple&&(i=t.city.temple.count),i>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=$e(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=$e(e)),a+=e*t.civic.priest.workers}t.race.spiritual&&(a*=1+Ki.spiritual.vars()[0]/100);let r=as("seraph");r>0&&(a*=1+Ki.spiritual.vars(1)[0]/100*r),"theocracy"===t.civic.govern.type&&(a*=1.12),t.race.ooze&&(a*=1-Ki.ooze.vars()[1]/100),t.race.orbit_decayed&&t.race.truepath&&(a*=.1),e*=1+i*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&&s.alien_outpost&&(r*=2),r/=3}t.race.nerfed&&("antimatter"===t.race.universe?(e/=2,r/=2):(e/=5,r/=5)),(xr={})[a]=[(1+e)*(1+r)-1,e,r]}return e&&"raw"===e?xr[a]:e&&"plasmid"===e?xr[a][1]:e&&"antiplasmid"===e?xr[a][2]:xr[a][0]});var xr;const qr={club:{id:"tech-club",title:F("tech_club"),desc:F("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!!ii($(this)[0])&&(t.resource.Food.display=!0,!0)}},bone_tools:{id:"tech-bone_tools",title:F("tech_bone_tools"),desc:F("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!!ii($(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?F("tech_bone_tools"):F("tech_wooden_tools"),desc:()=>t.race.kindling_kindred?F("tech_bone_tools_desc"):F("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!!ii($(this)[0])&&(t.resource.Stone.display=!0,t.race.smoldering&&(t.resource.Chrysotile.display=!0),!0)}},sundial:{id:"tech-sundial",title:()=>t.race.unfathomable?F("tech_moondial"):F("tech_sundial"),desc:()=>t.race.unfathomable?F("tech_moondial_desc"):F("tech_sundial_desc"),category:"science",era:"primitive",reqs:{primitive:2},grant:["primitive",3],cost:{Lumber:()=>8,Stone:()=>10},effect:()=>t.race.unfathomable?F("tech_moondial_effect"):F("tech_sundial_effect"),action(){return!!ii($(this)[0])&&(ms(F("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:F("tech_housing"),desc:F("tech_housing_desc"),category:"housing",era:"civilized",reqs:{primitive:3},grant:["housing",1],cost:{Knowledge:()=>10},effect:F("tech_housing_effect"),action(){return!!ii($(this)[0])&&(t.city.basic_housing={count:0},!0)}},cottage:{id:"tech-cottage",title:()=>ui("medium"),desc:F("tech_cottage_desc"),category:"housing",era:"civilized",reqs:{housing:1,cement:1,mining:3},grant:["housing",2],cost:{Knowledge:()=>3600},effect:F("tech_cottage_effect"),action(){return!!ii($(this)[0])&&(t.city.cottage={count:0},!0)}},apartment:{id:"tech-apartment",title:()=>ui("large"),desc:()=>ui("large"),category:"housing",era:"discovery",reqs:{housing:2,high_tech:2},grant:["housing",3],cost:{Knowledge:()=>15750},effect:F("tech_apartment_effect"),action(){return!!ii($(this)[0])&&(t.city.apartment={count:0,on:0},!0)}},arcology:{id:"tech-arcology",title:F("tech_arcology"),desc:F("tech_arcology"),category:"housing",era:"dimensional",reqs:{hell_ruins:4,housing:3,high_tech:17},grant:["housing",4],cost:{Knowledge:()=>25e6},effect:()=>F("tech_arcology_effect"),action(){return!!ii($(this)[0])&&(t.portal.arcology={count:0,on:0},!0)}},steel_beams:{id:"tech-steel_beams",title:F("tech_steel_beams"),desc:F("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:()=>F("tech_steel_beams_effect",[ui("small"),ui("medium")]),action(){return!!ii($(this)[0])}},mythril_beams:{id:"tech-mythril_beams",title:F("tech_mythril_beams"),desc:F("tech_housing_cost"),category:"housing",era:"early_space",reqs:{housing_reduction:1,space:3},grant:["housing_reduction",2],cost:{Knowledge:()=>175e3,Mythril:()=>1e3},effect:()=>F("tech_mythril_beams_effect",[ui("small"),ui("medium")]),action(){return!!ii($(this)[0])}},neutronium_walls:{id:"tech-neutronium_walls",title:F("tech_neutronium_walls"),desc:F("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:()=>F("tech_neutronium_walls_effect",[ui("small"),ui("medium")]),action(){return!!ii($(this)[0])}},bolognium_alloy_beams:{id:"tech-bolognium_alloy_beams",title:F("tech_bolognium_alloy_beams"),desc:F("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:()=>F("tech_bolognium_alloy_beams_effect",[ui("small"),ui("medium")]),action(){return!!ii($(this)[0])}},aphrodisiac:{id:"tech-aphrodisiac",title:F("tech_aphrodisiac"),desc:F("tech_aphrodisiac_desc"),category:"housing",era:"civilized",reqs:{housing:2},grant:["reproduction",1],not_trait:["artifical"],cost:{Knowledge:()=>4500},effect:F("tech_aphrodisiac_effect"),action(){return!!ii($(this)[0])}},fertility_clinic:{id:"tech-fertility_clinic",title:F("tech_fertility_clinic"),desc:F("tech_fertility_clinic"),category:"housing",era:"intergalactic",reqs:{reproduction:1,xeno:6},not_trait:["cataclysm"],grant:["reproduction",2],cost:{Knowledge:()=>45e5},effect:F("tech_fertility_clinic_effect"),action(){return!!ii($(this)[0])}},captive_housing:{id:"tech-captive_housing",title:F("tech_captive_housing"),desc:F("tech_captive_housing"),category:"eldritch",era:"civilized",reqs:{housing:1},trait:["unfathomable"],grant:["unfathomable",1],cost:{Knowledge:()=>12},effect:F("tech_captive_housing_effect"),action(){return!!ii($(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:F("tech_torture"),desc:F("tech_torture"),category:"eldritch",era:"civilized",reqs:{unfathomable:1},trait:["unfathomable"],grant:["unfathomable",2],cost:{Knowledge:()=>25},effect:F("tech_torture_effect"),action(){return!!ii($(this)[0])&&(t.civic.torturer.display=!0,!0)}},thrall_quarters:{id:"tech-thrall_quarters",title:F("tech_thrall_quarters"),desc:F("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:F("tech_thrall_quarters_effect"),action(){return!!ii($(this)[0])&&(t.civic.torturer.display=!0,!0)}},psychic_energy:{id:"tech-psychic_energy",title:F("tech_psychic_energy"),desc:F("tech_psychic_energy"),category:"eldritch",era:"civilized",reqs:{housing:1},condition:()=>t.settings.showCivic,trait:["psychic"],grant:["psychic",1],cost:{Knowledge:()=>15},effect:F("tech_psychic_energy_effect"),action(){return!!ii($(this)[0])&&(t.resource.Energy.display=!0,t.settings.showPsychic=!0,t.race.psychicPowers={boost:{r:"Food"},boostTime:0},!0)},post(){os()}},psychic_attack:{id:"tech-psychic_attack",title:F("tech_psychic_attack"),desc:F("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:F("tech_psychic_attack_effect"),action(){return!!ii($(this)[0])&&(t.race.psychicPowers.assaultTime=0,!0)},post(){os()}},psychic_finance:{id:"tech-psychic_finance",title:F("tech_psychic_finance"),desc:F("tech_psychic_finance"),category:"eldritch",era:"civilized",reqs:{psychic:2,high_tech:4},trait:["psychic"],grant:["psychic",3],cost:{Knowledge:()=>65e3},effect:F("tech_psychic_finance_effect"),action(){return!!ii($(this)[0])&&(t.race.psychicPowers.cash=0,!0)},post(){os()}},psychic_channeling:{id:"tech-psychic_channeling",title:F("tech_psychic_channeling"),desc:F("tech_psychic_channeling"),category:"eldritch",era:"deep_space",reqs:{psychic:3,high_tech:10},trait:["psychic"],grant:["psychic",4],cost:{Knowledge:()=>36e4},effect:F("tech_psychic_channeling_effect"),action(){return!!ii($(this)[0])&&(t.race.psychicPowers.channel={cash:0,assault:0,boost:0},!0)},post(){os()}},psychic_efficiency:{id:"tech-psychic_efficiency",title:F("tech_psychic_efficiency"),desc:F("tech_psychic_efficiency"),category:"eldritch",era:"intergalactic",reqs:{psychic:4,high_tech:16},trait:["psychic"],grant:["psychic",5],cost:{Knowledge:()=>525e4},effect:F("tech_psychic_efficiency_effect"),action(){return!!ii($(this)[0])},post(){os()}},mind_break:{id:"tech-mind_break",title:F("tech_mind_break"),desc:F("tech_mind_break"),category:"eldritch",era:"civilized",reqs:{psychic:2,high_tech:1,unfathomable:2},trait:["psychic"],grant:["psychicthrall",1],cost:{Knowledge:()=>7e3},effect:F("tech_mind_break_effect"),action(){return!!ii($(this)[0])},post(){os()}},psychic_stun:{id:"tech-psychic_stun",title:F("tech_psychic_stun"),desc:F("tech_psychic_stun"),category:"eldritch",era:"civilized",reqs:{psychicthrall:1,high_tech:3,unfathomable:2},trait:["psychic"],grant:["psychicthrall",2],cost:{Knowledge:()=>32e3},effect:F("tech_psychic_stun_effect"),action(){return!!ii($(this)[0])},post(){os()}},spear:{id:"tech-spear",title:F("tech_spear"),desc:F("tech_spear_desc"),category:"foraging",era:"civilized",reqs:{primitive:3,storage:1},trait:["forager"],grant:["foraging",1],cost:{Knowledge:()=>110,Stone:()=>75},effect:F("tech_spear_effect"),action(){return!!ii($(this)[0])}},bronze_spear:{id:"tech-bronze_spear",title:F("tech_bronze_spear"),desc:F("tech_bronze_spear_desc"),category:"foraging",era:"civilized",reqs:{foraging:1,mining:2},trait:["forager"],grant:["foraging",2],cost:{Knowledge:()=>525,Copper:()=>50},effect:F("tech_bronze_spear_effect"),action(){return!!ii($(this)[0])}},iron_spear:{id:"tech-iron_spear",title:F("tech_iron_spear"),desc:F("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:F("tech_bronze_spear_effect"),action(){return!!ii($(this)[0])}},dowsing_rod:{id:"tech-dowsing_rod",title:F("tech_dowsing_rod"),desc:F("tech_dowsing_rod_desc"),category:"foraging",era:"civilized",reqs:{foraging:1,mining:2},trait:["forager"],grant:["dowsing",1],cost:{Knowledge:()=>450,Lumber:()=>750},effect:F("tech_dowsing_rod_effect"),action(){return!!ii($(this)[0])}},metal_detector:{id:"tech-metal_detector",title:F("tech_metal_detector"),desc:F("tech_metal_detector_desc"),category:"foraging",era:"civilized",reqs:{dowsing:1,high_tech:4},trait:["forager"],grant:["dowsing",2],cost:{Knowledge:()=>65e3},effect:F("tech_metal_detector_effect"),action(){return!!ii($(this)[0])}},smokehouse:{id:"tech-smokehouse",title:()=>t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?F("city_smokehouse_easter"):F("tech_smokehouse"),desc:()=>t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?F("tech_smokehouse_easter_desc"):F("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)?F("tech_smokehouse_easter_effect"):F("tech_smokehouse_effect"),action(){return!!ii($(this)[0])&&(Hi("city","smokehouse","silo",{count:0}),!0)},post(){t.tech.s_lodge&&(t.tech.hunting=2)}},lodge:{id:"tech-lodge",title:F("tech_lodge"),desc:F("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:F("tech_lodge_effect"),action(){return!!ii($(this)[0])&&(Hi("city","lodge","farm",{count:0}),!0)}},alt_lodge:{id:"tech-alt_lodge",title(){return this.condition()?F("tech_lodge_alt"):F("tech_lodge")},desc(){return this.condition()?F("tech_lodge_alt"):F("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()?F("tech_lodge_effect_alt"):F("tech_lodge_effect")},action(){return!!ii($(this)[0])&&(Hi("city","lodge","farm",{count:0}),!0)}},soul_well:{id:"tech-soul_well",title:F("tech_soul_well"),desc:F("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:F("tech_soul_well_effect"),action(){return!!ii($(this)[0])&&(t.city.soul_well={count:0},!0)}},compost:{id:"tech-compost",title:F("tech_compost"),desc:F("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:F("tech_compost_effect"),action(){return!!ii($(this)[0])&&(t.city.compost={count:0,on:0},!0)}},hot_compost:{id:"tech-hot_compost",title:F("tech_hot_compost"),desc:F("tech_hot_compost"),category:"compost",era:"civilized",reqs:{compost:1},trait:["detritivore"],grant:["compost",2],cost:{Knowledge:()=>100},effect:F("tech_hot_compost_effect"),action(){return!!ii($(this)[0])}},mulching:{id:"tech-mulching",title:F("tech_mulching"),desc:F("tech_mulching"),category:"compost",era:"civilized",reqs:{compost:2,mining:3},trait:["detritivore"],grant:["compost",3],cost:{Knowledge:()=>3200},effect:F("tech_mulching_effect"),action(){return!!ii($(this)[0])}},adv_mulching:{id:"tech-adv_mulching",title:F("tech_adv_mulching"),desc:F("tech_adv_mulching"),category:"compost",era:"discovery",reqs:{compost:3,high_tech:2},trait:["detritivore"],grant:["compost",4],cost:{Knowledge:()=>16e3},effect:F("tech_adv_mulching_effect"),action(){return!!ii($(this)[0])}},agriculture:{id:"tech-agriculture",title:F("tech_agriculture"),desc:F("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:F("tech_agriculture_effect"),action(){return!!ii($(this)[0])&&(Hi("city","farm","lodge",{count:0}),!0)}},farm_house:{id:"tech-farm_house",title:F("tech_farm_house"),desc:F("tech_farm_house_desc"),category:"housing",era:"civilized",reqs:{agriculture:1,housing:1,currency:1},grant:["farm",1],cost:{Money:()=>50,Knowledge:()=>180},effect:F("tech_farm_house_effect"),action(){return!!ii($(this)[0])}},irrigation:{id:"tech-irrigation",title:F("tech_irrigation"),desc:F("tech_irrigation_desc"),category:"agriculture",era:"civilized",reqs:{agriculture:1},grant:["agriculture",2],cost:{Knowledge:()=>55},effect:F("tech_irrigation_effect"),action(){return!!ii($(this)[0])}},silo:{id:"tech-silo",title:F("tech_silo"),desc:F("tech_silo_desc"),category:"storage",era:"civilized",reqs:{agriculture:2,storage:1},grant:["agriculture",3],cost:{Knowledge:()=>80},effect:F("tech_silo_effect"),action(){return!!ii($(this)[0])&&(Hi("city","silo","smokehouse",{count:0}),!0)}},mill:{id:"tech-mill",title:F("tech_mill"),desc:F("tech_mill_desc"),category:"agriculture",era:"civilized",reqs:{agriculture:3,mining:3},grant:["agriculture",4],cost:{Knowledge:()=>5400},effect:F("tech_mill_effect"),action(){return!!ii($(this)[0])&&(Hi("city","mill","windmill",{count:0,on:0}),!0)}},windmill:{id:"tech-windmill",title:F("tech_windmill"),desc:F("tech_windmill_desc"),category:"agriculture",era:"discovery",reqs:{agriculture:4,high_tech:1},grant:["agriculture",5],cost:{Knowledge:()=>16200},effect:F("tech_windmill_effect"),action(){return!!ii($(this)[0])}},windturbine:{id:"tech-windturbine",title:F("tech_windturbine"),desc:F("tech_windturbine"),category:"power_generation",era:"globalized",reqs:{agriculture:5,high_tech:4},grant:["agriculture",6],cost:{Knowledge:()=>66e3},effect:F("tech_windturbine_effect"),action(){return!!ii($(this)[0])}},wind_plant:{id:"tech-wind_plant",title:()=>t.race.unfathomable?F("tech_watermill"):F("tech_windmill"),desc:()=>t.race.unfathomable?F("tech_watermill"):F("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?F("tech_watermill_effect"):F("tech_wind_plant_effect"),action(){return!!ii($(this)[0])&&(Hi("city","windmill","mill",{count:0,on:0}),!0)}},gmfood:{id:"tech-gmfood",title:F("tech_gmfood"),desc:F("tech_gmfood_desc"),category:"agriculture",era:"globalized",reqs:{agriculture:6,genetics:1},grant:["agriculture",7],cost:{Knowledge:()=>95e3},effect:F("tech_gmfood_effect"),action(){return!!ii($(this)[0])}},foundry:{id:"tech-foundry",title:F("tech_foundry"),desc:F("tech_foundry"),category:"crafting",era:"civilized",reqs:{mining:2},grant:["foundry",1],cost:{Knowledge:()=>650},effect:F("tech_foundry_effect"),action(){return!!ii($(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:F("tech_artisans"),desc:F("tech_artisans"),category:"crafting",era:"civilized",reqs:{foundry:1},grant:["foundry",2],cost:{Knowledge:()=>1500},effect:F("tech_artisans_effect"),action(){return!!ii($(this)[0])}},apprentices:{id:"tech-apprentices",title:F("tech_apprentices"),desc:F("tech_apprentices"),category:"crafting",era:"civilized",reqs:{foundry:2},grant:["foundry",3],cost:{Knowledge:()=>3200},effect:F("tech_apprentices_effect"),action(){return!!ii($(this)[0])}},carpentry:{id:"tech-carpentry",title:F("tech_carpentry"),desc:F("tech_carpentry"),category:"crafting",era:"civilized",reqs:{foundry:3,saw:1},grant:["foundry",4],not_trait:["evil"],cost:{Knowledge:()=>5200},effect:F("tech_carpentry_effect"),action(){return!!ii($(this)[0])}},demonic_craftsman:{id:"tech-demonic_craftsman",title:F("tech_master_craftsman"),desc:F("tech_master_craftsman"),category:"crafting",era:"discovery",wiki:!!t.race.evil,reqs:{foundry:3},grant:["foundry",5],trait:["evil"],cost:{Knowledge:()=>12e3},effect:F("tech_master_craftsman_effect"),action(){return!!ii($(this)[0])}},master_craftsman:{id:"tech-master_craftsman",title:F("tech_master_craftsman"),desc:F("tech_master_craftsman"),category:"crafting",era:"discovery",wiki:!t.race.evil,reqs:{foundry:4},grant:["foundry",5],not_trait:["evil"],cost:{Knowledge:()=>12e3},effect:F("tech_master_craftsman_effect"),action(){return!!ii($(this)[0])}},brickworks:{id:"tech-brickworks",title:F("tech_brickworks"),desc:F("tech_brickworks"),category:"crafting",era:"discovery",reqs:{foundry:5},grant:["foundry",6],cost:{Knowledge:()=>18500},effect:F("tech_brickworks_effect"),action(){return!!ii($(this)[0])}},machinery:{id:"tech-machinery",title:F("tech_machinery"),desc:F("tech_machinery"),category:"crafting",era:"globalized",reqs:{foundry:6,high_tech:4},grant:["foundry",7],cost:{Knowledge:()=>66e3},effect:F("tech_machinery_effect"),action(){return!!ii($(this)[0])}},cnc_machine:{id:"tech-cnc_machine",title:F("tech_cnc_machine"),desc:F("tech_cnc_machine"),category:"crafting",era:"globalized",reqs:{foundry:7,high_tech:8},grant:["foundry",8],cost:{Knowledge:()=>132e3},effect:F("tech_cnc_machine_effect"),action(){return!!ii($(this)[0])}},vocational_training:{id:"tech-vocational_training",title:F("tech_vocational_training"),desc:F("tech_vocational_training"),category:"crafting",era:"industrialized",reqs:{foundry:1,high_tech:3},grant:["v_train",1],cost:{Knowledge:()=>3e4},effect:F("tech_vocational_training_effect"),action(){return!!ii($(this)[0])}},stellar_forge:{id:"tech-stellar_forge",title:F("tech_stellar_forge"),desc:F("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:F("tech_stellar_forge_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.stellar_forge={count:0,on:0},!0)}},stellar_smelting:{id:"tech-stellar_smelting",title:F("tech_stellar_smelting"),desc:F("tech_stellar_smelting"),category:"crafting",era:"intergalactic",reqs:{star_forge:1,xeno:4},grant:["star_forge",2],cost:{Knowledge:()=>5e6,Vitreloy:()=>1e4},effect:F("tech_stellar_smelting_effect"),action(){return!!ii($(this)[0])},post(){$i()}},assembly_line:{id:"tech-assembly_line",title:F("tech_assembly_line"),desc:F("tech_assembly_line"),category:"crafting",era:"globalized",reqs:{high_tech:4},grant:["factory",1],cost:{Knowledge:()=>72e3,Copper:()=>125e3},effect:`${F("tech_assembly_line_effect")} ${F("tech_factory_warning")}`,action(){return!!ii($(this)[0])}},automation:{id:"tech-automation",title:F("tech_automation"),desc:F("tech_automation"),category:"crafting",era:"early_space",reqs:{high_tech:8,factory:1},grant:["factory",2],cost:{Knowledge:()=>165e3},effect:`${F("tech_automation_effect")} ${F("tech_factory_warning")}`,action(){return!!ii($(this)[0])}},laser_cutters:{id:"tech-laser_cutters",title:F("tech_laser_cutters"),desc:F("tech_laser_cutters"),category:"crafting",era:"deep_space",reqs:{high_tech:9,factory:2},grant:["factory",3],cost:{Knowledge:()=>3e5,Elerium:()=>200},effect:`${F("tech_laser_cutters_effect")} ${F("tech_factory_warning")}`,action(){return!!ii($(this)[0])}},high_tech_factories:{id:"tech-high_tech_factories",title:F("tech_high_tech_factories"),desc:F("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:`${F("tech_high_tech_factories_effect")} ${F("tech_factory_warning")}`,action(){return!!ii($(this)[0])}},theatre:{id:"tech-theatre",title:F("tech_theatre"),desc:F("tech_theatre"),category:"entertainment",era:"civilized",reqs:{housing:1,currency:1,cement:1},grant:["theatre",1],not_trait:["joyless"],cost:{Knowledge:()=>750},effect:F("tech_theatre_effect"),action(){return!!ii($(this)[0])&&(t.city.amphitheatre={count:0},!0)}},playwright:{id:"tech-playwright",title:F("tech_playwright"),desc:F("tech_playwright"),category:"entertainment",era:"civilized",reqs:{theatre:1,science:2},grant:["theatre",2],cost:{Knowledge:()=>1080},effect:F("tech_playwright_effect"),action(){return!!ii($(this)[0])}},magic:{id:"tech-magic",title:()=>"magic"===t.race.universe?F("tech_illusionist"):F("tech_magic"),desc:()=>"magic"===t.race.universe?F("tech_illusionist"):F("tech_magic"),category:"entertainment",era:"discovery",reqs:{theatre:2,high_tech:1},grant:["theatre",3],cost:{Knowledge:()=>7920},effect:F("tech_magic_effect"),effect:()=>"magic"===t.race.universe?F("tech_illusionist_effect"):F("tech_magic_effect"),action(){return!!ii($(this)[0])}},superstars:{id:"tech-superstars",title:F("tech_superstars"),desc:F("tech_superstars"),category:"entertainment",era:"interstellar",reqs:{theatre:3,high_tech:12},grant:["superstar",1],cost:{Knowledge:()=>66e4},effect:F("tech_superstars_effect"),action(){return!!ii($(this)[0])}},radio:{id:"tech-radio",title:F("tech_radio"),desc:F("tech_radio"),category:"entertainment",era:"discovery",reqs:{theatre:3,high_tech:2},grant:["broadcast",1],cost:{Knowledge:()=>16200},effect:()=>F("tech_radio_effect",[di()]),action(){return!!ii($(this)[0])}},tv:{id:"tech-tv",title:F("tech_tv"),desc:F("tech_tv"),category:"entertainment",era:"globalized",reqs:{broadcast:1,high_tech:4},grant:["broadcast",2],cost:{Knowledge:()=>67500},effect:()=>F("tech_tv_effect",[di()]),action(){return!!ii($(this)[0])}},vr_center:{id:"tech-vr_center",title:F("tech_vr_center"),desc:F("tech_vr_center"),category:"entertainment",era:"interstellar",reqs:{broadcast:2,high_tech:12,stanene:1},grant:["broadcast",3],cost:{Knowledge:()=>62e4},effect:()=>F("tech_vr_center_effect"),action(){return!!ii($(this)[0])&&(t.space.vr_center={count:0,on:0},!0)}},zoo:{id:"tech-zoo",title:F("tech_zoo"),desc:F("tech_zoo"),category:"entertainment",era:"dimensional",reqs:{hell_ruins:2},grant:["zoo",1],cost:{Knowledge:()=>225e5},effect:()=>F("tech_zoo_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.zoo={count:0,on:0},!0)}},casino:{id:"tech-casino",title:F("tech_casino"),desc:F("tech_casino"),category:"entertainment",era:"globalized",reqs:{high_tech:4,currency:5},grant:["gambling",1],cost:{Knowledge:()=>95e3},effect:F("tech_casino_effect"),action(){return!!ii($(this)[0])&&(t.city.casino={count:0,on:0},t.space.spc_casino={count:0,on:0},!0)}},dazzle:{id:"tech-dazzle",title:F("tech_dazzle"),desc:F("tech_dazzle"),category:"banking",era:"globalized",reqs:{gambling:1},grant:["gambling",2],cost:{Knowledge:()=>125e3},effect:F("tech_dazzle_effect"),action(){return!!ii($(this)[0])}},casino_vault:{id:"tech-casino_vault",title:F("tech_casino_vault"),desc:F("tech_casino_vault"),category:"banking",era:"early_space",reqs:{gambling:2,space:3},grant:["gambling",3],cost:{Knowledge:()=>145e3,Iridium:()=>2500},effect:F("tech_casino_vault_effect"),action(){return!!ii($(this)[0])}},otb:{id:"tech-otb",title:F("tech_otb"),desc:F("tech_otb"),category:"banking",era:"deep_space",reqs:{gambling:3,banking:10,high_tech:10},grant:["gambling",4],cost:{Knowledge:()=>39e4},effect:F("tech_otb_effect"),action(){return!!ii($(this)[0])}},online_gambling:{id:"tech-online_gambling",title:F("tech_online_gambling"),desc:F("tech_online_gambling"),category:"banking",era:"interstellar",reqs:{gambling:4,banking:12},grant:["gambling",5],cost:{Knowledge:()=>8e5},effect:F("tech_online_gambling_effect"),action(){return!!ii($(this)[0])}},bolognium_vaults:{id:"tech-bolognium_vaults",title:F("tech_bolognium_vaults"),desc:F("tech_bolognium_vaults"),category:"banking",era:"intergalactic",reqs:{gambling:5,gateway:3},grant:["gambling",6],cost:{Knowledge:()=>39e5,Bolognium:()=>18e4},effect:F("tech_bolognium_vaults_effect"),action(){return!!ii($(this)[0])}},mining:{id:"tech-mining",title:()=>t.race.sappy?F("tech_amber"):F("tech_mining"),desc:()=>t.race.sappy?F("tech_amber"):F("tech_mining_desc"),category:"mining",era:"civilized",reqs:{primitive:3},grant:["mining",1],cost:{Knowledge:()=>45},effect:()=>t.race.sappy?F("tech_amber_effect"):F(t.race.flier?"tech_mining_effect_alt":"tech_mining_effect"),action(){return!!ii($(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:F("tech_bayer_process"),desc:F("tech_bayer_process_desc"),category:"mining",era:"civilized",reqs:{smelting:2},grant:["alumina",1],cost:{Knowledge:()=>4500},effect:()=>t.race.sappy?F("tech_bayer_process_effect_alt"):F("tech_bayer_process_effect"),action(){return!!ii($(this)[0])&&(t.city.metal_refinery={count:0,on:0},na(),!0)}},elysis_process:{id:"tech-elysis_process",title:F("tech_elysis_process"),desc:F("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:F("tech_elysis_process_effect"),action(){return!!ii($(this)[0])}},smelting:{id:"tech-smelting",title:F("tech_smelting"),desc:F("tech_smelting_desc"),category:"mining",era:"civilized",reqs:{mining:3},grant:["smelting",1],cost:{Knowledge:()=>4050},effect:F("tech_smelting_effect"),action(){return!!ii($(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,Jr())}},steel:{id:"tech-steel",title:F("tech_steel"),desc:F("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:F("tech_steel_effect"),action(){return!!ii($(this)[0])&&(t.resource.Steel.display=!0,!0)},post(){$i(),os()}},blast_furnace:{id:"tech-blast_furnace",title:F("tech_blast_furnace"),desc:F("tech_blast_furnace"),category:"mining",era:"discovery",reqs:{smelting:2},grant:["smelting",3],cost:{Knowledge:()=>13500,Coal:()=>2e3},effect:F("tech_blast_furnace_effect"),action(){return!!ii($(this)[0])},post(){t.race.steelen&&(t.tech.smelting=6,Jr())}},bessemer_process:{id:"tech-bessemer_process",title:F("tech_bessemer_process"),desc:F("tech_bessemer_process"),category:"mining",era:"discovery",reqs:{smelting:3},grant:["smelting",4],condition:()=>!t.race.steelen,cost:{Knowledge:()=>19800,Coal:()=>5e3},effect:F("tech_bessemer_process_effect"),action(){return!!ii($(this)[0])}},oxygen_converter:{id:"tech-oxygen_converter",title:F("tech_oxygen_converter"),desc:F("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:F("tech_oxygen_converter_effect"),action(){return!!ii($(this)[0])}},electric_arc_furnace:{id:"tech-electric_arc_furnace",title:F("tech_electric_arc_furnace"),desc:F("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:F("tech_electric_arc_furnace_effect"),action(){return!!ii($(this)[0])}},hellfire_furnace:{id:"tech-hellfire_furnace",title:F("tech_hellfire_furnace"),desc:F("tech_hellfire_furnace"),category:"mining",era:"interstellar",reqs:{smelting:6,infernite:1},grant:["smelting",7],cost:{Knowledge:()=>615e3,Infernite:()=>2e3,Soul_Gem:()=>2},effect:F("tech_hellfire_furnace_effect"),action(){return!!ii($(this)[0])}},infernium_fuel:{id:"tech-infernium_fuel",title:F("tech_infernium_fuel"),desc:F("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:F("tech_infernium_fuel_effect"),action(){return!!ii($(this)[0])},post(){$i()}},iridium_smelting_perk:{id:"tech-iridium_smelting_perk",title:F("tech_iridium_smelting"),desc:F("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:F("tech_iridium_smelting_effect"),action(){return!!ii($(this)[0])}},rotary_kiln:{id:"tech-rotary_kiln",title:F("tech_rotary_kiln"),desc:F("tech_rotary_kiln"),category:"mining",era:"industrialized",reqs:{smelting:3,high_tech:3},grant:["copper",1],cost:{Knowledge:()=>57600,Coal:()=>8e3},effect:F("tech_rotary_kiln_effect"),action(){return!!ii($(this)[0])}},metal_working:{id:"tech-metal_working",title:F("tech_metal_working"),desc:F("tech_metal_working_desc"),category:"mining",era:"civilized",reqs:{mining:1},grant:["mining",2],cost:{Knowledge:()=>350},effect:F("tech_metal_working_effect"),action(){return!!ii($(this)[0])&&(t.city.mine={count:0,on:0},!0)}},iron_mining:{id:"tech-iron_mining",title:F("tech_iron_mining"),desc:F("tech_iron_mining_desc"),category:"mining",era:"civilized",reqs:{mining:2},grant:["mining",3],cost:{Knowledge:()=>t.city.ptrait.includes("unstable")?500:2500},effect:F("tech_iron_mining_effect"),action(){return!!ii($(this)[0])&&(t.resource.Iron.display=!0,t.city.foundry&&t.city.foundry.count>0&&(t.resource.Wrought_Iron.display=!0,na()),!0)},post(){os()}},coal_mining:{id:"tech-coal_mining",title:F("tech_coal_mining"),desc:F("tech_coal_mining_desc"),category:"power_generation",era:"civilized",reqs:{mining:3},grant:["mining",4],cost:{Knowledge:()=>4320},effect:F("tech_coal_mining_effect"),action(){return!!ii($(this)[0])&&(t.city.coal_mine={count:0,on:0},t.resource.Coal.display=!0,!0)},post(){os()}},storage:{id:"tech-storage",title:F("tech_storage"),desc:F("tech_storage_desc"),category:"storage",era:"civilized",reqs:{primitive:3,currency:1},grant:["storage",1],cost:{Knowledge:()=>20},effect:F("tech_storage_effect"),action(){return!!ii($(this)[0])&&(t.city.shed={count:0},!0)}},reinforced_shed:{id:"tech-reinforced_shed",title:F("tech_reinforced_shed"),desc:F("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:F("tech_reinforced_shed_effect"),action(){return!!ii($(this)[0])}},barns:{id:"tech-barns",title:F("tech_barns"),desc:F("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:F("tech_barns_effect"),action(){return!!ii($(this)[0])},post(){hi(!1,["city-shed"])}},warehouse:{id:"tech-warehouse",title:F("tech_warehouse"),desc:F("tech_warehouse_desc"),category:"storage",era:"industrialized",reqs:{storage:3,high_tech:3,smelting:2},grant:["storage",4],cost:{Knowledge:()=>40500,Titanium:()=>3e3},effect:F("tech_warehouse_effect"),action(){return!!ii($(this)[0])},post(){hi(!1,["city-shed"])}},cameras:{id:"tech-cameras",title:F("tech_cameras"),desc:F("tech_cameras_desc"),category:"storage",era:"globalized",reqs:{storage:4,high_tech:4},grant:["storage",5],cost:{Money:()=>9e4,Knowledge:()=>65e3},effect:F("tech_cameras_effect"),action(){return!!ii($(this)[0])}},pocket_dimensions:{id:"tech-pocket_dimensions",title:F("tech_pocket_dimensions"),desc:F("tech_pocket_dimensions_desc"),category:"storage",era:"early_space",path:["standard"],reqs:{particles:1,storage:5},grant:["storage",6],cost:{Knowledge:()=>108e3},effect:F("tech_pocket_dimensions_effect"),action(){return!!ii($(this)[0])}},ai_logistics:{id:"tech-ai_logistics",title:F("tech_ai_logistics"),desc:F("tech_ai_logistics"),category:"storage",era:"interstellar",reqs:{storage:6,proxima:2,science:13},grant:["storage",7],cost:{Knowledge:()=>65e4},effect:F("tech_ai_logistics_effect"),action(){return!!ii($(this)[0])}},containerization:{id:"tech-containerization",title:F("tech_containerization"),desc:F("tech_containerization_desc"),category:"storage",era:"civilized",reqs:{cement:1,mining:1,storage:1,science:1},grant:["container",1],cost:{Knowledge:()=>2700},effect:F("tech_containerization_effect"),action(){return!!ii($(this)[0])&&(t.city.storage_yard={count:0},!0)}},reinforced_crates:{id:"tech-reinforced_crates",title:F("tech_reinforced_crates"),desc:F("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=F("resource_Bones_name");return t.race.smoldering?e=F("resource_Chrysotile_name"):t.race.kindling_kindred&&(e=F("resource_Stone_name")),F("tech_reinforced_crates_alt_effect",[e])}return F("tech_reinforced_crates_effect")},action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},cranes:{id:"tech-cranes",title:F("tech_cranes"),desc:F("tech_cranes_desc"),category:"storage",era:"discovery",reqs:{container:2,high_tech:2},grant:["container",3],cost:{Knowledge:()=>18e3,Copper:()=>1e3,Steel:()=>2500},effect:F("tech_cranes_effect"),action(){return!!ii($(this)[0])}},titanium_crates:{id:"tech-titanium_crates",title:()=>F("tech_titanium_crates",[t.resource.Titanium.name]),desc:()=>F("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:()=>F("tech_titanium_crates_effect",[t.resource.Titanium.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},mythril_crates:{id:"tech-mythril_crates",title:()=>F("tech_mythril_crates",[t.resource.Mythril.name]),desc:()=>F("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:()=>F("tech_mythril_crates_effect",[t.resource.Mythril.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},infernite_crates:{id:"tech-infernite_crates",title:()=>F("tech_crates",[t.resource.Infernite.name]),desc:()=>F("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:()=>F("tech_infernite_crates_effect",[t.resource.Infernite.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},graphene_crates:{id:"tech-graphene_crates",title:()=>F("tech_crates",[t.resource.Graphene.name]),desc:()=>F("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:()=>F("tech_graphene_crates_effect",[t.resource.Graphene.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},bolognium_crates:{id:"tech-bolognium_crates",title:()=>F("tech_crates",[t.resource.Bolognium.name]),desc:()=>F("tech_crates",[t.resource.Bolognium.name]),category:"storage",era:"intergalactic",reqs:{container:7,gateway:3},grant:["container",8],cost:{Knowledge:()=>342e4,Bolognium:()=>9e4},effect:()=>F("tech_bolognium_crates_effect",[t.resource.Bolognium.name]),action(){return!!ii($(this)[0])}},steel_containers:{id:"tech-steel_containers",title:()=>F("tech_containers",[t.resource.Steel.name]),desc:()=>F("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 F("tech_steel_containers_alt_effect",[t.resource[e].name,t.resource.Steel.name])}return F("tech_steel_containers_effect",[t.resource.Steel.name])},action(){return!!ii($(this)[0])&&(t.city.warehouse={count:0},!0)}},gantry_crane:{id:"tech-gantry_crane",title:F("tech_gantry_crane"),desc:F("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:F("tech_gantry_crane_effect"),action(){return!!ii($(this)[0])}},alloy_containers:{id:"tech-alloy_containers",title:()=>F("tech_containers",[t.resource.Alloy.name]),desc:()=>F("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:()=>F("tech_alloy_containers_effect",[t.resource.Alloy.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},mythril_containers:{id:"tech-mythril_containers",title:()=>F("tech_containers",[t.resource.Mythril.name]),desc:()=>F("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:()=>F("tech_mythril_containers_effect",[t.resource.Mythril.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},adamantite_containers:{id:"tech-adamantite_containers",title:()=>F("tech_containers",[t.resource.Adamantite.name]),desc:()=>F("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:()=>F("tech_adamantite_containers_effect",[t.resource.Adamantite.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},aerogel_containers:{id:"tech-aerogel_containers",title:()=>F("tech_containers",[t.resource.Aerogel.name]),desc:()=>F("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:()=>F("tech_aerogel_containers_effect",[t.resource.Aerogel.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},bolognium_containers:{id:"tech-bolognium_containers",title:()=>F("tech_containers",[t.resource.Bolognium.name]),desc:()=>F("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:()=>F("tech_bolognium_containers_effect",[t.resource.Bolognium.name]),action(){return!!ii($(this)[0])}},nanoweave_containers:{id:"tech-nanoweave_containers",title:()=>F("tech_nanoweave_containers",[t.resource.Nanoweave.name]),desc:()=>F("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:()=>F("tech_nanoweave_containers_effect",[t.resource.Nanoweave.name]),action(){return!!ii($(this)[0])}},evil_planning:{id:"tech-evil_planning",title:F("tech_urban_planning"),desc:F("tech_urban_planning"),category:"queues",era:"civilized",wiki:!!t.race.terrifying,reqs:{banking:2},grant:["queue",1],trait:["terrifying"],cost:{Knowledge:()=>2500},effect:F("tech_urban_planning_effect"),action(){return!!ii($(this)[0])&&(t.queue.display=!0,!0)},post(){fs()}},urban_planning:{id:"tech-urban_planning",title:F("tech_urban_planning"),desc:F("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:F("tech_urban_planning_effect"),action(){return!!ii($(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(){fs()}},zoning_permits:{id:"tech-zoning_permits",title:F("tech_zoning_permits"),desc:F("tech_zoning_permits"),category:"queues",era:"industrialized",reqs:{queue:1,high_tech:3},grant:["queue",2],cost:{Knowledge:()=>28e3},effect:()=>F("tech_zoning_permits_effect",[t.genes.queue&&t.genes.queue>=2?4:2]),action(){return!!ii($(this)[0])},post(){fs()}},urbanization:{id:"tech-urbanization",title:F("tech_urbanization"),desc:F("tech_urbanization"),category:"queues",era:"globalized",reqs:{queue:2,high_tech:6},grant:["queue",3],cost:{Knowledge:()=>95e3},effect:()=>F("tech_urbanization_effect",[t.genes.queue&&t.genes.queue>=2?6:3]),action(){return!!ii($(this)[0])},post(){fs()}},assistant:{id:"tech-assistant",title:F("tech_assistant"),desc:F("tech_assistant"),category:"queues",era:"civilized",reqs:{queue:1,science:4},grant:["r_queue",1],cost:{Knowledge:()=>5e3},effect:F("tech_assistant_effect"),action(){return!!ii($(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(){ys(),t.settings.tabLoad&&$("#resQueue").removeAttr("style")}},government:{id:"tech-government",title:F("tech_government"),desc:F("tech_government_desc"),category:"government",era:"civilized",reqs:{currency:1},grant:["govern",1],cost:{Knowledge:()=>750},effect:F("tech_government_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#govType"},"update"),zs({el:"#foreign"},"update"),zs({el:"#government .govTabs2"},"update"),t.settings.tabLoad&&$("#government .govTabs2").removeAttr("style")}},theocracy:{id:"tech-theocracy",title:F("govern_theocracy"),desc:F("govern_theocracy"),category:"government",era:"civilized",reqs:{govern:1,theology:2},grant:["gov_theo",1],cost:{Knowledge:()=>1200},effect:F("tech_theocracy_effect"),action(){return!!ii($(this)[0])}},republic:{id:"tech-republic",title:F("govern_republic"),desc:F("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:F("tech_republic_effect"),action(){return!!ii($(this)[0])}},socialist:{id:"tech-socialist",title:F("govern_socialist"),desc:F("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:F("tech_socialist_effect"),action(){return!!ii($(this)[0])}},corpocracy:{id:"tech-corpocracy",title:F("govern_corpocracy"),desc:F("govern_corpocracy"),category:"government",era:"industrialized",reqs:{govern:2,high_tech:3},grant:["gov_corp",1],cost:{Knowledge:()=>26e3},effect:F("tech_corpocracy_effect"),action(){return!!ii($(this)[0])}},technocracy:{id:"tech-technocracy",title:F("govern_technocracy"),desc:F("govern_technocracy"),category:"government",era:"industrialized",reqs:{govern:2,high_tech:3},grant:["govern",3],cost:{Knowledge:()=>26e3},effect:F("tech_technocracy_effect"),action(){return!!ii($(this)[0])}},federation:{id:"tech-federation",title:F("govern_federation"),desc:F("govern_federation"),category:"government",era:"early_space",reqs:{govern:2},condition:()=>t.tech.unify&&t.tech.unify>=2||oe(),grant:["gov_fed",1],cost:{Knowledge:()=>3e4},effect:F("tech_federation_effect"),action(){return!!ii($(this)[0])}},magocracy:{id:"tech-magocracy",title:F("govern_magocracy"),desc:F("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:F("tech_magocracy_effect"),action(){return!!ii($(this)[0])}},governor:{id:"tech-governor",title:F("tech_governor"),desc:F("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:F("tech_governor_effect"),action(){return!!ii($(this)[0])&&(t.settings.showGovernor=!0,!0)},post(){E()}},spy:{id:"tech-spy",title:F("tech_spy"),desc:F("tech_spy"),category:"spies",era:"civilized",reqs:{govern:1},grant:["spy",1],cost:{Knowledge:()=>1250},effect:F("tech_spy_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#foreign"},"update")}},espionage:{id:"tech-espionage",title:F("tech_espionage"),desc:F("tech_espionage"),category:"spies",era:"discovery",reqs:{spy:1,high_tech:1},grant:["spy",2],cost:{Knowledge:()=>7500},effect:F("tech_espionage_effect"),action(){return!!ii($(this)[0])&&(t.settings.msgFilters.spy.unlocked||(t.settings.msgFilters.spy.unlocked=!0,t.settings.msgFilters.spy.vis=!0),!0)},post(){zs({el:"#foreign"},"update")}},spy_training:{id:"tech-spy_training",title:F("tech_spy_training"),desc:F("tech_spy_training"),category:"spies",era:"discovery",reqs:{spy:2,boot_camp:1},grant:["spy",3],cost:{Knowledge:()=>1e4},effect:F("tech_spy_training_effect"),action(){return!!ii($(this)[0])}},spy_gadgets:{id:"tech-spy_gadgets",title:F("tech_spy_gadgets"),desc:F("tech_spy_gadgets"),category:"spies",era:"discovery",reqs:{spy:3,high_tech:2},grant:["spy",4],cost:{Knowledge:()=>15e3},effect:F("tech_spy_gadgets_effect"),action(){return!!ii($(this)[0])}},code_breakers:{id:"tech-code_breakers",title:F("tech_code_breakers"),desc:F("tech_code_breakers"),category:"spies",era:"industrialized",reqs:{spy:4,high_tech:4},grant:["spy",5],cost:{Knowledge:()=>55e3},effect:F("tech_code_breakers_effect"),action(){return!!ii($(this)[0])}},currency:{id:"tech-currency",title:F("tech_currency"),desc:F("tech_currency_desc"),category:"banking",era:"civilized",reqs:{housing:1},grant:["currency",1],cost:{Knowledge:()=>22,Lumber:()=>10},effect:F("tech_currency_effect"),action(){return!!ii($(this)[0])&&(t.resource.Money.display=!0,!0)}},market:{id:"tech-market",title:F("tech_market"),desc:F("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:F("tech_market_effect"),action(){return!!ii($(this)[0])&&(t.settings.showResources=!0,t.settings.showMarket=!0,!0)}},tax_rates:{id:"tech-tax_rates",title:F("tech_tax_rates"),desc:F("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:F("tech_tax_rates_effect"),action(){return!!ii($(this)[0])&&(t.civic.taxes.display=!0,!0)}},large_trades:{id:"tech-large_trades",title:F("tech_large_trades"),desc:F("tech_large_trades_desc"),category:"market",era:"civilized",reqs:{currency:3},not_trait:["terrifying"],grant:["currency",4],cost:{Knowledge:()=>6750},effect:F("tech_large_trades_effect"),action(){return!!ii($(this)[0])},post(){t.race.noble&&(t.tech.currency=5,Jr())}},corruption:{id:"tech-corruption",title:F("tech_corruption"),desc:F("tech_corruption_desc"),category:"banking",era:"industrialized",reqs:{currency:4,high_tech:3},not_trait:["terrifying","noble"],grant:["currency",5],cost:{Knowledge:()=>36e3},effect:F("tech_corruption_effect"),action(){return!!ii($(this)[0])}},massive_trades:{id:"tech-massive_trades",title:F("tech_massive_trades"),desc:F("tech_massive_trades_desc"),category:"market",era:"globalized",reqs:{currency:5,high_tech:4},not_trait:["terrifying"],grant:["currency",6],cost:{Knowledge:()=>108e3},effect:F("tech_massive_trades_effect"),action(){return!!ii($(this)[0])}},trade:{id:"tech-trade",title:F("tech_trade"),desc:F("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:F("tech_trade_effect"),action(){return!!ii($(this)[0])&&(t.city.trade={count:0},t.city.market.active=!0,!0)}},diplomacy:{id:"tech-diplomacy",title:F("tech_diplomacy"),desc:F("tech_diplomacy_desc"),category:"market",era:"discovery",reqs:{trade:1,high_tech:1},not_trait:["terrifying"],grant:["trade",2],cost:{Knowledge:()=>16200},effect:F("tech_diplomacy_effect"),action(){return!!ii($(this)[0])}},freight:{id:"tech-freight",title:F("tech_freight"),desc:F("tech_freight_desc"),category:"market",era:"industrialized",reqs:{trade:2,high_tech:3},not_trait:["terrifying"],grant:["trade",3],cost:{Knowledge:()=>37800},effect:F("tech_freight_effect"),action(){return!!ii($(this)[0])},post(){t.tech.high_tech>=6&&qe("Physics")}},wharf:{id:"tech-wharf",title:F("tech_wharf"),desc:F("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:F("tech_wharf_effect"),action(){return!!ii($(this)[0])&&(t.city.wharf={count:0},!0)}},banking:{id:"tech-banking",title:F("tech_banking"),desc:F("tech_banking_desc"),category:"banking",era:"civilized",reqs:{currency:1},grant:["banking",1],cost:{Knowledge:()=>90},effect:F("tech_banking_effect"),action(){return!!ii($(this)[0])&&(t.city.bank={count:0},!0)}},investing:{id:"tech-investing",title:F("tech_investing"),desc:F("tech_investing_desc"),category:"banking",era:"civilized",reqs:{banking:1},grant:["banking",2],cost:{Money:()=>2500,Knowledge:()=>900},effect:F("tech_investing_effect"),action(){return!!ii($(this)[0])&&(t.civic.banker.display=!0,!0)}},vault:{id:"tech-vault",title:F("tech_vault"),desc:F("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:F("tech_vault_effect"),action(){return!!ii($(this)[0])}},bonds:{id:"tech-bonds",title:F("tech_bonds"),desc:F("tech_bonds"),category:"banking",era:"civilized",reqs:{banking:3},grant:["banking",4],cost:{Money:()=>2e4,Knowledge:()=>5e3},effect:F("tech_bonds_effect"),action(){return!!ii($(this)[0])}},steel_vault:{id:"tech-steel_vault",title:F("tech_steel_vault"),desc:F("tech_steel_vault"),category:"banking",era:"civilized",reqs:{banking:4,smelting:2},grant:["banking",5],cost:{Money:()=>3e4,Knowledge:()=>6750,Steel:()=>3e3},effect:F("tech_steel_vault_effect"),action(){return!!ii($(this)[0])}},eebonds:{id:"tech-eebonds",title:F("tech_eebonds"),desc:F("tech_eebonds"),category:"banking",era:"discovery",reqs:{banking:5,high_tech:1},grant:["banking",6],cost:{Money:()=>75e3,Knowledge:()=>18e3},effect:F("tech_eebonds_effect"),action(){return!!ii($(this)[0])}},swiss_banking:{id:"tech-swiss_banking",title:jr(),desc:jr(),category:"banking",era:"industrialized",reqs:{banking:6},grant:["banking",7],cost:{Money:()=>125e3,Knowledge:()=>45e3},effect:F("tech_swiss_banking_effect"),action(){return!!ii($(this)[0])}},safety_deposit:{id:"tech-safety_deposit",title:F("tech_safety_deposit"),desc:F("tech_safety_deposit"),category:"banking",era:"globalized",reqs:{banking:7,high_tech:4},grant:["banking",8],cost:{Money:()=>25e4,Knowledge:()=>67500},effect:F("tech_safety_deposit_effect"),action(){return!!ii($(this)[0])}},stock_market:{id:"tech-stock_market",title:F("tech_stock_market"),desc:F("tech_stock_market"),category:"arpa",era:"globalized",reqs:{banking:8,high_tech:6},grant:["banking",9],cost:{Money:()=>325e3,Knowledge:()=>108e3},effect:F("tech_stock_market_effect"),action(){return!!ii($(this)[0])},post(){qe("Physics")}},hedge_funds:{id:"tech-hedge_funds",title:F("tech_hedge_funds"),desc:F("tech_hedge_funds"),category:"banking",era:"early_space",reqs:{banking:9,stock_exchange:1},grant:["banking",10],cost:{Money:()=>375e3,Knowledge:()=>126e3},effect:F("tech_hedge_funds_effect"),action(){return!!ii($(this)[0])}},four_oh_one:{id:"tech-four_oh_one",title:F("tech_four_oh_one"),desc:F("tech_four_oh_one"),category:"banking",era:"early_space",reqs:{banking:10},grant:["banking",11],cost:{Money:()=>425e3,Knowledge:()=>144e3},effect:F("tech_four_oh_one_effect"),action(){return!!ii($(this)[0])},flair:()=>F("tech_four_oh_one_flair")},exchange:{id:"tech-exchange",title:F("tech_exchange"),desc:F("tech_exchange"),category:"banking",era:"interstellar",reqs:{banking:11,alpha:2,graphene:1},grant:["banking",12],cost:{Money:()=>1e6,Knowledge:()=>675e3},effect:F("tech_exchange_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.exchange={count:0,on:0},!0)}},foreign_investment:{id:"tech-foreign_investment",title:F("tech_foreign_investment"),desc:F("tech_foreign_investment"),category:"banking",era:"intergalactic",reqs:{banking:12,xeno:10},grant:["banking",13],cost:{Money:()=>1e8,Knowledge:()=>8e6},effect:F("tech_foreign_investment_effect"),action(){return!!ii($(this)[0])}},mythril_vault:{id:"tech-mythril_vault",title:F("tech_mythril_vault"),desc:F("tech_mythril_vault"),category:"banking",era:"early_space",reqs:{banking:5,space:3},grant:["vault",1],cost:{Money:()=>5e5,Knowledge:()=>15e4,Mythril:()=>750},effect:F("tech_mythril_vault_effect"),action(){return!!ii($(this)[0])}},neutronium_vault:{id:"tech-neutronium_vault",title:F("tech_neutronium_vault"),desc:F("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:F("tech_neutronium_vault_effect"),action(){return!!ii($(this)[0])}},adamantite_vault:{id:"tech-adamantite_vault",title:F("tech_adamantite_vault"),desc:F("tech_adamantite_vault"),category:"banking",era:"interstellar",reqs:{vault:2,alpha:2},grant:["vault",3],cost:{Money:()=>2e6,Knowledge:()=>56e4,Adamantite:()=>2e4},effect:F("tech_adamantite_vault_effect"),action(){return!!ii($(this)[0])}},graphene_vault:{id:"tech-graphene_vault",title:F("tech_graphene_vault"),desc:F("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:F("tech_graphene_vault_effect"),action(){return!!ii($(this)[0])}},home_safe:{id:"tech-home_safe",title:F("tech_home_safe"),desc:F("tech_home_safe"),category:"banking",era:"discovery",reqs:{banking:5},grant:["home_safe",1],cost:{Money:()=>42e3,Knowledge:()=>8e3,Steel:()=>4500},effect:F("tech_home_safe_effect"),action(){return!!ii($(this)[0])}},fire_proof_safe:{id:"tech-fire_proof_safe",title:F("tech_fire_proof_safe"),desc:F("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:F("tech_fire_proof_safe_effect"),action(){return!!ii($(this)[0])}},tamper_proof_safe:{id:"tech-tamper_proof_safe",title:F("tech_tamper_proof_safe"),desc:F("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:F("tech_tamper_proof_safe_effect"),action(){return!!ii($(this)[0])}},monument:{id:"tech-monument",title:F("tech_monument"),desc:F("tech_monument"),category:"arpa",era:"globalized",reqs:{high_tech:6},grant:["monument",1],cost:{Knowledge:()=>12e4},effect:F("tech_monument_effect"),action(){return!!ii($(this)[0])&&(t.arpa.m_type=qe("Monument"),!0)},post(){qe("Physics")}},tourism:{id:"tech-tourism",title:F("tech_tourism"),desc:F("tech_tourism"),category:"banking",era:"early_space",reqs:{monuments:2,monument:1},not_trait:["cataclysm","lone_survivor"],grant:["monument",2],cost:{Knowledge:()=>15e4},effect:F("tech_tourism_effect"),action(){return!!ii($(this)[0])&&(t.city.tourist_center={count:0,on:0},!0)}},xeno_tourism:{id:"tech-xeno_tourism",title:F("tech_xeno_tourism"),desc:F("tech_xeno_tourism"),category:"banking",era:"intergalactic",reqs:{monument:2,xeno:10,monuments:10},not_trait:["cataclysm"],grant:["monument",3],cost:{Knowledge:()=>8e6},effect:F("tech_xeno_tourism_effect"),action(){return!!ii($(this)[0])}},science:{id:"tech-science",title:F("tech_science"),desc:F("tech_science_desc"),category:"science",era:"civilized",reqs:{housing:1},grant:["science",1],cost:{Knowledge:()=>65},effect:F("tech_science_effect"),action(){return!!ii($(this)[0])&&(t.city.university={count:0},!0)}},library:{id:"tech-library",title:F("tech_library"),desc:F("tech_library_desc"),category:"science",era:"civilized",reqs:{science:1,cement:1},grant:["science",2],cost:{Knowledge:()=>720},effect:F("tech_library_effect"),action(){return!!ii($(this)[0])&&(t.city.library={count:0},!0)}},thesis:{id:"tech-thesis",title:F("tech_thesis"),desc:F("tech_thesis_desc"),category:"science",era:"civilized",reqs:{science:2},grant:["science",3],cost:{Knowledge:()=>1125},effect:F("tech_thesis_effect"),action(){return!!ii($(this)[0])}},research_grant:{id:"tech-research_grant",title:F("tech_research_grant"),desc:F("tech_research_grant_desc"),category:"science",era:"civilized",reqs:{science:3},grant:["science",4],cost:{Knowledge:()=>3240},effect:F("tech_research_grant_effect"),action(){return!!ii($(this)[0])}},scientific_journal:{id:"tech-scientific_journal",title:()=>"magic"===t.race.universe?F("tech_magic_tomes"):F("tech_scientific_journal"),desc:()=>"magic"===t.race.universe?F("tech_magic_tomes_desc"):F("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?F("tech_magic_tomes_effect"):F("tech_scientific_journal_effect"),action(){return!!ii($(this)[0])}},adjunct_professor:{id:"tech-adjunct_professor",title:F("tech_adjunct_professor"),desc:F("tech_adjunct_professor"),category:"science",era:"industrialized",reqs:{science:5},grant:["science",6],cost:{Knowledge:()=>36e3},effect:()=>F("tech_adjunct_professor_effect",[di(),t.civic.scientist?t.civic.scientist.name:F("job_scientist")]),action(){return!!ii($(this)[0])}},tesla_coil:{id:"tech-tesla_coil",title:F("tech_tesla_coil"),desc:F("tech_tesla_coil_desc"),category:"science",era:"industrialized",reqs:{science:6,high_tech:3},grant:["science",7],cost:{Knowledge:()=>51750},effect:()=>F("tech_tesla_coil_effect",[di()]),action(){return!!ii($(this)[0])}},internet:{id:"tech-internet",title:F("tech_internet"),desc:F("tech_internet"),category:"science",era:"globalized",reqs:{science:7,high_tech:4},grant:["science",8],cost:{Knowledge:()=>61200},effect:F("tech_internet_effect"),action(){return!!ii($(this)[0])&&(t.race.toxic&&"troll"===t.race.species&&Pn("godwin"),!0)}},observatory:{id:"tech-observatory",title:F("tech_observatory"),desc:F("tech_observatory"),category:"science",era:"early_space",reqs:{science:8,space:3,luna:1},grant:["science",9],cost:{Knowledge:()=>148e3},effect:F("tech_observatory_effect"),action(){return!!ii($(this)[0])&&(t.space.observatory={count:0,on:0},!0)}},world_collider:{id:"tech-world_collider",title:F("tech_world_collider"),desc:F("tech_world_collider"),category:"science",era:"deep_space",path:["standard"],reqs:{science:9,elerium:2},grant:["science",10],cost:{Knowledge:()=>35e4},effect:()=>F("tech_world_collider_effect",[Vt().dwarf]),action(){return!!ii($(this)[0])&&(t.space.world_collider={count:0},t.space.world_controller={count:0,on:0},!0)},flair:`
                ${F("tech_world_collider_flair1")}
                ${F("tech_world_collider_flair2")}
                `},laboratory:{id:"tech-laboratory",title:()=>"magic"===t.race.universe?F("tech_sanctum"):F("tech_laboratory"),desc:()=>"magic"===t.race.universe?F("tech_sanctum"):F("tech_laboratory_desc"),category:"science",era:"interstellar",reqs:{science:11,alpha:2},grant:["science",12],cost:{Knowledge:()=>5e5},effect:()=>"magic"===t.race.universe?F("tech_sanctum_effect"):F("tech_laboratory_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.laboratory={count:0,on:0},!0)},flair:()=>"magic"===t.race.universe?F("tech_sanctum_flair"):F("tech_laboratory_flair")},virtual_assistant:{id:"tech-virtual_assistant",title:F("tech_virtual_assistant"),desc:F("tech_virtual_assistant"),category:"science",era:"interstellar",reqs:{science:12,high_tech:12},grant:["science",13],cost:{Knowledge:()=>635e3},effect:()=>"magic"===t.race.universe?F("tech_virtual_assistant_magic_effect"):F("tech_virtual_assistant_effect"),action(){return!!ii($(this)[0])}},dimensional_readings:{id:"tech-dimensional_readings",title:F("tech_dimensional_readings"),desc:F("tech_dimensional_readings"),category:"science",era:"interstellar",reqs:{science:13,infernite:2},grant:["science",14],cost:{Knowledge:()=>75e4},effect:()=>F("tech_dimensional_readings_effect"),action(){return!!ii($(this)[0])}},quantum_entanglement:{id:"tech-quantum_entanglement",title:F("tech_quantum_entanglement"),desc:F("tech_quantum_entanglement"),category:"science",era:"interstellar",reqs:{science:14,neutron:1},grant:["science",15],cost:{Knowledge:()=>85e4,Neutronium:()=>7500,Soul_Gem:()=>2},effect:()=>F("tech_quantum_entanglement_effect",[2,"magic"===t.race.universe?F("tech_sanctum"):F("interstellar_laboratory_title"),di()]),action(){return!!ii($(this)[0])}},expedition:{id:"tech-expedition",title:()=>"magic"===t.race.universe?F("tech_expedition_wiz"):F("tech_expedition"),desc:()=>"magic"===t.race.universe?F("tech_expedition_wiz"):F("tech_expedition"),category:"science",era:"intergalactic",reqs:{science:15,xeno:4},grant:["science",16],cost:{Knowledge:()=>535e4},effect:()=>"magic"===t.race.universe?F("tech_expedition_wiz_effect"):F("tech_expedition_effect"),action(){return!!ii($(this)[0])}},subspace_sensors:{id:"tech-subspace_sensors",title:F("tech_subspace_sensors"),desc:F("tech_subspace_sensors"),category:"science",era:"intergalactic",reqs:{science:16,high_tech:16},grant:["science",17],cost:{Knowledge:()=>6e6},effect:()=>F("tech_subspace_sensors_effect"),action(){return!!ii($(this)[0])}},alien_database:{id:"tech-alien_database",title:F("tech_alien_database"),desc:F("tech_alien_database"),category:"progress",era:"intergalactic",reqs:{science:17,conflict:5},grant:["science",18],cost:{Knowledge:()=>825e4},effect:()=>F("tech_alien_database_effect"),action(){return!!ii($(this)[0])}},orichalcum_capacitor:{id:"tech-orichalcum_capacitor",title:F("tech_orichalcum_capacitor"),desc:F("tech_orichalcum_capacitor"),category:"science",era:"intergalactic",reqs:{science:18,high_tech:17},grant:["science",19],cost:{Knowledge:()=>125e5,Orichalcum:()=>25e4},effect:()=>F("tech_orichalcum_capacitor_effect"),action(){return!!ii($(this)[0])}},advanced_biotech:{id:"tech-advanced_biotech",title:F("tech_advanced_biotech"),desc:F("tech_advanced_biotech"),category:"science",era:"dimensional",reqs:{science:19,high_tech:18},grant:["science",20],cost:{Knowledge:()=>255e5},effect:()=>F("tech_advanced_biotech_effect"),action(){return!!ii($(this)[0])}},codex_infinium:{id:"tech-codex_infinium",title:F("tech_codex_infinium"),desc:F("tech_codex_infinium"),category:"science",era:"dimensional",reqs:{science:20,sphinx_bribe:1},grant:["science",21],cost:{Knowledge:()=>401e5,Codex:()=>1},effect:()=>F("tech_codex_infinium_effect"),action(){return!!ii($(this)[0])&&(t.resource.Codex.display=!1,!0)}},bioscience:{id:"tech-bioscience",title:F("tech_bioscience"),desc:F("tech_bioscience_desc"),category:"science",era:"globalized",reqs:{science:8},grant:["genetics",1],cost:{Knowledge:()=>67500},effect:F("tech_bioscience_effect"),action(){return!!ii($(this)[0])&&(t.city.biolab={count:0},!0)}},genetics:{id:"tech-genetics",title:F("tech_genetics"),desc:F("tech_genetics"),category:"arpa",era:"globalized",reqs:{genetics:1,high_tech:6},grant:["genetics",2],cost:{Knowledge:()=>108e3},effect:F("tech_genetics_effect"),action(){return!!ii($(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(){qe("Genetics")}},crispr:{id:"tech-crispr",title:F("tech_crispr"),desc:F("tech_crispr"),category:"genes",era:"globalized",reqs:{genetics:3},grant:["genetics",4],cost:{Knowledge:()=>125e3},effect:()=>t.race.artifical?F("tech_crispr_effect_artifical"):F("tech_crispr_effect"),action(){return!!ii($(this)[0])&&(t.settings.arpa.crispr=!0,t.settings.arpa.arpaTabs=2,!0)},post(){qe("Genetics"),qe("Crispr")}},shotgun_sequencing:{id:"tech-shotgun_sequencing",title:F("tech_shotgun_sequencing"),desc:()=>t.race.artifical?F("tech_shotgun_sequencing_desc_artifical"):F("tech_shotgun_sequencing_desc"),category:"genes",era:"early_space",reqs:{genetics:4},grant:["genetics",5],cost:{Knowledge:()=>165e3},effect:()=>t.race.artifical?F("tech_shotgun_sequencing_effect_artifical"):F("tech_shotgun_sequencing_effect"),action(){return!!ii($(this)[0])&&(t.arpa.sequence.boost=!0,!0)},post(){qe("Genetics")}},de_novo_sequencing:{id:"tech-de_novo_sequencing",title:F("tech_de_novo_sequencing"),desc:F("tech_de_novo_sequencing"),category:"genes",era:"early_space",reqs:{genetics:5},grant:["genetics",6],cost:{Knowledge:()=>22e4},effect:()=>t.race.artifical?F("tech_de_novo_sequencing_effect_artifical"):F("tech_de_novo_sequencing_effect"),action(){return!!ii($(this)[0])&&(t.resource.Genes.display=!0,!0)},post(){qe("Genetics")}},dna_sequencer:{id:"tech-dna_sequencer",title:()=>t.race.artifical?F("tech_code_sequencer"):F("tech_dna_sequencer"),desc:()=>t.race.artifical?F("tech_code_sequencer"):F("tech_dna_sequencer"),category:"genes",era:"deep_space",reqs:{genetics:6},grant:["genetics",7],cost:{Knowledge:()=>3e5},effect:()=>t.race.artifical?F("tech_code_sequencer_effect"):F("tech_dna_sequencer_effect"),action(){return!!ii($(this)[0])&&(t.arpa.sequence.auto=!0,!0)},post(){qe("Genetics")}},rapid_sequencing:{id:"tech-rapid_sequencing",title:()=>t.race.artifical?F("tech_agile_development"):F("tech_rapid_sequencing"),desc:()=>t.race.artifical?F("tech_agile_development"):F("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?F("tech_agile_development_effect"):F("tech_rapid_sequencing_effect"),action(){return!!ii($(this)[0])}},mad_science:{id:"tech-mad_science",title:()=>"magic"===t.race.universe?F("tech_sages"):F("tech_mad_science"),desc:()=>"magic"===t.race.universe?F("tech_sages"):F("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?F("tech_sages_effect"):F("tech_mad_science_effect"),action(){return!!ii($(this)[0])&&(t.race.terrifying&&(t.civic.taxes.display=!0),t.city.wardenclyffe={count:0,on:0},!0)}},electricity:{id:"tech-electricity",title:F("tech_electricity"),desc:F("tech_electricity"),category:"power_generation",era:"discovery",reqs:{high_tech:1},grant:["high_tech",2],cost:{Knowledge:()=>13500,Copper:()=>1e3},effect:F("tech_electricity_effect"),action(){return!!ii($(this)[0])&&(ms(F("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,Si(),!0)}},matter_replicator:{id:"tech-matter_replicator",title:()=>"antimatter"!==t.race.universe||t.race.amexplode?F("tech_replicator"):F("tech_antireplicator"),desc:()=>"antimatter"!==t.race.universe||t.race.amexplode?F("tech_replicator"):F("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?F("tech_replicator_effect_alt"):F("tech_antireplicator_effect_alt"),action(){if(ii($(this)[0])){if("antimatter"===t.race.universe&&t.race.amexplode){jn("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(){E()}},industrialization:{id:"tech-industrialization",title:F("tech_industrialization"),desc:F("tech_industrialization"),category:"progress",era:"industrialized",reqs:{high_tech:2,cement:2,steel_container:1},grant:["high_tech",3],cost:{Knowledge:()=>25200},effect:F("tech_industrialization_effect"),action(){return!!ii($(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(){os()}},electronics:{id:"tech-electronics",title:F("tech_electronics"),desc:F("tech_electronics"),category:"progress",era:"industrialized",reqs:{high_tech:3,titanium:1},grant:["high_tech",4],cost:{Knowledge:()=>5e4},effect:F("tech_electronics_effect"),action(){return!!ii($(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:F("tech_fission"),desc:F("tech_fission"),category:"progress",era:"globalized",reqs:{high_tech:4,uranium:1},grant:["high_tech",5],cost:{Knowledge:()=>77400,Uranium:()=>10},effect:F("tech_fission_effect"),action(){return!!ii($(this)[0])&&(ms(F("tech_fission_msg"),"info",!1,["progress"]),t.city.fission_power={count:0,on:0},!0)}},arpa:{id:"tech-arpa",title:F("tech_arpa"),desc:F("tech_arpa_desc"),category:"arpa",era:"globalized",reqs:{high_tech:5},grant:["high_tech",6],cost:{Knowledge:()=>9e4},effect:F("tech_arpa_effect"),action(){return!!ii($(this)[0])&&(t.settings.showGenetics=!0,t.settings.arpa.physics=!0,t.race.truepath&&!t.tech.unify&&(t.tech.unify=1),!0)},post(){qe("Physics")}},rocketry:{id:"tech-rocketry",title:F("tech_rocketry"),desc:F("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:F("tech_rocketry_effect"),action(){return!!ii($(this)[0])&&(t.race.truepath&&!t.tech.rival&&(t.tech.rival=1,ms(F("civics_rival_unlocked",[X(3)]),"info",!1,["progress","combat"])),!0)},post(){qe("Physics")}},robotics:{id:"tech-robotics",title:F("tech_robotics"),desc:F("tech_robotics"),category:"progress",era:"globalized",reqs:{high_tech:7},grant:["high_tech",8],cost:{Knowledge:()=>125e3},effect:F("tech_robotics_effect"),action(){return!!ii($(this)[0])}},lasers:{id:"tech-lasers",title:F("tech_lasers"),desc:F("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:F("tech_lasers_effect"),action(){return!!ii($(this)[0])&&(t.race.cataclysm&&Pn("iron_will",!1,3),!0)}},artifical_intelligence:{id:"tech-artifical_intelligence",title:F("tech_artificial_intelligence"),desc:F("tech_artificial_intelligence"),category:"progress",era:"deep_space",reqs:{high_tech:9},grant:["high_tech",10],cost:{Knowledge:()=>325e3},effect:F("tech_artificial_intelligence_effect"),action(){return!!ii($(this)[0])},flair:()=>F("tech_artificial_intelligence_flair")},quantum_computing:{id:"tech-quantum_computing",title:F("tech_quantum_computing"),desc:F("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:F("tech_quantum_computing_effect"),action(){return!!ii($(this)[0])},flair:()=>F("tech_quantum_computing_flair")},virtual_reality:{id:"tech-virtual_reality",title:F("tech_virtual_reality"),desc:F("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:F("tech_virtual_reality_effect"),action(){return!!ii($(this)[0])},flair:()=>F("tech_virtual_reality_flair")},plasma:{id:"tech-plasma",title:F("tech_plasma"),desc:F("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:F("tech_plasma_effect"),action(){return!!ii($(this)[0])}},shields:{id:"tech-shields",title:F("tech_shields"),desc:F("tech_shields"),category:"stellar_engine",era:"interstellar",reqs:{high_tech:13},grant:["high_tech",14],cost:{Knowledge:()=>85e4},effect:F("tech_shields_effect"),action(){return!!ii($(this)[0])&&(t.settings.space.neutron=!0,t.settings.space.blackhole=!0,!0)}},ai_core:{id:"tech-ai_core",title:F("tech_ai_core"),desc:F("tech_ai_core"),category:"ai_core",era:"interstellar",reqs:{high_tech:14,science:15,blackhole:3},grant:["high_tech",15],cost:{Knowledge:()=>15e5},effect:F("tech_ai_core_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.citadel={count:0,on:0},!0)}},metaphysics:{id:"tech-metaphysics",title:F("tech_metaphysics"),desc:F("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:()=>F("tech_metaphysics_effect"),action(){return!!ii($(this)[0])}},orichalcum_analysis:{id:"tech-orichalcum_analysis",title:F("tech_orichalcum_analysis"),desc:F("tech_orichalcum_analysis"),category:"progress",era:"intergalactic",reqs:{high_tech:16,chthonian:3},grant:["high_tech",17],cost:{Knowledge:()=>122e5,Orichalcum:()=>1e5},effect:()=>F("tech_orichalcum_analysis_effect"),action(){return!!ii($(this)[0])&&(ms(F("tech_orichalcum_analysis_result"),"info",!1,["progress"]),!0)}},cybernetics:{id:"tech-cybernetics",title:F("tech_cybernetics"),desc:F("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:()=>F("tech_cybernetics_effect"),action(){return!!ii($(this)[0])}},blood_pact:{id:"tech-blood_pact",title:F("tech_blood_pact"),desc:F("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:()=>F("tech_blood_pact_effect"),action(){return!!ii($(this)[0])&&(t.settings.arpa.blood=!0,qe("Crispr"),!0)},post(){qe("Blood")}},purify:{id:"tech-purify",title:F("tech_purify"),desc:F("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:()=>F("tech_purify_effect"),action(){return!!ii($(this)[0])}},waygate:{id:"tech-waygate",title:F("tech_waygate"),desc:F("tech_waygate"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:10,b_stone:2},grant:["waygate",1],cost:{Knowledge:()=>55e6},effect:()=>F("tech_waygate_effect"),action(){return!!ii($(this)[0])&&(t.portal.waygate={count:0,progress:0,on:0},!0)}},demonic_infusion:{id:"tech-demonic_infusion",title:F("tech_demonic_infusion"),desc:F("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:()=>Hs(1e3),Knowledge:()=>55e6,Demonic_Essence:()=>1},effect:()=>`
                ${F("tech_demonic_infusion_effect")}
                ${F("tech_demonic_infusion_effect2",[Ns("descend").artifact])}
                `,action(){return t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),ii($(this)[0])&&H(),!1}},gate_key:{id:"tech-gate_key",title:F("tech_gate_key"),desc:F("tech_gate_key"),category:"hell_dimension",era:"dimensional",reqs:{hell_gate:1},grant:["hell_gate",2],cost:{Knowledge:()=>3e7},effect:()=>F("tech_gate_key_effect"),action(){return!!ii($(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:F("tech_gate_turret"),desc:F("tech_gate_turret"),category:"hell_dimension",era:"dimensional",reqs:{hell_gate:2},grant:["hell_gate",3],cost:{Knowledge:()=>32e6},effect:()=>F("tech_gate_turret_effect"),action(){return!!ii($(this)[0])&&(t.portal.gate_turret={count:0,on:0},!0)}},infernite_mine:{id:"tech-infernite_mine",title:F("tech_infernite_mine"),desc:F("tech_infernite_mine"),category:"hell_dimension",era:"dimensional",reqs:{hell_gate:3},grant:["hell_gate",4],cost:{Knowledge:()=>325e5},effect:()=>F("tech_infernite_mine_effect"),action(){return!!ii($(this)[0])&&(t.portal.infernite_mine={count:0,on:0},!0)}},study_corrupt_gem:{id:"tech-study_corrupt_gem",title:F("tech_study_corrupt_gem"),desc:F("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:5e4,Knowledge:()=>185e5,Corrupt_Gem:()=>1},effect:()=>F("tech_study_corrupt_gem_effect"),action(){return!!ii($(this)[0])&&(ms(F("tech_study_corrupt_gem_result"),"info",!1,["progress","hell"]),t.resource.Corrupt_Gem.display=!1,!0)}},soul_binding:{id:"tech-soul_binding",title:F("tech_soul_binding"),desc:F("tech_soul_binding"),category:"hell_dimension",era:"intergalactic",reqs:{corrupt:2,science:19},grant:["forbidden",1],trait:["witch_hunter"],cost:{Knowledge:()=>19e6},effect:()=>F("tech_soul_binding_effect"),action(){return!!ii($(this)[0])}},soul_capacitor:{id:"tech-soul_capacitor",title:F("tech_soul_capacitor"),desc:F("tech_soul_capacitor"),category:"hell_dimension",era:"intergalactic",reqs:{forbidden:1},grant:["forbidden",2],trait:["witch_hunter"],cost:{Knowledge:()=>195e5},effect:()=>F("tech_soul_capacitor_effect"),action(){return!!ii($(this)[0])&&(t.portal.soul_capacitor={count:0,on:0,energy:0,ecap:0},!0)}},soul_capacitor:{id:"tech-soul_capacitor",title:F("tech_soul_capacitor"),desc:F("tech_soul_capacitor"),category:"hell_dimension",era:"intergalactic",reqs:{forbidden:1},grant:["forbidden",2],trait:["witch_hunter"],cost:{Knowledge:()=>195e5},effect:()=>F("tech_soul_capacitor_effect"),action(){return!!ii($(this)[0])&&(t.portal.soul_capacitor={count:0,on:0,energy:0,ecap:0},!0)}},absorption_chamber:{id:"tech-absorption_chamber",title:F("tech_absorption_chamber"),desc:F("tech_absorption_chamber"),category:"hell_dimension",era:"intergalactic",reqs:{forbidden:2},grant:["forbidden",3],trait:["witch_hunter"],cost:{Knowledge:()=>2e7},effect:()=>F("tech_absorption_chamber_effect"),action(){return!!ii($(this)[0])&&(t.portal.absorption_chamber={count:0},!0)}},corrupt_gem_analysis:{id:"tech-corrupt_gem_analysis",title:F("tech_corrupt_gem_analysis"),desc:F("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:()=>F("tech_corrupt_gem_analysis_effect"),action(){return!!ii($(this)[0])&&(ms(F("tech_corrupt_gem_analysis_result"),"info",!1,["progress","hell"]),t.resource.Corrupt_Gem.display=!1,!0)}},hell_search:{id:"tech-hell_search",title:F("tech_hell_search"),desc:F("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:()=>F("tech_hell_search_effect"),action(){return!!ii($(this)[0])&&(ms(F("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:F("tech_codex_infernium"),desc:F("tech_codex_infernium"),category:"progress",era:"dimensional",reqs:{hell_ruins:3},grant:["hell_ruins",4],cost:{Knowledge:()=>235e5,Codex:()=>1},effect:()=>F("tech_codex_infernium_effect"),action(){return!!ii($(this)[0])&&(t.resource.Codex.display=!1,!0)}},lake_analysis:{id:"tech-lake_analysis",title:F("tech_lake_analysis"),desc:F("tech_lake_analysis"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:2},grant:["hell_lake",3],cost:{Knowledge:()=>34e6},effect:()=>F("tech_lake_analysis_effect"),action(){return!!ii($(this)[0])}},lake_threat:{id:"tech-lake_threat",title:F("tech_lake_threat"),desc:F("tech_lake_threat"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:3},grant:["hell_lake",4],cost:{Knowledge:()=>345e5},effect:()=>F("tech_lake_threat_effect"),action(){return!!ii($(this)[0])&&(t.portal.bireme={count:0,on:0,crew:0,mil:0},ms(F("tech_lake_threat_result"),"info",!1,["progress","hell"]),!0)}},lake_transport:{id:"tech-lake_transport",title:F("tech_lake_transport"),desc:F("tech_lake_transport"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:4},grant:["hell_lake",5],cost:{Knowledge:()=>35e6},effect:()=>F("tech_lake_transport_effect"),action(){return!!ii($(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:F("tech_cooling_tower"),desc:F("tech_cooling_tower"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:5},grant:["hell_lake",6],cost:{Knowledge:()=>375e5},effect:()=>F("tech_cooling_tower_effect"),action(){return!!ii($(this)[0])&&(t.portal.cooling_tower={count:0,on:0},!0)}},miasma:{id:"tech-miasma",title:F("tech_miasma"),desc:F("tech_miasma"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:2},grant:["hell_spire",3],cost:{Knowledge:()=>3825e4},effect:()=>F("tech_miasma_effect"),action(){return!!ii($(this)[0])&&(t.portal.port={count:0},!0)}},incorporeal:{id:"tech-incorporeal",title:F("tech_incorporeal"),desc:F("tech_incorporeal"),category:"special",era:"intergalactic",reqs:{science:19},grant:["ascension",1],not_trait:["orbit_decay","witch_hunter"],cost:{Knowledge:()=>175e5,Phage:()=>25},effect:()=>F("tech_incorporeal_effect"),action(){return!!ii($(this)[0])}},tech_ascension:{id:"tech-tech_ascension",title:F("tech_ascension"),desc:F("tech_ascension"),category:"special",era:"intergalactic",reqs:{ascension:1},grant:["ascension",2],not_trait:["orbit_decay","witch_hunter"],cost:{Knowledge:()=>185e5,Plasmid:()=>100},effect:()=>F("tech_ascension_effect"),action(){return!!ii($(this)[0])&&(t.settings.space.sirius=!0,!0)}},terraforming:{id:"tech-terraforming",title:F("tech_terraforming"),desc:F("tech_terraforming"),category:"special",era:"intergalactic",reqs:{science:19},path:["standard"],grant:["terraforming",1],trait:["orbit_decay"],cost:{Knowledge:()=>18e6},effect:()=>F("tech_terraforming_effect",[Vt().red]),action(){return!!ii($(this)[0])&&(t.space.terraformer={count:0},!0)}},cement_processing:{id:"tech-cement_processing",title:F("tech_cement_processing"),desc:F("tech_cement_processing"),category:"ai_core",era:"interstellar",reqs:{high_tech:15},not_trait:["flier"],grant:["ai_core",1],cost:{Knowledge:()=>175e4},effect:F("tech_cement_processing_effect"),action(){return!!ii($(this)[0])}},adamantite_processing_flier:{id:"tech-adamantite_processing_flier",title:F("tech_adamantite_processing"),desc:F("tech_adamantite_processing"),category:"ai_core",era:"interstellar",reqs:{high_tech:15},trait:["flier"],grant:["ai_core",2],cost:{Knowledge:()=>2e6},effect:F("tech_adamantite_processing_effect"),action(){return!!ii($(this)[0])}},adamantite_processing:{id:"tech-adamantite_processing",title:F("tech_adamantite_processing"),desc:F("tech_adamantite_processing"),category:"ai_core",era:"interstellar",reqs:{ai_core:1},not_trait:["flier"],grant:["ai_core",2],cost:{Knowledge:()=>2e6},effect:F("tech_adamantite_processing_effect"),action(){return!!ii($(this)[0])}},graphene_processing:{id:"tech-graphene_processing",title:F("tech_graphene_processing"),desc:F("tech_graphene_processing"),category:"ai_core",era:"intergalactic",reqs:{ai_core:2},grant:["ai_core",3],cost:{Knowledge:()=>25e5},effect:F("tech_graphene_processing_effect"),action(){return!!ii($(this)[0])}},fusion_power:{id:"tech-fusion_power",title:F("tech_fusion_power"),desc:F("tech_fusion_power"),category:"power_generation",era:"interstellar",reqs:{ram_scoop:1},grant:["fusion",1],cost:{Knowledge:()=>64e4},effect:F("tech_fusion_power_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.fusion={count:0,on:0},!0)}},infernium_power:{id:"tech-infernium_power",title:F("tech_infernium_power"),desc:F("tech_infernium_power"),category:"power_generation",era:"dimensional",reqs:{smelting:8,hell_ruins:4},grant:["inferno_power",1],cost:{Knowledge:()=>3e7},effect:F("tech_infernium_power_effect"),action(){return!!ii($(this)[0])&&(t.portal.inferno_power={count:0,on:0},!0)}},thermomechanics:{id:"tech-thermomechanics",title:F("tech_thermomechanics"),desc:F("tech_thermomechanics_desc"),category:"crafting",era:"industrialized",reqs:{high_tech:4},grant:["alloy",1],cost:{Knowledge:()=>6e4},effect:()=>F("tech_thermomechanics_effect"),action(){return!!ii($(this)[0])}},quantum_manufacturing:{id:"tech-quantum_manufacturing",title:F("tech_quantum_manufacturing"),desc:F("tech_quantum_manufacturing"),category:"crafting",era:"deep_space",reqs:{high_tech:11},grant:["q_factory",1],cost:{Knowledge:()=>465e3},effect:F("tech_quantum_manufacturing_effect"),action(){return!!ii($(this)[0])}},worker_drone:{id:"tech-worker_drone",title:F("tech_worker_drone"),desc:F("tech_worker_drone"),category:"mining",era:"deep_space",reqs:{nano:1},grant:["drone",1],cost:{Knowledge:()=>4e5},effect:()=>F("tech_worker_drone_effect",[Vt().gas_moon]),action(){return!!ii($(this)[0])&&(t.space.drone={count:0},!0)}},uranium:{id:"tech-uranium",title:F("tech_uranium"),desc:F("tech_uranium"),category:"power_generation",era:"globalized",reqs:{high_tech:4},grant:["uranium",1],cost:{Knowledge:()=>72e3},effect:F("tech_uranium_effect"),action(){return!!ii($(this)[0])&&(t.resource.Uranium.display=!0,!0)},post(){os()}},uranium_storage:{id:"tech-uranium_storage",title:F("tech_uranium_storage"),desc:F("tech_uranium_storage"),category:"storage",era:"globalized",reqs:{uranium:1},grant:["uranium",2],cost:{Knowledge:()=>75600,Alloy:()=>2500},effect:F("tech_uranium_storage_effect"),action(){return!!ii($(this)[0])}},uranium_ash:{id:"tech-uranium_ash",title:F("tech_uranium_ash"),desc:F("tech_uranium_ash"),category:"power_generation",era:"globalized",reqs:{uranium:2},grant:["uranium",3],cost:{Knowledge:()=>122e3},effect:F("tech_uranium_ash_effect"),action(){return!!ii($(this)[0])}},breeder_reactor:{id:"tech-breeder_reactor",title:F("tech_breeder_reactor"),desc:F("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:F("tech_breeder_reactor_effect"),action(){return!!ii($(this)[0])}},mine_conveyor:{id:"tech-mine_conveyor",title:F("tech_mine_conveyor"),desc:F("tech_mine_conveyor"),category:"mining",era:"discovery",reqs:{high_tech:2},grant:["mine_conveyor",1],cost:{Knowledge:()=>16200,Copper:()=>2250,Steel:()=>1750},effect:F("tech_mine_conveyor_effect"),action(){return!!ii($(this)[0])}},oil_well:{id:"tech-oil_well",title:F("tech_oil_well"),desc:F("tech_oil_well"),category:"power_generation",era:"industrialized",reqs:{high_tech:3},grant:["oil",1],cost:{Knowledge:()=>27e3},effect:F("tech_oil_well_effect"),action(){return!!ii($(this)[0])&&(t.city.oil_well={count:0},!0)}},oil_depot:{id:"tech-oil_depot",title:F("tech_oil_depot"),desc:F("tech_oil_depot"),category:"storage",era:"industrialized",reqs:{oil:1},grant:["oil",2],cost:{Knowledge:()=>32e3},effect:F("tech_oil_depot_effect"),action(){return!!ii($(this)[0])&&(t.city.oil_depot={count:0},!0)}},oil_power:{id:"tech-oil_power",title:()=>t.race.environmentalist?F("city_wind_power"):F("tech_oil_power"),desc:()=>t.race.environmentalist?F("city_wind_power"):F("tech_oil_power"),category:"power_generation",era:"industrialized",reqs:{oil:2},grant:["oil",3],cost:{Knowledge:()=>44e3},effect:()=>t.race.environmentalist?F("tech_wind_power_effect"):F("tech_oil_power_effect"),action(){return!!ii($(this)[0])&&(t.city.oil_power={count:0,on:0},!0)}},titanium_drills:{id:"tech-titanium_drills",title:F("tech_titanium_drills"),desc:F("tech_titanium_drills"),category:"power_generation",era:"industrialized",reqs:{oil:3},grant:["oil",4],cost:{Knowledge:()=>54e3,Titanium:()=>3500},effect:F("tech_titanium_drills_effect"),action(){return!!ii($(this)[0])}},alloy_drills:{id:"tech-alloy_drills",title:F("tech_alloy_drills"),desc:F("tech_alloy_drills"),category:"power_generation",era:"globalized",reqs:{oil:4},grant:["oil",5],cost:{Knowledge:()=>77e3,Alloy:()=>1e3},effect:F("tech_alloy_drills_effect"),action(){return!!ii($(this)[0])}},fracking:{id:"tech-fracking",title:F("tech_fracking"),desc:F("tech_fracking"),category:"power_generation",era:"globalized",reqs:{oil:5,high_tech:6},grant:["oil",6],cost:{Knowledge:()=>132e3},effect:F("tech_fracking_effect"),action(){return!!ii($(this)[0])}},mythril_drills:{id:"tech-mythril_drills",title:F("tech_mythril_drills"),desc:F("tech_mythril_drills"),category:"power_generation",era:"early_space",reqs:{oil:6,space:3},grant:["oil",7],cost:{Knowledge:()=>165e3,Mythril:()=>100},effect:F("tech_mythril_drills_effect"),action(){return!!ii($(this)[0])}},mass_driver:{id:"tech-mass_driver",title:F("tech_mass_driver"),desc:F("tech_mass_driver"),category:"power_generation",era:"early_space",reqs:{oil:6,space:3},grant:["mass",1],cost:{Knowledge:()=>16e4},effect:F("tech_mass_driver_effect"),action(){return!!ii($(this)[0])&&(t.city.mass_driver={count:0,on:0},!0)}},orichalcum_driver:{id:"tech-orichalcum_driver",title:F("tech_orichalcum_driver"),desc:F("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:()=>F("tech_orichalcum_driver_effect"),action(){return!!ii($(this)[0])&&(t.space.terraformer={count:0},!0)}},polymer:{id:"tech-polymer",title:F("tech_polymer"),desc:F("tech_polymer"),category:"crafting",era:"globalized",reqs:{genetics:1},grant:["polymer",1],cost:{Knowledge:()=>8e4,Oil:()=>5e3,Alloy:()=>450},effect:F("tech_polymer_effect"),action(){return!!ii($(this)[0])&&(t.resource.Polymer.display=!0,ms(F("tech_polymer_avail"),"info",!1,["progress"]),!0)},post(){$i(),os()}},fluidized_bed_reactor:{id:"tech-fluidized_bed_reactor",title:F("tech_fluidized_bed_reactor"),desc:F("tech_fluidized_bed_reactor"),category:"crafting",era:"globalized",reqs:{polymer:1,high_tech:6},grant:["polymer",2],cost:{Knowledge:()=>99e3},effect:F("tech_fluidized_bed_reactor_effect"),action(){return!!ii($(this)[0])}},synthetic_fur:{id:"tech-synthetic_fur",title:()=>t.race.evil?F("tech_faux_leather"):F("tech_synthetic_fur"),desc:()=>t.race.evil?F("tech_faux_leather"):F("tech_synthetic_fur"),category:"crafting",era:"globalized",reqs:{polymer:1},grant:["synthetic_fur",1],cost:{Knowledge:()=>1e5,Polymer:()=>2500},effect:()=>t.race.evil?F("tech_faux_leather_effect"):F("tech_synthetic_fur_effect"),action(){return!!ii($(this)[0])},post(){$i()}},nanoweave:{id:"tech-nanoweave",title:F("tech_nanoweave"),desc:F("tech_nanoweave"),category:"crafting",era:"intergalactic",reqs:{science:18},grant:["nanoweave",1],cost:{Knowledge:()=>85e5,Nano_Tube:()=>5e6,Vitreloy:()=>25e4},effect:F("tech_nanoweave_effect"),action(){return!!ii($(this)[0])&&(t.resource.Nanoweave.display=!0,ms(F("tech_nanoweave_avail"),"info",!1,["progress"]),na(),!0)},post(){os()}},stanene:{id:"tech-stanene",title:F("tech_stanene"),desc:F("tech_stanene"),category:"crafting",era:"interstellar",reqs:{infernite:1},grant:["stanene",1],cost:{Knowledge:()=>59e4,Aluminium:()=>5e5,Infernite:()=>1e3},effect:F("tech_stanene_effect"),action(){return!!ii($(this)[0])&&(t.resource.Stanene.display=!0,ms(F("tech_stanene_avail"),"info",!1,["progress"]),!0)},post(){$i(),os()}},nano_tubes:{id:"tech-nano_tubes",title:F("tech_nano_tubes"),desc:F("tech_nano_tubes"),category:"crafting",era:"deep_space",reqs:{high_tech:10},grant:["nano",1],cost:{Knowledge:()=>375e3,Coal:()=>1e5,Neutronium:()=>1e3},effect:F("tech_nano_tubes_effect"),action(){return!!ii($(this)[0])&&(t.resource.Nano_Tube.display=!0,ms(F("tech_nano_tubes_msg"),"info",!1,["progress"]),!0)},post(){$i(),os()}},scarletite:{id:"tech-scarletite",title:F("tech_scarletite"),desc:F("tech_scarletite"),category:"crafting",era:"dimensional",reqs:{hell_ruins:4},grant:["scarletite",1],cost:{Knowledge:()=>2675e4,Iron:()=>1e8,Adamantite:()=>15e6,Orichalcum:()=>8e6},effect:F("tech_scarletite_effect"),action(){if(ii($(this)[0])){if(t.resource.Scarletite.display=!0,t.portal.hell_forge={count:0,on:0},ms(F("tech_scarletite_avail"),"info",!1,["progress"]),na(),"micro"===t.race.universe||t.pillars[t.race.species]){let e=Sn();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(){os()}},pillars:{id:"tech-pillars",title:F("tech_pillars"),desc:F("tech_pillars"),category:"hell_dimension",era:"dimensional",reqs:{scarletite:1,fusable:1},grant:["pillars",1],cost:{Knowledge:()=>3e7},effect:F("tech_pillars_effect"),action(){return!!ii($(this)[0])&&(ms(F("tech_pillars_msg",[Di[t.race.species].entity]),"info",!1,["progress","hell"]),!0)}},reclaimer:{id:"tech-reclaimer",title:F("tech_reclaimer"),desc:F("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:F("tech_reclaimer_effect"),action(){return!!ii($(this)[0])&&(t.civic.lumberjack.name=F("job_reclaimer"),t.civic.lumberjack.display=!0,t.city.graveyard={count:0},!0)}},shovel:{id:"tech-shovel",title:F("tech_shovel"),desc:F("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:F("tech_shovel_effect"),action(){return!!ii($(this)[0])}},iron_shovel:{id:"tech-iron_shovel",title:F("tech_iron_shovel"),desc:F("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:F("tech_iron_shovel_effect"),action(){return!!ii($(this)[0])}},steel_shovel:{id:"tech-steel_shovel",title:F("tech_steel_shovel"),desc:F("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:F("tech_steel_shovel_effect"),action(){return!!ii($(this)[0])}},titanium_shovel:{id:"tech-titanium_shovel",title:F("tech_titanium_shovel"),desc:F("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:F("tech_titanium_shovel_effect"),action(){return!!ii($(this)[0])}},alloy_shovel:{id:"tech-alloy_shovel",title:F("tech_alloy_shovel"),desc:F("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:F("tech_alloy_shovel_effect"),action(){return!!ii($(this)[0])}},mythril_shovel:{id:"tech-mythril_shovel",title:F("tech_mythril_shovel"),desc:F("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:F("tech_mythril_shovel_effect"),action(){return!!ii($(this)[0])}},adamantite_shovel:{id:"tech-adamantite_shovel",title:F("tech_adamantite_shovel"),desc:F("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:F("tech_adamantite_shovel_effect"),action(){return!!ii($(this)[0])}},stone_axe:{id:"tech-stone_axe",title:()=>F("tech_stone_axe"),desc:()=>F("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?F("tech_basic_livingtools"):t.race.sappy?F("tech_amber_axe_effect"):F("tech_stone_axe_effect"),action(){return!!ii($(this)[0])&&(t.civic.lumberjack.display=!0,t.city.lumber_yard={count:0},!0)}},copper_axes:{id:"tech-copper_axes",title:F("tech_copper_axes"),desc:F("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:F("tech_copper_axes_effect"),action(){return!!ii($(this)[0])}},iron_saw:{id:"tech-iron_saw",title:F("tech_iron_saw"),desc:F("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:F("tech_iron_saw_effect"),action(){return!!ii($(this)[0])&&(t.city.sawmill={count:0,on:0},!0)}},steel_saw:{id:"tech-steel_saw",title:F("tech_steel_saw"),desc:F("tech_steel_saw_desc"),category:"lumber_gathering",era:"discovery",reqs:{smelting:2,saw:1},grant:["saw",2],cost:{Knowledge:()=>10800,Steel:()=>400},effect:F("tech_steel_saw_effect"),action(){return!!ii($(this)[0])}},iron_axes:{id:"tech-iron_axes",title:F("tech_iron_axes"),desc:F("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:F("tech_iron_axes_effect"),action(){return!!ii($(this)[0])}},steel_axes:{id:"tech-steel_axes",title:F("tech_steel_axes"),desc:F("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:F("tech_steel_axes_effect"),action(){return!!ii($(this)[0])}},titanium_axes:{id:"tech-titanium_axes",title:F("tech_titanium_axes"),desc:F("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:F("tech_titanium_axes_effect"),action(){return!!ii($(this)[0])}},chainsaws:{id:"tech-chainsaws",title:F("tech_chainsaws"),desc:F("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:F("tech_chainsaws_effect"),action(){return!!ii($(this)[0])},flair:()=>`
                ${F("tech_chainsaws_flair1")}
                ${F("tech_chainsaws_flair2")}
                `},copper_sledgehammer:{id:"tech-copper_sledgehammer",title:F("tech_copper_sledgehammer"),desc:F("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:F("tech_copper_sledgehammer_effect"),action(){return!!ii($(this)[0])}},iron_sledgehammer:{id:"tech-iron_sledgehammer",title:F("tech_iron_sledgehammer"),desc:F("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:F("tech_iron_sledgehammer_effect"),action(){return!!ii($(this)[0])}},steel_sledgehammer:{id:"tech-steel_sledgehammer",title:F("tech_steel_sledgehammer"),desc:F("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:F("tech_steel_sledgehammer_effect"),action(){return!!ii($(this)[0])}},titanium_sledgehammer:{id:"tech-titanium_sledgehammer",title:F("tech_titanium_sledgehammer"),desc:F("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:F("tech_titanium_sledgehammer_effect"),action(){return!!ii($(this)[0])}},copper_pickaxe:{id:"tech-copper_pickaxe",title:F("tech_copper_pickaxe"),desc:F("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:F("tech_copper_pickaxe_effect"),action(){return!!ii($(this)[0])}},iron_pickaxe:{id:"tech-iron_pickaxe",title:F("tech_iron_pickaxe"),desc:F("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:F("tech_iron_pickaxe_effect"),action(){return!!ii($(this)[0])}},steel_pickaxe:{id:"tech-steel_pickaxe",title:F("tech_steel_pickaxe"),desc:F("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:F("tech_steel_pickaxe_effect"),action(){return!!ii($(this)[0])}},jackhammer:{id:"tech-jackhammer",title:F("tech_jackhammer"),desc:F("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:F("tech_jackhammer_effect"),action(){return!!ii($(this)[0])}},jackhammer_mk2:{id:"tech-jackhammer_mk2",title:F("tech_jackhammer_mk2"),desc:F("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:F("tech_jackhammer_mk2_effect"),action(){return!!ii($(this)[0])}},adamantite_hammer:{id:"tech-adamantite_hammer",title:F("tech_adamantite_hammer"),desc:F("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:F("tech_adamantite_hammer_effect"),action(){return!!ii($(this)[0])}},copper_hoe:{id:"tech-copper_hoe",title:F("tech_copper_hoe"),desc:F("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:F("tech_copper_hoe_effect"),action(){return!!ii($(this)[0])}},iron_hoe:{id:"tech-iron_hoe",title:F("tech_iron_hoe"),desc:F("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:F("tech_iron_hoe_effect"),action(){return!!ii($(this)[0])}},steel_hoe:{id:"tech-steel_hoe",title:F("tech_steel_hoe"),desc:F("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:F("tech_steel_hoe_effect"),action(){return!!ii($(this)[0])}},titanium_hoe:{id:"tech-titanium_hoe",title:F("tech_titanium_hoe"),desc:F("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:F("tech_titanium_hoe_effect"),action(){return!!ii($(this)[0])}},adamantite_hoe:{id:"tech-adamantite_hoe",title:F("tech_adamantite_hoe"),desc:F("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:F("tech_adamantite_hoe_effect"),action(){return!!ii($(this)[0])}},cyber_limbs:{id:"tech-cyber_limbs",title:F("tech_cyber_limbs"),desc:F("tech_cyber_limbs"),category:"mining",era:"dimensional",reqs:{high_tech:18},grant:["cyber_worker",1],cost:{Knowledge:()=>27e6},effect:F("tech_cyber_limbs_effect"),action(){return!!ii($(this)[0])}},slave_pens:{id:"tech-slave_pens",title:F("tech_slave_pens"),desc:F("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:F("tech_slave_pens_effect"),action(){return!!ii($(this)[0])&&(t.city.slave_pen={count:0,slaves:0},!0)}},slave_market:{id:"tech-slave_market",title:F("tech_slave_market"),desc:F("tech_slave_market"),category:"slaves",era:"discovery",reqs:{slaves:1,high_tech:1},grant:["slaves",2],trait:["slaver"],cost:{Knowledge:()=>8e3},effect:F("tech_slave_market_effect"),action(){return!!ii($(this)[0])}},ceremonial_dagger:{id:"tech-ceremonial_dagger",title:F("tech_ceremonial_dagger"),desc:F("tech_ceremonial_dagger"),category:"sacrifice",era:"civilized",reqs:{mining:1},grant:["sacrifice",1],trait:["cannibalize"],not_trait:["cataclysm","lone_survivor"],cost:{Knowledge:()=>60},effect:F("tech_ceremonial_dagger_effect"),action(){return!!ii($(this)[0])}},last_rites:{id:"tech-last_rites",title:F("tech_last_rites"),desc:F("tech_last_rites"),category:"sacrifice",era:"civilized",reqs:{sacrifice:1,theology:2},grant:["sacrifice",2],trait:["cannibalize"],cost:{Knowledge:()=>1e3},effect:F("tech_last_rites_effect"),action(){return!!ii($(this)[0])}},ancient_infusion:{id:"tech-ancient_infusion",title:F("tech_ancient_infusion"),desc:F("tech_ancient_infusion"),category:"sacrifice",era:"early_space",reqs:{sacrifice:2,theology:4},grant:["sacrifice",3],trait:["cannibalize"],cost:{Knowledge:()=>182e3},effect:F("tech_ancient_infusion_effect"),action(){return!!ii($(this)[0])}},garrison:{id:"tech-garrison",title:F("tech_garrison"),desc:F("tech_garrison_desc"),category:"military",era:"civilized",reqs:{science:1,housing:1},grant:["military",1],cost:{Knowledge:()=>70},effect:F("tech_garrison_effect"),action(){return!!ii($(this)[0])&&(t.city.garrison={count:0,on:0},!0)}},mercs:{id:"tech-mercs",title:F("tech_mercs"),desc:F("tech_mercs_desc"),category:"military",era:"civilized",reqs:{military:1},grant:["mercs",1],not_trait:["lone_survivor"],cost:{Money:()=>1e4,Knowledge:()=>4500},effect:F("tech_mercs_effect"),action(){return!!ii($(this)[0])&&(t.civic.garrison.mercs=!0,!0)}},signing_bonus:{id:"tech-signing_bonus",title:F("tech_signing_bonus"),desc:F("tech_signing_bonus_desc"),category:"military",era:"industrialized",reqs:{mercs:1,high_tech:3},grant:["mercs",2],cost:{Money:()=>5e4,Knowledge:()=>32e3},effect:F("tech_signing_bonus_effect"),action(){return!!ii($(this)[0])}},hospital:{id:"tech-hospital",title:F("tech_hospital"),desc:F("tech_hospital"),category:"military",era:"civilized",reqs:{military:1,alumina:1},grant:["medic",1],not_trait:["artifical"],cost:{Knowledge:()=>5e3},effect:F("tech_hospital_effect"),action(){return!!ii($(this)[0])&&(t.city.hospital={count:0},!0)}},bac_tanks:{id:"tech-bac_tanks",title:()=>t.race.artifical?F("tech_repair_subroutines"):F("tech_bac_tanks"),desc:()=>t.race.artifical?F("tech_repair_subroutines"):F("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?F("tech_repair_subroutines_effect"):F("tech_bac_tanks_effect"),action(){return!!ii($(this)[0])}},boot_camp:{id:"tech-boot_camp",title:F("tech_boot_camp"),desc:F("tech_boot_camp_desc"),category:"military",era:"discovery",reqs:{high_tech:1},grant:["boot_camp",1],cost:{Knowledge:()=>8e3},effect:F("tech_boot_camp_effect"),action(){return!!ii($(this)[0])&&(t.city.boot_camp={count:0},!0)}},vr_training:{id:"tech-vr_training",title:F("tech_vr_training"),desc:F("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:()=>F("tech_vr_training_effect"),action(){return!!ii($(this)[0])}},bows:{id:"tech-bows",title:F("tech_bows"),desc:F("tech_bows_desc"),category:"military",era:"civilized",reqs:{military:1},grant:["military",2],cost:{Knowledge:()=>225,Lumber:()=>250},effect:F("tech_bows_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#garrison"},"update"),zs({el:"#c_garrison"},"update")}},flintlock_rifle:{id:"tech-flintlock_rifle",title:()=>"magic"===t.race.universe?F("tech_magic_arrow"):F("tech_flintlock_rifle"),desc:()=>"magic"===t.race.universe?F("tech_magic_arrow"):F("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?F("tech_magic_arrow_effect"):F("tech_flintlock_rifle_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#garrison"},"update"),zs({el:"#c_garrison"},"update")}},machine_gun:{id:"tech-machine_gun",title:()=>"magic"===t.race.universe?F("tech_fire_mage"):F("tech_machine_gun"),desc:()=>"magic"===t.race.universe?F("tech_fire_mage"):F("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:F("tech_machine_gun_effect"),effect:()=>"magic"===t.race.universe?F("tech_fire_mage_effect"):F("tech_machine_gun_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#garrison"},"update"),zs({el:"#c_garrison"},"update")}},bunk_beds:{id:"tech-bunk_beds",title:F("tech_bunk_beds"),desc:F("tech_bunk_beds"),category:"military",era:"globalized",reqs:{military:4,high_tech:4},grant:["military",5],cost:{Knowledge:()=>76500,Furs:()=>25e3,Alloy:()=>3e3},effect:F("tech_bunk_beds_effect"),action(){return!!ii($(this)[0])}},rail_guns:{id:"tech-rail_guns",title:()=>"magic"===t.race.universe?F("tech_lightning_caster"):F("tech_rail_guns"),desc:()=>"magic"===t.race.universe?F("tech_lightning_caster"):F("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?F("tech_lightning_caster_effect"):F("tech_rail_guns_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#garrison"},"update"),zs({el:"#c_garrison"},"update")}},laser_rifles:{id:"tech-laser_rifles",title:()=>"magic"===t.race.universe?F("tech_mana_rifles"):F("tech_laser_rifles"),desc:()=>"magic"===t.race.universe?F("tech_mana_rifles"):F("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?F("tech_mana_rifles_effect"):F("tech_laser_rifles_effect"),action(){return!!ii($(this)[0])&&("sharkin"===t.race.species&&Pn("laser_shark"),!0)},post(){zs({el:"#garrison"},"update"),zs({el:"#c_garrison"},"update")}},plasma_rifles:{id:"tech-plasma_rifles",title:()=>"magic"===t.race.universe?F("tech_focused_rifles"):F("tech_plasma_rifles"),desc:()=>"magic"===t.race.universe?F("tech_focused_rifles"):F("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?F("tech_focused_rifles_effect"):F("tech_plasma_rifles_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#garrison"},"update"),zs({el:"#c_garrison"},"update")}},disruptor_rifles:{id:"tech-disruptor_rifles",title:()=>"magic"===t.race.universe?F("tech_magic_missile"):F("tech_disruptor_rifles"),desc:()=>"magic"===t.race.universe?F("tech_magic_missile"):F("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?F("tech_magic_missile_effect"):F("tech_disruptor_rifles_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#garrison"},"update"),zs({el:"#c_garrison"},"update")}},gauss_rifles:{id:"tech-gauss_rifles",title:()=>"magic"===t.race.universe?F("tech_magicword_kill"):F("tech_gauss_rifles"),desc:()=>"magic"===t.race.universe?F("tech_magicword_kill"):F("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?F("tech_magicword_kill_effect"):F("tech_gauss_rifles_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#garrison"},"update"),zs({el:"#c_garrison"},"update")}},cyborg_soldiers:{id:"tech-cyborg_soldiers",title:F("tech_cyborg_soldiers"),desc:F("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:F("tech_cyborg_soldiers_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#garrison"},"update"),zs({el:"#c_garrison"},"update")}},space_marines:{id:"tech-space_marines",title:F("tech_space_marines"),desc:F("tech_space_marines_desc"),category:"military",era:"early_space",reqs:{space:3,mars:2},grant:["marines",1],cost:{Knowledge:()=>21e4},effect:()=>`
                ${F("tech_space_marines_effect",[Vt().red])}
                `,action(){return!!ii($(this)[0])&&(t.space.space_barracks={count:0,on:0},!0)},flair:F("tech_space_marines_flair")},hammocks:{id:"tech-hammocks",title:F("tech_hammocks"),desc:F("tech_hammocks"),category:"military",era:"intergalactic",reqs:{marines:1,nanoweave:1},grant:["marines",2],cost:{Knowledge:()=>89e5,Nanoweave:()=>3e4},effect:()=>F("tech_hammocks_effect"),action(){return!!ii($(this)[0])}},cruiser:{id:"tech-cruiser",title:F("tech_cruiser"),desc:F("tech_cruiser"),category:"military",era:"interstellar",reqs:{high_tech:14,proxima:2,aerogel:1},grant:["cruiser",1],cost:{Knowledge:()=>86e4},effect:F("tech_cruiser_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.cruiser={count:0,on:0},!0)}},armor:{id:"tech-armor",title:F("tech_armor"),desc:F("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:F("tech_armor_effect"),action(){return!!ii($(this)[0])}},plate_armor:{id:"tech-plate_armor",title:F("tech_plate_armor"),desc:F("tech_plate_armor_desc"),category:"military",era:"civilized",reqs:{armor:1,mining:3},grant:["armor",2],cost:{Knowledge:()=>3400,Iron:()=>600},effect:F("tech_plate_armor_effect"),action(){return!!ii($(this)[0])}},kevlar:{id:"tech-kevlar",title:F("tech_kevlar"),desc:F("tech_kevlar_desc"),category:"military",era:"globalized",reqs:{armor:2,polymer:1},grant:["armor",3],cost:{Knowledge:()=>86e3,Polymer:()=>750},effect:F("tech_kevlar_effect"),action(){return!!ii($(this)[0])}},nanoweave_vest:{id:"tech-nanoweave_vest",title:F("tech_nanoweave_vest"),desc:F("tech_nanoweave_vest"),category:"military",era:"intergalactic",reqs:{armor:3,nanoweave:1},grant:["armor",4],cost:{Knowledge:()=>925e4,Nanoweave:()=>75e3},effect:F("tech_nanoweave_vest_effect"),action(){return!!ii($(this)[0])}},laser_turret:{id:"tech-laser_turret",title:F("tech_laser_turret"),desc:F("tech_laser_turret"),category:"hell_dimension",era:"interstellar",reqs:{high_tech:9,portal:2},grant:["turret",1],cost:{Knowledge:()=>6e5,Elerium:()=>100},effect:()=>`
                ${F("tech_laser_turret_effect1")}
                ${F("tech_laser_turret_effect2")}
                `,action(){return!!ii($(this)[0])},post(){zs({el:"#fort"},"update"),hi(!1,["portal-turret"])}},plasma_turret:{id:"tech-plasma_turret",title:F("tech_plasma_turret"),desc:F("tech_plasma_turret"),category:"hell_dimension",era:"interstellar",reqs:{high_tech:13,turret:1},grant:["turret",2],cost:{Knowledge:()=>76e4,Elerium:()=>350},effect:()=>`
                ${F("tech_plasma_turret_effect")}
                ${F("tech_laser_turret_effect2")}
                `,action(){return!!ii($(this)[0])},post(){zs({el:"#fort"},"update"),hi(!1,["portal-turret"])}},black_powder:{id:"tech-black_powder",title:()=>"magic"===t.race.universe?F("tech_magic_powder"):F("tech_black_powder"),desc:()=>"magic"===t.race.universe?F("tech_magic_powder_desc"):F("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?F("tech_magic_powder_effect"):F("tech_black_powder_effect"),action(){return!!ii($(this)[0])}},dynamite:{id:"tech-dynamite",title:F("tech_dynamite"),desc:F("tech_dynamite"),category:"mining",era:"civilized",reqs:{explosives:1},grant:["explosives",2],cost:{Knowledge:()=>4800,Coal:()=>750},effect:F("tech_dynamite_effect"),action(){return!!ii($(this)[0])}},anfo:{id:"tech-anfo",title:F("tech_anfo"),desc:F("tech_anfo"),category:"mining",era:"industrialized",reqs:{explosives:2,oil:1},grant:["explosives",3],cost:{Knowledge:()=>42e3,Oil:()=>2500},effect:F("tech_anfo_effect"),action(){return!!ii($(this)[0])}},mad:{id:"tech-mad",title:F("tech_mad"),desc:F("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)?F("tech_mad_effect_easter"):F("tech_mad_effect"),action(){return!!ii($(this)[0])&&(t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?ms(F("tech_mad_info_easter"),"info",!1,["progress"]):ms(F("tech_mad_info"),"info",!1,["progress"]),t.civic.mad.display=!0,!0)}},cement:{id:"tech-cement",title:F("tech_cement"),desc:F("tech_cement_desc"),category:"cement",era:"civilized",reqs:{mining:1,storage:1,science:1},not_trait:["flier"],grant:["cement",1],cost:{Knowledge:()=>500},effect:F("tech_cement_effect"),action(){return!!ii($(this)[0])&&(t.city.cement_plant={count:0,on:0},!0)}},rebar:{id:"tech-rebar",title:F("tech_rebar"),desc:F("tech_rebar"),category:"cement",era:"civilized",reqs:{mining:3,cement:1},not_trait:["flier"],grant:["cement",2],cost:{Knowledge:()=>3200,Iron:()=>750},effect:F("tech_rebar_effect"),action(){return!!ii($(this)[0])}},steel_rebar:{id:"tech-steel_rebar",title:F("tech_steel_rebar"),desc:F("tech_steel_rebar"),category:"cement",era:"civilized",reqs:{smelting:2,cement:2},not_trait:["flier"],grant:["cement",3],cost:{Knowledge:()=>6750,Steel:()=>750},effect:F("tech_steel_rebar_effect"),action(){return!!ii($(this)[0])}},portland_cement:{id:"tech-portland_cement",title:F("tech_portland_cement"),desc:F("tech_portland_cement"),category:"cement",era:"industrialized",reqs:{cement:3,high_tech:3},not_trait:["flier"],grant:["cement",4],cost:{Knowledge:()=>32e3},effect:F("tech_portland_cement_effect"),action(){return!!ii($(this)[0])}},screw_conveyor:{id:"tech-screw_conveyor",title:F("tech_screw_conveyor"),desc:F("tech_screw_conveyor"),category:"cement",era:"globalized",reqs:{cement:4,high_tech:4},not_trait:["flier"],grant:["cement",5],cost:{Knowledge:()=>72e3},effect:F("tech_screw_conveyor_effect"),action(){return!!ii($(this)[0])}},adamantite_screws:{id:"tech-adamantite_screws",title:F("tech_adamantite_screws"),desc:F("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:F("tech_adamantite_screws_effect",[3]),action(){return!!ii($(this)[0])}},hunter_process:{id:"tech-hunter_process",title:F("tech_hunter_process"),desc:F("tech_hunter_process"),category:"mining",era:"industrialized",reqs:{high_tech:3,smelting:2},grant:["titanium",1],cost:{Knowledge:()=>45e3,Titanium:()=>1e3},effect:F("tech_hunter_process_effect"),action(){return!!ii($(this)[0])&&(t.resource.Titanium.value=za.Titanium,!0)}},kroll_process:{id:"tech-kroll_process",title:F("tech_kroll_process"),desc:F("tech_kroll_process"),category:"mining",era:"globalized",reqs:{titanium:1,high_tech:4},grant:["titanium",2],cost:{Knowledge:()=>78e3,Titanium:()=>1e4},effect:F("tech_kroll_process_effect"),action(){return!!ii($(this)[0])}},cambridge_process:{id:"tech-cambridge_process",title:F("tech_cambridge_process"),desc:F("tech_cambridge_process"),category:"mining",era:"early_space",reqs:{titanium:2,supercollider:1},grant:["titanium",3],cost:{Knowledge:()=>135e3,Titanium:()=>17500},effect:F("tech_cambridge_process_effect"),action(){return!!ii($(this)[0])}},pynn_partical:{id:"tech-pynn_partical",title:F("tech_pynn_partical"),desc:F("tech_pynn_partical"),category:"progress",era:"early_space",path:["standard"],reqs:{supercollider:1},grant:["particles",1],cost:{Knowledge:()=>1e5},effect:F("tech_pynn_partical_effect"),action(){return!!ii($(this)[0])}},matter_compression:{id:"tech-matter_compression",title:F("tech_matter_compression"),desc:F("tech_matter_compression"),category:"storage",era:"early_space",path:["standard"],reqs:{particles:1},grant:["particles",2],cost:{Knowledge:()=>112500},effect:F("tech_matter_compression_effect"),action(){return!!ii($(this)[0])}},higgs_boson:{id:"tech-higgs_boson",title:F("tech_higgs_boson"),desc:F("tech_higgs_boson"),category:"science",era:"early_space",path:["standard"],reqs:{particles:2,supercollider:2},grant:["particles",3],cost:{Knowledge:()=>125e3},effect:F("tech_higgs_boson_effect"),action(){return!!ii($(this)[0])}},dimensional_compression:{id:"tech-dimensional_compression",title:F("tech_dimensional_compression"),desc:F("tech_dimensional_compression"),category:"storage",era:"interstellar",reqs:{particles:3,science:11,supercollider:3},grant:["particles",4],cost:{Knowledge:()=>425e3},effect:F("tech_dimensional_compression_effect"),action(){return!!ii($(this)[0])}},theology:{id:"tech-theology",title:F("tech_theology"),desc:F("tech_theology"),category:"religion",era:"civilized",reqs:{theology:1,housing:1,cement:1},grant:["theology",2],cost:{Knowledge:()=>900},effect:F("tech_theology_effect"),action(){return!!ii($(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:F("tech_fanaticism"),desc:F("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:`
                ${F("tech_fanaticism_effect")}
                ${F("tech_fanaticism_warning")}
                `,action(){return!!ii($(this)[0])&&(t.tech.fanaticism=1,t.race.gods===t.race.species&&Pn("second_evolution"),gi(t.race.gods),!0)}},alt_fanaticism:{id:"tech-alt_fanaticism",title:F("tech_fanaticism"),desc:F("tech_fanaticism"),category:"religion",era:"civilized",wiki:!!t.genes.transcendence,reqs:{theology:2},grant:["fanaticism",1],gene:["transcendence"],cost:{Knowledge:()=>2500},effect:`
                ${F("tech_fanaticism_effect")}
                `,action(){return!!ii($(this)[0])&&(2===t.tech.theology&&(t.tech.theology=3),t.race.gods===t.race.species&&Pn("second_evolution"),gi(t.race.gods),!0)}},ancient_theology:{id:"tech-ancient_theology",title:F("tech_ancient_theology"),desc:F("tech_ancient_theology"),category:"religion",era:"early_space",reqs:{theology:3,mars:2},grant:["theology",4],condition:()=>!!t.genes.ancients,cost:{Knowledge:()=>18e4},effect:()=>F("tech_ancient_theology_effect",["none"!==t.race.old_gods?Di[t.race.old_gods.toLowerCase()].entity:Di[t.race.species].entity,"none"!==t.race.gods?Di[t.race.gods.toLowerCase()].entity:Di[t.race.species].entity]),action(){return!!ii($(this)[0])&&(t.space.ziggurat={count:0},!0)}},study:{id:"tech-study",title:F("tech_study"),desc:F("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:()=>`
                ${F("tech_study_effect",["none"!==t.race.old_gods?Di[t.race.old_gods.toLowerCase()].entity:Di[t.race.species].entity])}
                ${F("tech_study_warning")}
                `,action(){return!!ii($(this)[0])&&(t.tech.ancient_study=1,!0)}},encoding:{id:"tech-encoding",title:F("tech_encoding"),desc:F("tech_encoding_desc"),category:"religion",era:"deep_space",reqs:{ancient_study:1,mars:5},grant:["ancient_study",2],cost:{Knowledge:()=>268e3},effect:()=>`
                ${F("tech_encoding_effect")}
                `,action(){return!!ii($(this)[0])}},deify:{id:"tech-deify",title:F("tech_deify"),desc:F("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:()=>`
                ${F("tech_deify_effect",["none"!==t.race.old_gods?Di[t.race.old_gods.toLowerCase()].entity:Di[t.race.species].entity])}
                ${F("tech_deify_warning")}
                `,action(){return!!ii($(this)[0])&&(t.tech.ancient_deify=1,gi(t.race.old_gods),qe("Genetics"),!0)}},infusion:{id:"tech-infusion",title:F("tech_infusion"),desc:F("tech_infusion_desc"),category:"religion",era:"deep_space",reqs:{ancient_deify:1,mars:5},grant:["ancient_deify",2],cost:{Knowledge:()=>268e3},effect:()=>`
                ${F("tech_infusion_effect")}
                `,action(){return!!ii($(this)[0])}},indoctrination:{id:"tech-indoctrination",title:F("tech_indoctrination"),desc:F("tech_indoctrination"),category:"religion",era:"civilized",reqs:{fanaticism:1},grant:["fanaticism",2],cost:{Knowledge:()=>5e3},effect:F("tech_indoctrination_effect"),action(){return!!ii($(this)[0])},post(){t.race.terrifying&&(t.tech.fanaticism=3,Jr())}},missionary:{id:"tech-missionary",title:F("tech_missionary"),desc:F("tech_missionary"),category:"religion",era:"discovery",reqs:{fanaticism:2},not_trait:["terrifying"],grant:["fanaticism",3],cost:{Knowledge:()=>1e4},effect:F("tech_missionary_effect"),action(){return!!ii($(this)[0])}},zealotry:{id:"tech-zealotry",title:F("tech_zealotry"),desc:F("tech_zealotry"),category:"religion",era:"discovery",reqs:{fanaticism:3},grant:["fanaticism",4],cost:{Knowledge:()=>25e3},effect:F("tech_zealotry_effect"),action(){return!!ii($(this)[0])}},anthropology:{id:"tech-anthropology",title:F("tech_anthropology"),desc:F("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:`
                ${F("tech_anthropology_effect")}
                ${F("tech_anthropology_warning")}
                `,action(){return!!ii($(this)[0])&&(t.tech.anthropology=1,!0)}},alt_anthropology:{id:"tech-alt_anthropology",title:F("tech_anthropology"),desc:F("tech_anthropology"),category:"religion",era:"civilized",wiki:!!t.genes.transcendence,reqs:{theology:2},grant:["anthropology",1],gene:["transcendence"],cost:{Knowledge:()=>2500},effect:`
                ${F("tech_anthropology_effect")}
                `,action(){return!!ii($(this)[0])&&(2===t.tech.theology&&(t.tech.theology=3),!0)}},mythology:{id:"tech-mythology",title:F("tech_mythology"),desc:F("tech_mythology"),category:"religion",era:"civilized",reqs:{anthropology:1},grant:["anthropology",2],cost:{Knowledge:()=>5e3},effect:F("tech_mythology_effect"),action(){return!!ii($(this)[0])}},archaeology:{id:"tech-archaeology",title:F("tech_archaeology"),desc:F("tech_archaeology"),category:"science",era:"discovery",reqs:{anthropology:2},grant:["anthropology",3],cost:{Knowledge:()=>1e4},effect:F("tech_archaeology_effect"),action(){return!!ii($(this)[0])}},merchandising:{id:"tech-merchandising",title:F("tech_merchandising"),desc:F("tech_merchandising"),category:"banking",era:"discovery",reqs:{anthropology:3},grant:["anthropology",4],cost:{Knowledge:()=>25e3},effect:()=>t.race.truepath?F("tech_merchandising_effect_tp"):F("tech_merchandising_effect"),action(){return!!ii($(this)[0])}},astrophysics:{id:"tech-astrophysics",title:F("tech_astrophysics"),desc:F("tech_astrophysics_desc"),category:"storage",era:"early_space",reqs:{space:2},grant:["space_explore",1],cost:{Knowledge:()=>125e3},effect:F("tech_astrophysics_effect"),action(){return!!ii($(this)[0])&&(t.space.propellant_depot={count:0},!0)}},rover:{id:"tech-rover",title:F("tech_rover"),desc:F("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:F("tech_rover_effect"),action(){return!!ii($(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:F("tech_probes"),desc:F("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:F("tech_probes_effect"),action(){return!!ii($(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:F("tech_starcharts"),desc:F("tech_starcharts"),category:"space_exploration",era:"early_space",reqs:{space_explore:3,science:9},grant:["space_explore",4],cost:{Knowledge:()=>185e3},effect:F("tech_starcharts_effect"),action(){return!!ii($(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:F("tech_colonization"),desc:()=>F("tech_colonization_desc",[Vt().red]),category:"agriculture",era:"early_space",reqs:{space:4,mars:1},grant:["mars",2],cost:{Knowledge:()=>172e3},effect:()=>F(t.race.artifical?"tech_colonization_artifical_effect":"tech_colonization_effect",[Vt().red]),action(){return!!ii($(this)[0])&&(t.space.biodome={count:0,on:0},!0)}},red_tower:{id:"tech-red_tower",title:()=>F("tech_red_tower",[Vt().red]),desc:()=>F("tech_red_tower",[Vt().red]),category:"space_exploration",era:"early_space",reqs:{mars:2},grant:["mars",3],cost:{Knowledge:()=>195e3},effect:()=>F("tech_red_tower_effect",[Vt().red]),action(){return!!ii($(this)[0])&&(t.space.red_tower={count:0,on:0},!0)}},space_manufacturing:{id:"tech-space_manufacturing",title:F("tech_space_manufacturing"),desc:F("tech_space_manufacturing_desc"),category:"crafting",era:"early_space",reqs:{mars:3},grant:["mars",4],cost:{Knowledge:()=>22e4},effect:()=>F("tech_space_manufacturing_effect",[Vt().red]),action(){return!!ii($(this)[0])&&(t.space.red_factory={count:0,on:0},!0)}},exotic_lab:{id:"tech-exotic_lab",title:F("tech_exotic_lab"),desc:F("tech_exotic_lab_desc"),category:"science",era:"deep_space",reqs:{mars:4,asteroid:5},grant:["mars",5],cost:{Knowledge:()=>25e4},effect:F("tech_exotic_lab_effect"),action(){return!!ii($(this)[0])&&(t.space.exotic_lab={count:0,on:0},!0)}},hydroponics:{id:"tech-hydroponics",title:F("tech_hydroponics"),desc:()=>F("tech_hydroponics"),category:"agriculture",era:"intergalactic",reqs:{mars:5,gateway:3},grant:["mars",6],cost:{Knowledge:()=>3e6,Bolognium:()=>5e5},effect:()=>F("tech_hydroponics_effect"),action(){return!!ii($(this)[0])}},dyson_sphere:{id:"tech-dyson_sphere",title:F("tech_dyson_sphere"),desc:F("tech_dyson_sphere"),category:"power_generation",era:"early_space",reqs:{solar:1},grant:["solar",2],cost:{Knowledge:()=>195e3},effect:F("tech_dyson_sphere_effect"),action(){return!!ii($(this)[0])}},dyson_swarm:{id:"tech-dyson_swarm",title:F("tech_dyson_swarm"),desc:F("tech_dyson_swarm"),category:"power_generation",era:"early_space",reqs:{solar:2},grant:["solar",3],cost:{Knowledge:()=>21e4},effect:F("tech_dyson_swarm_effect"),action(){return!!ii($(this)[0])&&(t.space.swarm_satellite={count:0},!0)}},swarm_plant:{id:"tech-swarm_plant",title:F("tech_swarm_plant"),desc:F("tech_swarm_plant"),category:"power_generation",era:"deep_space",reqs:{solar:3,hell:1,gas_moon:1},grant:["solar",4],cost:{Knowledge:()=>25e4},effect:()=>F("tech_swarm_plant_effect",[Di[t.race.species].home,Vt().hell]),action(){return!!ii($(this)[0])&&(t.space.swarm_plant={count:0},!0)}},space_sourced:{id:"tech-space_sourced",title:F("tech_space_sourced"),desc:F("tech_space_sourced_desc"),category:"power_generation",era:"deep_space",reqs:{solar:4,asteroid:3},grant:["solar",5],cost:{Knowledge:()=>3e5},effect:F("tech_space_sourced_effect"),action(){return!!ii($(this)[0])}},swarm_plant_ai:{id:"tech-swarm_plant_ai",title:F("tech_swarm_plant_ai"),desc:F("tech_swarm_plant_ai"),category:"power_generation",era:"deep_space",reqs:{solar:4,high_tech:10},grant:["swarm",1],cost:{Knowledge:()=>335e3},effect:F("tech_swarm_plant_ai_effect"),action(){return!!ii($(this)[0])}},swarm_control_ai:{id:"tech-swarm_control_ai",title:F("tech_swarm_control_ai"),desc:F("tech_swarm_control_ai"),category:"power_generation",era:"deep_space",reqs:{swarm:1},grant:["swarm",2],cost:{Knowledge:()=>36e4},effect:F("tech_swarm_control_ai_effect"),action(){return!!ii($(this)[0])}},quantum_swarm:{id:"tech-quantum_swarm",title:F("tech_quantum_swarm"),desc:F("tech_quantum_swarm"),category:"power_generation",era:"deep_space",reqs:{swarm:2,high_tech:11},grant:["swarm",3],cost:{Knowledge:()=>45e4},effect:F("tech_quantum_swarm_effect"),action(){return!!ii($(this)[0])}},perovskite_cell:{id:"tech-perovskite_cell",title:F("tech_perovskite_cell"),desc:F("tech_perovskite_cell"),category:"power_generation",era:"interstellar",reqs:{swarm:3},grant:["swarm",4],path:["standard","truepath"],cost:{Knowledge:()=>525e3,Titanium:()=>1e5},effect:F("tech_perovskite_cell_effect"),action(){return!!ii($(this)[0])}},swarm_convection:{id:"tech-swarm_convection",title:F("tech_swarm_convection"),desc:F("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:F("tech_swarm_convection_effect"),action(){return!!ii($(this)[0])}},orichalcum_panels:{id:"tech-orichalcum_panels",title:F("tech_orichalcum_panels"),desc:F("tech_orichalcum_panels"),category:"power_generation",era:"intergalactic",reqs:{high_tech:17,swarm:5},grant:["swarm",6],cost:{Knowledge:()=>14e6,Orichalcum:()=>125e3},effect:()=>F("tech_orichalcum_panels_effect"),action(){return!!ii($(this)[0])}},dyson_net:{id:"tech-dyson_net",title:F("tech_dyson_net"),desc:F("tech_dyson_net"),category:"power_generation",era:"interstellar",reqs:{solar:3,proxima:2,stanene:1},grant:["proxima",3],cost:{Knowledge:()=>8e5},effect:F("tech_dyson_net_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.dyson={count:0},!0)}},dyson_sphere2:{id:"tech-dyson_sphere2",title:F("tech_dyson_sphere"),desc:F("tech_dyson_sphere"),category:"power_generation",era:"intergalactic",reqs:{proxima:3,piracy:1},grant:["dyson",1],cost:{Knowledge:()=>5e6},effect:F("tech_dyson_sphere2_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.dyson_sphere={count:0},!0)}},orichalcum_sphere:{id:"tech-orichalcum_sphere",title:F("tech_orichalcum_sphere"),desc:F("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:F("tech_orichalcum_sphere_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.orichalcum_sphere={count:0},!0)}},gps:{id:"tech-gps",title:F("tech_gps"),desc:F("tech_gps"),category:"market",era:"early_space",reqs:{space_explore:1},not_trait:["terrifying"],grant:["satellite",1],cost:{Knowledge:()=>15e4},effect:F("tech_gps_effect"),action(){return!!ii($(this)[0])&&(t.space.gps={count:0},!0)}},nav_beacon:{id:"tech-nav_beacon",title:F("tech_nav_beacon"),desc:F("tech_nav_beacon"),category:"space_exploration",era:"early_space",reqs:{luna:1},grant:["luna",2],cost:{Knowledge:()=>18e4},effect:F("tech_nav_beacon_effect"),action(){return!!ii($(this)[0])&&(t.space.nav_beacon={count:0,on:0},!0)}},subspace_signal:{id:"tech-subspace_signal",title:F("tech_subspace_signal"),desc:F("tech_subspace_signal"),category:"space_exploration",era:"interstellar",reqs:{science:13,luna:2,stanene:1},grant:["luna",3],cost:{Knowledge:()=>7e5,Stanene:()=>125e3},effect:()=>F("tech_subspace_signal_effect",[Vt().red]),action(){return!!ii($(this)[0])}},atmospheric_mining:{id:"tech-atmospheric_mining",title:F("tech_atmospheric_mining"),desc:F("tech_atmospheric_mining"),category:"power_generation",era:"early_space",reqs:{space:5},grant:["gas_giant",1],cost:{Knowledge:()=>19e4},effect:F("tech_atmospheric_mining_effect"),action(){return!!ii($(this)[0])&&(t.space.gas_mining={count:0,on:0},t.space.gas_storage={count:0},!0)}},helium_attractor:{id:"tech-helium_attractor",title:F("tech_helium_attractor"),desc:F("tech_helium_attractor"),category:"power_generation",era:"deep_space",reqs:{gas_giant:1,elerium:1},grant:["helium",1],cost:{Knowledge:()=>29e4,Elerium:()=>250},effect:()=>F("tech_helium_attractor_effect",[Vt().gas]),action(){return!!ii($(this)[0])}},ram_scoops:{id:"tech-ram_scoops",title:F("tech_ram_scoops"),desc:F("tech_ram_scoops"),category:"power_generation",era:"interstellar",reqs:{nebula:2},grant:["ram_scoop",1],cost:{Knowledge:()=>58e4},effect:()=>F("tech_ram_scoops_effect"),action(){return!!ii($(this)[0])}},elerium_prospecting:{id:"tech-elerium_prospecting",title:F("tech_elerium_prospecting"),desc:F("tech_elerium_prospecting"),category:"space_mining",era:"interstellar",reqs:{nebula:2},grant:["nebula",3],cost:{Knowledge:()=>61e4},effect:()=>F("tech_elerium_prospecting_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.elerium_prospector={count:0,on:0},!0)}},zero_g_mining:{id:"tech-zero_g_mining",title:F("tech_zero_g_mining"),desc:F("tech_zero_g_mining"),category:"space_mining",era:"early_space",reqs:{asteroid:1,high_tech:8},grant:["asteroid",2],cost:{Knowledge:()=>21e4},effect:F("tech_zero_g_mining_effect"),action(){return!!ii($(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:F("tech_elerium_mining"),desc:F("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:F("tech_elerium_mining_effect"),action(){return!!ii($(this)[0])&&(t.space.elerium_ship={count:0,on:0},t.race.cataclysm&&Pn("iron_will",!1,2),!0)}},laser_mining:{id:"tech-laser_mining",title:F("tech_laser_mining"),desc:F("tech_laser_mining"),category:"space_mining",era:"deep_space",reqs:{asteroid:5,elerium:1,high_tech:9},grant:["asteroid",6],cost:{Knowledge:()=>35e4},effect:F("tech_laser_mining_effect"),action(){return!!ii($(this)[0])}},plasma_mining:{id:"tech-plasma_mining",title:F("tech_plasma_mining"),desc:F("tech_plasma_mining"),category:"space_mining",era:"interstellar",reqs:{asteroid:6,high_tech:13},grant:["asteroid",7],path:["standard","truepath"],cost:{Knowledge:()=>825e3},effect:F("tech_plasma_mining_effect"),action(){return!!ii($(this)[0])}},elerium_tech:{id:"tech-elerium_tech",title:F("tech_elerium_tech"),desc:F("tech_elerium_tech"),category:"space_mining",era:"deep_space",reqs:{asteroid:5},grant:["elerium",1],cost:{Knowledge:()=>275e3,Elerium:()=>20},effect:F("tech_elerium_tech_effect"),action(){return!!ii($(this)[0])}},elerium_reactor:{id:"tech-elerium_reactor",title:F("tech_elerium_reactor"),desc:F("tech_elerium_reactor"),category:"power_generation",era:"deep_space",reqs:{dwarf:1,elerium:1},grant:["elerium",2],cost:{Knowledge:()=>325e3,Elerium:()=>180},effect:F("tech_elerium_reactor_effect"),action(){return!!ii($(this)[0])&&(t.space.e_reactor={count:0,on:0},!0)}},neutronium_housing:{id:"tech-neutronium_housing",title:F("tech_neutronium_housing"),desc:F("tech_neutronium_housing"),category:"housing",era:"deep_space",reqs:{gas_moon:1},grant:["space_housing",1],cost:{Knowledge:()=>275e3,Neutronium:()=>350},effect:()=>F("tech_neutronium_housing_effect",[Vt().red]),action(){return!!ii($(this)[0])}},unification:{id:"tech-unification",title:F("tech_unification"),desc:()=>F("tech_unification_desc",[Di[t.race.species].home]),category:"special",era:"early_space",path:["standard"],reqs:{mars:2},grant:["unify",1],cost:{Knowledge:()=>2e5},effect:F("tech_unification_effect"),action(){return!!ii($(this)[0])}},unification2:{id:"tech-unification2",title:F("tech_unification"),desc:()=>F("tech_unification_desc",[Di[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?`
                ${F("tech_unification_banana")}
                `:"";return`
                ${F("tech_unification_effect2")}
                ${F("tech_unification_warning")}
                ${e}`},action(){return!!ii($(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&&Pn("world_domination"),t.civic.foreign.gov0.anx&&t.civic.foreign.gov1.anx&&t.civic.foreign.gov2.anx&&Pn("illuminati"),t.civic.foreign.gov0.buy&&t.civic.foreign.gov1.buy&&t.civic.foreign.gov2.buy&&Pn("syndicate"),0===t.stats.attacks&&Pn("pacifist"),Pr(),!0)}},unite:{id:"tech-unite",title:F("tech_unite"),desc:()=>F("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:()=>`
                ${F("tech_unite_effect")}
                ${F("tech_unification_effect2")}
                `,action(){return!!ii($(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&&Pn("world_domination"),t.civic.foreign.gov0.anx&&t.civic.foreign.gov1.anx&&t.civic.foreign.gov2.anx&&Pn("illuminati"),t.civic.foreign.gov0.buy&&t.civic.foreign.gov1.buy&&t.civic.foreign.gov2.buy&&Pn("syndicate"),0===t.stats.attacks&&Pn("pacifist"),Pr(),t.race.truepath&&!t.tech.rival&&(t.tech.rival=1,ms(F("civics_rival_unlocked",[X(3)]),"info",!1,["progress","combat"])),!0)}},genesis:{id:"tech-genesis",title:F("tech_genesis"),desc:F("tech_genesis"),category:"special",era:"deep_space",reqs:{high_tech:10,genesis:1},grant:["genesis",2],cost:{Knowledge:()=>35e4},effect:F("tech_genesis_effect"),action(){return!!ii($(this)[0])}},star_dock:{id:"tech-star_dock",title:F("tech_star_dock"),desc:F("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:F("tech_star_dock_effect"),action(){return!!ii($(this)[0])&&(t.space.star_dock={count:0,ship:0,probe:0,template:t.race.species},!0)}},interstellar:{id:"tech-interstellar",title:F("tech_interstellar"),desc:F("tech_interstellar"),category:"space_exploration",era:"deep_space",reqs:{genesis:3},grant:["genesis",4],cost:{Knowledge:()=>4e5},effect:F("tech_interstellar_effect"),action(){return!!ii($(this)[0])&&(t.starDock.probes={count:0},!0)}},genesis_ship:{id:"tech-genesis_ship",title:()=>t.race.cataclysm?F("tech_generational_ship"):F("tech_genesis_ship"),desc:()=>t.race.cataclysm?F("tech_generational_ship"):F("tech_genesis_ship"),category:"special",era:"deep_space",reqs:{genesis:4},grant:["genesis",5],cost:{Knowledge:()=>425e3},effect:()=>t.race.cataclysm?F("tech_generational_effect"):F("tech_genesis_ship_effect"),action(){return!!ii($(this)[0])&&(t.starDock.seeder={count:0},t.race.cataclysm&&Pn("iron_will",!1,4),!0)}},geck:{id:"tech-geck",title:()=>F("tech_geck"),desc:()=>F("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:()=>F("tech_geck_effect"),action(){return!!ii($(this)[0])&&(t.starDock.geck={count:0},!0)}},genetic_decay:{id:"tech-genetic_decay",title:F("tech_genetic_decay"),desc:F("tech_genetic_decay"),category:"genes",era:"early_space",reqs:{decay:1},grant:["decay",2],cost:{Knowledge:()=>2e5},effect:F("tech_genetic_decay_effect"),action(){return!!ii($(this)[0])}},stabilize_decay:{id:"tech-stabilize_decay",title:F("tech_stabilize_decay"),desc:F("tech_stabilize_decay"),category:"genes",era:"dimensional",reqs:{decay:2,high_tech:18},grant:["decay",3],cost:{Knowledge:()=>5e7,Blood_Stone:()=>1},effect:F("tech_stabilize_decay_effect"),action(){return!!ii($(this)[0])}},tachyon:{id:"tech-tachyon",title:F("tech_tachyon"),desc:F("tech_tachyon"),category:"progress",era:"interstellar",reqs:{wsc:1},grant:["ftl",1],cost:{Knowledge:()=>435e3},effect:F("tech_tachyon_effect"),action(){return!!ii($(this)[0])}},warp_drive:{id:"tech-warp_drive",title:F("tech_warp_drive"),desc:F("tech_warp_drive"),category:"space_exploration",era:"interstellar",reqs:{ftl:1},grant:["ftl",2],cost:{Knowledge:()=>45e4},effect:F("tech_warp_drive_effect"),action(){return!!ii($(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:F("tech_habitat"),desc:F("tech_habitat_desc"),category:"housing",era:"interstellar",reqs:{alpha:2,droids:1},grant:["alpha",3],cost:{Knowledge:()=>48e4},effect:F("tech_habitat_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.habitat={count:0,on:0},!0)}},graphene:{id:"tech-graphene",title:F("tech_graphene"),desc:F("tech_graphene"),category:"crafting",era:"interstellar",reqs:{alpha:3,infernite:1},grant:["graphene",1],cost:{Knowledge:()=>54e4,Adamantite:()=>1e4},effect:F("tech_graphene_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.g_factory={count:0,on:0,Lumber:0,Coal:0,Oil:0},!0)}},aerogel:{id:"tech-aerogel",title:F("tech_aerogel"),desc:F("tech_aerogel"),category:"crafting",era:"interstellar",reqs:{graphene:1,science:13},grant:["aerogel",1],cost:{Knowledge:()=>75e4,Graphene:()=>5e4,Infernite:()=>500},effect:F("tech_aerogel_effect"),action(){return!!ii($(this)[0])&&(t.resource.Aerogel.display=!0,na(),!0)},post(){os()}},mega_manufacturing:{id:"tech-mega_manufacturing",title:F("tech_mega_manufacturing"),desc:F("tech_mega_manufacturing"),category:"crafting",era:"intergalactic",reqs:{high_tech:16,alpha:3},grant:["alpha",4],cost:{Knowledge:()=>565e4},effect:()=>F("tech_mega_manufacturing_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.int_factory={count:0,on:0},!0)}},luxury_condo:{id:"tech-luxury_condo",title:F("tech_luxury_condo"),desc:F("tech_luxury_condo"),category:"housing",era:"intergalactic",reqs:{high_tech:17,alpha:4},grant:["alpha",5],cost:{Knowledge:()=>15e6},effect:()=>F("tech_luxury_condo_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.luxury_condo={count:0,on:0},!0)}},stellar_engine:{id:"tech-stellar_engine",title:F("tech_stellar_engine"),desc:F("tech_stellar_engine"),category:"stellar_engine",era:"interstellar",reqs:{blackhole:2},grant:["blackhole",3],cost:{Knowledge:()=>1e6},effect:F("tech_stellar_engine_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.stellar_engine={count:0,mass:8,exotic:0},!0)}},mass_ejector:{id:"tech-mass_ejector",title:F("tech_mass_ejector"),desc:F("tech_mass_ejector"),category:"stellar_engine",era:"interstellar",reqs:{blackhole:4},grant:["blackhole",5],cost:{Knowledge:()=>11e5},effect:F("tech_mass_ejector_effect"),action(){return!!ii($(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:F("tech_asteroid_redirect"),desc:F("tech_asteroid_redirect"),category:"stellar_engine",era:"intergalactic",reqs:{blackhole:5,gateway:3},grant:["blackhole",6],cost:{Knowledge:()=>35e5},effect:F("tech_asteroid_redirect_effect"),action(){return!!ii($(this)[0])},post(){qe("Physics")}},exotic_infusion:{id:"tech-exotic_infusion",title:F("tech_exotic_infusion"),desc:F("tech_exotic_infusion"),category:"stellar_engine",era:"interstellar",reqs:{whitehole:1},grant:["whitehole",2],cost:{Knowledge:()=>15e5,Soul_Gem:()=>10},effect:()=>`
                ${F("tech_exotic_infusion_effect",[t.resource.Soul_Gem.name])}
                ${F("tech_exotic_infusion_effect2")}
                `,action(){return!!si($(this)[0])},flair:()=>F("tech_exotic_infusion_flair")},infusion_check:{id:"tech-infusion_check",title:F("tech_infusion_check"),desc:F("tech_infusion_check"),category:"stellar_engine",era:"interstellar",reqs:{whitehole:2},grant:["whitehole",3],cost:{Knowledge:()=>15e5,Soul_Gem:()=>10},effect:()=>`
                ${F("tech_infusion_check_effect")}
                ${F("tech_exotic_infusion_effect2")}
                `,action(){return!!si($(this)[0])},flair:()=>F("tech_infusion_check_flair")},infusion_confirm:{id:"tech-infusion_confirm",title:F("tech_infusion_confirm"),desc:F("tech_infusion_confirm"),category:"stellar_engine",era:"interstellar",reqs:{whitehole:3},grant:["whitehole",4],cost:{Knowledge:()=>15e5,Soul_Gem:()=>10},effect(){let e=Ns("bigbang"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name"),r=`
                ${F("wiki_tech_infusion_confirm_gains",[e.plasmid,e.phage,e.dark,a])}
                `;return`
                ${F("tech_infusion_confirm_effect")}
                ${F("tech_exotic_infusion_effect2")}
                ${r}`},action(){if(ii($(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))),M(),$s("reset",{end:"blackhole"}),Pn(`extinct_${t.race.species}`),t.race.universe){case"heavy":Pn("heavy");break;case"antimatter":Pn("canceled");break;case"evil":Pn("eviltwin");break;case"micro":Pn("microbang",!0);break;case"standard":Pn("whitehole")}t.space.hasOwnProperty("spaceport")&&0===t.space.spaceport.count&&Pn("red_dead"),Pn("squished",!0),"evil"===t.race.universe&&"angelic"===Di[t.race.species].type&&jn("nephilim"),t.race.junker&&"junker"===t.race.species&&jn("the_misery"),t.race.decay&&Pn("dissipated"),t.race.steelen&&jn("steelem");let a=t.race.species,r=t.race.gods,i=t.city.calendar.orbit,s=t.city.biome,n=t.city.ptrait,c=Ns("bigbang");Cn(),t.stats.blackhole++,sn(),t.prestige.Phage.count+=c.phage,t.stats.phage+=c.phage,"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=c.plasmid,t.stats.antiplasmid+=c.plasmid):(t.prestige.Plasmid.count+=c.plasmid,t.stats.plasmid+=c.plasmid),t.prestige.Dark.count=+(t.prestige.Dark.count+c.dark).toFixed(3),t.stats.dark=+(t.stats.dark+c.dark).toFixed(3),t.stats.universes++;let o=!!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),o&&(t.race.srace=o),U({orbit:i,biome:s,ptrait:n,geology:!1}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}()}),4e3),!1}return!1},flair:()=>F("tech_infusion_confirm_flair")},stabilize_blackhole:{id:"tech-stabilize_blackhole",title:F("tech_stabilize_blackhole"),desc:()=>`
                ${F("tech_stabilize_blackhole")}
                ${F("tech_stabilize_blackhole2")}
                `,category:"stellar_engine",era:"interstellar",reqs:{whitehole:1},grant:["stablized",1],cost:{Knowledge:()=>15e5,Neutronium:()=>2e4},effect:F("tech_stabilize_blackhole_effect"),action(){if(ii($(this)[0])){if(t.interstellar.stellar_engine.mass+=2e4*Aa.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=qn();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:F("tech_veil"),desc:F("tech_veil"),category:"magic",era:"interstellar",reqs:{blackhole:2},condition:()=>"magic"===t.race.universe,grant:["veil",1],cost:{Knowledge:()=>125e4},effect:F("tech_veil_effect"),action(){return!!ii($(this)[0])}},mana_syphon:{id:"tech-mana_syphon",title:F("tech_mana_syphon"),desc:F("tech_mana_syphon"),category:"magic",era:"interstellar",reqs:{veil:1},condition:()=>"magic"===t.race.universe,grant:["veil",2],cost:{Knowledge:()=>15e5},effect:F("tech_mana_syphon_effect"),action(){return!!ii($(this)[0])},post(){qe("Physics")}},gravitational_waves:{id:"tech-gravitational_waves",title:F("tech_gravitational_waves"),desc:F("tech_gravitational_waves"),category:"power_generation",era:"interstellar",reqs:{blackhole:4},grant:["gravity",1],cost:{Knowledge:()=>125e4},effect:F("tech_gravitational_waves_effect"),action(){return!!ii($(this)[0])}},gravity_convection:{id:"tech-gravity_convection",title:F("tech_gravity_convection"),desc:F("tech_gravity_convection"),category:"power_generation",era:"interstellar",reqs:{gravity:1},grant:["gravity",2],cost:{Knowledge:()=>135e4},effect:F("tech_gravity_convection_effect"),action(){return!!ii($(this)[0])}},wormholes:{id:"tech-wormholes",title:F("tech_wormholes"),desc:F("tech_wormholes"),category:"space_exploration",era:"intergalactic",reqs:{gravity:1,science:15},grant:["stargate",1],cost:{Knowledge:()=>225e4},effect:F("tech_wormholes_effect"),action(){return!!ii($(this)[0])}},portal:{id:"tech-portal",title:F("tech_portal"),desc:F("tech_portal_desc"),category:"hell_dimension",era:"interstellar",reqs:{wsc:1},grant:["portal",1],cost:{Knowledge:()=>5e5},effect:F("tech_portal_effect"),action(){return!!ii($(this)[0])}},fortifications:{id:"tech-fortifications",title:F("tech_fort"),desc:F("tech_fort_desc"),category:"hell_dimension",era:"interstellar",reqs:{portal:1},grant:["portal",2],cost:{Knowledge:()=>55e4,Stone:()=>1e6},effect:F("tech_fort_effect"),action(){return!!ii($(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"===Di[t.race.species].type?Pn("blood_war"):Pn("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(){ja()}},war_drones:{id:"tech-war_drones",title:F("tech_war_drones"),desc:F("tech_war_drones"),category:"hell_dimension",era:"interstellar",reqs:{portal:2,graphene:1},grant:["portal",3],cost:{Knowledge:()=>7e5},effect:F("tech_war_drones_effect"),action(){return!!ii($(this)[0])&&(t.settings.portal.badlands=!0,t.portal.war_drone={count:0,on:0},!0)}},demon_attractor:{id:"tech-demon_attractor",title:F("tech_demon_attractor"),desc:F("tech_demon_attractor"),category:"hell_dimension",era:"interstellar",reqs:{portal:3,stanene:1},grant:["portal",4],cost:{Knowledge:()=>745e3},effect:F("tech_demon_attractor_effect"),action(){return!!ii($(this)[0])&&(t.portal.attractor={count:0,on:0},!0)}},combat_droids:{id:"tech-combat_droids",title:F("tech_combat_droids"),desc:F("tech_combat_droids"),category:"hell_dimension",era:"interstellar",reqs:{portal:4},grant:["portal",5],cost:{Knowledge:()=>762e3,Soul_Gem:()=>1},effect:F("tech_combat_droids_effect"),action(){return!!ii($(this)[0])&&(t.portal.war_droid={count:0,on:0},!0)},flair:()=>F("tech_combat_droids_flair")},repair_droids:{id:"tech-repair_droids",title:F("tech_repair_droids"),desc:F("tech_repair_droids"),category:"hell_dimension",era:"interstellar",reqs:{portal:5},grant:["portal",6],cost:{Knowledge:()=>794e3,Soul_Gem:()=>1},effect:F("tech_repair_droids_effect"),action(){return!!ii($(this)[0])&&(t.portal.repair_droid={count:0,on:0},!0)}},advanced_predators:{id:"tech-advanced_predators",title:F("tech_advanced_predators"),desc:F("tech_advanced_predators"),category:"hell_dimension",era:"intergalactic",reqs:{portal:6,xeno:4},grant:["portal",7],cost:{Knowledge:()=>5e6,Bolognium:()=>5e5,Vitreloy:()=>25e4},effect:F("tech_advanced_predators_effect"),action(){return!!ii($(this)[0])}},enhanced_droids:{id:"tech-enhanced_droids",title:F("tech_enhanced_droids"),desc:F("tech_enhanced_droids"),category:"hell_dimension",era:"interstellar",reqs:{portal:5,military:9},grant:["hdroid",1],cost:{Knowledge:()=>105e4},effect:F("tech_enhanced_droids_effect"),action(){return!!ii($(this)[0])}},sensor_drone:{id:"tech-sensor_drone",title:F("tech_sensor_drone"),desc:F("tech_sensor_drone"),category:"hell_dimension",era:"interstellar",reqs:{portal:3,infernite:1,stanene:1,graphene:1},grant:["infernite",2],cost:{Knowledge:()=>725e3},effect:F("tech_sensor_drone_effect"),action(){return!!ii($(this)[0])&&(t.portal.sensor_drone={count:0,on:0},!0)}},map_terrain:{id:"tech-map_terrain",title:F("tech_map_terrain"),desc:F("tech_map_terrain"),category:"hell_dimension",era:"interstellar",reqs:{infernite:2},grant:["infernite",3],cost:{Knowledge:()=>948e3},effect:()=>F("tech_map_terrain_effect"),action(){return!!ii($(this)[0])}},calibrated_sensors:{id:"tech-calibrated_sensors",title:F("tech_calibrated_sensors"),desc:F("tech_calibrated_sensors"),category:"hell_dimension",era:"interstellar",reqs:{infernite:3},grant:["infernite",4],cost:{Knowledge:()=>1125e3,Infernite:()=>3500},effect:()=>F("tech_calibrated_sensors_effect"),action(){return!!ii($(this)[0])}},shield_generator:{id:"tech-shield_generator",title:F("tech_shield_generator"),desc:F("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:()=>F("tech_shield_generator_effect"),action(){return!!ii($(this)[0])}},enhanced_sensors:{id:"tech-enhanced_sensors",title:F("tech_enhanced_sensors"),desc:F("tech_enhanced_sensors"),category:"hell_dimension",era:"intergalactic",reqs:{infernite:5,xeno:4},grant:["infernite",6],cost:{Knowledge:()=>475e4,Vitreloy:()=>25e3},effect:()=>F("tech_enhanced_sensors_effect"),action(){return!!ii($(this)[0])}},xeno_linguistics:{id:"tech-xeno_linguistics",title:F("tech_xeno_linguistics"),desc:F("tech_xeno_linguistics"),category:"andromeda",era:"intergalactic",reqs:{xeno:1},grant:["xeno",2],cost:{Knowledge:()=>3e6},effect:()=>F("tech_xeno_linguistics_effect"),action(){return!!ii($(this)[0])&&(t.settings.space.gorddon=!0,!0)}},xeno_culture:{id:"tech-xeno_culture",title:F("tech_xeno_culture"),desc:F("tech_xeno_culture"),category:"progress",era:"intergalactic",reqs:{xeno:3},grant:["xeno",4],cost:{Knowledge:()=>34e5},effect:()=>F("tech_xeno_culture_effect",[Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name,Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].entity]),action(){return!!ii($(this)[0])&&(t.galaxy.embassy={count:0,on:0},!0)}},cultural_exchange:{id:"tech-cultural_exchange",title:F("tech_cultural_exchange"),desc:F("tech_cultural_exchange"),category:"andromeda",era:"intergalactic",reqs:{xeno:5},grant:["xeno",6],cost:{Knowledge:()=>355e4},effect:()=>F("tech_cultural_exchange_effect",[Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),action(){return!!ii($(this)[0])&&(t.galaxy.symposium={count:0,on:0},t.galaxy.dormitory={count:0,on:0},!0)}},shore_leave:{id:"tech-shore_leave",title:F("tech_shore_leave"),desc:F("tech_shore_leave"),category:"science",era:"intergalactic",reqs:{andromeda:3,xeno:6},grant:["xeno",7],cost:{Knowledge:()=>46e5},effect:()=>F("tech_shore_leave_effect"),action(){return!!ii($(this)[0])}},xeno_gift:{id:"tech-xeno_gift",title:F("tech_xeno_gift"),desc:F("tech_xeno_gift"),category:"andromeda",era:"intergalactic",reqs:{high_tech:16,xeno:7},grant:["xeno",8],cost:{Knowledge:()=>65e5,Infernite:()=>125e3},effect:()=>F("tech_xeno_gift_effect"),action(){return!!ii($(this)[0])&&(t.galaxy.consulate={count:0},t.settings.space.alien1=!0,ms(F("tech_xeno_gift_msg",[Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),"info",!1,["progress"]),!0)}},industrial_partnership:{id:"tech-industrial_partnership",title:F("tech_industrial_partnership"),desc:()=>F("tech_industrial_partnership"),category:"andromeda",era:"intergalactic",reqs:{xeno:9},grant:["xeno",10],cost:{Knowledge:()=>725e4},effect:()=>F("tech_industrial_partnership_effect",[Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),action(){return!!ii($(this)[0])&&(t.galaxy.vitreloy_plant={count:0,on:0},!0)}},embassy_housing:{id:"tech-embassy_housing",title:F("tech_embassy_housing"),desc:()=>F("tech_embassy_housing"),category:"andromeda",era:"intergalactic",reqs:{xeno:10,science:18},grant:["xeno",11],cost:{Knowledge:()=>1075e4},effect:()=>F("tech_embassy_housing_effect",[Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),action(){return!!ii($(this)[0])}},advanced_telemetry:{id:"tech-advanced_telemetry",title:F("tech_advanced_telemetry"),desc:F("tech_advanced_telemetry"),category:"science",era:"intergalactic",reqs:{xeno:5},grant:["telemetry",1],cost:{Knowledge:()=>42e5,Vitreloy:()=>1e4},effect:()=>F("tech_advanced_telemetry_effect"),action(){return!!ii($(this)[0])}},defense_platform:{id:"tech-defense_platform",title:F("galaxy_defense_platform"),desc:F("galaxy_defense_platform"),category:"andromeda",era:"intergalactic",reqs:{stargate:5,piracy:1},grant:["stargate",6],cost:{Knowledge:()=>485e4},effect:F("tech_defense_platform_effect"),action(){return!!ii($(this)[0])&&(t.galaxy.defense_platform={count:0,on:0},!0)}},scout_ship:{id:"tech-scout_ship",title:F("galaxy_scout_ship"),desc:F("galaxy_scout_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{gateway:3},grant:["andromeda",1],cost:{Knowledge:()=>26e5},effect:()=>F("tech_scout_ship_effect"),action(){return!!ii($(this)[0])&&(t.galaxy.scout_ship={count:0,on:0,crew:0,mil:0},!0)}},corvette_ship:{id:"tech-corvette_ship",title:F("galaxy_corvette_ship"),desc:F("galaxy_corvette_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:1,xeno:1},grant:["andromeda",2],cost:{Knowledge:()=>32e5},effect:()=>F("tech_corvette_ship_effect"),action(){return!!ii($(this)[0])&&(t.galaxy.corvette_ship={count:0,on:0,crew:0,mil:0},!0)}},frigate_ship:{id:"tech-frigate_ship",title:F("galaxy_frigate_ship"),desc:F("galaxy_frigate_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:2,xeno:6},grant:["andromeda",3],cost:{Knowledge:()=>4e6},effect:()=>F("tech_frigate_ship_effect"),action(){return!!ii($(this)[0])&&(t.galaxy.frigate_ship={count:0,on:0,crew:0,mil:0},Et(),!0)}},cruiser_ship:{id:"tech-cruiser_ship",title:F("galaxy_cruiser_ship"),desc:F("galaxy_cruiser_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:3,xeno:10},grant:["andromeda",4],cost:{Knowledge:()=>75e5},effect:()=>F("tech_cruiser_ship_effect",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name]),action(){return!!ii($(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,Et(),!0)}},dreadnought:{id:"tech-dreadnought",title:F("galaxy_dreadnought"),desc:F("galaxy_dreadnought"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:4,science:18},grant:["andromeda",5],cost:{Knowledge:()=>1e7},effect:()=>F("tech_dreadnought_effect"),action(){return!!ii($(this)[0])&&(t.galaxy.dreadnought={count:0,on:0,crew:0,mil:0},Et(),!0)}},ship_dock:{id:"tech-ship_dock",title:F("galaxy_ship_dock"),desc:F("galaxy_ship_dock"),category:"andromeda_ships",era:"intergalactic",reqs:{gateway:3,xeno:6},grant:["gateway",4],cost:{Knowledge:()=>39e5},effect:()=>F("tech_ship_dock_effect"),action(){return!!ii($(this)[0])&&(t.galaxy.ship_dock={count:0,on:0},!0)}},ore_processor:{id:"tech-ore_processor",title:F("galaxy_ore_processor"),desc:F("galaxy_ore_processor"),category:"space_mining",era:"intergalactic",reqs:{conflict:2},grant:["conflict",3],cost:{Knowledge:()=>75e5},effect:()=>F("tech_ore_processor_effect"),action(){return!!ii($(this)[0])&&(t.galaxy.ore_processor={count:0,on:0},!0)}},scavenger:{id:"tech-scavenger",title:F("galaxy_scavenger"),desc:F("galaxy_scavenger"),category:"science",era:"intergalactic",reqs:{conflict:3},grant:["conflict",4],cost:{Knowledge:()=>8e6},effect:()=>F("tech_scavenger_effect",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name]),action(){return!!ii($(this)[0])&&(t.galaxy.scavenger={count:0,on:0,crew:0},!0)}},coordinates:{id:"tech-coordinates",title:F("tech_coordinates"),desc:F("tech_coordinates"),category:"andromeda",era:"intergalactic",reqs:{science:18,conflict:5},grant:["chthonian",1],cost:{Knowledge:()=>1e7},effect:()=>F("tech_coordinates_effect"),action(){return!!ii($(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:F("tech_chthonian_survey"),desc:F("tech_chthonian_survey"),category:"space_mining",era:"intergalactic",reqs:{chthonian:2},grant:["chthonian",3],cost:{Knowledge:()=>118e5},effect:()=>F("tech_chthonian_survey_effect"),action(){return!!ii($(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},ms(F("tech_chthonian_survey_result"),"info",!1,["progress"]),!0)},post(){os()}},gateway_depot:{id:"tech-gateway_depot",title:F("galaxy_gateway_depot"),desc:F("galaxy_gateway_depot"),category:"storage",era:"intergalactic",reqs:{gateway:4},grant:["gateway",5],cost:{Knowledge:()=>435e4},effect:()=>F("tech_gateway_depot_effect"),action(){return!!ii($(this)[0])&&(t.galaxy.gateway_depot={count:0,on:0},!0)}},soul_forge:{id:"tech-soul_forge",title:F("portal_soul_forge_title"),desc:F("portal_soul_forge_title"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:3},grant:["hell_pit",4],cost:{Knowledge:()=>275e4},effect:()=>F("tech_soul_forge_effect"),action(){return!!ii($(this)[0])&&(t.portal.soul_forge={count:0,on:0,kills:0},!0)}},soul_attractor:{id:"tech-soul_attractor",title:F("portal_soul_attractor_title"),desc:F("portal_soul_attractor_title"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:4,high_tech:16},grant:["hell_pit",5],cost:{Knowledge:()=>55e5},effect:()=>F("tech_soul_attractor_effect"),action(){return!!ii($(this)[0])&&(t.portal.soul_attractor={count:0,on:0},!0)}},soul_absorption:{id:"tech-soul_absorption",title:F("tech_soul_absorption"),desc:F("tech_soul_absorption"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:5},grant:["hell_pit",6],cost:{Knowledge:()=>6e6,Infernite:()=>25e4},effect:()=>F("tech_soul_absorption_effect"),action(){return!!ii($(this)[0])}},soul_link:{id:"tech-soul_link",title:F("tech_soul_link"),desc:F("tech_soul_link"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:6},grant:["hell_pit",7],cost:{Knowledge:()=>75e5,Vitreloy:()=>25e4},effect:()=>F("tech_soul_link_effect"),action(){return!!ii($(this)[0])}},gun_emplacement:{id:"tech-gun_emplacement",title:F("portal_gun_emplacement_title"),desc:F("portal_gun_emplacement_title"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:4},grant:["hell_gun",1],cost:{Knowledge:()=>3e6},effect:()=>F("tech_gun_emplacement_effect"),action(){return!!ii($(this)[0])&&(t.portal.gun_emplacement={count:0,on:0},!0)}},advanced_emplacement:{id:"tech-advanced_emplacement",title:F("tech_advanced_emplacement"),desc:F("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:()=>F("tech_advanced_emplacement_effect"),action(){return!!ii($(this)[0])}},dial_it_to_11:{id:"tech-dial_it_to_11",title:F("tech_dial_it_to_11"),desc:F("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=Ns("cataclysm"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name");return`
                ${F("tech_dial_it_to_11_effect",[Vt().dwarf,t.race.cataclysm?Vt().red:Di[t.race.species].home])}
                ${F("tech_dial_it_to_11_effect2")}
                ${F("star_dock_genesis_effect2",[e.plasmid,a])}
                ${F("star_dock_genesis_effect3",[e.phage])}
                `},action(){return!!ii($(this)[0])&&($("#main").addClass("earthquake"),setTimeout((function(){$("#main").removeClass("earthquake"),function(){if(t.city.ptrait.includes("unstable")&&t.tech.quaked){j.w&&j.w.terminate(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),$s("reset",{end:"cataclysm"}),M();let a=Ns("cataclysm");t.stats.cataclysm++,sn(),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),Pn("squished",!0),Pn(`extinct_${t.race.species}`),"hellscape"===t.city.biome&&"demonic"!==Di[t.race.species].type&&jn("take_no_advice"),Cn(),Pn("shaken"),t.race.cataclysm&&Pn("failed_history");let r=!!t.race.hasOwnProperty("srace")&&t.race.srace,i=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},i>0&&(t.race.corruption=i),r&&(t.race.srace=r),U({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 s=["crispr","trade","craft"];for(let e=0;eF("tech_dial_it_to_11_flair")},limit_collider:{id:"tech-limit_collider",title:F("tech_limit_collider"),desc:F("tech_limit_collider"),category:"science",wiki:!1,era:"deep_space",reqs:{quaked:1},grant:["quaked",2],cost:{Knowledge:()=>5e5},effect:()=>F("tech_limit_collider_effect"),action(){return!!ii($(this)[0])}},mana:{id:"tech-mana",title:F("tech_mana"),desc:F("tech_mana"),category:"magic",era:"civilized",reqs:{primitive:3},grant:["magic",1],condition:()=>"magic"===t.race.universe,cost:{Knowledge:()=>25},effect:()=>F("tech_mana_effect"),action(){return!!ii($(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:F("tech_mana_flair"),post(){os()}},ley_lines:{id:"tech-ley_lines",title:F("tech_ley_lines"),desc:F("tech_ley_lines"),category:"magic",era:"civilized",reqs:{magic:1},grant:["magic",2],condition:()=>"magic"===t.race.universe,cost:{Knowledge:()=>40},effect:()=>F("tech_ley_lines_effect"),action(){return!!ii($(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:F("tech_rituals"),desc:F("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:()=>F("tech_rituals_effect"),action(){return!!ii($(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(){$i()}},crafting_ritual:{id:"tech-crafting_ritual",title:F("tech_crafting_ritual"),desc:F("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:()=>F("tech_crafting_ritual_effect"),action(){return!!ii($(this)[0])&&(t.race.casting.crafting=0,!0)},post(){$i()}},mana_nexus:{id:"tech-mana_nexus",title:F("tech_mana_nexus"),desc:F("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:()=>F("tech_mana_nexus_effect"),action(){return!!ii($(this)[0])},post(){qe("Physics")}},clerics:{id:"tech-clerics",title:F("tech_clerics"),desc:F("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:()=>F("tech_clerics_effect"),action(){return!!ii($(this)[0])}},conjuring:{id:"tech-conjuring",title:F("tech_conjuring"),desc:F("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:()=>F("tech_conjuring_effect"),action(){return!!ii($(this)[0])}},res_conjuring:{id:"tech-res_conjuring",title:F("tech_res_conjuring"),desc:F("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:()=>F("tech_res_conjuring_effect"),action(){return!!ii($(this)[0])}},alchemy:{id:"tech-alchemy",title:F("tech_alchemy"),desc:F("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:()=>F("tech_alchemy_effect"),action(){return!!ii($(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(){Cs($("#resources")),Ba(),t.settings.tabLoad&&Da("alchemy")}},transmutation:{id:"tech-transmutation",title:F("tech_transmutation"),desc:F("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:()=>F("tech_transmutation_effect"),action(){return!!ii($(this)[0])},post(){Cs($("#resources")),Ba()}},secret_society:{id:"tech-secret_society",title:F("tech_secret_society"),desc:F("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:()=>F("tech_secret_society_effect"),action(){return!!ii($(this)[0])}},cultists:{id:"tech-cultists",title:F("tech_cultists"),desc:F("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:()=>F("tech_cultists_effect"),action(){return!!ii($(this)[0])}},conceal_ward:{id:"tech-conceal_ward",title:F("tech_conceal_ward"),desc:F("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:()=>F("tech_conceal_ward_effect"),action(){return!!ii($(this)[0])&&(t.city.conceal_ward={count:0},t.space.conceal_ward={count:0},!0)}},subtle_rituals:{id:"tech-subtle_rituals",title:F("tech_subtle_rituals"),desc:F("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:()=>F("tech_subtle_rituals_effect"),action(){return!!ii($(this)[0])}},pylon_camouflage:{id:"tech-pylon_camouflage",title:F("tech_pylon_camouflage"),desc:F("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:()=>F("tech_pylon_camouflage_effect"),action(){return!!ii($(this)[0])}},fake_tech:{id:"tech-fake_tech",title:F("tech_fake_tech"),desc:F("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:()=>F("tech_fake_tech_effect"),action(){return!!ii($(this)[0])}},concealment:{id:"tech-concealment",title:F("tech_concealment"),desc:F("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:()=>F("tech_concealment_effect"),action(){return!!ii($(this)[0])}},improved_concealment:{id:"tech-improved_concealment",title:F("tech_improved_concealment"),desc:F("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:25e3,Knowledge:()=>2e7},effect:()=>F("tech_improved_concealment_effect"),action(){return!!ii($(this)[0])}},outerplane_summon:{id:"tech-outerplane_summon",title:F("tech_outerplane_summon"),desc:F("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:6e4,Knowledge:()=>6e7,Demonic_Essence:()=>1},effect:()=>F("tech_outerplane_summon_effect"),action(){return!!ii($(this)[0])}},dark_bomb:{id:"tech-dark_bomb",title:F("tech_dark_bomb"),desc:F("tech_dark_bomb"),category:"hell_dimension",era:"dimensional",reqs:{},reqs:{hell_spire:10,b_stone:2,waygate:2,sphinx_bribe:1},condition(){let e=qn();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:()=>F("tech_dark_bomb_effect"),action(){return!!ii($(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:()=>F("tech_dark_bomb_flair")},bribe_sphinx:{id:"tech-bribe_sphinx",title:F("portal_sphinx_bribe"),desc:F("portal_sphinx_bribe"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:8},grant:["sphinx_bribe",1],cost:{Soul_Gem:()=>250,Supply:()=>5e5},effect:()=>F("tech_bribe_sphinx_effect"),action(){return!!ii($(this)[0])&&(t.resource.Codex.display=!0,t.resource.Codex.amount=1,ms(F("tech_bribe_sphinx_msg"),"info",!1,["progress","hell"]),!0)}},alien_biotech:{id:"tech-alien_biotech",title:F("tech_alien_biotech"),desc:F("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:()=>F(t.race.orbit_decayed?"tech_alien_biotech_effect_alt":"tech_alien_biotech_effect"),action(){return!!ii($(this)[0])}},zero_g_lab:{id:"tech-zero_g_lab",title:F("tech_zero_g_lab"),desc:F("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:F("tech_zero_g_lab_effect"),action(){return!!ii($(this)[0])&&(t.space.zero_g_lab={count:0,on:0},!0)}},operating_base:{id:"tech-operating_base",title:F("tech_operating_base"),desc:F("tech_operating_base"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{enceladus:3,triton:1},grant:["enceladus",4],cost:{Knowledge:()=>14e5},effect:()=>F("tech_operating_base_effect",[Vt().enceladus]),action(){return!!ii($(this)[0])&&(t.space.operating_base={count:0,on:0},!0)}},munitions_depot:{id:"tech-munitions_depot",title:F("tech_munitions_depot"),desc:F("tech_munitions_depot"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{enceladus:4},grant:["enceladus",5],cost:{Knowledge:()=>15e5},effect:()=>F("tech_munitions_depot_effect"),action(){return!!ii($(this)[0])&&(t.space.munitions_depot={count:0},!0)}},fob:{id:"tech-fob",title:F("tech_fob"),desc:F("tech_fob"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{triton:1},grant:["triton",2],cost:{Knowledge:()=>145e4},effect:()=>F("tech_fob_effect",[Vt().triton]),action(){return!!ii($(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:F("tech_bac_tanks"),desc:F("tech_bac_tanks_desc"),category:"military",era:"solar",path:["truepath"],reqs:{medic:1,triton:2},grant:["medic",2],cost:{Knowledge:()=>175e4},effect:F("tech_bac_tanks_effect"),action(){return!!ii($(this)[0])}},medkit:{id:"tech-medkit",title:F("tech_medkit"),desc:F("tech_medkit"),category:"military",era:"solar",path:["truepath"],reqs:{medic:2,outer:4},grant:["medic",3],cost:{Knowledge:()=>225e4,Quantium:()=>25e4,Cipher:()=>8e3},effect:F("tech_medkit_effect"),action(){return!!ii($(this)[0])}},sam_site:{id:"tech-sam_site",title:F("tech_sam_site"),desc:F("tech_sam_site"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{titan:6,triton:1},grant:["titan",7],cost:{Knowledge:()=>1475e3},effect:()=>F("tech_sam_site_effect",[Vt().titan]),action(){return!!ii($(this)[0])&&(t.space.sam={count:0,on:0},!0)}},data_cracker:{id:"tech-data_cracker",title:F("tech_data_cracker"),desc:F("tech_data_cracker"),category:"science",era:"solar",path:["truepath"],reqs:{titan:7,kuiper:1},grant:["titan",8],cost:{Knowledge:()=>275e4,Cipher:()=>25e3},effect:()=>F("tech_data_cracker_effect",[t.resource.Cipher.name]),action(){return!!ii($(this)[0])&&(t.space.decoder={count:0,on:0},!0)}},ai_core_tp:{id:"tech-ai_core_tp",title:F("tech_ai_core"),desc:F("tech_ai_core"),category:"ai_core",era:"solar",path:["truepath"],reqs:{titan:8},grant:["titan",9],cost:{Knowledge:()=>3e6,Cipher:()=>1e5},effect:F("tech_ai_core_effect"),action(){return!!ii($(this)[0])&&(t.space.ai_core={count:0},!0)}},ai_optimizations:{id:"tech-ai_optimizations",title:F("tech_ai_optimizations"),desc:F("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:F("tech_ai_optimizations_effect"),action(){return!!ii($(this)[0])},class:"synth"},synthetic_life:{id:"tech-synthetic_life",title:F("tech_synthetic_life"),desc:F("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:F("tech_synthetic_life_effect"),action(){return!!ii($(this)[0])&&(t.space.ai_colonist={count:0,on:0},!0)},class:"synth"},protocol66:{id:"tech-protocol66",title:F("tech_protocol66"),desc:F("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:F("tech_protocol66_effect"),action(){return!!si($(this)[0])},flair:F("tech_protocol66_flair"),class:"synth"},protocol66a:{id:"tech-protocol66a",title:F("tech_protocol66"),desc:F("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=Ns("ai"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name"),r=`
                ${F("tech_protocol66a_effect_gains",[e.plasmid,a,e.phage,e.cores])}
                `;return`
                ${F("tech_protocol66a_effect")}
                ${r}`},action(){return!!ii($(this)[0])&&(j.w&&j.w.terminate(),ds(),$("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))),M(),$s("reset",{end:"ai apocalypse"}),Pn(`extinct_${t.race.species}`),Pn("obsolete"),Pn("squished",!0),t.race.junker&&"junker"===t.race.species&&jn("the_misery");let a=t.race.species,r=t.race.gods,i=t.city.calendar.orbit,s=t.city.biome,n=t.city.ptrait,c=t.city.geology,o=Ns("ai");Cn(),t.stats.aiappoc++,sn(),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.AICore.count+=o.cores,t.stats.cores+=o.cores;let l="synthetic"!==Di[a].type?a:t.race.hasOwnProperty("srace")?t.race.srace:a;t.stats.synth[l]=!0;let _=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},_>0&&(t.race.corruption=_),U({orbit:i,biome:s,ptrait:n,geology:c}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}()}),4e3),!0)},flair:F("tech_protocol66a_flair"),class:"synth"},terraforming_tp:{id:"tech-terraforming_tp",title:F("tech_terraforming"),desc:F("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:()=>F("tech_terraforming_effect",[Vt().red]),action(){return!!ii($(this)[0])&&(t.space.terraformer={count:0},!0)}},quantium:{id:"tech-quantium",title:F("tech_quantium"),desc:F("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:F("tech_quantium_effect"),action(){return!!ii($(this)[0])&&(t.resource.Quantium.display=!0,!0)},post(){os()}},anitgrav_bunk:{id:"tech-anitgrav_bunk",title:F("tech_anitgrav_bunk"),desc:F("tech_anitgrav_bunk"),category:"military",era:"solar",path:["truepath"],reqs:{marines:1,quantium:1},grant:["marines",2],cost:{Knowledge:()=>125e4,Quantium:()=>5e5},effect:()=>F("tech_anitgrav_bunk_effect",[F("space_red_space_barracks_title")]),action(){return!!ii($(this)[0])}},higgs_boson_tp:{id:"tech-higgs_boson_tp",title:F("tech_higgs_boson"),desc:F("tech_higgs_boson"),category:"science",era:"early_space",path:["truepath"],reqs:{supercollider:2},grant:["tp_particles",1],cost:{Knowledge:()=>125e3},effect:F("tech_higgs_boson_effect"),action(){return!!ii($(this)[0])}},long_range_probes:{id:"tech-long_range_probes",title:F("tech_long_range_probes"),desc:F("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:F("tech_long_range_probes_effect"),action(){return!!ii($(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:F("tech_strange_signal"),desc:F("tech_strange_signal"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:1,syard_sensor:4},grant:["outer",2],cost:{Knowledge:()=>135e4},effect:F("tech_strange_signal_effect"),action(){return!!ii($(this)[0])&&(t.settings.space.triton=!0,!0)}},data_analysis:{id:"tech-data_analysis",title:F("tech_data_analysis"),desc:F("tech_data_analysis"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:3},grant:["outer",4],cost:{Knowledge:()=>18e5,Cipher:()=>12500},effect:F("tech_data_analysis_effect"),action(){return!!ii($(this)[0])&&(ms(F("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:F("tech_mass_relay"),desc:F("tech_mass_relay"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:4},grant:["outer",5],cost:{Knowledge:()=>22e5,Cipher:()=>4e4},effect:F("tech_mass_relay_effect"),action(){return!!ii($(this)[0])&&(t.space.mass_relay={count:0},!0)}},nav_data:{id:"tech-nav_data",title:F("tech_nav_data"),desc:F("tech_nav_data"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:6},grant:["outer",7],cost:{Knowledge:()=>225e4,Cipher:()=>6e4},effect:F("tech_nav_data_effect"),action(){return!!ii($(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},ms(F("tech_nav_data_result",[Vt().eris]),"info",!1,["progress"]),!0)}},sensor_logs:{id:"tech-sensor_logs",title:F("tech_sensor_logs"),desc:F("tech_sensor_logs"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:7},grant:["outer",8],cost:{Knowledge:()=>35e5,Cipher:()=>65e3},effect:F("tech_sensor_logs_effect"),action(){return!!ii($(this)[0])&&(ms(F("tech_sensor_logs_result"),"info",!1,["progress"]),!0)}},dronewar:{id:"tech-dronewar",title:F("tech_dronewar"),desc:F("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:()=>F("tech_dronewar_effect",[Vt().eris]),action(){return!!ii($(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:F("tech_drone_tank"),desc:F("tech_drone_tank"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{eris:3},grant:["eris",4],cost:{Knowledge:()=>34e5,Cipher:()=>5e4},effect:F("tech_drone_tank_effect"),action(){return!!ii($(this)[0])&&(t.space.tank={count:0,on:0},!0)}},stanene_tp:{id:"tech-stanene_tp",title:F("tech_stanene"),desc:F("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:F("tech_stanene_effect"),action(){return!!ii($(this)[0])&&(t.resource.Stanene.display=!0,ms(F("tech_stanene_avail"),"info",!1,["progress"]),!0)},post(){$i(),os()}},graphene_tp:{id:"tech-graphene_tp",title:F("tech_graphene"),desc:F("tech_graphene"),category:"crafting",era:"solar",path:["truepath"],reqs:{titan:5},grant:["graphene",1],cost:{Knowledge:()=>64e4,Adamantite:()=>25e3},effect:F("tech_graphene_effect"),action(){return!!ii($(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:F("tech_virtual_reality"),desc:F("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:F("tech_virtual_reality_effect"),action(){return!!ii($(this)[0])},flair:()=>F("tech_virtual_reality_flair")},electrolysis:{id:"tech-electrolysis",title:F("tech_electrolysis"),desc:F("tech_electrolysis"),category:"power_generation",era:"solar",path:["truepath"],reqs:{titan:2,enceladus:1},grant:["titan",3],cost:{Knowledge:()=>465e3},effect:()=>F("tech_electrolysis_effect",[Vt().titan,t.resource.Water.name]),action(){return!!ii($(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:()=>F("tech_storehouse",[Vt().titan]),desc:()=>F("tech_storehouse",[Vt().titan]),category:"storage",era:"solar",path:["truepath"],reqs:{titan:4},grant:["titan",5],cost:{Knowledge:()=>5e5},effect:()=>F("tech_storehouse_effect",[Vt().titan]),action(){return!!ii($(this)[0])&&(t.space.storehouse={count:0},!0)}},adamantite_vault_tp:{id:"tech-adamantite_vault_tp",title:F("tech_adamantite_vault"),desc:F("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:F("tech_adamantite_vault_effect"),action(){return!!ii($(this)[0])}},titan_bank:{id:"tech-titan_bank",title:()=>F("tech_titan_bank",[Vt().titan]),desc:()=>F("tech_titan_bank",[Vt().titan]),category:"storage",era:"solar",path:["truepath"],reqs:{titan:5},grant:["titan",6],cost:{Knowledge:()=>6e5},effect:()=>F("tech_titan_bank_effect",[Vt().titan]),action(){return!!ii($(this)[0])&&(t.space.titan_bank={count:0},!0)}},hydrogen_plant:{id:"tech-hydrogen_plant",title:F("tech_hydrogen_plant"),desc:F("tech_hydrogen_plant"),category:"power_generation",era:"solar",path:["truepath"],reqs:{titan:4,stanene:1},grant:["titan_power",1],cost:{Knowledge:()=>55e4},effect:()=>F("tech_hydrogen_plant_effect"),action(){return!!ii($(this)[0])&&(t.space.hydrogen_plant={count:0,on:0},!0)}},water_mining:{id:"tech-water_mining",title:F("tech_water_mining"),desc:F("tech_water_mining"),category:"power_generation",era:"solar",path:["truepath"],reqs:{titan:2,enceladus:1},grant:["enceladus",2],cost:{Knowledge:()=>45e4},effect:()=>F("tech_water_mining_effect",[Vt().enceladus,Di[t.race.species].home,t.resource.Water.name]),action(){return!!ii($(this)[0])&&(t.space.water_freighter={count:0,on:0},!0)}},mercury_smelting:{id:"tech-mercury_smelting",title:F("tech_mercury_smelting"),desc:F("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:()=>F("tech_mercury_smelting_effect",[Vt().hell]),action(){return!!ii($(this)[0])&&(t.space.hell_smelter={count:0},!0)}},iridium_smelting:{id:"tech-iridium_smelting",title:F("tech_iridium_smelting"),desc:F("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:F("tech_iridium_smelting_effect"),action(){return!!ii($(this)[0])}},adamantite_crates:{id:"tech-adamantite_crates",title:F("tech_adamantite_crates"),desc:F("tech_adamantite_crates_desc"),category:"storage",era:"solar",path:["truepath"],reqs:{container:5,titan:4},grant:["container",6],cost:{Knowledge:()=>525e3,Adamantite:()=>12500},effect:F("tech_adamantite_crates_effect"),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},bolognium_crates_tp:{id:"tech-bolognium_crates_tp",title:()=>F("tech_crates",[t.resource.Bolognium.name]),desc:()=>F("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:()=>F("tech_bolognium_crates_effect",[t.resource.Bolognium.name]),action(){return!!ii($(this)[0])}},adamantite_containers_tp:{id:"tech-adamantite_containers_tp",title:()=>F("tech_containers",[t.resource.Adamantite.name]),desc:()=>F("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:()=>F("tech_adamantite_containers_effect",[t.resource.Adamantite.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},quantium_containers:{id:"tech-quantium_containers",title:()=>F("tech_containers",[t.resource.Quantium.name]),desc:()=>F("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:()=>F("tech_quantium_containers_effect",[t.resource.Quantium.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},unobtainium_containers:{id:"tech-unobtainium_containers",title:()=>F("tech_containers",[t.resource.Unobtainium.name]),desc:()=>F("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:()=>F("tech_bolognium_containers_effect",[t.resource.Unobtainium.name]),action(){return!!ii($(this)[0])}},reinforced_shelving:{id:"tech-reinforced_shelving",title:F("tech_reinforced_shelving"),desc:F("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:F("tech_reinforced_shelving_effect"),action(){return!!ii($(this)[0])}},garage_shelving:{id:"tech-garage_shelving",title:F("tech_garage_shelving"),desc:F("tech_garage_shelving"),category:"storage",era:"solar",path:["truepath"],reqs:{shelving:1,quantium:1},grant:["shelving",2],cost:{Knowledge:()=>125e4,Quantium:()=>75e3},effect:F("tech_garage_shelving_effect"),action(){return!!ii($(this)[0])}},warehouse_shelving:{id:"tech-warehouse_shelving",title:F("tech_warehouse_shelving"),desc:F("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:F("tech_warehouse_shelving_effect"),action(){return!!ii($(this)[0])}},elerium_extraction:{id:"tech-elerium_extraction",title:F("tech_elerium_extraction"),desc:F("tech_elerium_extraction"),category:"mining",era:"solar",path:["truepath"],reqs:{kuiper:1},grant:["kuiper",2],cost:{Knowledge:()=>25e5,Orichalcum:()=>1e5,Cipher:()=>12e3},effect:()=>F("tech_elerium_extraction_effect"),action(){return!!ii($(this)[0])&&(t.space.elerium_mine={count:0,on:0},!0)}},orichalcum_panels_tp:{id:"tech-orichalcum_panels_tp",title:F("tech_orichalcum_panels"),desc:F("tech_orichalcum_panels"),category:"power_generation",era:"solar",path:["truepath"],reqs:{kuiper:1,swarm:5},grant:["swarm",6],cost:{Knowledge:()=>24e5,Orichalcum:()=>125e3},effect:()=>F("tech_orichalcum_panels_effect"),action(){return!!ii($(this)[0])}},shipyard:{id:"tech-shipyard",title:()=>F("tech_shipyard",[Vt().dwarf]),desc:()=>F("tech_shipyard",[Vt().dwarf]),category:"space_militarization",era:"solar",path:["truepath"],reqs:{outer:1,syndicate:1},grant:["shipyard",1],cost:{Knowledge:()=>42e4},effect:()=>F("tech_shipyard_effect",[Vt().dwarf]),action(){return!!ii($(this)[0])&&(t.space.shipyard={count:0,on:0,ships:[],expand:!0,sort:!0},ut(),!0)}},ship_lasers:{id:"tech-ship_lasers",title:F("tech_ship_lasers"),desc:F("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:F("tech_ship_lasers_effect"),action(){return!!ii($(this)[0])}},pulse_lasers:{id:"tech-pulse_lasers",title:F("tech_pulse_lasers"),desc:F("tech_pulse_lasers"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_weapon:2},grant:["syard_weapon",3],cost:{Knowledge:()=>5e5,Elerium:()=>750},effect:F("tech_pulse_lasers_effect"),action(){return!!ii($(this)[0])}},ship_plasma:{id:"tech-ship_plasma",title:F("tech_ship_plasma"),desc:F("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:F("tech_ship_plasma_effect"),action(){return!!ii($(this)[0])}},ship_phaser:{id:"tech-ship_phaser",title:F("tech_ship_phaser"),desc:F("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:F("tech_ship_phaser_effect"),action(){return!!ii($(this)[0])}},ship_disruptor:{id:"tech-ship_disruptor",title:F("tech_ship_disruptor"),desc:F("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:F("tech_ship_disruptor_effect"),action(){return!!ii($(this)[0])}},destroyer_ship:{id:"tech-destroyer_ship",title:F("tech_destroyer_ship"),desc:F("tech_destroyer_ship"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_class:2},grant:["syard_class",3],cost:{Knowledge:()=>465e3},effect:F("tech_destroyer_ship_effect"),action(){return!!ii($(this)[0])}},cruiser_ship_tp:{id:"tech-cruiser_ship_tp",title:F("tech_cruiser_ship"),desc:F("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:F("tech_cruiser_ship_tp"),action(){return!!ii($(this)[0])}},h_cruiser_ship:{id:"tech-h_cruiser_ship",title:F("tech_h_cruiser_ship"),desc:F("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:F("tech_h_cruiser_ship_effect"),action(){return!!ii($(this)[0])}},dreadnought_ship:{id:"tech-dreadnought_ship",title:F("tech_dreadnought_ship"),desc:F("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:F("tech_dreadnought_ship_effect"),action(){return!!ii($(this)[0])}},pulse_engine:{id:"tech-pulse_engine",title:F("outer_shipyard_engine_pulse"),desc:F("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:F("tech_pulse_engine_effect"),action(){return!!ii($(this)[0])}},photon_engine:{id:"tech-photon_engine",title:F("outer_shipyard_engine_photon"),desc:F("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:F("tech_photon_engine_effect"),action(){return!!ii($(this)[0])}},vacuum_drive:{id:"tech-vacuum_drive",title:F("outer_shipyard_engine_vacuum"),desc:F("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:F("outer_shipyard_engine_vacuum_desc"),action(){return!!ii($(this)[0])}},ship_fusion:{id:"tech-ship_fusion",title:F("tech_fusion_generator"),desc:F("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:F("tech_fusion_generator_effect"),action(){return!!ii($(this)[0])}},ship_elerium:{id:"tech-ship_elerium",title:F("tech_elerium_generator"),desc:F("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:F("tech_elerium_generator_effect"),action(){return!!ii($(this)[0])}},quantum_signatures:{id:"tech-quantum_signatures",title:F("tech_quantum_signatures"),desc:F("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:F("tech_quantum_signatures_effect"),action(){return!!ii($(this)[0])}},interstellar_drive:{id:"tech-interstellar_drive",title:F("tech_interstellar_drive"),desc:F("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:F("tech_interstellar_drive_effect"),action(){return!!ii($(this)[0])}},alien_outpost:{id:"tech-alien_outpost",title:F("tech_alien_outpost"),desc:F("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:F("tech_alien_outpost_effect"),action(){return!!ii($(this)[0])&&(t.tauceti.alien_outpost={count:1,on:0},t.tauceti.jump_gate={count:0},t.space.jump_gate={count:0},ms(F("tech_alien_outpost_msg"),"info",!1,["progress"]),!0)}},jumpgates:{id:"tech-jumpgates",title:F("tech_jumpgates"),desc:F("tech_jumpgates"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tauceti:2,tau_home:4},grant:["tauceti",3],cost:{Knowledge:()=>6e6},effect:F("tech_jumpgates_effect"),action(){return!!ii($(this)[0])}},system_survey:{id:"tech-system_survey",title:F("tech_system_survey"),desc:F("tech_system_survey"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tauceti:4,womling_tech:1},grant:["tauceti",5],cost:{Knowledge:()=>7e6},effect:F("tech_system_survey_effect"),action(){return!!ii($(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:F("tech_repository"),desc:F("tech_repository"),category:"storage",era:"tauceti",path:["truepath"],reqs:{tauceti:4,tau_home:4},grant:["tau_home",5],cost:{Knowledge:()=>65e5},effect:F("tech_repository_effect"),action(){return!!ii($(this)[0])&&(t.tauceti.repository={count:0},!0)}},fusion_generator:{id:"tech-fusion_generator",title:F("tech_fusion_power"),desc:F("tech_fusion_power"),category:"power_generation",era:"tauceti",path:["truepath"],reqs:{tau_home:5},grant:["tau_home",6],cost:{Knowledge:()=>675e4},effect:F("tech_tau_fusion_power_effect"),action(){return!!ii($(this)[0])&&(t.tauceti.fusion_generator={count:0,on:0},!0)}},tau_cultivation:{id:"tech-tau_cultivation",title:F("tech_tau_cultivation"),desc:F("tech_tau_cultivation"),category:"agriculture",era:"tauceti",path:["truepath"],reqs:{tau_home:6},grant:["tau_home",7],cost:{Knowledge:()=>69e5},effect:()=>F("tech_tau_cultivation_effect",[Di[t.race.species].home]),action(){return!!ii($(this)[0])&&(t.tauceti.tau_farm={count:0,on:0},!0)}},tau_manufacturing:{id:"tech-tau_manufacturing",title:F("tech_tau_manufacturing"),desc:F("tech_tau_manufacturing"),category:"crafting",era:"tauceti",path:["truepath"],reqs:{tau_home:7},grant:["tau_home",8],cost:{Knowledge:()=>725e4},effect:()=>F("tech_tau_manufacturing_effect",[Di[t.race.species].home]),action(){return!!ii($(this)[0])&&(t.tauceti.tau_factory={count:0,on:0},!0)}},weasels:{id:"tech-weasels",title:F("tech_weasels"),desc:F("tech_weasels"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:2},grant:["tau_red",3],cost:{Knowledge:()=>625e4},effect:()=>F("tech_weasels_effect",[F("tau_planet",[Vt().red])]),action(){return!!ii($(this)[0])&&(ms(F("tech_weasels_msg",[F("tau_planet",[Vt().red])]),"info",!1,["progress"]),!0)}},jeff:{id:"tech-jeff",title:F("tech_jeff"),desc:F("tech_jeff"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:3},grant:["tau_red",4],cost:{Knowledge:()=>638e4},effect:()=>F("tech_jeff_effect"),action(){return!!ii($(this)[0])&&(ms(F("tech_jeff_effect_msg",[]),"info",!1,["progress"]),!0)}},womling_fun:{id:"tech-womling_fun",title:F("tech_womling_fun"),desc:F("tech_womling_fun"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:5},grant:["tau_red",6],cost:{Knowledge:()=>665e4},effect:()=>F("tech_womling_fun_effect"),action(){return!!ii($(this)[0])}},womling_lab:{id:"tech-womling_lab",title:F("tech_womling_lab"),desc:F("tech_womling_lab"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:6},grant:["tau_red",7],cost:{Knowledge:()=>69e5},effect:()=>F("tech_womling_lab_effect"),action(){return!!ii($(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:F("tech_womling_mining"),desc:F("tech_womling_mining"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:1},grant:["womling_mining",1],cost:{Knowledge:()=>71e5},effect:()=>F("tech_womling_mining_effect"),action(){return!!ii($(this)[0])}},womling_firstaid:{id:"tech-womling_firstaid",title:F("tech_womling_firstaid"),desc:F("tech_womling_firstaid"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:2},grant:["womling_firstaid",1],cost:{Knowledge:()=>735e4},effect:()=>F("tech_womling_firstaid_effect"),action(){return!!ii($(this)[0])}},womling_logistics:{id:"tech-womling_logistics",title:F("tech_womling_logistics"),desc:F("tech_womling_logistics"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:3},grant:["womling_logistics",1],cost:{Knowledge:()=>765e4},effect:()=>F("tech_womling_logistics_effect",[F("tau_red_orbital_platform")]),action(){return!!ii($(this)[0])}},womling_repulser:{id:"tech-womling_repulser",title:F("tech_womling_repulser"),desc:F("tech_womling_repulser"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:4,womling_logistics:1},grant:["womling_logistics",2],cost:{Knowledge:()=>79e5},effect:()=>F("tech_womling_repulser_effect",[t.resource.Oil.name,F("tau_red_orbital_platform")]),action(){return!!ii($(this)[0])}},womling_farming:{id:"tech-womling_farming",title:F("tech_womling_farming"),desc:F("tech_womling_farming"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:5},grant:["womling_pop",1],cost:{Knowledge:()=>82e5},effect:()=>F("tech_womling_farming_effect"),action(){return!!ii($(this)[0])}},womling_housing:{id:"tech-womling_housing",title:F("tech_womling_housing"),desc:F("tech_womling_housing"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:6,womling_pop:1},grant:["womling_pop",2],cost:{Knowledge:()=>85e5},effect:()=>F("tech_womling_housing_effect"),action(){return!!ii($(this)[0])}},womling_support:{id:"tech-womling_support",title:F("tech_womling_support"),desc:F("tech_womling_support"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:7,tau_gas:4},grant:["womling_technicians",1],cost:{Knowledge:()=>885e4},effect:()=>`
                ${F("tech_womling_support_effect")}
                `,action(){return!!ii($(this)[0])&&(t.tauceti.womling_station={count:0,on:0},!0)}},womling_recycling:{id:"tech-womling_recycling",title:F("tech_womling_recycling"),desc:F("tech_womling_recycling"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:8},grant:["womling_recycling",1],cost:{Knowledge:()=>955e4},effect:()=>`
                ${F("tech_womling_recycling_effect")}
                `,action(){return!!ii($(this)[0])}},asteroid_analysis:{id:"tech-asteroid_analysis",title:F("tech_asteroid_analysis"),desc:F("tech_asteroid_analysis"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tau_roid:1},grant:["tau_roid",2],cost:{Knowledge:()=>735e4},effect:()=>F("tech_asteroid_analysis_effect"),action(){return!!ii($(this)[0])&&(ms(F("tech_asteroid_analysis_msg"),"info",!1,["progress"]),!0)}},shark_repellent:{id:"tech-shark_repellent",title:F("tech_shark_repellent"),desc:F("tech_shark_repellent"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tau_roid:2},grant:["tau_roid",3],cost:{Knowledge:()=>74e5},effect:()=>F("tech_shark_repellent_effect"),action(){return!!ii($(this)[0])&&(ms(F("tech_shark_repellent_msg"),"info",!1,["progress"]),!0)}},belt_mining:{id:"tech-belt_mining",title:F("tech_belt_mining"),desc:F("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:()=>F("tech_belt_mining_effect"),action(){return!!ii($(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:F("tech_adv_belt_mining"),desc:F("tech_adv_belt_mining"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{tau_roid:4},grant:["tau_roid",5],cost:{Knowledge:()=>79e5},effect:()=>F("tech_adv_belt_mining_effect"),action(){return!!ii($(this)[0])}},space_whaling:{id:"tech-space_whaling",title:F("tech_space_whaling"),desc:F("tech_space_whaling"),category:"whaling",era:"tauceti",path:["truepath"],reqs:{tau_gas:3,tau_roid:3},grant:["tau_whale",1],cost:{Knowledge:()=>75e5},effect:()=>F("tech_space_whaling_effect"),action(){return!!ii($(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:()=>F(t.race.artifical?"tech_infectious_disease_lab_s":"tech_infectious_disease_lab"),desc:()=>F(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:()=>F(t.race.artifical?"tech_infectious_disease_lab_effect_s":"tech_infectious_disease_lab_effect"),action(){return!!ii($(this)[0])&&(t.tauceti.infectious_disease_lab={count:0,on:0,cure:0},!0)}},isolation_protocol:{id:"tech-isolation_protocol",title:F("tech_isolation_protocol"),desc:F("tech_isolation_protocol"),category:"plague",era:"tauceti",path:["truepath"],reqs:{disease:2},grant:["disease",3],not_trait:["lone_survivor"],cost:{Knowledge:()=>85e5},effect:()=>`
                ${F("tech_isolation_protocol_effect",[F("tab_tauceti")])}
                ${F("tech_isolation_protocol_warning")}
                `,action(){return!!ii($(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),ct(),Cs($("#shipList")),Object.keys(Sr.city).forEach((function(a){t.city.hasOwnProperty(a)&&t.city[a].hasOwnProperty("count")&&(t.race.hooved&&Sr.city[a].cost.hasOwnProperty("Horseshoe")&&(t.race.shoecnt-=Sr.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(Sr.space[a]).forEach((function(r){t.space.hasOwnProperty(r)&&t.space[r].hasOwnProperty("count")&&(t.race.hooved&&Sr.space[a][r].cost.hasOwnProperty("Horseshoe")&&(t.race.shoecnt-=Sr.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&&qi.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(Yt).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=n.colony*He.tau_home.colony.citizens();t.resource[t.race.species].amount>a&&(t.resource[t.race.species].amount=a),B("spy"),B("spyop"),Cs($("#infoTimer")),t.race.inactive=e}(),!0)}},focus_cure:{id:"tech-focus_cure",title:F("tech_focus_cure"),desc:F("tech_focus_cure"),category:"plague",era:"tauceti",path:["truepath"],reqs:{disease:2},grant:["disease",3],not_trait:["lone_survivor"],cost:{Knowledge:()=>85e5},effect:()=>`
                ${F("tech_focus_cure_effect",[F("tab_tauceti")])}
                ${F("tech_focus_cure_warning")}
                `,action(){return!!ii($(this)[0])&&(t.tech.focus_cure=1,!0)}},decode_virus:{id:"tech-decode_virus",title:F("tech_decode_virus"),desc:F("tech_decode_virus"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:1},grant:["focus_cure",2],cost:{Knowledge:()=>9e6},effect:()=>`
                ${F(t.race.artifical?"tech_decode_virus_effect_s":"tech_decode_virus_effect")}
                `,action(){return!!ii($(this)[0])&&(t.race.artifical?ms(F("tech_decode_virus_msg1s",[Sr.tauceti.tau_home.infectious_disease_lab.title()]),"info",!1,["progress"]):ms(F("tech_decode_virus_msg1",[Sr.tauceti.tau_home.infectious_disease_lab.title()]),"info",!1,["progress"]),!0)}},vaccine_campaign:{id:"tech-vaccine_campaign",title:F("tech_vaccine_campaign"),desc:F("tech_vaccine_campaign"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:3},grant:["focus_cure",4],cost:{Knowledge:()=>925e4},effect:()=>`
                ${F("tech_vaccine_campaign_effect",[t.race.artifical?Sr.city.boot_camp.title():Sr.city.hospital.title])}
                `,action(){return!!ii($(this)[0])&&(t.race.vax=0,!0)}},vax_strat1:{id:"tech-vax_strat1",title:F("tech_vax_strat1"),desc:F("tech_vax_strat1"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge:()=>95e5},effect:()=>`
                ${F("tech_vax_strat1_effect")}
                ${F("tech_vax_warning")}
                `,action(){return!!ii($(this)[0])&&(t.tech.vax_p=1,ms(F("tech_vax_strat1_msg"),"info",!1,["progress"]),!0)}},vax_strat2:{id:"tech-vax_strat2",title:F("tech_vax_strat2"),desc:F("tech_vax_strat2"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge:()=>95e5},effect:()=>`
                ${F("tech_vax_strat2_effect")}
                ${F("tech_vax_warning")}
                `,action(){return!!ii($(this)[0])&&(t.tech.vax_f=1,ms(F("tech_vax_strat2_msg"),"info",!1,["progress"]),!0)}},vax_strat3:{id:"tech-vax_strat3",title:F("tech_vax_strat3"),desc:F("tech_vax_strat3"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge:()=>95e5},effect:()=>`
                ${F("tech_vax_strat3_effect")}
                ${F("tech_vax_warning")}
                `,action(){return!!ii($(this)[0])&&(t.tech.vax_s=1,ms(F("tech_vax_strat3_msg"),"info",!1,["progress"]),!0)}},vax_strat4:{id:"tech-vax_strat4",title:F("tech_vax_strat4"),desc:F("tech_vax_strat4"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge:()=>95e5},effect:()=>`
                ${F("tech_vax_strat4_effect")}
                ${F("tech_vax_warning")}
                `,action(){return!!ii($(this)[0])&&(t.tech.vax_c=1,ms(F("tech_vax_strat4_msg"),"info",!1,["progress"]),!0)}},cloning:{id:"tech-cloning",title:F("tech_cloning"),desc:F("tech_cloning"),category:"housing",era:"tauceti",path:["truepath"],reqs:{focus_cure:7},grant:["cloning",1],cost:{Knowledge:()=>975e4},effect:()=>`
                ${F(t.race.artifical?"tech_cloning_effect_s":"tech_cloning_effect")}
                `,action(){return!!ii($(this)[0])&&(t.tauceti.cloning_facility={count:0,on:0},!0)}},clone_degradation:{id:"tech-clone_degradation",title:F("tech_clone_degradation"),desc:F("tech_clone_degradation"),category:"progress",era:"tauceti",path:["truepath"],reqs:{cloning:1},grant:["cloning",2],cost:{Knowledge:()=>1e7},effect:()=>`
                ${F("tech_clone_degradation_effect")}
                `,action(){return!!ii($(this)[0])&&(ms(F("tech_clone_degradation_msg"),"info",!1,["progress"]),!0)}},digital_paradise:{id:"tech-digital_paradise",title:F("tech_digital_paradise"),desc:F("tech_digital_paradise"),category:"progress",era:"tauceti",path:["truepath"],reqs:{cloning:2},grant:["matrix",1],cost:{Knowledge:()=>105e5,Cipher:()=>2e5},effect:()=>`
                ${F("tech_digital_paradise_effect")}
                `,action(){return!!ii($(this)[0])}},ringworld:{id:"tech-ringworld",title:F("tech_ringworld"),desc:F("tech_ringworld"),category:"progress",era:"tauceti",path:["truepath"],reqs:{matrix:1},grant:["matrix",2],cost:{Money:()=>3e9,Knowledge:()=>11e6},effect:()=>`
                ${F("tech_ringworld_effect")}
                `,action(){return!!ii($(this)[0])&&(t.settings.tau.star=!0,t.tauceti.ringworld={count:0},!0)}},iso_gambling:{id:"tech-iso_gambling",title:F("tech_iso_gambling"),desc:F("tech_iso_gambling"),category:"banking",era:"tauceti",reqs:{gambling:4,isolation:1},grant:["iso_gambling",1],cost:{Knowledge:()=>865e4},effect:F("tech_iso_gambling_effect",[5]),action(){return!!ii($(this)[0])}},outpost_boost:{id:"tech-outpost_boost",title:()=>F("tech_outpost_boost"),desc:()=>F("tech_outpost_boost"),category:"special",era:"tauceti",path:["truepath"],reqs:{tau_home:4,isolation:1},grant:["outpost_boost",1],cost:{Knowledge:()=>89e5},effect:()=>F("tech_outpost_boost_effect"),action(){return!!ii($(this)[0])},flair:()=>F("tech_outpost_boost_flair")},cultural_center:{id:"tech-cultural_center",title:F("tech_cultural_center"),desc:F("tech_cultural_center"),category:"banking",era:"tauceti",path:["truepath"],reqs:{iso_gambling:1,isolation:1},grant:["tau_culture",1],cost:{Knowledge:()=>885e4},effect:F("tech_cultural_center_effect"),action(){return!!ii($(this)[0])&&(t.tauceti.tau_cultural_center={count:0,on:0},!0)},flair:()=>F("tech_cultural_center_flair")},outer_tau_survey:{id:"tech-outer_tau_survey",title:F("tech_outer_tau_survey"),desc:F("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:()=>+Ut(5e6).toFixed(0)},effect:F("tech_outer_tau_survey_effect"),action(){return!!ii($(this)[0])&&(t.settings.tau.gas2=!0,!0)}},alien_research:{id:"tech-alien_research",title:F("tech_alien_research"),desc:F("tech_alien_research"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tau_gas2:5},grant:["tau_gas2",6],cost:{Knowledge:()=>935e4},effect:F("tech_alien_research_effect"),action(){return!!ii($(this)[0])&&(t.tauceti.alien_space_station.decrypted=0,t.tauceti.alien_space_station.focus=95,ms(F("tech_alien_research_msg"),"info",!1,["progress"]),!0)}},womling_gene_therapy:{id:"tech-womling_gene_therapy",title:F("tech_womling_gene_therapy"),desc:F("tech_womling_gene_therapy"),category:"womling",era:"tauceti",path:["truepath"],reqs:{alien_data:1},grant:["womling_gene",1],cost:{Knowledge:()=>952e4},effect:F("tech_womling_gene_therapy_effect"),action(){return!!ii($(this)[0])}},food_culture:{id:"tech-food_culture",title:()=>F("tech_food_culture",[F(`tau_gas2_alien_station_data2_r${t.race.tau_food_item||0}`)]),desc:()=>F("tech_food_culture",[F(`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:()=>F("tech_food_culture_effect",[F(`tau_gas2_alien_station_data2_r${t.race.tau_food_item||0}`),F("tech_cultural_center")]),action(){return!!ii($(this)[0])}},advanced_refinery:{id:"tech-advanced_refinery",title:F("tech_advanced_refinery"),desc:F("tech_advanced_refinery"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{alien_data:3},grant:["tau_ore_mining",1],cost:{Knowledge:()=>968e4},effect:()=>F("tech_advanced_refinery_effect"),action(){return!!ii($(this)[0])}},advanced_pit_mining:{id:"tech-advanced_pit_mining",title:F("tech_advanced_pit_mining"),desc:F("tech_advanced_pit_mining"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{alien_data:3},grant:["tau_pit_mining",1],cost:{Knowledge:()=>972e4},effect:()=>F("tech_advanced_pit_mining_effect"),action(){return!!ii($(this)[0])}},useless_junk:{id:"tech-useless_junk",title:F("tech_useless_junk"),desc:F("tech_useless_junk"),category:"womling",era:"tauceti",path:["truepath"],reqs:{alien_data:4},grant:["tau_junksale",1],cost:{Knowledge:()=>955e4},effect:()=>F("tech_useless_junk_effect",[F(`tau_gas2_alien_station_data4_r${t.race.tau_junk_item||0}`),F("tau_red_womlings")]),action(){return!!ii($(this)[0])}},advanced_asteroid_mining:{id:"tech-advanced_asteroid_mining",title:F("tech_advanced_asteroid_mining"),desc:F("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:()=>F("tech_advanced_asteroid_mining_effect",[F("tau_roid_mining_ship")]),action(){return!!ii($(this)[0])}},advanced_material_synthesis:{id:"tech-advanced_material_synthesis",title:F("tech_advanced_material_synthesis"),desc:F("tech_advanced_material_synthesis"),category:"crafting",era:"tauceti",path:["truepath"],reqs:{alien_data:5,disease:1},grant:["alien_crafting",1],cost:{Knowledge:()=>988e4},effect:()=>F("tech_advanced_material_synthesis_effect",[t.resource.Quantium.name]),action(){return!!ii($(this)[0])}},matrioshka_brain:{id:"tech-matrioshka_brain",title:F("tech_matrioshka_brain"),desc:F("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:()=>F("tech_matrioshka_brain_effect",[Sr.tauceti.tau_gas2.info.name()]),action(){return!!ii($(this)[0])&&(t.tauceti.matrioshka_brain={count:0},!0)}},ignition_device:{id:"tech-ignition_device",title:F("tech_ignition_device"),desc:F("tech_ignition_device"),category:"progress",era:"tauceti",path:["truepath"],reqs:{alien_data:6,tau_gas2:7},grant:["tau_gas2",8],cost:{Knowledge:()=>105e5},effect:()=>F("tech_ignition_device_effect",[Sr.tauceti.tau_gas2.info.name()]),action(){return!!ii($(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?F("tech_antireplicator"):F("tech_replicator"),desc:()=>"antimatter"===t.race.universe?F("tech_antireplicator"):F("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?F("tech_antireplicator_effect"):F("tech_replicator_effect"),action(){return!!ii($(this)[0])&&(t.race.replicator={res:"Unobtainium",pow:1},!0)}},womling_unlock:{id:"tech-womling_unlock",title:F("tech_womling_unlock"),desc:F("tech_womling_unlock"),category:"womling",era:"tauceti",path:["truepath"],reqs:{replicator:1},trait:["lone_survivor"],grant:["tau_red",4],cost:{Knowledge:()=>65e5},effect:()=>F("tech_womling_unlock_effect",[F("tau_planet",[Vt().red])]),action(){return!!ii($(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:F("tech_garden_of_eden"),desc:F("tech_garden_of_eden"),category:"special",era:"tauceti",path:["truepath"],reqs:{eden:1},grant:["eden",2],cost:{Knowledge:()=>1e7},effect:()=>F("tech_garden_of_eden_effect"),action(){return!!ii($(this)[0])&&(t.tauceti.goe_facility={count:0},!0)}}};function Pr(){t.tech.world_control=1,Cs($("#garrison")),Cs($("#c_garrison")),me($("#garrison"),!0),me($("#c_garrison"),!1);for(let e=0;e<3;e++){if(t.civic.foreign[`gov${e}`].occ){let a=aa("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 jr(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 i=(t.stats.hasOwnProperty("reset")?t.stats.reset:0)%r.length;return e?F(`cheese_${r[i]}`):F("tech_swiss_bank",[F(`cheese_${r[i]}`)])}const Or={standard:["primitive","discovery","civilized","industrialized","globalized","early_space","deep_space","interstellar","intergalactic","dimensional"],truepath:["primitive","discovery","civilized","industrialized","globalized","early_space","deep_space","solar","tauceti"]};function Mr(e){if(e){let t={};return Object.keys(qr).forEach((function(a){(Or[e].includes(qr[a].era)||qr[a].hasOwnProperty("path"))&&(!qr[a].hasOwnProperty("path")||qr[a].hasOwnProperty("path")&&qr[a].path.includes(e))&&(t[a]=qr[a])})),t}return qr}const Sr={evolution:{rna:{id:"evolution-rna",title:F("resource_RNA_name"),desc:()=>F("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:F("evo_dna_title"),desc:F("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:F("evo_membrane_title"),desc:F("evo_membrane_desc"),condition:()=>t.evolution.hasOwnProperty("membrane")&&!t.race.evoFinalMenu,cost:{RNA:e=>Br("membrane",2,2,e)},effect:()=>F("evo_membrane_effect",[t.evolution.mitochondria?5*t.evolution.mitochondria.count+5:5]),action(){return!!ii($(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:F("evo_organelles_title"),desc:F("evo_organelles_desc"),condition:()=>t.evolution.hasOwnProperty("organelles")&&!t.race.evoFinalMenu,cost:{RNA:e=>Br("organelles",12,8,e),DNA:e=>Br("organelles",4,4,e)},effect(){let e=t.race.rapid_mutation?2:1;return t.evolution.sexual_reproduction&&t.evolution.sexual_reproduction.count>0&&e++,F("evo_organelles_effect",[e])},action(){return!!ii($(this)[0])&&(t.evolution.organelles.count++,!0)}},nucleus:{id:"evolution-nucleus",title:F("evo_nucleus_title"),desc:F("evo_nucleus_desc"),condition:()=>t.evolution.hasOwnProperty("nucleus")&&!t.race.evoFinalMenu,cost:{RNA:e=>Br("nucleus",38,t.tech.evo&&t.tech.evo>=4?16:32,e),DNA:e=>Br("nucleus",18,t.tech.evo&&t.tech.evo>=4?12:16,e)},effect:()=>F("evo_nucleus_effect",[t.evolution.bilateral_symmetry&&t.evolution.bilateral_symmetry.count>0||t.evolution.poikilohydric&&t.evolution.poikilohydric.count>0||t.evolution.spores&&t.evolution.spores.count>0?2:1]),action(){return!!ii($(this)[0])&&(t.evolution.nucleus.count++,!0)}},eukaryotic_cell:{id:"evolution-eukaryotic_cell",title:F("evo_eukaryotic_title"),desc:F("evo_eukaryotic_desc"),condition:()=>t.evolution.hasOwnProperty("eukaryotic_cell")&&!t.race.evoFinalMenu,cost:{RNA:e=>Br("eukaryotic_cell",20,20,e),DNA:e=>Br("eukaryotic_cell",40,12,e)},effect:()=>F("evo_eukaryotic_effect",[t.evolution.mitochondria?10*t.evolution.mitochondria.count+10:10]),action(){return!!ii($(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:F("evo_mitochondria_title"),desc:F("evo_mitochondria_desc"),condition:()=>t.evolution.hasOwnProperty("mitochondria")&&!t.race.evoFinalMenu,cost:{RNA:e=>Br("mitochondria",75,50,e),DNA:e=>Br("mitochondria",65,35,e)},effect:F("evo_mitochondria_effect"),action(){return!!ii($(this)[0])&&(t.evolution.mitochondria.count++,!0)}},sexual_reproduction:{id:"evolution-sexual_reproduction",title:F("evo_sexual_reproduction_title"),desc:F("evo_sexual_reproduction_desc"),reqs:{evo:1},grant:["evo",2],condition:()=>t.tech.evo&&1===t.tech.evo,cost:{DNA:()=>150},effect:F("evo_sexual_reproduction_effect"),action(){return!!ii($(this)[0])&&(t.evolution.final=20,!0)},queue_complete:()=>t.tech.evo&&1===t.tech.evo?1:0},phagocytosis:{id:"evolution-phagocytosis",title:F("evo_phagocytosis_title"),desc:F("evo_phagocytosis_desc"),reqs:{evo:2},grant:["evo",3],condition:()=>t.tech.evo&&2===t.tech.evo,cost:{DNA:()=>175},effect:F("evo_phagocytosis_effect"),action(){return!!ii($(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?F("genelab_genus_plant"):F("evo_chloroplasts_title"),desc:F("evo_chloroplasts_desc"),reqs:{evo:2},grant:["evo",3],condition:()=>Fr(2),cost:{DNA:()=>175},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                ${F("evo_chloroplasts_effect")}
                ${F("evo_warn_unwise")}
                `:F("evo_chloroplasts_effect"),action(){return!!ii($(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:()=>Ys("genus_plant")},chitin:{id:"evolution-chitin",title:()=>t.evolution.gselect?F("genelab_genus_fungi"):F("evo_chitin_title"),desc:F("evo_chitin_desc"),reqs:{evo:2},grant:["evo",3],condition:()=>Fr(2),cost:{DNA:()=>175},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                ${F("evo_chitin_effect")}
                ${F("evo_warn_unwise")}
                `:F("evo_chitin_effect"),action(){return!!ii($(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:()=>Ys("genus_fungi")},exterminate:{id:"evolution-exterminate",title:()=>t.evolution.gselect?F("genelab_genus_synthetic"):F("evo_exterminate_title"),desc:F("evo_exterminate_desc"),reqs:{evo:2},grant:["evo",7],condition:()=>Fr(2)&&t.stats.achieve.obsolete&&t.stats.achieve.obsolete.l>=5,cost:{DNA:()=>200},effect:()=>F("evo_exterminate_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_synthetic=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&2===t.tech.evo?1:0,emblem:()=>Ys("genus_synthetic")},multicellular:{id:"evolution-multicellular",title:F("evo_multicellular_title"),desc:F("evo_multicellular_desc"),reqs:{evo:3},grant:["evo",4],condition:()=>t.tech.evo&&3===t.tech.evo,cost:{DNA:()=>200},effect:F("evo_multicellular_effect"),action(){return!!ii($(this)[0])&&(t.evolution.final=60,!0)},queue_complete:()=>t.tech.evo&&3===t.tech.evo?1:0},spores:{id:"evolution-spores",title:F("evo_spores_title"),desc:F("evo_spores_desc"),reqs:{evo:4,evo_fungi:1},grant:["evo",5],condition:()=>t.tech.evo&&4===t.tech.evo,cost:{DNA:()=>230},effect:F("evo_nucleus_boost"),action(){return!!ii($(this)[0])&&(t.evolution.final=80,!0)},queue_complete:()=>t.tech.evo&&4===t.tech.evo?1:0},poikilohydric:{id:"evolution-poikilohydric",title:F("evo_poikilohydric_title"),desc:F("evo_poikilohydric_desc"),reqs:{evo:4,evo_plant:1},grant:["evo",5],condition:()=>t.tech.evo&&4===t.tech.evo,cost:{DNA:()=>230},effect:F("evo_nucleus_boost"),action(){return!!ii($(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:F("evo_bilateral_symmetry_title"),desc:F("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:F("evo_nucleus_boost"),action(){return!!ii($(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:F("evo_bryophyte_title"),desc:F("evo_bryophyte_desc"),reqs:{evo:5},grant:["evo",7],condition:()=>!(!t.tech.evo_plant&&!t.tech.evo_fungi)&&Fr(5),cost:{DNA:()=>260},effect:F("evo_bryophyte_effect"),action(){return!!ii($(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:F("evo_athropods_title"),desc:F("evo_athropods_desc"),reqs:{evo:5,evo_insectoid:1},grant:["evo",7],condition:()=>Fr(5),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                ${F("evo_athropods_effect")}
                ${F("evo_warn_unwise")}
                `:F("evo_athropods_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_insectoid=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Ys("genus_insectoid")},mammals:{id:"evolution-mammals",title:F("evo_mammals_title"),desc:F("evo_mammals_desc"),reqs:{evo:5,evo_mammals:1},grant:["evo",6],condition:()=>t.tech.evo&&5===t.tech.evo,cost:{DNA:()=>245},effect:F("evo_mammals_effect"),action(){return!!ii($(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:F("evo_humanoid_title"),desc:F("evo_humanoid_desc"),reqs:{evo:6,evo_humanoid:1},grant:["evo",7],condition:()=>Fr(6),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                ${F("evo_humanoid_effect")}
                ${F("evo_warn_unwise")}
                `:F("evo_humanoid_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_humanoid=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Ys("genus_humanoid")},gigantism:{id:"evolution-gigantism",title:F("evo_gigantism_title"),desc:F("evo_gigantism_desc"),reqs:{evo:6,evo_giant:1},grant:["evo",7],condition:()=>Fr(6),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                ${F("evo_gigantism_effect")}
                ${F("evo_warn_unwise")}
                `:F("evo_gigantism_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_giant=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Ys("genus_giant")},dwarfism:{id:"evolution-dwarfism",title:F("evo_dwarfism_title"),desc:F("evo_dwarfism_desc"),reqs:{evo:6,evo_small:1},grant:["evo",7],condition:()=>Fr(6),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                ${F("evo_dwarfism_effect")}
                ${F("evo_warn_unwise")}
                `:F("evo_dwarfism_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_small=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Ys("genus_small")},animalism:{id:"evolution-animalism",title:F("evo_animalism_title"),desc:F("evo_animalism_desc"),reqs:{evo:6,evo_animalism:1},grant:["evo",7],condition:()=>Fr(6)&&t.tech.evo_animalism&&1===t.tech.evo_animalism,cost:{DNA:()=>250},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                ${F("evo_animalism_effect")}
                ${F("evo_warn_unwise")}
                `:F("evo_animalism_effect"),action(){return!!ii($(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:F("evo_carnivore_title"),desc:F("evo_carnivore_desc"),reqs:{evo_animalism:2},grant:["evo_animalism",3],condition:()=>Fr(7)&&t.tech.evo_animalism&&2===t.tech.evo_animalism,cost:{DNA:()=>255},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                ${F("evo_carnivore_effect")}
                ${F("evo_warn_unwise")}
                `:F("evo_carnivore_effect"),action(){return!!ii($(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:()=>Ys("genus_carnivore")},herbivore:{id:"evolution-herbivore",title:F("evo_herbivore_title"),desc:F("evo_herbivore_desc"),reqs:{evo_animalism:2},grant:["evo_animalism",3],condition:()=>Fr(7)&&t.tech.evo_animalism&&2===t.tech.evo_animalism,cost:{DNA:()=>255},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                ${F("evo_herbivore_effect")}
                ${F("evo_warn_unwise")}
                `:F("evo_herbivore_effect"),action(){return!!ii($(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:()=>Ys("genus_herbivore")},omnivore:{id:"evolution-omnivore",title:F("evo_omnivore_title"),desc:F("evo_omnivore_desc"),reqs:{evo_animalism:2,locked:1},grant:["evo_animalism",3],condition:()=>Fr(7)&&t.tech.evo_animalism&&2===t.tech.evo_animalism,cost:{DNA:()=>255},wiki:!1,effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                ${F("evo_omnivore_effect")}
                ${F("evo_warn_unwise")}
                `:F("evo_omnivore_effect"),action(){return!!ii($(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:()=>Ys("genus_omnivore")},celestial:{id:"evolution-celestial",title:F("evo_celestial_title"),desc:F("evo_celestial_desc"),reqs:{evo:6,evo_angelic:1},grant:["evo",7],condition:()=>!!("eden"===t.city.biome||t.blood.unbound&&t.blood.unbound>=3)&&Fr(6),cost:{DNA:()=>260},effect:()=>F("evo_celestial_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_angelic=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Ys("genus_angelic")},demonic:{id:"evolution-demonic",title:F("evo_demonic_title"),desc:F("evo_demonic_desc"),reqs:{evo:6,evo_demonic:1},grant:["evo",7],condition:()=>!!("hellscape"===t.city.biome||t.blood.unbound&&t.blood.unbound>=3)&&Fr(6),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"===t.race.universe?`
                ${F("evo_demonic_effect")}
                ${F("evo_warn_unwise")}
                `:F("evo_demonic_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_demonic=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Ys("genus_demonic")},eldritch:{id:"evolution-eldritch",title:F("evo_eldritch_title"),desc:F("evo_eldritch_desc"),reqs:{evo:5,evo_eldritch:1},grant:["evo",7],condition:()=>!(!t.stats.achieve.nightmare||!t.stats.achieve.nightmare.mg)&&Fr(5),cost:{DNA:()=>260},effect:F("evo_eldritch_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_eldritch=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Ys("genus_eldritch")},aquatic:{id:"evolution-aquatic",title:F("evo_aquatic_title"),desc:F("evo_aquatic_desc"),reqs:{evo:5,evo_aquatic:1},grant:["evo",7],condition:()=>!(!["oceanic","swamp"].includes(t.city.biome)&&!t.blood.unbound)&&Fr(5),cost:{DNA:()=>260},effect:F("evo_aquatic_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_aquatic=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Ys("genus_aquatic")},fey:{id:"evolution-fey",title:F("evo_fey_title"),desc:F("evo_fey_desc"),reqs:{evo:5,evo_fey:1},grant:["evo",7],condition:()=>!(!["forest","swamp","taiga"].includes(t.city.biome)&&!t.blood.unbound)&&Fr(5),cost:{DNA:()=>260},effect:F("evo_fey_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_fey=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Ys("genus_fey")},heat:{id:"evolution-heat",title:F("evo_heat_title"),desc:F("evo_heat_desc"),reqs:{evo:5,evo_heat:1},grant:["evo",7],condition:()=>!(!["volcanic","ashland"].includes(t.city.biome)&&!t.blood.unbound)&&Fr(5),cost:{DNA:()=>260},effect:F("evo_heat_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_heat=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Ys("genus_heat")},polar:{id:"evolution-polar",title:F("evo_polar_title"),desc:F("evo_polar_desc"),reqs:{evo:5,evo_polar:1},grant:["evo",7],condition:()=>!(!["tundra","taiga"].includes(t.city.biome)&&!t.blood.unbound)&&Fr(5),cost:{DNA:()=>260},effect:F("evo_polar_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_polar=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Ys("genus_polar")},sand:{id:"evolution-sand",title:F("evo_sand_title"),desc:F("evo_sand_desc"),reqs:{evo:5,evo_sand:1},grant:["evo",7],condition:()=>!(!["desert","ashland"].includes(t.city.biome)&&!t.blood.unbound)&&Fr(5),cost:{DNA:()=>260},effect:F("evo_sand_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_sand=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Ys("genus_sand")},eggshell:{id:"evolution-eggshell",title:F("evo_eggshell_title"),desc:F("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?`
                ${F("evo_eggshell_effect")}
                ${F("evo_warn_unwise")}
                `:F("evo_eggshell_effect"),action(){return!!ii($(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?F("genelab_genus_avian"):F("evo_endothermic_title"),desc:F("evo_endothermic_desc"),reqs:{evo:6,evo_eggshell:2},grant:["evo",7],condition:()=>Fr(6),cost:{DNA:()=>260},effect:F("evo_endothermic_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_avian=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Ys("genus_avian")},ectothermic:{id:"evolution-ectothermic",title:()=>t.evolution.gselect?F("genelab_genus_reptilian"):F("evo_ectothermic_title"),desc:F("evo_ectothermic_desc"),reqs:{evo:6,evo_eggshell:2},grant:["evo",7],condition:()=>Fr(6),cost:{DNA:()=>260},effect:F("evo_ectothermic_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_reptilian=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Ys("genus_reptilian")},sentience:{id:"evolution-sentience",title:F("evo_sentience_title"),desc:F("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?F("evo_sentience_ai_effect"):F("evo_sentience_effect"),action(){if(ii($(this)[0])){let e=[],a="humanoid";for(let e in Ei)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 Ar){let r=Ar[t];Di[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))]),mi()}return!1},emblem(){for(let e in Ar){let a=Ar[e];if(t.tech[`evo_${Di[a].type}`]&&t.tech[`evo_${Di[a].type}`]>=2)return Ys(`genus_${Di[a].type}`)}return""},queue_complete:()=>t.tech.evo&&7===t.tech.evo?1:0}},city:{gift:{id:"city-gift",title:F("city_gift"),desc:F("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,ms(F("city_gift_msg",[100,F("arpa_genepool_effect_antiplasmid")]),"info",!1,["events"])):(t.prestige.Plasmid.count+=100,t.stats.plasmid+=100,ms(F("city_gift_msg",[100,F("arpa_genepool_effect_plasmid")]),"info",!1,["events"])),Qr());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),i=[];if(t.stats.died+t.stats.tdied>0){let e=t.stats.died+t.stats.tdied;t.resource.Coal.amount+=e,i.push(`${e.toLocaleString()} ${F("resource_Coal_name")}`)}if("antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=e,t.stats.antiplasmid+=e,i.push(`${e.toLocaleString()} ${F("resource_AntiPlasmid_plural_name")}`)):(t.prestige.Plasmid.count+=e,t.stats.plasmid+=e,i.push(`${e.toLocaleString()} ${F("resource_Plasmid_plural_name")}`)),r>0&&(t.prestige.Phage.count+=r,t.stats.phage+=r,i.push(`${r.toLocaleString()} ${F("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,s=t.stats.achieve.corrupted?t.stats.achieve.corrupted.l:0,n=t.stats.achieve.obsolete?t.stats.achieve.obsolete.l:0;if(e>30&&(e=30),r>5&&(r=5),s>5&&(s=5),e>0){let a=+(e/7.5).toFixed(2);t.prestige.Dark.count+=a,t.stats.dark+=a,i.push(`${a} ${F("resource_Dark_name")}`)}if(r>0&&(t.prestige.Harmony.count+=r,t.stats.harmony+=r,i.push(`${r} ${F("resource_Harmony_name")}`)),s>0){let e=5*s,a=s;t.prestige.Blood_Stone.count+=e,t.stats.blood+=e,t.prestige.Artifact.count+=a,t.stats.artifact+=a,i.push(`${e} ${F("resource_Blood_Stone_name")}`),i.push(`${a} ${F("resource_Artifact_name")}`)}"g2020"!==a&&n>0&&(t.prestige.AICore.count+=n,t.stats.cores+=n,i.push(`${n} ${F("resource_AICore_name")}`))}ms(F("city_gift2_msg",[i.join(", ")]),"info",!1,["events"]),Qr()}}return!1},touchlabel:F("open")},food:{id:"city-food",title:()=>_n().active?t.tech.conjuring?F("city_trick_conjure"):F("city_trick"):t.tech.conjuring?F("city_food_conjure"):F("city_food"),desc(){let e=$(this)[0].val(!1);return _n().active?t.tech.conjuring?F("city_trick_conjure_desc",[e]):F("city_trick_desc",[e]):t.tech.conjuring?F("city_food_conjure_desc",[e]):F("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.amount_n().active?t.tech.conjuring&&t.tech.conjuring>=2?F("city_dig_conjour"):F("city_dig"):t.tech.conjuring&&t.tech.conjuring>=2?F("city_lumber_conjure"):F("city_lumber"),desc(){let e=$(this)[0].val(!1);return _n().active?t.tech.conjuring&&t.tech.conjuring>=2?F("city_dig_conjour_desc",[e]):F("city_dig_desc",[e]):t.tech.conjuring&&t.tech.conjuring>=2?F("city_lumber_conjure_desc",[e]):F("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?F("city_conjour",[t.resource.Stone.name]):F("city_gather",[t.resource.Stone.name]),desc(){let e=$(this)[0].val(!1);return t.tech.conjuring&&t.tech.conjuring>=2?F("city_stone_conjour_desc",[e,t.resource.Stone.name]):F(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?F("city_chrysotile_conjour"):F("city_gather",[t.resource.Chrysotile.name]),desc(){let e=$(this)[0].val(!1);return t.tech.conjuring&&t.tech.conjuring>=2?F("city_stone_conjour_desc",[e,t.resource.Chrysotile.name]):F("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?F("city_evil_desc3"):F("city_evil_desc2"):F("city_evil_desc1"):t.resource.hasOwnProperty("furs")&&t.resource.Furs.display?F("city_evil_desc4"):F("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?Ki.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&&ii($(this)[0]))&&(t.city.slave_pen.slaves++,t.resource.Slave.amount=t.city.slave_pen.slaves,!0)},touchlabel:F("purchase")},s_alter:{id:"city-s_alter",title:F("city_s_alter"),desc:()=>t.city.hasOwnProperty("s_alter")&&t.city.s_alter.count>=1?`
                ${F("city_s_alter")}
                ${F("city_s_alter_desc")}
                `:F("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=`
                ${F("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+=`
                ${F("city_s_alter_rage",[Ki.cannibalize.vars()[0],Fs(t.city.s_alter.rage)])}
                `),t.city.hasOwnProperty("s_alter")&&t.city.s_alter.regen>0&&(e+=`
                ${F("city_s_alter_regen",[Ki.cannibalize.vars()[0],Fs(t.city.s_alter.regen)])}
                `),t.city.hasOwnProperty("s_alter")&&t.city.s_alter.mind>0&&(e+=`
                ${F("city_s_alter_mind",[Ki.cannibalize.vars()[0],Fs(t.city.s_alter.mind)])}
                `),t.city.hasOwnProperty("s_alter")&&t.city.s_alter.mine>0&&(e+=`
                ${F("city_s_alter_mine",[Ki.cannibalize.vars()[0],Fs(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?F("job_reclaimer"):F("job_lumberjack");e+=`
                ${F("city_s_alter_harvest",[Ki.cannibalize.vars()[0],Fs(t.city.s_alter.harvest),a])}
                `}return e},action(){if(ii($(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:F("tech_dist_sacrifice")},basic_housing:{id:"city-basic_housing",title:()=>pi(),desc:F("city_basic_housing_desc"),desc(){return 1===$(this)[0].citizens()?F("city_basic_housing_desc"):F("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?Ps("basic_housing",e,20,1.17):0),Lumber:e=>t.race.kindling_kindred||t.race.smoldering?0:Ps("basic_housing",e,10,1.23),Stone:e=>t.race.kindling_kindred?Ps("basic_housing",e,10,1.23):0,Chrysotile:e=>t.race.smoldering?Ps("basic_housing",e,10,1.23):0,Horseshoe:()=>t.race.hooved?1:0},effect(){let e=$(this)[0].citizens();return t.race.sappy?`
                ${F("plus_max_resource",[e,F("citizen")])}
                ${F("city_grove_effect",[2.5])}
                `:F("plus_max_resource",[e,F("citizen")])},action(){return!!ii($(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*=Ki.high_pop.vars()[0]),e}},cottage:{id:"city-cottage",title:()=>ui("medium"),desc(){return F("city_cottage_desc",[$(this)[0].citizens()])},category:"residential",reqs:{housing:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("cottage",e,900,1.15),Plywood:e=>Ps("cottage",e,25,1.25),Brick:e=>Ps("cottage",e,20,1.25),Wrought_Iron:e=>Ps("cottage",e,15,1.25),Iron:e=>t.city.ptrait.includes("unstable")?Ps("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=wr(t.tech.home_safe>=2?t.tech.home_safe>=3?5e3:2e3:1e3);return`
                ${F("plus_max_citizens",[e])}
                ${F("plus_max_resource",[`$${a.toLocaleString()}`,F("resource_Money_name")])}
                `}return F("plus_max_citizens",[e])},action(){return!!ii($(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*=Ki.high_pop.vars()[0]),e}},apartment:{id:"city-apartment",title:()=>ui("large"),desc(){return`
                ${F("city_apartment_desc",[$(this)[0].citizens()])}
                ${F("requires_power")}
                `},category:"residential",reqs:{housing:3},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("apartment",e,1750,1.26)-500,Crystal:e=>"magic"===t.race.universe?Ps("apartment",e,25,1.22):0,Furs:e=>Ps("apartment",e,725,1.32)-500,Copper:e=>Ps("apartment",e,650,1.32)-500,Cement:e=>Ps("apartment",e,700,1.32)-500,Steel:e=>Ps("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=wr(t.tech.home_safe>=2?t.tech.home_safe>=3?1e4:5e3:2e3);return e&&(r*=2),`
                ${F("plus_max_citizens",[a])}. ${F("minus_power",[$(this)[0].powered()])}
                ${F("plus_max_resource",[`$${r.toLocaleString()}`,F("resource_Money_name")])}
                `}return`${F("plus_max_citizens",[a])}. ${F("minus_power",[$(this)[0].powered()])}`},powered:()=>Is(D("extravagant",1)||1),action(){return!!ii($(this)[0])&&(t.city.apartment.count++,ei($(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*=Ki.high_pop.vars()[0]),a}},lodge:{id:"city-lodge",title:F("city_lodge"),desc:()=>t.race.detritivore?F("city_lodge_desc_alt"):F("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=>Ps("lodge",e,50,1.32),Lumber:e=>Ps("lodge",e,20,1.36),Stone:e=>Ps("lodge",e,10,1.36),Horseshoe:()=>t.race.hooved?1:0},effect(){let e=$(this)[0].citizens();return t.race.carnivore&&!t.race.artifical?`
                ${F("plus_max_resource",[e,F("citizen")])}
                ${F("city_lodge_effect",[5])}
                `:F("plus_max_resource",[e,F("citizen")])},action(){return!!ii($(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*=Ki.high_pop.vars()[0]),e}},smokehouse:{id:"city-smokehouse",title:()=>t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?F("city_smokehouse_easter"):F("city_smokehouse"),desc:F("city_smokehouse_desc"),category:"trade",reqs:{hunting:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("smokehouse",e,85,1.32),Lumber:e=>Ps("smokehouse",e,65,1.36),Stone:e=>Ps("smokehouse",e,50,1.36)},effect:()=>`
                ${F("plus_max_resource",[Gr(wr(100)),F("resource_Food_name")])}
                ${F("city_smokehouse_effect",[10])}
                `,action(){return!!ii($(this)[0])&&(t.city.smokehouse.count++,t.resource.Food.max+=Gr(wr(100)),!0)}},soul_well:{id:"city-soul_well",title:F("city_soul_well"),desc:F("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?Ps("soul_well",e,50,1.32):0),Lumber:e=>Ps("soul_well",e,20,1.36),Stone:e=>Ps("soul_well",e,10,1.36)},effect(){let e=Gr(wr(500));return`
                ${F("city_soul_well_effect",[t.race.ghostly?2+Ki.ghostly.vars()[1]:2])}
                ${F("plus_max_resource",[e,F("resource_Souls_name")])}
                `},action(){return!!ii($(this)[0])&&(t.city.soul_well.count++,t.resource.Food.max+=Gr(wr(500)),!0)}},slave_pen:{id:"city-slave_pen",title:F("city_slave_pen"),desc:F("city_slave_pen"),category:"commercial",reqs:{slaves:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("slave_pen",e,250,1.32),Lumber:e=>Ps("slave_pen",e,100,1.36),Stone:e=>Ps("slave_pen",e,75,1.36),Copper:e=>Ps("slave_pen",e,10,1.36),Nanite:e=>t.race.deconstructor?Ps("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`
                ${F("city_slave_pen_effect",[4])}
                ${F("city_slave_pen_effect2",[a,e])}
                `},action(){return!!ii($(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:F("city_transmitter"),desc:()=>`
                ${F("city_transmitter_desc")}
                ${F("requires_power")}
                `,category:"residential",reqs:{high_tech:4},trait:["artifical"],cost:{Money:e=>t.city.transmitter&&t.city.transmitter.count>=3?Ps("transmitter",e,50,1.32):0,Copper:e=>Ps("transmitter",e,20,1.36),Steel:e=>Ps("transmitter",e,10,1.36)},effect(){let e=+xe("transmitter").toFixed(2),a=wr(100);return`
                ${F("gain",[e,t.resource.Food.name])}
                ${F("city_transmitter_effect",[a])}
                ${F("minus_power",[$(this)[0].powered()])}
                `},powered:()=>Is(.5),powerBalancer:()=>[{r:"Food",k:"lpmod"}],action(){return!!ii($(this)[0])&&(t.city.transmitter.count++,ei($(this)[0]),!0)}},captive_housing:zr("captive_housing","city"),farm:{id:"city-farm",title:F("city_farm"),desc:F("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?Ps("farm",e,50,1.32):0),Lumber:e=>Ps("farm",e,20,1.36),Stone:e=>Ps("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?`
                ${F("city_farm_effect")}
                ${F("plus_max_resource",[e,F("citizen")])}
                `:F("city_farm_effect")},action(){return!!ii($(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*=Ki.high_pop.vars()[0]),e},flair:()=>t.tech.agriculture>=7?F("city_farm_flair2"):F("city_farm_flair1")},compost:{id:"city-compost",title:F("city_compost_heap"),desc:F("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?Ps("compost",e,50,1.32):0),Lumber:e=>Ps("compost",e,12,1.36),Stone:e=>Ps("compost",e,12,1.36)},effect(){let e=1.2+.8*(t.tech.compost?t.tech.compost:0);e*="grassland"===t.city.biome?ss.grassland.vars()[0]:1,e*="savanna"===t.city.biome?ss.savanna.vars()[0]:1,e*="ashland"===t.city.biome?ss.ashland.vars()[0]:1,e*="volcanic"===t.city.biome?ss.volcanic.vars()[0]:1,e*="hellscape"===t.city.biome?ss.hellscape.vars()[0]:1,e*=t.city.ptrait.includes("trashed")?ns.trashed.vars()[0]:1,e=+e.toFixed(2);let a=Gr(wr(200)),r=t.race.kindling_kindred?"":`
                ${F("city_compost_heap_effect2",[.5,t.resource.Lumber.name])}
                `;return`
                ${F("city_compost_heap_effect",[e])}
                ${F("city_compost_heap_effect3",[a])}
                ${r}`},switchable:()=>!0,action(){return!!ii($(this)[0])&&(t.city.compost.count++,t.city.compost.on++,t.resource.Food.max+=Gr(wr(200)),!0)}},mill:{id:"city-mill",title:()=>t.tech.agriculture>=5?F("city_mill_title2"):F("city_mill_title1"),desc(){let e=t.tech.agriculture>=5?5:3;return t.tech.agriculture>=6?F("city_mill_desc2",[e,-1*$(this)[0].powered()]):F("city_mill_desc1",[e])},category:"utility",reqs:{agriculture:4},not_tech:["wind_plant"],not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("mill",e,1e3,1.31),Lumber:e=>Ps("mill",e,600,1.33),Iron:e=>Ps("mill",e,150,1.33),Cement:e=>Ps("mill",e,125,1.33)},powered:()=>t.race.environmentalist?-1.5:-1,power_reqs:{agriculture:6},effect:()=>t.tech.agriculture>=6&&`${F("city_on")} ${F("city_mill_effect1")} ${F("city_off")} ${F("city_mill_effect2")}`,action(){return!!ii($(this)[0])&&(t.city.mill.count++,!0)}},windmill:{id:"city-windmill",title:()=>t.race.unfathomable?F("tech_watermill"):F("city_mill_title2"),desc:()=>t.race.unfathomable?F("tech_watermill"):F("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=>Ps("windmill",e,1e3,1.31),Lumber:e=>Ps("windmill",e,600,1.33),Iron:e=>Ps("windmill",e,150,1.33),Cement:e=>Ps("windmill",e,125,1.33)},effect(){return`
                ${F("space_dwarf_reactor_effect1",[-1*$(this)[0].powered()])}
                `},action(){return!!ii($(this)[0])&&(t.city.windmill.count++,!0)}},silo:{id:"city-silo",title:F("city_silo"),desc:F("city_food_storage"),category:"trade",reqs:{agriculture:3},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("silo",e,85,1.32),Lumber:e=>Ps("silo",e,65,1.36),Stone:e=>Ps("silo",e,50,1.36),Iron:e=>(t.city.silo?t.city.silo.count:0)+(e||0)>=4&&t.city.ptrait.includes("unstable")?Ps("silo",e,10,1.36):0},effect:()=>F("plus_max_resource",[Gr(wr(500)),F("resource_Food_name")]),action(){return!!ii($(this)[0])&&(t.city.silo.count++,t.resource.Food.max+=Gr(wr(500)),!0)}},assembly:zr("assembly","city"),garrison:{id:"city-garrison",title:()=>t.race.flier?F("city_garrison_flier"):F("city_garrison"),desc:F("city_garrison_desc"),category:"military",reqs:{military:1,housing:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("garrison",e,240,1.5),Stone:e=>Ps("garrison",e,260,1.46),Iron:e=>(t.city.garrison?t.city.garrison.count:0)+(e||0)>=4&&t.city.ptrait.includes("unstable")?Ps("garrison",e,50,1.4):0,Horseshoe:()=>t.race.hooved?t.race.chameleon?1:2:0},effect(){let e=t.tech.military>=5?aa(3):aa(2);return t.race.chameleon&&e--,F("plus_max_resource",[e,F("civics_garrison_soldiers")])},switchable:()=>!0,action(){if(ii($(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,zs({el:"#garrison"},"update"),zs({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:F("city_hospital"),desc:F("city_hospital_desc"),category:"military",reqs:{medic:1},not_trait:["cataclysm","artifical"],cost:{Money:e=>Ps("hospital",e,22e3,1.32),Furs:e=>Ps("hospital",e,4e3,1.32),Iron:e=>t.city.ptrait.includes("unstable")?Ps("hospital",e,500,1.32):0,Aluminium:e=>Ps("hospital",e,1e4,1.32)},effect(){let e=t.tech.reproduction&&t.tech.reproduction>=2?`
                ${F("city_hospital_effect2")}
                `:"",a=`
                ${F("city_hospital_effect",[5*t.tech.medic])}
                ${e}`;return!t.race.artifical&&t.race.hasOwnProperty("vax")&&(a+=`
                ${F("tau_home_disease_lab_vax",[+t.race.vax.toFixed(2)])}
                `),a},action(){return!!ii($(this)[0])&&(t.city.hospital.count++,!0)}},boot_camp:{id:"city-boot_camp",title:()=>t.race.artifical?F("city_boot_camp_art"):F("city_boot_camp"),desc:()=>t.race.artifical?F("city_boot_camp_art_desc",[Di[t.race.species].name]):F("city_boot_camp_desc"),category:"military",reqs:{boot_camp:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("boot_camp",e,5e4,1.32),Lumber:e=>Ps("boot_camp",e,21500,1.32),Iron:e=>t.city.ptrait.includes("unstable")?Ps("boot_camp",e,300,1.32):0,Aluminium:e=>Ps("boot_camp",e,12e3,1.32),Brick:e=>Ps("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?`
                ${F("city_boot_camp_effect",[e])}
                ${F("city_boot_camp_effect2",[10])}
                `:`
                ${F("city_boot_camp_effect",[e])}
                `;return t.race.artifical&&!t.race.orbit_decayed&&(r+=`
                ${F("city_boot_camp_art_effect",[5*(t.tech.medic||1)])}
                `),t.race.artifical&&t.race.hasOwnProperty("vax")&&(desc+=`
                ${F("tau_home_disease_lab_vax",[+t.race.vax.toFixed(2)])}
                `),r},action(){return!!ii($(this)[0])&&(t.city.boot_camp.count++,!0)}},shed:{id:"city-shed",title:()=>t.tech.storage<=2?F("city_shed_title1"):t.tech.storage>=4?F("city_shed_title3"):F("city_shed_title2"),desc(){let e=t.tech.storage>=3?t.tech.storage>=4?F("city_shed_desc_size3"):F("city_shed_desc_size2"):F("city_shed_desc_size1");return F("city_shed_desc",[e])},category:"trade",reqs:{storage:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("shed",e,75,1.22),Lumber:e=>t.tech.storage&&t.tech.storage<4?Ps("shed",e,55,1.32):0,Stone:e=>t.tech.storage&&t.tech.storage<3?Ps("shed",e,45,1.32):0,Iron:e=>t.tech.storage&&t.tech.storage>=4?Ps("shed",e,22,1.32):0,Cement:e=>t.tech.storage&&t.tech.storage>=3?Ps("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=Nr();for(const r of $(this)[0].res())t.resource[r].display&&(e+=`${F("plus_max_resource",[q(+(wr($(this)[0].val(r))*a).toFixed(0),1),t.resource[r].name])}`);return e+="
                ",e},wide:!0,action(){if(ii($(this)[0])){t.city.shed.count++;let e=Nr();for(const a of $(this)[0].res())t.resource[a].display&&(t.resource[a].max+=wr($(this)[0].val(a)*e));return!0}return!1}},storage_yard:{id:"city-storage_yard",title:F("city_storage_yard"),desc:F("city_storage_yard_desc"),category:"trade",reqs:{container:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("storage_yard",e,10,bi(1.36)),Brick:e=>Ps("storage_yard",e,3,bi(1.35)),Wrought_Iron:e=>Ps("storage_yard",e,5,bi(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?`
                ${F("plus_max_resource",[e,F("resource_Crates_name")])}
                ${F("city_trade_effect",[1])}
                `:F("plus_max_resource",[e,F("resource_Crates_name")])},action(){if(ii($(this)[0])){!1===t.resource.Crates.display&&ms(F("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,Cs($("#resources")),Ba(),t.settings.tabLoad&&(Da("storage"),E())),!0}return!1}},warehouse:{id:"city-warehouse",title:F("city_warehouse"),desc:F("city_warehouse_desc"),category:"trade",reqs:{steel_container:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("warehouse",e,400,bi(1.26)),Cement:e=>Ps("warehouse",e,75,bi(1.26)),Sheet_Metal:e=>Ps("warehouse",e,25,bi(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),F("plus_max_resource",[e,F("resource_Containers_name")])},action(){if(ii($(this)[0])){!1===t.resource.Containers.display&&ms(F("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,Cs($("#resources")),Ba(),t.settings.tabLoad&&Da("storage")),!0}return!1}},bank:{id:"city-bank",title:F("city_bank"),desc:()=>F("city_bank_desc",[Di[t.race.species].home]),category:"commercial",reqs:{banking:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("bank",e,250,1.35),Lumber:e=>Ps("bank",e,75,1.32),Stone:e=>Ps("bank",e,100,1.35),Iron:e=>(t.city.bank?t.city.bank.count:0)+(e||0)>=2&&t.city.ptrait.includes("unstable")?Ps("bank",e,30,1.3):0},effect(){let e=wi();return e=wr(e),e=(+e.toFixed(0)).toLocaleString(),t.tech.banking>=2?`
                ${F("plus_max_resource",[`$${e}`,F("resource_Money_name")])}
                ${F("plus_max_resource",[aa(1),F("banker_name")])}
                `:F("plus_max_resource",[`$${e}`,F("resource_Money_name")])},action(){return!!ii($(this)[0])&&(t.resource.Money.max+=wr(1800),t.city.bank.count++,t.civic.banker.max=aa(t.city.bank.count),!0)}},pylon:{id:"city-pylon",title:F("city_pylon"),desc:F("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?Ps("pylon",e,10,1.48):0),Stone:e=>Ps("pylon",e,12,1.42),Crystal:e=>Ps("pylon",e,8,1.42)-3},effect(){let e=wr(5);return`
                ${F("gain",[+(.01*Ts("magic")).toFixed(3),t.resource.Mana.name])}
                ${F("plus_max_resource",[e,t.resource.Mana.name])}
                `},special:()=>!!(t.tech.magic&&t.tech.magic>=3),action(){return!!ii($(this)[0])&&(t.city.pylon.count++,t.resource.Mana.max+=wr(5),!0)}},conceal_ward:{id:"city-conceal_ward",title:F("city_conceal_ward"),desc:F("city_conceal_ward"),category:"industrial",reqs:{roguemagic:3},not_trait:["cataclysm","orbit_decayed"],cost:{Money:e=>Ps("conceal_ward",e,500,1.25),Mana:e=>{return Ps("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=>Ps("conceal_ward",e,5,1.25)},effect:()=>`
                ${F("city_conceal_ward_effect",[t.tech.roguemagic&&t.tech.roguemagic>=8?1.25:1])}
                `,action(){return!!ii($(this)[0])&&(t.city.conceal_ward.count++,!0)}},graveyard:{id:"city-graveyard",title:F("city_graveyard"),desc:F("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?Ps("graveyard",e,5,1.85):0),Lumber:e=>Ps("graveyard",e,2,1.95),Stone:e=>Ps("graveyard",e,6,1.9)},effect(){let e=Gr(wr(100));return`
                ${F("city_graveyard_effect",[8])}
                ${F("plus_max_resource",[e,t.resource.Lumber.name])}
                `},action(){return!!ii($(this)[0])&&(t.city.graveyard.count++,t.resource.Lumber.max+=Gr(wr(100)),!0)}},lumber_yard:{id:"city-lumber_yard",title:F("city_lumber_yard"),desc:F("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?Ps("lumber_yard",e,5,1.85):0),Lumber:e=>Ps("lumber_yard",e,6,1.9),Stone:e=>Ps("lumber_yard",e,2,1.95)},effect(){let e=Gr(wr(100));return`
                ${F("city_lumber_yard_effect",[2])}
                ${F("plus_max_resource",[e,t.resource.Lumber.name])}
                `},action(){return!!ii($(this)[0])&&(t.city.lumber_yard.count++,t.civic.lumberjack.display=!0,t.resource.Lumber.max+=Gr(wr(100)),!0)}},sawmill:{id:"city-sawmill",title:F("city_sawmill"),desc:F("city_sawmill_desc"),category:"industrial",reqs:{saw:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("sawmill",e,3e3,1.26),Iron:e=>Ps("sawmill",e,400,1.26),Cement:e=>Ps("sawmill",e,420,1.26)},effect(){let e=t.tech.saw>=2?8:5,a=`
                ${F("plus_max_resource",[Gr(wr(200)),t.resource.Lumber.name])}
                ${F("city_lumber_yard_effect",[e])}
                `;return t.tech.foundry&&t.tech.foundry>=4&&(a+=`
                ${F("city_sawmill_effect2",[2])}
                `),t.city.powered&&(a+=`
                ${F("city_sawmill_effect3",[4,$(this)[0].powered()])}
                `),a},powered:()=>Is(1),powerBalancer:()=>!!t.city.sawmill.hasOwnProperty("psaw")&&[{r:"Lumber",k:"psaw"}],action(){return!!ii($(this)[0])&&(t.city.sawmill.count++,t.resource.Lumber.max+=Gr(wr(200)),ei($(this)[0]),!0)}},rock_quarry:{id:"city-rock_quarry",title:()=>t.race.flier?F("city_rock_quarry_alt"):F("city_rock_quarry"),desc:()=>t.race.flier?F("city_rock_quarry_desc_alt",[t.resource.Stone.name]):F("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?Ps("rock_quarry",e,20,1.45):0),Lumber:e=>Ps("rock_quarry",e,50,1.36),Stone:e=>Ps("rock_quarry",e,10,1.36)},effect(){let e=Gr(wr(100)),a=t.race.smoldering?`
                ${F("plus_max_resource",[e,t.resource.Chrysotile.name])}
                `:"";return t.tech.mine_conveyor?`
                ${F("city_rock_quarry_effect1",[2])}
                ${F("plus_max_resource",[e,t.resource.Stone.name])}
                ${a}
                ${F("city_rock_quarry_effect2",[4,$(this)[0].powered()])}
                `:`
                ${F("city_rock_quarry_effect1",[2])}
                ${F("plus_max_resource",[e,t.resource.Stone.name])}
                ${a}`},special:()=>!!t.race.smoldering,powered:()=>Is(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(ii($(this)[0])){t.city.rock_quarry.count++,t.civic.quarry_worker.display=!0;let e=Gr(wr(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&&ei($(this)[0]),!0}return!1}},cement_plant:{id:"city-cement_plant",title:F("city_cement_plant"),desc:F("city_cement_plant_desc"),category:"industrial",reqs:{cement:1},not_trait:["cataclysm","lone_survivor","flier"],cost:{Money:e=>Ps("cement_plant",e,3e3,1.5),Lumber:e=>Ps("cement_plant",e,1800,1.36),Stone:e=>Ps("cement_plant",e,2e3,1.32),Iron:e=>t.city.ptrait.includes("unstable")?Ps("cement_plant",e,275,1.32):0},effect(){if(t.tech.cement>=5){let e=t.tech.cement>=6?8:5;return`
                ${F("city_cement_plant_effect1",[aa(2)])}
                ${F("city_cement_plant_effect2",[$(this)[0].powered(),e])}
                `}return F("city_cement_plant_effect1",[aa(2)])},powered:()=>Is(2),powerBalancer:()=>!!t.city.cement_plant.hasOwnProperty("cnvay")&&[{r:"Cement",k:"cnvay"}],power_reqs:{cement:5},action(){return!!ii($(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*aa(2),t.tech.cement&&t.tech.cement>=5&&ei($(this)[0]),!0)}},foundry:{id:"city-foundry",title:F("city_foundry"),desc:F("city_foundry_desc"),category:"industrial",reqs:{foundry:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("foundry",e,750,1.36),Stone:e=>Ps("foundry",e,100,1.36),Copper:e=>Ps("foundry",e,250,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Ps("foundry",e,40,1.36):0},effect(){let e=`
                ${F("city_foundry_effect1",[aa(1)])}
                `;return t.tech.foundry>=2&&(e+=`
                ${F("city_crafted_mats",[t.tech.foundry>=5?t.tech.foundry>=8?8:5:3])}
                `),t.tech.foundry>=6&&(e+=`
                ${F("city_foundry_effect2",[2])}
                `),e},action(){return!!ii($(this)[0])&&(0===t.city.foundry.count&&(t.race.no_craft?ms(F("city_foundry_msg2"),"info",!1,["progress"]):ms(F("city_foundry_msg1"),"info",!1,["progress"])),t.city.foundry.count++,t.civic.craftsman.max+=aa(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),na(),!0)}},factory:{id:"city-factory",title:F("city_factory"),desc:`
                ${F("city_factory_desc")}
                ${F("requires_power")}
                `,category:"industrial",reqs:{high_tech:3},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("factory",e,25e3,oi(1.32)),Cement:e=>Ps("factory",e,1e3,oi(1.32)),Steel:e=>Ps("factory",e,7500,oi(1.32)),Titanium:e=>Ps("factory",e,2500,oi(1.32))},effect(){let e=`
                ${F("city_factory_effect")}
                ${F("minus_power",[$(this)[0].powered()])}
                `;return t.tech.foundry>=7&&(e+=`
                ${F("city_crafted_mats",[5])}
                `),e},powered:()=>Is(3),special:!0,action(){return!!ii($(this)[0])&&(t.city.factory.count++,t.resource.Alloy.display=!0,t.tech.polymer&&(t.resource.Polymer.display=!0),ei($(this)[0])&&t.city.factory.Alloy++,t.settings.showIndustry=!0,$i(),!0)}},nanite_factory:zr("nanite_factory","city"),smelter:{id:"city-smelter",title:F("city_smelter"),desc:F("city_smelter_desc"),category:"industrial",reqs:{smelting:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("smelter",e,1e3,oi(1.32)),Iron:e=>Ps("smelter",e,500,oi(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?F("city_smelter_effect2",[e]):F("city_smelter_effect1",[e])},special:!0,action(){return!!ii($(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,$i(),!0)},flair:`
                ${F("city_smelter_flair1")}
                ${F("city_smelter_flair2")}
                `},metal_refinery:{id:"city-metal_refinery",title:F("city_metal_refinery"),desc:F("city_metal_refinery_desc"),category:"industrial",reqs:{alumina:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("metal_refinery",e,2500,1.35),Iron:e=>t.city.ptrait.includes("unstable")?Ps("metal_refinery",e,125,1.35):0,Steel:e=>Ps("metal_refinery",e,350,1.35)},powered:()=>Is(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?`${F(e,[6])} ${F("city_metal_refinery_effect2",[6,12,$(this)[0].powered()])}`:F(e,[6])},action(){return!!ii($(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,na()),t.tech.alumina>=2&&ei($(this)[0]),!0)}},mine:{id:"city-mine",title:F("city_mine"),desc:F("city_mine_desc"),category:"industrial",reqs:{mining:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("mine",e,60,oi(1.6)),Lumber:e=>Ps("mine",e,175,oi(1.38))},effect(){return t.tech.mine_conveyor?`
                ${F("city_mine_effect1",[aa(1)])}
                ${F("city_mine_effect2",[$(this)[0].powered(),5])}
                `:F("city_mine_effect1",[aa(1)])},powered:()=>Is(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!!ii($(this)[0])&&(t.city.mine.count++,t.resource.Copper.display=!0,t.civic.miner.display=!0,t.civic.miner.max=aa(t.city.mine.count),t.tech.mine_conveyor&&ei($(this)[0]),!0)},flair:()=>"avian"===Di[t.race.species].type?F("city_mine_flair_avian"):""},coal_mine:{id:"city-coal_mine",title:F("city_coal_mine"),desc:F("city_coal_mine_desc"),category:"industrial",reqs:{mining:4},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("coal_mine",e,480,oi(1.4)),Lumber:e=>Ps("coal_mine",e,250,oi(1.36)),Iron:e=>t.city.ptrait.includes("unstable")?Ps("coal_mine",e,28,oi(1.36)):0,Wrought_Iron:e=>Ps("coal_mine",e,18,oi(1.36))},effect(){return t.tech.mine_conveyor?`
                ${F("city_coal_mine_effect1",[aa(1)])}
                ${F("city_coal_mine_effect2",[$(this)[0].powered(),5])}
                `:F("city_coal_mine_effect1",[aa(1)])},powered:()=>Is(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!!ii($(this)[0])&&(t.city.coal_mine.count++,t.resource.Coal.display=!0,t.civic.coal_miner.display=!0,t.civic.coal_miner.max=aa(t.city.coal_mine.count),t.tech.mine_conveyor&&ei($(this)[0]),!0)}},oil_well:{id:"city-oil_well",title:F("city_oil_well"),desc:F("city_oil_well_desc"),category:"industrial",reqs:{oil:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("oil_well",e,5e3,oi(1.5)),Iron:e=>t.city.ptrait.includes("unstable")?Ps("oil_well",e,450,oi(1.5)):0,Cement:e=>Ps("oil_well",e,5250,oi(1.5)),Steel:e=>Ps("oil_well",e,6e3,oi(1.5))},effect:()=>F("city_oil_well_effect",[+xe("oil_well").toFixed(2),wr(500)]),action(){return!!ii($(this)[0])&&(t.city.oil_well.count++,t.resource.Oil.max+=wr(500),1===t.city.oil_well.count&&(t.resource.Oil.display=!0,$i()),!0)},flair:F("city_oil_well_flair")},oil_depot:{id:"city-oil_depot",title:F("city_oil_depot"),desc:F("city_oil_depot_desc"),category:"trade",reqs:{oil:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("oil_depot",e,2500,oi(1.46)),Iron:e=>t.city.ptrait.includes("unstable")?Ps("oil_depot",e,325,oi(1.36)):0,Cement:e=>Ps("oil_depot",e,3750,oi(1.46)),Sheet_Metal:e=>Ps("oil_depot",e,100,oi(1.45))},effect(){let e=wr(1e3);e*=t.tech.world_control?1.5:1;let a=`
                ${F("plus_max_resource",[e,t.resource.Oil.name])}.
                `;if(t.resource.Helium_3.display){let e=wr(400);e*=t.tech.world_control?1.5:1,a+=`
                ${F("plus_max_resource",[e,t.resource.Helium_3.name])}.
                `}if(t.tech.uranium>=2){let e=wr(250);e*=t.tech.world_control?1.5:1,a+=`
                ${F("plus_max_resource",[e,t.resource.Uranium.name])}.
                `}return a},action(){return!!ii($(this)[0])&&(t.city.oil_depot.count++,t.resource.Oil.max+=wr(1e3)*(t.tech.world_control?1.5:1),t.resource.Helium_3.display&&(t.resource.Helium_3.max+=wr(400)*(t.tech.world_control?1.5:1)),t.tech.uranium>=2&&(t.resource.Uranium.max+=wr(250)*(t.tech.world_control?1.5:1)),!0)}},trade:{id:"city-trade",title:F("city_trade"),desc:F("city_trade_desc"),category:"trade",reqs:{trade:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("trade",e,500,1.36),Lumber:e=>Ps("trade",e,125,1.36),Stone:e=>Ps("trade",e,50,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Ps("trade",e,15,1.36):0,Furs:e=>Ps("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+=Ki.flier.vars()[1]),F("city_trade_effect",[e])},action(){if(ii($(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:F("city_wharf"),desc:F("city_wharf_desc"),category:"trade",era:"industrialized",reqs:{wharf:1},not_trait:["thalassophobia","cataclysm"],cost:{Money:e=>Ps("wharf",e,62e3,1.32),Lumber:e=>Ps("wharf",e,44e3,1.32),Iron:e=>t.city.ptrait.includes("unstable")?Ps("wharf",e,200,1.32):0,Cement:e=>Ps("wharf",e,3e3,1.32),Oil:e=>Ps("wharf",e,750,1.32)},effect(){let e=t.tech.world_control?15:10;return t.tech.particles&&t.tech.particles>=2&&(e*=2),`
                ${F("city_trade_effect",[2])}
                ${F("city_wharf_effect")}
                ${F("plus_max_crates",[e])}
                ${F("plus_max_containers",[e])}
                `},action(){if(ii($(this)[0])){!1===t.resource.Containers.display&&(ms(F("city_warehouse_msg"),"info",!1,["progress"]),t.resource.Containers.display=!0,Cs($("#resources")),Ba()),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:F("city_tourist_center"),desc:F("city_tourist_center_desc"),category:"commercial",reqs:{monument:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("tourist_center",e,1e5,1.36),Stone:e=>Ps("tourist_center",e,25e3,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Ps("tourist_center",e,1e3,1.36):0,Furs:e=>Ps("tourist_center",e,7500,1.36),Plywood:e=>Ps("tourist_center",e,5e3,1.36)},effect(){let e=t.tech.monument&&t.tech.monument>=3&&s.s_gate?3:1,a=("corpocracy"===t.civic.govern.type?2:1)*e,r=("corpocracy"===t.civic.govern.type?10:5)*e,i=("corpocracy"===t.civic.govern.type?4:2)*e,n="";t.stats.achieve.banana&&t.stats.achieve.banana.l>=4&&(n=`
                ${F("city_tourist_center_effect5",[("corpocracy"===t.civic.govern.type?6:3)*e])}
                `);let c="",o=D("pious",1);return o&&(c=`
                ${F("city_tourist_center_effect6",[("corpocracy"===t.civic.govern.type?2*o:o)*e])}
                `),`
                ${F("city_tourist_center_effect1",[t.resource.Food.name])}
                ${F("city_tourist_center_effect2",[a,Sr.city.amphitheatre.title()])}
                ${F("city_tourist_center_effect3",[r])}
                ${F("city_tourist_center_effect4",[i])}
                ${n}${c}`},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(t.city.tourist_center.count++,t.city.tourist_center.on++,!0)}},amphitheatre:{id:"city-amphitheatre",title:()=>F(D("athleticism",0)?"city_stadium":"city_amphitheatre"),desc:()=>F(D("athleticism",0)?"city_stadium":"city_amphitheatre_desc"),category:"commercial",reqs:{theatre:1},not_trait:["joyless","cataclysm"],cost:{Money:e=>Ps("amphitheatre",e,500,1.55),Lumber:e=>Ps("amphitheatre",e,50,1.75),Stone:e=>Ps("amphitheatre",e,200,1.75),Iron:e=>t.city.ptrait.includes("unstable")?Ps("amphitheatre",e,18,1.36):0},effect(){let e=D("athleticism",0);return`
                ${F("city_max_entertainer",[aa(D("athleticism",1)||1)])}
                ${F("city_max_morale",[e||1])}
                `},action(){return!!ii($(this)[0])&&(t.city.amphitheatre.count++,t.civic.entertainer.max+=aa(1),t.civic.entertainer.display=!0,!0)},flair:()=>F(D("athleticism",0)?"city_stadium_flair":"city_amphitheatre_flair")},casino:{id:"city-casino",title:F("city_casino"),desc:F("city_casino"),category:"commercial",reqs:{gambling:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("casino",e,35e4,1.35),Iron:e=>t.city.ptrait.includes("unstable")?Ps("casino",e,2e3,1.35):0,Furs:e=>Ps("casino",e,6e4,1.35),Plywood:e=>Ps("casino",e,1e4,1.35),Brick:e=>Ps("casino",e,6e3,1.35)},effect(){let e=Dr();return e+=`
                ${F("minus_power",[$(this)[0].powered()])}
                `,e},powered:()=>Is(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=2?2:3),action(){return!!ii($(this)[0])&&(t.city.casino.count++,t.race.joyless||(t.civic.entertainer.max+=aa(1),t.civic.entertainer.display=!0),ei($(this)[0]),!0)},flair:F("city_casino_flair")},temple:{id:"city-temple",title:F("city_temple"),desc:()=>F("city_temple_desc",["none"!==t.race.gods?Di[t.race.gods.toLowerCase()].entity:Di[t.race.species].entity]),category:"commercial",reqs:{theology:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("temple",e,50,1.36),Lumber:e=>Ps("temple",e,25,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Ps("temple",e,6,1.36):0,Furs:e=>Ps("temple",e,15,1.36),Cement:e=>Ps("temple",e,10,1.36)},effect(){let e=Kr();return t.genes.ancients&&t.genes.ancients>=2&&(e+=`
                ${F("city_temple_effect6",[aa(1)])}
                `),e},action(){return!!ii($(this)[0])&&(t.genes.ancients&&t.genes.ancients>=2&&(t.civic.priest.display=!0),t.city.temple.count++,!0)}},shrine:{id:"city-shrine",title:F("city_shrine"),desc:()=>F("city_shrine_desc"),category:"commercial",reqs:{theology:2},trait:["magnificent"],not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("shrine",e,75,1.32),Stone:e=>Ps("shrine",e,65,1.32),Furs:e=>Ps("shrine",e,10,1.32),Copper:e=>Ps("shrine",e,15,1.32)},effect(){let e=`
                ${F("city_shrine_effect")}
                `;if(t.city.shrine&&t.city.shrine.morale>0&&(e+=`
                ${F("city_shrine_morale",[+pn("morale").add.toFixed(1)])}
                `),t.city.shrine&&t.city.shrine.metal>0&&(e+=`
                ${F("city_shrine_metal",[+(100*(pn("metal").mult-1)).toFixed(1)])}
                `),t.city.shrine&&t.city.shrine.know>0){let t=pn("know");e+=`
                ${F("city_shrine_know",[(+t.add.toFixed(1)).toLocaleString()])}
                `,e+=`
                ${F("city_shrine_know2",[+(100*(t.mult-1)).toFixed(1)])}
                `}return t.city.shrine&&t.city.shrine.tax>0&&(e+=`
                ${F("city_shrine_tax",[+(100*(pn("tax").mult-1)).toFixed(1)])}
                `),e},action(){if(ii($(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:F("city_meditation"),desc:F("city_meditation"),category:"commercial",reqs:{primitive:3},trait:["calm"],not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("meditation",e,50,1.2),Stone:e=>Ps("meditation",e,25,1.2),Furs:e=>Ps("meditation",e,8,1.2)},effect(){let e=t.resource.Zen.amount/(t.resource.Zen.amount+5e3);return`
                ${F("city_meditation_effect",[Ki.calm.vars()[0]])}
                ${F("city_meditation_effect2",[2])}
                ${F("city_meditation_effect3",[1])}
                ${F("city_meditation_effect4",[`${(100*e).toFixed(2)}%`])}
                `},action(){return!!ii($(this)[0])&&(t.city.meditation.count++,t.resource.Zen.max+=Ki.calm.vars()[0],!0)}},university:{id:"city-university",title:F("city_university"),desc:()=>F("city_university_desc",[Di[t.race.species].home]),category:"science",reqs:{science:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("university",e,900,1.5)-500,Lumber:e=>Ps("university",e,500,1.36)-200,Stone:e=>Ps("university",e,750,1.36)-350,Crystal:e=>"magic"===t.race.universe?Ps("university",e,5,1.36):0,Iron:e=>(t.city.university?t.city.university.count:0)+(e||0)>=3&&t.city.ptrait.includes("unstable")?Ps("university",e,25,1.36):0},effect(){let e=+$(this)[0].knowVal().toFixed(0);return`
                ${F("city_university_effect",[aa(1)])}
                ${F("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+=ns.permafrost.vars()[1]),t.tech.science>=4&&(e+=.02*t.city.library.count),t.space.observatory&&t.space.observatory.count>0&&(e+=.05*n.observatory),t.portal.sensor_drone&&t.tech.science>=14&&(e+=.02*s.sensor_drone),t.race.hard_of_hearing&&(e*=1-Ki.hard_of_hearing.vars()[0]/100),t.race.curious&&(e*=1+Ki.curious.vars()[0]/100*t.resource[t.race.species].amount);let r=as("cath");if(r>0&&(e*=1+Ki.curious.vars(3)[0]*r),s.s_gate&&o.scavenger){let t=St("gxy_alien2");e*=1+o.scavenger*t/4}let i=D("teacher",0);i&&(e*=1+i/100);let c=D("athleticism",2);c&&(e*=1-c/100),dn()&&(e*=pn("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(ii($(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:F("city_library"),desc:()=>F("city_library_desc",[Di[t.race.species].home]),category:"science",reqs:{science:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("library",e,45,1.2),Crystal:e=>"magic"===t.race.universe?Ps("library",e,2,1.2):0,Iron:e=>t.city.ptrait.includes("unstable")?Ps("library",e,4,1.2):0,Furs:e=>Ps("library",e,22,1.2),Plywood:e=>Ps("library",e,20,1.2),Brick:e=>Ps("library",e,15,1.2)},effect(){let e=125;t.race.nearsighted&&(e*=1-Ki.nearsighted.vars()[0]/100),t.race.studious&&(e*=1+Ki.studious.vars()[1]/100);let a=as("elven");if(a>0&&(e*=1+Ki.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=ta(t.civic.scientist.workers,"scientist");t.race.high_pop&&(a=$e(a)),e*=1+.12*a}let r=D("teacher",0);r&&(e*=1+r/100);let i=D("athleticism",2);i&&(e*=1-i/100);let s=D("muckraker",1);s&&(e*=1+s/100),e=+e.toFixed(0);let n=D("muckraker",2),c=n?5-n:5;return t.race.autoignition&&(c-=Ki.autoignition.vars()[0],c<0&&(c=0)),`
                ${F("city_max_knowledge",[e.toLocaleString()])}
                ${F("city_library_effect",[c])}
                `},action(){if(ii($(this)[0])){let e=125;return t.race.nearsighted&&(e*=1-Ki.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*ta(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:F("city_library_flair")},wardenclyffe:{id:"city-wardenclyffe",title:()=>di(),desc:F("city_wardenclyffe_desc"),category:"science",reqs:{high_tech:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("wardenclyffe",e,5e3,1.22),Knowledge:e=>Ps("wardenclyffe",e,t.race.logical?1e3-Ki.logical.vars()[0]:1e3,1.22),Crystal:e=>"magic"===t.race.universe?Ps("wardenclyffe",e,100,1.22):0,Copper:e=>Ps("wardenclyffe",e,500,1.22),Iron:e=>t.city.ptrait.includes("unstable")?Ps("wardenclyffe",e,75,1.22):0,Cement:e=>Ps("wardenclyffe",e,350,1.22),Sheet_Metal:e=>Ps("wardenclyffe",e,125,1.2),Nanite:e=>t.race.deconstructor?Ps("wardenclyffe",e,50,1.18):0},effect(){let e=1e3;if(t.city.ptrait.includes("magnetic")&&(e+=ns.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=`
                ${F("city_wardenclyffe_effect1",[aa(1),t.civic.scientist?t.civic.scientist.name:F("job_scientist")])}
                ${F("city_max_knowledge",[e.toLocaleString()])}
                `;if(t.city.powered){let e=t.tech.science>=7?2500:2e3;if(t.city.ptrait.includes("magnetic")&&(e+=ns.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+=`
                ${F("city_wardenclyffe_effect4",[2])}
                `),"magic"===t.race.universe&&(r+=`
                ${F("plus_max_resource",[wr(8),t.resource.Mana.name])}
                `),t.tech.broadcast){let a=t.tech.broadcast;r+=`
                ${F("city_wardenclyffe_effect3",[$(this)[0].powered(),e.toLocaleString(),a])}
                `}else r+=`
                ${F("city_wardenclyffe_effect2",[$(this)[0].powered(),e.toLocaleString()])}
                `;t.race.artifical&&(r+=`
                ${F("city_transmitter_effect",[wr(250)])}Is(2),action(){if(ii($(this)[0])){let e=1e3;if(t.city.wardenclyffe.count++,t.civic.scientist.display=!0,t.civic.scientist.max=t.city.wardenclyffe.count,ei($(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?`
                ${F("city_wizard_tower_flair")}
                `:t.race.evil?`
                ${F("city_babel_flair")}
                `:`
                ${F("city_wardenclyffe_flair1")}
                ${F("city_wardenclyffe_flair2")}
                `},biolab:{id:"city-biolab",title:F("city_biolab"),desc:`
                ${F("city_biolab_desc")}
                ${F("requires_power")}
                `,category:"science",reqs:{genetics:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("biolab",e,25e3,1.3),Knowledge:e=>Ps("biolab",e,5e3,1.3),Copper:e=>Ps("biolab",e,1250,1.3),Iron:e=>t.city.ptrait.includes("unstable")?Ps("biolab",e,160,1.3):0,Alloy:e=>Ps("biolab",e,350,1.3)},effect(){let e=3e3;return t.portal.sensor_drone&&t.tech.science>=14&&(e*=1+.02*s.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),`${F("city_max_knowledge",[e.toLocaleString()])}, ${F("minus_power",[$(this)[0].powered()])}`},powered:()=>Is(2),action(){return!!ii($(this)[0])&&(t.city.biolab.count++,ei($(this)[0])&&(t.resource.Knowledge.max+=3e3),!0)}},coal_power:{id:"city-coal_power",title:()=>t.race.environmentalist?F("city_hydro_power"):F("magic"===t.race.universe?"city_mana_engine":"city_coal_power"),desc:()=>t.race.environmentalist?`
                ${F("city_hydro_power_desc")}
                `:`
                ${F("magic"===t.race.universe?"city_mana_engine_desc":"city_coal_power_desc")}
                ${F("requires_res",[F("magic"===t.race.universe?"resource_Mana_name":"resource_Coal_name")])}
                `,category:"utility",reqs:{high_tech:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("coal_power",e,1e4,oi(1.22)),Crystal:e=>"magic"===t.race.universe?Ps("coal_power",e,125,oi(1.22)):0,Copper:e=>Ps("coal_power",e,1800,oi(1.22))-1e3,Iron:e=>t.city.ptrait.includes("unstable")?Ps("coal_power",e,175,oi(1.22)):0,Cement:e=>Ps("coal_power",e,600,oi(1.22)),Steel:e=>Ps("coal_power",e,2e3,oi(1.22))-1e3},effect(){let e="magic"===t.race.universe?.05:.35,a=-$(this)[0].powered();return t.race.environmentalist?`+${a}MW`:`+${a}MW. ${F("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),As(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!!ii($(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?F("city_wind_power"):F("city_oil_power"),desc:()=>t.race.environmentalist?`
                ${F("city_wind_power_desc")}
                `:`
                ${F("city_oil_power_desc")}
                ${F("requires_res",[F("resource_Oil_name")])}
                `,category:"utility",reqs:{oil:3},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("oil_power",e,5e4,oi(1.22)),Copper:e=>Ps("oil_power",e,6500,oi(1.22))+1e3,Iron:e=>t.city.ptrait.includes("unstable")?Ps("oil_power",e,180,oi(1.22)):0,Aluminium:e=>Ps("oil_power",e,12e3,oi(1.22)),Cement:e=>Ps("oil_power",e,5600,oi(1.22))+1e3},effect(){let e=-$(this)[0].powered();return t.race.environmentalist?`+${e}MW`:`+${e}MW. ${F("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),As(e)},p_fuel:()=>({r:"Oil",a:t.race.environmentalist?0:.65}),action(){return!!ii($(this)[0])&&(t.city.oil_power.count++,t.city.oil_power.on++,t.city.power+=6,!0)}},fission_power:{id:"city-fission_power",title:F("city_fission_power"),desc:`
                ${F("city_fission_power_desc")}
                ${F("requires_res",[F("resource_Uranium_name")])}
                `,category:"utility",reqs:{high_tech:5},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("fission_power",e,25e4,1.36),Copper:e=>Ps("fission_power",e,13500,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Ps("fission_power",e,1750,1.36):0,Cement:e=>Ps("fission_power",e,10800,1.36),Titanium:e=>Ps("fission_power",e,7500,1.36)},effect(){return`+${-$(this)[0].powered()}MW. ${F("city_fission_power_effect",[.1])}`},powered:()=>As(t.tech.uranium>=4?-18:-14),p_fuel:()=>({r:"Uranium",a:.1}),action(){return!!ii($(this)[0])&&(t.city.fission_power.count++,t.city.fission_power.on++,t.city.power+=14,!0)}},mass_driver:{id:"city-mass_driver",title:F("city_mass_driver"),desc:`
                ${F("city_mass_driver_desc")}
                ${F("requires_power")}
                `,category:"utility",reqs:{mass:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("mass_driver",e,375e3,1.32),Copper:e=>Ps("mass_driver",e,33e3,1.32),Iron:e=>Ps("mass_driver",e,42500,1.32),Iridium:e=>Ps("mass_driver",e,2200,1.32)},effect(){return`${t.tech.mass>=2?`
                ${F("city_mass_driver_effect2",[1,t.civic.scientist.name])}
                `:""}${F("city_mass_driver_effect",[t.race.truepath?6:5,cn("name")])} ${F("minus_power",[$(this)[0].powered()])}`},powered(){let e=t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=4?4:5;return Is(t.tech.mass>=2?e-1:e)},action(){return!!ii($(this)[0])&&(t.city.mass_driver.count++,ei($(this)[0]),!0)}},replicator:{id:"city-replicator",title:F("tech_replicator"),desc:F("tech_replicator"),category:"utility",reqs:{special_hack:1},cost:{},wiki:!1,effect:()=>"fake structure",powered:()=>1,action:()=>!1}},tech:Mr(),arpa:qe("PhysicsTech"),genes:qe("GeneTech"),blood:qe("BloodTech"),space:It(),interstellar:qt,galaxy:Ot,starDock:{probes:{id:"starDock-probes",title:F("star_dock_probe"),desc:()=>`
                ${F("star_dock_probe_desc")}
                `,reqs:{genesis:4},cost:{Money:e=>Ps("probes",e,35e4,t.race.truepath?1.125:1.25,"starDock"),Alloy:e=>Ps("probes",e,75e3,t.race.truepath?1.125:1.25,"starDock"),Polymer:e=>Ps("probes",e,85e3,t.race.truepath?1.125:1.25,"starDock"),Iridium:e=>Ps("probes",e,12e3,t.race.truepath?1.125:1.25,"starDock"),Mythril:e=>Ps("probes",e,3500,t.race.truepath?1.125:1.25,"starDock")},effect:()=>`
                ${F("star_dock_probe_effect")}
                `,action(){return!!ii($(this)[0])&&(t.starDock.probes.count++,!0)}},geck:{id:"starDock-geck",title:F("tech_geck"),desc:()=>`
                ${F("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=>Ps("geck",e,1e6,1.25,"starDock"),Elerium:e=>Ps("geck",e,1e3,1.25,"starDock"),Plasmid:e=>Ps("geck",e,25,1.4,"starDock")},effect:()=>`
                ${F("star_dock_geck_effect")}
                `,action(){return!!ii($(this)[0])&&(t.starDock.geck.count++,!0)}},seeder:{id:"starDock-seeder",title:()=>t.race.cataclysm?F("star_dock_exodus"):F("star_dock_seeder"),desc(){let e=t.race.cataclysm?F("star_dock_exodus"):F("star_dock_seeder");return t.starDock.seeder&&t.starDock.seeder.count>=100?`
                ${e}
                ${F("star_dock_seeder_desc2")}
                `:`
                ${e}
                ${F("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?F("star_dock_seeder_status1",[100-a]):F("star_dock_seeder_status2");return`
                ${t.race.cataclysm?F("star_dock_exodus_effect"):F("star_dock_seeder_effect")}
                ${r}
                `},action(){return!!(t.starDock.seeder.count<100&&ii($(this)[0]))&&(t.starDock.seeder.count++,t.starDock.seeder.count>=100&&(t.tech.genesis=6,ds("starDock-seeder"),Cs($("#modalBox")),li(Sr.space.spc_gas.star_dock,"star_dock")),!0)}},prep_ship:{id:"starDock-prep_ship",title:F("star_dock_prep"),desc:()=>`
                ${t.race.cataclysm?F("star_dock_prep_cata_desc"):F("star_dock_prep_desc")}
                ${F("star_dock_genesis_desc2")}
                `,reqs:{genesis:6},queue_complete:()=>0,cost:{},effect(){let e=Ns("bioseed"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name");return`
                ${t.race.cataclysm?F("star_dock_prep_cata_effect"):F("star_dock_prep_effect")}
                ${F("star_dock_genesis_effect2",[e.plasmid,a])}
                ${F("star_dock_genesis_effect3",[e.phage])}
                `},action:()=>(t.tech.genesis=7,ds("starDock-prep_ship"),Cs($("#modalBox")),li(Sr.space.spc_gas.star_dock,"star_dock"),!0)},launch_ship:{id:"starDock-launch_ship",title:F("star_dock_genesis"),desc:()=>`
                ${t.race.cataclysm?F("star_dock_prep_cata_effect"):F("star_dock_genesis_desc1")}
                ${F("star_dock_genesis_desc2")}
                `,reqs:{genesis:7},queue_complete:()=>0,cost:{},effect(){let e=Ns("bioseed"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name");return`
                ${t.race.cataclysm?F("star_dock_genesis_cata_effect1"):F("star_dock_genesis_effect1")}
                ${F("star_dock_genesis_effect2",[e.plasmid,a])}
                ${F("star_dock_genesis_effect3",[e.phage])}
                `},action:()=>(function(){t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),M(),$s("reset",{end:"bioseed"});let a=t.race.species,r=t.race.gods,i=Di[a].type,s=t.city.calendar.orbit,n=t.city.biome,c=t.city.ptrait,o=Ns("bioseed");t.stats.bioseed++,sn(),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),Pn("seeder"),Pn(`biome_${n}`),c.forEach((function(e){ns.hasOwnProperty(e)&&Pn(`atmo_${e}`)})),Pn(`genus_${i}`),t.race.truepath&&Pn("exodus"),c.includes("dense")&&"heavy"===t.race.universe&&Pn("double_density"),t.race.junker&&"junker"===t.race.species&&jn("organ_harvester"),"hellscape"===t.city.biome&&"demonic"!==Di[t.race.species].type&&jn("ill_advised"),void 0===t.tech.world_control&&Pn("cult_of_personality"),t.race.cataclysm&&Pn("iron_will",!1,5),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&Pn("gross");let l=0,_=0;Object.keys(t.city.geology).forEach((function(e){t.city.geology[e]>0?l++:t.city.geology[e]<0&&_++})),l>=4&&Pn("miners_dream"),_>=3&&jn("rocky_road"),t.race.steelen&&t.race.steelen>=1&&Pn("steelen"),"micro"===t.race.universe&&(t.race.small||t.race.compact?Pn("macro",!0):Pn("marble",!0)),Cn();let d=!!t.race.hasOwnProperty("srace")&&t.race.srace,p=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0,u=t.starDock.probes.count+1,h=t.starDock.hasOwnProperty("geck")?t.starDock.geck.count:0;t.stats.achieve.explorer&&(u+=t.stats.achieve.explorer.l),t.race={species:"protoplasm",gods:a,old_gods:r,universe:t.race.universe,seeded:!0,probes:u,geck:h,seed:Math.floor(g(1e4)),ascended:!1},p>0&&(t.race.corruption=p),d&&(t.race.srace=d),U({orbit:s,biome:n,ptrait:c,geology:!1}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}(),!1)}},portal:ua(),tauceti:He};function Cr(){let a=$("#evolution .evolving").nextAll();Object.values(a).forEach((function(e){Cs($(e),!0)})),Cs($("#evolution .evolving"),!0),t.evolution.bunker={count:1},ai(Sr.evolution.bunker.id),_i(),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($(`

                ${F("evo_challenge_genes")}

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

                ${F("evo_challenge_run")}

                `)),e.append($(`
                ${F("evo_challenge_run_desc")}
                `))}(),Zr("evolution","joyless"),Zr("evolution","steelen"),(t.stats.achieve.whitehole||t.sim)&&Zr("evolution","decay"),(t.stats.achieve.ascended||t.sim)&&Zr("evolution","emfield"),(t.stats.achieve.scrooge||t.sim)&&Zr("evolution","inflation"),((t.stats.achieve.ascended||t.stats.achieve.corrupted)&&t.stats.achieve.extinct_junker||t.sim)&&Zr("evolution","sludge"),(t.stats.achieve.whitehole||t.stats.achieve.ascended||t.sim)&&Zr("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)&&Zr("evolution","witch_hunter"),"evil"===t.race.universe&&(t.stats.achieve.corrupted&&t.stats.achieve.corrupted.e||t.sim),t.hasOwnProperty("beta")&&!t.sim&&Zr("evolution","simulation"),function(){let e=$('
                ');$("#evolution").append(e),e.append($(`

                ${F("evo_scenario")}

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

                ${F("evo_challenge_simulation")}

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

                ${F("evo_challenge_simulation")}

                `)),e.append($(`
                ${F("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($(`
                ${F(`resource_${e}_name`)}
                `))})),zs({el:"#simSection",data:t.race.simConfig})}()}function zr(e,a){let r=t.race.orbit_decay?"orbit_decayed":"cataclysm",i=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 i({id:`${a}-bonfire`,title:F("city_bonfire"),desc:F("city_bonfire_desc"),category:"outskirts",wiki:!1,reqs:{primitive:3},condition:()=>on("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${F("city_bonfire_effect3",[a.toLocaleString()])}
                ${F("city_bonfire_effect4",[(+t.resource.Thermite.amount.toFixed(0)).toLocaleString(),a.toLocaleString()])}
                `:"";return`
                ${F("city_bonfire_effect",[t.resource.Thermite.diff])}
                ${F("city_bonfire_effect2",[+e.toFixed(1)])}
                ${r}`},action:()=>!1,flair:()=>F("city_bonfire_flair")},r,a);case"firework":return i({id:`${a}-firework`,title:F("city_firework"),desc:F("city_firework"),category:"outskirts",wiki:!1,reqs:{mining:3},condition:()=>on("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?F("city_firework_build"):F("city_firework_effect"),action(){return!(0!==t[a].firework.count||!ii($(this)[0])||(t[a].firework.count=1,0))}},r,a);case"assembly":{let e=function(e){let a=$e(e);return t.race.promiscuous&&(a/=1+Ki.promiscuous.vars()[1]*t.race.promiscuous),Math.round(a)};return i({id:`${a}-assembly`,title:F("city_assembly"),desc:()=>F("city_assembly_desc",[Di[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?Ps("citizen",a,e(125),1.01):0,Copper:a=>t.race.deconstructor?0:t.resource[t.race.species].amount>=5?Ps("citizen",a,e(50),1.01):0,Aluminium:a=>t.race.deconstructor?0:t.resource[t.race.species].amount>=5?Ps("citizen",a,e(50),1.01):0,Nanite:a=>t.race.deconstructor&&t.resource[t.race.species].amount>=3?Ps("citizen",a,e(500),1.01):0},effect(){let e="";return t.resource[t.race.species].max===t.resource[t.race.species].amount&&(e=`
                ${F("city_assembly_effect_warn")}
                `),`
                ${F("city_assembly_effect",[Di[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&&ii($(this)[0]))&&(t.resource[t.race.species].amount++,!0)}},r,a)}case"nanite_factory":return i({id:`${a}-nanite_factory`,title:F("city_nanite_factory"),desc:F("city_nanite_factory"),category:"industrial",reqs:{},trait:["deconstructor"],region:"city",cost:{Money:e=>Ps("nanite_factory",e,25e3,oi(1.25)),Copper:e=>Ps("nanite_factory",e,1200,oi(1.25)),Steel:e=>Ps("nanite_factory",e,1e3,oi(1.25))},effect(){let e=wr(2500);return`
                ${F("city_nanite_factory_effect",[t.resource.Nanite.name])}
                ${F("plus_max_resource",[e,t.resource.Nanite.name])}.
                `},special:!0,action(){return!!ii($(this)[0])&&(t.city.nanite_factory.count++,t.settings.showIndustry=!0,$i(),!0)},flair:F("city_nanite_factory_flair")},r,a);case"captive_housing":return i({id:`${a}-captive_housing`,title:F("city_captive_housing"),desc:F("city_captive_housing_desc"),category:"residential",reqs:{unfathomable:1},trait:["unfathomable"],region:"city",cost:{Money:e=>Ps("captive_housing",e,40,1.35),Lumber:e=>Ps("captive_housing",e,30,1.35),Stone:e=>Ps("captive_housing",e,18,1.35)},effect(){let e="";t.race.artifical||t.race.detritivore||t.race.carnivore||t.race.soul_eater||(e+=`
                ${F("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${F("city_captive_housing_broken",[Di[i].name,s])}`,e+=`
                ${F("city_captive_housing_untrained",[Di[i].name,n])}
                `}return e+=`
                ${F("city_captive_housing_capacity",[a,t.city.hasOwnProperty("captive_housing")?t.city.captive_housing.raceCap:0])}
                `,t.tech.unfathomable&&t.tech.unfathomable>=2&&(e+=`
                ${F("plus_max_resource",[1,F("job_torturer")])}
                `),e},action(){if(ii($(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 i({id:`${a}-horseshoe`,title:()=>F(`city_${mn(!0)}`,[mn(!1)]),desc:()=>F(`city_${mn(!0)}_desc`,[mn(!1)]),category:"outskirts",reqs:{primitive:3},condition:()=>t.race.hooved||on("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)*(Ki.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)*(Ki.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*(Ki.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*(Ki.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*(Ki.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)*(Ki.hooved.vars()[0]/100)):0}},action(){return!(t.race.hooved||!on("fool",2023))||!(!t.resource.Horseshoe.display||!ii($(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 Fr(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 Ar=["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(Ar.forEach((e=>Sr.evolution[e]={id:`evolution-${e}`,title:()=>Di[e].name,desc:()=>`${F("evo_evolve")} ${Di[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_${Di[e].type}`]>=2&&100===t.evolution.final&&!t.race.evoFinalMenu,cost:{RNA:()=>320,DNA:()=>320},race:!0,effect:()=>`${"string"==typeof Di[e].desc?Di[e].desc:Di[e].desc()} ${F("evo_complete")}`,action(){if(ii($(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,Lr(),!0;t.race.species=e,mi()}(e);t.race.species=e,mi()}return!1},queue_complete:()=>t.tech.evo&&7===t.tech.evo?1:0,emblem:()=>Ys(`extinct_${e}`)})),Object.keys(t.stats.synth).length>1){let e=nn(Ar);e.push("junker"),e.push("sludge"),e.forEach((e=>Sr.evolution[`s-${e}`]={id:`evolution-s-${e}`,title:()=>Di[e].name,desc:()=>`${F("evo_imitate")} ${Di[e].name}`,reqs:{evo:8},grant:["evo",9],condition:()=>t.stats.synth[e]&&t.race.evoFinalMenu,cost:{},race:!0,effect:()=>F("evo_imitate_race",[Di[e].name]),action:()=>(t.stats.synth[e]&&(t.race.species=t.race.evoFinalMenu,t.race.srace=e,mi()),!1),queue_complete:()=>t.tech.evo&&8===t.tech.evo?1:0}))}const Ir={plasmid:"no_plasmid",mastery:"weak_mastery",trade:"no_trade",craft:"no_craft",crispr:"no_crispr",nerfed:"nerfed",badgenes:"badgenes"};Object.keys(Ir).forEach((e=>Sr.evolution[e]={id:`evolution-${e}`,title:F(`evo_challenge_${e}`),desc:F(`evo_challenge_${e}`),condition:()=>t.evolution.hasOwnProperty(e),cost:{DNA:()=>10},challenge:!0,effect:()=>Er(e),action(){return ii($(this)[0])&&(t.race[Ir[e]]?(delete t.race[Ir[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[Ir[e]]=1,$(`#${$(this)[0].id}`).addClass("hl")),Cr(),Mn()),!1},highlight:()=>!!t.race[Ir[e]],queue_complete:()=>0}));const Tr={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 Lr(){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){Cs($(e),!0)})),Cs($("#evolution .evolving"),!0)}Object.keys(Sr.evolution).forEach((function(e){if(!Sr.evolution[e].challenge){ai(Sr.evolution[e].id);var a=!0;Sr.evolution[e].hasOwnProperty("reqs")&&Object.keys(Sr.evolution[e].reqs).forEach((function(r){(!t.tech[r]||t.tech[r]=2&&_i(),t.tech.evo_challenge&&Cr())}}function Er(e){switch(e){case"nerfed":return F(`evo_challenge_${e}_effect`,"antimatter"===t.race.universe?["20%","50%","50%","33%"]:["50%","20%","50%","33%"]);case"badgenes":return F(`evo_challenge_${e}_effect`,[1,2]);case"orbit_decay":return Ls()>=100?`
                ${F("evo_challenge_orbit_decay_effect",[5e3])}
                ${F("evo_challenge_scenario_failwarn")}
                `:`
                ${F("evo_challenge_orbit_decay_effect",[5e3])}
                ${F("evo_challenge_scenario_failwarn")}
                ${F("evo_challenge_scenario_warn")}
                `;case"junker":return"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                ${F("evo_challenge_junker_effect")}
                ${F("evo_warn_unwise")}
                `:F("evo_challenge_junker_effect");case"cataclysm":return Ls()>=50?`
                ${F("evo_challenge_cataclysm_effect")}
                ${F("evo_challenge_cataclysm_warn")}
                `:`
                ${F("evo_challenge_cataclysm_effect")}
                ${F("evo_challenge_scenario_warn")}
                `;default:return F(`evo_challenge_${e}_effect`)}}function Kr(){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=ta(t.civic.professor.workers,"professor")*("antimatter"===t.race.universe?.02:.04);t.race.high_pop&&(e=$e(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=$e(e)),a+=e*ta(t.civic.priest.workers,"priest")}"antimatter"===t.race.universe&&(a/=2),t.race.spiritual&&(a*=1+Ki.spiritual.vars()[0]/100);let r=as("seraph");if(r>0&&(a*=1+Ki.spiritual.vars(1)[0]/100*r),"theocracy"===t.civic.govern.type&&(a*=1+ee.theocracy()[0]/100),t.race.ooze&&(a*=1-Ki.ooze.vars()[1]/100),a=+a.toFixed(3),e=`
                ${F("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=$e(e)),a+=e*ta(t.civic.priest.workers,"priest")}e+=`
                ${F("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*ta(t.civic.professor.workers,"professor");t.race.high_pop&&(e=$e(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=$e(e)),a+=e*ta(t.civic.priest.workers,"priest")}t.race.spiritual&&(a*=1+Ki.spiritual.vars()[0]/100);let r=as("seraph");r>0&&(a*=1+Ki.spiritual.vars(1)[0]/100*r),"theocracy"===t.civic.govern.type&&(a*=1+ee.theocracy()[0]/100),t.race.ooze&&(a*=1-Ki.ooze.vars()[1]/100),t.race.orbit_decayed&&t.race.truepath&&(a*=.1),a=+a.toFixed(3),e=`
                ${F("city_temple_effect2",[a])}
                `}return t.tech.fanaticism&&t.tech.fanaticism>=3&&(e+=`
                ${F("city_temple_effect3")}
                `),t.tech.anthropology&&t.tech.anthropology>=4&&(e+=`
                ${t.race.truepath?F("city_temple_effect_tp",[2,25]):F("city_temple_effect4")}
                `),e}function Dr(){let e=t.tech.gambling>=3?6e4:4e4;t.tech.gambling>=5&&(e+=t.tech.gambling>=6?24e4:6e4),e=wr(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?"":`
                ${F("city_max_entertainer",[aa(1)])}
                `,r=t.race.orbit_decayed||t.tech.isolation?`
                ${F("plus_max_resource",[aa(1),F("banker_name")])}
                `:"",i=`
                ${F("plus_max_resource",[`$${e.toLocaleString()}`,F("resource_Money_name")])}
                ${a}${r}
                ${F("city_max_morale",[1])}
                `,s=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&&(s*=t.tech.gambling>=5?2:1.5),t.tech.stock_exchange&&t.tech.gambling>=4&&(s*=1+.01*t.tech.stock_exchange),"corpocracy"===t.civic.govern.type&&(s*=3),"socialist"===t.civic.govern.type&&(s*=.8),t.race.inflation&&(s*=1+t.race.inflation/1250),t.tech.isolation&&(s*=1.25,t.tech.iso_gambling&&(s*=1+.05*ta(t.civic.banker.workers,"banker"))),s=+s.toFixed(2),i+=`
                ${F("tech_casino_effect2",[s])}
                `,i}function Br(e,a,r,i){return((t.evolution.hasOwnProperty(e)?t.evolution[e].count:0)+(i||0))*r+a}function Gr(e){return t.stats.achieve.blackhole&&(e*=1+.05*t.stats.achieve.blackhole.l),Math.round(e)}function Nr(){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+Ki.pack_rat.vars()[1]/100);let a=as("kobold");return a>0&&(e*=1+Ki.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*_/100),e}function Rr(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(Sr.city[e].hasOwnProperty("path")&&!Sr.city[e].path.includes(a))return!1;var r=!0;return Object.keys(Sr.city[e].reqs).forEach((function(a){(!t.tech[a]||t.tech[a]=3&&(i=!0,t.r_queue.queue.forEach((function(e){Ur(e.type,!1)&&(a[Sr[e.action][e.type].grant[0]]={v:Sr[e.action][e.type].grant[1],a:e.type})})),Object.keys(s).forEach((function(r){let s=t.tech[r]||0;Hr(r,t.tech[r])||(!a[r]||a[r].vs+1)&&(i=!1)}))),!(!r&&!i||t.tech[Sr.tech[e].grant[0]]&&!(t.tech[Sr.tech[e].grant[0]]`).appendTo("#city").append(`

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

                `),e[a].forEach((function(e){Zr("city",e)})),_s(`dist-${a}`,(function(){return F(`city_dist_${a}_desc`)}),{elm:`#city-dist-${a} h3`,classes:"has-background-light has-text-dark"})}}))}function Jr(){if(!t.settings.tabLoad&&3!==t.settings.civTabs)return;let e={},a={},r={},i=[],s=[],n=[];["primitive","civilized","discovery","industrialized","globalized","early_space","deep_space","interstellar","intergalactic"].forEach((function(e){r[e]=[]}));const c={interstellar:"solar"};let o={};Object.keys(Sr.tech).forEach((function(l){if(!function(e){let a=t.race.truepath?"truepath":"standard";return!(!Or[a].includes(Sr.tech[e].era)&&!Sr.tech[e].hasOwnProperty("path")||Sr.tech[e].hasOwnProperty("path")&&!Sr.tech[e].path.includes(a))}(l))return;ai(Sr.tech[l].id);let _=function(e){let a=Sr.tech[e].grant[0];if(t.tech[a]&&t.tech[a]>=Sr.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=Sr.tech[l],p="category"in d?d.category:"research";if(_||-1!==i.indexOf(p)||i.push(p),_&&-1===s.indexOf(p)&&s.push(p),-1===n.indexOf(p)&&n.push(p),!0===_)p in a||(a[p]=[]),a[p].push(l);else{let a=Sr.tech[l];if(!Vr(a))return;let i=Ur(l,o);if(!i)return;p in e||(e[p]=[]);let s=t.race.truepath&&c[a.era]?c[a.era]:a.era;r.hasOwnProperty(s)||(r[s]=[]),r[s].push({t:l,p:"precog"===i})}})),Cs($("#tech")),Object.keys(r).forEach((function(e){r[e].length>0&&($("#tech").append(`

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

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

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

                `);let t=Zs(4,12,!1);t.length>0&&"science"===e&&$("#tech-dist-old-science h3").append(t),a[e].forEach((function(e){Zr("tech",e,!0,!1)}))}))}function Zr(e,t,a,r){Xr(Sr[e][t],e,t,a,r)}function Xr(e,a,r,i,s){if(!1===Vr(e))return;let n=a;"outerSol"===a&&(a="space"),e.region&&(a=e.region),e.powered&&!t[a][r].on&&(t[a][r].on=0);let c=e.id;ai(c);let o="";s&&e&&e.reqs&&Object.keys(e.reqs).forEach((function(e){s[e]&&(o+=` data-req-${e}="${s[e].a}"`)}));let l,_=e.highlight&&e.highlight()?$(`
                `):$(`
                `);if(si(e,!1,["genes","blood"].includes(a))||_.addClass("cna"),si(e,!0,["genes","blood"].includes(a))||_.addClass("cnam"),i)l=$('{{ title }}');else{let t="",r="";if(e.cost){let i="genes"!==a&&"blood"!==a?Rs(e):e.cost;Object.keys(i).forEach((function(e){let a=i[e]();a>0&&(t+=` res-${e}`,r+=` data-${e}="${a}"`)}))}let i="";e.class&&(i="function"==typeof e.class?` ${e.class()}`:` ${e.class}`),s&&(i=" precog");let n=e.highlight?e.highlight()?`${F("active")}`:`${F("not_active")}`:"";l=$(`${n}{{ title }} description`)}if(_.append(l),e.hasOwnProperty("special")&&("function"==typeof e.special&&e.special()||!0===e.special)){let e=$('
                \n \n
                ');_.append(e)}if(e.on||e.off){if(e.on){let e=$('');_.append(e)}if(e.off){let e=$('');_.append(e)}}else if(e.powered&&t.tech.high_tech&&t.tech.high_tech>=2&&Wr(e)||e.switchable&&e.switchable()){let t=$(``),a=$(``);_.append(t),_.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($('
                ')),i?$("#oldTech").append(_):$("#"+n).append(_),"tech"!==a&&t[a]&&t[a][r]&&0===t[a][r].count&&($(`#${c} .count`).css("display","none"),$(`#${c} .special`).css("display","none"),$(`#${c} .on`).css("display","none"),$(`#${c} .off`).css("display","none")),e.emblem){let t=e.emblem();_.append($(t))}let d={template:''};zs({el:"#"+c,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)||Yr(e,a,r)},describe(){P(function(e,a){let r="string"==typeof e.desc?e.desc:e.desc();if(r+=". ",e.cost&&!a){r=si(e)?r+F("affordable")+". ":r+F("not_affordable")+". ",r+="Costs: ";let a=e.id.split("-")[0];var i="genes"!==a&&"blood"!==a?Rs(e):e.cost;Object.keys(i).forEach((function(e){if("Custom"===e){let t=i[e]();r+=t.label}else if("Structs"===e){let a=i[e]();Object.keys(a).forEach((function(e){Object.keys(a[e]).forEach((function(i){let s="";if(a[e][i].hasOwnProperty("s")){let t=a[e][i].s;s="string"==typeof Sr[e][t][i].title?Sr[e][t][i].title:Sr[e][t][i].title()}else s="string"==typeof Sr[e][i].title?Sr[e][i].title:Sr[e][i].title();r+=`${s}. `,t[e][i]?a[e][i].count>t[e][i].count?r+=`${F("insufficient")} ${s}. `:a[e][i].hasOwnProperty("on")&&a[e][i].on>t[e][i].on&&(r+=`${F("insufficient")} ${s} enabled. `):r+=`${F("insufficient")} ${s}. `}))}))}else if(t.prestige.hasOwnProperty(e)){let a=i[e]();if(a>0){"Plasmid"===e&&"antimatter"===t.race.universe&&(e="AntiPlasmid");let i=F(`resource_${e}_name`);r+=`${i}: ${a}. `,t.prestige[e].count0){let i=F(`resource_${e}_name`);r+=`${i}: ${a}. `,t.portal.purifier.supply0){let e="Money"===s?"$":t.resource[s].name+": ";e=e.replace("_"," ");let i=q(a,1);r+=`${e}${i}. `,t.resource[s].amount0&&(clearInterval(t),li(e,r))}),50)}},on_label:()=>`on: ${t[a][r].on}`,off_label:()=>"off: "+(t[a][r].count-t[a][r].on),power_on(){let i=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,i){let s=t[a][r].count-e;if("city-casino"===i&&!t.race.cataclysm&&!t.race.orbit_decayed||"space-spc_casino"===i&&(t.race.cataclysm||t.race.orbit_decayed)||"tauceti-tauceti_casino"===i&&t.tech.isolation){let e=Js(5,12);if(0===s&&e.length>0)return e}return s},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=Js(12,12);if(0===e&&t.length>0)return t}else if("city-garrison"===a||"space-space_barracks"===a){let t=Zs(1,14,!0);if(e===("city-garrison"===a?13:0)&&t.length>0)return t}return e},title:e=>e,options:e=>F("action_options",[e])}}),_s(c,(function(){}),{in:function(s){ti(s.popper,e,t[a][r],i,a,r)},out:function(){zs({el:"#popTimer"},"destroy")},attach:"starDock"===a?"body .modal":"#main",wide:e.wide})}function Yr(e,a,r){if("spcdock-launch_ship"===e.id)e.action();else switch(a){case"tech":if(t.settings.qKey&&y.q||!Ur(r,!1)||!e.action()){if((!e.no_queue||!e.no_queue())&&t.tech.r_queue&&t.r_queue.queue.length0){let o=t.settings.qKey?i:1;o>t.queue.max-s&&(o=t.queue.max-s);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(c,l*o):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(c,l*o),qs:l,t_max:0,bres:!1});else for(let i=0;i0;i++)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(c,l),qs:l,t_max:0,bres:!1}),c-=l;n=!0}}break}t.race.inflation&&t.tech.primitive&&(e.hasOwnProperty("inflation")&&!e.inflation||t.race.inflation++),s=!0}if(s&&(function(e,a,r){if(!si(e)){let t=e.id;$(`#${t}`).addClass("cna")}if(e.grant){let a=e.grant[0];(!t.tech[a]||t.tech[a]a?(s.q=a,a=0):a-=s.q)}}n&&bs();break}}}function ei(e,a){let r=e.id.split("-");if(t.hasOwnProperty(r[0])&&t[r[0]].hasOwnProperty(r[1])&&e.hasOwnProperty("powered")){let i=t.city.power;return 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&&(i+=t.race.replicator.pow),!(t.city.hasOwnProperty("powered")&&i>=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 ti(e,a,r,i,s,n,c){Cs(e);var o="string"==typeof a.desc?a.desc:a.desc();c=c||!1;let l=!1;!(s&&n&&"ontouchstart"in document.documentElement&&navigator.userAgent.match(/Mobi/)&&t.settings.touch)||(l=$(`${a.hasOwnProperty("touchlabel")?a.touchlabel:F("construct")}`),e.append(l),$("#touchButton").on("touchstart",(function(){Yr(a,s,n)}))),e.append($(`
                ${o}
                `));let _=a.id.split("-")[0];a.category&&"tech"===_&&!i&&e.append($(`
                ${F("tech_dist_category")}: ${F(`tech_dist_${a.category}`)}
                `));let d=Ms(a,!1,!0);if(a.cost&&!i){let r=!0;var p=$('
                '),u="genes"!==_&&"blood"!==_?Rs(a):a.cost;Object.keys(u).forEach((function(e){if("Custom"===e){let t=u[e]();p.append($(`
                ${t.label}
                `)),r=!1}else if("Structs"===e){let a=u[e]();Object.keys(a).forEach((function(e){Object.keys(a[e]).forEach((function(i){let s=a[e][i].hasOwnProperty("on")?a[e][i].on:a[e][i].count,n="has-text-dark",c="";t[e][i]?a[e][i].count>t[e][i].count?(n="has-text-danger",c=' (blocking resource)'):a[e][i].hasOwnProperty("on")&&a[e][i].on>t[e][i].on&&(n="has-text-alert"):(n="has-text-danger",c=' (blocking resource)');let o="";if(a[e][i].hasOwnProperty("s")){let t=a[e][i].s;o="string"==typeof Sr[e][t][i].title?Sr[e][t][i].title:Sr[e][t][i].title()}else o="string"==typeof Sr[e][i].title?Sr[e][i].title:Sr[e][i].title();r=!1,p.append($(`
                ${o}: ${s}${c}
                `))}))}))}else if(t.prestige.hasOwnProperty(e)){let a=u[e]();if(a>0){"Plasmid"===e&&"antimatter"===t.race.universe&&(e="AntiPlasmid");let i=F(`resource_${e}_name`),s="has-text-dark",n="";t.prestige[e].count(blocking resource)'),r=!1,p.append($(`
                ${i}: ${a}${n}
                `))}}else if("Supply"===e){let a=u[e]();if(a>0){let i=F(`resource_${e}_name`),s="has-text-dark",n="";t.portal.purifier.supply(blocking resource)'),r=!1,p.append($(`
                ${i}: ${a}${n}
                `))}}else if("Morale"!==e&&"Army"!==e&&"Bool"!==e){let a=u[e]();if(a>0){let i="",s="Species"===e?t.race.species:e;if("HellArmy"===e){let n=F("fortress_troops"),c="has-text-dark";t.portal.fortress.garrison-t.portal.fortress.patrols*t.portal.fortress.patrol_size(blocking resource)'):c="has-text-alert"),r=!1,p.append($(`
                ${n}: ${a}${i}
                `))}else{let i="Money"===s?"$":t.resource[s].name+": ";i=i.replace("_"," ");let n="has-text-dark",o="";t.resource[s].amount(blocking resource)'):n="has-text-alert",c&&c!==e&&d.r===s?(n+=" grad-from-left",o=' (first blocking resource)'):c&&c===e&&d.r!==s&&(n+=" grad-from-left-warn")):c&&c===e&&(n+=" grad-from-right",o=' (last blocking resource)');let l=q(a,1);r=!1,p.append($(`
                ${i}${l}${o}
                `))}}}})),r||e.append(p)}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 Sr.tech[r].title?Sr.tech[r].title:Sr.tech[r].title())})),t.length>0){let a=t.join(", ");e.append($(`
                ${F("requires_tech",[a])}
                `))}}if(!i&&"blood"!==a.id.substring(0,5)&&!si(a)&&si(a,!0)){if("string"==typeof r&&"notimer"===r)return;if(r&&r.time)e.append($('
                {{ time | timer }}
                ')),zs({el:"#popTimer",data:r,filters:{timer:e=>F("action_ready",[e])}});else{let t=Fs(d.t);e.append($(`
                ${F("action_ready",[t])}
                `))}}("portal-spire"===a.id||"portal-waygate"===a.id&&t.tech.waygate>=2)&&r&&r.time&&(e.append($('
                {{ time | timer }}
                ')),zs({el:"#popTimer",data:r,filters:{timer:e=>F("floor_clearing",[!a.hasOwnProperty("mscan")||a.hasOwnProperty("mscan")&&a.mscan()>0?e:"???"])}}))}function ai(e){Cs($(`#${e}`),!0),ds(e)}function ri(e,a,r){var i=e.id;t[a]&&t[a][r]&&t[a][r].count&&($(`#${i} .count`).html(t[a][r].count),t[a][r]&&t[a][r].count>0&&($(`#${i} .count`).css("display","inline-block"),$(`#${i} .special`).css("display","block"),$(`#${i} .on`).css("display","block"),$(`#${i} .off`).css("display","block"))),$("#popper").data("id")===i&&ti($("#popper"),e,t[a][r],!1,a,r)}function ii(e,a){return!!ni(a=a||Rs(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](),i="Species"===e?t.race.species:e;t.resource[i].amount-=r,"Knowledge"===i&&(t.stats.know+=r)}})),!0)}function si(e,a,r){if(e.cost){let n=r?e.cost:Rs(e);return a?(i=n,s=!0,Object.keys(i).forEach((function(e){if("Custom"===e);else if("Structs"===e){if(!ci(i[e]()))return void(s=!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(s=!1)}})),s):ni(n)}var i,s;return!0}function ni(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(!ci(e[r]()))return void(a=!1)}else if(t.prestige.hasOwnProperty(r)){let i=r;if("Plasmid"===r&&"antimatter"===t.race.universe&&(r="AntiPlasmid"),t.prestige[r].count=0&&i>t.resource[s].max;if(i>Number(t.resource[s].amount)+t.resource[s].diff||n)return void(a=!1)}})),a}function ci(e){let a=!0;return Object.keys(e).forEach((function(r){t.hasOwnProperty(r)?Object.keys(e[r]).forEach((function(i){t[r].hasOwnProperty(i)?(t[r][i].count${r}

                `));var i=$('
                ');switch($("#modalBox").append(i),a){case"smelter":case"hell_smelter":case"stellar_forge":case"hell_forge":case"geothermal":case"ore_refinery":ki("smelter",i);break;case"factory":case"red_factory":case"int_factory":case"tau_factory":ki("factory",i);break;case"star_dock":!function(e){if(t.tech.genesis<4){let t=$(`
                ${F("stardock_warn")}
                `);return void e.append(t)}let a=$('
                ');e.append(a),Xr(Sr.starDock.probes,"starDock","probes"),t.tech.geck&&t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=5&&Xr(Sr.starDock.geck,"starDock","geck"),t.tech.genesis>=5&&Xr(Sr.starDock.seeder,"starDock","seeder"),6===t.tech.genesis&&Xr(Sr.starDock.prep_ship,"starDock","prep_ship"),t.tech.genesis>=7&&Xr(Sr.starDock.launch_ship,"starDock","launch_ship")}(i);break;case"mining_droid":ki("droid",i);break;case"g_factory":case"refueling_station":ki("graphene",i);break;case"freighter":case"super_freighter":Ja(i);break;case"pylon":ki("pylon",i);break;case"rock_quarry":ki("rock_quarry",i);break;case"titan_mine":ki("titan_mine",i);break;case"mining_ship":ki("mining_ship",i);break;case"alien_space_station":ki("alien_space_station",i);break;case"nanite_factory":ki("nanite_factory",i);break;case"alien_outpost":ki("replicator",i)}}function _i(){Cs($("#evolution .evolving"),!0);let e=$(`
                ${t.evolution.final}%
                `);$("#evolution").append(e)}function di(){return"magic"===t.race.universe?F("city_wizard_tower_title"):t.race.evil?F("city_babel_title"):F("city_wardenclyffe")}function pi(){switch(t.race.species){case"orc":return F("city_basic_housing_orc_title");case"wolven":return F("city_basic_housing_wolven_title");case"sporgar":return F("city_basic_housing_sporgar_title");case"dracnid":case"balorg":return F("city_basic_housing_title7");case"imp":return F("city_basic_housing_title8");case"seraph":return F("city_basic_housing_seraph_title");case"unicorn":return F("city_basic_housing_unicorn_title")}switch(Di[t.race.species].type){case"avian":return F("city_basic_housing_nest_title");case"plant":return F("city_basic_housing_entish_title");case"sand":return F("city_basic_housing_sand_title");case"polar":return F("city_basic_housing_polar_title");case"eldritch":return F("city_basic_housing_eldritch_title")}return t.city.ptrait.includes("trashed")?F("city_basic_housing_trash_title"):F("city_basic_housing_title")}function ui(e,a){switch(e){case"small":return pi();case"medium":return function(){switch(t.race.species){case"sporgar":return F("city_cottage_title2");case"balorg":return F("city_cottage_title3");case"imp":return F("city_basic_housing_title7");case"seraph":return F("city_cottage_title4");case"unicorn":return F("city_cottage_title5");case"dracnid":return F("city_cottage_title7")}switch(Di[t.race.species].type){case"avian":return F("city_cottage_title6");case"eldritch":return F("city_cottage_title8")}return F("city_cottage_title1")}();case"large":return function(e){if(!e&&D("extravagant",0))return F("city_mansion");if("sporgar"===t.race.species)return F("city_apartment_title2");switch(Di[t.race.species].type){case"avian":return F("city_apartment_title5");case"sand":return F("city_apartment_title6");case"demonic":return F("city_apartment_title3");case"angelic":return F("city_apartment_title4");case"giant":return F("city_apartment_title7");case"eldritch":return F("city_apartment_title8")}return F("city_apartment_title1")}(a)}}function hi(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(i.action)){let e=!0;Object.keys(Sr[i.action]).forEach((function(a){Sr[i.action][a][i.type]&&e&&(t.queue.queue[r].label="string"==typeof Sr[i.action][a][i.type].title?Sr[i.action][a][i.type].title:Sr[i.action][a][i.type].title(),e=!1)}))}else Sr[i.action][i.type]&&(t.queue.queue[r].label="string"==typeof Sr[i.action][i.type].title?Sr[i.action][i.type].title:Sr[i.action][i.type].title())}}if(e&&t.tech.r_queue&&t.r_queue.display)for(let e=0;e=4&&ts(e)})),Object.keys(Di[t.race.species].traits).forEach((function(e){ts(e,{set:Di[t.race.species].traits[e]})})),t.race.imitation&&t.race.srace&&Yi(!1),Object.keys(t.tech).forEach((function(e){"evo_"===e.substring(0,4)&&delete t.tech[e]})),delete t.tech.evo,t.evolution={};const s=new Date;!t.settings.boring&&11===s.getMonth()&&s.getDate()>=17&&("elven"===t.race.species?(ts("slaver",{set:2}),ts("resourceful",{set:.5}),ts("small",{set:.25})):"capybara"===t.race.species?(ts("beast_of_burden",{set:1}),ts("pack_rat",{set:.5}),ts("musical",{set:.25})):"centaur"===t.race.species?(ts("beast_of_burden",{set:1}),ts("curious",{set:.5}),ts("blissful",{set:.25})):"wendigo"===t.race.species?(ts("immoral",{set:3}),ts("cannibalize",{set:.5}),ts("claws",{set:.25})):"yeti"===t.race.species?(ts("scavenger",{set:3}),ts("regenerative",{set:.5}),ts("musical",{set:.25})):"entish"===t.race.species&&(ts("photosynth",{set:3}),ts("optimistic",{set:.5}),ts("armored",{set:.25})));const n=on("easter");if("wolven"===t.race.species&&n.active?(ts("hyper",{set:1}),ts("fast_growth",{set:1}),ts("rainbow",{set:1}),ts("optimistic",{set:1})):"vulpine"===t.race.species&&n.active&&(ts("cannibalize",{set:2}),ts("rage",{set:1}),ts("blood_thirst",{set:1}),ts("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&&Ni(e);let l=qs();t.civic.foreign.gov0.name={s0:l.s0,s1:l.s1};let _=qs();for(;l.s0===_.s0&&l.s1===_.s1;)_=qs();t.civic.foreign.gov1.name={s0:_.s0,s1:_.s1};let d=qs();for(;l.s0===d.s0&&l.s1===d.s1||_.s0===d.s0&&_.s1===d.s1;)d=qs();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=qs(!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=qs(!0);for(;a.s1===e.s1;)a=qs(!0);t.civic.foreign.gov4.name={s0:99,s1:a.s1}}if(t.race.cataclysm?ms(F("cataclysm_sentience",[Di[t.race.species].home,cn("name")]),"info",!1,["progress"]):ms(F("sentience",[F("genelab_genus_"+Di[t.race.species].type),Di[t.race.species].entity,cn("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(Ds(!0),t.blood.aware&&(t.settings.arpa.blood=!0,t.tech.b_stone=2),ea(!0),J(),W(!0),t.race.shapeshifter&&es(!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),Ls(!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),$s("sentience",{species:t.race.species,challenge:Sn()-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},Qr(),Jr(),Et(),qe("Physics"),na()):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=qe("Monument"),Jr(),Ze(),qe("Physics"),na()):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},Qr(),Jr(),na()),t.settings.tabLoad?(Qr(),Q(),me($("#c_garrison"),!1),ae(),t.race.cataclysm||t.race.lone_survivor?(Cs($("#r_civics")),W(),$i(),Ka("market"),Ka("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 i=$(`
                `);$("#resStorage").append(i),tr(`#stack-${e}`,i,e,t)}r&&(i=$(`
                `),$("#market").append(i),Wa(`#market-${e}`,i,e,t,!0))})),Ga(),qe("Genetics"),qe("Crispr"),qe("Blood")):t.sim&&(qe("Crispr"),qe("Blood"))):$t("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))),j.w&&j.w.terminate(),window.location.reload())}function gi(e){switch(Di[e].fanaticism){case"smart":t.race.dumb?(Ni(5),qe("Genetics")):vi("smart");break;case"infectious":vi("infectious"),"human"===t.race.species&&Pn("infested");break;case"blood_thirst":vi("blood_thirst"),"entish"===t.race.species&&Pn("madagascar_tree");break;case"none":Ni(5),qe("Genetics");break;default:vi(Di[e].fanaticism)}}function vi(e){t.race[e]?ts(e)?"imitation"===e?Yi(!0):"shapeshifter"===e&&es(t.race.ss_genus):(Ni(5),qe("Genetics")):(t.race[e]=1,Zi(e))}function fi(){if(!t.settings.tabLoad&&3!==t.settings.civTabs)return;yi(),Cs($("#resQueue")),$("#resQueue").append($(`\n

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

                \n \n `));let e=$('
                  ');$("#resQueue").append(e),e.append($('
                • {{ item.label }} [{{ item.time | time }}]
                • '));try{zs({el:"#resQueue",data:t.r_queue,methods:{remove(e){ds(`rq${t.r_queue.queue[e].id}`),t.r_queue.queue.splice(e,1),fi(),Jr()},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?F("r_queue_play"):F("r_queue_pause")},filters:{time:e=>Fs(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,fi()}}),function(){for(let e=0;e=5?e-.01:e}function wi(){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-Ki.paranoid.vars()[0]/100),t.race.hoarder&&(e*=1+Ki.hoarder.vars()[0]/100);let a=as("dracnid");a>0&&(e*=1+Ki.hoarder.vars(1)[0]/100*a),t.tech.banking>=7&&(e*=1+$e(.05*ta(t.civic.banker.workers,"banker"))),t.tech.banking>=8&&(e+=$e(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 ki(e,a,r){switch(e){case"smelter":!function(e,a){let r=$(`
                  ${F("modal_smelter_fuel")}: {{s.count | on}}/{{ s.cap }}
                  `);if(e.append(r),e.hasClass("modalBody")){let e=Js(10);e.length>0&&r.prepend(e)}if(a&&t.race.forge&&t.race.steelen){let e=Zs(3,12,!0);e.length>0&&r.prepend(e)}let i=e.hasClass("modalBody")?"mSmelterFuels":"smelterFuels",s=$(`
                  `);if(e.append(s),!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=$('«'),i=$('»');s.append(r),s.append(a),s.append(i)}if(t.resource.Coal.display){let e=$(`${t.resource.Coal.name} `),a=$('«'),r=$('»');s.append(a),s.append(e),s.append(r)}}if(t.race.forge){let e=$(`${F("trait_forge_name")} {{ s.Oil }}`);s.append(e)}else if(t.resource.Oil.display){let e=$(`${t.resource.Oil.name} {{ s.Oil }}`),a=$('«'),r=$('»');s.append(a),s.append(e),s.append(r)}if(t.tech.star_forge&&t.tech.star_forge>=2){let e=$(`${F("star")} {{ s.Star }}`);s.append(e)}if(t.tech.smelting&&t.tech.smelting>=8){let e=$(`${F("modal_smelter_inferno")} {{ s.Inferno }}`),t=$('«'),a=$('»');s.append(t),s.append(e),s.append(a)}let n=$('
                  ');e.append(n);let c=!!(t.tech.irid_smelting||t.tech.m_smelting&&t.tech.m_smelting>=2);if(t.resource.Iridium.display&&c||t.resource.Steel.display&&t.tech.smelting>=2&&!t.race.steelen){let a=$(`
                  `);e.append(a),a.append(`
                  ${F("modal_smelter_type")}: {{s.count | son}}/{{ s.cap | on }}
                  `);let r=$('
                  ');a.append(r);let i=$(`${t.resource.Iron.name} {{ s.Iron }}`),s=$('«'),n=$('»');if(r.append(s),r.append(i),r.append(n),t.resource.Steel.display&&t.tech.smelting>=2&&!t.race.steelen){let e=$(`${t.resource.Steel.name} {{ s.Steel }}`),a=$('«'),i=$('»');r.append(a),r.append(e),r.append(i)}if(t.resource.Iridium.display&&c){let e=$(`${t.resource.Iridium.name} {{ s.Iridium }}`),a=$('«'),i=$('»');r.append(a),r.append(e),r.append(i)}}function o(e){switch(e){case"wood":return F("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?F("modal_build_coal2",[e,F("resource_Coal_name"),F("resource_Uranium_name")]):F("modal_build_coal1",[e,F("resource_Coal_name")])}case"oil":return t.race.forge?F("modal_build_forge"):F("modal_build_oil",["0.35",F("resource_Oil_name")]);case"star":return t.tech.irid_smelting?F("modal_build_star2",[F("resource_Titanium_name"),F("resource_Iridium_name")]):F("modal_build_star",[F("resource_Titanium_name")]);case"inferno":{let e=35,t=.5;return F("modal_build_inferno",[50,F("resource_Coal_name"),e,F("resource_Oil_name"),t,F("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),F("modal_smelter_steel",[+e.toFixed(3),F("resource_Steel_name"),F("resource_Coal_name"),F("resource_Iron_name")])}if("iridium"===e){let e=t.tech.smelting>=7?6.25:5;return t.race.pyrophobia&&(e*=.9),F("modal_smelter_iron",[+e.toFixed(3),F("resource_Iridium_name")])}{let e=t.tech.smelting>=3?t.tech.smelting>=7?15:12:10;return t.race.pyrophobia&&(e*=.9),F("modal_smelter_iron",[+e.toFixed(3),F("resource_Iron_name")])}}zs({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=>o(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:()=>Oi(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=Zs(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=Zs(3,12,!0);if(e.length>0)return e}return e}}});let _=e.hasClass("modalBody")?"mSmelterFuels":"smelterFuels";if(["wood","coal","oil","star","inferno"].forEach((function(e){_s(`${_}${e}`,(function(){return o(e)}),{elm:$(`#${_} > .${e}`),attach:"#main"})})),t.resource.Steel.display&&t.tech.smelting>=2&&!t.race.steelen||t.resource.Iridium.display&&c){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&&c)&&_s(`${a}${e}`,(function(){return l(e)}),{elm:$(`#${a} span.${e}`),attach:"#main"})}))}}(a,r);break;case"factory":!function(e,a){let r=$(`
                  ${F("modal_factory_operate")}: {{count | on}}/{{ on | max }}
                  `);e.append(r);let i=$(`
                  ${F("modal_factory_lux")}
                  `);e.append(i);let c=$(''),o=$('«'),l=$('»');if(i.append(o),i.append(c),i.append(l),t.tech.synthetic_fur){let a=$(`
                  ${t.race.evil?F("resource_Flesh_name"):F("resource_Furs_name")}
                  `);e.append(a);let r=$('{{ Furs }}'),i=$('«'),s=$('»');a.append(i),a.append(r),a.append(s)}let _=$(`
                  ${F("resource_Alloy_name")}
                  `);e.append(_);let d=$('{{ Alloy }}'),p=$('«'),u=$('»');if(_.append(p),_.append(d),_.append(u),t.tech.polymer){let t=$(`
                  ${F("resource_Polymer_name")}
                  `);e.append(t);let a=$('{{ Polymer }}'),r=$('«'),i=$('»');t.append(r),t.append(a),t.append(i)}if(t.tech.nano){let t=$(`
                  ${F("resource_Nano_Tube_name")}
                  `);e.append(t);let a=$('{{ Nano }}'),r=$('«'),i=$('»');t.append(r),t.append(a),t.append(i)}if(t.tech.stanene){let t=$(`
                  ${F("resource_Stanene_name")}
                  `);e.append(t);let a=$('{{ Stanene }}'),r=$('«'),i=$('»');t.append(r),t.append(a),t.append(i)}function h(e){let a=!!t.tech.factory;switch(e){case"Lux":{let e=+t.resource[t.race.species].amount*(a?xi.Lux.demand[t.tech.factory]:xi.Lux.demand[0]);return e=function(e){t.race.toxic&&(e*=1+Ki.toxic.vars()[0]/100);let a=as("shroomi");return a>0&&(e*=1+Ki.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*(n.colony||0)),e*=xe("psychic_cash")}(e).toFixed(2),F("modal_factory_lux_label",[a?xi.Lux.fur[t.tech.factory]:xi.Lux.fur[0],t.resource.Furs.name,e])}case"Furs":{let e=a?xi.Furs.money[t.tech.factory]:xi.Furs.money[0],r=a?xi.Furs.polymer[t.tech.factory]:xi.Furs.polymer[0];return F("modal_factory_alloy_label",[e,F("resource_Money_name"),r,F("resource_Polymer_name"),t.race.evil?F("resource_Flesh_name"):F("resource_Furs_name")])}case"Alloy":{let e=a?xi.Alloy.copper[t.tech.factory]:xi.Alloy.copper[0],r=a?xi.Alloy.aluminium[t.tech.factory]:xi.Alloy.aluminium[0];return F("modal_factory_alloy_label",[e,F("resource_Copper_name"),r,F("resource_Aluminium_name"),F("resource_Alloy_name")])}case"Polymer":if(t.race.kindling_kindred||t.race.smoldering)return F("modal_factory_polymer_label2",[a?xi.Polymer.oil_kk[t.tech.factory]:xi.Polymer.oil_kk[0],F("resource_Oil_name"),F("resource_Polymer_name")]);{let e=a?xi.Polymer.oil[t.tech.factory]:xi.Polymer.oil[0],r=a?xi.Polymer.lumber[t.tech.factory]:xi.Polymer.lumber[0];return F("modal_factory_polymer_label1",[e,F("resource_Oil_name"),r,t.resource.Lumber.name,F("resource_Polymer_name")])}case"Nano":{let e=a?xi.Nano_Tube.coal[t.tech.factory]:xi.Nano_Tube.coal[0],r=a?xi.Nano_Tube.neutronium[t.tech.factory]:xi.Nano_Tube.neutronium[0];return F("modal_factory_nano_label",[e,F("resource_Coal_name"),r,F("resource_Neutronium_name"),F("resource_Nano_Tube_name")])}case"Stanene":{let e=a?xi.Stanene.aluminium[t.tech.factory]:xi.Stanene.aluminium[0],r=a?xi.Stanene.nano[t.tech.factory]:xi.Stanene.nano[0];return F("modal_factory_stanene_label",[e,F("resource_Aluminium_name"),r,F("resource_Nano_Tube_name"),F("resource_Stanene_name")])}}}zs({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&&s.int_factory&&(a+=2*s.int_factory),t.tauceti.tau_factory&&n.tau_factory&&(a+=n.tau_factory*(t.tech.isolation?5:3));let r=b();for(var i=0;i0))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&&s.int_factory&&(a+=2*s.int_factory),t.tauceti.tau_factory&&n.tau_factory&&(a+=n.tau_factory*(t.tech.isolation?5:3)),Oi(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&&s.int_factory&&(e+=2*s.int_factory),t.tauceti.tau_factory&&n.tau_factory&&(e+=n.tau_factory*(t.tech.isolation?5:3)),e},spook(e){if(3===t.city.factory.Lux&&a){let e=Zs(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";_s(`${a}${t}`,(function(){return h(t)}),{elm:$(`#${a} .factory > .${t}`),attach:"#main"})}))}(a,r);break;case"droid":!function(e,a){let r=$(`
                  ${F("modal_factory_operate")}: {{count | on}}/{{ on | max }}
                  `);e.append(r);let i=$(`
                  ${F("resource_Adamantite_name")}
                  `);e.append(i);let s=$('{{ adam }}'),n=$('«'),c=$('»');i.append(n),i.append(s),i.append(c);let o=$(`
                  ${F("resource_Uranium_name")}
                  `);e.append(o);let l=$('{{ uran }}'),_=$('«'),d=$('»');o.append(_),o.append(l),o.append(d);let p=$(`
                  ${F("resource_Coal_name")}
                  `);e.append(p);let u=$('{{ coal }}'),h=$('«'),m=$('»');p.append(h),p.append(u),p.append(m);let g=$(`
                  ${F("resource_Aluminium_name")}
                  `);e.append(g);let v=$('{{ alum }}'),f=$('«'),y=$('»');function w(e){switch(e){case"adam":return F("modal_droid_res_label",[F("resource_Adamantite_name")]);case"uran":return F("modal_droid_res_label",[F("resource_Uranium_name")]);case"coal":return F("modal_droid_res_label",[F("resource_Coal_name")]);case"alum":return F("modal_droid_res_label",[F("resource_Aluminium_name")])}}g.append(f),g.append(v),g.append(y),zs({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:()=>Oi(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";_s(`${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",i=$(`
                  ${F("modal_smelter_fuel")}: {{count | on}}/{{ on | max }}
                  `);e.append(i);let s=$("
                  ");if(e.append(s),!t.race.kindling_kindred&&!t.race.smoldering){let e=t.resource.Lumber.name,a=$(`${e} {{ Lumber }}`),r=$('«'),i=$('»');s.append(r),s.append(a),s.append(i)}if(t.resource.Coal.display){let e=$(`${t.resource.Coal.name} {{ Coal }}`),a=$('«'),r=$('»');s.append(a),s.append(e),s.append(r)}if(t.resource.Oil.display){let e=$(`${t.resource.Oil.name} {{ Oil }}`),a=$('«'),r=$('»');s.append(a),s.append(e),s.append(r)}function n(e){switch(e){case"wood":return F("modal_graphene_produce",[350,t.race.evil?F("resource_Bones_name"):F("resource_Lumber_name"),F("resource_Graphene_name")]);case"coal":return F("modal_graphene_produce",[25,F("resource_Coal_name"),F("resource_Graphene_name")]);case"oil":return F("modal_graphene_produce",[15,F("resource_Oil_name"),F("resource_Graphene_name")])}}zs({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=>n(e),ariaCount:e=>` ${t[r].g_factory[e]} ${e} fueled.`,ariaProd:e=>`. ${t[r].g_factory[e]} producing ${e}.`,level:()=>Oi(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";_s(`${a}${t}`,(function(){return n(t)}),{elm:$(`#${a} > div > .${t}`),attach:"#main"})}))}(a,r);break;case"pylon":!function(e,a){let r=$(`
                  ${F("modal_pylon_casting")}: {{total | drain}}
                  `);e.append(r);let i=$('
                  ');e.append(i);let s=[];function n(e){let a=+ji(t.race.casting[e]).toFixed(4),r=+(ji(t.race.casting[e]+1)-ji(t.race.casting[e])).toFixed(4),i=+(t.race.casting[e]/(t.race.casting[e]+75)*100).toFixed(2);return"crafting"===e?F("modal_pylon_casting_label_crafting",[a,i,+(2*t.race.casting[e]/(2*t.race.casting[e]+75)*100).toFixed(2),r]):F("modal_pylon_casting_label",[F(`modal_pylon_spell_${e}`),a,r,i])}s=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&&s.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=$(`${F(`modal_pylon_spell_${e}`)} {{ ${e} }}`),a=$(`«`),r=$(`»`);i.append(a),i.append(t),i.append(r)}})),zs({el:a||"#specialModal",data:t.race.casting,methods:{buildLabel:e=>n(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:()=>Oi(t.race.casting.total,t.resource.Mana.gen,!0)},filters:{drain:function(e){let a=0;return s.forEach((function(e){t.race.casting[e]&&t.race.casting[e]>0&&(a+=ji(t.race.casting[e]))})),F("modal_pylon_casting_cost",[+a.toFixed(3)])}}}),s.forEach((function(t){let a=e.hasClass("modalBody")?"specialModal":"iPylon";_s(`${a}${t}`,(function(){return n(t)}),{elm:$(`#${a} > .pylon > .${t}`),attach:"#main"})}))}(a,r);break;case"rock_quarry":!function(e,a){e.append($(`
                  ${F("modal_quarry_ratio",[t.resource.Chrysotile.name])}
                  `));let r=$('
                  «»
                  ');e.append(r),zs({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($(`
                  ${F("modal_quarry_ratio",[t.resource.Adamantite.name])}
                  `));let r=$('
                  «»
                  ');e.append(r),zs({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=$(`
                  ${F("modal_factory_operate")}: {{count | on}}/{{ count | max }}
                  `);e.append(r);let i=e.hasClass("modalBody")?"mNFactoryRes":"NFactoryRes",s=$(`
                  `);e.append(s),qi.forEach((function(e){if(t.resource[e].display){let a=$(`${t.resource[e].name} {{ ${e} }}`),r=$(`«`),i=$(`»`);s.append(r),s.append(a),s.append(i)}})),zs({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;qi.forEach((function(e){r+=t.city.nanite_factory[e]}));let i=50*t.city.nanite_factory.count-r;a>i&&(a=i),a>0&&(t.city.nanite_factory[e]+=a)},eatLabel:e=>`Consume ${e} to produce ${t.resource.Nanite.name}`,level(){let e=0;qi.forEach((function(a){e+=t.city.nanite_factory[a]}));let a=t.city.nanite_factory.count;return Oi(e,a)}},filters:{on(){let e=0;return qi.forEach((function(a){e+=t.city.nanite_factory[a]})),e},max:()=>50*t.city.nanite_factory.count}}),qi.forEach((function(a){let r=e.hasClass("modalBody")?"specialModal":"iNFactory";_s(`${r}${a}`,(function(){return function(e){let a=+(Aa[e]/100*(Ki.deconstructor.vars()[0]/100)).toFixed(4),r=+(t.city.nanite_factory[e]*a).toFixed(4);return F("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($(`
                  ${F("tau_roid_mining_ship_ratio",[t.resource.Iron.name,t.resource.Aluminium.name])}
                  `));let r=$('
                  «»
                  ');e.append(r),e.append($(`
                  ${F("tau_roid_mining_ship_ratio",[t.resource.Iridium.name,t.resource.Neutronium.name])}
                  `));let i=$('
                  «»
                  ');if(e.append(i),t.tech.tau_roid>=5){e.append($(`
                  ${F("tau_roid_mining_ship_ratio",[t.resource.Orichalcum.name,t.resource.Elerium.name])}
                  `));let a=$('
                  «»
                  ');e.append(a)}zs({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($(`
                  ${F("tau_gas2_alien_station_focus",[t.resource.Knowledge.name])}
                  `));let r=$('
                  «»
                  ');e.append(r),zs({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?F("tech_antireplicator"):F("tech_replicator")}
                  `));let r=$('
                  ');if(e.append(r),a){let e="";Object.keys(Aa).forEach((function(a){e+=`${t.resource[a].name}`})),r.append(`
                  \n ${e}\n
                  `)}else{let e="";Object.keys(Aa).forEach((function(a){t.resource[a].display&&(e+=`${t.resource[a].name}`)})),r.append(`
                  ${e}
                  `)}let i=a?$("
                  "):$('
                  ');r.append(i);let s=$('{{ pow }}MW'),n=$('«'),c=$('»');if(i.append(n),i.append(s),i.append(c),e.append('
                  {{ res | result }}
                  '),zs({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=>F("tau_replicator",[Pi(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 $i(){if(t.settings.tabLoad||2===t.settings.civTabs&&1===t.settings.govTabs){if(Cs($("#industry")),t.city.smelter&&(t.city.smelter.count>0||t.race.cataclysm||t.race.orbit_decayed||t.tech.isolation)){var e=$(`

                  ${F("city_smelter")}

                  `);$("#industry").append(e),ki("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=$(`

                  ${F("city_factory")}

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

                  ${F("interstellar_mining_droid_title")}

                  `);$("#industry").append(r),ki("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 i=$(`

                  ${F("interstellar_g_factory_title")}

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

                  ${F("city_pylon")}

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

                  ${F("city_rock_quarry")}

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

                  ${F("city_mine")}

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

                  ${F("tau_roid_mining_ship")}

                  `);$("#industry").append(c),ki("mining_ship",c,"#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 o=$(`

                  ${F("tau_gas2_alien_station")}

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

                  ${F("city_nanite_factory")}

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

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

                  `);$("#industry").append(_),ki("replicator",_,"#iReplicator")}}}Object.keys(Tr).forEach((e=>Sr.evolution[e]={id:`evolution-${e}`,title:F(`evo_challenge_${e}`),desc(){let a="";return"micro"===t.race.universe&&(a+=`
                  ${F("evo_challenge_micro_warn")}
                  `),a+=`
                  ${F(`evo_challenge_${e}_desc`)}
                  `,["sludge","junker"].includes(e)&&(a+=`
                  ${F("evo_start")}
                  `),a},condition:()=>t.evolution.hasOwnProperty(e),cost:{DNA:()=>"c"===Tr[e].t?25:50},challenge:!0,effect:()=>Er(e),action(){return ii($(this)[0])&&("c"===Tr[e].t?function(e){t.race[e]?(delete t.race[e],$(`#evolution-${e}`).removeClass("hl"),"sludge"===e&&Object.keys(Di).forEach((function(e){"junker"!==e&&"sludge"!==e&&$(`#evolution-${e}`).removeClass("is-hidden")}))):(t.race[e]=1,$(`#evolution-${e}`).addClass("hl"),"sludge"===e&&(Object.keys(Di).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[Ir[e]]}))))),Cr(),Mn()}(e):function(e){if(t.race.sludge||Object.keys(Di).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[Ir[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(Di).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[Ir[e]]}))):(["nerfed","badgenes"].forEach((function(e){delete t.race[Ir[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;eYs(Tr[e].e),highlight:()=>!!t.race[e],queue_complete:()=>0})),Sr.evolution.bunker={id:"evolution-bunker",title:F("evo_bunker"),desc:()=>`
                  ${F("evo_bunker")}
                  ${F("evo_challenge")}
                  `,reqs:{evo:6},grant:["evo_challenge",1],condition:()=>t.genes.challenge&&100===t.evolution.final&&!t.race.evoFinalMenu,cost:{DNA:()=>10},effect:F("evo_bunker_effect"),action(){return!!ii($(this)[0])},queue_complete:()=>t.tech.evo_challenge?0:1,flair:F("evo_bunker_flair")};const xi={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]}},qi=["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 Pi(e,a){return t.race.lone_survivor?17.5*_/Aa[e]*a:12.5*(_||1)/Aa[e]*a**.75}function ji(e,t){return e*((1+(t=void 0===t?.0025:t))**e-1)}function Oi(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
                  ${F("power_grid_header")}
                  Distribute Low Power
                  `),zs({el:"#powerModeSwitch",data:t.settings}),Object.keys(e).forEach((function(a){if(!e[a].s)return;let r="";"power"===a&&(r=Zs(7,12,!1)),e[a].r&&e[a].rs&&t[e[a].r][e[a].rs]?($("#powerGrid").append(`
                  ${e[a].n} {{ support }}/{{ s_max }}
                  `),zs({el:`#pg${a}sup`,data:t[e[a].r][e[a].rs]})):$("#powerGrid").append(`
                  ${e[a].n}${r}
                  `);let i=$(`
                  `);$("#powerGrid").append(i);let s=0;for(let r=0;r`);c.append(` ${_}${d}`),c.append('{{ on | off }} {{ on }}'),c.append('« »'),i.append(c),zs({el:`#pg${l.id}${a}`,data:t[o][n[1]],methods:{power_on(){let e=b();for(let a=0;a0;a++)t[o][n[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 i=e[a].l;i.splice(r,0,i.splice(t,1)[0]),e[a].l=i,Si()}},lower(){let t=$(`#pg${l.id}${a}`).attr("data-idx"),r=$(`#pg${l.id}${a}`).nextAll('.circuit:not(".inactive")').attr("data-idx");if(rt[o][n[1]].count-e,idx(e){let t=Js(18,11);return 10===e&&t.length>0?"1"+t:e}}})}else{let e=$(`
                  `);e.append(`${_}${d}`),i.append(e)}}!function(e){let t=$(`#grid${e}`)[0],a=Ci();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,Si()}})}(a);let n=$(`
                  `);$("#powerGrid").append(n),zs({el:`#${a}GridReset`,data:{},methods:{resetGrid(e){hs(e,!0),Si()}}})}))}function Ci(){return{power:{l:t.power,n:F("power"),s:!0,r:!1,rs:!1},moon:{l:t.support.moon,n:F("space_moon_info_name"),s:t.settings.space.moon,r:"space",rs:"moon_base"},red:{l:t.support.red,n:Vt().red,s:t.settings.space.red,r:"space",rs:"spaceport"},belt:{l:t.support.belt,n:F("space_belt_info_name"),s:t.settings.space.belt,r:"space",rs:"space_station"},alpha:{l:t.support.alpha,n:F("interstellar_alpha_name"),s:t.settings.space.alpha,r:"interstellar",rs:"starport"},nebula:{l:t.support.nebula,n:F("interstellar_nebula_name"),s:t.settings.space.nebula,r:"interstellar",rs:"nexus"},gateway:{l:t.support.gateway,n:F("galaxy_gateway"),s:t.settings.space.gateway,r:"galaxy",rs:"starbase"},alien2:{l:t.support.alien2,n:F("galaxy_alien",[Di[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:F("portal_lake_name"),s:t.settings.portal.lake,r:"portal",rs:"harbour"},spire:{l:t.support.spire,n:F("portal_spire_name"),s:t.settings.portal.spire,r:"portal",rs:"purifier"},titan:{l:t.support.titan,n:Vt().titan,s:t.settings.space.titan,r:"space",rs:"electrolysis"},enceladus:{l:t.support.enceladus,n:Vt().enceladus,s:t.settings.space.enceladus,r:"space",rs:"titan_spaceport"},eris:{l:t.support.eris,n:Vt().eris,s:t.settings.space.eris,r:"space",rs:"drone_control"},tau_home:{l:t.support.tau_home,n:F("tau_planet",[Di[t.race.species].home]),s:t.settings.tau.home,r:"tauceti",rs:"orbital_station"},tau_red:{l:t.support.tau_red,n:F("tau_planet",[Vt().red]),s:t.settings.tau.red,r:"tauceti",rs:"orbital_platform"},tau_roid:{l:t.support.tau_roid,n:F("tau_roid_title"),s:t.settings.tau.roid,r:"tauceti",rs:"patrol_ship"}}}function zi(e){e=e||Ci(),Object.keys(e).forEach((function(e){let t=$(`#grid${e}`)[0];if(t){let e=Sortable.get(t);e&&e.destroy()}}))}const Fi=new Date,Ai=ln(),Ii=_n(),Ti=["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===Fi.getMonth()&&Fi.getDate()>=17||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0);case"wolven":case"vulpine":return!!(Ai.active||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0);case"arraak":return!!(10===Fi.getMonth()&&Fi.getDate()>=22&&Fi.getDate()<=28||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0);case"seraph":return!!(1===Fi.getMonth()&&14===Fi.getDate()||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0);case"junker":return!!(Ii.active||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0)}return!1}const Ei={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}},Ki={adaptable:{name:F("trait_adaptable_name"),desc:F("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:F("trait_wasteful_name"),desc:F("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:F("trait_xenophobic_name"),desc:F("trait_xenophobic"),type:"genus",val:-5},carnivore:{name:F("trait_carnivore_name"),desc:F("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:F("trait_beast_name"),desc:F("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:F("trait_cautious_name"),desc:F("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:F("trait_herbivore_name"),desc:F("trait_herbivore"),type:"genus",val:-7},instinct:{name:F("trait_instinct_name"),desc:F("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:F("trait_small_name"),desc:F("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:F("trait_weak_name"),desc:F("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:F("trait_large_name"),desc:F("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:F("trait_strong_name"),desc:F("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:F("trait_cold_blooded_name"),desc:F("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:F("trait_scales_name"),desc:F("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:F("trait_flier_name"),desc:F("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:F("trait_hollow_bones_name"),desc:F("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:F("trait_sky_lover_name"),desc:F("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:F("trait_rigid_name"),desc:F("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:F("trait_high_pop_name"),desc:F("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:F("trait_fast_growth_name"),desc:F("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:F("trait_high_metabolism_name"),desc:F("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:F("trait_photosynth_name"),desc:F("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:F("trait_sappy_name"),desc:F("trait_sappy",[F("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:F("trait_asymmetrical_name"),desc:F("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:F("trait_detritivore_name"),desc:F("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:F("trait_spores_name"),desc:F("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:F("trait_spongy_name"),desc:F("trait_spongy"),type:"genus",val:-2},submerged:{name:F("trait_submerged_name"),desc:F("trait_submerged"),type:"genus",val:3},low_light:{name:F("trait_low_light_name"),desc:F("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:F("trait_elusive_name"),desc:F("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:F("trait_iron_allergy_name"),desc:F("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:F("trait_smoldering_name"),desc:F("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:F("trait_cold_intolerance_name"),desc:F("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:F("trait_chilled_name"),desc:F("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:F("trait_heat_intolerance_name"),desc:F("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:F("trait_scavenger_name"),desc:F("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:F("trait_nomadic_name"),desc:F("trait_nomadic"),type:"genus",val:-5},immoral:{name:F("trait_immoral_name"),desc:F("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:F("trait_evil_name"),desc:F("trait_evil"),type:"genus",val:0},blissful:{name:F("trait_blissful_name"),desc:F("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:F("trait_pompous_name"),desc:F("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:F("trait_holy_name"),desc:F("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:F("trait_artifical_name"),desc:F("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:F("trait_powered_name"),desc:F("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:F("trait_psychic_name"),desc:F("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:F("trait_tormented_name"),desc:F("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:F("trait_darkness_name"),desc:F("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:F("trait_unfathomable_name"),desc:F("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:F("trait_creative_name"),desc:F("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:F("trait_diverse_name"),desc:F("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:F("trait_studious_name"),desc:F("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:F("trait_arrogant_name"),desc:F("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:F("trait_brute_name"),desc:F("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:F("trait_angry_name"),desc:F("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:F("trait_lazy_name"),desc:F("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:F("trait_curious_name"),desc:F("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:F("trait_pack_mentality_name"),desc:F("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:F("trait_tracker_name"),desc:F("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:F("trait_playful_name"),desc:F("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:F("trait_freespirit_name"),desc:F("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:F("trait_beast_of_burden_name"),desc:F("trait_beast_of_burden"),type:"major",val:3},sniper:{name:F("trait_sniper_name"),desc:F("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:F("trait_hooved_name"),desc:F("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:F("trait_rage_name"),desc:F("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:F("trait_heavy_name"),desc:F("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:F("trait_gnawer_name"),desc:F("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:F("trait_calm_name"),desc:F("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:F("trait_pack_rat_name"),desc:F("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:F("trait_paranoid_name"),desc:F("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:F("trait_greedy_name"),desc:F("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:F("trait_merchant_name"),desc:F("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:F("trait_smart_name"),desc:F("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:F("trait_puny_name"),desc:F("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:F("trait_dumb_name"),desc:F("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:F("trait_tough_name"),desc:F("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:F("trait_nearsighted_name"),desc:F("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:F("trait_intelligent_name"),desc:F("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:F("trait_regenerative_name"),desc:F("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:F("trait_gluttony_name"),desc:F("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:F("trait_slow_name"),desc:F("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:F("trait_armored_name"),desc:F("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:F("trait_optimistic_name"),desc:F("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:F("trait_chameleon_name"),desc:F("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:F("trait_slow_digestion_name"),desc:F("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:F("trait_hard_of_hearing_name"),desc:F("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:F("trait_resourceful_name"),desc:F("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:F("trait_selenophobia_name"),desc:F("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:F("trait_leathery_name"),desc:F("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:F("trait_pessimistic_name"),desc:F("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:F("trait_hoarder_name"),desc:F("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:F("trait_solitary_name"),desc:F("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:F("trait_kindling_kindred_name"),desc:F("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:F("trait_pyrophobia_name"),desc:F("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:F("trait_hyper_name"),desc:F("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:F("trait_skittish_name"),desc:F("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:F("trait_fragrant_name"),desc:F("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:F("trait_sticky_name"),desc:F("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:F("trait_infectious_name"),desc:F("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:F("trait_parasite_name"),desc:F("trait_parasite"),type:"major",val:-4},toxic:{name:F("trait_toxic_name"),desc:F("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:F("trait_nyctophilia_name"),desc:F("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:F("trait_infiltrator_name"),desc:F("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:F("trait_hibernator_name"),desc:F("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:F("trait_cannibalize_name"),desc:F("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:F("trait_frail_name"),desc:F("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:F("trait_malnutrition_name"),desc:F("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:F("trait_claws_name"),desc:F("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:F("trait_atrophy_name"),desc:F("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:F("trait_hivemind_name"),desc:F("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:F("trait_tunneler_name"),desc:F("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:F("trait_blood_thirst_name"),desc:F("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:F("trait_apex_predator_name"),desc:F("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:F("trait_invertebrate_name"),desc:F("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:F("trait_suction_grip_name"),desc:F("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:F("trait_befuddle_name"),desc:F("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:F("trait_environmentalist_name"),desc:F("trait_environmentalist"),type:"major",val:-5},unorganized:{name:F("trait_unorganized_name"),desc:F("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:F("trait_musical_name"),desc:F("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:F("trait_revive_name"),desc:F("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:F("trait_slow_regen_name"),desc:F("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:F("trait_forge_name"),desc:F("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:F("trait_autoignition_name"),desc:F("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:F("trait_blurry_name"),desc:F("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:F("trait_snowy_name"),desc:F("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:F("trait_ravenous_name"),desc:F("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:F("trait_ghostly_name"),desc:F("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:F("trait_lawless_name"),desc:F("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:F("trait_mistrustful_name"),desc:F("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:F("trait_humpback_name"),desc:F("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:F("trait_thalassophobia_name"),desc:F("trait_thalassophobia"),type:"major",val:-4},fiery:{name:F("trait_fiery_name"),desc:F("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:F("trait_terrifying_name"),desc:F("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:F("trait_slaver_name"),desc:F("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:F("trait_compact_name"),desc:F("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:F("trait_conniving_name"),desc:F("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:F("trait_pathetic_name"),desc:F("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:F("trait_spiritual_name"),desc:F("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:F("trait_truthful_name"),desc:F("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:F("trait_unified_name"),desc:F("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:F("trait_rainbow_name"),desc:F("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:F("trait_magnificent_name"),desc:F("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:F("trait_noble_name"),desc:F("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:F("trait_imitation_name"),desc:F("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:F("trait_emotionless_name"),desc:F("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:F("trait_logical_name"),desc:F("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:F("trait_shapeshifter_name"),desc:F("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:F("trait_deconstructor_name"),desc:F("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:F("trait_linked_name"),desc:F("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:F("trait_dark_dweller_name"),desc:F("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:F("trait_swift_name"),desc:F("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:F("trait_anthropophagite_name"),desc:F("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:F("trait_living_tool_name"),desc:F("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:F("trait_bloated_name"),desc:F("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:F("trait_ooze_name"),desc:F("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:F("trait_soul_eater_name"),desc:F("trait_soul_eater"),type:"special",val:0},untapped:{name:F("trait_untapped_name"),desc:F("trait_untapped"),type:"special",val:0},emfield:{name:F("trait_emfield_name"),desc:F("trait_emfield"),type:"special",val:-20},tactical:{name:F("trait_tactical_name"),desc:F("trait_tactical"),type:"minor",vars:e=>[5]},analytical:{name:F("trait_analytical_name"),desc:F("trait_analytical"),type:"minor",vars:e=>[1]},promiscuous:{name:F("trait_promiscuous_name"),desc:F("trait_promiscuous"),type:"minor",vars:e=>[1,.02]},resilient:{name:F("trait_resilient_name"),desc:F("trait_resilient"),type:"minor",vars:e=>[2]},cunning:{name:F("trait_cunning_name"),desc:F("trait_cunning"),type:"minor",vars:e=>[5]},hardy:{name:F("trait_hardy_name"),desc:F("trait_hardy"),type:"minor",vars:e=>[1]},ambidextrous:{name:F("trait_ambidextrous_name"),desc:F("trait_ambidextrous"),type:"minor",vars:e=>[3,2]},industrious:{name:F("trait_industrious_name"),desc:F("trait_industrious"),type:"minor",vars:e=>[2]},content:{name:F("trait_content_name"),desc:F("trait_content"),type:"minor"},fibroblast:{name:F("trait_fibroblast_name"),desc:F("trait_fibroblast"),type:"minor",vars:e=>[2]},metallurgist:{name:F("trait_metallurgist_name"),desc:F("trait_metallurgist"),type:"minor",vars:e=>[4]},gambler:{name:F("trait_gambler_name"),desc:F("trait_gambler"),type:"minor",vars:e=>[4]},persuasive:{name:F("trait_persuasive_name"),desc:F("trait_persuasive"),type:"minor",vars:e=>[1]},fortify:{name:F("trait_fortify_name"),desc:F("trait_fortify"),type:"special"},mastery:{name:F("trait_mastery_name"),desc:F("trait_mastery"),type:"special",vars:e=>[1]}},Di={protoplasm:{name:F("race_protoplasm"),desc:F("race_protoplasm_desc"),type:"organism",home:F("race_prehistoric"),entity:"ooze",traits:{},solar:{red:F("race_human_solar_red"),hell:F("race_human_solar_hell"),gas:F("race_human_solar_gas"),gas_moon:F("race_human_solar_gas_moon"),dwarf:F("race_human_solar_dwarf")},fanaticism:"none",basic:()=>!1},human:{name:F("race_human"),desc:F("race_human_desc"),type:"humanoid",home:F("race_human_home"),entity:F("race_human_entity"),traits:{creative:1,diverse:1},solar:{red:F("race_human_solar_red"),hell:F("race_human_solar_hell"),gas:F("race_human_solar_gas"),gas_moon:F("race_human_solar_gas_moon"),dwarf:F("race_human_solar_dwarf")},fanaticism:"creative",basic:()=>!0},elven:{name:F("race_elven"),desc:F(Li("elven")?"race_xmas_elf_desc":"race_elven_desc"),type:"humanoid",home:F(Li("elven")?"race_xmas_elf_home":"race_elven_home"),entity:F("race_elven_entity"),traits:{studious:1,arrogant:1},solar:{red:F(Li("elven")?"race_xmas_elf_solar_red":"race_elven_solar_red"),hell:F(Li("elven")?"race_xmas_elf_solar_hell":"race_elven_solar_hell"),gas:F(Li("elven")?"race_xmas_elf_solar_gas":"race_elven_solar_gas"),gas_moon:F(Li("elven")?"race_xmas_elf_solar_gas_moon":"race_elven_solar_gas_moon"),dwarf:F(Li("elven")?"race_xmas_elf_solar_dwarf":"race_elven_solar_dwarf")},fanaticism:"studious",basic:()=>!0},orc:{name:F("race_orc"),desc:F("race_orc_desc"),type:"humanoid",home:F("race_orc_home"),entity:F("race_orc_entity"),traits:{brute:1,angry:1},solar:{red:F("race_orc_solar_red"),hell:F("race_orc_solar_hell"),gas:F("race_orc_solar_gas"),gas_moon:F("race_orc_solar_gas_moon"),dwarf:F("race_orc_solar_dwarf")},fanaticism:"brute",basic:()=>!0},cath:{name:F("race_cath"),desc:F("race_cath_desc"),type:"carnivore",home:F("race_cath_home"),entity:F("race_cath_entity"),traits:{lazy:1,curious:1},solar:{red:F("race_cath_solar_red"),hell:F("race_cath_solar_hell"),gas:F("race_cath_solar_gas"),gas_moon:F("race_cath_solar_gas_moon"),dwarf:F("race_cath_solar_dwarf")},fanaticism:"curious",basic:()=>!0},wolven:{name:Li("wolven")?F("race_rabbit"):F("race_wolven"),desc:Li("wolven")?F("race_rabbit_desc"):F("race_wolven_desc"),type:"carnivore",home:Li("wolven")?F("race_rabbit_home"):F("race_wolven_home"),entity:Li("wolven")?F("race_rabbit_entity"):F("race_wolven_entity"),traits:{pack_mentality:1,tracker:1},solar:{red:Li("wolven")?F("race_rabbit_solar_red"):F("race_wolven_solar_red"),hell:Li("wolven")?F("race_rabbit_solar_hell"):F("race_wolven_solar_hell"),gas:Li("wolven")?F("race_rabbit_solar_gas"):F("race_wolven_solar_gas"),gas_moon:Li("wolven")?F("race_rabbit_solar_gas_moon"):F("race_wolven_solar_gas_moon"),dwarf:Li("wolven")?F("race_rabbit_solar_dwarf"):F("race_wolven_solar_dwarf")},fanaticism:"tracker",basic:()=>!0},vulpine:{name:Li("vulpine")?F("race_chocolate_rabbit"):F("magic"===t.race.universe?"race_kitsune":"race_vulpine"),desc:()=>Li("vulpine")?F("race_chocolate_rabbit_desc"):F("race_vulpine_desc",[F("magic"===t.race.universe?"race_kitsune":"race_vulpine"),t.race.hasOwnProperty("fox_color")?F(`color_${t.race.fox_color}`):F("color_red")]),type:"carnivore",home:Li("vulpine")?F("race_chocolate_rabbit_home"):F("race_vulpine_home"),entity:F("race_vulpine_entity"),traits:{playful:1,freespirit:1},solar:{red:Li("vulpine")?F("race_chocolate_rabbit_solar_red"):F("race_vulpine_solar_red"),hell:Li("vulpine")?F("race_chocolate_rabbit_solar_hell"):F("race_vulpine_solar_hell"),gas:Li("vulpine")?F("race_chocolate_rabbit_solar_gas"):F("race_vulpine_solar_gas"),gas_moon:Li("vulpine")?F("race_chocolate_rabbit_solar_gas_moon"):F("race_vulpine_solar_gas_moon"),dwarf:Li("vulpine")?F("race_chocolate_rabbit_solar_dwarf"):F("race_vulpine_solar_dwarf")},fanaticism:"playful",basic:()=>!0},centaur:{name:F(Li("centaur")?"race_reindeer":"race_centaur"),desc:F(Li("centaur")?"race_reindeer_desc":"race_centaur_desc"),type:"herbivore",home:F(Li("centaur")?"race_reindeer_home":"race_centaur_home"),entity:F(Li("centaur")?"race_reindeer_entity":"race_centaur_entity"),traits:{sniper:1,hooved:1},solar:{red:F(Li("centaur")?"race_reindeer_solar_red":"race_centaur_solar_red"),hell:F(Li("centaur")?"race_reindeer_solar_hell":"race_centaur_solar_hell"),gas:F(Li("centaur")?"race_reindeer_solar_gas":"race_centaur_solar_gas"),gas_moon:F(Li("centaur")?"race_reindeer_solar_gas_moon":"race_centaur_solar_gas_moon"),dwarf:F(Li("centaur")?"race_reindeer_solar_dwarf":"race_centaur_solar_dwarf")},fanaticism:"sniper",basic:()=>!0},rhinotaur:{name:F("race_rhinotaur"),desc:F("race_rhinotaur_desc"),type:"herbivore",home:F("race_rhinotaur_home"),entity:F("race_rhinotaur_entity"),traits:{rage:1,heavy:1},solar:{red:F("race_rhinotaur_solar_red"),hell:F("race_rhinotaur_solar_hell"),gas:F("race_rhinotaur_solar_gas"),gas_moon:F("race_rhinotaur_solar_gas_moon"),dwarf:F("race_rhinotaur_solar_dwarf")},fanaticism:"rage",basic:()=>!0},capybara:{name:F(Li("capybara")?"race_donkey":"race_capybara"),desc:F(Li("capybara")?"race_donkey_desc":"race_capybara_desc"),type:"herbivore",home:F(Li("capybara")?"race_donkey_home":"race_capybara_home"),entity:F(Li("capybara")?"race_donkey_entity":"race_capybara_entity"),traits:{gnawer:1,calm:1},solar:{red:F(Li("capybara")?"race_donkey_solar_red":"race_capybara_solar_red"),hell:F(Li("capybara")?"race_donkey_solar_hell":"race_capybara_solar_hell"),gas:F(Li("capybara")?"race_donkey_solar_gas":"race_capybara_solar_gas"),gas_moon:F(Li("capybara")?"race_donkey_solar_gas_moon":"race_capybara_solar_gas_moon"),dwarf:F(Li("capybara")?"race_donkey_solar_dwarf":"race_capybara_solar_dwarf")},fanaticism:"calm",basic:()=>!0},kobold:{name:F("race_kobold"),desc:F("race_kobold_desc"),type:"small",home:F("race_kobold_home"),entity:F("race_kobold_entity"),traits:{pack_rat:1,paranoid:1},solar:{red:F("race_kobold_solar_red"),hell:F("race_kobold_solar_hell"),gas:F("race_kobold_solar_gas"),gas_moon:F("race_kobold_solar_gas_moon"),dwarf:F("race_kobold_solar_dwarf")},fanaticism:"pack_rat",basic:()=>!0},goblin:{name:F("race_goblin"),desc:F("race_goblin_desc"),type:"small",home:F("race_goblin_home"),entity:F("race_goblin_entity"),traits:{greedy:1,merchant:1},solar:{red:F("race_goblin_solar_red"),hell:F("race_goblin_solar_hell"),gas:F("race_goblin_solar_gas"),gas_moon:F("race_goblin_solar_gas_moon"),dwarf:F("race_goblin_solar_dwarf")},fanaticism:"merchant",basic:()=>!0},gnome:{name:F("race_gnome"),desc:F("race_gnome_desc"),type:"small",home:F("race_gnome_home"),entity:F("race_gnome_entity"),traits:{smart:1,puny:1},solar:{red:F("race_gnome_solar_red"),hell:F("race_gnome_solar_hell"),gas:F("race_gnome_solar_gas"),gas_moon:F("race_gnome_solar_gas_moon"),dwarf:F("race_gnome_solar_dwarf")},fanaticism:"smart",basic:()=>!0},ogre:{name:F("race_ogre"),desc:F("race_ogre_desc"),type:"giant",home:F("race_ogre_home"),entity:F("race_ogre_entity"),traits:{dumb:1,tough:1},solar:{red:F("race_ogre_solar_red"),hell:F("race_ogre_solar_hell"),gas:F("race_ogre_solar_gas"),gas_moon:F("race_ogre_solar_gas_moon"),dwarf:F("race_ogre_solar_dwarf")},fanaticism:"tough",basic:()=>!0},cyclops:{name:F("race_cyclops"),desc:F("race_cyclops_desc"),type:"giant",home:F("race_cyclops_home"),entity:F("race_cyclops_entity"),traits:{nearsighted:1,intelligent:1},solar:{red:F("race_cyclops_solar_red"),hell:F("race_cyclops_solar_hell"),gas:F("race_cyclops_solar_gas"),gas_moon:F("race_cyclops_solar_gas_moon"),dwarf:F("race_cyclops_solar_dwarf")},fanaticism:"intelligent",basic:()=>!0},troll:{name:F("race_troll"),desc:F("race_troll_desc"),type:"giant",home:F("race_troll_home"),entity:F("race_troll_entity"),traits:{regenerative:1,gluttony:1},solar:{red:F("race_troll_solar_red"),hell:F("race_troll_solar_hell"),gas:F("race_troll_solar_gas"),gas_moon:F("race_troll_solar_gas_moon"),dwarf:F("race_troll_solar_dwarf")},fanaticism:"regenerative",basic:()=>!0},tortoisan:{name:F("race_tortoisan"),desc:()=>F("race_tortoisan_desc",[t.race.hasOwnProperty("shell_color")?F(`color_${t.race.shell_color}`):F("color_green")]),type:"reptilian",home:F("race_tortoisan_home"),entity:F("race_tortoisan_entity"),traits:{slow:1,armored:1},solar:{red:F("race_tortoisan_solar_red"),hell:F("race_tortoisan_solar_hell"),gas:F("race_tortoisan_solar_gas"),gas_moon:F("race_tortoisan_solar_gas_moon"),dwarf:F("race_tortoisan_solar_dwarf")},fanaticism:"armored",basic:()=>!0},gecko:{name:F("race_gecko"),desc:F("race_gecko_desc"),type:"reptilian",home:F("race_gecko_home"),entity:F("race_gecko_entity"),traits:{optimistic:1,chameleon:1},solar:{red:F("race_gecko_solar_red"),hell:F("race_gecko_solar_hell"),gas:F("race_gecko_solar_gas"),gas_moon:F("race_gecko_solar_gas_moon"),dwarf:F("race_gecko_solar_dwarf")},fanaticism:"optimistic",basic:()=>!0},slitheryn:{name:F("race_slitheryn"),desc:F("race_slitheryn_desc"),type:"reptilian",home:F("race_slitheryn_home"),entity:F("race_slitheryn_entity"),traits:{slow_digestion:1,hard_of_hearing:1},solar:{red:F("race_slitheryn_solar_red"),hell:F("race_slitheryn_solar_hell"),gas:F("race_slitheryn_solar_gas"),gas_moon:F("race_slitheryn_solar_gas_moon"),dwarf:F("race_slitheryn_solar_dwarf")},fanaticism:"slow_digestion",basic:()=>!0},arraak:{name:F(Li("arraak")?"race_turkey":"race_arraak"),desc:F(Li("arraak")?"race_turkey_desc":"race_arraak_desc"),type:"avian",home:F(Li("arraak")?"race_turkey_home":"race_arraak_home"),entity:F("race_arraak_entity"),traits:{resourceful:1,selenophobia:1},solar:{red:F(Li("arraak")?"race_turkey_solar_red":"race_arraak_solar_red"),hell:F(Li("arraak")?"race_turkey_solar_hell":"race_arraak_solar_hell"),gas:F(Li("arraak")?"race_turkey_solar_gas":"race_arraak_solar_gas"),gas_moon:F(Li("arraak")?"race_turkey_solar_gas_moon":"race_arraak_solar_gas_moon"),dwarf:F(Li("arraak")?"race_turkey_solar_dwarf":"race_arraak_solar_dwarf")},fanaticism:"resourceful",basic:()=>!0},pterodacti:{name:F("race_pterodacti"),desc:F("race_pterodacti_desc"),type:"avian",home:F("race_pterodacti_home"),entity:F("race_pterodacti_entity"),traits:{leathery:1,pessimistic:1},solar:{red:F("race_pterodacti_solar_red"),hell:F("race_pterodacti_solar_hell"),gas:F("race_pterodacti_solar_gas"),gas_moon:F("race_pterodacti_solar_gas_moon"),dwarf:F("race_pterodacti_solar_dwarf")},fanaticism:"leathery",basic:()=>!0},dracnid:{name:F("race_dracnid"),desc:F("race_dracnid_desc"),type:"avian",home:F("race_dracnid_home"),entity:F("race_dracnid_entity"),traits:{hoarder:1,solitary:1},solar:{red:F("race_dracnid_solar_red"),hell:F("race_dracnid_solar_hell"),gas:F("race_dracnid_solar_gas"),gas_moon:F("race_dracnid_solar_gas_moon"),dwarf:F("race_dracnid_solar_dwarf")},fanaticism:"hoarder",basic:()=>!0},entish:{name:F(Li("entish")?"race_spruce":"race_entish"),desc:F(Li("entish")?"race_spruce_desc":"race_entish_desc"),type:"plant",home:F(Li("entish")?"race_spruce_home":"race_entish_home"),entity:F(Li("entish")?"race_spruce_entity":"race_entish_entity"),traits:{kindling_kindred:1,pyrophobia:1},solar:{red:F(Li("entish")?"race_spruce_solar_red":"race_entish_solar_red"),hell:F(Li("entish")?"race_spruce_solar_hell":"race_entish_solar_hell"),gas:F(Li("entish")?"race_spruce_solar_gas":"race_entish_solar_gas"),gas_moon:F(Li("entish")?"race_spruce_solar_gas_moon":"race_entish_solar_gas_moon"),dwarf:F(Li("entish")?"race_spruce_solar_dwarf":"race_entish_solar_dwarf")},fanaticism:"kindling_kindred",basic:()=>!0},cacti:{name:F("race_cacti"),desc:F("race_cacti_desc"),type:"plant",home:F("race_cacti_home"),entity:F("race_cacti_entity"),traits:{hyper:1,skittish:1},solar:{red:F("race_cacti_solar_red"),hell:F("race_cacti_solar_hell"),gas:F("race_cacti_solar_gas"),gas_moon:F("race_cacti_solar_gas_moon"),dwarf:F("race_cacti_solar_dwarf")},fanaticism:"hyper",basic:()=>!0},pinguicula:{name:F("race_pinguicula"),desc:F("race_pinguicula_desc"),type:"plant",home:F("race_pinguicula_home"),entity:F("race_pinguicula_entity"),traits:{fragrant:1,sticky:1},solar:{red:F("race_pinguicula_solar_red"),hell:F("race_pinguicula_solar_hell"),gas:F("race_pinguicula_solar_gas"),gas_moon:F("race_pinguicula_solar_gas_moon"),dwarf:F("race_pinguicula_solar_dwarf")},fanaticism:"sticky",basic:()=>!0},sporgar:{name:F("race_sporgar"),desc:F("race_sporgar_desc"),type:"fungi",home:F("race_sporgar_home"),entity:F("race_sporgar_entity"),traits:{infectious:1,parasite:1},solar:{red:F("race_sporgar_solar_red"),hell:F("race_sporgar_solar_hell"),gas:F("race_sporgar_solar_gas"),gas_moon:F("race_sporgar_solar_gas_moon"),dwarf:F("race_sporgar_solar_dwarf")},fanaticism:"infectious",basic:()=>!1},shroomi:{name:F("race_shroomi"),desc:F("race_shroomi_desc"),type:"fungi",home:F("race_shroomi_home"),entity:F("race_shroomi_entity"),traits:{toxic:1,nyctophilia:1},solar:{red:F("race_shroomi_solar_red"),hell:F("race_shroomi_solar_hell"),gas:F("race_shroomi_solar_gas"),gas_moon:F("race_shroomi_solar_gas_moon"),dwarf:F("race_shroomi_solar_dwarf")},fanaticism:"toxic",basic:()=>!0},moldling:{name:F("race_moldling"),desc:F("race_moldling_desc"),type:"fungi",home:F("race_moldling_home"),entity:F("race_moldling_entity"),traits:{infiltrator:1,hibernator:1},solar:{red:F("race_moldling_solar_red"),hell:F("race_moldling_solar_hell"),gas:F("race_moldling_solar_gas"),gas_moon:F("race_moldling_solar_gas_moon"),dwarf:F("race_moldling_solar_dwarf")},fanaticism:"infiltrator",basic:()=>!0},mantis:{name:F("race_mantis"),desc:F("race_mantis_desc"),type:"insectoid",home:F("race_mantis_home"),entity:F("race_mantis_entity"),traits:{cannibalize:1,malnutrition:1},solar:{red:F("race_mantis_solar_red"),hell:F("race_mantis_solar_hell"),gas:F("race_mantis_solar_gas"),gas_moon:F("race_mantis_solar_gas_moon"),dwarf:F("race_mantis_solar_dwarf")},fanaticism:"cannibalize",basic:()=>!0},scorpid:{name:F("race_scorpid"),desc:F("race_scorpid_desc"),type:"insectoid",home:F("race_scorpid_home"),entity:F("race_scorpid_entity"),traits:{claws:1,atrophy:1},solar:{red:F("race_scorpid_solar_red"),hell:F("race_scorpid_solar_hell"),gas:F("race_scorpid_solar_gas"),gas_moon:F("race_scorpid_solar_gas_moon"),dwarf:F("race_scorpid_solar_dwarf")},fanaticism:"claws",basic:()=>!0},antid:{name:F("race_antid"),desc:F("race_antid_desc"),type:"insectoid",home:F("race_antid_home"),entity:F("race_antid_entity"),traits:{hivemind:1,tunneler:1},solar:{red:F("race_antid_solar_red"),hell:F("race_antid_solar_hell"),gas:F("race_antid_solar_gas"),gas_moon:F("race_antid_solar_gas_moon"),dwarf:F("race_antid_solar_dwarf")},fanaticism:"hivemind",basic:()=>!0},sharkin:{name:F("race_sharkin"),desc:F("race_sharkin_desc"),type:"aquatic",home:F("race_sharkin_home"),entity:F("race_sharkin_entity"),traits:{blood_thirst:1,apex_predator:1},solar:{red:F("race_sharkin_solar_red"),hell:F("race_sharkin_solar_hell"),gas:F("race_sharkin_solar_gas"),gas_moon:F("race_sharkin_solar_gas_moon"),dwarf:F("race_sharkin_solar_dwarf")},fanaticism:"blood_thirst",basic:()=>!!["oceanic","swamp"].includes(t.city.biome)},octigoran:{name:F("race_octigoran"),desc:F("race_octigoran_desc"),type:"aquatic",home:F("race_octigoran_home"),entity:F("race_octigoran_entity"),traits:{invertebrate:1,suction_grip:1},solar:{red:F("race_octigoran_solar_red"),hell:F("race_octigoran_solar_hell"),gas:F("race_octigoran_solar_gas"),gas_moon:F("race_octigoran_solar_gas_moon"),dwarf:F("race_octigoran_solar_dwarf")},fanaticism:"suction_grip",basic:()=>!!["oceanic","swamp"].includes(t.city.biome)},dryad:{name:F("race_dryad"),desc:F("race_dryad_desc"),type:"fey",home:F("race_dryad_home"),entity:F("race_dryad_entity"),traits:{befuddle:1,environmentalist:1,kindling_kindred:1},solar:{red:F("race_dryad_solar_red"),hell:F("race_dryad_solar_hell"),gas:F("race_dryad_solar_gas"),gas_moon:F("race_dryad_solar_gas_moon"),dwarf:F("race_dryad_solar_dwarf")},fanaticism:"befuddle",basic:()=>!!["forest","swamp","taiga"].includes(t.city.biome)},satyr:{name:F("race_satyr"),desc:F("race_satyr_desc"),type:"fey",home:F("race_satyr_home"),entity:F("race_satyr_entity"),traits:{unorganized:1,musical:1},solar:{red:F("race_satyr_solar_red"),hell:F("race_satyr_solar_hell"),gas:F("race_satyr_solar_gas"),gas_moon:F("race_satyr_solar_gas_moon"),dwarf:F("race_satyr_solar_dwarf")},fanaticism:"musical",basic:()=>!!["forest","swamp","taiga"].includes(t.city.biome)},phoenix:{name:F("race_phoenix"),desc:F("race_phoenix_desc"),type:"heat",home:F("race_phoenix_home"),entity:F("race_phoenix_entity"),traits:{revive:1,slow_regen:1},solar:{red:F("race_phoenix_solar_red"),hell:F("race_phoenix_solar_hell"),gas:F("race_phoenix_solar_gas"),gas_moon:F("race_phoenix_solar_gas_moon"),dwarf:F("race_phoenix_solar_dwarf")},fanaticism:"revive",basic:()=>!!["volcanic","ashland"].includes(t.city.biome)},salamander:{name:F("race_salamander"),desc:F("race_salamander_desc"),type:"heat",home:F("race_salamander_home"),entity:F("race_salamander_entity"),traits:{forge:1,autoignition:1},solar:{red:F("race_salamander_solar_red"),hell:F("race_salamander_solar_hell"),gas:F("race_salamander_solar_gas"),gas_moon:F("race_salamander_solar_gas_moon"),dwarf:F("race_salamander_solar_dwarf")},fanaticism:"forge",basic:()=>!!["volcanic","ashland"].includes(t.city.biome)},yeti:{name:F(Li("yeti")?"race_snowman":"race_yeti"),desc:F(Li("yeti")?"race_snowman_desc":"race_yeti_desc"),type:"polar",home:F(Li("yeti")?"race_snowman_home":"race_yeti_home"),entity:F(Li("yeti")?"race_snowman_entity":"race_yeti_entity"),traits:{blurry:1,snowy:1},solar:{red:F(Li("yeti")?"race_snowman_solar_red":"race_yeti_solar_red"),hell:F(Li("yeti")?"race_snowman_solar_hell":"race_yeti_solar_hell"),gas:F(Li("yeti")?"race_snowman_solar_gas":"race_yeti_solar_gas"),gas_moon:F(Li("yeti")?"race_snowman_solar_gas_moon":"race_yeti_solar_gas_moon"),dwarf:F(Li("yeti")?"race_snowman_solar_dwarf":"race_yeti_solar_dwarf")},fanaticism:"blurry",basic:()=>!!["tundra","taiga"].includes(t.city.biome)},wendigo:{name:F(Li("wendigo")?"race_krampus":"race_wendigo"),desc:F(Li("wendigo")?"race_krampus_desc":"race_wendigo_desc"),type:"polar",home:F(Li("wendigo")?"race_krampus_home":"race_wendigo_home"),entity:F(Li("wendigo")?"race_krampus_entity":"race_wendigo_entity"),traits:{ravenous:1,ghostly:1,soul_eater:1},solar:{red:F(Li("wendigo")?"race_krampus_solar_red":"race_wendigo_solar_red"),hell:F(Li("wendigo")?"race_krampus_solar_hell":"race_wendigo_solar_hell"),gas:F(Li("wendigo")?"race_krampus_solar_gas":"race_wendigo_solar_gas"),gas_moon:F(Li("wendigo")?"race_krampus_solar_gas_moon":"race_wendigo_solar_gas_moon"),dwarf:F(Li("wendigo")?"race_krampus_solar_dwarf":"race_wendigo_solar_dwarf")},fanaticism:"ghostly",basic:()=>!!["tundra","taiga"].includes(t.city.biome)},tuskin:{name:F("race_tuskin"),desc:F("race_tuskin_desc"),type:"sand",home:F("race_tuskin_home"),entity:F("race_tuskin_entity"),traits:{lawless:1,mistrustful:1},solar:{red:F("race_tuskin_solar_red"),hell:F("race_tuskin_solar_hell"),gas:F("race_tuskin_solar_gas"),gas_moon:F("race_tuskin_solar_gas_moon"),dwarf:F("race_tuskin_solar_dwarf")},fanaticism:"lawless",basic:()=>!!["desert","ashland"].includes(t.city.biome)},kamel:{name:F("race_kamel"),desc:F("race_kamel_desc"),type:"sand",home:F("race_kamel_home"),entity:F("race_kamel_entity"),traits:{humpback:1,thalassophobia:1},solar:{red:F("race_kamel_solar_red"),hell:F("race_kamel_solar_hell"),gas:F("race_kamel_solar_gas"),gas_moon:F("race_kamel_solar_gas_moon"),dwarf:F("race_kamel_solar_dwarf")},fanaticism:"humpback",basic:()=>!!["desert","ashland"].includes(t.city.biome)},balorg:{name:F("race_balorg"),desc:F("race_balorg_desc"),type:"demonic",home:F("race_balorg_home"),entity:F("race_balorg_entity"),traits:{fiery:1,terrifying:1,slaver:1},solar:{red:F("race_balorg_solar_red"),hell:F("race_balorg_solar_hell"),gas:F("race_balorg_solar_gas"),gas_moon:F("race_balorg_solar_gas_moon"),dwarf:F("race_balorg_solar_dwarf")},fanaticism:"fiery",basic:()=>"hellscape"===t.city.biome},imp:{name:F("race_imp"),desc:F("race_imp_desc"),type:"demonic",home:F("race_imp_home"),entity:F("race_imp_entity"),traits:{compact:1,conniving:1,pathetic:1},solar:{red:F("race_imp_solar_red"),hell:F("race_imp_solar_hell"),gas:F("race_imp_solar_gas"),gas_moon:F("race_imp_solar_gas_moon"),dwarf:F("race_imp_solar_dwarf")},fanaticism:"conniving",basic:()=>"hellscape"===t.city.biome},seraph:{name:F(Li("seraph")?"race_cherub":"race_seraph"),desc:F(Li("seraph")?"race_cherub_desc":"race_seraph_desc"),type:"angelic",home:F(Li("seraph")?"race_cherub_home":"race_seraph_home"),entity:F(Li("seraph")?"race_cherub_entity":"race_seraph_entity"),traits:{unified:1,spiritual:1,truthful:1},solar:{red:F(Li("seraph")?"race_cherub_solar_red":"race_seraph_solar_red"),hell:F(Li("seraph")?"race_cherub_solar_hell":"race_seraph_solar_hell"),gas:F(Li("seraph")?"race_cherub_solar_gas":"race_seraph_solar_gas"),gas_moon:F(Li("seraph")?"race_cherub_solar_gas_moon":"race_seraph_solar_gas_moon"),dwarf:F(Li("seraph")?"race_cherub_solar_dwarf":"race_seraph_solar_dwarf")},fanaticism:"spiritual",basic:()=>"eden"===t.city.biome},unicorn:{name:F("race_unicorn"),desc:F("race_unicorn_desc"),type:"angelic",home:F("race_unicorn_home"),entity:F("race_unicorn_entity"),traits:{rainbow:1,magnificent:1,noble:1},solar:{red:F("race_unicorn_solar_red"),hell:F("race_unicorn_solar_hell"),gas:F("race_unicorn_solar_gas"),gas_moon:F("race_unicorn_solar_gas_moon"),dwarf:F("race_unicorn_solar_dwarf")},fanaticism:"magnificent",basic:()=>"eden"===t.city.biome},synth:{name:F("race_synth"),desc(){let e=t.race.hasOwnProperty("srace")?t.race.srace:"human";return F("race_synth_desc",[Di[e].name])},type:"synthetic",home:F("race_synth_home"),entity:F("race_synth_entity"),traits:{imitation:1,emotionless:1,logical:1},solar:{red:F("race_synth_solar_red"),hell:F("race_synth_solar_hell"),gas:F("race_synth_solar_gas"),gas_moon:F("race_synth_solar_gas_moon"),dwarf:F("race_synth_solar_dwarf")},fanaticism:"logical",basic:()=>!1},nano:{name:F("race_nano"),desc:F("race_nano_desc"),type:"synthetic",home:F("race_nano_home"),entity:F("race_nano_entity"),traits:{deconstructor:1,linked:1,shapeshifter:1},solar:{red:F("race_nano_solar_red"),hell:F("race_nano_solar_hell"),gas:F("race_nano_solar_gas"),gas_moon:F("race_nano_solar_gas_moon"),dwarf:F("race_nano_solar_dwarf")},fanaticism:"shapeshifter",basic:()=>!1},ghast:{name:F("race_ghast"),desc:F("race_ghast_desc"),type:"eldritch",home:F("race_ghast_home"),entity:F("race_ghast_entity"),traits:{dark_dweller:1,swift:1,anthropophagite:1},solar:{red:F("race_ghast_solar_red"),hell:F("race_ghast_solar_hell"),gas:F("race_ghast_solar_gas"),gas_moon:F("race_ghast_solar_gas_moon"),dwarf:F("race_ghast_solar_dwarf")},fanaticism:"swift",basic:()=>!1},shoggoth:{name:F("race_shoggoth"),desc:F("race_shoggoth_desc"),type:"eldritch",home:F("race_shoggoth_home"),entity:F("race_shoggoth_entity"),traits:{living_tool:1,bloated:1},solar:{red:F("race_shoggoth_solar_red"),hell:F("race_shoggoth_solar_hell"),gas:F("race_shoggoth_solar_gas"),gas_moon:F("race_shoggoth_solar_gas_moon"),dwarf:F("race_shoggoth_solar_dwarf")},fanaticism:"living_tool",basic:()=>!1},junker:{name:Li("junker")?F("race_ghoul"):F("race_junker"),desc:Li("junker")?F("race_ghoul_desc"):F("race_junker_desc"),type:t.race.hasOwnProperty("jtype")?t.race.jtype:"humanoid",home:Li("junker")?F("race_ghoul_home"):F("race_junker_home"),entity:Li("junker")?F("race_ghoul_entity"):F("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")?F("race_ghoul_solar_red"):F("race_junker_solar_red"),hell:Li("junker")?F("race_ghoul_solar_hell"):F("race_junker_solar_hell"),gas:Li("junker")?F("race_ghoul_solar_gas"):F("race_junker_solar_gas"),gas_moon:Li("junker")?F("race_ghoul_solar_gas_moon"):F("race_junker_solar_gas_moon"),dwarf:Li("junker")?F("race_ghoul_solar_dwarf"):F("race_junker_solar_dwarf")},fanaticism:"none",basic:()=>!1},sludge:{name:F("race_sludge"),desc:F("race_sludge_desc"),type:t.race.hasOwnProperty("jtype")?t.race.jtype:"humanoid",home:F("race_sludge_home"),entity:F("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:F("race_sludge_solar_red"),hell:F("race_sludge_solar_hell"),gas:F("race_sludge_solar_gas"),gas_moon:F("race_sludge_solar_gas_moon"),dwarf:F("race_sludge_solar_dwarf")},fanaticism:"ooze",basic:()=>!1},custom:function(){if(t.hasOwnProperty("custom")&&t.custom.hasOwnProperty("race0")){let e={};for(let a=0;aKi[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{}}()},Bi={organism:{},humanoid:{},carnivore:{},herbivore:{},omnivore:{},small:{},giant:{},reptilian:{},avian:{},insectoid:{},plant:{},fungi:{},aquatic:{},fey:{},heat:{},polar:{},sand:{},demonic:{},angelic:{},synthetic:{},eldritch:{}};function Gi(e,a){let r=1,i=D("theorist",1);!i||"factory"!==a&&"miner"!==a&&"lumberjack"!==a||(r*=1-i/100);let s=D("inspirational",0);!s||"farmer"!==a&&"factory"!==a&&"miner"!==a&&"lumberjack"!==a||(r*=1+s/100);let n=D("dirty_jobs",2);if(n&&"miner"===a&&(r*=1+n/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+Ki.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+Ki.powered.vars()[1]/100),t.race.artifical&&"science"===a&&(r*=1+Ki.artifical.vars()[0]/100),t.race.hivemind&&"farmer"!==a&&!t.race.lone_survivor){let i=Ki.hivemind.vars()[0],s=.05;t.race.high_pop&&"army"!==a&&"hellArmy"!==a&&(i*=Ki.high_pop.vars()[0],s=.5/(Ki.hivemind.vars()[0]*Ki.high_pop.vars()[0])),r*=e<=i?e*s+(1-i*s):1-("army"===a||"hellArmy"===a?.99:t.race.high_pop?.985:.98)**(e-i)+1}let c=as("antid");if(c>0&&(r*=1+(1-("army"===a||"hellArmy"===a?.99:t.race.high_pop?.985:.98)**(e*c/4))/2),t.race.cold_blooded&&"army"!==a&&"hellArmy"!==a&&"factory"!==a&&"science"!==a){switch(t.city.calendar.temp){case 0:r*=1-Ki.cold_blooded.vars()[0]/100;break;case 2:r*=1+Ki.cold_blooded.vars()[1]/100;break;default:r*=1}switch(t.city.calendar.weather){case 0:r*=1-Ki.cold_blooded.vars()[0]/100;break;case 2:r*=1+Ki.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+Ki.cannibalize.vars()[0]/100),"lumberjack"===a&&t.city.s_alter.harvest>0&&(r*=1+Ki.cannibalize.vars()[0]/100),("army"===a||"hellArmy"===a)&&t.city.s_alter.rage>0&&(r*=1+Ki.cannibalize.vars()[0]/100),"science"===a&&t.city.s_alter.mind>0&&(r*=1+Ki.cannibalize.vars()[0]/100));let o=as("mantis");o>0&&("miner"===a&&(r*=1+Ki.cannibalize.vars(1)[0]/100*o),"lumberjack"===a&&(r*=1+Ki.cannibalize.vars(1)[0]/100*o),"army"!==a&&"hellArmy"!==a||(r*=1+Ki.cannibalize.vars(1)[0]/100*o),"science"===a&&(r*=1+Ki.cannibalize.vars(1)[0]/100*o)),!t.race.humpback||"miner"!==a&&"lumberjack"!==a||(r*=1+Ki.humpback.vars()[0]/100);let l=as("kamel");l>0&&("miner"===a||"lumberjack"===a)&&(r*=1+Ki.humpback.vars(1)[0]/100*l),t.city.ptrait.includes("magnetic")&&"miner"===a&&(r*=ns.magnetic.vars()[2]),!t.race.weak||"miner"!==a&&"lumberjack"!==a||(r*=1-Ki.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+Ki.toxic.vars()[2]/100);let _=as("shroomi");if(_>0&&"factory"===a&&(r*=1+Ki.toxic.vars(1)[2]/100*_),t.race.hardy&&"factory"===a&&(r*=1+Ki.hardy.vars()[0]*t.race.hardy/100),t.race.analytical&&"science"===a&&(r*=1+Ki.analytical.vars()[0]*t.race.analytical/100),t.race.ooze&&(r*=1-Ki.ooze.vars()[0]/100),"democracy"===t.civic.govern.type&&(r*=1-ee.democracy()[1]/100),!t.tech.cyber_worker||"lumberjack"!==a&&"miner"!==a||(r*=1.25),"hunting"===a){t.race.tracker&&(r*=1+Ki.tracker.vars()[0]/100);let e=as("wolven");e>0&&(r*=1+Ki.tracker.vars(1)[0]/100*e),t.race.beast&&(r*=1+(1===t.city.calendar.wind?Ki.beast.vars()[1]:Ki.beast.vars()[0])/100),t.race.apex_predator&&(r*=1+Ki.apex_predator.vars()[1]/100);let a=as("sharkin");a>0&&(r*=1+Ki.apex_predator.vars(1)[1]/100*a),t.race.fiery&&(r*=1+Ki.fiery.vars()[1]/100);let i=as("balorg");i>0&&(r*=1+Ki.fiery.vars(1)[1]/100*i),t.race.fragrant&&(r*=1-Ki.fragrant.vars()[0]/100),t.city.ptrait.includes("rage")&&(r*=ns.rage.vars()[1]),t.race.cunning&&(r*=1+Ki.cunning.vars()[0]*t.race.cunning/100),"savanna"===t.city.biome&&(r*=ss.savanna.vars()[1]),t.race.dark_dweller&&2===t.city.calendar.weather&&(r*=1-Ki.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+Ki.living_tool.vars()[0]*(t.tech.science&&t.tech.science>0?.12*t.tech.science:0)),t.race.high_pop&&(r=$e(r)),r}function Ni(e){let a=[];Object.keys(Ki).forEach((function(e){"minor"!==Ki[e].type||t.race[e]||a.push(e)})),0===a.length&&Object.keys(Ki).forEach((function(e){"minor"===Ki[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 Ri(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 Hi(e,a,r,i){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]):i&&(t[e][a]=i)}function Ui(e,a){t[e].hasOwnProperty(a)&&(t.race.purgatory[e][a]=t[e][a],delete t[e][a])}function Vi(e,a){if(t.race.purgatory[e].hasOwnProperty(a))return t.race.purgatory[e][a]}function Wi(){Qi("Lumber"),Qi("Plywood"),gs(["city-graveyard","city-lumber_yard","city-sawmill"]),vs(["reclaimer","axe","saw"]),Ui("city","sawmill"),Ui("city","graveyard"),Ui("city","lumber_yard"),Ui("tech","axe"),Ui("tech","reclaimer"),Ui("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,$i()),t.city.s_alter&&(t.city.s_alter.harvest=0)}function Qi(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,na()),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 Ji(){let e=Vr(Sr.tech.agriculture),a=Vr(Sr.tech.smokehouse),r=Vr(Sr.tech.reclaimer)||Vr(Sr.tech.stone_axe),s=Vr(Sr.tech.alt_lodge),n=Vr(Sr.tech.wind_plant),c=[],o=[];if(!t.race.artifical){if(["agriculture","farm","hunting","s_lodge","wind_plant","compost","soul_eater"].forEach((function(e){Ui("tech",e)})),["silo","farm","mill","windmill","smokehouse","lodge","compost","soul_well"].forEach((function(e){Ui("city",e)})),s){Ri("tech","s_lodge");let e=Vi("tech","farm")>=1||Vi("tech","hunting")>=2?1:0;e>0&&(!t.tech.s_lodge||t.tech.s_lodge=1&&Hi("city","lodge","farm",{count:0})}if(a){Ri("tech","hunting");let e=Vi("tech","farm")>=1||Vi("tech","s_lodge")>=1?2:Vi("tech","agriculture")>=3?1:0;e>0&&(!t.tech.hunting||t.tech.hunting=1&&Hi("city","smokehouse","silo",{count:0}),t.tech.hunting>=2&&!s&&Hi("city","lodge","farm",{count:0})}else o.push("hunting"),c.push("city-smokehouse"),s||o.push("city-lodge");if(e){Ri("tech","farm");let e=Vi("tech","hunting")>=2||Vi("tech","s_lodge")>=1?1:0;e>0&&(!t.tech.farm||t.tech.farm=1?3:Vi("tech","s_lodge")>=1?1:0;a>0&&(!t.tech.agriculture||t.tech.agriculture=1&&Hi("city","farm","lodge",{count:0}),t.tech.agriculture>=3&&Hi("city","silo","smokehouse",{count:0}),t.tech.agriculture>=4&&!n&&Hi("city","mill","windmill",{count:0,on:0})}else o.push("agriculture","farm"),c.push("city-farm","city-silo","city-mill");t.race.soul_eater?(Ri("tech","soul_eater"),Ri("city","soul_well")):(c.push("city-soul_well"),o.push("soul_eater")),t.race.detritivore?(Ri("tech","compost"),Ri("city","compost")):(o.push("compost"),c.push("city-compost")),n?(Ri("tech","wind_plant"),t.tech.wind_plant>=1&&Hi("city","windmill","mill",{count:0,on:0})):(o.push("wind_plant"),c.push("city-windmill"),delete i[F("city_mill_title2")])}let l=[],_=[];!t.race.orbit_decayed&&e&&t.tech.agriculture>=1&&t.city.farm.count>0?l.push("farmer"):_.push("farmer"),t.race.carnivore&&!t.race.herbivore||t.race.soul_eater||t.race.unfathomable?(l.push("hunter"),_.push("unemployed")):(_.push("hunter"),l.push("unemployed")),!t.race.orbit_decayed&&r?l.push("lumberjack"):_.push("lumberjack"),l.forEach((function(e){t.civic[e].display||(t.civic[e].workers=0,t.civic[e].display=!0)})),_.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),$i()),gs(c),vs(o),Ra("Food")}function Zi(a){switch(a){case"high_pop":t.resource[t.race.species].amount=Math.round(t.resource[t.race.species].amount*Ki.high_pop.vars()[0]),t.civic.hasOwnProperty("garrison")&&(t.civic.garrison.workers=Math.round(t.civic.garrison.workers*Ki.high_pop.vars()[0]));break;case"kindling_kindred":if(t.race.smoldering)break;Wi();break;case"smoldering":if(t.resource.Chrysotile.display=!0,t.race.kindling_kindred)break;Wi();break;case"forge":$i();break;case"soul_eater":ra("lumberjack");case"detritivore":case"carnivore":case"herbivore":Ji();break;case"unfathomable":for(Ji(),t.city.hasOwnProperty("surfaceDwellers")||(t.city.surfaceDwellers=[]);t.city.surfaceDwellers.lengthKi.unfathomable.vars()[0]&&(t.city.surfaceDwellers.length=Ki.unfathomable.vars()[0]),t.race.psychic&&os();break;case"flier":Ra("Stone"),Ra("Brick"),t.resource.Cement.display=!1,t.civic.cement_worker.display=!1,t.civic.cement_worker.workers=0,Ui("tech","cement"),Ui("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,Ra("Stone"),Ui("tech","hammer"),Ui("city","rock_quarry");break;case"apex_predator":vs(["armor"]),Ui("tech","armor");break;case"environmentalist":delete i[F("city_coal_power")],delete i[F("city_mana_engine")],delete i[F("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),gs(["city-trade"]),vs(["trade"]),Ui("tech","trade"),Ui("city","trade");break;case"slaver":Ri("tech","slaves"),t.tech.slaves>=1&&(Ri("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":Ri("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&&Ri("city","shrine",{count:0,morale:0,metal:0,know:0,tax:0});break;case"unified":t.tech.world_control=1,t.tech.unify=2,Cs($("#garrison")),Cs($("#c_garrison")),me($("#garrison"),!0),me($("#c_garrison"),!1);for(let e=0;e<3;e++){if(t.civic.foreign[`gov${e}`].occ){let a=aa("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&&Pn("godwin");break;case"thalassophobia":gs(["city-wharf"]),vs(["wharf"]),Ui("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))),j.w?(ps("stop"),ps("start")):window.location.reload();case"hyper":e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),j.w?(ps("stop"),ps("start")):window.location.reload();case"calm":t.tech.primitive>=3&&(Ri("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,Ri("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":es(!1,!0);break;case"imitation":Yi(!0);break;case"evil":Ra("Lumber"),Ra("Furs"),Ra("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),Ls(!0)}}function Xi(a,r){switch(a){case"high_pop":t.resource[t.race.species].amount=Math.round(t.resource[t.race.species].amount/Ki.high_pop.vars(r)[0]),t.civic.hasOwnProperty("garrison")&&(t.civic.garrison.workers=Math.round(t.civic.garrison.workers/Ki.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&&$i(),Ri("city","sawmill"),Ri("city","graveyard"),Ri("city","lumber_yard"),Ri("tech","axe"),Ri("tech","reclaimer"),Ri("tech","saw"),!t.tech.axe&&!t.tech.reclaimer||t.race.orbit_decayed||(t.civic.lumberjack.display=!0);break;case"smoldering":if(Qi("Chrysotile"),t.race.kindling_kindred)break;t.resource.Lumber.display=!0,t.tech.foundry&&(t.resource.Plywood.display=!0),t.race.casting&&$i(),Ri("city","sawmill"),Ri("city","graveyard"),Ri("city","lumber_yard"),Ri("tech","axe"),Ri("tech","reclaimer"),Ri("tech","saw"),!t.tech.axe&&!t.tech.reclaimer||t.race.orbit_decayed||(t.civic.lumberjack.display=!0);break;case"forge":$i();break;case"soul_eater":ra("lumberjack");case"detritivore":case"carnivore":case"herbivore":case"unfathomable":Ji(),t.race.psychic&&os();break;case"flier":Ra("Stone"),Ra("Brick"),Ri("tech","cement"),t.tech.cement&&(Ri("city","cement_plant"),t.resource.Cement.display=!0,t.civic.cement_worker.display=!0);break;case"sappy":Ra("Stone"),Ri("tech","hammer"),t.tech.mining>=1&&(Ri("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":Ri("tech","armor");break;case"environmentalist":delete i[F("city_hydro_power")],delete i[F("city_wind_power")];break;case"terrifying":t.settings.showMarket=!0,Ri("tech","trade"),Ri("city","trade");break;case"slaver":gs(["city-slave_pen"]),vs(["slaves"]),Ui("city","slave_pen"),Ui("tech","slaves"),t.resource.Slave.amount=0,t.resource.Slave.max=0,t.resource.Slave.display=!1,B("slave");break;case"cannibalize":gs(["city-s_alter"]),vs(["sacrifice"]),Ui("tech","sacrifice"),delete t.city.s_alter,B("sacrifice");break;case"magnificent":gs(["city-shrine"]),Ui("city","shrine");break;case"thalassophobia":t.tech.wharf&&Ri("city","wharf",{count:0});break;case"hooved":gs(["city-horseshoe","space-horseshoe"]),t.resource.Horseshoe.display=!1,B("horseshoe");break;case"slow":e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),j.w?(ps("stop"),ps("start")):window.location.reload();case"hyper":e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),j.w?(ps("stop"),ps("start")):window.location.reload();case"calm":gs(["city-meditation"]),t.resource.Zen.display=!1,Ui("city","meditation");break;case"blood_thirst":delete t.race.blood_thirst_count;break;case"deconstructor":gs(["city-nanite_factory"]),t.resource.Nanite.display=!1,Ui("city","nanite_factory");break;case"shapeshifter":Cs($("#sshifter")),es();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],Xi(e,a)}else t.race[e]=t.race.iTraits[e]})),delete t.race.iTraits);break;case"evil":Ra("Lumber"),Ra("Furs"),Ra("Plywood");break;case"psychic":t.resource.Energy.display=!1,t.settings.showPsychic=!1;break;case"ooze":delete t.race.gross_enabled,Ls(!0)}}function Yi(e){if(t.race.imitation&&t.race.srace){t.race.iTraits||(t.race.iTraits={}),t.race.shapeshifter&&es(t.race.ss_genus===Di[t.race.srace].type&&"none",!0);let a=[];if(Object.keys(Ei[Di[t.race.srace].type]).forEach((function(e){t.race[e]||a.push(e)})),"custom"===t.race.srace){let e=["evil","evil"];Object.keys(Di[t.race.srace].traits).forEach((function(t){Ki[t].val>Ki[e[0]].val?e[0]=t:Ki[t].val=0?t.race[e]=Ki.shapeshifter.vars()[0]:t.race[e]=Ki.shapeshifter.vars()[1],Zi(e),r.push(e))})),t.race.ss_genus=e),a){Cs($("#sshifter")),t.race.ss_genus=t.race.hasOwnProperty("ss_genus")?t.race.ss_genus:"none";let e="";Object.keys(Ei).forEach((function(a){"synthetic"!==a&&"eldritch"!==a&&a!==Di[t.race.species].type&&(!t.race.imitation||a!==Di[t.race.srace].type)&&t.stats.achieve[`genus_${a}`]&&t.stats.achieve[`genus_${a}`].l>0&&(e+=`{{ '${a}' | genus }}`)})),$("#sshifter").append(`${F("trait_shapeshifter_name")}: \n \n {{ 'none' | genus }}${e}\n `),zs({el:"#sshifter",data:t.race,methods:{setShape(e){es(e)}},filters:{genus:e=>F(`genelab_genus_${e}`)}})}t.race.ss_traits=r}function ts(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 as(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 rs(e,a){switch(e){case"name":{let e={hooved:is(!1),promiscuous:t.race.artifical?F("trait_promiscuous_synth_name"):Ki.promiscuous.name};return a?e[a]?e[a]:Ki[a].name:e}case"desc":{let e={hooved:is(!0),promiscuous:t.race.artifical?F("trait_promiscuous_synth"):Ki.promiscuous.desc};return a?e[a]?e[a]:Ki[a].desc:e}}}function is(e){return t.race.sludge?F(e?"trait_hooved_slime":"trait_hooved_slime_name"):["cath","wolven","dracnid","seraph","cyclops","kobold","tuskin","sharkin"].includes(t.race.species)?F(e?`trait_hooved_${t.race.species}`:`trait_hooved_${t.race.species}_name`):["humanoid","avian","plant","fungi","reptilian","fey","synthetic"].includes(Di[t.race.species].type)?F(e?`trait_hooved_${Di[t.race.species].type}`:`trait_hooved_${Di[t.race.species].type}_name`):e?Ki.hooved.desc:Ki.hooved.name}Object.keys(Bi).forEach((function(e){let t="organism"===e?"humanoid":e;Bi[e].solar={titan:F(`genus_${t}_solar_titan`),enceladus:F(`genus_${t}_solar_enceladus`),triton:F(`genus_${t}_solar_triton`),eris:F(`genus_${t}_solar_eris`)}}));const ss={grassland:{label:F("biome_grassland_name"),desc:F("biome_grassland"),vars:()=>t.race.rejuvenated?[1.25]:[1.2],wiki:["%"]},oceanic:{label:F("biome_oceanic_name"),desc:F("biome_oceanic"),vars:()=>t.race.rejuvenated?[1.25,1.12,.92]:[1.12,1.06,.95],wiki:["%","%","%"]},forest:{label:F("biome_forest_name"),desc:F("biome_forest"),vars:()=>t.race.rejuvenated?[1.35]:[1.2],wiki:["%"]},desert:{label:F("biome_desert_name"),desc:F("biome_desert"),vars:()=>t.race.rejuvenated?[1.35,1.18,.6]:[1.2,1.1,.75],wiki:["%","%","%"]},volcanic:{label:F("biome_volcanic_name"),desc:F("biome_volcanic"),vars:()=>t.race.rejuvenated?[.8,1.25,1.15]:[.9,1.12,1.08],wiki:["%","%","%"]},tundra:{label:F("biome_tundra_name"),desc:F("biome_tundra"),vars:()=>t.race.rejuvenated?[1.5,.8]:[1.25,.9],wiki:["%","%"]},savanna:{label:F("biome_savanna_name"),desc:F("biome_savanna"),vars:()=>t.race.rejuvenated?[1.18,1.25,.75]:[1.1,1.18,.8],wiki:["%","%","%"]},swamp:{label:F("biome_swamp_name"),desc:F("biome_swamp"),vars:()=>t.race.rejuvenated?[1.6,1.35,1.15,.78]:[1.4,1.25,1.1,.88],wiki:["%","%","%","%"]},ashland:{label:F("biome_ashland_name"),desc:F("biome_ashland"),vars:()=>t.race.rejuvenated?[.55,1.35,1.2]:[.62,1.25,1.1],wiki:["%","%","%"]},taiga:{label:F("biome_taiga_name"),desc:F("biome_taiga"),vars:()=>t.race.rejuvenated?[1.2,1.65,.88]:[1.1,1.5,.92],wiki:["%","%","%"]},hellscape:{label:F("biome_hellscape_name"),desc:F("biome_hellscape"),vars:()=>t.race.rejuvenated?[.2]:[.25],wiki:["%"]},eden:{label:F("biome_eden_name"),desc:F("biome_eden")}},ns={toxic:{label:F("planet_toxic"),desc:F("planet_toxic_desc"),vars:()=>t.race.rejuvenated?[2,1.5]:[1,1.25],wiki:["A","-%"]},mellow:{label:F("planet_mellow"),desc:F("planet_mellow_desc"),vars:()=>t.race.rejuvenated?[2,3,.88]:[1.5,2,.9],wiki:["%","A","%"]},rage:{label:F("planet_rage"),desc:F("planet_rage_desc"),vars:()=>t.race.rejuvenated?[1.1,1.05,1]:[1.05,1.02,1],wiki:["%","%","A"]},stormy:{label:F("planet_stormy"),desc:F("planet_stormy_desc")},ozone:{label:F("planet_ozone"),desc:F("planet_ozone_desc"),vars:()=>t.race.rejuvenated?[.18]:[.25],wiki:["-A"]},magnetic:{label:F("planet_magnetic"),desc:F("planet_magnetic_desc"),vars:()=>t.race.rejuvenated?[2,150,.98]:[1,100,.985],wiki:["A","A","%"]},trashed:{label:F("planet_trashed"),desc:F("planet_trashed_desc"),vars:()=>t.race.rejuvenated?[.8,1.2]:[.75,1],wiki:["%","%"]},elliptical:{label:F("planet_elliptical"),desc:F("planet_elliptical_desc")},flare:{label:F("planet_flare"),desc:F("planet_flare_desc")},dense:{label:F("planet_dense"),desc:F("planet_dense_desc"),vars:()=>t.race.rejuvenated?[1.5,1.2,1.35]:[1.2,1,1.2],wiki:["%","A","%"]},unstable:{label:F("planet_unstable"),desc:F("planet_unstable_desc")},permafrost:{label:F("planet_permafrost"),desc:F("planet_permafrost_desc"),vars:()=>t.race.rejuvenated?[.7,125]:[.75,100],wiki:["%","A"]},retrograde:{label:F("planet_retrograde"),desc:F("planet_retrograde_desc")}};function cs(e){e=e||[];let t=Object.keys(Di).filter((function(t){return Di[t].basic()&&!e.includes(t)}));return t[tn(t)]}function os(){if(!t.settings.tabLoad&&(2!==t.settings.civTabs||6!==t.settings.govTabs))return;let e=$("#psychicPowers");Cs(e),t.race.psychic&&t.tech.psychic&&(function(e){let a=$('
                  ');e.append(a),a.append($(`
                  ${F("psychic_boost_title")}
                  `));let r=$("
                  ");a.append(r);let i="";if(Object.keys(Aa).forEach((function(e){t.resource[e].display&&(i+=`${t.resource[e].name}`)})),r.append(`
                  ${i}
                  `),a.append('
                  '),t.tech.psychic>=4){let e=$(`
                  ${F("psychic_channel")}
                  `),t=$('{{ c.boost }}'),r=$(`«`),i=$(`»`);e.append(r),e.append(t),e.append(i),a.append(e)}let s=t.tech.psychic>=5?60:75,n=t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg?t.stats.achieve.nightmare.mg:0;zs({el:"#psychicBoost",data:{b:t.race.psychicPowers.boost,c:t.tech.psychic>=4?t.race.psychicPowers.channel:{}},methods:{boostVal(){t.resource.Energy.amount>=s&&(t.resource.Energy.amount-=s,t.race.psychicPowers.boostTime=72*n)},add(){let e=b();for(let a=0;a0;a++)t.race.psychicPowers.channel.boost--}},filters:{boost:e=>F("psychic_boost_button",[t.resource[e]?t.resource[e].name:"N/A",s]),boostTime:()=>t.race.psychicPowers.boostTime>0?F("psychic_boost_time",[t.race.psychicPowers.boostTime]):""}});const c=document.getElementById("psyhscrolltarget");c.addEventListener("wheel",(e=>{e.preventDefault(),c.scrollLeft+=e.deltaY})),_s("psychicBoost",(function(){return F("psychic_boost_desc",[Ki.psychic.vars()[3]])}),{elm:"#psychicBoost > div > button"})}(e),function(e){let a=$('
                  ');e.append(a),a.append($(`
                  ${F("psychic_murder_title")}
                  `)),a.append('
                  ');let r=t.tech.psychic>=5?8:10;zs({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&&xs("Food",1e4*Ki.anthropophagite.vars()[0]),10===t.stats.psykill&&os())}},filters:{kill:()=>F("psychic_murder_button",[r])}}),_s("psychicKill",(function(){return F("psychic_murder_desc")}),{elm:"#psychicKill > div > button"})}(e),t.tech.psychic>=2&&function(e){let a=$('
                  ');if(e.append(a),a.append($(`
                  ${F("psychic_assault_title")}
                  `)),a.append('
                  '),t.tech.psychic>=4){let e=$(`
                  ${F("psychic_channel")}
                  `),t=$('{{ assault }}'),r=$(`«`),i=$(`»`);e.append(r),e.append(t),e.append(i),a.append(e)}let r=t.tech.psychic>=5?36:45,i=t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg?t.stats.achieve.nightmare.mg:0;zs({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*i)},add(){let e=b();for(let a=0;a0;a++)t.race.psychicPowers.channel.assault--}},filters:{boost:()=>F("psychic_boost_button",[F("psychic_attack"),r]),boostTime:()=>t.race.psychicPowers.assaultTime>0?F("psychic_boost_time",[t.race.psychicPowers.assaultTime]):""}}),_s("psychicAssault",(function(){return F("psychic_assault_desc",[Ki.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($(`
                  ${F("psychic_profit_title")}
                  `)),a.append('
                  '),t.tech.psychic>=4){let e=$(`
                  ${F("psychic_channel")}
                  `),t=$('{{ cash }}'),r=$(`«`),i=$(`»`);e.append(r),e.append(t),e.append(i),a.append(e)}let r=t.tech.psychic>=5?52:65,i=t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg?t.stats.achieve.nightmare.mg:0;zs({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*i)},add(){let e=b();for(let a=0;a0;a++)t.race.psychicPowers.channel.cash--}},filters:{boost:()=>F("psychic_boost_button",[F("psychic_profit"),r]),boostTime:()=>t.race.psychicPowers.cash>0?F("psychic_boost_time",[t.race.psychicPowers.cash]):""}}),_s("psychicFinance",(function(){return F("psychic_profit_desc",[Ki.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($(`
                  ${F("psychic_stun_title")}
                  `)),a.append('
                  ');let r=t.tech.psychic>=5?80:100;zs({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;aF("psychic_stun_button",[r])}}),_s("psychicCapture",(function(){return F("psychic_stun_desc")}),{elm:"#psychicCapture > div > button"})}(e),function(e){let a=$('
                  ');e.append(a),a.append($(`
                  ${F("psychic_mind_break_title")}
                  `)),a.append('
                  ');let r=t.tech.psychic>=5?64:80;zs({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:()=>F("psychic_mind_break_button",[r])}}),_s("psychicMindBreak",(function(){return F("psychic_mind_break_desc")}),{elm:"#psychicMindBreak > div > button"})}(e)))}var ls=!1;function _s(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(){(ls||$("#popper").length>0)&&ds();let i=r.wide?" wide":"",s=r.classes?r.classes:"has-background-light has-text-dark pop-desc";var n=$(`
                  `);r.attach?$(r.attach).append(n):$("#main").append(n),a&&n.append("function"==typeof a?a({this:this,popper:n}):a),ls=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]}}]}),n.show(),r.hasOwnProperty("in")&&"function"==typeof r.in&&r.in({this:this,popper:n,id:"popper"}),on("firework")&&t[t.race.cataclysm||t.race.orbit_decayed?"space":"city"].firework.on>0&&$(n).append('')})),r.unbind&&("ontouchstart"in document.documentElement&&navigator.userAgent.match(t.settings.touch)?$(r.elm).on("touchend",(function(e){ds(),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(){ds(),r.hasOwnProperty("out")&&"function"==typeof r.out&&r.out({this:this,popper:$("#popper"),id:"popper"})})))}function ds(e){e&&$("#popper").data("id")!==e||($("#popper").hide(),ls&&(ls.destroy(),ls=!1),Cs($("#popper"),!0))}function ps(e){switch(e){case"stop":j.w?j.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),j.s=!1;break;case"start":{let e=250,a=1e3,r=5e3;if(t.race.slow){let t=1+Ki.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-Ki.hyper.vars()[0]/100;e=Math.floor(e*t),a=Math.floor(a*t),r=Math.floor(r*t)}j.mt=e,us(),d.t>0&&(e=Math.ceil(.5*e),a=Math.ceil(.5*a),r=Math.ceil(.5*r)),j.w?(j.w.postMessage({loop:"short",period:e}),j.w.postMessage({loop:"mid",period:a}),j.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)),j.s=!0}}}function us(){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 hs(e,t){let a=Ci(),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 ms(e,a,r,i,s){if(i=i||[],s||i.includes("all")||i.push("all"),a=a||"warning",i.includes(h.view)){let r=$('

                  '+e+"

                  ");$("#msgQueueLog").prepend(r),$("#msgQueueLog").children().length>t.settings.msgFilters[h.view].max&&$("#msgQueueLog").children().last().remove()}i.forEach((function(r){h[r].unshift({msg:e,color:a}),h[r].length>t.settings.msgFilters[r].max&&h[r].pop()})),r||i.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 gs(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 vs(e){for(let a=t.r_queue.queue.length-1;a>=0;a--)e.includes(Sr.tech[t.r_queue.queue[a].type].grant[0])&&t.r_queue.queue.splice(a,1)}function fs(){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 ys(){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 bs(){!function(){let e=$("#buildQueue .buildList")[0];if(e){let t=Sortable.get(e);t&&t.destroy()}}(),Cs($("#buildQueue")),$("#buildQueue").append($(`\n

                  ${F("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{zs({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){ds(`q${t.queue.queue[e].id}${e}`),t.queue.queue.splice(e,1),bs();break}},setID:e=>`q${t.queue.queue[e].id}${e}`,setData(e,a){let r,i=t.queue.queue[e].id.split("-");"arpa"===i[0].substring(0,4)?r=i[0].substring(4):"city"===i[0]||"evolution"===i[0]||"starDock"===i[0]?r=Sr[i[0]][i[1]]:Object.keys(Sr[i[0]]).forEach((function(e){Sr[i[0]][e].hasOwnProperty(i[1])&&(r=Sr[i[0]][e][i[1]])}));let s={};if(r.cost){let e=Rs(r);Object.keys(e).forEach((function(t){let r=e[t]();r>0&&(s[`${a}-${t}`]=r)}))}return s},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?F("queue_play"):F("queue_pause")},filters:{time:e=>Fs(e),count:e=>e>1?` (${e})`:"",max_t:(e,t)=>t===e||t<0?"":` / ${Fs(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 ks=!1;function $s(e,t){try{t.debug_mode=ks,gtag("event",e,t)}catch(e){}}function xs(e,a,r,i){let s=t.resource[e].amount+a,n=!0;return s>t.resource[e].max&&-1!=t.resource[e].max?s=t.resource[e].max:s<0&&((!i||i&&-1*s>i)&&(n=!1),s=0),Number.isNaN(s)||(t.resource[e].amount=s,r||(t.resource[e].delta+=a,"Mana"===e&&a>0&&(t.resource[e].gen_d+=a))),n}function qs(e){let a=Di[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?[F("civics_gov_tp_name0"),F("civics_gov_tp_name1"),F("civics_gov_tp_name2"),F("civics_gov_tp_name3"),F("civics_gov_tp_name4"),F("civics_gov_tp_name5"),F("civics_gov_tp_name6"),F("civics_gov_tp_name7"),F("civics_gov_tp_name8"),F("civics_gov_tp_name9")]:[Di[t.race.species].name,Di[t.race.species].home,F(`biome_${t.city.biome}_name`),F(`evo_${a}_title`),F("civics_gov_name0"),F("civics_gov_name1"),F("civics_gov_name2"),F("civics_gov_name3"),F("civics_gov_name4"),F("civics_gov_name5"),F("civics_gov_name6"),F("civics_gov_name7"),F("civics_gov_name8"),F("civics_gov_name9"),F("civics_gov_name10"),F("civics_gov_name11")];return{s0:Math.rand(0,14),s1:r[Math.rand(0,r.length)]}}function Ps(e,a,r,i,s){s||(s="city"),"micro"===t.race.universe&&(i-=Ts("micro",!1)),t.race.small?i-=Ki.small.vars()[0]:t.race.large&&(i+=Ki.large.vars()[0]),t.race.compact&&(i-=Ki.compact.vars()[0]),!t.race.tunneler||"mine"!==e&&"coal_mine"!==e||(i-=Ki.tunneler.vars()[0]),!t.tech.housing_reduction||"basic_housing"!==e&&"cottage"!==e||(i-=.02*t.tech.housing_reduction),t.tech.housing_reduction&&"captive_housing"===e&&(i-=.01*t.tech.housing_reduction),"basic_housing"===e&&(t.race.solitary&&(i-=Ki.solitary.vars()[0]),t.race.pack_mentality&&(i+=Ki.pack_mentality.vars()[0])),"cottage"===e&&(t.race.solitary&&(i+=Ki.solitary.vars()[1]),t.race.pack_mentality&&(i-=Ki.pack_mentality.vars()[1])),"apartment"===e&&t.race.pack_mentality&&(i-=Ki.pack_mentality.vars()[1]),t.genes.creep&&!t.race.no_crispr?i-=.01*t.genes.creep:t.genes.creep&&t.race.no_crispr&&(i-=.002*t.genes.creep);let n=D("noquestions",0);n&&(i-=n),i<1.005&&(i=1.005);var c="citizen"===e?t.resource[t.race.species].amount:t[s][e]?t[s][e].count:0;return a&&(c+=a),Math.round(i**c*r)}function js(e,a,r,i,s,n){s||(s="space"),n=n||1.005,"micro"===t.race.universe&&(i-=Ts("micro",!0)),t.genes.creep&&!t.race.no_crispr?i-=.01*t.genes.creep:t.genes.creep&&t.race.no_crispr&&(i-=.002*t.genes.creep),t.race.small&&(i-=Ki.small.vars()[1]),t.race.compact&&(i-=Ki.compact.vars()[1]),t.prestige.Harmony.count>0&&t.stats.achieve.ascended&&(i-=Os());let c=D("noquestions",0);c&&(i-=c),i0&&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 Ms(e,a,r,i){if(i=void 0===i||i,e.cost){let s=0,n=!1,c=!(!a||!a.id[e.id])&&a.id[e.id],o=Rs(e,c),l=!!a&&{},_=!!a&&{};a&&(Object.keys(a.r).forEach((function(e){l[e]=a.r[e]})),Object.keys(a.rr).forEach((function(e){_[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 p={};return Object.keys(o).forEach((function(e){if(s>=0&&!t.prestige.hasOwnProperty(e)&&!["Morale","HellArmy","Structs","Bool"].includes(e)){var r=Number(c?o[e](c):o[e]());if(r>0){let c="Species"===e?t.race.species:e,o="Supply"===e?t.portal.purifier.supply:Number(t.resource[c].amount),u="Supply"===e?t.portal.purifier.sup_max:t.resource[c].max,h="Supply"===e?t.portal.purifier.diff:t.resource[c].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&&(o+=h*(i?a.t.t:a.t.rt),a.r.hasOwnProperty(c)||(a.r[c]=0),a.rr.hasOwnProperty(c)||(a.rr[c]=0),i?(o-=Number(a.r[c]),a.r[c]+=r,a.rr[c]+=r):(o-=Number(a.rr[c]),a.rr[c]+=r),u>=0&&o>u&&(o=u)),r>o)if(h>0){let e=(r-o)/h;e>s&&(n=c,s=e),p[c]=e}else a&&(a.r=l,a.rr=_),s=-9999999,p[c]=99999999-h,(p[n]&&p[c]>p[n]||!p[n])&&(n=c)}}})),a&&s>=0&&(void 0===a.id[e.id]?a.id[e.id]=1:a.id[e.id]++,i&&(a.t.t+=s),a.t.rt+=s),r?{t:s,r:n,s:p}:s}return 0}function Ss(e,a,r,i){let s=!(!r||!r.id[e.id])&&r.id[e.id],n=Ie(e.cost,s),c=0,o=!!r&&{},l=!!r&&{},_=!1;r&&(Object.keys(r.r).forEach((function(e){o[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 p={};return Object.keys(n).forEach((function(e){if(c>=0){let i=Number(n[e](s))*a;if(i>0){let a=Number(t.resource[e].amount),s=t.resource[e].diff;if(r&&(d&&t.interstellar.mass_ejector[e]&&(s+=t.interstellar.mass_ejector[e],t.race.governor.config.trash.hasOwnProperty(e)&&(s-=Math.min(t.race.governor.config.trash[e].v,t.interstellar.mass_ejector[e]))),a+=s*r.t.t,r.r[e]?(a-=Number(r.r[e]),r.r[e]+=i):r.r[e]=i,r.rr[e]?r.rr[e]+=i:r.rr[e]=i,t.resource[e].max>=0&&a>t.resource[e].max&&(a=t.resource[e].max)),i>a)if(s>0){let t=(i-a)/s;t>c&&(c=t,_=e),p[e]=t}else r&&(r.r=o,r.rr=l),c=-9999999,p[e]=99999999-s,(p[_]&&p[e]>p[_]||!p[_])&&(_=e)}}})),r&&c>=0&&(void 0===r.id[e.id]?r.id[e.id]=1:r.id[e.id]++,r.t.t+=c,r.t.rt+=c),i?{t:c,r:_,s:p}:c}function Cs(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 zs(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 Fs(e){let t;if(e<0)t=F("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 As(e){return"antimatter"===t.race.universe&&(e=+(e*=Ts("antimatter")).toFixed(2)),"leo"===R()&&(e=+(e*=1+N("leo")[0]/100).toFixed(2)),e}function Is(e){return t.race.emfield?+(1.5*e).toFixed(2):e}function Ts(e,a,r,i){i||(i={});let s=void 0!==i.dark?i.dark:t.prestige.Dark.count,n=void 0!==i.harmony?i.harmony:t.prestige.Harmony.count,c=void 0!==i.sludge?i.sludge:t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge[qn(e)]?t.stats.achieve.extinct_sludge[qn(e)]:0;switch(e){case"standard":return"standard"===t.race.universe||r?(n>0&&(s*=1+.001*n),c&&(s*=1+.03*c),1+s/200):0;case"evil":return"evil"===t.race.universe||r?(n>0&&(s*=1+.01*n),c&&(s*=1+.03*c),1+(Math.log2(10+s)-3.321928094887362)/5):1;case"micro":return"micro"===t.race.universe||r?a?(n>0&&(s*=1+.01*n),s=.01+(Math.log(100+s)-4.605170185988092)/35,c&&(s*=1+.03*c),s>.04&&(s=.04),+s.toFixed(5)):(n>0&&(s*=1+.01*n),s=.02+(Math.log(100+s)-4.605170185988092)/20,c&&(s*=1+.03*c),s>.06&&(s=.06),+s.toFixed(5)):0;case"heavy":return"heavy"===t.race.universe||r?(n>0&&(s*=1+.01*n),c&&(s*=1+.03*c),.995**s):1;case"antimatter":return"antimatter"===t.race.universe||r?(n>0&&(s*=1+.01*n),c&&(s*=1+.03*c),1+(Math.log(50+s)-3.912023005428146)/5):0;case"magic":return"magic"===t.race.universe||r?(n>0&&(s*=1+.01*n),c&&(s*=1+.03*c),1+(Math.log(50+s)-3.912023005428146)/3):0}return 0}const Ls=function(e){return Es&&!e?Es:t.genes.challenge&&t.genes.challenge>=2?Es=Ks(t.race.universe):0};var Es;function Ks(e,a){if(t.genes.challenge&&t.genes.challenge>=2){let r=xn(e=e||t.race.universe),i="standard"===e?.25:.15,s=t.genes.challenge>=3?.15:.1;t.genes.challenge>=4&&"standard"!==e&&(i+=.05,s-=.05),t.race.weak_mastery&&"antimatter"===e&&(i/=10,s/=10),t.race.nerfed&&(i/="antimatter"===e?5:2,s/="antimatter"===e?5:2),t.race.ooze&&(i*=1-Ki.ooze.vars()[2]/100,s*=1-Ki.ooze.vars()[2]/100);let n=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;n>0&&(i*=1+n/100,s*=1+n/100);let c=r.aLvl*i,o=0;return"standard"!==e&&(o=r.uLvl*s),t.genes.challenge>=5&&t.race.hasOwnProperty("mastery")&&(c*=1+Ki.mastery.vars()[0]*t.race.mastery/100,o*=1+Ki.mastery.vars()[0]*t.race.mastery/100),a?{g:c,u:o,m:c+o}:c+o}return a?{g:0,u:0,m:0}:0}const Ds=function(e){if(!Bs||e){let e=0;Object.keys(t.pillars).forEach((function(a){Di[a]&&t.race.species===a?e+=4:Di[a]&&e++})),Bs=[1+e/100,1+2*e/100]}return Bs};var Bs;function Gs(e,a,r,i){r=r||0;let s=(i=i||{}).genes;void 0===s&&(s=Sn()-1,s>4&&(s=4));let n=i.uni||t.race.universe;if("micro"===n&&(e*=.25),"antimatter"===n&&(e*=1.1),"heavy"===n&&"mad"!==a)switch(s){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!==i.tp?i.tp:t.race.truepath)&&(e*=1.1),s){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 Ns(e,a){let r={plasmid:0,phage:0,dark:0,harmony:0,artifact:0,cores:0};a||(a={});let i=a.genes,s=a.uni;s=s||t.race.universe;let n=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+=aa("federation"===t.civic.govern.type?15:20));n=t.race.high_pop?Math.round(t.resource[t.race.species].amount/Ki.high_pop.vars()[0])+Math.round(e/Ki.high_pop.vars()[0]):t.resource[t.race.species].amount+e}else n=a.high_pop?Math.round(a.cit/Ki.high_pop.vars(a.high_pop)[0])+Math.round(a.sol/Ki.high_pop.vars(a.high_pop)[0]):a.cit+a.sol;let c=999,o=1e6,l=100,_=0,d=150;switch(e){case"mad":c=3,o=1e5,l=1.1,d=150,(void 0!==a.synth?a.synth:"synthetic"===Di[t.race.species].type)&&(c=5,o=125e3,d=100);break;case"cataclysm":case"bioseed":c=3,o=5e4,l=1.015,_=1,d=400;break;case"ai":c=2.5,o=45e3,l=1.014,_=2,d=600;break;case"vacuum":case"bigbang":c=2.2,o=4e4,l=1.012,_=2.5,d=800;break;case"ascend":case"terraform":c=1.15,o=3e4,l=1.008,_=4,d=2e3;break;case"matrix":c=1.5,o=32e3,l=1.01,_=3.2,d=1800;break;case"retire":c=1.15,o=32e3,l=1.006,_=3.2,d=1800;break;case"eden":c=1,o=18e3,l=1.004,_=2.5,d=1800}if(d=void 0!==i?Math.floor(d*(1+(i+(a.tp?1:0))/8)):Math.floor(d*(1+(Sn()-(t.race.truepath?0:1))/8)),void 0===a.plas){let i=void 0!==a.know?a.know:t.stats.know,s=Math.round(n/c);for(;i>o;)s++,i-=o,o*=l;if(t.race.cataclysm?s+=300:t.race.lone_survivor&&(s+=800),r.plasmid=Gs(s,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?Gs(Math.floor(Math.log2(r.plasmid)*Math.E*_),e,!1,a):0,"bigbang"===e){let e=a.exotic,i=a.mass;void 0===e&&t.interstellar&&t.interstellar.stellar_engine&&(e=t.interstellar.stellar_engine.exotic,i=t.interstellar.stellar_engine.mass);let s=+Math.log(1+40*e).toFixed(3);s+=+(Math.log2(i-7)/2.5).toFixed(3),s=Gs(s,"bigbang",3,a),r.dark=s}else if("vacuum"===e){let e=void 0!==a.mana?a.mana:t.resource.Mana.gen,i=+(Math.log2(e)/5).toFixed(3);i=Gs(i,"vacuum",3,a),r.dark=i}if(["ascend","descend","terraform"].includes(e)){let n=1;if(void 0===i?(n=Sn(),n>5&&(n=5)):n=i+1,"ascend"===e||"terraform"===e){switch(s){case"micro":n*=.25;break;case"heavy":n*=1.2;break;case"antimatter":n*=1.1}r.harmony=parseFloat(n.toFixed(2))}else if("descend"===e){let e="micro"===s?1:n,i=a.floor;void 0!==i?i++:i=t.portal.hasOwnProperty("spire")?t.portal.spire.count:0,[50,100].forEach((function(t){i>t&&e++})),r.artifact=e}}return"ai"===e&&(r.cores="micro"===s?2:5),r}function Rs(e,a,r){let i=e.cost||{};if((i.RNA||i.DNA)&&t.genes.evolve){var s={};return Object.keys(i).forEach((function(e){"RNA"!==e&&"DNA"!==e||(s[e]=function(){return Math.round(.8*i[e](a,r))})})),s}return i=function(e,a,r){if(t.race.bloated){let t=1+Ki.bloated.vars()[0]/100;var i={};return Object.keys(e).forEach((function(s){["Food","Lumber","Stone","Furs","Copper","Iron","Aluminium","Cement","Coal","Steel","Titanium","Alloy","Polymer","Iridium"].includes(s)?i[s]=function(){return e[s](a,r)*t}:i[s]=function(){return e[s](a,r)}})),i}return e}(i,a,r),i=function(e,a,r,i){if((i?i.truepath:t.race.truepath)&&(!a.hasOwnProperty("path")||!a.path.includes("truepath"))){var s={};return Object.keys(e).forEach((function(t){"Money"===t?s[t]=function(){return Math.round(3*e[t](r,i))}:["Structs","Knowledge","Custom","Soul_Gem","Plasmid","Phage","Dark","Harmony","Blood_Stone","Artifact","Corrupt_Gem","Codex","Demonic_Essence","Horseshoe"].includes(t)?s[t]=function(){return e[t](r,i)}:s[t]=function(){return Math.round(2*e[t](r,i))}})),s}return e}(i,e,a,r),i=function(e,a,r){if(t.race.lone_survivor){var i={};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)?i[t]=function(){return e[t](a,r)}:["Knowledge"].includes(t)?i[t]=function(){return Math.round(.5*e[t](a,r))}:["Money"].includes(t)?i[t]=function(){return Math.round(.22*e[t](a,r))}:["Plywood","Brick","Wrought_Iron","Sheet_Metal","Mythril","Quantium"].includes(t)?i[t]=function(){return Math.round(.14*e[t](a,r))}:i[t]=function(){return Math.round(.28*e[t](a,r))}})),i}return e}(i,a,r),i=function(e,a,r){if(t.race.inflation){var i={};return Object.keys(e).forEach((function(s){if("Money"===s){let n=1+t.race.inflation/75;i[s]=function(){return Math.round(e[s](a,r)*n)}}else i[s]=function(){return e[s](a,r)}})),i}return e}(i,a,r),i=function(e,a,r){if("technocracy"===t.civic.govern.type){let t=1+ee.technocracy()[1]/100;var i={};return Object.keys(e).forEach((function(s){if("Knowledge"===s){let t=1-ee.technocracy()[0]/100;i[s]=function(){return Math.round(e[s](a,r)*t)}}else i[s]="Money"===s||"Structs"===s||"Custom"===s?function(){return e[s](a,r)}:function(){return Math.round(e[s](a,r)*t)}})),i}return e}(i,a,r),i=function(e,a,r){if(t.race.flier&&(e.Stone||e.Cement)){var i={};let t=1-Ki.flier.vars()[0]/100;return Object.keys(e).forEach((function(s){"Stone"!==s||e.Cement?"Cement"===s?e.Stone?i.Stone=function(){return Math.round(e.Stone(a,r)*t+1.8*e[s](a,r)*t)||0}:i.Stone=function(){return Math.round(1.75*e[s](a,r)*t)}:i[s]=function(){return e[s](a,r)}:i[s]=function(){return Math.round(e[s](a,r)*t)||0}})),i}return e}(i,a,r),i=function(e,a,r){if(t.race.kindling_kindred&&(e.Lumber||e.Plywood)){var i={};let t=1+Ki.kindling_kindred.vars()[0]/100;return Object.keys(e).forEach((function(s){"Lumber"!==s&&"Plywood"!==s&&"Structs"!==s?i[s]=function(){return Math.round(e[s](a,r)*t)||0}:"Structs"===s&&(i[s]=function(){return e[s](a,r)})})),i}if(t.race.unfathomable&&t.city.captive_housing){let t=as("entish");if(t>0){i={};let s=1-.4*t;return Object.keys(e).forEach((function(t){i[t]="Lumber"===t&&"Plywood"===t?function(){return Math.round(e[t](a,r)*s)||0}:function(){return e[t](a,r)}})),i}}return e}(i,a,r),i=function(e,a,r){if(t.race.smoldering){let i={};return Object.keys(e).forEach((function(t){if("Lumber"===t||"Plywood"===t){let s="Plywood"===t?2:1;i.Chrysotile=function(){return Math.round(e[t](a,r)*s)||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)?i[t]=function(){return e[t](a,r)}:i[t]=function(){return Math.round(.9*e[t](a,r))}})),!i.hasOwnProperty("Chrysotile")&&e.hasOwnProperty("Money")&&t.tech.primitive&&t.tech.primitive>=3&&(i.Chrysotile=function(){let t=e.Money(a,r)||0;return t>0?Math.round(t/50):0}),i}return e}(i,a,r),i=function(e,a,r){let i=D("pragmatist",1),s=as("gnome");if((t.race.smart||t.race.dumb||i||s>0)&&e.Knowledge){var n={};return Object.keys(e).forEach((function(c){n[c]="Knowledge"===c?function(){let n=e[c](a,r);return t.race.smart&&(n*=1-Ki.smart.vars()[0]/100),s>0&&(n*=1-Ki.smart.vars(1)[0]/100*s),t.race.dumb&&(n*=1+Ki.dumb.vars()[0]/100),i&&(n*=1+i/100),Math.round(n)}:function(){return e[c](a,r)}})),n}return e}(i,a,r),i=function(e,a,r){if(e.Cement&&t.tech.cement&&t.tech.cement>=2){let s=t.tech.cement>=3?.8:.9;var i={};return Object.keys(e).forEach((function(t){i[t]="Cement"===t?function(){return Math.round(e[t](a,r)*s)||0}:function(){return e[t](a,r)}})),i}return e}(i,a,r),i=function(e,t,a){let r=D("extravagant",0);if(r){var i={};return Object.keys(e).forEach((function(s){if("Money"===s){let n=1+r/100;i[s]=function(){return Math.round(e[s](t,a)*n)}}else i[s]=function(){return e[s](t,a)}})),i}return e}(i,a,r),i=function(e,a,r){if(t.race.heavy){var i={};return Object.keys(e).forEach((function(t){i[t]="Stone"===t||"Cement"===t||"Wrought_Iron"===t?function(){return Math.round(e[t](a,r)*(1+Ki.heavy.vars()[1]/100))}:function(){return e[t](a,r)}})),i}return e}(i,a,r),function(e,a,r){let i=as("pterodacti");if((t.race.hollow_bones||i>0)&&(e.Plywood||e.Brick||e.Wrought_Iron||e.Sheet_Metal||e.Mythril||e.Aerogel||e.Nanoweave||e.Scarletite||e.Quantium)){var s={};return Object.keys(e).forEach((function(n){s[n]="Plywood"===n||"Brick"===n||"Wrought_Iron"===n||"Sheet_Metal"===n||"Mythril"===n||"Aerogel"===n||"Nanoweave"===n||"Scarletite"===n||"Quantium"===n?function(){let s=e[n](a,r);return t.race.hollow_bones&&(s*=1-Ki.hollow_bones.vars()[0]/100),i>0&&(s*=1-Ki.hollow_bones.vars(3)[0]/100*i),Math.round(s)}:function(){return e[n](a,r)}})),s}return e}(i,a,r)}function Hs(e){return t.race.high_pop&&(e*=Ki.high_pop.vars()[0]),e}function Us(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 Vs(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 Ws(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 Qs(e,t,a,r,i){let s="";return r&&(s=`id="${r}" `),`${Us(e)}`}function Js(e,a){let r=ln();const i=new Date;return r.active&&!t.special.egg[i.getFullYear()][`egg${e}`]?Qs("egg",a||16,2,`egg${e}`,'role="button" aria-label="Egg" '):""}function Zs(e,a,r){let i=_n();const s=(new Date).getFullYear();let n=r?"trick":"treat";return i.active&&!t.special.trick[s][`${n}${e}`]?Qs(r?"ghost":"candycorn",a||16,2,`${n}${e}`,`role="button" aria-label="${r?"Ghost":"Candy Corn"}" `):""}function Xs(e,a,r,i,s,n){return t.stats.achieve[e]&&(s?t.stats.achieve[e][n]-1:t.stats.achieve[e][n])>0?`

                    ${Us(r)}

                    `:""}function Ys(e,a,r,i,s){a||(a=10),r||(r=Ws(e,"achievement"));let n="";if(s)switch(s){case"standard":n+=Xs(e,a,r,F(t.settings.icon),i,"l");break;case"antimatter":n+=Xs(e,a,"atom",F("universe_antimatter"),i,"a");break;case"evil":n+=Xs(e,a,"evil",F("universe_evil"),i,"e");break;case"heavy":n+=Xs(e,a,"heavy",F("universe_heavy"),i,"h");break;case"micro":n+=Xs(e,a,"micro",F("universe_micro"),i,"m");break;case"magic":n+=Xs(e,a,"magic",F("universe_magic"),i,"mg")}else n+=Xs(e,a,r,F(t.settings.icon),i,"l"),n+=Xs(e,a,"atom",F("universe_antimatter"),i,"a"),n+=Xs(e,a,"evil",F("universe_evil"),i,"e"),n+=Xs(e,a,"heavy",F("universe_heavy"),i,"h"),n+=Xs(e,a,"micro",F("universe_micro"),i,"m"),n+=Xs(e,a,"magic",F("universe_magic"),i,"mg");return n}function en(e,t){return(t=t||{})[e]?t[e]:e<=1?1:t[e]=en(e-1,t)+en(e-2,t)}function tn(e){var t=Object.keys(e);return t[t.length*Math.random()<<0]}function an(e){switch(e){case 1:return F("basic");case 2:return F("plain");case 3:return F("bronze");case 4:return F("silver");case 5:return F("gold");default:return""}}function rn(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&&(i+=t.stats.achieve.technophobe.l);let s=0;for(let t=0;t=0&&(s>i&&(a-=i-s),s++),r-=a}return r}function sn(){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 nn(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(nn(e))})),t}let a=new e.constructor;for(var r in e)e.hasOwnProperty(r)&&(a[r]=nn(e[r]));return a}function cn(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 on("fool",2021)?cn("reverse",Di[t.race.species].name):Di[t.race.species].name;case"curve":return 1-(1-a)**(r||1.5)}return!1}function on(e,a){switch(e){case"easter":return ln();case"halloween":return _n();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:F("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 ln(){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,i=a%19,s=r(a/100),n=(s-r(s/4)-r((8*s+13)/25)+19*i+15)%30,c=n-r(n/28)*(1-r(29/(n+1))*r((21-i)/11)),o=c-(a+r(a/4)+c+2-s+r(s/4))%7,l=3+r((o+40)/44),_=o+28-31*r(l/4),d={date:[l-1,_],active:!1,endDate:[l-1,_],hint:!1,hintDate:[l-1,_],solve:!1,solveDate:[l-1,_]};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 _n(){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 i=new Date(`${r.date[0]+1}/${r.date[1]}/${a}`),s=new Date(`${r.endDate[0]+1}/${r.endDate[1]}/${a}`);return e>=i&&e<=s&&(r.active=!0,e>=new Date(`${r.hintDate[0]+1}/${r.hintDate[1]}/${a}`)&&e<=s&&(r.hint=!0),e>=new Date(`${r.solveDate[0]+1}/${r.solveDate[1]}/${a}`)&&e<=s&&(r.solve=!0)),r}function dn(){return t.race.magnificent&&t.city.hasOwnProperty("shrine")&&t.city.shrine.count>0}function pn(e){let a={mult:1,add:0};if(dn())switch(e){case"metal":a.mult+=+t.city.shrine.metal/100*Ki.magnificent.vars()[3];break;case"tax":a.mult+=+t.city.shrine.tax/100*Ki.magnificent.vars()[2];break;case"know":a.add+=+t.city.shrine.know*Ki.magnificent.vars()[0],a.mult+=+t.city.shrine.know*Ki.magnificent.vars()[1]/100;break;case"morale":a.add+=t.city.shrine.morale*Ki.magnificent.vars()[4]}return a}const un={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 hn(e,a){let r=Ki[e].hasOwnProperty("vars")?Ki[e].vars(a):[];return un.hasOwnProperty(e)&&("fibroblast"===e?r=[5*r[0]]:"hivemind"===e&&t.race.high_pop?r=[r[0]*Ki.high_pop.vars()[0]]:"imitation"===e?r.push(Di[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(mn()):"anthropophagite"===e?r=[1e4*r[0]]:un[e]||(r=[])),r}function mn(e){return t.race.sludge?e?"craft":F("resource_Beaker_name"):"cath"===t.race.species?e?"craft":F("resource_Box_name"):"wolven"===t.race.species?e?"craft":F("resource_ChewToy_name"):"dracnid"===t.race.species?e?"craft":F("resource_Hoard_name"):"seraph"===t.race.species?e?"forge":F("resource_Halo_name"):"cyclops"===t.race.species?e?"craft":F("resource_Monocle_name"):"kobold"===t.race.species?e?"craft":F("resource_Candle_name"):"tuskin"===t.race.species?e?"craft":F("resource_Goggles_name"):"sharkin"===t.race.species?e?"craft":F("resource_ToothSharpener_name"):"humanoid"===Di[t.race.species].type?e?"craft":F("resource_Sandals_name"):"avian"===Di[t.race.species].type?e?"craft":F("resource_Perch_name"):"plant"===Di[t.race.species].type?e?"craft":F("resource_Planter_name"):"fungi"===Di[t.race.species].type?e?"craft":F("resource_DampCloth_name"):"reptilian"===Di[t.race.species].type?e?"craft":F("resource_HeatRock_name"):"fey"===Di[t.race.species].type?e?"craft":F("resource_PixieDust_name"):"synthetic"===Di[t.race.species].type?e?"craft":F("resource_Battery_name"):e?"forge":F("resource_Horseshoe_name")}const gn={infiltrator:[F("wiki_trait_effect_infiltrator_ex1"),F("wiki_trait_effect_infiltrator_ex2",[[`${F("tech_steel")}`,`${F("tech_electricity")}`,`${F("tech_electronics")}`,`${F("tech_fission")}`,`${F("tech_rocketry")}`,`${F("tech_artificial_intelligence")}`,`${F("tech_quantum_computing")}`,`${F("tech_virtual_reality")}`,`${F("tech_shields")}`,`${F("tech_ai_core")}`,`${F("tech_graphene_processing")}`,`${F("tech_nanoweave")}`,`${F("tech_orichalcum_analysis")}`,`${F("tech_infernium_fuel")}`].join(", ")])],heavy:[F("wiki_trait_effect_heavy_ex1",[vn("Stone"),vn("Cement"),vn("Wrought_Iron")])],sniper:[F("wiki_trait_effect_sniper_ex1")],hooved:[F("wiki_trait_effect_hooved_ex1",[mn(!1)]),F("wiki_trait_effect_hooved_ex2",[`${t.resource.hasOwnProperty("Lumber")?t.resource.Lumber.name:F("resource_Lumber_name")}`,`${t.resource.hasOwnProperty("Copper")?t.resource.Copper.name:F("resource_Copper_name")}`,`${t.resource.hasOwnProperty("Iron")?t.resource.Iron.name:F("resource_Iron_name")}`,`${t.resource.hasOwnProperty("Steel")?t.resource.Steel.name:F("resource_Steel_name")}`,`${t.resource.hasOwnProperty("Adamantite")?t.resource.Adamantite.name:F("resource_Adamantite_name")}`,`${t.resource.hasOwnProperty("Orichalcum")?t.resource.Orichalcum.name:F("resource_Orichalcum_name")}`,12,75,150,500,5e3]),F("wiki_trait_effect_hooved_ex3"),F("wiki_trait_effect_hooved_ex4",['5',mn(!1)]),F("wiki_trait_effect_hooved_ex5",[`${t.resource.hasOwnProperty("Lumber")?t.resource.Lumber.name:F("resource_Lumber_name")}`,`${t.resource.hasOwnProperty("Copper")?t.resource.Copper.name:F("resource_Copper_name")}`])],instinct:[F("wiki_trait_effect_instinct_ex1",[6.67,F("galaxy_chthonian"),10])],logical:[F("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:[F("wiki_trait_effect_high_pop_ex1")],flier:[F("wiki_trait_effect_flier_ex1")],unfathomable:[F("wiki_trait_effect_unfathomable_ex1"),F("wiki_trait_effect_unfathomable_ex2")]};function vn(e){return`${t.hasOwnProperty("resource")&&t.resource.hasOwnProperty(e)?t.resource[e].name:F(`resource_${e}_name`)}`}function fn(e,a,r){let i=r.fanatic||!1,s=r.tpage||!1,n=r.trank||!1,c=r.wiki||!1,o="",l=rs("name",a),_=rs("desc",a);s&&["genus","major"].includes(Ki[a].type)&&(o=`«${F("wiki_trait_rank")} {{ rank }}»`),c&&e.append(`

                    ${l}

                    ${o}
                    `),c&&(s&&Ki[a].hasOwnProperty("val")?e.append(`
                    ${F(`wiki_trait_${Ki[a].type}`)}${F("wiki_trait_value",[Ki[a].val])}
                    `):e.append(`
                    ${F(`wiki_trait_${Ki[a].type}`)}
                    `)),i&&c&&e.append(`
                    ${F("wiki_trait_fanaticism",[i])}
                    `),e.append(`
                    ${_}
                    `);let d="warning";if(Ki[a].hasOwnProperty("val")&&(d=Ki[a].val>=0?"success":"danger"),s&&["genus","major"].includes(Ki[a].type)?e.append(`
                    `):(c||t.stats.feat.journeyman&&t.stats.achieve.seeder&&t.stats.achieve.seeder.l>0)&&e.append(`
                    ${F(`wiki_trait_effect_${a}`,hn(a,n))}
                    `),gn[a]&&c&&gn[a].forEach((function(t){e.append(`
                    ${t}
                    `)})),s&&["genus","major"].includes(Ki[a].type)){let e={rank:t.race[a]||1};zs({el:`#${Ki[a].type}_${a}`,data:e,methods:{getTraitDesc:e=>F(`wiki_trait_effect_${a}`,hn(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 yn={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"]},bn={colonist:[cn("name")]},wn={trade:[750,50]},kn={};Object.keys(yn).forEach((function(e){yn[e].forEach((t=>kn[t]={name:F(`achieve_${t}_name`),desc:wn[t]?F(`achieve_${t}_desc`,wn[t]):F(`achieve_${t}_desc`),flair:bn[t]?F(`achieve_${t}_flair`,bn[t]):F(`achieve_${t}_flair`),type:e}))}));const $n={utopia:{name:F("feat_utopia_name"),desc:F("feat_utopia_desc"),flair:F("feat_utopia_flair")},take_no_advice:{name:F("feat_take_no_advice_name"),desc:F("feat_take_no_advice_desc"),flair:F("feat_take_no_advice_flair")},ill_advised:{name:F("feat_ill_advised_name"),desc:F("feat_ill_advised_desc"),flair:F("feat_ill_advised_flair")},organ_harvester:{name:F("feat_organ_harvester_name"),desc:F("feat_organ_harvester_desc"),flair:F("feat_organ_harvester_flair")},the_misery:{name:F("feat_the_misery_name"),desc:F("feat_the_misery_desc"),flair:F("feat_the_misery_flair")},energetic:{name:F("feat_energetic_name"),desc:F("feat_energetic_desc"),flair:F("feat_energetic_flair")},garbage_pie:{name:F("feat_garbage_pie_name"),desc:F("feat_garbage_pie_desc"),flair:F("feat_garbage_pie_flair")},finish_line:{name:F("feat_finish_line_name"),desc:F("feat_finish_line_desc"),flair:F("feat_finish_line_flair")},blank_slate:{name:F("feat_blank_slate_name"),desc:F("feat_blank_slate_desc"),flair:F("feat_blank_slate_flair")},supermassive:{name:F("feat_supermassive_name"),desc:F("feat_supermassive_desc"),flair:F("feat_supermassive_flair")},steelem:{name:F("feat_steelem_name"),desc:F("feat_steelem_desc"),flair:F("feat_steelem_flair")},banana:{name:F("feat_banana_name"),desc:F("feat_banana_desc",[500,500]),flair:F("feat_banana_flair")},rocky_road:{name:F("feat_rocky_road_name"),desc:F("feat_rocky_road_desc"),flair:F("feat_rocky_road_flair")},demon_slayer:{name:F("feat_demon_slayer_name"),desc:F("feat_demon_slayer_desc"),flair:F("feat_demon_slayer_flair")},equilibrium:{name:F("feat_equilibrium_name"),desc:F("feat_equilibrium_desc"),flair:F("feat_equilibrium_flair")},digital_ascension:{name:F("feat_digital_ascension_name"),desc:F("feat_digital_ascension_desc"),flair:F("feat_digital_ascension_flair")},novice:{name:F("feat_novice_name"),desc:F("feat_achievement_hunter_desc",[10]),flair:F("feat_novice_flair")},journeyman:{name:F("feat_journeyman_name"),desc:F("feat_achievement_hunter_desc",[25]),flair:F("feat_journeyman_flair")},adept:{name:F("feat_adept_name"),desc:F("feat_achievement_hunter_desc",[50]),flair:F("feat_adept_flair")},master:{name:F("feat_master_name"),desc:F("feat_achievement_hunter_desc",[75]),flair:F("feat_master_flair")},grandmaster:{name:F("feat_grandmaster_name"),desc:F("feat_achievement_hunter_desc",[100]),flair:F("feat_grandmaster_flair")},nephilim:{name:F("feat_nephilim_name"),desc:F("feat_nephilim_desc"),flair:F("feat_nephilim_flair")},twisted:{name:F("feat_twisted_name"),desc:F("feat_twisted_desc"),flair:F("feat_twisted_flair")},slime_lord:{name:F("feat_slime_lord_name"),desc:F("feat_slime_lord_desc"),flair:F("feat_slime_lord_flair")},annihilation:{name:F("feat_annihilation_name"),desc:F("feat_annihilation_desc"),flair:F("feat_annihilation_flair")},friday:{name:F("feat_friday_name"),desc:F("feat_friday_desc"),flair:F("feat_friday_flair")},valentine:{name:F("feat_love_name"),desc:F("feat_love_desc"),flair:F("feat_love_flair")},leprechaun:{name:F("feat_leprechaun_name"),desc:F("feat_leprechaun_desc"),flair:F("feat_leprechaun_flair")},easter:{name:F("feat_easter_name"),desc:F("feat_easter_desc"),flair:F("feat_easter_flair")},egghunt:{name:F("feat_egghunt_name"),desc:F("feat_egghunt_desc"),flair:F("feat_egghunt_flair")},launch_day:{name:F("feat_launch_day_name"),desc:F("feat_launch_day_desc"),flair:F("feat_launch_day_flair")},solstice:{name:F("feat_solstice_name"),desc:F("feat_solstice_desc"),flair:F("feat_solstice_flair")},firework:{name:F("feat_firework_name"),desc:F("feat_firework_desc"),flair:F("feat_firework_flair")},halloween:{name:F("feat_boo_name"),desc:F("feat_boo_desc"),flair:F("feat_boo_flair")},trickortreat:{name:F("feat_trickortreat_name"),desc:F("feat_trickortreat_desc"),flair:F("feat_trickortreat_flair")},thanksgiving:{name:F("feat_gobble_gobble_name"),desc:F("feat_gobble_gobble_desc"),flair:F("feat_gobble_gobble_flair")},xmas:{name:F("feat_xmas_name"),desc:F("feat_xmas_desc"),flair:F("feat_xmas_flair")},fool:{name:F("feat_fool_name"),desc:F("feat_fool_desc"),flair:F("feat_fool_flair")}};{let e=xn();e.aLvl,e.uLvl}function xn(e){let a=qn(e=e||t.race.universe),r=0,i=0;return Object.keys(kn).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]&&(i+=t.stats.achieve[e][a]>5?5:t.stats.achieve[e][a]))})),{aLvl:r,uLvl:i}}function qn(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 Pn(e,a,r,i){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 s=Sn(),n=!1,c=!1;(void 0===r||r>s)&&(r=s);let o=!0;if(void 0===t.stats.achieve[e]&&(t.stats.achieve[e]={l:0},o=!1),("micro"===t.race.universe&&!0===a||"micro"!==t.race.universe&&!0!==a)&&t.stats.achieve[e]&&t.stats.achieve[e].li)&&(r=i),!t.stats.feat[e]||t.stats.feat[e]&&t.stats.feat[e]5?5:t.stats.achieve[e].l,t.stats.achieve[e][c]&&(n+=t.stats.achieve[e][c]>5?5:t.stats.achieve[e][c]);let i=Ys(e,16,l,o);o&&t.stats.achieve[e].l>1||!o?a.append($(`
                    ${kn[e].name}${kn[e].desc}${i}
                    `)):o&&1===t.stats.achieve[e].l&&r--}})),o&&!t.stats.feat.fool){let e=$(`
                    ${$n.fool.name}${F("feat_fool_spoof")}
                    `);a.append(e)}else Object.keys($n).forEach((function(e){let r=Ws(e,"feat");if(t.stats.feat[e]){let i=t.stats.feat[e]>1?`

                    ${Us(r)}

                    `:"";if("easter"===e){let e=Js(4,14);e.length>0&&(i=e)}a.append($(`
                    ${$n[e].name}${$n[e].desc}${i}
                    `))}}));let l=Zs(5,12,!1);a.prepend(`
                    ${F("achieve_draw_achieve_earned",[r,i])}${l}
                    `),zs({el:"#achievePanel",methods:{flair:e=>kn[e].flair,feat:e=>$n[e].flair}}),o&&!t.stats.feat.fool&&$("#thefool").on("mouseover",(function(){"micro"===t.race.universe?jn("fool",!0):jn("fool"),On()}))}function Mn(){let e=Sn();$("#topBar span.flair")&&Cs($("#topBar span.flair"),!0);let a=Js(1,14);if(a.length>0&&$("#topBar .planet").after($(a)),e>1&&0===$("#topBar .planet .flair").length){if(0===a.length){let t=Ws("topbar","challenge");$("#topBar .planet").after(`${Us(t)}`)}let r="";t.race.no_plasmid&&(r+=`
                    ${F("evo_challenge_plasmid")}
                    `),t.race.weak_mastery&&(r+=`
                    ${F("evo_challenge_mastery")}
                    `),t.race.no_trade&&(r+=`
                    ${F("evo_challenge_trade")}
                    `),t.race.no_craft&&(r+=`
                    ${F("evo_challenge_craft")}
                    `),t.race.no_crispr&&(r+=`
                    ${F("evo_challenge_crispr")}
                    `),t.race.nerfed&&(r+=`
                    ${F("evo_challenge_nerfed")}
                    `),t.race.badgenes&&(r+=`
                    ${F("evo_challenge_badgenes")}
                    `),r.length>0&&$("#topBar .planetWrap .flair").append($(`
                    Active Challenge Genes
                    ${r}
                    `)),_s("topbarPlanet",(function(e){let t=$('
                    ');e.popper.append(t),t.append($(r))}),{elm:"#topBar .planetWrap .flair",classes:"has-background-light has-text-dark"})}}function Sn(){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 Cn(){let e=Sn();for(let a=e;a>=0;a--)zn("extinct_","mass_extinction",25,a),"evil"===t.race.universe&&Fn("extinct_","vigilante",12,a),zn("genus_","creator",9,a),zn("biome_","explorer",6,a),"heavy"===t.race.universe&&Fn("genus_","heavyweight",8,a);if(t.tech.supercollider&&t.tech.supercollider>=99&&Pn("blackhole"),t.stats.starved>=100&&Pn("mass_starvation"),Math.round(Math.log2(t.civic.garrison.protest+t.civic.garrison.fatigue))>=8&&Pn("warmonger"),t.stats.died>=250&&Pn("red_tactics"),t.interstellar.stellar_engine&&t.interstellar.stellar_engine.mass>=12&&Pn("landfill"),t.interstellar.stellar_engine&&t.interstellar.stellar_engine.mass>=100&&jn("supermassive"),t.tech.piracy&&t.tech.chthonian&&t.tech.chthonian>=2&&t.galaxy&&1===St("gxy_stargate")&&1===St("gxy_gateway")&&1===St("gxy_gorddon")&&1===St("gxy_alien1")&&1===St("gxy_alien2")&&1===St("gxy_chthonian")&&Pn("neutralized"),on("summer")&&t.resource.hasOwnProperty("Thermite")){let e=1e5+9e3*t.stats.reset;e>1e6&&(e=1e6),t.resource.Thermite.amount>e&&jn("solstice","micro"===t.race.universe)}if(on("firework")&&t[t.race.cataclysm||t.race.orbit_decayed?"space":"city"].firework.on>0&&jn("firework","micro"===t.race.universe),t.city.morale.current>=200&&(Pn("paradise"),t.city.morale.current>=500&&jn("utopia")),t.resource.hasOwnProperty("Money")&&t.resource.Money.amount>=1e9&&Pn("scrooge"),t.resource.hasOwnProperty("Money")&&t.race.inflation&&t.resource.Money.amount>=25e10&&Pn("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&&Pn("trade"),t.tech.pillars){let e={},a=0,r=5;if(Object.keys(t.pillars).forEach((function(i){Di[i]&&((!e[Di[i].type]||t.pillars[i]>e[Di[i].type])&&(e[Di[i].type]=t.pillars[i]),t.pillars[i]=Object.keys(Ei).length){let t=5;Object.keys(e).forEach((function(a){e[a]=Object.keys(Di).length-1&&Pn("resonance"),a>=50&&jn("equilibrium",!1,r)}if(t.portal.hasOwnProperty("mechbay")&&t.tech.hasOwnProperty("hell_spire")&&t.tech.hell_spire>=9){let e=Object.keys(fa).length,a={};Object.keys(t.stats.spire).forEach((function(r){let i={};Object.keys(t.stats.spire[r]).forEach((function(e){fa[e]&&((!a.hasOwnProperty(e)||a[e]0&&(i[e]=t.stats.spire[r][e]))})),Object.keys(i).length===e&&Pn("gladiator",!1,Math.min(...Object.values(i)),r)})),Object.keys(a).length===e&&Pn("gladiator",!1,Math.min(...Object.values(a)),"l")}if(t.race.banana){let e=qn();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(i){t.stats.banana[i].l&&a++,"l"!==e&&t.stats.banana[i][e]&&r++})),a>0&&Pn("banana",!1,a,"l"),r>0&&"l"!==e&&Pn("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",qn()].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&&Pn("pathfinder",!1,a,e)}));const a=new Date;let r=on("easter"),i=on("halloween"),s=a.getFullYear();if(!t.settings.boring&&13===a.getDate()&&5===a.getDay()&&t.resource[t.race.species].amount>=1){let e=!1;e=jn("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){jn("easter","micro"===t.race.universe);let e=0;for(let a=1;a<=18;a++)t.special.egg[s][`egg${a}`]&&e++;e>=12&&jn("egghunt","micro"===t.race.universe)}else if(on("launch_day"))jn("launch_day","micro"===t.race.universe);else if(i.active){let e=0;for(let a=1;a<=7;a++)t.special.trick[s][`trick${a}`]&&e++;for(let a=1;a<=7;a++)t.special.trick[s][`treat${a}`]&&e++;e>=12&&jn("trickortreat","micro"===t.race.universe),9===a.getMonth()&&31===a.getDate()&&jn("halloween","micro"===t.race.universe)}else!t.settings.boring&&10===a.getMonth()&&a.getDate()>=22&&a.getDate()<=28?jn("thanksgiving","micro"===t.race.universe):t.settings.boring||11!==a.getMonth()||25!=a.getDate()||jn("xmas","micro"===t.race.universe);else jn("leprechaun","micro"===t.race.universe);else jn("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&&jn("fool","micro"===t.race.universe),t.stats.dkills>=666e6&&jn("demon_slayer");for(let a=e;a>=1;a--){let e=0;const r=Object.keys(kn);for(const i of r)t.stats.achieve[i]&&t.stats.achieve[i].l>=a&&e++;let i=[{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>=i[r].c&&(!t.stats.feat[i[r].f]||t.stats.feat[i[r].f]=i&&s++;if(s>=r&&(Pn(a,!1,i),"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&&Fn(e,a,r,i)}function Fn(e,a,r,i){let s=!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=i&&s++;break;case"antimatter":t.stats.achieve[a]&&t.stats.achieve[a].a&&t.stats.achieve[a].a>=i&&s++;break;case"heavy":t.stats.achieve[a]&&t.stats.achieve[a].h&&t.stats.achieve[a].h>=i&&s++;break;case"micro":t.stats.achieve[a]&&t.stats.achieve[a].m&&t.stats.achieve[a].m>=i&&s++;break;case"magic":t.stats.achieve[a]&&t.stats.achieve[a].mg&&t.stats.achieve[a].mg>=i&&s++}s>=r&&Pn(a,!1,i)}}const An={mastery:{name:F("mastery"),desc(){let e="";return Object.keys(Qt).forEach((function(a){let r=Ks(a,!0);"standard"===a?e+=`${Qt[a].name}: ${F("perks_mastery_general",[`${+r.g.toFixed(2)}%`])}`:t.stats.achieve.whitehole&&(e+=`${Qt[a].name}: ${F("perks_mastery_general",[`${+r.g.toFixed(2)}%`])}, ${F("perks_mastery_universe",[`${+r.u.toFixed(2)}%`])}`)})),e},active:()=>!!(t.genes.challenge&&t.genes.challenge>=2),notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_unlocked_title")}`])]},blackhole:{name:F("achieve_blackhole_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_blackhole_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_blackhole_name")}`])]},trade:{name:F("achieve_trade_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_trade_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_trade_name")}`])]},creator:{name:F("achieve_creator_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_creator_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_creator_name")}`])]},mass_extinction:{name:F("achieve_mass_extinction_name"),group:[{desc:()=>F("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 F("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:[F("wiki_perks_achievement_note",[`${F("achieve_mass_extinction_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_mass_extinction_name")}`])]},doomed:{name:F("achieve_doomed_name"),desc:e=>F("achieve_perks_doomed"),active:()=>t.stats.portals>=1,notes:[F("wiki_perks_achievement_note",[`${F("achieve_doomed_name")}`])]},explorer:{name:F("achieve_explorer_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_explorer_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_explorer_name")}`])]},miners_dream:{name:F("achieve_miners_dream_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_miners_dream_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_miners_dream_name")}`])]},extinct_junker:{name:F("achieve_extinct_junker_name"),desc:()=>F("achieve_perks_enlightened"),active:()=>!!(t.stats.achieve.extinct_junker&&t.stats.achieve.extinct_junker.l>=1),notes:[F("wiki_perks_achievement_note",[`${F("achieve_extinct_junker_name")}`])]},joyless:{name:F("achieve_joyless_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_joyless_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_joyless_name")}`])]},steelen:{name:F("achieve_steelen_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_steelen_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_steelen_name")}`])]},wheelbarrow:{name:F("achieve_wheelbarrow_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_wheelbarrow_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_wheelbarrow_name")}`])]},extinct_sludge:{name:F("achieve_extinct_sludge_name"),group:[{desc:e=>F("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.l:3,F("universe_standard")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.l>=1)},{desc:e=>F("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.h:3,F("universe_heavy")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.h>=1)},{desc:e=>F("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.a:3,F("universe_antimatter")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.a>=1)},{desc:e=>F("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.e:3,F("universe_evil")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.e>=1)},{desc:e=>F("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.m:3,F("universe_micro")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.m>=1)},{desc:e=>F("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.mg:3,F("universe_magic")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.mg>=1)}],notes:[F("wiki_perks_achievement_note",[`${F("achieve_extinct_sludge_name")}`]),F("wiki_perks_achievement_note_universe_scale",[`${F("achieve_extinct_sludge_name")}`])]},whitehole:{name:F("achieve_whitehole_name"),group:[{desc:()=>F("achieve_perks_whitehole"),active:()=>!!t.stats.achieve.whitehole},{desc:e=>F("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=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_whitehole_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_whitehole_name")}`])]},heavyweight:{name:F("achieve_heavyweight_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_heavyweight_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_heavyweight_name")}`])]},dissipated:{name:F("achieve_dissipated_name"),group:[{desc:()=>F("achieve_perks_dissipated1",[1]),active:()=>!!(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=1)},{desc:e=>F("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:()=>F("achieve_perks_dissipated3",[1]),active:()=>!!(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=2)},{desc:()=>F("achieve_perks_dissipated4",[1]),active:()=>!!(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=4)}],notes:[F("wiki_perks_achievement_note",[`${F("achieve_dissipated_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_dissipated_name")}`])]},banana:{name:F("achieve_banana_name"),group:[{desc:()=>F("achieve_perks_banana1",[50]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=1)},{desc:()=>F("achieve_perks_banana2",[1]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=2)},{desc:()=>F("achieve_perks_banana3",[10]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=3)},{desc:()=>F("achieve_perks_banana4",[3]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=4)},{desc:()=>F("achieve_perks_banana5",[.01]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=5)}],notes:[F("wiki_perks_achievement_note",[`${F("achieve_banana_name")}`]),F("wiki_perks_achievement_note_task",[`${F("achieve_banana_name")}`]),F("wiki_perks_achievement_note_task_num",[1,`${F("wiki_achieve_banana1")}`]),F("wiki_perks_achievement_note_task_num",[2,`${F("wiki_achieve_banana2")}`]),F("wiki_perks_achievement_note_task_num",[3,`${F("wiki_achieve_banana3")}`]),F("wiki_perks_achievement_note_task_num",[4,`${F("wiki_achieve_banana4",[500])}`]),F("wiki_perks_achievement_note_task_num",[5,`${F("wiki_achieve_banana5",[50])}`])]},anarchist:{name:F("achieve_anarchist_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_anarchist_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_anarchist_name")}`])]},ascended:{name:F("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:()=>F("achieve_perks_ascended2",[Os()]),active:()=>!!(t.stats.achieve.ascended&&t.stats.achieve.ascended[qn()]>=1)}],notes:[F("wiki_perks_achievement_note",[`${F("achieve_ascended_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_ascended_name")}`]),F("wiki_perks_achievement_note_universe",[`${F("achieve_ascended_name")}`])]},technophobe:{name:F("achieve_technophobe_name"),group:[{desc:()=>F("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 F("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 F(e||a>1?"achieve_perks_technophobe3a":"achieve_perks_technophobe3",[a])},active:()=>!!(t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=3)},{desc:()=>F("achieve_perks_technophobe4",[10]),active:()=>!!(t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=5)},{desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_technophobe_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_technophobe_name")}`]),F("wiki_perks_achievement_note_universe",[`${F("achieve_technophobe_name")}`])]},iron_will:{name:F("achieve_iron_will_name"),group:[{desc:()=>F("achieve_perks_iron_will1",[.15]),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=1)},{desc:()=>F("achieve_perks_iron_will2",[10]),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=2)},{desc:()=>F("achieve_perks_iron_will3",[6]),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=3)},{desc:()=>F("achieve_perks_iron_will4",[1]),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=4)},{desc:()=>F("achieve_perks_iron_will5"),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=5)}],notes:[F("wiki_perks_achievement_note",[`${F("achieve_iron_will_name")}`]),F("wiki_perks_achievement_note_ironwill",[`${F("evo_challenge_cataclysm")}`]),F("wiki_perks_achievement_note_ironwill2",[1,`${F("space_red_ziggurat_title")}`]),F("wiki_perks_achievement_note_ironwill3",[2,`${F("tech_elerium_mining")}`]),F("wiki_perks_achievement_note_ironwill3",[3,`${F("tech_lasers")}`]),F("wiki_perks_achievement_note_ironwill3",[4,`${F("tech_generational_ship")}`]),F("wiki_perks_achievement_note_ironwill4",[5,`${F("wiki_resets_bioseed")}`])]},failed_history:{name:F("achieve_failed_history_name"),desc:()=>F("achieve_perks_failed_history",[2]),active:()=>!!(t.stats.achieve.failed_history&&t.stats.achieve.failed_history.l>=5),notes:[F("wiki_perks_achievement_note",[`${F("achieve_failed_history_name")}`]),F("wiki_perks_achievement_note_failed_history",[`${F("evo_challenge_cataclysm")}`])]},lamentis:{name:F("achieve_lamentis_name"),group:[{desc:()=>F("achieve_perks_lamentis1",["10%"]),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=1)},{desc:()=>F("achieve_perks_lamentis2",["10%"]),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=2)},{desc:()=>F("achieve_perks_lamentis3",["10%"]),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=3)},{desc:()=>F("achieve_perks_lamentis4"),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=4)},{desc:()=>F("achieve_perks_lamentis5"),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=5)}],notes:[F("wiki_perks_achievement_note",[`${F("achieve_lamentis_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_lamentis_name")}`])]},soul_sponge:{name:F("achieve_soul_sponge_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_soul_sponge_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_soul_sponge_name")}`])]},nightmare:{name:F("achieve_nightmare_name"),desc:()=>F("achieve_perks_nightmare"),active:()=>!!(t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg>=1),notes:[F("wiki_perks_achievement_note",[`${F("achieve_nightmare_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_nightmare_name")}`])]},gladiator:{name:F("achieve_gladiator_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_gladiator_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_gladiator_name")}`])]},pathfinder:{name:F("achieve_pathfinder_name"),group:[{desc:()=>F("achieve_perks_pathfinder1",[10]),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=1)},{desc:()=>F("achieve_perks_pathfinder2",[10]),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=2)},{desc:()=>F("achieve_perks_pathfinder3"),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=3)},{desc:()=>F("achieve_perks_pathfinder4"),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=4)},{desc:()=>F("achieve_perks_pathfinder5"),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=5)}],notes:[F("wiki_perks_achievement_note",[`${F("achieve_pathfinder_name")}`]),F("wiki_perks_achievement_note_pathfinder",[`${F("evo_challenge_truepath")}`]),F("wiki_perks_achievement_note_pathfinder_reset",[`${F("wiki_resets_mad")}`]),F("wiki_perks_achievement_note_pathfinder_reset",[`${F("wiki_resets_bioseed")}`]),F("wiki_perks_achievement_note_pathfinder_reset",[`${F("wiki_resets_ai")}`]),F("wiki_perks_achievement_note_pathfinder_reset",[`${F("wiki_resets_matrix")}`]),F("wiki_perks_achievement_note_pathfinder_reset",[`${F("wiki_resets_retired")}`])]},overlord:{name:F("achieve_overlord_name"),desc(){let e=`
                    ${F("achieve_perks_overlord1",[10])}
                    `;return e+=`
                    ${F("achieve_perks_overlord2")}
                    `,e+=`
                    ${F("achieve_perks_overlord3")}
                    `,e+=`
                    ${F("achieve_perks_overlord4")}
                    `,e},active:()=>!!(t.stats.achieve.overlord&&t.stats.achieve.overlord.l>=5),notes:[F("wiki_perks_achievement_note",[`${F("achieve_overlord_name")}`])]},adam_eve:{name:F("achieve_adam_eve_name"),desc:()=>F("achieve_perks_adam_eve"),active:()=>!!(t.stats.achieve.adam_eve&&t.stats.achieve.adam_eve.l>=5),notes:[]},creep:{name:F("wiki_arpa_crispr_creep"),desc:e=>F("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:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_genetic_memory_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_animus_title")}`,`${F("arpa_genepool_divine_remembrance_title")}`,`${F("arpa_genepool_divine_proportion_title")}`,`${F("arpa_genepool_genetic_repository_title")}`].join(", ")])]},store:{name:F("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 F(t.genes.store&&t.genes.store>=4?"arpa_perks_store2":"arpa_perks_store1",[a])},active:()=>!!t.genes.store,notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_spatial_reasoning_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_spatial_superiority_title")}`,`${F("arpa_genepool_spatial_supremacy_title")}`,`${F("arpa_genepool_dimensional_warping_title")}`].join(", ")])]},evolve:{name:F("wiki_arpa_crispr_evolve"),group:[{desc:()=>F("arpa_perks_evolve"),active:()=>!!t.genes.evolve},{desc:()=>F("arpa_genepool_recombination_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=2)},{desc:()=>F("arpa_genepool_homologous_recombination_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=3)},{desc:()=>F("arpa_genepool_genetic_reshuffling_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=4)},{desc:()=>F("arpa_genepool_recombinant_dna_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=5)},{desc:()=>F("arpa_genepool_chimeric_dna_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=6)},{desc:()=>F("arpa_genepool_molecular_cloning_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=7)},{desc:()=>F("arpa_genepool_transgenes_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=8)}],notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_morphogenesis_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_recombination_title")}`,`${F("arpa_genepool_homologous_recombination_title")}`,`${F("arpa_genepool_genetic_reshuffling_title")}`,`${F("arpa_genepool_recombinant_dna_title")}`,`${F("arpa_genepool_chimeric_dna_title")}`,`${F("arpa_genepool_molecular_cloning_title")}`,`${F("arpa_genepool_transgenes_title")}`].join(", ")])]},birth:{name:F("wiki_arpa_crispr_birth"),desc:()=>F("arpa_perks_birth"),active:()=>!!t.genes.birth,notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_replication_title")}`])]},enhance:{name:F("wiki_arpa_crispr_enhance"),desc:()=>F("arpa_perks_enhance"),active:()=>!!t.genes.enhance,notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_enhanced_muscle_fiber_title")}`])]},crafty:{name:F("wiki_arpa_crispr_crafty"),group:[{desc:()=>F("arpa_genepool_artificer_desc"),active:()=>!!t.genes.crafty},{desc:e=>F("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:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_artificer_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_detail_oriented_title")}`,`${F("arpa_genepool_rigorous_title")}`].join(", ")])]},governor:{name:F("wiki_arpa_crispr_governor"),desc:()=>F("arpa_perks_governor"),active:()=>!!t.genes.governor,notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_governance_title")}`])]},synthesis:{name:F("wiki_arpa_crispr_synthesis"),desc:e=>F("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:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_synthesis_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_karyokinesis_title")}`,`${F("arpa_genepool_cytokinesis_title")}`].join(", ")])]},challenge:{name:F("wiki_arpa_crispr_challenge"),group:[{desc:()=>F("arpa_perks_challenge"),active:()=>!!t.genes.challenge},{desc:()=>F("arpa_genepool_unlocked_desc"),active:()=>!!(t.genes.challenge&&t.genes.challenge>=2)},{desc:e=>F("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:()=>F("arpa_perks_challenge3"),active:()=>!!(t.genes.challenge&&t.genes.challenge>=5)}],notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_hardened_genes_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_unlocked_title")}`,`${F("arpa_genepool_universal_title")}`,`${F("arpa_genepool_standard_title")}`,`${F("arpa_genepool_mastered_title")}`].join(", ")]),F("wiki_perks_crispr_note_challenge",[F("arpa_genepool_universal_title"),F("arpa_genepool_standard_title")])]},ancients:{name:F("wiki_arpa_crispr_ancients"),group:[{desc:()=>F("arpa_perks_ancients"),active:()=>!!t.genes.ancients},{desc:()=>t.genes.ancients&&t.genes.ancients>=4?F("arpa_perks_ancients3"):F("arpa_perks_ancients2"),active:()=>!!(t.genes.ancients&&t.genes.ancients>=2)},{desc:e=>F("arpa_perks_ancients4",[e?"25/50":t.genes.ancients&&t.genes.ancients>=5?50:25]),active:()=>!!(t.genes.ancients&&t.genes.ancients>=3)}],notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_ancients_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_faith_title")}`,`${F("arpa_genepool_devotion_title")}`,`${F("arpa_genepool_acolyte_title")}`,`${F("arpa_genepool_conviction_title")}`].join(", ")])]},trader:{name:F("wiki_arpa_crispr_trader"),desc:()=>F("arpa_genepool_negotiator_desc"),active:()=>!!t.genes.trader,notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_negotiator_title")}`])]},transcendence:{name:F("wiki_arpa_crispr_transcendence"),desc:()=>F("arpa_genepool_transcendence_desc"),active:()=>!!t.genes.transcendence,notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_transcendence_title")}`])]},queue:{name:F("wiki_arpa_crispr_queue"),group:[{desc:()=>F("arpa_genepool_geographer_desc"),active:()=>!!t.genes.queue},{desc:()=>F("arpa_genepool_architect_desc"),active:()=>!!(t.genes.queue&&t.genes.queue>=2)}],notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_geographer_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_architect_title")}`].join(", ")])]},plasma:{name:F("wiki_arpa_crispr_plasma"),desc:e=>F("arpa_genepool_mitosis_desc",[e?"3/5":t.genes.plasma>=2?5:3]),active:()=>!!t.genes.plasma,notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_mitosis_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_metaphase_title")}`].join(", ")])]},mutation:{name:F("wiki_arpa_crispr_mutation"),group:[{desc:()=>t.genes.mutation&&t.genes.mutation>1?F("arpa_perks_mutation2"):F("arpa_perks_mutation1"),active:()=>!!t.genes.mutation},{desc:()=>F("arpa_perks_mutation3"),active:()=>!!(t.genes.mutation&&t.genes.mutation>=3)}],notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_mutation_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_transformation_title")}`,`${F("arpa_genepool_metamorphosis_title")}`].join(", ")])]},bleed:{name:F("wiki_arpa_crispr_bleed"),group:[{desc:()=>F("arpa_genepool_bleeding_effect_desc",[2.5]),active:()=>!!t.genes.bleed},{desc:()=>F("arpa_genepool_synchronicity_desc",[25]),active:()=>!!(t.genes.bleed&&t.genes.bleed>=2)},{desc:()=>F("arpa_genepool_astral_awareness_desc"),active:()=>!!(t.genes.bleed&&t.genes.bleed>=3)}],notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_bleeding_effect_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_synchronicity_title")}`,`${F("arpa_genepool_astral_awareness_title")}`].join(", ")]),F("wiki_perks_crispr_note_bleed",[`${F("arpa_genepool_bleeding_effect_title")}`])]},blood:{name:F("wiki_arpa_crispr_blood"),group:[{desc:()=>F("arpa_genepool_blood_remembrance_desc"),active:()=>!!t.genes.blood},{desc:()=>F("arpa_genepool_blood_sacrifice_desc"),active:()=>!!(t.genes.blood&&t.genes.blood>=2)},{desc:()=>F("arpa_genepool_essence_absorber_desc"),active:()=>!!(t.genes.blood&&t.genes.blood>=3)}],notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_blood_remembrance_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_blood_sacrifice_title")}`,`${F("arpa_genepool_essence_absorber_title")}`].join(", ")]),F("wiki_perks_crispr_note_blood",[F("arpa_genepool_blood_remembrance_title")])]},spire:{name:F("wiki_arpa_blood_spire"),group:[{desc:()=>F("arpa_blood_purify_desc"),active:()=>!!t.blood.spire},{desc:()=>F("arpa_blood_chum_desc"),active:()=>!!(t.blood.spire&&t.blood.spire>=2)}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_purify_title")}`]),F("wiki_perks_blood_note_upgrade",[[`${F("arpa_blood_chum_title")}`].join(", ")])]},lust:{name:F("wiki_arpa_blood_lust"),group:[{desc:e=>F("arpa_perks_lust",[e?.2:.2*(t.blood.lust?t.blood.lust:1)]),active:()=>!!t.blood.lust}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_lust_title")}`]),F("wiki_perks_blood_note_repeat",[F("arpa_blood_lust_title")])]},illuminate:{name:F("wiki_arpa_blood_illuminate"),group:[{desc:e=>F("arpa_perks_illuminate",[e?.01:.01*(t.blood.illuminate?t.blood.illuminate:1)]),active:()=>!!t.blood.illuminate}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_illuminate_title")}`]),F("wiki_perks_blood_note_repeat",[F("arpa_blood_illuminate_title")])]},greed:{name:F("wiki_arpa_blood_greed"),group:[{desc:e=>F("arpa_perks_greed",[e?1:1*(t.blood.greed?t.blood.greed:1)]),active:()=>!!t.blood.greed}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_greed_title")}`]),F("wiki_perks_blood_note_repeat",[F("arpa_blood_greed_title")])]},hoarder:{name:F("wiki_arpa_blood_hoarder"),group:[{desc:e=>F("arpa_perks_hoarder",[e?1:1*(t.blood.hoarder?t.blood.hoarder:1)]),active:()=>!!t.blood.hoarder}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_hoarder_title")}`]),F("wiki_perks_blood_note_repeat",[F("arpa_blood_hoarder_title")])]},artisan:{name:F("wiki_arpa_blood_artisan"),group:[{desc:e=>F("arpa_perks_artisan",[e?1:1*(t.blood.artisan?t.blood.artisan:1)]),active:()=>!!t.blood.artisan}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_artisan_title")}`]),F("wiki_perks_blood_note_repeat",[F("arpa_blood_artisan_title")])]},attract:{name:F("wiki_arpa_blood_attract"),group:[{desc:e=>F("arpa_perks_attract",[e?5:5*(t.blood.attract?t.blood.attract:1)]),active:()=>!!t.blood.attract}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_attract_title")}`]),F("wiki_perks_blood_note_repeat",[F("arpa_blood_attract_title")])]},wrath:{name:F("wiki_arpa_blood_wrath"),group:[{desc:e=>F("arpa_perks_wrath",[e?5:5*(t.blood.wrath?t.blood.wrath:1)]),active:()=>!!t.blood.wrath}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_wrath_title")}`]),F("wiki_perks_blood_note_repeat",[F("arpa_blood_wrath_title")])]},prepared:{name:F("wiki_arpa_blood_prepared"),group:[{desc:()=>F("arpa_blood_prepared_desc"),active:()=>!!t.blood.prepared},{desc:()=>F("arpa_blood_compact_desc"),active:()=>!!(t.blood.prepared&&t.blood.prepared>=2)}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_prepared_title")}`]),F("wiki_perks_blood_note_upgrade",[[`${F("arpa_blood_compact_title")}`].join(", ")])]},unbound:{name:F("wiki_arpa_blood_unbound"),group:[{desc:()=>F("arpa_blood_unbound_desc"),active:()=>!!t.blood.unbound},{desc:()=>F("arpa_blood_shadow_war_desc"),active:()=>!!(t.blood.unbound&&t.blood.unbound>=3)},{desc:e=>F("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:[F("wiki_perks_blood_note",[`${F("arpa_blood_unbound_title")}`]),F("wiki_perks_blood_note_upgrade",[[`${F("arpa_blood_unbound_resistance_title")}`,`${F("arpa_blood_shadow_war_title")}`,`${F("arpa_blood_unbound_immunity_title")}`].join(", ")])]},aware:{name:F("wiki_arpa_blood_aware"),group:[{desc:()=>F("arpa_blood_blood_aware_desc"),active:()=>!!t.blood.aware}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_blood_aware_title")}`])]},harmonic:{name:F("harmonic"),group:[{desc(e){let t=Ds();return F("perks_harmonic",[e?`1-${Object.keys(Di).length+2}`:+(100*(t[0]-1)).toFixed(0),e?"2-"+2*(Object.keys(Di).length+2):+(100*(t[1]-1)).toFixed(0)])},active(){let e=Ds();return!!(t.pillars&&e[0]>1)}},{desc:e=>(Ds(),F("perks_harmonic2",[F("portal_west_tower"),F("portal_east_tower"),e?"12-"+12*(Object.keys(Di).length-1):12*Object.keys(t.pillars).length])),active(){let e=Ds();return!!(t.pillars&&e[0]>1)}}],notes:[F("wiki_perks_harmonic_note1"),F("wiki_perks_harmonic_note2")]},novice:{name:F("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`
                    ${F("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])}
                    ${F("achieve_perks_novice2")}
                    `},active:()=>!!(t.stats.feat.novice&&t.stats.mad>0),notes:[F("wiki_perks_progress_note1",[10,F("wiki_resets_mad")]),F("wiki_perks_progress_note2")]},journeyman:{name:F("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?`
                    ${F("achieve_perks_journeyman2",[e?"1/2/3":a>=3?a>=5?3:2:1,e?"1/2":a>=4?2:1])}
                    ${F("achieve_perks_journeyman3")}
                    `:`
                    ${F("achieve_perks_journeyman1",[1])}
                    ${F("achieve_perks_journeyman3")}
                    `},active:()=>!!(t.stats.feat.journeyman&&t.stats.bioseed>0),notes:[F("wiki_perks_progress_note1",[25,F("wiki_resets_bioseed")]),F("wiki_perks_progress_note2")]},adept:{name:F("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 F("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:[F("wiki_perks_progress_note1",[50,F("wiki_resets_blackhole")]),F("wiki_perks_progress_note2")]},master:{name:F("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 F("achieve_perks_master",[e?"1/2/3/4/5":a,e?"2/4/6/8/10":2*a,F("evo_mitochondria_title"),F("evo_eukaryotic_title"),F("evo_membrane_title"),F("evo_organelles_title"),F("evo_nucleus_title")])},active:()=>!!(t.stats.feat.master&&t.stats.achieve.ascended&&t.stats.achieve.ascended.l>0),notes:[F("wiki_perks_progress_note1",[75,F("wiki_resets_ascension")]),F("wiki_perks_progress_note2")]},grandmaster:{name:F("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 F("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:[F("wiki_perks_progress_note1",[100,F("wiki_resets_infusion")]),F("wiki_perks_progress_note2")]}};function In(){Cs($("#perksPanel"));let e=$("#perksPanel"),t=!1;Object.keys(An).forEach((function(a){if(An[a].hasOwnProperty("group")){let r=!1,i=$(`
                    ${An[a].name}
                    `);An[a].group.forEach((function(e){e.active()&&(r=!0,i.append($(`
                    ${e.desc()}
                    `)))})),r&&(t=!0,e.append(i))}else An[a].active()&&(t=!0,e.append($(`
                    ${An[a].name}${An[a].desc()}
                    `)))})),t||e.append($(`
                    ${F("perks_none")}
                    `))}function Tn(e,t,a){if(!t.hasOwnProperty("name"))return;if(!t.hasOwnProperty("template"))return;t.hasOwnProperty("paragraphs")||(t.paragraphs=0),t.hasOwnProperty("text")||(t.text={}),t.hasOwnProperty("rawtext")||(t.rawtext={}),t.hasOwnProperty("para_data")||(t.para_data={}),t.hasOwnProperty("data_color")||(t.data_color={}),t.hasOwnProperty("data_link")||(t.data_link={}),t.hasOwnProperty("h_level")||(t.h_level=3),t.hasOwnProperty("header")||(t.header=!1),t.hasOwnProperty("full")||(t.full=!1),t.hasOwnProperty("break")||(t.break=!1),t.hasOwnProperty("default_color")||(t.default_color="warning"),t.hasOwnProperty("examples")||(t.examples=!1);let r=!1;a?r=a:(r=$(`
                    `),t.h_level&&r.append(`${t.label?t.label:F(`wiki_${t.template}_${t.name}`)}`));let i=[{s:1,e:t.break?t.break[0]-1:t.paragraphs}];if(t.break)for(let e=0;e');for(let r=e.s;r<=e.e;r++)if((t.text[r]||t.rawtext[r]||t.para_data[r])&&Array.isArray(t.para_data[r])){let e=t.para_data[r];if(t.data_link[r]&&Array.isArray(t.data_link[r]))for(let a=0;a${e[a]}`);let i=t.data_color[r]&&Array.isArray(t.data_color[r])?t.data_color[r]:t.para_data[r].map((e=>t.default_color));for(let t=0;t${e[t]}`);let s=t.rawtext[r]?t.rawtext[r]:F(t.text[r]?t.text[r]:`wiki_${t.template}_${t.name}_para${r}`,e);a.append(`${s}`)}else{let e=t.rawtext[r]?t.rawtext[r]:F(t.text[r]?t.text[r]:`wiki_${t.template}_${t.name}_para${r}`);a.append(`${e}`)}r.append(a)})),t.examples&&(r.append($(`
                    ${F("wiki_examples")}
                    `)),t.examples.forEach((function(e){r.append($(`
                    - ${e}
                    `))}))),a||e.append(r),r}function Ln(e,a,r,i){let s="string"==typeof a.title?a.title:a.title();if(r)e.append(`

                    ${s}

                    ${r}
                    `);else if(i)e.append(`

                    ${s}

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

                    ${s}

                    ${r?`${F("wiki_arpa_purchased")}`:""}${F(`wiki_tech_tree_${a.grant[0]}`)}: ${a.grant[1]}
                    `)}let n="string"==typeof a.desc?a.desc:a.desc(!0);n!==s&&e.append(`
                    ${n}
                    `);let c=$('
                    '),o=!1;if(a.hasOwnProperty("effect")){if(i){let e="string"==typeof a.effect&&a.effect;!1!==e?c.append(`
                    ${e}
                    `):c.append('
                    '),o=!0}else{let e="string"==typeof a.effect?a.effect:a.effect(!0);!1!==e&&(c.append(`
                    ${e}
                    `),o=!0)}e.append(c)}if(a.hasOwnProperty("cost")){let r=Rs(a,!0),s=o?$(`
                    `):$(`
                    `),n="";i&&(s.append($(`

                    ${F("wiki_calc_cost")}

                    `)),n=$(`

                    ${F("wiki_calc_cost_creep")}

                    `));let l=!1,_=function(e,t,a,r,c){i?(s.append($(`
                    ${a}{{ r.${e}.cost }}
                    `)),n.append($(`
                    {{ r.${e}.creep }}
                    `)),l=!0):t>0&&(s.append($(`
                    ${a}${q(t,1)}
                    `)),l=!0)},d="has-text-success";Object.keys(r).forEach((function(e){if("Structs"===e){let t=r[e]();Object.keys(t).forEach((function(e){Object.keys(t[e]).forEach((function(a){let r=t[e][a].hasOwnProperty("on")?t[e][a].on:t[e][a].count,c="";if(t[e][a].hasOwnProperty("s")){let r=t[e][a].s;c="string"==typeof Sr[e][r][a].title?Sr[e][r][a].title:Sr[e][r][a].title()}else c="string"==typeof Sr[e][a].title?Sr[e][a].title:Sr[e][a].title();s.append($(`
                    ${c}: ${r}
                    `)),i&&n.append($(`
                    ${F("wiki_calc_none")}
                    `)),l=!0}))}))}else if(["Plasmid","Phage","Dark","Harmony","AICore","Artifact","Blood_Stone","AntiPlasmid"].includes(e)){let a=e;"Plasmid"===e&&"antimatter"===t.race.universe&&(a="AntiPlasmid"),_(e,r[e](),F(`resource_${a}_name`)+": ",d)}else if("Supply"===e)_(e,r[e](),F(`resource_${e}_name`)+": ",d);else if("Custom"===e)s.append($(`
                    ${r[e]().label}
                    `)),l=!0;else if("Morale"!==e&&"Army"!==e&&"Bool"!==e){let a="Species"===e?t.race.species:e,i="Money"===a?"$":("HellArmy"===e?F("fortress_troops"):t.resource[a].name)+": ";i=i.replace("_"," "),_(e,r[e](),i,d)}})),l&&(a.hasOwnProperty("effect")||e.append(c),c.append(s),i&&c.append(n))}}function En(e,t,a,r){if("create"===e){let e=t?"string"==typeof t?$(`#${t}`):t:$("#content");Cs(e),e.addClass("flex");let a=$('
                    '),r=$('
                    '),i=$("
                      ");return e.append(a),e.append(r),r.append(i),a}{let e=$(`${r}`),s=$("
                    • ");s.append(e),$("#sideContent ul").append(s),i=a,e.click((function(){window.location.hash=`#${i}`,document.getElementById(i).scrollIntoView({block:"start",behavior:"smooth"})}))}var i}function Kn(e,t,a,r){En(e,t,a,"ᄂ"+r)}function Dn(e){return["moon","belt"].includes(e)?F("space_"+e+"_info_name"):["kuiper"].includes(e)?F("space_"+e+"_title"):Vt()[e]}function Bn(e,t,a,r){let i=$("
                      ");e.append(i),i.append(`{{ vis | label }}`);let s=$(``);i.append(s);let n=document.getElementById(t+a+"Section"),c={vis:!1};return zs({el:`#${t}${a}Button`,data:c,methods:{show(){"block"===n.style.display?(n.style.display="none",c.vis=!1):(n.style.display="block",c.vis=!0)}},filters:{label:e=>F(e?"wiki_reveal_hide":"wiki_reveal_show",[r])}}),s}function Gn(e,t,a,r){r=r||F("wiki_calc_insert_"+a);let i=$("
                      ");e.append(i),i.append(`{{ vis | label }}`);let s=$(``);i.append(s);let n=document.getElementById(t+a+"Section"),c={vis:!1};return zs({el:`#${t}${a}Button`,data:c,methods:{show(){"block"===n.style.display?(n.style.display="none",c.vis=!1):(n.style.display="block",c.vis=!0)}},filters:{label:e=>F(e?"wiki_calc_hide":"wiki_calc_show",[r])}}),s}function Nn(e){let t=$('
                      '),a=(r=e,(i={name:"planet",template:"planet",paragraphs:4,full:!0,para_data:{2:[365,"25%"],3:[4],4:["200-600"]}}).hasOwnProperty("h_level")||(i.h_level=2),i.header=!0,Tn(r,i,undefined));var r,i;Tn(e,{name:"geology",template:"planet",label:F("wiki_menu_planets"),paragraphs:4,h_level:2,para_data:{2:[2],3:["-10%","+19%"],4:[7,"+44%"]}},a);let s=Hn(ss,$(`

                      ${F("wiki_planet_biome")}

                      `)),n=Hn(ns,$(`

                      ${F("wiki_planet_trait")}

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

                      ${r.label}

                      `),i.append(`
                      ${r.desc}
                      `);let s=$('
                      ');if(r.vars&&r.wiki)for(let e=0;e${F(`wiki_planet_${a}${e}`,[Un(r.vars()[e],t)])}
                      `))}i.append(s),Rn[a]&&Rn[a].forEach((function(e){i.append($(`
                      ${F(`wiki_planet_${a}_${e}`)}
                      `))}))})),t}function Un(e,a){let r=e-1*("percent"===a||"inverted"===a?1:0);"inverted"!==a&&"inverted-decimal"!==a||(r*=-1,a="inverted"===a?"percent":"decimal");let i=(r>=0?"+":"")+r.toLocaleString(t.settings.locale,{style:a,maximumFractionDigits:2});return`${i}`}function Vn(e,a){let r=En("create");switch(e){case"prehistoric":!function(e,a){let r="truepath"===a?"tp_structures":"structures";Object.keys(Sr.evolution).forEach((function(i){if(Sr.evolution[i].hasOwnProperty("title")&&("custom"!==i||t.hasOwnProperty("custom"))&&(!Sr.evolution[i].hasOwnProperty("wiki")||Sr.evolution[i].wiki)){let t=Sr.evolution[i].id.split("-"),s=$(`
                      `);e.append(s),Ln(s,Sr.evolution[i],!1,!0),Qn(s,"prehistoric",i),ec(s,i,"prehistoric",!1,a),En("add",`prehistoric-${r}`,t[1],"function"==typeof Sr.evolution[i].title?Sr.evolution[i].title():Sr.evolution[i].title)}}))}(r,a);break;case"planetary":!function(e,t){let a="truepath"===t?"tp_structures":"structures";Object.keys(Sr.city).forEach((function(r){if((!Sr.city[r].hasOwnProperty("wiki")||Sr.city[r].wiki)&&(!Sr.city[r].hasOwnProperty("path")||Sr.city[r].path.includes(t))){let i=Sr.city[r].id.split("-"),s=$(`
                      `);e.append(s),Ln(s,Sr.city[r],!1,!0),Qn(s,"planetary",r),ec(s,r,"planetary",!1,t),En("add",`planetary-${a}`,i[1],"function"==typeof Sr.city[r].title?Sr.city[r].title():Sr.city[r].title)}}))}(r,a);break;case"space":!function(e,t){let a="truepath"===t?"tp_structures":"structures";Object.keys(Sr.space).forEach((function(r){let i="string"==typeof Sr.space[r].info.name?Sr.space[r].info.name:Sr.space[r].info.name(),s="string"==typeof Sr.space[r].info.desc?Sr.space[r].info.desc:Sr.space[r].info.desc();Object.keys(Sr.space[r]).forEach((function(n){if("info"!==n&&(!Sr.space[r][n].hasOwnProperty("wiki")||Sr.space[r][n].wiki)&&(!Sr.space[r][n].hasOwnProperty("path")||Sr.space[r][n].path.includes(t))){let c=Sr.space[r][n].id.split("-"),o=$(`
                      `);e.append(o),Ln(o,Sr.space[r][n],`${i}`,!0),Qn(o,"space",n),ec(o,n,"space",r,t),En("add",`space-${a}`,c[1],"function"==typeof Sr.space[r][n].title?Sr.space[r][n].title():Sr.space[r][n].title),_s(`pop${Sr.space[r][n].id}`,$(`
                      ${s}
                      `))}}))})),Object.keys(Sr.starDock).forEach((function(r){if("info"!==r&&(!Sr.starDock[r].hasOwnProperty("wiki")||Sr.starDock[r].wiki)&&(!Sr.starDock[r].hasOwnProperty("path")||Sr.starDock[r].path.includes(t))){let i=Sr.starDock[r].id.split("-"),s=$(`
                      `);e.append(s),Ln(s,Sr.starDock[r],`${F("space_gas_star_dock_title")}`,!0),Qn(s,"starDock",r),ec(s,r,"starDock",!1,t),En("add",`space-${a}`,i[1],"function"==typeof Sr.starDock[r].title?Sr.starDock[r].title():Sr.starDock[r].title),_s(`pop${Sr.starDock[r].id}`,$(`
                      ${F("space_gas_star_dock_wiki")}
                      `))}}))}(r,a);break;case"interstellar":!function(e){Object.keys(Sr.interstellar).forEach((function(t){let a="string"==typeof Sr.interstellar[t].info.name?Sr.interstellar[t].info.name:Sr.interstellar[t].info.name(),r="string"==typeof Sr.interstellar[t].info.desc?Sr.interstellar[t].info.desc:Sr.interstellar[t].info.desc();Object.keys(Sr.interstellar[t]).forEach((function(i){if("info"!==i&&(!Sr.interstellar[t][i].hasOwnProperty("wiki")||Sr.interstellar[t][i].wiki)){let s=Sr.interstellar[t][i].id.split("-"),n=$(`
                      `);e.append(n),Ln(n,Sr.interstellar[t][i],`${a}`,!0),Qn(n,"interstellar",i),ec(n,i,"interstellar",t),En("add","interstellar-structures",s[1],"function"==typeof Sr.interstellar[t][i].title?Sr.interstellar[t][i].title():Sr.interstellar[t][i].title),_s(`pop${Sr.interstellar[t][i].id}`,$(`
                      ${r}
                      `))}}))}))}(r);break;case"intergalactic":!function(e){Object.keys(Sr.galaxy).forEach((function(t){let a="string"==typeof Sr.galaxy[t].info.name?Sr.galaxy[t].info.name:Sr.galaxy[t].info.name(),r="string"==typeof Sr.galaxy[t].info.desc?Sr.galaxy[t].info.desc:Sr.galaxy[t].info.desc();Object.keys(Sr.galaxy[t]).forEach((function(i){if("info"!==i&&(!Sr.galaxy[t][i].hasOwnProperty("wiki")||Sr.galaxy[t][i].wiki)){let s=Sr.galaxy[t][i].id.split("-"),n=$(`
                      `);e.append(n),Ln(n,Sr.galaxy[t][i],`${a}`,!0),Qn(n,"intergalactic",i),ec(n,i,"intergalactic",t),En("add","intergalactic-structures",s[1],"function"==typeof Sr.galaxy[t][i].title?Sr.galaxy[t][i].title():Sr.galaxy[t][i].title),_s(`pop${Sr.galaxy[t][i].id}`,$(`
                      ${r}
                      `))}}))}))}(r);break;case"hell":!function(e){Object.keys(Sr.portal).forEach((function(t){let a="string"==typeof Sr.portal[t].info.name?Sr.portal[t].info.name:Sr.portal[t].info.name(),r="string"==typeof Sr.portal[t].info.desc?Sr.portal[t].info.desc:Sr.portal[t].info.desc();Object.keys(Sr.portal[t]).forEach((function(i){if("info"!==i&&(!Sr.portal[t][i].hasOwnProperty("wiki")||Sr.portal[t][i].wiki)){let s=Sr.portal[t][i].id.split("-"),n=$(`
                      `);e.append(n),Ln(n,Sr.portal[t][i],`${a}`,!0),Qn(n,"hell",i),ec(n,i,"hell",t),En("add","hell-structures",s[1],"function"==typeof Sr.portal[t][i].title?Sr.portal[t][i].title():Sr.portal[t][i].title),_s(`pop${Sr.portal[t][i].id}`,$(`
                      ${r}
                      `))}}))}))}(r);break;case"tauceti":!function(e){Object.keys(Sr.tauceti).forEach((function(t){let a="string"==typeof Sr.tauceti[t].info.name?Sr.tauceti[t].info.name:Sr.tauceti[t].info.name(),r="string"==typeof Sr.tauceti[t].info.desc?Sr.tauceti[t].info.desc:Sr.tauceti[t].info.desc();Object.keys(Sr.tauceti[t]).forEach((function(i){if("info"!==i&&(!Sr.tauceti[t][i].hasOwnProperty("wiki")||Sr.tauceti[t][i].wiki)){let s=Sr.tauceti[t][i].id.split("-"),n=$(`
                      `);e.append(n),Ln(n,Sr.tauceti[t][i],`${a}`,!0),Qn(n,"tauceti",i),ec(n,i,"tauceti",t),En("add","tauceti-structures",s[1],"function"==typeof Sr.tauceti[t][i].title?Sr.tauceti[t][i].title():Sr.tauceti[t][i].title),_s(`pop${Sr.tauceti[t][i].id}`,$(`
                      ${r}
                      `))}}))}))}(r)}}const Wn={prehistoric:{},planetary:{slaughter:[F("wiki_structure_planetary_slaughter")]},space:{terraformer:[F("wiki_structure_space_terraformer")],terraform:[F("wiki_structure_space_terraformer")]},starDock:{geck:[F("wiki_structure_stardock_geck")]},interstellar:{},intergalactic:{},hell:{},tauceti:{}};function Qn(e,t,a){if(Wn[t].hasOwnProperty(a)){let r=$('
                      ');e.append(r);for(let e=0;e${Wn[t][a][e]}`)}}const Jn={include:{prehistoric:["membrane","organelles","nucleus","eukaryotic_cell","mitochondria"]},exclude:{planetary:["food","lumber","stone","chrysotile","slaughter","slave_market",""],space:["test_launch","moon_mission","terraform","red_mission","hell_mission","sun_mission","gas_mission","gas_moon_mission","belt_mission","dwarf_mission","titan_mission","enceladus_mission","triton_mission","kuiper_mission","eris_mission","crashed_ship","digsite"],starDock:["prep_ship","launch_ship"],interstellar:["alpha_mission","proxima_mission","nebula_mission","neutron_mission","blackhole_mission","jump_ship","wormhole_mission","sirius_mission","sirius_b","ascend"],intergalactic:["gateway_mission","gorddon_mission","alien2_mission","chthonian_mission"],hell:["pit_mission","assault_forge","ruins_mission","gate_mission","lake_mission","spire_mission","bribe_sphinx","spire_survey","spire"],tauceti:["home_mission","dismantle","excavate","alien_outpost","red_mission","matrix","roid_mission","alien_station_survey","contact","introduce","subjugate","gas_contest","gas_contest2","ignite_gas_giant","jeff","goe_facility"]},excludeCreep:{planetary:["horseshoe"],space:["horseshoe"],hell:["ancient_pillars","sphinx","waygate"],tauceti:["horseshoe"]},max:{prehistoric:{},planetary:{s_alter:1},space:{star_dock:1,terraformer:100,world_collider:1859,shipyard:1,mass_relay:100,fob:1,ai_core:100,jump_gate:100},starDock:{seeder:100},interstellar:{dyson:100,dyson_sphere:100,orichalcum_sphere:100,stellar_engine:100,stargate:200,space_elevator:100,gravity_dome:100,ascension_machine:100},intergalactic:{embassy:1,consulate:1},hell:{soul_forge:1,vault:2,ancient_pillars:Object.keys(Di).length-1,west_tower:la(),east_tower:la(),bridge:10,sphinx:2,waygate:10},tauceti:{alien_outpost:1,jump_gate:100,ringworld:1e3,alien_station:100,matrioshka_brain:1e3,ignition_device:10}},count:{planetary:{horseshoe:t.race.shoecnt?t.race.shoecnt:0,assembly:t.resource[t.race.species]?t.resource[t.race.species].amount:0},space:{horseshoe:t.race.shoecnt?t.race.shoecnt:0,assembly:t.resource[t.race.species]?t.resource[t.race.species].amount:0},interstellar:{},intergalactic:{},hell:{ancient_pillars:Object.keys(t.pillars).length,sphinx:!t.tech.hell_spire||t.tech.hell_spire<7?0:7===t.tech.hell_spire?1:2,waygate:t.tech.waygate&&t.tech.waygate>=2?10:t.portal.waygate?t.portal.waygate.count:0},tauceti:{}},creepCalc:{planetary:{assembly:1e3},space:{assembly:1e3,swarm_satellite:200}}},Zn={mass_driver:{type:"field",min:0,import:()=>t.city.mass_driver?t.city.mass_driver.on:0}},Xn={fuelAdj:{inputs:["mass_driver"]}},Yn={terraformer:["truepath"]};function ec(e,a,r,i,s){let n=!(!Jn.max[r]||!Jn.max[r][a])&&Jn.max[r][a],c={owned:0,costVis:!1,creepVis:!1,extra:{truepath:"truepath"===s}},o={},l=!1;switch(r){case"prehistoric":l=Sr.evolution[a],c.real_owned=t.evolution[a]?t.evolution[a].count:0;break;case"planetary":l=Sr.city[a],c.real_owned=t.city[a]?t.city[a].count:0;break;case"space":l=Sr.space[i][a],c.real_owned=t.space[a]?t.space[a].count:0;break;case"starDock":l=Sr.starDock[a],c.real_owned=t.starDock[a]?t.starDock[a].count:0;break;case"interstellar":l=Sr.interstellar[i][a],c.real_owned=t.interstellar[a]?t.interstellar[a].count:0;break;case"intergalactic":l=Sr.galaxy[i][a],c.real_owned=t.galaxy[a]?t.galaxy[a].count:0;break;case"hell":l=Sr.portal[i][a],c.real_owned=t.portal[a]?t.portal[a].count:0;break;case"tauceti":l=Sr.tauceti[i][a],c.real_owned=t.tauceti[a]?t.tauceti[a].count:0}Jn.count[r]&&Jn.count[r][a]&&(c.real_owned=Jn.count[r][a]);let _=function(){if(l.hasOwnProperty("effect")&&"string"!=typeof l.effect){let e=$(".effect",`#${a}`);Cs(e);let t=c.owned-c.real_owned;Yn[a]&&(t={count:t},Yn[a].forEach((function(e){"truepath"===e&&(t[e]="truepath"===s)}))),e.append(l.effect(t))}};_();let d=l.cost;d&&Object.keys(Rs(l)).forEach((function(e){o[e]={},"space"!==r||"Oil"!==e&&"Helium_3"!==e||Xn.fuelAdj.inputs.forEach((function(e){var t;t=e,c.extra[t]=Zn[t].import()}))}));let p=function(){let e=!1;if(d){let t=Rs(l,c.owned-c.real_owned,c.extra);Object.keys(o).forEach((function(a){if("Custom"===a)o[a].vis=!0;else{let e=t[a]?t[a](c.owned-c.real_owned,c.extra):0;o[a].vis=e>0,o[a].cost=q(e,1)}e=e||o[a].vis}))}c.costVis=e};p(),(Jn.include[r]&&Jn.include[r].includes(a)||Jn.exclude[r]&&!Jn.exclude[r].includes(a))&&(function(){let e=!1;if(d&&!n&&(!Jn.excludeCreep[r]||!Jn.excludeCreep[r].includes(a))&&"prehistoric"!==r){let t=Jn.creepCalc[r]&&Jn.creepCalc[r][a]?Jn.creepCalc[r][a]:100,i=t-1,s=Rs(l,t,c.extra),n=Rs(l,i,c.extra);Object.keys(o).forEach((function(a){s[a]&&(o[a].creep=+(s[a](t,c.extra)/n[a](i,c.extra)).toFixed(5),1===o[a].creep?o[a].creep=F("wiki_calc_none"):o[a].creep<1.005&&(o[a].creep=1.005),e=e||o[a].vis)}))}c.creepVis=e}(),e.append($(`\n
                      \n
                      \n
                      {{ | ownedLabel }} -+
                      \n
                      \n
                      \n \n
                      \n
                      \n `))),zs({el:`#${a}`,data:{i:c,r:o},methods:{val(e){c[e]=Math.round(c[e]),c[e]&&c[e]<0?c[e]=0:n&&c[e]>n&&(c[e]=n),_(),p()},less(e){c[e]>0&&c[e]--},more(e){(!n||n&&c[e]=2,link:"wiki.html#discovery-tech-diplomacy"},{title:F("wiki_tech_special_trait",[F("trait_terrifying_name")]),color:!!t.race.terrifying,link:"wiki.html#traits-species-major_terrifying"}]}],socialist:[{category:"unique",subreqs:[{title:F("wiki_tech_special_tech",[F("tech_diplomacy")]),color:t.tech.trade&&t.tech.trade>=2,link:"wiki.html#discovery-tech-diplomacy"},{title:F("wiki_tech_special_trait",[F("trait_terrifying_name")]),color:!!t.race.terrifying,link:"wiki.html#traits-species-major_terrifying"}]}],federation:[{category:"unique",subreqs:[{title:F("wiki_tech_special_occupy"),color:oe(),link:"wiki.html#mechanics-gameplay-occupying"}]}],magocracy:[{category:"universe",subreqs:[{name:"magic"}]}],governor:[{category:"crispr",subreqs:[{name:"governance",tree:"governor",val:1}]},{category:"government",not:!0,subreqs:[{name:"anarchy"}]}],market:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],tax_rates:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],large_trades:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],corruption:[{category:"trait",not:!0,subreqs:[{name:"terrifying"},{name:"noble"}]}],massive_trades:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],trade:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],diplomacy:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],freight:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],wharf:[{category:"trait",not:!0,subreqs:[{name:"terrifying"},{name:"thalassophobia"}]}],reclaimer:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],iron_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],steel_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],titanium_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],alloy_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],mythril_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],adamantite_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],stone_axe:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],copper_axes:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],iron_saw:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],steel_saw:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],iron_axes:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],steel_axes:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],titanium_axes:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],chainsaws:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],copper_sledgehammer:[{category:"trait",not:!0,subreqs:[{name:"sappy"}]}],iron_sledgehammer:[{category:"trait",not:!0,subreqs:[{name:"sappy"}]}],steel_sledgehammer:[{category:"trait",not:!0,subreqs:[{name:"sappy"}]}],titanium_sledgehammer:[{category:"trait",not:!0,subreqs:[{name:"sappy"}]}],copper_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],iron_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],steel_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],titanium_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],adamantite_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],slave_pens:[{category:"trait",subreqs:[{name:"slaver"}]}],slave_market:[{category:"trait",subreqs:[{name:"slaver"}]}],ceremonial_dagger:[{category:"trait",subreqs:[{name:"cannibalize"}]}],last_rites:[{category:"trait",subreqs:[{name:"cannibalize"}]}],ancient_infusion:[{category:"trait",subreqs:[{name:"cannibalize"}]}],armor:[{category:"trait",not:!0,subreqs:[{name:"apex_predator"}]}],plate_armor:[{category:"trait",not:!0,subreqs:[{name:"apex_predator"}]}],kevlar:[{category:"trait",not:!0,subreqs:[{name:"apex_predator"}]}],nanoweave_vest:[{category:"trait",not:!0,subreqs:[{name:"apex_predator"}]}],mad:[{truepath:!0,category:"unique",subreqs:[{title:F("wiki_tech_special_unify"),color:!!t.tech.world_control,link:"wiki.html#globalized-tp_tech-unite"}]}],ancient_theology:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],study:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],encoding:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],deify:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],infusion:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],gps:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],genesis:[{category:"unique",subreqs:[{title:F("wiki_tech_special_genesis"),color:t.race.deterioration>=1}]}],veil:[{category:"universe",subreqs:[{name:"magic"}]}],mana_syphon:[{category:"universe",subreqs:[{name:"magic"}]}],mana:[{category:"universe",subreqs:[{name:"magic"}]}],ley_lines:[{category:"universe",subreqs:[{name:"magic"}]}],rituals:[{category:"universe",subreqs:[{name:"magic"}]}],crafting_ritual:[{category:"universe",subreqs:[{name:"magic"}]}],mana_nexus:[{category:"universe",subreqs:[{name:"magic"}]}],clerics:[{category:"universe",subreqs:[{name:"magic"}]},{category:"crispr",subreqs:[{name:"faith",tree:"ancients",val:2}]}],conjuring:[{category:"universe",subreqs:[{name:"magic"}]},{category:"scenario",not:!0,subreqs:[{name:"cataclysm"}]}],res_conjuring:[{category:"universe",subreqs:[{name:"magic"}]},{category:"scenario",not:!0,subreqs:[{name:"cataclysm"}]}],alchemy:[{category:"universe",subreqs:[{name:"magic"}]}],transmutation:[{category:"universe",subreqs:[{name:"magic"}]}],dark_bomb:[{category:"unique",subreqs:[{title:F("wiki_tech_special_demon_lord"),color:t.stats.hasOwnProperty("spire")&&t.stats.spire.hasOwnProperty(qn())&&t.stats.spire[qn()].hasOwnProperty("dlstr")&&t.stats.spire[qn()].dlstr>0,link:"wiki.html#mechanics-gameplay-dlord"}]}],terraforming:[{category:"challenge",subreqs:[{name:"orbitdecay"}]}],geck:[{category:"achieve",subreqs:[{name:"lamentis",val:5}]}],womling_fun:[{category:"unique",subreqs:[{title:F("tau_red_contact"),color:!!t.race.womling_friend,link:"wiki.html#tauceti-structures-contact"},{title:F("tau_red_introduce"),color:!!t.race.womling_god,link:"wiki.html#tauceti-structures-introduce"},{title:F("tau_red_subjugate"),color:!!t.race.womling_lord,link:"wiki.html#tauceti-structures-subjugate"}]}],isolation_protocol:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],focus_cure:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],decode_virus:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vaccine_campaign:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vax_strat1:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vax_strat2:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vax_strat3:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vax_strat4:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],cloning:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],clone_degredation:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],digital_paradise:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],ringworld:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],matrioshka_brain:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],ignition_device:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],replicator:[{category:"scenario",subreqs:[{name:"lone_survivor"}]}],womling_unlock:[{category:"scenario",subreqs:[{name:"lone_survivor"}]}],garden_of_eden:[{category:"scenario",subreqs:[{name:"lone_survivor"}]}]},oc={unification2:"unification",conjuring:"ley_lines",res_conjuring:"conjuring",bribe_sphinx:"miasma"};const lc={solar:"interstellar"},_c={interstellar:"solar"};function dc(e,a){let r=En("create"),i=[],s=[],n="truepath"===a?rc:ac,c="truepath"===a?"tp_tech":"tech";if(Object.keys(n).forEach((function(r){let c=n[r];if(c.hasOwnProperty("era")&&(c.era===e||c.era===lc[e])&&(!c.hasOwnProperty("wiki")||c.wiki)){let e=n[r].id.split("-"),o=$(`
                      `);if(Ln(o,c),function(e,t,a){let r=$('
                      ');if(e.append(r),sc.hasOwnProperty(t)&&"truepath"===a)for(let e=0;e${sc[t][e]}`);else if(ic.hasOwnProperty(t))for(let e=0;e${ic[t][e]}`);else r.append(`
                      ${F("wiki_tech_empty")}
                      `)}(o,r,a),function(e,a,r,i){let s=function(e){let t={},a="truepath"===e?rc:ac;return Object.keys(a).forEach((function(e){let a=Sr.tech[e];t[a.grant[0]]||(t[a.grant[0]]={});let r="string"==typeof Sr.tech[e].title?Sr.tech[e].title:Sr.tech[e].title();t[a.grant[0]][a.grant[1]]=[{name:e,title:r,era:Sr.tech[e].era}]})),t.primitive[2]=[{name:"bone_tools",title:F("tech_bone_tools"),era:"primitive"},{name:"wooden_tools",title:F("tech_wooden_tools"),era:"primitive"}],t.theology[3]=[{name:Sr.tech.fanaticism.wiki?"fanaticism":"alt_fanaticism",title:F("tech_fanaticism"),era:"civilized"},{name:Sr.tech.anthropology.wiki?"anthropology":"alt_anthropology",title:F("tech_anthropology"),era:"civilized"}],t.theology[5]=[{name:"deify",title:F("tech_deify"),era:"early_space"},{name:"study",title:F("tech_study"),era:"early_space"}],t.ancient_study[1]=[{name:"study",title:F("tech_study"),era:"early_space"}],t.ancient_deify[1]=[{name:"deify",title:F("tech_deify"),era:"early_space"}],"truepath"===e&&(t.unify[1]=[{name:"arpa",title:F("tech_arpa"),era:"globalized"}],t.isolation={},t.isolation[1]=[{name:"isolation_protocol",title:F("tech_isolation_protocol"),era:"tauceti"}],t.focus_cure={},t.focus_cure[1]=[{name:"focus_cure",title:F("tech_focus_cure"),era:"tauceti"}]),t}(i);if(Object.keys(a.reqs).length>0){let r={},n={};if(Object.keys(a.reqs).forEach((function(e){let i=t.tech[e]&&t.tech[e]>=a.reqs[e]?"success":"danger",c=e+a.reqs[e];s[e]&&s[e][a.reqs[e]]?(r[c]=[],s[e][a.reqs[e]].forEach((function(e){r[c].push({name:e.name,title:e.title,era:e.era,color:i})}))):nc[c]&&(n[c]={title:nc[c].title,link:nc[c].link,color:i})})),Object.keys(r).length>0){let t=!1,a=$(`
                      ${F("wiki_tech_req_tech")}
                      `);e.append(a),Object.keys(r).forEach((function(e){let s="",n=!1,c=!1;r[e].forEach((function(e){let t=`${e.title}`;c=e.color,n?s=F("wiki_tech_req_or",[s,t]):(n=!0,s=t)})),a.append(`${t?", ":""}${s}`),t=!0}))}if(Object.keys(n).length>0){let t=!1,a=$(`
                      ${F("wiki_tech_req_other")}
                      `);e.append(a),Object.keys(n).forEach((function(e){let r=n[e].link;r&&"truepath"===i&&(r=r.replace("-structures-","-tp_structures-"));let s=r?`${n[e].title}`:n[e].title;a.append(`${t?", ":""}${s}`),t=!0}))}}if(cc.hasOwnProperty(r)){let a=!1,s=$(`
                      ${F("wiki_tech_req_special")}
                      `),n=!1;cc[r].forEach((function(e){if(e.truepath&&"truepath"!==i)return;n=!0;let r=!1,c=!1,o="";e.subreqs.forEach((function(a){let s="",n=!1,l=!1;switch(e.category){case"species":s=F(`race_${a.name}`),n=`wiki.html#races-species-${a.name}`,l=t.race.species===a.name;break;case"genus":s=F(`genelab_genus_${a.name}`),l=Di[t.race.species].type===a.name;break;case"trait":s=F(`trait_${a.name}_name`),n=`wiki.html#traits-species-${Ki[a.name].type}_${a.name}`,l=t.race[a.name];break;case"tech":s="string"==typeof Sr.tech[a.name].title?Sr.tech[a.name].title:Sr.tech[a.name].title(),n=`wiki.html#${Sr.tech[a.name].era}-tech-${a.name}`,l=t.tech[a.tree]&&t.genes[a.tree]>=a.val;break;case"universe":s=F(`universe_${a.name}`),n=`wiki.html#universes-gameplay-${a.name}`,l=t.race.universe===a.name;break;case"crispr":s=F(`arpa_genepool_${a.name}_title`),n=`wiki.html#crispr-prestige-${a.name}`,l=t.genes[a.tree]&&t.genes[a.tree]>=a.val;break;case"achieve":s=a.val+` ${Us("star")} `+F(`achieve_${a.name}_name`),n=`wiki.html#perks-prestige-${a.name}`,l=t.stats.achieve[a.name]&&t.stats.achieve[a.name].l>=a.val;break;case"government":s=F(`govern_${a.name}`),n=`wiki.html#government-gameplay-${a.name}`,l=t.civic.govern&&t.civic.govern.type&&t.civic.govern.type===a.name;break;case"scenario":s=F(`wiki_challenges_scenarios_${a.name}`),n=`wiki.html#challenges-gameplay-scenarios_${a.name}`,l=t.race[a.name];break;case"challenge":s=F(`wiki_challenges_modes_${a.name}`),n=`wiki.html#challenges-gameplay-modes_${a.name}`,l=t.race[a.name];break;case"unique":s=a.title,n=a.link,l=a.color}n&&"truepath"===i&&(n=n.replace("-tech-","-tp_tech-")),c=c||l,e.not&&(l=!l),l=l?"success":"danger",s=n?`${s}`:`${s}`,r?o=F("wiki_tech_req_or",[o,s]):(r=!0,o=s)})),e.not&&(c=!c),c=c?"success":"danger","unique"!==e.category&&(o=F(`wiki_tech_special_${e.category}${e.not?"_not":""}`,[o])),s.append(`${a?", ":""}${o}`),a=!0})),n&&e.append(s)}}(o,c,r,a),c.cost.Knowledge)if(0===i.length)i[0]=[c,o];else{let e=c.cost.Knowledge(),t=i.length-1;for(;t>=0&&i[t][0].cost.Knowledge()>e;)i[t+1]=i[t],t--;i[t+1]=[c,o]}else s.push([c,o])}})),s.length>0)for(let e=0;e');e.append(a),Object.keys($n).forEach((function(e){let r=$('
                      ');a.append(r);let i=t.stats.feat[e]&&t.stats.feat[e]>0?"warning":"fade",s=Ws(e,"feat"),n=t.stats.feat[e]>1?`

                      ${Us(s)}

                      `:"";r.append(`${$n[e].name}${n}`),function(e,a){let r=a?`
                      ${$n[e].flair}
                      `:"";if("egghunt"===e){let a=(new Date).getFullYear(),i=`
                      ${F("wiki_feat_egghunt_found")}
                      `;for(let e=1;e<=18;e++)i+=`${F("wiki_feat_egghunt_num",[e])}`;i+="
                      ",_s(`f-${e}`,$(`
                      ${$n[e].desc}
                      ${F(`wiki_feat_${e}`)}
                      ${i}${r}`))}else if("trickortreat"===e){let a=(new Date).getFullYear(),i=`
                      ${F("wiki_feat_trickortreat_found")}
                      `;for(let e=1;e<=7;e++)i+=`${F("wiki_feat_treat_num",[e])}`;for(let e=1;e<=7;e++)i+=`${F("wiki_feat_trick_num",[e])}`;i+="
                      ",_s(`f-${e}`,$(`
                      ${$n[e].desc}
                      ${F(`wiki_feat_${e}`)}
                      ${i}${r}`))}else if("equilibrium"===e){let a={};t.pillars&&Object.keys(t.pillars).forEach((function(e){Di[e]&&(a[e]=t.pillars[e])}));let i='
                      ';Object.keys(Di).sort(((e,t)=>Di[e].name.localeCompare(Di[t].name))).forEach((function(e){"protoplasm"!==e&&("custom"!==e||"custom"===e&&t.stats.achieve.ascended)&&(a[e]&&a[e]>=1?i+=`${Di[e].name}`:i+=`${Di[e].name}`)})),i+="
                      ",_s(`f-${e}`,$(`
                      ${$n[e].desc}
                      ${F(`wiki_feat_${e}`)}
                      ${i}${r}`),{wide:!0})}else _s(`f-${e}`,$(`
                      ${$n[e].desc}
                      ${F(`wiki_feat_${e}`)}
                      ${r}`))}(e,"warning"===i)}))}()}}const uc={cross:["antimatter"],vigilante:["evil"],squished:["micro"],macro:["micro"],marble:["micro"],double_density:["heavy"],heavyweight:["heavy"],whitehole:["standard"],heavy:["heavy"],canceled:["antimatter"],eviltwin:["evil"],microbang:["micro"],pw_apocalypse:["magic"],pass:["magic"],fullmetal:["magic"],soul_sponge:["magic"],nightmare:["magic"]},hc={trade:[750,50]};function mc(e,a){let r=$("#content");Cs(r);let i=`\n \n `;r.append(i),zs({el:"#filtering",methods:{universeSwap(e){mc(e,a)},filterSwap(t){mc(e,t)}}});let s=qn(e||"standard"),n={};Object.keys(kn).forEach((function(r){if(!e||!uc[r]||uc[r].indexOf(e)>-1){if("missing"===a&&t.stats.achieve[r]&&t.stats.achieve[r][s]&&t.stats.achieve[r][s]>0)return;if("obtained"===a&&!(t.stats.achieve[r]&&t.stats.achieve[r][s]&&t.stats.achieve[r][s]>0))return;if("incomplete"===a&&e&&t.stats.achieve[r]&&t.stats.achieve[r][s]&&t.stats.achieve[r][s]>4)return;if("completed"===a&&e&&!(t.stats.achieve[r]&&t.stats.achieve[r][s]&&t.stats.achieve[r][s]>4))return;if(("incomplete"===a||"completed"===a)&&!e){let e="universe"===kn[r].type?10:30;if("whitehole"===r&&(e=5),t.stats.achieve[r]&&Object.keys(t.stats.achieve[r]).forEach((a=>e-=t.stats.achieve[r][a])),"incomplete"===a&&e<=0)return;if("completed"===a&&e>0)return}n.hasOwnProperty(kn[r].type)?n[kn[r].type].push(r):n[kn[r].type]=[r]}})),Object.keys(n).forEach((function(a){r.append($(`

                      ${F(`wiki_achieve_${a}`)}

                      `));let i=$('
                      ');r.append(i),n[a].forEach((function(a){let r=$('
                      ');i.append(r);let n=t.stats.achieve[a]&&t.stats.achieve[a][s]&&t.stats.achieve[a][s]>0?"warning":"fade";r.append(`${kn[a].name}`);let c=Ys(a,16,!1,!1,e);r.append(`${c}`),function(e,a,r){let i=qn(r||"standard"),s=a?`
                      ${kn[e].flair}
                      `:"";if("mass_extinction"===e||"vigilante"===e){let a='
                      ';Object.keys(Di).sort((function(e,t){return Di[e].hasOwnProperty("name")&&Di[t].hasOwnProperty("name")?Di[e].name.localeCompare(Di[t].name):0})).forEach((function(r){"protoplasm"!==r&&("custom"!==r||"custom"===r&&t.stats.achieve.ascended)&&(t.stats.achieve[`extinct_${r}`]&&("mass_extinction"===e?t.stats.achieve[`extinct_${r}`][i]>=0:t.stats.achieve[`extinct_${r}`].hasOwnProperty("e")&&t.stats.achieve[`extinct_${r}`].e>=0)?a+=`${Di[r].name}`:a+=`${Di[r].name}`)})),a+="
                      ",_s(`a-${e}`,$(`
                      ${kn[e].desc}
                      ${F(`wiki_achieve_${e}`)}
                      ${a}${s}`),{wide:!0})}else if("explorer"===e){let a='
                      ';Object.keys(ss).sort(((e,t)=>ss[e].label.localeCompare(ss[t].label))).forEach((function(e){(!r||"hellscape"!==e&&"eden"!==e||"hellscape"===e&&"evil"!==r||"eden"===e&&"evil"===r)&&(t.stats.achieve[`biome_${e}`]&&t.stats.achieve[`biome_${e}`][i]>=0?a+=`${ss[e].label}`:a+=`${ss[e].label}`)})),a+="
                      ",_s(`a-${e}`,$(`
                      ${kn[e].desc}
                      ${F(`wiki_achieve_${e}`)}
                      ${a}${s}`))}else if("creator"===e||"heavyweight"===e){let a='
                      ';Object.keys(Ei).sort().forEach((function(r){let s=["carnivore","herbivore","omnivore"].includes(r)?F(`evo_${r}_title`):F(`genelab_genus_${r}`);("creator"===e?t.stats.achieve[`genus_${r}`]&&t.stats.achieve[`genus_${r}`][i]>=0:t.stats.achieve[`genus_${r}`]&&t.stats.achieve[`genus_${r}`].h>=0)?a+=`${s}`:a+=`${s}`})),a+="
                      ",_s(`a-${e}`,$(`
                      ${kn[e].desc}
                      ${F(`wiki_achieve_${e}`)}
                      ${a}${s}`))}else if("enlightenment"===e){let a={};t.pillars&&Object.keys(t.pillars).forEach((function(e){Di[e]&&(!a[Di[e].type]||t.pillars[e]>a[Di[e].type])&&(a[Di[e].type]=t.pillars[e])}));let r='
                      ';Object.keys(Ei).sort().forEach((function(e){let t=["carnivore","herbivore","omnivore"].includes(e)?F(`evo_${e}_title`):F(`genelab_genus_${e}`);a[e]&&a[e]>=1?r+=`${t}`:r+=`${t}`})),r+="
                      ",_s(`a-${e}`,$(`
                      ${kn[e].desc}
                      ${F(`wiki_achieve_${e}`)}
                      ${r}${s}`))}else if("gladiator"===e){let a='
                      ',n={};t.stats.spire&&Object.keys(t.stats.spire).forEach((function(e){r&&i!==e||Object.keys(t.stats.spire[e]).forEach((function(a){fa[a]&&(!n.hasOwnProperty(a)||n[a]0?a+=`${F(`portal_mech_boss_${e}`)}`:a+=`${F(`portal_mech_boss_${e}`)}`})),a+="
                      ",_s(`a-${e}`,$(`
                      ${kn[e].desc}
                      ${F(`wiki_achieve_${e}`)}
                      ${a}${s}`),{wide:!0})}else if("banana"===e){let a='
                      ';a+=`
                      ${F("wiki_achieve_banana1")}
                      `,a+=`
                      ${F("wiki_achieve_banana2")}
                      `,a+=`
                      ${F("wiki_achieve_banana3")}
                      `,a+=`
                      ${F("wiki_achieve_banana4",[500])}
                      `,a+=`
                      ${F("wiki_achieve_banana5",[50])}
                      `,a+="
                      ",_s(`a-${e}`,$(`
                      ${kn[e].desc}
                      ${F(`wiki_achieve_${e}`)}
                      ${a}${s}`))}else if("pathfinder"===e){let a='
                      ';["ashanddust","exodus","obsolete","bluepill","retired"].forEach((function(e){let r=F(`achieve_${e}_name`);t.stats.achieve[e]&&t.stats.achieve[e][i]>=5?a+=`${r}`:a+=`${r}`})),a+="
                      ",_s(`a-${e}`,$(`
                      ${kn[e].desc}
                      ${F(`wiki_achieve_${e}`)}
                      ${a}${s}`))}else if("overlord"===e){let a='
                      ',i={subjugate:"lord",contact:"friend",introduced:"god"},n=qn(r||"standard");Object.keys(i).forEach((function(e){t.stats.womling[i[e]]&&t.stats.womling[i[e]][n]>0?a+=`${F(`wiki_achieve_overlord_${e}`)}`:a+=`${F(`wiki_achieve_overlord_${e}`)}`})),a+="
                      ",_s(`a-${e}`,$(`
                      ${kn[e].desc}
                      ${F(`wiki_achieve_${e}`)}
                      ${a}${s}`))}else if(e.includes("extinct_")&&"custom"!==e.substring(8)){let t=e.substring(8);_s(`a-${e}`,$(`
                      ${kn[e].desc}
                      ${F("wiki_achieve_extinct_race",[F(`race_${t}`)])}
                      ${s}`))}else if(e.includes("genus_")){let t=e.substring(6);_s(`a-${e}`,$(`
                      ${kn[e].desc}
                      ${F("wiki_achieve_genus_type",[F(`genelab_genus_${t}`)])}
                      ${s}`))}else if(e.includes("biome_")||e.includes("atmo_")){let t=e.substring(e.indexOf("_")+1);_s(`a-${e}`,$(`
                      ${kn[e].desc}
                      ${F("wiki_achieve_planet_type",["b"===e.substring(0,1)?F(`biome_${t}_name`):F(`planet_${t}`)])}
                      ${s}`))}else{let t=hc[e]?F(`wiki_achieve_${e}`,hc[e]):F(`wiki_achieve_${e}`);_s(`a-${e}`,$(`
                      ${kn[e].desc}
                      ${t}
                      ${s}`))}}(a,"warning"===n,e)}))}))}function gc(e,t,a,r){r=r||{};let i=$(`\n
                      \n ${F("wiki_challenges_"+(t?"feats":"achievements"))}\n
                      \n `);e.append(i);let s=!1;a.forEach((function(e){let a=t?F(`feat_${e}_name`):r[e]?F(`achieve_${e}_name`):`${F(`achieve_${e}_name`)}`;i.append(`${s?", ":""}${a}`),s=!0}))}function vc(e,t){let a=$(`\n
                      \n ${F("wiki_challenges_requirements")}\n
                      \n `);e.append(a);let r=!1;t.forEach((function(e){let t=!1,i=!1,s="";e.subreqs.forEach((function(e){let a=e.text,r=e.link||!1,n=e.color;i=i||n,n=n?"success":"danger",a=r?`${a}`:`${a}`,t?s=F("wiki_tech_req_or",[s,a]):(t=!0,s=a)})),i=i?"success":"danger",s=F(e.text,[s]),a.append(`${r?", ":""}${s}`),r=!0}))}const fc={plasmid:["cit","sol","know","genes","reset","uni","high_pop","synth","tp"],anti:["cit","sol","know","genes","reset","high_pop","synth","tp"],phage:["plas","genes","reset","uni","tp"],dark:["mass","exotic","genes","uni"],vacuum:["mana","genes"],harmony:["genes","uni"],artifact:["genes","floor","micro"],cores:["micro"]};function yc(e,a,r,i){let s=r||a,n=a+(i||"")+(r||""),c=$(`
                      `);e.append(c);let o="";switch(i){case"mad":o+=F("wiki_calc_mad")+" ";break;case"bioseed":case"cataclysm":case"vacuum":case"terraform":o+=F("wiki_resets_"+i)+" ";break;case"bigbang":o+=F("wiki_resets_blackhole")+" ";break;case"ascend":o+=F("wiki_resets_ascension")+" ";break;case"descend":o+=F("wiki_resets_infusion")+" ";break;case"ai":o+=F("wiki_resets_ai")+" "}switch(s){case"plasmid":o+=F("resource_Plasmid_name");break;case"anti":o+=F("resource_AntiPlasmid_name");break;case"phage":o+=F("resource_Phage_name");break;case"dark":case"vacuum":o+=F("resource_Dark_name");break;case"harmony":o+=F("resource_Harmony_name");break;case"artifact":o+=F("resource_Artifact_name");break;case"cores":o+=F("resource_AICore_name")}c.append(`

                      ${F("wiki_calc_gains",[o])}

                      `);let l=$("
                      "),_=$("
                      ");c.append(l),c.append(_);let d={cit:0,sol:0,know:0,plas:0,mass:0,exotic:0,mana:0,floor:0,genes:0,uni:"standard"},p={cit:{val:void 0,use:!1},sol:{val:void 0,use:!1},know:{val:void 0,use:!1},plas:{val:void 0,use:!1},mass:{val:void 0,use:!1},exotic:{val:void 0,use:!1},mana:{val:void 0,use:!1},floor:{val:void 0,use:!1},genes:{val:void 0,use:!1},reset:{val:void 0,use:!1},uni:{val:void 0,use:!1},micro:{val:!1,use:!1},high_pop:{val:void 0,use:!1},synth:{val:!1,use:!1},tp:{val:!1,use:!1,enabled:!0}},u={standard:{use:!0},evil:{use:!0},antimatter:{use:!0},micro:{use:!0},heavy:{use:!0},magic:{use:!0}},h={mad:{use:!0},bioseed:{use:!0},cataclysm:{use:!0},bigbang:{use:!0},vacuum:{use:!0},terraform:{use:!0},ascend:{use:!0},descend:{use:!1},ai:{use:!0}},m={vis:!1},g={capVis:!1,overflowVis:!1,totalVis:!1,capVal:void 0,overflow:void 0,rawGains:void 0};fc[s].forEach((function(e){p[e].use=!0})),i&&(p.reset.val=i,p.reset.use=!1,"mad"!==i&&(p.synth.use=!1,p.synth.val=!1),"vacuum"===i&&(p.uni.use=!1,p.uni.val="magic"),"ai"===i?(p.tp.use=!1,p.tp.val=!0):["mad","bioseed","terraform"].includes(i)||(p.tp.use=!1,p.tp.val=!1));let v="";switch(s){case"plasmid":i||(u.antimatter.use=!1);break;case"anti":h.vacuum.use=!1;break;case"phage":h.mad.use=!1,h.descend.use=!1,v+="log2({{ i.plas.val, 'plasmids' | generic }}) * {{ i.reset.val | phageMulti }} * e * {{ i.genes.val | challenge}} * {{ i.uni.val | universe }} * 1.1";break;case"dark":p.reset.val="bigbang",u.magic.use=!1,v+="(ln(1 + ({{ i.exotic.val, 'exotic' | generic }} * 40)) + (log2({{ i.mass.val, 'mass' | generic }} - 7) / 2.5)) * {{ i.genes.val | challenge }} * {{ i.uni.val | universe }}";break;case"vacuum":p.reset.val="vacuum",p.uni.val="magic",v+="(log2({{ i.mana.val, 'mana' | generic }}) / 5) * {{ i.genes.val | challenge }}";break;case"harmony":p.reset.val="ascend",v+="(1 + {{ i.genes.val, 'genes' | generic }}) * {{ i.uni.val | universe }}";break;case"artifact":p.reset.val="descend",v+="1 + {{ i.genes.val, 'genes' | generic }} + {{ i.floor.val | floor }}";break;case"cores":p.reset.val="ai",v+='52'}"plasmid"===a?(v+=`\n
                      \n

                      ${F("wiki_calc_plasmid_cap_total",[F("anti"===s?"resource_AntiPlasmid_name":"resource_Plasmid_name")])}

                      \n
                      \n
                      \n {{ i.reset.val, i.synth.val | plasmidCap }} * (1 + (({{ i.genes.val, 'genes' | generic }} + 1) / 8)) = {{ | plasmidCapCalc }} = {{ pe.capVal }}\n
                      \n
                      \n

                      ${F("wiki_calc_plasmid_gains_raw",[F("anti"===s?"resource_AntiPlasmid_name":"resource_Plasmid_name")])}

                      \n
                      \n
                      \n `,v+="plasmid"===s?"\n ((({{ i.cit.val, 'citizens' | generic }} + {{ i.sol.val, 'soldiers' | generic }}) / {{ i.high_pop.val | highPopDivisor }} / {{ i.reset.val, i.synth.val | popDivisor }}) + (ln(1 + (({{ i.reset.val | knowMulti }} - 1) * {{ i.know.val, 'knowledge' | generic }} / {{ i.reset.val, i.synth.val | knowInc }})) / ln({{ i.reset.val | knowMulti }}))) * {{ i.genes.val | challenge }} * {{ i.uni.val | universe }} * 1.1\n ":"\n ((({{ i.cit.val, 'citizens' | generic }} + {{ i.sol.val, 'soldiers' | generic }}) / {{ i.high_pop.val | highPopDivisor }} / {{ i.reset.val, i.synth.val | popDivisor }}) + (ln(1 + (({{ i.reset.val | knowMulti }} - 1) * {{ i.know.val, 'knowledge' | generic }} / {{ i.reset.val, i.synth.val | knowInc }})) / ln({{ i.reset.val | knowMulti }}))) * {{ i.genes.val | challenge }} * 1.1 * 1.1\n ",v+=`\n = {{ | calc }}\n
                      \n
                      \n

                      ${F("wiki_calc_overflow")}

                      \n
                      \n
                      \n {{ pe.rawGains, 'plasmid_gains_raw' | generic }} - {{ pe.capVal, 'plasmid_cap_total' | generic }} = {{ pe.overflow, 'no_overflow' | generic }}\n
                      \n
                      \n

                      ${F("wiki_calc_plasmid_gains_total",[F("anti"===s?"resource_AntiPlasmid_name":"resource_Plasmid_name")])}

                      \n
                      \n
                      \n {{ pe.capVal, 'plasmid_cap_total' | generic }} + ({{ pe.overflow, 'overflow' | generic }} / ({{ pe.overflow, 'overflow' | generic }} + {{ pe.capVal, 'plasmid_cap_total' | generic }}) * {{ pe.capVal, 'plasmid_cap_total' | generic }}) = {{ | plasmidTotalCalc }}\n
                      \n `):v+=' = {{ | calc }}',l.append(v),_.append(`\n
                      \n
                      ${F("wiki_calc_citizens")}
                      \n
                      ${F("wiki_calc_soldiers")}
                      \n
                      ${F("wiki_calc_knowledge")}
                      \n
                      ${F("resource_Plasmid_plural_name")}
                      \n
                      ${F("wiki_calc_mass")}
                      \n
                      ${F("wiki_calc_exotic")}
                      \n
                      ${F("wiki_calc_mana")}
                      \n
                      ${F("wiki_calc_floor")}
                      \n
                      ${F("wiki_calc_genes")}
                      \n
                      ${F("wiki_calc_prestige")} \n \n {{ 'mad' | resetLabel }}\n {{ 'bioseed' | resetLabel }}\n {{ 'cataclysm' | resetLabel }}\n {{ 'bigbang' | resetLabel }}\n {{ 'vacuum' | resetLabel }}\n {{ 'terraform' | resetLabel }}\n {{ 'ascend' | resetLabel }}\n {{ 'descend' | resetLabel }}\n {{ 'ai' | resetLabel }}\n
                      \n
                      ${F("wiki_calc_universe")} \n \n {{ 'standard' | uniLabel }}\n {{ 'evil' | uniLabel }}\n {{ 'antimatter' | uniLabel }}\n {{ 'micro' | uniLabel }}\n {{ 'heavy' | uniLabel }}\n {{ 'magic' | uniLabel }}\n
                      \n
                      ${F("trait_high_pop_name")} \n \n {{ 0 | highPopLabel }}\n {{ 0.25 | highPopLabel }}\n {{ 0.5 | highPopLabel }}\n {{ 1 | highPopLabel }}\n {{ 2 | highPopLabel }}\n {{ 3 | highPopLabel }}\n
                      \n
                      ${F("universe_micro")}
                      \n
                      ${F("wiki_calc_synth")}
                      \n
                      ${F("wiki_calc_tp")}
                      \n
                      \n
                      \n \n \n
                      \n `),zs({el:"#"+n+"Calc",data:{i:p,u,r:h,s:m,pe:g},methods:{val(e){switch(e){case"cit":case"sol":case"know":case"plas":case"mass":case"exotic":case"mana":case"floor":p[e].val&&p[e].val<0&&(p[e].val=0);break;case"genes":p[e].val&&(p[e].val<0?p[e].val=0:p[e].val>4&&(p[e].val=4))}},pickReset(e){p.reset.val=e,Object.keys(u).forEach((function(e){u[e].use=!0})),"vacuum"===e?Object.keys(u).forEach((function(e){"magic"!==e&&(u[e].use=!1)})):"bigbang"===e&&(u.magic.use=!1),"plasmid"===a&&(u.antimatter.use=!1),p.synth.use="mad"===e,["mad","bioseed","terraform"].includes(e)?p.tp.enabled=!0:(p.tp.enabled=!1,p.tp.val="ai"===e)},pickUniverse(e){p.uni.val=e,"magic"===e?(h.bigbang.use=!1,h.vacuum.use=!0):(h.bigbang.use=!0,h.vacuum.use=!1),p.micro.val="micro"===e},pickHighPop(e){p.high_pop.val=e},resetInputs(){Object.keys(p).forEach((function(e){p[e].use&&(p[e].val=void 0)})),p.synth.use="plasmid"===a,["micro","synth","tp"].forEach((function(e){p[e].use&&(p[e].val=!1)})),p.tp.enabled=!0},importInputs(){p.cit.val=t.resource[t.race.species].amount,p.sol.val=t.civic.garrison?t.civic.garrison.workers:0;for(let e=0;e<3;e++)t.civic.foreign[`gov${e}`].occ&&(p.sol.val+=aa("federation"===t.civic.govern.type?15:20));p.know.val=t.stats.know,p.mass.val=t.interstellar.stellar_engine?t.interstellar.stellar_engine.mass:8,p.exotic.val=t.interstellar.stellar_engine?t.interstellar.stellar_engine.exotic:0,p.mana.val=t.resource.Mana.gen,p.floor.val=t.portal.spire?t.portal.spire.count-1:0,p.genes.val=Sn()-1;let e=t.race.universe;"dark"===s&&"magic"===e||"vacuum"===i||"bigbang"===e||(p.uni.val=e,"magic"===e?("bigbang"===p.reset.val&&(p.reset.val=void 0),h.bigbang.use=!1,h.vacuum.use=!0):("vacuum"===p.reset.val&&(p.reset.val=void 0),h.bigbang.use=!0,h.vacuum.use=!1),p.micro.val="micro"===e),p.high_pop.val=t.race.high_pop?t.race.high_pop:0,p.synth.val="synthetic"===Di[t.race.species].type,p.tp.use&&p.reset.val&&["mad","bioseed","terraform"].includes(p.reset.val)&&(p.tp.val=!!t.race.truepath),p.reset.val&&"mad"!==p.reset.val&&"descend"!==p.reset.val&&(p.plas.val=Ns(p.reset.val,{cit:p.cit.val,sol:p.sol.val,know:p.know.val,uni:p.uni.val,genes:p.genes.val,high_pop:p.high_pop.val,tp:p.tp.val}).plasmid)}},filters:{generic:(e,t)=>void 0!==e?e:"plasmid_gains_raw"===t||"plasmid_cap_total"===t?F("wiki_calc_"+t,[F("anti"===s?"resource_AntiPlasmid_name":"resource_Plasmid_name")]):F("wiki_calc_"+t),floor(e){if(void 0===e)return F("wiki_calc_floor_bonus");let t=0;return[50,100].forEach((function(a){e>=a&&t++})),t},highPopDivisor:e=>e?Ki.high_pop.vars(e)[0]:1,popDivisor(e,t){switch(e){case"mad":if(t)return 5;case"cataclysm":case"bioseed":return 3;case"ai":return 2.5;case"vacuum":case"bigbang":return 2.2;case"ascend":case"terraform":return 1.15;default:return F("wiki_calc_pop_divisor")}},knowMulti(e){switch(e){case"mad":return 1.1;case"cataclysm":case"bioseed":return 1.015;case"ai":return 1.014;case"vacuum":case"bigbang":return 1.012;case"ascend":case"terraform":return 1.008;default:return F("wiki_calc_know_multi")}},knowInc(e,t){switch(e){case"mad":return t?125e3:1e5;case"cataclysm":case"bioseed":return 5e4;case"ai":return 45e3;case"vacuum":case"bigbang":return 4e4;case"ascend":case"terraform":return 3e4;default:return F("wiki_calc_know_inc")}},phageMulti(e){switch(e){case"cataclysm":case"bioseed":return 1;case"ai":return 2;case"vacuum":case"bigbang":return 2.5;case"ascend":case"terraform":return 4;default:return F("wiki_calc_phage_multi")}},plasmidCap(e,t){switch(e){case"mad":return t?100:150;case"cataclysm":case"bioseed":return 400;case"ai":return 600;case"vacuum":case"bigbang":return 800;case"ascend":case"terraform":return 2e3;default:return F("wiki_calc_plasmid_cap")}},plasmidCapCalc(){if(g.capVis=p.reset.val&&void 0!==p.genes.val,g.capVis){let e=0;switch(p.reset.val){case"mad":e=150,p.synth.val&&(e=100);break;case"cataclysm":case"bioseed":e=400;break;case"ai":e=600;break;case"vacuum":case"bigbang":e=800;break;case"ascend":case"terraform":e=2e3}return e*=1+(p.genes.val+1-(p.tp.val?0:1))/8,g.capVal=Math.floor(e),e}g.capVal=void 0},plasmidTotalCalc(){if(g.totalVis=g.overflow&&g.capVal,g.totalVis)return g.capVal+Math.floor(g.overflow/(g.overflow+g.capVal)*g.capVal)},challenge:e=>void 0!==e?Gs(1,"mad",2,{genes:e,uni:"standard",tp:!1}):F("wiki_calc_challenge_multi"),universe(e){if(!e)return F("wiki_calc_universe_multi");let t=p.genes.val||0;return"harmony"===s||"artifact"===s?(d.uni=p.uni.val,Ns(p.reset.val,d)[a]):+(Gs(1,p.reset.val,2,{genes:t,uni:e})/Gs(1,"mad",2,{genes:t,uni:"standard"})).toFixed(2)},calc(){let e=!0;if(Object.keys(p).forEach((function(t){p[t].use&&void 0===p[t].val&&(e=!1)})),m.vis=e,m.vis){let e={};fc[s].forEach((function(t){"reset"!==t&&("micro"!==t?e[t]=p[t].val:e.uni=p.micro.val?"micro":"standard")})),"anti"===s?e.uni="antimatter":"vacuum"===s&&(e.uni="magic"),"plasmid"===a&&(e.rawPlasmids=!0);let t=Ns(p.reset.val,e)[a];return"plasmid"===a&&(g.rawGains=t,g.overflow=void 0!==g.capVal&&t>g.capVal?t-g.capVal:void 0,g.overflowVis=void 0!==g.rawGains&&void 0!==g.capVal),t}"plasmid"===a&&(g.rawGains=void 0,g.overflow=void 0,g.overflowVis=!1)},resetLabel(e){switch(e){case"mad":return F("wiki_calc_mad");case"bioseed":case"cataclysm":case"vacuum":case"ai":case"terraform":return F("wiki_resets_"+e);case"bigbang":return F("wiki_resets_blackhole");case"ascend":return F("wiki_resets_ascension");case"descend":return F("wiki_resets_infusion")}return F("wiki_calc_prestige")},uniLabel:e=>F(e?"universe_"+e:"wiki_calc_universe"),highPopLabel:e=>void 0===e?F("wiki_calc_trait_undefined"):0===e?F("wiki_calc_trait_unowned"):e}})}function bc(e,a){let r=$(`
                      `);e.append(r);let i=F("anti"===a?"resource_AntiPlasmid_name":"resource_Plasmid_name");r.append(`

                      ${F("wiki_calc_bonuses",[F("wiki_calc_prod",[i])])}

                      `);let s=$("
                      "),n=$("
                      ");r.append(s),r.append(n);let c={plas:{val:void 0},phage:{val:void 0},antimatter:{val:!1}},o={underResult:{vis:!1,val:0},overResult:{vis:!1,val:0},bleed:{vis:"anti"===a}};s.append(`\n
                      \n ${F("wiki_calc_effective",[F("plasmid"===a?"resource_Plasmid_plural_name":"resource_AntiPlasmid_plural_name")])} {{ i.plas.val | effective }} - \n ${F("wiki_calc_softcap")} {{ i.phage.val | softcap }}\n
                      \n
                      \n ${F("wiki_calc_under_cap")}\n
                      \n
                      \n (ln(({{ i.plas.val, t | generic }} / {{ | bleedDiv }}) + 50) - 3.91202) / 2.888 / 3 = {{ false | calcUnder }} = +{{ true | calcUnder }}%\n
                      \n
                      \n ${F("wiki_calc_over_cap")}\n
                      \n
                      \n ((((ln({{ i.phage.val, 'phage' | generic }} + 300) - 3.91202)) / 2.888) + ((ln(({{ i.plas.val, t | generic }} / {{ | bleedDiv }}) + 1 - ({{ i.phage.val, 'phage' | generic }} + 250)) / ln2 / 250))) / 3 = {{ false | calcOver }} = +{{ true | calcOver }}%\n
                      \n `),n.append(`\n
                      \n
                      ${F("plasmid"===a?"resource_Plasmid_plural_name":"resource_AntiPlasmid_plural_name")}
                      \n
                      ${F("resource_Phage_name")}
                      \n
                      ${F("universe_antimatter")}
                      \n
                      \n
                      \n \n \n
                      \n `),zs({el:`#${a}ProdCalc`,data:{i:c,s:o,t:a},methods:{val(e){c[e].val&&c[e].val<0&&(c[e].val=0)},bleed(){c.antimatter.val&&"plasmid"===a||!c.antimatter.val&&"anti"===a?o.bleed.vis=!0:o.bleed.vis=!1},resetInputs(){c.plas.val=void 0,c.phage.val=void 0,c.antimatter.val=!1},importInputs(){c.plas.val="plasmid"===a?t.prestige.Plasmid.count:t.prestige.AntiPlasmid.count,c.phage.val=t.prestige.Phage.count,c.antimatter.val="antimatter"===t.race.universe}},filters:{generic(e,t){if(void 0!==e)return e;switch(t){case"plasmid":return F("resource_Plasmid_plural_name");case"anti":return F("resource_AntiPlasmid_plural_name");case"phage":return F("resource_Phage_name")}},effective:e=>void 0===e?0:o.bleed.vis?e/("plasmid"===a?40:4):e,softcap:e=>250+(void 0===e?0:e),bleedDiv:()=>"plasmid"===a?40:4,calcUnder(e){if(e)return(100*o.underResult.val).toFixed(3);let t=c.plas.val;o.bleed.vis&&(t/="plasmid"===a?40:4);let r=!0;if((void 0===c.plas.val||t>250+c.phage.val)&&(r=!1),o.underResult.vis=r,o.underResult.vis){let e=+(Math.log(t+50)-3.91202).toFixed(5)/2.888;return"anti"===a&&(e/=3),o.underResult.val=e.toFixed(5),o.underResult.val}},calcOver(e){if(e)return(100*o.overResult.val).toFixed(3);let t=c.plas.val;o.bleed.vis&&(t/="plasmid"===a?40:4);let r=!0;if((void 0===c.phage.val||t<=250+c.phage.val)&&(r=!1),o.overResult.vis=r,o.overResult.vis){let e=+(Math.log(250+c.phage.val+50)-3.91202).toFixed(5)/2.888+Math.log(t+1-(250+c.phage.val))/Math.LN2/250;return"anti"===a&&(e/=3),o.overResult.val=e.toFixed(5),o.overResult.val}}}})}function wc(e,a){let r=$(`
                      `);e.append(r);let i=F("phage"===a?"resource_Phage_name":"anti"===a?"resource_AntiPlasmid_name":"resource_Plasmid_name"),s=F("phage"===a?"resource_Phage_name":"anti"===a?"resource_AntiPlasmid_plural_name":"resource_Plasmid_plural_name");r.append(`

                      ${F("wiki_calc_bonuses",[F("wiki_calc_store",[i])])}

                      `);let n=$("
                      "),c=$("
                      ");r.append(n),r.append(c);let o={res:{val:void 0},store:{val:void 0},antimatter:{val:!1,use:!0}};"phage"===a&&(o.antimatter.use=!1);let l={result:{vis:!1,val:0},bleed:{vis:"anti"===a}},_="";"phage"!==a&&(_+=`\n
                      \n ${F("wiki_calc_effective",[s])} {{ i.res.val | effective }}\n
                      \n `),_+='\n
                      \n ({{ i.res.val, t | generic }} / {{ | bleedDiv }}) * {{ i.store.val | storeVal }} = {{ false | calc }} = +{{ true | calc }}%\n
                      \n ',n.append(_),c.append(`\n
                      \n
                      ${s}
                      \n
                      ${F("wiki_tech_special_crispr",[F("wiki_arpa_crispr_store")])} \n \n {{ 0 | storeLabel }}\n {{ 1 | storeLabel }}\n {{ 2 | storeLabel }}\n {{ 3 | storeLabel }}\n {{ 4 | storeLabel }}\n
                      \n
                      ${F("universe_antimatter")}
                      \n
                      \n
                      \n \n \n
                      \n `),zs({el:`#${a}StoreCalc`,data:{i:o,s:l,t:a},methods:{val(){o.res.val&&o.res.val<0&&(o.res.val=0)},pickStore(e){o.store.val=e},bleed(){"phage"!==a&&(o.antimatter.val&&"plasmid"===a||!o.antimatter.val&&"anti"===a?l.bleed.vis=!0:l.bleed.vis=!1)},resetInputs(){o.res.val=void 0,o.store.val=void 0,o.antimatter.val=!1},importInputs(){o.res.val="phage"===a?t.prestige.Phage.count:"plasmid"===a?t.prestige.Plasmid.count:t.prestige.AntiPlasmid.count,o.store.val=t.genes.store||0,o.antimatter.val="antimatter"===t.race.universe}},filters:{generic(e,t){if(void 0!==e)return e;switch(t){case"plasmid":return F("resource_Plasmid_plural_name");case"anti":return F("resource_AntiPlasmid_plural_name");case"phage":return F("resource_Phage_name")}},storeVal(e){if(void 0===e)return F("wiki_calc_store_multi");if(0===e||"phage"===a&&e<4)return 0;switch(e){case 1:return 4e-4;case 2:return 6e-4;default:return 8e-4}},effective:e=>void 0===e?0:l.bleed.vis?e/("plasmid"===a?40:4):e,storeLabel:e=>void 0===e?F("wiki_tech_special_crispr",[F("wiki_arpa_crispr_store")]):e?F("wiki_arpa_crispr_store")+": "+e:F("wiki_calc_not_owned"),bleedDiv:()=>"plasmid"===a?5:10,calc(e){if(e)return(100*l.result.val).toFixed(2);let t=o.res.val;if(l.bleed.vis&&(t/="plasmid"===a?5:10),l.result.vis=void 0!==o.res.val&&void 0!==o.store.val,l.result.vis){if(0===o.store.val||"phage"===a&&o.store.val<4)l.result.val=0;else switch(o.store.val){case 1:l.result.val=(4e-4*t).toFixed(4);break;case 2:l.result.val=(6e-4*t).toFixed(4);break;default:l.result.val=(8e-4*t).toFixed(4)}return l.result.val}}}})}function kc(e){let t=En("create",e),a=["mad","bioseed","blackhole","ascension","cataclysm","vacuum","infusion","ai","terraform"],r=a.map((e=>`${F(`wiki_resets_${e}`)}`));Tn(t,{name:"intro",template:"resets",paragraphs:3,h_level:2,para_data:{1:[a.length,r.slice(0,-1).join(", ")+`, & ${r[r.length-1]}`]},data_color:{1:["warning","plain"]}}),En("add","resets-prestige","intro",F("wiki_menu_intro"));let i=Tn(t,{name:"mad",template:"resets",paragraphs:9,break:[6,9],h_level:2,para_data:{3:[F("wiki_p_res_plasmids")],4:[F("tech_rocketry"),F("tech_mad")],5:[F("tab_civics"),F("tab_military")],6:[F("wiki_p_res_plasmids")],7:[F("wiki_p_res_plasmids")],9:[F("wiki_resets_mad")]},data_color:{3:["danger"],6:["danger"],7:["danger"]}});i=Gn(i,"mad","gain"),yc(i,"plasmid",!1,"mad"),En("add","resets-prestige","mad",F("wiki_resets_mad")),i=Tn(t,{name:"bioseed",template:"resets",paragraphs:12,break:[5,8,12],h_level:2,para_data:{2:[F("tech_genesis_ship")],3:[F("wiki_p_res_plasmids"),F("wiki_p_res_phage")],4:[F("wiki_p_res_plasmids")],5:[F("tech_genesis_ship"),F("tech_star_dock")],6:[F("tech_interstellar"),F("tech_star_dock")],7:[F("tech_genesis_ship")],9:[F("tech_interstellar"),F("star_dock_probe_desc")],10:[F("wiki_planet_planet")],12:[F("wiki_resets_bioseed")]},data_color:{3:["danger","danger"],4:["danger"]},data_link:{10:["wiki.html#planets-gameplay"]}}),i=Gn(i,"bioseed","gain"),yc(i,"plasmid",!1,"bioseed"),yc(i,"phage",!1,"bioseed"),En("add","resets-prestige","bioseed",F("wiki_resets_bioseed"));let s=[];Object.keys(Qt).forEach((function(e){s.push(e)}));let n=s.map((e=>`${F(`universe_${e}`)}`));i=Tn(t,{name:"blackhole",template:"resets",paragraphs:12,break:[3,6,9,12],h_level:2,para_data:{2:[F("wiki_p_res_plasmids"),F("wiki_p_res_phage"),F("wiki_p_res_dark")],3:[F("tech_dist_stellar_engine")],4:[F("tech_mass_ejector"),F("wiki_resets_blackhole_exotic"),.025,F("resource_Elerium_name"),F("resource_Infernite_name")],5:[F("wiki_p_res_dark")],6:[F("wiki_resets_blackhole_exotic"),F("tech_exotic_infusion")],7:[10,F("wiki_hell_soul_gem")],8:[F("tech_stabilize_blackhole"),F("wiki_resets_blackhole_exotic")],10:[s.length,n.slice(0,-1).join(", ")+`, ${F("or")} ${n[n.length-1]}`],12:[F("wiki_resets_blackhole")]},data_color:{2:["danger","danger","danger"],4:["warning","warning","warning","caution","caution"],5:["danger"],7:["warning","caution"],10:["warning","plain"]}}),i=Gn(i,"bigbang","gain"),yc(i,"plasmid",!1,"bigbang"),yc(i,"phage",!1,"bigbang"),yc(i,"dark",!1,"bigbang"),En("add","resets-prestige","blackhole",F("wiki_resets_blackhole")),i=Tn(t,{name:"vacuum",template:"resets",paragraphs:10,break:[4,8,10],h_level:2,para_data:{4:[80],6:[F("arpa_syphon_damage")],7:[80],8:[F("wiki_p_res_plasmids"),F("wiki_p_res_phage"),F("wiki_p_res_dark")],9:[F("wiki_p_res_dark")],10:[F("wiki_resets_vacuum")]},data_color:{6:["danger"],8:["danger","danger","danger"],9:["danger"]}}),i=Gn(i,"vacuum","gain"),yc(i,"plasmid",!1,"vacuum"),yc(i,"phage",!1,"vacuum"),yc(i,"dark","vacuum","vacuum"),En("add","resets-prestige","vacuum",F("wiki_resets_vacuum")),i=Tn(t,{name:"ascension",template:"resets",paragraphs:10,break:[3,5,7,10],h_level:2,para_data:{2:[F("wiki_p_res_plasmids"),F("wiki_p_res_phage"),F("wiki_p_res_harmony")],3:[F("interstellar_ascension_machine"),"10,000",F("interstellar_thermal_collector")],4:[100,25],7:["+2%"],8:["+2","+5%","+10%"],10:[F("wiki_resets_ascension")]},data_color:{2:["danger","danger","danger"]}}),i=Gn(i,"ascend","gain"),yc(i,"plasmid",!1,"ascend"),yc(i,"phage",!1,"ascend"),yc(i,"harmony",!1,"ascend"),En("add","resets-prestige","ascension",F("wiki_resets_ascension")),i=Tn(t,{name:"cataclysm",template:"resets",paragraphs:10,break:[4,7,10],h_level:2,para_data:{1:[F("planet_unstable")],2:[F("tech_world_collider")],3:[F("tech_dial_it_to_11"),F("tech_limit_collider")],6:[F("wiki_p_res_plasmids"),F("wiki_p_res_phage")],10:[F("wiki_resets_cataclysm")]},data_color:{6:["danger","danger"]}}),i=Gn(i,"cataclysm","gain"),yc(i,"plasmid",!1,"cataclysm"),yc(i,"phage",!1,"cataclysm"),En("add","resets-prestige","cataclysm",F("wiki_resets_cataclysm")),i=Tn(t,{name:"terraform",template:"resets",paragraphs:19,break:[3,6,7,10,12,19],h_level:2,para_data:{1:[F("wiki_resets_terraform"),F("evo_challenge_orbit_decay")],2:[F("wiki_resets_ascension")],3:[F("wiki_p_res_plasmids"),F("wiki_p_res_phage"),F("wiki_p_res_harmony")],7:[F("achieve_lamentis_name")],8:[1],10:[F("rejuvenated")],13:["10%"],14:["5%"],16:["2%","50%"],17:["50%"],19:[F("wiki_resets_terraform")]}}),i=Gn(i,"terraform","gain"),yc(i,"plasmid",!1,"terraform"),yc(i,"phage",!1,"terraform"),yc(i,"harmony",!1,"terraform"),En("add","resets-prestige","terraform",F("wiki_resets_terraform")),i=Tn(t,{name:"infusion",template:"resets",paragraphs:8,break:[4,8],h_level:2,para_data:{2:[F("resource_Artifact_name")],5:[F("resource_Demonic_Essence_name")],6:[F("resource_Demonic_Essence_name")],7:[F("achieve_corrupted_name")],8:[F("wiki_resets_infusion")]},data_color:{2:["danger"],7:["caution"]}}),i=Gn(i,"descend","gain"),yc(i,"artifact",!1,"descend"),En("add","resets-prestige","infusion",F("wiki_resets_infusion")),i=Tn(t,{name:"ai",template:"resets",paragraphs:8,break:[3,6,7,8],h_level:2,para_data:{2:[F("evo_challenge_truepath")],3:[F("space_ai_core"),F("wiki_resets_ai_drift"),"100%"],4:[F("tech_protocol66")],5:[F("space_ai_colonist_title"),F("space_decoder_title"),F("space_shock_trooper_title"),F("space_tank_title")],6:[F("wiki_resets_ai"),F("wiki_p_res_plasmids"),F("wiki_p_res_phage"),F("wiki_p_res_ai_core")],7:[F("genelab_genus_synthetic")],8:[F("wiki_resets_ai")]},data_color:{6:["warning","danger","danger","danger"]},data_link:{2:["wiki.html#challenges-gameplay-scenarios_truepath"],3:["wiki.html#space-tp_structures-ai_core"],4:["wiki.html#solar-tp_tech-protocol66"],5:["#space-tp_structures-ai_colonist","#space-tp_structures-decoder","#space-tp_structures-shock_trooper","#space-tp_structures-tank"]}}),i=Gn(i,"ai","gain"),yc(i,"plasmid",!1,"ai"),yc(i,"phage",!1,"ai"),yc(i,"cores",!1,"ai"),En("add","resets-prestige","ai",F("wiki_resets_ai")),i=Tn(t,{name:"matrix",template:"resets",paragraphs:6,break:[3,5,6],h_level:2,para_data:{2:[F("evo_challenge_truepath")],3:[F("tau_star_ringworld")],5:[F("wiki_resets_matrix"),F("wiki_p_res_plasmids"),F("wiki_p_res_phage"),F("civics_servants")],6:[F("wiki_resets_matrix")]},data_color:{5:["warning","danger","danger","danger"]},data_link:{2:["wiki.html#challenges-gameplay-scenarios_truepath"],3:["wiki.html#tauceti-structures-ringworld"]}}),i=Gn(i,"matrix","gain"),yc(i,"plasmid",!1,"matrix"),yc(i,"phage",!1,"matrix"),En("add","resets-prestige","matrix",F("wiki_resets_matrix")),i=Tn(t,{name:"retired",template:"resets",paragraphs:6,break:[3,5,6],h_level:2,para_data:{2:[F("evo_challenge_truepath")],3:[F("tech_matrioshka_brain"),F("tech_ignition_device")],5:[F("wiki_resets_retired"),F("wiki_p_res_plasmids"),F("wiki_p_res_phage"),F("civics_servants")],6:[F("wiki_resets_retired")]},data_color:{5:["warning","danger","danger","danger"]},data_link:{2:["wiki.html#challenges-gameplay-scenarios_truepath"],3:["wiki.html#tauceti-structures-matrioshka_brain","wiki.html#tauceti-structures-ignition_device"]}}),i=Gn(i,"retired","gain"),yc(i,"plasmid",!1,"retired"),yc(i,"phage",!1,"retired"),En("add","resets-prestige","retired",F("wiki_resets_retired")),i=Tn(t,{name:"eden",template:"resets",paragraphs:6,break:[3,5,6],h_level:2,para_data:{2:[F("evo_challenge_lone_survivor")],3:[F("tau_star_ringworld")],4:[F("tau_star_goe_facility")],5:[F("wiki_resets_eden"),F("wiki_p_res_plasmids"),F("wiki_p_res_phage"),F("civics_servants")],6:[F("wiki_resets_eden")]},data_color:{5:["warning","danger","danger","danger"]},data_link:{2:["wiki.html#challenges-gameplay-scenarios_truepath"],3:["wiki.html#tauceti-structures-ringworld"],4:["wiki.html#tauceti-structures-goe_facility"]}}),i=Gn(i,"eden","gain"),yc(i,"plasmid",!1,"eden"),yc(i,"phage",!1,"eden"),En("add","resets-prestige","eden",F("wiki_resets_eden"))}function $c(e){let a=$("#content");switch(Cs(a),e){case"basics":!function(e){Tn(e,{name:"start",template:"basics",paragraphs:2,h_level:2}),Tn(e,{name:"prehistoric",template:"basics",paragraphs:14,break:[2,6,13],h_level:2,para_data:{3:[F("resource_RNA_name"),F("resource_DNA_name")],4:[F("evo_organelles_title"),F("resource_RNA_name"),F("evo_nucleus_title"),F("resource_DNA_name")],5:[F("evo_membrane_title"),F("evo_eukaryotic_title"),F("evo_mitochondria_title")],7:[F("genelab_genus")],8:[3],13:[F("evo_sentience_title")]},data_link:{7:["wiki.html#races-species"]}}),Tn(e,{name:"civilization",template:"basics",paragraphs:14,break:[2,8,13],h_level:2,para_data:{3:[F("tab_civics")],4:[F("resource_Food_name"),F("job_farmer"),F("job_hunter")],5:["*"],8:[F("resource_Food_name")],9:[F("resource_Food_name"),F("hunger")],10:[F("resource_Food_name")],11:[F("resource_Food_name")],12:[F("resource_Food_name")],13:[F("resource_Knowledge_name")],14:[F("resource_Knowledge_name"),F("city_university")]}}),Tn(e,{name:"government",template:"basics",paragraphs:8,break:[4],h_level:2,para_data:{1:[F("tech_government"),F("tab_civics"),F("govern_anarchy")],2:[F("tech_government"),F("govern_anarchy")],3:[F("tech_government")],4:[F("morale")],5:[F("morale")],6:[F("morale"),F("job_entertainer"),F("morale_stress")],7:[F("morale_tax"),F("morale")],8:[25,100]}}),Tn(e,{name:"mad",template:"basics",paragraphs:4,h_level:2,para_data:{1:[F("wiki_resets_mad")],2:[F("wiki_basics_mad_reset"),F("tab_civics"),F("tab_military")],3:[F("tab_space")]},data_link:{2:["wiki.html#resets-prestige"]}})}(a);break;case"mechanics":!function(e){let a=En("create",e);Tn(a,{name:"save",template:"mechanics",label:F("wiki_mechanics_save"),paragraphs:8,break:[3,5],h_level:2,para_data:{1:["~5"],3:[F("wiki_mechanics_save_export")],4:[F("export")],5:[F("restore")],8:[F("restore")]}}),En("add","mechanics-gameplay","save",F("wiki_mechanics_save")),Tn(a,{name:"atime",template:"mechanics",label:F("wiki_mechanics_atime"),paragraphs:6,break:[4,6],h_level:2,para_data:{1:[F("wiki_mechanics_atime")],2:[2,F("wiki_mechanics_atime")],3:["2x",F("wiki_mechanics_atime")],4:[F("wiki_mechanics_atime"),8],5:[12,8,F("wiki_mechanics_atime")],6:[F("wiki_mechanics_atime")]}}),En("add","mechanics-gameplay","atime",F("wiki_mechanics_atime")),Tn(a,{name:"spack",template:"mechanics",label:F("wiki_mechanics_spack"),paragraphs:10,break:[4,6,7,8,9,10],h_level:2,para_data:{1:["UTF-8","JSON",".txt"],4:[`${F("wiki_mechanics_spack_para4_note")}`],6:[F("resource_Food_name"),F("wiki_mechanics_spack_para6_note1"),F("city_biolab"),F("wiki_mechanics_spack_para6_note2")]}}),En("add","mechanics-gameplay","spack",F("wiki_mechanics_spack")),Tn(a,{name:"job",template:"mechanics",label:F("wiki_mechanics_job"),paragraphs:9,break:[5],h_level:2,para_data:{1:[F("wiki_mechanics_job")],2:["*"],3:[F("wiki_mechanics_job")]}}),En("add","mechanics-gameplay","job",F("wiki_mechanics_job")),function(e){let a=$('
                      ');e.append(a);let r=$("
                      "),i=$("
                      "),s=$("
                      ");a.append(r),a.append(i),a.append(s);let n={job:{val:void 0},content:{vis:!1,val:void 0},freespirit:{vis:!1,val:void 0},mellow:{val:!1},dense:{vis:!1,val:!1,formVis:!1},workers:{val:void 0},playful:{vis:!1,val:!1},high_pop:{val:void 0},emotionless:{val:void 0},government:{val:void 0},annexed:{vis:!1,val:void 0},electricity:{vis:!1,val:!1},virtual_reality:{val:!1}},c={result:{vis:!1,val:void 0},total:{vis:!1,val:0}},o=["soldier"];Object.keys(Yt).forEach((function(e){"unemployed"!==e&&"forager"!==e&&o.push(e)}));let l=`\n
                      ${F("wiki_calc_job_stress_job")} \n `;o.forEach((function(e){l+=`\n {{ '${e}' | jobLabel }}`})),l+="\n
                      \n ",r.append(l),i.append(`\n
                      \n

                      ${F("wiki_calc_job_stress_divisor")}

                      \n
                      \n
                      \n ({{ i.job.val | stressDiv }} + ({{ i.content.val, 'content' | generic }} * {{ i.job.val | contentVal }}) {{ i.job.val | mellowOp }} - 1) / {{ i.freespirit.val, 'freespirit', 0 | traitVal }} = {{ | calc }}\n
                      \n
                      \n

                      ${F("wiki_calc_job_stress_generated")}

                      \n
                      \n
                      \n 0 * {{ i.workers.val, 'workers' | generic }} / {{ i.high_pop.val, 'high_pop', 0 | traitVal }} / {{ s.result.val, 'divisor' | generic }} * {{ i.emotionless.val, 'emotionless', 1 | traitVal }} * {{ i.government.val, i.electricity.val, i.virtual_reality.val | govVal }} * {{ i.annexed.val | anxVal }} = -{{ | calcTotal }}%\n
                      \n `),s.append(`\n
                      \n
                      ${F("wiki_calc_job_stress_content")}
                      \n
                      ${F("planet_mellow")}
                      \n
                      ${F("planet_dense")}
                      \n
                      ${F("trait_freespirit_name")} \n \n {{ 0 | traitLabel }}\n {{ 0.25 | traitLabel }}\n {{ 0.5 | traitLabel }}\n {{ 1 | traitLabel }}\n {{ 2 | traitLabel }}\n {{ 3 | traitLabel }}\n
                      \n
                      \n
                      \n
                      {{ i.job.val | workersLabel }}
                      \n
                      ${F("wiki_calc_job_stress_annexed")}
                      \n
                      ${F("civics_government")} \n \n {{ 'anarchy' | govLabel }}\n {{ 'autocracy' | govLabel }}\n {{ 'federation' | govLabel }}\n {{ 'socialist' | govLabel }}\n {{ 'other' | govLabel }}\n
                      \n
                      ${F("tech_electricity")}
                      \n
                      ${F("tech_virtual_reality")}
                      \n
                      ${F("trait_playful_name")}
                      \n
                      ${F("trait_high_pop_name")} \n \n {{ 0 | traitLabel }}\n {{ 0.25 | traitLabel }}\n {{ 0.5 | traitLabel }}\n {{ 1 | traitLabel }}\n {{ 2 | traitLabel }}\n {{ 3 | traitLabel }}\n
                      \n
                      ${F("trait_emotionless_name")} \n \n {{ 0 | traitLabel }}\n {{ 0.25 | traitLabel }}\n {{ 0.5 | traitLabel }}\n {{ 1 | traitLabel }}\n {{ 2 | traitLabel }}\n {{ 3 | traitLabel }}\n
                      \n
                      \n
                      \n \n \n
                      \n `),zs({el:"#jobStressCalc",data:{i:n,s:c},methods:{val(e){n[e].val&&n[e].val<0&&(n[e].val=0),"annexed"===e&&n[e].val>3&&(n[e].val=3)},pickJob(e){n.job.val=e,n.content.vis="hunter"!==e&&"soldier"!==e,n.freespirit.vis=!["hunter","soldier","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].includes(e),n.dense.vis="miner"===e,n.playful.vis="hunter"===e},pickGov(e){n.government.val=e,n.annexed.vis="federation"!==e,n.electricity.vis="autocracy"===e},pickTrait(e,t){n[t].val=e},resetInputs(){n.job.val=void 0,n.content.val=void 0,n.content.vis=!1,n.freespirit.val=void 0,n.freespirit.vis=!1,n.mellow.val=!1,n.dense.val=!1,n.dense.vis=!1,n.workers.val=void 0,n.playful.val=!1,n.playful.vis=!1,n.government.val=void 0,n.annexed.val=void 0,n.annexed.vis=!1,n.electricity.val=!1,n.electricity.vis=!1,n.virtual_reality.val=!1,n.high_pop.val=void 0,n.emotionless.val=void 0,c.result.val=void 0},importInputs(){if(n.content.val=t.race.content?t.race.content:0,n.freespirit.val=t.race.freespirit?t.race.freespirit:0,n.mellow.val=!(!t.city.ptrait||!t.city.ptrait.includes("mellow")),n.dense.val=!(!t.city.ptrait||!t.city.ptrait.includes("dense")),n.workers.val="soldier"===n.job.val?t.civic.garrison&&t.civic.garrison.max?t.civic.garrison.max:0:t.civic[n.job.val]?t.civic[n.job.val].workers:0,n.playful.val=!!t.race.playful,n.high_pop.val=t.race.high_pop?t.race.high_pop:0,n.emotionless.val=t.race.emotionless?t.race.emotionless:0,t.civic.govern){let e=t.civic.govern.type;switch(e){case"autocracy":case"anarchy":case"socialist":case"federation":n.government.val=e;break;default:n.government.val="other"}n.annexed.vis="federation"!==e,n.electricity.vis="autocracy"===e}if(n.annexed.val=0,t.civic.foreign)for(let e=0;e<3;e++)t.civic.foreign["gov"+e].anx&&n.annexed.val++;n.electricity.val=!!t.tech.high_tech&&t.tech.high_tech>=2,n.virtual_reality.val=!!t.tech.high_tech&&t.tech.high_tech>=12}},filters:{generic:(e,t)=>("workers"===t&&"soldier"===n.job.val&&(t="soldiers"),void 0!==e?e:F("wiki_calc_job_stress_"+t)),jobLabel:e=>e?"soldier"===e?F("governor_soldier"):"titan_colonist"===e?F("job_colonist_tp",[Dn("titan")]):F("job_"+e):F("wiki_calc_job_stress_job"),workersLabel:e=>F("soldier"===e?"wiki_calc_job_stress_soldiers":"wiki_calc_job_stress_workers"),govLabel:e=>F(e?"other"===e?"wiki_calc_job_stress_government_other":"govern_"+e:"civics_government"),traitLabel:e=>void 0===e?F("wiki_calc_trait_undefined"):0===e?F("wiki_calc_trait_unowned"):e,stressDiv(e){if(!e)return F("base");switch(e){case"hunter":return 5;case"soldier":return 2;default:return t.civic[e].stress}},contentVal:e=>e?"hell_surveyor"===e?.2:.4:F("wiki_calc_job_stress_content_multi"),mellowOp(e){switch(e){case"hunter":case"soldier":return`* ${ns.mellow.vars()[0]}`;default:return`+ ${ns.mellow.vars()[1]}`}},govVal(e,t,a){if(!e)return F("wiki_calc_job_stress_government");switch(e){case"anarchy":return.5;case"autocracy":return t?a?1.1:1.18:1.25;case"socialist":return 1.1;default:return 1}},anxVal:e=>void 0!==e?+(1.1**e).toFixed(5):F("civics_spy_purchase_bd"),traitVal(e,t,a){switch(t){case"freespirit":return 1+Ki.freespirit.vars(e)[a]/100;case"high_pop":return Ki.high_pop.vars(e)[a];case"emotionless":return 1-Ki.emotionless.vars(e)[a]/100}},calc(){let e=void 0!==n.job.val&&void 0!==n.freespirit.val;if("hunter"!==n.job.val&&"soldier"!==n.job.val&&(e=e&&void 0!==n.content.val),c.result.vis=e,c.result.vis){let e="hunter"===n.job.val?5:"soldier"===n.job.val?2:t.civic[n.job.val].stress;return"hunter"===n.job.val||"soldier"===n.job.val?n.mellow.val&&(e*=ns.mellow.vars()[0]):(n.mellow.val&&(e+=ns.mellow.vars()[1]),e+=("hell_surveyor"===n.job.val?.2:.4)*n.content.val,n.dense.val&&"miner"===n.job.val&&(e-=ns.dense.vars()[1]),n.freespirit.val&&!["farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].includes(n.job.val)&&(e/=1+Ki.freespirit.vars(n.freespirit.val)[0]/100)),c.result.val=+e.toFixed(4),c.result.val}c.result.val=void 0},calcTotal(){let e=n.playful.val&&"hunter"===n.job.val;if(e)c.total.vis=e,c.total.val=0;else if(e=c.result.vis&&n.government.val&&void 0!==n.workers.val&&void 0!==n.high_pop.val&&void 0!==n.emotionless.val,"federation"!==n.government.val&&(e=e&&void 0!==n.annexed.val),c.total.vis=e,c.total.vis){let e=n.workers.val/c.result.val;if("federation"!==n.government.val)switch(e*=1.1**n.annexed.val,n.government.val){case"anarchy":e/=2;break;case"autocracy":e*=n.electricity.val?n.virtual_reality.val?1.1:1.18:1.25;break;case"socialist":e*=1.1}n.high_pop.val&&(e/=Ki.high_pop.vars(n.high_pop.val)[0]),n.emotionless.val&&(e*=1-Ki.emotionless.vars(n.emotionless.val)[1]/100),c.total.val=+e.toFixed(3)}return c.total.val}}})}(Gn(Tn(a,{name:"job_stress",template:"mechanics",label:F("wiki_mechanics_job_stress"),paragraphs:7,break:[3,5,6,7],h_level:2,para_data:{2:[F("job_unemployed"),F("trait_content_name")],3:[F("wiki_calc_job_stress_divisor"),1],4:[F("trait_freespirit_name"),F("trait_content_name"),F("planet_mellow")],6:[F("trait_optimistic_name"),F("trait_pessimistic_name"),F("morale_stress"),F("morale")],7:[F("civics_garrison_annex")]},data_link:{2:[!1,"wiki.html#traits-species-minor_content"],4:["wiki.html#traits-species-major_freespirit","wiki.html#traits-species-minor_content","wiki.html#planets-gameplay-mellow"],6:["wiki.html#traits-species-major_optimistic","wiki.html#traits-species-major_pessimistic"]}}),"mechanics","job_stress",F("wiki_mechanics_job_stress"))),En("add","mechanics-gameplay","job_stress",F("wiki_mechanics_job_stress")),Tn(a,{name:"multiplier",template:"mechanics",label:F("wiki_mechanics_multiplier"),paragraphs:5,break:[4],h_level:2,para_data:{1:[F("wiki_mechanics_multiplier")],2:["10x",t.settings.keyMap.x10,"25x",t.settings.keyMap.x25,"100x",t.settings.keyMap.x100],4:[F("wiki_mechanics_multiplier")],5:[F("wiki_mechanics_multiplier")]},data_color:{2:["warning","caution","warning","caution","warning","caution"]}}),En("add","mechanics-gameplay","multiplier",F("wiki_mechanics_multiplier")),Tn(a,{name:"cost_creep",template:"mechanics",label:F("wiki_mechanics_cost_creep"),paragraphs:7,break:[4,7],h_level:2,para_data:{2:[F("resource_Lumber_name"),200,1.3,"200*1.3=260","200*1.3^2=338"],3:[F("wiki_menu_arpa")],5:[F("tech_steel_beams"),F("trait_large_name"),F("tab_arpa_crispr"),F("wiki_arpa_crispr_creep")],6:[F("trait_creative_name"),F("wiki_menu_arpa")],7:[1.005]},data_link:{3:["wiki.html#projects-arpa"],5:["wiki.html#discovery-tech-steel_beams","wiki.html#traits-species-genus_large",!1,"wiki.html#crispr-prestige-genetic_memory"],6:["wiki.html#traits-species-major_creative"]}}),En("add","mechanics-gameplay","cost_creep",F("wiki_mechanics_cost_creep")),Tn(a,{name:"queue",template:"mechanics",label:F("wiki_mechanics_queue"),paragraphs:13,break:[4,6,9,10,11,13],h_level:2,para_data:{1:[F("wiki_mechanics_queue"),F("tech_urban_planning")],2:[F("building_queue")],4:[F("wiki_mechanics_queue_research"),F("tech_assistant")],7:[F("q_key"),t.settings.keyMap.q],8:[F("q_key")],10:[F("q_any")],12:[F("q_merge")]},data_color:{7:["warning","caution"]}}),En("add","mechanics-gameplay","queue",F("wiki_mechanics_queue"));{let e=Tn(a,{name:"multipliers",template:"mechanics",label:F("wiki_mechanics_multipliers"),paragraphs:1,h_level:2});Tn(e,{name:"multipliers_prod",template:"mechanics",label:F("wiki_mechanics_multipliers"),paragraphs:4,break:[3,4],h_level:!1,para_data:{3:[F("wiki_mechanics_multipliers_struct"),F("wiki_mechanics_multipliers_bonus")]}}).append('
                      '),Tn(e,{name:"multipliers_dis",template:"mechanics",label:F("wiki_mechanics_multipliers"),paragraphs:7,break:[3,4],h_level:!1,para_data:{3:[F("wiki_mechanics_multipliers_base"),F("wiki_mechanics_multipliers_discount"),F("wiki_mechanics_multipliers_struct")],5:[F("city_mass_driver")],6:[100,F("city_mass_driver"),"5%",95,35.84],7:[100,.95,20,35.84]},data_link:{5:["wiki.html#planetary-structures-mass_driver"]}}),e.append(`
                      ${F("wiki_mechanics_multipliers_exception")}
                      `),En("add","mechanics-gameplay","multipliers",F("wiki_mechanics_multipliers"))}Tn(a,{name:"blocking",template:"mechanics",label:F("wiki_mechanics_blocking"),paragraphs:6,break:[4,6],h_level:2,para_data:{2:[F("color_red")],3:[F("color_orange")],5:[F("color_red")]},data_color:{2:["danger"],3:["caution"],5:["danger"]}}).append('
                      '),En("add","mechanics-gameplay","blocking",F("wiki_mechanics_blocking")),Tn(a,{name:"astro",template:"mechanics",label:F("wiki_mechanics_astro"),paragraphs:15,break:[3,4,5,6,7,8,9,10,11,12,13,14,15],h_level:2,para_data:{2:[12],3:[F("sign_aries"),F("sign_aries_symbol"),N("aries")[0]+"%"],4:[F("sign_taurus"),F("sign_taurus_symbol"),N("taurus")[0]+"%"],5:[F("sign_gemini"),F("sign_gemini_symbol"),N("gemini")[0]+"%"],6:[F("sign_cancer"),F("sign_cancer_symbol"),N("cancer")[0]],7:[F("sign_leo"),F("sign_leo_symbol"),N("leo")[0]+"%"],8:[F("sign_virgo"),F("sign_virgo_symbol"),N("virgo")[0]+"%"],9:[F("sign_libra"),F("sign_libra_symbol"),N("libra")[0]+"%"],10:[F("sign_scorpio"),F("sign_scorpio_symbol"),N("scorpio")[0]+"%"],11:[F("sign_sagittarius"),F("sign_sagittarius_symbol"),N("sagittarius")[0]+"%"],12:[F("sign_capricorn"),F("sign_capricorn_symbol"),N("capricorn")[0]+"%"],13:[F("sign_aquarius"),F("sign_aquarius_symbol"),N("aquarius")[0]+"%"],14:[F("sign_pisces"),F("sign_pisces_symbol")],15:[F(`sign_${R()}`)]},data_color:{3:["warning","caution","warning"],4:["warning","caution","warning"],5:["warning","caution","warning"],6:["warning","caution","warning"],7:["warning","caution","warning"],8:["warning","caution","warning"],9:["warning","caution","warning"],10:["warning","caution","warning"],11:["warning","caution","warning"],12:["warning","caution","warning"],13:["warning","caution","warning"],14:["warning","caution"],15:["caution"]}}),En("add","mechanics-gameplay","astro",F("wiki_mechanics_astro")),Tn(a,{name:"bank_vault",template:"mechanics",label:F("wiki_mechanics_bank_vault"),paragraphs:2,h_level:2,para_data:{1:[F("city_bank"),F("interstellar_exchange_title"),F("portal_arcology_title"),F("resource_Money_name"),F("wiki_mechanics_bank_vault"),F("space_red_spaceport_title"),F("wiki_challenges_scenarios_cataclysm")],2:[F("resource_Money_name"),F("city_bank"),F("tech_adamantite_vault"),F("governor_entrepreneur"),F("trait_paranoid_name"),F("tech_stock_market"),F("tech_unification"),F("wiki_challenges_modes_inflation")]},data_link:{1:["wiki.html#planetary-structures-bank","wiki.html#interstellar-structures-exchange","wiki.html#hell-structures-arcology",!1,!1,"wiki.html#space-structures-spaceport","wiki.html#challenges-gameplay-scenarios_cataclysm"],2:[!1,!1,"wiki.html#interstellar-tech-adamantite_vault","wiki.html#governor-gameplay-entrepreneur","wiki.html#traits-species-major_paranoid","wiki.html#projects-arpa-stock_exchange","wiki.html#early_space-tech-unification2","wiki.html#challenges-gameplay-modes_inflation"]}}),En("add","mechanics-gameplay","bank_vault",F("wiki_mechanics_bank_vault")),Tn(a,{name:"homeless",template:"mechanics",label:F("wiki_mechanics_homeless"),paragraphs:4,break:[3],h_level:2,para_data:{3:[F("arpa_projects_railway_title")]},data_link:{3:["wiki.html#projects-arpa-railway"]}}),En("add","mechanics-gameplay","homeless",F("wiki_mechanics_homeless")),function(e){let a=$('
                      ');e.append(a),a.append(`

                      ${F("wiki_mechanics_warmonger")}

                      `);let r=$("
                      "),i=$("
                      ");a.append(r),a.append(i);let s={fatigue:{val:void 0},protest:{val:void 0}},n={result:{vis:!1,val:0}};r.append(`\n
                      \n log2({{ i.fatigue.val, 'fatigue' | generic }} + {{ i.protest.val, 'protest' | generic }}) = {{ false | calc }} = {{ true | calc }}% ${F("wiki_mechanics_warmonger")}\n
                      \n `),i.append(`\n
                      \n
                      ${F("wiki_calc_warmonger_fatigue")}
                      \n
                      ${F("wiki_calc_warmonger_protest")}
                      \n
                      \n
                      \n \n \n
                      \n `),zs({el:"#warmongerCalc",data:{i:s,s:n},methods:{val(e){s[e].val&&s[e].val<0&&(s[e].val=0)},resetInputs(){s.fatigue.val=void 0,s.protest.val=void 0},importInputs(){s.fatigue.val=t.civic.garrison&&t.civic.garrison.fatigue?t.civic.garrison.fatigue:0,s.protest.val=t.civic.garrison&&t.civic.garrison.protest?t.civic.garrison.protest:0}},filters:{generic:(e,t)=>void 0!==e?e:F("wiki_calc_warmonger_"+t),calc:e=>e?Math.round(n.result.val):(n.result.vis=void 0!==s.fatigue.val&&void 0!==s.protest.val&&s.fatigue.val+s.protest.val>=1,n.result.vis?(n.result.val=Math.log2(s.fatigue.val+s.protest.val),n.result.val):void 0)}})}(Gn(Tn(a,{name:"warmonger",template:"mechanics",label:F("wiki_mechanics_warmonger"),paragraphs:8,break:[4],h_level:2,para_data:{2:[F("trait_immoral_name")],3:[F("govern_autocracy"),F("trait_blood_thirst_name")],4:[F("wiki_calc_warmonger_fatigue"),F("wiki_calc_warmonger_protest")],5:[F("achieve_warmonger_name")],6:[F("wiki_calc_warmonger_fatigue"),1,F("wiki_calc_warmonger_protest")],7:[F("wiki_calc_warmonger_fatigue"),F("wiki_calc_warmonger_protest"),1,0],8:[`log2(${F("wiki_calc_warmonger_fatigue")} + ${F("wiki_calc_warmonger_protest")})`]},data_link:{2:["wiki.html#traits-species-genus_immoral"],3:["wiki.html#government-gameplay-autocracy","wiki.html#traits-species-major_blood_thirst"]}}),"mechanics","warmonger",F("wiki_mechanics_warmonger"))),En("add","mechanics-gameplay","warmonger",F("wiki_mechanics_warmonger")),function(e){let t=$('
                      ');e.append(t);let a=$("
                      "),r=$("
                      ");t.append(a),t.append(r);let i={military:{val:void 0},relations:{val:void 0},unrest:{val:void 0},spies:{val:void 0},infiltrator:{val:!1}},s={base:{vis:!1,val:void 0},total:{vis:!1,val:void 0}};a.append(`\n
                      \n

                      ${F("wiki_calc_spy_cost_base_title")}

                      \n
                      \n
                      \n ({{ i.military.val, 'mil_rate' | generic }} / 2) + ((100 - {{ i.relations.val, 'relations' | generic }}) / 2) - {{ i.unrest.val, 'unrest' | generic }} + 10 = {{ | calcBase }}\n
                      \n
                      \n

                      ${F("wiki_calc_spy_cost_total")}

                      \n
                      \n
                      \n ({{ s.base.val, 'unrest' | generic }} / 3)^({{ i.spies.val, 'spies' | generic }} + 1) + 500 = {{ | calcTotal }}\n
                      \n `),r.append(`\n
                      \n
                      ${F("civics_gov_mil_rate")}
                      \n
                      ${F("civics_gov_relations")}
                      \n
                      ${F("civics_gov_unrest")}
                      \n
                      \n
                      \n
                      ${F("wiki_calc_spy_cost_spies")}
                      \n
                      ${F("trait_infiltrator_name")}
                      \n
                      \n
                      \n \n
                      \n `),zs({el:"#spyCostCalc",data:{i,s},methods:{val(e){i[e].val&&i[e].val<0&&(i[e].val=0),"military"!==e&&"spies"!==e&&i[e].val>100?i[e].val=100:"military"===e&&i[e].val<50&&(i[e].val=50)},resetInputs(){i.military.val=void 0,i.relations.val=void 0,i.unrest.val=void 0,i.spies.val=void 0,i.infiltrator.val=!1,s.base.val=void 0}},filters:{generic(e,t){if(void 0!==e)return e;switch(t){case"spies":case"base":return F("wiki_calc_spy_cost_"+t);default:return F("civics_gov_"+t)}},calcBase(){if(s.base.vis=void 0!==i.military.val&&void 0!==i.relations.val&&void 0!==i.unrest.val,s.base.vis){let e=i.military.val/2+(100-i.relations.val)/2-i.unrest.val+10;return e<50&&(e=50),s.base.val=+e.toFixed(4),s.base.val}},calcTotal(){if(s.total.vis=void 0!==s.base.val&&void 0!==i.spies.val,s.total.vis){let e=s.base.val;return i.infiltrator.val&&(e/=3),s.total.val=+(e**(i.spies.val+1)+500).toFixed(2),s.total.val}}}})}(Gn(Tn(a,{name:"spy",template:"mechanics",label:F("wiki_mechanics_spy"),paragraphs:8,break:[3,4,5,6,7],h_level:2,para_data:{1:[F("tech_spy")],4:[1,F("civics_gov_relations"),F("civics_gov_mil_rate")],5:[2,F("civics_gov_mil_rate"),F("civics_gov_eco_rate")],6:[3,F("civics_gov_eco_rate"),F("civics_gov_unrest")],7:[4,F("civics_gov_unrest")],8:[4],9:[F("tech_espionage")]},data_link:{1:["wiki.html#civilized-tech-spy"],9:["wiki.html#civilized-tech-espionage"]}}),"mechanics","spy_cost")),En("add","mechanics-gameplay","spy",F("wiki_mechanics_spy")),function(e){let t=$('
                      ');e.append(t);let a=$("
                      "),r=$("
                      ");t.append(a),t.append(r);let i={relations:{val:void 0},economic:{val:void 0},unrest:{val:void 0}},s={annex:{vis:!1,val:void 0},purchase:{vis:!1,val:void 0}};a.append(`\n
                      \n

                      ${F("wiki_calc_occupation_annex")}

                      \n
                      \n
                      \n 300 - {{ i.relations.val, 'relations' | generic }} - {{ i.unrest.val, 'unrest' | generic }} = {{ | calcAnnex }}%\n
                      \n
                      \n

                      ${F("wiki_calc_occupation_purchase")}

                      \n
                      \n
                      \n ({{ i.economic.val, 'eco_rate' | generic }} * 15384) * (1 + (0.016 * (100 - {{ i.relations.val, 'relations' | generic }}))) * (1 - (0.0025 * {{ i.unrest.val, 'unrest' | generic }})) = {{ | calcPurchase }}\n
                      \n `),r.append(`\n
                      \n
                      ${F("civics_gov_relations")}
                      \n
                      ${F("civics_gov_eco_rate")}
                      \n
                      ${F("civics_gov_unrest")}
                      \n
                      \n
                      \n \n
                      \n `),zs({el:"#occupationCalc",data:{i,s},methods:{val(e){i[e].val&&i[e].val<0&&(i[e].val=0),"economic"!==e&&i[e].val>100&&(i[e].val=100)},resetInputs(){i.relations.val=void 0,i.economic.val=void 0,i.unrest.val=void 0}},filters:{generic:(e,t)=>void 0!==e?e:F("civics_gov_"+t),calcAnnex(){if(s.annex.vis=void 0!==i.relations.val&&void 0!==i.unrest.val,s.annex.vis)return s.annex.val=300-i.relations.val-i.unrest.val,s.annex.val},calcPurchase(){if(s.purchase.vis=void 0!==i.relations.val&&void 0!==i.economic.val&&void 0!==i.unrest.val,s.purchase.vis)return s.purchase.val=+(15384*i.economic.val*(1+.016*(100-i.relations.val))*(1-.0025*i.unrest.val)).toFixed(0),s.purchase.val}}})}(Gn(Tn(a,{name:"occupying",template:"mechanics",label:F("wiki_mechanics_occupying"),paragraphs:20,break:[3,8,12,16,18,19,20],h_level:2,para_data:{1:[F("civics_foreign"),F("civics_garrison_tactic_siege"),F("civics_spy_annex"),F("civics_spy_purchase")],2:["+5%","+8%",F("govern_federation")],3:[F("civics_garrison_tactic_siege"),20],5:[F("civics_garrison"),F("civics_garrison_tactic_siege")],6:[F("civics_garrison_unoccupy"),F("tech_unification")],7:[F("govern_federation"),15],8:["50%",F("civics_gov_relations"),"50%",F("civics_gov_unrest"),`(300 - ${F("civics_gov_relations")} - ${F("civics_gov_unrest")})`,F("morale")],9:["50%",F("civics_gov_relations"),"50%",F("civics_gov_unrest"),F("civics_spy_annex")],10:[F("morale"),F("civics_spy_annex")],11:[F("morale_stress"),"1.1x",F("govern_federation")],12:[F("resource_Money_name")],13:[3,F("tech_spy"),F("civics_spy_purchase")],14:[F("wiki_mechanics_occupying_para14_note1",[F("civics_gov_eco_rate"),F("civics_gov_relations"),F("civics_gov_unrest")]),F("resource_Money_name"),F("civics_spy_purchase")],15:[F("civics_garrison_purchase"),F("resource_Money_name"),F("morale_tax"),"20%",F("govern_federation")],16:[F("tech_unification")],17:[F("civics_garrison_occupy")],18:[F("achieve_world_domination_name")],19:[F("achieve_illuminati_name")],20:[F("achieve_syndicate_name")]},data_link:{2:[!1,!1,"wiki.html#government-gameplay-federation"],6:[!1,"wiki.html#early_space-tech-unification2"],7:["wiki.html#government-gameplay-federation"],11:[!1,!1,"wiki.html#government-gameplay-federation"],15:[!1,!1,!1,!1,"wiki.html#government-gameplay-federation"],16:["wiki.html#early_space-tech-unification2"]}}),"mechanics","occupation")),En("add","mechanics-gameplay","occupying",F("wiki_mechanics_occupying")),Tn(a,{name:"religion",template:"mechanics",label:F("wiki_mechanics_religion"),paragraphs:20,break:[3,6,8,15,20],h_level:2,para_data:{1:[F("wiki_mechanics_religion")],3:[F("city_temple")],4:[F("city_temple"),F("resource_Plasmid_plural_name")],5:[F("evo_challenge_plasmid"),F("faith")],6:[F("tech_fanaticism"),F("tech_anthropology")],8:[F("tech_fanaticism"),F("tech_indoctrination"),F("tech_missionary"),F("tech_zealotry")],9:[F("tech_fanaticism")],10:[F("wiki_menu_species")],11:[5],12:[F("tech_indoctrination")],13:[F("tech_missionary")],14:[F("tech_zealotry")],15:[F("tech_anthropology"),F("tech_mythology"),F("tech_archaeology"),F("tech_merchandising")],16:[F("tech_anthropology")],17:[F("tech_mythology")],18:[F("tech_archaeology")],19:[F("tech_merchandising")],20:[F("tab_arpa_crispr"),F("wiki_arpa_crispr_transcendence")]},data_link:{10:["wiki.html#races-species"],20:["wiki.html#crispr-prestige","wiki.html#crispr-prestige-transcendence"]}}),En("add","mechanics-gameplay","religion",F("wiki_mechanics_religion"));{let e=`${Us("star")}`,t=`${Us("star")}`,r=`${Us("star")}`,i=`${Us("star")}`;Tn(a,{name:"challenge",template:"mechanics",label:F("wiki_mechanics_challenge"),paragraphs:15,break:[4,8,14],h_level:2,para_data:{1:[F("wiki_mechanics_challenge"),F("wiki_menu_prehistoric"),F("tab_arpa_crispr"),F("arpa_genepool_hardened_genes_title")],2:[4,F("evo_challenge_plasmid"),F("evo_challenge_trade"),F("evo_challenge_craft"),F("evo_challenge_crispr")],4:[F("evo_challenge_plasmid"),F("resource_Plasmid_plural_name")],5:[F("evo_challenge_trade")],6:[F("evo_challenge_craft")],7:[F("evo_challenge_crispr"),F("wiki_arpa_crispr_creep"),"20%"],8:[F("wiki_mechanics_challenge")],9:[1,e,F("plain"),"5%"],10:[2,t,F("bronze"),"12%"],11:[3,r,F("silver"),"25%"],12:[4,i,F("gold"),"45%"],14:[F("wiki_mechanics_challenge"),e]},data_color:{2:["caution","warning","warning","warning","warning"],7:["warning","warning","caution"],9:["caution",!1,"warning","warning"],10:["caution",!1,"warning","warning"],11:["caution",!1,"warning","warning"],12:["caution",!1,"warning","warning"]},data_link:{1:[!1,!1,"wiki.html#crispr-prestige","wiki.html#crispr-prestige-hardened_genes"],7:[!1,"wiki.html#crispr-prestige-genetic_memory",!1]}}),En("add","mechanics-gameplay","challenge",F("wiki_mechanics_challenge"))}Tn(a,{name:"mastery",template:"mechanics",label:F("mastery"),paragraphs:15,break:[3,8,10,13],h_level:2,para_data:{1:[F("mastery"),F("tab_arpa_crispr"),F("arpa_genepool_unlocked_title")],2:[F("mastery"),F("tab_achieve")],4:["0.15%","0.10%"],5:[1],6:[1,5],7:["1.25%"],9:[F("standard"),"0.25%"],10:[F("arpa_genepool_universal_title"),F("arpa_genepool_standard_title")],11:[F("arpa_genepool_universal_title"),"0.05%","0.10%","0.15%"],12:["0.30%","1.50%"],13:[F("arpa_genepool_standard_title"),"0.05%"],15:[F("arpa_genepool_standard_title"),"0.20%","0.10%"]},data_color:{4:["caution","caution"],5:["caution"],6:["caution","caution"],7:["caution"],9:[!1,"caution"],11:["warning","caution","caution","caution"],12:["caution","caution"],13:["warning","caution"],15:["warning","caution","caution"]},data_link:{1:[!1,"wiki.html#crispr-prestige","wiki.html#crispr-prestige-unlocked"],9:["wiki.html#universes-gameplay"],10:["wiki.html#crispr-prestige-universal","wiki.html#crispr-prestige-standard"]}}),En("add","mechanics-gameplay","mastery",F("mastery")),function(e){let a=$('
                      ');e.append(a);let r=$("
                      "),i=$("
                      ");a.append(r),a.append(i);let s={mutations:{val:void 0},days:{val:void 0}},n={game:{vis:!1,val:void 0},real:{vis:!1,val:void 0}};r.append(`\n
                      \n

                      ${F("wiki_calc_g_decay_game")}

                      \n
                      \n
                      \n (50000000 / (1 + {{ i.mutations.val, 'mutations' | generic }})) - {{ i.days.val, 'days' | generic }} = {{ false | calc }}\n
                      \n
                      \n

                      ${F("wiki_calc_g_decay_real")}

                      \n
                      \n
                      \n {{ s.game.val, 'game' | generic }} / 17280 = {{ true | calc }}\n
                      \n `),i.append(`\n
                      \n
                      ${F("wiki_calc_g_decay_mutations")}
                      \n
                      ${F("wiki_calc_g_decay_days")}
                      \n
                      \n
                      \n \n \n
                      \n `),zs({el:"#genomeDecayCalc",data:{i:s,s:n},methods:{val(e){s[e].val&&s[e].val<0&&(s[e].val=0)},resetInputs(){s.mutations.val=void 0,s.days.val=void 0},importInputs(){s.mutations.val=t.race.mutation,s.days.val=t.stats.days}},filters:{generic:(e,t)=>void 0!==e?e:F("wiki_calc_g_decay_"+t),calc:e=>e?n.real.val:(n.game.vis=void 0!==s.mutations.val&&void 0!==s.days.val,n.real.vis=n.game.vis,n.game.vis?(n.game.val=+(5e7/(1+s.mutations.val)-s.days.val).toFixed(0),n.real.val=+(n.game.val/17280).toFixed(6),n.game.val):(n.game.val=void 0,void(n.real.val=void 0)))}})}(Gn(Tn(a,{name:"genome_decay",template:"mechanics",label:F("wiki_mechanics_genome_decay"),paragraphs:4,break:[3],h_level:2,para_data:{1:[F("wiki_mechanics_genome_decay_para1_note1",[F("wiki_calc_g_decay_mutations")]),F("wiki_mechanics_genome_decay")],2:["2-3"],3:[F("wiki_mechanics_genome_decay"),F("resource_Plasmid_name"),"+0%"],4:[F("tech_genetic_decay"),F("trait_fortify_name"),F("wiki_mechanics_genome_decay"),F("resource_Plasmid_name"),"+0%"]},data_link:{4:["wiki.html#early_space-tech-genetic_decay","wiki.html#traits-species-special_fortify"]}}),"mechanics","g_decay",F("wiki_mechanics_genome_decay"))),En("add","mechanics-gameplay","genome_decay",F("wiki_mechanics_genome_decay")),Tn(a,{name:"crispr_mutation",template:"mechanics",label:F("wiki_mechanics_crispr_mutation"),paragraphs:5,break:[3],h_level:2,para_data:{1:[F("tab_arpa_crispr"),F("arpa_genepool_mutation_title"),F("resource_Plasmid_plural_name")],3:[F("tech_arpa"),F("tab_arpa_genetics")],4:["5x",F("wiki_mechanics_crispr_mutation_para4_note1")],5:[F("wiki_mechanics_custom"),F("race_sludge"),"10x"]},data_link:{1:[!1,"wiki.html#crispr-prestige-mutation","wiki.html#resources-prestige-plasmids"],4:[!1,"wiki.html#traits-species"],5:["wiki.html#custom-species","wiki.html#races-species-sludge"]}}),En("add","mechanics-gameplay","crispr_mutation",F("wiki_mechanics_crispr_mutation"));{let e=Tn(a,{name:"planet",template:"planet",label:F("wiki_menu_planets"),paragraphs:4,h_level:2,para_data:{2:[365,"25%"],3:[4],4:["200-600"]}});Tn(a,{name:"geology",template:"planet",label:F("wiki_menu_planets"),paragraphs:4,h_level:2,para_data:{2:[2],3:["-10%","+19%"],4:[7,"+44%"]}},e),Tn(a,{name:"seeother",template:"planet",label:F("wiki_menu_planets"),paragraphs:1,h_level:2,para_data:{1:[F("wiki_menu_planets")]},data_link:{1:["wiki.html#planets-gameplay"]}},e),En("add","mechanics-gameplay","planet",F("wiki_menu_planets"))}Tn(a,{name:"soul_gem",template:"hell",label:F("wiki_hell_soul_gem"),paragraphs:4,h_level:2,para_data:{1:[F("wiki_hell_soul_gem"),F("tab_portal")],3:[F("tech_demon_attractor")]}}),En("add","mechanics-gameplay","soul_gem",F("wiki_hell_soul_gem"));{let e=Tn(a,{name:"quantum",template:"mechanics",label:F("wiki_mechanics_quantum"),paragraphs:4,h_level:2,para_data:{1:[F("wiki_mechanics_quantum")],2:[F("tech_quantum_computing")],4:[F("interstellar_citadel_title")]},data_link:{2:["wiki.html#deep_space-tech-quantum_computing"],4:["wiki.html#interstellar-structures-citadel"]}});!function(e){let a=$('
                      ');e.append(a),a.append(`

                      ${F("wiki_mechanics_quantum")}

                      `);let r=$("
                      "),i=$("
                      ");a.append(r),a.append(i);let s={knowledge:{val:void 0},citadels:{val:void 0},cores:{val:void 0},supercore:{val:!1},linked:{val:void 0},citizens:{val:void 0}},n={linked:{val:void 0},result:{vis:!1,val:0}};r.append("\n
                      \n (ln(1 + ((1.1 - 1) * {{ i.knowledge.val, 'knowledge' | generic }} / 250000)) / ln(1.1)) * (1 + (0.05 * {{ i.citadels.val, 'citadels' | generic }})) * (2 - (0.99^{{ i.cores.val, 'cores' | generic }})) * 1.25 * {{ s.linked.val, 'linked' | generic }} = {{ | calc }}\n
                      \n "),i.append(`\n
                      \n
                      ${F("wiki_calc_q_level_knowledge")}
                      \n
                      ${F("wiki_calc_q_level_citadels")}
                      \n
                      ${F("wiki_calc_cores")}
                      \n
                      ${F("wiki_calc_q_level_supercore")}
                      \n
                      ${F("trait_linked_name")} \n \n {{ 0 | traitLabel }}\n {{ 0.25 | traitLabel }}\n {{ 0.5 | traitLabel }}\n {{ 1 | traitLabel }}\n {{ 2 | traitLabel }}\n {{ 3 | traitLabel }}\n
                      \n
                      ${F("wiki_calc_citizens")}
                      \n
                      \n
                      \n \n \n
                      \n `),zs({el:"#quantumLevelCalc",data:{i:s,s:n},methods:{val(e){s[e].val&&s[e].val<0&&(s[e].val=0)},pickTrait(e,t){s[t].val=e},resetInputs(){s.knowledge.val=void 0,s.citadels.val=void 0,s.cores.val=void 0,s.supercore.val=!1,s.linked.val=void 0,s.citizens.val=void 0},importInputs(){s.knowledge.val=t.resource.Knowledge.max,s.citadels.val=t.interstellar.citadel?t.interstellar.citadel.on:0,s.cores.val=t.prestige.AICore.count,s.supercore.val=!(!t.space.ai_core2||!t.space.ai_core2.on),s.linked.val=t.race.linked?t.race.linked:0,s.citizens.val=t.resource[t.race.species].amount}},filters:{generic:(e,t)=>void 0!==e?e:F("cores"===t?"wiki_calc_"+t:"wiki_calc_q_level_"+t),traitLabel:e=>void 0===e?F("wiki_calc_trait_undefined"):0===e?F("wiki_calc_trait_unowned"):e,calc(){let e=!0;if(s.linked.val>0)if(void 0!==s.citizens.val){let e=Ki.linked.vars(s.linked.val)[0]/100*s.citizens.val;e>Ki.linked.vars(s.linked.val)[1]/100&&(e-=Ki.linked.vars(s.linked.val)[1]/100,e/=e+200-Ki.linked.vars(s.linked.val)[1],e+=Ki.linked.vars(s.linked.val)[1]/100),n.linked.val=+(1+e).toFixed(4)}else n.linked.val=void 0,e=!1;if(n.result.vis=e&&void 0!==s.knowledge.val&&void 0!==s.citadels.val&&void 0!==s.cores.val,n.result.vis){let e=Math.log(1+(1.1-1)*s.knowledge.val/25e4)/Math.log(1.1)*(1+.05*s.citadels.val)*(2-.99**s.cores.val);return s.supercore.val&&(e*=1.25),n.linked.val&&(e*=n.linked.val),n.result.val=+e.toFixed(4),n.result.val}}}})}(Gn(e,"mechanics","quantum_level",F("wiki_mechanics_quantum"))),En("add","mechanics-gameplay","quantum",F("wiki_mechanics_quantum")),Tn(e,{name:"quantum_swarm_ai",template:"mechanics",label:F("tech_swarm_control_ai"),paragraphs:2,h_level:2,para_data:{1:[F("tech_quantum_computing"),F("space_sun_swarm_satellite_title"),F("space_sun_swarm_control_title")],2:[F("space_sun_swarm_control_title"),11,F("wiki_mechanics_quantum")]},data_link:{1:["wiki.html#deep_space-tech-swarm_control_ai","wiki.html#space-structures-swarm_satellite","wiki.html#space-structures-swarm_control"]}}),Tn(e,{name:"quantum_swarm",template:"mechanics",label:F("tech_quantum_swarm"),paragraphs:3,h_level:2,para_data:{1:[F("tech_quantum_swarm"),F("space_hell_swarm_plant_title")],2:["1%"],3:["95%"]},data_link:{1:["wiki.html#deep_space-tech-quantum_swarm","wiki.html#space-structures-swarm_plant"]}}),Tn(e,{name:"quantum_manufacture",template:"mechanics",label:F("tech_quantum_manufacturing"),paragraphs:4,break:[2,3,4],h_level:2,para_data:{1:[F("tech_quantum_manufacturing"),F("city_factory"),F("wiki_mechanics_quantum")],2:[F("modal_factory_lux")],3:[F("resource_Furs_name"),"(Q Level - 1) * 12.5"],4:["(Q Level - 1) * 50"]},data_link:{1:["wiki.html#deep_space-tech-quantum_manufacturing","wiki.html#planetary-structures-factory",!1]}}),Tn(e,{name:"quantum_cement_processing",template:"mechanics",label:F("tech_cement_processing"),paragraphs:2,break:[2],h_level:2,para_data:{1:[F("tech_cement_processing"),F("interstellar_citadel_title")],2:["(Q Level / 1.75) %"]},data_link:{1:["wiki.html#interstellar-tech-cement_processing","wiki.html#interstellar-structures-citadel"]}}),Tn(e,{name:"quantum_graph_processing",template:"mechanics",label:F("tech_graphene_processing"),paragraphs:2,break:[2],h_level:2,para_data:{1:[F("tech_graphene_processing"),F("interstellar_citadel_title")],2:["(Q Level / 5) %"]},data_link:{1:["wiki.html#intergalactic-tech-graphene_processing","wiki.html#interstellar-structures-citadel"]}}),Tn(e,{name:"quantum_ai_logistics",template:"mechanics",label:F("tech_ai_logistics"),paragraphs:3,break:[3],h_level:2,para_data:{1:[F("tech_ai_logistics"),F("interstellar_cargo_yard_title"),F("city_shed_title3")],2:[F("city_shed_title3")],3:[F("wiki_mechanics_quantum")]},data_link:{1:["wiki.html#interstellar-tech-ai_logistics","wiki.html#interstellar-structures-cargo_yard","wiki.html#interstellar-structures-warehouse"]}}),Tn(e,{name:"quantum_arcology",template:"mechanics",label:F("portal_arcology_title"),paragraphs:1,h_level:2,para_data:{1:[F("portal_arcology_title"),10]},data_link:{1:["wiki.html#hell-structures-arcology",!1]}})}!function(e){let a=$('
                      ');e.append(a);let r=$("
                      "),i=$("
                      ");a.append(r),a.append(i);let s=["Food","Lumber","Chrysotile","Stone","Crystal","Furs","Copper","Iron","Aluminium","Cement","Coal","Oil","Uranium","Steel","Titanium","Alloy","Polymer","Iridium","Helium_3","Deuterium","Neutronium","Adamantite","Infernite","Elerium","Nano_Tube","Graphene","Stanene","Bolognium","Vitreloy","Orichalcum","Plywood","Brick","Wrought_Iron","Sheet_Metal","Mythril","Aerogel","Nanoweave","Scarletite"],n={result:{vis:!1,kt:void 0,solar:void 0,MW:void 0,exoVis:!1,exotic:void 0,MWVis:!1,MWTot:void 0,timeVis:!1,timeTot:void 0}},c={solar_tot:{val:void 0},exotic_tot:{val:void 0},grav:{val:!0}},o=$("
                      "),l=$("
                      "),_=!0;i.append(o),s.forEach((function(e){_||l.append(" + "),_=!1,c[e]={val:void 0},o.append(`\n
                      ${F("resource_"+e+"_name")}
                      \n `),l.append(`({{ i.${e}.val, '${e}' | generic }} * ${Aa[e]})`)})),l.append(" = {{ true, 'kt' | calc }}"),r.append(`\n
                      \n

                      ${F("wiki_calc_mass_kt")}

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

                      ${F("wiki_calc_mass_solar")}

                      \n
                      \n
                      \n {{ s.result.kt, 'kt' | generic }} / 10000000000 = {{ false, 'solar' | calc }}\n
                      \n
                      \n

                      ${F("wiki_calc_mass_exotic")}

                      \n
                      \n
                      \n (({{ i.Infernite.val, 'Infernite' | generic }} * 222.666) + ({{ i.Elerium.val, 'Elerium' | generic }} * 297.115)) / 10000000000 = {{ | calcExotic }}\n
                      \n
                      \n

                      ${F("wiki_calc_mass_MW")}

                      \n
                      \n
                      \n ({{ s.result.solar, 'solar' | generic }} * {{ false | amountMW }}) + ({{ s.result.exotic, 'exotic' | generic }} * {{ true | amountMW }}) = {{ false, 'MW' | calc }}\n
                      \n
                      \n

                      ${F("wiki_calc_mass_MW_tot")}

                      \n
                      \n
                      \n 20 + (({{ i.solar_tot.val, 'solar_tot' | generic }} - 8) * {{ false | amountMW }}) + ({{ i.exotic_tot.val, 'exotic_tot' | generic }} * {{ true | amountMW }}) = {{ | calcMW }}\n
                      \n
                      \n

                      ${F("wiki_calc_mass_time_to_explode")}

                      \n
                      \n
                      \n (0.025 - {{ i.exotic_tot.val, 'exotic_tot' | generic }}) / {{ s.result.exotic, 'exotic' | generic }} = {{ | calcTime }}\n
                      \n `),i.append(`\n
                      \n
                      ${F("wiki_calc_mass_solar_tot")}
                      \n
                      ${F("wiki_calc_mass_exotic_tot")}
                      \n
                      ${F("tech_gravity_convection")}
                      \n
                      \n
                      \n \n \n
                      \n `),zs({el:"#massCalc",data:{i:c,s:n},methods:{val(e){"solar_tot"===e?c[e].val&&c[e].val<8&&(c[e].val=8):c[e].val&&c[e].val<0&&(c[e].val=0)},resetInputs(){s.forEach((function(e){c[e].val=void 0})),c.solar_tot.val=void 0,c.exotic_tot.val=void 0,c.grav.val=!0},importInputs(){t.interstellar.mass_ejector?s.forEach((function(e){c[e].val=t.interstellar.mass_ejector[e]})):s.forEach((function(e){c[e].val=0})),c.solar_tot.val=t.interstellar.stellar_engine?t.interstellar.stellar_engine.mass:8,t.tech.roid_eject&&(c.solar_tot.val+=.225*t.tech.roid_eject*(1+t.tech.roid_eject/12)),c.exotic_tot.val=t.interstellar.stellar_engine?t.interstellar.stellar_engine.exotic:0,c.grav.val=t.tech.gravity&&t.tech.gravity>=2}},filters:{generic(e,t){if(void 0!==e)return e;switch(t){case"kt":case"solar":case"solar_tot":case"exotic":case"exotic_tot":case"MW":return F("wiki_calc_mass_"+t);default:return F("resource_"+t+"_name")+"/s"}},amountMW:e=>(c.grav.val?13.5:7.5)*(e?10:1),calc(e,t){if(e){let e=!0;if(s.forEach((function(t){e&&void 0===c[t].val&&(e=!1)})),n.result.vis=e,n.result.vis){let e=0;s.forEach((function(t){e+=c[t].val*Aa[t]})),n.result.kt=+e.toFixed(4),n.result.solar=+(e/1e10).toFixed(10),n.result.MW=+(n.result.solar*(c.grav.val?13.5:7.5)+n.result.exotic*(c.grav.val?135:75)).toFixed(10)}else n.result.kt=void 0,n.result.solar=void 0,n.result.mw=void 0}return n.result[t]},calcExotic(){if(void 0!==c.Infernite.val&&void 0!==c.Elerium.val)return n.result.exoVis=!0,n.result.exotic=+((c.Infernite.val*Aa.Infernite+c.Elerium.val*Aa.Elerium)/1e10).toFixed(10),n.result.exotic;n.result.exoVis=!1,n.result.exotic=void 0},calcMW(){if(void 0!==c.solar_tot.val&&void 0!==c.exotic_tot.val)return n.result.MWVis=!0,n.result.MWTot=+((c.solar_tot.val-8)*(c.grav.val?13.5:7.5)+c.exotic_tot.val*(c.grav.val?135:75)+20).toFixed(10),n.result.MWTot;n.result.MWVis=!1,n.result.MWTot=void 0},calcTime(){if(void 0!==c.exotic_tot.val&&n.result.exoVis)return n.result.timeVis=!0,c.exotic_tot.val>=.025?n.result.timeTot=F("wiki_calc_mass_time_reached"):0===n.result.exotic?n.result.timeTot=F("time_never"):n.result.timeTot=Fs(Math.round((.025-c.exotic_tot.val)/n.result.exotic)),n.result.timeTot;n.result.timeVis=!1,n.result.timeTot=void 0}}})}(Gn(Tn(a,{name:"mass",template:"mechanics",label:F("wiki_mechanics_mass"),paragraphs:11,break:[5,9],h_level:2,para_data:{1:[F("tab_interstellar")],2:[F("tech_mass_ejector"),F("interstellar_mass_ejector"),F("tab_ejector")],4:[1e10.toLocaleString()],5:[F("universe_magic"),F("resource_Infernite_name"),F("resource_Elerium_name")],6:[.025,F("tech_stabilize_blackhole"),F("tech_exotic_infusion")],7:[F("tech_stabilize_blackhole"),0,40,F("tech_exotic_infusion"),F("wiki_resets_blackhole")],8:[F("tech_stabilize_blackhole"),.025],9:[F("interstellar_stellar_engine"),20,8],10:[1,7.5,F("interstellar_stellar_engine"),13.5,F("tech_gravity_convection")],11:[10]},data_link:{2:["wiki.html#interstellar-tech-mass_ejector","wiki.html#interstellar-structures-mass_ejector"],6:[!1,"wiki.html#interstellar-tech-stabilize_blackhole","wiki.html#interstellar-tech-infusion_confirm"],7:["wiki.html#interstellar-tech-stabilize_blackhole",!1,!1,"wiki.html#interstellar-tech-infusion_confirm","wiki.html#resets-prestige-blackhole"],8:["wiki.html#interstellar-tech-stabilize_blackhole"],9:["wiki.html#interstellar-structures-stellar_engine"],10:[!1,!1,"wiki.html#interstellar-structures-stellar_engine",!1,"wiki.html#interstellar-tech-gravity_convection"]}}),"eject","mass")),En("add","mechanics-gameplay","mass",F("wiki_mechanics_mass"));{let e=Tn(a,{name:"piracy",template:"mechanics",label:F("galaxy_piracy"),paragraphs:6,break:[4],h_level:2,para_data:{1:[F("galaxy_piracy"),F("wiki_menu_intergalactic")],2:[F("galaxy_embassy")],4:[F("tab_galactic"),F("galaxy_piracy"),F("galaxy_stargate")],5:[F("interstellar_stargate")]}});Tn(a,{name:"pirate_ramp",template:"mechanics",label:F("galaxy_piracy"),paragraphs:3,h_level:2,para_data:{1:[F("galaxy_stargate"),F("galaxy_gateway")],2:[F("tab_galactic")],3:[F("galaxy_embassy"),F("tech_xeno_gift"),F("galaxy_alien2_mission",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red])]}},e),Tn(a,{name:"pirate_threat",template:"mechanics",label:F("galaxy_piracy"),paragraphs:7,break:[2,3,4,5,6,7],h_level:2,para_data:{1:[F("galaxy_armada")],2:[F("galaxy_gateway"),100,250,500],3:[F("galaxy_stargate"),100,250,500],4:[F("galaxy_gorddon"),800],5:[F("galaxy_alien",[Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].home]),1e3],6:[F("galaxy_alien",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red]),2500],7:[F("galaxy_chthonian"),7500]},data_color:{2:["caution","warning","warning","warning"],3:["caution","warning","warning","warning"],4:["caution","warning"],5:["caution","warning"],6:["caution","warning"],7:["caution","warning"]}},e),En("add","mechanics-gameplay","piracy",F("galaxy_piracy"))}!function(e){let a=$('
                      ');e.append(a),a.append(`

                      ${F("wiki_calc_bonuses",[F("trait_untapped_name")])}

                      `);let r=$("
                      "),i=$("
                      ");a.append(r),a.append(i);let s={genes:{val:void 0}},n={result:{vis:!1,val:0}};r.append('\n
                      \n ({{ i.genes.val | generic }} / ({{ i.genes.val | generic }} + 20) / 10) + 0.00024 = {{ false | calc }} = +{{ true | calc }}%\n
                      \n '),i.append(`\n
                      \n
                      ${F("resource_Genes_name")}
                      \n
                      \n
                      \n \n \n
                      \n `),zs({el:"#untappedPotentialCalc",data:{i:s,s:n},methods:{val(e){s[e].val&&s[e].val<0&&(s[e].val=0)},resetInputs(){s.genes.val=void 0},importInputs(){s.genes.val=t.custom?rn({genus:t.custom.race0.genus,traitlist:t.custom.race0.traits}):0}},filters:{generic:e=>void 0!==e?e:F("resource_Genes_name"),calc:e=>e?(100*n.result.val).toFixed(3):(n.result.vis=s.genes.val,n.result.vis?(n.result.val=+(s.genes.val/(s.genes.val+20)/10+24e-5).toFixed(5),n.result.val):void 0)}})}(Gn(Tn(a,{name:"custom",template:"mechanics",label:F("wiki_mechanics_custom"),paragraphs:12,break:[3,5,9,11],h_level:2,para_data:{1:[F("wiki_resets_ascension")],2:[F("wiki_resets_ascension")],5:[F("resource_Genes_name")],6:[F("resource_Genes_name")],7:[2],8:[F("achieve_technophobe_name"),5,7],9:[F("tech_fanaticism"),F("tech_deify")],11:[0,F("resource_Genes_name")],12:[F("resource_Genes_name"),F("trait_untapped_name")]},data_link:{1:["wiki.html#resets-prestige-ascension"],2:["wiki.html#resets-prestige-ascension"],8:["wiki.html#perks-prestige-technophobe"],9:[t.genes.transcendence?"wiki.html#civilized-tech-alt_fanaticism":"wiki.html#civilized-tech-fanaticism","wiki.html#early_space-tech-deify"]}}),"mechanics","untapped",F("trait_untapped_name"))),En("add","mechanics-gameplay","custom",F("wiki_mechanics_custom"));{let e=Tn(a,{name:"pillar",template:"hell",label:F("wiki_mechanics_pillar"),paragraphs:5,h_level:2,para_data:{1:[F("portal_ruins_name")],2:["1%",F("harmonic")],3:["3%"],4:[F("harmonic"),"2%","6%"],5:[F("wiki_hell_pillar_para5d1"),12]},data_link:{5:["wiki.html#hell-structures-west_tower"]}});Tn(a,{name:"pillar",template:"mechanics",label:F("wiki_mechanics_pillar"),paragraphs:10,break:[4,6,8],h_level:2,para_data:{1:[F("tech_pillars"),F("resource_Harmony_name"),F("resource_Scarletite_name")],2:[F("resource_Scarletite_name"),1e6.toLocaleString(),125e3.toLocaleString()],3:[F("universe_micro")],4:[F("evo_challenge_genes"),F("harmonic")],5:[F("tech_scarletite"),F("evo_challenge_genes")],6:[F("achieve_resonance_name")],7:[F("achieve_resonance_name"),F("tech_scarletite")],8:[F("race_junker"),F("wiki_mechanics_custom"),F("achieve_enlightenment_name"),F("race_sludge")],9:[F("wiki_mechanics_custom")],10:[F("race_junker"),F("genelab_genus_humanoid"),F("race_sludge")]},data_link:{1:["wiki.html#dimensional-tech-pillars"],3:["wiki.html#universes-gameplay-micro"],5:["wiki.html#dimensional-tech-scarletite"],7:[!1,"wiki.html#dimensional-tech-scarletite"],8:["wiki.html#races-species-junker","wiki.html#mechanics-gameplay-custom",!1,"wiki.html#races-species-sludge"],9:["wiki.html#mechanics-gameplay-custom"],10:["wiki.html#races-species-junker",!1,"wiki.html#races-species-sludge"]}},e),En("add","mechanics-gameplay","pillar",F("wiki_mechanics_pillar"))}{let e=Tn(a,{name:"dlord",template:"mechanics",label:F("wiki_mechanics_dlord"),paragraphs:5,h_level:2,para_data:{1:[F("portal_waygate_title")],2:[F("resource_Demonic_Essence_name"),F("wiki_resets_infusion")],3:[F("wiki_resets_infusion"),"+1"],4:["+25%",F("wiki_resets_infusion")],5:[F("tech_dark_bomb"),F("wiki_resets_infusion")]},data_link:{1:["wiki.html#hell-structures-waygate"],2:[!1,"wiki.html#resets-prestige-infusion"],3:["wiki.html#resets-prestige-infusion"],4:[!1,"wiki.html#resets-prestige-infusion"],5:["wiki.html#dimensional-tech-dark_bomb","wiki.html#resets-prestige-infusion"]}});e.append(`\n

                      ${F("wiki_mechanics_dlord_str")}

                      \n `),Object.keys(Qt).forEach((function(a){let r=t.stats.spire[qn(a)]&&t.stats.spire[qn(a)].dlstr?F("wiki_mechanics_dlord_str_empowered",[t.stats.spire[qn(a)].dlstr]):F("wiki_mechanics_dlord_str_not_empowered");e.append(`\n
                      \n ${F("universe_"+a)}: ${r}\n
                      \n `)})),En("add","mechanics-gameplay","dlord",F("wiki_mechanics_dlord"))}{let e=Tn(a,{name:"syndicate",template:"mechanics",label:F("wiki_mechanics_syndicate"),paragraphs:2,h_level:2,para_data:{1:[F("wiki_mechanics_syndicate"),F("wiki_challenges_scenarios_truepath"),F("wiki_mechanics_syndicate_para1_note1"),F("tech_shipyard",[Di[t.race.species?t.race.species:human].solar.dwarf])],2:[F("galaxy_piracy"),F("tab_galactic")]},data_link:{1:[!1,"wiki.html#challenges-gameplay-scenarios_truepath","wiki.html#progress-events-syndicate","wiki.html#solar-tp_tech-shipyard"],2:["wiki.html#mechanics-gameplay-piracy"]}}),r=Tn(e,{name:"syndicate_influence",template:"mechanics",label:F("wiki_mechanics_syndicate_influence"),paragraphs:3,break:[3],h_level:2,para_data:{1:[0],2:[F("space_mission_title",[Dn("triton")]),F("tech_data_analysis")],3:["1/10",1,Dn("triton"),"1/5"]},data_link:{2:["wiki.html#space-tp_structures-triton_mission","wiki.html#solar-tp_tech-data_analysis"]}});{let e=Bn(r,"mechanics","syndicate_influence_current",F("wiki_mechanics_syndicate_influence_current"));["moon","red","gas","gas_moon","belt","titan","enceladus","triton","kuiper","eris"].forEach((function(a){let r=t.space.syndicate&&t.space.syndicate["spc_"+a]?t.space.syndicate["spc_"+a]:0;e.append(`
                      ${Dn(a)}: ${r}`)}))}!function(e){let a=$('
                      ');e.append(a),a.append(`

                      ${F("wiki_calc_syndicate_caps")}

                      `);let r=$("
                      "),i=$("
                      ");a.append(r),a.append(i);let s={triton1:{val:!1},outer4:{val:!1}},n="";["moon","red","gas","gas_moon","belt","titan","enceladus","triton","kuiper","eris"].forEach((function(e){n+=`\n
                      \n ${Dn(e)}: {{ '${e}' | calc }}\n
                      \n `})),r.append(n),i.append(`\n
                      \n
                      ${F("space_mission_title",[Dn("triton")])}
                      \n
                      ${F("tech_data_analysis")}
                      \n
                      \n
                      \n \n \n
                      \n `),zs({el:"#syndicateCapCalc",data:{i:s},methods:{resetInputs(){s.triton1.val=!1,s.outer4.val=!1},importInputs(){s.triton1.val=t.tech.triton&&t.tech.triton>=1,s.outer4.val=t.tech.outer&&t.tech.outer>=4}},filters:{calc(e){switch(e){case"titan":return s.triton1.val?s.outer4.val?2e3:1e3:600;case"enceladus":return s.triton1.val?s.outer4.val?1500:1e3:600;case"triton":return s.triton1.val&&s.outer4.val?5e3:3e3;case"kuiper":return 2500;case"eris":return 7500;default:return 500}}}})}(Gn(r,"mechanics","syndicate_cap")),function(e){let a=$('
                      ');e.append(a);let r=$("
                      "),i=$("
                      ");a.append(r),a.append(i);let s={region:{val:void 0},relations:{val:void 0,vis:!1,alliance:!1,war:!1},triton1:{val:!1,vis:!1},outer4:{val:!1,vis:!1},ship_security:{val:void 0},base:{val:void 0,vis:!1},sam:{val:void 0,vis:!1},fob:{val:!1,vis:!1},intel:{val:void 0},syndicate:{val:void 0}},n={divisor:{vis:!1,val:void 0},region_security:{vis:!1,val:void 0},residual:{vis:!1,val:void 0},penalty:{vis:!1,val:void 0}};r.append(`\n
                      \n

                      ${F("wiki_calc_syndicate_penalty_divisor")}

                      - {{ i.relations.val | relationsType}}

                      \n
                      \n
                      \n {{ i.region.val | divisorBase }} + (25 * ({{ i.relations.val, 'relations' | generic }} - 90)) + (13 * ({{ i.relations.val, 'relations' | generic }} - 40)) = {{ | calcDivisor }}\n
                      \n
                      \n

                      ${F("wiki_calc_syndicate_penalty_region_security")}

                      \n
                      \n
                      \n ({{ i.ship_security.val, 'ship_security' | generic }} + (50 * {{ i.base.val, 'base' | generic }}) + (25 * {{ i.sam.val, 'sam' | generic }}) + 500) * ({{ i.intel.val, 'intel' | generic }} / 100) = {{ | calcSecurity }}\n
                      \n
                      \n

                      ${F("wiki_calc_syndicate_penalty_residual")}

                      \n
                      \n
                      \n {{ i.syndicate.val, 'syndicate' | generic }} - {{ s.region_security.val, 'region_security' | generic }} = {{ | calcResidual }}\n
                      \n
                      \n

                      ${F("wiki_mechanics_syndicate_penalty")}

                      \n
                      \n
                      \n {{ s.residual.val, 'residual' | generic }} / {{ s.divisor.val, 'divisor' | generic }} = {{ false | calcPenalty }} = -{{ true | calcPenalty }}%\n
                      \n `),i.append(`\n
                      \n
                      \n
                      \n ${F("wiki_calc_syndicate_penalty_region")}\n
                      \n
                      \n \n \n {{ 'moon' | regionLabel }}\n {{ 'red' | regionLabel }}\n {{ 'gas' | regionLabel }}\n {{ 'gas_moon' | regionLabel }}\n {{ 'belt' | regionLabel }}\n {{ 'titan' | regionLabel }}\n {{ 'enceladus' | regionLabel }}\n {{ 'triton' | regionLabel }}\n {{ 'kuiper' | regionLabel }}\n {{ 'eris' | regionLabel }}\n \n
                      \n
                      \n
                      ${F("wiki_calc_syndicate_penalty_rival_relations")}
                      \n
                      ${F("space_mission_title",[Dn("triton")])}
                      \n
                      ${F("tech_data_analysis")}
                      \n
                      ${F("wiki_calc_syndicate_penalty_ship_security")}
                      \n
                      ${F("tech_operating_base")}
                      \n
                      ${F("space_sam_title")}
                      \n
                      ${F("space_fob_title")}
                      \n
                      ${F("space_scan_effectiveness")}
                      \n
                      ${F("space_syndicate")}
                      \n
                      \n
                      \n \n \n
                      \n `);let c=function(e){switch(e){case"titan":return s.triton1.val?s.outer4.val?2e3:1e3:600;case"enceladus":return s.triton1.val?s.outer4.val?1500:1e3:600;case"triton":return s.triton1.val&&s.outer4.val?5e3:3e3;case"kuiper":return 2500;case"eris":return 7500;default:return 500}};zs({el:"#syndicatePenaltyCalc",data:{i:s,s:n},methods:{val(e){s[e].val&&s[e].val<0&&(s[e].val=0),"relations"===e?s[e].val>100&&(s[e].val=100):"syndicate"===e&&s.region.val&&s[e].val>c(s.region.val)&&(s[e].val=c(s.region.val))},pickRegion(e){s.region.val=e,s.relations.vis=["moon","red","gas","gas_moon","belt"].includes(e),s.triton1.vis=["titan","enceladus","triton"].includes(e),s.syndicate.val&&s.syndicate.val>c(e)&&(s.syndicate.val=c(e)),s.base.vis="enceladus"===e,s.sam.vis="titan"===e,s.fob.vis="triton"===e},resetInputs(){s.region={val:void 0},s.relations={val:void 0,vis:!1,alliance:!1,war:!1},s.triton1={val:!1,vis:!1},s.outer4={val:!1,vis:!1},s.ship_security={val:void 0},s.base={val:void 0,vis:!1},s.sam={val:void 0,vis:!1},s.fob={val:!1,vis:!1},s.intel={val:void 0},s.syndicate={val:void 0}},importInputs(){t.civic.foreign&&t.civic.foreign.gov3&&(s.relations.val=100-t.civic.foreign.gov3.hstl),s.relations.alliance=s.relations.val>90,s.relations.war=s.relations.val<40,s.relations.vis=s.region.val&&["moon","red","gas","gas_moon","belt"].includes(s.region.val),s.triton1.vis=s.region.val&&["titan","enceladus","triton"].includes(s.region.val),s.triton1.val=t.tech.triton&&t.tech.triton>=1,s.outer4.val=t.tech.outer&&t.tech.outer>=4,s.region.val&&t.space.hasOwnProperty("shipyard")&&t.space.shipyard.hasOwnProperty("ships")&&(s.ship_security.val=0,s.intel.val=0,t.space.shipyard.ships.forEach((function(e){if(e.location==="spc_"+s.region.val&&0===e.transit&&e.fueled){let t=rt(e);s.ship_security.val+=e.damage>0?Math.round(t*(100-e.damage)/100):t,s.intel.val+=dt(e)}})),"triton"===s.region.val&&t.space.fob&&t.space.fob.on>0&&(s.intel.val+=10),s.intel.val=(Math.round((s.intel.val-100)/(s.intel.val-100+200)*100)+100+25)/1.25,s.syndicate.val=t.space.syndicate&&t.space.syndicate["spc_"+s.region.val]?t.space.syndicate["spc_"+s.region.val]:0),s.base.val=t.space.operating_base?t.space.operating_base.on:0,s.base.vis=s.region.val&&"enceladus"===s.region.val,s.sam.val=t.space.sam?t.space.sam.on:0,s.sam.vis=s.region.val&&"titan"===s.region.val,s.fob.val=t.space.fob&&t.space.fob.on>0,s.fob.vis=s.region.val&&"triton"===s.region.val}},filters:{generic(e,t){if(void 0!==e)return e;switch(t){case"base":return F("tech_operating_base");case"sam":case"fob":return F("space_"+t+"_title");case"intel":return F("space_scan_effectiveness");case"relations":return F("wiki_calc_syndicate_penalty_rival_relations");case"syndicate":return F("space_syndicate");default:return F("wiki_calc_syndicate_penalty_"+t)}},regionLabel:e=>e?Dn(e):F("wiki_calc_syndicate_penalty_region"),relationsType:e=>(e>90?(s.relations.alliance=!0,s.relations.war=!1):e<40?(s.relations.war=!0,s.relations.alliance=!1):(s.relations.war=!1,s.relations.alliance=!1),F(e<40?"wiki_calc_syndicate_penalty_rival_war":e>90?"wiki_calc_syndicate_penalty_rival_ally":"wiki_calc_syndicate_penalty_rival_neutral")),divisorBase(e){if(!e)return F("wiki_calc_syndicate_penalty_region_divisor_base");switch(e){case"moon":case"red":return 1250;case"gas":case"gas_moon":case"belt":return 1020;default:return c(e)}},calcDivisor(){if(s.region.val)if(["moon","red","gas","gas_moon","belt"].includes(s.region.val))if((s.relations.war||s.relations.alliance)&&void 0===s.relations.val)n.divisor.val=void 0,n.divisor.vis=!1;else{let e=0,t=["moon","red"].includes(s.region.val)?1250:1020;s.relations.war?e=13*(s.relations.val-40):s.relations.alliance&&(e=25*(s.relations.val-90)),n.divisor.val=t+e,n.divisor.vis=!0}else n.divisor.val=c(s.region.val),n.divisor.vis=!0;else n.divisor.val=void 0,n.divisor.vis=!1;return n.divisor.val},calcSecurity(){let e=0,t=void 0!==s.ship_security.val&&void 0!==s.intel.val;if(t){if(e+=s.ship_security.val,s.region.val)switch(s.region.val){case"enceladus":void 0!==s.base.val?e+=50*s.base.val:t=!1;break;case"titan":void 0!==s.sam.val?e+=25*s.sam.val:t=!1;break;case"triton":s.fob.val&&(e+=500)}t?(n.region_security.val=Math.round(e*(s.intel.val/100)),n.region_security.vis=t):(n.region_security.val=void 0,n.region_security.vis=!1)}else n.region_security.val=void 0,n.region_security.vis=!1;return n.region_security.val},calcResidual(){if(void 0!==s.syndicate.val&&void 0!==n.region_security.val){let e=s.syndicate.val-n.region_security.val;e<0&&(e=0),n.residual.val=e,n.residual.vis=!0}else n.residual.val=void 0,n.residual.vis=!1;return n.residual.val},calcPenalty:e=>e?(100*n.penalty.val).toFixed(2):(n.penalty.vis=void 0!==n.residual.val&&void 0!==n.divisor.val,n.penalty.vis?n.penalty.val=+(n.residual.val/n.divisor.val).toFixed(4):n.penalty.val=void 0,n.penalty.val)}})}(Gn(Tn(e,{name:"syndicate_penalty",template:"mechanics",label:F("wiki_mechanics_syndicate_penalty"),paragraphs:6,break:[2,4,5],h_level:2,para_data:{1:[F("galaxy_piracy"),F("portal_ruins_security")],2:[Dn("titan")],3:[F("civics_gov_relations"),F("wiki_mechanics_rival")],5:[F("galaxy_armada"),F("tab_galactic"),F("portal_ruins_security")],6:[F("portal_ruins_security"),F("firepower"),F("outer_shipyard_hull"),F("space_scan_effectiveness")]},data_link:{1:["wiki.html#mechanics-gameplay-piracy"]}}),"mechanics","syndicate_penalty",F("wiki_mechanics_syndicate_penalty"))),En("add","mechanics-gameplay","syndicate",F("wiki_mechanics_syndicate"))}{let e=Tn(a,{name:"tp_ships",template:"mechanics",label:F("wiki_mechanics_tp_ships"),paragraphs:2,h_level:2,para_data:{1:[F("outer_shipyard_title"),F("tab_shipyard"),F("tab_civics")],2:[F("tab_galactic"),F("galaxy_piracy")]},data_link:{1:["wiki.html#space-tp_structures-shipyard"],2:[!1,"wiki.html#mechanics-gameplay-piracy"]}});!function(e){let a=$('
                      ');e.append(a);let r=$("
                      "),i=$("
                      "),s=$("
                      ");a.append(r),a.append(i),a.append(s);let n={owned:{val:void 0},class:{val:void 0},power:{val:void 0},weapon:{val:void 0},armor:{val:void 0},engine:{val:void 0},sensor:{val:void 0}},c={Money:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Aluminium:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Adamantite:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Steel:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Alloy:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Neutronium:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Titanium:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Copper:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Orichalcum:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Iridium:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Iron:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Nano_Tube:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Quantium:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1}},o={exp1:{val:void 0},exp2:{val:void 0},creep:{val:void 0}};r.append(`\n
                      \n
                      \n

                      ${F("wiki_calc_tp_ships_costs_base_costs")}

                      \n
                      \n
                      \n

                      ${F("resource_Money_name")}:

                      {{ i.class.val, 'class', 'Money' | getBase }}^{{ i.sensor.val, 'sensor', 'Money' | getExponent }} = {{ 'Money' | calcPre }}\n
                      \n
                      \n

                      ${F("resource_Aluminium_name")}:

                      {{ i.class.val, 'class', 'Aluminium' | getBase }} = {{ 'Aluminium' | calcPre }}\n
                      \n
                      \n

                      ${F("resource_Adamantite_name")}:

                      {{ i.class.val, 'class', 'Adamantite' | getBase }} = {{ 'Adamantite' | calcPre }}\n
                      \n
                      \n

                      ${F("resource_Steel_name")}:

                      {{ i.armor.val, 'armor', 'Steel' | getBase }}^{{ s.exp1.val, 'exp1' | generic }} = {{ 'Steel' | calcPre }}\n
                      \n
                      \n

                      ${F("resource_Alloy_name")}:

                      {{ i.armor.val, 'armor', 'Alloy' | getBase }}^{{ s.exp1.val, 'exp1' | generic }} = {{ 'Alloy' | calcPre }}\n
                      \n
                      \n

                      ${F("resource_Neutronium_name")}:

                      {{ i.armor.val, 'armor', 'Neutronium' | getBase }}^{{ s.exp1.val, 'exp1' | generic }} = {{ 'Neutronium' | calcPre }}\n
                      \n
                      \n

                      ${F("resource_Titanium_name")}:

                      {{ i.engine.val, 'engine', 'Titanium' | getBase }}^{{ s.exp2.val, 'exp2' | generic }} * 5 = {{ 'Titanium' | calcPre }}\n
                      \n
                      \n

                      ${F("resource_Copper_name")}:

                      {{ i.power.val, 'power', 'Copper' | getBase }}^{{ s.exp1.val, 'exp1' | generic }} = {{ 'Copper' | calcPre }}\n
                      \n
                      \n

                      ${F("resource_Orichalcum_name")}:

                      {{ i.power.val, 'power', 'Orichalcum' | getBase }}^{{ s.exp1.val, 'exp1' | generic }} = {{ 'Orichalcum' | calcPre }}\n
                      \n
                      \n

                      ${F("resource_Iridium_name")}:

                      ({{ i.power.val, 'power', 'Iridium' | getBase }}^{{ s.exp2.val, 'exp2' | generic }})^{{ i.weapon.val, 'weapon', 'Iridium' | getExponent }} * 50 = {{ 'Iridium' | calcPre }}\n
                      \n
                      \n

                      ${F("resource_Iron_name")}:

                      {{ i.weapon.val, 'weapon', 'Iron' | getBase }}^{{ s.exp1.val, 'exp1' | generic }} * 10 = {{ 'Iron' | calcPre }}\n
                      \n
                      \n

                      ${F("resource_Nano_Tube_name")}:

                      {{ i.weapon.val, 'weapon', 'Nano_Tube' | getBase }}^{{ s.exp1.val, 'exp1' | generic }} = {{ 'Nano_Tube' | calcPre }}\n
                      \n
                      \n

                      ${F("resource_Quantium_name")}:

                      {{ i.weapon.val, 'weapon', 'Quantium' | getBase }}^{{ s.exp1.val, 'exp1' | generic }} = {{ 'Quantium' | calcPre }}\n
                      \n
                      \n `);let l='\n
                      \n
                      \n

                      {{ i.owned.val, i.class.val | finalLabel }}

                      \n
                      \n ';["Money","Aluminium","Adamantite","Steel","Alloy","Neutronium","Titanium","Copper","Orichalcum","Iridium","Iron","Nano_Tube","Quantium"].forEach((function(e){l+=`\n
                      \n

                      ${F("resource_"+e+"_name")}:

                      {{ r.${e}.preVal, 'base' | generic }} * 0.750.9(1 + ({{ i.owned.val, 'owned' | generic }} - 2) / 25 * {{ s.creep.val, 'creep' | generic }})3 * (1 + {{ i.owned.val, 'owned' | generic }}) = {{ '${e}' | calcFinal }}\n
                      \n `})),l+="
                      ",i.append(l),s.append(`\n
                      \n
                      ${F("wiki_calc_tp_ships_costs_owned")}
                      \n
                      \n
                      \n ${F("outer_shipyard_class")}\n
                      \n
                      \n \n \n {{ 'class', 'corvette' | genericLabel }}\n {{ 'class', 'frigate' | genericLabel }}\n {{ 'class', 'destroyer' | genericLabel }}\n {{ 'class', 'cruiser' | genericLabel }}\n {{ 'class', 'battlecruiser' | genericLabel }}\n {{ 'class', 'dreadnought' | genericLabel }}\n {{ 'class', 'explorer' | genericLabel }}\n \n
                      \n
                      \n
                      \n
                      \n ${F("outer_shipyard_power")}\n
                      \n
                      \n \n \n {{ 'power', 'solar' | genericLabel }}\n {{ 'power', 'diesel' | genericLabel }}\n {{ 'power', 'fission' | genericLabel }}\n {{ 'power', 'fusion' | genericLabel }}\n {{ 'power', 'elerium' | genericLabel }}\n \n
                      \n
                      \n
                      \n
                      \n ${F("outer_shipyard_weapon")}\n
                      \n
                      \n \n \n {{ 'weapon', 'railgun' | genericLabel }}\n {{ 'weapon', 'laser' | genericLabel }}\n {{ 'weapon', 'p_laser' | genericLabel }}\n {{ 'weapon', 'plasma' | genericLabel }}\n {{ 'weapon', 'phaser' | genericLabel }}\n {{ 'weapon', 'disruptor' | genericLabel }}\n \n
                      \n
                      \n
                      \n
                      \n ${F("outer_shipyard_armor")}\n
                      \n
                      \n \n \n {{ 'armor', 'steel' | genericLabel }}\n {{ 'armor', 'alloy' | genericLabel }}\n {{ 'armor', 'neutronium' | genericLabel }}\n \n
                      \n
                      \n
                      \n
                      \n ${F("outer_shipyard_engine")}\n
                      \n
                      \n \n \n {{ 'engine', 'ion' | genericLabel }}\n {{ 'engine', 'tie' | genericLabel }}\n {{ 'engine', 'pulse' | genericLabel }}\n {{ 'engine', 'photon' | genericLabel }}\n {{ 'engine', 'vacuum' | genericLabel }}\n {{ 'engine', 'emdrive' | genericLabel }}\n \n
                      \n
                      \n
                      \n
                      \n ${F("outer_shipyard_sensor")}\n
                      \n
                      \n \n \n {{ 'sensor', 'visual' | genericLabel }}\n {{ 'sensor', 'radar' | genericLabel }}\n {{ 'sensor', 'lidar' | genericLabel }}\n {{ 'sensor', 'quantum' | genericLabel }}\n \n
                      \n
                      \n
                      \n
                      \n \n \n
                      \n `);let _=function(e,t){switch(t){case"sensor":switch(e){case"visual":return 1;case"radar":return 1.04;case"lidar":return 1.08;case"quantum":return 1.12}case"weapon":switch(e){case"railgun":return 1;case"laser":return 1.05;case"p_laser":return 1.035;case"plasma":return 1.1;case"phaser":return 1.15;case"disruptor":return 1.2}}};zs({el:"#tpShipsCostsCalc",data:{i:n,r:c,s:o},methods:{val(e){n[e].val&&n[e].val<0&&(n[e].val=0)},pickGeneric(e,t){if(n[e].val=t,"class"===e){let e=1,a=1,r=1;switch(t){case"corvette":e=1,a=1,r=2;break;case"frigate":e=1.1,a=1.09,r=1.5;break;case"destroyer":e=1.2,a=1.18,r=1.2;break;case"cruiser":e=1.3,a=1.25;break;case"battlecruiser":e=1.35,a=1.3,r=.8;break;case"dreadnought":e=1.4,a=1.35,r=.5;break;case"explorer":e=1.45,a=1,r=5}o.exp1.val=e,o.exp2.val=a,o.creep.val=r}},resetInputs(){n.owned.val=void 0,n.class.val=void 0,n.power.val=void 0,n.weapon.val=void 0,n.armor.val=void 0,n.engine.val=void 0,n.sensor.val=void 0,["Money","Aluminium","Adamantite","Steel","Alloy","Neutronium","Titanium","Copper","Orichalcum","Iridium","Iron","Nano_Tube","Quantium"].forEach((function(e){c[e]={base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1}})),o.exp1.val=void 0,o.exp2.val=void 0,o.creep.val=void 0},importInputs(){if(n.class.val)if(t.space.shipyard&&t.space.shipyard.ships){let e=0;t.space.shipyard.ships.forEach((function(t){t.class===n.class.val&&e++})),n.owned.val=e}else n.owned.val=0}},filters:{finalLabel:(e,t)=>"explorer"===t?F("wiki_calc_tp_ships_costs_final_costs_explorer"):(0!==e&&1!==e&&(e=">1"),t=F(t?`outer_shipyard_class_${t}`:"outer_shipyard_class"),F("wiki_calc_tp_ships_costs_final_costs",[F("wiki_calc_tp_ships_costs_final_costs_owned",[e,t])])),generic:(e,t)=>void 0!==e?e:F("wiki_calc_tp_ships_costs_"+t),genericLabel:(e,t)=>F(t?`outer_shipyard_${e}_${t}`:`outer_shipyard_${e}`),getBase(e,t,a){if(!e)return F("wiki_calc_tp_ships_costs_res_base",[F(`outer_shipyard_${t}`)]);let r=0;switch(t){case"class":switch(e){case"corvette":r="Money"===a?25e5:"Aluminium"===a?5e5:0;break;case"frigate":r="Money"===a?5e6:"Aluminium"===a?125e4:0;break;case"destroyer":r="Money"===a?15e6:"Aluminium"===a?35e5:0;break;case"cruiser":r="Money"===a?5e7:"Aluminium"===a?0:1e6;break;case"battlecruiser":r="Money"===a?125e6:"Aluminium"===a?0:26e5;break;case"dreadnought":r="Money"===a?5e8:"Aluminium"===a?0:8e6;break;case"explorer":r="Money"===a?8e8:"Aluminium"===a?0:95e5}break;case"armor":switch(e){case"steel":r="Steel"===a?35e4:0;break;case"alloy":r="Alloy"===a?25e4:0;break;case"neutronium":r="Neutronium"===a?1e4:0}break;case"engine":switch(e){case"ion":r=75e3;break;case"tie":r=15e4;break;case"pulse":r=125e3;break;case"photon":r=21e4;break;case"vacuum":r=3e5;break;case"emdrive":r=125e4}break;case"power":let t=["dreadnought","explorer"].includes(n.class.val);switch(e){case"solar":case"diesel":r="Iridium"===a?15e3:"Orichalcum"===a&&t||"Copper"===a&&!t?4e4:0;break;case"fission":r="Iridium"===a?3e4:"Orichalcum"===a&&t||"Copper"===a&&!t?5e4:0;break;case"fusion":r="Iridium"===a?4e4:"Orichalcum"===a&&t||"Copper"===a&&!t?5e4:0;break;case"elerium":r="Iridium"===a?55e3:"Orichalcum"===a&&t||"Copper"===a&&!t?6e4:0}break;case"weapon":switch(e){case"railgun":r="Iron"===a?25e3:0;break;case"laser":case"p_laser":r="Nano_Tube"===a?12e3:0;break;case"plasma":r="Nano_Tube"===a?2e4:0;break;case"phaser":r="Quantium"===a?18e3:0;break;case"disruptor":r="Quantium"===a?35e3:0}}return c[a].base=r,r},getExponent:(e,t)=>e?_(e,t):F("wiki_calc_tp_ships_costs_res_exp",[F(`outer_shipyard_${t}`)]),calcPre(e){if(void 0!==c[e].base){let t=0,a=c[e].base;switch(e){case"Money":"explorer"===n.class.val?t=1:n.sensor.val&&(t=_(n.sensor.val,"sensor"));break;case"Steel":case"Alloy":case"Neutronium":case"Copper":case"Orichalcum":case"Iron":case"Nano_Tube":case"Quantium":o.exp1.val&&(t=o.exp1.val);break;case"Titanium":case"Iridium":o.exp2.val&&(t=o.exp2.val)}if(t){if("Iridium"!==e||n.weapon.val)return"Iridium"===e&&(a**=_(n.weapon.val,"weapon")),a**=t,"explorer"===n.class.val&&("Titanium"===e?a*=5:"Iron"===e?a*=10:"Iridium"===e&&(a*=50)),c[e].preVal=+a.toFixed(0),c[e].preVis=!0,c[e].preVal}else if("Aluminium"===e||"Adamantite"===e)return c[e].preVal=a,c[e].preVis=!0,c[e].preVal}c[e].preVal=void 0,c[e].preVis=!1},calcFinal(e){if(c[e].vis=void 0!==c[e].preVal&&void 0!==n.owned.val,c[e].vis){let t=n.owned.val;if("explorer"===n.class.val)c[e].val=+(c[e].preVal*(3*(t+1))).toFixed(0);else{let a=0===t?.75:1===t?.9:1+(t-2)/25*o.creep.val;c[e].val=+(c[e].preVal*a).toFixed(0)}return c[e].val}c[e].val=void 0}}})}(Gn(Tn(e,{name:"tp_ships_costs",template:"mechanics",label:F("wiki_mechanics_tp_ships_costs"),paragraphs:3,break:[3],h_level:2,para_data:{2:[F("outer_shipyard_class")],3:[F("outer_shipyard_class")]}}),"mechanics","tp_ships_costs",F("wiki_mechanics_tp_ships_costs")));{let t=Bn(Tn(e,{name:"tp_ships_crew",template:"mechanics",label:F("wiki_mechanics_tp_ships_crew"),paragraphs:1,h_level:2,para_data:{1:[F("outer_shipyard_class")]}}),"mechanics","tp_ships_crew",F("wiki_mechanics_tp_ships_crew"));["corvette","frigate","destroyer","cruiser","battlecruiser","dreadnought","explorer"].forEach((function(e){t.append(`
                      ${F("outer_shipyard_class_"+e)}: ${tt({class:e})}`)}))}!function(e){let t=$('
                      ');e.append(t);let a=$("
                      "),r=$("
                      "),i=$("
                      ");t.append(a),t.append(r),t.append(i);let s={class:{val:void 0},power:{val:void 0},weapon:{val:void 0},engine:{val:void 0},sensor:{val:void 0}},n={genMulti:{val:void 0},useMulti:{val:void 0},power:{val:void 0,vis:!1},weapon:{val:void 0,vis:!1},engine:{val:void 0,vis:!1},sensor:{val:void 0,vis:!1},net:{val:void 0,vis:!1,neg:void 0}};a.append(`\n
                      \n
                      \n
                      \n ${F("outer_shipyard_class")}\n
                      \n
                      \n \n \n {{ 'class', 'corvette' | genericLabel }}\n {{ 'class', 'frigate' | genericLabel }}\n {{ 'class', 'destroyer' | genericLabel }}\n {{ 'class', 'cruiser' | genericLabel }}\n {{ 'class', 'battlecruiser' | genericLabel }}\n {{ 'class', 'dreadnought' | genericLabel }}\n {{ 'class', 'explorer' | genericLabel }}\n \n
                      \n
                      \n
                      \n `),r.append(`\n
                      \n
                      \n

                      ${F("wiki_calc_tp_ships_power_gen")}

                      \n
                      \n
                      \n {{ i.power.val, 'power' | genericVal }} * {{ s.genMulti.val, 'gen_multi' | generic }} = {{ | calcPower }}\n
                      \n
                      \n
                      \n
                      \n
                      \n ${F("outer_shipyard_power")}\n
                      \n
                      \n \n \n {{ 'power', 'solar' | genericLabel }}\n {{ 'power', 'diesel' | genericLabel }}\n {{ 'power', 'fission' | genericLabel }}\n {{ 'power', 'fusion' | genericLabel }}\n {{ 'power', 'elerium' | genericLabel }}\n \n
                      \n
                      \n
                      \n `),i.append(`\n
                      \n
                      \n

                      ${F("wiki_calc_tp_ships_power_use",[F("outer_shipyard_weapon")])}

                      \n
                      \n
                      \n {{ i.weapon.val, 'weapon' | genericVal }} * {{ s.useMulti.val, 'use_multi' | generic }} = {{ | calcWeapon }}\n
                      \n
                      \n

                      ${F("wiki_calc_tp_ships_power_use",[F("outer_shipyard_engine")])}

                      \n
                      \n
                      \n {{ i.engine.val, 'engine' | genericVal }} * {{ s.useMulti.val, 'use_multi' | generic }} = {{ | calcEngine }}\n
                      \n
                      \n

                      ${F("wiki_calc_tp_ships_power_use",[F("outer_shipyard_sensor")])}

                      \n
                      \n
                      \n {{ i.sensor.val, 'sensor' | genericVal }} * {{ s.useMulti.val, 'use_multi' | generic }} = {{ | calcSensor }}\n
                      \n
                      \n

                      ${F("wiki_calc_tp_ships_power_net")}

                      \n
                      \n
                      \n {{ s.power.val, 'power' | genericResult }} - {{ s.weapon.val, 'weapon' | genericResult }} - {{ s.engine.val, 'engine' | genericResult }} - {{ s.sensor.val, 'sensor' | genericResult }} = {{ | calcNet }} = ${F("wiki_calc_tp_ships_power_net_pos")} = ${F("wiki_calc_tp_ships_power_net_neg")}\n
                      \n
                      \n
                      \n
                      \n
                      \n ${F("outer_shipyard_weapon")}\n
                      \n
                      \n \n \n {{ 'weapon', 'railgun' | genericLabel }}\n {{ 'weapon', 'laser' | genericLabel }}\n {{ 'weapon', 'p_laser' | genericLabel }}\n {{ 'weapon', 'plasma' | genericLabel }}\n {{ 'weapon', 'phaser' | genericLabel }}\n {{ 'weapon', 'disruptor' | genericLabel }}\n \n
                      \n
                      \n
                      \n
                      \n ${F("outer_shipyard_engine")}\n
                      \n
                      \n \n \n {{ 'engine', 'ion' | genericLabel }}\n {{ 'engine', 'tie' | genericLabel }}\n {{ 'engine', 'pulse' | genericLabel }}\n {{ 'engine', 'photon' | genericLabel }}\n {{ 'engine', 'vacuum' | genericLabel }}\n {{ 'engine', 'emdrive' | genericLabel }}\n \n
                      \n
                      \n
                      \n
                      \n ${F("outer_shipyard_sensor")}\n
                      \n
                      \n \n \n {{ 'sensor', 'visual' | genericLabel }}\n {{ 'sensor', 'radar' | genericLabel }}\n {{ 'sensor', 'lidar' | genericLabel }}\n {{ 'sensor', 'quantum' | genericLabel }}\n \n
                      \n
                      \n
                      \n
                      \n \n
                      \n `),zs({el:"#tpShipsPowerCalc",data:{i:s,s:n},methods:{pickGeneric(e,t){if(s[e].val=t,"class"===e){let e=1,a=1;switch(t){case"frigate":e=1.1,a=1.2;break;case"destroyer":e=1.5,a=1.65;break;case"cruiser":e=2,a=2.5;break;case"battlecruiser":e=2.5,a=3.5;break;case"dreadnought":e=5,a=6.5;break;case"explorer":e=6,a=2}n.genMulti.val=e,n.useMulti.val=a}},resetInputs(){s.class.val=void 0,s.power.val=void 0,s.weapon.val=void 0,s.engine.val=void 0,s.sensor.val=void 0,n.genMulti.val=void 0,n.useMulti.val=void 0,n.power.val=void 0,n.weapon.val=void 0,n.engine.val=void 0,n.sensor.val=void 0,n.net.val=void 0,n.power.vis=!1,n.weapon.vis=!1,n.engine.vis=!1,n.sensor.vis=!1,n.net.vis=!1,n.net.neg=void 0}},filters:{generic:(e,t)=>void 0!==e?e:F("wiki_calc_tp_ships_power_"+t),genericResult:(e,t)=>void 0!==e?e:"power"===t?F("wiki_calc_tp_ships_power_gen"):F("wiki_calc_tp_ships_power_use",[F(`outer_shipyard_${t}`)]),genericLabel:(e,t)=>F(t?`outer_shipyard_${e}_${t}`:`outer_shipyard_${e}`),genericVal(e,t){if(!e)return F("wiki_calc_tp_ships_power_base",[F(`outer_shipyard_${t}`)]);let a={};return a[t]=e,Math.abs(at(a,"explorer"===s.class.val))},calcPower(){if(n.power.vis=s.class.val&&s.power.val,n.power.vis)return n.power.val=at({class:s.class.val,power:s.power.val}),n.power.val},calcWeapon(){if(n.weapon.vis=s.class.val&&s.weapon.val,n.weapon.vis)return n.weapon.val=Math.abs(at({class:s.class.val,weapon:s.weapon.val})),n.weapon.val},calcEngine(){if(n.engine.vis=s.class.val&&s.engine.val,n.engine.vis)return n.engine.val=Math.abs(at({class:s.class.val,engine:s.engine.val})),n.engine.val},calcSensor(){if(n.sensor.vis=s.class.val&&s.sensor.val,n.sensor.vis)return n.sensor.val=Math.abs(at({class:s.class.val,sensor:s.sensor.val})),n.sensor.val},calcNet(){if(n.net.vis=s.class.val&&s.power.val&&s.weapon.val&&s.engine.val&&s.sensor.val,n.net.vis)return n.net.val=at({class:s.class.val,power:s.power.val,weapon:s.weapon.val,engine:s.engine.val,sensor:s.sensor.val}),n.net.neg=n.net.val<0,n.net.val;n.net.neg=void 0}}})}(Gn(Tn(e,{name:"tp_ships_power",template:"mechanics",label:F("wiki_mechanics_tp_ships_power"),paragraphs:4,break:[3],h_level:2,para_data:{3:[F("outer_shipyard_power"),F("outer_shipyard_class")],4:[F("outer_shipyard_weapon"),F("outer_shipyard_engine"),F("outer_shipyard_sensor"),F("outer_shipyard_class")]}}),"mechanics","tp_ships_power",F("wiki_mechanics_tp_ships_power"))),function(e){let t=$('
                      ');e.append(t),t.append(`

                      ${F("wiki_mechanics_tp_ships_firepower")}

                      `);let a=$("
                      "),r=$("
                      ");t.append(a),t.append(r);let i={weapon:{val:void 0},class:{val:void 0}},s={result:{vis:!1,val:0}};a.append('\n
                      \n {{ i.weapon.val | weaponVal }} * {{ i.class.val | classVal }} = {{ | calc }}\n
                      \n '),r.append(`\n
                      \n
                      \n
                      \n ${F("outer_shipyard_weapon")}\n
                      \n
                      \n \n \n {{ 'railgun' | weaponLabel }}\n {{ 'laser' | weaponLabel }}\n {{ 'p_laser' | weaponLabel }}\n {{ 'plasma' | weaponLabel }}\n {{ 'phaser' | weaponLabel }}\n {{ 'disruptor' | weaponLabel }}\n \n
                      \n
                      \n
                      \n
                      \n ${F("outer_shipyard_class")}\n
                      \n
                      \n \n \n {{ 'corvette' | classLabel }}\n {{ 'frigate' | classLabel }}\n {{ 'destroyer' | classLabel }}\n {{ 'cruiser' | classLabel }}\n {{ 'battlecruiser' | classLabel }}\n {{ 'dreadnought' | classLabel }}\n {{ 'explorer' | classLabel }}\n \n
                      \n
                      \n
                      \n
                      \n \n
                      \n `),zs({el:"#tpShipsFirepowerCalc",data:{i,s},methods:{pickWeapon(e){i.weapon.val=e},pickClass(e){i.class.val=e},resetInputs(){i.weapon.val=void 0,i.class.val=void 0}},filters:{weaponVal(e){switch(e){case"railgun":return 36;case"laser":return 64;case"p_laser":return 54;case"plasma":return 90;case"phaser":return 114;case"disruptor":return 156;default:return F("wiki_calc_tp_ships_firepower_weapon")}},classVal(e){switch(e){case"corvette":return 1;case"frigate":return 1.5;case"destroyer":return 2.75;case"cruiser":return 5.5;case"battlecruiser":return 10;case"dreadnought":return 22;case"explorer":return 1.2;default:return F("wiki_calc_tp_ships_firepower_class")}},weaponLabel:e=>F(e?"outer_shipyard_weapon_"+e:"outer_shipyard_weapon"),classLabel:e=>F(e?"outer_shipyard_class_"+e:"outer_shipyard_class"),calc(){if(s.result.vis=i.weapon.val&&i.class.val,s.result.vis)return s.result.val=rt({weapon:i.weapon.val,class:i.class.val}),s.result.val}}})}(Gn(Tn(e,{name:"tp_ships_firepower",template:"mechanics",label:F("wiki_mechanics_tp_ships_firepower"),paragraphs:2,break:[3],h_level:2,para_data:{1:[F("firepower"),F("outer_shipyard_class"),F("outer_shipyard_weapon")],2:[F("firepower"),F("outer_shipyard_hull")]}}),"mechanics","tp_ships_firepower",F("wiki_mechanics_tp_ships_firepower"))),function(e){let t=$('
                      ');e.append(t),t.append(`

                      ${F("wiki_calc_tp_ships_hull_damage_range")}

                      `);let a=$("
                      "),r=$("
                      ");t.append(a),t.append(r);let i={hull:{val:void 0},triton:{val:!1}},s={result:{vis:!1,val:void 0}};a.append('\n
                      \n 1 - {{ | calc }}\n
                      \n '),r.append(`\n
                      \n
                      \n
                      \n ${F("outer_shipyard_armor")}\n
                      \n
                      \n \n \n {{ 'steel' | hullLabel }}\n {{ 'alloy' | hullLabel }}\n {{ 'neutronium' | hullLabel }}\n \n
                      \n
                      \n
                      ${Dn("triton")}
                      \n
                      \n
                      \n \n
                      \n `),zs({el:"#tpShipsHullCalc",data:{i,s},methods:{pickHull(e){i.hull.val=e},resetInputs(){i.hull.val=void 0,i.triton.val=!1}},filters:{hullLabel:e=>F(e?"outer_shipyard_armor_"+e:"outer_shipyard_armor"),calc(){if(s.result.vis=i.hull.val,s.result.vis){let e=0;switch(i.hull.val){case"steel":e=8;break;case"alloy":e=6;break;case"neutronium":e=4}return i.triton.val&&(e*=2),s.result.val=e-1,s.result.val}}}})}(Gn(Tn(e,{name:"tp_ships_hull",template:"mechanics",label:F("wiki_mechanics_tp_ships_hull"),paragraphs:7,break:[3,6,7],h_level:2,para_data:{1:[F("firepower"),F("outer_shipyard_hull")],2:[F("outer_shipyard_hull"),"90%",F("firepower"),.9],3:[Dn("dwarf"),"1/10",F("outer_shipyard_hull")],4:[F("outer_shipyard_armor")],5:[Dn("triton")],6:["1%",F("outer_shipyard_hull")],7:[F("outer_shipyard_hull"),"10%"]}}),"mechanics","tp_ships_hull",F("wiki_calc_tp_ships_hull_damage_range")));let r=Tn(e,{name:"tp_ships_sensors",template:"mechanics",label:F("wiki_mechanics_tp_ships_sensors"),paragraphs:2,h_level:2,para_data:{1:[F("space_scan_effectiveness")],2:[F("space_scan_effectiveness"),F("outer_shipyard_sensors"),F("outer_shipyard_class"),F("outer_shipyard_sensor"),Dn("triton"),F("space_fob_title")]}});!function(e){let t=$('
                      ');e.append(t),t.append(`

                      ${F("wiki_calc_tp_ships_scan_ship")}

                      `);let a=$("
                      "),r=$("
                      ");t.append(a),t.append(r);let i={sensor:{val:void 0},class:{val:void 0}},s={result:{vis:!1,val:0}};a.append('\n
                      \n {{ i.sensor.val | sensorVal }} * {{ i.class.val | classVal }} = {{ | calc }}\n
                      \n '),r.append(`\n
                      \n
                      \n
                      \n ${F("outer_shipyard_sensor")}\n
                      \n
                      \n \n \n {{ 'visual' | sensorLabel }}\n {{ 'radar' | sensorLabel }}\n {{ 'lidar' | sensorLabel }}\n {{ 'quantum' | sensorLabel }}\n \n
                      \n
                      \n
                      \n
                      \n ${F("outer_shipyard_class")}\n
                      \n
                      \n \n \n {{ 'corvette' | classLabel }}\n {{ 'frigate' | classLabel }}\n {{ 'destroyer' | classLabel }}\n {{ 'cruiser' | classLabel }}\n {{ 'battlecruiser' | classLabel }}\n {{ 'dreadnought' | classLabel }}\n {{ 'explorer' | classLabel }}\n \n
                      \n
                      \n
                      \n
                      \n \n
                      \n `),zs({el:"#tpShipsScanCalc",data:{i,s},methods:{pickSensor(e){i.sensor.val=e},pickClass(e){i.class.val=e},resetInputs(){i.sensor.val=void 0,i.class.val=void 0}},filters:{sensorVal(e){switch(e){case"visual":return 1;case"radar":return 10;case"lidar":return 18;case"quantum":return 32;default:return F("wiki_calc_tp_ships_scan_sensor")}},classVal(e){switch(e){case"corvette":case"frigate":return 2;case"destroyer":case"cruiser":return 1.5;case"battlecruiser":case"dreadnought":return 1;case"explorer":return 5;default:return F("wiki_calc_tp_ships_firepower_class")}},sensorLabel:e=>F(e?"outer_shipyard_sensor_"+e:"outer_shipyard_sensor"),classLabel:e=>F(e?"outer_shipyard_class_"+e:"outer_shipyard_class"),calc(){if(s.result.vis=i.sensor.val&&(i.class.val||"visual"===i.sensor.val),s.result.vis)return s.result.val=dt({sensor:i.sensor.val,class:i.class.val}),s.result.val}}})}(Gn(r,"mechanics","tp_ships_scan",F("wiki_calc_tp_ships_scan_ship"))),function(e){let t=$('
                      ');e.append(t);let a=$("
                      "),r=$("
                      ");t.append(a),t.append(r);let i={range:{val:void 0},triton:{val:!1},fob:{val:!1}},s={combined:{vis:!1,val:void 0},adjusted:{vis:!1,val:void 0,adjust:!1},intel:{vis:!1,val:void 0}};a.append(`\n
                      \n

                      ${F("wiki_calc_tp_ships_intel_combined_range")}

                      \n
                      \n
                      \n {{ i.range.val, 'ship_range' | generic }} + 10 = {{ | calcRange }}\n
                      \n
                      \n

                      ${F("wiki_calc_tp_ships_intel_adjusted_range_below",[F("wiki_calc_tp_ships_intel_adjusted_range"),F("wiki_calc_tp_ships_intel_combined_range")])}

                      \n
                      \n
                      \n {{ s.combined.val, 'combined_range' | generic }} = {{ | calcAdjusted }}\n
                      \n
                      \n

                      ${F("wiki_calc_tp_ships_intel_adjusted_range_above",[F("wiki_calc_tp_ships_intel_adjusted_range"),F("wiki_calc_tp_ships_intel_combined_range")])}

                      \n
                      \n
                      \n (({{ s.combined.val, 'combined_range' | generic }} - 100) / (({{ s.combined.val, 'combined_range' | generic }} - 100) + 200) * 100) + 100 = {{ | calcAdjusted }}\n
                      \n
                      \n

                      ${F("space_scan_effectiveness")}

                      \n
                      \n
                      \n ({{ s.adjusted.val, 'adjusted_range' | generic }} + 25) / 1.25 = {{ | calcIntel }}\n
                      \n `),r.append(`\n
                      \n
                      ${F("wiki_calc_tp_ships_intel_ship_range")}
                      \n
                      ${Dn("triton")}
                      \n
                      ${F("space_fob_title")}
                      \n
                      \n
                      \n \n
                      \n `),zs({el:"#tpShipsIntelCalc",data:{i,s},methods:{val(e){i[e].val&&i[e].val<0&&(i[e].val=0)},resetInputs(){i.range.val=void 0,i.triton.val=!1,i.fob.val=!1}},filters:{generic:(e,t)=>void 0!==e?e:F("wiki_calc_tp_ships_intel_"+t),calcRange(){if(s.combined.vis=void 0!==i.range.val,s.combined.vis)return s.combined.val=i.range.val+(i.triton.val&&i.fob.val?10:0),s.combined.val;s.combined.val=void 0},calcAdjusted(){if(s.adjusted.vis=void 0!==s.combined.val,s.adjusted.vis){let e=s.combined.val;return e>100?(e=(e-100)/(e-100+200)*100+100,s.adjusted.adjust=!0):s.adjusted.adjust=!1,s.adjusted.val=e,s.adjusted.val}s.adjusted.val=void 0},calcIntel(){if(s.intel.vis=void 0!==s.adjusted.val,s.intel.vis)return s.intel.val=(s.adjusted.val+25)/1.25,s.intel.val;s.intel.val=void 0}}})}(Gn(r,"mechanics","tp_ships_intel",F("space_scan_effectiveness"))),En("add","mechanics-gameplay","tp_ships",F("wiki_mechanics_tp_ships"))}Tn(a,{name:"seed",template:"mechanics",label:F("wiki_mechanics_seed"),paragraphs:14,break:[3,5,6,7,8,9,10,11,12,13,14],h_level:2,para_data:{4:[F("wiki_faq_q_soft_reset")],7:[F("evo_sentience_title")],8:[F("wiki_menu_combat"),F("trait_revive_name"),F("trait_infectious_name")],9:[F("civics_spy_influence"),F("civics_spy_sabotage"),F("civics_spy_incite")],10:[F("wiki_menu_major"),F("wiki_menu_minor")],11:[F("arpa_gene_mutation"),F("tech_fanaticism"),F("tech_deify"),F("tab_arpa_crispr"),F("wiki_arpa_crispr_evolve")],12:[F("governor")],13:[F("wiki_menu_planets"),F("wiki_resets_bioseed"),F("wiki_resets_blackhole"),F("wiki_resets_vacuum")],14:[F("portal_spire_name")]},data_link:{7:["wiki.html#prehistoric-structures-sentience"],8:["wiki.html#combat-gameplay","wiki.html#traits-species-major_revive","wiki.html#traits-species-major_infectious"],10:["wiki.html#major-events","wiki.html#minor-events"],11:[!1,t.genes.transcendence?"wiki.html#civilized-tech-alt_fanaticism":"wiki.html#civilized-tech-fanaticism","wiki.html#early_space-tech-deify",!1,"wiki.html#crispr-prestige-recombination"],12:["wiki.html#governor-gameplay"],13:["wiki.html#planets-gameplay","wiki.html#resets-prestige-bioseed","wiki.html#resets-prestige-blackhole","wiki.html#resets-prestige-vacuum"],14:["wiki.html#hell-gameplay-spire"]}}),En("add","mechanics-gameplay","seed",F("wiki_mechanics_seed"));{let e=jr(!0),r=jr(!1,!0),i=t.stats.hasOwnProperty("reset")?t.stats.reset:0,s=Math.floor(i/r.length);if(s>0)switch(s){case 1:e=`${e} ${F("wiki_mechanics_cheese_squared")}`;break;case 2:e=`${e} ${F("wiki_mechanics_cheese_cubed")}`;break;case 3:e=`${e} ${F("wiki_mechanics_cheese_tesseracted")}`;break;case 4:e=`${e} ${F("wiki_mechanics_cheese_penteracted")}`;break;case 5:e=`${e} ${F("wiki_mechanics_cheese_hexeracted")}`;break;case 6:e=`${e} ${F("wiki_mechanics_cheese_hepteracted")}`;break;case 7:e=`${e} ${F("wiki_mechanics_cheese_octeracted")}`;break;case 8:e=`${e} ${F("wiki_mechanics_cheese_enneracted")}`;break;case 9:e=`${e} ${F("wiki_mechanics_cheese_dekeracted")}`;break;default:e=`${e}^${s+1}`}let n=[];for(let e=0;e${F(`cheese_${r[e]}`)} (${e+1})`);Tn(a,{name:"cheese",template:"mechanics",label:F("wiki_mechanics_cheese"),paragraphs:5,break:[4,5],h_level:2,para_data:{1:[F("tech_swiss_bank",[F("cheese_swiss")])],2:[r.length,F("cheese_swiss")],3:[F("wiki_mechanics_cheese")],4:[F("wiki_mechanics_cheese"),e,i+1],5:[n.join(", ")]},data_color:{4:["warning","danger","caution"],5:[!1]}}),En("add","mechanics-gameplay","cheese",F("wiki_mechanics_cheese"))}{let e=Tn(a,{name:"thralls",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:9,break:[4,8],h_level:2,para_data:{1:[F("trait_unfathomable_name")],5:[100,100],8:[1]},data_link:{1:["wiki.html#traits-species-genus_unfathomable"]}});Tn(e,{name:"thralls_cath",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:1,h_level:!1,para_data:{1:[F("race_cath"),3]}}),Tn(e,{name:"thralls_pterodacti",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:1,h_level:!1,para_data:{1:[F("race_pterodacti"),3]}}),Tn(e,{name:"thralls_entish",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:1,h_level:!1,para_data:{1:[F("race_entish"),"40%"]}}),Tn(e,{name:"thralls_cacti",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:1,h_level:!1,para_data:{1:[F("race_cacti"),"32%"]}}),Tn(e,{name:"thralls_moldling",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:3,break:[3],h_level:!1,para_data:{1:[F("race_moldling")],2:[[`${F("tech_smelting")}`,`${F("tech_dynamite")}`,`${F("tech_portland_cement")}`,`${F("tech_oxygen_converter")}`,`${F("tech_machinery")}`,`${F("tech_uranium_storage")}`,`${Sr.tech.synthetic_fur.title()}`,`${F("tech_rover")}`,`${F("tech_starcharts")}`,`${F("tech_nano_tubes")}`,`${F("tech_stanene")}`,`${F("tech_hydroponics")}`,`${F("tech_orichalcum_panels")}`,`${F("tech_cybernetics")}`].join(", ")]},data_color:{2:[!1]}}),Tn(e,{name:"thralls_sharkin",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:1,h_level:!1,para_data:{1:[F("race_sharkin")]}}),Tn(e,{name:"thralls_satyr",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:1,h_level:!1,para_data:{1:[F("race_satyr")]}}),Tn(e,{name:"thralls_phoenix",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:1,h_level:!1,para_data:{1:[F("race_phoenix"),"0.25"]}}),Tn(e,{name:"thralls_salamander",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:1,h_level:!1,para_data:{1:[F("race_salamander"),"20%"]}}),Tn(e,{name:"thralls_unicorn",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:1,h_level:!1,para_data:{1:[F("race_unicorn"),1]}}),En("add","mechanics-gameplay","thralls",F("wiki_mechanics_thralls"))}}(a);break;case"government":!function(e){let t=En("create",e);Tn(t,{name:"info",template:"government",label:F("tab_gov"),paragraphs:8,break:[3,6],h_level:2,para_data:{2:[F("govern_anarchy")],3:[F("civics_revolution")],4:[F("civics_revolution")],5:[1e3]},data_color:{2:["caution"]}}),En("add","government-gameplay","info",F("tab_gov"));let a={anarchy:{paragraphs:5,break:[2,5],para_data:{2:[10],3:["10th","0.25%","1/2"]}},autocracy:{paragraphs:4,break:[2,4],para_data:{2:["35%","25%"],3:["18%",F("tech_electricity"),"10%",F("tech_virtual_reality")]},para_color:{}},democracy:{paragraphs:6,break:[2,5],para_data:{2:[F("job_entertainer"),"20%"],3:[F("job_entertainer")],4:["25%",F("tech_electricity"),"30%",F("tech_virtual_reality")],5:["5%"],6:[F("job_farmer"),F("job_lumberjack"),F("job_quarry_worker"),F("job_miner"),F("job_crystal_miner"),F("job_coal_miner"),F("job_cement_worker"),F("job_professor"),F("job_scientist"),F("soldiers")]}},oligarchy:{paragraphs:5,break:[2,4,5],text:{1:"govern_oligarchy_desc",2:"govern_oligarchy_effect"},para_data:{2:[5,20],3:["2%",F("tech_electricity"),F("tech_virtual_reality")],4:["45%"],5:["0.5%","20%"]}},theocracy:{paragraphs:7,break:[2,6,7],para_data:{2:["12%"],3:["25%"],4:["50%"],6:["40%",F("tech_virtual_reality"),"25%",F("tech_metaphysics")]}},republic:{paragraphs:7,break:[2,5,6],para_data:{2:["25%"],3:["20%"],5:["30%",F("tech_virtual_reality"),"40%",F("tech_metaphysics")],6:["30%"],7:[30,90]},para_color:{}},socialist:{paragraphs:6,break:[2,6],para_data:{2:["35%"],3:["10%"],4:["10%"],5:["20%"],6:["42%",F("tech_virtual_reality"),"50%",F("tech_metaphysics")]}},corpocracy:{paragraphs:9,break:[2,8,9],para_data:{2:["50%"],3:["200%"],4:["150%"],5:["100%"],6:["10%"],7:["30%"],8:["5%",F("tech_virtual_reality")],9:["40%",F("tech_metaphysics")]}},technocracy:{paragraphs:5,break:[2,4],para_data:{2:["8%"],3:["10%"],4:["2%"],5:["1%",F("tech_virtual_reality"),F("tech_metaphysics")]}},federation:{paragraphs:7,break:[2,5,6],para_data:{2:["3%"],4:["25%"],5:["10%"],6:["25%","32%"],7:["36%",F("tech_virtual_reality"),"40%",F("tech_metaphysics")]}},magocracy:{paragraphs:5,break:[2,3,5],para_data:{2:["25%"],3:["25%"],4:["40%",F("tech_virtual_reality"),"50%",F("tech_metaphysics")]}}};Object.keys(a).forEach((function(e){Tn(t,{name:e,template:"government",label:F(`govern_${e}`),paragraphs:a[e].paragraphs,break:a[e].break,h_level:2,text:a[e].hasOwnProperty("text")?a[e].text:{1:`govern_${e}_desc`},para_data:a[e].hasOwnProperty("para_data")?a[e].para_data:{},para_color:a[e].hasOwnProperty("para_color")?a[e].para_color:{}}),En("add","government-gameplay",e,F(`govern_${e}`))}))}(a);break;case"governor":!function(e){let t=En("create",e);{let e=Tn(t,{name:"intro",template:"governor",label:F("governor"),paragraphs:4,h_level:2,para_data:{1:[F("arpa_genepool_governance_title")],2:[Object.keys(A).length]},data_link:{1:["wiki.html#crispr-prestige-governance"]}});En("add","governor-gameplay","intro",F("governor")),Object.keys(A).forEach((function(t){let a="";Object.keys(A[t].traits).forEach((function(e){a+=(I[e].hasOwnProperty("effect")?I[e].effect():"")+" "})),Tn(e,{name:t,template:"government",label:F(`governor_${t}`),paragraphs:2,break:[2],h_level:3,text:{1:`governor_${t}_desc`},rawtext:{2:a}}),En("add","governor-gameplay",t,F(`governor_${t}`))}))}{let e=Tn(t,{name:"task",template:"governor",paragraphs:2,h_level:2,para_data:{2:[3,F("governor_bureaucrat"),4],3:[Object.keys(G).length]}});En("add","governor-gameplay","task",F("wiki_governor_task"));{let t="tax";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:3,break:[3],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:`wiki_governor_task_${t}2`,3:"wiki_governor_task_unlock"},para_data:{3:[F("tech_tax_rates")]},data_link:{3:["wiki.html#civilized-tech-tax_rates"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}{let t="storage";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:3,break:[3],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:`wiki_governor_task_${t}2`,3:"wiki_governor_task_unlock"},para_data:{3:[F("tech_containerization")]},data_link:{3:["wiki.html#civilized-tech-containerization"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}{let t="bal_storage";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:4,break:[4],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:`wiki_governor_task_${t}2`,3:`wiki_governor_task_${t}3`,4:"wiki_governor_task_unlock"},para_data:{4:[F("tech_containerization")]},data_link:{4:["wiki.html#civilized-tech-containerization"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}{let t="merc";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:4,break:[4],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:`wiki_governor_task_${t}2`,3:`wiki_governor_task_${t}3`,4:"wiki_governor_task_unlock"},para_data:{4:[F("tech_mercs")]},data_link:{4:["wiki.html#civilized-tech-mercs"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}{let t="spy";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:3,break:[2,3],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:"wiki_governor_task_unlock",3:"wiki_governor_task_disabled"},para_data:{2:[F("tech_spy")],3:[F("tech_unification")]},data_link:{2:["wiki.html#civilized-tech-spy"],3:["wiki.html#early_space-tech-unification2"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}{let t="spyop";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:8,break:[2,3,4,5,6,7,8],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:`wiki_governor_task_${t}2`,3:`wiki_governor_task_${t}3`,4:`wiki_governor_task_${t}3`,5:`wiki_governor_task_${t}4`,6:`wiki_governor_task_${t}5`,7:"wiki_governor_task_unlock",8:"wiki_governor_task_disabled"},para_data:{2:[1,F("civics_spy_sabotage")],3:[2,F("civics_spy_influence")],4:[3,F("civics_spy_incite")],6:[F("civics_spy_sabotage"),F("civics_spy_incite"),F("civics_spy_influence")],7:[F("tech_espionage")],8:[F("tech_unification")]},data_link:{6:["wiki.html#civilized-tech-spy"],7:["wiki.html#early_space-tech-unification2"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}{let t="slave";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:2,break:[2],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:"wiki_governor_task_trait"},para_data:{2:[F("trait_slaver_name")]},data_link:{2:["wiki.html#traits-species-major_slaver"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}{let t="sacrifice";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:2,break:[2],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:"wiki_governor_task_trait"},para_data:{2:[F("trait_cannibalize_name")]},data_link:{2:["wiki.html#traits-species-major_cannibalize"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}{let t="horseshoe";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:2,break:[2],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:"wiki_governor_task_trait"},para_data:{1:[F(`city_${mn(!0)}`,[mn(!1)]),mn(!1)],2:[is(!1)]},data_link:{2:["wiki.html#traits-species-major_hooved"]}}),En("add","governor-gameplay",t,F(`city_${mn(!0)}`,[mn(!1)]))}{let t="trash";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:7,break:[3,5,7],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:`wiki_governor_task_${t}2`,3:`wiki_governor_task_${t}3`,4:`wiki_governor_task_${t}3min`,5:`wiki_governor_task_${t}3a`,6:`wiki_governor_task_${t}3max`,7:`wiki_governor_task_${t}4`},para_data:{7:[F("interstellar_mass_ejector")]},data_link:{7:["wiki.html#interstellar-structures-mass_ejector"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}{let t="mech";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:4,break:[4],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:`wiki_governor_task_${t}2`,3:`wiki_governor_task_${t}3`,4:`wiki_governor_task_${t}4`},para_data:{4:[1,F("wiki_resets_infusion"),F("portal_spire_name")]},data_link:{4:[!1,"wiki.html#resets-prestige-infusion","wiki.html#hell-structures-spire"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}}}(a);break;case"combat":!function(e){let t=En("create",e);Tn(t,{name:"basics",template:"combat",label:F("wiki_combat_basics"),paragraphs:4,h_level:2}),En("add","combat-gameplay","basics",F("wiki_combat_basics")),Tn(t,{name:"campaign",template:"combat",label:F("wiki_combat_campaign"),paragraphs:14,break:[5,11],h_level:2,para_data:{1:[5,F("civics_garrison_tactic_ambush"),F("civics_garrison_tactic_raid"),F("civics_garrison_tactic_pillage"),F("civics_garrison_tactic_assault"),F("civics_garrison_tactic_siege")],3:[F("civics_garrison_tactic_ambush")],4:[F("civics_garrison_tactic_siege"),20],11:["0%","50%"],12:[50],13:["50%","100%"],14:["50%"]}}),En("add","combat-gameplay","campaign",F("wiki_combat_campaign")),Tn(t,{name:"loot",template:"combat",label:F("wiki_combat_loot"),paragraphs:30,break:[3,5,10,13,16,19,22,26,27,28,29,30],h_level:2,para_data:{2:[3,F("civics_garrison_campaign"),F("civics_gov_eco_rate"),F("civics_garrison_battalion")],3:[F("civics_garrison_campaign")],4:[4,F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common"),F("wiki_combat_loot_rare")],5:[F("wiki_combat_loot_basic"),F("resource_Food_name"),F("resource_Lumber_name"),F("resource_Stone_name")],6:[F("wiki_combat_loot_common"),F("resource_Copper_name"),F("resource_Iron_name"),F("resource_Aluminium_name"),F("resource_Coal_name")],7:[F("wiki_combat_loot_rare"),F("resource_Cement_name"),F("resource_Steel_name")],8:[F("wiki_universe_magic"),F("wiki_combat_loot_rare"),F("resource_Crystal_name"),F("trait_terrifying_name"),F("resource_Titanium_name")],9:[F("wiki_combat_loot_money")],10:[F("civics_garrison_tactic_ambush"),3,F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common")],11:[F("trait_beast_of_burden_name"),F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common")],12:[5],13:[F("civics_garrison_tactic_raid"),4,F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common"),F("wiki_combat_loot_rare")],14:[F("trait_beast_of_burden_name"),F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common"),F("wiki_combat_loot_rare")],15:[10],16:[F("civics_garrison_tactic_pillage"),5,F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common"),F("wiki_combat_loot_rare")],17:[F("trait_beast_of_burden_name"),F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common"),F("wiki_combat_loot_rare")],18:[25],19:[F("civics_garrison_tactic_assault"),5,F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common"),F("wiki_combat_loot_rare")],20:[F("trait_beast_of_burden_name"),F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common"),F("wiki_combat_loot_rare")],21:[50],22:[F("civics_garrison_tactic_siege"),5,F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common"),F("wiki_combat_loot_rare")],23:[F("trait_beast_of_burden_name"),F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common"),F("wiki_combat_loot_rare")],24:[F("civics_garrison_tactic_siege")],25:[999],28:["base loot * log(looters + 1)"],29:[F("civics_gov_eco_rate")],30:["floor(loot * economic rating / 100)"]},data_color:{5:["warning","caution","caution","caution"],6:["warning","caution","caution","caution","caution"],7:["warning","caution","caution"],8:["warning","warning","caution","warning","caution"],10:["warning","warning","caution","caution","caution"],11:["warning","caution","caution","caution"],13:["warning","warning","caution","caution","caution","caution"],14:["warning","caution","caution","caution","caution"],16:["warning","warning","caution","caution","caution","caution"],17:["warning","caution","caution","caution","caution"],19:["warning","warning","caution","caution","caution","caution"],20:["warning","caution","caution","caution","caution"],22:["warning","warning","caution","caution","caution","caution"],23:["warning","caution","caution","caution","caution"],28:["advanced"],30:["advanced"]}}),En("add","combat-gameplay","loot",F("wiki_combat_loot"))}(a);break;case"challenges":!function(e){let a=En("create",e);Tn(a,{name:"intro",template:"challenges",paragraphs:3,h_level:2,para_data:{2:[F("arpa_genepool_hardened_genes_title"),F("evo_bunker")],3:[F("evo_challenge_genes"),F("evo_challenge_run"),F("evo_scenario")]},data_link:{2:["wiki.html#crispr-prestige-hardened_genes"]}}),En("add","challenges-gameplay","intro",F("wiki_menu_intro"));{let e=Tn(a,{name:"genes_intro",template:"challenges",paragraphs:5,break:[4],h_level:2,para_data:{1:[F("evo_challenge_genes")],2:[F("mastery")],3:[F("mastery")],5:[F("evo_challenge_genes")]},data_link:{1:["wiki.html#mechanics-gameplay-challenge"],2:["wiki.html#mechanics-gameplay-mastery"],3:["wiki.html#mechanics-gameplay-mastery"]}});En("add","challenges-gameplay","genes_intro",F("wiki_challenges_genes_intro")),Tn(e,{name:"genes_plasmid",template:"challenges",paragraphs:4,break:[4],h_level:2,para_data:{1:[F("evo_challenge_plasmid"),F("wiki_challenges_gene"),F("resource_Plasmid_plural_name")],2:[F("city_temple"),F("resource_Plasmid_plural_name"),F("faith")],3:[F("resource_Plasmid_plural_name")],4:[F("wiki_challenges_gene"),F("universe_antimatter")]},data_link:{1:[!1,!1,"wiki.html#resources-prestige-plasmids"],2:["wiki.html#planetary-structures-temple"],4:[!1,"wiki.html#universes-gameplay-antimatter"]}}),Kn("add","challenges-gameplay","genes_plasmid",F("wiki_challenges_genes_plasmid")),Tn(e,{name:"genes_mastery",template:"challenges",paragraphs:2,break:[2],h_level:2,para_data:{1:[F("evo_challenge_mastery"),F("wiki_challenges_gene"),F("mastery"),"1/5","1/10"],2:[F("wiki_challenges_gene"),F("universe_antimatter")]},data_link:{1:[!1,!1,"wiki.html#mechanics-gameplay-mastery"],2:[!1,"wiki.html#universes-gameplay-antimatter"]}}),Kn("add","challenges-gameplay","genes_mastery",F("wiki_challenges_genes_mastery")),Tn(e,{name:"genes_trade",template:"challenges",paragraphs:2,h_level:2,para_data:{1:[F("evo_challenge_trade"),F("wiki_challenges_gene"),F("resource_market_buy"),F("resource_market_sell")],2:[F("resource_market_trade_routes")]}}),Kn("add","challenges-gameplay","genes_trade",F("wiki_challenges_genes_trade")),Tn(e,{name:"genes_craft",template:"challenges",paragraphs:2,h_level:2,para_data:{1:[F("evo_challenge_craft"),F("wiki_challenges_gene")],2:[F("job_craftsman")]}}),Kn("add","challenges-gameplay","genes_craft",F("wiki_challenges_genes_craft"));{let t=Tn(e,{name:"genes_crispr",template:"challenges",paragraphs:2,h_level:2,para_data:{1:[F("evo_challenge_crispr"),F("wiki_challenges_gene"),F("tab_arpa_crispr"),F("wiki_arpa_crispr_creep"),"1/5"]},data_link:{1:[!1,!1,!1,"wiki.html#crispr-prestige-genetic_memory"]}});t.find("div.para").append(`${F("wiki_challenges_genes_bad_para2")}`);let a=$(`\n
                      \n ${F("wiki_challenges_genes_crispr_para3")}\n
                      \n `);t.append(a);let r=!1;Ti.forEach((function(e){a.append(`${r?", ":""}${F("trait_"+e+"_name")}`),r=!0})),Kn("add","challenges-gameplay","genes_crispr",F("wiki_challenges_genes_crispr"))}Tn(e,{name:"genes_bad",template:"challenges",paragraphs:4,break:[3,4],h_level:2,para_data:{1:[1,2],4:[F("wiki_challenges_gene"),F("evo_challenge_truepath")]},data_link:{4:[!1,"wiki.html#challenges-gameplay-scenarios_truepath"]}}),Kn("add","challenges-gameplay","genes_bad",F("wiki_challenges_genes_bad"));{let a="antimatter"===t.race.universe?["20%","50%","50%","33%"]:["50%","20%","50%","33%"];Tn(e,{name:"genes_weak",template:"challenges",paragraphs:5,break:[2,3,4,5],h_level:2,para_data:{1:[a[0]],2:[a[1]],3:[a[2]],4:[a[3]],5:[F("wiki_challenges_gene"),F("evo_challenge_truepath")]},data_link:{5:[!1,"wiki.html#challenges-gameplay-scenarios_truepath"]}}),Kn("add","challenges-gameplay","genes_weak",F("wiki_challenges_genes_weak"))}}{let e=Tn(a,{name:"modes_intro",template:"challenges",paragraphs:2,h_level:2,para_data:{1:[F("evo_challenge_run"),F("evo_challenge_genes")],2:[F("wiki_challenges_mode")]}});En("add","challenges-gameplay","modes_intro",F("wiki_challenges_modes_intro")),gc(Tn(e,{name:"modes_joyless",template:"challenges",paragraphs:4,break:[3,4],h_level:2,para_data:{1:[F("evo_challenge_joyless"),F("wiki_challenges_mode"),F("tech_theatre")],2:[F("job_entertainer"),F("morale_broadcast"),di(),F("morale")],3:[F("wiki_challenges_mode"),Sr.space.spc_red.biodome.title(),F("tech_theatre")],4:[F("wiki_challenges_scenarios_cataclysm"),F("wiki_challenges_scenario")]},data_link:{1:[!1,!1,"wiki.html#civilized-tech-theatre"],2:[!1,!1,"wiki.html#planetary-structures-wardenclyffe"],3:[!1,"wiki.html#space-structures-biodome","wiki.html#civilized-tech-theatre"],4:["wiki.html#challenges-gameplay-scenarios_cataclysm"]}}),!1,["joyless"]),Kn("add","challenges-gameplay","modes_joyless",F("wiki_challenges_modes_joyless"));{let t=Tn(e,{name:"modes_steelen",template:"challenges",paragraphs:4,break:[4],h_level:2,para_data:{1:[F("evo_challenge_steelen"),F("wiki_challenges_mode"),F("resource_Steel_name")+" "+F("modal_smelting"),F("resource_Steel_name")],2:[F("resource_Steel_name")],3:[F("tech_steel"),F("tech_bessemer_process"),F("tech_oxygen_converter"),F("tech_electric_arc_furnace")],4:[F("wiki_challenges_mode"),F("wiki_resets_bioseed")]},data_link:{3:["wiki.html#civilized-tech-steel","wiki.html#discovery-tech-bessemer_process","wiki.html#industrialized-tech-oxygen_converter","wiki.html#globalized-tech-electric_arc_furnace"],4:[!1,"wiki.html#resets-prestige-bioseed"]}});gc(t,!1,["steelen"]),gc(t,!0,["steelem"]),Kn("add","challenges-gameplay","modes_steelen",F("wiki_challenges_modes_steelen"))}{let a=Tn(e,{name:"modes_decay",template:"challenges",paragraphs:6,break:[4,6],h_level:2,para_data:{1:[F("evo_challenge_decay"),F("wiki_challenges_mode")],2:[F("resource_Money_name"),F("wiki_calc_citizens"),F("resource_Knowledge_name"),F("resource_Zen_name"),F("resource_Crates_plural"),F("resource_Containers_plural")],3:[50],4:["0/s"],6:[F("wiki_challenges_mode"),F("wiki_resets_blackhole"),F("wiki_resets_vacuum")]},data_link:{6:[!1,"wiki.html#resets-prestige-blackhole","wiki.html#resets-prestige-vacuum"]}});gc(a,!1,["dissipated"]),vc(a,[{text:"wiki_challenges_reqs_reset",subreqs:[{text:F("wiki_resets_blackhole"),color:!!t.stats.achieve.whitehole,link:"wiki.html#resets-prestige-blackhole"}]}]),function(e){let t=$('
                      ');e.append(t);let a=$("
                      "),r=$("
                      ");t.append(a),t.append(r);let i={resource:{val:void 0},amount:{val:void 0}},s={result:{vis:!1,val:void 0}};a.append(`\n
                      \n

                      ${F("wiki_calc_decay_rate")}

                      \n
                      \n
                      \n {{ i.resource.val | base }} * 0.001 * ({{ i.amount.val, 'amount' | generic }} - 50) = {{ | calc }}\n
                      \n `);let n=$("
                      ");r.append(n);let c=`\n
                      ${F("wiki_calc_decay_resource")} \n \n `;Object.keys(Fa).forEach((function(e){c+=`\n {{ '${e}' | resLabel }}\n `})),c+="
                      ",n.append(c),n.append(`\n
                      ${F("wiki_calc_decay_amount")}
                      \n `),r.append(`\n
                      \n \n
                      \n `),zs({el:"#decayCalc",data:{i,s},methods:{val(e){i[e].val&&i[e].val<0&&(i[e].val=0)},pickRes(e){i.resource.val=e},resetInputs(){i.resource.val=void 0,i.amount.val=void 0}},filters:{generic:(e,t)=>void 0!==e?e:F("wiki_calc_decay_"+t),base:e=>e?Fa[e]:F("wiki_calc_decay_base"),resLabel:e=>F(e?`resource_${e}_name`:"wiki_calc_decay_resource"),calc(){if(s.result.vis=void 0!==i.resource.val&&void 0!==i.amount.val&&i.amount.val>=50,s.result.vis)return s.result.val=.001*Fa[i.resource.val]*(i.amount.val-50),s.result.val}}})}(Gn(a,"challenges","decay",F("evo_challenge_decay"))),Kn("add","challenges-gameplay","modes_decay",F("wiki_challenges_modes_decay"))}{let a=Tn(e,{name:"modes_emfield",template:"challenges",paragraphs:5,break:[5],h_level:2,para_data:{1:[F("evo_challenge_emfield"),F("wiki_challenges_mode"),"50%",F("evo_challenge_discharge"),"50%"],2:[F("evo_challenge_discharge"),"-50%"],3:[F("city_cement_plant"),F("evo_challenge_discharge"),"50%"],4:[F("space_belt_elerium_ship_title"),F("evo_challenge_discharge"),"-25%"],5:[F("wiki_challenges_mode"),F("wiki_resets_ascension")]},data_link:{3:["wiki.html#planetary-structures-cement_plant"],4:["wiki.html#space-structures-elerium_ship"],5:[!1,"wiki.html#resets-prestige-ascension"]}});gc(a,!1,["technophobe"]),vc(a,[{text:"wiki_challenges_reqs_reset",subreqs:[{text:F("wiki_resets_ascension"),color:!!t.stats.achieve.ascended,link:"wiki.html#resets-prestige-ascension"}]}]),Kn("add","challenges-gameplay","modes_emfield",F("wiki_challenges_modes_emfield"))}{let a=Tn(e,{name:"modes_inflation",template:"challenges",paragraphs:11,break:[4,9,10],h_level:2,para_data:{1:[F("evo_challenge_inflation"),F("wiki_challenges_mode"),F("resource_Money_name")],2:[1,10],3:[F("space_dwarf_collider_title"),F("interstellar_stellar_engine"),1],5:[F("resource_Money_name"),"+1.33%"],6:[F("modal_factory_lux"),"+0.08%",F("resource_Money_name")],7:[F("city_casino"),"+0.08%","+1%",F("resource_Money_name")],8:[F("wiki_mechanics_bank_vault"),"+0.8%",F("resource_Money_name")],9:[F("interstellar_exchange_title"),"2x",F("resource_Money_name"),F("evo_challenge_inflation")],10:[F("wiki_challenges_mode"),F("wiki_challenges_modes_inflation_para10_note1")],11:[F("evo_challenge_inflation")]},data_link:{3:["wiki.html#space-structures-world_collider","wiki.html#interstellar-structures-stellar_engine"],7:["wiki.html#planetary-structures-casino"],8:["wiki.html#mechanics-gameplay-bank_vault"],9:["wiki.html#interstellar-structures-exchange"]}});gc(a,!1,["wheelbarrow"]),vc(a,[{text:"wiki_challenges_reqs_achieve",subreqs:[{text:F("achieve_scrooge_name"),color:!!t.stats.achieve.scrooge}]}]),function(e){let a=$('
                      ');e.append(a);let r=$("
                      "),i=$("
                      ");a.append(r),a.append(i);let s={inflation:{val:void 0}},n={result:{vis:!1,cost:void 0,luxury:void 0,casino_prod:void 0,casino_store:void 0,bank_vault:void 0}};r.append(`\n
                      \n

                      ${F("wiki_calc_inflation_cost")}

                      \n
                      \n
                      \n {{ i.inflation.val, 'inflation' | generic }} / 75 = {{ 'cost' | calc }} = +{{ 'cost', true | calc }}%\n
                      \n
                      \n

                      ${F("wiki_calc_inflation_luxury")}

                      \n
                      \n
                      \n {{ i.inflation.val, 'inflation' | generic }} / 1250 = {{ 'luxury' | calc }} = +{{ 'luxury', true | calc }}%\n
                      \n
                      \n

                      ${F("wiki_calc_inflation_casino_prod")}

                      \n
                      \n
                      \n {{ i.inflation.val, 'inflation' | generic }} / 1250 = {{ 'casino_prod' | calc }} = +{{ 'casino_prod', true | calc }}%\n
                      \n
                      \n

                      ${F("wiki_calc_inflation_casino_store")}

                      \n
                      \n
                      \n {{ i.inflation.val, 'inflation' | generic }} / 100 = {{ 'casino_store' | calc }} = +{{ 'casino_store', true | calc }}%\n
                      \n
                      \n

                      ${F("wiki_calc_inflation_bank_vault")}

                      \n
                      \n
                      \n {{ i.inflation.val, 'inflation' | generic }} / 125 = {{ 'bank_vault' | calc }} = +{{ 'bank_vault', true | calc }}%\n
                      \n `),i.append(`\n
                      \n
                      ${F("wiki_calc_inflation")}
                      \n
                      \n
                      \n \n \n
                      \n `),zs({el:"#inflationCalc",data:{i:s,s:n},methods:{val(e){s[e].val&&s[e].val<0&&(s[e].val=0)},resetInputs(){s.inflation.val=void 0},importInputs(){s.inflation.val=t.race.inflation||0}},filters:{generic:(e,t)=>void 0!==e?e:F("wiki_calc_"+t),calc:(e,t)=>t?(100*n.result[e]).toFixed(3):("cost"===e&&(n.result.vis=void 0!==s.inflation.val,n.result.vis&&(n.result.cost=(s.inflation.val/75).toFixed(5),n.result.luxury=(s.inflation.val/1250).toFixed(5),n.result.casino_prod=(s.inflation.val/1250).toFixed(5),n.result.casino_store=(s.inflation.val/100).toFixed(5),n.result.bank_vault=(s.inflation.val/125).toFixed(5))),n.result[e])}})}(Gn(a,"challenges","inflation",F("evo_challenge_inflation"))),Kn("add","challenges-gameplay","modes_inflation",F("wiki_challenges_modes_inflation"))}{let a=Tn(e,{name:"modes_sludge",template:"challenges",paragraphs:7,break:[3,4,5,6,7],h_level:2,para_data:{1:[F("evo_challenge_sludge"),F("wiki_challenges_challenge"),F("race_sludge")],3:[F("race_sludge"),"10x",F("trait_ooze_name")],4:[F("evo_challenge_sludge")],5:[F("race_sludge"),F("wiki_resets_mad")],6:[F("race_sludge"),F("wiki_resets_cataclysm")],7:[F("wiki_challenges_scenarios_junker")]},data_link:{1:[!1,!1,"wiki.html#races-species-sludge"],3:[!1,!1,"wiki.html#traits-species-major_ooze"],5:[!1,"wiki.html#resets-prestige-mad"]}});gc(a,!1,["extinct_sludge","gross"],{gross:!0}),gc(a,!0,["slime_lord"]),vc(a,[{text:"wiki_challenges_reqs_achieve",subreqs:[{text:F("achieve_extinct_junker_name"),color:!!t.stats.achieve.extinct_junker}]},{text:"wiki_challenges_reqs_reset",subreqs:[{text:F("wiki_resets_ascension"),color:!!t.stats.achieve.ascended,link:"wiki.html#resets-prestige-ascension"},{text:F("wiki_resets_infusion"),color:!!t.stats.achieve.corrupted,link:"wiki.html#resets-prestige-infusion"}]}]),Kn("add","challenges-gameplay","modes_sludge",F("wiki_challenges_modes_sludge"))}{let a=Tn(e,{name:"modes_orbitdecay",template:"challenges",paragraphs:14,break:[5,8,9,10,11,12,13,14],h_level:2,para_data:{1:[F("evo_challenge_orbit_decay")],2:[5e3],5:[F("evo_challenge_orbit_decay")],6:[F("tech_era_intergalactic")],11:[F("space_moon_base_title"),2500],12:[F("space_red_spaceport_title"),F("space_belt_station_title"),1e3],13:[F("interstellar_alpha_starport_title"),100],14:[F("wiki_challenges_scenarios_cataclysm")]}});gc(a,!1,["lamentis"]),vc(a,[{text:"wiki_challenges_reqs_reset",subreqs:[{text:F("wiki_resets_blackhole"),color:!!t.stats.achieve.whitehole,link:"wiki.html#resets-prestige-blackhole"},{text:F("wiki_resets_ascension"),color:!!t.stats.achieve.ascended,link:"wiki.html#resets-prestige-ascension"}]}]),Kn("add","challenges-gameplay","modes_orbitdecay",F("wiki_challenges_modes_orbitdecay"))}{let a=Tn(e,{name:"modes_witchhunter",template:"challenges",paragraphs:7,break:[4],h_level:2,para_data:{1:[F("evo_challenge_witch_hunter")],4:["300%","150%","75%"],7:[100]}});gc(a,!1,["soul_sponge","nightmare"]),vc(a,[{text:"wiki_challenges_reqs_reset",subreqs:[{text:`${F("wiki_universe_magic")} ${F("wiki_resets_ascension")}`,color:!(!t.stats.achieve.ascended||!t.stats.achieve.ascended.mg),link:"wiki.html#resets-prestige-ascension"}]}]),Kn("add","challenges-gameplay","modes_witchhunter",F("wiki_challenges_modes_witchhunter"))}}{let e=Tn(a,{name:"scenarios_intro",template:"challenges",paragraphs:3,h_level:2,para_data:{1:[F("evo_scenario")],2:[F("evo_challenge_genes"),F("evo_challenge_run")],3:[F("evo_challenge_genes"),F("evo_challenge_run"),F("wiki_challenges_scenario")]}});En("add","challenges-gameplay","scenarios_intro",F("wiki_challenges_scenarios_intro"));{let t=Tn(e,{name:"scenarios_junker",template:"challenges",paragraphs:4,break:[3,4],h_level:2,para_data:{1:[F("evo_challenge_junker"),F("wiki_challenges_scenario"),F("race_junker")],3:[F("wiki_challenges_scenario"),F("wiki_resets_mad")],4:[F("wiki_challenges_modes_sludge")]},data_link:{1:[!1,!1,"wiki.html#races-species-junker"],3:[!1,"wiki.html#resets-prestige-mad"]}});gc(t,!1,["extinct_junker"]),gc(t,!0,["organ_harvester","the_misery","garbage_pie"]),Kn("add","challenges-gameplay","scenarios_junker",F("wiki_challenges_scenarios_junker"))}{let a=Tn(e,{name:"scenarios_cataclysm",template:"challenges",paragraphs:9,break:[4,5,6,8,9],h_level:2,para_data:{1:[F("evo_challenge_cataclysm"),F("wiki_challenges_scenario"),F("wiki_resets_cataclysm")],2:[F("evo_challenge_cataclysm"),F("city_casino"),Dn("hell")],4:[F("evo_challenge_cataclysm")],5:[F("civics_foreign"),F("tech_unification")],7:[F("trait_parasite_name"),"20x"],8:[F("resource_Plasmid_plural_name"),F("resource_AntiPlasmid_plural_name"),300,F("wiki_challenges_scenario"),F("resource_Phage_name")],9:[F("wiki_challenges_scenario"),F("wiki_resets_bioseed")]},data_link:{1:[!1,!1,"wiki.html#resets-prestige-cataclysm"],2:[!1,"wiki.html#space-structures-spc_casino"],5:[!1,"wiki.html#early_space-tech-unification2"],7:["wiki.html#traits-species-major_parasite"],8:["wiki.html#resources-prestige-plasmids","wiki.html#resources-prestige-antiplasmids",!1,!1,"wiki.html#resources-prestige-phage"],9:[!1,"wiki.html#resets-prestige-bioseed"]}});gc(a,!1,["iron_will","failed_history"]),gc(a,!0,["finish_line"]),vc(a,[{text:"wiki_challenges_reqs_reset",subreqs:[{text:F("wiki_resets_cataclysm"),color:!!t.stats.achieve.shaken,link:"wiki.html#resets-prestige-cataclysm"}]}]),Kn("add","challenges-gameplay","scenarios_cataclysm",F("wiki_challenges_scenarios_cataclysm"))}{let a=Tn(e,{name:"scenarios_banana",template:"challenges",paragraphs:18,break:[2,4,5,8,9,10,18],h_level:2,para_data:{1:[F("evo_challenge_banana"),F("wiki_challenges_scenario"),F("resource_Money_name"),F("morale_tax")],2:[F("tech_unification"),F("evo_challenge_banana")],3:[F("tech_unification"),F("restore")],4:[F("morale_tax"),"95%",F("civics_tax_rates"),F("wiki_challenges_scenarios_banana_para4_note1")],5:[F("tab_market"),F("tech_sundial"),F("evo_challenge_banana"),1,F("resource_Food_name"),F("tech_trade")],6:[F("resource_market_trade_routes")],7:[F("resource_market_trade_routes"),10,25,F("tech_large_trades"),1e6,F("tech_massive_trades")],8:[F("civics_foreign"),"2x","50%"],9:[F("civics_garrison_soldiers"),"20%",F("tab_portal")],10:[F("galaxy_scout_ship"),7,10],11:[F("galaxy_corvette_ship"),21,30],12:[F("galaxy_frigate_ship"),56,80],13:[F("galaxy_cruiser_ship"),175,250],14:[F("galaxy_dreadnought"),1260,1800],15:[F("galaxy_armed_miner"),4,5],16:[F("galaxy_minelayer"),35,50],17:[F("galaxy_raider"),9,12],18:[F("wiki_challenges_scenario"),F("achieve_banana_name")]},data_link:{2:["wiki.html#early_space-tech-unification2"],3:["wiki.html#early_space-tech-unification2"],5:[!1,"wiki.html#primitive-tech-sundial",!1,!1,!1,"wiki.html#civilized-tech-trade"],7:[!1,!1,!1,"wiki.html#civilized-tech-large_trades",!1,"wiki.html#globalized-tech-massive_trades"],10:["wiki.html#intergalactic-structures-scout_ship"],11:["wiki.html#intergalactic-structures-corvette_ship"],12:["wiki.html#intergalactic-structures-frigate_ship"],13:["wiki.html#intergalactic-structures-cruiser_ship"],14:["wiki.html#intergalactic-structures-dreadnought"],15:["wiki.html#intergalactic-structures-armed_miner"],16:["wiki.html#intergalactic-structures-minelayer"],17:["wiki.html#intergalactic-structures-raider"],18:[!1,"wiki.html#perks-prestige-banana"]}});gc(a,!1,["banana"]),gc(a,!0,["banana"]),vc(a,[{text:"wiki_challenges_reqs_reset",subreqs:[{text:F("wiki_resets_blackhole"),color:!!t.stats.achieve.whitehole,link:"wiki.html#resets-prestige-blackhole"},{text:F("wiki_resets_ascension"),color:!!t.stats.achieve.ascended,link:"wiki.html#resets-prestige-ascension"}]}]),Kn("add","challenges-gameplay","scenarios_banana",F("wiki_challenges_scenarios_banana"))}{let a=Tn(e,{name:"scenarios_truepath",template:"challenges",paragraphs:5,break:[5],h_level:2,para_data:{1:[F("evo_challenge_truepath"),F("wiki_challenges_scenario")],2:[F("tech_era_deep_space")],3:[F("tech_era_interstellar"),F("tech_era_solar")]},data_link:{2:["wiki.html#deep_space-tech"],3:["wiki.html#interstellar-tech","wiki.html#solar-tp_tech"]}});Tn(a,{name:"scenarios_truepath_genes",template:"challenges",paragraphs:1,h_level:2,para_data:{1:[F("evo_challenge_plasmid"),F("evo_challenge_crispr"),F("evo_challenge_badgenes"),F("evo_challenge_nerfed")]},data_link:{1:["wiki.html#challenges-gameplay-genes_plasmid","wiki.html#challenges-gameplay-genes_crispr","wiki.html#challenges-gameplay-genes_bad","wiki.html#challenges-gameplay-genes_weak"]}}),Tn(a,{name:"scenarios_truepath_rival",template:"challenges",paragraphs:5,break:[2,3,5],h_level:2}),Tn(a,{name:"scenarios_truepath_syndicate",template:"challenges",paragraphs:2,h_level:2}),Tn(a,{name:"scenarios_truepath_costs",template:"challenges",paragraphs:4,break:[2,3,4],h_level:2,para_data:{2:["3x"],3:["2x"]}}),Tn(a,{name:"scenarios_truepath_market",template:"challenges",paragraphs:1,h_level:2,para_data:{1:["2x"]}}),Tn(a,{name:"scenarios_truepath_tax",template:"challenges",paragraphs:3,break:[2,4],h_level:2,para_data:{1:["50%"],2:[F("tech_merchandising"),F("city_temple")]}}),Tn(a,{name:"scenarios_truepath_money",template:"challenges",paragraphs:2,break:[2],h_level:2,para_data:{1:[F("city_bank"),"25%"],2:[F("city_casino"),"50%"]}}),Tn(a,{name:"scenarios_truepath_morale",template:"challenges",paragraphs:1,h_level:2,para_data:{1:["25%"]}}),Tn(a,{name:"scenarios_truepath_foreign",template:"challenges",paragraphs:1,h_level:2}),Tn(a,{name:"scenarios_truepath_fuel",template:"challenges",paragraphs:1,h_level:2,para_data:{1:["25%","150%"]}}),gc(a,!1,["pathfinder","overlord","ashanddust","exodus","obsolete","bluepill","retired"],{ashanddust:!0,exodus:!0,obsolete:!0,bluepill:!0,retired:!0}),vc(a,[{text:"wiki_challenges_reqs_reset",subreqs:[{text:F("wiki_resets_ascension"),color:!!t.stats.achieve.ascended,link:"wiki.html#resets-prestige-ascension"},{text:F("wiki_resets_infusion"),color:!!t.stats.achieve.corrupted,link:"wiki.html#resets-prestige-infusion"}]}]),Kn("add","challenges-gameplay","scenarios_truepath",F("wiki_challenges_scenarios_truepath"))}{let a=Tn(e,{name:"scenarios_lone_survivor",template:"challenges",paragraphs:4,break:[4],h_level:2,para_data:{1:[F("evo_challenge_lone_survivor"),F("wiki_challenges_scenario"),F("tab_tauceti")],3:[F("evo_challenge_truepath")],4:[F("wiki_challenges_scenario"),F("wiki_resets_eden")]},data_link:{4:[!1,"wiki.html#resets-prestige-eden"]}});gc(a,!1,["adam_eve"]),vc(a,[{text:"wiki_challenges_reqs_reset",subreqs:[{text:F("wiki_resets_retired"),color:!!t.stats.achieve.retired,link:"wiki.html#resets-prestige-retired"}]}]),Kn("add","challenges-gameplay","scenarios_lone_survivor",F("wiki_challenges_scenarios_lone_survivor"))}}}(a);break;case"resets":kc(a);break;case"planets":Nn(a);break;case"universes":!function(e){let t=En("create",e),a=[];Object.keys(Qt).forEach((function(e){a.push(e)}));let r=a.map((e=>`${F(`universe_${e}`)}`));Tn(t,{name:"intro",template:"universe",paragraphs:3,break:[2],h_level:2,para_data:{1:[a.length,r.slice(0,-1).join(", ")+`, ${F("or")} ${r[r.length-1]}`],2:[F("universe_standard")],3:[F("wiki_resets_blackhole")]},data_color:{1:["warning","plain"],2:["caution"]},data_link:{3:["wiki.html#resets-gameplay-blackhole"]}}),En("add","universes-gameplay","intro",F("wiki_menu_intro")),Tn(t,{name:"standard",template:"universe",paragraphs:3,break:[2],h_level:2,para_data:{1:[F("universe_standard")],2:[F("wiki_p_res_dark")],3:[F("wiki_p_res_dark"),+(100*(Ts("standard",!1,!0)-1)).toFixed(3)+"%"]},data_color:{1:["caution"]}}),En("add","universes-gameplay","standard",F("wiki_universe_standard"));let i=+(100*(1.25+.5*Ts("heavy",!1,!0)-1)).toFixed(3)+"%",s=+(100*(1.2+.3*Ts("heavy",!1,!0)-1)).toFixed(3)+"%";Tn(t,{name:"heavy",template:"universe",paragraphs:9,break:[5,8],h_level:2,para_data:{1:[Qt.heavy.desc],2:[F("resource_Oil_name"),F("resource_Helium_3_name"),F("resource_Deuterium_name")],3:[F("tab_space"),"75%"],4:[F("tab_interstellar"),F("tab_galactic"),"50%"],5:[F("wiki_universe_heavy")],6:["5%",F("resource_Plasmid_plural_name"),F("resource_Phage_name"),F("resource_Dark_name")],7:[F("resource_Harmony_name"),"20%"],8:[F("wiki_p_res_dark")],9:[F("wiki_p_res_dark"),i,s]},data_color:{1:["plain"]},data_link:{6:["plain","wiki.html#resources-prestige-plasmids","wiki.html#resources-prestige-phage","wiki.html#resources-prestige-dark"],7:["wiki.html#resources-prestige-harmony","plain"]}}),En("add","universes-gameplay","heavy",F("wiki_universe_heavy")),Tn(t,{name:"antimatter",template:"universe",paragraphs:9,break:[3,6,8],h_level:2,para_data:{1:[F("universe_antimatter")],2:[F("resource_AntiPlasmid_plural_name"),F("resource_Plasmid_plural_name")],3:[F("evo_challenge_plasmid"),F("evo_challenge_mastery")],4:["50%"],5:["50%","6%"],7:["10%"],8:[F("wiki_p_res_dark")],9:[F("wiki_p_res_dark"),+(100*(Ts("antimatter",!1,!0)-1)).toFixed(3)+"%"]},data_color:{1:["caution"]},data_link:{2:["wiki.html#resources-prestige-antiplasmids","wiki.html#resources-prestige-plasmids"]}}),En("add","universes-gameplay","antimatter",F("wiki_universe_antimatter")),Tn(t,{name:"evil",template:"universe",paragraphs:7,break:[2,5],h_level:2,para_data:{2:[F("trait_evil_name")],3:[F("trait_evil_name")],4:[F("biome_hellscape_name"),F("biome_eden_name")],5:[F("wiki_p_res_dark")],7:[F("wiki_p_res_dark"),+(100*(Ts("evil",!1,!0)-1)).toFixed(3)+"%"]}}),En("add","universes-gameplay","evil",F("wiki_universe_evil")),Tn(t,{name:"micro",template:"universe",paragraphs:6,break:[2,4],h_level:2,para_data:{1:["75%"],4:[F("wiki_p_res_dark")],5:[F("wiki_p_res_dark"),Ts("micro",!1,!0),Ts("micro",!0,!0)],6:["1.005"]}}),En("add","universes-gameplay","micro",F("wiki_universe_micro")),Tn(t,{name:"magic",template:"universe",paragraphs:8,break:[4,7],h_level:2,para_data:{6:[80],7:[F("wiki_p_res_dark")],8:[F("wiki_p_res_dark"),+(100*(Ts("magic",!1,!0)-1)).toFixed(3)+"%"]}}),En("add","universes-gameplay","magic",F("wiki_universe_magic"))}(a);break;case"hell":!function(e){let t=En("create",e);t.append(`

                      ${F("wiki_hell")}

                      `),Tn(t,{name:"threat",template:"hell",paragraphs:3,para_data:{1:["10,000"],2:["1000-1250"]},data_color:{1:["caution"],2:["warning"]}}),En("add","hell-gameplay","threat",F("wiki_hell_threat")),Tn(t,{name:"siege",template:"hell",paragraphs:5,para_data:{3:["5k+"]},data_color:{3:["caution"]}}),En("add","hell-gameplay","siege",F("wiki_hell_siege")),Tn(t,{name:"strategy",template:"hell",paragraphs:3}),En("add","hell-gameplay","strategy",F("wiki_hell_strategy"));let a=Tn(t,{name:"soul_gem",template:"hell",paragraphs:4,para_data:{1:[F("wiki_hell_soul_gem"),F("tab_portal")],3:[F("tech_demon_attractor")]}}),r=$("
                      ");a.append(r),En("add","hell-gameplay","soul_gem",F("wiki_hell_soul_gem")),Tn(t,{name:"infernite",template:"hell",paragraphs:4}),En("add","hell-gameplay","infernite",F("wiki_hell_infernite")),t.append(`

                      ${F("wiki_hell_deep")}

                      `),Tn(t,{name:"pit",template:"hell",paragraphs:3,para_data:{1:["1,000,000",F("galaxy_telemetry_beacon")],2:[F("portal_soul_forge_title")]},data_link:{1:[!1,"wiki.html#intergalactic-structures-telemetry_beacon"],2:["wiki.html#hell-structures-soul_forge"]}}),En("add","hell-gameplay","pit",F("wiki_hell_pit")),Tn(t,{name:"corrupted",template:"hell",paragraphs:3,para_data:{1:[F("tech_metaphysics"),F("portal_soul_forge_title"),F("resource_Corrupt_Gem_name")],2:[F("portal_ruins_name")],3:[F("tech_era_intergalactic")]},data_link:{1:["wiki.html#intergalactic-tech-metaphysics"]}}),En("add","hell-gameplay","corrupted",F("wiki_hell_corrupted"));let i=Ds();Tn(t,{name:"pillar",template:"hell",paragraphs:6,break:[4,5,6],para_data:{1:[F("portal_ruins_name")],2:["1%",F("harmonic")],3:["3%"],4:[F("harmonic"),"2%","6%"],5:[F("wiki_hell_pillar_para5d1"),12],6:[F("harmonic"),`${(100*(i[0]-1)).toFixed(0)}%`,`${(100*(i[1]-1)).toFixed(0)}%`]},data_link:{5:["wiki.html#hell-structures-west_tower"]}}),En("add","hell-gameplay","pillar",F("wiki_hell_pillar")),t.append(`

                      ${F("portal_spire_name")}

                      `),Tn(t,{name:"spire",template:"hell",paragraphs:5,break:[4],para_data:{4:[F("resource_Blood_Stone_name")],5:[F("wiki_resets_infusion")]},data_link:{5:["wiki.html#resets-prestige-infusion"]}}),En("add","hell-gameplay","spire",F("portal_spire_name"));{let e=Tn(t,{name:"mech",template:"hell",paragraphs:2,para_data:{2:[5,F("portal_mech_size_small"),F("portal_mech_size_medium"),F("portal_mech_size_large"),F("portal_mech_size_titan"),F("portal_mech_size_collector")]}}),a=ya("small");Tn(e,{name:"scout",template:"hell",paragraphs:10,break:[3,4,5,6,10],h_level:4,header:!0,para_data:{1:[F("portal_mech_size_small")],2:[1,1,F("arpa_blood_prepared_title")],3:[(100*Pa("small")).toFixed(2)],4:[wa("small"),a.c,a.s],5:[F("portal_mech_equip_jumpjet")],7:["1%"],8:[F("portal_spire_status_fog"),F("portal_spire_status_dark")],9:["100%"],10:["8%"]},data_link:{2:[!1,!1,"wiki.html#blood-prestige-prepared"]}});let r=ya("medium");Tn(e,{name:"standard",template:"hell",paragraphs:6,break:[3,4,5,6],h_level:4,header:!0,para_data:{1:[F("portal_mech_size_medium")],2:[1,1,2,F("arpa_blood_prepared_title")],3:[(100*Pa("medium")).toFixed(2)],4:[wa("medium"),r.c,r.s],5:[F("portal_mech_equip_jumpjet")],6:["5%"]},data_link:{2:[!1,!1,!1,"wiki.html#blood-prestige-prepared"]}});let i=ya("large");Tn(e,{name:"heavy",template:"hell",paragraphs:6,break:[3,4,5,6],h_level:4,header:!0,para_data:{1:[F("portal_mech_size_large")],2:[2,2,3,F("arpa_blood_prepared_title")],3:[(100*Pa("large")).toFixed(2)],4:[wa("large"),i.c,i.s],5:[F("portal_mech_equip_battery")]},data_link:{2:[!1,!1,!1,"wiki.html#blood-prestige-prepared"]}});let s=ya("titan");Tn(e,{name:"titan",template:"hell",paragraphs:7,break:[3,4,5,6,7],h_level:4,header:!0,para_data:{1:[F("portal_mech_size_titan")],2:[4,4,5,F("arpa_blood_prepared_title")],3:[(100*Pa("titan")).toFixed(2)],4:[wa("titan"),s.c,s.s],5:[F("portal_mech_equip_target")],7:["25%"]},data_link:{2:[!1,!1,!1,"wiki.html#blood-prestige-prepared"]}});let n=ya("collector");Tn(e,{name:"collector",template:"hell",paragraphs:5,break:[3,4,5],h_level:4,header:!0,para_data:{1:[F("portal_mech_size_collector")],2:[2,3,F("arpa_blood_prepared_title")],3:[wa("collector"),n.c,n.s],4:[F("portal_mech_equip_jumpjet")]},data_link:{2:[!1,!1,"wiki.html#blood-prestige-prepared"]}}),En("add","hell-gameplay","mech",F("wiki_hell_mech"))}{let e=["wheel","tread","biped","quad","spider","hover"],a=["sand","swamp","forest","jungle","rocky","gravel","muddy","grass","brush","concrete"],r=[];r.push(e.length),e.forEach((function(e){r.push(F(`portal_mech_chassis_${e}`))}));let i=Tn(t,{name:"chassis",template:"hell",paragraphs:4,para_data:{1:r,2:[a.length]}});a.forEach((function(t){let a={};for(let r=1;r<=e.length;r++){let i=+(100*qa({chassis:e[r-1],size:"small"},t)).toFixed(1),s=+(100*qa({chassis:e[r-1],size:"large"},t)).toFixed(1);a[r+1]=`${F("wiki_hell_effectiveness",[`${F(`portal_mech_chassis_${e[r-1]}`)}`,`${i}%`,`${s}%`,'S','L'])}`}Tn(i,{name:`t_${t}`,template:"hell",label:F(`portal_spire_type_${t}`),paragraphs:7,break:[2,3,4,5,6,7],h_level:4,header:!0,text:{1:`portal_spire_type_${t}_desc`},rawtext:a,pclass:"col2 sk1"})})),En("add","hell-gameplay","chassis",F("wiki_hell_chassis"))}{let e=["laser","flame","plasma","kinetic","missile","sonic","shotgun","tesla"],a=Tn(t,{name:"monsters",template:"hell",paragraphs:4,para_data:{2:[e.length]}});Object.keys(fa).forEach((function(t){let r={};for(let a=1;a<=e.length;a++){let i=+(100*(fa[t].weapon.hasOwnProperty(e[a-1])?fa[t].weapon[e[a-1]]:1)).toFixed(0);r[a]=`${F("wiki_hell_weapon_effect",[`${F(`portal_mech_weapon_${e[a-1]}`)}`,`${i}%`])}`}Tn(a,{name:`boss_${t}`,template:"hell",label:F(`portal_mech_boss_${t}`),paragraphs:8,break:[2,3,4,5,6,7,8],h_level:4,header:!0,rawtext:r,pclass:"col2"})})),En("add","hell-gameplay","monsters",F("wiki_hell_monsters"))}{let e=Tn(t,{name:"hazard",template:"hell",paragraphs:8,break:[3,4,5,6,7],para_data:{3:["+1","10+"],4:[`6/(105-${F("wiki_hell_hazard_para3_note")})`,"+1","25-100"],5:[`11/(260-${F("wiki_hell_hazard_para3_note")})`,"+1","101-250"],6:[`26/(1025-${F("wiki_hell_hazard_para3_note")})`,"+1","251-1000"],7:["-1"],8:[F("portal_spire_status_freeze"),F("portal_spire_status_hot"),F("portal_spire_status_rain"),F("portal_spire_status_hail")]}}),a={1:"wiki_hell_hazard_effect",2:"wiki_hell_hazard_counter"};Tn(e,{name:"h_freeze",template:"hell",label:F("portal_spire_status_freeze"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["75%"],2:[F("portal_mech_equip_radiator")]}}),Tn(e,{name:"h_hot",template:"hell",label:F("portal_spire_status_hot"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["75%"],2:[F("portal_mech_equip_coolant")]}}),Tn(e,{name:"h_corrosive",template:"hell",label:F("portal_spire_status_corrosive"),paragraphs:3,break:[2,3],h_level:4,header:!0,text:{1:"wiki_hell_hazard_effect",2:"wiki_hell_hazard_counter",3:"wiki_hell_hazard_partial"},para_data:{1:["75%"],2:[F("portal_mech_equip_ablative")],3:[F("portal_mech_equip_shields")]}}),Tn(e,{name:"h_humid",template:"hell",label:F("portal_spire_status_humid"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["25%"],2:[F("portal_mech_equip_seals")]}}),Tn(e,{name:"h_windy",template:"hell",label:F("portal_spire_status_windy"),paragraphs:1,h_level:4,header:!0,text:{1:"wiki_hell_hazard_chassis"},para_data:{1:["50%",F("portal_mech_chassis_hover")]}}),Tn(e,{name:"h_hilly",template:"hell",label:F("portal_spire_status_hilly"),paragraphs:1,h_level:4,header:!0,text:{1:"wiki_hell_hazard_not_chassis"},para_data:{1:["25%",F("portal_mech_chassis_spider")]}}),Tn(e,{name:"h_mountain",template:"hell",label:F("portal_spire_status_mountain"),paragraphs:2,break:[2],h_level:4,header:!0,text:{1:"wiki_hell_hazard_either",2:"wiki_hell_hazard_partial"},para_data:{1:["50%",F("portal_mech_chassis_spider"),F("portal_mech_equip_grapple")],2:[F("portal_mech_equip_flare")]}}),Tn(e,{name:"h_radioactive",template:"hell",label:F("portal_spire_status_radioactive"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["50%"],2:[F("portal_mech_equip_shields")]}}),Tn(e,{name:"h_quake",template:"hell",label:F("portal_spire_status_quake"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["75%"],2:[F("portal_mech_equip_stabilizer")]}}),Tn(e,{name:"h_dust",template:"hell",label:F("portal_spire_status_dust"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["50%"],2:[F("portal_mech_equip_seals")]}}),Tn(e,{name:"h_river",template:"hell",label:F("portal_spire_status_river"),paragraphs:1,h_level:4,header:!0,text:{1:"wiki_hell_hazard_not_chassis"},para_data:{1:["35%",F("portal_mech_chassis_hover")]}}),Tn(e,{name:"h_tar",template:"hell",label:F("portal_spire_status_tar"),paragraphs:2,break:[2],h_level:4,header:!0,text:{1:"wiki_hell_hazard_not_chassis",2:"wiki_hell_hazard_worse"},para_data:{1:["25%",F("portal_mech_chassis_quad")],2:["50%",F("portal_mech_chassis_tread"),F("portal_mech_chassis_wheel")]}}),Tn(e,{name:"h_steam",template:"hell",label:F("portal_spire_status_steam"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["25%"],2:[F("portal_mech_equip_shields")]}}),Tn(e,{name:"h_flooded",template:"hell",label:F("portal_spire_status_flooded"),paragraphs:1,h_level:4,header:!0,text:{1:"wiki_hell_hazard_not_chassis"},para_data:{1:["65%",F("portal_mech_chassis_hover")]}}),Tn(e,{name:"h_fog",template:"hell",label:F("portal_spire_status_fog"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["80%"],2:[F("portal_mech_equip_sonar")]}}),Tn(e,{name:"h_rain",template:"hell",label:F("portal_spire_status_rain"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["25%"],2:[F("portal_mech_equip_seals")]}}),Tn(e,{name:"h_hail",template:"hell",label:F("portal_spire_status_hail"),paragraphs:1,h_level:4,header:!0,text:{1:"wiki_hell_hazard_either2"},para_data:{1:["25%",F("portal_mech_equip_ablative"),F("portal_mech_equip_shields")]}}),Tn(e,{name:"h_chasm",template:"hell",label:F("portal_spire_status_chasm"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["90%"],2:[F("portal_mech_equip_grapple")]}}),Tn(e,{name:"h_dark",template:"hell",label:F("portal_spire_status_dark"),paragraphs:3,break:[2,3],h_level:4,header:!0,text:{1:"wiki_hell_hazard_effect",2:"wiki_hell_hazard_counter",3:"wiki_hell_hazard_partial"},para_data:{1:["90%"],2:[F("portal_mech_equip_infrared")],3:[F("portal_mech_equip_flare")]}}),Tn(e,{name:"h_gravity",template:"hell",label:F("portal_spire_status_gravity"),paragraphs:3,break:[2,3],h_level:4,header:!0,text:{1:"wiki_hell_hazard_gravity",2:"wiki_hell_hazard_gravity",3:"wiki_hell_hazard_gravity"},para_data:{1:[F("portal_mech_size_medium"),"20%"],2:[F("portal_mech_size_large"),"55%"],3:[F("portal_mech_size_titan"),"75%"]}}),En("add","hell-gameplay","hazard",F("wiki_hell_hazard"))}{let e=Tn(t,{name:"equipment",template:"hell",paragraphs:1,h_level:2,para_data:{1:[F("portal_mech_equip_jumpjet"),F("portal_mech_equip_battery"),F("portal_mech_equip_target")]}});En("add","hell-gameplay","equipment",F("wiki_hell_equipment")),Tn(e,{name:"eq_jump",template:"hell",label:F("portal_mech_equip_jumpjet"),paragraphs:4,break:[4],h_level:3,header:!0,para_data:{1:[F("portal_mech_equip_jumpjet"),F("wiki_hell_scout"),F("wiki_hell_standard"),F("wiki_hell_collector")],2:["20%"],3:["10%",F("portal_spire_status_gravity")]}}),Tn(e,{name:"eq_battery",template:"hell",label:F("portal_mech_equip_battery"),paragraphs:2,h_level:3,header:!0,para_data:{1:[F("portal_mech_equip_battery"),F("wiki_hell_heavy")],2:["2%"]}}),Tn(e,{name:"eq_target",template:"hell",label:F("portal_mech_equip_target"),paragraphs:3,h_level:3,header:!0,para_data:{1:[F("portal_mech_equip_target"),F("wiki_hell_titan")],2:["25%"]}})}}(a)}}function xc(e){e.append(`
                      ${F("wiki_arpa_crispr")}
                      `);let a=$("
                      "),r=En("create",a);e.append(a),Object.keys(Oe).forEach((function(e){let a=Oe[e].id.split("-"),i=$(`
                      `);r.append(i),function(e,a){let r=!!(t.genes[Oe[a].grant[0]]&&t.genes[Oe[a].grant[0]]>=Oe[a].grant[1]);e.append(`

                      ${Oe[a].title}

                      ${r?`${F("wiki_arpa_purchased")}`:""}${F(`wiki_arpa_crispr_${Oe[a].grant[0]}`)}: ${Oe[a].grant[1]}
                      `);let i=$('
                      ');e.append(i),i.append(`
                      ${Oe[a].desc}
                      `);let s=$('
                      ');if(i.append(s),Object.keys(Oe[a].cost).forEach((function(e){let r=Oe[a].cost[e]();if(r>0){"Plasmid"===e&&"antimatter"===t.race.universe&&(e="AntiPlasmid");let a=F(`resource_${e}_name`);s.append(`
                      ${a}: ${r}
                      `)}})),Object.keys(Oe[a].reqs).length>0){let r=$(`
                      ${F("wiki_arpa_crispr_req")}
                      `);e.append(r);let i=!1;Object.keys(Oe[a].reqs).forEach((function(e){let s=t.genes[e]&&t.genes[e]>=Oe[a].reqs[e]?"success":"danger";r.append(`${i?", ":""}${F(`wiki_arpa_crispr_${e}`)} ${Oe[a].reqs[e]}`),i=!0}))}if(qc.hasOwnProperty(a)){let t=!1,r=$(`
                      ${F("wiki_arpa_crispr_req_extra")}
                      `);e.append(r),Object.keys(qc[a]).forEach((function(e){let i=qc[a][e].color?"success":"danger",s=qc[a][e].link?`${qc[a][e].title}`:qc[a][e].title;r.append(`${t?", ":""}${s}`),t=!0}))}}(i,e),En("add","crispr-prestige",a[1],Oe[e].title)}))}const qc={universal:[{title:F("wiki_tech_special_universe_not",[F("universe_standard")]),color:"standard"!==t.race.universe,link:"wiki.html#universes-gameplay-standard"}],standard:[{title:F("wiki_tech_special_universe_not",[F("universe_standard")]),color:"standard"!==t.race.universe,link:"wiki.html#universes-gameplay-standard"}],ancients:[{title:F("wiki_arpa_crispr_special_ancients"),color:!!t.genes.old_gods,link:"wiki.html#resets-prestige-intro"}],bleeding_effect:[{title:F("wiki_tech_special_universe",[F("universe_antimatter")]),color:"antimatter"===t.race.universe,link:"wiki.html#universes-gameplay-antimatter"}],blood_remembrance:[{title:F("wiki_arpa_crispr_special_blood_remembrance"),color:t.prestige.Blood_Stone.count>=1,link:"wiki.html#resources-prestige-blood"}]};var Pc={};function jc(e){e.append(`
                      ${F("wiki_arpa_blood")}
                      `);let a=$("
                      "),r=En("create",a);e.append(a),Object.keys(Me).forEach((function(e){let a=Me[e].id.split("-"),i=$(`
                      `);r.append(i),function(e,a){let r=!!(t.blood[Me[a].grant[0]]&&t.blood[Me[a].grant[0]]>=Me[a].grant[1]);e.append(`

                      ${Me[a].title}

                      ${r?`${F("wiki_arpa_purchased")}`:""}${F(`wiki_arpa_blood_${Me[a].grant[0]}`)}: ${Me[a].grant[1]}
                      `);let i=$('
                      ');e.append(i),i.append(`
                      ${Me[a].desc}
                      `);let s=$('
                      ');if(i.append(s),Object.keys(Me[a].cost).forEach((function(e){let t=F(`resource_${e}_name`);if("*"===Me[a].grant[1])s.append(`
                      ${t}: {{ r.${e}.cost }}
                      `);else{let r=Me[a].cost[e]();r>0&&s.append(`
                      ${t}: ${r}
                      `)}})),Object.keys(Me[a].reqs).length>0||Me[a].hasOwnProperty("condition")){let r=$(`
                      ${F("wiki_arpa_crispr_req")}
                      `);e.append(r);let i=!1;if(Object.keys(Me[a].reqs).length>0&&Object.keys(Me[a].reqs).forEach((function(e){let s=t.blood[e]&&t.blood[e]>=Me[a].reqs[e]?"success":"danger";r.append(`${i?", ":""}${F(`wiki_arpa_blood_${e}`)} ${Me[a].reqs[e]}`),i=!0})),Me[a].hasOwnProperty("condition")){let e=t.genes.blood&&t.genes.blood>=3?"success":"danger";r.append(`${i?", ":""}${F("wiki_arpa_crispr_blood")} 3`)}}"*"===Me[a].grant[1]&&function(e,a){let r={owned:0},i={},s=Me[a];r.real_owned=t.blood[a]?t.blood[a]:0;let n=s.cost;Object.keys(n).forEach((function(e){i[e]={}}));let c=function(){Object.keys(i).forEach((function(e){let t=n[e]?n[e](r.owned-r.real_owned):0;i[e].vis=t>0,i[e].cost=t}))};c(),e.append($(`\n
                      \n
                      \n
                      ${F("wiki_calc_level")} -+
                      \n
                      \n
                      \n \n
                      \n
                      \n `)),zs({el:`#${a}`,data:{i:r,r:i},methods:{val(e){r[e]=Math.round(r[e]),r[e]&&r[e]<0&&(r[e]=0),c()},less(e){r[e]>0&&r[e]--},more(e){r[e]++},importInputs(){r.owned=r.real_owned}}})}(e,a)}(i,e),En("add","blood-prestige",a[1],Me[e].title)}))}Object.keys(Oe).forEach((function(e){let t=Oe[e];Pc[t.grant[0]]||(Pc[t.grant[0]]={}),"string"==typeof Oe[e].title?Oe[e].title:Oe[e].title(),Pc[t.grant[0]][t.grant[1]]={name:e}}));var Oc={};Object.keys(Me).forEach((function(e){let t=Me[e];Oc[t.grant[0]]||(Oc[t.grant[0]]={}),"string"==typeof Me[e].title?Me[e].title:Me[e].title(),Oc[t.grant[0]][t.grant[1]]={name:e}}));const Mc={launch_facility:[F("wiki_arpa_project_launch_facility")],monument:[function(){let e=[F("arpa_project_monument_obelisk"),F("arpa_project_monument_statue"),F("arpa_project_monument_sculpture"),F("arpa_project_monument_monolith"),F("arpa_project_monument_pillar"),F("arpa_project_monument_megalith")],t=[F("resource_Stone_name"),F("resource_Aluminium_name"),F("resource_Steel_name"),F("resource_Cement_name"),F("resource_Bones_name"),F("resource_Crystal_name")],a=`
                      ${F("wiki_arpa_project_monument",[e.length,e.join(", ")])}
                      `;for(let r=0;r${F("wiki_arpa_project_monument_type",[`${e[r]}`,`${t[r]}`])}
                      `;return a}(),F("wiki_arpa_project_monument_random"),F("wiki_arpa_project_monument_exceptions")],railway:[F("wiki_arpa_project_railway_homeless",[3,7,11,17,25,38,59,100,225])],roid_eject:[F("wiki_arpa_project_roid_eject")],tp_depot:[F("wiki_arpa_project_depot")],nexus:[F("wiki_arpa_project_magic")],syphon:[F("wiki_arpa_project_magic")]};const Sc=[{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 Cc(a,r,i){$("#content").removeClass("flex");var s,n=e.getItem("evolved")||!1;switch(n&&(s=JSON.parse(LZString.decompressFromUTF16(n)),t=s),$s("page_view",{page_title:`Evolve Wiki - ${a}`}),a){case"intro":Ac(),window.location.hash=`#${a}`;break;case"faq":!function(){let e=$("#content");Cs(e);let a=["update","hotkeys","sethotkeys","offline","moonphase","orbital","lumber","farm","steel","aluminium","titanium","titanium_balorg","polymer","mythril","neutronium","adamantite","infernite","graphene","stanene","aerogel","crates","soft_reset","hard_reset","combat","morale","stress","genetic_decay","cache","aphrodisiac","religion","tax_riots","race","weather","sundial","plasmid","plasmid_keep","plasmid_earn","crispr","creep","phage","phage_earn","phage_benefit","anti_plasmids","temple","temple_break","demonic","celestial","mastery","challenges","perks","feats","support","micro","valdi","quantum","quantum_level","exotic","soul_gem","soul_gem_spend","hell_patrol","surveyors","defense","infusion","dark_energy"],r={neutronium:[Di[t.race.species].solar.gas_moon]};for(let t=0;t
                      ');e.append(i);let s=[];r.hasOwnProperty(a[t])&&(s=r[a[t]]),i.append(`

                      ${F(`wiki_faq_q_${a[t]}`)}

                      `),i.append(`
                      ${F(`wiki_faq_a_${a[t]}`,s)}
                      `)}}(),window.location.hash=`#${a}`;break;case"gameplay":$c(r),zc(a,r,i);break;case"prestige":!function(e){let a=$("#content");switch(Cs(a),e){case"resets":kc(a);break;case"resources":!function(e){let a=En("create",e),r=Tn(a,{name:"plasmids",template:"p_res",paragraphs:2,h_level:2,para_data:{1:[250]},data_color:{1:["warning"]}}),i=Gn(r,"plasmid","gain");yc(i,"plasmid"),i=Gn(r,"plasmid","bonus"),bc(i,"plasmid"),wc(i,"plasmid"),En("add","resources-prestige","plasmids",F("wiki_p_res_plasmids")),r=Tn(a,{name:"antiplasmids",template:"p_res",paragraphs:5,h_level:2,para_data:{4:[F("arpa_genepool_bleeding_effect_title")]},data_link:{4:["wiki.html#crispr-prestige-bleeding_effect"]}}),i=Gn(r,"anti","gain"),yc(i,"plasmid","anti"),i=Gn(r,"anti","bonus"),bc(i,"anti"),wc(i,"anti"),En("add","resources-prestige","antiplasmids",F("wiki_p_res_antiplasmids")),r=Tn(a,{name:"phage",template:"p_res",paragraphs:4,h_level:2}),i=Gn(r,"phage","gain"),yc(i,"phage"),i=Gn(r,"phage","bonus"),wc(i,"phage"),En("add","resources-prestige","phage",F("wiki_p_res_phage"));let s=Tn(a,{name:"dark",template:"p_res",paragraphs:1,h_level:2}),n=$("
                      "),c=$('
                        ');s.append(n),n.append(c),c.append(`
                      • ${F("wiki_p_res_dark_standard")}
                      • `),c.append(`
                      • ${F("wiki_p_res_dark_evil")}
                      • `),c.append(`
                      • ${F("wiki_p_res_dark_heavy")}
                      • `),c.append(`
                      • ${F("wiki_p_res_dark_antimatter")}
                      • `),c.append(`
                      • ${F("wiki_p_res_dark_micro")}
                      • `),c.append(`
                      • ${F("wiki_p_res_dark_magic")}
                      • `),i=Gn(s,"dark","gain"),yc(i,"dark",!1,"bigbang"),yc(i,"dark","vacuum","vacuum"),i=Gn(s,"dark","bonus"),function(e){let a=$('
                        ');e.append(a),a.append(`

                        ${F("wiki_calc_bonuses",[F("resource_Dark_name")])}

                        `);let r=$("
                        "),i=$("
                        "),s=$("
                        ");a.append(r),a.append(i),a.append(s);let n={dark:{val:void 0},harmony:{val:void 0},sludge:{val:void 0},uni:{val:"standard"}},c={standard:{vis:!0,result:!1,val:0},evil:{vis:!1,result:!1,val:0},antimatter:{vis:!1,result:!1,val:0},micro:{vis:!1,result:!1,val1:0,val2:0},heavy:{vis:!1,result:!1,val1:0,val2:0},magic:{vis:!1,result:!1,val:0}};r.append(`\n
                        ${F("wiki_calc_universe")} \n \n {{ 'standard' | uniLabel }}\n {{ 'evil' | uniLabel }}\n {{ 'antimatter' | uniLabel }}\n {{ 'micro' | uniLabel }}\n {{ 'heavy' | uniLabel }}\n {{ 'magic' | uniLabel }}\n
                        \n `),i.append(`\n
                        \n
                        \n ${F("wiki_calc_bonuses",[F("wiki_calc_dark_standard")])}:\n
                        \n
                        \n ({{ i.dark.val, 'dark' | generic }} * (1 + ({{ i.harmony.val, 'harmony' | generic }} * 0.001)) * (1 + ({{ i.sludge.val | sludgeLabel }} * 0.03))) / 200 = {{ 'standard', false | calc }} = +{{ 'standard', true | calc }}%\n
                        \n
                        \n
                        \n
                        \n ${F("wiki_calc_bonuses",[F("wiki_calc_dark_evil")])}:\n
                        \n
                        \n (log2(10 + ({{ i.dark.val, 'dark' | generic }} * (1 + ({{ i.harmony.val, 'harmony' | generic }} * 0.01)) * (1 + ({{ i.sludge.val | sludgeLabel }} * 0.03)))) - 3.321928094887362) / 5 = {{ 'evil', false | calc }} = +{{ 'evil', true | calc }}%\n
                        \n
                        \n
                        \n
                        \n ${F("wiki_calc_bonuses",[F("wiki_calc_dark_antimatter")])}:\n
                        \n
                        \n (ln(50 + ({{ i.dark.val, 'dark' | generic }} * (1 + ({{ i.harmony.val, 'harmony' | generic }} * 0.01)) * (1 + ({{ i.sludge.val | sludgeLabel }} * 0.03)))) - 3.912023005428146) / 5 = {{ 'antimatter', false | calc }} = +{{ 'antimatter', true | calc }}%\n
                        \n
                        \n
                        \n
                        \n ${F("wiki_calc_creep_reduction",[F("wiki_calc_home")])} (${F("wiki_calc_cap",[.06])}):\n
                        \n
                        \n (0.02 + ((ln(100 + ({{ i.dark.val, 'dark' | generic }} * (1 + ({{ i.harmony.val, 'harmony' | generic }} * 0.01)))) - 4.605170185988092) / 20)) * (1 + ({{ i.sludge.val | sludgeLabel }} * 0.03)) = {{ 'micro', false, 2 | calc }}\n
                        \n
                        \n ${F("wiki_calc_creep_reduction",[F("wiki_calc_not_home")])} (${F("wiki_calc_cap",[.04])}):\n
                        \n
                        \n (0.01 + ((ln(100 + ({{ i.dark.val, 'dark' | generic }} * (1 + ({{ i.harmony.val, 'harmony' | generic }} * 0.01)))) - 4.605170185988092) / 35)) * (1 + ({{ i.sludge.val | sludgeLabel }} * 0.03)) = {{ 'micro', false, 1 | calc }}\n
                        \n
                        \n
                        \n
                        \n ${F("wiki_calc_dark_heavy",[F("wiki_menu_space")])}:\n
                        \n
                        \n 0.25 + (0.5 * 0.995^({{ i.dark.val, 'dark' | generic }} * (1 + ({{ i.harmony.val, 'harmony' | generic }} * 0.01)) * (1 + ({{ i.sludge.val | sludgeLabel }} * 0.03)))) = {{ 'heavy', false, 1 | calc }} = +{{ 'heavy', true, 1 | calc }}%\n
                        \n
                        \n ${F("wiki_calc_dark_heavy",[F("wiki_tech_req_or",[F("wiki_menu_interstellar"),F("wiki_menu_intergalactic")])])}:\n
                        \n
                        \n 0.2 + (0.3 * 0.995^({{ i.dark.val, 'dark' | generic }} * (1 + ({{ i.harmony.val, 'harmony' | generic }} * 0.01)) * (1 + ({{ i.sludge.val | sludgeLabel }} * 0.03)))) = {{ 'heavy', false, 2 | calc }} = +{{ 'heavy', true, 2 | calc }}%\n
                        \n
                        \n
                        \n
                        \n ${F("wiki_calc_bonuses",[F("wiki_calc_dark_magic")])}:\n
                        \n
                        \n (ln(50 + ({{ i.dark.val, 'dark' | generic }} * (1 + ({{ i.harmony.val, 'harmony' | generic }} * 0.01)) * (1 + ({{ i.sludge.val | sludgeLabel }} * 0.03)))) - 3.912023005428146) / 3 = {{ 'magic', false | calc }} = +{{ 'magic', true | calc }}%\n
                        \n
                        \n `),s.append(`\n
                        \n
                        ${F("wiki_p_res_dark")}
                        \n
                        ${F("wiki_p_res_harmony")}
                        \n
                        ${F("wiki_calc_sludge_level")}
                        \n
                        \n
                        \n \n \n
                        \n `),zs({el:"#darkBonusCalc",data:{i:n,s:c},methods:{val(e){n[e].val&&n[e].val<0?n[e].val=0:"sludge"===e&&n.sludge.val&&n.sludge.val>5&&(n.sludge.val=5)},pickUniverse(e){c[n.uni.val].vis=!1,n.uni.val=e,c[e].vis=!0},resetInputs(){n.dark.val=void 0,n.harmony.val=void 0,n.sludge.val=void 0,c[n.uni.val].vis=!1,n.uni.val="standard",c.standard.vis=!0},importInputs(){n.dark.val=t.prestige.Dark.count,n.harmony.val=t.prestige.Harmony.count,"bigbang"!==t.race.universe&&(c[n.uni.val].vis=!1,n.uni.val=t.race.universe,c[n.uni.val].vis=!0),n.sludge.val=t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge[qn(n.uni.val)]?t.stats.achieve.extinct_sludge[qn(n.uni.val)]:0}},filters:{generic:(e,t)=>void 0!==e?e:F("wiki_p_res_"+t),sludgeLabel:e=>void 0!==e?e:F("wiki_calc_sludge_level"),uniLabel:e=>F(e?"universe_"+e:"wiki_calc_universe"),calc(e,t,a){if(e===n.uni.val){if(t)return"heavy"===e?(100*c[e][`val${a}`]).toFixed(3):(100*c[e].val).toFixed(3);if(c[e].result=void 0!==n.dark.val&&void 0!==n.harmony.val,c[e].result)switch(e){case"standard":case"evil":case"antimatter":case"magic":return c[e].val=+(Ts(e,!1,!0,{dark:n.dark.val,harmony:n.harmony.val,sludge:n.sludge.val})-1).toFixed(6),c[e].val;case"micro":return c[e][`val${a}`]=Ts(e,1===a,!0,{dark:n.dark.val,harmony:n.harmony.val,sludge:n.sludge.val}),c[e][`val${a}`];case"heavy":let t=Ts(e,!1,!0,{dark:n.dark.val,harmony:n.harmony.val,sludge:n.sludge.val});return t=1===a?.25+.5*t:.2+.3*t,c[e][`val${a}`]=t.toFixed(5),c[e][`val${a}`]}}}}})}(i),En("add","resources-prestige","dark",F("wiki_p_res_dark")),r=Tn(a,{name:"harmony",template:"p_res",paragraphs:3,h_level:2}),i=Gn(r,"harmony","gain"),yc(i,"harmony"),i=Gn(r,"harmony","bonus"),function(e){let a=$('
                        ');e.append(a),a.append(`

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

                        `);let r=$("
                        "),i=$("
                        ");a.append(r),a.append(i);let s={harmony:{val:void 0},ascended:{val:void 0},uni:{val:"undefined"}},n={result:{vis:!1,val:0}};r.append("\n
                        \n (ln(50 + ({{ i.harmony.val, 'harmony' | generic }} * {{ i.ascended.val | ascendedLabel }})) - 3.912023005428146) * 0.01 = {{ | calc }}\n
                        \n "),i.append(`\n
                        \n
                        ${F("wiki_p_res_harmony")}
                        \n
                        ${F("wiki_calc_ascended_level")}
                        \n
                        \n
                        \n \n \n
                        \n `),zs({el:"#harmonyCreepCalc",data:{i:s,s:n},methods:{val(e){s[e].val&&s[e].val<0?s[e].val=0:"ascended"===e&&s.ascended.val&&s.ascended.val>5&&(s.ascended.val=5)},resetInputs(){s.harmony.val=void 0,s.ascended.val=void 0},importInputs(){s.harmony.val=t.prestige.Harmony.count,s.ascended.val=t.stats.achieve.ascended&&t.stats.achieve.ascended[qn(t.race.universe||"standard")]?t.stats.achieve.ascended[qn(t.race.universe||"standard")]:0}},filters:{generic:(e,t)=>void 0!==e?e:F("wiki_p_res_"+t),ascendedLabel:e=>void 0!==e?e:F("wiki_calc_ascended_level"),calc(){if(n.result.vis=void 0!==s.harmony.val&&void 0!==s.ascended.val,n.result.vis)return n.result.val=+(.01*(Math.log(50+s.harmony.val*s.ascended.val)-3.912023005428146)).toFixed(5),n.result.val}}})}(i),En("add","resources-prestige","harmony",F("wiki_p_res_harmony")),Tn(a,{name:"blood",template:"p_res",paragraphs:5,h_level:2,para_data:{2:[F("tab_arpa_blood")],3:[1,"1-5"],4:[F("arpa_genepool_blood_sacrifice_title")],5:[F("arpa_genepool_blood_remembrance_title")]},data_link:{2:["wiki.html#blood-prestige"],4:["wiki.html#crispr-prestige-blood_sacrifice"],5:["wiki.html#crispr-prestige-blood_remembrance"]}}),En("add","resources-prestige","blood",F("wiki_p_res_blood")),r=Tn(a,{name:"artifact",template:"p_res",paragraphs:3,h_level:2,para_data:{1:[F("wiki_resets_infusion")],2:[F("tab_arpa_blood")],3:[1,"5th"]},data_link:{1:["wiki.html#resets-prestige-infusion"],2:["wiki.html#blood-prestige"]}}),i=Gn(r,"artifact","gain"),yc(i,"artifact"),En("add","resources-prestige","artifact",F("wiki_p_res_artifact")),r=Tn(a,{name:"ai_core",template:"p_res",paragraphs:2,h_level:2,para_data:{1:[F("wiki_resets_ai")]},data_link:{1:["wiki.html#resets-prestige-ai"]}}),i=Gn(r,"cores","gain"),yc(i,"cores"),i=Gn(r,"cores","bonus"),function(e){let a=$('
                        ');e.append(a),a.append(`

                        ${F("wiki_calc_core_quantum")}

                        `);let r=$("
                        "),i=$("
                        ");a.append(r),a.append(i);let s={cores:{val:void 0}},n={result:{vis:!1,val:0}};r.append("\n
                        \n 1 - (0.99^{{ i.cores.val, 'cores' | generic }}) = {{ false | calc }} = +{{ true | calc }}%\n
                        \n "),i.append(`\n
                        \n
                        ${F("wiki_calc_cores")}
                        \n
                        \n
                        \n \n \n
                        \n `),zs({el:"#coresQuantumCalc",data:{i:s,s:n},methods:{val(e){s[e].val&&s[e].val<0&&(s[e].val=0)},resetInputs(){s.cores.val=void 0},importInputs(){s.cores.val=t.prestige.AICore.count}},filters:{generic:(e,t)=>void 0!==e?e:F("wiki_calc_"+t),calc:e=>e?+(100*n.result.val).toFixed(2):(n.result.vis=void 0!==s.cores.val,n.result.vis?(n.result.val=+(1-.99**s.cores.val).toFixed(4),n.result.val):void 0)}})}(i),En("add","resources-prestige","ai_core",F("wiki_p_res_ai_core")),r=Tn(a,{name:"servants",template:"p_res",paragraphs:5,h_level:2,break:[3,4,5],para_data:{1:[F("wiki_resets_matrix"),F("wiki_resets_retired"),F("wiki_resets_eden")],5:[F("achieve_overlord_name")]},data_link:{1:["wiki.html#resets-prestige-matrix","wiki.html#resets-prestige-retired","wiki.html#resets-prestige-eden"],5:["wiki.html#perks-prestige-overlord"]}}),En("add","resources-prestige","servants",F("wiki_p_res_servants")),r=Tn(a,{name:"skilled_servants",template:"p_res",paragraphs:6,h_level:2,break:[3,4,5,6],para_data:{1:[F("wiki_resets_matrix"),F("wiki_resets_retired")],6:[F("achieve_pathfinder_name"),F("achieve_overlord_name")]},data_link:{1:["wiki.html#resets-prestige-matrix","wiki.html#resets-prestige-retired"],6:["wiki.html#perks-prestige-pathfinder","wiki.html#perks-prestige-overlord"]}}),En("add","resources-prestige","skilled_servants",F("wiki_p_res_skilled_servants"))}(a);break;case"crispr":xc(a);break;case"blood":jc(a);break;case"perks":!function(e){let t=$("
                        "),a=En("create",t);e.append(t),Object.keys(An).forEach((function(e){!function(e,t){let a=$(`
                        `);if(An[t].hasOwnProperty("group")){let e=$(`
                        ${An[t].name}
                        `);An[t].group.forEach((function(t){e.append($(`
                        ${t.desc(!0)}
                        `))})),a.append(e)}else a.append($(`
                        ${An[t].name}
                        ${An[t].desc(!0)}
                        `));if(An[t].notes.length>0){let e=$('
                        ');An[t].notes.forEach((function(t){e.append(`
                        ${t}
                        `)})),a.append(e)}e.append(a)}(a,e),En("add","perks-prestige",`${e}`,An[e].name)}))}(a)}}(r),zc(a,r,i);break;case"events":(function(e){let a=$("#content");switch(Cs(a),e){case"major":!function(e){let a=En("create",e);Tn(a,{name:"major_intro",template:"events",paragraphs:3,h_level:2,para_data:{1:[F("wiki_menu_major"),999,83],2:[F("wiki_menu_major")],3:[F("wiki_menu_major")]}}),En("add","major-events","major_intro",F("wiki_menu_intro"));{let e=Tn(a,{name:"replication",template:"events",label:F("wiki_events_replication"),paragraphs:1,h_level:2,para_data:{1:[1,F("wiki_events_replication_para1_note",[3])]}});Tn(a,{name:"evolution",template:"events",label:F("wiki_events_replication"),paragraphs:1,h_level:2},e),Tn(a,{name:"replication_examples",template:"events",label:F("wiki_events_replication"),h_level:2,examples:[F("event_dna",[10])]},e),En("add","major-events","replication",F("wiki_events_replication"))}{let e=Tn(a,{name:"rna_meteor",template:"events",label:F("wiki_events_rna_meteor"),paragraphs:1,h_level:2,para_data:{1:[1,F("wiki_events_rna_meteor_para1_note",[2])]}});Tn(a,{name:"evolution",template:"events",label:F("wiki_events_rna_meteor"),paragraphs:1,h_level:2},e),Tn(a,{name:"rna_meteor_examples",template:"events",label:F("wiki_events_rna_meteor"),h_level:2,examples:[F("event_rna",[22])]},e),En("add","major-events","rna_meteor",F("wiki_events_rna_meteor"))}Tn(a,{name:"inspiration",template:"events",label:F("wiki_events_inspiration"),paragraphs:1,h_level:2,para_data:{1:[300,600]},examples:[F("event_inspiration")]}),En("add","major-events","inspiration",F("wiki_events_inspiration")),Tn(a,{name:"motivation",template:"events",label:F("wiki_events_motivation"),paragraphs:3,h_level:2,para_data:{1:[300,600],2:["10%","13%"]},examples:[F("event_motivation")]}),En("add","major-events","motivation",F("wiki_events_motivation"));{let e=Tn(a,{name:"fire",template:"events",label:F("wiki_events_fire"),paragraphs:1,h_level:2,para_data:{1:[1,"25%"]}});Tn(a,{name:"fire_condition",template:"events",label:F("wiki_events_fire"),paragraphs:2,break:[2],h_level:2},e),Tn(a,{name:"fire_examples",template:"events",label:F("wiki_events_fire"),h_level:2,examples:[F("event_fire",[1337..toLocaleString()])]},e),En("add","major-events","fire",F("wiki_events_fire"))}{let e=Tn(a,{name:"flare",template:"events",label:F("wiki_events_flare"),paragraphs:3,h_level:2,para_data:{2:["10%"],3:["20%",20,200]}});Tn(a,{name:"flare_condition",template:"events",label:F("wiki_events_flare"),paragraphs:4,break:[2],h_level:2},e),Tn(a,{name:"flare_examples",template:"events",label:F("wiki_events_flare"),h_level:2,examples:[F("event_flare",[Di[t.race.species].home,69]),F("event_flare2",[Di[t.race.species].home,42])]},e),En("add","major-events","flare",F("wiki_events_flare"))}{let e=Tn(a,{name:"raid",template:"events",label:F("wiki_events_raid"),paragraphs:3,h_level:2,para_data:{2:["25%"]}});Tn(a,{name:"raid_condition",template:"events",label:F("wiki_events_raid"),paragraphs:2,h_level:2,para_data:{2:[F("wiki_challenges_scenarios_truepath")]},data_link:{2:["wiki.html#challenges-gameplay-scenarios_truepath"]}},e),Tn(a,{name:"raid_examples",template:"events",label:F("wiki_events_raid"),h_level:2,examples:[F("event_raid1",[10,31]),F("event_raid2",[244,0,50])]},e),En("add","major-events","raid",F("wiki_events_raid"))}{let e=Tn(a,{name:"siege",template:"events",label:F("wiki_events_siege"),paragraphs:3,h_level:2,para_data:{2:["50%"]}});Tn(a,{name:"siege_condition",template:"events",label:F("wiki_events_siege"),paragraphs:3,h_level:2,para_data:{3:[F("wiki_challenges_scenarios_truepath")]},data_link:{3:["wiki.html#challenges-gameplay-scenarios_truepath"]}},e),Tn(a,{name:"siege_examples",template:"events",label:F("wiki_events_siege"),h_level:2,examples:[F("event_siege1",[30,49]),F("event_siege2",[500024..toLocaleString(),0,25])]},e),En("add","major-events","siege",F("wiki_events_siege"))}{let e=Tn(a,{name:"terrorist",template:"events",label:F("wiki_events_terrorist"),paragraphs:1,h_level:2});Tn(a,{name:"terrorist_condition",template:"events",label:F("wiki_events_terrorist"),paragraphs:2,h_level:2,para_data:{2:[F("wiki_challenges_scenarios_truepath")]},data_link:{2:["wiki.html#challenges-gameplay-scenarios_truepath"]}},e),Tn(a,{name:"terrorist_examples",template:"events",label:F("wiki_events_terrorist"),h_level:2,examples:[F("event_terrorist1",[14]),F("event_terrorist2",[54,18])]},e),En("add","major-events","terrorist",F("wiki_events_terrorist"))}{let e=Tn(a,{name:"pillage",template:"events",label:F("wiki_events_pillage"),paragraphs:6,break:[5],h_level:2,para_data:{2:["25%"],3:["50%"],5:[F("civics_gov_relations"),"40%"]}});Tn(a,{name:"pillage_condition",template:"events",label:F("wiki_events_pillage"),paragraphs:1,h_level:2,para_data:{1:[F("wiki_challenges_scenarios_truepath")]},data_link:{1:["wiki.html#challenges-gameplay-scenarios_truepath"]}},e),Tn(a,{name:"pillage_examples",template:"events",label:F("wiki_events_pillage"),h_level:2,examples:[F("event_pillaged1",[F("civics_gov2",[F("civics_gov_name4")]),10,55]),F("event_pillaged2",[F("civics_gov6",[F("civics_gov_name9")]),40,25,[`5704490 ${F("resource_Lumber_name")}`,`2177130 ${F("resource_Stone_name")}`,`4259421 ${F("resource_Furs_name")}`,`6033892 ${F("resource_Copper_name")}`,`602938 ${F("resource_Iron_name")}`,`3389580 ${F("resource_Aluminium_name")}`,`3292455 ${F("resource_Cement_name")}`,`5394173 ${F("resource_Coal_name")}`,`47231 ${F("resource_Oil_name")}`,`9390 ${F("resource_Uranium_name")}`,`7016884 ${F("resource_Steel_name")}`,`52801 ${F("resource_Titanium_name")}`,`1163086 ${F("resource_Alloy_name")}`,`2053980 ${F("resource_Polymer_name")}`,`3179901 ${F("resource_Iridium_name")}`,`792693 ${F("resource_Helium_3_name")}`,`1219 ${F("resource_Elerium_name")}`,`65078 ${F("resource_Water_name")}`,`290451 ${F("resource_Neutronium_name")}`,`3059577 ${F("resource_Adamantite_name")}`,`5736560 ${F("resource_Nano_Tube_name")}`,`2494390 ${F("resource_Graphene_name")}`,`6836006 ${F("resource_Stanene_name")}`,`2264649 ${F("resource_Orichalcum_name")}`,"$19235850"].join(", ")])]},e),En("add","major-events","pillage",F("wiki_events_pillage"))}{let e=Tn(a,{name:"quake",template:"events",label:F("wiki_events_quake"),paragraphs:1,h_level:2});Tn(a,{name:"quake_condition",template:"events",label:F("wiki_events_quake"),paragraphs:2,break:[2],h_level:2},e),Tn(a,{name:"quake_examples",template:"events",label:F("wiki_events_quake"),h_level:2,examples:[F("event_quake",[t.race.cataclysm||t.race.orbit_decayed?Di[t.race.species].solar.red:Di[t.race.species].home])]},e),En("add","major-events","quake",F("wiki_events_quake"))}{let e=Tn(a,{name:"doom",template:"events",label:F("wiki_events_doom"),paragraphs:2,h_level:2});Tn(a,{name:"doom_condition",template:"events",label:F("wiki_events_doom"),paragraphs:2,break:[2],h_level:2},e),Tn(a,{name:"doom_examples",template:"events",label:F("wiki_events_doom"),h_level:2,examples:[F("event_doom",[Di[t.race.species].solar.dwarf]),F("event_doom_alt",[Di[t.race.species].solar.dwarf])]},e),En("add","major-events","doom",F("wiki_events_doom"))}{let e=Tn(a,{name:"dhorde",template:"events",label:F("wiki_events_dhorde"),paragraphs:1,h_level:2,para_data:{1:[2500,5e3]}});Tn(a,{name:"dhorde_condition",template:"events",label:F("wiki_events_dhorde"),paragraphs:1,h_level:2},e),Tn(a,{name:"dhorde_examples",template:"events",label:F("wiki_events_dhorde"),h_level:2,examples:[F("event_demon_influx",[3456..toLocaleString()])]},e),En("add","major-events","dhorde",F("wiki_events_dhorde"))}{let e=Tn(a,{name:"ruins",template:"events",label:F("wiki_events_ruins"),paragraphs:2,break:[2],h_level:2,para_data:{2:[F("resource_Iron_name"),F("resource_Copper_name"),F("resource_Steel_name"),F("resource_Cement_name"),"25%"]}});Tn(a,{name:"ruins_condition",template:"events",label:F("wiki_events_ruins"),paragraphs:1,h_level:2},e),Tn(a,{name:"ruins_examples",template:"events",label:F("wiki_events_ruins"),h_level:2,examples:[F("event_ruins")]},e),En("add","major-events","ruins",F("wiki_events_ruins"))}{let e=Tn(a,{name:"taxrevolt",template:"events",label:F("wiki_events_taxrevolt"),paragraphs:2,h_level:2});Tn(a,{name:"taxrevolt_condition",template:"events",label:F("wiki_events_taxrevolt"),paragraphs:3,break:[2],h_level:2,para_data:{1:["> 25%","< 100%"],2:[F("govern_oligarchy"),"20%"],3:[F("governor_noble"),"10%"]}},e),Tn(a,{name:"taxrevolt_examples",template:"events",label:F("wiki_events_taxrevolt"),h_level:2,examples:[F("event_tax_revolt")]},e),En("add","major-events","taxrevolt",F("wiki_events_taxrevolt"))}{let e=Tn(a,{name:"slave",template:"events",label:F("wiki_events_slave"),paragraphs:2,break:[2],h_level:2});Tn(a,{name:"slave_condition",template:"events",label:F("wiki_events_slave"),paragraphs:1,h_level:2,para_data:{1:[F("trait_slaver_name")]}},e),Tn(a,{name:"slave_examples",template:"events",label:F("wiki_events_slave"),h_level:2,examples:[F("event_slave_death1"),F("event_slave_death2"),F("event_slave_death3"),F("event_slave_none")]},e),En("add","major-events","slave",F("wiki_events_slave"))}{let e=Tn(a,{name:"protest",template:"events",label:F("wiki_events_protest"),paragraphs:3,h_level:2,para_data:{1:[F("govern_republic")],2:["30%"],3:[30,90]}});Tn(a,{name:"protest_condition",template:"events",label:F("wiki_events_protest"),paragraphs:1,h_level:2,para_data:{1:[F("govern_republic")]}},e),Tn(a,{name:"protest_examples",template:"events",label:F("wiki_events_protest"),h_level:2,examples:[F("event_protest0",[ui("small")]),F("event_protest1"),F("event_protest2"),F("event_protest3"),F("event_protest4"),F("event_protest5"),F("event_protest6"),F("event_protest7"),F("event_protest8"),F("event_protest9")]},e),En("add","major-events","protest",F("wiki_events_protest"))}{let e=Tn(a,{name:"scandal",template:"events",label:F("wiki_events_scandal"),paragraphs:2,h_level:2,para_data:{1:[F("governor_media")],2:["8%",15,90]}});Tn(a,{name:"scandal_condition",template:"events",label:F("wiki_events_scandal"),paragraphs:1,h_level:2,para_data:{1:[F("governor_media")]}},e),Tn(a,{name:"scandal_examples",template:"events",label:F("wiki_events_scandal"),h_level:2,examples:[F("event_scandal0"),F("event_scandal1"),F("event_scandal2"),F("event_scandal3"),F("event_scandal4"),F("event_scandal5"),F("event_scandal6"),F("event_scandal7"),F("event_scandal8"),F("event_scandal9")]},e),En("add","major-events","scandal",F("wiki_events_scandal"))}{let e=Tn(a,{name:"spy",template:"events",label:F("wiki_events_spy"),paragraphs:1,h_level:2});Tn(a,{name:"spy_condition",template:"events",label:F("wiki_events_spy"),paragraphs:1,h_level:2},e),Tn(a,{name:"spy_examples",template:"events",label:F("wiki_events_spy"),h_level:2,examples:[F("event_spy",[X(1)])]},e),En("add","major-events","spy",F("wiki_events_spy"))}{let e=Tn(a,{name:"mine_collapse",template:"events",label:F("wiki_events_mine_collapse"),paragraphs:1,h_level:2});Tn(a,{name:"mine_collapse_condition",template:"events",label:F("wiki_events_mine_collapse"),paragraphs:1,h_level:2},e),Tn(a,{name:"mine_collapse_examples",template:"events",label:F("wiki_events_mine_collapse"),h_level:2,examples:[F("event_mine_collapse")]},e),En("add","major-events","mine_collapse",F("wiki_events_mine_collapse"))}{let e=Tn(a,{name:"m_curious",template:"events",label:F("wiki_events_m_curious"),paragraphs:6,break:[2,3,4,5,6],h_level:2,para_data:{2:[F("wiki_events_m_curious_para2_note1",[5e4.toLocaleString(),5e6.toLocaleString(),F("resource_Money_name")]),F("wiki_events_m_curious_para2_note1",[100,1e5.toLocaleString(),F("resource_Steel_name")]),F("wiki_events_m_curious_para2_note1",[250,1e6.toLocaleString(),F("resource_Alloy_name")]),F("wiki_events_m_curious_para2_note1",[100,25e4.toLocaleString(),F("resource_Adamantite_name")]),F("wiki_events_m_curious_para2_note1",[500,5e4.toLocaleString(),F("resource_Bolognium_name")]),F("wiki_events_m_curious_para2_note2",[1,F("resource_Soul_Gem_name")])],3:[10],4:[600,1200],5:["5%",200,600],6:[F("race_cath"),"10%",500,1e3]}});Tn(a,{name:"m_curious_condition",template:"events",label:F("wiki_events_m_curious"),paragraphs:1,h_level:2,para_data:{1:[F("trait_curious_name")]}},e),Tn(a,{name:"m_curious_examples",template:"events",label:F("wiki_events_m_curious"),h_level:2,examples:[F("event_m_curious0",[Di[t.race.species].name,444015..toLocaleString(),F("resource_Alloy_name")]),F("event_m_curious1",[Di[t.race.species].name]),F("event_m_curious2",[Di[t.race.species].name]),F("event_m_curious3",[Di[t.race.species].name]),F("event_m_curious4a",[F("race_cath")]),F("event_m_curious4b",[F("race_octigoran")])]},e),En("add","major-events","m_curious",F("wiki_events_m_curious"))}}(a);break;case"minor":!function(e){let a=En("create",e);{let e=Tn(a,{name:"minor_intro",template:"events",paragraphs:1,h_level:2});Tn(a,{name:"major_intro",template:"events",paragraphs:3,h_level:2,para_data:{1:[F("wiki_menu_minor"),850,71],2:[F("wiki_menu_minor")],3:[F("wiki_menu_minor")]}},e),En("add","minor-events","minor_intro",F("wiki_menu_intro"))}{let e=Tn(a,{name:"curious",template:"events",label:F("wiki_events_curious"),paragraphs:2,break:[2],h_level:2});Tn(a,{name:"curious_condition",template:"events",label:F("wiki_events_curious"),paragraphs:1,h_level:2,para_data:{1:[F("trait_curious_name")]}},e),Tn(a,{name:"curious_examples",template:"events",label:F("wiki_events_curious"),h_level:2,examples:[F("event_curious0",[Di[t.race.species].name]),F("event_curious1",[Di[t.race.species].name]),F("event_curious2",[Di[t.race.species].name]),F("event_curious3",[Di[t.race.species].name]),F("event_curious4",[Di[t.race.species].name]),F("event_curious5",[Di[t.race.species].name]),F("event_curious6",[Di[t.race.species].name]),F("event_curious7",[Di[t.race.species].name]),F("event_curious8",[Di[t.race.species].name]),F("event_curious9",[Di[t.race.species].name])]},e),En("add","minor-events","curious",F("wiki_events_curious"))}{let e=Tn(a,{name:"slave_escape",template:"events",label:F("wiki_events_slave_escape"),paragraphs:2,break:[2],h_level:2});Tn(a,{name:"slave_escape_condition",template:"events",label:F("wiki_events_slave_escape"),paragraphs:1,h_level:2,para_data:{1:[F("trait_slaver_name")]}},e),Tn(a,{name:"slave_escape_examples",template:"events",label:F("wiki_events_slave_escape"),h_level:2,examples:[F("event_slave_escape1"),F("event_slave_escape2"),F("event_slave_death4"),F("event_slave_none")]},e),En("add","minor-events","slave_escape",F("wiki_events_slave_escape"))}{let e=Tn(a,{name:"shooting_star",template:"events",label:F("wiki_events_shooting_star"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_shooting_star"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"shooting_star_examples",template:"events",label:F("wiki_events_shooting_star"),h_level:2,examples:[F("event_shooting_star")]},e),En("add","minor-events","shooting_star",F("wiki_events_shooting_star"))}{let e=Tn(a,{name:"tumbleweed",template:"events",label:F("wiki_events_tumbleweed"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_tumbleweed"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"tumbleweed_examples",template:"events",label:F("wiki_events_tumbleweed"),h_level:2,examples:[F("event_tumbleweed")]},e),En("add","minor-events","tumbleweed",F("wiki_events_tumbleweed"))}{let e=Tn(a,{name:"flashmob",template:"events",label:F("wiki_events_flashmob"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_flashmob"),paragraphs:1,h_level:2,para_data:{1:[F("tech_mad_science")]}},e),Tn(a,{name:"flashmob_examples",template:"events",label:F("wiki_events_flashmob"),h_level:2,examples:[F("event_flashmob")]},e),En("add","minor-events","flashmob",F("wiki_events_flashmob"))}{let e=Tn(a,{name:"heatwave",template:"events",label:F("wiki_events_heatwave"),paragraphs:1,h_level:2,para_data:{1:[F("hot")]}});Tn(a,{name:"heatwave_condition",template:"events",label:F("wiki_events_heatwave"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club"),F("evo_challenge_cataclysm"),F("hot")]}},e),Tn(a,{name:"heatwave_examples",template:"events",label:F("wiki_events_heatwave"),h_level:2,examples:[F("event_heatwave")]},e),En("add","minor-events","heatwave",F("wiki_events_heatwave"))}{let e=Tn(a,{name:"coldsnap",template:"events",label:F("wiki_events_coldsnap"),paragraphs:1,h_level:2,para_data:{1:[F("cold")]}});Tn(a,{name:"coldsnap_condition",template:"events",label:F("wiki_events_coldsnap"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club"),F("evo_challenge_cataclysm"),F("cold")]}},e),Tn(a,{name:"coldsnap_examples",template:"events",label:F("wiki_events_coldsnap"),h_level:2,examples:[F("event_coldsnap")]},e),En("add","minor-events","coldsnap",F("wiki_events_coldsnap"))}{let e=Tn(a,{name:"cucumber",template:"events",label:F("wiki_events_cucumber"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_cucumber"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"cucumber_examples",template:"events",label:F("wiki_events_cucumber"),h_level:2,examples:[F("event_cucumber")]},e),En("add","minor-events","cucumber",F("wiki_events_cucumber"))}{let e=Tn(a,{name:"planking",template:"events",label:F("wiki_events_planking"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_planking"),paragraphs:1,h_level:2,para_data:{1:[F("tech_mad_science")]}},e),Tn(a,{name:"planking_examples",template:"events",label:F("wiki_events_planking"),h_level:2,examples:[F("event_planking")]},e),En("add","minor-events","planking",F("wiki_events_planking"))}{let e=Tn(a,{name:"furryfish",template:"events",label:F("wiki_events_furryfish"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_furryfish"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"furryfish_examples",template:"events",label:F("wiki_events_furryfish"),h_level:2,examples:[F("event_furryfish")]},e),En("add","minor-events","furryfish",F("wiki_events_furryfish"))}{let e=Tn(a,{name:"meteor_shower",template:"events",label:F("wiki_events_meteor_shower"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_meteor_shower"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"meteor_shower_examples",template:"events",label:F("wiki_events_meteor_shower"),h_level:2,examples:[F("event_meteor_shower")]},e),En("add","minor-events","meteor_shower",F("wiki_events_meteor_shower"))}{let e=Tn(a,{name:"hum",template:"events",label:F("wiki_events_hum"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_hum"),paragraphs:1,h_level:2,para_data:{1:[F("tech_mad_science")]}},e),Tn(a,{name:"hum_examples",template:"events",label:F("wiki_events_hum"),h_level:2,examples:[F("event_hum")]},e),En("add","minor-events","hum",F("wiki_events_hum"))}{let e=Tn(a,{name:"bloodrain",template:"events",label:F("wiki_events_bloodrain"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_bloodrain"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"bloodrain_examples",template:"events",label:F("wiki_events_bloodrain"),h_level:2,examples:[F("event_bloodrain")]},e),En("add","minor-events","bloodrain",F("wiki_events_bloodrain"))}{let e=Tn(a,{name:"haunting",template:"events",label:F("wiki_events_haunting"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_haunting"),paragraphs:1,h_level:2,para_data:{1:[F("tech_science")]}},e),Tn(a,{name:"haunting_examples",template:"events",label:F("wiki_events_haunting"),h_level:2,examples:[F("event_haunting")]},e),En("add","minor-events","haunting",F("wiki_events_haunting"))}{let e=Tn(a,{name:"mothman",template:"events",label:F("wiki_events_mothman"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_mothman"),paragraphs:1,h_level:2,para_data:{1:[F("tech_science")]}},e),Tn(a,{name:"mothman_examples",template:"events",label:F("wiki_events_mothman"),h_level:2,examples:[F("event_mothman")]},e),En("add","minor-events","mothman",F("wiki_events_mothman"))}{let e=Tn(a,{name:"dejavu",template:"events",label:F("wiki_events_dejavu"),paragraphs:1,h_level:2});Tn(a,{name:"dejavu_condition",template:"events",label:F("wiki_events_dejavu"),paragraphs:1,h_level:2},e),Tn(a,{name:"dejavu_examples",template:"events",label:F("wiki_events_dejavu"),h_level:2,examples:[F("event_dejavu")]},e),En("add","minor-events","dejavu",F("wiki_events_dejavu"))}{let e=Tn(a,{name:"dollar",template:"events",label:F("wiki_events_dollar"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_dollar"),paragraphs:1,h_level:2,para_data:{1:[F("tech_currency")]}},e),Tn(a,{name:"dollar_examples",template:"events",label:F("wiki_events_dollar"),h_level:2,examples:[F("event_dollar",[6])]},e),En("add","minor-events","dollar",F("wiki_events_dollar"))}{let e=Tn(a,{name:"pickpocket",template:"events",label:F("wiki_events_pickpocket"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_pickpocket"),paragraphs:1,h_level:2,para_data:{1:[F("tech_currency")]}},e),Tn(a,{name:"pickpocket_examples",template:"events",label:F("wiki_events_pickpocket"),h_level:2,examples:[F("event_pickpocket",[9])]},e),En("add","minor-events","pickpocket",F("wiki_events_pickpocket"))}{let e=Tn(a,{name:"bird",template:"events",label:F("wiki_events_bird"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_bird"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"bird_examples",template:"events",label:F("wiki_events_bird"),h_level:2,examples:[F("event_bird")]},e),En("add","minor-events","bird",F("wiki_events_bird"))}{let e=Tn(a,{name:"contest",template:"events",label:F("wiki_events_contest"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_contest"),paragraphs:1,h_level:2,para_data:{1:[F("tech_science")]}},e),Tn(a,{name:"contest_examples",template:"events",label:F("wiki_events_contest"),h_level:2,examples:[F("event_contest",[F("event_contest_place0"),F("event_contest_type0")]),F("event_contest",[F("event_contest_place1"),F("event_contest_type1")]),F("event_contest",[F("event_contest_place2"),F("event_contest_type2")]),F("event_contest",[F("event_contest_place0"),F("event_contest_type3")]),F("event_contest",[F("event_contest_place1"),F("event_contest_type4")]),F("event_contest",[F("event_contest_place2"),F("event_contest_type5")]),F("event_contest",[F("event_contest_place0"),F("event_contest_type6")]),F("event_contest",[F("event_contest_place1"),F("event_contest_type7")]),F("event_contest",[F("event_contest_place2"),F("event_contest_type8")]),F("event_contest",[F("event_contest_place0"),F("event_contest_type9")])]},e),En("add","minor-events","contest",F("wiki_events_contest"))}{let e=Tn(a,{name:"cloud",template:"events",label:F("wiki_events_cloud"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_cloud"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"cloud_examples",template:"events",label:F("wiki_events_cloud"),h_level:2,examples:[F("event_cloud",[F("event_cloud_type0")]),F("event_cloud",[F("event_cloud_type1")]),F("event_cloud",[F("event_cloud_type2")]),F("event_cloud",[F("event_cloud_type3")]),F("event_cloud",[F("event_cloud_type4")]),F("event_cloud",[F("event_cloud_type5")]),F("event_cloud",[F("event_cloud_type6")]),F("event_cloud",[F("event_cloud_type7")]),F("event_cloud",[F("event_cloud_type8")]),F("event_cloud",[F("event_cloud_type9")]),F("event_cloud",[F("event_cloud_type10")])]},e),En("add","minor-events","cloud",F("wiki_events_cloud"))}{let e=Tn(a,{name:"dark_cloud",template:"events",label:F("wiki_events_dark_cloud"),paragraphs:1,h_level:2,para_data:{1:[F("rain"),F("snow")]}});Tn(a,{name:"dark_cloud_condition",template:"events",label:F("wiki_events_dark_cloud"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club"),F("evo_challenge_cataclysm"),F("rain"),F("snow")]}},e),Tn(a,{name:"dark_cloud_examples",template:"events",label:F("wiki_events_dark_cloud"),h_level:2,examples:[F("event_dark_cloud")]},e),En("add","minor-events","dark_cloud",F("wiki_events_dark_cloud"))}{let e=Tn(a,{name:"gloom",template:"events",label:F("wiki_events_gloom"),paragraphs:1,h_level:2,para_data:{1:[F("cloudy")]}});Tn(a,{name:"gloom_condition",template:"events",label:F("wiki_events_gloom"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club"),F("evo_challenge_cataclysm"),F("cloudy")]}},e),Tn(a,{name:"gloom_examples",template:"events",label:F("wiki_events_gloom"),h_level:2,examples:[F("event_gloom")]},e),En("add","minor-events","gloom",F("wiki_events_gloom"))}{let e=Tn(a,{name:"tracks",template:"events",label:F("wiki_events_tracks"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_tracks"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"tracks_examples",template:"events",label:F("wiki_events_tracks"),h_level:2,examples:[F("event_tracks")]},e),En("add","minor-events","tracks",F("wiki_events_tracks"))}{let e=Tn(a,{name:"hoax",template:"events",label:F("wiki_events_hoax"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_hoax"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"hoax_examples",template:"events",label:F("wiki_events_hoax"),h_level:2,examples:[F("event_hoax")]},e),En("add","minor-events","hoax",F("wiki_events_hoax"))}{let e=Tn(a,{name:"burial",template:"events",label:F("wiki_events_burial"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_burial"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"burial_examples",template:"events",label:F("wiki_events_burial"),h_level:2,examples:[F("event_burial")]},e),En("add","minor-events","burial",F("wiki_events_burial"))}{let e=Tn(a,{name:"artifacts",template:"events",label:F("wiki_events_artifacts"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_artifacts"),paragraphs:1,h_level:2,para_data:{1:[F("tech_mad_science")]}},e),Tn(a,{name:"artifacts_examples",template:"events",label:F("wiki_events_artifacts"),h_level:2,examples:[F("event_artifacts")]},e),En("add","minor-events","artifacts",F("wiki_events_artifacts"))}{let e=Tn(a,{name:"parade",template:"events",label:F("wiki_events_parade"),paragraphs:1,h_level:2});Tn(a,{name:"parade_condition",template:"events",label:F("wiki_events_parade"),paragraphs:1,h_level:2},e),Tn(a,{name:"parade_examples",template:"events",label:F("wiki_events_parade"),h_level:2,examples:[F("event_parade")]},e),En("add","minor-events","parade",F("wiki_events_parade"))}{let e=Tn(a,{name:"crop_circle",template:"events",label:F("wiki_events_crop_circle"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_crop_circle"),paragraphs:1,h_level:2,para_data:{1:[F("tech_agriculture")]}},e),Tn(a,{name:"crop_circle_examples",template:"events",label:F("wiki_events_crop_circle"),h_level:2,examples:[F("event_crop_circle")]},e),En("add","minor-events","crop_circle",F("wiki_events_crop_circle"))}{let e=Tn(a,{name:"llama",template:"events",label:F("wiki_events_llama"),paragraphs:1,h_level:2,para_data:{1:[25,100]}});Tn(a,{name:"tech",template:"events",label:F("wiki_events_llama"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"llama_condition",template:"events",label:F("wiki_events_llama"),paragraphs:1,h_level:2,para_data:{1:[F("trait_carnivore_name"),F("trait_soul_eater_name"),F("trait_detritivore_name"),F("trait_artifical_name")]},data_link:{1:["wiki.html#traits-species-genus_carnivore","wiki.html#traits-species-special_soul_eater","wiki.html#traits-species-genus_detritivore","wiki.html#traits-species-genus_artifical"]}},e),Tn(a,{name:"llama_examples",template:"events",label:F("wiki_events_llama"),h_level:2,examples:[F("event_llama",[51])]},e),En("add","minor-events","llama",F("wiki_events_llama"))}{let e=Tn(a,{name:"cat",template:"events",label:F("wiki_events_cat"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_cat"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"cat_examples",template:"events",label:F("wiki_events_cat"),h_level:2,examples:[F("event_cat")]},e),En("add","minor-events","cat",F("wiki_events_cat"))}{let e=Tn(a,{name:"omen",template:"events",label:F("wiki_events_omen"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_omen"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"omen_examples",template:"events",label:F("wiki_events_omen"),h_level:2,examples:[F("event_omen")]},e),En("add","minor-events","omen",F("wiki_events_omen"))}{let e=Tn(a,{name:"theft",template:"events",label:F("wiki_events_theft"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_theft"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"theft_examples",template:"events",label:F("wiki_events_theft"),h_level:2,examples:[F("event_theft",[F("event_theft_type0")]),F("event_theft",[F("event_theft_type1")]),F("event_theft",[F("event_theft_type2")]),F("event_theft",[F("event_theft_type3")]),F("event_theft",[F("event_theft_type4")]),F("event_theft",[F("event_theft_type5")]),F("event_theft",[F("event_theft_type6")]),F("event_theft",[F("event_theft_type7")]),F("event_theft",[F("event_theft_type8")]),F("event_theft",[F("event_theft_type9")])]},e),En("add","minor-events","theft",F("wiki_events_theft"))}{let e=Tn(a,{name:"compass",template:"events",label:F("wiki_events_compass"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_compass"),paragraphs:1,h_level:2,para_data:{1:[F("tech_mining")]}},e),Tn(a,{name:"compass_examples",template:"events",label:F("wiki_events_compass"),h_level:2,examples:[F("event_compass")]},e),En("add","minor-events","compass",F("wiki_events_compass"))}{let e=Tn(a,{name:"bone",template:"events",label:F("wiki_events_bone"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_bone"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"bone_examples",template:"events",label:F("wiki_events_bone"),h_level:2,examples:[F("event_bone")]},e),En("add","minor-events","bone",F("wiki_events_bone"))}{let e=Tn(a,{name:"delicacy",template:"events",label:F("wiki_events_delicacy"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_delicacy"),paragraphs:1,h_level:2,para_data:{1:[F("tech_mad_science")]}},e),Tn(a,{name:"delicacy_examples",template:"events",label:F("wiki_events_delicacy"),h_level:2,examples:[F("event_delicacy")]},e),En("add","minor-events","delicacy",F("wiki_events_delicacy"))}{let e=Tn(a,{name:"prank",template:"events",label:F("wiki_events_prank"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_prank"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"prank_examples",template:"events",label:F("wiki_events_prank"),h_level:2,examples:[F("event_prank",[F("event_prank_type0")]),F("event_prank",[F("event_prank_type1")]),F("event_prank",[F("event_prank_type2")]),F("event_prank",[F("event_prank_type3")]),F("event_prank",[F("event_prank_type4")]),F("event_prank",[F("event_prank_type5")]),F("event_prank",[F("event_prank_type6")]),F("event_prank",[F("event_prank_type7")]),F("event_prank",[F("event_prank_type8")]),F("event_prank",[F("event_prank_type9")])]},e),En("add","minor-events","prank",F("wiki_events_prank"))}{let e=Tn(a,{name:"graffiti",template:"events",label:F("wiki_events_graffiti"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_graffiti"),paragraphs:1,h_level:2,para_data:{1:[F("tech_science")]}},e),Tn(a,{name:"graffiti_examples",template:"events",label:F("wiki_events_graffiti"),h_level:2,examples:[F("event_graffiti")]},e),En("add","minor-events","graffiti",F("wiki_events_graffiti"))}{let e=Tn(a,{name:"soul",template:"events",label:F("wiki_events_soul"),paragraphs:1,h_level:2});Tn(a,{name:"soul_condition",template:"events",label:F("wiki_events_soul"),paragraphs:1,h_level:2,para_data:{1:[F("trait_soul_eater_name")]}},e),Tn(a,{name:"soul_examples",template:"events",label:F("wiki_events_soul"),h_level:2,examples:[F("event_soul")]},e),En("add","minor-events","soul",F("wiki_events_soul"))}{let e=t.stats.hasOwnProperty("reset")?t.stats.reset+1:1,r=+(e/(e+10)*11).toFixed(2),i=Tn(a,{name:"cheese",template:"events",label:F("wiki_events_cheese"),paragraphs:1,h_level:2,para_data:{1:[`${r}%`,10,9+e]}});Tn(a,{name:"tech",template:"events",label:F("wiki_events_cheese"),paragraphs:1,h_level:2,para_data:{1:[jr()]}},i),Tn(a,{name:"cheese_examples",template:"events",label:F("wiki_events_cheese"),h_level:2,examples:[F("event_cheese")]},i),En("add","minor-events","cheese",F("wiki_events_cheese"))}{let e=Tn(a,{name:"tremor",template:"events",label:F("wiki_events_tremor"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_tremor"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"tremor_examples",template:"events",label:F("wiki_events_tremor"),h_level:2,examples:[F("event_tremor")]},e),En("add","minor-events","tremor",F("wiki_events_tremor"))}{let e=Tn(a,{name:"rumor",template:"events",label:F("wiki_events_rumor"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_rumor"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"rumor_examples",template:"events",label:F("wiki_events_rumor"),h_level:2,examples:[F("event_rumor",[F("event_rumor_type0")]),F("event_rumor",[F("event_rumor_type1")]),F("event_rumor",[F("event_rumor_type2")]),F("event_rumor",[F("event_rumor_type3")]),F("event_rumor",[F("event_rumor_type4")]),F("event_rumor",[F("event_rumor_type5")]),F("event_rumor",[F("event_rumor_type6")]),F("event_rumor",[F("event_rumor_type7")]),F("event_rumor",[F("event_rumor_type8")]),F("event_rumor",[F("event_rumor_type9")])]},e),En("add","minor-events","rumor",F("wiki_events_rumor"))}}(a);break;case"progress":!function(e){let a=En("create",e);Tn(a,{name:"progress_intro",template:"events",paragraphs:3,h_level:2}),En("add","progress-events","progress_intro",F("wiki_menu_intro"));{let e=Tn(a,{name:"steel",template:"events",label:F("wiki_events_steel"),paragraphs:2,break:[2],h_level:2,para_data:{1:[F("resource_Steel_name")],2:["0.08%"]}});Tn(a,{name:"steel_condition",template:"events",label:F("wiki_events_steel"),paragraphs:1,h_level:2,para_data:{1:[F("resource_Steel_name")]},examples:[F("steel_sample")]},e),En("add","progress-events","steel",F("wiki_events_steel"))}Tn(a,{name:"elerium",template:"events",label:F("wiki_events_elerium"),paragraphs:2,break:[2],h_level:2,para_data:{1:[F("resource_Elerium_name"),F("tech_elerium_mining")],2:[F("space_belt_iron_ship_title"),F("space_belt_iridium_ship_title"),"0.4%"]},data_link:{1:[!1,"wiki.html#deep_space-tech-elerium_mining"],2:["wiki.html#space-structures-iron_ship","wiki.html#space-structures-iridium_ship"]},examples:[F("discover_elerium")]}),En("add","progress-events","elerium",F("wiki_events_elerium")),Tn(a,{name:"oil",template:"events",label:F("wiki_events_oil"),paragraphs:2,break:[2],h_level:2,para_data:{1:[F("resource_Oil_name"),Dn("gas_moon"),F("space_gas_moon_oil_extractor_title")],2:[F("space_gas_moon_outpost_title"),"1%"]},data_link:{1:[!1,!1,"wiki.html#space-structures-oil_extractor"],2:["wiki.html#space-structures-outpost"]},examples:[F("discover_oil",[Dn("gas_moon")])]}),En("add","progress-events","oil",F("wiki_events_oil"));{let e=Tn(a,{name:"pit",template:"events",label:F("wiki_events_pit"),paragraphs:2,break:[2],h_level:2,para_data:{1:[F("portal_pit_name"),F("tab_portal"),F("portal_pit_mission_title")]},data_link:{1:[!1,!1,"wiki.html#hell-structures-pit_mission"]}});Tn(a,{name:"pit_condition",template:"events",label:F("wiki_events_pit"),paragraphs:1,h_level:2,para_data:{1:[1e6.toLocaleString(),F("galaxy_telemetry_beacon")]},data_link:{1:[!1,"wiki.html#intergalactic-structures-telemetry_beacon"]},examples:[F("portal_hell_pit_found")]},e),En("add","progress-events","pit",F("wiki_events_pit"))}{let e=Tn(a,{name:"alien_encounter",template:"events",label:F("wiki_events_alien_encounter"),paragraphs:2,break:[2],h_level:2,para_data:{1:[F("galaxy_scout_ship"),F("tech_xeno_linguistics"),F("galaxy_corvette_ship")],2:["10%"]},data_link:{1:["wiki.html#intergalactic-structures-scout_ship","wiki.html#intergalactic-tech-xeno_linguistics","wiki.html#intergalactic-tech-corvette_ship"]}});Tn(a,{name:"alien_encounter_condition",template:"events",label:F("wiki_events_alien_encounter"),paragraphs:1,h_level:2,para_data:{1:[F("galaxy_scout_ship")]},examples:[F("galaxy_encounter")]},e),En("add","progress-events","alien_encounter",F("wiki_events_alien_encounter"))}{let e=Tn(a,{name:"piracy",template:"events",label:F("wiki_events_piracy"),paragraphs:3,break:[3],h_level:2,para_data:{2:[F("galaxy_piracy")],3:["20%"]},data_link:{2:["wiki.html#mechanics-gameplay-piracy"]}});Tn(a,{name:"piracy_condition",template:"events",label:F("wiki_events_piracy"),paragraphs:1,h_level:2,para_data:{1:[F("galaxy_embassy")]},data_link:{1:["wiki.html#intergalactic-structures-embassy"]},examples:[F("galaxy_piracy_msg",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name])]},e),En("add","progress-events","piracy",F("wiki_events_piracy"))}Tn(a,{name:"alien_database",template:"events",label:F("wiki_events_alien_database"),paragraphs:2,break:[2],h_level:2,para_data:{1:[F("galaxy_scavenger"),F("tech_alien_database")],2:[F("galaxy_scavenger"),"2%"]},data_link:{1:["wiki.html#intergalactic-structures-scavenger"]},examples:[F("galaxy_scavenger_find")]}),En("add","progress-events","alien_database",F("wiki_events_alien_database"));{let e=Tn(a,{name:"corrupt_gem",template:"events",label:F("wiki_events_corrupt_gem"),paragraphs:4,break:[2],h_level:2,para_data:{1:[F("resource_Corrupt_Gem_name"),F("portal_soul_forge_title")],2:[F("resource_Soul_Gem_name"),F("portal_soul_forge_title"),F("portal_soul_attractor_title")],3:["1/(11-X)","X",F("portal_soul_attractor_title")],4:[9,F("portal_soul_attractor_title"),"9.09%",0,"50%"]},data_link:{1:[!1,"wiki.html#hell-structures-soul_forge"],2:[!1,!1,"wiki.html#hell-structures-soul_attractor"]}});Tn(a,{name:"corrupt_gem_condition",template:"events",label:F("wiki_events_corrupt_gem"),paragraphs:1,h_level:2,para_data:{1:[F("tech_metaphysics")]},data_link:{1:["wiki.html#intergalactic-tech-metaphysics"]},examples:[F("portal_corrupt_gem")]},e),En("add","progress-events","corrupt_gem",F("wiki_events_corrupt_gem"))}Tn(a,{name:"vault_find",template:"events",label:F("wiki_events_vault_find"),paragraphs:3,break:[2],h_level:2,para_data:{1:[F("job_archaeologist"),F("portal_vault_title"),F("portal_ruins_name")],2:[F("job_archaeologist"),"2.5%"],3:[F("job_archaeologist"),F("portal_ruins_supressed"),F("portal_ruins_name"),"0%","2.5%","100%"]},data_link:{1:[!1,"wiki.html#hell-structures-vault"]},examples:[F("portal_ruins_vault")]}),En("add","progress-events","vault_find",F("wiki_events_vault_find"));{let e=Tn(a,{name:"syndicate",template:"events",label:F("wiki_events_syndicate"),paragraphs:2,break:[2],h_level:2,para_data:{1:[F("tech_shipyard",[Dn("dwarf")])],2:["5%"]},data_link:{1:["wiki.html#solar-tp_tech-shipyard"]}});Tn(a,{name:"syndicate_condition",template:"events",label:F("wiki_events_syndicate"),paragraphs:1,h_level:2,para_data:{1:[F("tech_long_range_probes")]},data_link:{1:["wiki.html#solar-tp_tech-long_range_probes"]},examples:[F("outer_syndicate",[F("civics_gov5",[F("civics_gov_name1")])])]},e),En("add","progress-events","syndicate",F("wiki_events_syndicate"))}}(a);break;case"special":!function(e){let a=En("create",e);Tn(a,{name:"special_intro",template:"events",paragraphs:3,h_level:2,para_data:{3:[F("boring")]}}),En("add","special-events","special_intro",F("wiki_menu_intro"));{let e="crystal",t=Tn(a,{name:e,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2,para_data:{2:[F("feat_friday_name")]}});Tn(a,{name:`${e}_condition`,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2},t),En("add","special-events",e,F(`wiki_events_${e}`))}{let e="valentine",t=Tn(a,{name:e,template:"events",label:F(`wiki_events_${e}`),paragraphs:3,break:[2,3],h_level:2,para_data:{2:[F("feat_love_name")]}});Tn(a,{name:`${e}_condition`,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2},t),En("add","special-events",e,F(`wiki_events_${e}`))}{let e="unlucky",t=Tn(a,{name:e,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2,para_data:{2:[F("feat_leprechaun_name")]}});Tn(a,{name:`${e}_condition`,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2},t),En("add","special-events",e,F(`wiki_events_${e}`))}{let e="fool",t=Tn(a,{name:e,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2,para_data:{2:[F("feat_fool_name")]}});Tn(a,{name:`${e}_condition`,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2},t),En("add","special-events",e,F(`wiki_events_${e}`))}{let e=on("easter");{let t="hopper",r=Tn(a,{name:t,template:"events",label:F(`wiki_events_${t}`),paragraphs:2,break:[2],h_level:2,para_data:{2:[F("feat_easter_name")]}});Tn(a,{name:`${t}_condition`,template:"events",label:F(`wiki_events_${t}`),paragraphs:2,break:[2],h_level:2,para_data:{1:[`${F(`month${e.date[0]}`)} ${e.date[1]}`]}},r),En("add","special-events",t,F(`wiki_events_${t}`))}{let r="egghunt",i=Tn(a,{name:r,template:"events",label:F(`wiki_events_${r}`),paragraphs:7,break:[2,3,4,6],h_level:2,para_data:{2:[F("feat_egghunt_name"),12,18],5:[F("trait_hyper_name"),F("trait_fast_growth_name"),F("trait_rainbow_name"),F("trait_optimistic_name")],7:[F("trait_cannibalize_name"),F("trait_rage_name"),F("trait_blood_thirst_name"),F("trait_sticky_name")]}}),s=["U2FsdGVkX1/PcdpekGFnkjSSCBa9yVo3z5xq3a2662iSlAA8yuaPEsK4Qyn5OSED","U2FsdGVkX180d8+Fl8mi96tY7KHkOWLkO0syi+BeZW47ga9AdJiBdbsksLaMTGvT","U2FsdGVkX19hHAatSiZiYe33Hx4u+bixNx4U7O4smhKVb/a+umB6MlIbgM3eE3UG","U2FsdGVkX188sIGEBwWHyzf0SkKQ027dzHZmkJp93FeXrXu70hD0KqYfoTxnbGqU","U2FsdGVkX18dLIKZyFStCpVKJrFAc36LF4uNcpuJd8CGU0yC1rPllsNfBHAhrfwT","U2FsdGVkX1/ZRiMKl3kG4PUQOx8bdgz7va6bLW3Gf5COBHAs7CMDITt7SDeIygvd","U2FsdGVkX19FZ4kZmquyj6NUTqo+AYS7U31mSik1W2Awdp5M6L1WlsG4Px8uUYUN","U2FsdGVkX1+9Eh/34O02cW0SuZg0rQYZnomSBjBQU4Q3VSU0y62ypmoJNjOb5Uix","U2FsdGVkX1+3qtRH9MVd1B8T+JP5DgnlER6u8P60vX/NVjLGuceG7DX+b2yPW3J5","U2FsdGVkX18JYj4R4QuZBpDdcsEjkYPAf3uNNIzu6Vs=","U2FsdGVkX1+Eq43UVbtPlveU6HqIU8PSHL8QH+FlUxWkhyB1S+QAVVM2z0OryeJd","U2FsdGVkX18brcDy1P4HEGkmTw5t19CgWEshDFRSByELjSG9MtvSdSBbj13JhYuG","U2FsdGVkX1/vr39YAfqKcFM7c8ed6Oi7lRrDYKDtfUJRKF3pcrIRAWc4FF/Tt5BjwaXOi0slDE9JmeIDifD2gw==","U2FsdGVkX19KtuHoWRLTz0wLH8D/fLoOriDsmk6agzT85xsAAXv26ILjSV2C8mpi","U2FsdGVkX18/Tyjq6czHYJKjJQPXcRCgqmZqu2AFmx2FddfQPzM+YkXXECLMVA+e","U2FsdGVkX19kn6Hj9vQq5JxU9dsKsu0U+qADHauwh7TPf1enfhF1VQamBs7VFuX5","U2FsdGVkX19ICmvq9eubXYyGpmRML9aqTzBZMRvvOWFMwp2IiJBUUpl4LgLJOwLqnEISPAepbrdrfJn8miQIgA==","U2FsdGVkX19P0vr33mSfkSTDVz7N3a59YF5Cc+/NMC0f1tT3fXJDLqZMi98gGOrv"],n=["U2FsdGVkX1+duY7hvIoeOGqas8WhBy8hojTLQ0OxadHBEDzOPwpc4K1Y6N+WyDah","U2FsdGVkX1+AQhvu619WY9xow4HmruRn5yJefuIkv3u7U6baVdV/mHLJfUaNmTE6","U2FsdGVkX1/whjtke2hryY9zWuV0MTzN2JKXaFyzwJXwtEx9+iLMbHkdVFwi6h63","U2FsdGVkX18FBXNUeu4NIIiy4Mmk++iyUIJKxFS/mZvAj98+eJR+SZj8xpXHTkia","U2FsdGVkX1/Imw6q6mixFM1BlgToue0NUqbCTHKuNZFHC1Vp7I934fUpj/xCFg33","U2FsdGVkX18h03LNWLTF59y343iStuLaS/0cgvLtKSMzm8UpzMVWBxwkGGSxDDPO","U2FsdGVkX18+W3R7IyisKi9TgzbkQ/636SJ7ubGsCx6Rz5GMxlTkbTVbOG6YFAC4Cle0TjI1riEzpGQtuCr6C+1mX3FdCLVz3oaGWqIajvI=","U2FsdGVkX18CjBzSHSIPZ07ZgvI6JgGiVIJE4ugYa2xWFeM1a/OnXrMT1sBpwmXwiHayBp1tdw83/4I55pGwpA==","U2FsdGVkX1+QWybO+rnrqxI23qXSKzevq0C/NPkX8/kd5h0xo20ozmxo4Pknui3G","U2FsdGVkX1//2GoF+3kVNPim1ThpVMgMCHEzSH0UZCrc4EIjktoxBC87gXddwhZR","U2FsdGVkX1/HQFE7BGTMIHN8G4pljsZlwtFaXHZh2U/VN4DD8lOL4OUYxnJUGr+g","U2FsdGVkX1/f1jFsIVKmxsXq85PuOj+fq+9WtYf1AZbPsuChio/XV6mpCxlTJz8X","U2FsdGVkX1+NRsztgBjDQeevIAYiHJ+X9dUERkDoYpLcvYAvWWzVvbjk4uq4dSMPEuykMqsZGGwvBtl1V0T+pO254xK8+5xWjZYnE9x6A+I=","U2FsdGVkX1//Crqk3ZOt8MHG/C4V91VEORQ3rQe4CEBHQhqfMD84PrEBZkwN7VpKvBgcg+2FsDknW+LDnNPIZA==","U2FsdGVkX1/bUrGTAmEkt6ukJKG8tIAIUVr4fnMFPsdamUtLJBGIG2dwQyaYywTD","U2FsdGVkX1/zl2y8RCXettY8EAPFE+cc/qImK4n5BocvEV2YvFKSyrOGxfLd3qBD","U2FsdGVkX19GszY2Yf01gUZnzs9F51vUgYu/FlRIPiFt9zasXhFP9tzX1en5/483mZeqi/uNRhV+zfoHd6qcYA==","U2FsdGVkX1+4syPwX9UT2KAsJj8uv43olf/GOTOudd/RbwnHsybitwYU4kk2ZVWx"];const c=(new Date).getFullYear(),o="egghunt";let l=`
                        ${F("wiki_feat_egghunt_found")}
                        `;l+='
                        ';for(let a=1;a<=18;a++){let r=t.special.egg.hasOwnProperty(c)&&t.special.egg[c][`egg${a}`]?"has-text-success":"has-text-danger",i=t.special.egg.hasOwnProperty(c)&&t.special.egg[c][`egg${a}`]?"found":"missing",_=`${F("wiki_events_hint_avail")} ${F(`month${e.hintDate[0]}`)} ${e.hintDate[1]}`;e.hint&&(_=''+CryptoJS.AES.decrypt(s[a-1],o).toString(CryptoJS.enc.Utf8)+"");let d=`${F("wiki_events_sol_avail")} ${F(`month${e.solveDate[0]}`)} ${e.solveDate[1]}`;e.solve&&(d=`${F("wiki_events_reveal_sol")}`),l+=`
                        ${F("wiki_feat_egghunt_num",[a])}${_}${d}
                        `}l+="
                        ",i.append(l),$(".eggsol").on("click",(function(){const e=$(this).attr("data-sol"),t=CryptoJS.AES.decrypt(e,o);$(this).html(t.toString(CryptoJS.enc.Utf8))})),Tn(a,{name:`${r}_condition`,template:"events",label:F(`wiki_events_${r}`),paragraphs:2,break:[2],h_level:2,para_data:{1:[`${F(`month${e.date[0]}`)} ${e.date[1]}`,`${F(`month${e.endDate[0]}`)} ${e.endDate[1]}`]}},i),En("add","special-events",r,F(`wiki_events_${r}`))}}{let e="launch_day",t=Tn(a,{name:e,template:"events",label:F(`wiki_events_${e}`),paragraphs:3,break:[2,3],h_level:2,para_data:{2:[F("feat_launch_day_name")],3:["5%"]}});Tn(a,{name:`${e}_condition`,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2},t),En("add","special-events",e,F(`wiki_events_${e}`))}{let e=t.hasOwnProperty("stats")?1e5+9e3*t.stats.reset:1e5;e>1e6&&(e=1e6);let r="solstice",i=Tn(a,{name:r,template:"events",label:F(`wiki_events_${r}`),paragraphs:4,break:[2,3,4],h_level:2,para_data:{1:[e.toLocaleString(),F(`wiki_events_${r}`)],2:[F("feat_solstice_name")]}});Tn(a,{name:`${r}_condition`,template:"events",label:F(`wiki_events_${r}`),paragraphs:2,break:[2],h_level:2},i),En("add","special-events",r,F(`wiki_events_${r}`))}{let e=t.hasOwnProperty("stats")?1e5+9e3*t.stats.reset:1e5;e>1e6&&(e=1e6);let r="firework",i=Tn(a,{name:r,template:"events",label:F(`wiki_events_${r}`),paragraphs:2,break:[2],h_level:2,para_data:{2:[F("feat_firework_name")]}});Tn(a,{name:`${r}_condition`,template:"events",label:F(`wiki_events_${r}`),paragraphs:2,break:[2],h_level:2},i),En("add","special-events",r,F(`wiki_events_${r}`))}{let e="halloween",t=Tn(a,{name:e,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2,para_data:{2:[F("feat_boo_name")]}});Tn(a,{name:`${e}_condition`,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2},t),En("add","special-events",e,F(`wiki_events_${e}`))}{let e=on("halloween"),r="trickortreat",i=Tn(a,{name:r,template:"events",label:F(`wiki_events_${r}`),paragraphs:3,break:[2,3],h_level:2,para_data:{2:[F("feat_trickortreat_name"),12]}}),s=["U2FsdGVkX1/PDiFXguD51NL4kEt4e9qRJwl5IKNCQE9vI3XAoH5gDW28r2V4O5GY","U2FsdGVkX18xhhpvSSA7YALgn1lm1e+GylSzgVdoTnLXMzPLL1knLlINAS8l5ECGfvjo6CDFYnuvqaw/8BugAw==","U2FsdGVkX18g9cYmSZKe/VjFeCjuODnwnD+i+2ShpdeMI4uIIzbllcQFIWJaQw+EvsDu5DFBNCEuFOsWRFVMyA==","U2FsdGVkX1+nD+SyHpi39fhqppxDiF+UhJh3w0dhZ4IxuC1s3h0gTrgBI7IxVLrQ","U2FsdGVkX1+OfTMTHGhIpqmihvW7fMCt0q+bLWqhd7Z0Cj31jNUqmvBcxb6HzbGc4mL/msBX6PO5zpb4pBUzwA==","U2FsdGVkX1+hC03MwAyWdqH6ODAGNbgm7CRgC+0Wfreja2JZX7oPwYhPmfQXzn1RfeIncnkRTmdXGMqQ/mq2GQ==","U2FsdGVkX18cU5HWOtwNhFSnlxBHxpu5XEJBFj3EhtzU/PLXxynq5Rq9YGl23QNr"],n=["U2FsdGVkX1/bQrTdTtuTtXbxmJvxhHdsacfjyPKgyzXzthWNTsjaxqcCKjwjqCyG","U2FsdGVkX19tP6ZlSqvfdg6qaoOceA6978unLN8j9VIm5LUJSHUZm77zK1i1rWq3","U2FsdGVkX18Ex9HXV1+h+DIdFBxpNPI4Gl0E0EwOFbpyncN5gEfS8fWURvPT11S66x4swlZjnntbhMvDG+4SWg==","U2FsdGVkX1+xyixviw9PD/sRskoRG9owodNkZlwcAMSzQXe2PdAJPLwEBV9knjgGg11ws2eEBHXj7Y5j5SS7br+Uehaaj0MViyfxYdsZOEQ=","U2FsdGVkX18+2YEr0TG80mQY483i7yOr+Qnh66mOKEviX0ElRHI9VCha9TG+no1r","U2FsdGVkX1/Vuthb9MYQT02lO0ngkSI4f1tbvrrCwtVQiUTSIaVgDHVYYcIgfSl3WfiRhwGJWeP/6w+i7FEqaA==","U2FsdGVkX1/3Zbp0Tlqh/n5TKvOJEIuaf9/DcDFlDz1s2Tb+qbUS1GmPTzpP3xLu"],c=["U2FsdGVkX18m9z0oToDhhhmI0ugH5ykCrV1z64upZad/LXRYaFAyDT+O15+BXmJUKv7yY4YiBS6SYc65LJQjwEkMY5orIcyusiXtY9xnpRY=","U2FsdGVkX18eejrZNi9yF98CBO4KWjBLzo8HTBagKST0kjPmH48UuPWKG7Y3qyfeUyAFuDBnNRgdbgXXcWVPTE+3tbqcRiqAUZF8iLhXbmY=","U2FsdGVkX1/RKcVkvhY8bsGcXAQX3xJH4Ns/tUctQzK58oI9LJBxzIDyOHlPatn49avqw8r5lEmWyJOL2wyUjUPlYR/C9CjtO8t8oBW4ymWZRi66Ia0z1tMRHZyamonp","U2FsdGVkX18fvaoGr3U+o/m+xJLnbmVKJ1/GjNERP1ZDotBG7lD7vCtB1XyrCV0CvZXI9WK3r+FLD4rc7ZsLav77MTvQY+3pmwTYB841IxkUGCRE2mQYcr01xtxOPxMBMppChSZ8KJFgzfLhxL2rog==","U2FsdGVkX18MRMhu9I4km+hryh9dnvVBSkHdUPBgyHnKLsRB8PxpcJSFNq9b0plJ","U2FsdGVkX18IDZ0hUGT3xuDSi9EVacctj7h0BThWEgzIovJAieOvqXg/0wrZWHXQvyyVMsQtOdBls2nDjryxiw==","U2FsdGVkX1891SskU89HRmZPzhBcScrDGfGpJsp8F1qgVnsuON0h6WL69wEF9/uEpRi393mOXOrubNYVFzRgjwqERT3G/f6u/4bWXGSLpS8="],o=["U2FsdGVkX19wIpvvED4RfWp5UAJfJvmnyhdkqsfr3BlVH5YEdjGNy4mcTvuvuY/92b6F3aQJHx0vunDJ64hcezPUAM5P+E/iROMQoMDCTJwwni6SRCpJggAHSOBTovW0piVAnyt6WHsjiAmVQVo8Og==","U2FsdGVkX1+bLPNq0l72utbOUTZ+JAXIUcGrrXVneoHD/GTbFy4jqDcU++SxaFih2aKODyZx3/SPbm0pd4JIQlu3xgl/demBDPj7TRbatEOM7aTBJhke5jwSYuIPTwWm8eyO0FINhZqO94pV4BFmcYv7b1lkzFgiLEOX/5kV/qE=","U2FsdGVkX1/QQZqQ4S2CvR3IQFL5D1pWbqrntie8JAuZrYUIQoke13j6xzI3A2KVG3lE+IZZo6Ktn2zKJ8diaroUUB/CIP0DvewzzbNj7XT3d9G456ELSMjjgb8pKc586Mq661bEjCqm+Tz2DoMLtnzMaVIXPhqBBFutt2U7JwERvNiwBkX2YhyOD3QO/tcPmwKzLJ+cYjIDSEHeCVl/yeistKb5pQbrmPH4wHAKbVQNaiaOvIjee0wqttzpmcnNgx4axIi2FAqPpT2s1hHAmhUmeV0HKDxYQWgfntqRhe/k4ar1vrZ2QdhLozqDe35S","U2FsdGVkX1+Z3/SLqEmoDq377QCt49UMTneD9zo6FqTfFOab0SWGG8ioBZ1z+/v422HygjnuwD341scmcTuA/4Pz9APy3FQcCqA5Fw4hDed+LvjrecqEZogyCw1WVaCItGXZW9+TXM0/y6p7VXvuyw==","U2FsdGVkX19CLOS3ivLPeqIYtjSBdW1WT4UFvJjNDto6jy9751Q73OZF2JQlhgKyayhswWuEk+JGbYwLbDbWhJgZUR/R9hYJnw8/Wcay4eM=","U2FsdGVkX19Pm5I9mqzijXCNM3dk4ut0IDPpownMePohkcfE6jsuLA0dgzv9vp5tjEVPaUD/bqMgEzsD9svhOEJd+zlslkqIsBee6EJTO/4=","U2FsdGVkX19TcqGI2bk6XYN40buKCGWH58AjMFDNE/jawAK+II3s6TvoVCcXbZsKzLF2++aeUgq6Ag+TysbSf5/T3IHeqQQnjFGIkkzlmMJH9wROKLirkPSzsw8O6J1J"];const l=(new Date).getFullYear(),_="trickortreat";let d=`
                        ${F("wiki_feat_trick_found")}
                        `;d+='
                        ';for(let a=1;a<=s.length;a++){let r=t.special.trick.hasOwnProperty(l)&&t.special.trick[l][`treat${a}`]?"has-text-success":"has-text-danger",i=t.special.trick.hasOwnProperty(l)&&t.special.trick[l][`treat${a}`]?"found":"missing",c=`${F("wiki_events_hint_avail")} ${F(`month${e.hintDate[0]}`)} ${e.hintDate[1]}`;e.hint&&(c=''+CryptoJS.AES.decrypt(s[a-1],_).toString(CryptoJS.enc.Utf8)+""),d+=`
                        ${F("wiki_feat_treat_num",[a])}${c}
                        `;let o=`${F("wiki_events_sol_avail")} ${F(`month${e.solveDate[0]}`)} ${e.solveDate[1]}`;e.solve&&(o=`${F("wiki_events_reveal_sol")}`),d+=`
                        ${o}
                        `}d+="
                        ",i.append(d);let p=`
                        ${F("wiki_feat_treat_found")}
                        `;p+='
                        ';for(let a=1;a<=c.length;a++){let r=t.special.trick.hasOwnProperty(l)&&t.special.trick[l][`trick${a}`]?"has-text-success":"has-text-danger",i=t.special.trick.hasOwnProperty(l)&&t.special.trick[l][`trick${a}`]?"found":"missing",s=`${F("wiki_events_hint_avail")} ${F(`month${e.hintDate[0]}`)} ${e.hintDate[1]}`;e.hint&&(s=''+CryptoJS.AES.decrypt(c[a-1],_).toString(CryptoJS.enc.Utf8)+""),p+=`
                        ${F("wiki_feat_trick_num",[a])}${s}
                        `;let n=`${F("wiki_events_sol_avail")} ${F(`month${e.solveDate[0]}`)} ${e.solveDate[1]}`;e.solve&&(n=`${F("wiki_events_reveal_sol")}`),p+=`
                        ${n}
                        `}p+="
                        ",i.append(p),$(".totsol").on("click",(function(){const e=$(this).attr("data-sol"),t=CryptoJS.AES.decrypt(e,_);$(this).html(t.toString(CryptoJS.enc.Utf8))})),Tn(a,{name:`${r}_condition`,template:"events",label:F(`wiki_events_${r}`),paragraphs:2,break:[2],h_level:2,para_data:{1:[`${F(`month${e.date[0]}`)} ${e.date[1]}`,`${F(`month${e.endDate[0]}`)} ${e.endDate[1]}`]}},i),En("add","special-events",r,F(`wiki_events_${r}`))}{let e="turkey",t=Tn(a,{name:e,template:"events",label:F(`wiki_events_${e}`),paragraphs:3,break:[2,3],h_level:2,para_data:{2:[F("feat_gobble_gobble_name")]}});Tn(a,{name:`${e}_condition`,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2},t),En("add","special-events",e,F(`wiki_events_${e}`))}{let e="festive",t=Tn(a,{name:e,template:"events",label:F(`wiki_events_${e}`),paragraphs:1,h_level:2});["elven","centaur","capybara","wendigo","yeti","entish"].forEach((function(a){Tn(t,{name:a,template:`events_${e}`,label:F(`wiki_events_${e}`),paragraphs:2,h_level:0,para_data:{1:[F(`race_${a}`)]}})})),Tn(a,{name:`${e}_condition`,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2},t),En("add","special-events",e,F(`wiki_events_${e}`))}{let e="xmas",t=Tn(a,{name:e,template:"events",label:F(`wiki_events_${e}`),paragraphs:6,break:[2,3,4,5,6],h_level:2,para_data:{2:[F("feat_xmas_name")]}});Tn(a,{name:`${e}_condition`,template:"events",label:F(`wiki_events_${e}`),paragraphs:1,h_level:2},t),En("add","special-events",e,F(`wiki_events_${e}`))}}(a)}})(r),zc(a,r,i);break;case"species":"planets"===r?Nn():function(e){let a=$("#content");switch(Cs(a),e){case"races":!function(e){e=En("create",e);let a=[];Object.keys(Di).forEach((function(r){if("custom"===r&&!t.custom.hasOwnProperty("race0")||"protoplasm"===r)return;let i=$(`
                        `);e.append(i),i.append(`

                        ${Di[r].name}

                        ${F(`genelab_genus_${Di[r].type}`)}
                        `),i.append(`
                        ${"string"==typeof Di[r].desc?Di[r].desc:Di[r].desc()}
                        `);let s=[],n=function(e){const t=new Date;let a=ln();switch(e){case"wolven":return a.active?[{t:"hyper",r:1},{t:"fast_growth",r:1},{t:"rainbow",r:1},{t:"optimistic",r:1}]:[];case"vulpine":return a.active?[{t:"cannibalize",r:1},{t:"rage",r:1},{t:"blood_thirst",r:1},{t:"sticky",r:1}]:[];case"elven":return 11===t.getMonth()&&t.getDate()>=17?[{t:"slaver",r:2},{t:"resourceful",r:.5},{t:"small",r:.25}]:[];case"capybara":return 11===t.getMonth()&&t.getDate()>=17?[{t:"beast_of_burden",r:1},{t:"pack_rat",r:.5},{t:"musical",r:.25}]:[];case"centaur":return 11===t.getMonth()&&t.getDate()>=17?[{t:"beast_of_burden",r:1},{t:"curious",r:.5},{t:"blissful",r:.25}]:[];case"wendigo":return 11===t.getMonth()&&t.getDate()>=17?[{t:"immoral",r:3},{t:"cannibalize",r:.5},{t:"claws",r:.25}]:[];case"yeti":return 11===t.getMonth()&&t.getDate()>=17?[{t:"scavenger",r:3},{t:"regenerative",r:.5},{t:"musical",r:.25}]:[];case"entish":return 11===t.getMonth()&&t.getDate()>=17?[{t:"photosynth",r:3},{t:"optimistic",r:.5},{t:"armored",r:.25}]:[];default:return[]}}(r),c=$('
                        ');Object.keys(Ei[Di[r].type]).sort().forEach((function(e){let t=`raceTrait${r}${e}`,a=Di[r].fanaticism===e?"danger":"caution";c.append(`${Ki[e].name}`),s.push({t:e,r:1})})),Object.keys(Di[r].traits).sort().forEach((function(e){let t=`raceTrait${r}${e}`,a=Di[r].fanaticism===e?"danger":"info";c.append(`${Ki[e].name}`),s.push({t:e,r:Di[r].traits[e]})}));for(let e=0;e${Ki[n[e].t].name}`),s.push(n[e])}i.append(c),a.push(r),_s(`genus${r}`,$(`
                        ${F(`genelab_genus_${Di[r].type}_desc`)}
                        `),{wide:!0,classes:"w25"});for(let e=0;e");fn(a,s[e].t,{fanatic:s[e].t===Di[r].fanaticism&&Di[r].name,trank:s[e].r,wiki:!0}),_s(t,a,{wide:!0,classes:"w25"})}})),a.sort(((e,t)=>Di[e].namers("name",e).localeCompare(rs("name",t)))).forEach((function(r){if(t[a].includes(Ki[r].type)){let t=$(`
                        `);e.append(t),fn(t,r,{tpage:!0,wiki:!0}),En("add","traits-species",`${Ki[r].type}_${r}`,rs("name",r))}}))}(a);break;case"custom":!function(e){Tn(e,{name:"custom",template:"mechanics",label:F("wiki_mechanics_custom"),paragraphs:12,break:[3,5,9,11],full:!0,h_level:2,para_data:{1:[F("wiki_resets_ascension")],2:[F("wiki_resets_ascension")],5:[F("resource_Genes_name")],6:[F("resource_Genes_name")],7:[2],8:[F("achieve_technophobe_name"),5,7],9:[F("tech_fanaticism"),F("tech_deify")],11:[0,F("resource_Genes_name")],12:[F("resource_Genes_name"),F("trait_untapped_name")]},data_link:{1:["wiki.html#resets-prestige-ascension"],2:["wiki.html#resets-prestige-ascension"],8:["wiki.html#perks-prestige-technophobe"],9:[t.genes.transcendence?"wiki.html#civilized-tech-alt_fanaticism":"wiki.html#civilized-tech-fanaticism","wiki.html#early_space-tech-deify"]}});let a=$('
                        ');e.append(a),Jt(a)}(a)}}(r),zc(a,r,i);break;case"structures":Vn(r,"standard"),zc(a,r,i);break;case"tech":dc(r,"standard"),zc(a,r,i);break;case"tp_structures":Vn(r,"truepath"),zc(a,r,i);break;case"tp_tech":dc(r,"truepath"),zc(a,r,i);break;case"arpa":!function(e){let a=$("#content");switch(Cs(a),e){case"projects":!function(e){e.append(`
                        ${F("wiki_arpa_projects")}
                        `);let a=$("
                        "),r=En("create",a);e.append(a),Object.keys(Pe).forEach((function(e){let a=$(`
                        `);r.append(a),function(e,a){let r="string"==typeof Pe[a].title?Pe[a].title:Pe[a].title(!0);e.append(`

                        ${r}

                        `);let i=$('
                        ');if(e.append(i),i.append(`
                        ${"string"==typeof Pe[a].desc?Pe[a].desc:Pe[a].desc()}
                        `),i.append(`
                        ${"string"==typeof Pe[a].effect?Pe[a].effect:Pe[a].effect()}
                        `),Mc[a]){let t=$("
                        ");e.append(t),function(e,t){let a=$('
                        ');if(e.append(a),Mc.hasOwnProperty(t))for(let e=0;e${Mc[t][e]}`)}(t,a)}!function(e,a){let r={owned:0,creepVis:!0,extra:{creative:!1}},i={};switch(a){case"monument":r.extra.m_type="Obelisk";break;case"launch_facility":r.creepVis=!1}let s=Pe[a];r.real_owned=t.arpa[a]?t.arpa[a].rank:0;let n=$('
                        ');e.append(n);let c=$(`

                        ${F("wiki_calc_cost")}

                        `),o=$(`

                        ${F("wiki_calc_cost_creep")}

                        `);n.append(c),n.append(o);let l=s.cost;Object.keys(Ie(l)).forEach((function(e){i[e]={};let a="Money"===e?"$":t.resource[e].name+": ";c.append($(`
                        ${a}{{ r.${e}.cost }}
                        `)),o.append($(`
                        {{ r.${e}.creep }}
                        `))}));let _=function(){let e=Ie(l,r.owned-r.real_owned,r.extra);Object.keys(i).forEach((function(t){let a=e[t]?e[t](r.owned-r.real_owned,r.extra):0;i[t].vis=a>0,i[t].cost=q(a,1)}))};_();let d=function(){if("launch_facility"!==a){let e=Ie(l,100,r.extra),t=Ie(l,99,r.extra);Object.keys(i).forEach((function(a){e[a]&&(i[a].creep=+(e[a](100,r.extra)/t[a](99,r.extra)).toFixed(4))}))}};d();let p='\n
                        \n
                        ';"launch_facility"!==a&&(p+=`\n
                        ${F("wiki_calc_level")} -+
                        `),"monument"===a&&(p+=`\n
                        ${F("wiki_calc_m_type")} \n \n {{ 'Obelisk' | monumentLabel }}\n {{ 'Statue' | monumentLabel }}\n {{ 'Sculpture' | monumentLabel }}\n {{ 'Monolith' | monumentLabel }}\n {{ 'Pillar' | monumentLabel }}\n {{ 'Megalith' | monumentLabel }}\n
                        \n `),p+=`\n
                        ${F("trait_creative_name")}
                        \n
                        \n
                        \n \n
                        \n
                        \n `,e.append($(p)),zs({el:`#${a}`,data:{i:r,r:i},methods:{val(e){r[e]=Math.round(r[e]),r[e]&&r[e]<0&&(r[e]=0),_()},less(e){r[e]>0&&r[e]--},more(e){r[e]++},pickMonument(e){r.extra.m_type=e,_(),d()},update(){_(),d()},importInputs(){"launch_facility"!==a&&(r.owned=r.real_owned),r.extra.creative=!!t.race.creative,"monument"===a&&t.arpa.m_type&&(r.extra.m_type=t.arpa.m_type)}},filters:{monumentLabel(e){switch(e){case"Obelisk":return F("arpa_project_monument_obelisk");case"Statue":return F("arpa_project_monument_statue");case"Sculpture":return F("arpa_project_monument_sculpture");case"Monolith":return F("arpa_project_monument_monolith");case"Pillar":return F("arpa_project_monument_pillar");case"Megalith":return F("arpa_project_monument_megalith")}}}})}(e,a)}(a,e),En("add","projects-arpa",e,"string"==typeof Pe[e].title?Pe[e].title:Pe[e].title(!0))}))}(a);break;case"genetics":break;case"crispr":xc(a);break;case"blood":jc(a)}}(r),zc(a,r,i);break;case"achievements":"tracker"===r||pc(r),zc(a,r,i);break;case"changelog":!function(){let e=$("#content");Cs(e);for(let t=0;t');e.append(a);let r=Sc[t].hasOwnProperty("revision")?Sc[t].revision:"";a.append(`

                        v${Sc[t].version}${r}

                        ${Sc[t].date}
                        `);for(let e=0;e${Sc[t].changes[e]}`)}}(),window.location.hash=`#${a}`}}function zc(e,t,a){void 0===a?window.location.hash=`#${t}-${e}`:(window.location.hash=`#${t}-${e}-${a}`,setTimeout((function(){document.getElementById(a).scrollIntoView({block:"start",behavior:"smooth"})}),125))}function Fc(e,t,a){let r=!!window.location.hash&&window.location.hash.substring(1).split("-"),i="";for(let s=0;s1&&r[1]===e[s].key?' :active="true" expanded':""}>`,i+=Fc(e[s].submenu,!1,e[s].key),i+="";else{let n=!r&&t&&0===s||r&&r[0]===e[s].key?' :active="true"':"",c=a?`'${a}','${e[s].key}'`:`'${e[s].key}',false`;i+=``}return i}function Ac(){let e=$("#content");Cs(e);let a=`${["Beorseder","Rodrigodd","Volch"].join(', ').replace(/, ([^,]*)$/,", & $1")}`,r=t.beta?`beta v${t.version}.${t.beta}`:"v"+t.version;e.append(`
                        ${F("wiki_main_title")} - ${r}
                        `),e.append(`
                        ${F("wiki_main_author",["Demagorddon"])}
                        `),e.append(`
                        ${F("wiki_main_spoiler")}
                        `),e.append(`
                        ${F("wiki_main_blurb")}
                        `),e.append(`
                        ${F("wiki_main_contribution",[a])}
                        `),e.append(`
                        ${F("wiki_resources")}
                        `);let i=$('
                          ');e.append(i),i.append(`
                        • ${F("wiki_resources_begin_guide")} ${F("wiki_resources_by",["GreyCat"])}
                        • `),i.append(`
                        • ${F("wiki_resources_tracker")} ${F("wiki_resources_by",["Karsen777"])}
                        • `)}$("body").empty(),function(){$("body").append($(`

                          ${F("wiki_menu_evolve")}

                          `));let e=$('
                          ');$("body").append(e);let t=$('');e.append(t);let a=`",t.append(a),zs({el:"#menu",data:{},methods:{loadPage(e,t){Cc(e,t)}}});let r=$('
                          ');if(e.append(r),window.location.hash){let e=window.location.hash.substring(1).split("-");e.length>1?e.length>2?Cc(e[1],e[0],e[2]):Cc(e[1],e[0]):Cc(e[0])}else Ac()}()})(); \ 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:{consume:{}}},i={},s={},n={},c={},o={},l={},_=0,d={t:0};var p={},u={},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:f()}else f()}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 v(){["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.8",t.revision="a",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),S(!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=[]),v(),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 i=Number(r.substring(1,5));(i=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 k(){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 x={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 i=0,s="",n=e<0;return n&&(e*=-1),e<=9999?i=+e.toFixed(a):e<1e6?(s=x[t.settings.affix][0],i=r?+(e/1e3).toFixed(1):Math.floor(e/100)/10):e<1e9?(s=x[t.settings.affix][1],i=r?+(e/1e6).toFixed(1):Math.floor(e/1e4)/100):e<1e12?(s=x[t.settings.affix][2],i=r?+(e/1e9).toFixed(1):Math.floor(e/1e7)/100):e<1e15?(s=x[t.settings.affix][3],i=r?+(e/1e12).toFixed(1):Math.floor(e/1e10)/100):e<1e18?(s=x[t.settings.affix][4],i=r?+(e/1e15).toFixed(1):Math.floor(e/1e13)/100):e<1e21?(s=x[t.settings.affix][5],i=r?+(e/1e18).toFixed(1):Math.floor(e/1e16)/100):e<1e24?(s=x[t.settings.affix][6],i=r?+(e/1e21).toFixed(1):Math.floor(e/1e19)/100):(s=x[t.settings.affix][7],i=r?+(e/1e24).toFixed(1):Math.floor(e/1e22)/100),i>=100&&(i=+i.toFixed(1)),n&&(i*=-1),i+s}function P(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(){k()})),window.soft_reset=function(a){try{a=a&&"replicator"===a?"replicator":"soft",gtag("event","reset",{end:a})}catch(e){}a||M();let r=!!t.race.hasOwnProperty("srace")&&t.race.srace,i=t.race.hasOwnProperty("geck")?t.race.geck:0;t.race.hasOwnProperty("gecked")&&(i+=t.race.gecked,t.stats.geck-=t.race.gecked);let s={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};i>0&&(s.geck=i),r&&(s.srace=r),t.race.bigbang&&(s.bigbang=!0),t.race.gods&&(s.gods=t.race.gods),t.race.old_gods&&(s.old_gods=t.race.old_gods),t.race.rapid_mutation&&t.race.rapid_mutation>0&&(s.rapid_mutation=t.race.rapid_mutation),t.race.ancient_ruins&&t.race.ancient_ruins>0&&(s.ancient_ruins=t.race.ancient_ruins),t.race.bigbang&&(s.universe="bigbang"),t.race.hasOwnProperty("corruption")&&(s.corruption=t.race.corruption),t.race=s;let n=t.city.calendar.orbit,c=t.city.biome,o=t.city.ptrait,l=t.city.geology;t.city={calendar:{day:0,year:0,weather:2,temp:1,moon:0,wind:0,orbit:n},biome:c,ptrait:o,geology:l},t.tech.theology&&t.tech.theology>=1?t.tech={theology:1}:t.tech={},C(),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 j={w:!1,s:!1,mt:250},O={};function M(){m.forEach((function(e){"achievements"!==e&&(t.lastMsg[e]=[])}))}function S(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 C(){j.w&&j.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,S(!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 z;function F(e,a){let r=z[e];if(!r)return t.settings.expose&&(console.error(`string ${e} not found`),console.log(z)),e;if(a)if(a instanceof Array){for(let i=0;i{r=e})),"en-US"!=a){let e;try{$.getJSON(`strings/strings.${a}.json`,(t=>{e=t}))}catch(e){console.error(e,e.stack)}const i=r.length;e&&Object.assign(r,e),r.length!=i&&t.settings.expose&&console.error(`string.${a}.json has extra keys.`)}let i=e.getItem("string_pack")||!1;if(i&&t.settings.sPackOn){let e;try{e=JSON.parse(LZString.decompressFromUTF16(i))}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}),z=r}(t.settings.locale);const A={soldier:{name:F("governor_soldier"),desc:F("governor_soldier_desc"),title:[F("governor_soldier_t1"),F("governor_soldier_t2"),F("governor_soldier_t3")],traits:{tactician:1,militant:1}},criminal:{name:F("governor_criminal"),desc:F("governor_criminal_desc"),title:[F("governor_criminal_t1"),F("governor_criminal_t2"),{m:F("governor_criminal_t3m"),f:F("governor_criminal_t3f")}],traits:{noquestions:1,racketeer:1}},entrepreneur:{name:F("governor_entrepreneur"),desc:F("governor_entrepreneur_desc"),title:[F("governor_entrepreneur_t1"),F("governor_entrepreneur_t2"),{m:F("governor_entrepreneur_t3m"),f:F("governor_entrepreneur_t3f")}],traits:{dealmaker:1,risktaker:1}},educator:{name:F("governor_educator"),desc:F("governor_educator_desc"),title:[F("governor_educator_t1"),F("governor_educator_t2"),F("governor_educator_t3")],traits:{teacher:1,theorist:1}},spiritual:{name:F("governor_spiritual"),desc:F("governor_spiritual_desc"),title:[F("governor_spiritual_t1"),F("governor_spiritual_t2"),F("governor_spiritual_t3")],traits:{inspirational:1,pious:1}},bluecollar:{name:F("governor_bluecollar"),desc:F("governor_bluecollar_desc"),title:[{m:F("governor_bluecollar_t1m"),f:F("governor_bluecollar_t1f")},F("governor_bluecollar_t2"),{m:F("governor_bluecollar_t3m"),f:F("governor_bluecollar_t3f")}],traits:{pragmatist:1,dirty_jobs:1}},noble:{name:F("governor_noble"),desc:F("governor_noble_desc"),title:[{m:F("governor_noble_t1m"),f:F("governor_noble_t1f")},{m:F("governor_noble_t2m"),f:F("governor_noble_t2f")},{m:F("governor_noble_t3m"),f:F("governor_noble_t3f")},{m:F("governor_noble_t4m"),f:F("governor_noble_t4f")}],traits:{extravagant:1,aristocrat:1}},media:{name:F("governor_media"),desc:F("governor_media_desc"),title:[F("governor_media_t1"),{m:F("governor_media_t2m"),f:F("governor_media_t2f")},F("governor_media_t3")],traits:{gaslighter:1,muckraker:1}},sports:{name:F("governor_sports"),desc:F("governor_sports_desc"),title:[F("governor_sports_t1"),F("governor_sports_t2"),F("governor_sports_t3")],traits:{athleticism:1,nopain:1}},bureaucrat:{name:F("governor_bureaucrat"),desc:F("governor_bureaucrat_desc"),title:[F("governor_bureaucrat_t1"),{m:F("governor_bureaucrat_t2m"),f:F("governor_bureaucrat_t2f")},F("governor_bureaucrat_t3")],traits:{organizer:1}}},I={tactician:{name:F("gov_trait_tactician"),effect(){return F("gov_trait_tactician_effect",[$(this)[0].vars()[0]])},vars:()=>[25]},militant:{name:F("gov_trait_militant"),effect(){return F("gov_trait_militant_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[25,10]},noquestions:{name:F("gov_trait_noquestions"),effect(){return F("gov_trait_noquestions_effect",[$(this)[0].vars()[0]])},vars:()=>[.005]},racketeer:{name:F("gov_trait_racketeer"),effect(){return F("gov_trait_racketeer_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[20,35]},dealmaker:{name:F("gov_trait_dealmaker"),effect(){return F("gov_trait_dealmaker_effect",[$(this)[0].vars()[0]])},vars:()=>[125]},risktaker:{name:F("gov_trait_risktaker"),effect(){return F("gov_trait_risktaker_effect",[$(this)[0].vars()[0]])},vars:()=>[12]},teacher:{name:F("gov_trait_teacher"),effect(){return F("gov_trait_teacher_effect",[$(this)[0].vars()[0]])},vars:()=>[6]},theorist:{name:F("gov_trait_theorist"),effect(){return F("gov_trait_theorist_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[50,4]},inspirational:{name:F("gov_trait_inspirational"),effect(){return F("gov_trait_inspirational_effect",[$(this)[0].vars()[0]])},vars:()=>[20]},pious:{name:F("gov_trait_pious"),effect(){let e=$(this)[0].vars()[1],a=t.tech.monument&&t.tech.monument>=3&&s.s_gate?3:1;return e=("corpocracy"===t.civic.govern.type?2*e:e)*a,F("gov_trait_pious_effect",[$(this)[0].vars()[0],e])},vars:()=>[10,5]},pragmatist:{name:F("gov_trait_pragmatist"),effect(){return F("gov_trait_pragmatist_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[50,2]},dirty_jobs:{name:F("gov_trait_dirty_jobs"),effect(){return F("gov_trait_dirty_jobs_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars:()=>[.015,1,10]},extravagant:{name:F("gov_trait_extravagant"),effect(){return F("gov_trait_extravagant_effect",[$(this)[0].vars()[0],ui("large",!0),$(this)[0].vars()[1],$(this)[0].vars()[2]+5])},vars:()=>[10,1.25,1]},aristocrat:{name:F("gov_trait_aristocrat"),effect(){return F("gov_trait_aristocrat_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars:()=>[50,20,10]},gaslighter:{name:F("gov_trait_gaslighter"),effect(){return F("gov_trait_gaslighter_effect",[$(this)[0].vars()[0],di(),$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars:()=>[1,1,.5]},muckraker:{name:F("gov_trait_muckraker"),effect(){return F("gov_trait_muckraker_effect",[$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars:()=>[8,12,3]},athleticism:{name:F("gov_trait_athleticism"),effect(){return F("gov_trait_athleticism_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2],di()])},vars:()=>[1.5,2,4]},nopain:{name:F("gov_trait_nopain"),effect(){return F("gov_trait_nopain_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars:()=>[50,10]},organizer:{name:F("gov_trait_organizer"),effect(){return F("gov_trait_organizer_effect",[$(this)[0].vars()[0]])},vars:()=>[t.genes.governor&&t.genes.governor>=2?2:1]}},T={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 L(e){let a=[],r=Di[t.race.species].type,i=Object.keys(A),s=JSON.parse(JSON.stringify(T[r]));e=e||i.length;for(let t=0;t');$("#r_govern1").append(e);let a=$('
                          ');e.append(a);let r=$("
                          ");r.append($(`
                          ${F("governor_office",[t.race.governor.g.n])}
                          `)),r.append($(`
                          ${F("governor_background")}: ${A[t.race.governor.g.bg].name}
                          `)),a.append(r),a.append($(`
                          ${F("governor_fire")}
                          `));let i=[0,1,2];t.genes.governor&&t.genes.governor>=2&&(i.push(i.length),D("organizer",0)&&i.push(i.length)),D("organizer",0)&&i.push(i.length),i.forEach((function(t){let a=`{{ 'none' | label }}`;Object.keys(G).forEach((function(e){G[e].req()&&(a+=`{{ '${e}' | label }}`)})),e.append(`
                          ${F("gov_task",[t+1])}\n \n ${a}\n
                          `)})),t.race.governor.hasOwnProperty("config")||(t.race.governor.config={});let s=$('
                          ');e.append(s);{t.race.governor.config.hasOwnProperty("storage")||(t.race.governor.config.storage={crt:1e3,cnt:1e3});let e=$(`
                          ${F("gov_task_storage")}
                          `);s.append(e);let a=$('
                          ');e.append(a);let r=t.race.kindling_kindred||t.race.smoldering?t.race.smoldering?"Chrysotile":"Stone":"Plywood",i="Steel";a.append($(`${F("gov_task_storage_reserve",[t.resource[r].name])}`)),a.append($(`${F("gov_task_storage_reserve",[t.resource[i].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=$(`
                          ${F("gov_task_bal_storage")}
                          ${F("advanced")}
                          `);s.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=$(`
                          ${F("gov_task_merc")}
                          `);s.append(e);let a=$('
                          ');e.append(a),a.append($(`${F("gov_task_merc_buffer")}`)),a.append($(`${F("gov_task_merc_reserve")}`))}{t.race.governor.config.hasOwnProperty("spy")||(t.race.governor.config.spy={reserve:100});let e=$(`
                          ${F("gov_task_spy")}
                          `);s.append(e);let a=$('
                          ');e.append(a),a.append($(`${F("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=$(`
                          ${F("gov_task_spyop")}
                          `);s.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

                          ${F("gov_task_spyop_priority",[X(a.substring(3))])}

                          \n
                            \n `);let i=$(`#spyopConfig${a}`);t.race.governor.config.spyop[a].forEach((function(e){i.append(`\n
                          • ${F("civics_spy_"+e)}
                          • \n `)}))}}))}{t.race.governor.config.hasOwnProperty("tax")||(t.race.governor.config.tax={min:20});let e=$(`
                            ${F("gov_task_tax")}
                            `);s.append(e);let a=$('
                            ');e.append(a),a.append($(`${F("gov_task_tax_min")}`))}{t.race.governor.config.hasOwnProperty("slave")||(t.race.governor.config.slave={reserve:100});let e=$(`
                            ${F("gov_task_slave")}
                            `);s.append(e);let a=$('
                            ');e.append(a),a.append($(`${F("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=$(`
                            ${F("gov_task_trash")}
                            `);s.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=$(`
                            ${F("gov_task_replicate")}
                            `);s.append(e);let a=$('
                            ');e.append(a),a.append($(`
                            ${F("gov_task_replicate_auto")}
                            `)),a.append($(`${F("gov_task_replicate_pmax")}`)),a.append($(`${F("gov_task_replicate_buff")}`));let r=$('
                            ');e.append(r),r.append($(`
                            ${F("gov_task_replicate_que")}
                            `)),r.append($(`
                            ${F("gov_task_replicate_neg")}
                            `)),r.append($(`
                            ${F("gov_task_replicate_cap")}
                            `))}zs({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,$s("govtask",{task:e}),zs({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=L(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,hi(!1,["city-amphitheatre","city-apartment"]),fs(),ys(),E())},fireText(){let e=(10+(t.race.governor.hasOwnProperty("f")?t.race.governor.f:0))**2-50;return`
                            ${F("governor_fire")}
                            ${e} ${F("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=>F(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():F(`gov_task_${e}`)}}),_s("govOffice",(function(){let e="";return Object.keys(A[t.race.governor.g.bg].traits).forEach((function(t){e+=(I[t].hasOwnProperty("effect")?I[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,E()}})}(e)}))}():function(){let e=$('
                            ');$("#r_govern1").append(e),t.race.hasOwnProperty("governor")&&t.race.governor.hasOwnProperty("candidates")||(t.race.governor={candidates:L(10)}),e.append($(`
                            ${F("governor_candidate")}${F("governor_background")}
                            `));for(let a=0;a${r.t} ${r.n}${A[r.bg].name}
                            `))}zs({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"},hi(!1,["city-amphitheatre","city-apartment"]),fs(),ys(),E(),$s("governor",{appoint:t.race.governor.g.bg})}}}}),t.race.governor.candidates.forEach((function(e){_s(`candidates-${e.bg}`,(function(){let t="";return Object.keys(A[e.bg].traits).forEach((function(e){t+=(I[e].hasOwnProperty("effect")?I[e].effect():"")+" "})),t}),{elm:`#candidates .${e.bg} .bg`})}))}())}function K(){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"))&&!!A[t.race.governor.g.bg].traits[e]&&I[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=pe("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);)pe("adj_tax","sub");else t.city.morale.potential>=t.city.morale.cap+e&&t.civic.taxes.tax_ratet.race.governor.config.tax.min&&pe("adj_tax","sub")}}},storage:{name:F("gov_task_storage"),req:()=>!!(Rr("storage_yard")&&t.tech.container&&t.resource.Crates.display),task(){if($(this)[0].req()){if(t.resource.Crates.amountr&&cr("crate",Math.floor((t.resource[e].amount-r)/a))}if(Rr("warehouse")&&t.resource.Containers.display&&t.resource.Containers.amounta&&cr("container",Math.floor((t.resource.Steel.amount-a)/e))}}}},bal_storage:{name:F("gov_task_bal_storage"),req:()=>!!(Rr("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,i=r,s=0,n=Object.keys(t.resource).slice().reverse();n.forEach((function(a){t.resource[a].display&&t.resource[a].stackable?(e+=t.resource[a].crates,r+=t.resource[a].containers,s++):(t.resource[a].crates=0,t.resource[a].containers=0)}));let c=Math.floor(e/s),o=Math.floor(r/s),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")){s--;{let r=Math.floor(c*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(o*l[a].m);l[a].hasOwnProperty("cap")&&e>l[a].cap&&(e=l[a].cap),t.resource[a].containers=e,r-=e}}else s+=l[a].m-1})),c=0!==s?Math.floor(e/s):0,o=0!==s?Math.floor(r/s):0,e-=Math.floor(c*s),r-=Math.floor(o*s),n.forEach((function(a){if((!l[a]||!l[a].hasOwnProperty("cap"))&&(!t.race.artifical||"Food"!==a)&&t.resource[a].display&&t.resource[a].stackable){let i=l[a]?l[a].m:1,s=Math.floor(c>0?c*i:0);if(t.resource[a].crates=s,t.resource.Containers.display){let e=Math.floor(o>0?o*i:0);t.resource[a].containers=e}if(e>0&&i>=1){let r=Math.ceil(i/2);e0&&i>=1){let e=Math.ceil(i/2);r0&&(e>0||r>0);)_--,n.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,s&&(t.resource.Crates.max-=a,t.resource.Containers.max-=i)}}},assemble:{name:F("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&&Sr.city.assembly.action()}},clone:{name:F("gov_task_clone"),req:()=>!!t.tech.cloning,task(){$(this)[0].req()&&t.resource[t.race.species].max>t.resource[t.race.species].amount&&Sr.tauceti.tau_home.cloning_facility.action()}},merc:{name:F("gov_task_merc"),req:()=>!(!Rr("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>=pe("m_cost")&&(t.resource.Money.amount+t.resource.Money.diff>=e||t.resource.Money.diff>=pe("m_cost"));)pe("m_buy")}}},spy:{name:F("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)&&pe("t_spy",r)}}}},spyop:{name:F("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 pe("s_influence",e),!1;break;case"sabotage":if(t.civic.foreign[`gov${e}`].mil>50)return pe("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 pe("s_incite",e),!1}return!0}))}))}}},slave:{name:F("gov_task_slave"),req:()=>!(t.race.orbit_decayed||!Rr("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&&Sr.city.slave_market.action()}},sacrifice:{name:F("gov_task_sacrifice"),req:()=>!!(Rr("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)&&Sr.city.s_alter.action()}},horseshoe:{name:()=>F(`city_${mn(!0)}`,[mn(!1)]),req:()=>!!t.race.hooved,task(){let e=Sr.city.horseshoe.cost;if($(this)[0].req()&&si(e)){e=Rs(Sr.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)&&Sr.city.horseshoe.action()}}},trash:{name:F("gov_task_trash"),req:()=>!!(t.interstellar.mass_ejector&&t.interstellar.mass_ejector.count>=1),task(){let e=function(e){return"magic"===t.race.universe?Aa[e]:["Elerium","Infernite"].includes(e)?10*Aa[e]:Aa[e]},a=1e3*s.mass_ejector;Object.keys(Aa).sort(((t,a)=>e(t)0&&(s=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+i-s>=.999*t.resource[e].max-1){let r=t.resource[e].amount+i-s>=.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*s.mass_ejector-a}},mech:{name:F("gov_task_mech"),req:()=>!!(t.stats.achieve.hasOwnProperty("corrupted")&&t.stats.achieve.corrupted.l>0&&("prtl_spire","mechbay",Lt(ca,"prtl_spire","mechbay"))&&t.portal.hasOwnProperty("mechbay")),task(){if($(this)[0].req()){let e="large",a=ya(e,!1),r=a.c,i=a.s,s=wa(e),n={type:{}};["small","medium","large","titan","collector"].forEach((function(e){n.type[e]=0,n[e]={chassis:{},weapon:{},equip:{}},["hover","spider","wheel","tread","biped","quad"].forEach((function(t){n[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){n[e].weapon[t]=0})),["shields","flare","seals","grapple","sonar","ablative","radiator","infrared","coolant","stabilizer"].forEach((function(t){n[e].equip[t]=0}))})),t.portal.mechbay.mechs.forEach((function(e){n.type[e.size]++,n[e.size].chassis[e.chassis]++,e.hardpoint.forEach((function(t){n[e.size].weapon[t]++})),e.equip.forEach((function(t){n[e.size].equip[t]++}))})),n.type.large>=6&&n.type.small<12||n.type.large>=12&&n.type.titan>=2&&n.type.small<24?(e="small",a=ya(e,!1),r=a.c,i=a.s,s=wa(e)):n.type.large>=6&&n.type.medium<12?(e="medium",a=ya(e,!1),r=a.c,i=a.s,s=wa(e)):n.type.large>=12&&n.type.titan<2&&(a=ya("titan",!1),a.c<=t.portal.purifier.sup_max&&(e="titan",r=a.c,i=a.s,s=wa(e)));let c=t.portal.mechbay.max-t.portal.mechbay.bay;if(c=3){if(t.queue.queue.some((e=>["portal-purifier","portal-port","portal-base_camp","portal-mechbay","portal-waygate"].includes(e.id))))return;for(let s=0;st.portal.purifier.sup_max&&(l=t.portal.purifier.sup_max),l>=r&&t.resource.Soul_Gem.amount+o>=i){if(t.resource.Soul_Gem.amount+=o,t.resource.Soul_Gem.amount-=i,t.portal.purifier.supply=l,t.portal.purifier.supply-=r,t.portal.mechbay.mechs[s].infernal=!0,"small"===c.size&&0===c.equip.length)t.portal.mechbay.mechs[s].equip.push("special");else if("medium"===c.size&&1===c.equip.length||"large"===c.size&&2===c.equip.length||"titan"===c.size&&c.equip.length<5){let a="???";Object.keys(n[e].equip).forEach((function(t){("???"===a||n[e].equip[t]=r&&c>=s&&t.resource.Soul_Gem.amount>=i){let a=99,c="hover";Object.keys(n[e].chassis).forEach((function(t){n[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 N(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 R(){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 H(){j.w&&j.w.terminate(),M(),$s("reset",{end:"descension"}),Pn("squished",!0),Pn(`extinct_${t.race.species}`),t.race.witch_hunter&&"magic"===t.race.universe?Pn("nightmare"):Pn("corrupted"),"angelic"===Di[t.race.species].type&&jn("twisted"),t.race.junker&&"junker"===t.race.species&&jn("the_misery"),!t.race.modified&&t.race.junker&&"junker"===t.race.species&&jn("garbage_pie"),t.race.cataclysm&&jn("finish_line"),t.race.ooze&&"sludge"===t.race.species&&jn("slime_lord");let a=Ns("descend");t.prestige.Artifact.count+=a.artifact,t.stats.artifact+=a.artifact;let r=qn();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 i=t.race.species,s=t.race.gods,n=t.city.calendar.orbit,c=t.city.biome,o=t.city.ptrait,l=t.city.geology;t.stats.descend++,sn(),Cn();let _=!!t.race.hasOwnProperty("srace")&&t.race.srace;t.race={species:"protoplasm",gods:i,old_gods:s,universe:t.race.universe,seeded:!1,seed:Math.floor(g(1e4)),corruption:5,ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended},_&&(t.race.srace=_),U({orbit:n,biome:c,ptrait:o,geology:l}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}function U(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},C(),t.new=!0,t.seed=Math.rand(0,1e4)}function V(){let e=qn();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&&Pn("overlord","m"===e,Sn(),"l"),t.stats.womling.friend[e]>0&&t.stats.womling.lord[e]>0&&t.stats.womling.god[e]>0&&Pn("overlord","m"===e,Sn(),e)}function W(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),zs({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=$(`
                            ${F("civics_government_type")} {{ type | govern }}
                            `);a.append(r);var i=$("
                            ");a.append(i);var s=$('');i.append(s);var n={template:''};zs({el:"#govType",data:t.civic.govern,filters:{govern:e=>F(`govern_${e}`),set:e=>F("anarchy"===e?"civics_set_gov":"civics_revolution")},methods:{trigModal(){this.$buefy.modal.open({parent:this,component:n});var e=setInterval((function(){$("#modalBox").length>0&&(clearInterval(e),function(){$("#modalBox").append($(`

                            ${F("civics_government_type")}

                            `));let e=Js(6,10);e.length>0&&$("#modalBoxTitle").append(e);let a=Zs(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($(``))),zs({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+Ki.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-Ki.lawless.vars()[0])));let i=as("tuskin");i>0&&(r=Math.round(r/(100-Ki.lawless.vars(1)[0]*i)));let s=D("aristocrat",0);s&&(r=Math.round(r*(1-s/100))),t.civic.govern.rev=r+t.civic.govern.fr,a&&Jr(),zs({el:"#govModal"},"destroy"),$(".modal-background").click(),ds()}}}}),_s("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"),$(`
                            ${te(a)}
                            ${Y()[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?F("civics_force_rev_desc"):F("civics_force_rev_desc2"),vis:()=>!!t.tech.govern}}),_s("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"),$(`
                            ${te(t.civic.govern.type)}
                            ${Y()[e]}
                            `)})),_s("govTypeChange",(function(){return t.civic.govern.rev>0?F("civics_change_desc",[t.civic.govern.rev]):F("civics_change_desc2")}),{elm:"#govType .change"})}($("#r_govern0")),function(e){var a=$('
                            ');e.append(a);var r=$(`

                            ${F("civics_tax_rates")}

                            `);a.append(r);var i=$(''),s=$('«'),n=$('»');a.append(s),a.append(i),a.append(n),zs({el:"#tax_rates",data:t.civic.taxes,filters:{tax_level(e){let a=Js(11,14),r=Zs(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(){de("add")},sub(){de("sub")}}}),_s("taxRateLabel",(function(){return F("civics_tax_rates_desc")}),{classes:"has-background-light has-text-dark"})}($("#r_govern0"));var i=$('
                            ');$("#r_govern0").append(i),E()}}function Q(){if(J(),t.settings.tabLoad||2===t.settings.civTabs&&3===t.settings.govTabs){var a=$('
                            ');$("#military").append(a),$("#military").append($('
                            ')),me(a,!0),function(){if(t.race.sludge)return!1;if(0===$("#mad").length){let i="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name");var a=$('
                            ');$("#military").append(a);var r=$('
                            ');a.append(r),r.append($(`
                            ${F("civics_mad_reset_desc",[i])}
                            `));let s=!(!t.race.hrt||!["wolven","vulpine"].includes(t.race.hrt));r.append($(`
                            `)),r.append($(`
                            `)),t.civic.mad.armed||($("#mad").addClass("armed"),$("#mad .arm").html(F(s?"civics_mad_disarm_grenades":"civics_mad_disarm_missiles"))),zs({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))),M(),$s("reset",{end:"mad"});let a=t.race.species,r=t.race.gods,i=t.city.calendar.orbit,s=t.city.biome,n=t.city.ptrait,c=t.city.geology,o=Ns("mad");t.stats.mad++,sn(),"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),Pn("apocalypse"),Pn("squished",!0),Pn(`extinct_${a}`),"anarchy"===t.civic.govern.type&&Pn("anarchist"),"hellscape"===t.city.biome&&"demonic"!==Di[t.race.species].type&&jn("take_no_advice"),t.race.truepath&&Pn("ashanddust"),Cn();let l=!!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:a,old_gods:r,rapid_mutation:1,ancient_ruins:1,universe:t.race.universe,seeded:!1,ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended},_>0&&(t.race.corruption=_),l&&(t.race.srace=l),U({orbit:i,biome:s,ptrait:n,geology:c}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}}()}),4e3)}},arm(){t.civic.mad.armed?($("#mad .arm").html(F(s?"civics_mad_disarm_grenades":"civics_mad_disarm_missiles")),t.civic.mad.armed=!1,$("#mad").addClass("armed")):($("#mad .arm").html(F(s?"civics_mad_arm_grenades":"civics_mad_arm_missiles")),t.civic.mad.armed=!0,$("#mad").removeClass("armed"))}}}),["mdarm","mdlaunch"].forEach((function(e){_s(`mad${e}`,(function(){return"{{ label() }}"}),{elm:`#mad .${e}`,in:function(a){zs({el:`#${a.id} > span`,data:{test:"val"},methods:{label(){switch(e){case"mdarm":return t.tech.world_control&&!t.race.truepath?F("civics_mad_missiles_world_control_desc"):F(s?"civics_mad_missiles_desc_easter":"civics_mad_missiles_desc");case"mdlaunch":{let e=Ns("mad"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name");return F("civics_mad_missiles_warning",[e.plasmid,a])}}}}})},out:function(e){zs({el:`#${e.id} > span`},"destroy")}})}))}}()}}function J(){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 Z(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 X(e){if(void 0===t.civic.foreign[`gov${e}`].name){let a=qs();t.civic.foreign[`gov${e}`].name={s0:a.s0,s1:a.s1}}return F(`civics_gov${t.civic.foreign[`gov${e}`].name.s0}`,[t.civic.foreign[`gov${e}`].name.s1])}const Y=function(){return{anarchy:F("govern_anarchy_effect"),autocracy:F("govern_autocracy_effect",ee.autocracy()),democracy:F("govern_democracy_effect",ee.democracy()),oligarchy:t.tech.high_tech&&t.tech.high_tech>=12?F("govern_oligarchy_effect_alt",[ee.oligarchy()[1]]):F("govern_oligarchy_effect",[ee.oligarchy()[0],ee.oligarchy()[1]]),theocracy:F("govern_theocracy_effect",ee.theocracy()),theocracy_alt:F("govern_theocracy_effect_alt",ee.theocracy()),republic:F("govern_republic_effect",ee.republic()),socialist:F("govern_socialist_effect",ee.socialist()),corpocracy:F("govern_corpocracy_effect",ee.corpocracy()),technocracy:t.tech.high_tech&&t.tech.high_tech>=16?F("govern_technocracy_effect_alt",[ee.technocracy()[0],ee.technocracy()[2]]):F("govern_technocracy_effect",ee.technocracy()),federation:F("govern_federation_effect",[ee.federation()[0],ee.federation()[1]]),federation_alt:F("govern_federation_effect_alt",[25,ee.federation()[2],ee.federation()[1]]),magocracy:F("govern_magocracy_effect",ee.magocracy())}},ee={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 te(e){return t.race.witch_hunter&&"magocracy"===e?F("witch_hunter_magocracy"):F(`govern_${e}_desc`)}function ae(){if(0===$("#foreign").length&&!t.race.cataclysm&&(!t.tech.world_control||t.race.truepath)&&!t.tech.isolation){let a=$('
                            ');a.append($(`

                            ${F("civics_foreign")}

                            `)),$("#r_govern0").append(a);var e={template:''};let r=t.race.truepath?5:3;for(let e=0;e{{ '${e}' | gov }} - ${F("civics_garrison_occupy")} - ${F("civics_garrison_annex")} - ${F("civics_garrison_purchase")}
                            `);a.append(t);let r=$("
                            ");r.append($(``)),r.append($(``)),r.append($(``)),t.append(r),t.append($(`
                            ${F("civics_gov_mil_rate")}: {{ f${e}.mil | military(${e}) }} ({{ f${e}.mil }})
                            `)),t.append($(`
                            ${F("civics_gov_relations")}: {{ f${e}.hstl | relation }} ({{ f${e}.hstl | hate }})
                            `)),t.append($(`
                            ${F("civics_gov_eco_rate")}: {{ f${e}.eco | eco(${e}) }} ({{ f${e}.eco }})
                            `)),t.append($(`
                            ${F("civics_gov_unrest")}: {{ f${e}.unrest | discontent(${e}) }} ({{ f${e}.unrest | turmoil }})
                            `))}let i={f0:t.civic.foreign.gov0,f1:t.civic.foreign.gov1,f2:t.civic.foreign.gov2,t:t.tech};t.race.truepath&&(i.f3=t.civic.foreign.gov3,i.f4=t.civic.foreign.gov4),zs({el:"#foreign",data:i,filters:{military:(e,a)=>t.civic.foreign[`gov${a}`].spy>=1?F(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=>F(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?F(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?F(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=>X(e),sab:e=>"none"===e?"":F(`civics_spy_${e}`),hate:e=>100-e+"%",turmoil:e=>`${e}%`},methods:{campaign(e){fe(e)},battleAssessment:e=>ve(e),trigModal(a){this.$buefy.modal.open({parent:this,component:e});var r=setInterval((function(){$("#modalBox").length>0&&(clearInterval(r),function(e){$("#modalBox").append($(`

                            ${F("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($(``))),zs({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&&(le("influence",e),zs({el:"#espModal"},"destroy"),$(".modal-background").click(),ds())},sabotage(e){t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${e}`].spy>=1&&(le("sabotage",e),zs({el:"#espModal"},"destroy"),$(".modal-background").click(),$("#popGov").hide(),ds())},incite(e){e>=3||t.tech.spy&&t.tech.spy>=2&&t.civic.foreign[`gov${e}`].spy>=1&&(le("incite",e),zs({el:"#espModal"},"destroy"),$(".modal-background").click(),ds())},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-Ki.befuddle.vars()[0]/100)));let r=as("dryad");r>0&&(e=Math.round(e*(1-Ki.befuddle.vars(1)[0]/100*r))),t.civic.foreign[`gov${a}`].sab=e,t.civic.foreign[`gov${a}`].act="annex",zs({el:"#espModal"},"destroy"),$(".modal-background").click(),ds()}},purchase(e){if(e>=3)return;let a=ce(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-Ki.befuddle.vars()[0]/100)));let i=as("dryad");i>0&&(r=Math.round(r*(1-Ki.befuddle.vars(1)[0]/100*i))),t.civic.foreign[`gov${e}`].sab=r,t.civic.foreign[`gov${e}`].act="purchase",zs({el:"#espModal"},"destroy"),$(".modal-background").click(),ds()}}}}),_s("GovLabel",(function(a){let r=$(a.this).data("esp"),i="";if("purchase"===r){let t=ce(e).toLocaleString();i=F(`civics_spy_${r}_desc`,[X(e),t])}else if("annex"===r)if(t.city.morale.current>=200+t.civic.foreign[`gov${e}`].hstl-t.civic.foreign[`gov${e}`].unrest)i=F(`civics_spy_${r}_desc`,[X(e)]);else{let a=200+t.civic.foreign[`gov${e}`].hstl-t.civic.foreign[`gov${e}`].unrest;i=F(`civics_spy_${r}_goal`,[X(e),a])}else i=F(`civics_spy_${r}_desc`,[X(e)]);let s="";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)&&(s=`
                            ${F("civics_spy_warning")}
                            `),$(`${s}
                            ${i}
                            `)}),{elm:"#espModal button",self:!0,classes:"has-background-light has-text-dark"})}(a))}),50)},spy_disabled:e=>t.civic.foreign[`gov${e}`].trn>0||se(e)>t.resource.Money.amount,spy(e){ne(e)},spyDesc:e=>re(e),espDesc:()=>ie(),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){zs({el:`#${t.id} > span`,data:{test:"val"},methods:{label:()=>ve(e)}})},out:function(e){zs({el:e.id},"destroy")}}),_s(`gov${e}ts`,(function(){return"{{ label() }}"}),{elm:`#gov${e} .tspy`,in:function(t){zs({el:`#${t.id} > span`,data:{test:"val"},methods:{label:()=>re(e)}})},out:function(e){zs({el:e.id},"destroy")}}),_s(`gov${e}s`,(function(){return ie()}),{elm:`#gov${e} .sspy`});t.race.truepath&&_s("garRivaldesc1",(function(){return F("civics_gov_tp_rival",[X(3),Di[t.race.species].home])}),{elm:"#gov3 > span"})}}function re(e){return t.civic.foreign[`gov${e}`].trn>0?F("civics_progress"):F("civics_gov_spy_desc",[q(se(e))])}function ie(){return F("civics_gov_esp_desc")}function se(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"===R()&&(a*=1-N("scorpio")[0]/100),Math.round(a**(t.civic.foreign[`gov${e}`].spy+1))+500}function ne(e){if(t.tech.spy&&0===t.civic.foreign[`gov${e}`].trn){let a=se(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 ce(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 oe(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 le(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-Ki.befuddle.vars()[0]/100)));let r=as("dryad");r>0&&(e=Math.round(e*(1-Ki.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-Ki.befuddle.vars()[0]/100)));let r=as("dryad");r>0&&(e=Math.round(e*(1-Ki.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-Ki.befuddle.vars()[0]/100)));let r=as("dryad");r>0&&(e=Math.round(e*(1-Ki.befuddle.vars(1)[0]/100*r))),t.civic.foreign[`gov${a}`].sab=e,t.civic.foreign[`gov${a}`].act="incite"}}}function _e(e){let a=!!(t.tech.currency&&t.tech.currency>=5);if(e)return!a&&!t.race.terrifying||t.race.noble?t.race.noble?Ki.noble.vars()[0]:10:0;{let e=30;t.race.noble?e=Ki.noble.vars()[1]:(a||t.race.terrifying)&&(e+=20),"oligarchy"===t.civic.govern.type&&(e+=ee.oligarchy()[1]);let r=D("aristocrat",1);return r&&(e+=r),e}}function de(e,a){switch(e){case"add":{let e=a||b(),r=_e(!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=_e(!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-Ki.brute.vars()[0]/100);let a=as("orc");return a>0&&(e*=1-Ki.brute.vars(1)[0]/100*a),t.race.inflation&&(e*=1+t.race.inflation/500),t.race.high_pop&&(e*=Ki.high_pop.vars()[1]/100),Math.round(e)}function he(e){if(t.tech.mercs){let a=e||b(),r=!0;for(;r&&a>0;){let e=ue();t.civic.garrison.workers=e?(t.resource.Money.amount-=e,t.civic.garrison.workers++,t.civic.garrison.m_use++):r=!1,a--}}}function me(e,a){Cs(e),t.tech.world_control&&!t.race.truepath?e.append($(`

                            ${F("civics_garrison")}

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

                            ${F("civics_garrison")}

                            - ${F("rating")} {{ g.workers | hell | rating }} / {{ g.raid | rating }}
                            `));var r=$('
                            ');e.append(r);var i=$('
                            ');r.append(i);let s=t.tech.world_control&&!t.race.truepath?F("civics_garrison_peacekeepers"):F("civics_garrison_soldiers");if(t.tech.isolation||(i.append($(`
                            ${s} / {{ g.max | s_max }}
                            `)),i.append($(`
                            ${F("civics_garrison_crew")} {{ g.crew }}
                            `)),i.append($(`
                            ${F("civics_garrison_wounded")}
                            `)),r.append($(`
                            `))),a){let a="";t.tech.isolation&&(a=Js(8,12)),e.append($(`
                            ${F("civics_garrison_training")} - ${F("arpa_to_complete")} {{ g.rate, g.progress | trainTime }}${a} {{ g.progress }}%
                            `))}var n=$('
                            ');e.append(n);var c=$('
                            ');if(n.append(c),(!t.tech.world_control||t.race.truepath)&&!t.race.cataclysm&&!t.tech.isolation){var o=$(`
                            ${F("civics_garrison_campaign")}
                            `);c.append(o);var l=$('{{ g.tactic | tactics }}'),_=$('«'),d=$('»');o.append(_),o.append(l),o.append(d);var p=$(`
                            ${F("civics_garrison_battalion")}
                            `);c.append(p);var u=$('{{ g.raid }}'),h=$('«'),m=$('»');p.append(h),p.append(u),p.append(m),a&&(t.race.truepath&&t.tech.rival&&n.append($(`
                            ${X(3)}
                            `)),t.tech.world_control||(n.append($(`
                            ${X(0)}
                            `)),n.append($(`
                            ${X(1)}
                            `)),n.append($(`
                            ${X(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),zs({el:a?"#garrison":"#c_garrison",data:g,methods:{hire(){he()},campaign(e){fe(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.raidke()&&(t.civic.garrison.raid=ke()))},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 F("civics_garrison_tactic_ambush");case 1:return F("civics_garrison_tactic_raid");case 2:return F("civics_garrison_tactic_pillage");case 3:return F("civics_garrison_tactic_assault");case 4:return F("civics_garrison_tactic_siege")}},rating:e=>+we(e,"army").toFixed(1),hell:e=>ke(),stationed(e){let r=ke(),i=t.race.cataclysm?13:31,s=r===i&&!a&&Zs(2,14,!0);return r===i&&s.length>0?s:r},s_max:e=>ke(!0),wounded(e){let t=Js(8,12);return a&&0===e&&t.length>0?t:on("fool",2021)?ke()-e:e},trainTime:(e,t)=>Fs(0===e?-1:(100-t)/(4*e))}}),["tactic","bat","soldier","crew","wounded","hmerc","defenseRating","offenseRating"].forEach((function(e){_s(a?`garrison${e}`:`cGarrison${e}`,(function(){return"{{ label() }}"}),{elm:`${a?"#garrison":"#c_garrison"} .${e}`,in:function(a){zs({el:`#${a.id} > span`,data:{test:"val"},methods:{label(){switch(e){case"tactic":switch(t.civic.garrison.tactic){case 0:return F("civics_garrison_tactic_ambush_desc");case 1:return F("civics_garrison_tactic_raid_desc");case 2:return F("civics_garrison_tactic_pillage_desc");case 3:return F("civics_garrison_tactic_assault_desc");case 4:return F("civics_garrison_tactic_siege_desc",[aa("federation"===t.civic.govern.type?15:20)])}case"bat":return F("civics_garrison_army_label");case"soldier":return ge();case"crew":return F("civics_garrison_crew_desc");case"wounded":return F("civics_garrison_wounded_desc");case"hmerc":return F("civics_garrison_hire_mercenary_cost",[Math.round(ue()).toLocaleString()]);case"defenseRating":return F("civics_garrison_defensive_rate");case"offenseRating":return F("civics_garrison_offensive_rate")}}}})},out:function(e){zs({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){zs({el:`#${e.id} > span`,data:{test:"val"},methods:{label:()=>ve(t)}})},out:function(e){zs({el:e.id},"destroy")}});t.race.truepath&&!t.tech.isolation&&_s("garRivaldesc2",(function(){return F("civics_gov_tp_rival",[X(3),Di[t.race.species].home])}),{elm:"#garrison .gov3 > div"})}}function ge(){let e=we(ke(),"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 i="civics_garrison_soldier_loot"+a.length/2;return F(t.race.evil&&t.race.soul_eater?"civics_garrison_soldier_evil_desc":"civics_garrison_soldier_desc")+F(i,a)}function ve(e){if(t.civic.foreign[`gov${e}`].occ)return F("civics_garrison_deoccupy_desc");if(t.civic.foreign[`gov${e}`].buy||t.civic.foreign[`gov${e}`].anx)return F("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 F("civics_garrison_no_spy");let a=we(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*=ss.swamp.vars()[0]),on("fool",2021)&&(r/=1.25),ake()?t.civic.garrison.raid=ke():t.civic.garrison.raid<0&&(t.civic.garrison.raid=0),0===t.civic.garrison.raid)return void ms(F("civics_garrison_campaign_no_soldier"),"warning",!1,["combat"]);t.stats.attacks++;let a=t.race.claws?20:16,r=t.race.puny?3:5,i=Math.floor(g(r,a,!0))/10,s=we(t.civic.garrison.raid,"army")*i,n=0;switch(t.civic.garrison.tactic){case 0:n=g(0,10,!0),t.civic.foreign[`gov${e}`].hstl+=Math.floor(g(0,2,!0));break;case 1:n=g(5,50,!0),t.civic.foreign[`gov${e}`].hstl+=Math.floor(g(0,3,!0));break;case 2:n=g(25,100,!0),t.civic.foreign[`gov${e}`].hstl+=Math.floor(g(1,5,!0));break;case 3:n=g(50,200,!0),t.civic.foreign[`gov${e}`].hstl+=Math.floor(g(4,12,!0));break;case 4:n=g(100,500,!0),t.civic.foreign[`gov${e}`].hstl+=Math.floor(g(10,25,!0))}n=Math.floor(n*t.civic.foreign[`gov${e}`].mil/100),t.race.banana&&(n*=2),"swamp"===t.city.biome&&(n*=ss.swamp.vars()[0]),t.race.mistrustful&&(t.civic.foreign[`gov${e}`].hstl+=Ki.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(n/5),t.race.blood_thirst_count>Ki.blood_thirst.vars()[0]&&(t.race.blood_thirst_count=Ki.blood_thirst.vars()[0]));let c=0;if(t.civic.garrison.raid>t.civic.garrison.workers-t.civic.garrison.crew-t.civic.garrison.wounded&&(c=t.civic.garrison.raid-(t.civic.garrison.workers-t.civic.garrison.crew-t.civic.garrison.wounded)),t.civic.garrison.fatigue++,s>n){let a=Math.floor(t.civic.garrison.raid/(5-t.civic.garrison.tactic));a+=c,t.city.ptrait.includes("rage")&&(a+=ns.rage.vars()[2]),a<1&&(a=1),a>ye()&&(a=ye());let r=Math.floor(g(0,a,!0));t.race.frail&&(r+=Ki.frail.vars()[0]);let i=0;if(t.race.scales&&(i+=Ki.scales.vars()[0]),t.tech.armor&&(i+=t.tech.armor),t.race.high_pop&&(i+=Math.floor(g(0,i*Ki.high_pop.vars()[0],!0))),t.race.armored){let e=1-Ki.armored.vars()[0]/100;i+=Math.floor(r*e)}let s=as("tortoisan");if(s>0){let e=1-Ki.armored.vars(1)[0]/100*s;i+=Math.floor(r*e)}if(t.civic.garrison.raid>c&&(r-=i),r<0&&(r=0),r>t.civic.garrison.raid&&(r=t.civic.garrison.raid),t.race.instinct){let e=Math.floor(r*(Ki.instinct.vars()[1]/100));r-=e,c+=e}t.civic.garrison.workers-=r,t.stats.died+=r,t.civic.garrison.protest+=r,r>c?(t.civic.garrison.wounded-=c,c=0):(t.civic.garrison.wounded-=r,c-=r),t.civic.garrison.wounded+=Math.floor(g(c,t.civic.garrison.raid-r,!0));let n={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},o=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"],_=3===e&&t.race.truepath?["Titanium","Oil","Iridium","Alloy","Polymer"]:["Cement","Steel"];t.race.artifical&&o.shift(),t.race.smoldering&&o.push("Chrysotile"),t.race.terrifying&&3!==e&&_.push("Titanium"),t.tech.magic&&_.push("Crystal");let d=["Money"];switch(t.civic.garrison.tactic){case 0:{let e=["Money"].concat(o,l);d.push(o[Math.floor(g(0,o.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(o,l,_);d.push(o[Math.floor(g(0,o.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(o,l,_),a=l.concat(_);d.push(o[Math.floor(g(0,o.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(o,l,_);d.push(o[Math.floor(g(0,o.length,!0))]),d.push(l[Math.floor(g(0,l.length,!0))]),d.push(_[Math.floor(g(0,_.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(o,l,_);d.push(o[Math.floor(g(0,o.length,!0))]),d.push(l[Math.floor(g(0,l.length,!0))]),d.push(_[Math.floor(g(0,_.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 p=t.race.terrifying&&3!==e?Ki.terrifying.vars()[0]:12,u=t.race.terrifying&&3!==e?Ki.terrifying.vars()[1]:32;d.forEach((function(e){switch(e){case"Money":n[e]+=Math.floor(g(100,375,!0));break;case"Food":n[e]+=Math.floor(g(40,175,!0));break;case"Lumber":case"Stone":n[e]+=Math.floor(g(50,250,!0));break;case"Copper":case"Iron":case"Aluminium":n[e]+=Math.floor(g(35,125,!0));break;case"Coal":case"Cement":n[e]+=Math.floor(g(25,100,!0));break;case"Steel":case"Chrysotile":n[e]+=Math.floor(g(20,65,!0));break;case"Titanium":n[e]+=Math.floor(g(p,u,!0));break;case"Crystal":n[e]+=Math.floor(g(1,5,!0));break;case"Oil":n[e]+=Math.floor(g(20,50,!0));break;case"Iridium":n[e]+=Math.floor(g(2,30,!0));break;case"Alloy":case"Polymer":n[e]+=Math.floor(g(5,38,!0))}}));let h=F("civics_garrison_gained");t.resource.Money.display&&n.Money>0&&(n.Money=be(n.Money,e),h+=F("civics_garrison_quant_money",[n.Money]),xs("Money",n.Money)),o.concat(l,_).forEach((function(a){n[a]>0&&(t.resource[a].display||"Steel"===a||"Titanium"===a)&&(n[a]=be(n[a],e),h+=F("civics_garrison_quant_res",[n[a],t.resource[a].name]),xs(a,n[a]),"Steel"!==a&&"Titanium"!==a||(t.resource[a].display=!0))})),h=h.slice(0,-2),h+=".",ms(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/Ki.revive.vars()[0]),!0));break;case 1:m=Math.floor(g(0,Math.floor(r/Ki.revive.vars()[1]),!0));break;case 2:m=Math.floor(g(0,Math.floor(r/Ki.revive.vars()[2]),!0))}t.civic.garrison.workers+=m}if(ms(m>0?F("civics_garrison_victorious_revive",[r,m]):F("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,ms(F("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,Ki.infectious.vars()[0],!0));break;case 1:e=Math.floor(g(0,Ki.infectious.vars()[1],!0));break;case 2:e=Math.floor(g(0,Ki.infectious.vars()[2],!0));break;case 3:e=Math.floor(g(0,Ki.infectious.vars()[3],!0));break;case 4:e=Math.floor(g(0,Ki.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),ms(1===e?F("civics_garrison_soldier_infected"):F("civics_garrison_soldiers_infected",[e]),"special",!1,["combat"]))}let v=aa("federation"===t.civic.govern.type?15:20);if(e<=2&&4===t.civic.garrison.tactic&&t.civic.garrison.workers>=v){let a=!t.tech.gov_fed&&!oe();if(t.civic.garrison.workers-=v,t.civic.foreign[`gov${e}`].occ=!0,t.civic.foreign[`gov${e}`].sab=0,t.civic.foreign[`gov${e}`].act="none",a&&Jr(),t.race.banana){let e=qn();t.stats.banana.b1[e]=!0,"m"!==e&&"l"!==e&&(t.stats.banana.b1.l=!0)}}}else{let e=t.civic.garrison.raid;e+=c,0===t.civic.garrison.tactic&&(e=Math.floor(e/2)),t.city.ptrait.includes("rage")&&(e+=ns.rage.vars()[2]),e<1&&(e=1),e>ye()&&(e=ye());let a=Math.floor(g(1,e,!0));t.race.frail&&(a+=t.civic.garrison.tactic+Ki.frail.vars()[1]);let r=0;if(t.race.scales&&(r+=Ki.scales.vars()[1]),t.tech.armor&&(r+=t.tech.armor),t.race.high_pop&&(r+=Math.floor(g(0,Math.floor(r*Ki.high_pop.vars()[0]/2),!0))),t.race.armored){let e=Ki.armored.vars()[0]/100;r+=Math.floor(a*e)}let i=as("tortoisan");if(i>0){let e=Ki.armored.vars(1)[0]/100*i;r+=Math.floor(a*e)}if(t.civic.garrison.raid>c&&(a-=r),t.race.instinct){let e=Math.floor(a*(Ki.instinct.vars()[1]/100));a-=e,c+=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>c?(t.civic.garrison.wounded-=c,c=0):(t.civic.garrison.wounded-=a,c-=a),t.civic.garrison.wounded+=1+Math.floor(g(c,t.civic.garrison.raid-a,!0));let s=0;if(t.race.revive){switch(t.city.calendar.temp){case 0:s=Math.floor(g(0,Math.floor(a/Ki.revive.vars()[3]),!0));break;case 1:s=Math.floor(g(0,Math.floor(a/Ki.revive.vars()[4]),!0));break;case 2:s=Math.floor(g(0,Math.floor(a/Ki.revive.vars()[5]),!0))}t.civic.garrison.workers+=s}ms(s>0?F("civics_garrison_defeat_revive",[a,s]):F("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 ye(){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=aa(e)),a>e&&(a=e),a}function be(e,a){let r=ye();t.race.high_pop&&(r/=aa(1));let i=e*Math.log(r+1);switch(t.race.invertebrate&&(i*=1-Ki.invertebrate.vars()[0]/100),"evil"===t.race.universe&&(i*=Ts("evil")),t.civic.garrison.tactic){case 1:i*=4;break;case 2:i*=30;break;case 3:i*=100;break;case 4:i*=400}return t.race.banana&&(i*=.5),"swamp"===t.city.biome&&(i*=ss.swamp.vars()[1]),Math.floor(i*t.civic.foreign[`gov${a}`].eco/100)}function we(e,a,r){if(!t.civic.hasOwnProperty("garrison"))return 1;let i=0;"number"==typeof r?i=r:e>t.civic.garrison.workers-t.civic.garrison.wounded&&(i=e-(t.civic.garrison.workers-t.civic.garrison.wounded));let s=function(){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+Ki.sniper.vars()[0]/100*e);let a=as("centaur");a>0&&(e*=1+Ki.sniper.vars(1)[0]/100*e*a),e+=t.tech.military>=11?2:1}return e}(),n=as("rhinotaur"),c=e-i/2;(t.race.rage||n>0)&&(c=e+(t.race.rage?i*Ki.rage.vars()[1]/100:0)+(n>0?i*Ki.rage.vars(1)[1]/100*n:0));let o=t.tech.military?c*s:c;if("army"===a||"hellArmy"===a){t.race.rage&&(o*=1+Ki.rage.vars()[0]/100*(t.civic.garrison.wounded||0)),n>0&&(o*=1+Ki.rage.vars(1)[0]/100*n*(t.civic.garrison.wounded||0)),t.race.puny&&(o*=1-Ki.puny.vars()[0]/100),t.race.claws&&(o*=1+Ki.claws.vars()[0]/100);let r=as("scorpid");r>0&&(o*=1+Ki.claws.vars(1)[0]/100*r),t.race.chameleon&&(o*=1+Ki.chameleon.vars()[0]/100),t.race.cautious&&0===t.city.calendar.weather&&(o*=1-Ki.cautious.vars()[0]/100),t.race.apex_predator&&(o*=1+Ki.apex_predator.vars()[0]/100);let i=as("sharkin");i>0&&(o*=1+Ki.apex_predator.vars(1)[0]/100*i),t.race.swift&&(o*=1+Ki.swift.vars()[0]/100),t.race.fiery&&(o*=1+Ki.fiery.vars()[0]/100);let s=as("balorg");s>0&&(o*=1+Ki.fiery.vars(1)[0]/100*s),t.race.sticky&&(o*=1+Ki.sticky.vars()[1]/100);let c=as("pinguicula");c>0&&(o*=1+Ki.sticky.vars(1)[1]/100*c),t.race.pathetic&&(o*=1-Ki.pathetic.vars()[0]/100),t.race.tactical&&(o*=1+Ki.tactical.vars()[0]*t.race.tactical/100),t.tech.fanaticism&&t.tech.fanaticism>=4&&(o*=1+.01*t.city.temple.count),t.race.holy&&"hellArmy"===a&&(o*=1+Ki.holy.vars()[0]/100);let l=as("unicorn");l>0&&"hellArmy"===a&&(o*=1+Ki.holy.vars(1)[0]/100*l),t.race.banana&&"hellArmy"===a&&(o*=.8),"aries"===R()&&(o*=1+N("aries")[0]/100);let _=D("tactician",0);if(_&&(o*=1+_/100),t.city.ptrait.includes("rage")&&(o*=ns.rage.vars()[0]),t.race.parasite&&(1===e?o+=2:e>1&&(o+=4)),t.tech.psychic&&t.race.psychicPowers&&t.race.psychicPowers.hasOwnProperty("assaultTime")){let e=0;if(t.race.psychicPowers.assaultTime>0&&(e+=Ki.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+=+(Ki.psychic.vars()[3]/5e4*a*t.race.psychicPowers.channel.assault).toFixed(3)}o*=1+e}}return"hunting"===a&&t.race.unfathomable&&(o*=.66),t.race.rejuvenated&&(o*=1.05),"autocracy"===t.civic.govern.type&&(o*=1+ee.autocracy()[1]/100),o=Math.floor(o),o*Gi(e,a)}function ke(e,a){if(!t.civic.garrison)return 0;let r=e?"max":"workers",i=t.portal.fortress?t.portal.fortress.garrison:0,s=t.space.fob&&!a?t.space.fob.troops:0;return t.civic.garrison[r]-t.civic.garrison.crew-i-s}function $e(e){return t.race.high_pop&&(e*=Ki.high_pop.vars()[1]/100),e}function xe(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*=ss.desert.vars()[1]:"tundra"===t.city.biome?e*=ss.tundra.vars()[1]:"taiga"===t.city.biome&&(e*=ss.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=Z(3);return{b:a,g:r-1,f:a*r}}case"coal":return.55}case"helium_mine":{let e=.18,t=Z(3);return{b:e,g:t-1,f:e*t}}case"red_mine":switch(a){case"copper":{let e=$e(.25),t=Z(3);return{b:e,g:t-1,f:e*t}}case"titanium":{let e=$e(.02),t=Z(3);return{b:e,g:t-1,f:e*t}}case"stone":return $e(.75);case"asbestos":return $e(1.25);case"aluminium":return $e(.066)}case"biodome":switch(a){case"food":return $e(.25);case"cat_food":return 2;case"lumber":return $e(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*(s.ai_colonist?t.civic.titan_colonist.workers+aa(s.ai_colonist):t.civic.titan_colonist.workers);return t.race.high_pop&&(e=$e(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*va("gate").supress;case"water_freighter":return 1.25;case"titan_mine":switch(a){case"adamantite":return $e(.02)*(t.space.titan_mine?t.space.titan_mine.ratio:50)/100;case"aluminium":return $e(.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+Ki.tough.vars()[0]/100);let r=as("ogre");return r>0&&(e*=1+Ki.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=cn("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=cn("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+=Ki.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+=+(Ki.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+=Ki.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+=+(Ki.psychic.vars()[3]/5e4*a*t.race.psychicPowers.channel.cash).toFixed(3)}return 1+e}return 1}}function qe(e){switch(e){case"Physics":Le();break;case"Genetics":Ke();break;case"Monument":return ze();case"PhysicsTech":return Pe;case"GeneTech":return Oe;case"BloodTech":return Me;case"Crispr":De();break;case"Blood":Be()}}const Pe={lhc:{title:()=>on("fool",2022)?F("arpa_projects_railway_title"):F("arpa_projects_lhc_title"),desc:()=>on("fool",2022)?F("arpa_projects_railway_desc"):F("arpa_projects_lhc_desc"),reqs:{high_tech:6},grant:"supercollider",effect(e){if(on("fool",2022)&&!e)return Pe.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?F("arpa_projects_lhc_cataclysm3",[a]):F("arpa_projects_lhc_effect3",[a,t.race.orbit_decayed?F("space_home_satellite_title"):di()]):t.race.cataclysm?F("arpa_projects_lhc_cataclysm2",[a]):F("arpa_projects_lhc_effect2",[a,t.race.orbit_decayed?F("space_home_satellite_title"):di()]):t.race.cataclysm?F("arpa_projects_lhc_cataclysm1",[a]):t.tech.isolation?F("arpa_projects_lhc_iso1",[a,F("tech_infectious_disease_lab_alt")]):F("arpa_projects_lhc_effect1",[a,t.race.orbit_decayed?F("space_home_satellite_title"):di()])},cost:{Money:(e,t)=>Te("lhc",e,25e5,1.05,t),Knowledge:(e,t)=>Te("lhc",e,5e5,1.05,t),Copper:(e,t)=>Te("lhc",e,125e3,1.05,t),Cement:(e,t)=>Te("lhc",e,25e4,1.05,t),Aluminium:(e,t)=>Te("lhc",e,35e4,1.05,t),Titanium:(e,t)=>Te("lhc",e,5e4,1.05,t),Polymer:(e,t)=>Te("lhc",e,12e3,1.05,t)}},stock_exchange:{title:F("arpa_projects_stock_exchange_title"),desc:F("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?F("arpa_projects_stock_exchange_cataclysm2"):F("arpa_projects_stock_exchange_cataclysm1"):t.tech.gambling&&t.tech.gambling>=4?F("arpa_projects_stock_exchange_effect3"):F("arpa_projects_stock_exchange_effect2"):F("arpa_projects_stock_exchange_effect1"),cost:{Money:(e,t)=>Te("stock_exchange",e,3e6,1.06,t),Plywood:(e,t)=>Te("stock_exchange",e,25e3,1.06,t),Brick:(e,t)=>Te("stock_exchange",e,2e4,1.06,t),Wrought_Iron:(e,t)=>Te("stock_exchange",e,1e4,1.06,t)}},tp_depot:{title:F("galaxy_gateway_depot"),desc:F("arpa_projects_depot_desc"),reqs:{high_tech:6,storage:4},grant:"tp_depot",path:["truepath"],effect:()=>F(t.tech.isolation?"arpa_projects_depot_effect_iso":"arpa_projects_depot_effect",[5,50]),cost:{Money:(e,t)=>Te("tp_depot",e,18e5,1.08,t),Stone:(e,t)=>Te("tp_depot",e,75e4,1.08,t),Iron:(e,t)=>Te("tp_depot",e,25e4,1.08,t),Alloy:(e,t)=>Te("tp_depot",e,3e4,1.08,t)}},launch_facility:{id:"arpalaunch_facility",title:F("arpa_projects_launch_facility_title"),desc:F("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:()=>F("arpa_projects_launch_facility_effect1"),cost:{Money:e=>Te("launch_facility",e,2e6,1.1),Knowledge:e=>Te("launch_facility",e,5e5,1.1),Cement:e=>Te("launch_facility",e,15e4,1.1),Oil:e=>Te("launch_facility",e,2e4,1.1),Sheet_Metal:e=>Te("launch_facility",e,15e3,1.1),Alloy:e=>Te("launch_facility",e,25e3,1.1)}},monument:{title(e){if(e)return F("arpa_project_monument_title");switch(t.arpa.m_type){case"Obelisk":return F("arpa_project_monument_obelisk");case"Statue":return F("arpa_project_monument_statue");case"Sculpture":return F("arpa_project_monument_sculpture");case"Monolith":return F("arpa_project_monument_monolith");case"Pillar":return F("arpa_project_monument_pillar");case"Megalith":return F("arpa_project_monument_megalith")}},desc:F("arpa_projects_monument_desc"),reqs:{monument:1},grant:"monuments",effect(){let e=D("gaslighter",2);return F("arpa_projects_monument_effect1",[e?2-e:2])},cost:{Stone:(e,t)=>Fe("Stone",e,t),Aluminium:(e,t)=>Fe("Aluminium",e,t),Cement:(e,t)=>Fe("Cement",e,t),Steel:(e,t)=>Fe("Steel",e,t),Lumber:(e,t)=>Fe("Lumber",e,t),Crystal:(e,t)=>Fe("Crystal",e,t)}},railway:{title:()=>on("fool",2022)?F("arpa_projects_lhc_title"):F("arpa_projects_railway_title"),desc:()=>on("fool",2022)?F("arpa_projects_lhc_desc"):F("arpa_projects_railway_desc"),reqs:{high_tech:6,trade:3},grant:"railway",effect(e){if(on("fool",2022)&&!e)return Pe.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,F("arpa_projects_railway_cataclysm1",[a,r,3,1])):(a+=t.city.storage_yard?Math.floor(t.city.storage_yard.count/6):0,F("arpa_projects_railway_effect1",[a,r,6,1]))},cost:{Money:(e,t)=>Te("railway",e,25e5,1.08,t),Lumber:(e,t)=>Te("railway",e,75e4,1.08,t),Iron:(e,t)=>Te("railway",e,3e5,1.08,t),Steel:(e,t)=>Te("railway",e,45e4,1.08,t)}},roid_eject:{title:()=>F("arpa_projects_roid_eject_title",[je()]),desc:()=>F(t.tech.roid_eject<=10?"arpa_projects_roid_eject_desc":"arpa_projects_roid_eject_desc2",[je()]),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),`
                            ${F("arpa_projects_roid_eject_effect1")}
                            ${F("arpa_projects_roid_eject_effect2",[+e.toFixed(3),+a.toFixed(3),je()])}
                            `},cost:{Money:(e,t)=>Te("roid_eject",e,1875e4,1.075,t),Deuterium:(e,t)=>Te("roid_eject",e,375e3,1.075,t),Bolognium:(e,t)=>Te("roid_eject",e,15e3,1.075,t)}},nexus:{title:F("arpa_projects_nexus_title"),desc:F("arpa_projects_nexus_desc"),reqs:{magic:5},grant:"nexus",effect:()=>t.tech.roguemagic&&t.tech.roguemagic>=7?`
                            ${F("arpa_projects_nexus_effect1",[5])}
                            ${F("witch_hunter_nexus",[8])}
                            `:F("arpa_projects_nexus_effect1",[5]),cost:{Money:(e,t)=>Te("nexus",e,5e6,1.12,t),Crystal:(e,t)=>Te("nexus",e,6e4,1.12,t),Iridium:(e,t)=>Te("nexus",e,35e3,1.12,t)}},syphon:{title:F("arpa_syphon_title"),desc(){let e="";return e=t.tech.syphon&&t.tech.syphon>=0?`
                            ${F("arpa_syphon_desc")}
                            ${F("arpa_syphon_desc_warn2")}
                            `:`
                            ${F("arpa_syphon_desc")}
                            ${F("arpa_syphon_desc_warn1")}
                            `,t.race.witch_hunter&&(e+=`
                            ${F("witch_hunter_suspicion")}
                            `),e},reqs:{veil:2},grant:"syphon",effect(){let e=+(1/3*Ts("magic")).toFixed(3);if(t.tech.syphon&&t.tech.syphon>=60){let t=Ns("vacuum"),a=F("resource_Plasmid_plural_name");return`
                            ${F("arpa_syphon_effect_main",[e])}
                            ${F("arpa_syphon_effect4")}
                            ${F("arpa_syphon_effect_reward",[t.plasmid,t.phage,t.dark,a,80])}
                            `}return t.tech.syphon&&t.tech.syphon>=40?`
                            ${F("arpa_syphon_effect_main",[e])}
                            ${F("arpa_syphon_effect3")}
                            `:t.tech.syphon&&t.tech.syphon>=20?`
                            ${F("arpa_syphon_effect_main",[e])}
                            ${F("arpa_syphon_effect2")}
                            `:`
                            ${F("arpa_syphon_effect_main",[e])}
                            ${F("arpa_syphon_effect1")}
                            `},cost:{Money:(e,t)=>Te("syphon",e,75e5,1.025,t),Mana:(e,t)=>Te("syphon",e,5e3,1.025,t),Crystal:(e,t)=>Te("syphon",e,1e5,1.025,t),Infernite:(e,t)=>Te("syphon",e,1e4,1.025,t)}}};function je(){return!t.tech.roid_eject||t.tech.roid_eject<=10?F("arpa_projects_roid_eject_asteroid"):t.tech.roid_eject<=25?F("arpa_projects_roid_eject_moon"):t.tech.roid_eject<=40?F("arpa_projects_roid_eject_dwarf"):t.tech.roid_eject<=60?F("arpa_projects_roid_eject_planet"):F("arpa_projects_roid_eject_remnant")}const Oe={genetic_memory:{id:"genes-genetic_memory",title:F("arpa_genepool_genetic_memory_title"),desc:F("arpa_genepool_genetic_memory_desc"),reqs:{},grant:["creep",1],cost:{Plasmid:()=>25},action:()=>!!Se("genetic_memory")},animus:{id:"genes-animus",title:F("arpa_genepool_animus_title"),desc:F("arpa_genepool_animus_desc"),reqs:{creep:1},grant:["creep",2],cost:{Plasmid:()=>75},action:()=>!!Se("animus")},divine_remembrance:{id:"genes-divine_remembrance",title:F("arpa_genepool_divine_remembrance_title"),desc:F("arpa_genepool_divine_remembrance_desc"),reqs:{creep:2},grant:["creep",3],cost:{Plasmid:()=>225},action:()=>!!Se("divine_remembrance")},divine_proportion:{id:"genes-divine_proportion",title:F("arpa_genepool_divine_proportion_title"),desc:F("arpa_genepool_divine_proportion_desc"),reqs:{creep:3},grant:["creep",4],cost:{Plasmid:()=>618},action:()=>!!Se("divine_proportion")},genetic_repository:{id:"genes-genetic_repository",title:F("arpa_genepool_genetic_repository_title"),desc:F("arpa_genepool_genetic_repository_desc"),reqs:{creep:4},grant:["creep",5],cost:{Plasmid:()=>999},action:()=>!!Se("genetic_repository")},spatial_reasoning:{id:"genes-spatial_reasoning",title:F("arpa_genepool_spatial_reasoning_title"),desc:F("arpa_genepool_spatial_reasoning_desc"),reqs:{},grant:["store",1],cost:{Plasmid:()=>50},action:()=>!!Se("spatial_reasoning")},spatial_superiority:{id:"genes-spatial_superiority",title:F("arpa_genepool_spatial_superiority_title"),desc:F("arpa_genepool_spatial_superiority_desc"),reqs:{store:1},grant:["store",2],cost:{Plasmid:()=>125},action:()=>!!Se("spatial_superiority")},spatial_supremacy:{id:"genes-spatial_supremacy",title:F("arpa_genepool_spatial_supremacy_title"),desc:F("arpa_genepool_spatial_supremacy_desc"),reqs:{store:2},grant:["store",3],cost:{Plasmid:()=>325},action:()=>!!Se("spatial_supremacy")},dimensional_warping:{id:"genes-dimensional_warping",title:F("arpa_genepool_dimensional_warping_title"),desc:F("arpa_genepool_dimensional_warping_desc"),reqs:{store:3},grant:["store",4],cost:{Plasmid:()=>500},action:()=>!!Se("dimensional_warping")},enhanced_muscle_fiber:{id:"genes-enhanced_muscle_fiber",title:F("arpa_genepool_enhanced_muscle_fiber_title"),desc:F("arpa_genepool_enhanced_muscle_fiber_desc"),reqs:{},grant:["enhance",1],cost:{Plasmid:()=>25},action:()=>!!Se("enhanced_muscle_fiber")},morphogenesis:{id:"genes-morphogenesis",title:F("arpa_genepool_morphogenesis_title"),desc:F("arpa_genepool_morphogenesis_desc"),reqs:{},grant:["evolve",1],cost:{Plasmid:()=>10},action:()=>!!Se("morphogenesis")},recombination:{id:"genes-recombination",title:F("arpa_genepool_recombination_title"),desc:F("arpa_genepool_recombination_desc"),reqs:{evolve:1},grant:["evolve",2],cost:{Plasmid:()=>35},action:()=>!!Se("recombination")},homologous_recombination:{id:"genes-homologous_recombination",title:F("arpa_genepool_homologous_recombination_title"),desc:F("arpa_genepool_homologous_recombination_desc"),reqs:{evolve:2},grant:["evolve",3],cost:{Plasmid:()=>70},action:()=>!!Se("homologous_recombination")},genetic_reshuffling:{id:"genes-genetic_reshuffling",title:F("arpa_genepool_genetic_reshuffling_title"),desc:F("arpa_genepool_genetic_reshuffling_desc"),reqs:{evolve:3},grant:["evolve",4],cost:{Plasmid:()=>175},action:()=>!!Se("genetic_reshuffling")},recombinant_dna:{id:"genes-recombinant_dna",title:F("arpa_genepool_recombinant_dna_title"),desc:F("arpa_genepool_recombinant_dna_desc"),reqs:{evolve:4},grant:["evolve",5],cost:{Plasmid:()=>440},action:()=>!!Se("recombinant_dna")},chimeric_dna:{id:"genes-chimeric_dna",title:F("arpa_genepool_chimeric_dna_title"),desc:F("arpa_genepool_chimeric_dna_desc"),reqs:{evolve:5},grant:["evolve",6],cost:{Plasmid:()=>1100},action:()=>!!Se("chimeric_dna")},molecular_cloning:{id:"genes-molecular_cloning",title:F("arpa_genepool_molecular_cloning_title"),desc:F("arpa_genepool_molecular_cloning_desc"),reqs:{evolve:6},grant:["evolve",7],cost:{Plasmid:()=>2750},action:()=>!!Se("molecular_cloning")},transgenes:{id:"genes-transgenes",title:F("arpa_genepool_transgenes_title"),desc:F("arpa_genepool_transgenes_desc"),reqs:{evolve:7},grant:["evolve",8],cost:{Plasmid:()=>6875},action:()=>!!Se("transgenes")},synthesis:{id:"genes-synthesis",title:F("arpa_genepool_synthesis_title"),desc:F("arpa_genepool_synthesis_desc",[2,10]),reqs:{evolve:1},grant:["synthesis",1],cost:{Plasmid:()=>25},action:()=>!!Se("synthesis")},karyokinesis:{id:"genes-karyokinesis",title:F("arpa_genepool_karyokinesis_title"),desc:F("arpa_genepool_synthesis_desc",[3,25]),reqs:{synthesis:1},grant:["synthesis",2],cost:{Plasmid:()=>40},action:()=>!!Se("karyokinesis")},cytokinesis:{id:"genes-cytokinesis",title:F("arpa_genepool_cytokinesis_title"),desc:F("arpa_genepool_synthesis_desc",[4,50]),reqs:{synthesis:2},grant:["synthesis",3],cost:{Plasmid:()=>55},action:()=>!!Se("cytokinesis")},mitosis:{id:"genes-mitosis",title:F("arpa_genepool_mitosis_title"),desc:F("arpa_genepool_mitosis_desc",[3]),reqs:{synthesis:3,evolve:2},grant:["plasma",1],cost:{Plasmid:()=>90},action:()=>!!Se("mitosis")},metaphase:{id:"genes-metaphase",title:F("arpa_genepool_metaphase_title"),desc:F("arpa_genepool_mitosis_desc",[5]),reqs:{plasma:1},grant:["plasma",2],cost:{Plasmid:()=>165},action:()=>!!Se("mitosis")},mutation:{id:"genes-mutation",title:F("arpa_genepool_mutation_title"),desc:F("arpa_genepool_mutation_desc"),reqs:{synthesis:3,creep:5},grant:["mutation",1],cost:{Plasmid:()=>1250},action:()=>!!Se("mutation")&&(t.genes.mutation=1,Ke(),!0)},transformation:{id:"genes-transformation",title:F("arpa_genepool_transformation_title"),desc:F("arpa_genepool_transformation_desc"),reqs:{mutation:1},grant:["mutation",2],cost:{Plasmid:()=>1500},action:()=>!!Se("transformation")&&(t.genes.mutation=2,Ke(),!0)},metamorphosis:{id:"genes-metamorphosis",title:F("arpa_genepool_metamorphosis_title"),desc:F("arpa_genepool_metamorphosis_desc"),reqs:{mutation:2},grant:["mutation",3],cost:{Plasmid:()=>1750},action:()=>!!Se("metamorphosis")&&(t.genes.mutation=3,Ke(),!0)},replication:{id:"genes-replication",title:F("arpa_genepool_replication_title"),desc:F("arpa_genepool_replication_desc"),reqs:{evolve:1},grant:["birth",1],cost:{Plasmid:()=>65},action:()=>!!Se("replication")},artificer:{id:"genes-artificer",title:F("arpa_genepool_artificer_title"),desc:F("arpa_genepool_artificer_desc"),reqs:{evolve:1},grant:["crafty",1],cost:{Plasmid:()=>45},action:()=>!!Se("artificer")},detail_oriented:{id:"genes-detail_oriented",title:F("arpa_genepool_detail_oriented_title"),desc:F("arpa_genepool_crafting_desc",["50"]),reqs:{crafty:1},grant:["crafty",2],cost:{Plasmid:()=>90},action:()=>!!Se("detail_oriented")},rigorous:{id:"genes-rigorous",title:F("arpa_genepool_rigorous_title"),desc:F("arpa_genepool_crafting_desc",["100"]),reqs:{crafty:2},grant:["crafty",3],cost:{Plasmid:()=>135},action:()=>!!Se("rigorous")},geographer:{id:"genes-geographer",title:F("arpa_genepool_geographer_title"),desc:F("arpa_genepool_geographer_desc"),reqs:{store:1},grant:["queue",1],cost:{Plasmid:()=>75},action:()=>!!Se("geographer")},architect:{id:"genes-architect",title:F("arpa_genepool_architect_title"),desc:F("arpa_genepool_architect_desc"),reqs:{queue:1},grant:["queue",2],cost:{Plasmid:()=>160},action:()=>!!Se("architect"),post(){fs(),ys()}},precognition:{id:"genes-precognition",title:F("arpa_genepool_precognition_title"),desc:F("arpa_genepool_precognition_desc"),reqs:{queue:2},grant:["queue",3],condition:()=>t.stats.aiappoc>0,cost:{Plasmid:()=>3500,Phage:()=>100,AICore:()=>1},action:()=>!!Se("precognition")},governance:{id:"genes-governance",title:F("arpa_genepool_governance_title"),desc:F("arpa_genepool_governance_desc"),reqs:{queue:2},grant:["governor",1],cost:{Plasmid:()=>300,Phage:()=>25},action:()=>!!Se("governance")},civil_service:{id:"genes-civil_service",title:F("arpa_genepool_civil_service_title"),desc:F("arpa_genepool_civil_service_desc"),reqs:{governor:1},grant:["governor",2],cost:{Plasmid:()=>1e3,Harmony:()=>1},action:()=>!!Se("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");E()}},hardened_genes:{id:"genes-hardened_genes",title:F("arpa_genepool_hardened_genes_title"),desc:F("arpa_genepool_hardened_genes_desc"),reqs:{},grant:["challenge",1],cost:{Plasmid:()=>5},action:()=>!!Se("hardened_genes")},unlocked:{id:"genes-unlocked",title:F("arpa_genepool_unlocked_title"),desc:F("arpa_genepool_unlocked_desc"),reqs:{challenge:1},grant:["challenge",2],cost:{Plasmid:()=>50},action:()=>!!Se("unlocked"),post(){Ls(!0)}},universal:{id:"genes-universal",title:F("arpa_genepool_universal_title"),desc:F("arpa_genepool_universal_desc"),reqs:{challenge:2},grant:["challenge",3],condition:()=>"standard"!==t.race.universe,cost:{Plasmid:()=>400},action:()=>!!Se("universal"),post(){Ls(!0)}},standard:{id:"genes-standard",title:F("arpa_genepool_standard_title"),desc:F("arpa_genepool_standard_desc"),reqs:{challenge:3},grant:["challenge",4],condition:()=>"standard"!==t.race.universe,cost:{Plasmid:()=>2500},action:()=>!!Se("standard"),post(){Ls(!0)}},mastered:{id:"genes-mastered",title:F("arpa_genepool_mastered_title"),desc:F("arpa_genepool_mastered_desc"),reqs:{challenge:4},grant:["challenge",5],cost:{Plasmid:()=>4e3},action:()=>!!Se("mastered")},negotiator:{id:"genes-negotiator",title:F("arpa_genepool_negotiator_title"),desc:F("arpa_genepool_negotiator_desc"),reqs:{challenge:2},grant:["trader",1],cost:{Plasmid:()=>750},action:()=>!!Se("negotiator")&&(t.genes.trader=1,Ne(),!0)},ancients:{id:"genes-ancients",title:F("arpa_genepool_ancients_title"),desc:F("arpa_genepool_ancients_desc"),reqs:{evolve:2},condition:()=>!!t.genes.old_gods,grant:["ancients",1],cost:{Plasmid:()=>120},action:()=>!!Se("ancients")&&(t.genes.ancients=1,Jr(),!0)},faith:{id:"genes-faith",title:F("arpa_genepool_faith_title"),desc:F("arpa_genepool_faith_desc"),reqs:{ancients:1},grant:["ancients",2],cost:{Plasmid:()=>300},action:()=>!!Se("faith")&&(t.civic.priest.display=!0,!0)},devotion:{id:"genes-devotion",title:F("arpa_genepool_devotion_title"),desc:F("arpa_genepool_devotion_desc"),reqs:{ancients:2},grant:["ancients",3],cost:{Plasmid:()=>600},action:()=>!!Se("devotion")},acolyte:{id:"genes-acolyte",title:F("arpa_genepool_acolyte_title"),desc:F("arpa_genepool_acolyte_desc"),reqs:{ancients:3},grant:["ancients",4],cost:{Plasmid:()=>1e3},action:()=>!!Se("acolyte")},conviction:{id:"genes-conviction",title:F("arpa_genepool_conviction_title"),desc:F("arpa_genepool_conviction_desc"),reqs:{ancients:4},grant:["ancients",5],cost:{Plasmid:()=>1500},action:()=>!!Se("conviction")},transcendence:{id:"genes-transcendence",title:F("arpa_genepool_transcendence_title"),desc:F("arpa_genepool_transcendence_desc"),reqs:{ancients:1,mutation:3},grant:["transcendence",1],cost:{Plasmid:()=>3e3},action:()=>!!Se("transcendence")&&(t.genes.transcendence=1,Jr(),!0)},bleeding_effect:{id:"genes-bleeding_effect",title:F("arpa_genepool_bleeding_effect_title"),desc:F("arpa_genepool_bleeding_effect_desc",[2.5]),reqs:{creep:2},grant:["bleed",1],condition:()=>"antimatter"===t.race.universe,cost:{Plasmid:()=>100},action:()=>!!Se("bleeding_effect")},synchronicity:{id:"genes-synchronicity",title:F("arpa_genepool_synchronicity_title"),desc:F("arpa_genepool_synchronicity_desc",[25]),reqs:{bleed:1},grant:["bleed",2],cost:{Plasmid:()=>500},action:()=>!!Se("synchronicity")},astral_awareness:{id:"genes-astral_awareness",title:F("arpa_genepool_astral_awareness_title"),desc:F("arpa_genepool_astral_awareness_desc"),reqs:{bleed:2},grant:["bleed",3],cost:{Plasmid:()=>1e3},action:()=>!!Se("astral_awareness")},blood_remembrance:{id:"genes-blood_remembrance",title:F("arpa_genepool_blood_remembrance_title"),desc:F("arpa_genepool_blood_remembrance_desc"),reqs:{},grant:["blood",1],condition:()=>t.prestige.Blood_Stone.count>=1,cost:{Plasmid:()=>1e3,Phage:()=>10},action:()=>!!Se("blood_remembrance")},blood_sacrifice:{id:"genes-blood_sacrifice",title:F("arpa_genepool_blood_sacrifice_title"),desc:F("arpa_genepool_blood_sacrifice_desc"),reqs:{blood:1},grant:["blood",2],cost:{Plasmid:()=>3e3,Phage:()=>100,Artifact:()=>1},action:()=>!!Se("blood_sacrifice")},essence_absorber:{id:"genes-essence_absorber",title:F("arpa_genepool_essence_absorber_title"),desc:F("arpa_genepool_essence_absorber_desc"),reqs:{blood:2},grant:["blood",3],cost:{Plasmid:()=>7500,Phage:()=>250,Artifact:()=>1},action:()=>!!Se("essence_absorber"),post(){Be()}}},Me={purify:{id:"blood-purify",title:F("arpa_blood_purify_title"),desc:F("arpa_blood_purify_desc"),reqs:{},grant:["spire",1],cost:{Blood_Stone:()=>10},action(){return!!Ce($(this)[0].cost)}},chum:{id:"blood-chum",title:F("arpa_blood_chum_title"),desc:F("arpa_blood_chum_desc"),reqs:{spire:1},grant:["spire",2],cost:{Blood_Stone:()=>25},action(){return!!Ce($(this)[0].cost)}},lust:{id:"blood-lust",title:F("arpa_blood_lust_title"),desc:F("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:()=>`${F("arpa_blood_repeat")}`,action(){return!!Ce($(this)[0].cost)}},illuminate:{id:"blood-illuminate",title:F("arpa_blood_illuminate_title"),desc:F("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:()=>`${F("arpa_blood_repeat")}`,action(){return!!Ce($(this)[0].cost)}},greed:{id:"blood-greed",title:F("arpa_blood_greed_title"),desc:F("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:()=>`${F("arpa_blood_repeat")}`,action(){return!!Ce($(this)[0].cost)}},hoarder:{id:"blood-hoarder",title:F("arpa_blood_hoarder_title"),desc:F("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:()=>`${F("arpa_blood_repeat")}`,action(){return!!Ce($(this)[0].cost)}},artisan:{id:"blood-artisan",title:F("arpa_blood_artisan_title"),desc:F("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:()=>`${F("arpa_blood_repeat")}`,action(){return!!Ce($(this)[0].cost)}},attract:{id:"blood-attract",title:F("arpa_blood_attract_title"),desc:F("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:()=>`${F("arpa_blood_repeat")}`,action(){return!!Ce($(this)[0].cost)}},wrath:{id:"blood-wrath",title:F("arpa_blood_wrath_title"),desc:F("arpa_blood_wrath_desc"),reqs:{},grant:["wrath","*"],cost:{Blood_Stone:e=>2*((e||0)+(t.blood.wrath||0))+2,Artifact:()=>1},effect:()=>`${F("arpa_blood_repeat")}`,action(){return!!Ce($(this)[0].cost)}},prepared:{id:"blood-prepared",title:F("arpa_blood_prepared_title"),desc:F("arpa_blood_prepared_desc"),reqs:{},grant:["prepared",1],condition:()=>!!(t.genes.blood&&t.genes.blood>=3),cost:{Blood_Stone:()=>50},action(){return!!Ce($(this)[0].cost)},post(){ba()}},compact:{id:"blood-compact",title:F("arpa_blood_compact_title"),desc:F("arpa_blood_compact_desc"),reqs:{prepared:1},grant:["prepared",2],condition:()=>!!(t.genes.blood&&t.genes.blood>=3),cost:{Blood_Stone:()=>75},action(){return!!Ce($(this)[0].cost)}},infernal:{id:"blood-infernal",title:F("arpa_blood_infernal_title"),desc:F("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!!Ce($(this)[0].cost)}},unbound:{id:"blood-unbound",title:F("arpa_blood_unbound_title"),desc:F("arpa_blood_unbound_desc"),reqs:{},grant:["unbound",1],cost:{Blood_Stone:()=>50},action(){return!!Ce($(this)[0].cost)}},unbound_resistance:{id:"blood-unbound_resistance",title:F("arpa_blood_unbound_resistance_title"),desc:F("arpa_blood_unbound_resistance_desc"),reqs:{unbound:1},grant:["unbound",2],cost:{Blood_Stone:()=>100},action(){return!!Ce($(this)[0].cost)}},shadow_war:{id:"blood-shadow_war",title:F("arpa_blood_shadow_war_title"),desc:F("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!!Ce($(this)[0].cost)}},unbound_immunity:{id:"blood-unbound_immunity",title:F("arpa_blood_unbound_immunity_title"),desc:F("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!!Ce($(this)[0].cost)}},blood_aware:{id:"blood-blood_aware",title:F("arpa_blood_blood_aware_title"),desc:F("arpa_blood_blood_aware_desc"),reqs:{},grant:["aware",1],condition:()=>!!(t.genes.blood&&t.genes.blood>=3),cost:{Blood_Stone:()=>10},action(){return!!Ce($(this)[0].cost)}}};function Se(e){let a=!0,r=Oe[e].cost;return Object.keys(r).forEach((function(e){let i=e;"Plasmid"===e&&"antimatter"===t.race.universe&&(e="AntiPlasmid"),t.prestige[e].countNumber(t.resource[i].amount))return a=!1,!1})),a}(e=Ie(e))&&(Object.keys(e).forEach((function(a){t.resource[a].amount-=e[a]()/100})),!0)}function Ie(e,a,r){return e=function(e,a,r){if(r&&r.creative||!r&&t.race.creative){var i={};let t=as("human");return Object.keys(e).forEach((function(s){i[s]=function(){let i=e[s](a,r);return i*=1-Ki.creative.vars()[1]/100,t>0&&(i*=1-Ki.creative.vars(1)[1]/100*t),i}})),i}return e}(e,a,r),Rs({cost:e},a,r)}function Te(e,a,r,i,s){var n=t.arpa[e]?t.arpa[e].rank:0;return(s&&s.creative||!s&&t.race.creative)&&"syphon"!==e&&(i-=Ki.creative.vars()[0]),a&&(n+=a),Math.round(i**n*r)}function Le(){if(t.tech.high_tech&&t.tech.high_tech>=6){let e=$("#arpaPhysics");Cs(e),Object.keys(Pe).forEach((function(a){!function(e,a){if(function(e){if(Pe[e].condition&&!Pe[e].condition())return!1;let a=t.race.truepath?"truepath":"standard";if(Pe[e].hasOwnProperty("path")&&!Pe[e].path.includes(a))return!1;var r=!0;return Object.keys(Pe[e].reqs).forEach((function(a){(!t.tech[a]||t.tech[a]=Pe[a].rank)return;let r=$(`
                            `);e.append(r);let i="string"==typeof Pe[a].title?Pe[a].title:Pe[a].title(),s=$(`
                            ${i}{{ rank | level }}
                            `);r.append(s);let n=$('
                            {{ complete }}%
                            ');s.append(n);let c=$('
                            ');r.append(c),c.append($(``)),c.append($(``)),c.append($(``)),c.append($(``)),c.append($(``)),zs({el:`#arpa${a}`,data:t.arpa[a],methods:{queue(e){if(t.tech.queue){let r=b();for(let i=0;i0))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 Pe[e].title?Pe[e].title:Pe[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})}bs()}}},build(e,a){!function(e,a,r,i){let s=!1;100===a&&(a=100-t.arpa[e].complete);for(let r=0;r=100&&(t.arpa[e].rank++,t.arpa[e].complete=0,t.tech[Pe[e].grant]=t.arpa[e].rank,s=!0,"monument"===e&&(t.arpa.m_type=ze(),$(`#arpa${e} .head .desc`).html(Pe[e].title()),hi(!1,["arpamonument"])),"roid_eject"===e&&($(`#arpa${e} .head .desc`).html(Pe[e].title()),hi(!1,["arparoid_eject"])),"launch_facility"===e&&(t.settings.showSpace=!0,t.tech.space=1,ds("popArpalaunch_facility"),[1,10,25,100].forEach((function(e){ds(`popArpalaunch_facility${e}`)})),gs(["arpalaunch_facility"]),Le(),Et(),ms(F("arpa_projects_launch_facility_msg"),"info",!1,["progress"])),t.race.inflation&&(t.race.inflation+=10),Jr()));{let t=[1,10,25,100],a=$("#popper"),r=a.data("id");for(let i=0;iP(Pe[a].desc),srLevel:()=>P(Pe[a].effect()),arpaProjectSRCosts(e,a){let r="100"===e?100-t.arpa[a].complete:e;var i=`Construct ${r}%. Costs:`,s=Ie(Pe[a].cost);return Object.keys(s).forEach((function(e){var a=+(s[e]()*(r/100)).toFixed(0);if(a>0){var n="Money"===e?"$":t.resource[e].name+": ",c=t.resource[e].amount>=a?"":` ${F("insufficient")} ${t.resource[e].name}.`;i+=` ${n} ${q(a,2)}.${c}`}})),i}},filters:{remain:e=>100-e,level:e=>F("arpa_level",[e])}}),_s(`popArpa${a}`,(function(){return Pe[a].desc}),{elm:`#arpa${a} .head .desc`,classes:"has-background-light has-text-dark"}),_s(`popArpa${a}`,(function(){return Pe[a].effect()}),{elm:`#arpa${a} .head .rank`,classes:"has-background-light has-text-dark"});let o=[1,10,25,100];for(let e=0;e1){let a=$('
                            ');e.append(a);let r=t.tech.genetics>2?F("arpa_gene_mutation"):F("arpa_sequence_genome");t.race.artifical&&(r=t.tech.genetics>2?F("arpa_code_modification"):F("arpa_decompile_source"));let i=$(`
                            ${r} - ${F("arpa_to_complete")}
                            `);a.append(i);let s=$(`{{ progress }}%`);a.append(s);let n=t.tech.genetics>2?F("arpa_mutate"):F("arpa_sequence");t.race.artifical&&(n=t.tech.genetics>2?F("arpa_modify"):F("arpa_decompile"));let c=$(``);if(a.append(c),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"),zs({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=>F(t.race.artifical?"arpa_boost_artifical_label":"arpa_boost_label")+(e?t.arpa.sequence.boost?F("city_on"):F("city_off"):""),novo(){let e=b();for(let a=0;a=2e5;a++)t.resource.Knowledge.amount-=2e5,t.resource.Genes.amount++},novoLabel:()=>F(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=>F(t.race.artifical?"arpa_auto_compile_label":"arpa_auto_seq_label")+(e?t.arpa.sequence.boost?F("city_on"):F("city_off"):"")},filters:{timer(e){if(t.arpa.sequence.on&&t.arpa.sequence.labs>0)return t.arpa.sequence.boost?Fs(e/(2*t.arpa.sequence.labs)):Fs(e/t.arpa.sequence.labs);{let e=Js(14,12);return e.length>0?e:F("time_never")}}}}),_s("popArpaSeq",(function(){return t.tech.genetics>2?t.race.artifical?F("arpa_modify_desc"):F("arpa_mutate_desc"):t.race.artifical?F("arpa_decompile_desc"):F("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){Ki[e]&&"minor"===Ki[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,i=[];t.settings.mtorder.forEach((function(e){(Ki[e]&&"minor"===Ki[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=$(`
                            `),i=$(`${t.resource.Genes.name} (${t.race.minor[a]||0})`);if(r.append(i),t.prestige.Phage.count>0){let e=$(`${F("resource_Phage_name")} (${t.genes.minor[a]||0})`);r.append(e)}let s=t.race[a]>1?`(${t.race[a]}) `:"";r.append(`${s}${rs("name",a)}`),e.append(r)}(a,e),i.push(e))})),e.append(`
                            ${F("arpa_race_genetic_traids",[cn("name")])}
                            `);let s=rs("name"),n=[],c=[],o=$('
                            ');e.append(o);let l=nn(t.race);on("fool",2023)&&(l.hooved=1),Object.keys(l).forEach((function(e){if(Ki[e]&&"minor"!==Ki[e].type&&"special"!==Ki[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"===Ki[e].type&&t.genes.mutation||"genus"===Ki[e].type&&t.genes.mutation&&t.genes.mutation>=2)){let t=$('
                            '),a=$(`${F("arpa_remove_button")}`);n.push(e),t.append(a),t.append($(`${s[e]?s[e]:Ki[e].name} (${F("arpa_genepool_rank",[l[e]])})`)),o.append(t)}else c.push(e),o.append(`
                            ${s[e]?s[e]:Ki[e].name} (${F("arpa_genepool_rank",[l[e]])})
                            `)}}));let _=[];if(t.genes.mutation&&t.genes.mutation>=3&&("sludge"!==t.race.species||!t.race.modified)){e.append(`
                            ${F("arpa_race_genetic_gain")}
                            `);let a=["dumb","smart"];Object.keys(Di).forEach((function(e){"junker"!==e&&"sludge"!==e&&"custom"!==e&&Di[e].type===Di[t.race.species].type&&Object.keys(Di[e].traits).forEach((function(e){if(!t.race[e]&&"soul_eater"!==e){let r=a.indexOf(e);if(-1===r)_.push(e);else{let i=!1;switch(r%2){case 0:t.race[a[r+1]]&&(i=!0);break;case 1:t.race[a[r-1]]&&(i=!0)}i||_.push(e)}}}))}));let r=$('
                            ');e.append(r);for(let e=0;e<_.length;e++){let t=_[e],a=$('
                            '),i=$(`${F("arpa_gain_button")}`);a.append(i),a.append($(`${s[t]?s[t]:Ki[t].name}`)),r.append(a)}}r&&e.prepend(`
                            ${F("arpa_race_genetic_minor_traits",[cn("name")])}
                            `);let d=function(e){let a=5*Ki[e].val;return"custom"!==t.race.species&&"sludge"!==t.race.species||(a*=10),a<0&&(a*=-1),F("arpa_remove",[rs("name",e),a,"antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name")])},p=function(e){let a=5*Ki[e].val;return"custom"!==t.race.species&&"sludge"!==t.race.species||(a*=10),a<0&&(a*=-1),F("arpa_gain",[rs("name",e),a,"antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name")])},u=function(e){let a=en(t.race.minor[e]?t.race.minor[e]+4:4);return"mastery"===e&&(a*=5),F("arpa_gene_buy",[rs("name",e),q(a),t.resource.Genes.name])},h=function(e){let a=en(t.genes.minor[e]?t.genes.minor[e]+4:4);return"mastery"===e&&(a*=2),F("arpa_phage_buy",[rs("name",e),q(a),F("resource_Phage_name")])};zs({el:"#geneticBreakdown",data:{genes:t.genes,race:t.race},methods:{gene(e){let a=0,r=b(),i=!0,s=!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,s=!0):i=!1,a++}s&&("mastery"===e&&Ls(!0),Ke(),"persuasive"===e&&Ne())},phage(e){let a=0,r=b(),i=!0,s=!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,s=!0):i=!1,a++}s&&("mastery"===e&&Ls(!0),Ke(),"persuasive"===e&&Ne())},purge(e){if("sludge"===t.race.species&&(t.race.modified||"ooze"===e))return;let a=5*Ki[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 i=t.race[e];delete t.race[e],t.race.modified?t.race.modified++:t.race.modified=1,Xi(e,i),Ke(),Jr(),Qr();let s=0;Object.keys(t.race).forEach((function(e){!Ki[e]||"major"!=Ki[e].type&&"genus"!=Ki[e].type||"evil"===e||s++})),0===s&&jn("blank_slate")}},gain(e){if("sludge"===t.race.species&&t.race.modified)return;let a=5*Ki[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,Zi(e),Ke(),Jr(),Qr())},geneCost:e=>u(e),phageCost:e=>h(e),traitEffect:e=>F(`trait_${e}_effect`),removeCost:e=>d(e),addCost:e=>p(e),genePurchasable(e){let a=en(t.race.minor[e]?t.race.minor[e]+4:4);return"mastery"===e&&(a*=5),t.resource.Genes.amount>=a},phagePurchasable(e){let a=en(t.genes.minor[e]?t.genes.minor[e]+4:4);return"mastery"===e&&(a*=2),t.prestige.Phage.count>=a}}}),i.forEach((function(e){_s(`popGenetrait${e}`,(function(){return u(e)}),{elm:`#geneticBreakdown .t-${e} .gbuy`,classes:"has-background-light has-text-dark"}),t.prestige.Phage.count>0&&_s(`popGenetrait${e}`,(function(){return h(e)}),{elm:`#geneticBreakdown .t-${e} .pbuy`,classes:"has-background-light has-text-dark"}),_s(`popGenetrait${e}`,(function(){return t.stats.feat.novice&&t.stats.achieve.apocalypse&&t.stats.achieve.apocalypse.l>0?`
                            ${rs("desc",e)}
                            ${F(`trait_${e}_effect`)}
                            `:rs("desc",e)}),{elm:`#geneticBreakdown .t-${e} .name`,classes:"has-background-light has-text-dark"})})),n.forEach((function(e){_s(`popRemoveBkdwn${e}`,(function(){return d(e)}),{elm:`#geneticBreakdown .remove${e}`,classes:"has-background-light has-text-dark"});let a=`raceTrait${e}`,r=$("
                            ");fn(r,e,{trank:t.race[e]}),_s(a,r,{wide:!0,classes:"w30"})})),c.forEach((function(e){let a=`raceTrait${e}`,r=$("
                            ");fn(r,e,{trank:t.race[e]}),_s(a,r,{elm:`#geneticBreakdown .trait${e}`,wide:!0,classes:"w30"})})),_.forEach((function(e){_s(`popAddBkdwn${e}`,(function(){return p(e)}),{elm:`#geneticBreakdown .add${e}`,classes:"has-background-light has-text-dark"});let a=`raceTrait${e}`,r=$("
                            ");fn(r,e,{trank:t.race[e]}),_s(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,Ke()}})}()}}function De(){(t.tech.genetics&&t.tech.genetics>3||t.sim)&&(Cs($("#arpaCrispr")),$("#arpaCrispr").append(`
                            ${F("arpa_crispr_desc")}
                            `),$("#arpaCrispr").append('
                            '),Object.keys(Sr.genes).forEach((function(e){ai(Sr.genes[e].id),function(e){var a=!0;return Object.keys(Sr.genes[e].reqs).forEach((function(r){(!t.genes[r]||t.genes[r]=2&&(Cs($("#arpaBlood")),$("#arpaBlood").append(`
                            ${F("arpa_blood_desc")}
                            `),$("#arpaBlood").append('
                            '),Object.keys(Sr.blood).forEach((function(e){ai(Sr.blood[e].id),function(e){var a=!0;return Object.keys(Sr.blood[e].reqs).forEach((function(r){(!t.blood[r]||t.blood[r]
                            "),s=Ie(Pe[a].cost);let n=Ss(Pe[a],r/100,!1,!0);return Object.keys(s).forEach((function(e){var a=+(s[e]()*(r/100)).toFixed(0);if(a>0){var c="Money"===e?"$":t.resource[e].name+": ",o=t.resource[e].amount>=a?"has-text-dark":e===n.r?"has-text-danger":"has-text-alert";i.append($(`
                            ${c}${q(a,2)}
                            `))}})),i}function Ne(){Object.keys(t.resource).forEach((function(e){zs({el:`#market-${e}`},"update")})),zs({el:"#galaxyTrade"},"update")}const Re={spc_titan:{info:{name:()=>Vt().titan,desc:()=>F("space_titan_info_desc",[Vt().titan,Di[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:()=>F("space_mission_title",[Vt().titan]),desc:()=>F("space_mission_desc",[Vt().titan]),reqs:{outer:1},grant:["titan",1],path:["truepath"],queue_complete:()=>t.tech.titan>=1?0:1,cost:{Helium_3:(e,t)=>+Ht(25e4,!1,t).toFixed(0),Elerium:()=>100},effect:()=>F("space_titan_mission_effect",[Vt().titan]),action(){return!!ii($(this)[0])&&(ms(F("space_titan_mission_action",[Vt().titan,Di[t.race.species].home]),"info",!1,["progress"]),!0)}},titan_spaceport:{id:"space-titan_spaceport",title:F("space_red_spaceport_title"),desc:`
                            ${F("space_red_spaceport_desc")}
                            ${F("requires_power")}
                            `,reqs:{titan:1},path:["truepath"],cost:{Money:e=>js("titan_spaceport",e,25e5,1.32),Lumber:e=>js("titan_spaceport",e,75e4,1.32),Cement:e=>js("titan_spaceport",e,35e4,1.32),Mythril:e=>js("titan_spaceport",e,1e4,1.32)},effect(){let e=t.resource.Water.display?`
                            ${F("plus_max_resource",[q(wr(250)),t.resource.Water.name])}
                            `:"";return`${t.tech.enceladus&&t.tech.enceladus>=2?`
                            +${F("galaxy_alien2_support",[$(this)[0].support(),Vt().enceladus])}
                            `:""}${e}${t.tech.titan&&t.tech.titan>=5?`
                            ${F("space_titan_spaceport_storage",[25])}
                            `:""}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},support:()=>2,powered:()=>Is(10),action(){return!!ii($(this)[0])&&(t.space.titan_spaceport.count++,ei($(this)[0]),!0)},post(){1===t.tech.titan&&(t.tech.titan=2,Jr())}},electrolysis:{id:"space-electrolysis",title:F("space_electrolysis_title"),desc:()=>`
                            ${F("space_electrolysis_title")}
                            ${F("space_electrolysis_req",[t.resource.Water.name])}
                            `,reqs:{titan:3},path:["truepath"],cost:{Money:e=>js("electrolysis",e,1e6,1.25),Copper:e=>js("electrolysis",e,185e3,1.25),Steel:e=>js("electrolysis",e,22e4,1.25),Polymer:e=>js("electrolysis",e,38e4,1.25)},effect(){return`
                            +${F("galaxy_alien2_support",[$(this)[0].support(),Vt().titan])}
                            ${F("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&&s.ai_core2?3:2,support_fuel:()=>({r:"Water",a:35}),powered:()=>Is(8),action(){return!!ii($(this)[0])&&(t.space.electrolysis.count++,ei($(this)[0]),!0)},post(){3===t.tech.titan&&(t.tech.titan=4,Jr())}},hydrogen_plant:{id:"space-hydrogen_plant",title:F("space_hydrogen_plant_title"),desc:()=>`
                            ${F("space_hydrogen_plant_title")}
                            ${F("space_hydrogen_plant_req")}
                            `,reqs:{titan_power:1},path:["truepath"],cost:{Money:e=>js("hydrogen_plant",e,15e5,1.28),Iridium:e=>js("hydrogen_plant",e,292e3,1.28),Stanene:e=>js("hydrogen_plant",e,599e3,1.28),Cement:e=>js("hydrogen_plant",e,18e4,1.28)},effect(){return`${F("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}, ${F("space_hydrogen_plant_effect",[1,F("space_electrolysis_title")])}`},support:()=>2,powered:()=>As(-22),action(){return!!ii($(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:F("interstellar_habitat_title"),desc:()=>`
                            ${F("interstellar_habitat_title")}
                            ${F("space_habitat_req",[Vt().titan,t.resource.Food.name,t.resource.Water.name])}
                            `,reqs:{titan:4},path:["truepath"],cost:{Money:e=>js("titan_quarters",e,12e5,1.28),Furs:e=>js("titan_quarters",e,85e3,1.28),Plywood:e=>js("titan_quarters",e,1e5,1.28),Horseshoe:()=>t.race.hooved?1:0},effect(){let e=aa(1);return`
                            ${F("space_used_support",[Vt().titan])}
                            ${F("plus_max_resource",[aa(1),t.race.truepath?F("job_colonist_tp",[Vt().titan]):F("colonist")])}
                            ${F("plus_max_resource",[e,F("citizen")])}
                            ${F("spend",[$(this)[0].support_fuel()[0].a,t.resource[$(this)[0].support_fuel()[0].r].name])}
                            ${F("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:()=>Is(1),action(){if(ii($(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-aa(1)<0?t.civic[t.civic.d_job].workers:aa(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*=Ki.high_pop.vars()[0]),e}},titan_mine:{id:"space-titan_mine",title:F("space_red_mine_title"),desc:()=>`
                            ${F("space_red_mine_desc")}
                            ${F("space_support",[Vt().titan])}
                            `,reqs:{titan:4},condition:()=>!!(t.space.titan_quarters&&t.space.titan_quarters.count>0),path:["truepath"],cost:{Money:e=>js("titan_mine",e,475e3,1.28),Lumber:e=>js("titan_mine",e,568e3,1.28),Wrought_Iron:e=>js("titan_mine",e,25e4,1.28)},effect(){let e=xe("titan_mine","adamantite"),a=xe("titan_mine","aluminium"),r=+e.toFixed(3),i=+a.toFixed(3);return`
                            ${F("space_used_support",[Vt().titan])}
                            ${F("space_red_mine_effect",[r,t.resource.Adamantite.name])}
                            ${F("space_red_mine_effect",[i,t.resource.Aluminium.name])}
                            `},support:()=>-1,powered:()=>Is(1),special:()=>!0,action(){return!!ii($(this)[0])&&(t.space.titan_mine.count++,t.resource.Adamantite.display=!0,t.space.electrolysis.supportjs("storehouse",e,175e3,1.28),Lumber:e=>js("storehouse",e,1e5,1.28),Aluminium:e=>js("storehouse",e,12e4,1.28),Cement:e=>js("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=gt("storehouse",!1),r=gt("storehouse",!0);for(const i of $(this)[0].res())if(t.resource[i].display){let s=$(this)[0].heavy(i);e+=`${F("plus_max_resource",[q(+(wr($(this)[0].val(i))*(s?r:a)).toFixed(0),1),t.resource[i].name])}`}return e+="
                            ",e},action(){if(ii($(this)[0])){t.space.storehouse.count++;let e=gt("storehouse",!1),a=gt("storehouse",!0);for(const r of $(this)[0].res())if(t.resource[r].display){let i=$(this)[0].heavy(r);t.resource[r].max+=wr($(this)[0].val(r))*(i?a:e)}return!0}return!1}},titan_bank:{id:"space-titan_bank",title:F("city_bank"),desc:()=>F("city_bank_desc",[Vt().titan]),reqs:{titan:6},path:["truepath"],cost:{Money:e=>js("titan_bank",e,25e5,1.32),Titanium:e=>js("titan_bank",e,38e4,1.32),Neutronium:e=>js("titan_bank",e,5e3,1.32)},effect(){let e=2*wi();return e=wr(e),e=(+e.toFixed(0)).toLocaleString(),F("plus_max_resource",[`$${e}`,F("resource_Money_name")])},action(){return!!ii($(this)[0])&&(t.resource.Money.max+=wr(1800),t.space.titan_bank.count++,!0)}},g_factory:{id:"space-g_factory",title:F("interstellar_g_factory_title"),desc:()=>`
                            ${F("interstellar_g_factory_title")}
                            ${F("space_support",[Vt().titan])}
                            `,reqs:{graphene:1},path:["truepath"],cost:{Money:e=>js("g_factory",e,95e4,1.28),Copper:e=>js("g_factory",e,165e3,1.28),Stone:e=>js("g_factory",e,22e4,1.28),Adamantite:e=>js("g_factory",e,12500,1.28)},effect(){let e=.05;return t.race.high_pop&&(e=+$e(e).toFixed(3)),`
                            ${F("space_used_support",[Vt().titan])}
                            ${F("space_red_mine_effect",[e,t.resource.Graphene.name])}
                            ${F("interstellar_g_factory_effect")}
                            `},support:()=>-1,powered:()=>Is(1),special:!0,action(){return!!ii($(this)[0])&&(t.space.g_factory.count++,t.resource.Graphene.display=!0,t.space.electrolysis.support`
                            ${F("space_sam_desc")}
                            ${F("requires_power")}
                            `,reqs:{titan:7},path:["truepath"],cost:{Money:e=>js("sam",e,25e5,1.28),Steel:e=>js("sam",e,45e4,1.28),Elerium:e=>js("sam",e,120,1.28),Brick:e=>js("sam",e,16e4,1.28)},effect(){return`
                            ${F("galaxy_defense_platform_effect",[25])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(5),action(){return!!ii($(this)[0])&&(t.space.sam.count++,ei($(this)[0]),!0)},post(){zs({el:"#spc_titansynd"},"update")}},decoder:{id:"space-decoder",title:F("space_decoder_title"),desc:()=>`
                            ${F("space_decoder_title")}
                            ${F("requires_power_support_combo",[Vt().titan,t.resource.Cipher.name])}
                            `,reqs:{titan:8},path:["truepath"],cost:{Money:e=>js("decoder",e,125e5,1.275),Elerium:e=>js("decoder",e,750,1.275),Orichalcum:e=>js("decoder",e,33e4,1.275),Quantium:e=>js("decoder",e,18e4,1.275)},effect(){let e=$(this)[0].support_fuel().a,a=2500;t.race.high_pop&&(a=$e(a)),s.ai_core2&&(a*=1.25);let r=`
                            ${F("space_used_support",[Vt().titan])}
                            `;return r+=`
                            ${F("space_red_exotic_lab_effect1",[a])}
                            `,r+`
                            ${F("spend",[e,t.resource[$(this)[0].support_fuel().r].name])}
                            `},support:()=>-1,powered:()=>Is(1),support_fuel:()=>({r:"Cipher",a:.06}),action(){return!!ii($(this)[0])&&(t.space.decoder.count++,t.space.electrolysis.support!t.space.hasOwnProperty("ai_core")||t.space.ai_core.count<100||e?`
                            ${F("space_ai_core")}
                            ${F("requires_segmemts",[100])}
                            `+(t.space.hasOwnProperty("ai_core")&&t.space.ai_core.count>=100?`
                            ${F("requires_power")}
                            `:""):`
                            ${F("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=`
                            ${F("space_ai_core_effect")}
                            `,r=(e||0)+(t.space.hasOwnProperty("ai_core")?t.space.ai_core.count:0);return r<100?(a+=`
                            ${F("space_dwarf_collider_effect2",[100-r])}
                            `,a):Re.spc_titan.ai_core2.effect()},action(){return!!(ii($(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>=Re.spc_titan.ai_core2.powered()&&t.space.ai_core2.on++,Et(),Jr()),!0)}},ai_core2:{id:"space-ai_core2",title:F("space_ai_core"),desc(){return`
                            ${F("space_ai_core")}
                            ${F("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:()=>Is(100),p_fuel:()=>({r:"Water",a:1e3}),effect(){let e=`
                            ${F("interstellar_citadel_stat",[+_.toFixed(1)])}
                            `;return e+=`
                            ${F("interstellar_citadel_effect",[25])}
                            ${F("space_ai_core_effect2",[25])}
                            `,t.tech.titan_ai_core&&t.tech.titan_ai_core>=2&&(e+=`
                            ${F("space_ai_core_effect3",[50])}
                            `),e+=`
                            ${F("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+=`
                            ${F("space_ai_core_effect4",[+function(){let e=0;return s.ai_colonist&&n.decoder&&(e+=s.ai_colonist*n.decoder*.35),n.shock_trooper&&(e+=2*n.shock_trooper),n.tank&&(e+=2*n.tank),e>100&&(e=100),e}().toFixed(1)])}
                            `),e},action:()=>!1,flair:()=>t.space.hasOwnProperty("ai_core2")&&t.space.ai_core2.on>=1?F("space_ai_core_flair"):F("space_ai_core_flair2")},ai_colonist:{id:"space-ai_colonist",title:F("space_ai_colonist_title"),desc:()=>`
                            ${F("space_ai_colonist_title")}
                            ${F("requires_power")}
                            `,reqs:{titan_ai_core:3},path:["truepath"],cost:{Money:e=>js("ai_colonist",e,112e6,1.35),Alloy:e=>js("ai_colonist",e,75e4,1.35),Elerium:e=>js("ai_colonist",e,500,1.35),Nano_Tube:e=>js("ai_colonist",e,525e3,1.35),Quantium:e=>js("ai_colonist",e,15e4,1.35),Cipher:e=>js("ai_colonist",e,1e4,1.35)},effect(){return`
                            ${F("plus_max_resource",[aa(1),t.race.truepath?F("job_colonist_tp",[Vt().titan]):F("colonist")])}
                            ${F("space_ai_colonist_effect",[aa(1),Vt().titan])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(10),action(){return!!ii($(this)[0])&&(t.space.ai_colonist.count++,ei($(this)[0]),!0)},flair:F("tech_combat_droids_flair")}},spc_enceladus:{info:{name:()=>Vt().enceladus,desc:()=>F("space_enceladus_info_desc",[Vt().enceladus,Di[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:()=>F("space_mission_title",[Vt().enceladus]),desc:()=>F("space_mission_desc",[Vt().enceladus]),reqs:{outer:1},grant:["enceladus",1],path:["truepath"],queue_complete:()=>t.tech.enceladus>=1?0:1,cost:{Helium_3:(e,t)=>+Ht(25e4,!1,t).toFixed(0),Elerium:()=>100},effect:()=>F("space_titan_mission_effect",[Vt().enceladus]),action(){return!!ii($(this)[0])&&(ms(F("space_enceladus_mission_action",[Vt().enceladus]),"info",!1,["progress"]),t.resource.Water.display=!0,!0)}},water_freighter:{id:"space-water_freighter",title:F("space_water_freighter_title"),desc:()=>`
                            ${F("space_water_freighter_title")}
                            ${F("space_support",[Vt().enceladus])}
                            `,reqs:{enceladus:2},path:["truepath"],cost:{Money:e=>js("water_freighter",e,45e4,1.25),Iron:e=>js("water_freighter",e,362e3,1.25),Nano_Tube:e=>js("water_freighter",e,125e3,1.25),Sheet_Metal:e=>js("water_freighter",e,75e3,1.25)},effect(e){let a=+Ht(5,!0,e).toFixed(2),r=+xe("water_freighter").toFixed(2);return`
                            ${F("space_used_support",[Vt().enceladus])}
                            ${F("produce",[r,t.resource.Water.name])}
                            ${F("space_belt_station_effect3",[a])}
                            `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(t.space.water_freighter.count++,t.space.titan_spaceport.support`
                            ${F("tech_zero_g_lab")}
                            ${F("requires_power_support",[Vt().enceladus])}
                            `,reqs:{enceladus:3},path:["truepath"],cost:{Money:e=>js("zero_g_lab",e,5e6,1.25),Alloy:e=>js("zero_g_lab",e,125e3,1.25),Graphene:e=>js("zero_g_lab",e,225e3,1.25),Stanene:e=>js("zero_g_lab",e,6e5,1.25)},effect(){let e=_t("spc_enceladus"),a=Math.round(1e4*e),r=`
                            ${F("space_used_support",[Vt().enceladus])}
                            ${F("city_max_knowledge",[a])}
                            `;return t.resource.Quantium.display&&(r+=`
                            ${F("space_zero_g_lab_effect",[aa(1)])}
                            `),t.resource.Cipher.display&&(r+=`
                            ${F("plus_max_resource",[1e4,t.resource.Cipher.name])}
                            `),r+`
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},support:()=>-1,powered:()=>Is(12),action(){return!!ii($(this)[0])&&(t.space.zero_g_lab.count++,t.space.titan_spaceport.support`
                            ${F("tech_operating_base")}
                            ${F("requires_power_support",[Vt().enceladus])}
                            `,reqs:{enceladus:4},path:["truepath"],cost:{Money:e=>js("operating_base",e,75e5,1.3),Furs:e=>js("operating_base",e,5e5,1.3),Adamantite:e=>js("operating_base",e,375e3,1.3),Stanene:e=>js("operating_base",e,75e4,1.3),Mythril:e=>js("operating_base",e,225e3,1.3),Horseshoe:()=>t.race.hooved?4:0},effect(){let e=`
                            ${F("space_used_support",[Vt().enceladus])}
                            `;return e+=`
                            ${F("galaxy_defense_platform_effect",[50])}
                            `,e+=F("plus_max_resource",[aa(4),F("civics_garrison_soldiers")]),t.race.orbit_decayed&&(e+=`
                            ${F("city_hospital_effect",[5*t.tech.medic])}
                            `),e+`
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},support:()=>-1,powered:()=>Is(10),action(){return!!ii($(this)[0])&&(t.space.operating_base.count++,t.space.titan_spaceport.supportjs("munitions_depot",e,5e6,1.22),Iron:e=>js("munitions_depot",e,185e3,1.22),Sheet_Metal:e=>js("munitions_depot",e,1e5,1.22)},effect:()=>`
                            ${F("plus_max_crates",[25])}
                            ${F("plus_max_containers",[25])}
                            `,action(){return!!ii($(this)[0])&&(t.space.munitions_depot.count++,t.resource.Crates.max+=25,t.resource.Containers.max+=25,!0)}}},spc_triton:{info:{name:()=>Vt().triton,desc:()=>F("space_triton_info_desc",[Vt().triton,Di[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(`
                            ${F("space_ground_resist")}
                            `),zs({el:`#${e}resist`,data:t.space.fob,methods:{threat(e,a){let r=t.civic.garrison.wounded-ke();r<0&&(r=0);let i=+(e-we(a,"army",r)).toFixed(0);return i<0?0:i}}}))}},triton_mission:{id:"space-triton_mission",title:()=>F("space_mission_title",[Vt().triton]),desc:()=>F("space_mission_desc",[Vt().triton]),reqs:{outer:2},grant:["triton",1],path:["truepath"],queue_complete:()=>t.tech.triton>=1?0:1,cost:{Helium_3:(e,t)=>+Ht(6e5,!1,t).toFixed(0),Elerium:()=>2500},effect:()=>F("space_triton_mission_effect",[Vt().triton]),action(){return!!ii($(this)[0])&&(ms(F("space_triton_mission_action",[Vt().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:F("space_fob_title"),desc:()=>`
                            ${F("tech_fob")}
                            ${F("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:js("fob",e,25e7,1.1),Copper:e=>(e||0)+(t.space.hasOwnProperty("fob")?t.space.fob.count:0)>=1?0:js("fob",e,8e6,1.1),Uranium:e=>(e||0)+(t.space.hasOwnProperty("fob")?t.space.fob.count:0)>=1?0:js("fob",e,5e4,1.1),Nano_Tube:e=>(e||0)+(t.space.hasOwnProperty("fob")?t.space.fob.count:0)>=1?0:js("fob",e,25e5,1.1),Graphene:e=>(e||0)+(t.space.hasOwnProperty("fob")?t.space.fob.count:0)>=1?0:js("fob",e,3e6,1.1),Sheet_Metal:e=>(e||0)+(t.space.hasOwnProperty("fob")?t.space.fob.count:0)>=1?0:js("fob",e,75e5,1.1),Quantium:e=>(e||0)+(t.space.hasOwnProperty("fob")?t.space.fob.count:0)>=1?0:js("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=ke(),r=ke(!0),i=`
                            ${F("galaxy_defense_platform_effect",[500])}
                            `;i+=F("plus_max_resource",[aa(10),F("civics_garrison_soldiers")]),i+=`
                            ${F("civics_garrison_soldiers")}: ${a} / ${r}
                            `,i+=`
                            ${F("civics_garrison_wounded")}: ${t.civic.garrison?t.civic.garrison.wounded:0}
                            `,i+=`
                            ${F("space_fob_landed",[t.space.fob?t.space.fob.troops:0])}
                            `;let s=+Ht(125,!0,e).toFixed(2);return i+`
                            ${F("requires_power_combo_effect",[$(this)[0].powered(),s,t.resource.Helium_3.name])}
                            `},powered:()=>Is(50),action(){return!!(t.space.fob.count<1&&ii($(this)[0]))&&(t.space.fob.count++,ei($(this)[0]),!0)},post(){2===t.tech.triton&&(t.tech.triton=3,Jr(),Et(),ms(F("space_fob_msg"),"info",!1,["progress"]))}},lander:{id:"space-lander",title:F("space_lander_title"),desc:()=>`
                            ${F("space_lander_title")}
                            ${F("requires_soldiers")}
                            ${F("space_red_space_barracks_desc_req")}
                            `,reqs:{triton:3},path:["truepath"],cost:{Money:e=>js("lander",e,24e5,1.15),Aluminium:e=>js("lander",e,185e3,1.15),Neutronium:e=>js("lander",e,1e4,1.15),Nano_Tube:e=>js("lander",e,158e3,1.15)},powered:()=>Is(1),effect(e){let a=+Ht(50,!0,e).toFixed(2),r="";return t.space.crashed_ship&&100===t.space.crashed_ship.count&&(r=`
                            ${F("space_lander_effect3",[xe("lander"),t.resource.Cipher.name])}
                            `),`
                            ${F("space_lander_effect",[Vt().triton])}
                            ${r}
                            ${F("space_lander_effect2",[aa(3)])}
                            ${F("space_red_space_barracks_effect2",[a])}
                            `},action(){return!!ii($(this)[0])&&(t.space.lander.count++,t.space.lander.on++,!0)}},crashed_ship:{id:"space-crashed_ship",title:F("space_crashed_ship_title"),desc:()=>`
                            ${F("space_crashed_ship_title")}
                            `,reqs:{triton:3},path:["truepath"],queue_complete:()=>0,cost:{},effect:()=>`
                            ${F("space_crashed_ship_effect",[t.space.crashed_ship?t.space.crashed_ship.count:0])}
                            `,action:()=>!1}},spc_kuiper:{info:{name:()=>F("space_kuiper_title"),desc:()=>F("space_kuiper_desc"),zone:"outer",syndicate:()=>!!t.tech.kuiper,syndicate_cap:()=>2500},kuiper_mission:{id:"space-kuiper_mission",title:()=>F("space_mission_title",[F("space_kuiper_title")]),desc:()=>F("space_mission_desc",[F("space_kuiper_title")]),reqs:{outer:7},grant:["kuiper",1],path:["truepath"],queue_complete:()=>t.tech.kuiper>=1?0:1,cost:{Helium_3:(e,t)=>+Ht(1e6,!1,t).toFixed(0),Elerium:()=>1e3},effect:()=>F("space_kuiper_mission_effect"),action(){return!!ii($(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,ms(F("space_kuiper_mission_action"),"info",!1,["progress"]),!0)}},orichalcum_mine:{id:"space-orichalcum_mine",title:()=>F("space_kuiper_mine",[t.resource.Orichalcum.name]),desc:()=>`
                            ${F("space_kuiper_mine",[t.resource.Orichalcum.name])}
                            ${F("requires_power_combo",[t.resource.Oil.name])}
                            `,reqs:{kuiper:1},path:["truepath"],cost:{Money:e=>js("orichalcum_mine",e,25e6,1.25),Graphene:e=>js("orichalcum_mine",e,9e5,1.25),Elerium:e=>js("orichalcum_mine",e,200,1.25),Mythril:e=>js("orichalcum_mine",e,45e4,1.25),Quantium:e=>js("orichalcum_mine",e,15e4,1.25)},effect(e){let a=+xe("orichalcum_mine").toFixed(3),r=+Ht($(this)[0].p_fuel().a,!0,e).toFixed(1);return`
                            ${F("gain",[a,F("resource_Orichalcum_name")])}
                            ${F("requires_power_combo_effect",[$(this)[0].powered(),r,t.resource[$(this)[0].p_fuel().r].name])}
                            `},powered:()=>Is(10),p_fuel:()=>({r:"Oil",a:200}),action(){return!!ii($(this)[0])&&(t.space.orichalcum_mine.count++,t.resource.Orichalcum.display=!0,ei($(this)[0]),!0)}},uranium_mine:{id:"space-uranium_mine",title:()=>F("space_kuiper_mine",[t.resource.Uranium.name]),desc:()=>`
                            ${F("space_kuiper_mine",[t.resource.Uranium.name])}
                            ${F("requires_power_combo",[t.resource.Oil.name])}
                            `,reqs:{kuiper:1},path:["truepath"],cost:{Money:e=>js("uranium_mine",e,5e6,1.25),Iridium:e=>js("uranium_mine",e,25e4,1.25),Steel:e=>js("uranium_mine",e,62e4,1.25)},effect(e){let a=+xe("uranium_mine").toFixed(3),r=+Ht($(this)[0].p_fuel().a,!0,e).toFixed(1);return`
                            ${F("gain",[a,F("resource_Uranium_name")])}
                            ${F("requires_power_combo_effect",[$(this)[0].powered(),r,t.resource[$(this)[0].p_fuel().r].name])}
                            `},powered:()=>Is(5),p_fuel:()=>({r:"Oil",a:60}),action(){return!!ii($(this)[0])&&(t.space.uranium_mine.count++,ei($(this)[0]),!0)}},neutronium_mine:{id:"space-neutronium_mine",title:()=>F("space_kuiper_mine",[t.resource.Neutronium.name]),desc:()=>`
                            ${F("space_kuiper_mine",[t.resource.Neutronium.name])}
                            ${F("requires_power_combo",[t.resource.Oil.name])}
                            `,reqs:{kuiper:1},path:["truepath"],cost:{Money:e=>js("neutronium_mine",e,8e6,1.25),Adamantite:e=>js("neutronium_mine",e,65e4,1.25),Stanene:e=>js("neutronium_mine",e,125e4,1.25)},effect(e){let a=+xe("neutronium_mine").toFixed(3),r=+Ht($(this)[0].p_fuel().a,!0,e).toFixed(1);return`
                            ${F("gain",[a,F("resource_Neutronium_name")])}
                            ${F("requires_power_combo_effect",[$(this)[0].powered(),r,t.resource[$(this)[0].p_fuel().r].name])}
                            `},powered:()=>Is(8),p_fuel:()=>({r:"Oil",a:60}),action(){return!!ii($(this)[0])&&(t.space.neutronium_mine.count++,ei($(this)[0]),!0)}},elerium_mine:{id:"space-elerium_mine",title:()=>F("space_kuiper_mine",[t.resource.Elerium.name]),desc:()=>`
                            ${F("space_kuiper_mine",[t.resource.Elerium.name])}
                            ${F("requires_power_combo",[t.resource.Oil.name])}
                            `,reqs:{kuiper:2},path:["truepath"],cost:{Money:e=>js("elerium_mine",e,2e7,1.25),Titanium:e=>js("elerium_mine",e,25e4,1.25),Neutronium:e=>js("elerium_mine",e,12e4,1.25),Orichalcum:e=>js("elerium_mine",e,175e3,1.25)},effect(e){let a=+xe("elerium_mine").toFixed(3),r=+Ht($(this)[0].p_fuel().a,!0,e).toFixed(1);return`
                            ${F("gain",[a,F("resource_Elerium_name")])}
                            ${F("requires_power_combo_effect",[$(this)[0].powered(),r,t.resource[$(this)[0].p_fuel().r].name])}
                            `},powered:()=>Is(12),p_fuel:()=>({r:"Oil",a:125}),action(){return!!ii($(this)[0])&&(t.space.elerium_mine.count++,ei($(this)[0]),!0)}}},spc_eris:{info:{name:()=>Vt().eris,desc:()=>F("space_eris_info_desc",[Vt().eris]),support:"drone_control",zone:"outer",syndicate:()=>!!t.tech.eris,syndicate_cap:()=>7500,extra(e){t.tech.eris&&1===t.tech.eris&&($(`#${e}`).append(`
                            ${F("space_scanned")} {{ eris_scan }}%
                            `),zs({el:`#${e}scanned`,data:t.tech}))}},eris_mission:{id:"space-eris_mission",title:()=>F("space_mission_title",[Vt().eris]),desc:()=>F("space_mission_desc",[Vt().eris]),reqs:{outer:7},grant:["eris",1],path:["truepath"],queue_complete:()=>t.tech.eris>=1?0:1,cost:{Helium_3:(e,t)=>+Ht(125e4,!1,t).toFixed(0),Elerium:()=>1250},effect:()=>F("space_eris_mission_effect",[Vt().eris]),action(){return!!ii($(this)[0])&&(t.space.syndicate.spc_eris=4e3,ms(F("space_eris_mission_action",[Vt().eris]),"info",!1,["progress"]),!0)}},drone_control:{id:"space-drone_control",title:()=>F("space_drone_control",[Vt().titan]),desc(){return`
                            ${F("space_drone_control",[Vt().titan])}
                            ${F("requires_power_combo",[t.resource[$(this)[0].p_fuel().r].name])}
                            `},reqs:{eris:3},path:["truepath"],cost:{Money:e=>js("drone_control",e,75e6,1.3),Neutronium:e=>js("drone_control",e,1e5,1.3),Stanene:e=>js("drone_control",e,45e4,1.3),Quantium:e=>js("drone_control",e,3e5,1.3)},effect(){let e=$(this)[0].p_fuel().a;return`
                            +${F("galaxy_alien2_support",[$(this)[0].support(),Vt().eris])}
                            ${F("requires_power_combo_effect",[$(this)[0].powered(),e,t.resource[$(this)[0].p_fuel().r].name])}
                            `},support:()=>5,powered:()=>Is(25),p_fuel:()=>({r:"Uranium",a:5}),action(){return!!ii($(this)[0])&&(t.space.drone_control.count++,ei($(this)[0]),!0)}},shock_trooper:{id:"space-shock_trooper",title:F("space_shock_trooper_title"),desc:()=>`
                            ${F("space_shock_trooper_title")}
                            ${F("space_support",[Vt().eris])}
                            `,reqs:{eris:3},path:["truepath"],cost:{Money:e=>js("shock_trooper",e,425e4,1.225),Polymer:e=>js("shock_trooper",e,375e3,1.225),Adamantite:e=>js("shock_trooper",e,5e5,1.225),Graphene:e=>js("shock_trooper",e,22e4,1.225),Elerium:e=>js("shock_trooper",e,350,1.225)},effect(){let e=Math.round(we(1,"army",0)*_t("spc_eris")),a=`
                            ${F("space_used_support",[Vt().eris])}
                            `;return t.space.digsite&&100===t.space.digsite.count&&(a=`
                            ${F("space_lander_effect3",[xe("shock_trooper"),t.resource.Cipher.name])}
                            `),a+`
                            ${F("space_digsite_offense",[e])}
                            `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(t.space.shock_trooper.count++,t.space.drone_control.support`
                            ${F("space_tank_title")}
                            ${F("space_support",[Vt().eris])}
                            `,reqs:{eris:4},path:["truepath"],cost:{Money:e=>js("tank",e,1e8,1.25),Alloy:e=>js("tank",e,125e4,1.25),Orichalcum:e=>js("tank",e,6e5,1.25),Mythril:e=>js("tank",e,5e5,1.25),Uranium:e=>js("tank",e,25e3,1.25)},effect(){let e=Math.round(100*_t("spc_eris")),a=`
                            ${F("space_used_support",[Vt().eris])}
                            `;return t.space.digsite&&100===t.space.digsite.count&&(a=`
                            ${F("space_lander_effect3",[xe("tank"),t.resource.Cipher.name])}
                            `),a+`
                            ${F("space_digsite_offense",[e])}
                            `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(t.space.tank.count++,t.space.drone_control.support`
                            ${F("space_digsite_title")}
                            `,reqs:{eris:3},path:["truepath"],queue_complete:()=>0,cost:{},effect:()=>`
                            ${F("space_crashed_ship_effect",[t.space.digsite?t.space.digsite.count:0])}
                            `,action:()=>!1}}},He={tau_star:{info:{name:()=>F("tab_tauceti"),desc:()=>F("tau_star",[F("tab_tauceti"),F("space_sun_info_name")])},ringworld:{id:"tauceti-ringworld",title:F("tau_star_ringworld"),desc:e=>!t.tauceti.hasOwnProperty("ringworld")||t.tauceti.ringworld.count<1e3||e?`
                            ${F("tau_star_ringworld")}
                            ${F("requires_segmemts",[1e3])}
                            `:`
                            ${F("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?We(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+=`
                            ${F("tau_star_ringworld_effect")}
                            `,a+=`
                            ${F("space_dwarf_collider_effect2",[e])}
                            `}else a+=`
                            ${F("space_dwarf_reactor_effect1",[t.race.lone_survivor?100:1e4])}
                            `;return a},action(){return!!(ii($(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}),Ze(),ds()),!0)}},matrix:{id:"tauceti-matrix",title:F("tau_star_matrix"),desc:()=>`
                            ${F("tau_star_matrix")}
                            ${F("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=s.matrix?4:3,Ze()}),250):(t.tech.matrix=3,Ze())},effect(){let e=Ue(),t=$(this)[0].powered(),a=t>0?`
                            ${F("minus_power",[t])}
                            `:"";return`
                            ${F("tau_star_matrix_effect")}
                            ${e}${a}`},action:()=>!1},blue_pill:{id:"tauceti-blue_pill",title:F("tau_star_blue_pill"),desc:F("tau_star_blue_pill"),wiki:!1,reqs:{matrix:4},queue_complete:()=>0,no_multi:!0,cost:{},effect(){let e=Ue();return`
                            ${F("tau_star_blue_pill_effect")}
                            ${e}`},action(){if(ii($(this)[0])){$("body").append('');const a=document.getElementById("matrix"),r=a.getContext("2d"),i=a.width=document.body.offsetWidth,s=a.height=document.body.offsetHeight,n=Math.floor(i/20)+1,c=Array(n).fill(0);function o(){r.fillStyle="#0001",r.fillRect(0,0,i,s),r.fillStyle="#0f0",r.font="15pt monospace",c.forEach(((e,t)=>{const a=String.fromCharCode(Math.rand(65382,65438)),i=20*t;r.fillText(a,i,e),e>100+1e4*Math.random()?c[t]=0:c[t]=e+20}))}return setInterval(o,50),setTimeout((function(){!function(){j.w&&j.w.terminate(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),M(),$s("reset",{end:"matrix"});let a=t.race.species,r=t.race.gods,i=Di[a].type,s=t.city.calendar.orbit,n=t.city.biome,c=t.city.ptrait,o=t.city.geology,l=Ns("matrix");Pn(`biome_${n}`),c.forEach((function(e){ns.hasOwnProperty(e)&&Pn(`atmo_${e}`)})),Pn(`genus_${i}`),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&Pn("gross"),Pn("bluepill"),V(),Cn(),t.stats.matrix++,sn(),"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 _=!!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),_&&(t.race.srace=_),U({orbit:s,biome:n,ptrait:c,geology:o}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}()}),5e3),!0}return!1}},goe_facility:{id:"tauceti-goe_facility",title:F("tau_star_goe_facility"),desc:()=>`
                            ${F("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=Ns("eden"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name");return`
                            ${F("interstellar_ascension_trigger_effect2",[e.plasmid,a])}
                            ${F("interstellar_ascension_trigger_effect2",[e.phage,F("resource_Phage_name")])}
                            ${F("tau_star_matrix_servants",[1])}
                            `}();return`
                            ${F("tau_star_goe_facility_effect")}
                            ${e}`},action(){if(ii($(this)[0])){let a=Rs(He.tau_star.goe_facility);return Object.keys(a).forEach((function(e){t.resource[e].amount+=a[e]()})),function(){j.w&&j.w.terminate(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),M(),$s("reset",{end:"eden"});let a=t.race.species,r=t.race.gods,i=Di[a].type,s=t.city.calendar.orbit,n=t.city.biome,c=t.city.ptrait,o=t.city.geology,l=Ns("eden");Pn(`biome_${n}`),c.forEach((function(e){ns.hasOwnProperty(e)&&Pn(`atmo_${e}`)})),Pn(`genus_${i}`),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&Pn("gross"),Pn("adam_eve"),V(),Cn(),t.stats.eden++,sn(),"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 _=!!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),_&&(t.race.srace=_),U({orbit:s,biome:n,ptrait:c,geology:o}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}(),!1}return!1}}},tau_home:{info:{name:()=>F("tau_planet",[Di[t.race.species].home]),desc:()=>F("tau_home",[Di[t.race.species].home]),support:"orbital_station",extra(e){t.tech.tau_home&&t.tech.tau_home>=2&&!Je()&&($(`#${e}`).append(`
                            ${F("resource_Materials_name")} {{ amount | round }} / {{ max }}
                            `),zs({el:`#${e}Mats`,data:t.resource.Materials,methods:{tauShow:()=>!Je()},filters:{round:e=>+e.toFixed(0)}}))}},home_mission:{id:"tauceti-home_mission",title:()=>F("tau_new_mission_title",[Di[t.race.species].home]),desc:()=>F("tau_new_mission_title",[Di[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:()=>F("tau_new_mission_effect",[Di[t.race.species].home]),action(){return!!ii($(this)[0])&&(t.tauceti.colony={count:0,on:0},t.tauceti.mining_pit={count:0,on:0},ms(F("tau_home_mission_result",[Di[t.race.species].home]),"info",!1,["progress"]),!0)}},dismantle:{id:"tauceti-dismantle",title:()=>F("tau_home_dismantle"),desc:()=>F("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 F("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&&ii($(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>=He.tau_home.orbital_station.powered()){t.tauceti.orbital_station.on++,t.tauceti.colony.on++,t.tauceti.mining_pit.on++;let e=aa(4);t.civic[t.civic.d_job].workers${F("tau_home_orbital_station")}
                            ${F("requires_power")}
                            `,reqs:{tau_home:2},path:["truepath"],cost:{Money:e=>js("orbital_station",e,8e7,1.3,"tauceti"),Materials:e=>Je()?0:js("orbital_station",e,5e5,1.3,"tauceti"),Helium_3:e=>Je()?js("orbital_station",e,Ut(25e4),1.3,"tauceti"):0,Copper:e=>Je()?js("orbital_station",e,125e4,1.3,"tauceti"):0,Adamantite:e=>Je()?js("orbital_station",e,9e5,1.3,"tauceti"):0},effect(){let e=wr(15e3),a=+Ut($(this)[0].support_fuel().a).toFixed(1),r=`
                            ${F("space_red_spaceport_effect1",[F("tau_planet",[Di[t.race.species].home]),$(this)[0].support()])}
                            `;return r+=`
                            ${F("plus_max_resource",[e.toLocaleString(),t.resource.Helium_3.name])}
                            `,r+=`
                            ${F("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:()=>Is(t.tech.isolation?t.race.lone_survivor?4:6:30),refresh:!0,action(){return!!ii($(this)[0])&&(t.tauceti.orbital_station.count++,ei($(this)[0]),!0)}},colony:{id:"tauceti-colony",title:F("tau_home_colony"),desc:()=>`
                            ${F("tau_home_colony_desc",[Di[t.race.species].home])}
                            ${F("requires_power_support_combo",[Di[t.race.species].home,t.resource.Food.name])}
                            `,reqs:{tau_home:2},path:["truepath"],cost:{Money:e=>js("colony",e,1575e4,1.225,"tauceti"),Materials:e=>Je()?0:js("colony",e,65e4,1.225,"tauceti"),Furs:e=>Je()?js("colony",e,72e4,1.225,"tauceti"):0,Graphene:e=>Je()?js("colony",e,485e3,1.225,"tauceti"):0,Brick:e=>Je()?js("colony",e,We(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),i=`
                            ${F("tau_new_support",[$(this)[0].support(),Di[t.race.species].home])}
                            `;if(t.race.lone_survivor||(i+=`
                            ${F("plus_max_citizens",[e])}
                            `),t.tech.isolation){let e=25*wi();e=wr(e),e=(+e.toFixed(0)).toLocaleString(),i+=`
                            ${F("plus_max_resource",[`$${e}`,F("resource_Money_name")])}
                            `}if(i+=`
                            ${F("tau_home_colony_effect",[50,Di[t.race.species].home])}
                            `,t.tech.isolation){let e=D("gaslighter",0);i+=`
                            ${F("space_red_vr_center_effect1",[2*(e?e+t.tech.broadcast:t.tech.broadcast)])}
                            `}return i+=`
                            ${F("plus_max_resource",[a,F("resource_Crates_name")])}
                            ${F("plus_max_resource",[a,F("resource_Containers_name")])}
                            `,t.race.lone_survivor?i+=`
                            ${F("gain",[-r,t.resource[$(this)[0].support_fuel().r].name])}
                            `:i+=`
                            ${F("spend",[r,t.resource[$(this)[0].support_fuel().r].name])}
                            `,i},support:()=>-2,support_fuel:()=>({r:"Food",a:t.tech.isolation?t.race.lone_survivor?-2:75:1e3}),powered:()=>Is(1),action(){return!!ii($(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*=Ki.high_pop.vars()[0]),t.race.lone_survivor?0:e}},tau_housing:{id:"tauceti-tau_housing",title:()=>ui("small"),desc:F("city_basic_housing_desc"),desc(){return 1===$(this)[0].citizens()?F("city_basic_housing_desc"):F("city_basic_housing_desc_plural",[$(this)[0].citizens()])},category:"residential",reqs:{housing:1,isolation:1},condition:()=>!t.race.lone_survivor,cost:{Money:e=>js("tau_housing",e,15e4,1.15,"tauceti"),Lumber:e=>t.race.kindling_kindred||t.race.smoldering?0:js("tau_housing",e,125e3,1.25,"tauceti"),Stone:e=>t.race.kindling_kindred?js("tau_housing",e,125e3,1.25,"tauceti"):0,Chrysotile:e=>t.race.smoldering?js("tau_housing",e,5e4,1.25,"tauceti"):0,Horseshoe:()=>t.race.hooved?1:0},effect(){let e=$(this)[0].citizens();return t.race.sappy?`
                            ${F("plus_max_resource",[e,F("citizen")])}
                            ${F("city_grove_effect",[2.5])}
                            `:F("plus_max_resource",[e,F("citizen")])},action(){return!!ii($(this)[0])&&(t.tauceti.tau_housing.count++,!0)},citizens(){let e=1;return t.race.high_pop&&(e*=Ki.high_pop.vars()[0]),e}},captive_housing:zr("captive_housing","tauceti"),pylon:{id:"tauceti-pylon",title:F("tau_home_pylon"),desc:F("tau_home_pylon"),reqs:{magic:2},condition:()=>!(!t.tech.isolation||!t.tauceti.hasOwnProperty("pylon")),cost:{Money:e=>js("pylon",e,50,1.48,"tauceti"),Stone:e=>js("pylon",e,100,1.42,"tauceti"),Crystal:e=>js("pylon",e,8,1.42,"tauceti")-3},effect(){let e=wr(2);return`
                            ${F("gain",[+(.0125*Ts("magic")).toFixed(3),t.resource.Mana.name])}
                            ${F("plus_max_resource",[e,t.resource.Mana.name])}
                            `},special:()=>!!(t.tech.magic&&t.tech.magic>=3),action(){return!!ii($(this)[0])&&(t.tauceti.pylon.count++,t.resource.Mana.max+=wr(2),!0)}},cloning_facility:{id:"tauceti-cloning_facility",title:F("tau_home_cloning"),desc:()=>F("tau_home_cloning_desc",[Di[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?js("citizen",e,Math.round((t.race.high_pop?1e5:125e3)/aa(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?js("citizen",e,Math.round(50/aa(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?js("citizen",e,Math.round(50/aa(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?js("citizen",e,Math.round(500/aa(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=`
                            ${F("city_assembly_effect_warn")}
                            `),`
                            ${F("tau_home_cloning_effect",[Di[t.race.species].name])}
                            ${e}`},action(){return!!(t.resource[t.race.species].max>t.resource[t.race.species].amount&&ii($(this)[0]))&&(t.resource[t.race.species].amount++,!0)}},horseshoe:zr("horseshoe","tauceti"),bonfire:zr("bonfire","tauceti"),firework:zr("firework","tauceti"),assembly:zr("assembly","tauceti"),nanite_factory:zr("nanite_factory","tauceti"),tau_farm:{id:"tauceti-tau_farm",title:F("tau_home_tau_farm"),desc:()=>`
                            ${F("tau_home_tau_farm")}
                            ${F("requires_power")}
                            `,reqs:{tau_home:7},path:["truepath"],cost:{Money:e=>js("tau_farm",e,135e6,1.25,"tauceti"),Stone:e=>js("tau_farm",e,921e4,1.25,"tauceti"),Steel:e=>js("tau_farm",e,6295e3,1.25,"tauceti"),Water:e=>js("tau_farm",e,1e4,1.25,"tauceti")},effect(){let e=`
                            ${F("space_red_spaceport_effect1",[F("tau_planet",[Di[t.race.species].home]),$(this)[0].support()])}
                            `;return e+=`
                            ${F("produce",[+xe("tau_farm","food").toFixed(2),t.resource.Food.name])}
                            `,t.race.kindling_kindred||t.race.smoldering||(e+=`
                            ${F("produce",[+xe("tau_farm","lumber").toFixed(2),t.resource.Lumber.name])}
                            `),t.tech.isolation&&(e+=`
                            ${F("produce",[+xe("tau_farm","water").toFixed(2),t.resource.Water.name])}
                            `,t.race.artifical&&(e+=`
                            ${F("city_transmitter_effect",[wr(350)])}
                            `)),e+=`
                            ${F("minus_power",[$(this)[0].powered()])}
                            `,e},support:()=>1,powered:()=>As(t.tech.isolation?1:4),action(){return!!ii($(this)[0])&&(t.tauceti.tau_farm.count++,ei($(this)[0]),!0)}},mining_pit:{id:"tauceti-mining_pit",title:F("tau_home_mining_pit"),desc:()=>`
                            ${F("tau_home_mining_pit")}
                            ${F("space_support",[Di[t.race.species].home])}
                            `,reqs:{tau_home:2},path:["truepath"],cost:{Money:e=>js("mining_pit",e,425e4,1.225,"tauceti"),Materials:e=>Je()?0:js("mining_pit",e,35e4,1.225,"tauceti"),Lumber:e=>Je()?js("mining_pit",e,235e4,1.225,"tauceti"):0,Iron:e=>Je()?js("mining_pit",e,835e3,1.225,"tauceti"):0},effect(){let e=`
                            ${F("tau_new_support",[$(this)[0].support(),Di[t.race.species].home])}
                            `;if(e+=`
                            ${F("plus_max_resource",[aa(t.tech.isolation?6:8),F("job_pit_miner")])}
                            `,Je())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+=`
                            ${F("tau_home_mining_pit_effect2cs",a)}
                            `):e+=`
                            ${F("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+=`
                            ${F("tau_home_mining_pit_effect2bs",a)}
                            `):e+=`
                            ${F("tau_home_mining_pit_effect2b",a)}
                            `}e+=`
                            ${F("tau_gas_womling_station_effect",[8,t.resource.Cement.name])}
                            `}else e+=`
                            ${F("tau_home_mining_pit_effect2",[t.resource.Bolognium.name,t.resource.Adamantite.name,t.resource.Stone.name])}
                            `;else e+=`
                            ${F("plus_max_resource",[1e6,F("resource_Materials_name")])}
                            `,e+=`
                            ${F("tau_home_mining_pit_effect",[t.resource.Materials.name])}
                            `;return e},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(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:F("tau_home_excavate"),desc:()=>`
                            ${F("tau_home_excavate")}
                            `,reqs:{tau_home:2},grant:["tau_home",3],path:["truepath"],cost:{Money:e=>165e7,Materials:e=>75e4},effect:()=>F("tau_home_excavate_effect"),action(){return!!ii($(this)[0])&&(ms(F("tau_home_excavate_msg"),"info",!1,["progress"]),!0)}},alien_outpost:{id:"tauceti-alien_outpost",title:F("tech_alien_outpost"),desc:()=>`
                            ${F("tech_alien_outpost")}
                            ${F("requires_power")}
                            `,reqs:{tau_home:4},path:["truepath"],cost:{},queue_complete:()=>0,effect(){let e=`
                            ${F("plus_max_resource",["20%",F("resource_Knowledge_name")])}
                            `;return t.tech.isolation&&(e+=`
                            ${F("plus_max_resource",[(t.race.lone_survivor?35e5:65e5).toLocaleString(),F("resource_Knowledge_name")])}
                            `,e+=`
                            ${F("plus_max_resource",[2e5.toLocaleString(),t.resource.Cipher.name])}
                            `,e+=`
                            ${F("space_lander_effect3",[xe("alien_outpost"),t.resource.Cipher.name])}
                            `),t.tech.outpost_boost&&(e+=`
                            ${F("tech_alien_outpost_effect2")}
                            `),t.race.lone_survivor&&(e+=`
                            ${F("city_wardenclyffe_effect1",[aa(1),t.civic.professor.name])}
                            `),e+=`
                            ${F("minus_power",[$(this)[0].powered()])}
                            `,e},powered:()=>Is(t.tech.isolation?t.race.lone_survivor?8:25:100),special:()=>!!t.tech.replicator,action:()=>!1},jump_gate:{id:"tauceti-jump_gate",title:F("tau_jump_gate"),desc:e=>!t.tauceti.hasOwnProperty("jump_gate")||t.tauceti.jump_gate.count<100||e?`
                            ${F("tau_jump_gate")}
                            ${F("requires_segmemts",[100])}
                            `:`
                            ${F("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`
                            ${F("tau_jump_gate_effect")}
                            ${F("space_dwarf_collider_effect2",[e])}
                            `}return F("tau_jump_gate_effect")},action(){return!!(ii($(this)[0])&&t.tauceti.jump_gate.count<100)&&(t.tauceti.jump_gate.count++,!0)}},fusion_generator:{id:"tauceti-fusion_generator",title:F("tech_fusion_generator"),desc:()=>`
                            ${F("tech_fusion_generator")}
                            ${F("requires_res",[t.resource.Helium_3.name])}
                            `,reqs:{tau_home:6},path:["truepath"],cost:{Money:e=>js("fusion_generator",e,188e6,1.25,"tauceti"),Iridium:e=>js("fusion_generator",e,555e4,1.25,"tauceti"),Stanene:e=>js("fusion_generator",e,7003500,1.25,"tauceti"),Sheet_Metal:e=>js("fusion_generator",e,We(95e3),1.25,"tauceti")},effect(){let e=+Ut($(this)[0].p_fuel().a).toFixed(1),a=`
                            ${F("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}
                            `;return t.race.lone_survivor?a+=`
                            ${F("gain",[-e,t.resource[$(this)[0].p_fuel().r].name])}
                            `:a+=`
                            ${F("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:()=>As(-32),action(){return!!ii($(this)[0])&&(t.tauceti.fusion_generator.count++,t.tauceti.fusion_generator.on++,!0)}},repository:{id:"tauceti-repository",title:F("tech_repository"),desc:F("tech_repository"),reqs:{tau_home:5},path:["truepath"],cost:{Money:e=>js("repository",e,1028e4,1.28,"tauceti"),Iron:e=>js("repository",e,18e5,1.28,"tauceti"),Cement:e=>js("repository",e,15e5,1.28,"tauceti"),Neutronium:e=>js("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=gt("repository");for(const r of $(this)[0].res())t.resource[r].display&&(e+=`${F("plus_max_resource",[q(+(wr($(this)[0].val(r))*a).toFixed(0),1),t.resource[r].name])}`);return t.tech.isolation&&(e+=`${F("plus_max_resource",[250,F("resource_Crates_name")])}${F("plus_max_resource",[250,F("resource_Containers_name")])}`),e+="
                            ",e},action(){if(ii($(this)[0])){t.tauceti.repository.count++;let e=gt("repository");for(const a of $(this)[0].res())t.resource[a].display&&(t.resource[a].max+=wr($(this)[0].val(a))*e);return!0}return!1}},tau_factory:{id:"tauceti-tau_factory",title:F("tau_home_tau_factory"),desc:()=>`
                            ${F("tau_home_tau_factory")}
                            ${F("requires_power_support",[Di[t.race.species].home])}
                            `,reqs:{tau_home:8},path:["truepath"],cost:{Money:e=>js("tau_factory",e,269e6,1.25,"tauceti"),Titanium:e=>js("tau_factory",e,3e6,1.25,"tauceti"),Elerium:e=>js("tau_factory",e,850,1.25,"tauceti"),Bolognium:e=>js("tau_factory",e,25e4,1.25,"tauceti"),Quantium:e=>js("tau_factory",e,We(425e3),1.25,"tauceti")},effect(){let e=`
                            ${F("tau_new_support",[$(this)[0].support(),Di[t.race.species].home])}
                            `;return e+=`
                            ${F("tau_home_tau_factory_effect",[t.tech.isolation?5:3])}
                            `,t.tech.isolation&&(t.race.flier||(e+=`
                            ${F("city_cement_plant_effect1",[aa(2)])}
                            `),e+=`
                            ${F("space_red_fabrication_effect1",[aa(5)])}
                            `),e+=`
                            ${F("city_crafted_mats",[t.tech.isolation?275:90])}
                            `,e+=`
                            ${F("minus_power",[$(this)[0].powered()])}
                            `,e},special:!0,support:()=>-1,powered:()=>Is(t.tech.isolation?2:5),action(){return!!ii($(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?F("tech_infectious_disease_lab_alt"):F(t.race.artifical?"tech_infectious_disease_lab_s":"tech_infectious_disease_lab"),desc(){return`
                            ${$(this)[0].title()}
                            ${F("requires_power_support",[Di[t.race.species].home])}
                            `},reqs:{disease:1},path:["truepath"],cost:{Money:e=>js("infectious_disease_lab",e,1e9,1.25,"tauceti"),Alloy:e=>js("infectious_disease_lab",e,325e5,1.25,"tauceti"),Polymer:e=>js("infectious_disease_lab",e,5e7,1.25,"tauceti"),Bolognium:e=>js("infectious_disease_lab",e,25e5,1.25,"tauceti"),Unobtainium:e=>js("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=`
                            ${F("tau_new_support",[$(this)[0].support(),Di[t.race.species].home])}
                            `;return a+=`
                            ${F("city_max_knowledge",[Math.round(e).toLocaleString()])}
                            `,t.tech.isolation&&(a+=`
                            ${F("plus_max_resource",[wr(375),F("resource_Elerium_name")])}
                            `,a+=`
                            ${F("city_wardenclyffe_effect1",[aa(2),t.civic.professor.name])}
                            `,a+=`
                            ${F("city_wardenclyffe_effect1",[aa(1),t.civic.scientist.name])}
                            `,a+=`
                            ${F("space_zero_g_lab_effect",[aa(1)])}
                            `,a+=`
                            ${F("city_library_effect",[75])}
                            `),t.tech.alien_crafting&&(a+=`
                            ${F("tau_gas_womling_station_effect",[65,t.resource.Quantium.name])}
                            `),t.tech.focus_cure&&(a+=`
                            ${F("tau_home_disease_lab_cure",[+t.tauceti.infectious_disease_lab.cure.toFixed(1)])}
                            `,t.race.hasOwnProperty("vax")&&(a+=`
                            ${F("tau_home_disease_lab_vax",[+t.race.vax.toFixed(2)])}
                            `)),a+=`
                            ${F("minus_power",[$(this)[0].powered()])}
                            `,a},support:()=>-1,powered:()=>Is(t.tech.isolation?t.race.lone_survivor?2:8:35),action(){return!!ii($(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,ms(F("tau_plague4",[F("tab_tauceti")]),"info",!1,["progress"]),Jr())}},tauceti_casino:{id:"tauceti-tauceti_casino",title:F("city_casino"),desc:F("city_casino"),category:"commercial",reqs:{gambling:1,isolation:1},cost:{Money:e=>js("tauceti_casino",e,145e4,1.35,"tauceti"),Furs:e=>js("tauceti_casino",e,95e3,1.35,"tauceti"),Cement:e=>js("tauceti_casino",e,12e4,1.35,"tauceti"),Plywood:e=>js("tauceti_casino",e,We(55e3),1.35,"tauceti")},effect(){let e=$(this)[0].citizens(),a=t.race.lone_survivor?"":`
                            ${F("plus_max_resource",[e,F("citizen")])}
                            `;return a+=Dr(),a+=`
                            ${F("minus_power",[$(this)[0].powered()])}
                            `,a},powered:()=>Is(t.race.lone_survivor?1:2),action(){return!!ii($(this)[0])&&(t.tauceti.tauceti_casino.count++,t.race.joyless||(t.civic.entertainer.max+=aa(1),t.civic.entertainer.display=!0),ei($(this)[0]),!0)},citizens(){let e=1;return t.race.high_pop&&(e*=Ki.high_pop.vars()[0]),t.race.lone_survivor?0:e},flair:F("city_casino_flair")},tau_cultural_center:{id:"tauceti-tau_cultural_center",title:F("tech_cultural_center"),desc(){return`
                            ${F("tech_cultural_center")}
                            ${F("space_electrolysis_req",[t.resource[$(this)[0].p_fuel().r].name])}
                            `},category:"commercial",reqs:{tau_culture:1},path:["truepath"],cost:{Money:e=>js("tau_cultural_center",e,9145e4,1.35,"tauceti"),Copper:e=>js("tau_cultural_center",e,585e4,1.35,"tauceti"),Coal:e=>js("tau_cultural_center",e,465e3,1.35,"tauceti"),Polymer:e=>js("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,i=15*e,s=`
                            ${F("tau_home_cultureal_effect1",[$(this)[0].p_fuel().a,t.resource[$(this)[0].p_fuel().r].name,$(this)[0].title])}
                            `;return s+=`
                            ${F("city_tourist_center_effect3",[a])}
                            `,s+=`
                            ${F("city_tourist_center_effect4",[r])}
                            `,s+=`
                            ${F("tau_home_cultureal_effect2",[8,F("tau_red_womlings")])}
                            `,t.tech.tau_culture>=2&&(s+=`
                            ${F("tau_home_cultureal_effect3",[i,F(`tau_gas2_alien_station_data2_r${t.race.tau_food_item||0}`)])}
                            `),s+=`
                            ${F("minus_power",[$(this)[0].powered()])}
                            `,s},powered:()=>Is(1),p_fuel:()=>({r:"Food",a:t.race.lone_survivor?25:500}),action(){return!!ii($(this)[0])&&(t.tauceti.tau_cultural_center.count++,t.tauceti.tau_cultural_center.on++,!0)}}},tau_red:{info:{name:()=>F("tau_planet",[Vt().red]),desc:()=>F("tau_red",[Vt().red]),support:"orbital_platform",extra(e){t.tech.tau_red&&t.tech.tau_red>=5&&($(`#${e}`).append(`
                            ${F("tau_red_womling_prod")} {{ prod }}%
                            `),zs({el:`#${e}Womlings`,data:t.tauceti.overseer}))}},red_mission:{id:"tauceti-red_mission",title:()=>F("tau_new_mission_title",[Vt().red]),desc:()=>F("tau_new_mission_title",[Vt().red]),reqs:{tauceti:2},grant:["tau_red",1],path:["truepath"],queue_complete:()=>t.tech.tau_red>=1?0:1,cost:{Money:()=>1e9},effect:()=>F("tau_new_mission_effect",[Vt().red]),action(){return!!ii($(this)[0])&&(t.tauceti.settlement={count:0,on:0},ms(F("tau_red_mission_result",[Vt().red]),"info",!1,["progress"]),!0)}},orbital_platform:{id:"tauceti-orbital_platform",title:F("tau_red_orbital_platform"),desc:`
                            ${F("tau_red_orbital_platform")}
                            ${F("requires_power")}
                            `,reqs:{tau_red:1,tauceti:4},path:["truepath"],cost:{Money:e=>js("orbital_platform",e,5e7,1.3,"tauceti"),Oil:e=>{return Je()?js("orbital_platform",e,Ut((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=>js("orbital_platform",e,178e4,1.3,"tauceti"),Bolognium:e=>js("orbital_platform",e,45e4,1.3,"tauceti")},effect(){let e=wr(17500),a=+Ut($(this)[0].support_fuel().a).toFixed(1),r=`
                            ${F("space_red_spaceport_effect1",[F("tau_planet",[Vt().red]),$(this)[0].support()])}
                            `;return r+=`
                            ${F("plus_max_resource",[e.toLocaleString(),t.resource.Oil.name])}
                            `,r+=`
                            ${F("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:()=>Is(t.tech.isolation?t.race.lone_survivor?2:3:18),refresh:!0,action(){return!(!Je()||!ii($(this)[0])||(t.tauceti.orbital_platform.count++,ei($(this)[0]),1===t.tech.tau_red&&(t.tech.tau_red=2,ms(F("tau_red_orbital_platform_msg",[F("tau_planet",[Vt().red]),F("tau_planet",[Di[t.race.species].home])]),"info",!1,["progress"])),0))}},contact:{id:"tauceti-contact",title:()=>F("tau_red_contact"),desc:()=>F("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:()=>F("tau_red_contact_effect"),action(){return!!ii($(this)[0])&&(t.race.womling_friend=1,Ve(),!0)}},introduce:{id:"tauceti-introduce",title:()=>F("tau_red_introduce"),desc:()=>F("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:()=>F("tau_red_introduce_effect"),action(){return!!ii($(this)[0])&&(t.race.womling_god=1,Ve(),!0)}},subjugate:{id:"tauceti-subjugate",title:()=>F("tau_red_subjugate"),desc:()=>F("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:()=>F("tau_red_subjugate_effect"),action(){return!!ii($(this)[0])&&(t.race.womling_lord=1,Ve(),!0)}},jeff:{id:"tauceti-jeff",title:()=>F("tau_red_jeff"),desc:()=>F("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${F("tau_red_jeff_effect1",[t.tauceti.overseer?t.tauceti.overseer.pop:0])}
                            `;return a+=`
                            ${F("tau_red_jeff_effect2",[t.tauceti.overseer?t.tauceti.overseer.working:0])}
                            `,a+=`
                            ${F("tau_red_jeff_effect3",[e])}
                            `,a+=`
                            ${F("tau_red_jeff_effect4",[t.tauceti.overseer?t.tauceti.overseer.loyal:0])}
                            `,a+=`
                            ${F("tau_red_jeff_effect5",[t.tauceti.overseer?t.tauceti.overseer.morale:0])}
                            `,t.tech.hasOwnProperty("womling_tech")&&(a+=`
                            ${F("tau_red_jeff_effect6",[t.tech.womling_tech])}
                            `),a+=`
                            ${F("job_farmer")}: ${t.tauceti.womling_farm?t.tauceti.womling_farm.farmers:0}
                            `,a+=`
                            ${F("job_miner")}: ${t.tauceti.womling_mine?t.tauceti.womling_mine.miners:0}
                            `,t.tauceti.womling_lab&&(a+=`
                            ${F("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()}
                            ${F("space_support",[Vt().red])}
                            `},name:()=>t.race.womling_lord?F("tau_red_overseer"):t.race.womling_god?F("tau_red_womgod"):F("tau_red_womally"),reqs:{tau_red:5},path:["truepath"],cost:{Money:e=>js("overseer",e,6e6,1.28,"tauceti"),Cement:e=>js("overseer",e,245e4,1.28,"tauceti"),Alloy:e=>t.race.womling_friend?js("overseer",e,185e4,1.28,"tauceti"):0,Neutronium:e=>t.race.womling_lord?js("overseer",e,165e3,1.28,"tauceti"):0,Titanium:e=>t.race.womling_god?js("overseer",e,225e4,1.28,"tauceti"):0},effect(){let e=`
                            ${F("tau_new_support",[$(this)[0].support(),Vt().red])}
                            `;return e+=`
                            ${F("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:()=>Is(1),action(){return!!ii($(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:F("tau_red_womling_village"),desc:()=>`
                            ${F("tau_red_womling_village")}
                            ${F("space_support",[Vt().red])}
                            `,reqs:{tau_red:5},path:["truepath"],cost:{Money:e=>js("womling_village",e,1e7,1.28,"tauceti"),Stone:e=>js("womling_village",e,225e4,1.28,"tauceti"),Plywood:e=>js("womling_village",e,We(125e4),1.28,"tauceti"),Wrought_Iron:e=>js("womling_village",e,We(4e5),1.28,"tauceti")},effect(){let e=t.tech.womling_pop&&t.tech.womling_pop>=2?6:5,a=`
                            ${F("tau_new_support",[$(this)[0].support(),Vt().red])}
                            `;return a+=`
                            ${F("tau_red_womling_village_effect",[e])}
                            `,t.tech.tau_junksale&&(a+=`
                            ${F("tau_red_womling_village_effect2",[40,F(`tau_gas2_alien_station_data4_r${t.race.tau_junk_item||0}`)])}
                            `),a},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(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:F("tau_red_womling_farm"),desc:()=>`
                            ${F("tau_red_womling_farm")}
                            ${F("space_support",[Vt().red])}
                            `,reqs:{tau_red:5},path:["truepath"],cost:{Money:e=>js("womling_farm",e,24e6,1.28,"tauceti"),Iron:e=>js("womling_farm",e,95e5,1.28,"tauceti"),Water:e=>js("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=`
                            ${F("tau_new_support",[$(this)[0].support(),Vt().red])}
                            `;return r+=`
                            ${F("tau_red_womling_farm_effect",[e])}
                            `,r+=`
                            ${F("tau_red_womling_employ",[2])}
                            `,t.tech.isolation&&(r+=`
                            ${F("tau_red_womling_generate",[t.resource.Furs.name])}
                            `),r+=`
                            ${F("tau_red_womling_farm_effect2",[e/2*a])}
                            `,r},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(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:F("tau_red_womling_mine"),desc:()=>`
                            ${F("tau_red_womling_mine")}
                            ${F("space_support",[Vt().red])}
                            `,reqs:{tau_red:5},path:["truepath"],cost:{Money:e=>js("womling_mine",e,125e5,1.28,"tauceti"),Lumber:e=>js("womling_mine",e,128e5,1.28,"tauceti"),Steel:e=>js("womling_mine",e,45e5,1.28,"tauceti")},effect(){let e=`
                            ${F("tau_new_support",[$(this)[0].support(),Vt().red])}
                            `;return t.tech.isolation?t.race.lone_survivor?e+=`
                            ${F("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+=`
                            ${F("tau_red_womling_mine_effect_b",[t.resource.Unobtainium.name,t.resource.Uranium.name,t.resource.Titanium.name])}
                            `:e+=`
                            ${F("tau_red_womling_mine_effect_a",[t.resource.Unobtainium.name])}
                            `,e+=`
                            ${F("tau_red_womling_employ",[6])}
                            `,e},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(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:()=>F("tau_red_womling_mine_flair")},womling_fun:{id:"tauceti-womling_fun",title(){return $(this)[0].name()},desc(){return`
                            ${$(this)[0].name()}
                            ${F("space_support",[Vt().red])}
                            `},name:()=>t.race.womling_lord?F("tau_red_womling_fun1"):t.race.womling_god?F("tau_red_womling_fun2"):F("tau_red_womling_fun3"),reqs:{tau_red:6},path:["truepath"],cost:{Money:e=>js("womling_fun",e,38e5,1.28,"tauceti"),Food:e=>t.race.womling_friend?js("womling_fun",e,175e3,1.28,"tauceti"):0,Lumber:e=>js("womling_fun",e,5e5,1.28,"tauceti"),Stone:e=>js("womling_fun",e,5e5,1.28,"tauceti"),Furs:e=>t.race.womling_lord||t.race.womling_god?js("womling_fun",e,835e3,1.28,"tauceti"):0,Copper:e=>t.race.womling_lord?js("womling_fun",e,1125e3,1.28,"tauceti"):0,Alloy:e=>t.race.womling_god?js("womling_fun",e,656e3,1.28,"tauceti"):0,Water:e=>t.race.womling_friend?js("womling_fun",e,3500,1.28,"tauceti"):0},effect(){let e=`
                            ${F("tau_new_support",[$(this)[0].support(),Vt().red])}
                            `;return e+=`
                            ${F("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:()=>Is(1),action(){return!!ii($(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:F("interstellar_laboratory_title"),desc:()=>`
                            ${F("interstellar_laboratory_title")}
                            ${F("space_support",[Vt().red])}
                            `,reqs:{tau_red:7},path:["truepath"],cost:{Money:e=>js("womling_lab",e,65e6,1.28,"tauceti"),Elerium:e=>js("womling_lab",e,1200,1.28,"tauceti"),Orichalcum:e=>js("womling_lab",e,25e5,1.28,"tauceti"),Unobtainium:e=>js("womling_lab",e,1e4,1.28,"tauceti"),Quantium:e=>js("womling_lab",e,We(95e3),1.28,"tauceti")},effect(){let e=t.tauceti.hasOwnProperty("overseer")?t.tauceti.overseer.prod:100,a=Math.round(25e3*e/100),r=`
                            ${F("tau_new_support",[$(this)[0].support(),Vt().red])}
                            `;return r+=`
                            ${F("tau_red_womling_lab_effect",[a])}
                            `,r+=`
                            ${F("tau_red_womling_employ_single",[1])}
                            `,r},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(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",i="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]+i)%3){case 1:return F("tau_planet",[Vt().gas]);case 2:return F("tau_gas_title0a",[Vt().gas]);default:return F("tau_gas_title0b",[Vt().gas])}}case 2:switch(Math.round(t.stats.reset+i)%3){case 1:return F("tau_gas_title1a");case 2:return F("tau_gas_title1b");default:return F("tau_gas_title1c")}case 3:switch(Math.round(t.stats.mad+i)%3){case 1:return F("tau_gas_title2a");case 2:return F("tau_gas_title2b");default:return F("tau_gas_title2c")}case 4:switch(Math.round(t.stats.bioseed+i)%3){case 1:return F("tau_gas_title3a",[Di[t.race.gods].solar.gas]);case 2:return F("tau_gas_title3b",[Di[t.race.old_gods].name]);default:return F("tau_gas_title3c",[Di[t.race.species].name])}case 5:switch(Math.round(t.stats.portals+i)%3){case 1:return F("tau_gas_title4a",[Vt().gas]);case 2:return F("tau_gas_title4b",[cn("reverse",Vt().gas)]);default:return F("tau_gas_title4c")}case 6:switch(Math.round(t.stats.womling.friend.l+t.stats.womling.lord.l+t.stats.womling.god.l+i)%3){case 1:return F("tau_gas_title5a");case 2:return F("tau_gas_title5b");default:return F("tau_gas_title5c")}case 7:switch(Math.round(t.stats.tdays+i)%3){case 1:return F("tau_gas_title6a");case 2:return F("tau_gas_title6b");default:return F("tau_gas_title6c")}default:return F("gas_name"===r?"tau_gas_title":"tau_gas2_title")}return F("gas_name"===r?"tau_gas_title":"tau_gas2_title")},desc:()=>F("tau_gas_desc")},gas_contest:{id:"tauceti-gas_contest",title:()=>F("tau_gas_contest_title"),desc:()=>F("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?F("tau_gas_contest_effect_alt"):F("tau_gas_contest_effect"),action(){return!!ii($(this)[0])}},refueling_station:{id:"tauceti-refueling_station",title:()=>F("tau_gas_refueling_station_title"),desc:()=>`
                            ${F("tau_gas_refueling_station_title")}
                            ${F("requires_power")}
                            `,reqs:{tau_gas:2},path:["truepath"],cost:{Money:e=>js("refueling_station",e,68e6,1.28,"tauceti"),Graphene:e=>js("refueling_station",e,25e5,1.28,"tauceti"),Unobtainium:e=>js("refueling_station",e,5500,1.28,"tauceti"),Mythril:e=>js("refueling_station",e,We(6e4),1.28,"tauceti")},powered:()=>Is(t.tech.isolation?2:5),effect(){let e=+xe("refueling_station").toFixed(2),a=wr(1e4),r=`
                            ${F("space_gas_mining_effect1",[e])}
                            `;return r+=`
                            ${F("plus_max_resource",[a.toLocaleString(),t.resource.Helium_3.name])}
                            `,t.tech.tau_whale>=2&&(r+=`
                            ${F("plus_max_resource",[wr(6500).toLocaleString(),t.resource.Oil.name])}
                            `),t.tech.isolation&&(r+=`
                            ${F("interstellar_g_factory_effect")}
                            `),r+=`
                            ${F("minus_power",[$(this)[0].powered()])}
                            `,r},special:()=>!!t.tech.isolation,action(){return!!ii($(this)[0])&&(t.tauceti.refueling_station.count++,ei($(this)[0]),!0)},post(){2===t.tech.tau_gas&&(t.tech.tau_gas=3,Jr())}},ore_refinery:{id:"tauceti-ore_refinery",title:()=>F("tau_gas_ore_refinery_title"),desc:()=>`
                            ${F("tau_gas_ore_refinery_title")}
                            ${F("requires_power")}
                            `,reqs:{tau_gas:4},path:["truepath"],cost:{Money:e=>js("ore_refinery",e,52e6,1.28,"tauceti"),Iridium:e=>js("ore_refinery",e,16e5,1.28,"tauceti"),Unobtainium:e=>js("ore_refinery",e,800,1.28,"tauceti"),Sheet_Metal:e=>js("ore_refinery",e,We(118e3),1.28,"tauceti")},powered:()=>Is(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=+xe("ore_refinery").toFixed(2),i=`
                            ${F("tau_gas_ore_refinery_effect",[+e.toFixed(2)])}
                            `;return i+=`
                            ${F("tau_gas_ore_refinery_effect2",[a])}
                            `,i+=`
                            ${F("tau_gas_ore_refinery_effect3",[r])}
                            `,i+=`
                            ${F("interstellar_stellar_forge_effect3",[t.tech.isolation?12:4])}
                            `,i+=`
                            ${F("minus_power",[$(this)[0].powered()])}
                            `,i},special:!0,action(){return!!ii($(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,Ze(),Jr())}},whaling_station:{id:"tauceti-whaling_station",title:()=>F("tau_gas_whaling_station_title"),desc:()=>`
                            ${F("tau_gas_whaling_station_title")}
                            ${F("requires_power")}
                            `,reqs:{tau_whale:1},path:["truepath"],cost:{Money:e=>js("whaling_station",e,72e6,1.28,"tauceti"),Steel:e=>js("whaling_station",e,18e5,1.28,"tauceti"),Polymer:e=>js("whaling_station",e,955e3,1.28,"tauceti"),Orichalcum:e=>js("whaling_station",e,268e3,1.28,"tauceti")},powered:()=>Is(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=+xe("whaling_station").toFixed(2),i=`
                            ${F("tau_gas_whaling_station_effect",[+e.toFixed(2)])}
                            `;return i+=`
                            ${F("tau_gas_whaling_station_effect2",[a])}
                            `,i+=`
                            ${F("tau_gas_whaling_station_effect3",[r])}
                            `,i+=`
                            ${F("minus_power",[$(this)[0].powered()])}
                            `,i},action(){return!!ii($(this)[0])&&(t.tauceti.whaling_station.count++,ei($(this)[0]),!0)},post(){1===t.tech.tau_whale&&(t.tech.tau_whale=2,Ze())}},womling_station:{id:"tauceti-womling_station",title:()=>F("tau_gas_womling_station_title"),desc:()=>`
                            ${F("tau_gas_womling_station_desc")}
                            ${F("requires_power")}
                            `,reqs:{womling_technicians:1},path:["truepath"],cost:{Money:e=>js("womling_station",e,1334e5,1.26,"tauceti"),Furs:e=>js("womling_station",e,3805e3,1.26,"tauceti"),Aluminium:e=>js("womling_station",e,85e5,1.26,"tauceti"),Nano_Tube:e=>js("womling_station",e,909e3,1.26,"tauceti")},powered:()=>Is(t.tech.isolation?3:6),effect(){let e=t.tech.isolation?30:8;t.tech.womling_gene&&(e*=1.25);let a=`
                            ${F("tau_gas_womling_station_effect",[e,He.tau_gas.info.name()])}
                            `;return t.race.flier||(a+=`
                            ${F("city_cement_plant_effect1",[aa(1)])}
                            `),a+=`
                            ${F("space_red_fabrication_effect1",[aa(1)])}
                            `,a+=`
                            ${F("minus_power",[$(this)[0].powered()])}
                            `,a},action(){return!!ii($(this)[0])&&(t.tauceti.womling_station.count++,ei($(this)[0]),!0)}}},tau_roid:{info:{name:()=>F("tau_roid_title"),desc:()=>F("tau_roid_desc"),support:"patrol_ship"},roid_mission:{id:"tauceti-roid_mission",title:()=>F("space_mission_title",[F("tau_roid_title")]),desc:()=>F("space_mission_desc",[F("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)=>+Ut(125e4).toFixed(0)},effect:()=>F("tau_roid_mission_effect",[F("tau_roid_title")]),action(){return!!ii($(this)[0])&&(ms(F("tau_roid_mission_result"),"info",!1,["progress"]),!0)}},patrol_ship:{id:"tauceti-patrol_ship",title:F("tau_roid_patrol_ship"),desc:()=>`
                            ${F("tau_roid_patrol_ship")}
                            ${F("requires_res",[t.resource.Helium_3.name])}
                            `,reqs:{tau_roid:3},path:["truepath"],cost:{Money:e=>js("patrol_ship",e,45e6,1.25,"tauceti"),Adamantite:e=>js("patrol_ship",e,18e5,1.25,"tauceti"),Elerium:e=>js("patrol_ship",e,520,1.25,"tauceti"),Stanene:e=>js("patrol_ship",e,2675e3,1.25,"tauceti"),Bolognium:e=>js("patrol_ship",e,115e4,1.25,"tauceti")},effect(){let e=+Ut($(this)[0].support_fuel().a).toFixed(1),a=`
                            ${F("tau_roid_patrol_ship_security",[$(this)[0].support()])}
                            `;return a+=`
                            ${F("tau_roid_patrol_ship_effect")}
                            `,a+=`
                            ${F("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:()=>Is(1),refresh:!0,action(){return!!ii($(this)[0])&&(t.tauceti.patrol_ship.count++,t.tauceti.patrol_ship.on++,!0)}},mining_ship:{id:"tauceti-mining_ship",title:F("tau_roid_mining_ship"),desc:()=>`
                            ${F("tau_roid_mining_ship")}
                            `,reqs:{tau_roid:4},path:["truepath"],cost:{Money:e=>js("mining_ship",e,28e6,1.28,"tauceti"),Uranium:e=>js("mining_ship",e,12500,1.28,"tauceti"),Titanium:e=>js("mining_ship",e,22e5,1.28,"tauceti"),Alloy:e=>js("mining_ship",e,175e4,1.28,"tauceti")},effect(){let e=+Ut($(this)[0].support_fuel().a).toFixed(1),a=`
                            ${F("tau_roid_mining_ship_effect",[+xe("mining_ship").toFixed(2)])}
                            `;return a+=`
                            ${F("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:()=>Is(1),special:!0,action(){return!!ii($(this)[0])&&(t.tauceti.mining_ship.count++,t.tauceti.mining_ship.on++,!0)}},whaling_ship:{id:"tauceti-whaling_ship",title:F("tau_roid_whaling_ship"),desc:()=>`
                            ${F("tau_roid_whaling_ship")}
                            `,reqs:{tau_whale:2},path:["truepath"],cost:{Money:e=>js("whaling_ship",e,35e6,1.28,"tauceti"),Aluminium:e=>js("whaling_ship",e,34e5,1.28,"tauceti"),Neutronium:e=>js("whaling_ship",e,168e3,1.28,"tauceti"),Nano_Tube:e=>js("whaling_ship",e,8e5,1.28,"tauceti")},effect(){let e=+Ut($(this)[0].support_fuel().a).toFixed(1),a=`
                            ${F("tau_roid_whaling_ship_effect",[+xe("whaling_ship").toFixed(2)])}
                            `;return a+=`
                            ${F("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:()=>Is(1),action(){return!!ii($(this)[0])&&(t.tauceti.whaling_ship.count++,t.tauceti.whaling_ship.on++,!0)}}},tau_gas2:{info:{name:e=>He.tau_gas.info.name(e||t.race.gas_name2||!1,"gas_name2"),desc:()=>F("tau_gas2_desc",[He.tau_gas.info.name()])},gas_contest2:{id:"tauceti-gas_contest2",title:()=>F("tau_gas2_contest_title"),desc:()=>F("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:()=>F("tau_gas2_contest_effect"),action(){return!!ii($(this)[0])},flair:()=>F("tau_gas2_contest_flair")},alien_station_survey:{id:"tauceti-alien_station_survey",title:F("tau_gas2_alien_station"),desc:F("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:()=>F("tau_gas2_alien_station_repair_effect",[He.tau_gas2.info.name()]),action(){return!!ii($(this)[0])&&(t.tauceti.alien_station={count:0},ms(F("tau_gas2_alien_station_msg",[He.tau_gas2.info.name()]),"info",!1,["progress"]),!0)}},alien_station:{id:"tauceti-alien_station",title:F("tau_gas2_alien_station"),desc:e=>!t.tauceti.hasOwnProperty("alien_station")||t.tauceti.alien_station.count<100||e?`
                            ${F("tau_gas2_alien_station")}
                            `+(t.tauceti.hasOwnProperty("alien_station")&&t.tauceti.alien_station.count>=100?`
                            ${F("space_dwarf_reactor_desc_req")}
                            `:`
                            ${F("tau_gas2_alien_station_repair")}
                            `):`
                            ${F("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?We(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+=`
                            ${F("tau_gas2_alien_station_repaired",[r])}
                            `,a):He.tau_gas2.alien_space_station.effect(e)},action(){return!!(ii($(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),Ze()}},alien_space_station:{id:"tauceti-alien_space_station",title:F("tau_gas2_alien_station"),desc:()=>`
                            ${F("tau_gas2_alien_station")}
                            ${F("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=`
                            ${F("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+=`
                            ${F("tau_gas2_alien_station_effect",[r])}
                            `}return a+=`
                            ${F("spend",[e,t.resource[$(this)[0].p_fuel().r].name])}
                            `,a},p_fuel:()=>({r:"Elerium",a:t.race.lone_survivor?1:10}),powered:()=>As(-75),action:()=>!1},matrioshka_brain:{id:"tauceti-matrioshka_brain",title:F("tech_matrioshka_brain"),desc:e=>!t.tauceti.hasOwnProperty("matrioshka_brain")||t.tauceti.matrioshka_brain.count<1e3||e?`
                            ${F("tech_matrioshka_brain")}
                            ${F("requires_segmemts",[1e3])}
                            `:`
                            ${F("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?We(64e3):0},effect(e){let a="",r=(e||0)+(t.tauceti.hasOwnProperty("matrioshka_brain")?t.tauceti.matrioshka_brain.count:0);return r<1e3&&(a+=`
                            ${F("tau_gas2_matrioshka_brain_seg",[1e3-r])}
                            `),a},action(){return!!(ii($(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:F("tech_ignition_device"),desc:e=>!t.tauceti.hasOwnProperty("ignition_device")||t.tauceti.ignition_device.count<10||e?`
                            ${F("tech_ignition_device")}
                            ${F("requires_segmemts",[10])}
                            `:`
                            ${F("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?We(8e6):0},effect(e){let a="",r=(e||0)+(t.tauceti.hasOwnProperty("ignition_device")?t.tauceti.ignition_device.count:0);return r<10&&(a+=`
                            ${F("tau_gas2_ignition_device_seg",[10-r])}
                            `),a},action(){return!!(ii($(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:()=>F("tau_gas2_ignite_gas_giant",[He.tau_gas2.info.name()]),desc:()=>F("tau_gas2_ignite_gas_giant",[He.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=`
                            ${F("tau_gas2_ignite_gas_giant_effect",[F("tech_matrioshka_brain")])}
                            `;return t.tech.m_brain?(e+=`
                            ${F("tau_gas2_ignite_gas_giant_effect3")}
                            `,e+=function(){let e=Ns("retire"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name"),r=t.stats.retire+1===t.stats.matrix?`
                            ${F("tau_star_matrix_skilled",[1])}
                            `:"";return`
                            ${F("interstellar_ascension_trigger_effect2",[e.plasmid,a])}
                            ${F("interstellar_ascension_trigger_effect2",[e.phage,F("resource_Phage_name")])}
                            ${F("tau_star_matrix_servants",[1])}
                            ${r}`}()):e+=`
                            ${F("tau_gas2_ignite_gas_giant_effect2",[F("tech_matrioshka_brain")])}
                            `,e},action(){return!(!t.tech.m_brain||!ii($(this)[0])||(function(){j.w&&j.w.terminate(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),M(),$s("reset",{end:"retire"});let a=t.race.species,r=t.race.gods,i=Di[a].type,s=t.city.calendar.orbit,n=t.city.biome,c=t.city.ptrait,o=t.city.geology,l=Ns("retire");Pn(`biome_${n}`),c.forEach((function(e){ns.hasOwnProperty(e)&&Pn(`atmo_${e}`)})),Pn(`genus_${i}`),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&Pn("gross"),Pn("retired"),V(),Cn(),t.stats.retire++,sn(),"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 _=!!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),_&&(t.race.srace=_),U({orbit:s,biome:n,ptrait:c,geology:o}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}(),0))}}}};for(let e=1;e<9;e++)He.tau_gas[`gas_contest-a${e}`]={id:`tauceti-gas_contest-a${e}`,title:()=>He.tau_gas.info.name(e),desc:()=>He.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:()=>F(8===e?"tau_gas_contest_reject":"tau_gas_contest_pick",[He.tau_gas.info.name(e)]),action(){return!!ii($(this)[0])&&(t.race.gas_name=e,t.tauceti.refueling_station={count:0,on:0},!0)}},He.tau_gas2[`gas_contest-b${e}`]={id:`tauceti-gas_contest-b${e}`,title:()=>He.tau_gas2.info.name(e),desc:()=>He.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:()=>F(8===e?"tau_gas2_contest_reject":"tau_gas_contest_pick",[He.tau_gas2.info.name(e)]),action(){return!!ii($(this)[0])&&(t.race.gas_name2=e,!0)}};function Ue(){let e=Ns("matrix"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name"),r=t.stats.retire===t.stats.matrix+1?`
                            ${F("tau_star_matrix_skilled",[1])}
                            `:"";return`
                            ${F("interstellar_ascension_trigger_effect2",[e.plasmid,a])}
                            ${F("interstellar_ascension_trigger_effect2",[e.phage,F("resource_Phage_name")])}
                            ${F("tau_star_matrix_servants",[1])}
                            ${r}`}function Ve(){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 We(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 Qe(){return Re}function Je(){return!!(t.tech.tauceti&&t.tech.tauceti>=4)}function Ze(){if(!t.settings.tabLoad&&(1!==t.settings.civTabs||6!==t.settings.spaceTabs))return;let e=$("#tauceti");Cs(e),e.append($(`

                            ${F("tab_tauceti")}

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

                            ${r}

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

                            ${r}

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

                            ${r}

                            ${i}
                            `);_s(a,(function(){return"string"==typeof He[a].info.desc?He[a].info.desc:He[a].info.desc()}),{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(He[a]).forEach((function(e){"info"!==e&&Lt(He,a,e)&&Xr(He[a][e],"tauceti",e)})),He[a].info.hasOwnProperty("extra")&&He[a].info.extra(a)}}))}function Xe(){if((t.settings.tabLoad||2===t.settings.civTabs&&5===t.settings.govTabs)&&(ut(),ct(),Cs($("#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:Ye()});let a=$('
                            ');e.append(a);let r=$('
                            ');a.append(r),r.append(`
                            ${F("outer_shipyard_registry")}:
                            `),r.append(`
                            ${F("crew")}
                            `),r.append(`
                            ${F("power")}
                            `),r.append(`
                            ${F("firepower")}
                            `),r.append(`
                            ${F("outer_shipyard_sensors")}
                            `),r.append(`
                            ${F("speed")}
                            `),r.append(`
                            ${F("outer_shipyard_fuel")}
                            `),a.append('
                            ');let i=$('
                            ');a.append(i);let s={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(s).forEach((function(e){let t="";s[e].forEach((function(a,r){t+=`${F(`outer_shipyard_${e}_${a}`)}`})),i.append(`\n ${t}\n `)}));let n=$('
                            ');n.append(``),n.append(`${F("outer_shipyard_fleet_details")}`),n.append(`${F("outer_shipyard_fleet_sort")}`),a.append(n),n.append(`
                            ${F("outer_shipyard_park",[Vt().dwarf])}${F("outer_shipyard_map")}`),et();let c={template:''};zs({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,et()},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:()=>tt(t.space.shipyard.blueprint),powerText(){let e=at(t.space.shipyard.blueprint);return e<0?`${e}kW`:`${e}kW`},fireText:()=>rt(t.space.shipyard.blueprint),sensorText:()=>dt(t.space.shipyard.blueprint)+"km",speedText(){let e=7.695363719135802*it(t.space.shipyard.blueprint);return Math.round(e)+"km/s"},fuelText(){let e=st(t.space.shipyard.blueprint);return e.res?`-${e.burn} ${t.resource[e.res].name}`:"N/A"},build(){if(at(t.space.shipyard.blueprint)>=0){let e=nt(t.space.shipyard.blueprint),a={};if(Object.keys(e).forEach((function(t){a[t]=function(){return e[t]}})),ii(!1,a)){let e=nn(t.space.shipyard.blueprint);e.location="spc_dwarf",e.xy=ht("spc_dwarf"),e.origin=nn(e.xy),e.destination=nn(e.xy),e.transit=0,e.dist=0,e.damage=0,e.fueled=!1,0===e.name.length&&(e.name=Ye());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),ot(),et(),t.space.shipyard.blueprint.name=Ye()}}},trigModal(){this.$buefy.modal.open({parent:this,component:c});let e=setInterval((function(){$("#modalBox").length>0&&(clearInterval(e),$("#modalBox").append($('

                            Solar System

                            ')),function(e){let t=$('
                            ').appendTo(e),a={},r={},i=!1;bt={},yt=20,t.append($('').on("mouseup mouseover mouseout",(()=>i=!1)).on("mousedown",(e=>{i=!0,r.x=e.clientX-bt.x,r.y=e.clientY-bt.y})).on("mousemove",(e=>{i&&(bt.x=e.clientX-r.x,bt.y=e.clientY-r.y,wt())})).on("wheel",(e=>(e.originalEvent.deltaY<0?(yt/=.8,bt.x=a.x+(bt.x-a.x)/.8,bt.y=a.y+(bt.y-a.y)/.8,wt()):(yt*=.8,bt.x=a.x+.8*(bt.x-a.x),bt.y=a.y+.8*(bt.y-a.y),wt()),!1))),$('').on("click",(()=>{yt/=.8,bt.x=a.x+(bt.x-a.x)/.8,bt.y=a.y+(bt.y-a.y)/.8,wt()})),$('').on("click",(()=>{yt*=.8,bt.x=a.x+.8*(bt.x-a.x),bt.y=a.y+.8*(bt.y-a.y),wt()})));let s=document.getElementById("mapCanvas").getBoundingClientRect();a.x=s.width/2,a.y=s.height/2,bt.x=a.x,bt.y=a.y,wt()}($("#modalBox")))}),50)},redraw(){ot()}},filters:{lbl:(e,t)=>F(`outer_shipyard_${t}_${e}`)}}),Object.keys(s).forEach((function(e){for(let t=0;t<$(`#shipPlans .${e}`).length;t++)_s(`shipPlans${e}${t}`,(function(t){let a=$(t.this).attr("data-val");return F(`outer_shipyard_${e}_${a}_desc`)}),{elm:`#shipPlans .${e}.a${t}`,placement:"right"})})),e.append($('
                            ')),ot()}}function Ye(){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 tt(e){switch(e.class){case"corvette":return aa(2);case"frigate":return aa(3);case"destroyer":return aa(4);case"cruiser":return aa(6);case"battlecruiser":return aa(8);case"dreadnought":case"explorer":return aa(10)}}function at(e,t){let a=0,r=1,i=1;switch(e.class){case"frigate":r=1.1,i=1.2;break;case"destroyer":r=1.5,i=1.65;break;case"cruiser":r=2,i=2.5;break;case"battlecruiser":r=2.5,i=3.5;break;case"dreadnought":r=5,i=6.5;break;case"explorer":r=6,i=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(As(a)),e.weapon){case"railgun":a-=Math.round(10*i);break;case"laser":a-=Math.round(30*i);break;case"p_laser":a-=Math.round(18*i);break;case"plasma":a-=Math.round(50*i);break;case"phaser":a-=Math.round(65*i);break;case"disruptor":a-=Math.round(100*i)}switch(e.engine){case"ion":a-=Math.round(25*i);break;case"tie":a-=Math.round(50*i);break;case"pulse":a-=Math.round(40*i);break;case"photon":a-=Math.round(75*i);break;case"vacuum":a-=Math.round(120*i);break;case"emdrive":a-=Math.round(("explorer"===e.class||t?515:1024)*i)}switch(e.sensor){case"radar":a-=Math.round(10*i);break;case"lidar":a-=Math.round(25*i);break;case"quantum":a-=Math.round(75*i)}return a}function rt(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 it(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&&s.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 st(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 nt(e){let a={},r=1,i=1,s=1;switch(e.class){case"corvette":a.Money=25e5,a.Aluminium=5e5,r=1,i=1,s=2;break;case"frigate":a.Money=5e6,a.Aluminium=125e4,r=1.1,i=1.09,s=1.5;break;case"destroyer":a.Money=15e6,a.Aluminium=35e5,r=1.2,i=1.18,s=1.2;break;case"cruiser":a.Money=5e7,a.Adamantite=1e6,r=1.3,i=1.25;break;case"battlecruiser":a.Money=125e6,a.Adamantite=26e5,r=1.35,i=1.3,s=.8;break;case"dreadnought":a.Money=5e8,a.Adamantite=8e6,r=1.4,i=1.35,s=.5;break;case"explorer":a.Money=8e8,a.Adamantite=95e5,r=1.45,i=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**i);break;case"tie":a.Titanium=Math.round(15e4**i);break;case"pulse":a.Titanium=Math.round(125e3**i);break;case"photon":a.Titanium=Math.round(21e4**i);break;case"vacuum":a.Titanium=Math.round(3e5**i);break;case"emdrive":a.Titanium=Math.round(125e4**i)}let n=!!["dreadnought","explorer"].includes(e.class);switch(e.power){case"solar":case"diesel":a[n?"Orichalcum":"Copper"]=Math.round(4e4**r),a.Iridium=Math.round(15e3**i);break;case"fission":a[n?"Orichalcum":"Copper"]=Math.round(5e4**r),a.Iridium=Math.round(3e4**i);break;case"fusion":a[n?"Orichalcum":"Copper"]=Math.round(5e4**r),a.Iridium=Math.round(4e4**i);break;case"elerium":a[n?"Orichalcum":"Copper"]=Math.round(6e4**r),a.Iridium=Math.round(55e3**i)}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 c=0;t.space.shipyard.ships.forEach((function(t){t.class===e.class&&c++}));let o=1+(c-2)/25*s;return Object.keys(a).forEach((function(t){"explorer"===e.class?a[t]=Math.ceil(a[t]*(3*(c+1))):c<2?a[t]=Math.ceil(a[t]*(0===c?.75:.9)):c>2&&(a[t]=Math.ceil(a[t]*o))})),a}function ct(){let e=$("#shipList")[0];if(e){let t=Sortable.get(e);t&&t.destroy()}}function ot(){if(ct(),Cs($("#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=It();for(let r=0;r${e}`}}else Object.keys(a).forEach((function(e){if(i.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();s+=`${t}`}}));let n="tauceti"===i.location?F("tech_era_tauceti"):"string"==typeof a[i.location].info.name?a[i.location].info.name:a[i.location].info.name(),c=`\n ${s}\n `;if(t.space.shipyard.expand){let t=`${F(`outer_shipyard_engine_${i.engine}`)} ${F(`outer_shipyard_class_${i.class}`)}`,a=$(`
                            `),s=$(`
                            ${i.name} | ${F("outer_shipyard_scrap")} | ${t} | ${F(`outer_shipyard_weapon_${i.weapon}`)} | ${F(`outer_shipyard_power_${i.power}`)} | ${F(`outer_shipyard_armor_${i.armor}`)} | ${F(`outer_shipyard_sensor_${i.sensor}`)}
                            `),n=$('
                            '),o=$('
                            '),l=$(`
                            ${c}
                            `);n.append(`${F("crew")} `),n.append(`${F("firepower")} `),n.append(`${F("outer_shipyard_sensors")} `),n.append(`${F("speed")} `),n.append(`${F("outer_shipyard_fuel")} `),n.append(`${F("outer_shipyard_hull")} `),o.append(``),a.append(s),a.append(n),a.append(o),a.append(l),e.append(a)}else{let t=$(`
                            `),a=$('
                            '),s=$('
                            '),n=$(`
                            ${c}
                            `);a.append(`${i.name} | `),a.append(`${F("firepower")} `),a.append(`${F("outer_shipyard_sensors")} `),a.append(`${F("speed")} `),a.append(`${F("outer_shipyard_fuel")} `),a.append(`${F("outer_shipyard_hull")} `),s.append(``),t.append(a),t.append(s),t.append(n),e.append(t)}zs({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),ot(),et())},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 i=tt(r),s=r.transit>0||"spc_dwarf"!==r.location;if(s||t.civic.garrison.workers-t.civic.garrison.crew>=i){let n=lt(r,e),c=mt(r.xy,n),o=it(r);r.location=e,r.transit=Math.round(c/o),r.dist=Math.round(c/o),r.origin=nn(r.xy),r.destination={x:n.x,y:n.y},s||(t.civic.garrison.crew+=i),ot(),ds(`ship${a}loc${e}`)}}},crewText:e=>tt(t.space.shipyard.ships[e]),fireText:e=>rt(t.space.shipyard.ships[e]),sensorText:e=>dt(t.space.shipyard.ships[e])+"km",speedText(e){let a=7.695363719135802*it(t.space.shipyard.ships[e]);return Math.round(a)+"km/s"},fuelText(e){let a=st(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"===i.class?F("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 F("outer_shipyard_arrive",[r,t.space.shipyard.ships[e].transit])},show:e=>t.space.shipyard.ships[e].transit>0}}),"explorer"===i.class?"tauceti"!==i.location&&_s(`ship${r}loctauceti`,(function(){return F("transit_time",[Math.round(mt(i.xy,lt(i,"tauceti"))/it(i))])}),{elm:`#ship${r}loc .tauceti`,placement:"left"}):Object.keys(a).forEach((function(e){(a[e].info.syndicate()||"spc_dwarf"===e)&&i.location!==e&&_s(`ship${r}loc${e}`,(function(){return F("transit_time",[Math.round(mt(i.xy,lt(i,e))/it(i))])}),{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,ot()}})}()}function lt(e,a){if(-2===pt[a].orbit)return ht(a);let r=Math.sqrt((e.xy.x-ft(a))**2+e.xy.y**2),i=it(e)/225,s=vt(1,a),n=Math.abs(r-pt[a].dist),c=Math.abs(r+pt[a].dist),o=Math.abs(r-pt[a].dist*s),l=Math.abs(r+pt[a].dist*s),_=Math.floor(Math.min(n,o,c,l)/i),d=Math.ceil(Math.max(n,o,c,l)/i);r>=pt[a].dist&&r<=pt[a].dist*s&&(_=0);let p=360/(-1===pt[a].orbit?t.city.calendar.orbit:pt[a].orbit),u=(t.space.position[a]+_*p)%360,h=Math.PI/180;for(let t=_;t<=d;t++){let r=vt(Math.cos(u*h)*pt[a].dist,a);r+=ft(a);let s=Math.sin(u*h)*pt[a].dist;if(Math.sqrt((r-e.xy.x)**2+(s-e.xy.y)**2)/i<=t)return{x:r,y:s};u=(u+p)%360}return ht(a)}function _t(e,a){if(!t.tech.isolation&&t.tech.syndicate&&t.race.truepath&&t.space.syndicate&&t.space.syndicate.hasOwnProperty(e)){let r=1e3,i=0;switch(t.civic.foreign.gov3.hstl<10?i=250-25*t.civic.foreign.gov3.hstl:t.civic.foreign.gov3.hstl>60&&(i=-13*(t.civic.foreign.gov3.hstl-60)),e){case"spc_home":case"spc_moon":case"spc_red":case"spc_hell":r=1250+i;break;case"spc_gas":case"spc_gas_moon":case"spc_belt":r=1020+i;break;case"spc_titan":case"spc_enceladus":case"spc_triton":case"spc_kuiper":case"spc_eris":r=Sr.space[e].info.syndicate_cap()}let c=t.space.syndicate[e],o=0,l=0,_=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=rt(t);o+=t.damage>0?Math.round(e*(100-t.damage)/100):e,l+=dt(t)}})),"spc_enceladus"===e&&Math.min(n.operating_base,s.operating_base)>0){let e=Math.min(n.operating_base,s.operating_base);o+=50*e}else"spc_titan"===e&&s.sam>0?o+=25*s.sam:"spc_triton"===e&&s.fob>0&&(o+=500,l+=10);l>100&&(l=Math.round((l-100)/(l-100+200)*100)+100),o=Math.round(o*((l+25)/125)),o>c&&(_=o-c),c=c-o>0?c-o:0}return a?{p:1-+(c/r).toFixed(4),r:c,s:l,o:_}:1-+(c/r).toFixed(4)}return a?{p:1,r:0,s:0,o:0}:1}function dt(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 pt={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 ut(){t.space.position||(t.space.position={}),Object.keys(pt).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 ht(e){let a=vt(+Math.cos(t.space.position[e]*(Math.PI/180)).toFixed(5)*pt[e].dist,e),r=+Math.sin(t.space.position[e]*(Math.PI/180)).toFixed(5)*pt[e].dist;return a+=ft(e),{x:a,y:r}}function mt(e,t){return Math.ceil(225*Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2))}function gt(e,a){let r=1;switch(t.race.pack_rat&&(r*=1+Ki.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":s.titan_spaceport&&(r*=1+.25*s.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 vt(e,a){if(-2!==pt[a].orbit){let r=1.075+pt[a].dist/100;t.city.ptrait.includes("elliptical")&&(r="spc_home"===a?1.5:1.275+pt[a].dist/100),e*=r}return e}function ft(e){if(-2!==pt[e].orbit){let a=pt[e].dist/3;return t.city.ptrait.includes("elliptical")&&"spc_home"===e&&(a+=.15),"spc_eris"===e&&(a+=25),a}return 0}var yt,bt;function wt(){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(bt.x,bt.y),a.scale(yt,yt);let r={};for(let[e,t]of Object.entries(pt))r[e]=ht(e);a.lineWidth=1/yt,a.strokeStyle="#c0c0c0";for(let[e,r]of Object.entries(pt))if(!r.moon&&-2!==r.orbit){a.beginPath(),r.belt||t.race.orbit_decayed&&"spc_home"===e?a.setLineDash([.01,.01]):a.setLineDash([]);let i=ft(e);a.ellipse(i,0,vt(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,i]of Object.entries(pt)){if(t.race.orbit_decayed&&["spc_home","spc_moon"].includes(e))continue;let s="558888";if(Sr.space[e]&&Sr.space[e].info.syndicate()&&t.settings.space[e.substring(4)]){let t=_t(e);s=((Math.round(255*(1-t))<<16)+(Math.round(255*t)<<8)).toString(16).padStart(6,0)}"spc_dwarf"===e?s="7132a8":"spc_sun"!==e&&"tauceti"!==e||(s="f8ff2b"),a.fillStyle="#"+s,a.beginPath();let n=i.size/10;if(i.moon)switch(e){case"spc_moon":a.arc(r[e].x+.05,r[e].y+.05,n,0,2*Math.PI,!0);break;case"spc_titan":a.arc(r[e].x-.2,r[e].y-.2,n,0,2*Math.PI,!0);break;default:a.arc(r[e].x+.2,r[e].y+.2,n,0,2*Math.PI,!0)}else{let t=i.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/yt+"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/yt+"px serif";for(let[e,i]of Object.entries(pt))if(Sr.space[e]&&t.settings.space[e.substring(4)]){if(t.race.orbit_decayed&&["spc_home"].includes(e))continue;let s=Sr.space[e].info.name,n="function"==typeof s?s():s;if(i.moon)switch(e){case"spc_moon":a.fillText(n,r[e].x+.1,r[e].y+.1);break;case"spc_titan":a.fillText(n,r[e].x-.3,r[e].y-.3);break;default:a.fillText(n,r[e].x+.25,r[e].y+.2)}else"spc_sun"===e||a.fillText(n,r[e].x,r[e].y-.2*i.size)}a.restore()}function kt(e){switch(e){case"city":return t.resource[t.race.species]?t.resource[t.race.species].amount<=5?F("tab_city1"):t.resource[t.race.species].amount<=20?F("tab_city2"):t.resource[t.race.species].amount<=75?F("tab_city3"):t.resource[t.race.species].amount<=250?F("tab_city4"):t.resource[t.race.species].amount<=600?F("tab_city5"):t.resource[t.race.species].amount<=1200?F("tab_city6"):t.resource[t.race.species].amount<=2500?F("tab_city7"):F("tab_city8"):F("tab_city1");case"local_space":return F("sol_system",[t.race.truepath?Di[t.race.species].home:cn("name")]);case"outer_local_space":return F("outer_sol_system",[t.race.truepath?Di[t.race.species].home:cn("name")]);case"old":return F("tab_old_res");case"new":return F("tab_new_res");case"old_sr":return F("tab_old_sr_res");case"new_sr":return F("tab_new_sr_res");default:return F(e)}}function $t(e){switch(t.settings.tabLoad?$s("page_view",{page_title:"Evolve - All Tabs"}):(yi(),zi(),ka(),Ee(),K(),ct(),Cs($("#mTabCivil")),Cs($("#mTabCivic")),Cs($("#mTabResearch")),Cs($("#mTabResource")),Cs($("#mTabArpa")),Cs($("#mTabStats")),Cs($("#mTabObserve"))),e){case 0:t.settings.tabLoad||($s("page_view",{page_title:"Evolve - Evolution"}),Lr());break;case 1:case"mTabCivil":t.settings.tabLoad||$s("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 '),zs({el:"#mTabCivil",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(Cs($("#city")),Cs($("#space")),Cs($("#interstellar")),Cs($("#galaxy")),Cs($("#portal")),Cs($("#outerSol")),Cs($("#tauCeti")),e){case 0:Qr();break;case 1:case 2:case 3:case 5:Et();break;case 4:ha();break;case 6:Ze()}return e}},filters:{label:e=>kt(e)}}),"protoplasm"!==t.race.species&&(Qr(),Et(),ha(),Ze()),t.race.noexport&&("Race"===t.race.noexport?(Cs($("#city")),Jt()):"Planet"===t.race.noexport&&(Cs($("#city")),Zt()));break;case 2:case"mTabCivic":t.settings.tabLoad||$s("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 '),zs({el:"#mTabCivic",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(zi(),K(),ka(),ct(),Cs($("#civic")),Cs($("#industry")),Cs($("#powerGrid")),Cs($("#military")),Cs($("#mechLab")),Cs($("#dwarfShipYard")),Cs($("#psychicPowers")),e){case 0:$("#civic").append($('
                            ')),ea(),$("#civics").append($('
                            ')),W(),"protoplasm"===t.race.species||t.race.start_cataclysm||(J(),me($("#c_garrison"),!1),ae()),t.race.shapeshifter&&es(!1,!0);break;case 1:$i();break;case 2:Object.keys(Ci()).forEach((function(e){hs(e)})),Si();break;case 3:"protoplasm"===t.race.species||t.race.start_cataclysm||(Q(),ga($("#fortress"),!1));break;case 4:"protoplasm"===t.race.species||t.race.start_cataclysm||ba();break;case 5:t.race.truepath&&"protoplasm"!==t.race.species&&!t.race.start_cataclysm&&Xe();break;case 6:t.race.psychic&&t.tech.psychic&&"protoplasm"!==t.race.species&&os()}return e}},filters:{label:e=>kt(e)}}),Object.keys(Ci()).forEach((function(e){hs(e)})),Si(),$("#civic").append($('
                            ')),ea(),$("#civics").append($('
                            ')),W(),"protoplasm"===t.race.species||t.race.start_cataclysm||(Q(),me($("#c_garrison"),!1),ga($("#fortress"),!1),ae(),ba(),t.race.truepath&&Xe(),t.race.psychic&&t.tech.psychic&&os()),t.race.shapeshifter&&es(!1,!0),$i();break;case 3:case"mTabResearch":t.settings.tabLoad||$s("page_view",{page_title:"Evolve - Research"}),$("#mTabResearch").append('
                            \n \n \n \n \n \n \n \n '),zs({el:"#mTabResearch",data:{s:t.settings,rq:t.r_queue},filters:{label:e=>kt(e)}}),fi(),"protoplasm"!==t.race.species&&Jr();break;case 4:case"mTabResource":t.settings.tabLoad||$s("page_view",{page_title:"Evolve - Resources"}),$("#mTabResource").append('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),zs({el:"#mTabResource",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(Cs($("#market")),Cs($("#resStorage")),Cs($("#resEjector")),Cs($("#resCargo")),Cs($("#resAlchemy")),e){case 0:Da("market");break;case 1:Da("storage");break;case 2:Da("ejector");break;case 3:Da("supply");break;case 4:Da("alchemy")}return e}},filters:{label:e=>kt(e)}}),Ka(),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let r=a.resource[e].color,i=a.resource[e].tradable;if(a.resource[e].stackable){var s=$(`
                            `);$("#resStorage").append(s),tr(`#stack-${e}`,s,e,r)}i&&(s=$(`
                            `),$("#market").append(s),Wa(`#market-${e}`,s,e,r,!0)),Aa[e]&&gr(e,r),Ia[e]&&fr(e,r),Fa[e]&&"magic"===t.race.universe&&(t.resource[e].basic=i,br(e,r,i))})),Ga();break;case 5:case"mTabArpa":t.settings.tabLoad||$s("page_view",{page_title:"Evolve - Arpa"}),$("#mTabArpa").append(`
                            \n \n \n \n \n \n \n
                            `),zs({el:"#mTabArpa",data:{s:t.settings},filters:{label:e=>kt(e)}}),qe("Physics"),qe("Genetics"),qe("Crispr"),qe("Blood");break;case 6:case"mTabStats":t.settings.tabLoad||$s("page_view",{page_title:"Evolve - Stats"}),$("#mTabStats").append('\n \n \n \n \n \n \n \n \n \n '),zs({el:"#mTabStats",data:{s:t.settings},filters:{label:e=>kt(e)}}),function(){Cs($("#achieve")),Cs($("#stats"));let e=$('
                            ');$("#stats").append(e);let a=$('
                            ');$("#perks").append(a);let r=$('
                            ');$("#achieve").append(r),function(){Cs($("#statsPanel"));let e=$("#statsPanel");if(e.append(`
                            ${F("achieve_stats_overall")}
                            `),e.append(`
                            ${F("achieve_stats_plasmid_earned")} {{ s.plasmid | format }}
                            `),t.stats.antiplasmid>0&&e.append(`
                            ${F("achieve_stats_antiplasmid_earned")} {{ s.antiplasmid | format }}
                            `),t.stats.phage>0&&e.append(`
                            ${F("achieve_stats_phage_earned")} {{ s.phage | format }}
                            `),t.stats.dark>0&&e.append(`
                            ${F("achieve_stats_dark_earned")} {{ s.dark | format }}
                            `),t.stats.harmony>0&&e.append(`
                            ${F("achieve_stats_harmony_earned")} {{ s.harmony | format }}
                            `),t.stats.blood>0&&e.append(`
                            ${F("achieve_stats_blood_earned")} {{ s.blood | format }}
                            `),t.stats.artifact>0&&e.append(`
                            ${F("achieve_stats_artifact_earned")} {{ s.artifact | format }}
                            `),e.append(`
                            ${F("achieve_stats_knowledge_spent")} {{ s.know | t_know | format }}
                            `),e.append(`
                            ${F("achieve_stats_starved_to_death")} {{ s.starved | t_starved | format }}
                            `),e.append(`
                            ${F("achieve_stats_died_in_combat")} {{ s.died | t_died | format }}
                            `),e.append(`
                            ${F("achieve_stats_game_days_played")} {{ s.days | played | format }}
                            `),t.stats.portals>0&&e.append(`
                            ${F("achieve_stats_portals")} {{ s.portals | format }}
                            `),e.append(`
                            ${F("achieve_stats_total_resets")} {{ s.reset | format }}
                            `),t.stats.mad>0&&e.append(`
                            ${F("achieve_stats_mad_resets")} {{ s.mad | format }}
                            `),t.stats.bioseed>0&&e.append(`
                            ${F("achieve_stats_bioseed_resets")} {{ s.bioseed | format }}
                            `),t.stats.cataclysm>0&&e.append(`
                            ${F("achieve_stats_cataclysm_resets")} {{ s.cataclysm | format }}
                            `),t.stats.blackhole>0&&e.append(`
                            ${F("achieve_stats_blackhole_resets")} {{ s.blackhole | format }}
                            `),t.stats.ascend>0&&e.append(`
                            ${F("achieve_stats_ascension_resets")} {{ s.ascend | format }}
                            `),t.stats.descend>0&&e.append(`
                            ${F("achieve_stats_descension_resets")} {{ s.descend | format }}
                            `),t.stats.aiappoc>0&&e.append(`
                            ${F("achieve_stats_aiappoc_resets")} {{ s.aiappoc | format }}
                            `),t.stats.matrix>0&&e.append(`
                            ${F("achieve_stats_matrix_resets")} {{ s.matrix | format }}
                            `),t.stats.retire>0&&e.append(`
                            ${F("achieve_stats_retire_resets")} {{ s.retire | format }}
                            `),t.stats.eden>0&&e.append(`
                            ${F("achieve_stats_eden_resets")} {{ s.eden | format }}
                            `),t.stats.terraform>0&&e.append(`
                            ${F("achieve_stats_terraform_resets")} {{ s.terraform | format }}
                            `),t.stats.geck>0&&e.append(`
                            ${F("achieve_stats_gecks")} {{ s.geck | format }}
                            `),e.append(`
                            ${F("achieve_stats_current_game")}
                            `),e.append(`
                            ${F("achieve_stats_knowledge_spent")} {{ s.know | format }}
                            `),e.append(`
                            ${F("achieve_stats_starved_to_death")} {{ s.starved | format }}
                            `),e.append(`
                            ${F("achieve_stats_died_in_combat")} {{ s.died | format }}
                            `),e.append(`
                            ${F("achieve_stats_attacks_made")} {{ s.attacks | format }}
                            `),e.append(`
                            ${F("achieve_stats_game_days_played")} {{ s.days | format }}
                            `),t.stats.dkills>0&&e.append(`
                            ${F("achieve_stats_demons_kills")} {{ s.dkills | format }}
                            `),t.stats.sac>0&&e.append(`
                            ${F("achieve_stats_sacrificed")} {{ s.sac | format }}
                            `),t.stats.murders>0&&e.append(`
                            ${F("achieve_stats_murders")} {{ s.murders | format }}
                            `),t.stats.psykill>0&&e.append(`
                            ${F("achieve_stats_psymurders")} {{ s.psykill | format }}
                            `),t.resource.hasOwnProperty("Thermite")&&t.resource.Thermite.amount>0&&e.append(`
                            ${F("achieve_stats_thermite")} {{ r.Thermite.amount | res }}
                            `),_n().active){let a="";(t.stats.cfood>=13||t.race.cataclysm||t.race.orbit_decayed)&&(a=`${Zs(7,12,!0)}`),e.append(`
                            ${F("achieve_stats_trickortreat")} {{ s.cfood | format }} ${a}
                            `)}zs({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()}})}(),In(),$("body").hasClass("fool")?On({fool:!0}):On()}();break;case 7:t.settings.tabLoad||$s("page_view",{page_title:"Evolve - Settings"});break;default:t.settings.tabLoad||$s("page_view",{page_title:"Evolve - Hell Observation"}),t.portal.observe&&ja(!0)}$("#popper").length>0&&0===$(`#${$("#popper").data("id")}`).length&&ds()}const xt={spc_home:{info:{name:()=>Di[t.race.species].home,desc:F("space_home_info_desc"),zone:"inner",syndicate:()=>!1},test_launch:{id:"space-test_launch",title:F("space_home_test_launch_title"),desc:F("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)=>Ht(7500,!1,t)},effect:F("space_home_test_launch_effect"),action(){if(ii($(this)[0])){if(t.race.truepath){let e=1;if(oe("gov0")||e++,oe("gov1")||e++,oe("gov2")||e++,0!==Math.floor(g(0,e)))return ms(F("space_home_test_launch_action_fail"),"danger",!1,["progress"]),0}return t.space.satellite={count:0},ms(F("space_home_test_launch_action"),"info",!1,["progress"]),!0}return!1}},satellite:{id:"space-satellite",title:F("space_home_satellite_title"),desc:F("space_home_satellite_desc"),reqs:{space:2},cost:{Money:e=>js("satellite",e,72e3,1.22),Knowledge:e=>js("satellite",e,28e3,1.22),Oil:(e,t)=>js("satellite",e,Ht(3200,!1,t),1.22),Alloy:e=>js("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?F("space_moon_observatory_title"):t.race.orbit_decayed?F("city_university"):di(),r=`
                            ${F("space_home_satellite_effect2",[a,t.race.cataclysm?25:t.race.orbit_decayed?12:4])}
                            `;return`
                            ${F("plus_max_resource",[e,F("resource_Knowledge_name")])}
                            ${r}
                            ${F("space_home_satellite_effect3",[t.civic.scientist?t.civic.scientist.name:F("job_scientist")])}
                            `},action(){return!!ii($(this)[0])&&(At("satellite"),t.resource.Knowledge.max+=750,!0)}},gps:{id:"space-gps",title:F("space_home_gps_title"),desc:()=>t.space.hasOwnProperty("gps")&&t.space.gps.count<4?`
                            ${F("space_home_gps_desc")}
                            ${F("space_home_gps_desc_req")}
                            `:`
                            ${F("space_home_gps_desc")}
                            `,reqs:{satellite:1},not_trait:["terrifying"],cost:{Money:e=>js("gps",e,75e3,1.18),Knowledge:e=>js("gps",e,5e4,1.18),Copper:e=>js("gps",e,6500,1.18),Oil:(e,t)=>js("gps",e,Ht(3500,!1,t),1.18),Titanium:e=>js("gps",e,8e3,1.18)},effect:e=>(e||0)+(t.space.hasOwnProperty("gps")?t.space.gps.count:0)<4?F("space_home_gps_effect_req"):`
                            ${F("space_home_gps_effect")}
                            ${F("space_home_gps_effect2",[2])}
                            `,action(){return!!ii($(this)[0])&&(At("gps"),!0)}},propellant_depot:{id:"space-propellant_depot",title:F("space_home_propellant_depot_title"),desc:F("space_home_propellant_depot_desc"),reqs:{space_explore:1},cost:{Money:e=>js("propellant_depot",e,55e3,1.35),Aluminium:e=>js("propellant_depot",e,22e3,1.35),Oil:(e,t)=>js("propellant_depot",e,Ht(5500,!1,t),1.35)},effect(){let e=wr(1250)*(t.tech.world_control?1.5:1);if(t.resource.Helium_3.display){let a=wr(1e3)*(t.tech.world_control?1.5:1);return`
                            ${F("plus_max_resource",[e,F("resource_Oil_name")])}
                            ${F("plus_max_resource",[a,F("resource_Helium_3_name")])}
                            `}return`
                            ${F("plus_max_resource",[e,F("resource_Oil_name")])}
                            `},action(){return!!ii($(this)[0])&&(At("propellant_depot"),t.resource.Oil.max+=wr(1250)*(t.tech.world_control?1.5:1),t.resource.Helium_3.display&&(t.resource.Helium_3.max+=wr(1e3)*(t.tech.world_control?1.5:1)),!0)}},nav_beacon:{id:"space-nav_beacon",title:()=>t.race.orbit_decayed?F("space_home_broadcast_beacon_title"):F("space_home_nav_beacon_title"),desc:`
                            ${F("space_home_nav_beacon_desc")}
                            ${F("requires_power")}
                            `,reqs:{luna:2},cost:{Money:e=>js("nav_beacon",e,75e3,1.32),Copper:e=>js("nav_beacon",e,38e3,1.32),Aluminium:e=>js("nav_beacon",e,44e3,1.32),Oil:(e,t)=>js("nav_beacon",e,Ht(12500,!1,t),1.32),Iridium:e=>js("nav_beacon",e,1200,1.32)},powered:()=>Is(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=`
                            ${F("space_red_vr_center_effect1",[t.tech.broadcast/2])}
                            `),`${t.race.orbit_decayed?"":`
                            ${F("space_home_nav_beacon_effect1")}
                            `}${t.tech.luna>=3?`
                            ${F("space_red_spaceport_effect1",[Vt().red,1])}
                            `:""}${e}
                            ${F("space_home_nav_beacon_effect2",[$(this)[0].powered()])}
                            `},action(){return!!ii($(this)[0])&&(At("nav_beacon"),ei($(this)[0]),!0)}}},spc_moon:{info:{name:F("space_moon_info_name"),desc:()=>F("space_moon_info_desc",[Di[t.race.species].home]),support:"moon_base",zone:"inner",syndicate:()=>!0},moon_mission:{id:"space-moon_mission",title:F("space_moon_mission_title"),desc:F("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)=>+Ht(12e3,!1,t).toFixed(0)},effect:F("space_moon_mission_effect"),action(){return!!ii($(this)[0])&&(ms(F("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:F("space_moon_base_title"),desc:()=>`
                            ${F("space_moon_base_desc")}
                            ${F("requires_power_combo",[t.resource.Oil.name])}
                            `,reqs:{space:3},cost:{Money:e=>js("moon_base",e,22e3,1.32),Cement:e=>js("moon_base",e,18e3,1.32),Alloy:e=>js("moon_base",e,7800,1.32),Polymer:e=>js("moon_base",e,12500,1.32)},effect(e){let t=wr(500),a=+Ht($(this)[0].support_fuel().a,!0,e).toFixed(2);return`
                            ${F("space_moon_base_effect1")}
                            ${F("plus_max_resource",[t,F("resource_Iridium_name")])}
                            ${F("space_moon_base_effect3",[a,$(this)[0].powered()])}
                            `},support:()=>2,support_fuel:()=>({r:"Oil",a:2}),powered:()=>Is(4),powerBalancer:()=>[{s:t.space.moon_base.s_max-t.space.moon_base.support}],refresh:!0,action(){if(ii($(this)[0])){if(At("moon_base"),ei($(this)[0]),1===t.space.moon_base.count&&(t.tech.moon=1),!t.tech.luna&&(t.tech.luna=1,t.race.truepath)){let e=F("space_moon_base_msg",[X(3)]);t.civic.foreign.gov3.hstl<10?e=`${e} ${F("space_moon_base_msg_ally")}`:t.civic.foreign.gov3.hstl>60&&(e=`${e} ${F("space_moon_base_msg_hstl")}`),ms(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,ms(F("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:F("space_moon_iridium_mine_title"),desc:`
                            ${F("space_moon_iridium_mine_desc")}
                            ${F("space_support",[F("space_moon_info_name")])}
                            `,reqs:{space:3,luna:1},cost:{Money:e=>js("iridium_mine",e,42e3,1.35),Lumber:e=>js("iridium_mine",e,9e3,1.35),Titanium:e=>js("iridium_mine",e,17500,1.35)},effect(){let e=xe("iridium_mine","iridium"),a=+e.b.toFixed(3),r="";t.race.truepath&&(t.civic.foreign.gov3.hstl<10?r=`
                            ${F("space_rival_ally",[+(100*e.g).toFixed(1)])}
                            `:t.civic.foreign.gov3.hstl>60&&(r=`
                            ${F("space_rival_war",[+(100*e.g).toFixed(1)])}
                            `));let i=t.race.cataclysm?`
                            ${F("produce",[+xe("iridium_mine","coal").toFixed(2),t.resource.Coal.name])}
                            `:"",s=t.race.cataclysm?`
                            ${F("produce",[+(xe("iridium_mine","coal")/48).toFixed(3),t.resource.Uranium.name])}
                            `:"";return`
                            ${F("space_used_support",[F("space_moon_info_name")])}
                            ${F("space_moon_iridium_mine_effect",[a])}
                            ${r}${i}${s}`},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(t.resource.Iridium.display=!0,At("iridium_mine"),t.resource.Mythril.display||(t.resource.Mythril.display=!0,na()),t.space.moon_base.support${F("space_moon_helium_mine_desc")}
                            ${F("space_support",[F("space_moon_info_name")])}
                            `,reqs:{space:3,luna:1},cost:{Money:e=>js("helium_mine",e,38e3,1.35),Aluminium:e=>js("helium_mine",e,9e3,1.35),Steel:e=>js("helium_mine",e,17500,1.35)},effect(){let e=wr(100),a=xe("helium_mine"),r=+a.b.toFixed(3),i="";return t.race.truepath&&(t.civic.foreign.gov3.hstl<10?i=`
                            ${F("space_rival_ally",[+(100*a.g).toFixed(1)])}
                            `:t.civic.foreign.gov3.hstl>60&&(i=`
                            ${F("space_rival_war",[+(100*a.g).toFixed(1)])}
                            `)),`
                            ${F("space_used_support",[F("space_moon_info_name")])}
                            ${F("space_moon_helium_mine_effect",[r])}
                            ${i}
                            ${F("plus_max_resource",[e,F("resource_Helium_3_name")])}
                            `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(t.resource.Helium_3.display=!0,At("helium_mine"),t.space.moon_base.support${F("space_moon_observatory_desc")}
                            ${F("space_support",[F("space_moon_info_name")])}
                            `,reqs:{science:9,luna:1},cost:{Money:e=>js("observatory",e,2e5,1.28),Knowledge:e=>js("observatory",e,69e3,1.28),Stone:e=>js("observatory",e,125e3,1.28),Iron:e=>js("observatory",e,65e3,1.28),Iridium:e=>js("observatory",e,1250,1.28)},effect(){let e="";t.race.cataclysm&&(e=`
                            ${F("city_university_effect",[aa(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?`
                            ${F("space_moon_observatory_cata_effect",[25])}
                            `:`
                            ${F("space_moon_observatory_effect",[5])}
                            `;return`
                            ${F("space_used_support",[F("space_moon_info_name")])}
                            ${e}
                            ${F("plus_max_resource",[a,F("resource_Knowledge_name")])}
                            ${r}`},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("observatory"),t.space.moon_base.supportVt().red,desc:()=>F("space_red_info_desc",[Vt().red]),support:"spaceport",zone:"inner",syndicate:()=>!0},red_mission:{id:"space-red_mission",title:()=>F("space_mission_title",[Vt().red]),desc:()=>F("space_mission_desc",[Vt().red]),reqs:{space:3,space_explore:3},grant:["space",4],queue_complete:()=>t.tech.space>=4?0:1,cost:{Helium_3:(e,t)=>+Ht(4500,!1,t).toFixed(0)},effect:()=>F("space_red_mission_effect",[Vt().red]),action(){return!!ii($(this)[0])&&(ms(F("space_red_mission_action",[Vt().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:F("space_red_spaceport_title"),desc:()=>`
                            ${F("space_red_spaceport_desc")}
                            ${F("requires_power_space",[t.resource.Food.name])}
                            `,reqs:{space:4},cost:{Money:e=>js("spaceport",e,47500,1.32),Iridium:e=>js("spaceport",e,1750,1.32),Mythril:e=>js("spaceport",e,25,1.32),Titanium:e=>js("spaceport",e,22500,1.32)},effect(e){let a=+Ht($(this)[0].support_fuel().a,!0,e).toFixed(2),r="";return(t.race.cataclysm||t.race.orbit_decayed)&&(r=`
                            ${F("plus_max_resource",[`$${wr(4*wi())}`,F("resource_Money_name")])}
                            `),`
                            ${F("space_red_spaceport_effect1",[Vt().red,$(this)[0].support()])}
                            ${r}
                            ${F("space_red_spaceport_effect2",[a,$(this)[0].powered()])}
                            ${F("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:()=>Is(5),powerBalancer:()=>[{s:t.space.spaceport.s_max-t.space.spaceport.support}],refresh:!0,action(){return!!ii($(this)[0])&&(At("spaceport"),ei($(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,ms(F("evo_challenge_orbit_decayed_accelerated",[t.race.orbit_decay-t.stats.days]),"info",!1,["progress"])),!0)}},red_tower:{id:"space-red_tower",title:F("space_red_tower_title"),desc:()=>`
                            ${F("space_red_tower_desc")}
                            ${F("requires_power")}
                            `,reqs:{mars:3},cost:{Money:e=>js("red_tower",e,225e3,1.28),Iron:e=>js("red_tower",e,22e3,1.28),Cement:e=>js("red_tower",e,15e3,1.28),Alloy:e=>js("red_tower",e,8e3,1.28)},effect(){return`
                            ${F("space_red_spaceport_effect1",[Vt().red,t.race.cataclysm?2:1])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(2),powerBalancer:()=>[{s:t.space.spaceport.s_max-t.space.spaceport.support}],support:()=>t.race.cataclysm?2:1,action(){return!!ii($(this)[0])&&(At("red_tower"),ei($(this)[0]),!0)}},captive_housing:zr("captive_housing","space"),terraformer:{id:"space-terraformer",title:F("space_terraformer"),desc:e=>!t.space.hasOwnProperty("terraformer")||t.space.terraformer.count<100||e?`
                            ${F("space_terraformer")}
                            ${F("requires_segmemts",[100])}
                            `+(t.space.hasOwnProperty("terraformer")&&t.space.terraformer.count>=100?`
                            ${F("requires_power")}
                            `:""):`
                            ${F("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`
                            ${F("space_terraformer_effect")}
                            ${F("space_dwarf_collider_effect2",[e])}
                            `}return xt.spc_red.atmo_terraformer.effect(e)},action(){return!!(ii($(this)[0])&&t.space.terraformer.count<100)&&(At("terraformer","space"),t.space.terraformer.count>=100&&(t.tech.terraforming=2,t.space.atmo_terraformer={count:1,on:0},Et(),ds()),!0)}},atmo_terraformer:{id:"space-atmo_terraformer",title:F("space_terraformer"),desc:()=>`
                            ${F("space_terraformer")}
                            ${F("requires_power")}
                            `,wiki:!1,reqs:{terraforming:2},condition:()=>t.space.terraformer.count>=100,queue_complete:()=>0,cost:{},powered:e=>Is((e?e.truepath:t.race.truepath)?500:5e3),postPower(e){e?setTimeout((function(){t.tech.terraforming=s.atmo_terraformer?3:2,Et()}),250):(t.tech.terraforming=2,Et())},effect(e){let t=jt(),a=$(this)[0].powered(e),r=a>0?`
                            ${F("minus_power",[a])}
                            `:"";return`
                            ${F("space_terraformer_effect2")}
                            ${t}${r}`},action:()=>!1},terraform:{id:"space-terraform",title:F("space_terraform"),desc:F("space_terraform"),reqs:{terraforming:3},queue_complete:()=>0,no_multi:!0,cost:{},effect(){let e=jt();return`
                            ${F("space_terraform_effect")}
                            ${e}`},action(){return!!ii($(this)[0])&&(Zt(),!0)}},assembly:zr("assembly","space"),living_quarters:{id:"space-living_quarters",title:F("space_red_living_quarters_title"),desc:()=>`
                            ${F("space_red_living_quarters_desc")}
                            ${F("space_support",[Vt().red])}
                            `,reqs:{mars:1},cost:{Money:e=>js("living_quarters",e,Gt(38e3),1.28),Steel:e=>js("living_quarters",e,Gt(15e3),1.28),Polymer:e=>js("living_quarters",e,Gt(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=`
                            ${F("plus_max_resource",[`$${wr(t.tech.home_safe>=2?t.tech.home_safe>=3?"100000":"50000":"25000")}`,F("resource_Money_name")])}
                            `),`
                            ${F("space_used_support",[Vt().red])}
                            ${a}
                            ${F("plus_max_resource",[aa(1),t.race.truepath?F("job_colonist_tp",[Vt().red]):F("colonist")])}
                            ${F("plus_max_resource",[e,F("citizen")])}
                            `},support:()=>-1,powered:()=>Is(1),action(){if(ii($(this)[0])){if(At("living_quarters"),t.civic.colonist.display=!0,t.space.spaceport.support0)){let e=t.civic[t.civic.d_job].workers-aa(1)<0?t.civic[t.civic.d_job].workers:aa(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 n.biodome&&(e+=(t.tech.mars>=6?.1:.05)*n.biodome),+aa(e).toFixed(2)}},pylon:{id:"space-pylon",title:F("space_red_pylon"),desc:F("space_red_pylon"),reqs:{magic:2},condition:()=>!(!t.race.cataclysm&&!t.race.orbit_decayed),cost:{Money:e=>js("pylon",e,10,1.48),Stone:e=>js("pylon",e,12,1.42),Crystal:e=>js("pylon",e,8,1.42)-3},effect(){let e=wr(2);return`
                            ${F("gain",[+(.005*Ts("magic")).toFixed(3),t.resource.Mana.name])}
                            ${F("plus_max_resource",[e,t.resource.Mana.name])}
                            `},special:()=>!!(t.tech.magic&&t.tech.magic>=3),action(){return!!ii($(this)[0])&&(t.space.pylon.count++,t.resource.Mana.max+=wr(2),!0)}},vr_center:{id:"space-vr_center",title:F("space_red_vr_center_title"),desc:()=>`
                            ${F("space_red_vr_center_desc")}
                            ${F("space_support",[Vt().red])}
                            `,reqs:{mars:1,broadcast:3},cost:{Money:e=>js("vr_center",e,38e4,1.25),Copper:e=>js("vr_center",e,55e3,1.25),Stanene:e=>js("vr_center",e,1e5,1.25),Soul_Gem:e=>js("vr_center",e,1,1.25)},effect(){let e=D("gaslighter",1),a=e?e+1:1;return t.race.orbit_decayed&&(a+=2),`
                            ${F("space_used_support",[Vt().red])}
                            ${F("space_red_vr_center_effect1",[a])}
                            ${F("space_red_vr_center_effect2",[2])}
                            `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("vr_center"),t.space.spaceport.support`
                            ${F("space_red_garage_desc")}
                            `,reqs:{mars:1},cost:{Money:e=>js("garage",e,75e3,1.28),Iron:e=>js("garage",e,12e3,1.28),Brick:e=>js("garage",e,3e3,1.28),Sheet_Metal:e=>js("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 i=t.race.cataclysm||t.race.orbit_decayed?`${F("plus_max_resource",[r,F("resource_Crates_name")])}`:"",s='
                            ';s+=`${F("plus_max_resource",[r,F("resource_Containers_name")])}${i}`;for(const r of $(this)[0].res())if(t.resource[r].display){let i=$(this)[0].heavy(r);s+=`${F("plus_max_resource",[q(+(wr($(this)[0].val(r))*(i?a:e)).toFixed(0),1),t.resource[r].name])}`}return s+="
                            ",s},action(){if(ii($(this)[0])){At("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 i=$(this)[0].heavy(r);t.resource[r].max+=wr($(this)[0].val(r))*(i?a:e)}return!0}return!1}},red_mine:{id:"space-red_mine",title:F("space_red_mine_title"),desc:()=>`
                            ${F("space_red_mine_desc")}
                            ${F("space_support",[Vt().red])}
                            `,reqs:{mars:1},cost:{Money:e=>js("red_mine",e,5e4,1.32),Lumber:e=>js("red_mine",e,65e3,1.32),Iron:e=>js("red_mine",e,33e3,1.32)},effect(){let e=xe("red_mine","copper"),a=xe("red_mine","titanium"),r=+e.b.toFixed(3),i=+a.b.toFixed(3),s="";t.race.truepath&&(t.civic.foreign.gov3.hstl<10?s=`
                            ${F("space_rival_ally",[+(100*e.g).toFixed(1)])}
                            `:t.civic.foreign.gov3.hstl>60&&(s=`
                            ${F("space_rival_war",[+(100*e.g).toFixed(1)])}
                            `));let n=t.race.orbit_decayed?`
                            ${F("city_mine_effect1",[aa(1)])}
                            ${F("city_coal_mine_effect1",[aa(1)])}
                            `:"",c=t.race.cataclysm||t.race.orbit_decayed&&!t.race.sappy?`
                            ${F("space_red_mine_effect",[+xe("red_mine","stone").toFixed(2),t.resource.Stone.name])}
                            `:"",o=t.race.cataclysm||t.race.orbit_decayed&&t.race.smoldering?`
                            ${F("space_red_mine_effect",[+xe("red_mine","asbestos").toFixed(2),t.resource.Chrysotile.name])}
                            `:"",l=t.race.cataclysm||t.race.orbit_decayed?`
                            ${F("space_red_mine_effect",[+xe("red_mine","aluminium").toFixed(2),t.resource.Aluminium.name])}
                            `:"";return`
                            ${F("space_used_support",[Vt().red])}
                            ${n}
                            ${F("space_red_mine_effect",[r,t.resource.Copper.name])}
                            ${F("space_red_mine_effect",[i,t.resource.Titanium.name])}
                            ${s}${o}${c}${l}`},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("red_mine"),t.space.spaceport.support`
                            ${F("space_red_fabrication_desc")}
                            ${F("space_support",[Vt().red])}
                            `,reqs:{mars:1},cost:{Money:e=>js("fabrication",e,9e4,1.32),Copper:e=>js("fabrication",e,25e3,1.32),Cement:e=>js("fabrication",e,12e3,1.32),Wrought_Iron:e=>js("fabrication",e,1200,1.32)},effect(){let e=t.race.cataclysm&&!t.race.flier?`
                            ${F("city_cement_plant_effect1",[aa(1)])}
                            `:"",a=t.race.cataclysm||t.race.orbit_decayed?5:2;return t.race.high_pop&&(a=$e(a)),`
                            ${F("space_used_support",[Vt().red])}
                            ${F("space_red_fabrication_effect1",[aa(1)])}
                            ${e}
                            ${F("space_red_fabrication_effect2",[a])}
                            `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("fabrication"),t.space.spaceport.support`
                            ${F("space_red_factory_desc")}
                            ${F("requires_power_combo",[t.resource.Helium_3.name])}
                            `,reqs:{mars:4},cost:{Money:e=>js("red_factory",e,75e3,1.32),Brick:e=>js("red_factory",e,1e4,1.32),Coal:e=>js("red_factory",e,7500,1.32),Mythril:e=>js("red_factory",e,50,1.32)},effect(e){let a=`
                            ${F("space_red_factory_effect1")}
                            `;return t.tech.foundry>=7&&(a+=`
                            ${F("space_red_factory_effect2")}
                            `),t.race.orbit_decayed&&!t.race.flier&&(a+=`
                            ${F("city_cement_plant_effect1",[aa(1)])}
                            `),a+=`
                            ${F("space_red_factory_effect3",[+Ht(1,!0,e).toFixed(2),$(this)[0].powered()])}
                            `,a},powered:()=>Is(3),special:!0,action(){return!!ii($(this)[0])&&(t.space.red_factory.count++,ei($(this)[0])&&t.city.factory.Alloy++,t.settings.showIndustry=!0,$i(),!0)}},nanite_factory:zr("nanite_factory","space"),biodome:{id:"space-biodome",title:()=>t.race.artifical?F("space_red_signal_tower_title"):t.race.soul_eater?F("space_red_asphodel_title"):F("space_red_biodome_title"),desc(){let e;return e=t.race.artifical?`
                            ${F("space_red_signal_tower_title")}
                            `:t.race.soul_eater?`
                            ${F("space_red_asphodel_desc")}
                            `:t.race.carnivore?`
                            ${F("space_red_biodome_desc_carn")}
                            `:`
                            ${F("space_red_biodome_desc",[Vt().red])}
                            `,`
                            ${e}
                            ${F("space_support",[Vt().red])}
                            `},reqs:{mars:2},cost:{Money:e=>js("biodome",e,45e3,1.28),Lumber:e=>js("biodome",e,65e3,1.28),Brick:e=>js("biodome",e,1e3,1.28),Nanite:e=>t.race.deconstructor?js("biodome",e,75,1.28):0},effect(){let e=+xe("biodome","food").toFixed(2),a=t.race.cataclysm||t.race.orbit_decayed?`
                            ${F("produce",[+xe("biodome","cat_food").toFixed(2),t.resource.Food.name])}
                            `:"",r=!t.race.cataclysm&&!t.race.orbit_decayed||t.race.kindling_kindred?"":`
                            ${F("space_red_mine_effect",[+xe("biodome","lumber").toFixed(2),t.resource.Lumber.name])}
                            `,i=t.tech.mars>=6?.1:.05,s=t.race.artifical?F("city_transmitter_effect",[wr(500)]):F("plus_max_resource",[wr(100),F("resource_Food_name")]),n=t.race.artifical||t.race.orbit_decayed?`
                            ${s}${F("space_used_support",[Vt().red])}
                            ${a}
                            ${F("space_red_biodome_effect",[e,t.resource.Food.name])}
                            ${F("space_red_biodome_effect2",[+aa(i).toFixed(2)])}
                            ${r}${n}`},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("biodome"),t.race.cataclysm||(Pn("colonist"),t.race.joyless&&(Pn("joyless"),delete t.race.joyless,Jr())),t.space.spaceport.supportt.race.artifical?F("space_red_signal_tower_flair"):t.race.soul_eater?F("space_red_asphodel_flair"):t.race.carnivore?F("space_red_biodome_flair_carn"):F("space_red_biodome_flair")},red_university:{id:"space-red_university",title:F("city_university"),desc:()=>F("city_university_desc",[Vt().red]),reqs:{mars:1},trait:["orbit_decayed"],cost:{Money:e=>js("university",e,900,1.5,"city")-500,Lumber:e=>js("university",e,500,1.36,"city")-200,Stone:e=>js("university",e,750,1.36,"city")-350,Crystal:e=>"magic"===t.race.universe?js("university",e,5,1.36,"city"):0},wiki:!1,effect:()=>Sr.city.university.effect(),action(){if(ii($(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:F("space_red_exotic_lab_title"),desc:()=>`
                            ${F("space_red_exotic_lab_desc")}
                            ${F("space_support",[Vt().red])}
                            `,reqs:{mars:5},cost:{Money:e=>js("exotic_lab",e,75e4,1.28),Steel:e=>js("exotic_lab",e,1e5,1.28),Mythril:e=>js("exotic_lab",e,1e3,1.28),Elerium:e=>js("exotic_lab",e,20,1.28)-4},effect(){let e=500;t.tech.science>=13&&t.interstellar.laboratory&&c.laboratory&&(e+=25*c.laboratory),t.tech.ancient_study&&t.tech.ancient_study>=2&&(e+=15*t.space.ziggurat.count),t.tech.mass>=2&&s.mass_driver&&(e+=$e(s.mass_driver*t.civic.scientist.workers)),t.tech.science>=21&&(e*=1.45),t.race.high_pop&&(e=$e(e));let a=wr(10),r="",i="";return(t.race.cataclysm||t.race.orbit_decayed)&&(r=`
                            ${F("city_wardenclyffe_effect1",[aa(1),t.civic.scientist.name])}
                            `,e*=1+.25*n.observatory,t.tech.science>=15&&(i=`
                            ${F("city_wardenclyffe_effect4",[2])}
                            `)),`
                            ${F("space_used_support",[Vt().red])}
                            ${r}${i}
                            ${F("space_red_exotic_lab_effect1",[+e.toFixed(0)])}
                            ${F("plus_max_resource",[a,F("resource_Elerium_name")])}
                            `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("exotic_lab"),t.space.spaceport.support`
                            ${F("space_red_exotic_lab_flair1")}
                            ${F("space_red_exotic_lab_flair2")}
                            `},ziggurat:{id:"space-ziggurat",title:F("space_red_ziggurat_title"),desc:()=>`
                            ${F("space_red_ziggurat_desc",["none"!==t.race.old_gods?Di[t.race.old_gods.toLowerCase()].entity:Di[t.race.species].entity])}
                            `,reqs:{theology:4},cost:{Money:e=>js("ziggurat",e,6e5,1.28),Stone:e=>js("ziggurat",e,25e4,1.28),Aluminium:e=>js("ziggurat",e,7e4,1.28),Mythril:e=>js("ziggurat",e,250,1.28)},effect(){let e=t.tech.ancient_study?.6:.4;if(t.tech.ancient_deify&&t.tech.ancient_deify>=2&&n.exotic_lab&&(e+=.01*n.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=$e(a)),e+=a*t.civic.priest.workers}t.race.ooze&&(e*=1-Ki.ooze.vars()[1]/100),t.race.high_pop&&(e=$e(e)),e=+e.toFixed(2);let a=t.race.truepath?[e,Di[t.race.species].home]:[e],r=`
                            ${F(t.race.truepath?"space_red_ziggurat_effect_tp":"space_red_ziggurat_effect",a)}
                            `;return t.tech.ancient_study&&t.tech.ancient_study>=2&&(r+=`
                            ${F("interstellar_laboratory_effect",[3])}
                            `),(t.race.cataclysm||t.race.orbit_decayed)&&(r+=Kr()),t.genes.ancients&&t.genes.ancients>=4&&(r+=`
                            ${F("city_temple_effect6",[aa(1)])}
                            `),r},action(){return!!ii($(this)[0])&&(At("ziggurat"),t.genes.ancients&&t.genes.ancients>=4&&(t.civic.priest.display=!0),t.race.cataclysm&&Pn("iron_will",!1,1),!0)}},space_barracks:{id:"space-space_barracks",title:F("space_red_space_barracks_title"),desc:()=>`
                            ${F("space_red_space_barracks_desc")}
                            ${F("space_red_space_barracks_desc_req")}
                            `,reqs:{marines:1},cost:{Money:e=>js("space_barracks",e,35e4,1.28),Alloy:e=>js("space_barracks",e,65e3,1.28),Iridium:e=>js("space_barracks",e,22500,1.28),Wrought_Iron:e=>js("space_barracks",e,12500,1.28),Horseshoe:()=>t.race.hooved?2:0},effect(e){let a=t.race.orbit_decayed?Sr.city.boot_camp.effect():"",r=+Ht(2,!0,e).toFixed(2),i=t.tech.marines>=2?aa(4):aa(2),s=t.race.cataclysm?"":`
                            ${F("space_red_space_barracks_effect3",[t.resource.Food.name])}
                            `;return`
                            ${F("plus_max_soldiers",[i])}
                            ${a}
                            ${F("space_red_space_barracks_effect2",[r])}
                            ${s}`},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("space_barracks"),t.space.space_barracks.on++,!0)},flair:()=>F("space_red_space_barracks_flair")},bonfire:zr("bonfire","space"),horseshoe:zr("horseshoe","space")},spc_hell:{info:{name:()=>Vt().hell,desc:()=>F("space_hell_info_desc",[Vt().hell]),zone:"inner",syndicate:()=>!1},hell_mission:{id:"space-hell_mission",title:()=>F("space_mission_title",[Vt().hell]),desc:()=>F("space_mission_desc",[Vt().hell]),reqs:{space:3,space_explore:3},grant:["hell",1],queue_complete:()=>t.tech.hell>=1?0:1,cost:{Helium_3:(e,t)=>+Ht(6500,!1,t).toFixed(0)},effect:()=>F("space_hell_mission_effect1",[Vt().hell]),action(){return!!ii($(this)[0])&&(ms(F("space_hell_mission_action",[Vt().hell]),"info",!1,["progress"]),t.space.geothermal={count:0,on:0},!0)}},geothermal:{id:"space-geothermal",title:F("space_hell_geothermal_title"),desc:()=>`
                            ${F("space_hell_geothermal_desc")}
                            ${F("space_hell_geothermal_desc_req")}
                            `,reqs:{hell:1},cost:{Money:e=>js("geothermal",e,38e3,1.35),Steel:e=>js("geothermal",e,15e3,1.35),Polymer:e=>js("geothermal",e,9500,1.35)},effect(e){let a=+Ht($(this)[0].p_fuel().a,!0,e).toFixed(2);return`${t.race.cataclysm||t.race.orbit_decayed?`
                            ${F("interstellar_stellar_forge_effect3",[1])}
                            `:""}${F("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}, ${F("space_belt_station_effect3",[a])}`},special:()=>!(!t.race.cataclysm&&!t.race.orbit_decayed),powered(){let e=-8;return t.race.forge&&(e-=Ki.forge.vars()[0]),t.stats.achieve.failed_history&&t.stats.achieve.failed_history.l>=5&&(e-=2),As(e)},p_fuel:()=>({r:"Helium_3",a:.5}),action(){return!!ii($(this)[0])&&(At("geothermal"),t.space.geothermal.on++,!0)}},hell_smelter:{id:"space-hell_smelter",title:()=>F("space_hell_smelter_title",[Vt().hell]),desc:()=>F("space_hell_smelter_title",[Vt().hell]),reqs:{hell:1,m_smelting:1},path:["truepath"],cost:{Money:e=>js("hell_smelter",e,25e4,1.24),Adamantite:e=>js("hell_smelter",e,15e3,1.24)},effect:()=>`
                            ${F("interstellar_stellar_forge_effect3",[2])}
                            `,special:!0,action(){return!!ii($(this)[0])&&(At("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:F("city_casino"),desc:F("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=>js("spc_casino",e,4e5,1.35),Furs:e=>js("spc_casino",e,75e3,1.35),Cement:e=>js("spc_casino",e,1e5,1.35),Plywood:e=>js("spc_casino",e,2e4,1.35)},effect(){let e=Dr();return e+=`
                            ${F("minus_power",[$(this)[0].powered()])}
                            `,e},powered:()=>Is(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=2?2:3),action(){return!!ii($(this)[0])&&(t.space.spc_casino.count++,t.race.joyless||(t.civic.entertainer.max+=aa(1),t.civic.entertainer.display=!0),ei($(this)[0]),!0)},flair:F("city_casino_flair")},swarm_plant:{id:"space-swarm_plant",title:F("space_hell_swarm_plant_title"),desc:()=>`
                            ${F("space_hell_swarm_plant_desc")}
                            `,reqs:{solar:4,hell:1},cost:{Money:e=>js("swarm_plant",e,Nt(75e3),1.28),Iron:e=>js("swarm_plant",e,Nt(65e3),1.28),Neutronium:e=>js("swarm_plant",e,Nt(75),1.28),Brick:e=>js("swarm_plant",e,Nt(2500),1.28),Mythril:e=>js("swarm_plant",e,Nt(100),1.28)},effect(){let e=t.tech.swarm?.88:.94;return t.tech.swarm>=3&&(e-=_/100),e<.05&&(e=.05),e=+(100*(1-e)).toFixed(2),F("space_hell_swarm_plant_effect1",[e])},action(){return!!ii($(this)[0])&&(At("swarm_plant"),!0)}},firework:zr("firework","space")},spc_sun:{info:{name:()=>F("space_sun_info_name"),desc:()=>F("space_sun_info_desc",[Di[t.race.species].home]),support:"swarm_control",zone:"inner",syndicate:()=>!1},sun_mission:{id:"space-sun_mission",title:()=>F("space_sun_mission_title"),desc:()=>F("space_sun_mission_desc"),reqs:{space_explore:4},grant:["solar",1],queue_complete:()=>t.tech.solar>=1?0:1,cost:{Helium_3:(e,t)=>+Ht(15e3,!1,t).toFixed(0)},effect:()=>F("space_sun_mission_effect1"),action(){return!!ii($(this)[0])}},swarm_control:{id:"space-swarm_control",title:F("space_sun_swarm_control_title"),desc:()=>`
                            ${F("space_sun_swarm_control_desc")}
                            `,reqs:{solar:3},cost:{Money:e=>js("swarm_control",e,1e5,1.3),Knowledge:e=>js("swarm_control",e,6e4,1.3),Alloy:e=>js("swarm_control",e,7500,1.3),Helium_3:(e,t)=>js("swarm_control",e,Ht(2e3,!1,t),1.3),Mythril:e=>js("swarm_control",e,250,1.3)},effect(){return F("space_sun_swarm_control_effect1",[$(this)[0].support()])},support:()=>t.tech.swarm&&t.tech.swarm>=2?t.tech.high_tech>=11?11+Math.round(_):12:10,action(){return!!ii($(this)[0])&&(At("swarm_control"),t.space.swarm_control.s_max+=$(this)[0].support(),!0)}},swarm_satellite:{id:"space-swarm_satellite",title:F("space_sun_swarm_satellite_title"),desc:()=>`
                            ${F("space_sun_swarm_satellite_desc")}
                            ${F("space_sun_swarm_satellite_desc_req")}
                            `,reqs:{solar:3},cost:{Money:e=>js("swarm_satellite",e,Rt(5e3),1.1),Copper:e=>js("swarm_satellite",e,Rt(2500),1.1),Iridium:e=>js("swarm_satellite",e,Rt(150),1.1),Helium_3:(e,t)=>js("swarm_satellite",e,Rt(Ht(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),`${F("space_dwarf_reactor_effect1",[As(e)])}, ${F("space_sun_swarm_satellite_effect1",[1])}`},support:()=>-1,action(){return!!ii($(this)[0])&&(At("swarm_satellite"),t.space.swarm_control.support++,!0)}},jump_gate:{id:"space-jump_gate",title:F("tau_jump_gate"),desc:e=>!t.space.hasOwnProperty("jump_gate")||t.space.jump_gate.count<100||e?`
                            ${F("tau_jump_gate")}
                            ${F("requires_segmemts",[100])}
                            `:`
                            ${F("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`
                            ${F("tau_jump_gate_effect")}
                            ${F("space_dwarf_collider_effect2",[e])}
                            `}return F("tau_jump_gate_effect")},action(){return!!(ii($(this)[0])&&t.space.jump_gate.count<100)&&(t.space.jump_gate.count++,!0)}}},spc_gas:{info:{name:()=>Vt().gas,desc:()=>F("space_gas_info_desc",[Vt().gas,Di[t.race.species].home]),zone:"outer",syndicate:()=>!0},gas_mission:{id:"space-gas_mission",title:()=>F("space_mission_title",[Vt().gas]),desc:()=>F("space_mission_desc",[Vt().gas]),reqs:{space:4,space_explore:4},grant:["space",5],queue_complete:()=>t.tech.space>=5?0:1,cost:{Helium_3:(e,t)=>+Ht(12500,!1,t).toFixed(0)},effect:()=>F("space_gas_mission_effect",[Vt().gas]),action(){return!!ii($(this)[0])&&(ms(F("space_gas_mission_action",[Vt().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:F("space_gas_mining_title"),desc:()=>`
                            ${F("space_gas_mining_desc")}
                            ${F("requires_power")}
                            `,reqs:{gas_giant:1},cost:{Money:e=>js("gas_mining",e,25e4,1.32),Uranium:e=>js("gas_mining",e,500,1.32),Alloy:e=>js("gas_mining",e,1e4,1.32),Helium_3:(e,t)=>js("gas_mining",e,Ht(2500,!1,t),1.32),Mythril:e=>js("gas_mining",e,25,1.32)},effect(){return`
                            ${F("space_gas_mining_effect1",[+xe("gas_mining").toFixed(2)])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(2),action(){return!!ii($(this)[0])&&(At("gas_mining"),ei($(this)[0]),!0)}},gas_storage:{id:"space-gas_storage",title:()=>F("space_gas_storage_title",[Vt().gas]),desc:()=>`
                            ${F("space_gas_storage_desc")}
                            `,reqs:{gas_giant:1},cost:{Money:e=>js("gas_storage",e,125e3,1.32),Iridium:e=>js("gas_storage",e,3e3,1.32),Sheet_Metal:e=>js("gas_storage",e,2e3,1.32),Helium_3:(e,t)=>js("gas_storage",e,Ht(1e3,!1,t),1.32)},effect(){let e=wr(3500)*(t.tech.world_control?1.5:1),a=wr(2500)*(t.tech.world_control?1.5:1),r=wr(1e3)*(t.tech.world_control?1.5:1);return`
                            ${F("plus_max_resource",[e,F("resource_Oil_name")])}
                            ${F("plus_max_resource",[a,F("resource_Helium_3_name")])}
                            ${F("plus_max_resource",[r,F("resource_Uranium_name")])}
                            `},action(){return!!ii($(this)[0])&&(At("gas_storage"),!0)}},star_dock:{id:"space-star_dock",title:()=>F("space_gas_star_dock_title"),desc:()=>`
                            ${F("space_gas_star_dock_title")}
                            ${F("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(Ht(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:()=>`
                            ${F("space_gas_star_dock_effect1")}
                            `,special:!0,action(){return!(0!==t.space.star_dock.count||!ii($(this)[0])||(At("star_dock"),0))}}},spc_gas_moon:{info:{name:()=>Vt().gas_moon,desc:()=>F("space_gas_moon_info_desc",[Vt().gas_moon,Vt().gas]),zone:"outer",syndicate:()=>!0},gas_moon_mission:{id:"space-gas_moon_mission",title:()=>F("space_mission_title",[Vt().gas_moon]),desc:()=>F("space_mission_desc",[Vt().gas_moon]),reqs:{space:5},grant:["space",6],queue_complete:()=>t.tech.space>=6?0:1,cost:{Helium_3:(e,t)=>+Ht(3e4,!1,t).toFixed(0)},effect:()=>F("space_gas_moon_mission_effect",[Vt().gas_moon]),action(){return!!ii($(this)[0])&&(ms(F("space_gas_moon_mission_action",[Vt().gas_moon]),"info",!1,["progress"]),t.space.outpost={count:0,on:0},t.tech.gas_moon=1,!0)}},outpost:{id:"space-outpost",title:F("space_gas_moon_outpost_title"),desc:()=>`
                            ${F("space_gas_moon_outpost_desc")}
                            ${F("requires_power_combo",[t.resource.Oil.name])}
                            `,reqs:{gas_moon:1},cost:{Money:e=>js("outpost",e,666e3,1.3),Titanium:e=>js("outpost",e,18e3,1.3),Iridium:e=>js("outpost",e,2500,1.3),Helium_3:(e,t)=>js("outpost",e,Ht(6e3,!1,t),1.3),Mythril:e=>js("outpost",e,300,1.3)},effect(e){let t=+xe("outpost").toFixed(3),a=wr(500),r=+Ht(2,!0,e).toFixed(2);return`
                            ${F("space_gas_moon_outpost_effect1",[t])}
                            ${F("plus_max_resource",[a,F("resource_Neutronium_name")])}
                            ${F("space_gas_moon_outpost_effect3",[r,$(this)[0].powered()])}
                            `},powered:()=>Is(3),powerBalancer:()=>[{r:"Neutronium",k:"lpmod"}],action(){return!!ii($(this)[0])&&(At("outpost"),t.resource.Neutronium.display=!0,ei($(this)[0]),!0)}},drone:{id:"space-drone",title:F("space_gas_moon_drone_title"),desc:()=>`
                            ${F("space_gas_moon_drone_desc")}
                            `,reqs:{gas_moon:1,drone:1},cost:{Money:e=>js("drone",e,25e4,1.3),Steel:e=>js("drone",e,2e4,1.3),Neutronium:e=>js("drone",e,500,1.3),Elerium:e=>js("drone",e,25,1.3),Nano_Tube:e=>js("drone",e,45e3,1.3)},effect:()=>`
                            ${F("space_gas_moon_drone_effect1",[t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=3?12:6])}
                            `,action(){return!!ii($(this)[0])&&(At("drone"),!0)}},oil_extractor:{id:"space-oil_extractor",title:F("space_gas_moon_oil_extractor_title"),desc:()=>`
                            ${F("space_gas_moon_oil_extractor_title")}
                            ${F("requires_power")}
                            `,reqs:{gas_moon:2},cost:{Money:e=>js("oil_extractor",e,666e3,1.3),Polymer:e=>js("oil_extractor",e,7500,1.3),Helium_3:(e,t)=>js("oil_extractor",e,Ht(2500,!1,t),1.3),Wrought_Iron:e=>js("oil_extractor",e,5e3,1.3)},effect(){return`${F("space_gas_moon_oil_extractor_effect1",[+xe("oil_extractor").toFixed(2)])}, ${F("minus_power",[$(this)[0].powered()])}`},powered:()=>Is(1),powerBalancer:()=>[{r:"Oil",k:"lpmod"}],action(){return!!ii($(this)[0])&&(At("oil_extractor"),ei($(this)[0]),!0)}}},spc_belt:{info:{name:()=>F("space_belt_info_name"),desc:()=>t.space.space_station&&t.space.space_station.count>0?`
                            ${F("space_belt_info_desc",[Vt().red,Vt().gas])}
                            ${F("space_belt_info_desc2")}
                            `:F("space_belt_info_desc",[Vt().red,Vt().gas]),support:"space_station",zone:"inner",syndicate:()=>!0},belt_mission:{id:"space-belt_mission",title:()=>F("space_belt_mission_title"),desc:()=>F("space_belt_mission_desc"),reqs:{space:5},grant:["asteroid",1],queue_complete:()=>t.tech.asteroid>=1?0:1,cost:{Helium_3:(e,t)=>+Ht(25e3,!1,t).toFixed(0)},effect:()=>F("space_belt_mission_effect1"),action(){return!!ii($(this)[0])&&(ms(F("space_belt_mission_action"),"info",!1,["progress"]),t.settings.space.dwarf=!0,!0)}},space_station:{id:"space-space_station",title:F("space_belt_station_title"),desc:()=>`
                            ${F("space_belt_station_desc")}
                            ${F("requires_power_space",[t.resource.Food.name])}
                            `,reqs:{asteroid:2},cost:{Money:e=>js("space_station",e,25e4,1.3),Iron:e=>js("space_station",e,85e3,1.3),Polymer:e=>js("space_station",e,18e3,1.3),Iridium:e=>js("space_station",e,2800,1.28),Helium_3:(e,t)=>js("space_station",e,Ht(2e3,!1,t),1.3),Mythril:e=>js("space_station",e,75,1.25)},effect(e){let a=+Ht(2.5,!0,e).toFixed(2),r=t.race.cataclysm?1:10,i=wr(5),s=t.tech.asteroid>=5?`
                            ${F("plus_max_resource",[i,F("resource_Elerium_name")])}
                            `:"";return`
                            ${F("plus_max_space_miners",[aa(3)])}
                            ${s}
                            ${F("space_belt_station_effect3",[a])}
                            ${F("space_belt_station_effect4",[r,$(this)[0].powered(),t.resource.Food.name])}
                            `},support:()=>aa(3),powered:()=>Is(3),refresh:!0,action(){if(ii($(this)[0])){if(At("space_station"),t.civic.space_miner.display=!0,t.tech.asteroid<3&&(t.tech.asteroid=3),ei($(this)[0])&&t.civic[t.civic.d_job].workers>0){let e=aa(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,ms(F("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:F("space_belt_elerium_ship_title"),desc:()=>F("space_belt_elerium_ship_title"),reqs:{asteroid:5},cost:{Money:e=>js("elerium_ship",e,5e5,1.3),Uranium:e=>js("elerium_ship",e,2500,1.3),Titanium:e=>js("elerium_ship",e,1e4,1.3),Mythril:e=>js("elerium_ship",e,500,1.3),Helium_3:(e,t)=>js("elerium_ship",e,Ht(5e3,!1,t),1.3)},effect(){let e=+xe("elerium_ship").toFixed(4);return`
                            ${F("space_belt_elerium_ship_effect1",[aa(2)])}
                            ${F("space_belt_elerium_ship_effect2",[e])}
                            `},support:()=>aa(-2),powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("elerium_ship"),t.space.space_station.support+1F("space_belt_iridium_ship_title"),reqs:{asteroid:3},cost:{Money:e=>js("iridium_ship",e,12e4,1.3),Uranium:e=>js("iridium_ship",e,1e3,1.3),Alloy:e=>js("iridium_ship",e,48e3,1.3),Iridium:e=>js("iridium_ship",e,2800,1.3),Helium_3:(e,t)=>js("iridium_ship",e,Ht(1800,!1,t),1.3)},effect(){let e=+xe("iridium_ship").toFixed(3);return`
                            ${F("space_belt_iridium_ship_effect1",[aa(1)])}
                            ${F("space_belt_iridium_ship_effect2",[e])}
                            `},support:()=>aa(-1),powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("iridium_ship"),t.space.space_station.supportF("space_belt_iron_ship_title"),reqs:{asteroid:3},cost:{Money:e=>js("iron_ship",e,8e4,1.3),Steel:e=>js("iron_ship",e,42e3,1.3),Aluminium:e=>js("iron_ship",e,38e3,1.3),Polymer:e=>js("iron_ship",e,16e3,1.3),Helium_3:(e,t)=>js("iron_ship",e,Ht(1200,!1,t),1.3)},effect(){let e=+xe("iron_ship").toFixed(2);return t.tech.solar&&t.tech.solar>=5?`
                            ${F("space_belt_iron_ship_effect1",[aa(1)])}
                            ${F("space_belt_iron_ship_effect2",[e])}
                            ${F("space_belt_iron_ship_effect3")}
                            `:`
                            ${F("space_belt_iron_ship_effect1",[aa(1)])}
                            ${F("space_belt_iron_ship_effect2",[e])}
                            `},support:()=>aa(-1),powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("iron_ship"),t.space.space_station.supportVt().dwarf,desc:()=>F("space_dwarf_info_desc",[Vt().dwarf]),zone:"inner",syndicate:()=>!1},dwarf_mission:{id:"space-dwarf_mission",title:()=>F("space_mission_title",[Vt().dwarf]),desc:()=>F("space_mission_desc",[Vt().dwarf]),reqs:{asteroid:1,elerium:1},grant:["dwarf",1],queue_complete:()=>t.tech.dwarf>=1?0:1,cost:{Helium_3:(e,t)=>+Ht(45e3,!1,t).toFixed(0)},effect:()=>F("space_dwarf_mission_effect1",[Vt().dwarf]),action(){return!!ii($(this)[0])&&(ms(F("space_dwarf_mission_action",[Vt().dwarf]),"info",!1,["progress"]),t.space.elerium_contain={count:0,on:0},!0)}},elerium_contain:{id:"space-elerium_contain",title:F("space_dwarf_elerium_contain_title"),desc:()=>`
                            ${F("space_dwarf_elerium_contain_title")}
                            ${F("requires_power")}
                            `,reqs:{dwarf:1},cost:{Money:e=>js("elerium_contain",e,8e5,1.28),Cement:e=>js("elerium_contain",e,12e4,1.28),Iridium:e=>js("elerium_contain",e,5e4,1.28),Neutronium:e=>js("elerium_contain",e,250,1.28)},effect(){return`
                            ${F("plus_max_resource",[wr(100),F("resource_Elerium_name")])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(6),action(){return!!ii($(this)[0])&&(At("elerium_contain"),ei($(this)[0]),!0)}},e_reactor:{id:"space-e_reactor",title:F("space_dwarf_reactor_title"),desc:()=>`
                            ${F("space_dwarf_reactor_title")}
                            ${F("space_dwarf_reactor_desc_req")}
                            `,reqs:{elerium:2},cost:{Money:e=>js("e_reactor",e,125e4,1.28),Steel:e=>js("e_reactor",e,35e4,1.28),Neutronium:e=>js("e_reactor",e,1250,1.28),Mythril:e=>js("e_reactor",e,2500,1.28)},effect(){let e=$(this)[0].p_fuel().a;return`
                            ${F("space_dwarf_reactor_effect1",[-1*$(this)[0].powered()])}
                            ${F("space_dwarf_reactor_effect2",[e])}
                            `},powered:()=>As(-25),p_fuel:()=>({r:"Elerium",a:.05}),action(){return!!ii($(this)[0])&&(At("e_reactor"),t.space.e_reactor.on++,!0)}},world_collider:{id:"space-world_collider",title:F("space_dwarf_collider_title"),desc(e){if(!t.space.hasOwnProperty("world_collider")||t.space.world_collider.count<1859||e)return`
                            ${F("space_dwarf_collider_desc")}
                            ${F("space_dwarf_collider_desc_req")}
                            `+(t.space.hasOwnProperty("world_collider")&&t.space.world_collider.count>=1859?`
                            ${F("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`
                            ${F("space_dwarf_collider_effect1")}
                            ${F("space_dwarf_collider_effect2",[e])}
                            `}return xt.spc_dwarf.world_controller.effect()},action(){if(t.space.world_collider.count<1859&&ii($(this)[0])){if(At("world_collider"),t.space.world_collider.count>=1859){if(t.tech.science=11,t.space.world_controller={count:1,on:0},Jr(),Et(),t.race.banana){let e=qn();t.stats.banana.b2[e]=!0,"m"!==e&&"l"!==e&&(t.stats.banana.b2.l=!0)}ds()}return!0}return!1},flair:F("space_dwarf_collider_flair")},world_controller:{id:"space-world_controller",title:F("space_dwarf_collider_title"),desc:()=>`
                            ${F("space_dwarf_collider_title")}
                            ${F("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&&s.far_reach>0&&(e+=1*s.far_reach),t.tech.science>=19&&(e+=15),`
                            ${F("plus_max_resource",[e+"%",F("resource_Knowledge_name")])}
                            ${F("space_dwarf_controller_effect3")}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(20),action:()=>!1,flair:F("space_dwarf_controller_flair")},shipyard:{id:"space-shipyard",title:F("outer_shipyard_title"),desc:()=>`
                            ${F("outer_shipyard_title")}
                            ${F("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`
                            ${F("outer_shipyard_effect")}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(50),special:!0,sAction(){s.shipyard&&(t.settings.civTabs=2,t.settings.govTabs=5,t.settings.tabLoad||($t("mTabCivic"),ds("space-shipyard")))},action(){return!!(t.space.shipyard.count<1&&ii($(this)[0]))&&(At("shipyard"),ei($(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:F("space_dwarf_mass_relay_title"),desc(e){if(!t.space.hasOwnProperty("mass_relay")||t.space.mass_relay.count<100||e)return`
                            ${F("space_dwarf_mass_relay_title")}
                            ${F("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`
                            ${F("space_dwarf_mass_relay_effect")}
                            ${F("space_dwarf_collider_effect2",[e])}
                            `}return xt.spc_dwarf.m_relay.effect()},action(){return!!(t.space.mass_relay.count<100&&ii($(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},Jr(),Et(),ds()),!0)}},m_relay:{id:"space-m_relay",title:F("space_dwarf_mass_relay_title"),desc:()=>`
                            ${F("space_dwarf_mass_relay_title")}
                            ${F("requires_power")}
                            `,reqs:{outer:6},path:["truepath"],condition:()=>t.space.mass_relay.count>=100,wiki:!1,queue_complete:()=>0,cost:{},powered:()=>Is(100),effect(){let e=Math.floor(t.space.m_relay.charged/10)/10;return`
                            ${F("space_dwarf_mass_relay_effect2",[Vt().dwarf])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            ${F("space_dwarf_mass_relay_charged",[e])}
                            `},action:()=>!1}},spc_titan:Qe().spc_titan,spc_enceladus:Qe().spc_enceladus,spc_triton:Qe().spc_triton,spc_kuiper:Qe().spc_kuiper,spc_eris:Qe().spc_eris},qt={int_alpha:{info:{name:F("interstellar_alpha_name"),desc:()=>t.tech.alpha?F("interstellar_alpha_desc2",[Di[t.race.species].home]):F("interstellar_alpha_desc1",[Di[t.race.species].home]),support:"starport"},alpha_mission:{id:"interstellar-alpha_mission",title:F("space_mission_title",[F("interstellar_alpha_name")]),desc:F("space_mission_desc",[F("interstellar_alpha_name")]),reqs:{ftl:2},grant:["alpha",1],queue_complete:()=>t.tech.alpha>=1?0:1,cost:{Helium_3:()=>+Ut(4e4).toFixed(0)},effect:F("interstellar_alpha_mission_effect"),action(){return!!ii($(this)[0])&&(ms(F("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:F("interstellar_alpha_starport_title"),desc:()=>`
                            ${F("interstellar_alpha_starport_desc")}
                            ${F("requires_power_space",[t.resource.Food.name])}
                            `,reqs:{alpha:1},cost:{Money:e=>js("starport",e,1e6,1.3,"interstellar"),Aluminium:e=>js("starport",e,4e5,1.3,"interstellar"),Neutronium:e=>js("starport",e,1e3,1.3,"interstellar"),Elerium:e=>js("starport",e,100,1.3,"interstellar")},effect(){let e=+Ut(5).toFixed(2);return`
                            ${F("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
                            ${F("interstellar_alpha_starport_effect2",[e,$(this)[0].powered()])}
                            ${F("interstellar_alpha_starport_effect3",[100,t.resource.Food.name])}
                            `},support:()=>5,powered:()=>Is(10),powerBalancer:()=>[{s:t.interstellar.starport.s_max-t.interstellar.starport.support}],refresh:!0,action(){return!!ii($(this)[0])&&(At("starport","interstellar"),t.settings.space.proxima=!0,t.settings.space.nebula=!0,ei($(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,ms(F("evo_challenge_orbit_decayed_accelerated",[t.race.orbit_decay-t.stats.days]),"info",!1,["progress"])),!0)}},habitat:{id:"interstellar-habitat",title:F("interstellar_habitat_title"),desc:`
                            ${F("interstellar_habitat_desc")}
                            ${F("requires_power")}
                            `,reqs:{alpha:3},cost:{Money:e=>js("habitat",e,8e5,1.25,"interstellar"),Furs:e=>js("habitat",e,38e3,1.25,"interstellar"),Adamantite:e=>js("habitat",e,3200,1.25,"interstellar"),Plywood:e=>js("habitat",e,1e4,1.25,"interstellar"),Horseshoe:()=>t.race.hooved?1:0},effect(){let e=$(this)[0].citizens();return`
                            ${F("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
                            ${F("plus_max_citizens",[e])}, ${F("minus_power",[$(this)[0].powered()])}
                            `},support:()=>1,powered:()=>Is(2),powerBalancer:()=>[{s:t.interstellar.starport.s_max-t.interstellar.starport.support}],action(){return!!ii($(this)[0])&&(At("habitat","interstellar"),ei($(this)[0])&&(t.resource[t.race.species].max+=$(this)[0].citizens()),!0)},citizens(){let e=1;return t.race.high_pop&&(e*=Ki.high_pop.vars()[0]),e}},mining_droid:{id:"interstellar-mining_droid",title:F("interstellar_mining_droid_title"),desc:`
                            ${F("interstellar_mining_droid_title")}
                            ${F("space_support",[F("interstellar_alpha_name")])}
                            `,reqs:{alpha:2},cost:{Money:e=>js("mining_droid",e,65e4,1.28,"interstellar"),Steel:e=>js("mining_droid",e,12e4,1.28,"interstellar"),Nano_Tube:e=>js("mining_droid",e,75e3,1.28,"interstellar"),Elerium:e=>js("mining_droid",e,50,1.28,"interstellar")},effect:()=>`
                            ${F("space_used_support",[F("interstellar_alpha_name")])}
                            ${F("interstellar_mining_droid_effect")}
                            `,support:()=>-1,powered:()=>Is(1),special:!0,refresh:!0,action(){return!!ii($(this)[0])&&(At("mining_droid","interstellar"),t.resource.Adamantite.display=!0,t.interstellar.starport.support${F("interstellar_processing_title")}
                            ${F("space_support",[F("interstellar_alpha_name")])}
                            `,reqs:{droids:1},cost:{Money:e=>js("processing",e,35e4,1.28,"interstellar"),Iron:e=>js("processing",e,18e4,1.28,"interstellar"),Aluminium:e=>js("processing",e,6e4,1.28,"interstellar"),Iridium:e=>js("processing",e,5e3,1.28,"interstellar")},effect(){let e=12;return t.tech.ai_core&&t.tech.ai_core>=2&&s.citadel>0&&(e+=2*s.citadel),`
                            ${F("space_used_support",[F("interstellar_alpha_name")])}
                            ${F("interstellar_processing_effect",[e])}
                            `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("processing","interstellar"),t.interstellar.starport.support`
                            ${F("interstellar_fusion_title")}
                            ${F("requires_power_support_combo",[F("interstellar_alpha_name"),t.resource.Deuterium.name])}
                            `,reqs:{fusion:1},cost:{Money:e=>js("fusion",e,99e4,1.28,"interstellar"),Iridium:e=>js("fusion",e,44e3,1.28,"interstellar"),Infernite:e=>js("fusion",e,350,1.28,"interstellar"),Brick:e=>js("fusion",e,18e3,1.28,"interstellar")},effect(){return`
                            ${F("space_used_support",[F("interstellar_alpha_name")])}
                            ${F("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}, ${F("interstellar_fusion_effect",[1.25])}
                            `},support:()=>-1,powered:()=>As(-22),p_fuel:()=>({r:"Deuterium",a:1.25}),action(){return!!ii($(this)[0])&&(At("fusion","interstellar"),t.interstellar.starport.support"magic"===t.race.universe?F("tech_sanctum"):F("interstellar_laboratory_title"),desc:`
                            ${F("magic"===t.race.universe?"tech_sanctum":"interstellar_laboratory_title")}
                            ${F("space_support",[F("interstellar_alpha_name")])}
                            `,reqs:{science:12},cost:{Money:e=>js("laboratory",e,75e4,1.28,"interstellar"),Crystal:e=>"magic"===t.race.universe?js("laboratory",e,1200,1.28,"interstellar"):0,Titanium:e=>js("laboratory",e,12e4,1.28,"interstellar"),Alloy:e=>js("laboratory",e,95e3,1.28,"interstellar"),Mythril:e=>js("laboratory",e,8500,1.28,"interstellar")},effect(){let e=1e4;t.tech.science>=15&&(e*=1+.02*(t.race.cataclysm||t.race.orbit_decayed?n.exotic_lab:t.city.wardenclyffe.count)),(t.race.cataclysm||t.race.orbit_decayed&&s.s_gate&&o.scavenger)&&(e*=1+o.scavenger*+(.75*St("gxy_alien2")).toFixed(1)),t.tech.science>=21&&(e*=1.45),e=Math.round(e);let a="";t.tech.science>=16&&(a=`
                            ${F("city_wardenclyffe_effect1",[aa(1),t.civic.scientist.name])}
                            `);let r=`
                            ${F("space_used_support",[F("interstellar_alpha_name")])}
                            ${a}
                            ${F("city_max_knowledge",[e])}
                            `;return t.tech.science>=13&&(r+=`
                            ${F("interstellar_laboratory_effect",[5])}
                            `),"magic"===t.race.universe&&(r+=`
                            ${F("plus_max_resource",[wr(12),t.resource.Mana.name])}
                            `),r},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("laboratory","interstellar"),t.interstellar.starport.support${F("interstellar_exchange_title")}
                            ${F("space_support",[F("interstellar_alpha_name")])}
                            `,reqs:{banking:12},cost:{Money:e=>js("exchange",e,68e4,1.28,"interstellar"),Stone:e=>js("exchange",e,115e3,1.28,"interstellar"),Adamantite:e=>js("exchange",e,55e3,1.28,"interstellar"),Graphene:e=>js("exchange",e,78e3,1.28,"interstellar")},effect(){let e=t.race.cataclysm||t.race.orbit_decayed?s.spaceport:t.city.bank?t.city.bank.count:0,a=t.race.cataclysm||t.race.orbit_decayed?4*wi():wi(),r=wr(t.city.bank?a*e/18:0);return t.race.inflation&&(r*=2),t.tech.banking>=13&&(t.galaxy.freighter&&(r*=1+.03*o.freighter),t.galaxy.super_freighter&&(r*=1+.08*o.super_freighter)),r=+r.toFixed(0),`
                            ${F("space_used_support",[F("interstellar_alpha_name")])}
                            ${F("plus_max_resource",[`$${r.toLocaleString()}`,F("resource_Money_name")])}
                            `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("exchange","interstellar"),t.interstellar.starport.support${F("interstellar_g_factory_title")}
                            ${F("space_support",[F("interstellar_alpha_name")])}
                            `,reqs:{graphene:1},cost:{Money:e=>js("g_factory",e,95e4,1.28,"interstellar"),Copper:e=>js("g_factory",e,165e3,1.28,"interstellar"),Cement:e=>js("g_factory",e,22e4,1.28,"interstellar"),Infernite:e=>js("g_factory",e,750,1.28,"interstellar")},effect:()=>`
                            ${F("space_used_support",[F("interstellar_alpha_name")])}
                            ${F("interstellar_g_factory_effect")}
                            `,support:()=>-1,powered:()=>Is(1),special:!0,action(){return!!ii($(this)[0])&&(At("g_factory","interstellar"),t.resource.Graphene.display=!0,t.interstellar.starport.support`
                            ${F("interstellar_int_factory_title")}
                            ${F("requires_power_combo",[t.resource.Deuterium.name])}
                            `,reqs:{alpha:4},cost:{Money:e=>js("int_factory",e,25e6,1.26,"interstellar"),Coal:e=>js("int_factory",e,1e7,1.26,"interstellar"),Brick:e=>js("int_factory",e,75e4,1.26,"interstellar"),Bolognium:e=>js("int_factory",e,5e4,1.26,"interstellar")},effect(){let e=+Ut(5).toFixed(2);return`
                            ${F("interstellar_int_factory_effect")}
                            ${F("city_crafted_mats",[10])}
                            ${F("interstellar_fusion_effect",[e])} ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(5),special:!0,action(){return!!ii($(this)[0])&&(At("int_factory","interstellar"),ei($(this)[0])&&(t.city.factory.Alloy+=2,$i()),!0)}},luxury_condo:{id:"interstellar-luxury_condo",title:F("tech_luxury_condo"),desc:`
                            ${F("tech_luxury_condo")}
                            ${F("requires_power")}
                            `,reqs:{alpha:5},cost:{Money:e=>js("luxury_condo",e,25e6,1.25,"interstellar"),Neutronium:e=>js("luxury_condo",e,75e3,1.25,"interstellar"),Stanene:e=>js("luxury_condo",e,23e4,1.25,"interstellar"),Orichalcum:e=>js("luxury_condo",e,65e3,1.25,"interstellar"),Nanoweave:e=>js("luxury_condo",e,12500,1.25,"interstellar"),Horseshoe:()=>t.race.hooved?2:0},effect(){let e=$(this)[0].citizens(),t=wr(75e4);return`
                            ${F("plus_max_citizens",[e])}, ${F("minus_power",[$(this)[0].powered()])}
                            ${F("plus_max_resource",[`$${t.toLocaleString()}`,F("resource_Money_name")])}
                            `},powered:()=>Is(3),action(){return!!ii($(this)[0])&&(At("luxury_condo","interstellar"),ei($(this)[0])&&(t.resource[t.race.species].max+=2),!0)},citizens(){let e=2;return t.race.high_pop&&(e*=Ki.high_pop.vars()[0]),e}},zoo:{id:"interstellar-zoo",title:F("tech_zoo"),desc:()=>`
                            ${F("tech_zoo")}
                            ${F("requires_power_support_combo",[F("interstellar_alpha_name"),t.resource.Food.name])}
                            `,reqs:{zoo:1},cost:{Money:e=>js("zoo",e,5e7,1.24,"interstellar"),Polymer:e=>js("zoo",e,6e6,1.24,"interstellar"),Infernite:e=>js("zoo",e,75e3,1.24,"interstellar"),Brick:e=>js("zoo",e,2e6,1.24,"interstellar")},effect:()=>`
                            ${F("space_used_support",[F("interstellar_alpha_name")])}
                            ${F("space_red_vr_center_effect1",[5])}
                            ${F("space_red_vr_center_effect2",[2])}
                            ${F("interstellar_alpha_starport_effect3",[12e3,t.resource.Food.name])}
                            `,powered:()=>Is(3),action(){return!!ii($(this)[0])&&(At("zoo","interstellar"),t.interstellar.starport.supportt.tech.storage<=2?F("city_shed_title1"):t.tech.storage>=4?F("city_shed_title3"):F("city_shed_title2"),desc(){let e=t.tech.storage>=3?t.tech.storage>=4?F("city_shed_desc_size3"):F("city_shed_desc_size2"):F("city_shed_desc_size1");return F("city_shed_desc",[e])},reqs:{alpha:2},cost:{Money:e=>js("warehouse",e,175e3,1.28,"interstellar"),Lumber:e=>js("warehouse",e,1e5,1.28,"interstellar"),Aluminium:e=>js("warehouse",e,12e4,1.28,"interstellar"),Cement:e=>js("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=Nr();for(const r of $(this)[0].res())t.resource[r].display&&(e+=`${F("plus_max_resource",[q(+(wr($(this)[0].val(r))*a).toFixed(0),1),t.resource[r].name])}`);return e+="
                            ",e},action(){if(ii($(this)[0])){At("warehouse","interstellar");let e=Nr();for(const a of $(this)[0].res())t.resource[a].display&&(t.resource[a].max+=wr($(this)[0].val(a)*e));return!0}return!1}}},int_proxima:{info:{name:F("interstellar_proxima_name"),desc:()=>t.tech.proxima?F("interstellar_proxima_desc2"):F("interstellar_proxima_desc1")},proxima_mission:{id:"interstellar-proxima_mission",title:F("space_mission_title",[F("interstellar_proxima_name")]),desc:F("space_mission_desc",[F("interstellar_proxima_name")]),reqs:{alpha:1},grant:["proxima",1],queue_complete:()=>t.tech.proxima>=1?0:1,cost:{Helium_3:()=>+Ut(42e3).toFixed(0)},effect:F("interstellar_proxima_mission_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.xfer_station={count:0,on:0},ms(F("interstellar_proxima_mission_result"),"info",!1,["progress"]),!0)}},xfer_station:{id:"interstellar-xfer_station",title:F("interstellar_xfer_station_title"),desc:()=>`
                            ${F("interstellar_xfer_station_desc")}
                            ${F("requires_power_combo",[t.resource.Uranium.name])}
                            `,reqs:{proxima:1},cost:{Money:e=>js("xfer_station",e,12e5,1.28,"interstellar"),Neutronium:e=>js("xfer_station",e,1500,1.28,"interstellar"),Adamantite:e=>js("xfer_station",e,6e3,1.28,"interstellar"),Polymer:e=>js("xfer_station",e,12e3,1.28,"interstellar"),Wrought_Iron:e=>js("xfer_station",e,3500,1.28,"interstellar")},effect(){let e=wr(5e3),a=wr(4e3),r=wr(2500),i="";return t.resource.Deuterium.display&&(i=`
                            ${F("plus_max_resource",[wr(2e3),F("resource_Deuterium_name")])}
                            `),`
                            ${F("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
                            ${F("plus_max_resource",[a,F("resource_Oil_name")])}
                            ${F("plus_max_resource",[e,F("resource_Helium_3_name")])}
                            ${F("plus_max_resource",[r,F("resource_Uranium_name")])}
                            ${i}
                            ${F("city_fission_power_effect",[.28])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},support:()=>1,powered:()=>Is(1),powerBalancer:()=>[{s:t.interstellar.starport.s_max-t.interstellar.starport.support}],refresh:!0,action(){return!!ii($(this)[0])&&(At("xfer_station","interstellar"),ei($(this)[0])&&(t.resource.Uranium.max+=wr(2500),t.resource.Helium_3.max+=wr(5e3),t.resource.Oil.max+=wr(4e3),t.resource.Deuterium.max+=wr(2e3)),1===t.tech.proxima&&(t.tech.proxima=2,t.interstellar.cargo_yard={count:0}),!0)}},cargo_yard:{id:"interstellar-cargo_yard",title:F("interstellar_cargo_yard_title"),desc:F("interstellar_cargo_yard_title"),reqs:{proxima:2},cost:{Money:e=>js("cargo_yard",e,275e3,1.28,"interstellar"),Graphene:e=>js("cargo_yard",e,7500,1.28,"interstellar"),Mythril:e=>js("cargo_yard",e,6e3,1.28,"interstellar")},effect(){let e=wr(200),a=wr(150),r=`
                            ${F("plus_max_resource",[50,F("resource_Crates_name")])}
                            ${F("plus_max_resource",[50,F("resource_Containers_name")])}
                            `;return r+=`
                            ${F("plus_max_resource",[e,F("resource_Neutronium_name")])}
                            ${F("plus_max_resource",[a,F("resource_Infernite_name")])}
                            `,t.tech.storage>=7&&(r+=`
                            ${F("interstellar_cargo_yard_effect",[+_.toFixed(3)])}
                            `),r},action(){return!!ii($(this)[0])&&(At("cargo_yard","interstellar"),!0)}},cruiser:{id:"interstellar-cruiser",title:F("interstellar_cruiser_title"),desc:F("interstellar_cruiser_title"),reqs:{cruiser:1},cost:{Money:e=>js("cruiser",e,875e3,1.28,"interstellar"),Aluminium:e=>js("cruiser",e,195e3,1.28,"interstellar"),Deuterium:e=>js("cruiser",e,+Ut(1500).toFixed(0),1.28,"interstellar"),Neutronium:e=>js("cruiser",e,2e3,1.28,"interstellar"),Aerogel:e=>js("cruiser",e,250,1.28,"interstellar"),Horseshoe:()=>t.race.hooved?3:0},powered:()=>Is(1),effect(){let e=+Ut(6).toFixed(2);return`
                            ${F("plus_max_soldiers",[aa(3)])}
                            ${F("space_belt_station_effect3",[e])}
                            `},action(){return!!ii($(this)[0])&&(At("cruiser","interstellar"),t.interstellar.cruiser.on++,!0)}},dyson:{id:"interstellar-dyson",title:F("interstellar_dyson_title"),desc:e=>!t.interstellar.hasOwnProperty("dyson")||t.interstellar.dyson.count<100||e?`
                            ${F("interstellar_dyson_title")}
                            ${F("requires_segmemts",[100])}
                            `:`
                            ${F("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?`
                            ${F("space_dwarf_reactor_effect1",[As(1.25*a)])}
                            `:"",t=100-a;return`
                            ${F("interstellar_dyson_effect")}
                            ${e}
                            ${F("space_dwarf_collider_effect2",[t])}
                            `}return F("interstellar_dyson_complete",[As(175)])},action(){return!!(ii($(this)[0])&&t.interstellar.dyson.count<100)&&(At("dyson","interstellar"),t.interstellar.dyson.count>=100&&Jr(),!0)}},dyson_sphere:{id:"interstellar-dyson_sphere",title:F("interstellar_dyson_sphere_title"),desc:e=>!t.interstellar.hasOwnProperty("dyson_sphere")||t.interstellar.dyson_sphere.count<100||e?`
                            ${F("interstellar_dyson_sphere_title")}
                            ${F("requires_segmemts",[100])}
                            `:`
                            ${F("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`
                            ${F("interstellar_dyson_sphere_effect")}
                            ${F("space_dwarf_reactor_effect1",[As(e)])}
                            ${F("space_dwarf_collider_effect2",[t])}
                            `}return F("interstellar_dyson_sphere_complete",[As(750)])},action(){return!!(ii($(this)[0])&&t.interstellar.dyson_sphere.count<100)&&(At("dyson_sphere","interstellar"),t.interstellar.dyson_sphere.count>=100&&Jr(),!0)}},orichalcum_sphere:{id:"interstellar-orichalcum_sphere",title:F("interstellar_dyson_sphere_title"),desc:e=>!t.interstellar.hasOwnProperty("orichalcum_sphere")||t.interstellar.orichalcum_sphere.count<100||e?`
                            ${F("interstellar_orichalcum_sphere_desc")}
                            ${F("requires_segmemts",[100])}
                            `:`
                            ${F("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`
                            ${F("interstellar_orichalcum_sphere_effect")}
                            ${F("space_dwarf_reactor_effect1",[As(e)])}
                            ${F("space_dwarf_collider_effect2",[t])}
                            `}return F("interstellar_dyson_sphere_complete",[As(1750)])},action(){return!!(ii($(this)[0])&&t.interstellar.orichalcum_sphere.count<100)&&(At("orichalcum_sphere","interstellar"),t.interstellar.orichalcum_sphere.count>=100&&Pn("blacken_the_sun"),!0)}}},int_nebula:{info:{name:F("interstellar_nebula_name"),desc:()=>t.tech.nebula?F("interstellar_nebula_desc2"):F("interstellar_nebula_desc1"),support:"nexus"},nebula_mission:{id:"interstellar-nebula_mission",title:F("space_mission_title",[F("interstellar_nebula_name")]),desc:F("space_mission_desc",[F("interstellar_nebula_name")]),reqs:{alpha:1},grant:["nebula",1],queue_complete:()=>t.tech.nebula>=1?0:1,cost:{Helium_3:()=>+Ut(55e3).toFixed(0)},effect:F("interstellar_nebula_mission_effect"),action(){return!!ii($(this)[0])&&(ms(F("interstellar_nebula_mission_result"),"info",!1,["progress"]),!0)}},nexus:{id:"interstellar-nexus",title:F("interstellar_nexus_title"),desc:()=>`
                            ${F("interstellar_nexus_title")}
                            ${F("requires_power_combo",[t.resource.Money.name])}
                            `,reqs:{nebula:1},cost:{Money:e=>js("nexus",e,9e5,1.24,"interstellar"),Adamantite:e=>js("nexus",e,7500,1.24,"interstellar"),Infernite:e=>js("nexus",e,250,1.24,"interstellar"),Sheet_Metal:e=>js("nexus",e,14e3,1.24,"interstellar"),Nano_Tube:e=>js("nexus",e,17500,1.24,"interstellar")},effect(){let e=wr(3500),t=wr(4e3),a=wr(3e3),r=wr(25);return`
                            ${F("interstellar_nexus_effect1",[$(this)[0].support()])}
                            ${F("plus_max_resource",[e,F("resource_Oil_name")])}
                            ${F("plus_max_resource",[t,F("resource_Helium_3_name")])}
                            ${F("plus_max_resource",[a,F("resource_Deuterium_name")])}
                            ${F("plus_max_resource",[r,F("resource_Elerium_name")])}
                            ${F("interstellar_nexus_effect2",[$(this)[0].powered(),350])}
                            `},support:()=>2,powered:()=>Is(8),powerBalancer:()=>[{s:t.interstellar.nexus.s_max-t.interstellar.nexus.support}],refresh:!0,action(){return!!ii($(this)[0])&&(At("nexus","interstellar"),t.resource.Deuterium.display=!0,1===t.tech.nebula&&(t.interstellar.harvester={count:0,on:0},t.tech.nebula=2),ei($(this)[0])&&(t.resource.Oil.max+=wr(2500),t.resource.Helium_3.max+=wr(4e3),t.resource.Deuterium.max+=wr(3e3),t.resource.Elerium.max+=wr(25)),!0)}},harvester:{id:"interstellar-harvester",title:F("interstellar_harvester_title"),desc:`
                            ${F("interstellar_harvester_title")}
                            ${F("space_support",[F("interstellar_nebula_name")])}
                            `,reqs:{nebula:2},cost:{Money:e=>js("harvester",e,65e4,1.28,"interstellar"),Copper:e=>js("harvester",e,8e4,1.28,"interstellar"),Alloy:e=>js("harvester",e,45e3,1.28,"interstellar"),Iridium:e=>js("harvester",e,8e3,1.28,"interstellar")},effect(){let e=+xe("harvester","helium").toFixed(3),a=+xe("harvester","deuterium").toFixed(3),r=t.tech.ram_scoop?`
                            ${F("interstellar_harvester_effect",[a])}
                            `:"";return`
                            ${F("space_used_support",[F("interstellar_nebula_name")])}
                            ${F("space_gas_mining_effect1",[e])}
                            ${r}`},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("harvester","interstellar"),t.interstellar.nexus.support${F("interstellar_elerium_prospector_title")}
                            ${F("space_support",[F("interstellar_nebula_name")])}
                            `,reqs:{nebula:3},cost:{Money:e=>js("elerium_prospector",e,825e3,1.28,"interstellar"),Steel:e=>js("elerium_prospector",e,18e3,1.28,"interstellar"),Polymer:e=>js("elerium_prospector",e,22e3,1.28,"interstellar"),Graphene:e=>js("elerium_prospector",e,82e3,1.28,"interstellar"),Stanene:e=>js("elerium_prospector",e,57e3,1.28,"interstellar")},effect(){let e=+xe("elerium_prospector").toFixed(3);return`
                            ${F("space_used_support",[F("interstellar_nebula_name")])}
                            ${F("space_belt_elerium_ship_effect2",[e])}
                            `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("elerium_prospector","interstellar"),t.interstellar.nexus.supportt.tech.neutron?F("interstellar_neutron_desc2",[Di[t.race.species].home]):F("interstellar_neutron_desc1")},neutron_mission:{id:"interstellar-neutron_mission",title:F("space_mission_title",[F("interstellar_neutron_name")]),desc:F("space_mission_desc",[F("interstellar_neutron_name")]),reqs:{nebula:1,high_tech:14},grant:["neutron",1],queue_complete:()=>t.tech.neutron>=1?0:1,cost:{Helium_3:()=>+Ut(6e4).toFixed(0),Deuterium:()=>+Ut(1e4).toFixed(0)},effect:F("interstellar_neutron_mission_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.neutron_miner={count:0,on:0},ms(F("interstellar_neutron_mission_result"),"info",!1,["progress"]),!0)}},neutron_miner:{id:"interstellar-neutron_miner",title:F("interstellar_neutron_miner_title"),desc:()=>`
                            ${F("interstellar_neutron_miner_desc")}
                            ${F("requires_power_combo",[t.resource.Helium_3.name])}
                            `,reqs:{neutron:1},cost:{Money:e=>js("neutron_miner",e,1e6,1.32,"interstellar"),Titanium:e=>js("neutron_miner",e,45e3,1.32,"interstellar"),Stanene:e=>js("neutron_miner",e,88e3,1.32,"interstellar"),Elerium:e=>js("neutron_miner",e,20,1.32,"interstellar"),Aerogel:e=>js("neutron_miner",e,50,1.32,"interstellar")},effect(){let e=+xe("neutron_miner").toFixed(3),t=wr(500),a=+Ut(3).toFixed(2);return`
                            ${F("space_gas_moon_outpost_effect1",[e])}
                            ${F("plus_max_resource",[t,F("resource_Neutronium_name")])}
                            ${F("interstellar_alpha_starport_effect2",[a,$(this)[0].powered()])}
                            `},powered:()=>Is(6),powerBalancer:()=>[{r:"Neutronium",k:"lpmod"}],action(){return!!ii($(this)[0])&&(At("neutron_miner","interstellar"),ei($(this)[0]),!0)}},citadel:{id:"interstellar-citadel",title:F("interstellar_citadel_title"),desc:`
                            ${F("interstellar_citadel_desc")}
                            ${F("requires_power")}
                            `,reqs:{neutron:1,high_tech:15},cost:{Money:e=>js("citadel",e,5e6,1.25,"interstellar"),Knowledge:e=>js("citadel",e,15e5,1.15,"interstellar"),Graphene:e=>js("citadel",e,5e4,1.25,"interstellar"),Stanene:e=>js("citadel",e,1e5,1.25,"interstellar"),Elerium:e=>js("citadel",e,250,1.25,"interstellar"),Soul_Gem:e=>js("citadel",e,1,1.25,"interstellar")},wide:!0,effect(){let e=`
                            ${F("interstellar_citadel_stat",[+_.toFixed(1)])}
                            ${F("interstellar_citadel_effect",[5])}
                            `;if(t.tech.ai_core){let a=+(_/1.75).toFixed(1);t.race.flier||(e+=`
                            ${F("interstellar_citadel_effect2",[a])}
                            `),t.tech.ai_core>=2&&(e+=`
                            ${F("interstellar_citadel_effect3",[2])}
                            `),t.tech.ai_core>=3&&(e+=`
                            ${F("interstellar_citadel_effect4",[+(_/5).toFixed(1)])}
                            `)}return`${e}
                            ${F("interstellar_citadel_power",[$(this)[0].powered(),Is(2.5)])}
                            `},powered:()=>s.citadel&&s.citadel>1?Is(30+2.5*(s.citadel-1)):Is(30),action(){return!!ii($(this)[0])&&(At("citadel","interstellar"),ei($(this)[0]),!0)},flair:()=>F("interstellar_citadel_flair")},stellar_forge:{id:"interstellar-stellar_forge",title:F("interstellar_stellar_forge_title"),desc:`
                            ${F("interstellar_stellar_forge_title")}
                            ${F("requires_power")}
                            `,reqs:{star_forge:1},cost:{Money:e=>js("stellar_forge",e,12e5,1.25,"interstellar"),Iridium:e=>js("stellar_forge",e,25e4,1.25,"interstellar"),Bolognium:e=>js("stellar_forge",e,35e3,1.25,"interstellar"),Aerogel:e=>js("stellar_forge",e,75e3,1.25,"interstellar")},effect(){let e=`
                            ${F("city_foundry_effect1",[aa(2)])}
                            ${F("interstellar_stellar_forge_effect",[10])}
                            ${F("interstellar_stellar_forge_effect2",[5])}
                            `;return t.tech.star_forge&&t.tech.star_forge>=2&&(e+=`
                            ${F("interstellar_stellar_forge_effect3",[2])}
                            `),`${e}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(3),special:!0,action(){return!!ii($(this)[0])&&(At("stellar_forge","interstellar"),ei($(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:()=>F("interstellar_stellar_forge_flair")}},int_blackhole:{info:{name:F("interstellar_blackhole_name"),desc(){let e=Di[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 i=Ns("bigbang"),s="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name");return`
                            ${F("interstellar_blackhole_desc4",[e,a,r])}
                            ${F("interstellar_blackhole_desc5",[i.plasmid,i.phage,i.dark,s])}
                            `}return t.interstellar.stellar_engine.exotic>0?F("interstellar_blackhole_desc4",[e,a,r]):F("interstellar_blackhole_desc3",[e,a])}return t.tech.blackhole?F("interstellar_blackhole_desc2",[e]):F("interstellar_blackhole_desc1",[e])}},blackhole_mission:{id:"interstellar-blackhole_mission",title:F("space_mission_title",[F("interstellar_blackhole_name")]),desc:F("space_mission_desc",[F("interstellar_blackhole_name")]),reqs:{nebula:1},grant:["blackhole",1],queue_complete:()=>t.tech.blackhole>=1?0:1,cost:{Helium_3:()=>+Ut(75e3).toFixed(0),Deuterium:()=>+Ut(25e3).toFixed(0)},effect:F("interstellar_blackhole_mission_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.far_reach={count:0,on:0},ms(F("interstellar_blackhole_mission_result"),"info",!1,["progress"]),!0)}},far_reach:{id:"interstellar-far_reach",title:F("interstellar_far_reach"),desc:`
                            ${F("interstellar_far_reach_desc")}
                            ${F("requires_power")}
                            `,reqs:{blackhole:1},cost:{Money:e=>js("far_reach",e,1e6,1.32,"interstellar"),Knowledge:e=>js("far_reach",e,1e5,1.32,"interstellar"),Neutronium:e=>js("far_reach",e,2500,1.32,"interstellar"),Elerium:e=>js("far_reach",e,100,1.32,"interstellar"),Aerogel:e=>js("far_reach",e,1e3,1.32,"interstellar")},effect(){return`
                            ${F("interstellar_far_reach_effect",[1])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(5),action(){return!!ii($(this)[0])&&(At("far_reach","interstellar"),ei($(this)[0]),1===t.tech.blackhole&&(t.tech.blackhole=2,Jr()),!0)},flair:F("interstellar_far_reach_flair")},stellar_engine:{id:"interstellar-stellar_engine",title:F("interstellar_stellar_engine"),desc:e=>!t.interstellar.hasOwnProperty("stellar_engine")||t.interstellar.stellar_engine.count<100||e?`
                            ${F("interstellar_stellar_engine")}
                            ${F("requires_segmemts",[100])}
                            `:`
                            ${F("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`
                            ${F("interstellar_stellar_engine_effect")}
                            ${F("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=As(+(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),i=t.interstellar.stellar_engine.exotic>0?F("interstellar_stellar_engine_effect3",[a,e]):F("interstellar_stellar_engine_effect2",[a]);return`
                            ${F("interstellar_stellar_engine_complete",[r])}
                            ${i}
                            `}return F("interstellar_stellar_engine_complete",[r])}},action(){return!!(ii($(this)[0])&&t.interstellar.stellar_engine.count<100)&&(At("stellar_engine","interstellar"),t.interstellar.stellar_engine.count>=100&&3===t.tech.blackhole&&(t.tech.blackhole=4,Jr()),!0)}},mass_ejector:{id:"interstellar-mass_ejector",title:F("interstellar_mass_ejector"),desc:`
                            ${F("interstellar_mass_ejector")}
                            ${F("requires_power")}
                            `,reqs:{blackhole:5},cost:{Money:e=>js("mass_ejector",e,75e4,1.25,"interstellar"),Adamantite:e=>js("mass_ejector",e,125e3,1.25,"interstellar"),Infernite:e=>js("mass_ejector",e,275,1.25,"interstellar"),Elerium:e=>js("mass_ejector",e,100,1.25,"interstellar"),Mythril:e=>js("mass_ejector",e,1e4,1.25,"interstellar")},effect(){return`
                            ${F("interstellar_mass_ejector_effect")}, ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(3),special:!0,sAction(){t.settings.civTabs=4,t.settings.marketTabs=2,t.settings.tabLoad||($t("mTabResource"),ds("interstellar-mass_ejector"))},action(){return!!ii($(this)[0])&&(0===t.interstellar.mass_ejector.count&&ms(F("interstellar_mass_ejector_msg"),"info",!1,["progress"]),t.settings.showEjector=!0,At("mass_ejector","interstellar"),ei($(this)[0]),Cs($("#resources")),Ba(),!0)},flair:()=>F("interstellar_mass_ejector_flair")},jump_ship:{id:"interstellar-jump_ship",title:F("interstellar_jump_ship"),desc:F("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:F("interstellar_jump_ship_effect"),action(){return!!ii($(this)[0])}},wormhole_mission:{id:"interstellar-wormhole_mission",title:F("space_mission_title",[F("interstellar_wormhole_name")]),desc:F("space_mission_desc",[F("interstellar_wormhole_name")]),reqs:{stargate:2},grant:["stargate",3],queue_complete:()=>t.tech.stargate>=3?0:1,cost:{Helium_3:()=>+Ut(15e4).toFixed(0),Deuterium:()=>+Ut(75e3).toFixed(0)},effect:F("interstellar_wormhole_mission_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.stargate={count:0},t.galaxy.gateway_station={count:0,on:0},ms(F("interstellar_wormhole_mission_result"),"info",!1,["progress"]),!0)}},stargate:{id:"interstellar-stargate",title:F("interstellar_stargate"),desc:e=>!t.interstellar.hasOwnProperty("stargate")||t.interstellar.stargate.count<200||e?`
                            ${F("interstellar_stargate")}
                            ${F("requires_segmemts",[200])}
                            `+(t.interstellar.hasOwnProperty("stargate")&&t.interstellar.stargate.count>=200?`
                            ${F("requires_power")}
                            `:""):`
                            ${F("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`
                            ${F("interstellar_stargate_effect")}
                            ${F("space_dwarf_collider_effect2",[e])}
                            `}return qt.int_blackhole.s_gate.effect()},action(){return!!(ii($(this)[0])&&t.interstellar.stargate.count<200)&&(At("stargate","interstellar"),t.interstellar.stargate.count>=200&&(t.tech.stargate=4,t.interstellar.s_gate={count:1,on:0},t.city.power>=qt.int_blackhole.s_gate.powered()&&t.interstellar.s_gate.on++,Dt(),ds()),!0)}},s_gate:{id:"interstellar-s_gate",title:F("interstellar_stargate"),desc:()=>`
                            ${F("interstellar_stargate")}
                            ${F("requires_power")}
                            `,reqs:{stargate:4},condition:()=>t.interstellar.stargate.count>=200,wiki:!1,queue_complete:()=>0,cost:{},powered:()=>Is(250),effect(){return`
                            ${F("interstellar_s_gate_effect")}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},action:()=>!1}},int_sirius:{info:{name:()=>t.tech.ascension>=3?F("interstellar_sirius_b_name"):F("interstellar_sirius_name"),desc:()=>t.tech.ascension>=3?F("interstellar_sirius_b_desc"):F("interstellar_sirius_desc",[Di[t.race.species].home])},sirius_mission:{id:"interstellar-sirius_mission",title:F("space_mission_title",[F("interstellar_sirius_name")]),desc:F("space_mission_desc",[F("interstellar_sirius_name")]),reqs:{ascension:2},grant:["ascension",3],queue_complete:()=>t.tech.ascension>=3?0:1,cost:{Helium_3:()=>+Ut(48e4).toFixed(0),Deuterium:()=>+Ut(225e3).toFixed(0)},effect:()=>F("interstellar_sirius_mission_effect",[cn("name"),Di[t.race.species].home]),action(){return!!ii($(this)[0])}},sirius_b:{id:"interstellar-sirius_b",title:F("interstellar_sirius_b"),desc:F("interstellar_sirius_b"),reqs:{ascension:3},grant:["ascension",4],queue_complete:()=>t.tech.ascension>=4?0:1,cost:{Knowledge:()=>2e7},effect:()=>F("interstellar_sirius_b_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.space_elevator={count:0},!0)}},space_elevator:{id:"interstellar-space_elevator",title:F("interstellar_space_elevator"),desc:e=>!t.interstellar.hasOwnProperty("space_elevator")||t.interstellar.space_elevator.count<100||e?`
                            ${F("interstellar_space_elevator")}
                            ${F("requires_segmemts",[100])}
                            `:`
                            ${F("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=`
                            ${F("interstellar_space_elevator_effect")}
                            `,r=(e||0)+(t.interstellar.hasOwnProperty("space_elevator")?t.interstellar.space_elevator.count:0);return r<100&&(a+=`
                            ${F("space_dwarf_collider_effect2",[100-r])}
                            `),a},action(){return!!(ii($(this)[0])&&t.interstellar.space_elevator.count<100)&&(At("space_elevator","interstellar"),t.interstellar.space_elevator.count>=100&&(t.tech.ascension=5,t.interstellar.gravity_dome={count:0},Dt(),ds()),!0)}},gravity_dome:{id:"interstellar-gravity_dome",title:F("interstellar_gravity_dome"),desc:e=>!t.interstellar.hasOwnProperty("gravity_dome")||t.interstellar.gravity_dome.count<100||e?`
                            ${F("interstellar_gravity_dome")}
                            ${F("requires_segmemts",[100])}
                            `:`
                            ${F("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=`
                            ${F("interstellar_gravity_dome_effect",[Di[t.race.species].home])}
                            `,r=(e||0)+(t.interstellar.hasOwnProperty("gravity_dome")?t.interstellar.gravity_dome.count:0);return r<100&&(a+=`
                            ${F("space_dwarf_collider_effect2",[100-r])}
                            `),a},action(){return!!(ii($(this)[0])&&t.interstellar.gravity_dome.count<100)&&(At("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},Dt(),ds()),!0)}},ascension_machine:{id:"interstellar-ascension_machine",title:F("interstellar_ascension_machine"),desc:e=>!t.interstellar.hasOwnProperty("ascension_machine")||t.interstellar.ascension_machine.count<100||e?`
                            ${F("interstellar_ascension_machine")}
                            ${F("requires_segmemts",[100])}
                            `+(t.interstellar.hasOwnProperty("ascension_machine")&&t.interstellar.ascension_machine.count>=100?`
                            ${F("requires_power")}
                            `:""):`
                            ${F("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`
                            ${F("interstellar_ascension_machine_effect",[cn("name")])}
                            ${F("space_dwarf_collider_effect2",[e])}
                            `}return qt.int_sirius.ascension_trigger.effect()},action(){return!!(ii($(this)[0])&&t.interstellar.ascension_machine.count<100)&&(At("ascension_machine","interstellar"),t.interstellar.ascension_machine.count>=100&&(t.tech.ascension=7,t.interstellar.ascension_trigger={count:1,on:0},Dt(),ds()),!0)}},ascension_trigger:{id:"interstellar-ascension_trigger",title:F("interstellar_ascension_machine"),desc:()=>`
                            ${F("interstellar_ascension_machine")}
                            ${F("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(Is(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=s.ascension_trigger?8:7,Dt()}),250):(t.tech.ascension=7,Dt())},effect(){let e=Pt(),t=$(this)[0].powered(),a=t>0?`
                            ${F("minus_power",[t])}
                            `:"";return`
                            ${F("interstellar_ascension_trigger_effect")}
                            ${e}${a}`},action:()=>!1},ascend:{id:"interstellar-ascend",title:F("interstellar_ascend"),desc:F("interstellar_ascend"),reqs:{ascension:8},queue_complete:()=>0,no_multi:!0,cost:{},effect(){let e=Pt();return`
                            ${F("interstellar_ascend_effect")}
                            ${e}`},action(){return!!ii($(this)[0])&&(Jt(),!0)}},thermal_collector:{id:"interstellar-thermal_collector",title:F("interstellar_thermal_collector"),desc:F("interstellar_thermal_collector"),reqs:{ascension:6},cost:{Money:e=>js("thermal_collector",e,5e6,1.08,"interstellar"),Infernite:e=>js("thermal_collector",e,25e3,1.08,"interstellar"),Stanene:e=>js("thermal_collector",e,1e6,1.08,"interstellar"),Vitreloy:e=>js("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 F("interstellar_thermal_collector_effect",[e])},action(){return!!ii($(this)[0])&&(At("thermal_collector","interstellar"),!0)}}}};function Pt(){let e=Ns("ascend"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name");return`
                            ${F("interstellar_ascension_trigger_effect2",[e.plasmid,a])}
                            ${F("interstellar_ascension_trigger_effect2",[e.phage,F("resource_Phage_name")])}
                            ${F("interstellar_ascension_trigger_effect2",[e.harmony,F("resource_Harmony_name")])}
                            ${F("interstellar_ascension_trigger_effect3")}
                            `}function jt(){let e=Ns("terraform"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name");return`
                            ${F("interstellar_ascension_trigger_effect2",[e.plasmid,a])}
                            ${F("interstellar_ascension_trigger_effect2",[e.phage,F("resource_Phage_name")])}
                            ${F("interstellar_ascension_trigger_effect2",[e.harmony,F("resource_Harmony_name")])}
                            ${F("space_terraformer_effect3")}
                            `}const Ot={gxy_gateway:{info:{name:F("galaxy_gateway"),desc:()=>F("galaxy_gateway_desc"),control:()=>({name:cn("name"),color:"success"}),support:"starbase"},gateway_mission:{id:"galaxy-gateway_mission",title:F("galaxy_gateway_mission"),desc:F("galaxy_gateway_mission"),reqs:{gateway:1},grant:["gateway",2],queue_complete:()=>t.tech.gateway>=2?0:1,cost:{Helium_3:()=>+Ut(212e3).toFixed(0),Deuterium:()=>+Ut(11e4).toFixed(0)},effect:F("galaxy_gateway_mission_effect"),action(){return!!ii($(this)[0])&&(Ct(),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:F("galaxy_starbase"),desc:()=>`
                            ${F("galaxy_starbase")}
                            ${F("requires_power_space",[t.resource.Food.name])}
                            `,reqs:{gateway:2},cost:{Money:e=>js("starbase",e,42e5,1.25,"galaxy"),Elerium:e=>js("starbase",e,1e3,1.25,"galaxy"),Mythril:e=>js("starbase",e,9e4,1.25,"galaxy"),Graphene:e=>js("starbase",e,32e4,1.25,"galaxy"),Horseshoe:()=>t.race.hooved?5:0},effect(){let e=+Ut(25).toFixed(2),a=t.tech.marines>=2?aa(8):aa(5);return`
                            ${F("galaxy_defense_platform_effect",[25])}
                            ${F("galaxy_gateway_support",[$(this)[0].support()])}
                            ${F("plus_max_soldiers",[a])}
                            ${F("interstellar_alpha_starport_effect2",[e,$(this)[0].powered()])}
                            ${F("interstellar_alpha_starport_effect3",[250,t.resource.Food.name])}
                            `},support:()=>2,powered:()=>Is(s.s_gate?12:0),powerBalancer:()=>[{s:t.galaxy.starbase.s_max-t.galaxy.starbase.support}],refresh:!0,action(){return!!ii($(this)[0])&&(At("starbase","galaxy"),ei($(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:F("galaxy_ship_dock"),desc:`
                            ${F("galaxy_ship_dock")}
                            ${F("requires_power")}
                            `,reqs:{gateway:4},cost:{Money:e=>js("ship_dock",e,36e5,1.25,"galaxy"),Steel:e=>js("ship_dock",e,88e4,1.25,"galaxy"),Aluminium:e=>js("ship_dock",e,12e5,1.25,"galaxy"),Bolognium:e=>js("ship_dock",e,75e3,1.25,"galaxy")},effect(){return`
                            ${F("galaxy_ship_dock_effect",[.25])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},support:()=>s.starbase?.25*s.starbase:0,powered:()=>Is(s.s_gate?4:0),powerBalancer:()=>[{s:t.galaxy.starbase.s_max-t.galaxy.starbase.support}],action(){return!!ii($(this)[0])&&(At("ship_dock","galaxy"),ei($(this)[0]),!0)}},bolognium_ship:{id:"galaxy-bolognium_ship",title:F("galaxy_bolognium_ship"),desc:()=>`
                            ${F("galaxy_bolognium_ship_desc")}
                            ${F("galaxy_starbase_support",[F("resource_Helium_3_name")])}
                            `,reqs:{gateway:3},cost:{Money:e=>js("bolognium_ship",e,14e5,1.22,"galaxy"),Iron:e=>js("bolognium_ship",e,56e4,1.22,"galaxy"),Infernite:e=>js("bolognium_ship",e,1800,1.22,"galaxy"),Nano_Tube:e=>js("bolognium_ship",e,475e3,1.22,"galaxy")},effect(){let e=+xe("bolognium_ship").toFixed(3),a=+Ut($(this)[0].ship.helium).toFixed(2);return`
                            ${F("gain",[e,F("resource_Bolognium_name")])}
                            ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                            ${F("galaxy_gateway_used_support",[-$(this)[0].support()])}
                            ${F("spend",[a,t.resource.Helium_3.name])}
                            `},support:()=>-1,ship:{civ:()=>t.race.high_pop?2*Ki.high_pop.vars()[0]:2,mil:()=>0,helium:5},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("bolognium_ship","galaxy"),t.resource.Bolognium.display=!0,t.civic.crew.display=!0,t.galaxy.starbase.support`
                            ${F("galaxy_scout_ship")}
                            ${F("galaxy_starbase_support",[F("resource_Helium_3_name")])}
                            `,reqs:{andromeda:1},cost:{Money:e=>js("scout_ship",e,16e5,1.25,"galaxy"),Titanium:e=>js("scout_ship",e,325e3,1.25,"galaxy"),Graphene:e=>js("scout_ship",e,118e3,1.25,"galaxy"),Soul_Gem:e=>js("scout_ship",e,1,1.02,"galaxy")},effect(){let e=+Ut($(this)[0].ship.helium).toFixed(2),a=t.tech.science>=17?`
                            ${F("galaxy_scout_ship_effect2",[25])}
                            `:"";return`
                            ${F("galaxy_ship_rating",[$(this)[0].ship.rating()])}
                            ${F("galaxy_scout_ship_effect")}
                            ${a}
                            ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                            ${F("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
                            ${F("galaxy_gateway_used_support",[-$(this)[0].support()])}
                            ${F("spend",[e,t.resource.Helium_3.name])}
                            `},support:()=>-1,ship:{civ:()=>t.race.high_pop?1*Ki.high_pop.vars()[0]:1,mil:()=>t.race.high_pop?1*Ki.high_pop.vars()[0]:1,helium:6,rating:()=>t.race.banana?7:10},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("scout_ship","galaxy"),t.galaxy.defense.gxy_gateway.scout_ship++,t.galaxy.starbase.support`
                            ${F("galaxy_corvette_ship")}
                            ${F("galaxy_starbase_support",[F("resource_Helium_3_name")])}
                            `,reqs:{andromeda:2},cost:{Money:e=>js("corvette_ship",e,45e5,1.25,"galaxy"),Steel:e=>js("corvette_ship",e,175e4,1.25,"galaxy"),Infernite:e=>js("corvette_ship",e,16e3,1.25,"galaxy"),Bolognium:e=>js("corvette_ship",e,35e3,1.25,"galaxy"),Soul_Gem:e=>js("corvette_ship",e,1,1.25,"galaxy")},effect(){let e=+Ut($(this)[0].ship.helium).toFixed(2);return`
                            ${F("galaxy_ship_rating",[$(this)[0].ship.rating()])}
                            ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                            ${F("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
                            ${F("galaxy_gateway_used_support",[-$(this)[0].support()])}
                            ${F("spend",[e,t.resource.Helium_3.name])}
                            `},support:()=>-1,ship:{civ:()=>t.race.high_pop?2*Ki.high_pop.vars()[0]:2,mil:()=>t.race.high_pop?3*Ki.high_pop.vars()[0]:3,helium:10,rating:()=>t.race.banana?21:30},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("corvette_ship","galaxy"),t.galaxy.defense.gxy_gateway.corvette_ship++,t.galaxy.starbase.support`
                            ${F("galaxy_frigate_ship")}
                            ${F("galaxy_starbase_support",[F("resource_Helium_3_name")])}
                            `,reqs:{andromeda:3},cost:{Money:e=>js("frigate_ship",e,18e6,1.25,"galaxy"),Elerium:e=>js("frigate_ship",e,1250,1.25,"galaxy"),Mythril:e=>js("frigate_ship",e,35e4,1.25,"galaxy"),Sheet_Metal:e=>js("frigate_ship",e,8e5,1.25,"galaxy"),Soul_Gem:e=>js("frigate_ship",e,2,1.25,"galaxy")},effect(){let e=+Ut($(this)[0].ship.helium).toFixed(2);return`
                            ${F("galaxy_ship_rating",[$(this)[0].ship.rating()])}
                            ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                            ${F("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
                            ${F("galaxy_gateway_used_support",[-$(this)[0].support()])}
                            ${F("spend",[e,t.resource.Helium_3.name])}
                            `},support:()=>-2,ship:{civ:()=>t.race.high_pop?3*Ki.high_pop.vars()[0]:3,mil:()=>t.race.high_pop?5*Ki.high_pop.vars()[0]:5,helium:25,rating:()=>t.race.banana?56:80},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("frigate_ship","galaxy"),t.galaxy.defense.gxy_gateway.frigate_ship++,t.galaxy.starbase.support+1`
                            ${F("galaxy_cruiser_ship")}
                            ${F("galaxy_starbase_support",[F("resource_Deuterium_name")])}
                            `,reqs:{andromeda:4},cost:{Money:e=>js("cruiser_ship",e,75e6,1.25,"galaxy"),Copper:e=>js("cruiser_ship",e,6e6,1.25,"galaxy"),Adamantite:e=>js("cruiser_ship",e,1e6,1.25,"galaxy"),Vitreloy:e=>js("cruiser_ship",e,75e4,1.25,"galaxy"),Elerium:e=>js("cruiser_ship",e,1800,1.25,"galaxy"),Soul_Gem:e=>js("cruiser_ship",e,5,1.25,"galaxy")},effect(){let e=+Ut($(this)[0].ship.deuterium).toFixed(2);return`
                            ${F("galaxy_ship_rating",[$(this)[0].ship.rating()])}
                            ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                            ${F("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
                            ${F("galaxy_gateway_used_support",[-$(this)[0].support()])}
                            ${F("spend",[e,t.resource.Deuterium.name])}
                            `},support:()=>-3,ship:{civ:()=>t.race.high_pop?6*Ki.high_pop.vars()[0]:6,mil:()=>t.race.high_pop?10*Ki.high_pop.vars()[0]:10,deuterium:25,rating:()=>t.race.banana?175:250},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("cruiser_ship","galaxy"),t.galaxy.defense.gxy_gateway.cruiser_ship++,t.galaxy.starbase.support+2`
                            ${F("galaxy_dreadnought")}
                            ${F("galaxy_starbase_support",[F("resource_Deuterium_name")])}
                            `,reqs:{andromeda:5},cost:{Money:e=>js("dreadnought",e,225e6,1.25,"galaxy"),Neutronium:e=>js("dreadnought",e,25e4,1.25,"galaxy"),Bolognium:e=>js("dreadnought",e,15e5,1.25,"galaxy"),Vitreloy:e=>js("dreadnought",e,1e6,1.25,"galaxy"),Infernite:e=>js("dreadnought",e,4e5,1.25,"galaxy"),Aerogel:e=>js("dreadnought",e,8e5,1.25,"galaxy"),Soul_Gem:e=>js("dreadnought",e,25,1.25,"galaxy")},effect(){let e=+Ut($(this)[0].ship.deuterium).toFixed(2);return`
                            ${F("galaxy_ship_rating",[$(this)[0].ship.rating()])}
                            ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                            ${F("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
                            ${F("galaxy_gateway_used_support",[-$(this)[0].support()])}
                            ${F("spend",[e,t.resource.Deuterium.name])}
                            `},support:()=>-5,ship:{civ:()=>t.race.high_pop?10*Ki.high_pop.vars()[0]:10,mil:()=>t.race.high_pop?20*Ki.high_pop.vars()[0]:20,deuterium:80,rating:()=>t.race.banana?1260:1800},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("dreadnought","galaxy"),t.galaxy.defense.gxy_gateway.dreadnought++,t.galaxy.starbase.support+2t.tech.piracy?F("galaxy_stargate_desc_alt"):F("galaxy_stargate_desc"),control:()=>({name:cn("name"),color:"success"})},gateway_station:{id:"galaxy-gateway_station",title:F("galaxy_gateway_station"),desc:()=>`
                            ${F("galaxy_gateway_station_desc")}
                            ${F("requires_power")}
                            `,reqs:{stargate:4},cost:{Money:e=>js("gateway_station",e,5e6,1.25,"galaxy"),Aluminium:e=>js("gateway_station",e,52e4,1.25,"galaxy"),Polymer:e=>js("gateway_station",e,35e4,1.25,"galaxy"),Neutronium:e=>js("gateway_station",e,17500,1.25,"galaxy")},effect(){let e=wr(2e3),a=wr(4500),r=wr(50),i="";return t.tech.gateway&&t.tech.gateway>=2&&(i=`
                            ${F("galaxy_gateway_support",[$(this)[0].support()])}
                            `),`${i}
                            ${F("plus_max_resource",[e,F("resource_Helium_3_name")])}
                            ${F("plus_max_resource",[a,F("resource_Deuterium_name")])}
                            ${F("plus_max_resource",[r,F("resource_Elerium_name")])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},support:()=>.5,powered:()=>Is(s.s_gate?4:0),powerBalancer:()=>!t.galaxy.hasOwnProperty("starbase")&&[{s:t.galaxy.starbase.s_max-t.galaxy.starbase.support}],refresh:!0,action(){return!!ii($(this)[0])&&(At("gateway_station","galaxy"),t.resource.Helium_3.max+=wr(2e3),t.resource.Deuterium.max+=wr(4500),4===t.tech.stargate&&(t.galaxy.telemetry_beacon={count:0,on:0},t.tech.stargate=5),ei($(this)[0]),!0)}},telemetry_beacon:{id:"galaxy-telemetry_beacon",title:F("galaxy_telemetry_beacon"),desc:()=>`
                            ${F("galaxy_telemetry_beacon")}
                            ${F("requires_power")}
                            `,reqs:{stargate:5},cost:{Money:e=>js("telemetry_beacon",e,225e4,1.25,"galaxy"),Copper:e=>js("telemetry_beacon",e,685e3,1.25,"galaxy"),Alloy:e=>js("telemetry_beacon",e,425e3,1.25,"galaxy"),Iridium:e=>js("telemetry_beacon",e,177e3,1.25,"galaxy")},effect(){let e=t.tech.telemetry?1200:800;t.tech.science>=17&&(e+=25*o.scout_ship);let a=s.telemetry_beacon?e*s.telemetry_beacon:0,r="";return t.tech.gateway&&t.tech.gateway>=2&&(r=`
                            ${F("galaxy_gateway_support",[$(this)[0].support()])}
                            `),`${r}
                            ${F("galaxy_telemetry_beacon_effect1",[e])}
                            ${F("galaxy_telemetry_beacon_effect2",[a])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},support:()=>t.tech.telemetry?.75:.5,powered:()=>Is(s.s_gate?4:0),powerBalancer:()=>!t.galaxy.hasOwnProperty("starbase")&&[{s:t.galaxy.starbase.s_max-t.galaxy.starbase.support}],postPower(e){let a=e?s.telemetry_beacon+b():s.telemetry_beacon-b();a>t.galaxy.telemetry_beacon.count?a=t.galaxy.telemetry_beacon.count:a<0&&(a=0),s.telemetry_beacon=a,ri($(this)[0],"galaxy","telemetry_beacon")},action(){return!!ii($(this)[0])&&(At("telemetry_beacon","galaxy"),ei($(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,Bt()),!0)}},gateway_depot:{id:"galaxy-gateway_depot",title:F("galaxy_gateway_depot"),desc:`
                            ${F("galaxy_gateway_depot")}
                            `,reqs:{gateway:5},cost:{Money:e=>js("gateway_depot",e,4e6,1.25,"galaxy"),Neutronium:e=>js("gateway_depot",e,8e4,1.25,"galaxy"),Stanene:e=>js("gateway_depot",e,5e5,1.25,"galaxy"),Vitreloy:e=>js("gateway_depot",e,2500,1.25,"galaxy")},wide:!0,effect(){let e=t.tech.world_control?150:100,a=wr(200),r=zt(),i=q(+wr(3e3*r).toFixed(0),1),s=q(+wr(25e4*r).toFixed(0),1),n=q(+wr(9001*r).toFixed(0),1),c=q(+wr(6660*r).toFixed(0),1),o='
                            ';return o+=`${F("plus_max_crates",[e])}${F("plus_max_containers",[e])}`,o+=`${F("plus_max_resource",[i,t.resource.Uranium.name])}`,o+=`${F("plus_max_resource",[s,t.resource.Nano_Tube.name])}`,o+=`${F("plus_max_resource",[n,t.resource.Neutronium.name])}`,o+=`${F("plus_max_resource",[c,t.resource.Infernite.name])}`,o+="
                            ",`${o}
                            ${F("galaxy_gateway_depot_effect",[a,F("resource_Elerium_name")])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(s.s_gate?10:0),action(){if(ii($(this)[0])){At("gateway_depot","galaxy");let e=zt();return t.resource.Uranium.max+=wr(3e3*e),t.resource.Nano_Tube.max+=wr(25e4*e),t.resource.Neutronium.max+=wr(9001*e),t.resource.Infernite.max+=wr(6660*e),ei($(this)[0]),!0}return!1}},defense_platform:{id:"galaxy-defense_platform",title:F("galaxy_defense_platform"),desc:()=>`
                            ${F("galaxy_defense_platform")}
                            ${F("requires_power")}
                            `,reqs:{stargate:6},cost:{Money:e=>js("defense_platform",e,75e4,1.25,"galaxy"),Adamantite:e=>js("defense_platform",e,425e3,1.25,"galaxy"),Elerium:e=>js("defense_platform",e,800,1.25,"galaxy"),Vitreloy:e=>js("defense_platform",e,1250,1.25,"galaxy"),Wrought_Iron:e=>js("defense_platform",e,75e3,1.25,"galaxy")},effect(){return`
                            ${F("galaxy_defense_platform_effect",[20])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(s.s_gate?5:0),postPower(e){zs({el:"#gxy_stargate"},"update")},action(){return!!ii($(this)[0])&&(At("defense_platform","galaxy"),ei($(this)[0]),!0)},post(){zs({el:"#gxy_stargate"},"update")}}},gxy_gorddon:{info:{name:F("galaxy_gorddon"),desc:()=>F("galaxy_gorddon_desc"),control:()=>({name:Di[t.galaxy.alien1.id].name,color:"advanced"})},gorddon_mission:{id:"galaxy-gorddon_mission",title:F("galaxy_gorddon_mission"),desc:F("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:()=>+Ut(23e4).toFixed(0),Deuterium:()=>+Ut(125e3).toFixed(0)},effect:F("galaxy_gorddon_mission_effect"),action(){if(ii($(this)[0])){Ct(),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=Di[t.galaxy.alien1.id].name,a=Di[t.galaxy.alien1.id].entity,r=Di[t.galaxy.alien2.id].name;return ms(F("galaxy_gorddon_mission_result",[a,e,Di[t.galaxy.alien2.id].entity,r]),"info",!1,["progress"]),!0}return!1}},embassy:{id:"galaxy-embassy",title:F("galaxy_embassy"),desc:()=>`
                            ${F("galaxy_embassy")}
                            ${F("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=`
                            ${F("plus_max_citizens",[$(this)[0].citizens()])}
                            `),`
                            ${F("galaxy_embassy_effect",[Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name])}
                            ${e}
                            ${F("interstellar_alpha_starport_effect3",[7500,t.resource.Food.name])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(s.s_gate?25:0),refresh:!0,action(){return!!(t.galaxy.embassy.count<1&&ii($(this)[0]))&&(At("embassy","galaxy"),ei($(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},Cs($("#resources")),Ba(),ms(F("galaxy_embassy_complete",[Di[t.galaxy.alien1.id].name,Di[t.galaxy.alien2.id].name]),"info",!1,["progress"])),!0)},citizens(){let e=20;return t.race.high_pop&&(e*=Ki.high_pop.vars()[0]),e}},dormitory:{id:"galaxy-dormitory",title:F("galaxy_dormitory"),desc:()=>`
                            ${F("galaxy_dormitory")}
                            ${F("requires_power")}
                            `,reqs:{xeno:6},cost:{Money:e=>js("dormitory",e,1e7,1.25,"galaxy"),Furs:e=>js("dormitory",e,7e5,1.25,"galaxy"),Cement:e=>js("dormitory",e,12e5,1.25,"galaxy"),Plywood:e=>js("dormitory",e,85e3,1.25,"galaxy"),Horseshoe:()=>t.race.hooved?3:0},effect(){return`
                            ${F("requires_res",[F("galaxy_embassy")])}
                            ${F("plus_max_citizens",[$(this)[0].citizens()])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(3),action(){return!!ii($(this)[0])&&(At("dormitory","galaxy"),ei($(this)[0]),!0)},citizens(){let e=3;return t.race.high_pop&&(e*=Ki.high_pop.vars()[0]),e}},symposium:{id:"galaxy-symposium",title:F("galaxy_symposium"),desc:()=>`
                            ${F("galaxy_symposium")}
                            ${F("requires_power")}
                            `,reqs:{xeno:6},cost:{Money:e=>js("symposium",e,8e6,1.25,"galaxy"),Food:e=>t.race.ravenous?0:js("symposium",e,t.race.artifical?45e3:125e3,1.25,"galaxy"),Lumber:e=>js("symposium",e,46e4,1.25,"galaxy"),Brick:e=>js("symposium",e,261600,1.25,"galaxy")},effect(){let e="";return t.tech.xeno>=7&&(e=`
                            ${F("galaxy_symposium_effect3",[+$e(300).toFixed(2)])}
                            `),`
                            ${F("galaxy_symposium_effect",[1750])}
                            ${F("galaxy_symposium_effect2",[650])}
                            ${e}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(4),action(){return!!ii($(this)[0])&&(At("symposium","galaxy"),ei($(this)[0]),!0)}},freighter:{id:"galaxy-freighter",title:F("galaxy_freighter"),desc:()=>`
                            ${F("galaxy_freighter")}
                            ${F("galaxy_crew_fuel",[F("resource_Helium_3_name")])}
                            `,reqs:{xeno:5},cost:{Money:e=>js("freighter",e,6e6,1.2,"galaxy"),Uranium:e=>js("freighter",e,1e4,1.2,"galaxy"),Adamantite:e=>js("freighter",e,46e4,1.2,"galaxy"),Stanene:e=>js("freighter",e,261600,1.2,"galaxy"),Bolognium:e=>js("freighter",e,66e3,1.2,"galaxy")},effect(){let e=+Ut($(this)[0].ship.helium).toFixed(2),a="";return t.tech.banking>=13&&(a=`
                            ${F("interstellar_exchange_boost",[3])}
                            `),`
                            ${F("galaxy_freighter_effect",[2,Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name])}
                            ${a}
                            ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                            ${F("spend",[e,t.resource.Helium_3.name])}
                            `},ship:{civ:()=>t.race.high_pop?3*Ki.high_pop.vars()[0]:3,mil:()=>0,helium:12},special:!0,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("freighter","galaxy"),t.galaxy.freighter.on++,t.resource.Vitreloy.display=!0,!0)}}},gxy_alien1:{info:{name:()=>F("galaxy_alien",[Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].home]),desc:()=>F("galaxy_alien1_desc",[Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].home,Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),control:()=>({name:Di[t.galaxy.alien1.id].name,color:"advanced"})},consulate:{id:"galaxy-consulate",title:F("galaxy_consulate"),desc:()=>F("galaxy_consulate_desc",[Di[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 F("plus_max_citizens",[$(this)[0].citizens()])},refresh:!0,action(){return!!(ii($(this)[0])&&t.galaxy.consulate.count<1)&&(At("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*=Ki.high_pop.vars()[0]),e}},resort:{id:"galaxy-resort",title:F("galaxy_resort"),desc:()=>`
                            ${F("galaxy_resort")}
                            ${F("requires_power")}
                            `,reqs:{xeno:9},cost:{Money:e=>js("resort",e,33e6,1.25,"galaxy"),Stone:e=>js("resort",e,25e6,1.25,"galaxy"),Furs:e=>js("resort",e,1e7,1.25,"galaxy"),Oil:e=>js("resort",e,Ut(125e3),1.25,"galaxy")},effect(){return`
                            ${F("plus_max_citizens",[3])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},effect(){let e=wr(t.tech.world_control?1875e3:15e5),a=t.race.joyless?"":`
                            ${F("city_max_entertainer",[aa(2)])}
                            `;return`
                            ${F("plus_max_resource",[`$${e.toLocaleString()}`,F("resource_Money_name")])}
                            ${a}
                            ${F("space_red_vr_center_effect2",[2])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(5),action(){return!!ii($(this)[0])&&(At("resort","galaxy"),ei($(this)[0]),!0)}},vitreloy_plant:{id:"galaxy-vitreloy_plant",title:F("galaxy_vitreloy_plant"),desc:()=>`
                            ${F("galaxy_vitreloy_plant")}
                            ${F("galaxy_vitreloy_plant_desc")}
                            `,reqs:{xeno:10},cost:{Money:e=>js("vitreloy_plant",e,35e6,1.25,"galaxy"),Cement:e=>js("vitreloy_plant",e,18e5,1.25,"galaxy"),Neutronium:e=>js("vitreloy_plant",e,25e4,1.25,"galaxy"),Iridium:e=>js("vitreloy_plant",e,85e4,1.25,"galaxy"),Aerogel:e=>js("vitreloy_plant",e,4e5,1.25,"galaxy")},effect(){return`
                            ${F("galaxy_vitreloy_plant_effect",[+xe("vitreloy_plant").toFixed(2)])}
                            ${F("galaxy_vitreloy_plant_effect2",[2.5,100])}
                            ${F("galaxy_vitreloy_plant_effect3",[5e4,$(this)[0].powered()])}
                            `},powered:()=>Is(10),action(){return!!ii($(this)[0])&&(At("vitreloy_plant","galaxy"),ei($(this)[0]),!0)}},super_freighter:{id:"galaxy-super_freighter",title:F("galaxy_super_freighter"),desc:()=>`
                            ${F("galaxy_super_freighter")}
                            ${F("galaxy_crew_fuel",[F("resource_Helium_3_name")])}
                            `,reqs:{xeno:9},cost:{Money:e=>js("super_freighter",e,28e6,1.2,"galaxy"),Aluminium:e=>js("super_freighter",e,35e5,1.2,"galaxy"),Alloy:e=>js("super_freighter",e,1e6,1.2,"galaxy"),Graphene:e=>js("super_freighter",e,75e4,1.2,"galaxy")},effect(){let e=+Ut($(this)[0].ship.helium).toFixed(2),a="";return t.tech.banking>=13&&(a=`
                            ${F("interstellar_exchange_boost",[8])}
                            `),`
                            ${F("galaxy_freighter_effect",[5,Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name])}
                            ${a}
                            ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                            ${F("spend",[e,t.resource.Helium_3.name])}
                            `},ship:{civ:()=>t.race.high_pop?5*Ki.high_pop.vars()[0]:5,mil:()=>0,helium:25},special:!0,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("super_freighter","galaxy"),t.galaxy.super_freighter.on++,!0)}}},gxy_alien2:{info:{name:()=>F("galaxy_alien",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red]),desc:()=>F("galaxy_alien2_desc",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red,Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name]),control:()=>({name:Di[t.galaxy.alien2.id].name,color:"danger"}),support:"foothold"},alien2_mission:{id:"galaxy-alien2_mission",title:()=>F("galaxy_alien2_mission",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red]),desc:()=>F("galaxy_alien2_mission_desc",[Di[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+=Ot.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_alien2[a]})),{label:F("galaxy_fleet_rating",[`400
                            `]),met:!(e<400)}}return{label:F("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+=Ot.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_alien2[a]}));let a=e>=650?`${F("galaxy_piracy_low")}`:`${F("galaxy_piracy_avg")}`;return`
                            ${F("galaxy_alien2_mission_effect2",[e])}
                            ${F("galaxy_alien2_mission_effect3",[a])}
                            ${F("galaxy_alien2_mission_effect",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name])}
                            `},action(){if(ii($(this)[0])){let e=0;if(Object.keys(t.galaxy.defense.gxy_alien2).forEach((function(a){e+=Ot.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_alien2[a]})),e>=400){if(ms(F("galaxy_alien2_mission_result2",[Di[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 i=0;i0&&(e-=Ot.gxy_gateway[r].ship.rating(),a.push(r))})),ms(F("galaxy_chthonian_mission_result_losses",[a.map((e=>F(`galaxy_${e}`))).join(", ")]),"danger",!1,["progress"]);for(let e=0;e`
                            ${F("galaxy_foothold")}
                            ${F("requires_power_combo",[t.resource.Elerium.name])}
                            `,reqs:{conflict:1},cost:{Money:e=>js("foothold",e,25e6,1.25,"galaxy"),Titanium:e=>js("foothold",e,3e6,1.25,"galaxy"),Polymer:e=>js("foothold",e,175e4,1.25,"galaxy"),Iridium:e=>js("foothold",e,9e5,1.25,"galaxy"),Bolognium:e=>js("foothold",e,5e4,1.25,"galaxy")},effect(){return`
                            ${F("galaxy_defense_platform_effect",[50])}
                            ${F("galaxy_foothold_effect",[$(this)[0].support(),Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red])}
                            ${F("galaxy_foothold_effect2",[2.5,$(this)[0].powered()])}
                            `},support:()=>4,powered:()=>Is(s.s_gate?20:0),powerBalancer:()=>[{s:t.galaxy.foothold.s_max-t.galaxy.foothold.support}],action(){return!!ii($(this)[0])&&(At("foothold","galaxy"),ei($(this)[0]),1===t.tech.conflict&&(t.galaxy.armed_miner={count:0,on:0,crew:0,mil:0},t.tech.conflict=2,Bt(),Jr()),!0)}},armed_miner:{id:"galaxy-armed_miner",title:F("galaxy_armed_miner"),desc:()=>`
                            ${F("galaxy_armed_miner")}
                            `,reqs:{conflict:2},cost:{Money:e=>js("armed_miner",e,5e6,1.25,"galaxy"),Steel:e=>js("armed_miner",e,18e5,1.25,"galaxy"),Stanene:e=>js("armed_miner",e,1975e3,1.25,"galaxy"),Vitreloy:e=>js("armed_miner",e,2e4,1.25,"galaxy"),Soul_Gem:e=>js("armed_miner",e,1,1.25,"galaxy")},effect(){let e=+Ut($(this)[0].ship.helium).toFixed(2);return`
                            ${F("galaxy_ship_rating",[$(this)[0].ship.rating()])}
                            ${F("gain",[.032,F("resource_Bolognium_name")])}
                            ${F("gain",[.23,F("resource_Adamantite_name")])}
                            ${F("gain",[.65,F("resource_Iridium_name")])}
                            ${F("galaxy_alien2_support",[$(this)[0].support(),Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red])}
                            ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                            ${F("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
                            ${F("spend",[e,t.resource.Helium_3.name])}
                            `},ship:{civ:()=>t.race.high_pop?2*Ki.high_pop.vars()[0]:2,mil:()=>t.race.high_pop?1*Ki.high_pop.vars()[0]:1,helium:10,rating:()=>t.race.banana?4:5},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("armed_miner","galaxy"),t.galaxy.foothold.support`
                            ${F("galaxy_ore_processor")}
                            `,reqs:{conflict:3},cost:{Money:e=>js("ore_processor",e,3e6,1.25,"galaxy"),Iron:e=>js("ore_processor",e,5e6,1.25,"galaxy"),Coal:e=>js("ore_processor",e,375e4,1.25,"galaxy"),Graphene:e=>js("ore_processor",e,225e4,1.25,"galaxy")},effect(){return`
                            ${F("galaxy_ore_processor_effect",[10])}
                            ${F("galaxy_alien2_support",[$(this)[0].support(),Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red])}
                            `},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("ore_processor","galaxy"),t.galaxy.foothold.supportjs("scavenger",e,75e5,1.25,"galaxy"),Alloy:e=>js("scavenger",e,125e4,1.25,"galaxy"),Aluminium:e=>js("scavenger",e,68e5,1.25,"galaxy"),Neutronium:e=>js("scavenger",e,75e3,1.25,"galaxy"),Elerium:e=>js("scavenger",e,750,1.25,"galaxy")},effect(){let e=St("gxy_alien2"),a=Math.round(25e3*e),r=+Ut($(this)[0].ship.helium).toFixed(2),i=t.race.cataclysm?`
                            ${F("galaxy_scavenger_effect2_cata",[+(100*e*.75).toFixed(1)])}
                            `:`
                            ${F("galaxy_scavenger_effect2",[+(100*e/4).toFixed(1)])}
                            `;return`
                            ${F("galaxy_scavenger_effect",[a])}
                            ${i}
                            ${F("galaxy_alien2_support",[$(this)[0].support(),Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red])}
                            ${F("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
                            ${F("spend",[r,t.resource.Helium_3.name])}
                            `},ship:{civ:()=>t.race.high_pop?1*Ki.high_pop.vars()[0]:1,mil:()=>0,helium:12},support:()=>-1,powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("scavenger","galaxy"),t.galaxy.foothold.supportF("galaxy_chthonian"),desc:()=>F("galaxy_chthonian_desc",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name]),control:()=>({name:Di[t.galaxy.alien2.id].name,color:"danger"})},chthonian_mission:{id:"galaxy-chthonian_mission",title:()=>F("galaxy_alien2_mission",[F("galaxy_chthonian")]),desc:()=>F("galaxy_alien2_mission_desc",[F("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+=Ot.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_chthonian[a]})),{label:F("galaxy_fleet_rating",[`1250
                            `]),met:!(e<1250)}}return{label:F("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+=Ot.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_chthonian[a]}));let a=e>=4500?`${F("galaxy_piracy_low")}`:e>=2500?`${F("galaxy_piracy_avg")}`:`${F("galaxy_piracy_high")}`;return`
                            ${F("galaxy_alien2_mission_effect2",[e])}
                            ${F("galaxy_alien2_mission_effect3",[a])}
                            ${F("galaxy_alien2_mission_effect",[F("galaxy_chthonian")])}
                            `},action(){if(ii($(this)[0])){let e=0;if(Object.keys(t.galaxy.defense.gxy_chthonian).forEach((function(a){e+=Ot.gxy_gateway[a].ship.rating()*t.galaxy.defense.gxy_chthonian[a]})),e>=1250){let a=500,r=[];ms(F("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 i=0;i0&&(a-=Ot.gxy_gateway[e].ship.rating(),r.push(e))})),ms(F("galaxy_chthonian_mission_result_losses",[r.map((e=>F(`galaxy_${e}`))).join(", ")]),"danger",!1,["progress"]);for(let e=0;e`
                            ${F("galaxy_minelayer")}
                            `,reqs:{chthonian:2},cost:{Money:e=>js("minelayer",e,9e6,1.25,"galaxy"),Iron:e=>js("minelayer",e,48e5,1.25,"galaxy"),Nano_Tube:e=>js("minelayer",e,125e4,1.25,"galaxy"),Nanoweave:e=>js("minelayer",e,1e5,1.25,"galaxy")},effect(){let e=+Ut($(this)[0].ship.helium).toFixed(2);return`
                            ${F("galaxy_defense_platform_effect",[$(this)[0].ship.rating()])}
                            ${F("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
                            ${F("spend",[e,t.resource.Helium_3.name])}
                            `},ship:{civ:()=>0,mil:()=>t.race.high_pop?1*Ki.high_pop.vars()[0]:1,helium:8,rating:()=>t.race.banana?35:50},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("minelayer","galaxy"),t.galaxy.minelayer.on++,!0)},postPower(){zs({el:"#gxy_chthonian"},"update")},post(){zs({el:"#gxy_chthonian"},"update")}},excavator:{id:"galaxy-excavator",title:F("galaxy_excavator"),desc:()=>`
                            ${F("galaxy_excavator")}
                            `,reqs:{chthonian:3},cost:{Money:e=>js("excavator",e,12e6,1.25,"galaxy"),Polymer:e=>js("excavator",e,44e5,1.25,"galaxy"),Iridium:e=>js("excavator",e,36e5,1.25,"galaxy"),Mythril:e=>js("excavator",e,18e4,1.25,"galaxy")},effect(){return`
                            ${F("gain",[+xe("excavator").toFixed(3),F("resource_Orichalcum_name")])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(8),powerBalancer:()=>[{r:"Orichalcum",p:xe("excavator")}],action(){return!!ii($(this)[0])&&(At("excavator","galaxy"),ei($(this)[0]),!0)}},raider:{id:"galaxy-raider",title:F("galaxy_raider"),desc:()=>`
                            ${F("galaxy_raider")}
                            `,reqs:{chthonian:3},cost:{Money:e=>js("raider",e,12e6,1.25,"galaxy"),Titanium:e=>js("raider",e,125e4,1.25,"galaxy"),Bolognium:e=>js("raider",e,6e5,1.25,"galaxy"),Vitreloy:e=>js("raider",e,125e3,1.25,"galaxy"),Stanene:e=>js("raider",e,825e3,1.25,"galaxy")},effect(){let e=+Ut($(this)[0].ship.helium).toFixed(2);return St("gxy_chthonian"),`
                            ${F("galaxy_ship_rating",[$(this)[0].ship.rating()])}
                            ${F("gain",[.65,F("resource_Deuterium_name")])}
                            ${F("gain",[.05,F("resource_Vitreloy_name")])}
                            ${F("gain",[2.3,F("resource_Polymer_name")])}
                            ${F("gain",[.8,F("resource_Neutronium_name")])}
                            ${F("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
                            ${F("spend",[e,t.resource.Helium_3.name])}
                            `},ship:{civ:()=>0,mil:()=>t.race.high_pop?2*Ki.high_pop.vars()[0]:2,helium:18,rating:()=>t.race.banana?9:12},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(At("raider","galaxy"),t.galaxy.raider.on++,!0)},postPower(){zs({el:"#gxy_chthonian"},"update")},post(){zs({el:"#gxy_chthonian"},"update")}}}};function Mt(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 St(e,a,r){if(t.tech.piracy&&!t.race.truepath){let i=0,n=["dreadnought","cruiser_ship","frigate_ship","corvette_ship","scout_ship"];for(let a=0;ac?c:i))/c)*l+(1-l))*(a?1:St("gxy_stargate")):(1-(c-(i>c?c:i))/c)*l+(1-l)}return 1}function Ct(){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(Di).filter((function(t){return!["demonic","eldritch"].includes(Di[t].type)&&!e.includes(t)})),r=tn(a);t.galaxy.alien1={id:a[r]},e.push(a[r]),a=Object.keys(Di).filter((function(t){return!["angelic"].includes(Di[t].type)&&!e.includes(t)}));let i=tn(a);t.galaxy.alien2={id:a[i]}}function zt(){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 Ft={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 At(e,a){a||(a="space"),t[a][e]||(t[a][e]=Ft[e]),t[a][e].count++}function It(e,t){return e&&t?xt[e][t]:xt}function Tt(e,t,a){switch(e){case"space":return Lt(xt,t,a);case"interstellar":return Lt(qt,t,a);case"galaxy":return Lt(Ot,t,a)}}function Lt(e,a,r){let i=t.race.truepath?"truepath":"standard";if(e[a][r].hasOwnProperty("path")&&!e[a][r].path.includes(i))return!1;var s=!0;return Object.keys(e[a][r].reqs).forEach((function(i){(!t.tech[i]||t.tech[i]=e[a][r].grant[1]&&(s=!1),s}function Et(){(t.settings.tabLoad||1===t.settings.civTabs)&&(Kt("inner"),t.race.truepath&&Kt("outer"),Dt(),Bt())}function Kt(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(Cs(a),a.append($(`

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

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

                            ${i}

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

                            ${i}

                            `);t.race.truepath&&xt[r].info.hasOwnProperty("syndicate")&&xt[r].info.syndicate()&&t.tech.syndicate&&($(`#${r}`).append(`
                            `),$(`#${r}synd`).append(`${F("space_syndicate")} `),$(`#${r}synd`).append(`${F("space_scan_effectiveness")} `),$(`#${r}synd`).append(`${F("space_overkill")} `),zs({el:`#${r}synd`,data:t.space.syndicate,methods:{threat(e){if(t.space.hasOwnProperty("shipyard")&&t.space.shipyard.hasOwnProperty("ships")){let t=_t(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")?+((_t(e,!0).s+25)/1.25).toFixed(1)+"%":F("galaxy_piracy_none"),overkill(e){if(t.space.hasOwnProperty("shipyard")&&t.space.shipyard.hasOwnProperty("ships")){let t=_t(e,!0);return t.s>=100?t.o:0}return 0}}}),xt[r].info.hasOwnProperty("extra")&&xt[r].info.extra(r))}_s(r,(function(){return"string"==typeof xt[r].info.desc?xt[r].info.desc:xt[r].info.desc()}),{elm:`#${r} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(xt[r]).forEach((function(t){"info"!==t&&Lt(xt,r,t)&&Xr(xt[r][t],"inner"===e?"space":"outerSol",t)}))}}))}function Dt(){if(!t.settings.tabLoad&&(1!==t.settings.civTabs||2!==t.settings.spaceTabs))return;let e=$("#interstellar");if(Cs(e),e.append($(`

                            ${F("tab_interstellar")}

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

                            ${r}

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

                            ${r}

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

                            ${F("tab_galactic")}

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

                            ${F("galaxy_armada")}

                            `);e.append(r);let i=t.tech.world_control?F("civics_garrison_peacekeepers"):F("civics_garrison_soldiers");r.append($("|")),r.append($(`${i} {{ g.workers | stationed }} / {{ g.max | s_max }}`)),r.append($("|")),r.append($(`${F("job_crew_mil")} {{ g.crew }}`)),r.append($("|")),r.append($(`${F("job_crew_civ")} {{ c.workers }} / {{ c.max }}`)),zs({el:`#h${a}`,data:{g:t.civic.garrison,c:t.civic.crew},filters:{stationed:e=>ke(),s_max:e=>ke(!0)}}),["soldier","crew1","crew2"].forEach((function(e){_s(`h${a}${e}`,(function(){switch(e){case"soldier":return ge();case"crew1":return F("civics_garrison_crew_desc");case"crew2":return F("job_crew_desc")}}),{elm:`#h${a} span.${e}`})}));let s=$(`
                            `);e.append(s);let n=["scout_ship","corvette_ship","frigate_ship","cruiser_ship","dreadnought"],c=[];for(let e=0;e<6;e++){let e=$('
                            ');c.push(e),s.append(e)}for(let e=0;e${Ot.gxy_gateway[n[e]].title}
                            `);c[e+1].append(t)}c[0].append($("")),c[0].append($(`${Ot.gxy_gateway.info.name}`));for(let e=0;e{{ gateway.${n[e]} }}
                            `);c[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 Ot[e].info.name?Ot[e].info.name:Ot[e].info.name()}`);c[0].append(r);for(let r=0;r
                            '),i=$(`«`),s=$(`{{ ${a}.${n[r]} }}`),o=$(`»`);c[r+1].append(t),t.append(i),t.append(s),t.append(o)}}})),zs({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]&&_s(`armada${a}`,(function(){return`
                            ${"string"==typeof Ot[e].info.desc?Ot[e].info.desc:Ot[e].info.desc()}
                            `}))}));for(let e=0;e`);e.append(i);let s=$(`

                            ${r}

                            `);i.append(s),t.tech.xeno&&t.tech.xeno>=3&&i.append(`{{ r.control().name }}`);let n={el:`#${a}`,data:{r:Ot[a].info},methods:{threat(e){let a=t.race.infiltrator?1:2;if(t.galaxy.defense[e].scout_ship>=a){let t=100*(1-St(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-St(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}%`:F(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=>St(e,!0,!0)}};if(Ot[a].info.support){let e=Ot[a].info.support;t.galaxy[e]&&(t.galaxy[e].hasOwnProperty("support")||(t.galaxy[e].support=0,t.galaxy[e].s_max=0),i.append('{{ s.support }}/{{ s.s_max }}'),n.data.s=t.galaxy[e])}t.tech.piracy&&i.append(`
                            ${F("galaxy_piracy_threat",[Di[t.galaxy.alien2.id].name])}{{ '${a}' | pirate }}|${F("galaxy_armada")}: {{ '${a}' | defense }}
                            `),zs(n),_s(a,(function(){return"string"==typeof Ot[a].info.desc?Ot[a].info.desc:Ot[a].info.desc()}),{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),_s(a,(function(){return F("galaxy_control",[Ot[a].info.control().name,r])}),{elm:`#${a} .regionControl`,classes:"has-background-light has-text-dark"}),Object.keys(Ot[a]).forEach((function(e){"info"!==e&&Lt(Ot,a,e)&&Xr(Ot[a][e],"galaxy",e)}))}}))}function Gt(e){return t.tech.space_housing&&(e*=.8**t.tech.space_housing),e}function Nt(e){return t.tech.solar&&t.tech.solar>=5&&n.iron_ship&&(e*=.95**n.iron_ship),e}function Rt(e){if(t.space.swarm_plant){let a=t.tech.swarm?.88:.94;t.tech.swarm>=3&&(a-=_/100),a<.05&&(a=.05),e*=a**t.space.swarm_plant.count}return e}function Ht(e,a,r){return r=r||{},"heavy"===t.race.universe&&(e*=1.25+.5*Ts("heavy")),t.race.truepath&&(e*=a?2.5:1.25),t.city.mass_driver&&s.mass_driver?e*=(t.race.truepath?.94:.95)**s.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*=ns.dense.vars()[2]),t.race.cataclysm&&(e*=.2),t.race.heavy&&(e*=1+Ki.heavy.vars()[0]/100),on("launch_day")&&(e*=.95),e}function Ut(e){return"heavy"===t.race.universe&&(e*=1.2+.3*Ts("heavy")),t.stats.achieve.heavyweight&&(e*=.96**t.stats.achieve.heavyweight.l),t.race.heavy&&(e*=1+Ki.heavy.vars()[0]/100),on("launch_day")&&(e*=.95),e}function Vt(){let e={red:Di[t.race.species].solar.red,hell:Di[t.race.species].solar.hell,gas:Di[t.race.species].solar.gas,gas_moon:Di[t.race.species].solar.gas_moon,dwarf:Di[t.race.species].solar.dwarf,titan:Bi[Di[t.race.species].type].solar.titan,enceladus:Bi[Di[t.race.species].type].solar.enceladus,triton:Bi[Di[t.race.species].type].solar.triton,eris:Bi[Di[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 Wt=["l","h","a","e","m","mg"],Qt={standard:{name:F("universe_standard"),desc:F("universe_standard_desc"),effect:F("universe_standard_effect")},heavy:{name:F("universe_heavy"),desc:F("universe_heavy_desc"),effect:F("universe_heavy_effect",[5])},antimatter:{name:F("universe_antimatter"),desc:F("universe_antimatter_desc"),effect:F("universe_antimatter_effect")},evil:{name:F("universe_evil"),desc:F("universe_evil_desc"),effect:F("universe_evil_effect")},micro:{name:F("universe_micro"),desc:F("universe_micro_desc"),effect:F("universe_micro_effect",[75])},magic:{name:F("universe_magic"),desc:F("universe_magic_desc"),effect:F("universe_magic_effect")}};function Jt(a){a||t.race.noexport||(j.w&&j.w.terminate(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),Pn(`biome_${t.city.biome}`),Pn(`genus_${Di[t.race.species].type}`),t.race.witch_hunter&&"magic"===t.race.universe?Pn("soul_sponge"):(Pn("ascended"),0===t.interstellar.thermal_collector.count&&jn("energetic")),"junker"===t.race.species&&jn("the_misery"),!t.race.modified&&t.race.junker&&"junker"===t.race.species&&jn("garbage_pie"),t.race.emfield&&Pn("technophobe"),t.race.cataclysm&&jn("finish_line"),t.race.noexport="Race",Cs($("#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=$('
                            '),i={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(`

                            ${F("genelab_title")}

                            - ${F("genelab_genes")} {{ g.genes }} - ${F("trait_untapped_name")}: {{ g.genes | untapped }}
                            `),a){r.append(`\n
                            ${F("achieve_ascended_name")}
                            \n `);let e=$("
                            ");r.append(e),Object.keys(Qt).forEach((function(a){i.ascended[a]=t.stats.achieve.ascended&&t.stats.achieve.ascended.hasOwnProperty(qn(a))?t.stats.achieve.ascended[qn(a)]:0,e.append(`\n
                            ${F("universe_"+a)}
                            \n `)})),r.append(`\n
                            ${F("achieve_technophobe_name")}
                            \n
                            \n
                            \n
                            \n `)}let s=$(`
                            ${F("genelab_name")}
                            ${F("genelab_entity")}
                            ${F("genelab_home")}
                            ${F("genelab_desc")}
                            `);r.append(s);let n=$(`
                            \n
                            ${F("genelab_red")}
                            \n
                            ${F("genelab_hell")}
                            \n
                            ${F("genelab_gas")}
                            \n
                            ${F("genelab_gas_moon")}
                            \n
                            ${F("genelab_dwarf")}
                            `);r.append(n);let c=$(`
                            \n
                            ${F("genelab_titan")}
                            \n
                            ${F("genelab_enceladus")}
                            \n
                            ${F("genelab_triton")}
                            \n
                            ${F("genelab_eris")}
                            `);r.append(c);let o=$('
                            ');r.append(o);let l=!1,_=`
                            ${F("genelab_genus")}
                            ",o.append($(_));let d=`
                            ${F("genelab_traits")}
                            ",o.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||Vt().titan,enceladus:t.custom.race0.enceladus||Vt().enceladus,triton:t.custom.race0.triton||Vt().triton,eris:t.custom.race0.eris||Vt().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--)Ki.hasOwnProperty(m.traitlist[e])&&"major"===Ki[m.traitlist[e]].type||m.traitlist.splice(e,1);m.genes=rn(m,!!a&&i);let v={msg:""};zs({el:"#celestialLab",data:{g:m,w:i,err:v},methods:{val(e){"technophobe"===e?i.technophobe<0?i.technophobe=0:i.technophobe>5&&(i.technophobe=5):i.ascended[e]<0?i.ascended[e]=0:i.ascended[e]>5&&(i.ascended[e]=5)},geneEdit(){m.genes=rn(m,!!a&&i)},setRace(){rn(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(){M(),$s("reset",{end:"ascend"});let a=t.race.species,r=t.race.gods,i=t.city.calendar.orbit,s=t.city.biome,n=t.city.ptrait,c=t.city.geology,o=Ns("ascend");t.stats.ascend++,sn(),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.Harmony.count=parseFloat((t.prestige.Harmony.count+o.harmony).toFixed(2)),t.stats.harmony=parseFloat((t.stats.harmony+o.harmony).toFixed(2)),n.forEach((function(e){ns.hasOwnProperty(e)&&Pn(`atmo_${e}`)})),void 0===t.tech.world_control&&Pn("cult_of_personality");let l=0;Object.keys(t.city.geology).forEach((function(e){t.city.geology[e]>0&&l++})),l>=4&&Pn("miners_dream"),t.galaxy.hasOwnProperty("dreadnought")&&0!==t.galaxy.dreadnought.count||Pn("dreaded"),t.race.modified||"synth"!==t.race.species&&"nano"!==t.race.species||!t.race.emfield||jn("digital_ascension"),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&Pn("gross"),Cn();let _=!!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),_&&(t.race.srace=_),Object.keys(c).forEach((function(e){c[e]+=.02})),U({orbit:i,biome:s,ptrait:n,geology:c}),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=rn(m,!!a&&i)},customImport(){let e=document.getElementById("customFile").files[0];if(e){let r=new FileReader;r.readAsText(e,"UTF-8"),r.onload=function(r){let s="";try{s=JSON.parse(r.target.result)}catch{return void(v.msg=F("string_pack_error",[e.name]))}let n=!1;if(Object.keys(m).forEach((function(e){s[e]&&typeof m[e]!=typeof s[e]&&(n=!0)})),n)return v.msg=F("string_pack_error",[e.name]),void console.log("format fail");Object.keys(m).forEach((function(e){s[e]&&(m[e]=s[e])})),["name","home","red","hell","gas","gas_moon","dwarf","titan","enceladus","triton","eris"].forEach((function(e){!s[e]&&["titan","enceladus","triton","eris"].includes(e)?m[e]=F(`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 c=[];for(let e=0;e{const r=document.createElement("a"),i=new Blob([e],{type:"text/plain"});r.href=URL.createObjectURL(i),r.download=t,r.click(),URL.revokeObjectURL(r.href)})(JSON.stringify(m,null,4),`evolve-custom-${m.name}.txt`)}},filters:{cost(e){if(Ki[e].val>=0){let r=2;a?r+=i.technophobe:t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=1&&(r+=t.stats.achieve.technophobe.l);let s=Ki[e].val,n=0;for(let e=0;e=0&&n++;return m.traitlist.includes(e)&&n--,n>r&&(s+=n-r),s}return Ki[e].val},untapped:e=>`+${e>0?+(100*(e/(e+20)/10+24e-5)).toFixed(3):0}%`}}),Object.keys(Ei).forEach((function(e){t.stats.achieve[`genus_${e}`]&&t.stats.achieve[`genus_${e}`].l>0&&_s(`celestialLabgenusSelection${e}`,(function(){let t=$(`
                            ${F(`genelab_genus_${e}_desc`)}
                            `);return Object.keys(Ei[e]).forEach((function(e){if(Ki[e]){let a=$("
                            ");fn(a,e,{trank:1}),t.append(a)}})),t}),{elm:`#celestialLab .genus_selection .${e}`,classes:"w30",wide:!0})})),Object.keys(u).sort().forEach((function(e){Ki.hasOwnProperty(e)&&"major"===Ki[e].type&&_s(`celestialLabtraitSelection${e}`,(function(){let t=$("
                            ");return fn(t,e,{trank:1}),t}),{elm:`#celestialLab .trait_selection .t${e}`,classes:"w30",wide:!0})}))}function Zt(a){a||t.race.noexport||(j.w&&j.w.terminate(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),Pn(`biome_${t.city.biome}`),Pn(`genus_${Di[t.race.species].type}`),Pn("lamentis"),"junker"===t.race.species&&jn("the_misery"),t.race.noexport="Planet",Cs($("#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=$('
                            '),i={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(`

                            ${F("planetlab_title")}

                            - ${F("planetlab_points")} {{ p.pts }}
                            `);let s=$('
                            ');r.append(s);let n=!1,c=`
                            ${F("wiki_planet_biome")}
                            ",s.append($(c));let o=`
                            ${F("wiki_planet_trait")}
                            ",s.append($(o));let l={},_=["Copper","Iron","Aluminium","Coal","Oil","Titanium","Uranium"];t.stats.achieve.whitehole&&_.push("Iridium");let d=`
                            ${F("planetlab_res")}
                            ",s.append($(d));let p={biome:n,pts:0,traitlist:[],geology:l,orbit:t.city.calendar.orbit};if(t.custom.hasOwnProperty("planet")){let e=qn();if(t.custom.planet.hasOwnProperty(e)){let a="s";t.custom.planet[e][a]&&(p=nn(t.custom.planet[e][a]),p.orbit=t.city.calendar.orbit,_.forEach((function(e){p.geology.hasOwnProperty(e)?p.geology[e]*=100:p.geology[e]=0})))}}p.pts=Xt(p);let u=`
                            \n
                            \n \n
                            \n `;a||(u+=`\n
                            \n \n
                            \n `),u+="
                            ",r.append(u),zs({el:"#celestialLab",data:{p,w:i},methods:{pEdit(){p.pts=Xt(p)},setPlanet(){if(Xt(p)>=0){Object.keys(p.geology).forEach((function(e){0===p.geology[e]?delete p.geology[e]:p.geology[e]/=100})),t.custom.hasOwnProperty("planet")||(t.custom.planet={});let a=qn();t.custom.planet.hasOwnProperty(a)||(t.custom.planet[a]={s:!1});let r="s";t.custom.planet[a][r]=nn(p),delete t.custom.planet[a][r].pts,function(a){M(),$s("reset",{end:"terraform"});let r=t.race.species,i=t.race.gods,s=t.city.calendar.orbit,n=a.biome,c=a.traitlist,o=a.geology,l=Ns("terraform");t.stats.terraform++,sn(),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)),c.forEach((function(e){ns.hasOwnProperty(e)&&Pn(`atmo_${e}`)})),void 0===t.tech.world_control&&Pn("cult_of_personality");let _=0;Object.keys(t.city.geology).forEach((function(e){t.city.geology[e]>0&&_++})),_>=4&&Pn("miners_dream"),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&Pn("gross"),Cn();let d=!!t.race.hasOwnProperty("srace")&&t.race.srace,p=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0;t.race={species:"protoplasm",gods:r,old_gods:i,universe:t.race.universe,seeded:!1,seed:Math.floor(g(1e4)),ascended:!!t.race.hasOwnProperty("ascended")&&t.race.ascended,rejuvenated:!0},p>0&&(t.race.corruption=p),d&&(t.race.srace=d),U({orbit:s,biome:n,ptrait:c,geology:o}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}(p)}},reset(){p.traitlist=[],Object.keys(p.geology).forEach((function(e){p.geology[e]=0})),p.pts=Xt(p)},less(e){p.geology[e]-=b(),p.geology[e]<-20&&(p.geology[e]=-20)},more(e){p.geology[e]+=b();let a=30;t.stats.achieve.whitehole&&(a+=5*t.stats.achieve.whitehole.l),"eden"===p.biome&&(a+=5),p.geology[e]>a&&(p.geology[e]=a)}},filters:{res:e=>p.geology[e]}})}function Xt(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 i=0;return Object.keys(e.geology).forEach((function(t){0!==e.geology[t]&&(r-=e.geology[t],i++)})),i>3&&(r-=(i-3)**2),r}const Yt={unemployed:function(e){let a=F("job_unemployed_desc");return"unemployed"!==t.civic.d_job||e||(a=a+" "+F("job_default",[F("job_unemployed")])),a},hunter:function(e){let a=F("job_hunter_desc",[t.resource.Food.name]);return t.race.unfathomable&&(a=F("job_eld_hunter_desc")),t.race.artifical?a=t.race.soul_eater?F("job_art_demon_hunter_desc",[t.resource.Furs.name,t.resource.Lumber.name]):F("job_art_hunter_desc",[t.resource.Furs.name]):t.race.soul_eater&&"wendigo"!==t.race.species&&(a=F(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+" "+F("job_default",[t.race.unfathomable?F("job_raider"):F("job_hunter")])),a},forager:function(e){let a=F("job_forager_desc");return"forager"!==t.civic.d_job||e||(a=a+" "+F("job_default",[F("job_forager")])),a},farmer:function(e){let a=+sa(!0,e).toFixed(2),r=+sa(!1,e).toFixed(2);e||(a=+ta(a,"farmer").toFixed(2),r=+ta(r,"farmer").toFixed(2));let i=t.race.high_pop&&!e?F("job_farmer_desc_hp",[a,t.resource.Food.name,aa(1),r,aa(1)*t.city.farm.count]):F("job_farmer_desc",[a,t.resource.Food.name,t.city.farm.count,r]);return"farmer"!==t.civic.d_job||e||(i=i+" "+F("job_default",[F("job_farmer")])),i},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=+ta(a,"lumberjack").toFixed(2),r=+ta(r,"lumberjack").toFixed(2)),!t.race.evil||t.race.soul_eater&&"wendigo"!==t.race.species){let i=1+(t.tech.axe&&t.tech.axe>0?.35*(t.tech.axe-1):0);e||(i*=Gi(a,"lumberjack")),"forest"===t.city.biome&&(r*=ss.forest.vars()[0]),"savanna"===t.city.biome&&(r*=ss.savanna.vars()[2]),"desert"===t.city.biome&&(r*=ss.desert.vars()[2]),"swamp"===t.city.biome&&(r*=ss.swamp.vars()[2]),"taiga"===t.city.biome&&(r*=ss.taiga.vars()[0]);let s=F("job_lumberjack_desc",[+(r*i).toFixed(2),t.resource.Lumber.name]);return"lumberjack"!==t.civic.d_job||e||(s=s+" "+F("job_default",[F("job_lumberjack")])),s}{let i=1;e||(i*=Gi(a,"lumberjack"));let s=+(r*i).toFixed(2),n=+(r/4*i).toFixed(2),c="wendigo"===t.race.species?F("job_reclaimer_desc2",[s]):F("job_reclaimer_desc",[s,n]);return"lumberjack"!==t.civic.d_job||e||(c=c+" "+F("job_default",[F("job_reclaimer")])),c}},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=+ta(a,"quarry_worker").toFixed(2),r=+ta(r,"quarry_worker").toFixed(2));let i=1+(t.tech.hammer&&t.tech.hammer>0?.4*t.tech.hammer:0);e||(i*=Gi(a,"miner")),"desert"===t.city.biome&&(i*=ss.desert.vars()[0]),"swamp"===t.city.biome&&(i*=ss.swamp.vars()[3]),t.tech.explosives&&t.tech.explosives>=2&&(i*=t.tech.explosives>=3?1.75:1.5);let s=+(r*i).toFixed(1),n=t.resource.Aluminium.display?F("job_quarry_worker_desc2",[s,t.resource.Stone.name,t.resource.Aluminium.name]):F("job_quarry_worker_desc1",[s,t.resource.Stone.name]);return t.race.smoldering&&(n=n+" "+F("job_quarry_worker_smoldering",[t.resource.Chrysotile.name])),"quarry_worker"!==t.civic.d_job||e||(n=n+" "+F("job_default",[F("job_quarry_worker")])),n},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,i=1;e||(a=+ta(a,"crystal_miner").toFixed(2),r=+ta(r,"crystal_miner").toFixed(2),i*=Gi(a,"miner"));let s=F("job_crystal_miner_desc",[+(r*i).toFixed(2),t.resource.Crystal.name]);return"crystal_miner"!==t.civic.d_job||e||(s=s+" "+F("job_default",[F("job_crystal_miner")])),s},scavenger:function(e){let a=Ki.scavenger.vars()[0];t.city.ptrait.includes("trashed")&&t.race.scavenger&&(a*=1+Ki.scavenger.vars()[1]/100),t.race.high_pop&&!e&&(a*=Ki.high_pop.vars()[1]/100),e||(a=+ta(a,"scavenger").toFixed(2));let r=F("job_scavenger_desc",[Di[t.race.species].home,a]);return"scavenger"!==t.civic.d_job||e||(r=r+" "+F("job_default",[F("job_scavenger")])),r},torturer:function(){return F("job_torturer_desc")},miner:function(){return t.tech.mining>=3?t.race.sappy&&t.tech.alumina?F("job_miner_desc2_amber"):F("job_miner_desc2"):F("job_miner_desc1")},coal_miner:function(){return t.tech.uranium?F("job_coal_miner_desc2"):F("job_coal_miner_desc1")},craftsman:function(){return F("job_craftsman_desc")},cement_worker:function(){let e=t.race.high_pop?3/Ki.high_pop.vars()[0]:3;"ashland"===t.city.biome&&(e*=ss.ashland.vars()[1]),e=+ta(e,"cement_worker").toFixed(2);let a=+ta(t.civic.cement_worker.impact,"cement_worker").toFixed(2)*(t.tech.cement>=4?1.2:1)*Gi(t.civic.cement_worker.workers,"factory");return"ashland"===t.city.biome&&(a*=ss.ashland.vars()[1]),a=+a.toFixed(2),t.race.sappy?F("job_cement_worker_amber_desc",[a]):F("job_cement_worker_desc",[a,e])},banker:function(){let e=100*+ta(t.civic.banker.impact,"banker").toFixed(2);return t.tech.banking>=10&&(e+=2*t.tech.stock_exchange),t.race.truthful&&(e*=1-Ki.truthful.vars()[0]/100),"republic"===t.civic.govern.type&&(e*=1.25),t.race.high_pop&&(e*=Ki.high_pop.vars()[1]/100),e=+e.toFixed(0),F("job_banker_desc",[e])},entertainer:function(){let e=t.tech.theatre;t.race.musical&&(e+=Ki.musical.vars()[0]),t.race.emotionless&&(e*=1-Ki.emotionless.vars()[0]/100),t.race.high_pop&&(e*=Ki.high_pop.vars()[1]/100),e=+ta(e,"entertainer").toFixed(2);let a=t.race.high_pop?Ki.high_pop.vars()[1]/100:1;return a=+ta(a,"entertainer").toFixed(2),t.tech.superstar?F("job_entertainer_desc2",[e,a]):F("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?F("job_priest_desc2"):F("job_priest_desc"),t.tech.cleric&&(e+=` ${F("job_priest_desc3")}`),e},professor:function(){let e=+ta(1,"professor"),a=+(t.race.studious?t.civic.professor.impact+Ki.studious.vars()[0]:t.civic.professor.impact),r=as("elven");return r>0&&(a+=Ki.studious.vars(1)[0]*r),e*=a,e*=t.race.pompous?1-Ki.pompous.vars()[0]/100:1,e*=Gi(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),F("job_professor_desc",[e])},scientist:function(){let e=+ta(t.civic.scientist.impact,"scientist").toFixed(2);return e*=Gi(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?F("job_wizard_desc",[e,+(.025*Ts("magic")).toFixed(4)]):F("job_scientist_desc",[e])},colonist:()=>F(t.race.truepath?"job_colonist_desc_tp":"job_colonist_desc",[Vt().red]),titan_colonist:()=>F("job_colonist_desc_tp",[Vt().titan]),space_miner:()=>F("job_space_miner_desc"),hell_surveyor:()=>F("job_hell_surveyor_desc"),archaeologist(){let e=75*(s.arcology||0),a=(we(t.portal.guard_post.on,"hellArmy",0)+e)/5e3;a=a>1?1:a;let r=25e4;return t.race.high_pop&&(r*=Ki.high_pop.vars()[1]/100),F("job_archaeologist_desc",[Math.round(r*a).toLocaleString()])},pit_miner:()=>F("job_pit_miner_desc",[F("tau_planet",[Di[t.race.species].home])]),crew:()=>F("job_crew_desc")};function ea(e){e||$("#civics").append($(`

                            ${F("civics_jobs")}

                            `)),ia("unemployed",e,0,0,"warning"),ia("hunter",e,0,0),ia("forager",e,0,0),ia("farmer",e,.82,5),ia("lumberjack",e,1,5),ia("quarry_worker",e,1,5),ia("crystal_miner",e,.1,5),ia("scavenger",e,.12,5),ia("torturer",e,1,3,"advanced"),ia("miner",e,1,4,"advanced"),ia("coal_miner",e,.2,4,"advanced"),ia("craftsman",e,1,5,"advanced"),ia("cement_worker",e,.4,5,"advanced"),ia("entertainer",e,1,10,"advanced"),ia("priest",e,1,3,"advanced"),ia("professor",e,.5,6,"advanced"),ia("scientist",e,1,5,"advanced"),ia("banker",e,.1,6,"advanced"),ia("colonist",e,1,5,"advanced"),ia("titan_colonist",e,1,5,"advanced"),ia("space_miner",e,1,5,"advanced"),ia("hell_surveyor",e,1,1,"advanced"),ia("archaeologist",e,1,1,"advanced"),ia("pit_miner",e,1,4.5,"advanced"),ia("crew",e,1,4,"alert"),e||t.race.start_cataclysm||(na(),t.race.servants&&function(){if(Cs($("#servants")),t.race.servants){var e=$(`

                            ${F("civics_servants")}

                            {{ s.used }} / {{ s.max }}
                            `);$("#servants").append(e),["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].forEach((function(e){ia(e,"servant")})),zs({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`),_=c?$('
                            '):$(`
                            `);if(n&&"unemployed"!==e){let t=$(`

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

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

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

                            {{ sjob.${e} }}
                            `):$(``);l.append(t)}if(l.append(_),$(c?"#servants":"#jobs").append(l),"crew"!==e){var d=$(`«`),p=$(`»`);_.append(d),_.append(p)}zs(c?{el:`#${o}`,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:`#${o}`,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=Js(3,14);if(0===a&&e.length>0)return e}return a},adjust:(e,t)=>"titan_colonist"===t&&s.ai_colonist?e+aa(s.ai_colonist):e}}),_s(o,(function(){return Yt[e](c)}),{elm:`#${o} .job_label`,classes:"has-background-light has-text-dark"})}}function sa(e,a){let r=t.civic.farmer.impact;return e&&(r+=t.tech.agriculture&&t.tech.agriculture>=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?ss.grassland.vars()[0]:1,r*="savanna"===t.city.biome?ss.savanna.vars()[0]:1,r*="ashland"===t.city.biome?ss.ashland.vars()[0]:1,r*="volcanic"===t.city.biome?ss.volcanic.vars()[0]:1,r*="hellscape"===t.city.biome?ss.hellscape.vars()[0]:1,r*=t.city.ptrait.includes("trashed")?ns.trashed.vars()[0]:1,a||(r*=Gi(t.civic.farmer.workers,"farmer")),r*=t.tech.agriculture>=7?1.1:1,r*=t.race.low_light?1-Ki.low_light.vars()[0]/100:1,a&&(r*=aa(1)),r}function na(e){if(Cs($(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 }}",i=$(`

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

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

                            ${r}

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

                            ${r}

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

                            ${r}

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

                            ${F("tab_portal")}

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

                            ${r}

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

                            ${r}

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

                            ${r}

                            ${i}
                            `);_s(a,(function(){return"string"==typeof ca[a].info.desc?ca[a].info.desc:ca[a].info.desc()}),{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),"prtl_fortress"===a&&ga(e,!0),Object.keys(ca[a]).forEach((function(e){"info"!==e&&Lt(ca,a,e)&&Xr(ca[a][e],"portal",e)}))}}))}function ma(e){switch(e){case"hostiles":return t.portal.fortress.threat>=2e3?`${F("fortress_threat",[t.portal.fortress.threat])} ${F("fortress_threat_high")}`:t.portal.fortress.threat<1e3?`${F("fortress_threat",[t.portal.fortress.threat])} ${F("fortress_threat_low")}`:`${F("fortress_threat",[t.portal.fortress.threat])} ${F("fortress_threat_medium")}`;case"threatLevel":{let e=t.portal.fortress.threat;return e<1e3?`${F("fortress_threat_level")} ${F("fortress_threat_level1")}`:e<1500?`${F("fortress_threat_level")} ${F("fortress_threat_level2")}`:e>=5e3?`${F("fortress_threat_level")} ${F("fortress_threat_level6")}`:e>=3e3?`${F("fortress_threat_level")} ${F("fortress_threat_level5")}`:e>=2e3?`${F("fortress_threat_level")} ${F("fortress_threat_level4")}`:`${F("fortress_threat_level")} ${F("fortress_threat_level3")}`}case"hireLabel":return F("civics_garrison_hire_mercenary_cost",[Math.round(pe("m_cost")).toLocaleString()])}}function ga(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",i=a?$(`
                            `):$("#gFort");a?e.append(i):(i.length>0?Cs(i):(i=$(`
                            `),e.append(i)),i.append(`

                            ${F("portal_fortress_name")}

                            `));let n=$("
                            ");i.append(n);let c=$(`${F("fortress_defense")} {{ f.garrison | defensive }}`);n.append(c);let o=$(`${F("fortress_spotted")} {{ f.threat }}`);n.append(o);let l=$('{{ f.threat | threat }}');n.append(l);let _=$("
                            ");i.append(_),_.append($(`${F("fortress_wall")} {{ f.walls }}%`));let d=$("
                            ");i.append(d),d.append($(`${F("fortress_army")}`)),d.append($('«')),d.append($('{{ f.garrison | patrolling }}')),d.append($('»')),d.append($(`${F("fortress_patrol")}`)),d.append($('«')),d.append($('{{ f.patrols }}')),d.append($('»')),d.append($(`${F("fortress_patrol_size")}`)),d.append($('«')),d.append($('{{ f.patrol_size }}')),d.append($('»')),d.append($(``));let p="light"===t.settings.theme?' type="is-light"':' type="is-dark"',u=$("
                            ");d.append(u),u.append($(`${F("fortress_patrol_reports")}`)),u.append($(`${F("fortress_surv_reports")}`)),u.append($(`${F("fortress_nocrew")}`)),a&&i.append($(`
                            ${F("civics_garrison_training")} - ${F("arpa_to_complete")} {{ g.rate, g.progress | trainTime }} {{ g.progress }}%
                            `)),zs({el:`#${r}`,data:{f:t.portal.fortress,g:t.civic.garrison,s:t.settings},methods:{defense:()=>F("fortress_defense"),hostiles:()=>ma("hostiles"),threatLevel:()=>ma("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,zs({el:"#garrison"},"update"))},aLast(){let e=b(),a=t.portal.fortress.patrols*t.portal.fortress.patrol_size;s.soul_forge&&(a+=pa()),t.portal.hasOwnProperty("guard_post")&&(a+=aa(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,zs({el:"#garrison"},"update")):a=!1,e--}},hireLabel:()=>ma("hireLabel"),observation(){t.settings.civTabs=$("#mainTabs > nav ul li").length-1,t.settings.tabLoad||ja()}},filters:{defensive:e=>function(e){let a=e-t.portal.fortress.patrols*t.portal.fortress.patrol_size;if(s.soul_forge){let e=pa();e<=a&&(a-=e)}t.portal.hasOwnProperty("guard_post")&&(a-=aa(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)),s.war_droid){let e=s.war_droid-t.portal.fortress.patrols>0?s.war_droid-t.portal.fortress.patrols:0;a+=t.tech.hdroid?aa(2*e):aa(e)}let i=t.tech.turret?t.tech.turret>=2?70:50:35;return Math.round(we(a,"hellArmy",r))+(s.turret?s.turret*i:0)}(e),patrolling(e){let a=e-t.portal.fortress.patrols*t.portal.fortress.patrol_size;if(s.soul_forge){let e=pa();e<=a&&(a-=e)}return t.portal.hasOwnProperty("guard_post")&&(a-=aa(t.portal.guard_post.on)),a},threat:e=>F(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)=>Fs(0===e?-1:(100-t)/(4*e))}}),["hostiles","threatLevel","armyLabel","patLabel","patSizeLabel","hireLabel"].forEach((function(e){_s(`hf${r}${e}`,(function(){switch(e){case"hostiles":case"threatLevel":return ma("hostiles");case"armyLabel":return F("fortress_stationed");case"patLabel":return F("fortress_patrol_desc",[t.portal.fortress.patrols]);case"patSizeLabel":return F("fortress_patrol_size_desc",[t.portal.fortress.patrol_size]);case"hireLabel":return ma("hireLabel")}}),{elm:`#${r} span.${e}`})})),_s(`hf${r}observe`,(function(){return F("hell_observation_tooltip")}),{elm:`#${r} button.observe`})}function va(e,a){switch(e){case"ruins":{let e=a||aa(s.guard_post),r=75*(s.arcology||0),i=we(e,"hellArmy",0);t.race.holy&&(i*=1+Ki.holy.vars()[1]/100);let n=as("unicorn");n>0&&(i*=1+Ki.holy.vars(1)[1]/100*n);let c=(i+r)/5e3;return{supress:c>1?1:c,rating:i+r}}case"gate":{let e=va("ruins",a),r=100*(s.gate_turret||0);t.race.holy&&(r*=1+Ki.holy.vars()[1]/100);let i=as("unicorn");i>0&&(r*=1+Ki.holy.vars(1)[1]/100*i);let n=(e.rating+r)/7500;return{supress:n>1?1:n,rating:e.rating+r}}default:return 0}}const fa={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 ya(e,a){let r=9999,i=1e7;switch(e){case"small":{let e=t.blood.prepared&&t.blood.prepared>=2?5e4:75e3;i=a?2.5*e:e,r=a?20:1}break;case"medium":i=a?45e4:18e4,r=a?100:4;break;case"large":i=a?925e3:375e3,r=a?500:20;break;case"titan":i=a?15e5:75e4,r=a?1500:75;break;case"collector":{let e=t.blood.prepared&&t.blood.prepared>=2?8e3:1e4;i=a?2.5*e:e,r=1}}return{s:r,c:i}}function ba(){if((t.settings.tabLoad||2===t.settings.civTabs&&4===t.settings.govTabs)&&(Cs($("#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=$(`
                            ${F("portal_mech_assembly")} - {{ b.size | slabel }} {{ b.chassis | clabel }}
                            `);a.append(r),r.append(` | ${F("portal_mech_bay_space")}: {{ m.bay }} / {{ m.max }}`),r.append(` | ${F("portal_mech_sup_avail")}: {{ p.supply | round }} / {{ p.sup_max }}`);let i=t.blood.prepared&&t.blood.prepared>=3?`${F("portal_mech_infernal")} (${F("portal_mech_infernal_effect",[25])})`:"";a.append(`
                            ${F("portal_mech_space")} {{ b.size | bay }} | ${F("portal_mech_cost")} {{ b.size | price }} | ${F("portal_mech_soul",[t.resource.Soul_Gem.name])} {{ b.size | soul }}${i}
                            `),a.append("
                            {{ b.size | desc }}
                            ");let s=$('
                            ');a.append(s);let n="";["small","medium","large","titan","collector"].forEach((function(e,t){n+=`${F(`portal_mech_size_${e}`)}`})),s.append(`\n ${n}\n `);let c="";["wheel","tread","biped","quad","spider","hover"].forEach((function(e,t){c+=`${F(`portal_mech_chassis_${e}`)}`})),s.append(`\n ${c}\n `);for(let e=0;e<4;e++){let t="";["laser","kinetic","shotgun","missile","flame","plasma","sonic","tesla"].forEach((function(a,r){t+=`${F(`portal_mech_weapon_${a}`)}`})),s.append(`\n ${t}\n `)}let o=t.blood.prepared?5:4;for(let e=0;e{{ '${a}' | equipment }}`})),s.append(`\n ${t}\n `)}a.append(`
                            `),zs({el:"#mechAssembly",data:{p:t.portal.purifier,m:t.portal.mechbay,b:t.portal.mechbay.blueprint},methods:{build(){let e=ya(t.portal.mechbay.blueprint.size,t.portal.mechbay.blueprint.infernal),a=e.c,r=e.s,i=wa(t.portal.mechbay.blueprint.size),s=t.portal.mechbay.max-t.portal.mechbay.bay;if(t.portal.purifier.supply>=a&&s>=i&&t.resource.Soul_Gem.amount>=r){t.portal.purifier.supply-=a,t.resource.Soul_Gem.amount-=r;let e=nn(t.portal.mechbay.blueprint);t.portal.mechbay.mechs.push(e),t.portal.mechbay.bay+=i,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,zs({el:"#mechAssembly"},"update")},setEquip(e,a){t.portal.mechbay.blueprint.equip[a]=e,zs({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=>wa(e),price:e=>ya(e,t.portal.mechbay.blueprint.infernal).c,soul:e=>ya(e,t.portal.mechbay.blueprint.infernal).s,slabel:e=>F(`portal_mech_size_${e}`),clabel:e=>F(`portal_mech_chassis_${e}`),wlabel:e=>F(`portal_mech_weapon_${e}`),desc:e=>F(`portal_mech_size_${e}_desc`),round:e=>Math.round(e),equipment(e){if("special"!==e)return F(`portal_mech_equip_${e}`);let a="jumpjet";switch(t.portal.mechbay.blueprint.size){case"large":a="battery";break;case"titan":a="target"}return F(`portal_mech_equip_${a}`)}}}),["size","chassis","weapon","equip"].forEach((function(e){let a=1;"weapon"===e?a=4:"equip"===e&&(a=o);for(let r=0;r');e.append(l),ka(),Cs($("#mechList")),$("#mechList").append(`\n
                            \n ${F("portal_mech_scrap")}\n | ${F("portal_mech")} #{{index + 1}}: \n {{ mech.infernal ? "${F("portal_mech_infernal")} " : "" }}{{ mech | size }} {{ mech | chassis }}\n
                            \n
                            \n \n
                            \n
                            \n \n
                            \n
                            \n
                            `),zs({el:"#mechList",data:t.portal.mechbay,methods:{scrap(e){if(t.portal.mechbay.mechs[e]){let a=ya(t.portal.mechbay.mechs[e].size,t.portal.mechbay.mechs[e].infernal),r=wa(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 F(`portal_mech_equip_${e}`);let a="jumpjet";switch(t){case"large":a="battery";break;case"titan":a="target"}return F(`portal_mech_equip_${a}`)},weapon:e=>F(`portal_mech_weapon_${e}`),size:e=>F(`portal_mech_size_${e.size}`),chassis:e=>F(`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]),$a()}})}(),$("#mechList .scrap").each((function(e,a){_s(`mechList-scrap${e}`,(function(){let a=ya(t.portal.mechbay.mechs[e].size,t.portal.mechbay.mechs[e].infernal);return F("portal_mech_scrap_refund",[Math.floor(a.c/3),Math.floor(a.s/2)])}),{elm:a})}))}}function wa(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 ka(){let e=$("#mechList")[0];if(e){let t=Sortable.get(e);t&&t.destroy()}}function $a(){let e=25*(l.mechbay||0),a=0,r=0,i=0;for(let s of t.portal.mechbay.mechs)a+=wa(s.size),a<=e&&(r++,"small"===s.size&&i++);t.portal.mechbay.bay=a,t.portal.mechbay.max=e,t.portal.mechbay.active=r,t.portal.mechbay.scouts=i}function xa(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 qa(e,a){let r=a||t.portal.spire.type,i=1;switch(e.chassis){case"wheel":switch(r){case"sand":i=["small","medium"].includes(e.size)?.9:.85;break;case"swamp":i=["small","medium"].includes(e.size)?.35:.18;break;case"jungle":i=["small","medium"].includes(e.size)?.92:.85;break;case"rocky":i=["small","medium"].includes(e.size)?.65:.5;break;case"gravel":i=["small","medium"].includes(e.size)?1:.95;break;case"muddy":i=["small","medium"].includes(e.size)?.85:.58;break;case"grass":i=["small","medium"].includes(e.size)?1.3:1.2;break;case"brush":i=["small","medium"].includes(e.size)?.9:.8;break;case"concrete":i=["small","medium"].includes(e.size)?1.1:1}break;case"tread":switch(r){case"sand":i=["small","medium"].includes(e.size)?1.15:1.1;break;case"swamp":i=["small","medium"].includes(e.size)?.55:.4;break;case"forest":i=["small","medium"].includes(e.size)?1:.95;break;case"jungle":i=["small","medium"].includes(e.size)?.95:.9;break;case"rocky":i=["small","medium"].includes(e.size)?.65:.5;break;case"gravel":i=["small","medium"].includes(e.size)?1.3:1.2;break;case"muddy":i=["small","medium"].includes(e.size)?.88:.72}break;case"biped":switch(r){case"sand":i=["small","medium"].includes(e.size)?.78:.65;break;case"swamp":i=["small","medium"].includes(e.size)?.68:.5;break;case"forest":i=["small","medium"].includes(e.size)?1:.95;break;case"jungle":i=["small","medium"].includes(e.size)?.82:.7;break;case"rocky":i=["small","medium"].includes(e.size)?.48:.4;break;case"muddy":i=["small","medium"].includes(e.size)?.85:.7;break;case"grass":i=["small","medium"].includes(e.size)?1.25:1.2;break;case"brush":i=["small","medium"].includes(e.size)?.92:.85}break;case"quad":switch(r){case"sand":i=["small","medium"].includes(e.size)?.86:.75;break;case"swamp":i=["small","medium"].includes(e.size)?.58:.42;break;case"forest":i=["small","medium"].includes(e.size)?1.25:1.2;break;case"rocky":case"brush":i=["small","medium"].includes(e.size)?.95:.9;break;case"gravel":i=["small","medium"].includes(e.size)?.9:.8;break;case"muddy":i=["small","medium"].includes(e.size)?.68:.5;break;case"grass":i=["small","medium"].includes(e.size)?1:.95}break;case"spider":switch(r){case"sand":i=["small","medium"].includes(e.size)?.75:.65;break;case"swamp":i=["small","medium"].includes(e.size)?.9:.78;break;case"forest":i=["small","medium"].includes(e.size)?.82:.75;break;case"jungle":i=["small","medium"].includes(e.size)?.77:.65;break;case"rocky":i=["small","medium"].includes(e.size)?1.25:1.2;break;case"gravel":i=["small","medium"].includes(e.size)?.86:.75;break;case"muddy":i=["small","medium"].includes(e.size)?.92:.82;break;case"brush":i=["small","medium"].includes(e.size)?1:.95}break;case"hover":switch(r){case"swamp":i=["small","medium"].includes(e.size)?1.35:1.2;break;case"forest":i=["small","medium"].includes(e.size)?.65:.48;break;case"jungle":i=["small","medium"].includes(e.size)?.55:.35;break;case"rocky":i=["small","medium"].includes(e.size)?.82:.68;break;case"muddy":i=["small","medium"].includes(e.size)?1.15:1.08;break;case"brush":i=["small","medium"].includes(e.size)?.78:.7}}return i}function Pa(e){switch(e){case"small":return.0025;case"medium":return.0075;case"large":return.01;case"titan":return.012;default:return 0}}function ja(e){if(!t.settings.tabLoad&&t.settings.civTabs!==$("#mainTabs > nav ul li").length-1&&!e)return;let a=$("#mTabObserve");Cs(a);let r=$('
                            ');if(a.append(r),r.append(`\n \n \n \n \n \n \n `),zs({el:"#hellObservations",data:{s:t.settings},methods:{swapTab(e){if(!t.settings.tabLoad)switch(Cs($("#h_Report")),Cs($("#h_Analysis")),e){case 0:Sa();break;case 1:Oa()}return e}}}),t.settings.tabLoad)Sa(),Oa();else switch(t.settings.hellTabs){case 0:Sa();break;case 1:Oa()}}function Oa(){if(!t.settings.tabLoad&&1!==t.settings.hellTabs)return;let e=$("#h_Analysis"),a=$('
                            ');e.append(a);let r=$("
                            ");a.append(r);let i=$('
                            ');a.append(i);let s=$('
                            ');i.append(s);let n=$('
                            '),c=$('
                            ');s.append(n),s.append(c),r.append(`\n
                            \n

                            ${F("tab_settings")}

                            \n
                            \n
                            \n ${F("hell_analysis_expanded")}\n ${F("hell_analysis_average")}\n ${F("hell_analysis_hyperSlow")}\n
                            \n
                            \n ${F("hell_analysis_time_game_days")}\n ${F("hell_analysis_time_seconds")}\n ${F("hell_analysis_time_minutes")}\n ${F("hell_analysis_time_hours")}\n ${F("hell_analysis_time_days")}\n
                            \n `),zs({el:"#hellAnalysis",data:{s:t.portal.observe.settings,r:t.race}});let o=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+Ki.slow.vars()[0]/100),t.race.hyper&&(a*=1-Ki.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?o(e,5):q(e,5,!0)}return F("hell_analysis_time_average",[e,F(`hell_analysis_time_${r}_abbr`)])},_=function(e,a){if(!e)return;let r=$(`#${e}`);Cs(r),r.append(`\n

                            ${F("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 `),zs({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,i)=>F("hell_analysis_number_display",i?[F(`hell_analysis_${r}`),l(e,t.portal.observe.stats[a].days,t.portal.observe.settings.display)]:[F(`hell_analysis_${r}`),t.portal.observe.settings.expanded?(+e.toFixed(5)).toLocaleString():q(e,5,!0)]),genericSub:(e,r,i)=>i?"ᄂ"+F("hell_analysis_number_display",[F(`hell_analysis_${r}`),l(e,t.portal.observe.stats[a].days,t.portal.observe.settings.display)]):"ᄂ"+F("hell_analysis_number_display",[F(`hell_analysis_${r}`),t.portal.observe.settings.expanded?(+e.toFixed(5)).toLocaleString():q(e,5,!0)]),genericMulti(e,r,i){let s=0;return Object.keys(e).forEach((function(t){s+=e[t]})),F("hell_analysis_number_display",i?[F(`hell_analysis_${r}`),l(s,t.portal.observe.stats[a].days,t.portal.observe.settings.display)]:[F(`hell_analysis_${r}`),t.portal.observe.settings.expanded?(+s.toFixed(5)).toLocaleString():q(s,5,!0)])},time(e,a){switch("game_days"!==a&&t.portal.observe.settings.hyperSlow&&(t.race.slow&&(e*=1+Ki.slow.vars()[0]/100),t.race.hyper&&(e*=1-Ki.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 F("hell_analysis_time",[F(`hell_analysis_time_${a}`),t.portal.observe.settings.expanded?o(e,8):q(e,5,!0)])},resetLabel:()=>F("hell_analysis_period_reset"),startLabel:e=>F("hell_analysis_start",[e.year,e.day]),dropdownLabel:e=>e?"⮝":"⮟"}})};_("hellAnalysisTotal","total"),_("hellAnalysisPeriod","period"),a=$("#hellAnalysis");let d=$("
                            ");a.append(d),d.append(`

                            ${F("hell_graph_create")}

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

                            ${F("hell_graph_title")}

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

                            ${F("hell_graph_name")}

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

                            ${F("hell_graph_type")}

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

                            ${F("hell_graph_data")}

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

                            {{ e.message }}

                            \n
                            \n
                            \n \n
                            \n
                            \n `),zs({el:"#specialModal",data:{s:i,e:s,sg:t.resource.Soul_Gem},methods:{nameUpdate(e){i.chartName!==e&&(s.show=!1,i.chartName=e)},dataOptions(e){switch(e){case"pie":i.showGroups=!0;break;case"bar":i.showGroups=!1}},setData(e,t){s.show=!1,i.data=[e,t]},createGraph(){if(!i.name)return s.show=!0,void(s.message=F("hell_graph_error_name_blank"));if(0===i.data.length)return s.show=!0,void(s.message=F("hell_graph_error_data_missing"));let e=[],a=[];"pie"===i.chartType&&Object.keys(t.portal.observe.stats[i.data[0]][i.data[1]]).forEach((function(t){e.push(F(`hell_analysis_${i.data[1]}_${t}`)),a.push([i.data[0],i.data[1],t])}));let r=function(e,a,r,i,s){let n=`hellGraph-${t.portal.observe.graphID}`;return t.portal.observe.graphID++,t.portal.observe.graphs[n]={id:n,chartID:`${n}-chart`,name:e,type:a,labels:r,data:i,settings:s},n}(i.chartName,i.chartType,e,a,{title:i.chartName});Ma(p,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){Ma(p,t.portal.observe.graphs[e])}))}function Ma(e,a){let r=a.id;u[r]&&u[r].graph.destroy();let i=$(`
                            `);e.append(i),i.append(`
                            \n
                            \n

                            \n

                            Delete

                            \n
                            \n
                            \n

                            ${a.name}

                            \n
                            \n
                            `);let s=$('
                            ');i.append(s),zs({el:`#graph-${r}-controls`,methods:{deleteGraph(){u[r].graph.destroy(),delete u[r],delete t.portal.observe.graphs[r],Cs($(`#graph-${r}-container`),!0)}}});let n=$(``);s.append(n),u[r]={data:a.data},"pie"===a.type&&(u[r].graph=function(e,a,r,i){let s=[];return r.forEach((function(e){s.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:s,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}}}})}(n,a.labels,a.data,a.settings))}function Sa(){if(!t.settings.tabLoad&&0!==t.settings.hellTabs)return;Ca();let e="",a=$("#h_Report"),r=$('
                            ');a.append(r);let i=$('
                            ');r.append(i),i.append(`

                            ${F("hell_report_log")}

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

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

                            `),s.append(`
                            \n

                            ${F("hell_report_log_stats_kills",[n])}

                            \n

                            ${F("hell_report_log_stats_gems",[c])}

                            \n

                            ${F("hell_report_log_stats_wounded",[i.stats.wounded])}

                            \n

                            ${F("hell_report_log_stats_died",[i.stats.died])}

                            \n
                            `),r.append(`

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

                            `),r.append(`

                            ${F("hell_report_log_start",[i.start])}

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

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

                            `):r.append(`

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

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

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

                            ${F("hell_report_log_encounter_fail",[s])}

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

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

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

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

                            ${F("hell_report_log_patrols_lost",[i.patrols_lost])}

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

                            ${F("hell_report_log_siege",[i.siege.surveyors,i.siege.soldiers,i.siege.kills])}

                            `):r.append(`

                            ${F("hell_report_log_siege_fail",[i.siege.damage,i.siege.kills])}

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

                            ${F("hell_report_log_demons",[i.demons])}

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

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

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

                            ${F("hell_report_log_soul_attractors",[i.soul_attractors])}

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

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

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

                            "),s=i.gate_turrets[e],n=F("hell_report_log_obj_counter",[F("portal_gate_turret_title"),e]);a.append(`${F("hell_report_log_misc_kills",[n,s.kills,F("portal_gate_name")])}`),s.gem&&a.append(`${F("hell_report_log_soul_find",[t.resource.Soul_Gem.name,1])}`),r.append(a)})),zs({el:"#hellReportDisplay",data:{g:t.resource.Soul_Gem}})};if(0!==n.day){c(n.year,n.day);let e=n.year,a=n.day;a-1==0?(e--,a=t.city.calendar.orbit):a--,o(e,a)}else n.year=t.city.calendar.year,n.day=t.city.calendar.day;zs({el:"#hellReportLogTitle",methods:{updateList(){c(n.year,n.day)}}}),_s("hellReportLogs",(function(){return F("hell_report_log_tooltip",[2500])}),{elm:"#hellReport .reportList div:first-child h2"})}function Ca(e){if(!document.getElementById("hellReportList")||e){let e=!1,a=2500,r=(Object.keys(p).length-1)*t.city.calendar.orbit+t.city.calendar.day;if(r>a){let i=Object.keys(p[Object.keys(p)[0]]).length;for(r-t.city.calendar.orbit+i>a&&(e=!0,r-=i,delete p[Object.keys(p)[0]]);r>a;)r-=t.city.calendar.orbit,delete p[Object.keys(p)[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},Fa={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},Aa={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},Ia={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 Ta(){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+Ki.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;Ea.general.add.push({name:F("city_foundry"),manual:t.city.foundry.count*e,auto:t.city.foundry.count*e})}if(t.tech.foundry>=3&&Object.keys(Ea).forEach((function(e){t.city.foundry[e]&&t.city.foundry[e]>1&&Ea[e].add.push({name:F("tech_apprentices"),manual:(t.city.foundry[e]-1)*$e(.03),auto:(t.city.foundry[e]-1)*$e(.03)})})),t.tech.foundry>=4&&t.city.sawmill&&Ea.Plywood.add.push({name:F("city_sawmill"),manual:.02*t.city.sawmill.count,auto:.02*t.city.sawmill.count}),t.tech.foundry>=6&&Ea.Brick.add.push({name:F("city_foundry"),manual:.02*t.city.foundry.count,auto:.02*t.city.foundry.count}),t.tech.foundry>=7&&(Ea.general.add.push({name:F("city_factory")+` (${F("tab_city5")})`,manual:.05*s.factory,auto:.05*s.factory}),t.tech.mars>=4&&Ea.general.add.push({name:F("city_factory")+` (${F("tab_space")})`,manual:.05*s.red_factory,auto:.05*s.red_factory}),t.interstellar.int_factory&&s.int_factory&&Ea.general.add.push({name:F("interstellar_int_factory_title"),manual:.1*s.int_factory,auto:.1*s.int_factory})),t.space.fabrication&&n.fabrication&&Ea.general.add.push({name:F("space_red_fabrication_title"),manual:n.fabrication*t.civic.colonist.workers*$e(e?.05:.02),auto:n.fabrication*t.civic.colonist.workers*$e(e?.05:.02)}),s.stellar_forge&&(Ea.Mythril.add.push({name:F("interstellar_stellar_forge_title"),manual:.05*s.stellar_forge,auto:.05*s.stellar_forge}),Ea.general.add.push({name:F("interstellar_stellar_forge_title"),manual:0,auto:.1*s.stellar_forge})),s.hell_forge){let e=va("ruins");Ea.general.add.push({name:F("portal_hell_forge_title"),manual:0,auto:.75*s.hell_forge*e.supress}),Ea.Scarletite.multi.push({name:F("portal_ruins_supressed"),manual:1,auto:e.supress})}if(t.tauceti.tau_factory&&n.tau_factory&&Ea.general.add.push({name:F("tau_home_tau_factory"),manual:0,auto:n.tau_factory*(t.tech.isolation?2.75:.9)}),t.tech.isolation&&t.tauceti.colony&&n.colony&&Ea.general.add.push({name:F("tau_home_colony"),manual:.5*n.colony,auto:.5*n.colony}),n.zero_g_lab&&s.zero_g_lab||n.infectious_disease_lab&&s.infectious_disease_lab){let e=_t("spc_enceladus");Ea.Quantium.multi.push({name:F("space_syndicate"),manual:1,auto:e})}if(t.tech.alien_crafting&&n.infectious_disease_lab&&s.infectious_disease_lab){let e=1+.65*Math.min(n.infectious_disease_lab,s.infectious_disease_lab);Ea.Quantium.multi.push({name:F("tech_infectious_disease_lab_alt"),manual:1,auto:e})}if(t.race.crafty&&Ea.general.add.push({name:F("wiki_arpa_crispr_crafty"),manual:.03,auto:.03}),t.race.ambidextrous&&Ea.general.add.push({name:F("trait_ambidextrous_name"),manual:Ki.ambidextrous.vars()[0]*t.race.ambidextrous/100,auto:Ki.ambidextrous.vars()[0]*t.race.ambidextrous/100}),t.race.rigid&&Ea.general.add.push({name:F("trait_rigid_name"),manual:-Ki.rigid.vars()[0]/100,auto:-Ki.rigid.vars()[0]/100}),"socialist"===t.civic.govern.type&&Ea.general.multi.push({name:F("govern_socialist"),manual:1+ee.socialist()[0]/100,auto:1+ee.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);Ea.general.multi.push({name:F("modal_pylon_casting"),manual:e,auto:a})}"magic"===t.race.universe&&Ea.general.multi.push({name:F("universe_magic"),manual:.8,auto:.8}),t.tech.v_train&&Ea.general.multi.push({name:F("tech_vocational_training"),manual:1,auto:2}),t.genes.crafty&&Ea.general.multi.push({name:F("tab_arpa_crispr")+" "+F("wiki_arpa_crispr_crafty"),manual:1,auto:1+.5*(t.genes.crafty-1)}),t.race.living_tool&&Ea.general.multi.push({name:F("trait_living_tool_name"),manual:1,auto:1+Ki.living_tool.vars()[1]/100}),t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=1&&Ea.general.multi.push({name:F("evo_challenge_orbit_decay"),manual:1,auto:1.1}),t.race.ambidextrous&&Ea.general.multi.push({name:F("trait_ambidextrous_name"),manual:1,auto:1+Ki.ambidextrous.vars()[1]*t.race.ambidextrous/100}),t.blood.artisan&&Ea.general.multi.push({name:F("tab_arpa_blood")+" "+F("arpa_blood_artisan_title"),manual:1,auto:1+t.blood.artisan/100});let a=function(){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=$e(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=$e(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+Ki.spiritual.vars()[0]/100);let r=as("seraph");return r>0&&(a*=1+Ki.spiritual.vars(1)[0]/100*r),"theocracy"===t.civic.govern.type&&(a*=1.12),t.race.ooze&&(a*=1-Ki.ooze.vars()[1]/100),(e?t.space.ziggurat.count:t.city.temple.count)*a}}return 0}();a>0&&Ea.general.multi.push({name:F("faith"),manual:1,auto:1+a/("antimatter"===t.race.universe?1.5:3)}),t.prestige.Plasmid.count>0&&Ea.general.multi.push({name:F("resource_Plasmid_plural_name"),manual:$r()/8+1,auto:$r()/8+1}),t.genes.challenge&&t.genes.challenge>=2&&Ea.general.multi.push({name:F("mastery"),manual:1+Ls()/(t.race.weak_mastery?50:100),auto:1+Ls()/(t.race.weak_mastery?50:100)})}});var Ea;function Ka(e){if(e)switch(e){case"market":pr();break;case"storage":ur();break;case"ejector":mr();break;case"supply":vr();break;case"alchemy":yr()}else pr(),ur(),mr(),vr(),yr()}function Da(e){"market"===e?(Ka("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),Wa(`#market-${e}`,r,e,t,!0)}})),Ga()):"storage"===e?(Ka("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),tr(`#stack-${e}`,r,e,t)}})),Ga()):"ejector"===e?(Ka("ejector"),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let t=a.resource[e].color;Aa[e]&&gr(e,t)}))):"supply"===e?(Ka("supply"),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let t=a.resource[e].color;Ia[e]&&fr(e,t)}))):"alchemy"===e&&(Ka("alchemy"),a.hasOwnProperty("resource")&&Object.keys(a.resource).forEach((function(e){let r=a.resource[e].color,i=a.resource[e].tradable;Fa[e]&&"magic"===t.race.universe&&(t.resource[e].basic=i,br(e,r,i))})))}function Ba(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)),Na("RNA",e,a,1,!1),Na("DNA",e,a,1,!1)}Na("Money",e,1e3,1,!1,!1,"success"),Na(t.race.species,e,0,0,!1,!1,"warning"),Na("Slave",e,0,0,!1,!1,"warning"),Na("Mana",e,0,1,!1,!1,"warning"),Na("Energy",e,0,0,!1,!1,"warning"),Na("Sus",e,0,0,!1,!1,"warning"),Na("Knowledge",e,100,1,!1,!1,"warning"),Na("Zen",e,0,0,!1,!1,"warning"),Na("Crates",e,0,0,!1,!1,"warning"),Na("Containers",e,0,0,!1,!1,"warning"),Na("Food",e,250,1,!0,!0),Na("Lumber",e,200,1,!0,!0),Na("Chrysotile",e,200,1,!0,!0),Na("Stone",e,200,1,!0,!0),Na("Crystal",e,200,1,!0,!0),Na("Furs",e,100,1,!0,!0),Na("Copper",e,100,1,!0,!0),Na("Iron",e,100,1,!0,!0),Na("Aluminium",e,50,1,!0,!0),Na("Cement",e,100,1,!0,!0),Na("Coal",e,50,1,!0,!0),Na("Oil",e,0,1,!0,!1),Na("Uranium",e,10,1,!0,!1),Na("Steel",e,50,1,!0,!0),Na("Titanium",e,50,1,!0,!0),Na("Alloy",e,50,1,!0,!0),Na("Polymer",e,50,1,!0,!0),Na("Iridium",e,0,1,!0,!0),Na("Helium_3",e,0,1,!0,!1),Na("Water",e,0,1,!1,!1,"advanced"),Na("Deuterium",e,0,1,!1,!1,"advanced"),Na("Neutronium",e,0,1,!1,!1,"advanced"),Na("Adamantite",e,0,1,!1,!0,"advanced"),Na("Infernite",e,0,1,!1,!1,"advanced"),Na("Elerium",e,1,1,!1,!1,"advanced"),Na("Nano_Tube",e,0,1,!1,!1,"advanced"),Na("Graphene",e,0,1,!1,!0,"advanced"),Na("Stanene",e,0,1,!1,!0,"advanced"),Na("Bolognium",e,0,1,!1,!0,"advanced"),Na("Vitreloy",e,0,1,!1,!0,"advanced"),Na("Orichalcum",e,0,1,!1,!0,"advanced"),Na("Unobtainium",e,0,1,!1,!1,"advanced"),Na("Materials",e,0,1,!1,!1,"advanced"),Na("Horseshoe",e,-2,0,!1,!1,"advanced"),Na("Nanite",e,0,1,!1,!1,"advanced"),Na("Genes",e,-2,0,!1,!1,"advanced"),Na("Soul_Gem",e,-2,0,!1,!1,"advanced"),Na("Plywood",e,-1,0,!1,!1,"danger"),Na("Brick",e,-1,0,!1,!1,"danger"),Na("Wrought_Iron",e,-1,0,!1,!1,"danger"),Na("Sheet_Metal",e,-1,0,!1,!1,"danger"),Na("Mythril",e,-1,0,!1,!1,"danger"),Na("Aerogel",e,-1,0,!1,!1,"danger"),Na("Nanoweave",e,-1,0,!1,!1,"danger"),Na("Scarletite",e,-1,0,!1,!1,"danger"),Na("Quantium",e,-1,0,!1,!1,"danger"),Na("Corrupt_Gem",e,-2,0,!1,!1,"caution"),Na("Codex",e,-2,0,!1,!1,"caution"),Na("Cipher",e,0,1,!1,!1,"caution"),Na("Demonic_Essence",e,-2,0,!1,!1,"caution"),e||(Ha("Blood_Stone","caution"),Ha("Artifact","caution"),Ha("Plasmid"),Ha("AntiPlasmid"),Ha("Phage"),Ha("Dark"),Ha("Harmony"),Ha("AICore"))}function Ga(){"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=$(`
                            ${F("resource_market_trade_routes")} / {{ mtrade }}
                            `);a.append($(`${F("cancel_all_routes")}`)),$("#market").append(a),zs({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,ir(e))}))}},filters:{tdeCnt(e){let a=Js(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}}}),_s("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($(`

                            ${F("galaxy_trade")}

                            `)),Ja()),function(){if(t.settings.tabLoad||4===t.settings.civTabs&&1===t.settings.marketTabs){var e=$(`
                            ${F("resource_Crates_name")}{{ cr.amount }} / {{ cr.max }}${F("resource_Containers_name")}{{ cn.amount }} / {{ cn.max }}
                            `);$("#resStorage").append(e),zs({el:"#crateTotal",data:{cr:t.resource.Crates,cn:t.resource.Containers}})}}())}function Na(e,r,i,s,n,c,o){if(o=o||"info",t.resource[e]||(t.resource[e]={}),Ra(e),t.race.artifical&&"Food"===e&&(c=!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=i),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=s),"Mana"===e&&(t.resource[e].gen=0,t.resource[e].gen_d=0),t.resource[e].stackable=c,t.resource[e].crates||(t.resource[e].crates=0),t.resource[e].containers||(t.resource[e].containers=0),!t.resource[e].trade&&n&&(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 }}
                            `),c?l.append($(`+`)):(-1!==i||-1===i&&0===s&&t.race.no_craft||"Scarletite"===e||"Quantium"===e)&&l.append($(""));let _=!1;if(0!==s||-1===i&&0===s&&t.race.no_craft||"Scarletite"===e||"Quantium"===e)l.append($(`{{ diff | diffSize }} /s`));else if(-1!==i||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`)),_=!0}$("#resources").append(l);var d={template:''};if(zs({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&&on("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=Js(7,10);e.length>0&&$("#modalBoxTitle").prepend(e)}if("Stone"===e){let e=Zs(1,12,!1);e.length>0&&$("#modalBoxTitle").prepend(e)}let r=$('
                            ');a.append(r),r.append($(`
                            ${F("resource_modal_crate_owned")} {{ crates.amount }}/{{ crates.max }}${F("resource_modal_crate_assigned")} {{ res.crates }}
                            `));let i=$(``),s=$(``),n=$(``);if(r.append(i),r.append(s),r.append(n),zs({el:"#modalCrates",data:{crates:t.resource.Crates,res:t.resource[e]},methods:{buildCrate(){or()},subCrate(e){Za(e)},addCrate(e){Xa(e)}}}),t.resource.Containers.display){let r=$('
                            ');a.append(r),r.append($(`
                            ${F("resource_modal_container_owned")} {{ containers.amount }}/{{ containers.max }}${F("resource_modal_container_assigned")} {{ res.containers }}
                            `));let i=$(``),s=$(``),n=$(``);r.append(i),r.append(s),r.append(n),zs({el:"#modalContainers",data:{containers:t.resource.Containers,res:t.resource[e]},methods:{buildContainer(){lr()},removeContainer(e){Ya(e)},addContainer(e){er(e)}}})}zs({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){_s(`${e}${t}`,function(e,t){if("modalContainers"===e){let e=dr();switch(t){case"assign":return F("resource_modal_container_assign_desc",[e]);case"unassign":return F("resource_modal_container_unassign_desc",[e]);case"construct":return nr()}}else{let e=_r();switch(t){case"assign":return F("resource_modal_crate_assign_desc",[e]);case"unassign":return F("resource_modal_crate_unassign_desc",[e]);case"construct":return sr()}}}(e,t),{elm:$(`#${e} > .${t}`),attach:"#main"})}))}))}(e))}),50)},showTrigger:()=>t.resource.Crates.display,craft(e,a){if(!t.race.no_craft){let r=La(e,"manual").multiplier,i=Ta(),s=Math.floor(t.resource[i[e][0].r].amount/i[e][0].a);for(let a=1;a${t.resource[i[e][s].r].name} ${n}`}return r}}}),rr(`cnt${e}`,e,"c"),_){let a=[1,5,"A"];for(let r=0;r"),s=e,n=a[r],c=+(100*La(s,"manual").multiplier).toFixed(0);i.append($(`
                            ${F("manual_crafting_hover_bonus",[c.toLocaleString(),t.resource[s].name])}
                            `));let o=Ta(),l=$(`
                            ${F("manual_crafting_hover_craft")}
                            `),_=0;if("number"!=typeof n){if(_=t.resource[o[s][0].r].amount/o[s][0].a,o[s].length>1)for(let e=1;e${q(c/100*_,1)} ${t.resource[s].name}`))}else{_=b()*n;let e=q(c/100*_,1);l.append($(`${e} ${t.resource[s].name}`))}let d=$(`
                            ${F("manual_crafting_hover_use")}
                            `);for(let e=0;e${q(_*o[s][e].a,1)} ${t.resource[o[s][e].r].name}`)),e+1, "));return i.append(l),i.append(d),i};ar(`inc${e}${a[r]}`,e,"manual",i)}}c&&_s(`con${e}`,(function(){var a=$(`
                            ${F("resource_Crates_plural")} ${t.resource[e].crates}
                            `);return t.tech.steel_container&&a.append($(`
                            ${F("resource_Containers_plural")} ${t.resource[e].containers}
                            `)),a})),e!==t.race.species&&"Crates"!==e&&"Containers"!==e&&-1!==i?rr(`inc${e}`,e,"p"):-1===i&&ar(`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:o,tradable:n,stackable:c}}function Ra(e){if(e===t.race.species?t.resource[e].name=cn("name"):t.resource[e].name="Money"===e?"$":F(`resource_${e}_name`),on("fool",2022))switch(e){case"Lumber":t.resource[e].name=F("resource_Stone_name");break;case"Stone":t.resource[e].name=F("resource_Lumber_name");break;case"Copper":t.resource[e].name=F("resource_Iron_name");break;case"Iron":t.resource[e].name=F("resource_Copper_name");break;case"Steel":t.resource[e].name=F("resource_Titanium_name");break;case"Titanium":t.resource[e].name=F("resource_Steel_name");break;case"Coal":t.resource[e].name=F("resource_Oil_name");break;case"Oil":t.resource[e].name=F("resource_Coal_name");break;case"Alloy":t.resource[e].name=F("resource_Polymer_name");break;case"Polymer":t.resource[e].name=F("resource_Alloy_name");break;case"Graphene":t.resource[e].name=F("resource_Stanene_name");break;case"Stanene":t.resource[e].name=F("resource_Graphene_name");break;case"Plywood":t.resource[e].name=F("resource_Brick_name");break;case"Brick":t.resource[e].name=F("resource_Plywood_name");break;case"Genes":t.resource[e].name=F("resource_Soul_Gem_name");break;case"Soul_Gem":t.resource[e].name=F("resource_Genes_name");break;case"Slave":t.resource[e].name=F("resource_Peon_name")}if("Horseshoe"===e&&(t.resource[e].name=mn()),t.race.artifical&&"Genes"===e&&(t.resource[e].name=F("resource_Program_name")),t.race.sappy)"Stone"===e&&(t.resource[e].name=F("resource_Amber_name"));else if(t.race.flier)switch(e){case"Stone":t.resource[e].name=F("resource_Clay_name");break;case"Brick":t.resource[e].name=F("resource_Mud_Brick_name")}if(t.race.soul_eater&&"Food"===e&&(t.resource[e].name=F("resource_Souls_name")),t.race.evil)switch(e){case"Lumber":t.resource[e].name=F("resource_Bones_name");break;case"Furs":t.resource[e].name=F("resource_Flesh_name");break;case"Plywood":t.resource[e].name=F("resource_Boneweave_name")}if(t.race.artifical&&"Food"===e&&(t.resource[e].name=F("resource_Signal_name")),on("halloween").active)switch(e){case"Food":t.resource[e].name=F("resource_Candy_name");break;case"Lumber":t.resource[e].name=F("resource_Bones_name");break;case"Stone":t.resource[e].name=F("resource_RockCandy_name");break;case"Furs":t.resource[e].name=F("resource_Webs_name");break;case"Plywood":t.resource[e].name=F("resource_Boneweave_name");break;case"Brick":t.resource[e].name=F("resource_Tombstone_name");break;case"Soul_Gem":t.resource[e].name=F("resource_CandyCorn_name")}}function Ha(e,a){if($(`#res${e}`).length){let t=$(`#res${e}`);return t.detach(),void $("#resources").append(t)}a=a||"special";var r=$(`
                            ${F(`resource_${e}_name`)}{{ count | round }}
                            `);$("#resources").append(r),zs({el:`#res${e}`,data:t.prestige[e],filters:{round:e=>+e.toFixed(3)}}),"Artifact"!==e&&"Blood_Stone"!==e&&_s(`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($(`${F(`resource_${e}_desc`,[r,+(100*$r("plasmid")).toFixed(2)])}`)),t.genes.store&&("antimatter"!==t.race.universe||t.genes.bleed>=3)){let e=wr(1,"plasmid");e>1&&a.append($(` ${F("resource_Plasmid_desc2",[+(100*(e-1)).toFixed(2)])}`))}break;case"AntiPlasmid":a.append($(`${F(`resource_${e}_desc`,[t.prestige.AntiPlasmid.count,+(100*$r("antiplasmid")).toFixed(2)])}`));let i=wr(1,"anti");t.genes.store&&("antimatter"===t.race.universe||t.genes.bleed>=3)&&i>1&&a.append($(` ${F("resource_Plasmid_desc2",[+(100*(i-1)).toFixed(2)])}`));break;case"Phage":a.append($(`${F(t.prestige.AntiPlasmid.count>0?"resource_Phage_desc2":"resource_Phage_desc",[250+t.prestige.Phage.count])}`));let s=wr(1,"phage");t.genes.store&&t.genes.store>=4&&s>1&&a.append($(` ${F("resource_Plasmid_desc2",[+(100*(s-1)).toFixed(2)])}`));break;case"Dark":switch(t.race.universe){case"standard":a.append($(`${F(`resource_${e}_desc_s`,[+(100*(Ts("standard")-1)).toFixed(2)])}`));break;case"evil":a.append($(`${F(`resource_${e}_desc_e`,[+(100*(Ts("evil")-1)).toFixed(2)])}`));break;case"micro":a.append($(`${F(`resource_${e}_desc_m`,[Ts("micro",!1),Ts("micro",!0)])}`));break;case"heavy":let t=Ts("heavy"),r=.25+.5*t,i=.2+.3*t;a.append($(`${F(`resource_${e}_desc_h`,[+(100*r).toFixed(4),+(100*i).toFixed(4)])}`));break;case"antimatter":a.append($(`${F(`resource_${e}_desc_a`,[+(100*(Ts("antimatter")-1)).toFixed(2)])}`));break;case"magic":a.append($(`${F(`resource_${e}_desc_mg`,[F("resource_Mana_name"),+(100*(Ts("magic")-1)).toFixed(2)])}`))}break;case"Harmony":a.append($(`${F(`resource_${e}_desc`,["standard"===t.race.universe?.1:1,Os()])}`));break;case"AICore":let n=+(100*(1-.99**t.prestige.AICore.count)).toFixed(2);a.append($(`${F(`resource_${e}_desc`,[n])}`))}return a}))}function Ua(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 Va(e){let a=t.tech.currency>=6?1e6:t.tech.currency>=4?100:25;return!(t.resource[e].trade>=a)}function Wa(e,a,r,i,s){if((t.settings.tabLoad||4===t.settings.civTabs&&0===t.settings.marketTabs)&&(!t.race.artifical||"Food"!==r)){if(s&&a.append($(`

                            {{ r.name | namespace }}

                            `)),t.race.no_trade||(a.append($(`${F("resource_market_buy")}`)),a.append($(`\${{ r.value | buy }}`)),a.append($(`${F("resource_market_sell")}`)),a.append($(`\${{ r.value | sell }}`))),s&&(t.race.banana&&"Food"===r||t.tech.trade&&!t.race.terrifying)){let e=$(`${F("resource_market_routes")}`);a.append(e),e.append($(`-`)),e.append($('')),e.append($(`+`)),e.append($(`${F("cancel_routes")}`)),ir(r)}zs({el:e,data:{r:t.resource[r],m:t.city.market},methods:{aSell(e){let a=1===Fa[e]?F("resource_market_unit"):F("resource_market_units"),r=function(e){let a=4;t.race.merchant&&(a*=1-Ki.merchant.vars()[0]/100);let r=as("goblin");r>0&&(a*=1-Ki.merchant.vars(1)[0]/100*r),t.race.asymmetrical&&(a*=1+Ki.asymmetrical.vars()[0]/100),t.race.conniving&&a--;let i=t.resource[e].value*Fa[e]/a;if(t.city.wharf&&(i*=1+.01*t.city.wharf.count),t.space.gps&&t.space.gps.count>3&&(i*=1+.01*t.space.gps.count),t.tech.railway){let e=t.stats.achieve.banana&&t.stats.achieve.banana.l>=1?.03:.02;i*=1+t.tech.railway*e}return t.race.truepath&&!t.race.lone_survivor&&(i*=1-t.civic.foreign.gov3.hstl/101),t.race.inflation&&(i*=1+t.race.inflation/500),t.race.witch_hunter&&t.resource.Sus.amount>50&&(i*=1-(t.resource.Sus.amount-50)/52),i*=xe("psychic_cash"),i=+i.toFixed(1),i}(e),i=Fa[e];if(t.stats.achieve.hasOwnProperty("trade")){let e=t.stats.achieve.trade.l;e>5&&(e=5),i*=1-e/100}return i=+i.toFixed(3),F("resource_market_auto_sell_desc",[i,a,r])},aBuy(e){let a=Fa[e],r=D("dealmaker",0);r&&(a*=1+r/100),t.race.persuasive&&(a*=1+t.race.persuasive/100),t.race.merchant&&(a*=1+Ki.merchant.vars()[1]/100);let i=as("goblin");if(i>0&&(a*=1+Ki.merchant.vars(1)[1]/100*i),t.genes.trader&&(a*=1+Ls()/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 s=F(1===a?"resource_market_unit":"resource_market_units"),n=function(e){let a=t.resource[e].value;t.race.arrogant&&(a*=1+Ki.arrogant.vars()[0]/100),t.race.conniving&&(a*=1-Ki.conniving.vars()[0]/100);let r=as("imp");r>0&&(a*=1-Ki.conniving.vars(1)[0]/100*r);let i=a*Fa[e];return t.city.wharf&&(i*=.99**t.city.wharf.count),t.space.gps&&t.space.gps.count>3&&(i*=.99**t.space.gps.count),t.tech.railway&&(i*=(t.stats.achieve.banana&&t.stats.achieve.banana.l>=1?.97:.98)**t.tech.railway),t.race.truepath&&!t.race.lone_survivor&&(i*=1+t.civic.foreign.gov3.hstl/101),t.race.inflation&&(i*=1+t.race.inflation/300),t.race.quarantine&&(i*=1+Math.round(t.race.quarantine**3.5)),t.race.witch_hunter&&t.resource.Sus.amount>50&&(i*=1+(t.resource.Sus.amount-50)/8),i=+i.toFixed(1),i}(e);return F("resource_market_auto_buy_desc",[a,s,n])},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+Ki.arrogant.vars()[0]/100),t.race.conniving&&(r*=1-Ki.conniving.vars()[0]/100);let i=as("imp");i>0&&(r*=1-Ki.conniving.vars(1)[0]/100*i);let s=Math.floor(Math.min(a,t.resource.Money.amount/r,t.resource[e].max-t.resource[e].amount));s>0&&(t.resource[e].amount+=s,t.resource.Money.amount-=Math.round(r*s),t.resource[e].value+=Number((s/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-Ki.merchant.vars()[0]/100);let i=as("goblin");i>0&&(r*=1-Ki.merchant.vars(1)[0]/100*i),t.race.asymmetrical&&(r*=1+Ki.asymmetrical.vars()[0]/100),t.race.conniving&&(r*=1-Ki.conniving.vars()[1]/100);let s=as("imp");s>0&&(r*=1-Ki.conniving.vars(1)[1]/100*s);let n=t.resource[e].value/r,c=Math.floor(Math.min(a,t.resource[e].amount,(t.resource.Money.max-t.resource.Money.amount)/n));c>0&&(t.resource[e].amount-=c,t.resource.Money.amount+=Math.round(n*c),t.resource[e].value-=Number((c/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(!(Va(e)&&t.city.market.trade(t.race.arrogant&&(e*=1+Ki.arrogant.vars()[0]/100),q(e*t.city.market.qty,0)),sell(e){let a=4;t.race.merchant&&(a*=1-Ki.merchant.vars()[0]/100);let r=as("goblin");return r>0&&(a*=1-Ki.merchant.vars(1)[0]/100*r),t.race.asymmetrical&&(a*=1+Ki.asymmetrical.vars()[0]/100),q(e*t.city.market.qty/a,0)},trade(e){if("Stone"===r&&(31===e||-31===e)){let e=Zs(3,12,!1);if(e.length>0)return e}return e<0?"-"+(e=0-e):e>0?`+${e}`:0},namespace:e=>e.replace("_"," ")}})}}function Qa(){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 Ja(e){let a=e||$("#galaxyTrade");if(e||Cs($("#galaxyTrade")),t.galaxy.trade){a.append($(`
                            ${F("galaxy_trade")}
                            `));let e=Qa();for(let r=0;r');a.append(i),i.append($(`${t.resource[e[r].buy.res].name}`)),i.append($(`+{{ '${r}' | t_vol }}/s`)),i.append($(`${t.resource[e[r].sell.res].name}`)),i.append($(`-{{ '${r}' | s_vol }}/s`));let s=$(`${F("resource_market_routes")}`);i.append(s);let n=F("galaxy_freighter_assign",[t.resource[e[r].buy.res].name,t.resource[e[r].sell.res].name]),c=F("galaxy_freighter_unassign",[t.resource[e[r].buy.res].name,t.resource[e[r].sell.res].name]);s.append($(`-`)),s.append($(`{{ g.f${r} }}`)),s.append($(`+`)),s.append($(`${F("cancel_routes")}`))}let r=$(`
                            ${F("resource_market_galactic_trade_routes")} {{ g.cur }} / {{ g.max }}
                            `);r.append($(`${F("cancel_all_routes")}`)),a.append(r)}zs({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=Qa();for(let a=0;ae},filters:{t_vol(e){let a=Qa()[e].buy.vol;t.race.persuasive&&(a*=1+t.race.persuasive/100),t.race.merchant&&(a*=1+Ki.merchant.vars()[1]/100);let r=as("goblin");if(r>0&&(a*=1+Ki.merchant.vars(1)[1]/100*r),t.genes.trader&&(a*=1+Ls()/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=Qa()[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}}}),_s("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 Za(e){let a=b(),r=_r();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 Xa(e){let a=b(),r=_r();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 Ya(e){let a=b(),r=dr();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 er(e){let a=b(),r=dr();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 tr(e,a,r,i){if(t.settings.tabLoad||4===t.settings.civTabs&&1===t.settings.marketTabs){if(a.append($(`

                            {{ name }}

                            `)),t.resource.Crates.display){let e=$(`${F("resource_Crates_name")}`);a.append(e),e.append($(`«`)),e.append($(``)),e.append($(`»`))}if(t.resource.Containers.display){let e=$(`${F("resource_Containers_name")}`);a.append(e),e.append($(`«`)),e.append($('')),e.append($(`»`))}zs({el:e,data:t.resource[r],methods:{addCrate(e){Xa(e)},subCrate(e){Za(e)},addCon(e){er(e)},subCon(e){Ya(e)}},filters:{trick(e){if("Stone"===r&&10===t.resource[r].crates&&31===t.resource[r].containers){let e=Zs(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=Js(13,10);if(10===e&&t.length>0)return"1"+t}return e}}})}}function ar(e,a,i,s){_s(`${e}`,(function(){let e=$('
                            {{ res.name | namespace }}
                            '),n=$('
                            ');e.append(n);let c=La(a,i),o=$("
                            ");n.append(o),"auto"===i&&r.p[a]&&Object.keys(r.p[a]).forEach((function(e){let t=r.p[a][e],i=parseFloat(t.slice(0,-1));if(0!=i&&!isNaN(i)){let t=i>0?"success":"danger",r=e.replace(/\+.+$/,"");e=e.replace(/'/g,"\\'"),o.append(``)}})),Object.keys(c.multi_bd).forEach((function(e){let t=c.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,"\\'"),o.append(``)}}));let l=$('
                            '),_=$(`
                            ${F("craft_tools_multi")}
                            `);l.append(_);let d=0;if(Object.keys(c.add_bd).forEach((function(e){let t=c.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&&n.append(l),r.p.consume&&r.p.consume[a]){let e=$('
                            '),t=0;Object.keys(r.p.consume[a]).forEach((function(i){let s=r.p.consume[a][i];if(0!=s&&!isNaN(s)){t++;let r=s>0?"success":"danger",n=i.replace(/\+.+$/,"");i=i.replace(/'/g,"\\'"),e.append(``)}})),t>0&&n.append(e)}return t.resource[a].diff<0&&t.resource[a].amount>0&&e.append(``),s&&(e.append(''),e.append(s)),e}),{in:function(){zs({el:"#popper > div",data:{[a]:r.p[a],res:t.resource[a],consume:r.p.consume,craft:La(a,i)},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 i="%"===t?"%":"";return a>0?"+"+q(a,r)+i:a<0?q(a,r)+i: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(){zs({el:"#popper > div"},"destroy")},classes:"breakdown has-background-light has-text-dark",prop:{modifiers:{preventOverflow:{enabled:!1},hide:{enabled:!1}}}})}function rr(e,a,i){_s(`${e}`,(function(){let e=$('
                            {{ res.name | namespace }}
                            '),s=$('
                            ');e.append(s);let n=!1;if(r[i][a]){let e=$("
                            ");s.append(e);let t=[a];t.push("Global");for(var c=0;c0?"success":"danger",i=t.replace(/\+.+$/,"");t=t.replace(/'/g,"\\'"),e.append(``)}}))}}if(r[i].consume&&r[i].consume[a]){let e=$(`
                            `),t=0;Object.keys(r[i].consume[a]).forEach((function(s){let n=r[i].consume[a][s];if(0!=n&&!isNaN(n)){t++;let r=n>0?"success":"danger",i=s.replace(/\+.+$/,"");s=s.replace(/'/g,"\\'"),e.append(``)}})),t>0&&s.append(e)}if("p"===i){let r=t.resource[a].diff>0?"success":"danger";e.append(``)}return e}),{in:function(){zs({el:"#popper > div",data:{Global:r[i].Global,[a]:r[i][a],consume:r[i].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,i="%"===t?"%":"";return a>0?"+"+q(a,r)+i:a<0?q(a,r)+i:void 0},fix:e=>e+"v",counter(e){let r=t.resource[a].diff,i=0;if(r<0?(r*=-1,i=+(e/r).toFixed(0)):i=+((t.resource[a].max-e)/r).toFixed(0),i===1/0||Number.isNaN(i))return"Never";if(i>60){let e=i%60,t=(i-e)/60;if(t>=60){let e=t%60;return`${(t-e)/60}h ${e}m`}return`${t}m ${e}s`}return`${i}s`},direction:e=>F(e>=0?"to_full":"to_empty"),namespace:e=>e.replace("_"," ")}})},out:function(){zs({el:"#popper > div"},"destroy")},classes:"breakdown has-background-light has-text-dark",prop:{modifiers:{preventOverflow:{enabled:!1},hide:{enabled:!1}}}})}function ir(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 sr(){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:F("resource_Plywood_name");return F("resource_modal_crate_construct_desc",[t.race.kindling_kindred||t.race.smoldering?200:10,e,_r()])}function nr(){return F("resource_modal_container_construct_desc",[125,dr()])}function cr(e,t){switch(e){case"crate":or(t);break;case"container":lr(t)}}function or(e){let a=e||b(),r=t.race.kindling_kindred||t.race.smoldering?t.race.smoldering?"Chrysotile":"Stone":"Plywood",i=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=i*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+Ki.pack_rat.vars()[0]/100);let a=as("kobold");return a>0&&(e*=1+Ki.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(wr(e))}function dr(){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+Ki.pack_rat.vars()[0]/100);let a=as("kobold");return a>0&&(e*=1+Ki.pack_rat.vars(1)[0]/100*a),e*=t.stats.achieve.blackhole?1+.05*t.stats.achieve.blackhole.l:1,Math.round(wr(e))}function pr(){if(!t.settings.tabLoad&&(4!==t.settings.civTabs||0!==t.settings.marketTabs))return;let e=$(`

                            ${F("resource_market")}

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

                            ${F("resource_trade_qty")}

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

                            ${F("tab_storage")}

                            `);Cs($("#resStorage")),$("#resStorage").append(e),t.resource.Crates&&t.resource.Containers&&(e.append($(``)),e.append($(``)),zs({el:"#createHead",data:{cr:t.resource.Crates,cn:t.resource.Containers},methods:{crate(){or()},container(){lr()},buildCrateDesc:()=>sr(),buildContainerDesc:()=>nr()}}))}function hr(){return t.tech.currency>=6?1e6:t.tech.currency>=4?5e3:100}function mr(){if((t.settings.tabLoad||4===t.settings.civTabs&&2===t.settings.marketTabs)&&(Cs($("#resEjector")),t.interstellar.mass_ejector)){let e=$(`

                            ${F("interstellar_mass_ejector_vol")}

                            `);$("#resEjector").append(e);let a=$('');e.append(a),a.append($(`{{ total }} / {{ on | max }}{{ on | real }}${F("interstellar_mass_ejector_mass")}: {{ mass | approx }} kt/s`)),zs({el:"#eject",data:t.interstellar.mass_ejector,filters:{max:e=>1e3*e,real:e=>s.mass_ejectorq(e,2)}})}}function gr(e,a){if((t.settings.tabLoad||4===t.settings.civTabs&&2===t.settings.marketTabs)&&(!t.race.artifical||"Food"!==e)&&Aa[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 i=$('');r.append(i),i.append($(`«`)),i.append($(`{{ e.${e} }}`)),i.append($(`»`)),i.append($(`${F("interstellar_mass_ejector_per")}: ${Aa[e]} kt`)),t.interstellar.mass_ejector.hasOwnProperty(e)||(t.interstellar.mass_ejector[e]=0),zs({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*s.mass_ejector&&(a=1e3*s.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 vr(){if((t.settings.tabLoad||4===t.settings.civTabs&&3===t.settings.marketTabs)&&(Cs($("#resCargo")),t.portal.transport)){let e=$(`

                            ${F("portal_transport_supply")}

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

                            ${t.resource[e].name}

                            `);$("#resCargo").append(r);let i=$('');r.append(i),i.append($(`«`)),i.append($(`{{ e.${e} }}`)),i.append($(`»`));let s=q(Ia[e].out);i.append($(`${F("portal_transport_item",[`${s}`,`${Ia[e].in}`])}`)),t.portal.transport.cargo.hasOwnProperty(e)||(t.portal.transport.cargo[e]=0),zs({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 yr(){(t.settings.tabLoad||4===t.settings.civTabs&&4===t.settings.marketTabs)&&Cs($("#resAlchemy"))}function br(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 i=$(`

                            ${t.resource[e].name}

                            `);$("#resAlchemy").append(i);let s=$('');i.append(s),s.append($(`«`)),s.append($(`{{ a.${e} }}`)),s.append($(`»`)),t.race.alchemy.hasOwnProperty(e)||(t.race.alchemy[e]=0),zs({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++}}}),_s(`alchemy${e}`,(function(){let a=r&&t.tech.alchemy>=2?8*Fa[e]:2*Fa[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),$(`
                            ${F("resource_alchemy",[1,F("resource_Mana_name"),.15,F("resource_Crystal_name"),+a.toFixed(2),t.resource[e].name])}
                            `)}),{elm:`#alchemy${e} h3`})}}const wr=(kr={},function(e,a,r){let i=a||"a",s=[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(kr[i]||(kr[i]={}),!kr[i][s]||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 i=t.genes.store>=2?t.genes.store>=3?1250:1666:2500;if("antimatter"===t.race.universe&&(i*=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/i}if("standard"===t.race.universe&&(e*=Ts("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=$e(e)),a+=e*t.civic.priest.workers}e*=1+(r?t.space.ziggurat.count:t.city.temple.count)*a}!a&&t.pillars&&(e*=Ds()[1]),kr[i]={},kr[i][s]=e}return a?kr[i][s]*e:Math.round(kr[i][s]*e)});var kr;const $r=(xr={},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",s.alien_outpost||"0"].join("-");if(!xr[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&&s.alien_outpost&&(e*=2);let i=0;if(t.race.orbit_decayed&&t.space.ziggurat?i=t.space.ziggurat.count:t.city.temple&&(i=t.city.temple.count),i>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=$e(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=$e(e)),a+=e*t.civic.priest.workers}t.race.spiritual&&(a*=1+Ki.spiritual.vars()[0]/100);let r=as("seraph");r>0&&(a*=1+Ki.spiritual.vars(1)[0]/100*r),"theocracy"===t.civic.govern.type&&(a*=1.12),t.race.ooze&&(a*=1-Ki.ooze.vars()[1]/100),t.race.orbit_decayed&&t.race.truepath&&(a*=.1),e*=1+i*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&&s.alien_outpost&&(r*=2),r/=3}t.race.nerfed&&("antimatter"===t.race.universe?(e/=2,r/=2):(e/=5,r/=5)),(xr={})[a]=[(1+e)*(1+r)-1,e,r]}return e&&"raw"===e?xr[a]:e&&"plasmid"===e?xr[a][1]:e&&"antiplasmid"===e?xr[a][2]:xr[a][0]});var xr;const qr={club:{id:"tech-club",title:F("tech_club"),desc:F("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!!ii($(this)[0])&&(t.resource.Food.display=!0,!0)}},bone_tools:{id:"tech-bone_tools",title:F("tech_bone_tools"),desc:F("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!!ii($(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?F("tech_bone_tools"):F("tech_wooden_tools"),desc:()=>t.race.kindling_kindred?F("tech_bone_tools_desc"):F("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!!ii($(this)[0])&&(t.resource.Stone.display=!0,t.race.smoldering&&(t.resource.Chrysotile.display=!0),!0)}},sundial:{id:"tech-sundial",title:()=>t.race.unfathomable?F("tech_moondial"):F("tech_sundial"),desc:()=>t.race.unfathomable?F("tech_moondial_desc"):F("tech_sundial_desc"),category:"science",era:"primitive",reqs:{primitive:2},grant:["primitive",3],cost:{Lumber:()=>8,Stone:()=>10},effect:()=>t.race.unfathomable?F("tech_moondial_effect"):F("tech_sundial_effect"),action(){return!!ii($(this)[0])&&(ms(F("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:F("tech_housing"),desc:F("tech_housing_desc"),category:"housing",era:"civilized",reqs:{primitive:3},grant:["housing",1],cost:{Knowledge:()=>10},effect:F("tech_housing_effect"),action(){return!!ii($(this)[0])&&(t.city.basic_housing={count:0},!0)}},cottage:{id:"tech-cottage",title:()=>ui("medium"),desc:F("tech_cottage_desc"),category:"housing",era:"civilized",reqs:{housing:1,cement:1,mining:3},grant:["housing",2],cost:{Knowledge:()=>3600},effect:F("tech_cottage_effect"),action(){return!!ii($(this)[0])&&(t.city.cottage={count:0},!0)}},apartment:{id:"tech-apartment",title:()=>ui("large"),desc:()=>ui("large"),category:"housing",era:"discovery",reqs:{housing:2,high_tech:2},grant:["housing",3],cost:{Knowledge:()=>15750},effect:F("tech_apartment_effect"),action(){return!!ii($(this)[0])&&(t.city.apartment={count:0,on:0},!0)}},arcology:{id:"tech-arcology",title:F("tech_arcology"),desc:F("tech_arcology"),category:"housing",era:"dimensional",reqs:{hell_ruins:4,housing:3,high_tech:17},grant:["housing",4],cost:{Knowledge:()=>25e6},effect:()=>F("tech_arcology_effect"),action(){return!!ii($(this)[0])&&(t.portal.arcology={count:0,on:0},!0)}},steel_beams:{id:"tech-steel_beams",title:F("tech_steel_beams"),desc:F("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:()=>F("tech_steel_beams_effect",[ui("small"),ui("medium")]),action(){return!!ii($(this)[0])}},mythril_beams:{id:"tech-mythril_beams",title:F("tech_mythril_beams"),desc:F("tech_housing_cost"),category:"housing",era:"early_space",reqs:{housing_reduction:1,space:3},grant:["housing_reduction",2],cost:{Knowledge:()=>175e3,Mythril:()=>1e3},effect:()=>F("tech_mythril_beams_effect",[ui("small"),ui("medium")]),action(){return!!ii($(this)[0])}},neutronium_walls:{id:"tech-neutronium_walls",title:F("tech_neutronium_walls"),desc:F("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:()=>F("tech_neutronium_walls_effect",[ui("small"),ui("medium")]),action(){return!!ii($(this)[0])}},bolognium_alloy_beams:{id:"tech-bolognium_alloy_beams",title:F("tech_bolognium_alloy_beams"),desc:F("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:()=>F("tech_bolognium_alloy_beams_effect",[ui("small"),ui("medium")]),action(){return!!ii($(this)[0])}},aphrodisiac:{id:"tech-aphrodisiac",title:F("tech_aphrodisiac"),desc:F("tech_aphrodisiac_desc"),category:"housing",era:"civilized",reqs:{housing:2},grant:["reproduction",1],not_trait:["artifical"],cost:{Knowledge:()=>4500},effect:F("tech_aphrodisiac_effect"),action(){return!!ii($(this)[0])}},fertility_clinic:{id:"tech-fertility_clinic",title:F("tech_fertility_clinic"),desc:F("tech_fertility_clinic"),category:"housing",era:"intergalactic",reqs:{reproduction:1,xeno:6},not_trait:["cataclysm"],grant:["reproduction",2],cost:{Knowledge:()=>45e5},effect:F("tech_fertility_clinic_effect"),action(){return!!ii($(this)[0])}},captive_housing:{id:"tech-captive_housing",title:F("tech_captive_housing"),desc:F("tech_captive_housing"),category:"eldritch",era:"civilized",reqs:{housing:1},trait:["unfathomable"],grant:["unfathomable",1],cost:{Knowledge:()=>12},effect:F("tech_captive_housing_effect"),action(){return!!ii($(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:F("tech_torture"),desc:F("tech_torture"),category:"eldritch",era:"civilized",reqs:{unfathomable:1},trait:["unfathomable"],grant:["unfathomable",2],cost:{Knowledge:()=>25},effect:F("tech_torture_effect"),action(){return!!ii($(this)[0])&&(t.civic.torturer.display=!0,!0)}},thrall_quarters:{id:"tech-thrall_quarters",title:F("tech_thrall_quarters"),desc:F("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:F("tech_thrall_quarters_effect"),action(){return!!ii($(this)[0])&&(t.civic.torturer.display=!0,!0)}},psychic_energy:{id:"tech-psychic_energy",title:F("tech_psychic_energy"),desc:F("tech_psychic_energy"),category:"eldritch",era:"civilized",reqs:{housing:1},condition:()=>t.settings.showCivic,trait:["psychic"],grant:["psychic",1],cost:{Knowledge:()=>15},effect:F("tech_psychic_energy_effect"),action(){return!!ii($(this)[0])&&(t.resource.Energy.display=!0,t.settings.showPsychic=!0,t.race.psychicPowers={boost:{r:"Food"},boostTime:0},!0)},post(){os()}},psychic_attack:{id:"tech-psychic_attack",title:F("tech_psychic_attack"),desc:F("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:F("tech_psychic_attack_effect"),action(){return!!ii($(this)[0])&&(t.race.psychicPowers.assaultTime=0,!0)},post(){os()}},psychic_finance:{id:"tech-psychic_finance",title:F("tech_psychic_finance"),desc:F("tech_psychic_finance"),category:"eldritch",era:"civilized",reqs:{psychic:2,high_tech:4},trait:["psychic"],grant:["psychic",3],cost:{Knowledge:()=>65e3},effect:F("tech_psychic_finance_effect"),action(){return!!ii($(this)[0])&&(t.race.psychicPowers.cash=0,!0)},post(){os()}},psychic_channeling:{id:"tech-psychic_channeling",title:F("tech_psychic_channeling"),desc:F("tech_psychic_channeling"),category:"eldritch",era:"deep_space",reqs:{psychic:3,high_tech:10},trait:["psychic"],grant:["psychic",4],cost:{Knowledge:()=>36e4},effect:F("tech_psychic_channeling_effect"),action(){return!!ii($(this)[0])&&(t.race.psychicPowers.channel={cash:0,assault:0,boost:0},!0)},post(){os()}},psychic_efficiency:{id:"tech-psychic_efficiency",title:F("tech_psychic_efficiency"),desc:F("tech_psychic_efficiency"),category:"eldritch",era:"intergalactic",reqs:{psychic:4,high_tech:16},trait:["psychic"],grant:["psychic",5],cost:{Knowledge:()=>525e4},effect:F("tech_psychic_efficiency_effect"),action(){return!!ii($(this)[0])},post(){os()}},mind_break:{id:"tech-mind_break",title:F("tech_mind_break"),desc:F("tech_mind_break"),category:"eldritch",era:"civilized",reqs:{psychic:2,high_tech:1,unfathomable:2},trait:["psychic"],grant:["psychicthrall",1],cost:{Knowledge:()=>7e3},effect:F("tech_mind_break_effect"),action(){return!!ii($(this)[0])},post(){os()}},psychic_stun:{id:"tech-psychic_stun",title:F("tech_psychic_stun"),desc:F("tech_psychic_stun"),category:"eldritch",era:"civilized",reqs:{psychicthrall:1,high_tech:3,unfathomable:2},trait:["psychic"],grant:["psychicthrall",2],cost:{Knowledge:()=>32e3},effect:F("tech_psychic_stun_effect"),action(){return!!ii($(this)[0])},post(){os()}},spear:{id:"tech-spear",title:F("tech_spear"),desc:F("tech_spear_desc"),category:"foraging",era:"civilized",reqs:{primitive:3,storage:1},trait:["forager"],grant:["foraging",1],cost:{Knowledge:()=>110,Stone:()=>75},effect:F("tech_spear_effect"),action(){return!!ii($(this)[0])}},bronze_spear:{id:"tech-bronze_spear",title:F("tech_bronze_spear"),desc:F("tech_bronze_spear_desc"),category:"foraging",era:"civilized",reqs:{foraging:1,mining:2},trait:["forager"],grant:["foraging",2],cost:{Knowledge:()=>525,Copper:()=>50},effect:F("tech_bronze_spear_effect"),action(){return!!ii($(this)[0])}},iron_spear:{id:"tech-iron_spear",title:F("tech_iron_spear"),desc:F("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:F("tech_bronze_spear_effect"),action(){return!!ii($(this)[0])}},dowsing_rod:{id:"tech-dowsing_rod",title:F("tech_dowsing_rod"),desc:F("tech_dowsing_rod_desc"),category:"foraging",era:"civilized",reqs:{foraging:1,mining:2},trait:["forager"],grant:["dowsing",1],cost:{Knowledge:()=>450,Lumber:()=>750},effect:F("tech_dowsing_rod_effect"),action(){return!!ii($(this)[0])}},metal_detector:{id:"tech-metal_detector",title:F("tech_metal_detector"),desc:F("tech_metal_detector_desc"),category:"foraging",era:"civilized",reqs:{dowsing:1,high_tech:4},trait:["forager"],grant:["dowsing",2],cost:{Knowledge:()=>65e3},effect:F("tech_metal_detector_effect"),action(){return!!ii($(this)[0])}},smokehouse:{id:"tech-smokehouse",title:()=>t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?F("city_smokehouse_easter"):F("tech_smokehouse"),desc:()=>t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?F("tech_smokehouse_easter_desc"):F("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)?F("tech_smokehouse_easter_effect"):F("tech_smokehouse_effect"),action(){return!!ii($(this)[0])&&(Hi("city","smokehouse","silo",{count:0}),!0)},post(){t.tech.s_lodge&&(t.tech.hunting=2)}},lodge:{id:"tech-lodge",title:F("tech_lodge"),desc:F("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:F("tech_lodge_effect"),action(){return!!ii($(this)[0])&&(Hi("city","lodge","farm",{count:0}),!0)}},alt_lodge:{id:"tech-alt_lodge",title(){return this.condition()?F("tech_lodge_alt"):F("tech_lodge")},desc(){return this.condition()?F("tech_lodge_alt"):F("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()?F("tech_lodge_effect_alt"):F("tech_lodge_effect")},action(){return!!ii($(this)[0])&&(Hi("city","lodge","farm",{count:0}),!0)}},soul_well:{id:"tech-soul_well",title:F("tech_soul_well"),desc:F("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:F("tech_soul_well_effect"),action(){return!!ii($(this)[0])&&(t.city.soul_well={count:0},!0)}},compost:{id:"tech-compost",title:F("tech_compost"),desc:F("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:F("tech_compost_effect"),action(){return!!ii($(this)[0])&&(t.city.compost={count:0,on:0},!0)}},hot_compost:{id:"tech-hot_compost",title:F("tech_hot_compost"),desc:F("tech_hot_compost"),category:"compost",era:"civilized",reqs:{compost:1},trait:["detritivore"],grant:["compost",2],cost:{Knowledge:()=>100},effect:F("tech_hot_compost_effect"),action(){return!!ii($(this)[0])}},mulching:{id:"tech-mulching",title:F("tech_mulching"),desc:F("tech_mulching"),category:"compost",era:"civilized",reqs:{compost:2,mining:3},trait:["detritivore"],grant:["compost",3],cost:{Knowledge:()=>3200},effect:F("tech_mulching_effect"),action(){return!!ii($(this)[0])}},adv_mulching:{id:"tech-adv_mulching",title:F("tech_adv_mulching"),desc:F("tech_adv_mulching"),category:"compost",era:"discovery",reqs:{compost:3,high_tech:2},trait:["detritivore"],grant:["compost",4],cost:{Knowledge:()=>16e3},effect:F("tech_adv_mulching_effect"),action(){return!!ii($(this)[0])}},agriculture:{id:"tech-agriculture",title:F("tech_agriculture"),desc:F("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:F("tech_agriculture_effect"),action(){return!!ii($(this)[0])&&(Hi("city","farm","lodge",{count:0}),!0)}},farm_house:{id:"tech-farm_house",title:F("tech_farm_house"),desc:F("tech_farm_house_desc"),category:"housing",era:"civilized",reqs:{agriculture:1,housing:1,currency:1},grant:["farm",1],cost:{Money:()=>50,Knowledge:()=>180},effect:F("tech_farm_house_effect"),action(){return!!ii($(this)[0])}},irrigation:{id:"tech-irrigation",title:F("tech_irrigation"),desc:F("tech_irrigation_desc"),category:"agriculture",era:"civilized",reqs:{agriculture:1},grant:["agriculture",2],cost:{Knowledge:()=>55},effect:F("tech_irrigation_effect"),action(){return!!ii($(this)[0])}},silo:{id:"tech-silo",title:F("tech_silo"),desc:F("tech_silo_desc"),category:"storage",era:"civilized",reqs:{agriculture:2,storage:1},grant:["agriculture",3],cost:{Knowledge:()=>80},effect:F("tech_silo_effect"),action(){return!!ii($(this)[0])&&(Hi("city","silo","smokehouse",{count:0}),!0)}},mill:{id:"tech-mill",title:F("tech_mill"),desc:F("tech_mill_desc"),category:"agriculture",era:"civilized",reqs:{agriculture:3,mining:3},grant:["agriculture",4],cost:{Knowledge:()=>5400},effect:F("tech_mill_effect"),action(){return!!ii($(this)[0])&&(Hi("city","mill","windmill",{count:0,on:0}),!0)}},windmill:{id:"tech-windmill",title:F("tech_windmill"),desc:F("tech_windmill_desc"),category:"agriculture",era:"discovery",reqs:{agriculture:4,high_tech:1},grant:["agriculture",5],cost:{Knowledge:()=>16200},effect:F("tech_windmill_effect"),action(){return!!ii($(this)[0])}},windturbine:{id:"tech-windturbine",title:F("tech_windturbine"),desc:F("tech_windturbine"),category:"power_generation",era:"globalized",reqs:{agriculture:5,high_tech:4},grant:["agriculture",6],cost:{Knowledge:()=>66e3},effect:F("tech_windturbine_effect"),action(){return!!ii($(this)[0])}},wind_plant:{id:"tech-wind_plant",title:()=>t.race.unfathomable?F("tech_watermill"):F("tech_windmill"),desc:()=>t.race.unfathomable?F("tech_watermill"):F("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?F("tech_watermill_effect"):F("tech_wind_plant_effect"),action(){return!!ii($(this)[0])&&(Hi("city","windmill","mill",{count:0,on:0}),!0)}},gmfood:{id:"tech-gmfood",title:F("tech_gmfood"),desc:F("tech_gmfood_desc"),category:"agriculture",era:"globalized",reqs:{agriculture:6,genetics:1},grant:["agriculture",7],cost:{Knowledge:()=>95e3},effect:F("tech_gmfood_effect"),action(){return!!ii($(this)[0])}},foundry:{id:"tech-foundry",title:F("tech_foundry"),desc:F("tech_foundry"),category:"crafting",era:"civilized",reqs:{mining:2},grant:["foundry",1],cost:{Knowledge:()=>650},effect:F("tech_foundry_effect"),action(){return!!ii($(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:F("tech_artisans"),desc:F("tech_artisans"),category:"crafting",era:"civilized",reqs:{foundry:1},grant:["foundry",2],cost:{Knowledge:()=>1500},effect:F("tech_artisans_effect"),action(){return!!ii($(this)[0])}},apprentices:{id:"tech-apprentices",title:F("tech_apprentices"),desc:F("tech_apprentices"),category:"crafting",era:"civilized",reqs:{foundry:2},grant:["foundry",3],cost:{Knowledge:()=>3200},effect:F("tech_apprentices_effect"),action(){return!!ii($(this)[0])}},carpentry:{id:"tech-carpentry",title:F("tech_carpentry"),desc:F("tech_carpentry"),category:"crafting",era:"civilized",reqs:{foundry:3,saw:1},grant:["foundry",4],not_trait:["evil"],cost:{Knowledge:()=>5200},effect:F("tech_carpentry_effect"),action(){return!!ii($(this)[0])}},demonic_craftsman:{id:"tech-demonic_craftsman",title:F("tech_master_craftsman"),desc:F("tech_master_craftsman"),category:"crafting",era:"discovery",wiki:!!t.race.evil,reqs:{foundry:3},grant:["foundry",5],trait:["evil"],cost:{Knowledge:()=>12e3},effect:F("tech_master_craftsman_effect"),action(){return!!ii($(this)[0])}},master_craftsman:{id:"tech-master_craftsman",title:F("tech_master_craftsman"),desc:F("tech_master_craftsman"),category:"crafting",era:"discovery",wiki:!t.race.evil,reqs:{foundry:4},grant:["foundry",5],not_trait:["evil"],cost:{Knowledge:()=>12e3},effect:F("tech_master_craftsman_effect"),action(){return!!ii($(this)[0])}},brickworks:{id:"tech-brickworks",title:F("tech_brickworks"),desc:F("tech_brickworks"),category:"crafting",era:"discovery",reqs:{foundry:5},grant:["foundry",6],cost:{Knowledge:()=>18500},effect:F("tech_brickworks_effect"),action(){return!!ii($(this)[0])}},machinery:{id:"tech-machinery",title:F("tech_machinery"),desc:F("tech_machinery"),category:"crafting",era:"globalized",reqs:{foundry:6,high_tech:4},grant:["foundry",7],cost:{Knowledge:()=>66e3},effect:F("tech_machinery_effect"),action(){return!!ii($(this)[0])}},cnc_machine:{id:"tech-cnc_machine",title:F("tech_cnc_machine"),desc:F("tech_cnc_machine"),category:"crafting",era:"globalized",reqs:{foundry:7,high_tech:8},grant:["foundry",8],cost:{Knowledge:()=>132e3},effect:F("tech_cnc_machine_effect"),action(){return!!ii($(this)[0])}},vocational_training:{id:"tech-vocational_training",title:F("tech_vocational_training"),desc:F("tech_vocational_training"),category:"crafting",era:"industrialized",reqs:{foundry:1,high_tech:3},grant:["v_train",1],cost:{Knowledge:()=>3e4},effect:F("tech_vocational_training_effect"),action(){return!!ii($(this)[0])}},stellar_forge:{id:"tech-stellar_forge",title:F("tech_stellar_forge"),desc:F("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:F("tech_stellar_forge_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.stellar_forge={count:0,on:0},!0)}},stellar_smelting:{id:"tech-stellar_smelting",title:F("tech_stellar_smelting"),desc:F("tech_stellar_smelting"),category:"crafting",era:"intergalactic",reqs:{star_forge:1,xeno:4},grant:["star_forge",2],cost:{Knowledge:()=>5e6,Vitreloy:()=>1e4},effect:F("tech_stellar_smelting_effect"),action(){return!!ii($(this)[0])},post(){$i()}},assembly_line:{id:"tech-assembly_line",title:F("tech_assembly_line"),desc:F("tech_assembly_line"),category:"crafting",era:"globalized",reqs:{high_tech:4},grant:["factory",1],cost:{Knowledge:()=>72e3,Copper:()=>125e3},effect:`${F("tech_assembly_line_effect")} ${F("tech_factory_warning")}`,action(){return!!ii($(this)[0])}},automation:{id:"tech-automation",title:F("tech_automation"),desc:F("tech_automation"),category:"crafting",era:"early_space",reqs:{high_tech:8,factory:1},grant:["factory",2],cost:{Knowledge:()=>165e3},effect:`${F("tech_automation_effect")} ${F("tech_factory_warning")}`,action(){return!!ii($(this)[0])}},laser_cutters:{id:"tech-laser_cutters",title:F("tech_laser_cutters"),desc:F("tech_laser_cutters"),category:"crafting",era:"deep_space",reqs:{high_tech:9,factory:2},grant:["factory",3],cost:{Knowledge:()=>3e5,Elerium:()=>200},effect:`${F("tech_laser_cutters_effect")} ${F("tech_factory_warning")}`,action(){return!!ii($(this)[0])}},high_tech_factories:{id:"tech-high_tech_factories",title:F("tech_high_tech_factories"),desc:F("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:`${F("tech_high_tech_factories_effect")} ${F("tech_factory_warning")}`,action(){return!!ii($(this)[0])}},theatre:{id:"tech-theatre",title:F("tech_theatre"),desc:F("tech_theatre"),category:"entertainment",era:"civilized",reqs:{housing:1,currency:1,cement:1},grant:["theatre",1],not_trait:["joyless"],cost:{Knowledge:()=>750},effect:F("tech_theatre_effect"),action(){return!!ii($(this)[0])&&(t.city.amphitheatre={count:0},!0)}},playwright:{id:"tech-playwright",title:F("tech_playwright"),desc:F("tech_playwright"),category:"entertainment",era:"civilized",reqs:{theatre:1,science:2},grant:["theatre",2],cost:{Knowledge:()=>1080},effect:F("tech_playwright_effect"),action(){return!!ii($(this)[0])}},magic:{id:"tech-magic",title:()=>"magic"===t.race.universe?F("tech_illusionist"):F("tech_magic"),desc:()=>"magic"===t.race.universe?F("tech_illusionist"):F("tech_magic"),category:"entertainment",era:"discovery",reqs:{theatre:2,high_tech:1},grant:["theatre",3],cost:{Knowledge:()=>7920},effect:F("tech_magic_effect"),effect:()=>"magic"===t.race.universe?F("tech_illusionist_effect"):F("tech_magic_effect"),action(){return!!ii($(this)[0])}},superstars:{id:"tech-superstars",title:F("tech_superstars"),desc:F("tech_superstars"),category:"entertainment",era:"interstellar",reqs:{theatre:3,high_tech:12},grant:["superstar",1],cost:{Knowledge:()=>66e4},effect:F("tech_superstars_effect"),action(){return!!ii($(this)[0])}},radio:{id:"tech-radio",title:F("tech_radio"),desc:F("tech_radio"),category:"entertainment",era:"discovery",reqs:{theatre:3,high_tech:2},grant:["broadcast",1],cost:{Knowledge:()=>16200},effect:()=>F("tech_radio_effect",[di()]),action(){return!!ii($(this)[0])}},tv:{id:"tech-tv",title:F("tech_tv"),desc:F("tech_tv"),category:"entertainment",era:"globalized",reqs:{broadcast:1,high_tech:4},grant:["broadcast",2],cost:{Knowledge:()=>67500},effect:()=>F("tech_tv_effect",[di()]),action(){return!!ii($(this)[0])}},vr_center:{id:"tech-vr_center",title:F("tech_vr_center"),desc:F("tech_vr_center"),category:"entertainment",era:"interstellar",reqs:{broadcast:2,high_tech:12,stanene:1},grant:["broadcast",3],cost:{Knowledge:()=>62e4},effect:()=>F("tech_vr_center_effect"),action(){return!!ii($(this)[0])&&(t.space.vr_center={count:0,on:0},!0)}},zoo:{id:"tech-zoo",title:F("tech_zoo"),desc:F("tech_zoo"),category:"entertainment",era:"dimensional",reqs:{hell_ruins:2},grant:["zoo",1],cost:{Knowledge:()=>225e5},effect:()=>F("tech_zoo_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.zoo={count:0,on:0},!0)}},casino:{id:"tech-casino",title:F("tech_casino"),desc:F("tech_casino"),category:"entertainment",era:"globalized",reqs:{high_tech:4,currency:5},grant:["gambling",1],cost:{Knowledge:()=>95e3},effect:F("tech_casino_effect"),action(){return!!ii($(this)[0])&&(t.city.casino={count:0,on:0},t.space.spc_casino={count:0,on:0},!0)}},dazzle:{id:"tech-dazzle",title:F("tech_dazzle"),desc:F("tech_dazzle"),category:"banking",era:"globalized",reqs:{gambling:1},grant:["gambling",2],cost:{Knowledge:()=>125e3},effect:F("tech_dazzle_effect"),action(){return!!ii($(this)[0])}},casino_vault:{id:"tech-casino_vault",title:F("tech_casino_vault"),desc:F("tech_casino_vault"),category:"banking",era:"early_space",reqs:{gambling:2,space:3},grant:["gambling",3],cost:{Knowledge:()=>145e3,Iridium:()=>2500},effect:F("tech_casino_vault_effect"),action(){return!!ii($(this)[0])}},otb:{id:"tech-otb",title:F("tech_otb"),desc:F("tech_otb"),category:"banking",era:"deep_space",reqs:{gambling:3,banking:10,high_tech:10},grant:["gambling",4],cost:{Knowledge:()=>39e4},effect:F("tech_otb_effect"),action(){return!!ii($(this)[0])}},online_gambling:{id:"tech-online_gambling",title:F("tech_online_gambling"),desc:F("tech_online_gambling"),category:"banking",era:"interstellar",reqs:{gambling:4,banking:12},grant:["gambling",5],cost:{Knowledge:()=>8e5},effect:F("tech_online_gambling_effect"),action(){return!!ii($(this)[0])}},bolognium_vaults:{id:"tech-bolognium_vaults",title:F("tech_bolognium_vaults"),desc:F("tech_bolognium_vaults"),category:"banking",era:"intergalactic",reqs:{gambling:5,gateway:3},grant:["gambling",6],cost:{Knowledge:()=>39e5,Bolognium:()=>18e4},effect:F("tech_bolognium_vaults_effect"),action(){return!!ii($(this)[0])}},mining:{id:"tech-mining",title:()=>t.race.sappy?F("tech_amber"):F("tech_mining"),desc:()=>t.race.sappy?F("tech_amber"):F("tech_mining_desc"),category:"mining",era:"civilized",reqs:{primitive:3},grant:["mining",1],cost:{Knowledge:()=>45},effect:()=>t.race.sappy?F("tech_amber_effect"):F(t.race.flier?"tech_mining_effect_alt":"tech_mining_effect"),action(){return!!ii($(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:F("tech_bayer_process"),desc:F("tech_bayer_process_desc"),category:"mining",era:"civilized",reqs:{smelting:2},grant:["alumina",1],cost:{Knowledge:()=>4500},effect:()=>t.race.sappy?F("tech_bayer_process_effect_alt"):F("tech_bayer_process_effect"),action(){return!!ii($(this)[0])&&(t.city.metal_refinery={count:0,on:0},na(),!0)}},elysis_process:{id:"tech-elysis_process",title:F("tech_elysis_process"),desc:F("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:F("tech_elysis_process_effect"),action(){return!!ii($(this)[0])}},smelting:{id:"tech-smelting",title:F("tech_smelting"),desc:F("tech_smelting_desc"),category:"mining",era:"civilized",reqs:{mining:3},grant:["smelting",1],cost:{Knowledge:()=>4050},effect:F("tech_smelting_effect"),action(){return!!ii($(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,Jr())}},steel:{id:"tech-steel",title:F("tech_steel"),desc:F("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:F("tech_steel_effect"),action(){return!!ii($(this)[0])&&(t.resource.Steel.display=!0,!0)},post(){$i(),os()}},blast_furnace:{id:"tech-blast_furnace",title:F("tech_blast_furnace"),desc:F("tech_blast_furnace"),category:"mining",era:"discovery",reqs:{smelting:2},grant:["smelting",3],cost:{Knowledge:()=>13500,Coal:()=>2e3},effect:F("tech_blast_furnace_effect"),action(){return!!ii($(this)[0])},post(){t.race.steelen&&(t.tech.smelting=6,Jr())}},bessemer_process:{id:"tech-bessemer_process",title:F("tech_bessemer_process"),desc:F("tech_bessemer_process"),category:"mining",era:"discovery",reqs:{smelting:3},grant:["smelting",4],condition:()=>!t.race.steelen,cost:{Knowledge:()=>19800,Coal:()=>5e3},effect:F("tech_bessemer_process_effect"),action(){return!!ii($(this)[0])}},oxygen_converter:{id:"tech-oxygen_converter",title:F("tech_oxygen_converter"),desc:F("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:F("tech_oxygen_converter_effect"),action(){return!!ii($(this)[0])}},electric_arc_furnace:{id:"tech-electric_arc_furnace",title:F("tech_electric_arc_furnace"),desc:F("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:F("tech_electric_arc_furnace_effect"),action(){return!!ii($(this)[0])}},hellfire_furnace:{id:"tech-hellfire_furnace",title:F("tech_hellfire_furnace"),desc:F("tech_hellfire_furnace"),category:"mining",era:"interstellar",reqs:{smelting:6,infernite:1},grant:["smelting",7],cost:{Knowledge:()=>615e3,Infernite:()=>2e3,Soul_Gem:()=>2},effect:F("tech_hellfire_furnace_effect"),action(){return!!ii($(this)[0])}},infernium_fuel:{id:"tech-infernium_fuel",title:F("tech_infernium_fuel"),desc:F("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:F("tech_infernium_fuel_effect"),action(){return!!ii($(this)[0])},post(){$i()}},iridium_smelting_perk:{id:"tech-iridium_smelting_perk",title:F("tech_iridium_smelting"),desc:F("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:F("tech_iridium_smelting_effect"),action(){return!!ii($(this)[0])}},rotary_kiln:{id:"tech-rotary_kiln",title:F("tech_rotary_kiln"),desc:F("tech_rotary_kiln"),category:"mining",era:"industrialized",reqs:{smelting:3,high_tech:3},grant:["copper",1],cost:{Knowledge:()=>57600,Coal:()=>8e3},effect:F("tech_rotary_kiln_effect"),action(){return!!ii($(this)[0])}},metal_working:{id:"tech-metal_working",title:F("tech_metal_working"),desc:F("tech_metal_working_desc"),category:"mining",era:"civilized",reqs:{mining:1},grant:["mining",2],cost:{Knowledge:()=>350},effect:F("tech_metal_working_effect"),action(){return!!ii($(this)[0])&&(t.city.mine={count:0,on:0},!0)}},iron_mining:{id:"tech-iron_mining",title:F("tech_iron_mining"),desc:F("tech_iron_mining_desc"),category:"mining",era:"civilized",reqs:{mining:2},grant:["mining",3],cost:{Knowledge:()=>t.city.ptrait.includes("unstable")?500:2500},effect:F("tech_iron_mining_effect"),action(){return!!ii($(this)[0])&&(t.resource.Iron.display=!0,t.city.foundry&&t.city.foundry.count>0&&(t.resource.Wrought_Iron.display=!0,na()),!0)},post(){os()}},coal_mining:{id:"tech-coal_mining",title:F("tech_coal_mining"),desc:F("tech_coal_mining_desc"),category:"power_generation",era:"civilized",reqs:{mining:3},grant:["mining",4],cost:{Knowledge:()=>4320},effect:F("tech_coal_mining_effect"),action(){return!!ii($(this)[0])&&(t.city.coal_mine={count:0,on:0},t.resource.Coal.display=!0,!0)},post(){os()}},storage:{id:"tech-storage",title:F("tech_storage"),desc:F("tech_storage_desc"),category:"storage",era:"civilized",reqs:{primitive:3,currency:1},grant:["storage",1],cost:{Knowledge:()=>20},effect:F("tech_storage_effect"),action(){return!!ii($(this)[0])&&(t.city.shed={count:0},!0)}},reinforced_shed:{id:"tech-reinforced_shed",title:F("tech_reinforced_shed"),desc:F("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:F("tech_reinforced_shed_effect"),action(){return!!ii($(this)[0])}},barns:{id:"tech-barns",title:F("tech_barns"),desc:F("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:F("tech_barns_effect"),action(){return!!ii($(this)[0])},post(){hi(!1,["city-shed"])}},warehouse:{id:"tech-warehouse",title:F("tech_warehouse"),desc:F("tech_warehouse_desc"),category:"storage",era:"industrialized",reqs:{storage:3,high_tech:3,smelting:2},grant:["storage",4],cost:{Knowledge:()=>40500,Titanium:()=>3e3},effect:F("tech_warehouse_effect"),action(){return!!ii($(this)[0])},post(){hi(!1,["city-shed"])}},cameras:{id:"tech-cameras",title:F("tech_cameras"),desc:F("tech_cameras_desc"),category:"storage",era:"globalized",reqs:{storage:4,high_tech:4},grant:["storage",5],cost:{Money:()=>9e4,Knowledge:()=>65e3},effect:F("tech_cameras_effect"),action(){return!!ii($(this)[0])}},pocket_dimensions:{id:"tech-pocket_dimensions",title:F("tech_pocket_dimensions"),desc:F("tech_pocket_dimensions_desc"),category:"storage",era:"early_space",path:["standard"],reqs:{particles:1,storage:5},grant:["storage",6],cost:{Knowledge:()=>108e3},effect:F("tech_pocket_dimensions_effect"),action(){return!!ii($(this)[0])}},ai_logistics:{id:"tech-ai_logistics",title:F("tech_ai_logistics"),desc:F("tech_ai_logistics"),category:"storage",era:"interstellar",reqs:{storage:6,proxima:2,science:13},grant:["storage",7],cost:{Knowledge:()=>65e4},effect:F("tech_ai_logistics_effect"),action(){return!!ii($(this)[0])}},containerization:{id:"tech-containerization",title:F("tech_containerization"),desc:F("tech_containerization_desc"),category:"storage",era:"civilized",reqs:{cement:1,mining:1,storage:1,science:1},grant:["container",1],cost:{Knowledge:()=>2700},effect:F("tech_containerization_effect"),action(){return!!ii($(this)[0])&&(t.city.storage_yard={count:0},!0)}},reinforced_crates:{id:"tech-reinforced_crates",title:F("tech_reinforced_crates"),desc:F("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=F("resource_Bones_name");return t.race.smoldering?e=F("resource_Chrysotile_name"):t.race.kindling_kindred&&(e=F("resource_Stone_name")),F("tech_reinforced_crates_alt_effect",[e])}return F("tech_reinforced_crates_effect")},action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},cranes:{id:"tech-cranes",title:F("tech_cranes"),desc:F("tech_cranes_desc"),category:"storage",era:"discovery",reqs:{container:2,high_tech:2},grant:["container",3],cost:{Knowledge:()=>18e3,Copper:()=>1e3,Steel:()=>2500},effect:F("tech_cranes_effect"),action(){return!!ii($(this)[0])}},titanium_crates:{id:"tech-titanium_crates",title:()=>F("tech_titanium_crates",[t.resource.Titanium.name]),desc:()=>F("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:()=>F("tech_titanium_crates_effect",[t.resource.Titanium.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},mythril_crates:{id:"tech-mythril_crates",title:()=>F("tech_mythril_crates",[t.resource.Mythril.name]),desc:()=>F("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:()=>F("tech_mythril_crates_effect",[t.resource.Mythril.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},infernite_crates:{id:"tech-infernite_crates",title:()=>F("tech_crates",[t.resource.Infernite.name]),desc:()=>F("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:()=>F("tech_infernite_crates_effect",[t.resource.Infernite.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},graphene_crates:{id:"tech-graphene_crates",title:()=>F("tech_crates",[t.resource.Graphene.name]),desc:()=>F("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:()=>F("tech_graphene_crates_effect",[t.resource.Graphene.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},bolognium_crates:{id:"tech-bolognium_crates",title:()=>F("tech_crates",[t.resource.Bolognium.name]),desc:()=>F("tech_crates",[t.resource.Bolognium.name]),category:"storage",era:"intergalactic",reqs:{container:7,gateway:3},grant:["container",8],cost:{Knowledge:()=>342e4,Bolognium:()=>9e4},effect:()=>F("tech_bolognium_crates_effect",[t.resource.Bolognium.name]),action(){return!!ii($(this)[0])}},steel_containers:{id:"tech-steel_containers",title:()=>F("tech_containers",[t.resource.Steel.name]),desc:()=>F("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 F("tech_steel_containers_alt_effect",[t.resource[e].name,t.resource.Steel.name])}return F("tech_steel_containers_effect",[t.resource.Steel.name])},action(){return!!ii($(this)[0])&&(t.city.warehouse={count:0},!0)}},gantry_crane:{id:"tech-gantry_crane",title:F("tech_gantry_crane"),desc:F("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:F("tech_gantry_crane_effect"),action(){return!!ii($(this)[0])}},alloy_containers:{id:"tech-alloy_containers",title:()=>F("tech_containers",[t.resource.Alloy.name]),desc:()=>F("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:()=>F("tech_alloy_containers_effect",[t.resource.Alloy.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},mythril_containers:{id:"tech-mythril_containers",title:()=>F("tech_containers",[t.resource.Mythril.name]),desc:()=>F("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:()=>F("tech_mythril_containers_effect",[t.resource.Mythril.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},adamantite_containers:{id:"tech-adamantite_containers",title:()=>F("tech_containers",[t.resource.Adamantite.name]),desc:()=>F("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:()=>F("tech_adamantite_containers_effect",[t.resource.Adamantite.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},aerogel_containers:{id:"tech-aerogel_containers",title:()=>F("tech_containers",[t.resource.Aerogel.name]),desc:()=>F("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:()=>F("tech_aerogel_containers_effect",[t.resource.Aerogel.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},bolognium_containers:{id:"tech-bolognium_containers",title:()=>F("tech_containers",[t.resource.Bolognium.name]),desc:()=>F("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:()=>F("tech_bolognium_containers_effect",[t.resource.Bolognium.name]),action(){return!!ii($(this)[0])}},nanoweave_containers:{id:"tech-nanoweave_containers",title:()=>F("tech_nanoweave_containers",[t.resource.Nanoweave.name]),desc:()=>F("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:()=>F("tech_nanoweave_containers_effect",[t.resource.Nanoweave.name]),action(){return!!ii($(this)[0])}},evil_planning:{id:"tech-evil_planning",title:F("tech_urban_planning"),desc:F("tech_urban_planning"),category:"queues",era:"civilized",wiki:!!t.race.terrifying,reqs:{banking:2},grant:["queue",1],trait:["terrifying"],cost:{Knowledge:()=>2500},effect:F("tech_urban_planning_effect"),action(){return!!ii($(this)[0])&&(t.queue.display=!0,!0)},post(){fs()}},urban_planning:{id:"tech-urban_planning",title:F("tech_urban_planning"),desc:F("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:F("tech_urban_planning_effect"),action(){return!!ii($(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(){fs()}},zoning_permits:{id:"tech-zoning_permits",title:F("tech_zoning_permits"),desc:F("tech_zoning_permits"),category:"queues",era:"industrialized",reqs:{queue:1,high_tech:3},grant:["queue",2],cost:{Knowledge:()=>28e3},effect:()=>F("tech_zoning_permits_effect",[t.genes.queue&&t.genes.queue>=2?4:2]),action(){return!!ii($(this)[0])},post(){fs()}},urbanization:{id:"tech-urbanization",title:F("tech_urbanization"),desc:F("tech_urbanization"),category:"queues",era:"globalized",reqs:{queue:2,high_tech:6},grant:["queue",3],cost:{Knowledge:()=>95e3},effect:()=>F("tech_urbanization_effect",[t.genes.queue&&t.genes.queue>=2?6:3]),action(){return!!ii($(this)[0])},post(){fs()}},assistant:{id:"tech-assistant",title:F("tech_assistant"),desc:F("tech_assistant"),category:"queues",era:"civilized",reqs:{queue:1,science:4},grant:["r_queue",1],cost:{Knowledge:()=>5e3},effect:F("tech_assistant_effect"),action(){return!!ii($(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(){ys(),t.settings.tabLoad&&$("#resQueue").removeAttr("style")}},government:{id:"tech-government",title:F("tech_government"),desc:F("tech_government_desc"),category:"government",era:"civilized",reqs:{currency:1},grant:["govern",1],cost:{Knowledge:()=>750},effect:F("tech_government_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#govType"},"update"),zs({el:"#foreign"},"update"),zs({el:"#government .govTabs2"},"update"),t.settings.tabLoad&&$("#government .govTabs2").removeAttr("style")}},theocracy:{id:"tech-theocracy",title:F("govern_theocracy"),desc:F("govern_theocracy"),category:"government",era:"civilized",reqs:{govern:1,theology:2},grant:["gov_theo",1],cost:{Knowledge:()=>1200},effect:F("tech_theocracy_effect"),action(){return!!ii($(this)[0])}},republic:{id:"tech-republic",title:F("govern_republic"),desc:F("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:F("tech_republic_effect"),action(){return!!ii($(this)[0])}},socialist:{id:"tech-socialist",title:F("govern_socialist"),desc:F("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:F("tech_socialist_effect"),action(){return!!ii($(this)[0])}},corpocracy:{id:"tech-corpocracy",title:F("govern_corpocracy"),desc:F("govern_corpocracy"),category:"government",era:"industrialized",reqs:{govern:2,high_tech:3},grant:["gov_corp",1],cost:{Knowledge:()=>26e3},effect:F("tech_corpocracy_effect"),action(){return!!ii($(this)[0])}},technocracy:{id:"tech-technocracy",title:F("govern_technocracy"),desc:F("govern_technocracy"),category:"government",era:"industrialized",reqs:{govern:2,high_tech:3},grant:["govern",3],cost:{Knowledge:()=>26e3},effect:F("tech_technocracy_effect"),action(){return!!ii($(this)[0])}},federation:{id:"tech-federation",title:F("govern_federation"),desc:F("govern_federation"),category:"government",era:"early_space",reqs:{govern:2},condition:()=>t.tech.unify&&t.tech.unify>=2||oe(),grant:["gov_fed",1],cost:{Knowledge:()=>3e4},effect:F("tech_federation_effect"),action(){return!!ii($(this)[0])}},magocracy:{id:"tech-magocracy",title:F("govern_magocracy"),desc:F("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:F("tech_magocracy_effect"),action(){return!!ii($(this)[0])}},governor:{id:"tech-governor",title:F("tech_governor"),desc:F("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:F("tech_governor_effect"),action(){return!!ii($(this)[0])&&(t.settings.showGovernor=!0,!0)},post(){E()}},spy:{id:"tech-spy",title:F("tech_spy"),desc:F("tech_spy"),category:"spies",era:"civilized",reqs:{govern:1},grant:["spy",1],cost:{Knowledge:()=>1250},effect:F("tech_spy_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#foreign"},"update")}},espionage:{id:"tech-espionage",title:F("tech_espionage"),desc:F("tech_espionage"),category:"spies",era:"discovery",reqs:{spy:1,high_tech:1},grant:["spy",2],cost:{Knowledge:()=>7500},effect:F("tech_espionage_effect"),action(){return!!ii($(this)[0])&&(t.settings.msgFilters.spy.unlocked||(t.settings.msgFilters.spy.unlocked=!0,t.settings.msgFilters.spy.vis=!0),!0)},post(){zs({el:"#foreign"},"update")}},spy_training:{id:"tech-spy_training",title:F("tech_spy_training"),desc:F("tech_spy_training"),category:"spies",era:"discovery",reqs:{spy:2,boot_camp:1},grant:["spy",3],cost:{Knowledge:()=>1e4},effect:F("tech_spy_training_effect"),action(){return!!ii($(this)[0])}},spy_gadgets:{id:"tech-spy_gadgets",title:F("tech_spy_gadgets"),desc:F("tech_spy_gadgets"),category:"spies",era:"discovery",reqs:{spy:3,high_tech:2},grant:["spy",4],cost:{Knowledge:()=>15e3},effect:F("tech_spy_gadgets_effect"),action(){return!!ii($(this)[0])}},code_breakers:{id:"tech-code_breakers",title:F("tech_code_breakers"),desc:F("tech_code_breakers"),category:"spies",era:"industrialized",reqs:{spy:4,high_tech:4},grant:["spy",5],cost:{Knowledge:()=>55e3},effect:F("tech_code_breakers_effect"),action(){return!!ii($(this)[0])}},currency:{id:"tech-currency",title:F("tech_currency"),desc:F("tech_currency_desc"),category:"banking",era:"civilized",reqs:{housing:1},grant:["currency",1],cost:{Knowledge:()=>22,Lumber:()=>10},effect:F("tech_currency_effect"),action(){return!!ii($(this)[0])&&(t.resource.Money.display=!0,!0)}},market:{id:"tech-market",title:F("tech_market"),desc:F("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:F("tech_market_effect"),action(){return!!ii($(this)[0])&&(t.settings.showResources=!0,t.settings.showMarket=!0,!0)}},tax_rates:{id:"tech-tax_rates",title:F("tech_tax_rates"),desc:F("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:F("tech_tax_rates_effect"),action(){return!!ii($(this)[0])&&(t.civic.taxes.display=!0,!0)}},large_trades:{id:"tech-large_trades",title:F("tech_large_trades"),desc:F("tech_large_trades_desc"),category:"market",era:"civilized",reqs:{currency:3},not_trait:["terrifying"],grant:["currency",4],cost:{Knowledge:()=>6750},effect:F("tech_large_trades_effect"),action(){return!!ii($(this)[0])},post(){t.race.noble&&(t.tech.currency=5,Jr())}},corruption:{id:"tech-corruption",title:F("tech_corruption"),desc:F("tech_corruption_desc"),category:"banking",era:"industrialized",reqs:{currency:4,high_tech:3},not_trait:["terrifying","noble"],grant:["currency",5],cost:{Knowledge:()=>36e3},effect:F("tech_corruption_effect"),action(){return!!ii($(this)[0])}},massive_trades:{id:"tech-massive_trades",title:F("tech_massive_trades"),desc:F("tech_massive_trades_desc"),category:"market",era:"globalized",reqs:{currency:5,high_tech:4},not_trait:["terrifying"],grant:["currency",6],cost:{Knowledge:()=>108e3},effect:F("tech_massive_trades_effect"),action(){return!!ii($(this)[0])}},trade:{id:"tech-trade",title:F("tech_trade"),desc:F("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:F("tech_trade_effect"),action(){return!!ii($(this)[0])&&(t.city.trade={count:0},t.city.market.active=!0,!0)}},diplomacy:{id:"tech-diplomacy",title:F("tech_diplomacy"),desc:F("tech_diplomacy_desc"),category:"market",era:"discovery",reqs:{trade:1,high_tech:1},not_trait:["terrifying"],grant:["trade",2],cost:{Knowledge:()=>16200},effect:F("tech_diplomacy_effect"),action(){return!!ii($(this)[0])}},freight:{id:"tech-freight",title:F("tech_freight"),desc:F("tech_freight_desc"),category:"market",era:"industrialized",reqs:{trade:2,high_tech:3},not_trait:["terrifying"],grant:["trade",3],cost:{Knowledge:()=>37800},effect:F("tech_freight_effect"),action(){return!!ii($(this)[0])},post(){t.tech.high_tech>=6&&qe("Physics")}},wharf:{id:"tech-wharf",title:F("tech_wharf"),desc:F("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:F("tech_wharf_effect"),action(){return!!ii($(this)[0])&&(t.city.wharf={count:0},!0)}},banking:{id:"tech-banking",title:F("tech_banking"),desc:F("tech_banking_desc"),category:"banking",era:"civilized",reqs:{currency:1},grant:["banking",1],cost:{Knowledge:()=>90},effect:F("tech_banking_effect"),action(){return!!ii($(this)[0])&&(t.city.bank={count:0},!0)}},investing:{id:"tech-investing",title:F("tech_investing"),desc:F("tech_investing_desc"),category:"banking",era:"civilized",reqs:{banking:1},grant:["banking",2],cost:{Money:()=>2500,Knowledge:()=>900},effect:F("tech_investing_effect"),action(){return!!ii($(this)[0])&&(t.civic.banker.display=!0,!0)}},vault:{id:"tech-vault",title:F("tech_vault"),desc:F("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:F("tech_vault_effect"),action(){return!!ii($(this)[0])}},bonds:{id:"tech-bonds",title:F("tech_bonds"),desc:F("tech_bonds"),category:"banking",era:"civilized",reqs:{banking:3},grant:["banking",4],cost:{Money:()=>2e4,Knowledge:()=>5e3},effect:F("tech_bonds_effect"),action(){return!!ii($(this)[0])}},steel_vault:{id:"tech-steel_vault",title:F("tech_steel_vault"),desc:F("tech_steel_vault"),category:"banking",era:"civilized",reqs:{banking:4,smelting:2},grant:["banking",5],cost:{Money:()=>3e4,Knowledge:()=>6750,Steel:()=>3e3},effect:F("tech_steel_vault_effect"),action(){return!!ii($(this)[0])}},eebonds:{id:"tech-eebonds",title:F("tech_eebonds"),desc:F("tech_eebonds"),category:"banking",era:"discovery",reqs:{banking:5,high_tech:1},grant:["banking",6],cost:{Money:()=>75e3,Knowledge:()=>18e3},effect:F("tech_eebonds_effect"),action(){return!!ii($(this)[0])}},swiss_banking:{id:"tech-swiss_banking",title:jr(),desc:jr(),category:"banking",era:"industrialized",reqs:{banking:6},grant:["banking",7],cost:{Money:()=>125e3,Knowledge:()=>45e3},effect:F("tech_swiss_banking_effect"),action(){return!!ii($(this)[0])}},safety_deposit:{id:"tech-safety_deposit",title:F("tech_safety_deposit"),desc:F("tech_safety_deposit"),category:"banking",era:"globalized",reqs:{banking:7,high_tech:4},grant:["banking",8],cost:{Money:()=>25e4,Knowledge:()=>67500},effect:F("tech_safety_deposit_effect"),action(){return!!ii($(this)[0])}},stock_market:{id:"tech-stock_market",title:F("tech_stock_market"),desc:F("tech_stock_market"),category:"arpa",era:"globalized",reqs:{banking:8,high_tech:6},grant:["banking",9],cost:{Money:()=>325e3,Knowledge:()=>108e3},effect:F("tech_stock_market_effect"),action(){return!!ii($(this)[0])},post(){qe("Physics")}},hedge_funds:{id:"tech-hedge_funds",title:F("tech_hedge_funds"),desc:F("tech_hedge_funds"),category:"banking",era:"early_space",reqs:{banking:9,stock_exchange:1},grant:["banking",10],cost:{Money:()=>375e3,Knowledge:()=>126e3},effect:F("tech_hedge_funds_effect"),action(){return!!ii($(this)[0])}},four_oh_one:{id:"tech-four_oh_one",title:F("tech_four_oh_one"),desc:F("tech_four_oh_one"),category:"banking",era:"early_space",reqs:{banking:10},grant:["banking",11],cost:{Money:()=>425e3,Knowledge:()=>144e3},effect:F("tech_four_oh_one_effect"),action(){return!!ii($(this)[0])},flair:()=>F("tech_four_oh_one_flair")},exchange:{id:"tech-exchange",title:F("tech_exchange"),desc:F("tech_exchange"),category:"banking",era:"interstellar",reqs:{banking:11,alpha:2,graphene:1},grant:["banking",12],cost:{Money:()=>1e6,Knowledge:()=>675e3},effect:F("tech_exchange_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.exchange={count:0,on:0},!0)}},foreign_investment:{id:"tech-foreign_investment",title:F("tech_foreign_investment"),desc:F("tech_foreign_investment"),category:"banking",era:"intergalactic",reqs:{banking:12,xeno:10},grant:["banking",13],cost:{Money:()=>1e8,Knowledge:()=>8e6},effect:F("tech_foreign_investment_effect"),action(){return!!ii($(this)[0])}},mythril_vault:{id:"tech-mythril_vault",title:F("tech_mythril_vault"),desc:F("tech_mythril_vault"),category:"banking",era:"early_space",reqs:{banking:5,space:3},grant:["vault",1],cost:{Money:()=>5e5,Knowledge:()=>15e4,Mythril:()=>750},effect:F("tech_mythril_vault_effect"),action(){return!!ii($(this)[0])}},neutronium_vault:{id:"tech-neutronium_vault",title:F("tech_neutronium_vault"),desc:F("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:F("tech_neutronium_vault_effect"),action(){return!!ii($(this)[0])}},adamantite_vault:{id:"tech-adamantite_vault",title:F("tech_adamantite_vault"),desc:F("tech_adamantite_vault"),category:"banking",era:"interstellar",reqs:{vault:2,alpha:2},grant:["vault",3],cost:{Money:()=>2e6,Knowledge:()=>56e4,Adamantite:()=>2e4},effect:F("tech_adamantite_vault_effect"),action(){return!!ii($(this)[0])}},graphene_vault:{id:"tech-graphene_vault",title:F("tech_graphene_vault"),desc:F("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:F("tech_graphene_vault_effect"),action(){return!!ii($(this)[0])}},home_safe:{id:"tech-home_safe",title:F("tech_home_safe"),desc:F("tech_home_safe"),category:"banking",era:"discovery",reqs:{banking:5},grant:["home_safe",1],cost:{Money:()=>42e3,Knowledge:()=>8e3,Steel:()=>4500},effect:F("tech_home_safe_effect"),action(){return!!ii($(this)[0])}},fire_proof_safe:{id:"tech-fire_proof_safe",title:F("tech_fire_proof_safe"),desc:F("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:F("tech_fire_proof_safe_effect"),action(){return!!ii($(this)[0])}},tamper_proof_safe:{id:"tech-tamper_proof_safe",title:F("tech_tamper_proof_safe"),desc:F("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:F("tech_tamper_proof_safe_effect"),action(){return!!ii($(this)[0])}},monument:{id:"tech-monument",title:F("tech_monument"),desc:F("tech_monument"),category:"arpa",era:"globalized",reqs:{high_tech:6},grant:["monument",1],cost:{Knowledge:()=>12e4},effect:F("tech_monument_effect"),action(){return!!ii($(this)[0])&&(t.arpa.m_type=qe("Monument"),!0)},post(){qe("Physics")}},tourism:{id:"tech-tourism",title:F("tech_tourism"),desc:F("tech_tourism"),category:"banking",era:"early_space",reqs:{monuments:2,monument:1},not_trait:["cataclysm","lone_survivor"],grant:["monument",2],cost:{Knowledge:()=>15e4},effect:F("tech_tourism_effect"),action(){return!!ii($(this)[0])&&(t.city.tourist_center={count:0,on:0},!0)}},xeno_tourism:{id:"tech-xeno_tourism",title:F("tech_xeno_tourism"),desc:F("tech_xeno_tourism"),category:"banking",era:"intergalactic",reqs:{monument:2,xeno:10,monuments:10},not_trait:["cataclysm"],grant:["monument",3],cost:{Knowledge:()=>8e6},effect:F("tech_xeno_tourism_effect"),action(){return!!ii($(this)[0])}},science:{id:"tech-science",title:F("tech_science"),desc:F("tech_science_desc"),category:"science",era:"civilized",reqs:{housing:1},grant:["science",1],cost:{Knowledge:()=>65},effect:F("tech_science_effect"),action(){return!!ii($(this)[0])&&(t.city.university={count:0},!0)}},library:{id:"tech-library",title:F("tech_library"),desc:F("tech_library_desc"),category:"science",era:"civilized",reqs:{science:1,cement:1},grant:["science",2],cost:{Knowledge:()=>720},effect:F("tech_library_effect"),action(){return!!ii($(this)[0])&&(t.city.library={count:0},!0)}},thesis:{id:"tech-thesis",title:F("tech_thesis"),desc:F("tech_thesis_desc"),category:"science",era:"civilized",reqs:{science:2},grant:["science",3],cost:{Knowledge:()=>1125},effect:F("tech_thesis_effect"),action(){return!!ii($(this)[0])}},research_grant:{id:"tech-research_grant",title:F("tech_research_grant"),desc:F("tech_research_grant_desc"),category:"science",era:"civilized",reqs:{science:3},grant:["science",4],cost:{Knowledge:()=>3240},effect:F("tech_research_grant_effect"),action(){return!!ii($(this)[0])}},scientific_journal:{id:"tech-scientific_journal",title:()=>"magic"===t.race.universe?F("tech_magic_tomes"):F("tech_scientific_journal"),desc:()=>"magic"===t.race.universe?F("tech_magic_tomes_desc"):F("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?F("tech_magic_tomes_effect"):F("tech_scientific_journal_effect"),action(){return!!ii($(this)[0])}},adjunct_professor:{id:"tech-adjunct_professor",title:F("tech_adjunct_professor"),desc:F("tech_adjunct_professor"),category:"science",era:"industrialized",reqs:{science:5},grant:["science",6],cost:{Knowledge:()=>36e3},effect:()=>F("tech_adjunct_professor_effect",[di(),t.civic.scientist?t.civic.scientist.name:F("job_scientist")]),action(){return!!ii($(this)[0])}},tesla_coil:{id:"tech-tesla_coil",title:F("tech_tesla_coil"),desc:F("tech_tesla_coil_desc"),category:"science",era:"industrialized",reqs:{science:6,high_tech:3},grant:["science",7],cost:{Knowledge:()=>51750},effect:()=>F("tech_tesla_coil_effect",[di()]),action(){return!!ii($(this)[0])}},internet:{id:"tech-internet",title:F("tech_internet"),desc:F("tech_internet"),category:"science",era:"globalized",reqs:{science:7,high_tech:4},grant:["science",8],cost:{Knowledge:()=>61200},effect:F("tech_internet_effect"),action(){return!!ii($(this)[0])&&(t.race.toxic&&"troll"===t.race.species&&Pn("godwin"),!0)}},observatory:{id:"tech-observatory",title:F("tech_observatory"),desc:F("tech_observatory"),category:"science",era:"early_space",reqs:{science:8,space:3,luna:1},grant:["science",9],cost:{Knowledge:()=>148e3},effect:F("tech_observatory_effect"),action(){return!!ii($(this)[0])&&(t.space.observatory={count:0,on:0},!0)}},world_collider:{id:"tech-world_collider",title:F("tech_world_collider"),desc:F("tech_world_collider"),category:"science",era:"deep_space",path:["standard"],reqs:{science:9,elerium:2},grant:["science",10],cost:{Knowledge:()=>35e4},effect:()=>F("tech_world_collider_effect",[Vt().dwarf]),action(){return!!ii($(this)[0])&&(t.space.world_collider={count:0},t.space.world_controller={count:0,on:0},!0)},flair:`
                            ${F("tech_world_collider_flair1")}
                            ${F("tech_world_collider_flair2")}
                            `},laboratory:{id:"tech-laboratory",title:()=>"magic"===t.race.universe?F("tech_sanctum"):F("tech_laboratory"),desc:()=>"magic"===t.race.universe?F("tech_sanctum"):F("tech_laboratory_desc"),category:"science",era:"interstellar",reqs:{science:11,alpha:2},grant:["science",12],cost:{Knowledge:()=>5e5},effect:()=>"magic"===t.race.universe?F("tech_sanctum_effect"):F("tech_laboratory_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.laboratory={count:0,on:0},!0)},flair:()=>"magic"===t.race.universe?F("tech_sanctum_flair"):F("tech_laboratory_flair")},virtual_assistant:{id:"tech-virtual_assistant",title:F("tech_virtual_assistant"),desc:F("tech_virtual_assistant"),category:"science",era:"interstellar",reqs:{science:12,high_tech:12},grant:["science",13],cost:{Knowledge:()=>635e3},effect:()=>"magic"===t.race.universe?F("tech_virtual_assistant_magic_effect"):F("tech_virtual_assistant_effect"),action(){return!!ii($(this)[0])}},dimensional_readings:{id:"tech-dimensional_readings",title:F("tech_dimensional_readings"),desc:F("tech_dimensional_readings"),category:"science",era:"interstellar",reqs:{science:13,infernite:2},grant:["science",14],cost:{Knowledge:()=>75e4},effect:()=>F("tech_dimensional_readings_effect"),action(){return!!ii($(this)[0])}},quantum_entanglement:{id:"tech-quantum_entanglement",title:F("tech_quantum_entanglement"),desc:F("tech_quantum_entanglement"),category:"science",era:"interstellar",reqs:{science:14,neutron:1},grant:["science",15],cost:{Knowledge:()=>85e4,Neutronium:()=>7500,Soul_Gem:()=>2},effect:()=>F("tech_quantum_entanglement_effect",[2,"magic"===t.race.universe?F("tech_sanctum"):F("interstellar_laboratory_title"),di()]),action(){return!!ii($(this)[0])}},expedition:{id:"tech-expedition",title:()=>"magic"===t.race.universe?F("tech_expedition_wiz"):F("tech_expedition"),desc:()=>"magic"===t.race.universe?F("tech_expedition_wiz"):F("tech_expedition"),category:"science",era:"intergalactic",reqs:{science:15,xeno:4},grant:["science",16],cost:{Knowledge:()=>535e4},effect:()=>"magic"===t.race.universe?F("tech_expedition_wiz_effect"):F("tech_expedition_effect"),action(){return!!ii($(this)[0])}},subspace_sensors:{id:"tech-subspace_sensors",title:F("tech_subspace_sensors"),desc:F("tech_subspace_sensors"),category:"science",era:"intergalactic",reqs:{science:16,high_tech:16},grant:["science",17],cost:{Knowledge:()=>6e6},effect:()=>F("tech_subspace_sensors_effect"),action(){return!!ii($(this)[0])}},alien_database:{id:"tech-alien_database",title:F("tech_alien_database"),desc:F("tech_alien_database"),category:"progress",era:"intergalactic",reqs:{science:17,conflict:5},grant:["science",18],cost:{Knowledge:()=>825e4},effect:()=>F("tech_alien_database_effect"),action(){return!!ii($(this)[0])}},orichalcum_capacitor:{id:"tech-orichalcum_capacitor",title:F("tech_orichalcum_capacitor"),desc:F("tech_orichalcum_capacitor"),category:"science",era:"intergalactic",reqs:{science:18,high_tech:17},grant:["science",19],cost:{Knowledge:()=>125e5,Orichalcum:()=>25e4},effect:()=>F("tech_orichalcum_capacitor_effect"),action(){return!!ii($(this)[0])}},advanced_biotech:{id:"tech-advanced_biotech",title:F("tech_advanced_biotech"),desc:F("tech_advanced_biotech"),category:"science",era:"dimensional",reqs:{science:19,high_tech:18},grant:["science",20],cost:{Knowledge:()=>255e5},effect:()=>F("tech_advanced_biotech_effect"),action(){return!!ii($(this)[0])}},codex_infinium:{id:"tech-codex_infinium",title:F("tech_codex_infinium"),desc:F("tech_codex_infinium"),category:"science",era:"dimensional",reqs:{science:20,sphinx_bribe:1},grant:["science",21],cost:{Knowledge:()=>401e5,Codex:()=>1},effect:()=>F("tech_codex_infinium_effect"),action(){return!!ii($(this)[0])&&(t.resource.Codex.display=!1,!0)}},bioscience:{id:"tech-bioscience",title:F("tech_bioscience"),desc:F("tech_bioscience_desc"),category:"science",era:"globalized",reqs:{science:8},grant:["genetics",1],cost:{Knowledge:()=>67500},effect:F("tech_bioscience_effect"),action(){return!!ii($(this)[0])&&(t.city.biolab={count:0},!0)}},genetics:{id:"tech-genetics",title:F("tech_genetics"),desc:F("tech_genetics"),category:"arpa",era:"globalized",reqs:{genetics:1,high_tech:6},grant:["genetics",2],cost:{Knowledge:()=>108e3},effect:F("tech_genetics_effect"),action(){return!!ii($(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(){qe("Genetics")}},crispr:{id:"tech-crispr",title:F("tech_crispr"),desc:F("tech_crispr"),category:"genes",era:"globalized",reqs:{genetics:3},grant:["genetics",4],cost:{Knowledge:()=>125e3},effect:()=>t.race.artifical?F("tech_crispr_effect_artifical"):F("tech_crispr_effect"),action(){return!!ii($(this)[0])&&(t.settings.arpa.crispr=!0,t.settings.arpa.arpaTabs=2,!0)},post(){qe("Genetics"),qe("Crispr")}},shotgun_sequencing:{id:"tech-shotgun_sequencing",title:F("tech_shotgun_sequencing"),desc:()=>t.race.artifical?F("tech_shotgun_sequencing_desc_artifical"):F("tech_shotgun_sequencing_desc"),category:"genes",era:"early_space",reqs:{genetics:4},grant:["genetics",5],cost:{Knowledge:()=>165e3},effect:()=>t.race.artifical?F("tech_shotgun_sequencing_effect_artifical"):F("tech_shotgun_sequencing_effect"),action(){return!!ii($(this)[0])&&(t.arpa.sequence.boost=!0,!0)},post(){qe("Genetics")}},de_novo_sequencing:{id:"tech-de_novo_sequencing",title:F("tech_de_novo_sequencing"),desc:F("tech_de_novo_sequencing"),category:"genes",era:"early_space",reqs:{genetics:5},grant:["genetics",6],cost:{Knowledge:()=>22e4},effect:()=>t.race.artifical?F("tech_de_novo_sequencing_effect_artifical"):F("tech_de_novo_sequencing_effect"),action(){return!!ii($(this)[0])&&(t.resource.Genes.display=!0,!0)},post(){qe("Genetics")}},dna_sequencer:{id:"tech-dna_sequencer",title:()=>t.race.artifical?F("tech_code_sequencer"):F("tech_dna_sequencer"),desc:()=>t.race.artifical?F("tech_code_sequencer"):F("tech_dna_sequencer"),category:"genes",era:"deep_space",reqs:{genetics:6},grant:["genetics",7],cost:{Knowledge:()=>3e5},effect:()=>t.race.artifical?F("tech_code_sequencer_effect"):F("tech_dna_sequencer_effect"),action(){return!!ii($(this)[0])&&(t.arpa.sequence.auto=!0,!0)},post(){qe("Genetics")}},rapid_sequencing:{id:"tech-rapid_sequencing",title:()=>t.race.artifical?F("tech_agile_development"):F("tech_rapid_sequencing"),desc:()=>t.race.artifical?F("tech_agile_development"):F("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?F("tech_agile_development_effect"):F("tech_rapid_sequencing_effect"),action(){return!!ii($(this)[0])}},mad_science:{id:"tech-mad_science",title:()=>"magic"===t.race.universe?F("tech_sages"):F("tech_mad_science"),desc:()=>"magic"===t.race.universe?F("tech_sages"):F("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?F("tech_sages_effect"):F("tech_mad_science_effect"),action(){return!!ii($(this)[0])&&(t.race.terrifying&&(t.civic.taxes.display=!0),t.city.wardenclyffe={count:0,on:0},!0)}},electricity:{id:"tech-electricity",title:F("tech_electricity"),desc:F("tech_electricity"),category:"power_generation",era:"discovery",reqs:{high_tech:1},grant:["high_tech",2],cost:{Knowledge:()=>13500,Copper:()=>1e3},effect:F("tech_electricity_effect"),action(){return!!ii($(this)[0])&&(ms(F("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,Si(),!0)}},matter_replicator:{id:"tech-matter_replicator",title:()=>"antimatter"!==t.race.universe||t.race.amexplode?F("tech_replicator"):F("tech_antireplicator"),desc:()=>"antimatter"!==t.race.universe||t.race.amexplode?F("tech_replicator"):F("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?F("tech_replicator_effect_alt"):F("tech_antireplicator_effect_alt"),action(){if(ii($(this)[0])){if("antimatter"===t.race.universe&&t.race.amexplode){jn("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(){E()}},industrialization:{id:"tech-industrialization",title:F("tech_industrialization"),desc:F("tech_industrialization"),category:"progress",era:"industrialized",reqs:{high_tech:2,cement:2,steel_container:1},grant:["high_tech",3],cost:{Knowledge:()=>25200},effect:F("tech_industrialization_effect"),action(){return!!ii($(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(){os()}},electronics:{id:"tech-electronics",title:F("tech_electronics"),desc:F("tech_electronics"),category:"progress",era:"industrialized",reqs:{high_tech:3,titanium:1},grant:["high_tech",4],cost:{Knowledge:()=>5e4},effect:F("tech_electronics_effect"),action(){return!!ii($(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:F("tech_fission"),desc:F("tech_fission"),category:"progress",era:"globalized",reqs:{high_tech:4,uranium:1},grant:["high_tech",5],cost:{Knowledge:()=>77400,Uranium:()=>10},effect:F("tech_fission_effect"),action(){return!!ii($(this)[0])&&(ms(F("tech_fission_msg"),"info",!1,["progress"]),t.city.fission_power={count:0,on:0},!0)}},arpa:{id:"tech-arpa",title:F("tech_arpa"),desc:F("tech_arpa_desc"),category:"arpa",era:"globalized",reqs:{high_tech:5},grant:["high_tech",6],cost:{Knowledge:()=>9e4},effect:F("tech_arpa_effect"),action(){return!!ii($(this)[0])&&(t.settings.showGenetics=!0,t.settings.arpa.physics=!0,t.race.truepath&&!t.tech.unify&&(t.tech.unify=1),!0)},post(){qe("Physics")}},rocketry:{id:"tech-rocketry",title:F("tech_rocketry"),desc:F("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:F("tech_rocketry_effect"),action(){return!!ii($(this)[0])&&(t.race.truepath&&!t.tech.rival&&(t.tech.rival=1,ms(F("civics_rival_unlocked",[X(3)]),"info",!1,["progress","combat"])),!0)},post(){qe("Physics")}},robotics:{id:"tech-robotics",title:F("tech_robotics"),desc:F("tech_robotics"),category:"progress",era:"globalized",reqs:{high_tech:7},grant:["high_tech",8],cost:{Knowledge:()=>125e3},effect:F("tech_robotics_effect"),action(){return!!ii($(this)[0])}},lasers:{id:"tech-lasers",title:F("tech_lasers"),desc:F("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:F("tech_lasers_effect"),action(){return!!ii($(this)[0])&&(t.race.cataclysm&&Pn("iron_will",!1,3),!0)}},artifical_intelligence:{id:"tech-artifical_intelligence",title:F("tech_artificial_intelligence"),desc:F("tech_artificial_intelligence"),category:"progress",era:"deep_space",reqs:{high_tech:9},grant:["high_tech",10],cost:{Knowledge:()=>325e3},effect:F("tech_artificial_intelligence_effect"),action(){return!!ii($(this)[0])},flair:()=>F("tech_artificial_intelligence_flair")},quantum_computing:{id:"tech-quantum_computing",title:F("tech_quantum_computing"),desc:F("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:F("tech_quantum_computing_effect"),action(){return!!ii($(this)[0])},flair:()=>F("tech_quantum_computing_flair")},virtual_reality:{id:"tech-virtual_reality",title:F("tech_virtual_reality"),desc:F("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:F("tech_virtual_reality_effect"),action(){return!!ii($(this)[0])},flair:()=>F("tech_virtual_reality_flair")},plasma:{id:"tech-plasma",title:F("tech_plasma"),desc:F("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:F("tech_plasma_effect"),action(){return!!ii($(this)[0])}},shields:{id:"tech-shields",title:F("tech_shields"),desc:F("tech_shields"),category:"stellar_engine",era:"interstellar",reqs:{high_tech:13},grant:["high_tech",14],cost:{Knowledge:()=>85e4},effect:F("tech_shields_effect"),action(){return!!ii($(this)[0])&&(t.settings.space.neutron=!0,t.settings.space.blackhole=!0,!0)}},ai_core:{id:"tech-ai_core",title:F("tech_ai_core"),desc:F("tech_ai_core"),category:"ai_core",era:"interstellar",reqs:{high_tech:14,science:15,blackhole:3},grant:["high_tech",15],cost:{Knowledge:()=>15e5},effect:F("tech_ai_core_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.citadel={count:0,on:0},!0)}},metaphysics:{id:"tech-metaphysics",title:F("tech_metaphysics"),desc:F("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:()=>F("tech_metaphysics_effect"),action(){return!!ii($(this)[0])}},orichalcum_analysis:{id:"tech-orichalcum_analysis",title:F("tech_orichalcum_analysis"),desc:F("tech_orichalcum_analysis"),category:"progress",era:"intergalactic",reqs:{high_tech:16,chthonian:3},grant:["high_tech",17],cost:{Knowledge:()=>122e5,Orichalcum:()=>1e5},effect:()=>F("tech_orichalcum_analysis_effect"),action(){return!!ii($(this)[0])&&(ms(F("tech_orichalcum_analysis_result"),"info",!1,["progress"]),!0)}},cybernetics:{id:"tech-cybernetics",title:F("tech_cybernetics"),desc:F("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:()=>F("tech_cybernetics_effect"),action(){return!!ii($(this)[0])}},blood_pact:{id:"tech-blood_pact",title:F("tech_blood_pact"),desc:F("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:()=>F("tech_blood_pact_effect"),action(){return!!ii($(this)[0])&&(t.settings.arpa.blood=!0,qe("Crispr"),!0)},post(){qe("Blood")}},purify:{id:"tech-purify",title:F("tech_purify"),desc:F("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:()=>F("tech_purify_effect"),action(){return!!ii($(this)[0])}},waygate:{id:"tech-waygate",title:F("tech_waygate"),desc:F("tech_waygate"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:10,b_stone:2},grant:["waygate",1],cost:{Knowledge:()=>55e6},effect:()=>F("tech_waygate_effect"),action(){return!!ii($(this)[0])&&(t.portal.waygate={count:0,progress:0,on:0},!0)}},demonic_infusion:{id:"tech-demonic_infusion",title:F("tech_demonic_infusion"),desc:F("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:()=>Hs(1e3),Knowledge:()=>55e6,Demonic_Essence:()=>1},effect:()=>`
                            ${F("tech_demonic_infusion_effect")}
                            ${F("tech_demonic_infusion_effect2",[Ns("descend").artifact])}
                            `,action(){return t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),ii($(this)[0])&&H(),!1}},gate_key:{id:"tech-gate_key",title:F("tech_gate_key"),desc:F("tech_gate_key"),category:"hell_dimension",era:"dimensional",reqs:{hell_gate:1},grant:["hell_gate",2],cost:{Knowledge:()=>3e7},effect:()=>F("tech_gate_key_effect"),action(){return!!ii($(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:F("tech_gate_turret"),desc:F("tech_gate_turret"),category:"hell_dimension",era:"dimensional",reqs:{hell_gate:2},grant:["hell_gate",3],cost:{Knowledge:()=>32e6},effect:()=>F("tech_gate_turret_effect"),action(){return!!ii($(this)[0])&&(t.portal.gate_turret={count:0,on:0},!0)}},infernite_mine:{id:"tech-infernite_mine",title:F("tech_infernite_mine"),desc:F("tech_infernite_mine"),category:"hell_dimension",era:"dimensional",reqs:{hell_gate:3},grant:["hell_gate",4],cost:{Knowledge:()=>325e5},effect:()=>F("tech_infernite_mine_effect"),action(){return!!ii($(this)[0])&&(t.portal.infernite_mine={count:0,on:0},!0)}},study_corrupt_gem:{id:"tech-study_corrupt_gem",title:F("tech_study_corrupt_gem"),desc:F("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:5e4,Knowledge:()=>185e5,Corrupt_Gem:()=>1},effect:()=>F("tech_study_corrupt_gem_effect"),action(){return!!ii($(this)[0])&&(ms(F("tech_study_corrupt_gem_result"),"info",!1,["progress","hell"]),t.resource.Corrupt_Gem.display=!1,!0)}},soul_binding:{id:"tech-soul_binding",title:F("tech_soul_binding"),desc:F("tech_soul_binding"),category:"hell_dimension",era:"intergalactic",reqs:{corrupt:2,science:19},grant:["forbidden",1],trait:["witch_hunter"],cost:{Knowledge:()=>19e6},effect:()=>F("tech_soul_binding_effect"),action(){return!!ii($(this)[0])}},soul_capacitor:{id:"tech-soul_capacitor",title:F("tech_soul_capacitor"),desc:F("tech_soul_capacitor"),category:"hell_dimension",era:"intergalactic",reqs:{forbidden:1},grant:["forbidden",2],trait:["witch_hunter"],cost:{Knowledge:()=>195e5},effect:()=>F("tech_soul_capacitor_effect"),action(){return!!ii($(this)[0])&&(t.portal.soul_capacitor={count:0,on:0,energy:0,ecap:0},!0)}},soul_capacitor:{id:"tech-soul_capacitor",title:F("tech_soul_capacitor"),desc:F("tech_soul_capacitor"),category:"hell_dimension",era:"intergalactic",reqs:{forbidden:1},grant:["forbidden",2],trait:["witch_hunter"],cost:{Knowledge:()=>195e5},effect:()=>F("tech_soul_capacitor_effect"),action(){return!!ii($(this)[0])&&(t.portal.soul_capacitor={count:0,on:0,energy:0,ecap:0},!0)}},absorption_chamber:{id:"tech-absorption_chamber",title:F("tech_absorption_chamber"),desc:F("tech_absorption_chamber"),category:"hell_dimension",era:"intergalactic",reqs:{forbidden:2},grant:["forbidden",3],trait:["witch_hunter"],cost:{Knowledge:()=>2e7},effect:()=>F("tech_absorption_chamber_effect"),action(){return!!ii($(this)[0])&&(t.portal.absorption_chamber={count:0},!0)}},corrupt_gem_analysis:{id:"tech-corrupt_gem_analysis",title:F("tech_corrupt_gem_analysis"),desc:F("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:()=>F("tech_corrupt_gem_analysis_effect"),action(){return!!ii($(this)[0])&&(ms(F("tech_corrupt_gem_analysis_result"),"info",!1,["progress","hell"]),t.resource.Corrupt_Gem.display=!1,!0)}},hell_search:{id:"tech-hell_search",title:F("tech_hell_search"),desc:F("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:()=>F("tech_hell_search_effect"),action(){return!!ii($(this)[0])&&(ms(F("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:F("tech_codex_infernium"),desc:F("tech_codex_infernium"),category:"progress",era:"dimensional",reqs:{hell_ruins:3},grant:["hell_ruins",4],cost:{Knowledge:()=>235e5,Codex:()=>1},effect:()=>F("tech_codex_infernium_effect"),action(){return!!ii($(this)[0])&&(t.resource.Codex.display=!1,!0)}},lake_analysis:{id:"tech-lake_analysis",title:F("tech_lake_analysis"),desc:F("tech_lake_analysis"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:2},grant:["hell_lake",3],cost:{Knowledge:()=>34e6},effect:()=>F("tech_lake_analysis_effect"),action(){return!!ii($(this)[0])}},lake_threat:{id:"tech-lake_threat",title:F("tech_lake_threat"),desc:F("tech_lake_threat"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:3},grant:["hell_lake",4],cost:{Knowledge:()=>345e5},effect:()=>F("tech_lake_threat_effect"),action(){return!!ii($(this)[0])&&(t.portal.bireme={count:0,on:0,crew:0,mil:0},ms(F("tech_lake_threat_result"),"info",!1,["progress","hell"]),!0)}},lake_transport:{id:"tech-lake_transport",title:F("tech_lake_transport"),desc:F("tech_lake_transport"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:4},grant:["hell_lake",5],cost:{Knowledge:()=>35e6},effect:()=>F("tech_lake_transport_effect"),action(){return!!ii($(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:F("tech_cooling_tower"),desc:F("tech_cooling_tower"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:5},grant:["hell_lake",6],cost:{Knowledge:()=>375e5},effect:()=>F("tech_cooling_tower_effect"),action(){return!!ii($(this)[0])&&(t.portal.cooling_tower={count:0,on:0},!0)}},miasma:{id:"tech-miasma",title:F("tech_miasma"),desc:F("tech_miasma"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:2},grant:["hell_spire",3],cost:{Knowledge:()=>3825e4},effect:()=>F("tech_miasma_effect"),action(){return!!ii($(this)[0])&&(t.portal.port={count:0},!0)}},incorporeal:{id:"tech-incorporeal",title:F("tech_incorporeal"),desc:F("tech_incorporeal"),category:"special",era:"intergalactic",reqs:{science:19},grant:["ascension",1],not_trait:["orbit_decay","witch_hunter"],cost:{Knowledge:()=>175e5,Phage:()=>25},effect:()=>F("tech_incorporeal_effect"),action(){return!!ii($(this)[0])}},tech_ascension:{id:"tech-tech_ascension",title:F("tech_ascension"),desc:F("tech_ascension"),category:"special",era:"intergalactic",reqs:{ascension:1},grant:["ascension",2],not_trait:["orbit_decay","witch_hunter"],cost:{Knowledge:()=>185e5,Plasmid:()=>100},effect:()=>F("tech_ascension_effect"),action(){return!!ii($(this)[0])&&(t.settings.space.sirius=!0,!0)}},terraforming:{id:"tech-terraforming",title:F("tech_terraforming"),desc:F("tech_terraforming"),category:"special",era:"intergalactic",reqs:{science:19},path:["standard"],grant:["terraforming",1],trait:["orbit_decay"],cost:{Knowledge:()=>18e6},effect:()=>F("tech_terraforming_effect",[Vt().red]),action(){return!!ii($(this)[0])&&(t.space.terraformer={count:0},!0)}},cement_processing:{id:"tech-cement_processing",title:F("tech_cement_processing"),desc:F("tech_cement_processing"),category:"ai_core",era:"interstellar",reqs:{high_tech:15},not_trait:["flier"],grant:["ai_core",1],cost:{Knowledge:()=>175e4},effect:F("tech_cement_processing_effect"),action(){return!!ii($(this)[0])}},adamantite_processing_flier:{id:"tech-adamantite_processing_flier",title:F("tech_adamantite_processing"),desc:F("tech_adamantite_processing"),category:"ai_core",era:"interstellar",reqs:{high_tech:15},trait:["flier"],grant:["ai_core",2],cost:{Knowledge:()=>2e6},effect:F("tech_adamantite_processing_effect"),action(){return!!ii($(this)[0])}},adamantite_processing:{id:"tech-adamantite_processing",title:F("tech_adamantite_processing"),desc:F("tech_adamantite_processing"),category:"ai_core",era:"interstellar",reqs:{ai_core:1},not_trait:["flier"],grant:["ai_core",2],cost:{Knowledge:()=>2e6},effect:F("tech_adamantite_processing_effect"),action(){return!!ii($(this)[0])}},graphene_processing:{id:"tech-graphene_processing",title:F("tech_graphene_processing"),desc:F("tech_graphene_processing"),category:"ai_core",era:"intergalactic",reqs:{ai_core:2},grant:["ai_core",3],cost:{Knowledge:()=>25e5},effect:F("tech_graphene_processing_effect"),action(){return!!ii($(this)[0])}},fusion_power:{id:"tech-fusion_power",title:F("tech_fusion_power"),desc:F("tech_fusion_power"),category:"power_generation",era:"interstellar",reqs:{ram_scoop:1},grant:["fusion",1],cost:{Knowledge:()=>64e4},effect:F("tech_fusion_power_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.fusion={count:0,on:0},!0)}},infernium_power:{id:"tech-infernium_power",title:F("tech_infernium_power"),desc:F("tech_infernium_power"),category:"power_generation",era:"dimensional",reqs:{smelting:8,hell_ruins:4},grant:["inferno_power",1],cost:{Knowledge:()=>3e7},effect:F("tech_infernium_power_effect"),action(){return!!ii($(this)[0])&&(t.portal.inferno_power={count:0,on:0},!0)}},thermomechanics:{id:"tech-thermomechanics",title:F("tech_thermomechanics"),desc:F("tech_thermomechanics_desc"),category:"crafting",era:"industrialized",reqs:{high_tech:4},grant:["alloy",1],cost:{Knowledge:()=>6e4},effect:()=>F("tech_thermomechanics_effect"),action(){return!!ii($(this)[0])}},quantum_manufacturing:{id:"tech-quantum_manufacturing",title:F("tech_quantum_manufacturing"),desc:F("tech_quantum_manufacturing"),category:"crafting",era:"deep_space",reqs:{high_tech:11},grant:["q_factory",1],cost:{Knowledge:()=>465e3},effect:F("tech_quantum_manufacturing_effect"),action(){return!!ii($(this)[0])}},worker_drone:{id:"tech-worker_drone",title:F("tech_worker_drone"),desc:F("tech_worker_drone"),category:"mining",era:"deep_space",reqs:{nano:1},grant:["drone",1],cost:{Knowledge:()=>4e5},effect:()=>F("tech_worker_drone_effect",[Vt().gas_moon]),action(){return!!ii($(this)[0])&&(t.space.drone={count:0},!0)}},uranium:{id:"tech-uranium",title:F("tech_uranium"),desc:F("tech_uranium"),category:"power_generation",era:"globalized",reqs:{high_tech:4},grant:["uranium",1],cost:{Knowledge:()=>72e3},effect:F("tech_uranium_effect"),action(){return!!ii($(this)[0])&&(t.resource.Uranium.display=!0,!0)},post(){os()}},uranium_storage:{id:"tech-uranium_storage",title:F("tech_uranium_storage"),desc:F("tech_uranium_storage"),category:"storage",era:"globalized",reqs:{uranium:1},grant:["uranium",2],cost:{Knowledge:()=>75600,Alloy:()=>2500},effect:F("tech_uranium_storage_effect"),action(){return!!ii($(this)[0])}},uranium_ash:{id:"tech-uranium_ash",title:F("tech_uranium_ash"),desc:F("tech_uranium_ash"),category:"power_generation",era:"globalized",reqs:{uranium:2},grant:["uranium",3],cost:{Knowledge:()=>122e3},effect:F("tech_uranium_ash_effect"),action(){return!!ii($(this)[0])}},breeder_reactor:{id:"tech-breeder_reactor",title:F("tech_breeder_reactor"),desc:F("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:F("tech_breeder_reactor_effect"),action(){return!!ii($(this)[0])}},mine_conveyor:{id:"tech-mine_conveyor",title:F("tech_mine_conveyor"),desc:F("tech_mine_conveyor"),category:"mining",era:"discovery",reqs:{high_tech:2},grant:["mine_conveyor",1],cost:{Knowledge:()=>16200,Copper:()=>2250,Steel:()=>1750},effect:F("tech_mine_conveyor_effect"),action(){return!!ii($(this)[0])}},oil_well:{id:"tech-oil_well",title:F("tech_oil_well"),desc:F("tech_oil_well"),category:"power_generation",era:"industrialized",reqs:{high_tech:3},grant:["oil",1],cost:{Knowledge:()=>27e3},effect:F("tech_oil_well_effect"),action(){return!!ii($(this)[0])&&(t.city.oil_well={count:0},!0)}},oil_depot:{id:"tech-oil_depot",title:F("tech_oil_depot"),desc:F("tech_oil_depot"),category:"storage",era:"industrialized",reqs:{oil:1},grant:["oil",2],cost:{Knowledge:()=>32e3},effect:F("tech_oil_depot_effect"),action(){return!!ii($(this)[0])&&(t.city.oil_depot={count:0},!0)}},oil_power:{id:"tech-oil_power",title:()=>t.race.environmentalist?F("city_wind_power"):F("tech_oil_power"),desc:()=>t.race.environmentalist?F("city_wind_power"):F("tech_oil_power"),category:"power_generation",era:"industrialized",reqs:{oil:2},grant:["oil",3],cost:{Knowledge:()=>44e3},effect:()=>t.race.environmentalist?F("tech_wind_power_effect"):F("tech_oil_power_effect"),action(){return!!ii($(this)[0])&&(t.city.oil_power={count:0,on:0},!0)}},titanium_drills:{id:"tech-titanium_drills",title:F("tech_titanium_drills"),desc:F("tech_titanium_drills"),category:"power_generation",era:"industrialized",reqs:{oil:3},grant:["oil",4],cost:{Knowledge:()=>54e3,Titanium:()=>3500},effect:F("tech_titanium_drills_effect"),action(){return!!ii($(this)[0])}},alloy_drills:{id:"tech-alloy_drills",title:F("tech_alloy_drills"),desc:F("tech_alloy_drills"),category:"power_generation",era:"globalized",reqs:{oil:4},grant:["oil",5],cost:{Knowledge:()=>77e3,Alloy:()=>1e3},effect:F("tech_alloy_drills_effect"),action(){return!!ii($(this)[0])}},fracking:{id:"tech-fracking",title:F("tech_fracking"),desc:F("tech_fracking"),category:"power_generation",era:"globalized",reqs:{oil:5,high_tech:6},grant:["oil",6],cost:{Knowledge:()=>132e3},effect:F("tech_fracking_effect"),action(){return!!ii($(this)[0])}},mythril_drills:{id:"tech-mythril_drills",title:F("tech_mythril_drills"),desc:F("tech_mythril_drills"),category:"power_generation",era:"early_space",reqs:{oil:6,space:3},grant:["oil",7],cost:{Knowledge:()=>165e3,Mythril:()=>100},effect:F("tech_mythril_drills_effect"),action(){return!!ii($(this)[0])}},mass_driver:{id:"tech-mass_driver",title:F("tech_mass_driver"),desc:F("tech_mass_driver"),category:"power_generation",era:"early_space",reqs:{oil:6,space:3},grant:["mass",1],cost:{Knowledge:()=>16e4},effect:F("tech_mass_driver_effect"),action(){return!!ii($(this)[0])&&(t.city.mass_driver={count:0,on:0},!0)}},orichalcum_driver:{id:"tech-orichalcum_driver",title:F("tech_orichalcum_driver"),desc:F("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:()=>F("tech_orichalcum_driver_effect"),action(){return!!ii($(this)[0])&&(t.space.terraformer={count:0},!0)}},polymer:{id:"tech-polymer",title:F("tech_polymer"),desc:F("tech_polymer"),category:"crafting",era:"globalized",reqs:{genetics:1},grant:["polymer",1],cost:{Knowledge:()=>8e4,Oil:()=>5e3,Alloy:()=>450},effect:F("tech_polymer_effect"),action(){return!!ii($(this)[0])&&(t.resource.Polymer.display=!0,ms(F("tech_polymer_avail"),"info",!1,["progress"]),!0)},post(){$i(),os()}},fluidized_bed_reactor:{id:"tech-fluidized_bed_reactor",title:F("tech_fluidized_bed_reactor"),desc:F("tech_fluidized_bed_reactor"),category:"crafting",era:"globalized",reqs:{polymer:1,high_tech:6},grant:["polymer",2],cost:{Knowledge:()=>99e3},effect:F("tech_fluidized_bed_reactor_effect"),action(){return!!ii($(this)[0])}},synthetic_fur:{id:"tech-synthetic_fur",title:()=>t.race.evil?F("tech_faux_leather"):F("tech_synthetic_fur"),desc:()=>t.race.evil?F("tech_faux_leather"):F("tech_synthetic_fur"),category:"crafting",era:"globalized",reqs:{polymer:1},grant:["synthetic_fur",1],cost:{Knowledge:()=>1e5,Polymer:()=>2500},effect:()=>t.race.evil?F("tech_faux_leather_effect"):F("tech_synthetic_fur_effect"),action(){return!!ii($(this)[0])},post(){$i()}},nanoweave:{id:"tech-nanoweave",title:F("tech_nanoweave"),desc:F("tech_nanoweave"),category:"crafting",era:"intergalactic",reqs:{science:18},grant:["nanoweave",1],cost:{Knowledge:()=>85e5,Nano_Tube:()=>5e6,Vitreloy:()=>25e4},effect:F("tech_nanoweave_effect"),action(){return!!ii($(this)[0])&&(t.resource.Nanoweave.display=!0,ms(F("tech_nanoweave_avail"),"info",!1,["progress"]),na(),!0)},post(){os()}},stanene:{id:"tech-stanene",title:F("tech_stanene"),desc:F("tech_stanene"),category:"crafting",era:"interstellar",reqs:{infernite:1},grant:["stanene",1],cost:{Knowledge:()=>59e4,Aluminium:()=>5e5,Infernite:()=>1e3},effect:F("tech_stanene_effect"),action(){return!!ii($(this)[0])&&(t.resource.Stanene.display=!0,ms(F("tech_stanene_avail"),"info",!1,["progress"]),!0)},post(){$i(),os()}},nano_tubes:{id:"tech-nano_tubes",title:F("tech_nano_tubes"),desc:F("tech_nano_tubes"),category:"crafting",era:"deep_space",reqs:{high_tech:10},grant:["nano",1],cost:{Knowledge:()=>375e3,Coal:()=>1e5,Neutronium:()=>1e3},effect:F("tech_nano_tubes_effect"),action(){return!!ii($(this)[0])&&(t.resource.Nano_Tube.display=!0,ms(F("tech_nano_tubes_msg"),"info",!1,["progress"]),!0)},post(){$i(),os()}},scarletite:{id:"tech-scarletite",title:F("tech_scarletite"),desc:F("tech_scarletite"),category:"crafting",era:"dimensional",reqs:{hell_ruins:4},grant:["scarletite",1],cost:{Knowledge:()=>2675e4,Iron:()=>1e8,Adamantite:()=>15e6,Orichalcum:()=>8e6},effect:F("tech_scarletite_effect"),action(){if(ii($(this)[0])){if(t.resource.Scarletite.display=!0,t.portal.hell_forge={count:0,on:0},ms(F("tech_scarletite_avail"),"info",!1,["progress"]),na(),"micro"===t.race.universe||t.pillars[t.race.species]){let e=Sn();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(){os()}},pillars:{id:"tech-pillars",title:F("tech_pillars"),desc:F("tech_pillars"),category:"hell_dimension",era:"dimensional",reqs:{scarletite:1,fusable:1},grant:["pillars",1],cost:{Knowledge:()=>3e7},effect:F("tech_pillars_effect"),action(){return!!ii($(this)[0])&&(ms(F("tech_pillars_msg",[Di[t.race.species].entity]),"info",!1,["progress","hell"]),!0)}},reclaimer:{id:"tech-reclaimer",title:F("tech_reclaimer"),desc:F("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:F("tech_reclaimer_effect"),action(){return!!ii($(this)[0])&&(t.civic.lumberjack.name=F("job_reclaimer"),t.civic.lumberjack.display=!0,t.city.graveyard={count:0},!0)}},shovel:{id:"tech-shovel",title:F("tech_shovel"),desc:F("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:F("tech_shovel_effect"),action(){return!!ii($(this)[0])}},iron_shovel:{id:"tech-iron_shovel",title:F("tech_iron_shovel"),desc:F("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:F("tech_iron_shovel_effect"),action(){return!!ii($(this)[0])}},steel_shovel:{id:"tech-steel_shovel",title:F("tech_steel_shovel"),desc:F("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:F("tech_steel_shovel_effect"),action(){return!!ii($(this)[0])}},titanium_shovel:{id:"tech-titanium_shovel",title:F("tech_titanium_shovel"),desc:F("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:F("tech_titanium_shovel_effect"),action(){return!!ii($(this)[0])}},alloy_shovel:{id:"tech-alloy_shovel",title:F("tech_alloy_shovel"),desc:F("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:F("tech_alloy_shovel_effect"),action(){return!!ii($(this)[0])}},mythril_shovel:{id:"tech-mythril_shovel",title:F("tech_mythril_shovel"),desc:F("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:F("tech_mythril_shovel_effect"),action(){return!!ii($(this)[0])}},adamantite_shovel:{id:"tech-adamantite_shovel",title:F("tech_adamantite_shovel"),desc:F("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:F("tech_adamantite_shovel_effect"),action(){return!!ii($(this)[0])}},stone_axe:{id:"tech-stone_axe",title:()=>F("tech_stone_axe"),desc:()=>F("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?F("tech_basic_livingtools"):t.race.sappy?F("tech_amber_axe_effect"):F("tech_stone_axe_effect"),action(){return!!ii($(this)[0])&&(t.civic.lumberjack.display=!0,t.city.lumber_yard={count:0},!0)}},copper_axes:{id:"tech-copper_axes",title:F("tech_copper_axes"),desc:F("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:F("tech_copper_axes_effect"),action(){return!!ii($(this)[0])}},iron_saw:{id:"tech-iron_saw",title:F("tech_iron_saw"),desc:F("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:F("tech_iron_saw_effect"),action(){return!!ii($(this)[0])&&(t.city.sawmill={count:0,on:0},!0)}},steel_saw:{id:"tech-steel_saw",title:F("tech_steel_saw"),desc:F("tech_steel_saw_desc"),category:"lumber_gathering",era:"discovery",reqs:{smelting:2,saw:1},grant:["saw",2],cost:{Knowledge:()=>10800,Steel:()=>400},effect:F("tech_steel_saw_effect"),action(){return!!ii($(this)[0])}},iron_axes:{id:"tech-iron_axes",title:F("tech_iron_axes"),desc:F("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:F("tech_iron_axes_effect"),action(){return!!ii($(this)[0])}},steel_axes:{id:"tech-steel_axes",title:F("tech_steel_axes"),desc:F("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:F("tech_steel_axes_effect"),action(){return!!ii($(this)[0])}},titanium_axes:{id:"tech-titanium_axes",title:F("tech_titanium_axes"),desc:F("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:F("tech_titanium_axes_effect"),action(){return!!ii($(this)[0])}},chainsaws:{id:"tech-chainsaws",title:F("tech_chainsaws"),desc:F("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:F("tech_chainsaws_effect"),action(){return!!ii($(this)[0])},flair:()=>`
                            ${F("tech_chainsaws_flair1")}
                            ${F("tech_chainsaws_flair2")}
                            `},copper_sledgehammer:{id:"tech-copper_sledgehammer",title:F("tech_copper_sledgehammer"),desc:F("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:F("tech_copper_sledgehammer_effect"),action(){return!!ii($(this)[0])}},iron_sledgehammer:{id:"tech-iron_sledgehammer",title:F("tech_iron_sledgehammer"),desc:F("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:F("tech_iron_sledgehammer_effect"),action(){return!!ii($(this)[0])}},steel_sledgehammer:{id:"tech-steel_sledgehammer",title:F("tech_steel_sledgehammer"),desc:F("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:F("tech_steel_sledgehammer_effect"),action(){return!!ii($(this)[0])}},titanium_sledgehammer:{id:"tech-titanium_sledgehammer",title:F("tech_titanium_sledgehammer"),desc:F("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:F("tech_titanium_sledgehammer_effect"),action(){return!!ii($(this)[0])}},copper_pickaxe:{id:"tech-copper_pickaxe",title:F("tech_copper_pickaxe"),desc:F("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:F("tech_copper_pickaxe_effect"),action(){return!!ii($(this)[0])}},iron_pickaxe:{id:"tech-iron_pickaxe",title:F("tech_iron_pickaxe"),desc:F("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:F("tech_iron_pickaxe_effect"),action(){return!!ii($(this)[0])}},steel_pickaxe:{id:"tech-steel_pickaxe",title:F("tech_steel_pickaxe"),desc:F("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:F("tech_steel_pickaxe_effect"),action(){return!!ii($(this)[0])}},jackhammer:{id:"tech-jackhammer",title:F("tech_jackhammer"),desc:F("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:F("tech_jackhammer_effect"),action(){return!!ii($(this)[0])}},jackhammer_mk2:{id:"tech-jackhammer_mk2",title:F("tech_jackhammer_mk2"),desc:F("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:F("tech_jackhammer_mk2_effect"),action(){return!!ii($(this)[0])}},adamantite_hammer:{id:"tech-adamantite_hammer",title:F("tech_adamantite_hammer"),desc:F("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:F("tech_adamantite_hammer_effect"),action(){return!!ii($(this)[0])}},copper_hoe:{id:"tech-copper_hoe",title:F("tech_copper_hoe"),desc:F("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:F("tech_copper_hoe_effect"),action(){return!!ii($(this)[0])}},iron_hoe:{id:"tech-iron_hoe",title:F("tech_iron_hoe"),desc:F("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:F("tech_iron_hoe_effect"),action(){return!!ii($(this)[0])}},steel_hoe:{id:"tech-steel_hoe",title:F("tech_steel_hoe"),desc:F("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:F("tech_steel_hoe_effect"),action(){return!!ii($(this)[0])}},titanium_hoe:{id:"tech-titanium_hoe",title:F("tech_titanium_hoe"),desc:F("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:F("tech_titanium_hoe_effect"),action(){return!!ii($(this)[0])}},adamantite_hoe:{id:"tech-adamantite_hoe",title:F("tech_adamantite_hoe"),desc:F("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:F("tech_adamantite_hoe_effect"),action(){return!!ii($(this)[0])}},cyber_limbs:{id:"tech-cyber_limbs",title:F("tech_cyber_limbs"),desc:F("tech_cyber_limbs"),category:"mining",era:"dimensional",reqs:{high_tech:18},grant:["cyber_worker",1],cost:{Knowledge:()=>27e6},effect:F("tech_cyber_limbs_effect"),action(){return!!ii($(this)[0])}},slave_pens:{id:"tech-slave_pens",title:F("tech_slave_pens"),desc:F("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:F("tech_slave_pens_effect"),action(){return!!ii($(this)[0])&&(t.city.slave_pen={count:0,slaves:0},!0)}},slave_market:{id:"tech-slave_market",title:F("tech_slave_market"),desc:F("tech_slave_market"),category:"slaves",era:"discovery",reqs:{slaves:1,high_tech:1},grant:["slaves",2],trait:["slaver"],cost:{Knowledge:()=>8e3},effect:F("tech_slave_market_effect"),action(){return!!ii($(this)[0])}},ceremonial_dagger:{id:"tech-ceremonial_dagger",title:F("tech_ceremonial_dagger"),desc:F("tech_ceremonial_dagger"),category:"sacrifice",era:"civilized",reqs:{mining:1},grant:["sacrifice",1],trait:["cannibalize"],not_trait:["cataclysm","lone_survivor"],cost:{Knowledge:()=>60},effect:F("tech_ceremonial_dagger_effect"),action(){return!!ii($(this)[0])}},last_rites:{id:"tech-last_rites",title:F("tech_last_rites"),desc:F("tech_last_rites"),category:"sacrifice",era:"civilized",reqs:{sacrifice:1,theology:2},grant:["sacrifice",2],trait:["cannibalize"],cost:{Knowledge:()=>1e3},effect:F("tech_last_rites_effect"),action(){return!!ii($(this)[0])}},ancient_infusion:{id:"tech-ancient_infusion",title:F("tech_ancient_infusion"),desc:F("tech_ancient_infusion"),category:"sacrifice",era:"early_space",reqs:{sacrifice:2,theology:4},grant:["sacrifice",3],trait:["cannibalize"],cost:{Knowledge:()=>182e3},effect:F("tech_ancient_infusion_effect"),action(){return!!ii($(this)[0])}},garrison:{id:"tech-garrison",title:F("tech_garrison"),desc:F("tech_garrison_desc"),category:"military",era:"civilized",reqs:{science:1,housing:1},grant:["military",1],cost:{Knowledge:()=>70},effect:F("tech_garrison_effect"),action(){return!!ii($(this)[0])&&(t.city.garrison={count:0,on:0},!0)}},mercs:{id:"tech-mercs",title:F("tech_mercs"),desc:F("tech_mercs_desc"),category:"military",era:"civilized",reqs:{military:1},grant:["mercs",1],not_trait:["lone_survivor"],cost:{Money:()=>1e4,Knowledge:()=>4500},effect:F("tech_mercs_effect"),action(){return!!ii($(this)[0])&&(t.civic.garrison.mercs=!0,!0)}},signing_bonus:{id:"tech-signing_bonus",title:F("tech_signing_bonus"),desc:F("tech_signing_bonus_desc"),category:"military",era:"industrialized",reqs:{mercs:1,high_tech:3},grant:["mercs",2],cost:{Money:()=>5e4,Knowledge:()=>32e3},effect:F("tech_signing_bonus_effect"),action(){return!!ii($(this)[0])}},hospital:{id:"tech-hospital",title:F("tech_hospital"),desc:F("tech_hospital"),category:"military",era:"civilized",reqs:{military:1,alumina:1},grant:["medic",1],not_trait:["artifical"],cost:{Knowledge:()=>5e3},effect:F("tech_hospital_effect"),action(){return!!ii($(this)[0])&&(t.city.hospital={count:0},!0)}},bac_tanks:{id:"tech-bac_tanks",title:()=>t.race.artifical?F("tech_repair_subroutines"):F("tech_bac_tanks"),desc:()=>t.race.artifical?F("tech_repair_subroutines"):F("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?F("tech_repair_subroutines_effect"):F("tech_bac_tanks_effect"),action(){return!!ii($(this)[0])}},boot_camp:{id:"tech-boot_camp",title:F("tech_boot_camp"),desc:F("tech_boot_camp_desc"),category:"military",era:"discovery",reqs:{high_tech:1},grant:["boot_camp",1],cost:{Knowledge:()=>8e3},effect:F("tech_boot_camp_effect"),action(){return!!ii($(this)[0])&&(t.city.boot_camp={count:0},!0)}},vr_training:{id:"tech-vr_training",title:F("tech_vr_training"),desc:F("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:()=>F("tech_vr_training_effect"),action(){return!!ii($(this)[0])}},bows:{id:"tech-bows",title:F("tech_bows"),desc:F("tech_bows_desc"),category:"military",era:"civilized",reqs:{military:1},grant:["military",2],cost:{Knowledge:()=>225,Lumber:()=>250},effect:F("tech_bows_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#garrison"},"update"),zs({el:"#c_garrison"},"update")}},flintlock_rifle:{id:"tech-flintlock_rifle",title:()=>"magic"===t.race.universe?F("tech_magic_arrow"):F("tech_flintlock_rifle"),desc:()=>"magic"===t.race.universe?F("tech_magic_arrow"):F("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?F("tech_magic_arrow_effect"):F("tech_flintlock_rifle_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#garrison"},"update"),zs({el:"#c_garrison"},"update")}},machine_gun:{id:"tech-machine_gun",title:()=>"magic"===t.race.universe?F("tech_fire_mage"):F("tech_machine_gun"),desc:()=>"magic"===t.race.universe?F("tech_fire_mage"):F("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:F("tech_machine_gun_effect"),effect:()=>"magic"===t.race.universe?F("tech_fire_mage_effect"):F("tech_machine_gun_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#garrison"},"update"),zs({el:"#c_garrison"},"update")}},bunk_beds:{id:"tech-bunk_beds",title:F("tech_bunk_beds"),desc:F("tech_bunk_beds"),category:"military",era:"globalized",reqs:{military:4,high_tech:4},grant:["military",5],cost:{Knowledge:()=>76500,Furs:()=>25e3,Alloy:()=>3e3},effect:F("tech_bunk_beds_effect"),action(){return!!ii($(this)[0])}},rail_guns:{id:"tech-rail_guns",title:()=>"magic"===t.race.universe?F("tech_lightning_caster"):F("tech_rail_guns"),desc:()=>"magic"===t.race.universe?F("tech_lightning_caster"):F("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?F("tech_lightning_caster_effect"):F("tech_rail_guns_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#garrison"},"update"),zs({el:"#c_garrison"},"update")}},laser_rifles:{id:"tech-laser_rifles",title:()=>"magic"===t.race.universe?F("tech_mana_rifles"):F("tech_laser_rifles"),desc:()=>"magic"===t.race.universe?F("tech_mana_rifles"):F("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?F("tech_mana_rifles_effect"):F("tech_laser_rifles_effect"),action(){return!!ii($(this)[0])&&("sharkin"===t.race.species&&Pn("laser_shark"),!0)},post(){zs({el:"#garrison"},"update"),zs({el:"#c_garrison"},"update")}},plasma_rifles:{id:"tech-plasma_rifles",title:()=>"magic"===t.race.universe?F("tech_focused_rifles"):F("tech_plasma_rifles"),desc:()=>"magic"===t.race.universe?F("tech_focused_rifles"):F("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?F("tech_focused_rifles_effect"):F("tech_plasma_rifles_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#garrison"},"update"),zs({el:"#c_garrison"},"update")}},disruptor_rifles:{id:"tech-disruptor_rifles",title:()=>"magic"===t.race.universe?F("tech_magic_missile"):F("tech_disruptor_rifles"),desc:()=>"magic"===t.race.universe?F("tech_magic_missile"):F("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?F("tech_magic_missile_effect"):F("tech_disruptor_rifles_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#garrison"},"update"),zs({el:"#c_garrison"},"update")}},gauss_rifles:{id:"tech-gauss_rifles",title:()=>"magic"===t.race.universe?F("tech_magicword_kill"):F("tech_gauss_rifles"),desc:()=>"magic"===t.race.universe?F("tech_magicword_kill"):F("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?F("tech_magicword_kill_effect"):F("tech_gauss_rifles_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#garrison"},"update"),zs({el:"#c_garrison"},"update")}},cyborg_soldiers:{id:"tech-cyborg_soldiers",title:F("tech_cyborg_soldiers"),desc:F("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:F("tech_cyborg_soldiers_effect"),action(){return!!ii($(this)[0])},post(){zs({el:"#garrison"},"update"),zs({el:"#c_garrison"},"update")}},space_marines:{id:"tech-space_marines",title:F("tech_space_marines"),desc:F("tech_space_marines_desc"),category:"military",era:"early_space",reqs:{space:3,mars:2},grant:["marines",1],cost:{Knowledge:()=>21e4},effect:()=>`
                            ${F("tech_space_marines_effect",[Vt().red])}
                            `,action(){return!!ii($(this)[0])&&(t.space.space_barracks={count:0,on:0},!0)},flair:F("tech_space_marines_flair")},hammocks:{id:"tech-hammocks",title:F("tech_hammocks"),desc:F("tech_hammocks"),category:"military",era:"intergalactic",reqs:{marines:1,nanoweave:1},grant:["marines",2],cost:{Knowledge:()=>89e5,Nanoweave:()=>3e4},effect:()=>F("tech_hammocks_effect"),action(){return!!ii($(this)[0])}},cruiser:{id:"tech-cruiser",title:F("tech_cruiser"),desc:F("tech_cruiser"),category:"military",era:"interstellar",reqs:{high_tech:14,proxima:2,aerogel:1},grant:["cruiser",1],cost:{Knowledge:()=>86e4},effect:F("tech_cruiser_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.cruiser={count:0,on:0},!0)}},armor:{id:"tech-armor",title:F("tech_armor"),desc:F("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:F("tech_armor_effect"),action(){return!!ii($(this)[0])}},plate_armor:{id:"tech-plate_armor",title:F("tech_plate_armor"),desc:F("tech_plate_armor_desc"),category:"military",era:"civilized",reqs:{armor:1,mining:3},grant:["armor",2],cost:{Knowledge:()=>3400,Iron:()=>600},effect:F("tech_plate_armor_effect"),action(){return!!ii($(this)[0])}},kevlar:{id:"tech-kevlar",title:F("tech_kevlar"),desc:F("tech_kevlar_desc"),category:"military",era:"globalized",reqs:{armor:2,polymer:1},grant:["armor",3],cost:{Knowledge:()=>86e3,Polymer:()=>750},effect:F("tech_kevlar_effect"),action(){return!!ii($(this)[0])}},nanoweave_vest:{id:"tech-nanoweave_vest",title:F("tech_nanoweave_vest"),desc:F("tech_nanoweave_vest"),category:"military",era:"intergalactic",reqs:{armor:3,nanoweave:1},grant:["armor",4],cost:{Knowledge:()=>925e4,Nanoweave:()=>75e3},effect:F("tech_nanoweave_vest_effect"),action(){return!!ii($(this)[0])}},laser_turret:{id:"tech-laser_turret",title:F("tech_laser_turret"),desc:F("tech_laser_turret"),category:"hell_dimension",era:"interstellar",reqs:{high_tech:9,portal:2},grant:["turret",1],cost:{Knowledge:()=>6e5,Elerium:()=>100},effect:()=>`
                            ${F("tech_laser_turret_effect1")}
                            ${F("tech_laser_turret_effect2")}
                            `,action(){return!!ii($(this)[0])},post(){zs({el:"#fort"},"update"),hi(!1,["portal-turret"])}},plasma_turret:{id:"tech-plasma_turret",title:F("tech_plasma_turret"),desc:F("tech_plasma_turret"),category:"hell_dimension",era:"interstellar",reqs:{high_tech:13,turret:1},grant:["turret",2],cost:{Knowledge:()=>76e4,Elerium:()=>350},effect:()=>`
                            ${F("tech_plasma_turret_effect")}
                            ${F("tech_laser_turret_effect2")}
                            `,action(){return!!ii($(this)[0])},post(){zs({el:"#fort"},"update"),hi(!1,["portal-turret"])}},black_powder:{id:"tech-black_powder",title:()=>"magic"===t.race.universe?F("tech_magic_powder"):F("tech_black_powder"),desc:()=>"magic"===t.race.universe?F("tech_magic_powder_desc"):F("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?F("tech_magic_powder_effect"):F("tech_black_powder_effect"),action(){return!!ii($(this)[0])}},dynamite:{id:"tech-dynamite",title:F("tech_dynamite"),desc:F("tech_dynamite"),category:"mining",era:"civilized",reqs:{explosives:1},grant:["explosives",2],cost:{Knowledge:()=>4800,Coal:()=>750},effect:F("tech_dynamite_effect"),action(){return!!ii($(this)[0])}},anfo:{id:"tech-anfo",title:F("tech_anfo"),desc:F("tech_anfo"),category:"mining",era:"industrialized",reqs:{explosives:2,oil:1},grant:["explosives",3],cost:{Knowledge:()=>42e3,Oil:()=>2500},effect:F("tech_anfo_effect"),action(){return!!ii($(this)[0])}},mad:{id:"tech-mad",title:F("tech_mad"),desc:F("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)?F("tech_mad_effect_easter"):F("tech_mad_effect"),action(){return!!ii($(this)[0])&&(t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?ms(F("tech_mad_info_easter"),"info",!1,["progress"]):ms(F("tech_mad_info"),"info",!1,["progress"]),t.civic.mad.display=!0,!0)}},cement:{id:"tech-cement",title:F("tech_cement"),desc:F("tech_cement_desc"),category:"cement",era:"civilized",reqs:{mining:1,storage:1,science:1},not_trait:["flier"],grant:["cement",1],cost:{Knowledge:()=>500},effect:F("tech_cement_effect"),action(){return!!ii($(this)[0])&&(t.city.cement_plant={count:0,on:0},!0)}},rebar:{id:"tech-rebar",title:F("tech_rebar"),desc:F("tech_rebar"),category:"cement",era:"civilized",reqs:{mining:3,cement:1},not_trait:["flier"],grant:["cement",2],cost:{Knowledge:()=>3200,Iron:()=>750},effect:F("tech_rebar_effect"),action(){return!!ii($(this)[0])}},steel_rebar:{id:"tech-steel_rebar",title:F("tech_steel_rebar"),desc:F("tech_steel_rebar"),category:"cement",era:"civilized",reqs:{smelting:2,cement:2},not_trait:["flier"],grant:["cement",3],cost:{Knowledge:()=>6750,Steel:()=>750},effect:F("tech_steel_rebar_effect"),action(){return!!ii($(this)[0])}},portland_cement:{id:"tech-portland_cement",title:F("tech_portland_cement"),desc:F("tech_portland_cement"),category:"cement",era:"industrialized",reqs:{cement:3,high_tech:3},not_trait:["flier"],grant:["cement",4],cost:{Knowledge:()=>32e3},effect:F("tech_portland_cement_effect"),action(){return!!ii($(this)[0])}},screw_conveyor:{id:"tech-screw_conveyor",title:F("tech_screw_conveyor"),desc:F("tech_screw_conveyor"),category:"cement",era:"globalized",reqs:{cement:4,high_tech:4},not_trait:["flier"],grant:["cement",5],cost:{Knowledge:()=>72e3},effect:F("tech_screw_conveyor_effect"),action(){return!!ii($(this)[0])}},adamantite_screws:{id:"tech-adamantite_screws",title:F("tech_adamantite_screws"),desc:F("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:F("tech_adamantite_screws_effect",[3]),action(){return!!ii($(this)[0])}},hunter_process:{id:"tech-hunter_process",title:F("tech_hunter_process"),desc:F("tech_hunter_process"),category:"mining",era:"industrialized",reqs:{high_tech:3,smelting:2},grant:["titanium",1],cost:{Knowledge:()=>45e3,Titanium:()=>1e3},effect:F("tech_hunter_process_effect"),action(){return!!ii($(this)[0])&&(t.resource.Titanium.value=za.Titanium,!0)}},kroll_process:{id:"tech-kroll_process",title:F("tech_kroll_process"),desc:F("tech_kroll_process"),category:"mining",era:"globalized",reqs:{titanium:1,high_tech:4},grant:["titanium",2],cost:{Knowledge:()=>78e3,Titanium:()=>1e4},effect:F("tech_kroll_process_effect"),action(){return!!ii($(this)[0])}},cambridge_process:{id:"tech-cambridge_process",title:F("tech_cambridge_process"),desc:F("tech_cambridge_process"),category:"mining",era:"early_space",reqs:{titanium:2,supercollider:1},grant:["titanium",3],cost:{Knowledge:()=>135e3,Titanium:()=>17500},effect:F("tech_cambridge_process_effect"),action(){return!!ii($(this)[0])}},pynn_partical:{id:"tech-pynn_partical",title:F("tech_pynn_partical"),desc:F("tech_pynn_partical"),category:"progress",era:"early_space",path:["standard"],reqs:{supercollider:1},grant:["particles",1],cost:{Knowledge:()=>1e5},effect:F("tech_pynn_partical_effect"),action(){return!!ii($(this)[0])}},matter_compression:{id:"tech-matter_compression",title:F("tech_matter_compression"),desc:F("tech_matter_compression"),category:"storage",era:"early_space",path:["standard"],reqs:{particles:1},grant:["particles",2],cost:{Knowledge:()=>112500},effect:F("tech_matter_compression_effect"),action(){return!!ii($(this)[0])}},higgs_boson:{id:"tech-higgs_boson",title:F("tech_higgs_boson"),desc:F("tech_higgs_boson"),category:"science",era:"early_space",path:["standard"],reqs:{particles:2,supercollider:2},grant:["particles",3],cost:{Knowledge:()=>125e3},effect:F("tech_higgs_boson_effect"),action(){return!!ii($(this)[0])}},dimensional_compression:{id:"tech-dimensional_compression",title:F("tech_dimensional_compression"),desc:F("tech_dimensional_compression"),category:"storage",era:"interstellar",reqs:{particles:3,science:11,supercollider:3},grant:["particles",4],cost:{Knowledge:()=>425e3},effect:F("tech_dimensional_compression_effect"),action(){return!!ii($(this)[0])}},theology:{id:"tech-theology",title:F("tech_theology"),desc:F("tech_theology"),category:"religion",era:"civilized",reqs:{theology:1,housing:1,cement:1},grant:["theology",2],cost:{Knowledge:()=>900},effect:F("tech_theology_effect"),action(){return!!ii($(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:F("tech_fanaticism"),desc:F("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:`
                            ${F("tech_fanaticism_effect")}
                            ${F("tech_fanaticism_warning")}
                            `,action(){return!!ii($(this)[0])&&(t.tech.fanaticism=1,t.race.gods===t.race.species&&Pn("second_evolution"),gi(t.race.gods),!0)}},alt_fanaticism:{id:"tech-alt_fanaticism",title:F("tech_fanaticism"),desc:F("tech_fanaticism"),category:"religion",era:"civilized",wiki:!!t.genes.transcendence,reqs:{theology:2},grant:["fanaticism",1],gene:["transcendence"],cost:{Knowledge:()=>2500},effect:`
                            ${F("tech_fanaticism_effect")}
                            `,action(){return!!ii($(this)[0])&&(2===t.tech.theology&&(t.tech.theology=3),t.race.gods===t.race.species&&Pn("second_evolution"),gi(t.race.gods),!0)}},ancient_theology:{id:"tech-ancient_theology",title:F("tech_ancient_theology"),desc:F("tech_ancient_theology"),category:"religion",era:"early_space",reqs:{theology:3,mars:2},grant:["theology",4],condition:()=>!!t.genes.ancients,cost:{Knowledge:()=>18e4},effect:()=>F("tech_ancient_theology_effect",["none"!==t.race.old_gods?Di[t.race.old_gods.toLowerCase()].entity:Di[t.race.species].entity,"none"!==t.race.gods?Di[t.race.gods.toLowerCase()].entity:Di[t.race.species].entity]),action(){return!!ii($(this)[0])&&(t.space.ziggurat={count:0},!0)}},study:{id:"tech-study",title:F("tech_study"),desc:F("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:()=>`
                            ${F("tech_study_effect",["none"!==t.race.old_gods?Di[t.race.old_gods.toLowerCase()].entity:Di[t.race.species].entity])}
                            ${F("tech_study_warning")}
                            `,action(){return!!ii($(this)[0])&&(t.tech.ancient_study=1,!0)}},encoding:{id:"tech-encoding",title:F("tech_encoding"),desc:F("tech_encoding_desc"),category:"religion",era:"deep_space",reqs:{ancient_study:1,mars:5},grant:["ancient_study",2],cost:{Knowledge:()=>268e3},effect:()=>`
                            ${F("tech_encoding_effect")}
                            `,action(){return!!ii($(this)[0])}},deify:{id:"tech-deify",title:F("tech_deify"),desc:F("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:()=>`
                            ${F("tech_deify_effect",["none"!==t.race.old_gods?Di[t.race.old_gods.toLowerCase()].entity:Di[t.race.species].entity])}
                            ${F("tech_deify_warning")}
                            `,action(){return!!ii($(this)[0])&&(t.tech.ancient_deify=1,gi(t.race.old_gods),qe("Genetics"),!0)}},infusion:{id:"tech-infusion",title:F("tech_infusion"),desc:F("tech_infusion_desc"),category:"religion",era:"deep_space",reqs:{ancient_deify:1,mars:5},grant:["ancient_deify",2],cost:{Knowledge:()=>268e3},effect:()=>`
                            ${F("tech_infusion_effect")}
                            `,action(){return!!ii($(this)[0])}},indoctrination:{id:"tech-indoctrination",title:F("tech_indoctrination"),desc:F("tech_indoctrination"),category:"religion",era:"civilized",reqs:{fanaticism:1},grant:["fanaticism",2],cost:{Knowledge:()=>5e3},effect:F("tech_indoctrination_effect"),action(){return!!ii($(this)[0])},post(){t.race.terrifying&&(t.tech.fanaticism=3,Jr())}},missionary:{id:"tech-missionary",title:F("tech_missionary"),desc:F("tech_missionary"),category:"religion",era:"discovery",reqs:{fanaticism:2},not_trait:["terrifying"],grant:["fanaticism",3],cost:{Knowledge:()=>1e4},effect:F("tech_missionary_effect"),action(){return!!ii($(this)[0])}},zealotry:{id:"tech-zealotry",title:F("tech_zealotry"),desc:F("tech_zealotry"),category:"religion",era:"discovery",reqs:{fanaticism:3},grant:["fanaticism",4],cost:{Knowledge:()=>25e3},effect:F("tech_zealotry_effect"),action(){return!!ii($(this)[0])}},anthropology:{id:"tech-anthropology",title:F("tech_anthropology"),desc:F("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:`
                            ${F("tech_anthropology_effect")}
                            ${F("tech_anthropology_warning")}
                            `,action(){return!!ii($(this)[0])&&(t.tech.anthropology=1,!0)}},alt_anthropology:{id:"tech-alt_anthropology",title:F("tech_anthropology"),desc:F("tech_anthropology"),category:"religion",era:"civilized",wiki:!!t.genes.transcendence,reqs:{theology:2},grant:["anthropology",1],gene:["transcendence"],cost:{Knowledge:()=>2500},effect:`
                            ${F("tech_anthropology_effect")}
                            `,action(){return!!ii($(this)[0])&&(2===t.tech.theology&&(t.tech.theology=3),!0)}},mythology:{id:"tech-mythology",title:F("tech_mythology"),desc:F("tech_mythology"),category:"religion",era:"civilized",reqs:{anthropology:1},grant:["anthropology",2],cost:{Knowledge:()=>5e3},effect:F("tech_mythology_effect"),action(){return!!ii($(this)[0])}},archaeology:{id:"tech-archaeology",title:F("tech_archaeology"),desc:F("tech_archaeology"),category:"science",era:"discovery",reqs:{anthropology:2},grant:["anthropology",3],cost:{Knowledge:()=>1e4},effect:F("tech_archaeology_effect"),action(){return!!ii($(this)[0])}},merchandising:{id:"tech-merchandising",title:F("tech_merchandising"),desc:F("tech_merchandising"),category:"banking",era:"discovery",reqs:{anthropology:3},grant:["anthropology",4],cost:{Knowledge:()=>25e3},effect:()=>t.race.truepath?F("tech_merchandising_effect_tp"):F("tech_merchandising_effect"),action(){return!!ii($(this)[0])}},astrophysics:{id:"tech-astrophysics",title:F("tech_astrophysics"),desc:F("tech_astrophysics_desc"),category:"storage",era:"early_space",reqs:{space:2},grant:["space_explore",1],cost:{Knowledge:()=>125e3},effect:F("tech_astrophysics_effect"),action(){return!!ii($(this)[0])&&(t.space.propellant_depot={count:0},!0)}},rover:{id:"tech-rover",title:F("tech_rover"),desc:F("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:F("tech_rover_effect"),action(){return!!ii($(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:F("tech_probes"),desc:F("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:F("tech_probes_effect"),action(){return!!ii($(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:F("tech_starcharts"),desc:F("tech_starcharts"),category:"space_exploration",era:"early_space",reqs:{space_explore:3,science:9},grant:["space_explore",4],cost:{Knowledge:()=>185e3},effect:F("tech_starcharts_effect"),action(){return!!ii($(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:F("tech_colonization"),desc:()=>F("tech_colonization_desc",[Vt().red]),category:"agriculture",era:"early_space",reqs:{space:4,mars:1},grant:["mars",2],cost:{Knowledge:()=>172e3},effect:()=>F(t.race.artifical?"tech_colonization_artifical_effect":"tech_colonization_effect",[Vt().red]),action(){return!!ii($(this)[0])&&(t.space.biodome={count:0,on:0},!0)}},red_tower:{id:"tech-red_tower",title:()=>F("tech_red_tower",[Vt().red]),desc:()=>F("tech_red_tower",[Vt().red]),category:"space_exploration",era:"early_space",reqs:{mars:2},grant:["mars",3],cost:{Knowledge:()=>195e3},effect:()=>F("tech_red_tower_effect",[Vt().red]),action(){return!!ii($(this)[0])&&(t.space.red_tower={count:0,on:0},!0)}},space_manufacturing:{id:"tech-space_manufacturing",title:F("tech_space_manufacturing"),desc:F("tech_space_manufacturing_desc"),category:"crafting",era:"early_space",reqs:{mars:3},grant:["mars",4],cost:{Knowledge:()=>22e4},effect:()=>F("tech_space_manufacturing_effect",[Vt().red]),action(){return!!ii($(this)[0])&&(t.space.red_factory={count:0,on:0},!0)}},exotic_lab:{id:"tech-exotic_lab",title:F("tech_exotic_lab"),desc:F("tech_exotic_lab_desc"),category:"science",era:"deep_space",reqs:{mars:4,asteroid:5},grant:["mars",5],cost:{Knowledge:()=>25e4},effect:F("tech_exotic_lab_effect"),action(){return!!ii($(this)[0])&&(t.space.exotic_lab={count:0,on:0},!0)}},hydroponics:{id:"tech-hydroponics",title:F("tech_hydroponics"),desc:()=>F("tech_hydroponics"),category:"agriculture",era:"intergalactic",reqs:{mars:5,gateway:3},grant:["mars",6],cost:{Knowledge:()=>3e6,Bolognium:()=>5e5},effect:()=>F("tech_hydroponics_effect"),action(){return!!ii($(this)[0])}},dyson_sphere:{id:"tech-dyson_sphere",title:F("tech_dyson_sphere"),desc:F("tech_dyson_sphere"),category:"power_generation",era:"early_space",reqs:{solar:1},grant:["solar",2],cost:{Knowledge:()=>195e3},effect:F("tech_dyson_sphere_effect"),action(){return!!ii($(this)[0])}},dyson_swarm:{id:"tech-dyson_swarm",title:F("tech_dyson_swarm"),desc:F("tech_dyson_swarm"),category:"power_generation",era:"early_space",reqs:{solar:2},grant:["solar",3],cost:{Knowledge:()=>21e4},effect:F("tech_dyson_swarm_effect"),action(){return!!ii($(this)[0])&&(t.space.swarm_satellite={count:0},!0)}},swarm_plant:{id:"tech-swarm_plant",title:F("tech_swarm_plant"),desc:F("tech_swarm_plant"),category:"power_generation",era:"deep_space",reqs:{solar:3,hell:1,gas_moon:1},grant:["solar",4],cost:{Knowledge:()=>25e4},effect:()=>F("tech_swarm_plant_effect",[Di[t.race.species].home,Vt().hell]),action(){return!!ii($(this)[0])&&(t.space.swarm_plant={count:0},!0)}},space_sourced:{id:"tech-space_sourced",title:F("tech_space_sourced"),desc:F("tech_space_sourced_desc"),category:"power_generation",era:"deep_space",reqs:{solar:4,asteroid:3},grant:["solar",5],cost:{Knowledge:()=>3e5},effect:F("tech_space_sourced_effect"),action(){return!!ii($(this)[0])}},swarm_plant_ai:{id:"tech-swarm_plant_ai",title:F("tech_swarm_plant_ai"),desc:F("tech_swarm_plant_ai"),category:"power_generation",era:"deep_space",reqs:{solar:4,high_tech:10},grant:["swarm",1],cost:{Knowledge:()=>335e3},effect:F("tech_swarm_plant_ai_effect"),action(){return!!ii($(this)[0])}},swarm_control_ai:{id:"tech-swarm_control_ai",title:F("tech_swarm_control_ai"),desc:F("tech_swarm_control_ai"),category:"power_generation",era:"deep_space",reqs:{swarm:1},grant:["swarm",2],cost:{Knowledge:()=>36e4},effect:F("tech_swarm_control_ai_effect"),action(){return!!ii($(this)[0])}},quantum_swarm:{id:"tech-quantum_swarm",title:F("tech_quantum_swarm"),desc:F("tech_quantum_swarm"),category:"power_generation",era:"deep_space",reqs:{swarm:2,high_tech:11},grant:["swarm",3],cost:{Knowledge:()=>45e4},effect:F("tech_quantum_swarm_effect"),action(){return!!ii($(this)[0])}},perovskite_cell:{id:"tech-perovskite_cell",title:F("tech_perovskite_cell"),desc:F("tech_perovskite_cell"),category:"power_generation",era:"interstellar",reqs:{swarm:3},grant:["swarm",4],path:["standard","truepath"],cost:{Knowledge:()=>525e3,Titanium:()=>1e5},effect:F("tech_perovskite_cell_effect"),action(){return!!ii($(this)[0])}},swarm_convection:{id:"tech-swarm_convection",title:F("tech_swarm_convection"),desc:F("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:F("tech_swarm_convection_effect"),action(){return!!ii($(this)[0])}},orichalcum_panels:{id:"tech-orichalcum_panels",title:F("tech_orichalcum_panels"),desc:F("tech_orichalcum_panels"),category:"power_generation",era:"intergalactic",reqs:{high_tech:17,swarm:5},grant:["swarm",6],cost:{Knowledge:()=>14e6,Orichalcum:()=>125e3},effect:()=>F("tech_orichalcum_panels_effect"),action(){return!!ii($(this)[0])}},dyson_net:{id:"tech-dyson_net",title:F("tech_dyson_net"),desc:F("tech_dyson_net"),category:"power_generation",era:"interstellar",reqs:{solar:3,proxima:2,stanene:1},grant:["proxima",3],cost:{Knowledge:()=>8e5},effect:F("tech_dyson_net_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.dyson={count:0},!0)}},dyson_sphere2:{id:"tech-dyson_sphere2",title:F("tech_dyson_sphere"),desc:F("tech_dyson_sphere"),category:"power_generation",era:"intergalactic",reqs:{proxima:3,piracy:1},grant:["dyson",1],cost:{Knowledge:()=>5e6},effect:F("tech_dyson_sphere2_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.dyson_sphere={count:0},!0)}},orichalcum_sphere:{id:"tech-orichalcum_sphere",title:F("tech_orichalcum_sphere"),desc:F("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:F("tech_orichalcum_sphere_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.orichalcum_sphere={count:0},!0)}},gps:{id:"tech-gps",title:F("tech_gps"),desc:F("tech_gps"),category:"market",era:"early_space",reqs:{space_explore:1},not_trait:["terrifying"],grant:["satellite",1],cost:{Knowledge:()=>15e4},effect:F("tech_gps_effect"),action(){return!!ii($(this)[0])&&(t.space.gps={count:0},!0)}},nav_beacon:{id:"tech-nav_beacon",title:F("tech_nav_beacon"),desc:F("tech_nav_beacon"),category:"space_exploration",era:"early_space",reqs:{luna:1},grant:["luna",2],cost:{Knowledge:()=>18e4},effect:F("tech_nav_beacon_effect"),action(){return!!ii($(this)[0])&&(t.space.nav_beacon={count:0,on:0},!0)}},subspace_signal:{id:"tech-subspace_signal",title:F("tech_subspace_signal"),desc:F("tech_subspace_signal"),category:"space_exploration",era:"interstellar",reqs:{science:13,luna:2,stanene:1},grant:["luna",3],cost:{Knowledge:()=>7e5,Stanene:()=>125e3},effect:()=>F("tech_subspace_signal_effect",[Vt().red]),action(){return!!ii($(this)[0])}},atmospheric_mining:{id:"tech-atmospheric_mining",title:F("tech_atmospheric_mining"),desc:F("tech_atmospheric_mining"),category:"power_generation",era:"early_space",reqs:{space:5},grant:["gas_giant",1],cost:{Knowledge:()=>19e4},effect:F("tech_atmospheric_mining_effect"),action(){return!!ii($(this)[0])&&(t.space.gas_mining={count:0,on:0},t.space.gas_storage={count:0},!0)}},helium_attractor:{id:"tech-helium_attractor",title:F("tech_helium_attractor"),desc:F("tech_helium_attractor"),category:"power_generation",era:"deep_space",reqs:{gas_giant:1,elerium:1},grant:["helium",1],cost:{Knowledge:()=>29e4,Elerium:()=>250},effect:()=>F("tech_helium_attractor_effect",[Vt().gas]),action(){return!!ii($(this)[0])}},ram_scoops:{id:"tech-ram_scoops",title:F("tech_ram_scoops"),desc:F("tech_ram_scoops"),category:"power_generation",era:"interstellar",reqs:{nebula:2},grant:["ram_scoop",1],cost:{Knowledge:()=>58e4},effect:()=>F("tech_ram_scoops_effect"),action(){return!!ii($(this)[0])}},elerium_prospecting:{id:"tech-elerium_prospecting",title:F("tech_elerium_prospecting"),desc:F("tech_elerium_prospecting"),category:"space_mining",era:"interstellar",reqs:{nebula:2},grant:["nebula",3],cost:{Knowledge:()=>61e4},effect:()=>F("tech_elerium_prospecting_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.elerium_prospector={count:0,on:0},!0)}},zero_g_mining:{id:"tech-zero_g_mining",title:F("tech_zero_g_mining"),desc:F("tech_zero_g_mining"),category:"space_mining",era:"early_space",reqs:{asteroid:1,high_tech:8},grant:["asteroid",2],cost:{Knowledge:()=>21e4},effect:F("tech_zero_g_mining_effect"),action(){return!!ii($(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:F("tech_elerium_mining"),desc:F("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:F("tech_elerium_mining_effect"),action(){return!!ii($(this)[0])&&(t.space.elerium_ship={count:0,on:0},t.race.cataclysm&&Pn("iron_will",!1,2),!0)}},laser_mining:{id:"tech-laser_mining",title:F("tech_laser_mining"),desc:F("tech_laser_mining"),category:"space_mining",era:"deep_space",reqs:{asteroid:5,elerium:1,high_tech:9},grant:["asteroid",6],cost:{Knowledge:()=>35e4},effect:F("tech_laser_mining_effect"),action(){return!!ii($(this)[0])}},plasma_mining:{id:"tech-plasma_mining",title:F("tech_plasma_mining"),desc:F("tech_plasma_mining"),category:"space_mining",era:"interstellar",reqs:{asteroid:6,high_tech:13},grant:["asteroid",7],path:["standard","truepath"],cost:{Knowledge:()=>825e3},effect:F("tech_plasma_mining_effect"),action(){return!!ii($(this)[0])}},elerium_tech:{id:"tech-elerium_tech",title:F("tech_elerium_tech"),desc:F("tech_elerium_tech"),category:"space_mining",era:"deep_space",reqs:{asteroid:5},grant:["elerium",1],cost:{Knowledge:()=>275e3,Elerium:()=>20},effect:F("tech_elerium_tech_effect"),action(){return!!ii($(this)[0])}},elerium_reactor:{id:"tech-elerium_reactor",title:F("tech_elerium_reactor"),desc:F("tech_elerium_reactor"),category:"power_generation",era:"deep_space",reqs:{dwarf:1,elerium:1},grant:["elerium",2],cost:{Knowledge:()=>325e3,Elerium:()=>180},effect:F("tech_elerium_reactor_effect"),action(){return!!ii($(this)[0])&&(t.space.e_reactor={count:0,on:0},!0)}},neutronium_housing:{id:"tech-neutronium_housing",title:F("tech_neutronium_housing"),desc:F("tech_neutronium_housing"),category:"housing",era:"deep_space",reqs:{gas_moon:1},grant:["space_housing",1],cost:{Knowledge:()=>275e3,Neutronium:()=>350},effect:()=>F("tech_neutronium_housing_effect",[Vt().red]),action(){return!!ii($(this)[0])}},unification:{id:"tech-unification",title:F("tech_unification"),desc:()=>F("tech_unification_desc",[Di[t.race.species].home]),category:"special",era:"early_space",path:["standard"],reqs:{mars:2},grant:["unify",1],cost:{Knowledge:()=>2e5},effect:F("tech_unification_effect"),action(){return!!ii($(this)[0])}},unification2:{id:"tech-unification2",title:F("tech_unification"),desc:()=>F("tech_unification_desc",[Di[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?`
                            ${F("tech_unification_banana")}
                            `:"";return`
                            ${F("tech_unification_effect2")}
                            ${F("tech_unification_warning")}
                            ${e}`},action(){return!!ii($(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&&Pn("world_domination"),t.civic.foreign.gov0.anx&&t.civic.foreign.gov1.anx&&t.civic.foreign.gov2.anx&&Pn("illuminati"),t.civic.foreign.gov0.buy&&t.civic.foreign.gov1.buy&&t.civic.foreign.gov2.buy&&Pn("syndicate"),0===t.stats.attacks&&Pn("pacifist"),Pr(),!0)}},unite:{id:"tech-unite",title:F("tech_unite"),desc:()=>F("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:()=>`
                            ${F("tech_unite_effect")}
                            ${F("tech_unification_effect2")}
                            `,action(){return!!ii($(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&&Pn("world_domination"),t.civic.foreign.gov0.anx&&t.civic.foreign.gov1.anx&&t.civic.foreign.gov2.anx&&Pn("illuminati"),t.civic.foreign.gov0.buy&&t.civic.foreign.gov1.buy&&t.civic.foreign.gov2.buy&&Pn("syndicate"),0===t.stats.attacks&&Pn("pacifist"),Pr(),t.race.truepath&&!t.tech.rival&&(t.tech.rival=1,ms(F("civics_rival_unlocked",[X(3)]),"info",!1,["progress","combat"])),!0)}},genesis:{id:"tech-genesis",title:F("tech_genesis"),desc:F("tech_genesis"),category:"special",era:"deep_space",reqs:{high_tech:10,genesis:1},grant:["genesis",2],cost:{Knowledge:()=>35e4},effect:F("tech_genesis_effect"),action(){return!!ii($(this)[0])}},star_dock:{id:"tech-star_dock",title:F("tech_star_dock"),desc:F("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:F("tech_star_dock_effect"),action(){return!!ii($(this)[0])&&(t.space.star_dock={count:0,ship:0,probe:0,template:t.race.species},!0)}},interstellar:{id:"tech-interstellar",title:F("tech_interstellar"),desc:F("tech_interstellar"),category:"space_exploration",era:"deep_space",reqs:{genesis:3},grant:["genesis",4],cost:{Knowledge:()=>4e5},effect:F("tech_interstellar_effect"),action(){return!!ii($(this)[0])&&(t.starDock.probes={count:0},!0)}},genesis_ship:{id:"tech-genesis_ship",title:()=>t.race.cataclysm?F("tech_generational_ship"):F("tech_genesis_ship"),desc:()=>t.race.cataclysm?F("tech_generational_ship"):F("tech_genesis_ship"),category:"special",era:"deep_space",reqs:{genesis:4},grant:["genesis",5],cost:{Knowledge:()=>425e3},effect:()=>t.race.cataclysm?F("tech_generational_effect"):F("tech_genesis_ship_effect"),action(){return!!ii($(this)[0])&&(t.starDock.seeder={count:0},t.race.cataclysm&&Pn("iron_will",!1,4),!0)}},geck:{id:"tech-geck",title:()=>F("tech_geck"),desc:()=>F("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:()=>F("tech_geck_effect"),action(){return!!ii($(this)[0])&&(t.starDock.geck={count:0},!0)}},genetic_decay:{id:"tech-genetic_decay",title:F("tech_genetic_decay"),desc:F("tech_genetic_decay"),category:"genes",era:"early_space",reqs:{decay:1},grant:["decay",2],cost:{Knowledge:()=>2e5},effect:F("tech_genetic_decay_effect"),action(){return!!ii($(this)[0])}},stabilize_decay:{id:"tech-stabilize_decay",title:F("tech_stabilize_decay"),desc:F("tech_stabilize_decay"),category:"genes",era:"dimensional",reqs:{decay:2,high_tech:18},grant:["decay",3],cost:{Knowledge:()=>5e7,Blood_Stone:()=>1},effect:F("tech_stabilize_decay_effect"),action(){return!!ii($(this)[0])}},tachyon:{id:"tech-tachyon",title:F("tech_tachyon"),desc:F("tech_tachyon"),category:"progress",era:"interstellar",reqs:{wsc:1},grant:["ftl",1],cost:{Knowledge:()=>435e3},effect:F("tech_tachyon_effect"),action(){return!!ii($(this)[0])}},warp_drive:{id:"tech-warp_drive",title:F("tech_warp_drive"),desc:F("tech_warp_drive"),category:"space_exploration",era:"interstellar",reqs:{ftl:1},grant:["ftl",2],cost:{Knowledge:()=>45e4},effect:F("tech_warp_drive_effect"),action(){return!!ii($(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:F("tech_habitat"),desc:F("tech_habitat_desc"),category:"housing",era:"interstellar",reqs:{alpha:2,droids:1},grant:["alpha",3],cost:{Knowledge:()=>48e4},effect:F("tech_habitat_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.habitat={count:0,on:0},!0)}},graphene:{id:"tech-graphene",title:F("tech_graphene"),desc:F("tech_graphene"),category:"crafting",era:"interstellar",reqs:{alpha:3,infernite:1},grant:["graphene",1],cost:{Knowledge:()=>54e4,Adamantite:()=>1e4},effect:F("tech_graphene_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.g_factory={count:0,on:0,Lumber:0,Coal:0,Oil:0},!0)}},aerogel:{id:"tech-aerogel",title:F("tech_aerogel"),desc:F("tech_aerogel"),category:"crafting",era:"interstellar",reqs:{graphene:1,science:13},grant:["aerogel",1],cost:{Knowledge:()=>75e4,Graphene:()=>5e4,Infernite:()=>500},effect:F("tech_aerogel_effect"),action(){return!!ii($(this)[0])&&(t.resource.Aerogel.display=!0,na(),!0)},post(){os()}},mega_manufacturing:{id:"tech-mega_manufacturing",title:F("tech_mega_manufacturing"),desc:F("tech_mega_manufacturing"),category:"crafting",era:"intergalactic",reqs:{high_tech:16,alpha:3},grant:["alpha",4],cost:{Knowledge:()=>565e4},effect:()=>F("tech_mega_manufacturing_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.int_factory={count:0,on:0},!0)}},luxury_condo:{id:"tech-luxury_condo",title:F("tech_luxury_condo"),desc:F("tech_luxury_condo"),category:"housing",era:"intergalactic",reqs:{high_tech:17,alpha:4},grant:["alpha",5],cost:{Knowledge:()=>15e6},effect:()=>F("tech_luxury_condo_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.luxury_condo={count:0,on:0},!0)}},stellar_engine:{id:"tech-stellar_engine",title:F("tech_stellar_engine"),desc:F("tech_stellar_engine"),category:"stellar_engine",era:"interstellar",reqs:{blackhole:2},grant:["blackhole",3],cost:{Knowledge:()=>1e6},effect:F("tech_stellar_engine_effect"),action(){return!!ii($(this)[0])&&(t.interstellar.stellar_engine={count:0,mass:8,exotic:0},!0)}},mass_ejector:{id:"tech-mass_ejector",title:F("tech_mass_ejector"),desc:F("tech_mass_ejector"),category:"stellar_engine",era:"interstellar",reqs:{blackhole:4},grant:["blackhole",5],cost:{Knowledge:()=>11e5},effect:F("tech_mass_ejector_effect"),action(){return!!ii($(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:F("tech_asteroid_redirect"),desc:F("tech_asteroid_redirect"),category:"stellar_engine",era:"intergalactic",reqs:{blackhole:5,gateway:3},grant:["blackhole",6],cost:{Knowledge:()=>35e5},effect:F("tech_asteroid_redirect_effect"),action(){return!!ii($(this)[0])},post(){qe("Physics")}},exotic_infusion:{id:"tech-exotic_infusion",title:F("tech_exotic_infusion"),desc:F("tech_exotic_infusion"),category:"stellar_engine",era:"interstellar",reqs:{whitehole:1},grant:["whitehole",2],cost:{Knowledge:()=>15e5,Soul_Gem:()=>10},effect:()=>`
                            ${F("tech_exotic_infusion_effect",[t.resource.Soul_Gem.name])}
                            ${F("tech_exotic_infusion_effect2")}
                            `,action(){return!!si($(this)[0])},flair:()=>F("tech_exotic_infusion_flair")},infusion_check:{id:"tech-infusion_check",title:F("tech_infusion_check"),desc:F("tech_infusion_check"),category:"stellar_engine",era:"interstellar",reqs:{whitehole:2},grant:["whitehole",3],cost:{Knowledge:()=>15e5,Soul_Gem:()=>10},effect:()=>`
                            ${F("tech_infusion_check_effect")}
                            ${F("tech_exotic_infusion_effect2")}
                            `,action(){return!!si($(this)[0])},flair:()=>F("tech_infusion_check_flair")},infusion_confirm:{id:"tech-infusion_confirm",title:F("tech_infusion_confirm"),desc:F("tech_infusion_confirm"),category:"stellar_engine",era:"interstellar",reqs:{whitehole:3},grant:["whitehole",4],cost:{Knowledge:()=>15e5,Soul_Gem:()=>10},effect(){let e=Ns("bigbang"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name"),r=`
                            ${F("wiki_tech_infusion_confirm_gains",[e.plasmid,e.phage,e.dark,a])}
                            `;return`
                            ${F("tech_infusion_confirm_effect")}
                            ${F("tech_exotic_infusion_effect2")}
                            ${r}`},action(){if(ii($(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))),M(),$s("reset",{end:"blackhole"}),Pn(`extinct_${t.race.species}`),t.race.universe){case"heavy":Pn("heavy");break;case"antimatter":Pn("canceled");break;case"evil":Pn("eviltwin");break;case"micro":Pn("microbang",!0);break;case"standard":Pn("whitehole")}t.space.hasOwnProperty("spaceport")&&0===t.space.spaceport.count&&Pn("red_dead"),Pn("squished",!0),"evil"===t.race.universe&&"angelic"===Di[t.race.species].type&&jn("nephilim"),t.race.junker&&"junker"===t.race.species&&jn("the_misery"),t.race.decay&&Pn("dissipated"),t.race.steelen&&jn("steelem");let a=t.race.species,r=t.race.gods,i=t.city.calendar.orbit,s=t.city.biome,n=t.city.ptrait,c=Ns("bigbang");Cn(),t.stats.blackhole++,sn(),t.prestige.Phage.count+=c.phage,t.stats.phage+=c.phage,"antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=c.plasmid,t.stats.antiplasmid+=c.plasmid):(t.prestige.Plasmid.count+=c.plasmid,t.stats.plasmid+=c.plasmid),t.prestige.Dark.count=+(t.prestige.Dark.count+c.dark).toFixed(3),t.stats.dark=+(t.stats.dark+c.dark).toFixed(3),t.stats.universes++;let o=!!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),o&&(t.race.srace=o),U({orbit:i,biome:s,ptrait:n,geology:!1}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}()}),4e3),!1}return!1},flair:()=>F("tech_infusion_confirm_flair")},stabilize_blackhole:{id:"tech-stabilize_blackhole",title:F("tech_stabilize_blackhole"),desc:()=>`
                            ${F("tech_stabilize_blackhole")}
                            ${F("tech_stabilize_blackhole2")}
                            `,category:"stellar_engine",era:"interstellar",reqs:{whitehole:1},grant:["stablized",1],cost:{Knowledge:()=>15e5,Neutronium:()=>2e4},effect:F("tech_stabilize_blackhole_effect"),action(){if(ii($(this)[0])){if(t.interstellar.stellar_engine.mass+=2e4*Aa.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=qn();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:F("tech_veil"),desc:F("tech_veil"),category:"magic",era:"interstellar",reqs:{blackhole:2},condition:()=>"magic"===t.race.universe,grant:["veil",1],cost:{Knowledge:()=>125e4},effect:F("tech_veil_effect"),action(){return!!ii($(this)[0])}},mana_syphon:{id:"tech-mana_syphon",title:F("tech_mana_syphon"),desc:F("tech_mana_syphon"),category:"magic",era:"interstellar",reqs:{veil:1},condition:()=>"magic"===t.race.universe,grant:["veil",2],cost:{Knowledge:()=>15e5},effect:F("tech_mana_syphon_effect"),action(){return!!ii($(this)[0])},post(){qe("Physics")}},gravitational_waves:{id:"tech-gravitational_waves",title:F("tech_gravitational_waves"),desc:F("tech_gravitational_waves"),category:"power_generation",era:"interstellar",reqs:{blackhole:4},grant:["gravity",1],cost:{Knowledge:()=>125e4},effect:F("tech_gravitational_waves_effect"),action(){return!!ii($(this)[0])}},gravity_convection:{id:"tech-gravity_convection",title:F("tech_gravity_convection"),desc:F("tech_gravity_convection"),category:"power_generation",era:"interstellar",reqs:{gravity:1},grant:["gravity",2],cost:{Knowledge:()=>135e4},effect:F("tech_gravity_convection_effect"),action(){return!!ii($(this)[0])}},wormholes:{id:"tech-wormholes",title:F("tech_wormholes"),desc:F("tech_wormholes"),category:"space_exploration",era:"intergalactic",reqs:{gravity:1,science:15},grant:["stargate",1],cost:{Knowledge:()=>225e4},effect:F("tech_wormholes_effect"),action(){return!!ii($(this)[0])}},portal:{id:"tech-portal",title:F("tech_portal"),desc:F("tech_portal_desc"),category:"hell_dimension",era:"interstellar",reqs:{wsc:1},grant:["portal",1],cost:{Knowledge:()=>5e5},effect:F("tech_portal_effect"),action(){return!!ii($(this)[0])}},fortifications:{id:"tech-fortifications",title:F("tech_fort"),desc:F("tech_fort_desc"),category:"hell_dimension",era:"interstellar",reqs:{portal:1},grant:["portal",2],cost:{Knowledge:()=>55e4,Stone:()=>1e6},effect:F("tech_fort_effect"),action(){return!!ii($(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"===Di[t.race.species].type?Pn("blood_war"):Pn("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(){ja()}},war_drones:{id:"tech-war_drones",title:F("tech_war_drones"),desc:F("tech_war_drones"),category:"hell_dimension",era:"interstellar",reqs:{portal:2,graphene:1},grant:["portal",3],cost:{Knowledge:()=>7e5},effect:F("tech_war_drones_effect"),action(){return!!ii($(this)[0])&&(t.settings.portal.badlands=!0,t.portal.war_drone={count:0,on:0},!0)}},demon_attractor:{id:"tech-demon_attractor",title:F("tech_demon_attractor"),desc:F("tech_demon_attractor"),category:"hell_dimension",era:"interstellar",reqs:{portal:3,stanene:1},grant:["portal",4],cost:{Knowledge:()=>745e3},effect:F("tech_demon_attractor_effect"),action(){return!!ii($(this)[0])&&(t.portal.attractor={count:0,on:0},!0)}},combat_droids:{id:"tech-combat_droids",title:F("tech_combat_droids"),desc:F("tech_combat_droids"),category:"hell_dimension",era:"interstellar",reqs:{portal:4},grant:["portal",5],cost:{Knowledge:()=>762e3,Soul_Gem:()=>1},effect:F("tech_combat_droids_effect"),action(){return!!ii($(this)[0])&&(t.portal.war_droid={count:0,on:0},!0)},flair:()=>F("tech_combat_droids_flair")},repair_droids:{id:"tech-repair_droids",title:F("tech_repair_droids"),desc:F("tech_repair_droids"),category:"hell_dimension",era:"interstellar",reqs:{portal:5},grant:["portal",6],cost:{Knowledge:()=>794e3,Soul_Gem:()=>1},effect:F("tech_repair_droids_effect"),action(){return!!ii($(this)[0])&&(t.portal.repair_droid={count:0,on:0},!0)}},advanced_predators:{id:"tech-advanced_predators",title:F("tech_advanced_predators"),desc:F("tech_advanced_predators"),category:"hell_dimension",era:"intergalactic",reqs:{portal:6,xeno:4},grant:["portal",7],cost:{Knowledge:()=>5e6,Bolognium:()=>5e5,Vitreloy:()=>25e4},effect:F("tech_advanced_predators_effect"),action(){return!!ii($(this)[0])}},enhanced_droids:{id:"tech-enhanced_droids",title:F("tech_enhanced_droids"),desc:F("tech_enhanced_droids"),category:"hell_dimension",era:"interstellar",reqs:{portal:5,military:9},grant:["hdroid",1],cost:{Knowledge:()=>105e4},effect:F("tech_enhanced_droids_effect"),action(){return!!ii($(this)[0])}},sensor_drone:{id:"tech-sensor_drone",title:F("tech_sensor_drone"),desc:F("tech_sensor_drone"),category:"hell_dimension",era:"interstellar",reqs:{portal:3,infernite:1,stanene:1,graphene:1},grant:["infernite",2],cost:{Knowledge:()=>725e3},effect:F("tech_sensor_drone_effect"),action(){return!!ii($(this)[0])&&(t.portal.sensor_drone={count:0,on:0},!0)}},map_terrain:{id:"tech-map_terrain",title:F("tech_map_terrain"),desc:F("tech_map_terrain"),category:"hell_dimension",era:"interstellar",reqs:{infernite:2},grant:["infernite",3],cost:{Knowledge:()=>948e3},effect:()=>F("tech_map_terrain_effect"),action(){return!!ii($(this)[0])}},calibrated_sensors:{id:"tech-calibrated_sensors",title:F("tech_calibrated_sensors"),desc:F("tech_calibrated_sensors"),category:"hell_dimension",era:"interstellar",reqs:{infernite:3},grant:["infernite",4],cost:{Knowledge:()=>1125e3,Infernite:()=>3500},effect:()=>F("tech_calibrated_sensors_effect"),action(){return!!ii($(this)[0])}},shield_generator:{id:"tech-shield_generator",title:F("tech_shield_generator"),desc:F("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:()=>F("tech_shield_generator_effect"),action(){return!!ii($(this)[0])}},enhanced_sensors:{id:"tech-enhanced_sensors",title:F("tech_enhanced_sensors"),desc:F("tech_enhanced_sensors"),category:"hell_dimension",era:"intergalactic",reqs:{infernite:5,xeno:4},grant:["infernite",6],cost:{Knowledge:()=>475e4,Vitreloy:()=>25e3},effect:()=>F("tech_enhanced_sensors_effect"),action(){return!!ii($(this)[0])}},xeno_linguistics:{id:"tech-xeno_linguistics",title:F("tech_xeno_linguistics"),desc:F("tech_xeno_linguistics"),category:"andromeda",era:"intergalactic",reqs:{xeno:1},grant:["xeno",2],cost:{Knowledge:()=>3e6},effect:()=>F("tech_xeno_linguistics_effect"),action(){return!!ii($(this)[0])&&(t.settings.space.gorddon=!0,!0)}},xeno_culture:{id:"tech-xeno_culture",title:F("tech_xeno_culture"),desc:F("tech_xeno_culture"),category:"progress",era:"intergalactic",reqs:{xeno:3},grant:["xeno",4],cost:{Knowledge:()=>34e5},effect:()=>F("tech_xeno_culture_effect",[Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name,Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].entity]),action(){return!!ii($(this)[0])&&(t.galaxy.embassy={count:0,on:0},!0)}},cultural_exchange:{id:"tech-cultural_exchange",title:F("tech_cultural_exchange"),desc:F("tech_cultural_exchange"),category:"andromeda",era:"intergalactic",reqs:{xeno:5},grant:["xeno",6],cost:{Knowledge:()=>355e4},effect:()=>F("tech_cultural_exchange_effect",[Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),action(){return!!ii($(this)[0])&&(t.galaxy.symposium={count:0,on:0},t.galaxy.dormitory={count:0,on:0},!0)}},shore_leave:{id:"tech-shore_leave",title:F("tech_shore_leave"),desc:F("tech_shore_leave"),category:"science",era:"intergalactic",reqs:{andromeda:3,xeno:6},grant:["xeno",7],cost:{Knowledge:()=>46e5},effect:()=>F("tech_shore_leave_effect"),action(){return!!ii($(this)[0])}},xeno_gift:{id:"tech-xeno_gift",title:F("tech_xeno_gift"),desc:F("tech_xeno_gift"),category:"andromeda",era:"intergalactic",reqs:{high_tech:16,xeno:7},grant:["xeno",8],cost:{Knowledge:()=>65e5,Infernite:()=>125e3},effect:()=>F("tech_xeno_gift_effect"),action(){return!!ii($(this)[0])&&(t.galaxy.consulate={count:0},t.settings.space.alien1=!0,ms(F("tech_xeno_gift_msg",[Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),"info",!1,["progress"]),!0)}},industrial_partnership:{id:"tech-industrial_partnership",title:F("tech_industrial_partnership"),desc:()=>F("tech_industrial_partnership"),category:"andromeda",era:"intergalactic",reqs:{xeno:9},grant:["xeno",10],cost:{Knowledge:()=>725e4},effect:()=>F("tech_industrial_partnership_effect",[Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),action(){return!!ii($(this)[0])&&(t.galaxy.vitreloy_plant={count:0,on:0},!0)}},embassy_housing:{id:"tech-embassy_housing",title:F("tech_embassy_housing"),desc:()=>F("tech_embassy_housing"),category:"andromeda",era:"intergalactic",reqs:{xeno:10,science:18},grant:["xeno",11],cost:{Knowledge:()=>1075e4},effect:()=>F("tech_embassy_housing_effect",[Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].name]),action(){return!!ii($(this)[0])}},advanced_telemetry:{id:"tech-advanced_telemetry",title:F("tech_advanced_telemetry"),desc:F("tech_advanced_telemetry"),category:"science",era:"intergalactic",reqs:{xeno:5},grant:["telemetry",1],cost:{Knowledge:()=>42e5,Vitreloy:()=>1e4},effect:()=>F("tech_advanced_telemetry_effect"),action(){return!!ii($(this)[0])}},defense_platform:{id:"tech-defense_platform",title:F("galaxy_defense_platform"),desc:F("galaxy_defense_platform"),category:"andromeda",era:"intergalactic",reqs:{stargate:5,piracy:1},grant:["stargate",6],cost:{Knowledge:()=>485e4},effect:F("tech_defense_platform_effect"),action(){return!!ii($(this)[0])&&(t.galaxy.defense_platform={count:0,on:0},!0)}},scout_ship:{id:"tech-scout_ship",title:F("galaxy_scout_ship"),desc:F("galaxy_scout_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{gateway:3},grant:["andromeda",1],cost:{Knowledge:()=>26e5},effect:()=>F("tech_scout_ship_effect"),action(){return!!ii($(this)[0])&&(t.galaxy.scout_ship={count:0,on:0,crew:0,mil:0},!0)}},corvette_ship:{id:"tech-corvette_ship",title:F("galaxy_corvette_ship"),desc:F("galaxy_corvette_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:1,xeno:1},grant:["andromeda",2],cost:{Knowledge:()=>32e5},effect:()=>F("tech_corvette_ship_effect"),action(){return!!ii($(this)[0])&&(t.galaxy.corvette_ship={count:0,on:0,crew:0,mil:0},!0)}},frigate_ship:{id:"tech-frigate_ship",title:F("galaxy_frigate_ship"),desc:F("galaxy_frigate_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:2,xeno:6},grant:["andromeda",3],cost:{Knowledge:()=>4e6},effect:()=>F("tech_frigate_ship_effect"),action(){return!!ii($(this)[0])&&(t.galaxy.frigate_ship={count:0,on:0,crew:0,mil:0},Et(),!0)}},cruiser_ship:{id:"tech-cruiser_ship",title:F("galaxy_cruiser_ship"),desc:F("galaxy_cruiser_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:3,xeno:10},grant:["andromeda",4],cost:{Knowledge:()=>75e5},effect:()=>F("tech_cruiser_ship_effect",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name]),action(){return!!ii($(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,Et(),!0)}},dreadnought:{id:"tech-dreadnought",title:F("galaxy_dreadnought"),desc:F("galaxy_dreadnought"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:4,science:18},grant:["andromeda",5],cost:{Knowledge:()=>1e7},effect:()=>F("tech_dreadnought_effect"),action(){return!!ii($(this)[0])&&(t.galaxy.dreadnought={count:0,on:0,crew:0,mil:0},Et(),!0)}},ship_dock:{id:"tech-ship_dock",title:F("galaxy_ship_dock"),desc:F("galaxy_ship_dock"),category:"andromeda_ships",era:"intergalactic",reqs:{gateway:3,xeno:6},grant:["gateway",4],cost:{Knowledge:()=>39e5},effect:()=>F("tech_ship_dock_effect"),action(){return!!ii($(this)[0])&&(t.galaxy.ship_dock={count:0,on:0},!0)}},ore_processor:{id:"tech-ore_processor",title:F("galaxy_ore_processor"),desc:F("galaxy_ore_processor"),category:"space_mining",era:"intergalactic",reqs:{conflict:2},grant:["conflict",3],cost:{Knowledge:()=>75e5},effect:()=>F("tech_ore_processor_effect"),action(){return!!ii($(this)[0])&&(t.galaxy.ore_processor={count:0,on:0},!0)}},scavenger:{id:"tech-scavenger",title:F("galaxy_scavenger"),desc:F("galaxy_scavenger"),category:"science",era:"intergalactic",reqs:{conflict:3},grant:["conflict",4],cost:{Knowledge:()=>8e6},effect:()=>F("tech_scavenger_effect",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name]),action(){return!!ii($(this)[0])&&(t.galaxy.scavenger={count:0,on:0,crew:0},!0)}},coordinates:{id:"tech-coordinates",title:F("tech_coordinates"),desc:F("tech_coordinates"),category:"andromeda",era:"intergalactic",reqs:{science:18,conflict:5},grant:["chthonian",1],cost:{Knowledge:()=>1e7},effect:()=>F("tech_coordinates_effect"),action(){return!!ii($(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:F("tech_chthonian_survey"),desc:F("tech_chthonian_survey"),category:"space_mining",era:"intergalactic",reqs:{chthonian:2},grant:["chthonian",3],cost:{Knowledge:()=>118e5},effect:()=>F("tech_chthonian_survey_effect"),action(){return!!ii($(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},ms(F("tech_chthonian_survey_result"),"info",!1,["progress"]),!0)},post(){os()}},gateway_depot:{id:"tech-gateway_depot",title:F("galaxy_gateway_depot"),desc:F("galaxy_gateway_depot"),category:"storage",era:"intergalactic",reqs:{gateway:4},grant:["gateway",5],cost:{Knowledge:()=>435e4},effect:()=>F("tech_gateway_depot_effect"),action(){return!!ii($(this)[0])&&(t.galaxy.gateway_depot={count:0,on:0},!0)}},soul_forge:{id:"tech-soul_forge",title:F("portal_soul_forge_title"),desc:F("portal_soul_forge_title"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:3},grant:["hell_pit",4],cost:{Knowledge:()=>275e4},effect:()=>F("tech_soul_forge_effect"),action(){return!!ii($(this)[0])&&(t.portal.soul_forge={count:0,on:0,kills:0},!0)}},soul_attractor:{id:"tech-soul_attractor",title:F("portal_soul_attractor_title"),desc:F("portal_soul_attractor_title"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:4,high_tech:16},grant:["hell_pit",5],cost:{Knowledge:()=>55e5},effect:()=>F("tech_soul_attractor_effect"),action(){return!!ii($(this)[0])&&(t.portal.soul_attractor={count:0,on:0},!0)}},soul_absorption:{id:"tech-soul_absorption",title:F("tech_soul_absorption"),desc:F("tech_soul_absorption"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:5},grant:["hell_pit",6],cost:{Knowledge:()=>6e6,Infernite:()=>25e4},effect:()=>F("tech_soul_absorption_effect"),action(){return!!ii($(this)[0])}},soul_link:{id:"tech-soul_link",title:F("tech_soul_link"),desc:F("tech_soul_link"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:6},grant:["hell_pit",7],cost:{Knowledge:()=>75e5,Vitreloy:()=>25e4},effect:()=>F("tech_soul_link_effect"),action(){return!!ii($(this)[0])}},gun_emplacement:{id:"tech-gun_emplacement",title:F("portal_gun_emplacement_title"),desc:F("portal_gun_emplacement_title"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:4},grant:["hell_gun",1],cost:{Knowledge:()=>3e6},effect:()=>F("tech_gun_emplacement_effect"),action(){return!!ii($(this)[0])&&(t.portal.gun_emplacement={count:0,on:0},!0)}},advanced_emplacement:{id:"tech-advanced_emplacement",title:F("tech_advanced_emplacement"),desc:F("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:()=>F("tech_advanced_emplacement_effect"),action(){return!!ii($(this)[0])}},dial_it_to_11:{id:"tech-dial_it_to_11",title:F("tech_dial_it_to_11"),desc:F("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=Ns("cataclysm"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name");return`
                            ${F("tech_dial_it_to_11_effect",[Vt().dwarf,t.race.cataclysm?Vt().red:Di[t.race.species].home])}
                            ${F("tech_dial_it_to_11_effect2")}
                            ${F("star_dock_genesis_effect2",[e.plasmid,a])}
                            ${F("star_dock_genesis_effect3",[e.phage])}
                            `},action(){return!!ii($(this)[0])&&($("#main").addClass("earthquake"),setTimeout((function(){$("#main").removeClass("earthquake"),function(){if(t.city.ptrait.includes("unstable")&&t.tech.quaked){j.w&&j.w.terminate(),t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),$s("reset",{end:"cataclysm"}),M();let a=Ns("cataclysm");t.stats.cataclysm++,sn(),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),Pn("squished",!0),Pn(`extinct_${t.race.species}`),"hellscape"===t.city.biome&&"demonic"!==Di[t.race.species].type&&jn("take_no_advice"),Cn(),Pn("shaken"),t.race.cataclysm&&Pn("failed_history");let r=!!t.race.hasOwnProperty("srace")&&t.race.srace,i=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},i>0&&(t.race.corruption=i),r&&(t.race.srace=r),U({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 s=["crispr","trade","craft"];for(let e=0;eF("tech_dial_it_to_11_flair")},limit_collider:{id:"tech-limit_collider",title:F("tech_limit_collider"),desc:F("tech_limit_collider"),category:"science",wiki:!1,era:"deep_space",reqs:{quaked:1},grant:["quaked",2],cost:{Knowledge:()=>5e5},effect:()=>F("tech_limit_collider_effect"),action(){return!!ii($(this)[0])}},mana:{id:"tech-mana",title:F("tech_mana"),desc:F("tech_mana"),category:"magic",era:"civilized",reqs:{primitive:3},grant:["magic",1],condition:()=>"magic"===t.race.universe,cost:{Knowledge:()=>25},effect:()=>F("tech_mana_effect"),action(){return!!ii($(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:F("tech_mana_flair"),post(){os()}},ley_lines:{id:"tech-ley_lines",title:F("tech_ley_lines"),desc:F("tech_ley_lines"),category:"magic",era:"civilized",reqs:{magic:1},grant:["magic",2],condition:()=>"magic"===t.race.universe,cost:{Knowledge:()=>40},effect:()=>F("tech_ley_lines_effect"),action(){return!!ii($(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:F("tech_rituals"),desc:F("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:()=>F("tech_rituals_effect"),action(){return!!ii($(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(){$i()}},crafting_ritual:{id:"tech-crafting_ritual",title:F("tech_crafting_ritual"),desc:F("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:()=>F("tech_crafting_ritual_effect"),action(){return!!ii($(this)[0])&&(t.race.casting.crafting=0,!0)},post(){$i()}},mana_nexus:{id:"tech-mana_nexus",title:F("tech_mana_nexus"),desc:F("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:()=>F("tech_mana_nexus_effect"),action(){return!!ii($(this)[0])},post(){qe("Physics")}},clerics:{id:"tech-clerics",title:F("tech_clerics"),desc:F("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:()=>F("tech_clerics_effect"),action(){return!!ii($(this)[0])}},conjuring:{id:"tech-conjuring",title:F("tech_conjuring"),desc:F("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:()=>F("tech_conjuring_effect"),action(){return!!ii($(this)[0])}},res_conjuring:{id:"tech-res_conjuring",title:F("tech_res_conjuring"),desc:F("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:()=>F("tech_res_conjuring_effect"),action(){return!!ii($(this)[0])}},alchemy:{id:"tech-alchemy",title:F("tech_alchemy"),desc:F("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:()=>F("tech_alchemy_effect"),action(){return!!ii($(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(){Cs($("#resources")),Ba(),t.settings.tabLoad&&Da("alchemy")}},transmutation:{id:"tech-transmutation",title:F("tech_transmutation"),desc:F("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:()=>F("tech_transmutation_effect"),action(){return!!ii($(this)[0])},post(){Cs($("#resources")),Ba()}},secret_society:{id:"tech-secret_society",title:F("tech_secret_society"),desc:F("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:()=>F("tech_secret_society_effect"),action(){return!!ii($(this)[0])}},cultists:{id:"tech-cultists",title:F("tech_cultists"),desc:F("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:()=>F("tech_cultists_effect"),action(){return!!ii($(this)[0])}},conceal_ward:{id:"tech-conceal_ward",title:F("tech_conceal_ward"),desc:F("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:()=>F("tech_conceal_ward_effect"),action(){return!!ii($(this)[0])&&(t.city.conceal_ward={count:0},t.space.conceal_ward={count:0},!0)}},subtle_rituals:{id:"tech-subtle_rituals",title:F("tech_subtle_rituals"),desc:F("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:()=>F("tech_subtle_rituals_effect"),action(){return!!ii($(this)[0])}},pylon_camouflage:{id:"tech-pylon_camouflage",title:F("tech_pylon_camouflage"),desc:F("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:()=>F("tech_pylon_camouflage_effect"),action(){return!!ii($(this)[0])}},fake_tech:{id:"tech-fake_tech",title:F("tech_fake_tech"),desc:F("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:()=>F("tech_fake_tech_effect"),action(){return!!ii($(this)[0])}},concealment:{id:"tech-concealment",title:F("tech_concealment"),desc:F("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:()=>F("tech_concealment_effect"),action(){return!!ii($(this)[0])}},improved_concealment:{id:"tech-improved_concealment",title:F("tech_improved_concealment"),desc:F("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:25e3,Knowledge:()=>2e7},effect:()=>F("tech_improved_concealment_effect"),action(){return!!ii($(this)[0])}},outerplane_summon:{id:"tech-outerplane_summon",title:F("tech_outerplane_summon"),desc:F("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:6e4,Knowledge:()=>6e7,Demonic_Essence:()=>1},effect:()=>F("tech_outerplane_summon_effect"),action(){return!!ii($(this)[0])}},dark_bomb:{id:"tech-dark_bomb",title:F("tech_dark_bomb"),desc:F("tech_dark_bomb"),category:"hell_dimension",era:"dimensional",reqs:{},reqs:{hell_spire:10,b_stone:2,waygate:2,sphinx_bribe:1},condition(){let e=qn();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:()=>F("tech_dark_bomb_effect"),action(){return!!ii($(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:()=>F("tech_dark_bomb_flair")},bribe_sphinx:{id:"tech-bribe_sphinx",title:F("portal_sphinx_bribe"),desc:F("portal_sphinx_bribe"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:8},grant:["sphinx_bribe",1],cost:{Soul_Gem:()=>250,Supply:()=>5e5},effect:()=>F("tech_bribe_sphinx_effect"),action(){return!!ii($(this)[0])&&(t.resource.Codex.display=!0,t.resource.Codex.amount=1,ms(F("tech_bribe_sphinx_msg"),"info",!1,["progress","hell"]),!0)}},alien_biotech:{id:"tech-alien_biotech",title:F("tech_alien_biotech"),desc:F("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:()=>F(t.race.orbit_decayed?"tech_alien_biotech_effect_alt":"tech_alien_biotech_effect"),action(){return!!ii($(this)[0])}},zero_g_lab:{id:"tech-zero_g_lab",title:F("tech_zero_g_lab"),desc:F("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:F("tech_zero_g_lab_effect"),action(){return!!ii($(this)[0])&&(t.space.zero_g_lab={count:0,on:0},!0)}},operating_base:{id:"tech-operating_base",title:F("tech_operating_base"),desc:F("tech_operating_base"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{enceladus:3,triton:1},grant:["enceladus",4],cost:{Knowledge:()=>14e5},effect:()=>F("tech_operating_base_effect",[Vt().enceladus]),action(){return!!ii($(this)[0])&&(t.space.operating_base={count:0,on:0},!0)}},munitions_depot:{id:"tech-munitions_depot",title:F("tech_munitions_depot"),desc:F("tech_munitions_depot"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{enceladus:4},grant:["enceladus",5],cost:{Knowledge:()=>15e5},effect:()=>F("tech_munitions_depot_effect"),action(){return!!ii($(this)[0])&&(t.space.munitions_depot={count:0},!0)}},fob:{id:"tech-fob",title:F("tech_fob"),desc:F("tech_fob"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{triton:1},grant:["triton",2],cost:{Knowledge:()=>145e4},effect:()=>F("tech_fob_effect",[Vt().triton]),action(){return!!ii($(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:F("tech_bac_tanks"),desc:F("tech_bac_tanks_desc"),category:"military",era:"solar",path:["truepath"],reqs:{medic:1,triton:2},grant:["medic",2],cost:{Knowledge:()=>175e4},effect:F("tech_bac_tanks_effect"),action(){return!!ii($(this)[0])}},medkit:{id:"tech-medkit",title:F("tech_medkit"),desc:F("tech_medkit"),category:"military",era:"solar",path:["truepath"],reqs:{medic:2,outer:4},grant:["medic",3],cost:{Knowledge:()=>225e4,Quantium:()=>25e4,Cipher:()=>8e3},effect:F("tech_medkit_effect"),action(){return!!ii($(this)[0])}},sam_site:{id:"tech-sam_site",title:F("tech_sam_site"),desc:F("tech_sam_site"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{titan:6,triton:1},grant:["titan",7],cost:{Knowledge:()=>1475e3},effect:()=>F("tech_sam_site_effect",[Vt().titan]),action(){return!!ii($(this)[0])&&(t.space.sam={count:0,on:0},!0)}},data_cracker:{id:"tech-data_cracker",title:F("tech_data_cracker"),desc:F("tech_data_cracker"),category:"science",era:"solar",path:["truepath"],reqs:{titan:7,kuiper:1},grant:["titan",8],cost:{Knowledge:()=>275e4,Cipher:()=>25e3},effect:()=>F("tech_data_cracker_effect",[t.resource.Cipher.name]),action(){return!!ii($(this)[0])&&(t.space.decoder={count:0,on:0},!0)}},ai_core_tp:{id:"tech-ai_core_tp",title:F("tech_ai_core"),desc:F("tech_ai_core"),category:"ai_core",era:"solar",path:["truepath"],reqs:{titan:8},grant:["titan",9],cost:{Knowledge:()=>3e6,Cipher:()=>1e5},effect:F("tech_ai_core_effect"),action(){return!!ii($(this)[0])&&(t.space.ai_core={count:0},!0)}},ai_optimizations:{id:"tech-ai_optimizations",title:F("tech_ai_optimizations"),desc:F("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:F("tech_ai_optimizations_effect"),action(){return!!ii($(this)[0])},class:"synth"},synthetic_life:{id:"tech-synthetic_life",title:F("tech_synthetic_life"),desc:F("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:F("tech_synthetic_life_effect"),action(){return!!ii($(this)[0])&&(t.space.ai_colonist={count:0,on:0},!0)},class:"synth"},protocol66:{id:"tech-protocol66",title:F("tech_protocol66"),desc:F("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:F("tech_protocol66_effect"),action(){return!!si($(this)[0])},flair:F("tech_protocol66_flair"),class:"synth"},protocol66a:{id:"tech-protocol66a",title:F("tech_protocol66"),desc:F("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=Ns("ai"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name"),r=`
                            ${F("tech_protocol66a_effect_gains",[e.plasmid,a,e.phage,e.cores])}
                            `;return`
                            ${F("tech_protocol66a_effect")}
                            ${r}`},action(){return!!ii($(this)[0])&&(j.w&&j.w.terminate(),ds(),$("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))),M(),$s("reset",{end:"ai apocalypse"}),Pn(`extinct_${t.race.species}`),Pn("obsolete"),Pn("squished",!0),t.race.junker&&"junker"===t.race.species&&jn("the_misery");let a=t.race.species,r=t.race.gods,i=t.city.calendar.orbit,s=t.city.biome,n=t.city.ptrait,c=t.city.geology,o=Ns("ai");Cn(),t.stats.aiappoc++,sn(),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.AICore.count+=o.cores,t.stats.cores+=o.cores;let l="synthetic"!==Di[a].type?a:t.race.hasOwnProperty("srace")?t.race.srace:a;t.stats.synth[l]=!0;let _=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},_>0&&(t.race.corruption=_),U({orbit:i,biome:s,ptrait:n,geology:c}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}()}),4e3),!0)},flair:F("tech_protocol66a_flair"),class:"synth"},terraforming_tp:{id:"tech-terraforming_tp",title:F("tech_terraforming"),desc:F("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:()=>F("tech_terraforming_effect",[Vt().red]),action(){return!!ii($(this)[0])&&(t.space.terraformer={count:0},!0)}},quantium:{id:"tech-quantium",title:F("tech_quantium"),desc:F("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:F("tech_quantium_effect"),action(){return!!ii($(this)[0])&&(t.resource.Quantium.display=!0,!0)},post(){os()}},anitgrav_bunk:{id:"tech-anitgrav_bunk",title:F("tech_anitgrav_bunk"),desc:F("tech_anitgrav_bunk"),category:"military",era:"solar",path:["truepath"],reqs:{marines:1,quantium:1},grant:["marines",2],cost:{Knowledge:()=>125e4,Quantium:()=>5e5},effect:()=>F("tech_anitgrav_bunk_effect",[F("space_red_space_barracks_title")]),action(){return!!ii($(this)[0])}},higgs_boson_tp:{id:"tech-higgs_boson_tp",title:F("tech_higgs_boson"),desc:F("tech_higgs_boson"),category:"science",era:"early_space",path:["truepath"],reqs:{supercollider:2},grant:["tp_particles",1],cost:{Knowledge:()=>125e3},effect:F("tech_higgs_boson_effect"),action(){return!!ii($(this)[0])}},long_range_probes:{id:"tech-long_range_probes",title:F("tech_long_range_probes"),desc:F("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:F("tech_long_range_probes_effect"),action(){return!!ii($(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:F("tech_strange_signal"),desc:F("tech_strange_signal"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:1,syard_sensor:4},grant:["outer",2],cost:{Knowledge:()=>135e4},effect:F("tech_strange_signal_effect"),action(){return!!ii($(this)[0])&&(t.settings.space.triton=!0,!0)}},data_analysis:{id:"tech-data_analysis",title:F("tech_data_analysis"),desc:F("tech_data_analysis"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:3},grant:["outer",4],cost:{Knowledge:()=>18e5,Cipher:()=>12500},effect:F("tech_data_analysis_effect"),action(){return!!ii($(this)[0])&&(ms(F("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:F("tech_mass_relay"),desc:F("tech_mass_relay"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:4},grant:["outer",5],cost:{Knowledge:()=>22e5,Cipher:()=>4e4},effect:F("tech_mass_relay_effect"),action(){return!!ii($(this)[0])&&(t.space.mass_relay={count:0},!0)}},nav_data:{id:"tech-nav_data",title:F("tech_nav_data"),desc:F("tech_nav_data"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:6},grant:["outer",7],cost:{Knowledge:()=>225e4,Cipher:()=>6e4},effect:F("tech_nav_data_effect"),action(){return!!ii($(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},ms(F("tech_nav_data_result",[Vt().eris]),"info",!1,["progress"]),!0)}},sensor_logs:{id:"tech-sensor_logs",title:F("tech_sensor_logs"),desc:F("tech_sensor_logs"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:7},grant:["outer",8],cost:{Knowledge:()=>35e5,Cipher:()=>65e3},effect:F("tech_sensor_logs_effect"),action(){return!!ii($(this)[0])&&(ms(F("tech_sensor_logs_result"),"info",!1,["progress"]),!0)}},dronewar:{id:"tech-dronewar",title:F("tech_dronewar"),desc:F("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:()=>F("tech_dronewar_effect",[Vt().eris]),action(){return!!ii($(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:F("tech_drone_tank"),desc:F("tech_drone_tank"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{eris:3},grant:["eris",4],cost:{Knowledge:()=>34e5,Cipher:()=>5e4},effect:F("tech_drone_tank_effect"),action(){return!!ii($(this)[0])&&(t.space.tank={count:0,on:0},!0)}},stanene_tp:{id:"tech-stanene_tp",title:F("tech_stanene"),desc:F("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:F("tech_stanene_effect"),action(){return!!ii($(this)[0])&&(t.resource.Stanene.display=!0,ms(F("tech_stanene_avail"),"info",!1,["progress"]),!0)},post(){$i(),os()}},graphene_tp:{id:"tech-graphene_tp",title:F("tech_graphene"),desc:F("tech_graphene"),category:"crafting",era:"solar",path:["truepath"],reqs:{titan:5},grant:["graphene",1],cost:{Knowledge:()=>64e4,Adamantite:()=>25e3},effect:F("tech_graphene_effect"),action(){return!!ii($(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:F("tech_virtual_reality"),desc:F("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:F("tech_virtual_reality_effect"),action(){return!!ii($(this)[0])},flair:()=>F("tech_virtual_reality_flair")},electrolysis:{id:"tech-electrolysis",title:F("tech_electrolysis"),desc:F("tech_electrolysis"),category:"power_generation",era:"solar",path:["truepath"],reqs:{titan:2,enceladus:1},grant:["titan",3],cost:{Knowledge:()=>465e3},effect:()=>F("tech_electrolysis_effect",[Vt().titan,t.resource.Water.name]),action(){return!!ii($(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:()=>F("tech_storehouse",[Vt().titan]),desc:()=>F("tech_storehouse",[Vt().titan]),category:"storage",era:"solar",path:["truepath"],reqs:{titan:4},grant:["titan",5],cost:{Knowledge:()=>5e5},effect:()=>F("tech_storehouse_effect",[Vt().titan]),action(){return!!ii($(this)[0])&&(t.space.storehouse={count:0},!0)}},adamantite_vault_tp:{id:"tech-adamantite_vault_tp",title:F("tech_adamantite_vault"),desc:F("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:F("tech_adamantite_vault_effect"),action(){return!!ii($(this)[0])}},titan_bank:{id:"tech-titan_bank",title:()=>F("tech_titan_bank",[Vt().titan]),desc:()=>F("tech_titan_bank",[Vt().titan]),category:"storage",era:"solar",path:["truepath"],reqs:{titan:5},grant:["titan",6],cost:{Knowledge:()=>6e5},effect:()=>F("tech_titan_bank_effect",[Vt().titan]),action(){return!!ii($(this)[0])&&(t.space.titan_bank={count:0},!0)}},hydrogen_plant:{id:"tech-hydrogen_plant",title:F("tech_hydrogen_plant"),desc:F("tech_hydrogen_plant"),category:"power_generation",era:"solar",path:["truepath"],reqs:{titan:4,stanene:1},grant:["titan_power",1],cost:{Knowledge:()=>55e4},effect:()=>F("tech_hydrogen_plant_effect"),action(){return!!ii($(this)[0])&&(t.space.hydrogen_plant={count:0,on:0},!0)}},water_mining:{id:"tech-water_mining",title:F("tech_water_mining"),desc:F("tech_water_mining"),category:"power_generation",era:"solar",path:["truepath"],reqs:{titan:2,enceladus:1},grant:["enceladus",2],cost:{Knowledge:()=>45e4},effect:()=>F("tech_water_mining_effect",[Vt().enceladus,Di[t.race.species].home,t.resource.Water.name]),action(){return!!ii($(this)[0])&&(t.space.water_freighter={count:0,on:0},!0)}},mercury_smelting:{id:"tech-mercury_smelting",title:F("tech_mercury_smelting"),desc:F("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:()=>F("tech_mercury_smelting_effect",[Vt().hell]),action(){return!!ii($(this)[0])&&(t.space.hell_smelter={count:0},!0)}},iridium_smelting:{id:"tech-iridium_smelting",title:F("tech_iridium_smelting"),desc:F("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:F("tech_iridium_smelting_effect"),action(){return!!ii($(this)[0])}},adamantite_crates:{id:"tech-adamantite_crates",title:F("tech_adamantite_crates"),desc:F("tech_adamantite_crates_desc"),category:"storage",era:"solar",path:["truepath"],reqs:{container:5,titan:4},grant:["container",6],cost:{Knowledge:()=>525e3,Adamantite:()=>12500},effect:F("tech_adamantite_crates_effect"),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},bolognium_crates_tp:{id:"tech-bolognium_crates_tp",title:()=>F("tech_crates",[t.resource.Bolognium.name]),desc:()=>F("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:()=>F("tech_bolognium_crates_effect",[t.resource.Bolognium.name]),action(){return!!ii($(this)[0])}},adamantite_containers_tp:{id:"tech-adamantite_containers_tp",title:()=>F("tech_containers",[t.resource.Adamantite.name]),desc:()=>F("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:()=>F("tech_adamantite_containers_effect",[t.resource.Adamantite.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},quantium_containers:{id:"tech-quantium_containers",title:()=>F("tech_containers",[t.resource.Quantium.name]),desc:()=>F("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:()=>F("tech_quantium_containers_effect",[t.resource.Quantium.name]),action(){return!!ii($(this)[0])&&(zs({el:"#createHead"},"update"),!0)}},unobtainium_containers:{id:"tech-unobtainium_containers",title:()=>F("tech_containers",[t.resource.Unobtainium.name]),desc:()=>F("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:()=>F("tech_bolognium_containers_effect",[t.resource.Unobtainium.name]),action(){return!!ii($(this)[0])}},reinforced_shelving:{id:"tech-reinforced_shelving",title:F("tech_reinforced_shelving"),desc:F("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:F("tech_reinforced_shelving_effect"),action(){return!!ii($(this)[0])}},garage_shelving:{id:"tech-garage_shelving",title:F("tech_garage_shelving"),desc:F("tech_garage_shelving"),category:"storage",era:"solar",path:["truepath"],reqs:{shelving:1,quantium:1},grant:["shelving",2],cost:{Knowledge:()=>125e4,Quantium:()=>75e3},effect:F("tech_garage_shelving_effect"),action(){return!!ii($(this)[0])}},warehouse_shelving:{id:"tech-warehouse_shelving",title:F("tech_warehouse_shelving"),desc:F("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:F("tech_warehouse_shelving_effect"),action(){return!!ii($(this)[0])}},elerium_extraction:{id:"tech-elerium_extraction",title:F("tech_elerium_extraction"),desc:F("tech_elerium_extraction"),category:"mining",era:"solar",path:["truepath"],reqs:{kuiper:1},grant:["kuiper",2],cost:{Knowledge:()=>25e5,Orichalcum:()=>1e5,Cipher:()=>12e3},effect:()=>F("tech_elerium_extraction_effect"),action(){return!!ii($(this)[0])&&(t.space.elerium_mine={count:0,on:0},!0)}},orichalcum_panels_tp:{id:"tech-orichalcum_panels_tp",title:F("tech_orichalcum_panels"),desc:F("tech_orichalcum_panels"),category:"power_generation",era:"solar",path:["truepath"],reqs:{kuiper:1,swarm:5},grant:["swarm",6],cost:{Knowledge:()=>24e5,Orichalcum:()=>125e3},effect:()=>F("tech_orichalcum_panels_effect"),action(){return!!ii($(this)[0])}},shipyard:{id:"tech-shipyard",title:()=>F("tech_shipyard",[Vt().dwarf]),desc:()=>F("tech_shipyard",[Vt().dwarf]),category:"space_militarization",era:"solar",path:["truepath"],reqs:{outer:1,syndicate:1},grant:["shipyard",1],cost:{Knowledge:()=>42e4},effect:()=>F("tech_shipyard_effect",[Vt().dwarf]),action(){return!!ii($(this)[0])&&(t.space.shipyard={count:0,on:0,ships:[],expand:!0,sort:!0},ut(),!0)}},ship_lasers:{id:"tech-ship_lasers",title:F("tech_ship_lasers"),desc:F("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:F("tech_ship_lasers_effect"),action(){return!!ii($(this)[0])}},pulse_lasers:{id:"tech-pulse_lasers",title:F("tech_pulse_lasers"),desc:F("tech_pulse_lasers"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_weapon:2},grant:["syard_weapon",3],cost:{Knowledge:()=>5e5,Elerium:()=>750},effect:F("tech_pulse_lasers_effect"),action(){return!!ii($(this)[0])}},ship_plasma:{id:"tech-ship_plasma",title:F("tech_ship_plasma"),desc:F("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:F("tech_ship_plasma_effect"),action(){return!!ii($(this)[0])}},ship_phaser:{id:"tech-ship_phaser",title:F("tech_ship_phaser"),desc:F("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:F("tech_ship_phaser_effect"),action(){return!!ii($(this)[0])}},ship_disruptor:{id:"tech-ship_disruptor",title:F("tech_ship_disruptor"),desc:F("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:F("tech_ship_disruptor_effect"),action(){return!!ii($(this)[0])}},destroyer_ship:{id:"tech-destroyer_ship",title:F("tech_destroyer_ship"),desc:F("tech_destroyer_ship"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_class:2},grant:["syard_class",3],cost:{Knowledge:()=>465e3},effect:F("tech_destroyer_ship_effect"),action(){return!!ii($(this)[0])}},cruiser_ship_tp:{id:"tech-cruiser_ship_tp",title:F("tech_cruiser_ship"),desc:F("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:F("tech_cruiser_ship_tp"),action(){return!!ii($(this)[0])}},h_cruiser_ship:{id:"tech-h_cruiser_ship",title:F("tech_h_cruiser_ship"),desc:F("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:F("tech_h_cruiser_ship_effect"),action(){return!!ii($(this)[0])}},dreadnought_ship:{id:"tech-dreadnought_ship",title:F("tech_dreadnought_ship"),desc:F("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:F("tech_dreadnought_ship_effect"),action(){return!!ii($(this)[0])}},pulse_engine:{id:"tech-pulse_engine",title:F("outer_shipyard_engine_pulse"),desc:F("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:F("tech_pulse_engine_effect"),action(){return!!ii($(this)[0])}},photon_engine:{id:"tech-photon_engine",title:F("outer_shipyard_engine_photon"),desc:F("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:F("tech_photon_engine_effect"),action(){return!!ii($(this)[0])}},vacuum_drive:{id:"tech-vacuum_drive",title:F("outer_shipyard_engine_vacuum"),desc:F("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:F("outer_shipyard_engine_vacuum_desc"),action(){return!!ii($(this)[0])}},ship_fusion:{id:"tech-ship_fusion",title:F("tech_fusion_generator"),desc:F("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:F("tech_fusion_generator_effect"),action(){return!!ii($(this)[0])}},ship_elerium:{id:"tech-ship_elerium",title:F("tech_elerium_generator"),desc:F("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:F("tech_elerium_generator_effect"),action(){return!!ii($(this)[0])}},quantum_signatures:{id:"tech-quantum_signatures",title:F("tech_quantum_signatures"),desc:F("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:F("tech_quantum_signatures_effect"),action(){return!!ii($(this)[0])}},interstellar_drive:{id:"tech-interstellar_drive",title:F("tech_interstellar_drive"),desc:F("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:F("tech_interstellar_drive_effect"),action(){return!!ii($(this)[0])}},alien_outpost:{id:"tech-alien_outpost",title:F("tech_alien_outpost"),desc:F("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:F("tech_alien_outpost_effect"),action(){return!!ii($(this)[0])&&(t.tauceti.alien_outpost={count:1,on:0},t.tauceti.jump_gate={count:0},t.space.jump_gate={count:0},ms(F("tech_alien_outpost_msg"),"info",!1,["progress"]),!0)}},jumpgates:{id:"tech-jumpgates",title:F("tech_jumpgates"),desc:F("tech_jumpgates"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tauceti:2,tau_home:4},grant:["tauceti",3],cost:{Knowledge:()=>6e6},effect:F("tech_jumpgates_effect"),action(){return!!ii($(this)[0])}},system_survey:{id:"tech-system_survey",title:F("tech_system_survey"),desc:F("tech_system_survey"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tauceti:4,womling_tech:1},grant:["tauceti",5],cost:{Knowledge:()=>7e6},effect:F("tech_system_survey_effect"),action(){return!!ii($(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:F("tech_repository"),desc:F("tech_repository"),category:"storage",era:"tauceti",path:["truepath"],reqs:{tauceti:4,tau_home:4},grant:["tau_home",5],cost:{Knowledge:()=>65e5},effect:F("tech_repository_effect"),action(){return!!ii($(this)[0])&&(t.tauceti.repository={count:0},!0)}},fusion_generator:{id:"tech-fusion_generator",title:F("tech_fusion_power"),desc:F("tech_fusion_power"),category:"power_generation",era:"tauceti",path:["truepath"],reqs:{tau_home:5},grant:["tau_home",6],cost:{Knowledge:()=>675e4},effect:F("tech_tau_fusion_power_effect"),action(){return!!ii($(this)[0])&&(t.tauceti.fusion_generator={count:0,on:0},!0)}},tau_cultivation:{id:"tech-tau_cultivation",title:F("tech_tau_cultivation"),desc:F("tech_tau_cultivation"),category:"agriculture",era:"tauceti",path:["truepath"],reqs:{tau_home:6},grant:["tau_home",7],cost:{Knowledge:()=>69e5},effect:()=>F("tech_tau_cultivation_effect",[Di[t.race.species].home]),action(){return!!ii($(this)[0])&&(t.tauceti.tau_farm={count:0,on:0},!0)}},tau_manufacturing:{id:"tech-tau_manufacturing",title:F("tech_tau_manufacturing"),desc:F("tech_tau_manufacturing"),category:"crafting",era:"tauceti",path:["truepath"],reqs:{tau_home:7},grant:["tau_home",8],cost:{Knowledge:()=>725e4},effect:()=>F("tech_tau_manufacturing_effect",[Di[t.race.species].home]),action(){return!!ii($(this)[0])&&(t.tauceti.tau_factory={count:0,on:0},!0)}},weasels:{id:"tech-weasels",title:F("tech_weasels"),desc:F("tech_weasels"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:2},grant:["tau_red",3],cost:{Knowledge:()=>625e4},effect:()=>F("tech_weasels_effect",[F("tau_planet",[Vt().red])]),action(){return!!ii($(this)[0])&&(ms(F("tech_weasels_msg",[F("tau_planet",[Vt().red])]),"info",!1,["progress"]),!0)}},jeff:{id:"tech-jeff",title:F("tech_jeff"),desc:F("tech_jeff"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:3},grant:["tau_red",4],cost:{Knowledge:()=>638e4},effect:()=>F("tech_jeff_effect"),action(){return!!ii($(this)[0])&&(ms(F("tech_jeff_effect_msg",[]),"info",!1,["progress"]),!0)}},womling_fun:{id:"tech-womling_fun",title:F("tech_womling_fun"),desc:F("tech_womling_fun"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:5},grant:["tau_red",6],cost:{Knowledge:()=>665e4},effect:()=>F("tech_womling_fun_effect"),action(){return!!ii($(this)[0])}},womling_lab:{id:"tech-womling_lab",title:F("tech_womling_lab"),desc:F("tech_womling_lab"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:6},grant:["tau_red",7],cost:{Knowledge:()=>69e5},effect:()=>F("tech_womling_lab_effect"),action(){return!!ii($(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:F("tech_womling_mining"),desc:F("tech_womling_mining"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:1},grant:["womling_mining",1],cost:{Knowledge:()=>71e5},effect:()=>F("tech_womling_mining_effect"),action(){return!!ii($(this)[0])}},womling_firstaid:{id:"tech-womling_firstaid",title:F("tech_womling_firstaid"),desc:F("tech_womling_firstaid"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:2},grant:["womling_firstaid",1],cost:{Knowledge:()=>735e4},effect:()=>F("tech_womling_firstaid_effect"),action(){return!!ii($(this)[0])}},womling_logistics:{id:"tech-womling_logistics",title:F("tech_womling_logistics"),desc:F("tech_womling_logistics"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:3},grant:["womling_logistics",1],cost:{Knowledge:()=>765e4},effect:()=>F("tech_womling_logistics_effect",[F("tau_red_orbital_platform")]),action(){return!!ii($(this)[0])}},womling_repulser:{id:"tech-womling_repulser",title:F("tech_womling_repulser"),desc:F("tech_womling_repulser"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:4,womling_logistics:1},grant:["womling_logistics",2],cost:{Knowledge:()=>79e5},effect:()=>F("tech_womling_repulser_effect",[t.resource.Oil.name,F("tau_red_orbital_platform")]),action(){return!!ii($(this)[0])}},womling_farming:{id:"tech-womling_farming",title:F("tech_womling_farming"),desc:F("tech_womling_farming"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:5},grant:["womling_pop",1],cost:{Knowledge:()=>82e5},effect:()=>F("tech_womling_farming_effect"),action(){return!!ii($(this)[0])}},womling_housing:{id:"tech-womling_housing",title:F("tech_womling_housing"),desc:F("tech_womling_housing"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:6,womling_pop:1},grant:["womling_pop",2],cost:{Knowledge:()=>85e5},effect:()=>F("tech_womling_housing_effect"),action(){return!!ii($(this)[0])}},womling_support:{id:"tech-womling_support",title:F("tech_womling_support"),desc:F("tech_womling_support"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:7,tau_gas:4},grant:["womling_technicians",1],cost:{Knowledge:()=>885e4},effect:()=>`
                            ${F("tech_womling_support_effect")}
                            `,action(){return!!ii($(this)[0])&&(t.tauceti.womling_station={count:0,on:0},!0)}},womling_recycling:{id:"tech-womling_recycling",title:F("tech_womling_recycling"),desc:F("tech_womling_recycling"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:8},grant:["womling_recycling",1],cost:{Knowledge:()=>955e4},effect:()=>`
                            ${F("tech_womling_recycling_effect")}
                            `,action(){return!!ii($(this)[0])}},asteroid_analysis:{id:"tech-asteroid_analysis",title:F("tech_asteroid_analysis"),desc:F("tech_asteroid_analysis"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tau_roid:1},grant:["tau_roid",2],cost:{Knowledge:()=>735e4},effect:()=>F("tech_asteroid_analysis_effect"),action(){return!!ii($(this)[0])&&(ms(F("tech_asteroid_analysis_msg"),"info",!1,["progress"]),!0)}},shark_repellent:{id:"tech-shark_repellent",title:F("tech_shark_repellent"),desc:F("tech_shark_repellent"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tau_roid:2},grant:["tau_roid",3],cost:{Knowledge:()=>74e5},effect:()=>F("tech_shark_repellent_effect"),action(){return!!ii($(this)[0])&&(ms(F("tech_shark_repellent_msg"),"info",!1,["progress"]),!0)}},belt_mining:{id:"tech-belt_mining",title:F("tech_belt_mining"),desc:F("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:()=>F("tech_belt_mining_effect"),action(){return!!ii($(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:F("tech_adv_belt_mining"),desc:F("tech_adv_belt_mining"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{tau_roid:4},grant:["tau_roid",5],cost:{Knowledge:()=>79e5},effect:()=>F("tech_adv_belt_mining_effect"),action(){return!!ii($(this)[0])}},space_whaling:{id:"tech-space_whaling",title:F("tech_space_whaling"),desc:F("tech_space_whaling"),category:"whaling",era:"tauceti",path:["truepath"],reqs:{tau_gas:3,tau_roid:3},grant:["tau_whale",1],cost:{Knowledge:()=>75e5},effect:()=>F("tech_space_whaling_effect"),action(){return!!ii($(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:()=>F(t.race.artifical?"tech_infectious_disease_lab_s":"tech_infectious_disease_lab"),desc:()=>F(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:()=>F(t.race.artifical?"tech_infectious_disease_lab_effect_s":"tech_infectious_disease_lab_effect"),action(){return!!ii($(this)[0])&&(t.tauceti.infectious_disease_lab={count:0,on:0,cure:0},!0)}},isolation_protocol:{id:"tech-isolation_protocol",title:F("tech_isolation_protocol"),desc:F("tech_isolation_protocol"),category:"plague",era:"tauceti",path:["truepath"],reqs:{disease:2},grant:["disease",3],not_trait:["lone_survivor"],cost:{Knowledge:()=>85e5},effect:()=>`
                            ${F("tech_isolation_protocol_effect",[F("tab_tauceti")])}
                            ${F("tech_isolation_protocol_warning")}
                            `,action(){return!!ii($(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),ct(),Cs($("#shipList")),Object.keys(Sr.city).forEach((function(a){t.city.hasOwnProperty(a)&&t.city[a].hasOwnProperty("count")&&(t.race.hooved&&Sr.city[a].cost.hasOwnProperty("Horseshoe")&&(t.race.shoecnt-=Sr.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(Sr.space[a]).forEach((function(r){t.space.hasOwnProperty(r)&&t.space[r].hasOwnProperty("count")&&(t.race.hooved&&Sr.space[a][r].cost.hasOwnProperty("Horseshoe")&&(t.race.shoecnt-=Sr.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&&qi.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(Yt).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=n.colony*He.tau_home.colony.citizens();t.resource[t.race.species].amount>a&&(t.resource[t.race.species].amount=a),B("spy"),B("spyop"),Cs($("#infoTimer")),t.race.inactive=e}(),!0)}},focus_cure:{id:"tech-focus_cure",title:F("tech_focus_cure"),desc:F("tech_focus_cure"),category:"plague",era:"tauceti",path:["truepath"],reqs:{disease:2},grant:["disease",3],not_trait:["lone_survivor"],cost:{Knowledge:()=>85e5},effect:()=>`
                            ${F("tech_focus_cure_effect",[F("tab_tauceti")])}
                            ${F("tech_focus_cure_warning")}
                            `,action(){return!!ii($(this)[0])&&(t.tech.focus_cure=1,!0)}},decode_virus:{id:"tech-decode_virus",title:F("tech_decode_virus"),desc:F("tech_decode_virus"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:1},grant:["focus_cure",2],cost:{Knowledge:()=>9e6},effect:()=>`
                            ${F(t.race.artifical?"tech_decode_virus_effect_s":"tech_decode_virus_effect")}
                            `,action(){return!!ii($(this)[0])&&(t.race.artifical?ms(F("tech_decode_virus_msg1s",[Sr.tauceti.tau_home.infectious_disease_lab.title()]),"info",!1,["progress"]):ms(F("tech_decode_virus_msg1",[Sr.tauceti.tau_home.infectious_disease_lab.title()]),"info",!1,["progress"]),!0)}},vaccine_campaign:{id:"tech-vaccine_campaign",title:F("tech_vaccine_campaign"),desc:F("tech_vaccine_campaign"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:3},grant:["focus_cure",4],cost:{Knowledge:()=>925e4},effect:()=>`
                            ${F("tech_vaccine_campaign_effect",[t.race.artifical?Sr.city.boot_camp.title():Sr.city.hospital.title])}
                            `,action(){return!!ii($(this)[0])&&(t.race.vax=0,!0)}},vax_strat1:{id:"tech-vax_strat1",title:F("tech_vax_strat1"),desc:F("tech_vax_strat1"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge:()=>95e5},effect:()=>`
                            ${F("tech_vax_strat1_effect")}
                            ${F("tech_vax_warning")}
                            `,action(){return!!ii($(this)[0])&&(t.tech.vax_p=1,ms(F("tech_vax_strat1_msg"),"info",!1,["progress"]),!0)}},vax_strat2:{id:"tech-vax_strat2",title:F("tech_vax_strat2"),desc:F("tech_vax_strat2"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge:()=>95e5},effect:()=>`
                            ${F("tech_vax_strat2_effect")}
                            ${F("tech_vax_warning")}
                            `,action(){return!!ii($(this)[0])&&(t.tech.vax_f=1,ms(F("tech_vax_strat2_msg"),"info",!1,["progress"]),!0)}},vax_strat3:{id:"tech-vax_strat3",title:F("tech_vax_strat3"),desc:F("tech_vax_strat3"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge:()=>95e5},effect:()=>`
                            ${F("tech_vax_strat3_effect")}
                            ${F("tech_vax_warning")}
                            `,action(){return!!ii($(this)[0])&&(t.tech.vax_s=1,ms(F("tech_vax_strat3_msg"),"info",!1,["progress"]),!0)}},vax_strat4:{id:"tech-vax_strat4",title:F("tech_vax_strat4"),desc:F("tech_vax_strat4"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge:()=>95e5},effect:()=>`
                            ${F("tech_vax_strat4_effect")}
                            ${F("tech_vax_warning")}
                            `,action(){return!!ii($(this)[0])&&(t.tech.vax_c=1,ms(F("tech_vax_strat4_msg"),"info",!1,["progress"]),!0)}},cloning:{id:"tech-cloning",title:F("tech_cloning"),desc:F("tech_cloning"),category:"housing",era:"tauceti",path:["truepath"],reqs:{focus_cure:7},grant:["cloning",1],cost:{Knowledge:()=>975e4},effect:()=>`
                            ${F(t.race.artifical?"tech_cloning_effect_s":"tech_cloning_effect")}
                            `,action(){return!!ii($(this)[0])&&(t.tauceti.cloning_facility={count:0,on:0},!0)}},clone_degradation:{id:"tech-clone_degradation",title:F("tech_clone_degradation"),desc:F("tech_clone_degradation"),category:"progress",era:"tauceti",path:["truepath"],reqs:{cloning:1},grant:["cloning",2],cost:{Knowledge:()=>1e7},effect:()=>`
                            ${F("tech_clone_degradation_effect")}
                            `,action(){return!!ii($(this)[0])&&(ms(F("tech_clone_degradation_msg"),"info",!1,["progress"]),!0)}},digital_paradise:{id:"tech-digital_paradise",title:F("tech_digital_paradise"),desc:F("tech_digital_paradise"),category:"progress",era:"tauceti",path:["truepath"],reqs:{cloning:2},grant:["matrix",1],cost:{Knowledge:()=>105e5,Cipher:()=>2e5},effect:()=>`
                            ${F("tech_digital_paradise_effect")}
                            `,action(){return!!ii($(this)[0])}},ringworld:{id:"tech-ringworld",title:F("tech_ringworld"),desc:F("tech_ringworld"),category:"progress",era:"tauceti",path:["truepath"],reqs:{matrix:1},grant:["matrix",2],cost:{Money:()=>3e9,Knowledge:()=>11e6},effect:()=>`
                            ${F("tech_ringworld_effect")}
                            `,action(){return!!ii($(this)[0])&&(t.settings.tau.star=!0,t.tauceti.ringworld={count:0},!0)}},iso_gambling:{id:"tech-iso_gambling",title:F("tech_iso_gambling"),desc:F("tech_iso_gambling"),category:"banking",era:"tauceti",reqs:{gambling:4,isolation:1},grant:["iso_gambling",1],cost:{Knowledge:()=>865e4},effect:F("tech_iso_gambling_effect",[5]),action(){return!!ii($(this)[0])}},outpost_boost:{id:"tech-outpost_boost",title:()=>F("tech_outpost_boost"),desc:()=>F("tech_outpost_boost"),category:"special",era:"tauceti",path:["truepath"],reqs:{tau_home:4,isolation:1},grant:["outpost_boost",1],cost:{Knowledge:()=>89e5},effect:()=>F("tech_outpost_boost_effect"),action(){return!!ii($(this)[0])},flair:()=>F("tech_outpost_boost_flair")},cultural_center:{id:"tech-cultural_center",title:F("tech_cultural_center"),desc:F("tech_cultural_center"),category:"banking",era:"tauceti",path:["truepath"],reqs:{iso_gambling:1,isolation:1},grant:["tau_culture",1],cost:{Knowledge:()=>885e4},effect:F("tech_cultural_center_effect"),action(){return!!ii($(this)[0])&&(t.tauceti.tau_cultural_center={count:0,on:0},!0)},flair:()=>F("tech_cultural_center_flair")},outer_tau_survey:{id:"tech-outer_tau_survey",title:F("tech_outer_tau_survey"),desc:F("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:()=>+Ut(5e6).toFixed(0)},effect:F("tech_outer_tau_survey_effect"),action(){return!!ii($(this)[0])&&(t.settings.tau.gas2=!0,!0)}},alien_research:{id:"tech-alien_research",title:F("tech_alien_research"),desc:F("tech_alien_research"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tau_gas2:5},grant:["tau_gas2",6],cost:{Knowledge:()=>935e4},effect:F("tech_alien_research_effect"),action(){return!!ii($(this)[0])&&(t.tauceti.alien_space_station.decrypted=0,t.tauceti.alien_space_station.focus=95,ms(F("tech_alien_research_msg"),"info",!1,["progress"]),!0)}},womling_gene_therapy:{id:"tech-womling_gene_therapy",title:F("tech_womling_gene_therapy"),desc:F("tech_womling_gene_therapy"),category:"womling",era:"tauceti",path:["truepath"],reqs:{alien_data:1},grant:["womling_gene",1],cost:{Knowledge:()=>952e4},effect:F("tech_womling_gene_therapy_effect"),action(){return!!ii($(this)[0])}},food_culture:{id:"tech-food_culture",title:()=>F("tech_food_culture",[F(`tau_gas2_alien_station_data2_r${t.race.tau_food_item||0}`)]),desc:()=>F("tech_food_culture",[F(`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:()=>F("tech_food_culture_effect",[F(`tau_gas2_alien_station_data2_r${t.race.tau_food_item||0}`),F("tech_cultural_center")]),action(){return!!ii($(this)[0])}},advanced_refinery:{id:"tech-advanced_refinery",title:F("tech_advanced_refinery"),desc:F("tech_advanced_refinery"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{alien_data:3},grant:["tau_ore_mining",1],cost:{Knowledge:()=>968e4},effect:()=>F("tech_advanced_refinery_effect"),action(){return!!ii($(this)[0])}},advanced_pit_mining:{id:"tech-advanced_pit_mining",title:F("tech_advanced_pit_mining"),desc:F("tech_advanced_pit_mining"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{alien_data:3},grant:["tau_pit_mining",1],cost:{Knowledge:()=>972e4},effect:()=>F("tech_advanced_pit_mining_effect"),action(){return!!ii($(this)[0])}},useless_junk:{id:"tech-useless_junk",title:F("tech_useless_junk"),desc:F("tech_useless_junk"),category:"womling",era:"tauceti",path:["truepath"],reqs:{alien_data:4},grant:["tau_junksale",1],cost:{Knowledge:()=>955e4},effect:()=>F("tech_useless_junk_effect",[F(`tau_gas2_alien_station_data4_r${t.race.tau_junk_item||0}`),F("tau_red_womlings")]),action(){return!!ii($(this)[0])}},advanced_asteroid_mining:{id:"tech-advanced_asteroid_mining",title:F("tech_advanced_asteroid_mining"),desc:F("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:()=>F("tech_advanced_asteroid_mining_effect",[F("tau_roid_mining_ship")]),action(){return!!ii($(this)[0])}},advanced_material_synthesis:{id:"tech-advanced_material_synthesis",title:F("tech_advanced_material_synthesis"),desc:F("tech_advanced_material_synthesis"),category:"crafting",era:"tauceti",path:["truepath"],reqs:{alien_data:5,disease:1},grant:["alien_crafting",1],cost:{Knowledge:()=>988e4},effect:()=>F("tech_advanced_material_synthesis_effect",[t.resource.Quantium.name]),action(){return!!ii($(this)[0])}},matrioshka_brain:{id:"tech-matrioshka_brain",title:F("tech_matrioshka_brain"),desc:F("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:()=>F("tech_matrioshka_brain_effect",[Sr.tauceti.tau_gas2.info.name()]),action(){return!!ii($(this)[0])&&(t.tauceti.matrioshka_brain={count:0},!0)}},ignition_device:{id:"tech-ignition_device",title:F("tech_ignition_device"),desc:F("tech_ignition_device"),category:"progress",era:"tauceti",path:["truepath"],reqs:{alien_data:6,tau_gas2:7},grant:["tau_gas2",8],cost:{Knowledge:()=>105e5},effect:()=>F("tech_ignition_device_effect",[Sr.tauceti.tau_gas2.info.name()]),action(){return!!ii($(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?F("tech_antireplicator"):F("tech_replicator"),desc:()=>"antimatter"===t.race.universe?F("tech_antireplicator"):F("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?F("tech_antireplicator_effect"):F("tech_replicator_effect"),action(){return!!ii($(this)[0])&&(t.race.replicator={res:"Unobtainium",pow:1},!0)}},womling_unlock:{id:"tech-womling_unlock",title:F("tech_womling_unlock"),desc:F("tech_womling_unlock"),category:"womling",era:"tauceti",path:["truepath"],reqs:{replicator:1},trait:["lone_survivor"],grant:["tau_red",4],cost:{Knowledge:()=>65e5},effect:()=>F("tech_womling_unlock_effect",[F("tau_planet",[Vt().red])]),action(){return!!ii($(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:F("tech_garden_of_eden"),desc:F("tech_garden_of_eden"),category:"special",era:"tauceti",path:["truepath"],reqs:{eden:1},grant:["eden",2],cost:{Knowledge:()=>1e7},effect:()=>F("tech_garden_of_eden_effect"),action(){return!!ii($(this)[0])&&(t.tauceti.goe_facility={count:0},!0)}}};function Pr(){t.tech.world_control=1,Cs($("#garrison")),Cs($("#c_garrison")),me($("#garrison"),!0),me($("#c_garrison"),!1);for(let e=0;e<3;e++){if(t.civic.foreign[`gov${e}`].occ){let a=aa("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 jr(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 i=(t.stats.hasOwnProperty("reset")?t.stats.reset:0)%r.length;return e?F(`cheese_${r[i]}`):F("tech_swiss_bank",[F(`cheese_${r[i]}`)])}const Or={standard:["primitive","discovery","civilized","industrialized","globalized","early_space","deep_space","interstellar","intergalactic","dimensional"],truepath:["primitive","discovery","civilized","industrialized","globalized","early_space","deep_space","solar","tauceti"]};function Mr(e){if(e){let t={};return Object.keys(qr).forEach((function(a){(Or[e].includes(qr[a].era)||qr[a].hasOwnProperty("path"))&&(!qr[a].hasOwnProperty("path")||qr[a].hasOwnProperty("path")&&qr[a].path.includes(e))&&(t[a]=qr[a])})),t}return qr}const Sr={evolution:{rna:{id:"evolution-rna",title:F("resource_RNA_name"),desc:()=>F("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:F("evo_dna_title"),desc:F("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:F("evo_membrane_title"),desc:F("evo_membrane_desc"),condition:()=>t.evolution.hasOwnProperty("membrane")&&!t.race.evoFinalMenu,cost:{RNA:e=>Br("membrane",2,2,e)},effect:()=>F("evo_membrane_effect",[t.evolution.mitochondria?5*t.evolution.mitochondria.count+5:5]),action(){return!!ii($(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:F("evo_organelles_title"),desc:F("evo_organelles_desc"),condition:()=>t.evolution.hasOwnProperty("organelles")&&!t.race.evoFinalMenu,cost:{RNA:e=>Br("organelles",12,8,e),DNA:e=>Br("organelles",4,4,e)},effect(){let e=t.race.rapid_mutation?2:1;return t.evolution.sexual_reproduction&&t.evolution.sexual_reproduction.count>0&&e++,F("evo_organelles_effect",[e])},action(){return!!ii($(this)[0])&&(t.evolution.organelles.count++,!0)}},nucleus:{id:"evolution-nucleus",title:F("evo_nucleus_title"),desc:F("evo_nucleus_desc"),condition:()=>t.evolution.hasOwnProperty("nucleus")&&!t.race.evoFinalMenu,cost:{RNA:e=>Br("nucleus",38,t.tech.evo&&t.tech.evo>=4?16:32,e),DNA:e=>Br("nucleus",18,t.tech.evo&&t.tech.evo>=4?12:16,e)},effect:()=>F("evo_nucleus_effect",[t.evolution.bilateral_symmetry&&t.evolution.bilateral_symmetry.count>0||t.evolution.poikilohydric&&t.evolution.poikilohydric.count>0||t.evolution.spores&&t.evolution.spores.count>0?2:1]),action(){return!!ii($(this)[0])&&(t.evolution.nucleus.count++,!0)}},eukaryotic_cell:{id:"evolution-eukaryotic_cell",title:F("evo_eukaryotic_title"),desc:F("evo_eukaryotic_desc"),condition:()=>t.evolution.hasOwnProperty("eukaryotic_cell")&&!t.race.evoFinalMenu,cost:{RNA:e=>Br("eukaryotic_cell",20,20,e),DNA:e=>Br("eukaryotic_cell",40,12,e)},effect:()=>F("evo_eukaryotic_effect",[t.evolution.mitochondria?10*t.evolution.mitochondria.count+10:10]),action(){return!!ii($(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:F("evo_mitochondria_title"),desc:F("evo_mitochondria_desc"),condition:()=>t.evolution.hasOwnProperty("mitochondria")&&!t.race.evoFinalMenu,cost:{RNA:e=>Br("mitochondria",75,50,e),DNA:e=>Br("mitochondria",65,35,e)},effect:F("evo_mitochondria_effect"),action(){return!!ii($(this)[0])&&(t.evolution.mitochondria.count++,!0)}},sexual_reproduction:{id:"evolution-sexual_reproduction",title:F("evo_sexual_reproduction_title"),desc:F("evo_sexual_reproduction_desc"),reqs:{evo:1},grant:["evo",2],condition:()=>t.tech.evo&&1===t.tech.evo,cost:{DNA:()=>150},effect:F("evo_sexual_reproduction_effect"),action(){return!!ii($(this)[0])&&(t.evolution.final=20,!0)},queue_complete:()=>t.tech.evo&&1===t.tech.evo?1:0},phagocytosis:{id:"evolution-phagocytosis",title:F("evo_phagocytosis_title"),desc:F("evo_phagocytosis_desc"),reqs:{evo:2},grant:["evo",3],condition:()=>t.tech.evo&&2===t.tech.evo,cost:{DNA:()=>175},effect:F("evo_phagocytosis_effect"),action(){return!!ii($(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?F("genelab_genus_plant"):F("evo_chloroplasts_title"),desc:F("evo_chloroplasts_desc"),reqs:{evo:2},grant:["evo",3],condition:()=>Fr(2),cost:{DNA:()=>175},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                            ${F("evo_chloroplasts_effect")}
                            ${F("evo_warn_unwise")}
                            `:F("evo_chloroplasts_effect"),action(){return!!ii($(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:()=>Ys("genus_plant")},chitin:{id:"evolution-chitin",title:()=>t.evolution.gselect?F("genelab_genus_fungi"):F("evo_chitin_title"),desc:F("evo_chitin_desc"),reqs:{evo:2},grant:["evo",3],condition:()=>Fr(2),cost:{DNA:()=>175},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                            ${F("evo_chitin_effect")}
                            ${F("evo_warn_unwise")}
                            `:F("evo_chitin_effect"),action(){return!!ii($(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:()=>Ys("genus_fungi")},exterminate:{id:"evolution-exterminate",title:()=>t.evolution.gselect?F("genelab_genus_synthetic"):F("evo_exterminate_title"),desc:F("evo_exterminate_desc"),reqs:{evo:2},grant:["evo",7],condition:()=>Fr(2)&&t.stats.achieve.obsolete&&t.stats.achieve.obsolete.l>=5,cost:{DNA:()=>200},effect:()=>F("evo_exterminate_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_synthetic=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&2===t.tech.evo?1:0,emblem:()=>Ys("genus_synthetic")},multicellular:{id:"evolution-multicellular",title:F("evo_multicellular_title"),desc:F("evo_multicellular_desc"),reqs:{evo:3},grant:["evo",4],condition:()=>t.tech.evo&&3===t.tech.evo,cost:{DNA:()=>200},effect:F("evo_multicellular_effect"),action(){return!!ii($(this)[0])&&(t.evolution.final=60,!0)},queue_complete:()=>t.tech.evo&&3===t.tech.evo?1:0},spores:{id:"evolution-spores",title:F("evo_spores_title"),desc:F("evo_spores_desc"),reqs:{evo:4,evo_fungi:1},grant:["evo",5],condition:()=>t.tech.evo&&4===t.tech.evo,cost:{DNA:()=>230},effect:F("evo_nucleus_boost"),action(){return!!ii($(this)[0])&&(t.evolution.final=80,!0)},queue_complete:()=>t.tech.evo&&4===t.tech.evo?1:0},poikilohydric:{id:"evolution-poikilohydric",title:F("evo_poikilohydric_title"),desc:F("evo_poikilohydric_desc"),reqs:{evo:4,evo_plant:1},grant:["evo",5],condition:()=>t.tech.evo&&4===t.tech.evo,cost:{DNA:()=>230},effect:F("evo_nucleus_boost"),action(){return!!ii($(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:F("evo_bilateral_symmetry_title"),desc:F("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:F("evo_nucleus_boost"),action(){return!!ii($(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:F("evo_bryophyte_title"),desc:F("evo_bryophyte_desc"),reqs:{evo:5},grant:["evo",7],condition:()=>!(!t.tech.evo_plant&&!t.tech.evo_fungi)&&Fr(5),cost:{DNA:()=>260},effect:F("evo_bryophyte_effect"),action(){return!!ii($(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:F("evo_athropods_title"),desc:F("evo_athropods_desc"),reqs:{evo:5,evo_insectoid:1},grant:["evo",7],condition:()=>Fr(5),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                            ${F("evo_athropods_effect")}
                            ${F("evo_warn_unwise")}
                            `:F("evo_athropods_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_insectoid=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Ys("genus_insectoid")},mammals:{id:"evolution-mammals",title:F("evo_mammals_title"),desc:F("evo_mammals_desc"),reqs:{evo:5,evo_mammals:1},grant:["evo",6],condition:()=>t.tech.evo&&5===t.tech.evo,cost:{DNA:()=>245},effect:F("evo_mammals_effect"),action(){return!!ii($(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:F("evo_humanoid_title"),desc:F("evo_humanoid_desc"),reqs:{evo:6,evo_humanoid:1},grant:["evo",7],condition:()=>Fr(6),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                            ${F("evo_humanoid_effect")}
                            ${F("evo_warn_unwise")}
                            `:F("evo_humanoid_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_humanoid=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Ys("genus_humanoid")},gigantism:{id:"evolution-gigantism",title:F("evo_gigantism_title"),desc:F("evo_gigantism_desc"),reqs:{evo:6,evo_giant:1},grant:["evo",7],condition:()=>Fr(6),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                            ${F("evo_gigantism_effect")}
                            ${F("evo_warn_unwise")}
                            `:F("evo_gigantism_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_giant=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Ys("genus_giant")},dwarfism:{id:"evolution-dwarfism",title:F("evo_dwarfism_title"),desc:F("evo_dwarfism_desc"),reqs:{evo:6,evo_small:1},grant:["evo",7],condition:()=>Fr(6),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                            ${F("evo_dwarfism_effect")}
                            ${F("evo_warn_unwise")}
                            `:F("evo_dwarfism_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_small=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Ys("genus_small")},animalism:{id:"evolution-animalism",title:F("evo_animalism_title"),desc:F("evo_animalism_desc"),reqs:{evo:6,evo_animalism:1},grant:["evo",7],condition:()=>Fr(6)&&t.tech.evo_animalism&&1===t.tech.evo_animalism,cost:{DNA:()=>250},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                            ${F("evo_animalism_effect")}
                            ${F("evo_warn_unwise")}
                            `:F("evo_animalism_effect"),action(){return!!ii($(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:F("evo_carnivore_title"),desc:F("evo_carnivore_desc"),reqs:{evo_animalism:2},grant:["evo_animalism",3],condition:()=>Fr(7)&&t.tech.evo_animalism&&2===t.tech.evo_animalism,cost:{DNA:()=>255},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                            ${F("evo_carnivore_effect")}
                            ${F("evo_warn_unwise")}
                            `:F("evo_carnivore_effect"),action(){return!!ii($(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:()=>Ys("genus_carnivore")},herbivore:{id:"evolution-herbivore",title:F("evo_herbivore_title"),desc:F("evo_herbivore_desc"),reqs:{evo_animalism:2},grant:["evo_animalism",3],condition:()=>Fr(7)&&t.tech.evo_animalism&&2===t.tech.evo_animalism,cost:{DNA:()=>255},effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                            ${F("evo_herbivore_effect")}
                            ${F("evo_warn_unwise")}
                            `:F("evo_herbivore_effect"),action(){return!!ii($(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:()=>Ys("genus_herbivore")},omnivore:{id:"evolution-omnivore",title:F("evo_omnivore_title"),desc:F("evo_omnivore_desc"),reqs:{evo_animalism:2,locked:1},grant:["evo_animalism",3],condition:()=>Fr(7)&&t.tech.evo_animalism&&2===t.tech.evo_animalism,cost:{DNA:()=>255},wiki:!1,effect:()=>"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                            ${F("evo_omnivore_effect")}
                            ${F("evo_warn_unwise")}
                            `:F("evo_omnivore_effect"),action(){return!!ii($(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:()=>Ys("genus_omnivore")},celestial:{id:"evolution-celestial",title:F("evo_celestial_title"),desc:F("evo_celestial_desc"),reqs:{evo:6,evo_angelic:1},grant:["evo",7],condition:()=>!!("eden"===t.city.biome||t.blood.unbound&&t.blood.unbound>=3)&&Fr(6),cost:{DNA:()=>260},effect:()=>F("evo_celestial_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_angelic=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Ys("genus_angelic")},demonic:{id:"evolution-demonic",title:F("evo_demonic_title"),desc:F("evo_demonic_desc"),reqs:{evo:6,evo_demonic:1},grant:["evo",7],condition:()=>!!("hellscape"===t.city.biome||t.blood.unbound&&t.blood.unbound>=3)&&Fr(6),cost:{DNA:()=>260},effect:()=>"hellscape"===t.city.biome&&"evil"===t.race.universe?`
                            ${F("evo_demonic_effect")}
                            ${F("evo_warn_unwise")}
                            `:F("evo_demonic_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_demonic=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Ys("genus_demonic")},eldritch:{id:"evolution-eldritch",title:F("evo_eldritch_title"),desc:F("evo_eldritch_desc"),reqs:{evo:5,evo_eldritch:1},grant:["evo",7],condition:()=>!(!t.stats.achieve.nightmare||!t.stats.achieve.nightmare.mg)&&Fr(5),cost:{DNA:()=>260},effect:F("evo_eldritch_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_eldritch=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Ys("genus_eldritch")},aquatic:{id:"evolution-aquatic",title:F("evo_aquatic_title"),desc:F("evo_aquatic_desc"),reqs:{evo:5,evo_aquatic:1},grant:["evo",7],condition:()=>!(!["oceanic","swamp"].includes(t.city.biome)&&!t.blood.unbound)&&Fr(5),cost:{DNA:()=>260},effect:F("evo_aquatic_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_aquatic=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Ys("genus_aquatic")},fey:{id:"evolution-fey",title:F("evo_fey_title"),desc:F("evo_fey_desc"),reqs:{evo:5,evo_fey:1},grant:["evo",7],condition:()=>!(!["forest","swamp","taiga"].includes(t.city.biome)&&!t.blood.unbound)&&Fr(5),cost:{DNA:()=>260},effect:F("evo_fey_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_fey=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Ys("genus_fey")},heat:{id:"evolution-heat",title:F("evo_heat_title"),desc:F("evo_heat_desc"),reqs:{evo:5,evo_heat:1},grant:["evo",7],condition:()=>!(!["volcanic","ashland"].includes(t.city.biome)&&!t.blood.unbound)&&Fr(5),cost:{DNA:()=>260},effect:F("evo_heat_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_heat=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Ys("genus_heat")},polar:{id:"evolution-polar",title:F("evo_polar_title"),desc:F("evo_polar_desc"),reqs:{evo:5,evo_polar:1},grant:["evo",7],condition:()=>!(!["tundra","taiga"].includes(t.city.biome)&&!t.blood.unbound)&&Fr(5),cost:{DNA:()=>260},effect:F("evo_polar_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_polar=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Ys("genus_polar")},sand:{id:"evolution-sand",title:F("evo_sand_title"),desc:F("evo_sand_desc"),reqs:{evo:5,evo_sand:1},grant:["evo",7],condition:()=>!(!["desert","ashland"].includes(t.city.biome)&&!t.blood.unbound)&&Fr(5),cost:{DNA:()=>260},effect:F("evo_sand_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_sand=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&5===t.tech.evo?1:0,emblem:()=>Ys("genus_sand")},eggshell:{id:"evolution-eggshell",title:F("evo_eggshell_title"),desc:F("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?`
                            ${F("evo_eggshell_effect")}
                            ${F("evo_warn_unwise")}
                            `:F("evo_eggshell_effect"),action(){return!!ii($(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?F("genelab_genus_avian"):F("evo_endothermic_title"),desc:F("evo_endothermic_desc"),reqs:{evo:6,evo_eggshell:2},grant:["evo",7],condition:()=>Fr(6),cost:{DNA:()=>260},effect:F("evo_endothermic_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_avian=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Ys("genus_avian")},ectothermic:{id:"evolution-ectothermic",title:()=>t.evolution.gselect?F("genelab_genus_reptilian"):F("evo_ectothermic_title"),desc:F("evo_ectothermic_desc"),reqs:{evo:6,evo_eggshell:2},grant:["evo",7],condition:()=>Fr(6),cost:{DNA:()=>260},effect:F("evo_ectothermic_effect"),action(){return!!ii($(this)[0])&&(t.tech.evo_reptilian=2,t.evolution.final=100,!0)},queue_complete:()=>t.tech.evo&&6===t.tech.evo?1:0,emblem:()=>Ys("genus_reptilian")},sentience:{id:"evolution-sentience",title:F("evo_sentience_title"),desc:F("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?F("evo_sentience_ai_effect"):F("evo_sentience_effect"),action(){if(ii($(this)[0])){let e=[],a="humanoid";for(let e in Ei)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 Ar){let r=Ar[t];Di[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))]),mi()}return!1},emblem(){for(let e in Ar){let a=Ar[e];if(t.tech[`evo_${Di[a].type}`]&&t.tech[`evo_${Di[a].type}`]>=2)return Ys(`genus_${Di[a].type}`)}return""},queue_complete:()=>t.tech.evo&&7===t.tech.evo?1:0}},city:{gift:{id:"city-gift",title:F("city_gift"),desc:F("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,ms(F("city_gift_msg",[100,F("arpa_genepool_effect_antiplasmid")]),"info",!1,["events"])):(t.prestige.Plasmid.count+=100,t.stats.plasmid+=100,ms(F("city_gift_msg",[100,F("arpa_genepool_effect_plasmid")]),"info",!1,["events"])),Qr());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),i=[];if(t.stats.died+t.stats.tdied>0){let e=t.stats.died+t.stats.tdied;t.resource.Coal.amount+=e,i.push(`${e.toLocaleString()} ${F("resource_Coal_name")}`)}if("antimatter"===t.race.universe?(t.prestige.AntiPlasmid.count+=e,t.stats.antiplasmid+=e,i.push(`${e.toLocaleString()} ${F("resource_AntiPlasmid_plural_name")}`)):(t.prestige.Plasmid.count+=e,t.stats.plasmid+=e,i.push(`${e.toLocaleString()} ${F("resource_Plasmid_plural_name")}`)),r>0&&(t.prestige.Phage.count+=r,t.stats.phage+=r,i.push(`${r.toLocaleString()} ${F("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,s=t.stats.achieve.corrupted?t.stats.achieve.corrupted.l:0,n=t.stats.achieve.obsolete?t.stats.achieve.obsolete.l:0;if(e>30&&(e=30),r>5&&(r=5),s>5&&(s=5),e>0){let a=+(e/7.5).toFixed(2);t.prestige.Dark.count+=a,t.stats.dark+=a,i.push(`${a} ${F("resource_Dark_name")}`)}if(r>0&&(t.prestige.Harmony.count+=r,t.stats.harmony+=r,i.push(`${r} ${F("resource_Harmony_name")}`)),s>0){let e=5*s,a=s;t.prestige.Blood_Stone.count+=e,t.stats.blood+=e,t.prestige.Artifact.count+=a,t.stats.artifact+=a,i.push(`${e} ${F("resource_Blood_Stone_name")}`),i.push(`${a} ${F("resource_Artifact_name")}`)}"g2020"!==a&&n>0&&(t.prestige.AICore.count+=n,t.stats.cores+=n,i.push(`${n} ${F("resource_AICore_name")}`))}ms(F("city_gift2_msg",[i.join(", ")]),"info",!1,["events"]),Qr()}}return!1},touchlabel:F("open")},food:{id:"city-food",title:()=>_n().active?t.tech.conjuring?F("city_trick_conjure"):F("city_trick"):t.tech.conjuring?F("city_food_conjure"):F("city_food"),desc(){let e=$(this)[0].val(!1);return _n().active?t.tech.conjuring?F("city_trick_conjure_desc",[e]):F("city_trick_desc",[e]):t.tech.conjuring?F("city_food_conjure_desc",[e]):F("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.amount_n().active?t.tech.conjuring&&t.tech.conjuring>=2?F("city_dig_conjour"):F("city_dig"):t.tech.conjuring&&t.tech.conjuring>=2?F("city_lumber_conjure"):F("city_lumber"),desc(){let e=$(this)[0].val(!1);return _n().active?t.tech.conjuring&&t.tech.conjuring>=2?F("city_dig_conjour_desc",[e]):F("city_dig_desc",[e]):t.tech.conjuring&&t.tech.conjuring>=2?F("city_lumber_conjure_desc",[e]):F("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?F("city_conjour",[t.resource.Stone.name]):F("city_gather",[t.resource.Stone.name]),desc(){let e=$(this)[0].val(!1);return t.tech.conjuring&&t.tech.conjuring>=2?F("city_stone_conjour_desc",[e,t.resource.Stone.name]):F(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?F("city_chrysotile_conjour"):F("city_gather",[t.resource.Chrysotile.name]),desc(){let e=$(this)[0].val(!1);return t.tech.conjuring&&t.tech.conjuring>=2?F("city_stone_conjour_desc",[e,t.resource.Chrysotile.name]):F("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?F("city_evil_desc3"):F("city_evil_desc2"):F("city_evil_desc1"):t.resource.hasOwnProperty("furs")&&t.resource.Furs.display?F("city_evil_desc4"):F("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?Ki.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&&ii($(this)[0]))&&(t.city.slave_pen.slaves++,t.resource.Slave.amount=t.city.slave_pen.slaves,!0)},touchlabel:F("purchase")},s_alter:{id:"city-s_alter",title:F("city_s_alter"),desc:()=>t.city.hasOwnProperty("s_alter")&&t.city.s_alter.count>=1?`
                            ${F("city_s_alter")}
                            ${F("city_s_alter_desc")}
                            `:F("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=`
                            ${F("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+=`
                            ${F("city_s_alter_rage",[Ki.cannibalize.vars()[0],Fs(t.city.s_alter.rage)])}
                            `),t.city.hasOwnProperty("s_alter")&&t.city.s_alter.regen>0&&(e+=`
                            ${F("city_s_alter_regen",[Ki.cannibalize.vars()[0],Fs(t.city.s_alter.regen)])}
                            `),t.city.hasOwnProperty("s_alter")&&t.city.s_alter.mind>0&&(e+=`
                            ${F("city_s_alter_mind",[Ki.cannibalize.vars()[0],Fs(t.city.s_alter.mind)])}
                            `),t.city.hasOwnProperty("s_alter")&&t.city.s_alter.mine>0&&(e+=`
                            ${F("city_s_alter_mine",[Ki.cannibalize.vars()[0],Fs(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?F("job_reclaimer"):F("job_lumberjack");e+=`
                            ${F("city_s_alter_harvest",[Ki.cannibalize.vars()[0],Fs(t.city.s_alter.harvest),a])}
                            `}return e},action(){if(ii($(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:F("tech_dist_sacrifice")},basic_housing:{id:"city-basic_housing",title:()=>pi(),desc:F("city_basic_housing_desc"),desc(){return 1===$(this)[0].citizens()?F("city_basic_housing_desc"):F("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?Ps("basic_housing",e,20,1.17):0),Lumber:e=>t.race.kindling_kindred||t.race.smoldering?0:Ps("basic_housing",e,10,1.23),Stone:e=>t.race.kindling_kindred?Ps("basic_housing",e,10,1.23):0,Chrysotile:e=>t.race.smoldering?Ps("basic_housing",e,10,1.23):0,Horseshoe:()=>t.race.hooved?1:0},effect(){let e=$(this)[0].citizens();return t.race.sappy?`
                            ${F("plus_max_resource",[e,F("citizen")])}
                            ${F("city_grove_effect",[2.5])}
                            `:F("plus_max_resource",[e,F("citizen")])},action(){return!!ii($(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*=Ki.high_pop.vars()[0]),e}},cottage:{id:"city-cottage",title:()=>ui("medium"),desc(){return F("city_cottage_desc",[$(this)[0].citizens()])},category:"residential",reqs:{housing:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("cottage",e,900,1.15),Plywood:e=>Ps("cottage",e,25,1.25),Brick:e=>Ps("cottage",e,20,1.25),Wrought_Iron:e=>Ps("cottage",e,15,1.25),Iron:e=>t.city.ptrait.includes("unstable")?Ps("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=wr(t.tech.home_safe>=2?t.tech.home_safe>=3?5e3:2e3:1e3);return`
                            ${F("plus_max_citizens",[e])}
                            ${F("plus_max_resource",[`$${a.toLocaleString()}`,F("resource_Money_name")])}
                            `}return F("plus_max_citizens",[e])},action(){return!!ii($(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*=Ki.high_pop.vars()[0]),e}},apartment:{id:"city-apartment",title:()=>ui("large"),desc(){return`
                            ${F("city_apartment_desc",[$(this)[0].citizens()])}
                            ${F("requires_power")}
                            `},category:"residential",reqs:{housing:3},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("apartment",e,1750,1.26)-500,Crystal:e=>"magic"===t.race.universe?Ps("apartment",e,25,1.22):0,Furs:e=>Ps("apartment",e,725,1.32)-500,Copper:e=>Ps("apartment",e,650,1.32)-500,Cement:e=>Ps("apartment",e,700,1.32)-500,Steel:e=>Ps("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=wr(t.tech.home_safe>=2?t.tech.home_safe>=3?1e4:5e3:2e3);return e&&(r*=2),`
                            ${F("plus_max_citizens",[a])}. ${F("minus_power",[$(this)[0].powered()])}
                            ${F("plus_max_resource",[`$${r.toLocaleString()}`,F("resource_Money_name")])}
                            `}return`${F("plus_max_citizens",[a])}. ${F("minus_power",[$(this)[0].powered()])}`},powered:()=>Is(D("extravagant",1)||1),action(){return!!ii($(this)[0])&&(t.city.apartment.count++,ei($(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*=Ki.high_pop.vars()[0]),a}},lodge:{id:"city-lodge",title:F("city_lodge"),desc:()=>t.race.detritivore?F("city_lodge_desc_alt"):F("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=>Ps("lodge",e,50,1.32),Lumber:e=>Ps("lodge",e,20,1.36),Stone:e=>Ps("lodge",e,10,1.36),Horseshoe:()=>t.race.hooved?1:0},effect(){let e=$(this)[0].citizens();return t.race.carnivore&&!t.race.artifical?`
                            ${F("plus_max_resource",[e,F("citizen")])}
                            ${F("city_lodge_effect",[5])}
                            `:F("plus_max_resource",[e,F("citizen")])},action(){return!!ii($(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*=Ki.high_pop.vars()[0]),e}},smokehouse:{id:"city-smokehouse",title:()=>t.race.hrt&&["wolven","vulpine"].includes(t.race.hrt)?F("city_smokehouse_easter"):F("city_smokehouse"),desc:F("city_smokehouse_desc"),category:"trade",reqs:{hunting:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("smokehouse",e,85,1.32),Lumber:e=>Ps("smokehouse",e,65,1.36),Stone:e=>Ps("smokehouse",e,50,1.36)},effect:()=>`
                            ${F("plus_max_resource",[Gr(wr(100)),F("resource_Food_name")])}
                            ${F("city_smokehouse_effect",[10])}
                            `,action(){return!!ii($(this)[0])&&(t.city.smokehouse.count++,t.resource.Food.max+=Gr(wr(100)),!0)}},soul_well:{id:"city-soul_well",title:F("city_soul_well"),desc:F("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?Ps("soul_well",e,50,1.32):0),Lumber:e=>Ps("soul_well",e,20,1.36),Stone:e=>Ps("soul_well",e,10,1.36)},effect(){let e=Gr(wr(500));return`
                            ${F("city_soul_well_effect",[t.race.ghostly?2+Ki.ghostly.vars()[1]:2])}
                            ${F("plus_max_resource",[e,F("resource_Souls_name")])}
                            `},action(){return!!ii($(this)[0])&&(t.city.soul_well.count++,t.resource.Food.max+=Gr(wr(500)),!0)}},slave_pen:{id:"city-slave_pen",title:F("city_slave_pen"),desc:F("city_slave_pen"),category:"commercial",reqs:{slaves:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("slave_pen",e,250,1.32),Lumber:e=>Ps("slave_pen",e,100,1.36),Stone:e=>Ps("slave_pen",e,75,1.36),Copper:e=>Ps("slave_pen",e,10,1.36),Nanite:e=>t.race.deconstructor?Ps("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`
                            ${F("city_slave_pen_effect",[4])}
                            ${F("city_slave_pen_effect2",[a,e])}
                            `},action(){return!!ii($(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:F("city_transmitter"),desc:()=>`
                            ${F("city_transmitter_desc")}
                            ${F("requires_power")}
                            `,category:"residential",reqs:{high_tech:4},trait:["artifical"],cost:{Money:e=>t.city.transmitter&&t.city.transmitter.count>=3?Ps("transmitter",e,50,1.32):0,Copper:e=>Ps("transmitter",e,20,1.36),Steel:e=>Ps("transmitter",e,10,1.36)},effect(){let e=+xe("transmitter").toFixed(2),a=wr(100);return`
                            ${F("gain",[e,t.resource.Food.name])}
                            ${F("city_transmitter_effect",[a])}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `},powered:()=>Is(.5),powerBalancer:()=>[{r:"Food",k:"lpmod"}],action(){return!!ii($(this)[0])&&(t.city.transmitter.count++,ei($(this)[0]),!0)}},captive_housing:zr("captive_housing","city"),farm:{id:"city-farm",title:F("city_farm"),desc:F("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?Ps("farm",e,50,1.32):0),Lumber:e=>Ps("farm",e,20,1.36),Stone:e=>Ps("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?`
                            ${F("city_farm_effect")}
                            ${F("plus_max_resource",[e,F("citizen")])}
                            `:F("city_farm_effect")},action(){return!!ii($(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*=Ki.high_pop.vars()[0]),e},flair:()=>t.tech.agriculture>=7?F("city_farm_flair2"):F("city_farm_flair1")},compost:{id:"city-compost",title:F("city_compost_heap"),desc:F("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?Ps("compost",e,50,1.32):0),Lumber:e=>Ps("compost",e,12,1.36),Stone:e=>Ps("compost",e,12,1.36)},effect(){let e=1.2+.8*(t.tech.compost?t.tech.compost:0);e*="grassland"===t.city.biome?ss.grassland.vars()[0]:1,e*="savanna"===t.city.biome?ss.savanna.vars()[0]:1,e*="ashland"===t.city.biome?ss.ashland.vars()[0]:1,e*="volcanic"===t.city.biome?ss.volcanic.vars()[0]:1,e*="hellscape"===t.city.biome?ss.hellscape.vars()[0]:1,e*=t.city.ptrait.includes("trashed")?ns.trashed.vars()[0]:1,e=+e.toFixed(2);let a=Gr(wr(200)),r=t.race.kindling_kindred?"":`
                            ${F("city_compost_heap_effect2",[.5,t.resource.Lumber.name])}
                            `;return`
                            ${F("city_compost_heap_effect",[e])}
                            ${F("city_compost_heap_effect3",[a])}
                            ${r}`},switchable:()=>!0,action(){return!!ii($(this)[0])&&(t.city.compost.count++,t.city.compost.on++,t.resource.Food.max+=Gr(wr(200)),!0)}},mill:{id:"city-mill",title:()=>t.tech.agriculture>=5?F("city_mill_title2"):F("city_mill_title1"),desc(){let e=t.tech.agriculture>=5?5:3;return t.tech.agriculture>=6?F("city_mill_desc2",[e,-1*$(this)[0].powered()]):F("city_mill_desc1",[e])},category:"utility",reqs:{agriculture:4},not_tech:["wind_plant"],not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("mill",e,1e3,1.31),Lumber:e=>Ps("mill",e,600,1.33),Iron:e=>Ps("mill",e,150,1.33),Cement:e=>Ps("mill",e,125,1.33)},powered:()=>t.race.environmentalist?-1.5:-1,power_reqs:{agriculture:6},effect:()=>t.tech.agriculture>=6&&`${F("city_on")} ${F("city_mill_effect1")} ${F("city_off")} ${F("city_mill_effect2")}`,action(){return!!ii($(this)[0])&&(t.city.mill.count++,!0)}},windmill:{id:"city-windmill",title:()=>t.race.unfathomable?F("tech_watermill"):F("city_mill_title2"),desc:()=>t.race.unfathomable?F("tech_watermill"):F("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=>Ps("windmill",e,1e3,1.31),Lumber:e=>Ps("windmill",e,600,1.33),Iron:e=>Ps("windmill",e,150,1.33),Cement:e=>Ps("windmill",e,125,1.33)},effect(){return`
                            ${F("space_dwarf_reactor_effect1",[-1*$(this)[0].powered()])}
                            `},action(){return!!ii($(this)[0])&&(t.city.windmill.count++,!0)}},silo:{id:"city-silo",title:F("city_silo"),desc:F("city_food_storage"),category:"trade",reqs:{agriculture:3},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("silo",e,85,1.32),Lumber:e=>Ps("silo",e,65,1.36),Stone:e=>Ps("silo",e,50,1.36),Iron:e=>(t.city.silo?t.city.silo.count:0)+(e||0)>=4&&t.city.ptrait.includes("unstable")?Ps("silo",e,10,1.36):0},effect:()=>F("plus_max_resource",[Gr(wr(500)),F("resource_Food_name")]),action(){return!!ii($(this)[0])&&(t.city.silo.count++,t.resource.Food.max+=Gr(wr(500)),!0)}},assembly:zr("assembly","city"),garrison:{id:"city-garrison",title:()=>t.race.flier?F("city_garrison_flier"):F("city_garrison"),desc:F("city_garrison_desc"),category:"military",reqs:{military:1,housing:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("garrison",e,240,1.5),Stone:e=>Ps("garrison",e,260,1.46),Iron:e=>(t.city.garrison?t.city.garrison.count:0)+(e||0)>=4&&t.city.ptrait.includes("unstable")?Ps("garrison",e,50,1.4):0,Horseshoe:()=>t.race.hooved?t.race.chameleon?1:2:0},effect(){let e=t.tech.military>=5?aa(3):aa(2);return t.race.chameleon&&e--,F("plus_max_resource",[e,F("civics_garrison_soldiers")])},switchable:()=>!0,action(){if(ii($(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,zs({el:"#garrison"},"update"),zs({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:F("city_hospital"),desc:F("city_hospital_desc"),category:"military",reqs:{medic:1},not_trait:["cataclysm","artifical"],cost:{Money:e=>Ps("hospital",e,22e3,1.32),Furs:e=>Ps("hospital",e,4e3,1.32),Iron:e=>t.city.ptrait.includes("unstable")?Ps("hospital",e,500,1.32):0,Aluminium:e=>Ps("hospital",e,1e4,1.32)},effect(){let e=t.tech.reproduction&&t.tech.reproduction>=2?`
                            ${F("city_hospital_effect2")}
                            `:"",a=`
                            ${F("city_hospital_effect",[5*t.tech.medic])}
                            ${e}`;return!t.race.artifical&&t.race.hasOwnProperty("vax")&&(a+=`
                            ${F("tau_home_disease_lab_vax",[+t.race.vax.toFixed(2)])}
                            `),a},action(){return!!ii($(this)[0])&&(t.city.hospital.count++,!0)}},boot_camp:{id:"city-boot_camp",title:()=>t.race.artifical?F("city_boot_camp_art"):F("city_boot_camp"),desc:()=>t.race.artifical?F("city_boot_camp_art_desc",[Di[t.race.species].name]):F("city_boot_camp_desc"),category:"military",reqs:{boot_camp:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("boot_camp",e,5e4,1.32),Lumber:e=>Ps("boot_camp",e,21500,1.32),Iron:e=>t.city.ptrait.includes("unstable")?Ps("boot_camp",e,300,1.32):0,Aluminium:e=>Ps("boot_camp",e,12e3,1.32),Brick:e=>Ps("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?`
                            ${F("city_boot_camp_effect",[e])}
                            ${F("city_boot_camp_effect2",[10])}
                            `:`
                            ${F("city_boot_camp_effect",[e])}
                            `;return t.race.artifical&&!t.race.orbit_decayed&&(r+=`
                            ${F("city_boot_camp_art_effect",[5*(t.tech.medic||1)])}
                            `),t.race.artifical&&t.race.hasOwnProperty("vax")&&(desc+=`
                            ${F("tau_home_disease_lab_vax",[+t.race.vax.toFixed(2)])}
                            `),r},action(){return!!ii($(this)[0])&&(t.city.boot_camp.count++,!0)}},shed:{id:"city-shed",title:()=>t.tech.storage<=2?F("city_shed_title1"):t.tech.storage>=4?F("city_shed_title3"):F("city_shed_title2"),desc(){let e=t.tech.storage>=3?t.tech.storage>=4?F("city_shed_desc_size3"):F("city_shed_desc_size2"):F("city_shed_desc_size1");return F("city_shed_desc",[e])},category:"trade",reqs:{storage:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("shed",e,75,1.22),Lumber:e=>t.tech.storage&&t.tech.storage<4?Ps("shed",e,55,1.32):0,Stone:e=>t.tech.storage&&t.tech.storage<3?Ps("shed",e,45,1.32):0,Iron:e=>t.tech.storage&&t.tech.storage>=4?Ps("shed",e,22,1.32):0,Cement:e=>t.tech.storage&&t.tech.storage>=3?Ps("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=Nr();for(const r of $(this)[0].res())t.resource[r].display&&(e+=`${F("plus_max_resource",[q(+(wr($(this)[0].val(r))*a).toFixed(0),1),t.resource[r].name])}`);return e+="
                            ",e},wide:!0,action(){if(ii($(this)[0])){t.city.shed.count++;let e=Nr();for(const a of $(this)[0].res())t.resource[a].display&&(t.resource[a].max+=wr($(this)[0].val(a)*e));return!0}return!1}},storage_yard:{id:"city-storage_yard",title:F("city_storage_yard"),desc:F("city_storage_yard_desc"),category:"trade",reqs:{container:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("storage_yard",e,10,bi(1.36)),Brick:e=>Ps("storage_yard",e,3,bi(1.35)),Wrought_Iron:e=>Ps("storage_yard",e,5,bi(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?`
                            ${F("plus_max_resource",[e,F("resource_Crates_name")])}
                            ${F("city_trade_effect",[1])}
                            `:F("plus_max_resource",[e,F("resource_Crates_name")])},action(){if(ii($(this)[0])){!1===t.resource.Crates.display&&ms(F("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,Cs($("#resources")),Ba(),t.settings.tabLoad&&(Da("storage"),E())),!0}return!1}},warehouse:{id:"city-warehouse",title:F("city_warehouse"),desc:F("city_warehouse_desc"),category:"trade",reqs:{steel_container:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("warehouse",e,400,bi(1.26)),Cement:e=>Ps("warehouse",e,75,bi(1.26)),Sheet_Metal:e=>Ps("warehouse",e,25,bi(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),F("plus_max_resource",[e,F("resource_Containers_name")])},action(){if(ii($(this)[0])){!1===t.resource.Containers.display&&ms(F("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,Cs($("#resources")),Ba(),t.settings.tabLoad&&Da("storage")),!0}return!1}},bank:{id:"city-bank",title:F("city_bank"),desc:()=>F("city_bank_desc",[Di[t.race.species].home]),category:"commercial",reqs:{banking:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("bank",e,250,1.35),Lumber:e=>Ps("bank",e,75,1.32),Stone:e=>Ps("bank",e,100,1.35),Iron:e=>(t.city.bank?t.city.bank.count:0)+(e||0)>=2&&t.city.ptrait.includes("unstable")?Ps("bank",e,30,1.3):0},effect(){let e=wi();return e=wr(e),e=(+e.toFixed(0)).toLocaleString(),t.tech.banking>=2?`
                            ${F("plus_max_resource",[`$${e}`,F("resource_Money_name")])}
                            ${F("plus_max_resource",[aa(1),F("banker_name")])}
                            `:F("plus_max_resource",[`$${e}`,F("resource_Money_name")])},action(){return!!ii($(this)[0])&&(t.resource.Money.max+=wr(1800),t.city.bank.count++,t.civic.banker.max=aa(t.city.bank.count),!0)}},pylon:{id:"city-pylon",title:F("city_pylon"),desc:F("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?Ps("pylon",e,10,1.48):0),Stone:e=>Ps("pylon",e,12,1.42),Crystal:e=>Ps("pylon",e,8,1.42)-3},effect(){let e=wr(5);return`
                            ${F("gain",[+(.01*Ts("magic")).toFixed(3),t.resource.Mana.name])}
                            ${F("plus_max_resource",[e,t.resource.Mana.name])}
                            `},special:()=>!!(t.tech.magic&&t.tech.magic>=3),action(){return!!ii($(this)[0])&&(t.city.pylon.count++,t.resource.Mana.max+=wr(5),!0)}},conceal_ward:{id:"city-conceal_ward",title:F("city_conceal_ward"),desc:F("city_conceal_ward"),category:"industrial",reqs:{roguemagic:3},not_trait:["cataclysm","orbit_decayed"],cost:{Money:e=>Ps("conceal_ward",e,500,1.25),Mana:e=>{return Ps("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=>Ps("conceal_ward",e,5,1.25)},effect:()=>`
                            ${F("city_conceal_ward_effect",[t.tech.roguemagic&&t.tech.roguemagic>=8?1.25:1])}
                            `,action(){return!!ii($(this)[0])&&(t.city.conceal_ward.count++,!0)}},graveyard:{id:"city-graveyard",title:F("city_graveyard"),desc:F("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?Ps("graveyard",e,5,1.85):0),Lumber:e=>Ps("graveyard",e,2,1.95),Stone:e=>Ps("graveyard",e,6,1.9)},effect(){let e=Gr(wr(100));return`
                            ${F("city_graveyard_effect",[8])}
                            ${F("plus_max_resource",[e,t.resource.Lumber.name])}
                            `},action(){return!!ii($(this)[0])&&(t.city.graveyard.count++,t.resource.Lumber.max+=Gr(wr(100)),!0)}},lumber_yard:{id:"city-lumber_yard",title:F("city_lumber_yard"),desc:F("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?Ps("lumber_yard",e,5,1.85):0),Lumber:e=>Ps("lumber_yard",e,6,1.9),Stone:e=>Ps("lumber_yard",e,2,1.95)},effect(){let e=Gr(wr(100));return`
                            ${F("city_lumber_yard_effect",[2])}
                            ${F("plus_max_resource",[e,t.resource.Lumber.name])}
                            `},action(){return!!ii($(this)[0])&&(t.city.lumber_yard.count++,t.civic.lumberjack.display=!0,t.resource.Lumber.max+=Gr(wr(100)),!0)}},sawmill:{id:"city-sawmill",title:F("city_sawmill"),desc:F("city_sawmill_desc"),category:"industrial",reqs:{saw:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("sawmill",e,3e3,1.26),Iron:e=>Ps("sawmill",e,400,1.26),Cement:e=>Ps("sawmill",e,420,1.26)},effect(){let e=t.tech.saw>=2?8:5,a=`
                            ${F("plus_max_resource",[Gr(wr(200)),t.resource.Lumber.name])}
                            ${F("city_lumber_yard_effect",[e])}
                            `;return t.tech.foundry&&t.tech.foundry>=4&&(a+=`
                            ${F("city_sawmill_effect2",[2])}
                            `),t.city.powered&&(a+=`
                            ${F("city_sawmill_effect3",[4,$(this)[0].powered()])}
                            `),a},powered:()=>Is(1),powerBalancer:()=>!!t.city.sawmill.hasOwnProperty("psaw")&&[{r:"Lumber",k:"psaw"}],action(){return!!ii($(this)[0])&&(t.city.sawmill.count++,t.resource.Lumber.max+=Gr(wr(200)),ei($(this)[0]),!0)}},rock_quarry:{id:"city-rock_quarry",title:()=>t.race.flier?F("city_rock_quarry_alt"):F("city_rock_quarry"),desc:()=>t.race.flier?F("city_rock_quarry_desc_alt",[t.resource.Stone.name]):F("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?Ps("rock_quarry",e,20,1.45):0),Lumber:e=>Ps("rock_quarry",e,50,1.36),Stone:e=>Ps("rock_quarry",e,10,1.36)},effect(){let e=Gr(wr(100)),a=t.race.smoldering?`
                            ${F("plus_max_resource",[e,t.resource.Chrysotile.name])}
                            `:"";return t.tech.mine_conveyor?`
                            ${F("city_rock_quarry_effect1",[2])}
                            ${F("plus_max_resource",[e,t.resource.Stone.name])}
                            ${a}
                            ${F("city_rock_quarry_effect2",[4,$(this)[0].powered()])}
                            `:`
                            ${F("city_rock_quarry_effect1",[2])}
                            ${F("plus_max_resource",[e,t.resource.Stone.name])}
                            ${a}`},special:()=>!!t.race.smoldering,powered:()=>Is(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(ii($(this)[0])){t.city.rock_quarry.count++,t.civic.quarry_worker.display=!0;let e=Gr(wr(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&&ei($(this)[0]),!0}return!1}},cement_plant:{id:"city-cement_plant",title:F("city_cement_plant"),desc:F("city_cement_plant_desc"),category:"industrial",reqs:{cement:1},not_trait:["cataclysm","lone_survivor","flier"],cost:{Money:e=>Ps("cement_plant",e,3e3,1.5),Lumber:e=>Ps("cement_plant",e,1800,1.36),Stone:e=>Ps("cement_plant",e,2e3,1.32),Iron:e=>t.city.ptrait.includes("unstable")?Ps("cement_plant",e,275,1.32):0},effect(){if(t.tech.cement>=5){let e=t.tech.cement>=6?8:5;return`
                            ${F("city_cement_plant_effect1",[aa(2)])}
                            ${F("city_cement_plant_effect2",[$(this)[0].powered(),e])}
                            `}return F("city_cement_plant_effect1",[aa(2)])},powered:()=>Is(2),powerBalancer:()=>!!t.city.cement_plant.hasOwnProperty("cnvay")&&[{r:"Cement",k:"cnvay"}],power_reqs:{cement:5},action(){return!!ii($(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*aa(2),t.tech.cement&&t.tech.cement>=5&&ei($(this)[0]),!0)}},foundry:{id:"city-foundry",title:F("city_foundry"),desc:F("city_foundry_desc"),category:"industrial",reqs:{foundry:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("foundry",e,750,1.36),Stone:e=>Ps("foundry",e,100,1.36),Copper:e=>Ps("foundry",e,250,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Ps("foundry",e,40,1.36):0},effect(){let e=`
                            ${F("city_foundry_effect1",[aa(1)])}
                            `;return t.tech.foundry>=2&&(e+=`
                            ${F("city_crafted_mats",[t.tech.foundry>=5?t.tech.foundry>=8?8:5:3])}
                            `),t.tech.foundry>=6&&(e+=`
                            ${F("city_foundry_effect2",[2])}
                            `),e},action(){return!!ii($(this)[0])&&(0===t.city.foundry.count&&(t.race.no_craft?ms(F("city_foundry_msg2"),"info",!1,["progress"]):ms(F("city_foundry_msg1"),"info",!1,["progress"])),t.city.foundry.count++,t.civic.craftsman.max+=aa(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),na(),!0)}},factory:{id:"city-factory",title:F("city_factory"),desc:`
                            ${F("city_factory_desc")}
                            ${F("requires_power")}
                            `,category:"industrial",reqs:{high_tech:3},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("factory",e,25e3,oi(1.32)),Cement:e=>Ps("factory",e,1e3,oi(1.32)),Steel:e=>Ps("factory",e,7500,oi(1.32)),Titanium:e=>Ps("factory",e,2500,oi(1.32))},effect(){let e=`
                            ${F("city_factory_effect")}
                            ${F("minus_power",[$(this)[0].powered()])}
                            `;return t.tech.foundry>=7&&(e+=`
                            ${F("city_crafted_mats",[5])}
                            `),e},powered:()=>Is(3),special:!0,action(){return!!ii($(this)[0])&&(t.city.factory.count++,t.resource.Alloy.display=!0,t.tech.polymer&&(t.resource.Polymer.display=!0),ei($(this)[0])&&t.city.factory.Alloy++,t.settings.showIndustry=!0,$i(),!0)}},nanite_factory:zr("nanite_factory","city"),smelter:{id:"city-smelter",title:F("city_smelter"),desc:F("city_smelter_desc"),category:"industrial",reqs:{smelting:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("smelter",e,1e3,oi(1.32)),Iron:e=>Ps("smelter",e,500,oi(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?F("city_smelter_effect2",[e]):F("city_smelter_effect1",[e])},special:!0,action(){return!!ii($(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,$i(),!0)},flair:`
                            ${F("city_smelter_flair1")}
                            ${F("city_smelter_flair2")}
                            `},metal_refinery:{id:"city-metal_refinery",title:F("city_metal_refinery"),desc:F("city_metal_refinery_desc"),category:"industrial",reqs:{alumina:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("metal_refinery",e,2500,1.35),Iron:e=>t.city.ptrait.includes("unstable")?Ps("metal_refinery",e,125,1.35):0,Steel:e=>Ps("metal_refinery",e,350,1.35)},powered:()=>Is(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?`${F(e,[6])} ${F("city_metal_refinery_effect2",[6,12,$(this)[0].powered()])}`:F(e,[6])},action(){return!!ii($(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,na()),t.tech.alumina>=2&&ei($(this)[0]),!0)}},mine:{id:"city-mine",title:F("city_mine"),desc:F("city_mine_desc"),category:"industrial",reqs:{mining:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("mine",e,60,oi(1.6)),Lumber:e=>Ps("mine",e,175,oi(1.38))},effect(){return t.tech.mine_conveyor?`
                            ${F("city_mine_effect1",[aa(1)])}
                            ${F("city_mine_effect2",[$(this)[0].powered(),5])}
                            `:F("city_mine_effect1",[aa(1)])},powered:()=>Is(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!!ii($(this)[0])&&(t.city.mine.count++,t.resource.Copper.display=!0,t.civic.miner.display=!0,t.civic.miner.max=aa(t.city.mine.count),t.tech.mine_conveyor&&ei($(this)[0]),!0)},flair:()=>"avian"===Di[t.race.species].type?F("city_mine_flair_avian"):""},coal_mine:{id:"city-coal_mine",title:F("city_coal_mine"),desc:F("city_coal_mine_desc"),category:"industrial",reqs:{mining:4},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("coal_mine",e,480,oi(1.4)),Lumber:e=>Ps("coal_mine",e,250,oi(1.36)),Iron:e=>t.city.ptrait.includes("unstable")?Ps("coal_mine",e,28,oi(1.36)):0,Wrought_Iron:e=>Ps("coal_mine",e,18,oi(1.36))},effect(){return t.tech.mine_conveyor?`
                            ${F("city_coal_mine_effect1",[aa(1)])}
                            ${F("city_coal_mine_effect2",[$(this)[0].powered(),5])}
                            `:F("city_coal_mine_effect1",[aa(1)])},powered:()=>Is(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!!ii($(this)[0])&&(t.city.coal_mine.count++,t.resource.Coal.display=!0,t.civic.coal_miner.display=!0,t.civic.coal_miner.max=aa(t.city.coal_mine.count),t.tech.mine_conveyor&&ei($(this)[0]),!0)}},oil_well:{id:"city-oil_well",title:F("city_oil_well"),desc:F("city_oil_well_desc"),category:"industrial",reqs:{oil:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("oil_well",e,5e3,oi(1.5)),Iron:e=>t.city.ptrait.includes("unstable")?Ps("oil_well",e,450,oi(1.5)):0,Cement:e=>Ps("oil_well",e,5250,oi(1.5)),Steel:e=>Ps("oil_well",e,6e3,oi(1.5))},effect:()=>F("city_oil_well_effect",[+xe("oil_well").toFixed(2),wr(500)]),action(){return!!ii($(this)[0])&&(t.city.oil_well.count++,t.resource.Oil.max+=wr(500),1===t.city.oil_well.count&&(t.resource.Oil.display=!0,$i()),!0)},flair:F("city_oil_well_flair")},oil_depot:{id:"city-oil_depot",title:F("city_oil_depot"),desc:F("city_oil_depot_desc"),category:"trade",reqs:{oil:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("oil_depot",e,2500,oi(1.46)),Iron:e=>t.city.ptrait.includes("unstable")?Ps("oil_depot",e,325,oi(1.36)):0,Cement:e=>Ps("oil_depot",e,3750,oi(1.46)),Sheet_Metal:e=>Ps("oil_depot",e,100,oi(1.45))},effect(){let e=wr(1e3);e*=t.tech.world_control?1.5:1;let a=`
                            ${F("plus_max_resource",[e,t.resource.Oil.name])}.
                            `;if(t.resource.Helium_3.display){let e=wr(400);e*=t.tech.world_control?1.5:1,a+=`
                            ${F("plus_max_resource",[e,t.resource.Helium_3.name])}.
                            `}if(t.tech.uranium>=2){let e=wr(250);e*=t.tech.world_control?1.5:1,a+=`
                            ${F("plus_max_resource",[e,t.resource.Uranium.name])}.
                            `}return a},action(){return!!ii($(this)[0])&&(t.city.oil_depot.count++,t.resource.Oil.max+=wr(1e3)*(t.tech.world_control?1.5:1),t.resource.Helium_3.display&&(t.resource.Helium_3.max+=wr(400)*(t.tech.world_control?1.5:1)),t.tech.uranium>=2&&(t.resource.Uranium.max+=wr(250)*(t.tech.world_control?1.5:1)),!0)}},trade:{id:"city-trade",title:F("city_trade"),desc:F("city_trade_desc"),category:"trade",reqs:{trade:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("trade",e,500,1.36),Lumber:e=>Ps("trade",e,125,1.36),Stone:e=>Ps("trade",e,50,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Ps("trade",e,15,1.36):0,Furs:e=>Ps("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+=Ki.flier.vars()[1]),F("city_trade_effect",[e])},action(){if(ii($(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:F("city_wharf"),desc:F("city_wharf_desc"),category:"trade",era:"industrialized",reqs:{wharf:1},not_trait:["thalassophobia","cataclysm"],cost:{Money:e=>Ps("wharf",e,62e3,1.32),Lumber:e=>Ps("wharf",e,44e3,1.32),Iron:e=>t.city.ptrait.includes("unstable")?Ps("wharf",e,200,1.32):0,Cement:e=>Ps("wharf",e,3e3,1.32),Oil:e=>Ps("wharf",e,750,1.32)},effect(){let e=t.tech.world_control?15:10;return t.tech.particles&&t.tech.particles>=2&&(e*=2),`
                            ${F("city_trade_effect",[2])}
                            ${F("city_wharf_effect")}
                            ${F("plus_max_crates",[e])}
                            ${F("plus_max_containers",[e])}
                            `},action(){if(ii($(this)[0])){!1===t.resource.Containers.display&&(ms(F("city_warehouse_msg"),"info",!1,["progress"]),t.resource.Containers.display=!0,Cs($("#resources")),Ba()),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:F("city_tourist_center"),desc:F("city_tourist_center_desc"),category:"commercial",reqs:{monument:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("tourist_center",e,1e5,1.36),Stone:e=>Ps("tourist_center",e,25e3,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Ps("tourist_center",e,1e3,1.36):0,Furs:e=>Ps("tourist_center",e,7500,1.36),Plywood:e=>Ps("tourist_center",e,5e3,1.36)},effect(){let e=t.tech.monument&&t.tech.monument>=3&&s.s_gate?3:1,a=("corpocracy"===t.civic.govern.type?2:1)*e,r=("corpocracy"===t.civic.govern.type?10:5)*e,i=("corpocracy"===t.civic.govern.type?4:2)*e,n="";t.stats.achieve.banana&&t.stats.achieve.banana.l>=4&&(n=`
                            ${F("city_tourist_center_effect5",[("corpocracy"===t.civic.govern.type?6:3)*e])}
                            `);let c="",o=D("pious",1);return o&&(c=`
                            ${F("city_tourist_center_effect6",[("corpocracy"===t.civic.govern.type?2*o:o)*e])}
                            `),`
                            ${F("city_tourist_center_effect1",[t.resource.Food.name])}
                            ${F("city_tourist_center_effect2",[a,Sr.city.amphitheatre.title()])}
                            ${F("city_tourist_center_effect3",[r])}
                            ${F("city_tourist_center_effect4",[i])}
                            ${n}${c}`},powered:()=>Is(1),action(){return!!ii($(this)[0])&&(t.city.tourist_center.count++,t.city.tourist_center.on++,!0)}},amphitheatre:{id:"city-amphitheatre",title:()=>F(D("athleticism",0)?"city_stadium":"city_amphitheatre"),desc:()=>F(D("athleticism",0)?"city_stadium":"city_amphitheatre_desc"),category:"commercial",reqs:{theatre:1},not_trait:["joyless","cataclysm"],cost:{Money:e=>Ps("amphitheatre",e,500,1.55),Lumber:e=>Ps("amphitheatre",e,50,1.75),Stone:e=>Ps("amphitheatre",e,200,1.75),Iron:e=>t.city.ptrait.includes("unstable")?Ps("amphitheatre",e,18,1.36):0},effect(){let e=D("athleticism",0);return`
                            ${F("city_max_entertainer",[aa(D("athleticism",1)||1)])}
                            ${F("city_max_morale",[e||1])}
                            `},action(){return!!ii($(this)[0])&&(t.city.amphitheatre.count++,t.civic.entertainer.max+=aa(1),t.civic.entertainer.display=!0,!0)},flair:()=>F(D("athleticism",0)?"city_stadium_flair":"city_amphitheatre_flair")},casino:{id:"city-casino",title:F("city_casino"),desc:F("city_casino"),category:"commercial",reqs:{gambling:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("casino",e,35e4,1.35),Iron:e=>t.city.ptrait.includes("unstable")?Ps("casino",e,2e3,1.35):0,Furs:e=>Ps("casino",e,6e4,1.35),Plywood:e=>Ps("casino",e,1e4,1.35),Brick:e=>Ps("casino",e,6e3,1.35)},effect(){let e=Dr();return e+=`
                            ${F("minus_power",[$(this)[0].powered()])}
                            `,e},powered:()=>Is(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=2?2:3),action(){return!!ii($(this)[0])&&(t.city.casino.count++,t.race.joyless||(t.civic.entertainer.max+=aa(1),t.civic.entertainer.display=!0),ei($(this)[0]),!0)},flair:F("city_casino_flair")},temple:{id:"city-temple",title:F("city_temple"),desc:()=>F("city_temple_desc",["none"!==t.race.gods?Di[t.race.gods.toLowerCase()].entity:Di[t.race.species].entity]),category:"commercial",reqs:{theology:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("temple",e,50,1.36),Lumber:e=>Ps("temple",e,25,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Ps("temple",e,6,1.36):0,Furs:e=>Ps("temple",e,15,1.36),Cement:e=>Ps("temple",e,10,1.36)},effect(){let e=Kr();return t.genes.ancients&&t.genes.ancients>=2&&(e+=`
                            ${F("city_temple_effect6",[aa(1)])}
                            `),e},action(){return!!ii($(this)[0])&&(t.genes.ancients&&t.genes.ancients>=2&&(t.civic.priest.display=!0),t.city.temple.count++,!0)}},shrine:{id:"city-shrine",title:F("city_shrine"),desc:()=>F("city_shrine_desc"),category:"commercial",reqs:{theology:2},trait:["magnificent"],not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("shrine",e,75,1.32),Stone:e=>Ps("shrine",e,65,1.32),Furs:e=>Ps("shrine",e,10,1.32),Copper:e=>Ps("shrine",e,15,1.32)},effect(){let e=`
                            ${F("city_shrine_effect")}
                            `;if(t.city.shrine&&t.city.shrine.morale>0&&(e+=`
                            ${F("city_shrine_morale",[+pn("morale").add.toFixed(1)])}
                            `),t.city.shrine&&t.city.shrine.metal>0&&(e+=`
                            ${F("city_shrine_metal",[+(100*(pn("metal").mult-1)).toFixed(1)])}
                            `),t.city.shrine&&t.city.shrine.know>0){let t=pn("know");e+=`
                            ${F("city_shrine_know",[(+t.add.toFixed(1)).toLocaleString()])}
                            `,e+=`
                            ${F("city_shrine_know2",[+(100*(t.mult-1)).toFixed(1)])}
                            `}return t.city.shrine&&t.city.shrine.tax>0&&(e+=`
                            ${F("city_shrine_tax",[+(100*(pn("tax").mult-1)).toFixed(1)])}
                            `),e},action(){if(ii($(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:F("city_meditation"),desc:F("city_meditation"),category:"commercial",reqs:{primitive:3},trait:["calm"],not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("meditation",e,50,1.2),Stone:e=>Ps("meditation",e,25,1.2),Furs:e=>Ps("meditation",e,8,1.2)},effect(){let e=t.resource.Zen.amount/(t.resource.Zen.amount+5e3);return`
                            ${F("city_meditation_effect",[Ki.calm.vars()[0]])}
                            ${F("city_meditation_effect2",[2])}
                            ${F("city_meditation_effect3",[1])}
                            ${F("city_meditation_effect4",[`${(100*e).toFixed(2)}%`])}
                            `},action(){return!!ii($(this)[0])&&(t.city.meditation.count++,t.resource.Zen.max+=Ki.calm.vars()[0],!0)}},university:{id:"city-university",title:F("city_university"),desc:()=>F("city_university_desc",[Di[t.race.species].home]),category:"science",reqs:{science:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("university",e,900,1.5)-500,Lumber:e=>Ps("university",e,500,1.36)-200,Stone:e=>Ps("university",e,750,1.36)-350,Crystal:e=>"magic"===t.race.universe?Ps("university",e,5,1.36):0,Iron:e=>(t.city.university?t.city.university.count:0)+(e||0)>=3&&t.city.ptrait.includes("unstable")?Ps("university",e,25,1.36):0},effect(){let e=+$(this)[0].knowVal().toFixed(0);return`
                            ${F("city_university_effect",[aa(1)])}
                            ${F("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+=ns.permafrost.vars()[1]),t.tech.science>=4&&(e+=.02*t.city.library.count),t.space.observatory&&t.space.observatory.count>0&&(e+=.05*n.observatory),t.portal.sensor_drone&&t.tech.science>=14&&(e+=.02*s.sensor_drone),t.race.hard_of_hearing&&(e*=1-Ki.hard_of_hearing.vars()[0]/100),t.race.curious&&(e*=1+Ki.curious.vars()[0]/100*t.resource[t.race.species].amount);let r=as("cath");if(r>0&&(e*=1+Ki.curious.vars(3)[0]*r),s.s_gate&&o.scavenger){let t=St("gxy_alien2");e*=1+o.scavenger*t/4}let i=D("teacher",0);i&&(e*=1+i/100);let c=D("athleticism",2);c&&(e*=1-c/100),dn()&&(e*=pn("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(ii($(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:F("city_library"),desc:()=>F("city_library_desc",[Di[t.race.species].home]),category:"science",reqs:{science:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("library",e,45,1.2),Crystal:e=>"magic"===t.race.universe?Ps("library",e,2,1.2):0,Iron:e=>t.city.ptrait.includes("unstable")?Ps("library",e,4,1.2):0,Furs:e=>Ps("library",e,22,1.2),Plywood:e=>Ps("library",e,20,1.2),Brick:e=>Ps("library",e,15,1.2)},effect(){let e=125;t.race.nearsighted&&(e*=1-Ki.nearsighted.vars()[0]/100),t.race.studious&&(e*=1+Ki.studious.vars()[1]/100);let a=as("elven");if(a>0&&(e*=1+Ki.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=ta(t.civic.scientist.workers,"scientist");t.race.high_pop&&(a=$e(a)),e*=1+.12*a}let r=D("teacher",0);r&&(e*=1+r/100);let i=D("athleticism",2);i&&(e*=1-i/100);let s=D("muckraker",1);s&&(e*=1+s/100),e=+e.toFixed(0);let n=D("muckraker",2),c=n?5-n:5;return t.race.autoignition&&(c-=Ki.autoignition.vars()[0],c<0&&(c=0)),`
                            ${F("city_max_knowledge",[e.toLocaleString()])}
                            ${F("city_library_effect",[c])}
                            `},action(){if(ii($(this)[0])){let e=125;return t.race.nearsighted&&(e*=1-Ki.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*ta(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:F("city_library_flair")},wardenclyffe:{id:"city-wardenclyffe",title:()=>di(),desc:F("city_wardenclyffe_desc"),category:"science",reqs:{high_tech:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("wardenclyffe",e,5e3,1.22),Knowledge:e=>Ps("wardenclyffe",e,t.race.logical?1e3-Ki.logical.vars()[0]:1e3,1.22),Crystal:e=>"magic"===t.race.universe?Ps("wardenclyffe",e,100,1.22):0,Copper:e=>Ps("wardenclyffe",e,500,1.22),Iron:e=>t.city.ptrait.includes("unstable")?Ps("wardenclyffe",e,75,1.22):0,Cement:e=>Ps("wardenclyffe",e,350,1.22),Sheet_Metal:e=>Ps("wardenclyffe",e,125,1.2),Nanite:e=>t.race.deconstructor?Ps("wardenclyffe",e,50,1.18):0},effect(){let e=1e3;if(t.city.ptrait.includes("magnetic")&&(e+=ns.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=`
                            ${F("city_wardenclyffe_effect1",[aa(1),t.civic.scientist?t.civic.scientist.name:F("job_scientist")])}
                            ${F("city_max_knowledge",[e.toLocaleString()])}
                            `;if(t.city.powered){let e=t.tech.science>=7?2500:2e3;if(t.city.ptrait.includes("magnetic")&&(e+=ns.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+=`
                            ${F("city_wardenclyffe_effect4",[2])}
                            `),"magic"===t.race.universe&&(r+=`
                            ${F("plus_max_resource",[wr(8),t.resource.Mana.name])}
                            `),t.tech.broadcast){let a=t.tech.broadcast;r+=`
                            ${F("city_wardenclyffe_effect3",[$(this)[0].powered(),e.toLocaleString(),a])}
                            `}else r+=`
                            ${F("city_wardenclyffe_effect2",[$(this)[0].powered(),e.toLocaleString()])}
                            `;t.race.artifical&&(r+=`
                            ${F("city_transmitter_effect",[wr(250)])}Is(2),action(){if(ii($(this)[0])){let e=1e3;if(t.city.wardenclyffe.count++,t.civic.scientist.display=!0,t.civic.scientist.max=t.city.wardenclyffe.count,ei($(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?`
                            ${F("city_wizard_tower_flair")}
                            `:t.race.evil?`
                            ${F("city_babel_flair")}
                            `:`
                            ${F("city_wardenclyffe_flair1")}
                            ${F("city_wardenclyffe_flair2")}
                            `},biolab:{id:"city-biolab",title:F("city_biolab"),desc:`
                            ${F("city_biolab_desc")}
                            ${F("requires_power")}
                            `,category:"science",reqs:{genetics:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("biolab",e,25e3,1.3),Knowledge:e=>Ps("biolab",e,5e3,1.3),Copper:e=>Ps("biolab",e,1250,1.3),Iron:e=>t.city.ptrait.includes("unstable")?Ps("biolab",e,160,1.3):0,Alloy:e=>Ps("biolab",e,350,1.3)},effect(){let e=3e3;return t.portal.sensor_drone&&t.tech.science>=14&&(e*=1+.02*s.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),`${F("city_max_knowledge",[e.toLocaleString()])}, ${F("minus_power",[$(this)[0].powered()])}`},powered:()=>Is(2),action(){return!!ii($(this)[0])&&(t.city.biolab.count++,ei($(this)[0])&&(t.resource.Knowledge.max+=3e3),!0)}},coal_power:{id:"city-coal_power",title:()=>t.race.environmentalist?F("city_hydro_power"):F("magic"===t.race.universe?"city_mana_engine":"city_coal_power"),desc:()=>t.race.environmentalist?`
                            ${F("city_hydro_power_desc")}
                            `:`
                            ${F("magic"===t.race.universe?"city_mana_engine_desc":"city_coal_power_desc")}
                            ${F("requires_res",[F("magic"===t.race.universe?"resource_Mana_name":"resource_Coal_name")])}
                            `,category:"utility",reqs:{high_tech:2},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("coal_power",e,1e4,oi(1.22)),Crystal:e=>"magic"===t.race.universe?Ps("coal_power",e,125,oi(1.22)):0,Copper:e=>Ps("coal_power",e,1800,oi(1.22))-1e3,Iron:e=>t.city.ptrait.includes("unstable")?Ps("coal_power",e,175,oi(1.22)):0,Cement:e=>Ps("coal_power",e,600,oi(1.22)),Steel:e=>Ps("coal_power",e,2e3,oi(1.22))-1e3},effect(){let e="magic"===t.race.universe?.05:.35,a=-$(this)[0].powered();return t.race.environmentalist?`+${a}MW`:`+${a}MW. ${F("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),As(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!!ii($(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?F("city_wind_power"):F("city_oil_power"),desc:()=>t.race.environmentalist?`
                            ${F("city_wind_power_desc")}
                            `:`
                            ${F("city_oil_power_desc")}
                            ${F("requires_res",[F("resource_Oil_name")])}
                            `,category:"utility",reqs:{oil:3},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("oil_power",e,5e4,oi(1.22)),Copper:e=>Ps("oil_power",e,6500,oi(1.22))+1e3,Iron:e=>t.city.ptrait.includes("unstable")?Ps("oil_power",e,180,oi(1.22)):0,Aluminium:e=>Ps("oil_power",e,12e3,oi(1.22)),Cement:e=>Ps("oil_power",e,5600,oi(1.22))+1e3},effect(){let e=-$(this)[0].powered();return t.race.environmentalist?`+${e}MW`:`+${e}MW. ${F("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),As(e)},p_fuel:()=>({r:"Oil",a:t.race.environmentalist?0:.65}),action(){return!!ii($(this)[0])&&(t.city.oil_power.count++,t.city.oil_power.on++,t.city.power+=6,!0)}},fission_power:{id:"city-fission_power",title:F("city_fission_power"),desc:`
                            ${F("city_fission_power_desc")}
                            ${F("requires_res",[F("resource_Uranium_name")])}
                            `,category:"utility",reqs:{high_tech:5},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("fission_power",e,25e4,1.36),Copper:e=>Ps("fission_power",e,13500,1.36),Iron:e=>t.city.ptrait.includes("unstable")?Ps("fission_power",e,1750,1.36):0,Cement:e=>Ps("fission_power",e,10800,1.36),Titanium:e=>Ps("fission_power",e,7500,1.36)},effect(){return`+${-$(this)[0].powered()}MW. ${F("city_fission_power_effect",[.1])}`},powered:()=>As(t.tech.uranium>=4?-18:-14),p_fuel:()=>({r:"Uranium",a:.1}),action(){return!!ii($(this)[0])&&(t.city.fission_power.count++,t.city.fission_power.on++,t.city.power+=14,!0)}},mass_driver:{id:"city-mass_driver",title:F("city_mass_driver"),desc:`
                            ${F("city_mass_driver_desc")}
                            ${F("requires_power")}
                            `,category:"utility",reqs:{mass:1},not_trait:["cataclysm","lone_survivor"],cost:{Money:e=>Ps("mass_driver",e,375e3,1.32),Copper:e=>Ps("mass_driver",e,33e3,1.32),Iron:e=>Ps("mass_driver",e,42500,1.32),Iridium:e=>Ps("mass_driver",e,2200,1.32)},effect(){return`${t.tech.mass>=2?`
                            ${F("city_mass_driver_effect2",[1,t.civic.scientist.name])}
                            `:""}${F("city_mass_driver_effect",[t.race.truepath?6:5,cn("name")])} ${F("minus_power",[$(this)[0].powered()])}`},powered(){let e=t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=4?4:5;return Is(t.tech.mass>=2?e-1:e)},action(){return!!ii($(this)[0])&&(t.city.mass_driver.count++,ei($(this)[0]),!0)}},replicator:{id:"city-replicator",title:F("tech_replicator"),desc:F("tech_replicator"),category:"utility",reqs:{special_hack:1},cost:{},wiki:!1,effect:()=>"fake structure",powered:()=>1,action:()=>!1}},tech:Mr(),arpa:qe("PhysicsTech"),genes:qe("GeneTech"),blood:qe("BloodTech"),space:It(),interstellar:qt,galaxy:Ot,starDock:{probes:{id:"starDock-probes",title:F("star_dock_probe"),desc:()=>`
                            ${F("star_dock_probe_desc")}
                            `,reqs:{genesis:4},cost:{Money:e=>Ps("probes",e,35e4,t.race.truepath?1.125:1.25,"starDock"),Alloy:e=>Ps("probes",e,75e3,t.race.truepath?1.125:1.25,"starDock"),Polymer:e=>Ps("probes",e,85e3,t.race.truepath?1.125:1.25,"starDock"),Iridium:e=>Ps("probes",e,12e3,t.race.truepath?1.125:1.25,"starDock"),Mythril:e=>Ps("probes",e,3500,t.race.truepath?1.125:1.25,"starDock")},effect:()=>`
                            ${F("star_dock_probe_effect")}
                            `,action(){return!!ii($(this)[0])&&(t.starDock.probes.count++,!0)}},geck:{id:"starDock-geck",title:F("tech_geck"),desc:()=>`
                            ${F("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=>Ps("geck",e,1e6,1.25,"starDock"),Elerium:e=>Ps("geck",e,1e3,1.25,"starDock"),Plasmid:e=>Ps("geck",e,25,1.4,"starDock")},effect:()=>`
                            ${F("star_dock_geck_effect")}
                            `,action(){return!!ii($(this)[0])&&(t.starDock.geck.count++,!0)}},seeder:{id:"starDock-seeder",title:()=>t.race.cataclysm?F("star_dock_exodus"):F("star_dock_seeder"),desc(){let e=t.race.cataclysm?F("star_dock_exodus"):F("star_dock_seeder");return t.starDock.seeder&&t.starDock.seeder.count>=100?`
                            ${e}
                            ${F("star_dock_seeder_desc2")}
                            `:`
                            ${e}
                            ${F("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?F("star_dock_seeder_status1",[100-a]):F("star_dock_seeder_status2");return`
                            ${t.race.cataclysm?F("star_dock_exodus_effect"):F("star_dock_seeder_effect")}
                            ${r}
                            `},action(){return!!(t.starDock.seeder.count<100&&ii($(this)[0]))&&(t.starDock.seeder.count++,t.starDock.seeder.count>=100&&(t.tech.genesis=6,ds("starDock-seeder"),Cs($("#modalBox")),li(Sr.space.spc_gas.star_dock,"star_dock")),!0)}},prep_ship:{id:"starDock-prep_ship",title:F("star_dock_prep"),desc:()=>`
                            ${t.race.cataclysm?F("star_dock_prep_cata_desc"):F("star_dock_prep_desc")}
                            ${F("star_dock_genesis_desc2")}
                            `,reqs:{genesis:6},queue_complete:()=>0,cost:{},effect(){let e=Ns("bioseed"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name");return`
                            ${t.race.cataclysm?F("star_dock_prep_cata_effect"):F("star_dock_prep_effect")}
                            ${F("star_dock_genesis_effect2",[e.plasmid,a])}
                            ${F("star_dock_genesis_effect3",[e.phage])}
                            `},action:()=>(t.tech.genesis=7,ds("starDock-prep_ship"),Cs($("#modalBox")),li(Sr.space.spc_gas.star_dock,"star_dock"),!0)},launch_ship:{id:"starDock-launch_ship",title:F("star_dock_genesis"),desc:()=>`
                            ${t.race.cataclysm?F("star_dock_prep_cata_effect"):F("star_dock_genesis_desc1")}
                            ${F("star_dock_genesis_desc2")}
                            `,reqs:{genesis:7},queue_complete:()=>0,cost:{},effect(){let e=Ns("bioseed"),a="antimatter"===t.race.universe?F("resource_AntiPlasmid_plural_name"):F("resource_Plasmid_plural_name");return`
                            ${t.race.cataclysm?F("star_dock_genesis_cata_effect1"):F("star_dock_genesis_effect1")}
                            ${F("star_dock_genesis_effect2",[e.plasmid,a])}
                            ${F("star_dock_genesis_effect3",[e.phage])}
                            `},action:()=>(function(){t.sim||e.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(t))),M(),$s("reset",{end:"bioseed"});let a=t.race.species,r=t.race.gods,i=Di[a].type,s=t.city.calendar.orbit,n=t.city.biome,c=t.city.ptrait,o=Ns("bioseed");t.stats.bioseed++,sn(),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),Pn("seeder"),Pn(`biome_${n}`),c.forEach((function(e){ns.hasOwnProperty(e)&&Pn(`atmo_${e}`)})),Pn(`genus_${i}`),t.race.truepath&&Pn("exodus"),c.includes("dense")&&"heavy"===t.race.universe&&Pn("double_density"),t.race.junker&&"junker"===t.race.species&&jn("organ_harvester"),"hellscape"===t.city.biome&&"demonic"!==Di[t.race.species].type&&jn("ill_advised"),void 0===t.tech.world_control&&Pn("cult_of_personality"),t.race.cataclysm&&Pn("iron_will",!1,5),t.race.gross_enabled&&t.race.ooze&&"custom"!==t.race.species&&"sludge"!==t.race.species&&Pn("gross");let l=0,_=0;Object.keys(t.city.geology).forEach((function(e){t.city.geology[e]>0?l++:t.city.geology[e]<0&&_++})),l>=4&&Pn("miners_dream"),_>=3&&jn("rocky_road"),t.race.steelen&&t.race.steelen>=1&&Pn("steelen"),"micro"===t.race.universe&&(t.race.small||t.race.compact?Pn("macro",!0):Pn("marble",!0)),Cn();let d=!!t.race.hasOwnProperty("srace")&&t.race.srace,p=t.race.hasOwnProperty("corruption")&&t.race.corruption>1?t.race.corruption-1:0,u=t.starDock.probes.count+1,h=t.starDock.hasOwnProperty("geck")?t.starDock.geck.count:0;t.stats.achieve.explorer&&(u+=t.stats.achieve.explorer.l),t.race={species:"protoplasm",gods:a,old_gods:r,universe:t.race.universe,seeded:!0,probes:u,geck:h,seed:Math.floor(g(1e4)),ascended:!1},p>0&&(t.race.corruption=p),d&&(t.race.srace=d),U({orbit:s,biome:n,ptrait:c,geology:!1}),e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),window.location.reload()}(),!1)}},portal:ua(),tauceti:He};function Cr(){let a=$("#evolution .evolving").nextAll();Object.values(a).forEach((function(e){Cs($(e),!0)})),Cs($("#evolution .evolving"),!0),t.evolution.bunker={count:1},ai(Sr.evolution.bunker.id),_i(),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($(`

                            ${F("evo_challenge_genes")}

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

                            ${F("evo_challenge_run")}

                            `)),e.append($(`
                            ${F("evo_challenge_run_desc")}
                            `))}(),Zr("evolution","joyless"),Zr("evolution","steelen"),(t.stats.achieve.whitehole||t.sim)&&Zr("evolution","decay"),(t.stats.achieve.ascended||t.sim)&&Zr("evolution","emfield"),(t.stats.achieve.scrooge||t.sim)&&Zr("evolution","inflation"),((t.stats.achieve.ascended||t.stats.achieve.corrupted)&&t.stats.achieve.extinct_junker||t.sim)&&Zr("evolution","sludge"),(t.stats.achieve.whitehole||t.stats.achieve.ascended||t.sim)&&Zr("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)&&Zr("evolution","witch_hunter"),"evil"===t.race.universe&&(t.stats.achieve.corrupted&&t.stats.achieve.corrupted.e||t.sim),t.hasOwnProperty("beta")&&!t.sim&&Zr("evolution","simulation"),function(){let e=$('
                            ');$("#evolution").append(e),e.append($(`

                            ${F("evo_scenario")}

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

                            ${F("evo_challenge_simulation")}

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

                            ${F("evo_challenge_simulation")}

                            `)),e.append($(`
                            ${F("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($(`
                            ${F(`resource_${e}_name`)}
                            `))})),zs({el:"#simSection",data:t.race.simConfig})}()}function zr(e,a){let r=t.race.orbit_decay?"orbit_decayed":"cataclysm",i=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 i({id:`${a}-bonfire`,title:F("city_bonfire"),desc:F("city_bonfire_desc"),category:"outskirts",wiki:!1,reqs:{primitive:3},condition:()=>on("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${F("city_bonfire_effect3",[a.toLocaleString()])}
                            ${F("city_bonfire_effect4",[(+t.resource.Thermite.amount.toFixed(0)).toLocaleString(),a.toLocaleString()])}
                            `:"";return`
                            ${F("city_bonfire_effect",[t.resource.Thermite.diff])}
                            ${F("city_bonfire_effect2",[+e.toFixed(1)])}
                            ${r}`},action:()=>!1,flair:()=>F("city_bonfire_flair")},r,a);case"firework":return i({id:`${a}-firework`,title:F("city_firework"),desc:F("city_firework"),category:"outskirts",wiki:!1,reqs:{mining:3},condition:()=>on("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?F("city_firework_build"):F("city_firework_effect"),action(){return!(0!==t[a].firework.count||!ii($(this)[0])||(t[a].firework.count=1,0))}},r,a);case"assembly":{let e=function(e){let a=$e(e);return t.race.promiscuous&&(a/=1+Ki.promiscuous.vars()[1]*t.race.promiscuous),Math.round(a)};return i({id:`${a}-assembly`,title:F("city_assembly"),desc:()=>F("city_assembly_desc",[Di[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?Ps("citizen",a,e(125),1.01):0,Copper:a=>t.race.deconstructor?0:t.resource[t.race.species].amount>=5?Ps("citizen",a,e(50),1.01):0,Aluminium:a=>t.race.deconstructor?0:t.resource[t.race.species].amount>=5?Ps("citizen",a,e(50),1.01):0,Nanite:a=>t.race.deconstructor&&t.resource[t.race.species].amount>=3?Ps("citizen",a,e(500),1.01):0},effect(){let e="";return t.resource[t.race.species].max===t.resource[t.race.species].amount&&(e=`
                            ${F("city_assembly_effect_warn")}
                            `),`
                            ${F("city_assembly_effect",[Di[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&&ii($(this)[0]))&&(t.resource[t.race.species].amount++,!0)}},r,a)}case"nanite_factory":return i({id:`${a}-nanite_factory`,title:F("city_nanite_factory"),desc:F("city_nanite_factory"),category:"industrial",reqs:{},trait:["deconstructor"],region:"city",cost:{Money:e=>Ps("nanite_factory",e,25e3,oi(1.25)),Copper:e=>Ps("nanite_factory",e,1200,oi(1.25)),Steel:e=>Ps("nanite_factory",e,1e3,oi(1.25))},effect(){let e=wr(2500);return`
                            ${F("city_nanite_factory_effect",[t.resource.Nanite.name])}
                            ${F("plus_max_resource",[e,t.resource.Nanite.name])}.
                            `},special:!0,action(){return!!ii($(this)[0])&&(t.city.nanite_factory.count++,t.settings.showIndustry=!0,$i(),!0)},flair:F("city_nanite_factory_flair")},r,a);case"captive_housing":return i({id:`${a}-captive_housing`,title:F("city_captive_housing"),desc:F("city_captive_housing_desc"),category:"residential",reqs:{unfathomable:1},trait:["unfathomable"],region:"city",cost:{Money:e=>Ps("captive_housing",e,40,1.35),Lumber:e=>Ps("captive_housing",e,30,1.35),Stone:e=>Ps("captive_housing",e,18,1.35)},effect(){let e="";t.race.artifical||t.race.detritivore||t.race.carnivore||t.race.soul_eater||(e+=`
                            ${F("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${F("city_captive_housing_broken",[Di[i].name,s])}`,e+=`
                            ${F("city_captive_housing_untrained",[Di[i].name,n])}
                            `}return e+=`
                            ${F("city_captive_housing_capacity",[a,t.city.hasOwnProperty("captive_housing")?t.city.captive_housing.raceCap:0])}
                            `,t.tech.unfathomable&&t.tech.unfathomable>=2&&(e+=`
                            ${F("plus_max_resource",[1,F("job_torturer")])}
                            `),e},action(){if(ii($(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 i({id:`${a}-horseshoe`,title:()=>F(`city_${mn(!0)}`,[mn(!1)]),desc:()=>F(`city_${mn(!0)}_desc`,[mn(!1)]),category:"outskirts",reqs:{primitive:3},condition:()=>t.race.hooved||on("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)*(Ki.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)*(Ki.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*(Ki.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*(Ki.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*(Ki.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)*(Ki.hooved.vars()[0]/100)):0}},action(){return!(t.race.hooved||!on("fool",2023))||!(!t.resource.Horseshoe.display||!ii($(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 Fr(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 Ar=["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(Ar.forEach((e=>Sr.evolution[e]={id:`evolution-${e}`,title:()=>Di[e].name,desc:()=>`${F("evo_evolve")} ${Di[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_${Di[e].type}`]>=2&&100===t.evolution.final&&!t.race.evoFinalMenu,cost:{RNA:()=>320,DNA:()=>320},race:!0,effect:()=>`${"string"==typeof Di[e].desc?Di[e].desc:Di[e].desc()} ${F("evo_complete")}`,action(){if(ii($(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,Lr(),!0;t.race.species=e,mi()}(e);t.race.species=e,mi()}return!1},queue_complete:()=>t.tech.evo&&7===t.tech.evo?1:0,emblem:()=>Ys(`extinct_${e}`)})),Object.keys(t.stats.synth).length>1){let e=nn(Ar);e.push("junker"),e.push("sludge"),e.forEach((e=>Sr.evolution[`s-${e}`]={id:`evolution-s-${e}`,title:()=>Di[e].name,desc:()=>`${F("evo_imitate")} ${Di[e].name}`,reqs:{evo:8},grant:["evo",9],condition:()=>t.stats.synth[e]&&t.race.evoFinalMenu,cost:{},race:!0,effect:()=>F("evo_imitate_race",[Di[e].name]),action:()=>(t.stats.synth[e]&&(t.race.species=t.race.evoFinalMenu,t.race.srace=e,mi()),!1),queue_complete:()=>t.tech.evo&&8===t.tech.evo?1:0}))}const Ir={plasmid:"no_plasmid",mastery:"weak_mastery",trade:"no_trade",craft:"no_craft",crispr:"no_crispr",nerfed:"nerfed",badgenes:"badgenes"};Object.keys(Ir).forEach((e=>Sr.evolution[e]={id:`evolution-${e}`,title:F(`evo_challenge_${e}`),desc:F(`evo_challenge_${e}`),condition:()=>t.evolution.hasOwnProperty(e),cost:{DNA:()=>10},challenge:!0,effect:()=>Er(e),action(){return ii($(this)[0])&&(t.race[Ir[e]]?(delete t.race[Ir[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[Ir[e]]=1,$(`#${$(this)[0].id}`).addClass("hl")),Cr(),Mn()),!1},highlight:()=>!!t.race[Ir[e]],queue_complete:()=>0}));const Tr={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 Lr(){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){Cs($(e),!0)})),Cs($("#evolution .evolving"),!0)}Object.keys(Sr.evolution).forEach((function(e){if(!Sr.evolution[e].challenge){ai(Sr.evolution[e].id);var a=!0;Sr.evolution[e].hasOwnProperty("reqs")&&Object.keys(Sr.evolution[e].reqs).forEach((function(r){(!t.tech[r]||t.tech[r]=2&&_i(),t.tech.evo_challenge&&Cr())}}function Er(e){switch(e){case"nerfed":return F(`evo_challenge_${e}_effect`,"antimatter"===t.race.universe?["20%","50%","50%","33%"]:["50%","20%","50%","33%"]);case"badgenes":return F(`evo_challenge_${e}_effect`,[1,2]);case"orbit_decay":return Ls()>=100?`
                            ${F("evo_challenge_orbit_decay_effect",[5e3])}
                            ${F("evo_challenge_scenario_failwarn")}
                            `:`
                            ${F("evo_challenge_orbit_decay_effect",[5e3])}
                            ${F("evo_challenge_scenario_failwarn")}
                            ${F("evo_challenge_scenario_warn")}
                            `;case"junker":return"hellscape"===t.city.biome&&"evil"!==t.race.universe?`
                            ${F("evo_challenge_junker_effect")}
                            ${F("evo_warn_unwise")}
                            `:F("evo_challenge_junker_effect");case"cataclysm":return Ls()>=50?`
                            ${F("evo_challenge_cataclysm_effect")}
                            ${F("evo_challenge_cataclysm_warn")}
                            `:`
                            ${F("evo_challenge_cataclysm_effect")}
                            ${F("evo_challenge_scenario_warn")}
                            `;default:return F(`evo_challenge_${e}_effect`)}}function Kr(){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=ta(t.civic.professor.workers,"professor")*("antimatter"===t.race.universe?.02:.04);t.race.high_pop&&(e=$e(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=$e(e)),a+=e*ta(t.civic.priest.workers,"priest")}"antimatter"===t.race.universe&&(a/=2),t.race.spiritual&&(a*=1+Ki.spiritual.vars()[0]/100);let r=as("seraph");if(r>0&&(a*=1+Ki.spiritual.vars(1)[0]/100*r),"theocracy"===t.civic.govern.type&&(a*=1+ee.theocracy()[0]/100),t.race.ooze&&(a*=1-Ki.ooze.vars()[1]/100),a=+a.toFixed(3),e=`
                            ${F("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=$e(e)),a+=e*ta(t.civic.priest.workers,"priest")}e+=`
                            ${F("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*ta(t.civic.professor.workers,"professor");t.race.high_pop&&(e=$e(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=$e(e)),a+=e*ta(t.civic.priest.workers,"priest")}t.race.spiritual&&(a*=1+Ki.spiritual.vars()[0]/100);let r=as("seraph");r>0&&(a*=1+Ki.spiritual.vars(1)[0]/100*r),"theocracy"===t.civic.govern.type&&(a*=1+ee.theocracy()[0]/100),t.race.ooze&&(a*=1-Ki.ooze.vars()[1]/100),t.race.orbit_decayed&&t.race.truepath&&(a*=.1),a=+a.toFixed(3),e=`
                            ${F("city_temple_effect2",[a])}
                            `}return t.tech.fanaticism&&t.tech.fanaticism>=3&&(e+=`
                            ${F("city_temple_effect3")}
                            `),t.tech.anthropology&&t.tech.anthropology>=4&&(e+=`
                            ${t.race.truepath?F("city_temple_effect_tp",[2,25]):F("city_temple_effect4")}
                            `),e}function Dr(){let e=t.tech.gambling>=3?6e4:4e4;t.tech.gambling>=5&&(e+=t.tech.gambling>=6?24e4:6e4),e=wr(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?"":`
                            ${F("city_max_entertainer",[aa(1)])}
                            `,r=t.race.orbit_decayed||t.tech.isolation?`
                            ${F("plus_max_resource",[aa(1),F("banker_name")])}
                            `:"",i=`
                            ${F("plus_max_resource",[`$${e.toLocaleString()}`,F("resource_Money_name")])}
                            ${a}${r}
                            ${F("city_max_morale",[1])}
                            `,s=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&&(s*=t.tech.gambling>=5?2:1.5),t.tech.stock_exchange&&t.tech.gambling>=4&&(s*=1+.01*t.tech.stock_exchange),"corpocracy"===t.civic.govern.type&&(s*=3),"socialist"===t.civic.govern.type&&(s*=.8),t.race.inflation&&(s*=1+t.race.inflation/1250),t.tech.isolation&&(s*=1.25,t.tech.iso_gambling&&(s*=1+.05*ta(t.civic.banker.workers,"banker"))),s=+s.toFixed(2),i+=`
                            ${F("tech_casino_effect2",[s])}
                            `,i}function Br(e,a,r,i){return((t.evolution.hasOwnProperty(e)?t.evolution[e].count:0)+(i||0))*r+a}function Gr(e){return t.stats.achieve.blackhole&&(e*=1+.05*t.stats.achieve.blackhole.l),Math.round(e)}function Nr(){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+Ki.pack_rat.vars()[1]/100);let a=as("kobold");return a>0&&(e*=1+Ki.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*_/100),e}function Rr(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(Sr.city[e].hasOwnProperty("path")&&!Sr.city[e].path.includes(a))return!1;var r=!0;return Object.keys(Sr.city[e].reqs).forEach((function(a){(!t.tech[a]||t.tech[a]=3&&(i=!0,t.r_queue.queue.forEach((function(e){Ur(e.type,!1)&&(a[Sr[e.action][e.type].grant[0]]={v:Sr[e.action][e.type].grant[1],a:e.type})})),Object.keys(s).forEach((function(r){let s=t.tech[r]||0;Hr(r,t.tech[r])||(!a[r]||a[r].vs+1)&&(i=!1)}))),!(!r&&!i||t.tech[Sr.tech[e].grant[0]]&&!(t.tech[Sr.tech[e].grant[0]]`).appendTo("#city").append(`

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

                            `),e[a].forEach((function(e){Zr("city",e)})),_s(`dist-${a}`,(function(){return F(`city_dist_${a}_desc`)}),{elm:`#city-dist-${a} h3`,classes:"has-background-light has-text-dark"})}}))}function Jr(){if(!t.settings.tabLoad&&3!==t.settings.civTabs)return;let e={},a={},r={},i=[],s=[],n=[];["primitive","civilized","discovery","industrialized","globalized","early_space","deep_space","interstellar","intergalactic"].forEach((function(e){r[e]=[]}));const c={interstellar:"solar"};let o={};Object.keys(Sr.tech).forEach((function(l){if(!function(e){let a=t.race.truepath?"truepath":"standard";return!(!Or[a].includes(Sr.tech[e].era)&&!Sr.tech[e].hasOwnProperty("path")||Sr.tech[e].hasOwnProperty("path")&&!Sr.tech[e].path.includes(a))}(l))return;ai(Sr.tech[l].id);let _=function(e){let a=Sr.tech[e].grant[0];if(t.tech[a]&&t.tech[a]>=Sr.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=Sr.tech[l],p="category"in d?d.category:"research";if(_||-1!==i.indexOf(p)||i.push(p),_&&-1===s.indexOf(p)&&s.push(p),-1===n.indexOf(p)&&n.push(p),!0===_)p in a||(a[p]=[]),a[p].push(l);else{let a=Sr.tech[l];if(!Vr(a))return;let i=Ur(l,o);if(!i)return;p in e||(e[p]=[]);let s=t.race.truepath&&c[a.era]?c[a.era]:a.era;r.hasOwnProperty(s)||(r[s]=[]),r[s].push({t:l,p:"precog"===i})}})),Cs($("#tech")),Object.keys(r).forEach((function(e){r[e].length>0&&($("#tech").append(`

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

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

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

                            `);let t=Zs(4,12,!1);t.length>0&&"science"===e&&$("#tech-dist-old-science h3").append(t),a[e].forEach((function(e){Zr("tech",e,!0,!1)}))}))}function Zr(e,t,a,r){Xr(Sr[e][t],e,t,a,r)}function Xr(e,a,r,i,s){if(!1===Vr(e))return;let n=a;"outerSol"===a&&(a="space"),e.region&&(a=e.region),e.powered&&!t[a][r].on&&(t[a][r].on=0);let c=e.id;ai(c);let o="";s&&e&&e.reqs&&Object.keys(e.reqs).forEach((function(e){s[e]&&(o+=` data-req-${e}="${s[e].a}"`)}));let l,_=e.highlight&&e.highlight()?$(`
                            `):$(`
                            `);if(si(e,!1,["genes","blood"].includes(a))||_.addClass("cna"),si(e,!0,["genes","blood"].includes(a))||_.addClass("cnam"),i)l=$('{{ title }}');else{let t="",r="";if(e.cost){let i="genes"!==a&&"blood"!==a?Rs(e):e.cost;Object.keys(i).forEach((function(e){let a=i[e]();a>0&&(t+=` res-${e}`,r+=` data-${e}="${a}"`)}))}let i="";e.class&&(i="function"==typeof e.class?` ${e.class()}`:` ${e.class}`),s&&(i=" precog");let n=e.highlight?e.highlight()?`${F("active")}`:`${F("not_active")}`:"";l=$(`${n}{{ title }} description`)}if(_.append(l),e.hasOwnProperty("special")&&("function"==typeof e.special&&e.special()||!0===e.special)){let e=$('
                            \n \n
                            ');_.append(e)}if(e.on||e.off){if(e.on){let e=$('');_.append(e)}if(e.off){let e=$('');_.append(e)}}else if(e.powered&&t.tech.high_tech&&t.tech.high_tech>=2&&Wr(e)||e.switchable&&e.switchable()){let t=$(``),a=$(``);_.append(t),_.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($('
                            ')),i?$("#oldTech").append(_):$("#"+n).append(_),"tech"!==a&&t[a]&&t[a][r]&&0===t[a][r].count&&($(`#${c} .count`).css("display","none"),$(`#${c} .special`).css("display","none"),$(`#${c} .on`).css("display","none"),$(`#${c} .off`).css("display","none")),e.emblem){let t=e.emblem();_.append($(t))}let d={template:''};zs({el:"#"+c,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)||Yr(e,a,r)},describe(){P(function(e,a){let r="string"==typeof e.desc?e.desc:e.desc();if(r+=". ",e.cost&&!a){r=si(e)?r+F("affordable")+". ":r+F("not_affordable")+". ",r+="Costs: ";let a=e.id.split("-")[0];var i="genes"!==a&&"blood"!==a?Rs(e):e.cost;Object.keys(i).forEach((function(e){if("Custom"===e){let t=i[e]();r+=t.label}else if("Structs"===e){let a=i[e]();Object.keys(a).forEach((function(e){Object.keys(a[e]).forEach((function(i){let s="";if(a[e][i].hasOwnProperty("s")){let t=a[e][i].s;s="string"==typeof Sr[e][t][i].title?Sr[e][t][i].title:Sr[e][t][i].title()}else s="string"==typeof Sr[e][i].title?Sr[e][i].title:Sr[e][i].title();r+=`${s}. `,t[e][i]?a[e][i].count>t[e][i].count?r+=`${F("insufficient")} ${s}. `:a[e][i].hasOwnProperty("on")&&a[e][i].on>t[e][i].on&&(r+=`${F("insufficient")} ${s} enabled. `):r+=`${F("insufficient")} ${s}. `}))}))}else if(t.prestige.hasOwnProperty(e)){let a=i[e]();if(a>0){"Plasmid"===e&&"antimatter"===t.race.universe&&(e="AntiPlasmid");let i=F(`resource_${e}_name`);r+=`${i}: ${a}. `,t.prestige[e].count0){let i=F(`resource_${e}_name`);r+=`${i}: ${a}. `,t.portal.purifier.supply0){let e="Money"===s?"$":t.resource[s].name+": ";e=e.replace("_"," ");let i=q(a,1);r+=`${e}${i}. `,t.resource[s].amount0&&(clearInterval(t),li(e,r))}),50)}},on_label:()=>`on: ${t[a][r].on}`,off_label:()=>"off: "+(t[a][r].count-t[a][r].on),power_on(){let i=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,i){let s=t[a][r].count-e;if("city-casino"===i&&!t.race.cataclysm&&!t.race.orbit_decayed||"space-spc_casino"===i&&(t.race.cataclysm||t.race.orbit_decayed)||"tauceti-tauceti_casino"===i&&t.tech.isolation){let e=Js(5,12);if(0===s&&e.length>0)return e}return s},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=Js(12,12);if(0===e&&t.length>0)return t}else if("city-garrison"===a||"space-space_barracks"===a){let t=Zs(1,14,!0);if(e===("city-garrison"===a?13:0)&&t.length>0)return t}return e},title:e=>e,options:e=>F("action_options",[e])}}),_s(c,(function(){}),{in:function(s){ti(s.popper,e,t[a][r],i,a,r)},out:function(){zs({el:"#popTimer"},"destroy")},attach:"starDock"===a?"body .modal":"#main",wide:e.wide})}function Yr(e,a,r){if("spcdock-launch_ship"===e.id)e.action();else switch(a){case"tech":if(t.settings.qKey&&y.q||!Ur(r,!1)||!e.action()){if((!e.no_queue||!e.no_queue())&&t.tech.r_queue&&t.r_queue.queue.length0){let o=t.settings.qKey?i:1;o>t.queue.max-s&&(o=t.queue.max-s);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(c,l*o):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(c,l*o),qs:l,t_max:0,bres:!1});else for(let i=0;i0;i++)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(c,l),qs:l,t_max:0,bres:!1}),c-=l;n=!0}}break}t.race.inflation&&t.tech.primitive&&(e.hasOwnProperty("inflation")&&!e.inflation||t.race.inflation++),s=!0}if(s&&(function(e,a,r){if(!si(e)){let t=e.id;$(`#${t}`).addClass("cna")}if(e.grant){let a=e.grant[0];(!t.tech[a]||t.tech[a]a?(s.q=a,a=0):a-=s.q)}}n&&bs();break}}}function ei(e,a){let r=e.id.split("-");if(t.hasOwnProperty(r[0])&&t[r[0]].hasOwnProperty(r[1])&&e.hasOwnProperty("powered")){let i=t.city.power;return 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&&(i+=t.race.replicator.pow),!(t.city.hasOwnProperty("powered")&&i>=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 ti(e,a,r,i,s,n,c){Cs(e);var o="string"==typeof a.desc?a.desc:a.desc();c=c||!1;let l=!1;!(s&&n&&"ontouchstart"in document.documentElement&&navigator.userAgent.match(/Mobi/)&&t.settings.touch)||(l=$(`${a.hasOwnProperty("touchlabel")?a.touchlabel:F("construct")}`),e.append(l),$("#touchButton").on("touchstart",(function(){Yr(a,s,n)}))),e.append($(`
                            ${o}
                            `));let _=a.id.split("-")[0];a.category&&"tech"===_&&!i&&e.append($(`
                            ${F("tech_dist_category")}: ${F(`tech_dist_${a.category}`)}
                            `));let d=Ms(a,!1,!0);if(a.cost&&!i){let r=!0;var p=$('
                            '),u="genes"!==_&&"blood"!==_?Rs(a):a.cost;Object.keys(u).forEach((function(e){if("Custom"===e){let t=u[e]();p.append($(`
                            ${t.label}
                            `)),r=!1}else if("Structs"===e){let a=u[e]();Object.keys(a).forEach((function(e){Object.keys(a[e]).forEach((function(i){let s=a[e][i].hasOwnProperty("on")?a[e][i].on:a[e][i].count,n="has-text-dark",c="";t[e][i]?a[e][i].count>t[e][i].count?(n="has-text-danger",c=' (blocking resource)'):a[e][i].hasOwnProperty("on")&&a[e][i].on>t[e][i].on&&(n="has-text-alert"):(n="has-text-danger",c=' (blocking resource)');let o="";if(a[e][i].hasOwnProperty("s")){let t=a[e][i].s;o="string"==typeof Sr[e][t][i].title?Sr[e][t][i].title:Sr[e][t][i].title()}else o="string"==typeof Sr[e][i].title?Sr[e][i].title:Sr[e][i].title();r=!1,p.append($(`
                            ${o}: ${s}${c}
                            `))}))}))}else if(t.prestige.hasOwnProperty(e)){let a=u[e]();if(a>0){"Plasmid"===e&&"antimatter"===t.race.universe&&(e="AntiPlasmid");let i=F(`resource_${e}_name`),s="has-text-dark",n="";t.prestige[e].count(blocking resource)'),r=!1,p.append($(`
                            ${i}: ${a}${n}
                            `))}}else if("Supply"===e){let a=u[e]();if(a>0){let i=F(`resource_${e}_name`),s="has-text-dark",n="";t.portal.purifier.supply(blocking resource)'),r=!1,p.append($(`
                            ${i}: ${a}${n}
                            `))}}else if("Morale"!==e&&"Army"!==e&&"Bool"!==e){let a=u[e]();if(a>0){let i="",s="Species"===e?t.race.species:e;if("HellArmy"===e){let n=F("fortress_troops"),c="has-text-dark";t.portal.fortress.garrison-t.portal.fortress.patrols*t.portal.fortress.patrol_size(blocking resource)'):c="has-text-alert"),r=!1,p.append($(`
                            ${n}: ${a}${i}
                            `))}else{let i="Money"===s?"$":t.resource[s].name+": ";i=i.replace("_"," ");let n="has-text-dark",o="";t.resource[s].amount(blocking resource)'):n="has-text-alert",c&&c!==e&&d.r===s?(n+=" grad-from-left",o=' (first blocking resource)'):c&&c===e&&d.r!==s&&(n+=" grad-from-left-warn")):c&&c===e&&(n+=" grad-from-right",o=' (last blocking resource)');let l=q(a,1);r=!1,p.append($(`
                            ${i}${l}${o}
                            `))}}}})),r||e.append(p)}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 Sr.tech[r].title?Sr.tech[r].title:Sr.tech[r].title())})),t.length>0){let a=t.join(", ");e.append($(`
                            ${F("requires_tech",[a])}
                            `))}}if(!i&&"blood"!==a.id.substring(0,5)&&!si(a)&&si(a,!0)){if("string"==typeof r&&"notimer"===r)return;if(r&&r.time)e.append($('
                            {{ time | timer }}
                            ')),zs({el:"#popTimer",data:r,filters:{timer:e=>F("action_ready",[e])}});else{let t=Fs(d.t);e.append($(`
                            ${F("action_ready",[t])}
                            `))}}("portal-spire"===a.id||"portal-waygate"===a.id&&t.tech.waygate>=2)&&r&&r.time&&(e.append($('
                            {{ time | timer }}
                            ')),zs({el:"#popTimer",data:r,filters:{timer:e=>F("floor_clearing",[!a.hasOwnProperty("mscan")||a.hasOwnProperty("mscan")&&a.mscan()>0?e:"???"])}}))}function ai(e){Cs($(`#${e}`),!0),ds(e)}function ri(e,a,r){var i=e.id;t[a]&&t[a][r]&&t[a][r].count&&($(`#${i} .count`).html(t[a][r].count),t[a][r]&&t[a][r].count>0&&($(`#${i} .count`).css("display","inline-block"),$(`#${i} .special`).css("display","block"),$(`#${i} .on`).css("display","block"),$(`#${i} .off`).css("display","block"))),$("#popper").data("id")===i&&ti($("#popper"),e,t[a][r],!1,a,r)}function ii(e,a){return!!ni(a=a||Rs(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](),i="Species"===e?t.race.species:e;t.resource[i].amount-=r,"Knowledge"===i&&(t.stats.know+=r)}})),!0)}function si(e,a,r){if(e.cost){let n=r?e.cost:Rs(e);return a?(i=n,s=!0,Object.keys(i).forEach((function(e){if("Custom"===e);else if("Structs"===e){if(!ci(i[e]()))return void(s=!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(s=!1)}})),s):ni(n)}var i,s;return!0}function ni(e){var a=!0;return Object.keys(e).forEach((function(i){if("Custom"===i){if(!e[i]().met)return void(a=!1)}else if("Structs"===i){if(!ci(e[i]()))return void(a=!1)}else if(t.prestige.hasOwnProperty(i)){let r=i;if("Plasmid"===i&&"antimatter"===t.race.universe&&(i="AntiPlasmid"),t.prestige[i].count=0&&s>t.resource[n].max;if(s>Number(t.resource[n].amount)||c)return void(a=!1)}})),a}function ci(e){let a=!0;return Object.keys(e).forEach((function(r){t.hasOwnProperty(r)?Object.keys(e[r]).forEach((function(i){t[r].hasOwnProperty(i)?(t[r][i].count${r}

                            `));var i=$('
                            ');switch($("#modalBox").append(i),a){case"smelter":case"hell_smelter":case"stellar_forge":case"hell_forge":case"geothermal":case"ore_refinery":ki("smelter",i);break;case"factory":case"red_factory":case"int_factory":case"tau_factory":ki("factory",i);break;case"star_dock":!function(e){if(t.tech.genesis<4){let t=$(`
                            ${F("stardock_warn")}
                            `);return void e.append(t)}let a=$('
                            ');e.append(a),Xr(Sr.starDock.probes,"starDock","probes"),t.tech.geck&&t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=5&&Xr(Sr.starDock.geck,"starDock","geck"),t.tech.genesis>=5&&Xr(Sr.starDock.seeder,"starDock","seeder"),6===t.tech.genesis&&Xr(Sr.starDock.prep_ship,"starDock","prep_ship"),t.tech.genesis>=7&&Xr(Sr.starDock.launch_ship,"starDock","launch_ship")}(i);break;case"mining_droid":ki("droid",i);break;case"g_factory":case"refueling_station":ki("graphene",i);break;case"freighter":case"super_freighter":Ja(i);break;case"pylon":ki("pylon",i);break;case"rock_quarry":ki("rock_quarry",i);break;case"titan_mine":ki("titan_mine",i);break;case"mining_ship":ki("mining_ship",i);break;case"alien_space_station":ki("alien_space_station",i);break;case"nanite_factory":ki("nanite_factory",i);break;case"alien_outpost":ki("replicator",i)}}function _i(){Cs($("#evolution .evolving"),!0);let e=$(`
                            ${t.evolution.final}%
                            `);$("#evolution").append(e)}function di(){return"magic"===t.race.universe?F("city_wizard_tower_title"):t.race.evil?F("city_babel_title"):F("city_wardenclyffe")}function pi(){switch(t.race.species){case"orc":return F("city_basic_housing_orc_title");case"wolven":return F("city_basic_housing_wolven_title");case"sporgar":return F("city_basic_housing_sporgar_title");case"dracnid":case"balorg":return F("city_basic_housing_title7");case"imp":return F("city_basic_housing_title8");case"seraph":return F("city_basic_housing_seraph_title");case"unicorn":return F("city_basic_housing_unicorn_title")}switch(Di[t.race.species].type){case"avian":return F("city_basic_housing_nest_title");case"plant":return F("city_basic_housing_entish_title");case"sand":return F("city_basic_housing_sand_title");case"polar":return F("city_basic_housing_polar_title");case"eldritch":return F("city_basic_housing_eldritch_title")}return t.city.ptrait.includes("trashed")?F("city_basic_housing_trash_title"):F("city_basic_housing_title")}function ui(e,a){switch(e){case"small":return pi();case"medium":return function(){switch(t.race.species){case"sporgar":return F("city_cottage_title2");case"balorg":return F("city_cottage_title3");case"imp":return F("city_basic_housing_title7");case"seraph":return F("city_cottage_title4");case"unicorn":return F("city_cottage_title5");case"dracnid":return F("city_cottage_title7")}switch(Di[t.race.species].type){case"avian":return F("city_cottage_title6");case"eldritch":return F("city_cottage_title8")}return F("city_cottage_title1")}();case"large":return function(e){if(!e&&D("extravagant",0))return F("city_mansion");if("sporgar"===t.race.species)return F("city_apartment_title2");switch(Di[t.race.species].type){case"avian":return F("city_apartment_title5");case"sand":return F("city_apartment_title6");case"demonic":return F("city_apartment_title3");case"angelic":return F("city_apartment_title4");case"giant":return F("city_apartment_title7");case"eldritch":return F("city_apartment_title8")}return F("city_apartment_title1")}(a)}}function hi(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(i.action)){let e=!0;Object.keys(Sr[i.action]).forEach((function(a){Sr[i.action][a][i.type]&&e&&(t.queue.queue[r].label="string"==typeof Sr[i.action][a][i.type].title?Sr[i.action][a][i.type].title:Sr[i.action][a][i.type].title(),e=!1)}))}else Sr[i.action][i.type]&&(t.queue.queue[r].label="string"==typeof Sr[i.action][i.type].title?Sr[i.action][i.type].title:Sr[i.action][i.type].title())}}if(e&&t.tech.r_queue&&t.r_queue.display)for(let e=0;e=4&&ts(e)})),Object.keys(Di[t.race.species].traits).forEach((function(e){ts(e,{set:Di[t.race.species].traits[e]})})),t.race.imitation&&t.race.srace&&Yi(!1),Object.keys(t.tech).forEach((function(e){"evo_"===e.substring(0,4)&&delete t.tech[e]})),delete t.tech.evo,t.evolution={};const s=new Date;!t.settings.boring&&11===s.getMonth()&&s.getDate()>=17&&("elven"===t.race.species?(ts("slaver",{set:2}),ts("resourceful",{set:.5}),ts("small",{set:.25})):"capybara"===t.race.species?(ts("beast_of_burden",{set:1}),ts("pack_rat",{set:.5}),ts("musical",{set:.25})):"centaur"===t.race.species?(ts("beast_of_burden",{set:1}),ts("curious",{set:.5}),ts("blissful",{set:.25})):"wendigo"===t.race.species?(ts("immoral",{set:3}),ts("cannibalize",{set:.5}),ts("claws",{set:.25})):"yeti"===t.race.species?(ts("scavenger",{set:3}),ts("regenerative",{set:.5}),ts("musical",{set:.25})):"entish"===t.race.species&&(ts("photosynth",{set:3}),ts("optimistic",{set:.5}),ts("armored",{set:.25})));const n=on("easter");if("wolven"===t.race.species&&n.active?(ts("hyper",{set:1}),ts("fast_growth",{set:1}),ts("rainbow",{set:1}),ts("optimistic",{set:1})):"vulpine"===t.race.species&&n.active&&(ts("cannibalize",{set:2}),ts("rage",{set:1}),ts("blood_thirst",{set:1}),ts("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&&Ni(e);let l=qs();t.civic.foreign.gov0.name={s0:l.s0,s1:l.s1};let _=qs();for(;l.s0===_.s0&&l.s1===_.s1;)_=qs();t.civic.foreign.gov1.name={s0:_.s0,s1:_.s1};let d=qs();for(;l.s0===d.s0&&l.s1===d.s1||_.s0===d.s0&&_.s1===d.s1;)d=qs();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=qs(!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=qs(!0);for(;a.s1===e.s1;)a=qs(!0);t.civic.foreign.gov4.name={s0:99,s1:a.s1}}if(t.race.cataclysm?ms(F("cataclysm_sentience",[Di[t.race.species].home,cn("name")]),"info",!1,["progress"]):ms(F("sentience",[F("genelab_genus_"+Di[t.race.species].type),Di[t.race.species].entity,cn("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(Ds(!0),t.blood.aware&&(t.settings.arpa.blood=!0,t.tech.b_stone=2),ea(!0),J(),W(!0),t.race.shapeshifter&&es(!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),Ls(!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),$s("sentience",{species:t.race.species,challenge:Sn()-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},Qr(),Jr(),Et(),qe("Physics"),na()):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=qe("Monument"),Jr(),Ze(),qe("Physics"),na()):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},Qr(),Jr(),na()),t.settings.tabLoad?(Qr(),Q(),me($("#c_garrison"),!1),ae(),t.race.cataclysm||t.race.lone_survivor?(Cs($("#r_civics")),W(),$i(),Ka("market"),Ka("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 i=$(`
                            `);$("#resStorage").append(i),tr(`#stack-${e}`,i,e,t)}r&&(i=$(`
                            `),$("#market").append(i),Wa(`#market-${e}`,i,e,t,!0))})),Ga(),qe("Genetics"),qe("Crispr"),qe("Blood")):t.sim&&(qe("Crispr"),qe("Blood"))):$t("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))),j.w&&j.w.terminate(),window.location.reload())}function gi(e){switch(Di[e].fanaticism){case"smart":t.race.dumb?(Ni(5),qe("Genetics")):vi("smart");break;case"infectious":vi("infectious"),"human"===t.race.species&&Pn("infested");break;case"blood_thirst":vi("blood_thirst"),"entish"===t.race.species&&Pn("madagascar_tree");break;case"none":Ni(5),qe("Genetics");break;default:vi(Di[e].fanaticism)}}function vi(e){t.race[e]?ts(e)?"imitation"===e?Yi(!0):"shapeshifter"===e&&es(t.race.ss_genus):(Ni(5),qe("Genetics")):(t.race[e]=1,Zi(e))}function fi(){if(!t.settings.tabLoad&&3!==t.settings.civTabs)return;yi(),Cs($("#resQueue")),$("#resQueue").append($(`\n

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

                            \n \n `));let e=$('
                              ');$("#resQueue").append(e),e.append($('
                            • {{ item.label }} [{{ item.time | time }}]
                            • '));try{zs({el:"#resQueue",data:t.r_queue,methods:{remove(e){ds(`rq${t.r_queue.queue[e].id}`),t.r_queue.queue.splice(e,1),fi(),Jr()},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?F("r_queue_play"):F("r_queue_pause")},filters:{time:e=>Fs(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,fi()}}),function(){for(let e=0;e=5?e-.01:e}function wi(){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-Ki.paranoid.vars()[0]/100),t.race.hoarder&&(e*=1+Ki.hoarder.vars()[0]/100);let a=as("dracnid");a>0&&(e*=1+Ki.hoarder.vars(1)[0]/100*a),t.tech.banking>=7&&(e*=1+$e(.05*ta(t.civic.banker.workers,"banker"))),t.tech.banking>=8&&(e+=$e(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 ki(e,a,r){switch(e){case"smelter":!function(e,a){let r=$(`
                              ${F("modal_smelter_fuel")}: {{s.count | on}}/{{ s.cap }}
                              `);if(e.append(r),e.hasClass("modalBody")){let e=Js(10);e.length>0&&r.prepend(e)}if(a&&t.race.forge&&t.race.steelen){let e=Zs(3,12,!0);e.length>0&&r.prepend(e)}let i=e.hasClass("modalBody")?"mSmelterFuels":"smelterFuels",s=$(`
                              `);if(e.append(s),!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=$('«'),i=$('»');s.append(r),s.append(a),s.append(i)}if(t.resource.Coal.display){let e=$(`${t.resource.Coal.name} `),a=$('«'),r=$('»');s.append(a),s.append(e),s.append(r)}}if(t.race.forge){let e=$(`${F("trait_forge_name")} {{ s.Oil }}`);s.append(e)}else if(t.resource.Oil.display){let e=$(`${t.resource.Oil.name} {{ s.Oil }}`),a=$('«'),r=$('»');s.append(a),s.append(e),s.append(r)}if(t.tech.star_forge&&t.tech.star_forge>=2){let e=$(`${F("star")} {{ s.Star }}`);s.append(e)}if(t.tech.smelting&&t.tech.smelting>=8){let e=$(`${F("modal_smelter_inferno")} {{ s.Inferno }}`),t=$('«'),a=$('»');s.append(t),s.append(e),s.append(a)}let n=$('
                              ');e.append(n);let c=!!(t.tech.irid_smelting||t.tech.m_smelting&&t.tech.m_smelting>=2);if(t.resource.Iridium.display&&c||t.resource.Steel.display&&t.tech.smelting>=2&&!t.race.steelen){let a=$(`
                              `);e.append(a),a.append(`
                              ${F("modal_smelter_type")}: {{s.count | son}}/{{ s.cap | on }}
                              `);let r=$('
                              ');a.append(r);let i=$(`${t.resource.Iron.name} {{ s.Iron }}`),s=$('«'),n=$('»');if(r.append(s),r.append(i),r.append(n),t.resource.Steel.display&&t.tech.smelting>=2&&!t.race.steelen){let e=$(`${t.resource.Steel.name} {{ s.Steel }}`),a=$('«'),i=$('»');r.append(a),r.append(e),r.append(i)}if(t.resource.Iridium.display&&c){let e=$(`${t.resource.Iridium.name} {{ s.Iridium }}`),a=$('«'),i=$('»');r.append(a),r.append(e),r.append(i)}}function o(e){switch(e){case"wood":return F("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?F("modal_build_coal2",[e,F("resource_Coal_name"),F("resource_Uranium_name")]):F("modal_build_coal1",[e,F("resource_Coal_name")])}case"oil":return t.race.forge?F("modal_build_forge"):F("modal_build_oil",["0.35",F("resource_Oil_name")]);case"star":return t.tech.irid_smelting?F("modal_build_star2",[F("resource_Titanium_name"),F("resource_Iridium_name")]):F("modal_build_star",[F("resource_Titanium_name")]);case"inferno":{let e=35,t=.5;return F("modal_build_inferno",[50,F("resource_Coal_name"),e,F("resource_Oil_name"),t,F("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),F("modal_smelter_steel",[+e.toFixed(3),F("resource_Steel_name"),F("resource_Coal_name"),F("resource_Iron_name")])}if("iridium"===e){let e=t.tech.smelting>=7?6.25:5;return t.race.pyrophobia&&(e*=.9),F("modal_smelter_iron",[+e.toFixed(3),F("resource_Iridium_name")])}{let e=t.tech.smelting>=3?t.tech.smelting>=7?15:12:10;return t.race.pyrophobia&&(e*=.9),F("modal_smelter_iron",[+e.toFixed(3),F("resource_Iron_name")])}}zs({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=>o(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:()=>Oi(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=Zs(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=Zs(3,12,!0);if(e.length>0)return e}return e}}});let _=e.hasClass("modalBody")?"mSmelterFuels":"smelterFuels";if(["wood","coal","oil","star","inferno"].forEach((function(e){_s(`${_}${e}`,(function(){return o(e)}),{elm:$(`#${_} > .${e}`),attach:"#main"})})),t.resource.Steel.display&&t.tech.smelting>=2&&!t.race.steelen||t.resource.Iridium.display&&c){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&&c)&&_s(`${a}${e}`,(function(){return l(e)}),{elm:$(`#${a} span.${e}`),attach:"#main"})}))}}(a,r);break;case"factory":!function(e,a){let r=$(`
                              ${F("modal_factory_operate")}: {{count | on}}/{{ on | max }}
                              `);e.append(r);let i=$(`
                              ${F("modal_factory_lux")}
                              `);e.append(i);let c=$(''),o=$('«'),l=$('»');if(i.append(o),i.append(c),i.append(l),t.tech.synthetic_fur){let a=$(`
                              ${t.race.evil?F("resource_Flesh_name"):F("resource_Furs_name")}
                              `);e.append(a);let r=$('{{ Furs }}'),i=$('«'),s=$('»');a.append(i),a.append(r),a.append(s)}let _=$(`
                              ${F("resource_Alloy_name")}
                              `);e.append(_);let d=$('{{ Alloy }}'),p=$('«'),u=$('»');if(_.append(p),_.append(d),_.append(u),t.tech.polymer){let t=$(`
                              ${F("resource_Polymer_name")}
                              `);e.append(t);let a=$('{{ Polymer }}'),r=$('«'),i=$('»');t.append(r),t.append(a),t.append(i)}if(t.tech.nano){let t=$(`
                              ${F("resource_Nano_Tube_name")}
                              `);e.append(t);let a=$('{{ Nano }}'),r=$('«'),i=$('»');t.append(r),t.append(a),t.append(i)}if(t.tech.stanene){let t=$(`
                              ${F("resource_Stanene_name")}
                              `);e.append(t);let a=$('{{ Stanene }}'),r=$('«'),i=$('»');t.append(r),t.append(a),t.append(i)}function h(e){let a=!!t.tech.factory;switch(e){case"Lux":{let e=+t.resource[t.race.species].amount*(a?xi.Lux.demand[t.tech.factory]:xi.Lux.demand[0]);return e=function(e){t.race.toxic&&(e*=1+Ki.toxic.vars()[0]/100);let a=as("shroomi");return a>0&&(e*=1+Ki.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*(n.colony||0)),e*=xe("psychic_cash")}(e).toFixed(2),F("modal_factory_lux_label",[a?xi.Lux.fur[t.tech.factory]:xi.Lux.fur[0],t.resource.Furs.name,e])}case"Furs":{let e=a?xi.Furs.money[t.tech.factory]:xi.Furs.money[0],r=a?xi.Furs.polymer[t.tech.factory]:xi.Furs.polymer[0];return F("modal_factory_alloy_label",[e,F("resource_Money_name"),r,F("resource_Polymer_name"),t.race.evil?F("resource_Flesh_name"):F("resource_Furs_name")])}case"Alloy":{let e=a?xi.Alloy.copper[t.tech.factory]:xi.Alloy.copper[0],r=a?xi.Alloy.aluminium[t.tech.factory]:xi.Alloy.aluminium[0];return F("modal_factory_alloy_label",[e,F("resource_Copper_name"),r,F("resource_Aluminium_name"),F("resource_Alloy_name")])}case"Polymer":if(t.race.kindling_kindred||t.race.smoldering)return F("modal_factory_polymer_label2",[a?xi.Polymer.oil_kk[t.tech.factory]:xi.Polymer.oil_kk[0],F("resource_Oil_name"),F("resource_Polymer_name")]);{let e=a?xi.Polymer.oil[t.tech.factory]:xi.Polymer.oil[0],r=a?xi.Polymer.lumber[t.tech.factory]:xi.Polymer.lumber[0];return F("modal_factory_polymer_label1",[e,F("resource_Oil_name"),r,t.resource.Lumber.name,F("resource_Polymer_name")])}case"Nano":{let e=a?xi.Nano_Tube.coal[t.tech.factory]:xi.Nano_Tube.coal[0],r=a?xi.Nano_Tube.neutronium[t.tech.factory]:xi.Nano_Tube.neutronium[0];return F("modal_factory_nano_label",[e,F("resource_Coal_name"),r,F("resource_Neutronium_name"),F("resource_Nano_Tube_name")])}case"Stanene":{let e=a?xi.Stanene.aluminium[t.tech.factory]:xi.Stanene.aluminium[0],r=a?xi.Stanene.nano[t.tech.factory]:xi.Stanene.nano[0];return F("modal_factory_stanene_label",[e,F("resource_Aluminium_name"),r,F("resource_Nano_Tube_name"),F("resource_Stanene_name")])}}}zs({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&&s.int_factory&&(a+=2*s.int_factory),t.tauceti.tau_factory&&n.tau_factory&&(a+=n.tau_factory*(t.tech.isolation?5:3));let r=b();for(var i=0;i0))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&&s.int_factory&&(a+=2*s.int_factory),t.tauceti.tau_factory&&n.tau_factory&&(a+=n.tau_factory*(t.tech.isolation?5:3)),Oi(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&&s.int_factory&&(e+=2*s.int_factory),t.tauceti.tau_factory&&n.tau_factory&&(e+=n.tau_factory*(t.tech.isolation?5:3)),e},spook(e){if(3===t.city.factory.Lux&&a){let e=Zs(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";_s(`${a}${t}`,(function(){return h(t)}),{elm:$(`#${a} .factory > .${t}`),attach:"#main"})}))}(a,r);break;case"droid":!function(e,a){let r=$(`
                              ${F("modal_factory_operate")}: {{count | on}}/{{ on | max }}
                              `);e.append(r);let i=$(`
                              ${F("resource_Adamantite_name")}
                              `);e.append(i);let s=$('{{ adam }}'),n=$('«'),c=$('»');i.append(n),i.append(s),i.append(c);let o=$(`
                              ${F("resource_Uranium_name")}
                              `);e.append(o);let l=$('{{ uran }}'),_=$('«'),d=$('»');o.append(_),o.append(l),o.append(d);let p=$(`
                              ${F("resource_Coal_name")}
                              `);e.append(p);let u=$('{{ coal }}'),h=$('«'),m=$('»');p.append(h),p.append(u),p.append(m);let g=$(`
                              ${F("resource_Aluminium_name")}
                              `);e.append(g);let v=$('{{ alum }}'),f=$('«'),y=$('»');function w(e){switch(e){case"adam":return F("modal_droid_res_label",[F("resource_Adamantite_name")]);case"uran":return F("modal_droid_res_label",[F("resource_Uranium_name")]);case"coal":return F("modal_droid_res_label",[F("resource_Coal_name")]);case"alum":return F("modal_droid_res_label",[F("resource_Aluminium_name")])}}g.append(f),g.append(v),g.append(y),zs({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:()=>Oi(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";_s(`${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",i=$(`
                              ${F("modal_smelter_fuel")}: {{count | on}}/{{ on | max }}
                              `);e.append(i);let s=$("
                              ");if(e.append(s),!t.race.kindling_kindred&&!t.race.smoldering){let e=t.resource.Lumber.name,a=$(`${e} {{ Lumber }}`),r=$('«'),i=$('»');s.append(r),s.append(a),s.append(i)}if(t.resource.Coal.display){let e=$(`${t.resource.Coal.name} {{ Coal }}`),a=$('«'),r=$('»');s.append(a),s.append(e),s.append(r)}if(t.resource.Oil.display){let e=$(`${t.resource.Oil.name} {{ Oil }}`),a=$('«'),r=$('»');s.append(a),s.append(e),s.append(r)}function n(e){switch(e){case"wood":return F("modal_graphene_produce",[350,t.race.evil?F("resource_Bones_name"):F("resource_Lumber_name"),F("resource_Graphene_name")]);case"coal":return F("modal_graphene_produce",[25,F("resource_Coal_name"),F("resource_Graphene_name")]);case"oil":return F("modal_graphene_produce",[15,F("resource_Oil_name"),F("resource_Graphene_name")])}}zs({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=>n(e),ariaCount:e=>` ${t[r].g_factory[e]} ${e} fueled.`,ariaProd:e=>`. ${t[r].g_factory[e]} producing ${e}.`,level:()=>Oi(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";_s(`${a}${t}`,(function(){return n(t)}),{elm:$(`#${a} > div > .${t}`),attach:"#main"})}))}(a,r);break;case"pylon":!function(e,a){let r=$(`
                              ${F("modal_pylon_casting")}: {{total | drain}}
                              `);e.append(r);let i=$('
                              ');e.append(i);let s=[];function n(e){let a=+ji(t.race.casting[e]).toFixed(4),r=+(ji(t.race.casting[e]+1)-ji(t.race.casting[e])).toFixed(4),i=+(t.race.casting[e]/(t.race.casting[e]+75)*100).toFixed(2);return"crafting"===e?F("modal_pylon_casting_label_crafting",[a,i,+(2*t.race.casting[e]/(2*t.race.casting[e]+75)*100).toFixed(2),r]):F("modal_pylon_casting_label",[F(`modal_pylon_spell_${e}`),a,r,i])}s=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&&s.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=$(`${F(`modal_pylon_spell_${e}`)} {{ ${e} }}`),a=$(`«`),r=$(`»`);i.append(a),i.append(t),i.append(r)}})),zs({el:a||"#specialModal",data:t.race.casting,methods:{buildLabel:e=>n(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:()=>Oi(t.race.casting.total,t.resource.Mana.gen,!0)},filters:{drain:function(e){let a=0;return s.forEach((function(e){t.race.casting[e]&&t.race.casting[e]>0&&(a+=ji(t.race.casting[e]))})),F("modal_pylon_casting_cost",[+a.toFixed(3)])}}}),s.forEach((function(t){let a=e.hasClass("modalBody")?"specialModal":"iPylon";_s(`${a}${t}`,(function(){return n(t)}),{elm:$(`#${a} > .pylon > .${t}`),attach:"#main"})}))}(a,r);break;case"rock_quarry":!function(e,a){e.append($(`
                              ${F("modal_quarry_ratio",[t.resource.Chrysotile.name])}
                              `));let r=$('
                              «»
                              ');e.append(r),zs({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($(`
                              ${F("modal_quarry_ratio",[t.resource.Adamantite.name])}
                              `));let r=$('
                              «»
                              ');e.append(r),zs({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=$(`
                              ${F("modal_factory_operate")}: {{count | on}}/{{ count | max }}
                              `);e.append(r);let i=e.hasClass("modalBody")?"mNFactoryRes":"NFactoryRes",s=$(`
                              `);e.append(s),qi.forEach((function(e){if(t.resource[e].display){let a=$(`${t.resource[e].name} {{ ${e} }}`),r=$(`«`),i=$(`»`);s.append(r),s.append(a),s.append(i)}})),zs({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;qi.forEach((function(e){r+=t.city.nanite_factory[e]}));let i=50*t.city.nanite_factory.count-r;a>i&&(a=i),a>0&&(t.city.nanite_factory[e]+=a)},eatLabel:e=>`Consume ${e} to produce ${t.resource.Nanite.name}`,level(){let e=0;qi.forEach((function(a){e+=t.city.nanite_factory[a]}));let a=t.city.nanite_factory.count;return Oi(e,a)}},filters:{on(){let e=0;return qi.forEach((function(a){e+=t.city.nanite_factory[a]})),e},max:()=>50*t.city.nanite_factory.count}}),qi.forEach((function(a){let r=e.hasClass("modalBody")?"specialModal":"iNFactory";_s(`${r}${a}`,(function(){return function(e){let a=+(Aa[e]/100*(Ki.deconstructor.vars()[0]/100)).toFixed(4),r=+(t.city.nanite_factory[e]*a).toFixed(4);return F("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($(`
                              ${F("tau_roid_mining_ship_ratio",[t.resource.Iron.name,t.resource.Aluminium.name])}
                              `));let r=$('
                              «»
                              ');e.append(r),e.append($(`
                              ${F("tau_roid_mining_ship_ratio",[t.resource.Iridium.name,t.resource.Neutronium.name])}
                              `));let i=$('
                              «»
                              ');if(e.append(i),t.tech.tau_roid>=5){e.append($(`
                              ${F("tau_roid_mining_ship_ratio",[t.resource.Orichalcum.name,t.resource.Elerium.name])}
                              `));let a=$('
                              «»
                              ');e.append(a)}zs({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($(`
                              ${F("tau_gas2_alien_station_focus",[t.resource.Knowledge.name])}
                              `));let r=$('
                              «»
                              ');e.append(r),zs({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?F("tech_antireplicator"):F("tech_replicator")}
                              `));let r=$('
                              ');if(e.append(r),a){let e="";Object.keys(Aa).forEach((function(a){e+=`${t.resource[a].name}`})),r.append(`
                              \n ${e}\n
                              `)}else{let e="";Object.keys(Aa).forEach((function(a){t.resource[a].display&&(e+=`${t.resource[a].name}`)})),r.append(`
                              ${e}
                              `)}let i=a?$("
                              "):$('
                              ');r.append(i);let s=$('{{ pow }}MW'),n=$('«'),c=$('»');if(i.append(n),i.append(s),i.append(c),e.append('
                              {{ res | result }}
                              '),zs({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=>F("tau_replicator",[Pi(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 $i(){if(t.settings.tabLoad||2===t.settings.civTabs&&1===t.settings.govTabs){if(Cs($("#industry")),t.city.smelter&&(t.city.smelter.count>0||t.race.cataclysm||t.race.orbit_decayed||t.tech.isolation)){var e=$(`

                              ${F("city_smelter")}

                              `);$("#industry").append(e),ki("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=$(`

                              ${F("city_factory")}

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

                              ${F("interstellar_mining_droid_title")}

                              `);$("#industry").append(r),ki("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 i=$(`

                              ${F("interstellar_g_factory_title")}

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

                              ${F("city_pylon")}

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

                              ${F("city_rock_quarry")}

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

                              ${F("city_mine")}

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

                              ${F("tau_roid_mining_ship")}

                              `);$("#industry").append(c),ki("mining_ship",c,"#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 o=$(`

                              ${F("tau_gas2_alien_station")}

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

                              ${F("city_nanite_factory")}

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

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

                              `);$("#industry").append(_),ki("replicator",_,"#iReplicator")}}}Object.keys(Tr).forEach((e=>Sr.evolution[e]={id:`evolution-${e}`,title:F(`evo_challenge_${e}`),desc(){let a="";return"micro"===t.race.universe&&(a+=`
                              ${F("evo_challenge_micro_warn")}
                              `),a+=`
                              ${F(`evo_challenge_${e}_desc`)}
                              `,["sludge","junker"].includes(e)&&(a+=`
                              ${F("evo_start")}
                              `),a},condition:()=>t.evolution.hasOwnProperty(e),cost:{DNA:()=>"c"===Tr[e].t?25:50},challenge:!0,effect:()=>Er(e),action(){return ii($(this)[0])&&("c"===Tr[e].t?function(e){t.race[e]?(delete t.race[e],$(`#evolution-${e}`).removeClass("hl"),"sludge"===e&&Object.keys(Di).forEach((function(e){"junker"!==e&&"sludge"!==e&&$(`#evolution-${e}`).removeClass("is-hidden")}))):(t.race[e]=1,$(`#evolution-${e}`).addClass("hl"),"sludge"===e&&(Object.keys(Di).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[Ir[e]]}))))),Cr(),Mn()}(e):function(e){if(t.race.sludge||Object.keys(Di).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[Ir[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(Di).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[Ir[e]]}))):(["nerfed","badgenes"].forEach((function(e){delete t.race[Ir[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;eYs(Tr[e].e),highlight:()=>!!t.race[e],queue_complete:()=>0})),Sr.evolution.bunker={id:"evolution-bunker",title:F("evo_bunker"),desc:()=>`
                              ${F("evo_bunker")}
                              ${F("evo_challenge")}
                              `,reqs:{evo:6},grant:["evo_challenge",1],condition:()=>t.genes.challenge&&100===t.evolution.final&&!t.race.evoFinalMenu,cost:{DNA:()=>10},effect:F("evo_bunker_effect"),action(){return!!ii($(this)[0])},queue_complete:()=>t.tech.evo_challenge?0:1,flair:F("evo_bunker_flair")};const xi={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]}},qi=["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 Pi(e,a){return t.race.lone_survivor?17.5*_/Aa[e]*a:12.5*(_||1)/Aa[e]*a**.75}function ji(e,t){return e*((1+(t=void 0===t?.0025:t))**e-1)}function Oi(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
                              ${F("power_grid_header")}
                              Distribute Low Power
                              `),zs({el:"#powerModeSwitch",data:t.settings}),Object.keys(e).forEach((function(a){if(!e[a].s)return;let r="";"power"===a&&(r=Zs(7,12,!1)),e[a].r&&e[a].rs&&t[e[a].r][e[a].rs]?($("#powerGrid").append(`
                              ${e[a].n} {{ support }}/{{ s_max }}
                              `),zs({el:`#pg${a}sup`,data:t[e[a].r][e[a].rs]})):$("#powerGrid").append(`
                              ${e[a].n}${r}
                              `);let i=$(`
                              `);$("#powerGrid").append(i);let s=0;for(let r=0;r`);c.append(` ${_}${d}`),c.append('{{ on | off }} {{ on }}'),c.append('« »'),i.append(c),zs({el:`#pg${l.id}${a}`,data:t[o][n[1]],methods:{power_on(){let e=b();for(let a=0;a0;a++)t[o][n[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 i=e[a].l;i.splice(r,0,i.splice(t,1)[0]),e[a].l=i,Si()}},lower(){let t=$(`#pg${l.id}${a}`).attr("data-idx"),r=$(`#pg${l.id}${a}`).nextAll('.circuit:not(".inactive")').attr("data-idx");if(rt[o][n[1]].count-e,idx(e){let t=Js(18,11);return 10===e&&t.length>0?"1"+t:e}}})}else{let e=$(`
                              `);e.append(`${_}${d}`),i.append(e)}}!function(e){let t=$(`#grid${e}`)[0],a=Ci();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,Si()}})}(a);let n=$(`
                              `);$("#powerGrid").append(n),zs({el:`#${a}GridReset`,data:{},methods:{resetGrid(e){hs(e,!0),Si()}}})}))}function Ci(){return{power:{l:t.power,n:F("power"),s:!0,r:!1,rs:!1},moon:{l:t.support.moon,n:F("space_moon_info_name"),s:t.settings.space.moon,r:"space",rs:"moon_base"},red:{l:t.support.red,n:Vt().red,s:t.settings.space.red,r:"space",rs:"spaceport"},belt:{l:t.support.belt,n:F("space_belt_info_name"),s:t.settings.space.belt,r:"space",rs:"space_station"},alpha:{l:t.support.alpha,n:F("interstellar_alpha_name"),s:t.settings.space.alpha,r:"interstellar",rs:"starport"},nebula:{l:t.support.nebula,n:F("interstellar_nebula_name"),s:t.settings.space.nebula,r:"interstellar",rs:"nexus"},gateway:{l:t.support.gateway,n:F("galaxy_gateway"),s:t.settings.space.gateway,r:"galaxy",rs:"starbase"},alien2:{l:t.support.alien2,n:F("galaxy_alien",[Di[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:F("portal_lake_name"),s:t.settings.portal.lake,r:"portal",rs:"harbour"},spire:{l:t.support.spire,n:F("portal_spire_name"),s:t.settings.portal.spire,r:"portal",rs:"purifier"},titan:{l:t.support.titan,n:Vt().titan,s:t.settings.space.titan,r:"space",rs:"electrolysis"},enceladus:{l:t.support.enceladus,n:Vt().enceladus,s:t.settings.space.enceladus,r:"space",rs:"titan_spaceport"},eris:{l:t.support.eris,n:Vt().eris,s:t.settings.space.eris,r:"space",rs:"drone_control"},tau_home:{l:t.support.tau_home,n:F("tau_planet",[Di[t.race.species].home]),s:t.settings.tau.home,r:"tauceti",rs:"orbital_station"},tau_red:{l:t.support.tau_red,n:F("tau_planet",[Vt().red]),s:t.settings.tau.red,r:"tauceti",rs:"orbital_platform"},tau_roid:{l:t.support.tau_roid,n:F("tau_roid_title"),s:t.settings.tau.roid,r:"tauceti",rs:"patrol_ship"}}}function zi(e){e=e||Ci(),Object.keys(e).forEach((function(e){let t=$(`#grid${e}`)[0];if(t){let e=Sortable.get(t);e&&e.destroy()}}))}const Fi=new Date,Ai=ln(),Ii=_n(),Ti=["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===Fi.getMonth()&&Fi.getDate()>=17||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0);case"wolven":case"vulpine":return!!(Ai.active||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0);case"arraak":return!!(10===Fi.getMonth()&&Fi.getDate()>=22&&Fi.getDate()<=28||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0);case"seraph":return!!(1===Fi.getMonth()&&14===Fi.getDate()||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0);case"junker":return!!(Ii.active||t.race.hrt&&t.race.hrt===e)&&(a&&(t.race.hrt=e),!0)}return!1}const Ei={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}},Ki={adaptable:{name:F("trait_adaptable_name"),desc:F("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:F("trait_wasteful_name"),desc:F("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:F("trait_xenophobic_name"),desc:F("trait_xenophobic"),type:"genus",val:-5},carnivore:{name:F("trait_carnivore_name"),desc:F("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:F("trait_beast_name"),desc:F("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:F("trait_cautious_name"),desc:F("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:F("trait_herbivore_name"),desc:F("trait_herbivore"),type:"genus",val:-7},instinct:{name:F("trait_instinct_name"),desc:F("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:F("trait_small_name"),desc:F("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:F("trait_weak_name"),desc:F("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:F("trait_large_name"),desc:F("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:F("trait_strong_name"),desc:F("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:F("trait_cold_blooded_name"),desc:F("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:F("trait_scales_name"),desc:F("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:F("trait_flier_name"),desc:F("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:F("trait_hollow_bones_name"),desc:F("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:F("trait_sky_lover_name"),desc:F("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:F("trait_rigid_name"),desc:F("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:F("trait_high_pop_name"),desc:F("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:F("trait_fast_growth_name"),desc:F("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:F("trait_high_metabolism_name"),desc:F("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:F("trait_photosynth_name"),desc:F("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:F("trait_sappy_name"),desc:F("trait_sappy",[F("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:F("trait_asymmetrical_name"),desc:F("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:F("trait_detritivore_name"),desc:F("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:F("trait_spores_name"),desc:F("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:F("trait_spongy_name"),desc:F("trait_spongy"),type:"genus",val:-2},submerged:{name:F("trait_submerged_name"),desc:F("trait_submerged"),type:"genus",val:3},low_light:{name:F("trait_low_light_name"),desc:F("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:F("trait_elusive_name"),desc:F("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:F("trait_iron_allergy_name"),desc:F("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:F("trait_smoldering_name"),desc:F("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:F("trait_cold_intolerance_name"),desc:F("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:F("trait_chilled_name"),desc:F("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:F("trait_heat_intolerance_name"),desc:F("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:F("trait_scavenger_name"),desc:F("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:F("trait_nomadic_name"),desc:F("trait_nomadic"),type:"genus",val:-5},immoral:{name:F("trait_immoral_name"),desc:F("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:F("trait_evil_name"),desc:F("trait_evil"),type:"genus",val:0},blissful:{name:F("trait_blissful_name"),desc:F("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:F("trait_pompous_name"),desc:F("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:F("trait_holy_name"),desc:F("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:F("trait_artifical_name"),desc:F("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:F("trait_powered_name"),desc:F("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:F("trait_psychic_name"),desc:F("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:F("trait_tormented_name"),desc:F("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:F("trait_darkness_name"),desc:F("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:F("trait_unfathomable_name"),desc:F("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:F("trait_creative_name"),desc:F("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:F("trait_diverse_name"),desc:F("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:F("trait_studious_name"),desc:F("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:F("trait_arrogant_name"),desc:F("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:F("trait_brute_name"),desc:F("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:F("trait_angry_name"),desc:F("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:F("trait_lazy_name"),desc:F("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:F("trait_curious_name"),desc:F("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:F("trait_pack_mentality_name"),desc:F("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:F("trait_tracker_name"),desc:F("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:F("trait_playful_name"),desc:F("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:F("trait_freespirit_name"),desc:F("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:F("trait_beast_of_burden_name"),desc:F("trait_beast_of_burden"),type:"major",val:3},sniper:{name:F("trait_sniper_name"),desc:F("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:F("trait_hooved_name"),desc:F("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:F("trait_rage_name"),desc:F("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:F("trait_heavy_name"),desc:F("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:F("trait_gnawer_name"),desc:F("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:F("trait_calm_name"),desc:F("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:F("trait_pack_rat_name"),desc:F("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:F("trait_paranoid_name"),desc:F("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:F("trait_greedy_name"),desc:F("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:F("trait_merchant_name"),desc:F("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:F("trait_smart_name"),desc:F("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:F("trait_puny_name"),desc:F("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:F("trait_dumb_name"),desc:F("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:F("trait_tough_name"),desc:F("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:F("trait_nearsighted_name"),desc:F("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:F("trait_intelligent_name"),desc:F("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:F("trait_regenerative_name"),desc:F("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:F("trait_gluttony_name"),desc:F("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:F("trait_slow_name"),desc:F("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:F("trait_armored_name"),desc:F("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:F("trait_optimistic_name"),desc:F("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:F("trait_chameleon_name"),desc:F("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:F("trait_slow_digestion_name"),desc:F("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:F("trait_hard_of_hearing_name"),desc:F("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:F("trait_resourceful_name"),desc:F("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:F("trait_selenophobia_name"),desc:F("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:F("trait_leathery_name"),desc:F("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:F("trait_pessimistic_name"),desc:F("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:F("trait_hoarder_name"),desc:F("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:F("trait_solitary_name"),desc:F("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:F("trait_kindling_kindred_name"),desc:F("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:F("trait_pyrophobia_name"),desc:F("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:F("trait_hyper_name"),desc:F("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:F("trait_skittish_name"),desc:F("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:F("trait_fragrant_name"),desc:F("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:F("trait_sticky_name"),desc:F("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:F("trait_infectious_name"),desc:F("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:F("trait_parasite_name"),desc:F("trait_parasite"),type:"major",val:-4},toxic:{name:F("trait_toxic_name"),desc:F("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:F("trait_nyctophilia_name"),desc:F("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:F("trait_infiltrator_name"),desc:F("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:F("trait_hibernator_name"),desc:F("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:F("trait_cannibalize_name"),desc:F("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:F("trait_frail_name"),desc:F("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:F("trait_malnutrition_name"),desc:F("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:F("trait_claws_name"),desc:F("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:F("trait_atrophy_name"),desc:F("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:F("trait_hivemind_name"),desc:F("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:F("trait_tunneler_name"),desc:F("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:F("trait_blood_thirst_name"),desc:F("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:F("trait_apex_predator_name"),desc:F("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:F("trait_invertebrate_name"),desc:F("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:F("trait_suction_grip_name"),desc:F("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:F("trait_befuddle_name"),desc:F("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:F("trait_environmentalist_name"),desc:F("trait_environmentalist"),type:"major",val:-5},unorganized:{name:F("trait_unorganized_name"),desc:F("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:F("trait_musical_name"),desc:F("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:F("trait_revive_name"),desc:F("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:F("trait_slow_regen_name"),desc:F("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:F("trait_forge_name"),desc:F("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:F("trait_autoignition_name"),desc:F("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:F("trait_blurry_name"),desc:F("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:F("trait_snowy_name"),desc:F("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:F("trait_ravenous_name"),desc:F("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:F("trait_ghostly_name"),desc:F("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:F("trait_lawless_name"),desc:F("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:F("trait_mistrustful_name"),desc:F("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:F("trait_humpback_name"),desc:F("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:F("trait_thalassophobia_name"),desc:F("trait_thalassophobia"),type:"major",val:-4},fiery:{name:F("trait_fiery_name"),desc:F("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:F("trait_terrifying_name"),desc:F("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:F("trait_slaver_name"),desc:F("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:F("trait_compact_name"),desc:F("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:F("trait_conniving_name"),desc:F("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:F("trait_pathetic_name"),desc:F("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:F("trait_spiritual_name"),desc:F("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:F("trait_truthful_name"),desc:F("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:F("trait_unified_name"),desc:F("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:F("trait_rainbow_name"),desc:F("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:F("trait_magnificent_name"),desc:F("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:F("trait_noble_name"),desc:F("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:F("trait_imitation_name"),desc:F("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:F("trait_emotionless_name"),desc:F("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:F("trait_logical_name"),desc:F("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:F("trait_shapeshifter_name"),desc:F("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:F("trait_deconstructor_name"),desc:F("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:F("trait_linked_name"),desc:F("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:F("trait_dark_dweller_name"),desc:F("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:F("trait_swift_name"),desc:F("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:F("trait_anthropophagite_name"),desc:F("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:F("trait_living_tool_name"),desc:F("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:F("trait_bloated_name"),desc:F("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:F("trait_ooze_name"),desc:F("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:F("trait_soul_eater_name"),desc:F("trait_soul_eater"),type:"special",val:0},untapped:{name:F("trait_untapped_name"),desc:F("trait_untapped"),type:"special",val:0},emfield:{name:F("trait_emfield_name"),desc:F("trait_emfield"),type:"special",val:-20},tactical:{name:F("trait_tactical_name"),desc:F("trait_tactical"),type:"minor",vars:e=>[5]},analytical:{name:F("trait_analytical_name"),desc:F("trait_analytical"),type:"minor",vars:e=>[1]},promiscuous:{name:F("trait_promiscuous_name"),desc:F("trait_promiscuous"),type:"minor",vars:e=>[1,.02]},resilient:{name:F("trait_resilient_name"),desc:F("trait_resilient"),type:"minor",vars:e=>[2]},cunning:{name:F("trait_cunning_name"),desc:F("trait_cunning"),type:"minor",vars:e=>[5]},hardy:{name:F("trait_hardy_name"),desc:F("trait_hardy"),type:"minor",vars:e=>[1]},ambidextrous:{name:F("trait_ambidextrous_name"),desc:F("trait_ambidextrous"),type:"minor",vars:e=>[3,2]},industrious:{name:F("trait_industrious_name"),desc:F("trait_industrious"),type:"minor",vars:e=>[2]},content:{name:F("trait_content_name"),desc:F("trait_content"),type:"minor"},fibroblast:{name:F("trait_fibroblast_name"),desc:F("trait_fibroblast"),type:"minor",vars:e=>[2]},metallurgist:{name:F("trait_metallurgist_name"),desc:F("trait_metallurgist"),type:"minor",vars:e=>[4]},gambler:{name:F("trait_gambler_name"),desc:F("trait_gambler"),type:"minor",vars:e=>[4]},persuasive:{name:F("trait_persuasive_name"),desc:F("trait_persuasive"),type:"minor",vars:e=>[1]},fortify:{name:F("trait_fortify_name"),desc:F("trait_fortify"),type:"special"},mastery:{name:F("trait_mastery_name"),desc:F("trait_mastery"),type:"special",vars:e=>[1]}},Di={protoplasm:{name:F("race_protoplasm"),desc:F("race_protoplasm_desc"),type:"organism",home:F("race_prehistoric"),entity:"ooze",traits:{},solar:{red:F("race_human_solar_red"),hell:F("race_human_solar_hell"),gas:F("race_human_solar_gas"),gas_moon:F("race_human_solar_gas_moon"),dwarf:F("race_human_solar_dwarf")},fanaticism:"none",basic:()=>!1},human:{name:F("race_human"),desc:F("race_human_desc"),type:"humanoid",home:F("race_human_home"),entity:F("race_human_entity"),traits:{creative:1,diverse:1},solar:{red:F("race_human_solar_red"),hell:F("race_human_solar_hell"),gas:F("race_human_solar_gas"),gas_moon:F("race_human_solar_gas_moon"),dwarf:F("race_human_solar_dwarf")},fanaticism:"creative",basic:()=>!0},elven:{name:F("race_elven"),desc:F(Li("elven")?"race_xmas_elf_desc":"race_elven_desc"),type:"humanoid",home:F(Li("elven")?"race_xmas_elf_home":"race_elven_home"),entity:F("race_elven_entity"),traits:{studious:1,arrogant:1},solar:{red:F(Li("elven")?"race_xmas_elf_solar_red":"race_elven_solar_red"),hell:F(Li("elven")?"race_xmas_elf_solar_hell":"race_elven_solar_hell"),gas:F(Li("elven")?"race_xmas_elf_solar_gas":"race_elven_solar_gas"),gas_moon:F(Li("elven")?"race_xmas_elf_solar_gas_moon":"race_elven_solar_gas_moon"),dwarf:F(Li("elven")?"race_xmas_elf_solar_dwarf":"race_elven_solar_dwarf")},fanaticism:"studious",basic:()=>!0},orc:{name:F("race_orc"),desc:F("race_orc_desc"),type:"humanoid",home:F("race_orc_home"),entity:F("race_orc_entity"),traits:{brute:1,angry:1},solar:{red:F("race_orc_solar_red"),hell:F("race_orc_solar_hell"),gas:F("race_orc_solar_gas"),gas_moon:F("race_orc_solar_gas_moon"),dwarf:F("race_orc_solar_dwarf")},fanaticism:"brute",basic:()=>!0},cath:{name:F("race_cath"),desc:F("race_cath_desc"),type:"carnivore",home:F("race_cath_home"),entity:F("race_cath_entity"),traits:{lazy:1,curious:1},solar:{red:F("race_cath_solar_red"),hell:F("race_cath_solar_hell"),gas:F("race_cath_solar_gas"),gas_moon:F("race_cath_solar_gas_moon"),dwarf:F("race_cath_solar_dwarf")},fanaticism:"curious",basic:()=>!0},wolven:{name:Li("wolven")?F("race_rabbit"):F("race_wolven"),desc:Li("wolven")?F("race_rabbit_desc"):F("race_wolven_desc"),type:"carnivore",home:Li("wolven")?F("race_rabbit_home"):F("race_wolven_home"),entity:Li("wolven")?F("race_rabbit_entity"):F("race_wolven_entity"),traits:{pack_mentality:1,tracker:1},solar:{red:Li("wolven")?F("race_rabbit_solar_red"):F("race_wolven_solar_red"),hell:Li("wolven")?F("race_rabbit_solar_hell"):F("race_wolven_solar_hell"),gas:Li("wolven")?F("race_rabbit_solar_gas"):F("race_wolven_solar_gas"),gas_moon:Li("wolven")?F("race_rabbit_solar_gas_moon"):F("race_wolven_solar_gas_moon"),dwarf:Li("wolven")?F("race_rabbit_solar_dwarf"):F("race_wolven_solar_dwarf")},fanaticism:"tracker",basic:()=>!0},vulpine:{name:Li("vulpine")?F("race_chocolate_rabbit"):F("magic"===t.race.universe?"race_kitsune":"race_vulpine"),desc:()=>Li("vulpine")?F("race_chocolate_rabbit_desc"):F("race_vulpine_desc",[F("magic"===t.race.universe?"race_kitsune":"race_vulpine"),t.race.hasOwnProperty("fox_color")?F(`color_${t.race.fox_color}`):F("color_red")]),type:"carnivore",home:Li("vulpine")?F("race_chocolate_rabbit_home"):F("race_vulpine_home"),entity:F("race_vulpine_entity"),traits:{playful:1,freespirit:1},solar:{red:Li("vulpine")?F("race_chocolate_rabbit_solar_red"):F("race_vulpine_solar_red"),hell:Li("vulpine")?F("race_chocolate_rabbit_solar_hell"):F("race_vulpine_solar_hell"),gas:Li("vulpine")?F("race_chocolate_rabbit_solar_gas"):F("race_vulpine_solar_gas"),gas_moon:Li("vulpine")?F("race_chocolate_rabbit_solar_gas_moon"):F("race_vulpine_solar_gas_moon"),dwarf:Li("vulpine")?F("race_chocolate_rabbit_solar_dwarf"):F("race_vulpine_solar_dwarf")},fanaticism:"playful",basic:()=>!0},centaur:{name:F(Li("centaur")?"race_reindeer":"race_centaur"),desc:F(Li("centaur")?"race_reindeer_desc":"race_centaur_desc"),type:"herbivore",home:F(Li("centaur")?"race_reindeer_home":"race_centaur_home"),entity:F(Li("centaur")?"race_reindeer_entity":"race_centaur_entity"),traits:{sniper:1,hooved:1},solar:{red:F(Li("centaur")?"race_reindeer_solar_red":"race_centaur_solar_red"),hell:F(Li("centaur")?"race_reindeer_solar_hell":"race_centaur_solar_hell"),gas:F(Li("centaur")?"race_reindeer_solar_gas":"race_centaur_solar_gas"),gas_moon:F(Li("centaur")?"race_reindeer_solar_gas_moon":"race_centaur_solar_gas_moon"),dwarf:F(Li("centaur")?"race_reindeer_solar_dwarf":"race_centaur_solar_dwarf")},fanaticism:"sniper",basic:()=>!0},rhinotaur:{name:F("race_rhinotaur"),desc:F("race_rhinotaur_desc"),type:"herbivore",home:F("race_rhinotaur_home"),entity:F("race_rhinotaur_entity"),traits:{rage:1,heavy:1},solar:{red:F("race_rhinotaur_solar_red"),hell:F("race_rhinotaur_solar_hell"),gas:F("race_rhinotaur_solar_gas"),gas_moon:F("race_rhinotaur_solar_gas_moon"),dwarf:F("race_rhinotaur_solar_dwarf")},fanaticism:"rage",basic:()=>!0},capybara:{name:F(Li("capybara")?"race_donkey":"race_capybara"),desc:F(Li("capybara")?"race_donkey_desc":"race_capybara_desc"),type:"herbivore",home:F(Li("capybara")?"race_donkey_home":"race_capybara_home"),entity:F(Li("capybara")?"race_donkey_entity":"race_capybara_entity"),traits:{gnawer:1,calm:1},solar:{red:F(Li("capybara")?"race_donkey_solar_red":"race_capybara_solar_red"),hell:F(Li("capybara")?"race_donkey_solar_hell":"race_capybara_solar_hell"),gas:F(Li("capybara")?"race_donkey_solar_gas":"race_capybara_solar_gas"),gas_moon:F(Li("capybara")?"race_donkey_solar_gas_moon":"race_capybara_solar_gas_moon"),dwarf:F(Li("capybara")?"race_donkey_solar_dwarf":"race_capybara_solar_dwarf")},fanaticism:"calm",basic:()=>!0},kobold:{name:F("race_kobold"),desc:F("race_kobold_desc"),type:"small",home:F("race_kobold_home"),entity:F("race_kobold_entity"),traits:{pack_rat:1,paranoid:1},solar:{red:F("race_kobold_solar_red"),hell:F("race_kobold_solar_hell"),gas:F("race_kobold_solar_gas"),gas_moon:F("race_kobold_solar_gas_moon"),dwarf:F("race_kobold_solar_dwarf")},fanaticism:"pack_rat",basic:()=>!0},goblin:{name:F("race_goblin"),desc:F("race_goblin_desc"),type:"small",home:F("race_goblin_home"),entity:F("race_goblin_entity"),traits:{greedy:1,merchant:1},solar:{red:F("race_goblin_solar_red"),hell:F("race_goblin_solar_hell"),gas:F("race_goblin_solar_gas"),gas_moon:F("race_goblin_solar_gas_moon"),dwarf:F("race_goblin_solar_dwarf")},fanaticism:"merchant",basic:()=>!0},gnome:{name:F("race_gnome"),desc:F("race_gnome_desc"),type:"small",home:F("race_gnome_home"),entity:F("race_gnome_entity"),traits:{smart:1,puny:1},solar:{red:F("race_gnome_solar_red"),hell:F("race_gnome_solar_hell"),gas:F("race_gnome_solar_gas"),gas_moon:F("race_gnome_solar_gas_moon"),dwarf:F("race_gnome_solar_dwarf")},fanaticism:"smart",basic:()=>!0},ogre:{name:F("race_ogre"),desc:F("race_ogre_desc"),type:"giant",home:F("race_ogre_home"),entity:F("race_ogre_entity"),traits:{dumb:1,tough:1},solar:{red:F("race_ogre_solar_red"),hell:F("race_ogre_solar_hell"),gas:F("race_ogre_solar_gas"),gas_moon:F("race_ogre_solar_gas_moon"),dwarf:F("race_ogre_solar_dwarf")},fanaticism:"tough",basic:()=>!0},cyclops:{name:F("race_cyclops"),desc:F("race_cyclops_desc"),type:"giant",home:F("race_cyclops_home"),entity:F("race_cyclops_entity"),traits:{nearsighted:1,intelligent:1},solar:{red:F("race_cyclops_solar_red"),hell:F("race_cyclops_solar_hell"),gas:F("race_cyclops_solar_gas"),gas_moon:F("race_cyclops_solar_gas_moon"),dwarf:F("race_cyclops_solar_dwarf")},fanaticism:"intelligent",basic:()=>!0},troll:{name:F("race_troll"),desc:F("race_troll_desc"),type:"giant",home:F("race_troll_home"),entity:F("race_troll_entity"),traits:{regenerative:1,gluttony:1},solar:{red:F("race_troll_solar_red"),hell:F("race_troll_solar_hell"),gas:F("race_troll_solar_gas"),gas_moon:F("race_troll_solar_gas_moon"),dwarf:F("race_troll_solar_dwarf")},fanaticism:"regenerative",basic:()=>!0},tortoisan:{name:F("race_tortoisan"),desc:()=>F("race_tortoisan_desc",[t.race.hasOwnProperty("shell_color")?F(`color_${t.race.shell_color}`):F("color_green")]),type:"reptilian",home:F("race_tortoisan_home"),entity:F("race_tortoisan_entity"),traits:{slow:1,armored:1},solar:{red:F("race_tortoisan_solar_red"),hell:F("race_tortoisan_solar_hell"),gas:F("race_tortoisan_solar_gas"),gas_moon:F("race_tortoisan_solar_gas_moon"),dwarf:F("race_tortoisan_solar_dwarf")},fanaticism:"armored",basic:()=>!0},gecko:{name:F("race_gecko"),desc:F("race_gecko_desc"),type:"reptilian",home:F("race_gecko_home"),entity:F("race_gecko_entity"),traits:{optimistic:1,chameleon:1},solar:{red:F("race_gecko_solar_red"),hell:F("race_gecko_solar_hell"),gas:F("race_gecko_solar_gas"),gas_moon:F("race_gecko_solar_gas_moon"),dwarf:F("race_gecko_solar_dwarf")},fanaticism:"optimistic",basic:()=>!0},slitheryn:{name:F("race_slitheryn"),desc:F("race_slitheryn_desc"),type:"reptilian",home:F("race_slitheryn_home"),entity:F("race_slitheryn_entity"),traits:{slow_digestion:1,hard_of_hearing:1},solar:{red:F("race_slitheryn_solar_red"),hell:F("race_slitheryn_solar_hell"),gas:F("race_slitheryn_solar_gas"),gas_moon:F("race_slitheryn_solar_gas_moon"),dwarf:F("race_slitheryn_solar_dwarf")},fanaticism:"slow_digestion",basic:()=>!0},arraak:{name:F(Li("arraak")?"race_turkey":"race_arraak"),desc:F(Li("arraak")?"race_turkey_desc":"race_arraak_desc"),type:"avian",home:F(Li("arraak")?"race_turkey_home":"race_arraak_home"),entity:F("race_arraak_entity"),traits:{resourceful:1,selenophobia:1},solar:{red:F(Li("arraak")?"race_turkey_solar_red":"race_arraak_solar_red"),hell:F(Li("arraak")?"race_turkey_solar_hell":"race_arraak_solar_hell"),gas:F(Li("arraak")?"race_turkey_solar_gas":"race_arraak_solar_gas"),gas_moon:F(Li("arraak")?"race_turkey_solar_gas_moon":"race_arraak_solar_gas_moon"),dwarf:F(Li("arraak")?"race_turkey_solar_dwarf":"race_arraak_solar_dwarf")},fanaticism:"resourceful",basic:()=>!0},pterodacti:{name:F("race_pterodacti"),desc:F("race_pterodacti_desc"),type:"avian",home:F("race_pterodacti_home"),entity:F("race_pterodacti_entity"),traits:{leathery:1,pessimistic:1},solar:{red:F("race_pterodacti_solar_red"),hell:F("race_pterodacti_solar_hell"),gas:F("race_pterodacti_solar_gas"),gas_moon:F("race_pterodacti_solar_gas_moon"),dwarf:F("race_pterodacti_solar_dwarf")},fanaticism:"leathery",basic:()=>!0},dracnid:{name:F("race_dracnid"),desc:F("race_dracnid_desc"),type:"avian",home:F("race_dracnid_home"),entity:F("race_dracnid_entity"),traits:{hoarder:1,solitary:1},solar:{red:F("race_dracnid_solar_red"),hell:F("race_dracnid_solar_hell"),gas:F("race_dracnid_solar_gas"),gas_moon:F("race_dracnid_solar_gas_moon"),dwarf:F("race_dracnid_solar_dwarf")},fanaticism:"hoarder",basic:()=>!0},entish:{name:F(Li("entish")?"race_spruce":"race_entish"),desc:F(Li("entish")?"race_spruce_desc":"race_entish_desc"),type:"plant",home:F(Li("entish")?"race_spruce_home":"race_entish_home"),entity:F(Li("entish")?"race_spruce_entity":"race_entish_entity"),traits:{kindling_kindred:1,pyrophobia:1},solar:{red:F(Li("entish")?"race_spruce_solar_red":"race_entish_solar_red"),hell:F(Li("entish")?"race_spruce_solar_hell":"race_entish_solar_hell"),gas:F(Li("entish")?"race_spruce_solar_gas":"race_entish_solar_gas"),gas_moon:F(Li("entish")?"race_spruce_solar_gas_moon":"race_entish_solar_gas_moon"),dwarf:F(Li("entish")?"race_spruce_solar_dwarf":"race_entish_solar_dwarf")},fanaticism:"kindling_kindred",basic:()=>!0},cacti:{name:F("race_cacti"),desc:F("race_cacti_desc"),type:"plant",home:F("race_cacti_home"),entity:F("race_cacti_entity"),traits:{hyper:1,skittish:1},solar:{red:F("race_cacti_solar_red"),hell:F("race_cacti_solar_hell"),gas:F("race_cacti_solar_gas"),gas_moon:F("race_cacti_solar_gas_moon"),dwarf:F("race_cacti_solar_dwarf")},fanaticism:"hyper",basic:()=>!0},pinguicula:{name:F("race_pinguicula"),desc:F("race_pinguicula_desc"),type:"plant",home:F("race_pinguicula_home"),entity:F("race_pinguicula_entity"),traits:{fragrant:1,sticky:1},solar:{red:F("race_pinguicula_solar_red"),hell:F("race_pinguicula_solar_hell"),gas:F("race_pinguicula_solar_gas"),gas_moon:F("race_pinguicula_solar_gas_moon"),dwarf:F("race_pinguicula_solar_dwarf")},fanaticism:"sticky",basic:()=>!0},sporgar:{name:F("race_sporgar"),desc:F("race_sporgar_desc"),type:"fungi",home:F("race_sporgar_home"),entity:F("race_sporgar_entity"),traits:{infectious:1,parasite:1},solar:{red:F("race_sporgar_solar_red"),hell:F("race_sporgar_solar_hell"),gas:F("race_sporgar_solar_gas"),gas_moon:F("race_sporgar_solar_gas_moon"),dwarf:F("race_sporgar_solar_dwarf")},fanaticism:"infectious",basic:()=>!1},shroomi:{name:F("race_shroomi"),desc:F("race_shroomi_desc"),type:"fungi",home:F("race_shroomi_home"),entity:F("race_shroomi_entity"),traits:{toxic:1,nyctophilia:1},solar:{red:F("race_shroomi_solar_red"),hell:F("race_shroomi_solar_hell"),gas:F("race_shroomi_solar_gas"),gas_moon:F("race_shroomi_solar_gas_moon"),dwarf:F("race_shroomi_solar_dwarf")},fanaticism:"toxic",basic:()=>!0},moldling:{name:F("race_moldling"),desc:F("race_moldling_desc"),type:"fungi",home:F("race_moldling_home"),entity:F("race_moldling_entity"),traits:{infiltrator:1,hibernator:1},solar:{red:F("race_moldling_solar_red"),hell:F("race_moldling_solar_hell"),gas:F("race_moldling_solar_gas"),gas_moon:F("race_moldling_solar_gas_moon"),dwarf:F("race_moldling_solar_dwarf")},fanaticism:"infiltrator",basic:()=>!0},mantis:{name:F("race_mantis"),desc:F("race_mantis_desc"),type:"insectoid",home:F("race_mantis_home"),entity:F("race_mantis_entity"),traits:{cannibalize:1,malnutrition:1},solar:{red:F("race_mantis_solar_red"),hell:F("race_mantis_solar_hell"),gas:F("race_mantis_solar_gas"),gas_moon:F("race_mantis_solar_gas_moon"),dwarf:F("race_mantis_solar_dwarf")},fanaticism:"cannibalize",basic:()=>!0},scorpid:{name:F("race_scorpid"),desc:F("race_scorpid_desc"),type:"insectoid",home:F("race_scorpid_home"),entity:F("race_scorpid_entity"),traits:{claws:1,atrophy:1},solar:{red:F("race_scorpid_solar_red"),hell:F("race_scorpid_solar_hell"),gas:F("race_scorpid_solar_gas"),gas_moon:F("race_scorpid_solar_gas_moon"),dwarf:F("race_scorpid_solar_dwarf")},fanaticism:"claws",basic:()=>!0},antid:{name:F("race_antid"),desc:F("race_antid_desc"),type:"insectoid",home:F("race_antid_home"),entity:F("race_antid_entity"),traits:{hivemind:1,tunneler:1},solar:{red:F("race_antid_solar_red"),hell:F("race_antid_solar_hell"),gas:F("race_antid_solar_gas"),gas_moon:F("race_antid_solar_gas_moon"),dwarf:F("race_antid_solar_dwarf")},fanaticism:"hivemind",basic:()=>!0},sharkin:{name:F("race_sharkin"),desc:F("race_sharkin_desc"),type:"aquatic",home:F("race_sharkin_home"),entity:F("race_sharkin_entity"),traits:{blood_thirst:1,apex_predator:1},solar:{red:F("race_sharkin_solar_red"),hell:F("race_sharkin_solar_hell"),gas:F("race_sharkin_solar_gas"),gas_moon:F("race_sharkin_solar_gas_moon"),dwarf:F("race_sharkin_solar_dwarf")},fanaticism:"blood_thirst",basic:()=>!!["oceanic","swamp"].includes(t.city.biome)},octigoran:{name:F("race_octigoran"),desc:F("race_octigoran_desc"),type:"aquatic",home:F("race_octigoran_home"),entity:F("race_octigoran_entity"),traits:{invertebrate:1,suction_grip:1},solar:{red:F("race_octigoran_solar_red"),hell:F("race_octigoran_solar_hell"),gas:F("race_octigoran_solar_gas"),gas_moon:F("race_octigoran_solar_gas_moon"),dwarf:F("race_octigoran_solar_dwarf")},fanaticism:"suction_grip",basic:()=>!!["oceanic","swamp"].includes(t.city.biome)},dryad:{name:F("race_dryad"),desc:F("race_dryad_desc"),type:"fey",home:F("race_dryad_home"),entity:F("race_dryad_entity"),traits:{befuddle:1,environmentalist:1,kindling_kindred:1},solar:{red:F("race_dryad_solar_red"),hell:F("race_dryad_solar_hell"),gas:F("race_dryad_solar_gas"),gas_moon:F("race_dryad_solar_gas_moon"),dwarf:F("race_dryad_solar_dwarf")},fanaticism:"befuddle",basic:()=>!!["forest","swamp","taiga"].includes(t.city.biome)},satyr:{name:F("race_satyr"),desc:F("race_satyr_desc"),type:"fey",home:F("race_satyr_home"),entity:F("race_satyr_entity"),traits:{unorganized:1,musical:1},solar:{red:F("race_satyr_solar_red"),hell:F("race_satyr_solar_hell"),gas:F("race_satyr_solar_gas"),gas_moon:F("race_satyr_solar_gas_moon"),dwarf:F("race_satyr_solar_dwarf")},fanaticism:"musical",basic:()=>!!["forest","swamp","taiga"].includes(t.city.biome)},phoenix:{name:F("race_phoenix"),desc:F("race_phoenix_desc"),type:"heat",home:F("race_phoenix_home"),entity:F("race_phoenix_entity"),traits:{revive:1,slow_regen:1},solar:{red:F("race_phoenix_solar_red"),hell:F("race_phoenix_solar_hell"),gas:F("race_phoenix_solar_gas"),gas_moon:F("race_phoenix_solar_gas_moon"),dwarf:F("race_phoenix_solar_dwarf")},fanaticism:"revive",basic:()=>!!["volcanic","ashland"].includes(t.city.biome)},salamander:{name:F("race_salamander"),desc:F("race_salamander_desc"),type:"heat",home:F("race_salamander_home"),entity:F("race_salamander_entity"),traits:{forge:1,autoignition:1},solar:{red:F("race_salamander_solar_red"),hell:F("race_salamander_solar_hell"),gas:F("race_salamander_solar_gas"),gas_moon:F("race_salamander_solar_gas_moon"),dwarf:F("race_salamander_solar_dwarf")},fanaticism:"forge",basic:()=>!!["volcanic","ashland"].includes(t.city.biome)},yeti:{name:F(Li("yeti")?"race_snowman":"race_yeti"),desc:F(Li("yeti")?"race_snowman_desc":"race_yeti_desc"),type:"polar",home:F(Li("yeti")?"race_snowman_home":"race_yeti_home"),entity:F(Li("yeti")?"race_snowman_entity":"race_yeti_entity"),traits:{blurry:1,snowy:1},solar:{red:F(Li("yeti")?"race_snowman_solar_red":"race_yeti_solar_red"),hell:F(Li("yeti")?"race_snowman_solar_hell":"race_yeti_solar_hell"),gas:F(Li("yeti")?"race_snowman_solar_gas":"race_yeti_solar_gas"),gas_moon:F(Li("yeti")?"race_snowman_solar_gas_moon":"race_yeti_solar_gas_moon"),dwarf:F(Li("yeti")?"race_snowman_solar_dwarf":"race_yeti_solar_dwarf")},fanaticism:"blurry",basic:()=>!!["tundra","taiga"].includes(t.city.biome)},wendigo:{name:F(Li("wendigo")?"race_krampus":"race_wendigo"),desc:F(Li("wendigo")?"race_krampus_desc":"race_wendigo_desc"),type:"polar",home:F(Li("wendigo")?"race_krampus_home":"race_wendigo_home"),entity:F(Li("wendigo")?"race_krampus_entity":"race_wendigo_entity"),traits:{ravenous:1,ghostly:1,soul_eater:1},solar:{red:F(Li("wendigo")?"race_krampus_solar_red":"race_wendigo_solar_red"),hell:F(Li("wendigo")?"race_krampus_solar_hell":"race_wendigo_solar_hell"),gas:F(Li("wendigo")?"race_krampus_solar_gas":"race_wendigo_solar_gas"),gas_moon:F(Li("wendigo")?"race_krampus_solar_gas_moon":"race_wendigo_solar_gas_moon"),dwarf:F(Li("wendigo")?"race_krampus_solar_dwarf":"race_wendigo_solar_dwarf")},fanaticism:"ghostly",basic:()=>!!["tundra","taiga"].includes(t.city.biome)},tuskin:{name:F("race_tuskin"),desc:F("race_tuskin_desc"),type:"sand",home:F("race_tuskin_home"),entity:F("race_tuskin_entity"),traits:{lawless:1,mistrustful:1},solar:{red:F("race_tuskin_solar_red"),hell:F("race_tuskin_solar_hell"),gas:F("race_tuskin_solar_gas"),gas_moon:F("race_tuskin_solar_gas_moon"),dwarf:F("race_tuskin_solar_dwarf")},fanaticism:"lawless",basic:()=>!!["desert","ashland"].includes(t.city.biome)},kamel:{name:F("race_kamel"),desc:F("race_kamel_desc"),type:"sand",home:F("race_kamel_home"),entity:F("race_kamel_entity"),traits:{humpback:1,thalassophobia:1},solar:{red:F("race_kamel_solar_red"),hell:F("race_kamel_solar_hell"),gas:F("race_kamel_solar_gas"),gas_moon:F("race_kamel_solar_gas_moon"),dwarf:F("race_kamel_solar_dwarf")},fanaticism:"humpback",basic:()=>!!["desert","ashland"].includes(t.city.biome)},balorg:{name:F("race_balorg"),desc:F("race_balorg_desc"),type:"demonic",home:F("race_balorg_home"),entity:F("race_balorg_entity"),traits:{fiery:1,terrifying:1,slaver:1},solar:{red:F("race_balorg_solar_red"),hell:F("race_balorg_solar_hell"),gas:F("race_balorg_solar_gas"),gas_moon:F("race_balorg_solar_gas_moon"),dwarf:F("race_balorg_solar_dwarf")},fanaticism:"fiery",basic:()=>"hellscape"===t.city.biome},imp:{name:F("race_imp"),desc:F("race_imp_desc"),type:"demonic",home:F("race_imp_home"),entity:F("race_imp_entity"),traits:{compact:1,conniving:1,pathetic:1},solar:{red:F("race_imp_solar_red"),hell:F("race_imp_solar_hell"),gas:F("race_imp_solar_gas"),gas_moon:F("race_imp_solar_gas_moon"),dwarf:F("race_imp_solar_dwarf")},fanaticism:"conniving",basic:()=>"hellscape"===t.city.biome},seraph:{name:F(Li("seraph")?"race_cherub":"race_seraph"),desc:F(Li("seraph")?"race_cherub_desc":"race_seraph_desc"),type:"angelic",home:F(Li("seraph")?"race_cherub_home":"race_seraph_home"),entity:F(Li("seraph")?"race_cherub_entity":"race_seraph_entity"),traits:{unified:1,spiritual:1,truthful:1},solar:{red:F(Li("seraph")?"race_cherub_solar_red":"race_seraph_solar_red"),hell:F(Li("seraph")?"race_cherub_solar_hell":"race_seraph_solar_hell"),gas:F(Li("seraph")?"race_cherub_solar_gas":"race_seraph_solar_gas"),gas_moon:F(Li("seraph")?"race_cherub_solar_gas_moon":"race_seraph_solar_gas_moon"),dwarf:F(Li("seraph")?"race_cherub_solar_dwarf":"race_seraph_solar_dwarf")},fanaticism:"spiritual",basic:()=>"eden"===t.city.biome},unicorn:{name:F("race_unicorn"),desc:F("race_unicorn_desc"),type:"angelic",home:F("race_unicorn_home"),entity:F("race_unicorn_entity"),traits:{rainbow:1,magnificent:1,noble:1},solar:{red:F("race_unicorn_solar_red"),hell:F("race_unicorn_solar_hell"),gas:F("race_unicorn_solar_gas"),gas_moon:F("race_unicorn_solar_gas_moon"),dwarf:F("race_unicorn_solar_dwarf")},fanaticism:"magnificent",basic:()=>"eden"===t.city.biome},synth:{name:F("race_synth"),desc(){let e=t.race.hasOwnProperty("srace")?t.race.srace:"human";return F("race_synth_desc",[Di[e].name])},type:"synthetic",home:F("race_synth_home"),entity:F("race_synth_entity"),traits:{imitation:1,emotionless:1,logical:1},solar:{red:F("race_synth_solar_red"),hell:F("race_synth_solar_hell"),gas:F("race_synth_solar_gas"),gas_moon:F("race_synth_solar_gas_moon"),dwarf:F("race_synth_solar_dwarf")},fanaticism:"logical",basic:()=>!1},nano:{name:F("race_nano"),desc:F("race_nano_desc"),type:"synthetic",home:F("race_nano_home"),entity:F("race_nano_entity"),traits:{deconstructor:1,linked:1,shapeshifter:1},solar:{red:F("race_nano_solar_red"),hell:F("race_nano_solar_hell"),gas:F("race_nano_solar_gas"),gas_moon:F("race_nano_solar_gas_moon"),dwarf:F("race_nano_solar_dwarf")},fanaticism:"shapeshifter",basic:()=>!1},ghast:{name:F("race_ghast"),desc:F("race_ghast_desc"),type:"eldritch",home:F("race_ghast_home"),entity:F("race_ghast_entity"),traits:{dark_dweller:1,swift:1,anthropophagite:1},solar:{red:F("race_ghast_solar_red"),hell:F("race_ghast_solar_hell"),gas:F("race_ghast_solar_gas"),gas_moon:F("race_ghast_solar_gas_moon"),dwarf:F("race_ghast_solar_dwarf")},fanaticism:"swift",basic:()=>!1},shoggoth:{name:F("race_shoggoth"),desc:F("race_shoggoth_desc"),type:"eldritch",home:F("race_shoggoth_home"),entity:F("race_shoggoth_entity"),traits:{living_tool:1,bloated:1},solar:{red:F("race_shoggoth_solar_red"),hell:F("race_shoggoth_solar_hell"),gas:F("race_shoggoth_solar_gas"),gas_moon:F("race_shoggoth_solar_gas_moon"),dwarf:F("race_shoggoth_solar_dwarf")},fanaticism:"living_tool",basic:()=>!1},junker:{name:Li("junker")?F("race_ghoul"):F("race_junker"),desc:Li("junker")?F("race_ghoul_desc"):F("race_junker_desc"),type:t.race.hasOwnProperty("jtype")?t.race.jtype:"humanoid",home:Li("junker")?F("race_ghoul_home"):F("race_junker_home"),entity:Li("junker")?F("race_ghoul_entity"):F("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")?F("race_ghoul_solar_red"):F("race_junker_solar_red"),hell:Li("junker")?F("race_ghoul_solar_hell"):F("race_junker_solar_hell"),gas:Li("junker")?F("race_ghoul_solar_gas"):F("race_junker_solar_gas"),gas_moon:Li("junker")?F("race_ghoul_solar_gas_moon"):F("race_junker_solar_gas_moon"),dwarf:Li("junker")?F("race_ghoul_solar_dwarf"):F("race_junker_solar_dwarf")},fanaticism:"none",basic:()=>!1},sludge:{name:F("race_sludge"),desc:F("race_sludge_desc"),type:t.race.hasOwnProperty("jtype")?t.race.jtype:"humanoid",home:F("race_sludge_home"),entity:F("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:F("race_sludge_solar_red"),hell:F("race_sludge_solar_hell"),gas:F("race_sludge_solar_gas"),gas_moon:F("race_sludge_solar_gas_moon"),dwarf:F("race_sludge_solar_dwarf")},fanaticism:"ooze",basic:()=>!1},custom:function(){if(t.hasOwnProperty("custom")&&t.custom.hasOwnProperty("race0")){let e={};for(let a=0;aKi[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{}}()},Bi={organism:{},humanoid:{},carnivore:{},herbivore:{},omnivore:{},small:{},giant:{},reptilian:{},avian:{},insectoid:{},plant:{},fungi:{},aquatic:{},fey:{},heat:{},polar:{},sand:{},demonic:{},angelic:{},synthetic:{},eldritch:{}};function Gi(e,a){let r=1,i=D("theorist",1);!i||"factory"!==a&&"miner"!==a&&"lumberjack"!==a||(r*=1-i/100);let s=D("inspirational",0);!s||"farmer"!==a&&"factory"!==a&&"miner"!==a&&"lumberjack"!==a||(r*=1+s/100);let n=D("dirty_jobs",2);if(n&&"miner"===a&&(r*=1+n/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+Ki.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+Ki.powered.vars()[1]/100),t.race.artifical&&"science"===a&&(r*=1+Ki.artifical.vars()[0]/100),t.race.hivemind&&"farmer"!==a&&!t.race.lone_survivor){let i=Ki.hivemind.vars()[0],s=.05;t.race.high_pop&&"army"!==a&&"hellArmy"!==a&&(i*=Ki.high_pop.vars()[0],s=.5/(Ki.hivemind.vars()[0]*Ki.high_pop.vars()[0])),r*=e<=i?e*s+(1-i*s):1-("army"===a||"hellArmy"===a?.99:t.race.high_pop?.985:.98)**(e-i)+1}let c=as("antid");if(c>0&&(r*=1+(1-("army"===a||"hellArmy"===a?.99:t.race.high_pop?.985:.98)**(e*c/4))/2),t.race.cold_blooded&&"army"!==a&&"hellArmy"!==a&&"factory"!==a&&"science"!==a){switch(t.city.calendar.temp){case 0:r*=1-Ki.cold_blooded.vars()[0]/100;break;case 2:r*=1+Ki.cold_blooded.vars()[1]/100;break;default:r*=1}switch(t.city.calendar.weather){case 0:r*=1-Ki.cold_blooded.vars()[0]/100;break;case 2:r*=1+Ki.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+Ki.cannibalize.vars()[0]/100),"lumberjack"===a&&t.city.s_alter.harvest>0&&(r*=1+Ki.cannibalize.vars()[0]/100),("army"===a||"hellArmy"===a)&&t.city.s_alter.rage>0&&(r*=1+Ki.cannibalize.vars()[0]/100),"science"===a&&t.city.s_alter.mind>0&&(r*=1+Ki.cannibalize.vars()[0]/100));let o=as("mantis");o>0&&("miner"===a&&(r*=1+Ki.cannibalize.vars(1)[0]/100*o),"lumberjack"===a&&(r*=1+Ki.cannibalize.vars(1)[0]/100*o),"army"!==a&&"hellArmy"!==a||(r*=1+Ki.cannibalize.vars(1)[0]/100*o),"science"===a&&(r*=1+Ki.cannibalize.vars(1)[0]/100*o)),!t.race.humpback||"miner"!==a&&"lumberjack"!==a||(r*=1+Ki.humpback.vars()[0]/100);let l=as("kamel");l>0&&("miner"===a||"lumberjack"===a)&&(r*=1+Ki.humpback.vars(1)[0]/100*l),t.city.ptrait.includes("magnetic")&&"miner"===a&&(r*=ns.magnetic.vars()[2]),!t.race.weak||"miner"!==a&&"lumberjack"!==a||(r*=1-Ki.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+Ki.toxic.vars()[2]/100);let _=as("shroomi");if(_>0&&"factory"===a&&(r*=1+Ki.toxic.vars(1)[2]/100*_),t.race.hardy&&"factory"===a&&(r*=1+Ki.hardy.vars()[0]*t.race.hardy/100),t.race.analytical&&"science"===a&&(r*=1+Ki.analytical.vars()[0]*t.race.analytical/100),t.race.ooze&&(r*=1-Ki.ooze.vars()[0]/100),"democracy"===t.civic.govern.type&&(r*=1-ee.democracy()[1]/100),!t.tech.cyber_worker||"lumberjack"!==a&&"miner"!==a||(r*=1.25),"hunting"===a){t.race.tracker&&(r*=1+Ki.tracker.vars()[0]/100);let e=as("wolven");e>0&&(r*=1+Ki.tracker.vars(1)[0]/100*e),t.race.beast&&(r*=1+(1===t.city.calendar.wind?Ki.beast.vars()[1]:Ki.beast.vars()[0])/100),t.race.apex_predator&&(r*=1+Ki.apex_predator.vars()[1]/100);let a=as("sharkin");a>0&&(r*=1+Ki.apex_predator.vars(1)[1]/100*a),t.race.fiery&&(r*=1+Ki.fiery.vars()[1]/100);let i=as("balorg");i>0&&(r*=1+Ki.fiery.vars(1)[1]/100*i),t.race.fragrant&&(r*=1-Ki.fragrant.vars()[0]/100),t.city.ptrait.includes("rage")&&(r*=ns.rage.vars()[1]),t.race.cunning&&(r*=1+Ki.cunning.vars()[0]*t.race.cunning/100),"savanna"===t.city.biome&&(r*=ss.savanna.vars()[1]),t.race.dark_dweller&&2===t.city.calendar.weather&&(r*=1-Ki.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+Ki.living_tool.vars()[0]*(t.tech.science&&t.tech.science>0?.12*t.tech.science:0)),t.race.high_pop&&(r=$e(r)),r}function Ni(e){let a=[];Object.keys(Ki).forEach((function(e){"minor"!==Ki[e].type||t.race[e]||a.push(e)})),0===a.length&&Object.keys(Ki).forEach((function(e){"minor"===Ki[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 Ri(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 Hi(e,a,r,i){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]):i&&(t[e][a]=i)}function Ui(e,a){t[e].hasOwnProperty(a)&&(t.race.purgatory[e][a]=t[e][a],delete t[e][a])}function Vi(e,a){if(t.race.purgatory[e].hasOwnProperty(a))return t.race.purgatory[e][a]}function Wi(){Qi("Lumber"),Qi("Plywood"),gs(["city-graveyard","city-lumber_yard","city-sawmill"]),vs(["reclaimer","axe","saw"]),Ui("city","sawmill"),Ui("city","graveyard"),Ui("city","lumber_yard"),Ui("tech","axe"),Ui("tech","reclaimer"),Ui("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,$i()),t.city.s_alter&&(t.city.s_alter.harvest=0)}function Qi(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,na()),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 Ji(){let e=Vr(Sr.tech.agriculture),a=Vr(Sr.tech.smokehouse),r=Vr(Sr.tech.reclaimer)||Vr(Sr.tech.stone_axe),s=Vr(Sr.tech.alt_lodge),n=Vr(Sr.tech.wind_plant),c=[],o=[];if(!t.race.artifical){if(["agriculture","farm","hunting","s_lodge","wind_plant","compost","soul_eater"].forEach((function(e){Ui("tech",e)})),["silo","farm","mill","windmill","smokehouse","lodge","compost","soul_well"].forEach((function(e){Ui("city",e)})),s){Ri("tech","s_lodge");let e=Vi("tech","farm")>=1||Vi("tech","hunting")>=2?1:0;e>0&&(!t.tech.s_lodge||t.tech.s_lodge=1&&Hi("city","lodge","farm",{count:0})}if(a){Ri("tech","hunting");let e=Vi("tech","farm")>=1||Vi("tech","s_lodge")>=1?2:Vi("tech","agriculture")>=3?1:0;e>0&&(!t.tech.hunting||t.tech.hunting=1&&Hi("city","smokehouse","silo",{count:0}),t.tech.hunting>=2&&!s&&Hi("city","lodge","farm",{count:0})}else o.push("hunting"),c.push("city-smokehouse"),s||o.push("city-lodge");if(e){Ri("tech","farm");let e=Vi("tech","hunting")>=2||Vi("tech","s_lodge")>=1?1:0;e>0&&(!t.tech.farm||t.tech.farm=1?3:Vi("tech","s_lodge")>=1?1:0;a>0&&(!t.tech.agriculture||t.tech.agriculture=1&&Hi("city","farm","lodge",{count:0}),t.tech.agriculture>=3&&Hi("city","silo","smokehouse",{count:0}),t.tech.agriculture>=4&&!n&&Hi("city","mill","windmill",{count:0,on:0})}else o.push("agriculture","farm"),c.push("city-farm","city-silo","city-mill");t.race.soul_eater?(Ri("tech","soul_eater"),Ri("city","soul_well")):(c.push("city-soul_well"),o.push("soul_eater")),t.race.detritivore?(Ri("tech","compost"),Ri("city","compost")):(o.push("compost"),c.push("city-compost")),n?(Ri("tech","wind_plant"),t.tech.wind_plant>=1&&Hi("city","windmill","mill",{count:0,on:0})):(o.push("wind_plant"),c.push("city-windmill"),delete i[F("city_mill_title2")])}let l=[],_=[];!t.race.orbit_decayed&&e&&t.tech.agriculture>=1&&t.city.farm.count>0?l.push("farmer"):_.push("farmer"),t.race.carnivore&&!t.race.herbivore||t.race.soul_eater||t.race.unfathomable?(l.push("hunter"),_.push("unemployed")):(_.push("hunter"),l.push("unemployed")),!t.race.orbit_decayed&&r?l.push("lumberjack"):_.push("lumberjack"),l.forEach((function(e){t.civic[e].display||(t.civic[e].workers=0,t.civic[e].display=!0)})),_.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),$i()),gs(c),vs(o),Ra("Food")}function Zi(a){switch(a){case"high_pop":t.resource[t.race.species].amount=Math.round(t.resource[t.race.species].amount*Ki.high_pop.vars()[0]),t.civic.hasOwnProperty("garrison")&&(t.civic.garrison.workers=Math.round(t.civic.garrison.workers*Ki.high_pop.vars()[0]));break;case"kindling_kindred":if(t.race.smoldering)break;Wi();break;case"smoldering":if(t.resource.Chrysotile.display=!0,t.race.kindling_kindred)break;Wi();break;case"forge":$i();break;case"soul_eater":ra("lumberjack");case"detritivore":case"carnivore":case"herbivore":Ji();break;case"unfathomable":for(Ji(),t.city.hasOwnProperty("surfaceDwellers")||(t.city.surfaceDwellers=[]);t.city.surfaceDwellers.lengthKi.unfathomable.vars()[0]&&(t.city.surfaceDwellers.length=Ki.unfathomable.vars()[0]),t.race.psychic&&os();break;case"flier":Ra("Stone"),Ra("Brick"),t.resource.Cement.display=!1,t.civic.cement_worker.display=!1,t.civic.cement_worker.workers=0,Ui("tech","cement"),Ui("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,Ra("Stone"),Ui("tech","hammer"),Ui("city","rock_quarry");break;case"apex_predator":vs(["armor"]),Ui("tech","armor");break;case"environmentalist":delete i[F("city_coal_power")],delete i[F("city_mana_engine")],delete i[F("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),gs(["city-trade"]),vs(["trade"]),Ui("tech","trade"),Ui("city","trade");break;case"slaver":Ri("tech","slaves"),t.tech.slaves>=1&&(Ri("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":Ri("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&&Ri("city","shrine",{count:0,morale:0,metal:0,know:0,tax:0});break;case"unified":t.tech.world_control=1,t.tech.unify=2,Cs($("#garrison")),Cs($("#c_garrison")),me($("#garrison"),!0),me($("#c_garrison"),!1);for(let e=0;e<3;e++){if(t.civic.foreign[`gov${e}`].occ){let a=aa("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&&Pn("godwin");break;case"thalassophobia":gs(["city-wharf"]),vs(["wharf"]),Ui("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))),j.w?(ps("stop"),ps("start")):window.location.reload();case"hyper":e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),j.w?(ps("stop"),ps("start")):window.location.reload();case"calm":t.tech.primitive>=3&&(Ri("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,Ri("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":es(!1,!0);break;case"imitation":Yi(!0);break;case"evil":Ra("Lumber"),Ra("Furs"),Ra("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),Ls(!0)}}function Xi(a,r){switch(a){case"high_pop":t.resource[t.race.species].amount=Math.round(t.resource[t.race.species].amount/Ki.high_pop.vars(r)[0]),t.civic.hasOwnProperty("garrison")&&(t.civic.garrison.workers=Math.round(t.civic.garrison.workers/Ki.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&&$i(),Ri("city","sawmill"),Ri("city","graveyard"),Ri("city","lumber_yard"),Ri("tech","axe"),Ri("tech","reclaimer"),Ri("tech","saw"),!t.tech.axe&&!t.tech.reclaimer||t.race.orbit_decayed||(t.civic.lumberjack.display=!0);break;case"smoldering":if(Qi("Chrysotile"),t.race.kindling_kindred)break;t.resource.Lumber.display=!0,t.tech.foundry&&(t.resource.Plywood.display=!0),t.race.casting&&$i(),Ri("city","sawmill"),Ri("city","graveyard"),Ri("city","lumber_yard"),Ri("tech","axe"),Ri("tech","reclaimer"),Ri("tech","saw"),!t.tech.axe&&!t.tech.reclaimer||t.race.orbit_decayed||(t.civic.lumberjack.display=!0);break;case"forge":$i();break;case"soul_eater":ra("lumberjack");case"detritivore":case"carnivore":case"herbivore":case"unfathomable":Ji(),t.race.psychic&&os();break;case"flier":Ra("Stone"),Ra("Brick"),Ri("tech","cement"),t.tech.cement&&(Ri("city","cement_plant"),t.resource.Cement.display=!0,t.civic.cement_worker.display=!0);break;case"sappy":Ra("Stone"),Ri("tech","hammer"),t.tech.mining>=1&&(Ri("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":Ri("tech","armor");break;case"environmentalist":delete i[F("city_hydro_power")],delete i[F("city_wind_power")];break;case"terrifying":t.settings.showMarket=!0,Ri("tech","trade"),Ri("city","trade");break;case"slaver":gs(["city-slave_pen"]),vs(["slaves"]),Ui("city","slave_pen"),Ui("tech","slaves"),t.resource.Slave.amount=0,t.resource.Slave.max=0,t.resource.Slave.display=!1,B("slave");break;case"cannibalize":gs(["city-s_alter"]),vs(["sacrifice"]),Ui("tech","sacrifice"),delete t.city.s_alter,B("sacrifice");break;case"magnificent":gs(["city-shrine"]),Ui("city","shrine");break;case"thalassophobia":t.tech.wharf&&Ri("city","wharf",{count:0});break;case"hooved":gs(["city-horseshoe","space-horseshoe"]),t.resource.Horseshoe.display=!1,B("horseshoe");break;case"slow":e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),j.w?(ps("stop"),ps("start")):window.location.reload();case"hyper":e.setItem("evolved",LZString.compressToUTF16(JSON.stringify(t))),j.w?(ps("stop"),ps("start")):window.location.reload();case"calm":gs(["city-meditation"]),t.resource.Zen.display=!1,Ui("city","meditation");break;case"blood_thirst":delete t.race.blood_thirst_count;break;case"deconstructor":gs(["city-nanite_factory"]),t.resource.Nanite.display=!1,Ui("city","nanite_factory");break;case"shapeshifter":Cs($("#sshifter")),es();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],Xi(e,a)}else t.race[e]=t.race.iTraits[e]})),delete t.race.iTraits);break;case"evil":Ra("Lumber"),Ra("Furs"),Ra("Plywood");break;case"psychic":t.resource.Energy.display=!1,t.settings.showPsychic=!1;break;case"ooze":delete t.race.gross_enabled,Ls(!0)}}function Yi(e){if(t.race.imitation&&t.race.srace){t.race.iTraits||(t.race.iTraits={}),t.race.shapeshifter&&es(t.race.ss_genus===Di[t.race.srace].type&&"none",!0);let a=[];if(Object.keys(Ei[Di[t.race.srace].type]).forEach((function(e){t.race[e]||a.push(e)})),"custom"===t.race.srace){let e=["evil","evil"];Object.keys(Di[t.race.srace].traits).forEach((function(t){Ki[t].val>Ki[e[0]].val?e[0]=t:Ki[t].val=0?t.race[e]=Ki.shapeshifter.vars()[0]:t.race[e]=Ki.shapeshifter.vars()[1],Zi(e),r.push(e))})),t.race.ss_genus=e),a){Cs($("#sshifter")),t.race.ss_genus=t.race.hasOwnProperty("ss_genus")?t.race.ss_genus:"none";let e="";Object.keys(Ei).forEach((function(a){"synthetic"!==a&&"eldritch"!==a&&a!==Di[t.race.species].type&&(!t.race.imitation||a!==Di[t.race.srace].type)&&t.stats.achieve[`genus_${a}`]&&t.stats.achieve[`genus_${a}`].l>0&&(e+=`{{ '${a}' | genus }}`)})),$("#sshifter").append(`${F("trait_shapeshifter_name")}: \n \n {{ 'none' | genus }}${e}\n `),zs({el:"#sshifter",data:t.race,methods:{setShape(e){es(e)}},filters:{genus:e=>F(`genelab_genus_${e}`)}})}t.race.ss_traits=r}function ts(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 as(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 rs(e,a){switch(e){case"name":{let e={hooved:is(!1),promiscuous:t.race.artifical?F("trait_promiscuous_synth_name"):Ki.promiscuous.name};return a?e[a]?e[a]:Ki[a].name:e}case"desc":{let e={hooved:is(!0),promiscuous:t.race.artifical?F("trait_promiscuous_synth"):Ki.promiscuous.desc};return a?e[a]?e[a]:Ki[a].desc:e}}}function is(e){return t.race.sludge?F(e?"trait_hooved_slime":"trait_hooved_slime_name"):["cath","wolven","dracnid","seraph","cyclops","kobold","tuskin","sharkin"].includes(t.race.species)?F(e?`trait_hooved_${t.race.species}`:`trait_hooved_${t.race.species}_name`):["humanoid","avian","plant","fungi","reptilian","fey","synthetic"].includes(Di[t.race.species].type)?F(e?`trait_hooved_${Di[t.race.species].type}`:`trait_hooved_${Di[t.race.species].type}_name`):e?Ki.hooved.desc:Ki.hooved.name}Object.keys(Bi).forEach((function(e){let t="organism"===e?"humanoid":e;Bi[e].solar={titan:F(`genus_${t}_solar_titan`),enceladus:F(`genus_${t}_solar_enceladus`),triton:F(`genus_${t}_solar_triton`),eris:F(`genus_${t}_solar_eris`)}}));const ss={grassland:{label:F("biome_grassland_name"),desc:F("biome_grassland"),vars:()=>t.race.rejuvenated?[1.25]:[1.2],wiki:["%"]},oceanic:{label:F("biome_oceanic_name"),desc:F("biome_oceanic"),vars:()=>t.race.rejuvenated?[1.25,1.12,.92]:[1.12,1.06,.95],wiki:["%","%","%"]},forest:{label:F("biome_forest_name"),desc:F("biome_forest"),vars:()=>t.race.rejuvenated?[1.35]:[1.2],wiki:["%"]},desert:{label:F("biome_desert_name"),desc:F("biome_desert"),vars:()=>t.race.rejuvenated?[1.35,1.18,.6]:[1.2,1.1,.75],wiki:["%","%","%"]},volcanic:{label:F("biome_volcanic_name"),desc:F("biome_volcanic"),vars:()=>t.race.rejuvenated?[.8,1.25,1.15]:[.9,1.12,1.08],wiki:["%","%","%"]},tundra:{label:F("biome_tundra_name"),desc:F("biome_tundra"),vars:()=>t.race.rejuvenated?[1.5,.8]:[1.25,.9],wiki:["%","%"]},savanna:{label:F("biome_savanna_name"),desc:F("biome_savanna"),vars:()=>t.race.rejuvenated?[1.18,1.25,.75]:[1.1,1.18,.8],wiki:["%","%","%"]},swamp:{label:F("biome_swamp_name"),desc:F("biome_swamp"),vars:()=>t.race.rejuvenated?[1.6,1.35,1.15,.78]:[1.4,1.25,1.1,.88],wiki:["%","%","%","%"]},ashland:{label:F("biome_ashland_name"),desc:F("biome_ashland"),vars:()=>t.race.rejuvenated?[.55,1.35,1.2]:[.62,1.25,1.1],wiki:["%","%","%"]},taiga:{label:F("biome_taiga_name"),desc:F("biome_taiga"),vars:()=>t.race.rejuvenated?[1.2,1.65,.88]:[1.1,1.5,.92],wiki:["%","%","%"]},hellscape:{label:F("biome_hellscape_name"),desc:F("biome_hellscape"),vars:()=>t.race.rejuvenated?[.2]:[.25],wiki:["%"]},eden:{label:F("biome_eden_name"),desc:F("biome_eden")}},ns={toxic:{label:F("planet_toxic"),desc:F("planet_toxic_desc"),vars:()=>t.race.rejuvenated?[2,1.5]:[1,1.25],wiki:["A","-%"]},mellow:{label:F("planet_mellow"),desc:F("planet_mellow_desc"),vars:()=>t.race.rejuvenated?[2,3,.88]:[1.5,2,.9],wiki:["%","A","%"]},rage:{label:F("planet_rage"),desc:F("planet_rage_desc"),vars:()=>t.race.rejuvenated?[1.1,1.05,1]:[1.05,1.02,1],wiki:["%","%","A"]},stormy:{label:F("planet_stormy"),desc:F("planet_stormy_desc")},ozone:{label:F("planet_ozone"),desc:F("planet_ozone_desc"),vars:()=>t.race.rejuvenated?[.18]:[.25],wiki:["-A"]},magnetic:{label:F("planet_magnetic"),desc:F("planet_magnetic_desc"),vars:()=>t.race.rejuvenated?[2,150,.98]:[1,100,.985],wiki:["A","A","%"]},trashed:{label:F("planet_trashed"),desc:F("planet_trashed_desc"),vars:()=>t.race.rejuvenated?[.8,1.2]:[.75,1],wiki:["%","%"]},elliptical:{label:F("planet_elliptical"),desc:F("planet_elliptical_desc")},flare:{label:F("planet_flare"),desc:F("planet_flare_desc")},dense:{label:F("planet_dense"),desc:F("planet_dense_desc"),vars:()=>t.race.rejuvenated?[1.5,1.2,1.35]:[1.2,1,1.2],wiki:["%","A","%"]},unstable:{label:F("planet_unstable"),desc:F("planet_unstable_desc")},permafrost:{label:F("planet_permafrost"),desc:F("planet_permafrost_desc"),vars:()=>t.race.rejuvenated?[.7,125]:[.75,100],wiki:["%","A"]},retrograde:{label:F("planet_retrograde"),desc:F("planet_retrograde_desc")}};function cs(e){e=e||[];let t=Object.keys(Di).filter((function(t){return Di[t].basic()&&!e.includes(t)}));return t[tn(t)]}function os(){if(!t.settings.tabLoad&&(2!==t.settings.civTabs||6!==t.settings.govTabs))return;let e=$("#psychicPowers");Cs(e),t.race.psychic&&t.tech.psychic&&(function(e){let a=$('
                              ');e.append(a),a.append($(`
                              ${F("psychic_boost_title")}
                              `));let r=$("
                              ");a.append(r);let i="";if(Object.keys(Aa).forEach((function(e){t.resource[e].display&&(i+=`${t.resource[e].name}`)})),r.append(`
                              ${i}
                              `),a.append('
                              '),t.tech.psychic>=4){let e=$(`
                              ${F("psychic_channel")}
                              `),t=$('{{ c.boost }}'),r=$(`«`),i=$(`»`);e.append(r),e.append(t),e.append(i),a.append(e)}let s=t.tech.psychic>=5?60:75,n=t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg?t.stats.achieve.nightmare.mg:0;zs({el:"#psychicBoost",data:{b:t.race.psychicPowers.boost,c:t.tech.psychic>=4?t.race.psychicPowers.channel:{}},methods:{boostVal(){t.resource.Energy.amount>=s&&(t.resource.Energy.amount-=s,t.race.psychicPowers.boostTime=72*n)},add(){let e=b();for(let a=0;a0;a++)t.race.psychicPowers.channel.boost--}},filters:{boost:e=>F("psychic_boost_button",[t.resource[e]?t.resource[e].name:"N/A",s]),boostTime:()=>t.race.psychicPowers.boostTime>0?F("psychic_boost_time",[t.race.psychicPowers.boostTime]):""}});const c=document.getElementById("psyhscrolltarget");c.addEventListener("wheel",(e=>{e.preventDefault(),c.scrollLeft+=e.deltaY})),_s("psychicBoost",(function(){return F("psychic_boost_desc",[Ki.psychic.vars()[3]])}),{elm:"#psychicBoost > div > button"})}(e),function(e){let a=$('
                              ');e.append(a),a.append($(`
                              ${F("psychic_murder_title")}
                              `)),a.append('
                              ');let r=t.tech.psychic>=5?8:10;zs({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&&xs("Food",1e4*Ki.anthropophagite.vars()[0]),10===t.stats.psykill&&os())}},filters:{kill:()=>F("psychic_murder_button",[r])}}),_s("psychicKill",(function(){return F("psychic_murder_desc")}),{elm:"#psychicKill > div > button"})}(e),t.tech.psychic>=2&&function(e){let a=$('
                              ');if(e.append(a),a.append($(`
                              ${F("psychic_assault_title")}
                              `)),a.append('
                              '),t.tech.psychic>=4){let e=$(`
                              ${F("psychic_channel")}
                              `),t=$('{{ assault }}'),r=$(`«`),i=$(`»`);e.append(r),e.append(t),e.append(i),a.append(e)}let r=t.tech.psychic>=5?36:45,i=t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg?t.stats.achieve.nightmare.mg:0;zs({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*i)},add(){let e=b();for(let a=0;a0;a++)t.race.psychicPowers.channel.assault--}},filters:{boost:()=>F("psychic_boost_button",[F("psychic_attack"),r]),boostTime:()=>t.race.psychicPowers.assaultTime>0?F("psychic_boost_time",[t.race.psychicPowers.assaultTime]):""}}),_s("psychicAssault",(function(){return F("psychic_assault_desc",[Ki.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($(`
                              ${F("psychic_profit_title")}
                              `)),a.append('
                              '),t.tech.psychic>=4){let e=$(`
                              ${F("psychic_channel")}
                              `),t=$('{{ cash }}'),r=$(`«`),i=$(`»`);e.append(r),e.append(t),e.append(i),a.append(e)}let r=t.tech.psychic>=5?52:65,i=t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg?t.stats.achieve.nightmare.mg:0;zs({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*i)},add(){let e=b();for(let a=0;a0;a++)t.race.psychicPowers.channel.cash--}},filters:{boost:()=>F("psychic_boost_button",[F("psychic_profit"),r]),boostTime:()=>t.race.psychicPowers.cash>0?F("psychic_boost_time",[t.race.psychicPowers.cash]):""}}),_s("psychicFinance",(function(){return F("psychic_profit_desc",[Ki.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($(`
                              ${F("psychic_stun_title")}
                              `)),a.append('
                              ');let r=t.tech.psychic>=5?80:100;zs({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;aF("psychic_stun_button",[r])}}),_s("psychicCapture",(function(){return F("psychic_stun_desc")}),{elm:"#psychicCapture > div > button"})}(e),function(e){let a=$('
                              ');e.append(a),a.append($(`
                              ${F("psychic_mind_break_title")}
                              `)),a.append('
                              ');let r=t.tech.psychic>=5?64:80;zs({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:()=>F("psychic_mind_break_button",[r])}}),_s("psychicMindBreak",(function(){return F("psychic_mind_break_desc")}),{elm:"#psychicMindBreak > div > button"})}(e)))}var ls=!1;function _s(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(){(ls||$("#popper").length>0)&&ds();let i=r.wide?" wide":"",s=r.classes?r.classes:"has-background-light has-text-dark pop-desc";var n=$(`
                              `);r.attach?$(r.attach).append(n):$("#main").append(n),a&&n.append("function"==typeof a?a({this:this,popper:n}):a),ls=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]}}]}),n.show(),r.hasOwnProperty("in")&&"function"==typeof r.in&&r.in({this:this,popper:n,id:"popper"}),on("firework")&&t[t.race.cataclysm||t.race.orbit_decayed?"space":"city"].firework.on>0&&$(n).append('')})),r.unbind&&("ontouchstart"in document.documentElement&&navigator.userAgent.match(t.settings.touch)?$(r.elm).on("touchend",(function(e){ds(),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(){ds(),r.hasOwnProperty("out")&&"function"==typeof r.out&&r.out({this:this,popper:$("#popper"),id:"popper"})})))}function ds(e){e&&$("#popper").data("id")!==e||($("#popper").hide(),ls&&(ls.destroy(),ls=!1),Cs($("#popper"),!0))}function ps(e){switch(e){case"stop":j.w?j.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),j.s=!1;break;case"start":{let e=250,a=1e3,r=5e3;if(t.race.slow){let t=1+Ki.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-Ki.hyper.vars()[0]/100;e=Math.floor(e*t),a=Math.floor(a*t),r=Math.floor(r*t)}j.mt=e,us(),d.t>0&&(e=Math.ceil(.5*e),a=Math.ceil(.5*a),r=Math.ceil(.5*r)),j.w?(j.w.postMessage({loop:"short",period:e}),j.w.postMessage({loop:"mid",period:a}),j.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)),j.s=!0}}}function us(){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 hs(e,t){let a=Ci(),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 ms(e,a,r,i,s){if(i=i||[],s||i.includes("all")||i.push("all"),a=a||"warning",i.includes(h.view)){let r=$('

                              '+e+"

                              ");$("#msgQueueLog").prepend(r),$("#msgQueueLog").children().length>t.settings.msgFilters[h.view].max&&$("#msgQueueLog").children().last().remove()}i.forEach((function(r){h[r].unshift({msg:e,color:a}),h[r].length>t.settings.msgFilters[r].max&&h[r].pop()})),r||i.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 gs(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 vs(e){for(let a=t.r_queue.queue.length-1;a>=0;a--)e.includes(Sr.tech[t.r_queue.queue[a].type].grant[0])&&t.r_queue.queue.splice(a,1)}function fs(){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 ys(){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 bs(){!function(){let e=$("#buildQueue .buildList")[0];if(e){let t=Sortable.get(e);t&&t.destroy()}}(),Cs($("#buildQueue")),$("#buildQueue").append($(`\n

                              ${F("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{zs({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){ds(`q${t.queue.queue[e].id}${e}`),t.queue.queue.splice(e,1),bs();break}},setID:e=>`q${t.queue.queue[e].id}${e}`,setData(e,a){let r,i=t.queue.queue[e].id.split("-");"arpa"===i[0].substring(0,4)?r=i[0].substring(4):"city"===i[0]||"evolution"===i[0]||"starDock"===i[0]?r=Sr[i[0]][i[1]]:Object.keys(Sr[i[0]]).forEach((function(e){Sr[i[0]][e].hasOwnProperty(i[1])&&(r=Sr[i[0]][e][i[1]])}));let s={};if(r.cost){let e=Rs(r);Object.keys(e).forEach((function(t){let r=e[t]();r>0&&(s[`${a}-${t}`]=r)}))}return s},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?F("queue_play"):F("queue_pause")},filters:{time:e=>Fs(e),count:e=>e>1?` (${e})`:"",max_t:(e,t)=>t===e||t<0?"":` / ${Fs(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 ks=!1;function $s(e,t){try{t.debug_mode=ks,gtag("event",e,t)}catch(e){}}function xs(e,a,r,i){let s=t.resource[e].amount+a,n=!0;return s>t.resource[e].max&&-1!=t.resource[e].max?s=t.resource[e].max:s<0&&((!i||i&&-1*s>i)&&(n=!1),s=0),Number.isNaN(s)||(t.resource[e].amount=s,r||(t.resource[e].delta+=a,"Mana"===e&&a>0&&(t.resource[e].gen_d+=a))),n}function qs(e){let a=Di[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?[F("civics_gov_tp_name0"),F("civics_gov_tp_name1"),F("civics_gov_tp_name2"),F("civics_gov_tp_name3"),F("civics_gov_tp_name4"),F("civics_gov_tp_name5"),F("civics_gov_tp_name6"),F("civics_gov_tp_name7"),F("civics_gov_tp_name8"),F("civics_gov_tp_name9")]:[Di[t.race.species].name,Di[t.race.species].home,F(`biome_${t.city.biome}_name`),F(`evo_${a}_title`),F("civics_gov_name0"),F("civics_gov_name1"),F("civics_gov_name2"),F("civics_gov_name3"),F("civics_gov_name4"),F("civics_gov_name5"),F("civics_gov_name6"),F("civics_gov_name7"),F("civics_gov_name8"),F("civics_gov_name9"),F("civics_gov_name10"),F("civics_gov_name11")];return{s0:Math.rand(0,14),s1:r[Math.rand(0,r.length)]}}function Ps(e,a,r,i,s){s||(s="city"),"micro"===t.race.universe&&(i-=Ts("micro",!1)),t.race.small?i-=Ki.small.vars()[0]:t.race.large&&(i+=Ki.large.vars()[0]),t.race.compact&&(i-=Ki.compact.vars()[0]),!t.race.tunneler||"mine"!==e&&"coal_mine"!==e||(i-=Ki.tunneler.vars()[0]),!t.tech.housing_reduction||"basic_housing"!==e&&"cottage"!==e||(i-=.02*t.tech.housing_reduction),t.tech.housing_reduction&&"captive_housing"===e&&(i-=.01*t.tech.housing_reduction),"basic_housing"===e&&(t.race.solitary&&(i-=Ki.solitary.vars()[0]),t.race.pack_mentality&&(i+=Ki.pack_mentality.vars()[0])),"cottage"===e&&(t.race.solitary&&(i+=Ki.solitary.vars()[1]),t.race.pack_mentality&&(i-=Ki.pack_mentality.vars()[1])),"apartment"===e&&t.race.pack_mentality&&(i-=Ki.pack_mentality.vars()[1]),t.genes.creep&&!t.race.no_crispr?i-=.01*t.genes.creep:t.genes.creep&&t.race.no_crispr&&(i-=.002*t.genes.creep);let n=D("noquestions",0);n&&(i-=n),i<1.005&&(i=1.005);var c="citizen"===e?t.resource[t.race.species].amount:t[s][e]?t[s][e].count:0;return a&&(c+=a),Math.round(i**c*r)}function js(e,a,r,i,s,n){s||(s="space"),n=n||1.005,"micro"===t.race.universe&&(i-=Ts("micro",!0)),t.genes.creep&&!t.race.no_crispr?i-=.01*t.genes.creep:t.genes.creep&&t.race.no_crispr&&(i-=.002*t.genes.creep),t.race.small&&(i-=Ki.small.vars()[1]),t.race.compact&&(i-=Ki.compact.vars()[1]),t.prestige.Harmony.count>0&&t.stats.achieve.ascended&&(i-=Os());let c=D("noquestions",0);c&&(i-=c),i0&&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 Ms(e,a,r,i){if(i=void 0===i||i,e.cost){let s=0,n=!1,c=!(!a||!a.id[e.id])&&a.id[e.id],o=Rs(e,c),l=!!a&&{},_=!!a&&{};a&&(Object.keys(a.r).forEach((function(e){l[e]=a.r[e]})),Object.keys(a.rr).forEach((function(e){_[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 p={};return Object.keys(o).forEach((function(e){if(s>=0&&!t.prestige.hasOwnProperty(e)&&!["Morale","HellArmy","Structs","Bool"].includes(e)){var r=Number(c?o[e](c):o[e]());if(r>0){let c="Species"===e?t.race.species:e,o="Supply"===e?t.portal.purifier.supply:Number(t.resource[c].amount),u="Supply"===e?t.portal.purifier.sup_max:t.resource[c].max,h="Supply"===e?t.portal.purifier.diff:t.resource[c].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&&(o+=h*(i?a.t.t:a.t.rt),a.r.hasOwnProperty(c)||(a.r[c]=0),a.rr.hasOwnProperty(c)||(a.rr[c]=0),i?(o-=Number(a.r[c]),a.r[c]+=r,a.rr[c]+=r):(o-=Number(a.rr[c]),a.rr[c]+=r),u>=0&&o>u&&(o=u)),r>o)if(h>0){let e=(r-o)/h;e>s&&(n=c,s=e),p[c]=e}else a&&(a.r=l,a.rr=_),s=-9999999,p[c]=99999999-h,(p[n]&&p[c]>p[n]||!p[n])&&(n=c)}}})),a&&s>=0&&(void 0===a.id[e.id]?a.id[e.id]=1:a.id[e.id]++,i&&(a.t.t+=s),a.t.rt+=s),r?{t:s,r:n,s:p}:s}return 0}function Ss(e,a,r,i){let s=!(!r||!r.id[e.id])&&r.id[e.id],n=Ie(e.cost,s),c=0,o=!!r&&{},l=!!r&&{},_=!1;r&&(Object.keys(r.r).forEach((function(e){o[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 p={};return Object.keys(n).forEach((function(e){if(c>=0){let i=Number(n[e](s))*a;if(i>0){let a=Number(t.resource[e].amount),s=t.resource[e].diff;if(r&&(d&&t.interstellar.mass_ejector[e]&&(s+=t.interstellar.mass_ejector[e],t.race.governor.config.trash.hasOwnProperty(e)&&(s-=Math.min(t.race.governor.config.trash[e].v,t.interstellar.mass_ejector[e]))),a+=s*r.t.t,r.r[e]?(a-=Number(r.r[e]),r.r[e]+=i):r.r[e]=i,r.rr[e]?r.rr[e]+=i:r.rr[e]=i,t.resource[e].max>=0&&a>t.resource[e].max&&(a=t.resource[e].max)),i>a)if(s>0){let t=(i-a)/s;t>c&&(c=t,_=e),p[e]=t}else r&&(r.r=o,r.rr=l),c=-9999999,p[e]=99999999-s,(p[_]&&p[e]>p[_]||!p[_])&&(_=e)}}})),r&&c>=0&&(void 0===r.id[e.id]?r.id[e.id]=1:r.id[e.id]++,r.t.t+=c,r.t.rt+=c),i?{t:c,r:_,s:p}:c}function Cs(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 zs(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 Fs(e){let t;if(e<0)t=F("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 As(e){return"antimatter"===t.race.universe&&(e=+(e*=Ts("antimatter")).toFixed(2)),"leo"===R()&&(e=+(e*=1+N("leo")[0]/100).toFixed(2)),e}function Is(e){return t.race.emfield?+(1.5*e).toFixed(2):e}function Ts(e,a,r,i){i||(i={});let s=void 0!==i.dark?i.dark:t.prestige.Dark.count,n=void 0!==i.harmony?i.harmony:t.prestige.Harmony.count,c=void 0!==i.sludge?i.sludge:t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge[qn(e)]?t.stats.achieve.extinct_sludge[qn(e)]:0;switch(e){case"standard":return"standard"===t.race.universe||r?(n>0&&(s*=1+.001*n),c&&(s*=1+.03*c),1+s/200):0;case"evil":return"evil"===t.race.universe||r?(n>0&&(s*=1+.01*n),c&&(s*=1+.03*c),1+(Math.log2(10+s)-3.321928094887362)/5):1;case"micro":return"micro"===t.race.universe||r?a?(n>0&&(s*=1+.01*n),s=.01+(Math.log(100+s)-4.605170185988092)/35,c&&(s*=1+.03*c),s>.04&&(s=.04),+s.toFixed(5)):(n>0&&(s*=1+.01*n),s=.02+(Math.log(100+s)-4.605170185988092)/20,c&&(s*=1+.03*c),s>.06&&(s=.06),+s.toFixed(5)):0;case"heavy":return"heavy"===t.race.universe||r?(n>0&&(s*=1+.01*n),c&&(s*=1+.03*c),.995**s):1;case"antimatter":return"antimatter"===t.race.universe||r?(n>0&&(s*=1+.01*n),c&&(s*=1+.03*c),1+(Math.log(50+s)-3.912023005428146)/5):0;case"magic":return"magic"===t.race.universe||r?(n>0&&(s*=1+.01*n),c&&(s*=1+.03*c),1+(Math.log(50+s)-3.912023005428146)/3):0}return 0}const Ls=function(e){return Es&&!e?Es:t.genes.challenge&&t.genes.challenge>=2?Es=Ks(t.race.universe):0};var Es;function Ks(e,a){if(t.genes.challenge&&t.genes.challenge>=2){let r=xn(e=e||t.race.universe),i="standard"===e?.25:.15,s=t.genes.challenge>=3?.15:.1;t.genes.challenge>=4&&"standard"!==e&&(i+=.05,s-=.05),t.race.weak_mastery&&"antimatter"===e&&(i/=10,s/=10),t.race.nerfed&&(i/="antimatter"===e?5:2,s/="antimatter"===e?5:2),t.race.ooze&&(i*=1-Ki.ooze.vars()[2]/100,s*=1-Ki.ooze.vars()[2]/100);let n=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;n>0&&(i*=1+n/100,s*=1+n/100);let c=r.aLvl*i,o=0;return"standard"!==e&&(o=r.uLvl*s),t.genes.challenge>=5&&t.race.hasOwnProperty("mastery")&&(c*=1+Ki.mastery.vars()[0]*t.race.mastery/100,o*=1+Ki.mastery.vars()[0]*t.race.mastery/100),a?{g:c,u:o,m:c+o}:c+o}return a?{g:0,u:0,m:0}:0}const Ds=function(e){if(!Bs||e){let e=0;Object.keys(t.pillars).forEach((function(a){Di[a]&&t.race.species===a?e+=4:Di[a]&&e++})),Bs=[1+e/100,1+2*e/100]}return Bs};var Bs;function Gs(e,a,r,i){r=r||0;let s=(i=i||{}).genes;void 0===s&&(s=Sn()-1,s>4&&(s=4));let n=i.uni||t.race.universe;if("micro"===n&&(e*=.25),"antimatter"===n&&(e*=1.1),"heavy"===n&&"mad"!==a)switch(s){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!==i.tp?i.tp:t.race.truepath)&&(e*=1.1),s){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 Ns(e,a){let r={plasmid:0,phage:0,dark:0,harmony:0,artifact:0,cores:0};a||(a={});let i=a.genes,s=a.uni;s=s||t.race.universe;let n=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+=aa("federation"===t.civic.govern.type?15:20));n=t.race.high_pop?Math.round(t.resource[t.race.species].amount/Ki.high_pop.vars()[0])+Math.round(e/Ki.high_pop.vars()[0]):t.resource[t.race.species].amount+e}else n=a.high_pop?Math.round(a.cit/Ki.high_pop.vars(a.high_pop)[0])+Math.round(a.sol/Ki.high_pop.vars(a.high_pop)[0]):a.cit+a.sol;let c=999,o=1e6,l=100,_=0,d=150;switch(e){case"mad":c=3,o=1e5,l=1.1,d=150,(void 0!==a.synth?a.synth:"synthetic"===Di[t.race.species].type)&&(c=5,o=125e3,d=100);break;case"cataclysm":case"bioseed":c=3,o=5e4,l=1.015,_=1,d=400;break;case"ai":c=2.5,o=45e3,l=1.014,_=2,d=600;break;case"vacuum":case"bigbang":c=2.2,o=4e4,l=1.012,_=2.5,d=800;break;case"ascend":case"terraform":c=1.15,o=3e4,l=1.008,_=4,d=2e3;break;case"matrix":c=1.5,o=32e3,l=1.01,_=3.2,d=1800;break;case"retire":c=1.15,o=32e3,l=1.006,_=3.2,d=1800;break;case"eden":c=1,o=18e3,l=1.004,_=2.5,d=1800}if(d=void 0!==i?Math.floor(d*(1+(i+(a.tp?1:0))/8)):Math.floor(d*(1+(Sn()-(t.race.truepath?0:1))/8)),void 0===a.plas){let i=void 0!==a.know?a.know:t.stats.know,s=Math.round(n/c);for(;i>o;)s++,i-=o,o*=l;if(t.race.cataclysm?s+=300:t.race.lone_survivor&&(s+=800),r.plasmid=Gs(s,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?Gs(Math.floor(Math.log2(r.plasmid)*Math.E*_),e,!1,a):0,"bigbang"===e){let e=a.exotic,i=a.mass;void 0===e&&t.interstellar&&t.interstellar.stellar_engine&&(e=t.interstellar.stellar_engine.exotic,i=t.interstellar.stellar_engine.mass);let s=+Math.log(1+40*e).toFixed(3);s+=+(Math.log2(i-7)/2.5).toFixed(3),s=Gs(s,"bigbang",3,a),r.dark=s}else if("vacuum"===e){let e=void 0!==a.mana?a.mana:t.resource.Mana.gen,i=+(Math.log2(e)/5).toFixed(3);i=Gs(i,"vacuum",3,a),r.dark=i}if(["ascend","descend","terraform"].includes(e)){let n=1;if(void 0===i?(n=Sn(),n>5&&(n=5)):n=i+1,"ascend"===e||"terraform"===e){switch(s){case"micro":n*=.25;break;case"heavy":n*=1.2;break;case"antimatter":n*=1.1}r.harmony=parseFloat(n.toFixed(2))}else if("descend"===e){let e="micro"===s?1:n,i=a.floor;void 0!==i?i++:i=t.portal.hasOwnProperty("spire")?t.portal.spire.count:0,[50,100].forEach((function(t){i>t&&e++})),r.artifact=e}}return"ai"===e&&(r.cores="micro"===s?2:5),r}function Rs(e,a,r){let i=e.cost||{};if((i.RNA||i.DNA)&&t.genes.evolve){var s={};return Object.keys(i).forEach((function(e){"RNA"!==e&&"DNA"!==e||(s[e]=function(){return Math.round(.8*i[e](a,r))})})),s}return i=function(e,a,r){if(t.race.bloated){let t=1+Ki.bloated.vars()[0]/100;var i={};return Object.keys(e).forEach((function(s){["Food","Lumber","Stone","Furs","Copper","Iron","Aluminium","Cement","Coal","Steel","Titanium","Alloy","Polymer","Iridium"].includes(s)?i[s]=function(){return e[s](a,r)*t}:i[s]=function(){return e[s](a,r)}})),i}return e}(i,a,r),i=function(e,a,r,i){if((i?i.truepath:t.race.truepath)&&(!a.hasOwnProperty("path")||!a.path.includes("truepath"))){var s={};return Object.keys(e).forEach((function(t){"Money"===t?s[t]=function(){return Math.round(3*e[t](r,i))}:["Structs","Knowledge","Custom","Soul_Gem","Plasmid","Phage","Dark","Harmony","Blood_Stone","Artifact","Corrupt_Gem","Codex","Demonic_Essence","Horseshoe"].includes(t)?s[t]=function(){return e[t](r,i)}:s[t]=function(){return Math.round(2*e[t](r,i))}})),s}return e}(i,e,a,r),i=function(e,a,r){if(t.race.lone_survivor){var i={};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)?i[t]=function(){return e[t](a,r)}:["Knowledge"].includes(t)?i[t]=function(){return Math.round(.5*e[t](a,r))}:["Money"].includes(t)?i[t]=function(){return Math.round(.22*e[t](a,r))}:["Plywood","Brick","Wrought_Iron","Sheet_Metal","Mythril","Quantium"].includes(t)?i[t]=function(){return Math.round(.14*e[t](a,r))}:i[t]=function(){return Math.round(.28*e[t](a,r))}})),i}return e}(i,a,r),i=function(e,a,r){if(t.race.inflation){var i={};return Object.keys(e).forEach((function(s){if("Money"===s){let n=1+t.race.inflation/75;i[s]=function(){return Math.round(e[s](a,r)*n)}}else i[s]=function(){return e[s](a,r)}})),i}return e}(i,a,r),i=function(e,a,r){if("technocracy"===t.civic.govern.type){let t=1+ee.technocracy()[1]/100;var i={};return Object.keys(e).forEach((function(s){if("Knowledge"===s){let t=1-ee.technocracy()[0]/100;i[s]=function(){return Math.round(e[s](a,r)*t)}}else i[s]="Money"===s||"Structs"===s||"Custom"===s?function(){return e[s](a,r)}:function(){return Math.round(e[s](a,r)*t)}})),i}return e}(i,a,r),i=function(e,a,r){if(t.race.flier&&(e.Stone||e.Cement)){var i={};let t=1-Ki.flier.vars()[0]/100;return Object.keys(e).forEach((function(s){"Stone"!==s||e.Cement?"Cement"===s?e.Stone?i.Stone=function(){return Math.round(e.Stone(a,r)*t+1.8*e[s](a,r)*t)||0}:i.Stone=function(){return Math.round(1.75*e[s](a,r)*t)}:i[s]=function(){return e[s](a,r)}:i[s]=function(){return Math.round(e[s](a,r)*t)||0}})),i}return e}(i,a,r),i=function(e,a,r){if(t.race.kindling_kindred&&(e.Lumber||e.Plywood)){var i={};let t=1+Ki.kindling_kindred.vars()[0]/100;return Object.keys(e).forEach((function(s){"Lumber"!==s&&"Plywood"!==s&&"Structs"!==s?i[s]=function(){return Math.round(e[s](a,r)*t)||0}:"Structs"===s&&(i[s]=function(){return e[s](a,r)})})),i}if(t.race.unfathomable&&t.city.captive_housing){let t=as("entish");if(t>0){i={};let s=1-.4*t;return Object.keys(e).forEach((function(t){i[t]="Lumber"===t&&"Plywood"===t?function(){return Math.round(e[t](a,r)*s)||0}:function(){return e[t](a,r)}})),i}}return e}(i,a,r),i=function(e,a,r){if(t.race.smoldering){let i={};return Object.keys(e).forEach((function(t){if("Lumber"===t||"Plywood"===t){let s="Plywood"===t?2:1;i.Chrysotile=function(){return Math.round(e[t](a,r)*s)||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)?i[t]=function(){return e[t](a,r)}:i[t]=function(){return Math.round(.9*e[t](a,r))}})),!i.hasOwnProperty("Chrysotile")&&e.hasOwnProperty("Money")&&t.tech.primitive&&t.tech.primitive>=3&&(i.Chrysotile=function(){let t=e.Money(a,r)||0;return t>0?Math.round(t/50):0}),i}return e}(i,a,r),i=function(e,a,r){let i=D("pragmatist",1),s=as("gnome");if((t.race.smart||t.race.dumb||i||s>0)&&e.Knowledge){var n={};return Object.keys(e).forEach((function(c){n[c]="Knowledge"===c?function(){let n=e[c](a,r);return t.race.smart&&(n*=1-Ki.smart.vars()[0]/100),s>0&&(n*=1-Ki.smart.vars(1)[0]/100*s),t.race.dumb&&(n*=1+Ki.dumb.vars()[0]/100),i&&(n*=1+i/100),Math.round(n)}:function(){return e[c](a,r)}})),n}return e}(i,a,r),i=function(e,a,r){if(e.Cement&&t.tech.cement&&t.tech.cement>=2){let s=t.tech.cement>=3?.8:.9;var i={};return Object.keys(e).forEach((function(t){i[t]="Cement"===t?function(){return Math.round(e[t](a,r)*s)||0}:function(){return e[t](a,r)}})),i}return e}(i,a,r),i=function(e,t,a){let r=D("extravagant",0);if(r){var i={};return Object.keys(e).forEach((function(s){if("Money"===s){let n=1+r/100;i[s]=function(){return Math.round(e[s](t,a)*n)}}else i[s]=function(){return e[s](t,a)}})),i}return e}(i,a,r),i=function(e,a,r){if(t.race.heavy){var i={};return Object.keys(e).forEach((function(t){i[t]="Stone"===t||"Cement"===t||"Wrought_Iron"===t?function(){return Math.round(e[t](a,r)*(1+Ki.heavy.vars()[1]/100))}:function(){return e[t](a,r)}})),i}return e}(i,a,r),function(e,a,r){let i=as("pterodacti");if((t.race.hollow_bones||i>0)&&(e.Plywood||e.Brick||e.Wrought_Iron||e.Sheet_Metal||e.Mythril||e.Aerogel||e.Nanoweave||e.Scarletite||e.Quantium)){var s={};return Object.keys(e).forEach((function(n){s[n]="Plywood"===n||"Brick"===n||"Wrought_Iron"===n||"Sheet_Metal"===n||"Mythril"===n||"Aerogel"===n||"Nanoweave"===n||"Scarletite"===n||"Quantium"===n?function(){let s=e[n](a,r);return t.race.hollow_bones&&(s*=1-Ki.hollow_bones.vars()[0]/100),i>0&&(s*=1-Ki.hollow_bones.vars(3)[0]/100*i),Math.round(s)}:function(){return e[n](a,r)}})),s}return e}(i,a,r)}function Hs(e){return t.race.high_pop&&(e*=Ki.high_pop.vars()[0]),e}function Us(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 Vs(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 Ws(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 Qs(e,t,a,r,i){let s="";return r&&(s=`id="${r}" `),`${Us(e)}`}function Js(e,a){let r=ln();const i=new Date;return r.active&&!t.special.egg[i.getFullYear()][`egg${e}`]?Qs("egg",a||16,2,`egg${e}`,'role="button" aria-label="Egg" '):""}function Zs(e,a,r){let i=_n();const s=(new Date).getFullYear();let n=r?"trick":"treat";return i.active&&!t.special.trick[s][`${n}${e}`]?Qs(r?"ghost":"candycorn",a||16,2,`${n}${e}`,`role="button" aria-label="${r?"Ghost":"Candy Corn"}" `):""}function Xs(e,a,r,i,s,n){return t.stats.achieve[e]&&(s?t.stats.achieve[e][n]-1:t.stats.achieve[e][n])>0?`

                                ${Us(r)}

                                `:""}function Ys(e,a,r,i,s){a||(a=10),r||(r=Ws(e,"achievement"));let n="";if(s)switch(s){case"standard":n+=Xs(e,a,r,F(t.settings.icon),i,"l");break;case"antimatter":n+=Xs(e,a,"atom",F("universe_antimatter"),i,"a");break;case"evil":n+=Xs(e,a,"evil",F("universe_evil"),i,"e");break;case"heavy":n+=Xs(e,a,"heavy",F("universe_heavy"),i,"h");break;case"micro":n+=Xs(e,a,"micro",F("universe_micro"),i,"m");break;case"magic":n+=Xs(e,a,"magic",F("universe_magic"),i,"mg")}else n+=Xs(e,a,r,F(t.settings.icon),i,"l"),n+=Xs(e,a,"atom",F("universe_antimatter"),i,"a"),n+=Xs(e,a,"evil",F("universe_evil"),i,"e"),n+=Xs(e,a,"heavy",F("universe_heavy"),i,"h"),n+=Xs(e,a,"micro",F("universe_micro"),i,"m"),n+=Xs(e,a,"magic",F("universe_magic"),i,"mg");return n}function en(e,t){return(t=t||{})[e]?t[e]:e<=1?1:t[e]=en(e-1,t)+en(e-2,t)}function tn(e){var t=Object.keys(e);return t[t.length*Math.random()<<0]}function an(e){switch(e){case 1:return F("basic");case 2:return F("plain");case 3:return F("bronze");case 4:return F("silver");case 5:return F("gold");default:return""}}function rn(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&&(i+=t.stats.achieve.technophobe.l);let s=0;for(let t=0;t=0&&(s>i&&(a-=i-s),s++),r-=a}return r}function sn(){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 nn(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(nn(e))})),t}let a=new e.constructor;for(var r in e)e.hasOwnProperty(r)&&(a[r]=nn(e[r]));return a}function cn(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 on("fool",2021)?cn("reverse",Di[t.race.species].name):Di[t.race.species].name;case"curve":return 1-(1-a)**(r||1.5)}return!1}function on(e,a){switch(e){case"easter":return ln();case"halloween":return _n();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:F("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 ln(){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,i=a%19,s=r(a/100),n=(s-r(s/4)-r((8*s+13)/25)+19*i+15)%30,c=n-r(n/28)*(1-r(29/(n+1))*r((21-i)/11)),o=c-(a+r(a/4)+c+2-s+r(s/4))%7,l=3+r((o+40)/44),_=o+28-31*r(l/4),d={date:[l-1,_],active:!1,endDate:[l-1,_],hint:!1,hintDate:[l-1,_],solve:!1,solveDate:[l-1,_]};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 _n(){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 i=new Date(`${r.date[0]+1}/${r.date[1]}/${a}`),s=new Date(`${r.endDate[0]+1}/${r.endDate[1]}/${a}`);return e>=i&&e<=s&&(r.active=!0,e>=new Date(`${r.hintDate[0]+1}/${r.hintDate[1]}/${a}`)&&e<=s&&(r.hint=!0),e>=new Date(`${r.solveDate[0]+1}/${r.solveDate[1]}/${a}`)&&e<=s&&(r.solve=!0)),r}function dn(){return t.race.magnificent&&t.city.hasOwnProperty("shrine")&&t.city.shrine.count>0}function pn(e){let a={mult:1,add:0};if(dn())switch(e){case"metal":a.mult+=+t.city.shrine.metal/100*Ki.magnificent.vars()[3];break;case"tax":a.mult+=+t.city.shrine.tax/100*Ki.magnificent.vars()[2];break;case"know":a.add+=+t.city.shrine.know*Ki.magnificent.vars()[0],a.mult+=+t.city.shrine.know*Ki.magnificent.vars()[1]/100;break;case"morale":a.add+=t.city.shrine.morale*Ki.magnificent.vars()[4]}return a}const un={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 hn(e,a){let r=Ki[e].hasOwnProperty("vars")?Ki[e].vars(a):[];return un.hasOwnProperty(e)&&("fibroblast"===e?r=[5*r[0]]:"hivemind"===e&&t.race.high_pop?r=[r[0]*Ki.high_pop.vars()[0]]:"imitation"===e?r.push(Di[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(mn()):"anthropophagite"===e?r=[1e4*r[0]]:un[e]||(r=[])),r}function mn(e){return t.race.sludge?e?"craft":F("resource_Beaker_name"):"cath"===t.race.species?e?"craft":F("resource_Box_name"):"wolven"===t.race.species?e?"craft":F("resource_ChewToy_name"):"dracnid"===t.race.species?e?"craft":F("resource_Hoard_name"):"seraph"===t.race.species?e?"forge":F("resource_Halo_name"):"cyclops"===t.race.species?e?"craft":F("resource_Monocle_name"):"kobold"===t.race.species?e?"craft":F("resource_Candle_name"):"tuskin"===t.race.species?e?"craft":F("resource_Goggles_name"):"sharkin"===t.race.species?e?"craft":F("resource_ToothSharpener_name"):"humanoid"===Di[t.race.species].type?e?"craft":F("resource_Sandals_name"):"avian"===Di[t.race.species].type?e?"craft":F("resource_Perch_name"):"plant"===Di[t.race.species].type?e?"craft":F("resource_Planter_name"):"fungi"===Di[t.race.species].type?e?"craft":F("resource_DampCloth_name"):"reptilian"===Di[t.race.species].type?e?"craft":F("resource_HeatRock_name"):"fey"===Di[t.race.species].type?e?"craft":F("resource_PixieDust_name"):"synthetic"===Di[t.race.species].type?e?"craft":F("resource_Battery_name"):e?"forge":F("resource_Horseshoe_name")}const gn={infiltrator:[F("wiki_trait_effect_infiltrator_ex1"),F("wiki_trait_effect_infiltrator_ex2",[[`${F("tech_steel")}`,`${F("tech_electricity")}`,`${F("tech_electronics")}`,`${F("tech_fission")}`,`${F("tech_rocketry")}`,`${F("tech_artificial_intelligence")}`,`${F("tech_quantum_computing")}`,`${F("tech_virtual_reality")}`,`${F("tech_shields")}`,`${F("tech_ai_core")}`,`${F("tech_graphene_processing")}`,`${F("tech_nanoweave")}`,`${F("tech_orichalcum_analysis")}`,`${F("tech_infernium_fuel")}`].join(", ")])],heavy:[F("wiki_trait_effect_heavy_ex1",[vn("Stone"),vn("Cement"),vn("Wrought_Iron")])],sniper:[F("wiki_trait_effect_sniper_ex1")],hooved:[F("wiki_trait_effect_hooved_ex1",[mn(!1)]),F("wiki_trait_effect_hooved_ex2",[`${t.resource.hasOwnProperty("Lumber")?t.resource.Lumber.name:F("resource_Lumber_name")}`,`${t.resource.hasOwnProperty("Copper")?t.resource.Copper.name:F("resource_Copper_name")}`,`${t.resource.hasOwnProperty("Iron")?t.resource.Iron.name:F("resource_Iron_name")}`,`${t.resource.hasOwnProperty("Steel")?t.resource.Steel.name:F("resource_Steel_name")}`,`${t.resource.hasOwnProperty("Adamantite")?t.resource.Adamantite.name:F("resource_Adamantite_name")}`,`${t.resource.hasOwnProperty("Orichalcum")?t.resource.Orichalcum.name:F("resource_Orichalcum_name")}`,12,75,150,500,5e3]),F("wiki_trait_effect_hooved_ex3"),F("wiki_trait_effect_hooved_ex4",['5',mn(!1)]),F("wiki_trait_effect_hooved_ex5",[`${t.resource.hasOwnProperty("Lumber")?t.resource.Lumber.name:F("resource_Lumber_name")}`,`${t.resource.hasOwnProperty("Copper")?t.resource.Copper.name:F("resource_Copper_name")}`])],instinct:[F("wiki_trait_effect_instinct_ex1",[6.67,F("galaxy_chthonian"),10])],logical:[F("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:[F("wiki_trait_effect_high_pop_ex1")],flier:[F("wiki_trait_effect_flier_ex1")],unfathomable:[F("wiki_trait_effect_unfathomable_ex1"),F("wiki_trait_effect_unfathomable_ex2")]};function vn(e){return`${t.hasOwnProperty("resource")&&t.resource.hasOwnProperty(e)?t.resource[e].name:F(`resource_${e}_name`)}`}function fn(e,a,r){let i=r.fanatic||!1,s=r.tpage||!1,n=r.trank||!1,c=r.wiki||!1,o="",l=rs("name",a),_=rs("desc",a);s&&["genus","major"].includes(Ki[a].type)&&(o=`«${F("wiki_trait_rank")} {{ rank }}»`),c&&e.append(`

                                ${l}

                                ${o}
                                `),c&&(s&&Ki[a].hasOwnProperty("val")?e.append(`
                                ${F(`wiki_trait_${Ki[a].type}`)}${F("wiki_trait_value",[Ki[a].val])}
                                `):e.append(`
                                ${F(`wiki_trait_${Ki[a].type}`)}
                                `)),i&&c&&e.append(`
                                ${F("wiki_trait_fanaticism",[i])}
                                `),e.append(`
                                ${_}
                                `);let d="warning";if(Ki[a].hasOwnProperty("val")&&(d=Ki[a].val>=0?"success":"danger"),s&&["genus","major"].includes(Ki[a].type)?e.append(`
                                `):(c||t.stats.feat.journeyman&&t.stats.achieve.seeder&&t.stats.achieve.seeder.l>0)&&e.append(`
                                ${F(`wiki_trait_effect_${a}`,hn(a,n))}
                                `),gn[a]&&c&&gn[a].forEach((function(t){e.append(`
                                ${t}
                                `)})),s&&["genus","major"].includes(Ki[a].type)){let e={rank:t.race[a]||1};zs({el:`#${Ki[a].type}_${a}`,data:e,methods:{getTraitDesc:e=>F(`wiki_trait_effect_${a}`,hn(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 yn={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"]},bn={colonist:[cn("name")]},wn={trade:[750,50]},kn={};Object.keys(yn).forEach((function(e){yn[e].forEach((t=>kn[t]={name:F(`achieve_${t}_name`),desc:wn[t]?F(`achieve_${t}_desc`,wn[t]):F(`achieve_${t}_desc`),flair:bn[t]?F(`achieve_${t}_flair`,bn[t]):F(`achieve_${t}_flair`),type:e}))}));const $n={utopia:{name:F("feat_utopia_name"),desc:F("feat_utopia_desc"),flair:F("feat_utopia_flair")},take_no_advice:{name:F("feat_take_no_advice_name"),desc:F("feat_take_no_advice_desc"),flair:F("feat_take_no_advice_flair")},ill_advised:{name:F("feat_ill_advised_name"),desc:F("feat_ill_advised_desc"),flair:F("feat_ill_advised_flair")},organ_harvester:{name:F("feat_organ_harvester_name"),desc:F("feat_organ_harvester_desc"),flair:F("feat_organ_harvester_flair")},the_misery:{name:F("feat_the_misery_name"),desc:F("feat_the_misery_desc"),flair:F("feat_the_misery_flair")},energetic:{name:F("feat_energetic_name"),desc:F("feat_energetic_desc"),flair:F("feat_energetic_flair")},garbage_pie:{name:F("feat_garbage_pie_name"),desc:F("feat_garbage_pie_desc"),flair:F("feat_garbage_pie_flair")},finish_line:{name:F("feat_finish_line_name"),desc:F("feat_finish_line_desc"),flair:F("feat_finish_line_flair")},blank_slate:{name:F("feat_blank_slate_name"),desc:F("feat_blank_slate_desc"),flair:F("feat_blank_slate_flair")},supermassive:{name:F("feat_supermassive_name"),desc:F("feat_supermassive_desc"),flair:F("feat_supermassive_flair")},steelem:{name:F("feat_steelem_name"),desc:F("feat_steelem_desc"),flair:F("feat_steelem_flair")},banana:{name:F("feat_banana_name"),desc:F("feat_banana_desc",[500,500]),flair:F("feat_banana_flair")},rocky_road:{name:F("feat_rocky_road_name"),desc:F("feat_rocky_road_desc"),flair:F("feat_rocky_road_flair")},demon_slayer:{name:F("feat_demon_slayer_name"),desc:F("feat_demon_slayer_desc"),flair:F("feat_demon_slayer_flair")},equilibrium:{name:F("feat_equilibrium_name"),desc:F("feat_equilibrium_desc"),flair:F("feat_equilibrium_flair")},digital_ascension:{name:F("feat_digital_ascension_name"),desc:F("feat_digital_ascension_desc"),flair:F("feat_digital_ascension_flair")},novice:{name:F("feat_novice_name"),desc:F("feat_achievement_hunter_desc",[10]),flair:F("feat_novice_flair")},journeyman:{name:F("feat_journeyman_name"),desc:F("feat_achievement_hunter_desc",[25]),flair:F("feat_journeyman_flair")},adept:{name:F("feat_adept_name"),desc:F("feat_achievement_hunter_desc",[50]),flair:F("feat_adept_flair")},master:{name:F("feat_master_name"),desc:F("feat_achievement_hunter_desc",[75]),flair:F("feat_master_flair")},grandmaster:{name:F("feat_grandmaster_name"),desc:F("feat_achievement_hunter_desc",[100]),flair:F("feat_grandmaster_flair")},nephilim:{name:F("feat_nephilim_name"),desc:F("feat_nephilim_desc"),flair:F("feat_nephilim_flair")},twisted:{name:F("feat_twisted_name"),desc:F("feat_twisted_desc"),flair:F("feat_twisted_flair")},slime_lord:{name:F("feat_slime_lord_name"),desc:F("feat_slime_lord_desc"),flair:F("feat_slime_lord_flair")},annihilation:{name:F("feat_annihilation_name"),desc:F("feat_annihilation_desc"),flair:F("feat_annihilation_flair")},friday:{name:F("feat_friday_name"),desc:F("feat_friday_desc"),flair:F("feat_friday_flair")},valentine:{name:F("feat_love_name"),desc:F("feat_love_desc"),flair:F("feat_love_flair")},leprechaun:{name:F("feat_leprechaun_name"),desc:F("feat_leprechaun_desc"),flair:F("feat_leprechaun_flair")},easter:{name:F("feat_easter_name"),desc:F("feat_easter_desc"),flair:F("feat_easter_flair")},egghunt:{name:F("feat_egghunt_name"),desc:F("feat_egghunt_desc"),flair:F("feat_egghunt_flair")},launch_day:{name:F("feat_launch_day_name"),desc:F("feat_launch_day_desc"),flair:F("feat_launch_day_flair")},solstice:{name:F("feat_solstice_name"),desc:F("feat_solstice_desc"),flair:F("feat_solstice_flair")},firework:{name:F("feat_firework_name"),desc:F("feat_firework_desc"),flair:F("feat_firework_flair")},halloween:{name:F("feat_boo_name"),desc:F("feat_boo_desc"),flair:F("feat_boo_flair")},trickortreat:{name:F("feat_trickortreat_name"),desc:F("feat_trickortreat_desc"),flair:F("feat_trickortreat_flair")},thanksgiving:{name:F("feat_gobble_gobble_name"),desc:F("feat_gobble_gobble_desc"),flair:F("feat_gobble_gobble_flair")},xmas:{name:F("feat_xmas_name"),desc:F("feat_xmas_desc"),flair:F("feat_xmas_flair")},fool:{name:F("feat_fool_name"),desc:F("feat_fool_desc"),flair:F("feat_fool_flair")}};{let e=xn();e.aLvl,e.uLvl}function xn(e){let a=qn(e=e||t.race.universe),r=0,i=0;return Object.keys(kn).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]&&(i+=t.stats.achieve[e][a]>5?5:t.stats.achieve[e][a]))})),{aLvl:r,uLvl:i}}function qn(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 Pn(e,a,r,i){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 s=Sn(),n=!1,c=!1;(void 0===r||r>s)&&(r=s);let o=!0;if(void 0===t.stats.achieve[e]&&(t.stats.achieve[e]={l:0},o=!1),("micro"===t.race.universe&&!0===a||"micro"!==t.race.universe&&!0!==a)&&t.stats.achieve[e]&&t.stats.achieve[e].li)&&(r=i),!t.stats.feat[e]||t.stats.feat[e]&&t.stats.feat[e]5?5:t.stats.achieve[e].l,t.stats.achieve[e][c]&&(n+=t.stats.achieve[e][c]>5?5:t.stats.achieve[e][c]);let i=Ys(e,16,l,o);o&&t.stats.achieve[e].l>1||!o?a.append($(`
                                ${kn[e].name}${kn[e].desc}${i}
                                `)):o&&1===t.stats.achieve[e].l&&r--}})),o&&!t.stats.feat.fool){let e=$(`
                                ${$n.fool.name}${F("feat_fool_spoof")}
                                `);a.append(e)}else Object.keys($n).forEach((function(e){let r=Ws(e,"feat");if(t.stats.feat[e]){let i=t.stats.feat[e]>1?`

                                ${Us(r)}

                                `:"";if("easter"===e){let e=Js(4,14);e.length>0&&(i=e)}a.append($(`
                                ${$n[e].name}${$n[e].desc}${i}
                                `))}}));let l=Zs(5,12,!1);a.prepend(`
                                ${F("achieve_draw_achieve_earned",[r,i])}${l}
                                `),zs({el:"#achievePanel",methods:{flair:e=>kn[e].flair,feat:e=>$n[e].flair}}),o&&!t.stats.feat.fool&&$("#thefool").on("mouseover",(function(){"micro"===t.race.universe?jn("fool",!0):jn("fool"),On()}))}function Mn(){let e=Sn();$("#topBar span.flair")&&Cs($("#topBar span.flair"),!0);let a=Js(1,14);if(a.length>0&&$("#topBar .planet").after($(a)),e>1&&0===$("#topBar .planet .flair").length){if(0===a.length){let t=Ws("topbar","challenge");$("#topBar .planet").after(`${Us(t)}`)}let r="";t.race.no_plasmid&&(r+=`
                                ${F("evo_challenge_plasmid")}
                                `),t.race.weak_mastery&&(r+=`
                                ${F("evo_challenge_mastery")}
                                `),t.race.no_trade&&(r+=`
                                ${F("evo_challenge_trade")}
                                `),t.race.no_craft&&(r+=`
                                ${F("evo_challenge_craft")}
                                `),t.race.no_crispr&&(r+=`
                                ${F("evo_challenge_crispr")}
                                `),t.race.nerfed&&(r+=`
                                ${F("evo_challenge_nerfed")}
                                `),t.race.badgenes&&(r+=`
                                ${F("evo_challenge_badgenes")}
                                `),r.length>0&&$("#topBar .planetWrap .flair").append($(`
                                Active Challenge Genes
                                ${r}
                                `)),_s("topbarPlanet",(function(e){let t=$('
                                ');e.popper.append(t),t.append($(r))}),{elm:"#topBar .planetWrap .flair",classes:"has-background-light has-text-dark"})}}function Sn(){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 Cn(){let e=Sn();for(let a=e;a>=0;a--)zn("extinct_","mass_extinction",25,a),"evil"===t.race.universe&&Fn("extinct_","vigilante",12,a),zn("genus_","creator",9,a),zn("biome_","explorer",6,a),"heavy"===t.race.universe&&Fn("genus_","heavyweight",8,a);if(t.tech.supercollider&&t.tech.supercollider>=99&&Pn("blackhole"),t.stats.starved>=100&&Pn("mass_starvation"),Math.round(Math.log2(t.civic.garrison.protest+t.civic.garrison.fatigue))>=8&&Pn("warmonger"),t.stats.died>=250&&Pn("red_tactics"),t.interstellar.stellar_engine&&t.interstellar.stellar_engine.mass>=12&&Pn("landfill"),t.interstellar.stellar_engine&&t.interstellar.stellar_engine.mass>=100&&jn("supermassive"),t.tech.piracy&&t.tech.chthonian&&t.tech.chthonian>=2&&t.galaxy&&1===St("gxy_stargate")&&1===St("gxy_gateway")&&1===St("gxy_gorddon")&&1===St("gxy_alien1")&&1===St("gxy_alien2")&&1===St("gxy_chthonian")&&Pn("neutralized"),on("summer")&&t.resource.hasOwnProperty("Thermite")){let e=1e5+9e3*t.stats.reset;e>1e6&&(e=1e6),t.resource.Thermite.amount>e&&jn("solstice","micro"===t.race.universe)}if(on("firework")&&t[t.race.cataclysm||t.race.orbit_decayed?"space":"city"].firework.on>0&&jn("firework","micro"===t.race.universe),t.city.morale.current>=200&&(Pn("paradise"),t.city.morale.current>=500&&jn("utopia")),t.resource.hasOwnProperty("Money")&&t.resource.Money.amount>=1e9&&Pn("scrooge"),t.resource.hasOwnProperty("Money")&&t.race.inflation&&t.resource.Money.amount>=25e10&&Pn("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&&Pn("trade"),t.tech.pillars){let e={},a=0,r=5;if(Object.keys(t.pillars).forEach((function(i){Di[i]&&((!e[Di[i].type]||t.pillars[i]>e[Di[i].type])&&(e[Di[i].type]=t.pillars[i]),t.pillars[i]=Object.keys(Ei).length){let t=5;Object.keys(e).forEach((function(a){e[a]=Object.keys(Di).length-1&&Pn("resonance"),a>=50&&jn("equilibrium",!1,r)}if(t.portal.hasOwnProperty("mechbay")&&t.tech.hasOwnProperty("hell_spire")&&t.tech.hell_spire>=9){let e=Object.keys(fa).length,a={};Object.keys(t.stats.spire).forEach((function(r){let i={};Object.keys(t.stats.spire[r]).forEach((function(e){fa[e]&&((!a.hasOwnProperty(e)||a[e]0&&(i[e]=t.stats.spire[r][e]))})),Object.keys(i).length===e&&Pn("gladiator",!1,Math.min(...Object.values(i)),r)})),Object.keys(a).length===e&&Pn("gladiator",!1,Math.min(...Object.values(a)),"l")}if(t.race.banana){let e=qn();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(i){t.stats.banana[i].l&&a++,"l"!==e&&t.stats.banana[i][e]&&r++})),a>0&&Pn("banana",!1,a,"l"),r>0&&"l"!==e&&Pn("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",qn()].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&&Pn("pathfinder",!1,a,e)}));const a=new Date;let r=on("easter"),i=on("halloween"),s=a.getFullYear();if(!t.settings.boring&&13===a.getDate()&&5===a.getDay()&&t.resource[t.race.species].amount>=1){let e=!1;e=jn("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){jn("easter","micro"===t.race.universe);let e=0;for(let a=1;a<=18;a++)t.special.egg[s][`egg${a}`]&&e++;e>=12&&jn("egghunt","micro"===t.race.universe)}else if(on("launch_day"))jn("launch_day","micro"===t.race.universe);else if(i.active){let e=0;for(let a=1;a<=7;a++)t.special.trick[s][`trick${a}`]&&e++;for(let a=1;a<=7;a++)t.special.trick[s][`treat${a}`]&&e++;e>=12&&jn("trickortreat","micro"===t.race.universe),9===a.getMonth()&&31===a.getDate()&&jn("halloween","micro"===t.race.universe)}else!t.settings.boring&&10===a.getMonth()&&a.getDate()>=22&&a.getDate()<=28?jn("thanksgiving","micro"===t.race.universe):t.settings.boring||11!==a.getMonth()||25!=a.getDate()||jn("xmas","micro"===t.race.universe);else jn("leprechaun","micro"===t.race.universe);else jn("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&&jn("fool","micro"===t.race.universe),t.stats.dkills>=666e6&&jn("demon_slayer");for(let a=e;a>=1;a--){let e=0;const r=Object.keys(kn);for(const i of r)t.stats.achieve[i]&&t.stats.achieve[i].l>=a&&e++;let i=[{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>=i[r].c&&(!t.stats.feat[i[r].f]||t.stats.feat[i[r].f]=i&&s++;if(s>=r&&(Pn(a,!1,i),"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&&Fn(e,a,r,i)}function Fn(e,a,r,i){let s=!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=i&&s++;break;case"antimatter":t.stats.achieve[a]&&t.stats.achieve[a].a&&t.stats.achieve[a].a>=i&&s++;break;case"heavy":t.stats.achieve[a]&&t.stats.achieve[a].h&&t.stats.achieve[a].h>=i&&s++;break;case"micro":t.stats.achieve[a]&&t.stats.achieve[a].m&&t.stats.achieve[a].m>=i&&s++;break;case"magic":t.stats.achieve[a]&&t.stats.achieve[a].mg&&t.stats.achieve[a].mg>=i&&s++}s>=r&&Pn(a,!1,i)}}const An={mastery:{name:F("mastery"),desc(){let e="";return Object.keys(Qt).forEach((function(a){let r=Ks(a,!0);"standard"===a?e+=`${Qt[a].name}: ${F("perks_mastery_general",[`${+r.g.toFixed(2)}%`])}`:t.stats.achieve.whitehole&&(e+=`${Qt[a].name}: ${F("perks_mastery_general",[`${+r.g.toFixed(2)}%`])}, ${F("perks_mastery_universe",[`${+r.u.toFixed(2)}%`])}`)})),e},active:()=>!!(t.genes.challenge&&t.genes.challenge>=2),notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_unlocked_title")}`])]},blackhole:{name:F("achieve_blackhole_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_blackhole_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_blackhole_name")}`])]},trade:{name:F("achieve_trade_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_trade_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_trade_name")}`])]},creator:{name:F("achieve_creator_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_creator_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_creator_name")}`])]},mass_extinction:{name:F("achieve_mass_extinction_name"),group:[{desc:()=>F("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 F("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:[F("wiki_perks_achievement_note",[`${F("achieve_mass_extinction_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_mass_extinction_name")}`])]},doomed:{name:F("achieve_doomed_name"),desc:e=>F("achieve_perks_doomed"),active:()=>t.stats.portals>=1,notes:[F("wiki_perks_achievement_note",[`${F("achieve_doomed_name")}`])]},explorer:{name:F("achieve_explorer_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_explorer_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_explorer_name")}`])]},miners_dream:{name:F("achieve_miners_dream_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_miners_dream_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_miners_dream_name")}`])]},extinct_junker:{name:F("achieve_extinct_junker_name"),desc:()=>F("achieve_perks_enlightened"),active:()=>!!(t.stats.achieve.extinct_junker&&t.stats.achieve.extinct_junker.l>=1),notes:[F("wiki_perks_achievement_note",[`${F("achieve_extinct_junker_name")}`])]},joyless:{name:F("achieve_joyless_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_joyless_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_joyless_name")}`])]},steelen:{name:F("achieve_steelen_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_steelen_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_steelen_name")}`])]},wheelbarrow:{name:F("achieve_wheelbarrow_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_wheelbarrow_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_wheelbarrow_name")}`])]},extinct_sludge:{name:F("achieve_extinct_sludge_name"),group:[{desc:e=>F("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.l:3,F("universe_standard")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.l>=1)},{desc:e=>F("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.h:3,F("universe_heavy")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.h>=1)},{desc:e=>F("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.a:3,F("universe_antimatter")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.a>=1)},{desc:e=>F("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.e:3,F("universe_evil")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.e>=1)},{desc:e=>F("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.m:3,F("universe_micro")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.m>=1)},{desc:e=>F("achieve_perks_extinct_sludge",[e?"3/6/9/12/15":t.stats.achieve.extinct_sludge?3*t.stats.achieve.extinct_sludge.mg:3,F("universe_magic")]),active:()=>!!(t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge.mg>=1)}],notes:[F("wiki_perks_achievement_note",[`${F("achieve_extinct_sludge_name")}`]),F("wiki_perks_achievement_note_universe_scale",[`${F("achieve_extinct_sludge_name")}`])]},whitehole:{name:F("achieve_whitehole_name"),group:[{desc:()=>F("achieve_perks_whitehole"),active:()=>!!t.stats.achieve.whitehole},{desc:e=>F("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=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_whitehole_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_whitehole_name")}`])]},heavyweight:{name:F("achieve_heavyweight_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_heavyweight_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_heavyweight_name")}`])]},dissipated:{name:F("achieve_dissipated_name"),group:[{desc:()=>F("achieve_perks_dissipated1",[1]),active:()=>!!(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=1)},{desc:e=>F("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:()=>F("achieve_perks_dissipated3",[1]),active:()=>!!(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=2)},{desc:()=>F("achieve_perks_dissipated4",[1]),active:()=>!!(t.stats.achieve.dissipated&&t.stats.achieve.dissipated.l>=4)}],notes:[F("wiki_perks_achievement_note",[`${F("achieve_dissipated_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_dissipated_name")}`])]},banana:{name:F("achieve_banana_name"),group:[{desc:()=>F("achieve_perks_banana1",[50]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=1)},{desc:()=>F("achieve_perks_banana2",[1]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=2)},{desc:()=>F("achieve_perks_banana3",[10]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=3)},{desc:()=>F("achieve_perks_banana4",[3]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=4)},{desc:()=>F("achieve_perks_banana5",[.01]),active:()=>!!(t.stats.achieve.banana&&t.stats.achieve.banana.l>=5)}],notes:[F("wiki_perks_achievement_note",[`${F("achieve_banana_name")}`]),F("wiki_perks_achievement_note_task",[`${F("achieve_banana_name")}`]),F("wiki_perks_achievement_note_task_num",[1,`${F("wiki_achieve_banana1")}`]),F("wiki_perks_achievement_note_task_num",[2,`${F("wiki_achieve_banana2")}`]),F("wiki_perks_achievement_note_task_num",[3,`${F("wiki_achieve_banana3")}`]),F("wiki_perks_achievement_note_task_num",[4,`${F("wiki_achieve_banana4",[500])}`]),F("wiki_perks_achievement_note_task_num",[5,`${F("wiki_achieve_banana5",[50])}`])]},anarchist:{name:F("achieve_anarchist_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_anarchist_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_anarchist_name")}`])]},ascended:{name:F("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:()=>F("achieve_perks_ascended2",[Os()]),active:()=>!!(t.stats.achieve.ascended&&t.stats.achieve.ascended[qn()]>=1)}],notes:[F("wiki_perks_achievement_note",[`${F("achieve_ascended_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_ascended_name")}`]),F("wiki_perks_achievement_note_universe",[`${F("achieve_ascended_name")}`])]},technophobe:{name:F("achieve_technophobe_name"),group:[{desc:()=>F("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 F("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 F(e||a>1?"achieve_perks_technophobe3a":"achieve_perks_technophobe3",[a])},active:()=>!!(t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=3)},{desc:()=>F("achieve_perks_technophobe4",[10]),active:()=>!!(t.stats.achieve.technophobe&&t.stats.achieve.technophobe.l>=5)},{desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_technophobe_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_technophobe_name")}`]),F("wiki_perks_achievement_note_universe",[`${F("achieve_technophobe_name")}`])]},iron_will:{name:F("achieve_iron_will_name"),group:[{desc:()=>F("achieve_perks_iron_will1",[.15]),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=1)},{desc:()=>F("achieve_perks_iron_will2",[10]),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=2)},{desc:()=>F("achieve_perks_iron_will3",[6]),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=3)},{desc:()=>F("achieve_perks_iron_will4",[1]),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=4)},{desc:()=>F("achieve_perks_iron_will5"),active:()=>!!(t.stats.achieve.iron_will&&t.stats.achieve.iron_will.l>=5)}],notes:[F("wiki_perks_achievement_note",[`${F("achieve_iron_will_name")}`]),F("wiki_perks_achievement_note_ironwill",[`${F("evo_challenge_cataclysm")}`]),F("wiki_perks_achievement_note_ironwill2",[1,`${F("space_red_ziggurat_title")}`]),F("wiki_perks_achievement_note_ironwill3",[2,`${F("tech_elerium_mining")}`]),F("wiki_perks_achievement_note_ironwill3",[3,`${F("tech_lasers")}`]),F("wiki_perks_achievement_note_ironwill3",[4,`${F("tech_generational_ship")}`]),F("wiki_perks_achievement_note_ironwill4",[5,`${F("wiki_resets_bioseed")}`])]},failed_history:{name:F("achieve_failed_history_name"),desc:()=>F("achieve_perks_failed_history",[2]),active:()=>!!(t.stats.achieve.failed_history&&t.stats.achieve.failed_history.l>=5),notes:[F("wiki_perks_achievement_note",[`${F("achieve_failed_history_name")}`]),F("wiki_perks_achievement_note_failed_history",[`${F("evo_challenge_cataclysm")}`])]},lamentis:{name:F("achieve_lamentis_name"),group:[{desc:()=>F("achieve_perks_lamentis1",["10%"]),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=1)},{desc:()=>F("achieve_perks_lamentis2",["10%"]),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=2)},{desc:()=>F("achieve_perks_lamentis3",["10%"]),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=3)},{desc:()=>F("achieve_perks_lamentis4"),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=4)},{desc:()=>F("achieve_perks_lamentis5"),active:()=>!!(t.stats.achieve.lamentis&&t.stats.achieve.lamentis.l>=5)}],notes:[F("wiki_perks_achievement_note",[`${F("achieve_lamentis_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_lamentis_name")}`])]},soul_sponge:{name:F("achieve_soul_sponge_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_soul_sponge_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_soul_sponge_name")}`])]},nightmare:{name:F("achieve_nightmare_name"),desc:()=>F("achieve_perks_nightmare"),active:()=>!!(t.stats.achieve.nightmare&&t.stats.achieve.nightmare.mg>=1),notes:[F("wiki_perks_achievement_note",[`${F("achieve_nightmare_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_nightmare_name")}`])]},gladiator:{name:F("achieve_gladiator_name"),desc:e=>F("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:[F("wiki_perks_achievement_note",[`${F("achieve_gladiator_name")}`]),F("wiki_perks_achievement_note_scale",[`${F("achieve_gladiator_name")}`])]},pathfinder:{name:F("achieve_pathfinder_name"),group:[{desc:()=>F("achieve_perks_pathfinder1",[10]),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=1)},{desc:()=>F("achieve_perks_pathfinder2",[10]),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=2)},{desc:()=>F("achieve_perks_pathfinder3"),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=3)},{desc:()=>F("achieve_perks_pathfinder4"),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=4)},{desc:()=>F("achieve_perks_pathfinder5"),active:()=>!!(t.stats.achieve.pathfinder&&t.stats.achieve.pathfinder.l>=5)}],notes:[F("wiki_perks_achievement_note",[`${F("achieve_pathfinder_name")}`]),F("wiki_perks_achievement_note_pathfinder",[`${F("evo_challenge_truepath")}`]),F("wiki_perks_achievement_note_pathfinder_reset",[`${F("wiki_resets_mad")}`]),F("wiki_perks_achievement_note_pathfinder_reset",[`${F("wiki_resets_bioseed")}`]),F("wiki_perks_achievement_note_pathfinder_reset",[`${F("wiki_resets_ai")}`]),F("wiki_perks_achievement_note_pathfinder_reset",[`${F("wiki_resets_matrix")}`]),F("wiki_perks_achievement_note_pathfinder_reset",[`${F("wiki_resets_retired")}`])]},overlord:{name:F("achieve_overlord_name"),desc(){let e=`
                                ${F("achieve_perks_overlord1",[10])}
                                `;return e+=`
                                ${F("achieve_perks_overlord2")}
                                `,e+=`
                                ${F("achieve_perks_overlord3")}
                                `,e+=`
                                ${F("achieve_perks_overlord4")}
                                `,e},active:()=>!!(t.stats.achieve.overlord&&t.stats.achieve.overlord.l>=5),notes:[F("wiki_perks_achievement_note",[`${F("achieve_overlord_name")}`])]},adam_eve:{name:F("achieve_adam_eve_name"),desc:()=>F("achieve_perks_adam_eve"),active:()=>!!(t.stats.achieve.adam_eve&&t.stats.achieve.adam_eve.l>=5),notes:[]},creep:{name:F("wiki_arpa_crispr_creep"),desc:e=>F("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:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_genetic_memory_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_animus_title")}`,`${F("arpa_genepool_divine_remembrance_title")}`,`${F("arpa_genepool_divine_proportion_title")}`,`${F("arpa_genepool_genetic_repository_title")}`].join(", ")])]},store:{name:F("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 F(t.genes.store&&t.genes.store>=4?"arpa_perks_store2":"arpa_perks_store1",[a])},active:()=>!!t.genes.store,notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_spatial_reasoning_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_spatial_superiority_title")}`,`${F("arpa_genepool_spatial_supremacy_title")}`,`${F("arpa_genepool_dimensional_warping_title")}`].join(", ")])]},evolve:{name:F("wiki_arpa_crispr_evolve"),group:[{desc:()=>F("arpa_perks_evolve"),active:()=>!!t.genes.evolve},{desc:()=>F("arpa_genepool_recombination_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=2)},{desc:()=>F("arpa_genepool_homologous_recombination_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=3)},{desc:()=>F("arpa_genepool_genetic_reshuffling_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=4)},{desc:()=>F("arpa_genepool_recombinant_dna_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=5)},{desc:()=>F("arpa_genepool_chimeric_dna_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=6)},{desc:()=>F("arpa_genepool_molecular_cloning_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=7)},{desc:()=>F("arpa_genepool_transgenes_desc"),active:()=>!!(t.genes.evolve&&t.genes.evolve>=8)}],notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_morphogenesis_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_recombination_title")}`,`${F("arpa_genepool_homologous_recombination_title")}`,`${F("arpa_genepool_genetic_reshuffling_title")}`,`${F("arpa_genepool_recombinant_dna_title")}`,`${F("arpa_genepool_chimeric_dna_title")}`,`${F("arpa_genepool_molecular_cloning_title")}`,`${F("arpa_genepool_transgenes_title")}`].join(", ")])]},birth:{name:F("wiki_arpa_crispr_birth"),desc:()=>F("arpa_perks_birth"),active:()=>!!t.genes.birth,notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_replication_title")}`])]},enhance:{name:F("wiki_arpa_crispr_enhance"),desc:()=>F("arpa_perks_enhance"),active:()=>!!t.genes.enhance,notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_enhanced_muscle_fiber_title")}`])]},crafty:{name:F("wiki_arpa_crispr_crafty"),group:[{desc:()=>F("arpa_genepool_artificer_desc"),active:()=>!!t.genes.crafty},{desc:e=>F("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:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_artificer_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_detail_oriented_title")}`,`${F("arpa_genepool_rigorous_title")}`].join(", ")])]},governor:{name:F("wiki_arpa_crispr_governor"),desc:()=>F("arpa_perks_governor"),active:()=>!!t.genes.governor,notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_governance_title")}`])]},synthesis:{name:F("wiki_arpa_crispr_synthesis"),desc:e=>F("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:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_synthesis_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_karyokinesis_title")}`,`${F("arpa_genepool_cytokinesis_title")}`].join(", ")])]},challenge:{name:F("wiki_arpa_crispr_challenge"),group:[{desc:()=>F("arpa_perks_challenge"),active:()=>!!t.genes.challenge},{desc:()=>F("arpa_genepool_unlocked_desc"),active:()=>!!(t.genes.challenge&&t.genes.challenge>=2)},{desc:e=>F("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:()=>F("arpa_perks_challenge3"),active:()=>!!(t.genes.challenge&&t.genes.challenge>=5)}],notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_hardened_genes_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_unlocked_title")}`,`${F("arpa_genepool_universal_title")}`,`${F("arpa_genepool_standard_title")}`,`${F("arpa_genepool_mastered_title")}`].join(", ")]),F("wiki_perks_crispr_note_challenge",[F("arpa_genepool_universal_title"),F("arpa_genepool_standard_title")])]},ancients:{name:F("wiki_arpa_crispr_ancients"),group:[{desc:()=>F("arpa_perks_ancients"),active:()=>!!t.genes.ancients},{desc:()=>t.genes.ancients&&t.genes.ancients>=4?F("arpa_perks_ancients3"):F("arpa_perks_ancients2"),active:()=>!!(t.genes.ancients&&t.genes.ancients>=2)},{desc:e=>F("arpa_perks_ancients4",[e?"25/50":t.genes.ancients&&t.genes.ancients>=5?50:25]),active:()=>!!(t.genes.ancients&&t.genes.ancients>=3)}],notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_ancients_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_faith_title")}`,`${F("arpa_genepool_devotion_title")}`,`${F("arpa_genepool_acolyte_title")}`,`${F("arpa_genepool_conviction_title")}`].join(", ")])]},trader:{name:F("wiki_arpa_crispr_trader"),desc:()=>F("arpa_genepool_negotiator_desc"),active:()=>!!t.genes.trader,notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_negotiator_title")}`])]},transcendence:{name:F("wiki_arpa_crispr_transcendence"),desc:()=>F("arpa_genepool_transcendence_desc"),active:()=>!!t.genes.transcendence,notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_transcendence_title")}`])]},queue:{name:F("wiki_arpa_crispr_queue"),group:[{desc:()=>F("arpa_genepool_geographer_desc"),active:()=>!!t.genes.queue},{desc:()=>F("arpa_genepool_architect_desc"),active:()=>!!(t.genes.queue&&t.genes.queue>=2)}],notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_geographer_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_architect_title")}`].join(", ")])]},plasma:{name:F("wiki_arpa_crispr_plasma"),desc:e=>F("arpa_genepool_mitosis_desc",[e?"3/5":t.genes.plasma>=2?5:3]),active:()=>!!t.genes.plasma,notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_mitosis_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_metaphase_title")}`].join(", ")])]},mutation:{name:F("wiki_arpa_crispr_mutation"),group:[{desc:()=>t.genes.mutation&&t.genes.mutation>1?F("arpa_perks_mutation2"):F("arpa_perks_mutation1"),active:()=>!!t.genes.mutation},{desc:()=>F("arpa_perks_mutation3"),active:()=>!!(t.genes.mutation&&t.genes.mutation>=3)}],notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_mutation_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_transformation_title")}`,`${F("arpa_genepool_metamorphosis_title")}`].join(", ")])]},bleed:{name:F("wiki_arpa_crispr_bleed"),group:[{desc:()=>F("arpa_genepool_bleeding_effect_desc",[2.5]),active:()=>!!t.genes.bleed},{desc:()=>F("arpa_genepool_synchronicity_desc",[25]),active:()=>!!(t.genes.bleed&&t.genes.bleed>=2)},{desc:()=>F("arpa_genepool_astral_awareness_desc"),active:()=>!!(t.genes.bleed&&t.genes.bleed>=3)}],notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_bleeding_effect_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_synchronicity_title")}`,`${F("arpa_genepool_astral_awareness_title")}`].join(", ")]),F("wiki_perks_crispr_note_bleed",[`${F("arpa_genepool_bleeding_effect_title")}`])]},blood:{name:F("wiki_arpa_crispr_blood"),group:[{desc:()=>F("arpa_genepool_blood_remembrance_desc"),active:()=>!!t.genes.blood},{desc:()=>F("arpa_genepool_blood_sacrifice_desc"),active:()=>!!(t.genes.blood&&t.genes.blood>=2)},{desc:()=>F("arpa_genepool_essence_absorber_desc"),active:()=>!!(t.genes.blood&&t.genes.blood>=3)}],notes:[F("wiki_perks_crispr_note",[`${F("arpa_genepool_blood_remembrance_title")}`]),F("wiki_perks_crispr_note_upgrade",[[`${F("arpa_genepool_blood_sacrifice_title")}`,`${F("arpa_genepool_essence_absorber_title")}`].join(", ")]),F("wiki_perks_crispr_note_blood",[F("arpa_genepool_blood_remembrance_title")])]},spire:{name:F("wiki_arpa_blood_spire"),group:[{desc:()=>F("arpa_blood_purify_desc"),active:()=>!!t.blood.spire},{desc:()=>F("arpa_blood_chum_desc"),active:()=>!!(t.blood.spire&&t.blood.spire>=2)}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_purify_title")}`]),F("wiki_perks_blood_note_upgrade",[[`${F("arpa_blood_chum_title")}`].join(", ")])]},lust:{name:F("wiki_arpa_blood_lust"),group:[{desc:e=>F("arpa_perks_lust",[e?.2:.2*(t.blood.lust?t.blood.lust:1)]),active:()=>!!t.blood.lust}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_lust_title")}`]),F("wiki_perks_blood_note_repeat",[F("arpa_blood_lust_title")])]},illuminate:{name:F("wiki_arpa_blood_illuminate"),group:[{desc:e=>F("arpa_perks_illuminate",[e?.01:.01*(t.blood.illuminate?t.blood.illuminate:1)]),active:()=>!!t.blood.illuminate}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_illuminate_title")}`]),F("wiki_perks_blood_note_repeat",[F("arpa_blood_illuminate_title")])]},greed:{name:F("wiki_arpa_blood_greed"),group:[{desc:e=>F("arpa_perks_greed",[e?1:1*(t.blood.greed?t.blood.greed:1)]),active:()=>!!t.blood.greed}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_greed_title")}`]),F("wiki_perks_blood_note_repeat",[F("arpa_blood_greed_title")])]},hoarder:{name:F("wiki_arpa_blood_hoarder"),group:[{desc:e=>F("arpa_perks_hoarder",[e?1:1*(t.blood.hoarder?t.blood.hoarder:1)]),active:()=>!!t.blood.hoarder}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_hoarder_title")}`]),F("wiki_perks_blood_note_repeat",[F("arpa_blood_hoarder_title")])]},artisan:{name:F("wiki_arpa_blood_artisan"),group:[{desc:e=>F("arpa_perks_artisan",[e?1:1*(t.blood.artisan?t.blood.artisan:1)]),active:()=>!!t.blood.artisan}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_artisan_title")}`]),F("wiki_perks_blood_note_repeat",[F("arpa_blood_artisan_title")])]},attract:{name:F("wiki_arpa_blood_attract"),group:[{desc:e=>F("arpa_perks_attract",[e?5:5*(t.blood.attract?t.blood.attract:1)]),active:()=>!!t.blood.attract}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_attract_title")}`]),F("wiki_perks_blood_note_repeat",[F("arpa_blood_attract_title")])]},wrath:{name:F("wiki_arpa_blood_wrath"),group:[{desc:e=>F("arpa_perks_wrath",[e?5:5*(t.blood.wrath?t.blood.wrath:1)]),active:()=>!!t.blood.wrath}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_wrath_title")}`]),F("wiki_perks_blood_note_repeat",[F("arpa_blood_wrath_title")])]},prepared:{name:F("wiki_arpa_blood_prepared"),group:[{desc:()=>F("arpa_blood_prepared_desc"),active:()=>!!t.blood.prepared},{desc:()=>F("arpa_blood_compact_desc"),active:()=>!!(t.blood.prepared&&t.blood.prepared>=2)}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_prepared_title")}`]),F("wiki_perks_blood_note_upgrade",[[`${F("arpa_blood_compact_title")}`].join(", ")])]},unbound:{name:F("wiki_arpa_blood_unbound"),group:[{desc:()=>F("arpa_blood_unbound_desc"),active:()=>!!t.blood.unbound},{desc:()=>F("arpa_blood_shadow_war_desc"),active:()=>!!(t.blood.unbound&&t.blood.unbound>=3)},{desc:e=>F("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:[F("wiki_perks_blood_note",[`${F("arpa_blood_unbound_title")}`]),F("wiki_perks_blood_note_upgrade",[[`${F("arpa_blood_unbound_resistance_title")}`,`${F("arpa_blood_shadow_war_title")}`,`${F("arpa_blood_unbound_immunity_title")}`].join(", ")])]},aware:{name:F("wiki_arpa_blood_aware"),group:[{desc:()=>F("arpa_blood_blood_aware_desc"),active:()=>!!t.blood.aware}],notes:[F("wiki_perks_blood_note",[`${F("arpa_blood_blood_aware_title")}`])]},harmonic:{name:F("harmonic"),group:[{desc(e){let t=Ds();return F("perks_harmonic",[e?`1-${Object.keys(Di).length+2}`:+(100*(t[0]-1)).toFixed(0),e?"2-"+2*(Object.keys(Di).length+2):+(100*(t[1]-1)).toFixed(0)])},active(){let e=Ds();return!!(t.pillars&&e[0]>1)}},{desc:e=>(Ds(),F("perks_harmonic2",[F("portal_west_tower"),F("portal_east_tower"),e?"12-"+12*(Object.keys(Di).length-1):12*Object.keys(t.pillars).length])),active(){let e=Ds();return!!(t.pillars&&e[0]>1)}}],notes:[F("wiki_perks_harmonic_note1"),F("wiki_perks_harmonic_note2")]},novice:{name:F("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`
                                ${F("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])}
                                ${F("achieve_perks_novice2")}
                                `},active:()=>!!(t.stats.feat.novice&&t.stats.mad>0),notes:[F("wiki_perks_progress_note1",[10,F("wiki_resets_mad")]),F("wiki_perks_progress_note2")]},journeyman:{name:F("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?`
                                ${F("achieve_perks_journeyman2",[e?"1/2/3":a>=3?a>=5?3:2:1,e?"1/2":a>=4?2:1])}
                                ${F("achieve_perks_journeyman3")}
                                `:`
                                ${F("achieve_perks_journeyman1",[1])}
                                ${F("achieve_perks_journeyman3")}
                                `},active:()=>!!(t.stats.feat.journeyman&&t.stats.bioseed>0),notes:[F("wiki_perks_progress_note1",[25,F("wiki_resets_bioseed")]),F("wiki_perks_progress_note2")]},adept:{name:F("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 F("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:[F("wiki_perks_progress_note1",[50,F("wiki_resets_blackhole")]),F("wiki_perks_progress_note2")]},master:{name:F("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 F("achieve_perks_master",[e?"1/2/3/4/5":a,e?"2/4/6/8/10":2*a,F("evo_mitochondria_title"),F("evo_eukaryotic_title"),F("evo_membrane_title"),F("evo_organelles_title"),F("evo_nucleus_title")])},active:()=>!!(t.stats.feat.master&&t.stats.achieve.ascended&&t.stats.achieve.ascended.l>0),notes:[F("wiki_perks_progress_note1",[75,F("wiki_resets_ascension")]),F("wiki_perks_progress_note2")]},grandmaster:{name:F("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 F("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:[F("wiki_perks_progress_note1",[100,F("wiki_resets_infusion")]),F("wiki_perks_progress_note2")]}};function In(){Cs($("#perksPanel"));let e=$("#perksPanel"),t=!1;Object.keys(An).forEach((function(a){if(An[a].hasOwnProperty("group")){let r=!1,i=$(`
                                ${An[a].name}
                                `);An[a].group.forEach((function(e){e.active()&&(r=!0,i.append($(`
                                ${e.desc()}
                                `)))})),r&&(t=!0,e.append(i))}else An[a].active()&&(t=!0,e.append($(`
                                ${An[a].name}${An[a].desc()}
                                `)))})),t||e.append($(`
                                ${F("perks_none")}
                                `))}function Tn(e,t,a){if(!t.hasOwnProperty("name"))return;if(!t.hasOwnProperty("template"))return;t.hasOwnProperty("paragraphs")||(t.paragraphs=0),t.hasOwnProperty("text")||(t.text={}),t.hasOwnProperty("rawtext")||(t.rawtext={}),t.hasOwnProperty("para_data")||(t.para_data={}),t.hasOwnProperty("data_color")||(t.data_color={}),t.hasOwnProperty("data_link")||(t.data_link={}),t.hasOwnProperty("h_level")||(t.h_level=3),t.hasOwnProperty("header")||(t.header=!1),t.hasOwnProperty("full")||(t.full=!1),t.hasOwnProperty("break")||(t.break=!1),t.hasOwnProperty("default_color")||(t.default_color="warning"),t.hasOwnProperty("examples")||(t.examples=!1);let r=!1;a?r=a:(r=$(`
                                `),t.h_level&&r.append(`${t.label?t.label:F(`wiki_${t.template}_${t.name}`)}`));let i=[{s:1,e:t.break?t.break[0]-1:t.paragraphs}];if(t.break)for(let e=0;e');for(let r=e.s;r<=e.e;r++)if((t.text[r]||t.rawtext[r]||t.para_data[r])&&Array.isArray(t.para_data[r])){let e=t.para_data[r];if(t.data_link[r]&&Array.isArray(t.data_link[r]))for(let a=0;a${e[a]}`);let i=t.data_color[r]&&Array.isArray(t.data_color[r])?t.data_color[r]:t.para_data[r].map((e=>t.default_color));for(let t=0;t${e[t]}`);let s=t.rawtext[r]?t.rawtext[r]:F(t.text[r]?t.text[r]:`wiki_${t.template}_${t.name}_para${r}`,e);a.append(`${s}`)}else{let e=t.rawtext[r]?t.rawtext[r]:F(t.text[r]?t.text[r]:`wiki_${t.template}_${t.name}_para${r}`);a.append(`${e}`)}r.append(a)})),t.examples&&(r.append($(`
                                ${F("wiki_examples")}
                                `)),t.examples.forEach((function(e){r.append($(`
                                - ${e}
                                `))}))),a||e.append(r),r}function Ln(e,a,r,i){let s="string"==typeof a.title?a.title:a.title();if(r)e.append(`

                                ${s}

                                ${r}
                                `);else if(i)e.append(`

                                ${s}

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

                                ${s}

                                ${r?`${F("wiki_arpa_purchased")}`:""}${F(`wiki_tech_tree_${a.grant[0]}`)}: ${a.grant[1]}
                                `)}let n="string"==typeof a.desc?a.desc:a.desc(!0);n!==s&&e.append(`
                                ${n}
                                `);let c=$('
                                '),o=!1;if(a.hasOwnProperty("effect")){if(i){let e="string"==typeof a.effect&&a.effect;!1!==e?c.append(`
                                ${e}
                                `):c.append('
                                '),o=!0}else{let e="string"==typeof a.effect?a.effect:a.effect(!0);!1!==e&&(c.append(`
                                ${e}
                                `),o=!0)}e.append(c)}if(a.hasOwnProperty("cost")){let r=Rs(a,!0),s=o?$(`
                                `):$(`
                                `),n="";i&&(s.append($(`

                                ${F("wiki_calc_cost")}

                                `)),n=$(`

                                ${F("wiki_calc_cost_creep")}

                                `));let l=!1,_=function(e,t,a,r,c){i?(s.append($(`
                                ${a}{{ r.${e}.cost }}
                                `)),n.append($(`
                                {{ r.${e}.creep }}
                                `)),l=!0):t>0&&(s.append($(`
                                ${a}${q(t,1)}
                                `)),l=!0)},d="has-text-success";Object.keys(r).forEach((function(e){if("Structs"===e){let t=r[e]();Object.keys(t).forEach((function(e){Object.keys(t[e]).forEach((function(a){let r=t[e][a].hasOwnProperty("on")?t[e][a].on:t[e][a].count,c="";if(t[e][a].hasOwnProperty("s")){let r=t[e][a].s;c="string"==typeof Sr[e][r][a].title?Sr[e][r][a].title:Sr[e][r][a].title()}else c="string"==typeof Sr[e][a].title?Sr[e][a].title:Sr[e][a].title();s.append($(`
                                ${c}: ${r}
                                `)),i&&n.append($(`
                                ${F("wiki_calc_none")}
                                `)),l=!0}))}))}else if(["Plasmid","Phage","Dark","Harmony","AICore","Artifact","Blood_Stone","AntiPlasmid"].includes(e)){let a=e;"Plasmid"===e&&"antimatter"===t.race.universe&&(a="AntiPlasmid"),_(e,r[e](),F(`resource_${a}_name`)+": ",d)}else if("Supply"===e)_(e,r[e](),F(`resource_${e}_name`)+": ",d);else if("Custom"===e)s.append($(`
                                ${r[e]().label}
                                `)),l=!0;else if("Morale"!==e&&"Army"!==e&&"Bool"!==e){let a="Species"===e?t.race.species:e,i="Money"===a?"$":("HellArmy"===e?F("fortress_troops"):t.resource[a].name)+": ";i=i.replace("_"," "),_(e,r[e](),i,d)}})),l&&(a.hasOwnProperty("effect")||e.append(c),c.append(s),i&&c.append(n))}}function En(e,t,a,r){if("create"===e){let e=t?"string"==typeof t?$(`#${t}`):t:$("#content");Cs(e),e.addClass("flex");let a=$('
                                '),r=$('
                                '),i=$("
                                  ");return e.append(a),e.append(r),r.append(i),a}{let e=$(`${r}`),s=$("
                                • ");s.append(e),$("#sideContent ul").append(s),i=a,e.click((function(){window.location.hash=`#${i}`,document.getElementById(i).scrollIntoView({block:"start",behavior:"smooth"})}))}var i}function Kn(e,t,a,r){En(e,t,a,"ᄂ"+r)}function Dn(e){return["moon","belt"].includes(e)?F("space_"+e+"_info_name"):["kuiper"].includes(e)?F("space_"+e+"_title"):Vt()[e]}function Bn(e,t,a,r){let i=$("
                                  ");e.append(i),i.append(`{{ vis | label }}`);let s=$(``);i.append(s);let n=document.getElementById(t+a+"Section"),c={vis:!1};return zs({el:`#${t}${a}Button`,data:c,methods:{show(){"block"===n.style.display?(n.style.display="none",c.vis=!1):(n.style.display="block",c.vis=!0)}},filters:{label:e=>F(e?"wiki_reveal_hide":"wiki_reveal_show",[r])}}),s}function Gn(e,t,a,r){r=r||F("wiki_calc_insert_"+a);let i=$("
                                  ");e.append(i),i.append(`{{ vis | label }}`);let s=$(``);i.append(s);let n=document.getElementById(t+a+"Section"),c={vis:!1};return zs({el:`#${t}${a}Button`,data:c,methods:{show(){"block"===n.style.display?(n.style.display="none",c.vis=!1):(n.style.display="block",c.vis=!0)}},filters:{label:e=>F(e?"wiki_calc_hide":"wiki_calc_show",[r])}}),s}function Nn(e){let t=$('
                                  '),a=(r=e,(i={name:"planet",template:"planet",paragraphs:4,full:!0,para_data:{2:[365,"25%"],3:[4],4:["200-600"]}}).hasOwnProperty("h_level")||(i.h_level=2),i.header=!0,Tn(r,i,undefined));var r,i;Tn(e,{name:"geology",template:"planet",label:F("wiki_menu_planets"),paragraphs:4,h_level:2,para_data:{2:[2],3:["-10%","+19%"],4:[7,"+44%"]}},a);let s=Hn(ss,$(`

                                  ${F("wiki_planet_biome")}

                                  `)),n=Hn(ns,$(`

                                  ${F("wiki_planet_trait")}

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

                                  ${r.label}

                                  `),i.append(`
                                  ${r.desc}
                                  `);let s=$('
                                  ');if(r.vars&&r.wiki)for(let e=0;e${F(`wiki_planet_${a}${e}`,[Un(r.vars()[e],t)])}
                                  `))}i.append(s),Rn[a]&&Rn[a].forEach((function(e){i.append($(`
                                  ${F(`wiki_planet_${a}_${e}`)}
                                  `))}))})),t}function Un(e,a){let r=e-1*("percent"===a||"inverted"===a?1:0);"inverted"!==a&&"inverted-decimal"!==a||(r*=-1,a="inverted"===a?"percent":"decimal");let i=(r>=0?"+":"")+r.toLocaleString(t.settings.locale,{style:a,maximumFractionDigits:2});return`${i}`}function Vn(e,a){let r=En("create");switch(e){case"prehistoric":!function(e,a){let r="truepath"===a?"tp_structures":"structures";Object.keys(Sr.evolution).forEach((function(i){if(Sr.evolution[i].hasOwnProperty("title")&&("custom"!==i||t.hasOwnProperty("custom"))&&(!Sr.evolution[i].hasOwnProperty("wiki")||Sr.evolution[i].wiki)){let t=Sr.evolution[i].id.split("-"),s=$(`
                                  `);e.append(s),Ln(s,Sr.evolution[i],!1,!0),Qn(s,"prehistoric",i),ec(s,i,"prehistoric",!1,a),En("add",`prehistoric-${r}`,t[1],"function"==typeof Sr.evolution[i].title?Sr.evolution[i].title():Sr.evolution[i].title)}}))}(r,a);break;case"planetary":!function(e,t){let a="truepath"===t?"tp_structures":"structures";Object.keys(Sr.city).forEach((function(r){if((!Sr.city[r].hasOwnProperty("wiki")||Sr.city[r].wiki)&&(!Sr.city[r].hasOwnProperty("path")||Sr.city[r].path.includes(t))){let i=Sr.city[r].id.split("-"),s=$(`
                                  `);e.append(s),Ln(s,Sr.city[r],!1,!0),Qn(s,"planetary",r),ec(s,r,"planetary",!1,t),En("add",`planetary-${a}`,i[1],"function"==typeof Sr.city[r].title?Sr.city[r].title():Sr.city[r].title)}}))}(r,a);break;case"space":!function(e,t){let a="truepath"===t?"tp_structures":"structures";Object.keys(Sr.space).forEach((function(r){let i="string"==typeof Sr.space[r].info.name?Sr.space[r].info.name:Sr.space[r].info.name(),s="string"==typeof Sr.space[r].info.desc?Sr.space[r].info.desc:Sr.space[r].info.desc();Object.keys(Sr.space[r]).forEach((function(n){if("info"!==n&&(!Sr.space[r][n].hasOwnProperty("wiki")||Sr.space[r][n].wiki)&&(!Sr.space[r][n].hasOwnProperty("path")||Sr.space[r][n].path.includes(t))){let c=Sr.space[r][n].id.split("-"),o=$(`
                                  `);e.append(o),Ln(o,Sr.space[r][n],`${i}`,!0),Qn(o,"space",n),ec(o,n,"space",r,t),En("add",`space-${a}`,c[1],"function"==typeof Sr.space[r][n].title?Sr.space[r][n].title():Sr.space[r][n].title),_s(`pop${Sr.space[r][n].id}`,$(`
                                  ${s}
                                  `))}}))})),Object.keys(Sr.starDock).forEach((function(r){if("info"!==r&&(!Sr.starDock[r].hasOwnProperty("wiki")||Sr.starDock[r].wiki)&&(!Sr.starDock[r].hasOwnProperty("path")||Sr.starDock[r].path.includes(t))){let i=Sr.starDock[r].id.split("-"),s=$(`
                                  `);e.append(s),Ln(s,Sr.starDock[r],`${F("space_gas_star_dock_title")}`,!0),Qn(s,"starDock",r),ec(s,r,"starDock",!1,t),En("add",`space-${a}`,i[1],"function"==typeof Sr.starDock[r].title?Sr.starDock[r].title():Sr.starDock[r].title),_s(`pop${Sr.starDock[r].id}`,$(`
                                  ${F("space_gas_star_dock_wiki")}
                                  `))}}))}(r,a);break;case"interstellar":!function(e){Object.keys(Sr.interstellar).forEach((function(t){let a="string"==typeof Sr.interstellar[t].info.name?Sr.interstellar[t].info.name:Sr.interstellar[t].info.name(),r="string"==typeof Sr.interstellar[t].info.desc?Sr.interstellar[t].info.desc:Sr.interstellar[t].info.desc();Object.keys(Sr.interstellar[t]).forEach((function(i){if("info"!==i&&(!Sr.interstellar[t][i].hasOwnProperty("wiki")||Sr.interstellar[t][i].wiki)){let s=Sr.interstellar[t][i].id.split("-"),n=$(`
                                  `);e.append(n),Ln(n,Sr.interstellar[t][i],`${a}`,!0),Qn(n,"interstellar",i),ec(n,i,"interstellar",t),En("add","interstellar-structures",s[1],"function"==typeof Sr.interstellar[t][i].title?Sr.interstellar[t][i].title():Sr.interstellar[t][i].title),_s(`pop${Sr.interstellar[t][i].id}`,$(`
                                  ${r}
                                  `))}}))}))}(r);break;case"intergalactic":!function(e){Object.keys(Sr.galaxy).forEach((function(t){let a="string"==typeof Sr.galaxy[t].info.name?Sr.galaxy[t].info.name:Sr.galaxy[t].info.name(),r="string"==typeof Sr.galaxy[t].info.desc?Sr.galaxy[t].info.desc:Sr.galaxy[t].info.desc();Object.keys(Sr.galaxy[t]).forEach((function(i){if("info"!==i&&(!Sr.galaxy[t][i].hasOwnProperty("wiki")||Sr.galaxy[t][i].wiki)){let s=Sr.galaxy[t][i].id.split("-"),n=$(`
                                  `);e.append(n),Ln(n,Sr.galaxy[t][i],`${a}`,!0),Qn(n,"intergalactic",i),ec(n,i,"intergalactic",t),En("add","intergalactic-structures",s[1],"function"==typeof Sr.galaxy[t][i].title?Sr.galaxy[t][i].title():Sr.galaxy[t][i].title),_s(`pop${Sr.galaxy[t][i].id}`,$(`
                                  ${r}
                                  `))}}))}))}(r);break;case"hell":!function(e){Object.keys(Sr.portal).forEach((function(t){let a="string"==typeof Sr.portal[t].info.name?Sr.portal[t].info.name:Sr.portal[t].info.name(),r="string"==typeof Sr.portal[t].info.desc?Sr.portal[t].info.desc:Sr.portal[t].info.desc();Object.keys(Sr.portal[t]).forEach((function(i){if("info"!==i&&(!Sr.portal[t][i].hasOwnProperty("wiki")||Sr.portal[t][i].wiki)){let s=Sr.portal[t][i].id.split("-"),n=$(`
                                  `);e.append(n),Ln(n,Sr.portal[t][i],`${a}`,!0),Qn(n,"hell",i),ec(n,i,"hell",t),En("add","hell-structures",s[1],"function"==typeof Sr.portal[t][i].title?Sr.portal[t][i].title():Sr.portal[t][i].title),_s(`pop${Sr.portal[t][i].id}`,$(`
                                  ${r}
                                  `))}}))}))}(r);break;case"tauceti":!function(e){Object.keys(Sr.tauceti).forEach((function(t){let a="string"==typeof Sr.tauceti[t].info.name?Sr.tauceti[t].info.name:Sr.tauceti[t].info.name(),r="string"==typeof Sr.tauceti[t].info.desc?Sr.tauceti[t].info.desc:Sr.tauceti[t].info.desc();Object.keys(Sr.tauceti[t]).forEach((function(i){if("info"!==i&&(!Sr.tauceti[t][i].hasOwnProperty("wiki")||Sr.tauceti[t][i].wiki)){let s=Sr.tauceti[t][i].id.split("-"),n=$(`
                                  `);e.append(n),Ln(n,Sr.tauceti[t][i],`${a}`,!0),Qn(n,"tauceti",i),ec(n,i,"tauceti",t),En("add","tauceti-structures",s[1],"function"==typeof Sr.tauceti[t][i].title?Sr.tauceti[t][i].title():Sr.tauceti[t][i].title),_s(`pop${Sr.tauceti[t][i].id}`,$(`
                                  ${r}
                                  `))}}))}))}(r)}}const Wn={prehistoric:{},planetary:{slaughter:[F("wiki_structure_planetary_slaughter")]},space:{terraformer:[F("wiki_structure_space_terraformer")],terraform:[F("wiki_structure_space_terraformer")]},starDock:{geck:[F("wiki_structure_stardock_geck")]},interstellar:{},intergalactic:{},hell:{},tauceti:{}};function Qn(e,t,a){if(Wn[t].hasOwnProperty(a)){let r=$('
                                  ');e.append(r);for(let e=0;e${Wn[t][a][e]}`)}}const Jn={include:{prehistoric:["membrane","organelles","nucleus","eukaryotic_cell","mitochondria"]},exclude:{planetary:["food","lumber","stone","chrysotile","slaughter","slave_market",""],space:["test_launch","moon_mission","terraform","red_mission","hell_mission","sun_mission","gas_mission","gas_moon_mission","belt_mission","dwarf_mission","titan_mission","enceladus_mission","triton_mission","kuiper_mission","eris_mission","crashed_ship","digsite"],starDock:["prep_ship","launch_ship"],interstellar:["alpha_mission","proxima_mission","nebula_mission","neutron_mission","blackhole_mission","jump_ship","wormhole_mission","sirius_mission","sirius_b","ascend"],intergalactic:["gateway_mission","gorddon_mission","alien2_mission","chthonian_mission"],hell:["pit_mission","assault_forge","ruins_mission","gate_mission","lake_mission","spire_mission","bribe_sphinx","spire_survey","spire"],tauceti:["home_mission","dismantle","excavate","alien_outpost","red_mission","matrix","roid_mission","alien_station_survey","contact","introduce","subjugate","gas_contest","gas_contest2","ignite_gas_giant","jeff","goe_facility"]},excludeCreep:{planetary:["horseshoe"],space:["horseshoe"],hell:["ancient_pillars","sphinx","waygate"],tauceti:["horseshoe"]},max:{prehistoric:{},planetary:{s_alter:1},space:{star_dock:1,terraformer:100,world_collider:1859,shipyard:1,mass_relay:100,fob:1,ai_core:100,jump_gate:100},starDock:{seeder:100},interstellar:{dyson:100,dyson_sphere:100,orichalcum_sphere:100,stellar_engine:100,stargate:200,space_elevator:100,gravity_dome:100,ascension_machine:100},intergalactic:{embassy:1,consulate:1},hell:{soul_forge:1,vault:2,ancient_pillars:Object.keys(Di).length-1,west_tower:la(),east_tower:la(),bridge:10,sphinx:2,waygate:10},tauceti:{alien_outpost:1,jump_gate:100,ringworld:1e3,alien_station:100,matrioshka_brain:1e3,ignition_device:10}},count:{planetary:{horseshoe:t.race.shoecnt?t.race.shoecnt:0,assembly:t.resource[t.race.species]?t.resource[t.race.species].amount:0},space:{horseshoe:t.race.shoecnt?t.race.shoecnt:0,assembly:t.resource[t.race.species]?t.resource[t.race.species].amount:0},interstellar:{},intergalactic:{},hell:{ancient_pillars:Object.keys(t.pillars).length,sphinx:!t.tech.hell_spire||t.tech.hell_spire<7?0:7===t.tech.hell_spire?1:2,waygate:t.tech.waygate&&t.tech.waygate>=2?10:t.portal.waygate?t.portal.waygate.count:0},tauceti:{}},creepCalc:{planetary:{assembly:1e3},space:{assembly:1e3,swarm_satellite:200}}},Zn={mass_driver:{type:"field",min:0,import:()=>t.city.mass_driver?t.city.mass_driver.on:0}},Xn={fuelAdj:{inputs:["mass_driver"]}},Yn={terraformer:["truepath"]};function ec(e,a,r,i,s){let n=!(!Jn.max[r]||!Jn.max[r][a])&&Jn.max[r][a],c={owned:0,costVis:!1,creepVis:!1,extra:{truepath:"truepath"===s}},o={},l=!1;switch(r){case"prehistoric":l=Sr.evolution[a],c.real_owned=t.evolution[a]?t.evolution[a].count:0;break;case"planetary":l=Sr.city[a],c.real_owned=t.city[a]?t.city[a].count:0;break;case"space":l=Sr.space[i][a],c.real_owned=t.space[a]?t.space[a].count:0;break;case"starDock":l=Sr.starDock[a],c.real_owned=t.starDock[a]?t.starDock[a].count:0;break;case"interstellar":l=Sr.interstellar[i][a],c.real_owned=t.interstellar[a]?t.interstellar[a].count:0;break;case"intergalactic":l=Sr.galaxy[i][a],c.real_owned=t.galaxy[a]?t.galaxy[a].count:0;break;case"hell":l=Sr.portal[i][a],c.real_owned=t.portal[a]?t.portal[a].count:0;break;case"tauceti":l=Sr.tauceti[i][a],c.real_owned=t.tauceti[a]?t.tauceti[a].count:0}Jn.count[r]&&Jn.count[r][a]&&(c.real_owned=Jn.count[r][a]);let _=function(){if(l.hasOwnProperty("effect")&&"string"!=typeof l.effect){let e=$(".effect",`#${a}`);Cs(e);let t=c.owned-c.real_owned;Yn[a]&&(t={count:t},Yn[a].forEach((function(e){"truepath"===e&&(t[e]="truepath"===s)}))),e.append(l.effect(t))}};_();let d=l.cost;d&&Object.keys(Rs(l)).forEach((function(e){o[e]={},"space"!==r||"Oil"!==e&&"Helium_3"!==e||Xn.fuelAdj.inputs.forEach((function(e){var t;t=e,c.extra[t]=Zn[t].import()}))}));let p=function(){let e=!1;if(d){let t=Rs(l,c.owned-c.real_owned,c.extra);Object.keys(o).forEach((function(a){if("Custom"===a)o[a].vis=!0;else{let e=t[a]?t[a](c.owned-c.real_owned,c.extra):0;o[a].vis=e>0,o[a].cost=q(e,1)}e=e||o[a].vis}))}c.costVis=e};p(),(Jn.include[r]&&Jn.include[r].includes(a)||Jn.exclude[r]&&!Jn.exclude[r].includes(a))&&(function(){let e=!1;if(d&&!n&&(!Jn.excludeCreep[r]||!Jn.excludeCreep[r].includes(a))&&"prehistoric"!==r){let t=Jn.creepCalc[r]&&Jn.creepCalc[r][a]?Jn.creepCalc[r][a]:100,i=t-1,s=Rs(l,t,c.extra),n=Rs(l,i,c.extra);Object.keys(o).forEach((function(a){s[a]&&(o[a].creep=+(s[a](t,c.extra)/n[a](i,c.extra)).toFixed(5),1===o[a].creep?o[a].creep=F("wiki_calc_none"):o[a].creep<1.005&&(o[a].creep=1.005),e=e||o[a].vis)}))}c.creepVis=e}(),e.append($(`\n
                                  \n
                                  \n
                                  {{ | ownedLabel }} -+
                                  \n
                                  \n
                                  \n \n
                                  \n
                                  \n `))),zs({el:`#${a}`,data:{i:c,r:o},methods:{val(e){c[e]=Math.round(c[e]),c[e]&&c[e]<0?c[e]=0:n&&c[e]>n&&(c[e]=n),_(),p()},less(e){c[e]>0&&c[e]--},more(e){(!n||n&&c[e]=2,link:"wiki.html#discovery-tech-diplomacy"},{title:F("wiki_tech_special_trait",[F("trait_terrifying_name")]),color:!!t.race.terrifying,link:"wiki.html#traits-species-major_terrifying"}]}],socialist:[{category:"unique",subreqs:[{title:F("wiki_tech_special_tech",[F("tech_diplomacy")]),color:t.tech.trade&&t.tech.trade>=2,link:"wiki.html#discovery-tech-diplomacy"},{title:F("wiki_tech_special_trait",[F("trait_terrifying_name")]),color:!!t.race.terrifying,link:"wiki.html#traits-species-major_terrifying"}]}],federation:[{category:"unique",subreqs:[{title:F("wiki_tech_special_occupy"),color:oe(),link:"wiki.html#mechanics-gameplay-occupying"}]}],magocracy:[{category:"universe",subreqs:[{name:"magic"}]}],governor:[{category:"crispr",subreqs:[{name:"governance",tree:"governor",val:1}]},{category:"government",not:!0,subreqs:[{name:"anarchy"}]}],market:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],tax_rates:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],large_trades:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],corruption:[{category:"trait",not:!0,subreqs:[{name:"terrifying"},{name:"noble"}]}],massive_trades:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],trade:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],diplomacy:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],freight:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],wharf:[{category:"trait",not:!0,subreqs:[{name:"terrifying"},{name:"thalassophobia"}]}],reclaimer:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],iron_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],steel_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],titanium_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],alloy_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],mythril_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],adamantite_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],stone_axe:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],copper_axes:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],iron_saw:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],steel_saw:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],iron_axes:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],steel_axes:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],titanium_axes:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],chainsaws:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],copper_sledgehammer:[{category:"trait",not:!0,subreqs:[{name:"sappy"}]}],iron_sledgehammer:[{category:"trait",not:!0,subreqs:[{name:"sappy"}]}],steel_sledgehammer:[{category:"trait",not:!0,subreqs:[{name:"sappy"}]}],titanium_sledgehammer:[{category:"trait",not:!0,subreqs:[{name:"sappy"}]}],copper_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],iron_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],steel_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],titanium_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],adamantite_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],slave_pens:[{category:"trait",subreqs:[{name:"slaver"}]}],slave_market:[{category:"trait",subreqs:[{name:"slaver"}]}],ceremonial_dagger:[{category:"trait",subreqs:[{name:"cannibalize"}]}],last_rites:[{category:"trait",subreqs:[{name:"cannibalize"}]}],ancient_infusion:[{category:"trait",subreqs:[{name:"cannibalize"}]}],armor:[{category:"trait",not:!0,subreqs:[{name:"apex_predator"}]}],plate_armor:[{category:"trait",not:!0,subreqs:[{name:"apex_predator"}]}],kevlar:[{category:"trait",not:!0,subreqs:[{name:"apex_predator"}]}],nanoweave_vest:[{category:"trait",not:!0,subreqs:[{name:"apex_predator"}]}],mad:[{truepath:!0,category:"unique",subreqs:[{title:F("wiki_tech_special_unify"),color:!!t.tech.world_control,link:"wiki.html#globalized-tp_tech-unite"}]}],ancient_theology:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],study:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],encoding:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],deify:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],infusion:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],gps:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],genesis:[{category:"unique",subreqs:[{title:F("wiki_tech_special_genesis"),color:t.race.deterioration>=1}]}],veil:[{category:"universe",subreqs:[{name:"magic"}]}],mana_syphon:[{category:"universe",subreqs:[{name:"magic"}]}],mana:[{category:"universe",subreqs:[{name:"magic"}]}],ley_lines:[{category:"universe",subreqs:[{name:"magic"}]}],rituals:[{category:"universe",subreqs:[{name:"magic"}]}],crafting_ritual:[{category:"universe",subreqs:[{name:"magic"}]}],mana_nexus:[{category:"universe",subreqs:[{name:"magic"}]}],clerics:[{category:"universe",subreqs:[{name:"magic"}]},{category:"crispr",subreqs:[{name:"faith",tree:"ancients",val:2}]}],conjuring:[{category:"universe",subreqs:[{name:"magic"}]},{category:"scenario",not:!0,subreqs:[{name:"cataclysm"}]}],res_conjuring:[{category:"universe",subreqs:[{name:"magic"}]},{category:"scenario",not:!0,subreqs:[{name:"cataclysm"}]}],alchemy:[{category:"universe",subreqs:[{name:"magic"}]}],transmutation:[{category:"universe",subreqs:[{name:"magic"}]}],dark_bomb:[{category:"unique",subreqs:[{title:F("wiki_tech_special_demon_lord"),color:t.stats.hasOwnProperty("spire")&&t.stats.spire.hasOwnProperty(qn())&&t.stats.spire[qn()].hasOwnProperty("dlstr")&&t.stats.spire[qn()].dlstr>0,link:"wiki.html#mechanics-gameplay-dlord"}]}],terraforming:[{category:"challenge",subreqs:[{name:"orbitdecay"}]}],geck:[{category:"achieve",subreqs:[{name:"lamentis",val:5}]}],womling_fun:[{category:"unique",subreqs:[{title:F("tau_red_contact"),color:!!t.race.womling_friend,link:"wiki.html#tauceti-structures-contact"},{title:F("tau_red_introduce"),color:!!t.race.womling_god,link:"wiki.html#tauceti-structures-introduce"},{title:F("tau_red_subjugate"),color:!!t.race.womling_lord,link:"wiki.html#tauceti-structures-subjugate"}]}],isolation_protocol:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],focus_cure:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],decode_virus:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vaccine_campaign:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vax_strat1:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vax_strat2:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vax_strat3:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vax_strat4:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],cloning:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],clone_degredation:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],digital_paradise:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],ringworld:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],matrioshka_brain:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],ignition_device:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],replicator:[{category:"scenario",subreqs:[{name:"lone_survivor"}]}],womling_unlock:[{category:"scenario",subreqs:[{name:"lone_survivor"}]}],garden_of_eden:[{category:"scenario",subreqs:[{name:"lone_survivor"}]}]},oc={unification2:"unification",conjuring:"ley_lines",res_conjuring:"conjuring",bribe_sphinx:"miasma"};const lc={solar:"interstellar"},_c={interstellar:"solar"};function dc(e,a){let r=En("create"),i=[],s=[],n="truepath"===a?rc:ac,c="truepath"===a?"tp_tech":"tech";if(Object.keys(n).forEach((function(r){let c=n[r];if(c.hasOwnProperty("era")&&(c.era===e||c.era===lc[e])&&(!c.hasOwnProperty("wiki")||c.wiki)){let e=n[r].id.split("-"),o=$(`
                                  `);if(Ln(o,c),function(e,t,a){let r=$('
                                  ');if(e.append(r),sc.hasOwnProperty(t)&&"truepath"===a)for(let e=0;e${sc[t][e]}`);else if(ic.hasOwnProperty(t))for(let e=0;e${ic[t][e]}`);else r.append(`
                                  ${F("wiki_tech_empty")}
                                  `)}(o,r,a),function(e,a,r,i){let s=function(e){let t={},a="truepath"===e?rc:ac;return Object.keys(a).forEach((function(e){let a=Sr.tech[e];t[a.grant[0]]||(t[a.grant[0]]={});let r="string"==typeof Sr.tech[e].title?Sr.tech[e].title:Sr.tech[e].title();t[a.grant[0]][a.grant[1]]=[{name:e,title:r,era:Sr.tech[e].era}]})),t.primitive[2]=[{name:"bone_tools",title:F("tech_bone_tools"),era:"primitive"},{name:"wooden_tools",title:F("tech_wooden_tools"),era:"primitive"}],t.theology[3]=[{name:Sr.tech.fanaticism.wiki?"fanaticism":"alt_fanaticism",title:F("tech_fanaticism"),era:"civilized"},{name:Sr.tech.anthropology.wiki?"anthropology":"alt_anthropology",title:F("tech_anthropology"),era:"civilized"}],t.theology[5]=[{name:"deify",title:F("tech_deify"),era:"early_space"},{name:"study",title:F("tech_study"),era:"early_space"}],t.ancient_study[1]=[{name:"study",title:F("tech_study"),era:"early_space"}],t.ancient_deify[1]=[{name:"deify",title:F("tech_deify"),era:"early_space"}],"truepath"===e&&(t.unify[1]=[{name:"arpa",title:F("tech_arpa"),era:"globalized"}],t.isolation={},t.isolation[1]=[{name:"isolation_protocol",title:F("tech_isolation_protocol"),era:"tauceti"}],t.focus_cure={},t.focus_cure[1]=[{name:"focus_cure",title:F("tech_focus_cure"),era:"tauceti"}]),t}(i);if(Object.keys(a.reqs).length>0){let r={},n={};if(Object.keys(a.reqs).forEach((function(e){let i=t.tech[e]&&t.tech[e]>=a.reqs[e]?"success":"danger",c=e+a.reqs[e];s[e]&&s[e][a.reqs[e]]?(r[c]=[],s[e][a.reqs[e]].forEach((function(e){r[c].push({name:e.name,title:e.title,era:e.era,color:i})}))):nc[c]&&(n[c]={title:nc[c].title,link:nc[c].link,color:i})})),Object.keys(r).length>0){let t=!1,a=$(`
                                  ${F("wiki_tech_req_tech")}
                                  `);e.append(a),Object.keys(r).forEach((function(e){let s="",n=!1,c=!1;r[e].forEach((function(e){let t=`${e.title}`;c=e.color,n?s=F("wiki_tech_req_or",[s,t]):(n=!0,s=t)})),a.append(`${t?", ":""}${s}`),t=!0}))}if(Object.keys(n).length>0){let t=!1,a=$(`
                                  ${F("wiki_tech_req_other")}
                                  `);e.append(a),Object.keys(n).forEach((function(e){let r=n[e].link;r&&"truepath"===i&&(r=r.replace("-structures-","-tp_structures-"));let s=r?`${n[e].title}`:n[e].title;a.append(`${t?", ":""}${s}`),t=!0}))}}if(cc.hasOwnProperty(r)){let a=!1,s=$(`
                                  ${F("wiki_tech_req_special")}
                                  `),n=!1;cc[r].forEach((function(e){if(e.truepath&&"truepath"!==i)return;n=!0;let r=!1,c=!1,o="";e.subreqs.forEach((function(a){let s="",n=!1,l=!1;switch(e.category){case"species":s=F(`race_${a.name}`),n=`wiki.html#races-species-${a.name}`,l=t.race.species===a.name;break;case"genus":s=F(`genelab_genus_${a.name}`),l=Di[t.race.species].type===a.name;break;case"trait":s=F(`trait_${a.name}_name`),n=`wiki.html#traits-species-${Ki[a.name].type}_${a.name}`,l=t.race[a.name];break;case"tech":s="string"==typeof Sr.tech[a.name].title?Sr.tech[a.name].title:Sr.tech[a.name].title(),n=`wiki.html#${Sr.tech[a.name].era}-tech-${a.name}`,l=t.tech[a.tree]&&t.genes[a.tree]>=a.val;break;case"universe":s=F(`universe_${a.name}`),n=`wiki.html#universes-gameplay-${a.name}`,l=t.race.universe===a.name;break;case"crispr":s=F(`arpa_genepool_${a.name}_title`),n=`wiki.html#crispr-prestige-${a.name}`,l=t.genes[a.tree]&&t.genes[a.tree]>=a.val;break;case"achieve":s=a.val+` ${Us("star")} `+F(`achieve_${a.name}_name`),n=`wiki.html#perks-prestige-${a.name}`,l=t.stats.achieve[a.name]&&t.stats.achieve[a.name].l>=a.val;break;case"government":s=F(`govern_${a.name}`),n=`wiki.html#government-gameplay-${a.name}`,l=t.civic.govern&&t.civic.govern.type&&t.civic.govern.type===a.name;break;case"scenario":s=F(`wiki_challenges_scenarios_${a.name}`),n=`wiki.html#challenges-gameplay-scenarios_${a.name}`,l=t.race[a.name];break;case"challenge":s=F(`wiki_challenges_modes_${a.name}`),n=`wiki.html#challenges-gameplay-modes_${a.name}`,l=t.race[a.name];break;case"unique":s=a.title,n=a.link,l=a.color}n&&"truepath"===i&&(n=n.replace("-tech-","-tp_tech-")),c=c||l,e.not&&(l=!l),l=l?"success":"danger",s=n?`${s}`:`${s}`,r?o=F("wiki_tech_req_or",[o,s]):(r=!0,o=s)})),e.not&&(c=!c),c=c?"success":"danger","unique"!==e.category&&(o=F(`wiki_tech_special_${e.category}${e.not?"_not":""}`,[o])),s.append(`${a?", ":""}${o}`),a=!0})),n&&e.append(s)}}(o,c,r,a),c.cost.Knowledge)if(0===i.length)i[0]=[c,o];else{let e=c.cost.Knowledge(),t=i.length-1;for(;t>=0&&i[t][0].cost.Knowledge()>e;)i[t+1]=i[t],t--;i[t+1]=[c,o]}else s.push([c,o])}})),s.length>0)for(let e=0;e');e.append(a),Object.keys($n).forEach((function(e){let r=$('
                                  ');a.append(r);let i=t.stats.feat[e]&&t.stats.feat[e]>0?"warning":"fade",s=Ws(e,"feat"),n=t.stats.feat[e]>1?`

                                  ${Us(s)}

                                  `:"";r.append(`${$n[e].name}${n}`),function(e,a){let r=a?`
                                  ${$n[e].flair}
                                  `:"";if("egghunt"===e){let a=(new Date).getFullYear(),i=`
                                  ${F("wiki_feat_egghunt_found")}
                                  `;for(let e=1;e<=18;e++)i+=`${F("wiki_feat_egghunt_num",[e])}`;i+="
                                  ",_s(`f-${e}`,$(`
                                  ${$n[e].desc}
                                  ${F(`wiki_feat_${e}`)}
                                  ${i}${r}`))}else if("trickortreat"===e){let a=(new Date).getFullYear(),i=`
                                  ${F("wiki_feat_trickortreat_found")}
                                  `;for(let e=1;e<=7;e++)i+=`${F("wiki_feat_treat_num",[e])}`;for(let e=1;e<=7;e++)i+=`${F("wiki_feat_trick_num",[e])}`;i+="
                                  ",_s(`f-${e}`,$(`
                                  ${$n[e].desc}
                                  ${F(`wiki_feat_${e}`)}
                                  ${i}${r}`))}else if("equilibrium"===e){let a={};t.pillars&&Object.keys(t.pillars).forEach((function(e){Di[e]&&(a[e]=t.pillars[e])}));let i='
                                  ';Object.keys(Di).sort(((e,t)=>Di[e].name.localeCompare(Di[t].name))).forEach((function(e){"protoplasm"!==e&&("custom"!==e||"custom"===e&&t.stats.achieve.ascended)&&(a[e]&&a[e]>=1?i+=`${Di[e].name}`:i+=`${Di[e].name}`)})),i+="
                                  ",_s(`f-${e}`,$(`
                                  ${$n[e].desc}
                                  ${F(`wiki_feat_${e}`)}
                                  ${i}${r}`),{wide:!0})}else _s(`f-${e}`,$(`
                                  ${$n[e].desc}
                                  ${F(`wiki_feat_${e}`)}
                                  ${r}`))}(e,"warning"===i)}))}()}}const uc={cross:["antimatter"],vigilante:["evil"],squished:["micro"],macro:["micro"],marble:["micro"],double_density:["heavy"],heavyweight:["heavy"],whitehole:["standard"],heavy:["heavy"],canceled:["antimatter"],eviltwin:["evil"],microbang:["micro"],pw_apocalypse:["magic"],pass:["magic"],fullmetal:["magic"],soul_sponge:["magic"],nightmare:["magic"]},hc={trade:[750,50]};function mc(e,a){let r=$("#content");Cs(r);let i=`\n \n `;r.append(i),zs({el:"#filtering",methods:{universeSwap(e){mc(e,a)},filterSwap(t){mc(e,t)}}});let s=qn(e||"standard"),n={};Object.keys(kn).forEach((function(r){if(!e||!uc[r]||uc[r].indexOf(e)>-1){if("missing"===a&&t.stats.achieve[r]&&t.stats.achieve[r][s]&&t.stats.achieve[r][s]>0)return;if("obtained"===a&&!(t.stats.achieve[r]&&t.stats.achieve[r][s]&&t.stats.achieve[r][s]>0))return;if("incomplete"===a&&e&&t.stats.achieve[r]&&t.stats.achieve[r][s]&&t.stats.achieve[r][s]>4)return;if("completed"===a&&e&&!(t.stats.achieve[r]&&t.stats.achieve[r][s]&&t.stats.achieve[r][s]>4))return;if(("incomplete"===a||"completed"===a)&&!e){let e="universe"===kn[r].type?10:30;if("whitehole"===r&&(e=5),t.stats.achieve[r]&&Object.keys(t.stats.achieve[r]).forEach((a=>e-=t.stats.achieve[r][a])),"incomplete"===a&&e<=0)return;if("completed"===a&&e>0)return}n.hasOwnProperty(kn[r].type)?n[kn[r].type].push(r):n[kn[r].type]=[r]}})),Object.keys(n).forEach((function(a){r.append($(`

                                  ${F(`wiki_achieve_${a}`)}

                                  `));let i=$('
                                  ');r.append(i),n[a].forEach((function(a){let r=$('
                                  ');i.append(r);let n=t.stats.achieve[a]&&t.stats.achieve[a][s]&&t.stats.achieve[a][s]>0?"warning":"fade";r.append(`${kn[a].name}`);let c=Ys(a,16,!1,!1,e);r.append(`${c}`),function(e,a,r){let i=qn(r||"standard"),s=a?`
                                  ${kn[e].flair}
                                  `:"";if("mass_extinction"===e||"vigilante"===e){let a='
                                  ';Object.keys(Di).sort((function(e,t){return Di[e].hasOwnProperty("name")&&Di[t].hasOwnProperty("name")?Di[e].name.localeCompare(Di[t].name):0})).forEach((function(r){"protoplasm"!==r&&("custom"!==r||"custom"===r&&t.stats.achieve.ascended)&&(t.stats.achieve[`extinct_${r}`]&&("mass_extinction"===e?t.stats.achieve[`extinct_${r}`][i]>=0:t.stats.achieve[`extinct_${r}`].hasOwnProperty("e")&&t.stats.achieve[`extinct_${r}`].e>=0)?a+=`${Di[r].name}`:a+=`${Di[r].name}`)})),a+="
                                  ",_s(`a-${e}`,$(`
                                  ${kn[e].desc}
                                  ${F(`wiki_achieve_${e}`)}
                                  ${a}${s}`),{wide:!0})}else if("explorer"===e){let a='
                                  ';Object.keys(ss).sort(((e,t)=>ss[e].label.localeCompare(ss[t].label))).forEach((function(e){(!r||"hellscape"!==e&&"eden"!==e||"hellscape"===e&&"evil"!==r||"eden"===e&&"evil"===r)&&(t.stats.achieve[`biome_${e}`]&&t.stats.achieve[`biome_${e}`][i]>=0?a+=`${ss[e].label}`:a+=`${ss[e].label}`)})),a+="
                                  ",_s(`a-${e}`,$(`
                                  ${kn[e].desc}
                                  ${F(`wiki_achieve_${e}`)}
                                  ${a}${s}`))}else if("creator"===e||"heavyweight"===e){let a='
                                  ';Object.keys(Ei).sort().forEach((function(r){let s=["carnivore","herbivore","omnivore"].includes(r)?F(`evo_${r}_title`):F(`genelab_genus_${r}`);("creator"===e?t.stats.achieve[`genus_${r}`]&&t.stats.achieve[`genus_${r}`][i]>=0:t.stats.achieve[`genus_${r}`]&&t.stats.achieve[`genus_${r}`].h>=0)?a+=`${s}`:a+=`${s}`})),a+="
                                  ",_s(`a-${e}`,$(`
                                  ${kn[e].desc}
                                  ${F(`wiki_achieve_${e}`)}
                                  ${a}${s}`))}else if("enlightenment"===e){let a={};t.pillars&&Object.keys(t.pillars).forEach((function(e){Di[e]&&(!a[Di[e].type]||t.pillars[e]>a[Di[e].type])&&(a[Di[e].type]=t.pillars[e])}));let r='
                                  ';Object.keys(Ei).sort().forEach((function(e){let t=["carnivore","herbivore","omnivore"].includes(e)?F(`evo_${e}_title`):F(`genelab_genus_${e}`);a[e]&&a[e]>=1?r+=`${t}`:r+=`${t}`})),r+="
                                  ",_s(`a-${e}`,$(`
                                  ${kn[e].desc}
                                  ${F(`wiki_achieve_${e}`)}
                                  ${r}${s}`))}else if("gladiator"===e){let a='
                                  ',n={};t.stats.spire&&Object.keys(t.stats.spire).forEach((function(e){r&&i!==e||Object.keys(t.stats.spire[e]).forEach((function(a){fa[a]&&(!n.hasOwnProperty(a)||n[a]0?a+=`${F(`portal_mech_boss_${e}`)}`:a+=`${F(`portal_mech_boss_${e}`)}`})),a+="
                                  ",_s(`a-${e}`,$(`
                                  ${kn[e].desc}
                                  ${F(`wiki_achieve_${e}`)}
                                  ${a}${s}`),{wide:!0})}else if("banana"===e){let a='
                                  ';a+=`
                                  ${F("wiki_achieve_banana1")}
                                  `,a+=`
                                  ${F("wiki_achieve_banana2")}
                                  `,a+=`
                                  ${F("wiki_achieve_banana3")}
                                  `,a+=`
                                  ${F("wiki_achieve_banana4",[500])}
                                  `,a+=`
                                  ${F("wiki_achieve_banana5",[50])}
                                  `,a+="
                                  ",_s(`a-${e}`,$(`
                                  ${kn[e].desc}
                                  ${F(`wiki_achieve_${e}`)}
                                  ${a}${s}`))}else if("pathfinder"===e){let a='
                                  ';["ashanddust","exodus","obsolete","bluepill","retired"].forEach((function(e){let r=F(`achieve_${e}_name`);t.stats.achieve[e]&&t.stats.achieve[e][i]>=5?a+=`${r}`:a+=`${r}`})),a+="
                                  ",_s(`a-${e}`,$(`
                                  ${kn[e].desc}
                                  ${F(`wiki_achieve_${e}`)}
                                  ${a}${s}`))}else if("overlord"===e){let a='
                                  ',i={subjugate:"lord",contact:"friend",introduced:"god"},n=qn(r||"standard");Object.keys(i).forEach((function(e){t.stats.womling[i[e]]&&t.stats.womling[i[e]][n]>0?a+=`${F(`wiki_achieve_overlord_${e}`)}`:a+=`${F(`wiki_achieve_overlord_${e}`)}`})),a+="
                                  ",_s(`a-${e}`,$(`
                                  ${kn[e].desc}
                                  ${F(`wiki_achieve_${e}`)}
                                  ${a}${s}`))}else if(e.includes("extinct_")&&"custom"!==e.substring(8)){let t=e.substring(8);_s(`a-${e}`,$(`
                                  ${kn[e].desc}
                                  ${F("wiki_achieve_extinct_race",[F(`race_${t}`)])}
                                  ${s}`))}else if(e.includes("genus_")){let t=e.substring(6);_s(`a-${e}`,$(`
                                  ${kn[e].desc}
                                  ${F("wiki_achieve_genus_type",[F(`genelab_genus_${t}`)])}
                                  ${s}`))}else if(e.includes("biome_")||e.includes("atmo_")){let t=e.substring(e.indexOf("_")+1);_s(`a-${e}`,$(`
                                  ${kn[e].desc}
                                  ${F("wiki_achieve_planet_type",["b"===e.substring(0,1)?F(`biome_${t}_name`):F(`planet_${t}`)])}
                                  ${s}`))}else{let t=hc[e]?F(`wiki_achieve_${e}`,hc[e]):F(`wiki_achieve_${e}`);_s(`a-${e}`,$(`
                                  ${kn[e].desc}
                                  ${t}
                                  ${s}`))}}(a,"warning"===n,e)}))}))}function gc(e,t,a,r){r=r||{};let i=$(`\n
                                  \n ${F("wiki_challenges_"+(t?"feats":"achievements"))}\n
                                  \n `);e.append(i);let s=!1;a.forEach((function(e){let a=t?F(`feat_${e}_name`):r[e]?F(`achieve_${e}_name`):`${F(`achieve_${e}_name`)}`;i.append(`${s?", ":""}${a}`),s=!0}))}function vc(e,t){let a=$(`\n
                                  \n ${F("wiki_challenges_requirements")}\n
                                  \n `);e.append(a);let r=!1;t.forEach((function(e){let t=!1,i=!1,s="";e.subreqs.forEach((function(e){let a=e.text,r=e.link||!1,n=e.color;i=i||n,n=n?"success":"danger",a=r?`${a}`:`${a}`,t?s=F("wiki_tech_req_or",[s,a]):(t=!0,s=a)})),i=i?"success":"danger",s=F(e.text,[s]),a.append(`${r?", ":""}${s}`),r=!0}))}const fc={plasmid:["cit","sol","know","genes","reset","uni","high_pop","synth","tp"],anti:["cit","sol","know","genes","reset","high_pop","synth","tp"],phage:["plas","genes","reset","uni","tp"],dark:["mass","exotic","genes","uni"],vacuum:["mana","genes"],harmony:["genes","uni"],artifact:["genes","floor","micro"],cores:["micro"]};function yc(e,a,r,i){let s=r||a,n=a+(i||"")+(r||""),c=$(`
                                  `);e.append(c);let o="";switch(i){case"mad":o+=F("wiki_calc_mad")+" ";break;case"bioseed":case"cataclysm":case"vacuum":case"terraform":o+=F("wiki_resets_"+i)+" ";break;case"bigbang":o+=F("wiki_resets_blackhole")+" ";break;case"ascend":o+=F("wiki_resets_ascension")+" ";break;case"descend":o+=F("wiki_resets_infusion")+" ";break;case"ai":o+=F("wiki_resets_ai")+" "}switch(s){case"plasmid":o+=F("resource_Plasmid_name");break;case"anti":o+=F("resource_AntiPlasmid_name");break;case"phage":o+=F("resource_Phage_name");break;case"dark":case"vacuum":o+=F("resource_Dark_name");break;case"harmony":o+=F("resource_Harmony_name");break;case"artifact":o+=F("resource_Artifact_name");break;case"cores":o+=F("resource_AICore_name")}c.append(`

                                  ${F("wiki_calc_gains",[o])}

                                  `);let l=$("
                                  "),_=$("
                                  ");c.append(l),c.append(_);let d={cit:0,sol:0,know:0,plas:0,mass:0,exotic:0,mana:0,floor:0,genes:0,uni:"standard"},p={cit:{val:void 0,use:!1},sol:{val:void 0,use:!1},know:{val:void 0,use:!1},plas:{val:void 0,use:!1},mass:{val:void 0,use:!1},exotic:{val:void 0,use:!1},mana:{val:void 0,use:!1},floor:{val:void 0,use:!1},genes:{val:void 0,use:!1},reset:{val:void 0,use:!1},uni:{val:void 0,use:!1},micro:{val:!1,use:!1},high_pop:{val:void 0,use:!1},synth:{val:!1,use:!1},tp:{val:!1,use:!1,enabled:!0}},u={standard:{use:!0},evil:{use:!0},antimatter:{use:!0},micro:{use:!0},heavy:{use:!0},magic:{use:!0}},h={mad:{use:!0},bioseed:{use:!0},cataclysm:{use:!0},bigbang:{use:!0},vacuum:{use:!0},terraform:{use:!0},ascend:{use:!0},descend:{use:!1},ai:{use:!0}},m={vis:!1},g={capVis:!1,overflowVis:!1,totalVis:!1,capVal:void 0,overflow:void 0,rawGains:void 0};fc[s].forEach((function(e){p[e].use=!0})),i&&(p.reset.val=i,p.reset.use=!1,"mad"!==i&&(p.synth.use=!1,p.synth.val=!1),"vacuum"===i&&(p.uni.use=!1,p.uni.val="magic"),"ai"===i?(p.tp.use=!1,p.tp.val=!0):["mad","bioseed","terraform"].includes(i)||(p.tp.use=!1,p.tp.val=!1));let v="";switch(s){case"plasmid":i||(u.antimatter.use=!1);break;case"anti":h.vacuum.use=!1;break;case"phage":h.mad.use=!1,h.descend.use=!1,v+="log2({{ i.plas.val, 'plasmids' | generic }}) * {{ i.reset.val | phageMulti }} * e * {{ i.genes.val | challenge}} * {{ i.uni.val | universe }} * 1.1";break;case"dark":p.reset.val="bigbang",u.magic.use=!1,v+="(ln(1 + ({{ i.exotic.val, 'exotic' | generic }} * 40)) + (log2({{ i.mass.val, 'mass' | generic }} - 7) / 2.5)) * {{ i.genes.val | challenge }} * {{ i.uni.val | universe }}";break;case"vacuum":p.reset.val="vacuum",p.uni.val="magic",v+="(log2({{ i.mana.val, 'mana' | generic }}) / 5) * {{ i.genes.val | challenge }}";break;case"harmony":p.reset.val="ascend",v+="(1 + {{ i.genes.val, 'genes' | generic }}) * {{ i.uni.val | universe }}";break;case"artifact":p.reset.val="descend",v+="1 + {{ i.genes.val, 'genes' | generic }} + {{ i.floor.val | floor }}";break;case"cores":p.reset.val="ai",v+='52'}"plasmid"===a?(v+=`\n
                                  \n

                                  ${F("wiki_calc_plasmid_cap_total",[F("anti"===s?"resource_AntiPlasmid_name":"resource_Plasmid_name")])}

                                  \n
                                  \n
                                  \n {{ i.reset.val, i.synth.val | plasmidCap }} * (1 + (({{ i.genes.val, 'genes' | generic }} + 1) / 8)) = {{ | plasmidCapCalc }} = {{ pe.capVal }}\n
                                  \n
                                  \n

                                  ${F("wiki_calc_plasmid_gains_raw",[F("anti"===s?"resource_AntiPlasmid_name":"resource_Plasmid_name")])}

                                  \n
                                  \n
                                  \n `,v+="plasmid"===s?"\n ((({{ i.cit.val, 'citizens' | generic }} + {{ i.sol.val, 'soldiers' | generic }}) / {{ i.high_pop.val | highPopDivisor }} / {{ i.reset.val, i.synth.val | popDivisor }}) + (ln(1 + (({{ i.reset.val | knowMulti }} - 1) * {{ i.know.val, 'knowledge' | generic }} / {{ i.reset.val, i.synth.val | knowInc }})) / ln({{ i.reset.val | knowMulti }}))) * {{ i.genes.val | challenge }} * {{ i.uni.val | universe }} * 1.1\n ":"\n ((({{ i.cit.val, 'citizens' | generic }} + {{ i.sol.val, 'soldiers' | generic }}) / {{ i.high_pop.val | highPopDivisor }} / {{ i.reset.val, i.synth.val | popDivisor }}) + (ln(1 + (({{ i.reset.val | knowMulti }} - 1) * {{ i.know.val, 'knowledge' | generic }} / {{ i.reset.val, i.synth.val | knowInc }})) / ln({{ i.reset.val | knowMulti }}))) * {{ i.genes.val | challenge }} * 1.1 * 1.1\n ",v+=`\n = {{ | calc }}\n
                                  \n
                                  \n

                                  ${F("wiki_calc_overflow")}

                                  \n
                                  \n
                                  \n {{ pe.rawGains, 'plasmid_gains_raw' | generic }} - {{ pe.capVal, 'plasmid_cap_total' | generic }} = {{ pe.overflow, 'no_overflow' | generic }}\n
                                  \n
                                  \n

                                  ${F("wiki_calc_plasmid_gains_total",[F("anti"===s?"resource_AntiPlasmid_name":"resource_Plasmid_name")])}

                                  \n
                                  \n
                                  \n {{ pe.capVal, 'plasmid_cap_total' | generic }} + ({{ pe.overflow, 'overflow' | generic }} / ({{ pe.overflow, 'overflow' | generic }} + {{ pe.capVal, 'plasmid_cap_total' | generic }}) * {{ pe.capVal, 'plasmid_cap_total' | generic }}) = {{ | plasmidTotalCalc }}\n
                                  \n `):v+=' = {{ | calc }}',l.append(v),_.append(`\n
                                  \n
                                  ${F("wiki_calc_citizens")}
                                  \n
                                  ${F("wiki_calc_soldiers")}
                                  \n
                                  ${F("wiki_calc_knowledge")}
                                  \n
                                  ${F("resource_Plasmid_plural_name")}
                                  \n
                                  ${F("wiki_calc_mass")}
                                  \n
                                  ${F("wiki_calc_exotic")}
                                  \n
                                  ${F("wiki_calc_mana")}
                                  \n
                                  ${F("wiki_calc_floor")}
                                  \n
                                  ${F("wiki_calc_genes")}
                                  \n
                                  ${F("wiki_calc_prestige")} \n \n {{ 'mad' | resetLabel }}\n {{ 'bioseed' | resetLabel }}\n {{ 'cataclysm' | resetLabel }}\n {{ 'bigbang' | resetLabel }}\n {{ 'vacuum' | resetLabel }}\n {{ 'terraform' | resetLabel }}\n {{ 'ascend' | resetLabel }}\n {{ 'descend' | resetLabel }}\n {{ 'ai' | resetLabel }}\n
                                  \n
                                  ${F("wiki_calc_universe")} \n \n {{ 'standard' | uniLabel }}\n {{ 'evil' | uniLabel }}\n {{ 'antimatter' | uniLabel }}\n {{ 'micro' | uniLabel }}\n {{ 'heavy' | uniLabel }}\n {{ 'magic' | uniLabel }}\n
                                  \n
                                  ${F("trait_high_pop_name")} \n \n {{ 0 | highPopLabel }}\n {{ 0.25 | highPopLabel }}\n {{ 0.5 | highPopLabel }}\n {{ 1 | highPopLabel }}\n {{ 2 | highPopLabel }}\n {{ 3 | highPopLabel }}\n
                                  \n
                                  ${F("universe_micro")}
                                  \n
                                  ${F("wiki_calc_synth")}
                                  \n
                                  ${F("wiki_calc_tp")}
                                  \n
                                  \n
                                  \n \n \n
                                  \n `),zs({el:"#"+n+"Calc",data:{i:p,u,r:h,s:m,pe:g},methods:{val(e){switch(e){case"cit":case"sol":case"know":case"plas":case"mass":case"exotic":case"mana":case"floor":p[e].val&&p[e].val<0&&(p[e].val=0);break;case"genes":p[e].val&&(p[e].val<0?p[e].val=0:p[e].val>4&&(p[e].val=4))}},pickReset(e){p.reset.val=e,Object.keys(u).forEach((function(e){u[e].use=!0})),"vacuum"===e?Object.keys(u).forEach((function(e){"magic"!==e&&(u[e].use=!1)})):"bigbang"===e&&(u.magic.use=!1),"plasmid"===a&&(u.antimatter.use=!1),p.synth.use="mad"===e,["mad","bioseed","terraform"].includes(e)?p.tp.enabled=!0:(p.tp.enabled=!1,p.tp.val="ai"===e)},pickUniverse(e){p.uni.val=e,"magic"===e?(h.bigbang.use=!1,h.vacuum.use=!0):(h.bigbang.use=!0,h.vacuum.use=!1),p.micro.val="micro"===e},pickHighPop(e){p.high_pop.val=e},resetInputs(){Object.keys(p).forEach((function(e){p[e].use&&(p[e].val=void 0)})),p.synth.use="plasmid"===a,["micro","synth","tp"].forEach((function(e){p[e].use&&(p[e].val=!1)})),p.tp.enabled=!0},importInputs(){p.cit.val=t.resource[t.race.species].amount,p.sol.val=t.civic.garrison?t.civic.garrison.workers:0;for(let e=0;e<3;e++)t.civic.foreign[`gov${e}`].occ&&(p.sol.val+=aa("federation"===t.civic.govern.type?15:20));p.know.val=t.stats.know,p.mass.val=t.interstellar.stellar_engine?t.interstellar.stellar_engine.mass:8,p.exotic.val=t.interstellar.stellar_engine?t.interstellar.stellar_engine.exotic:0,p.mana.val=t.resource.Mana.gen,p.floor.val=t.portal.spire?t.portal.spire.count-1:0,p.genes.val=Sn()-1;let e=t.race.universe;"dark"===s&&"magic"===e||"vacuum"===i||"bigbang"===e||(p.uni.val=e,"magic"===e?("bigbang"===p.reset.val&&(p.reset.val=void 0),h.bigbang.use=!1,h.vacuum.use=!0):("vacuum"===p.reset.val&&(p.reset.val=void 0),h.bigbang.use=!0,h.vacuum.use=!1),p.micro.val="micro"===e),p.high_pop.val=t.race.high_pop?t.race.high_pop:0,p.synth.val="synthetic"===Di[t.race.species].type,p.tp.use&&p.reset.val&&["mad","bioseed","terraform"].includes(p.reset.val)&&(p.tp.val=!!t.race.truepath),p.reset.val&&"mad"!==p.reset.val&&"descend"!==p.reset.val&&(p.plas.val=Ns(p.reset.val,{cit:p.cit.val,sol:p.sol.val,know:p.know.val,uni:p.uni.val,genes:p.genes.val,high_pop:p.high_pop.val,tp:p.tp.val}).plasmid)}},filters:{generic:(e,t)=>void 0!==e?e:"plasmid_gains_raw"===t||"plasmid_cap_total"===t?F("wiki_calc_"+t,[F("anti"===s?"resource_AntiPlasmid_name":"resource_Plasmid_name")]):F("wiki_calc_"+t),floor(e){if(void 0===e)return F("wiki_calc_floor_bonus");let t=0;return[50,100].forEach((function(a){e>=a&&t++})),t},highPopDivisor:e=>e?Ki.high_pop.vars(e)[0]:1,popDivisor(e,t){switch(e){case"mad":if(t)return 5;case"cataclysm":case"bioseed":return 3;case"ai":return 2.5;case"vacuum":case"bigbang":return 2.2;case"ascend":case"terraform":return 1.15;default:return F("wiki_calc_pop_divisor")}},knowMulti(e){switch(e){case"mad":return 1.1;case"cataclysm":case"bioseed":return 1.015;case"ai":return 1.014;case"vacuum":case"bigbang":return 1.012;case"ascend":case"terraform":return 1.008;default:return F("wiki_calc_know_multi")}},knowInc(e,t){switch(e){case"mad":return t?125e3:1e5;case"cataclysm":case"bioseed":return 5e4;case"ai":return 45e3;case"vacuum":case"bigbang":return 4e4;case"ascend":case"terraform":return 3e4;default:return F("wiki_calc_know_inc")}},phageMulti(e){switch(e){case"cataclysm":case"bioseed":return 1;case"ai":return 2;case"vacuum":case"bigbang":return 2.5;case"ascend":case"terraform":return 4;default:return F("wiki_calc_phage_multi")}},plasmidCap(e,t){switch(e){case"mad":return t?100:150;case"cataclysm":case"bioseed":return 400;case"ai":return 600;case"vacuum":case"bigbang":return 800;case"ascend":case"terraform":return 2e3;default:return F("wiki_calc_plasmid_cap")}},plasmidCapCalc(){if(g.capVis=p.reset.val&&void 0!==p.genes.val,g.capVis){let e=0;switch(p.reset.val){case"mad":e=150,p.synth.val&&(e=100);break;case"cataclysm":case"bioseed":e=400;break;case"ai":e=600;break;case"vacuum":case"bigbang":e=800;break;case"ascend":case"terraform":e=2e3}return e*=1+(p.genes.val+1-(p.tp.val?0:1))/8,g.capVal=Math.floor(e),e}g.capVal=void 0},plasmidTotalCalc(){if(g.totalVis=g.overflow&&g.capVal,g.totalVis)return g.capVal+Math.floor(g.overflow/(g.overflow+g.capVal)*g.capVal)},challenge:e=>void 0!==e?Gs(1,"mad",2,{genes:e,uni:"standard",tp:!1}):F("wiki_calc_challenge_multi"),universe(e){if(!e)return F("wiki_calc_universe_multi");let t=p.genes.val||0;return"harmony"===s||"artifact"===s?(d.uni=p.uni.val,Ns(p.reset.val,d)[a]):+(Gs(1,p.reset.val,2,{genes:t,uni:e})/Gs(1,"mad",2,{genes:t,uni:"standard"})).toFixed(2)},calc(){let e=!0;if(Object.keys(p).forEach((function(t){p[t].use&&void 0===p[t].val&&(e=!1)})),m.vis=e,m.vis){let e={};fc[s].forEach((function(t){"reset"!==t&&("micro"!==t?e[t]=p[t].val:e.uni=p.micro.val?"micro":"standard")})),"anti"===s?e.uni="antimatter":"vacuum"===s&&(e.uni="magic"),"plasmid"===a&&(e.rawPlasmids=!0);let t=Ns(p.reset.val,e)[a];return"plasmid"===a&&(g.rawGains=t,g.overflow=void 0!==g.capVal&&t>g.capVal?t-g.capVal:void 0,g.overflowVis=void 0!==g.rawGains&&void 0!==g.capVal),t}"plasmid"===a&&(g.rawGains=void 0,g.overflow=void 0,g.overflowVis=!1)},resetLabel(e){switch(e){case"mad":return F("wiki_calc_mad");case"bioseed":case"cataclysm":case"vacuum":case"ai":case"terraform":return F("wiki_resets_"+e);case"bigbang":return F("wiki_resets_blackhole");case"ascend":return F("wiki_resets_ascension");case"descend":return F("wiki_resets_infusion")}return F("wiki_calc_prestige")},uniLabel:e=>F(e?"universe_"+e:"wiki_calc_universe"),highPopLabel:e=>void 0===e?F("wiki_calc_trait_undefined"):0===e?F("wiki_calc_trait_unowned"):e}})}function bc(e,a){let r=$(`
                                  `);e.append(r);let i=F("anti"===a?"resource_AntiPlasmid_name":"resource_Plasmid_name");r.append(`

                                  ${F("wiki_calc_bonuses",[F("wiki_calc_prod",[i])])}

                                  `);let s=$("
                                  "),n=$("
                                  ");r.append(s),r.append(n);let c={plas:{val:void 0},phage:{val:void 0},antimatter:{val:!1}},o={underResult:{vis:!1,val:0},overResult:{vis:!1,val:0},bleed:{vis:"anti"===a}};s.append(`\n
                                  \n ${F("wiki_calc_effective",[F("plasmid"===a?"resource_Plasmid_plural_name":"resource_AntiPlasmid_plural_name")])} {{ i.plas.val | effective }} - \n ${F("wiki_calc_softcap")} {{ i.phage.val | softcap }}\n
                                  \n
                                  \n ${F("wiki_calc_under_cap")}\n
                                  \n
                                  \n (ln(({{ i.plas.val, t | generic }} / {{ | bleedDiv }}) + 50) - 3.91202) / 2.888 / 3 = {{ false | calcUnder }} = +{{ true | calcUnder }}%\n
                                  \n
                                  \n ${F("wiki_calc_over_cap")}\n
                                  \n
                                  \n ((((ln({{ i.phage.val, 'phage' | generic }} + 300) - 3.91202)) / 2.888) + ((ln(({{ i.plas.val, t | generic }} / {{ | bleedDiv }}) + 1 - ({{ i.phage.val, 'phage' | generic }} + 250)) / ln2 / 250))) / 3 = {{ false | calcOver }} = +{{ true | calcOver }}%\n
                                  \n `),n.append(`\n
                                  \n
                                  ${F("plasmid"===a?"resource_Plasmid_plural_name":"resource_AntiPlasmid_plural_name")}
                                  \n
                                  ${F("resource_Phage_name")}
                                  \n
                                  ${F("universe_antimatter")}
                                  \n
                                  \n
                                  \n \n \n
                                  \n `),zs({el:`#${a}ProdCalc`,data:{i:c,s:o,t:a},methods:{val(e){c[e].val&&c[e].val<0&&(c[e].val=0)},bleed(){c.antimatter.val&&"plasmid"===a||!c.antimatter.val&&"anti"===a?o.bleed.vis=!0:o.bleed.vis=!1},resetInputs(){c.plas.val=void 0,c.phage.val=void 0,c.antimatter.val=!1},importInputs(){c.plas.val="plasmid"===a?t.prestige.Plasmid.count:t.prestige.AntiPlasmid.count,c.phage.val=t.prestige.Phage.count,c.antimatter.val="antimatter"===t.race.universe}},filters:{generic(e,t){if(void 0!==e)return e;switch(t){case"plasmid":return F("resource_Plasmid_plural_name");case"anti":return F("resource_AntiPlasmid_plural_name");case"phage":return F("resource_Phage_name")}},effective:e=>void 0===e?0:o.bleed.vis?e/("plasmid"===a?40:4):e,softcap:e=>250+(void 0===e?0:e),bleedDiv:()=>"plasmid"===a?40:4,calcUnder(e){if(e)return(100*o.underResult.val).toFixed(3);let t=c.plas.val;o.bleed.vis&&(t/="plasmid"===a?40:4);let r=!0;if((void 0===c.plas.val||t>250+c.phage.val)&&(r=!1),o.underResult.vis=r,o.underResult.vis){let e=+(Math.log(t+50)-3.91202).toFixed(5)/2.888;return"anti"===a&&(e/=3),o.underResult.val=e.toFixed(5),o.underResult.val}},calcOver(e){if(e)return(100*o.overResult.val).toFixed(3);let t=c.plas.val;o.bleed.vis&&(t/="plasmid"===a?40:4);let r=!0;if((void 0===c.phage.val||t<=250+c.phage.val)&&(r=!1),o.overResult.vis=r,o.overResult.vis){let e=+(Math.log(250+c.phage.val+50)-3.91202).toFixed(5)/2.888+Math.log(t+1-(250+c.phage.val))/Math.LN2/250;return"anti"===a&&(e/=3),o.overResult.val=e.toFixed(5),o.overResult.val}}}})}function wc(e,a){let r=$(`
                                  `);e.append(r);let i=F("phage"===a?"resource_Phage_name":"anti"===a?"resource_AntiPlasmid_name":"resource_Plasmid_name"),s=F("phage"===a?"resource_Phage_name":"anti"===a?"resource_AntiPlasmid_plural_name":"resource_Plasmid_plural_name");r.append(`

                                  ${F("wiki_calc_bonuses",[F("wiki_calc_store",[i])])}

                                  `);let n=$("
                                  "),c=$("
                                  ");r.append(n),r.append(c);let o={res:{val:void 0},store:{val:void 0},antimatter:{val:!1,use:!0}};"phage"===a&&(o.antimatter.use=!1);let l={result:{vis:!1,val:0},bleed:{vis:"anti"===a}},_="";"phage"!==a&&(_+=`\n
                                  \n ${F("wiki_calc_effective",[s])} {{ i.res.val | effective }}\n
                                  \n `),_+='\n
                                  \n ({{ i.res.val, t | generic }} / {{ | bleedDiv }}) * {{ i.store.val | storeVal }} = {{ false | calc }} = +{{ true | calc }}%\n
                                  \n ',n.append(_),c.append(`\n
                                  \n
                                  ${s}
                                  \n
                                  ${F("wiki_tech_special_crispr",[F("wiki_arpa_crispr_store")])} \n \n {{ 0 | storeLabel }}\n {{ 1 | storeLabel }}\n {{ 2 | storeLabel }}\n {{ 3 | storeLabel }}\n {{ 4 | storeLabel }}\n
                                  \n
                                  ${F("universe_antimatter")}
                                  \n
                                  \n
                                  \n \n \n
                                  \n `),zs({el:`#${a}StoreCalc`,data:{i:o,s:l,t:a},methods:{val(){o.res.val&&o.res.val<0&&(o.res.val=0)},pickStore(e){o.store.val=e},bleed(){"phage"!==a&&(o.antimatter.val&&"plasmid"===a||!o.antimatter.val&&"anti"===a?l.bleed.vis=!0:l.bleed.vis=!1)},resetInputs(){o.res.val=void 0,o.store.val=void 0,o.antimatter.val=!1},importInputs(){o.res.val="phage"===a?t.prestige.Phage.count:"plasmid"===a?t.prestige.Plasmid.count:t.prestige.AntiPlasmid.count,o.store.val=t.genes.store||0,o.antimatter.val="antimatter"===t.race.universe}},filters:{generic(e,t){if(void 0!==e)return e;switch(t){case"plasmid":return F("resource_Plasmid_plural_name");case"anti":return F("resource_AntiPlasmid_plural_name");case"phage":return F("resource_Phage_name")}},storeVal(e){if(void 0===e)return F("wiki_calc_store_multi");if(0===e||"phage"===a&&e<4)return 0;switch(e){case 1:return 4e-4;case 2:return 6e-4;default:return 8e-4}},effective:e=>void 0===e?0:l.bleed.vis?e/("plasmid"===a?40:4):e,storeLabel:e=>void 0===e?F("wiki_tech_special_crispr",[F("wiki_arpa_crispr_store")]):e?F("wiki_arpa_crispr_store")+": "+e:F("wiki_calc_not_owned"),bleedDiv:()=>"plasmid"===a?5:10,calc(e){if(e)return(100*l.result.val).toFixed(2);let t=o.res.val;if(l.bleed.vis&&(t/="plasmid"===a?5:10),l.result.vis=void 0!==o.res.val&&void 0!==o.store.val,l.result.vis){if(0===o.store.val||"phage"===a&&o.store.val<4)l.result.val=0;else switch(o.store.val){case 1:l.result.val=(4e-4*t).toFixed(4);break;case 2:l.result.val=(6e-4*t).toFixed(4);break;default:l.result.val=(8e-4*t).toFixed(4)}return l.result.val}}}})}function kc(e){let t=En("create",e),a=["mad","bioseed","blackhole","ascension","cataclysm","vacuum","infusion","ai","terraform"],r=a.map((e=>`${F(`wiki_resets_${e}`)}`));Tn(t,{name:"intro",template:"resets",paragraphs:3,h_level:2,para_data:{1:[a.length,r.slice(0,-1).join(", ")+`, & ${r[r.length-1]}`]},data_color:{1:["warning","plain"]}}),En("add","resets-prestige","intro",F("wiki_menu_intro"));let i=Tn(t,{name:"mad",template:"resets",paragraphs:9,break:[6,9],h_level:2,para_data:{3:[F("wiki_p_res_plasmids")],4:[F("tech_rocketry"),F("tech_mad")],5:[F("tab_civics"),F("tab_military")],6:[F("wiki_p_res_plasmids")],7:[F("wiki_p_res_plasmids")],9:[F("wiki_resets_mad")]},data_color:{3:["danger"],6:["danger"],7:["danger"]}});i=Gn(i,"mad","gain"),yc(i,"plasmid",!1,"mad"),En("add","resets-prestige","mad",F("wiki_resets_mad")),i=Tn(t,{name:"bioseed",template:"resets",paragraphs:12,break:[5,8,12],h_level:2,para_data:{2:[F("tech_genesis_ship")],3:[F("wiki_p_res_plasmids"),F("wiki_p_res_phage")],4:[F("wiki_p_res_plasmids")],5:[F("tech_genesis_ship"),F("tech_star_dock")],6:[F("tech_interstellar"),F("tech_star_dock")],7:[F("tech_genesis_ship")],9:[F("tech_interstellar"),F("star_dock_probe_desc")],10:[F("wiki_planet_planet")],12:[F("wiki_resets_bioseed")]},data_color:{3:["danger","danger"],4:["danger"]},data_link:{10:["wiki.html#planets-gameplay"]}}),i=Gn(i,"bioseed","gain"),yc(i,"plasmid",!1,"bioseed"),yc(i,"phage",!1,"bioseed"),En("add","resets-prestige","bioseed",F("wiki_resets_bioseed"));let s=[];Object.keys(Qt).forEach((function(e){s.push(e)}));let n=s.map((e=>`${F(`universe_${e}`)}`));i=Tn(t,{name:"blackhole",template:"resets",paragraphs:12,break:[3,6,9,12],h_level:2,para_data:{2:[F("wiki_p_res_plasmids"),F("wiki_p_res_phage"),F("wiki_p_res_dark")],3:[F("tech_dist_stellar_engine")],4:[F("tech_mass_ejector"),F("wiki_resets_blackhole_exotic"),.025,F("resource_Elerium_name"),F("resource_Infernite_name")],5:[F("wiki_p_res_dark")],6:[F("wiki_resets_blackhole_exotic"),F("tech_exotic_infusion")],7:[10,F("wiki_hell_soul_gem")],8:[F("tech_stabilize_blackhole"),F("wiki_resets_blackhole_exotic")],10:[s.length,n.slice(0,-1).join(", ")+`, ${F("or")} ${n[n.length-1]}`],12:[F("wiki_resets_blackhole")]},data_color:{2:["danger","danger","danger"],4:["warning","warning","warning","caution","caution"],5:["danger"],7:["warning","caution"],10:["warning","plain"]}}),i=Gn(i,"bigbang","gain"),yc(i,"plasmid",!1,"bigbang"),yc(i,"phage",!1,"bigbang"),yc(i,"dark",!1,"bigbang"),En("add","resets-prestige","blackhole",F("wiki_resets_blackhole")),i=Tn(t,{name:"vacuum",template:"resets",paragraphs:10,break:[4,8,10],h_level:2,para_data:{4:[80],6:[F("arpa_syphon_damage")],7:[80],8:[F("wiki_p_res_plasmids"),F("wiki_p_res_phage"),F("wiki_p_res_dark")],9:[F("wiki_p_res_dark")],10:[F("wiki_resets_vacuum")]},data_color:{6:["danger"],8:["danger","danger","danger"],9:["danger"]}}),i=Gn(i,"vacuum","gain"),yc(i,"plasmid",!1,"vacuum"),yc(i,"phage",!1,"vacuum"),yc(i,"dark","vacuum","vacuum"),En("add","resets-prestige","vacuum",F("wiki_resets_vacuum")),i=Tn(t,{name:"ascension",template:"resets",paragraphs:10,break:[3,5,7,10],h_level:2,para_data:{2:[F("wiki_p_res_plasmids"),F("wiki_p_res_phage"),F("wiki_p_res_harmony")],3:[F("interstellar_ascension_machine"),"10,000",F("interstellar_thermal_collector")],4:[100,25],7:["+2%"],8:["+2","+5%","+10%"],10:[F("wiki_resets_ascension")]},data_color:{2:["danger","danger","danger"]}}),i=Gn(i,"ascend","gain"),yc(i,"plasmid",!1,"ascend"),yc(i,"phage",!1,"ascend"),yc(i,"harmony",!1,"ascend"),En("add","resets-prestige","ascension",F("wiki_resets_ascension")),i=Tn(t,{name:"cataclysm",template:"resets",paragraphs:10,break:[4,7,10],h_level:2,para_data:{1:[F("planet_unstable")],2:[F("tech_world_collider")],3:[F("tech_dial_it_to_11"),F("tech_limit_collider")],6:[F("wiki_p_res_plasmids"),F("wiki_p_res_phage")],10:[F("wiki_resets_cataclysm")]},data_color:{6:["danger","danger"]}}),i=Gn(i,"cataclysm","gain"),yc(i,"plasmid",!1,"cataclysm"),yc(i,"phage",!1,"cataclysm"),En("add","resets-prestige","cataclysm",F("wiki_resets_cataclysm")),i=Tn(t,{name:"terraform",template:"resets",paragraphs:19,break:[3,6,7,10,12,19],h_level:2,para_data:{1:[F("wiki_resets_terraform"),F("evo_challenge_orbit_decay")],2:[F("wiki_resets_ascension")],3:[F("wiki_p_res_plasmids"),F("wiki_p_res_phage"),F("wiki_p_res_harmony")],7:[F("achieve_lamentis_name")],8:[1],10:[F("rejuvenated")],13:["10%"],14:["5%"],16:["2%","50%"],17:["50%"],19:[F("wiki_resets_terraform")]}}),i=Gn(i,"terraform","gain"),yc(i,"plasmid",!1,"terraform"),yc(i,"phage",!1,"terraform"),yc(i,"harmony",!1,"terraform"),En("add","resets-prestige","terraform",F("wiki_resets_terraform")),i=Tn(t,{name:"infusion",template:"resets",paragraphs:8,break:[4,8],h_level:2,para_data:{2:[F("resource_Artifact_name")],5:[F("resource_Demonic_Essence_name")],6:[F("resource_Demonic_Essence_name")],7:[F("achieve_corrupted_name")],8:[F("wiki_resets_infusion")]},data_color:{2:["danger"],7:["caution"]}}),i=Gn(i,"descend","gain"),yc(i,"artifact",!1,"descend"),En("add","resets-prestige","infusion",F("wiki_resets_infusion")),i=Tn(t,{name:"ai",template:"resets",paragraphs:8,break:[3,6,7,8],h_level:2,para_data:{2:[F("evo_challenge_truepath")],3:[F("space_ai_core"),F("wiki_resets_ai_drift"),"100%"],4:[F("tech_protocol66")],5:[F("space_ai_colonist_title"),F("space_decoder_title"),F("space_shock_trooper_title"),F("space_tank_title")],6:[F("wiki_resets_ai"),F("wiki_p_res_plasmids"),F("wiki_p_res_phage"),F("wiki_p_res_ai_core")],7:[F("genelab_genus_synthetic")],8:[F("wiki_resets_ai")]},data_color:{6:["warning","danger","danger","danger"]},data_link:{2:["wiki.html#challenges-gameplay-scenarios_truepath"],3:["wiki.html#space-tp_structures-ai_core"],4:["wiki.html#solar-tp_tech-protocol66"],5:["#space-tp_structures-ai_colonist","#space-tp_structures-decoder","#space-tp_structures-shock_trooper","#space-tp_structures-tank"]}}),i=Gn(i,"ai","gain"),yc(i,"plasmid",!1,"ai"),yc(i,"phage",!1,"ai"),yc(i,"cores",!1,"ai"),En("add","resets-prestige","ai",F("wiki_resets_ai")),i=Tn(t,{name:"matrix",template:"resets",paragraphs:6,break:[3,5,6],h_level:2,para_data:{2:[F("evo_challenge_truepath")],3:[F("tau_star_ringworld")],5:[F("wiki_resets_matrix"),F("wiki_p_res_plasmids"),F("wiki_p_res_phage"),F("civics_servants")],6:[F("wiki_resets_matrix")]},data_color:{5:["warning","danger","danger","danger"]},data_link:{2:["wiki.html#challenges-gameplay-scenarios_truepath"],3:["wiki.html#tauceti-structures-ringworld"]}}),i=Gn(i,"matrix","gain"),yc(i,"plasmid",!1,"matrix"),yc(i,"phage",!1,"matrix"),En("add","resets-prestige","matrix",F("wiki_resets_matrix")),i=Tn(t,{name:"retired",template:"resets",paragraphs:6,break:[3,5,6],h_level:2,para_data:{2:[F("evo_challenge_truepath")],3:[F("tech_matrioshka_brain"),F("tech_ignition_device")],5:[F("wiki_resets_retired"),F("wiki_p_res_plasmids"),F("wiki_p_res_phage"),F("civics_servants")],6:[F("wiki_resets_retired")]},data_color:{5:["warning","danger","danger","danger"]},data_link:{2:["wiki.html#challenges-gameplay-scenarios_truepath"],3:["wiki.html#tauceti-structures-matrioshka_brain","wiki.html#tauceti-structures-ignition_device"]}}),i=Gn(i,"retired","gain"),yc(i,"plasmid",!1,"retired"),yc(i,"phage",!1,"retired"),En("add","resets-prestige","retired",F("wiki_resets_retired")),i=Tn(t,{name:"eden",template:"resets",paragraphs:6,break:[3,5,6],h_level:2,para_data:{2:[F("evo_challenge_lone_survivor")],3:[F("tau_star_ringworld")],4:[F("tau_star_goe_facility")],5:[F("wiki_resets_eden"),F("wiki_p_res_plasmids"),F("wiki_p_res_phage"),F("civics_servants")],6:[F("wiki_resets_eden")]},data_color:{5:["warning","danger","danger","danger"]},data_link:{2:["wiki.html#challenges-gameplay-scenarios_truepath"],3:["wiki.html#tauceti-structures-ringworld"],4:["wiki.html#tauceti-structures-goe_facility"]}}),i=Gn(i,"eden","gain"),yc(i,"plasmid",!1,"eden"),yc(i,"phage",!1,"eden"),En("add","resets-prestige","eden",F("wiki_resets_eden"))}function $c(e){let a=$("#content");switch(Cs(a),e){case"basics":!function(e){Tn(e,{name:"start",template:"basics",paragraphs:2,h_level:2}),Tn(e,{name:"prehistoric",template:"basics",paragraphs:14,break:[2,6,13],h_level:2,para_data:{3:[F("resource_RNA_name"),F("resource_DNA_name")],4:[F("evo_organelles_title"),F("resource_RNA_name"),F("evo_nucleus_title"),F("resource_DNA_name")],5:[F("evo_membrane_title"),F("evo_eukaryotic_title"),F("evo_mitochondria_title")],7:[F("genelab_genus")],8:[3],13:[F("evo_sentience_title")]},data_link:{7:["wiki.html#races-species"]}}),Tn(e,{name:"civilization",template:"basics",paragraphs:14,break:[2,8,13],h_level:2,para_data:{3:[F("tab_civics")],4:[F("resource_Food_name"),F("job_farmer"),F("job_hunter")],5:["*"],8:[F("resource_Food_name")],9:[F("resource_Food_name"),F("hunger")],10:[F("resource_Food_name")],11:[F("resource_Food_name")],12:[F("resource_Food_name")],13:[F("resource_Knowledge_name")],14:[F("resource_Knowledge_name"),F("city_university")]}}),Tn(e,{name:"government",template:"basics",paragraphs:8,break:[4],h_level:2,para_data:{1:[F("tech_government"),F("tab_civics"),F("govern_anarchy")],2:[F("tech_government"),F("govern_anarchy")],3:[F("tech_government")],4:[F("morale")],5:[F("morale")],6:[F("morale"),F("job_entertainer"),F("morale_stress")],7:[F("morale_tax"),F("morale")],8:[25,100]}}),Tn(e,{name:"mad",template:"basics",paragraphs:4,h_level:2,para_data:{1:[F("wiki_resets_mad")],2:[F("wiki_basics_mad_reset"),F("tab_civics"),F("tab_military")],3:[F("tab_space")]},data_link:{2:["wiki.html#resets-prestige"]}})}(a);break;case"mechanics":!function(e){let a=En("create",e);Tn(a,{name:"save",template:"mechanics",label:F("wiki_mechanics_save"),paragraphs:8,break:[3,5],h_level:2,para_data:{1:["~5"],3:[F("wiki_mechanics_save_export")],4:[F("export")],5:[F("restore")],8:[F("restore")]}}),En("add","mechanics-gameplay","save",F("wiki_mechanics_save")),Tn(a,{name:"atime",template:"mechanics",label:F("wiki_mechanics_atime"),paragraphs:6,break:[4,6],h_level:2,para_data:{1:[F("wiki_mechanics_atime")],2:[2,F("wiki_mechanics_atime")],3:["2x",F("wiki_mechanics_atime")],4:[F("wiki_mechanics_atime"),8],5:[12,8,F("wiki_mechanics_atime")],6:[F("wiki_mechanics_atime")]}}),En("add","mechanics-gameplay","atime",F("wiki_mechanics_atime")),Tn(a,{name:"spack",template:"mechanics",label:F("wiki_mechanics_spack"),paragraphs:10,break:[4,6,7,8,9,10],h_level:2,para_data:{1:["UTF-8","JSON",".txt"],4:[`${F("wiki_mechanics_spack_para4_note")}`],6:[F("resource_Food_name"),F("wiki_mechanics_spack_para6_note1"),F("city_biolab"),F("wiki_mechanics_spack_para6_note2")]}}),En("add","mechanics-gameplay","spack",F("wiki_mechanics_spack")),Tn(a,{name:"job",template:"mechanics",label:F("wiki_mechanics_job"),paragraphs:9,break:[5],h_level:2,para_data:{1:[F("wiki_mechanics_job")],2:["*"],3:[F("wiki_mechanics_job")]}}),En("add","mechanics-gameplay","job",F("wiki_mechanics_job")),function(e){let a=$('
                                  ');e.append(a);let r=$("
                                  "),i=$("
                                  "),s=$("
                                  ");a.append(r),a.append(i),a.append(s);let n={job:{val:void 0},content:{vis:!1,val:void 0},freespirit:{vis:!1,val:void 0},mellow:{val:!1},dense:{vis:!1,val:!1,formVis:!1},workers:{val:void 0},playful:{vis:!1,val:!1},high_pop:{val:void 0},emotionless:{val:void 0},government:{val:void 0},annexed:{vis:!1,val:void 0},electricity:{vis:!1,val:!1},virtual_reality:{val:!1}},c={result:{vis:!1,val:void 0},total:{vis:!1,val:0}},o=["soldier"];Object.keys(Yt).forEach((function(e){"unemployed"!==e&&"forager"!==e&&o.push(e)}));let l=`\n
                                  ${F("wiki_calc_job_stress_job")} \n `;o.forEach((function(e){l+=`\n {{ '${e}' | jobLabel }}`})),l+="\n
                                  \n ",r.append(l),i.append(`\n
                                  \n

                                  ${F("wiki_calc_job_stress_divisor")}

                                  \n
                                  \n
                                  \n ({{ i.job.val | stressDiv }} + ({{ i.content.val, 'content' | generic }} * {{ i.job.val | contentVal }}) {{ i.job.val | mellowOp }} - 1) / {{ i.freespirit.val, 'freespirit', 0 | traitVal }} = {{ | calc }}\n
                                  \n
                                  \n

                                  ${F("wiki_calc_job_stress_generated")}

                                  \n
                                  \n
                                  \n 0 * {{ i.workers.val, 'workers' | generic }} / {{ i.high_pop.val, 'high_pop', 0 | traitVal }} / {{ s.result.val, 'divisor' | generic }} * {{ i.emotionless.val, 'emotionless', 1 | traitVal }} * {{ i.government.val, i.electricity.val, i.virtual_reality.val | govVal }} * {{ i.annexed.val | anxVal }} = -{{ | calcTotal }}%\n
                                  \n `),s.append(`\n
                                  \n
                                  ${F("wiki_calc_job_stress_content")}
                                  \n
                                  ${F("planet_mellow")}
                                  \n
                                  ${F("planet_dense")}
                                  \n
                                  ${F("trait_freespirit_name")} \n \n {{ 0 | traitLabel }}\n {{ 0.25 | traitLabel }}\n {{ 0.5 | traitLabel }}\n {{ 1 | traitLabel }}\n {{ 2 | traitLabel }}\n {{ 3 | traitLabel }}\n
                                  \n
                                  \n
                                  \n
                                  {{ i.job.val | workersLabel }}
                                  \n
                                  ${F("wiki_calc_job_stress_annexed")}
                                  \n
                                  ${F("civics_government")} \n \n {{ 'anarchy' | govLabel }}\n {{ 'autocracy' | govLabel }}\n {{ 'federation' | govLabel }}\n {{ 'socialist' | govLabel }}\n {{ 'other' | govLabel }}\n
                                  \n
                                  ${F("tech_electricity")}
                                  \n
                                  ${F("tech_virtual_reality")}
                                  \n
                                  ${F("trait_playful_name")}
                                  \n
                                  ${F("trait_high_pop_name")} \n \n {{ 0 | traitLabel }}\n {{ 0.25 | traitLabel }}\n {{ 0.5 | traitLabel }}\n {{ 1 | traitLabel }}\n {{ 2 | traitLabel }}\n {{ 3 | traitLabel }}\n
                                  \n
                                  ${F("trait_emotionless_name")} \n \n {{ 0 | traitLabel }}\n {{ 0.25 | traitLabel }}\n {{ 0.5 | traitLabel }}\n {{ 1 | traitLabel }}\n {{ 2 | traitLabel }}\n {{ 3 | traitLabel }}\n
                                  \n
                                  \n
                                  \n \n \n
                                  \n `),zs({el:"#jobStressCalc",data:{i:n,s:c},methods:{val(e){n[e].val&&n[e].val<0&&(n[e].val=0),"annexed"===e&&n[e].val>3&&(n[e].val=3)},pickJob(e){n.job.val=e,n.content.vis="hunter"!==e&&"soldier"!==e,n.freespirit.vis=!["hunter","soldier","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].includes(e),n.dense.vis="miner"===e,n.playful.vis="hunter"===e},pickGov(e){n.government.val=e,n.annexed.vis="federation"!==e,n.electricity.vis="autocracy"===e},pickTrait(e,t){n[t].val=e},resetInputs(){n.job.val=void 0,n.content.val=void 0,n.content.vis=!1,n.freespirit.val=void 0,n.freespirit.vis=!1,n.mellow.val=!1,n.dense.val=!1,n.dense.vis=!1,n.workers.val=void 0,n.playful.val=!1,n.playful.vis=!1,n.government.val=void 0,n.annexed.val=void 0,n.annexed.vis=!1,n.electricity.val=!1,n.electricity.vis=!1,n.virtual_reality.val=!1,n.high_pop.val=void 0,n.emotionless.val=void 0,c.result.val=void 0},importInputs(){if(n.content.val=t.race.content?t.race.content:0,n.freespirit.val=t.race.freespirit?t.race.freespirit:0,n.mellow.val=!(!t.city.ptrait||!t.city.ptrait.includes("mellow")),n.dense.val=!(!t.city.ptrait||!t.city.ptrait.includes("dense")),n.workers.val="soldier"===n.job.val?t.civic.garrison&&t.civic.garrison.max?t.civic.garrison.max:0:t.civic[n.job.val]?t.civic[n.job.val].workers:0,n.playful.val=!!t.race.playful,n.high_pop.val=t.race.high_pop?t.race.high_pop:0,n.emotionless.val=t.race.emotionless?t.race.emotionless:0,t.civic.govern){let e=t.civic.govern.type;switch(e){case"autocracy":case"anarchy":case"socialist":case"federation":n.government.val=e;break;default:n.government.val="other"}n.annexed.vis="federation"!==e,n.electricity.vis="autocracy"===e}if(n.annexed.val=0,t.civic.foreign)for(let e=0;e<3;e++)t.civic.foreign["gov"+e].anx&&n.annexed.val++;n.electricity.val=!!t.tech.high_tech&&t.tech.high_tech>=2,n.virtual_reality.val=!!t.tech.high_tech&&t.tech.high_tech>=12}},filters:{generic:(e,t)=>("workers"===t&&"soldier"===n.job.val&&(t="soldiers"),void 0!==e?e:F("wiki_calc_job_stress_"+t)),jobLabel:e=>e?"soldier"===e?F("governor_soldier"):"titan_colonist"===e?F("job_colonist_tp",[Dn("titan")]):F("job_"+e):F("wiki_calc_job_stress_job"),workersLabel:e=>F("soldier"===e?"wiki_calc_job_stress_soldiers":"wiki_calc_job_stress_workers"),govLabel:e=>F(e?"other"===e?"wiki_calc_job_stress_government_other":"govern_"+e:"civics_government"),traitLabel:e=>void 0===e?F("wiki_calc_trait_undefined"):0===e?F("wiki_calc_trait_unowned"):e,stressDiv(e){if(!e)return F("base");switch(e){case"hunter":return 5;case"soldier":return 2;default:return t.civic[e].stress}},contentVal:e=>e?"hell_surveyor"===e?.2:.4:F("wiki_calc_job_stress_content_multi"),mellowOp(e){switch(e){case"hunter":case"soldier":return`* ${ns.mellow.vars()[0]}`;default:return`+ ${ns.mellow.vars()[1]}`}},govVal(e,t,a){if(!e)return F("wiki_calc_job_stress_government");switch(e){case"anarchy":return.5;case"autocracy":return t?a?1.1:1.18:1.25;case"socialist":return 1.1;default:return 1}},anxVal:e=>void 0!==e?+(1.1**e).toFixed(5):F("civics_spy_purchase_bd"),traitVal(e,t,a){switch(t){case"freespirit":return 1+Ki.freespirit.vars(e)[a]/100;case"high_pop":return Ki.high_pop.vars(e)[a];case"emotionless":return 1-Ki.emotionless.vars(e)[a]/100}},calc(){let e=void 0!==n.job.val&&void 0!==n.freespirit.val;if("hunter"!==n.job.val&&"soldier"!==n.job.val&&(e=e&&void 0!==n.content.val),c.result.vis=e,c.result.vis){let e="hunter"===n.job.val?5:"soldier"===n.job.val?2:t.civic[n.job.val].stress;return"hunter"===n.job.val||"soldier"===n.job.val?n.mellow.val&&(e*=ns.mellow.vars()[0]):(n.mellow.val&&(e+=ns.mellow.vars()[1]),e+=("hell_surveyor"===n.job.val?.2:.4)*n.content.val,n.dense.val&&"miner"===n.job.val&&(e-=ns.dense.vars()[1]),n.freespirit.val&&!["farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].includes(n.job.val)&&(e/=1+Ki.freespirit.vars(n.freespirit.val)[0]/100)),c.result.val=+e.toFixed(4),c.result.val}c.result.val=void 0},calcTotal(){let e=n.playful.val&&"hunter"===n.job.val;if(e)c.total.vis=e,c.total.val=0;else if(e=c.result.vis&&n.government.val&&void 0!==n.workers.val&&void 0!==n.high_pop.val&&void 0!==n.emotionless.val,"federation"!==n.government.val&&(e=e&&void 0!==n.annexed.val),c.total.vis=e,c.total.vis){let e=n.workers.val/c.result.val;if("federation"!==n.government.val)switch(e*=1.1**n.annexed.val,n.government.val){case"anarchy":e/=2;break;case"autocracy":e*=n.electricity.val?n.virtual_reality.val?1.1:1.18:1.25;break;case"socialist":e*=1.1}n.high_pop.val&&(e/=Ki.high_pop.vars(n.high_pop.val)[0]),n.emotionless.val&&(e*=1-Ki.emotionless.vars(n.emotionless.val)[1]/100),c.total.val=+e.toFixed(3)}return c.total.val}}})}(Gn(Tn(a,{name:"job_stress",template:"mechanics",label:F("wiki_mechanics_job_stress"),paragraphs:7,break:[3,5,6,7],h_level:2,para_data:{2:[F("job_unemployed"),F("trait_content_name")],3:[F("wiki_calc_job_stress_divisor"),1],4:[F("trait_freespirit_name"),F("trait_content_name"),F("planet_mellow")],6:[F("trait_optimistic_name"),F("trait_pessimistic_name"),F("morale_stress"),F("morale")],7:[F("civics_garrison_annex")]},data_link:{2:[!1,"wiki.html#traits-species-minor_content"],4:["wiki.html#traits-species-major_freespirit","wiki.html#traits-species-minor_content","wiki.html#planets-gameplay-mellow"],6:["wiki.html#traits-species-major_optimistic","wiki.html#traits-species-major_pessimistic"]}}),"mechanics","job_stress",F("wiki_mechanics_job_stress"))),En("add","mechanics-gameplay","job_stress",F("wiki_mechanics_job_stress")),Tn(a,{name:"multiplier",template:"mechanics",label:F("wiki_mechanics_multiplier"),paragraphs:5,break:[4],h_level:2,para_data:{1:[F("wiki_mechanics_multiplier")],2:["10x",t.settings.keyMap.x10,"25x",t.settings.keyMap.x25,"100x",t.settings.keyMap.x100],4:[F("wiki_mechanics_multiplier")],5:[F("wiki_mechanics_multiplier")]},data_color:{2:["warning","caution","warning","caution","warning","caution"]}}),En("add","mechanics-gameplay","multiplier",F("wiki_mechanics_multiplier")),Tn(a,{name:"cost_creep",template:"mechanics",label:F("wiki_mechanics_cost_creep"),paragraphs:7,break:[4,7],h_level:2,para_data:{2:[F("resource_Lumber_name"),200,1.3,"200*1.3=260","200*1.3^2=338"],3:[F("wiki_menu_arpa")],5:[F("tech_steel_beams"),F("trait_large_name"),F("tab_arpa_crispr"),F("wiki_arpa_crispr_creep")],6:[F("trait_creative_name"),F("wiki_menu_arpa")],7:[1.005]},data_link:{3:["wiki.html#projects-arpa"],5:["wiki.html#discovery-tech-steel_beams","wiki.html#traits-species-genus_large",!1,"wiki.html#crispr-prestige-genetic_memory"],6:["wiki.html#traits-species-major_creative"]}}),En("add","mechanics-gameplay","cost_creep",F("wiki_mechanics_cost_creep")),Tn(a,{name:"queue",template:"mechanics",label:F("wiki_mechanics_queue"),paragraphs:13,break:[4,6,9,10,11,13],h_level:2,para_data:{1:[F("wiki_mechanics_queue"),F("tech_urban_planning")],2:[F("building_queue")],4:[F("wiki_mechanics_queue_research"),F("tech_assistant")],7:[F("q_key"),t.settings.keyMap.q],8:[F("q_key")],10:[F("q_any")],12:[F("q_merge")]},data_color:{7:["warning","caution"]}}),En("add","mechanics-gameplay","queue",F("wiki_mechanics_queue"));{let e=Tn(a,{name:"multipliers",template:"mechanics",label:F("wiki_mechanics_multipliers"),paragraphs:1,h_level:2});Tn(e,{name:"multipliers_prod",template:"mechanics",label:F("wiki_mechanics_multipliers"),paragraphs:4,break:[3,4],h_level:!1,para_data:{3:[F("wiki_mechanics_multipliers_struct"),F("wiki_mechanics_multipliers_bonus")]}}).append('
                                  '),Tn(e,{name:"multipliers_dis",template:"mechanics",label:F("wiki_mechanics_multipliers"),paragraphs:7,break:[3,4],h_level:!1,para_data:{3:[F("wiki_mechanics_multipliers_base"),F("wiki_mechanics_multipliers_discount"),F("wiki_mechanics_multipliers_struct")],5:[F("city_mass_driver")],6:[100,F("city_mass_driver"),"5%",95,35.84],7:[100,.95,20,35.84]},data_link:{5:["wiki.html#planetary-structures-mass_driver"]}}),e.append(`
                                  ${F("wiki_mechanics_multipliers_exception")}
                                  `),En("add","mechanics-gameplay","multipliers",F("wiki_mechanics_multipliers"))}Tn(a,{name:"blocking",template:"mechanics",label:F("wiki_mechanics_blocking"),paragraphs:6,break:[4,6],h_level:2,para_data:{2:[F("color_red")],3:[F("color_orange")],5:[F("color_red")]},data_color:{2:["danger"],3:["caution"],5:["danger"]}}).append('
                                  '),En("add","mechanics-gameplay","blocking",F("wiki_mechanics_blocking")),Tn(a,{name:"astro",template:"mechanics",label:F("wiki_mechanics_astro"),paragraphs:15,break:[3,4,5,6,7,8,9,10,11,12,13,14,15],h_level:2,para_data:{2:[12],3:[F("sign_aries"),F("sign_aries_symbol"),N("aries")[0]+"%"],4:[F("sign_taurus"),F("sign_taurus_symbol"),N("taurus")[0]+"%"],5:[F("sign_gemini"),F("sign_gemini_symbol"),N("gemini")[0]+"%"],6:[F("sign_cancer"),F("sign_cancer_symbol"),N("cancer")[0]],7:[F("sign_leo"),F("sign_leo_symbol"),N("leo")[0]+"%"],8:[F("sign_virgo"),F("sign_virgo_symbol"),N("virgo")[0]+"%"],9:[F("sign_libra"),F("sign_libra_symbol"),N("libra")[0]+"%"],10:[F("sign_scorpio"),F("sign_scorpio_symbol"),N("scorpio")[0]+"%"],11:[F("sign_sagittarius"),F("sign_sagittarius_symbol"),N("sagittarius")[0]+"%"],12:[F("sign_capricorn"),F("sign_capricorn_symbol"),N("capricorn")[0]+"%"],13:[F("sign_aquarius"),F("sign_aquarius_symbol"),N("aquarius")[0]+"%"],14:[F("sign_pisces"),F("sign_pisces_symbol")],15:[F(`sign_${R()}`)]},data_color:{3:["warning","caution","warning"],4:["warning","caution","warning"],5:["warning","caution","warning"],6:["warning","caution","warning"],7:["warning","caution","warning"],8:["warning","caution","warning"],9:["warning","caution","warning"],10:["warning","caution","warning"],11:["warning","caution","warning"],12:["warning","caution","warning"],13:["warning","caution","warning"],14:["warning","caution"],15:["caution"]}}),En("add","mechanics-gameplay","astro",F("wiki_mechanics_astro")),Tn(a,{name:"bank_vault",template:"mechanics",label:F("wiki_mechanics_bank_vault"),paragraphs:2,h_level:2,para_data:{1:[F("city_bank"),F("interstellar_exchange_title"),F("portal_arcology_title"),F("resource_Money_name"),F("wiki_mechanics_bank_vault"),F("space_red_spaceport_title"),F("wiki_challenges_scenarios_cataclysm")],2:[F("resource_Money_name"),F("city_bank"),F("tech_adamantite_vault"),F("governor_entrepreneur"),F("trait_paranoid_name"),F("tech_stock_market"),F("tech_unification"),F("wiki_challenges_modes_inflation")]},data_link:{1:["wiki.html#planetary-structures-bank","wiki.html#interstellar-structures-exchange","wiki.html#hell-structures-arcology",!1,!1,"wiki.html#space-structures-spaceport","wiki.html#challenges-gameplay-scenarios_cataclysm"],2:[!1,!1,"wiki.html#interstellar-tech-adamantite_vault","wiki.html#governor-gameplay-entrepreneur","wiki.html#traits-species-major_paranoid","wiki.html#projects-arpa-stock_exchange","wiki.html#early_space-tech-unification2","wiki.html#challenges-gameplay-modes_inflation"]}}),En("add","mechanics-gameplay","bank_vault",F("wiki_mechanics_bank_vault")),Tn(a,{name:"homeless",template:"mechanics",label:F("wiki_mechanics_homeless"),paragraphs:4,break:[3],h_level:2,para_data:{3:[F("arpa_projects_railway_title")]},data_link:{3:["wiki.html#projects-arpa-railway"]}}),En("add","mechanics-gameplay","homeless",F("wiki_mechanics_homeless")),function(e){let a=$('
                                  ');e.append(a),a.append(`

                                  ${F("wiki_mechanics_warmonger")}

                                  `);let r=$("
                                  "),i=$("
                                  ");a.append(r),a.append(i);let s={fatigue:{val:void 0},protest:{val:void 0}},n={result:{vis:!1,val:0}};r.append(`\n
                                  \n log2({{ i.fatigue.val, 'fatigue' | generic }} + {{ i.protest.val, 'protest' | generic }}) = {{ false | calc }} = {{ true | calc }}% ${F("wiki_mechanics_warmonger")}\n
                                  \n `),i.append(`\n
                                  \n
                                  ${F("wiki_calc_warmonger_fatigue")}
                                  \n
                                  ${F("wiki_calc_warmonger_protest")}
                                  \n
                                  \n
                                  \n \n \n
                                  \n `),zs({el:"#warmongerCalc",data:{i:s,s:n},methods:{val(e){s[e].val&&s[e].val<0&&(s[e].val=0)},resetInputs(){s.fatigue.val=void 0,s.protest.val=void 0},importInputs(){s.fatigue.val=t.civic.garrison&&t.civic.garrison.fatigue?t.civic.garrison.fatigue:0,s.protest.val=t.civic.garrison&&t.civic.garrison.protest?t.civic.garrison.protest:0}},filters:{generic:(e,t)=>void 0!==e?e:F("wiki_calc_warmonger_"+t),calc:e=>e?Math.round(n.result.val):(n.result.vis=void 0!==s.fatigue.val&&void 0!==s.protest.val&&s.fatigue.val+s.protest.val>=1,n.result.vis?(n.result.val=Math.log2(s.fatigue.val+s.protest.val),n.result.val):void 0)}})}(Gn(Tn(a,{name:"warmonger",template:"mechanics",label:F("wiki_mechanics_warmonger"),paragraphs:8,break:[4],h_level:2,para_data:{2:[F("trait_immoral_name")],3:[F("govern_autocracy"),F("trait_blood_thirst_name")],4:[F("wiki_calc_warmonger_fatigue"),F("wiki_calc_warmonger_protest")],5:[F("achieve_warmonger_name")],6:[F("wiki_calc_warmonger_fatigue"),1,F("wiki_calc_warmonger_protest")],7:[F("wiki_calc_warmonger_fatigue"),F("wiki_calc_warmonger_protest"),1,0],8:[`log2(${F("wiki_calc_warmonger_fatigue")} + ${F("wiki_calc_warmonger_protest")})`]},data_link:{2:["wiki.html#traits-species-genus_immoral"],3:["wiki.html#government-gameplay-autocracy","wiki.html#traits-species-major_blood_thirst"]}}),"mechanics","warmonger",F("wiki_mechanics_warmonger"))),En("add","mechanics-gameplay","warmonger",F("wiki_mechanics_warmonger")),function(e){let t=$('
                                  ');e.append(t);let a=$("
                                  "),r=$("
                                  ");t.append(a),t.append(r);let i={military:{val:void 0},relations:{val:void 0},unrest:{val:void 0},spies:{val:void 0},infiltrator:{val:!1}},s={base:{vis:!1,val:void 0},total:{vis:!1,val:void 0}};a.append(`\n
                                  \n

                                  ${F("wiki_calc_spy_cost_base_title")}

                                  \n
                                  \n
                                  \n ({{ i.military.val, 'mil_rate' | generic }} / 2) + ((100 - {{ i.relations.val, 'relations' | generic }}) / 2) - {{ i.unrest.val, 'unrest' | generic }} + 10 = {{ | calcBase }}\n
                                  \n
                                  \n

                                  ${F("wiki_calc_spy_cost_total")}

                                  \n
                                  \n
                                  \n ({{ s.base.val, 'unrest' | generic }} / 3)^({{ i.spies.val, 'spies' | generic }} + 1) + 500 = {{ | calcTotal }}\n
                                  \n `),r.append(`\n
                                  \n
                                  ${F("civics_gov_mil_rate")}
                                  \n
                                  ${F("civics_gov_relations")}
                                  \n
                                  ${F("civics_gov_unrest")}
                                  \n
                                  \n
                                  \n
                                  ${F("wiki_calc_spy_cost_spies")}
                                  \n
                                  ${F("trait_infiltrator_name")}
                                  \n
                                  \n
                                  \n \n
                                  \n `),zs({el:"#spyCostCalc",data:{i,s},methods:{val(e){i[e].val&&i[e].val<0&&(i[e].val=0),"military"!==e&&"spies"!==e&&i[e].val>100?i[e].val=100:"military"===e&&i[e].val<50&&(i[e].val=50)},resetInputs(){i.military.val=void 0,i.relations.val=void 0,i.unrest.val=void 0,i.spies.val=void 0,i.infiltrator.val=!1,s.base.val=void 0}},filters:{generic(e,t){if(void 0!==e)return e;switch(t){case"spies":case"base":return F("wiki_calc_spy_cost_"+t);default:return F("civics_gov_"+t)}},calcBase(){if(s.base.vis=void 0!==i.military.val&&void 0!==i.relations.val&&void 0!==i.unrest.val,s.base.vis){let e=i.military.val/2+(100-i.relations.val)/2-i.unrest.val+10;return e<50&&(e=50),s.base.val=+e.toFixed(4),s.base.val}},calcTotal(){if(s.total.vis=void 0!==s.base.val&&void 0!==i.spies.val,s.total.vis){let e=s.base.val;return i.infiltrator.val&&(e/=3),s.total.val=+(e**(i.spies.val+1)+500).toFixed(2),s.total.val}}}})}(Gn(Tn(a,{name:"spy",template:"mechanics",label:F("wiki_mechanics_spy"),paragraphs:8,break:[3,4,5,6,7],h_level:2,para_data:{1:[F("tech_spy")],4:[1,F("civics_gov_relations"),F("civics_gov_mil_rate")],5:[2,F("civics_gov_mil_rate"),F("civics_gov_eco_rate")],6:[3,F("civics_gov_eco_rate"),F("civics_gov_unrest")],7:[4,F("civics_gov_unrest")],8:[4],9:[F("tech_espionage")]},data_link:{1:["wiki.html#civilized-tech-spy"],9:["wiki.html#civilized-tech-espionage"]}}),"mechanics","spy_cost")),En("add","mechanics-gameplay","spy",F("wiki_mechanics_spy")),function(e){let t=$('
                                  ');e.append(t);let a=$("
                                  "),r=$("
                                  ");t.append(a),t.append(r);let i={relations:{val:void 0},economic:{val:void 0},unrest:{val:void 0}},s={annex:{vis:!1,val:void 0},purchase:{vis:!1,val:void 0}};a.append(`\n
                                  \n

                                  ${F("wiki_calc_occupation_annex")}

                                  \n
                                  \n
                                  \n 300 - {{ i.relations.val, 'relations' | generic }} - {{ i.unrest.val, 'unrest' | generic }} = {{ | calcAnnex }}%\n
                                  \n
                                  \n

                                  ${F("wiki_calc_occupation_purchase")}

                                  \n
                                  \n
                                  \n ({{ i.economic.val, 'eco_rate' | generic }} * 15384) * (1 + (0.016 * (100 - {{ i.relations.val, 'relations' | generic }}))) * (1 - (0.0025 * {{ i.unrest.val, 'unrest' | generic }})) = {{ | calcPurchase }}\n
                                  \n `),r.append(`\n
                                  \n
                                  ${F("civics_gov_relations")}
                                  \n
                                  ${F("civics_gov_eco_rate")}
                                  \n
                                  ${F("civics_gov_unrest")}
                                  \n
                                  \n
                                  \n \n
                                  \n `),zs({el:"#occupationCalc",data:{i,s},methods:{val(e){i[e].val&&i[e].val<0&&(i[e].val=0),"economic"!==e&&i[e].val>100&&(i[e].val=100)},resetInputs(){i.relations.val=void 0,i.economic.val=void 0,i.unrest.val=void 0}},filters:{generic:(e,t)=>void 0!==e?e:F("civics_gov_"+t),calcAnnex(){if(s.annex.vis=void 0!==i.relations.val&&void 0!==i.unrest.val,s.annex.vis)return s.annex.val=300-i.relations.val-i.unrest.val,s.annex.val},calcPurchase(){if(s.purchase.vis=void 0!==i.relations.val&&void 0!==i.economic.val&&void 0!==i.unrest.val,s.purchase.vis)return s.purchase.val=+(15384*i.economic.val*(1+.016*(100-i.relations.val))*(1-.0025*i.unrest.val)).toFixed(0),s.purchase.val}}})}(Gn(Tn(a,{name:"occupying",template:"mechanics",label:F("wiki_mechanics_occupying"),paragraphs:20,break:[3,8,12,16,18,19,20],h_level:2,para_data:{1:[F("civics_foreign"),F("civics_garrison_tactic_siege"),F("civics_spy_annex"),F("civics_spy_purchase")],2:["+5%","+8%",F("govern_federation")],3:[F("civics_garrison_tactic_siege"),20],5:[F("civics_garrison"),F("civics_garrison_tactic_siege")],6:[F("civics_garrison_unoccupy"),F("tech_unification")],7:[F("govern_federation"),15],8:["50%",F("civics_gov_relations"),"50%",F("civics_gov_unrest"),`(300 - ${F("civics_gov_relations")} - ${F("civics_gov_unrest")})`,F("morale")],9:["50%",F("civics_gov_relations"),"50%",F("civics_gov_unrest"),F("civics_spy_annex")],10:[F("morale"),F("civics_spy_annex")],11:[F("morale_stress"),"1.1x",F("govern_federation")],12:[F("resource_Money_name")],13:[3,F("tech_spy"),F("civics_spy_purchase")],14:[F("wiki_mechanics_occupying_para14_note1",[F("civics_gov_eco_rate"),F("civics_gov_relations"),F("civics_gov_unrest")]),F("resource_Money_name"),F("civics_spy_purchase")],15:[F("civics_garrison_purchase"),F("resource_Money_name"),F("morale_tax"),"20%",F("govern_federation")],16:[F("tech_unification")],17:[F("civics_garrison_occupy")],18:[F("achieve_world_domination_name")],19:[F("achieve_illuminati_name")],20:[F("achieve_syndicate_name")]},data_link:{2:[!1,!1,"wiki.html#government-gameplay-federation"],6:[!1,"wiki.html#early_space-tech-unification2"],7:["wiki.html#government-gameplay-federation"],11:[!1,!1,"wiki.html#government-gameplay-federation"],15:[!1,!1,!1,!1,"wiki.html#government-gameplay-federation"],16:["wiki.html#early_space-tech-unification2"]}}),"mechanics","occupation")),En("add","mechanics-gameplay","occupying",F("wiki_mechanics_occupying")),Tn(a,{name:"religion",template:"mechanics",label:F("wiki_mechanics_religion"),paragraphs:20,break:[3,6,8,15,20],h_level:2,para_data:{1:[F("wiki_mechanics_religion")],3:[F("city_temple")],4:[F("city_temple"),F("resource_Plasmid_plural_name")],5:[F("evo_challenge_plasmid"),F("faith")],6:[F("tech_fanaticism"),F("tech_anthropology")],8:[F("tech_fanaticism"),F("tech_indoctrination"),F("tech_missionary"),F("tech_zealotry")],9:[F("tech_fanaticism")],10:[F("wiki_menu_species")],11:[5],12:[F("tech_indoctrination")],13:[F("tech_missionary")],14:[F("tech_zealotry")],15:[F("tech_anthropology"),F("tech_mythology"),F("tech_archaeology"),F("tech_merchandising")],16:[F("tech_anthropology")],17:[F("tech_mythology")],18:[F("tech_archaeology")],19:[F("tech_merchandising")],20:[F("tab_arpa_crispr"),F("wiki_arpa_crispr_transcendence")]},data_link:{10:["wiki.html#races-species"],20:["wiki.html#crispr-prestige","wiki.html#crispr-prestige-transcendence"]}}),En("add","mechanics-gameplay","religion",F("wiki_mechanics_religion"));{let e=`${Us("star")}`,t=`${Us("star")}`,r=`${Us("star")}`,i=`${Us("star")}`;Tn(a,{name:"challenge",template:"mechanics",label:F("wiki_mechanics_challenge"),paragraphs:15,break:[4,8,14],h_level:2,para_data:{1:[F("wiki_mechanics_challenge"),F("wiki_menu_prehistoric"),F("tab_arpa_crispr"),F("arpa_genepool_hardened_genes_title")],2:[4,F("evo_challenge_plasmid"),F("evo_challenge_trade"),F("evo_challenge_craft"),F("evo_challenge_crispr")],4:[F("evo_challenge_plasmid"),F("resource_Plasmid_plural_name")],5:[F("evo_challenge_trade")],6:[F("evo_challenge_craft")],7:[F("evo_challenge_crispr"),F("wiki_arpa_crispr_creep"),"20%"],8:[F("wiki_mechanics_challenge")],9:[1,e,F("plain"),"5%"],10:[2,t,F("bronze"),"12%"],11:[3,r,F("silver"),"25%"],12:[4,i,F("gold"),"45%"],14:[F("wiki_mechanics_challenge"),e]},data_color:{2:["caution","warning","warning","warning","warning"],7:["warning","warning","caution"],9:["caution",!1,"warning","warning"],10:["caution",!1,"warning","warning"],11:["caution",!1,"warning","warning"],12:["caution",!1,"warning","warning"]},data_link:{1:[!1,!1,"wiki.html#crispr-prestige","wiki.html#crispr-prestige-hardened_genes"],7:[!1,"wiki.html#crispr-prestige-genetic_memory",!1]}}),En("add","mechanics-gameplay","challenge",F("wiki_mechanics_challenge"))}Tn(a,{name:"mastery",template:"mechanics",label:F("mastery"),paragraphs:15,break:[3,8,10,13],h_level:2,para_data:{1:[F("mastery"),F("tab_arpa_crispr"),F("arpa_genepool_unlocked_title")],2:[F("mastery"),F("tab_achieve")],4:["0.15%","0.10%"],5:[1],6:[1,5],7:["1.25%"],9:[F("standard"),"0.25%"],10:[F("arpa_genepool_universal_title"),F("arpa_genepool_standard_title")],11:[F("arpa_genepool_universal_title"),"0.05%","0.10%","0.15%"],12:["0.30%","1.50%"],13:[F("arpa_genepool_standard_title"),"0.05%"],15:[F("arpa_genepool_standard_title"),"0.20%","0.10%"]},data_color:{4:["caution","caution"],5:["caution"],6:["caution","caution"],7:["caution"],9:[!1,"caution"],11:["warning","caution","caution","caution"],12:["caution","caution"],13:["warning","caution"],15:["warning","caution","caution"]},data_link:{1:[!1,"wiki.html#crispr-prestige","wiki.html#crispr-prestige-unlocked"],9:["wiki.html#universes-gameplay"],10:["wiki.html#crispr-prestige-universal","wiki.html#crispr-prestige-standard"]}}),En("add","mechanics-gameplay","mastery",F("mastery")),function(e){let a=$('
                                  ');e.append(a);let r=$("
                                  "),i=$("
                                  ");a.append(r),a.append(i);let s={mutations:{val:void 0},days:{val:void 0}},n={game:{vis:!1,val:void 0},real:{vis:!1,val:void 0}};r.append(`\n
                                  \n

                                  ${F("wiki_calc_g_decay_game")}

                                  \n
                                  \n
                                  \n (50000000 / (1 + {{ i.mutations.val, 'mutations' | generic }})) - {{ i.days.val, 'days' | generic }} = {{ false | calc }}\n
                                  \n
                                  \n

                                  ${F("wiki_calc_g_decay_real")}

                                  \n
                                  \n
                                  \n {{ s.game.val, 'game' | generic }} / 17280 = {{ true | calc }}\n
                                  \n `),i.append(`\n
                                  \n
                                  ${F("wiki_calc_g_decay_mutations")}
                                  \n
                                  ${F("wiki_calc_g_decay_days")}
                                  \n
                                  \n
                                  \n \n \n
                                  \n `),zs({el:"#genomeDecayCalc",data:{i:s,s:n},methods:{val(e){s[e].val&&s[e].val<0&&(s[e].val=0)},resetInputs(){s.mutations.val=void 0,s.days.val=void 0},importInputs(){s.mutations.val=t.race.mutation,s.days.val=t.stats.days}},filters:{generic:(e,t)=>void 0!==e?e:F("wiki_calc_g_decay_"+t),calc:e=>e?n.real.val:(n.game.vis=void 0!==s.mutations.val&&void 0!==s.days.val,n.real.vis=n.game.vis,n.game.vis?(n.game.val=+(5e7/(1+s.mutations.val)-s.days.val).toFixed(0),n.real.val=+(n.game.val/17280).toFixed(6),n.game.val):(n.game.val=void 0,void(n.real.val=void 0)))}})}(Gn(Tn(a,{name:"genome_decay",template:"mechanics",label:F("wiki_mechanics_genome_decay"),paragraphs:4,break:[3],h_level:2,para_data:{1:[F("wiki_mechanics_genome_decay_para1_note1",[F("wiki_calc_g_decay_mutations")]),F("wiki_mechanics_genome_decay")],2:["2-3"],3:[F("wiki_mechanics_genome_decay"),F("resource_Plasmid_name"),"+0%"],4:[F("tech_genetic_decay"),F("trait_fortify_name"),F("wiki_mechanics_genome_decay"),F("resource_Plasmid_name"),"+0%"]},data_link:{4:["wiki.html#early_space-tech-genetic_decay","wiki.html#traits-species-special_fortify"]}}),"mechanics","g_decay",F("wiki_mechanics_genome_decay"))),En("add","mechanics-gameplay","genome_decay",F("wiki_mechanics_genome_decay")),Tn(a,{name:"crispr_mutation",template:"mechanics",label:F("wiki_mechanics_crispr_mutation"),paragraphs:5,break:[3],h_level:2,para_data:{1:[F("tab_arpa_crispr"),F("arpa_genepool_mutation_title"),F("resource_Plasmid_plural_name")],3:[F("tech_arpa"),F("tab_arpa_genetics")],4:["5x",F("wiki_mechanics_crispr_mutation_para4_note1")],5:[F("wiki_mechanics_custom"),F("race_sludge"),"10x"]},data_link:{1:[!1,"wiki.html#crispr-prestige-mutation","wiki.html#resources-prestige-plasmids"],4:[!1,"wiki.html#traits-species"],5:["wiki.html#custom-species","wiki.html#races-species-sludge"]}}),En("add","mechanics-gameplay","crispr_mutation",F("wiki_mechanics_crispr_mutation"));{let e=Tn(a,{name:"planet",template:"planet",label:F("wiki_menu_planets"),paragraphs:4,h_level:2,para_data:{2:[365,"25%"],3:[4],4:["200-600"]}});Tn(a,{name:"geology",template:"planet",label:F("wiki_menu_planets"),paragraphs:4,h_level:2,para_data:{2:[2],3:["-10%","+19%"],4:[7,"+44%"]}},e),Tn(a,{name:"seeother",template:"planet",label:F("wiki_menu_planets"),paragraphs:1,h_level:2,para_data:{1:[F("wiki_menu_planets")]},data_link:{1:["wiki.html#planets-gameplay"]}},e),En("add","mechanics-gameplay","planet",F("wiki_menu_planets"))}Tn(a,{name:"soul_gem",template:"hell",label:F("wiki_hell_soul_gem"),paragraphs:4,h_level:2,para_data:{1:[F("wiki_hell_soul_gem"),F("tab_portal")],3:[F("tech_demon_attractor")]}}),En("add","mechanics-gameplay","soul_gem",F("wiki_hell_soul_gem"));{let e=Tn(a,{name:"quantum",template:"mechanics",label:F("wiki_mechanics_quantum"),paragraphs:4,h_level:2,para_data:{1:[F("wiki_mechanics_quantum")],2:[F("tech_quantum_computing")],4:[F("interstellar_citadel_title")]},data_link:{2:["wiki.html#deep_space-tech-quantum_computing"],4:["wiki.html#interstellar-structures-citadel"]}});!function(e){let a=$('
                                  ');e.append(a),a.append(`

                                  ${F("wiki_mechanics_quantum")}

                                  `);let r=$("
                                  "),i=$("
                                  ");a.append(r),a.append(i);let s={knowledge:{val:void 0},citadels:{val:void 0},cores:{val:void 0},supercore:{val:!1},linked:{val:void 0},citizens:{val:void 0}},n={linked:{val:void 0},result:{vis:!1,val:0}};r.append("\n
                                  \n (ln(1 + ((1.1 - 1) * {{ i.knowledge.val, 'knowledge' | generic }} / 250000)) / ln(1.1)) * (1 + (0.05 * {{ i.citadels.val, 'citadels' | generic }})) * (2 - (0.99^{{ i.cores.val, 'cores' | generic }})) * 1.25 * {{ s.linked.val, 'linked' | generic }} = {{ | calc }}\n
                                  \n "),i.append(`\n
                                  \n
                                  ${F("wiki_calc_q_level_knowledge")}
                                  \n
                                  ${F("wiki_calc_q_level_citadels")}
                                  \n
                                  ${F("wiki_calc_cores")}
                                  \n
                                  ${F("wiki_calc_q_level_supercore")}
                                  \n
                                  ${F("trait_linked_name")} \n \n {{ 0 | traitLabel }}\n {{ 0.25 | traitLabel }}\n {{ 0.5 | traitLabel }}\n {{ 1 | traitLabel }}\n {{ 2 | traitLabel }}\n {{ 3 | traitLabel }}\n
                                  \n
                                  ${F("wiki_calc_citizens")}
                                  \n
                                  \n
                                  \n \n \n
                                  \n `),zs({el:"#quantumLevelCalc",data:{i:s,s:n},methods:{val(e){s[e].val&&s[e].val<0&&(s[e].val=0)},pickTrait(e,t){s[t].val=e},resetInputs(){s.knowledge.val=void 0,s.citadels.val=void 0,s.cores.val=void 0,s.supercore.val=!1,s.linked.val=void 0,s.citizens.val=void 0},importInputs(){s.knowledge.val=t.resource.Knowledge.max,s.citadels.val=t.interstellar.citadel?t.interstellar.citadel.on:0,s.cores.val=t.prestige.AICore.count,s.supercore.val=!(!t.space.ai_core2||!t.space.ai_core2.on),s.linked.val=t.race.linked?t.race.linked:0,s.citizens.val=t.resource[t.race.species].amount}},filters:{generic:(e,t)=>void 0!==e?e:F("cores"===t?"wiki_calc_"+t:"wiki_calc_q_level_"+t),traitLabel:e=>void 0===e?F("wiki_calc_trait_undefined"):0===e?F("wiki_calc_trait_unowned"):e,calc(){let e=!0;if(s.linked.val>0)if(void 0!==s.citizens.val){let e=Ki.linked.vars(s.linked.val)[0]/100*s.citizens.val;e>Ki.linked.vars(s.linked.val)[1]/100&&(e-=Ki.linked.vars(s.linked.val)[1]/100,e/=e+200-Ki.linked.vars(s.linked.val)[1],e+=Ki.linked.vars(s.linked.val)[1]/100),n.linked.val=+(1+e).toFixed(4)}else n.linked.val=void 0,e=!1;if(n.result.vis=e&&void 0!==s.knowledge.val&&void 0!==s.citadels.val&&void 0!==s.cores.val,n.result.vis){let e=Math.log(1+(1.1-1)*s.knowledge.val/25e4)/Math.log(1.1)*(1+.05*s.citadels.val)*(2-.99**s.cores.val);return s.supercore.val&&(e*=1.25),n.linked.val&&(e*=n.linked.val),n.result.val=+e.toFixed(4),n.result.val}}}})}(Gn(e,"mechanics","quantum_level",F("wiki_mechanics_quantum"))),En("add","mechanics-gameplay","quantum",F("wiki_mechanics_quantum")),Tn(e,{name:"quantum_swarm_ai",template:"mechanics",label:F("tech_swarm_control_ai"),paragraphs:2,h_level:2,para_data:{1:[F("tech_quantum_computing"),F("space_sun_swarm_satellite_title"),F("space_sun_swarm_control_title")],2:[F("space_sun_swarm_control_title"),11,F("wiki_mechanics_quantum")]},data_link:{1:["wiki.html#deep_space-tech-swarm_control_ai","wiki.html#space-structures-swarm_satellite","wiki.html#space-structures-swarm_control"]}}),Tn(e,{name:"quantum_swarm",template:"mechanics",label:F("tech_quantum_swarm"),paragraphs:3,h_level:2,para_data:{1:[F("tech_quantum_swarm"),F("space_hell_swarm_plant_title")],2:["1%"],3:["95%"]},data_link:{1:["wiki.html#deep_space-tech-quantum_swarm","wiki.html#space-structures-swarm_plant"]}}),Tn(e,{name:"quantum_manufacture",template:"mechanics",label:F("tech_quantum_manufacturing"),paragraphs:4,break:[2,3,4],h_level:2,para_data:{1:[F("tech_quantum_manufacturing"),F("city_factory"),F("wiki_mechanics_quantum")],2:[F("modal_factory_lux")],3:[F("resource_Furs_name"),"(Q Level - 1) * 12.5"],4:["(Q Level - 1) * 50"]},data_link:{1:["wiki.html#deep_space-tech-quantum_manufacturing","wiki.html#planetary-structures-factory",!1]}}),Tn(e,{name:"quantum_cement_processing",template:"mechanics",label:F("tech_cement_processing"),paragraphs:2,break:[2],h_level:2,para_data:{1:[F("tech_cement_processing"),F("interstellar_citadel_title")],2:["(Q Level / 1.75) %"]},data_link:{1:["wiki.html#interstellar-tech-cement_processing","wiki.html#interstellar-structures-citadel"]}}),Tn(e,{name:"quantum_graph_processing",template:"mechanics",label:F("tech_graphene_processing"),paragraphs:2,break:[2],h_level:2,para_data:{1:[F("tech_graphene_processing"),F("interstellar_citadel_title")],2:["(Q Level / 5) %"]},data_link:{1:["wiki.html#intergalactic-tech-graphene_processing","wiki.html#interstellar-structures-citadel"]}}),Tn(e,{name:"quantum_ai_logistics",template:"mechanics",label:F("tech_ai_logistics"),paragraphs:3,break:[3],h_level:2,para_data:{1:[F("tech_ai_logistics"),F("interstellar_cargo_yard_title"),F("city_shed_title3")],2:[F("city_shed_title3")],3:[F("wiki_mechanics_quantum")]},data_link:{1:["wiki.html#interstellar-tech-ai_logistics","wiki.html#interstellar-structures-cargo_yard","wiki.html#interstellar-structures-warehouse"]}}),Tn(e,{name:"quantum_arcology",template:"mechanics",label:F("portal_arcology_title"),paragraphs:1,h_level:2,para_data:{1:[F("portal_arcology_title"),10]},data_link:{1:["wiki.html#hell-structures-arcology",!1]}})}!function(e){let a=$('
                                  ');e.append(a);let r=$("
                                  "),i=$("
                                  ");a.append(r),a.append(i);let s=["Food","Lumber","Chrysotile","Stone","Crystal","Furs","Copper","Iron","Aluminium","Cement","Coal","Oil","Uranium","Steel","Titanium","Alloy","Polymer","Iridium","Helium_3","Deuterium","Neutronium","Adamantite","Infernite","Elerium","Nano_Tube","Graphene","Stanene","Bolognium","Vitreloy","Orichalcum","Plywood","Brick","Wrought_Iron","Sheet_Metal","Mythril","Aerogel","Nanoweave","Scarletite"],n={result:{vis:!1,kt:void 0,solar:void 0,MW:void 0,exoVis:!1,exotic:void 0,MWVis:!1,MWTot:void 0,timeVis:!1,timeTot:void 0}},c={solar_tot:{val:void 0},exotic_tot:{val:void 0},grav:{val:!0}},o=$("
                                  "),l=$("
                                  "),_=!0;i.append(o),s.forEach((function(e){_||l.append(" + "),_=!1,c[e]={val:void 0},o.append(`\n
                                  ${F("resource_"+e+"_name")}
                                  \n `),l.append(`({{ i.${e}.val, '${e}' | generic }} * ${Aa[e]})`)})),l.append(" = {{ true, 'kt' | calc }}"),r.append(`\n
                                  \n

                                  ${F("wiki_calc_mass_kt")}

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

                                  ${F("wiki_calc_mass_solar")}

                                  \n
                                  \n
                                  \n {{ s.result.kt, 'kt' | generic }} / 10000000000 = {{ false, 'solar' | calc }}\n
                                  \n
                                  \n

                                  ${F("wiki_calc_mass_exotic")}

                                  \n
                                  \n
                                  \n (({{ i.Infernite.val, 'Infernite' | generic }} * 222.666) + ({{ i.Elerium.val, 'Elerium' | generic }} * 297.115)) / 10000000000 = {{ | calcExotic }}\n
                                  \n
                                  \n

                                  ${F("wiki_calc_mass_MW")}

                                  \n
                                  \n
                                  \n ({{ s.result.solar, 'solar' | generic }} * {{ false | amountMW }}) + ({{ s.result.exotic, 'exotic' | generic }} * {{ true | amountMW }}) = {{ false, 'MW' | calc }}\n
                                  \n
                                  \n

                                  ${F("wiki_calc_mass_MW_tot")}

                                  \n
                                  \n
                                  \n 20 + (({{ i.solar_tot.val, 'solar_tot' | generic }} - 8) * {{ false | amountMW }}) + ({{ i.exotic_tot.val, 'exotic_tot' | generic }} * {{ true | amountMW }}) = {{ | calcMW }}\n
                                  \n
                                  \n

                                  ${F("wiki_calc_mass_time_to_explode")}

                                  \n
                                  \n
                                  \n (0.025 - {{ i.exotic_tot.val, 'exotic_tot' | generic }}) / {{ s.result.exotic, 'exotic' | generic }} = {{ | calcTime }}\n
                                  \n `),i.append(`\n
                                  \n
                                  ${F("wiki_calc_mass_solar_tot")}
                                  \n
                                  ${F("wiki_calc_mass_exotic_tot")}
                                  \n
                                  ${F("tech_gravity_convection")}
                                  \n
                                  \n
                                  \n \n \n
                                  \n `),zs({el:"#massCalc",data:{i:c,s:n},methods:{val(e){"solar_tot"===e?c[e].val&&c[e].val<8&&(c[e].val=8):c[e].val&&c[e].val<0&&(c[e].val=0)},resetInputs(){s.forEach((function(e){c[e].val=void 0})),c.solar_tot.val=void 0,c.exotic_tot.val=void 0,c.grav.val=!0},importInputs(){t.interstellar.mass_ejector?s.forEach((function(e){c[e].val=t.interstellar.mass_ejector[e]})):s.forEach((function(e){c[e].val=0})),c.solar_tot.val=t.interstellar.stellar_engine?t.interstellar.stellar_engine.mass:8,t.tech.roid_eject&&(c.solar_tot.val+=.225*t.tech.roid_eject*(1+t.tech.roid_eject/12)),c.exotic_tot.val=t.interstellar.stellar_engine?t.interstellar.stellar_engine.exotic:0,c.grav.val=t.tech.gravity&&t.tech.gravity>=2}},filters:{generic(e,t){if(void 0!==e)return e;switch(t){case"kt":case"solar":case"solar_tot":case"exotic":case"exotic_tot":case"MW":return F("wiki_calc_mass_"+t);default:return F("resource_"+t+"_name")+"/s"}},amountMW:e=>(c.grav.val?13.5:7.5)*(e?10:1),calc(e,t){if(e){let e=!0;if(s.forEach((function(t){e&&void 0===c[t].val&&(e=!1)})),n.result.vis=e,n.result.vis){let e=0;s.forEach((function(t){e+=c[t].val*Aa[t]})),n.result.kt=+e.toFixed(4),n.result.solar=+(e/1e10).toFixed(10),n.result.MW=+(n.result.solar*(c.grav.val?13.5:7.5)+n.result.exotic*(c.grav.val?135:75)).toFixed(10)}else n.result.kt=void 0,n.result.solar=void 0,n.result.mw=void 0}return n.result[t]},calcExotic(){if(void 0!==c.Infernite.val&&void 0!==c.Elerium.val)return n.result.exoVis=!0,n.result.exotic=+((c.Infernite.val*Aa.Infernite+c.Elerium.val*Aa.Elerium)/1e10).toFixed(10),n.result.exotic;n.result.exoVis=!1,n.result.exotic=void 0},calcMW(){if(void 0!==c.solar_tot.val&&void 0!==c.exotic_tot.val)return n.result.MWVis=!0,n.result.MWTot=+((c.solar_tot.val-8)*(c.grav.val?13.5:7.5)+c.exotic_tot.val*(c.grav.val?135:75)+20).toFixed(10),n.result.MWTot;n.result.MWVis=!1,n.result.MWTot=void 0},calcTime(){if(void 0!==c.exotic_tot.val&&n.result.exoVis)return n.result.timeVis=!0,c.exotic_tot.val>=.025?n.result.timeTot=F("wiki_calc_mass_time_reached"):0===n.result.exotic?n.result.timeTot=F("time_never"):n.result.timeTot=Fs(Math.round((.025-c.exotic_tot.val)/n.result.exotic)),n.result.timeTot;n.result.timeVis=!1,n.result.timeTot=void 0}}})}(Gn(Tn(a,{name:"mass",template:"mechanics",label:F("wiki_mechanics_mass"),paragraphs:11,break:[5,9],h_level:2,para_data:{1:[F("tab_interstellar")],2:[F("tech_mass_ejector"),F("interstellar_mass_ejector"),F("tab_ejector")],4:[1e10.toLocaleString()],5:[F("universe_magic"),F("resource_Infernite_name"),F("resource_Elerium_name")],6:[.025,F("tech_stabilize_blackhole"),F("tech_exotic_infusion")],7:[F("tech_stabilize_blackhole"),0,40,F("tech_exotic_infusion"),F("wiki_resets_blackhole")],8:[F("tech_stabilize_blackhole"),.025],9:[F("interstellar_stellar_engine"),20,8],10:[1,7.5,F("interstellar_stellar_engine"),13.5,F("tech_gravity_convection")],11:[10]},data_link:{2:["wiki.html#interstellar-tech-mass_ejector","wiki.html#interstellar-structures-mass_ejector"],6:[!1,"wiki.html#interstellar-tech-stabilize_blackhole","wiki.html#interstellar-tech-infusion_confirm"],7:["wiki.html#interstellar-tech-stabilize_blackhole",!1,!1,"wiki.html#interstellar-tech-infusion_confirm","wiki.html#resets-prestige-blackhole"],8:["wiki.html#interstellar-tech-stabilize_blackhole"],9:["wiki.html#interstellar-structures-stellar_engine"],10:[!1,!1,"wiki.html#interstellar-structures-stellar_engine",!1,"wiki.html#interstellar-tech-gravity_convection"]}}),"eject","mass")),En("add","mechanics-gameplay","mass",F("wiki_mechanics_mass"));{let e=Tn(a,{name:"piracy",template:"mechanics",label:F("galaxy_piracy"),paragraphs:6,break:[4],h_level:2,para_data:{1:[F("galaxy_piracy"),F("wiki_menu_intergalactic")],2:[F("galaxy_embassy")],4:[F("tab_galactic"),F("galaxy_piracy"),F("galaxy_stargate")],5:[F("interstellar_stargate")]}});Tn(a,{name:"pirate_ramp",template:"mechanics",label:F("galaxy_piracy"),paragraphs:3,h_level:2,para_data:{1:[F("galaxy_stargate"),F("galaxy_gateway")],2:[F("tab_galactic")],3:[F("galaxy_embassy"),F("tech_xeno_gift"),F("galaxy_alien2_mission",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red])]}},e),Tn(a,{name:"pirate_threat",template:"mechanics",label:F("galaxy_piracy"),paragraphs:7,break:[2,3,4,5,6,7],h_level:2,para_data:{1:[F("galaxy_armada")],2:[F("galaxy_gateway"),100,250,500],3:[F("galaxy_stargate"),100,250,500],4:[F("galaxy_gorddon"),800],5:[F("galaxy_alien",[Di[t.galaxy.hasOwnProperty("alien1")?t.galaxy.alien1.id:t.race.species].home]),1e3],6:[F("galaxy_alien",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].solar.red]),2500],7:[F("galaxy_chthonian"),7500]},data_color:{2:["caution","warning","warning","warning"],3:["caution","warning","warning","warning"],4:["caution","warning"],5:["caution","warning"],6:["caution","warning"],7:["caution","warning"]}},e),En("add","mechanics-gameplay","piracy",F("galaxy_piracy"))}!function(e){let a=$('
                                  ');e.append(a),a.append(`

                                  ${F("wiki_calc_bonuses",[F("trait_untapped_name")])}

                                  `);let r=$("
                                  "),i=$("
                                  ");a.append(r),a.append(i);let s={genes:{val:void 0}},n={result:{vis:!1,val:0}};r.append('\n
                                  \n ({{ i.genes.val | generic }} / ({{ i.genes.val | generic }} + 20) / 10) + 0.00024 = {{ false | calc }} = +{{ true | calc }}%\n
                                  \n '),i.append(`\n
                                  \n
                                  ${F("resource_Genes_name")}
                                  \n
                                  \n
                                  \n \n \n
                                  \n `),zs({el:"#untappedPotentialCalc",data:{i:s,s:n},methods:{val(e){s[e].val&&s[e].val<0&&(s[e].val=0)},resetInputs(){s.genes.val=void 0},importInputs(){s.genes.val=t.custom?rn({genus:t.custom.race0.genus,traitlist:t.custom.race0.traits}):0}},filters:{generic:e=>void 0!==e?e:F("resource_Genes_name"),calc:e=>e?(100*n.result.val).toFixed(3):(n.result.vis=s.genes.val,n.result.vis?(n.result.val=+(s.genes.val/(s.genes.val+20)/10+24e-5).toFixed(5),n.result.val):void 0)}})}(Gn(Tn(a,{name:"custom",template:"mechanics",label:F("wiki_mechanics_custom"),paragraphs:12,break:[3,5,9,11],h_level:2,para_data:{1:[F("wiki_resets_ascension")],2:[F("wiki_resets_ascension")],5:[F("resource_Genes_name")],6:[F("resource_Genes_name")],7:[2],8:[F("achieve_technophobe_name"),5,7],9:[F("tech_fanaticism"),F("tech_deify")],11:[0,F("resource_Genes_name")],12:[F("resource_Genes_name"),F("trait_untapped_name")]},data_link:{1:["wiki.html#resets-prestige-ascension"],2:["wiki.html#resets-prestige-ascension"],8:["wiki.html#perks-prestige-technophobe"],9:[t.genes.transcendence?"wiki.html#civilized-tech-alt_fanaticism":"wiki.html#civilized-tech-fanaticism","wiki.html#early_space-tech-deify"]}}),"mechanics","untapped",F("trait_untapped_name"))),En("add","mechanics-gameplay","custom",F("wiki_mechanics_custom"));{let e=Tn(a,{name:"pillar",template:"hell",label:F("wiki_mechanics_pillar"),paragraphs:5,h_level:2,para_data:{1:[F("portal_ruins_name")],2:["1%",F("harmonic")],3:["3%"],4:[F("harmonic"),"2%","6%"],5:[F("wiki_hell_pillar_para5d1"),12]},data_link:{5:["wiki.html#hell-structures-west_tower"]}});Tn(a,{name:"pillar",template:"mechanics",label:F("wiki_mechanics_pillar"),paragraphs:10,break:[4,6,8],h_level:2,para_data:{1:[F("tech_pillars"),F("resource_Harmony_name"),F("resource_Scarletite_name")],2:[F("resource_Scarletite_name"),1e6.toLocaleString(),125e3.toLocaleString()],3:[F("universe_micro")],4:[F("evo_challenge_genes"),F("harmonic")],5:[F("tech_scarletite"),F("evo_challenge_genes")],6:[F("achieve_resonance_name")],7:[F("achieve_resonance_name"),F("tech_scarletite")],8:[F("race_junker"),F("wiki_mechanics_custom"),F("achieve_enlightenment_name"),F("race_sludge")],9:[F("wiki_mechanics_custom")],10:[F("race_junker"),F("genelab_genus_humanoid"),F("race_sludge")]},data_link:{1:["wiki.html#dimensional-tech-pillars"],3:["wiki.html#universes-gameplay-micro"],5:["wiki.html#dimensional-tech-scarletite"],7:[!1,"wiki.html#dimensional-tech-scarletite"],8:["wiki.html#races-species-junker","wiki.html#mechanics-gameplay-custom",!1,"wiki.html#races-species-sludge"],9:["wiki.html#mechanics-gameplay-custom"],10:["wiki.html#races-species-junker",!1,"wiki.html#races-species-sludge"]}},e),En("add","mechanics-gameplay","pillar",F("wiki_mechanics_pillar"))}{let e=Tn(a,{name:"dlord",template:"mechanics",label:F("wiki_mechanics_dlord"),paragraphs:5,h_level:2,para_data:{1:[F("portal_waygate_title")],2:[F("resource_Demonic_Essence_name"),F("wiki_resets_infusion")],3:[F("wiki_resets_infusion"),"+1"],4:["+25%",F("wiki_resets_infusion")],5:[F("tech_dark_bomb"),F("wiki_resets_infusion")]},data_link:{1:["wiki.html#hell-structures-waygate"],2:[!1,"wiki.html#resets-prestige-infusion"],3:["wiki.html#resets-prestige-infusion"],4:[!1,"wiki.html#resets-prestige-infusion"],5:["wiki.html#dimensional-tech-dark_bomb","wiki.html#resets-prestige-infusion"]}});e.append(`\n

                                  ${F("wiki_mechanics_dlord_str")}

                                  \n `),Object.keys(Qt).forEach((function(a){let r=t.stats.spire[qn(a)]&&t.stats.spire[qn(a)].dlstr?F("wiki_mechanics_dlord_str_empowered",[t.stats.spire[qn(a)].dlstr]):F("wiki_mechanics_dlord_str_not_empowered");e.append(`\n
                                  \n ${F("universe_"+a)}: ${r}\n
                                  \n `)})),En("add","mechanics-gameplay","dlord",F("wiki_mechanics_dlord"))}{let e=Tn(a,{name:"syndicate",template:"mechanics",label:F("wiki_mechanics_syndicate"),paragraphs:2,h_level:2,para_data:{1:[F("wiki_mechanics_syndicate"),F("wiki_challenges_scenarios_truepath"),F("wiki_mechanics_syndicate_para1_note1"),F("tech_shipyard",[Di[t.race.species?t.race.species:human].solar.dwarf])],2:[F("galaxy_piracy"),F("tab_galactic")]},data_link:{1:[!1,"wiki.html#challenges-gameplay-scenarios_truepath","wiki.html#progress-events-syndicate","wiki.html#solar-tp_tech-shipyard"],2:["wiki.html#mechanics-gameplay-piracy"]}}),r=Tn(e,{name:"syndicate_influence",template:"mechanics",label:F("wiki_mechanics_syndicate_influence"),paragraphs:3,break:[3],h_level:2,para_data:{1:[0],2:[F("space_mission_title",[Dn("triton")]),F("tech_data_analysis")],3:["1/10",1,Dn("triton"),"1/5"]},data_link:{2:["wiki.html#space-tp_structures-triton_mission","wiki.html#solar-tp_tech-data_analysis"]}});{let e=Bn(r,"mechanics","syndicate_influence_current",F("wiki_mechanics_syndicate_influence_current"));["moon","red","gas","gas_moon","belt","titan","enceladus","triton","kuiper","eris"].forEach((function(a){let r=t.space.syndicate&&t.space.syndicate["spc_"+a]?t.space.syndicate["spc_"+a]:0;e.append(`
                                  ${Dn(a)}: ${r}`)}))}!function(e){let a=$('
                                  ');e.append(a),a.append(`

                                  ${F("wiki_calc_syndicate_caps")}

                                  `);let r=$("
                                  "),i=$("
                                  ");a.append(r),a.append(i);let s={triton1:{val:!1},outer4:{val:!1}},n="";["moon","red","gas","gas_moon","belt","titan","enceladus","triton","kuiper","eris"].forEach((function(e){n+=`\n
                                  \n ${Dn(e)}: {{ '${e}' | calc }}\n
                                  \n `})),r.append(n),i.append(`\n
                                  \n
                                  ${F("space_mission_title",[Dn("triton")])}
                                  \n
                                  ${F("tech_data_analysis")}
                                  \n
                                  \n
                                  \n \n \n
                                  \n `),zs({el:"#syndicateCapCalc",data:{i:s},methods:{resetInputs(){s.triton1.val=!1,s.outer4.val=!1},importInputs(){s.triton1.val=t.tech.triton&&t.tech.triton>=1,s.outer4.val=t.tech.outer&&t.tech.outer>=4}},filters:{calc(e){switch(e){case"titan":return s.triton1.val?s.outer4.val?2e3:1e3:600;case"enceladus":return s.triton1.val?s.outer4.val?1500:1e3:600;case"triton":return s.triton1.val&&s.outer4.val?5e3:3e3;case"kuiper":return 2500;case"eris":return 7500;default:return 500}}}})}(Gn(r,"mechanics","syndicate_cap")),function(e){let a=$('
                                  ');e.append(a);let r=$("
                                  "),i=$("
                                  ");a.append(r),a.append(i);let s={region:{val:void 0},relations:{val:void 0,vis:!1,alliance:!1,war:!1},triton1:{val:!1,vis:!1},outer4:{val:!1,vis:!1},ship_security:{val:void 0},base:{val:void 0,vis:!1},sam:{val:void 0,vis:!1},fob:{val:!1,vis:!1},intel:{val:void 0},syndicate:{val:void 0}},n={divisor:{vis:!1,val:void 0},region_security:{vis:!1,val:void 0},residual:{vis:!1,val:void 0},penalty:{vis:!1,val:void 0}};r.append(`\n
                                  \n

                                  ${F("wiki_calc_syndicate_penalty_divisor")}

                                  - {{ i.relations.val | relationsType}}

                                  \n
                                  \n
                                  \n {{ i.region.val | divisorBase }} + (25 * ({{ i.relations.val, 'relations' | generic }} - 90)) + (13 * ({{ i.relations.val, 'relations' | generic }} - 40)) = {{ | calcDivisor }}\n
                                  \n
                                  \n

                                  ${F("wiki_calc_syndicate_penalty_region_security")}

                                  \n
                                  \n
                                  \n ({{ i.ship_security.val, 'ship_security' | generic }} + (50 * {{ i.base.val, 'base' | generic }}) + (25 * {{ i.sam.val, 'sam' | generic }}) + 500) * ({{ i.intel.val, 'intel' | generic }} / 100) = {{ | calcSecurity }}\n
                                  \n
                                  \n

                                  ${F("wiki_calc_syndicate_penalty_residual")}

                                  \n
                                  \n
                                  \n {{ i.syndicate.val, 'syndicate' | generic }} - {{ s.region_security.val, 'region_security' | generic }} = {{ | calcResidual }}\n
                                  \n
                                  \n

                                  ${F("wiki_mechanics_syndicate_penalty")}

                                  \n
                                  \n
                                  \n {{ s.residual.val, 'residual' | generic }} / {{ s.divisor.val, 'divisor' | generic }} = {{ false | calcPenalty }} = -{{ true | calcPenalty }}%\n
                                  \n `),i.append(`\n
                                  \n
                                  \n
                                  \n ${F("wiki_calc_syndicate_penalty_region")}\n
                                  \n
                                  \n \n \n {{ 'moon' | regionLabel }}\n {{ 'red' | regionLabel }}\n {{ 'gas' | regionLabel }}\n {{ 'gas_moon' | regionLabel }}\n {{ 'belt' | regionLabel }}\n {{ 'titan' | regionLabel }}\n {{ 'enceladus' | regionLabel }}\n {{ 'triton' | regionLabel }}\n {{ 'kuiper' | regionLabel }}\n {{ 'eris' | regionLabel }}\n \n
                                  \n
                                  \n
                                  ${F("wiki_calc_syndicate_penalty_rival_relations")}
                                  \n
                                  ${F("space_mission_title",[Dn("triton")])}
                                  \n
                                  ${F("tech_data_analysis")}
                                  \n
                                  ${F("wiki_calc_syndicate_penalty_ship_security")}
                                  \n
                                  ${F("tech_operating_base")}
                                  \n
                                  ${F("space_sam_title")}
                                  \n
                                  ${F("space_fob_title")}
                                  \n
                                  ${F("space_scan_effectiveness")}
                                  \n
                                  ${F("space_syndicate")}
                                  \n
                                  \n
                                  \n \n \n
                                  \n `);let c=function(e){switch(e){case"titan":return s.triton1.val?s.outer4.val?2e3:1e3:600;case"enceladus":return s.triton1.val?s.outer4.val?1500:1e3:600;case"triton":return s.triton1.val&&s.outer4.val?5e3:3e3;case"kuiper":return 2500;case"eris":return 7500;default:return 500}};zs({el:"#syndicatePenaltyCalc",data:{i:s,s:n},methods:{val(e){s[e].val&&s[e].val<0&&(s[e].val=0),"relations"===e?s[e].val>100&&(s[e].val=100):"syndicate"===e&&s.region.val&&s[e].val>c(s.region.val)&&(s[e].val=c(s.region.val))},pickRegion(e){s.region.val=e,s.relations.vis=["moon","red","gas","gas_moon","belt"].includes(e),s.triton1.vis=["titan","enceladus","triton"].includes(e),s.syndicate.val&&s.syndicate.val>c(e)&&(s.syndicate.val=c(e)),s.base.vis="enceladus"===e,s.sam.vis="titan"===e,s.fob.vis="triton"===e},resetInputs(){s.region={val:void 0},s.relations={val:void 0,vis:!1,alliance:!1,war:!1},s.triton1={val:!1,vis:!1},s.outer4={val:!1,vis:!1},s.ship_security={val:void 0},s.base={val:void 0,vis:!1},s.sam={val:void 0,vis:!1},s.fob={val:!1,vis:!1},s.intel={val:void 0},s.syndicate={val:void 0}},importInputs(){t.civic.foreign&&t.civic.foreign.gov3&&(s.relations.val=100-t.civic.foreign.gov3.hstl),s.relations.alliance=s.relations.val>90,s.relations.war=s.relations.val<40,s.relations.vis=s.region.val&&["moon","red","gas","gas_moon","belt"].includes(s.region.val),s.triton1.vis=s.region.val&&["titan","enceladus","triton"].includes(s.region.val),s.triton1.val=t.tech.triton&&t.tech.triton>=1,s.outer4.val=t.tech.outer&&t.tech.outer>=4,s.region.val&&t.space.hasOwnProperty("shipyard")&&t.space.shipyard.hasOwnProperty("ships")&&(s.ship_security.val=0,s.intel.val=0,t.space.shipyard.ships.forEach((function(e){if(e.location==="spc_"+s.region.val&&0===e.transit&&e.fueled){let t=rt(e);s.ship_security.val+=e.damage>0?Math.round(t*(100-e.damage)/100):t,s.intel.val+=dt(e)}})),"triton"===s.region.val&&t.space.fob&&t.space.fob.on>0&&(s.intel.val+=10),s.intel.val=(Math.round((s.intel.val-100)/(s.intel.val-100+200)*100)+100+25)/1.25,s.syndicate.val=t.space.syndicate&&t.space.syndicate["spc_"+s.region.val]?t.space.syndicate["spc_"+s.region.val]:0),s.base.val=t.space.operating_base?t.space.operating_base.on:0,s.base.vis=s.region.val&&"enceladus"===s.region.val,s.sam.val=t.space.sam?t.space.sam.on:0,s.sam.vis=s.region.val&&"titan"===s.region.val,s.fob.val=t.space.fob&&t.space.fob.on>0,s.fob.vis=s.region.val&&"triton"===s.region.val}},filters:{generic(e,t){if(void 0!==e)return e;switch(t){case"base":return F("tech_operating_base");case"sam":case"fob":return F("space_"+t+"_title");case"intel":return F("space_scan_effectiveness");case"relations":return F("wiki_calc_syndicate_penalty_rival_relations");case"syndicate":return F("space_syndicate");default:return F("wiki_calc_syndicate_penalty_"+t)}},regionLabel:e=>e?Dn(e):F("wiki_calc_syndicate_penalty_region"),relationsType:e=>(e>90?(s.relations.alliance=!0,s.relations.war=!1):e<40?(s.relations.war=!0,s.relations.alliance=!1):(s.relations.war=!1,s.relations.alliance=!1),F(e<40?"wiki_calc_syndicate_penalty_rival_war":e>90?"wiki_calc_syndicate_penalty_rival_ally":"wiki_calc_syndicate_penalty_rival_neutral")),divisorBase(e){if(!e)return F("wiki_calc_syndicate_penalty_region_divisor_base");switch(e){case"moon":case"red":return 1250;case"gas":case"gas_moon":case"belt":return 1020;default:return c(e)}},calcDivisor(){if(s.region.val)if(["moon","red","gas","gas_moon","belt"].includes(s.region.val))if((s.relations.war||s.relations.alliance)&&void 0===s.relations.val)n.divisor.val=void 0,n.divisor.vis=!1;else{let e=0,t=["moon","red"].includes(s.region.val)?1250:1020;s.relations.war?e=13*(s.relations.val-40):s.relations.alliance&&(e=25*(s.relations.val-90)),n.divisor.val=t+e,n.divisor.vis=!0}else n.divisor.val=c(s.region.val),n.divisor.vis=!0;else n.divisor.val=void 0,n.divisor.vis=!1;return n.divisor.val},calcSecurity(){let e=0,t=void 0!==s.ship_security.val&&void 0!==s.intel.val;if(t){if(e+=s.ship_security.val,s.region.val)switch(s.region.val){case"enceladus":void 0!==s.base.val?e+=50*s.base.val:t=!1;break;case"titan":void 0!==s.sam.val?e+=25*s.sam.val:t=!1;break;case"triton":s.fob.val&&(e+=500)}t?(n.region_security.val=Math.round(e*(s.intel.val/100)),n.region_security.vis=t):(n.region_security.val=void 0,n.region_security.vis=!1)}else n.region_security.val=void 0,n.region_security.vis=!1;return n.region_security.val},calcResidual(){if(void 0!==s.syndicate.val&&void 0!==n.region_security.val){let e=s.syndicate.val-n.region_security.val;e<0&&(e=0),n.residual.val=e,n.residual.vis=!0}else n.residual.val=void 0,n.residual.vis=!1;return n.residual.val},calcPenalty:e=>e?(100*n.penalty.val).toFixed(2):(n.penalty.vis=void 0!==n.residual.val&&void 0!==n.divisor.val,n.penalty.vis?n.penalty.val=+(n.residual.val/n.divisor.val).toFixed(4):n.penalty.val=void 0,n.penalty.val)}})}(Gn(Tn(e,{name:"syndicate_penalty",template:"mechanics",label:F("wiki_mechanics_syndicate_penalty"),paragraphs:6,break:[2,4,5],h_level:2,para_data:{1:[F("galaxy_piracy"),F("portal_ruins_security")],2:[Dn("titan")],3:[F("civics_gov_relations"),F("wiki_mechanics_rival")],5:[F("galaxy_armada"),F("tab_galactic"),F("portal_ruins_security")],6:[F("portal_ruins_security"),F("firepower"),F("outer_shipyard_hull"),F("space_scan_effectiveness")]},data_link:{1:["wiki.html#mechanics-gameplay-piracy"]}}),"mechanics","syndicate_penalty",F("wiki_mechanics_syndicate_penalty"))),En("add","mechanics-gameplay","syndicate",F("wiki_mechanics_syndicate"))}{let e=Tn(a,{name:"tp_ships",template:"mechanics",label:F("wiki_mechanics_tp_ships"),paragraphs:2,h_level:2,para_data:{1:[F("outer_shipyard_title"),F("tab_shipyard"),F("tab_civics")],2:[F("tab_galactic"),F("galaxy_piracy")]},data_link:{1:["wiki.html#space-tp_structures-shipyard"],2:[!1,"wiki.html#mechanics-gameplay-piracy"]}});!function(e){let a=$('
                                  ');e.append(a);let r=$("
                                  "),i=$("
                                  "),s=$("
                                  ");a.append(r),a.append(i),a.append(s);let n={owned:{val:void 0},class:{val:void 0},power:{val:void 0},weapon:{val:void 0},armor:{val:void 0},engine:{val:void 0},sensor:{val:void 0}},c={Money:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Aluminium:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Adamantite:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Steel:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Alloy:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Neutronium:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Titanium:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Copper:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Orichalcum:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Iridium:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Iron:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Nano_Tube:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1},Quantium:{base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1}},o={exp1:{val:void 0},exp2:{val:void 0},creep:{val:void 0}};r.append(`\n
                                  \n
                                  \n

                                  ${F("wiki_calc_tp_ships_costs_base_costs")}

                                  \n
                                  \n
                                  \n

                                  ${F("resource_Money_name")}:

                                  {{ i.class.val, 'class', 'Money' | getBase }}^{{ i.sensor.val, 'sensor', 'Money' | getExponent }} = {{ 'Money' | calcPre }}\n
                                  \n
                                  \n

                                  ${F("resource_Aluminium_name")}:

                                  {{ i.class.val, 'class', 'Aluminium' | getBase }} = {{ 'Aluminium' | calcPre }}\n
                                  \n
                                  \n

                                  ${F("resource_Adamantite_name")}:

                                  {{ i.class.val, 'class', 'Adamantite' | getBase }} = {{ 'Adamantite' | calcPre }}\n
                                  \n
                                  \n

                                  ${F("resource_Steel_name")}:

                                  {{ i.armor.val, 'armor', 'Steel' | getBase }}^{{ s.exp1.val, 'exp1' | generic }} = {{ 'Steel' | calcPre }}\n
                                  \n
                                  \n

                                  ${F("resource_Alloy_name")}:

                                  {{ i.armor.val, 'armor', 'Alloy' | getBase }}^{{ s.exp1.val, 'exp1' | generic }} = {{ 'Alloy' | calcPre }}\n
                                  \n
                                  \n

                                  ${F("resource_Neutronium_name")}:

                                  {{ i.armor.val, 'armor', 'Neutronium' | getBase }}^{{ s.exp1.val, 'exp1' | generic }} = {{ 'Neutronium' | calcPre }}\n
                                  \n
                                  \n

                                  ${F("resource_Titanium_name")}:

                                  {{ i.engine.val, 'engine', 'Titanium' | getBase }}^{{ s.exp2.val, 'exp2' | generic }} * 5 = {{ 'Titanium' | calcPre }}\n
                                  \n
                                  \n

                                  ${F("resource_Copper_name")}:

                                  {{ i.power.val, 'power', 'Copper' | getBase }}^{{ s.exp1.val, 'exp1' | generic }} = {{ 'Copper' | calcPre }}\n
                                  \n
                                  \n

                                  ${F("resource_Orichalcum_name")}:

                                  {{ i.power.val, 'power', 'Orichalcum' | getBase }}^{{ s.exp1.val, 'exp1' | generic }} = {{ 'Orichalcum' | calcPre }}\n
                                  \n
                                  \n

                                  ${F("resource_Iridium_name")}:

                                  ({{ i.power.val, 'power', 'Iridium' | getBase }}^{{ s.exp2.val, 'exp2' | generic }})^{{ i.weapon.val, 'weapon', 'Iridium' | getExponent }} * 50 = {{ 'Iridium' | calcPre }}\n
                                  \n
                                  \n

                                  ${F("resource_Iron_name")}:

                                  {{ i.weapon.val, 'weapon', 'Iron' | getBase }}^{{ s.exp1.val, 'exp1' | generic }} * 10 = {{ 'Iron' | calcPre }}\n
                                  \n
                                  \n

                                  ${F("resource_Nano_Tube_name")}:

                                  {{ i.weapon.val, 'weapon', 'Nano_Tube' | getBase }}^{{ s.exp1.val, 'exp1' | generic }} = {{ 'Nano_Tube' | calcPre }}\n
                                  \n
                                  \n

                                  ${F("resource_Quantium_name")}:

                                  {{ i.weapon.val, 'weapon', 'Quantium' | getBase }}^{{ s.exp1.val, 'exp1' | generic }} = {{ 'Quantium' | calcPre }}\n
                                  \n
                                  \n `);let l='\n
                                  \n
                                  \n

                                  {{ i.owned.val, i.class.val | finalLabel }}

                                  \n
                                  \n ';["Money","Aluminium","Adamantite","Steel","Alloy","Neutronium","Titanium","Copper","Orichalcum","Iridium","Iron","Nano_Tube","Quantium"].forEach((function(e){l+=`\n
                                  \n

                                  ${F("resource_"+e+"_name")}:

                                  {{ r.${e}.preVal, 'base' | generic }} * 0.750.9(1 + ({{ i.owned.val, 'owned' | generic }} - 2) / 25 * {{ s.creep.val, 'creep' | generic }})3 * (1 + {{ i.owned.val, 'owned' | generic }}) = {{ '${e}' | calcFinal }}\n
                                  \n `})),l+="
                                  ",i.append(l),s.append(`\n
                                  \n
                                  ${F("wiki_calc_tp_ships_costs_owned")}
                                  \n
                                  \n
                                  \n ${F("outer_shipyard_class")}\n
                                  \n
                                  \n \n \n {{ 'class', 'corvette' | genericLabel }}\n {{ 'class', 'frigate' | genericLabel }}\n {{ 'class', 'destroyer' | genericLabel }}\n {{ 'class', 'cruiser' | genericLabel }}\n {{ 'class', 'battlecruiser' | genericLabel }}\n {{ 'class', 'dreadnought' | genericLabel }}\n {{ 'class', 'explorer' | genericLabel }}\n \n
                                  \n
                                  \n
                                  \n
                                  \n ${F("outer_shipyard_power")}\n
                                  \n
                                  \n \n \n {{ 'power', 'solar' | genericLabel }}\n {{ 'power', 'diesel' | genericLabel }}\n {{ 'power', 'fission' | genericLabel }}\n {{ 'power', 'fusion' | genericLabel }}\n {{ 'power', 'elerium' | genericLabel }}\n \n
                                  \n
                                  \n
                                  \n
                                  \n ${F("outer_shipyard_weapon")}\n
                                  \n
                                  \n \n \n {{ 'weapon', 'railgun' | genericLabel }}\n {{ 'weapon', 'laser' | genericLabel }}\n {{ 'weapon', 'p_laser' | genericLabel }}\n {{ 'weapon', 'plasma' | genericLabel }}\n {{ 'weapon', 'phaser' | genericLabel }}\n {{ 'weapon', 'disruptor' | genericLabel }}\n \n
                                  \n
                                  \n
                                  \n
                                  \n ${F("outer_shipyard_armor")}\n
                                  \n
                                  \n \n \n {{ 'armor', 'steel' | genericLabel }}\n {{ 'armor', 'alloy' | genericLabel }}\n {{ 'armor', 'neutronium' | genericLabel }}\n \n
                                  \n
                                  \n
                                  \n
                                  \n ${F("outer_shipyard_engine")}\n
                                  \n
                                  \n \n \n {{ 'engine', 'ion' | genericLabel }}\n {{ 'engine', 'tie' | genericLabel }}\n {{ 'engine', 'pulse' | genericLabel }}\n {{ 'engine', 'photon' | genericLabel }}\n {{ 'engine', 'vacuum' | genericLabel }}\n {{ 'engine', 'emdrive' | genericLabel }}\n \n
                                  \n
                                  \n
                                  \n
                                  \n ${F("outer_shipyard_sensor")}\n
                                  \n
                                  \n \n \n {{ 'sensor', 'visual' | genericLabel }}\n {{ 'sensor', 'radar' | genericLabel }}\n {{ 'sensor', 'lidar' | genericLabel }}\n {{ 'sensor', 'quantum' | genericLabel }}\n \n
                                  \n
                                  \n
                                  \n
                                  \n \n \n
                                  \n `);let _=function(e,t){switch(t){case"sensor":switch(e){case"visual":return 1;case"radar":return 1.04;case"lidar":return 1.08;case"quantum":return 1.12}case"weapon":switch(e){case"railgun":return 1;case"laser":return 1.05;case"p_laser":return 1.035;case"plasma":return 1.1;case"phaser":return 1.15;case"disruptor":return 1.2}}};zs({el:"#tpShipsCostsCalc",data:{i:n,r:c,s:o},methods:{val(e){n[e].val&&n[e].val<0&&(n[e].val=0)},pickGeneric(e,t){if(n[e].val=t,"class"===e){let e=1,a=1,r=1;switch(t){case"corvette":e=1,a=1,r=2;break;case"frigate":e=1.1,a=1.09,r=1.5;break;case"destroyer":e=1.2,a=1.18,r=1.2;break;case"cruiser":e=1.3,a=1.25;break;case"battlecruiser":e=1.35,a=1.3,r=.8;break;case"dreadnought":e=1.4,a=1.35,r=.5;break;case"explorer":e=1.45,a=1,r=5}o.exp1.val=e,o.exp2.val=a,o.creep.val=r}},resetInputs(){n.owned.val=void 0,n.class.val=void 0,n.power.val=void 0,n.weapon.val=void 0,n.armor.val=void 0,n.engine.val=void 0,n.sensor.val=void 0,["Money","Aluminium","Adamantite","Steel","Alloy","Neutronium","Titanium","Copper","Orichalcum","Iridium","Iron","Nano_Tube","Quantium"].forEach((function(e){c[e]={base:void 0,preVal:void 0,preVis:!1,val:void 0,vis:!1}})),o.exp1.val=void 0,o.exp2.val=void 0,o.creep.val=void 0},importInputs(){if(n.class.val)if(t.space.shipyard&&t.space.shipyard.ships){let e=0;t.space.shipyard.ships.forEach((function(t){t.class===n.class.val&&e++})),n.owned.val=e}else n.owned.val=0}},filters:{finalLabel:(e,t)=>"explorer"===t?F("wiki_calc_tp_ships_costs_final_costs_explorer"):(0!==e&&1!==e&&(e=">1"),t=F(t?`outer_shipyard_class_${t}`:"outer_shipyard_class"),F("wiki_calc_tp_ships_costs_final_costs",[F("wiki_calc_tp_ships_costs_final_costs_owned",[e,t])])),generic:(e,t)=>void 0!==e?e:F("wiki_calc_tp_ships_costs_"+t),genericLabel:(e,t)=>F(t?`outer_shipyard_${e}_${t}`:`outer_shipyard_${e}`),getBase(e,t,a){if(!e)return F("wiki_calc_tp_ships_costs_res_base",[F(`outer_shipyard_${t}`)]);let r=0;switch(t){case"class":switch(e){case"corvette":r="Money"===a?25e5:"Aluminium"===a?5e5:0;break;case"frigate":r="Money"===a?5e6:"Aluminium"===a?125e4:0;break;case"destroyer":r="Money"===a?15e6:"Aluminium"===a?35e5:0;break;case"cruiser":r="Money"===a?5e7:"Aluminium"===a?0:1e6;break;case"battlecruiser":r="Money"===a?125e6:"Aluminium"===a?0:26e5;break;case"dreadnought":r="Money"===a?5e8:"Aluminium"===a?0:8e6;break;case"explorer":r="Money"===a?8e8:"Aluminium"===a?0:95e5}break;case"armor":switch(e){case"steel":r="Steel"===a?35e4:0;break;case"alloy":r="Alloy"===a?25e4:0;break;case"neutronium":r="Neutronium"===a?1e4:0}break;case"engine":switch(e){case"ion":r=75e3;break;case"tie":r=15e4;break;case"pulse":r=125e3;break;case"photon":r=21e4;break;case"vacuum":r=3e5;break;case"emdrive":r=125e4}break;case"power":let t=["dreadnought","explorer"].includes(n.class.val);switch(e){case"solar":case"diesel":r="Iridium"===a?15e3:"Orichalcum"===a&&t||"Copper"===a&&!t?4e4:0;break;case"fission":r="Iridium"===a?3e4:"Orichalcum"===a&&t||"Copper"===a&&!t?5e4:0;break;case"fusion":r="Iridium"===a?4e4:"Orichalcum"===a&&t||"Copper"===a&&!t?5e4:0;break;case"elerium":r="Iridium"===a?55e3:"Orichalcum"===a&&t||"Copper"===a&&!t?6e4:0}break;case"weapon":switch(e){case"railgun":r="Iron"===a?25e3:0;break;case"laser":case"p_laser":r="Nano_Tube"===a?12e3:0;break;case"plasma":r="Nano_Tube"===a?2e4:0;break;case"phaser":r="Quantium"===a?18e3:0;break;case"disruptor":r="Quantium"===a?35e3:0}}return c[a].base=r,r},getExponent:(e,t)=>e?_(e,t):F("wiki_calc_tp_ships_costs_res_exp",[F(`outer_shipyard_${t}`)]),calcPre(e){if(void 0!==c[e].base){let t=0,a=c[e].base;switch(e){case"Money":"explorer"===n.class.val?t=1:n.sensor.val&&(t=_(n.sensor.val,"sensor"));break;case"Steel":case"Alloy":case"Neutronium":case"Copper":case"Orichalcum":case"Iron":case"Nano_Tube":case"Quantium":o.exp1.val&&(t=o.exp1.val);break;case"Titanium":case"Iridium":o.exp2.val&&(t=o.exp2.val)}if(t){if("Iridium"!==e||n.weapon.val)return"Iridium"===e&&(a**=_(n.weapon.val,"weapon")),a**=t,"explorer"===n.class.val&&("Titanium"===e?a*=5:"Iron"===e?a*=10:"Iridium"===e&&(a*=50)),c[e].preVal=+a.toFixed(0),c[e].preVis=!0,c[e].preVal}else if("Aluminium"===e||"Adamantite"===e)return c[e].preVal=a,c[e].preVis=!0,c[e].preVal}c[e].preVal=void 0,c[e].preVis=!1},calcFinal(e){if(c[e].vis=void 0!==c[e].preVal&&void 0!==n.owned.val,c[e].vis){let t=n.owned.val;if("explorer"===n.class.val)c[e].val=+(c[e].preVal*(3*(t+1))).toFixed(0);else{let a=0===t?.75:1===t?.9:1+(t-2)/25*o.creep.val;c[e].val=+(c[e].preVal*a).toFixed(0)}return c[e].val}c[e].val=void 0}}})}(Gn(Tn(e,{name:"tp_ships_costs",template:"mechanics",label:F("wiki_mechanics_tp_ships_costs"),paragraphs:3,break:[3],h_level:2,para_data:{2:[F("outer_shipyard_class")],3:[F("outer_shipyard_class")]}}),"mechanics","tp_ships_costs",F("wiki_mechanics_tp_ships_costs")));{let t=Bn(Tn(e,{name:"tp_ships_crew",template:"mechanics",label:F("wiki_mechanics_tp_ships_crew"),paragraphs:1,h_level:2,para_data:{1:[F("outer_shipyard_class")]}}),"mechanics","tp_ships_crew",F("wiki_mechanics_tp_ships_crew"));["corvette","frigate","destroyer","cruiser","battlecruiser","dreadnought","explorer"].forEach((function(e){t.append(`
                                  ${F("outer_shipyard_class_"+e)}: ${tt({class:e})}`)}))}!function(e){let t=$('
                                  ');e.append(t);let a=$("
                                  "),r=$("
                                  "),i=$("
                                  ");t.append(a),t.append(r),t.append(i);let s={class:{val:void 0},power:{val:void 0},weapon:{val:void 0},engine:{val:void 0},sensor:{val:void 0}},n={genMulti:{val:void 0},useMulti:{val:void 0},power:{val:void 0,vis:!1},weapon:{val:void 0,vis:!1},engine:{val:void 0,vis:!1},sensor:{val:void 0,vis:!1},net:{val:void 0,vis:!1,neg:void 0}};a.append(`\n
                                  \n
                                  \n
                                  \n ${F("outer_shipyard_class")}\n
                                  \n
                                  \n \n \n {{ 'class', 'corvette' | genericLabel }}\n {{ 'class', 'frigate' | genericLabel }}\n {{ 'class', 'destroyer' | genericLabel }}\n {{ 'class', 'cruiser' | genericLabel }}\n {{ 'class', 'battlecruiser' | genericLabel }}\n {{ 'class', 'dreadnought' | genericLabel }}\n {{ 'class', 'explorer' | genericLabel }}\n \n
                                  \n
                                  \n
                                  \n `),r.append(`\n
                                  \n
                                  \n

                                  ${F("wiki_calc_tp_ships_power_gen")}

                                  \n
                                  \n
                                  \n {{ i.power.val, 'power' | genericVal }} * {{ s.genMulti.val, 'gen_multi' | generic }} = {{ | calcPower }}\n
                                  \n
                                  \n
                                  \n
                                  \n
                                  \n ${F("outer_shipyard_power")}\n
                                  \n
                                  \n \n \n {{ 'power', 'solar' | genericLabel }}\n {{ 'power', 'diesel' | genericLabel }}\n {{ 'power', 'fission' | genericLabel }}\n {{ 'power', 'fusion' | genericLabel }}\n {{ 'power', 'elerium' | genericLabel }}\n \n
                                  \n
                                  \n
                                  \n `),i.append(`\n
                                  \n
                                  \n

                                  ${F("wiki_calc_tp_ships_power_use",[F("outer_shipyard_weapon")])}

                                  \n
                                  \n
                                  \n {{ i.weapon.val, 'weapon' | genericVal }} * {{ s.useMulti.val, 'use_multi' | generic }} = {{ | calcWeapon }}\n
                                  \n
                                  \n

                                  ${F("wiki_calc_tp_ships_power_use",[F("outer_shipyard_engine")])}

                                  \n
                                  \n
                                  \n {{ i.engine.val, 'engine' | genericVal }} * {{ s.useMulti.val, 'use_multi' | generic }} = {{ | calcEngine }}\n
                                  \n
                                  \n

                                  ${F("wiki_calc_tp_ships_power_use",[F("outer_shipyard_sensor")])}

                                  \n
                                  \n
                                  \n {{ i.sensor.val, 'sensor' | genericVal }} * {{ s.useMulti.val, 'use_multi' | generic }} = {{ | calcSensor }}\n
                                  \n
                                  \n

                                  ${F("wiki_calc_tp_ships_power_net")}

                                  \n
                                  \n
                                  \n {{ s.power.val, 'power' | genericResult }} - {{ s.weapon.val, 'weapon' | genericResult }} - {{ s.engine.val, 'engine' | genericResult }} - {{ s.sensor.val, 'sensor' | genericResult }} = {{ | calcNet }} = ${F("wiki_calc_tp_ships_power_net_pos")} = ${F("wiki_calc_tp_ships_power_net_neg")}\n
                                  \n
                                  \n
                                  \n
                                  \n
                                  \n ${F("outer_shipyard_weapon")}\n
                                  \n
                                  \n \n \n {{ 'weapon', 'railgun' | genericLabel }}\n {{ 'weapon', 'laser' | genericLabel }}\n {{ 'weapon', 'p_laser' | genericLabel }}\n {{ 'weapon', 'plasma' | genericLabel }}\n {{ 'weapon', 'phaser' | genericLabel }}\n {{ 'weapon', 'disruptor' | genericLabel }}\n \n
                                  \n
                                  \n
                                  \n
                                  \n ${F("outer_shipyard_engine")}\n
                                  \n
                                  \n \n \n {{ 'engine', 'ion' | genericLabel }}\n {{ 'engine', 'tie' | genericLabel }}\n {{ 'engine', 'pulse' | genericLabel }}\n {{ 'engine', 'photon' | genericLabel }}\n {{ 'engine', 'vacuum' | genericLabel }}\n {{ 'engine', 'emdrive' | genericLabel }}\n \n
                                  \n
                                  \n
                                  \n
                                  \n ${F("outer_shipyard_sensor")}\n
                                  \n
                                  \n \n \n {{ 'sensor', 'visual' | genericLabel }}\n {{ 'sensor', 'radar' | genericLabel }}\n {{ 'sensor', 'lidar' | genericLabel }}\n {{ 'sensor', 'quantum' | genericLabel }}\n \n
                                  \n
                                  \n
                                  \n
                                  \n \n
                                  \n `),zs({el:"#tpShipsPowerCalc",data:{i:s,s:n},methods:{pickGeneric(e,t){if(s[e].val=t,"class"===e){let e=1,a=1;switch(t){case"frigate":e=1.1,a=1.2;break;case"destroyer":e=1.5,a=1.65;break;case"cruiser":e=2,a=2.5;break;case"battlecruiser":e=2.5,a=3.5;break;case"dreadnought":e=5,a=6.5;break;case"explorer":e=6,a=2}n.genMulti.val=e,n.useMulti.val=a}},resetInputs(){s.class.val=void 0,s.power.val=void 0,s.weapon.val=void 0,s.engine.val=void 0,s.sensor.val=void 0,n.genMulti.val=void 0,n.useMulti.val=void 0,n.power.val=void 0,n.weapon.val=void 0,n.engine.val=void 0,n.sensor.val=void 0,n.net.val=void 0,n.power.vis=!1,n.weapon.vis=!1,n.engine.vis=!1,n.sensor.vis=!1,n.net.vis=!1,n.net.neg=void 0}},filters:{generic:(e,t)=>void 0!==e?e:F("wiki_calc_tp_ships_power_"+t),genericResult:(e,t)=>void 0!==e?e:"power"===t?F("wiki_calc_tp_ships_power_gen"):F("wiki_calc_tp_ships_power_use",[F(`outer_shipyard_${t}`)]),genericLabel:(e,t)=>F(t?`outer_shipyard_${e}_${t}`:`outer_shipyard_${e}`),genericVal(e,t){if(!e)return F("wiki_calc_tp_ships_power_base",[F(`outer_shipyard_${t}`)]);let a={};return a[t]=e,Math.abs(at(a,"explorer"===s.class.val))},calcPower(){if(n.power.vis=s.class.val&&s.power.val,n.power.vis)return n.power.val=at({class:s.class.val,power:s.power.val}),n.power.val},calcWeapon(){if(n.weapon.vis=s.class.val&&s.weapon.val,n.weapon.vis)return n.weapon.val=Math.abs(at({class:s.class.val,weapon:s.weapon.val})),n.weapon.val},calcEngine(){if(n.engine.vis=s.class.val&&s.engine.val,n.engine.vis)return n.engine.val=Math.abs(at({class:s.class.val,engine:s.engine.val})),n.engine.val},calcSensor(){if(n.sensor.vis=s.class.val&&s.sensor.val,n.sensor.vis)return n.sensor.val=Math.abs(at({class:s.class.val,sensor:s.sensor.val})),n.sensor.val},calcNet(){if(n.net.vis=s.class.val&&s.power.val&&s.weapon.val&&s.engine.val&&s.sensor.val,n.net.vis)return n.net.val=at({class:s.class.val,power:s.power.val,weapon:s.weapon.val,engine:s.engine.val,sensor:s.sensor.val}),n.net.neg=n.net.val<0,n.net.val;n.net.neg=void 0}}})}(Gn(Tn(e,{name:"tp_ships_power",template:"mechanics",label:F("wiki_mechanics_tp_ships_power"),paragraphs:4,break:[3],h_level:2,para_data:{3:[F("outer_shipyard_power"),F("outer_shipyard_class")],4:[F("outer_shipyard_weapon"),F("outer_shipyard_engine"),F("outer_shipyard_sensor"),F("outer_shipyard_class")]}}),"mechanics","tp_ships_power",F("wiki_mechanics_tp_ships_power"))),function(e){let t=$('
                                  ');e.append(t),t.append(`

                                  ${F("wiki_mechanics_tp_ships_firepower")}

                                  `);let a=$("
                                  "),r=$("
                                  ");t.append(a),t.append(r);let i={weapon:{val:void 0},class:{val:void 0}},s={result:{vis:!1,val:0}};a.append('\n
                                  \n {{ i.weapon.val | weaponVal }} * {{ i.class.val | classVal }} = {{ | calc }}\n
                                  \n '),r.append(`\n
                                  \n
                                  \n
                                  \n ${F("outer_shipyard_weapon")}\n
                                  \n
                                  \n \n \n {{ 'railgun' | weaponLabel }}\n {{ 'laser' | weaponLabel }}\n {{ 'p_laser' | weaponLabel }}\n {{ 'plasma' | weaponLabel }}\n {{ 'phaser' | weaponLabel }}\n {{ 'disruptor' | weaponLabel }}\n \n
                                  \n
                                  \n
                                  \n
                                  \n ${F("outer_shipyard_class")}\n
                                  \n
                                  \n \n \n {{ 'corvette' | classLabel }}\n {{ 'frigate' | classLabel }}\n {{ 'destroyer' | classLabel }}\n {{ 'cruiser' | classLabel }}\n {{ 'battlecruiser' | classLabel }}\n {{ 'dreadnought' | classLabel }}\n {{ 'explorer' | classLabel }}\n \n
                                  \n
                                  \n
                                  \n
                                  \n \n
                                  \n `),zs({el:"#tpShipsFirepowerCalc",data:{i,s},methods:{pickWeapon(e){i.weapon.val=e},pickClass(e){i.class.val=e},resetInputs(){i.weapon.val=void 0,i.class.val=void 0}},filters:{weaponVal(e){switch(e){case"railgun":return 36;case"laser":return 64;case"p_laser":return 54;case"plasma":return 90;case"phaser":return 114;case"disruptor":return 156;default:return F("wiki_calc_tp_ships_firepower_weapon")}},classVal(e){switch(e){case"corvette":return 1;case"frigate":return 1.5;case"destroyer":return 2.75;case"cruiser":return 5.5;case"battlecruiser":return 10;case"dreadnought":return 22;case"explorer":return 1.2;default:return F("wiki_calc_tp_ships_firepower_class")}},weaponLabel:e=>F(e?"outer_shipyard_weapon_"+e:"outer_shipyard_weapon"),classLabel:e=>F(e?"outer_shipyard_class_"+e:"outer_shipyard_class"),calc(){if(s.result.vis=i.weapon.val&&i.class.val,s.result.vis)return s.result.val=rt({weapon:i.weapon.val,class:i.class.val}),s.result.val}}})}(Gn(Tn(e,{name:"tp_ships_firepower",template:"mechanics",label:F("wiki_mechanics_tp_ships_firepower"),paragraphs:2,break:[3],h_level:2,para_data:{1:[F("firepower"),F("outer_shipyard_class"),F("outer_shipyard_weapon")],2:[F("firepower"),F("outer_shipyard_hull")]}}),"mechanics","tp_ships_firepower",F("wiki_mechanics_tp_ships_firepower"))),function(e){let t=$('
                                  ');e.append(t),t.append(`

                                  ${F("wiki_calc_tp_ships_hull_damage_range")}

                                  `);let a=$("
                                  "),r=$("
                                  ");t.append(a),t.append(r);let i={hull:{val:void 0},triton:{val:!1}},s={result:{vis:!1,val:void 0}};a.append('\n
                                  \n 1 - {{ | calc }}\n
                                  \n '),r.append(`\n
                                  \n
                                  \n
                                  \n ${F("outer_shipyard_armor")}\n
                                  \n
                                  \n \n \n {{ 'steel' | hullLabel }}\n {{ 'alloy' | hullLabel }}\n {{ 'neutronium' | hullLabel }}\n \n
                                  \n
                                  \n
                                  ${Dn("triton")}
                                  \n
                                  \n
                                  \n \n
                                  \n `),zs({el:"#tpShipsHullCalc",data:{i,s},methods:{pickHull(e){i.hull.val=e},resetInputs(){i.hull.val=void 0,i.triton.val=!1}},filters:{hullLabel:e=>F(e?"outer_shipyard_armor_"+e:"outer_shipyard_armor"),calc(){if(s.result.vis=i.hull.val,s.result.vis){let e=0;switch(i.hull.val){case"steel":e=8;break;case"alloy":e=6;break;case"neutronium":e=4}return i.triton.val&&(e*=2),s.result.val=e-1,s.result.val}}}})}(Gn(Tn(e,{name:"tp_ships_hull",template:"mechanics",label:F("wiki_mechanics_tp_ships_hull"),paragraphs:7,break:[3,6,7],h_level:2,para_data:{1:[F("firepower"),F("outer_shipyard_hull")],2:[F("outer_shipyard_hull"),"90%",F("firepower"),.9],3:[Dn("dwarf"),"1/10",F("outer_shipyard_hull")],4:[F("outer_shipyard_armor")],5:[Dn("triton")],6:["1%",F("outer_shipyard_hull")],7:[F("outer_shipyard_hull"),"10%"]}}),"mechanics","tp_ships_hull",F("wiki_calc_tp_ships_hull_damage_range")));let r=Tn(e,{name:"tp_ships_sensors",template:"mechanics",label:F("wiki_mechanics_tp_ships_sensors"),paragraphs:2,h_level:2,para_data:{1:[F("space_scan_effectiveness")],2:[F("space_scan_effectiveness"),F("outer_shipyard_sensors"),F("outer_shipyard_class"),F("outer_shipyard_sensor"),Dn("triton"),F("space_fob_title")]}});!function(e){let t=$('
                                  ');e.append(t),t.append(`

                                  ${F("wiki_calc_tp_ships_scan_ship")}

                                  `);let a=$("
                                  "),r=$("
                                  ");t.append(a),t.append(r);let i={sensor:{val:void 0},class:{val:void 0}},s={result:{vis:!1,val:0}};a.append('\n
                                  \n {{ i.sensor.val | sensorVal }} * {{ i.class.val | classVal }} = {{ | calc }}\n
                                  \n '),r.append(`\n
                                  \n
                                  \n
                                  \n ${F("outer_shipyard_sensor")}\n
                                  \n
                                  \n \n \n {{ 'visual' | sensorLabel }}\n {{ 'radar' | sensorLabel }}\n {{ 'lidar' | sensorLabel }}\n {{ 'quantum' | sensorLabel }}\n \n
                                  \n
                                  \n
                                  \n
                                  \n ${F("outer_shipyard_class")}\n
                                  \n
                                  \n \n \n {{ 'corvette' | classLabel }}\n {{ 'frigate' | classLabel }}\n {{ 'destroyer' | classLabel }}\n {{ 'cruiser' | classLabel }}\n {{ 'battlecruiser' | classLabel }}\n {{ 'dreadnought' | classLabel }}\n {{ 'explorer' | classLabel }}\n \n
                                  \n
                                  \n
                                  \n
                                  \n \n
                                  \n `),zs({el:"#tpShipsScanCalc",data:{i,s},methods:{pickSensor(e){i.sensor.val=e},pickClass(e){i.class.val=e},resetInputs(){i.sensor.val=void 0,i.class.val=void 0}},filters:{sensorVal(e){switch(e){case"visual":return 1;case"radar":return 10;case"lidar":return 18;case"quantum":return 32;default:return F("wiki_calc_tp_ships_scan_sensor")}},classVal(e){switch(e){case"corvette":case"frigate":return 2;case"destroyer":case"cruiser":return 1.5;case"battlecruiser":case"dreadnought":return 1;case"explorer":return 5;default:return F("wiki_calc_tp_ships_firepower_class")}},sensorLabel:e=>F(e?"outer_shipyard_sensor_"+e:"outer_shipyard_sensor"),classLabel:e=>F(e?"outer_shipyard_class_"+e:"outer_shipyard_class"),calc(){if(s.result.vis=i.sensor.val&&(i.class.val||"visual"===i.sensor.val),s.result.vis)return s.result.val=dt({sensor:i.sensor.val,class:i.class.val}),s.result.val}}})}(Gn(r,"mechanics","tp_ships_scan",F("wiki_calc_tp_ships_scan_ship"))),function(e){let t=$('
                                  ');e.append(t);let a=$("
                                  "),r=$("
                                  ");t.append(a),t.append(r);let i={range:{val:void 0},triton:{val:!1},fob:{val:!1}},s={combined:{vis:!1,val:void 0},adjusted:{vis:!1,val:void 0,adjust:!1},intel:{vis:!1,val:void 0}};a.append(`\n
                                  \n

                                  ${F("wiki_calc_tp_ships_intel_combined_range")}

                                  \n
                                  \n
                                  \n {{ i.range.val, 'ship_range' | generic }} + 10 = {{ | calcRange }}\n
                                  \n
                                  \n

                                  ${F("wiki_calc_tp_ships_intel_adjusted_range_below",[F("wiki_calc_tp_ships_intel_adjusted_range"),F("wiki_calc_tp_ships_intel_combined_range")])}

                                  \n
                                  \n
                                  \n {{ s.combined.val, 'combined_range' | generic }} = {{ | calcAdjusted }}\n
                                  \n
                                  \n

                                  ${F("wiki_calc_tp_ships_intel_adjusted_range_above",[F("wiki_calc_tp_ships_intel_adjusted_range"),F("wiki_calc_tp_ships_intel_combined_range")])}

                                  \n
                                  \n
                                  \n (({{ s.combined.val, 'combined_range' | generic }} - 100) / (({{ s.combined.val, 'combined_range' | generic }} - 100) + 200) * 100) + 100 = {{ | calcAdjusted }}\n
                                  \n
                                  \n

                                  ${F("space_scan_effectiveness")}

                                  \n
                                  \n
                                  \n ({{ s.adjusted.val, 'adjusted_range' | generic }} + 25) / 1.25 = {{ | calcIntel }}\n
                                  \n `),r.append(`\n
                                  \n
                                  ${F("wiki_calc_tp_ships_intel_ship_range")}
                                  \n
                                  ${Dn("triton")}
                                  \n
                                  ${F("space_fob_title")}
                                  \n
                                  \n
                                  \n \n
                                  \n `),zs({el:"#tpShipsIntelCalc",data:{i,s},methods:{val(e){i[e].val&&i[e].val<0&&(i[e].val=0)},resetInputs(){i.range.val=void 0,i.triton.val=!1,i.fob.val=!1}},filters:{generic:(e,t)=>void 0!==e?e:F("wiki_calc_tp_ships_intel_"+t),calcRange(){if(s.combined.vis=void 0!==i.range.val,s.combined.vis)return s.combined.val=i.range.val+(i.triton.val&&i.fob.val?10:0),s.combined.val;s.combined.val=void 0},calcAdjusted(){if(s.adjusted.vis=void 0!==s.combined.val,s.adjusted.vis){let e=s.combined.val;return e>100?(e=(e-100)/(e-100+200)*100+100,s.adjusted.adjust=!0):s.adjusted.adjust=!1,s.adjusted.val=e,s.adjusted.val}s.adjusted.val=void 0},calcIntel(){if(s.intel.vis=void 0!==s.adjusted.val,s.intel.vis)return s.intel.val=(s.adjusted.val+25)/1.25,s.intel.val;s.intel.val=void 0}}})}(Gn(r,"mechanics","tp_ships_intel",F("space_scan_effectiveness"))),En("add","mechanics-gameplay","tp_ships",F("wiki_mechanics_tp_ships"))}Tn(a,{name:"seed",template:"mechanics",label:F("wiki_mechanics_seed"),paragraphs:14,break:[3,5,6,7,8,9,10,11,12,13,14],h_level:2,para_data:{4:[F("wiki_faq_q_soft_reset")],7:[F("evo_sentience_title")],8:[F("wiki_menu_combat"),F("trait_revive_name"),F("trait_infectious_name")],9:[F("civics_spy_influence"),F("civics_spy_sabotage"),F("civics_spy_incite")],10:[F("wiki_menu_major"),F("wiki_menu_minor")],11:[F("arpa_gene_mutation"),F("tech_fanaticism"),F("tech_deify"),F("tab_arpa_crispr"),F("wiki_arpa_crispr_evolve")],12:[F("governor")],13:[F("wiki_menu_planets"),F("wiki_resets_bioseed"),F("wiki_resets_blackhole"),F("wiki_resets_vacuum")],14:[F("portal_spire_name")]},data_link:{7:["wiki.html#prehistoric-structures-sentience"],8:["wiki.html#combat-gameplay","wiki.html#traits-species-major_revive","wiki.html#traits-species-major_infectious"],10:["wiki.html#major-events","wiki.html#minor-events"],11:[!1,t.genes.transcendence?"wiki.html#civilized-tech-alt_fanaticism":"wiki.html#civilized-tech-fanaticism","wiki.html#early_space-tech-deify",!1,"wiki.html#crispr-prestige-recombination"],12:["wiki.html#governor-gameplay"],13:["wiki.html#planets-gameplay","wiki.html#resets-prestige-bioseed","wiki.html#resets-prestige-blackhole","wiki.html#resets-prestige-vacuum"],14:["wiki.html#hell-gameplay-spire"]}}),En("add","mechanics-gameplay","seed",F("wiki_mechanics_seed"));{let e=jr(!0),r=jr(!1,!0),i=t.stats.hasOwnProperty("reset")?t.stats.reset:0,s=Math.floor(i/r.length);if(s>0)switch(s){case 1:e=`${e} ${F("wiki_mechanics_cheese_squared")}`;break;case 2:e=`${e} ${F("wiki_mechanics_cheese_cubed")}`;break;case 3:e=`${e} ${F("wiki_mechanics_cheese_tesseracted")}`;break;case 4:e=`${e} ${F("wiki_mechanics_cheese_penteracted")}`;break;case 5:e=`${e} ${F("wiki_mechanics_cheese_hexeracted")}`;break;case 6:e=`${e} ${F("wiki_mechanics_cheese_hepteracted")}`;break;case 7:e=`${e} ${F("wiki_mechanics_cheese_octeracted")}`;break;case 8:e=`${e} ${F("wiki_mechanics_cheese_enneracted")}`;break;case 9:e=`${e} ${F("wiki_mechanics_cheese_dekeracted")}`;break;default:e=`${e}^${s+1}`}let n=[];for(let e=0;e${F(`cheese_${r[e]}`)} (${e+1})`);Tn(a,{name:"cheese",template:"mechanics",label:F("wiki_mechanics_cheese"),paragraphs:5,break:[4,5],h_level:2,para_data:{1:[F("tech_swiss_bank",[F("cheese_swiss")])],2:[r.length,F("cheese_swiss")],3:[F("wiki_mechanics_cheese")],4:[F("wiki_mechanics_cheese"),e,i+1],5:[n.join(", ")]},data_color:{4:["warning","danger","caution"],5:[!1]}}),En("add","mechanics-gameplay","cheese",F("wiki_mechanics_cheese"))}{let e=Tn(a,{name:"thralls",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:9,break:[4,8],h_level:2,para_data:{1:[F("trait_unfathomable_name")],5:[100,100],8:[1]},data_link:{1:["wiki.html#traits-species-genus_unfathomable"]}});Tn(e,{name:"thralls_cath",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:1,h_level:!1,para_data:{1:[F("race_cath"),3]}}),Tn(e,{name:"thralls_pterodacti",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:1,h_level:!1,para_data:{1:[F("race_pterodacti"),3]}}),Tn(e,{name:"thralls_entish",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:1,h_level:!1,para_data:{1:[F("race_entish"),"40%"]}}),Tn(e,{name:"thralls_cacti",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:1,h_level:!1,para_data:{1:[F("race_cacti"),"32%"]}}),Tn(e,{name:"thralls_moldling",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:3,break:[3],h_level:!1,para_data:{1:[F("race_moldling")],2:[[`${F("tech_smelting")}`,`${F("tech_dynamite")}`,`${F("tech_portland_cement")}`,`${F("tech_oxygen_converter")}`,`${F("tech_machinery")}`,`${F("tech_uranium_storage")}`,`${Sr.tech.synthetic_fur.title()}`,`${F("tech_rover")}`,`${F("tech_starcharts")}`,`${F("tech_nano_tubes")}`,`${F("tech_stanene")}`,`${F("tech_hydroponics")}`,`${F("tech_orichalcum_panels")}`,`${F("tech_cybernetics")}`].join(", ")]},data_color:{2:[!1]}}),Tn(e,{name:"thralls_sharkin",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:1,h_level:!1,para_data:{1:[F("race_sharkin")]}}),Tn(e,{name:"thralls_satyr",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:1,h_level:!1,para_data:{1:[F("race_satyr")]}}),Tn(e,{name:"thralls_phoenix",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:1,h_level:!1,para_data:{1:[F("race_phoenix"),"0.25"]}}),Tn(e,{name:"thralls_salamander",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:1,h_level:!1,para_data:{1:[F("race_salamander"),"20%"]}}),Tn(e,{name:"thralls_unicorn",template:"mechanics",label:F("wiki_mechanics_thralls"),paragraphs:1,h_level:!1,para_data:{1:[F("race_unicorn"),1]}}),En("add","mechanics-gameplay","thralls",F("wiki_mechanics_thralls"))}}(a);break;case"government":!function(e){let t=En("create",e);Tn(t,{name:"info",template:"government",label:F("tab_gov"),paragraphs:8,break:[3,6],h_level:2,para_data:{2:[F("govern_anarchy")],3:[F("civics_revolution")],4:[F("civics_revolution")],5:[1e3]},data_color:{2:["caution"]}}),En("add","government-gameplay","info",F("tab_gov"));let a={anarchy:{paragraphs:5,break:[2,5],para_data:{2:[10],3:["10th","0.25%","1/2"]}},autocracy:{paragraphs:4,break:[2,4],para_data:{2:["35%","25%"],3:["18%",F("tech_electricity"),"10%",F("tech_virtual_reality")]},para_color:{}},democracy:{paragraphs:6,break:[2,5],para_data:{2:[F("job_entertainer"),"20%"],3:[F("job_entertainer")],4:["25%",F("tech_electricity"),"30%",F("tech_virtual_reality")],5:["5%"],6:[F("job_farmer"),F("job_lumberjack"),F("job_quarry_worker"),F("job_miner"),F("job_crystal_miner"),F("job_coal_miner"),F("job_cement_worker"),F("job_professor"),F("job_scientist"),F("soldiers")]}},oligarchy:{paragraphs:5,break:[2,4,5],text:{1:"govern_oligarchy_desc",2:"govern_oligarchy_effect"},para_data:{2:[5,20],3:["2%",F("tech_electricity"),F("tech_virtual_reality")],4:["45%"],5:["0.5%","20%"]}},theocracy:{paragraphs:7,break:[2,6,7],para_data:{2:["12%"],3:["25%"],4:["50%"],6:["40%",F("tech_virtual_reality"),"25%",F("tech_metaphysics")]}},republic:{paragraphs:7,break:[2,5,6],para_data:{2:["25%"],3:["20%"],5:["30%",F("tech_virtual_reality"),"40%",F("tech_metaphysics")],6:["30%"],7:[30,90]},para_color:{}},socialist:{paragraphs:6,break:[2,6],para_data:{2:["35%"],3:["10%"],4:["10%"],5:["20%"],6:["42%",F("tech_virtual_reality"),"50%",F("tech_metaphysics")]}},corpocracy:{paragraphs:9,break:[2,8,9],para_data:{2:["50%"],3:["200%"],4:["150%"],5:["100%"],6:["10%"],7:["30%"],8:["5%",F("tech_virtual_reality")],9:["40%",F("tech_metaphysics")]}},technocracy:{paragraphs:5,break:[2,4],para_data:{2:["8%"],3:["10%"],4:["2%"],5:["1%",F("tech_virtual_reality"),F("tech_metaphysics")]}},federation:{paragraphs:7,break:[2,5,6],para_data:{2:["3%"],4:["25%"],5:["10%"],6:["25%","32%"],7:["36%",F("tech_virtual_reality"),"40%",F("tech_metaphysics")]}},magocracy:{paragraphs:5,break:[2,3,5],para_data:{2:["25%"],3:["25%"],4:["40%",F("tech_virtual_reality"),"50%",F("tech_metaphysics")]}}};Object.keys(a).forEach((function(e){Tn(t,{name:e,template:"government",label:F(`govern_${e}`),paragraphs:a[e].paragraphs,break:a[e].break,h_level:2,text:a[e].hasOwnProperty("text")?a[e].text:{1:`govern_${e}_desc`},para_data:a[e].hasOwnProperty("para_data")?a[e].para_data:{},para_color:a[e].hasOwnProperty("para_color")?a[e].para_color:{}}),En("add","government-gameplay",e,F(`govern_${e}`))}))}(a);break;case"governor":!function(e){let t=En("create",e);{let e=Tn(t,{name:"intro",template:"governor",label:F("governor"),paragraphs:4,h_level:2,para_data:{1:[F("arpa_genepool_governance_title")],2:[Object.keys(A).length]},data_link:{1:["wiki.html#crispr-prestige-governance"]}});En("add","governor-gameplay","intro",F("governor")),Object.keys(A).forEach((function(t){let a="";Object.keys(A[t].traits).forEach((function(e){a+=(I[e].hasOwnProperty("effect")?I[e].effect():"")+" "})),Tn(e,{name:t,template:"government",label:F(`governor_${t}`),paragraphs:2,break:[2],h_level:3,text:{1:`governor_${t}_desc`},rawtext:{2:a}}),En("add","governor-gameplay",t,F(`governor_${t}`))}))}{let e=Tn(t,{name:"task",template:"governor",paragraphs:2,h_level:2,para_data:{2:[3,F("governor_bureaucrat"),4],3:[Object.keys(G).length]}});En("add","governor-gameplay","task",F("wiki_governor_task"));{let t="tax";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:3,break:[3],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:`wiki_governor_task_${t}2`,3:"wiki_governor_task_unlock"},para_data:{3:[F("tech_tax_rates")]},data_link:{3:["wiki.html#civilized-tech-tax_rates"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}{let t="storage";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:3,break:[3],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:`wiki_governor_task_${t}2`,3:"wiki_governor_task_unlock"},para_data:{3:[F("tech_containerization")]},data_link:{3:["wiki.html#civilized-tech-containerization"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}{let t="bal_storage";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:4,break:[4],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:`wiki_governor_task_${t}2`,3:`wiki_governor_task_${t}3`,4:"wiki_governor_task_unlock"},para_data:{4:[F("tech_containerization")]},data_link:{4:["wiki.html#civilized-tech-containerization"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}{let t="merc";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:4,break:[4],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:`wiki_governor_task_${t}2`,3:`wiki_governor_task_${t}3`,4:"wiki_governor_task_unlock"},para_data:{4:[F("tech_mercs")]},data_link:{4:["wiki.html#civilized-tech-mercs"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}{let t="spy";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:3,break:[2,3],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:"wiki_governor_task_unlock",3:"wiki_governor_task_disabled"},para_data:{2:[F("tech_spy")],3:[F("tech_unification")]},data_link:{2:["wiki.html#civilized-tech-spy"],3:["wiki.html#early_space-tech-unification2"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}{let t="spyop";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:8,break:[2,3,4,5,6,7,8],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:`wiki_governor_task_${t}2`,3:`wiki_governor_task_${t}3`,4:`wiki_governor_task_${t}3`,5:`wiki_governor_task_${t}4`,6:`wiki_governor_task_${t}5`,7:"wiki_governor_task_unlock",8:"wiki_governor_task_disabled"},para_data:{2:[1,F("civics_spy_sabotage")],3:[2,F("civics_spy_influence")],4:[3,F("civics_spy_incite")],6:[F("civics_spy_sabotage"),F("civics_spy_incite"),F("civics_spy_influence")],7:[F("tech_espionage")],8:[F("tech_unification")]},data_link:{6:["wiki.html#civilized-tech-spy"],7:["wiki.html#early_space-tech-unification2"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}{let t="slave";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:2,break:[2],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:"wiki_governor_task_trait"},para_data:{2:[F("trait_slaver_name")]},data_link:{2:["wiki.html#traits-species-major_slaver"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}{let t="sacrifice";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:2,break:[2],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:"wiki_governor_task_trait"},para_data:{2:[F("trait_cannibalize_name")]},data_link:{2:["wiki.html#traits-species-major_cannibalize"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}{let t="horseshoe";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:2,break:[2],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:"wiki_governor_task_trait"},para_data:{1:[F(`city_${mn(!0)}`,[mn(!1)]),mn(!1)],2:[is(!1)]},data_link:{2:["wiki.html#traits-species-major_hooved"]}}),En("add","governor-gameplay",t,F(`city_${mn(!0)}`,[mn(!1)]))}{let t="trash";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:7,break:[3,5,7],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:`wiki_governor_task_${t}2`,3:`wiki_governor_task_${t}3`,4:`wiki_governor_task_${t}3min`,5:`wiki_governor_task_${t}3a`,6:`wiki_governor_task_${t}3max`,7:`wiki_governor_task_${t}4`},para_data:{7:[F("interstellar_mass_ejector")]},data_link:{7:["wiki.html#interstellar-structures-mass_ejector"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}{let t="mech";Tn(e,{name:t,template:"government",label:F(`gov_task_${t}`),paragraphs:4,break:[4],h_level:3,text:{1:`wiki_governor_task_${t}1`,2:`wiki_governor_task_${t}2`,3:`wiki_governor_task_${t}3`,4:`wiki_governor_task_${t}4`},para_data:{4:[1,F("wiki_resets_infusion"),F("portal_spire_name")]},data_link:{4:[!1,"wiki.html#resets-prestige-infusion","wiki.html#hell-structures-spire"]}}),En("add","governor-gameplay",t,F(`gov_task_${t}`))}}}(a);break;case"combat":!function(e){let t=En("create",e);Tn(t,{name:"basics",template:"combat",label:F("wiki_combat_basics"),paragraphs:4,h_level:2}),En("add","combat-gameplay","basics",F("wiki_combat_basics")),Tn(t,{name:"campaign",template:"combat",label:F("wiki_combat_campaign"),paragraphs:14,break:[5,11],h_level:2,para_data:{1:[5,F("civics_garrison_tactic_ambush"),F("civics_garrison_tactic_raid"),F("civics_garrison_tactic_pillage"),F("civics_garrison_tactic_assault"),F("civics_garrison_tactic_siege")],3:[F("civics_garrison_tactic_ambush")],4:[F("civics_garrison_tactic_siege"),20],11:["0%","50%"],12:[50],13:["50%","100%"],14:["50%"]}}),En("add","combat-gameplay","campaign",F("wiki_combat_campaign")),Tn(t,{name:"loot",template:"combat",label:F("wiki_combat_loot"),paragraphs:30,break:[3,5,10,13,16,19,22,26,27,28,29,30],h_level:2,para_data:{2:[3,F("civics_garrison_campaign"),F("civics_gov_eco_rate"),F("civics_garrison_battalion")],3:[F("civics_garrison_campaign")],4:[4,F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common"),F("wiki_combat_loot_rare")],5:[F("wiki_combat_loot_basic"),F("resource_Food_name"),F("resource_Lumber_name"),F("resource_Stone_name")],6:[F("wiki_combat_loot_common"),F("resource_Copper_name"),F("resource_Iron_name"),F("resource_Aluminium_name"),F("resource_Coal_name")],7:[F("wiki_combat_loot_rare"),F("resource_Cement_name"),F("resource_Steel_name")],8:[F("wiki_universe_magic"),F("wiki_combat_loot_rare"),F("resource_Crystal_name"),F("trait_terrifying_name"),F("resource_Titanium_name")],9:[F("wiki_combat_loot_money")],10:[F("civics_garrison_tactic_ambush"),3,F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common")],11:[F("trait_beast_of_burden_name"),F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common")],12:[5],13:[F("civics_garrison_tactic_raid"),4,F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common"),F("wiki_combat_loot_rare")],14:[F("trait_beast_of_burden_name"),F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common"),F("wiki_combat_loot_rare")],15:[10],16:[F("civics_garrison_tactic_pillage"),5,F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common"),F("wiki_combat_loot_rare")],17:[F("trait_beast_of_burden_name"),F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common"),F("wiki_combat_loot_rare")],18:[25],19:[F("civics_garrison_tactic_assault"),5,F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common"),F("wiki_combat_loot_rare")],20:[F("trait_beast_of_burden_name"),F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common"),F("wiki_combat_loot_rare")],21:[50],22:[F("civics_garrison_tactic_siege"),5,F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common"),F("wiki_combat_loot_rare")],23:[F("trait_beast_of_burden_name"),F("wiki_combat_loot_money"),F("wiki_combat_loot_basic"),F("wiki_combat_loot_common"),F("wiki_combat_loot_rare")],24:[F("civics_garrison_tactic_siege")],25:[999],28:["base loot * log(looters + 1)"],29:[F("civics_gov_eco_rate")],30:["floor(loot * economic rating / 100)"]},data_color:{5:["warning","caution","caution","caution"],6:["warning","caution","caution","caution","caution"],7:["warning","caution","caution"],8:["warning","warning","caution","warning","caution"],10:["warning","warning","caution","caution","caution"],11:["warning","caution","caution","caution"],13:["warning","warning","caution","caution","caution","caution"],14:["warning","caution","caution","caution","caution"],16:["warning","warning","caution","caution","caution","caution"],17:["warning","caution","caution","caution","caution"],19:["warning","warning","caution","caution","caution","caution"],20:["warning","caution","caution","caution","caution"],22:["warning","warning","caution","caution","caution","caution"],23:["warning","caution","caution","caution","caution"],28:["advanced"],30:["advanced"]}}),En("add","combat-gameplay","loot",F("wiki_combat_loot"))}(a);break;case"challenges":!function(e){let a=En("create",e);Tn(a,{name:"intro",template:"challenges",paragraphs:3,h_level:2,para_data:{2:[F("arpa_genepool_hardened_genes_title"),F("evo_bunker")],3:[F("evo_challenge_genes"),F("evo_challenge_run"),F("evo_scenario")]},data_link:{2:["wiki.html#crispr-prestige-hardened_genes"]}}),En("add","challenges-gameplay","intro",F("wiki_menu_intro"));{let e=Tn(a,{name:"genes_intro",template:"challenges",paragraphs:5,break:[4],h_level:2,para_data:{1:[F("evo_challenge_genes")],2:[F("mastery")],3:[F("mastery")],5:[F("evo_challenge_genes")]},data_link:{1:["wiki.html#mechanics-gameplay-challenge"],2:["wiki.html#mechanics-gameplay-mastery"],3:["wiki.html#mechanics-gameplay-mastery"]}});En("add","challenges-gameplay","genes_intro",F("wiki_challenges_genes_intro")),Tn(e,{name:"genes_plasmid",template:"challenges",paragraphs:4,break:[4],h_level:2,para_data:{1:[F("evo_challenge_plasmid"),F("wiki_challenges_gene"),F("resource_Plasmid_plural_name")],2:[F("city_temple"),F("resource_Plasmid_plural_name"),F("faith")],3:[F("resource_Plasmid_plural_name")],4:[F("wiki_challenges_gene"),F("universe_antimatter")]},data_link:{1:[!1,!1,"wiki.html#resources-prestige-plasmids"],2:["wiki.html#planetary-structures-temple"],4:[!1,"wiki.html#universes-gameplay-antimatter"]}}),Kn("add","challenges-gameplay","genes_plasmid",F("wiki_challenges_genes_plasmid")),Tn(e,{name:"genes_mastery",template:"challenges",paragraphs:2,break:[2],h_level:2,para_data:{1:[F("evo_challenge_mastery"),F("wiki_challenges_gene"),F("mastery"),"1/5","1/10"],2:[F("wiki_challenges_gene"),F("universe_antimatter")]},data_link:{1:[!1,!1,"wiki.html#mechanics-gameplay-mastery"],2:[!1,"wiki.html#universes-gameplay-antimatter"]}}),Kn("add","challenges-gameplay","genes_mastery",F("wiki_challenges_genes_mastery")),Tn(e,{name:"genes_trade",template:"challenges",paragraphs:2,h_level:2,para_data:{1:[F("evo_challenge_trade"),F("wiki_challenges_gene"),F("resource_market_buy"),F("resource_market_sell")],2:[F("resource_market_trade_routes")]}}),Kn("add","challenges-gameplay","genes_trade",F("wiki_challenges_genes_trade")),Tn(e,{name:"genes_craft",template:"challenges",paragraphs:2,h_level:2,para_data:{1:[F("evo_challenge_craft"),F("wiki_challenges_gene")],2:[F("job_craftsman")]}}),Kn("add","challenges-gameplay","genes_craft",F("wiki_challenges_genes_craft"));{let t=Tn(e,{name:"genes_crispr",template:"challenges",paragraphs:2,h_level:2,para_data:{1:[F("evo_challenge_crispr"),F("wiki_challenges_gene"),F("tab_arpa_crispr"),F("wiki_arpa_crispr_creep"),"1/5"]},data_link:{1:[!1,!1,!1,"wiki.html#crispr-prestige-genetic_memory"]}});t.find("div.para").append(`${F("wiki_challenges_genes_bad_para2")}`);let a=$(`\n
                                  \n ${F("wiki_challenges_genes_crispr_para3")}\n
                                  \n `);t.append(a);let r=!1;Ti.forEach((function(e){a.append(`${r?", ":""}${F("trait_"+e+"_name")}`),r=!0})),Kn("add","challenges-gameplay","genes_crispr",F("wiki_challenges_genes_crispr"))}Tn(e,{name:"genes_bad",template:"challenges",paragraphs:4,break:[3,4],h_level:2,para_data:{1:[1,2],4:[F("wiki_challenges_gene"),F("evo_challenge_truepath")]},data_link:{4:[!1,"wiki.html#challenges-gameplay-scenarios_truepath"]}}),Kn("add","challenges-gameplay","genes_bad",F("wiki_challenges_genes_bad"));{let a="antimatter"===t.race.universe?["20%","50%","50%","33%"]:["50%","20%","50%","33%"];Tn(e,{name:"genes_weak",template:"challenges",paragraphs:5,break:[2,3,4,5],h_level:2,para_data:{1:[a[0]],2:[a[1]],3:[a[2]],4:[a[3]],5:[F("wiki_challenges_gene"),F("evo_challenge_truepath")]},data_link:{5:[!1,"wiki.html#challenges-gameplay-scenarios_truepath"]}}),Kn("add","challenges-gameplay","genes_weak",F("wiki_challenges_genes_weak"))}}{let e=Tn(a,{name:"modes_intro",template:"challenges",paragraphs:2,h_level:2,para_data:{1:[F("evo_challenge_run"),F("evo_challenge_genes")],2:[F("wiki_challenges_mode")]}});En("add","challenges-gameplay","modes_intro",F("wiki_challenges_modes_intro")),gc(Tn(e,{name:"modes_joyless",template:"challenges",paragraphs:4,break:[3,4],h_level:2,para_data:{1:[F("evo_challenge_joyless"),F("wiki_challenges_mode"),F("tech_theatre")],2:[F("job_entertainer"),F("morale_broadcast"),di(),F("morale")],3:[F("wiki_challenges_mode"),Sr.space.spc_red.biodome.title(),F("tech_theatre")],4:[F("wiki_challenges_scenarios_cataclysm"),F("wiki_challenges_scenario")]},data_link:{1:[!1,!1,"wiki.html#civilized-tech-theatre"],2:[!1,!1,"wiki.html#planetary-structures-wardenclyffe"],3:[!1,"wiki.html#space-structures-biodome","wiki.html#civilized-tech-theatre"],4:["wiki.html#challenges-gameplay-scenarios_cataclysm"]}}),!1,["joyless"]),Kn("add","challenges-gameplay","modes_joyless",F("wiki_challenges_modes_joyless"));{let t=Tn(e,{name:"modes_steelen",template:"challenges",paragraphs:4,break:[4],h_level:2,para_data:{1:[F("evo_challenge_steelen"),F("wiki_challenges_mode"),F("resource_Steel_name")+" "+F("modal_smelting"),F("resource_Steel_name")],2:[F("resource_Steel_name")],3:[F("tech_steel"),F("tech_bessemer_process"),F("tech_oxygen_converter"),F("tech_electric_arc_furnace")],4:[F("wiki_challenges_mode"),F("wiki_resets_bioseed")]},data_link:{3:["wiki.html#civilized-tech-steel","wiki.html#discovery-tech-bessemer_process","wiki.html#industrialized-tech-oxygen_converter","wiki.html#globalized-tech-electric_arc_furnace"],4:[!1,"wiki.html#resets-prestige-bioseed"]}});gc(t,!1,["steelen"]),gc(t,!0,["steelem"]),Kn("add","challenges-gameplay","modes_steelen",F("wiki_challenges_modes_steelen"))}{let a=Tn(e,{name:"modes_decay",template:"challenges",paragraphs:6,break:[4,6],h_level:2,para_data:{1:[F("evo_challenge_decay"),F("wiki_challenges_mode")],2:[F("resource_Money_name"),F("wiki_calc_citizens"),F("resource_Knowledge_name"),F("resource_Zen_name"),F("resource_Crates_plural"),F("resource_Containers_plural")],3:[50],4:["0/s"],6:[F("wiki_challenges_mode"),F("wiki_resets_blackhole"),F("wiki_resets_vacuum")]},data_link:{6:[!1,"wiki.html#resets-prestige-blackhole","wiki.html#resets-prestige-vacuum"]}});gc(a,!1,["dissipated"]),vc(a,[{text:"wiki_challenges_reqs_reset",subreqs:[{text:F("wiki_resets_blackhole"),color:!!t.stats.achieve.whitehole,link:"wiki.html#resets-prestige-blackhole"}]}]),function(e){let t=$('
                                  ');e.append(t);let a=$("
                                  "),r=$("
                                  ");t.append(a),t.append(r);let i={resource:{val:void 0},amount:{val:void 0}},s={result:{vis:!1,val:void 0}};a.append(`\n
                                  \n

                                  ${F("wiki_calc_decay_rate")}

                                  \n
                                  \n
                                  \n {{ i.resource.val | base }} * 0.001 * ({{ i.amount.val, 'amount' | generic }} - 50) = {{ | calc }}\n
                                  \n `);let n=$("
                                  ");r.append(n);let c=`\n
                                  ${F("wiki_calc_decay_resource")} \n \n `;Object.keys(Fa).forEach((function(e){c+=`\n {{ '${e}' | resLabel }}\n `})),c+="
                                  ",n.append(c),n.append(`\n
                                  ${F("wiki_calc_decay_amount")}
                                  \n `),r.append(`\n
                                  \n \n
                                  \n `),zs({el:"#decayCalc",data:{i,s},methods:{val(e){i[e].val&&i[e].val<0&&(i[e].val=0)},pickRes(e){i.resource.val=e},resetInputs(){i.resource.val=void 0,i.amount.val=void 0}},filters:{generic:(e,t)=>void 0!==e?e:F("wiki_calc_decay_"+t),base:e=>e?Fa[e]:F("wiki_calc_decay_base"),resLabel:e=>F(e?`resource_${e}_name`:"wiki_calc_decay_resource"),calc(){if(s.result.vis=void 0!==i.resource.val&&void 0!==i.amount.val&&i.amount.val>=50,s.result.vis)return s.result.val=.001*Fa[i.resource.val]*(i.amount.val-50),s.result.val}}})}(Gn(a,"challenges","decay",F("evo_challenge_decay"))),Kn("add","challenges-gameplay","modes_decay",F("wiki_challenges_modes_decay"))}{let a=Tn(e,{name:"modes_emfield",template:"challenges",paragraphs:5,break:[5],h_level:2,para_data:{1:[F("evo_challenge_emfield"),F("wiki_challenges_mode"),"50%",F("evo_challenge_discharge"),"50%"],2:[F("evo_challenge_discharge"),"-50%"],3:[F("city_cement_plant"),F("evo_challenge_discharge"),"50%"],4:[F("space_belt_elerium_ship_title"),F("evo_challenge_discharge"),"-25%"],5:[F("wiki_challenges_mode"),F("wiki_resets_ascension")]},data_link:{3:["wiki.html#planetary-structures-cement_plant"],4:["wiki.html#space-structures-elerium_ship"],5:[!1,"wiki.html#resets-prestige-ascension"]}});gc(a,!1,["technophobe"]),vc(a,[{text:"wiki_challenges_reqs_reset",subreqs:[{text:F("wiki_resets_ascension"),color:!!t.stats.achieve.ascended,link:"wiki.html#resets-prestige-ascension"}]}]),Kn("add","challenges-gameplay","modes_emfield",F("wiki_challenges_modes_emfield"))}{let a=Tn(e,{name:"modes_inflation",template:"challenges",paragraphs:11,break:[4,9,10],h_level:2,para_data:{1:[F("evo_challenge_inflation"),F("wiki_challenges_mode"),F("resource_Money_name")],2:[1,10],3:[F("space_dwarf_collider_title"),F("interstellar_stellar_engine"),1],5:[F("resource_Money_name"),"+1.33%"],6:[F("modal_factory_lux"),"+0.08%",F("resource_Money_name")],7:[F("city_casino"),"+0.08%","+1%",F("resource_Money_name")],8:[F("wiki_mechanics_bank_vault"),"+0.8%",F("resource_Money_name")],9:[F("interstellar_exchange_title"),"2x",F("resource_Money_name"),F("evo_challenge_inflation")],10:[F("wiki_challenges_mode"),F("wiki_challenges_modes_inflation_para10_note1")],11:[F("evo_challenge_inflation")]},data_link:{3:["wiki.html#space-structures-world_collider","wiki.html#interstellar-structures-stellar_engine"],7:["wiki.html#planetary-structures-casino"],8:["wiki.html#mechanics-gameplay-bank_vault"],9:["wiki.html#interstellar-structures-exchange"]}});gc(a,!1,["wheelbarrow"]),vc(a,[{text:"wiki_challenges_reqs_achieve",subreqs:[{text:F("achieve_scrooge_name"),color:!!t.stats.achieve.scrooge}]}]),function(e){let a=$('
                                  ');e.append(a);let r=$("
                                  "),i=$("
                                  ");a.append(r),a.append(i);let s={inflation:{val:void 0}},n={result:{vis:!1,cost:void 0,luxury:void 0,casino_prod:void 0,casino_store:void 0,bank_vault:void 0}};r.append(`\n
                                  \n

                                  ${F("wiki_calc_inflation_cost")}

                                  \n
                                  \n
                                  \n {{ i.inflation.val, 'inflation' | generic }} / 75 = {{ 'cost' | calc }} = +{{ 'cost', true | calc }}%\n
                                  \n
                                  \n

                                  ${F("wiki_calc_inflation_luxury")}

                                  \n
                                  \n
                                  \n {{ i.inflation.val, 'inflation' | generic }} / 1250 = {{ 'luxury' | calc }} = +{{ 'luxury', true | calc }}%\n
                                  \n
                                  \n

                                  ${F("wiki_calc_inflation_casino_prod")}

                                  \n
                                  \n
                                  \n {{ i.inflation.val, 'inflation' | generic }} / 1250 = {{ 'casino_prod' | calc }} = +{{ 'casino_prod', true | calc }}%\n
                                  \n
                                  \n

                                  ${F("wiki_calc_inflation_casino_store")}

                                  \n
                                  \n
                                  \n {{ i.inflation.val, 'inflation' | generic }} / 100 = {{ 'casino_store' | calc }} = +{{ 'casino_store', true | calc }}%\n
                                  \n
                                  \n

                                  ${F("wiki_calc_inflation_bank_vault")}

                                  \n
                                  \n
                                  \n {{ i.inflation.val, 'inflation' | generic }} / 125 = {{ 'bank_vault' | calc }} = +{{ 'bank_vault', true | calc }}%\n
                                  \n `),i.append(`\n
                                  \n
                                  ${F("wiki_calc_inflation")}
                                  \n
                                  \n
                                  \n \n \n
                                  \n `),zs({el:"#inflationCalc",data:{i:s,s:n},methods:{val(e){s[e].val&&s[e].val<0&&(s[e].val=0)},resetInputs(){s.inflation.val=void 0},importInputs(){s.inflation.val=t.race.inflation||0}},filters:{generic:(e,t)=>void 0!==e?e:F("wiki_calc_"+t),calc:(e,t)=>t?(100*n.result[e]).toFixed(3):("cost"===e&&(n.result.vis=void 0!==s.inflation.val,n.result.vis&&(n.result.cost=(s.inflation.val/75).toFixed(5),n.result.luxury=(s.inflation.val/1250).toFixed(5),n.result.casino_prod=(s.inflation.val/1250).toFixed(5),n.result.casino_store=(s.inflation.val/100).toFixed(5),n.result.bank_vault=(s.inflation.val/125).toFixed(5))),n.result[e])}})}(Gn(a,"challenges","inflation",F("evo_challenge_inflation"))),Kn("add","challenges-gameplay","modes_inflation",F("wiki_challenges_modes_inflation"))}{let a=Tn(e,{name:"modes_sludge",template:"challenges",paragraphs:7,break:[3,4,5,6,7],h_level:2,para_data:{1:[F("evo_challenge_sludge"),F("wiki_challenges_challenge"),F("race_sludge")],3:[F("race_sludge"),"10x",F("trait_ooze_name")],4:[F("evo_challenge_sludge")],5:[F("race_sludge"),F("wiki_resets_mad")],6:[F("race_sludge"),F("wiki_resets_cataclysm")],7:[F("wiki_challenges_scenarios_junker")]},data_link:{1:[!1,!1,"wiki.html#races-species-sludge"],3:[!1,!1,"wiki.html#traits-species-major_ooze"],5:[!1,"wiki.html#resets-prestige-mad"]}});gc(a,!1,["extinct_sludge","gross"],{gross:!0}),gc(a,!0,["slime_lord"]),vc(a,[{text:"wiki_challenges_reqs_achieve",subreqs:[{text:F("achieve_extinct_junker_name"),color:!!t.stats.achieve.extinct_junker}]},{text:"wiki_challenges_reqs_reset",subreqs:[{text:F("wiki_resets_ascension"),color:!!t.stats.achieve.ascended,link:"wiki.html#resets-prestige-ascension"},{text:F("wiki_resets_infusion"),color:!!t.stats.achieve.corrupted,link:"wiki.html#resets-prestige-infusion"}]}]),Kn("add","challenges-gameplay","modes_sludge",F("wiki_challenges_modes_sludge"))}{let a=Tn(e,{name:"modes_orbitdecay",template:"challenges",paragraphs:14,break:[5,8,9,10,11,12,13,14],h_level:2,para_data:{1:[F("evo_challenge_orbit_decay")],2:[5e3],5:[F("evo_challenge_orbit_decay")],6:[F("tech_era_intergalactic")],11:[F("space_moon_base_title"),2500],12:[F("space_red_spaceport_title"),F("space_belt_station_title"),1e3],13:[F("interstellar_alpha_starport_title"),100],14:[F("wiki_challenges_scenarios_cataclysm")]}});gc(a,!1,["lamentis"]),vc(a,[{text:"wiki_challenges_reqs_reset",subreqs:[{text:F("wiki_resets_blackhole"),color:!!t.stats.achieve.whitehole,link:"wiki.html#resets-prestige-blackhole"},{text:F("wiki_resets_ascension"),color:!!t.stats.achieve.ascended,link:"wiki.html#resets-prestige-ascension"}]}]),Kn("add","challenges-gameplay","modes_orbitdecay",F("wiki_challenges_modes_orbitdecay"))}{let a=Tn(e,{name:"modes_witchhunter",template:"challenges",paragraphs:7,break:[4],h_level:2,para_data:{1:[F("evo_challenge_witch_hunter")],4:["300%","150%","75%"],7:[100]}});gc(a,!1,["soul_sponge","nightmare"]),vc(a,[{text:"wiki_challenges_reqs_reset",subreqs:[{text:`${F("wiki_universe_magic")} ${F("wiki_resets_ascension")}`,color:!(!t.stats.achieve.ascended||!t.stats.achieve.ascended.mg),link:"wiki.html#resets-prestige-ascension"}]}]),Kn("add","challenges-gameplay","modes_witchhunter",F("wiki_challenges_modes_witchhunter"))}}{let e=Tn(a,{name:"scenarios_intro",template:"challenges",paragraphs:3,h_level:2,para_data:{1:[F("evo_scenario")],2:[F("evo_challenge_genes"),F("evo_challenge_run")],3:[F("evo_challenge_genes"),F("evo_challenge_run"),F("wiki_challenges_scenario")]}});En("add","challenges-gameplay","scenarios_intro",F("wiki_challenges_scenarios_intro"));{let t=Tn(e,{name:"scenarios_junker",template:"challenges",paragraphs:4,break:[3,4],h_level:2,para_data:{1:[F("evo_challenge_junker"),F("wiki_challenges_scenario"),F("race_junker")],3:[F("wiki_challenges_scenario"),F("wiki_resets_mad")],4:[F("wiki_challenges_modes_sludge")]},data_link:{1:[!1,!1,"wiki.html#races-species-junker"],3:[!1,"wiki.html#resets-prestige-mad"]}});gc(t,!1,["extinct_junker"]),gc(t,!0,["organ_harvester","the_misery","garbage_pie"]),Kn("add","challenges-gameplay","scenarios_junker",F("wiki_challenges_scenarios_junker"))}{let a=Tn(e,{name:"scenarios_cataclysm",template:"challenges",paragraphs:9,break:[4,5,6,8,9],h_level:2,para_data:{1:[F("evo_challenge_cataclysm"),F("wiki_challenges_scenario"),F("wiki_resets_cataclysm")],2:[F("evo_challenge_cataclysm"),F("city_casino"),Dn("hell")],4:[F("evo_challenge_cataclysm")],5:[F("civics_foreign"),F("tech_unification")],7:[F("trait_parasite_name"),"20x"],8:[F("resource_Plasmid_plural_name"),F("resource_AntiPlasmid_plural_name"),300,F("wiki_challenges_scenario"),F("resource_Phage_name")],9:[F("wiki_challenges_scenario"),F("wiki_resets_bioseed")]},data_link:{1:[!1,!1,"wiki.html#resets-prestige-cataclysm"],2:[!1,"wiki.html#space-structures-spc_casino"],5:[!1,"wiki.html#early_space-tech-unification2"],7:["wiki.html#traits-species-major_parasite"],8:["wiki.html#resources-prestige-plasmids","wiki.html#resources-prestige-antiplasmids",!1,!1,"wiki.html#resources-prestige-phage"],9:[!1,"wiki.html#resets-prestige-bioseed"]}});gc(a,!1,["iron_will","failed_history"]),gc(a,!0,["finish_line"]),vc(a,[{text:"wiki_challenges_reqs_reset",subreqs:[{text:F("wiki_resets_cataclysm"),color:!!t.stats.achieve.shaken,link:"wiki.html#resets-prestige-cataclysm"}]}]),Kn("add","challenges-gameplay","scenarios_cataclysm",F("wiki_challenges_scenarios_cataclysm"))}{let a=Tn(e,{name:"scenarios_banana",template:"challenges",paragraphs:18,break:[2,4,5,8,9,10,18],h_level:2,para_data:{1:[F("evo_challenge_banana"),F("wiki_challenges_scenario"),F("resource_Money_name"),F("morale_tax")],2:[F("tech_unification"),F("evo_challenge_banana")],3:[F("tech_unification"),F("restore")],4:[F("morale_tax"),"95%",F("civics_tax_rates"),F("wiki_challenges_scenarios_banana_para4_note1")],5:[F("tab_market"),F("tech_sundial"),F("evo_challenge_banana"),1,F("resource_Food_name"),F("tech_trade")],6:[F("resource_market_trade_routes")],7:[F("resource_market_trade_routes"),10,25,F("tech_large_trades"),1e6,F("tech_massive_trades")],8:[F("civics_foreign"),"2x","50%"],9:[F("civics_garrison_soldiers"),"20%",F("tab_portal")],10:[F("galaxy_scout_ship"),7,10],11:[F("galaxy_corvette_ship"),21,30],12:[F("galaxy_frigate_ship"),56,80],13:[F("galaxy_cruiser_ship"),175,250],14:[F("galaxy_dreadnought"),1260,1800],15:[F("galaxy_armed_miner"),4,5],16:[F("galaxy_minelayer"),35,50],17:[F("galaxy_raider"),9,12],18:[F("wiki_challenges_scenario"),F("achieve_banana_name")]},data_link:{2:["wiki.html#early_space-tech-unification2"],3:["wiki.html#early_space-tech-unification2"],5:[!1,"wiki.html#primitive-tech-sundial",!1,!1,!1,"wiki.html#civilized-tech-trade"],7:[!1,!1,!1,"wiki.html#civilized-tech-large_trades",!1,"wiki.html#globalized-tech-massive_trades"],10:["wiki.html#intergalactic-structures-scout_ship"],11:["wiki.html#intergalactic-structures-corvette_ship"],12:["wiki.html#intergalactic-structures-frigate_ship"],13:["wiki.html#intergalactic-structures-cruiser_ship"],14:["wiki.html#intergalactic-structures-dreadnought"],15:["wiki.html#intergalactic-structures-armed_miner"],16:["wiki.html#intergalactic-structures-minelayer"],17:["wiki.html#intergalactic-structures-raider"],18:[!1,"wiki.html#perks-prestige-banana"]}});gc(a,!1,["banana"]),gc(a,!0,["banana"]),vc(a,[{text:"wiki_challenges_reqs_reset",subreqs:[{text:F("wiki_resets_blackhole"),color:!!t.stats.achieve.whitehole,link:"wiki.html#resets-prestige-blackhole"},{text:F("wiki_resets_ascension"),color:!!t.stats.achieve.ascended,link:"wiki.html#resets-prestige-ascension"}]}]),Kn("add","challenges-gameplay","scenarios_banana",F("wiki_challenges_scenarios_banana"))}{let a=Tn(e,{name:"scenarios_truepath",template:"challenges",paragraphs:5,break:[5],h_level:2,para_data:{1:[F("evo_challenge_truepath"),F("wiki_challenges_scenario")],2:[F("tech_era_deep_space")],3:[F("tech_era_interstellar"),F("tech_era_solar")]},data_link:{2:["wiki.html#deep_space-tech"],3:["wiki.html#interstellar-tech","wiki.html#solar-tp_tech"]}});Tn(a,{name:"scenarios_truepath_genes",template:"challenges",paragraphs:1,h_level:2,para_data:{1:[F("evo_challenge_plasmid"),F("evo_challenge_crispr"),F("evo_challenge_badgenes"),F("evo_challenge_nerfed")]},data_link:{1:["wiki.html#challenges-gameplay-genes_plasmid","wiki.html#challenges-gameplay-genes_crispr","wiki.html#challenges-gameplay-genes_bad","wiki.html#challenges-gameplay-genes_weak"]}}),Tn(a,{name:"scenarios_truepath_rival",template:"challenges",paragraphs:5,break:[2,3,5],h_level:2}),Tn(a,{name:"scenarios_truepath_syndicate",template:"challenges",paragraphs:2,h_level:2}),Tn(a,{name:"scenarios_truepath_costs",template:"challenges",paragraphs:4,break:[2,3,4],h_level:2,para_data:{2:["3x"],3:["2x"]}}),Tn(a,{name:"scenarios_truepath_market",template:"challenges",paragraphs:1,h_level:2,para_data:{1:["2x"]}}),Tn(a,{name:"scenarios_truepath_tax",template:"challenges",paragraphs:3,break:[2,4],h_level:2,para_data:{1:["50%"],2:[F("tech_merchandising"),F("city_temple")]}}),Tn(a,{name:"scenarios_truepath_money",template:"challenges",paragraphs:2,break:[2],h_level:2,para_data:{1:[F("city_bank"),"25%"],2:[F("city_casino"),"50%"]}}),Tn(a,{name:"scenarios_truepath_morale",template:"challenges",paragraphs:1,h_level:2,para_data:{1:["25%"]}}),Tn(a,{name:"scenarios_truepath_foreign",template:"challenges",paragraphs:1,h_level:2}),Tn(a,{name:"scenarios_truepath_fuel",template:"challenges",paragraphs:1,h_level:2,para_data:{1:["25%","150%"]}}),gc(a,!1,["pathfinder","overlord","ashanddust","exodus","obsolete","bluepill","retired"],{ashanddust:!0,exodus:!0,obsolete:!0,bluepill:!0,retired:!0}),vc(a,[{text:"wiki_challenges_reqs_reset",subreqs:[{text:F("wiki_resets_ascension"),color:!!t.stats.achieve.ascended,link:"wiki.html#resets-prestige-ascension"},{text:F("wiki_resets_infusion"),color:!!t.stats.achieve.corrupted,link:"wiki.html#resets-prestige-infusion"}]}]),Kn("add","challenges-gameplay","scenarios_truepath",F("wiki_challenges_scenarios_truepath"))}{let a=Tn(e,{name:"scenarios_lone_survivor",template:"challenges",paragraphs:4,break:[4],h_level:2,para_data:{1:[F("evo_challenge_lone_survivor"),F("wiki_challenges_scenario"),F("tab_tauceti")],3:[F("evo_challenge_truepath")],4:[F("wiki_challenges_scenario"),F("wiki_resets_eden")]},data_link:{4:[!1,"wiki.html#resets-prestige-eden"]}});gc(a,!1,["adam_eve"]),vc(a,[{text:"wiki_challenges_reqs_reset",subreqs:[{text:F("wiki_resets_retired"),color:!!t.stats.achieve.retired,link:"wiki.html#resets-prestige-retired"}]}]),Kn("add","challenges-gameplay","scenarios_lone_survivor",F("wiki_challenges_scenarios_lone_survivor"))}}}(a);break;case"resets":kc(a);break;case"planets":Nn(a);break;case"universes":!function(e){let t=En("create",e),a=[];Object.keys(Qt).forEach((function(e){a.push(e)}));let r=a.map((e=>`${F(`universe_${e}`)}`));Tn(t,{name:"intro",template:"universe",paragraphs:3,break:[2],h_level:2,para_data:{1:[a.length,r.slice(0,-1).join(", ")+`, ${F("or")} ${r[r.length-1]}`],2:[F("universe_standard")],3:[F("wiki_resets_blackhole")]},data_color:{1:["warning","plain"],2:["caution"]},data_link:{3:["wiki.html#resets-gameplay-blackhole"]}}),En("add","universes-gameplay","intro",F("wiki_menu_intro")),Tn(t,{name:"standard",template:"universe",paragraphs:3,break:[2],h_level:2,para_data:{1:[F("universe_standard")],2:[F("wiki_p_res_dark")],3:[F("wiki_p_res_dark"),+(100*(Ts("standard",!1,!0)-1)).toFixed(3)+"%"]},data_color:{1:["caution"]}}),En("add","universes-gameplay","standard",F("wiki_universe_standard"));let i=+(100*(1.25+.5*Ts("heavy",!1,!0)-1)).toFixed(3)+"%",s=+(100*(1.2+.3*Ts("heavy",!1,!0)-1)).toFixed(3)+"%";Tn(t,{name:"heavy",template:"universe",paragraphs:9,break:[5,8],h_level:2,para_data:{1:[Qt.heavy.desc],2:[F("resource_Oil_name"),F("resource_Helium_3_name"),F("resource_Deuterium_name")],3:[F("tab_space"),"75%"],4:[F("tab_interstellar"),F("tab_galactic"),"50%"],5:[F("wiki_universe_heavy")],6:["5%",F("resource_Plasmid_plural_name"),F("resource_Phage_name"),F("resource_Dark_name")],7:[F("resource_Harmony_name"),"20%"],8:[F("wiki_p_res_dark")],9:[F("wiki_p_res_dark"),i,s]},data_color:{1:["plain"]},data_link:{6:["plain","wiki.html#resources-prestige-plasmids","wiki.html#resources-prestige-phage","wiki.html#resources-prestige-dark"],7:["wiki.html#resources-prestige-harmony","plain"]}}),En("add","universes-gameplay","heavy",F("wiki_universe_heavy")),Tn(t,{name:"antimatter",template:"universe",paragraphs:9,break:[3,6,8],h_level:2,para_data:{1:[F("universe_antimatter")],2:[F("resource_AntiPlasmid_plural_name"),F("resource_Plasmid_plural_name")],3:[F("evo_challenge_plasmid"),F("evo_challenge_mastery")],4:["50%"],5:["50%","6%"],7:["10%"],8:[F("wiki_p_res_dark")],9:[F("wiki_p_res_dark"),+(100*(Ts("antimatter",!1,!0)-1)).toFixed(3)+"%"]},data_color:{1:["caution"]},data_link:{2:["wiki.html#resources-prestige-antiplasmids","wiki.html#resources-prestige-plasmids"]}}),En("add","universes-gameplay","antimatter",F("wiki_universe_antimatter")),Tn(t,{name:"evil",template:"universe",paragraphs:7,break:[2,5],h_level:2,para_data:{2:[F("trait_evil_name")],3:[F("trait_evil_name")],4:[F("biome_hellscape_name"),F("biome_eden_name")],5:[F("wiki_p_res_dark")],7:[F("wiki_p_res_dark"),+(100*(Ts("evil",!1,!0)-1)).toFixed(3)+"%"]}}),En("add","universes-gameplay","evil",F("wiki_universe_evil")),Tn(t,{name:"micro",template:"universe",paragraphs:6,break:[2,4],h_level:2,para_data:{1:["75%"],4:[F("wiki_p_res_dark")],5:[F("wiki_p_res_dark"),Ts("micro",!1,!0),Ts("micro",!0,!0)],6:["1.005"]}}),En("add","universes-gameplay","micro",F("wiki_universe_micro")),Tn(t,{name:"magic",template:"universe",paragraphs:8,break:[4,7],h_level:2,para_data:{6:[80],7:[F("wiki_p_res_dark")],8:[F("wiki_p_res_dark"),+(100*(Ts("magic",!1,!0)-1)).toFixed(3)+"%"]}}),En("add","universes-gameplay","magic",F("wiki_universe_magic"))}(a);break;case"hell":!function(e){let t=En("create",e);t.append(`

                                  ${F("wiki_hell")}

                                  `),Tn(t,{name:"threat",template:"hell",paragraphs:3,para_data:{1:["10,000"],2:["1000-1250"]},data_color:{1:["caution"],2:["warning"]}}),En("add","hell-gameplay","threat",F("wiki_hell_threat")),Tn(t,{name:"siege",template:"hell",paragraphs:5,para_data:{3:["5k+"]},data_color:{3:["caution"]}}),En("add","hell-gameplay","siege",F("wiki_hell_siege")),Tn(t,{name:"strategy",template:"hell",paragraphs:3}),En("add","hell-gameplay","strategy",F("wiki_hell_strategy"));let a=Tn(t,{name:"soul_gem",template:"hell",paragraphs:4,para_data:{1:[F("wiki_hell_soul_gem"),F("tab_portal")],3:[F("tech_demon_attractor")]}}),r=$("
                                  ");a.append(r),En("add","hell-gameplay","soul_gem",F("wiki_hell_soul_gem")),Tn(t,{name:"infernite",template:"hell",paragraphs:4}),En("add","hell-gameplay","infernite",F("wiki_hell_infernite")),t.append(`

                                  ${F("wiki_hell_deep")}

                                  `),Tn(t,{name:"pit",template:"hell",paragraphs:3,para_data:{1:["1,000,000",F("galaxy_telemetry_beacon")],2:[F("portal_soul_forge_title")]},data_link:{1:[!1,"wiki.html#intergalactic-structures-telemetry_beacon"],2:["wiki.html#hell-structures-soul_forge"]}}),En("add","hell-gameplay","pit",F("wiki_hell_pit")),Tn(t,{name:"corrupted",template:"hell",paragraphs:3,para_data:{1:[F("tech_metaphysics"),F("portal_soul_forge_title"),F("resource_Corrupt_Gem_name")],2:[F("portal_ruins_name")],3:[F("tech_era_intergalactic")]},data_link:{1:["wiki.html#intergalactic-tech-metaphysics"]}}),En("add","hell-gameplay","corrupted",F("wiki_hell_corrupted"));let i=Ds();Tn(t,{name:"pillar",template:"hell",paragraphs:6,break:[4,5,6],para_data:{1:[F("portal_ruins_name")],2:["1%",F("harmonic")],3:["3%"],4:[F("harmonic"),"2%","6%"],5:[F("wiki_hell_pillar_para5d1"),12],6:[F("harmonic"),`${(100*(i[0]-1)).toFixed(0)}%`,`${(100*(i[1]-1)).toFixed(0)}%`]},data_link:{5:["wiki.html#hell-structures-west_tower"]}}),En("add","hell-gameplay","pillar",F("wiki_hell_pillar")),t.append(`

                                  ${F("portal_spire_name")}

                                  `),Tn(t,{name:"spire",template:"hell",paragraphs:5,break:[4],para_data:{4:[F("resource_Blood_Stone_name")],5:[F("wiki_resets_infusion")]},data_link:{5:["wiki.html#resets-prestige-infusion"]}}),En("add","hell-gameplay","spire",F("portal_spire_name"));{let e=Tn(t,{name:"mech",template:"hell",paragraphs:2,para_data:{2:[5,F("portal_mech_size_small"),F("portal_mech_size_medium"),F("portal_mech_size_large"),F("portal_mech_size_titan"),F("portal_mech_size_collector")]}}),a=ya("small");Tn(e,{name:"scout",template:"hell",paragraphs:10,break:[3,4,5,6,10],h_level:4,header:!0,para_data:{1:[F("portal_mech_size_small")],2:[1,1,F("arpa_blood_prepared_title")],3:[(100*Pa("small")).toFixed(2)],4:[wa("small"),a.c,a.s],5:[F("portal_mech_equip_jumpjet")],7:["1%"],8:[F("portal_spire_status_fog"),F("portal_spire_status_dark")],9:["100%"],10:["8%"]},data_link:{2:[!1,!1,"wiki.html#blood-prestige-prepared"]}});let r=ya("medium");Tn(e,{name:"standard",template:"hell",paragraphs:6,break:[3,4,5,6],h_level:4,header:!0,para_data:{1:[F("portal_mech_size_medium")],2:[1,1,2,F("arpa_blood_prepared_title")],3:[(100*Pa("medium")).toFixed(2)],4:[wa("medium"),r.c,r.s],5:[F("portal_mech_equip_jumpjet")],6:["5%"]},data_link:{2:[!1,!1,!1,"wiki.html#blood-prestige-prepared"]}});let i=ya("large");Tn(e,{name:"heavy",template:"hell",paragraphs:6,break:[3,4,5,6],h_level:4,header:!0,para_data:{1:[F("portal_mech_size_large")],2:[2,2,3,F("arpa_blood_prepared_title")],3:[(100*Pa("large")).toFixed(2)],4:[wa("large"),i.c,i.s],5:[F("portal_mech_equip_battery")]},data_link:{2:[!1,!1,!1,"wiki.html#blood-prestige-prepared"]}});let s=ya("titan");Tn(e,{name:"titan",template:"hell",paragraphs:7,break:[3,4,5,6,7],h_level:4,header:!0,para_data:{1:[F("portal_mech_size_titan")],2:[4,4,5,F("arpa_blood_prepared_title")],3:[(100*Pa("titan")).toFixed(2)],4:[wa("titan"),s.c,s.s],5:[F("portal_mech_equip_target")],7:["25%"]},data_link:{2:[!1,!1,!1,"wiki.html#blood-prestige-prepared"]}});let n=ya("collector");Tn(e,{name:"collector",template:"hell",paragraphs:5,break:[3,4,5],h_level:4,header:!0,para_data:{1:[F("portal_mech_size_collector")],2:[2,3,F("arpa_blood_prepared_title")],3:[wa("collector"),n.c,n.s],4:[F("portal_mech_equip_jumpjet")]},data_link:{2:[!1,!1,"wiki.html#blood-prestige-prepared"]}}),En("add","hell-gameplay","mech",F("wiki_hell_mech"))}{let e=["wheel","tread","biped","quad","spider","hover"],a=["sand","swamp","forest","jungle","rocky","gravel","muddy","grass","brush","concrete"],r=[];r.push(e.length),e.forEach((function(e){r.push(F(`portal_mech_chassis_${e}`))}));let i=Tn(t,{name:"chassis",template:"hell",paragraphs:4,para_data:{1:r,2:[a.length]}});a.forEach((function(t){let a={};for(let r=1;r<=e.length;r++){let i=+(100*qa({chassis:e[r-1],size:"small"},t)).toFixed(1),s=+(100*qa({chassis:e[r-1],size:"large"},t)).toFixed(1);a[r+1]=`${F("wiki_hell_effectiveness",[`${F(`portal_mech_chassis_${e[r-1]}`)}`,`${i}%`,`${s}%`,'S','L'])}`}Tn(i,{name:`t_${t}`,template:"hell",label:F(`portal_spire_type_${t}`),paragraphs:7,break:[2,3,4,5,6,7],h_level:4,header:!0,text:{1:`portal_spire_type_${t}_desc`},rawtext:a,pclass:"col2 sk1"})})),En("add","hell-gameplay","chassis",F("wiki_hell_chassis"))}{let e=["laser","flame","plasma","kinetic","missile","sonic","shotgun","tesla"],a=Tn(t,{name:"monsters",template:"hell",paragraphs:4,para_data:{2:[e.length]}});Object.keys(fa).forEach((function(t){let r={};for(let a=1;a<=e.length;a++){let i=+(100*(fa[t].weapon.hasOwnProperty(e[a-1])?fa[t].weapon[e[a-1]]:1)).toFixed(0);r[a]=`${F("wiki_hell_weapon_effect",[`${F(`portal_mech_weapon_${e[a-1]}`)}`,`${i}%`])}`}Tn(a,{name:`boss_${t}`,template:"hell",label:F(`portal_mech_boss_${t}`),paragraphs:8,break:[2,3,4,5,6,7,8],h_level:4,header:!0,rawtext:r,pclass:"col2"})})),En("add","hell-gameplay","monsters",F("wiki_hell_monsters"))}{let e=Tn(t,{name:"hazard",template:"hell",paragraphs:8,break:[3,4,5,6,7],para_data:{3:["+1","10+"],4:[`6/(105-${F("wiki_hell_hazard_para3_note")})`,"+1","25-100"],5:[`11/(260-${F("wiki_hell_hazard_para3_note")})`,"+1","101-250"],6:[`26/(1025-${F("wiki_hell_hazard_para3_note")})`,"+1","251-1000"],7:["-1"],8:[F("portal_spire_status_freeze"),F("portal_spire_status_hot"),F("portal_spire_status_rain"),F("portal_spire_status_hail")]}}),a={1:"wiki_hell_hazard_effect",2:"wiki_hell_hazard_counter"};Tn(e,{name:"h_freeze",template:"hell",label:F("portal_spire_status_freeze"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["75%"],2:[F("portal_mech_equip_radiator")]}}),Tn(e,{name:"h_hot",template:"hell",label:F("portal_spire_status_hot"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["75%"],2:[F("portal_mech_equip_coolant")]}}),Tn(e,{name:"h_corrosive",template:"hell",label:F("portal_spire_status_corrosive"),paragraphs:3,break:[2,3],h_level:4,header:!0,text:{1:"wiki_hell_hazard_effect",2:"wiki_hell_hazard_counter",3:"wiki_hell_hazard_partial"},para_data:{1:["75%"],2:[F("portal_mech_equip_ablative")],3:[F("portal_mech_equip_shields")]}}),Tn(e,{name:"h_humid",template:"hell",label:F("portal_spire_status_humid"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["25%"],2:[F("portal_mech_equip_seals")]}}),Tn(e,{name:"h_windy",template:"hell",label:F("portal_spire_status_windy"),paragraphs:1,h_level:4,header:!0,text:{1:"wiki_hell_hazard_chassis"},para_data:{1:["50%",F("portal_mech_chassis_hover")]}}),Tn(e,{name:"h_hilly",template:"hell",label:F("portal_spire_status_hilly"),paragraphs:1,h_level:4,header:!0,text:{1:"wiki_hell_hazard_not_chassis"},para_data:{1:["25%",F("portal_mech_chassis_spider")]}}),Tn(e,{name:"h_mountain",template:"hell",label:F("portal_spire_status_mountain"),paragraphs:2,break:[2],h_level:4,header:!0,text:{1:"wiki_hell_hazard_either",2:"wiki_hell_hazard_partial"},para_data:{1:["50%",F("portal_mech_chassis_spider"),F("portal_mech_equip_grapple")],2:[F("portal_mech_equip_flare")]}}),Tn(e,{name:"h_radioactive",template:"hell",label:F("portal_spire_status_radioactive"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["50%"],2:[F("portal_mech_equip_shields")]}}),Tn(e,{name:"h_quake",template:"hell",label:F("portal_spire_status_quake"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["75%"],2:[F("portal_mech_equip_stabilizer")]}}),Tn(e,{name:"h_dust",template:"hell",label:F("portal_spire_status_dust"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["50%"],2:[F("portal_mech_equip_seals")]}}),Tn(e,{name:"h_river",template:"hell",label:F("portal_spire_status_river"),paragraphs:1,h_level:4,header:!0,text:{1:"wiki_hell_hazard_not_chassis"},para_data:{1:["35%",F("portal_mech_chassis_hover")]}}),Tn(e,{name:"h_tar",template:"hell",label:F("portal_spire_status_tar"),paragraphs:2,break:[2],h_level:4,header:!0,text:{1:"wiki_hell_hazard_not_chassis",2:"wiki_hell_hazard_worse"},para_data:{1:["25%",F("portal_mech_chassis_quad")],2:["50%",F("portal_mech_chassis_tread"),F("portal_mech_chassis_wheel")]}}),Tn(e,{name:"h_steam",template:"hell",label:F("portal_spire_status_steam"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["25%"],2:[F("portal_mech_equip_shields")]}}),Tn(e,{name:"h_flooded",template:"hell",label:F("portal_spire_status_flooded"),paragraphs:1,h_level:4,header:!0,text:{1:"wiki_hell_hazard_not_chassis"},para_data:{1:["65%",F("portal_mech_chassis_hover")]}}),Tn(e,{name:"h_fog",template:"hell",label:F("portal_spire_status_fog"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["80%"],2:[F("portal_mech_equip_sonar")]}}),Tn(e,{name:"h_rain",template:"hell",label:F("portal_spire_status_rain"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["25%"],2:[F("portal_mech_equip_seals")]}}),Tn(e,{name:"h_hail",template:"hell",label:F("portal_spire_status_hail"),paragraphs:1,h_level:4,header:!0,text:{1:"wiki_hell_hazard_either2"},para_data:{1:["25%",F("portal_mech_equip_ablative"),F("portal_mech_equip_shields")]}}),Tn(e,{name:"h_chasm",template:"hell",label:F("portal_spire_status_chasm"),paragraphs:2,break:[2],h_level:4,header:!0,text:a,para_data:{1:["90%"],2:[F("portal_mech_equip_grapple")]}}),Tn(e,{name:"h_dark",template:"hell",label:F("portal_spire_status_dark"),paragraphs:3,break:[2,3],h_level:4,header:!0,text:{1:"wiki_hell_hazard_effect",2:"wiki_hell_hazard_counter",3:"wiki_hell_hazard_partial"},para_data:{1:["90%"],2:[F("portal_mech_equip_infrared")],3:[F("portal_mech_equip_flare")]}}),Tn(e,{name:"h_gravity",template:"hell",label:F("portal_spire_status_gravity"),paragraphs:3,break:[2,3],h_level:4,header:!0,text:{1:"wiki_hell_hazard_gravity",2:"wiki_hell_hazard_gravity",3:"wiki_hell_hazard_gravity"},para_data:{1:[F("portal_mech_size_medium"),"20%"],2:[F("portal_mech_size_large"),"55%"],3:[F("portal_mech_size_titan"),"75%"]}}),En("add","hell-gameplay","hazard",F("wiki_hell_hazard"))}{let e=Tn(t,{name:"equipment",template:"hell",paragraphs:1,h_level:2,para_data:{1:[F("portal_mech_equip_jumpjet"),F("portal_mech_equip_battery"),F("portal_mech_equip_target")]}});En("add","hell-gameplay","equipment",F("wiki_hell_equipment")),Tn(e,{name:"eq_jump",template:"hell",label:F("portal_mech_equip_jumpjet"),paragraphs:4,break:[4],h_level:3,header:!0,para_data:{1:[F("portal_mech_equip_jumpjet"),F("wiki_hell_scout"),F("wiki_hell_standard"),F("wiki_hell_collector")],2:["20%"],3:["10%",F("portal_spire_status_gravity")]}}),Tn(e,{name:"eq_battery",template:"hell",label:F("portal_mech_equip_battery"),paragraphs:2,h_level:3,header:!0,para_data:{1:[F("portal_mech_equip_battery"),F("wiki_hell_heavy")],2:["2%"]}}),Tn(e,{name:"eq_target",template:"hell",label:F("portal_mech_equip_target"),paragraphs:3,h_level:3,header:!0,para_data:{1:[F("portal_mech_equip_target"),F("wiki_hell_titan")],2:["25%"]}})}}(a)}}function xc(e){e.append(`
                                  ${F("wiki_arpa_crispr")}
                                  `);let a=$("
                                  "),r=En("create",a);e.append(a),Object.keys(Oe).forEach((function(e){let a=Oe[e].id.split("-"),i=$(`
                                  `);r.append(i),function(e,a){let r=!!(t.genes[Oe[a].grant[0]]&&t.genes[Oe[a].grant[0]]>=Oe[a].grant[1]);e.append(`

                                  ${Oe[a].title}

                                  ${r?`${F("wiki_arpa_purchased")}`:""}${F(`wiki_arpa_crispr_${Oe[a].grant[0]}`)}: ${Oe[a].grant[1]}
                                  `);let i=$('
                                  ');e.append(i),i.append(`
                                  ${Oe[a].desc}
                                  `);let s=$('
                                  ');if(i.append(s),Object.keys(Oe[a].cost).forEach((function(e){let r=Oe[a].cost[e]();if(r>0){"Plasmid"===e&&"antimatter"===t.race.universe&&(e="AntiPlasmid");let a=F(`resource_${e}_name`);s.append(`
                                  ${a}: ${r}
                                  `)}})),Object.keys(Oe[a].reqs).length>0){let r=$(`
                                  ${F("wiki_arpa_crispr_req")}
                                  `);e.append(r);let i=!1;Object.keys(Oe[a].reqs).forEach((function(e){let s=t.genes[e]&&t.genes[e]>=Oe[a].reqs[e]?"success":"danger";r.append(`${i?", ":""}${F(`wiki_arpa_crispr_${e}`)} ${Oe[a].reqs[e]}`),i=!0}))}if(qc.hasOwnProperty(a)){let t=!1,r=$(`
                                  ${F("wiki_arpa_crispr_req_extra")}
                                  `);e.append(r),Object.keys(qc[a]).forEach((function(e){let i=qc[a][e].color?"success":"danger",s=qc[a][e].link?`${qc[a][e].title}`:qc[a][e].title;r.append(`${t?", ":""}${s}`),t=!0}))}}(i,e),En("add","crispr-prestige",a[1],Oe[e].title)}))}const qc={universal:[{title:F("wiki_tech_special_universe_not",[F("universe_standard")]),color:"standard"!==t.race.universe,link:"wiki.html#universes-gameplay-standard"}],standard:[{title:F("wiki_tech_special_universe_not",[F("universe_standard")]),color:"standard"!==t.race.universe,link:"wiki.html#universes-gameplay-standard"}],ancients:[{title:F("wiki_arpa_crispr_special_ancients"),color:!!t.genes.old_gods,link:"wiki.html#resets-prestige-intro"}],bleeding_effect:[{title:F("wiki_tech_special_universe",[F("universe_antimatter")]),color:"antimatter"===t.race.universe,link:"wiki.html#universes-gameplay-antimatter"}],blood_remembrance:[{title:F("wiki_arpa_crispr_special_blood_remembrance"),color:t.prestige.Blood_Stone.count>=1,link:"wiki.html#resources-prestige-blood"}]};var Pc={};function jc(e){e.append(`
                                  ${F("wiki_arpa_blood")}
                                  `);let a=$("
                                  "),r=En("create",a);e.append(a),Object.keys(Me).forEach((function(e){let a=Me[e].id.split("-"),i=$(`
                                  `);r.append(i),function(e,a){let r=!!(t.blood[Me[a].grant[0]]&&t.blood[Me[a].grant[0]]>=Me[a].grant[1]);e.append(`

                                  ${Me[a].title}

                                  ${r?`${F("wiki_arpa_purchased")}`:""}${F(`wiki_arpa_blood_${Me[a].grant[0]}`)}: ${Me[a].grant[1]}
                                  `);let i=$('
                                  ');e.append(i),i.append(`
                                  ${Me[a].desc}
                                  `);let s=$('
                                  ');if(i.append(s),Object.keys(Me[a].cost).forEach((function(e){let t=F(`resource_${e}_name`);if("*"===Me[a].grant[1])s.append(`
                                  ${t}: {{ r.${e}.cost }}
                                  `);else{let r=Me[a].cost[e]();r>0&&s.append(`
                                  ${t}: ${r}
                                  `)}})),Object.keys(Me[a].reqs).length>0||Me[a].hasOwnProperty("condition")){let r=$(`
                                  ${F("wiki_arpa_crispr_req")}
                                  `);e.append(r);let i=!1;if(Object.keys(Me[a].reqs).length>0&&Object.keys(Me[a].reqs).forEach((function(e){let s=t.blood[e]&&t.blood[e]>=Me[a].reqs[e]?"success":"danger";r.append(`${i?", ":""}${F(`wiki_arpa_blood_${e}`)} ${Me[a].reqs[e]}`),i=!0})),Me[a].hasOwnProperty("condition")){let e=t.genes.blood&&t.genes.blood>=3?"success":"danger";r.append(`${i?", ":""}${F("wiki_arpa_crispr_blood")} 3`)}}"*"===Me[a].grant[1]&&function(e,a){let r={owned:0},i={},s=Me[a];r.real_owned=t.blood[a]?t.blood[a]:0;let n=s.cost;Object.keys(n).forEach((function(e){i[e]={}}));let c=function(){Object.keys(i).forEach((function(e){let t=n[e]?n[e](r.owned-r.real_owned):0;i[e].vis=t>0,i[e].cost=t}))};c(),e.append($(`\n
                                  \n
                                  \n
                                  ${F("wiki_calc_level")} -+
                                  \n
                                  \n
                                  \n \n
                                  \n
                                  \n `)),zs({el:`#${a}`,data:{i:r,r:i},methods:{val(e){r[e]=Math.round(r[e]),r[e]&&r[e]<0&&(r[e]=0),c()},less(e){r[e]>0&&r[e]--},more(e){r[e]++},importInputs(){r.owned=r.real_owned}}})}(e,a)}(i,e),En("add","blood-prestige",a[1],Me[e].title)}))}Object.keys(Oe).forEach((function(e){let t=Oe[e];Pc[t.grant[0]]||(Pc[t.grant[0]]={}),"string"==typeof Oe[e].title?Oe[e].title:Oe[e].title(),Pc[t.grant[0]][t.grant[1]]={name:e}}));var Oc={};Object.keys(Me).forEach((function(e){let t=Me[e];Oc[t.grant[0]]||(Oc[t.grant[0]]={}),"string"==typeof Me[e].title?Me[e].title:Me[e].title(),Oc[t.grant[0]][t.grant[1]]={name:e}}));const Mc={launch_facility:[F("wiki_arpa_project_launch_facility")],monument:[function(){let e=[F("arpa_project_monument_obelisk"),F("arpa_project_monument_statue"),F("arpa_project_monument_sculpture"),F("arpa_project_monument_monolith"),F("arpa_project_monument_pillar"),F("arpa_project_monument_megalith")],t=[F("resource_Stone_name"),F("resource_Aluminium_name"),F("resource_Steel_name"),F("resource_Cement_name"),F("resource_Bones_name"),F("resource_Crystal_name")],a=`
                                  ${F("wiki_arpa_project_monument",[e.length,e.join(", ")])}
                                  `;for(let r=0;r${F("wiki_arpa_project_monument_type",[`${e[r]}`,`${t[r]}`])}
                                  `;return a}(),F("wiki_arpa_project_monument_random"),F("wiki_arpa_project_monument_exceptions")],railway:[F("wiki_arpa_project_railway_homeless",[3,7,11,17,25,38,59,100,225])],roid_eject:[F("wiki_arpa_project_roid_eject")],tp_depot:[F("wiki_arpa_project_depot")],nexus:[F("wiki_arpa_project_magic")],syphon:[F("wiki_arpa_project_magic")]};const Sc=[{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 Cc(a,r,i){$("#content").removeClass("flex");var s,n=e.getItem("evolved")||!1;switch(n&&(s=JSON.parse(LZString.decompressFromUTF16(n)),t=s),$s("page_view",{page_title:`Evolve Wiki - ${a}`}),a){case"intro":Ac(),window.location.hash=`#${a}`;break;case"faq":!function(){let e=$("#content");Cs(e);let a=["update","hotkeys","sethotkeys","offline","moonphase","orbital","lumber","farm","steel","aluminium","titanium","titanium_balorg","polymer","mythril","neutronium","adamantite","infernite","graphene","stanene","aerogel","crates","soft_reset","hard_reset","combat","morale","stress","genetic_decay","cache","aphrodisiac","religion","tax_riots","race","weather","sundial","plasmid","plasmid_keep","plasmid_earn","crispr","creep","phage","phage_earn","phage_benefit","anti_plasmids","temple","temple_break","demonic","celestial","mastery","challenges","perks","feats","support","micro","valdi","quantum","quantum_level","exotic","soul_gem","soul_gem_spend","hell_patrol","surveyors","defense","infusion","dark_energy"],r={neutronium:[Di[t.race.species].solar.gas_moon]};for(let t=0;t
                                  ');e.append(i);let s=[];r.hasOwnProperty(a[t])&&(s=r[a[t]]),i.append(`

                                  ${F(`wiki_faq_q_${a[t]}`)}

                                  `),i.append(`
                                  ${F(`wiki_faq_a_${a[t]}`,s)}
                                  `)}}(),window.location.hash=`#${a}`;break;case"gameplay":$c(r),zc(a,r,i);break;case"prestige":!function(e){let a=$("#content");switch(Cs(a),e){case"resets":kc(a);break;case"resources":!function(e){let a=En("create",e),r=Tn(a,{name:"plasmids",template:"p_res",paragraphs:2,h_level:2,para_data:{1:[250]},data_color:{1:["warning"]}}),i=Gn(r,"plasmid","gain");yc(i,"plasmid"),i=Gn(r,"plasmid","bonus"),bc(i,"plasmid"),wc(i,"plasmid"),En("add","resources-prestige","plasmids",F("wiki_p_res_plasmids")),r=Tn(a,{name:"antiplasmids",template:"p_res",paragraphs:5,h_level:2,para_data:{4:[F("arpa_genepool_bleeding_effect_title")]},data_link:{4:["wiki.html#crispr-prestige-bleeding_effect"]}}),i=Gn(r,"anti","gain"),yc(i,"plasmid","anti"),i=Gn(r,"anti","bonus"),bc(i,"anti"),wc(i,"anti"),En("add","resources-prestige","antiplasmids",F("wiki_p_res_antiplasmids")),r=Tn(a,{name:"phage",template:"p_res",paragraphs:4,h_level:2}),i=Gn(r,"phage","gain"),yc(i,"phage"),i=Gn(r,"phage","bonus"),wc(i,"phage"),En("add","resources-prestige","phage",F("wiki_p_res_phage"));let s=Tn(a,{name:"dark",template:"p_res",paragraphs:1,h_level:2}),n=$("
                                  "),c=$('
                                    ');s.append(n),n.append(c),c.append(`
                                  • ${F("wiki_p_res_dark_standard")}
                                  • `),c.append(`
                                  • ${F("wiki_p_res_dark_evil")}
                                  • `),c.append(`
                                  • ${F("wiki_p_res_dark_heavy")}
                                  • `),c.append(`
                                  • ${F("wiki_p_res_dark_antimatter")}
                                  • `),c.append(`
                                  • ${F("wiki_p_res_dark_micro")}
                                  • `),c.append(`
                                  • ${F("wiki_p_res_dark_magic")}
                                  • `),i=Gn(s,"dark","gain"),yc(i,"dark",!1,"bigbang"),yc(i,"dark","vacuum","vacuum"),i=Gn(s,"dark","bonus"),function(e){let a=$('
                                    ');e.append(a),a.append(`

                                    ${F("wiki_calc_bonuses",[F("resource_Dark_name")])}

                                    `);let r=$("
                                    "),i=$("
                                    "),s=$("
                                    ");a.append(r),a.append(i),a.append(s);let n={dark:{val:void 0},harmony:{val:void 0},sludge:{val:void 0},uni:{val:"standard"}},c={standard:{vis:!0,result:!1,val:0},evil:{vis:!1,result:!1,val:0},antimatter:{vis:!1,result:!1,val:0},micro:{vis:!1,result:!1,val1:0,val2:0},heavy:{vis:!1,result:!1,val1:0,val2:0},magic:{vis:!1,result:!1,val:0}};r.append(`\n
                                    ${F("wiki_calc_universe")} \n \n {{ 'standard' | uniLabel }}\n {{ 'evil' | uniLabel }}\n {{ 'antimatter' | uniLabel }}\n {{ 'micro' | uniLabel }}\n {{ 'heavy' | uniLabel }}\n {{ 'magic' | uniLabel }}\n
                                    \n `),i.append(`\n
                                    \n
                                    \n ${F("wiki_calc_bonuses",[F("wiki_calc_dark_standard")])}:\n
                                    \n
                                    \n ({{ i.dark.val, 'dark' | generic }} * (1 + ({{ i.harmony.val, 'harmony' | generic }} * 0.001)) * (1 + ({{ i.sludge.val | sludgeLabel }} * 0.03))) / 200 = {{ 'standard', false | calc }} = +{{ 'standard', true | calc }}%\n
                                    \n
                                    \n
                                    \n
                                    \n ${F("wiki_calc_bonuses",[F("wiki_calc_dark_evil")])}:\n
                                    \n
                                    \n (log2(10 + ({{ i.dark.val, 'dark' | generic }} * (1 + ({{ i.harmony.val, 'harmony' | generic }} * 0.01)) * (1 + ({{ i.sludge.val | sludgeLabel }} * 0.03)))) - 3.321928094887362) / 5 = {{ 'evil', false | calc }} = +{{ 'evil', true | calc }}%\n
                                    \n
                                    \n
                                    \n
                                    \n ${F("wiki_calc_bonuses",[F("wiki_calc_dark_antimatter")])}:\n
                                    \n
                                    \n (ln(50 + ({{ i.dark.val, 'dark' | generic }} * (1 + ({{ i.harmony.val, 'harmony' | generic }} * 0.01)) * (1 + ({{ i.sludge.val | sludgeLabel }} * 0.03)))) - 3.912023005428146) / 5 = {{ 'antimatter', false | calc }} = +{{ 'antimatter', true | calc }}%\n
                                    \n
                                    \n
                                    \n
                                    \n ${F("wiki_calc_creep_reduction",[F("wiki_calc_home")])} (${F("wiki_calc_cap",[.06])}):\n
                                    \n
                                    \n (0.02 + ((ln(100 + ({{ i.dark.val, 'dark' | generic }} * (1 + ({{ i.harmony.val, 'harmony' | generic }} * 0.01)))) - 4.605170185988092) / 20)) * (1 + ({{ i.sludge.val | sludgeLabel }} * 0.03)) = {{ 'micro', false, 2 | calc }}\n
                                    \n
                                    \n ${F("wiki_calc_creep_reduction",[F("wiki_calc_not_home")])} (${F("wiki_calc_cap",[.04])}):\n
                                    \n
                                    \n (0.01 + ((ln(100 + ({{ i.dark.val, 'dark' | generic }} * (1 + ({{ i.harmony.val, 'harmony' | generic }} * 0.01)))) - 4.605170185988092) / 35)) * (1 + ({{ i.sludge.val | sludgeLabel }} * 0.03)) = {{ 'micro', false, 1 | calc }}\n
                                    \n
                                    \n
                                    \n
                                    \n ${F("wiki_calc_dark_heavy",[F("wiki_menu_space")])}:\n
                                    \n
                                    \n 0.25 + (0.5 * 0.995^({{ i.dark.val, 'dark' | generic }} * (1 + ({{ i.harmony.val, 'harmony' | generic }} * 0.01)) * (1 + ({{ i.sludge.val | sludgeLabel }} * 0.03)))) = {{ 'heavy', false, 1 | calc }} = +{{ 'heavy', true, 1 | calc }}%\n
                                    \n
                                    \n ${F("wiki_calc_dark_heavy",[F("wiki_tech_req_or",[F("wiki_menu_interstellar"),F("wiki_menu_intergalactic")])])}:\n
                                    \n
                                    \n 0.2 + (0.3 * 0.995^({{ i.dark.val, 'dark' | generic }} * (1 + ({{ i.harmony.val, 'harmony' | generic }} * 0.01)) * (1 + ({{ i.sludge.val | sludgeLabel }} * 0.03)))) = {{ 'heavy', false, 2 | calc }} = +{{ 'heavy', true, 2 | calc }}%\n
                                    \n
                                    \n
                                    \n
                                    \n ${F("wiki_calc_bonuses",[F("wiki_calc_dark_magic")])}:\n
                                    \n
                                    \n (ln(50 + ({{ i.dark.val, 'dark' | generic }} * (1 + ({{ i.harmony.val, 'harmony' | generic }} * 0.01)) * (1 + ({{ i.sludge.val | sludgeLabel }} * 0.03)))) - 3.912023005428146) / 3 = {{ 'magic', false | calc }} = +{{ 'magic', true | calc }}%\n
                                    \n
                                    \n `),s.append(`\n
                                    \n
                                    ${F("wiki_p_res_dark")}
                                    \n
                                    ${F("wiki_p_res_harmony")}
                                    \n
                                    ${F("wiki_calc_sludge_level")}
                                    \n
                                    \n
                                    \n \n \n
                                    \n `),zs({el:"#darkBonusCalc",data:{i:n,s:c},methods:{val(e){n[e].val&&n[e].val<0?n[e].val=0:"sludge"===e&&n.sludge.val&&n.sludge.val>5&&(n.sludge.val=5)},pickUniverse(e){c[n.uni.val].vis=!1,n.uni.val=e,c[e].vis=!0},resetInputs(){n.dark.val=void 0,n.harmony.val=void 0,n.sludge.val=void 0,c[n.uni.val].vis=!1,n.uni.val="standard",c.standard.vis=!0},importInputs(){n.dark.val=t.prestige.Dark.count,n.harmony.val=t.prestige.Harmony.count,"bigbang"!==t.race.universe&&(c[n.uni.val].vis=!1,n.uni.val=t.race.universe,c[n.uni.val].vis=!0),n.sludge.val=t.stats.achieve.extinct_sludge&&t.stats.achieve.extinct_sludge[qn(n.uni.val)]?t.stats.achieve.extinct_sludge[qn(n.uni.val)]:0}},filters:{generic:(e,t)=>void 0!==e?e:F("wiki_p_res_"+t),sludgeLabel:e=>void 0!==e?e:F("wiki_calc_sludge_level"),uniLabel:e=>F(e?"universe_"+e:"wiki_calc_universe"),calc(e,t,a){if(e===n.uni.val){if(t)return"heavy"===e?(100*c[e][`val${a}`]).toFixed(3):(100*c[e].val).toFixed(3);if(c[e].result=void 0!==n.dark.val&&void 0!==n.harmony.val,c[e].result)switch(e){case"standard":case"evil":case"antimatter":case"magic":return c[e].val=+(Ts(e,!1,!0,{dark:n.dark.val,harmony:n.harmony.val,sludge:n.sludge.val})-1).toFixed(6),c[e].val;case"micro":return c[e][`val${a}`]=Ts(e,1===a,!0,{dark:n.dark.val,harmony:n.harmony.val,sludge:n.sludge.val}),c[e][`val${a}`];case"heavy":let t=Ts(e,!1,!0,{dark:n.dark.val,harmony:n.harmony.val,sludge:n.sludge.val});return t=1===a?.25+.5*t:.2+.3*t,c[e][`val${a}`]=t.toFixed(5),c[e][`val${a}`]}}}}})}(i),En("add","resources-prestige","dark",F("wiki_p_res_dark")),r=Tn(a,{name:"harmony",template:"p_res",paragraphs:3,h_level:2}),i=Gn(r,"harmony","gain"),yc(i,"harmony"),i=Gn(r,"harmony","bonus"),function(e){let a=$('
                                    ');e.append(a),a.append(`

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

                                    `);let r=$("
                                    "),i=$("
                                    ");a.append(r),a.append(i);let s={harmony:{val:void 0},ascended:{val:void 0},uni:{val:"undefined"}},n={result:{vis:!1,val:0}};r.append("\n
                                    \n (ln(50 + ({{ i.harmony.val, 'harmony' | generic }} * {{ i.ascended.val | ascendedLabel }})) - 3.912023005428146) * 0.01 = {{ | calc }}\n
                                    \n "),i.append(`\n
                                    \n
                                    ${F("wiki_p_res_harmony")}
                                    \n
                                    ${F("wiki_calc_ascended_level")}
                                    \n
                                    \n
                                    \n \n \n
                                    \n `),zs({el:"#harmonyCreepCalc",data:{i:s,s:n},methods:{val(e){s[e].val&&s[e].val<0?s[e].val=0:"ascended"===e&&s.ascended.val&&s.ascended.val>5&&(s.ascended.val=5)},resetInputs(){s.harmony.val=void 0,s.ascended.val=void 0},importInputs(){s.harmony.val=t.prestige.Harmony.count,s.ascended.val=t.stats.achieve.ascended&&t.stats.achieve.ascended[qn(t.race.universe||"standard")]?t.stats.achieve.ascended[qn(t.race.universe||"standard")]:0}},filters:{generic:(e,t)=>void 0!==e?e:F("wiki_p_res_"+t),ascendedLabel:e=>void 0!==e?e:F("wiki_calc_ascended_level"),calc(){if(n.result.vis=void 0!==s.harmony.val&&void 0!==s.ascended.val,n.result.vis)return n.result.val=+(.01*(Math.log(50+s.harmony.val*s.ascended.val)-3.912023005428146)).toFixed(5),n.result.val}}})}(i),En("add","resources-prestige","harmony",F("wiki_p_res_harmony")),Tn(a,{name:"blood",template:"p_res",paragraphs:5,h_level:2,para_data:{2:[F("tab_arpa_blood")],3:[1,"1-5"],4:[F("arpa_genepool_blood_sacrifice_title")],5:[F("arpa_genepool_blood_remembrance_title")]},data_link:{2:["wiki.html#blood-prestige"],4:["wiki.html#crispr-prestige-blood_sacrifice"],5:["wiki.html#crispr-prestige-blood_remembrance"]}}),En("add","resources-prestige","blood",F("wiki_p_res_blood")),r=Tn(a,{name:"artifact",template:"p_res",paragraphs:3,h_level:2,para_data:{1:[F("wiki_resets_infusion")],2:[F("tab_arpa_blood")],3:[1,"5th"]},data_link:{1:["wiki.html#resets-prestige-infusion"],2:["wiki.html#blood-prestige"]}}),i=Gn(r,"artifact","gain"),yc(i,"artifact"),En("add","resources-prestige","artifact",F("wiki_p_res_artifact")),r=Tn(a,{name:"ai_core",template:"p_res",paragraphs:2,h_level:2,para_data:{1:[F("wiki_resets_ai")]},data_link:{1:["wiki.html#resets-prestige-ai"]}}),i=Gn(r,"cores","gain"),yc(i,"cores"),i=Gn(r,"cores","bonus"),function(e){let a=$('
                                    ');e.append(a),a.append(`

                                    ${F("wiki_calc_core_quantum")}

                                    `);let r=$("
                                    "),i=$("
                                    ");a.append(r),a.append(i);let s={cores:{val:void 0}},n={result:{vis:!1,val:0}};r.append("\n
                                    \n 1 - (0.99^{{ i.cores.val, 'cores' | generic }}) = {{ false | calc }} = +{{ true | calc }}%\n
                                    \n "),i.append(`\n
                                    \n
                                    ${F("wiki_calc_cores")}
                                    \n
                                    \n
                                    \n \n \n
                                    \n `),zs({el:"#coresQuantumCalc",data:{i:s,s:n},methods:{val(e){s[e].val&&s[e].val<0&&(s[e].val=0)},resetInputs(){s.cores.val=void 0},importInputs(){s.cores.val=t.prestige.AICore.count}},filters:{generic:(e,t)=>void 0!==e?e:F("wiki_calc_"+t),calc:e=>e?+(100*n.result.val).toFixed(2):(n.result.vis=void 0!==s.cores.val,n.result.vis?(n.result.val=+(1-.99**s.cores.val).toFixed(4),n.result.val):void 0)}})}(i),En("add","resources-prestige","ai_core",F("wiki_p_res_ai_core")),r=Tn(a,{name:"servants",template:"p_res",paragraphs:5,h_level:2,break:[3,4,5],para_data:{1:[F("wiki_resets_matrix"),F("wiki_resets_retired"),F("wiki_resets_eden")],5:[F("achieve_overlord_name")]},data_link:{1:["wiki.html#resets-prestige-matrix","wiki.html#resets-prestige-retired","wiki.html#resets-prestige-eden"],5:["wiki.html#perks-prestige-overlord"]}}),En("add","resources-prestige","servants",F("wiki_p_res_servants")),r=Tn(a,{name:"skilled_servants",template:"p_res",paragraphs:6,h_level:2,break:[3,4,5,6],para_data:{1:[F("wiki_resets_matrix"),F("wiki_resets_retired")],6:[F("achieve_pathfinder_name"),F("achieve_overlord_name")]},data_link:{1:["wiki.html#resets-prestige-matrix","wiki.html#resets-prestige-retired"],6:["wiki.html#perks-prestige-pathfinder","wiki.html#perks-prestige-overlord"]}}),En("add","resources-prestige","skilled_servants",F("wiki_p_res_skilled_servants"))}(a);break;case"crispr":xc(a);break;case"blood":jc(a);break;case"perks":!function(e){let t=$("
                                    "),a=En("create",t);e.append(t),Object.keys(An).forEach((function(e){!function(e,t){let a=$(`
                                    `);if(An[t].hasOwnProperty("group")){let e=$(`
                                    ${An[t].name}
                                    `);An[t].group.forEach((function(t){e.append($(`
                                    ${t.desc(!0)}
                                    `))})),a.append(e)}else a.append($(`
                                    ${An[t].name}
                                    ${An[t].desc(!0)}
                                    `));if(An[t].notes.length>0){let e=$('
                                    ');An[t].notes.forEach((function(t){e.append(`
                                    ${t}
                                    `)})),a.append(e)}e.append(a)}(a,e),En("add","perks-prestige",`${e}`,An[e].name)}))}(a)}}(r),zc(a,r,i);break;case"events":(function(e){let a=$("#content");switch(Cs(a),e){case"major":!function(e){let a=En("create",e);Tn(a,{name:"major_intro",template:"events",paragraphs:3,h_level:2,para_data:{1:[F("wiki_menu_major"),999,83],2:[F("wiki_menu_major")],3:[F("wiki_menu_major")]}}),En("add","major-events","major_intro",F("wiki_menu_intro"));{let e=Tn(a,{name:"replication",template:"events",label:F("wiki_events_replication"),paragraphs:1,h_level:2,para_data:{1:[1,F("wiki_events_replication_para1_note",[3])]}});Tn(a,{name:"evolution",template:"events",label:F("wiki_events_replication"),paragraphs:1,h_level:2},e),Tn(a,{name:"replication_examples",template:"events",label:F("wiki_events_replication"),h_level:2,examples:[F("event_dna",[10])]},e),En("add","major-events","replication",F("wiki_events_replication"))}{let e=Tn(a,{name:"rna_meteor",template:"events",label:F("wiki_events_rna_meteor"),paragraphs:1,h_level:2,para_data:{1:[1,F("wiki_events_rna_meteor_para1_note",[2])]}});Tn(a,{name:"evolution",template:"events",label:F("wiki_events_rna_meteor"),paragraphs:1,h_level:2},e),Tn(a,{name:"rna_meteor_examples",template:"events",label:F("wiki_events_rna_meteor"),h_level:2,examples:[F("event_rna",[22])]},e),En("add","major-events","rna_meteor",F("wiki_events_rna_meteor"))}Tn(a,{name:"inspiration",template:"events",label:F("wiki_events_inspiration"),paragraphs:1,h_level:2,para_data:{1:[300,600]},examples:[F("event_inspiration")]}),En("add","major-events","inspiration",F("wiki_events_inspiration")),Tn(a,{name:"motivation",template:"events",label:F("wiki_events_motivation"),paragraphs:3,h_level:2,para_data:{1:[300,600],2:["10%","13%"]},examples:[F("event_motivation")]}),En("add","major-events","motivation",F("wiki_events_motivation"));{let e=Tn(a,{name:"fire",template:"events",label:F("wiki_events_fire"),paragraphs:1,h_level:2,para_data:{1:[1,"25%"]}});Tn(a,{name:"fire_condition",template:"events",label:F("wiki_events_fire"),paragraphs:2,break:[2],h_level:2},e),Tn(a,{name:"fire_examples",template:"events",label:F("wiki_events_fire"),h_level:2,examples:[F("event_fire",[1337..toLocaleString()])]},e),En("add","major-events","fire",F("wiki_events_fire"))}{let e=Tn(a,{name:"flare",template:"events",label:F("wiki_events_flare"),paragraphs:3,h_level:2,para_data:{2:["10%"],3:["20%",20,200]}});Tn(a,{name:"flare_condition",template:"events",label:F("wiki_events_flare"),paragraphs:4,break:[2],h_level:2},e),Tn(a,{name:"flare_examples",template:"events",label:F("wiki_events_flare"),h_level:2,examples:[F("event_flare",[Di[t.race.species].home,69]),F("event_flare2",[Di[t.race.species].home,42])]},e),En("add","major-events","flare",F("wiki_events_flare"))}{let e=Tn(a,{name:"raid",template:"events",label:F("wiki_events_raid"),paragraphs:3,h_level:2,para_data:{2:["25%"]}});Tn(a,{name:"raid_condition",template:"events",label:F("wiki_events_raid"),paragraphs:2,h_level:2,para_data:{2:[F("wiki_challenges_scenarios_truepath")]},data_link:{2:["wiki.html#challenges-gameplay-scenarios_truepath"]}},e),Tn(a,{name:"raid_examples",template:"events",label:F("wiki_events_raid"),h_level:2,examples:[F("event_raid1",[10,31]),F("event_raid2",[244,0,50])]},e),En("add","major-events","raid",F("wiki_events_raid"))}{let e=Tn(a,{name:"siege",template:"events",label:F("wiki_events_siege"),paragraphs:3,h_level:2,para_data:{2:["50%"]}});Tn(a,{name:"siege_condition",template:"events",label:F("wiki_events_siege"),paragraphs:3,h_level:2,para_data:{3:[F("wiki_challenges_scenarios_truepath")]},data_link:{3:["wiki.html#challenges-gameplay-scenarios_truepath"]}},e),Tn(a,{name:"siege_examples",template:"events",label:F("wiki_events_siege"),h_level:2,examples:[F("event_siege1",[30,49]),F("event_siege2",[500024..toLocaleString(),0,25])]},e),En("add","major-events","siege",F("wiki_events_siege"))}{let e=Tn(a,{name:"terrorist",template:"events",label:F("wiki_events_terrorist"),paragraphs:1,h_level:2});Tn(a,{name:"terrorist_condition",template:"events",label:F("wiki_events_terrorist"),paragraphs:2,h_level:2,para_data:{2:[F("wiki_challenges_scenarios_truepath")]},data_link:{2:["wiki.html#challenges-gameplay-scenarios_truepath"]}},e),Tn(a,{name:"terrorist_examples",template:"events",label:F("wiki_events_terrorist"),h_level:2,examples:[F("event_terrorist1",[14]),F("event_terrorist2",[54,18])]},e),En("add","major-events","terrorist",F("wiki_events_terrorist"))}{let e=Tn(a,{name:"pillage",template:"events",label:F("wiki_events_pillage"),paragraphs:6,break:[5],h_level:2,para_data:{2:["25%"],3:["50%"],5:[F("civics_gov_relations"),"40%"]}});Tn(a,{name:"pillage_condition",template:"events",label:F("wiki_events_pillage"),paragraphs:1,h_level:2,para_data:{1:[F("wiki_challenges_scenarios_truepath")]},data_link:{1:["wiki.html#challenges-gameplay-scenarios_truepath"]}},e),Tn(a,{name:"pillage_examples",template:"events",label:F("wiki_events_pillage"),h_level:2,examples:[F("event_pillaged1",[F("civics_gov2",[F("civics_gov_name4")]),10,55]),F("event_pillaged2",[F("civics_gov6",[F("civics_gov_name9")]),40,25,[`5704490 ${F("resource_Lumber_name")}`,`2177130 ${F("resource_Stone_name")}`,`4259421 ${F("resource_Furs_name")}`,`6033892 ${F("resource_Copper_name")}`,`602938 ${F("resource_Iron_name")}`,`3389580 ${F("resource_Aluminium_name")}`,`3292455 ${F("resource_Cement_name")}`,`5394173 ${F("resource_Coal_name")}`,`47231 ${F("resource_Oil_name")}`,`9390 ${F("resource_Uranium_name")}`,`7016884 ${F("resource_Steel_name")}`,`52801 ${F("resource_Titanium_name")}`,`1163086 ${F("resource_Alloy_name")}`,`2053980 ${F("resource_Polymer_name")}`,`3179901 ${F("resource_Iridium_name")}`,`792693 ${F("resource_Helium_3_name")}`,`1219 ${F("resource_Elerium_name")}`,`65078 ${F("resource_Water_name")}`,`290451 ${F("resource_Neutronium_name")}`,`3059577 ${F("resource_Adamantite_name")}`,`5736560 ${F("resource_Nano_Tube_name")}`,`2494390 ${F("resource_Graphene_name")}`,`6836006 ${F("resource_Stanene_name")}`,`2264649 ${F("resource_Orichalcum_name")}`,"$19235850"].join(", ")])]},e),En("add","major-events","pillage",F("wiki_events_pillage"))}{let e=Tn(a,{name:"quake",template:"events",label:F("wiki_events_quake"),paragraphs:1,h_level:2});Tn(a,{name:"quake_condition",template:"events",label:F("wiki_events_quake"),paragraphs:2,break:[2],h_level:2},e),Tn(a,{name:"quake_examples",template:"events",label:F("wiki_events_quake"),h_level:2,examples:[F("event_quake",[t.race.cataclysm||t.race.orbit_decayed?Di[t.race.species].solar.red:Di[t.race.species].home])]},e),En("add","major-events","quake",F("wiki_events_quake"))}{let e=Tn(a,{name:"doom",template:"events",label:F("wiki_events_doom"),paragraphs:2,h_level:2});Tn(a,{name:"doom_condition",template:"events",label:F("wiki_events_doom"),paragraphs:2,break:[2],h_level:2},e),Tn(a,{name:"doom_examples",template:"events",label:F("wiki_events_doom"),h_level:2,examples:[F("event_doom",[Di[t.race.species].solar.dwarf]),F("event_doom_alt",[Di[t.race.species].solar.dwarf])]},e),En("add","major-events","doom",F("wiki_events_doom"))}{let e=Tn(a,{name:"dhorde",template:"events",label:F("wiki_events_dhorde"),paragraphs:1,h_level:2,para_data:{1:[2500,5e3]}});Tn(a,{name:"dhorde_condition",template:"events",label:F("wiki_events_dhorde"),paragraphs:1,h_level:2},e),Tn(a,{name:"dhorde_examples",template:"events",label:F("wiki_events_dhorde"),h_level:2,examples:[F("event_demon_influx",[3456..toLocaleString()])]},e),En("add","major-events","dhorde",F("wiki_events_dhorde"))}{let e=Tn(a,{name:"ruins",template:"events",label:F("wiki_events_ruins"),paragraphs:2,break:[2],h_level:2,para_data:{2:[F("resource_Iron_name"),F("resource_Copper_name"),F("resource_Steel_name"),F("resource_Cement_name"),"25%"]}});Tn(a,{name:"ruins_condition",template:"events",label:F("wiki_events_ruins"),paragraphs:1,h_level:2},e),Tn(a,{name:"ruins_examples",template:"events",label:F("wiki_events_ruins"),h_level:2,examples:[F("event_ruins")]},e),En("add","major-events","ruins",F("wiki_events_ruins"))}{let e=Tn(a,{name:"taxrevolt",template:"events",label:F("wiki_events_taxrevolt"),paragraphs:2,h_level:2});Tn(a,{name:"taxrevolt_condition",template:"events",label:F("wiki_events_taxrevolt"),paragraphs:3,break:[2],h_level:2,para_data:{1:["> 25%","< 100%"],2:[F("govern_oligarchy"),"20%"],3:[F("governor_noble"),"10%"]}},e),Tn(a,{name:"taxrevolt_examples",template:"events",label:F("wiki_events_taxrevolt"),h_level:2,examples:[F("event_tax_revolt")]},e),En("add","major-events","taxrevolt",F("wiki_events_taxrevolt"))}{let e=Tn(a,{name:"slave",template:"events",label:F("wiki_events_slave"),paragraphs:2,break:[2],h_level:2});Tn(a,{name:"slave_condition",template:"events",label:F("wiki_events_slave"),paragraphs:1,h_level:2,para_data:{1:[F("trait_slaver_name")]}},e),Tn(a,{name:"slave_examples",template:"events",label:F("wiki_events_slave"),h_level:2,examples:[F("event_slave_death1"),F("event_slave_death2"),F("event_slave_death3"),F("event_slave_none")]},e),En("add","major-events","slave",F("wiki_events_slave"))}{let e=Tn(a,{name:"protest",template:"events",label:F("wiki_events_protest"),paragraphs:3,h_level:2,para_data:{1:[F("govern_republic")],2:["30%"],3:[30,90]}});Tn(a,{name:"protest_condition",template:"events",label:F("wiki_events_protest"),paragraphs:1,h_level:2,para_data:{1:[F("govern_republic")]}},e),Tn(a,{name:"protest_examples",template:"events",label:F("wiki_events_protest"),h_level:2,examples:[F("event_protest0",[ui("small")]),F("event_protest1"),F("event_protest2"),F("event_protest3"),F("event_protest4"),F("event_protest5"),F("event_protest6"),F("event_protest7"),F("event_protest8"),F("event_protest9")]},e),En("add","major-events","protest",F("wiki_events_protest"))}{let e=Tn(a,{name:"scandal",template:"events",label:F("wiki_events_scandal"),paragraphs:2,h_level:2,para_data:{1:[F("governor_media")],2:["8%",15,90]}});Tn(a,{name:"scandal_condition",template:"events",label:F("wiki_events_scandal"),paragraphs:1,h_level:2,para_data:{1:[F("governor_media")]}},e),Tn(a,{name:"scandal_examples",template:"events",label:F("wiki_events_scandal"),h_level:2,examples:[F("event_scandal0"),F("event_scandal1"),F("event_scandal2"),F("event_scandal3"),F("event_scandal4"),F("event_scandal5"),F("event_scandal6"),F("event_scandal7"),F("event_scandal8"),F("event_scandal9")]},e),En("add","major-events","scandal",F("wiki_events_scandal"))}{let e=Tn(a,{name:"spy",template:"events",label:F("wiki_events_spy"),paragraphs:1,h_level:2});Tn(a,{name:"spy_condition",template:"events",label:F("wiki_events_spy"),paragraphs:1,h_level:2},e),Tn(a,{name:"spy_examples",template:"events",label:F("wiki_events_spy"),h_level:2,examples:[F("event_spy",[X(1)])]},e),En("add","major-events","spy",F("wiki_events_spy"))}{let e=Tn(a,{name:"mine_collapse",template:"events",label:F("wiki_events_mine_collapse"),paragraphs:1,h_level:2});Tn(a,{name:"mine_collapse_condition",template:"events",label:F("wiki_events_mine_collapse"),paragraphs:1,h_level:2},e),Tn(a,{name:"mine_collapse_examples",template:"events",label:F("wiki_events_mine_collapse"),h_level:2,examples:[F("event_mine_collapse")]},e),En("add","major-events","mine_collapse",F("wiki_events_mine_collapse"))}{let e=Tn(a,{name:"m_curious",template:"events",label:F("wiki_events_m_curious"),paragraphs:6,break:[2,3,4,5,6],h_level:2,para_data:{2:[F("wiki_events_m_curious_para2_note1",[5e4.toLocaleString(),5e6.toLocaleString(),F("resource_Money_name")]),F("wiki_events_m_curious_para2_note1",[100,1e5.toLocaleString(),F("resource_Steel_name")]),F("wiki_events_m_curious_para2_note1",[250,1e6.toLocaleString(),F("resource_Alloy_name")]),F("wiki_events_m_curious_para2_note1",[100,25e4.toLocaleString(),F("resource_Adamantite_name")]),F("wiki_events_m_curious_para2_note1",[500,5e4.toLocaleString(),F("resource_Bolognium_name")]),F("wiki_events_m_curious_para2_note2",[1,F("resource_Soul_Gem_name")])],3:[10],4:[600,1200],5:["5%",200,600],6:[F("race_cath"),"10%",500,1e3]}});Tn(a,{name:"m_curious_condition",template:"events",label:F("wiki_events_m_curious"),paragraphs:1,h_level:2,para_data:{1:[F("trait_curious_name")]}},e),Tn(a,{name:"m_curious_examples",template:"events",label:F("wiki_events_m_curious"),h_level:2,examples:[F("event_m_curious0",[Di[t.race.species].name,444015..toLocaleString(),F("resource_Alloy_name")]),F("event_m_curious1",[Di[t.race.species].name]),F("event_m_curious2",[Di[t.race.species].name]),F("event_m_curious3",[Di[t.race.species].name]),F("event_m_curious4a",[F("race_cath")]),F("event_m_curious4b",[F("race_octigoran")])]},e),En("add","major-events","m_curious",F("wiki_events_m_curious"))}}(a);break;case"minor":!function(e){let a=En("create",e);{let e=Tn(a,{name:"minor_intro",template:"events",paragraphs:1,h_level:2});Tn(a,{name:"major_intro",template:"events",paragraphs:3,h_level:2,para_data:{1:[F("wiki_menu_minor"),850,71],2:[F("wiki_menu_minor")],3:[F("wiki_menu_minor")]}},e),En("add","minor-events","minor_intro",F("wiki_menu_intro"))}{let e=Tn(a,{name:"curious",template:"events",label:F("wiki_events_curious"),paragraphs:2,break:[2],h_level:2});Tn(a,{name:"curious_condition",template:"events",label:F("wiki_events_curious"),paragraphs:1,h_level:2,para_data:{1:[F("trait_curious_name")]}},e),Tn(a,{name:"curious_examples",template:"events",label:F("wiki_events_curious"),h_level:2,examples:[F("event_curious0",[Di[t.race.species].name]),F("event_curious1",[Di[t.race.species].name]),F("event_curious2",[Di[t.race.species].name]),F("event_curious3",[Di[t.race.species].name]),F("event_curious4",[Di[t.race.species].name]),F("event_curious5",[Di[t.race.species].name]),F("event_curious6",[Di[t.race.species].name]),F("event_curious7",[Di[t.race.species].name]),F("event_curious8",[Di[t.race.species].name]),F("event_curious9",[Di[t.race.species].name])]},e),En("add","minor-events","curious",F("wiki_events_curious"))}{let e=Tn(a,{name:"slave_escape",template:"events",label:F("wiki_events_slave_escape"),paragraphs:2,break:[2],h_level:2});Tn(a,{name:"slave_escape_condition",template:"events",label:F("wiki_events_slave_escape"),paragraphs:1,h_level:2,para_data:{1:[F("trait_slaver_name")]}},e),Tn(a,{name:"slave_escape_examples",template:"events",label:F("wiki_events_slave_escape"),h_level:2,examples:[F("event_slave_escape1"),F("event_slave_escape2"),F("event_slave_death4"),F("event_slave_none")]},e),En("add","minor-events","slave_escape",F("wiki_events_slave_escape"))}{let e=Tn(a,{name:"shooting_star",template:"events",label:F("wiki_events_shooting_star"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_shooting_star"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"shooting_star_examples",template:"events",label:F("wiki_events_shooting_star"),h_level:2,examples:[F("event_shooting_star")]},e),En("add","minor-events","shooting_star",F("wiki_events_shooting_star"))}{let e=Tn(a,{name:"tumbleweed",template:"events",label:F("wiki_events_tumbleweed"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_tumbleweed"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"tumbleweed_examples",template:"events",label:F("wiki_events_tumbleweed"),h_level:2,examples:[F("event_tumbleweed")]},e),En("add","minor-events","tumbleweed",F("wiki_events_tumbleweed"))}{let e=Tn(a,{name:"flashmob",template:"events",label:F("wiki_events_flashmob"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_flashmob"),paragraphs:1,h_level:2,para_data:{1:[F("tech_mad_science")]}},e),Tn(a,{name:"flashmob_examples",template:"events",label:F("wiki_events_flashmob"),h_level:2,examples:[F("event_flashmob")]},e),En("add","minor-events","flashmob",F("wiki_events_flashmob"))}{let e=Tn(a,{name:"heatwave",template:"events",label:F("wiki_events_heatwave"),paragraphs:1,h_level:2,para_data:{1:[F("hot")]}});Tn(a,{name:"heatwave_condition",template:"events",label:F("wiki_events_heatwave"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club"),F("evo_challenge_cataclysm"),F("hot")]}},e),Tn(a,{name:"heatwave_examples",template:"events",label:F("wiki_events_heatwave"),h_level:2,examples:[F("event_heatwave")]},e),En("add","minor-events","heatwave",F("wiki_events_heatwave"))}{let e=Tn(a,{name:"coldsnap",template:"events",label:F("wiki_events_coldsnap"),paragraphs:1,h_level:2,para_data:{1:[F("cold")]}});Tn(a,{name:"coldsnap_condition",template:"events",label:F("wiki_events_coldsnap"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club"),F("evo_challenge_cataclysm"),F("cold")]}},e),Tn(a,{name:"coldsnap_examples",template:"events",label:F("wiki_events_coldsnap"),h_level:2,examples:[F("event_coldsnap")]},e),En("add","minor-events","coldsnap",F("wiki_events_coldsnap"))}{let e=Tn(a,{name:"cucumber",template:"events",label:F("wiki_events_cucumber"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_cucumber"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"cucumber_examples",template:"events",label:F("wiki_events_cucumber"),h_level:2,examples:[F("event_cucumber")]},e),En("add","minor-events","cucumber",F("wiki_events_cucumber"))}{let e=Tn(a,{name:"planking",template:"events",label:F("wiki_events_planking"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_planking"),paragraphs:1,h_level:2,para_data:{1:[F("tech_mad_science")]}},e),Tn(a,{name:"planking_examples",template:"events",label:F("wiki_events_planking"),h_level:2,examples:[F("event_planking")]},e),En("add","minor-events","planking",F("wiki_events_planking"))}{let e=Tn(a,{name:"furryfish",template:"events",label:F("wiki_events_furryfish"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_furryfish"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"furryfish_examples",template:"events",label:F("wiki_events_furryfish"),h_level:2,examples:[F("event_furryfish")]},e),En("add","minor-events","furryfish",F("wiki_events_furryfish"))}{let e=Tn(a,{name:"meteor_shower",template:"events",label:F("wiki_events_meteor_shower"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_meteor_shower"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"meteor_shower_examples",template:"events",label:F("wiki_events_meteor_shower"),h_level:2,examples:[F("event_meteor_shower")]},e),En("add","minor-events","meteor_shower",F("wiki_events_meteor_shower"))}{let e=Tn(a,{name:"hum",template:"events",label:F("wiki_events_hum"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_hum"),paragraphs:1,h_level:2,para_data:{1:[F("tech_mad_science")]}},e),Tn(a,{name:"hum_examples",template:"events",label:F("wiki_events_hum"),h_level:2,examples:[F("event_hum")]},e),En("add","minor-events","hum",F("wiki_events_hum"))}{let e=Tn(a,{name:"bloodrain",template:"events",label:F("wiki_events_bloodrain"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_bloodrain"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"bloodrain_examples",template:"events",label:F("wiki_events_bloodrain"),h_level:2,examples:[F("event_bloodrain")]},e),En("add","minor-events","bloodrain",F("wiki_events_bloodrain"))}{let e=Tn(a,{name:"haunting",template:"events",label:F("wiki_events_haunting"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_haunting"),paragraphs:1,h_level:2,para_data:{1:[F("tech_science")]}},e),Tn(a,{name:"haunting_examples",template:"events",label:F("wiki_events_haunting"),h_level:2,examples:[F("event_haunting")]},e),En("add","minor-events","haunting",F("wiki_events_haunting"))}{let e=Tn(a,{name:"mothman",template:"events",label:F("wiki_events_mothman"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_mothman"),paragraphs:1,h_level:2,para_data:{1:[F("tech_science")]}},e),Tn(a,{name:"mothman_examples",template:"events",label:F("wiki_events_mothman"),h_level:2,examples:[F("event_mothman")]},e),En("add","minor-events","mothman",F("wiki_events_mothman"))}{let e=Tn(a,{name:"dejavu",template:"events",label:F("wiki_events_dejavu"),paragraphs:1,h_level:2});Tn(a,{name:"dejavu_condition",template:"events",label:F("wiki_events_dejavu"),paragraphs:1,h_level:2},e),Tn(a,{name:"dejavu_examples",template:"events",label:F("wiki_events_dejavu"),h_level:2,examples:[F("event_dejavu")]},e),En("add","minor-events","dejavu",F("wiki_events_dejavu"))}{let e=Tn(a,{name:"dollar",template:"events",label:F("wiki_events_dollar"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_dollar"),paragraphs:1,h_level:2,para_data:{1:[F("tech_currency")]}},e),Tn(a,{name:"dollar_examples",template:"events",label:F("wiki_events_dollar"),h_level:2,examples:[F("event_dollar",[6])]},e),En("add","minor-events","dollar",F("wiki_events_dollar"))}{let e=Tn(a,{name:"pickpocket",template:"events",label:F("wiki_events_pickpocket"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_pickpocket"),paragraphs:1,h_level:2,para_data:{1:[F("tech_currency")]}},e),Tn(a,{name:"pickpocket_examples",template:"events",label:F("wiki_events_pickpocket"),h_level:2,examples:[F("event_pickpocket",[9])]},e),En("add","minor-events","pickpocket",F("wiki_events_pickpocket"))}{let e=Tn(a,{name:"bird",template:"events",label:F("wiki_events_bird"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_bird"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"bird_examples",template:"events",label:F("wiki_events_bird"),h_level:2,examples:[F("event_bird")]},e),En("add","minor-events","bird",F("wiki_events_bird"))}{let e=Tn(a,{name:"contest",template:"events",label:F("wiki_events_contest"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_contest"),paragraphs:1,h_level:2,para_data:{1:[F("tech_science")]}},e),Tn(a,{name:"contest_examples",template:"events",label:F("wiki_events_contest"),h_level:2,examples:[F("event_contest",[F("event_contest_place0"),F("event_contest_type0")]),F("event_contest",[F("event_contest_place1"),F("event_contest_type1")]),F("event_contest",[F("event_contest_place2"),F("event_contest_type2")]),F("event_contest",[F("event_contest_place0"),F("event_contest_type3")]),F("event_contest",[F("event_contest_place1"),F("event_contest_type4")]),F("event_contest",[F("event_contest_place2"),F("event_contest_type5")]),F("event_contest",[F("event_contest_place0"),F("event_contest_type6")]),F("event_contest",[F("event_contest_place1"),F("event_contest_type7")]),F("event_contest",[F("event_contest_place2"),F("event_contest_type8")]),F("event_contest",[F("event_contest_place0"),F("event_contest_type9")])]},e),En("add","minor-events","contest",F("wiki_events_contest"))}{let e=Tn(a,{name:"cloud",template:"events",label:F("wiki_events_cloud"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_cloud"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"cloud_examples",template:"events",label:F("wiki_events_cloud"),h_level:2,examples:[F("event_cloud",[F("event_cloud_type0")]),F("event_cloud",[F("event_cloud_type1")]),F("event_cloud",[F("event_cloud_type2")]),F("event_cloud",[F("event_cloud_type3")]),F("event_cloud",[F("event_cloud_type4")]),F("event_cloud",[F("event_cloud_type5")]),F("event_cloud",[F("event_cloud_type6")]),F("event_cloud",[F("event_cloud_type7")]),F("event_cloud",[F("event_cloud_type8")]),F("event_cloud",[F("event_cloud_type9")]),F("event_cloud",[F("event_cloud_type10")])]},e),En("add","minor-events","cloud",F("wiki_events_cloud"))}{let e=Tn(a,{name:"dark_cloud",template:"events",label:F("wiki_events_dark_cloud"),paragraphs:1,h_level:2,para_data:{1:[F("rain"),F("snow")]}});Tn(a,{name:"dark_cloud_condition",template:"events",label:F("wiki_events_dark_cloud"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club"),F("evo_challenge_cataclysm"),F("rain"),F("snow")]}},e),Tn(a,{name:"dark_cloud_examples",template:"events",label:F("wiki_events_dark_cloud"),h_level:2,examples:[F("event_dark_cloud")]},e),En("add","minor-events","dark_cloud",F("wiki_events_dark_cloud"))}{let e=Tn(a,{name:"gloom",template:"events",label:F("wiki_events_gloom"),paragraphs:1,h_level:2,para_data:{1:[F("cloudy")]}});Tn(a,{name:"gloom_condition",template:"events",label:F("wiki_events_gloom"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club"),F("evo_challenge_cataclysm"),F("cloudy")]}},e),Tn(a,{name:"gloom_examples",template:"events",label:F("wiki_events_gloom"),h_level:2,examples:[F("event_gloom")]},e),En("add","minor-events","gloom",F("wiki_events_gloom"))}{let e=Tn(a,{name:"tracks",template:"events",label:F("wiki_events_tracks"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_tracks"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"tracks_examples",template:"events",label:F("wiki_events_tracks"),h_level:2,examples:[F("event_tracks")]},e),En("add","minor-events","tracks",F("wiki_events_tracks"))}{let e=Tn(a,{name:"hoax",template:"events",label:F("wiki_events_hoax"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_hoax"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"hoax_examples",template:"events",label:F("wiki_events_hoax"),h_level:2,examples:[F("event_hoax")]},e),En("add","minor-events","hoax",F("wiki_events_hoax"))}{let e=Tn(a,{name:"burial",template:"events",label:F("wiki_events_burial"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_burial"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"burial_examples",template:"events",label:F("wiki_events_burial"),h_level:2,examples:[F("event_burial")]},e),En("add","minor-events","burial",F("wiki_events_burial"))}{let e=Tn(a,{name:"artifacts",template:"events",label:F("wiki_events_artifacts"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_artifacts"),paragraphs:1,h_level:2,para_data:{1:[F("tech_mad_science")]}},e),Tn(a,{name:"artifacts_examples",template:"events",label:F("wiki_events_artifacts"),h_level:2,examples:[F("event_artifacts")]},e),En("add","minor-events","artifacts",F("wiki_events_artifacts"))}{let e=Tn(a,{name:"parade",template:"events",label:F("wiki_events_parade"),paragraphs:1,h_level:2});Tn(a,{name:"parade_condition",template:"events",label:F("wiki_events_parade"),paragraphs:1,h_level:2},e),Tn(a,{name:"parade_examples",template:"events",label:F("wiki_events_parade"),h_level:2,examples:[F("event_parade")]},e),En("add","minor-events","parade",F("wiki_events_parade"))}{let e=Tn(a,{name:"crop_circle",template:"events",label:F("wiki_events_crop_circle"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_crop_circle"),paragraphs:1,h_level:2,para_data:{1:[F("tech_agriculture")]}},e),Tn(a,{name:"crop_circle_examples",template:"events",label:F("wiki_events_crop_circle"),h_level:2,examples:[F("event_crop_circle")]},e),En("add","minor-events","crop_circle",F("wiki_events_crop_circle"))}{let e=Tn(a,{name:"llama",template:"events",label:F("wiki_events_llama"),paragraphs:1,h_level:2,para_data:{1:[25,100]}});Tn(a,{name:"tech",template:"events",label:F("wiki_events_llama"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"llama_condition",template:"events",label:F("wiki_events_llama"),paragraphs:1,h_level:2,para_data:{1:[F("trait_carnivore_name"),F("trait_soul_eater_name"),F("trait_detritivore_name"),F("trait_artifical_name")]},data_link:{1:["wiki.html#traits-species-genus_carnivore","wiki.html#traits-species-special_soul_eater","wiki.html#traits-species-genus_detritivore","wiki.html#traits-species-genus_artifical"]}},e),Tn(a,{name:"llama_examples",template:"events",label:F("wiki_events_llama"),h_level:2,examples:[F("event_llama",[51])]},e),En("add","minor-events","llama",F("wiki_events_llama"))}{let e=Tn(a,{name:"cat",template:"events",label:F("wiki_events_cat"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_cat"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"cat_examples",template:"events",label:F("wiki_events_cat"),h_level:2,examples:[F("event_cat")]},e),En("add","minor-events","cat",F("wiki_events_cat"))}{let e=Tn(a,{name:"omen",template:"events",label:F("wiki_events_omen"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_omen"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"omen_examples",template:"events",label:F("wiki_events_omen"),h_level:2,examples:[F("event_omen")]},e),En("add","minor-events","omen",F("wiki_events_omen"))}{let e=Tn(a,{name:"theft",template:"events",label:F("wiki_events_theft"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_theft"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"theft_examples",template:"events",label:F("wiki_events_theft"),h_level:2,examples:[F("event_theft",[F("event_theft_type0")]),F("event_theft",[F("event_theft_type1")]),F("event_theft",[F("event_theft_type2")]),F("event_theft",[F("event_theft_type3")]),F("event_theft",[F("event_theft_type4")]),F("event_theft",[F("event_theft_type5")]),F("event_theft",[F("event_theft_type6")]),F("event_theft",[F("event_theft_type7")]),F("event_theft",[F("event_theft_type8")]),F("event_theft",[F("event_theft_type9")])]},e),En("add","minor-events","theft",F("wiki_events_theft"))}{let e=Tn(a,{name:"compass",template:"events",label:F("wiki_events_compass"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_compass"),paragraphs:1,h_level:2,para_data:{1:[F("tech_mining")]}},e),Tn(a,{name:"compass_examples",template:"events",label:F("wiki_events_compass"),h_level:2,examples:[F("event_compass")]},e),En("add","minor-events","compass",F("wiki_events_compass"))}{let e=Tn(a,{name:"bone",template:"events",label:F("wiki_events_bone"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_bone"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"bone_examples",template:"events",label:F("wiki_events_bone"),h_level:2,examples:[F("event_bone")]},e),En("add","minor-events","bone",F("wiki_events_bone"))}{let e=Tn(a,{name:"delicacy",template:"events",label:F("wiki_events_delicacy"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_delicacy"),paragraphs:1,h_level:2,para_data:{1:[F("tech_mad_science")]}},e),Tn(a,{name:"delicacy_examples",template:"events",label:F("wiki_events_delicacy"),h_level:2,examples:[F("event_delicacy")]},e),En("add","minor-events","delicacy",F("wiki_events_delicacy"))}{let e=Tn(a,{name:"prank",template:"events",label:F("wiki_events_prank"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_prank"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"prank_examples",template:"events",label:F("wiki_events_prank"),h_level:2,examples:[F("event_prank",[F("event_prank_type0")]),F("event_prank",[F("event_prank_type1")]),F("event_prank",[F("event_prank_type2")]),F("event_prank",[F("event_prank_type3")]),F("event_prank",[F("event_prank_type4")]),F("event_prank",[F("event_prank_type5")]),F("event_prank",[F("event_prank_type6")]),F("event_prank",[F("event_prank_type7")]),F("event_prank",[F("event_prank_type8")]),F("event_prank",[F("event_prank_type9")])]},e),En("add","minor-events","prank",F("wiki_events_prank"))}{let e=Tn(a,{name:"graffiti",template:"events",label:F("wiki_events_graffiti"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_graffiti"),paragraphs:1,h_level:2,para_data:{1:[F("tech_science")]}},e),Tn(a,{name:"graffiti_examples",template:"events",label:F("wiki_events_graffiti"),h_level:2,examples:[F("event_graffiti")]},e),En("add","minor-events","graffiti",F("wiki_events_graffiti"))}{let e=Tn(a,{name:"soul",template:"events",label:F("wiki_events_soul"),paragraphs:1,h_level:2});Tn(a,{name:"soul_condition",template:"events",label:F("wiki_events_soul"),paragraphs:1,h_level:2,para_data:{1:[F("trait_soul_eater_name")]}},e),Tn(a,{name:"soul_examples",template:"events",label:F("wiki_events_soul"),h_level:2,examples:[F("event_soul")]},e),En("add","minor-events","soul",F("wiki_events_soul"))}{let e=t.stats.hasOwnProperty("reset")?t.stats.reset+1:1,r=+(e/(e+10)*11).toFixed(2),i=Tn(a,{name:"cheese",template:"events",label:F("wiki_events_cheese"),paragraphs:1,h_level:2,para_data:{1:[`${r}%`,10,9+e]}});Tn(a,{name:"tech",template:"events",label:F("wiki_events_cheese"),paragraphs:1,h_level:2,para_data:{1:[jr()]}},i),Tn(a,{name:"cheese_examples",template:"events",label:F("wiki_events_cheese"),h_level:2,examples:[F("event_cheese")]},i),En("add","minor-events","cheese",F("wiki_events_cheese"))}{let e=Tn(a,{name:"tremor",template:"events",label:F("wiki_events_tremor"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_tremor"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"tremor_examples",template:"events",label:F("wiki_events_tremor"),h_level:2,examples:[F("event_tremor")]},e),En("add","minor-events","tremor",F("wiki_events_tremor"))}{let e=Tn(a,{name:"rumor",template:"events",label:F("wiki_events_rumor"),paragraphs:1,h_level:2});Tn(a,{name:"tech",template:"events",label:F("wiki_events_rumor"),paragraphs:1,h_level:2,para_data:{1:[F("tech_club")]}},e),Tn(a,{name:"rumor_examples",template:"events",label:F("wiki_events_rumor"),h_level:2,examples:[F("event_rumor",[F("event_rumor_type0")]),F("event_rumor",[F("event_rumor_type1")]),F("event_rumor",[F("event_rumor_type2")]),F("event_rumor",[F("event_rumor_type3")]),F("event_rumor",[F("event_rumor_type4")]),F("event_rumor",[F("event_rumor_type5")]),F("event_rumor",[F("event_rumor_type6")]),F("event_rumor",[F("event_rumor_type7")]),F("event_rumor",[F("event_rumor_type8")]),F("event_rumor",[F("event_rumor_type9")])]},e),En("add","minor-events","rumor",F("wiki_events_rumor"))}}(a);break;case"progress":!function(e){let a=En("create",e);Tn(a,{name:"progress_intro",template:"events",paragraphs:3,h_level:2}),En("add","progress-events","progress_intro",F("wiki_menu_intro"));{let e=Tn(a,{name:"steel",template:"events",label:F("wiki_events_steel"),paragraphs:2,break:[2],h_level:2,para_data:{1:[F("resource_Steel_name")],2:["0.08%"]}});Tn(a,{name:"steel_condition",template:"events",label:F("wiki_events_steel"),paragraphs:1,h_level:2,para_data:{1:[F("resource_Steel_name")]},examples:[F("steel_sample")]},e),En("add","progress-events","steel",F("wiki_events_steel"))}Tn(a,{name:"elerium",template:"events",label:F("wiki_events_elerium"),paragraphs:2,break:[2],h_level:2,para_data:{1:[F("resource_Elerium_name"),F("tech_elerium_mining")],2:[F("space_belt_iron_ship_title"),F("space_belt_iridium_ship_title"),"0.4%"]},data_link:{1:[!1,"wiki.html#deep_space-tech-elerium_mining"],2:["wiki.html#space-structures-iron_ship","wiki.html#space-structures-iridium_ship"]},examples:[F("discover_elerium")]}),En("add","progress-events","elerium",F("wiki_events_elerium")),Tn(a,{name:"oil",template:"events",label:F("wiki_events_oil"),paragraphs:2,break:[2],h_level:2,para_data:{1:[F("resource_Oil_name"),Dn("gas_moon"),F("space_gas_moon_oil_extractor_title")],2:[F("space_gas_moon_outpost_title"),"1%"]},data_link:{1:[!1,!1,"wiki.html#space-structures-oil_extractor"],2:["wiki.html#space-structures-outpost"]},examples:[F("discover_oil",[Dn("gas_moon")])]}),En("add","progress-events","oil",F("wiki_events_oil"));{let e=Tn(a,{name:"pit",template:"events",label:F("wiki_events_pit"),paragraphs:2,break:[2],h_level:2,para_data:{1:[F("portal_pit_name"),F("tab_portal"),F("portal_pit_mission_title")]},data_link:{1:[!1,!1,"wiki.html#hell-structures-pit_mission"]}});Tn(a,{name:"pit_condition",template:"events",label:F("wiki_events_pit"),paragraphs:1,h_level:2,para_data:{1:[1e6.toLocaleString(),F("galaxy_telemetry_beacon")]},data_link:{1:[!1,"wiki.html#intergalactic-structures-telemetry_beacon"]},examples:[F("portal_hell_pit_found")]},e),En("add","progress-events","pit",F("wiki_events_pit"))}{let e=Tn(a,{name:"alien_encounter",template:"events",label:F("wiki_events_alien_encounter"),paragraphs:2,break:[2],h_level:2,para_data:{1:[F("galaxy_scout_ship"),F("tech_xeno_linguistics"),F("galaxy_corvette_ship")],2:["10%"]},data_link:{1:["wiki.html#intergalactic-structures-scout_ship","wiki.html#intergalactic-tech-xeno_linguistics","wiki.html#intergalactic-tech-corvette_ship"]}});Tn(a,{name:"alien_encounter_condition",template:"events",label:F("wiki_events_alien_encounter"),paragraphs:1,h_level:2,para_data:{1:[F("galaxy_scout_ship")]},examples:[F("galaxy_encounter")]},e),En("add","progress-events","alien_encounter",F("wiki_events_alien_encounter"))}{let e=Tn(a,{name:"piracy",template:"events",label:F("wiki_events_piracy"),paragraphs:3,break:[3],h_level:2,para_data:{2:[F("galaxy_piracy")],3:["20%"]},data_link:{2:["wiki.html#mechanics-gameplay-piracy"]}});Tn(a,{name:"piracy_condition",template:"events",label:F("wiki_events_piracy"),paragraphs:1,h_level:2,para_data:{1:[F("galaxy_embassy")]},data_link:{1:["wiki.html#intergalactic-structures-embassy"]},examples:[F("galaxy_piracy_msg",[Di[t.galaxy.hasOwnProperty("alien2")?t.galaxy.alien2.id:t.race.species].name])]},e),En("add","progress-events","piracy",F("wiki_events_piracy"))}Tn(a,{name:"alien_database",template:"events",label:F("wiki_events_alien_database"),paragraphs:2,break:[2],h_level:2,para_data:{1:[F("galaxy_scavenger"),F("tech_alien_database")],2:[F("galaxy_scavenger"),"2%"]},data_link:{1:["wiki.html#intergalactic-structures-scavenger"]},examples:[F("galaxy_scavenger_find")]}),En("add","progress-events","alien_database",F("wiki_events_alien_database"));{let e=Tn(a,{name:"corrupt_gem",template:"events",label:F("wiki_events_corrupt_gem"),paragraphs:4,break:[2],h_level:2,para_data:{1:[F("resource_Corrupt_Gem_name"),F("portal_soul_forge_title")],2:[F("resource_Soul_Gem_name"),F("portal_soul_forge_title"),F("portal_soul_attractor_title")],3:["1/(11-X)","X",F("portal_soul_attractor_title")],4:[9,F("portal_soul_attractor_title"),"9.09%",0,"50%"]},data_link:{1:[!1,"wiki.html#hell-structures-soul_forge"],2:[!1,!1,"wiki.html#hell-structures-soul_attractor"]}});Tn(a,{name:"corrupt_gem_condition",template:"events",label:F("wiki_events_corrupt_gem"),paragraphs:1,h_level:2,para_data:{1:[F("tech_metaphysics")]},data_link:{1:["wiki.html#intergalactic-tech-metaphysics"]},examples:[F("portal_corrupt_gem")]},e),En("add","progress-events","corrupt_gem",F("wiki_events_corrupt_gem"))}Tn(a,{name:"vault_find",template:"events",label:F("wiki_events_vault_find"),paragraphs:3,break:[2],h_level:2,para_data:{1:[F("job_archaeologist"),F("portal_vault_title"),F("portal_ruins_name")],2:[F("job_archaeologist"),"2.5%"],3:[F("job_archaeologist"),F("portal_ruins_supressed"),F("portal_ruins_name"),"0%","2.5%","100%"]},data_link:{1:[!1,"wiki.html#hell-structures-vault"]},examples:[F("portal_ruins_vault")]}),En("add","progress-events","vault_find",F("wiki_events_vault_find"));{let e=Tn(a,{name:"syndicate",template:"events",label:F("wiki_events_syndicate"),paragraphs:2,break:[2],h_level:2,para_data:{1:[F("tech_shipyard",[Dn("dwarf")])],2:["5%"]},data_link:{1:["wiki.html#solar-tp_tech-shipyard"]}});Tn(a,{name:"syndicate_condition",template:"events",label:F("wiki_events_syndicate"),paragraphs:1,h_level:2,para_data:{1:[F("tech_long_range_probes")]},data_link:{1:["wiki.html#solar-tp_tech-long_range_probes"]},examples:[F("outer_syndicate",[F("civics_gov5",[F("civics_gov_name1")])])]},e),En("add","progress-events","syndicate",F("wiki_events_syndicate"))}}(a);break;case"special":!function(e){let a=En("create",e);Tn(a,{name:"special_intro",template:"events",paragraphs:3,h_level:2,para_data:{3:[F("boring")]}}),En("add","special-events","special_intro",F("wiki_menu_intro"));{let e="crystal",t=Tn(a,{name:e,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2,para_data:{2:[F("feat_friday_name")]}});Tn(a,{name:`${e}_condition`,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2},t),En("add","special-events",e,F(`wiki_events_${e}`))}{let e="valentine",t=Tn(a,{name:e,template:"events",label:F(`wiki_events_${e}`),paragraphs:3,break:[2,3],h_level:2,para_data:{2:[F("feat_love_name")]}});Tn(a,{name:`${e}_condition`,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2},t),En("add","special-events",e,F(`wiki_events_${e}`))}{let e="unlucky",t=Tn(a,{name:e,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2,para_data:{2:[F("feat_leprechaun_name")]}});Tn(a,{name:`${e}_condition`,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2},t),En("add","special-events",e,F(`wiki_events_${e}`))}{let e="fool",t=Tn(a,{name:e,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2,para_data:{2:[F("feat_fool_name")]}});Tn(a,{name:`${e}_condition`,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2},t),En("add","special-events",e,F(`wiki_events_${e}`))}{let e=on("easter");{let t="hopper",r=Tn(a,{name:t,template:"events",label:F(`wiki_events_${t}`),paragraphs:2,break:[2],h_level:2,para_data:{2:[F("feat_easter_name")]}});Tn(a,{name:`${t}_condition`,template:"events",label:F(`wiki_events_${t}`),paragraphs:2,break:[2],h_level:2,para_data:{1:[`${F(`month${e.date[0]}`)} ${e.date[1]}`]}},r),En("add","special-events",t,F(`wiki_events_${t}`))}{let r="egghunt",i=Tn(a,{name:r,template:"events",label:F(`wiki_events_${r}`),paragraphs:7,break:[2,3,4,6],h_level:2,para_data:{2:[F("feat_egghunt_name"),12,18],5:[F("trait_hyper_name"),F("trait_fast_growth_name"),F("trait_rainbow_name"),F("trait_optimistic_name")],7:[F("trait_cannibalize_name"),F("trait_rage_name"),F("trait_blood_thirst_name"),F("trait_sticky_name")]}}),s=["U2FsdGVkX1/PcdpekGFnkjSSCBa9yVo3z5xq3a2662iSlAA8yuaPEsK4Qyn5OSED","U2FsdGVkX180d8+Fl8mi96tY7KHkOWLkO0syi+BeZW47ga9AdJiBdbsksLaMTGvT","U2FsdGVkX19hHAatSiZiYe33Hx4u+bixNx4U7O4smhKVb/a+umB6MlIbgM3eE3UG","U2FsdGVkX188sIGEBwWHyzf0SkKQ027dzHZmkJp93FeXrXu70hD0KqYfoTxnbGqU","U2FsdGVkX18dLIKZyFStCpVKJrFAc36LF4uNcpuJd8CGU0yC1rPllsNfBHAhrfwT","U2FsdGVkX1/ZRiMKl3kG4PUQOx8bdgz7va6bLW3Gf5COBHAs7CMDITt7SDeIygvd","U2FsdGVkX19FZ4kZmquyj6NUTqo+AYS7U31mSik1W2Awdp5M6L1WlsG4Px8uUYUN","U2FsdGVkX1+9Eh/34O02cW0SuZg0rQYZnomSBjBQU4Q3VSU0y62ypmoJNjOb5Uix","U2FsdGVkX1+3qtRH9MVd1B8T+JP5DgnlER6u8P60vX/NVjLGuceG7DX+b2yPW3J5","U2FsdGVkX18JYj4R4QuZBpDdcsEjkYPAf3uNNIzu6Vs=","U2FsdGVkX1+Eq43UVbtPlveU6HqIU8PSHL8QH+FlUxWkhyB1S+QAVVM2z0OryeJd","U2FsdGVkX18brcDy1P4HEGkmTw5t19CgWEshDFRSByELjSG9MtvSdSBbj13JhYuG","U2FsdGVkX1/vr39YAfqKcFM7c8ed6Oi7lRrDYKDtfUJRKF3pcrIRAWc4FF/Tt5BjwaXOi0slDE9JmeIDifD2gw==","U2FsdGVkX19KtuHoWRLTz0wLH8D/fLoOriDsmk6agzT85xsAAXv26ILjSV2C8mpi","U2FsdGVkX18/Tyjq6czHYJKjJQPXcRCgqmZqu2AFmx2FddfQPzM+YkXXECLMVA+e","U2FsdGVkX19kn6Hj9vQq5JxU9dsKsu0U+qADHauwh7TPf1enfhF1VQamBs7VFuX5","U2FsdGVkX19ICmvq9eubXYyGpmRML9aqTzBZMRvvOWFMwp2IiJBUUpl4LgLJOwLqnEISPAepbrdrfJn8miQIgA==","U2FsdGVkX19P0vr33mSfkSTDVz7N3a59YF5Cc+/NMC0f1tT3fXJDLqZMi98gGOrv"],n=["U2FsdGVkX1+duY7hvIoeOGqas8WhBy8hojTLQ0OxadHBEDzOPwpc4K1Y6N+WyDah","U2FsdGVkX1+AQhvu619WY9xow4HmruRn5yJefuIkv3u7U6baVdV/mHLJfUaNmTE6","U2FsdGVkX1/whjtke2hryY9zWuV0MTzN2JKXaFyzwJXwtEx9+iLMbHkdVFwi6h63","U2FsdGVkX18FBXNUeu4NIIiy4Mmk++iyUIJKxFS/mZvAj98+eJR+SZj8xpXHTkia","U2FsdGVkX1/Imw6q6mixFM1BlgToue0NUqbCTHKuNZFHC1Vp7I934fUpj/xCFg33","U2FsdGVkX18h03LNWLTF59y343iStuLaS/0cgvLtKSMzm8UpzMVWBxwkGGSxDDPO","U2FsdGVkX18+W3R7IyisKi9TgzbkQ/636SJ7ubGsCx6Rz5GMxlTkbTVbOG6YFAC4Cle0TjI1riEzpGQtuCr6C+1mX3FdCLVz3oaGWqIajvI=","U2FsdGVkX18CjBzSHSIPZ07ZgvI6JgGiVIJE4ugYa2xWFeM1a/OnXrMT1sBpwmXwiHayBp1tdw83/4I55pGwpA==","U2FsdGVkX1+QWybO+rnrqxI23qXSKzevq0C/NPkX8/kd5h0xo20ozmxo4Pknui3G","U2FsdGVkX1//2GoF+3kVNPim1ThpVMgMCHEzSH0UZCrc4EIjktoxBC87gXddwhZR","U2FsdGVkX1/HQFE7BGTMIHN8G4pljsZlwtFaXHZh2U/VN4DD8lOL4OUYxnJUGr+g","U2FsdGVkX1/f1jFsIVKmxsXq85PuOj+fq+9WtYf1AZbPsuChio/XV6mpCxlTJz8X","U2FsdGVkX1+NRsztgBjDQeevIAYiHJ+X9dUERkDoYpLcvYAvWWzVvbjk4uq4dSMPEuykMqsZGGwvBtl1V0T+pO254xK8+5xWjZYnE9x6A+I=","U2FsdGVkX1//Crqk3ZOt8MHG/C4V91VEORQ3rQe4CEBHQhqfMD84PrEBZkwN7VpKvBgcg+2FsDknW+LDnNPIZA==","U2FsdGVkX1/bUrGTAmEkt6ukJKG8tIAIUVr4fnMFPsdamUtLJBGIG2dwQyaYywTD","U2FsdGVkX1/zl2y8RCXettY8EAPFE+cc/qImK4n5BocvEV2YvFKSyrOGxfLd3qBD","U2FsdGVkX19GszY2Yf01gUZnzs9F51vUgYu/FlRIPiFt9zasXhFP9tzX1en5/483mZeqi/uNRhV+zfoHd6qcYA==","U2FsdGVkX1+4syPwX9UT2KAsJj8uv43olf/GOTOudd/RbwnHsybitwYU4kk2ZVWx"];const c=(new Date).getFullYear(),o="egghunt";let l=`
                                    ${F("wiki_feat_egghunt_found")}
                                    `;l+='
                                    ';for(let a=1;a<=18;a++){let r=t.special.egg.hasOwnProperty(c)&&t.special.egg[c][`egg${a}`]?"has-text-success":"has-text-danger",i=t.special.egg.hasOwnProperty(c)&&t.special.egg[c][`egg${a}`]?"found":"missing",_=`${F("wiki_events_hint_avail")} ${F(`month${e.hintDate[0]}`)} ${e.hintDate[1]}`;e.hint&&(_=''+CryptoJS.AES.decrypt(s[a-1],o).toString(CryptoJS.enc.Utf8)+"");let d=`${F("wiki_events_sol_avail")} ${F(`month${e.solveDate[0]}`)} ${e.solveDate[1]}`;e.solve&&(d=`${F("wiki_events_reveal_sol")}`),l+=`
                                    ${F("wiki_feat_egghunt_num",[a])}${_}${d}
                                    `}l+="
                                    ",i.append(l),$(".eggsol").on("click",(function(){const e=$(this).attr("data-sol"),t=CryptoJS.AES.decrypt(e,o);$(this).html(t.toString(CryptoJS.enc.Utf8))})),Tn(a,{name:`${r}_condition`,template:"events",label:F(`wiki_events_${r}`),paragraphs:2,break:[2],h_level:2,para_data:{1:[`${F(`month${e.date[0]}`)} ${e.date[1]}`,`${F(`month${e.endDate[0]}`)} ${e.endDate[1]}`]}},i),En("add","special-events",r,F(`wiki_events_${r}`))}}{let e="launch_day",t=Tn(a,{name:e,template:"events",label:F(`wiki_events_${e}`),paragraphs:3,break:[2,3],h_level:2,para_data:{2:[F("feat_launch_day_name")],3:["5%"]}});Tn(a,{name:`${e}_condition`,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2},t),En("add","special-events",e,F(`wiki_events_${e}`))}{let e=t.hasOwnProperty("stats")?1e5+9e3*t.stats.reset:1e5;e>1e6&&(e=1e6);let r="solstice",i=Tn(a,{name:r,template:"events",label:F(`wiki_events_${r}`),paragraphs:4,break:[2,3,4],h_level:2,para_data:{1:[e.toLocaleString(),F(`wiki_events_${r}`)],2:[F("feat_solstice_name")]}});Tn(a,{name:`${r}_condition`,template:"events",label:F(`wiki_events_${r}`),paragraphs:2,break:[2],h_level:2},i),En("add","special-events",r,F(`wiki_events_${r}`))}{let e=t.hasOwnProperty("stats")?1e5+9e3*t.stats.reset:1e5;e>1e6&&(e=1e6);let r="firework",i=Tn(a,{name:r,template:"events",label:F(`wiki_events_${r}`),paragraphs:2,break:[2],h_level:2,para_data:{2:[F("feat_firework_name")]}});Tn(a,{name:`${r}_condition`,template:"events",label:F(`wiki_events_${r}`),paragraphs:2,break:[2],h_level:2},i),En("add","special-events",r,F(`wiki_events_${r}`))}{let e="halloween",t=Tn(a,{name:e,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2,para_data:{2:[F("feat_boo_name")]}});Tn(a,{name:`${e}_condition`,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2},t),En("add","special-events",e,F(`wiki_events_${e}`))}{let e=on("halloween"),r="trickortreat",i=Tn(a,{name:r,template:"events",label:F(`wiki_events_${r}`),paragraphs:3,break:[2,3],h_level:2,para_data:{2:[F("feat_trickortreat_name"),12]}}),s=["U2FsdGVkX1/PDiFXguD51NL4kEt4e9qRJwl5IKNCQE9vI3XAoH5gDW28r2V4O5GY","U2FsdGVkX18xhhpvSSA7YALgn1lm1e+GylSzgVdoTnLXMzPLL1knLlINAS8l5ECGfvjo6CDFYnuvqaw/8BugAw==","U2FsdGVkX18g9cYmSZKe/VjFeCjuODnwnD+i+2ShpdeMI4uIIzbllcQFIWJaQw+EvsDu5DFBNCEuFOsWRFVMyA==","U2FsdGVkX1+nD+SyHpi39fhqppxDiF+UhJh3w0dhZ4IxuC1s3h0gTrgBI7IxVLrQ","U2FsdGVkX1+OfTMTHGhIpqmihvW7fMCt0q+bLWqhd7Z0Cj31jNUqmvBcxb6HzbGc4mL/msBX6PO5zpb4pBUzwA==","U2FsdGVkX1+hC03MwAyWdqH6ODAGNbgm7CRgC+0Wfreja2JZX7oPwYhPmfQXzn1RfeIncnkRTmdXGMqQ/mq2GQ==","U2FsdGVkX18cU5HWOtwNhFSnlxBHxpu5XEJBFj3EhtzU/PLXxynq5Rq9YGl23QNr"],n=["U2FsdGVkX1/bQrTdTtuTtXbxmJvxhHdsacfjyPKgyzXzthWNTsjaxqcCKjwjqCyG","U2FsdGVkX19tP6ZlSqvfdg6qaoOceA6978unLN8j9VIm5LUJSHUZm77zK1i1rWq3","U2FsdGVkX18Ex9HXV1+h+DIdFBxpNPI4Gl0E0EwOFbpyncN5gEfS8fWURvPT11S66x4swlZjnntbhMvDG+4SWg==","U2FsdGVkX1+xyixviw9PD/sRskoRG9owodNkZlwcAMSzQXe2PdAJPLwEBV9knjgGg11ws2eEBHXj7Y5j5SS7br+Uehaaj0MViyfxYdsZOEQ=","U2FsdGVkX18+2YEr0TG80mQY483i7yOr+Qnh66mOKEviX0ElRHI9VCha9TG+no1r","U2FsdGVkX1/Vuthb9MYQT02lO0ngkSI4f1tbvrrCwtVQiUTSIaVgDHVYYcIgfSl3WfiRhwGJWeP/6w+i7FEqaA==","U2FsdGVkX1/3Zbp0Tlqh/n5TKvOJEIuaf9/DcDFlDz1s2Tb+qbUS1GmPTzpP3xLu"],c=["U2FsdGVkX18m9z0oToDhhhmI0ugH5ykCrV1z64upZad/LXRYaFAyDT+O15+BXmJUKv7yY4YiBS6SYc65LJQjwEkMY5orIcyusiXtY9xnpRY=","U2FsdGVkX18eejrZNi9yF98CBO4KWjBLzo8HTBagKST0kjPmH48UuPWKG7Y3qyfeUyAFuDBnNRgdbgXXcWVPTE+3tbqcRiqAUZF8iLhXbmY=","U2FsdGVkX1/RKcVkvhY8bsGcXAQX3xJH4Ns/tUctQzK58oI9LJBxzIDyOHlPatn49avqw8r5lEmWyJOL2wyUjUPlYR/C9CjtO8t8oBW4ymWZRi66Ia0z1tMRHZyamonp","U2FsdGVkX18fvaoGr3U+o/m+xJLnbmVKJ1/GjNERP1ZDotBG7lD7vCtB1XyrCV0CvZXI9WK3r+FLD4rc7ZsLav77MTvQY+3pmwTYB841IxkUGCRE2mQYcr01xtxOPxMBMppChSZ8KJFgzfLhxL2rog==","U2FsdGVkX18MRMhu9I4km+hryh9dnvVBSkHdUPBgyHnKLsRB8PxpcJSFNq9b0plJ","U2FsdGVkX18IDZ0hUGT3xuDSi9EVacctj7h0BThWEgzIovJAieOvqXg/0wrZWHXQvyyVMsQtOdBls2nDjryxiw==","U2FsdGVkX1891SskU89HRmZPzhBcScrDGfGpJsp8F1qgVnsuON0h6WL69wEF9/uEpRi393mOXOrubNYVFzRgjwqERT3G/f6u/4bWXGSLpS8="],o=["U2FsdGVkX19wIpvvED4RfWp5UAJfJvmnyhdkqsfr3BlVH5YEdjGNy4mcTvuvuY/92b6F3aQJHx0vunDJ64hcezPUAM5P+E/iROMQoMDCTJwwni6SRCpJggAHSOBTovW0piVAnyt6WHsjiAmVQVo8Og==","U2FsdGVkX1+bLPNq0l72utbOUTZ+JAXIUcGrrXVneoHD/GTbFy4jqDcU++SxaFih2aKODyZx3/SPbm0pd4JIQlu3xgl/demBDPj7TRbatEOM7aTBJhke5jwSYuIPTwWm8eyO0FINhZqO94pV4BFmcYv7b1lkzFgiLEOX/5kV/qE=","U2FsdGVkX1/QQZqQ4S2CvR3IQFL5D1pWbqrntie8JAuZrYUIQoke13j6xzI3A2KVG3lE+IZZo6Ktn2zKJ8diaroUUB/CIP0DvewzzbNj7XT3d9G456ELSMjjgb8pKc586Mq661bEjCqm+Tz2DoMLtnzMaVIXPhqBBFutt2U7JwERvNiwBkX2YhyOD3QO/tcPmwKzLJ+cYjIDSEHeCVl/yeistKb5pQbrmPH4wHAKbVQNaiaOvIjee0wqttzpmcnNgx4axIi2FAqPpT2s1hHAmhUmeV0HKDxYQWgfntqRhe/k4ar1vrZ2QdhLozqDe35S","U2FsdGVkX1+Z3/SLqEmoDq377QCt49UMTneD9zo6FqTfFOab0SWGG8ioBZ1z+/v422HygjnuwD341scmcTuA/4Pz9APy3FQcCqA5Fw4hDed+LvjrecqEZogyCw1WVaCItGXZW9+TXM0/y6p7VXvuyw==","U2FsdGVkX19CLOS3ivLPeqIYtjSBdW1WT4UFvJjNDto6jy9751Q73OZF2JQlhgKyayhswWuEk+JGbYwLbDbWhJgZUR/R9hYJnw8/Wcay4eM=","U2FsdGVkX19Pm5I9mqzijXCNM3dk4ut0IDPpownMePohkcfE6jsuLA0dgzv9vp5tjEVPaUD/bqMgEzsD9svhOEJd+zlslkqIsBee6EJTO/4=","U2FsdGVkX19TcqGI2bk6XYN40buKCGWH58AjMFDNE/jawAK+II3s6TvoVCcXbZsKzLF2++aeUgq6Ag+TysbSf5/T3IHeqQQnjFGIkkzlmMJH9wROKLirkPSzsw8O6J1J"];const l=(new Date).getFullYear(),_="trickortreat";let d=`
                                    ${F("wiki_feat_trick_found")}
                                    `;d+='
                                    ';for(let a=1;a<=s.length;a++){let r=t.special.trick.hasOwnProperty(l)&&t.special.trick[l][`treat${a}`]?"has-text-success":"has-text-danger",i=t.special.trick.hasOwnProperty(l)&&t.special.trick[l][`treat${a}`]?"found":"missing",c=`${F("wiki_events_hint_avail")} ${F(`month${e.hintDate[0]}`)} ${e.hintDate[1]}`;e.hint&&(c=''+CryptoJS.AES.decrypt(s[a-1],_).toString(CryptoJS.enc.Utf8)+""),d+=`
                                    ${F("wiki_feat_treat_num",[a])}${c}
                                    `;let o=`${F("wiki_events_sol_avail")} ${F(`month${e.solveDate[0]}`)} ${e.solveDate[1]}`;e.solve&&(o=`${F("wiki_events_reveal_sol")}`),d+=`
                                    ${o}
                                    `}d+="
                                    ",i.append(d);let p=`
                                    ${F("wiki_feat_treat_found")}
                                    `;p+='
                                    ';for(let a=1;a<=c.length;a++){let r=t.special.trick.hasOwnProperty(l)&&t.special.trick[l][`trick${a}`]?"has-text-success":"has-text-danger",i=t.special.trick.hasOwnProperty(l)&&t.special.trick[l][`trick${a}`]?"found":"missing",s=`${F("wiki_events_hint_avail")} ${F(`month${e.hintDate[0]}`)} ${e.hintDate[1]}`;e.hint&&(s=''+CryptoJS.AES.decrypt(c[a-1],_).toString(CryptoJS.enc.Utf8)+""),p+=`
                                    ${F("wiki_feat_trick_num",[a])}${s}
                                    `;let n=`${F("wiki_events_sol_avail")} ${F(`month${e.solveDate[0]}`)} ${e.solveDate[1]}`;e.solve&&(n=`${F("wiki_events_reveal_sol")}`),p+=`
                                    ${n}
                                    `}p+="
                                    ",i.append(p),$(".totsol").on("click",(function(){const e=$(this).attr("data-sol"),t=CryptoJS.AES.decrypt(e,_);$(this).html(t.toString(CryptoJS.enc.Utf8))})),Tn(a,{name:`${r}_condition`,template:"events",label:F(`wiki_events_${r}`),paragraphs:2,break:[2],h_level:2,para_data:{1:[`${F(`month${e.date[0]}`)} ${e.date[1]}`,`${F(`month${e.endDate[0]}`)} ${e.endDate[1]}`]}},i),En("add","special-events",r,F(`wiki_events_${r}`))}{let e="turkey",t=Tn(a,{name:e,template:"events",label:F(`wiki_events_${e}`),paragraphs:3,break:[2,3],h_level:2,para_data:{2:[F("feat_gobble_gobble_name")]}});Tn(a,{name:`${e}_condition`,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2},t),En("add","special-events",e,F(`wiki_events_${e}`))}{let e="festive",t=Tn(a,{name:e,template:"events",label:F(`wiki_events_${e}`),paragraphs:1,h_level:2});["elven","centaur","capybara","wendigo","yeti","entish"].forEach((function(a){Tn(t,{name:a,template:`events_${e}`,label:F(`wiki_events_${e}`),paragraphs:2,h_level:0,para_data:{1:[F(`race_${a}`)]}})})),Tn(a,{name:`${e}_condition`,template:"events",label:F(`wiki_events_${e}`),paragraphs:2,break:[2],h_level:2},t),En("add","special-events",e,F(`wiki_events_${e}`))}{let e="xmas",t=Tn(a,{name:e,template:"events",label:F(`wiki_events_${e}`),paragraphs:6,break:[2,3,4,5,6],h_level:2,para_data:{2:[F("feat_xmas_name")]}});Tn(a,{name:`${e}_condition`,template:"events",label:F(`wiki_events_${e}`),paragraphs:1,h_level:2},t),En("add","special-events",e,F(`wiki_events_${e}`))}}(a)}})(r),zc(a,r,i);break;case"species":"planets"===r?Nn():function(e){let a=$("#content");switch(Cs(a),e){case"races":!function(e){e=En("create",e);let a=[];Object.keys(Di).forEach((function(r){if("custom"===r&&!t.custom.hasOwnProperty("race0")||"protoplasm"===r)return;let i=$(`
                                    `);e.append(i),i.append(`

                                    ${Di[r].name}

                                    ${F(`genelab_genus_${Di[r].type}`)}
                                    `),i.append(`
                                    ${"string"==typeof Di[r].desc?Di[r].desc:Di[r].desc()}
                                    `);let s=[],n=function(e){const t=new Date;let a=ln();switch(e){case"wolven":return a.active?[{t:"hyper",r:1},{t:"fast_growth",r:1},{t:"rainbow",r:1},{t:"optimistic",r:1}]:[];case"vulpine":return a.active?[{t:"cannibalize",r:1},{t:"rage",r:1},{t:"blood_thirst",r:1},{t:"sticky",r:1}]:[];case"elven":return 11===t.getMonth()&&t.getDate()>=17?[{t:"slaver",r:2},{t:"resourceful",r:.5},{t:"small",r:.25}]:[];case"capybara":return 11===t.getMonth()&&t.getDate()>=17?[{t:"beast_of_burden",r:1},{t:"pack_rat",r:.5},{t:"musical",r:.25}]:[];case"centaur":return 11===t.getMonth()&&t.getDate()>=17?[{t:"beast_of_burden",r:1},{t:"curious",r:.5},{t:"blissful",r:.25}]:[];case"wendigo":return 11===t.getMonth()&&t.getDate()>=17?[{t:"immoral",r:3},{t:"cannibalize",r:.5},{t:"claws",r:.25}]:[];case"yeti":return 11===t.getMonth()&&t.getDate()>=17?[{t:"scavenger",r:3},{t:"regenerative",r:.5},{t:"musical",r:.25}]:[];case"entish":return 11===t.getMonth()&&t.getDate()>=17?[{t:"photosynth",r:3},{t:"optimistic",r:.5},{t:"armored",r:.25}]:[];default:return[]}}(r),c=$('
                                    ');Object.keys(Ei[Di[r].type]).sort().forEach((function(e){let t=`raceTrait${r}${e}`,a=Di[r].fanaticism===e?"danger":"caution";c.append(`${Ki[e].name}`),s.push({t:e,r:1})})),Object.keys(Di[r].traits).sort().forEach((function(e){let t=`raceTrait${r}${e}`,a=Di[r].fanaticism===e?"danger":"info";c.append(`${Ki[e].name}`),s.push({t:e,r:Di[r].traits[e]})}));for(let e=0;e${Ki[n[e].t].name}`),s.push(n[e])}i.append(c),a.push(r),_s(`genus${r}`,$(`
                                    ${F(`genelab_genus_${Di[r].type}_desc`)}
                                    `),{wide:!0,classes:"w25"});for(let e=0;e");fn(a,s[e].t,{fanatic:s[e].t===Di[r].fanaticism&&Di[r].name,trank:s[e].r,wiki:!0}),_s(t,a,{wide:!0,classes:"w25"})}})),a.sort(((e,t)=>Di[e].namers("name",e).localeCompare(rs("name",t)))).forEach((function(r){if(t[a].includes(Ki[r].type)){let t=$(`
                                    `);e.append(t),fn(t,r,{tpage:!0,wiki:!0}),En("add","traits-species",`${Ki[r].type}_${r}`,rs("name",r))}}))}(a);break;case"custom":!function(e){Tn(e,{name:"custom",template:"mechanics",label:F("wiki_mechanics_custom"),paragraphs:12,break:[3,5,9,11],full:!0,h_level:2,para_data:{1:[F("wiki_resets_ascension")],2:[F("wiki_resets_ascension")],5:[F("resource_Genes_name")],6:[F("resource_Genes_name")],7:[2],8:[F("achieve_technophobe_name"),5,7],9:[F("tech_fanaticism"),F("tech_deify")],11:[0,F("resource_Genes_name")],12:[F("resource_Genes_name"),F("trait_untapped_name")]},data_link:{1:["wiki.html#resets-prestige-ascension"],2:["wiki.html#resets-prestige-ascension"],8:["wiki.html#perks-prestige-technophobe"],9:[t.genes.transcendence?"wiki.html#civilized-tech-alt_fanaticism":"wiki.html#civilized-tech-fanaticism","wiki.html#early_space-tech-deify"]}});let a=$('
                                    ');e.append(a),Jt(a)}(a)}}(r),zc(a,r,i);break;case"structures":Vn(r,"standard"),zc(a,r,i);break;case"tech":dc(r,"standard"),zc(a,r,i);break;case"tp_structures":Vn(r,"truepath"),zc(a,r,i);break;case"tp_tech":dc(r,"truepath"),zc(a,r,i);break;case"arpa":!function(e){let a=$("#content");switch(Cs(a),e){case"projects":!function(e){e.append(`
                                    ${F("wiki_arpa_projects")}
                                    `);let a=$("
                                    "),r=En("create",a);e.append(a),Object.keys(Pe).forEach((function(e){let a=$(`
                                    `);r.append(a),function(e,a){let r="string"==typeof Pe[a].title?Pe[a].title:Pe[a].title(!0);e.append(`

                                    ${r}

                                    `);let i=$('
                                    ');if(e.append(i),i.append(`
                                    ${"string"==typeof Pe[a].desc?Pe[a].desc:Pe[a].desc()}
                                    `),i.append(`
                                    ${"string"==typeof Pe[a].effect?Pe[a].effect:Pe[a].effect()}
                                    `),Mc[a]){let t=$("
                                    ");e.append(t),function(e,t){let a=$('
                                    ');if(e.append(a),Mc.hasOwnProperty(t))for(let e=0;e${Mc[t][e]}`)}(t,a)}!function(e,a){let r={owned:0,creepVis:!0,extra:{creative:!1}},i={};switch(a){case"monument":r.extra.m_type="Obelisk";break;case"launch_facility":r.creepVis=!1}let s=Pe[a];r.real_owned=t.arpa[a]?t.arpa[a].rank:0;let n=$('
                                    ');e.append(n);let c=$(`

                                    ${F("wiki_calc_cost")}

                                    `),o=$(`

                                    ${F("wiki_calc_cost_creep")}

                                    `);n.append(c),n.append(o);let l=s.cost;Object.keys(Ie(l)).forEach((function(e){i[e]={};let a="Money"===e?"$":t.resource[e].name+": ";c.append($(`
                                    ${a}{{ r.${e}.cost }}
                                    `)),o.append($(`
                                    {{ r.${e}.creep }}
                                    `))}));let _=function(){let e=Ie(l,r.owned-r.real_owned,r.extra);Object.keys(i).forEach((function(t){let a=e[t]?e[t](r.owned-r.real_owned,r.extra):0;i[t].vis=a>0,i[t].cost=q(a,1)}))};_();let d=function(){if("launch_facility"!==a){let e=Ie(l,100,r.extra),t=Ie(l,99,r.extra);Object.keys(i).forEach((function(a){e[a]&&(i[a].creep=+(e[a](100,r.extra)/t[a](99,r.extra)).toFixed(4))}))}};d();let p='\n
                                    \n
                                    ';"launch_facility"!==a&&(p+=`\n
                                    ${F("wiki_calc_level")} -+
                                    `),"monument"===a&&(p+=`\n
                                    ${F("wiki_calc_m_type")} \n \n {{ 'Obelisk' | monumentLabel }}\n {{ 'Statue' | monumentLabel }}\n {{ 'Sculpture' | monumentLabel }}\n {{ 'Monolith' | monumentLabel }}\n {{ 'Pillar' | monumentLabel }}\n {{ 'Megalith' | monumentLabel }}\n
                                    \n `),p+=`\n
                                    ${F("trait_creative_name")}
                                    \n
                                    \n
                                    \n \n
                                    \n
                                    \n `,e.append($(p)),zs({el:`#${a}`,data:{i:r,r:i},methods:{val(e){r[e]=Math.round(r[e]),r[e]&&r[e]<0&&(r[e]=0),_()},less(e){r[e]>0&&r[e]--},more(e){r[e]++},pickMonument(e){r.extra.m_type=e,_(),d()},update(){_(),d()},importInputs(){"launch_facility"!==a&&(r.owned=r.real_owned),r.extra.creative=!!t.race.creative,"monument"===a&&t.arpa.m_type&&(r.extra.m_type=t.arpa.m_type)}},filters:{monumentLabel(e){switch(e){case"Obelisk":return F("arpa_project_monument_obelisk");case"Statue":return F("arpa_project_monument_statue");case"Sculpture":return F("arpa_project_monument_sculpture");case"Monolith":return F("arpa_project_monument_monolith");case"Pillar":return F("arpa_project_monument_pillar");case"Megalith":return F("arpa_project_monument_megalith")}}}})}(e,a)}(a,e),En("add","projects-arpa",e,"string"==typeof Pe[e].title?Pe[e].title:Pe[e].title(!0))}))}(a);break;case"genetics":break;case"crispr":xc(a);break;case"blood":jc(a)}}(r),zc(a,r,i);break;case"achievements":"tracker"===r||pc(r),zc(a,r,i);break;case"changelog":!function(){let e=$("#content");Cs(e);for(let t=0;t');e.append(a);let r=Sc[t].hasOwnProperty("revision")?Sc[t].revision:"";a.append(`

                                    v${Sc[t].version}${r}

                                    ${Sc[t].date}
                                    `);for(let e=0;e${Sc[t].changes[e]}`)}}(),window.location.hash=`#${a}`}}function zc(e,t,a){void 0===a?window.location.hash=`#${t}-${e}`:(window.location.hash=`#${t}-${e}-${a}`,setTimeout((function(){document.getElementById(a).scrollIntoView({block:"start",behavior:"smooth"})}),125))}function Fc(e,t,a){let r=!!window.location.hash&&window.location.hash.substring(1).split("-"),i="";for(let s=0;s1&&r[1]===e[s].key?' :active="true" expanded':""}>`,i+=Fc(e[s].submenu,!1,e[s].key),i+="";else{let n=!r&&t&&0===s||r&&r[0]===e[s].key?' :active="true"':"",c=a?`'${a}','${e[s].key}'`:`'${e[s].key}',false`;i+=``}return i}function Ac(){let e=$("#content");Cs(e);let a=`${["Beorseder","Rodrigodd","Volch"].join(', ').replace(/, ([^,]*)$/,", & $1")}`,r=t.beta?`beta v${t.version}.${t.beta}`:"v"+t.version;e.append(`
                                    ${F("wiki_main_title")} - ${r}
                                    `),e.append(`
                                    ${F("wiki_main_author",["Demagorddon"])}
                                    `),e.append(`
                                    ${F("wiki_main_spoiler")}
                                    `),e.append(`
                                    ${F("wiki_main_blurb")}
                                    `),e.append(`
                                    ${F("wiki_main_contribution",[a])}
                                    `),e.append(`
                                    ${F("wiki_resources")}
                                    `);let i=$('
                                      ');e.append(i),i.append(`
                                    • ${F("wiki_resources_begin_guide")} ${F("wiki_resources_by",["GreyCat"])}
                                    • `),i.append(`
                                    • ${F("wiki_resources_tracker")} ${F("wiki_resources_by",["Karsen777"])}
                                    • `)}$("body").empty(),function(){$("body").append($(`

                                      ${F("wiki_menu_evolve")}

                                      `));let e=$('
                                      ');$("body").append(e);let t=$('');e.append(t);let a=`",t.append(a),zs({el:"#menu",data:{},methods:{loadPage(e,t){Cc(e,t)}}});let r=$('
                                      ');if(e.append(r),window.location.hash){let e=window.location.hash.substring(1).split("-");e.length>1?e.length>2?Cc(e[1],e[0],e[2]):Cc(e[1],e[0]):Cc(e[0])}else Ac()}()})(); \ No newline at end of file