From 2b6fbb931ec4ff045790796dbc87dd0c1214e5c8 Mon Sep 17 00:00:00 2001
From: Arkerthan <arkerthan@gmail.com>
Date: Wed, 31 Jul 2019 12:46:46 +0200
Subject: [PATCH] convert limb access in src/facilities/nursery

---
 src/facilities/nursery/childInteract.tw       |  10 +-
 .../nursery/longChildDescription.tw           | 116 +++++++++---------
 src/js/slaveStatsChecker.js                   |  46 ++++++-
 3 files changed, 108 insertions(+), 64 deletions(-)

diff --git a/src/facilities/nursery/childInteract.tw b/src/facilities/nursery/childInteract.tw
index 6d5364c2c05..7e1dfdf4ccd 100644
--- a/src/facilities/nursery/childInteract.tw
+++ b/src/facilities/nursery/childInteract.tw
@@ -93,7 +93,7 @@
 		<</if>>
 	<</if>>
 	</span>
-	<<if ($activeChild.amp == 0 || $activeChild.amp == -3 || $activeChild.amp == -5) && $PC.dick == 1>>
+	<<if (hasBothLegs($activeChild)) && $PC.dick == 1>>
 		| <<link "Get a footjob">><<replace "#miniscene">><<set $childSex = 1>><<include "FFeet">><br>&nbsp;&nbsp;&nbsp;&nbsp;<</replace>><</link>>
 	<</if>>
 
@@ -263,7 +263,7 @@
 	<<if ($activeChild.rivalryTarget != 0) && canWalk($activeChild)>>
 		| <<link "Abuse $his rival with $him">><<replace "#miniscene">><<set $childSex = 1>><<include "FRival">><br>&nbsp;&nbsp;&nbsp;&nbsp;<</replace>><</link>>
 	<</if>>
-	<<if ($activeChild.fetish != "mindbroken") && (($activeChild.amp != 1) || ($activeChild.voice != 0)) && $activeChild.accent != 4>>
+	<<if ($activeChild.fetish != "mindbroken") && ((!isAmputee($activeChild)) || ($activeChild.voice != 0)) && $activeChild.accent != 4>>
 		| <<link "Ask $him about $his feelings">><<replace "#miniscene">><<set $childSex = 1>><<include "FFeelings">><br>&nbsp;&nbsp;&nbsp;&nbsp;<</replace>><</link>>
 	<</if>>
 	<<if $activeChild.devotion >= 100 && $activeChild.relationship < 0 && $activeChild.relationship > -3>>
@@ -875,9 +875,9 @@ Hormones: <strong><span id="hormones">
 		| <<link "Herm hormone blend">><<set $activeChild.diet = "XXY">><<replace "#diet">>$activeChild.diet<</replace>><</link>>
 	<</if>>
 <</if>>
-<<if ($activeChild.muscles <= 95) && $activeChild.amp != 1>>
+<<if ($activeChild.muscles <= 95) && !isAmputee($activeChild)>>
 	| <<link "Build muscle">><<set $activeChild.diet = "muscle building">><<replace "#diet">>$activeChild.diet<</replace>><</link>>
-<<elseif $activeChild.muscles > 95 && $activeChild.amp != 1>>
+<<elseif $activeChild.muscles > 95 && !isAmputee($activeChild)>>
 	| //$He is maintaining $his enormous musculature//
 <<else>>
 	| //$He has no limbs and thus can't effectively build muscle//
@@ -941,7 +941,7 @@ Typical reward: ''<span id="standardReward">$activeChild.standardReward</span>.'
 <br>Non-assignment orgasm rules: ''<span id="releaseRules">$activeChild.releaseRules</span>.''
 <<link "Permit masturbation and interslave sex">><<set $activeChild.releaseRules = "permissive">><<replace "#releaseRules">>$activeChild.releaseRules<</replace>><</link>> |
 <<link "Let $him get off with other slaves">><<set $activeChild.releaseRules = "sapphic">><<replace "#releaseRules">>$activeChild.releaseRules<</replace>><</link>> |
-<<if $activeChild.amp != 1 && $activeChild.fuckdoll == 0 && $activeChild.fetish != "mindbroken">>
+<<if !isAmputee($activeChild) && $activeChild.fuckdoll == 0 && $activeChild.fetish != "mindbroken">>
 	<<link "Restrict $him to masturbation only">><<set $activeChild.releaseRules = "masturbation">><<replace "#releaseRules">>$activeChild.releaseRules<</replace>><</link>> |
 <</if>>
 <<link "Only with you">><<set $activeChild.releaseRules = "restrictive">><<replace "#releaseRules">>$activeChild.releaseRules<</replace>><</link>> |
diff --git a/src/facilities/nursery/longChildDescription.tw b/src/facilities/nursery/longChildDescription.tw
index 7ce18eb896f..70c1af3ac77 100644
--- a/src/facilities/nursery/longChildDescription.tw
+++ b/src/facilities/nursery/longChildDescription.tw
@@ -1081,17 +1081,17 @@ $He is
 	<</if>>
 <</if>>
 
