From 5294eb731c80e33511cff18f6678c17c90da4bed Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Mon, 28 Oct 2019 19:27:48 -0400
Subject: [PATCH] Negative education work

---
 Changelog.txt                          | 10 ++++
 src/js/descriptionWidgets.js           | 75 ++++++++++++++++++++++----
 src/uncategorized/saLongTermEffects.tw | 23 ++++++--
 3 files changed, 93 insertions(+), 15 deletions(-)

diff --git a/Changelog.txt b/Changelog.txt
index 844f7585640..9be880512b0 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -2,6 +2,16 @@ Pregmod
 
 0.10.7.1-2.9.x
 
+	10/28/2019
+	
+	1
+	-beta 3.0.0 work (schoolroom remodel)
+	-added ability to reject delivered custom slaves without closing the order
+	-dairy job requirements adjusted
+	-RA label tweaks and fixes
+	-fixes
+	-saTakeClasses JSification
+
 	10/15/2019
 	
 	0
diff --git a/src/js/descriptionWidgets.js b/src/js/descriptionWidgets.js
index 8b7ef37e63f..394625a92b1 100644
--- a/src/js/descriptionWidgets.js
+++ b/src/js/descriptionWidgets.js
@@ -37,12 +37,16 @@ App.Desc.eyes = function(slave) {
 			r += `but ${his} facial expressions reveal ${he} is incisive, quick, cunning; `;
 			if (slave.intelligence + slave.intelligenceImplant >= 130) {
 				r += `with ${his} education, ${he} is so far <span class="deepskyblue">beyond brilliant</span> that ${he} is nearly peerless. `;
+			} else if (slave.intelligence + slave.intelligenceImplant <= 95) {
+				r += `with ${his} miseducation, however, ${he} is merely <span class="orangered">highly intelligent.</span> `;
 			} else if (slave.intelligenceImplant >= 15) {
 				r += `${he} is both <span class="deepskyblue">brilliant</span> and `;
 				if (slave.intelligenceImplant >= 30) {
 					r += `well `;
 				}
 				r += `educated. `;
+			} else if (slave.intelligenceImplant <= -15) {
+				// placeholder as this is a technical impossibility for now
 			} else {
 				r += `${he} is so <span class="deepskyblue">brilliant</span> that ${his} `;
 				if (slave.intelligenceImplant > 0) {
@@ -54,7 +58,9 @@ App.Desc.eyes = function(slave) {
 			}
 		} else if (slave.intelligence > 50) {
 			if (slave.intelligence + slave.intelligenceImplant > 95) {
-				r += `but ${his} facial expressions reveal ${he} is incisive, quick, cunning; with ${his} education, ${he} can be considered <span class="deepskyblue">brilliant.</span>`;
+				r += `but ${his} facial expressions reveal ${he} is incisive, quick, cunning; with ${his} education, ${he} can be considered <span class="deepskyblue">brilliant.</span> `;
+			} else if (slave.intelligence + slave.intelligenceImplant <= 50) {
+				r += `but ${his} face is alive with intelligence; with ${his} miseducation, however, ${he} performs merely <span class="orangered">above average.</span> `;
 			} else if (slave.intelligenceImplant >= 15) {
 				r += `but ${his} face is alive with intelligence; ${he} is both <span class="deepskyblue">highly intelligent</span> and `;
 				if (slave.intelligenceImplant >= 30) {
@@ -65,6 +71,8 @@ App.Desc.eyes = function(slave) {
 				r += `but ${his} face is alive with intelligence; ${he} is so <span class="deepskyblue">highly intelligent</span> that ${his} `;
 				if (slave.intelligenceImplant > 0) {
 					r += `meager`;
+				} else if (slave.intelligenceImplant <= -15) {
+					r += `miseducation`;
 				} else {
 					r += `lack of`;
 				}
@@ -72,43 +80,57 @@ App.Desc.eyes = function(slave) {
 			}
 		} else if (slave.intelligence > 15) {
 			if (slave.intelligence + slave.intelligenceImplant > 50) {
-				r += `but ${his} face is alive with intelligence; with ${his} education, ${he} can be considered <span class="deepskyblue">highly intelligent.</span>`;
+				r += `but ${his} face is alive with intelligence; with ${his} education, ${he} can be considered <span class="deepskyblue">highly intelligent.</span> `;
+			} else if (slave.intelligence + slave.intelligenceImplant <= 15) {
+				r += `but ${his} facial expressions reveal ${his} cleverness; with ${his} miseducation, however, ${he} performs merely <span class="orangered">averagely.</span> `;
 			} else if (slave.intelligenceImplant >= 15) {
 				r += `but ${his} facial expressions reveal ${his} cleverness; ${he} is of <span class="deepskyblue">above average intelligence</span> and`;
 				if (slave.intelligenceImplant >= 30) {
 					r += `well `;
 				}
 				r += `educated. `;
+			} else if (slave.intelligenceImplant <= -15) {
+				r += `but ${his} facial expressions reveal ${his} cleverness; ${he} is of <span class="deepskyblue">above average intelligence</span> despite ${his} miseducation. `;
 			} else {
 				r += `but ${his} facial expressions reveal ${his} cleverness; ${he} is of <span class="deepskyblue">above average intelligence</span> despite being undereducated. `;
 			}
 		} else if (slave.intelligence >= -15) {
 			if (slave.intelligence + slave.intelligenceImplant > 15) {
-				r += `but ${his} facial expressions reveal ${his} cleverness; with ${his} education, ${he} can be considered of <span class="deepskyblue">above average intelligence.</span>`;
+				r += `but ${his} facial expressions reveal ${his} cleverness; with ${his} education, ${he} can be considered of <span class="deepskyblue">above average intelligence.</span> `;
+			} else if (slave.intelligence + slave.intelligenceImplant < -15) {
+				r += `but ${his} facial expressions reveal ${his} alertness; with ${his} miseducation, however, ${he} exibits <span class="orangered">below average intelligence.</span> `;
 			} else if (slave.intelligenceImplant >= 15) {
 				r += `but ${his} facial expressions reveal ${his} alertness; ${he} is of average intelligence due to being `;
 				if (slave.intelligenceImplant >= 30) {
 					r += `well `;
 				}
 				r += `educated. `;
+			} else if (slave.intelligenceImplant <= -15) {
+				r += `but ${his} facial expressions reveal ${his} alertness; ${he} is of average intelligence even with ${his} miseducation. `;
 			} else {
 				r += `but ${his} facial expressions reveal ${his} alertness; ${he} is of average intelligence and is undereducated. `;
 			}
 		} else if (slave.intelligence >= -50) {
 			if (slave.intelligence + slave.intelligenceImplant >= -15) {
 				r += `but ${his} facial expressions reveal ${his} alertness; with ${his} education, ${he} can be considered of average intelligence. `;
+			} else if (slave.intelligence + slave.intelligenceImplant < -50) {
+				r += `but ${his} facial expressions reveal ${he} is rather dim; with ${his} miseducation, however, ${he} may as well be <span class="orangered">an idiot.</span> `;
 			} else if (slave.intelligenceImplant >= 15) {
 				r += `but ${his} facial expressions reveal ${he} is rather dim; ${he} is of <span class="orangered">below average intelligence</span> despite having been `;
 				if (slave.intelligenceImplant >= 30) {
 					r += `thoroughly `;
 				}
 				r += `educated. `;
+			} else if (slave.intelligenceImplant <= -15) {
+				r += `but ${his} facial expressions reveal ${he} is rather dim; ${he} is <span class="orangered">below average intelligence</span> before taking ${his} miseducation into account. `;
 			} else {
 				r += `but ${his} facial expressions reveal ${he} is rather dim; ${he} is of <span class="orangered">below average intelligence</span> and is poorly educated. `;
 			}
 		} else if (slave.intelligence >= -95) {
 			if (slave.intelligence + slave.intelligenceImplant >= -50) {
-				r += `but ${his} facial expressions reveal ${he} is rather dim; even with ${his} education, ${he} can only be considered of <span class="orangered">below average intelligence.</span>`;
+				r += `but ${his} facial expressions reveal ${he} is rather dim; even with ${his} education, ${he} can only be considered of <span class="orangered">below average intelligence.</span> `;
+			} else if (slave.intelligence + slave.intelligenceImplant < -95) {
+				r += `but ${his} facial expressions reveal ${he} is as dull as ${his} eyes; with ${his} miseducation, however, ${he} may as well be <span class="orangered">a complete moron.</span> `;
 			} else if (slave.intelligenceImplant >= 15) {
 				r += `but ${his} facial expressions reveal ${he} is as dull as ${his} eyes; ${he} is <span class="orangered">quite stupid</span> despite having `;
 				if (slave.intelligenceImplant >= 30) {
@@ -117,6 +139,8 @@ App.Desc.eyes = function(slave) {
 					r += `some`;
 				}
 				r += ` education. `;
+			} else if (slave.intelligenceImplant <= -15) {
+				r += `but ${his} facial expressions reveal ${he} is as dull as ${his} eyes; ${he} is <span class="orangered">so stupid</span> ${his} miseducation had little effect. `;
 			} else {
 				r += `but ${his} facial expressions reveal ${he} is as dull as ${his} eyes; ${he} is <span class="orangered">quite stupid</span> and ignorant. `;
 			}
@@ -124,8 +148,12 @@ App.Desc.eyes = function(slave) {
 			r += `though you doubt it would be much different if ${he} could see; `;
 			if (slave.intelligence + slave.intelligenceImplant >= -95) {
 				r += `even with ${his} education, ${he} is still <span class="orangered">really stupid.</span>`;
+			} else if (slave.intelligence + slave.intelligenceImplant < -115) {
+				r += `with ${his} miseducation, ${he} may as well be <span class="orangered">brain dead</span> given how long it takes for ${him} to form a coherent thought. `;
 			} else if (slave.intelligenceImplant > 0) {
 				r += `${he} is <span class="orangered">a moron,</span> yet somehow still remembers the basics of an education. `;
+			} else if (slave.intelligenceImplant <= -15) {
+				r += `${he} is such <span class="orangered">a moron</span> that ${his} miseducation is completely unapparent. `;
 			} else {
 				r += `${he} is <span class="orangered">a moron,</span> and ignorant to boot. `;
 			}
@@ -135,12 +163,16 @@ App.Desc.eyes = function(slave) {
 			r += `${His} ${slave.eyeColor}-eyed gaze is incisive, quick, cunning; `;
 			if (slave.intelligence + slave.intelligenceImplant >= 130) {
 				r += `with ${his} education, ${he} is so far <span class="deepskyblue">beyond brilliant</span> that ${he} is nearly peerless. `;
+			} else if (slave.intelligence + slave.intelligenceImplant <= 95) {
+				r += `with ${his} miseducation, however, ${he} is merely <span class="orangered">highly intelligent.</span> `;
 			} else if (slave.intelligenceImplant >= 15) {
 				r += `${he} is both <span class="deepskyblue">brilliant</span> and `;
 				if (slave.intelligenceImplant >= 30) {
 					r += `well `;
 				}
 				r += `educated. `;
+			} else if (slave.intelligenceImplant <= -15) {
+				// placeholder as this is a technical impossibility for now
 			} else {
 				r += `${he} is so <span class="deepskyblue">brilliant</span> that ${his} `;
 				if (slave.intelligenceImplant > 0) {
@@ -152,7 +184,9 @@ App.Desc.eyes = function(slave) {
 			}
 		} else if (slave.intelligence > 50) {
 			if (slave.intelligence + slave.intelligenceImplant > 95) {
-				r += `${His} ${slave.eyeColor}-eyed gaze is incisive, quick, cunning; with ${his} education, ${he} can be considered <span class="deepskyblue">brilliant.</span>`;
+				r += `${His} ${slave.eyeColor}-eyed gaze is incisive, quick, cunning; with ${his} education, ${he} can be considered <span class="deepskyblue">brilliant.</span> `;
+			} else if (slave.intelligence + slave.intelligenceImplant <= 50) {
+				r += `${His} ${slave.eyeColor} eyes are alive with intelligence; with ${his} miseducation, however, ${he} performs merely <span class="orangered">above average.</span> `;
 			} else if (slave.intelligenceImplant >= 15) {
 				r += `${His} ${slave.eyeColor} eyes are alive with intelligence; ${he} is both <span class="deepskyblue">highly intelligent</span> and `;
 				if (slave.intelligenceImplant >= 30) {
@@ -163,6 +197,8 @@ App.Desc.eyes = function(slave) {
 				r += `${His} ${slave.eyeColor} eyes are alive with intelligence; ${he} is so <span class="deepskyblue">highly intelligent</span> that ${his} `;
 				if (slave.intelligenceImplant > 0) {
 					r += `meager`;
+				} else if (slave.intelligenceImplant <= -15) {
+					r += `miseducation`;
 				} else {
 					r += `lack of`;
 				}
@@ -171,26 +207,34 @@ App.Desc.eyes = function(slave) {
 		} else if (slave.intelligence > 15) {
 			r += `${His} ${slave.eyeColor} eyes are `;
 			if (slave.intelligence + slave.intelligenceImplant > 50) {
-				r += `alive with intelligence; with ${his} education, ${he} can be considered <span class="deepskyblue">highly intelligent.</span>`;
+				r += `alive with intelligence; with ${his} education, ${he} can be considered <span class="deepskyblue">highly intelligent.</span> `;
+			} else if (slave.intelligence + slave.intelligenceImplant <= 15) {
+				r += `clever; with ${his} miseducation, however, ${he} performs merely <span class="orangered">averagely.</span> `;
 			} else if (slave.intelligenceImplant >= 15) {
 				r += `clever; ${he} is of <span class="deepskyblue">above average intelligence</span> and `;
 				if (slave.intelligenceImplant >= 30) {
 					r += `well `;
 				}
 				r += `educated. `;
+			} else if (slave.intelligenceImplant <= -15) {
+				r += `clever; ${he} is of <span class="deepskyblue">above average intelligence</span> despite ${his} miseducation. `;
 			} else {
 				r += `clever; ${he} is of <span class="deepskyblue">above average intelligence</span> despite being undereducated. `;
 			}
 		} else if (slave.intelligence >= -15) {
 			r += `${His} ${slave.eyeColor} eyes are `;
 			if (slave.intelligence + slave.intelligenceImplant > 15) {
-				r += `clever; with ${his} education, ${he} can be considered of <span class="deepskyblue">above average intelligence.</span>`;
+				r += `clever; with ${his} education, ${he} can be considered of <span class="deepskyblue">above average intelligence.</span> `;
+			} else if (slave.intelligence + slave.intelligenceImplant < -15) {
+				r += `alert; with ${his} miseducation, however, ${he} exibits <span class="orangered">below average intelligence.</span> `;
 			} else if (slave.intelligenceImplant >= 15) {
 				r += `alert; ${he} is of average intelligence due to being `;
 				if (slave.intelligenceImplant >= 30) {
 					r += `well `;
 				}
 				r += `educated. `;
+			} else if (slave.intelligenceImplant <= -15) {
+				r += `alert; ${he} is of average intelligence even with ${his} miseducation. `;
 			} else {
 				r += `alert; ${he} is of average intelligence and is undereducated. `;
 			}
@@ -198,19 +242,25 @@ App.Desc.eyes = function(slave) {
 			r += `${His} ${slave.eyeColor} eyes are `;
 			if (slave.intelligence + slave.intelligenceImplant >= -15) {
 				r += `alert; with ${his} education, ${he} can be considered of average intelligence. `;
+			} else if (slave.intelligence + slave.intelligenceImplant < -50) {
+				r += `dim; with ${his} miseducation, however, ${he} may as well be <span class="orangered">an idiot.</span> `;
 			} else if (slave.intelligenceImplant >= 15) {
 				r += `dim; ${he} is of <span class="orangered">below average intelligence</span> despite having been `;
 				if (slave.intelligenceImplant >= 30) {
 					r += `thoroughly `;
 				}
 				r += `educated. `;
+			} else if (slave.intelligenceImplant <= -15) {
+				r += `dim; ${he} is <span class="orangered">below average intelligence</span> before taking ${his} miseducation into account. `;
 			} else {
 				r += `dim; ${he} is of <span class="orangered">below average intelligence</span> and is poorly educated. `;
 			}
 		} else if (slave.intelligence >= -95) {
 			r += `${His} ${slave.eyeColor} eyes are `;
 			if (slave.intelligence + slave.intelligenceImplant >= -50) {
-				r += `dim; even with ${his} education, ${he} can only be considered of <span class="orangered">below average intelligence.</span>`;
+				r += `dim; even with ${his} education, ${he} can only be considered of <span class="orangered">below average intelligence.</span> `;
+			} else if (slave.intelligence + slave.intelligenceImplant < -95) {
+				r += `dull; with ${his} miseducation, however, ${he} may as well be <span class="orangered">a complete moron.</span> `;
 			} else if (slave.intelligenceImplant >= 15) {
 				r += `dull; ${he} is <span class="orangered">quite stupid</span> despite having `;
 				if (slave.intelligenceImplant >= 30) {
@@ -219,15 +269,21 @@ App.Desc.eyes = function(slave) {
 					r += `some`;
 				}
 				r += ` education. `;
+			} else if (slave.intelligenceImplant <= -15) {
+				r += `dull; ${he} is <span class="orangered">so stupid</span> ${his} miseducation had little effect. `;
 			} else {
 				r += `dull; ${he} is <span class="orangered">quite stupid</span> and ignorant. `;
 			}
 		} else {
 			r += `${His} ${slave.eyeColor}-eyed gaze betrays near-total insensibility; `;
 			if (slave.intelligence + slave.intelligenceImplant >= -95) {
-				r += `even with ${his} education, ${he} is still <span class="orangered">really stupid.</span>`;
+				r += `even with ${his} education, ${he} is still <span class="orangered">really stupid.</span> `;
+			} else if (slave.intelligence + slave.intelligenceImplant < -115) {
+				r += `with ${his} miseducation, ${he} may as well be <span class="orangered">brain dead</span> given how long it takes for ${him} to form a coherent thought. `;
 			} else if (slave.intelligenceImplant > 0) {
 				r += `${he} is <span class="orangered">a moron,</span> yet somehow still remembers the basics of an education. `;
+			} else if (slave.intelligenceImplant <= -15) {
+				r += `${he} is such <span class="orangered">a moron</span> that ${his} miseducation is completely unapparent. `;
 			} else {
 				r += `${he} is <span class="orangered">a moron,</span> and ignorant to boot. `;
 			}
@@ -1084,7 +1140,6 @@ App.Desc.limbs = function(slave) {
  * @returns {string}
  */
 App.Desc.inscrip = function(slave) {
-
 	function fetishToObject() {
 		switch (slave.fetish) {
 			case "buttslut":
diff --git a/src/uncategorized/saLongTermEffects.tw b/src/uncategorized/saLongTermEffects.tw
index 5772867288f..6eea5e8dff0 100644
--- a/src/uncategorized/saLongTermEffects.tw
+++ b/src/uncategorized/saLongTermEffects.tw
@@ -99,7 +99,7 @@
 				$His @@.red;mind steadily degrades@@ under the stress of this treatment.
 				<<set $slaves[$i].intelligence -= 40>>
 			<</if>>
-			<<if $slaves[$i].intelligenceImplant > 0>>
+			<<if $slaves[$i].intelligenceImplant != 0>>
 				An education holds no bearing for $his new skillset, so it @@.red;wastes away.@@
 				<<set $slaves[$i].intelligenceImplant = 0>>
 			<</if>>
@@ -5360,7 +5360,7 @@
 				<<= FutureSocieties.ChangePorn("GenderFundamentalist", 1)>>
 			<</if>>
 		<</if>>
-		<<if ($slaves[$i].intelligenceImplant > 15 && $arcologies[0].FSGenderFundamentalistLawBimbo == 1)>>
+		<<if ($slaves[$i].intelligenceImplant > 15 || $slaves[$i].intelligenceImplant <= 15) && $arcologies[0].FSGenderFundamentalistLawBimbo == 1>>
 			Society @@.green;disapproves@@ of encouraging a woman's education.
 			<<= FutureSocieties.ChangePorn("GenderFundamentalist", -1)>>
 		<</if>>
@@ -5535,9 +5535,15 @@
 		<<elseif ($slaves[$i].intelligenceImplant >= 15) && ($slaves[$i].fetish != "mindbroken")>>
 			Society @@.green;approves@@ of $slaves[$i].slaveName being properly educated; this advances ideas about slave improvement.
 			<<= FutureSocieties.ChangePorn("Paternalist", 1)>>
-		<<elseif ($arcologies[0].FSGenderFundamentalistLawBimbo != 1 && $arcologies[0].FSIntellectualDependency == "unset") && ($slaves[$i].intelligenceImplant < 15) && ($slaves[$i].fetish != "mindbroken")>>
-			Society @@.red;disapproves@@ of $slaves[$i].slaveName being uneducated; this holds back ideas about slave improvement.
-			<<= FutureSocieties.ChangePorn("Paternalist", -1)>>
+		<</if>>
+		<<if ($slaves[$i].fetish != "mindbroken")>>
+			<<if ($arcologies[0].FSGenderFundamentalistLawBimbo != 1 && $arcologies[0].FSIntellectualDependency == "unset") && ($slaves[$i].intelligenceImplant < 15)>>
+				Society @@.red;disapproves@@ of $slaves[$i].slaveName being uneducated; this holds back ideas about slave improvement.
+				<<= FutureSocieties.ChangePorn("Paternalist", -1)>>
+			<<elseif ($slaves[$i].intelligenceImplant <= -15)
+				Society @@.red;is appalled@@ by $slaves[$i].slaveName's twisted education; it goes against paternalistic values.
+				<<= FutureSocieties.ChangePorn("Paternalist", -2)>>
+			<</if>>
 		<</if>>
 		<<if ($slaves[$i].health > 80)>>
 			Society @@.green;approves@@ of $his shining health; this advances belief in a slaveowner's duty.
@@ -5605,6 +5611,10 @@
 					<<= FutureSocieties.ChangePorn("Degradationist", -1)>>
 				<</if>>
 			<</if>>
+			<<if ($slaves[$i].intelligenceImplant <= -15)
+				Society @@.red;is amused@@ by $slaves[$i].slaveName's education and how much it hinders critical thought.
+				<<= FutureSocieties.ChangePorn("Degradationist", 1)>>
+			<</if>>
 		<</if>>
 		<<if ($slaves[$i].assignment == "work a glory hole") || ($slaves[$i].assignment == "be confined in the arcade")>>
 			Society @@.green;approves@@ of how $he is restrained for involuntary use, seeing this as the future of sexual relations.
@@ -5691,6 +5701,9 @@
 		<<elseif $slaves[$i].intelligenceImplant >= 30>>
 			Society @@.green;approves@@ of $slaves[$i].slaveName's advanced education; this advances ideas about crafting the perfect slave.
 			<<= FutureSocieties.ChangePorn("SlaveProfessionalism", 1)>>
+		<<elseif $slaves[$i].intelligenceImplant <= -15>>
+			Society @@.red;is appalled@@ by $slaves[$i].slaveName's twisted education; why someone would do this is beyond them.
+			<<= FutureSocieties.ChangePorn("SlaveProfessionalism", -3)>>
 		<<elseif $slaves[$i].intelligence < -10>>
 			Society @@.red;frowns@@ of keeping a slave as slow as $slaves[$i].slaveName; the lack of any effort to rectify $his lack of intelligence sets a bad example for other owners.
 			<<= FutureSocieties.ChangePorn("SlaveProfessionalism", -2)>>
-- 
GitLab