From 9136b4f8cfe6d1de4b50bb7d68af2e9806898e03 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Sun, 8 Nov 2020 16:53:16 -0500 Subject: [PATCH] basic conversion --- src/endWeek/reports/arcadeReport.js | 324 ++++++++++++++++++++++++++ src/endWeek/reportsTW/arcadeReport.tw | 3 + src/uncategorized/arcadeReport.tw | 298 ----------------------- 3 files changed, 327 insertions(+), 298 deletions(-) create mode 100644 src/endWeek/reports/arcadeReport.js create mode 100644 src/endWeek/reportsTW/arcadeReport.tw delete mode 100644 src/uncategorized/arcadeReport.tw diff --git a/src/endWeek/reports/arcadeReport.js b/src/endWeek/reports/arcadeReport.js new file mode 100644 index 00000000000..86a8174d266 --- /dev/null +++ b/src/endWeek/reports/arcadeReport.js @@ -0,0 +1,324 @@ +/** + * @returns {DocumentFragment} + */ +App.EndWeek.arcadeReport = function() { + const el = new DocumentFragment(); + let r; + + <span id="arcade-stats"> + </span> + + _slaves = App.Utils.sortedEmployees(App.Entity.facilities.arcade); + _DL = _slaves.length, _SL = V.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 --> + V.facility = V.facility || {}, V.facility.arcade = initFacilityStatistics(V.facility.arcade); + _arcadeNameCaps = capFirstChar(V.arcadeName); + + + if (_DL > 1) {''There are _DL inmates confined in V.arcadeName.'' + } else {''There is one inmate confined in V.arcadeName.'' + } + if (V.arcologies[0].FSDegradationist > 20) { + if (V.arcologies[0].FSDegradationistLaw === 1) { + r.push(`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 { + r.push(`The tenants located near the arcade consider the facility a normal part of their surroundings.`); + } + } else if ((V.arcologies[0].FSPaternalist > 20)) { + r.push(`The tenants located near the arcade consider it an <span class="red">intolerable</span> establishment.`); + } + if (V.arcadeDecoration !== "standard") { + <br><br> _arcadeNameCaps's customers enjoy <span class="green">getting off in V.arcadeDecoration surroundings.</span> + } + + <<for _slave range _slaves>> + <<setLocalPronouns _slave>> + V.i = V.slaveIndices[_slave.ID]; + r.push(` /* for the included passages */`); + + /* Perform facility based rule changes */ + _slave.clothes = "no clothing"; + /* Health */ + if (V.arcadeUpgradeHealth === 2 && _slave.health.condition < 40) { + improveCondition(_slave, 2); + } else if (_slave.health.condition > 20) { + healthDamage(_slave, 5); + } else if (V.arcadeUpgradeHealth === 1 && _slave.health.condition < -30) { + improveCondition(_slave, 2); + } else if (_slave.health.condition > -50) { + healthDamage(_slave, 3); + } else if (_slave.health.condition > -90) { + healthDamage(_slave, 1); + } + /* Curatives */ + if (V.arcadeUpgradeHealth === 2) { + _slave.curatives = 2; + } else if (V.arcadeUpgradeHealth === 1) { + _slave.curatives = 1; + } + /* Stimulation or lack thereof trust/devotion effect */ + if (V.arcadeUpgradeInjectors > 0) { + if (V.arcadeUpgradeInjectors === 2) { + _slave.aphrodisiacs = 2; + } + _slave.devotion -= 5, _slave.trust -= 10; + } else { + _slave.trust -= 5; + } + /* Muscles */ + if (_slave.muscles > -100) { + _slave.muscles--; + } + + if (V.showEWD !== 0) { + <br><br> + /* 000-250-006 */ + if (V.seeImages && V.seeReportImages) { + <div class="imageRef tinyImg"> + r.push(`${V.SlaveArt(_slave}, 0, 0)`); + </div> + } + /* 000-250-006 */ + <<includeDOM App.EndWeek.favoriteIcon(_slave)>> + <span class='slave-name'> + V.SlaveFullName(_slave)</span> + if (_slave.choosesOwnAssignment === 2) { + r.push(`${V.App.SlaveAssignment.choosesOwnJob(_slave)}`); + } else { + r.push(`is confined in ${V.arcadeName}.`); + } + <br> ${He} + V.App.SlaveAssignment.workAGloryHole(_slave) + } else { + App.SlaveAssignment.choosesOwnJob(_slave); + App.SlaveAssignment.workAGloryHole(_slave); + } + if (V.arcadeUpgradeCollectors > 0) { + if (_slave.vasectomy === 1) { + _slave.vasectomy = 0, _vasectomiesUndone++; + cashX(forceNeg(V.surgeryCost), "slaveSurgery", _slave), surgeryDamage(_slave, 10); + } else if ((_slave.lactation < 2)) { + _slave.lactation = 2, _boobsImplanted++; + _bSlave = _slave; + cashX(forceNeg(V.surgeryCost), "slaveSurgery", _slave), surgeryDamage(_slave, 10); + } else if (_slave.prostate === 1) { + _slave.prostate = 2, _prostatesImplanted++; + _pSlave = _slave; + cashX(forceNeg(V.surgeryCost), "slaveSurgery", _slave), surgeryDamage(_slave, 10); + } else if ((_slave.lactation > 0) || (_slave.balls > 0)) { + _milkResults = App.SlaveAssignment.getMilked(_slave, 1.0); + if (V.showEWD !== 0) { + <br> ${He} + V._milkResults.text + } + _milkProfits += _milkResults.cash; + _growth = 0; + _gigantomastiaMod = _slave.geneticQuirks.gigantomastia === 2 ? (_slave.geneticQuirks.macromastia === 2 ? 3 : 2) : 1; + if (_slave.boobs < 2000) { + _growth = 100; + } else if ((_slave.boobs < 5000*_gigantomastiaMod)) { + _growth = 50; + } else if ((_slave.boobs < 10000*_gigantomastiaMod)) { + _growth = 25; + } + if (_slave.geneMods.NCS === 1) { + /* + ** NCS will allow some growth for Arcade milking, but not as much as the Dairy. + */ + _growth = Math.trunc(_growth/3.5); + } + _slave.boobs += _growth; + if ((_slave.balls > 0) && (_slave.balls < 10) && (random(1,100) > (40 + (10 * (_slave.balls + (2 * _slave.geneMods.NCS)))))) { + _slave.balls++; + } + if ((_slave.dick > 0) && (_slave.dick < 10) && (random(1,100) > (40 + (10 * _slave.dick + (2 * _slave.geneMods.NCS))))) { + _slave.dick++; + } + if (_slave.lactation > 0) { + _milked++; + _mSlave = _slave; + } + if (_slave.balls > 0) { + _cockmilked++; + _cSlave = _slave; + } + } + } + if (_slave.inflation > 0) { + deflate(_slave); + } + if (V.showEWD !== 0) { + <br> + <<includeDOM App.SlaveAssignment.rules(_slave)>> + r.push(`${V.App.SlaveAssignment.diet(_slave)}`); + <<includeDOM App.SlaveAssignment.longTermEffects(_slave)>> + r.push(`${V.App.SlaveAssignment.drugs(_slave)}`); + r.push(`${V.App.SlaveAssignment.relationships(_slave)}`); + r.push(`${V.App.SlaveAssignment.rivalries(_slave)}`); + <br> + V.App.SlaveAssignment.devotion(_slave) + } else { + App.SlaveAssignment.rules(); + App.SlaveAssignment.diet(_slave); + App.SlaveAssignment.longTermEffects(_slave); + App.SlaveAssignment.drugs(_slave); + App.SlaveAssignment.relationships(_slave); + App.SlaveAssignment.rivalries(_slave); + App.SlaveAssignment.devotion(_slave); + } + <</for>> + + if (_DL + V.fuckdolls > 0) { + <br><br> + if (_milked === 1) { + <<setLocalPronouns _mSlave>> + r.push(`One of them is lactating and spends ${his} time in ${V.arcadeName} being simultaneously milked and fucked.`); + } else if (_milked > 1) { + _milked of them are lactating and spend their time in V.arcadeName being simultaneously milked and fucked. + } + + if (_vasectomiesUndone) { + if (_vasectomiesUndone === 1) { + r.push(`One`); + } else { + _vasectomiesUndone + } + r.push(`of them had severed vas deferens, so they were reattached to allow sperm through, costing <span class="red">`); + V.cashFormat(V.surgeryCost*_vasectomiesUndone) + r.push(`.</span>`); + } + if (_boobsImplanted) { + if (_boobsImplanted === 1) { + <<setLocalPronouns _bSlave>> + r.push(`One of them was not lactating, so ${he} was`); + } else { + _boobsImplanted of them were not lactating, so they were + } + r.push(`implanted with long-acting lactation inducing drugs, costing <span class="red">`); + V.cashFormat(V.surgeryCost*_boobsImplanted) + r.push(`.</span>`); + } + if (_prostatesImplanted) { + if (_prostatesImplanted === 1) { + <<setLocalPronouns _pSlave>> + r.push(`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 + } + r.push(`implanted with long-acting prostate stimulation drugs, costing <span class="red">`); + V.cashFormat(V.surgeryCost*_prostatesImplanted) + r.push(`.</span>`); + } + if (_cockmilked === 1) { + <<setLocalPronouns _cSlave>> + r.push(`One of them retains testicles and is brutally cockmilked as ${he} is used.`); + } else if (_cockmilked > 1) { + _cockmilked of them retain testicles and are brutally cockmilked as they are used. + } + + r.push(`The arcade makes you`); + if (V.policies.publicFuckdolls === 0) { + r.push(`<span class="yellowgreen">`); + V.cashFormat(_profits) + r.push(`</span> from selling the inmates' holes`); + } else { + r.push(`<span class="green">more reputable</span> from freely providing the inmates' holes`); + } + if (V.arcadeUpgradeCollectors > 0 && V.policies.publicFuckdolls === 0) { + r.push(`and`); + } + if (V.arcadeUpgradeCollectors > 0) { + r.push(`<span class="yellowgreen">`); + V.cashFormat(_milkProfits) + r.push(`</span> from selling the fluids they produced`); + } + r.push(`this week.`); + if (V.arcologies[0].FSPaternalist > 20) { + repX(forceNeg(Math.trunc(_profits/20)), "arcade"); + } + } + + if (V.arcadeUpgradeFuckdolls === 2) { + _currentSlave = 0, _Age = -1, _FD = -1, _MB = -1, _Con = -1; + <<for _slave range _slaves>> + if (_slave.sentence === 0) { + r.push(` /* let's not convert slaves we are punishing into Fuckdolls */`); + if (_slave.fetish === "mindbroken") { + if (_slave.fuckdoll === 0) { + if (_slave.physicalAge > 35) { + _Age = V.i; + <<break>> + } else if (_FD === -1) { + _FD = V.i; + } + } else if (_MB === -1) { + if (_slave.vagina >= 4 || _slave.anus >= 4) { + _Con = V.i; + } else if (_slave.physicalAge > 35) { + _Age = V.i; + } else { + _MB = V.i; + } + } + } else if (_Con === -1) { + if (_slave.vagina >= 4 || _slave.anus >= 4) { + _Con = V.i; + } else if (_slave.physicalAge > 35) { + _Age = V.i; + } + } + } + <</for>> + if (_FD > -1) { + _currentSlave = V.slaves[_FD]; + } else if (_Con > -1) { + _currentSlave = V.slaves[_Con]; + } else if (_MB > -1) { + _currentSlave = V.slaves[_MB]; + } else if (_Age > -1) { + _currentSlave = V.slaves[_Age]; + } + if (_currentSlave !== 0) { + App.Utils.setLocalPronouns(_currentSlave); + <br> _currentSlave.slaveName is low-quality merchandise, so ${he} has been converted into a Fuckdoll. + r.push(`${V.removeSlave(_currentSlave)}`); + if (_currentSlave === 0) { + r.push(` /* if not zero then technically there was an error INVALID SLAVE */`); + V.fuckdolls++, _SL--; + } + } else { + <br> No slaves have failed quality inspection for Fuckdoll conversion. _arcadeNameCaps will remain overcrowded this week. + } + } + + if (_DL > 0) { + <!-- Record statistics gathering --> + <<script>> + r.push(`var b = State.variables.facility.arcade;`); + r.push(`b.whoreIncome = 0;`); + r.push(`b.customers = 0;`); + r.push(`b.whoreCosts = 0;`); + r.push(`b.rep = 0;`); + r.push(`for (var si of b.income.values()) {`); + r.push(`b.whoreIncome += si.income;`); + r.push(`b.customers += si.customers;`); + r.push(`b.whoreCosts += si.cost;`); + r.push(`b.rep += si.rep;`); + } + r.push(`b.maintenance = State.variables.arcade * State.variables.facilityCost * (0.05 + 0.02 * State.variables.arcadeUpgradeInjectors + 0.05 * State.variables.arcadeUpgradeCollectors);`); + r.push(`b.totalIncome = b.whoreIncome;`); + r.push(`b.totalExpenses = b.whoreCosts + b.maintenance;`); + r.push(`b.profit = b.totalIncome - b.totalExpenses;`); + <</script>> + + <!-- Statistics output --> + <<includeDOM App.Facilities.Arcade.Stats(false)>> + <<timed 50ms>> + <<replace #arcade-stats>> + <<includeDOM App.Facilities.Arcade.Stats(true)>> + <</replace>> + <</timed>> + <br><br> + } +}; diff --git a/src/endWeek/reportsTW/arcadeReport.tw b/src/endWeek/reportsTW/arcadeReport.tw new file mode 100644 index 00000000000..148369a2fec --- /dev/null +++ b/src/endWeek/reportsTW/arcadeReport.tw @@ -0,0 +1,3 @@ +:: Arcade Report [nobr] + +<<includeDOM App.EndWeek.arcadeReport()>> diff --git a/src/uncategorized/arcadeReport.tw b/src/uncategorized/arcadeReport.tw deleted file mode 100644 index 2f2dca07c7e..00000000000 --- a/src/uncategorized/arcadeReport.tw +++ /dev/null @@ -1,298 +0,0 @@ -:: Arcade Report [nobr] - -<span id="arcade-stats"> -</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)>> -<<set _arcadeNameCaps = capFirstChar($arcadeName)>> - - <<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> _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 */ - <<includeDOM App.EndWeek.favoriteIcon(_slave)>> - <span class='slave-name'><<= SlaveFullName(_slave)>></span> - <<if _slave.choosesOwnAssignment == 2>> - <<= App.SlaveAssignment.choosesOwnJob(_slave)>> - <<else>> - is confined in $arcadeName. - <</if>> - <br> $He <<= App.SlaveAssignment.workAGloryHole(_slave)>> - <<else>> - <<run App.SlaveAssignment.choosesOwnJob(_slave)>> - <<run App.SlaveAssignment.workAGloryHole(_slave)>> - <</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 _milkResults = App.SlaveAssignment.getMilked(_slave, 1.0)>> - <<if $showEWD != 0>> - <br> $He <<= _milkResults.text>> - <</if>> - <<set _milkProfits += _milkResults.cash>> - <<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)>> - <<run deflate(_slave)>> - <</if>> - <<if $showEWD != 0>> - <br> - <<includeDOM App.SlaveAssignment.rules(_slave)>> - <<= App.SlaveAssignment.diet(_slave)>> - <<includeDOM App.SlaveAssignment.longTermEffects(_slave)>> - <<= App.SlaveAssignment.drugs(_slave)>> - <<= App.SlaveAssignment.relationships(_slave)>> - <<= App.SlaveAssignment.rivalries(_slave)>> - <br> <<= App.SlaveAssignment.devotion(_slave)>> - <<else>> - <<run App.SlaveAssignment.rules()>> - <<run App.SlaveAssignment.diet(_slave)>> - <<run App.SlaveAssignment.longTermEffects(_slave)>> - <<run App.SlaveAssignment.drugs(_slave)>> - <<run App.SlaveAssignment.relationships(_slave)>> - <<run App.SlaveAssignment.rivalries(_slave)>> - <<run App.SlaveAssignment.devotion(_slave)>> - <</if>> -<</for>> - -<<if _DL + $fuckdolls > 0>> - <br><br> - <<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 _currentSlave = 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 _currentSlave = $slaves[_FD]>> - <<elseif _Con > -1>> - <<set _currentSlave = $slaves[_Con]>> - <<elseif _MB > -1>> - <<set _currentSlave = $slaves[_MB]>> - <<elseif _Age > -1>> - <<set _currentSlave = $slaves[_Age]>> - <</if>> - <<if _currentSlave != 0>> - <<run App.Utils.setLocalPronouns(_currentSlave)>> - <br> _currentSlave.slaveName is low-quality merchandise, so $he has been converted into a Fuckdoll. - <<= removeSlave(_currentSlave)>> - <<if _currentSlave == 0>> /% if not zero then technically there was an error INVALID SLAVE %/ - <<set $fuckdolls++, _SL-->> - <</if>> - <<else>> - <br> 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 --> - <<includeDOM App.Facilities.Arcade.Stats(false)>> - <<timed 50ms>> - <<replace #arcade-stats>> - <<includeDOM App.Facilities.Arcade.Stats(true)>> - <</replace>> - <</timed>> - <br><br> -<</if>> -- GitLab