-<<if $activeChild.amp == 0>>
+<<if hasAnyNaturalArms($activeChild)>>
 	<<if $activeChild.weight > 190>>
-		$He has hugely thick arms with sagging fat rolls and
+		$He has <<if !hasBothArms($activeChild)>>a <</if>>hugely thick arm<<if hasBothArms($activeChild)>>s<</if>> with sagging fat rolls and
 	<<elseif $activeChild.weight > 160>>
-		$He has thick arms with drooping fat folds and
+		$He has <<if !hasBothArms($activeChild)>>a <</if>>thick arm<<if hasBothArms($activeChild)>>s<</if>> with drooping fat folds and
 	<<elseif $activeChild.weight > 130>>
-		$He has plump arms with
+		$He has <<if !hasBothArms($activeChild)>>a <</if>>plump arm<<if hasBothArms($activeChild)>>s<</if>> with
 	<<elseif $activeChild.weight > 97>>
-		$He has chubby arms with
+		$He has <<if !hasBothArms($activeChild)>>a <</if>>chubby arm<<if hasBothArms($activeChild)>>s<</if>> with
 	<<else>>
-		$He has normal arms with
+		$He has <<if !hasBothArms($activeChild)>>a <</if>>normal arm<<if hasBothArms($activeChild)>>s<</if>> with
 	<</if>>
 	<<if $activeChild.muscles > 95>>
 		huge muscles<<if $activeChild.weight > 95>> hidden beneath $his soft flesh<</if>>.
@@ -1111,7 +1111,7 @@ $He is
 	<</if>>
 
 	<<if $activeChild.skill.combat > 0>>
-		$He is @@.aquamarine;skilled at combat:@@ $he is comfortable with the use of modern firearms and edged weapons, and $his hands <<if $activeChild.amp == -4>>would be deadly weapons even if they weren't full of deadly weapons already<<elseif $activeChild.amp > 0>>would be deadly weapons if $he had any<<else>>are deadly weapons<</if>>.
+		$He is @@.aquamarine;skilled at combat:@@ $he is comfortable with the use of modern firearms and edged weapons, and $his hands <<if !hasBothArms($activeChild)>>would be deadly weapons if $he had <<if !hasAnyArms($activeChild)>>any<<else>>more than one<</if>><<else>><<if getArmCount($activeChild, 5) + getArmCount($activeChild, 6) > 1>>would be deadly weapons even if they weren't full of deadly weapons already<<else>>are deadly weapons<</if>>.
 	<</if>>
 <</if>>
 
@@ -1123,19 +1123,19 @@ $He is
 
 <<pregnancyDescription>>
 
-<<if $activeChild.amp == 0>>
+<<if hasAnyNaturalLegs($activeChild)>>
 	<<if $activeChild.weight > 190>>
-		$He has extremely fat legs with immense soft, rather uneven thighs and
+		$He has <<if !hasBothLegs($activeChild)>>an <</if>>extremely fat leg<<if hasBothLegs($activeChild)>>s<</if>> with <<if !hasBothLegs($activeChild)>>an <</if>>immense soft, rather uneven thigh<<if hasBothLegs($activeChild)>>s<</if>> and
 	<<elseif $activeChild.weight > 160>>
-		$He has very fat legs with massively thick, soft, somewhat uneven thighs and
+		$He has <<if !hasBothLegs($activeChild)>>a <</if>>very fat leg<<if hasBothLegs($activeChild)>>s<</if>> with <<if !hasBothLegs($activeChild)>>a <</if>>massively thick, soft, somewhat uneven thigh<<if hasBothLegs($activeChild)>>s<</if>> and
 	<<elseif $activeChild.weight > 130>>
-		$He has fat legs with hugely thick, soft thighs and
+		$He has <<if !hasBothLegs($activeChild)>>a <</if>>fat leg<<if hasBothLegs($activeChild)>>s<</if>> with <<if !hasBothLegs($activeChild)>>a <</if>>hugely thick, soft thigh<<if hasBothLegs($activeChild)>>s<</if>> and
 	<<elseif $activeChild.weight > 97>>
-		$He has fat legs with thick, soft thighs and
+		$He has <<if !hasBothLegs($activeChild)>>a <</if>>fat leg<<if hasBothLegs($activeChild)>>s<</if>> with <<if !hasBothLegs($activeChild)>>a <</if>>thick, soft thigh<<if hasBothLegs($activeChild)>>s<</if>> and
 	<<elseif $activeChild.weight > 95>>
-		$He has normal legs with thick, soft thighs and
+		$He has <<if !hasBothLegs($activeChild)>>a <</if>>normal leg<<if hasBothLegs($activeChild)>>s<</if>> with <<if !hasBothLegs($activeChild)>>a <</if>>thick, soft thigh<<if hasBothLegs($activeChild)>>s<</if>> and
 	<<else>>
