diff --git a/src/SpecialForce/SpecialForce.js b/src/SpecialForce/SpecialForce.js index 6e93570675bb6b78ac18c2376f050b3cef05aa81..095936555560ecb1a6d5974daadbbef08c695c52 100644 --- a/src/SpecialForce/SpecialForce.js +++ b/src/SpecialForce/SpecialForce.js @@ -1,26 +1,26 @@ /* eslint-disable no-unused-vars */ /* eslint-disable no-undef */ -//V = SugarCube.State.variables, T = SugarCube.State.temporary; +//V=SugarCube.State.variables, T=SugarCube.State.temporary; window.Main = function() { - const V = State.variables; - V.SF = {Toggle:V.SF.Toggle,Active:-1,Depravity:0, Size:0, Upgrade:0, Gift:0, UC:{Assign:0, Lock:0, num:0}, ROE:"hold", Target:"recruit", Regs:"strict", Caps:"The Special Force", Lower:"the special force", Subsidy:1, BadOutcome:""}; - V.arcologies[0].SFRaid = 1; V.arcologies[0].SFRaidTarget = -1; + const V=State.variables; + V.SF={Toggle:V.SF.Toggle,Active:-1,Depravity:0, Size:0, Upgrade:0, Gift:0, UC:{Assign:0, Lock:0, num:0}, ROE:"hold", Target:"recruit", Regs:"strict", Caps:"The Special Force", Lower:"the special force", Subsidy:1, BadOutcome:""}; + V.arcologies[0].SFRaid=1; V.arcologies[0].SFRaidTarget=-1; }; window.Squad = function() { - const V = State.variables; - V.SF.Squad = {Troops:40, Armoury:0, Firebase:0, AV:0, TV:0, Drones:0, Drugs:0, PGT:0, AA:0, TA:0, SpacePlane:0, GunS:0, Satellite:{lv:0, InOrbit:0}, GiantRobot:0, MissileSilo:0, AircraftCarrier:0, Sub:0, HAT:0}; + const V=State.variables; + V.SF.Squad={Troops:40, Armoury:0, Firebase:0, AV:0, TV:0, Drones:0, Drugs:0, PGT:0, AA:0, TA:0, SpacePlane:0, GunS:0, Satellite:{lv:0, InOrbit:0}, GiantRobot:0, MissileSilo:0, AircraftCarrier:0, Sub:0, HAT:0}; }; window.Colonel = function() { - const V = State.variables; - V.SF.Colonel = {Core:"", Talk:0, Fun:0, Status:0}; + const V=State.variables; + V.SF.Colonel={Core:"", Talk:0, Fun:0, Status:0}; }; window.MercCon = function() { - const V = State.variables; - V.SF.MercCon = {History:0, CanAttend:-2, Income:0, Revenue:0, Menials:0, TotalMenials:0, Mercs:0, TotalMercs:0}; + const V=State.variables; + V.SF.MercCon={History:0, CanAttend:-2, Income:0, Revenue:0, Menials:0, TotalMenials:0, Mercs:0, TotalMercs:0}; }; window.Facility = function() { - const V = State.variables; - V.SF.Facility = {Toggle:0, Active:0, LC:0, Workers:0, Max:5, Caps:"Special force support facility", Lower:"special force support facility", Decoration:"standard", Speed:0, Upgrade:0, IDs:[]}; + const V=State.variables; + V.SF.Facility={Toggle:0, Active:0, LC:0, Workers:0, Max:5, Caps:"Special force support facility", Lower:"special force support facility", Decoration:"standard", Speed:0, Upgrade:0, IDs:[]}; }; window.SFInit = function() { @@ -34,7 +34,7 @@ window.SFBC = function() { } } - const V = State.variables; + const V=State.variables; function InitClean() { jsDel([V.SFMODToggle,V.securityForceActive,V.securityForceCreate,V.securityForceEventSeen]); } @@ -59,9 +59,9 @@ window.SFBC = function() { } if (V.SF === undefined) { - if (V.securityForceEventSeen < 1) { V.securityForceActive = -1; } else { V.securityForceActive = 2; } - V.SF = {Toggle:V.SFMODToggle, Active:V.securityForceActive}; InitClean(); - if (V.securityForceName === undefined) V.securityForceName = "the special force"; + if (V.securityForceEventSeen < 1) { V.securityForceActive=-1; } else { V.securityForceActive=2; } + V.SF={Toggle:V.SFMODToggle, Active:V.securityForceActive}; InitClean(); + if (V.securityForceName === undefined) V.securityForceName="the special force"; if (V.SF.Active >= 1) { Object.assign(V.SF, { Depravity:V.securityForceDepravity, @@ -75,12 +75,12 @@ window.SFBC = function() { Caps:"The Special Force", Lower:V.securityForceName, Subsidy:V.SubsidyActive}); MainClean(); - SFNameCapsCheck(); + SFNameCapsCheck(); - if (V.ColonelCore === undefined) V.ColonelCore = ""; + if (V.ColonelCore === undefined) V.ColonelCore=""; if (V.ColonelDiscussion === undefined) V.ColonelDiscussion = 0; if (V.ColonelSexed === undefined) V.ColonelSexed = 0; - V.SF.Colonel = { + V.SF.Colonel={ Core:V.ColonelCore, Talk:V.securityForceColonelToken, Fun:V.securityForceColonelSexed, @@ -90,7 +90,7 @@ window.SFBC = function() { if (V.TotalTradeShowIncome === undefined) V.TotalTradeShowIncome = 0; if (V.TradeShowHelots === undefined) V.TradeShowHelots = 0; if (V.TotalTradeShowHelots === undefined) V.TotalTradeShowHelots = 0; - V.SF.MercCon = { + V.SF.MercCon={ History:V.OverallTradeShowAttendance, CanAttend:V.CurrentTradeShowAttendance, Income:V.TradeShowIncome, @@ -110,7 +110,7 @@ window.SFBC = function() { if (V.securityForceAircraftCarrier === undefined) V.securityForceAircraftCarrier = 0; if (V.securityForceSubmarine === undefined) V.securityForceSubmarine = 0; if (V.securityForceHeavyAmphibiousTransport === undefined) V.securityForceHeavyAmphibiousTransport = 0; - V.SF.Squad = { + V.SF.Squad={ Troops:V.securityForcePersonnel, Armoury:V.securityForceInfantryPower, Firebase:V.securityForceArcologyUpgrades, @@ -134,51 +134,51 @@ window.SFBC = function() { } } else { if (V.SF.MercCon && V.SF.MercCon.View) delete V.SF.MercCon.View; - if (V.SFUC > 0) V.SF.UC.num = V.SFUC; delete V.SFUC; + if (V.SFUC > 0) V.SF.UC.num=V.SFUC; delete V.SFUC; if (V.SF.Active === -1) SFInit(); if (V.SF.MWU) delete V.SF.MWU; - if (V.SpecOpsLock !== undefined) V.SF.SpecOpsLock = V.SpecOpsLock; delete V.SpecOpsLock; + if (V.SpecOpsLock !== undefined) V.SF.SpecOpsLock=V.SpecOpsLock; delete V.SpecOpsLock; if (V.SF.UC === undefined) { if (V.SF.SpecOps !== undefined && V.SF.SpecOpsLock !== undefined) { - V.SF.UC = {Assign:V.SF.SpecOps, Lock:V.SF.SpecOpsLock}; + V.SF.UC={Assign:V.SF.SpecOps, Lock:V.SF.SpecOpsLock}; jsDel([V.SF.SpecOps,V.SF.SpecOpsLock]); } else if (V.SF.UC === {}) { - V.SF.UC = {Assign:0, Lock:0}; + V.SF.UC={Assign:0, Lock:0}; } } - if (V.SF.U !== undefined) V.SF.Upgrade = V.SF.U; delete V.SF.U; - if (V.SF.WG !== undefined) V.SF.Gift = V.SF.WG; delete V.SF.WG; + if (V.SF.U !== undefined) V.SF.Upgrade=V.SF.U; delete V.SF.U; + if (V.SF.WG !== undefined) V.SF.Gift=V.SF.WG; delete V.SF.WG; if (V.SF.MercCon === undefined) MercCon(); if (V.SF.MercCon.Helots !== undefined) { - V.SF.MercCon.Menials = V.SF.MercCon.Helots; + V.SF.MercCon.Menials=V.SF.MercCon.Helots; delete V.SF.MercCon.Helots; } else { V.SF.MercCon.Menials = 0; } if (V.SF.MercCon.TotalHelots !== undefined) { - V.SF.MercCon.TotalMenials = V.SF.MercCon.TotalHelots; + V.SF.MercCon.TotalMenials=V.SF.MercCon.TotalHelots; delete V.SF.MercCon.TotalHelots; } else { V.SF.MercCon.TotalMenials = 0; } if (V.SF.Bonus !== undefined) delete V.SF.Bonus; if (V.SF.Depravity < 0) V.SF.Depravity = 0; - if (V.SF.Size === undefined) V.SF.Size = V.SF.Units; delete V.SF.Units; + if (V.SF.Size === undefined) V.SF.Size=V.SF.Units; delete V.SF.Units; if (V.SFUnit !== undefined) { if (V.SFUnit.AT !== undefined) V.SFUnitTA = 0; - V.SF.Squad.Satellite = V.SF.Squad.Sat; + V.SF.Squad.Satellite=V.SF.Squad.Sat; jsDel([V.SF.Squad.Sat,V.SatLaunched,V.SFUnit.AT]); - V.SF.Squad.Satellite = V.SF.Squad.Sat; delete V.SF.Squad.Sat; - if (V.SFTradeShow !== undefined) V.SF.MercCon = V.SFTradeShow; delete V.SFTradeShow; - if (V.SFColonel !== undefined) V.SF.Colonel = V.SFColonel; delete V.SFColonel; - if (V.SF.BadOutcome === undefined) V.SF.BadOutcome = ""; + V.SF.Squad.Satellite=V.SF.Squad.Sat; delete V.SF.Squad.Sat; + if (V.SFTradeShow !== undefined) V.SF.MercCon=V.SFTradeShow; delete V.SFTradeShow; + if (V.SFColonel !== undefined) V.SF.Colonel=V.SFColonel; delete V.SFColonel; + if (V.SF.BadOutcome === undefined) V.SF.BadOutcome=""; if (V.SF.Squad.Satellite !== undefined && V.SatLaunched === undefined) { - V.SF.Squad.Sat = {lv:0, InOrbit:0}; - V.SF.Squad.Satellite = V.SF.Squad.Sat; + V.SF.Squad.Sat={lv:0, InOrbit:0}; + V.SF.Squad.Satellite=V.SF.Squad.Sat; jsDel([V.SF.Squad.Sat,V.SatLaunched,V.SFUnit]); } } if (V.SF.Squad !== undefined && V.SF.Squad.Satellite.lv === undefined) { - V.SF.Squad.Sat = {lv:V.SF.Squad.Satellite, InOrbit:0}; - V.SF.Squad.Satellite = V.SF.Squad.Sat; delete V.SF.Squad.Sat; + V.SF.Squad.Sat={lv:V.SF.Squad.Satellite, InOrbit:0}; + V.SF.Squad.Satellite=V.SF.Squad.Sat; delete V.SF.Squad.Sat; } } if (V.securityForceName !== undefined) InitClean(); MainClean(); ColonelClean(); TradeShowClean(); UnitsClean(); @@ -186,14 +186,14 @@ window.SFBC = function() { }; window.SFReport = function() { - "use strict"; const V = State.variables,T = State.temporary,S = V.SF.Squad; - let target = 50000,baseLine = 5000,profit = 0,upkeep = 0,income = 0; - let Multiplier = {action:1,troop:1,unit:1,depravity:1},SFD = V.SF.Depravity; - let FNG = 10,unitCap = 2500,Trade = 0.025,deaths = 0,r = ``; Count(); - let cost = {a:0.01,b:2.5};let NO = 1+(V.SF.Size/5);let N1 = 1+(V.SF.Size/5); - V.SF.UC.num = 0; if (profit < 1) cost.a = 10; cost.b = 0.1;NO = 1;N1 = 0.1; + "use strict"; const V=State.variables,T=State.temporary,S=V.SF.Squad; + let target=50000,baseLine=5000,profit = 0,upkeep = 0,income = 0; + let Multiplier={action:1,troop:1,unit:1,depravity:1},SFD=V.SF.Depravity; + let FNG=10,unitCap=2500,Trade = 0.025,deaths = 0,r=``; Count(); + let cost={a:0.01,b:2.5};let NO=1+(V.SF.Size/5);let N1=1+(V.SF.Size/5); + V.SF.UC.num = 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 > unitCap) S.Troops=unitCap; if (S.Troops < 100) { S.Troops += Math.ceil(jsRandom(2,5)); } else { if (V.SF.Target === "recruit") { @@ -203,13 +203,13 @@ window.SFReport = function() { } else { S.Troops -= Math.ceil(jsRandom(1.10*S.Troops/1000,-1.15*S.Troops/1000)); } } if (V.SF.UC.Assign > 0) { - if (V.SF.UC.Assign < 2) { V.SF.UC.num = Math.ceil(S.Troops*0.01); - } else { V.SF.UC.num = Math.ceil(S.Troops*0.05); } + if (V.SF.UC.Assign < 2) { V.SF.UC.num=Math.ceil(S.Troops*0.01); + } else { V.SF.UC.num=Math.ceil(S.Troops*0.05); } } S.Troops -= V.SF.UC.num; 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); + V.authority += 25*(Math.ceil(S.Troops/200)); V.authority=Math.clamp(V.authority, 0, 20000); } } @@ -263,7 +263,7 @@ window.SFReport = function() { } 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; + 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; @@ -283,30 +283,30 @@ window.SFReport = function() { } 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; } + } 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; } + 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") { repX((Math.ceil(V.rep*((Trade/100)*0.95))), "specialForces"); - V.arcologies[0].prosperity = Math.ceil((V.arcologies[0].prosperity+(Trade/10)*0.95)); + V.arcologies[0].prosperity=Math.ceil((V.arcologies[0].prosperity+(Trade/10)*0.95)); } else { repX((Math.ceil(V.rep*(Trade/100)*0.25)), "specialForces"); - 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); + 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) )/((V.SF.Size/2+S.Troops/2)*5) ); S.Troops += Math.round(FNG/2); - if (V.debugMode > 0) r += `<br>income:${num(income)}, troop:${num((0.09+Multiplier.troop/NO).toFixed(2))}, unit:${num((0.09+Multiplier.unit/NO).toFixed(2))}, action:${num((0.09+Multiplier.action/NO).toFixed(2))}, depravity:${num((0.09+Multiplier.depravity/NO).toFixed(2))}, upkeep:${num((upkeep*N1).toFixed(2))}`; + if (V.debugMode > 0) r += `<br>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 *= 83; //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.arcologies[0].prosperity > V.ProsperityCap) V.arcologies[0].prosperity = V.ProsperityCap; + if (income >= target) profit=1; delete V.SF.Subsidy; cashX(income, "specialForces"); + if (S.Troops > unitCap) S.Troops=unitCap; + if (V.arcologies[0].prosperity > V.ProsperityCap) V.arcologies[0].prosperity=V.ProsperityCap; - if (S.Drugs >= 8 || S.Drugs >= 10) { let survivalChance = 50; + if (S.Drugs >= 8 || S.Drugs >= 10) { let 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 (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; @@ -314,7 +314,7 @@ window.SFReport = function() { 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 ${num(S.Troops)} troops on `; + 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") { @@ -326,40 +326,40 @@ window.SFReport = function() { 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>`; + 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 `; + 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.`; - if (V.economy < 100) r += `The rapidly degrading global economy has one upside,<span class = 'green'> ${V.SF.Caps} was able to more easily use more 'persuasive' techniques thus leading to an increase in profit</span>.`; + 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.`; + if (V.economy < 100) r += ` The rapidly degrading global economy has one upside,<span class='green'> ${V.SF.Caps} was able to more easily use more 'persuasive' techniques thus leading to an increase in profit</span>.`; } 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 += `<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 += ` ${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 += `<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 += `<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>>`; + 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.CanAttend === 1) { V.SF.MercCon.Income = 0; V.SF.MercCon.Menials = 0; - let tradeShowAttendes = 200, menialGiftsPerAttendee = 5, NewMercs = 0; - let menialGifts = Math.ceil(jsRandom(1,((tradeShowAttendes*menialGiftsPerAttendee)/10))); - let TSProfit = Math.ceil(500000*(1+(V.SF.Size/1000))*(1+(V.arcologies[0].prosperity/1000))*T.Env); + let tradeShowAttendes=200, menialGiftsPerAttendee=5, NewMercs = 0; + let menialGifts=Math.ceil(jsRandom(1,((tradeShowAttendes*menialGiftsPerAttendee)/10))); + let 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)); + NewMercs=jsRandom(1,(tradeShowAttendes/10)); V.mercFreeManpower += NewMercs; V.SF.MercCon.TotalMercs += NewMercs; V.SF.MercCon.Mercs += NewMercs; } @@ -369,37 +369,37 @@ window.SFReport = function() { }; window.Count = function() { - const V = State.variables, T = State.temporary, C = Math.clamp, S = V.SF.Squad, E = V.economy; - T.FU = 10; S.Firebase = C(S.Firebase, 0, T.FU); - T.AU = 10; S.Armoury = C(S.Armoury, 0, T.AU); - T.DrugsU = 10; S.Drugs = C(S.Drugs, 0, T.DrugsU); - T.DU = 10; S.Drones = C(S.Drones, 0, T.DU); - T.AVU = 10; S.AV = C(S.AV, 0, T.AVU); - T.TVU = 10; S.TV = C(S.TV, 0, T.TVU); - T.AAU = 10; S.AA = C(S.AA, 0, T.AAU); - T.TAU = 10; S.TA = C(S.TA, 0, T.TAU); - if (V.PC.warfare >= 75) {T.PGTU = 10; T.SPU = 10; T.GunSU = 10; T.SatU = 10; T.GRU = 10; T.MSU = 10; T.ACU = 10; T.SubU = 10; T.HATU = 10;} - else if (V.PC.warfare >= 50) {T.PGTU = 9; T.SPU = 9; T.GunSU = 9; T.SatU = 9; T.GRU = 9; T.MSU = 9; T.ACU = 9; T.SubU = 9; T.HATU = 9;} - else {T.PGTU = 8; T.SPU = 8; T.GunSU = 8; T.SatU = 8; T.GRU = 8; T.MSU = 8; T.ACU = 8; T.SubU = 8; T.HATU = 8;} - S.PGT = C(S.PGT, 0, T.PGTU); - S.SpacePlane = C(S.SpacePlane, 0, T.SPU); S.GunS = C(S.GunS, 0, T.GunSU); - S.Satellite.lv = C(S.Satellite.lv, 0, T.SatU); S.GiantRobot = C(S.GiantRobot, 0, T.GRU); S.MissileSilo = C(S.MissileSilo, 0, T.MSU); - S.AircraftCarrier = C(S.AircraftCarrier, 0, T.ACU); S.Sub = C(S.Sub, 0, T.SubU); S.HAT = C(S.HAT, 0, T.HATU); - T.GU = T.AVU+T.TVU+T.PGTU; T.G = S.AV+S.TV+S.PGT; - T.H = S.AA+S.TA+S.SpacePlane+S.GunS; T.HU = T.AAU+T.TAU+T.SPU+T.GunSU; - T.LBU = T.SatU+T.MSU; T.LB = S.Satellite.lv+S.MissileSilo; - T.Base = S.Firebase+S.Armoury+S.Drugs+S.Drones+T.H; - T.max = T.FU+T.AU+T.DrugsU+T.DU+T.HU; + const V=State.variables, T=State.temporary, C=Math.clamp, S=V.SF.Squad, E=V.economy; + T.FU=10; S.Firebase=C(S.Firebase, 0, T.FU); + T.AU=10; S.Armoury=C(S.Armoury, 0, T.AU); + T.DrugsU=10; S.Drugs=C(S.Drugs, 0, T.DrugsU); + T.DU=10; S.Drones=C(S.Drones, 0, T.DU); + T.AVU=10; S.AV=C(S.AV, 0, T.AVU); + T.TVU=10; S.TV=C(S.TV, 0, T.TVU); + T.AAU=10; S.AA=C(S.AA, 0, T.AAU); + T.TAU=10; S.TA=C(S.TA, 0, T.TAU); + if (V.PC.warfare >= 75) {T.PGTU=10; T.SPU=10; T.GunSU=10; T.SatU=10; T.GRU=10; T.MSU=10; T.ACU=10; T.SubU=10; T.HATU=10;} + else if (V.PC.warfare >= 50) {T.PGTU=9; T.SPU=9; T.GunSU=9; T.SatU=9; T.GRU=9; T.MSU=9; T.ACU=9; T.SubU=9; T.HATU=9;} + else {T.PGTU=8; T.SPU=8; T.GunSU=8; T.SatU=8; T.GRU=8; T.MSU=8; T.ACU=8; T.SubU=8; T.HATU=8;} + S.PGT=C(S.PGT, 0, T.PGTU); + S.SpacePlane=C(S.SpacePlane, 0, T.SPU); S.GunS=C(S.GunS, 0, T.GunSU); + S.Satellite.lv=C(S.Satellite.lv, 0, T.SatU); S.GiantRobot=C(S.GiantRobot, 0, T.GRU); S.MissileSilo=C(S.MissileSilo, 0, T.MSU); + S.AircraftCarrier=C(S.AircraftCarrier, 0, T.ACU); S.Sub=C(S.Sub, 0, T.SubU); S.HAT=C(S.HAT, 0, T.HATU); + T.GU=T.AVU+T.TVU+T.PGTU; T.G=S.AV+S.TV+S.PGT; + T.H=S.AA+S.TA+S.SpacePlane+S.GunS; T.HU=T.AAU+T.TAU+T.SPU+T.GunSU; + T.LBU=T.SatU+T.MSU; T.LB=S.Satellite.lv+S.MissileSilo; + T.Base=S.Firebase+S.Armoury+S.Drugs+S.Drones+T.H; + T.max=T.FU+T.AU+T.DrugsU+T.DU+T.HU; //if (V.SF.Facility.Toggle > 0) T.Base += 1; T.max += 1; if (V.terrain !== "oceanic" || V.terrain === "marine") { T.LBU += T.GRU; T.LB += S.GiantRobot; T.Base += T.G; T.max += T.GU; 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, 1, T.max); T.T1 = 0; - 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))); + 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, 1, T.max); T.T1 = 0; + 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; if (V.SF.MercCon === undefined) MercCon(); @@ -408,13 +408,13 @@ window.Count = function() { }; window.SFNameCapsCheck = function() { - const V = State.variables; - if (V.SF.Lower !== "the special force") V.SF.Caps = V.SF.Lower.replace("the ", "The "); + 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) { - "use strict"; const V = State.variables,T = State.temporary,S = V.SF.Squad; let value = 0; - value = cost*T.Env*(1.15+(V.SF.Size/10))*(1.15+(unit/100)); + "use strict"; const V=State.variables,T=State.temporary,S=V.SF.Squad; let value = 0; + 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); }; @@ -426,23 +426,23 @@ window.progress = function(x,max) { 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<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>â`;}} + 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; + 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>â`;} + for (i = 0;i<z;i++) out += `<span style=\"opacity: 0;\">â–ˆ</span>â`;} return `${out}`; }; window.SFC = function() { - const V = State.variables; + 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)}`;} @@ -450,61 +450,58 @@ window.SFC = function() { }; window.SFCR = function() { - const V = State.variables, C = V.SF.Colonel; + 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() { - "use strict"; let choice = ``, time = ``; - const V = State.variables, C = V.SF.Colonel; + "use strict"; let choice=``, time=``; + const V=State.variables, C=V.SF.Colonel; if (V.SF.Gift > 0) { - if (V.choice === 1) { - choice += `${V.SF.Caps} is turning over spare capital in tribute this week. `; + 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."`; + 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 += `"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."`; + 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 += `"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."`; + 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".`; } + 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.`; + } 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() { - "use strict"; - const V = State.variables; - let r = ``; - V.SF.Active = -2; + "use strict"; const V=State.variables; let r =``;V.SF.Active=-2; switch(V.SF.Colonel.Core) { case "Shell-Shocked": - V.SF.BadOutcome = "lockdown"; V.trinkets.push("${t} explosives detonator"); - r += `Unnerved by your ever-increasing influence over your men and undercutting of her authority, The Colonel uses heavy explosives at Midnight to seal off The Firebase from your access. When you step off of your express elevator, you are met not with two guards, but several armed proximity mines next to an incredibly thick wall of smoking rubble. No doubt there are machine gun nests, anti-tank nests, and lots more proximity mines just waiting for you on the other side, should you somehow get through the wall of debris.`; - r += `<br>The ${V.SF.Lower} still deploys into the old world to plunder as it pleases, but no longer for you. You receive no money from their exploits, and their total defiance and independence of you is a permanent stain on your reputation. Of course, you'll never have the needed military power to dislodge them, especially with all the redundant fortifications, crossfire envelopes, and myriad traps that paranoid bitch had built around each entrance ever since she went rouge. Trying to sabotage certain support beams from above to make the Firebase facility collapse in on itself could easily cause enough damage to topple other parts of the arcology too, and such a thing would be very difficult to cover up. In other words, you're stuck with them. The Firebase has become a permanent tumor on your Arcology and good name.`; + V.SF.BadOutcome="lockdown"; V.trinkets.push("${t} explosives detonator"); + r +=`Unnerved by your ever-increasing influence over your men and undercutting of her authority, The Colonel uses heavy explosives at Midnight to seal off The Firebase from your access. When you step off of your express elevator, you are met not with two guards, but several armed proximity mines next to an incredibly thick wall of smoking rubble. No doubt there are machine gun nests, anti-tank nests, and lots more proximity mines just waiting for you on the other side, should you somehow get through the wall of debris.`; + r+=`<br>The ${V.SF.Lower} still deploys into the old world to plunder as it pleases, but no longer for you. You receive no money from their exploits, and their total defiance and independence of you is a permanent stain on your reputation. Of course, you'll never have the needed military power to dislodge them, especially with all the redundant fortifications, crossfire envelopes, and myriad traps that paranoid bitch had built around each entrance ever since she went rouge. Trying to sabotage certain support beams from above to make the Firebase facility collapse in on itself could easily cause enough damage to topple other parts of the arcology too, and such a thing would be very difficult to cover up. In other words, you're stuck with them. The Firebase has become a permanent tumor on your Arcology and good name.`; break; case "Cruel": - V.SF.BadOutcome = "Revolt"; V.trinkets.push("${t} dog tags"); repX((0 - V.rep), "specialForces"); - V.arcologies[0].prosperity -= 50; V.ASlaves = 49; cashX(-10000, "specialForces"); - V.ACitizens = 751; V.menials = 0; V.researchLab.menials = 0; + V.SF.BadOutcome="Revolt"; V.trinkets.push("${t} dog tags"); repX((0 - V.rep), "specialForces"); + V.arcologies[0].prosperity -= 50; V.ASlaves=49; cashX(-10000, "specialForces"); + V.ACitizens=751; V.menials = 0; V.researchLab.menials = 0; V.researchLab.hired = 0; V.fuckdolls = 0; V.menialBioreactors = 0; V.activeUnits = 0; V.secBots.troops = 0; V.createdSlavesUnits = 0; V.createdMilitiaUnits = 0; V.createdMercUnits = 0; - r += `<br>The ${V.SF.Lower} still deploys into the old world to plunder as it pleases, but no longer for you. You receive no money from their exploits, and their total defiance and independence of you is a permanent stain on your reputation. Of course, you'll never have the needed military power to dislodge them, especially with all the redundant fortifications, crossfire envelopes, and myriad traps that paranoid bitch had built around each entrance ever since she went rouge. Trying to sabotage certain support beams from above to make the Firebase facility collapse in on itself could easily cause enough damage to topple other parts of the arcology too, and such a thing would be very difficult to cover up. In other words, you're stuck with them. The Firebase has become a permanent tumor on your Arcology and good name.`; + r+=`<br>The ${V.SF.Lower} still deploys into the old world to plunder as it pleases, but no longer for you. You receive no money from their exploits, and their total defiance and independence of you is a permanent stain on your reputation. Of course, you'll never have the needed military power to dislodge them, especially with all the redundant fortifications, crossfire envelopes, and myriad traps that paranoid bitch had built around each entrance ever since she went rouge. Trying to sabotage certain support beams from above to make the Firebase facility collapse in on itself could easily cause enough damage to topple other parts of the arcology too, and such a thing would be very difficult to cover up. In other words, you're stuck with them. The Firebase has become a permanent tumor on your Arcology and good name.`; break; case "Cruel and Psychopathic": - V.SF.BadOutcome = "Revolt"; V.trinkets.push("${t} dog tags"); repX((0 - V.rep), "specialForces"); + V.SF.BadOutcome="Revolt"; V.trinkets.push("${t} dog tags"); repX((0 - V.rep), "specialForces"); r += `<br>Finally fed up with your constant intrusions into her territory and crew, The Colonel riles up her people for an utterly ferocious rebellion. The promises of rape and plunder and dominion over some of the wealthiest tenants in the entire Free City (and their world-class slaves) are all that's needed to give the selfish lot of them a nearly unshakable resolve in the task of delivering their overlord Her most coveted prize: You.`; r += `<br>It is now midnight. The lights are the first thing they disable, as they still have the excellent night vision equipment you purchased for them. Some of your citizens start panicking almost immediately at the sudden blackout; this is very reminiscent of the Daughters of Liberty attack that still haunts many of their memories. Things like this were never supposed to happen again. You had promised them that you'd create an army that would protect them...`; r += `<br>Her army vanguard strikes fast and hard throughout the main Plaza, cutting through your security personnel, defensive platoons, and drones with an ease that stinks of months of careful planning and study. Your defensive platoons, veterans of many Battles, are outmaneuvered at every turn; their hidden ammunition caches are found empty, their communications networks are mysteriously scrambled, and key chokepoints are found to be booby-trapped before your men can even get to them; their well-rehearsed arcology defense routines have gone to ash. Assuming you ever get a chance to speak to The Colonel again, you would ask if her betrayal was actually inevitable rather than something you triggered.`; @@ -519,7 +516,7 @@ window.BadOutcome = function() { r += `<br>The Colonel's body was never found.`; break; case "Kind": - V.SF.BadOutcome = "Exodus"; V.trinkets.push("${t} gift card"); V.menials += 73; + V.SF.BadOutcome="Exodus"; V.trinkets.push("${t} gift card"); V.menials += 73; cashX(55000, "specialForces"); r += `Your Colonel has had enough of your meddling. In her eyes, you've broken faith with her. She asked one thing of you in return for her full support, and you could not even give her that.`; r += `<br>At midnight, a great mechanized convoy, the biggest you've seen in a long while, streams out of your Arcology. Troop Carriers, Aircraft, Heavy Trucks, and other war machines of varying sizes pour out of the Firebase in tight formation. The Colonel is refusing your calls, and you know it would be ill advised to go out there yourself or to try to stop them with force. The many bandits and mercenary groups that the convoy will inevitably pass by will probably feel this way as well. You have no idea where they are going or how they will end up, but with their wealth and weaponry, you are not worried.`; @@ -531,431 +528,263 @@ window.BadOutcome = function() { }; window.UnitText = function(input) { - "use strict"; - const V = State.variables; - const T = State.temporary; - const S = V.SF.Squad; - let r = ``; + "use strict"; const V=State.variables,T=State.temporary,S=V.SF.Squad; let r =``; switch(input) { case 'firebase': - appear = `is currently constructed in a haphazard fashion.`; - barracks = `Soldiers' cots are mixed in with weapons crates and ammunition.`; - slave = `Cages for processing slaves lie off to one side,`; - common = `and in the center is a common area with tables for soldiers to gather around for meals or rowdy conversations.`; - garage = ``; - drone = ``; - hangar = ``; - launch = ``; - artillery = ``; - comms = ``; - training = ``; + let appear=`is currently constructed in a haphazard fashion.`, barracks=`Soldiers' cots are mixed in with weapons crates and ammunition.`, slave=`Cages for processing slaves lie off to one side,`, common=`and in the center is a common area with tables for soldiers to gather around for meals or rowdy conversations.`, garage=``, drone=``, hangar=``, launch=``, artillery=``, comms=``, training=``; if (S.Firebase >= 0) { r += `<br>''Firebase:''`; - 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`; + 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.`; + 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 `${r} The firebase ${appear} ${barracks} ${comms} ${training} ${slave} ${common} ${garage}${drone} ${hangar} ${launch} ${artillery}`; - } + } break; + case 'troop': r += `<br> The large dormitories are`; + const Quantity=`the ${num(S.Troops)} members of ${V.SF.Lower}`; + if (S.Troops < 100) {return `${r} sparsely occupied, ${Quantity} 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 `${r} lightly occupied, with ${Quantity} starting to spread out across them`;} + else if (S.Troops < 800) {return `${r} moderately occupied, though ${Quantity} residing within have a considerable amount of extra room`;} + else if (S.Troops < 1500) {return `${r} well-occupied, and ${Quantity} residing within have started to form small cliques based on section and row`;} + else {return `${r} near capacity, and ${Quantity} often barter their personal loot, whether it be monetary or human, for the choicest bunks`;} break; case 'armoury': - weapons = `The weapons are mostly worn rifles that have already seen years of service before ${V.SF.Lower} acquired them.`; - armor1 = `The body armor is enough to stop smaller calibers, but nothing serious.`; - radio= ``; - helmets = ``; - ammo0 = ``; - uniforms = ``; - special= ``; - exo= ``; - if (S.Armoury >= 0) {r += `<br><br>''Armory:''<br>`; radio= `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) ammo0 = `Tactical vests have been provided, allowing soldiers to carry additional ammo.`; - if (S.Armoury >= 4) armor1 = `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 breathable fabric to keep soldiers from overheating.`; - if (S.Armoury >= 7) special= `Specialized weaponry is available for many 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 `${r} The armor1y holds soldiers' weapons and gear while not in training or combat. ${weapons} ${special} ${armor1} ${radio}${helmets} ${ammo0} ${uniforms} ${exo}`; + let weapons=`The weapons are mostly worn rifles that have already seen years of service before ${V.SF.Lower} acquired them.`, armor1=`The body armor is enough to stop smaller calibers, but nothing serious.`, radio=``, helmets=``, ammo0=``, uniforms=``, special=``, exo=``; + if (S.Armoury >= 0) {r += `<br><br>''Armory:''<br>`; radio=`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) ammo0=`Tactical vests have been provided, allowing soldiers to carry additional ammo.`; + if (S.Armoury >= 4) armor1=`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 breathable fabric to keep soldiers from overheating.`; + if (S.Armoury >= 7) special=`Specialized weaponry is available for many 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 `${r} The armory holds soldiers' weapons and gear while not in training or combat. ${weapons} ${special} ${armor1} ${radio}${helmets} ${ammo0} ${uniforms} ${exo}`; } break; case 'drugs': - amphet = ``; - phen= ``; - steroid= ``; - downer= ``; - concen= ``; - stimpack= ``; - stabilizer= ``; - if (S.Drugs >= 0) { r += `<br><br>''Drug Lab:''`; 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.`; + let amphet=``, phen=``, steroid=``, downer=``, concen=``, stimpack=``, stabilizer=``; + if (S.Drugs >= 0) { r += `<br><br>''Drug Lab:''`; 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 `${r} 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}`; - } - break; - case 'UAV': - if (S.Firebase >= 2 && S.Drones >= 1) { - r += `<br><br>''Drone Bay:''`; - a = `have been recommissioned for use by ${V.SF.Lower}`; - b = `.`; - c = ``; - d = ``; - e = ``; - f = ``; - g = ``; - h = ``; - i = ``; - j = ``; - 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 `${r} 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}`; - } - break; + } break; + case 'UAV': if(S.Firebase >= 2 && S.Drones >= 1) { r += `<br><br>''Drone Bay:''`; + let a=`have been recommissioned for use by ${V.SF.Lower}`, b=`.`, c=``, d=``, e=``, f=``, g=``, h=``, i=``, j=``, 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 `${r} 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}`; + } break; case 'AV': - b = `has been recommissioned for use by ${V.SF.Lower}. They`; - c = `, mechanics are methodically checking the recent purchases for battle-readiness`; - MG = `120 mm main gun is enough to handle the majority of opponents around the Free Cities.`; - engine1 = ``; - armor2 = ``; - armor22 = ``; - ammo1 = ``; - mg = ``; - fireC0 = ``; - fireC1 = ``; - fireC2 = ``; - fireC3= ``; - turret = ``; + let b=`has been recommissioned for use by ${V.SF.Lower}. They`, c=`, mechanics are methodically checking the recent purchases for battle-readiness`, MG=`120 mm main gun is enough to handle the majority of opponents around the Free Cities.`, engine1=``, armor2=``, armor22=``, ammo1=``, mg=``, fireC0=``, fireC1=``, fireC2=``, fireC3=``, turret=``; if (S.AV >= 1) { r += `<br> ''Assault:''`; - if (S.AV >= 2) engine1 = `The engine1 has been overhauled, allowing much faster maneuvering around the battlefield.`; b = ``; c = ``; - if (S.AV >= 3) armor2 = `A composite ceramic armor has replaced the original, offering much greater protection from attacks.`; - if (S.AV >= 4) ammo1 = `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) armor22 = `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.`; + if (S.AV >= 2) engine1=`The engine1 has been overhauled, allowing much faster maneuvering around the battlefield.`; b=``; c=``; + if (S.AV >= 3) armor2=`A composite ceramic armor has replaced the original, offering much greater protection from attacks.`; + if (S.AV >= 4) ammo1=`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) armor22=`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 `${r} A fleet of main battle tanks ${b} are parked in the garage${c}. ${turret} The ${MG} ${ammo1} ${mg} ${fireC0} ${fireC2} ${fireC3} ${fireC1} ${engine1} ${armor2} ${armor22}`; } break; case 'TV': - B = `has been recommissioned for use by ${V.SF.Lower}. They`; - C = `, mechanics are giving the new purchases a final tuneup`; - squad= `a squad`; - G1 = `20`; - G2 = `in a firefight`; - e0 = `The engine has been`; - engine3= ``; - armor3= ``; - tires = ``; - m1 = ``; - m2 = ``; - pod1 = ``; - pod2 = ``; + let B=`has been recommissioned for use by ${V.SF.Lower}. They`, C=`, mechanics are giving the new purchases a final tuneup`, squad=`a squad`, G1=`20`, G2=`in a firefight`, e0=`The engine has been`, engine3=``, armor3=``, tires=``, m1=``, m2=``, pod1=``, pod2=``; if (S.TV >= 1) { r += `<br> ''Transport:''`; - if (S.TV >= 2) engine3= `${e0} overhauled, allowing for higher mobility.`; C = ``; B = ``; - if (S.TV >= 3) armor3= `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`; armor3= ``; 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) engine3= `${e0} replaced with the newest model, allowing the vehicle to get in and out of the conflict extremely quickly.`; + if (S.TV >= 2) engine3=`${e0} overhauled, allowing for higher mobility.`; C=``; B=``; + if (S.TV >= 3) armor3=`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`; armor3=``; 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) engine3=`${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} ${engine3} ${armor3} ${tires} ${m1} ${m2}`; - } - break; + } break; case 'PGT': - b1 = `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`; - c1 = ``; - engines4 = `. Two engines power the left and right sides of the tank separately; - leaving it underpowered and slow`; - gun0 = ``; - gun1 = ``; - gun2 = `an undersized main gun and makeshift firing system from a standard battle tank`; - armor5 = ``; - armor6 = ``; - cannon = ``; - laser = ``; - PGTframe = ``; + let b1=`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`, c1=``, engines4=`. Two engines power the left and right sides of the tank separately, leaving it underpowered and slow`, gun0=``, gun1=``, gun2=`an undersized main gun and makeshift firing system from a standard battle tank`, armor5=``, armor6=``, cannon=``, laser=``, PGTframe=``; if (S.PGT >= 1) {r += `<br> ''Prototype Goliath Tank:''`; - if (S.PGT >= 2) c1 = `rests in`; b1 = ``; engines4 = `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) armor6 = `reinforced, increasing survivability for the crew inside.`; armor5 = `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) armor6 = `redesigned with sloping and state-of-the-art materials, allowing the Goliath to shrug off even the most advanced armor5-piercing tank rounds.`; - if (S.PGT >= 9) gun1 = `firing guided projectiles`; - if (S.PGT >= 10) gun0 = `a twin-barreled railgun capable of rapidly`; + if (S.PGT >= 2) c1=`rests in`; b1=``; engines4=` 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) armor6=`reinforced, increasing survivability for the crew inside.`; armor5=`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) armor6=`redesigned with sloping and state-of-the-art materials, allowing the Goliath to shrug off even the most advanced armor5-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 ${b1}${c1} its own garage housing built outside the arcology. The massive bulk is spread out over 8 tracks, two for each corner of the tank${engines4}. The turret is equipped with ${gun0} ${gun1} ${gun2}. ${cannon} ${armor5} ${armor6} ${laser} ${PGTframe}`; } break; case 'AA': - W1 = `only armed`; - W2 = `;`; - W3 = `a poor weapon against flying targets, but enough to handle ground forces`; - group = `A small group of attack VTOL have been recommissioned for use by ${V.SF.Lower}; enough to make up a squadron`; - engines = ``; - TAI = ``; - lock = ``; - support = ``; - stealth = ``; - scramble = ``; - PAI = ``; + let W1=`only armed`, W2=`;`, W3=`a poor weapon against flying targets, but enough to handle ground forces`, group=`A small group of attack VTOL have been recommissioned for use by ${V.SF.Lower}, enough to make up a squadron`, engines=``, TAI=``, lock=``, support=``, stealth=``, scramble=``, PAI=``; if (S.AA >= 1) {r += `<br> ''Assault:''`; - 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.`; + 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 `${r} ${group}. Several of the landing pads around ${V.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}`; } break; case 'TA': - Num = `number`; - type = `tiltrotor`; - capacity = `small platoon or 15`; - engines0 = ``; - engines01 = ``; - Radar = ``; - Armor = ``; - landing = ``; - miniguns = ``; - counter = ``; + let Num=`number`, type=`tiltrotor`, capacity=`small platoon or 15`, engines0=``, engines01=``, Radar=``, Armor=``, landing=``, miniguns=``, counter=``; if (S.TA >= 1) {r += `<br> ''Transport:''`; - if (S.TA >= 2) engines0 = `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`; engines01 = `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`; engines01 = ``; engines0 = `The tiltrotors have been replaced with tiltjets, allowing for much greater airspeed and acceleration.`; + if (S.TA >= 2) engines0=`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`; engines01=`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`; engines01=``; engines0=`The tiltrotors have been replaced with tiltjets, allowing for much greater airspeed and acceleration.`; return `${r} 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. ${engines0} ${engines01} ${Armor} ${landing} ${counter} ${Radar} ${miniguns}`; } break; case 'SP': - engine20 = `ramjet engines in the atmosphere that can reach Mach 10`; - b5 = `has been purchased from an insolvent Old World nation. It `; - shield = ``; - camera = ``; - efficiency = ``; - camera2 = ``; - drag = ``; - crew = ``; - engine2 = ``; - skin = ``; + let engine20=`ramjet engines in the atmosphere that can reach Mach 10`, b5=`has been purchased from an insolvent Old World nation. It `, shield=``, camera=``, efficiency=``, camera2=``, drag=``, crew=``, engine2=``, skin=``; if (S.SpacePlane >= 1) {r += `<br> ''Spaceplane:''`; - if (S.SpacePlane >= 2) b5 = ``; 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) engine20 = `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`; + if (S.SpacePlane >= 2) b5=``; 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) engine20=`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 `${r} A prototype spaceplane ${b5} rests in the hangar, its black fuselage gleaming. The craft is powered by ${engine20}${engine2}. ${efficiency} ${shield} ${camera} ${camera2} ${drag} ${crew} ${skin}`; } break; - case 'GunS': - a = `has been recommissioned for use by ${V.SF.Lower}. Currently, it `; - b4 = ``; - c2 = ``; - d = ``; - e = `Miniguns and Gatling cannons line`; - f = `; though the distance to ground targets renders the smaller calibers somewhat less useful`; - g = ``; - h = ``; - i = ``; - j = ``; - k = ``; + case 'GunS': + let a=`has been recommissioned for use by ${V.SF.Lower}. Currently, it `, b4=``, c2=``, d=``, e=`Miniguns and Gatling cannons line`, f=`, though the distance to ground targets renders the smaller calibers somewhat less useful`, g=``, h=``, i=``, j=``, k=``; if(S.GunS >= 1) {r += `<br> ''Gunship:''`; - if (S.GunS >= 2) b4 = `Infrared sensors have been added for the gunners to better pick targets.`; a = ``; - if (S.GunS >= 3) c2 = `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) b4 = `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`; + if (S.GunS >= 2) b4=`Infrared sensors have been added for the gunners to better pick targets.`; a=``; + if (S.GunS >= 3) c2=`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) b4=`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 `${r} A large gunship ${a} is being refueled in the hangar. ${e}${k} the port side of the fuselage${f}${j}. ${b4} ${i} ${g} ${c2}${h} ${d}`; } break; case 'sat': - loc1 = `An unused science satellite has been purchased from an Old World nation. While currently useless, it holds potential to be a powerful tool.`; - gyro = ``; - telemetry = ``; - thrusters = ``; - solar = ``; - surviv = ``; - laser1 = ``; - heat = ``; - reactor = ``; - lens = ``; - kin = ``; + let loc1=`An unused science satellite has been purchased from an Old World nation. While currently useless, it holds potential to be a powerful tool.`, gyro=``, telemetry=``, thrusters=``, solar=``, surviv=``, laser1=``, heat=``, reactor=``, lens=``, kin=``; if (S.Satellite.lv >= 1) {r += `<br> ''Satellite:''`; if (S.Satellite.lv >= 2) - if (V.SF.Squad.Satellite.InOrbit < 1) loc1 = `The satellite is being worked on in the Launch Bay.`; else loc1 = `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) laser1 = `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 `${r} ${loc1} ${gyro} ${thrusters} ${telemetry} ${solar} ${reactor} ${surviv} ${laser1}${heat} ${lens} ${kin}`; + if (V.SF.Squad.Satellite.InOrbit < 1) loc1=`The satellite is being worked on in the Launch Bay.`; else loc1=`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) laser1=`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 `${r} ${loc1} ${gyro} ${thrusters} ${telemetry} ${solar} ${reactor} ${surviv} ${laser1}${heat} ${lens} ${kin}`; } break; case 'GR': - loc = `has been purchased from a crumbling Old World nation. It`; - power = `Large batteries mounted in oversized shoulders power the robot for up to ten minutes of use; though they make for large targets.`; - knife = `simply a 8.5 meter long knife; though additional weapons are under development.`; - armor8 = ``; - actuator = ``; - cannon1 = ``; - heatsink = ``; - ammo2 = ``; - missile = ``; + let loc=`has been purchased from a crumbling Old World nation. It`, power=`Large batteries mounted in oversized shoulders power the robot for up to ten minutes of use, though they make for large targets.`, knife=`simply a 8.5 meter long knife, though additional weapons are under development.`, armor8=``, actuator=``, cannon1=``, heatsink=``, ammo2=``, missile=``; if (S.GiantRobot >= 1) {r += `<br> ''Giant Robot:''`; - if (S.GiantRobot >= 2) loc = ``; armor8 = `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) cannon1 = `A custom 45 mm Gatling cannon rifle has been developed for ranged use`; ammo2 = `; 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) armor8 = ``; actuator = `Final actuator tweaks have allowed for the addition of exceptionally thick armor without any loss in speed or power.`; - if (S.GiantRobot >= 9) ammo2 = `; with spare ammunition drums kept along the robot's waist.`; - if (S.GiantRobot >= 10) missile = `Missile pods have been mounted on the shoulders.`; + if (S.GiantRobot >= 2) loc=``; armor8=`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) cannon1=`A custom 45 mm Gatling cannon rifle has been developed for ranged use`; ammo2=`; 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) armor8=``; actuator=`Final actuator tweaks have allowed for the addition of exceptionally thick armor without any loss in speed or power.`; + if (S.GiantRobot >= 9) ammo2=`; with spare ammunition drums kept along the robot's waist.`; + if (S.GiantRobot >= 10) missile=`Missile pods have been mounted on the shoulders.`; return `${r} 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} ${armor8} ${actuator} ${heatsink} The main armament is ${knife} ${cannon1}${ammo2} ${missile}`; } break; case 'ms': - a4 = `A cruise missile launch site has been constructed near the base of`; - b2 = `outdated; something quickly rigged together to give the launch site something to fire in the case of an attack`; - c8 = ``; - d1 = ``; - e1 = ``; - f1 = ``; - g1 = ``; - h1 = ``; + let a4=`A cruise missile launch site has been constructed near the base of`, b2=`outdated, something quickly rigged together to give the launch site something to fire in the case of an attack`, c8=``, d1=``, e1=``, f1=``, g1=``, h1=``; if (S.MissileSilo >= 1) {r += `<br> ''Cruise Missile:''`; - if (S.MissileSilo >= 2) b2 = `a modern missile`; c8 = `; tipped with a conventional warhead`; - if (S.MissileSilo >= 3) d1 = `The launch systems have been overhauled, allowing a launch within seconds of an attack order being given.`; - if (S.MissileSilo >= 4) e1 = `The missile engines have been tweaked, giving them a greater range.`; - if (S.MissileSilo >= 5) f1 = `A passive radar has been installed, allowing the missile to follow moving targets.`; - if (S.MissileSilo >= 6) a4 = `Several cruise missile launch sites have been constructed around`; - if (S.MissileSilo >= 7) e1 = `The engine has been replaced, giving the missiles greater range and supersonic speeds.`; - if (S.MissileSilo >= 8) g1 = `The ability to pick new targets should the original be lost has been added.`; - if (S.MissileSilo >= 9) h1 = `The missile now uses its remaining fuel to create a thermobaric explosion, massively increasing explosive power.`; - if (S.MissileSilo >= 10) c8 = `that can be tipped with either a conventional or nuclear warhead`; + if (S.MissileSilo >= 2) b2=`a modern missile`; c8=`; tipped with a conventional warhead`; + if (S.MissileSilo >= 3) d1=`The launch systems have been overhauled, allowing a launch within seconds of an attack order being given.`; + if (S.MissileSilo >= 4) e1=`The missile engines have been tweaked, giving them a greater range.`; + if (S.MissileSilo >= 5) f1=`A passive radar has been installed, allowing the missile to follow moving targets.`; + if (S.MissileSilo >= 6) a4=`Several cruise missile launch sites have been constructed around`; + if (S.MissileSilo >= 7) e1=`The engine has been replaced, giving the missiles greater range and supersonic speeds.`; + if (S.MissileSilo >= 8) g1=`The ability to pick new targets should the original be lost has been added.`; + if (S.MissileSilo >= 9) h1=`The missile now uses its remaining fuel to create a thermobaric explosion, massively increasing explosive power.`; + if (S.MissileSilo >= 10) c8=` that can be tipped with either a conventional or nuclear warhead`; return `${r} ${a4} the arcology. The current missile armament is ${b2}${c8}. ${d1} ${e1} ${f1} ${g1} ${h1}`; } break; case 'AC': - recom1 = `has been recommissioned from the Old World for ${V.SF.Lower}. It`; - jets = `Formerly mothballed strike jets`; - loc2 = ``; - radar = ``; - AAG = ``; - prop = ``; - torp = ``; - armor9 = ``; - power1 = ``; - scramble1 = ``; + let recom1=`has been recommissioned from the Old World for ${V.SF.Lower}. It`, jets=`Formerly mothballed strike jets`, loc2=``, radar=``, AAG=``, prop=``, torp=``, armor9=``, power1=``, scramble1=``; if (S.AircraftCarrier >= 1) {r += `<br> ''Aircraft Carrier:''`; - if (V.week % 6 === 0) loc2 = `moored to the pier in the Naval Yard`; else loc2 = `patrolling the waters near ${V.arcologies[0].name}`; - if (S.AircraftCarrier >= 2) radar = `The island's radar and comms have been improved.`; recom1 = ``; - if (S.AircraftCarrier >= 3) AAG = `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) armor9 = `Additional armor has been added to the hull and deck.`; - if (S.AircraftCarrier >= 8) power1 = `The power plant has been converted to provide nuclear power.`; - if (S.AircraftCarrier >= 9) scramble1 = `The catapult has been converted to an electromagnetic launch system, halving the time it takes to scramble1 jets.`; - if (S.AircraftCarrier >= 10) jets = `Attack VTOL from the converted for carrier capability`; + if (V.week % 6 === 0) loc2=`moored to the pier in the Naval Yard`; else loc2=`patrolling the waters near ${V.arcologies[0].name}`; + if (S.AircraftCarrier >= 2) radar=`The island's radar and comms have been improved.`; recom1=``; + if (S.AircraftCarrier >= 3) AAG=`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) armor9=`Additional armor has been added to the hull and deck.`; + if (S.AircraftCarrier >= 8) power1=`The power plant has been converted to provide nuclear power.`; + if (S.AircraftCarrier >= 9) scramble1=`The catapult has been converted to an electromagnetic launch system, halving the time it takes to scramble1 jets.`; + if (S.AircraftCarrier >= 10) jets=`Attack VTOL from the converted for carrier capability`; return `${r} An aircraft carrier ${recom1} is ${loc2}. ${jets} serve as its airpower. ${scramble1} ${power1} ${radar} ${AAG} ${torp} ${prop} ${armor9}`; } break; case 'Sub': - recom = `has been recommissioned from the old world, and`; - reactor0 = `Because diesel engines provide power and breathing oxygen is kept in pressurized canisters; - the sub must frequently surface.`; - reactor1 = ``; - cal = ``; - hull = ``; - tubes = ``; - torpedoes = ``; - sonar = ``; - control = ``; - missiles = ``; + let recom=`has been recommissioned from the old world, and`, reactor0=`Because diesel engines provide power and breathing oxygen is kept in pressurized canisters, the sub must frequently surface.`, reactor1=``, cal=``, hull=``, tubes=``, torpedoes=``, sonar=``, control=``, missiles=``; if (S.Sub >= 1) {r += `<br> ''Submarine:''`; - if (S.Sub >= 2) recom = ``; reactor0 = `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.`; + if (S.Sub >= 2) recom=``; reactor0=`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 `${r} An attack submarine ${recom} is moored to the pier of the Naval Yard. ${reactor0}${reactor1} ${cal} ${hull} ${tubes}${torpedoes} ${sonar} ${control} ${missiles}`; } break; case 'HAT': - recom2 = `; has been recommissioned for use by ${V.SF.Lower}. It`; - tons = `200`; - skirt = ``; - guns = ``; - guns2 = ``; - fans = ``; - speed = ``; - turbines = ``; - armor10 = ``; - ramps = ``; - HATframe = ``; - loadout = ``; + let recom2=`; has been recommissioned for use by ${V.SF.Lower}. It`, tons=`200`, skirt=``, guns=``, guns2=``, fans=``, speed=``, turbines=``, armor10=``, ramps=``, HATframe=``, loadout=``; if (S.HAT >= 1) {r += `<br> ''Amphibious Transport:''`; - if (S.HAT >= 2) skirt = `The skirt has been upgraded to increase durability and improve cushion when traveling over uneven terrain and waves.`; recom2 = `;`; - 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) armor10 = `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.`; + if (S.HAT >= 2) skirt=`The skirt has been upgraded to increase durability and improve cushion when traveling over uneven terrain and waves.`; recom2=`;`; + 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) armor10=`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 `${r} An air cushion transport vehicle, or hovercraft ${recom2} is parked on the pier of the Naval Yard, ready to ferry ${tons} tons of soldiers and vehicles. ${guns} ${guns2} ${fans} ${turbines} ${speed} ${skirt} ${armor10} ${ramps} ${HATframe} ${loadout}`; } break; } /*if (V.SF.Facility.Toggle > 0 && V.SF.Facility.Active > 0) { r += `<br><br>''${V.SF.Facility.Caps}:''`; if (passage() === "Firebase") { - r += `<br>[[Enter the building|<< = SFReport()>>][]]`; + r += `<br>[[Enter the building|<<= SFReport()>>][]]`; } } else if (passage() === "SF_Report") { <<include "SF_.SupportFacilityReport">> @@ -964,22 +793,22 @@ window.UnitText = function(input) { }; /*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']; - const FS_OPTIONS = ['Repopulation','Eugenics','Gender radicalism','Gender traditionalism','Paternalism','Degradationism','Body Purism', 'Transformation Fetishism','Youth Preferentialism','Maturity Preferentialism','Slimness Enthusiasm','Asset Expansionism','Slave Pastoralism','Physical Idealism','Hedonistic Decadence','Chattel Religionism','Roman Revivalism','Aztec Revivalism','Egyptian Revivalism','Edo Revivalism','Arabian Revivalism','Chinese Revivalism','Multiculturalism']; - var text = ``; + const V=State.variables; + const UpgradeOptions=['Slaves','FoodsAndMedia','CommonArea','Barracks', 'SlaveProcessingCages','CommandCenter','Armory','DrugLab','Garage','Hangar', 'DroneBay','PersonalItems','VehicleUpgrades','CommonAreaVendors', 'RoleplayingManadated','ColonelCompilance','ColonelGift']; + const FS_OPTIONS=['Repopulation','Eugenics','Gender radicalism','Gender traditionalism','Paternalism','Degradationism','Body Purism', 'Transformation Fetishism','Youth Preferentialism','Maturity Preferentialism','Slimness Enthusiasm','Asset Expansionism','Slave Pastoralism','Physical Idealism','Hedonistic Decadence','Chattel Religionism','Roman Revivalism','Aztec Revivalism','Egyptian Revivalism','Edo Revivalism','Arabian Revivalism','Chinese Revivalism','Multiculturalism']; + var text=``; if (V.SF.FS === undefined) { text += `<br><br>`; //text += ``; - V.SF.FS = {Acceptance:{'FS':[],'Percent':[]}, Upgrade:0, Annoyance:0, Options:{ 'Slaves':[], 'FoodsAndMedia':[], 'CommonArea':[], 'Barracks':[], 'SlaveProcessingCages':[], 'CommandCenter':[], 'Armory':[], 'DrugLab':[], 'Garage':[], 'Hangar':[], 'DroneBay':[], 'PersonalItems':[], 'VehicleUpgrades':[], 'CommonAreaVendors':[], 'RoleplayingManadated':[], 'ColonelCompilance':[], 'ColonelGift':[] }}; - V.SF.Colonel.Talk = 1; + V.SF.FS={Acceptance:{'FS':[],'Percent':[]}, Upgrade:0, Annoyance:0, Options:{ 'Slaves':[], 'FoodsAndMedia':[], 'CommonArea':[], 'Barracks':[], 'SlaveProcessingCages':[], 'CommandCenter':[], 'Armory':[], 'DrugLab':[], 'Garage':[], 'Hangar':[], 'DroneBay':[], 'PersonalItems':[], 'VehicleUpgrades':[], 'CommonAreaVendors':[], 'RoleplayingManadated':[], 'ColonelCompilance':[], 'ColonelGift':[] }}; + V.SF.Colonel.Talk=1; } else { text += `You walk past The Colonel and move towards the common area to meet with an exclusive group of her very influential officers that are currently relaxing at their favorite table. These men and women are known for their competence, popularity, and authority within in their respective divisions of the ${V.SF.Lower}, they are hard to replace, and they are always looking to earn more coin; they are the perfect weak link for trickling your Future Society influences down into the Firebase. As the officers make room at their table for you to sit and join them for discussion, you spot The Colonel staring at you from afar, and she does not look happy with you. As you are her employer, she cannot stop you from speaking with her soldiers or moving around as you please, but she can tell that you are up to no good: <br><br>`; const MEMU_OPTION = function(VisableName,ArraryName,Cost) { - var FinalVisableName = VisableName; + var FinalVisableName=VisableName; if (ArraryName === 'ColonelGift') { switch(POS) { - case 'Repopulation': FinalVisableName += `Repopulationist`; break; + case 'Repopulation': FinalVisableName += ` Repopulationist`; break; case 'Eugenics': FinalVisableName += `Eugenicist`; break; case 'Gender radicalism': FinalVisableName += `Radicalist`; break; case 'Gender traditionalism': FinalVisableName += `Traditionalist`; break; @@ -1006,7 +835,7 @@ window.UnitText = function(input) { if (POS !== 'Multiculturalism') { FinalVisableName += `-themed` } - FinalVisableName += `personal gift optimized for this FS`; + FinalVisableName += ` personal gift optimized for this FS`; } text += `<<link "${FinalVisableName}""Firebase">> if ([${POS}].includes(V.SF.FS.FS)) { @@ -1030,18 +859,18 @@ window.UnitText = function(input) { V.SF.FS.Annoyance -= 15; } V.Cash -= cost; - V.SF.FS.Upgrade = 1; - <</link>> //costs <span class = 'yellowgreen'>${cashFormat($Cost)}</span>, `; + V.SF.FS.Upgrade=1; + <</link>> //costs <span class='yellowgreen'>${cashFormat($Cost)}</span>, `; if (ArraryName !== 'ColonelGift') { text += `increases`; - } else { text += `reduces`; } text += `The Colonel's annoyance by 15%`; - if (ArraryName !== 'ColonelGift') { text += `and will increase the acceptance of this FS by `; + } else { text += `reduces`; } text += ` The Colonel's annoyance by 15%`; + if (ArraryName !== 'ColonelGift') { text += ` and will increase the acceptance of this FS by `; if (ArraryName !== 'ColonelCompilance') { text += `6%`; } else { text += `10%`; } } text += `.`; } - const FSlist = FS_OPTIONS; - for(var i = 0;i<FSlist.length;i++) { - var FSPOS = FSlist[i]; + const FSlist=FS_OPTIONS; + for(let i = 0;i<FSlist.length;i++) { + let FSPOS=FSlist[i]; if (i > 0) text += `<br>`; switch(FSPOS) { case 'Repopulation': text += `Repopulation Efforts: focus on mass breeding in order to repopulate the future world.`; break; @@ -1066,43 +895,43 @@ window.UnitText = function(input) { case 'Edo Revivalism': text += `Edo Revivalism: a vision of Edo Japan.`; break; case 'Arabian Revivalism': text += `Arabian Revivalism: a vision of the Sultanate of old.`; break; case 'Chinese Revivalism': text += `Chinese Revivalism: a vision of ancient China.`; break; - case 'Multiculturalism': text += `Multiculturalism: a commitment to allow your arcology's citizens cultural freedom.`; break; + case 'Multiculturalism': text +=`Multiculturalism: a commitment to allow your arcology's citizens cultural freedom.`; break; } text += `\n Smuggle in FS-optimized : `; - const Optionslist = UpgradeOptions; + const Optionslist=UpgradeOptions; for (let i = 0;i<Optionslist.length;i++) { - var OptPOS = Optionslist[i]; - var title = ``; + var OptPOS=Optionslist[i]; + var title=``; switch(OptPOS) { - var cost = 200000; - case 'FoodsAndMedia': title = 'Common area decorations'; break; - case 'CommonArea': title = 'Barracks decorations'; break; - case 'Barracks': title = 'Barracks decorations`; break; - case 'SlaveProcessingCages': title = 'Slave Processing Cages decorations'; break; - case 'CommandCenter': title = 'Command Center decorations'; break; - case 'Armory': title = 'Armory decorations'; break; - case 'DrugLab': title = 'Drug Lab decorations'; break; - case 'Garage': title = 'Garage decorations'; break; - case 'Hangar': title = 'Hangar decorations'; break; - case 'DroneBay': title = 'Drone Bay decorations'; cost = 50000; break; - case 'PersonalItems': title = 'Personal Items'; break; - case 'VehicleUpgrades': title = 'Vehicle Upgrade'; cost = 300000; break; - case 'CommonAreaVendors': title = 'Firebase Vendors'; cost = 300000; break; - case 'RoleplayingManadated': title = 'Mandate FS-Roleplaying'; cost = 500000; break; - case 'ColonelCompilance': title = 'colonel compliance'; cost = 1000000; break; + var cost=200000; + case 'FoodsAndMedia': title='Common area decorations'; break; + case 'CommonArea': title='Barracks decorations'; break; + case 'Barracks': title='Barracks decorations`; break; + case 'SlaveProcessingCages': title='Slave Processing Cages decorations'; break; + case 'CommandCenter': title='Command Center decorations'; break; + case 'Armory': title='Armory decorations'; break; + case 'DrugLab': title='Drug Lab decorations'; break; + case 'Garage': title='Garage decorations'; break; + case 'Hangar': title='Hangar decorations'; break; + case 'DroneBay': title='Drone Bay decorations'; cost=50000; break; + case 'PersonalItems': title='Personal Items'; break; + case 'VehicleUpgrades': title='Vehicle Upgrade'; cost=300000; break; + case 'CommonAreaVendors': title='Firebase Vendors'; cost=300000; break; + case 'RoleplayingManadated': title='Mandate FS-Roleplaying'; cost=500000; break; + case 'ColonelCompilance': title='colonel compliance'; cost=1000000; break; } if (![FSPOS].includes(V.SF.Acceptance.FS)) { - MEMU_OPTION('Slaves','Slaves',cost), text += ``; + MEMU_OPTION('Slaves','Slaves',cost), text += ` `; } else { if (![FSPOS].includes(V.SF.FS.OptPOS)) { - MEMU_OPTION('title','OptPOS',cost), text += ``; + MEMU_OPTION('title','OptPOS',cost), text += ` `; } else if (![FSPOS].includes(V.SF.FS.ColonelGift)) { text += `\n `, MEMU_OPTION('Buy the Colonel a ','ColonelGift',1000000), text += ` `; - } + } } } } } text += `<br>`; return text; -};*/ +};*/ \ No newline at end of file diff --git a/src/pregmod/managePersonalAffairs.tw b/src/pregmod/managePersonalAffairs.tw index a4cc60915798166036bf70587f53634c3e98e939..8464281464b78f8c73f5081eae0116044f530cea 100644 --- a/src/pregmod/managePersonalAffairs.tw +++ b/src/pregmod/managePersonalAffairs.tw @@ -554,7 +554,7 @@ In total, you have given birth to: <br><<print num($PC.birthCitizen)>> bab<<if $PC.birthCitizen > 1>>ies<<else>>y<</if>> from sex with arcology citizens. <</if>> <<if $PC.birthFutaSis > 0>> - <br><<print commaNum($PC.birthFutaSis)>> bab<<if $PC.birthFutaSis > 1>>ies<<else>>y<</if>> conceived during orgies with the Futanari Sisters. + <br><<print num($PC.birthFutaSis)>> bab<<if $PC.birthFutaSis > 1>>ies<<else>>y<</if>> conceived during orgies with the Futanari Sisters. <</if>> <<if $PC.birthOther > 0>> <br><<print num($PC.birthOther)>> bab<<if $PC.birthOther > 1>>ies<<else>>y<</if>> from sources you can't quite recall. diff --git a/src/pregmod/widgets/economyWidgets.tw b/src/pregmod/widgets/economyWidgets.tw index 356deba6caee9fc3e4d801c9a8fb697a164a1c7a..e46b75cca9f245de2ccb2aa45edb0b21c90d66fb 100644 --- a/src/pregmod/widgets/economyWidgets.tw +++ b/src/pregmod/widgets/economyWidgets.tw @@ -541,7 +541,7 @@ <<print cashFormat($corpCash)>> <</replace>> <<replace `'#'+$args[0]+'AssetsDisp'`>> - <<print cashFormat(State.variables[$args[0]+"AssetPrice"] * State.variables[$args[0]+"Assets"])>> (<<if Math.ceil(State.variables[$args[0]+"Assets"]/500) < 1>> < 1 <<else>><<print commaNum(Math.ceil(State.variables[$args[0]+"Assets"]/500))>> <</if>>unit<<if State.variables[$args[0]+"Assets"]/500 > 1>>s<</if>>) + <<print cashFormat(State.variables[$args[0]+"AssetPrice"] * State.variables[$args[0]+"Assets"])>> (<<if Math.ceil(State.variables[$args[0]+"Assets"]/500) < 1>> < 1 <<else>><<print num(Math.ceil(State.variables[$args[0]+"Assets"]/500))>> <</if>>unit<<if State.variables[$args[0]+"Assets"]/500 > 1>>s<</if>>) <</replace>> <<replace `'#'+'controls'+$args[0]`>><<CorpDevBuySell $args[0] $args[1]>><</replace>><<script>>setReplaceTextboxMaxLength(State.temporary["textboxMLArg"], 10);<</script>> /* Error if decimal or not "all" or "max" string */ @@ -564,7 +564,7 @@ <<print cashFormat($corpCash)>> <</replace>> <<replace `'#'+$args[0]+'AssetsDisp'`>> - <<print cashFormat(State.variables[$args[0]+"AssetPrice"] * State.variables[$args[0]+"Assets"])>> (<<if Math.ceil(State.variables[$args[0]+"Assets"]/500) < 1>> < 1 <<else>><<print commaNum(Math.ceil(State.variables[$args[0]+"Assets"]/500))>> <</if>>unit<<if State.variables[$args[0]+"Assets"]/500 > 1>>s<</if>>) + <<print cashFormat(State.variables[$args[0]+"AssetPrice"] * State.variables[$args[0]+"Assets"])>> (<<if Math.ceil(State.variables[$args[0]+"Assets"]/500) < 1>> < 1 <<else>><<print num(Math.ceil(State.variables[$args[0]+"Assets"]/500))>> <</if>>unit<<if State.variables[$args[0]+"Assets"]/500 > 1>>s<</if>>) <</replace>> <<replace `'#'+'controls'+$args[0]`>><<CorpDevBuySell $args[0] $args[1]>><</replace>><<script>>setReplaceTextboxMaxLength(State.temporary["textboxMLArg"], 10);<</script>> /* Successful sell */ @@ -575,7 +575,7 @@ <<print cashFormat($corpCash)>> <</replace>> <<replace `'#'+$args[0]+'AssetsDisp'`>> - <<print cashFormat(State.variables[$args[0]+"AssetPrice"] * State.variables[$args[0]+"Assets"])>> (<<if (State.variables[$args[0]+"Assets"]/500) < 1>> < 1 <<else>><<print commaNum(Math.ceil(State.variables[$args[0]+"Assets"]/500))>> <</if>>unit<<if State.variables[$args[0]+"Assets"]/500 > 1>>s<</if>>) + <<print cashFormat(State.variables[$args[0]+"AssetPrice"] * State.variables[$args[0]+"Assets"])>> (<<if (State.variables[$args[0]+"Assets"]/500) < 1>> < 1 <<else>><<print num(Math.ceil(State.variables[$args[0]+"Assets"]/500))>> <</if>>unit<<if State.variables[$args[0]+"Assets"]/500 > 1>>s<</if>>) <</replace>> <<replace `'#'+$args[0]+'AssetsPurchasing'`>><</replace>> /* Unsuccessful sell but have enough assets for more than 1 unit */