code:
:: Club Advertisement [nobr]

<<switch $clubDecoration>>
<<case "Roman Revivalist">>
	$clubNameCaps is decorated like a Roman villa's entertainment rooms. There is a lot of white stone, plaster, and terracotta.
<<case "Aztec Revivalist">>
	$clubNameCaps is decorated with obsidian figures inserted in the lime walls and giant oak pillars that give a homey feeling to the otherwise cold building.
<<case "Egyptian Revivalist">>
	$clubNameCaps is decorated like a room in an ancient Egyptian palace. There are columns of warm stone and pools of clear water full of aquatic plants.
<<case "Edo Revivalist">>
	$clubNameCaps is furnished as an Edo period theater. Performances of the traditional Japanese arts can be seen here, though more modern dancing happens in the evenings. In either case, geisha girls are present and willing.
<<case "Arabian Revivalist">>
	$clubNameCaps is designed like an open plaza in an Arabian palace, with a raised stage in the center for erotic dancing. Diaphanous, flowing curtains billow across the space, dispersing the narcotic smoke billowing from a score of hookahs.
<<case "Chinese Revivalist">>
	$clubNameCaps is furnished as an old Chinese disorderly house. It's intentionally packed in so that closeness and good cheer is obligatory here; prominent citizens share tables while their hangers-on jostle for room.
<<case "Chattel Religionist">>
	$clubNameCaps isn't a religious establishment, but it almost looks like one. It's clean and proper, with beams of natural light that come down to highlight holy sex slaves' bodies.
<<case "Degradationist">>
	$clubNameCaps has a perverted, debauched appearance. The décor is utilitarian so it can be cleaned easily, and the reason is obvious. Many patrons have brought their own slaves to publicly rape here.
<<case "Repopulation Focus">>
	$clubNameCaps has a gaudy appearance. There are lots of deep soft chairs for pregnant patrons and slaves to rest in and screens showing girls with large bellies lining the walls.
<<case "Eugenics">>
	$clubNameCaps has a gaudy appearance. There are screens lining the walls discouraging unprotected slave sex. The real action happens in the several exclusive rooms reserved for society's best.
<<case "Asset Expansionist">>
	$clubNameCaps has a gaudy appearance. There are a lot of neon lights and there are screens everywhere, showing off big tits and plush asses.
<<case "Transformation Fetishist">>
	$clubNameCaps has a gaudy appearance. There are a lot of neon lights and there are screens everywhere, showing off huge fake tits and plastic dick sucking lips.
<<case "Gender Radicalist">>
	$clubNameCaps has a gaudy appearance. There are a lot of neon lights and there are screens everywhere, showing closeups of cocks fucking every imaginable orifice.
<<case "Gender Fundamentalist">>
	$clubNameCaps has an old world appearance, a decidedly throwback atmosphere harking back to the glory days of cultures past.
<<case "Physical Idealist">>
	$clubNameCaps isn't a gym, but it smells like one. The dancing is rough and competitive, and the drinks are rich with protein.
<<case "Supremacist">>
	$clubNameCaps is decorated like an upper-class gentleman's club in the old countries of $arcologies[0].FSSupremacistRace people.
<<case "Subjugationist">>
	$clubNameCaps is decorated like an upper-class gentleman's club in the old countries which favored $arcologies[0].FSSubjugationistRace slaves.
<<case "Paternalist">>
	$clubNameCaps is handsome and well-kept, even romantic. Though the slaves here are sex slaves, every provision is made to encourage them to enjoy themselves.
<<case "Body Purist">>
	$clubNameCaps is gorgeous, decorated and kept in the height of fashionable night establishment style. The music is cutting edge and everything and everyone is elegant.
<<case "Slimness Enthusiast">>
	$clubNameCaps is distinctly gaudy, with lots of sugary drinks on offer. The music and décor are of a decidedly bubblegum quality.
<<case "Pastoralist">>
	$clubNameCaps is decorated to resemble a frontier disorderly house. The drinks are pounded straight, and there's a set of swinging doors for bad men to part dramatically as they enter.
<<case "Maturity Preferentialist">>
	$clubNameCaps is surprisingly elegant. The music consists of refined remixes of traditional dance music, offering slaves and citizens the chance to dance beautifully together.
<<case "Youth Preferentialist">>
	$clubNameCaps is deafeningly loud. There's a bright light show running, offering staccato glimpses of the scene out on the dance floor.
<<case "Hedonistic">>
	$clubNameCaps has a gaudy appearance. The dance floor is extra large to accommodate its extra wide dancers, though bodies grinding against each other is an inevitability. Plenty of roomy, comfortable booths encircle the room for an exhausted citizen to relax with his plush dance partner, and a wide selection of greasy food accompanies the drinks. <<if $arcologies[0].FSHedonisticDecadenceResearch == 1>>Platters of food are complementary for feeding slaves<<else>>Feeders are available in the booths to feed tired slaves<</if>> while they get fondled.
<</switch>>

<<if $clubAdsSpending > 0>>
	Screens outside the entrance are showing softcore music videos to advertise $clubName.
	<<if $clubAdsOld == 1>>
		The featured strippers are all MILFs.
	<<elseif $clubAdsOld == -1>>
		The featured strippers are all nice and young.
	<<elseif $clubAdsOld == -2>>
		The featured strippers are all teenagers.
	<<elseif $clubAdsOld == -3>>
		The featured strippers are all lolis.
	<<else>>
		The featured strippers vary in age.
	<</if>>
	<<if $clubAdsStacked == 1>>
		Lots of bouncing breasts and butts
	<<elseif $clubAdsStacked == -1>>
		Lots of trim breasts and shapely butts
	<<else>>
		A variety of breast and butt sizes and shapes
	<</if>>
	are on display, and
	<<if $clubAdsImplanted == 1>>
		most of these are augmented by implants.
	<<elseif $clubAdsImplanted == -1>>
		they're all natural.
	<<else>>
		some are augmented by implants.
	<</if>>
	<<if $seePreg == 1>>
		<<if $clubAdsPreg == 1>>
			Most of strippers have firm, rounded bellies.
		<<elseif $clubAdsPreg == -1>>
			Most of the strippers have firm, flat bellies.
		<<else>>
			Some of the strippers are pregnant.
		<</if>>
	<</if>>
	<<if $clubAdsModded == 1>>
		Everything is heavily pierced and tattooed.
	<<elseif $clubAdsModded == -1>>
		Everything is free of tattoos and piercings.
	<<else>>
		Some of these assets are tattooed and pierced, and some aren't.
	<</if>>
	The strippers get naked quickly, and show off
	<<if $clubAdsXX == 1>>
		their pussies and assholes.
	<<elseif $clubAdsXX == -1>>
		their assholes.
	<<else>>
		their holes.
	<</if>>
<</if>>

<<if $clubAdsSpending >= 5000>>
	Advertisements based on these scenes run constantly in media across $arcologies[0].name, and there's an active merchandising campaign underway to promote your club and its girls.
<<elseif $clubAdsSpending >= 4000>>
	Advertisements based on these scenes run constantly in media across $arcologies[0].name.
<<elseif $clubAdsSpending >= 3000>>
	Advertisements based on these scenes are run in media across $arcologies[0].name.
<<elseif $clubAdsSpending >= 2000>>
	Advertisements based on these scenes run regularly in arcology media.
<<elseif $clubAdsSpending >= 1000>>
	Advertisements based on these scenes run occasionally in arcology media.
<<else>>
	$arcologies[0].name has a robust internal media that could be used to bring patrons into the club.
<</if>>

You are spending @@.red;<<print cashFormat($clubAdsSpending)>>@@ each week to advertise $clubName.

<<if $clubAdsSpending > 900>>
	<<link "Decrease">><<set $clubAdsSpending -= 1000>><<goto "Club Advertisement">><</link>> |
<<else>>
	Decrease |
<</if>>
<<if $clubAdsSpending < 5000>>
	<<link "Increase">><<set $clubAdsSpending += 1000>><<goto "Club Advertisement">><</link>>
<<else>>
	Increase
<</if>>

__Design Club Ad Campaign__ //Will replace relevant variety bonuses//

Asset size:
<<if $clubAdsStacked != 1>><<link "Stacked">><<set $clubAdsStacked = 1>><<goto "Club Advertisement">><</link>> | <<else>>Stacked | <</if>>
<<if $clubAdsStacked != -1>><<link "Slim">><<set $clubAdsStacked = -1>><<goto "Club Advertisement">><</link>> | <<else>>Slim | <</if>>
<<if $clubAdsStacked != 0>><<link "Variety">><<set $clubAdsStacked = 0>><<goto "Club Advertisement">><</link>><<else>>Variety<</if>>

Asset origin:
<<if $clubAdsImplanted != 1>><<link "Implants">><<set $clubAdsImplanted = 1>><<goto "Club Advertisement">><</link>> | <<else>>Implants | <</if>>
<<if $clubAdsImplanted != -1>><<link "All natural">><<set $clubAdsImplanted = -1>><<goto "Club Advertisement">><</link>> | <<else>>All natural | <</if>>
<<if $clubAdsImplanted != 0>><<link "Variety">><<set $clubAdsImplanted = 0>><<goto "Club Advertisement">><</link>><<else>>Variety<</if>>

Body mods:
<<if $clubAdsModded != 1>><<link "Modded">><<set $clubAdsModded = 1>><<goto "Club Advertisement">><</link>> | <<else>>Modded | <</if>>
<<if $clubAdsModded != -1>><<link "Unmodded">><<set $clubAdsModded = -1>><<goto "Club Advertisement">><</link>> | <<else>>Unmodded | <</if>>
<<if $clubAdsModded != 0>><<link "Variety">><<set $clubAdsModded = 0>><<goto "Club Advertisement">><</link>><<else>>Variety<</if>>

Age:
<<if $clubAdsOld != 1>><<link "MILF">><<set $clubAdsOld = 1>><<goto "Club Advertisement">><</link>> | <<else>>MILF | <</if>>
<<if $clubAdsOld != -1>><<link "Young">><<set $clubAdsOld = -1>><<goto "Club Advertisement">><</link>> | <<else>>Young | <</if>>
<<if $minimumSlaveAge < 18>>
<<if $clubAdsOld != -2>><<link "Teen">><<set $clubAdsOld = -2>><<goto "Club Advertisement">><</link>> | <<else>>Teen | <</if>>
<</if>>
<<if $minimumSlaveAge < 13>>
<<if $clubAdsOld != -3>><<link "Loli">><<set $clubAdsOld = -3>><<goto "Club Advertisement">><</link>> | <<else>>Loli | <</if>>
<</if>>
<<if $clubAdsOld != 0>><<link "Variety">><<set $clubAdsOld = 0>><<goto "Club Advertisement">><</link>> <<else>>Variety<</if>>

<<if $seePreg != 0>>
	Pregnancy:
	<<if $clubAdsPreg != 1>><<link "Gravid">><<set $clubAdsPreg = 1>><<goto "Club Advertisement">><</link>> | <<else>>Gravid | <</if>>
	<<if $clubAdsPreg != -1>><<link "None">><<set $clubAdsPreg = -1>><<goto "Club Advertisement">><</link>> | <<else>>None | <</if>>
	<<if $clubAdsPreg != 0>><<link "Variety">><<set $clubAdsPreg = 0>><<goto "Club Advertisement">><</link>><<else>>Variety<</if>>

<</if>>

<<if $seeDicks != 0>>
	Genitalia:
	<<if $clubAdsXX != 1>><<link "Pussies">><<set $clubAdsXX = 1>><<goto "Club Advertisement">><</link>> | <<else>>Pussies | <</if>>
	<<if $clubAdsXX != -1>><<link "Dicks">><<set $clubAdsXX = -1>><<goto "Club Advertisement">><</link>> | <<else>>Dicks | <</if>>
	<<if $clubAdsXX != 0>><<link "Variety">><<set $clubAdsXX = 0>><<goto "Club Advertisement">><</link>> <<else>>Variety<</if>>

<</if>>


code:
:: Club Report [nobr]

<<SlaveIDSort $ClubiIDs>>
<<set _DL = $ClubiIDs.length, $clubSlaves = _DL, _SL = $slaves.length, $clubBonuses = 0, $legendaryEntertainerID = 0, _FLsFetish = 0>>
<<set $legendaryWombID = 0>>
<<set _implanted =0, _modded = 0, _old = 0, _pure = 0, _slim = 0, _stacked = 0, _unmodded = 0, _XX = 0, _XY = 0, _young = 0, _pregYes = 0, _pregNo = 0, _minBonus = 50, _maxBonus = 150>>

<<set $facility = $facility || {}, $facility.club = initFacilityStatistics($facility.club)>>