-		$He has relatively normal legs and thighs with
+		$He has <<if !hasBothLegs($activeChild)>>a <</if>>relatively normal leg<<if hasBothLegs($activeChild)>>s<</if>> and thigh<<if hasBothLegs($activeChild)>>s<</if>> with
 	<</if>>
 	<<if $activeChild.muscles > 95>>
 		huge muscles<<if $activeChild.weight > 95>> hidden beneath $his soft flab<</if>>.
@@ -1260,9 +1260,9 @@ $He is
 	<<elseif $activeChild.underArmHStyle == "shaved">>
 		$His armpits appear hairless, but closer inspection reveals light, $activeChild.underArmHColor stubble.
 	<<elseif $activeChild.underArmHStyle == "neat">>
-		$His armpit hair is neatly trimmed <<if $activeChild.amp == 1>>since it is always in full view<<else>>to not be visible unless $he lifts $his arms<</if>>.
+		$His armpit hair is neatly trimmed <<if !hasBothArms($activeChild)>>since <<if hasAnyArms($activeChild)>>at least half<<else>>it<</if>> is always in full view<<else>>to not be visible unless $he lifts $his arms<</if>>.
 	<<elseif $activeChild.underArmHStyle == "bushy">>
-		$His $activeChild.underArmHColor armpit hair has been allowed to grow freely, <<if $activeChild.amp == 1>>creating two bushy patches under where $his arms used to be<<else>>it can be seen poking out from under $his arms at all times<</if>>.
+		$His $activeChild.underArmHColor armpit hair has been allowed to grow freely, <<if !hasAnyArms($activeChild)>>creating two bushy patches under where $his arms used to be<<else>>so it can be seen poking out from under $his arm<<if hasBothArms($activeChild)>>s<</if>> at all times<</if>>.
 	<</if>>
 <</if>>
 
@@ -1297,14 +1297,14 @@ $He is
 	<<if $activeChild.fuckdoll == 0>>
 		<<collarDescription>>
 		<<if ($activeChild.relationship > 4)>>
-			<<if ($activeChild.amp != 1)>>
-				$He has a simple gold band on the little finger of $his left hand.
+			<<if (hasAnyArms($activeChild))>>
+				$He has a simple gold band on the little finger of $his <<if !hasLeftArm($activeChild)>>right<<else>>left<</if>> hand.
 			<<else>>
 				$He has a simple gold band on a length of chain around $his neck.
 			<</if>>
 		<<elseif ($activeChild.relationship == -3)>>
-			<<if ($activeChild.amp != 1)>>
-				$He has a simple steel band on the little finger of $his left hand.
+			<<if (hasAnyArms($activeChild))>>
+				$He has a simple steel band on the little finger of $his <<if !hasLeftArm($activeChild)>>right<<else>>left<</if>> hand.
 			<<else>>
 				$He has a simple steel band on a length of cord around $his neck.
 			<</if>>
@@ -1374,49 +1374,49 @@ $He is
 			$He smells of sexual fluids and $his breasts are slightly swollen. The fertility drugs have $him ready to be impregnated.
 		<</if>>
 	<<case "intensive breast injections">>
-		<<if ($activeChild.amp != 1)>>$He massages $his tits uncomfortably<<else>>$He squirms under the unfamiliar weight on $his chest<</if>>. The A-HGH must be having an effect, painfully stretching $his breasts as the mammary and adipose tissue underneath grows explosively.
+		<<if (hasAnyArms($activeChild))>>$He massages $his tits uncomfortably<<else>>$He squirms under the unfamiliar weight on $his chest<</if>>. The A-HGH must be having an effect, painfully stretching $his breasts as the mammary and adipose tissue underneath grows explosively.
 	<<case "hyper breast injections">>
-		<<if ($activeChild.amp != 1)>>$He massages $his tits uncomfortably<<else>>$He squirms under the unfamiliar weight on $his chest<</if>>. The HA-HGH must be having an effect, painfully stretching $his breasts as the mammary and adipose tissue underneath grows explosively.
+		<<if (hasAnyArms($activeChild))>>$He massages $his tits uncomfortably<<else>>$He squirms under the unfamiliar weight on $his chest<</if>>. The HA-HGH must be having an effect, painfully stretching $his breasts as the mammary and adipose tissue underneath grows explosively.
 	<<case "intensive butt injections">>
-		<<if ($activeChild.amp != 1)>>$He massages $his butt uncomfortably<<else>>$He squirms against the unfamiliar weight on $his backside<</if>>. The A-HGH must be having an effect, painfully stretching $his buttocks as the muscular and adipose tissue underneath grows explosively.
+		<<if (hasAnyArms($activeChild))>>$He massages $his butt uncomfortably<<else>>$He squirms against the unfamiliar weight on $his backside<</if>>. The A-HGH must be having an effect, painfully stretching $his buttocks as the muscular and adipose tissue underneath grows explosively.
 	<<case "hyper butt injections">>
