From b8d710b55eb32e572899aaad2660b2199457a9ff Mon Sep 17 00:00:00 2001
From: DCoded <dcoded@live.com>
Date: Sat, 27 Apr 2019 16:14:59 -0400
Subject: [PATCH] Added beautify config file

---
 .jsbeautifyrc                      |    8 +
 src/SpecialForce/SpecialForce.js   | 1099 +++++++++++++++++++---------
 src/endWeek/saChoosesOwnClothes.js |    4 +-
 src/endWeek/saServeThePublic.js    |    2 +-
 4 files changed, 774 insertions(+), 339 deletions(-)
 create mode 100644 .jsbeautifyrc

diff --git a/.jsbeautifyrc b/.jsbeautifyrc
new file mode 100644
index 00000000000..b539d4ded37
--- /dev/null
+++ b/.jsbeautifyrc
@@ -0,0 +1,8 @@
+{
+    "eol": "\n",
+    "end_with_newline": true,
+    "indent_with_tabs": true,
+    "wrap_line_length": 0,
+    "space_around_combinator": true,
+    "brace_style": "collapse,preserve-inline"
+}
\ No newline at end of file
diff --git a/src/SpecialForce/SpecialForce.js b/src/SpecialForce/SpecialForce.js
index cbb46b8c0c3..3693faff23a 100644
--- a/src/SpecialForce/SpecialForce.js
+++ b/src/SpecialForce/SpecialForce.js
@@ -2,54 +2,62 @@
 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;
+		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
-};
+		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
-};
+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
-};
+		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:[]
-};
+		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() {
-	Main(); Squad(); Colonel();
+	Main();
+	Squad();
+	Colonel();
 };
 
 window.SFBC = function() {
 	const V = State.variables;
+
 	function InitClean() {
 		delete V.SFMODToggle;
 		delete V.securityForceActive;
 		delete V.securityForceCreate;
 		delete V.securityForceEventSeen;
 	}
+
 	function MainClean() {
 		delete V.securityForceActive;
 		delete V.securityForceRecruit;
@@ -71,6 +79,7 @@ window.SFBC = function() {
 		delete V.SubsidyActive;
 		delete V.securityForceSubsidyActive;
 	}
+
 	function ColonelClean() {
 		delete V.ColonelCore;
 		delete V.securityForceColonelToken;
@@ -78,6 +87,7 @@ window.SFBC = function() {
 		delete V.ColonelRelationship;
 		delete V.securityForceSexedColonelToken;
 	}
+
 	function TradeShowClean() {
 		delete V.OverallTradeShowAttendance;
 		delete V.CurrentTradeShowAttendance;
@@ -86,6 +96,7 @@ window.SFBC = function() {
 		delete V.TradeShowHelots;
 		delete V.TotalTradeShowHelots;
 	}
+
 	function UnitsClean() {
 		delete V.securityForceInfantryPower;
 		delete V.securityForceArcologyUpgrades;
@@ -113,49 +124,52 @@ window.SFBC = function() {
 		} else {
 			V.securityForceActive = 2;
 		}
-		V.SF = {Toggle:V.SFMODToggle, Active:V.securityForceActive}; InitClean();
+		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,
-				Size:V.SFAO,
-				Upgrade:V.securityForceUpgradeToken,
-				Gift:V.securityForceGiftToken,
-				UC:{Assign:V.SF.SpecOps, Lock:V.SF.SpecOpsLock},
-				ROE:V.securityForceRulesOfEngagement,
-				Target:V.securityForceFocus,
-				Regs:V.securityForceAccountability,
-				Caps:"The Special Force",
-				Lower:V.securityForceName,
-				Subsidy:V.SubsidyActive
+			Object.assign(V.SF, {
+				Depravity: V.securityForceDepravity,
+				Size: V.SFAO,
+				Upgrade: V.securityForceUpgradeToken,
+				Gift: V.securityForceGiftToken,
+				UC: {Assign: V.SF.SpecOps, Lock: V.SF.SpecOpsLock},
+				ROE: V.securityForceRulesOfEngagement,
+				Target: V.securityForceFocus,
+				Regs: V.securityForceAccountability,
+				Caps: "The Special Force",
+				Lower: V.securityForceName,
+				Subsidy: V.SubsidyActive
 			});
-			MainClean(); SFNameCapsCheck();
+			MainClean();
+			SFNameCapsCheck();
 
 			if (V.ColonelCore === undefined) V.ColonelCore = "";
 			if (V.ColonelDiscussion === undefined) V.ColonelDiscussion = 0;
 			if (V.ColonelSexed === undefined) V.ColonelSexed = 0;
 			V.SF.Colonel = {
-Core:V.ColonelCore,
-				Talk:V.securityForceColonelToken,
-				Fun:V.securityForceColonelSexed,
-				Status:V.ColonelRelationship
-}; ColonelClean();
+				Core: V.ColonelCore,
+				Talk: V.securityForceColonelToken,
+				Fun: V.securityForceColonelSexed,
+				Status: V.ColonelRelationship
+			};
+			ColonelClean();
 
 			if (V.TradeShowIncome === undefined) V.TradeShowIncome = 0;
 			if (V.TotalTradeShowIncome === undefined) V.TotalTradeShowIncome = 0;
 			if (V.TradeShowHelots === undefined) V.TradeShowHelots = 0;
 			if (V.TotalTradeShowHelots === undefined) V.TotalTradeShowHelots = 0;
 			V.SF.MercCon = {
-History:V.OverallTradeShowAttendance,
-				CanAttend:V.CurrentTradeShowAttendance,
-				Income:V.TradeShowIncome,
-				Revenue:V.TotalTradeShowIncome,
-				Menials:V.TradeShowHelots,
-				TotalMenials:V.TotalTradeShowHelots,
-				Mercs:0,
-				TotalMercs:0
-}; TradeShow();
+				History: V.OverallTradeShowAttendance,
+				CanAttend: V.CurrentTradeShowAttendance,
+				Income: V.TradeShowIncome,
+				Revenue: V.TotalTradeShowIncome,
+				Menials: V.TradeShowHelots,
+				TotalMenials: V.TotalTradeShowHelots,
+				Mercs: 0,
+				TotalMercs: 0
+			};
+			TradeShow();
 			if (V.SF.MercCon.History > 0) V.SF.MercCon.CanAttend = 1;
 
 			if (V.securityForceHeavyBattleTank === undefined) V.securityForceHeavyBattleTank = 0;
@@ -167,26 +181,25 @@ History:V.OverallTradeShowAttendance,
 			if (V.securityForceAircraftCarrier === undefined) V.securityForceAircraftCarrier = 0;
 			if (V.securityForceSubmarine === undefined) V.securityForceSubmarine = 0;
 			if (V.securityForceHeavyAmphibiousTransport === undefined) V.securityForceHeavyAmphibiousTransport = 0;
-			V.SF.Squad =
-			{
-				Troops:V.securityForcePersonnel,
-				Armoury:V.securityForceInfantryPower,
-				Firebase:V.securityForceArcologyUpgrades,
-				AV:V.securityForceVehiclePower,
-				TV:V.securityForceVehiclePower,
-				Drones:V.securityForceDronePower,
-				Drugs:V.securityForceStimulantPower,
-				PGT:V.securityForceHeavyBattleTank,
-				AA:V.securityForceAircraftPower,
-				TA:V.securityForceAircraftPower,
-				SpacePlane:V.securityForceSpacePlanePower,
-				GunS:V.securityForceAC130,
-				Satellite:{lv:V.securityForceSatellitePower, InOrbit:0},
-				GiantRobot:V.securityForceGiantRobot,
-				MissileSilo:V.securityForceMissileSilo,
-				AircraftCarrier:V.securityForceAircraftCarrier,
-				Sub:V.securityForceSubmarine,
-				HAT:V.securityForceHeavyAmphibiousTransport
+			V.SF.Squad = {
+				Troops: V.securityForcePersonnel,
+				Armoury: V.securityForceInfantryPower,
+				Firebase: V.securityForceArcologyUpgrades,
+				AV: V.securityForceVehiclePower,
+				TV: V.securityForceVehiclePower,
+				Drones: V.securityForceDronePower,
+				Drugs: V.securityForceStimulantPower,
+				PGT: V.securityForceHeavyBattleTank,
+				AA: V.securityForceAircraftPower,
+				TA: V.securityForceAircraftPower,
+				SpacePlane: V.securityForceSpacePlanePower,
+				GunS: V.securityForceAC130,
+				Satellite: {lv: V.securityForceSatellitePower, InOrbit: 0},
+				GiantRobot: V.securityForceGiantRobot,
+				MissileSilo: V.securityForceMissileSilo,
+				AircraftCarrier: V.securityForceAircraftCarrier,
+				Sub: V.securityForceSubmarine,
+				HAT: V.securityForceHeavyAmphibiousTransport
 			};
 			UnitsClean();
 		} else {
@@ -194,20 +207,25 @@ History:V.OverallTradeShowAttendance,
 		}
 	} 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};
-		delete V.SF.SpecOps; delete V.SF.SpecOpsLock;
+				V.SF.UC = {Assign: V.SF.SpecOps, Lock: V.SF.SpecOpsLock};
+				delete V.SF.SpecOps;
+				delete 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) {
@@ -223,180 +241,298 @@ History:V.OverallTradeShowAttendance,
 
 		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;
-			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.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.Sat = {lv: 0, InOrbit: 0};
 				V.SF.Squad.Satellite = V.SF.Squad.Sat;
-				delete V.SF.Squad.Sat; delete V.SatLaunched; delete V.SFUnit;
+				delete V.SF.Squad.Sat;
+				delete V.SatLaunched;
+				delete 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;
 		}
 	}