<<if $DJ != 0>>
	<<set _FLs = $slaveIndices[$DJ.ID]>>

	<<if ($slaves[_FLs].health < -80)>>
		<<set $slaves[_FLs].health += 20>>
	<<elseif $slaves[_FLs].health < -40>>
		<<set $slaves[_FLs].health += 15>>
	<<elseif $slaves[_FLs].health < 0>>
		<<set $slaves[_FLs].health += 10>>
	<<elseif $slaves[_FLs].health < 90>>
		<<set $slaves[_FLs].health += 7>>
	<</if>>
	<<if $slaves[_FLs].devotion <= 60>>
		<<set $slaves[_FLs].devotion += 5>>
	<</if>>
	<<if $slaves[_FLs].trust < 60>>
		<<set $slaves[_FLs].trust += 3>>
	<</if>>
	<<if $slaves[_FLs].fetishStrength <= 95>>
		<<if $slaves[_FLs].fetish != "humiliation">>
			<<if fetishChangeChance($slaves[_FLs]) > random(0,100)>>
				<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1, $slaves[_FLs].fetish = "humiliation">>
			<</if>>
		<<elseif $slaves[_FLs].fetishKnown == 0>>
			<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1>>
		<<else>>
			<<set _FLsFetish = 2, $slaves[_FLs].fetishStrength += 4>>
		<</if>>
	<</if>>
	<<if $slaves[_FLs].livingRules != "luxurious">>
		<<set $slaves[_FLs].livingRules = "luxurious">>
	<</if>>
	/% Make sure we have registered living expenses as for any other slave %/
	<<run getSlaveStatisticData($DJ, $facility.club)>>
	<<set $DJ = $slaves[_FLs]>>
	<<setLocalPronouns $DJ>>
	    <<= SlaveFullName($DJ)>> is performing as the DJ.
	<<if $DJ.relationship == -3 && $DJ.devotion > 50>>
		$He tries $his best to be your energetic, cheerful wife.
	<</if>>
	<<if (_FLsFetish == 1)>>
		$He's expected to be the innovative, beautiful DJ spinning beats one minute, and come out of $his booth to grind on the floor the next; $he enjoys the interplay, and finds greater @@.lightcoral;pleasure in exhibitionism.@@
	<<elseif (_FLsFetish == 2)>>
		Every day $he gets to enjoy hundreds of stares on $his skin, and @@.lightsalmon;becomes more of an exhibitionist.@@
	<</if>>
	<<if $DJ.eyes == -2>>
		$His lack of eyesight doesn't slow $him down; rather, it strengthens $his other senses. $His tracks have a distinct sound, since $he experiences noise as $his sight.
	<</if>>
	<<if ($DJ.skill.entertainment <= 10)>>
		Though $DJ.slaveName does $his best to lead on the club, with $his lack of skill $he can do little.
	<<elseif ($DJ.skill.entertainment <= 30)>>
		$DJ.slaveName's basic skills marginally @@.green;improve@@ the atmosphere in $clubName.
	<<elseif ($DJ.skill.entertainment <= 60)>>
		$DJ.slaveName's skills @@.green;improve@@ the atmosphere in $clubName.
	<<elseif ($DJ.skill.entertainment < 100)>>
		$DJ.slaveName's skills greatly @@.green;improve@@ the atmosphere in $clubName.
	<<elseif ($DJ.skill.entertainment >= 100)>>
		$DJ.slaveName's mastery immensely @@.green;improves@@ the atmosphere in $clubName.
	<</if>>
	<<if ($DJ.muscles > 5) && ($DJ.muscles <= 95)>>
		$His toned body helps $him lead $his fellow club girls by letting $him dance all night.
	<</if>>
	<<if ($DJ.intelligence+$DJ.intelligenceImplant > 15)>>
		$He's smart enough to make an actual contribution to the music, greatly enhancing the entire experience.
	<</if>>
	<<if ($DJ.face > 95)>>
		$His great beauty is a further draw, even when $he's in $his DJ booth, but especially when $he comes out to dance.
	<</if>>
	<<if setup.DJCareers.includes($DJ.career)>>
		$He has musical experience from $his life before $he was a slave, a grounding that gives $his tracks actual depth.
	<<elseif $DJ.skill.DJ >= $masteredXP>>
		$He has musical experience from working for you, giving $his tracks actual depth.
	<<else>>
		<<set $slaves[_FLs].skill.DJ += random(1,Math.ceil(($DJ.intelligence+$DJ.intelligenceImplant)/15) + 8)>>
	<</if>>
	<<if (_DL + $slavesGettingHelp < 10)>>
		<<set $i = _FLs>> /* apply following SA passages to facility leader */
		<<if ($legendaryEntertainerID == 0) && ($slaves[_FLs].prestige == 0) && ($slaves[_FLs].skill.entertainment >= 100) && ($slaves[_FLs].devotion > 50)>>
			<<set $legendaryEntertainerID = $slaves[_FLs].ID>>
		<</if>>
		<<if (_DL+$slavesGettingHelp < 10)>>
			<<set $i = _FLs>> /* apply following SA passages to facility leader */
			<<if ($legendaryEntertainerID == 0) && ($slaves[_FLs].prestige == 0) && ($slaves[_FLs].skill.entertainment >= 100) && ($slaves[_FLs].devotion > 50)>>
				<<set $legendaryEntertainerID = $slaves[_FLs].ID>>
			<</if>>

    Since $he doesn't have enough sluts in $clubName to make it worthwhile for $him to be on stage 24/7, $he spends $his extra time slutting it up $himself. $He has sex with $beauty citizens, @@.green;pleasing them immensely,@@ since it's more appealing to fuck the DJ than some club slut.
			<<if $showEWD != 0>>

    $He <<= saServeThePublic($slaves[$i])>>
			<<else>>
				<<run saServeThePublic($slaves[$i])>>
			<</if>>
			/* The "extra" that she makes.  Move into saServeThePublic to match saWhore, someday. */
			<<run repX(Math.trunc(($beauty*$FResult)*(1+(0.003*$slaves[_FLs].skill.entertainment))*0.1*0.5), "publicServantClub", $slaves[_FLs])>>
		<</if>>
		<<run repX(Math.trunc(($slaves[_FLs].sexAmount*$slaves[_FLs].sexQuality)*(1+(0.003*$slaves[_FLs].skill.entertainment))*0.1*0.5), "publicServantClub", $slaves[_FLs])>>
	<</if>>
	<<if (_DL > 0)>>

<</if>>
<</if>>

<<if (_DL > 0)>>
	<<set _possibleBonuses = 0>>
	    <<if (_DL != 1)>>''The _DL slaves pleasing citizens in $clubName''<<else>>''The one slave pleasing citizens in $clubName''<</if>> worked hard to @@.green;increase your reputation@@ this week.
<</if>>

<<if ($DJ != 0)>>
	<<set $i = _FLs>> /* apply following SA passages to facility leader */
	<<if $showEWD != 0>>

		/* 000-250-006 */
		<<if $seeImages && $seeReportImages>>

			<<SlaveArt $slaves[_FLs] 0 0>>

		<</if>>
		/* 000-250-006 */
		''__@@.pink;<<= SlaveFullName($slaves[_FLs])>>@@__'' is performing as the DJ in $clubName.

		<<= saChoosesOwnClothes($slaves[$i])>>
		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>

<<include "SA devotion">>
	<<else>>
		<<silently>>
		<<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>>
		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<<include "SA devotion">>
		<</silently>>
	<</if>>
	<<set $DJ = $slaves[_FLs]>>
	<<if isSlim($slaves[_FLs])>>
		<<set _slim += 1>>
	<</if>>
	<<if isStacked($slaves[_FLs])>>
		<<set _stacked += 1>>
	<</if>>
	<<if isYoung($slaves[_FLs])>>
		<<set _young += 1>>
	<<else>>
		<<set _old += 1>>
	<</if>>
	<<if SlaveStatsChecker.isModded($slaves[_FLs])>>
		<<set _modded += 1>>
	<<elseif SlaveStatsChecker.isUnmodded($slaves[_FLs])>>
		<<set _unmodded += 1>>
	<</if>>
	<<if isXY($slaves[_FLs])>>
		<<set _XY += 1>>
	<<else>>
		<<set _XX += 1>>
	<</if>>
	<<if isPure($slaves[_FLs])>>
		<<set _pure += 1>>
	<<else>>
		<<set _implanted += 1>>
	<</if>>
	<<if isPreg($slaves[_FLs])>>
		<<set _pregYes += 1>>
	<<elseif isNotPreg($slaves[_FLs])>>
		<<set _pregNo += 1>>
	<</if>>
<</if>>

<<if (_DL > 0)>>
	<<for _dI = 0; _dI < _DL; _dI++>>
		<<set $i = $slaveIndices[$ClubiIDs[_dI]]>>
		<<setLocalPronouns $slaves[$i]>>
		<<if ($legendaryEntertainerID == 0) && ($slaves[$i].prestige == 0) && ($slaves[$i].skill.entertainment >= 100) && ($slaves[$i].devotion > 50)>>
			<<set $legendaryEntertainerID = $slaves[$i].ID>>
		<</if>>
		<<if ($legendaryWombID == 0) && ($slaves[$i].amp != 1) && ($slaves[$i].preg > $slaves[$i].pregData.normalBirth/1.33) && ($slaves[$i].broodmother == 0) && ($slaves[$i].eggType == "human") && ($slaves[$i].counter.births > 10) && ($slaves[$i].devotion > 50) && ($slaves[$i].prestige == 0)>>
			<<set $legendaryWombID = $slaves[$i].ID>>
		<</if>>
		<<if ($slaves[$i].devotion <= 20) && ($slaves[$i].trust >= -20)>>
			<<set $slaves[$i].devotion -= 5, $slaves[$i].trust -= 5>>
		<<elseif ($slaves[$i].devotion < 45)>>
			<<set $slaves[$i].devotion += 4>>
		<<elseif ($slaves[$i].devotion > 50)>>
			<<set $slaves[$i].devotion -= 4>>
		<</if>>

		<<if ($slaves[$i].trust < 30)>>
			<<set $slaves[$i].trust += 5>>
		<</if>>

		<<if ($slaves[$i].health < -80)>>
			<<set $slaves[$i].health += 20>>
		<<elseif ($slaves[$i].health < -40)>>
			<<set $slaves[$i].health += 15>>
		<<elseif ($slaves[$i].health < 0)>>
			<<set $slaves[$i].health += 10>>
		<<elseif ($slaves[$i].health < 90)>>
			<<set $slaves[$i].health += 7>>
		<</if>>

		<<if $slaves[$i].livingRules != "normal">>
			<<set $slaves[$i].livingRules = "normal">>
		<</if>>

		<<if $showEWD != 0>>

			/* 000-250-006 */
			<<if $seeImages && $seeReportImages>>

				<<SlaveArt $slaves[$i] 0 0>>

			<</if>>
			/* 000-250-006 */
			''__@@.pink;<<= SlaveFullName($slaves[$i])>>@@__''
			<<if $slaves[$i].choosesOwnAssignment == 2>>
				<<include "SA chooses own job">>
			<<else>>
				is serving in $clubName.
			<</if>>

    $He <<= saServeThePublic($slaves[$i])>>

			<<= saChoosesOwnClothes($slaves[$i])>>
			<<include "SA rules">>
			<<include "SA diet">>
			<<include "SA long term effects">>
			<<include "SA drugs">>
			<<include "SA relationships">>
			<<include "SA rivalries">>

