From c3c7860c801cfd4077f3c76d8aabce43cd086336 Mon Sep 17 00:00:00 2001
From: lowercase-donkey <lowercasedonkey@gmail.com>
Date: Mon, 15 Jul 2019 00:39:35 -0400
Subject: [PATCH] fix

---
 src/uncategorized/bodyModification.tw |   5 +-
 src/uncategorized/newSlaveIntro.tw    | 112 ++++++++++++++++++++------
 2 files changed, 92 insertions(+), 25 deletions(-)

diff --git a/src/uncategorized/bodyModification.tw b/src/uncategorized/bodyModification.tw
index 54441612565..2ba77040037 100644
--- a/src/uncategorized/bodyModification.tw
+++ b/src/uncategorized/bodyModification.tw
@@ -1309,7 +1309,10 @@ Or a custom site: <<textbox "$scarTarget.local" $scarTarget.local "Body Modifica
 	<<else>>
 		<<link "Scar">>
 			<<if $scarTarget.local === "entire body">>
-				<<set _scarArray = ["left breast", "right breast", "back", "lower back", "left buttock", "right buttock", "left thigh", "right thigh"]>>
+				<<set _scarArray = ["left breast", "right breast", "back", "lower back", "left buttock", "right buttock"]>>
+				<<if $activeSlave.amp != 1>>
+					<<set _scarArray.push("left upper arm", "right upper arm", "left thigh", "right thigh")>>
+				<</if>>
 			<<else>>
 				<<set _scarArray = [$scarTarget.local]>>
 			<</if>>
diff --git a/src/uncategorized/newSlaveIntro.tw b/src/uncategorized/newSlaveIntro.tw
index 3d8c6a429e8..0b78a4eeef9 100644
--- a/src/uncategorized/newSlaveIntro.tw
+++ b/src/uncategorized/newSlaveIntro.tw
@@ -13,13 +13,47 @@
 <<setPlayerPronouns>>
 <<setLocalPronouns $activeSlave>>
 
-/* use the secondary location if the primary brand target won't work for this slave */
-<<set _brandTarget = $brandTarget.primary>>
-<<if ($activeSlave.dick == 0 && $brandTarget.primary == "penis")
-|| ($activeSlave.earShape != "none" && $brandTarget.primary == "ear")
-|| ($activeSlave.amp != 0 && ($brandTarget.primary == "thigh" || $brandTarget.primary == "calve" || $brandTarget.primary == "ankle" || $brandTarget.primary == "foot"))
-|| ($activeSlave.balls == 0 && $activeSlave.scrotum == 0 && $brandTarget.primary == "testicle")>>
-	<<set _brandTarget = $brandTarget.secondary>>
+/* use the secondary location if the primary mark target won't work for this slave */
+<<set _brandTarget = $brandTarget.primary, _scarTarget = $scarTarget.primary>>
+<<if $activeSlave.dick == 0>>
+	<<if $brandTarget.primary == "penis">>
+		<<set _brandTarget = $brandTarget.secondary>>
+	<</if>>
+	<<if $scarTarget.primary == "penis">>
+		<<set _scarTarget = $scarTarget.secondary>>
+	<</if>>
+<</if>>
+<<if $activeSlave.balls == 0 && $activeSlave.scrotum == 0>>
+	<<if $brandTarget.primary == "testicle">>
+		<<set _brandTarget = $brandTarget.secondary>>
+	<</if>>
+	<<if $scarTarget.primary == "testicle">>
+		<<set _scarTarget = $scarTarget.secondary>>
+	<</if>>
+<</if>>
+<<if $activeSlave.earShape == "none">>
+	<<if $brandTarget.primary == "ear">>
+		<<set _brandTarget = $brandTarget.secondary>>
+	<</if>>
+	<<if $scarTarget.primary == "ear">>
+		<<set _scarTarget = $scarTarget.secondary>>
+	<</if>>
+<</if>>
+<<if $activeSlave.amp != 0>>
+	<<if (["upper arm", "lower arm", "wrist", "hand"].includes($brandTarget.primary))>>
+		<<set _brandTarget = $brandTarget.secondary>>
+	<</if>>
+	<<if (["upper arm", "lower arm", "wrist", "hand"].includes($scarTarget.primary))>>
+		<<set _scarTarget = $scarTarget.secondary>>
+	<</if>>
+<</if>>
+<<if $activeSlave.amp != 0>> /* amp check is in two parts for future multiamp */
+	<<if (["thigh", "calve", "ankle", "foot"].includes($brandTarget.primary))>>
+		<<set _brandTarget = $brandTarget.secondary>>
+	<</if>>
+	<<if (["thigh", "calve", "ankle", "foot"].includes($scarTarget.primary))>>
+		<<set _scarTarget = $scarTarget.secondary>>
+	<</if>>
 <</if>>
 
 <<if $specialSlave == 1>>
