diff --git a/src/endWeek/reports/clubReport.js b/src/endWeek/reports/clubReport.js index 34a189a67bd6cd0ed0d4a880231fc7af663b34c0..ffd5c0cdfaf92846d02b59749f540885c442faec 100644 --- a/src/endWeek/reports/clubReport.js +++ b/src/endWeek/reports/clubReport.js @@ -4,18 +4,17 @@ App.EndWeek.clubReport = function() { const el = new DocumentFragment(); let r; - let he, him, his, He, His, wife, girl, himself; + let he, him, his, He, His, wife, himself; const slaves = App.Utils.sortedEmployees(App.Entity.facilities.club); - const _DL = slaves.length, _SL = V.slaves.length; - V.legendaryEntertainerID = 0 + const _DL = slaves.length; + V.legendaryEntertainerID = 0; let _FLsFetish = 0; V.legendaryWombID = 0; - let _minBonus = 50, _maxBonus = 150; - let _possibleBonuses; - //<!-- Statistics gathering; income is rep boosts in numbers, and profit will be rep per cash unit, or cash unit per rep --> - V.facility = V.facility || {}, V.facility.club = initFacilityStatistics(V.facility.club); + // Statistics gathering; income is rep boosts in numbers, and profit will be rep per cash unit, or cash unit per rep + V.facility = V.facility || {}; + V.facility.club = initFacilityStatistics(V.facility.club); const clubStats = document.createElement("div"); el.append(clubStats); @@ -38,13 +37,17 @@ App.EndWeek.clubReport = function() { } if (S.DJ.fetishStrength <= 95) { if (S.DJ.fetish !== "humiliation") { - if (fetishChangeChance(S.DJ) > random(0,100)) { - _FLsFetish = 1, S.DJ.fetishKnown = 1, S.DJ.fetish = "humiliation"; + if (fetishChangeChance(S.DJ) > random(0, 100)) { + _FLsFetish = 1; + S.DJ.fetishKnown = 1; + S.DJ.fetish = "humiliation"; } } else if (S.DJ.fetishKnown === 0) { - _FLsFetish = 1, S.DJ.fetishKnown = 1; + _FLsFetish = 1; + S.DJ.fetishKnown = 1; } else { - _FLsFetish = 2, S.DJ.fetishStrength += 4; + _FLsFetish = 2; + S.DJ.fetishStrength += 4; } } if (S.DJ.rules.living !== "luxurious") { @@ -56,9 +59,8 @@ App.EndWeek.clubReport = function() { /* Make sure we have registered living expenses as for any other slave */ getSlaveStatisticData(S.DJ, V.facility.club); ({ - he, him, his, He, His, wife, girl + he, him, his, He, His, wife } = getPronouns(S.DJ)); - // r.push(`${SlaveFullName(S.DJ)} is performing as the DJ.`); if (S.DJ.relationship === -3 && S.DJ.devotion > 50) { r.push(`${He} tries ${his} best to be your energetic, cheerful ${wife}.`); @@ -85,7 +87,7 @@ App.EndWeek.clubReport = function() { if (S.DJ.muscles > 5 && S.DJ.muscles <= 95) { r.push(`${His} toned body helps ${him} lead ${his} fellow club sluts by letting ${him} dance all night.`); } - if (S.DJ.intelligence+S.DJ.intelligenceImplant > 15) { + if (S.DJ.intelligence + S.DJ.intelligenceImplant > 15) { r.push(`${He}'s smart enough to make an actual contribution to the music, greatly enhancing the entire experience.`); } if (S.DJ.face > 95) { @@ -96,17 +98,16 @@ App.EndWeek.clubReport = function() { } else if (S.DJ.skill.DJ >= V.masteredXP) { r.push(`${He} has musical experience from working for you, giving ${his} tracks actual depth.`); } else { - S.DJ.skill.DJ += random(1,Math.ceil((S.DJ.intelligence+S.DJ.intelligenceImplant)/15) + 8); + S.DJ.skill.DJ += random(1, Math.ceil((S.DJ.intelligence + S.DJ.intelligenceImplant) / 15) + 8); } + App.Events.addNode(el, r, "p", "indent"); if (_DL + V.clubSlavesGettingHelp < 10 && V.DJnoSex !== 1 && !slaveResting(S.DJ)) { if (V.legendaryEntertainerID === 0 && S.DJ.prestige === 0 && S.DJ.skill.entertainment >= 100 && S.DJ.devotion > 50) { V.legendaryEntertainerID = S.DJ.ID; } - //<br> - r.push(`Since ${he} doesn't have enough sluts in ${V.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 S.DJ.sexAmount citizens, <span class="green">pleasing them immensely,</span> since it's more appealing to fuck the DJ than some club slut.`); + App.UI.DOM.appendNewElement("div", el, `Since ${he} doesn't have enough sluts in ${V.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 ${S.DJ.sexAmount} citizens, <span class="green">pleasing them immensely,</span> since it's more appealing to fuck the DJ than some club slut.`); if (V.showEWD !== 0) { - //<br> - r.push(He, App.SlaveAssignment.serveThePublic(S.DJ)); + App.UI.DOM.appendNewElement("div", el, `${He} ${App.SlaveAssignment.serveThePublic(S.DJ)}, "indent`); } else { App.SlaveAssignment.serveThePublic(S.DJ); } @@ -114,14 +115,14 @@ App.EndWeek.clubReport = function() { } if (_DL > 0) { - _possibleBonuses = 0; - // + r = []; if (_DL !== 1) { r.push(App.UI.DOM.makeElement("span", `The ${_DL} slaves pleasing citizens in ${V.clubName}`, "bold")); } else { r.push(App.UI.DOM.makeElement("span", `The one slave pleasing citizens in ${V.clubName}`, "bold")); } - r.push(`worked hard to <span class="green">increase your reputation</span> this week.`); + r.push(`worked hard to <span class="green">increase your reputation</span> this week.`); + App.Events.addNode(el, r, "div", "indent"); } if (S.DJ) { @@ -149,16 +150,17 @@ App.EndWeek.clubReport = function() { if (_DL > 0) { for (const slave of slaves) { ({ - he, him, his, He, His, wife, girl + he, him, his, He, His, wife } = getPronouns(slave)); if (V.legendaryEntertainerID === 0 && slave.prestige === 0 && slave.skill.entertainment >= 100 && slave.devotion > 50) { V.legendaryEntertainerID = slave.ID; } - 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) { + 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 (slave.devotion <= 20 && slave.trust >= -20) { - slave.devotion -= 5, slave.trust -= 5; + slave.devotion -= 5; + slave.trust -= 5; } else if (slave.devotion < 45) { slave.devotion += 4; } else if (slave.devotion > 50) { @@ -215,16 +217,18 @@ App.EndWeek.clubReport = function() { App.SlaveAssignment.serveThePublic(slave); App.SlaveAssignment.standardSlaveReport(slave, true); } + App.Events.addParagraph(el, r); + } - r.push(App.UI.DOM.makeElement("p", App.Ads.report("club"))); + App.UI.DOM.appendElement("p", el, App.Ads.report("club")); - //<!-- Record statistics gathering --> - var b = State.variables.facility.club; + // Record statistics gathering + const b = State.variables.facility.club; b.whoreIncome = 0; b.customers = 0; b.whoreCosts = 0; b.rep = 0; - for (var si of b.income.values()) { + for (const si of b.income.values()) { b.whoreIncome += si.income; b.customers += si.customers; b.whoreCosts += si.cost; @@ -236,7 +240,7 @@ App.EndWeek.clubReport = function() { b.totalExpenses = b.whoreCosts + b.adsCosts + b.maintenance; b.profit = b.totalIncome / b.totalExpenses; if (V.clubDecoration !== "standard") { - r.push(App.UI.DOM.makeElement("p", `${capFirstChar(V.clubName)}'s customers enjoy <span class="green">having sex in ${V.clubDecoration} surroundings.</span>`)); + App.UI.DOM.appendElement("p", el, `${capFirstChar(V.clubName)}'s customers enjoy <span class="green">having sex in ${V.clubDecoration} surroundings.</span>`); } // Brothel stats