From 9d81e0a5abb6d31606ce32b9312b6990eb20ba01 Mon Sep 17 00:00:00 2001
From: Arkerthan <arkerthan@gmail.com>
Date: Mon, 2 Sep 2019 23:18:46 +0200
Subject: [PATCH] convert to new limb variables part 3

---
 src/init/storyInit.tw                      |  4 +-
 src/js/surgery.js                          |  2 +
 src/npc/databases/ddSlavesDatabase.tw      |  2 +-
 src/npc/startingGirls/startingGirls.tw     | 37 +++++++--
 src/uncategorized/RESS.tw                  |  7 +-
 src/uncategorized/costsReport.tw           |  4 +-
 src/uncategorized/customSlave.tw           | 88 +++++++++++++++++-----
 src/uncategorized/multiImplant.tw          | 10 +--
 src/uncategorized/reRecruit.tw             |  9 +--
 src/uncategorized/reRelativeRecruiter.tw   |  5 +-
 src/uncategorized/saLiveWithHG.tw          |  3 +-
 src/uncategorized/seCustomSlaveDelivery.tw |  5 +-
 src/uncategorized/slaveShelter.tw          |  4 +-
 src/uncategorized/slaveStats.tw            |  3 +-
 src/uncategorized/surgeryDegradation.tw    |  4 +-
 src/utility/slaveCreationWidgets.tw        |  5 +-
 16 files changed, 133 insertions(+), 59 deletions(-)

diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw
index f347d871d25..5575eb9fb7c 100644
--- a/src/init/storyInit.tw
+++ b/src/init/storyInit.tw
@@ -1371,7 +1371,7 @@ You should have received a copy of the GNU General Public License along with thi
 <<set $weatherToday = $niceWeather.random()>>
 
 <<set $customSlaveOrdered = 0>>
-<<set $customSlave = {age: 19, health: 0, muscles: 0, lips: 15, heightMod: "normal", weight: 0, face: 0, race: "white", skin: "left natural", boobs: 500, butt: 3, sex: 1, virgin: 0, dick: 2, balls: 2, clit: 0, labia: 0, vaginaLube: 1, analVirgin: 0, skills: 15, skill: {whore: 15, combat: 0}, intelligence: 0, intelligenceImplant: 0, nationality: "Stateless", amp: 0, missingArms: 0, missingLegs: 0, eyes: 1, hears: 0}>>
+<<set $customSlave = {age: 19, health: 0, muscles: 0, lips: 15, heightMod: "normal", weight: 0, face: 0, race: "white", skin: "left natural", boobs: 500, butt: 3, sex: 1, virgin: 0, dick: 2, balls: 2, clit: 0, labia: 0, vaginaLube: 1, analVirgin: 0, skills: 15, skill: {whore: 15, combat: 0}, intelligence: 0, intelligenceImplant: 0, nationality: "Stateless", leg: {left: {type: 1}, right: {type: 1}}, arm: {left: {type: 1}, right: {type: 1}}, eyes: 1, hears: 0}>>
 
 <<set $huskSlaveOrdered = 0>>
 <<set $huskSlave = {age: 18, nationality: "Stateless", race: "white", sex: 1, virgin: 0}>>
@@ -1523,4 +1523,4 @@ You should have received a copy of the GNU General Public License along with thi
 
 <<= App.SF.Init()>>
 
-<<goto "Alpha disclaimer">>
\ No newline at end of file
+<<goto "Alpha disclaimer">>
diff --git a/src/js/surgery.js b/src/js/surgery.js
index 812402f9863..41eeda5a16d 100644
--- a/src/js/surgery.js
+++ b/src/js/surgery.js
@@ -564,6 +564,7 @@ window.removeLimbs = function(slave, limb) {
 				slave.shoes = "none";
 				slave.legAccessory = "none";
 				slave.heightImplant = 0;
+				slave.heels = 0;
 			}
 			break;
 		case "right leg":