-	InitClean(); MainClean(); ColonelClean(); TradeShowClean(); UnitsClean();
+	InitClean();
+	MainClean();
+	ColonelClean();
+	TradeShowClean();
+	UnitsClean();
 	if (V.SF.Facility === undefined) Facility();
-	if (V.SF.Squad.Satellite === undefined) V.SF.Squad.Satellite = {lv:0, InOrbit:0};
+	if (V.SF.Squad.Satellite === undefined) V.SF.Squad.Satellite = {lv: 0, InOrbit: 0};
 };
 
 window.SFReport = function() {
-	"use strict"; const V = State.variables, T = State.temporary, S = V.SF.Squad;
-	const target = 50000, baseLine = 5000; let profit = 0, upkeep = 0, income = 0;
+	"use strict";
+	const V = State.variables,
+		T = State.temporary,
+		S = V.SF.Squad;
+	const target = 50000,
+		baseLine = 5000;
+	let profit = 0,
+		upkeep = 0,
+		income = 0;
 	let Multiplier = {
-action:1, troop:1, unit:1, depravity:1
-};
-	let FNG = 10, unitCap = 2500, Trade = 0.025;
-	let cost = {a:0.01, b:2.5}, NO = 1+(V.SF.Size/5), N1 = 1+(V.SF.Size/5);
-
-	V.SF.UC.num = 0; Count(); let r = ``, deaths = 0, SFD = V.SF.Depravity;
-	if (profit < 1) cost.a = 10; cost.b = 0.1; NO = 1; N1 = 0.1;
+		action: 1,
+		troop: 1,
+		unit: 1,
+		depravity: 1
+	};
+	let FNG = 10,
+		unitCap = 2500,
+		Trade = 0.025;
+	let cost = {a: 0.01, b: 2.5},
+		NO = 1 + (V.SF.Size / 5),
+		N1 = 1 + (V.SF.Size / 5);
+
+	V.SF.UC.num = 0;
+	Count();
+	let r = ``,
+		deaths = 0,
+		SFD = V.SF.Depravity;
+	if (profit < 1) cost.a = 10;
+	cost.b = 0.1;
+	NO = 1;
+	N1 = 0.1;
 
 	if (S.Troops > unitCap) S.Troops = unitCap;
 	if (S.Troops < 100) {
 		S.Troops += Math.ceil(jsRandom(2, 5));
 	} else {
 		if (V.SF.Target === "recruit") {
-			S.Troops -= Math.ceil(jsRandom(1*S.Troops/1000, 0));
+			S.Troops -= Math.ceil(jsRandom(1 * S.Troops / 1000, 0));
 		} else if (V.SF.Target === "raiding") {
-			S.Troops -= Math.ceil(jsRandom(1.15*S.Troops/1000, -1.20*S.Troops/1000));
+			S.Troops -= Math.ceil(jsRandom(1.15 * S.Troops / 1000, -1.20 * S.Troops / 1000));
 		} else {
-			S.Troops -= Math.ceil(jsRandom(1.10*S.Troops/1000, -1.15*S.Troops/1000));
+			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);
+			V.SF.UC.num = Math.ceil(S.Troops * 0.01);
 		} else {
-			V.SF.UC.num = Math.ceil(S.Troops*0.05);
+			V.SF.UC.num = Math.ceil(S.Troops * 0.05);
 		}
 	}
 	S.Troops -= V.SF.UC.num;
 	if (S.Troops > 200) {
-		Trade += 0.05*(S.Troops/200);
-		Multiplier.troop += S.Troops/200; upkeep += (S.Troops*25)/cost.a;
+		Trade += 0.05 * (S.Troops / 200);
+		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 += V.SF.Size*10;
+			V.authority += 25 * (Math.ceil(S.Troops / 200));
+			V.authority += V.SF.Size * 10;
 			V.authority = Math.clamp(V.authority, 0, 20000);
 		}
 	}
 
 	if (S.Firebase > 0) {
-		FNG += S.Firebase; Trade += 0.5*S.Firebase; Multiplier.unit += 7.5*S.Firebase+2*Math.pow(S.Firebase, 2)*cost.a; upkeep += (95*10+S.Firebase)*cost.b;
+		FNG += S.Firebase;
+		Trade += 0.5 * S.Firebase;
+		Multiplier.unit += 7.5 * S.Firebase + 2 * Math.pow(S.Firebase, 2) * cost.a;
+		upkeep += (95 * 10 + S.Firebase) * cost.b;
 	}
 	if (S.Armoury > 0) {
-		FNG += 2*S.Armoury; Trade += 0.25*S.Armoury; Multiplier.unit += 7.5*S.Armoury+2*Math.pow(S.Armoury, 2)*cost.a; upkeep += (55*S.Armoury)*cost.b;
+		FNG += 2 * S.Armoury;
+		Trade += 0.25 * S.Armoury;
+		Multiplier.unit += 7.5 * S.Armoury + 2 * Math.pow(S.Armoury, 2) * cost.a;
+		upkeep += (55 * S.Armoury) * cost.b;
 	}
 	if (S.Drugs > 0) {
-		FNG += S.Drugs; Trade += 0.25*S.Drugs; Multiplier.unit += 7.5*S.Drugs+2*Math.pow(S.Drugs, 2)*cost.a; upkeep += (35*S.Drugs)*cost.b;
+		FNG += S.Drugs;
+		Trade += 0.25 * S.Drugs;
+		Multiplier.unit += 7.5 * S.Drugs + 2 * Math.pow(S.Drugs, 2) * cost.a;
+		upkeep += (35 * S.Drugs) * cost.b;
 	}
 	if (S.Firebase >= 1) {
 		if (S.AV > 0) {
-			FNG += S.AV; Trade += 0.25*S.AV; Multiplier.unit += 7.5*S.AV+2*Math.pow(S.AV, 2)*cost.a; upkeep += (89*S.AV)*cost.b;
+			FNG += S.AV;
+			Trade += 0.25 * S.AV;
+			Multiplier.unit += 7.5 * S.AV + 2 * Math.pow(S.AV, 2) * cost.a;
+			upkeep += (89 * S.AV) * cost.b;
 		}
 		if (S.TV > 0) {
-			FNG += S.TV; Trade += 0.25*S.TV; Multiplier.unit += 7.5*S.TV+2*Math.pow(S.TV, 2)*cost.a; upkeep += (89*S.TV)*cost.b;
+			FNG += S.TV;
+			Trade += 0.25 * S.TV;
+			Multiplier.unit += 7.5 * S.TV + 2 * Math.pow(S.TV, 2) * cost.a;
+			upkeep += (89 * S.TV) * cost.b;
 		}
 		if (S.PGT > 0) {
-			FNG += S.PGT; Trade += 0.25*S.PGT; Multiplier.unit += 15*S.PGT+3*Math.pow(S.PGT, 2)*cost.a; upkeep += (100*S.PGT)*cost.b;
+			FNG += S.PGT;
+			Trade += 0.25 * S.PGT;
+			Multiplier.unit += 15 * S.PGT + 3 * Math.pow(S.PGT, 2) * cost.a;
+			upkeep += (100 * S.PGT) * cost.b;
 		}
 	}
 
 	if (S.Firebase >= 2 && S.Drones > 0) {
-		FNG += S.Drones; Trade += 0.5*S.Drones; Multiplier.unit += 7.5*S.Drones+2*Math.pow(S.Drones, 2)*cost.a; upkeep += (50*S.Drones)*cost.b;
+		FNG += S.Drones;
+		Trade += 0.5 * S.Drones;
+		Multiplier.unit += 7.5 * S.Drones + 2 * Math.pow(S.Drones, 2) * cost.a;
+		upkeep += (50 * S.Drones) * cost.b;
 	}
 
 	if (S.Firebase >= 4) {
 		if (S.AA > 0) {
-			FNG += S.AA; Trade += 0.25*S.AA; Multiplier.unit += 7.5*S.AA+2*Math.pow(S.AA, 2)*cost.a; upkeep += (100*S.AA)*cost.b;
+			FNG += S.AA;
+			Trade += 0.25 * S.AA;
+			Multiplier.unit += 7.5 * S.AA + 2 * Math.pow(S.AA, 2) * cost.a;
+			upkeep += (100 * S.AA) * cost.b;
 		}
 		if (S.TA > 0) {
-			FNG += S.TA; Trade += 0.25*S.TA; Multiplier.unit += 7.5*S.TA+2*Math.pow(S.TA, 2)*cost.a; upkeep += (100*S.TA)*cost.b;
+			FNG += S.TA;
+			Trade += 0.25 * S.TA;
+			Multiplier.unit += 7.5 * S.TA + 2 * Math.pow(S.TA, 2) * cost.a;
+			upkeep += (100 * S.TA) * cost.b;
 		}
 		if (S.SpacePlane > 0) {
-			FNG += S.SpacePlane; Trade += 0.25*S.SpacePlane; Multiplier.unit += 7.5*S.SpacePlane+2*Math.pow(S.SpacePlane, 2)*cost.a; upkeep += (100*S.SpacePlane)*cost.b;
+			FNG += S.SpacePlane;
+			Trade += 0.25 * S.SpacePlane;
+			Multiplier.unit += 7.5 * S.SpacePlane + 2 * Math.pow(S.SpacePlane, 2) * cost.a;
+			upkeep += (100 * S.SpacePlane) * cost.b;
 		}
 		if (S.GunS > 0) {
-			FNG += S.GunS; Trade += 0.25*S.GunS; Multiplier.unit += 12*S.GunS+3*Math.pow(S.GunS, 2)*cost.a; upkeep += 70*S.GunS;
+			FNG += S.GunS;
+			Trade += 0.25 * S.GunS;
+			Multiplier.unit += 12 * S.GunS + 3 * Math.pow(S.GunS, 2) * cost.a;
+			upkeep += 70 * S.GunS;
 		}
 		if (S.Satellite.lv > 0 && S.Satellite.InOrbit > 0) {
-			FNG += S.Satellite.lv; Trade += 0.25*S.Satellite.lv; Multiplier.unit += 15*S.Satellite.lv+5*Math.pow(S.Satellite.lv, 2)*cost.a; upkeep += (85*S.Satellite.lv)*cost.b;
+			FNG += S.Satellite.lv;
+			Trade += 0.25 * S.Satellite.lv;
+			Multiplier.unit += 15 * S.Satellite.lv + 5 * Math.pow(S.Satellite.lv, 2) * cost.a;
+			upkeep += (85 * S.Satellite.lv) * cost.b;
 		}
 		if (S.GiantRobot > 0) {
-			FNG += S.GiantRobot; Trade += 0.25*S.GiantRobot; Multiplier.unit += 15*S.GiantRobot+5*Math.pow(S.GiantRobot, 2)*cost.a; upkeep += (95*S.GiantRobot)*cost.b;
+			FNG += S.GiantRobot;
+			Trade += 0.25 * S.GiantRobot;
+			Multiplier.unit += 15 * S.GiantRobot + 5 * Math.pow(S.GiantRobot, 2) * cost.a;
+			upkeep += (95 * S.GiantRobot) * cost.b;
 		}
 		if (S.MissileSilo > 0) {
-			FNG += S.MissileSilo; Trade += 0.25*S.MissileSilo; Multiplier.unit += 15*S.MissileSilo+5*Math.pow(S.MissileSilo, 2)*cost.a; upkeep += (100*S.MissileSilo)*cost.b;
+			FNG += S.MissileSilo;
+			Trade += 0.25 * S.MissileSilo;
+			Multiplier.unit += 15 * S.MissileSilo + 5 * Math.pow(S.MissileSilo, 2) * cost.a;
+			upkeep += (100 * S.MissileSilo) * cost.b;
 		}
 	}
 
 	if (S.AircraftCarrier > 0) {
-		FNG += S.AircraftCarrier; Trade += 0.25*S.AircraftCarrier; Multiplier.unit += 9*S.AircraftCarrier+3*Math.pow(S.AircraftCarrier, 2)*cost.a; upkeep += (80*S.AircraftCarrier)*cost.b;
+		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;
+		FNG += S.Sub;
+		Trade += 0.25 * S.Sub;
+		Multiplier.unit += 7.5 * S.Sub + 2 * Math.pow(S.Sub, 2) * cost.a;
+		upkeep += (90 * S.Sub) * cost.b;
 	}
 	if (S.HAT > 0) {
-		FNG += S.HAT; Trade += 0.25*S.HAT; Multiplier.unit += 7.5*S.HAT+2*Math.pow(S.HAT, 2)*cost.a; upkeep += (70*S.HAT)*cost.b;
+		FNG += S.HAT;
+		Trade += 0.25 * S.HAT;
+		Multiplier.unit += 7.5 * S.HAT + 2 * Math.pow(S.HAT, 2) * cost.a;
+		upkeep += (70 * S.HAT) * cost.b;
 	}
 
 	switch (V.SF.Colonel.Core) {
-		case "kind": FNG += 10; Trade += 0.15; SFD -= 0.15; break;
-		case "cruel": Trade -= 0.15; SFD += 0.15; break;
-		case "brazen": FNG += 15; Multiplier.unit += 0.5; break;
-		case "jaded": Trade -= 0.05; SFD += 0.05; break;
-		case "shell shocked": Trade += 0.05; SFD -= 0.05; Multiplier.unit -= 0.5; break;
+		case "kind":
+			FNG += 10;
+			Trade += 0.15;
+			SFD -= 0.15;
+			break;
+		case "cruel":
+			Trade -= 0.15;
+			SFD += 0.15;
+			break;
+		case "brazen":
+			FNG += 15;
+			Multiplier.unit += 0.5;
+			break;
+		case "jaded":
+			Trade -= 0.05;
+			SFD += 0.05;
+			break;
+		case "shell shocked":
+			Trade += 0.05;
+			SFD -= 0.05;
+			Multiplier.unit -= 0.5;
+			break;
 		default:
 			break;
 	}
 
 	if (V.SF.Target === "raiding") {
-		SFD += 0.05; Multiplier.action += 0.5;
+		SFD += 0.05;
+		Multiplier.action += 0.5;
 	} else if (V.SF.Target === "secure") {
-		SFD -= 0.05; Multiplier.action += 0.2;
+		SFD -= 0.05;
+		Multiplier.action += 0.2;
 	} else {
-		SFD -= 0.1; Multiplier.action -= 0.5;
+		SFD -= 0.1;
+		Multiplier.action -= 0.5;
 	}
 	if (V.SF.ROE === "free") {
-		Multiplier.action *= 0.8; SFD += 0.05; Trade += Trade*0.95;
+		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;
+		Multiplier.action *= 1.1;
+		SFD -= 0.05;
+		Trade += Trade * 1.05;
 	}
 	if (V.SF.Regs === "none") {
-			Multiplier.action *= 0.8; SFD += 0.05; Trade += Trade*0.95;
-		} else if (V.SF.Regs === "strict") {
-			Multiplier.action *= 1.1; SFD -= 0.05; Trade += Trade*1.05;
-			Multiplier.depravity = 1+SFD;
-		}
-	if (SFD > -2) Trade *= 1+SFD/2;
+		Multiplier.action *= 0.8;
+		SFD += 0.05;
+		Trade += Trade * 0.95;
+	} else if (V.SF.Regs === "strict") {
+		Multiplier.action *= 1.1;
+		SFD -= 0.05;
+		Trade += Trade * 1.05;
+		Multiplier.depravity = 1 + SFD;
+	}
+	if (SFD > -2) Trade *= 1 + SFD / 2;
 
 	if (V.SF.Target === "recruit") {
-		FNG += FNG*0.95;
+		FNG += FNG * 0.95;
 	} else {
-		FNG += FNG*0.25;
+		FNG += FNG * 0.25;
 	}
