From 1ef507a840fba0335f52936020f2cdf139b62d14 Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Sun, 10 Mar 2019 21:49:40 -0400
Subject: [PATCH] Dropping FS clears associated edicts (with exception)

---
 src/SecExp/edicts.tw |  5 +++--
 src/js/storyJS.js    | 17 +++++++++++++++++
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/src/SecExp/edicts.tw b/src/SecExp/edicts.tw
index c37234256cb..b4bd0614891 100644
--- a/src/SecExp/edicts.tw
+++ b/src/SecExp/edicts.tw
@@ -28,6 +28,7 @@
 	<br>''Legal aid for new businesses:'' New businesses can rely on your help for legal expenses and issues.
 	[[Repeal|edicts][$tradeLegalAid = 0, $edictsUpkeep -= 1000]]
 <</if>>
+
 <<if $taxTrade == 1>>
 	<br>''Trade tariffs:'' all goods transitioning in your arcology have to pay a transition fee.
 	[[Repeal|edicts][$taxTrade = 0]]
@@ -93,7 +94,7 @@
 <</if>>
 
 <<if $hasFoughtOnce == 1>>
-<br><br>__Defense Force:__
+	<br><br>__Defense Force:__
 	<<if $soldierWages == 0>>
 		<br>''Low wages for soldiers:'' wages for soldiers are set to a low level compared to market standards.
 		[[Repeal|edicts][$soldierWages = 1]]
@@ -423,7 +424,7 @@
 <</if>>
 
 <<if $hasFoughtOnce == 1 || $mercenaries > 0>>
-<br><br>__Defense Force__:
+	<br><br>__Defense Force__:
 
 	<<if $soldierWages == 0>>
 		<br>''Average wages for soldiers:'' will set the wages paid to the soldiers of the arcology to an average amount.
diff --git a/src/js/storyJS.js b/src/js/storyJS.js
index 4c472fac53b..1d9a97fd8aa 100644
--- a/src/js/storyJS.js
+++ b/src/js/storyJS.js
@@ -818,6 +818,16 @@ window.removeFS = function(FS) {
 		FSLaw += "ME";
 	}
 	switch (FS) {
+		case "FSPaternalist":
+			arcology[FSLaw] = 0;
+			arcology[FSSMR] = 0;
+			V.slaveWatch = 0;
+			break;
+		case "FSDegradationist":
+			arcology[FSLaw] = 0;
+			arcology[FSSMR] = 0;
+			V.liveTargets = 0;
+			break;
 		case "FSGenderRadicalist":
 			arcology.FSGenderRadicalistLawBeauty = 0;
 			arcology.FSGenderRadicalistLawFuta = 0;
@@ -835,6 +845,7 @@ window.removeFS = function(FS) {
 			arcology.FSPhysicalIdealistLaw = 0;
 			arcology.FSPhysicalIdealistSMR = 0;
 			arcology.FSPhysicalIdealistStrongFat = 0;
+			V.martialSchool = 0;
 			break;
 		case "FSHedonisticDecadence":
 			arcology.FSHedonisticDecadenceLaw = 0;
@@ -846,12 +857,18 @@ window.removeFS = function(FS) {
 			arcology.FSChattelReligionistLaw = 0;
 			arcology.FSChattelReligionistSMR = 0;
 			arcology.FSChattelReligionistCreed = 0;
+			V.subsidyChurch = 0;
 			break;
 		case "FSRepopulationFocus":
 			arcology[FSLaw] = 0;
 			arcology[FSSMR] = 0;
 			V.universalRulesChildrenBecomeBreeders = 0;
 			break;
+		case "FSRestart":
+			arcology[FSLaw] = 0;
+			arcology[FSSMR] = 0;
+			V.eliteOfficers = 0;
+			break;
 		case "FSNull":
 			break;
 		default: /* all others have one law and one SMR */
-- 
GitLab