<<include "SA devotion">>
		<<else>>
			<<silently>>
			<<include "SA chooses own job">>
			<<run saServeThePublic($slaves[$i])>>
			<<run saChoosesOwnClothes($slaves[$i])>>
			<<include "SA rules">>
			<<include "SA diet">>
			<<include "SA long term effects">>
			<<include "SA drugs">>
			<<include "SA relationships">>
			<<include "SA rivalries">>
			<<include "SA devotion">>
			<</silently>>
		<</if>>
		<<if isSlim($slaves[$i])>>
			<<set _slim += 1>>
		<</if>>
		<<if isStacked($slaves[$i])>>
			<<set _stacked += 1>>
		<</if>>
		<<if isYoung($slaves[$i])>>
			<<set _young += 1>>
		<<else>>
			<<set _old += 1>>
		<</if>>
		<<if SlaveStatsChecker.isModded($slaves[$i])>>
			<<set _modded += 1>>
		<<elseif SlaveStatsChecker.isUnmodded($slaves[$i])>>
			<<set _unmodded += 1>>
		<</if>>
		<<if isXY($slaves[$i])>>
			<<set _XY += 1>>
		<<else>>
			<<set _XX += 1>>
		<</if>>
		<<if isPure($slaves[$i])>>
			<<set _pure += 1>>
		<<else>>
			<<set _implanted += 1>>
		<</if>>
		<<if isPreg($slaves[$i])>>
			<<set _pregYes += 1>>
		<<elseif isNotPreg($slaves[$i])>>
			<<set _pregNo += 1>>
		<</if>>
	<</for>>

	<<if $clubAdsSpending != 0>>
		An ad campaign is getting citizens into the club every night, and sluts that match it gratify patrons.
	<</if>>

	<<if $clubAdsSpending != 0>>
		<<if $clubAdsStacked == 1>>
			Its advertisements feature stacked girls.
			<<set _ads = 1>>
		<<elseif $clubAdsStacked == -1>>
			Its advertisements feature slim girls.
			<<set _ads = -1>>
		<<else>>
			Its advertisements feature a variety of girls, some that are slim and some others that are stacked.
			<<set _ads = 0>>
		<</if>>
	<</if>>
	<<if ($arcologies[0].FSAssetExpansionist != "unset") && ($arcologies[0].FSAssetExpansionist >= 80)>>
		Most customers prefer stacked girls.
		<<set _pref = 1>>
	<<elseif ($arcologies[0].FSSlimnessEnthusiast != "unset") && ($arcologies[0].FSSlimnessEnthusiast >= 80) >>
		Most customers prefer slim girls.
		<<set _pref = -1>>
	<<else>>
		<<if ($arcologies[0].FSAssetExpansionist == "unset") && ($arcologies[0].FSSlimnessEnthusiast == "unset")>>
			<<if ($clubAdsSpending == 0) || ($clubAdsStacked == 0)>>
				<<set _possibleBonuses++>>
				<<if (_slim > 0) && (_stacked > 0) && (Math.abs(_slim-_stacked) <= (_DL/3))>>
				<<set $clubBonuses++>>
				<<run repX(_DL*random(5,10), "club")>>
				There is a @@.green;wide@@ variety of slim and stacked slaves working the club.
				<</if>>
			<</if>>
		<</if>>
		Most customers don't have preferences for either slim or stacked slaves.
		<<set _pref = 0>>
	<</if>>
	<<if (_slim > (_DL/2))>>
		<<set _girls = -1>>
		Most of the slaves in the club are slim.
	<<elseif (_stacked > (_DL/2))>>
		<<set _girls = 1>>
		Most of the slaves in the club are stacked.
	<<else>>
		<<set _girls = 0>>
		The slaves in the club vary in slimness.
	<</if>>
	<<if _pref == 0>> /*customers don't care*/
	<<elseif ($clubAdsSpending > 0)>>
		<<if (_ads == _pref) && (_girls == _ads)>>
			<<set _adsIncome = _DL*random(20,30), $facility.club.adsIncome += _adsIncome, _clubBonuses++>>
			<<run cashX(_adsIncome, "clubAds")>>
			Its advertising for <<if _ads == 1>>stacked <<elseif _ads == -1>>slim <</if>>girls matched most customers' preferences and the girls in the club matched its advertisements. Your @@.green;reputation@@ increased slightly as a result.
			<<run repX(random(_minBonus,_maxBonus), "club")>>
		<<elseif (_ads == _pref) && (_girls != _ads)>>
			Its advertising for <<if _ads == 1>>stacked <<elseif _ads == -1>>slim <</if>>girls matched most customers preferences, but the girls in the club did not. Your @@.red;reputation@@ dropped slightly as a result.
			<<run repX(forceNeg(random(_minBonus,_maxBonus)), "club")>>
		<<elseif (_girls == _pref) && (_girls != _ads)>>
			The <<if _girls == 1>>stacked <<elseif _girls == -1>>slim <</if>>girls in the club did not match its advertisements, but since the girls in the club matched most customers preferences for <<if _pref == 1>>stacked <<elseif _pref == -1>>slim <</if>>girls, your reputation was not affected.
		<<elseif (_girls != _pref)>>
			Some customers were put off since the <<if _girls == 1>>stacked <<elseif _girls == -1>>slim <</if>>girls there did not match their preferences for <<if _pref == 1>>stacked <<elseif _pref == -1>>slim <</if>>girls. Your @@.red;reputation@@ dropped slightly as a result.
			<<run repX(forceNeg(random(_minBonus,_maxBonus)), "club")>>
		<</if>>
	<<else>>
		<<if (_girls == _pref)>>
			The <<if _girls == 1>>stacked <<elseif _girls == -1>>slim <</if>>girls in the club match most customers' preferences for <<if _pref == 1>>stacked <<elseif _pref == -1>>slim <</if>>girls. Your @@.green;reputation@@ increased slightly as a result.
			<<run repX(random(_minBonus,_maxBonus), "club")>>
		<<else>>
			Some customers were put off since the <<if _girls == 1>>stacked <<elseif _girls == -1>>slim <</if>>girls there did not match their preferences for <<if _pref == 1>>stacked <<elseif _pref == -1>>slim <</if>>girls. Your @@.red;reputation@@ dropped slightly as a result.
			<<run repX(forceNeg(random(_minBonus,_maxBonus)), "club")>>
		<</if>>
	<</if>>

	<<if ($clubAdsSpending > 0)>>
		<<if $clubAdsModded == 1>>
			Its advertisements feature girls that are heavily pierced and tattooed.
			<<set _ads = 1>>
		<<elseif $clubAdsModded == -1>>
			Its advertisements feature girls that free from piercings and tattoos.
			<<set _ads = -1>>
		<<else>>
			Its advertisements feature some girls that are tattooed and pierced, and some that aren't.
			<<set _ads = 0>>
		<</if>>
	<</if>>
	<<if ($arcologies[0].FSDegradationist != "unset") && ($arcologies[0].FSDegradationist >= 80)>>
		Most customers prefer heavily pierced and tattooed girls.
		<<set _pref = 1>>
	<<elseif ($arcologies[0].FSBodyPurist != "unset") && ($arcologies[0].FSBodyPurist >= 80) >>
		Most customers prefer natural girls.
		<<set _pref = -1>>
	<<else>>
		<<if ($arcologies[0].FSDegradationist == "unset") && ($arcologies[0].FSBodyPurist == "unset")>>
			<<if ($clubAdsSpending == 0) || ($clubAdsModded == 0)>>
				<<set _possibleBonuses++>>
				<<if (_modded > 0) && (_unmodded > 0) && (Math.abs(_modded-_unmodded) <= (_DL/3))>>
				<<set $clubBonuses++>>
				<<run repX(_DL*random(5,10), "club")>>
				There are @@.green;both@@ heavily pierced and tattooed slaves and slaves with more natural bodies filling the club.
				<</if>>
			<</if>>
		<</if>>
		Most customers don't have preferences for either natural or heavily body modded girls.
		<<set _pref = 0>>
	<</if>>
	<<if (_modded > (_DL/2))>>
		<<set _girls = 1>>
		Most of the slaves in the club are heavily pierced and tattooed.
	<<elseif (_unmodded > (_DL/2))>>
		<<set _girls = -1>>
		Most of the slaves in the club have natural unmodded bodies.
	<<else>>
		<<set _girls = 0>>
		Some girls in the club have piercings or tattoos, some do not and others have both.
	<</if>>
	<<if _pref == 0>> /*customers don't care*/
	<<elseif ($clubAdsSpending > 0)>>
		<<if (_ads == _pref) && (_girls == _ads)>>
			<<set _adsIncome = _DL*random(20,30), $facility.club.adsIncome += _adsIncome, _clubBonuses++>>
			<<run cashX(_adsIncome, "clubAds")>>
			Its advertising for <<if _ads == 1>>heavily modded <<elseif _ads == -1>>natural bodied <</if>>girls matched most customers' preferences and the girls in the club matched its advertisements. Your @@.green;reputation@@ increased slightly as a result.
			<<run repX(random(_minBonus,_maxBonus), "club")>>
		<<elseif (_ads == _pref) && (_girls != _ads)>>
			Its advertising for <<if _ads == 1>>heavily modded <<elseif _ads == -1>>natural bodied <</if>>girls matched most customers preferences, but the girls in the club did not. Your @@.red;reputation@@ dropped slightly as a result.
			<<run repX(forceNeg(random(_minBonus,_maxBonus)), "club")>>
		<<elseif (_girls == _pref) && (_girls != _ads)>>
			The <<if _girls == 1>>heavily modded <<elseif _girls == -1>>natural bodied <</if>>girls in the club did not match its advertisements, but since the girls in the club matched most customers preferences for <<if _pref == 1>>heavily modded <<elseif _pref == -1>>natural bodied <</if>>girls, your reputation was not affected.
		<<elseif (_girls != _pref)>>
			Some customers were put off since the <<if _girls == 1>>heavily modded <<elseif _girls == -1>>natural bodied <</if>>girls there did not match most customers preferences for <<if _pref == 1>>heavily modded <<elseif _pref == -1>>natural bodied <</if>>girls. Your @@.red;reputation@@ dropped slightly as a result.
			<<run repX(forceNeg(random(_minBonus,_maxBonus)), "club")>>
		<</if>>
	<<else>>
		<<if (_girls == _pref)>>
			The <<if _girls == 1>>heavily modded <<elseif _girls == -1>>natural bodied <</if>>girls in the club match most customers' preferences for <<if _pref == 1>>heavily modded <<elseif _pref == -1>>natural unmodded <</if>>girls. Your @@.green;reputation@@ increased slightly as a result.
			<<run repX(random(_minBonus,_maxBonus), "club")>>
		<<else>>
			Some customers were put off since the <<if _girls == 1>>heavily modded <<elseif _girls == -1>>natural bodied <</if>>girls there did not match most customers preferences for <<if _pref == 1>>heavily modded <<elseif _pref == -1>>natural bodied <</if>>girls. Your @@.red;reputation@@ dropped slightly as a result.
			<<run repX(forceNeg(random(_minBonus,_maxBonus)), "club")>>
		<</if>>
	<</if>>

	<<if ($clubAdsSpending > 0)>>
		<<if $clubAdsImplanted == 1>>
			Its advertisements feature girls that are augmented by implants or improved surgically.
			<<set _ads = 1>>
		<<elseif $clubAdsImplanted == -1>>
			Its advertisements feature girls that have all natural bodies.
			<<set _ads = -1>>
		<<else>>
			Its advertisements feature some girls that are surgically improved and implanted and some that are all-natural.
			<<set _ads = 0>>
		<</if>>
	<</if>>
	<<if ($arcologies[0].FSTransformationFetishist != "unset") && ($arcologies[0].FSTransformationFetishist >= 80)>>
		Most customers prefer heavily implanted and surgically enhanced girls.
		<<set _pref = 1>>
	<<elseif ($arcologies[0].FSBodyPurist != "unset") && ($arcologies[0].FSBodyPurist >= 80) >>
		Most customers prefer all-natural girls.
		<<set _pref = -1>>
	<<else>>
		<<if ($arcologies[0].FSTransformationFetishist == "unset") && ($arcologies[0].FSBodyPurist == "unset")>>
			<<if ($clubAdsSpending == 0) || ($clubAdsImplanted == 0)>>
				<<set _possibleBonuses++>>
				<<if (_implanted > 0) && (_pure > 0) && (Math.abs(_implanted-_pure) <= (_DL/3))>>
				<<set $clubBonuses++>>
				<<run repX(_DL*random(5,10), "club")>>
				Citizens in $clubName can easily find @@.yellowgreen;both@@ all-natural girls, and slaves whose beauty has been improved by surgical means.
				<</if>>
			<</if>>
		<</if>>
		Most customers don't have preferences for either all-natural or surgically enhanced and implanted girls.
		<<set _pref = 0>>
	<</if>>
	<<if (_implanted > (_DL/2))>>
		<<set _girls = 1>>
		Most of the slaves in the club are heavily implanted or surgically enhanced.
	<<elseif (_pure > (_DL/2))>>
		<<set _girls = -1>>
		Most of the slaves in the club have naturally pure bodies.
	<<else>>
		<<set _girls = 0>>
		The slaves in the club vary in body modification.
	<</if>>
	<<if _pref == 0>> /*customers don't care*/
	<<elseif ($clubAdsSpending > 0)>>
		<<if (_ads == _pref) && (_girls == _ads)>>
			<<set _adsIncome = _DL*random(20,30), $facility.club.adsIncome += _adsIncome, _clubBonuses++>>
			<<run cashX(_adsIncome, "clubAds")>>
			Its advertising for <<if _ads == 1>>implanted or surgically improved <<elseif _ads == -1>>naturally pure <</if>>girls matched most customers' preferences and the girls in the club matched its advertisements. Your @@.green;reputation@@ increased slightly as a result.
			<<run repX(random(_minBonus,_maxBonus), "club")>>
		<<elseif (_ads == _pref) && (_girls != _ads)>>
			Its advertising for <<if _ads == 1>>implanted or surgically improved <<elseif _ads == -1>>naturally pure <</if>>girls matched most customers preferences, but the girls in the club did not. Your @@.red;reputation@@ dropped slightly as a result.
			<<run repX(forceNeg(random(_minBonus,_maxBonus)), "club")>>
		<<elseif (_girls == _pref) && (_girls != _ads)>>
			The <<if _girls == 1>>implanted or surgically improved <<elseif _girls == -1>>naturally pure <</if>>girls in the club did not match its advertisements, but since the girls in the club matched most customers preferences for <<if _pref == 1>>implanted or surgically improved <<elseif _pref == -1>>naturally pure <</if>>girls, your reputation was not affected.
		<<elseif (_girls != _pref)>>
			Some customers were put off since the <<if _girls == 1>>implanted and surgically improved <<elseif _girls == -1>>naturally pure <</if>>girls there did not match their preferences for <<if _pref == 1>>implanted or surgically improved <<elseif _pref == -1>>naturally pure <</if>>girls. Your @@.red;reputation@@ dropped slightly as a result.
			<<run repX(forceNeg(random(_minBonus,_maxBonus)), "club")>>
		<</if>>
	<<else>>
		<<if (_girls == _pref)>>
			The <<if _girls == 1>>implanted or surgically improved <<elseif _girls == -1>>naturally pure <</if>>girls in the club match most customers' preferences for <<if _pref == 1>>implanted or surgically improved <<elseif _pref == -1>>natural unmodded <</if>>girls. Your @@.green;reputation@@ increased slightly as a result.
			<<run repX(random(_minBonus,_maxBonus), "club")>>
		<<else>>
			Some customers were put off since the <<if _girls == 1>>implanted and surgically improved <<elseif _girls == -1>>naturally pure <</if>>girls there did not match their preferences for <<if _pref == 1>>implanted or surgically improved <<elseif _pref == -1>>naturally pure <</if>>girls. Your @@.red;reputation@@ dropped slightly as a result.
			<<run repX(forceNeg(random(_minBonus,_maxBonus)), "club")>>
		<</if>>
	<</if>>

	<<if ($seeDicks != 0)>>

		<<if ($clubAdsSpending > 0)>>
			<<if ($clubAdsXX == 1)>>
				Its advertisements feature girls with female genitalia.
				<<set _ads = 1>>
			<<elseif ($clubAdsXX == -1)>>
				Its advertisements feature girls with male genitalia.
				<<set _ads = -1>>
			<<else>>
				Its advertisements feature a variety of girls with both male and female genitalia.
				<<set _ads = 0>>
			<</if>>
		<</if>>
		<<if ($arcologies[0].FSGenderFundamentalist != "unset") && ($arcologies[0].FSGenderFundamentalist >= 80)>>
			Most customers prefer girls with pussies.
			<<set _pref = 1>>
		<<elseif ($arcologies[0].FSGenderRadicalist != "unset") && ($arcologies[0].FSGenderRadicalist >= 80)>>
			Most customers prefer girls with dicks.
			<<set _pref = -1>>
		<<else>>
			<<if ($clubAdsSpending == 0) || ($clubAdsXX == 0)>>
				<<set _possibleBonuses++>>
				<<if (_XX > 0) && (_XY > 0) && (Math.abs(_XX-_XY) <= (_DL/3))>>
					<<set $clubBonuses++>>
					<<run repX(_DL*random(5,10), "club")>>
					The club offers a @@.green;mix@@ of sluts that can appeal to varied tastes in genitalia.
				<</if>>
			<</if>>
			Most customers don't have preferences for either girls with dicks or girls with pussies.
			<<set _pref = 0>>
		<</if>>
		<<if (_XX > (_DL/2))>>
			<<set _girls = 1>>
			Most of the slaves in the club have female genitalia.
		<<elseif (_XY > (_DL/2))>>
			Most of the slaves in the club have male genitalia.
			<<set _girls = -1>>
		<<else>>
			<<set _girls = 0>>
			The slaves in the club vary in genitalia.
		<</if>>
		<<if _pref == 0>> /*customers don't care*/
		<<elseif ($clubAdsSpending > 0) >>
			<<if (_ads == _pref) && (_girls == _ads)>>
				<<set _adsIncome = _DL*random(20,30), $facility.club.adsIncome += _adsIncome, _clubBonuses++>>
				<<run cashX(_adsIncome, "clubAds")>>
				Its advertising for girls <<if _ads == 1>>with pussies <<elseif _ads == -1>>with dicks <</if>> matches most customers' preferences as advertised. Your @@.green;reputation@@ increased slightly as a result.
				<<run repX(random(_minBonus,_maxBonus), "club")>>
			<<elseif (_ads == _pref) && (_girls != _ads)>>
				Its advertising for girls <<if _ads == 1>>with pussies <<elseif _ads == -1>>with dicks <</if>> matched most customers preferences, but the girls in the club are not as advertised. Your @@.red;reputation@@ dropped slightly as a result.
				<<run repX(forceNeg(random(_minBonus,_maxBonus)), "club")>>
			<<elseif (_girls == _pref) && (_girls != _ads)>>
				The girls <<if _girls == 1>> with pussies<<elseif _girls == -1>> with dicks<</if>>in the club did not match the advertisements, but since the girls in the club matched most customers preferences for girls<<if _pref == 1>> with pussies<<elseif _pref == -1>> with dicks<</if>>, your reputation was not affected.
			<<elseif (_girls != _pref)>>
				Some customers were put off since the girls <<if _girls == 1>>with female genitalia <<elseif _girls == -1>>with male genitalia <</if>> did not match their preferences for girls<<if _pref == 1>> with pussies<<elseif _pref == -1>> with dicks<</if>>. Your @@.red;reputation@@ dropped slightly as a result.
				<<run repX(forceNeg(random(_minBonus,_maxBonus)), "club")>>
			<</if>>
		<<else>>
			<<if (_girls == _pref)>>
				The girls in the club match most customers preferences for girls <<if _girls == 1>>with female genitalia <<elseif _girls == -1>>with male genitalia <</if>>. Your @@.green;reputation@@ increased slightly as a result.
				<<run repX(random(_minBonus,_maxBonus), "club")>>
			<<else>>
				Some customers were put off since the girls <<if _girls == 1>>with female genitalia <<elseif _girls == -1>>with male genitalia <</if>> did not match their preferences for girls<<if _pref == 1>> with pussies<<elseif _pref == -1>> with dicks<</if>>. Your @@.red;reputation@@ dropped slightly as a result.
				<<run repX(forceNeg(random(_minBonus,_maxBonus)), "club")>>
			<</if>>
		<</if>>
	<</if>>

	<<if ($clubAdsSpending > 0)>>
		<<switch ($clubAdsOld)>>
			<<case 1>>
				Its advertisements feature mature slaves.
				<<set _ads = 1>>
			<<case -1>>
				Its advertisements feature young slaves.
				<<set _ads = -1>>
			<<case -2>>
				Its advertisements feature teenagers.
				<<set _ads = -1>>
			<<case -3>>
				Its advertisements feature lolis.
				<<set _ads = -1>>
			<<default>>
				Its advertisements feature slaves of a variety of ages.
				<<set _ads = 0>>
		<</switch>>
	<</if>>
	<<if ($arcologies[0].FSMaturityPreferentialist != "unset") && ($arcologies[0].FSMaturityPreferentialist >= 80)>>
		Most customers prefer mature girls.
		<<set _pref = 1>>
	<<elseif ($arcologies[0].FSYouthPreferentialist != "unset") && ($arcologies[0].FSYouthPreferentialist >= 80)>>
		Most customers prefer young girls.
		<<set _pref = -1>>
	<<else>>
		<<if ($arcologies[0].FSMaturityPreferentialist == "unset") && ($arcologies[0].FSYouthPreferentialist == "unset")>>
			<<if ($clubAdsSpending == 0) || ($clubAdsOld == 0)>>
				<<set _possibleBonuses++>>
				<<if (_young > 0) && (_old > 0) && (Math.abs(_young-_old) <= (_DL/3))>>
					<<set $clubBonuses++>>
					<<run repX(_DL*random(5,10), "club")>>
					There are girls @@.green;both@@ young and mature in $clubName.
				<</if>>
			<</if>>
		<</if>>
		Most customers don't have preferences for either mature or young girls.
		<<set _pref = 0>>
	<</if>>
	<<if (_old > (_DL/2))>>
		<<set _girls = 1>>
		Most of the slaves in the club are mature.
	<<elseif (_young > (_DL/2))>>
		<<set _girls = -1>>
		Most of the slaves in the club are young.
	<<else>>
		<<set _girls = 0>>
		The slaves in the club vary in age.
	<</if>>
	<<if _pref == 0>> /*customers don't care*/
	<<elseif ($clubAdsSpending > 0)>>
		<<if (_ads == _pref) && (_girls == _ads)>>
			<<set _adsIncome = _DL*random(20,30), $facility.club.adsIncome += _adsIncome, _clubBonuses++>>
			<<run cashX(_adsIncome, "clubAds")>>
			Its advertising matches most customers' age preferences and the girls in the club match the ages as advertised. Your @@.green;reputation@@ increased slightly as a result.
			<<run repX(random(_minBonus,_maxBonus), "club")>>
		<<elseif (_ads == _pref) && (_girls != _ads)>>
			Its advertising matched most customers age preferences, but the girls in the club do not. Your @@.red;reputation@@ dropped slightly as a result.
			<<run repX(forceNeg(random(_minBonus,_maxBonus)), "club")>>
		<<elseif (_girls == _pref) && (_girls != _ads)>>
			The ages of girls in the club did not match the ages as advertised, but since the girls in the club matched most customers age preferences, your reputation was not affected.
		<<elseif (_girls != _pref) && (_girls == _ads)>>
			Some customers were put off since the ages of girls there did not match their preferences. Your @@.red;reputation@@ dropped slightly as a result.
			<<run repX(forceNeg(random(_minBonus,_maxBonus)), "club")>>
		<</if>>
	<<else>>
		<<if (_girls == _pref)>>
			The girls in the club match most customers' age preferences. Your @@.green;reputation@@ increased slightly as a result.
			<<run repX(random(_minBonus,_maxBonus), "club")>>
		<<else>>
			Some customers were put off since the ages of girls there did not match their preferences. Your @@.red;reputation@@ dropped slightly as a result.
			<<run repX(forceNeg(random(_minBonus,_maxBonus)), "club")>>
		<</if>>
	<</if>>

	<<if $seePreg == 1>>

		<<if ($clubAdsSpending > 0)>>
			<<if $clubAdsPreg == 1>>
				Its advertisements feature girls that are clearly pregnant.
				<<set _ads = 1>>
			<<elseif $clubAdsPreg == -1>>
				Its advertisements feature girls that have flat, usually firm, bellies.
				<<set _ads = -1>>
			<<else>>
				Its advertisements feature some girls that are pregnant.
				<<set _ads = 0>>
			<</if>>
		<</if>>
		<<if ($arcologies[0].FSRepopulationFocus != "unset") && ($arcologies[0].FSRepopulationFocus >= 80)>>
			Most customers prefer their girls rounded with child.
			<<set _pref = 1>>
		<<elseif ($arcologies[0].FSRestart != "unset") && ($arcologies[0].FSRestart >= 80) >>
			Most customers prefer girls that aren't gravid.
			<<set _pref = -1>>
		<<else>>
			<<if ($arcologies[0].FSRepopulationFocus == "unset") && ($arcologies[0].FSRestart == "unset")>>
				<<if ($clubAdsSpending == 0) || ($clubAdsPreg == 0)>>
					<<set _possibleBonuses++>>
					<<if (_pregYes > 0) && (_pregNo > 0) && (Math.abs(_pregYes-_pregNo) <= (_DL/3))>>
						<<set $clubBonuses++>>
						<<run repX(_DL*random(5,10), "club")>>
						There is a @@.green;wide@@ selection of slaves with a variety of middles working the club.
					<</if>>
				<</if>>
			<</if>>
			Most customers don't have preferences for either big-bellied or flat-bellied girls.
			<<set _pref = 0>>
		<</if>>
		<<if (_pregNo > (_DL/2))>>
			<<set _girls = -1>>
			Most of the slaves in the club sport flat bellies.
		<<elseif (_pregYes > (_DL/2))>>
			<<set _girls = 1>>
			Most of the slaves in the club sport gravid middles.
		<<else>>
			<<set _girls = 0>>
			The slaves in the club vary in belly type.
		<</if>>
		<<if (_pref == 0)>> /*customers don't care*/
		<<elseif ($clubAdsSpending > 0)>>
			<<if (_ads == _pref) && (_girls == _ads)>>
				<<set _adsIncome = _DL*random(20,30), $facility.club.adsIncome += _adsIncome, _clubBonuses++>>
				<<run cashX(_adsIncome, "clubAds")>>
				Its advertising for <<if _ads == 1>>pregnant <<elseif _ads == -1>>flat-bellied <</if>>girls matched most customers' preferences and the girls in the club matched its advertisements. Your @@.green;reputation@@ increased slightly as a result.
				<<run repX(random(_minBonus,_maxBonus), "club")>>
			<<elseif (_ads == _pref) && (_girls != _ads)>>
				Its advertising for <<if _ads == 1>>pregnant <<elseif _ads == -1>>flat-bellied <</if>>girls matched most customers preferences, but the girls in the club did not. Your @@.red;reputation@@ dropped slightly as a result.
				<<run repX(forceNeg(random(_minBonus,_maxBonus)), "club")>>
			<<elseif (_girls == _pref) && (_girls != _ads)>>
				The <<if _girls == 1>>pregnant <<elseif _girls == -1>>flat-bellied <</if>>girls in the club did not match its advertisements, but since the girls in the club matched most customers preferences for <<if _pref == 1>>fecund <<elseif _pref == -1>>flat-bellied <</if>>girls, your reputation was not affected.
			<<elseif (_girls != _pref)>>
				Some customers were put off since the <<if _girls == 1>>pregnant <<elseif _girls == -1>>flat-bellied <</if>>girls in the club did not match their preferences for <<if _pref == 1>>fecund <<elseif _pref == -1>>flat-bellied <</if>>girls. Your @@.red;reputation@@ dropped slightly as a result.
				<<run repX(forceNeg(random(_minBonus,_maxBonus)), "club")>>
			<</if>>
		<<else>>
			<<if (_girls == _pref)>>
				The <<if _girls == 1>>pregnant <<elseif _girls == -1>>flat-bellied <</if>>girls in the club match most customers' preferences for <<if _pref == 1>>fecund <<elseif _pref == -1>>flat-bellied <</if>>girls. Your @@.green;reputation@@ increased slightly as a result.
				<<run repX(random(_minBonus,_maxBonus), "club")>>
			<<else>>
				Some customers were put off since the <<if _girls == 1>>pregnant <<elseif _girls == -1>>flat-bellied <</if>>girls in the club did not match their preferences for <<if _pref == 1>>fecund <<elseif _pref == -1>>flat-bellied <</if>>girls. Your @@.red;reputation@@ dropped slightly as a result.
				<<run repX(forceNeg(random(_minBonus,_maxBonus)), "club")>>
			<</if>>
		<</if>>
	<</if>>

	<<if (_possibleBonuses > 0) && ($clubBonuses >= _possibleBonuses)>>
		<<run repX(_DL*random(10,15), "club")>>

		There is a ''@@.green;perfect variety@@'' of slaves serving the public from $clubName.
	<<else>>

		$clubNameCaps does not offer enough variety to satisfy all visitors.
	<</if>>

	<>
	<<if $clubDecoration != "standard">>

    $clubNameCaps's customers enjoy @@.green;having sex in $clubDecoration surroundings.@@
	<</if>>

	<<ClubStatistics 0>>
	<<timed 50ms>>
		<<replace #clubstats>>
			<<ClubStatistics 1>>
		<</replace>>
	<</timed>>