-		<<if ($activeChild.amp != 1)>>$He massages $his butt uncomfortably<<else>>$He squirms against the unfamiliar weight on $his backside<</if>>. The HA-HGH must be having an effect, painfully stretching $his buttocks as the muscular and adipose tissue underneath grows explosively.
+		<<if (hasAnyArms($activeChild))>>$He massages $his butt uncomfortably<<else>>$He squirms against the unfamiliar weight on $his backside<</if>>. The HA-HGH must be having an effect, painfully stretching $his buttocks as the muscular and adipose tissue underneath grows explosively.
 	<<case "intensive penis enhancement">>
-		<<if ($activeChild.amp != 1)>>$He massages $his <<if ($activeChild.dick > 0)>>dick<<else>>clit<</if>> uncomfortably<<else>>$He squirms against the unfamiliar weight in $his <<if ($activeChild.dick > 0)>>dick<<else>>clit<</if>><</if>>. The A-HGH must be having an effect, painfully lengthening and thickening $his <<if ($activeChild.dick > 0)>>dick<<else>>clit<</if>>.
+		<<if (hasAnyArms($activeChild))>>$He massages $his <<if ($activeChild.dick > 0)>>dick<<else>>clit<</if>> uncomfortably<<else>>$He squirms against the unfamiliar weight in $his <<if ($activeChild.dick > 0)>>dick<<else>>clit<</if>><</if>>. The A-HGH must be having an effect, painfully lengthening and thickening $his <<if ($activeChild.dick > 0)>>dick<<else>>clit<</if>>.
 	<<case "intensive testicle enhancement">>
-		<<if ($activeChild.amp != 1)>>$He massages $his balls uncomfortably<<else>>$He squirms in response to the pressure in $his balls<</if>> as a bead of cum forms on tip of $his dick. The A-HGH must be having an effect, painfully expanding $his testicles.
+		<<if (hasAnyArms($activeChild))>>$He massages $his balls uncomfortably<<else>>$He squirms in response to the pressure in $his balls<</if>> as a bead of cum forms on tip of $his dick. The A-HGH must be having an effect, painfully expanding $his testicles.
 	<<case "hyper penis enhancement">>
-		<<if ($activeChild.amp != 1)>>$He massages $his <<if ($activeChild.dick > 0)>>dick<<else>>clit<</if>> uncomfortably<<else>>$He squirms against the unfamiliar weight in $his <<if ($activeChild.dick > 0)>>dick<<else>>clit<</if>><</if>>. The HA-HGH must be having an effect, painfully lengthening and thickening $his <<if ($activeChild.dick > 0)>>dick<<else>>clit<</if>>.
+		<<if (hasAnyArms($activeChild))>>$He massages $his <<if ($activeChild.dick > 0)>>dick<<else>>clit<</if>> uncomfortably<<else>>$He squirms against the unfamiliar weight in $his <<if ($activeChild.dick > 0)>>dick<<else>>clit<</if>><</if>>. The HA-HGH must be having an effect, painfully lengthening and thickening $his <<if ($activeChild.dick > 0)>>dick<<else>>clit<</if>>.
 	<<case "hyper testicle enhancement">>
 		<<if $activeChild.balls < 20>>
-			<<if ($activeChild.amp != 1)>>$He massages $his balls uncomfortably<<else>>$He squirms in response to the pressure in $his balls<</if>> as cum drools from the tip of $his dick. The HA-HGH must be having an effect, painfully expanding $his testicles.
+			<<if (hasAnyArms($activeChild))>>$He massages $his balls uncomfortably<<else>>$He squirms in response to the pressure in $his balls<</if>> as cum drools from the tip of $his dick. The HA-HGH must be having an effect, painfully expanding $his testicles.
 		<<elseif $activeChild.balls >= 50>>
-			<<if ($activeChild.amp != 1)>>$He massages $his balls uncomfortably<<else>>$He squirms in response to the pressure in $his balls<</if>> as a thick cascade of cum pours from the tip of $his cock. The HA-HGH must be having an effect, painfully expanding $his testicles.
+			<<if (hasAnyArms($activeChild))>>$He massages $his balls uncomfortably<<else>>$He squirms in response to the pressure in $his balls<</if>> as a thick cascade of cum pours from the tip of $his cock. The HA-HGH must be having an effect, painfully expanding $his testicles.
 		<<elseif $activeChild.balls >= 37>>
-			<<if ($activeChild.amp != 1)>>$He massages $his balls uncomfortably<<else>>$He squirms in response to the pressure in $his balls<</if>> as cum freely flows from the tip of $his cock, pooling under $him. The HA-HGH must be having an effect, painfully expanding $his testicles.
+			<<if (hasAnyArms($activeChild))>>$He massages $his balls uncomfortably<<else>>$He squirms in response to the pressure in $his balls<</if>> as cum freely flows from the tip of $his cock, pooling under $him. The HA-HGH must be having an effect, painfully expanding $his testicles.
 		<<elseif $activeChild.balls >= 20>>