@@ -577,6 +578,7 @@ window.removeLimbs = function(slave, limb) {
 				slave.shoes = "none";
 				slave.legAccessory = "none";
 				slave.heightImplant = 0;
+				slave.heels = 0;
 			}
 			break;
 		case "all":
diff --git a/src/npc/databases/ddSlavesDatabase.tw b/src/npc/databases/ddSlavesDatabase.tw
index c4991300ff4..106515e3acf 100644
--- a/src/npc/databases/ddSlavesDatabase.tw
+++ b/src/npc/databases/ddSlavesDatabase.tw
@@ -181,7 +181,7 @@
 
 <<set _HS = App.Entity.SlaveState.makeSkeleton()>>
 <<set _HS.slaveName = "Danny 'The D'", _HS.slaveSurname = "Ildoe", _HS.birthName = "Danny 'The D'", _HS.birthSurname = "Ildoe", _HS.origin = "Born without limbs and abandoned by $his parents, $he was taken in by a posh family, given a massive cock, and trained to be the wealthy lady's perfect living sex toy.", _HS.ID = _i++, _HS.birthWeek = random(0,51), _HS.actualAge = 28, _HS.visualAge = 28, _HS.physicalAge = 28, _HS.ovaryAge = 28, _HS.health = 100, _HS.devotion = 100, _HS.muscles = 50, _HS.height = 94, _HS.eyeColor = "blue", _HS.hColor = "black", _HS.pubicHColor = "black", _HS.override_Skin = 1, _HS.skin = "spray tanned", _HS.hLength = 10, _HS.hStyle = "short", _HS.waist = 55, _HS.boobs = 50, _HS.hips = -1, _HS.butt = 0, _HS.face = 45, _HS.vagina = -1, _HS.preg = 0, _HS.dick = 6, _HS.balls = 10, _HS.scrotum = 7, _HS.prostate = 2, _HS.anusTat = "bleached", _HS.energy = 95, _HS.intelligenceImplant = 30, _HS.attrXX = 100, _HS.attrXY = 0, _HS.skill.oral = 95, _HS.fetish = "submissive", _HS.fetishKnown = 1, _HS.behavioralQuirk = "advocate">>
-<<run removeLimbs(_HS, "all")
+<<run removeLimbs(_HS, "all")>>
 <<set $heroSlaves.push(_HS)>>
 /* needed an amputated slave for debug reasons -prndev */
 
diff --git a/src/npc/startingGirls/startingGirls.tw b/src/npc/startingGirls/startingGirls.tw
index 098c3c7c25b..8a3f347ae97 100644
--- a/src/npc/startingGirls/startingGirls.tw
+++ b/src/npc/startingGirls/startingGirls.tw
@@ -583,12 +583,36 @@ __You are customizing this slave:__
 <br>
 
 <<if $seeExtreme == 1>>
-	<<options $activeSlave.amp>>
-		''Limbs:''
-		<<option 0 "Normal" "$activeSlave.missingLegs = 0, $activeSlave.missingArms = 0">>
+	<<options $activeSlave.arm.left>>
+		''Left arm:''
+		<<option {type:1} "Normal">>
 			@@.green;Normal.@@
-		<<option 1 "Amputee" "$activeSlave.missingLegs = 3, $activeSlave.missingArms = 3">>
-			@@.red;Amputee.@@
+		<<option null "Amputee">>
+			@@.red;Amputated.@@
+	<</options>>
+	<br>
+	<<options $activeSlave.arm.right>>
+		''Right arm:''
+		<<option {type:1} "Normal">>
+			@@.green;Normal.@@
+		<<option null "Amputee">>
+			@@.red;Amputated.@@
+	<</options>>
+	<br>
+	<<options $activeSlave.leg.left>>
+		''Left leg:''
+		<<option {type:1} "Normal">>
+			@@.green;Normal.@@
+		<<option null "Amputee">>
+			@@.red;Amputated.@@
+	<</options>>
+	<br>
+	<<options $activeSlave.leg.right>>
+		''Right leg:''
+		<<option {type:1} "Normal">>
+			@@.green;Normal.@@
+		<<option null "Amputee">>
+			@@.red;Amputated.@@
 	<</options>>
 	<br>
 <</if>>
