Skip to content
Snippets Groups Projects
Commit c1a2ccd3 authored by Pregmodder's avatar Pregmodder
Browse files

Merge branch 'spa-report-to-js' into 'pregmod-master'

Spa report to js

See merge request !8264
parents fbfc3b08 1a77ae53
No related branches found
No related tags found
1 merge request!8264Spa report to js
/**
* @returns {DocumentFragment}
*/
App.EndWeek.spaReport = function() {
const el = new DocumentFragment();
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, devBonus;
if (V.spaDecoration !== "standard") {
devBonus = 1;
} else {
devBonus = 0;
}
V.flSex = App.EndWeek.getFLSex(App.Entity.facilities.spa); /* FIXME: should be local, passed as a parameter to saRules */
if (V.AttendantID !== 0) {
r = [];
if (S.Attendant.health.condition < 100) {
improveCondition(S.Attendant, normalRandInt(20));
}
if (S.Attendant.devotion <= 60) {
S.Attendant.devotion++;
}
if (S.Attendant.trust < 60) {
S.Attendant.trust++;
}
if (S.Attendant.rules.living !== "luxurious") {
S.Attendant.rules.living = "luxurious";
}
let FLsFetish = 0;
if (S.Attendant.fetishStrength <= 95) {
if (S.Attendant.fetish !== "submissive") {
if (fetishChangeChance(S.Attendant) > random(0, 100)) {
FLsFetish = 1;
S.Attendant.fetishKnown = 1;
S.Attendant.fetish = "submissive";
}
} else if (S.Attendant.fetishKnown === 0) {
FLsFetish = 1;
S.Attendant.fetishKnown = 1;
} else {
FLsFetish = 2;
S.Attendant.fetishStrength += 4;
}
}
if (S.Attendant.fetish === "none" || S.Attendant.fetish === "submissive") {
devBonus++;
}
S.Attendant.devotion += devBonus;
const {
He, His,
he, his, him, himself, wife
} = getPronouns(S.Attendant);
r.push(`${SlaveFullName(S.Attendant)} is serving as the spa attendant.`);
if (S.Attendant.relationship === -3 && S.Attendant.devotion > 50) {
r.push(`${He} tries ${his} best to be your perfect attentive, caring and loving ${wife}.`);
}
if (FLsFetish === 1) {
r.push(`When ${he} is paid a visit by a slave with sexual issues to work out, ${he} provides them with an understanding, willing, giving partner. ${He} finds real satisfaction in helping your slaves find sexual gratification, and <span class="lightsalmon">becomes a submissive.</span>`);
} else if ((FLsFetish === 2)) {
r.push(`Every new slave in the spa is a new person ${he} gets to connect with and serve. Sexually. <span class="lightsalmon">${He} becomes more submissive.</span>`);
}
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++;
} 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++;
} 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++;
}
if (S.Attendant.fetish === "none") {
r.push(`${S.Attendant.slaveName} respects the slaves lounging in the spa, allowing them to relax completely.`);
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++;
} 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++;
}
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++;
}
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++;
}
let attendantUsedCure = 0;
App.Events.addNode(el, r, "div", "indent");
for (const slave of slaves) {
const {he2, his2, him2} = getPronouns(slave).appendSuffix("2");
r = [];
if (slave.fetish === "mindbroken" && slave.health.condition > 20 && attendantUsedCure === 0 && V.spaFix !== 2) {
attendantUsedCure = 1;
if (random(1, 100) > 90 - S.Attendant.devotion) {
const curedSlave = App.UI.DOM.makeElement("div", null, "indent");
const curedArray = [`<span class="green">Something almost miraculous has happened.</span> ${S.Attendant.slaveName} has always refused to believe that ${slave.slaveName} could not be reached, and has lavished patient tenderness on ${him2} in ${V.spaName}. ${slave.slaveName} has begun to respond, and is stirring from ${his2} mental torpor.`];
slave.devotion = -3;
slave.sexualFlaw = "apathetic";
slave.behavioralFlaw = either("hates men", "odd");
slave.fetish = "none";
slave.fetishKnown = 1;
const gp = V.genePool.find(s => s.ID === slave.ID);
if (gp.intelligence >= -95) {
slave.intelligence = gp.intelligence - 30;
}
if (V.arcologies[0].FSPaternalist !== "unset" && V.arcologies[0].FSPaternalist > 0) {
curedArray.push(`Society <span class="green">strongly approves</span> of${slave.slaveName} being restored to sanity, which advances ideals about enlightened slaveownership.`);
V.arcologies[0].FSPaternalist += 0.01 * V.FSSingleSlaveRep;
repX(2 * V.FSSingleSlaveRep * (V.arcologies[0].FSPaternalist / V.FSLockinLevel), "spa", slave);
}
App.Events.addNode(curedSlave, curedArray);
r.push(curedSlave);
}
}
const seed = bonusToggle * 10;
if (bonusToggle === 1 && slave.trust < 60) {
slave.trust++;
}
if (S.Attendant.rivalryTarget === slave.ID) {
r.push(`${He} constantly harasses ${his} ${rivalryTerm(S.Attendant)}, ${slave.slaveName}, preventing ${him2} from getting comfortable and forcing ${him2} to keep ${his2} guard up.`);
slave.devotion -= 4;
slave.trust -= 4;
if (random(1, 100) > 35) {
S.Attendant.rivalry++;
S.Attendant.rivalry++;
slave.rivalry++;
}
} else if (S.Attendant.relationshipTarget === slave.ID) {
r.push(`${He} dedicates most of ${his} attention to ${his} ${relationshipTerm(S.Attendant)}, ${slave.slaveName}, making ${his2} stress, both physical and mental, wash away.`);
slave.devotion += 3;
slave.trust += 3;
} else if (areRelated(S.Attendant, slave)) {
r.push(`${He} makes sure to spend extra time caring for ${his} ${relativeTerm(S.Attendant, slave)}, ${slave.slaveName}.`);
slave.trust++;
improveCondition(slave, 1);
}
switch (slave.prestigeDesc) {
case "$He is a famed Free Cities whore, and commands top prices.":
r.push(`${He} does ${his} best to relax the famous whore,${slave.slaveName}, making sure to`);
if (slave.vagina > 2 || slave.anus > 2) {
r.push(`pay special attention to ${his2} worn holes.`);
} else {
r.push(`get ${him2} clean and relaxed for ${his2} next usage.`);
}
slave.devotion += 3;
slave.trust += 3;
break;
case "$He is a famed Free Cities slut, and can please anyone.":
r.push(`${He} does ${his} best to soothe the famous entertainer, ${slave.slaveName}, letting ${him2} relax in blissful peace.`);
slave.devotion += 3;
slave.trust += 3;
break;
case "$He is remembered for winning best in show as a cockmilker.":
if (slave.balls > 6 && slave.dick !== 0) {
if (S.Attendant.fetish === "cumslut") {
r.push(`${He} can't keep ${his} ${hasBothArms(S.Attendant) ? `hands` : `hand`} off ${slave.slaveName}'s cock and balls, but ${he2} doesn't mind being milked constantly. Before long, strands of cum can be found floating all throughout the bath.`);
S.Attendant.fetishStrength += 4;
} else {
r.push(`${He} does ${his} best to accommodate ${slave.slaveName}'s massive genitals and tends to ${him2} whenever ${he2} feels a need for release.`);
if (random(1, 100) > 65 && S.Attendant.fetish === "none") {
r.push(`After taking several massive loads to the face, ${S.Attendant.slaveName} begins to find satisfaction in being coated in cum.`);
S.Attendant.fetish = "cumslut";
}
}
}
slave.devotion += 3;
slave.trust += 3;
break;
case "$He is remembered for winning best in show as a dairy cow.":
if (slave.lactation > 0 && (slave.boobs - slave.boobsImplant) > 6000) {
if (S.Attendant.fetish === "boobs") {
r.push(`${He} can't keep ${his} ${hasBothArms(S.Attendant) ? `hands` : `hand`} off ${slave.slaveName}'s huge breasts, but ${he2} doesn't mind being milked constantly. Before long the bath gains a white tint.`);
S.Attendant.fetishStrength += 4;
S.Attendant.fetishStrength += 4;
} else {
r.push(`${He} does ${his} best to accommodate ${slave.slaveName}'s massive breasts and tends to ${him2} whenever ${he2} feels a need for release.`);
if (random(1, 100) > 65 && S.Attendant.fetish === "none") {
r.push(`After multiple milking sessions, ${S.Attendant.slaveName} begins to find ${himself} fantasizing about having giant milky breasts too.`);
S.Attendant.fetish = "boobs";
}
}
slave.devotion += 3;
slave.trust += 3;
slave.lactationDuration = 2;
slave.boobs -= slave.boobsMilk;
slave.boobsMilk = 0;
}
break;
case "$He is remembered for winning best in show as a breeder.":
if (slave.bellyPreg >= 5000) {
if (S.Attendant.fetish === "pregnancy") {
r.push(`${He} can't keep ${his} ${hasBothArms(S.Attendant) ? `hands` : `hand`} off ${slave.slaveName}'s pregnancy, but ${he2} doesn't mind ${his2} full belly being fondled.`);
S.Attendant.fetishStrength += 4;
S.Attendant.fetishStrength += 4;
} else {
r.push(`${He} does ${his} best to accommodate ${slave.slaveName}'s pregnancy and to make sure the mother-to-be is happy and comfortable.`);
if (random(1, 100) > 65 && S.Attendant.fetish === "none") {
r.push(`After massaging ${slave.slaveName}'s growing belly multiple times, ${S.Attendant.slaveName} begins to find ${himself} fantasizing about being swollen with life too.`);
S.Attendant.fetish = "pregnancy";
}
}
slave.devotion += 3;
slave.trust += 3;
} else {
if (S.Attendant.fetish === "pregnancy") {
r.push(`${He} can't help but pester ${slave.slaveName} with questions about ${his2} famous pregnancy, limiting ${his2} ability to truly relax.`);
slave.devotion += 1;
slave.trust += 1;
} else if (canGetPregnant(slave)) {
r.push(`${He} does ${his} best to encourage ${slave.slaveName}'s fertilization by performing any fertility boosting actions ${he} can.`);
slave.devotion += 3;
slave.trust += 3;
}
}
}
if (
(S.Attendant.intelligence + S.Attendant.intelligenceImplant > 15) &&
(attendantUsedCure === 0) &&
(S.Attendant.intelligence + S.Attendant.intelligenceImplant + seed) > random(1, 200) &&
(V.spaFix === 0)
) {
if (slave.behavioralFlaw !== "none") {
SoftenBehavioralFlaw(slave);
attendantUsedCure += 1;
r.push(`${S.Attendant.slaveName} works carefully with ${slave.slaveName}, and successfully`);
r.push(App.UI.DOM.makeElement("span", `softens ${his2} behavioral flaw`, "green"));
r.push(`into an appealing quirk.`);
} else if (slave.sexualFlaw !== "none") {
SoftenSexualFlaw(slave);
attendantUsedCure += 1;
r.push(`${S.Attendant.slaveName} works carefully with ${slave.slaveName}, and successfully`);
r.push(App.UI.DOM.makeElement("span", `softens ${his2} sexual flaw`, "green"));
r.push(`into an appealing quirk.`);
}
}
if (slave.lactation > 0) {
r.push(`${S.Attendant.slaveName} takes care to keep ${slave.slaveName}'s breasts comfortably drained.`);
slave.lactationDuration = 2;
slave.boobs -= slave.boobsMilk;
slave.boobsMilk = 0;
}
App.Events.addNode(el, r, "div", "indent");
}
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) {
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);
}
App.Events.addNode(el, r, "div", "indent");
}
}
if (DL > 0) {
r = [];
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) {
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);
}
App.Events.addNode(el, r, "p", ["indent", "bold"]);
}
if (S.Attendant) {
const slave = S.Attendant;
/* apply following SA passages to facility leader */
if (V.showEWD !== 0) {
const attendantEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report");
if (V.seeImages && V.seeReportImages) {
App.UI.DOM.appendNewElement("div", attendantEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]);
}
attendantEntry.append(App.EndWeek.favoriteIcon(slave), " ");
App.Events.addNode(
attendantEntry,
[
App.UI.DOM.makeElement("span", SlaveFullName(slave), "slave-name"),
`is serving as the Attendant in ${V.spaName}`,
App.SlaveAssignment.standardSlaveReport(slave, false),
]
);
} else {
App.SlaveAssignment.standardSlaveReport(slave, true);
}
}
for (const slave of slaves) {
const {He, he, his} = getPronouns(slave);
slave.devotion += devBonus;
improveCondition(slave, 5 + healthBonus);
if (slave.health.condition < -80) {
improveCondition(slave, 15);
} else if (slave.health.condition < -40) {
improveCondition(slave, 10);
} else if (slave.health.condition < 0) {
improveCondition(slave, 5);
}
if (V.spaUpgrade === 1 && slave.health.condition < 100) {
improveCondition(slave, normalRandInt(8));
}
if (slave.devotion < 60 && slave.trust < 60) {
slave.devotion++;
slave.trust++;
} else if ((slave.trust < 40)) {
slave.trust += 10;
} else if ((slave.devotion < 40)) {
slave.devotion += 10;
}
switch (V.spaDecoration) {
case "Chattel Religionist":
case "Chinese Revivalist":
slave.rules.living = "normal";
break;
case "Degradationist":
slave.rules.living = "spare";
break;
default:
slave.rules.living = "luxurious";
}
if (slave.health.condition >= 20 && slave.health.tired <= 30 && slave.trust > 60 && slave.devotion > 60 && slave.fetish !== "mindbroken" && slave.sexualFlaw === "none" && slave.behavioralFlaw === "none") {
const slaveFixed = App.UI.DOM.makeElement("p");
App.Events.addNode(
slaveFixed,
[
App.UI.DOM.makeElement("span", slave.slaveName, "slave-name"),
`is feeling well enough to leave ${V.spaName}, `
]
);
r = [];
if (V.assignmentRecords[slave.ID]) {
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.`);
} else {
r.push(`so ${he} has returned to rest.`);
}
} else {
r.push(`so ${he} goes back to ${slave.assignment}.`);
}
} else {
r.push(`so ${his} assignment has defaulted to rest.`);
removeJob(slave, "rest in the spa");
}
App.Events.addNode(slaveFixed, r, "span", "noteworthy");
el.append(slaveFixed);
restedSlaves++;
restedSlave = slave;
DL--;
continue;
}
if (V.showEWD !== 0) {
const slaveEntry = App.UI.DOM.appendNewElement("div", el, '', "slave-report");
if (V.seeImages && V.seeReportImages) {
App.UI.DOM.appendNewElement("div", slaveEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]);
}
slaveEntry.append(App.EndWeek.favoriteIcon(slave), " ");
r = [];
r.push(App.UI.DOM.makeElement("span", SlaveFullName(slave), "slave-name"));
if (slave.choosesOwnAssignment === 2) {
r.push(App.SlaveAssignment.choosesOwnJob(slave));
} else {
r.push(`is resting in ${V.spaName}.`);
}
App.Events.addNode(slaveEntry, r, "div");
r = [];
r.push(He);
r.push(App.SlaveAssignment.rest(slave));
if (slave.fetish === "mindbroken") {
r.push(`${He} remains in the Spa, completely mindbroken.`);
} else if (slave.sexualFlaw !== "none" || slave.behavioralFlaw !== "none") {
r.push(`${He} remains in the Spa, stubborn in ${his} flaw.`);
} else if (slave.trust < 60 || slave.devotion < 60) {
r.push(`${He} remains in the Spa, as ${he} is still learning to accept life as a slave.`);
} else if (slave.health.condition < 20) {
r.push(`${He} remains in the Spa, as ${he} is benefiting from its healing properties.`);
} else if (slave.health.tired > 30) {
r.push(`${He} remains in the Spa, continuing to soak away ${his} fatigue.`);
}
r.push(App.SlaveAssignment.standardSlaveReport(slave, false));
App.Events.addNode(slaveEntry, r, "div", "indent");
} else {
// discard return values silently
App.SlaveAssignment.choosesOwnJob(slave);
App.SlaveAssignment.standardSlaveReport(slave, true);
}
}
if (restedSlaves > 0) {
const {he, him} = getPronouns(restedSlave);
r = [];
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.`);
}
App.Events.addNode(el, r, "p", "indent");
if (V.spaDecoration !== "standard") {
r = [];
r.push(`${capFirstChar(V.spaName)}'s ${V.spaDecoration} atmosphere <span class="hotpink">had an impact on`);
if (restedSlaves === 1) {
r.push(`${him} while ${he} was`);
} else {
r.push(`them while they were`);
}
r.push(`</span> resting.`);
App.Events.addNode(el, r, "p", "indent");
}
}
return el;
};
:: Spa Report [nobr]
<<includeDOM App.EndWeek.spaReport()>>
:: Spa Report [nobr]
<<set _slaves = App.Utils.sortedEmployees(App.Entity.facilities.spa)>>
<<set _DL = _slaves.length, _SL = $slaves.length, _bonusToggle = 0, _healthBonus = 0, _idleBonus = 0, _restedSlaves = 0, _trustBonus = 0>>
<<if $spaDecoration != "standard">>
<<set _devBonus = 1>>
<<else>>
<<set _devBonus = 0>>
<</if>>
<<set $flSex = App.EndWeek.getFLSex(App.Entity.facilities.spa)>> /* FIXME: should be local, passed as a parameter to saRules */
<<if $AttendantID != 0>>
<<if (_S.Attendant.health.condition < 100)>>
<<run improveCondition(_S.Attendant, normalRandInt(20))>>
<</if>>
<<if (_S.Attendant.devotion <= 60)>>
<<set _S.Attendant.devotion++>>
<</if>>
<<if _S.Attendant.trust < 60>>
<<set _S.Attendant.trust++>>
<</if>>
<<if _S.Attendant.rules.living != "luxurious">>
<<set _S.Attendant.rules.living = "luxurious">>
<</if>>
<<set _FLsFetish = 0>>
<<if _S.Attendant.fetishStrength <= 95>>
<<if _S.Attendant.fetish != "submissive">>
<<if fetishChangeChance(_S.Attendant) > random(0,100)>>
<<set _FLsFetish = 1, _S.Attendant.fetishKnown = 1, _S.Attendant.fetish = "submissive">>
<</if>>
<<elseif _S.Attendant.fetishKnown == 0>>
<<set _FLsFetish = 1, _S.Attendant.fetishKnown = 1>>
<<else>>
<<set _FLsFetish = 2, _S.Attendant.fetishStrength += 4>>
<</if>>
<</if>>
<<if (_S.Attendant.fetish == "none") || (_S.Attendant.fetish == "submissive")>>
<<set _devBonus++>>
<</if>>
<<set _S.Attendant.devotion += _devBonus>>
<<setLocalPronouns _S.Attendant>>
&nbsp;&nbsp;&nbsp;&nbsp;<<= SlaveFullName(_S.Attendant)>> is serving as the spa attendant.<<if _S.Attendant.relationship == -3 && _S.Attendant.devotion > 50>> $He tries $his best to be your perfect attentive, caring and loving $wife.<</if>>
<<if (_FLsFetish == 1)>>
When $he is paid a visit by a slave with sexual issues to work out, $he provides them with an understanding, willing, giving partner. $He finds real satisfaction in helping your slaves find sexual gratification, and @@.lightsalmon;becomes a submissive.@@
<<elseif (_FLsFetish == 2)>>
Every new slave in the spa is a new person $he gets to connect with and serve. Sexually. @@.lightsalmon;$He becomes more submissive.@@
<</if>>
<<if setup.attendantCareers.includes(_S.Attendant.career)>>
$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.
<<set _bonusToggle = 1, _idleBonus++>>
<<elseif _S.Attendant.skill.attendant >= $masteredXP>>
$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.
<<set _bonusToggle = 1, _idleBonus++>>
<<else>>
<<set _S.Attendant.skill.attendant += random(1,Math.ceil((_S.Attendant.intelligence+_S.Attendant.intelligenceImplant)/15) + 8)>>
<</if>>
<<if !canSee(_S.Attendant)>>
$His blindness allows $him to deeply connect with $his charges.
<<set _idleBonus++>>
<</if>>
<<if (_S.Attendant.fetish == "none")>>
_S.Attendant.slaveName respects the slaves lounging in the spa, allowing them to relax completely.
<<set _idleBonus++>>
<<elseif (_S.Attendant.fetish == "submissive")>>
_S.Attendant.slaveName lets the slaves resting in the spa take the lead sexually, doing $his best to please them.
<<set _idleBonus++>>
<<elseif (_S.Attendant.fetishKnown == 1)>>
_S.Attendant.slaveName can't keep $his hand<<if hasBothArms(_S.Attendant)>>s<</if>> to $himself, preventing the slaves in the spa from relaxing completely.
<</if>>
<<if (_S.Attendant.visualAge > 35)>>
$His apparent maturity encourages the slaves in the spa to relax and pour out their troubles to $him.
<<set _healthBonus++, _idleBonus++>>
<</if>>
<<if (_S.Attendant.intelligence+_S.Attendant.intelligenceImplant > 15)>>
$He's so intelligent $he can suss out the cause of slaves' emotional issues and counsel them effectively.
<<set _idleBonus++>>
<</if>>
<<if isFertile(_S.Attendant) || (_S.Attendant.bellyPreg >= 1500) || (_S.Attendant.counter.birthsTotal > 0) || (_S.Attendant.bellyImplant >= 1500)>>
$He has a natural mothering instinct and really makes $his charges feel at home.
<<set _idleBonus++, _healthBonus++>>
<</if>>
<<set _attendantUsedCure = 0>>
<<for _slave range _slaves>>
<<set $i = $slaveIndices[_slave.ID]>>
<<setLocalPronouns _slave 2>>
<<if (_slave.fetish == "mindbroken") && (_slave.health.condition > 20) && (_attendantUsedCure == 0) && ($spaFix != 2)>>
<<set _attendantUsedCure = 1>>
<<if (random(1,100) > 90-_S.Attendant.devotion)>>
<br>&nbsp;&nbsp;&nbsp;&nbsp;@@.green;Something almost miraculous has happened.@@ _S.Attendant.slaveName has always refused to believe that _slave.slaveName could not be reached, and has lavished patient tenderness on _him2 in $spaName. _slave.slaveName has begun to respond, and is stirring from _his2 mental torpor.
<<set _slave.devotion = -3, _slave.sexualFlaw = "apathetic", _slave.behavioralFlaw = either("hates men", "odd"), _slave.fetish = "none", _slave.fetishKnown = 1>>
<<set _spr = $genePool.findIndex(function(s) { return s.ID == _slave.ID; })>>
<<if $genePool[_spr].intelligence >= -95>>
<<set _slave.intelligence = $genePool[_spr].intelligence-30>>
<</if>>
<<if ($arcologies[0].FSPaternalist > 0)>>
Society @@.green;strongly approves@@ of _slave.slaveName being restored to sanity, which advances ideals about enlightened slaveownership.
<<set $arcologies[0].FSPaternalist += 0.01*$FSSingleSlaveRep>>
<<run repX(2*$FSSingleSlaveRep*($arcologies[0].FSPaternalist/$FSLockinLevel), "spa", _slave)>>
<</if>>
<</if>>
<</if>>
<<set _seed = _bonusToggle * 10>>
<<if _bonusToggle == 1 && _slave.trust < 60>>
<<set _slave.trust++>>
<</if>>
<<if _S.Attendant.rivalryTarget == _slave.ID>>
$He constantly harasses $his <<print rivalryTerm(_S.Attendant)>>, _slave.slaveName, preventing _him2 from getting comfortable and forcing _him2 to keep _his2 guard up.
<<set _slave.devotion -= 4, _slave.trust -= 4>>
<<if random(1,100) > 35>>
<<set _S.Attendant.rivalry++, _S.Attendant.rivalry++, _slave.rivalry++>>
<</if>>
<<elseif _S.Attendant.relationshipTarget == _slave.ID>>
$He dedicates most of $his attention to $his <<print relationshipTerm(_S.Attendant)>>, _slave.slaveName, making _his2 stress, both physical and mental, wash away.
<<set _slave.devotion += 3, _slave.trust += 3>>
<<elseif areRelated(_S.Attendant, _slave)>>
$He makes sure to spend extra time caring for $his <<print relativeTerm(_S.Attendant,_slave)>>, _slave.slaveName.
<<set _slave.trust++>>
<<run improveCondition(_slave, 1)>>
<</if>>
<<switch _slave.prestigeDesc>>
<<case "$He is a famed Free Cities whore, and commands top prices.">>
$He does $his best to relax the famous whore, _slave.slaveName, making sure to
<<if _slave.vagina > 2 || _slave.anus > 2>>
pay special attention to _his2 worn holes.
<<else>>
get _him2 clean and relaxed for _his2 next usage.
<</if>>
<<set _slave.devotion += 3, _slave.trust += 3>>
<<case "$He is a famed Free Cities slut, and can please anyone.">>
$He does $his best to soothe the famous entertainer, _slave.slaveName, letting _him2 relax in blissful peace.
<<set _slave.devotion += 3, _slave.trust += 3>>
<<case "$He is remembered for winning best in show as a cockmilker.">>
<<if (_slave.balls > 6) && (_slave.dick != 0)>>
<<if _S.Attendant.fetish == "cumslut">>
$He can't keep $his hand<<if hasBothArms(_S.Attendant)>>s<</if>> off _slave.slaveName's cock and balls, but _he2 doesn't mind being milked constantly. Before long, strands of cum can be found floating all throughout the bath.
<<set _S.Attendant.fetishStrength += 4>>
<<else>>
$He does $his best to accommodate _slave.slaveName's massive genitals and tends to _him2 whenever _he2 feels a need for release.
<<if random(1,100) > 65 && _S.Attendant.fetish == "none">>
After taking several massive loads to the face, _S.Attendant.slaveName begins to find satisfaction in being coated in cum.
<<set _S.Attendant.fetish = "cumslut">>
<</if>>
<</if>>
<</if>>
<<set _slave.devotion += 3, _slave.trust += 3>>
<<case "$He is remembered for winning best in show as a dairy cow.">>
<<if (_slave.lactation > 0) && ((_slave.boobs-_slave.boobsImplant) > 6000)>>
<<if _S.Attendant.fetish == "boobs">>
$He can't keep $his hand<<if hasBothArms(_S.Attendant)>>s<</if>> off _slave.slaveName's huge breasts, but _he2 doesn't mind being milked constantly. Before long the bath gains a white tint.
<<set _S.Attendant.fetishStrength += 4, _S.Attendant.fetishStrength += 4>>
<<else>>
$He does $his best to accommodate _slave.slaveName's massive breasts and tends to _him2 whenever _he2 feels a need for release.
<<if random(1,100) > 65 && _S.Attendant.fetish == "none">>
After multiple milking sessions, _S.Attendant.slaveName begins to find $himself fantasizing about having giant milky breasts too.
<<set _S.Attendant.fetish = "boobs">>
<</if>>
<</if>>
<<set _slave.devotion += 3, _slave.trust += 3, _slave.lactationDuration = 2, _slave.boobs -= _slave.boobsMilk, _slave.boobsMilk = 0>>
<</if>>
<<case "$He is remembered for winning best in show as a breeder.">>
<<if _slave.bellyPreg >= 5000>>
<<if _S.Attendant.fetish == "pregnancy">>
$He can't keep $his hand<<if hasBothArms(_S.Attendant)>>s<</if>> off _slave.slaveName's pregnancy, but _he2 doesn't mind _his2 full belly being fondled.
<<set _S.Attendant.fetishStrength += 4, _S.Attendant.fetishStrength += 4>>
<<else>>
$He does $his best to accommodate _slave.slaveName's pregnancy and to make sure the mother-to-be is happy and comfortable.
<<if random(1,100) > 65 && _S.Attendant.fetish == "none">>
After massaging _slave.slaveName's growing belly multiple times, _S.Attendant.slaveName begins to find $himself fantasizing about being swollen with life too.
<<set _S.Attendant.fetish = "pregnancy">>
<</if>>
<</if>>
<<set _slave.devotion += 3, _slave.trust += 3>>
<<else>>
<<if _S.Attendant.fetish == "pregnancy">>
$He can't help but pester _slave.slaveName with questions about _his2 famous pregnancy, limiting _his2 ability to truly relax.
<<set _slave.devotion += 1, _slave.trust += 1>>
<<elseif canGetPregnant(_slave)>>
$He does $his best to encourage _slave.slaveName's fertilization by performing any fertility boosting actions $he can.
<<set _slave.devotion += 3, _slave.trust += 3>>
<</if>>
<</if>>
<</switch>>
<<if (_S.Attendant.intelligence+_S.Attendant.intelligenceImplant > 15) && (_attendantUsedCure == 0) && ((_S.Attendant.intelligence+_S.Attendant.intelligenceImplant)+_seed) > random(1,200) && ($spaFix == 0)>>
<<if _slave.behavioralFlaw != "none">>
<<run SoftenBehavioralFlaw(_slave)>>
<<set _attendantUsedCure += 1>>
<br>&nbsp;&nbsp;&nbsp;&nbsp;_S.Attendant.slaveName works carefully with _slave.slaveName, and successfully @@.green;softens _his2 behavioral flaw@@ into an appealing quirk.
<<elseif _slave.sexualFlaw != "none">>
<<run SoftenSexualFlaw(_slave)>>
<<set _attendantUsedCure += 1>>
<br>&nbsp;&nbsp;&nbsp;&nbsp;_S.Attendant.slaveName works carefully with _slave.slaveName, and successfully @@.green;softens _his2 sexual flaw@@ into an appealing quirk.
<</if>>
<</if>>
<<if _slave.lactation > 0>>
_S.Attendant.slaveName takes care to keep _slave.slaveName's breasts comfortably drained.
<<set _slave.lactationDuration = 2, _slave.boobs -= _slave.boobsMilk, _slave.boobsMilk = 0>>
<</if>>
<</for>>
<<if (_DL < $spa)>>
<<set _seed = random(1,10)+(($spa-_DL)*(random(150,170)+(_idleBonus*10)))>>
<<run cashX(_seed, "spa", _S.Attendant)>>
<br>&nbsp;&nbsp;&nbsp;&nbsp;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 @@.yellowgreen;<<print cashFormat(_seed)>>.@@
<<if ($arcologies[0].FSHedonisticDecadence > 0) && (_DL == 0)>>
Society @@.green;loves@@ being allowed to lounge in your spa, greatly advancing your laid back culture.
<<run FutureSocieties.Change("Hedonistic", 2)>>
<</if>>
<</if>>
<<if (_DL > 0)>><br><br><</if>>
<</if>>
<<if (_DL > 0)>>
&nbsp;&nbsp;&nbsp;&nbsp;''<<if (_DL > 1)>>There are _DL slaves<<else>>There is one slave<</if>> resting and recuperating in the spa.''
<<if ($arcologies[0].FSHedonisticDecadence > 0) && (_DL == 0)>>
Society @@.green;approves@@ of your slaves being pampered this way, greatly advancing your laid back culture.
<<run FutureSocieties.Change("Hedonistic", 1)>>
<</if>>
<</if>>
<<if _S.Attendant>>
<<set $i = $slaveIndices[$AttendantID]>> /* apply following SA passages to facility leader */
<<if $showEWD != 0>>
<br><br>
/* 000-250-006 */
<<if $seeImages && $seeReportImages>>
<div class="imageRef smlImg">
<<= SlaveArt(_S.Attendant, 0, 0)>>
</div>
<</if>>
/* 000-250-006 */
<<includeDOM App.EndWeek.favoriteIcon(_S.Attendant)>>
<span class='slave-name'><<= SlaveFullName(_S.Attendant)>></span> is serving as the Attendant in $spaName.
<br>&nbsp;&nbsp;&nbsp;
<<= App.SlaveAssignment.choosesOwnClothes(_S.Attendant)>>
<<run tired(_S.Attendant)>>
<<includeDOM App.SlaveAssignment.rules(_S.Attendant)>>
<<= App.SlaveAssignment.diet(_S.Attendant)>>
<<includeDOM App.SlaveAssignment.longTermEffects(_S.Attendant)>>
<<= App.SlaveAssignment.drugs(_S.Attendant)>>
<<= App.SlaveAssignment.relationships(_S.Attendant)>>
<<= App.SlaveAssignment.rivalries(_S.Attendant)>>
<br>&nbsp;&nbsp;&nbsp;&nbsp;<<= App.SlaveAssignment.devotion(_S.Attendant)>>
<<else>>
<<run App.SlaveAssignment.choosesOwnClothes(_S.Attendant)>>
<<run tired(_S.Attendant)>>
<<run App.SlaveAssignment.rules()>>
<<run App.SlaveAssignment.diet(_S.Attendant)>>
<<run App.SlaveAssignment.longTermEffects(_S.Attendant)>>
<<run App.SlaveAssignment.drugs(_S.Attendant)>>
<<run App.SlaveAssignment.relationships(_S.Attendant)>>
<<run App.SlaveAssignment.rivalries(_S.Attendant)>>
<<run App.SlaveAssignment.devotion(_S.Attendant)>>
<</if>>
<</if>>
<<for _slave range _slaves>>
<<set $i = $slaveIndices[_slave.ID]>>
<<setLocalPronouns _slave>>
<<set _slave.devotion += _devBonus, _slave.trust += _trustBonus>>
<<run improveCondition(_slave, 5 + _healthBonus)>>
<<if (_slave.health.condition < -80)>>
<<run improveCondition(_slave, 15)>>
<<elseif _slave.health.condition < -40>>
<<run improveCondition(_slave, 10)>>
<<elseif _slave.health.condition < 0>>
<<run improveCondition(_slave, 5)>>
<</if>>
<<if ($spaUpgrade == 1) && (_slave.health.condition < 100)>>
<<run improveCondition(_slave, normalRandInt(8))>>
<</if>>
<<if (_slave.devotion < 60) && (_slave.trust < 60)>>
<<set _slave.devotion++, _slave.trust++>>
<<elseif (_slave.trust < 40)>>
<<set _slave.trust += 10>>
<<elseif (_slave.devotion < 40)>>
<<set _slave.devotion += 10>>
<</if>>
<<switch $spaDecoration>>
<<case "Chattel Religionist" "Chinese Revivalist">>
<<set _slave.rules.living = "normal">>
<<case "Degradationist">>
<<set _slave.rules.living = "spare">>
<<default>>
<<set _slave.rules.living = "luxurious">>
<</switch>>
<<if (_slave.health.condition >= 20) && (_slave.health.tired <= 30) && (_slave.trust > 60) && (_slave.devotion > 60) && (_slave.fetish != "mindbroken") && (_slave.sexualFlaw == "none") && (_slave.behavioralFlaw == "none")>>
<p>
<span class="slave-name">_slave.slaveName</span> is feeling well enough to leave $spaName,
<span class="noteworthy">
<<if $assignmentRecords[_slave.ID]>>
<<set _oldJob = $assignmentRecords[_slave.ID]>>
<<= assignJobSafely(_slave, _oldJob)>>
<<if _slave.choosesOwnAssignment === 1>>
and $he is resting before choosing another task.
<<elseif _slave.assignment === "rest">>
<<if _oldJob != "rest">>
and since $he was unable to return to $his old task to <<print _oldJob>>, $his assignment has defaulted to rest.
<<else>>
so $he has returned to rest.
<</if>>
<<else>>
so $he goes back to <<print _slave.assignment>>.
<</if>>
<<else>>
so $his assignment has defaulted to rest.
<<= removeJob(_slave, "rest in the spa")>>
<</if>>
</span>
</p>
<<set _restedSlaves++, _DL--, _dI-->>
<<continue>>
<</if>>
<<if $showEWD != 0>>
<br><br>
/* 000-250-006 */
<<if $seeImages && $seeReportImages>>
<div class="imageRef smlImg">
<<= SlaveArt(_slave, 0, 0)>>
</div>
<</if>>
/* 000-250-006 */
<<includeDOM App.EndWeek.favoriteIcon(_slave)>>
<span class='slave-name'><<= SlaveFullName(_slave)>></span>
<<if _slave.choosesOwnAssignment == 2>>
<<= App.SlaveAssignment.choosesOwnJob(_slave)>>
<<else>>
is resting in $spaName.
<</if>>
<br>&nbsp;&nbsp;&nbsp;&nbsp;$He <<= App.SlaveAssignment.rest(_slave)>>
<<if (_slave.fetish == "mindbroken")>>
$He remains in the Spa, completely mindbroken.
<<elseif(_slave.sexualFlaw != "none") || (_slave.behavioralFlaw != "none")>>
$He remains in the Spa, stubborn in $his flaw.
<<elseif (_slave.trust < 60) || (_slave.devotion < 60)>>
$He remains in the Spa, as $he is still learning to accept life as a slave.
<<elseif (_slave.health.condition < 20)>>
$He remains in the Spa, as $he is benefiting from its healing properties.
<<elseif (_slave.health.tired > 30)>>
$He remains in the Spa, continuing to soak away $his fatigue.
<</if>>
<br>&nbsp;&nbsp;&nbsp;
<<= App.SlaveAssignment.choosesOwnClothes(_slave)>>
<<includeDOM App.SlaveAssignment.rules(_slave)>>
<<= App.SlaveAssignment.diet(_slave)>>
<<includeDOM App.SlaveAssignment.longTermEffects(_slave)>>
<<= App.SlaveAssignment.drugs(_slave)>>
<<= App.SlaveAssignment.relationships(_slave)>>
<<= App.SlaveAssignment.rivalries(_slave)>>
<br>&nbsp;&nbsp;&nbsp;&nbsp;<<= App.SlaveAssignment.devotion(_slave)>>
<<else>>
<<run App.SlaveAssignment.choosesOwnJob(_slave)>>
<<run App.SlaveAssignment.choosesOwnClothes(_slave)>>
<<run App.SlaveAssignment.rest(_slave)>>
<<run App.SlaveAssignment.rules(_slave)>>
<<run App.SlaveAssignment.diet(_slave)>>
<<run App.SlaveAssignment.longTermEffects(_slave)>>
<<run App.SlaveAssignment.drugs(_slave)>>
<<run App.SlaveAssignment.relationships(_slave)>>
<<run App.SlaveAssignment.rivalries(_slave)>>
<<run App.SlaveAssignment.devotion(_slave)>>
<</if>>
<</for>>
<<if (_restedSlaves > 0)>>
<br><br>&nbsp;&nbsp;&nbsp;
<<if (_restedSlaves == 1)>>
One slave has rested until $he reached a state of @@.hotpink;devotion@@ and @@.mediumaquamarine;trust@@ and will leave the spa before the end of the week.
<<else>>
_restedSlaves slaves have rested until they reached a state of @@.hotpink;devotion@@ and @@.mediumaquamarine;trust@@ and will leave the spa before the end of the week.
<</if>>
<<if $spaDecoration != "standard">>
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<<= capFirstChar($spaName)>>'s $spaDecoration atmosphere @@.hotpink;had an impact on <<if _restedSlaves == 1>>$him while $he was<<else>>them while they were<</if>>@@ resting.
<</if>>
<</if>>
<<if _DL > 0 || _S.Attendant>>
<br><br>
<</if>>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment