diff --git a/src/js/birth/birth.js b/src/js/birth/birth.js index 7e6b767bea6eae58d5fc14951a90f0fe95b195b1..586f3e9e97bbc5ebe21d830f9e991c3f1de9052f 100644 --- a/src/js/birth/birth.js +++ b/src/js/birth/birth.js @@ -22,13 +22,12 @@ globalThis.allBirths = function() { * Describes birth for a single slave, and can present options for the player to send the babies to a particular place * @param {App.Entity.SlaveState} slave */ -globalThis.birth = function(slave, {birthStorm = false} = {}) { +globalThis.birth = function(slave, {birthStorm = false, cSection = false} = {}) { const el = document.createElement("p"); el.style.overflow = "hidden"; // Keep image from floating into the next slave. let p; let humiliation = 0; let suddenBirth = 1; - let cSection = 0; let slaveDead = 0; let birthDamage = 0; const newMother = (slave.counter.laborCount === 0 && slave.counter.birthsTotal === 0); @@ -416,12 +415,12 @@ globalThis.birth = function(slave, {birthStorm = false} = {}) { } else { // Fuckdoll birth if (V.universalRulesCSec === 1 || (slave.mpreg === 0 && slave.vagina < 0)) { - cSection = 1; + cSection = true; r.push(`${slave.slaveName}'s suit's systems alert that it is ready to give birth; it is taken to the remote surgery to have its ${children} extracted and for it to be cleaned up.`); } else if (V.universalRulesBirthing === 1) { r.push(`${slave.slaveName}'s suit's systems alert that it is ready to give birth. It is taken to the remote surgery to have its ${children} extracted and for it to be cleaned up.`); } else if (birthDamage > 10) { - cSection = 1; + cSection = true; r.push(`${slave.slaveName}'s suit's systems alert that it is ready to give birth. Since it fails to qualify as a birthing model, it is quickly taken to the remote surgery to have its ${children} extracted and to be cleaned up.`); } else { r.push(`${slave.slaveName}'s suit's systems alert you that it is ready to give birth. You carefully pose it as it labors on bringing its ${children} into the world and sit back to enjoy yourself as its`); @@ -578,7 +577,7 @@ globalThis.birth = function(slave, {birthStorm = false} = {}) { r.push(App.UI.DOM.makeElement("span", `in the worst possible way`, "red")); r.push(`to`); slaveDead = 1; - } else if (cSection === 1) { + } else if (cSection) { r.push(`${He} was given`); r.push(App.UI.DOM.makeElement("span", `a cesarean section`, "orange")); r.push(`due to health concerns.`); @@ -614,7 +613,7 @@ globalThis.birth = function(slave, {birthStorm = false} = {}) { r.push(`${pregNumberName(numBeingBorn, 2)},`); } if (numBeingBorn > 0) { - r.push(`created by ${arrayToSentence(fathersReduced)}${(cSection === 1) ? ', entered the world' : ''}.`); + r.push(`created by ${arrayToSentence(fathersReduced)}${(cSection) ? ', entered the world' : ''}.`); } if (numStillborn > 0 && numBeingBorn > 0) { r.push(`An additional ${numStillborn}`); @@ -625,7 +624,7 @@ globalThis.birth = function(slave, {birthStorm = false} = {}) { } r.push(`unfortunately stillborn.`); } - if (cSection === 1 && slave.wombImplant === "restraint") { + if (cSection && slave.wombImplant === "restraint") { r.push(`The uterine support mesh built into ${his} womb was irreversibly damaged and had to be carefully extracted. Such an invasive surgery carried`); r.push(App.UI.DOM.makeElement("span", `major health complications.`, "red")); slave.wombImplant = "none"; @@ -641,7 +640,7 @@ globalThis.birth = function(slave, {birthStorm = false} = {}) { let r = []; let compoundCondition; /* ---- Postbirth reactions, body -------------------------------------------------------------------------------------------*/ - if (cSection !== 1) { // all this block only if no c'section used. + if (!cSection) { // all this block only if no c'section used. r = []; if (slave.broodmother > 0 || slave.womb.length > 0) { /* Now this block shown only for broodmothers or partial birth. They birth only ready children, so numBeingBorn is effective to see how many birthed this time.*/ if (diffSize > 1.5 && numBeingBorn >= 80) { // only show if belly lost at least 1/4 of original size. @@ -840,7 +839,7 @@ globalThis.birth = function(slave, {birthStorm = false} = {}) { } /* ------ Post birth reactions, mother experience ------------------ */ /* I think all this reactions should be showed only if no c'section used too. Setting it up for just in case: */ - if (cSection === 0 && slave.assignment !== "work in the dairy") { // if not desired, this check can be easily removed or deactivated with condition set to true. + if (!cSection && slave.assignment !== "work in the dairy") { // if not desired, this check can be easily removed or deactivated with condition set to true. p = document.createElement("p"); if (newMother) { App.Events.addNode( @@ -1152,7 +1151,7 @@ globalThis.birth = function(slave, {birthStorm = false} = {}) { } /* ----- Body/mother resume -------------------------*/ p = document.createElement("p"); - if (slave.assignment !== "work in the dairy" && cSection === 0) { + if (slave.assignment !== "work in the dairy" && !cSection) { /* && ${slave.broodmother} === 0 // removed - broodmother have sensations too */ r = []; r.push(`All in all,`); @@ -1885,7 +1884,7 @@ globalThis.birth = function(slave, {birthStorm = false} = {}) { slave.pregWeek = -4; } } - cSection = 0; + cSection = false; SetBellySize(slave); if (slave.birthsTat > -1) { slave.birthsTat++; @@ -4703,7 +4702,7 @@ globalThis.birth = function(slave, {birthStorm = false} = {}) { if (birthDamage > 5 || V.universalRulesCSec === 1) { if (V.universalRulesCSec === 1 || (slave.mpreg === 0 && slave.vagina < 0)) { - cSection = 1; + cSection = true; App.Medicine.Modification.addScar(slave, "belly", "c-section"); if (V.clinic !== 0) { r.push(`${slave.slaveName} is taken to ${V.clinicName} since ${he}`); @@ -4740,7 +4739,7 @@ globalThis.birth = function(slave, {birthStorm = false} = {}) { r.push(`${His} body is so sensitive that even difficult birth is an intensely pleasurable experience for ${him}.`); } if (birthDamage > 10) { - cSection = 1; + cSection = true; App.Medicine.Modification.addScar(slave, "belly", "c-section"); r.push(`After several hours of intense labor, ${he} is transferred to the surgery wing. Following an emergency c-section, ${he} is returned to the recovery wing to rest.`); } else { @@ -4752,7 +4751,7 @@ globalThis.birth = function(slave, {birthStorm = false} = {}) { } r.push(`${His} ${childrenAre} promptly taken and ${he} is left under observation to make sure ${he} recovers.`); } else { - cSection = 1; + cSection = true; App.Medicine.Modification.addScar(slave, "belly", "c-section"); r.push(`${He} is lead to the autosurgery, since ${he} is likely to face complications with childbirth. ${He} is stripped from ${his} clothes and set up on the operating table. ${He} is quickly sedated and subjected to a c-section in order to avoid potential problems. The surgery is quick, and ${he} is moved to a bed to recover. When ${he} awakes, ${his} ${children}`); if (slave.pregType > 1) { @@ -5409,14 +5408,14 @@ globalThis.birth = function(slave, {birthStorm = false} = {}) { const UH = (slave.geneticQuirks.uterineHypersensitivity === 2) ? `, convulsing with orgasms in the process` : ``; if (birthDamage > 5) { - cSection = 1; + cSection = true; if (V.clinic !== 0) { r.push(`${He} is carried to ${V.clinicName}, since ${he} is likely to face complications with childbirth. ${He} is stripped from ${his} clothes and set up in a comfortable hospital bed to relax until ${he} is ready. ${He} wiggles ${himself} into a comfortable spot and begins working on birthing ${his} ${babies}, fully aware of ${his} watching helpers.`); if (slave.geneticQuirks.uterineHypersensitivity === 2) { r.push(`${His} body is so sensitive that even difficult birth is an intensely pleasurable experience for ${him}.`); } if (birthDamage > 10) { - cSection = 1; + cSection = true; App.Medicine.Modification.addScar(slave, "belly", "c-section"); r.push(`After several hours of intense labor, ${he} is transferred to the surgery wing. Following an emergency c-section, ${he} is returned to the recovery wing to rest.`); } else { @@ -5428,7 +5427,7 @@ globalThis.birth = function(slave, {birthStorm = false} = {}) { } r.push(`${His} ${childrenAre} promptly taken and ${he} is left under observation to make sure ${he} recovers.`); } else { - cSection = 1; + cSection = true; App.Medicine.Modification.addScar(slave, "belly", "c-section"); r.push(`${He} is carried to the autosurgery, since ${he} is likely to face complications with childbirth. ${He} is stripped from ${his} clothes and set up on the operating table. ${He} is quickly sedated and subjected to a c-section in order to avoid potential problems. The surgery is quick and ${he} is moved to a bed to recover. When ${he} awakes, ${his} ${slave.pregType > 1 ? `children have` : `child has`} already been taking away.`); }