From 3ba4e1dcc59585cb4620110549dd745e4794b03b Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Sat, 25 May 2019 22:59:40 -0400
Subject: [PATCH] enabled genetic muscle gain/loss

---
 Changelog.txt                      |   1 +
 src/js/economyJS.js                |  12 +++
 src/js/generateGenetics.js         |  66 ++++++++++++++
 src/js/generateNewSlaveJS.js       |  32 +++++++
 src/uncategorized/costsReport.tw   |  36 ++++++++
 src/uncategorized/remoteSurgery.tw |   8 +-
 src/uncategorized/saDiet.tw        | 137 ++++++++++++++++++++++++-----
 src/utility/descriptionWidgets.tw  |   4 +-
 8 files changed, 267 insertions(+), 29 deletions(-)

diff --git a/Changelog.txt b/Changelog.txt
index 6ad74ce5686..e32364e5e1e 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -7,6 +7,7 @@ Pregmod
 	-slave assignment links improved
 	-facility transfer tab added to facility assignment
 	-new slave school specializing in nulled slaves
+	-added genetic muscle gain and loss
 	-added a drug to force erections
 	-aphrodisiacs counter erectile dysfunction
 	-added birth tracking tattoo
diff --git a/src/js/economyJS.js b/src/js/economyJS.js
index 1627b0c52e7..a03b001f1bf 100644
--- a/src/js/economyJS.js
+++ b/src/js/economyJS.js
@@ -666,6 +666,18 @@ window.getSlaveCost = function(s) {
 	if (s.geneticQuirks.rearLipedema === 2) {
 		cost += foodCost * 0.2;
 	}
+	if (s.geneticQuirks.macromastia === 2) {
+		cost += foodCost * 0.2;
+	}
+	if (s.geneticQuirks.gigantomastia === 2) {
+		cost += foodCost * 0.2;
+	}
+	if (s.geneticQuirks.mGain === 2 && s.geneticQuirks.mLoss !== 2) {
+		cost += foodCost * 0.2;
+	}
+	if (s.geneticQuirks.wGain === 2 && s.geneticQuirks.wLoss !== 2) {
+		cost += foodCost * 0.2;
+	}
 	if (s.drugs === 'appetite suppressors') {
 		cost -= foodCost;
 	}
diff --git a/src/js/generateGenetics.js b/src/js/generateGenetics.js
index 16c9f42679e..0d64e0a4ce8 100644
--- a/src/js/generateGenetics.js
+++ b/src/js/generateGenetics.js
@@ -1082,6 +1082,72 @@ window.generateGenetics = (function() {
 				}
 			}
 		}
+		
+		// myotonic hypertrophy
+		if (father !== 0) {
+			if (mother.geneticQuirks.mGain === 2 && father.geneticQuirks.mGain === 2) {
+				if (jsRandom(1, 4) >= 3) {
+					quirks.mGain = 2;
+				} else {
+					quirks.mGain = 1;
+				}
+			} else if (mother.geneticQuirks.mGain === 1 + father.geneticQuirks.mGain >= 3) {
+				chance = jsRandom(1, 4);
+				if (chance <= 2) {
+					quirks.mGain = 2;
+				} else if (chance === 4) {
+					quirks.mGain = 1;
+				}
+			} else if (mother.geneticQuirks.mGain === 1 && father.geneticQuirks.mGain === 1) {
+				if (jsRandom(1, 4) === 1) {
+					quirks.mGain = 2;
+				} else if (chance === 4) {
+					quirks.mGain = 1;
+				}
+			}
+		} else if (mother.geneticQuirks.mGain >= 1) {
+			if (jsRandom(0, 40000) >= 37500) {
+				chance = jsRandom(1, 4);
+				if (chance <= 2) {
+					quirks.mGain = 1;
+				} else if (chance === 4) {
+					quirks.mGain = 2;
+				}
+			}
+		}
+		
+		// myotonic dystrophy
+		if (father !== 0) {
+			if (mother.geneticQuirks.mLoss === 2 && father.geneticQuirks.mLoss === 2) {
+				if (jsRandom(1, 4) >= 3) {
+					quirks.mLoss = 2;
+				} else {
+					quirks.mLoss = 1;
+				}
+			} else if (mother.geneticQuirks.mLoss === 1 + father.geneticQuirks.mLoss >= 3) {
+				chance = jsRandom(1, 4);
+				if (chance <= 2) {
+					quirks.mLoss = 2;
+				} else if (chance === 4) {
+					quirks.mLoss = 1;
+				}
+			} else if (mother.geneticQuirks.mLoss === 1 && father.geneticQuirks.mLoss === 1) {
+				if (jsRandom(1, 4) === 1) {
+					quirks.mLoss = 2;
+				} else if (chance === 4) {
+					quirks.mLoss = 1;
+				}
+			}
+		} else if (mother.geneticQuirks.mLoss >= 1) {
+			if (jsRandom(0, 40000) >= 39000) {
+				chance = jsRandom(1, 4);
+				if (chance <= 2) {
+					quirks.mLoss = 1;
+				} else if (chance === 4) {
+					quirks.mLoss = 2;
+				}
+			}
+		}
 
 		return clone(quirks);
 	}
