:: Arcade Report [nobr]

<span id="arcadestats">
</span>

<<set _slaves = App.Utils.sortedEmployees(App.Entity.facilities.arcade)>>
<<set _DL = _slaves.length, _SL = $slaves.length, _cockmilked = 0, _milked = 0, _milkprofits = 0, _profits = 0, _oldCash = 0, _boobsImplanted = 0, _prostatesImplanted = 0, _vasectomiesUndone = 0, _mSlave = 0, _bSlave = 0, _pSlave = 0, _cSlave = 0>>

<!-- Statistics gathering -->
<<set $facility = $facility || {}, $facility.arcade = initFacilityStatistics($facility.arcade)>>

&nbsp;&nbsp;&nbsp;&nbsp;<<if (_DL > 1)>>''There are _DL inmates confined in $arcadeName.''<<else>>''There is one inmate confined in $arcadeName.''<</if>>
<<if ($arcologies[0].FSDegradationist > 20)>>
	<<if $arcologies[0].FSDegradationistLaw == 1>>
		The tenants located near the arcade consider the facility a normal part of their surroundings, including the crowd of menial slaves waiting their turn spills out into the hallway, 24 hours a day.
	<<else>>
		The tenants located near the arcade consider the facility a normal part of their surroundings.
	<</if>>
<<elseif ($arcologies[0].FSPaternalist > 20)>>
	The tenants located near the arcade consider it an @@.red;intolerable@@ establishment.
<</if>>
<<if $arcadeDecoration != "standard">>
	<br><br>&nbsp;&nbsp;&nbsp;&nbsp;$arcadeNameCaps's customers enjoy @@.green;getting off in $arcadeDecoration surroundings.@@
<</if>>