<</if>>

<<if _DL > 0 || $DJ != 0>>

<</if>>

repo_name: Fekenol/fc


code:
:: Complete Catalog [nobr]

<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Main">>

//This is the complete catalog of slaves that you can acquire from other slaveowners. Most of these slaves are not for sale, so persuading their owners to part with them will be extremely expensive.//

<<for $i = 0; $i < $heroSlaves.length; $i++>>
	<<if $i > 0>> | <</if>>
	<<if $heroSlaves[$i].ID == $activeSlave.ID>>
		//$heroSlaves[$i].slaveName//
	<<else>>
		<<print "[[$heroSlaves[$i].slaveName|Complete Catalog][$activeSlave = App.Utils.getHeroSlave($heroSlaves[" + $i + "], $baseHeroSlave)]]">>
	<</if>>
<</for>>

<<if ndef $activeSlave.pubicHColor>>
	<<set $activeSlave.pubicHColor = $activeSlave.hColor>>
<</if>>
<<if ndef $activeSlave.underArmHColor>>
	<<set $activeSlave.underArmHColor = $activeSlave.hColor>>
<</if>>
<<if ($activeSlave.override_Eye_Color != 1)>>
	<<switch ($activeSlave.eyeColor)>>
		<<case "blind blue">>
			<<set $activeSlave.origEye = "deep blue">>
		<<case "implant" "milky white">>
			<<set $activeSlave.origEye = either("blue", "brown", "dark blue", "dark green", "green", "hazel", "light blue", "light green")>>
		<<default>>
			<<set $activeSlave.origEye = $activeSlave.eyeColor>>
	<</switch>>
<</if>>
<<if ($activeSlave.override_Race != 1)>>
	<<set $activeSlave.origRace = $activeSlave.race>>
<</if>>
<<if ($activeSlave.override_H_Color != 1)>>
	<<set $activeSlave.origHColor = $activeSlave.hColor>>
<</if>>
<<if ($activeSlave.override_Arm_H_Color != 1)>>
	<<set $activeSlave.underArmHColor = $activeSlave.hColor>>
<</if>>
<<if ($activeSlave.override_Pubic_H_Color != 1)>>
	<<set $activeSlave.pubicHColor = $activeSlave.hColor>>
<</if>>
<<if ($activeSlave.override_Brow_H_Color != 1)>>
	<<set $activeSlave.eyebrowHColor = $activeSlave.hColor>>
<</if>>
<<if ($activeSlave.override_Skin != 1)>>
	<<set $activeSlave.origSkin = $activeSlave.skin>>
<</if>>
<<run SetBellySize($activeSlave)>>
<<set $specialSlavesPriceOverride = 1>>
<<run nationalityToAccent($activeSlave)>>
<<if $familyTesting == 1>>
	/* special slaves exceptions to keep siblings sensible */
	<<if $activeSlave.mother == -9999 && $activeSlave.father == -9998>> /* The twins — Camille & Kennerly */
		<<for _k = 0; _k < $slaves.length; _k++>>
			<<if areSisters($slaves[_k], $activeSlave) > 0>>
				<<set $activeSlave.actualAge = $slaves[_k].actualAge, $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge, $activeSlave.birthWeek = $slaves[_k].birthWeek>>
			<</if>>
		<</for>>
	<</if>>
	<<if $activeSlave.mother == -9997 && $activeSlave.father == -9996>> /* The siblings — Elisa & Martin */
		<<for _k = 0; _k < $slaves.length; _k++>>
			<<if areSisters($slaves[_k], $activeSlave) > 0>>
				<<if $activeSlave.birthName == "Elisa">>
					<<set $activeSlave.actualAge = $slaves[_k].actualAge-1, $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
				<<elseif $activeSlave.birthName == "Martin">>
					<<set $activeSlave.actualAge = $slaves[_k].actualAge+1, $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
				<</if>>
			<</if>>
		<</for>>
	<</if>>
	<<if $activeSlave.mother == -9995 && $activeSlave.father == -9994>> /* The fruit siblings — Green & Purple Grape */
		<<for _k = 0; _k < $slaves.length; _k++>>
			<<if areSisters($slaves[_k], $activeSlave) > 0>>
				<<if $activeSlave.birthName == "Green Grape">>
					<<set $activeSlave.actualAge = $slaves[_k].actualAge-5, $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
				<<elseif $activeSlave.birthName == "Purple Grape">>
					<<set $activeSlave.actualAge = $slaves[_k].actualAge+5, $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>>
				<</if>>
			<</if>>
		<</for>>
	<</if>>
<</if>>

<<set $saleDescription = 1>>
<<include "Long Slave Description">>
<<set $slaveCost = slaveCost($activeSlave)>>
<<set $slaveCost = (10*Math.trunc(($slaveCost/10)*2))>>
<<if $slaveCost < 40000>>
	<<set $slaveCost += random(20000,60000)>>
<</if>>
<<set $specialSlavesPriceOverride = 0>>

The offered price is <<print cashFormat($slaveCost)>>.

<<link "Buy $his slave contract" "New Slave Intro">>
	<<set $activeSlave.weekAcquired = $week, $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Main", $specialSlave = 1>>
	<<run cashX(forceNeg($slaveCost), "slaveTransfer", $activeSlave)>>
<</link>>


code:
:: Concubine Select [nobr]

<<set $nextButton = "Back", $nextLink = "Master Suite", $showEncyclopedia = 1, $encyclopedia = "Concubine">>
<<if ($Concubine != 0)>>
	<<set $Concubine = getSlave($Concubine.ID)>>
	<<setLocalPronouns $Concubine>>
	''__@@.pink;<<= SlaveFullName($Concubine)>>@@__'' is serving as your Concubine.