diff --git a/src/js/generateNewSlaveJS.js b/src/js/generateNewSlaveJS.js
index 5e93b736e17..1aaa29318f1 100644
--- a/src/js/generateNewSlaveJS.js
+++ b/src/js/generateNewSlaveJS.js
@@ -1162,6 +1162,18 @@ window.GenerateNewSlave = (function() {
 		} else if (chance >= 19950) {
 			slave.geneticQuirks.gigantism = 1;
 		}
+		chance = jsRandom(1, 20000);
+		if (chance >= 19900) {
+			slave.geneticQuirks.mGain = 2;
+		} else if (chance >= 18500) {
+			slave.geneticQuirks.mGain = 1;
+		}
+		chance = jsRandom(1, 20000);
+		if (chance >= 19950) {
+			slave.geneticQuirks.mLoss = 2;
+		} else if (chance >= 18500) {
+			slave.geneticQuirks.mLoss = 1;
+		}
 	}
 
 	function generateXYGeneticQuirks() {
@@ -1216,6 +1228,18 @@ window.GenerateNewSlave = (function() {
 		} else if (chance >= 19950) {
 			slave.geneticQuirks.gigantism = 1;
 		}
+		chance = jsRandom(1, 20000);
+		if (chance >= 19875) {
+			slave.geneticQuirks.mGain = 2;
+		} else if (chance >= 18500) {
+			slave.geneticQuirks.mGain = 1;
+		}
+		chance = jsRandom(1, 20000);
+		if (chance >= 19950) {
+			slave.geneticQuirks.mLoss = 2;
+		} else if (chance >= 18500) {
+			slave.geneticQuirks.mLoss = 1;
+		}
 	}
 
 	function generateAge() {
@@ -1623,6 +1647,14 @@ window.GenerateNewSlave = (function() {
 				slave.boobs = Math.clamp(slave.boobs, 300, 25000);
 			}
 		}
+		if (slave.geneticQuirks.mGain === 2) {
+			slave.muscles += jsRandom(10, 50);
+			slave.muscles = Math.clamp(slave.muscles, -100, 100);
+		}
+		if (slave.geneticQuirks.mLoss === 2) {
+			slave.muscles -= jsRandom(10, 50);
+			slave.muscles = Math.clamp(slave.muscles, -100, 100);
+		}
 	}
 
 	return GenerateNewSlave;
diff --git a/src/uncategorized/costsReport.tw b/src/uncategorized/costsReport.tw
index 7aa919f7c36..8d78b14c051 100644
--- a/src/uncategorized/costsReport.tw
+++ b/src/uncategorized/costsReport.tw
@@ -538,6 +538,24 @@ $researchLab.level > 0>>
 		<</if>>
 		<<set _individualCosts += $foodCost/2>>
 	<</if>>
+	<<if ($slaves[$i].geneticQuirks.macromastia == 2)>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;
+		<<if $geneticMappingUpgrade >= 1>>
+			<i>Additional dietary supplements due to macromastia:</i> @@.yellowgreen;<<print cashFormat($foodCost/5)>>@@
+		<<else>>
+			<i>Adjustment for unusual deitary deficiencies:</i> @@.yellowgreen;<<print cashFormat($foodCost/5)>>@@
+		<</if>>
+		<<set _individualCosts += $foodCost/5>>
+	<</if>>
+	<<if ($slaves[$i].geneticQuirks.gigantomastia == 2)>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;
+		<<if $geneticMappingUpgrade >= 1>>
+			<i>Additional dietary supplements due to gigantomastia:</i> @@.yellowgreen;<<print cashFormat($foodCost/5)>>@@
+		<<else>>
+			<i>Adjustment for unusual deitary deficiencies:</i> @@.yellowgreen;<<print cashFormat($foodCost/5)>>@@
+		<</if>>
+		<<set _individualCosts += $foodCost/5>>
+	<</if>>
 	<<if ($slaves[$i].geneticQuirks.rearLipedema == 2)>>
 		<br>&nbsp;&nbsp;&nbsp;&nbsp;
 		<<if $geneticMappingUpgrade >= 1>>
@@ -547,6 +565,24 @@ $researchLab.level > 0>>
 		<</if>>
 		<<set _individualCosts += $foodCost/5>>
 	<</if>>
+	<<if ($slaves[$i].geneticQuirks.mGain == 2 && $slaves[$i].geneticQuirks.mLoss != 2)>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;
+		<<if $geneticMappingUpgrade >= 1>>
+			<i>Additional dietary supplements due to myotonic hypertrophy:</i> @@.yellowgreen;<<print cashFormat($foodCost/5)>>@@
+		<<else>>
+			<i>Adjustment for unusual deitary deficiencies:</i> @@.yellowgreen;<<print cashFormat($foodCost/5)>>@@
+		<</if>>
+		<<set _individualCosts += $foodCost/5>>
+	<</if>>
+	<<if ($slaves[$i].geneticQuirks.wGain == 2 && $slaves[$i].geneticQuirks.wLoss != 2)>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;
+		<<if $geneticMappingUpgrade >= 1>>
+			<i>Additional dietary supplements due to hyperleptinemia:</i> @@.yellowgreen;<<print cashFormat($foodCost/5)>>@@
+		<<else>>
+			<i>Adjustment for unusual deitary deficiencies:</i> @@.yellowgreen;<<print cashFormat($foodCost/5)>>@@
+		<</if>>
+		<<set _individualCosts += $foodCost/5>>
+	<</if>>
 	<<if $slaves[$i].drugs == "appetite suppressors">>
 		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Food saved via suppressed appetite:</i> //reduced by// @@.yellowgreen;<<print cashFormat($foodCost)>>@@
 		<<set _individualCosts -= $foodCost>>
diff --git a/src/uncategorized/remoteSurgery.tw b/src/uncategorized/remoteSurgery.tw
index e968ef93c8a..b76bb0fb7f5 100644
--- a/src/uncategorized/remoteSurgery.tw
+++ b/src/uncategorized/remoteSurgery.tw
@@ -1541,7 +1541,6 @@ $He has
 			<br>&nbsp;&nbsp;&nbsp;&nbsp;
 			[[Induced penile development treatment|Surgery Degradation][$activeSlave.geneticQuirks.wellHung = 2,cashX(forceNeg($surgeryCost*10), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.chem += 40,$surgeryType = "gene treatment"]] //This will induce @@.orange;penile development@@ in $his genetic code//
 		<</if>>
-		/*
 		<<if $activeSlave.geneticQuirks.wGain == 2>>
 			<br>&nbsp;&nbsp;&nbsp;&nbsp;
 			[[Correct hyperleptinemia|Surgery Degradation][$activeSlave.geneticQuirks.wGain = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.chem += 100,$surgeryType = "gene treatment"]]
@@ -1564,14 +1563,15 @@ $He has
 		<</if>>
 		<<if $activeSlave.geneticQuirks.mGain == 2>>
 			<br>&nbsp;&nbsp;&nbsp;&nbsp;
-			[[Correct myotonic hypertorphy|Surgery Degradation][$activeSlave.geneticQuirks.mGain = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.chem += 100,$surgeryType = "gene treatment"]]
+			[[Correct myotonic hypertrophy|Surgery Degradation][$activeSlave.geneticQuirks.mGain = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.chem += 100,$surgeryType = "gene treatment"]]
 		<<elseif $activeSlave.geneticQuirks.mGain == 1 && $geneticMappingUpgrade >= 2>>
 			<br>&nbsp;&nbsp;&nbsp;&nbsp;
-			[[Myotonic hypertorphy activation treatment|Surgery Degradation][$activeSlave.geneticQuirks.mGain = 2,cashX(forceNeg($surgeryCost*4), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.chem += 100,$surgeryType = "gene treatment"]]
+			[[Myotonic hypertrophy activation treatment|Surgery Degradation][$activeSlave.geneticQuirks.mGain = 2,cashX(forceNeg($surgeryCost*4), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.chem += 100,$surgeryType = "gene treatment"]]
 		<<elseif $geneticFlawLibrary == 1>>
 			<br>&nbsp;&nbsp;&nbsp;&nbsp;
-			[[Induced myotonic hypertorphy treatment|Surgery Degradation][$activeSlave.geneticQuirks.mGain = 2,cashX(forceNeg($surgeryCost*10), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.chem += 40,$surgeryType = "gene treatment"]] //This will induce @@.orange;myotonic hypertorphy@@ in $his genetic code//
+			[[Induced myotonic hypertrophy treatment|Surgery Degradation][$activeSlave.geneticQuirks.mGain = 2,cashX(forceNeg($surgeryCost*10), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.chem += 40,$surgeryType = "gene treatment"]] //This will induce @@.orange;myotonic hypertrophy@@ in $his genetic code//
 		<</if>>
+		/*
 		<<if $activeSlave.geneticQuirks.mLoss == 2>>
 			<br>&nbsp;&nbsp;&nbsp;&nbsp;
 			[[Correct myotonic dystrophy|Surgery Degradation][$activeSlave.geneticQuirks.mLoss = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.chem += 100,$surgeryType = "gene treatment"]]
diff --git a/src/uncategorized/saDiet.tw b/src/uncategorized/saDiet.tw
index bf6762f2ba4..a9d011c1021 100644
--- a/src/uncategorized/saDiet.tw
+++ b/src/uncategorized/saDiet.tw
@@ -331,34 +331,52 @@
 			$His heavy workouts focus on lifting. $He has plateaued at a state of @@.lime;goddess-like musculature.@@
 			<<set $slaves[$i].muscles = 100>>
 			<<set $slaves[$i].diet = "healthy">>
+		<<elseif ($slaves[$i].geneticQuirks.mGain == 2)>>
+			$His heavy workouts focus on lifting,
+			<<if $geneticMappingUpgrade >= 1>>
+				and with $his myotonic hypertrophy,
+			<<else>>
+				and despite run-of-the-mill routines,
+			<</if>>
+			$he @@.lime;gains muscle rapidly.@@
+			<<set $slaves[$i].muscles = Math.clamp($slaves[$i].muscles+10, -100, 100)>>
 		<<elseif ($slaves[$i].drugs == "steroids")>>
 			$His heavy workouts focus on lifting, and since $he's on so much gear, $he @@.lime;gains muscle rapidly.@@
-			<<set $slaves[$i].muscles += 8>>
+			<<set $slaves[$i].muscles += 8+$slaves[$i].geneticQuirks.mGain>>
+		<<elseif ($slaves[$i].geneticQuirks.mLoss == 2)>>
+			$His heavy workouts focus on lifting,
+			<<if $geneticMappingUpgrade >= 1>>
+				but with $his myotonic dystrophy,
+			<<else>>
+				but despite $his efforts,
+			<</if>>
+			$he barely @@.lime;gains muscle.@@
+			<<set $slaves[$i].muscles += 2>>
 		<<elseif ($slaves[$i].balls > 0) && $slaves[$i].ballType != "sterile" && ($slaves[$i].hormoneBalance >= 100)>>
 			$His heavy workouts focus on lifting, but with natural testosterone and artificial female hormones clashing in $his system, $he only @@.lime;slowly gains muscle.@@
-			<<set $slaves[$i].muscles += 3>>
+			<<set $slaves[$i].muscles += 3+$slaves[$i].geneticQuirks.mGain>>
 		<<elseif ($slaves[$i].balls > 0) && $slaves[$i].ballType != "sterile" && ($slaves[$i].hormoneBalance <= -100)>>
 			$His heavy workouts focus on lifting, and with natural testosterone and artificial male hormones in $his system, $he @@.lime;gains muscle rapidly.@@
 			<<set $slaves[$i].muscles += 8>>
 		<<elseif ($slaves[$i].balls > 0) && $slaves[$i].ballType != "sterile">>
 			$His heavy workouts focus on lifting, and with natural testosterone in $his system, $he @@.lime;gains muscle.@@
-			<<set $slaves[$i].muscles += 5>>
+			<<set $slaves[$i].muscles += 5+$slaves[$i].geneticQuirks.mGain>>
 		<<elseif ($slaves[$i].balls > 0)>>
 			$His heavy workouts focus on lifting, but with $his useless balls making little testosterone for $his system, $he only @@.lime;slowly gains muscle.@@
-			<<set $slaves[$i].muscles += 2>>
+			<<set $slaves[$i].muscles += 2+$slaves[$i].geneticQuirks.mGain>>
 		<<elseif ($slaves[$i].hormoneBalance <= -100)>>
 			$His heavy workouts focus on lifting, and with artificial testosterone in $his system, $he @@.lime;gains muscle.@@
-			<<set $slaves[$i].muscles += 5>>
+			<<set $slaves[$i].muscles += 5+$slaves[$i].geneticQuirks.mGain>>
 		<<elseif ($slaves[$i].hormoneBalance >= 100)>>
 			$His heavy workouts focus on lifting, but with lots of female hormones in $his system, $he barely @@.lime;gains muscle.@@
-			<<set $slaves[$i].muscles += 2>>
+			<<set $slaves[$i].muscles += 2+$slaves[$i].geneticQuirks.mGain>>
 		<<else>>
 			$His heavy workouts focus on lifting, and $he @@.lime;slowly gains muscle.@@
-			<<set $slaves[$i].muscles += 3>>
+			<<set $slaves[$i].muscles += 3+$slaves[$i].geneticQuirks.mGain>>
 		<</if>>
 		<<if ($slaves[$i].behavioralQuirk == "fitness")>>
 			$He attacks lifting with real enthusiasm, further increasing $his mass.
-			<<set $slaves[$i].muscles += 2>>
+			<<set $slaves[$i].muscles += 2+$slaves[$i].geneticQuirks.mGain>>
 		<</if>>
 		<<if ((($slaves[$i].geneMods.NCS == 0) && (random(1,100) > 90)) || (($slaves[$i].geneMods.NCS == 1) && (random(1,100) > 45)))>>
 			<<if ((($slaves[$i].geneMods.NCS == 0) && ($slaves[$i].boobs-$slaves[$i].boobsImplant-$slaves[$i].boobsMilk >= 200)) || (($slaves[$i].geneMods.NCS == 1) && ($slaves[$i].boobs > 100)))>>
@@ -397,34 +415,52 @@
 			$His long workouts focus on cardio. $He has finally @@.orange;lost all visible musculature.@@
 			<<set $slaves[$i].muscles = 0>>
 			<<set $slaves[$i].diet = "healthy">>
+		<<elseif ($slaves[$i].geneticQuirks.mLoss == 2)>>
+			$His long workouts focus on cardio,
+			<<if $geneticMappingUpgrade >= 1>>
+				and with $his myotonic dystrophy,
+			<<else>>
+				and despite run-of-the-mill routines,
+			<</if>>
+			$he @@.lime;rapidly loses musculature.@@
+			<<set $slaves[$i].muscles -= 10>>
+		<<elseif ($slaves[$i].geneticQuirks.mGain == 2)>>
+			$His long workouts focus on cardio,
+			<<if $geneticMappingUpgrade >= 1>>
+				but with $his myotonic hypertrophy,
+			<<else>>
+				but despite $his best efforts,
+			<</if>>
+			$he @@.lime;loses mass slowly.@@
+			<<set $slaves[$i].muscles -= 2>>
 		<<elseif ($slaves[$i].drugs == "steroids")>>
 			$His long workouts focus on cardio, but since $he's still shooting gear, $he @@.lime;loses mass slowly.@@
-			<<set $slaves[$i].muscles -= 3>>
+			<<set $slaves[$i].muscles -= 3+$slaves[$i].geneticQuirks.mLoss>>
 		<<elseif ($slaves[$i].balls > 0) && $slaves[$i].ballType != "sterile" && ($slaves[$i].hormoneBalance <= -100)>>
 			$His long workouts focus on cardio, but since $he's got so much natural and artificial testosterone, $he @@.lime;loses mass slowly.@@
-			<<set $slaves[$i].muscles -= 3>>
+			<<set $slaves[$i].muscles -= 3+$slaves[$i].geneticQuirks.mLoss>>
 		<<elseif ($slaves[$i].balls > 0) && $slaves[$i].ballType != "sterile" && ($slaves[$i].hormoneBalance >= 100)>>
 			$His long workouts focus on cardio, and with the natural testosterone in $his system counteracted by hormone treatment, $he @@.lime;loses musculature.@@
-			<<set $slaves[$i].muscles -= 5>>
+			<<set $slaves[$i].muscles -= 5+$slaves[$i].geneticQuirks.mLoss>>
 		<<elseif ($slaves[$i].balls > 0) && $slaves[$i].ballType != "sterile">>
 			$His long workouts focus on cardio, but with some natural testosterone in $his system, $he @@.lime;loses muscle slowly.@@
-			<<set $slaves[$i].muscles -= 3>>
+			<<set $slaves[$i].muscles -= 3+$slaves[$i].geneticQuirks.mLoss>>
 		<<elseif ($slaves[$i].balls > 0)>>
 			$His long workouts focus on cardio, and with $his useless balls not producing much testosterone, $he @@.lime;loses musculature.@@
-			<<set $slaves[$i].muscles -= 5>>
+			<<set $slaves[$i].muscles -= 5+$slaves[$i].geneticQuirks.mLoss>>
 		<<elseif ($slaves[$i].hormoneBalance >= 100)>>
 			$His long workouts focus on cardio, and with female hormone treatment, $he @@.lime;loses musculature rapidly.@@
-			<<set $slaves[$i].muscles -= 8>>
+			<<set $slaves[$i].muscles -= 8+$slaves[$i].geneticQuirks.mLoss>>
 		<<elseif ($slaves[$i].hormoneBalance <= -100)>>
 			$His long workouts focus on cardio, but under male hormone treatment, $he @@.lime;loses muscle slowly.@@
-			<<set $slaves[$i].muscles -= 3>>
+			<<set $slaves[$i].muscles -= 3+$slaves[$i].geneticQuirks.mLoss>>
 		<<else>>
 			$His long workouts focus on cardio, and $he @@.lime;loses musculature.@@
-			<<set $slaves[$i].muscles -= 5>>
+			<<set $slaves[$i].muscles -= 5+$slaves[$i].geneticQuirks.mLoss>>
 		<</if>>
 		<<if ($slaves[$i].behavioralQuirk == "fitness")>>
 			$He approaches endurance work with real enthusiasm, quickly slimming $him down.
-			<<set $slaves[$i].muscles -= 2>>
+			<<set $slaves[$i].muscles -= 2+$slaves[$i].geneticQuirks.mLoss>>
 		<</if>>
 		<<if ((($slaves[$i].geneMods.NCS == 0) && (random(1,100) > 90)) || (($slaves[$i].geneMods.NCS == 1) && (random(1,100) > 45)))>>
 			<<if ((($slaves[$i].geneMods.NCS == 0) && ($slaves[$i].boobs-$slaves[$i].boobsImplant-$slaves[$i].boobsMilk >= 200)) || (($slaves[$i].geneMods.NCS == 1) && ($slaves[$i].boobs > 100)) && _gigantomastiaMod != 3)>>
@@ -828,6 +864,27 @@
 	<</if>>
 <</switch>>
 
+/* genetic quirk effects on unrelated diets */
+<<if !["muscle building", "slimming"].includes($slaves[$i].diet)>>
+	<<if $slaves[$i].geneticQuirks.mLoss == 2 && $slaves[$i].muscles >= -95>>
+		<<if $geneticMappingUpgrade >= 1>>
+			$His body @@.lime;passively loses muscle mass@@ due to $his myotonic dystrophy.
+		<</if>>
+		<<set $slaves[$i].muscles -= 3>>
+		<<if $slaves[$i].muscles < -95>>
+			<<set $slaves[$i].muscles = -100>>
+		<</if>>
+	<<elseif $slaves[$i].geneticQuirks.mGain == 2 && $slaves[$i].muscles < 95 && $slaves[$i].weight >= -95>>
+		<<if $geneticMappingUpgrade >= 1>>
+			$His body @@.lime;passively builds muscle mass@@ due to $his myotonic hypertrophy.
+		<</if>>
+		<<set $slaves[$i].muscles += 3>>
+		<<if $slaves[$i].muscles >= 95>>
+			<<set $slaves[$i].muscles = 100>>
+		<</if>>
+	<</if>>
+<</if>>
+
 <<if ($slaves[$i].dietCum > 0)>>
 	<<if $slaves[$i].fetish != "mindbroken">>
 		<<if ($slaves[$i].devotion > 20)>> /* Diet effects for Devotion over 20 — For ALL cum diets */
@@ -1016,8 +1073,14 @@
 		$He has plateaued at a state of @@.lime;perfect musculature.@@
 		<<set $slaves[$i].muscles = 100>>
 		<<set $slaves[$i].diet = "healthy">>
+	<<elseif ($slaves[$i].geneticQuirks.mGain == 2)>>
+		$He @@.lime;explosively builds muscle<<if $geneticMappingUpgrade >= 1>>@@ aided by $his myotonic hypertrophy.<<else>>.@@<</if>>
+		<<set $slaves[$i].muscles = Math.clamp($slaves[$i].muscles+15, 0, 100)>>
+	<<elseif ($slaves[$i].geneticQuirks.mLoss == 2)>>
+		$He @@.lime;slowly gains muscle<<if $geneticMappingUpgrade >= 1>>@@ due to $his myotonic dystrophy.<<else>>.@@<</if>>
+		<<set $slaves[$i].muscles += 4>>
 	<<else>>
-		$He @@.lime;slowly gains muscle.@@
+		$He @@.lime;quickly gains muscle.@@
 		<<set $slaves[$i].muscles += 9>>
 	<</if>>
 	<<if random(1,100) > 90>>
@@ -1033,15 +1096,21 @@
 		$His workouts have also @@.orange;burned off some excess fat.@@
 		<<set $slaves[$i].weight -= 2>>
 	<</if>>
-	The stress of forced exercise is trivial compared to everything else it experiences, and it's unaffected mentally.
+	The stress of forced exercise is trivial compared to everything else $he experiences, and $he's unaffected mentally.
 <<case "slimming">> /* Muscle Loss */
 	Fuckdoll suits can force their inhabitants to work out until they drop.
 	<<if $slaves[$i].muscles <= 10>>
 		$He has finally @@.lime;lost all visible musculature.@@
 		<<set $slaves[$i].muscles = 0>>
 		<<set $slaves[$i].diet = "healthy">>
+	<<elseif ($slaves[$i].geneticQuirks.mLoss == 2)>>
+		$He @@.lime;rapidly sheds muscle<<if $geneticMappingUpgrade >= 1>>@@ aided by $his myotonic dystrophy.<<else>>.@@<</if>>
+		<<set $slaves[$i].muscles = Math.clamp($slaves[$i].muscles-15, -100, 100)>>
+	<<elseif ($slaves[$i].geneticQuirks.mGain == 2)>>
+		$He @@.lime;slowly loses musculature<<if $geneticMappingUpgrade >= 1>>@@ due to $his myotonic hypertrophy steadily trying to put it back.<<else>>.@@<</if>>
+		<<set $slaves[$i].muscles -= 4>>
 	<<else>>
-		It @@.lime;loses musculature.@@
+		$He @@.lime;loses musculature.@@
 		<<set $slaves[$i].muscles -= 9>>
 	<</if>>
 	<<if random(1,100) > 90>>
@@ -1144,7 +1213,7 @@
 	<<if ($slaves[$i].ovaries == 1 || $slaves[$i].mpreg == 1) && ($slaves[$i].balls > 0)>> /* herm */
 		<<if $slaves[$i].muscles < 60>>
 			Hormonal changes encourage $his body to @@.lime;gain muscle.@@
-		<<set $slaves[$i].muscles += 1>>
+			<<set $slaves[$i].muscles += 1+$slaves[$i].geneticQuirks.mGain>>
 		<</if>>
 		<<if $slaves[$i].waist < 0>>
 			Hormonal changes @@.orange;thicken $his waist.@@
@@ -1165,7 +1234,7 @@
 	<<elseif $slaves[$i].ovaries == 1 || $slaves[$i].mpreg == 1>> /* female */
 		<<if $slaves[$i].muscles < 15>>
 			Hormonal changes encourage $his body to @@.lime;gain muscle.@@
-			<<set $slaves[$i].muscles += 1>>
+			<<set $slaves[$i].muscles += 1+$slaves[$i].geneticQuirks.mGain>>
 		<</if>>
 		<<if (($slaves[$i].boobs-$slaves[$i].boobsImplant-$slaves[$i].boobsMilk) > 500*_gigantomastiaMod && _gigantomastiaMod != 3)>>
 			$His breasts @@.orange;lose some mass@@ from the lack of estrogen in $his diet.
@@ -1178,6 +1247,7 @@
 	<<elseif $slaves[$i].balls > 0>> /* male */
 		<<if $slaves[$i].muscles < 30>>
 			Hormonal changes encourage $his body to @@.lime;gain muscle.@@
+			<<set $slaves[$i].muscles += 1+$slaves[$i].geneticQuirks.mGain>>
 		<</if>>
 		<<if $slaves[$i].waist < 30>>
 			Hormonal changes @@.orange;thicken $his waist.@@
@@ -1200,7 +1270,7 @@
 	The ports in Fuckdoll suits allow total dietary control, and $he's barely aware $his sexual aspects are being @@.lime;enhanced.@@
 	<<if $slaves[$i].muscles < 90>>
 		Hormonal changes encourage $his body to @@.lime;gain muscle.@@
-	<<set $slaves[$i].muscles += 1>>
+	<<set $slaves[$i].muscles += 1+$slaves[$i].geneticQuirks.mGain>>
 	<</if>>
 	<<if $slaves[$i].weight < 50>>
 		Hormonal changes encourage $his body to @@.lime;grow softer.@@
@@ -1250,4 +1320,25 @@
 
 <</switch>>
 
+/* genetic quirk effects on unrelated diets */
+<<if !["muscle building", "slimming"].includes($slaves[$i].diet)>>
+	<<if $slaves[$i].geneticQuirks.mLoss == 2 && $slaves[$i].muscles >= -95>>
+		<<if $geneticMappingUpgrade >= 1>>
+			$His body @@.lime;passively loses muscle mass@@ due to $his myotonic dystrophy.
+		<</if>>
+		<<set $slaves[$i].muscles -= 3>>
+		<<if $slaves[$i].muscles < -95>>
+			<<set $slaves[$i].muscles = -100>>
+		<</if>>
+	<<elseif $slaves[$i].geneticQuirks.mGain == 2 && $slaves[$i].muscles < 95 && $slaves[$i].weight >= -95>>
+		<<if $geneticMappingUpgrade >= 1>>
+			$His body @@.lime;passively builds muscle mass@@ due to $his myotonic hypertrophy.
+		<</if>>
+		<<set $slaves[$i].muscles += 3>>
+		<<if $slaves[$i].muscles >= 95>>
+			<<set $slaves[$i].muscles = 100>>
+		<</if>>
+	<</if>>
+<</if>>
+
 <</if>> /* CLOSES FUCKDOLL CHECK */
diff --git a/src/utility/descriptionWidgets.tw b/src/utility/descriptionWidgets.tw
index 6b3de8d335d..401781d973d 100644
--- a/src/utility/descriptionWidgets.tw
+++ b/src/utility/descriptionWidgets.tw
@@ -219,12 +219,12 @@
 	<<if $activeSlave.geneticQuirks.mGain == 2 && $activeSlave.geneticQuirks.mLoss == 2>>
 		$He has severe genetic flaw resulting in easily replaced, rapidly lost muscle mass. 
 	<<elseif $activeSlave.geneticQuirks.mGain == 2>>
-		$He has myotonic hypertorphy and will easily gain muscle mass.
+		$He has myotonic hypertrophy and will easily gain muscle mass.
 	<<elseif $activeSlave.geneticQuirks.mLoss == 2>>
 		$He has myotonic dystrophy and will rapidly loose muscle mass.
 	<</if>>
 	<<if $activeSlave.geneticQuirks.mGain == 1 && $geneticMappingUpgrade >= 2>>
-		$He is a myotonic hypertorphy carrier.
+		$He is a myotonic hypertrophy carrier.
 	<</if>>
 	<<if $activeSlave.geneticQuirks.mLoss == 1 && $geneticMappingUpgrade >= 2>>
 		$He is a myotonic dystrophy carrier.
-- 
GitLab