-	FNG = Math.ceil(FNG/2);
+	FNG = Math.ceil(FNG / 2);
 
 	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));
+		repX((Math.ceil(V.rep * ((Trade / 100) * 0.95))), "specialForces");
+		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);
+		repX((Math.ceil(V.rep * (Trade / 100) * 0.25)), "specialForces");
+		V.arcologies[0].prosperity = Math.ceil(V.arcologies[0].prosperity + (Trade / 10) * 0.25);
 	}
 
-	income += ( (baseLine* (1+Multiplier.troop/NO).toFixed(2) * (1+Multiplier.unit/NO).toFixed(2) * (1+Multiplier.action/NO).toFixed(2) * (1+Multiplier.depravity/NO).toFixed(2) ) - (upkeep*N1).toFixed(2) )/( (V.SF.Size/2+S.Troops/2)*5 );
-	if (V.SF.Target === "raiding") income *= 1.25; else income *= 1.15;
-	if (V.economy < 100) if (V.SF.Target === "raiding") income *= 14.25; else income *= 14.15;// Remove line if hard mode ever gets fixed.
-	S.Troops += FNG; income = Math.ceil(income);
+	income += ((baseLine * (1 + Multiplier.troop / NO).toFixed(2) * (1 + Multiplier.unit / NO).toFixed(2) * (1 + Multiplier.action / NO).toFixed(2) * (1 + Multiplier.depravity / NO).toFixed(2)) - (upkeep * N1).toFixed(2)) / ((V.SF.Size / 2 + S.Troops / 2) * 5);
+	if (V.SF.Target === "raiding") income *= 1.25;
+	else income *= 1.15;
+	if (V.economy < 100)
+		if (V.SF.Target === "raiding") income *= 14.25;
+		else income *= 14.15; // Remove line if hard mode ever gets fixed.
+	S.Troops += FNG;
+	income = Math.ceil(income);
 	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 (income >= target) profit = 1; delete V.SF.Subsidy; cashX(income, "specialForces");
