From 25a13516347fcfa7c8751803bccba7a50d13deed Mon Sep 17 00:00:00 2001
From: klorpa <30924131+klorpa@users.noreply.github.com>
Date: Sun, 17 Mar 2019 16:35:13 -0500
Subject: [PATCH] PreMerge

---
 src/SecExp/secBarracks.tw        | 42 ++++++++++++++++----------------
 src/SpecialForce/Firebase.tw     |  8 +++---
 src/SpecialForce/SpecialForce.js | 18 +++++++-------
 3 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/src/SecExp/secBarracks.tw b/src/SecExp/secBarracks.tw
index e6d51d05669..f8005bc7a09 100644
--- a/src/SecExp/secBarracks.tw
+++ b/src/SecExp/secBarracks.tw
@@ -149,7 +149,7 @@ Your current maximum number of units is <<print $maxUnits>> (<<print commaNum($s
 		<<set $targetUnit = "secBots">>
 	<</link>>
 	<<if $secBots.troops < $secBots.maxTroops>>
-	|
+		|
 		<<link "Replenish the unit" "secBarracks">>
 			<<run cashX(forceNeg(($secBots.maxTroops - $secBots.troops) * $secBotsCost), "securityExpansion")>>
 			<<set $secBots.troops = $secBots.maxTroops>>
@@ -170,21 +170,21 @@ You are free to organize your menial slaves into fighting units. Currently you h
 <<set _menialPrice = menialSlaveCost()>>
 <<set _bulkMax = $PopCap-$menials-$fuckdolls-$menialBioreactors>>
 <<if $cash > _menialPrice>>
-<<if _bulkMax > 0>>
-	<br>
-	[[Buy|secBarracks][$menials+=1,$menialSupplyFactor-=1,cashX(forceNeg(_menialPrice), "menialTransfer")]]
-	<<if $cash > (menialSlaveCost(10))*10>>
-		[[(x10)|secBarracks][$menials+=10,$menialSupplyFactor-=10,cashX(forceNeg((menialSlaveCost(10))*10), "menialTransfer")]]
-	<</if>>
-	<<if $cash > (menialSlaveCost(100))*100>>
-		[[(x100)|secBarracks][$menials+=100,$menialSupplyFactor-=100,cashX(forceNeg((menialSlaveCost(100))*100), "menialTransfer")]]
-	<</if>>
-	<<if $cash > (_menialPrice+1)*2>>
-		<<set _menialBulkPremium = Math.trunc(1 + Math.clamp($cash/_menialPrice,0,_bulkMax)/400)>>
-		[[(max)|secBarracks][$menials+=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),$menialSupplyFactor-=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),cashX(forceNeg(Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)*(_menialPrice+_menialBulkPremium))), "menialTransfer")]]
+	<<if _bulkMax > 0>>
+		<br>
+		[[Buy|secBarracks][$menials+=1,$menialSupplyFactor-=1,cashX(forceNeg(_menialPrice), "menialTransfer")]]
+		<<if $cash > (menialSlaveCost(10))*10>>
+			[[(x10)|secBarracks][$menials+=10,$menialSupplyFactor-=10,cashX(forceNeg((menialSlaveCost(10))*10), "menialTransfer")]]
+		<</if>>
+		<<if $cash > (menialSlaveCost(100))*100>>
+			[[(x100)|secBarracks][$menials+=100,$menialSupplyFactor-=100,cashX(forceNeg((menialSlaveCost(100))*100), "menialTransfer")]]
+		<</if>>
+		<<if $cash > (_menialPrice+1)*2>>
+			<<set _menialBulkPremium = Math.trunc(1 + Math.clamp($cash/_menialPrice,0,_bulkMax)/400)>>
+			[[(max)|secBarracks][$menials+=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),$menialSupplyFactor-=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),cashX(forceNeg(Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)*(_menialPrice+_menialBulkPremium))), "menialTransfer")]]
+		<</if>>
+		//Bulk transactions may require offering a premium.//
 	<</if>>
-	//Bulk transactions may require offering a premium.//
-<</if>>
 <</if>>
 <br>
 <<set _sL = $slaveUnits.length>>
@@ -233,7 +233,7 @@ You are free to organize your menial slaves into fighting units. Currently you h
 		<</link>>
 
 		<<if $slaveUnits[_i].troops < $slaveUnits[_i].maxTroops && $menials > 0>>
-		|
+			|
 			<<link "Replenish unit" "secBarracks">>
 				<<if $menials >= $slaveUnits[_i].maxTroops - $slaveUnits[_i].troops>>
 					<<set $menials -= $slaveUnits[_i].maxTroops - $slaveUnits[_i].troops>>
@@ -269,7 +269,7 @@ You are free to organize your menial slaves into fighting units. Currently you h
 		<</link>>
 
 		<<if $menials > 0>>
