diff --git a/src/endWeek/healthFunctions.js b/src/endWeek/healthFunctions.js index 0f9ac5b1da9f8229ae903a29f3cb00e8524c3b11..69fc4eb61b1a34046e22c809c799a35bef524b82 100644 --- a/src/endWeek/healthFunctions.js +++ b/src/endWeek/healthFunctions.js @@ -649,7 +649,11 @@ globalThis.restEffects = function(slave, exhaustion) { if (slave.rules.rest === "mandatory") { return .86; } else if (slaveResting(slave)) { - return .25; + if (slave.assignment === window.Job.HOUSE || slave.assignment === window.Job.QUARTER) { + return .60; + } else { + return .25; + } } else if (slave.health.tired + exhaustion >= 90 && !willWorkToDeath(slave)) { return .10; } else { diff --git a/src/endWeek/saPleaseYou.js b/src/endWeek/saPleaseYou.js index 91c71099ec4d4454af47bb8111f390d24b57dc95..1b98084e2b4f1514932765d25e820a22065b0bef 100644 --- a/src/endWeek/saPleaseYou.js +++ b/src/endWeek/saPleaseYou.js @@ -1500,7 +1500,7 @@ App.SlaveAssignment.pleaseYou = (function() { if (slaveResting(slave)) { r.push(`${He} spends reduced hours serving you in order to <span class="green">offset ${his} lack of rest.</span>`); } else if (slave.health.tired + 11 >= 90 && !willWorkToDeath(slave)) { - r.push(`${He} attempts to rebuke your advances due ${his} exhaustion, but can do little to avoid them or the resulting <span class="trust dec">severe punishment.</span> It still feels like <span class="devotion dec">fucking a dead fish,</span> since it's obvious that ${he} has chosen ${his} overall well-being over angering you.`); + r.push(`${He} attempts to rebuke your advances due to ${his} exhaustion, but can do little to avoid them or the resulting <span class="trust dec">severe punishment.</span> It still feels like <span class="devotion dec">fucking a dead fish,</span> since it's obvious that ${he} has chosen ${his} overall well-being over angering you.`); slave.devotion -= 10; slave.trust -= 5; } else { diff --git a/src/endWeek/saServant.js b/src/endWeek/saServant.js index 865b0a4023f821ee7f3a98ee0ba06d3fa7e15197..f0684aa84c71ae423d3467a35de071f93818208f 100644 --- a/src/endWeek/saServant.js +++ b/src/endWeek/saServant.js @@ -1,166 +1,282 @@ -/** - * @param {App.Entity.SlaveState} slave - * @returns {string} - */ -App.SlaveAssignment.servant = function(slave) { - /* eslint-disable no-unused-vars*/ - const { - he, him, his, hers, himself, boy, wife, - He, His - } = getPronouns(slave); - /* eslint-enable */ - - let t = `works as a servant. ${He} performs the lowest jobs in your penthouse, cleaning up after your other slaves, bathing them, helping them dress, and giving them sexual relief.`; - - if (V.servantsQuarters > 0) { - if ((V.universalRulesFacilityWork === 1 && slave.assignment === window.Job.HOUSE && V.servantsQuartersSpots > 0) || (slave.assignment === window.Job.QUARTER)) { - if (slave.assignment === window.Job.HOUSE) { - t += ` Since there's extra space in the servants' quarters, ${V.assistant.name} attaches ${him} to the cadre of maids there.`; - V.servantsQuartersSpots--; - } - if (V.Stewardess !== 0) { - t += ` This brings ${him} under ${V.Stewardess.slaveName}'s supervision. The Stewardess `; - if (slave.devotion < -20) { - t += `subjects ${him} to <span class="trust dec">corrective rape</span> when ${his} service is imperfect, <span class="devotion inc">when ${he} steps out of line,</span> or when the Stewardess just feels like raping ${him}, forcing the poor slave to <span class="yellowgreen">find refuge in work.</span>`; - slave.devotion += 2; - slave.trust -= 2; - } else if (slave.devotion <= 20) { - t += `molests ${him}, encouraging the poor slave to <span class="devotion inc">keep ${his} head down</span> and <span class="cash inc">work harder.</span>`; - slave.devotion += 2; - } else { - t += `uses <span class="devotion inc">sex as a reward,</span> getting ${him} off when ${he} <span class="cash inc">works harder.</span>`; - slave.devotion++; - } - // Portion that calculates upkeep reduction, we call it income - let cash = 0; - if (!(canHear(slave))) { - t += ` However, ${his} inability to hear often leaves ${him} oblivious to ${V.Stewardess.slaveName}'s orders, limiting their meaningful interactions.`; - cash = V.stewardessBonus / 4 * healthPenalty(slave); - } else if ((slave.hears === -1 && slave.earwear !== "hearing aids") || (slave.hears === 0 && slave.earwear === "muffling ear plugs")) { - t += ` However, ${he} often doesn't catch what ${V.Stewardess.slaveName} says, leading to frustration, confusion and less work done.`; - cash = V.stewardessBonus / 2 * healthPenalty(slave); - } else { - cash = V.stewardessBonus * healthPenalty(slave); - } - if (slave.assignment === window.Job.HOUSE) { - cashX(cash, "slaveAssignmentHouse", slave); - } else if (slave.assignment === window.Job.QUARTER) { - cashX(cash, "slaveAssignmentQuarter", slave); - } else { - cashX(cash, "serving income in an unregistered building", slave); - } +App.SlaveAssignment.servant = (function() { + "use strict"; + + let r; + + // eslint-disable-next-line no-unused-vars + let he, him, his, hers, himself, girl, loli, He, His, wife; + + let cash; + let oralUse; + + return saServant; + + /** + * @param {App.Entity.SlaveState} slave + * @returns {string} + */ + function saServant(slave) { + r = []; + + ({ + // eslint-disable-next-line no-unused-vars + he, him, his, hers, himself, girl, He, His, loli, wife + } = getPronouns(slave)); + + cash = 0; + oralUse = jsRandom(5, 10); + + jobPreface(slave); + if (V.servantsQuarters > 0) { + if ((V.universalRulesFacilityWork === 1 && slave.assignment === window.Job.HOUSE && V.servantsQuartersSpots > 0) || (slave.assignment === window.Job.QUARTER)) { + facilityEffects(slave); } } + jobReaction(slave); + jobEffects(slave); + physicalEffects(slave); + if (V.showVignettes === 1 && (slave.assignment === window.Job.QUARTER || slave.assignment === window.Job.HOUSE)) { + assignmentVignette(slave); + } + + return r.join(" "); } - t += ` ${He} is `; - if (slave.trust < -20) { - t += `frightened of punishment and works very hard, <span class="cash inc">reducing the upkeep</span> of your slaves.`; - } else if (slave.devotion < -20) { - if (slave.trust >= 20) { - t += `uninterested in doing such work and barely lifts a finger to <span class="cash inc">reduce the upkeep</span> of your slaves.`; - } else { - t += `reluctant, requiring your other slaves to force ${his} services, and does not <span class="cash inc">reduce upkeep</span> of your slaves much.`; - } - } else if (slave.devotion <= 20) { - t += `hesitant, requiring your other slaves to demand ${his} services, and only slightly <span class="cash inc">reduces upkeep</span> of your slaves.`; - } else if (slave.devotion <= 50) { - t += `obedient, offering your other slaves ${his} services, and moderately <span class="cash inc">reduces the upkeep</span> of your slaves.`; - } else if (slave.devotion <= 95) { - t += `devoted, happily giving your other slaves ${his} services, and <span class="cash inc">reduces the upkeep</span> of your slaves.`; - } else { - t += `so happy to serve your other slaves that ${he} often sees to their needs before they know they have them, and greatly <span class="cash inc">reduces the upkeep</span> of your slaves.`; + /** + * @param {App.Entity.SlaveState} slave + * + */ + function jobPreface(slave) { + r.push(`works as a servant. ${He} performs the lowest jobs in your penthouse, cleaning up after your other slaves, bathing them, helping them dress, and giving them sexual relief.`); } - if (slave.health.illness > 0 || slave.health.tired > 60) { - t += ` ${He} performed worse this week due to<span class="red">`; - if (slave.health.illness === 1) { - t += ` feeling under the weather`; - } else if (slave.health.illness === 2) { - t += ` a minor illness`; - } else if (slave.health.illness === 3) { - t += ` being sick`; - } else if (slave.health.illness === 4) { - t += ` being very sick`; - } else if (slave.health.illness === 5) { - t += ` a terrible illness`; + /** + * @param {App.Entity.SlaveState} slave + * + */ + function facilityEffects(slave) { + if (slave.assignment === window.Job.HOUSE) { + r.push(`Since there's extra space in the servants' quarters, ${V.assistant.name} attaches ${him} to the cadre of maids there.`); + V.servantsQuartersSpots--; } - if (slave.health.illness > 0 && slave.health.tired > 60) { - t += ` and`; + if (V.Stewardess !== 0) { + r.push(`This brings ${him} under ${V.Stewardess.slaveName}'s supervision. The Stewardess`); + if (slave.devotion < -20) { + r.push(`subjects ${him} to <span class="trust dec">corrective rape</span> when ${his} service is imperfect, <span class="devotion inc">when ${he} steps out of line,</span> or when the Stewardess just feels like raping ${him}, forcing the poor slave to <span class="yellowgreen">find refuge in work.</span>`); + slave.devotion += 2; + slave.trust -= 2; + } else if (slave.devotion <= 20) { + r.push(`molests ${him}, encouraging the poor slave to <span class="devotion inc">keep ${his} head down</span> and <span class="cash inc">work harder.</span>`); + slave.devotion += 2; + } else { + r.push(`uses <span class="devotion inc">sex as a reward,</span> getting ${him} off when ${he} <span class="cash inc">works harder.</span>`); + slave.devotion++; + } + // Portion that calculates upkeep reduction, we call it income + if (!(canHear(slave))) { + r.push(`However, ${his} inability to hear often leaves ${him} oblivious to ${V.Stewardess.slaveName}'s orders, limiting their meaningful interactions.`); + cash = V.stewardessBonus / 4 * healthPenalty(slave); + } else if ((slave.hears === -1 && slave.earwear !== "hearing aids") || (slave.hears === 0 && slave.earwear === "muffling ear plugs")) { + r.push(`However, ${he} often doesn't catch what ${V.Stewardess.slaveName} says, leading to frustration, confusion and less work done.`); + cash = V.stewardessBonus / 2 * healthPenalty(slave); + } else { + cash = V.stewardessBonus * healthPenalty(slave); + } + if (slave.assignment === window.Job.HOUSE) { + cashX(cash, "slaveAssignmentHouse", slave); + } else if (slave.assignment === window.Job.QUARTER) { + cashX(cash, "slaveAssignmentQuarter", slave); + } else { + cashX(cash, "serving income in an unregistered building", slave); + } } - if (slave.health.tired > 90) { - t += ` exhaustion`; - } else if (slave.health.tired > 60) { - t += ` being tired`; + } + + /** + * @param {App.Entity.SlaveState} slave + * + */ + function jobReaction(slave) { + r.push(`${He} is`); + if (slave.trust < -20) { + r.push(`frightened of punishment and works very hard, <span class="cash inc">reducing the upkeep</span> of your slaves.`); + } else if (slave.devotion < -20) { + if (slave.trust >= 20) { + r.push(`uninterested in doing such work and barely lifts a finger to <span class="cash inc">reduce the upkeep</span> of your slaves.`); + } else { + r.push(`reluctant, requiring your other slaves to force ${his} services, and does not <span class="cash inc">reduce upkeep</span> of your slaves much.`); + } + } else if (slave.devotion <= 20) { + r.push(`hesitant, requiring your other slaves to demand ${his} services, and only slightly <span class="cash inc">reduces upkeep</span> of your slaves.`); + } else if (slave.devotion <= 50) { + r.push(`obedient, offering your other slaves ${his} services, and moderately <span class="cash inc">reduces the upkeep</span> of your slaves.`); + } else if (slave.devotion <= 95) { + r.push(`devoted, happily giving your other slaves ${his} services, and <span class="cash inc">reduces the upkeep</span> of your slaves.`); + } else { + r.push(`so happy to serve your other slaves that ${he} often sees to their needs before they know they have them, and greatly <span class="cash inc">reduces the upkeep</span> of your slaves.`); } - t += `.</span>`; } - // TODO: this flat unchecked oral sex is a bit problematic - // who is she serving and why aren't they benefiting? - // is the current number of servants correct to accomplish this task? - // why can't the player prevent this on-assignment sex while still getting the other benefits of having a servant? - actX(slave, "oral", jsRandom(5, 10)); + /** + * @param {App.Entity.SlaveState} slave + * + */ + function jobEffects(slave) { + // TODO: this flat unchecked oral sex is a bit problematic + // who is she serving and why aren't they benefiting? + // is the current number of servants correct to accomplish this task? + // why can't the player prevent this on-assignment sex while still getting the other benefits of having a servant? + oralUse = Math.ceil(oralUse * restEffects(slave, 11)); + actX(slave, "oral", oralUse); - if (slave.relationship === -2) { - t += ` ${He} does ${his} best to perfect your domesticity due to ${his} emotional bond to you.`; - } else if (slave.relationship === -3 && slave.devotion > 50) { - t += ` ${He} does ${his} very best to be the perfect house${wife}, making ${him} an outstanding servant.`; - } + if (slave.relationship === -2) { + r.push(`${He} does ${his} best to perfect your domesticity due to ${his} emotional bond to you.`); + } else if (slave.relationship === -3 && slave.devotion > 50) { + r.push(`${He} does ${his} very best to be the perfect house${wife}, making ${him} an outstanding servant.`); + } - if (setup.servantCareers.includes(slave.career)) { - t += ` ${He} has experience with house keeping from ${his} life before ${he} was a slave, making ${him} more effective.`; - } else if (slave.skill.servant >= V.masteredXP) { - t += ` ${He} has experience with house keeping from working for you, making ${him} more effective.`; - } else { - slave.skill.servant += jsRandom(1, Math.ceil((slave.intelligence + slave.intelligenceImplant) / 15) + 8); - } + if (setup.servantCareers.includes(slave.career)) { + r.push(`${He} has experience with house keeping from ${his} life before ${he} was a slave, making ${him} more effective.`); + } else if (slave.skill.servant >= V.masteredXP) { + r.push(`${He} has experience with house keeping from working for you, making ${him} more effective.`); + } else { + slave.skill.servant += jsRandom(1, Math.ceil((slave.intelligence + slave.intelligenceImplant) / 15) + 8); + } - if (slave.fetishStrength > 60) { - if (slave.fetish === "submissive" && slave.fetishKnown === 1) { - t += ` ${His} natural affinity for submission increases ${his} effectiveness.`; - } else if (slave.fetishKnown === 1 && slave.fetish === "dom") { - t += ` ${His} sexual appetite for domination reduces ${his} effectiveness.`; + if (slave.fetishStrength > 60) { + if (slave.fetish === "submissive" && slave.fetishKnown === 1) { + r.push(`${His} natural affinity for submission increases ${his} effectiveness.`); + } else if (slave.fetishKnown === 1 && slave.fetish === "dom") { + r.push(`${His} sexual appetite for domination reduces ${his} effectiveness.`); + } } - } - if (slave.energy < 20) { - t += ` ${His} frigidity allows ${him} to ignore the intercourse all around ${him}, making ${him} very efficient.`; - } else if (slave.energy < 40) { - t += ` ${His} low sex drive keeps ${him} from becoming too distracted by the intercourse all around ${him}, making ${him} more efficient.`; - } + if (slave.energy < 20) { + r.push(`${His} frigidity allows ${him} to ignore the intercourse all around ${him}, making ${him} very efficient.`); + } else if (slave.energy < 40) { + r.push(`${His} low sex drive keeps ${him} from becoming too distracted by the intercourse all around ${him}, making ${him} more efficient.`); + } - if (!canSeePerfectly(slave)) { - t += ` ${His} bad vision makes ${him} a worse servant.`; + if (!canSeePerfectly(slave)) { + r.push(`${His} bad vision makes ${him} a worse servant.`); + } + + if (slave.lactation > 0) { + r.push(`Since ${he} is lactating,`); + if (slave.devotion > 20 || slave.trust < -20) { + r.push(`${he} serves`); + } else { + r.push(`and disobedient, ${he} is restrained to serve`); + } + r.push(`as a drink dispenser at mealtimes, and makes a meaningful contribution to ${his} fellow slaves' nutrition in concert with the feeding systems.`); + slave.lactationDuration = 2; + if (slave.boobsMilk > 0) { + slave.boobs -= slave.boobsMilk; + slave.boobsMilk = 0; + } + } } - if (slave.lactation > 0) { - t += ` Since ${he} is lactating, `; - if (slave.devotion > 20 || slave.trust < -20) { - t += ` ${he} serves `; - } else { - t += `and disobedient, ${he} is restrained to serve `; + /** + * @param {App.Entity.SlaveState} slave + * + */ + function physicalEffects(slave) { + if (slave.health.illness > 0 || slave.health.tired > 60) { + r.push(`${He} is<span class="red">`); + if (slave.health.tired > 60) { + if (slave.health.illness === 1) { + r.push(`feeling under the weather`); + } else if (slave.health.illness === 2) { + r.push(`somewhat ill`); + } else if (slave.health.illness === 3) { + r.push(`sick`); + } else if (slave.health.illness === 4) { + r.push(`very sick`); + } else if (slave.health.illness === 5) { + r.push(`terribly ill`); + } + r.push(`and`); + } else { + if (slave.health.illness === 1) { + r.push(`feeling under the weather,`); + } else if (slave.health.illness === 2) { + r.push(`somewhat ill,`); + } else if (slave.health.illness === 3) { + r.push(`sick,`); + } else if (slave.health.illness === 4) { + r.push(`very sick,`); + } else if (slave.health.illness === 5) { + r.push(`terribly ill,`); + } + } + if (slave.health.tired > 90) { + r.push(`exhausted,`); + } else if (slave.health.tired > 60) { + r.push(`fatigued,`); + } + r.push(`</span> limiting ${his} effectiveness.`); } - t += `as a drink dispenser at mealtimes, and makes a meaningful contribution to ${his} fellow slaves' nutrition in concert with the feeding systems.`; - slave.lactationDuration = 2; - if (slave.boobsMilk > 0) { - slave.boobs -= slave.boobsMilk; - slave.boobsMilk = 0; + if (slave.assignment === window.Job.QUARTER) { + if (slaveResting(slave)) { + r.push(`${He} is assigned easy tasks <span class="green">so ${he} may rest</span> while still being productive.`); + } else if (slave.health.tired + 11 >= 90 && !willWorkToDeath(slave)) { + r.push(`${He} attempts to refuse to work due to ${his} exhaustion, but can do little to avoid it or the resulting`); + if (V.Stewardess !== 0) { + r.push(`<span class="trust dec">severe punishment</span> by ${V.Stewardess.slaveName}. ${His} slacking is kept in check by your watchful Stewardess keeping $him on task, but by the end of ${his} shift, <span class="devotion dec">${his} thoughts are made clear in the poor job ${he} did.</span>`); + } else { + r.push(`<span class="trust dec">severe punishment.</span> ${He} <span class="devotion dec">accomplishes little,</span> having choosen ${his} overall well-being over the consequences.`); + } + slave.devotion -= 10; + slave.trust -= 5; + } else { + r.push(`${His} days are long, but not overly exhausting;`); + if (slave.devotion > 20) { + r.push(`there's plenty of opportunities for ${him} to relax, be it drifting into a meditative trance while cleaning or even just taking a seat while folding sheets.`); + } else { + r.push(`<span class="red">${he}'d find ${himself} less tired</span> if ${he} simply could only learn to lose ${himself} in ${his} work.`); + } + } + tired(slave); + } else if (slave.assignment === window.Job.HOUSE) { + if (slaveResting(slave)) { + r.push(`${He} is assigned easy tasks <span class="green">so ${he} may rest</span> while still being productive.`); + } else if (slave.health.tired + 11 >= 90 && !willWorkToDeath(slave)) { + r.push(`${He} attempts to refuse to work due to ${his} exhaustion, but can do little to avoid it or the resulting`); + if (V.servantsQuarters > 0 && V.universalRulesFacilityWork === 1 && V.servantsQuartersSpots > 0 && V.Stewardess !== 0) { + r.push(`<span class="trust dec">severe punishment</span> by ${V.Stewardess.slaveName}. ${His} slacking is kept in check by your watchful Stewardess keeping $him on task, but by the end of ${his} shift, <span class="devotion dec">${his} thoughts are made clear in the poor job ${he} did.</span>`); + } else { + r.push(`<span class="trust dec">severe punishment.</span> ${He} <span class="devotion dec">accomplishes little,</span> having choosen ${his} overall well-being over the consequences.`); + } + slave.devotion -= 10; + slave.trust -= 5; + } else { + r.push(`${His} days are long, but not overly exhausting;`); + if (slave.devotion > 20) { + r.push(`there's plenty of opportunities for ${him} to relax, be it drifting into a meditative trance while cleaning or even just taking a seat while folding sheets.`); + } else { + r.push(`<span class="red">${he}'d find ${himself} less tired</span> if ${he} simply could only learn to lose ${himself} in ${his} work.`); + } + } + tired(slave); } } - if (V.showVignettes === 1 && (slave.assignment === window.Job.QUARTER || slave.assignment === window.Job.HOUSE)) { + /** + * @param {App.Entity.SlaveState} slave + */ + function assignmentVignette(slave) { const vignette = GetVignette(slave); - t += ` <span class="story-label">This week</span> ${vignette.text} `; + r.push(`<span class="story-label">This week</span> ${vignette.text}`); if (vignette.type === "cash") { let modifier = FResult(slave); const cashVign = Math.trunc(modifier * vignette.effect); if (vignette.effect > 0) { - t += `<span class="cash inc">making you an extra ${cashFormat(cashVign)}.</span>`; + r.push(`<span class="cash inc">making you an extra ${cashFormat(cashVign)}.</span>`); } else if (vignette.effect < 0) { - t += `<span class="cash dec">losing you ${cashFormat(Math.abs(cashVign))}.</span>`; + r.push(`<span class="cash dec">losing you ${cashFormat(Math.abs(cashVign))}.</span>`); } else { - t += `an incident without lasting effect.`; + r.push(`an incident without lasting effect.`); } if (slave.assignment === window.Job.HOUSE) { if (vignette.effect > 0) { @@ -184,70 +300,68 @@ App.SlaveAssignment.servant = function(slave) { } else if (vignette.type === "devotion") { if (vignette.effect > 0) { if (slave.devotion > 50) { - t += `<span class="devotion inc">increasing ${his} devotion to you.</span>`; + r.push(`<span class="devotion inc">increasing ${his} devotion to you.</span>`); } else if (slave.devotion >= -20) { - t += `<span class="devotion inc">increasing ${his} acceptance of you.</span>`; + r.push(`<span class="devotion inc">increasing ${his} acceptance of you.</span>`); } else if (slave.devotion > -10) { - t += `<span class="devotion inc">reducing ${his} dislike of you.</span>`; + r.push(`<span class="devotion inc">reducing ${his} dislike of you.</span>`); } else { - t += `<span class="devotion inc">reducing ${his} hatred of you.</span>`; + r.push(`<span class="devotion inc">reducing ${his} hatred of you.</span>`); } } else if (vignette.effect < 0) { if (slave.devotion > 50) { - t += `<span class="devotion dec">reducing ${his} devotion to you.</span>`; + r.push(`<span class="devotion dec">reducing ${his} devotion to you.</span>`); } else if (slave.devotion >= -20) { - t += `<span class="devotion dec">reducing ${his} acceptance of you.</span>`; + r.push(`<span class="devotion dec">reducing ${his} acceptance of you.</span>`); } else if (slave.devotion > -10) { - t += `<span class="devotion dec">increasing ${his} dislike of you.</span>`; + r.push(`<span class="devotion dec">increasing ${his} dislike of you.</span>`); } else { - t += `<span class="devotion dec">increasing ${his} hatred of you.</span>`; + r.push(`<span class="devotion dec">increasing ${his} hatred of you.</span>`); } } else { - t += `an incident without lasting effect.`; + r.push(`an incident without lasting effect.`); } slave.devotion += (1 * vignette.effect); } else if (vignette.type === "trust") { if (vignette.effect > 0) { if (slave.trust > 20) { - t += `<span class="trust inc">increasing ${his} trust in you.</span>`; + r.push(`<span class="trust inc">increasing ${his} trust in you.</span>`); } else if (slave.trust > -10) { - t += `<span class="trust inc">reducing ${his} fear of you.</span>`; + r.push(`<span class="trust inc">reducing ${his} fear of you.</span>`); } else { - t += `<span class="trust inc">reducing ${his} terror of you.</span>`; + r.push(`<span class="trust inc">reducing ${his} terror of you.</span>`); } } else if (vignette.effect < 0) { if (slave.trust > 20) { - t += `<span class="trust dec">reducing ${his} trust in you.</span>`; + r.push(`<span class="trust dec">reducing ${his} trust in you.</span>`); } else if (slave.trust >= -20) { - t += `<span class="trust dec">increasing ${his} fear of you.</span>`; + r.push(`<span class="trust dec">increasing ${his} fear of you.</span>`); } else { - t += `<span class="trust dec">increasing ${his} terror of you.</span>`; + r.push(`<span class="trust dec">increasing ${his} terror of you.</span>`); } } else { - t += `an incident without lasting effect.`; + r.push(`an incident without lasting effect.`); } slave.trust += (1 * vignette.effect); } else if (vignette.type === "health") { if (vignette.effect > 0) { - t += `<span class="health inc">improving ${his} health.</span>`; + r.push(`<span class="health inc">improving ${his} health.</span>`); } else if (vignette.effect < 0) { - t += `<span class="health dec">affecting ${his} health.</span>`; + r.push(`<span class="health dec">affecting ${his} health.</span>`); } else { - t += `an incident without lasting effect.`; + r.push(`an incident without lasting effect.`); } improveCondition(slave, 2 * vignette.effect); } else { let modifier = FResult(slave); if (vignette.effect > 0) { - t += `<span class="reputation inc">gaining you a bit of reputation.</span>`; + r.push(`<span class="reputation inc">gaining you a bit of reputation.</span>`); } else if (vignette.effect < 0) { - t += `<span class="reputation dec">losing you a bit of reputation.</span>`; + r.push(`<span class="reputation dec">losing you a bit of reputation.</span>`); } else { - t += `an incident without lasting effect.`; + r.push(`an incident without lasting effect.`); } repX((modifier * vignette.effect * 0.1), "vignette", slave); } } - - return t; -}; +})(); diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 1971d8cf6dfd230346faca46fa88896417135fd9..00df24358114d8991c6ccc13b2ceb51b59f2455a 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -930,7 +930,7 @@ globalThis.calculateCosts = (function() { if (setup.servantCareers.includes(slave.career) || slave.skill.servant >= State.variables.masteredXP) { effectiveness *= 1.1; } - effectiveness = Math.trunc(effectiveness * healthPenalty(slave) / 10); + effectiveness = Math.trunc(effectiveness * restEffects(slave) / 10); return effectiveness; } })(); diff --git a/src/uncategorized/saRules.tw b/src/uncategorized/saRules.tw index 58be93c333d93ead38e91a6dfadea546894fe834..a809baa33c8e9ed291035056d01705682827f848 100644 --- a/src/uncategorized/saRules.tw +++ b/src/uncategorized/saRules.tw @@ -3940,6 +3940,67 @@ $He likes $his personal space in $servantsQuartersName's dormitory. <</switch>> <</if>> + <<if $slaves[$i].rules.living == "luxurious">> + They provide @@.green;satisfying rest@@ every time $he drifts off to sleep. + <<elseif $slaves[$i].rules.living == "spare">> + <<if $slaves[$i].devotion > 20 && $slaves[$i].trust <= 10>> + They don't provide much rest, however. + <<else>> + They provide meager rest, if anything. + <</if>> + <<else>> + They provide + <<if $slaves[$i].devotion > 20>> + @@.green;adequate rest@@ for a $girl that knows how to manage $his time. + <<else>> + @@.green;adequate rest,@@ but not enough for a slave lacking time management. + <</if>> + <</if>> + + <<if $slaves[$i].rules.rest == "mandatory">> + <<if ($slaves[$i].devotion <= 20)>> + Getting a day off each week @@.mediumaquamarine;builds feelings of liberty@@ a slave shouldn't have. + <<set $slaves[$i].trust += 3>> + <<else>> + $He appreciates having a weekly day off and takes it as a sign that $he has a @@.mediumaquamarine;caring <<= WrittenMaster()>>.@@ + <<set $slaves[$i].trust += 1>> + <</if>> + <<elseif $slaveUsedRest>> + <<if $slaves[$i].rules.rest == "permissive">> + <<if ($slaves[$i].devotion <= 20)>> + $He's permitted to rest whenever $he feels even the slightest bit tired; @@.mediumaquamarine;a privilege not lost on $him.@@ + <<set $slaves[$i].trust += 2>> + <<else>> + $He @@.hotpink;likes@@ that you @@.mediumaquamarine;care enough@@ to let him rest when he gets tired. + <<set $slaves[$i].devotion += 1>> + <<set $slaves[$i].trust += 1>> + <</if>> + <<elseif $slaves[$i].rules.rest == "restrictive">> + <<if ($slaves[$i].devotion <= -20)>> + $He's permitted to rest when fatigue sets in, but not enough to shake $his tiredness; $he feels this @@.gold;deprivation@@ is intentional. + <<set $slaves[$i].trust -= 1>> + <<elseif ($slaves[$i].devotion <= 20)>> + $He's permitted to rest when fatigue sets in, and @@.hotpink;understands@@ this is less for $his wellbeing and more to prevent $him from become unproductive. + <<set $slaves[$i].devotion += 1>> + <<else>> + $He's permitted to rest when fatigue sets in and is @@.mediumaquamarine;thankful@@ you would allow $him the privilege so that $he may serve you better. + <<set $slaves[$i].trust += 1>> + <</if>> + <<elseif $slaves[$i].rules.rest == "cruel">> + <<if ($slaves[$i].devotion <= -20)>> + $He's @@.gold;terrified@@ that the only reason $he is given any time to rest at all is just to prolong your torment of $him. + <<set $slaves[$i].trust -= 3>> + <<elseif ($slaves[$i].devotion <= 20)>> + You work $him to the bone and only allow $him rest when on the verge of collapsing. $He @@.gold;fears@@ this @@.mediumorchid;cruelty@@ is just the beginning. + <<set $slaves[$i].trust -= 3>> + <<set $slaves[$i].devotion -= 3>> + <<else>> + Only being allowed rest when on the verge of collapsing @@.mediumorchid;shakes $his faith@@ in you a little. + <<set $slaves[$i].devotion -= 2>> + <</if>> + <</if>> + <<unset $slaveUsedRest>> + <</if>> <<if ($universalRulesConsent == 0)>> <<if ($slaves[$i].devotion <= 20)>>