diff --git a/src/js/useSlave.JS b/src/js/useSlave.JS index 373cbfe648de480e75b505b8a9b2cfb7ba8897f9..095dfe3a38d023a9addc18013c1bd618617e1f53 100644 --- a/src/js/useSlave.JS +++ b/src/js/useSlave.JS @@ -361,6 +361,7 @@ window.useSlaveDisplay = function(slave) { } generateRow(sexOptions); + //TODO: show only if object is not empty; el.appendChild(document.createTextNode(` Fill ${his} mouth with: `)); generateRow(fillFaceOptions); el.appendChild(document.createTextNode(` Fill ${his} ass with: `)); @@ -431,3 +432,152 @@ window.useSlaveDisplay = function(slave) { }; // TODO: splice through return trash to console if neeeded? + +function SlaveInteractImpreg(slave) { + const + { + // eslint-disable-next-line no-unused-vars + he, him, his, hers, himself, boy, He, His + } = getPronouns(slave); + + let bloating = document.createElement('span'); + if ( slave.inflation > 0) { + let intro = document.createTextNode("Required Bloating"); + intro.textDecoration = "underline"; + bloating.append(intro); + bloating.append(":"); + + let requirement; + if ( slave.inflation == 3) { + requirment = `${He} is required to keep 2 gallons of ${slave.inflationType} in ${him} at all times`; + } else if ( slave.inflation == 2) { + requirment = `${He} is required to keep 4 liters of ${slave.inflationType} in ${him} at all times`; + } else if ( slave.inflation == 1) { + requirment = `${He} is required to keep 2 liters of ${slave.inflationType} in ${him} at all times`; + } + + + requirement = document.createTextNode(requirement); + requirement.fontWeight = bold; + requirement.id = "inflate"; + bloating.append(requirement); + bloating.append("."); + + let link; + + + if ( slave.inflationMethod == 3) { + link = App.UI.DOM.link( + `Let ${him} deflate`, + () => { + jQuery('#FResultTooltip').empty().append( + slave.inflation = 0, + slave.inflationType = "none", + slave.inflationMethod = 0, + slave.cumSource = 0, + slave.milkSource = 0, + SetBellySize(slave), + SlaveInteractImpreg(), + SlaveInteractFertility() + ); + }, + [] + ) + } else { + link = App.UI.DOM.link( + `Let ${him} deflate`, + () => { + slave.inflation = 0, + slave.inflationType = "none", + slave.inflationMethod = 0, + SetBellySize(slave), + SlaveInteractImpreg(), + SlaveInteractFertility() + jQuery('#FResultTooltip').empty().append( + ); + }, + [] + ) + } + } + bloating.append(link); + // make sure it updates itself after run + return ; + return App.UI.replace('#bloating', `<<goto "${sexOption.goto}">>`); +} + + +function SlaveInteractFertility 90 { + <<replace #fertilityblock>> + if ( slave.ovaries == 1 || slave.mpreg == 1 || slave.preg > 0) { + if ( (slave.preg < -1)) { + //V.He is sterile// + } else if ( (slave.pubertyXX == 0) && slave.preg < 1) { + //V.He is not yet fertile// + } else if ( slave.ovaryAge >= 47 && slave.preg < 1) { + //V.He is too old to become pregnant// + if ( slave.preg == -1) { + slave.preg = 0; + SetBellySize(slave); + } + } else if ( slave.broodmotherOnHold == 1) { + //V.His pregnancy implant is turned offif ( slave.broodmotherCountDown > 0) {; V.he is expected to be completely emptied of V.his remaining brood in slave.broodmotherCountDown weekif ( slave.broodmotherCountDown > 1) {s}} else {.}// + [[Turn on implant|Slave Interact][slave.broodmotherOnHold = 0, slave.broodmotherCountDown = 0]] + } else if ( (slave.preg >= -1)) { + Contraception: <span id="fertility"><strong>if ( slave.preg == -1) {<<print "using contraceptives">>} else if ( slave.pregWeek < 0) {<<print "postpartum">>} else if ( slave.preg == 0) {<<print "fertile">>} else if ( slave.preg < 4) {<<print "may be pregnant">>} else {<<print slave.preg>><<print " weeks pregnant">>}</strong></span>. + if ( (slave.preg > 0 && V.pregnancyMonitoringUpgrade == 1)) { + [[Inspect pregnancy|Analyze Pregnancy]] | + } + if ( (slave.preg == 0)) { + <<link "Use contraceptives">>slave.preg = -1;<<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> + } else if ( (slave.preg == -1)) { + <<link "Let V.him get pregnant">>slave.preg = 0;<<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> + } else if ( slave.induce == 1) { + //Hormones are being slipped into V.his food; V.he will give birth suddenly and rapidly this week// + } else if ( (slave.preg > slave.pregData.normalBirth-2 && slave.preg > slave.pregData.minLiveBirth) && (slave.broodmother == 0) && (slave.labor == 0)) { + [[Induce labor|Slave Interact][slave.labor = 1,slave.induce = 1,V.birthee = 1]] + | [["Give " + V.him + " a cesarean section"|csec]] + } else if ( (slave.broodmother > 0)) { + if ( slave.broodmotherOnHold != 1) { + [[Turn off implant|Slave Interact][slave.broodmotherOnHold = 1, slave.broodmotherCountDown = 38-WombMinPreg(slave)]] + } + if ( (slave.broodmotherOnHold != 1) && (slave.preg >= 36)) { + | + } + if ( (slave.preg > 37)) { + | [[Induce mass childbirth|BirthStorm]] + } + } else if ( (slave.preg > slave.pregData.minLiveBirth)) { + [["Give " + V.him + " a cesarean section"|csec]] + } else if ( (slave.preg > 0) && slave.breedingMark == 1 && V.propOutcome == 1 && V.arcologies[0].FSRestart != "unset" && V.eugenicsFullControl != 1 && (slave.pregSource == -1 || slave.pregSource == -6)) { + //You are forbidden from aborting an Elite child// + } else if ( (slave.preg > 0)) { + [["Abort " + V.his + " pregnancy"|Abort]] + } + } + } + if ( (slave.pregKnown == 1) && (V.pregSpeedControl == 1) && (slave.breedingMark != 1 || V.propOutcome == 0 || V.eugenicsFullControl == 1 || V.arcologies[0].FSRestart == "unset") && (slave.indentureRestrictions < 1) && (slave.broodmother == 0) && V.seePreg != 0) { + <br> + __Pregnancy control__: if ( slave.pregControl == "labor suppressors") {Labor is suppressed} else if ( slave.pregControl == "slow gestation") {Slowed gestation speed} else if ( slave.pregControl == "speed up") {Faster gestation speed, staffed clinic recommended} else {Normal gestation and birth}. + if ( (slave.preg >= slave.pregData.minLiveBirth)) { + <br> + if ( slave.pregControl == "labor suppressors") { + <<link "Normal Birth">>slave.pregControl = "none";<<SlaveInteractFertility>><</link>> + } else { + <<link "Suppress Labor">>slave.pregControl = "labor suppressors";<<SlaveInteractFertility>><</link>> + } + } else if ( (slave.preg < slave.pregData.normalBirth)) { + <br> + if ( slave.pregControl != "none") { + <<link "Normal Gestation">>slave.pregControl = "none";<<SlaveInteractFertility>><</link>> | + } + if ( slave.pregControl != "slow Gestation") { + <<link "Slow Gestation">>slave.pregControl = "slow gestation";<<SlaveInteractFertility>><</link>> | + } + if ( slave.pregControl != "speed up") { + <<link "Fast Gestation">>slave.pregControl = "speed up";<<SlaveInteractFertility>><</link>> + } + } + } + <</replace>> +} \ No newline at end of file diff --git a/src/utility/miscWidgets.tw b/src/utility/miscWidgets.tw index d7c20a01b2f665af54200f3856f8e79253bd9e39..8d5149e217ed22337141adf829d9db8509622e13 100644 --- a/src/utility/miscWidgets.tw +++ b/src/utility/miscWidgets.tw @@ -14,101 +14,7 @@ Allows for dynamic updating of the next button in the storyCaption (left side-ba Call as <<SlaveInteractImpreg>> %/ <<widget "SlaveInteractImpreg">> -<<replace #impreg>> - <<if $activeSlave.fuckdoll == 0>> - <<if canGetPregnant($activeSlave) && ($activeSlave.geneticQuirks.superfetation != 2 || $geneticMappingUpgrade != 0) && ($activeSlave.fuckdoll == 0) && $seePreg != 0>> - <<if canImpreg($activeSlave, $PC)>> - | <<link "Impregnate $him yourself">><<replace "#miniscene">><<include "FPCImpreg">><br> <</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - <</if>> - <<if canImpreg($activeSlave, $activeSlave)>> - | <<link "Use $his own seed to impregnate $him">><<replace "#miniscene">><<include "FSlaveSelfImpreg">><br> <</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - <</if>> - | [["Use another slave to impregnate " + $him|FSlaveImpreg]] - <</if>> - <<if $activeSlave.assignment != "work in the dairy" && $activeSlave.assignment != "be confined in the arcade" && $activeSlave.assignment != "be confined in the cellblock">> - <<if $enema == 1>> - <<if ($activeSlave.inflation < 3 && $activeSlave.pregKnown == 0 && $activeSlave.bellyImplant < 1500) || ($activeSlave.inflation < 1)>> - <<if $activeSlave.inflationType == "water" || $activeSlave.inflationType == "none">> - | <<link "Fill $his ass with water">><<set $activeSlave.inflationType = "water">><<set $activeSlave.inflationMethod = 2>><<replace "#miniscene">><<include "FillUpButt">><br><</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - <</if>> - <<if $medicalEnema == 1>> - <<if $activeSlave.inflationType == "aphrodisiac" || $activeSlave.inflationType == "none">> - | <<link "Fill $his ass with aphrodisiacs">><<set $activeSlave.inflationType = "aphrodisiac">><<set $activeSlave.inflationMethod = 2>><<replace "#miniscene">><<include "FillUpButt">><br><</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - <</if>> - <<if $activeSlave.inflationType == "curative" || $activeSlave.inflationType == "none">> - | <<link "Fill $his ass with curatives">><<set $activeSlave.inflationType = "curative">><<set $activeSlave.inflationMethod = 2>><<replace "#miniscene">><<include "FillUpButt">><br><</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - <</if>> - <<if $activeSlave.inflationType == "tightener" || $activeSlave.inflationType == "none">> - | <<link "Fill $his ass with rectal tighteners">><<set $activeSlave.inflationType = "tightener">><<set $activeSlave.inflationMethod = 2>><<replace "#miniscene">><<include "FillUpButt">><br><</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - <</if>> - <</if>> - <</if>> /* inflation < 3 */ - <</if>> /* enema == 1 */ - <<if $dairyPiping == 1>> - <<if ($milkPipeline > 88 && $milkPipeline != 0) || $arcologies[0].FSPastoralistLaw == 1>> - <<if ($activeSlave.inflation < 3 && $activeSlave.pregKnown == 0 && $activeSlave.bellyImplant < 1500) || ($activeSlave.inflation < 1)>> - <<if $activeSlave.inflationType == "milk" || $activeSlave.inflationType == "none">> - | <<link "Fill $his ass with milk">><<set $activeSlave.inflationType = "milk">><<set $activeSlave.inflationMethod = 2>><<replace "#miniscene">><<include "FillUpButt">><br><</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - | <<link "Force-feed $him milk">><<set $activeSlave.inflationType = "milk">><<set $activeSlave.inflationMethod = 1>><<replace "#miniscene">><<include "FillUpFace">><br><</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - <</if>> - <</if>> - <<else>> - | //$dairyNameCaps is not producing enough milk to pump through the pipes// - <</if>> - <<if ($cumPipeline > 88 && $cumPipeline != 0) || $arcologies[0].FSPastoralistLaw == 1>> - <<if ($activeSlave.inflation < 3 && $activeSlave.pregKnown == 0 && $activeSlave.bellyImplant < 1500) || ($activeSlave.inflation < 1)>> - <<if $activeSlave.inflationType == "cum" || $activeSlave.inflationType == "none">> - | <<link "Fill $his ass with cum">><<set $activeSlave.inflationType = "cum">><<set $activeSlave.inflationMethod = 2>><<replace "#miniscene">><<include "FillUpButt">><br><</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - | <<link "Force-feed $him cum">><<set $activeSlave.inflationType = "cum">><<set $activeSlave.inflationMethod = 1>><<replace "#miniscene">><<include "FillUpFace">><br><</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - <</if>> - <</if>> - <<else>> - | //$dairyNameCaps is not producing enough cum to pump through the pipes// - <</if>> - <</if>> /* dairyPiping == 1 */ - <<if $wcPiping == 1>> - <<if ($activeSlave.inflation < 3 && $activeSlave.pregKnown == 0 && $activeSlave.bellyImplant < 1500) || ($activeSlave.inflation < 1)>> - <<if $activeSlave.inflationType == "urine" || $activeSlave.inflationType == "none">> - | <<link "Fill $his ass with urine">><<set $activeSlave.inflationType = "urine">><<set $activeSlave.inflationMethod = 2>><<replace "#miniscene">><<include "FillUpButt">><br><</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - <</if>> - <</if>> - <</if>> /* wcPiping == 1 */ - <</if>> /* assigned to dairy or arcade */ - <<if $activeSlave.inflation == 0 && $activeSlave.bellyImplant < 1500>> - <<if $activeSlave.assignment != "work in the dairy" && $activeSlave.assignment != "be confined in the arcade" && $activeSlave.assignment != "be confined in the cellblock">> - | [["Use another slave to force-feed " + $him|SlaveOnSlaveFeedingWorkAround]] - <<if $buckets == 1>> - | <<link "Make $him consume two liters of slave food">><<set $activeSlave.inflationType = "food">><<set $activeSlave.inflationMethod = 1>><<set $activeSlave.inflation = 1>><<replace "#miniscene">><<include "forceFeeding">><br><</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - <<if $activeSlave.pregKnown == 0>> - | <<link "Force $him to consume a gallon of slave food">><<set $activeSlave.inflationType = "food">><<set $activeSlave.inflationMethod = 1>><<set $activeSlave.inflation = 2>><<replace "#miniscene">><<include "forceFeeding">><br><</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - | <<link "Force two gallons of slave food into $him">><<set $activeSlave.inflationType = "food">><<set $activeSlave.inflationMethod = 1>><<set $activeSlave.inflation = 3>><<replace "#miniscene">><<include "forceFeeding">><br><</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - <</if>> - <</if>> - <</if>> - <</if>> - <<else>> - <<if (canGetPregnant($activeSlave)) && ($activeSlave.geneticQuirks.superfetation != 2 || $geneticMappingUpgrade != 0) && $seePreg != 0>> - <<if canImpreg($activeSlave, $PC)>> - | <<link "Put a baby in $him">><<replace "#miniscene">><<FFuckdollImpreg>><br><</replace>><</link>> - <</if>> - <</if>> - <</if>> -<</replace>> -<<replace #bloating>> - <<if $activeSlave.inflation > 0>> - <br> - __Required Bloating__: <strong><span id="inflate"><<if $activeSlave.inflation == 3>><<print "$He is required to keep 2 gallons of $activeSlave.inflationType in $him at all times">><<elseif $activeSlave.inflation == 2>><<print "$He is required to keep 4 liters of $activeSlave.inflationType in $him at all times">><<elseif $activeSlave.inflation == 1>><<print "$He is required to keep 2 liters of $activeSlave.inflationType in $him at all times">><</if>></span></strong>. - <<if $activeSlave.inflationMethod == 3>> - <<link "Let $him deflate">><<set $activeSlave.inflation = 0,$activeSlave.inflationType = "none",$activeSlave.inflationMethod = 0,$activeSlave.cumSource = 0,$activeSlave.milkSource = 0, SetBellySize($activeSlave)>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - <<elseif $activeSlave.inflationType == "milk">> - <<link "Let $him deflate">><<set $activeSlave.inflation = 0,$activeSlave.inflationType = "none",$activeSlave.inflationMethod = 0, SetBellySize($activeSlave)>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - <<elseif $activeSlave.inflationType == "cum">> - <<link "Let $him deflate">><<set $activeSlave.inflation = 0,$activeSlave.inflationType = "none",$activeSlave.inflationMethod = 0, SetBellySize($activeSlave)>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - <<else>> - <<link "Let $him deflate">><<set $activeSlave.inflation = 0,$activeSlave.inflationType = "none",$activeSlave.inflationMethod = 0, SetBellySize($activeSlave)>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - <</if>> - <</if>> -<</replace>> + <</widget>> /% @@ -310,78 +216,7 @@ Call as <<SlaveInteractDrugs>> Call as <<SlaveInteractFertility>> %/ <<widget "SlaveInteractFertility">> -<<replace #fertilityblock>> -<<if $activeSlave.ovaries == 1 || $activeSlave.mpreg == 1 || $activeSlave.preg > 0>> - <<if ($activeSlave.preg < -1)>> - //$He is sterile// - <<elseif ($activeSlave.pubertyXX == 0) && $activeSlave.preg < 1>> - //$He is not yet fertile// - <<elseif $activeSlave.ovaryAge >= 47 && $activeSlave.preg < 1>> - //$He is too old to become pregnant// - <<if $activeSlave.preg == -1>> - <<set $activeSlave.preg = 0>> - <<run SetBellySize($activeSlave)>> - <</if>> - <<elseif $activeSlave.broodmotherOnHold == 1>> - //$His pregnancy implant is turned off<<if $activeSlave.broodmotherCountDown > 0>>; $he is expected to be completely emptied of $his remaining brood in $activeSlave.broodmotherCountDown week<<if $activeSlave.broodmotherCountDown > 1>>s<</if>><<else>>.<</if>>// - [[Turn on implant|Slave Interact][$activeSlave.broodmotherOnHold = 0, $activeSlave.broodmotherCountDown = 0]] - <<elseif ($activeSlave.preg >= -1)>> - Contraception: <span id="fertility"><strong><<if $activeSlave.preg == -1>><<print "using contraceptives">><<elseif $activeSlave.pregWeek < 0>><<print "postpartum">><<elseif $activeSlave.preg == 0>><<print "fertile">><<elseif $activeSlave.preg < 4>><<print "may be pregnant">><<else>><<print $activeSlave.preg>><<print " weeks pregnant">><</if>></strong></span>. - <<if ($activeSlave.preg > 0 && $pregnancyMonitoringUpgrade == 1)>> - [[Inspect pregnancy|Analyze Pregnancy]] | - <</if>> - <<if ($activeSlave.preg == 0)>> - <<link "Use contraceptives">><<set $activeSlave.preg = -1>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - <<elseif ($activeSlave.preg == -1)>> - <<link "Let $him get pregnant">><<set $activeSlave.preg = 0>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>> - <<elseif $activeSlave.induce == 1>> - //Hormones are being slipped into $his food; $he will give birth suddenly and rapidly this week// - <<elseif ($activeSlave.preg > $activeSlave.pregData.normalBirth-2 && $activeSlave.preg > $activeSlave.pregData.minLiveBirth) && ($activeSlave.broodmother == 0) && ($activeSlave.labor == 0)>> - [[Induce labor|Slave Interact][$activeSlave.labor = 1,$activeSlave.induce = 1,$birthee = 1]] - | [["Give " + $him + " a cesarean section"|csec]] - <<elseif ($activeSlave.broodmother > 0)>> - <<if $activeSlave.broodmotherOnHold != 1>> - [[Turn off implant|Slave Interact][$activeSlave.broodmotherOnHold = 1, $activeSlave.broodmotherCountDown = 38-WombMinPreg($activeSlave)]] - <</if>> - <<if ($activeSlave.broodmotherOnHold != 1) && ($activeSlave.preg >= 36)>> - | - <</if>> - <<if ($activeSlave.preg > 37)>> - | [[Induce mass childbirth|BirthStorm]] - <</if>> - <<elseif ($activeSlave.preg > $activeSlave.pregData.minLiveBirth)>> - [["Give " + $him + " a cesarean section"|csec]] - <<elseif ($activeSlave.preg > 0) && $activeSlave.breedingMark == 1 && $propOutcome == 1 && $arcologies[0].FSRestart != "unset" && $eugenicsFullControl != 1 && ($activeSlave.pregSource == -1 || $activeSlave.pregSource == -6)>> - //You are forbidden from aborting an Elite child// - <<elseif ($activeSlave.preg > 0)>> - [["Abort " + $his + " pregnancy"|Abort]] - <</if>> - <</if>> -<</if>> -<<if ($activeSlave.pregKnown == 1) && ($pregSpeedControl == 1) && ($activeSlave.breedingMark != 1 || $propOutcome == 0 || $eugenicsFullControl == 1 || $arcologies[0].FSRestart == "unset") && ($activeSlave.indentureRestrictions < 1) && ($activeSlave.broodmother == 0) && $seePreg != 0>> - <br> - __Pregnancy control__: <<if $activeSlave.pregControl == "labor suppressors">>Labor is suppressed<<elseif $activeSlave.pregControl == "slow gestation">>Slowed gestation speed<<elseif $activeSlave.pregControl == "speed up">>Faster gestation speed, staffed clinic recommended<<else>>Normal gestation and birth<</if>>. - <<if ($activeSlave.preg >= $activeSlave.pregData.minLiveBirth)>> - <br> - <<if $activeSlave.pregControl == "labor suppressors">> - <<link "Normal Birth">><<set $activeSlave.pregControl = "none">><<SlaveInteractFertility>><</link>> - <<else>> - <<link "Suppress Labor">><<set $activeSlave.pregControl = "labor suppressors">><<SlaveInteractFertility>><</link>> - <</if>> - <<elseif ($activeSlave.preg < $activeSlave.pregData.normalBirth)>> - <br> - <<if $activeSlave.pregControl != "none">> - <<link "Normal Gestation">><<set $activeSlave.pregControl = "none">><<SlaveInteractFertility>><</link>> | - <</if>> - <<if $activeSlave.pregControl != "slow Gestation">> - <<link "Slow Gestation">><<set $activeSlave.pregControl = "slow gestation">><<SlaveInteractFertility>><</link>> | - <</if>> - <<if $activeSlave.pregControl != "speed up">> - <<link "Fast Gestation">><<set $activeSlave.pregControl = "speed up">><<SlaveInteractFertility>><</link>> - <</if>> - <</if>> -<</if>> -<</replace>> + <</widget>> /% Call as <<SlaveInteractSexOption>>