@@ -1630,7 +1654,8 @@ __You are customizing this slave:__
 	<br>&nbsp;&nbsp;&nbsp;&nbsp;
 	<<link "Onahole">>
 		<<StartingGirlsWorkaround>>
-		<<set $activeSlave.skill.anal = 0, $activeSlave.skill.oral = 0, $activeSlave.skill.vaginal = 0, $activeSlave.skill.whoring = 0, $activeSlave.skill.entertainment = 0, $activeSlave.skill.combat = 0, $activeSlave.fetish = "mindbroken", $activeSlave.amp = 1, $activeSlave.missingLegs = 3, $activeSlave.missingArms = 3, $activeSlave.voice = 0, $activeSlave.eyes = 1, $activeSlave.hears = 0>>
+		<<set $activeSlave.skill.anal = 0, $activeSlave.skill.oral = 0, $activeSlave.skill.vaginal = 0, $activeSlave.skill.whoring = 0, $activeSlave.skill.entertainment = 0, $activeSlave.skill.combat = 0, $activeSlave.fetish = "mindbroken", $activeSlave.missingLegs = 3, $activeSlave.missingArms = 3, $activeSlave.voice = 0, $activeSlave.eyes = 1, $activeSlave.hears = 0>>
+		<<run removeLimbs($activeSlave, "all")>>
 		<<goto "Starting Girls">>
 	<</link>>
 	//A living cocksleeve//
diff --git a/src/uncategorized/RESS.tw b/src/uncategorized/RESS.tw
index c7d7805985c..db1debce5c6 100644
--- a/src/uncategorized/RESS.tw
+++ b/src/uncategorized/RESS.tw
@@ -7855,11 +7855,8 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He
 		<<EventNameDelink $activeSlave>>
 		<<replace "#result">>
 			The simple thing to do would be to sedate $activeSlave.slaveName and haul $him to the remote surgery for $his punishment. That would deny $him the added weight of terror, however, and would stop your other slaves from learning by the sight of it. So, you restrain $him, pronounce judgment, and drag $his struggling, weeping form through the penthouse to the surgery. $activeSlave.slaveName is @@.mediumorchid;filled with implacable hatred@@ by this terrible punishment, and $his @@.red;health is damaged@@ by the major surgery. However, every single one of your other slaves not already obedient to you is @@.gold;utterly terrified@@ by the example set.
-			<<run surgeryAmp($activeSlave, "left arm")>>
-			<<run surgeryAmp($activeSlave, "left leg")>>
-			<<run surgeryAmp($activeSlave, "right arm")>>
-			<<run surgeryAmp($activeSlave, "right leg")>>
-			<<set $activeSlave.devotion -= 50, $activeSlave.trust -= 50, $activeSlave.health -= 40, $activeSlave.diet = "healthy", $activeSlave.amp = 1>>
+			<<set $activeSlave.devotion -= 50, $activeSlave.trust -= 50, $activeSlave.health -= 40, $activeSlave.diet = "healthy">>
+			<<run removeLimbs($activeSlave, "all")>>
 			<<set $slaves.forEach(function(s) { if (s.devotion <= 20) { s.trust -= 10; } })>>
 		<</replace>>
 	<</link>>
diff --git a/src/uncategorized/costsReport.tw b/src/uncategorized/costsReport.tw
index 8d78b14c051..d2ef863fe40 100644
--- a/src/uncategorized/costsReport.tw
+++ b/src/uncategorized/costsReport.tw
@@ -711,8 +711,8 @@ $researchLab.level > 0>>
 		<<set _individualCosts += 5>>
 	<</if>>
 	<<if ($slaves[$i].assignment != "work in the dairy" || $dairyRestraintsSetting < 2) && ($slaves[$i].assignment != "be confined in the arcade")>>
