From c0d48a87e7b1176b69d501b583feead18b357c36 Mon Sep 17 00:00:00 2001 From: Blank <okp57855@psoxs.com> Date: Sat, 9 Feb 2019 06:00:05 -0800 Subject: [PATCH] Bugfixes+tweaking (Ready to merge) --- devTools/PreCompile.sh | 14 +- src/SecExp/attackGenerator.tw | 153 ++-- src/SpecialForce/CheatEdit.tw | 3 +- src/SpecialForce/Firebase.tw | 12 +- src/SpecialForce/SpecialForce.js | 1112 ++++++++++++++--------------- src/SpecialForce/Upgrades.tw | 135 ++-- src/SpecialForce/WeeklyChoices.tw | 4 +- src/js/economyJS.js | 2 +- src/uncategorized/costsReport.tw | 2 +- 9 files changed, 647 insertions(+), 790 deletions(-) diff --git a/devTools/PreCompile.sh b/devTools/PreCompile.sh index c41e7a442c2..b6dad7de5c3 100755 --- a/devTools/PreCompile.sh +++ b/devTools/PreCompile.sh @@ -1,8 +1,8 @@ -#!/bin/sh -x='bin/*.*' V=00 #Additional packages required: MEGAcmd,minify,git. U=$1 P=$2 scrtDir=$3 remtDir=$4 locDir=$5 repo=$6 -echo "Fresh clone? 0:y 1:n 2:na" && read Opt;clear;mega-login $U $P >/dev/null -while true;do ls $5 >/dev/null 2>&1 && if [[ $? == 0 ]];then cd $5 >/dev/null 2>&1;fi - if [[ $Opt == 0 ]];then mkdir $5 && git clone -q --no-tags --depth 1 $6 $5 && cd $5 && if [ `git log -1|grep commit|cut -c 8-13` != $V ];then sed -Ei "s/V=$V/V=$(git log -1|grep commit|cut -c 8-13)/" $3/$0 && gen=1;fi - elif [[ $Opt > 0||$gen < 1 ]];then git fetch -q && if [ `git rev-list HEAD...origin/pregmod-master --count` -gt 0 ];then git reset -q --hard $V && git pull -q && sed -Ei "s/V=$V/V=$(git log -1|grep commit|cut -c 8-13)/" $3/$0 && gen=1;fi ;fi #sources: stackoverflow.com/a/17192101,stackoverflow.com/a/3675181. - if [[ $Opt > 1||$gen > 0 ]];then rm $x 2>/dev/null;minify -rao $5 $5 && ./compile --insane 1>/dev/null && minify -o $x $x && mv $x bin/"FC-pregmod-$(git log -1 --format='%cd' --date='format:%d-%m-%Y-%H-%M')-$(git log -1|grep commit|cut -c 8-13)".html && mega-put -c $x $4 && if [[ `mega-ls GitFC/|wc -l` -gt 10 && $y < 1 ]];then mega-ls $4|tail -n +11|while read link;do mega-rm $4$link && y=1;done;fi; fi +#!/bin/sh +x=bin/* #Packages required: MEGAcmd,minify,git. U=$1 P=$2 remtDir=$3 locDir=$4 repo=$5 +echo 'New clone? 0:y 1:n 2:na';read Opt;clear;mega-login $U $P >/dev/null +while true;do cd $4 2>/dev/null && if [ $? -eq 0 ];then cd $4;fi + if [ $Opt -eq 0 ];then A=[$(mega-ls $3/|cut -c 29-|sed s/.html//|paste -sd,"")];mkdir -p $4 && git clone -q --no-tags --depth 1 $5 $4 && cd $4 && V=$(git log -1|grep comm|cut -c 8-11);if [[ ! " ${A[@]} " =~ " ${V} " ]];then gen=1;fi #arraryCheck:stackoverflow.com/a/15394738 + elif [[ $Opt > 0||$gen < 1 ]];then git fetch -q;if [ `git rev-list HEAD...origin/pregmod-master --count` -gt 0 ];then git reset -q --hard HEAD && git pull -q && gen=1;fi ;fi #gitCheck:stackoverflow.com/a/17192101 + if [[ $Opt > 1||$gen > 0 ]];then rm $x 2>/dev/null;minify -rao $4 $4 && ./compile --insane >/dev/null && mv $x bin/FC-pregmod-$(git log -1 --format='%cd' --date='format:%d-%m-%Y-%H-%M')-$(git log -1|grep comm|cut -c 8-11).html && mega-put -c $x $3 && if [ `mega-ls $3|wc -l` -gt 10 ];then mega-rm $3$(mega-ls $3|sort -r|tail -n +11);fi ; fi gen=0;Opt=-1;sleep 15m;done \ No newline at end of file diff --git a/src/SecExp/attackGenerator.tw b/src/SecExp/attackGenerator.tw index 65fa49c2d45..94776671c3f 100644 --- a/src/SecExp/attackGenerator.tw +++ b/src/SecExp/attackGenerator.tw @@ -128,95 +128,50 @@ <<set $battleTerrain = "error">> <</if>> - <<if $attackType == "raiders">> - <<set $attackTroops = random(40,80)>> - <<if $week < 30>> - <<set $attackTroops *= Math.ceil(random( (1*(.15+($week/203))), (2*(1+($week/149))) ))>> - <<elseif $week < 60>> - <<set $attackTroops *= Math.ceil(random( (1*(1.25+($week/135))), (3*(1.5+($week/99))) ))>> - <<elseif $week < 90>> - <<set $attackTroops *= Math.ceil(random( (2*(1.35+($week/90))), (3*(2+($week/66))) ))>> - <<elseif $week < 120>> - <<set $attackTroops *= Math.ceil(random( (2*(1.5+($week/60))), (4*(3+($week/45))) ))>> - <<else>> - <<set $attackTroops *= Math.ceil(random( (3*(2+($week/40))), (5*(4+($week/30))) ))>> - <</if>> - <<if $week < 60>> - <<set $attackEquip = Math.ceil(random( (0, (1*(4+($week/99))>> - <<elseif $week < 90>> - <<set $attackEquip = Math.ceil(random( (0, (2*(4+($week/66))) ))>> - <<elseif $week < 120>> - <<set $attackEquip = Math.ceil(random( (0, (3*(3+($week/45))) ))>> - <<else>> - <<set $attackEquip = Math.ceil(random( (1*(2+($week/40))), (3*(4+($week/30))) ))>> - <</if>> - <<elseif $attackType == "free city">> - <<set $attackTroops = random(20,40)>> - <<if $week < 30>> - <<set $attackTroops *= Math.ceil(random( (1*(.15+($week/203))), (2*(1+($week/149))) ))>> - <<elseif $week < 60>> - <<set $attackTroops *= Math.ceil(random( (1*(1.25+($week/135))), (3*(1.5+($week/99))) ))>> - <<elseif $week < 90>> - <<set $attackTroops *= Math.ceil(random( (2*(1.35+($week/90))), (3*(2+($week/66)))) )>> - <<elseif $week < 120>> - <<set $attackTroops *= Math.ceil(random( (2*(1.5+($week/60))), (4*(3+($week/45)))) )>> - <<else>> - <<set $attackTroops *= Math.ceil(random( (3*(2+($week/40))), (5*(4+($week/30))) ))>> - <</if>> - <<if $week < 60>> - <<set $attackEquip = Math.ceil(random( (0, (1*(1.5+($week/99))) ))>> - <<elseif $week < 90>> - <<set $attackEquip = Math.ceil(random( (0, (3*(2+($week/66))) ))>> - <<elseif $week < 120>> - <<set $attackEquip = Math.ceil(random( (1*(1+($week/60))), (3*(3+($week/45))) ))>> - <<else>> - <<set $attackEquip = Math.ceil(random( (2*(2+($week/40))), (4*(4+($week/30))) ))>> - <</if>> - <<elseif $attackType == "old world">> - <<set $attackTroops = random(25,50)>> - <<if $week < 30>> - <<set $attackTroops *= Math.ceil(random( (1*(.15+($week/203))), (2*(1+($week/149))) ))>> - <<elseif $week < 60>> - <<set $attackTroops *= Math.ceil(random( (1*(1.25+($week/135))), (3*(1.5+($week/99))) ))>> - <<elseif $week < 90>> - <<set $attackTroops *= Math.ceil(random( (2*(1.35+($week/90))), (3*(2+($week/66))) ))>> - <<elseif $week < 120>> - <<set $attackTroops *= Math.ceil(random( (2*(1.5+($week/60))), (4*(3+($week/45))) ))>> - <<else>> - <<set $attackTroops *= Math.ceil(random( (3*(2+($week/40))), (5*(4+($week/30))) ))>> - <</if>> - <<if $week < 60>> - <<set $attackEquip = Math.ceil(random( (0, (1*(1.5+($week/99))) ))>> - <<elseif $week < 90>> - <<set $attackEquip = Math.ceil(random( (0, (3*(2+($week/66))) ))>> - <<elseif $week < 120>> - <<set $attackEquip = Math.ceil(random( (1,3*(3+($week/45))) ))>> - <<else>> - <<set $attackEquip = Math.ceil(random( (2*(2+($week/40))), (4*(4+($week/30))) ))>> - <</if>> + <<set _L0=3,_L1=45>> + <<if $attackType == "raiders">> <<set $attackTroops = random(40,80)>> + <<elseif $attackType == "free city">> <<set $attackTroops = random(20,40)>> + <<elseif $attackType == "old world">> <<set $attackTroops = random(25,50)>> <<elseif $attackType == "freedom fighters">> - <<set $attackTroops = random(30,60)>> - <<if $week < 30>> - <<set $attackTroops *= Math.ceil(random( (1*(.15+($week/203))), (2*(1+($week/149))) ))>> - <<elseif $week < 60>> - <<set $attackTroops *= Math.ceil(random( (1*(1.25+($week/135))), (3*(1.5+($week/99))) ))>> - <<elseif $week < 90>> - <<set $attackTroops *= Math.ceil(random( (2*(1.35+($week/90))), (3*(2+($week/66))) ))>> - <<elseif $week < 120>> - <<set $attackTroops *= Math.ceil(random( (2*(1.5+($week/60))), (4*(3+($week/45))) ))>> - <<else>> - <<set $attackTroops *= Math.ceil(random( (3*(2+($week/40))), (5*(4+($week/30))) ))>> - <</if>> - <<if $week < 60>> - <<set $attackEquip = Math.ceil(random( (0, (1*(1.5+($week/99))) ))>> - <<elseif $week < 90>> - <<set $attackEquip = Math.ceil(random( (0, (3*(2+($week/66))) ))>> - <<elseif $week < 120>> - <<set $attackEquip = Math.ceil(random( (1*(1+($week/60))), (3*(3+($week/45))) ))>> - <<else>> - <<set $attackEquip = Math.ceil(random( (2*(2+($week/40))), (4*(4+($week/30))) ))>> + <<set $attackTroops = random(30,60),_L0=1,_L1=60>> + <</if>> + <<if $week < 30>> + <<set $attackTroops *= Math.ceil(random( (1*(1.15+($week/203))), (2*(1+($week/149))) ))>> + <<elseif $week < 60>> + <<set $attackTroops *= Math.ceil(random( (1*(1.25+($week/135))), (3*(1.5+($week/99))) ))>> + <<elseif $week < 90>> + <<set $attackTroops *= Math.ceil(random( (2*(1.35+($week/90))), (3*(2+($week/66))) ))>> + <<elseif $week < 120>> + <<set $attackTroops *= Math.ceil(random( (2*(1.5+($week/60))), (4*(3+($week/45))) ))>> + <<else>> + <<set $attackTroops *= Math.ceil(random( (3*(2+($week/40))), (5*(4+($week/30))) ))>> + <</if>> + <<if $week < 60>> + <<set $attackEquip = Math.ceil(random( (0, (1*(1.5+($week/99))) ))>> + <<elseif $week < 90>> + <<set $attackEquip = Math.ceil(random( (0, (3*(2+($week/66))) ))>> + <<elseif $week < 120>> + <<set $attackEquip = Math.ceil(random( (0, (_L0*(_L0+($week/_L1))) ))>> + <<else>> + <<set $attackEquip = Math.ceil(random( (2*(2+($week/40))), (4*(4+($week/30))) ))>> + <</if>> + + /* major battles have a 50% chance of firing after week 120 */ + <<if $majorBattlesEnabled == 1>> + <<if ($week >= 120 && $attackType != "none") || ($forceMajorBattle == 1 && $foughtThisWeek == 0)>> + <<if random(1,100) >= 50 || $forceMajorBattle == 1>> + <<set $majorBattle = 1>> + <<if $SF.Toggle && $SF.Active >= 1>> + <<set $attackTroops = Math.trunc($attackTroops * random(4,6) * $majorBattleMult)>> + <<set $attackEquip = either(3,4)>> + <<else>> + <<set $attackTroops = Math.trunc($attackTroops * random(2,3) * $majorBattleMult)>> + <<set $attackEquip = either(2,3,4)>> + <</if>> + <</if>> <</if>> <</if>> + <<set $estimatedMen = Math.round($attackTroops * (1 + either(-1,1) * (random(3,4) - $recon) * 0.1))>> <<if $recon == 3>> <<set $expectedEquip = $attackEquip + random(-1,1)>> @@ -227,30 +182,4 @@ <<else>> <<set $expectedEquip = $attackEquip + random(-2,3)>> <</if>> -<</if>> - -/* major battles have a 50% chance of firing after week 120 */ -<<if $majorBattlesEnabled == 1>> - <<if ($week >= 120 && $attackType != "none") || ($forceMajorBattle == 1 && $foughtThisWeek == 0)>> - <<if random(1,100) >= 50 || $forceMajorBattle == 1>> - <<set $majorBattle = 1>> - <<if $SF.Toggle && $SF.Active >= 1>> - <<set $attackTroops = Math.trunc($attackTroops * random(4,6) * $majorBattleMult)>> - <<set $attackEquip = either(3,4)>> - <<else>> - <<set $attackTroops = Math.trunc($attackTroops * random(2,3) * $majorBattleMult)>> - <<set $attackEquip = either(2,3,4)>> - <</if>> - <<set $estimatedMen = Math.round($attackTroops * (1 + either(-1,1) * (random(3,4) - $recon) * 0.1))>> - <<if $recon == 3>> - <<set $expectedEquip = $attackEquip + random(-1,1)>> - <<elseif $recon == 2>> - <<set $expectedEquip = $attackEquip + random(-1,2)>> - <<elseif $recon == 1>> - <<set $expectedEquip = $attackEquip + random(-2,2)>> - <<else>> - <<set $expectedEquip = $attackEquip + random(-2,3)>> - <</if>> - <</if>> - <</if>> <</if>> \ No newline at end of file diff --git a/src/SpecialForce/CheatEdit.tw b/src/SpecialForce/CheatEdit.tw index d5800174214..bace689fa7b 100644 --- a/src/SpecialForce/CheatEdit.tw +++ b/src/SpecialForce/CheatEdit.tw @@ -1,7 +1,6 @@ :: CheatEdit [nobr] <<set $nextButton = "Back to $SF.Lower's Firebase", $nextLink = "Firebase", $returnTo = "Firebase">> -<<= Count()>>__Upgrades__: $SF.Size/_max -<<if $SF.Size >= 30>><<set _T1 = 1>><<else>><<set _T1 = 0>><</if>> +<<= Count()>>__Upgrades__: $SF.Size/_max(<<print ($SF.Size/_max).toFixed(2)>>%) <br><br>''Firebase:'' <<textbox "$SF.Squad.Firebase" $SF.Squad.Firebase "CheatEdit">>/_FU <br>''Armory:'' <<textbox "$SF.Squad.Armoury" $SF.Squad.Armoury "CheatEdit">>/_AU <br>''Drug Lab:'' <<textbox "$SF.Squad.Drugs" $SF.Squad.Drugs "CheatEdit">>/_DrugsU diff --git a/src/SpecialForce/Firebase.tw b/src/SpecialForce/Firebase.tw index 69753acb2ab..3666ca8814e 100644 --- a/src/SpecialForce/Firebase.tw +++ b/src/SpecialForce/Firebase.tw @@ -29,7 +29,7 @@ <<print Interactions()>> <<include "WC">> - <<if ndef $SF.MercCon.View && ($SF.Colonel.Fun + $SF.Colonel.Talk < 1)>> <<= MercCon()>> + <<if ndef $SF.MercCon.View && ($SF.Colonel.Fun + $SF.Colonel.Talk < 1)>> <br><br>Her expression changes as something jogs her memory. "Before we begin <<if $SF.Colonel.Core == "brazen">><<= properTitle()>><<else>>boss<</if>>, back when I was a merc me and a couple of my old friends would have a meetup every several months. Drinking, fucking, drugs... a little poker. It eventually grew into a whole thing, and now we bring our latest and greatest toys to show off, maybe make some money off selling the schematics. I'd like to continue going, for old times' sake." <br>[[Grant leave|Firebase][$SF.MercCon.CanAttend = 1,$SF.MercCon.View = 1]] <br>[[Request she remain on base|Firebase][$SF.MercCon.CanAttend = -2,$SF.MercCon.View = 0]]<br> @@ -39,14 +39,14 @@ <<if ((Math.trunc($week/24) === ($week/24)) && $SF.MercCon.CanAttend === -1)>> <br><br>Her expression changes as something jogs her memory. "Before we begin <<if $SF.Colonel.Core == "brazen">><<= properTitle()>><<else>>boss<</if>>, that biannual merc meetup has come around again. You've already gave me leave to attend, but I just wanted to be sure I'm still clear to go." <br>[[Grant leave.|Firebase][$SF.MercCon.CanAttend = 1]] - <br>[[Request she remain on site.|Firebase][$SF.MercCon.CanAttend = -1]]<br> + <br>[[Request she remain on site.|Firebase][$SF.MercCon.CanAttend = -1]] <</if>> - <br>While at the recent merc meetup, The Colonel made @@.yellowgreen;<<print cashFormat(Math.ceil($SF.MercCon.Income))>>@@ selling generic schematics to her friends, <<print commaNum($SF.MercCon.Menials)>> menial slaves were won in a poker game, and <<print commaNum($SF.MercCon.TotalMercs)>> mercenaries were persuaded to join $SF.Lower. + <br><br>While at the recent merc meetup, The Colonel made @@.yellowgreen;<<print cashFormat(Math.ceil($SF.MercCon.Income))>>@@ selling generic schematics to her friends, <<print commaNum($SF.MercCon.Menials)>> menial slaves were won in a poker game, and <<print commaNum($SF.MercCon.TotalMercs)>> mercenaries were persuaded to join $SF.Lower. <br>Total earnings thus far: @@.yellowgreen;<<print cashFormat(Math.ceil($SF.MercCon.Revenue))>>@@ in income, <<print commaNum($SF.MercCon.TotalMenials)>> menial slaves and <<print commaNum($SF.MercCon.Mercs)>> mercenaries joined across $SF.MercCon.History meetups. <</if>> - <<if $SF.UC.Lock < 1>> - <br><<switch $SF.UC.Assign>> + <<if $SF.UC.Lock < 1>> <br> + <<switch $SF.UC.Assign>> <<case 0>> <br>No soldiers are working undercover. [[Full time assignment|Firebase][$SF.UC.Lock = 1]] <br>[[Reassign soldiers|Firebase][$SF.UC.Assign = -1]] @@ -68,7 +68,7 @@ <<if $SF.Squad.Firebase > 5 && $secExp > 0 && $SFSupportLevel >= 4 && $maxUnits === 16 && $readiness <= 10>> <br><br>[[Provide the security force with their own section.|Firebase][$maxUnits += 4,$readiness = 10,cashX(forceNeg(Math.ceil((750000*(1.15+($SF.Size/1000))*(1.15+($SF.Squad.Firebase/10)))*_Env)), "capEx")]] - @@.yellowgreen;<<print cashFormat(Math.ceil((750000*(1.15+($SF.Size/1000))*(1.15+($SF.Squad.Firebase/10)))*_Env))>>@@ + @@.red;<<print cashFormat(Math.ceil((750000*(1.15+($SF.Size/1000))*(1.15+($SF.Squad.Firebase/10)))*_Env))>>@@ <</if>> <br>[[Tour the firebase|Firebase][$Tour = 1]] <<else>> <<= FlavourText()>> <br>[[Return to Operations|Firebase][$Tour=0]] <</if>> \ No newline at end of file diff --git a/src/SpecialForce/SpecialForce.js b/src/SpecialForce/SpecialForce.js index 311f2994099..546df2b6ae1 100644 --- a/src/SpecialForce/SpecialForce.js +++ b/src/SpecialForce/SpecialForce.js @@ -1,44 +1,7 @@ //V=SugarCube.State.variables, T=SugarCube.State.temporary; -window.SFNameCapsCheck = function() { - const V=State.variables; - if (V.SF.Lower != "the special force") V.SF.Caps=V.SF.Lower.replace("the ", "The "); -}; - -window.SFC = function() { - const V=State.variables; - if (V.SF.MercCon.CanAttend === -1) {return `The Colonel`;} - else { - if (V.SF.Facility.LCActive > 0) {return `Lieutenant Colonel ${SlaveFullName(V.SF.Facility.LC)}`;} - else {return `a designated soldier`;}} -}; - -window.SFCR = function() { - const V=State.variables, C=V.SF.Colonel; - if (C.Status <= 19) {return `boss`;} - else if (C.Status <= 39) {return `friend`;} - else {return `fuckbuddy`;} -}; - -window.TroopDec = function() { - const V=State.variables, common=`the ${commaNum(V.SF.Squad.Troops)} members of ${V.SF.Lower}`, S=V.SF.Squad; - if (S.Troops < 100) {return `sparsely occupied, ${common} residing within them concentrating together in a corner. The hundreds of empty beds and lockers visibly herald the future`;} - else if (S.Troops < 400) {return `lightly occupied, with ${common} starting to spread out across them`;} - else if (S.Troops < 800) {return `moderately occupied, though ${common} residing within have a considerable amount of extra room`;} - else if (S.Troops < 1500) {return `well-occupied, and ${common} residing within have started to form small cliques based on section and row`;} - else {return `near capacity, and ${common} often barter their personal loot, whether it be monetary or human, for the choicest bunks`;} -}; - -window.SFUpgradeCost = function(cost,unit) { - const V=State.variables,T=State.temporary,S=V.SF.Squad; var value=0; - //return Math.ceil(cost*T.Env*(1.15+(V.SF.Size/10))*(1.15+(unit/100))*HSM()); - value=cost*T.Env*(1.15+(V.SF.Size/10))*(1.15+(unit/100)); - if ([S.Sub,S.AircraftCarrier,S.MissileSilo,S.GiantRobot,S.Satellite.lv,S.GunS,S.SpacePlane,S.Drones].includes(unit)) value *= V.HackingSkillMultiplier; - return Math.ceil(value); -}; - window.Count = function() { const V=State.variables, T=State.temporary, C=Math.clamp, S=V.SF.Squad, E=V.economy; - T.SFF=V.SF.Facility.Active; + T.SFF=V.SF.Facility.Active; T.T1=0; T.SFFU=1; T.SFF=C(T.SFF, 0, T.SFFU); T.FU=10; S.Firebase=C(S.Firebase, 0, T.FU); T.AU=10; S.Armoury=C(S.Armoury, 0, T.AU); @@ -66,363 +29,14 @@ window.Count = function() { T.max += T.LBU; T.Base += T.LB; } else { T.NY=S.AircraftCarrier + S.Sub + S.HAT; T.Base += T.NY; - T.NYU=T.ACU + T.SubU + T.HATU; T.max += T.NYU; - } V.SF.Size=T.Base; V.SF.Size=C(V.SF.Size, 0, T.max); - if (E > 100) {T.Env=4;} - else if (E > 67) {T.Env=3;} - else {T.Env=2;} - T.SFSubsidy=5000*(1+((V.SF.Squad.Troops/100)+(V.SF.Size/100))); + T.NYU=T.ACU + T.SubU + T.HATU; T.max += T.NYU; + } V.SF.Size=T.Base; V.SF.Size=C(V.SF.Size, 0, T.max); + if (E > 100) {T.Env=4;} else if (E > 67) {T.Env=3;} else {T.Env=2;} + if (V.SF.Size >= 30) T.T1=1; T.SFSubsidy=5000*(1+((V.SF.Squad.Troops/100)+(V.SF.Size/100))); SFNameCapsCheck(); if (V.SF.IntroProgress > -1) delete V.SF.IntroProgress; -}; - -window.Firebase = function() { - const V=State.variables, S=V.SF.Squad; - var appear=`is currently constructed in a haphazard fashion.`; var barracks=`Soldiers' cots are mixed in with weapons crates and ammunition.`; var slave=`Cages for processing slaves lie off to one side,`; var common=`and in the center is a common area with tables for soldiers to gather around for meals or rowdy conversations.`; var garage=``; var drone=``; var hangar=``; var launch=``; var artillery=``; var comms=``; var training=``; - - if (S.Firebase >= 1) {appear=`has had some organization put into it.`; barracks=`The majority of weapons, armor, and ammunition have been separated from the soldiers' cots into their own armory.`; garage=`A section near the outer wall of the arcology has been converted to a garage with an adjoining vehicle maintenance bay`; drone=`.`; - if (V.terrain === "oceanic") garage += ` for inter-arcology travel`;} - if (S.Firebase >= 2) barracks=`A barracks has been constructed near the armory, allowing soldiers a quieter place to sleep and store their personal spoils.`; drone=`; as well as a facility for the storage, maintenance, and deployment of armed combat drones.`; - if (S.Firebase >= 3) appear=`has become more permanent.`; barracks=`A command center has been constructed near the barracks and armory, allowing for additional support personnel.`; - if (S.Firebase >= 4) hangar=`Hangar space for storing and repairing aircraft has been converted from unused space on the other side of the garage.`; - if (S.Firebase >= 5) { - appear=`is nearing the appearance of a military base.`; launch=`The rest of the firebase has been designated for special projects.`; artillery=`Artillery batteries are set around the base of the arcology.`; - if (V.terrain === "oceanic" || V.terrain === "marine") launch += ` A Naval Yard has been constructed in the waters near the arcology.`;} - if (S.Firebase >= 6) common=`and in the center is a common area for recreation, including a small movie theater and a mess hall.`; - if (S.Firebase >= 7) {slave=`A slave detention facility has been sectioned off to one side`; - if (V.SF.Depravity > 1.5) slave += ` emanating the sounds of rape and torture`; - slave += `;`;} - if (S.Firebase >= 8) appear=`has become a fully fledged military base.`; comms=`A Free City-wide communication network for ${V.SF.Lower} has been constructed to facilitate faster responses and efficient monitoring of the surrounding area.`; - if (S.Firebase >= 9) training=`A high-tech killhouse has been constructed to aid in soldier training.`; - if (S.Firebase >= 10) artillery=`Railgun artillery batteries are set around the base of the arcology, capable of accurately destroying enemies an absurd distance away.`; - - return `The firebase ${appear} ${barracks} ${comms} ${training} ${slave} ${common} ${garage}${drone} ${hangar} ${launch} ${artillery}`; -}; - -window.Armoury = function() { - const V=State.variables, S=V.SF.Squad; - var weapons=`The weapons are mostly worn rifles that have already seen years of service before ${V.SF.Lower} acquired them.`; var armor=`The body armor is enough to stop smaller calibers, but nothing serious.`; var comms=``; var helmets=``; var ammo=``; var uniforms=``; var special=``; var exo=``; - - if (S.Armoury >= 1) comms=`Radios have been wired into the soldiers helmets`; helmets=`.`; - if (S.Armoury >= 2) helmets=` and a HUD has been integrated into the soldier's eyewear.`; - if (S.Armoury >= 3) ammo=`Tactical vests have been provided, allowing soldiers to carry additional ammo.`; - if (S.Armoury >= 4) armor=`The body armor is a newer variant, able to stop small arms fire and protect against shrapnel.`; - if (S.Armoury >= 5) weapons=`The weapons are modern rifles and sidearms, putting ${V.SF.Lower} on par with rival mercenary outfits.`; - if (S.Armoury >= 6) uniforms=`New uniforms have been distributed that are more comfortable and made of breatheable fabric to keep soldiers from overheating.`; - if (S.Armoury >= 7) special=`Specialized weaponry is available for various roles, allowing more flexibility in planning.`; - if (S.Armoury >= 8) helmets=`and a HUD and camera display have been integrated into soldiers' eyewear, enabling accurate aim around corners or from behind cover`; - if (S.Armoury >= 9) exo=`An exosuit has been developed to reduce the amount of weight soldiers carry, increase lifting strength, and move faster in combat.`; - if (S.Armoury >= 10) weapons=`Cutting-edge weaponry is available to ${V.SF.Lower}, far outpacing the ability of rival mercenary outfits.`; - - return `The armory holds soldiers' weapons and gear while not in training or combat. ${weapons} ${special} ${armor} ${comms}${helmets} ${ammo} ${uniforms} ${exo}`; -}; - -window.Drugs = function() { - const V=State.variables, S=V.SF.Squad; - var amphet=``; var phen=``; var steroid=``; var downer=``; var concen=``; var stimpack=``; var stabilizer=``; - - if (S.Drugs >= 1) amphet=`Amphetamines have been added to the cocktail at a low dosage to act as a stimulant, physical performance enhancer, cognition control enhancer. Some side-effects exist.`; - if (S.Drugs >= 2) phen=`Phencyclidine has been added to the cocktail at a low dosage as a dissociative psychotropic for soldiers in battle to introduce feelings of detachment, strength and invincibility, and aggression. Some side-effects reduce the tolerable dosage before soldiers go on uncontrollable violent outbreaks.`; - if (S.Drugs >= 3) steroid=`Testosterone is being produced for soldiers in training as a natural muscle growth stimulant and to invoke aggression.`; - if (S.Drugs >= 4) downer=`Zaleplon is being produced as a downer to counteract the battle cocktail and encourage rest before combat.`; - if (S.Drugs >= 5) concen=`Methylphenidate has been added to the cocktail as a stimulant and to improve soldier concentration.`; - if (S.Drugs >= 6) phen=`A phencyclidine-based drug has been added to the cocktail as a dissociative psychotropic for soldiers in battle to introduce controllable feelings of detachment, strength and invincibility, and aggression.`; - if (S.Drugs >= 7) steroid=`Low levels of anabolic steroids are being produced for soldiers in training to stimulate muscle growth and invoke aggression.`; - if (S.Drugs >= 8) amphet=`Diphenylmethylsulfinylacetamide has been added to the cocktail to counteract the effects of sleep deprivation and promote alertness.`; - if (S.Drugs >= 9) stimpack=`A stimpack of the battle cocktail is being given to soldiers in battle to take if the original dose wears off before the battle is over.`; - if (S.Drugs >= 10) stabilizer=`A stabilizer has been added to the battle cocktail that helps tie effects together while reducing side-effects, leading to an effectively safe supersoldier drug.`; - - return `A drug lab has been established to increase the effectiveness of ${V.SF.Lower}'s soldiers. Many of these chemicals are mixed into a single 'battle cocktail' to be taken before combat. ${amphet} ${phen} ${concen} ${steroid} ${downer} ${stimpack} ${stabilizer}`; -}; - -window.LUAV = function() { - const V=State.variables, S=V.SF.Squad; - var a=`have been recommissioned for use by ${V.SF.Lower}`; var b=`.`; var c=``; var d=``; var e=``; var f=``; var g=``; var h=``; var i=``; var j=``; var k=``; - - if (S.Drones >= 2) a=`equipped with missiles are resting on one side of the drone bay`; b=`; as well as destroying the occasional target.`; - if (S.Drones >= 3) c=`A fleet of`; d=`large delivery quadcopters have been converted for military service to support ground forces as combat drones.`; - if (S.Drones >= 4) d=`combat drones take up the rest of the space in the drone bay. They have a`; e=`small automatic rifle`; f=`mounted to the underside.`; - if (S.Drones >= 5) g=`Armor has been added to protect vulnerable components from small arms fire.`; - if (S.Drones >= 6) h=`The fleet's batteries have been replaced with higher capacity models, increasing the functional time spent in combat.`; - if (S.Drones >= 7) i=`The propellers and motors have been upgraded, increasing maneuverability and speed.`; - if (S.Drones >= 8) j=`The drone control signal has been boosted and encrypted, giving the drones a greater range and protecting against electronic warfare.`; - if (S.Drones >= 9) e=`light machine gun`; - if (S.Drones >= 10) k=`A drone-to-drone network has been installed, allowing drones to swarm, maneuver, and attack targets autonomously.`; - - return `Surveillance drones ${a}. During combat, they supply aerial intel to commanders and act as the communications network for ground forces${b} ${c} ${d} ${e} ${f} ${g} ${h} ${i} ${j} ${k}`; -}; - -window.AV = function() { - const V=State.variables, S=V.SF.Squad; - var b=`has been recommissioned for use by ${V.SF.Lower}. They`; var c=`; var mechanics are methodically checking the recent purchases for battle-readiness`; var MG=`120 mm main gun is enough to handle the majority of opponents around the Free Cities.`; var engine=``; var armor=``; var armor2=``; var ammo=``; var mg=``; var fireC0=``; var fireC1=``; var fireC2=``; var fireC3=``; var turret=``; - - if (S.AV >= 2) engine=`The engine has been overhauled, allowing much faster maneuvering around the battlefield.`; b=``; c=``; - if (S.AV >= 3) armor=`A composite ceramic armor has replaced the original, offering much greater protection from attacks.`; - if (S.AV >= 4) ammo=`The tanks have been outfitted with additional types of ammo for situational use.`; - if (S.AV >= 5) mg=`A remote-controlled .50 cal machine gun has been mounted on the turret to handle infantry and low-flying aircraft.`; - if (S.AV >= 6) fireC0=`A fire-control system`; fireC3=`been installed, guaranteeing`; fireC2=`has`; fireC1=`accurate fire.`; - if (S.AV >= 7) fireC2=`and an autoloader have`; fireC1=`rapid, accurate fire while separating the crew from the stored ammunition in the event the ammo cooks off.`; - if (S.AV >= 8) armor2=`A reactive armor system has been added, giving the tank an additional, if temporary, layer of protection.`; - if (S.AV >= 9) turret=`The turret has been massively redesigned, lowering the tank profile and increasing the efficiency of the mechanisms within.`; - if (S.AV >= 10) MG=`140 mm main gun can quash anything even the greatest Old World nations could muster.`; - - return `A fleet of main battle tanks ${b} are parked in the garage${c}. ${turret} The ${MG} ${ammo} ${mg} ${fireC0} ${fireC2} ${fireC3} ${fireC1} ${engine} ${armor} ${armor2}`; -}; - -window.TV = function() { - const V=State.variables, S=V.SF.Squad; - var B=`has been recommissioned for use by ${V.SF.Lower}. They`; var C=`; var mechanics are giving the new purchases a final tuneup`; var squad=`a squad`; var G1=`20`; var G2=`in a firefight`; var e0=`The engine has been`; var engine=``; var armor=``; var tires=``; var m1=``; var m2=``; var pod1=``; var pod2=``; - - if (S.TV >= 2) engine=`${e0} overhauled, allowing for higher mobility.`; C=``; B=``; - if (S.TV >= 3) armor=`Composite armor has been bolted to the exterior, increasing the survivability of an explosive attack for the crew and passengers.`; - if (S.TV >= 4) tires=`The tires have been replaced with a much more durable version that can support a heavier vehicle.`; - if (S.TV >= 5) m1=`An automatic missile defense system has been installed,`; m2=`targeting any guided missiles with laser dazzlers and deploying a smokescreen.`; - if (S.TV >= 6) pod1=`An anti-tank missile pod`; pod2=`has been installed on the side of the turret.`; - if (S.TV >= 7) G1=`25`; G2=`by attacking enemies through cover and destroying light armor`; - if (S.TV >= 8) pod2=`and an anti-aircraft missile pod have been installed on either side of the turret.`; - if (S.TV >= 9) squad=`two squads`; armor=``; m2=`destroying any incoming missiles with a high-powered laser. Some of the now redundant composite armor has been removed, and the reclaimed space allows for more passengers.`; - if (S.TV >= 10) engine=`${e0} replaced with the newest model, allowing the vehicle to get in and out of the conflict extremely quickly.`; - - return `A fleet of infantry fighting vehicles ${B} are parked in the garage${C}. The IFVs can carry ${squad} of 6 to a firezone. The ${G1} mm autocannon supports infantry ${G2}. ${pod1} ${pod2} ${engine} ${armor} ${tires} ${m1} ${m2}`; -}; - -window.PGT = function() { - const V=State.variables, S=V.SF.Squad; - var b=`has been sold to ${V.SF.Lower} through back channels to support a failing Old World nation. The tank is so large it cannot fit inside the garage, and has`; var c=``; var engines=`. Two engines power the left and right sides of the tank separately, leaving it underpowered and slow`; var gun0=``; var gun1=``; var gun2=`an undersized main gun and makeshift firing system from a standard battle tank`; var armor1=``; var armor0=``; var cannon=``; var laser=``; var PGTframe=``; - - if (S.PGT >= 2) c=`rests in`; b=``; engines=` and powered by their own engine, allowing the tank to travel with an unsettling speed for its massive bulk`; - if (S.PGT >= 3) gun0=`a railgun capable of`; gun1=`firing steel slugs`; gun2=`through one tank and into another`; - if (S.PGT >= 4) armor0=`reinforced, increasing survivability for the crew inside.`; armor1=`The armor has been`; - if (S.PGT >= 5) cannon=`A coaxial 30mm autocannon has been installed in the turret, along with automated .50 cal machine guns mounted over the front treads.`; - if (S.PGT >= 6) laser=`Laser anti-missile countermeasures have been installed, destroying any subsonic ordinance fired at the Goliath.`; - if (S.PGT >= 7) PGTframe=`The frame has been reinforced, allowing the Goliath to carry more armor and guns.`; - if (S.PGT >= 8) armor0=`redesigned with sloping and state-of-the-art materials, allowing the Goliath to shrug off even the most advanced armor-piercing tank rounds.`; - if (S.PGT >= 9) gun1=`firing guided projectiles`; - if (S.PGT >= 10) gun0=`a twin-barreled railgun capable of rapidly`; - - return `A prototype Goliath tank ${b}${c} its own garage housing built outside the arcology. The massive bulk is spread out over 8 tracks, two for each corner of the tank${engines}. The turret is equipped with ${gun0} ${gun1} ${gun2}. ${cannon} ${armor1} ${armor0} ${laser} ${PGTframe}`; -}; - -window.AA = function() { - const V=State.variables, S=V.SF.Squad; - var W1=`only armed`; var W2=`;`; var W3=`a poor weapon against flying targets, but enough to handle ground forces`; var group=`A small group of attack VTOL have been recommissioned for use by ${V.SF.Lower}, enough to make up a squadron`; var engines=``; var TAI=``; var lock=``; var support=``; var stealth=``; var scramble=``; var PAI=``; - - if (S.AA >= 2) W1=`armed`; W2=` and air-to-air missiles,`; W3=`a combination that can defend the arcology from enemy aircraft, as well as`; support=` support ground troops`; - if (S.AA >= 3) engines=`The engines have been tuned, allowing faster flight with greater acceleration.`; - if (S.AA >= 4) TAI=`An advanced targeting AI has been installed to handle all control of weapons, allowing much more efficient use of ammunition and anti-countermeasure targeting.`; - if (S.AA >= 5) lock=`Installed multispectrum countermeasures protect against all types of missile locks.`; - if (S.AA >= 6) group=`A respectable number of attack VTOL protect your arcology, split into a few squadrons`; - if (S.AA >= 7) support=` attack ground targets`; W2=`; rocket pods, and air-to-air missiles,`; - if (S.AA >= 8) stealth=`The old skin has been replaced with a radar-absorbent material, making the aircraft difficult to pick up on radar.`; - if (S.AA >= 9) scramble=`The VTOLs can scramble to react to any threat in under three minutes.`; - if (S.AA >= 10) PAI=`A piloting AI has been installed, allowing the VTOLs to perform impossible maneuvers that cannot be done by a human pilot. This removes the need for a human in the aircraft altogether.`; - - return `${group}. Several of the landing pads around $arcologies[0].name host groups of four fighters, ready to defend the arcology. ${scramble} The attack VTOL are currently ${W1} with a Gatling cannon${W2} ${W3}${support}. ${TAI} ${PAI} ${engines} ${lock} ${stealth}`; -}; - -window.TA = function() { - const V=State.variables, S=V.SF.Squad; - var Num=`number`; var type=`tiltrotor`; var capacity=`small platoon or 15`; var engines=``; var engines2=``; var Radar=``; var Armor=``; var landing=``; var miniguns=``; var counter=``; - - if (S.TA >= 2) engines=`The tiltrotor engines have been replaced with a more powerful engine, allowing faster travel times.`; - if (S.TA >= 3) counter=`Multispectrum countermeasures have been added to protect against guided missiles.`; - if (S.TA >= 4) miniguns=`Mounted miniguns have been installed to cover soldiers disembarking in dangerous areas.`; - if (S.TA >= 5) Num=`large number`; - if (S.TA >= 6) landing=`The landing equipment has been overhauled, protecting personnel and cargo in the event of a hard landing or crash.`; - if (S.TA >= 7) Armor=`Armor has been added to protect passengers from small arms fire from below.`; - if (S.TA >= 8) capacity=`large platoon or 20`; engines2=`Further tweaks to the engine allow for greater lifting capacity.`; - if (S.TA >= 9) Radar=`Radar-absorbent materials have replaced the old skin, making it difficult to pick up the VTOL on radar.`; - if (S.TA >= 10) type=`tiltjet`; engines2=``; engines=`The tiltrotors have been replaced with tiltjets, allowing for much greater airspeed and acceleration.`; - - return `A ${Num} of transport ${type} VTOL have been recommissioned for use by ${V.SF.Lower}. The VTOLs are resting on large pads near the base to load either a ${capacity} tons of material. ${engines} ${engines2} ${Armor} ${landing} ${counter} ${Radar} ${miniguns}`; -}; - -window.SP = function() { - const V=State.variables, S=V.SF.Squad; - var engine=`ramjet engines in the atmosphere that can reach Mach 10`; var b=`has been purchased from an insolvent Old World nation. It `; var shield=``; var camera=``; var efficiency=``; var camera2=``; var drag=``; var crew=``; var engine2=``; var skin=``; - - if (S.SpacePlane >= 2) b=``; shield=`The current heat shielding has been upgraded, reducing the likelihood of heat damage during reentry.`; - if (S.SpacePlane >= 3) engine2=` and liquid rocket engines in orbit that can reach an equivalent Mach 18`; - if (S.SpacePlane >= 4) camera=`A state-of-the-art camera has been installed in the underbelly that takes incredibly high resolution photos, but requires the frictionless environment of space to focus.`; - if (S.SpacePlane >= 5) efficiency=`Tweaks to the engines have increased fuel efficiency to the point where midflight refueling is no longer necessary.`; - if (S.SpacePlane >= 6) camera2=`The camera sensor is capable of taking IR shots.`; - if (S.SpacePlane >= 7) drag=`Miraculous advances in aerodynamics and materials allow frictionless flight, even while in the atmosphere.`; - if (S.SpacePlane >= 8) crew=`Increased the crew comfort and life support systems to increase operational time.`; - if (S.SpacePlane >= 9) skin=`Replaced the underbelly skin with a chameleon kit, matching the color to the sky above it.`; - if (S.SpacePlane >= 10) engine=`experimental scramjet engines in the atmosphere that can reach Mach 15`; engine2=` and liquid rocket engines in orbit that can reach an equivalent Mach 25`; - - return `A prototype spaceplane ${b} rests in the hangar, its black fuselage gleaming. The craft is powered by ${engine}${engine2}. ${efficiency} ${shield} ${camera} ${camera2} ${drag} ${crew} ${skin}`; -}; - -window.GunS = function() { - const V=State.variables, S=V.SF.Squad; - var a=`has been recommissioned for use by ${V.SF.Lower}. Currently, it `; var b=``; var c=``; var d=``; var e=`Miniguns and Gatling cannons line`; var f=`; var though the distance to ground targets renders the smaller calibers somewhat less useful`; var g=``; var h=``; var i=``; var j=``; var k=``; - - if (S.GunS >= 2) b=`Infrared sensors have been added for the gunners to better pick targets.`; a=``; - if (S.GunS >= 3) c=`The underside of the aircraft has been better armored against small-arms fire`; h=`.`; - if (S.GunS >= 4) d=`Larger fuel tanks have been installed in the wings and fuselage, allowing the gunship to provide aerial support for longer periods before refueling.`; - if (S.GunS >= 5) e=`25 mm Gatling cannons`; f=`; allowing the gunship to eliminate infantry`; j=` and light vehicles from above`; k=` and a 40 mm autocannon are mounted on`; - if (S.GunS >= 6) g=`The engines have been replaced, allowing both faster travel to a target, and slower travel around a target.`; - if (S.GunS >= 7) h=`; and multi-spectrum countermeasures have been installed to protect against guided missiles.`; - if (S.GunS >= 8) b=`Upgraded multi-spectrum sensors can clearly depict targets even with IR shielding.`; - if (S.GunS >= 9) i=`The ammunition storage has been increased, only slightly depriving loaders of a place to sit.`; - if (S.GunS >= 10) j=`; both light and heavy vehicles, and most enemy cover from above`; k=`; a 40 mm autocannon, and a 105 mm howitzer are mounted on`; - - return `A large gunship ${a} is being refueled in the hangar. ${e}${k} the port side of the fuselage${f}${j}. ${b} ${i} ${g} ${c}${h} ${d}`; -}; - -window.Sat = function() { - const V=State.variables, S=V.SF.Squad; - var loc=`An unused science satellite has been purchased from an Old World nation. While currently useless, it holds potential to be a powerful tool.`; var gyro=``; var telemetry=``; var thrusters=``; var solar=``; var surviv=``; var laser=``; var heat=``; var reactor=``; var lens=``; var kin=``; - - if (S.Satellite.lv >= 2) { - if (V.SF.Squad.Satellite.InOrbit < 1) {loc=`The satellite is being worked on in the Launch Bay.`;} else {loc=`The satellite is in geosynchronous orbit, far above the arcology.`;} - gyro=`A suite of sensors have been installed to ensure the satellite can detect attitude and orbital altitude.`;} - if (S.Satellite.lv >= 3) telemetry=`Telemetry systems have been installed to communicate with the satellite in orbit, with strong encryption measures.`; - if (S.Satellite.lv >= 4) thrusters=`Thrusters have been installed to control satellite attitude and orbit.`; - if (S.Satellite.lv >= 5) solar=`A massive folding solar panel array, combined with the latest in battery technology allow the satellite to store an enormous amount of energy relatively quickly.`; surviv=`Enough of the satellite has been finished that it can expect to survive for a significant period of time in space.`; - if (S.Satellite.lv >= 6) laser=`A laser cannon has been mounted facing the earth, capable of cutting through steel in seconds`; heat=` while generating a large amount of heat.`; - if (S.Satellite.lv >= 7) heat=`. The installed heatsink allows the laser cannon to fire more frequently without damaging the satellite.`; - if (S.Satellite.lv >= 8) reactor=`A small, efficient nuclear reactor has been installed to continue generating energy while in the Earth's shadow.`; - if (S.Satellite.lv >= 9) lens=`A higher quality and adjustable lens has been installed on the laser, allowing scalpel precision on armor or wide-area blasts on unarmored targets.`; - if (S.Satellite.lv >= 10) kin=`A magazine of directable tungsten rods have been mounted to the exterior of the satellite, allowing for kinetic bombardment roughly equal to a series of nuclear blasts.`; - - return `${loc} ${gyro} ${thrusters} ${telemetry} ${solar} ${reactor} ${surviv} ${laser}${heat} ${lens} ${kin}`; -}; - -window.GR = function() { - const V=State.variables, S=V.SF.Squad; - var loc=`has been purchased from a crumbling Old World nation. It`; var power=`Large batteries mounted in oversized shoulders power the robot for up to ten minutes of use, though they make for large targets.`; var knife=`simply a 8.5 meter long knife, though additional weapons are under development.`; var armor=``; var actuator=``; var cannon=``; var heatsink=``; var ammo=``; var missile=``; - - if (S.GiantRobot >= 2) loc=``; armor=`Armor plating has been mounted over the majority of the robot.`; - if (S.GiantRobot >= 3) power=`The robot is now powered by an umbilical cable system instead of bulky and short-lived batteries.`; - if (S.GiantRobot >= 4) knife=`a 25 meter plasma sword. The cutting edge uses plasma to melt and cut through targets, reducing the strain on the sword.`; - if (S.GiantRobot >= 5) actuator=`The limb actuators have been replaced with a faster and more powerful variant, granting the robot the same.`; - if (S.GiantRobot >= 6) cannon=`A custom 45 mm Gatling cannon rifle has been developed for ranged use`; ammo=`; though it lacks enough ammo storage for a main weapon.`; - if (S.GiantRobot >= 7) heatsink=`Large heatsinks have been installed out of the back to solve a massive overheating problem. These heatsinks resemble wings, and tend to glow red with heat when in heavy use.`; - if (S.GiantRobot >= 8) armor=``; actuator=`Final actuator tweaks have allowed for the addition of exceptionally thick armor without any loss in speed or power.`; - if (S.GiantRobot >= 9) ammo=`; with spare ammunition drums kept along the robot's waist.`; - if (S.GiantRobot >= 10) missile=`Missile pods have been mounted on the shoulders.`; - - return `A prototype giant robot ${loc} rests in a gantry along the side of the arcology. The robot is as tall as a medium-sized office building, focusing on speed over other factors. ${power} ${armor} ${actuator} ${heatsink} The main armament is ${knife} ${cannon}${ammo} ${missile}`; -}; - -window.ms = function() { - const V=State.variables, S=V.SF.Squad; - var a=`A cruise missile launch site has been constructed near the base of`; var b=`outdated, something quickly rigged together to give the launch site something to fire in the case of an attack`; var c=``; var d=``; var e=``; var f=``; var g=``; var h=``; - - if (S.MissileSilo >= 2) b=`a modern missile`; c=`; tipped with a conventional warhead`; - if (S.MissileSilo >= 3) d=`The launch systems have been overhauled, allowing a launch within seconds of an attack order being given.`; - if (S.MissileSilo >= 4) e=`The missile engines have been tweaked, giving them a greater range.`; - if (S.MissileSilo >= 5) f=`A passive radar has been installed, allowing the missile to follow moving targets.`; - if (S.MissileSilo >= 6) a=`Several cruise missile launch sites have been constructed around`; - if (S.MissileSilo >= 7) e=`The engine has been replaced, giving the missiles greater range and supersonic speeds.`; - if (S.MissileSilo >= 8) g=`The ability to pick new targets should the original be lost has been added.`; - if (S.MissileSilo >= 9) h=`The missile now uses its remaining fuel to create a thermobaric explosion, massively increasing explosive power.`; - if (S.MissileSilo >= 10) c=` that can be tipped with either a conventional or nuclear warhead`; - - return `${a} the arcology. The current missile armament is ${b}${c}. ${d} ${e} ${f} ${g} ${h}`; -}; - -window.AC = function() { - const V=State.variables, S=V.SF.Squad; - var recom=`has been recommissioned from the Old World for ${V.SF.Lower}. It`; var jets=`Formerly mothballed strike jets`; var loc=``; var radar=``; var AA=``; var prop=``; var torp=``; var armor=``; var power=``; var scramble=``; - - if (V.week % 6 === 0) { loc=`moored to the pier in the Naval Yard`; } else { loc=`patrolling the waters near $arcologies[0].name`; } - if (S.AircraftCarrier >= 2) radar=`The island's radar and comms have been improved.`; recom=``; - if (S.AircraftCarrier >= 3) AA=`The antiair guns have been updated to automatically track and predict enemy aircraft movement.`; - if (S.AircraftCarrier >= 4) jets=`Modern strike jets with state-of-the-art armaments`; - if (S.AircraftCarrier >= 5) prop=`The propellers have been redesigned, granting greater speed with less noise.`; - if (S.AircraftCarrier >= 6) torp=`An anti-torpedo system detects and destroys incoming torpedoes.`; - if (S.AircraftCarrier >= 7) armor=`Additional armor has been added to the hull and deck.`; - if (S.AircraftCarrier >= 8) power=`The power plant has been converted to provide nuclear power.`; - if (S.AircraftCarrier >= 9) scramble=`The catapult has been converted to an electromagnetic launch system, halving the time it takes to scramble jets.`; - if (S.AircraftCarrier >= 10) jets=`Attack VTOL from the converted for carrier capability`; - - return `An aircraft carrier ${recom} is ${loc}. ${jets} serve as its airpower. ${scramble} ${power} ${radar} ${AA} ${torp} ${prop} ${armor}`; -}; - -window.Sub = function() { - const V=State.variables, S=V.SF.Squad; - var recom=`has been recommissioned from the old world, and`; var reactor=`Because diesel engines provide power and breathing oxygen is kept in pressurized canisters, the sub must frequently surface.`; var reactor1=``; var cal=``; var hull=``; var tubes=``; var torpedoes=``; var sonar=``; var control=``; var missiles=``; - - if (S.Sub >= 2) recom=``; reactor=`A nuclear reactor provides power`; reactor1=`; but because oxygen is still kept in pressurized canisters the sub must frequently surface to replenish its oxygen stocks.`; - if (S.Sub >= 3) reactor1=` and an oxygen generator pulls Oâ‚‚ from the surrounding seawater, allowing the submarine to remain underwater for months if necessary.`; - if (S.Sub >= 4) cal=`Calibration of the propulsion systems has reduced the telltale hum of a moving sub to a whisper.`; - if (S.Sub >= 5) hull=`The outer hull has been redesigned for hydrodynamics and sonar absorption.`; - if (S.Sub >= 6) tubes=`The torpedo tubes have been redesigned for faster loading speeds`; torpedoes=`.`; - if (S.Sub >= 7) sonar=`The passive sonar has been finely tuned to detect mechanical noises miles away.`; - if (S.Sub >= 8) control=`The control room computers have been upgraded to automate many conn duties.`; - if (S.Sub >= 9) torpedoes=`and launch more agile torpedoes.`; - if (S.Sub >= 10) missiles=`The submarine has been outfitted with several cruise missiles to attack land or sea-based targets.`; - - return `An attack submarine ${recom} is moored to the pier of the Naval Yard. ${reactor}${reactor1} ${cal} ${hull} ${tubes}${torpedoes} ${sonar} ${control} ${missiles}`; -}; - -window.HAT = function() { - const V=State.variables, S=V.SF.Squad; - var recom=`; has been recommissioned for use by ${V.SF.Lower}. It`; var tons=`200`; var skirt=``; var guns=``; var guns2=``; var fans=``; var speed=``; var turbines=``; var armor=``; var ramps=``; var HATframe=``; var loadout=``; - - if (S.HAT >= 2) skirt=`The skirt has been upgraded to increase durability and improve cushion when traveling over uneven terrain and waves.`; recom=`;`; - if (S.HAT >= 3) guns=`A minigun`; guns2=`has been mounted on the front corners of the craft to defend against attackers.`; - if (S.HAT >= 4) fans=`The turbines powering the rear fans`; speed=`acceleration and speed.`; turbines=`have been replaced with a more powerful version, allowing greater`; - if (S.HAT >= 5) armor=`The armor protecting its cargo has been increased.`; - if (S.HAT >= 6) tons=`300`; fans=`The turbines powering the rear fans and impeller`; speed=`acceleration, speed, and carrying capacity.`; - if (S.HAT >= 7) guns=`A minigun and grenade launcher`; - if (S.HAT >= 8) ramps=`The loading ramps have been improved, allowing for faster unloading.`; - if (S.HAT >= 9) HATframe=`The frame has been widened and reinforced, allowing for more space on the deck.`; - if (S.HAT >= 10) loadout=`An experimental loadout sacrifices all carrying capacity to instead act as a floating gun platform by mounting several rotary autocannons the deck, should the need arise.`; - - return `An air cushion transport vehicle, or hovercraft${recom} is parked on the pier of the Naval Yard, ready to ferry ${tons} tons of soldiers and vehicles. ${guns} ${guns2} ${fans} ${turbines} ${speed} ${skirt} ${armor} ${ramps} ${HATframe} ${loadout}`; -}; - -window.Interactions = function() { - const V=State.variables, C=V.SF.Colonel, T=State.temporary; - var choice=``; time=``; - if (V.SF.Gift > 0) { - if (V.choice == 1) { - choice +=`${V.SF.Caps} is turning over spare capital in tribute this week. `; - if (V.SF.MercCon.CanAttend === -1 && (C.Talk + C.Fun !== 1)) { - choice += `"I think I can find <span class='yellowgreen'>${cashFormat(Math.ceil(V.CashGift))}</span> for you, boss."`; - } else { - choice += `"We can spare <span class='yellowgreen'>${cashFormat(Math.ceil(V.CashGift))}</span> in tribute this week, boss".`; } - } else if (V.choice == 2) { - choice += `${V.SF.Caps} will be throwing a military parade this week. `; - if (V.SF.MercCon.CanAttend === -1 && (C.Talk + C.Fun !== 1)) { - choice += `"I expect the <span class='green'>public to enjoy</span> the parade, boss."`; - } else { - choice += `"I'll have plans for an <span class='green'>popular parade</span> on your desk, boss".`; } - } else if (V.choice == 3) { - choice += `${V.SF.Caps} will be conducting corporate sabotage on rival arcologies' businesses. `; - if (V.SF.MercCon.CanAttend === -1 && (C.Talk + C.Fun !== 1)) { - choice += `"Our interests should see a <span class='yellowgreen'>big boost,</span> boss."`; - } else { - choice += `"Your <span class='yellowgreen'>arcology's business prospects should see an improvement</span> this week, boss".`; } - } - } if (C.Talk + C.Fun > 0) time=`<br>The Colonel is busy for the rest of the week, so the Lieutenant Colonel will assist you.`; - return `${time} <br>${choice}`; -}; - -window.progress = function(x,max) { - var out = `â`, z, i; - if (max === undefined) { - Math.clamp(x,0,10); - if (State.variables.SF.Size < 30) { - z = 5 - x; - for (i=0;i<x;i++) out += `â–ˆâ`; - for (i=0;i<z;i++) out += `<span style=\"opacity: 0;\">â–ˆ</span>â`; - for (i=0;i<5;i++) out += `â–‘â`;} - else { - z = 10 - x; - for (i=0;i<x;i++) out += `â–ˆâ`; - for (i=0;i<z;i++) out += `<span style=\"opacity: 0;\">â–ˆ</span>â`;}} - else { - Math.clamp(x,0,max); - x=Math.floor(10*x/max); - z=10 - x; - for (i=0;i<x;i++) out += `â–ˆâ`; - for (i=0;i<z;i++) out += `<span style=\"opacity: 0;\">â–ˆ</span>â`;} - return `${out}`; + if (V.SF.MercCon === undefined) MercCon(); + if (V.SF.Size === T.max) delete V.SF.Upgrade; }; window.Main = function() { @@ -638,6 +252,266 @@ window.SFBC = function() { if (V.SF.Facility === undefined) Facility(); }; +window.SFReport = function() { + const V=State.variables,T=State.temporary,S=V.SF.Squad; + var target=50000,baseLine=5000,profit=0,upkeep=0,income=0; + var Multiplier={action:1,troop:1,unit:1,depravity:1},SFD=V.SF.Depravity; + var FNG=10,unitCap=2500,Trade=0.025,deaths=0,r=``; Count(); + var cost={a:0.01,b:2.5};var NO=1+(V.SF.Size/10);var N1=1+(V.SF.Size/10); + V.SFUC=0; if (profit < 1) cost.a=10; cost.b=0.1;NO=1;N1=0.1; + + if (S.Troops > unitCap) S.Troops=unitCap; + if (S.Troops < 100) { S.Troops += Math.ceil(jsRandom(2,5)); + } else { + if (V.SF.Target === "recruit") { + S.Troops += Math.ceil(jsRandom(-1*S.Troops/100,0)); + } else if (V.SF.Target === "raiding") { + S.Troops += Math.ceil(jsRandom(-3*S.Troops/100,-4*S.Troops/100)); + } else { S.Troops += Math.ceil(jsRandom(-2*S.Troops/100,-3*S.Troops/100)); } + } + if (V.SF.UC.Assign > 0) { + if (V.SF.UC.Assign < 2) { V.SFUC=Math.ceil(S.Troops*0.1); + } else { V.SFUC=Math.ceil(S.Troops*0.25); } + } S.Troops -= V.SFUC; + if (S.Troops > 200) { Trade += 0.05*(Math.ceil(S.Troops/100)); + Multiplier.troop += S.Troops/200; upkeep += (S.Troops*25)/cost.a; + if (V.secExp > 0) { + V.authority += 25*(Math.ceil(S.Troops/200)); V.authority=Math.clamp(V.authority, 0, 20000); + } + } + + if (S.Firebase > 0) { + FNG += S.Firebase; Trade += 0.5*S.Firebase; Multiplier.unit += 7.5*S.Firebase+2*Math.pow(S.Firebase,2)*cost.a; upkeep += (95*10+S.Firebase)*cost.b; + } + if (S.Armoury > 0) { + FNG += 2*S.Armoury; Trade += 0.25*S.Armoury; Multiplier.unit += 7.5*S.Armoury+2*Math.pow(S.Armoury,2)*cost.a; upkeep += (55*S.Armoury)*cost.b; + } + if (S.Drugs > 0) { + FNG += S.Drugs; Trade += 0.25*S.Drugs; Multiplier.unit += 7.5*S.Drugs+2*Math.pow(S.Drugs,2)*cost.a; upkeep += (35*S.Drugs)*cost.b; + } + if (S.Firebase >= 1) { + if (S.AV > 0) { + FNG += S.AV; Trade += 0.25*S.AV; Multiplier.unit += 7.5*S.AV+2*Math.pow(S.AV,2)*cost.a; upkeep += (89*S.AV)*cost.b; + } + if (S.TV > 0) { + FNG += S.TV; Trade += 0.25*S.TV; Multiplier.unit += 7.5*S.TV+2*Math.pow(S.TV,2)*cost.a; upkeep += (89*S.TV)*cost.b; + } + if (S.PGT > 0) { + FNG += S.PGT; Trade += 0.25*S.PGT; Multiplier.unit += 15*S.PGT+3*Math.pow(S.PGT,2)*cost.a; upkeep += (100*S.PGT)*cost.b; + } + } + + if (S.Firebase >= 2 && S.Drones > 0) { + FNG += S.Drones; Trade += 0.5*S.Drones; Multiplier.unit += 7.5*S.Drones+2*Math.pow(S.Drones,2)*cost.a; upkeep += (50*S.Drones)*cost.b; + } + + if (S.Firebase >= 4) { + if (S.AA > 0) { + FNG += S.AA; Trade += 0.25*S.AA; Multiplier.unit += 7.5*S.AA+2*Math.pow(S.AA,2)*cost.a; upkeep += (100*S.AA)*cost.b; + } + if (S.TA > 0) { + FNG += S.TA; Trade += 0.25*S.TA; Multiplier.unit += 7.5*S.TA+2*Math.pow(S.TA,2)*cost.a; upkeep += (100*S.TA)*cost.b; + } + if (S.SpacePlane > 0) { + FNG += S.SpacePlane; Trade += 0.25*S.SpacePlane; Multiplier.unit += 7.5*S.SpacePlane+2*Math.pow(S.SpacePlane,2)*cost.a; upkeep += (100*S.SpacePlane)*cost.b; + } + if (S.GunS > 0) { + FNG += S.GunS; Trade += 0.25*S.GunS; Multiplier.unit += 12*S.GunS+3*Math.pow(S.GunS,2)*cost.a; upkeep += 70*S.GunS; + } + if (S.Satellite.lv > 0 && S.Satellite.InOrbit > 0) { + FNG += S.Satellite.lv; Trade += 0.25*S.Satellite.lv; Multiplier.unit += 15*S.Satellite.lv+5*Math.pow(S.Satellite.lv,2)*cost.a; upkeep += (85*S.Satellite.lv)*cost.b; + } + if (S.GiantRobot > 0) { + FNG += S.GiantRobot; Trade += 0.25*S.GiantRobot; Multiplier.unit += 15*S.GiantRobot+5*Math.pow(S.GiantRobot,2)*cost.a; upkeep += (95*S.GiantRobot)*cost.b; + } + if (S.MissileSilo > 0) { + FNG += S.MissileSilo; Trade += 0.25*S.MissileSilo; Multiplier.unit += 15*S.MissileSilo+5*Math.pow(S.MissileSilo,2)*cost.a; upkeep += (100*S.MissileSilo)*cost.b; + } + } + + if (S.AircraftCarrier > 0) { + FNG += S.AircraftCarrier; Trade += 0.25*S.AircraftCarrier; Multiplier.unit += 9*S.AircraftCarrier+3*Math.pow(S.AircraftCarrier,2)*cost.a; upkeep += (80*S.AircraftCarrier)*cost.b; + } + if (S.Sub > 0) { + FNG += S.Sub; Trade += 0.25*S.Sub; Multiplier.unit += 7.5*S.Sub+2*Math.pow(S.Sub,2)*cost.a; upkeep += (90*S.Sub)*cost.b; + } + if (S.HAT > 0) { + FNG += S.HAT; Trade += 0.25*S.HAT; Multiplier.unit += 7.5*S.HAT+2*Math.pow(S.HAT,2)*cost.a; upkeep += (70*S.HAT)*cost.b; + } + + switch (V.SF.Colonel.Core) { + case "kind": FNG += 10; Trade += 0.15; SFD -= 0.15; break; + case "cruel": Trade -= 0.15; SFD += 0.15; break; + case "brazen": FNG += 15; Multiplier.unit += 0.5; break; + case "jaded": Trade -= 0.05; SFD += 0.05; break; + case "shell shocked": Trade += 0.05; SFD -= 0.05; Multiplier.unit -= 0.5; break; + } + if (V.SF.Target === "raiding") { SFD += 0.05; Multiplier.action += 0.5; + } else if (V.SF.Target === "secure") { SFD -= 0.05; Multiplier.action += 0.2; + } else { SFD -= 0.1; Multiplier.action -= 0.5; } + if (V.SF.ROE === "free") { Multiplier.action *= 0.8; SFD += 0.05; Trade += Trade*0.95; + } else if (V.SF.ROE == "hold") { Multiplier.action *= 1.1; SFD -= 0.05; Trade += Trade*1.05; } + if (V.SF.Regs === "none") { Multiplier.action *= 0.8; SFD += 0.05; Trade += Trade*0.95; + } else if (V.SF.Regs === "strict") { Multiplier.action *= 1.1; SFD -= 0.05; Trade += Trade*1.05; + Multiplier.depravity=1+SFD; } + if (SFD > -2) Trade *= 1+SFD/2; + + if (V.SF.Target === "recruit") { FNG += Math.ceil(FNG*0.95); + } else { FNG += Math.ceil(FNG*0.25); } + if (V.SF.Target === "secure") { V.rep += Math.ceil(V.rep*((Trade/100)*0.95)); + V.arcologies[0].prosperity=Math.ceil((V.arcologies[0].prosperity+(Trade/10)*0.95)); + } else { V.rep += Math.ceil(V.rep*(Trade/100)*0.25); + V.arcologies[0].prosperity=Math.ceil(V.arcologies[0].prosperity+(Trade/10)*0.25);} + if (V.secExp > 0) V.authority += V.SF.Size*10; V.authority=Math.clamp(V.authority, 0, 20000); + + income += Math.ceil( (baseLine* (0.09+Multiplier.troop/NO).toFixed(2) * (0.09+Multiplier.unit/NO).toFixed(2) * (0.09+Multiplier.action/NO).toFixed(2) * (0.09+Multiplier.depravity/NO).toFixed(2) )-(upkeep*N1).toFixed(2) ); S.Troops += Math.round(FNG/2); + r += `income:${commaNum(income)}, troop:${commaNum((0.09+Multiplier.troop/NO).toFixed(2))}, unit:${commaNum((0.09+Multiplier.unit/NO).toFixed(2))}, action:${commaNum((0.09+Multiplier.action/NO).toFixed(2))}, depravity:${commaNum((0.09+Multiplier.depravity/NO).toFixed(2))}, upkeep:${commaNum((upkeep*N1).toFixed(2))}`; + //if (V.economy < 100) income=Math.ceil(income*(1+(V.week/100))); //Remove line if hard mode ever gets fixed. + if (income >= target) profit=1; delete V.SF.Subsidy; cashX(income, "specialForces"); + if (S.Troops > unitCap) S.Troops=unitCap; + if (V.rep > 20000) V.rep=20000; + if (V.arcologies[0].prosperity > V.ProsperityCap) V.arcologies[0].prosperity=V.ProsperityCap; + + if (S.Drugs >= 8 || S.Drugs >= 10) { var survivalChance=50; + if (S.Drugs >= 8) {survivalChance -= 5;} else if (S.Drugs >= 10) {survivalChance += 5;} + if (jsRandom(0,100) > survivalChance) deaths=jsRandom(0,((S.Drugs*2)+4)); + if (deaths > 0) S.Troops -= deaths; + } + if (V.SF.UC.Assign === 1 && V.SF.UC.Lock < 1) V.SF.UC.Assign=0; + if (V.SF.Upgrade !== undefined) V.SF.Upgrade=0; V.SF.Gift=0; + V.SF.Colonel.Talk=0; V.SF.Colonel.Fun=0; + + r += `<br>__Week ${V.week} operational report for ${V.SF.Lower}__:`; + r += `<br>${V.SF.Caps} focused their ${commaNum(S.Troops)} troops on `; + if (V.SF.Target === "recruit") { + r += `recruiting and training more personnel. Smaller parties ventured out to protect the arcology's trade routes and strike targets of opportunity.`; + } else if (V.SF.Target === "secure") { + r += `securing the trade routes between the arcology and the surrounding area. Smaller parties ventured out to strike targets of opportunity and process new recruits.`; + } else { + r += `locating and striking targets of opportunity, capturing both material loot and new slaves. Smaller parties secured the most important of the arcology's trade routes and processed new recruits.`; + } + if (V.SF.UC.Assign > 0) { + r += `<br>A ${V.SF.UC.Assign < 2 ? 'small':'large'} portion of the force was assigned as ${V.SF.UC.Assign < 2 ? 'part':'full'} time undercover officers.`; + } + if (deaths > 0) { + r += ` <span class='red'>${deaths} soldiers fatally overdosed on the drug cocktail</span>`; + if (V.SF.MercCon.CanAttend === -1) r += `, The Colonel's much heavier than average drug use saves her from this side effect.`; + } + r += `<br>These activities have, overall, <span class='green'>improved your arcology's prosperity</span>.`; + r+= ` The goods procured by ${V.SF.Lower} after accounting for the spoils retained by individual soldiers were `; + if (profit > 0) { + r += `<span class='green'>more than sufficient to cover expenses</span>. Excess material and human assets totaling <span class='yellowgreen'>${cashFormat(income)}</span> (after liquidation) were transferred to your accounts.`; + } else { + r += `<span class='red'>barely enough to cover expenses.</span> More growth will be needed to ensure profitability, <span class='yellow'>hopefully purchasing more upgrades will help</span>.`; + r += ` Per the estimates that ${SFC()} provides, an additional <span class='yellowgreen'>${cashFormat(target-income)}</span> is required for sufficient cover.`; + } + r += ` ${V.SF.Caps} managed to recruit ${Math.round(FNG/2)} new soldiers this week, and your reputation has <span class='green'>increased through the improvement of trade security</span>.`; + r += `<br>//Your instructions to ${SFC()}://`; + r += `<br> Deployment focus: `; + r += `<span id="focus"> <<if $SF.Target == "recruit">>''Recruiting and Training''<<elseif $SF.Target == "secure">>''Securing Trade Routes''<<else>>''Raiding and Slaving''<</if>></span>. `; + r += `<<link "Recruit and Train">> <<set $SF.Target="recruit">> <<replace "#focus">>''Recruiting and Training''<</replace>> <</link>> | <<link "Secure Trade Routes">> <<set $SF.Target="secure">> <<replace "#focus">>''Securing Trade Routes''<</replace>> <</link>> | <<link "Raiding and Slaving">> <<set $SF.Target="raiding">> <<replace "#focus">>''Raiding and Slaving''<</replace>> <</link>>`; + r += `<br> Rules of Engagement: `; + r += `<span id="roe"> <<if $SF.ROE === "hold">>''Hold Fire''<<elseif $SF.ROE === "limited">>''Limited Fire''<<else>>''Free Fire''<</if>></span>. `; + r += `<<link "Hold Fire">> <<set $SF.ROE="hold">> <<replace "#roe">>''Hold Fire''<</replace>> <</link>> | <<link "Limited Fire">> <<set $SF.ROE="limited">> <<replace "#roe">>''Limited Fire''<</replace>> <</link>> | <<link "Free Fire">> <<set $SF.ROE="free">> <<replace "#roe">>''Free Fire''<</replace>> <</link>>`; + r += `<br> Accountability: `; + r += `<span id="accountability"> <<if $SF.Regs === "strict">>''Strict Accountability''<<elseif $SF.Regs === "some">>''Some Accountability''<<else>>''No Accountability''<</if>></span>. `; + r += `<<link "Strict Accountability">> <<set $SF.Regs="strict">> <<replace "#accountability">>''Strict Accountability''<</replace>> <</link>> | <<link "Some Accountability">> <<set $SF.Regs="some">> <<replace "#accountability">>''Some Accountability''<</replace>> <</link>> | <<link "No Accountability">> <<set $SF.Regs="none">> <<replace "#accountability">>''No Accountability''<</replace>> <</link>>`; + if (V.SF.MercCon.View > 0 && V.SF.MercCon.CanAttend === 1) { + V.SF.MercCon.Income=0; V.SF.MercCon.Menials=0; + var tradeShowAttendes=200, menialGiftsPerAttendee=5, NewMercs=0; + var menialGifts=Math.ceil(jsRandom(1,((tradeShowAttendes*menialGiftsPerAttendee)/10))); + var TSProfit=Math.ceil(500000*(1+(V.SF.Size/1000))*(1+(V.arcologies[0].prosperity/1000))*T.Env); + V.menials += menialGifts; V.SF.MercCon.History += 1; + V.SF.MercCon.Menials += menialGifts; V.SF.MercCon.TotalMenials += menialGifts; + V.SF.MercCon.Income += TSProfit; V.SF.MercCon.Revenue += TSProfit; + cashX(TSProfit, "specialForces"); + if (V.secExp > 0 && V.mercenaries > 0) { V.SF.MercCon.Mercs=0; + NewMercs=jsRandom(1,(tradeShowAttendes/10)); + V.mercFreeManpower += NewMercs; V.SF.MercCon.TotalMercs += NewMercs; + V.SF.MercCon.Mercs += NewMercs; + } + r += `<br>''TradeShow'': During a break, The Colonel managed to sell some generic schematics to the ${tradeShowAttendes} attendees, some of whom decided to also give a few menial slaves as a bonus.<br>`; + } + return r; +}; + +window.SFNameCapsCheck = function() { + const V=State.variables; + if (V.SF.Lower != "the special force") V.SF.Caps=V.SF.Lower.replace("the ", "The "); +}; + +window.SFUpgradeCost = function(cost,unit) { + const V=State.variables,T=State.temporary,S=V.SF.Squad; var value=0; + //return Math.ceil(cost*T.Env*(1.15+(V.SF.Size/10))*(1.15+(unit/100))*HSM()); + value=cost*T.Env*(1.15+(V.SF.Size/10))*(1.15+(unit/100)); + if ([S.Sub,S.AircraftCarrier,S.MissileSilo,S.GiantRobot,S.Satellite.lv,S.GunS,S.SpacePlane,S.Drones].includes(unit)) value *= V.HackingSkillMultiplier; + return Math.ceil(value); +}; + +window.progress = function(x,max) { + var out = `â`, z, i; + if (max === undefined) { + Math.clamp(x,0,10); + if (State.variables.SF.Size < 30) { + z = 5 - x; + for (i=0;i<x;i++) out += `â–ˆâ`; + for (i=0;i<z;i++) out += `<span style=\"opacity: 0;\">â–ˆ</span>â`; + for (i=0;i<5;i++) out += `â–‘â`;} + else { + z = 10 - x; + for (i=0;i<x;i++) out += `â–ˆâ`; + for (i=0;i<z;i++) out += `<span style=\"opacity: 0;\">â–ˆ</span>â`;}} + else { + Math.clamp(x,0,max); + x=Math.floor(10*x/max); + z=10 - x; + for (i=0;i<x;i++) out += `â–ˆâ`; + for (i=0;i<z;i++) out += `<span style=\"opacity: 0;\">â–ˆ</span>â`;} + return `${out}`; +}; + +window.SFC = function() { + const V=State.variables; + if (V.SF.MercCon.CanAttend === -1) {return `The Colonel`;} + else { + if (V.SF.Facility.LCActive > 0) {return `Lieutenant Colonel ${SlaveFullName(V.SF.Facility.LC)}`;} + else {return `a designated soldier`;}} +}; + +window.SFCR = function() { + const V=State.variables, C=V.SF.Colonel; + if (C.Status <= 19) {return `boss`;} + else if (C.Status <= 39) {return `friend`;} + else {return `fuckbuddy`;} +}; + +window.Interactions = function() { + const V=State.variables, C=V.SF.Colonel, T=State.temporary; + var choice=``; time=``; + if (V.SF.Gift > 0) { + if (V.choice == 1) { + choice +=`${V.SF.Caps} is turning over spare capital in tribute this week. `; + if (V.SF.MercCon.CanAttend === -1 && (C.Talk + C.Fun !== 1)) { + choice += `"I think I can find <span class='yellowgreen'>${cashFormat(Math.ceil(V.CashGift))}</span> for you, boss."`; + } else { + choice += `"We can spare <span class='yellowgreen'>${cashFormat(Math.ceil(V.CashGift))}</span> in tribute this week, boss".`; } + } else if (V.choice == 2) { + choice += `${V.SF.Caps} will be throwing a military parade this week. `; + if (V.SF.MercCon.CanAttend === -1 && (C.Talk + C.Fun !== 1)) { + choice += `"I expect the <span class='green'>public to enjoy</span> the parade, boss."`; + } else { + choice += `"I'll have plans for an <span class='green'>popular parade</span> on your desk, boss".`; } + } else if (V.choice == 3) { + choice += `${V.SF.Caps} will be conducting corporate sabotage on rival arcologies' businesses. `; + if (V.SF.MercCon.CanAttend === -1 && (C.Talk + C.Fun !== 1)) { + choice += `"Our interests should see a <span class='yellowgreen'>big boost,</span> boss."`; + } else { + choice += `"Your <span class='yellowgreen'>arcology's business prospects should see an improvement</span> this week, boss".`; } + } + } if (C.Talk + C.Fun > 0) time=`<br>The Colonel is busy for the rest of the week, so the Lieutenant Colonel will assist you.`; + return `${time} <br>${choice}`; +}; + window.BadOutcome = function() { const V=State.variables,t=`The Colonel's`; var r =``;V.SF.Active=-2; switch(V.SF.Colonel.Core) { @@ -684,6 +558,264 @@ window.BadOutcome = function() { window.FlavourText = function() { const V=State.variables,T=State.temporary,S=V.SF.Squad; + function TroopDec() { + const common=`the ${commaNum(V.SF.Squad.Troops)} members of ${V.SF.Lower}`; + if (S.Troops < 100) {return `sparsely occupied, ${common} residing within them concentrating together in a corner. The hundreds of empty beds and lockers visibly herald the future`;} + else if (S.Troops < 400) {return `lightly occupied, with ${common} starting to spread out across them`;} + else if (S.Troops < 800) {return `moderately occupied, though ${common} residing within have a considerable amount of extra room`;} + else if (S.Troops < 1500) {return `well-occupied, and ${common} residing within have started to form small cliques based on section and row`;} + else {return `near capacity, and ${common} often barter their personal loot, whether it be monetary or human, for the choicest bunks`;} + } + + function Firebase() { + var appear=`is currently constructed in a haphazard fashion.`; var barracks=`Soldiers' cots are mixed in with weapons crates and ammunition.`; var slave=`Cages for processing slaves lie off to one side,`; var common=`and in the center is a common area with tables for soldiers to gather around for meals or rowdy conversations.`; var garage=``; var drone=``; var hangar=``; var launch=``; var artillery=``; var comms=``; var training=``; + if (S.Firebase >= 1) {appear=`has had some organization put into it.`; barracks=`The majority of weapons, armor, and ammunition have been separated from the soldiers' cots into their own armory.`; garage=`A section near the outer wall of the arcology has been converted to a garage with an adjoining vehicle maintenance bay`; drone=`.`; + if (V.terrain === "oceanic") garage += ` for inter-arcology travel`;} + if (S.Firebase >= 2) barracks=`A barracks has been constructed near the armory, allowing soldiers a quieter place to sleep and store their personal spoils.`; drone=`; as well as a facility for the storage, maintenance, and deployment of armed combat drones.`; + if (S.Firebase >= 3) appear=`has become more permanent.`; barracks=`A command center has been constructed near the barracks and armory, allowing for additional support personnel.`; + if (S.Firebase >= 4) hangar=`Hangar space for storing and repairing aircraft has been converted from unused space on the other side of the garage.`; + if (S.Firebase >= 5) { + appear=`is nearing the appearance of a military base.`; launch=`The rest of the firebase has been designated for special projects.`; artillery=`Artillery batteries are set around the base of the arcology.`; + if (V.terrain === "oceanic" || V.terrain === "marine") launch += ` A Naval Yard has been constructed in the waters near the arcology.`;} + if (S.Firebase >= 6) common=`and in the center is a common area for recreation, including a small movie theater and a mess hall.`; + if (S.Firebase >= 7) {slave=`A slave detention facility has been sectioned off to one side`; + if (V.SF.Depravity > 1.5) slave += ` emanating the sounds of rape and torture`; + slave += `;`;} + if (S.Firebase >= 8) appear=`has become a fully fledged military base.`; comms=`A Free City-wide communication network for ${V.SF.Lower} has been constructed to facilitate faster responses and efficient monitoring of the surrounding area.`; + if (S.Firebase >= 9) training=`A high-tech killhouse has been constructed to aid in soldier training.`; + if (S.Firebase >= 10) artillery=`Railgun artillery batteries are set around the base of the arcology, capable of accurately destroying enemies an absurd distance away.`; + return `The firebase ${appear} ${barracks} ${comms} ${training} ${slave} ${common} ${garage}${drone} ${hangar} ${launch} ${artillery}`; + } + + function Armoury() { + var weapons=`The weapons are mostly worn rifles that have already seen years of service before ${V.SF.Lower} acquired them.`; var armor=`The body armor is enough to stop smaller calibers, but nothing serious.`; var comms=``; var helmets=``; var ammo=``; var uniforms=``; var special=``; var exo=``; + if (S.Armoury >= 1) comms=`Radios have been wired into the soldiers helmets`; helmets=`.`; + if (S.Armoury >= 2) helmets=` and a HUD has been integrated into the soldier's eyewear.`; + if (S.Armoury >= 3) ammo=`Tactical vests have been provided, allowing soldiers to carry additional ammo.`; + if (S.Armoury >= 4) armor=`The body armor is a newer variant, able to stop small arms fire and protect against shrapnel.`; + if (S.Armoury >= 5) weapons=`The weapons are modern rifles and sidearms, putting ${V.SF.Lower} on par with rival mercenary outfits.`; + if (S.Armoury >= 6) uniforms=`New uniforms have been distributed that are more comfortable and made of breatheable fabric to keep soldiers from overheating.`; + if (S.Armoury >= 7) special=`Specialized weaponry is available for various roles, allowing more flexibility in planning.`; + if (S.Armoury >= 8) helmets=`and a HUD and camera display have been integrated into soldiers' eyewear, enabling accurate aim around corners or from behind cover`; + if (S.Armoury >= 9) exo=`An exosuit has been developed to reduce the amount of weight soldiers carry, increase lifting strength, and move faster in combat.`; + if (S.Armoury >= 10) weapons=`Cutting-edge weaponry is available to ${V.SF.Lower}, far outpacing the ability of rival mercenary outfits.`; + return `The armory holds soldiers' weapons and gear while not in training or combat. ${weapons} ${special} ${armor} ${comms}${helmets} ${ammo} ${uniforms} ${exo}`; + } + + function Drugs() { + var amphet=``; var phen=``; var steroid=``; var downer=``; var concen=``; var stimpack=``; var stabilizer=``; + if (S.Drugs >= 1) amphet=`Amphetamines have been added to the cocktail at a low dosage to act as a stimulant, physical performance enhancer, cognition control enhancer. Some side-effects exist.`; + if (S.Drugs >= 2) phen=`Phencyclidine has been added to the cocktail at a low dosage as a dissociative psychotropic for soldiers in battle to introduce feelings of detachment, strength and invincibility, and aggression. Some side-effects reduce the tolerable dosage before soldiers go on uncontrollable violent outbreaks.`; + if (S.Drugs >= 3) steroid=`Testosterone is being produced for soldiers in training as a natural muscle growth stimulant and to invoke aggression.`; + if (S.Drugs >= 4) downer=`Zaleplon is being produced as a downer to counteract the battle cocktail and encourage rest before combat.`; + if (S.Drugs >= 5) concen=`Methylphenidate has been added to the cocktail as a stimulant and to improve soldier concentration.`; + if (S.Drugs >= 6) phen=`A phencyclidine-based drug has been added to the cocktail as a dissociative psychotropic for soldiers in battle to introduce controllable feelings of detachment, strength and invincibility, and aggression.`; + if (S.Drugs >= 7) steroid=`Low levels of anabolic steroids are being produced for soldiers in training to stimulate muscle growth and invoke aggression.`; + if (S.Drugs >= 8) amphet=`Diphenylmethylsulfinylacetamide has been added to the cocktail to counteract the effects of sleep deprivation and promote alertness.`; + if (S.Drugs >= 9) stimpack=`A stimpack of the battle cocktail is being given to soldiers in battle to take if the original dose wears off before the battle is over.`; + if (S.Drugs >= 10) stabilizer=`A stabilizer has been added to the battle cocktail that helps tie effects together while reducing side-effects, leading to an effectively safe supersoldier drug.`; + return `A drug lab has been established to increase the effectiveness of ${V.SF.Lower}'s soldiers. Many of these chemicals are mixed into a single 'battle cocktail' to be taken before combat. ${amphet} ${phen} ${concen} ${steroid} ${downer} ${stimpack} ${stabilizer}`; + } + + function LUAV() { + var a=`have been recommissioned for use by ${V.SF.Lower}`; var b=`.`; var c=``; var d=``; var e=``; var f=``; var g=``; var h=``; var i=``; var j=``; var k=``; + if (S.Drones >= 2) a=`equipped with missiles are resting on one side of the drone bay`; b=`; as well as destroying the occasional target.`; + if (S.Drones >= 3) c=`A fleet of`; d=`large delivery quadcopters have been converted for military service to support ground forces as combat drones.`; + if (S.Drones >= 4) d=`combat drones take up the rest of the space in the drone bay. They have a`; e=`small automatic rifle`; f=`mounted to the underside.`; + if (S.Drones >= 5) g=`Armor has been added to protect vulnerable components from small arms fire.`; + if (S.Drones >= 6) h=`The fleet's batteries have been replaced with higher capacity models, increasing the functional time spent in combat.`; + if (S.Drones >= 7) i=`The propellers and motors have been upgraded, increasing maneuverability and speed.`; + if (S.Drones >= 8) j=`The drone control signal has been boosted and encrypted, giving the drones a greater range and protecting against electronic warfare.`; + if (S.Drones >= 9) e=`light machine gun`; + if (S.Drones >= 10) k=`A drone-to-drone network has been installed, allowing drones to swarm, maneuver, and attack targets autonomously.`; + return `Surveillance drones ${a}. During combat, they supply aerial intel to commanders and act as the communications network for ground forces${b} ${c} ${d} ${e} ${f} ${g} ${h} ${i} ${j} ${k}`; + } + + function AV() { + var b=`has been recommissioned for use by ${V.SF.Lower}. They`; var c=`; var mechanics are methodically checking the recent purchases for battle-readiness`; var MG=`120 mm main gun is enough to handle the majority of opponents around the Free Cities.`; var engine=``; var armor=``; var armor2=``; var ammo=``; var mg=``; var fireC0=``; var fireC1=``; var fireC2=``; var fireC3=``; var turret=``; + if (S.AV >= 2) engine=`The engine has been overhauled, allowing much faster maneuvering around the battlefield.`; b=``; c=``; + if (S.AV >= 3) armor=`A composite ceramic armor has replaced the original, offering much greater protection from attacks.`; + if (S.AV >= 4) ammo=`The tanks have been outfitted with additional types of ammo for situational use.`; + if (S.AV >= 5) mg=`A remote-controlled .50 cal machine gun has been mounted on the turret to handle infantry and low-flying aircraft.`; + if (S.AV >= 6) fireC0=`A fire-control system`; fireC3=`been installed, guaranteeing`; fireC2=`has`; fireC1=`accurate fire.`; + if (S.AV >= 7) fireC2=`and an autoloader have`; fireC1=`rapid, accurate fire while separating the crew from the stored ammunition in the event the ammo cooks off.`; + if (S.AV >= 8) armor2=`A reactive armor system has been added, giving the tank an additional, if temporary, layer of protection.`; + if (S.AV >= 9) turret=`The turret has been massively redesigned, lowering the tank profile and increasing the efficiency of the mechanisms within.`; + if (S.AV >= 10) MG=`140 mm main gun can quash anything even the greatest Old World nations could muster.`; + return `A fleet of main battle tanks ${b} are parked in the garage${c}. ${turret} The ${MG} ${ammo} ${mg} ${fireC0} ${fireC2} ${fireC3} ${fireC1} ${engine} ${armor} ${armor2}`; + } + + function TV() { + var B=`has been recommissioned for use by ${V.SF.Lower}. They`; var C=`; var mechanics are giving the new purchases a final tuneup`; var squad=`a squad`; var G1=`20`; var G2=`in a firefight`; var e0=`The engine has been`; var engine=``; var armor=``; var tires=``; var m1=``; var m2=``; var pod1=``; var pod2=``; + if (S.TV >= 2) engine=`${e0} overhauled, allowing for higher mobility.`; C=``; B=``; + if (S.TV >= 3) armor=`Composite armor has been bolted to the exterior, increasing the survivability of an explosive attack for the crew and passengers.`; + if (S.TV >= 4) tires=`The tires have been replaced with a much more durable version that can support a heavier vehicle.`; + if (S.TV >= 5) m1=`An automatic missile defense system has been installed,`; m2=`targeting any guided missiles with laser dazzlers and deploying a smokescreen.`; + if (S.TV >= 6) pod1=`An anti-tank missile pod`; pod2=`has been installed on the side of the turret.`; + if (S.TV >= 7) G1=`25`; G2=`by attacking enemies through cover and destroying light armor`; + if (S.TV >= 8) pod2=`and an anti-aircraft missile pod have been installed on either side of the turret.`; + if (S.TV >= 9) squad=`two squads`; armor=``; m2=`destroying any incoming missiles with a high-powered laser. Some of the now redundant composite armor has been removed, and the reclaimed space allows for more passengers.`; + if (S.TV >= 10) engine=`${e0} replaced with the newest model, allowing the vehicle to get in and out of the conflict extremely quickly.`; + return `A fleet of infantry fighting vehicles ${B} are parked in the garage${C}. The IFVs can carry ${squad} of 6 to a firezone. The ${G1} mm autocannon supports infantry ${G2}. ${pod1} ${pod2} ${engine} ${armor} ${tires} ${m1} ${m2}`; + } + + function PGT() { + var b=`has been sold to ${V.SF.Lower} through back channels to support a failing Old World nation. The tank is so large it cannot fit inside the garage, and has`; var c=``; var engines=`. Two engines power the left and right sides of the tank separately, leaving it underpowered and slow`; var gun0=``; var gun1=``; var gun2=`an undersized main gun and makeshift firing system from a standard battle tank`; var armor1=``; var armor0=``; var cannon=``; var laser=``; var PGTframe=``; + if (S.PGT >= 2) c=`rests in`; b=``; engines=` and powered by their own engine, allowing the tank to travel with an unsettling speed for its massive bulk`; + if (S.PGT >= 3) gun0=`a railgun capable of`; gun1=`firing steel slugs`; gun2=`through one tank and into another`; + if (S.PGT >= 4) armor0=`reinforced, increasing survivability for the crew inside.`; armor1=`The armor has been`; + if (S.PGT >= 5) cannon=`A coaxial 30mm autocannon has been installed in the turret, along with automated .50 cal machine guns mounted over the front treads.`; + if (S.PGT >= 6) laser=`Laser anti-missile countermeasures have been installed, destroying any subsonic ordinance fired at the Goliath.`; + if (S.PGT >= 7) PGTframe=`The frame has been reinforced, allowing the Goliath to carry more armor and guns.`; + if (S.PGT >= 8) armor0=`redesigned with sloping and state-of-the-art materials, allowing the Goliath to shrug off even the most advanced armor-piercing tank rounds.`; + if (S.PGT >= 9) gun1=`firing guided projectiles`; + if (S.PGT >= 10) gun0=`a twin-barreled railgun capable of rapidly`; + return `A prototype Goliath tank ${b}${c} its own garage housing built outside the arcology. The massive bulk is spread out over 8 tracks, two for each corner of the tank${engines}. The turret is equipped with ${gun0} ${gun1} ${gun2}. ${cannon} ${armor1} ${armor0} ${laser} ${PGTframe}`; + } + + function AA() { + var W1=`only armed`; var W2=`;`; var W3=`a poor weapon against flying targets, but enough to handle ground forces`; var group=`A small group of attack VTOL have been recommissioned for use by ${V.SF.Lower}, enough to make up a squadron`; var engines=``; var TAI=``; var lock=``; var support=``; var stealth=``; var scramble=``; var PAI=``; + if (S.AA >= 2) W1=`armed`; W2=` and air-to-air missiles,`; W3=`a combination that can defend the arcology from enemy aircraft, as well as`; support=` support ground troops`; + if (S.AA >= 3) engines=`The engines have been tuned, allowing faster flight with greater acceleration.`; + if (S.AA >= 4) TAI=`An advanced targeting AI has been installed to handle all control of weapons, allowing much more efficient use of ammunition and anti-countermeasure targeting.`; + if (S.AA >= 5) lock=`Installed multispectrum countermeasures protect against all types of missile locks.`; + if (S.AA >= 6) group=`A respectable number of attack VTOL protect your arcology, split into a few squadrons`; + if (S.AA >= 7) support=` attack ground targets`; W2=`; rocket pods, and air-to-air missiles,`; + if (S.AA >= 8) stealth=`The old skin has been replaced with a radar-absorbent material, making the aircraft difficult to pick up on radar.`; + if (S.AA >= 9) scramble=`The VTOLs can scramble to react to any threat in under three minutes.`; + if (S.AA >= 10) PAI=`A piloting AI has been installed, allowing the VTOLs to perform impossible maneuvers that cannot be done by a human pilot. This removes the need for a human in the aircraft altogether.`; + return `${group}. Several of the landing pads around $arcologies[0].name host groups of four fighters, ready to defend the arcology. ${scramble} The attack VTOL are currently ${W1} with a Gatling cannon${W2} ${W3}${support}. ${TAI} ${PAI} ${engines} ${lock} ${stealth}`; + } + + function TA() { + var Num=`number`; var type=`tiltrotor`; var capacity=`small platoon or 15`; var engines=``; var engines2=``; var Radar=``; var Armor=``; var landing=``; var miniguns=``; var counter=``; + if (S.TA >= 2) engines=`The tiltrotor engines have been replaced with a more powerful engine, allowing faster travel times.`; + if (S.TA >= 3) counter=`Multispectrum countermeasures have been added to protect against guided missiles.`; + if (S.TA >= 4) miniguns=`Mounted miniguns have been installed to cover soldiers disembarking in dangerous areas.`; + if (S.TA >= 5) Num=`large number`; + if (S.TA >= 6) landing=`The landing equipment has been overhauled, protecting personnel and cargo in the event of a hard landing or crash.`; + if (S.TA >= 7) Armor=`Armor has been added to protect passengers from small arms fire from below.`; + if (S.TA >= 8) capacity=`large platoon or 20`; engines2=`Further tweaks to the engine allow for greater lifting capacity.`; + if (S.TA >= 9) Radar=`Radar-absorbent materials have replaced the old skin, making it difficult to pick up the VTOL on radar.`; + if (S.TA >= 10) type=`tiltjet`; engines2=``; engines=`The tiltrotors have been replaced with tiltjets, allowing for much greater airspeed and acceleration.`; + return `A ${Num} of transport ${type} VTOL have been recommissioned for use by ${V.SF.Lower}. The VTOLs are resting on large pads near the base to load either a ${capacity} tons of material. ${engines} ${engines2} ${Armor} ${landing} ${counter} ${Radar} ${miniguns}`; + } + + function SP() { + var engine=`ramjet engines in the atmosphere that can reach Mach 10`; var b=`has been purchased from an insolvent Old World nation. It `; var shield=``; var camera=``; var efficiency=``; var camera2=``; var drag=``; var crew=``; var engine2=``; var skin=``; + if (S.SpacePlane >= 2) b=``; shield=`The current heat shielding has been upgraded, reducing the likelihood of heat damage during reentry.`; + if (S.SpacePlane >= 3) engine2=` and liquid rocket engines in orbit that can reach an equivalent Mach 18`; + if (S.SpacePlane >= 4) camera=`A state-of-the-art camera has been installed in the underbelly that takes incredibly high resolution photos, but requires the frictionless environment of space to focus.`; + if (S.SpacePlane >= 5) efficiency=`Tweaks to the engines have increased fuel efficiency to the point where midflight refueling is no longer necessary.`; + if (S.SpacePlane >= 6) camera2=`The camera sensor is capable of taking IR shots.`; + if (S.SpacePlane >= 7) drag=`Miraculous advances in aerodynamics and materials allow frictionless flight, even while in the atmosphere.`; + if (S.SpacePlane >= 8) crew=`Increased the crew comfort and life support systems to increase operational time.`; + if (S.SpacePlane >= 9) skin=`Replaced the underbelly skin with a chameleon kit, matching the color to the sky above it.`; + if (S.SpacePlane >= 10) engine=`experimental scramjet engines in the atmosphere that can reach Mach 15`; engine2=` and liquid rocket engines in orbit that can reach an equivalent Mach 25`; + return `A prototype spaceplane ${b} rests in the hangar, its black fuselage gleaming. The craft is powered by ${engine}${engine2}. ${efficiency} ${shield} ${camera} ${camera2} ${drag} ${crew} ${skin}`; + } + + function GunS() { + var a=`has been recommissioned for use by ${V.SF.Lower}. Currently, it `; var b=``; var c=``; var d=``; var e=`Miniguns and Gatling cannons line`; var f=`; var though the distance to ground targets renders the smaller calibers somewhat less useful`; var g=``; var h=``; var i=``; var j=``; var k=``; + if (S.GunS >= 2) b=`Infrared sensors have been added for the gunners to better pick targets.`; a=``; + if (S.GunS >= 3) c=`The underside of the aircraft has been better armored against small-arms fire`; h=`.`; + if (S.GunS >= 4) d=`Larger fuel tanks have been installed in the wings and fuselage, allowing the gunship to provide aerial support for longer periods before refueling.`; + if (S.GunS >= 5) e=`25 mm Gatling cannons`; f=`; allowing the gunship to eliminate infantry`; j=` and light vehicles from above`; k=` and a 40 mm autocannon are mounted on`; + if (S.GunS >= 6) g=`The engines have been replaced, allowing both faster travel to a target, and slower travel around a target.`; + if (S.GunS >= 7) h=`; and multi-spectrum countermeasures have been installed to protect against guided missiles.`; + if (S.GunS >= 8) b=`Upgraded multi-spectrum sensors can clearly depict targets even with IR shielding.`; + if (S.GunS >= 9) i=`The ammunition storage has been increased, only slightly depriving loaders of a place to sit.`; + if (S.GunS >= 10) j=`; both light and heavy vehicles, and most enemy cover from above`; k=`; a 40 mm autocannon, and a 105 mm howitzer are mounted on`; + return `A large gunship ${a} is being refueled in the hangar. ${e}${k} the port side of the fuselage${f}${j}. ${b} ${i} ${g} ${c}${h} ${d}`; + } + + function Sat() { + var loc=`An unused science satellite has been purchased from an Old World nation. While currently useless, it holds potential to be a powerful tool.`; var gyro=``; var telemetry=``; var thrusters=``; var solar=``; var surviv=``; var laser=``; var heat=``; var reactor=``; var lens=``; var kin=``; + if (S.Satellite.lv >= 2) { + if (V.SF.Squad.Satellite.InOrbit < 1) {loc=`The satellite is being worked on in the Launch Bay.`;} else {loc=`The satellite is in geosynchronous orbit, far above the arcology.`;} + gyro=`A suite of sensors have been installed to ensure the satellite can detect attitude and orbital altitude.`;} + if (S.Satellite.lv >= 3) telemetry=`Telemetry systems have been installed to communicate with the satellite in orbit, with strong encryption measures.`; + if (S.Satellite.lv >= 4) thrusters=`Thrusters have been installed to control satellite attitude and orbit.`; + if (S.Satellite.lv >= 5) solar=`A massive folding solar panel array, combined with the latest in battery technology allow the satellite to store an enormous amount of energy relatively quickly.`; surviv=`Enough of the satellite has been finished that it can expect to survive for a significant period of time in space.`; + if (S.Satellite.lv >= 6) laser=`A laser cannon has been mounted facing the earth, capable of cutting through steel in seconds`; heat=` while generating a large amount of heat.`; + if (S.Satellite.lv >= 7) heat=`. The installed heatsink allows the laser cannon to fire more frequently without damaging the satellite.`; + if (S.Satellite.lv >= 8) reactor=`A small, efficient nuclear reactor has been installed to continue generating energy while in the Earth's shadow.`; + if (S.Satellite.lv >= 9) lens=`A higher quality and adjustable lens has been installed on the laser, allowing scalpel precision on armor or wide-area blasts on unarmored targets.`; + if (S.Satellite.lv >= 10) kin=`A magazine of directable tungsten rods have been mounted to the exterior of the satellite, allowing for kinetic bombardment roughly equal to a series of nuclear blasts.`; + return `${loc} ${gyro} ${thrusters} ${telemetry} ${solar} ${reactor} ${surviv} ${laser}${heat} ${lens} ${kin}`; + } + + function GR() { + var loc=`has been purchased from a crumbling Old World nation. It`; var power=`Large batteries mounted in oversized shoulders power the robot for up to ten minutes of use, though they make for large targets.`; var knife=`simply a 8.5 meter long knife, though additional weapons are under development.`; var armor=``; var actuator=``; var cannon=``; var heatsink=``; var ammo=``; var missile=``; + if (S.GiantRobot >= 2) loc=``; armor=`Armor plating has been mounted over the majority of the robot.`; + if (S.GiantRobot >= 3) power=`The robot is now powered by an umbilical cable system instead of bulky and short-lived batteries.`; + if (S.GiantRobot >= 4) knife=`a 25 meter plasma sword. The cutting edge uses plasma to melt and cut through targets, reducing the strain on the sword.`; + if (S.GiantRobot >= 5) actuator=`The limb actuators have been replaced with a faster and more powerful variant, granting the robot the same.`; + if (S.GiantRobot >= 6) cannon=`A custom 45 mm Gatling cannon rifle has been developed for ranged use`; ammo=`; though it lacks enough ammo storage for a main weapon.`; + if (S.GiantRobot >= 7) heatsink=`Large heatsinks have been installed out of the back to solve a massive overheating problem. These heatsinks resemble wings, and tend to glow red with heat when in heavy use.`; + if (S.GiantRobot >= 8) armor=``; actuator=`Final actuator tweaks have allowed for the addition of exceptionally thick armor without any loss in speed or power.`; + if (S.GiantRobot >= 9) ammo=`; with spare ammunition drums kept along the robot's waist.`; + if (S.GiantRobot >= 10) missile=`Missile pods have been mounted on the shoulders.`; + return `A prototype giant robot ${loc} rests in a gantry along the side of the arcology. The robot is as tall as a medium-sized office building, focusing on speed over other factors. ${power} ${armor} ${actuator} ${heatsink} The main armament is ${knife} ${cannon}${ammo} ${missile}`; + } + + function ms() { + var a=`A cruise missile launch site has been constructed near the base of`; var b=`outdated, something quickly rigged together to give the launch site something to fire in the case of an attack`; var c=``; var d=``; var e=``; var f=``; var g=``; var h=``; + if (S.MissileSilo >= 2) b=`a modern missile`; c=`; tipped with a conventional warhead`; + if (S.MissileSilo >= 3) d=`The launch systems have been overhauled, allowing a launch within seconds of an attack order being given.`; + if (S.MissileSilo >= 4) e=`The missile engines have been tweaked, giving them a greater range.`; + if (S.MissileSilo >= 5) f=`A passive radar has been installed, allowing the missile to follow moving targets.`; + if (S.MissileSilo >= 6) a=`Several cruise missile launch sites have been constructed around`; + if (S.MissileSilo >= 7) e=`The engine has been replaced, giving the missiles greater range and supersonic speeds.`; + if (S.MissileSilo >= 8) g=`The ability to pick new targets should the original be lost has been added.`; + if (S.MissileSilo >= 9) h=`The missile now uses its remaining fuel to create a thermobaric explosion, massively increasing explosive power.`; + if (S.MissileSilo >= 10) c=` that can be tipped with either a conventional or nuclear warhead`; + return `${a} the arcology. The current missile armament is ${b}${c}. ${d} ${e} ${f} ${g} ${h}`; + } + + function AC() { + var recom=`has been recommissioned from the Old World for ${V.SF.Lower}. It`; var jets=`Formerly mothballed strike jets`; var loc=``; var radar=``; var AA=``; var prop=``; var torp=``; var armor=``; var power=``; var scramble=``; + if (V.week % 6 === 0) { loc=`moored to the pier in the Naval Yard`; } else { loc=`patrolling the waters near $arcologies[0].name`; } + if (S.AircraftCarrier >= 2) radar=`The island's radar and comms have been improved.`; recom=``; + if (S.AircraftCarrier >= 3) AA=`The antiair guns have been updated to automatically track and predict enemy aircraft movement.`; + if (S.AircraftCarrier >= 4) jets=`Modern strike jets with state-of-the-art armaments`; + if (S.AircraftCarrier >= 5) prop=`The propellers have been redesigned, granting greater speed with less noise.`; + if (S.AircraftCarrier >= 6) torp=`An anti-torpedo system detects and destroys incoming torpedoes.`; + if (S.AircraftCarrier >= 7) armor=`Additional armor has been added to the hull and deck.`; + if (S.AircraftCarrier >= 8) power=`The power plant has been converted to provide nuclear power.`; + if (S.AircraftCarrier >= 9) scramble=`The catapult has been converted to an electromagnetic launch system, halving the time it takes to scramble jets.`; + if (S.AircraftCarrier >= 10) jets=`Attack VTOL from the converted for carrier capability`; + return `An aircraft carrier ${recom} is ${loc}. ${jets} serve as its airpower. ${scramble} ${power} ${radar} ${AA} ${torp} ${prop} ${armor}`; + } + + function Sub() { + var recom=`has been recommissioned from the old world, and`; var reactor=`Because diesel engines provide power and breathing oxygen is kept in pressurized canisters, the sub must frequently surface.`; var reactor1=``; var cal=``; var hull=``; var tubes=``; var torpedoes=``; var sonar=``; var control=``; var missiles=``; + if (S.Sub >= 2) recom=``; reactor=`A nuclear reactor provides power`; reactor1=`; but because oxygen is still kept in pressurized canisters the sub must frequently surface to replenish its oxygen stocks.`; + if (S.Sub >= 3) reactor1=` and an oxygen generator pulls Oâ‚‚ from the surrounding seawater, allowing the submarine to remain underwater for months if necessary.`; + if (S.Sub >= 4) cal=`Calibration of the propulsion systems has reduced the telltale hum of a moving sub to a whisper.`; + if (S.Sub >= 5) hull=`The outer hull has been redesigned for hydrodynamics and sonar absorption.`; + if (S.Sub >= 6) tubes=`The torpedo tubes have been redesigned for faster loading speeds`; torpedoes=`.`; + if (S.Sub >= 7) sonar=`The passive sonar has been finely tuned to detect mechanical noises miles away.`; + if (S.Sub >= 8) control=`The control room computers have been upgraded to automate many conn duties.`; + if (S.Sub >= 9) torpedoes=`and launch more agile torpedoes.`; + if (S.Sub >= 10) missiles=`The submarine has been outfitted with several cruise missiles to attack land or sea-based targets.`; + return `An attack submarine ${recom} is moored to the pier of the Naval Yard. ${reactor}${reactor1} ${cal} ${hull} ${tubes}${torpedoes} ${sonar} ${control} ${missiles}`; + } + + function HAT() { + var recom=`; has been recommissioned for use by ${V.SF.Lower}. It`; var tons=`200`; var skirt=``; var guns=``; var guns2=``; var fans=``; var speed=``; var turbines=``; var armor=``; var ramps=``; var HATframe=``; var loadout=``; + if (S.HAT >= 2) skirt=`The skirt has been upgraded to increase durability and improve cushion when traveling over uneven terrain and waves.`; recom=`;`; + if (S.HAT >= 3) guns=`A minigun`; guns2=`has been mounted on the front corners of the craft to defend against attackers.`; + if (S.HAT >= 4) fans=`The turbines powering the rear fans`; speed=`acceleration and speed.`; turbines=`have been replaced with a more powerful version, allowing greater`; + if (S.HAT >= 5) armor=`The armor protecting its cargo has been increased.`; + if (S.HAT >= 6) tons=`300`; fans=`The turbines powering the rear fans and impeller`; speed=`acceleration, speed, and carrying capacity.`; + if (S.HAT >= 7) guns=`A minigun and grenade launcher`; + if (S.HAT >= 8) ramps=`The loading ramps have been improved, allowing for faster unloading.`; + if (S.HAT >= 9) HATframe=`The frame has been widened and reinforced, allowing for more space on the deck.`; + if (S.HAT >= 10) loadout=`An experimental loadout sacrifices all carrying capacity to instead act as a floating gun platform by mounting several rotary autocannons the deck, should the need arise.`; + return `An air cushion transport vehicle, or hovercraft${recom} is parked on the pier of the Naval Yard, ready to ferry ${tons} tons of soldiers and vehicles. ${guns} ${guns2} ${fans} ${turbines} ${speed} ${skirt} ${armor} ${ramps} ${HATframe} ${loadout}`; + } + var r=``; V.nextButton=" "; r += `<br>`; r +=`You continue towards the common area, the soldiers you pass, nod respectfully, salute, or bow slightly, as they please. You pass the briefing areas, the officers and sergeants of the force are conferring over planning tables and display screens regarding their upcoming deployments.`; @@ -801,200 +933,6 @@ window.FlavourText = function() { return r; }; -window.SFReport = function() { - const V=State.variables,T=State.temporary,S=V.SF.Squad; - var incomeTarget=50000,unitCap=2500,SFIncome=5000; - var actionMultiplier=1,troopMultiplier=1,unitMultiplier=1,depravityMultiplier=1,SFupkeep=0; - var FNG=10,Trade=0.025; V.SFUC=0; Count(); - if (S.Troops > unitCap) S.Troops=unitCap; - if (S.Troops < 100) { S.Troops += Math.ceil(jsRandom(2,5)); - } else { - if (V.SF.Target === "recruit") { - S.Troops += Math.ceil(jsRandom(-1*S.Troops/100,0)); - } else if (V.SF.Target === "raiding") { - S.Troops += Math.ceil(jsRandom(-3*S.Troops/100,-4*S.Troops/100)); - } else { S.Troops += Math.ceil(jsRandom(-2*S.Troops/100,-3*S.Troops/100)); } - } - if (V.SF.UC.Assign > 0) { - if (V.SF.UC.Assign < 2) { V.SFUC=Math.ceil(S.Troops*.1); - } else { V.SFUC=Math.ceil(S.Troops*.25); } - } S.Troops -= V.SFUC; - if (S.Troops > 200) { Trade += 0.05*(Math.ceil(S.Troops/100)); - troopMultiplier=S.Troops/200; SFupkeep += S.Troops*25; - if (V.secExp > 0) { - V.authority += 25*(Math.ceil(S.Troops/200)); V.authority=Math.clamp(V.authority, 0, 20000); - } - } - - if (S.Firebase > 0) { - FNG += S.Firebase; Trade += 0.5*S.Firebase; unitMultiplier += 7.5*S.Firebase+2*Math.pow(S.Firebase,2); SFupkeep += 95*(10+S.Firebase); - } - if (S.Armoury > 0) { - FNG += 2*S.Armoury; Trade += 0.25*S.Armoury; unitMultiplier += 7.5*S.Armoury+2*Math.pow(S.Armoury,2); SFupkeep += 55*S.Armoury; - } - if (S.Drugs > 0) { - FNG += S.Drugs; Trade += 0.25*S.Drugs; unitMultiplier += 7.5*S.Drugs+2*Math.pow(S.Drugs,2); SFupkeep += 35*S.Drugs; - } - if (S.Firebase >= 1) { - if (S.AV > 0) { - FNG += S.AV; Trade += 0.25*S.AV; unitMultiplier += 7.5*S.AV+2*Math.pow(S.AV,2); SFupkeep += 89*S.AV; - } - if (S.TV > 0) { - FNG += S.TV; Trade += 0.25*S.TV; unitMultiplier += 7.5*S.TV+2*Math.pow(S.TV,2); SFupkeep += 89*S.TV; - } - if (S.PGT > 0) { - FNG += S.PGT; Trade += 0.25*S.PGT; unitMultiplier += 15*S.PGT+3*Math.pow(S.PGT,2); SFupkeep += 100*S.PGT; - } - } - if (S.Firebase >= 2 && S.Drones > 0) { - FNG += S.Drones; Trade += 0.5*S.Drones; unitMultiplier += 7.5*S.Drones+2*Math.pow(S.Drones,2); SFupkeep += 50*S.Drones; - } - - if (S.Firebase >= 4) { - if (S.AA > 0) { - FNG += S.AA; Trade += 0.25*S.AA; unitMultiplier += 7.5*S.AA+2*Math.pow(S.AA,2); SFupkeep += 100*S.AA; - } - if (S.TA > 0) { - FNG += S.TA; Trade += 0.25*S.TA; unitMultiplier += 7.5*S.TA+2*Math.pow(S.TA,2); SFupkeep += 80*S.TA; - } - if (S.SpacePlane > 0) { - FNG += S.SpacePlane; Trade += 0.25*S.SpacePlane; unitMultiplier += 7.5*S.SpacePlane+2*Math.pow(S.SpacePlane,2); SFupkeep += 100*S.SpacePlane; - } - if (S.GunS > 0) { - FNG += S.GunS; Trade += 0.25*S.GunS; unitMultiplier += 12*S.GunS+3*Math.pow(S.GunS,2); SFupkeep += 70*S.GunS; - } - if (S.Satellite.lv > 0 && S.Satellite.InOrbit > 0) { - FNG += S.Satellite.lv; Trade += 0.25*S.Satellite.lv; unitMultiplier += 15*S.Satellite.lv+5*Math.pow(S.Satellite.lv,2); SFupkeep += 85*S.Satellite.lv; - } - if (S.GiantRobot > 0) { - FNG += S.GiantRobot; Trade += 0.25*S.GiantRobot; unitMultiplier += 15*S.GiantRobot+5*Math.pow(S.GiantRobot,2); SFupkeep += 95*S.GiantRobot; - } - if (S.MissileSilo > 0) { - FNG += S.MissileSilo; Trade += 0.25*S.MissileSilo; unitMultiplier += 15*S.MissileSilo+5*Math.pow(S.MissileSilo,2); SFupkeep += 100*S.MissileSilo; - } - } - - if (S.AircraftCarrier > 0) { - FNG += S.AircraftCarrier; Trade += 0.25*S.AircraftCarrier; unitMultiplier += 9*S.AircraftCarrier+3*Math.pow(S.AircraftCarrier,2); SFupkeep += 80*S.AircraftCarrier; - } - if (S.Sub > 0) { - FNG += S.Sub; Trade += 0.25*S.Sub; unitMultiplier += 7.5*S.Sub+2*Math.pow(S.Sub,2); SFupkeep += 90*S.Sub; - } - if (S.HAT > 0) { - FNG += S.HAT; Trade += 0.25*S.HAT; unitMultiplier += 7.5*S.HAT+2*Math.pow(S.HAT,2); SFupkeep += 70*S.HAT; - } - - var SFD=V.SF.Depravity; - switch (V.SF.Colonel.Core) { - case "kind": - FNG += 10; Trade += 0.15; SFD -= 0.15; - break; - case "cruel": - Trade -= 0.15; SFD += 0.15; - break; - case "brazen": - FNG += 15; unitMultiplier += 0.5; - break; - case "jaded": - Trade -= 0.05; SFD += 0.05; - break; - case "shell shocked": - Trade += 0.05; SFD -= 0.05; unitMultiplier -= 0.5; - break; - } - if (V.SF.Target === "raiding") { SFD += 0.05; actionMultiplier += 0.5; - } else if (V.SF.Target === "secure") { SFD -= 0.05; actionMultiplier += 0.2; - } else { SFD -= 0.1; actionMultiplier -= 0.5; } - if (V.SF.ROE === "free") { actionMultiplier *= 0.8; SFD += 0.05; Trade += Trade*.95; - } else if (V.SF.ROE == "hold") { actionMultiplier *= 1.1; SFD -= 0.05; Trade += Trade*1.05; } - if (V.SF.Regs === "none") { actionMultiplier *= 0.8; SFD += 0.05; Trade += Trade*.95; - } else if (V.SF.Regs === "strict") { actionMultiplier *= 1.1; SFD -= 0.05; Trade += Trade*1.05; - depravityMultiplier=1+SFD; } - if (SFD > -2) Trade *= 1+SFD/2; - - if (V.SF.Target === "recruit") { FNG += Math.ceil(FNG*.95); - } else { FNG += Math.ceil(FNG*.25); } - if (V.SF.Target === "secure") { V.rep += Math.ceil(V.rep*((Trade/100)*.95)); - V.arcologies[0].prosperity=Math.ceil((V.arcologies[0].prosperity+(Trade/10)*.95)); - } else { V.rep += Math.ceil(V.rep*(Trade/100)*.25); - V.arcologies[0].prosperity=Math.ceil(V.arcologies[0].prosperity+(Trade/10)*.25);} - if (V.secExp > 0) V.authority += V.SF.Size*10; V.authority=Math.clamp(V.authority, 0, 20000); - - SFIncome += Math.ceil((SFIncome*(troopMultiplier/5*unitMultiplier/5*actionMultiplier/5*depravityMultiplier))-SFupkeep); S.Troops += Math.round(FNG/2); - /*Remove below line if hard mode ever gets fixed*/ - if (V.economy < 100) SFIncome=Math.ceil(SFIncome*(1+(V.week/100))); - if (S.Troops > unitCap) S.Troops=unitCap; - if (V.rep > 20000) V.rep=20000; var Profitable=1; - if (V.arcologies[0].prosperity > V.ProsperityCap) V.arcologies[0].prosperity=V.ProsperityCap; - if (SFIncome >= incomeTarget) { V.SF.Subsidy=0; - cashX(SFIncome, "specialForces"); - } else { Profitable=0; } - - var Deaths=0; - if (S.Drugs >= 8 || S.Drugs >= 10) { var SurvivalChance=50; - if (S.Drugs >= 8) { SurvivalChance -= 5; } else if (S.Drugs >= 10) { - SurvivalChance += 5; } - if (jsRandom(0,100) > SurvivalChance) Deaths=jsRandom(0,((S.Drugs*2)+4)); - if (Deaths > 0) S.Troops -= Deaths; - } var r=``; - r += `<br>__Week ${V.week} operational report for ${V.SF.Lower}__:`; - r += `<br>${V.SF.Caps} focused their ${commaNum(S.Troops)} troops on`; - if (V.SF.Target === "recruit") { - r += `recruiting and training more personnel. Smaller parties ventured out to protect the arcology's trade routes and strike targets of opportunity.`; - } else if (V.SF.Target === "secure") { - r += `securing the trade routes between the arcology and the surrounding area. Smaller parties ventured out to strike targets of opportunity and process new recruits.`; - } else { - r += `locating and striking targets of opportunity, capturing both material loot and new slaves. Smaller parties secured the most important of the arcology's trade routes and processed new recruits.`; - } - if (V.SF.UC.Assign > 0) { - r += `<br>A ${V.SF.UC.Assign < 2 ? 'small':'large'} portion of the force was assigned as ${V.SF.UC.Assign < 2 ? 'part':'full'} time undercover officers.`; - } - - if (Deaths > 0) { - r += ` <span class='red'>${Deaths} soldiers fatally overdosed on the drug cocktail</span>`; - if (V.SF.MercCon.CanAttend === -1) r += `, The Colonel's much heavier than average drug use saves her from this side effect.`; - } - r += `<br>These activities have, overall, <span class='green'>improved your arcology's prosperity</span>.`; - r+= ` The goods procured by ${V.SF.Lower} after accounting for the spoils retained by individual soldiers were `; - if (Profitable > 0) { - r += `<span class='green'>more than sufficient to cover expenses</span>. Excess material and human assets totaling <span class='yellowgreen'>${cashFormat(SFIncome)}</span> (after liquidation) were transferred to your accounts.`; - } else { - r += `<span class='red'>barely enough to cover expenses.</span> More growth will be needed to ensure profitability, <span class='yellow'>hopefully purchasing more upgrades will help</span>.`; - r += ` ${SFC()} estimates that an additional <span class='yellowgreen'>${cashFormat(incomeTarget-SFIncome)}</span> is required for sufficient cover.`; - } - r += ` ${V.SF.Caps} managed to recruit ${Math.round(FNG/2)} new soldiers this week, and your reputation has <span class='green'>increased through the improvement of trade security</span>.`; - - r += `<br>//Your instructions to ${SFC()}://`; - r += `<br> Deployment focus: `; - r += `<span id="focus"> <<if $SF.Target == "recruit">>''Recruiting and Training''<<elseif $SF.Target == "secure">>''Securing Trade Routes''<<else>>''Raiding and Slaving''<</if>></span>. `; - r += `<<link "Recruit and Train">> <<set $SF.Target="recruit">> <<replace "#focus">>''Recruiting and Training''<</replace>> <</link>> | <<link "Secure Trade Routes">> <<set $SF.Target="secure">> <<replace "#focus">>''Securing Trade Routes''<</replace>> <</link>> | <<link "Raiding and Slaving">> <<set $SF.Target="raiding">> <<replace "#focus">>''Raiding and Slaving''<</replace>> <</link>>`; - r += `<br> Rules of Engagement: `; - r += `<span id="roe"> <<if $SF.ROE === "hold">>''Hold Fire''<<elseif $SF.ROE === "limited">>''Limited Fire''<<else>>''Free Fire''<</if>></span>. `; - r += `<<link "Hold Fire">> <<set $SF.ROE="hold">> <<replace "#roe">>''Hold Fire''<</replace>> <</link>> | <<link "Limited Fire">> <<set $SF.ROE="limited">> <<replace "#roe">>''Limited Fire''<</replace>> <</link>> | <<link "Free Fire">> <<set $SF.ROE="free">> <<replace "#roe">>''Free Fire''<</replace>> <</link>>`; - r += `<br> Accountability: `; - r += `<span id="accountability"> <<if $SF.Regs === "strict">>''Strict Accountability''<<elseif $SF.Regs === "some">>''Some Accountability''<<else>>''No Accountability''<</if>></span>. `; - r += `<<link "Strict Accountability">> <<set $SF.Regs="strict">> <<replace "#accountability">>''Strict Accountability''<</replace>> <</link>> | <<link "Some Accountability">> <<set $SF.Regs="some">> <<replace "#accountability">>''Some Accountability''<</replace>> <</link>> | <<link "No Accountability">> <<set $SF.Regs="none">> <<replace "#accountability">>''No Accountability''<</replace>> <</link>>`; - if (V.SF.MercCon.View > 0 && V.SF.MercCon.CanAttend === 1) { r += `<br>''TradeShow'':`; - V.SF.MercCon.Income=0; V.SF.MercCon.Menials=0; - var TradeShowAttendes=200, MenialSlavesPerAttendee=5, NewMercs=0; - var MenialSlaves=Math.ceil(jsRandom(1,((TradeShowAttendes*MenialSlavesPerAttendee)/10))); - var TSProfit=Math.ceil(500000*(1+(V.SF.Size/1000))*(1+(V.arcologies[0].prosperity/1000))*T.Env); - r += ` During a break, The Colonel managed to sell some generic schematics to the ${TradeShowAttendes} attendees, some decided to also give menial slaves as a bonus.<br>`; - V.menials += MenialSlaves; V.SF.MercCon.History += 1; - V.SF.MercCon.Menials += MenialSlaves; V.SF.MercCon.TotalMenials += MenialSlaves; - V.SF.MercCon.Income += TSProfit; V.SF.MercCon.Revenue += TSProfit; - cashX(TSProfit, "specialForces"); - if (V.secExp > 0 && V.mercenaries > 0) { V.SF.MercCon.Mercs=0; - NewMercs=jsRandom(1,(TradeShowAttendes/10)); - V.mercFreeManpower += NewMercs; V.SF.MercCon.TotalMercs += NewMercs; - V.SF.MercCon.Mercs += NewMercs; - } - } - if (V.SF.UC.Assign === 1 && V.SF.UC.Lock < 1) V.SF.UC.Assign=0; - V.SF.Upgrade=0; V.SF.Gift=0; V.SF.Colonel.Talk=0; V.SF.Colonel.Fun=0; - return r; -}; - /*window.FSIntegrationMenu = function() { const V=State.variables; const UpgradeOptions=['Slaves','FoodsAndMedia','CommonArea','Barracks', 'SlaveProcessingCages','CommandCenter','Armory','DrugLab','Garage','Hangar', 'DroneBay','PersonalItems','VehicleUpgrades','CommonAreaVendors', 'RoleplayingManadated','ColonelCompilance','ColonelGift']; diff --git a/src/SpecialForce/Upgrades.tw b/src/SpecialForce/Upgrades.tw index d2d1a3b94e1..c2fab8eee12 100644 --- a/src/SpecialForce/Upgrades.tw +++ b/src/SpecialForce/Upgrades.tw @@ -1,115 +1,108 @@ :: Upgrades [nobr] - <br><br>Total upgrade progress: <<print progress($SF.Size,_max)>> + <br><br> <<if $SF.Size !== _max>> Total upgrade progress: <<print progress($SF.Size,_max)>> $SF.Size/_max(<<print ($SF.Size/_max).toFixed(2)>>%) <<if $SF.Size < 30>><br>//<<print (30-$SF.Size )>> more upgrades is needed untill the next tier unlocks.//<</if>> + <<else>>There are no more upgrades available.<</if>> <<if $SF.Upgrade > 0 && ($SF.Size !== _max)>> <<set _cost = Math.ceil(Math.abs($cash*.05*(1.25+($SF.Size/1000))))>> - <br>[[Re-unlock upgrading.|Firebase][$SF.Upgrade = 0,cashX(forceNeg(_cost), "specialForces")]] @@.yellowgreen;<<print cashFormat(_cost)>> <</if>> - <<if ($SF.Size < 30 || $SF.Size !== _max) && $SF.Upgrade < 1>> <<set _T1 = $SF.Size >= 30>> + <br>[[Re-unlock upgrading.|Firebase][$SF.Upgrade = 0,cashX(forceNeg(_cost), "specialForces")]] @@.red;<<print cashFormat(_cost)>> <</if>> + <<if ($SF.Size < 30||$SF.Size !== _max) && $SF.Upgrade < 1>> - <br>Which facility or equipment do you wish to upgrade this week? <br><br> - <<if $SF.Squad.Firebase < 5||_T1 && $SF.Squad.Firebase < _FU>> + <br>Which facility or equipment do you wish to upgrade this week? <br> + <<if $SF.Squad.Firebase < 5||_T1 && $SF.Squad.Firebase < _FU>> <br> <<set _cF = SFUpgradeCost(100000,$SF.Squad.Firebase)>> <<if $cash >= _cF>> [[Upgrade Firebase|Firebase][$SF.Upgrade = 1, $SF.Squad.Firebase++, cashX(forceNeg(_cF), "specialForces")]] <<else>>//Cannot afford to upgrade the Firebase.//<</if>> - //Costs @@.yellowgreen;<<print cashFormat(_cF)>>@@ // - <<elseif $SF.Squad.Firebase == _FU>>//The Firebase has been fully upgraded.// - <<else>>//More upgrades are required to unlock the next tier.// - <</if>> <span style="float:right;"> <<print progress($SF.Squad.Firebase)>> </span><br> + //Costs @@.red;<<print cashFormat(_cF)>>@@// <span style="float:right;"> <<print progress($SF.Squad.Firebase)>> </span><br> + <<elseif $SF.Squad.Firebase === _FU>> <br>//The Firebase has been fully upgraded.//<br><</if>> - <<if $SF.Squad.Armoury < 5||_T1 && $SF.Squad.Armoury < _AU>> + <<if $SF.Squad.Armoury < 5||_T1 && $SF.Squad.Armoury < _AU>> <br> <<set _cA = SFUpgradeCost(40000,$SF.Squad.Armoury)>> <<if $cash >= _cA>> [[Upgrade Armory|Firebase][$SF.Upgrade = 1, $SF.Squad.Armoury++, cashX(forceNeg(_cA), "specialForces")]] <<else>>//Cannot afford to upgrade the Armory.//<</if>> - //Costs @@.yellowgreen;<<print cashFormat(_cA)>>@@ // - <<elseif $SF.Squad.Armoury == _AU>>//The Armory has been fully upgraded.// - <<else>>//More upgrades are required to unlock the next tier.// - <</if>> <span style="float:right;"> <<print progress($SF.Squad.Armoury)>> </span><br> - - <<if $SF.Squad.Drugs < 5||_T1 && $SF.Squad.Drugs < _DrugsU>> + //Costs @@.red;<<print cashFormat(_cA)>>@@// <span style="float:right;"> <<print progress($SF.Squad.Armoury)>> </span><br> + <<elseif $SF.Squad.Armoury === _AU>> //The Armory has been fully upgraded.//<br><</if>> + + <<if $SF.Squad.Drugs < 5||_T1 && $SF.Squad.Drugs < _DrugsU>> <br> <<set _cDrugs = SFUpgradeCost(40000,$SF.Squad.Drugs)>> <<if $cash >= _cDrugs>> [[Upgrade Drug Lab|Firebase][$SF.Upgrade = 1, $SF.Squad.Drugs++, cashX(forceNeg(_cDrugs), "specialForces")]] <<else>>//Cannot afford to upgrade the Drug Lab.//<</if>> - //Costs @@.yellowgreen;<<print cashFormat(_cDrugs)>>@@ // - <<elseif $SF.Squad.Drugs == _DrugsU>>//The Drug Lab has been fully upgraded.// - <<else>>//More upgrades are required to unlock the next tier.// - <</if>> <span style="float:right;"> <<print progress($SF.Squad.Drugs)>> </span><br> - - <<if $SF.Squad.Firebase >= 2 && ($SF.Squad.Drones < 5 ||_T1 && $SF.Squad.Drones < _DU)>> + //Costs @@.red;<<print cashFormat(_cDrugs)>>@@// <span style="float:right;"> <<print progress($SF.Squad.Drugs)>> </span><br> + <<elseif $SF.Squad.Drugs === _DrugsU>> //The Drug Lab has been fully upgraded.//<br><</if>> + + <<if $SF.Squad.Firebase >= 2 && ($SF.Squad.Drones < 5 ||_T1 && $SF.Squad.Drones < _DU)>> <br> <<set _cDrones = SFUpgradeCost(45000,$SF.Squad.Drones)>> <<if $cash >= _cDrones>> [[Upgrade Drone Bay|Firebase][$SF.Upgrade = 1, $SF.Squad.Drones++, cashX(forceNeg(_cDrones), "specialForces")]] <<else>>//Cannot afford to upgrade the Drone Bay.//<</if>> - //Costs @@.yellowgreen;<<print cashFormat(_cDrones)>>@@ // <span style="float:right;"> <<print progress($SF.Squad.Drones)>> </span> - <<elseif $SF.Squad.Drones == _DU>>//The Drone Bay has been fully upgraded.//<span style="float:right;"> <<print progress($SF.Squad.Drones)>> </span> - <<elseif _T1 && $SF.Squad.Drones == 5>>//More upgrades are required to unlock the next tier.//<span style="float:right;"> <<print progress($SF.Squad.Drones)>> </span><</if>> - - <<if $SF.Squad.Firebase >= 1 && $terrain !== "oceanic">><br>''Garage'' + //Costs @@.red;<<print cashFormat(_cDrones)>>@@// <span style="float:right;"> <<print progress($SF.Squad.Drones)>> </span><br><br> + <<elseif $SF.Squad.Drones === _DU>> //The Drone Bay has been fully upgraded.//<br><</if>> + + <<if $SF.Squad.Firebase >= 1 && $terrain !== "oceanic">><br>''Garage''<br> <div style="margin-left:2em"><<if ($SF.Squad.AV < 5||_T1 && $SF.Squad.AV < _AVU)>> <<set _cAV = SFUpgradeCost(60000,$SF.Squad.AV)>> <<if $cash >= _cAV>> [[Upgrade Attack Vehicle Fleet|Firebase][$SF.Upgrade = 1, $SF.Squad.AV++, cashX(forceNeg(_cAV), "specialForces")]] <<else>>//Cannot afford to upgrade the Attack Vehicle Fleet.//<</if>> - //Costs @@.yellowgreen;<<print cashFormat(_cAV)>>@@//<span style="float:right;"><<print progress($SF.Squad.AV)>></span> - <<elseif $SF.Squad.AV == _AVU>>//The Attack Vehicle Fleet has been fully upgraded.//<span style="float:right;"><<print progress($SF.Squad.AV)>></span> - <<else>>//More upgrades are required to unlock the next tier.//<span style="float:right;"><<print progress($SF.Squad.AV)>></span> - <</if>></div> + //Costs @@.red;<<print cashFormat(_cAV)>>@@// <span style="float:right;"><<print progress($SF.Squad.AV)>></span> + <<elseif $SF.Squad.AV === _AVU>> //The Attack Vehicle Fleet has been fully upgraded.//<br><</if>> + </div> <div style="margin-left:2em"><<if ($SF.Squad.TV < 5||_T1 && $SF.Squad.TV < _TVU)>> <<set _cTV = SFUpgradeCost(60000,$SF.Squad.TV)>> <<if $cash >= _cTV>> [[Upgrade Transport Vehicle Fleet|Firebase][$SF.Upgrade = 1, $SF.Squad.TV++, cashX(forceNeg(_cTV), "specialForces")]] <<else>>//Cannot afford to upgrade Transport Vehicle Fleet.//<</if>> - //Costs @@.yellowgreen;<<print cashFormat(_cTV)>>@@//<span style="float:right;"><<print progress($SF.Squad.TV)>> </span> - <<elseif $SF.Squad.TV == _TVU>>//The Transport Vehicle Fleet has been fully upgraded.//<span style="float:right;"><<print progress($SF.Squad.TV)>></span> - <<else>>//More upgrades are required to unlock the next tier.//<span style="float:right;"> <<print progress($SF.Squad.TV)>> </span><</if>></div> + //Costs @@.red;<<print cashFormat(_cTV)>>@@// <span style="float:right;"> <<print progress($SF.Squad.TV)>> </span> + <<elseif $SF.Squad.TV === _TVU>> //The Transport Vehicle Fleet has been fully upgraded.//<br><</if>> + </div> <div style="margin-left:2em"><<if _T1 && $SF.Squad.PGT < _PGTU>> <<set _cPGT = SFUpgradeCost(735000,$SF.Squad.PGT)>> <<if $cash >= _cPGT>> [[Upgrade Prototype Goliath tank|Firebase][$SF.Upgrade = 1, $SF.Squad.PGT++, cashX(forceNeg(_cPGT), "specialForces")]] <<else>>//Cannot afford to upgrade Prototype Goliath Tank.//<</if>> - //Costs @@.yellowgreen;<<print cashFormat(_cPGT)>>@@ //<span style="float:right;"> <<print progress($SF.Squad.PGT)>> </span> - <<elseif $SF.Squad.PGT == _PGTU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.PGT)>> </span> - <<elseif $SF.Squad.PGT == _PGTU>>//The Prototype Goliath Tank has been fully upgraded.//<span style="float:right;"> <<print progress($SF.Squad.PGT)>> </span><</if>></div><</if>> + //Costs @@.red;<<print cashFormat(_cPGT)>>@@// <span style="float:right;"> <<print progress($SF.Squad.PGT)>> </span> + <<elseif $SF.Squad.PGT === _PGTU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.PGT)>> </span> + <<elseif $SF.Squad.PGT === _PGTU>> //The Prototype Goliath Tank has been fully upgraded.//<br><</if>></div><</if>> - <<if $SF.Squad.Firebase >= 4>>''Hangar'' + <<if $SF.Squad.Firebase >= 4>>''Hangar''<br> <div style="margin-left:2em"><<if $SF.Squad.AA < 5||_T1 && $SF.Squad.AA < _AAU>> <<set _cAA = SFUpgradeCost(70000,$SF.Squad.AA)>> <<if $cash >= _cAA>> [[Upgrade Attack Aircraft Fleet|Firebase][$SF.Upgrade = 1, $SF.Squad.AA++, cashX(forceNeg(_cAA), "specialForces")]] <<else>>//Cannot afford to upgrade Attack Aircraft Fleet.//<</if>> - //Costs @@.yellowgreen;<<print cashFormat(_cAA)>>@@ //<span style="float:right;"> <<print progress($SF.Squad.AA)>> </span> - <<elseif $SF.Squad.AA == _AAU>>//The Attack Aircraft Fleet has been fully upgraded.//<span style="float:right;"> <<print progress($SF.Squad.AA)>> </span> - <<else>>//More upgrades are required to unlock the next tier.//<span style="float:right;"> <<print progress($SF.Squad.AA)>> </span><</if>></div> + //Costs @@.red;<<print cashFormat(_cAA)>>@@// <span style="float:right;"> <<print progress($SF.Squad.AA)>> </span> + <<elseif $SF.Squad.AA === _AAU>> //The Attack Aircraft Fleet has been fully upgraded.//<br><</if>> + </div> <div style="margin-left:2em"><<if $SF.Squad.TA < 5||_T1 && $SF.Squad.TA < _TAU>> <<set _cTA = SFUpgradeCost(70000,$SF.Squad.TA)>> <<if $cash >= _cTA>> [[Upgrade Transport Aircraft Fleet|Firebase][$SF.Upgrade = 1, $SF.Squad.TA++, cashX(forceNeg(_cTA), "specialForces")]] <<else>>//Cannot afford to upgrade the Transport Aircraft Fleet.//<</if>> - //Costs @@.yellowgreen;<<print cashFormat(_cTA)>>@@ //<span style="float:right;"> <<print progress($SF.Squad.TA)>> </span> - <<elseif $SF.Squad.TA == _TAU>>//The Transport Aircraft Fleet has been fully upgraded.//<span style="float:right;"> <<print progress($SF.Squad.TA)>> </span> - <<else>>//More upgrades are required to unlock the next tier.//<span style="float:right;"> <<print progress($SF.Squad.TA)>> </span><</if>></div> + //Costs @@.red;<<print cashFormat(_cTA)>>@@// <span style="float:right;"> <<print progress($SF.Squad.TA)>> </span> + <<elseif $SF.Squad.TA === _TAU>> //The Transport Aircraft Fleet has been fully upgraded.//<br><</if>> + </div> <div style="margin-left:2em"><<if _T1 && $SF.Squad.SpacePlane < _SPU>> <<set _cSP = SFUpgradeCost(250000,$SF.Squad.SpacePlane)>> <<if $cash >= _cSP>> [[Upgrade Spaceplane|Firebase][$SF.Upgrade = 1, $SF.Squad.SpacePlane++, cashX(forceNeg(_cSP), "specialForces")]] <<else>>//Cannot afford to upgrade the Spaceplane.//<</if>> - //Costs @@.yellowgreen;<<print cashFormat(_cSP)>>@@//<span style="float:right;"><<print progress($SF.Squad.SpacePlane)>> </span> - <<elseif $SF.Squad.SpacePlane == _SPU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.SpacePlane)>> </span> - <<elseif $SF.Squad.SpacePlane == _SPU>>//The Spaceplane has been fully upgraded.//<span style="float:right;"> <<print progress($SF.Squad.SpacePlane)>> </span><</if>></div> + //Costs @@.red;<<print cashFormat(_cSP)>>@@//<span style="float:right;"><<print progress($SF.Squad.SpacePlane)>> </span> + <<elseif $SF.Squad.SpacePlane === _SPU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.SpacePlane)>> </span> + <<elseif $SF.Squad.SpacePlane === _SPU>> //The Spaceplane has been fully upgraded.//<br> <</if>></div> <div style="margin-left:2em"><<if _T1 && $SF.Squad.GunS < _GunSU>> <<set _cGunS = SFUpgradeCost(350000,$SF.Squad.GunS)>> <<if $cash >= _cGunS>> [[Upgrade Gunship|Firebase][$SF.Upgrade = 1, $SF.Squad.GunS++, cashX(forceNeg(_cGunS), "specialForces")]] <<else>>//Cannot afford to upgrade Gunship.//<</if>> - //Costs @@.yellowgreen;<<print cashFormat(_cGunS)>>@@ //<span style="float:right;"> <<print progress($SF.Squad.GunS)>> </span> - <<elseif $SF.Squad.GunS == _GunSU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.GunS)>> </span> - <<elseif $SF.Squad.GunS == _GunSU>>//The Gunship has been fully upgraded.//<span style="float:right;"> <<print progress($SF.Squad.GunS)>> </span><</if>></div><</if>> + //Costs @@.red;<<print cashFormat(_cGunS)>>@@//<span style="float:right;"> <<print progress($SF.Squad.GunS)>> </span> + <<elseif $SF.Squad.GunS === _GunSU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.GunS)>> </span> + <<elseif $SF.Squad.GunS === _GunSU>> //The Gunship has been fully upgraded.//<br> <</if>></div><</if>> <<if _T1>>''Launch Bay'' <div style="margin-left:2em"><<if $SF.Squad.Satellite.lv < _SatU && $SF.Squad.Satellite.InOrbit < 1>> @@ -117,9 +110,9 @@ <<if $cash >= _cSat>> [[Upgrade Satellite|Firebase][$SF.Upgrade = 1, $SF.Squad.Satellite.lv++, cashX(forceNeg(_cSat), "specialForces")]] <<else>>//Cannot afford to upgrade Satellite.//<</if>> - //Costs @@.yellowgreen;<<print cashFormat(_cSat)>>@@//<span style="float:right;"><<print progress($SF.Squad.Satellite.lv)>> </span> - <<elseif $SF.Squad.Satellite.lv == _SatU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.Satellite.lv)>> </span> - <<else>>//The Satellite has been fully upgraded.//<span style="float:right;"><<print progress($SF.Squad.Satellite.lv)>></span><</if>></div> + //Costs @@.red;<<print cashFormat(_cSat)>>@@//<span style="float:right;"><<print progress($SF.Squad.Satellite.lv)>> </span> + <<elseif $SF.Squad.Satellite.lv === _SatU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.Satellite.lv)>> </span> + <<else>>//The Satellite has been fully upgraded.//<br><</if>></div> <<if $terrain !== "oceanic">> <div style="margin-left:2em"><<if $SF.Squad.GiantRobot < _GRU>> @@ -127,49 +120,47 @@ <<if $cash >= _cGR>> [[Upgrade Giant Robot|Firebase][$SF.Upgrade = 1, $SF.Squad.GiantRobot++, cashX(forceNeg(_cGR), "specialForces")]] <<else>>//Cannot afford to upgrade the Giant Robot.//<</if>> - //Costs @@.yellowgreen;<<print cashFormat(_cGR)>>@@//<span style="float:right;"><<print progress($SF.Squad.GiantRobot)>></span> - <<elseif $SF.Squad.GiantRobot == _GRU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.GiantRobot)>> </span> - <<else>>//The Giant Robot has been fully upgraded.//<span style="float:right;"> <<print progress($SF.Squad.GiantRobot)>> </span><</if>></div><</if>> + //Costs @@.red;<<print cashFormat(_cGR)>>@@//<span style="float:right;"><<print progress($SF.Squad.GiantRobot)>></span> + <<elseif $SF.Squad.GiantRobot === _GRU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.GiantRobot)>> </span> + <<else>>//The Giant Robot has been fully upgraded.//<br><</if>></div><</if>> <div style="margin-left:2em"><<if $SF.Squad.MissileSilo < _MSU>> <<set _cMS = SFUpgradeCost(565000,$SF.Squad.MissileSilo)>> <<if $cash >= _cMS>> [[Upgrade Cruise Missile|Firebase][$SF.Upgrade = 1, $SF.Squad.MissileSilo++, cashX(forceNeg(_cMS), "specialForces")]] <<else>>//Cannot afford to upgrade Cruise Missile.//<</if>> - //Costs @@.yellowgreen;<<print cashFormat(_cMS)>>@@ //<span style="float:right;"><<print progress($SF.Squad.MissileSilo)>></span> - <<elseif $SF.Squad.MissileSilo == _MSU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.MissileSilo)>> </span> - <<else>>//The Cruise Missile has been fully upgraded.//<span style="float:right;"> <<print progress($SF.Squad.MissileSilo)>> </span><</if>></div><</if>> - + //Costs @@.red;<<print cashFormat(_cMS)>>@@//<span style="float:right;"><<print progress($SF.Squad.MissileSilo)>></span> + <<elseif $SF.Squad.MissileSilo === _MSU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.MissileSilo)>> </span> + <<else>>//The Cruise Missile has been fully upgraded.//<br><</if>></div><</if>> - <<if _T1 && ($terrain == "oceanic" || $terrain == "marine")>>''Naval Yard'' + <<if _T1 && ($terrain == "oceanic" || $terrain == "marine")>>''Naval Yard''<br> <div style="margin-left:2em"><<if $SF.Squad.AircraftCarrier < _ACU>> <<set _cAC = SFUpgradeCost(650000,$SF.Squad.AircraftCarrier)>> <<if $cash >= _cAC>> [[Upgrade Aircraft Carrier|Firebase][$SF.Upgrade = 1, $SF.Squad.AircraftCarrier++, cashX(forceNeg(_cAC), "specialForces")]] <<else>>//Cannot afford to upgrade Aircraft Carrier.//<</if>> - //Costs @@.yellowgreen;<<print cashFormat(_cAC)>>@@ //<span style="float:right;"> <<print progress($SF.Squad.AircraftCarrier)>> </span> - <<elseif $SF.Squad.AircraftCarrier == _ACU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.AircraftCarrier)>> </span> - <<else>>//The Aircraft Carrier has been fully upgraded.//<span style="float:right;"> <<print progress($SF.Squad.AircraftCarrier)>> </span><</if>></div> + //Costs @@.red;<<print cashFormat(_cAC)>>@@//<span style="float:right;"> <<print progress($SF.Squad.AircraftCarrier)>> </span> + <<elseif $SF.Squad.AircraftCarrier === _ACU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.AircraftCarrier)>> </span> + <<else>>//The Aircraft Carrier has been fully upgraded.//<br><</if>></div> <div style="margin-left:2em"><<if $SF.Squad.Sub < _SubU>> <<set _cSub = SFUpgradeCost(700000,$SF.Squad.Sub)>> <<if $cash >= _cSub>> [[Upgrade Submarine|Firebase][$SF.Upgrade = 1, $SF.Squad.Sub++, cashX(forceNeg(_cSub), "specialForces")]] <<else>>//Cannot afford to upgrade Submarine//<</if>> - //Costs @@.yellowgreen;<<print cashFormat(_cSub)>>@@ //<span style="float:right;"> <<print progress($SF.Squad.Sub)>> </span> - <<elseif $SF.Squad.Sub == _SubU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.Sub)>> </span> - <<else>>//The Submarine has been fully upgraded.//<span style="float:right;"> <<print progress($SF.Squad.Sub)>> </span><</if>></div> + //Costs @@.red;<<print cashFormat(_cSub)>>@@//<span style="float:right;"> <<print progress($SF.Squad.Sub)>> </span> + <<elseif $SF.Squad.Sub === _SubU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.Sub)>> </span> + <<else>>//The Submarine has been fully upgraded.//<br><</if>></div> <div style="margin-left:2em"><<if $SF.Squad.HAT < _HATU>> <<set _cHAT = SFUpgradeCost(665000,$SF.Squad.HAT)>> <<if $cash >= _cHAT>> [[Upgrade Amphibious Transport|Firebase][$SF.Upgrade = 1, $SF.Squad.HAT++, cashX(forceNeg(_cHAT), "specialForces")]] <<else>>//Cannot afford to upgrade Amphibious Transport.//<</if>> - //Costs @@.yellowgreen;<<print cashFormat(_cHAT)>>@@ //<span style="float:right;"> <<print progress($SF.Squad.HAT)>> </span> - <<elseif $SF.Squad.HAT == _HATU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.HAT)>> </span> - <<else>>//The Amphibious Transport has been fully upgraded.//<span style="float:right;"> <<print progress($SF.Squad.HAT)>> </span><</if>></div> + //Costs @@.red;<<print cashFormat(_cHAT)>>@@//<span style="float:right;"> <<print progress($SF.Squad.HAT)>> </span> + <<elseif $SF.Squad.HAT === _HATU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.HAT)>> </span> + <<else>>//The Amphibious Transport has been fully upgraded.//<br><</if>></div> <</if>> - <<if _T1 < 1>>//More firebase upgrades are required to unlock further upgrades.//<</if>> <</if>> /* <div style="margin-left:2em"><<if _T1 && $SF.Facility.Toggle > 0 && $SF.Facility.Active < 1>> @@ -177,5 +168,5 @@ <<if $cash >= _cSFF>> [[Build $SF.Lower's support facility|Firebase][$SF.Upgrade = 1, $SF.Facility.Active++, cashX(forceNeg(_cSFF), "specialForces")]] <<else>>//Cannot afford to build $SF.Lower's support facility.//<</if>> - //Costs @@.yellowgreen;<<print cashFormat(_cSFF)>>@@// + //Costs @@.red;<<print cashFormat(_cSFF)>>@@// <</if>>*/ \ No newline at end of file diff --git a/src/SpecialForce/WeeklyChoices.tw b/src/SpecialForce/WeeklyChoices.tw index 1941d31f79d..18e11b4ac20 100644 --- a/src/SpecialForce/WeeklyChoices.tw +++ b/src/SpecialForce/WeeklyChoices.tw @@ -47,8 +47,8 @@ <</if>> <<if $SF.Colonel.Talk === 0 && $SF.Colonel.Fun === 0 && $SF.MercCon.CanAttend === -1>> <span id="result0"> -<br><br>If you need me for anything else, let me know."<br> - <<if $SF.Colonel.Status >= 25>> +<br>"If you need me for anything else, let me know." + <<if $SF.Colonel.Status >= 25>> <br> <<link "Walk with the Colonel on the surface.">> <<replace "#result0">> <<set $SF.Colonel.Talk = 1>> <br><br>You ask the Colonel if she would like to stretch her legs up on the surface. It doesn't take much effort for her to agree. diff --git a/src/js/economyJS.js b/src/js/economyJS.js index ede978fdd40..e26b85ff660 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -520,7 +520,7 @@ window.getEnvironmentCosts = function(cost) { window.getSFCosts = function() { var costs = 0; - if(State.variables.SF.Toggle && State.variables.SF.Active >= 1 && State.variables.SF.Subsidy > 0) { + if(State.variables.SF.Toggle && State.variables.SF.Active >= 1 && State.variables.SF.Subsidy !== undefined) { Count(); costs += Math.ceil(State.temporary.SFSubsidy); } return costs; diff --git a/src/uncategorized/costsReport.tw b/src/uncategorized/costsReport.tw index 71ca5d6988c..b8ab38c174a 100644 --- a/src/uncategorized/costsReport.tw +++ b/src/uncategorized/costsReport.tw @@ -80,7 +80,7 @@ your personal living expenses are @@.yellowgreen;<<print cashFormat(Math.trunc($ <<set _arcologyCosts += $peacekeepers.undermining>> <</if>> -<<if $SF.Toggle && $SF.Active >= 1 && $SF.Subsidy> > 0>> <<= Count()>> +<<if $SF.Toggle && $SF.Active >= 1 && def $SF.Subsidy>> <<= Count()>> <br>__Financially supporting $SF.Lower until self sufficiency:__ <<print cashFormat(Math.ceil(_SFSubsidy))>> <<set _arcologyCosts += Math.ceil(_SFSubsidy)>> <</if>> -- GitLab