:: husk Slave Swap Workaround
 
<<set $nextButton = "Abort Operation", $nextLink = "Scheduled Event", $returnTo = "Scheduled Event">>

<<nobr>>

<<set $oldSlave = 0>>
<<set $swapFailure = random(1,1000)>

"This operation is neither simple nor is it perfected. There are extreme health risks involved and no gauruntee of success. Strap a slave into your surgery to consent to the operation. Indentured servants<<if $incubator > 0>> and slaves with reserved children<</if>> not eligible."

//Select the slave whose brain will be transfered into the waiting husk.<<if $cyberMod == 1>> Amputated slaves must not be wearing prosthetics.<</if>>//

<</nobr>>

__Select an eligible slave:__
<<for _i = 0; _i < $slaves.length; _i++>>\
	<<if $cybermod == 0 || $slaves[_i].PLimb == 0 || ($slaves[_i].PLimb == 1 && $slaves[_i].amp == 1)>>
	<<if ($slaves[_i].indenture == 0)>>\
	<<if ($slaves[_i].breedingMark == 0)>>\
	<<if ($slaves[_i].reservedChildren == 0)>>\
	<<if ($slaves[_i].ID != $activeSlave.ID)>>\
		<<print "[[$slaves[_i].slaveName|Husk Slave Swap][$oldSlave = $slaves[" + _i + "]]]">>
	<</if>>\
	<</if>>\
	<</if>>\
	<</if>>\
	<</if>>\
<</for>>\
