:: Artificial Insemination [nobr]

<<set $nextButton = "Back", $nextLink = "Remote Surgery", $impregnatrix = 0, _eligibility = 0, _eligibilityI = 0>>

//$activeSlave.slaveName is prepped for fertilization; now you must select a target to harvest sperm from.//

<br><br>

__Select an eligible slave to serve as the semen donatrix:__

<br>

<<for _ai = 0; _ai < $slaves.length; _ai++>>
<<capture _ai>>
	<<if $slaves[_ai].balls > 0 && $slaves[_ai].pubertyXY == 1 && canBreed($activeSlave, $slaves[_ai])>>
		<<set _name = SlaveFullName($slaves[_ai])>>
		<br>[[_name|Surgery Degradation][$impregnatrix = $slaves[_ai], cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $surgeryType = "insemination"]]
		<<set _eligibility = 1>>
	<</if>>
<</capture>>
<</for>>
<<if (_eligibility == 0)>>
	<br>//You have no slaves with potent sperm.//
<</if>>

<<if $incubatorSlaves > 0 && $incubatorReproductionSetting == 2>>
	<br><br>

	__Incubator settings are resulting in large-scale fluid secretion. Select an eligible incubatee to milk for semen:__

	<br>
	<<for _ai = 0; _ai < $tanks.length; _ai++>>
	<<capture _ai>>
		<<if $tanks[_ai].balls > 0 && $tanks[_ai].dick > 0 && canBreed($activeSlave, $tanks[_ai])>>
			<br>[[$tanks[_ai].slaveName|Surgery Degradation][$impregnatrix = $tanks[_ai], cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $surgeryType = "insemination"]]
			<<set _eligibilityI = 1>>
		<</if>>
	<</capture>>
	<</for>>
	<<if (_eligibilityI == 0)>>
		<br>//You have no growing slaves producing sperm.//
	<</if>>
<</if>>

<<if $PC.balls != 0>>
	<br>
	[[Use your own|Surgery Degradation][$impregnatrix = $PC, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $surgeryType = "insemination"]]
<<elseif $PC.storedCum > 0>>
	<br>
	[[Use a vial of your own|Surgery Degradation][$impregnatrix = $PC, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $surgeryType = "insemination", $PC.storedCum--]]
	//You have enough sperm stored away to inseminate $PC.storedCum more slave<<if $PC.storedCum > 1>>s<</if>>.//
<</if>>
src/pregmod/artificialInsemination.tw