-		|
+			|
 			<<link "Reform the unit" "secBarracks">>
 				<<if $menials >= $slaveUnits[_i].maxTroops>>
 					<<set $slavesEmployedManpower += $slaveUnits[_i].maxTroops>>
@@ -352,7 +352,7 @@ __Militia__
 			<</link>>
 
 			<<if $militiaUnits[_i].troops < $militiaUnits[_i].maxTroops && $militiaFreeManpower > 0>>
-			|
+				|
 				<<link "Replenish unit" "secBarracks">>
 					<<if $militiaFreeManpower >= $militiaUnits[_i].maxTroops - $militiaUnits[_i].troops>>
 						<<set $militiaFreeManpower -= $militiaUnits[_i].maxTroops - $militiaUnits[_i].troops>>
@@ -389,7 +389,7 @@ __Militia__
 			<</link>>
 
 			<<if $militiaFreeManpower > 0>>
-			|
+				|
 				<<link "Reform the unit" "secBarracks">>
 					<<if $militiaFreeManpower >= $militiaUnits[_i].maxTroops>>
 						<<set $militiaEmployedManpower += $militiaUnits[_i].maxTroops>>
@@ -469,7 +469,7 @@ __Mercenaries__
 			<</link>>
 
 			<<if $mercUnits[_i].troops < $mercUnits[_i].maxTroops && $mercFreeManpower > 0>>
-			|
+				|
 				<<link "Replenish unit" "secBarracks">>
 					<<if $mercFreeManpower >= $mercUnits[_i].maxTroops - $mercUnits[_i].troops>>
 						<<set $mercFreeManpower -= $mercUnits[_i].maxTroops - $mercUnits[_i].troops>>
@@ -505,7 +505,7 @@ __Mercenaries__
 			<</link>>
 
 			<<if $mercFreeManpower > 0>>
-			|
+				|
 				<<link "Reform the unit" "secBarracks">>
 					<<if $mercFreeManpower >= $mercUnits[_i].maxTroops>>
 						<<set $mercEmployedManpower += $mercUnits[_i].maxTroops>>
diff --git a/src/SpecialForce/Firebase.tw b/src/SpecialForce/Firebase.tw
index eb04c6b2308..586932152b4 100644
--- a/src/SpecialForce/Firebase.tw
+++ b/src/SpecialForce/Firebase.tw
@@ -30,7 +30,7 @@
 	<<print Interactions()>>
 	<<include "WC">>
 
-	<<if $SF.MercCon.CanAttend === -2 && ($SF.Colonel.Fun + $SF.Colonel.Talk < 1)>> 
+	<<if $SF.MercCon.CanAttend === -2 && ($SF.Colonel.Fun + $SF.Colonel.Talk < 1)>>
 		<br><br>Her expression changes as something jogs her memory. "Before we begin <<if $SF.Colonel.Core == "brazen">><<= properTitle()>><<else>>boss<</if>>, back when I was a merc me and a couple of my old friends would have a meetup every several months. Drinking, fucking, drugs... a little poker. It eventually grew into a whole thing, and now we bring our latest and greatest toys to show off, maybe make some money off selling the schematics. I'd like to continue going, for old times' sake."
 		<br>[[Grant leave|Firebase][$SF.MercCon.CanAttend = 1]]
 		<br>[[Request she remain on base|Firebase][$SF.MercCon.CanAttend = -3]]<br>
@@ -72,7 +72,7 @@
 	<br>[[Tour the firebase|Firebase][$Tour = 1]]
 <<else>> <br> <<set $nextButton = "Return to Operations", $nextLink = "Firebase", $Tour=0>>
 	You continue towards the common area, the soldiers you pass, nod respectfully, salute, or bow slightly, as they please. You pass the briefing areas, the officers and sergeants of the force are conferring over planning tables and display screens regarding their upcoming deployments.
-	<br><br><div style="margin-left:2em">The commanders are 
+	<br><br><div style="margin-left:2em">The commanders are
 	<<if $SF.Target === "recruit">>
 		viewing lists of potential recruits for $SF.Lower. Mainly mercenaries and Old World soldiers who might be receptive to an offer of employment and residence within the arcology, in addition to some citizens of the arcology who wish to have some excitement in their lives.
 	<<elseif $SF.Target === "secure">>
@@ -99,7 +99,7 @@
 
 	<br>You arrive at the firebase's common area, a nest of bars, pleasure dens, public spaces, and other facilities catering to the soldiers' needs and giving them somewhere to spend their free time, since they do not mingle with your citizens on the higher levels or exit the arcology except on deployment. It is well-occupied by the soldiers not currently tasked with duties, and they respectfully move out of your way as you approach, clearing a path for you to move forward.
 	<br><br><div style="margin-left:2em">