@@ -1191,43 +1225,73 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 <br>&nbsp;&nbsp;&nbsp;&nbsp;
 
 <<link "Whip $him until $he scars">>
-	<<set _scarArray = ["left breast", "right breast", "back", "lower back", "left buttock", "right buttock", "left thigh", "right thigh"]>>
+	<<set _scarArray = ["left breast", "right breast", "back", "lower back", "left buttock", "right buttock"]>>
+	<<if $activeSlave.amp != 1>>
+		<<set _scarArray.push("left upper arm", "right upper arm", "left thigh", "right thigh")>>
+	<</if>>
 	<<for _i to 0; _i < _scarArray.length; _i++>>
-		<<set $activeSlave.scar[_scarArray[_i]] = 2>>
-		<<run cashX(forceNeg($modCost), "slaveMod", $activeSlave)>>
+		<<set $activeSlave.scar[_scarArray[_i]] = 2>>	
 	<</for>>
+	<<run cashX(forceNeg($modCost), "slaveMod", $activeSlave)>> /* Let's just bill once, for the whip and disinfectant. */
 	<<set $activeSlave.devotion -= 5>>
 	<<set $activeSlave.trust -= 10>>
 	<<set $activeSlave.health -= 10>>
-		<<replace "#introResult">>
-		You drag $him to the <<if $cellblock>>$cellblockName<<else>>body modification studio<</if>> and chain $him spread-eagled with $his face to the wall and $his naked back clear and defenseless. $He doesn't understand what's coming for a while, even as disinfectant is applied from $his neck to $his knees. $He can't see you prepare the whip, <<if !canSee($activeSlave)>>of course, <</if>><<if canHear($activeSlave)>>but almost jumps out of $his $activeSlave.skin skin when you crack it behind $him.<<else>>and in $his deaf state every blow is a complete suprise.<</if>>
-		
-		  $he feels the radiated heat on $his skin and manages to get one inarticulate, wordless noise of terror out before the dreadful sizzling noise and the sweet smell of burning flesh. If $he didn't know $he was a slave before, @@.mediumorchid;$he does now,@@ and $he's got the @@.gold;agonizing@@ @@.red;injury@@ to prove it.
+	<<replace "#introResult">>
+		<<if $activeSlave.amp = 0>>
+		You drag $him to the
+		<<if $cellblock>>
+			$cellblockName
+		<<else>>
+			body modification studio
+		<</if>>
+		and chain $him
+		<<if $activeSlave.amp != 1>>
+			spread-eagled
+		<</if>>
+		with $his face to the wall and $his naked back clear and defenseless. $He doesn't understand what's coming for a while, even as disinfectant is applied from $his neck
+		<<if $activeSlave.amp != 1>>
+			to $his knees.
+		<<else>>
+			down.
+		<</if>>
+		$He can't see you prepare the whip,
+		<<if !canSee($activeSlave)>>
+			of course,
+		<</if>>
+		<<if canHear($activeSlave)>>
+			but almost jumps out of $his $activeSlave.skin skin when you crack it behind $him.
+		<<else>>
+			and in $his deaf state every blow is a complete suprise.
+		<</if>>
+		$He frantically 
+		<<if $activeSlave.amp != 1>>
+			wrenches $his hands and feet but is completely unable to get free.
+		<<else>>
+			twists and turns, but without limbs is powerless to escape the curling whip.
+		<</if>>
+		If $he didn't know $he was a slave before, @@.mediumorchid;$he does now,@@ and $he's got the @@.gold;agonizing@@ @@.red;injury@@ to prove it.  What $he doesn't yet know is just how permanent this lashing's effects will be. The level of violence and the coating you used will leave $him scarred with the marks of slavery forever.
 		<<if ($arcologies[0].FSSubjugationistRace == $activeSlave.race) && ($arcologies[0].FSSubjugationist > 0)>>
