:: eliteTakeOverResult [nobr]

<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */

<<if $Bodyguard != 0>>
	<<setLocalPronouns $Bodyguard>>
<</if>>
<<setNonlocalPronouns $seeDicks>>

<<switch $eliteFate>>
<<case 0>>
	<<if $MercenariesMessageSent == 1>>
		The mercenaries open fire as ordered. Shortly after, the conspiring Elite are dead.
	<<elseif $SpecialForcesMessageSent == 1>>
		The soldiers open fire as ordered. Shortly after, the conspiring Elite are dead.
	<<elseif $eliteLeft <= 9 && $rep >= 10000>>
		Your citizens freeze for a second, then obey your orders. Shortly after, the conspiring Elite are dead.
	<<else>>
		Your bodyguard opens fire as ordered. Shortly after, the conspiring Elite are dead.
	<</if>>
<<case 1>>
	<<if random(0,100) > 50>>
		An Elite bites down on a cyanide pill hidden in a false tooth and
		<<if random(0,100) > 75>>
			takes the coward's way out (how predictable), frothing at the mouth.
			<<set $eliteDead += 1>>
		<<else>>
			experiences great pain but unfortunately (for them at least) survives.
		<</if>>
	<</if>>
	<<if $MercenariesMessageSent == 1>>
		<br>The <<if $eliteLeft < $eliteTotal>>remaining<</if>> Elite are quickly captured and enslaved by your mercenaries.
	<<elseif $SpecialForcesMessageSent == 1>>
		<br>The <<if $eliteLeft < $eliteTotal>>remaining<</if>> Elite are quickly captured and enslaved by your soldiers.
	<<elseif $eliteLeft <= 9 && $rep >= 10000>>
		<br>The <<if $eliteLeft < $eliteTotal>>remaining<</if>> Elite are quickly captured and enslaved by your loyal citizens.
	<<else>>
		<br>The <<if $eliteLeft < $eliteTotal>>remaining<</if>> Elite are quickly captured and enslaved by your bodyguard.
	<</if>>