-		<<if ($slaves[$i].amp != 0)>>
-			<<if ($slaves[$i].amp == 1)>>
+		<<if (!hasAllNaturalLimbs()$slaves[$i]))>>
+			<<if (isAmputee($slaves[$i]))>>
 				<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Increased living expenses due to limblessness:</i>
 				@@.yellowgreen;<<print cashFormat($rulesCost)>>@@
 				<<set _individualCosts += $rulesCost>>
diff --git a/src/uncategorized/customSlave.tw b/src/uncategorized/customSlave.tw
index e2a6dd5b8c0..5fec60925a2 100644
--- a/src/uncategorized/customSlave.tw
+++ b/src/uncategorized/customSlave.tw
@@ -1236,28 +1236,82 @@ Skin tone: <span id = "skin">
 
 <br>
 
-<span id = "amputation">
-<<if $customSlave.amp == 1>>Limbless.
-<<else>>Limbed.
-<</if>>
+Left arm:
+<span id = "ampLA">
+	<<if hasLeftArm($customSlave)>>Yes
+	<<else>>No
+	<</if>>
 </span>
-<<link "Limbless">>
-	<<set $customSlave.amp = 1>>
-	<<set $customSlave.missingArms = 3>>
-	<<set $customSlave.missingLegs = 3>>
-	<<replace #amputation>>
-		Limbless.
+<<link "Remove">>
+	<<set $customSlave.arm.left = null>>
+	<<replace #ampLA>>
+		No
 	<</replace>>
 <</link>>
-|
-<<link "Limbed">>
-	<<set $customSlave.amp = 0>>
-	<<set $customSlave.missingArms = 0>>
-	<<set $customSlave.missingLegs = 0>>
-	<<replace #amputation>>
-		Limbed.
+<<link "Add">>
+	<<set $customSlave.arm.left = {type: 1}>>
+	<<replace #ampLA>>
+		Yes
 	<</replace>>
 <</link>>
+<br>
+Right arm:
+<span id = "ampRA">
+	<<if hasRightArm($customSlave)>>Yes
+	<<else>>No
+	<</if>>
+</span>
+<<link "Remove">>
+	<<set $customSlave.arm.right = null>>
+	<<replace #ampRA>>
+		No
+	<</replace>>
+<</link>>
+<<link "Add">>
+	<<set $customSlave.arm.right = {type: 1}>>
+	<<replace #ampRA>>
+		Yes
+	<</replace>>
+<</link>>
+<br>
+Left leg:
+<span id = "ampLL">
+	<<if hasLeftLeg($customSlave)>>Yes
+	<<else>>No
+	<</if>>
+</span>
+<<link "Remove">>
+	<<set $customSlave.leg.left = null>>
+	<<replace #ampLL>>
+		No
+	<</replace>>
+<</link>>
+<<link "Add">>
+	<<set $customSlave.leg.left = {type: 1}>>
+	<<replace #ampLL>>
+		Yes
+	<</replace>>
+<</link>>
+<br>
+Right leg:
+<span id = "ampRL">
+	<<if hasRightLeg($customSlave)>>Yes
+	<<else>>No
+	<</if>>
+</span>
+<<link "Remove">>
+	<<set $customSlave.leg.right = null>>
+	<<replace #ampRL>>
+		No
+	<</replace>>
+<</link>>
+<<link "Add">>
+	<<set $customSlave.leg.right = {type: 1}>>
+	<<replace #ampRL>>
+		Yes
+	<</replace>>
+<</link>>
+
 
 <br>
 <</if>>
diff --git a/src/uncategorized/multiImplant.tw b/src/uncategorized/multiImplant.tw
index 995590c9498..6f60535d638 100644
--- a/src/uncategorized/multiImplant.tw
+++ b/src/uncategorized/multiImplant.tw
@@ -1064,35 +1064,35 @@ You head down to your <<if $surgeryUpgrade == 1>>heavily upgraded and customized
 			<<else>>
 				<<if _p.id == "basicL">>
 					<<if hasAnyProstheticLimbs($activeSlave)>>