-			<<if ($activeChild.amp != 1)>>$He massages $his balls uncomfortably<<else>>$He squirms in response to the pressure in $his balls<</if>> as precum pools under $him. The HA-HGH must be having an effect, painfully expanding $his testicles.
+			<<if (hasAnyArms($activeChild))>>$He massages $his balls uncomfortably<<else>>$He squirms in response to the pressure in $his balls<</if>> as precum pools under $him. The HA-HGH must be having an effect, painfully expanding $his testicles.
 		<</if>>
 	<<case "female hormone injections" "male hormone injections">>
 		$He looks very ill, likely a side effect of the extreme hormone injections.
 	<<case "appetite suppressors">>
 		Despite how little $he has been eating lately, $his stomach barely growls at all.
 	<<case "penis atrophiers">>
-		<<if ($activeChild.amp != 1)>>$He massages $his dick uncomfortably<<else>>$He squirms in response to the discomfort in $his dick<</if>>. The A-TRPH must be having an effect, painfully causing $his body to atrophy $his dick.
+		<<if (hasAnyArms($activeChild))>>$He massages $his dick uncomfortably<<else>>$He squirms in response to the discomfort in $his dick<</if>>. The A-TRPH must be having an effect, painfully causing $his body to atrophy $his dick.
 	<<case "testicle atrophiers">>
-		<<if ($activeChild.amp != 1)>>$He massages $his balls uncomfortably<<else>>$He squirms in response to the discomfort in $his balls<</if>>. The A-TRPH must be having an effect, painfully causing $his body to atrophy $his testicles.
+		<<if (hasAnyArms($activeChild))>>$He massages $his balls uncomfortably<<else>>$He squirms in response to the discomfort in $his balls<</if>>. The A-TRPH must be having an effect, painfully causing $his body to atrophy $his testicles.
 	<<case "clitoris atrophiers">>
-		<<if ($activeChild.amp != 1)>>$He massages $his clit uncomfortably<<else>>$He squirms in response to the discomfort in $his clit<</if>>. The A-TRPH must be having an effect, painfully causing $his body to atrophy $his clitoris.
+		<<if (hasAnyArms($activeChild))>>$He massages $his clit uncomfortably<<else>>$He squirms in response to the discomfort in $his clit<</if>>. The A-TRPH must be having an effect, painfully causing $his body to atrophy $his clitoris.
 	<<case "labia atrophiers">>
-		<<if ($activeChild.amp != 1)>>$He massages $his pussy uncomfortably<<else>>$He squirms in response to the discomfort in $his cunt<</if>>. The A-TRPH must be having an effect, painfully causing $his body to atrophy $his labia.
+		<<if (hasAnyArms($activeChild))>>$He massages $his pussy uncomfortably<<else>>$He squirms in response to the discomfort in $his cunt<</if>>. The A-TRPH must be having an effect, painfully causing $his body to atrophy $his labia.
 	<<case "nipple atrophiers">>
-		<<if ($activeChild.amp != 1)>>$He massages $his nipples uncomfortably<<else>>$He squirms in response to the discomfort in $his breasts<</if>>. The A-TRPH must be having an effect, painfully causing $his body to atrophy $his nipples.
+		<<if (hasAnyArms($activeChild))>>$He massages $his nipples uncomfortably<<else>>$He squirms in response to the discomfort in $his breasts<</if>>. The A-TRPH must be having an effect, painfully causing $his body to atrophy $his nipples.
 	<<case "lip atrophiers">>
-		<<if ($activeChild.amp != 1)>>$He massages $his lips uncomfortably<<else>>$He licks $his lips uncomfortably<</if>>. The A-TRPH must be having an effect, painfully causing $his body to atrophy $his lips.
+		<<if (hasAnyArms($activeChild))>>$He massages $his lips uncomfortably<<else>>$He licks $his lips uncomfortably<</if>>. The A-TRPH must be having an effect, painfully causing $his body to atrophy $his lips.
 	<<case "breast redistributors">>
-		<<if ($activeChild.amp != 1)>>$He pinches at the fat building on $his belly and lets off a sigh<<else>>$He squirms under the added weight building on $his belly<</if>>. The RDST-D must be having an effect, encouraging $his body to redistribute $his breasts' adipose tissue to $his middle.
+		<<if (hasAnyArms($activeChild))>>$He pinches at the fat building on $his belly and lets off a sigh<<else>>$He squirms under the added weight building on $his belly<</if>>. The RDST-D must be having an effect, encouraging $his body to redistribute $his breasts' adipose tissue to $his middle.
 	<<case "butt redistributors">>
