:: Household Liquidator [nobr]

<<set $nextButton = "Back", $nextLink = "Buy Slaves", $returnTo = "Buy Slaves", $encyclopedia = "Household Liquidations">>
<<set $introType = "liquidator", $newSlavesDone = 0, $newSlaveIndex = 0, _newSlaves = []>>


<<if random(1,100) > 50>>

<<set $oneTimeDisableDisability = 1>>
<<set $activeSlave = GenerateNewSlave()>>
<<set $activeSlave.origin = "You bought $him from the household liquidator.">>
<<set $activeSlave.devotion = random(-75,-25)>>
<<set $activeSlave.trust = random(-45,-25)>>
<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
<<set $activeSlave.oldTrust = $activeSlave.trust>>
<<run setHealth($activeSlave, jsRandom(-50, 20))>>
<<run setMissingParents($activeSlave)>>
<<set $activeSlave.canRecruit = 0>>

/% Create opposite sex chance of relative %/
<<set _oppositeSex = 0>>
<<if $activeSlave.genes != GenerateChromosome()>>
	<<set _oppositeSex = 1>>
<</if>>

The household liquidator is offering a set of siblings for sale. You are permitted to inspect both slaves.
<br><br>

<<set _relativeSlave = generateRelatedSlave($activeSlave, "younger sibling", _oppositeSex)>>
<<run _newSlaves.push($activeSlave), _newSlaves.push(_relativeSlave)>>

<<set _slaveCost = slaveCost($activeSlave)>>
<<if $slavesSeen > $slaveMarketLimit>><<set _slaveCost += Math.trunc(_slaveCost*(($slavesSeen-$slaveMarketLimit)*0.1))>><</if>>
<<set _totalCost = _slaveCost*3>>

<<elseif random(1,100) > 20>>

/% Begin younger parents submod. %/
<<set $activeSlaveOneTimeMinAge = $fertilityAge + $minimumSlaveAge>>
<<set $activeSlaveOneTimeMaxAge = 42>>
<<set $one_time_age_overrides_pedo_mode = 1>> /% Old enough to have a child who can be a slave. %/
/% End younger parents submod. %/
<<set $oneTimeDisableDisability = 1>>
<<set $activeSlave = GenerateNewSlave()>>
<<set $activeSlave.origin = "You bought $him from the household liquidator.">>
<<set $activeSlave.devotion = random(-75,-25)>>
<<set $activeSlave.trust = random(-45,-25)>>
<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
<<set $activeSlave.oldTrust = $activeSlave.trust>>
<<run setHealth($activeSlave, jsRandom(-50, 20))>>
<<if $activeSlave.vagina > -1>><<set $activeSlave.boobs += 100>><</if>>
<<set $activeSlave.butt += 1>>
<<if $activeSlave.vagina > -1>><<set $activeSlave.vagina += 1>><</if>>
<<if $activeSlave.vagina > -1>><<set $activeSlave.counter.birthsTotal = 1>><</if>>
<<set $activeSlave.canRecruit = 0>>

/% Create opposite sex chance of relative %/
<<set _oppositeSex = 0>>
<<if $activeSlave.genes != GenerateChromosome()>>
	<<set _oppositeSex = 1>>
<</if>>

<<setLocalPronouns $activeSlave>>
The household liquidator is offering a $mother and $his <<if $activeSlave.genes == "XX" && _oppositeSex == 1>>son<<elseif $activeSlave.genes == "XY" && _oppositeSex == 1>>daughter<<else>>$daughter<</if>> for sale. You are permitted to inspect both slaves.
<br><br>

<<set _relativeSlave = generateRelatedSlave($activeSlave, "child", _oppositeSex)>>
<<run _newSlaves.push($activeSlave), _newSlaves.push(_relativeSlave)>>

<<set _slaveCost = slaveCost($activeSlave)>>
<<if $slavesSeen > $slaveMarketLimit>><<set _slaveCost += Math.trunc(_slaveCost*(($slavesSeen-$slaveMarketLimit)*0.1))>><</if>>
<<set _totalCost = _slaveCost*3>>

<<else>>

<<set $oneTimeDisableDisability = 1>>
<<set $activeSlave = GenerateNewSlave()>>
<<set $activeSlave.origin = "You bought $him from the household liquidator.">>
<<set $activeSlave.devotion = random(-75,-25)>>
<<set $activeSlave.trust = random(-45,-25)>>
<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
<<set $activeSlave.oldTrust = $activeSlave.trust>>
<<run setHealth($activeSlave, jsRandom(-50, 20))>>
<<run setMissingParents($activeSlave)>>
<<set $activeSlave.canRecruit = 0>>

The household liquidator is offering something special: identical twins. The markup is huge, but the merchandise isn't something you see every day.
<br><br>

<<set _relativeSlave = generateRelatedSlave($activeSlave, "twin")>>
<<run _newSlaves.push($activeSlave), _newSlaves.push(_relativeSlave)>>

<<set _slaveCost = slaveCost($activeSlave)>>
<<if $slavesSeen > $slaveMarketLimit>><<set _slaveCost += Math.trunc(_slaveCost*(($slavesSeen-$slaveMarketLimit)*0.1))>><</if>>
<<set _totalCost = _slaveCost*4>>

<</if>>

The price is <<print cashFormatColor(_totalCost)>>. <<if $slavesSeen > $slaveMarketLimit>> You have cast such a wide net for slaves this week that it is becoming more expensive to find more for sale. Your reputation helps determine your reach within the slave market.<</if>>
<br><br>

<<if $cash >= _totalCost>>
	[[Buy their slave contract|Bulk Slave Intro][$newSlaves = _newSlaves, $newSlaves.forEach((s) => cashX(forceNeg(_totalCost/$newSlaves.length), "slaveTransfer", s))]]
<<else>>
	//You lack the necessary funds to buy these slaves.//
<</if>>
<br>[[Decline to purchase them and check out another set of slaves|Household Liquidator][$slavesSeen += 2]]
<br><br>

<<includeDOM App.UI.MultipleInspect(_newSlaves, true, true, true)>>

src/uncategorized/householdLiquidator.tw