-						<<set $activeSlave.amp = -1, $activeSlave.missingArms = 0, $activeSlave.missingLegs = 0, $prostheticsConfig = "basicPLimbs">>
+						<<set attachProsthetic($activeSlave, "all", 2), $prostheticsConfig = "basicPLimbs">>
 						<<include "Prosthetics Configuration">>
 					<<else>>
 						//Since $he already has more advanced prosthetic limbs attached the <<= setup.prosthetics.basicL.name>> will be put into storage.//
 					<</if>>
 				<<elseif _p.id == "sexL">>
 					<<if (getLimbCount($activeSlave, 3) + getLimbCount($activeSlave, 4) + getLimbCount($activeSlave, 5) + getLimbCount($activeSlave, 6)) === 0>>
-						<<set $activeSlave.amp = -2, $activeSlave.missingArms = 0, $activeSlave.missingLegs = 0, $prostheticsConfig = "sexPLimbs">>
+						<<set attachProsthetic($activeSlave, "all", 3), $prostheticsConfig = "sexPLimbs">>
 						<<include "Prosthetics Configuration">>
 					<<else>>
 						//Since $he already has advanced prosthetic limbs attached the <<= setup.prosthetics.sexL.name>> will be put into storage.//
 					<</if>>
 				<<elseif _p.id == "beautyL">>
 					<<if (getLimbCount($activeSlave, 3) + getLimbCount($activeSlave, 4) + getLimbCount($activeSlave, 5) + getLimbCount($activeSlave, 6)) === 0>>
-						<<set $activeSlave.amp = -3, $activeSlave.missingArms = 0, $activeSlave.missingLegs = 0, $prostheticsConfig = "beautyPLimbs">>
+						<<set attachProsthetic($activeSlave, "all", 4), $prostheticsConfig = "beautyPLimbs">>
 						<<include "Prosthetics Configuration">>
 					<<else>>
 						//Since $he already has advanced prosthetic limbs attached the <<= setup.prosthetics.beautyL.name>> will be put into storage.//
 					<</if>>
 				<<elseif _p.id == "combatL">>
 					<<if (getLimbCount($activeSlave, 3) + getLimbCount($activeSlave, 4) + getLimbCount($activeSlave, 5) + getLimbCount($activeSlave, 6)) === 0>>
-						<<set $activeSlave.amp = -4, $activeSlave.missingArms = 0, $activeSlave.missingLegs = 0, $prostheticsConfig = "combatPLimbs">>
+						<<set attachProsthetic($activeSlave, "all", 5), $prostheticsConfig = "combatPLimbs">>
 						<<include "Prosthetics Configuration">>
 					<<else>>
 						//Since $he already has advanced prosthetic limbs attached the <<= setup.prosthetics.combatL.name>> will be put into storage.//
 					<</if>>
 				<<else>>
 					<<if $activeSlave.PLimb == 2>>
-						<<set $activeSlave.amp = -5, $activeSlave.missingArms = 0, $activeSlave.missingLegs = 0, $prostheticsConfig = "cyberPLimbs">>
+						<<set attachProsthetic($activeSlave, "all", 6), $prostheticsConfig = "cyberPLimbs">>
 						<<include "Prosthetics Configuration">>
 					<<else>>
 						//Since $he must have <<= addA(setup.prosthetics.interfaceP2.name)>> installed to attach cybernetic limbs the <<= setup.prosthetics.cyberneticL.name>> will be put into storage.//
diff --git a/src/uncategorized/reRecruit.tw b/src/uncategorized/reRecruit.tw
index e9a1a2c28b6..185202b637f 100644
--- a/src/uncategorized/reRecruit.tw
+++ b/src/uncategorized/reRecruit.tw
@@ -1715,7 +1715,7 @@
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
 <<set $activeSlave = GenerateNewSlave("XX")>>
-<<set $activeSlave.amp = -1>>
+<<run attachProsthetic($activeSlave, "all", 2)>>
 <<set $activeSlave.origin = "You helped free $him from a POW camp after being abandoned by $his country, leaving $him deeply indebted to you.">>
 <<set $activeSlave.devotion = random(0,20)>>
 <<set $activeSlave.trust = random(0,20)>>