-		<<if ($activeChild.amp != 1)>>$He pinches at the fat building on $his belly and lets off a sigh<<else>>$He squirms under the added weight building on $his belly<</if>>. The RDST-D must be having an effect, encouraging $his body to redistribute $his buttock's adipose tissue to $his middle.
+		<<if (hasAnyArms($activeChild))>>$He pinches at the fat building on $his belly and lets off a sigh<<else>>$He squirms under the added weight building on $his belly<</if>>. The RDST-D must be having an effect, encouraging $his body to redistribute $his buttock's adipose tissue to $his middle.
 	<<case "sag-B-gone">>
 		$His breasts are shiny from the layer of anti-sag cream rubbed onto them. They might be a little perkier, or not.
 	<<default>>
@@ -1424,23 +1424,23 @@ $He is
 	<<if $activeChild.aphrodisiacs > 0 || $activeChild.inflationType == "aphrodisiacs">>
 		<<if $activeChild.inflationType == "aphrodisiacs">>
 			$He's literally full of
-			<<if ($activeChild.amp == 1)>>
+			<<if (!hasAnyArms($activeChild))>>
 				aphrodisiacs, but is an amputee, so $he cannot touch $himself. $He writhes with extreme sexual frustration, desperately trying to relieve $himself, but only managing to stir up the aphrodisiacs contained in $his gut, strengthening their effects even more.
-			<<elseif ($activeChild.chastityVagina)>>
+			<<elseif ($activeChild.chastityAnus) && ($activeChild.chastityPenis) && ($activeChild.chastityVagina)>>
 				aphrodisiacs, but is wearing a chastity belt and cannot touch $himself. $He writhes with extreme sexual frustration, desperately trying to relieve $himself, but only managing to stir up the aphrodisiacs contained in $his gut, strengthening their effects even more.
 			<<elseif ($activeChild.releaseRules == "permissive" || $activeChild.releaseRules == "masturbation") && ($activeChild.dick != 0) && ($activeChild.vagina == -1)>>
-				aphrodisiacs and is allowed to masturbate, so as $he stands before you $he rubs $his shaft with one hand while $he fingers $his anus with the other.<<if canPenetrate($activeChild)>> $His cock is painfully erect.<</if>> $His frantic masturbation forces $his distended middle to jiggle obscenely, stirring up the aphrodisiacs contained in $his gut and strengthening their effects even more.
+				aphrodisiacs and is allowed to masturbate, so as $he stands before you $he rubs $his shaft with <<if (hasBothArms($activeChild))>>one hand while $he fingers $his anus with the other<<else>>$his hand<</if>>.<<if canPenetrate($activeChild)>> $His cock is painfully erect.<</if>> $His frantic masturbation forces $his distended middle to jiggle obscenely, stirring up the aphrodisiacs contained in $his gut and strengthening their effects even more.
 			<<elseif ($activeChild.releaseRules == "permissive" || $activeChild.releaseRules == "masturbation") && ($activeChild.dick != 0)>>
-				aphrodisiacs and is allowed to masturbate, so as $he stands before you $he rubs $his shaft and pussy with one hand while $he fingers $his anus with the other.<<if canPenetrate($activeChild)>> $His cock is painfully erect.<</if>> $His frantic masturbation forces $his distended middle to jiggle obscenely, stirring up the aphrodisiacs contained in $his gut and strengthening their effects even more.
+				aphrodisiacs and is allowed to masturbate, so as $he stands before you $he rubs $his shaft and pussy with <<if (hasBothArms($activeChild))>>one hand while $he fingers $his anus with the other<<else>>$his hand<</if>>.<<if canPenetrate($activeChild)>> $His cock is painfully erect.<</if>> $His frantic masturbation forces $his distended middle to jiggle obscenely, stirring up the aphrodisiacs contained in $his gut and strengthening their effects even more.
 			<<elseif ($activeChild.releaseRules == "permissive" || $activeChild.releaseRules == "masturbation") && ($activeChild.vagina == -1)>>
-				aphrodisiacs, has<<if $seeDicks > 0>> no penis and<</if>> no vagina, and is not allowed to masturbate, so as $he stands before you $he
+				aphrodisiacs, has<<if $seeDicks > 0>> no penis and<</if>> no vagina, and is allowed to masturbate, so as $he stands before you $he
 				<<if $activeChild.anus == 0>>
 					plays with a nipple with one hand while furiously rubbing $his virgin anus and the sensitive perineum beneath it with the other, desperately trying to get $himself off. $His frantic attempts force $his distended middle to jiggle obscenely, stirring up the aphrodisiacs contained in $his gut and strengthening their effects even more.
 				<<else>>
-					<<if $activeChild.anus > 2>>$his entire hand, formed into a beak shape,<<elseif $activeChild.anus > 1>>two fingers<<else>>a finger<</if>> to fuck $his own ass. $His frantic attempts force $his distended middle to jiggle obscenely, stirring up the aphrodisiacs contained in $his gut and strengthening their effects even more.
+					uses <<if $activeChild.anus > 2>>$his entire hand, formed into a beak shape,<<elseif $activeChild.anus > 1>>two fingers<<else>>a finger<</if>> to fuck $his own ass. $His frantic attempts force $his distended middle to jiggle obscenely, stirring up the aphrodisiacs contained in $his gut and strengthening their effects even more.
 				<</if>>
 			<<elseif ($activeChild.releaseRules == "permissive" || $activeChild.releaseRules == "masturbation")>>