$He will take the lead in seeing to your pleasure.
<<else>>
	You have not selected a Concubine.
<</if>>

''Appoint a Concubine from your devoted slaves:''

[[None|Concubine Workaround][$i = -1]]

<<print App.UI.SlaveList.facilityManagerSelection(App.Entity.facilities.masterSuite)>>


code:
:: Concubine Workaround [silently]

<<if $Concubine != 0>>
	<<= removeJob($Concubine, "be your Concubine")>>
<</if>>
<<if $i > -1>>
	<<= assignJob($slaves[$i], "be your Concubine")>>
	<<set $slaves[$i].livingRules = "luxurious">>
	<<set $Concubine = $slaves[$i]>>
<</if>>

<<goto "Master Suite">>


code:
:: Corporate Market [nobr]

<<set $nextButton = "Back", $nextLink = "Main">>
/* Multi-Purchase Support */
<<if ndef $newSlaves>><<set $newSlaves = []>><</if>>
<<if $newSlaves.length > 0>>
	<<set $nextButton = "Continue", $nextLink = "Bulk Slave Intro", $slaveMarket = "corporate", $returnTo = "Main", $newSlaveIndex = 0>>
<</if>>

<<if $corpSpecGender == 2>>
	<<setNonlocalPronouns 100>>
<<elseif $corpSpecGender == 1>>
	<<setNonlocalPronouns 0>>
<<else>>
	<<setNonlocalPronouns $seeDicks>>
<</if>>

You're in your corporation's flagship slave market.

The corporation pays you only nominal rent for this space, but will offer you a discount on slaves here based on your shares in it. Additionally, having the corporation's premiere products sold here in $arcologies[0].name will associate them with you, allowing your reputation to improve the corporate brand. A pretty
<<if $corpSpecDick == 1 && $corpSpecPussy == 1>>futanari<<elseif $corpSpecGender == 2>><<if $corpSpecBalls == -1>>clipped<<else>>shemale<</if>><</if>>
sales<<if $corpSpecAge == 3>>_womanU<<else>>_girlU<</if>> in a slutty suit greets you properly. _HeU's a corporate slave chosen for loyalty and intelligence, and to physically represent the brand.
<<if $corpSpecHeight == 5>>
	Even before _heU engaged with you _hisU towering height made _himU stand out and caught your eye, from up close _heU's even more impressive.
<<elseif $corpSpecHeight == 1>>
	_HeU's so short you have to physically look down on _himU.
<</if>>
<<if $corpSpecInjection == 4>>
	_HeU has awe-inspiring breasts which _hisU suit jacket helps support; even so, their bottoms reach past _hisU navel.
<<elseif $corpSpecInjection == 5>>
	_HeU has gigantic, milk-swollen breasts almost spilling out of _hisU suit.
<<elseif $corpSpecImplants == 2>>
	_HeU has enormous fake tits that ride inhumanly high on _hisU chest.
<<elseif $corpSpecInjection == 3>>
	_HeU has huge tits and a nice broad butt which _hisU tight skirt hugs closely.
<<elseif $corpSpecImplants == 1>>
	_HeU has nice fake bimbo tits and a silicone bubble butt.
<<elseif $corpSpecInjection == 2>>
	_HeU's nice and curvy, with nice breasts and a lovely ass.
<<elseif $corpSpecInjection == 1>>
	_HeU has cute little breasts and a petite rump.
<</if>>
<<if $corpSpecCosmetics == 1>>_HisU face is flawless.<</if>>
<<if ($corpSpecRaces.length == 1)>>
	<<set _corpSpecRace = $corpSpecRaces.random()>>
	_HeU's <<print _corpSpecRace>>, of course<<if $corpSpecAccent == 1>>, and has a cute accent<</if>>.
<</if>>
<<if $corpSpecHormones == 1>>
	_HisU voice is soft and feminine, and _heU bats _hisU eyes at you.
<<elseif $corpSpecHormones == 2>>
	_HeU has a deep voice, and speaks assertively.
<</if>>
<<if $corpSpecMuscle == 4>>
	_HisU hot body is perfectly toned under _hisU suit.
<<elseif $corpSpecMuscle == 5>>
	_HisU suit is specially tailored to flatter _hisU visible musculature.
<</if>>
Of course, you know all about the corporation, but sales<<if $corpSpecAge == 3>>_womenU<<else>><<= _girlU>>s<</if>> here have standing orders to treat you like any other customer, so you can review the market properly. The slave turns to <<if $corpSpecAmputee != 1>>a multimedia presentation on<<else>>a rack of<</if>> your corporation's slaves.

_HeU explains that the corporation captures many people, so it only retains and trains those that fit its product lines.

<<= generateMarketSlave("corporate")>>

_HisU presentation done, the
<<if $corpSpecDick == 1 && $corpSpecPussy == 1>>futanari<<elseif $corpSpecGender == 2>><<if $corpSpecBalls == -1>>clipped<<else>>shemale<</if>><</if>>
sales<<if $corpSpecAge == 3>>_womanU<<else>>_girlU<</if>> directs you to the inventory interface that will allow you to peruse the corporation's slaves, and moves over to stand next to it, ready to answer any questions.
<<if $PC.dick == 1>>
	_HeU positions _himselfU facing away from you and hikes up _hisU skirt to bare _hisU
	<<if $corpSpecInjection > 4>>gigantic ass<<elseif $corpSpecImplants > 0>>fake ass<<elseif $corpSpecInjection == 3>>big butt<<elseif $corpSpecInjection == 2>>cute butt<<else>>little behind<</if>>
	and cocks _hisU hips<<if $corpSpecBalls == -1>>, keeping _hisU soft cock demurely out of sight<</if>>, if you feel like <<if $corpSpecGender == 2 && $corpSpecPussy != 1>>sodomizing<<else>>fucking<</if>> _himU
<<else>>
	_HeU gets down on _hisU knees right there, making _hisU mouth available if you feel like riding _hisU face
<</if>>
while you browse.

<<link "Use _himU">>
	<<replace "#result">>
		<<if $PC.dick == 1>>
			_HisU <<if $corpSpecGender == 2 && $corpSpecPussy != 1>>asshole is thoughtfully pre-lubed, and your cock slides easily up it<<else>>pussy is nice and wet, and your cock slides inside _himU easily<</if>> as you consider the slaves on offer. _HeU's well trained, and uses _hisU <<if $corpSpecGender == 2 && $corpSpecPussy != 1>>sphincter<<else>>womanly muscles<</if>> to please your member expertly as _heU ruts _himselfU gently back against you, doing almost all the work. When you orgasm, _heU retains the load carefully, keeping your cum inside _himU and away from _hisU nice clothes.
		<<else>>
			_HeU's very well trained, and does all the work. Once you move in and straddle _himU, _heU gets right down to it, or in this case, up to it. _HisU clever tongue runs gently along your labia to build anticipation before starting a delightful dance around and then atop your clitoris. You orgasm in no time at all, a climax which _heU carefully prolongs by kissing you full on the pussy in just the right way, only breaking the oral embrace when you've ridden it as far as you'll go.
		<</if>>
	<</replace>>
<</link>>

<<set $slaveCost = slaveCost($activeSlave)>>
<<if $slavesSeen > $slaveMarketLimit>><<set $slaveCost += $slaveCost*(($slavesSeen-$slaveMarketLimit)*0.1)>><</if>>

<<if $corpMarket == 1>>
	Your own local franchise of your corporation allows you to enjoy a discount.
	<<set $slaveCost *= 0.9>>
<</if>>

<<set $slaveCost = 500*Math.trunc($slaveCost/500)>>
The offered price is <<print cashFormat($slaveCost)>>.<<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>>

<<setLocalPronouns $activeSlave>>
<<buyingFromMarketControls>>

<<link "End corporate slave sales here and return this sector to standard markets">>
	<<set $corpMarket = 0>>
	<<for _i = 0; _i < $sectors.length; _i++>>
		<<if $sectors[_i].type == "CorporateMarket">><<set $sectors[_i].type = "Markets">><<break>><</if>>
	<</for>>
	<<goto "Main">>
<</link>>


code:
:: Corporation Developments [nobr]

/*Main Corporation Pass*/

<<if $corpCash < 0>>
	<<set $corpCash = Math.trunc($corpCash * 1.02)>> /*2% weekly interest rate on negative cash*/
<</if>>
<<if $corpDivTrainSurgerySwitch == 1 && $corpDivTrainSurgeryTimer < 20>>
	<<set $corpDivTrainSurgeryTimer++>>
<</if>>
<<set _corpOpCost = 0,
_corpRev = 0,
_corpAssetsSlave = 0>>

__Corporation Management__

''Operational Results''
/*Divisions doing their thing*/
<<if $corpDivExtra == 1>>
	<<if $mercenariesHelpCorp > 0>> /*This is the cost of acquiring slaves, the level of development is also the amount of slaves on average*/
		<<set _corpOpCost += 7500 * $corpDivExtraDev + 5 * Math.pow($corpDivExtraDev, 2) - ($mercenaries - 2) * 50,
		_corpDivExtraSlaves = Math.trunc($corpDivExtraDev * (1 + random(-40,40) / 100)),
		$corpDivExtraSlaves += _corpDivExtraSlaves>> /*the actual amount of slaves acquired*/
	<<else>>
		<<set _corpOpCost += 7500 * $corpDivExtraDev + 5 * Math.pow($corpDivExtraDev, 2),
		_corpDivExtraSlaves = Math.trunc($corpDivExtraDev * (1 + random(-40,40) / 100)),
		$corpDivExtraSlaves += _corpDivExtraSlaves>>
	<</if>>
<</if>>
<<if $corpDivLegal == 1>>
	<<set _corpOpCost += 12000 * $corpDivLegalDev + 6 * Math.pow($corpDivExtraDev, 2),
	_corpDivLegalSlaves = Math.trunc($corpDivLegalDev * (1 + random(-25,25) / 100)),
	$corpDivLegalSlaves += _corpDivLegalSlaves>>
<</if>>
<<if $corpDivBreak == 1>>
	<<set _corpOpCost += 450 * $corpDivBreakSlaves + Math.trunc(0.7 * Math.pow($corpDivBreakDev, 2)),
	_corpDivBreakProc = Math.trunc($corpDivBreakSlaves * 0.3 * (1 + random(-15,15) / 100)),
	$corpDivBreakSlaves2 += _corpDivBreakProc,
	$corpDivBreakSlaves -= _corpDivBreakProc>>
<</if>>
<<if $corpDivSurgery == 1>>
	<<set _corpOpCost += 2400 * $corpDivSurgerySlaves + Math.pow($corpDivSurgeryDev, 2),
	_corpDivSurgeryProc = Math.trunc($corpDivSurgerySlaves * 0.5 * (1 + random(-10,10) / 100)),
	$corpDivSurgerySlaves2 += _corpDivSurgeryProc,
	$corpDivSurgerySlaves -= _corpDivSurgeryProc>>
<</if>>
<<if $corpDivTrain == 1>>
	<<set _corpOpCost += 700 * $corpDivTrainSlaves + Math.trunc(0.8 * Math.pow($corpDivTrainDev, 2)),
	_corpDivTrainProc = Math.trunc($corpDivTrainSlaves * 0.2 * (1 + random(-15,15) / 100)),
	$corpDivTrainSlaves2 += _corpDivTrainProc,
	$corpDivTrainSlaves -= _corpDivTrainProc>>
<</if>>
<<if $corpDivArcade == 1>>
	<<set _corpOpCost += 200 * $corpDivArcadeSlaves + Math.trunc(0.125 * Math.pow($corpDivArcadeDev, 2)),
	_corpDivArcadeRev = Math.trunc(1000 * (1 + random(-5,5) / 100) * $corpDivArcadeSlaves),
	_corpRev += _corpDivArcadeRev,
	_corpDivArcadeProc = $corpDivArcadeSlaves * 0.05 * (1 + random(-10,10) / 100)>>
	<<if _corpDivArcadeProc > 1>>
		<<set _corpDivArcadeProc = Math.trunc(_corpDivArcadeProc)>>
	<<elseif _corpDivArcadeProc < 1 && _corpDivArcadeProc > random(1,100) / 100>>
		<<set _corpDivArcadeProc = 1>>
	<<else>>
		<<set _corpDivArcadeProc = 0>>
	<</if>>
	<<set $corpDivArcadeSlaves -= _corpDivArcadeProc>>
<</if>>
<<if $corpDivMenial == 1>>
	<<set _corpDivMenialRev = Math.trunc(1250 * (1 + random(-10,10) / 100)) * $corpDivMenialSlaves,
	_corpOpCost += 200 * $corpDivMenialSlaves + Math.trunc(0.1 * Math.pow($corpDivMenialDev, 2)),
	_corpRev += _corpDivMenialRev,
	_corpDivMenialProc = $corpDivMenialSlaves * 0.05 * (1 + random(-10,10) / 100)>>
	<<if _corpDivMenialProc > 1>>
		<<set _corpDivMenialProc = Math.trunc(_corpDivMenialProc)>>
	<<elseif _corpDivMenialProc < 1 && _corpDivMenialProc > random(1,100) / 100>>
		<<set _corpDivMenialProc = 1>>
	<<else>>
		<<set _corpDivMenialProc = 0>>
	<</if>>
	<<set $corpDivMenialSlaves -= _corpDivMenialProc>>
<</if>>
<<if $corpDivDairy == 1>>
	<<set _corpDivDairyRev = Math.trunc(3000 * (1 + random(-10,10) / 100) * $corpDivDairySlaves),
	_corpOpCost += 850 * $corpDivDairySlaves + Math.trunc(0.4 * Math.pow($corpDivDairyDev, 2)),
	_corpRev += _corpDivDairyRev,
	_corpDivDairyProc = $corpDivDairySlaves * 0.05 * (1 + random(-10,10) / 100)>>
	<<if _corpDivDairyProc > 1>>
		<<set _corpDivDairyProc = Math.trunc(_corpDivDairyProc)>>
	<<elseif _corpDivDairyProc < 1 && _corpDivDairyProc > random(1,100) / 100>>
		<<set _corpDivDairyProc = 1>>
	<<else>>
		<<set _corpDivDairyProc = 0>>
	<</if>>
	<<set $corpDivDairySlaves -= _corpDivDairyProc>>
<</if>>
<<if $corpDivWhore == 1>>
	<<set _corpDivWhoreRev = Math.trunc(3000 * (1 + random(-5,5) / 100) * $corpDivWhoreSlaves),
	_corpOpCost += 700 * $corpDivWhoreSlaves + Math.trunc(0.25 * Math.pow($corpDivWhoreDev, 2)),
	_corpRev += _corpDivWhoreRev,
	_corpDivWhoreProc = $corpDivWhoreSlaves * 0.05 * (1 + random(-10,10) / 100)>>
	<<if _corpDivWhoreProc > 1>>
		<<set _corpDivWhoreProc = Math.trunc(_corpDivWhoreProc)>>
	<<elseif _corpDivWhoreProc < 1 && _corpDivWhoreProc > random(1,100) / 100>>
		<<set _corpDivWhoreProc = 1>>
	<<else>>
		<<set _corpDivWhoreProc = 0>>
	<</if>>
	<<set $corpDivWhoreSlaves -= _corpDivWhoreProc>>