@@ -1793,9 +1793,7 @@
 <<set $activeSlave.weight = random(-11 -30)>>
 <<set $activeSlave.waist = random(-11, -40)>>
 <<set $activeSlave.skill.combat = 1>>
-<<set $activeSlave.amp = -5>>
-<<set $activeSlave.missingArms = 0>>
-<<set $activeSlave.missingLegs = 0>>
+<<run attachProsthetic($activeSlave, "all", 6)>>
 <<set $activeSlave.teeth = "pointy">>
 <<set $activeSlave.muscles = random(30,70)>>
 <<set $activeSlave.height = Math.round(Height.random($activeSlave, {skew: 3, spread: .2, limitMult: [1, 4]}))>>
@@ -2407,7 +2405,8 @@ While digging through the database of a POW camp for anything of value, you find
 <br>Upon $his inevitable arrival in your penthouse, you see
 <<if $seeExtreme == 1>>
 	the traces of $his wounds, that $he has been greatly modified for war, and that $he had been raped, repeatedly, despite $his powerful body.
-	<<set $activeSlave.amp = -5, $activeSlave.missingArms = 0, $activeSlave.missingLegs = 0, $activeSlave.teeth = "pointy", $activeSlave.muscles = random(30,70), $activeSlave.height = Math.round(Height.random($activeSlave, {skew: 3, spread: .2, limitMult: [1, 4]})), $activeSlave.chem = 1000, $activeSlave.attrXX = 0, $activeSlave.attrXY = 0>>
+	<<set $activeSlave.teeth = "pointy", $activeSlave.muscles = random(30,70), $activeSlave.height = Math.round(Height.random($activeSlave, {skew: 3, spread: .2, limitMult: [1, 4]})), $activeSlave.chem = 1000, $activeSlave.attrXX = 0, $activeSlave.attrXY = 0>>
+	<<run attachProsthetic($activeSlave, "all", 6)>>
 <<else>>
 	the traces of $his wounds, that $he had been left bound long enough for $his body to atrophy, and that $he had been raped, repeatedly.
 <</if>>
diff --git a/src/uncategorized/reRelativeRecruiter.tw b/src/uncategorized/reRelativeRecruiter.tw
index d541a8e8b55..6cd1878a305 100644
--- a/src/uncategorized/reRelativeRecruiter.tw
+++ b/src/uncategorized/reRelativeRecruiter.tw
@@ -378,10 +378,7 @@
 <<set $activeSlave.devotion = random(25,45)>>
 <<set $activeSlave.trust = random(-15,15)>>
 <<set $activeSlave.ageImplant = 0>>
-<<set $activeSlave.amp = 0>>
-<<set $activeSlave.missingArms = 0>>
-<<set $activeSlave.missingLegs = 0>>
-<<set $activeSlave.heels = 0>>
+<<run removeLimbs($activeSlave, "all")>>
 <<if $activeSlave.career != "a Futanari Sister">><<set $activeSlave.career = "a slave">><</if>>
 <<set $activeSlave.relationship = 0>>
 <<set $activeSlave.relationshipTarget = 0>>
diff --git a/src/uncategorized/saLiveWithHG.tw b/src/uncategorized/saLiveWithHG.tw
index 764337b9387..eb0b93ebf83 100644
--- a/src/uncategorized/saLiveWithHG.tw
+++ b/src/uncategorized/saLiveWithHG.tw
@@ -923,7 +923,8 @@
 			<<if ($slaves[$i].health > 40)>>
 				<<if hasAnyNaturalLimbs($slaves[$i]) && ($slaves[$i].devotion < -20)>>
 					$HeadGirl.slaveName decides to extract the ultimate in sadistic pleasure from $slaves[$i].slaveName, and directs the autosurgery to @@.red;amputate $his <<if hasAnyArms($slaves[$i])>>arm<<if hasBothArms($slaves[$i])>>s<</if>> <<if hasAnyLegs($slaves[$i])>>and<</if>><</if>><<if hasAnyLegs($slaves[$i])>> leg<<if hasBothLegs($slaves[$i])>>s<</if>><</if>>.@@ _He2 carefully describes the entire process to the sobbing slave @@.gold;in minute detail@@ before allowing $him to be sedated.
