diff --git a/src/js/assayJS.tw b/src/js/assayJS.tw new file mode 100644 index 0000000000000000000000000000000000000000..392e847f410727af0610b0a780db93089b12972c --- /dev/null +++ b/src/js/assayJS.tw @@ -0,0 +1,168 @@ +:: AssayJS [script] + +window.slimCount = function(slaves) { + var slim = 0; + var ArcologyZero = State.variables.arcologies[0]; + + for (var i = 0; i < slaves.length; i++) { + var slave = slaves[i]; + if ((slave.boobs < 500) && (slave.butt < 3)) { + if ((slave.muscles <= 30) && (ArcologyZero.FSPhysicalIdealist == "unset") && (slave.weight <= 10) && (ArcologyZero.FSHedonisticDecadence == "unset")) { + slim += 1; + } else if (ArcologyZero.FSPhysicalIdealist != "unset") { + if ((ArcologyZero.FSPhysicalIdealistStrongFat == 1) && (slave.weight <= 30)) { + slim += 1; + } + } else if ((ArcologyZero.FSHedonisticDecadence != "unset") && (slave.weight <= 30)) { + if (ArcologyZero.FSHedonisticDecadenceStrongFat == 1) { + slim += 1; + } else if (slave.muscles <= 30) { + slim += 1; + } + } + } + } + + return slim; +} + +window.stackedCount = function(slaves) { + var stacked = 0; + + for (var i = 0; i < slaves.length; i++) { + var slave = slaves[i]; + if ((slave.butt > 4) && (slave.boobs > 800)) { + stacked += 1; + } + } + + return stacked; +} + +window.moddedCount = function(slaves) { + var modded = 0; + + for (var i = 0; i < slaves.length; i++) { + var slave = slaves[i]; + var modScore = ModScore(slave); + var tatScore = TatScore(slave); + var piercingScore = PiercingScore(slave); + if ((modScore > 15) || (piercingScore > 8) && (tatScore > 5)) { + modded += 1; + } + } + return modded; +} + +window.unmoddedCount = function(slaves) { + var unmodded = 0; + + for (var i = 0; i < slaves.length; i++) { + var slave = slaves[i]; + var modScore = ModScore(slave); + var tatScore = TatScore(slave); + var piercingScore = PiercingScore(slave); + if ((modScore > 15) || (piercingScore > 8) && (tatScore > 5)) + ; else { + unmodded += 1; + } + } + + return unmodded; +} + +window.XYCount = function(slaves) { + var XY = 0; + + for (var i = 0; i < slaves.length; i++) { + var slave = slaves[i]; + if (slave.vagina == -1) { + XY += 1; + } + } + return XY; +} + +window.XXCount = function(slaves) { + var XX = 0; + + for (var i = 0; i < slaves.length; i++) { + var slave = slaves[i]; + if (slave.vagina != -1) { + State.variables.XX += 1; + } + } + return XX; +} + +window.youngCount = function(slaves) { + var young = 0; + + for (var i = 0; i < slaves.length; i++) { + var slave = slaves[i]; + if (slave.visualAge < 30) { + State.variables.young += 1; + } + } + return young; +} + +window.oldCount = function(slaves) { + var old = 0; + + for (var i = 0; i < slaves.length; i++) { + var slave = slaves[i]; + if (slave.visualAge >= 30) { + State.variables.old += 1; + } + } + return old; +} + +window.pregYesCount = function(slaves) { + var pregYes = 0; + + for (var i = 0; i < slaves.length; i++) { + var slave = slaves[i]; + if ((slave.bellyPreg >= 5000) || (slave.bellyImplant >= 5000)) { + pregYes += 1; + } + } + return pregYes; +} + +window.pregNoCount = function(slaves) { + var pregNo = 0; + + for (var i = 0; i < slaves.length; i++) { + var slave = slaves[i]; + if ((slave.bellyPreg >= 5000) || (slave.bellyImplant >= 5000)) + ; else if ((slave.belly < 100) && (slave.weight < 30) && (!setup.fakeBellies.includes(slave.bellyAccessory))) { + pregNo += 1; + } + } + return pregNo; +} + +window.implantedCount = function(slaves) { + var implanted = 0; + for (var i = 0; i < slaves.length; i++) { + var slave = slaves[i]; + if ((slave.boobsImplant == 0) && (slave.buttImplant == 0) && (slave.waist >= -95) && (slave.lipsImplant == 0) && (slave.faceImplant < 30) && (slave.bellyImplant == -1) && (Math.abs(slave.shouldersImplant) < 2) && (Math.abs(slave.hipsImplant) < 2)) + ; else { + implanted += 1; + } + } + return implanted; +} + +window.pureCount = function(slaves) { + var pure = 0; + for (var i = 0; i < slaves.length; i++) { + var slave = slaves[i]; + if ((slave.boobsImplant == 0) && (slave.buttImplant == 0) && (slave.waist >= -95) && (slave.lipsImplant == 0) && (slave.faceImplant < 30) && (slave.bellyImplant == -1) && (Math.abs(slave.shouldersImplant) < 2) && (Math.abs(slave.hipsImplant) < 2)) { + pure += 1; + } + } + return pure; +} diff --git a/src/uncategorized/brothelReport.tw b/src/uncategorized/brothelReport.tw index a01cbaef084e6277d6f3cea6c93e119ffb7fd24b..6c496f7fcfcd72a4f13e585f215f9d73884e05c0 100644 --- a/src/uncategorized/brothelReport.tw +++ b/src/uncategorized/brothelReport.tw @@ -4,9 +4,10 @@ </span> <<SlaveSort $BrothiIDs>> -<<set _DL = $BrothiIDs.length, $brothelSlaves = _DL, _SL = $slaves.length, $implanted = 0, $legendaryWhoreID = 0, $madamCashBonus = 0, $modded = 0, $old = 0, $pure = 0, $slim = 0, $stacked = 0, $unmodded = 0, $XX = 0, $XY = 0, $young = 0, _FLsFetish = 0, _profits = 0>> +<<set _DL = $BrothiIDs.length, $brothelSlaves = _DL, _SL = $slaves.length, $implanted = 0, $legendaryWhoreID = 0, $madamCashBonus = 0, _FLsFetish = 0, _profits = 0>> -<<set $legendaryWombID = 0, $pregYes = 0, $pregNo = 0>> +<<set $legendaryWombID = 0>> +<<set _brothelSlaves = $slaves.filter(function(s) { return s.assignment == "work in the brothel" || s.ID == $Madam.ID })>> <!-- Statistics gathering --> <<set $facility = $facility || {}, $facility.brothel = initFacilityStatistics($facility.brothel)>> @@ -429,7 +430,9 @@ <<if ($arcologies[0].FSAssetExpansionist == "unset") && ($arcologies[0].FSSlimnessEnthusiast == "unset")>> <<if ($brothelAdsSpending == 0) || ($brothelAdsStacked == 0)>> <<set _possibleBonuses++>> - <<if ($slim > 0) && ($stacked > 0) && (Math.abs($slim-$stacked) <= (_DL/3))>> + <<set _slim = slimCount(_brothelSlaves)>> + <<set _stacked = stackedCount(_brothelSlaves)>> + <<if (_slim > 0) && (_stacked > 0) && (Math.abs(_slim-_stacked) <= (_DL/3))>> <<set _adsIncome = _DL*random(20,30), $cash += _adsIncome, $facility.brothel.adsIncome += _adsIncome, _brothelBonuses++>> The brothel offers a @@.yellowgreen;wide@@ variety of slim and stacked slaves. <</if>> @@ -438,7 +441,9 @@ <<if ($arcologies[0].FSRepopulationFocus == "unset") && ($arcologies[0].FSRestart == "unset")>> <<if ($brothelAdsSpending == 0) || ($brothelAdsPreg == 0)>> <<set _possibleBonuses++>> - <<if ($pregYes > 0) && ($pregNo > 0) && (Math.abs($pregYes-$pregNo) <= (_DL/3))>> + <<set _pregYes = pregYesCount(_brothelSlaves)>> + <<set _pregNo = pregNoCount(_brothelSlaves)>> + <<if (_pregYes > 0) && (_pregNo > 0) && (Math.abs(_pregYes-_pregNo) <= (_DL/3))>> <<set _adsIncome = _DL*random(20,30), $cash += _adsIncome, $facility.brothel.adsIncome += _adsIncome, _brothelBonuses++>> The brothel offers a @@.yellowgreen;wide@@ variety of slaves with big bellies and slaves with flat bellies. <</if>> @@ -447,7 +452,9 @@ <<if ($arcologies[0].FSDegradationist == "unset") && ($arcologies[0].FSBodyPurist == "unset")>> <<if ($brothelAdsSpending == 0) || ($brothelAdsModded == 0)>> <<set _possibleBonuses++>> - <<if ($modded > 0) && ($unmodded > 0) && (Math.abs($modded-$unmodded) <= (_DL/3))>> + <<set _modded = moddedCount(_brothelSlaves)>> + <<set _unmodded = unmoddedCount(_brothelSlaves)>> + <<if (_modded > 0) && (_unmodded > 0) && (Math.abs(_modded-_unmodded) <= (_DL/3))>> <<set _adsIncome = _DL*random(20,30), $cash += _adsIncome, $facility.brothel.adsIncome += _adsIncome, _brothelBonuses++>> The brothel offers a @@.yellowgreen;both@@ heavily pierced and tattooed slaves and slaves with more natural bodies. <</if>> @@ -456,7 +463,9 @@ <<if ($arcologies[0].FSTransformationFetishist == "unset") && ($arcologies[0].FSBodyPurist == "unset")>> <<if ($brothelAdsSpending == 0) || ($brothelAdsImplanted == 0)>> <<set _possibleBonuses++>> - <<if ($implanted > 0) && ($pure > 0) && (Math.abs($implanted-$pure) <= (_DL/3))>> + <<set _implanted = implantedCount(_brothelSlaves)>> + <<set _pure = pureCount(_brothelSlaves)>> + <<if (_implanted > 0) && (_pure > 0) && (Math.abs(_implanted-_pure) <= (_DL/3))>> <<set _adsIncome = _DL*random(20,30), $cash += _adsIncome, $facility.brothel.adsIncome += _adsIncome, _brothelBonuses++>> The brothel offers @@.yellowgreen;both@@ all-natural girls, and slaves whose beauty has been improved by surgical means. <</if>> @@ -465,7 +474,9 @@ <<if $seeDicks != 0>> <<if ($brothelAdsSpending == 0) || ($brothelAdsXX == 0)>> <<set _possibleBonuses++>> - <<if ($XX > 0) && ($XY > 0) && (Math.abs($XX-$XY) <= (_DL/3))>> + <<set _XX = XXCount(_brothelSlaves)>> + <<set _XY = XYCount(_brothelSlaves)>> + <<if (_XX > 0) && (_XY > 0) && (Math.abs(_XX-_XY) <= (_DL/3))>> <<set _adsIncome = _DL*random(20,30), $cash += _adsIncome, $facility.brothel.adsIncome += _adsIncome, _brothelBonuses++>> The brothel offers a @@.yellowgreen;mix@@ of whores that can appeal to varied tastes in genitalia. <</if>> @@ -474,7 +485,9 @@ <<if ($arcologies[0].FSMaturityPreferentialist == "unset") && ($arcologies[0].FSYouthPreferentialist == "unset")>> <<if ($brothelAdsSpending == 0) || ($brothelAdsOld == 0)>> <<set _possibleBonuses++>> - <<if ($young > 0) && ($old > 0) && (Math.abs($young-$old) <= (_DL/3))>> + <<set _young = youngCount(_brothelSlaves)>> + <<set _old = oldCount(_brothelSlaves)>> + <<if (_young > 0) && (_old > 0) && (Math.abs(_young-_old) <= (_DL/3))>> <<set _adsIncome = _DL*random(20,30), $cash += _adsIncome, $facility.brothel.adsIncome += _adsIncome, _brothelBonuses++>> The brothel offers girls @@.yellowgreen;both@@ young and mature. <</if>> diff --git a/src/uncategorized/clubReport.tw b/src/uncategorized/clubReport.tw index 9d89bb6121032bd265042bb9ec5e098749875756..a012fa6ec2645aab189f4b0636155ff7a218c23c 100644 --- a/src/uncategorized/clubReport.tw +++ b/src/uncategorized/clubReport.tw @@ -4,8 +4,10 @@ </span> <<SlaveSort $ClubiIDs>> -<<set _DL = $ClubiIDs.length, $clubSlaves = _DL, _SL = $slaves.length, $clubBonuses = 0, $DJRepBonus = 0, $implanted = 0, $legendaryEntertainerID = 0, $modded = 0, $old = 0, $pure = 0, $slim = 0, $stacked = 0, $unmodded = 0, $XX = 0, $XY = 0, $young = 0, _FLsFetish = 0>> -<<set $legendaryWombID = 0, $pregYes = 0, $pregNo = 0>> +<<set _DL = $ClubiIDs.length, $clubSlaves = _DL, _SL = $slaves.length, $clubBonuses = 0, $DJRepBonus = 0, $legendaryEntertainerID = 0, _FLsFetish = 0>> +<<set $legendaryWombID = 0>> + +<<set _clubSlaves = $slaves.filter(function(s) { return s.assignment == "serve in the club" || s.ID == $DJ.ID })>> <!-- Statistics gathering; income is rep boosts in numbers, and profit will be rep per cash unit, or cash unit per rep --> <<set $facility = $facility || {}, $facility.club = initFacilityStatistics($facility.club)>> @@ -247,7 +249,9 @@ <<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 _slim = slimCount(_clubSlaves)>> + <<set _stacked = stackedCount(_clubSlaves)>> + <<if (_slim > 0) && (_stacked > 0) && (Math.abs(_slim-_stacked) <= (_DL/3))>> <<set $repGain += _DL*random(5,10), $clubBonuses++>> There is a @@.green;wide@@ variety of slim and stacked slaves working the club. <</if>> @@ -256,7 +260,9 @@ <<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 _modded = moddedCount(_clubSlaves)>> + <<set _unmodded = unmoddedCount(_clubSlaves)>> + <<if (_modded > 0) && (_unmodded > 0) && (Math.abs(_modded-_unmodded) <= (_DL/3))>> <<set $repGain += _DL*random(5,10), $clubBonuses++>> There are @@.green;both@@ heavily pierced and tattooed slaves and slaves with more natural bodies filling the club. <</if>> @@ -265,7 +271,9 @@ <<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 _implanted = implantedCount(_clubSlaves)>> + <<set _pure = pureCount(_clubSlaves)>> + <<if (_implanted > 0) && (_pure > 0) && (Math.abs(_implanted-_pure) <= (_DL/3))>> <<set $repGain += _DL*random(5,10), $clubBonuses++>> Citizens in $clubName can easily find @@.yellowgreen;both@@ all-natural girls, and slaves whose beauty has been improved by surgical means. <</if>> @@ -274,7 +282,9 @@ <<if ($seeDicks != 0)>> <<if ($clubAdsSpending == 0) || ($clubAdsXX == 0)>> <<set _possibleBonuses++>> - <<if ($XX > 0) && ($XY > 0) && (Math.abs($XX-$XY) <= (_DL/3))>> + <<set _XX = XXCount(_clubSlaves)>> + <<set _XY = XYCount(_clubSlaves)>> + <<if (_XX > 0) && (_XY > 0) && (Math.abs(_XX-_XY) <= (_DL/3))>> <<set $repGain += _DL*random(5,10), $clubBonuses++>> The club offers a @@.green;mix@@ of sluts that can appeal to varied tastes in genitalia. <</if>> @@ -283,7 +293,9 @@ <<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 _young = youngCount(_clubSlaves)>> + <<set _old = oldCount(_clubSlaves)>> + <<if (_young > 0) && (_old > 0) && (Math.abs(_young-_old) <= (_DL/3))>> <<set $repGain += _DL*random(5,10), $clubBonuses++>> There are girls @@.green;both@@ young and mature in $clubName. <</if>> @@ -292,7 +304,9 @@ <<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 _pregYes = pregYesCount(_clubSlaves)>> + <<set _pregNo = pregNoCount(_clubSlaves)>> + <<if (_pregYes > 0) && (_pregNo > 0) && (Math.abs(_pregYes-_pregNo) <= (_DL/3))>> <<set $repGain += _DL*random(5,10), $clubBonuses++>> There is a @@.green;wide@@ variety of slaves with swollen, round bellies and flat bellies working the club. <</if>> diff --git a/src/utility/assayWidgets.tw b/src/utility/assayWidgets.tw index 170ef095016fa84becc9c6afa676994816e2d69c..2d76870866fb26ba6f102da454acd0640510779f 100644 --- a/src/utility/assayWidgets.tw +++ b/src/utility/assayWidgets.tw @@ -3,21 +3,6 @@ <<widget "Beauty">> <<modScore $args[0]>> -<<if $modScore > 15 || ($piercingScore > 8 && $tatScore > 5)>> - <<set $modded += 1>> -<<elseif $args[0].corsetPiercing == 0 && $piercingScore < 3 && $tatScore < 2>> - <<set $unmodded += 1>> -<</if>> -<<if $args[0].vagina == -1>> - <<set $XY += 1>> -<<else>> - <<set $XX += 1>> -<</if>> -<<if $args[0].visualAge >= 30>> - <<set $old += 1>> -<<else>> - <<set $young += 1>> -<</if>> <<set $beauty = 0>> @@ -832,12 +817,6 @@ <</if>> <</if>> -<<if ($args[0].bellyPreg >= 5000) || ($args[0].bellyImplant >= 5000)>> - <<set $pregYes += 1>> -<<elseif ($args[0].belly < 100) && ($args[0].weight < 30) && (!setup.fakeBellies.includes($args[0].bellyAccessory))>> - <<set $pregNo += 1>> -<</if>> - <<if $args[0].bellySag > 0>> <<if $args[0].belly < 100>> <<if $arcologies[0].FSRepopulationFocus != "unset">> @@ -858,7 +837,6 @@ <<if $arcologies[0].FSSlimnessEnthusiast == "unset">> <<set $beauty += 1>> <</if>> - <<set $stacked += 1>> <<if $arcologies[0].FSAssetExpansionist != "unset">> <<set $beauty += ($arcologies[0].FSAssetExpansionist/20)>> <<if canTalk($args[0])>> @@ -872,7 +850,6 @@ <<if ($args[0].boobs < 500) && ($args[0].butt < 3)>> <<if ($args[0].muscles <= 30) && $arcologies[0].FSPhysicalIdealist == "unset" && ($args[0].weight <= 10) && $arcologies[0].FSHedonisticDecadence == "unset">> <<set $beauty += 40>> - <<set $slim += 1>> <<if $arcologies[0].FSSlimnessEnthusiast > 20>> <<set $beauty += ($arcologies[0].FSSlimnessEnthusiast/20)>> <<if canTalk($args[0])>> @@ -884,7 +861,6 @@ <<elseif $arcologies[0].FSPhysicalIdealist != "unset">> /* no muscle malus for muscle loving societies */ <<if $arcologies[0].FSPhysicalIdealistStrongFat == 1 && ($args[0].weight <= 30)>> /* reduced weight malus for fat loving societies */ <<set $beauty += 40>> - <<set $slim += 1>> <<if $arcologies[0].FSSlimnessEnthusiast > 20>> <<set $beauty += ($arcologies[0].FSSlimnessEnthusiast/20)>> <<if canTalk($args[0]) && $args[0].voice == 3>> @@ -893,7 +869,6 @@ <</if>> <<elseif ($args[0].weight <= 10)>> <<set $beauty += 40>> - <<set $slim += 1>> <<if $arcologies[0].FSSlimnessEnthusiast > 20>> <<set $beauty += ($arcologies[0].FSSlimnessEnthusiast/20)>> <<if canTalk($args[0]) && $args[0].voice == 3>> @@ -904,7 +879,6 @@ <<elseif $arcologies[0].FSHedonisticDecadence != "unset" && ($args[0].weight <= 30)>> /* reduced weight malus for fat loving societies */ <<if $arcologies[0].FSHedonisticDecadenceStrongFat == 1>> /* no muscle malus for muscle loving societies */ <<set $beauty += 40>> - <<set $slim += 1>> <<if $arcologies[0].FSSlimnessEnthusiast > 20>> <<set $beauty += ($arcologies[0].FSSlimnessEnthusiast/20)>> <<if canTalk($args[0]) && $args[0].voice == 3>> @@ -913,7 +887,6 @@ <</if>> <<elseif ($args[0].muscles <= 30)>> <<set $beauty += 40>> - <<set $slim += 1>> <<if $arcologies[0].FSSlimnessEnthusiast > 20>> <<set $beauty += ($arcologies[0].FSSlimnessEnthusiast/20)>> <<if canTalk($args[0]) && $args[0].voice == 3>> @@ -987,7 +960,6 @@ <</if>> <<if ($args[0].boobsImplant == 0) && ($args[0].buttImplant == 0) && ($args[0].waist >= -95) && ($args[0].lipsImplant == 0) && ($args[0].faceImplant < 30) && ($args[0].bellyImplant == -1) && (Math.abs($args[0].shouldersImplant) < 2) && (Math.abs($args[0].hipsImplant) < 2)>> - <<set $pure += 1>> <<if $arcologies[0].FSBodyPurist != "unset">> <<set $beauty += ($arcologies[0].FSBodyPurist/5)>> <</if>> @@ -995,7 +967,6 @@ <<set $beauty += 2>> <</if>> <<else>> - <<set $implanted += 1>> <<if $arcologies[0].FSTransformationFetishist != "unset">> <<set $beauty += ($arcologies[0].FSTransformationFetishist/40)>> <</if>>