+	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;
 
@@ -407,12 +543,14 @@ action:1, troop:1, unit:1, depravity:1
 		} 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;
-	if (V.SF.Upgrade !== undefined) V.SF.Upgrade = 0; V.SF.Gift = 0;
-	V.SF.Colonel.Talk = 0; V.SF.Colonel.Fun = 0;
+	if (V.SF.Upgrade !== undefined) V.SF.Upgrade = 0;
+	V.SF.Gift = 0;
+	V.SF.Colonel.Talk = 0;
+	V.SF.Colonel.Fun = 0;
 
 	r += `<br>__Week ${V.week} (AO:${V.terrain}) operational report for ${V.SF.Lower}__:`;
 	r += `<br>${V.SF.Caps} focused their ${num(S.Troops)} troops on `;
@@ -448,32 +586,39 @@ action:1, troop:1, unit:1, depravity:1
 	r += `<br>//Your instructions to ${SFC()}://`;
 
 	r += `<br>&nbsp;Deployment focus: `; // The below lines are indented to increase readability.
-		r += `<span id="focus"> <<if $SF.Target == "recruit">>''Recruiting and Training''<<elseif $SF.Target == "secure">>''Securing Trade Routes''<<else>>''Raiding and Slaving''<</if>></span>.&nbsp;&nbsp;`;
-		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>.&nbsp;&nbsp;`;
+	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>&nbsp;Rules of Engagement: `; // The below lines are indented to increase readability.
-		r += `<span id="roe"> <<if $SF.ROE === "hold">>''Hold Fire''<<elseif $SF.ROE === "limited">>''Limited Fire''<<else>>''Free Fire''<</if>></span>.&nbsp;&nbsp;`;
-		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>.&nbsp;&nbsp;`;
+	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>&nbsp;Accountability: `; // The below lines are indented to increase readability.
-		r += `<span id="accountability"> <<if $SF.Regs === "strict">>''Strict Accountability''<<elseif $SF.Regs === "some">>''Some Accountability''<<else>>''No Accountability''<</if>></span>.&nbsp;&nbsp;`;
-		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>.&nbsp;&nbsp;`;
+	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);
-
-		V.SF.MercCon.Menials += menialGifts; V.SF.MercCon.TotalMenials += menialGifts;
-		V.menials += menialGifts; V.SF.MercCon.History += 1;
-		V.SF.MercCon.Income += TSProfit; V.SF.MercCon.Revenue += TSProfit;
+		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);
+
+		V.SF.MercCon.Menials += menialGifts;
+		V.SF.MercCon.TotalMenials += menialGifts;
+		V.menials += menialGifts;
+		V.SF.MercCon.History += 1;
+		V.SF.MercCon.Income += TSProfit;
+		V.SF.MercCon.Revenue += TSProfit;
 		cashX(TSProfit, "specialForces");
 
 		if (V.secExp > 0 && V.mercenaries > 0) {
 			V.SF.MercCon.Mercs = 0;
-			NewMercs = jsRandom(1, (tradeShowAttendes/10));
-			V.mercFreeManpower += NewMercs; V.SF.MercCon.TotalMercs += NewMercs;
+			NewMercs = jsRandom(1, (tradeShowAttendes / 10));
+			V.mercFreeManpower += NewMercs;
+			V.SF.MercCon.TotalMercs += NewMercs;
 			V.SF.MercCon.Mercs += NewMercs;
 			r += `<br>''TradeShow'': During a break, The Colonel managed to sell some generic schematics to the ${tradeShowAttendes} attendees, some of whom decided to also give a few menial slaves as a bonus.<br>`;
 		}
@@ -482,43 +627,95 @@ action:1, troop:1, unit:1, depravity:1
 };
 
 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);
+	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;
+		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;
+		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;
+	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;
+		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;
+		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;
+	V.SF.Size = T.Base;
+	V.SF.Size = C(V.SF.Size, 1, T.max);
+	T.T1 = 0;
 
 	if (E > 100) {
 		T.Env = 4;
@@ -528,7 +725,8 @@ window.Count = function() {
 		T.Env = 2;
 	}
 
-	if (V.SF.Size >= 30) T.T1 = 1; T.SFSubsidy = 5000*(1+((V.SF.Squad.Troops/100)+(V.SF.Size/100)));
+	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();
@@ -542,36 +740,44 @@ window.SFNameCapsCheck = function() {
 };
 
 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);
 };
 
 window.progress = function(x, max) {
-	"use strict"; let out = `⏐`, z, i;
+	"use strict";
+	let out = `⏐`,
+		z, i;
 	if (max === undefined) {
 		Math.clamp(x, 0, 10);
 		if (State.variables.SF.Size < 30) {
 			z = 5 - x;
-			for (i = 0; i<x; i++) out += `█⏐`;
-			for (i = 0; i<z; i++) out += `<span style='opacity: 0;'>█</span>⏐`;
-			for (i = 0; i<5; i++) out += `░⏐`;}
-		else {
+			for (i = 0; i < x; i++) out += `█⏐`;
+			for (i = 0; i < z; i++) out += `<span style='opacity: 0;'>█</span>⏐`;
+			for (i = 0; i < 5; i++) out += `░⏐`;
+		} else {
 			z = 10 - x;
-			for (i = 0; i<x; i++) out += `█⏐`;
-			for (i = 0; i<z; i++) out += `<span style='opacity: 0;'>█</span>⏐`;}}
-	else {
+			for (i = 0; i < x; i++) out += `█⏐`;
+			for (i = 0; i < z; i++) out += `<span style='opacity: 0;'>█</span>⏐`;
+		}
+	} else {
 		Math.clamp(x, 0, max);
-		x = Math.floor(10*x/max);
+		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 < x; i++) out += `█⏐`;
+		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 {
@@ -583,7 +789,8 @@ 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) {
@@ -594,11 +801,14 @@ window.SFCR = function() {
 };
 
 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. `;