-			Society @@.green;approves@@ of your purchase and branding of an inferior $activeSlave.race person; this advances the idea that $activeSlave.race people ought to be enslaved.
+			Society @@.green;approves@@ of your purchase and whipping of an inferior $activeSlave.race person; this advances the idea that $activeSlave.race people ought to be enslaved.
 			<<= FutureSocieties.Change("Subjugationist", 2)>>
 		<<elseif ($arcologies[0].FSSupremacistRace == $activeSlave.race) && ($arcologies[0].FSSupremacist > 0)>>
-			Society @@.red;disapproves@@ of your purchase and branding of <<if $activeSlave.race == "amerindian" || $activeSlave.race == "asian" || $activeSlave.race == "indo-aryan">>an<<else>>a<</if>> $activeSlave.race person; this reduces support for the idea that $activeSlave.race people are superior.
+			Society @@.red;disapproves@@ of your purchase and whipping of <<if $activeSlave.race == "amerindian" || $activeSlave.race == "asian" || $activeSlave.race == "indo-aryan">>an<<else>>a<</if>> $activeSlave.race person; this reduces support for the idea that $activeSlave.race people are superior.
 			<<= FutureSocieties.Change("Supremacist", -2)>>
 		<</if>>
 	<</replace>>
 <</link>>
 
-
-
-
-| <<link "Scar $him on the _brandTarget">>
+| <<link "Scar $him on the _scarTarget">>
 	<<replace "#introResult">>
-		You drag $him to the body modification studio and strap $him down with $his _brandTarget clear and defenseless. $He doesn't understand what's coming for a while, even as disinfectant is applied to $his _brandTarget. $He can't see the approaching brand, <<if !canSee($activeSlave)>>of course, <</if>>but eventually $he feels the radiated heat on $his skin and manages to get one inarticulate, wordless noise of terror out before the dreadful sizzling noise and the sweet smell of burning flesh. If $he didn't know $he was a slave before, @@.mediumorchid;$he does now,@@ and $he's got the @@.gold;agonizing@@ @@.red;injury@@ to prove it.
+		You drag $him to the body modification studio and strap $him down with $his _scarTarget clear and defenseless. $He doesn't understand what's coming for a while, even as disinfectant is applied to $his _scarTarget.  You have a wide selection of tools to create scars, the trick is to keep the wound from healing correctly afterward.  Of course, $he has no way of knowing that the pain you are inflicting as you cut into $his flesh will leave such a permanent mark, but if $he didn't know $he was a slave before, @@.mediumorchid;$he does now,@@ and $he's got the @@.gold;agonizing@@ @@.red;injury@@ to prove it.
 		<<if ($arcologies[0].FSSubjugationistRace == $activeSlave.race) && ($arcologies[0].FSSubjugationist > 0)>>
-			Society @@.green;approves@@ of your purchase and branding of an inferior $activeSlave.race person; this advances the idea that $activeSlave.race people ought to be enslaved.
+			Society @@.green;approves@@ of your purchase and scarring of an inferior $activeSlave.race person; this advances the idea that $activeSlave.race people ought to be enslaved.
 			<<= FutureSocieties.Change("Subjugationist", 2)>>
 		<<elseif ($arcologies[0].FSSupremacistRace == $activeSlave.race) && ($arcologies[0].FSSupremacist > 0)>>
-			Society @@.red;disapproves@@ of your purchase and branding of <<if $activeSlave.race == "amerindian" || $activeSlave.race == "asian" || $activeSlave.race == "indo-aryan">>an<<else>>a<</if>> $activeSlave.race person; this reduces support for the idea that $activeSlave.race people are superior.
+			Society @@.red;disapproves@@ of your purchase and scarring of <<if $activeSlave.race == "amerindian" || $activeSlave.race == "asian" || $activeSlave.race == "indo-aryan">>an<<else>>a<</if>> $activeSlave.race person; this reduces support for the idea that $activeSlave.race people are superior.
 			<<= FutureSocieties.Change("Supremacist", -2)>>
 		<</if>>
 	<</replace>>
-	<<set $activeSlave.brand[_brandTarget] = $brandDesign.primary>>
+	<<set $activeSlave.scar[_scarTarget] = $scarDesign.primary>>
 	<<set $activeSlave.devotion -= 5>>
 	<<set $activeSlave.trust -= 10>>
 	<<set $activeSlave.health -= 10>>
-- 
GitLab