:: SlaveOnSlaveFeedingWorkAround [nobr]

<<set $nextButton = "Back", $nextLink = "Slave Interact">>

<<set $milkTap = 0, _descM = "milk", _descC = "cum", _eligibilityMilk2 = 0, _eligibilityMilk4 = 0, _eligibilityMilk8 = 0, _eligibilityCum2 = 0, _eligibilityCum4 = 0, _eligibilityCum8 = 0>>

<<for _i = 0; _i < $slaves.length; _i++>> /* milk output */
	<<if $slaves[_i].lactation > 0>>
		<<set $slaves[_i].milkOutput = 0>>
		<<set _milk = milkAmount($slaves[_i])>>
		<<set _milk = (_milk/14)>>
		<<set _milk = Math.trunc(_milk)>>
		<<set $slaves[_i].milkOutput = _milk>>
	<<else>>
		<<set _milk = 0>>
		<<set $slaves[_i].milkOutput = 0>>
	<</if>>
<</for>>
<<for _i = 0; _i < $slaves.length; _i++>> /* cum output */
	<<if $slaves[_i].balls > 0 && $slaves[_i].dick > 0 && $slaves[_i].chastityPenis != 1>>
		<<set $slaves[_i].cumOutput = 0>>
		<<set _cum = cumAmount($slaves[_i])>>
		<<set _cum = (_cum/7)>>
		<<set _cum = (_cum/10)>>
		<<set _cum = Math.trunc(_cum)>>
		<<set $slaves[_i].cumOutput = _cum>>
	<<else>>
		<<set _cum = 0>>
		<<set $slaves[_i].cumOutput = 0>>
	<</if>>
<</for>>

<p class="scene-intro">
	<<= getSlave($AS).slaveName>> is prepped to drink $his fill; now you must select a slave capable of producing the required amount of milk or ejaculate.
</p>

<h2>Select an eligible slave to serve as the tap</h2>

<h3>Milk Slaves</h3>
<table width=90%>
<tr>
	<th>
		2 Liters
	</th>
	<th>
		4 Liters
	</th>
	<th>
		8 Liters
	</th>
</tr>
<tr valign="top">
	/* 2 Liters */
	<td>
		<<for _i = 0; _i < $slaves.length; _i++>>
			<div>
				<<if $slaves[_i].milkOutput >= 2>>
					<<if ($slaves[_i].ID != getSlave($AS).ID) && $slaves[_i].nipples != "fuckable">>
						<<set _name = SlaveFullName($slaves[_i])>>
						<<print "[[_name|FSlaveFeed][$milkTap = $slaves[" + _i + "], getSlave($AS).inflation = 1, getSlave($AS).inflationType = _descM, getSlave($AS).inflationMethod = 3]]">>
						<<if relativeTerm(getSlave($AS), $slaves[_i]) != null>>
							<<print relativeTerm(getSlave($AS), $slaves[_i])>>
						<</if>>
						<<if $slaves[_i].relationshipTarget == getSlave($AS).ID>>
							<<switch $slaves[_i].relationship>>
							<<case 1>>
								friends
							<<case 2>>
								best friends
							<<case 3>>
								friends with benefits
							<<case 4>>
								lover
							<<case 5>>
								slave $wife
							<</switch>>
						<</if>>
						<<if $slaves[_i].rivalryTarget == getSlave($AS).ID>>
							<<switch $slaves[_i].relationship>>
							<<case 1>>
								dislikes
							<<case 2>>
								rival
							<<case 3>>
								bitterly hates
							<</switch>>
						<</if>>
						<<set _eligibilityMilk2 = 1>>
					<</if>>
				<</if>>
			</div>
		<</for>>
		<<if (_eligibilityMilk2 == 0)>>
			<div class="note">
				You have no slaves capable of producing two liters of milk.
			</div>
		<</if>>
	</td>

	<<if getSlave($AS).pregKnown == 0>>
		/* 4 Liters */
		<td>
			<<for _i = 0; _i < $slaves.length; _i++>>
				<div>
					<<if $slaves[_i].milkOutput >= 4>>
						<<if ($slaves[_i].ID != getSlave($AS).ID) && $slaves[_i].nipples != "fuckable">>
							<<set _name = SlaveFullName($slaves[_i])>>
							<<print "[[_name|FSlaveFeed][$milkTap = $slaves[" + _i + "], getSlave($AS).inflation = 2, getSlave($AS).inflationType = _descM, getSlave($AS).inflationMethod = 3]]">>
							<<if relativeTerm(getSlave($AS), $slaves[_i]) != null>>
								<<print relativeTerm(getSlave($AS), $slaves[_i])>>
							<</if>>
							<<if $slaves[_i].relationshipTarget == getSlave($AS).ID>>
								<<switch $slaves[_i].relationship>>
								<<case 1>>
									friends
								<<case 2>>
									best friends
								<<case 3>>
									friends with benefits
								<<case 4>>
									lover
								<<case 5>>
									slave $wife
								<</switch>>
							<</if>>
							<<if $slaves[_i].rivalryTarget == getSlave($AS).ID>>
								<<switch $slaves[_i].relationship>>
								<<case 1>>
									dislikes
								<<case 2>>
									rival
								<<case 3>>
									bitterly hates
								<</switch>>
							<</if>>
							<<set _eligibilityMilk4 = 1>>
						<</if>>
					<</if>>
				</div>
			<</for>>
			<<if (_eligibilityMilk4 == 0)>>
				<div class="note">
					You have no slaves capable of producing four liters of milk.
				</div>
			<</if>>
		</td>

		/* 8 Liters */
		<td>
			<<for _i = 0; _i < $slaves.length; _i++>>
				<div>
					<<if $slaves[_i].milkOutput >= 8>>
						<<if ($slaves[_i].ID != getSlave($AS).ID) && $slaves[_i].nipples != "fuckable">>
							<<set _name = SlaveFullName($slaves[_i])>>
							<<print "[[_name|FSlaveFeed][$milkTap = $slaves[" + _i + "], getSlave($AS).inflation = 3, getSlave($AS).inflationType = _descM, getSlave($AS).inflationMethod = 3]]">>
							<<if relativeTerm(getSlave($AS), $slaves[_i]) != null>>
								<<print relativeTerm(getSlave($AS), $slaves[_i])>>
							<</if>>
							<<if $slaves[_i].relationshipTarget == getSlave($AS).ID>>
								<<switch $slaves[_i].relationship>>
								<<case 1>>
									friends
								<<case 2>>
									best friends
								<<case 3>>
									friends with benefits
								<<case 4>>
									lover
								<<case 5>>
									slave $wife
								<</switch>>
							<</if>>
							<<if $slaves[_i].rivalryTarget == getSlave($AS).ID>>
								<<switch $slaves[_i].relationship>>
									<<case 1>>
										dislikes
									<<case 2>>
										rival
									<<case 3>>
										bitterly hates
								<</switch>>
							<</if>>
							<<set _eligibilityMilk8 = 1>>
						<</if>>
					<</if>>
				</div>
			<</for>>
			<<if (_eligibilityMilk8 == 0)>>
				<div class="note">
					You have no slaves capable of producing eight liters of milk.
				</div>
			<</if>>
		</td>
	<<else>>
		<td>
			Due to $his pregnancy, $he is incapable of keeping down more than two liters of milk.
		</td>
	<</if>>
