:: Commit Starting Girl [nobr]

<<run App.StartingGirls.cleanup($activeSlave)>>

<<if def $slaveIndices[$activeSlave.ID]>>
	<div>@@.red;Starting Girl ID conflict; slave not committed. Please report this error with a description of your actions.@@</div>
<<else>>
	<<run newSlave($activeSlave)>>
<</if>>

<<if $activeSlave.pregSource == -1>>
	<<set $PC.counter.slavesKnockedUp++>>
<</if>>

<<set $originOveride = 0>>

<<if $cash < minimumSlaveCost()>><<goto "Acquisition">><</if>>

<<run cashX(forceNeg(startingSlaveCost($activeSlave)), "slaveTransfer", $activeSlave)>>
<<run App.StartingGirls.applyCareerBonus(getSlave($activeSlave.ID))>>

<<= SlaveFullName($activeSlave)>> has been added to your starting stable of slaves. You now have <<print cashFormat($cash)>> remaining.
<br>
<<if $cash >= minimumSlaveCost()>>
	<br>
	<<link "Add another slave, starting from a new slave">>
		<<set $activeSlave = App.StartingGirls.generate()>>
		<<goto "Starting Girls">>
	<</link>>
	<br>
	<<link "Add another slave, based on the previous slave">>
		<<set $activeSlave = clone($activeSlave)>>
		<<set $activeSlave.ID = generateSlaveID()>>
		<<run nationalityToName($activeSlave), App.StartingGirls.randomizeUnknowns($activeSlave)>>
		<<set $activeSlave.mother = 0, $activeSlave.father = 0>>
		<<goto "Starting Girls">>
	<</link>>
	<<set _srcID = $activeSlave.ID>>
	<br>
	//Add another slave, related to the previous slave://
	<div class="indent">
	<<link "Twin">>
		<<run setMissingParents(getSlave(_srcID))>>
		<<set $activeSlave = generateRelatedSlave(getSlave(_srcID), "twin")>>
		<<run App.StartingGirls.randomizeUnknowns($activeSlave)>>
		<<goto "Starting Girls">>
	<</link>>
	</div>
	<<if $activeSlave.actualAge + $minimumSlaveAge < $retirementAge - 1>>
		<<if $seeDicks !== 100 && $activeSlave.mother === 0>>
			<div class="indent">
			<<link "Mother">>
				<<set $activeSlave = generateRelatedSlave(getSlave(_srcID), "parent", getSlave(_srcID).genes === "XY")>>
				<<run App.StartingGirls.randomizeUnknowns($activeSlave)>>
				<<set getSlave(_srcID).mother = $activeSlave.ID>>
				<<goto "Starting Girls">>
			<</link>>
			</div>
		<</if>>
		<<if $seeDicks !== 0 && $activeSlave.father === 0>>
			<div class="indent">
			<<link "Father">>
				<<set $activeSlave = generateRelatedSlave(getSlave(_srcID), "parent", getSlave(_srcID).genes === "XX")>>
				<<run App.StartingGirls.randomizeUnknowns($activeSlave)>>
				<<set getSlave(_srcID).father = $activeSlave.ID>>
				<<goto "Starting Girls">>
			<</link>>
			</div>
		<</if>>
	<</if>>
	<<if $activeSlave.actualAge < $retirementAge - 2>>
		<<if $seeDicks !== 100>>
			<div class="indent">
			<<link "Older Sister">>
				<<run setMissingParents(getSlave(_srcID))>>
				<<set $activeSlave = generateRelatedSlave(getSlave(_srcID), "older sibling", getSlave(_srcID).genes === "XY")>>
				<<run App.StartingGirls.randomizeUnknowns($activeSlave)>>
				<<goto "Starting Girls">>
			<</link>>
			</div>
		<</if>>
		<<if $seeDicks !== 0>>
			<div class="indent">
			<<link "Older Brother">>
				<<run setMissingParents(getSlave(_srcID))>>
				<<set $activeSlave = generateRelatedSlave(getSlave(_srcID), "older sibling", getSlave(_srcID).genes === "XX")>>
				<<run App.StartingGirls.randomizeUnknowns($activeSlave)>>
				<<goto "Starting Girls">>
			<</link>>
			</div>
		<</if>>
	<</if>>
	<<if $activeSlave.actualAge > $minimumSlaveAge + 2>>
		<<if $seeDicks !== 100>>
			<div class="indent">
			<<link "Younger Sister">>
				<<run setMissingParents(getSlave(_srcID))>>
				<<set $activeSlave = generateRelatedSlave(getSlave(_srcID), "younger sibling", getSlave(_srcID).genes === "XY")>>
				<<run App.StartingGirls.randomizeUnknowns($activeSlave)>>
				<<goto "Starting Girls">>
			<</link>>
			</div>
		<</if>>
		<<if $seeDicks !== 0>>
			<div class="indent">
			<<link "Younger Brother">>
				<<run setMissingParents(getSlave(_srcID))>>
				<<set $activeSlave = generateRelatedSlave(getSlave(_srcID), "younger sibling", getSlave(_srcID).genes === "XX")>>
				<<run App.StartingGirls.randomizeUnknowns($activeSlave)>>
				<<goto "Starting Girls">>
			<</link>>
			</div>
		<</if>>
	<</if>>
	<<if $activeSlave.actualAge > $minimumSlaveAge + 11>>
		<<if $seeDicks !== 100>>
			<div class="indent">
			<<link "Daughter">>
				<<set $activeSlave = generateRelatedSlave(getSlave(_srcID), "child", getSlave(_srcID).genes === "XY")>>
				<<run App.StartingGirls.randomizeUnknowns($activeSlave)>>
				<<goto "Starting Girls">>
			<</link>>
			</div>
		<</if>>
		<<if $seeDicks !== 0>>
			<div class="indent">
			<<link "Son">>
				<<set $activeSlave = generateRelatedSlave(getSlave(_srcID), "child", getSlave(_srcID).genes === "XX")>>
				<<run App.StartingGirls.randomizeUnknowns($activeSlave)>>
				<<goto "Starting Girls">>
			<</link>>
			</div>
		<</if>>
	<</if>>
	<div class="indent">//Warning: related slaves will influence each others' opinion of you, and may become difficult to control if not properly broken.//</div>
<</if>>
<br>[[Stop adding slaves and take control of the arcology|Acquisition]]

src/npc/startingGirls/commitStartingGirl.tw