-					<<set $slaves[$i].devotion -= 20, $slaves[$i].trust -= 20, $slaves[$i].health -= 40, $slaves[$i].amp = 1, $activeSlave.missingArms = 3, $activeSlave.missingLegs = 3>>
+					<<set $slaves[$i].devotion -= 20, $slaves[$i].trust -= 20, $slaves[$i].health -= 40>>
+					<<run removeLimbs($slaves[$i], "all")>>
 				<</if>>
 				<<if ($slaves[$i].balls > 0) && ($slaves[$i].devotion <= 50)>>
 					$HeadGirl.slaveName decides to have some once-only sadistic pleasure, and carefully straps $slaves[$i].slaveName into the surgery until $he's completely immobile. $HeadGirl.slaveName situates <<if canSee($slaves[$i])>>a mirror so the terrified $girl can see $his own crotch<<else>>$him so that the terrified $girl can sense what part of $his body is being manipulated even through the anesthetics<</if>>, gets behind $him, and carefully sodomizes $him during the entire process of @@.red;castration.@@ $slaves[$i].slaveName is anesthetized down there and can't feel the brutal anal rape, but $his abuser orgasms repeatedly to $him @@.gold;weeping at the <<if canSee($slaves[$i])>>sight<<else>>muted sensation<</if>> of being gelded and raped at once.@@
diff --git a/src/uncategorized/seCustomSlaveDelivery.tw b/src/uncategorized/seCustomSlaveDelivery.tw
index cd3eda5b7a0..2b6824ba761 100644
--- a/src/uncategorized/seCustomSlaveDelivery.tw
+++ b/src/uncategorized/seCustomSlaveDelivery.tw
@@ -195,9 +195,8 @@
 <<set $activeSlave.hears = $customSlave.hears>>
 <<set $activeSlave.smells = $customSlave.smells>>
 <<set $activeSlave.tastes = $customSlave.tastes>>
-<<set $activeSlave.amp = $customSlave.amp>>
-<<set $activeSlave.missingArms = $customSlave.missingArms>>
-<<set $activeSlave.missingLegs = $customSlave.missingLegs>>
+<<set $activeSlave.arm = $customSlave.arm>>
+<<set $activeSlave.leg = $customSlave.leg>>
 <<set $activeSlave.weekAcquired = $week>>
 <<set $activeSlave.origin = "You purchased $him by special order.">>
 <<set $activeSlave.career = "a slave">>
diff --git a/src/uncategorized/slaveShelter.tw b/src/uncategorized/slaveShelter.tw
index 59fedd55e99..98ed666cb53 100644
--- a/src/uncategorized/slaveShelter.tw
+++ b/src/uncategorized/slaveShelter.tw
@@ -64,9 +64,7 @@ You contact the Slave Shelter to review the profile of the slave the Shelter is
 	<<set $shelterSlave = $activeSlave>>
 	<<set $shelterSlave.origin = "It's not clear why $his previous owner cut $his arms and legs off.">>
 	<<set $shelterSlave.career = "a slave">>
-	<<set $shelterSlave.amp = 1>>
-	<<set $shelterSlave.missingArms = 3>>
-	<<set $shelterSlave.missingLegs = 3>>
+	<<removeLimbs($shelterSlave, "all")>>
 	<<set $shelterSlave.devotion = random(-100,-90)>>
 	<<set $shelterSlave.trust = random(-100,-90)>>
 	<<set $shelterSlave.health = random(-80,-60)>>
