diff --git a/src/endWeek/clinicReport.js b/src/endWeek/clinicReport.js new file mode 100644 index 0000000000000000000000000000000000000000..ca3c6dfdb76c5b3e3edc56252dfb23b52466f70e --- /dev/null +++ b/src/endWeek/clinicReport.js @@ -0,0 +1,411 @@ +App.EndWeek.clinicReport = function() { + let frag = document.createDocumentFragment(); + + const slaves = App.Utils.sortedEmployees(App.Entity.facilities.clinic); + let devBonus = (V.clinicDecoration !== "standard") ? 1 : 0; + let healthBonus = 0; + + function nurseText() { + let r = []; + let FLsFetish = 0; + let idleBonus = 0; + + if (S.Nurse) { + if (S.Nurse.health.condition < 100) { + improveCondition(S.Nurse, 20); + } + if (S.Nurse.devotion <= 60) { + S.Nurse.devotion++; + } + if (S.Nurse.trust < 60) { + S.Nurse.trust++; + } + + if (S.Nurse.rules.living !== "luxurious") { + S.Nurse.rules.living = "luxurious"; + } + + S.Nurse.devotion += devBonus; + if (S.Nurse.fetishStrength <= 95) { + if (S.Nurse.fetish !== "dom") { + if (fetishChangeChance(S.Nurse) > jsRandom(0, 100)) { + FLsFetish = 1; + S.Nurse.fetishKnown = 1; + S.Nurse.fetish = "dom"; + } + } else if (S.Nurse.fetishKnown === 0) { + FLsFetish = 1; + S.Nurse.fetishKnown = 1; + } else { + FLsFetish = 2; + S.Nurse.fetishStrength += 4; + } + } + const {He, he, His, his, him, wife} = getPronouns(S.Nurse); + r.push(`${SlaveFullName(S.Nurse)} is serving as the clinical nurse.`); + if (S.Nurse.relationship === -3 && S.Nurse.devotion > 50) { + r.push(`${He} does ${his} best to be a caring and nurturing ${wife}.`); + healthBonus += 2; + } + if (FLsFetish === 1) { + r.push(`${His} job involves giving naked sex slaves orders for their own good. Even though most of these commands are medical rather than sexual, ${he} can be forgiven for not always seeing the difference, and <span class="fetish inc">becomes more dominant.</span>`); + } else if (FLsFetish === 2) { + r.push(`Every new patient in the clinic is a new target for ${his} authority. <span class="fetish inc">${He} becomes more dominant.</span>`); + } + if (setup.nurseCareers.includes(S.Nurse.career)) { + r.push(`${He} has experience with medicine from ${his} life before ${he} was a slave, and can often recognize conditions before even the medical scanners can.`); + idleBonus++; + healthBonus++; + } else if (S.Nurse.skill.nurse >= V.masteredXP) { + r.push(`${He} has experience with medicine from working for you, and can often recognize conditions before even the medical scanners can.`); + idleBonus++; + healthBonus++; + } else { + S.Nurse.skill.nurse += jsRandom(1, Math.ceil((S.Nurse.intelligence+S.Nurse.intelligenceImplant)/15) + 8); + } + if (S.Nurse.fetish === "dom") { + r.push(`${He} raps out commands with the confidence of long and partly sexual experience, so patients are inclined to follow even unpleasant medical instructions.`); + idleBonus++; + healthBonus++; + } + if (S.Nurse.muscles > 5) { + r.push(`${He}'s strong enough to gently but firmly restrain resistant slaves, allowing ${him} to be sparing with the inescapable but less healthy restraints.`); + idleBonus++; + healthBonus++; + } + if (S.Nurse.intelligence+S.Nurse.intelligenceImplant > 50) { + r.push(`The diagnostic equipment is state-of-the-art, but ${he}'s smart and perceptive enough that on occasion, ${he} can add meaningfully to its medical scans.`); + idleBonus++; + healthBonus++; + } + if (S.Nurse.face > 40) { + r.push(`Patients rarely object to seeing ${his} gorgeous face hovering over them.`); + idleBonus++; + devBonus++; + } + if (S.Nurse.devotion >= 60) { + healthBonus++; + } + for (const slave of slaves) { + const {He2, His2, he2, his2, him2} = getPronouns(slave).appendSuffix('2'); + if (S.Nurse.rivalryTarget === slave.ID) { + r.push(`${He} purposefully neglects the needs of ${his} ${rivalryTerm(S.Nurse)}, ${slave.slaveName}, <span class="health dec">hindering ${his2} recovery</span> and deepening their dislike for each other.`); + slave.devotion--; + slave.trust--; + healthDamage(slave, 3); + if (jsRandom(1, 100) > 65) { + S.Nurse.rivalry++; + slave.rivalry++; + } + } else if (S.Nurse.relationshipTarget === slave.ID) { + r.push(`${He} dedicates most of ${his} attention to ${his} ${relationshipTerm(S.Nurse)}, ${slave.slaveName}, making sure ${he2} has everything ${he2} needs and more. This lavish attention detracts from ${his} overall effectiveness.`); + idleBonus -= 3; + slave.devotion++; + slave.trust++; + improveCondition(slave, 3); + } else if (areRelated(S.Nurse, slave)) { + r.push(`${He} makes sure to spend extra time caring for ${his} ${relativeTerm(S.Nurse, 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 aid the famous whore, ${slave.slaveName}, making sure to pay special attention to ${his2} worn holes.`); + improveCondition(slave, 2); + break; + case "$He is a famed Free Cities slut, and can please anyone.": + r.push(`${He} does ${his} best to aid the famous entertainer, ${slave.slaveName}, making sure ${he2} can show off as soon as possible.`); + improveCondition(slave, 2); + break; + case "$He is remembered for winning best in show as a cockmilker.": + if ((slave.balls > 4) && (slave.dick !== 0)) { + r.push(`${He} does ${his} best to aid the dribbling ${slave.slaveName}, paying special attention to ${his2} huge cock and balls as well as making sure to milk ${his2}`); + if (canAchieveErection(slave)) { + r.push(`erect`); + } + r.push(`dick hourly.`); + improveCondition(slave, 4); + if (jsRandom(1, 100) > 65) { + if (S.Nurse.fetish === "none") { + S.Nurse.fetish = "cumslut"; // FIXME: no player notification on fetish acquisition? + } else if (S.Nurse.fetish === "cumslut") { + S.Nurse.fetishStrength += 4; + } + } + } + break; + case "$He is remembered for winning best in show as a dairy cow.": + if ((slave.lactation > 0) && ((slave.boobs-slave.boobsImplant) > 6000)) { + r.push(`${He} does ${his} best to aid the leaking ${slave.slaveName}, paying special attention to ${his2} huge breasts as well as making sure to milk ${him2} hourly.`); + improveCondition(slave, 4); + slave.lactationDuration = 2; + if (jsRandom(1, 100) > 65) { + if (S.Nurse.fetish === "none") { + S.Nurse.fetish = "boobs"; // FIXME: no player notification on fetish acquisition? + } else if (S.Nurse.fetish === "boobs") { + S.Nurse.fetishStrength += 4; + } + } + } + break; + case "$He is remembered for winning best in show as a breeder.": + if (slave.bellyPreg >= 1500) { + r.push(`${He} does ${his} best to aid the pregnant ${slave.slaveName}, paying special attention to ${his2} swollen belly and the welfare of the life within.`); + improveCondition(slave, 6); + } else if (slave.ovaries === 1 || slave.mpreg === 1) { + r.push(`${He} does ${his} best to aid the breeder ${slave.slaveName}, paying special attention to ${his2} fertility and reproductive organs.`); + improveCondition(slave, 4); + } else { + r.push(`${He} lays out plans on how to restore the breeder ${slave.slaveName} to ${his2} former gravid glory.`); + } + break; + } + if (slave.bellyImplant > -1 && V.clinicInflateBelly === 1) { + r.push(`<div class="indent"><span class="slave-name">${slave.slaveName}</span> spent a lot of time during the week under IV-like stands with bags of inert filler steadily flowing into ${his2} belly implant, slowly pushing ${his2} belly further and further out. Careful attention, along with several drug injections, were used to make sure ${his2} body was able to safely adjust to the implant's rapid growth.`); + healthDamage(slave, 10); + slave.bellyImplant += 5000; + if (slave.devotion > 50) { + slave.devotion += 4; + slave.trust += 3; + } else if ((slave.devotion >= -20)) { + slave.trust -= 5; + } else { + slave.devotion -= 5; + slave.trust -= 10; + } + if (slave.bellyImplant > (V.arcologies[0].FSTransformationFetishistResearch ? 800000 : 130000)) { + slave.bellyImplant = (V.arcologies[0].FSTransformationFetishistResearch ? 800000 : 130000); + r.push(`${He2} is filled to the maximum that ${his2} implant can stand.`); + } + r.push(`</div>`); + } + if (slave.pregKnown === 1 && slave.preg < slave.pregData.normalBirth && slave.pregControl === "speed up") { + r.push(`<div class="indent"><span class="slave-name">${slave.slaveName}</span> spends most of ${his2} time on bedrest being filled with rapid gestation agents and concentrated slave food. All ${he2} can do is`); + if (hasAnyArms(slave) && canSee(slave)) { + r.push(`watch and feel ${his2} belly pushing further and further out with life.`); + } else if (canSee(slave)) { + r.push(`watch ${his2} belly bulging further and further out with life.`); + } else if (hasAnyArms(slave)) { + r.push(`feel ${his2} belly pushing further and further out with life beneath ${his2} fingers.`); + } else { + r.push(`feel the every growing pressure inside ${his2} abdomen.`); + } + r.push(`Careful attention, along with numerous drug injections, are used to make sure ${his2} body is able to safely adjust to ${his2} pregnancy's rapid growth.`); + healthDamage(slave, 10); + if (slave.devotion > 50) { + slave.devotion += 2; + slave.trust += 1; + } else if ((slave.devotion >= -20)) { + slave.trust -= 5; + } else { + slave.devotion -= 5; + slave.trust -= 10; + } + if (slave.preg >= slave.pregData.minLiveBirth && slave.pregControl === "speed up") { + slave.pregControl = "none"; + r.push(`${His2} child is ready to pop out of ${his2} womb; <span class="yellow">${his2} course of rapid gestation agents is finished.</span>`); + } + r.push(`</div>`); + } else if (slave.preg > 2 && slave.pregKnown === 0) { + r.push(`During ${his} tests, ${he} discovers that ${slave.slaveName} <span class="lime">is pregnant.</span>`); + slave.pregKnown = 1; + } + } + + if (slaves.length < V.clinic) { + const _idlePay = jsRandom(1, 10) + ((V.clinic - slaves.length) * (jsRandom(150, 170) + (idleBonus * 10))); + cashX(_idlePay, "clinic", S.Nurse); + r.push(`<div class="indent">Since ${he} doesn't have enough patients to occupy all of ${his} time, ${V.clinicName} takes in citizens' slaves on a contract basis and ${he} helps them too, earning <span class="cash inc">${cashFormat(_idlePay)}.</span></div>`); + } + } + + return r.join(" "); + } + + const nurseEffects = App.UI.DOM.appendNewElement("p", frag, '', "indent"); + $(nurseEffects).append(nurseText()); + + if (slaves.length > 0) { + const intro = App.UI.DOM.appendNewElement("p", frag, '', "indent"); + if (slaves.length > 1) { + $(intro).append(`<strong>There are ${slaves.length} slaves receiving treatment in the clinic.</strong>`); + } else { + $(intro).append(`<strong>There is one slave receiving treatment in the clinic.</strong>`); + } + } + + if (S.Nurse) { + const slave = S.Nurse; + V.i = V.slaveIndices[slave.ID]; + App.Utils.setLocalPronouns(slave); // need this for the includes + /* apply following SA passages to facility leader */ + if (V.showEWD !== 0) { + const nurseEntry = App.UI.DOM.appendNewElement("div", frag, '', "slave-report"); + if (V.seeImages && V.seeReportImages) { + App.UI.DOM.appendNewElement("div", nurseEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); + } + $(nurseEntry).append(`<span class='slave-name'>${SlaveFullName(slave)}</span> is serving as as the clinical nurse.`); + $(nurseEntry).append(App.SlaveAssignment.standardSlaveReport(slave, false)); + } else { + App.SlaveAssignment.standardSlaveReport(slave, true); + } + } + + let restedSlaves = 0; + for (const slave of slaves) { + V.i = V.slaveIndices[slave.ID]; + if (slave.devotion < 45) { + slave.devotion += 4; + } + slave.devotion += devBonus; + + if (slave.health.condition < -80) { + improveCondition(slave, 20 + (V.curativeUpgrade * 10) + healthBonus); + } else if (slave.health.condition < -40) { + improveCondition(slave, 10 + (V.curativeUpgrade * 10) + healthBonus); + } else if (slave.health.condition < 0) { + improveCondition(slave, 7 + (V.curativeUpgrade * 10) + healthBonus); + } else if (slave.health.condition < 90) { + improveCondition(slave, 3 + (V.curativeUpgrade * 10) + healthBonus); + } + + /* the clinic is a well-equipped medical facility and can allow the Nurse or player to + * directly cure serious wounds caused by injury and surgery with minimal side effects */ + if (slave.health.shortDamage >= 10) { + if (S.Nurse) { + healthCure(slave, 5 + healthBonus); + } else { + healthCure(slave, V.PC.skill.medicine / 15); /* maximum of 6...even a bad full-time nurse will be better than a player doctor */ + } + } + + switch (V.clinicDecoration) { + case "Eugenics": + case "Gender Fundamentalist": + case "Gender Radicalist": + case "Hedonistic": + case "Intellectual Dependency": + case "Maturity Preferentialist": + case "Paternalist": + case "Petite Admiration": + case "Repopulation Focus": + case "Slimness Enthusiast": + case "Statuesque Glorification": + case "Youth Preferentialist": + slave.rules.living = "luxurious"; + break; + case "Arabian Revivalist": + case "Aztec Revivalist": + case "Chattel Religionist": + case "Chinese Revivalist": + case "Edo Revivalist": + case "Egyptian Revivalist": + case "Roman Revivalist": + slave.rules.living = "normal"; + break; + default: + slave.rules.living = "spare"; + } + + if (S.Nurse) { + if ((V.clinicSpeedGestation === 1) && (slave.pregKnown === 1)) { + slave.pregControl = "speed up"; + } + if ((slave.chem > 10) && (V.clinicUpgradeFilters >= 1)) { + if (slave.health.health > -50 && (V.clinicUpgradePurge > 0)) { + slave.chem -= 100 * V.clinicUpgradePurge; + healthDamage(slave, 15); + } + slave.chem = Math.max(slave.chem - 5, 0); + } + if (slave.lactation > 0) { + slave.boobs -= slave.boobsMilk; + slave.boobsMilk = 0; + } + } + + /* Evaluate why the slave even needs to be here, and eject her if she doesn't */ + const {He, he, his} = getPronouns(slave); + let remainReason = ""; + if (slave.health.illness > 0) { + remainReason = `${He} stays in the clinic since ${he} is still sick.`; + } else if (slave.health.shortDamage >= 20) { + remainReason = `${He} stays in the clinic to recover from ${his} injuries.`; + } else if (slave.health.condition <= 40) { + remainReason = `${He} stays in the clinic since ${his} health is still poor.`; + } else if (S.Nurse && (slave.chem > 15) && (V.clinicUpgradeFilters === 1)) { + remainReason = `${He} stays in the clinic as unhealthy chemicals are still being flushed from ${his} system.`; + } else if (S.Nurse && (slave.pregKnown === 1) && (V.clinicSpeedGestation > 0 || slave.pregControl === "speed up")) { + remainReason = `${He} stays in the clinic to hurry ${his} pregnancy along safely.`; + } else if (S.Nurse && (V.clinicObservePregnancy === 1) && (slave.pregAdaptation * 1000 < slave.bellyPreg || slave.preg > slave.pregData.normalBirth / 1.33)) { + remainReason = `${He} stays in the clinic waiting for the child to be born.`; + } else if (S.Nurse && (V.clinicInflateBelly > 0) && (slave.bellyImplant >= 0) && (slave.bellyImplant <= (V.arcologies[0].FSTransformationFetishistResearch ? 800000 : 130000))) { + remainReason = `${He} stays in the clinic as ${his} implants can still receive more filling.`; + } else { + const reassignment = App.UI.DOM.appendNewElement("p", frag, ''); + const {he, his} = getPronouns(slave); + let r = []; + r.push(`<span class="slave-name">${slave.slaveName}</span> has been cured${(S.Nurse && V.clinicUpgradeFilters > 0) ? ' and purified' : ''},`); + r.push(`<span class="noteworthy">`); + 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, "get treatment in the clinic"); + } + r.push(`</span>`); + restedSlaves++; + $(reassignment).append(r.join(" ")); + continue; + } + + App.Utils.setLocalPronouns(slave); // need this for the includes + if (V.showEWD !== 0) { + const slaveEntry = App.UI.DOM.appendNewElement("div", frag, '', "slave-report"); + if (V.seeImages && V.seeReportImages) { + App.UI.DOM.appendNewElement("div", slaveEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); + } + $(slaveEntry).append(`<span class='slave-name'>${SlaveFullName(slave)}</span> `); + if (slave.choosesOwnAssignment === 2) { + $(slaveEntry).append(App.UI.DOM.renderPassage("SA chooses own job")); + } else { + $(slaveEntry).append(`is receiving treatment in ${V.clinicName}.`); + } + const patientContent = App.UI.DOM.appendNewElement("div", slaveEntry, '', "indent"); + $(patientContent).append(`${He} ${App.SlaveAssignment.rest(slave)} `); + $(patientContent).append(remainReason); + $(slaveEntry).append(App.SlaveAssignment.standardSlaveReport(slave, false)); + } else { + // discard return values silently + App.UI.DOM.renderPassage("SA chooses own job"); + App.SlaveAssignment.rest(slave); + App.SlaveAssignment.standardSlaveReport(slave, true); + } + } + + if (restedSlaves > 0) { + const rested = App.UI.DOM.appendNewElement("p", frag, '', "indent"); + rested.append((restedSlaves === 1) ? `One slave has` : `${restedSlaves} slaves have`, " been returned to "); + App.UI.DOM.appendNewElement("span", rested, `health${(S.Nurse && V.clinicUpgradeFilters > 0) ? ' and purity' : ''}`, "green"); + rested.append(` and will be released from the clinic before the end of the week.`); + + if (V.clinicDecoration !== "standard") { + const decorationEffects = App.UI.DOM.appendNewElement("p", frag, '', "indent"); + $(decorationEffects).append(`${V.clinicNameCaps}'s ${V.clinicDecoration} atmosphere <span class="hotpink">had an impact on them</span> while they were getting treatment.`); + } + } + + return frag; +}; diff --git a/src/uncategorized/clinicReport.tw b/src/uncategorized/clinicReport.tw index 18626a2712822f7d29cca26e230f5a81a2e65100..8478322d5f928bfaa5782fe62866fe04b2d7989d 100644 --- a/src/uncategorized/clinicReport.tw +++ b/src/uncategorized/clinicReport.tw @@ -1,395 +1,5 @@ :: Clinic Report [nobr] -<<set _slaves = App.Utils.sortedEmployees(App.Entity.facilities.clinic)>> -<<set _DL = _slaves.length, _SL = $slaves.length, _healthBonus = 0, _idleBonus = 0, _FLsFetish = 0, _restedSlaves = 0>> - -<<if $clinicDecoration != "standard">> - <<set _devBonus = 1>> -<<else>> - <<set _devBonus = 0>> -<</if>> - -<<if $Nurse != 0>> - <<set _FLs = $slaveIndices[$Nurse.ID]>> - - <<if ($slaves[_FLs].health.condition < 100)>> - <<run improveCondition($slaves[_FLs], 20)>> - <</if>> - <<if ($slaves[_FLs].devotion <= 60)>> - <<set $slaves[_FLs].devotion++>> - <</if>> - <<if $slaves[_FLs].trust < 60>> - <<set $slaves[_FLs].trust++>> - <</if>> - - <<if $slaves[_FLs].rules.living != "luxurious">> - <<set $slaves[_FLs].rules.living = "luxurious">> - <</if>> - - <<set $slaves[_FLs].devotion += _devBonus>> - <<if $slaves[_FLs].fetishStrength <= 95>> - <<if $slaves[_FLs].fetish != "dom">> - <<if fetishChangeChance($slaves[_FLs]) > random(0,100)>> - <<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1, $slaves[_FLs].fetish = "dom">> - <</if>> - <<elseif $slaves[_FLs].fetishKnown == 0>> - <<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1>> - <<else>> - <<set _FLsFetish = 2, $slaves[_FLs].fetishStrength += 4>> - <</if>> - <</if>> - <<set $Nurse = $slaves[_FLs]>> - <<setLocalPronouns $Nurse>> - <<= SlaveFullName($Nurse)>> is serving as the clinical nurse. - <<if $Nurse.relationship == -3 && $Nurse.devotion > 50>> - $He does $his best to be a caring and nurturing $wife. - <<set _healthBonus += 2>> - <</if>> - <<if (_FLsFetish == 1)>> - $His job involves giving naked sex slaves orders for their own good. Even though most of these commands are medical rather than sexual, $he can be forgiven for not always seeing the difference, and @@.lightsalmon;becomes more dominant.@@ - <<elseif (_FLsFetish == 2)>> - Every new patient in the clinic is a new target for $his authority. @@.lightsalmon;$He becomes more dominant.@@ - <</if>> - <<if setup.nurseCareers.includes($Nurse.career)>> - $He has experience with medicine from $his life before $he was a slave, and can often recognize conditions before even the medical scanners can. - <<set _idleBonus++, _healthBonus++>> - <<elseif $Nurse.skill.nurse >= $masteredXP>> - $He has experience with medicine from working for you, and can often recognize conditions before even the medical scanners can. - <<set _idleBonus++, _healthBonus++>> - <<else>> - <<set $slaves[_FLs].skill.nurse += random(1,Math.ceil(($Nurse.intelligence+$Nurse.intelligenceImplant)/15) + 8)>> - <</if>> - <<if ($Nurse.fetish == "dom")>> - $He raps out commands with the confidence of long and partly sexual experience, so patients are inclined to follow even unpleasant medical instructions. - <<set _idleBonus++, _healthBonus++>> - <</if>> - <<if ($Nurse.muscles > 5)>> - $He's strong enough to gently but firmly restrain resistant slaves, allowing $him to be sparing with the inescapable but less healthy restraints. - <<set _idleBonus++, _healthBonus++>> - <</if>> - <<if ($Nurse.intelligence+$Nurse.intelligenceImplant > 50)>> - The diagnostic equipment is state-of-the-art, but $he's smart and perceptive enough that on occasion, $he can add meaningfully to its medical scans. - <<set _idleBonus++, _healthBonus++>> - <</if>> - <<if ($Nurse.face > 40)>> - Patients rarely object to seeing $his gorgeous face hovering over them. - <<set _idleBonus++, _devBonus++>> - <</if>> - <<if ($slaves[_FLs].devotion >= 60)>> - <<set _healthBonus++>> - <</if>> - <<for _slave range _slaves>> - <<set $i = $slaveIndices[_slave.ID]>> - <<if $Nurse.rivalryTarget == _slave.ID>> - <<setLocalPronouns _slave 2>> - $He purposefully neglects the needs of $his <<print rivalryTerm($Nurse)>>, _slave.slaveName, hindering _his2 recovery and deepening their dislike for each other. - <<set _slave.devotion--, _slave.trust-->> - <<run healthDamage(_slave, 3)>> - <<if random(1,100) > 65>> - <<set $Nurse.rivalry++, $slaves[_FLs].rivalry++, _slave.rivalry++>> - <</if>> - <<elseif $Nurse.relationshipTarget == _slave.ID>> - <<setLocalPronouns _slave 2>> - $He dedicates most of $his attention to $his <<print relationshipTerm($Nurse)>>, _slave.slaveName, making sure _he2 has everything _he2 needs and more. This lavish attention detracts from $his overall effectiveness. - <<set _idleBonus -= 3, _slave.devotion++, _slave.trust++>> - <<run improveCondition(_slave, 3)>> - <<elseif areRelated($Nurse, _slave)>> - $He makes sure to spend extra time caring for $his <<print relativeTerm($Nurse,_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.">> - <<setLocalPronouns _slave 2>> - $He does $his best to aid the famous whore, _slave.slaveName, making sure to pay special attention to _his2 worn holes. - <<run improveCondition(_slave, 2)>> - <<case "$He is a famed Free Cities slut, and can please anyone.">> - <<setLocalPronouns _slave 2>> - $He does $his best to aid the famous entertainer, _slave.slaveName, making sure _he2 can show off as soon as possible. - <<run improveCondition(_slave, 2)>> - <<case "$He is remembered for winning best in show as a cockmilker.">> - <<setLocalPronouns _slave 2>> - <<if (_slave.balls > 4) && (_slave.dick != 0)>> - $He does $his best to aid the dribbling _slave.slaveName, paying special attention to _his2 huge cock and balls as well as making sure to milk _his2 <<if canAchieveErection(_slave)>>erect <</if>>dick hourly. - <<run improveCondition(_slave, 4)>> - <<if (random(1,100) > 65) && (($Nurse.fetish == "none") || ($Nurse.fetish == "cumslut"))>> - <<if $Nurse.fetish == "none">> - <<set $Nurse.fetish = "cumslut", $slaves[_FLs].fetish = "cumslut">> - <<else>> - <<set $Nurse.fetishStrength += 4, $slaves[_FLs].fetishStrength += 4>> - <</if>> - <</if>> - <</if>> - <<case "$He is remembered for winning best in show as a dairy cow.">> - <<setLocalPronouns _slave 2>> - <<if (_slave.lactation > 0) && ((_slave.boobs-_slave.boobsImplant) > 6000)>> - $He does $his best to aid the leaking _slave.slaveName, paying special attention to _his2 huge breasts as well as making sure to milk _him2 hourly. - <<run improveCondition(_slave, 4)>> - <<set _slave.lactationDuration = 2, _slave.boobs -= _slave.boobsMilk, _slave.boobsMilk = 0>> - <<if (random(1,100) > 65) && (($Nurse.fetish == "none") || ($Nurse.fetish == "boobs"))>> - <<if $Nurse.fetish == "none">> - <<set $Nurse.fetish = "boobs", $slaves[_FLs].fetish = "boobs">> - <<else>> - <<set $Nurse.fetishStrength += 4, $slaves[_FLs].fetishStrength += 4>> - <</if>> - <</if>> - <</if>> - <<case "$He is remembered for winning best in show as a breeder.">> - <<setLocalPronouns _slave 2>> - <<if _slave.bellyPreg >= 1500>> - $He does $his best to aid the pregnant _slave.slaveName, paying special attention to _his2 swollen belly and the welfare of the life within. - <<run improveCondition(_slave, 6)>> - <<elseif _slave.ovaries == 1 || _slave.mpreg == 1>> - $He does $his best to aid the breeder _slave.slaveName, paying special attention to _his2 fertility and reproductive organs. - <<run improveCondition(_slave, 4)>> - <<else>> - $He lays out plans on how to restore the breeder _slave.slaveName to _his2 former gravid glory. - <</if>> - <</switch>> - <<if _slave.bellyImplant > -1 && $clinicInflateBelly == 1>> - <<setLocalPronouns _slave 2>> - <br>''@@.pink;_slave.slaveName@@'' spent a lot of time during the week under IV-like stands with bags of inert filler steadily flowing into _his2 belly implant, slowly pushing _his2 belly further and further out. Careful attention, along with several drug injections, were used to make sure _his2 body was able to safely adjust to the implant's rapid growth. - <<run healthDamage(_slave, 10)>> - <<set _slave.bellyImplant += 5000>> - <<if (_slave.devotion > 50)>> - <<set _slave.devotion += 4, _slave.trust += 3>> - <<elseif (_slave.devotion >= -20)>> - <<set _slave.trust -= 5>> - <<else>> - <<set _slave.devotion -= 5, _slave.trust -= 10>> - <</if>> - <<if _slave.bellyImplant > ($arcologies[0].FSTransformationFetishistResearch ? 800000 : 130000)>> - <<set _slave.bellyImplant = ($arcologies[0].FSTransformationFetishistResearch ? 800000 : 130000)>> - _He2 is filled to the maximum that _his2 implant can stand. - <</if>> - <</if>> - <<if _slave.pregKnown == 1 && _slave.preg < _slave.pregData.normalBirth && _slave.pregControl == "speed up">> - <<setLocalPronouns _slave 2>> - <br>''@@.pink;_slave.slaveName@@'' spends most of _his2 time on bedrest being filled with rapid gestation agents and concentrated slave food. All _he2 can do is <<if hasAnyArms(_slave) && canSee(_slave)>>watch and feel _his2 belly pushing further and further out with life<<elseif canSee(_slave)>>watch _his2 belly bulging further and further out with life<<elseif hasAnyArms(_slave)>>feel _his2 belly pushing further and further out with life beneath _his2 fingers<<else>>feel the every growing pressure inside _his2 abdomen<</if>>. Careful attention, along with numerous drug injections, are used to make sure _his2 body is able to safely adjust to _his2 pregnancy's rapid growth. - <<run healthDamage(_slave, 10)>> - <<if (_slave.devotion > 50)>> - <<set _slave.devotion += 2, _slave.trust += 1>> - <<elseif (_slave.devotion >= -20)>> - <<set _slave.trust -= 5>> - <<else>> - <<set _slave.devotion -= 5, _slave.trust -= 10>> - <</if>> - <<if _slave.preg >= _slave.pregData.minLiveBirth && _slave.pregControl == "speed up">> - <<set _slave.pregControl = "none">> - ''@@.pink;_slave.slaveName's@@'' child is ready to pop out of _his2 womb, ''@@.yellow;_his2 course of rapid gestation agents is finished@@''. - <</if>> - <<elseif _slave.preg > 2 && _slave.pregKnown == 0>> - During $his tests, $he discovers that _slave.slaveName @@.lime;is pregnant.@@ - <<set _slave.pregKnown = 1>> - <</if>> - <</for>> - <<if (_DL < $clinic)>> - <<set _seed = random(1,10)+(($clinic-_DL)*(random(150,170)+(_idleBonus*10)))>> - <<run cashX(_seed, "clinic", $Nurse)>> - <br> Since $he doesn't have enough patients to occupy all $his time, the clinic takes in citizens' slaves on a contract basis and $he helps them too, earning @@.yellowgreen;<<print cashFormat(_seed)>>.@@ - <</if>> - <<if (_DL > 0)>><br><br><</if>> -<</if>> - -<<if (_DL > 0)>> - <<if (_DL == 1)>>''There is one slave receiving treatment in the clinic.''<<else>>''There are _DL slaves receiving treatment in the clinic.''<</if>> -<</if>> - -<<if ($Nurse != 0)>> - <<set $i = _FLs>> /* apply following SA passages to facility leader */ - <<if $showEWD != 0>> - <br><br> - /* 000-250-006 */ - <<if $seeImages && $seeReportImages>> - <div class="imageRef tinyImg"> - <<= SlaveArt($slaves[_FLs], 0, 0)>> - </div> - <</if>> - /* 000-250-006 */ - <span class='slave-name'><<= SlaveFullName($slaves[_FLs])>></span> is serving as the clinical nurse. - <br> - <<= App.SlaveAssignment.choosesOwnClothes($slaves[$i])>> - <<run tired($slaves[$i])>> - <<include "SA rules">> - <<include "SA diet">> - <<include "SA long term effects">> - <<= App.SlaveAssignment.drugs($slaves[$i])>> - <<include "SA relationships">> - <<include "SA rivalries">> - <br><<include "SA devotion">> - <<else>> - <<silently>> - <<run App.SlaveAssignment.choosesOwnClothes($slaves[$i])>> - <<run tired($slaves[$i])>> - <<include "SA rules">> - <<include "SA diet">> - <<include "SA long term effects">> - <<run App.SlaveAssignment.drugs($slaves[$i])>> - <<include "SA relationships">> - <<include "SA rivalries">> - <<include "SA devotion">> - <</silently>> - <</if>> - <<set $Nurse = $slaves[_FLs]>> -<</if>> - -<<for _slave range _slaves>> - <<set $i = $slaveIndices[_slave.ID]>> - <<setLocalPronouns _slave>> - - <<if _slave.devotion < 45>> - <<set _slave.devotion += 4>> - <</if>> - <<set _slave.devotion += _devBonus>> - <<if _slave.trust < 45>> - <<set _slave.trust += 4>> - <</if>> - - <<if (_slave.health.condition < -80)>> - <<run improveCondition(_slave, (20 + ($curativeUpgrade * 10) + _healthBonus))>> - <<elseif (_slave.health.condition < -40)>> - <<run improveCondition(_slave, (10 + ($curativeUpgrade * 7) + _healthBonus))>> - <<elseif (_slave.health.condition < 0)>> - <<run improveCondition(_slave, (7 + ($curativeUpgrade * 5) + _healthBonus))>> - <<elseif (_slave.health.condition < 90)>> - <<run improveCondition(_slave, (3 + ($curativeUpgrade * 3) + _healthBonus))>> - <</if>> - - /* the clinic is a well-equipped medical facility and can allow the Nurse or player to - * directly cure serious wounds caused by injury and surgery with minimal side effects */ - <<if _slave.health.shortDamage >= 10>> - <<if ($Nurse != 0)>> - <<run healthCure(_slave, 5 + _healthBonus)>> - <<else>> - <<run healthCure(_slave, $PC.skill.medicine / 15)>> /* maximum of 6...even a bad full-time nurse will be better than a player doctor */ - <</if>> - <</if>> - - <<switch $clinicDecoration>> - <<case "Eugenics" "Gender Fundamentalist" "Gender Radicalist" "Hedonistic" "Intellectual Dependency" "Maturity Preferentialist" "Paternalist" "Petite Admiration" "Repopulation Focus" "Slimness Enthusiast" "Statuesque Glorification" "Youth Preferentialist">> - <<set _slave.rules.living = "luxurious">> - <<case "Arabian Revivalist" "Aztec Revivalist" "Chattel Religionist" "Chinese Revivalist" "Edo Revivalist" "Egyptian Revivalist" "Roman Revivalist">> - <<set _slave.rules.living = "normal">> - <<default>> - <<set _slave.rules.living = "spare">> - <</switch>> - - <<if ($Nurse != 0)>> - <<if ($clinicSpeedGestation == 1) && (_slave.pregKnown == 1)>> - <<set _slave.pregControl = "speed up">> - <</if>> - <<if (_slave.chem > 10) && ($clinicUpgradeFilters >= 1)>> - <<if _slave.health.health > -50 && ($clinicUpgradePurge > 0)>> - <<set _slave.chem -= 100 * $clinicUpgradePurge>> - <<run healthDamage(_slave, 15)>> - <</if>> - <<set _slave.chem = Math.max(_slave.chem - 5, 0)>> - <</if>> - <<if _slave.lactation == 1>> - <<set _slave.boobs -= _slave.boobsMilk, _slave.boobsMilk = 0>> - <</if>> - <</if>> - <<if (_slave.health.illness > 0)>> - <<elseif (_slave.health.shortDamage >= 20)>> /* shortDamage does no real harm, until it gets to 20 */ - <<elseif (_slave.health.condition <= 40)>> - <<elseif ($Nurse != 0) && (_slave.chem > 15) && ($clinicUpgradeFilters == 1)>> - <<elseif ($Nurse != 0) && (_slave.pregKnown == 1) && ($clinicSpeedGestation > 0 || _slave.pregControl == "speed up")>> - <<elseif ($Nurse != 0) && ($clinicObservePregnancy == 1) && (_slave.pregAdaptation*1000 < _slave.bellyPreg || _slave.preg > _slave.pregData.normalBirth/1.33)>> - <<elseif ($Nurse != 0) && ($clinicInflateBelly > 0) && (_slave.bellyImplant >= 0) && (_slave.bellyImplant <= ($arcologies[0].FSTransformationFetishistResearch ? 800000 : 130000))>> - <<else>> - <p> - <span class="slave-name">_slave.slaveName</span> has been cured<<if ($Nurse != 0) && ($clinicUpgradeFilters == 1)>> and purified<</if>>, - <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, "get treatment in the clinic")>> - <</if>> - </span> - </p> - <<set _restedSlaves++, _dI--, _DL-->> - <<continue>> - <</if>> - <<if $showEWD != 0>> - <br><br> - /* 000-250-006 */ - <<if $seeImages && $seeReportImages>> - <div class="imageRef tinyImg"> - <<= SlaveArt(_slave, 0, 0)>> - </div> - <</if>> - /* 000-250-006 */ - <span class='slave-name'><<= SlaveFullName(_slave)>></span> - <<if _slave.choosesOwnAssignment == 2>> - <<include "SA chooses own job">> - <<else>> - is receiving treatment in $clinicName. - <</if>> - <br> $He <<= App.SlaveAssignment.rest(_slave)>> - <<if (_slave.health.illness > 0)>> - $He stays in the clinic since $he is still sick. - <<elseif (_slave.health.condition <= 40)>> - $He stays in the clinic since $his health is still poor. - <<elseif (_slave.health.shortDamage >= 20)>> - $He stays in the clinic to recover from $his injuries. - <<elseif ($Nurse != 0) && (_slave.chem > 15) && ($clinicUpgradeFilters == 1)>> - $He stays in the clinic as unhealthy chemicals are still being flushed from $his system. - <<elseif ($Nurse != 0) && (_slave.pregKnown == 1) && ($clinicSpeedGestation > 0 || _slave.pregControl == "speed up")>> - $He stays in the clinic to hurry $his pregnancy along safely. - <<elseif ($Nurse != 0) && ($clinicInflateBelly > 0) && (_slave.bellyImplant >= 0) && (_slave.bellyImplant <= ($arcologies[0].FSTransformationFetishistResearch ? 800000 : 130000))>> - $He stays in the clinic as $his implants can still receive more filling. - <<elseif ($Nurse != 0) && ($clinicObservePregnancy == 1) && (_slave.pregAdaptation*1000 < _slave.bellyPreg || _slave.preg > _slave.pregData.normalBirth/1.33)>> - $He stays in the clinic waiting for the child to be born. - <</if>> - <br> - <<= App.SlaveAssignment.choosesOwnClothes(_slave)>> - <<include "SA rules">> - <<include "SA diet">> - <<include "SA long term effects">> - <<= App.SlaveAssignment.drugs(_slave)>> - <<include "SA relationships">> - <<include "SA rivalries">> - <br><<include "SA devotion">> - <<else>> - <<silently>> - <<include "SA chooses own job">> - <<run App.SlaveAssignment.rest(_slave)>> - <<run App.SlaveAssignment.choosesOwnClothes(_slave)>> - <<include "SA rules">> - <<include "SA diet">> - <<include "SA long term effects">> - <<run App.SlaveAssignment.drugs(_slave)>> - <<include "SA relationships">> - <<include "SA rivalries">> - <<include "SA devotion">> - <</silently>> - <</if>> -<</for>> -<<if (_restedSlaves > 0)>> - <br><br> - <<if (_restedSlaves == 1)>> - One slave has - <<else>> - _restedSlaves slaves have - <</if>> - been returned to @@.green;health<<if ($Nurse != 0) && ($clinicUpgradeFilters == 1)>> and purity<</if>>@@ and will be released from the clinic before the end of the week. - <<if $clinicDecoration != "standard">> - <br><br> $clinicNameCaps's $clinicDecoration atmosphere @@.hotpink;had an impact on them while they were@@ getting treatment. - <</if>> -<</if>> -<<if _DL > 0 || $Nurse != 0>> - <br><br> -<</if>> +/* This passage probably isn't really necessary but it helps organize the profiler output. + * TODO: Once all the facility reports look like this, we should probably get rid of these intermediate passages. */ +<<includeDOM App.EndWeek.clinicReport()>>