From e5e8c135dbe9fed75d00665c859c2efcd28e9060 Mon Sep 17 00:00:00 2001
From: Blank <okp57855@psoxs.com>
Date: Mon, 1 Oct 2018 19:37:29 -0700
Subject: [PATCH] SF fix/tweaks and costReport display fixes

---
 devNotes/twine JS.txt            | 3 +--
 src/SpecialForce/Proposal.tw     | 2 +-
 src/js/economyJS.tw              | 2 +-
 src/uncategorized/costsReport.tw | 6 +++---
 4 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt
index 33dfa89222b..fbf924a10ba 100644
--- a/devNotes/twine JS.txt	
+++ b/devNotes/twine JS.txt	
@@ -2198,9 +2198,8 @@ window.getCost = function(array) {
 	}
 
 if(State.variables.SF.Toggle && State.variables.SF.Active >= 1 && State.variables.SF.Subsidy) {
-	costs += Math.ceil((10000*(State.variables.SFUnit.Troops/10))*1+(State.variables.arcologies[0].prosperity/100)*1+(State.variables.SF.Units/100));
+		costs += Math.ceil( (10000*(State.variables.SFUnit.Troops/10))+(1+(State.variables.arcologies[0].prosperity/100))+(1+(State.variables.SF.Units/100)) );
 }
-
 	// clean up
 	if(costs < 0) {
 		costs = 0;
diff --git a/src/SpecialForce/Proposal.tw b/src/SpecialForce/Proposal.tw
index e583110b1a3..359ef922942 100644
--- a/src/SpecialForce/Proposal.tw
+++ b/src/SpecialForce/Proposal.tw
@@ -23,7 +23,7 @@
 		ROE:"hold", Target:"recruit", Regs:"strict", Caps:"The Special Force",
 		Lower:"the special force", Subsidy:1})>> <<set $cash -= _price>>
 	<<set $SFUnit = Object.assign({}, $SFUnit, {Troops:40, Armoury:0, Firebase:0, AV:0, TV:0, Drones:0,
-		Drugs:0, PGT:0, AA:0, AT:0, SpacePlane:0, GunS:0, Satellite:0, GiantRobot:0, MissileSilo:0,
+		Drugs:0, PGT:0, AA:0, TA:0, SpacePlane:0, GunS:0, Satellite:0, GiantRobot:0, MissileSilo:0,
 		AircraftCarrier:0, Sub:0, HAT:0})>> <<set $arcologies[0].SFRaid = 1,$arcologies[0].SFRaidTarget = -1>>
 		<<set $SFColonel = Object.assign({}, $SFColonel, {Core:"", Talk:0, Fun:0, Status:0})>>
 		<<set $SFTradeShow = Object.assign({}, $SFTradeShow, {History:0, CanAttend:0,
diff --git a/src/js/economyJS.tw b/src/js/economyJS.tw
index 05f32a6caef..c5db2859d0f 100644
--- a/src/js/economyJS.tw
+++ b/src/js/economyJS.tw
@@ -326,7 +326,7 @@ window.getCost = function(array) {
 	}
 
 	if(State.variables.SF.Toggle && State.variables.SF.Active >= 1 && State.variables.SF.Subsidy) {
-		costs += Math.ceil((10000*(State.variables.SFUnit.Troops/10))*1+(State.variables.arcologies[0].prosperity/100)*1+(State.variables.SF.Units/100));
+		costs += Math.ceil( (10000*(State.variables.SFUnit.Troops/10))+(1+(State.variables.arcologies[0].prosperity/100))+(1+(State.variables.SF.Units/100)) );
 	}
 	// clean up
 	if(costs < 0) {
diff --git a/src/uncategorized/costsReport.tw b/src/uncategorized/costsReport.tw
index 38a57dfda34..c3ace6928c1 100644
--- a/src/uncategorized/costsReport.tw
+++ b/src/uncategorized/costsReport.tw
@@ -32,7 +32,7 @@ your __personal living expenses__ are <<print cashFormat(($girls*(250+($economy*
 
 <<if $breederOrphanageTotal > 0>><<set _breederTuition = 50>><<else>><<set _breederTuition = 0>><</if>>
 <<if $citizenOrphanageTotal+$privateOrphanageTotal+$breederOrphanageTotal > 0>>
-	__Orphanage__ fee: @@.yellowgreen;<<print cashFormat($citizenOrphanageTotal*100+$privateOrphanageTotal*500+_breederTuition)>>@@
+	<br> __Orphanage__ fee: @@.yellowgreen;<<print cashFormat($citizenOrphanageTotal*100+$privateOrphanageTotal*500+_breederTuition)>>@@
 	<<if $citizenOrphanageTotal > 0>>
 		<br>&nbsp;Citizen: @@.yellowgreen;<<print cashFormat(100)>>@@ per child. Currently <<print commaNum($citizenOrphanageTotal)>> are being taught, bringing the total to @@.yellowgreen;<<print cashFormat($citizenOrphanageTotal*100)>>@@.
 	<</if>>
@@ -45,11 +45,11 @@ your __personal living expenses__ are <<print cashFormat(($girls*(250+($economy*
 <</if>>
 
 <<if $peacekeepers != 0 && $peacekeepers.undermining != 0>>
-	<<print cashFormat($peacekeepers.undermining)>> to undermine political support for the nearby old world peacekeeping mission.
+	<br> <<print cashFormat($peacekeepers.undermining)>> to undermine political support for the nearby old world peacekeeping mission.
 <</if>>
 
 <<if $SF.Toggle && $SF.Active >= 1 && $SF.Subsidy>>
-	<br>__Finacinally supporting $SF.Caps unitll self sufficiency:__ <<print cashFormat(Math.ceil((10000*($SFUnit.Troops/10))*1+($arcologies[0].prosperity/100)*1+($SF.Units/100)))>>
+	<br>__Finacinally supporting $SF.Caps unitll self sufficiency:__ <<print cashFormat(Math.ceil( (10000*($SFUnit.Troops/10))+(1+($arcologies[0].prosperity/100))+(1+($SF.Units/100)) ))>>
 <</if>>
 <<if $mercenaries > 0>>
 	<<set _mercCosts = $mercenaries*2000>>
-- 
GitLab