From 5630e8bff7edc8855350af96b8b9b8731408b09a Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Sat, 7 Nov 2020 20:28:58 -0500 Subject: [PATCH] trustBonus does nothing --- src/endWeek/reports/spaReport.js | 83 ++++++++++++++++---------------- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/src/endWeek/reports/spaReport.js b/src/endWeek/reports/spaReport.js index a229f659354..1678c3288dc 100644 --- a/src/endWeek/reports/spaReport.js +++ b/src/endWeek/reports/spaReport.js @@ -6,13 +6,13 @@ App.EndWeek.spaReport = function() { let r; const slaves = App.Utils.sortedEmployees(App.Entity.facilities.spa); - let _DL = slaves.length; - let _bonusToggle = 0, _healthBonus = 0, _idleBonus = 0, _restedSlaves = 0, _restedSlave, _trustBonus = 0, _devBonus; + let DL = slaves.length; + let bonusToggle = 0, healthBonus = 0, idleBonus = 0, restedSlaves = 0, restedSlave, devBonus; if (V.spaDecoration !== "standard") { - _devBonus = 1; + devBonus = 1; } else { - _devBonus = 0; + devBonus = 0; } V.flSex = App.EndWeek.getFLSex(App.Entity.facilities.spa); /* FIXME: should be local, passed as a parameter to saRules */ @@ -47,9 +47,9 @@ App.EndWeek.spaReport = function() { } } if (S.Attendant.fetish === "none" || S.Attendant.fetish === "submissive") { - _devBonus++; + devBonus++; } - S.Attendant.devotion += _devBonus; + S.Attendant.devotion += devBonus; const { He, His, he, his, him, himself, wife @@ -65,41 +65,41 @@ App.EndWeek.spaReport = function() { } if (setup.attendantCareers.includes(S.Attendant.career)) { r.push(`${He} has experience with counseling from ${his} life before ${he} was a slave, making ${him} better at building rapport with troubled slaves, and giving ${him} a better chance of softening flaws into beneficial quirks.`); - _bonusToggle = 1; - _idleBonus++; + bonusToggle = 1; + idleBonus++; } else if (S.Attendant.skill.attendant >= V.masteredXP) { r.push(`${He} has experience with counseling from working for you, making ${him} better at building rapport with troubled slaves, and giving ${him} a better chance of softening flaws into beneficial quirks.`); - _bonusToggle = 1; - _idleBonus++; + bonusToggle = 1; + idleBonus++; } else { S.Attendant.skill.attendant += random(1, Math.ceil((S.Attendant.intelligence + S.Attendant.intelligenceImplant) / 15) + 8); } if (!canSee(S.Attendant)) { r.push(`${His} blindness allows ${him} to deeply connect with ${his} charges.`); - _idleBonus++; + idleBonus++; } if (S.Attendant.fetish === "none") { r.push(`${S.Attendant.slaveName} respects the slaves lounging in the spa, allowing them to relax completely.`); - _idleBonus++; + idleBonus++; } else if (S.Attendant.fetish === "submissive") { r.push(`${S.Attendant.slaveName} lets the slaves resting in the spa take the lead sexually, doing ${his} best to please them.`); - _idleBonus++; + idleBonus++; } else if (S.Attendant.fetishKnown === 1) { r.push(`${S.Attendant.slaveName} can't keep ${his} ${hasBothArms(S.Attendant) ? `hands` : `hand`} to ${himself}, preventing the slaves in the spa from relaxing completely.`); } if (S.Attendant.visualAge > 35) { r.push(`${His} apparent maturity encourages the slaves in the spa to relax and pour out their troubles to ${him}.`); - _healthBonus++; - _idleBonus++; + healthBonus++; + idleBonus++; } if (S.Attendant.intelligence + S.Attendant.intelligenceImplant > 15) { r.push(`${He}'s so intelligent ${he} can suss out the cause of slaves' emotional issues and counsel them effectively.`); - _idleBonus++; + idleBonus++; } if (isFertile(S.Attendant) || (S.Attendant.bellyPreg >= 1500) || (S.Attendant.counter.birthsTotal > 0) || (S.Attendant.bellyImplant >= 1500)) { r.push(`${He} has a natural mothering instinct and really makes ${his} charges feel at home.`); - _idleBonus++; - _healthBonus++; + idleBonus++; + healthBonus++; } let _attendantUsedCure = 0; for (const slave of slaves) { @@ -127,8 +127,8 @@ App.EndWeek.spaReport = function() { r.push(curedSlave); } } - const _seed = _bonusToggle * 10; - if (_bonusToggle === 1 && slave.trust < 60) { + const _seed = bonusToggle * 10; + if (bonusToggle === 1 && slave.trust < 60) { slave.trust++; } if (S.Attendant.rivalryTarget === slave.ID) { @@ -261,12 +261,12 @@ App.EndWeek.spaReport = function() { } } App.Events.addNode(el, r); - if (_DL < V.spa) { - const _seed = random(1, 10) + ((V.spa - _DL) * (random(150, 170) + (_idleBonus * 10))); + if (DL < V.spa) { + const _seed = random(1, 10) + ((V.spa - DL) * (random(150, 170) + (idleBonus * 10))); cashX(_seed, "spa", S.Attendant); r = []; r.push(`Since ${he} doesn't have enough slaves to occupy all ${his} time, the spa takes in citizens' slaves on a contract basis and ${he} helps them too, earning <span class="yellowgreen"> ${cashFormat(_seed)}.</span>`); - if (V.arcologies[0].FSHedonisticDecadence > 0 && _DL === 0) { + if (V.arcologies[0].FSHedonisticDecadence > 0 && DL === 0) { r.push(`Society <span class="green">loves</span> being allowed to lounge in your spa, greatly advancing your laid back culture.`); FutureSocieties.Change("Hedonistic", 2); } @@ -274,15 +274,15 @@ App.EndWeek.spaReport = function() { } } - if (_DL > 0) { + if (DL > 0) { r = []; - if (_DL > 1) { - r.push(`There are ${_DL} slaves`); + if (DL > 1) { + r.push(`There are ${DL} slaves`); } else { r.push(`There is one slave`); } r.push(`resting and recuperating in the spa.`); - if (V.arcologies[0].FSHedonisticDecadence > 0 && _DL === 0) { + if (V.arcologies[0].FSHedonisticDecadence > 0 && DL === 0) { r.push(`Society <span class="green">approves</span> of your slaves being pampered this way, greatly advancing your laid back culture.`); FutureSocieties.Change("Hedonistic", 1); } @@ -313,9 +313,8 @@ App.EndWeek.spaReport = function() { for (const slave of slaves) { const {he, his} = getPronouns(slave); - slave.devotion += _devBonus; - slave.trust += _trustBonus; - improveCondition(slave, 5 + _healthBonus); + slave.devotion += devBonus; + improveCondition(slave, 5 + healthBonus); if (slave.health.condition < -80) { improveCondition(slave, 15); } else if (slave.health.condition < -40) { @@ -356,13 +355,13 @@ App.EndWeek.spaReport = function() { ); r = []; if (V.assignmentRecords[slave.ID]) { - const _oldJob = V.assignmentRecords[slave.ID]; - assignJobSafely(slave, _oldJob); + const oldJob = V.assignmentRecords[slave.ID]; + assignJobSafely(slave, oldJob); if (slave.choosesOwnAssignment === 1) { r.push(`and ${he} is resting before choosing another task.`); } else if (slave.assignment === "rest") { - if (_oldJob !== "rest") { - r.push(`and since ${he} was unable to return to ${his} old task to ${_oldJob}, ${his} assignment has defaulted to rest.`); + if (oldJob !== "rest") { + r.push(`and since ${he} was unable to return to ${his} old task to ${oldJob}, ${his} assignment has defaulted to rest.`); } else { r.push(`so ${he} has returned to rest.`); } @@ -375,9 +374,9 @@ App.EndWeek.spaReport = function() { } App.Events.addNode(slaveFixed, r, "span", "noteworthy"); el.append(slaveFixed); - _restedSlaves++; - _restedSlave = slave; - _DL--; + restedSlaves++; + restedSlave = slave; + DL--; continue; } @@ -420,18 +419,18 @@ App.EndWeek.spaReport = function() { App.SlaveAssignment.standardSlaveReport(slave, true); } } - if (_restedSlaves > 0) { - const {he, him} = getPronouns(_restedSlave); - if (_restedSlaves === 1) { + if (restedSlaves > 0) { + const {he, him} = getPronouns(restedSlave); + if (restedSlaves === 1) { r.push(`One slave has rested until ${he} reached a state of <span class="hotpink">devotion</span> and <span class="mediumaquamarine">trust</span> and will leave the spa before the end of the week.`); } else { - r.push(`${_restedSlaves} slaves have rested until they reached a state of <span class="hotpink">devotion</span> and <span class="mediumaquamarine">trust</span> and will leave the spa before the end of the week.`); + r.push(`${restedSlaves} slaves have rested until they reached a state of <span class="hotpink">devotion</span> and <span class="mediumaquamarine">trust</span> and will leave the spa before the end of the week.`); } if (V.spaDecoration !== "standard") { App.Events.addNode(el, r, "p", "indent"); r = []; r.push(`${capFirstChar(V.spaName)}'s ${V.spaDecoration} atmosphere <span class="hotpink">had an impact on`); - if (_restedSlaves === 1) { + if (restedSlaves === 1) { r.push(`${him} while ${he} was`); } else { r.push(`them while they were`); -- GitLab