diff --git a/src/uncategorized/slaveStats.tw b/src/uncategorized/slaveStats.tw
index 4d7f2f64cc4..0a9a57370fc 100644
--- a/src/uncategorized/slaveStats.tw
+++ b/src/uncategorized/slaveStats.tw
@@ -127,7 +127,8 @@ slaveName: $activeSlave.slaveName	   /* TODO: figure out why this is being inden
 <br>waist: $activeSlave.waist
 <br>corsetPiercing: $activeSlave.corsetPiercing
 <br>PLimb: $activeSlave.PLimb
-<br>amp: $activeSlave.amp
+<br>arm: $activeSlave.arms
+<br>leg: $activeSlave.leg
 <br>heels: $activeSlave.heels
 <br>voice: $activeSlave.voice
 <br>voiceImplant: $activeSlave.voiceImplant
diff --git a/src/uncategorized/surgeryDegradation.tw b/src/uncategorized/surgeryDegradation.tw
index caed106e789..89eb998fc5a 100644
--- a/src/uncategorized/surgeryDegradation.tw
+++ b/src/uncategorized/surgeryDegradation.tw
@@ -239,9 +239,7 @@ As the remote surgery's long recovery cycle completes,
 	<br><br>The suit includes a network of small tubes filled with hydraulic fluid, and tiny pumps to move it around. This is necessary to keep the Fuckdoll's internal temperature stable, but it can also be used to restrict $his movements. The suit is doing so now; the Fuckdoll is desperately attempting to move, but the suit won't let $him.
 	<<if hasAnyProstheticLimbs($activeSlave)>>
 		Its P-Limbs have been removed, since they aren't compatible with Fuckdoll suits.
-		<<set $activeSlave.amp = 1>>
-		<<set $activeSlave.missingArms = 3>>
-		<<set $activeSlave.missingLegs = 3>>
+		<<run removeLimbs($activeSlave, "all")>>
 	<</if>>
 	<<if isAmputee($activeSlave)>>
 		The Fuckdoll's limbless torso rocks back and forth slightly.
diff --git a/src/utility/slaveCreationWidgets.tw b/src/utility/slaveCreationWidgets.tw
index eff2e46f99e..42dc8766749 100644
--- a/src/utility/slaveCreationWidgets.tw
+++ b/src/utility/slaveCreationWidgets.tw
@@ -800,7 +800,10 @@
 			<<set $activeSlave.devotion = random(96,100), $activeSlave.trust = random(96, 100), $activeSlave.energy = random(96,100), $activeSlave.intelligence = 70, $activeSlave.skill.combat = 1>>
 			<<set $activeSlave.career = either("a bodyguard", "a bouncer", "a bounty hunter", "a gang member", "a law enforcement officer", "a mercenary", "a prison guard", "a private detective", "a revolutionary", "a security guard", "a soldier", "a street thug", "a transporter", "an assassin", "an enforcer", "in a militia")>>
 		<<case "Bodyguard">>
-			<<set $activeSlave.devotion = 90, $activeSlave.muscles = random(30,70), $activeSlave.height = Math.round(Height.random($activeSlave, {skew: 3, spread: .2, limitMult: [1, 4]})), $activeSlave.weight = random(-10,10), $activeSlave.teeth = either("normal", "pointy"), $activeSlave.amp = either(-4, -4, 0, 0, 0, 0), $activeSlave.skill.combat = 1>>
+			<<set $activeSlave.devotion = 90, $activeSlave.muscles = random(30,70), $activeSlave.height = Math.round(Height.random($activeSlave, {skew: 3, spread: .2, limitMult: [1, 4]})), $activeSlave.weight = random(-10,10), $activeSlave.teeth = either("normal", "pointy"), $activeSlave.skill.combat = 1>>
+			<<if jsRandom(0, 2) === 0>>
+				<<run attachProsthetic($activeSlave, "all", 5)>>
+			<</if>>
 			<<set $activeSlave.career = either("a bodyguard", "a kunoichi", "a law enforcement officer", "a military brat", "a revolutionary", "a soldier", "a transporter", "an assassin", "in a militia")>>
 		<<case "Wardeness">>
 			<<set $activeSlave.energy = random(80,100), $activeSlave.sexualFlaw = either("malicious", "none", "none", "none", "none"), $activeSlave.fetish = "sadist", $activeSlave.fetishStrength = 100, $activeSlave.muscles = random(50,80), $activeSlave.skill.combat = 1>>
-- 
GitLab