<<case 2>>
	<<if random(0,100) > 50>>
			An Elite bites down on a cyanide pill hidden in a false tooth and
		<<if random(0,100) > 75>>
			takes the coward's way out (how predictable), frothing at the mouth.
			<<set $eliteDead += 1>>
		<<else>>
			experiences great pain but unfortunately (for them at least) survives.
		<</if>>
	<</if>>
	<<if $MercenariesMessageSent == 1>>
		<br>The <<if $eliteLeft < $eliteTotal>>remaining<</if>> Elite are quickly captured, abused and enslaved.
		The officer is thankful for giving the troops a chance to let off some stream. Two soldiers decide to double team an Elite; one ass fucks while the other facefucks.
		Another soldier takes a particular interest in an Elite and politely asks you
		"<<= properTitle()>>, can I keep _himU?"
		<br><span id="choice1">
			<<link "No">>
				<<replace "#choice1">>
					Your rejection upsets some of them, but their professionalism ensures it isn't visible.
				<</replace>>
			<</link>>
			|
			<<link "Yes">>
				<<set $eliteLeft -= 1>>
				<<run repX(2500, "event")>>
				<<replace "#choice1">>
					For a second your acceptance shocks them. Once they recover they are very grateful. "Thank you <<= properTitle()>>, I'll make sure to look after _himU." Soon the story spreads of the kind arcology owner, enhancing your reputation.
				<</replace>>
			<</link>>
		</span>
	<<elseif $SpecialForcesMessageSent>>
		<br>The <<if $eliteLeft < $eliteTotal>>remaining<</if>> Elite are quickly captured, abused and enslaved.
		<<if $SF.Depravity <= 0.3>>
			Two soldiers decide to double team an Elite; one gropes _hisU ass while the other gropes _hisU tits.
		<<elseif $SF.Depravity <= 1.2>>
			Two soldiers decide to double team an Elite; one assfucks while the other facefucks.
		<<else>>
			Two soldiers decide to double team an Elite; one breaks out their knife and begins to make little breaks in the Elite's skin while the other soldier facefucks them.
		<</if>>
		Another soldier takes a particular interest in an Elite and politely asks you "<<= properTitle()>>, can I keep _himU?"
		<br><span id="choice1">
			<<link "No">>
				<<set _SFHappyEverAfter = 0>>
				<<replace "#choice1">>
					Your rejection upsets some of them, but their professionalism ensures it isn't visible.
				<</replace>>
			<</link>>
			|
			<<link "Yes">>
				<<set $eliteLeft -= 1, _SFHappyEverAfter = 1>>
				<<run repX(2500, "event")>>
				<<replace "#choice1">>
					For a second your acceptance shocks them. Once they recover they are very grateful. "Thank you <<= properTitle()>>, I'll make sure to look after _himU." Soon the story spreads of the kind arcology owner, enhancing your reputation.
				<</replace>>
			<</link>>
		</span>
		<<if $SF.MercCon.CanAttend === -1>>
			<<switch $SF.Colonel.Core>>
			<<case "kind">>
				The Colonel is shocked that you would allow her troops to do this but understands that it comes with the territory.<<if _SFHappyEverAfter == 1>> "Thanks for being kind to one of my soldiers."<</if>>
			<<case "brazen" "cruel" "jaded">>
				The Colonel is grateful that you let her troops let off some steam.<<if _SFHappyEverAfter == 1>> "Thanks for being kind to one of my soldiers."<</if>>
			<</switch>>
		<</if>>
		<<set $SF.Depravity += 0.05>>
	<<elseif $eliteLeft <= 9 && $rep >= 10000>>
		<<if $arcologies[0].FSDegradationist != "unset">>
			An evil smile appears on the faces of your loyal citizens, while the surviving Elite freeze in terror. The impromptu festivity will go on for hours, getting more and more depraved.
		<<else>>
			While some citizens respectfully step out, some join you in the fun. The impromptu festivities will go on for hours, getting more and more depraved.
		<</if>>
	<<else>>
		<<if $Bodyguard.fetish == "sadist">>$Bodyguard.slaveName gets out $his melee weapon and starts to give them many small cuts, the look of pleasure on $his face is evident.<<else>>$Bodyguard.slaveName ties them and then gets out $his melee weapon and starts to abuse them; $his face is blank.<</if>>
		<br>Shortly after, the terrified <<if $eliteLeft < $eliteTotal>>remaining<</if>> Elite are quickly brought away to be officially enslaved.
	<</if>>
<</switch>>

