Newer
Older
/**
* @param {App.Entity.SlaveState} slave
* @returns {string}
*/
window.saNanny = function saNanny(slave) {
} = getPronouns(slave),
child = V.nurseryBabies > 0 ? `ren` : ``;
let t = `works as a nanny. ${He} ${V.nurseryBabies ? `looks after the ${child} in ${V.nurseryName}, ensuring their needs are met and that they are being raised as ${V.nurseryBabies === 1 ? `a good future slave` : `good future slaves`}. ` : `keeps ${V.nurseryName} neat and tidy for the children it will one day support`}. `;
t += nannyEffort(slave);
t += nannyRelationship(slave);
t += nannyCareer(slave);
t += nannyEffort(slave);
t += nannyFetish(slave);
t += nannyEnergy(slave);
t += nannyVision(slave);
t += nannyVignettes(slave);
t += matronEffects(slave);
function nannyEffort(slave) {
let t = '';
t += ` ${He} is `;
if (slave.trust < -20) {
t += `frightened of punishment and works very hard, <span class="cash inc">reducing the upkeep</span> of ${V.nurseryName}${V.nurseryBabies ? ` and the children within` : ``}.`;
t += `hesitant, requiring your other slaves to demand ${his} services, and only slightly <span class="cash inc">reduces upkeep</span> of your slaves.`;
t += `obedient, offering your other slaves ${his} services, and moderately <span class="cash inc">reduces the upkeep</span> of your slaves.`;
t += `devoted, happily giving your other slaves ${his} services, and <span class="cash inc">reduces the upkeep</span> of your slaves.`;
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.`;
// TODO:
if (slave.relationship === -2) {
t += ` ${He} does ${his} best to look after the ${child} in ${his} care 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 caretaker, making ${him} an outstanding nanny.`;
}
// TODO:
if (setup.servantCareers.includes(slave.career)) {
t += ` ${He} has experience with nannying from ${his} life before ${he} was a slave, making ${him} more effective.`;
} else if (slave.skill.servant >= V.masteredXP) {
t += ` ${He} has experience with nannying from working for you, making ${him} more effective.`;
} else {
slave.skill.servant += jsRandom(1, Math.ceil((slave.intelligence + slave.intelligenceImplant) / 15) + 8);
}
return t;
}
// TODO:
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.`;
}
// TODO:
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.`;
}
// TODO:
if (!canSeePerfectly(slave)) {
t += ` ${His} bad vision makes ${him} a worse nanny.`;
}
if (V.showVignettes === 1 && (slave.assignment === window.Job.NANNY)) {
const vignette = GetVignette(slave);
t += ` <u>This week</u> ${vignette.text} `;
vignetteCash(slave);
vignetteDevotion(slave);
vignetteTrust(slave);
vignetteHealth(slave);
vignetteRep(slave);
}
function vignetteCash(slave) {
const vignette = GetVignette(slave);
let t = '';
if (vignette.type === "cash") {
let modifier = FResult(slave);
if (vignette.effect > 0) {
t += `<span class="cash inc">making you an extra ${cashFormat(Math.trunc(modifier * vignette.effect))}.</span>`;
cashX(Math.trunc(modifier * vignette.effect), "slaveAssignmentNurseryVign", slave);
t += `<span class="cash dec">losing you ${cashFormat(Math.abs(Math.trunc(modifier * vignette.effect)))}.</span>`;
cashX(forceNeg(Math.trunc(modifier * vignette.effect)), "slaveAssignmentNurseryVign", slave);
function vignetteDevotion(slave) {
const vignette = GetVignette(slave);
let t = '';
if (vignette.type === "devotion") {
if (vignette.effect > 0) {
if (slave.devotion > 50) {
t += `<span class="devotion inc">increasing ${his} devotion to you.</span>`;
t += `<span class="devotion inc">increasing ${his} acceptance of you.</span>`;
t += `<span class="devotion inc">reducing ${his} dislike of you.</span>`;
t += `<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>`;
t += `<span class="devotion dec">reducing ${his} acceptance of you.</span>`;
t += `<span class="devotion dec">increasing ${his} dislike of you.</span>`;
t += `<span class="devotion dec">increasing ${his} hatred of you.</span>`;
function vignetteTrust(slave) {
const vignette = GetVignette(slave);
let t = '';
if (vignette.type === "trust") {
if (vignette.effect > 0) {
if (slave.trust > 20) {
t += `<span class="trust inc">increasing ${his} trust in you.</span>`;
t += `<span class="trust inc">reducing ${his} fear of you.</span>`;
t += `<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>`;
t += `<span class="trust dec">increasing ${his} fear of you.</span>`;
t += `<span class="trust dec">increasing ${his} terror of you.</span>`;
function vignetteHealth(slave) {
const vignette = GetVignette(slave);
let t = '';
if (vignette.type === "health") {
if (vignette.effect > 0) {
t += `<span class="health inc">improving ${his} health.</span>`;
t += `<span class="health dec">affecting ${his} health.</span>`;
} else {
t += `an incident without lasting effect.`;
}
improveCondition(slave, 2 * vignette.effect);
function vignetteRep(slave) {
const vignette = GetVignette(slave);
let t = '';
if (vignette.type === "rep") {
let modifier = FResult(slave);
if (vignette.effect > 0) {
t += `<span class="reputation inc">gaining you a bit of reputation.</span>`;
t += `<span class="reputation dec">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 `;
if (V.Matron.physicalAge < 21) {
t += `youthful energy`;
} else {
t += `care`;
if (V.Matron.skill.oral) { // TODO: keep this? replace with something else?
t += ` and talented tongue`;
t += `. `;
/* TODO: farmer is often not set and makes no sense here. What should this be? LCD.
if (slave.devotion < V.FarmerDevotionThreshold) {
slave.devotion += V.FarmerDevotionBonus;
}
if (slave.devotion < V.FarmerTrustThreshold) {
slave.trust += V.FarmerTrustBonus;
}
if (slave.condition < 100) {
improveCondition(slave, V.FarmerHealthBonus);
}*/
}