<</if>>

/*division output and moving slaves around*/
<<set _corpDivBreakSlavesRoom = corpDivBreakSlavesRoom(),
_corpDivSurgerySlavesRoom = corpDivSurgerySlavesRoom(),
_corpDivTrainSlavesRoom = corpDivTrainSlavesRoom(),
_corpDivArcadeSlavesRoom = corpDivArcadeSlavesRoom(),
_corpDivMenialSlavesRoom = corpDivMenialSlavesRoom(),
_corpDivDairySlavesRoom = corpDivDairySlavesRoom(),
_corpDivWhoreSlavesRoom = corpDivWhoreSlavesRoom()>>

<<if $corpDivExtra > 0>>

Extralegal Enslavement: The division
	<<if $mercenariesHelpCorp > 0>>
		@@.green;acquired <<print _corpDivExtraSlaves>> slaves@@ with the help of your mercenaries.
	<<else>>
		@@.green;acquired <<print _corpDivExtraSlaves>>.@@
	<</if>>
	<<if $corpDivExtraToArcade == 1 && _corpDivArcadeSlavesRoom > 0>> /*slaves getting auto moved around*/
		<<if $corpDivExtraSlaves >= _corpDivArcadeSlavesRoom>>
			It moved <<if _corpDivArcadeSlavesRoom > 1>><<print _corpDivArcadeSlavesRoom>> slaves<<else>>one slave<</if>> to the arcade division.
			<<set $corpDivExtraSlaves -= _corpDivArcadeSlavesRoom,
			$corpDivArcadeSlaves = $corpDivArcadeDev,
			_corpDivArcadeSlavesRoom = corpDivArcadeSlavesRoom()>>
		<<elseif $corpDivExtraSlaves > 0>>
			It moved <<if $corpDivExtraSlaves > 1>><<print $corpDivExtraSlaves>> slaves<<else>>one slave<</if>> to the arcade division.
			<<set $corpDivArcadeSlaves += $corpDivExtraSlaves,
			$corpDivExtraSlaves = 0,
			_corpDivArcadeSlavesRoom = corpDivArcadeSlavesRoom()>>
		<</if>>
	<</if>>
	<<if $corpDivExtraToBreak == 1 && _corpDivBreakSlavesRoom > 0>>
		<<if $corpDivExtraSlaves >= _corpDivBreakSlavesRoom>>
			It moved <<if _corpDivBreakSlavesRoom > 1>><<print _corpDivBreakSlavesRoom>> slaves<<else>>one slave<</if>> to the slave breaking division.
			<<set $corpDivExtraSlaves -= _corpDivBreakSlavesRoom,
			$corpDivBreakSlaves = $corpDivBreakDev,
			_corpDivBreakSlavesRoom = corpDivBreakSlavesRoom()>>
		<<elseif $corpDivExtraSlaves > 0>>
			It moved <<if $corpDivExtraSlaves > 1>><<print $corpDivExtraSlaves>> slaves<<else>>one slave<</if>> to the slave breaking division.
			<<set $corpDivBreakSlaves += $corpDivExtraSlaves,
			$corpDivExtraSlaves = 0,
			_corpDivBreakSlavesRoom = corpDivBreakSlavesRoom()>>
		<</if>>
	<</if>>
	<<if $corpDivExtraToMarket == 1 && $corpDivExtraSlaves > 0>>
		It immediately sold <<if $corpDivExtraSlaves > 1>>$corpDivExtraSlaves slaves<<elseif $corpDivExtraSlaves > 0>>one slave<</if>>
		<<set _corpDivExtraRev = $corpDivExtraSlaves * 10 * menialSlaveCost(-_corpDivExtraSlaves),
		_corpRev += _corpDivExtraRev,
		$corpDivExtraSlaves = 0>>
		to the market and made @@.yellowgreen;<<print cashFormat(_corpDivExtraRev)>>.@@
	<<elseif $corpDivExtraSlaves > 0>>
		It holds <<if $corpDivExtraSlaves > 1>>@@.green;$corpDivExtraSlaves slaves@@<<else>>@@.green;one slave@@<</if>> at the end of the week.
		<<if $corpDivExtraSlaves > $corpDivExtraDev * 2>> /*The division can store some slaves it has acquired/processed, but not a huge amount*/
			<<set _corpDivExtraCapSlaves = $corpDivExtraSlaves - $corpDivExtraDev * 2,
			_corpDivExtraRev = _corpDivExtraCapSlaves * 10 * menialSlaveCost(-_corpDivExtraCapSlaves),
			_corpRev += _corpDivExtraRev,
			$menialDemandFactor -= _corpDivExtraCapSlaves,
			$corpDivExtraSlaves = $corpDivExtraDev * 2>> /*slaves over holding capacity get sold*/
			But it ran out of storage space and had to sell <<if _corpDivExtraCapSlaves > 1>>@@.red;<<print _corpDivExtraCapSlaves>> slaves@@<<else>>@@.red;one slave@@<</if>> and made @@.yellowgreen;<<print cashFormat(_corpDivExtraRev)>>.@@
		<</if>>
	<</if>>
<</if>>

<<if $corpDivLegal > 0>>

Legal Enslavement: The division @@.green;acquired <<print _corpDivLegalSlaves>>.@@
	<<if $corpDivLegalToMenial == 1 && _corpDivMenialSlavesRoom > 0>>
		<<if $corpDivLegalSlaves >= _corpDivMenialSlavesRoom>>
			It moved <<if _corpDivMenialSlavesRoom > 1>><<print _corpDivMenialSlavesRoom>> slaves<<else>>one slave<</if>> to the menial services division.
			<<set $corpDivLegalSlaves -= _corpDivMenialSlavesRoom,
			$corpDivMenialSlaves = $corpDivMenialDev,
			_corpDivMenialSlavesRoom = corpDivMenialSlavesRoom()>>
		<<elseif $corpDivLegalSlaves > 0>>
			It moved <<if $corpDivLegalSlaves > 1>>$corpDivLegalSlaves slaves<<else>>one slave<</if>> to the menial services division.
			<<set $corpDivMenialSlaves += $corpDivLegalSlaves,
			$corpDivLegalSlaves = 0,
			_corpDivMenialSlavesRoom = corpDivMenialSlavesRoom()>>
		<</if>>
	<</if>>
	<<if $corpDivLegalToSurgery == 1 && _corpDivSurgerySlavesRoom > 0>>
		<<if $corpDivLegalSlaves >= _corpDivSurgerySlavesRoom>>
			It moved <<if _corpDivSurgerySlavesRoom > 1>><<print _corpDivSurgerySlavesRoom>> slaves<<else>>one slave<</if>> to the physical modification division.
			<<set $corpDivLegalSlaves -= _corpDivSurgerySlavesRoom,
			$corpDivSurgerySlaves = $corpDivSurgeryDev,
			_corpDivSurgerySlavesRoom = corpDivSurgerySlavesRoom()>>
		<<elseif $corpDivLegalSlaves > 0>>
			It moved <<if $corpDivLegalSlaves > 1>>$corpDivLegalSlaves slaves<<else>>one slave<</if>> to the physical modification division.
			<<set $corpDivSurgerySlaves += $corpDivLegalSlaves,
			$corpDivLegalSlaves = 0,
			_corpDivSurgerySlavesRoom = corpDivSurgerySlavesRoom()>>
		<</if>>
	<</if>>
	<<if $corpDivLegalToTrain == 1 && _corpDivTrainSlavesRoom > 0>>
		<<if $corpDivLegalSlaves >= _corpDivTrainSlavesRoom>>
			It moved <<if _corpDivTrainSlavesRoom > 1>><<print _corpDivTrainSlavesRoom>> slaves<<else>>one slave<</if>> to the slave training division.
			<<set $corpDivLegalSlaves -= _corpDivTrainSlavesRoom,
			$corpDivTrainSlaves = $corpDivTrainDev,
			_corpDivTrainSlavesRoom = corpDivTrainSlavesRoom()>>
		<<elseif $corpDivLegalSlaves > 0>>
			It moved <<if $corpDivLegalSlaves > 1>>$corpDivLegalSlaves slaves<<else>>one slave<</if>> to the slave training division.
			<<set $corpDivTrainSlaves += $corpDivLegalSlaves,
			$corpDivLegalSlaves = 0,
			_corpDivTrainSlavesRoom = corpDivTrainSlavesRoom()>>
		<</if>>
	<</if>>
	<<if $corpDivLegalToMarket == 1 && $corpDivLegalSlaves > 0>>
		It immediately sold <<if $corpDivLegalSlaves > 1>><<print $corpDivLegalSlaves>> slaves<<else>>one slave<</if>>
		<<set _corpDivLegalRev = $corpDivLegalSlaves * 15 * menialSlaveCost(-$corpDivLegalSlaves),
		_corpRev += _corpDivLegalRev,
		$corpDivLegalSlaves = 0>>
		to the market and made @@.yellowgreen;<<print cashFormat(_corpDivLegalRev)>>.@@
	<<elseif $corpDivLegalSlaves > 0>>
		It holds <<if $corpDivLegalSlaves > 1>>@@.green;$corpDivLegalSlaves slaves@@<<else>>@@.green;one slave@@<</if>> at the end of the week.
		<<if $corpDivLegalSlaves > $corpDivLegalDev * 2>>
			<<set _corpDivLegalCapSlaves = $corpDivLegalSlaves - $corpDivLegalDev * 2,
			_corpDivLegalRev = _corpDivLegalCapSlaves * 15 * menialSlaveCost(-_corpDivLegalCapSlaves),
			_corpRev += _corpDivLegalRev,
			$menialDemandFactor -= _corpDivLegalCapSlaves,
			$corpDivLegalSlaves = $corpDivLegalDev * 2>>
			But it ran out of storage space and had to sell <<if _corpDivLegalCapSlaves > 1>>@@.red;<<print _corpDivLegalCapSlaves>> slaves@@<<else>>@@.red;one slave@@<</if>> and made @@.yellowgreen;<<print cashFormat(_corpDivLegalRev)>>.@@
		<</if>>
	<</if>>
<</if>>

<<if $corpDivBreak > 0>>

Slave Breaking: The division broke <<if _corpDivBreakProc > 1>><<print _corpDivBreakProc>> slaves.<<elseif _corpDivBreakProc > 0>>one slave.<<else>>@@.red;none of its slaves.@@<</if>> The division is still busy breaking $corpDivBreakSlaves slaves.
	<<if $corpDivBreakFromMarket == 1 && _corpDivBreakSlavesRoom > 0>>
		It replenished its slave stock and bought <<print _corpDivBreakSlavesRoom>> slaves that need breaking from the market.
		<<set _corpDivBreakAssetsSlave = _corpDivBreakSlavesRoom * 10 * menialSlaveCost(_corpDivBreakSlavesRoom),
		_corpAssetsSlave += _corpDivBreakAssetsSlave,
		$corpDivBreakSlaves = $corpDivBreakDev>>
	<</if>>
	<<if $corpDivBreakToMenial == 1 && _corpDivMenialSlavesRoom > 0>>
		<<if $corpDivBreakSlaves2 >= _corpDivMenialSlavesRoom>>
			It moved <<if _corpDivMenialSlavesRoom > 1>><<print _corpDivMenialSlavesRoom>> slaves<<else>>one slave<</if>> to the menial services division.
			<<set $corpDivBreakSlaves2 -= _corpDivMenialSlavesRoom,
			$corpDivMenialSlaves = $corpDivMenialDev,
			_corpDivMenialSlavesRoom = corpDivMenialSlavesRoom()>>
		<<elseif $corpDivBreakSlaves2 > 0>>
			It moved <<if $corpDivBreakSlaves2 > 1>>$corpDivBreakSlaves2 slaves<<else>>one slave<</if>> to the menial services division.
			<<set $corpDivMenialSlaves += $corpDivBreakSlaves2,
			$corpDivBreakSlaves2 = 0,
			_corpDivMenialSlavesRoom = corpDivMenialSlavesRoom()>>
		<</if>>
	<</if>>
	<<if $corpDivBreakToSurgery == 1 && _corpDivSurgerySlavesRoom > 0>>
		<<if $corpDivBreakSlaves2 >= _corpDivSurgerySlavesRoom>>
			It moved <<if _corpDivSurgerySlavesRoom > 1>><<print _corpDivSurgerySlavesRoom>> slaves<<else>>one slave<</if>> to the physical modification division.
			<<set $corpDivBreakSlaves2 -= _corpDivSurgerySlavesRoom,
			$corpDivSurgerySlaves = $corpDivSurgeryDev,
			_corpDivSurgerySlavesRoom = corpDivSurgerySlavesRoom()>>
		<<elseif $corpDivBreakSlaves2 > 0>>
			It moved <<if $corpDivBreakSlaves2 > 1>>$corpDivBreakSlaves2 slaves<<else>>one slave<</if>> to the physical modification division.
			<<set $corpDivSurgerySlaves += $corpDivBreakSlaves2,
			$corpDivBreakSlaves2 = 0,
			_corpDivSurgerySlavesRoom = corpDivSurgerySlavesRoom()>>
		<</if>>
	<</if>>
	<<if $corpDivBreakToTrain == 1 && _corpDivTrainSlavesRoom > 0>>
		<<if $corpDivBreakSlaves2 >= _corpDivTrainSlavesRoom>>
			It moved <<if _corpDivTrainSlavesRoom > 1>><<print _corpDivTrainSlavesRoom>> slaves<<else>>one slave<</if>> to the slave training division.
			<<set $corpDivBreakSlaves2 -= _corpDivTrainSlavesRoom,
			$corpDivTrainSlaves = $corpDivTrainDev,
			_corpDivTrainSlavesRoom = corpDivTrainSlavesRoom()>>
		<<elseif $corpDivBreakSlaves2 > 0>>
			It moved <<if $corpDivBreakSlaves2 > 1>>$corpDivBreakSlaves2 slaves<<else>>one slave<</if>> to the slave training division.
			<<set $corpDivTrainSlaves += $corpDivBreakSlaves2,
			$corpDivBreakSlaves2 = 0,
			_corpDivTrainSlavesRoom = corpDivTrainSlavesRoom()>>
		<</if>>
	<</if>>
	<<if $corpDivBreakToMarket == 1 && $corpDivBreakSlaves2 > 0>>
		It immediately sold <<if $corpDivBreakSlaves2 > 1>>$corpDivBreakSlaves2 slaves<<else>>one slave<</if>>
		<<set _corpDivBreakRev = $corpDivBreakSlaves2 * 15 * menialSlaveCost(-$corpDivBreakSlaves2),
		_corpRev += _corpDivBreakRev,
		$corpDivBreakSlaves2 = 0>>
		to the market and made @@.yellowgreen;<<print cashFormat(_corpDivBreakRev)>>.@@
	<<elseif $corpDivBreakSlaves2 > 0>>
		It is holding <<if $corpDivBreakSlaves2 > 1>>$corpDivBreakSlaves2 broken slaves<<else>>one broken slave<</if>> at the end of the week.
		<<if $corpDivBreakSlaves2 > Math.trunc($corpDivBreakDev * 0.6)>>
			<<set _corpDivBreakCapSlaves = $corpDivBreakSlaves2 - Math.trunc($corpDivBreakDev * 0.6),
			_corpDivBreakRev = _corpDivBreakCapSlaves * 15 * menialSlaveCost(-_corpDivBreakCapSlaves),
			_corpRev += _corpDivBreakRev,
			$menialDemandFactor -= _corpDivBreakCapSlaves,
			$corpDivBreakSlaves2 = Math.trunc($corpDivBreakDev * 0.6)>>
			But it ran out of storage space and had to sell <<if _corpDivBreakCapSlaves > 1>>@@.red;<<print _corpDivBreakCapSlaves>> slaves@@<<else>>@@.red;one slave@@<</if>> and made @@.yellowgreen;<<print cashFormat(_corpDivBreakRev)>>.@@
		<</if>>
	<</if>>