<<if $eliteFate >= 1>>
	<<if $eliteVegetable == 1>>
		<<set $eliteLeft-->>
		<<set $activeSlaveOneTimeMinAge = 25>>
		<<set $activeSlaveOneTimeMaxAge = ($retirementAge-2)>>
		<<set $oneTimeDisableDisability = 1>>
		<<if $arcologies[0].FSSupremacistLawME == 1>>
			<<set $fixedRace = $arcologies[0].FSSupremacistRace>>
		<<elseif $arcologies[0].FSSubjugationistLawME == 1>>
			<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
			<<set $fixedRace = _races.random()>>
		<</if>>
		<<if $seeDicks == 0>>
			<<set $activeSlave = GenerateNewSlave("XX")>>
		<<elseif $seeDicks == 100>>
			<<set $activeSlave = GenerateNewSlave("XY")>>
		<<elseif random(1,100) > 50>> /* 50% chance of getting girl or boy */
			<<set $activeSlave = GenerateNewSlave("XX")>>
		<<else>>
			<<set $activeSlave = GenerateNewSlave("XY")>>
		<</if>>
		<<set _origin = "$He was a member of the Societal Elite, captured in their failed attempt at expressing their displeasure.">>
		<<set $activeSlave.origin = _origin>>
		<<set $activeSlave.career = "a well connected individual">>
		<<set $activeSlave.prestige = either(2,2,3)>> /* 33% chance of getting level 3 prestige */
		<<set $activeSlave.prestigeDesc = "$He was once considered influential in society, but now $he's the one getting fucked.">>
		<<set $activeSlave.face = random(70,100)>>
		<<set $activeSlave.devotion = random(-10,-20)>>
		<<set $activeSlave.trust = random(-20,-30)>>
		<<if $activeSlave.boobShape == "saggy" || $activeSlave.boobShape == "downward-facing">>
			<<set $activeSlave.boobShape = either("perky", "torpedo-shaped", "wide-set")>>
		<</if>>
		<<set $activeSlave.fetish = "mindbroken">>
		<<set $activeSlave.pubicHStyle = "waxed">>
		<<set $activeSlave.underArmHStyle = "waxed">>
		<<set $activeSlave.anus = 0>>
		<<set $activeSlave.weight = random(10,75)>>
		<<set $activeSlave.intelligence = random(70,100)>>
		<<set $activeSlave.intelligenceImplant = 30>>
		<<set $activeSlave.skill.entertainment = 0>>
		<<set $activeSlave.skill.whoring = 0>>
		<<run setHealth($activeSlave, jsRandom(60, 75), 0, 0, 0, jsRandom(0, 20))>>
		<<set $activeSlave.canRecruit = 0>>
		<<run newSlave($activeSlave)>> /* skip New Slave Intro */
	<</if>>
	<<for _i = $eliteLeft; _i > 0; _i-->>
		<<set $activeSlaveOneTimeMinAge = 25>>
		<<set $activeSlaveOneTimeMaxAge = ($retirementAge-2)>>
		<<set $oneTimeDisableDisability = 1>>
		<<if $arcologies[0].FSSupremacistLawME == 1>>
			<<set $fixedRace = $arcologies[0].FSSupremacistRace>>
		<<elseif $arcologies[0].FSSubjugationistLawME == 1>>
			<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
			<<set $fixedRace = _races.random()>>
		<</if>>
		<<if $seeDicks == 0>>
			<<set $activeSlave = GenerateNewSlave("XX")>>
		<<elseif $seeDicks == 100>>
			<<set $activeSlave = GenerateNewSlave("XY")>>
		<<elseif random(1,100) > 50>> /* 50% chance of getting girl or boy */
			<<set $activeSlave = GenerateNewSlave("XX")>>
		<<else>>
			<<set $activeSlave = GenerateNewSlave("XY")>>
		<</if>>
		<<set _origin = "$He was a member of the Societal Elite, captured in their failed attempt at expressing their displeasure.">>
		<<set $activeSlave.origin = _origin>>
		<<set $activeSlave.career = "a well connected individual">>
		<<set $activeSlave.prestige = either(2,2,3)>>
		<<set $activeSlave.prestigeDesc = "$He was once considered influential in society, but now $he's the one getting fucked.">>
		<<set $activeSlave.face = random(70,100)>>
		<<set $activeSlave.devotion = random(-10,-20)>>
		<<set $activeSlave.trust = random(-20,-30)>>
		<<if $eliteFate == 2 && random(1,100) >= 75>> /* 25% chance of getting mindbroken elites if they were abused */
			<<set $activeSlave.fetish = "mindbroken">>
		<</if>>
		<<if $activeSlave.boobShape == "saggy" || $activeSlave.boobShape == "downward-facing">>
			<<set $activeSlave.boobShape = either("perky", "torpedo-shaped", "wide-set")>>
		<</if>>
		<<set $activeSlave.pubicHStyle = "waxed">>
		<<set $activeSlave.underArmHStyle = "waxed">>
		<<set $activeSlave.anus = 0>>
		<<set $activeSlave.weight = random(-30,75)>>
		<<set $activeSlave.intelligence = random(0,60)>>
		<<set $activeSlave.intelligenceImplant = 30>>
		<<set $activeSlave.skill.entertainment = 0>>
		<<set $activeSlave.skill.whoring = 0>>
		<<run setHealth($activeSlave, jsRandom(60, 75), 0, 0, 0, jsRandom(0, 20))>>
		<<set $activeSlave.canRecruit = 0>>
		<<set $activeSlave.behavioralFlaw = either("arrogant", "bitchy")>>
		<<run newSlave($activeSlave)>> /* skip New Slave Intro */
	<</for>>
<</if>>

/* clean up */
<<set $failedElite = 0, $eugenicsFullControl = 1>>

src/pregmod/eliteTakeOverResult.tw