<<for _slave range _slaves>>
	<<setLocalPronouns _slave>>
	<<set $i = $slaveIndices[_slave.ID]>> /% for the included passages %/

	/* Perform facility based rule changes */
	<<set _slave.clothes = "no clothing">>
	/* Health */
	<<if $arcadeUpgradeHealth == 2 && _slave.health.condition < 40>>
		<<run improveCondition(_slave, 2)>>
	<<elseif _slave.health.condition > 20>>
		<<run healthDamage(_slave, 5)>>
	<<elseif $arcadeUpgradeHealth == 1 && _slave.health.condition < -30>>
		<<run improveCondition(_slave, 2)>>
	<<elseif _slave.health.condition > -50>>
		<<run healthDamage(_slave, 3)>>
	<<elseif _slave.health.condition > -90>>
		<<run healthDamage(_slave, 1)>>
	<</if>>
	/* Curatives */
	<<if $arcadeUpgradeHealth == 2>>
		<<set _slave.curatives = 2>>
	<<elseif $arcadeUpgradeHealth == 1>>
		<<set _slave.curatives = 1>>
	<</if>>
	/* Stimulation or lack thereof trust/devotion effect */
	<<if ($arcadeUpgradeInjectors > 0)>>
		<<if $arcadeUpgradeInjectors == 2>>
			<<set _slave.aphrodisiacs = 2>>
		<</if>>
		<<set _slave.devotion -= 5, _slave.trust -= 10>>
	<<else>>
		<<set _slave.trust -= 5>>
	<</if>>
	/* Muscles */
	<<if (_slave.muscles > -100)>>
		<<set _slave.muscles-->>
	<</if>>

	<<if $showEWD != 0>>
		<br><br>
		/* 000-250-006 */
		<<if $seeImages && $seeReportImages>>
			<div class="imageRef tinyImg">
				<<= SlaveArt(_slave, 0, 0)>>
			</div>
		<</if>>
		/* 000-250-006 */
		<span class='slave-name'><<= SlaveFullName(_slave)>></span>
		<<if _slave.choosesOwnAssignment == 2>>
			<<include "SA chooses own job">>
		<<else>>
			is confined in $arcadeName.
		<</if>>
		<br>&nbsp;&nbsp;&nbsp;&nbsp;$He <<= App.SlaveAssignment.workAGloryHole(_slave)>>
	<<else>>
		<<silently>>
			<<include "SA chooses own job">>
			<<run App.SlaveAssignment.workAGloryHole(_slave)>>
		<</silently>>
	<</if>>
	<<if ($arcadeUpgradeCollectors > 0)>>
		<<if (_slave.vasectomy == 1)>>
			<<set _slave.vasectomy = 0, _vasectomiesUndone++>>
			<<run cashX(forceNeg($surgeryCost), "slaveSurgery", _slave), surgeryDamage(_slave, 10)>>
		<<elseif (_slave.lactation < 2)>>
			<<set _slave.lactation = 2, _boobsImplanted++>>
			<<set _bSlave = _slave>>
			<<run cashX(forceNeg($surgeryCost), "slaveSurgery", _slave), surgeryDamage(_slave, 10)>>
		<<elseif _slave.prostate == 1>>
			<<set _slave.prostate = 2, _prostatesImplanted++>>
			<<set _pSlave = _slave>>
			<<run cashX(forceNeg($surgeryCost), "slaveSurgery", _slave), surgeryDamage(_slave, 10)>>
		<<elseif (_slave.lactation > 0) || (_slave.balls > 0)>>
			<<set _oldCash = $cash>>
			<<if $showEWD != 0>>
				<br>&nbsp;&nbsp;&nbsp;&nbsp;$He <<= App.SlaveAssignment.getMilked(_slave)>>
			<<else>>
				<<run App.SlaveAssignment.getMilked(_slave)>>
			<</if>>
			<<set _milkprofits += $cash-_oldCash>>
			<<set _growth = 0>>
			<<set _gigantomastiaMod = _slave.geneticQuirks.gigantomastia == 2 ? (_slave.geneticQuirks.macromastia == 2 ? 3 : 2) : 1>>
			<<if (_slave.boobs < 2000)>>
				<<set _growth = 100>>
			<<elseif (_slave.boobs < 5000*_gigantomastiaMod)>>
				<<set _growth = 50>>
			<<elseif (_slave.boobs < 10000*_gigantomastiaMod)>>
				<<set _growth = 25>>
			<</if>>
			<<if (_slave.geneMods.NCS == 1)>>
				/*
				** NCS will allow some growth for Arcade milking, but not as much as the Dairy.
				*/
				<<set _growth = Math.trunc(_growth/3.5)>>
			<</if>>
			<<set _slave.boobs += _growth>>
			<<if ((_slave.balls > 0) && (_slave.balls < 10) && (random(1,100) > (40 + (10 * (_slave.balls + (2 * _slave.geneMods.NCS))))))>>
				<<set _slave.balls++>>
			<</if>>
			<<if ((_slave.dick > 0) && (_slave.dick < 10) && (random(1,100) > (40 + (10 * _slave.dick + (2 * _slave.geneMods.NCS)))))>>
				<<set _slave.dick++>>
			<</if>>
			<<if (_slave.lactation > 0)>>
				<<set _milked++>>
				<<set _mSlave = _slave>>
			<</if>>
			<<if (_slave.balls > 0)>>
				<<set _cockmilked++>>
				<<set _cSlave = _slave>>
			<</if>>
		<</if>>
	<</if>>
	<<if (_slave.inflation > 0)>>
		<<set _slave.inflation = 0, _slave.inflationType = "none", _slave.inflationMethod = 0, _slave.milkSource = 0>>
		<<run SetBellySize(_slave)>>
	<</if>>
	<<if $showEWD != 0>>
		<br>&nbsp;&nbsp;&nbsp;
		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<= App.SlaveAssignment.drugs(_slave)>>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<br><<include "SA devotion">>
	<<else>>
		<<silently>>
		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<run App.SlaveAssignment.drugs(_slave)>>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<<include "SA devotion">>
		<</silently>>
	<</if>>
<</for>>

<<if _DL + $fuckdolls > 0>>
	<br><br>&nbsp;&nbsp;&nbsp;
	<<if _milked == 1>>
		<<setLocalPronouns _mSlave>>
		One of them is lactating and spends $his time in $arcadeName being simultaneously milked and fucked.
	<<elseif _milked > 1>>
		_milked of them are lactating and spend their time in $arcadeName being simultaneously milked and fucked.
	<</if>>

	<<if _vasectomiesUndone>>
		<<if _vasectomiesUndone == 1>>
			One
		<<else>>
			_vasectomiesUndone
		<</if>>
		of them had severed vas deferens, so they were reattached to allow sperm through, costing @@.red;<<print cashFormat($surgeryCost*_vasectomiesUndone)>>.@@
	<</if>>
	<<if _boobsImplanted>>
		<<if _boobsImplanted == 1>>
			<<setLocalPronouns _bSlave>>
			One of them was not lactating, so $he was
		<<else>>
			_boobsImplanted of them were not lactating, so they were
		<</if>>
		implanted with long-acting lactation inducing drugs, costing @@.red;<<print cashFormat($surgeryCost*_boobsImplanted)>>.@@
	<</if>>
	<<if _prostatesImplanted>>
		<<if _prostatesImplanted == 1>>
			<<setLocalPronouns _pSlave>>
			One of them was not producing the maximum possible amount of precum, so $he was
		<<else>>
			_prostatesImplanted of them were not producing the maximum possible amount of precum, so they were
		<</if>>
		implanted with long-acting prostate stimulation drugs, costing @@.red;<<print cashFormat($surgeryCost*_prostatesImplanted)>>.@@
	<</if>>
	<<if _cockmilked == 1>>
		<<setLocalPronouns _cSlave>>
		One of them retains testicles and is brutally cockmilked as $he is used.
	<<elseif _cockmilked > 1>>
		_cockmilked of them retain testicles and are brutally cockmilked as they are used.
	<</if>>

	The arcade makes you
	<<if $policies.publicFuckdolls == 0>>
		@@.yellowgreen;<<print cashFormat(_profits)>>@@ from selling the inmates' holes
	<<else>>
		@@.green;more reputable@@ from freely providing the inmates' holes
	<</if>>
	<<if $arcadeUpgradeCollectors > 0 && $policies.publicFuckdolls == 0>>
		and
	<</if>>
	<<if $arcadeUpgradeCollectors > 0>>
		@@.yellowgreen;<<print cashFormat(_milkprofits)>>@@ from selling the fluids they produced
	<</if>>
	this week.
	<<if ($arcologies[0].FSPaternalist > 20)>>
		<<run repX(forceNeg(Math.trunc(_profits/20)), "arcade")>>
	<</if>>