-				aphrodisiacs and is allowed to masturbate, so as $he stands before you $he rubs $his clit with one hand while $he fingers $his anus with the other.
+				aphrodisiacs and is allowed to masturbate, so as $he stands before you $he rubs $his clit with <<if (hasBothArms($activeChild))>>one hand while $he fingers $his anus with the other<<else>>$his hand<</if>>.
 			<<elseif ($activeChild.dick != 0)>>
 				aphrodisiacs and is not allowed to masturbate, so as $he stands before you $he desperately presents $his open mouth, $his breasts, $his crotch, and $his anus in turn, hoping that something will entice you to give $him relief.<<if canPenetrate($activeChild)>> $His cock is painfully erect.<</if>>
 			<<elseif ($activeChild.vagina == -1)>>
@@ -1450,23 +1450,23 @@ $He is
 			<</if>>
 		<<elseif $activeChild.aphrodisiacs > 1>>
 			$He's swimming in
-			<<if ($activeChild.amp == 1)>>
+			<<if (!hasAnyArms($activeChild))>>
 				aphrodisiacs, but is an amputee, so $he cannot touch $himself. $He writhes with extreme sexual frustration, desperately trying to relieve $himself.
-			<<elseif ($activeChild.chastityVagina)>>
+			<<elseif ($activeChild.chastityAnus) && ($activeChild.chastityPenis) && ($activeChild.chastityVagina)>>
 				aphrodisiacs, but is wearing a chastity belt and cannot touch $himself. $He writhes with extreme sexual frustration, desperately trying to relieve $himself.
 			<<elseif ($activeChild.releaseRules == "permissive" || $activeChild.releaseRules == "masturbation") && ($activeChild.dick != 0) && ($activeChild.vagina == -1)>>
-				aphrodisiacs and is allowed to masturbate, so as $he stands before you $he rubs $his shaft with one hand while $he fingers $his anus with the other.<<if canPenetrate($activeChild)>> $His cock is painfully erect.<</if>>
+				aphrodisiacs and is allowed to masturbate, so as $he stands before you $he rubs $his shaft with <<if (hasBothArms($activeChild))>>one hand while $he fingers $his anus with the other<<else>>$his hand<</if>>.<<if canPenetrate($activeChild)>> $His cock is painfully erect.<</if>>
 			<<elseif ($activeChild.releaseRules == "permissive" || $activeChild.releaseRules == "masturbation") && ($activeChild.dick != 0)>>
-				aphrodisiacs and is allowed to masturbate, so as $he stands before you $he rubs $his shaft and pussy with one hand while $he fingers $his anus with the other.<<if canPenetrate($activeChild)>> $His cock is painfully erect.<</if>>
+				aphrodisiacs and is allowed to masturbate, so as $he stands before you $he rubs $his shaft and pussy with <<if (hasBothArms($activeChild))>>one hand while $he fingers $his anus with the other<<else>>$his hand<</if>>.<<if canPenetrate($activeChild)>> $His cock is painfully erect.<</if>>
 			<<elseif ($activeChild.releaseRules == "permissive" || $activeChild.releaseRules == "masturbation") && ($activeChild.vagina == -1)>>
-				aphrodisiacs, has<<if $seeDicks > 0>> no penis and<</if>> no vagina, and is not allowed to masturbate, so as $he stands before you $he
+				aphrodisiacs, has<<if $seeDicks > 0>> no penis and<</if>> no vagina, and is allowed to masturbate, so as $he stands before you $he
 				<<if $activeChild.anus == 0>>
 					plays with a nipple with one hand while furiously rubbing $his virgin anus and the sensitive perineum beneath it with the other, desperately trying to get $himself off.
 				<<else>>
-					<<if $activeChild.anus > 2>>$his entire hand, formed into a beak shape,<<elseif $activeChild.anus > 1>>two fingers<<else>>a finger<</if>> to fuck $his own ass.
+					uses <<if $activeChild.anus > 2>>$his entire hand, formed into a beak shape,<<elseif $activeChild.anus > 1>>two fingers<<else>>a finger<</if>> to fuck $his own ass.
 				<</if>>
 			<<elseif ($activeChild.releaseRules == "permissive" || $activeChild.releaseRules == "masturbation")>>
-				aphrodisiacs and is allowed to masturbate, so as $he stands before you $he rubs $his clit with one hand while $he fingers $his anus with the other.
+				aphrodisiacs and is allowed to masturbate, so as $he stands before you $he rubs $his clit with <<if (hasBothArms($activeChild))>>one hand while $he fingers $his anus with the other<<else>>$his hand<</if>>.
 			<<elseif ($activeChild.dick != 0)>>
 				aphrodisiacs and is not allowed to masturbate, so as $he stands before you $he desperately presents $his open mouth, $his breasts, $his crotch, and $his anus in turn, hoping that something will entice you to give $him relief.<<if canPenetrate($activeChild)>> $His cock is painfully erect.<</if>>
 			<<elseif ($activeChild.vagina == -1)>>