</tr>
</table>

<h3>Cum Slaves</h3>
<table width=90%>
	<tr>
		<th>
			2 Liters
		</th>
		<th>
			4 Liters
		</th>
		<th>
			8 Liters
		</th>
	</tr>

	<tr valign="top">
		/* 2 Liters */
		<td>
			<<for _i = 0; _i < $slaves.length; _i++>>
				<div>
					<<if $slaves[_i].cumOutput >= 2>>
						<<if ($slaves[_i].ID != getSlave($AS).ID)>>
							<<set _name = SlaveFullName($slaves[_i])>>
							<<print "[[_name|FSlaveFeed][$milkTap = $slaves[" + _i + "], getSlave($AS).inflation = 1, getSlave($AS).inflationType = _descC, getSlave($AS).inflationMethod = 3]]">>
							<<set _eligibilityCum2 = 1>>
						<</if>>
					<</if>>
				</div>
			<</for>>
			<<if (_eligibilityCum2 == 0)>>
				<div class="note">
					You have no slaves capable of producing two liters of cum.
				</div>
			<</if>>
		</td>

		<<if getSlave($AS).pregKnown == 0>>
			/* 4 Liters */
			<td>
				<<for _i = 0; _i < $slaves.length; _i++>>
					<div>
						<<if $slaves[_i].cumOutput >= 4>>
							<<if ($slaves[_i].ID != getSlave($AS).ID)>>
								<<set _name = SlaveFullName($slaves[_i])>>
								<<print "[[_name|FSlaveFeed][$milkTap = $slaves[" + _i + "], getSlave($AS).inflation = 2, getSlave($AS).inflationType = _descC, getSlave($AS).inflationMethod = 3]]">>
								<<set _eligibilityCum4 = 1>>
							<</if>>
						<</if>>
					</div>
				<</for>>

				<<if (_eligibilityCum4 == 0)>>
					<div class="note">
						You have no slaves capable of producing four liters of cum.
					</div>
				<</if>>
			</td>

			/* 8 Liters */
			<td>
				<<for _i = 0; _i < $slaves.length; _i++>>
					<div>
						<<if $slaves[_i].cumOutput >= 8>>
							<<if ($slaves[_i].ID != getSlave($AS).ID)>>
								<<set _name = SlaveFullName($slaves[_i])>>
								<<print "[[_name|FSlaveFeed][$milkTap = $slaves[" + _i + "], getSlave($AS).inflation = 3, getSlave($AS).inflationType = _descC, getSlave($AS).inflationMethod = 3]]">>
								<<set _eligibilityCum8 = 1>>
							<</if>>
						<</if>>
					</div>
				<</for>>
				<<if (_eligibilityCum8 == 0)>>
					<div class="note">
						You have no slaves capable of producing eight liters of cum.
					</div>
				<</if>>
			</td>
		<<else>>
			<td>
				Due to $his pregnancy, $he is incapable of keeping down more than two liters of cum.
			</td>
		<</if>>
	</tr>
</table>

src/pregmod/slaveOnSlaveFeedingWorkAround.tw