+			choice += `${V.SF.Caps} is turning over spare capital in tribute this week. `;
 			if (V.SF.MercCon.CanAttend === -1 && (C.Talk + C.Fun !== 1)) {
 				choice += `"I think I can find <span class='yellowgreen'>${cashFormat(Math.ceil(V.CashGift))}</span> for you, boss."`;
 			} else {
@@ -619,7 +829,8 @@ window.Interactions = function() {
 				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}`;
 };
 
@@ -629,23 +840,37 @@ window.BadOutcome = function() {
 	let r = ``;
 	V.SF.Active = -2;
 
-	switch(V.SF.Colonel.Core) {
+	switch (V.SF.Colonel.Core) {
 		case "Shell-Shocked":
-			V.SF.BadOutcome = "lockdown"; V.trinkets.push("${t} explosives detonator");
+			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.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;
+			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.`;
 			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.`;
@@ -660,7 +885,9 @@ 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.`;
@@ -675,112 +902,234 @@ window.BadOutcome = function() {
 };
 
 window.UnitText = function(input) {
-	"use strict"; const V = State.variables, S = V.SF.Squad;
+	"use strict";
+	const V = State.variables,
+		S = V.SF.Squad;
 	// Sorted by case
 	let appear = `is currently constructed in a haphazard fashion.`;
 	let barracks = `Soldiers' cots are mixed in with weapons crates and ammunition.`;
 	let slave = `Cages for processing slaves lie off to one side,`;
 	let common = `and in the center is a common area with tables for soldiers to gather around for meals or rowdy conversations.`;
-	let garage = ``, drone = ``, hangar = ``, launch = ``, artillery = ``;
-	let comms = ``, training = ``;
+	let garage = ``,
+		drone = ``,
+		hangar = ``,
+		launch = ``,
+		artillery = ``;
+	let comms = ``,
+		training = ``;
 
 	const Quantity = `the ${num(S.Troops)} members of ${V.SF.Lower}`;
 
 	let weapons = `The weapons are mostly worn rifles that have already seen years of service before ${V.SF.Lower} acquired them.`;
 	let armor1 = `The body armor is enough to stop smaller calibers, but nothing serious.`;
-	let radio = ``, helmets = ``, ammo0 = ``, uniforms = ``, special = ``;
+	let radio = ``,
+		helmets = ``,
+		ammo0 = ``,
+		uniforms = ``,
+		special = ``;
 	let exo = ``;
 
-	let amphet = ``, phen = ``, steroid = ``, downer = ``, concen = ``;
-	let stimpack = ``, stabilizer = ``;
-
-	let a = `have been recommissioned for use by ${V.SF.Lower}`, b = `.`, c = ``;
-	let d = ``, e = ``, f = ``, g = ``, h = ``, i = ``, j = ``, k = ``;
+	let amphet = ``,
+		phen = ``,
+		steroid = ``,
+		downer = ``,
+		concen = ``;
+	let stimpack = ``,
+		stabilizer = ``;
+
+	let a = `have been recommissioned for use by ${V.SF.Lower}`,
+		b = `.`,
+		c = ``;
+	let d = ``,
+		e = ``,
+		f = ``,
+		g = ``,
+		h = ``,
+		i = ``,
+		j = ``,
+		k = ``;
 
 	let activate = `has been recommissioned for use by ${V.SF.Lower}. They`;
 	let mechanics = `, mechanics are methodically checking the recent purchases for battle-readiness`;
 	let MG = `120 mm main gun is enough to handle the majority of opponents around the Free Cities.`;
-	let engine1 = ``, armor2 = ``, armor22 = ``, ammo1 = ``, mg = ``;
-	let fireC0 = ``, fireC1 = ``, fireC2 = ``, fireC3 = ``, turret = ``;
+	let engine1 = ``,
+		armor2 = ``,
+		armor22 = ``,
+		ammo1 = ``,
+		mg = ``;
+	let fireC0 = ``,
+		fireC1 = ``,
+		fireC2 = ``,
+		fireC3 = ``,
+		turret = ``;
 
 	let B = `has been recommissioned for use by ${V.SF.Lower}. They`;
 	let C = `, mechanics are giving the new purchases a final tuneup`;
-	let squad = `a squad`, G1 = `20`, G2 = `in a firefight`;
-	let e0 = `The engine has been`, engine3 = ``, armor3 = ``, tires = ``;
-	let m1 = ``, m2 = ``, pod1 = ``, pod2 = ``;
+	let squad = `a squad`,
+		G1 = `20`,
+		G2 = `in a firefight`;
+	let e0 = `The engine has been`,
+		engine3 = ``,
+		armor3 = ``,
+		tires = ``;
+	let m1 = ``,
+		m2 = ``,
+		pod1 = ``,
+		pod2 = ``;
 
 	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`;
-	let c1 = ``, engines4 = `. Two engines power the left and right sides of the tank separately, leaving it underpowered and slow`;
-	let gun0 = ``, gun1 = ``, gun2 = `an undersized main gun and makeshift firing system from a standard battle tank`;
-	let armor5 = ``, armor6 = ``, cannon = ``, laser = ``, PGTframe = ``;
-
-	let W1 = `only armed`, W2 = `;`, W3 = `a poor weapon against flying targets, but enough to handle ground forces`;
+	let c1 = ``,
+		engines4 = `. Two engines power the left and right sides of the tank separately, leaving it underpowered and slow`;
+	let gun0 = ``,
+		gun1 = ``,
+		gun2 = `an undersized main gun and makeshift firing system from a standard battle tank`;
+	let armor5 = ``,
+		armor6 = ``,
+		cannon = ``,
+		laser = ``,
+		PGTframe = ``;
+
+	let W1 = `only armed`,
+		W2 = `;`,
+		W3 = `a poor weapon against flying targets, but enough to handle ground forces`;
 	let group = `A small group of attack VTOL have been recommissioned for use by ${V.SF.Lower}, enough to make up a squadron`;
-	let engines = ``, TAI = ``, lock = ``, support = ``, stealth = ``;
-	let scramble = ``, PAI = ``;
-
-	let Num = `number`, type = `tiltrotor`, capacity = `small platoon or 15`;
-	let engines0 = ``, engines01 = ``, Radar = ``, Armor = ``, landing = ``;
-	let miniguns = ``, counter = ``;
+	let engines = ``,
+		TAI = ``,
+		lock = ``,
+		support = ``,
+		stealth = ``;
+	let scramble = ``,
+		PAI = ``;
+
+	let Num = `number`,
+		type = `tiltrotor`,
+		capacity = `small platoon or 15`;
+	let engines0 = ``,
+		engines01 = ``,
+		Radar = ``,
+		Armor = ``,
+		landing = ``;
+	let miniguns = ``,
+		counter = ``;
 
 	let engine20 = `ramjet engines in the atmosphere that can reach Mach 10`;
 	let b5 = `has been purchased from an insolvent old world nation. It `;
-	let shield = ``, camera = ``, efficiency = ``, camera2 = ``, drag = ``;
-	let crew = ``, engine2 = ``, skin = ``;
+	let shield = ``,
+		camera = ``,
+		efficiency = ``,
+		camera2 = ``,
+		drag = ``;
+	let crew = ``,
+		engine2 = ``,
+		skin = ``;
 
 	let activate2 = `has been recommissioned for use by ${V.SF.Lower}. Currently, it `;
-	let barrels = `Miniguns and Gatling cannons line`, distance = `, though the distance to ground targets renders the smaller calibers somewhat less useful`;
+	let barrels = `Miniguns and Gatling cannons line`,
+		distance = `, though the distance to ground targets renders the smaller calibers somewhat less useful`;
 	// eslint-disable-next-line camelcase
 	let b4 = ``, c2 = ``, fuel = ``, GS_Speed = ``, countermeasures = ``, ammunition = ``, DFA = ``, autocannon = ``;
 
 	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.`;
-	let gyro = ``, telemetry = ``, thrusters = ``, solar = ``, surviv = ``;
-	let laser1 = ``, heat = ``, reactor = ``, lens = ``, kin = ``;
+	let gyro = ``,
+		telemetry = ``,
+		thrusters = ``,
+		solar = ``,
+		surviv = ``;
+	let laser1 = ``,
+		heat = ``,
+		reactor = ``,
+		lens = ``,
+		kin = ``;
 
 	let loc = `has been purchased from a crumbling old world nation. It`;
 	let power = `Large batteries mounted in oversized shoulders power the robot for up to ten minutes of use, though they make for large targets.`;
 	let knife = `simply a 8.5 meter long knife, though additional weapons are under development.`;
-	let armor8 = ``, actuator = ``, cannon1 = ``, heatsink = ``, ammo2 = ``;
+	let armor8 = ``,
+		actuator = ``,
+		cannon1 = ``,
+		heatsink = ``,
+		ammo2 = ``;
 	let missile = ``;
 
 	let a4 = `A cruise missile launch site has been constructed near the base of`;
 	let b2 = `outdated, something quickly rigged together to give the launch site something to fire in the case of an attack`;
-	let c8 = ``, d1 = ``, e1 = ``, f1 = ``, g1 = ``, h1 = ``;
+	let c8 = ``,
+		d1 = ``,
+		e1 = ``,
+		f1 = ``,
+		g1 = ``,
+		h1 = ``;
 
 	let recom1 = `has been recommissioned from the old world for ${V.SF.Lower}. It`;
-	let jets = `Formerly mothballed strike jets`, loc2 = ``, radar = ``, AAG = ``;
-	let prop = ``, torp = ``, armor9 = ``, power1 = ``, scramble1 = ``;
+	let jets = `Formerly mothballed strike jets`,
+		loc2 = ``,
+		radar = ``,
+		AAG = ``;
+	let prop = ``,
+		torp = ``,
+		armor9 = ``,
+		power1 = ``,
+		scramble1 = ``;
 
 	let recom = `has been recommissioned from the old world, and`;
 	let reactor0 = `Because diesel engines provide power and breathing oxygen is kept in pressurized canisters, the sub must frequently surface.`;
-	let reactor1 = ``, cal = ``, hull = ``, tubes = ``, torpedoes = ``, sonar = ``;
-	let control = ``, missiles = ``;
+	let reactor1 = ``,
+		cal = ``,
+		hull = ``,
+		tubes = ``,
+		torpedoes = ``,
+		sonar = ``;
+	let control = ``,
+		missiles = ``;
 
 	let recom2 = `; has been recommissioned for use by ${V.SF.Lower}. It`;
-	let tons = `200`, skirt = ``, guns = ``, guns2 = ``, fans = ``, speed = ``;
-	let turbines = ``, armor10 = ``, ramps = ``, HATframe = ``, loadout = ``;
-
-	switch(input) {
+	let tons = `200`,
+		skirt = ``,
+		guns = ``,
+		guns2 = ``,
+		fans = ``,
+		speed = ``;
+	let turbines = ``,
+		armor10 = ``,
+		ramps = ``,
+		HATframe = ``,
+		loadout = ``;
+
+	switch (input) {
 		case 'firebase':
-			if (S.Firebase >= 0) { const text0 = `<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 >= 0) {
+				const text0 = `<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.`;
+					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 (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.`; }
+					slave += `;`;
+				}
+				if (S.Firebase >= 8) { appear = `has become a fully fledged military base.`;
+					comms = `A Free City-wide communication network for ${V.SF.Lower} has been constructed to facilitate faster responses and efficient monitoring of the surrounding area.`; }
 				if (S.Firebase >= 9) training = `A high-tech killhouse has been constructed to aid in soldier training.`;
 				if (S.Firebase >= 10) artillery = `Railgun artillery batteries are set around the base of the arcology, capable of accurately destroying enemies an absurd distance away.`;
 				return `${text0} The firebase ${appear} ${barracks} ${comms} ${training} ${slave} ${common} ${garage}${drone} ${hangar} ${launch} ${artillery}`;
 			}
 			break;
 		case 'troop':
-			if (S.Troops > 0) { const text1 = `<br>&nbsp;The large dormitories are`;
+			if (S.Troops > 0) {
+				const text1 = `<br>&nbsp;The large dormitories are`;
 				if (S.Troops < 100) {
 					return `${text1} 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) {
@@ -795,7 +1144,10 @@ window.UnitText = function(input) {
 			}
 			break;
 		case 'armory':
-			if (S.Armoury >= 0) { const text2 = `<br><br>''Armory:''<br>`; radio = `Radios have been wired into the soldiers helmets`; helmets = `.`;
+			if (S.Armoury >= 0) {
+				const text2 = `<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.`;
@@ -809,7 +1161,9 @@ window.UnitText = function(input) {
 			}
 			break;
 		case 'drugs':
-			if (S.Drugs >= 0) { const text3 = `<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 >= 0) {
+				const text3 = `<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.`;
@@ -823,10 +1177,15 @@ window.UnitText = function(input) {
 			}
 			break;
 		case 'UAV':
-			if(S.Firebase >= 2 && S.Drones >= 1) { const text4 = `<br><br>''Drone Bay:''`;
-				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.Firebase >= 2 && S.Drones >= 1) {
+				const text4 = `<br><br>''Drone Bay:''`;
+				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.`;
@@ -837,13 +1196,20 @@ window.UnitText = function(input) {
 			}
 			break;
 		case 'AV':
-			if (S.AV >= 1) { const text5 = `<br>&nbsp;&nbsp;''Assault:''`;
-				if (S.AV >= 2) engine1 = `The engine1 has been overhauled, allowing much faster maneuvering around the battlefield.`; activate = ``; mechanics = ``;
+			if (S.AV >= 1) {
+				const text5 = `<br>&nbsp;&nbsp;''Assault:''`;
+				if (S.AV >= 2) engine1 = `The engine1 has been overhauled, allowing much faster maneuvering around the battlefield.`;
+				activate = ``;
+				mechanics = ``;
 				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 >= 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.`;
@@ -851,24 +1217,38 @@ window.UnitText = function(input) {
 			}
 			break;
 		case 'TV':
-			if (S.TV >= 1) { const text6 = `<br>&nbsp;&nbsp;''Transport:''`;
-				if (S.TV >= 2) engine3 = `${e0} overhauled, allowing for higher mobility.`; C = ``; B = ``;
+			if (S.TV >= 1) {
+				const text6 = `<br>&nbsp;&nbsp;''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 >= 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 >= 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 `${text6} 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;
 		case 'PGT':
-			if (S.PGT >= 1) { const text7 = `<br>&nbsp;''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 >= 1) {
+				const text7 = `<br>&nbsp;''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.`;
@@ -879,13 +1259,18 @@ window.UnitText = function(input) {
 			}
 			break;
 		case 'AA':
-			if (S.AA >= 1) { const text8 = `<br>&nbsp;&nbsp;''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 >= 1) {
+				const text8 = `<br>&nbsp;&nbsp;''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 >= 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.`;
@@ -893,21 +1278,28 @@ window.UnitText = function(input) {
 			}
 			break;
 		case 'TA':
-			if (S.TA >= 1) { const text9 = `<br>&nbsp;&nbsp;''Transport:''`;
+			if (S.TA >= 1) {
+				const text9 = `<br>&nbsp;&nbsp;''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 >= 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 >= 10) type = `tiltjet`;
+				engines01 = ``;
+				engines0 = `The tiltrotors have been replaced with tiltjets, allowing for much greater airspeed and acceleration.`;
 				return `${text9} 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;
+			}
+			break;
 		case 'SP':
-			if (S.SpacePlane >= 1) { const text10 = `<br>&nbsp;''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 >= 1) {
+				const text10 = `<br>&nbsp;''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.`;
@@ -915,56 +1307,77 @@ window.UnitText = function(input) {
 				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 >= 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 `${text10} 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':
-			if(S.GunS >= 1) { const text11 = `<br>&nbsp;''Gunship:''`;
-				if (S.GunS >= 2) b4 = `Infrared sensors have been added for the gunners to better pick targets.`; activate2 = ``;
-				if (S.GunS >= 3) c2 = `The underside of the aircraft has been better armored against small-arms fire`; countermeasures = `.`;
+			if (S.GunS >= 1) {
+				const text11 = `<br>&nbsp;''Gunship:''`;
+				if (S.GunS >= 2) b4 = `Infrared sensors have been added for the gunners to better pick targets.`;
+				activate2 = ``;
+				if (S.GunS >= 3) c2 = `The underside of the aircraft has been better armored against small-arms fire`;
+				countermeasures = `.`;
 				if (S.GunS >= 4) fuel = `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) barrels = `25 mm Gatling cannons`; distance = `; allowing the gunship to eliminate infantry`; DFA = ` and light vehicles from above`; autocannon = ` and a 40 mm autocannon are mounted on`;
+				if (S.GunS >= 5) barrels = `25 mm Gatling cannons`;
+				distance = `; allowing the gunship to eliminate infantry`;
+				DFA = ` and light vehicles from above`;
+				autocannon = ` and a 40 mm autocannon are mounted on`;
 				// eslint-disable-next-line camelcase
 				if (S.GunS >= 6) GS_Speed = `The engines have been replaced, allowing both faster travel to a target, and slower travel around a target.`;
 				if (S.GunS >= 7) countermeasures = `; 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) ammunition = `The ammunition storage has been increased, only slightly depriving loaders of a place to sit.`;
-				if (S.GunS >= 10) DFA = `; both light and heavy vehicles, and most enemy cover from above`; autocannon = `; a 40 mm autocannon, and a 105 mm howitzer are mounted on`;
+				if (S.GunS >= 10) DFA = `; both light and heavy vehicles, and most enemy cover from above`;
+				autocannon = `; a 40 mm autocannon, and a 105 mm howitzer are mounted on`;
 				// eslint-disable-next-line camelcase
 				return `${text11} A large gunship ${activate2} is being refueled in the hangar. ${barrels}${autocannon} the port side of the fuselage${distance}${DFA}. ${b4} ${ammunition} ${GS_Speed} ${c2}${countermeasures} ${fuel}`;
 			}
 			break;
 		case 'sat':
-			if (S.Satellite.lv >= 1) { const text12 = `<br>&nbsp;''Satellite:''`;
+			if (S.Satellite.lv >= 1) {
+				const text12 = `<br>&nbsp;''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 (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 >= 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 `${text12} ${loc1} ${gyro} ${thrusters} ${telemetry} ${solar} ${reactor} ${surviv} ${laser1}${heat} ${lens} ${kin}`;
-			} break;
+			}
+			break;
 		case 'GR':
-			if (S.GiantRobot >= 1) { const text13 = `<br>&nbsp;''Giant Robot:''`;
-				if (S.GiantRobot >= 2) loc = ``; armor8 = `Armor plating has been mounted over the majority of the robot.`;
+			if (S.GiantRobot >= 1) {
+				const text13 = `<br>&nbsp;''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 >= 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 >= 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 `${text13} 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;
+			}
+			break;
 		case 'ms':
-			if (S.MissileSilo >= 1) { const text14 = `<br>&nbsp;''Cruise Missile:''`;
-				if (S.MissileSilo >= 2) b2 = `a modern missile`; c8 = `; tipped with a conventional warhead`;
+			if (S.MissileSilo >= 1) {
+				const text14 = `<br>&nbsp;''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.`;
@@ -977,9 +1390,12 @@ window.UnitText = function(input) {
 			}
 			break;
 		case 'AC':
-			if (S.AircraftCarrier >= 1) { const text15 = `<br>&nbsp;''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 >= 1) {
+				const text15 = `<br>&nbsp;''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.`;
@@ -992,12 +1408,16 @@ window.UnitText = function(input) {
 			}
 			break;
 		case 'Sub':
-			if (S.Sub >= 1) { const text16 = `<br>&nbsp;''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 >= 1) {
+				const text16 = `<br>&nbsp;''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 >= 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.`;
@@ -1006,12 +1426,19 @@ window.UnitText = function(input) {
 			}
 			break;
 		case 'HAT':
-			if (S.HAT >= 1) { const text17 = `<br>&nbsp;''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 >= 1) {
+				const text17 = `<br>&nbsp;''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 >= 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.`;
@@ -1022,14 +1449,14 @@ window.UnitText = function(input) {
 		default:
 			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()>>][]]`;
-			}
-			} else if (passage() === "SF_Report") {
-				<<include "SF_.SupportFacilityReport">>
-			}
-		}*/
+	/* 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()>>][]]`;
+		}
+		} else if (passage() === "SF_Report") {
+			<<include "SF_.SupportFacilityReport">>
+		}
+	}*/
 };
 
 /* window.FSIntegrationMenu = function() {
diff --git a/src/endWeek/saChoosesOwnClothes.js b/src/endWeek/saChoosesOwnClothes.js
index de9badc60f8..88df29d4703 100644
--- a/src/endWeek/saChoosesOwnClothes.js
+++ b/src/endWeek/saChoosesOwnClothes.js
@@ -1051,7 +1051,7 @@ window.saChoosesOwnClothes = (function() {
 				belly.push({text: "", bellyAccessory: slave.bellyAccessory}); /* compatibility for no output, will likely get deprecated in the future as content is added*/
 			}
 		} else if (slave.devotion <= 20) {
-			if (slave.belly > 10000 && (slave.pregAdaptation*800 <= slave.belly) && slave.bellyAccessory !== "a support band") {
+			if (slave.belly > 10000 && (slave.pregAdaptation * 800 <= slave.belly) && slave.bellyAccessory !== "a support band") {
 				belly.push({text: `slips a pregnancy support band around ${his} middle to help alleviate some of the discomfort,`, bellyAccessory: "a support band"});
 			} else if (slave.belly < 8000 && slave.bellyAccessory === "a support band") {
 				belly.push({text: `removes ${his} support band since ${he} no longer needs it,`, bellyAccessory: "none"});
@@ -1073,7 +1073,7 @@ window.saChoosesOwnClothes = (function() {
 				} else if (slave.fetishStrength > 95) {
 					belly.push({text: `straps on the largest belly ${he} can find to satisfy ${his} pregnancy fetish,`, bellyAccessory: "a huge empathy belly"});
 				}
-			} else if (slave.belly > 10000 && (slave.pregAdaptation*1200 <= slave.belly) && slave.bellyAccessory !== "a support band") {
+			} else if (slave.belly > 10000 && (slave.pregAdaptation * 1200 <= slave.belly) && slave.bellyAccessory !== "a support band") {
 				belly.push({text: `slips a pregnancy support band around ${his} middle to better handle ${his} fecund mound,`, bellyAccessory: "a support band"});
 			} else if (empathyBellies.includes(slave.bellyAccessory) && slave.fetish !== "pregnancy") {
 				belly.push({text: `removes ${his} fake belly, since ${he} dislikes it,`, bellyAccessory: "none"});
diff --git a/src/endWeek/saServeThePublic.js b/src/endWeek/saServeThePublic.js
index c7c0ba7403f..7f9ef193207 100644
--- a/src/endWeek/saServeThePublic.js
+++ b/src/endWeek/saServeThePublic.js
@@ -1228,7 +1228,7 @@ window.saServeThePublic = (function saServeThePublic() {
 	 */
 	function addRep(slave) {
 		if (slave.assignment !== "recruit girls") {
-			if (slave.assignment === "serve in the club" || slave.assignment ===  "be the DJ") {
+			if (slave.assignment === "serve in the club" || slave.assignment === "be the DJ") {
 				repX(Math.trunc((slave.sexAmount * slave.sexQuality) * (1 + (0.003 * slave.skill.entertainment)) * 0.15), "publicServantClub", slave);
 			} else if (slave.assignment === "serve the public") {
 				repX(Math.trunc((slave.sexAmount * slave.sexQuality) * (1 + (0.003 * slave.skill.entertainment)) * 0.15), "publicServant", slave);
-- 
GitLab