<</if>>

<<if $corpDivSurgery > 0>>

Physical Slave Modifications: The division finished working on <<if _corpDivSurgeryProc > 1>><<print _corpDivSurgeryProc>> slaves.<<elseif _corpDivSurgeryProc > 0>>one slave.<<else>>@@.red;none of its slaves.@@<</if>> The division is still working on $corpDivSurgerySlaves slaves.
	<<if $corpDivSurgeryFromMarket == 1 && _corpDivSurgerySlavesRoom > 0>>
		It replenished its slave stock and bought <<print _corpDivSurgerySlavesRoom>> slaves that could use some work done to their bodies from the market.
		<<set _corpDivSurgeryAssetsSlave = _corpDivSurgerySlavesRoom * 15 * menialSlaveCost(_corpDivSurgerySlavesRoom),
		_corpAssetsSlave += _corpDivSurgeryAssetsSlave,
		$corpDivSurgerySlaves = $corpDivSurgeryDev,
		_corpDivSurgerySlavesRoom = corpDivSurgerySlavesRoom()>>
	<</if>>
	<<if $corpDivSurgeryToDairy == 1 && _corpDivDairySlavesRoom > 0>>
		<<if $corpDivSurgerySlaves2 >= _corpDivDairySlavesRoom>>
			It moved <<if _corpDivDairySlavesRoom > 1>><<print _corpDivDairySlavesRoom>> slaves<<else>>one slave<</if>> to the dairy division.
			<<set $corpDivSurgerySlaves2 -= _corpDivDairySlavesRoom,
			$corpDivDairySlaves = $corpDivDairyDev,
			_corpDivDairySlavesRoom = corpDivDairySlavesRoom()>>
		<<elseif $corpDivSurgerySlaves2 > 0>>
			It moved <<if $corpDivSurgerySlaves2 > 1>>$corpDivSurgerySlaves2 slaves<<else>>one slave<</if>> to the dairy division.
			<<set $corpDivDairySlaves += $corpDivSurgerySlaves2,
			$corpDivSurgerySlaves2 = 0,
			_corpDivDairySlavesRoom = corpDivDairySlavesRoom()>>
		<</if>>
	<</if>>
	<<if $corpDivSurgeryToTrain == 1 && _corpDivTrainSlavesRoom > 0>>
		<<if $corpDivSurgerySlaves2 >= _corpDivTrainSlavesRoom>>
			It moved <<if _corpDivTrainSlavesRoom > 1>><<print _corpDivTrainSlavesRoom>> slaves<<else>>one slave<</if>> to the slave training division.
			<<set $corpDivSurgerySlaves2 -= _corpDivTrainSlavesRoom,
			$corpDivTrainSlaves = $corpDivTrainDev,
			_corpDivTrainSlavesRoom = corpDivTrainSlavesRoom()>>
		<<elseif $corpDivSurgerySlaves2 > 0>>
			It moved <<if $corpDivSurgerySlaves2 > 1>>$corpDivSurgerySlaves2 slaves<<else>>one slave<</if>> to the slave training division.
			<<set $corpDivTrainSlaves += $corpDivSurgerySlaves2,
			$corpDivSurgerySlaves2 = 0,
			_corpDivTrainSlavesRoom = corpDivTrainSlavesRoom()>>
		<</if>>
	<</if>>
	<<if $corpDivSurgeryToMarket == 1 && $corpDivSurgerySlaves2 > 0>>
		It immediately sold <<if $corpDivSurgerySlaves2 > 1>><<print $corpDivSurgerySlaves2>> slaves<<else>>one slave<</if>>
		<<set _corpDivSurgeryRev = $corpDivSurgerySlaves2 * 23 * menialSlaveCost(-$corpDivSurgerySlaves2),
		_corpRev += _corpDivSurgeryRev,
		$corpDivSurgerySlaves2 = 0>>
		to the market and made @@.yellowgreen;<<print cashFormat(_corpDivSurgeryRev)>>.@@
	<<elseif $corpDivSurgerySlaves2 > 0>>
		It is holding <<if $corpDivSurgerySlaves2 > 1>>@@.green;$corpDivSurgerySlaves2 improved slaves@@<<else>>@@.green;one improved slave@@<</if>> at the end of the week.
		<<if $corpDivSurgerySlaves2 > Math.trunc($corpDivSurgeryDev)>>
			<<set _corpDivSurgeryCapSlaves = $corpDivSurgerySlaves2 - Math.trunc($corpDivSurgeryDev),
			_corpDivSurgeryRev = _corpDivSurgeryCapSlaves * 23 * menialSlaveCost(-_corpDivSurgeryCapSlaves),
			_corpRev += _corpDivSurgeryRev,
			$menialDemandFactor -= _corpDivSurgeryCapSlaves,
			$corpDivSurgerySlaves2 = Math.trunc($corpDivSurgeryDev)>>
			But it ran out of storage space and had to sell <<if _corpDivSurgeryCapSlaves > 1>>@@.red;<<print _corpDivSurgeryCapSlaves>> slaves@@<<else>>@@.red;one slave@@<</if>> and made @@.yellowgreen;<<print cashFormat(_corpDivSurgeryRev)>>.@@
		<</if>>
	<</if>>
<</if>>

<<if $corpDivTrain > 0>>

Slave Training: The division finished training <<if _corpDivTrainProc > 1>><<print _corpDivTrainProc>> slaves.<<elseif _corpDivTrainProc > 0>>one slave.<<else>>@@.red;none of its slaves.@@<</if>> The division is still training $corpDivTrainSlaves slaves.
	<<if $corpDivTrainFromMarket == 1>>
		<<if $corpDivSurgery == 0 && $corpDivTrainSurgerySwitch == 0 && _corpDivTrainSlavesRoom > 0>>
			It replenished its slave stock and bought <<print _corpDivTrainSlavesRoom>> slaves that need slave training from the market.
			<<set _corpDivTrainAssetsSlave = _corpDivTrainSlavesRoom * 15 * menialSlaveCost(_corpDivTrainSlavesRoom),
			_corpAssetsSlave += _corpDivTrainAssetsSlave,
			$corpDivTrainSlaves = $corpDivTrainDev>>
		<<elseif _corpDivTrainSlavesRoom > 0>>
			It replenished its slave stock and bought <<print _corpDivTrainSlavesRoom>> slaves that need slave training from the market.
			<<set _corpDivTrainAssetsSlave = _corpDivTrainSlavesRoom * 23 * menialSlaveCost(_corpDivTrainSlavesRoom),
			_corpAssetsSlave += _corpDivTrainAssetsSlave,
			$corpDivTrainSlaves = $corpDivTrainDev>>
		<</if>>
	<</if>>
	<<if $corpDivTrainToWhore == 1 && _corpDivWhoreSlavesRoom > 0>>
		<<if $corpDivTrainSlaves2 >= _corpDivWhoreSlavesRoom>>
			It moved <<if _corpDivWhoreSlavesRoom > 1>><<print _corpDivWhoreSlavesRoom>> slaves<<else>>one slave<</if>> to the escort division.
			<<set $corpDivTrainSlaves2 -= _corpDivWhoreSlavesRoom,
			$corpDivWhoreSlaves = $corpDivWhoreDev,
			_corpDivWhoreSlavesRoom = corpDivWhoreSlavesRoom()>>
		<<elseif $corpDivTrainSlaves2 > 0>>
			It moved <<if $corpDivTrainSlaves2 > 1>>$corpDivTrainSlaves2 slaves<<else>>one slave<</if>> to the escort division.
			<<set $corpDivWhoreSlaves += $corpDivTrainSlaves2,
			$corpDivTrainSlaves2 = 0,
			_corpDivWhoreSlavesRoom = corpDivWhoreSlavesRoom()>>
		<</if>>
	<</if>>
	<<if $corpDivTrainToMarket == 1 && $corpDivTrainSlaves2 > 0>>
		<<if $corpDivSurgery == 0 && $corpDivTrainSurgerySwitch == 0>>
			It immediately sold <<if $corpDivTrainSlaves2 > 1>>$corpDivTrainSlaves2 slaves<<else>>one slave<</if>>
			<<set _corpDivTrainRev = $corpDivTrainSlaves2 * 26 * menialSlaveCost(-$corpDivTrainSlaves2),
			_corpRev += _corpDivTrainRev,
			$corpDivTrainSlaves2 = 0>>
			to the market and made @@.yellowgreen;<<print cashFormat(_corpDivTrainRev)>>.@@
		<<elseif $corpDivTrainSurgerySwitch == 1 && $corpDivTrainSurgeryTimer < 5>>
			It immediately sold <<if $corpDivTrainSlaves2 > 1>>$corpDivTrainSlaves2 slaves<<else>>one slave<</if>>
			<<set _corpDivTrainRev = Math.trunc($corpDivTrainSlaves2 * (26 + $corpDivTrainSurgeryTimer * 1.6) * menialSlaveCost(-$corpDivTrainSlaves2)),
			_corpRev += _corpDivTrainRev,
			$corpDivTrainSlaves2 = 0>>
			to the market and made @@.yellowgreen;<<print cashFormat(_corpDivTrainRev)>>.@@
		<<else>>
			It immediately sold <<if $corpDivTrainSlaves2 > 1>><<print $corpDivTrainSlaves2>> slaves<<else>>one slave<</if>>
			<<set _corpDivTrainRev = $corpDivTrainSlaves2 * 34 * menialSlaveCost(-$corpDivTrainSlaves2),
			_corpRev += _corpDivTrainRev,
			$corpDivTrainSlaves2 = 0>>
			to the market and made @@.yellowgreen;<<print cashFormat(_corpDivTrainRev)>>.@@
		<</if>>
	<<elseif $corpDivTrainSlaves2 > 0>>It is holding <<if $corpDivTrainSlaves2 > 1>>$corpDivTrainSlaves2 trained slaves<<elseif $corpDivTrainSlaves2 == 1>>one trained slave<</if>> at the end of the week.
		<<if $corpDivTrainSlaves2 > Math.trunc($corpDivTrainDev * 0.4)>>
			<<if $corpDivTrainSurgeryTimer < 5 || $corpDivSurgery == 0>>
				<<set _corpDivTrainCapSlaves = $corpDivTrainSlaves2 - Math.trunc($corpDivTrainDev * 0.4),
				_corpDivTrainRev = _corpDivTrainCapSlaves * 26 * menialSlaveCost(-_corpDivTrainCapSlaves),
				_corpRev += _corpDivTrainRev,
				$menialDemandFactor -= _corpDivTrainCapSlaves,
				$corpDivTrainSlaves2 = Math.trunc($corpDivTrainDev * 0.4)>>
				But it ran out of storage space and had to sell <<if _corpDivTrainCapSlaves > 1>>@@.red;<<print _corpDivTrainCapSlaves>> slaves@@<<elseif _corpDivTrainCapSlaves > 0>>@@.red;one slave@@<</if>> and made @@.yellowgreen;<<print cashFormat(_corpDivTrainRev)>>.@@
			<<else>>
				<<set _corpDivTrainCapSlaves = $corpDivTrainSlaves2 - Math.trunc($corpDivTrainDev * 0.4),
				_corpDivTrainRev = _corpDivTrainCapSlaves * 34 * menialSlaveCost(-_corpDivTrainCapSlaves),
				_corpRev += _corpDivTrainRev,
				$menialDemandFactor -= _corpDivTrainCapSlaves,
				$corpDivTrainSlaves2 = Math.trunc($corpDivTrainDev * 0.4)>>
				But it ran out of storage space and had to sell <<if _corpDivTrainCapSlaves > 1>>@@.red;<<print _corpDivTrainCapSlaves>> slaves@@<<elseif _corpDivTrainCapSlaves > 0>>@@.red;one slave@@<</if>> and made @@.yellowgreen;<<print cashFormat(_corpDivTrainRev)>>.@@
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $corpDivArcade > 0>>

Sex Arcade: The division is exploiting @@.green;$corpDivArcadeSlaves slaves.@@ <<if _corpDivArcadeProc > 0>>During operations <<if _corpDivArcadeProc > 1>>@@.red;_corpDivArcadeProc slaves@@<<else>>@@.green;one slave@@<</if>> wore out.<</if>>
	It earned @@.yellowgreen;<<print cashFormat(_corpDivArcadeRev)>>@@ in revenue.
	<<if $corpDivArcadeFromMarket == 1 && _corpDivArcadeSlavesRoom > 0>>
		It replenished its slave stock and bought <<print _corpDivArcadeSlavesRoom>> fresh slaves from the market.
		<<set _corpDivArcadeAssetsSlave = _corpDivArcadeSlavesRoom * 10 * menialSlaveCost(_corpDivArcadeSlavesRoom),
		_corpAssetsSlave += _corpDivArcadeAssetsSlave,
		$corpDivArcadeSlaves = $corpDivArcadeDev>>
	<</if>>
<</if>>

<<if $corpDivMenial > 0>>

Menial Services: The division is exploiting @@.green;$corpDivMenialSlaves slaves.@@ <<if _corpDivMenialProc > 0>>During operations <<if _corpDivMenialProc > 1>>@@.red;_corpDivMenialProc slaves@@<<else>>@@.green;one slave@@<</if>> wore out.<</if>>

It earned @@.yellowgreen;<<print cashFormat(_corpDivMenialRev)>>@@ in revenue.
	<<if $corpDivMenialFromMarket == 1 && _corpDivMenialSlavesRoom > 0>>
		It replenished its slave stock and bought <<print _corpDivMenialSlavesRoom>> menial slaves from the market.
		<<set _corpDivMenialAssetsSlave = _corpDivMenialSlavesRoom * 15 * menialSlaveCost(_corpDivMenialSlavesRoom),
		_corpAssetsSlave += _corpDivMenialAssetsSlave,
		$corpDivMenialSlaves = $corpDivMenialDev>>
	<</if>>
