:: Husk Slave Swap [nobr]

<<set $nextButton = "Continue">>
<<set _oldSlave = clone($swappingSlave)>>
<<set _m = $slaves.findIndex(function(s) { return s.ID == $swappingSlave.ID; })>>

You strap $slaves[_m].slaveName, and the body to which $pronoun will be transferred, into the remote surgery and stand back as it goes to work.
<<BodySwap $slaves[_m] $activeSlave>>
<<set _gps = $genePool.findIndex(function(s) { return s.ID == $slaves[_m].ID; })>>
<<set $genePool[_gps].race = $slaves[_m].race, $genePool[_gps].skin = $slaves[_m].skin, $genePool[_gps].markings = $slaves[_m].markings, $genePool[_gps].origEye = $slaves[_m].origEye, $genePool[_gps].origHColor = $slaves[_m].origHColor, $genePool[_gps].origSkin = $slaves[_m].skin, $genePool[_gps].face = $slaves[_m].face, $genePool[_gps].pubicHStyle = $slaves[_m].pubicHStyle, $genePool[_gps].underArmHStyle = $slaves[_m].underArmHStyle>> /* special exception to swap genePool since the temporary body lacks an entry. Otherwise we could just call the widget using the genePool entries */
After an honestly impressive procedure, $slaves[_m].slaveName is released and allowed to explore her new body.

<br><br>
//To do - Reactions//

<br><br>
<<slaveCost _oldSlave>>
<<set _payout = Math.trunc($slaveCost/3)>>
$slaves[_m].slaveName's body was bought by the Flesh Heap for ¤_payout.
<<set $cash += _payout>>
<<set $activeSlave = 0, $swappingSlave = 0>>