-	The amenities are staffed by menial slaves, captured by the soldiers on their excursions. They are 
+	The amenities are staffed by menial slaves, captured by the soldiers on their excursions. They are
 	<<if $SF.Depravity <= 0.3 && $SF.Colonel.Core === "kind">>
 		wearing plain jumpsuits and slim identification collars to set them apart from the soldiers, and look resigned but not fearful. The soldiers themselves socialize at the bars, in small groups around tables, and in the gambling parlors. Many of them can be seen entering or leaving the dens occupied by the sexual slaves they have acquired. Laughter from the carousing soldiers can be heard at all times. Small groups of slaves move freely between the plaza and their basic accommodations attached to the firebase.
 	<<elseif $SF.Depravity <= 0.6 && $SF.Colonel.Core === "kind">>
@@ -123,7 +123,7 @@
 
 	<br>In the middle of the common area is a pile of supply crates with a pavilion on top — The Colonel's personal throne and open quarters, the result of her preferring to live an extreme lifestyle amongst her soldiers rather than in her empty quarters on the upper levels. It's draped with the 'flag' of $SF.Lower, one of her inventions. Sprawled all around it is an immense quantity of; alcohol, hard drugs, clothes, electronic devices, huge amounts of cash, jewels and precious metals looted from the outside world.
 	<br><br><div style="margin-left:2em">
-	As you approach, The Colonel 
+	As you approach, The Colonel
 	<<if random(0,100) <= 50>>
 		raises a hand in greeting and nods. She is sprawled on a couch, wearing only her combat suit tank top and fingerless gloves. She's holding a near-empty bottle of strong liquor in her hand and you can see a naked slave girl kneeling on the floor between her legs. The Colonel has her legs wrapped tightly around the girl's head, forcing the girl to service her if she wants to breathe. The Colonel is close to her climax then suddenly tenses her lower body thus gripping the girl even tighter and throws her head back in ecstasy as she orgasms. She lets out a long breath finally releasing the girl, giving her a hard smack and shouting at her to fuck off.<br><br> The Colonel finishes off her bottle, tossing it over her shoulder then leaning back on the couch and spreading her legs wide. You look down briefly, falling into your habits of inspection. Her pussy is completely devoid of hair with heavy labia in with a very large and hard clit peaking out. Beads of moisture, the result of her excitation, are visible, and you can tell from long experience that she would be tight as a vise. You return your gaze to her face to find her smirking at you. "Like what you see, <<= SFCR()>>?" She waves her hand at the plaza around her, "So do they. But you're not here for pussy. You're here to talk business. So, what's up?"
 	<<elseif random(0,100) > 50>>
diff --git a/src/SpecialForce/SpecialForce.js b/src/SpecialForce/SpecialForce.js
index ca01cfc9f89..c4644fe8d4e 100644
--- a/src/SpecialForce/SpecialForce.js
+++ b/src/SpecialForce/SpecialForce.js
@@ -339,7 +339,7 @@ window.SFReport = function() {
 	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>&nbsp;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>.&nbsp;&nbsp;`;
+		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: `;
 		r += `<span id="roe"> <<if $SF.ROE === "hold">>''Hold Fire''<<elseif $SF.ROE === "limited">>''Limited Fire''<<else>>''Free Fire''<</if>></span>.&nbsp;&nbsp;`;
@@ -533,9 +533,9 @@ window.UnitText = function(input) {
 			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 >= 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) 
+				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`;
@@ -554,7 +554,7 @@ window.UnitText = function(input) {
 			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': 
+		case 'armoury':
 			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.`;
@@ -568,7 +568,7 @@ window.UnitText = function(input) {
 				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}`;
 			} break;
-		case 'drugs': 
+		case 'drugs':
 			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.`;
@@ -595,7 +595,7 @@ window.UnitText = function(input) {
 			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': 
+		case 'AV':
 			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>&nbsp;&nbsp;''Assault:''`;
 				if (S.AV >= 2) engine1=`The engine1 has been overhauled, allowing much faster maneuvering around the battlefield.`; b=``; c=``;
@@ -609,7 +609,7 @@ window.UnitText = function(input) {
 				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': 
+		case 'TV':
 			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>&nbsp;&nbsp;''Transport:''`;
 				if (S.TV >= 2) engine3=`${e0} overhauled, allowing for higher mobility.`; C=``; B=``;
@@ -679,7 +679,7 @@ window.UnitText = function(input) {
 				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': 
+		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>&nbsp;''Gunship:''`;
 				if (S.GunS >= 2) b4=`Infrared sensors have been added for the gunners to better pick targets.`; a=``;
@@ -925,7 +925,7 @@ window.UnitText = function(input) {
 						MEMU_OPTION('title','OptPOS',cost), text += ` `;
 					} else if (![FSPOS].includes(V.SF.FS.ColonelGift)) {
 						text += `\n&nbsp;&nbsp;`, MEMU_OPTION('Buy the Colonel a ','ColonelGift',1000000), text += ` `;
-				 }
+					}
 				}
 			}
 		}
-- 
GitLab