<</if>>

<<if $corpDivDairy > 0>>

Dairy: The division is milking @@.green;$corpDivDairySlaves slaves.@@ <<if _corpDivDairyProc > 0>>During operations <<if _corpDivDairyProc > 1>>@@.red;_corpDivDairyProc slaves@@<<else>>@@.green;one slave@@<</if>> ran dry.<</if>>
	It earned @@.yellowgreen;<<print cashFormat(_corpDivDairyRev)>>@@ in revenue.
	<<if $corpDivDairyFromMarket == 1 && _corpDivDairySlavesRoom > 0>>
		It replenished its slave stock and bought <<print _corpDivDairySlavesRoom>> cows from the market.
		<<set _corpDivDairyAssetsSlave = _corpDivDairySlavesRoom * 23 * menialSlaveCost(_corpDivDairySlavesRoom),
		_corpAssetsSlave += _corpDivDairyAssetsSlave,
		$corpDivDairySlaves = $corpDivDairyDev>>
	<</if>>
<</if>>

<<if $corpDivWhore > 0>>

Escort Service: The division is whoring out @@.green;$corpDivWhoreSlaves slaves.@@ <<if _corpDivWhoreProc > 0>>During operations <<if _corpDivWhoreProc > 1>>@@.red;_corpDivWhoreProc slaves@@<<else>>@@.green;one slave@@<</if>> lost their appeal.<</if>>
	It earned @@.yellowgreen;<<print cashFormat(_corpDivWhoreRev)>>@@ in revenue.
	<<if $corpDivWhoreFromMarket == 1 && $corpDivTrainSurgerySwitch > 0 && _corpDivWhoreSlavesRoom > 0>>
		It replenished its slave stock and bought <<print _corpDivWhoreSlavesRoom>> trained whores from the market.
		<<set _corpDivWhoreAssetsSlave = _corpDivWhoreSlavesRoom * 34 * menialSlaveCost(_corpDivWhoreSlavesRoom),
		_corpAssetsSlave += _corpDivWhoreAssetsSlave,
		$corpDivWhoreSlaves = $corpDivWhoreDev>>
	<<elseif $corpDivWhoreFromMarket == 1 && _corpDivWhoreSlavesRoom > 0>>
		It replenished its slave stock and bought <<print _corpDivWhoreSlavesRoom>> trained whores from the market.
		<<set _corpDivWhoreAssetsSlave = _corpDivWhoreSlavesRoom * 26 * menialSlaveCost(_corpDivWhoreSlavesRoom),
		_corpAssetsSlave += _corpDivWhoreAssetsSlave,
		$corpDivWhoreSlaves = $corpDivWhoreDev>>
	<</if>>
<</if>>

/*Aggregate Corporation Results*/

''Aggregate Results''
<<set _corpOverhead = 0>>
<<if $corpDiv > 1>>
	<<set _corpAcquisition = Math.pow(($corpDivExtra + $corpDivLegal), 2) * 25000 + Math.pow(Math.max(($corpDivExtraDev + $corpDivLegalDev - 100),0), 2) * 2,
	_corpProcessing = Math.pow(($corpDivBreak + $corpDivSurgery + $corpDivTrain), 2) * 25000 + Math.pow(Math.max(($corpDivBreakDev + $corpDivSurgeryDev + $corpDivTrainDev - 200),0), 2),
	_corpExploitation = Math.pow(Math.max(($corpDivArcade + $corpDivMenial + $corpDivDairy + $corpDivWhore - 1), 0), 2) * 15000 + Math.trunc(Math.pow(Math.max(($corpDivArcadeDev + $corpDivMenialDev + $corpDivDairyDev + $corpDivWhoreDev - 800),0), 2) * 0.1),
	_corpOverhead = _corpAcquisition + _corpProcessing + _corpExploitation + Math.pow(Math.max($corpDiv - 2, 0), 2) * 10000>>
	<<if $corpEasy == 1>>
		<<set _corpOverhead = Math.trunc(_corpOverhead / 2)>>
	<</if>>
<</if>>

/*cash, rev and costs state variables get corrected here*/
<<set $corpCash += _corpRev - (_corpOverhead + _corpOpCost + _corpAssetsSlave),
$corpRev += _corpRev,
$corpAssetsSlave += _corpAssetsSlave,
_corpProfitProvisional = $corpRev - ($corpAssetsDev + $corpAssetsSlave + _corpOpCost + _corpOverhead)>>
<<if _corpProfitProvisional > 0>>
	<<set $corpEcon = Math.trunc(_corpProfitProvisional / (100 / $localEcon) - _corpProfitProvisional),
	$corpCash += $corpEcon,
	$corpProfitOld = _corpProfitProvisional + $corpEcon>> /*this is probably the best place for the economy to show itself, the rest is finnicky enough as is*/
<<else>>
	<<set $corpProfitOld = _corpProfitProvisional>>
<</if>>

Revenue: @@.yellowgreen;<<print cashFormat($corpRev)>>@@
<<if ($cheatMode) && ($cheatModeM) && $corpNeighborBonus > 0>>

Including Neighbor Bonus: @@.yellowgreen;<<print cashFormat($corpNeighborBonus)>>@@
<</if>>

Operating Expenses: @@.red;<<print cashFormat(_corpOpCost)>>@@
<<if $corpAssetsSlave > 0>>

Slave Expenses: @@.red;<<print cashFormat($corpAssetsSlave)>>@@
<<else>>

Slave Expenses: @@.yellowgreen;<<print cashFormat($corpAssetsSlave)>>@@
<</if>>
<<if $corpAssetsDev > 0>>

Asset Expenses: @@.red;<<print cashFormat($corpAssetsDev)>>@@
<<else>>

Asset Expenses: @@.yellowgreen;<<print cashFormat($corpAssetsDev)>>@@
<</if>>
<<if ($cheatMode) && ($cheatModeM)>>
	<<if $corpEcon < 0>>

Economic Expenses: @@.red;<<print cashFormat(-$corpEcon)>>@@
	<<else>>

Economic Windfall: @@.yellowgreen;<<print cashFormat($corpEcon)>>@@
	<</if>>
<</if>>
<<if _corpOverhead != 0>>
Overhead: @@.red;<<print cashFormat(_corpOverhead)>>@@<</if>>

Profit: <<if $corpProfitOld > 0>>@@.yellowgreen;<<print cashFormat($corpProfitOld)>>@@<<else>>@@.red;<<print cashFormat($corpProfitOld)>>@@<</if>>
<<if $localEcon > 100>>

Your profits benefit from a strong economy.
<<elseif $localEcon < 60>>

Your profits are severely depressed by the failing economy.
<<elseif $localEcon < 100>>

Your profits are lowered by the weak economy.
<</if>>

/*Division Expansion Tokens*/
<<if corpValue() > 2000000 && $corpExpand < 1>>
	<<set $corpExpandToken += 1,
	$corpExpand = 1>>

Your corporation is ready to start an additional division!
<<elseif corpValue() > 5000000 && $corpExpand < 2>>
	<<set $corpExpandToken += 1,
	$corpExpand = 2>>

Your corporation is ready to start an additional division!
<<elseif corpValue() > 9000000 && $corpExpand < 3>>
	<<set $corpExpandToken += 1,
	$corpExpand = 3>>

Your corporation is ready to start an additional division!
<<elseif corpValue() > 13000000 && $corpExpand < 4>>
	<<set $corpExpandToken += 1,
	$corpExpand = 4>>

Your corporation is ready to start an additional division!
<<elseif corpValue() > 17000000 && $corpExpand < 5>>
	<<set $corpExpandToken += 1,
	$corpExpand = 5>>

Your corporation is ready to start an additional division!
<<elseif corpValue() > 22000000 && $corpExpand < 6>>
	<<set $corpExpandToken += 1,
	$corpExpand = 6>>

Your corporation is ready to start an additional division!
<<elseif corpValue() > 27000000 && $corpExpand < 7>>
	<<set $corpExpandToken += 1,
	$corpExpand = 7>>

Your corporation is ready to start an additional division!
<<elseif corpValue() > 33000000 && $corpExpand < 8>>
	<<set $corpExpandToken += 1,
	$corpExpand = 8>>

Your corporation is ready to start an additional division!
<</if>>

/*Specializations tokens*/
<<if corpValue() > 1600000 * Math.pow(1.25, $corpSpec) - 1200000>>
	/*the spendable currency*/ <<set $corpSpecToken += 1,
	$corpSpec += 1>> /*the amount unlocked*/

Your corporation is ready to specialize its slaves further!
<</if>>

/*Specialization Cooldown*/
<<if $corpSpecTimer > 0>>
	<<set $corpSpecTimer-->>
<</if>>

/*Calculating cash set aside for dividend*/

''Dividend''
<<if $dividendRatio > 0.5>>

The corporation is currently reserving 75% of its profit to be paid out as dividends.
<<elseif $dividendRatio > 0.25>>

The corporation is currently reserving 50% of its profit to be paid out as dividends.
<<elseif $dividendRatio > 0.1>>

The corporation is currently reserving 25% of its profit to be paid out as dividends.
<<elseif $dividendRatio > 0.05>>

The corporation is currently reserving 10% of its profit to be paid out as dividends.
<<elseif $dividendRatio > 0>>

The corporation is currently reserving 5% of its profit to be paid out as dividends.
<<else>>

The corporation is currently not reserving a portion of its profit to be paid out as dividends.
<</if>>
<<if $corpCashDividend == 1>>
	It is putting aside unused cash reserves to be paid out as dividends.
<</if>>
<<set _dividendCashReserved = 0,
_dividendReserved = 0>>
<<if $corpProfitOld > 0 && $dividendRatio > 0 && $corpCash > $corpProfitOld * $dividendRatio>>
	<<set _dividendReserved = Math.trunc($corpProfitOld * $dividendRatio),
	$corpDividend += _dividendReserved,
	$corpCash -= _dividendReserved>>
<</if>>
<<if $corpCashDividend == 1>>
	<<if $corpCash > 1000000 && $corpCash > Math.trunc(0.05 * corpValue())>>
		<<set _dividendCashReserved = $corpCash - Math.trunc(0.05 * corpValue()),
		$corpDividend += _dividendCashReserved,
		$corpCash -= _dividendCashReserved>>
	<<elseif $corpCash > 1000000>>
		<<set _dividendCashReserved = $corpCash - 1000000,
		$corpDividend += _dividendCashReserved,
		$corpCash -= _dividendCashReserved>>
	<</if>>
<</if>>
<<if $corpDividend > 0 || $dividendRatio > 0 || _dividendCashReserved > 0>>
	<<if _dividendReserved > 0 || _dividendCashReserved > 0>>
		It reserved @@.yellowgreen;<<print cashFormat(_dividendReserved + _dividendCashReserved)>>@@ this week.
	<</if>>
	A total of @@.yellowgreen;<<print cashFormat($corpDividend)>>@@ has been put aside for its shareholders.
<</if>>

/*The corporation pays out every quarter (13 weeks)*/
<<if $dividendTimer == 1>>
	<<set _dividendPayout = Math.trunc($corpDividend * $personalShares / ($personalShares + $publicShares)),
	$corpDividend = 0,
	$dividendTimer = 13,
	cashX(_dividendPayout, "stocks")>>
	<<if _dividendPayout > 0>>

This week the dividends were paid out, you received @@.yellowgreen;<<print cashFormat(_dividendPayout)>>.@@
	<</if>>
<<elseif $corpIncorporated == 1>>
	<<set $dividendTimer -= 1>>
<</if>>

/*Bankrupted the Corporation*/
<<if corpValue() < 0>>
	<<set $corpIncorporated = 0,
	$corpDiv = 0,
	$corpDivExtra = 0,
	$corpDivLegal = 0,
	$corpDivBreak = 0,
	$corpDivSurgery = 0,
	$corpDivTrain = 0,
	$corpDivArcade = 0,
	$corpDivMenial = 0,
	$corpDivDairy = 0,
	$corpDivWhore = 0,
	$corpDivExtraDev = 0,
	$corpDivLegalDev = 0,
	$corpDivBreakDev = 0,
	$corpDivSurgeryDev = 0,
	$corpDivTrainDev = 0,
	$corpDivDairyDev = 0,
	$corpDivArcadeDev = 0,
	$corpDivMenialDev = 0,
	$corpDivWhoreDev = 0,
	$corpExpand = 0,
	$corpExpandToken = 0,
	$corpSpec = 0,
	$corpSpecToken = 0,
	$corpSpecRaces = []>>
	<<unset $corpCash,
	$personalShares,
	$publicShares,
	$corpDividend,
	$dividendTimer,
	$corpDivExtraSlaves,
	$corpDivLegalSlaves,
	$corpDivBreakSlaves,
	$corpDivBreakSlaves2,
	$corpDivSurgerySlaves,
	$corpDivSurgerySlaves2,
	$corpDivTrainSlaves,
	$corpDivTrainSlaves2,
	$corpDivArcadeSlaves,
	$corpDivMenialSlaves,
	$corpDivDairySlaves,
	$corpDivWhoreSlaves,
	$corpRev,
	$corpRevOld,
	$corpAssetsDev,
	$corpAssetsDevOld,
	$corpAssetsSlave,
	$corpAssetsSlaveOld,
	$corpOverheadOld,
	$corpOpCostOld,
	$corpProfitOld,
	$corpSpecAccent,
	$corpSpecAge,
	$corpSpecAmputee,
	$corpSpecBalls,
	$corpSpecDevotion,
	$corpSpecDick,
	$corpSpecEducation,
	$corpSpecGender,
	$corpSpecGenitalia,
	$corpSpecWeight,
	$corpSpecHeight,
	$corpSpecHormones,
	$corpSpecImplants,
	$corpSpecInjection,
	$corpSpecIntelligence,
	$corpSpecMilk,
	$corpSpecMuscle,
	$corpSpecPussy,
	$corpSpecSexEd,
	$corpSpecTrust,
	$corpSpecVirgin>>
	<<if $corpMarket == 1>>
		<<for _i = 0; _i < $sectors.length; _i++>>
			<<if $sectors[_i].type == "CorporateMarket">><<set $sectors[_i].type = "Markets">><<break>><</if>>
		<</for>>
		<<set $corpMarket = 0>>
	<</if>>

@@.red;Your corporation went bankrupt.@@
<</if>>

<<set $corpRevOld = $corpRev,
$corpRev = 0,
$corpOpCostOld = _corpOpCost,
$corpAssetsDevOld = $corpAssetsDev,
$corpAssetsDev = 0,
$corpAssetsSlaveOld = $corpAssetsSlave,
$corpAssetsSlave = 0,
$corpOverheadOld = _corpOverhead>> /*This needs to be at the very end of the financials*/