<</if>>

<<if ($arcadeUpgradeFuckdolls == 2)>>
	<<set $activeSlave = 0, _Age = -1, _FD = -1, _MB = -1, _Con = -1>>
	<<for _slave range _slaves>>
		<<if _slave.sentence == 0>> /* let's not convert slaves we are punishing into Fuckdolls */
			<<if (_slave.fetish == "mindbroken")>>
				<<if (_slave.fuckdoll == 0)>>
					<<if (_slave.physicalAge > 35)>>
						<<set _Age = $i>>
						<<break>>
					<<elseif _FD == -1>>
						<<set _FD = $i>>
					<</if>>
				<<elseif _MB == -1>>
					<<if _slave.vagina >= 4 || _slave.anus >= 4>>
						<<set _Con = $i>>
					<<elseif _slave.physicalAge > 35>>
						<<set _Age = $i>>
					<<else>>
						<<set _MB = $i>>
					<</if>>
				<</if>>
			<<elseif _Con == -1>>
				<<if _slave.vagina >= 4 || _slave.anus >= 4>>
					<<set _Con = $i>>
				<<elseif _slave.physicalAge > 35>>
					<<set _Age = $i>>
				<</if>>
			<</if>>
		<</if>>
	<</for>>
	<<if _FD > -1>>
		<<set $activeSlave = $slaves[_FD]>>
	<<elseif _Con > -1>>
		<<set $activeSlave = $slaves[_Con]>>
	<<elseif _MB > -1>>
		<<set $activeSlave = $slaves[_MB]>>
	<<elseif _Age > -1>>
		<<set $activeSlave = $slaves[_Age]>>
	<</if>>
	<<if $activeSlave != 0>>
		<<setLocalPronouns $activeSlave>>
		<br>&nbsp;&nbsp;&nbsp;&nbsp;$activeSlave.slaveName is low-quality merchandise, so $he has been converted into a Fuckdoll.
		<<= removeActiveSlave() >>
		<<if $activeSlave == 0>> /% if not zero then technically there was an error INVALID SLAVE %/
			<<set $fuckdolls++, _SL-->>
		<</if>>
	<<else>>
		<br>&nbsp;&nbsp;&nbsp;&nbsp;No slaves have failed quality inspection for Fuckdoll conversion. $arcadeNameCaps will remain overcrowded this week.
	<</if>>
<</if>>

<<if _DL > 0>>
	<!-- Record statistics gathering -->
	<<script>>
		var b = State.variables.facility.arcade;
		b.whoreIncome = 0;
		b.customers = 0;
		b.whoreCosts = 0;
		b.rep = 0;
		for (var si of b.income.values()) {
			b.whoreIncome += si.income;
			b.customers += si.customers;
			b.whoreCosts += si.cost;
			b.rep += si.rep;
		}
		b.maintenance = State.variables.arcade * State.variables.facilityCost * (0.05 + 0.02 * State.variables.arcadeUpgradeInjectors + 0.05 * State.variables.arcadeUpgradeCollectors);
		b.totalIncome = b.whoreIncome;
		b.totalExpenses = b.whoreCosts + b.maintenance;
		b.profit = b.totalIncome - b.totalExpenses;
	<</script>>

	<!-- Statistics output -->
	<<ArcadeStatistics 0>>
	<<timed 50ms>>
		<<replace #arcadestats>>
			<<ArcadeStatistics 1>>
		<</replace>>
	<</timed>>
	<br><br>
<</if>>

src/uncategorized/arcadeReport.tw