diff --git a/src/endWeek/saNanny.js b/src/endWeek/saNanny.js index f8357e3dd8912e8410b9376a03a8bc4a7d315d24..ec03537f784f57133f4adef3213ab966491ee833 100644 --- a/src/endWeek/saNanny.js +++ b/src/endWeek/saNanny.js @@ -74,86 +74,87 @@ window.saNanny = function saNanny(slave) { t += ` ${His} bad vision makes ${him} a worse servant.`; } - // if (V.showVignettes === 1 && (slave.assignment === Job.NANNY)) { - // const vignette = GetVignette(slave); - // t += ` <u>This week</u> ${vignette.text} `; - // if (vignette.type === "cash") { - // let modifier = FResult(slave); - // if (vignette.effect > 0) { - // t += `<span class="yellowgreen">making you an extra ${cashFormat(Math.trunc(modifier * vignette.effect))}.</span>`; - // } else if (vignette.effect < 0) { - // t += `<span class="red">losing you ${cashFormat(Math.abs(Math.trunc(modifier * vignette.effect)))}.</span>`; - // } else { - // t += `an incident without lasting effect.`; - // } - // cashX(Math.trunc(modifier * vignette.effect), "houseServant", slave); - // } else if (vignette.type === "devotion") { - // if (vignette.effect > 0) { - // if (slave.devotion > 50) { - // t += `<span class="hotpink">increasing ${his} devotion to you.</span>`; - // } else if (slave.devotion >= -20) { - // t += `<span class="hotpink">increasing ${his} acceptance of you.</span>`; - // } else if (slave.devotion > -10) { - // t += `<span class="hotpink">reducing ${his} dislike of you.</span>`; - // } else { - // t += `<span class="hotpink">reducing ${his} hatred of you.</span>`; - // } - // } else if (vignette.effect < 0) { - // if (slave.devotion > 50) { - // t += `<span class="mediumorchid">reducing ${his} devotion to you.</span>`; - // } else if (slave.devotion >= -20) { - // t += `<span class="mediumorchid">reducing ${his} acceptance of you.</span>`; - // } else if (slave.devotion > -10) { - // t += `<span class="mediumorchid">increasing ${his} dislike of you.</span>`; - // } else { - // t += `<span class="mediumorchid">increasing ${his} hatred of you.</span>`; - // } - // } else { - // t += `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="mediumaquamarine">increasing ${his} trust in you.</span>`; - // } else if (slave.trust > -10) { - // t += `<span class="mediumaquamarine">reducing ${his} fear of you.</span>`; - // } else { - // t += `<span class="mediumaquamarine">reducing ${his} terror of you.</span>`; - // } - // } else if (vignette.effect < 0) { - // if (slave.trust > 20) { - // t += `<span class="gold">reducing ${his} trust in you.</span>`; - // } else if (slave.trust >= -20) { - // t += `<span class="gold">increasing ${his} fear of you.</span>`; - // } else { - // t += `<span class="gold">increasing ${his} terror of you.</span>`; - // } - // } else { - // t += `an incident without lasting effect.`; - // } - // slave.trust += (1 * vignette.effect); - // } else if (vignette.type === "health") { - // if (vignette.effect > 0) { - // t += `<span class="green">improving ${his} health.</span>`; - // } else if (vignette.effect < 0) { - // t += `<span class="red">affecting ${his} health.</span>`; - // } else { - // t += `an incident without lasting effect.`; - // } - // slave.health += (2 * vignette.effect); - // } else { - // let modifier = FResult(slave); - // if (vignette.effect > 0) { - // t += `<span class="green">gaining you a bit of reputation.</span>`; - // } else if (vignette.effect < 0) { - // t += `<span class="red">losing you a bit of reputation.</span>`; - // } else { - // t += `an incident without lasting effect.`; - // } - // repX((modifier * vignette.effect * 0.1), "vignette", slave); - // } - // } + // FIXME: + if (V.showVignettes === 1 && (slave.assignment === Job.NANNY)) { + const vignette = GetVignette(slave); + t += ` <u>This week</u> ${vignette.text} `; + if (vignette.type === "cash") { + let modifier = FResult(slave); + if (vignette.effect > 0) { + t += `<span class="yellowgreen">making you an extra ${cashFormat(Math.trunc(modifier * vignette.effect))}.</span>`; + } else if (vignette.effect < 0) { + t += `<span class="red">losing you ${cashFormat(Math.abs(Math.trunc(modifier * vignette.effect)))}.</span>`; + } else { + t += `an incident without lasting effect.`; + } + cashX(Math.trunc(modifier * vignette.effect), "houseServant", slave); + } else if (vignette.type === "devotion") { + if (vignette.effect > 0) { + if (slave.devotion > 50) { + t += `<span class="hotpink">increasing ${his} devotion to you.</span>`; + } else if (slave.devotion >= -20) { + t += `<span class="hotpink">increasing ${his} acceptance of you.</span>`; + } else if (slave.devotion > -10) { + t += `<span class="hotpink">reducing ${his} dislike of you.</span>`; + } else { + t += `<span class="hotpink">reducing ${his} hatred of you.</span>`; + } + } else if (vignette.effect < 0) { + if (slave.devotion > 50) { + t += `<span class="mediumorchid">reducing ${his} devotion to you.</span>`; + } else if (slave.devotion >= -20) { + t += `<span class="mediumorchid">reducing ${his} acceptance of you.</span>`; + } else if (slave.devotion > -10) { + t += `<span class="mediumorchid">increasing ${his} dislike of you.</span>`; + } else { + t += `<span class="mediumorchid">increasing ${his} hatred of you.</span>`; + } + } else { + t += `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="mediumaquamarine">increasing ${his} trust in you.</span>`; + } else if (slave.trust > -10) { + t += `<span class="mediumaquamarine">reducing ${his} fear of you.</span>`; + } else { + t += `<span class="mediumaquamarine">reducing ${his} terror of you.</span>`; + } + } else if (vignette.effect < 0) { + if (slave.trust > 20) { + t += `<span class="gold">reducing ${his} trust in you.</span>`; + } else if (slave.trust >= -20) { + t += `<span class="gold">increasing ${his} fear of you.</span>`; + } else { + t += `<span class="gold">increasing ${his} terror of you.</span>`; + } + } else { + t += `an incident without lasting effect.`; + } + slave.trust += (1 * vignette.effect); + } else if (vignette.type === "health") { + if (vignette.effect > 0) { + t += `<span class="green">improving ${his} health.</span>`; + } else if (vignette.effect < 0) { + t += `<span class="red">affecting ${his} health.</span>`; + } else { + t += `an incident without lasting effect.`; + } + slave.health += (2 * vignette.effect); + } else { + let modifier = FResult(slave); + if (vignette.effect > 0) { + t += `<span class="green">gaining you a bit of reputation.</span>`; + } else if (vignette.effect < 0) { + t += `<span class="red">losing you a bit of reputation.</span>`; + } else { + t += `an incident without lasting effect.`; + } + repX((modifier * vignette.effect * 0.1), "vignette", slave); + } + } if (V.Matron) { t += `While there, ${he} benefits from ${V.Matron.slaveName}'s `; diff --git a/src/js/vignettes.js b/src/js/vignettes.js index 77b666cf4f6be8ee73b6908ddd1a395cc42b2885..92180acb837cc9789ed33f1c5a27149cd03a7364 100644 --- a/src/js/vignettes.js +++ b/src/js/vignettes.js @@ -3989,6 +3989,13 @@ window.GetVignette = function GetVignette(slave) { type: "health", effect: -1, }); + } else if (slave.assignment === "work as a nanny" || slave.assignment === window.Job.NURSERY || slave.assignment === window.Job.MATRON) { + // TODO: add more vignettes here + vignettes.push({ + text: `more vignettes are needed here.`, + type: "cash", + effect: 1, + }); } else if (slave.assignment === "get milked" || slave.assignment === "work in the dairy") { if (slave.lactation > 0) { if (slave.race === "black") {