');e.append(i);{t.race.governor.config.hasOwnProperty("storage")||(t.race.governor.config.storage={crt:1e3,cnt:1e3});let e=$(`
`);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=$(`
`);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=$(`
`);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=$(`
`);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=$(`
`);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=$(`
`);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=$(`
`);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($(``;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(`
`):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(`
`);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 \n ${z(`outer_shipyard_${e}`)}: {{ b.${e} | lbl('${e}') }} \n ${t}\n `)}));let c=$('
');c.append(`
${z("outer_shipyard_build")} `),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 \n ${c} \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 {{ \'city\' | label }} \n {{ \'city\' | label }} \n \n \n \n \n {{ \'local_space\' | label }} \n {{ \'local_space\' | label }} \n \n \n \n \n {{ \'tab_interstellar\' | label }} \n {{ \'tab_interstellar\' | label }} \n \n \n \n \n {{ \'tab_galactic\' | label }} \n {{ \'tab_galactic\' | label }} \n \n \n \n \n {{ \'tab_portal\' | label }} \n {{ \'tab_portal\' | label }} \n \n \n \n \n {{ \'outer_local_space\' | label }} \n {{ \'outer_local_space\' | label }} \n \n \n \n \n {{ \'tab_tauceti\' | label }} \n {{ \'tab_tauceti\' | label }} \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 {{ \'tab_gov\' | label }} \n {{ \'tab_gov\' | label }} \n \n \n \n \n {{ \'tab_industry\' | label }} \n {{ \'tab_industry\' | label }} \n \n \n \n \n {{ \'tab_power_grid\' | label }} \n {{ \'tab_power_grid\' | label }} \n \n \n \n \n {{ \'tab_military\' | label }} \n {{ \'tab_military\' | label }} \n \n \n \n \n {{ \'tab_mech\' | label }} \n {{ \'tab_mech\' | label }} \n \n \n \n \n {{ \'tab_shipyard\' | label }} \n {{ \'tab_shipyard\' | label }} \n \n \n \n \n {{ \'tab_psychic\' | label }} \n {{ \'tab_psychic\' | label }} \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 {{ \'new_sr\' | label }} \n {{ \'new\' | label }} \n \n \n \n \n {{ \'old_sr\' | label }} \n {{ \'old\' | label }} \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 {{ \'tab_market\' | label }}\n \n \n \n \n {{ \'tab_storage\' | label }}\n \n \n \n \n {{ \'tab_ejector\' | label }}\n \n \n \n \n {{ \'tab_cargo\' | label }}\n \n \n \n \n {{ \'tab_alchemy\' | label }}\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 {{ \'tab_stats\' | label }}\n \n \n \n \n {{ \'tab_achieve\' | label }}\n \n \n \n \n {{ \'tab_perks\' | label }}\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")} `,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=`
`);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?`
${r}`},support:()=>-1,powered:()=>nc(1),action(){return!!Cs($(this)[0])&&(Dt("observatory"),t.space.moon_base.support