@@ -1475,16 +1475,16 @@ $He is
 				aphrodisiacs and is not allowed to masturbate, so as $he stands before you $he desperately presents $his open mouth, $his breasts, $his pussy, and $his anus in turn, hoping that something will entice you to give $him relief.
 			<</if>>
 		<<else>>
-			<<if ($activeChild.amp == 1)>>
+			<<if (!hasAnyArms($activeChild))>>
 				$He's on aphrodisiacs, but is an amputee, so $he cannot touch $himself. $He writhes with sexual frustration.
-			<<elseif ($activeChild.chastityVagina)>>
+			<<elseif ($activeChild.chastityAnus) && ($activeChild.chastityPenis) && ($activeChild.chastityVagina)>>
 				$He's on aphrodisiacs, but is wearing a chastity belt and cannot touch $himself. $He writhes with sexual frustration.
 			<<elseif ($activeChild.releaseRules == "permissive" || $activeChild.releaseRules == "masturbation") && ($activeChild.dick != 0) && ($activeChild.vagina == -1)>>
-				$He's on aphrodisiacs and is allowed to masturbate, so as $he obeys your commands $he idly rubs $his shaft with one hand while the other pinches a nipple.
+				$He's on aphrodisiacs and is allowed to masturbate, so as $he obeys your commands $he idly rubs $his shaft with <<if (hasBothArms($activeChild))>>one hand while the other pinches a nipple<<else>>$his hand<</if>>.
 			<<elseif ($activeChild.releaseRules == "permissive" || $activeChild.releaseRules == "masturbation") && ($activeChild.dick != 0)>>
-				$He's on aphrodisiacs and is allowed to masturbate, so as $he obeys your commands $he idly rubs $his shaft and pussy with one hand while the other pinches a nipple.
+				$He's on aphrodisiacs and is allowed to masturbate, so as $he obeys your commands $he idly rubs $his shaft and pussy with <<if (hasBothArms($activeChild))>>one hand while the other pinches a nipple<<else>>$his hand<</if>>.
 			<<elseif ($activeChild.releaseRules == "permissive" || $activeChild.releaseRules == "masturbation")>>
-				$He's on aphrodisiacs and is allowed to masturbate, so as $he obeys your commands $he idly rubs $his pussy with one hand while the other pinches a nipple.
+				$He's on aphrodisiacs and is allowed to masturbate, so as $he obeys your commands $he idly rubs $his pussy with <<if (hasBothArms($activeChild))>>one hand while the other pinches a nipple<<else>>$his hand<</if>>.
 			<<elseif ($activeChild.dick != 0) && canPenetrate($activeChild)>>
 				$He's on aphrodisiacs and is not allowed to masturbate, so as $he obeys your commands $he shifts $his weight uncomfortably. $His erect dick sways as $he does.
 			<<else>>
diff --git a/src/js/slaveStatsChecker.js b/src/js/slaveStatsChecker.js
index 923a16e3d21..e90648a5103 100644
--- a/src/js/slaveStatsChecker.js
+++ b/src/js/slaveStatsChecker.js
@@ -873,7 +873,7 @@ window.hasAnyArms = function(slave) {
 };
 
 /**
- * True if slave has at least one leg and all are natural
+ * True if slave has at least one leg that is natural
  *
  * @param {App.Entity.SlaveState} slave
  * @returns {boolean}
@@ -882,6 +882,16 @@ window.hasAnyNaturalLegs = function(slave) {
 	return slave.amp === 0 && slave.missingLegs < 3;
 };
 
+/**
+ * True if slave has at least one arm that is natural
+ *
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.hasAnyNaturalArms = function(slave) {
+	return slave.amp === 0 && slave.missingArms < 3;
+};
+
 /**
  * True if slave has both legs
  *
@@ -1028,6 +1038,40 @@ window.getLimbCount = function(slave, id) {
 };
 
 
+/**
+ * Returns count of specified arm type. Uses new limb IDs.
+ *
+ * @param {App.Entity.SlaveState} slave
+ * @param {number} id
+ * @returns {number}
+ */
+window.getArmCount = function(slave, id) {
+	let oldID = (id - 1) * -1;
+
+	if (oldID < 0) {
+		if (slave.amp === oldID) {
+			return 2;
+		} else {
+			return 0;
+		}
+	}
+
+	let n = 0;
+	if (hasLeftArm(slave)) {
+		n++;
+	}
+	if (hasRightArm(slave)) {
+		n++;
+	}
+
+	if (id === 0) {
+		return 2 - n;
+	}
+
+	return n;
+};
+
+
 /**
  * True if slave has left arm
  *
-- 
GitLab