diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index 96dbb389f3c560f461cfd0fac383d81fdcbabe6c..84449b4b5bb56b8534d843a99e6cbe34f32e36f1 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -500,6 +500,7 @@ App.Data.resetOnNGPlus = { }, burstIDs: [], birthIDs: [], + induceIDs: [], /** @type {FC.SlaveStateOrZero} */ activeSlave: 0, activeChild: 0, diff --git a/src/endWeek/saDrugs.js b/src/endWeek/saDrugs.js index d85e48f360d7bcb4f729e789ba6193d255fb579f..9417ebb0eaf3b480c6036cc33fff08574b8b9696 100644 --- a/src/endWeek/saDrugs.js +++ b/src/endWeek/saDrugs.js @@ -1627,7 +1627,7 @@ App.SlaveAssignment.drugs = (function() { if (WombBirthReady(slave, slave.pregData.normalBirth * 1.5) > 0) { healthDamage(slave, 20); startLabor(slave); - slave.induce = 1; + induce(slave); V.birthee = 1; r += ` ${He} has been ready to give birth for some time now. Suppressing birth for so long <span class="red">greatly affects ${his} health.</span> ${He} may <span class="red">have trouble</span> giving birth to ${his} oversized child`; if (slave.pregType > 1) { diff --git a/src/endWeek/saPregnancy.js b/src/endWeek/saPregnancy.js index 27a9ec37ebcbca22129b9e8d514611966efcce1b..347cf6e772bdadfdbeda5388caad5fa7c96f990e 100644 --- a/src/endWeek/saPregnancy.js +++ b/src/endWeek/saPregnancy.js @@ -500,7 +500,7 @@ App.SlaveAssignment.pregnancy = (function() { } break; } - if (slave.induce === 1) { + if (isInduced(slave)) { r.push(`${His} child${slave.pregType > 1 ? "ren visibly shift" : "visibly shifts"} within ${his} womb as ${slave.pregType > 1 ? "they prepare" : "it prepares"} to enter the world. ${He} experiences several`); if (slave.geneticQuirks.uterineHypersensitivity === 2) { r.push(`unexpected orgasms,`); diff --git a/src/events/scheduled/burst/burst.js b/src/events/scheduled/burst/burst.js index 66bfe9036c2d3cbfdcc14e047ddea71662e08969..1a9e422e3fc2c51e6cd4ddaf32b62de2286e83ab 100644 --- a/src/events/scheduled/burst/burst.js +++ b/src/events/scheduled/burst/burst.js @@ -1,7 +1,7 @@ globalThis.allBursts = function() { const el = new DocumentFragment(); for (const slave of V.slaves) { - if (slave.burst === 1) { + if (burstCheck(slave)) { if (slave.womb.length > 0) { el.append(birth(slave)); } else { diff --git a/src/interaction/slaveInteract.js b/src/interaction/slaveInteract.js index a7cfe1d25350e8d8c3d53cc89023418af3386bbc..2e9b887b5486f5d8b0aa404d0316fc0883f91fe9 100644 --- a/src/interaction/slaveInteract.js +++ b/src/interaction/slaveInteract.js @@ -1564,7 +1564,7 @@ App.UI.SlaveInteract.fertility = function(slave) { App.UI.SlaveInteract.refreshAll(slave); }, )); - } else if (slave.induce === 1) { + } else if (isInduced(slave)) { note += `Hormones are being slipped into ${his} food; ${he} will give birth suddenly and rapidly this week`; } else if ( slave.preg > slave.pregData.normalBirth - 2 && @@ -1576,8 +1576,7 @@ App.UI.SlaveInteract.fertility = function(slave) { `Induce labor`, () => { startLabor(slave); - slave.induce = 1; - V.birthee = 1; + induce(slave); App.UI.SlaveInteract.refreshAll(slave); }, )); diff --git a/src/js/birth/birth.js b/src/js/birth/birth.js index 196dd9511785c153c6a247f3445304f1472c9823..c0e645c43c404c857184e398a7df101ce0849a52 100644 --- a/src/js/birth/birth.js +++ b/src/js/birth/birth.js @@ -80,7 +80,7 @@ globalThis.birth = function(slave, {birthStorm = false, cSection = false} = {}) function titleText() { const title = document.createElement("div"); - if (slave.burst) { + if (burstCheck(slave)) { App.UI.DOM.appendNewElement("span", title, `Alert! `, ["red", "bold"]); title.append(`Burst report: `); } else { @@ -94,7 +94,7 @@ globalThis.birth = function(slave, {birthStorm = false, cSection = false} = {}) * early birth calcs */ function suddenBirthCheck() { - if (slave.induce === 1) { + if (isInduced(slave)) { suddenBirth += 20; } if (!canMove(slave)) { @@ -328,7 +328,7 @@ globalThis.birth = function(slave, {birthStorm = false, cSection = false} = {}) slave.trust -= 5; slave.devotion -= 5; } - } else if (slave.burst === 1) { + } else if (burstCheck(slave)) { r.push(`${slave.slaveName}'s straining womb gave out and burst, taking ${his} life.`); } else if (slave.fuckdoll === 0) { if (slave.broodmother === 0 || slave.broodmotherCountDown === 1) { @@ -530,7 +530,7 @@ globalThis.birth = function(slave, {birthStorm = false, cSection = false} = {}) if (slave.assignment === "work in the dairy" && V.dairyPregSetting > 0) { r.push(`As a human cow, ${he}`); - if (slave.burst === 1) { + if (burstCheck(slave)) { r.push(App.UI.DOM.makeElement("span", `gave birth`, "orange")); r.push(App.UI.DOM.makeElement("span", `in the worst possible way`, "red")); slaveDead = 1; @@ -613,7 +613,7 @@ globalThis.birth = function(slave, {birthStorm = false, cSection = false} = {}) } const fathersReduced = removeDuplicates(fathers); - if (slave.burst === 1) { + if (burstCheck(slave)) { r.push(`${He}`); r.push(App.UI.DOM.makeElement("span", `gave birth`, "orange")); r.push(App.UI.DOM.makeElement("span", `in the worst possible way`, "red")); @@ -1701,7 +1701,7 @@ globalThis.birth = function(slave, {birthStorm = false, cSection = false} = {}) const el = new DocumentFragment(); const r = []; r.push(`The ${childrenAre} sent to one of ${V.arcologies[0].name}'s future minded schools, to be administered fertility and virility treatments as well as be brought up to take pride in reproduction.`); - if (slave.burst) { + if (burstCheck(slave)) { r.push(`Hopefully they will be trained there to not suffer the same fate.`); } else if (slave.fetish === "mindbroken" || slave.fuckdoll > 0) { r.push(`${slave.slaveName} has few thoughts about the matter.`); @@ -1821,7 +1821,7 @@ globalThis.birth = function(slave, {birthStorm = false, cSection = false} = {}) const r = []; const el = new DocumentFragment(); r.push(`The ${childrenAre} handed off to be raised by their father, the Futanari Sisters.`); - if (slave.burst) { + if (burstCheck(slave)) { r.push(`You recommend they take it easy for a while before any more burst into kids.`); } else if (slave.fetish === "mindbroken" || slave.fuckdoll > 0) { r.push(`${slave.slaveName} has few thoughts about the matter.`); @@ -6879,7 +6879,7 @@ globalThis.birth = function(slave, {birthStorm = false, cSection = false} = {}) if (slave.fetish === "mindbroken") { clothesSeed += 20; } - if (slave.induce === 1) { + if (isInduced(slave)) { clothesSeed += 90; } diff --git a/src/js/slaveSummaryWidgets.js b/src/js/slaveSummaryWidgets.js index 8469e52d0b93db064628fbde85acca2f28094766..21a0834732bb822b227b2965885d841ff0fb8a56 100644 --- a/src/js/slaveSummaryWidgets.js +++ b/src/js/slaveSummaryWidgets.js @@ -222,7 +222,7 @@ App.UI.SlaveSummaryRenderers = function() { } else if (slave.pregKnown === 1) { makeSpan(c, `${slave.pregWeek} wks preg`, styles); } - if (slave.induce === 1) { + if (isInduced(slave)) { makeSpan(c, "Early Labor", ["orange", "strong"]); } if (slave.pubertyXY === 0 && slave.balls > 0) { @@ -578,7 +578,7 @@ App.UI.SlaveSummaryRenderers = function() { makeSpan(c, "(Overdue.)"); } } - if (slave.induce === 1) { + if (isInduced(slave)) { makeSpan(c, "Showing signs of early labor.", "orange"); } if (slave.pubertyXY === 0 && slave.balls > 0) { diff --git a/src/js/statsChecker/burstChecker.js b/src/js/statsChecker/burstChecker.js new file mode 100644 index 0000000000000000000000000000000000000000..d023e3e2660bdb5068aa65c1497cb48b29e2de26 --- /dev/null +++ b/src/js/statsChecker/burstChecker.js @@ -0,0 +1,18 @@ +globalThis.burstCheck = function(slave) { + return (slave.burst); + // return V.burstIDs.includes(slave.ID); +}; + +globalThis.burst = function(slave) { + slave.burst = 1; + V.burstee = 1; + /* + if (typeof slave === "number") { + V.burstIDs.push(slave); + } else { + V.burstIDs.push(slave.ID); + } + */ +}; + + diff --git a/src/js/statsChecker/pregChecker.js b/src/js/statsChecker/pregChecker.js index 70b5e83a125a0dc4fd9e29199ddc5b1184460b5f..915acbbfd83cbd9fa44bef8702c0e330c0c1e423 100644 --- a/src/js/statsChecker/pregChecker.js +++ b/src/js/statsChecker/pregChecker.js @@ -5,7 +5,7 @@ globalThis.isInLabor = function(slave) { globalThis.startLabor = function(slave) { slave.labor = 1; - + V.birthee = 1; /* if (typeof slave === "number") { V.birthIDs.push(slave); @@ -14,3 +14,20 @@ globalThis.startLabor = function(slave) { } */ }; + +globalThis.isInduced = function(slave) { + return (slave.induce); + // return V.induceIDs.includes(slave.ID); +}; + +globalThis.induce = function(slave) { + slave.induce = 1; + V.birthee = 1; + /* + if (typeof slave === "number") { + V.induceIDs.push(slave); + } else { + V.induceIDs.push(slave.ID); + } + */ +}; diff --git a/src/uncategorized/saLiveWithHG.tw b/src/uncategorized/saLiveWithHG.tw index 73a0fb2a9a0bf599bbf1872874908f1e8aa9567c..e8f87035e2b3507da9a04675dc459621f339f207 100644 --- a/src/uncategorized/saLiveWithHG.tw +++ b/src/uncategorized/saLiveWithHG.tw @@ -367,7 +367,7 @@ <<elseif $arcologies[0].FSRepopulationFocusPregPolicy == 0 && $arcologies[0].FSRepopulationFocus == "unset" && $HGSuiteDrugs == 1>> <<if $slaves[$i].preg > $slaves[$i].pregData.normalBirth-2 && $slaves[$i].preg > $slaves[$i].pregData.minLiveBirth && $slaves[$i].broodmother === 0 && !isInLabor($slaves[$i])>> _S.HeadGirl.slaveName has no interest in a slut stuffed full of unwanted spawn, so _he2 promptly doses slaves[$i].slaveName with labor inducing agents to get $him back in fucking shape. - <<set $slaves[$i].induce = 1>> + <<run induce($slaves[$i])>> <<run startLabor($slaves[$i])>> <<else>> _S.HeadGirl.slaveName promptly aborts the child growing in $slaves[$i].slaveName since _he2 prefers _his2 <<= $girl>>s not harboring someone else's child or loaded down with _his2 own unwanted spawn. diff --git a/src/uncategorized/saLongTermEffects.tw b/src/uncategorized/saLongTermEffects.tw index 9ca11bbb28b3d36da7dbe5bab4f7bbcf5ec670d2..f5c27a6ae13105a0fd9d1a2c84f73f2d74cf89d7 100644 --- a/src/uncategorized/saLongTermEffects.tw +++ b/src/uncategorized/saLongTermEffects.tw @@ -2927,7 +2927,7 @@ <<if $slaves[$i].bellyFluid >= 10000 && $seeExtreme == 1 && $slaves[$i].health.health <= -100 && $slaves[$i].geneMods.rapidCellGrowth != 1>> $He feels an @@.red;unusual intense pain@@ in $his bloated belly. - <<set $slaves[$i].burst = 1>> + <<run burst($slaves[$i])>> <</if>> <</if>> /* PREGMOD: CLOSES INFLATION OVERRIDE */ @@ -6442,7 +6442,7 @@ <</if>> <<set _burstChance = Math.round(_burstChance)>> <<if _burstChance > random(0,100)>> - <<set $slaves[$i].burst = 1>> + <<run burst($slaves[$i])>> <<else>> Constant @@.red;<<if $slaves[$i].geneticQuirks.uterineHypersensitivity == 2>>painful orgasms<<else>>sharp pains<</if>>@@ from $his womb strongly suggest @@.red;$his body is beginning to break.@@ <</if>> @@ -6455,7 +6455,7 @@ <<run endWeekHealthDamage($slaves[$i])>> -<<if $slaves[$i].burst == 1>> +<<if burstCheck($slaves[$i])>> <<set $burstee = 1>> <<else>> <<if $slaves[$i].health.health <= -90 && $slaves[$i].assignment != "get treatment in the clinic">>