diff --git a/src/endWeek/clinicReport.js b/src/endWeek/clinicReport.js index 87ffbc9daf2b9e9d620d4c0ae5f164613c4f11dc..10f77a51d58dd43a836064eea8ec584f93cfa052 100644 --- a/src/endWeek/clinicReport.js +++ b/src/endWeek/clinicReport.js @@ -376,7 +376,6 @@ App.EndWeek.clinicReport = function() { continue; } - App.Utils.setLocalPronouns(slave); // need this for the includes if (V.showEWD !== 0) { const slaveEntry = App.UI.DOM.appendNewElement("div", frag, '', "slave-report"); if (V.seeImages && V.seeReportImages) { diff --git a/src/uncategorized/brothelReport.js b/src/uncategorized/brothelReport.js index a1f3c43fdc9f5d7d86e8c13095e28a855cedd68b..108c12f6305e6449f7282967fbcbfb15e03383f2 100644 --- a/src/uncategorized/brothelReport.js +++ b/src/uncategorized/brothelReport.js @@ -8,8 +8,8 @@ globalThis.brothelReport = function() { brothelStats.id = "brothel-stats"; el.append(brothelStats); - const _slaves = App.Utils.sortedEmployees(App.Entity.facilities.brothel); - let _DL = _slaves.length, _FLsFetish = 0, _profits = 0; + const slaves = App.Utils.sortedEmployees(App.Entity.facilities.brothel); + let _DL = slaves.length, _FLsFetish = 0, _profits = 0; V.legendaryWhoreID = 0; V.legendaryWombID = 0; @@ -61,9 +61,12 @@ globalThis.brothelReport = function() { ({ he, him, his, himself, He, His, wife } = getPronouns(S.Madam)); - // + const slave = S.Madam; + V.i = V.slaveIndices[slave.ID]; + App.Utils.setLocalPronouns(slave); // need this for the includes + /* apply following SA passages to facility leader */ + r = []; - r.push(`${SlaveFullName(S.Madam)} is serving as the Madam.`); if (S.Madam.relationship === -3 && S.Madam.devotion > 50) { r.push(`As your loving ${wife}, ${he} does ${his} best to attract attention to your brothel.`); } @@ -99,68 +102,68 @@ globalThis.brothelReport = function() { } App.Events.addParagraph(el, r); - for (const _slave of _slaves) { - V.i = V.slaveIndices[_slave.ID]; + for (const slave of slaves) { + V.i = V.slaveIndices[slave.ID]; ({ he, him, his, himself, He, His, wife - } = getPronouns(_slave).appendSuffix('2')); + } = getPronouns(slave).appendSuffix('2')); r = []; /* for the included passages */ - if (S.Madam.rivalryTarget === _slave.ID) { + if (S.Madam.rivalryTarget === slave.ID) { r.push(`${He} forces ${his} ${rivalryTerm(S.Madam)}, to service all the men in the brothel.`); - _slave.devotion -= 2; - _slave.trust -= 2; - if (canDoVaginal(_slave)) { - seX(_slave, "vaginal", "public", "penetrative", 10); + slave.devotion -= 2; + slave.trust -= 2; + if (canDoVaginal(slave)) { + seX(slave, "vaginal", "public", "penetrative", 10); } - if (canDoAnal(_slave)) { - seX(_slave, "anal", "public", "penetrative", 12); + if (canDoAnal(slave)) { + seX(slave, "anal", "public", "penetrative", 12); } - seX(_slave, "anal", "public", "penetrative", 10); + seX(slave, "anal", "public", "penetrative", 10); if (random(1, 100) > 65) { S.Madam.rivalry++; - _slave.rivalry++; + slave.rivalry++; } - } else if (S.Madam.relationshipTarget === _slave.ID) { - r.push(`${He} dotes over ${his} ${relationshipTerm(S.Madam)}, ${_slave.slaveName}, making sure ${he2} is safe, but unfortunately driving potential customers away from ${him2}.`); - _slave.devotion++; - } else if (areRelated(S.Madam, _slave)) { - r.push(`${He} pays special attention to ${his} ${relativeTerm(S.Madam, _slave)}, ${_slave.slaveName}, making sure ${he2} is treated well and showing off ${his2} skills.`); - _slave.trust++; + } else if (S.Madam.relationshipTarget === slave.ID) { + r.push(`${He} dotes over ${his} ${relationshipTerm(S.Madam)}, ${slave.slaveName}, making sure ${he2} is safe, but unfortunately driving potential customers away from ${him2}.`); + slave.devotion++; + } else if (areRelated(S.Madam, slave)) { + r.push(`${He} pays special attention to ${his} ${relativeTerm(S.Madam, slave)}, ${slave.slaveName}, making sure ${he2} is treated well and showing off ${his2} skills.`); + slave.trust++; } - if (_slave.prestigeDesc === "${He} is a famed Free Cities whore, and commands top prices.") { - r.push(`${He} makes sure to promote ${_slave.slaveName}, the famed whore, in order to capitalize on ${his2} popularity.`); - } else if (_slave.prestigeDesc === "${He} is a famed Free Cities slut, and can please anyone.") { - r.push(`${He} makes sure to promote${_slave.slaveName}, the famed entertainer, in order to capitalize on ${his2} popularity.`); - } else if (_slave.prestigeDesc === "${He} is remembered for winning best in show as a dairy cow.") { + if (slave.prestigeDesc === "$He is a famed Free Cities whore, and commands top prices.") { + r.push(`${He} makes sure to promote ${slave.slaveName}, the famed whore, in order to capitalize on ${his2} popularity.`); + } else if (slave.prestigeDesc === "$He is a famed Free Cities slut, and can please anyone.") { + r.push(`${He} makes sure to promote${slave.slaveName}, the famed entertainer, in order to capitalize on ${his2} popularity.`); + } else if (slave.prestigeDesc === "$He is remembered for winning best in show as a dairy cow.") { if (V.arcologies[0].FSPhysicalIdealist !== "unset") { - if ((_slave.muscles > 60) && (_slave.weight < 30) && (_slave.lactation > 0) && ((_slave.boobs - _slave.boobsImplant) > 6000)) { - r.push(`${He} shows off how even a cow like${_slave.slaveName} can achieve physical perfection.`); + if ((slave.muscles > 60) && (slave.weight < 30) && (slave.lactation > 0) && ((slave.boobs - slave.boobsImplant) > 6000)) { + r.push(`${He} shows off how even a cow like${slave.slaveName} can achieve physical perfection.`); } else { r.push(`A`); - if (_slave.muscles < 30) { + if (slave.muscles < 30) { r.push(`n unmuscled,`); } - if (_slave.weight > 30) { + if (slave.weight > 30) { r.push(` fat,`); } r.push(` 'prestigious' `); - if (_slave.lactation > 0) { + if (slave.lactation > 0) { r.push(`cow`); - } else if (((_slave.boobs - _slave.boobsImplant) > 6000)) { + } else if (((slave.boobs - slave.boobsImplant) > 6000)) { r.push(`mass of titflesh`); } else { r.push(`slave`); } - r.push(` like${_slave.slaveName} is woefully out of fashion, so ${S.Madam.slaveName} tries to draw attention away from ${him2}.`); + r.push(` like${slave.slaveName} is woefully out of fashion, so ${S.Madam.slaveName} tries to draw attention away from ${him2}.`); } } else { - if ((_slave.lactation > 0) && ((_slave.boobs - _slave.boobsImplant) > 6000)) { - r.push(`${He} makes sure to massage${_slave.slaveName}'s huge breasts to get the milk flowing before enticing clients to suckle and play with ${him2}.`); + if ((slave.lactation > 0) && ((slave.boobs - slave.boobsImplant) > 6000)) { + r.push(`${He} makes sure to massage${slave.slaveName}'s huge breasts to get the milk flowing before enticing clients to suckle and play with ${him2}.`); } else { - r.push(`${He} would like to show off${_slave.slaveName}'s huge udders, but ${_slave.slaveName} `); - if (_slave.lactation === 0) { + r.push(`${He} would like to show off${slave.slaveName}'s huge udders, but ${slave.slaveName} `); + if (slave.lactation === 0) { r.push(`isn't producing milk anymore`); } else { r.push(`doesn't exactly have huge udders anymore`); @@ -168,22 +171,22 @@ globalThis.brothelReport = function() { r.push(`.`); } } - } else if (_slave.prestigeDesc === "${He} is remembered for winning best in show as a cockmilker.") { + } else if (slave.prestigeDesc === "${He} is remembered for winning best in show as a cockmilker.") { if (V.arcologies[0].FSGenderFundamentalist !== "unset") { /* this needs review - doesn't fit right. An XY slave would be expected to be masculine. */ - if ((_slave.balls === 0) && (_slave.dick === 0) && (_slave.vagina > -1)) { - r.push(`${He} uses${_slave.slaveName}} as an example of how even a huge-balled freak like ${him2} can be restored to proper femininity.`); + if ((slave.balls === 0) && (slave.dick === 0) && (slave.vagina > -1)) { + r.push(`${He} uses${slave.slaveName}} as an example of how even a huge-balled freak like ${him2} can be restored to proper femininity.`); } else { - r.push(`${He} tries to hide${_slave.slaveName}}, 'her' body being notorious for its defiance of conventional femininity.`); + r.push(`${He} tries to hide${slave.slaveName}}, 'her' body being notorious for its defiance of conventional femininity.`); } } else { - if (((_slave.balls > 5) && (_slave.dick !== 0)) || ((_slave.balls > 4) && (_slave.dick !== 0) && (_slave.prostate > 1))) { - r.push(`${He} shows off${_slave.slaveName}}'s copious loads by putting a condom over ${his2} dick and teasing ${him2} till ${he2} bursts it. The show draws multiple clients that want to play with ${his2} oversized junk and messy orgasms.`); + if (((slave.balls > 5) && (slave.dick !== 0)) || ((slave.balls > 4) && (slave.dick !== 0) && (slave.prostate > 1))) { + r.push(`${He} shows off${slave.slaveName}}'s copious loads by putting a condom over ${his2} dick and teasing ${him2} till ${he2} bursts it. The show draws multiple clients that want to play with ${his2} oversized junk and messy orgasms.`); } else { - r.push(`${He} would love to show off${_slave.slaveName}}'s copious loads, but _slave.slaveName`); - if (_slave.dick === 0) { + r.push(`${He} would love to show off${slave.slaveName}}'s copious loads, but slave.slaveName`); + if (slave.dick === 0) { r.push(` doesn't have a dick`); - } else if (_slave.balls === 0) { + } else if (slave.balls === 0) { r.push(`'s not producing cum`); } else { r.push(`'s orgasms just aren't messy enough`); @@ -191,16 +194,16 @@ globalThis.brothelReport = function() { r.push(`.`); } } - } else if (_slave.prestigeDesc === "${He} is remembered for winning best in show as a breeder.") { - if (_slave.bellyPreg >= 5000) { - r.push(`${He} makes sure${_slave.slaveName}}'s growing pregnancy is well taken care of, even if it means driving away potential customers away when the mother-to-be needs a rest.`); - } else if (canGetPregnant(_slave)) { - r.push(`${He} makes sure to play off${_slave.slaveName}}'s fame and fertility by enticing potential customers to be the one to claim ${his2} womb by filling it with their child.`); + } else if (slave.prestigeDesc === "${He} is remembered for winning best in show as a breeder.") { + if (slave.bellyPreg >= 5000) { + r.push(`${He} makes sure${slave.slaveName}}'s growing pregnancy is well taken care of, even if it means driving away potential customers away when the mother-to-be needs a rest.`); + } else if (canGetPregnant(slave)) { + r.push(`${He} makes sure to play off${slave.slaveName}}'s fame and fertility by enticing potential customers to be the one to claim ${his2} womb by filling it with their child.`); } else { - r.push(`${He} would love to play off of${_slave.slaveName}}'s fame and fertility, but unfortunately ${he2} `); - if (_slave.pregKnown === 1 && _slave.bellyPreg < 1500) { + r.push(`${He} would love to play off of${slave.slaveName}}'s fame and fertility, but unfortunately ${he2} `); + if (slave.pregKnown === 1 && slave.bellyPreg < 1500) { r.push(`is already pregnant and not far enough along to show it`); - } else if (_slave.pregKnown === 1 && _slave.bellyPreg < 5000) { + } else if (slave.pregKnown === 1 && slave.bellyPreg < 5000) { r.push(`already pregnant, but not enough to be exciting`); } else { r.push(`is unable to get knocked up`); @@ -244,40 +247,18 @@ globalThis.brothelReport = function() { el.append(whoreNumber); } - if (V.MadamID !== 0) { - V.i = V.slaveIndices[V.MadamID]; - /* apply following SA passages to facility leader */ + if (S.Madam) { + const slave = S.Madam; if (V.showEWD !== 0) { + const madamEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report"); if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", el, App.Art.SlaveArtElement(S.Madam, 0, 0), ["imageRef", "tinyImg"]); + App.UI.DOM.appendNewElement("div", madamEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); } - el.append(App.EndWeek.favoriteIcon(S.Madam)); - r = []; - App.UI.DOM.makeElement("span", SlaveFullName(S.Madam), "slave-name"); - el.append(`is serving as the Madam.`); - App.Events.addNode(el, r, "div"); - r = []; - r.push(App.SlaveAssignment.choosesOwnClothes(S.Madam)); - tired(S.Madam); - r.push(App.SlaveAssignment.rules(S.Madam)); - r.push(App.SlaveAssignment.diet(S.Madam)); - r.push(App.SlaveAssignment.longTermEffects(S.Madam)); - r.push(App.SlaveAssignment.drugs(S.Madam)); - r.push(App.SlaveAssignment.relationships(S.Madam)); - r.push(App.SlaveAssignment.rivalries(S.Madam)); - App.Events.addParagraph(el, r); - r = [App.SlaveAssignment.devotion(S.Madam)]; - App.Events.addParagraph(el, r); + madamEntry.append(App.EndWeek.favoriteIcon(slave), " "); + $(madamEntry).append(`<span class='slave-name'>${SlaveFullName(slave)}</span> is serving as the Madam.`); + $(madamEntry).append(App.SlaveAssignment.standardSlaveReport(slave, false)); } else { - App.SlaveAssignment.choosesOwnClothes(S.Madam); - tired(S.Madam); - App.SlaveAssignment.rules(S.Madam); - App.SlaveAssignment.diet(S.Madam); - App.SlaveAssignment.longTermEffects(S.Madam); - App.SlaveAssignment.drugs(S.Madam); - App.SlaveAssignment.relationships(S.Madam); - App.SlaveAssignment.rivalries(S.Madam); - App.SlaveAssignment.devotion(S.Madam); + App.SlaveAssignment.standardSlaveReport(slave, true); } } @@ -292,97 +273,78 @@ globalThis.brothelReport = function() { _aphrod = 2; } let _oldCash = V.cash; - for (const _slave of _slaves) { - V.i = V.slaveIndices[_slave.ID]; + for (const slave of slaves) { + V.i = V.slaveIndices[slave.ID]; ({ he, him, his, himself, He, His, wife - } = getPronouns(_slave)); - if ((V.legendaryWombID === 0) && (!isAmputee(_slave)) && (_slave.preg > _slave.pregData.normalBirth / 1.33) && (_slave.broodmother === 0) && (_slave.eggType === "human") && (_slave.counter.births > 10) && (_slave.devotion > 50) && (_slave.prestige === 0)) { - V.legendaryWombID = _slave.ID; + } = getPronouns(slave)); + if ((V.legendaryWombID === 0) && (!isAmputee(slave)) && (slave.preg > slave.pregData.normalBirth / 1.33) && (slave.broodmother === 0) && (slave.eggType === "human") && (slave.counter.births > 10) && (slave.devotion > 50) && (slave.prestige === 0)) { + V.legendaryWombID = slave.ID; } - if ((V.legendaryWhoreID === 0) && (_slave.skill.whoring >= 100) && (_slave.devotion > 50) && (_slave.prestige === 0)) { - V.legendaryWhoreID = _slave.ID; + if ((V.legendaryWhoreID === 0) && (slave.skill.whoring >= 100) && (slave.devotion > 50) && (slave.prestige === 0)) { + V.legendaryWhoreID = slave.ID; } /* Perform facility based rule changes */ - improveCondition(_slave, healthBonus); - _slave.aphrodisiacs = _aphrod; + improveCondition(slave, healthBonus); + slave.aphrodisiacs = _aphrod; switch (V.brothelDecoration) { case "Degradationist": case "standard": - _slave.rules.living = "spare"; + slave.rules.living = "spare"; break; default: - _slave.rules.living = "normal"; + slave.rules.living = "normal"; } - if (_slave.health.condition < -80) { - improveCondition(_slave, 20); - } else if (_slave.health.condition < -40) { - improveCondition(_slave, 15); - } else if (_slave.health.condition < 0) { - improveCondition(_slave, 10); - } else if (_slave.health.condition < 90) { - improveCondition(_slave, 7); + if (slave.health.condition < -80) { + improveCondition(slave, 20); + } else if (slave.health.condition < -40) { + improveCondition(slave, 15); + } else if (slave.health.condition < 0) { + improveCondition(slave, 10); + } else if (slave.health.condition < 90) { + improveCondition(slave, 7); } - if ((_slave.devotion <= 20) && (_slave.trust >= -20)) { - _slave.devotion -= 5; - _slave.trust -= 5; - } else if ((_slave.devotion < 45)) { - _slave.devotion += 4; - } else if ((_slave.devotion > 50)) { - _slave.devotion -= 4; + if ((slave.devotion <= 20) && (slave.trust >= -20)) { + slave.devotion -= 5; + slave.trust -= 5; + } else if ((slave.devotion < 45)) { + slave.devotion += 4; + } else if ((slave.devotion > 50)) { + slave.devotion -= 4; } - if (_slave.trust < 30) { - _slave.trust += 5; + if (slave.trust < 30) { + slave.trust += 5; } - if (_slave.energy > 40 && _slave.energy < 95) { - _slave.energy++; + if (slave.energy > 40 && slave.energy < 95) { + slave.energy++; } if (V.showEWD !== 0) { + const slaveEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report"); if (V.seeImages && V.seeReportImages) { - App.UI.DOM.appendNewElement("div", el, App.Art.SlaveArtElement(_slave, 0, 0), ["imageRef", "tinyImg"]); + App.UI.DOM.appendNewElement("div", slaveEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); } - el.append(App.EndWeek.favoriteIcon(_slave)); - r = []; - r.push(App.UI.DOM.makeElement("span", SlaveFullName(_slave), "slave-name")); - if (_slave.choosesOwnAssignment === 2) { - r.push(App.SlaveAssignment.choosesOwnJob(_slave)); + slaveEntry.append(App.EndWeek.favoriteIcon(slave), " "); + $(slaveEntry).append(`<span class='slave-name'>${SlaveFullName(slave)}</span> `); + if (slave.choosesOwnAssignment === 2) { + $(slaveEntry).append(App.SlaveAssignment.choosesOwnJob(slave)); } else { - r.push(`is working out of ${V.brothelName}.`); + $(slaveEntry).append(`is working out of ${V.brothelName}.`); } - App.Events.addNode(el, r, "h3"); - r = []; - r.push(He); - r.push(App.SlaveAssignment.whore(_slave)); - r.push(App.SlaveAssignment.choosesOwnClothes(_slave)); - App.Events.addParagraph(el, r); - r = []; - r.push(App.SlaveAssignment.rules(_slave)); - r.push(App.SlaveAssignment.diet(_slave)); - r.push(App.SlaveAssignment.longTermEffects(_slave)); - r.push(App.SlaveAssignment.drugs(_slave)); - r.push(App.SlaveAssignment.relationships(_slave)); - r.push(App.SlaveAssignment.rivalries(_slave)); - App.Events.addParagraph(el, r); - App.Events.addParagraph(el, [App.SlaveAssignment.devotion(_slave)]); + $(slaveEntry).append(App.SlaveAssignment.whore(slave)); + $(slaveEntry).append(App.SlaveAssignment.standardSlaveReport(slave, false)); } else { - App.SlaveAssignment.choosesOwnJob(_slave); - App.SlaveAssignment.whore(_slave); - App.SlaveAssignment.choosesOwnClothes(_slave); - App.SlaveAssignment.rules(_slave); - App.SlaveAssignment.diet(_slave); - App.SlaveAssignment.longTermEffects(_slave); - App.SlaveAssignment.drugs(_slave); - App.SlaveAssignment.relationships(_slave); - App.SlaveAssignment.rivalries(_slave); - App.SlaveAssignment.devotion(_slave); + // discard return values silently + App.SlaveAssignment.choosesOwnJob(slave); + App.SlaveAssignment.whore(slave); + App.SlaveAssignment.standardSlaveReport(slave, true); } - const _seed = Math.max(App.Ads.getMatchedCategoryCount(_slave, "brothel"), 1); + const _seed = Math.max(App.Ads.getMatchedCategoryCount(slave, "brothel"), 1); const _adsIncome = _seed * random(50, 60) * Math.trunc(V.brothelAdsSpending / 1000); const _cashX = _adsIncome; - getSlaveStatisticData(_slave, V.facility.brothel).adsIncome += _adsIncome; + getSlaveStatisticData(slave, V.facility.brothel).adsIncome += _adsIncome; cashX(_cashX, "brothelAds"); }