diff --git a/devNotes/VersionChangeLog-Premod+LoliMod.txt b/devNotes/VersionChangeLog-Premod+LoliMod.txt index 083ce9b0887a13b186012d073234648397c32a75..04b8beaa85ddfb4787822845350a3dfc299442ab 100644 --- a/devNotes/VersionChangeLog-Premod+LoliMod.txt +++ b/devNotes/VersionChangeLog-Premod+LoliMod.txt @@ -7,6 +7,7 @@ 364 -sidebar notification when you can start a new FS -pregmodfan's new pregnancy tracking system + -fixes to players being unable to manage HG, BG, rec 2/21/18 diff --git a/devNotes/twine JS b/devNotes/twine JS index fed40467405f42a3e40233bf7b797b3d8f50649c..03063268906a6de0a79731222eb64db1489b1027 100644 --- a/devNotes/twine JS +++ b/devNotes/twine JS @@ -6817,6 +6817,284 @@ window.slimPass = function(slave) { return slimPass; } +/*:: wombJS [script]*/ + +/* +This is womb processor/simulator script. It's take care about calculation of belly sizes based on individual foetus sizes, +with full support of broodmothers implant random turning on and off possibility. Also this can be expanded to store more parents data in each individual fetus in future. +Design limitations: +- Mother can't gestate children with different speeds at same time. All speed changes apply to all fetuses. +- Sizes of inividual fetuses updated only on call of WombGetVolume - not every time as called WombProgress. This is for better overail code speed. +- For broodmothers we need actual "new ova release" code now. But it's possible to control how many children will be added each time, and so - how much children is ready to birth each time. + +Usage from sugarcube code (samples): + +WombInit($slave) - before first pregnancy, at slave creation, of as backward compatibility update. + +WombImpregnate($slave, $fetus_count, $fatherID, $initial_age) - should be added after normal impregnation code, with already calcualted fetus count. ID of father - can be used in future for prcess children from different fathers in one pregnancy. Initial age normally 1 (as .preg normally set to 1), but can be raised if needed. Also should be called at time as broodmother implant add another fetus(es), or if new fetuses added from other sources in future (transplanting maybe?) + +WombProgress($slave, $time_to_add_to_fetuses) - after code that update $slave.preg, time to add should be the same. + +$isReady = WombBirthReady($slave, $birth_ready_age) - how many children ready to be birthed if their time to be ready is $birth_ready_age (40 is for normal length pregnancy). Return int - count of ready to birth children, or 0 if no ready exists. + +$children = WombBirth($slave, $birth_ready_age) - for actual birth. Return array with fetuses objects that birthed (can be used in future) and remove them from womb array of $slave. Should be called at actual birth code in sugarcube. fetuses that not ready remained in womb (array). + +WombFlush($slave) - clean womb (array). Can be used at broodmother birthstorm or abortion situations in game. But birthstorm logicaly should use WombBirth($slave, 35) or so before - some children in this event is live capable, others is not. + +$slave.bellyPreg = WombGetWolume($slave) - return double, with current womb volume in CC - for updating $slave.bellyPreg, or if need to update individual fetuses sizes. +*/ + +window.WombInit = function(actor) //Init womb system. +{ + if (!Array.isArray(actor.womb)) + { + //alert("creating new womb"); //debugging + actor.womb = []; + } + + if (actor.womb.length == 0 && actor.pregType != 0 && actor.broodmother == 0) //backward compatibility setup. Fully accurate for normal pregnancy only. + { + WombImpregnate(actor, actor.pregType, actor.pregSource, actor.preg); + } + else if (actor.womb.length == 0 && actor.pregType != 0 && actor.broodmother > 0) //sorry but for already present broodmothers it's impossible to calculate fully, aproximation used. + { + var i, pw = actor.preg, bCount, bLeft; + if (pw > 40) + pw = 40; //to avoid disaster. + bCount = Math.floor(actor.pregType/pw); + bLeft = actor.pregType - (bCount*pw); + if (pw > actor.pregType) + { + pw = actor.pregType // low children count broodmothers not supported here. It's emergency/backward compatibility code, and they not in game anyway. So minimum is 1 fetus in week. + actor.preg = pw; // fixing initial pregnancy week. + } + for (i=0; i<pw; i++) + { + WombImpregnate(actor, bCount, actor.pregSource, i); // setting fetuses for every week, up to 40 week at max. + } + + if (bLeft > 0) + { + WombImpregnate(actor, bLeft, actor.pregSource, i+1); // setting up leftower of fetuses. + } + } +} + +window.WombImpregnate = function(actor, fCount, fatherID, age) +{ + var i; + var tf; + for (i=0; i<fCount; i++) + { + tf = {}; //new Object + tf.age = age; //initial age + tf.fatherID = fatherID; //We can store who is father too. + tf.sex = Math.round(Math.random())+1; // 1 = male, 2 = female. For possible future usage, just as concept now. + tf.volume = 1; //Initial, to create property. Updated with actual data after WombGetVolume call. + + try { + if (actor.womb.length == 0) + { + actor.pregWeek = age; + actor.preg = age; + } + + actor.womb.push(tf); + }catch(err){ + WombInit(actor); + actor.womb.push(tf); + alert("WombImpregnate warning - " + actor.slaveName+" "+err); + } + + } + +} + +window.WombProgress = function(actor, ageToAdd) +{ + var i, ft; + ageToAdd = Math.ceil(ageToAdd*10)/10; + try { + for (i in actor.womb) + { + ft = actor.womb[i]; + ft.age += ageToAdd; + } + }catch(err){ + WombInit(actor); + alert("WombProgress warning - " + actor.slaveName+" "+err); + } +} + +window.WombBirth = function(actor, readyAge) +{ + try{ + actor.womb.sort(function (a, b){return b.age - a.age}); //For normal processing fetuses that more old should be first. Now - they are. + }catch(err){ + WombInit(actor); + alert("WombBirth warning - " + actor.slaveName+" "+err); + } + + var birthed = []; + var ready = WombBirthReady(actor, readyAge); + var i; + + for (i=0; i<ready; i++) //here can't be used "for .. in .." syntax. + { + birthed.push(actor.womb.shift()); + } + + return birthed; +} + +window.WombFlush = function(actor) +{ + actor.womb = []; + +} + +window.WombBirthReady = function(actor, readyAge) +{ + + var i, ft; + var readyCnt = 0; + try { + for (i in actor.womb) + { + ft = actor.womb[i]; + if (ft.age >= readyAge) + readyCnt++; + } + }catch(err){ + WombInit(actor); + alert("WombBirthReady warning - " + actor.slaveName+" "+err); + + return 0; + } + + return readyCnt; +} + +window.WombGetVolume = function(actor) //most code from pregJS.tw with minor adaptation. +{ + var i, ft; + var gestastionWeek; + var phi = 1.618; + var targetLen; + var wombSize = 0; + + try{ + + for (i in actor.womb) + { + ft = actor.womb[i]; + gestastionWeek = ft.age; + + if (gestastionWeek <= 32) + { + targetLen = (0.00006396 * Math.pow(gestastionWeek, 4)) - (0.005501 * Math.pow(gestastionWeek, 3)) + (0.161 * Math.pow(gestastionWeek, 2)) - (0.76 * gestastionWeek) + 0.208; + } + else if (gestastionWeek <= 106) + { + targetLen = (-0.0000004675 * Math.pow(gestastionWeek, 4)) + (0.0001905 * Math.pow(gestastionWeek, 3)) - (0.029 * Math.pow(gestastionWeek, 2)) + (2.132 * gestastionWeek) - 16.575; + } + else + { + targetLen = (-0.00003266 * Math.pow(gestastionWeek,2)) + (0.076 * gestastionWeek) + 43.843; + } + + ft.volume = ((4 / 3) * (Math.PI) * (phi / 2) * (Math.pow((targetLen / 2), 3))); + + wombSize += ft.volume; + } + }catch(err){ + WombInit(actor); + alert("WombGetVolume warning - " + actor.slaveName + " " + err); + } + + if (wombSize < 0) //catch for strange cases, to avoid messing with outside code. + wombSize = 0; + + return wombSize; +} + +window.WombUpdatePregVars = function(actor) { + + actor.womb.sort(function (a, b){return b.age - a.age}); + if (actor.womb.length > 0) + { + if (actor.preg > 0 && actor.womb[0].age > 0) + { + actor.preg = actor.womb[0].age; + } + + actor.pregType = actor.womb.length; + + actor.bellyPreg = WombGetVolume(actor); + + } + +} + +window.WombMinPreg = function(actor) +{ + actor.womb.sort(function (a, b){return b.age - a.age}); + + if (actor.womb.length > 0) + return actor.womb[actor.womb.length-1].age; + else + return 0; +} + +window.WombMaxPreg = function(actor) +{ + actor.womb.sort(function (a, b){return b.age - a.age}); + if (actor.womb.length > 0) + return actor.womb[0].age; + else + return 0; +} + +window.WombNormalizePreg = function(actor) +{ + if (actor.womb.length > 1) + { + var max = WombMaxPreg(actor); + + if (actor.pregWeek < 1 ) + actor.pregWeek = 1 + + if (max < actor.preg) + { + WombProgress(actor, actor.preg - max); + } + else if ( max > actor.preg) + { + actor.preg = max; + } + + actor.pregType = actor.womb.length; + + actor.pregSource = actor.womb[0].fatherID; + + actor.bellyPreg = WombGetVolume(actor); + } + else if (actor.womb.length == 0 && actor.broodmother < 1) + { + actor.pregType = 0; + actor.pregKnown = 0; + + if (actor.preg > 0) + actor.preg = 0; + + if (actor.pregSource > 0) + actor.pregSource = 0; + + if (actor.pregWeek > 0) // We can't properly set postpartum here, but can normalize obvious error with forgotten property. + actor.pregWeek = 0; + } +} + /*:: DTreeJS [script]*/ /* This is the minified version of lodash, d3 and dTree */ ; diff --git a/src/js/wombJS.tw b/src/js/wombJS.tw index 04ec3ae4bad3d680e48abd7737f4f0798535a2da..3297207ea00a25d69f7101a94e4b7b8d76b6070d 100644 --- a/src/js/wombJS.tw +++ b/src/js/wombJS.tw @@ -8,7 +8,7 @@ Design limitations: - Sizes of inividual fetuses updated only on call of WombGetVolume - not every time as called WombProgress. This is for better overail code speed. - For broodmothers we need actual "new ova release" code now. But it's possible to control how many children will be added each time, and so - how much children is ready to birth each time. -Usage form sugarcube code (samples): +Usage from sugarcube code (samples): WombInit($slave) - before first pregnancy, at slave creation, of as backward compatibility update. diff --git a/src/pregmod/managePersonalAffairs.tw b/src/pregmod/managePersonalAffairs.tw index 1d97c06bba8c0e9c32ac2de9990c33f816855e46..3dd539b8f9e944e7982fabca00364b477712928d 100644 --- a/src/pregmod/managePersonalAffairs.tw +++ b/src/pregmod/managePersonalAffairs.tw @@ -314,13 +314,13 @@ __Contraceptives and Fertility__ <span id="miniscene"> <<if $PC.preg < 6 && $PC.pregKnown == 1 && $PC.pregSource != -1>> - Your period is late, so the first thing you do is test yourself for a potential pregnancy: @@.lime;you are pregnant.@@ <<link "Abort your child">><<replace "#miniscene">><<set $PC.preg = 0, $PC.pregType = 0, $PC.pregSource = 0, $PC.pregKnown = 0>><<print "You take a syringe filled with abortifacients and make your self comfortable. Injecting the vial through your belly into your womb, your close your eyes and wait for what is coming. Once you feel it is over, you clean yourself up and go on your way, child free.">><br> <</replace>><</link>> + Your period is late, so the first thing you do is test yourself for a potential pregnancy: @@.lime;you are pregnant.@@ <<link "Abort your child">><<replace "#miniscene">><<set $PC.preg = 0, $PC.pregType = 0, $PC.pregSource = 0, $PC.pregKnown = 0, $PC.pregWeek = 0>><<set wombFlush($PC)>><<print "You take a syringe filled with abortifacients and make your self comfortable. Injecting the vial through your belly into your womb, your close your eyes and wait for what is coming. Once you feel it is over, you clean yourself up and go on your way, child free.">><br> <</replace>><</link>> <<elseif $PC.labor == 1>> You are beginning to feel contractions, you'll be giving birth soon. <<elseif $PC.preg >= 39>> Your due date is looming, but your child doesn't seem to be interested in coming out just yet. [[Induce childbirth|Manage Personal Affairs][$PC.labor = 1]] <<elseif $PC.pregKnown == 1 && $PC.pregSource != -1>> - You're pregnant, something rather unbecoming for an arcology owner. <<link "Abort your child">><<replace "#miniscene">><<set $PC.preg = 0, $PC.pregWeek == -2, $PC.pregType = 0, $PC.pregSource = 0, $PC.belly = 0, $PC.pregKnown = 0>><<print "You take a syringe filled with abortifacients and make your self comfortable. Injecting the vial through your belly into your womb, your close your eyes and wait for what is coming. Once you feel it is over, you clean yourself up and go on your way, child free.">><br> <</replace>><</link>> + You're pregnant, something rather unbecoming for an arcology owner. <<link "Abort your child">><<replace "#miniscene">><<set $PC.preg = 0, $PC.pregWeek = -2, $PC.pregType = 0, $PC.pregSource = 0, $PC.belly = 0, $PC.pregKnown = 0>><<set wombFlush($PC)>><<print "You take a syringe filled with abortifacients and make your self comfortable. Injecting the vial through your belly into your womb, your close your eyes and wait for what is coming. Once you feel it is over, you clean yourself up and go on your way, child free.">><br> <</replace>><</link>> <</if>> </span> @@ -382,7 +382,7 @@ In total, you have given birth to: <<elseif $PC.preg > 1>> You've missed your period. This could be bad. <<elseif $PC.preg > 0 && $PC.pregSource != -1>> - Your fertile pussy has been thoroughly seeded, there is a chance you are pregnant. [[Pop some morning after pills|Manage Personal Affairs][$PC.preg = 0, $PC.pregWeek == 0, $PC.pregKnown = 0, $PC.pregType = 0]] + Your fertile pussy has been thoroughly seeded, there is a chance you are pregnant. <<link "Pop some morning after pills">><<set $PC.preg = 0, $PC.pregWeek = 0, $PC.pregType = 0, $PC.pregSource = 0, $PC.pregKnown = 0>><<set wombFlush($PC)>><<goto "Manage Personal Affairs">><</link>> <<elseif $PC.pregWeek < 0>> You're still recovering from your recent pregnancy. <<elseif $PC.preg == -2>> @@ -427,7 +427,7 @@ In total, you have given birth to: <br><br> The tap connected to $dairyName is calling to you. Begging to let it fill you with cum again. If you wanted to try and go bigger, that is. <br>[[Sounds fun!|FSelf]] - <br>[[You only want to get pregnant.|Manage Personal Affairs][$PC.preg = 1, $PC.pregSource = 0]] + <br><<link "You only want to get pregnant.">><<set $PC.preg = 1, $PC.pregWeek = 1, $PC.pregSource = 0, $PC.pregKnown = 1>><<SetPregType $PC>><<set WombImpregnate($PC, $PC.pregType, 0, 1)>><<goto "Manage Personal Affairs">><</link>> <</if>> <</if>> <<if $PC.vagina == 1 && $PC.dick == 1>> diff --git a/src/pregmod/widgets/seBirthWidgets.tw b/src/pregmod/widgets/seBirthWidgets.tw index 9542199f5a7ea0cc6e9ba9525a4bbc29c6669496..3602f76701723994e5b0193a3e71f7a88909135a 100644 --- a/src/pregmod/widgets/seBirthWidgets.tw +++ b/src/pregmod/widgets/seBirthWidgets.tw @@ -1,4 +1,5 @@ :: seBirthWidgets [widget nobr] + <<widget "seBirthPreChek">> <<SlavePronouns $slaves[$i]>> diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index b9ef7c5418529ab5905bf1177ad1ea0533b3d39f..10f3b675fdbbad8463130a7204a51a7ec68655cf 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -2276,7 +2276,7 @@ Setting missing slave variables: <<PMODinit _Slave>> -<<set WombInit($PC)>> +<<set WombInit(_Slave)>> <<if ndef _Slave.publicCount>> <<set _Slave.publicCount = 0>> diff --git a/src/uncategorized/genericPlotEvents.tw b/src/uncategorized/genericPlotEvents.tw index b6bd1f5c4e95aef75bd8f0e7f7e15c4f9e1079e2..03861cb1415e17e957d19b42ef5b6c36653bfa21 100644 --- a/src/uncategorized/genericPlotEvents.tw +++ b/src/uncategorized/genericPlotEvents.tw @@ -331,7 +331,7 @@ When the aircraft lands at your penthouse pad, the would-be escapees are still u <<set $one_time_age_overrides_pedo_mode = 1>> /% Old enough to be pregnant. %/ <<include "Generate XX Slave">> <<set $activeSlave.origin = "She was an expectant mother you enslaved when you evacuated her from a threatened old world hospital.">> - <<set $activeSlave.career = "a housewife">> + <<set $activeSlave.career = "a housewife">> <<set $activeSlave.devotion = random(-90,-75)>> <<set $activeSlave.trust = -20>> <<set $activeSlave.preg = random(28,40)>> @@ -553,7 +553,7 @@ A screen opposite your desk springs to life, <<if $assistant == 0>>showing your <<for $i = 0; $i < $slaves.length; $i++>> <<if ($slaves[$i].drugs == "breast injections") && canGetPregnant($slaves[$i])>> <<set $slaves[$i].preg = 1>> - <<set $slaves[$i].pregType = random(10,19)>> + <<set $slaves[$i].pregType = random(10,25)>> <<set $activeSlave.pregKnown = 1>> <<set $activeSlave.pregWeek = 1>> <<SetBellySize $activeSlave>> @@ -574,7 +574,7 @@ A screen opposite your desk springs to life, <<if $assistant == 0>>showing your <<set $slaves[$i].boobs += 300>> <<elseif ($slaves[$i].drugs == "hyper breast injections") && canGetPregnant($slaves[$i])>> <<set $slaves[$i].preg = 1>> - <<set $slaves[$i].pregType = random(20,29)>> + <<set $slaves[$i].pregType = random(20,45)>> <<set $activeSlave.pregKnown = 1>> <<set $activeSlave.pregWeek = 1>> <<SetBellySize $activeSlave>> diff --git a/src/uncategorized/pRivalryActions.tw b/src/uncategorized/pRivalryActions.tw index 4776931a0883e8548a16a4a12e50f65750f9f1bf..76009942fe8afb9b62d38a8ede5a62ff9dcf254e 100644 --- a/src/uncategorized/pRivalryActions.tw +++ b/src/uncategorized/pRivalryActions.tw @@ -59,6 +59,7 @@ Your inter-arcology war with the arcology owner behind the Daughters of Liberty <<set $hostage.pregType = 8>> <<set $hostage.pregKnown = 1>> <<set $hostage.pregWeek = $rivalryDuration>> + <<set WombImpregnate($hostage, $hostage.pregType, 0, $hostage.preg)>> <<SetBellySize $hostage>> <<set $hostage.vagina = 2>> <<set $hostage.oralCount += 50>> @@ -75,6 +76,7 @@ Your inter-arcology war with the arcology owner behind the Daughters of Liberty <<set $hostage.pregType = 40>> <<set $hostage.pregKnown = 1>> <<set $hostage.pregWeek = $rivalryDuration>> + <<set WombImpregnate($hostage, $hostage.pregType, 0, $hostage.preg)>> <<SetBellySize $hostage>> <<set $hostage.vagina = 2>> <<set $hostage.oralCount += 50>> @@ -281,6 +283,7 @@ Your inter-arcology war with the arcology owner behind the Daughters of Liberty <<set $hostage.pregType = 8>> <<set $hostage.pregKnown = 1>> <<set $hostage.pregWeek = $rivalryDuration>> + <<set WombImpregnate($hostage, $hostage.pregType, 0, $hostage.preg)>> <<SetBellySize $hostage>> <<set $hostage.oralCount += 50>> <<set $hostage.vaginalCount += 50>> @@ -295,6 +298,7 @@ Your inter-arcology war with the arcology owner behind the Daughters of Liberty <<set $hostage.pregType = 40>> <<set $hostage.pregKnown = 1>> <<set $hostage.pregWeek = $rivalryDuration>> + <<set WombImpregnate($hostage, $hostage.pregType, 0, $hostage.preg)>> <<SetBellySize $hostage>> <<set $hostage.boobs += 100>> <<set $hostage.oralCount += 50>> @@ -551,6 +555,7 @@ Your inter-arcology war with the arcology owner behind the Daughters of Liberty <<set $hostage.pregType = 1>> <<set $hostage.pregKnown = 1>> <<set $hostage.pregWeek = 12>> + <<set WombImpregnate($hostage, $hostage.pregType, 0, $hostage.preg)>> <<SetBellySize $hostage>> <</if>> <<if $hostage.vagina < 3>> @@ -586,6 +591,7 @@ Your inter-arcology war with the arcology owner behind the Daughters of Liberty <<set $hostage.pregType = 8>> <<set $hostage.pregKnown = 1>> <<set $hostage.pregWeek = $rivalryDuration>> + <<set WombImpregnate($hostage, $hostage.pregType, 0, $hostage.preg)>> <<SetBellySize $hostage>> <<set $hostage.vagina = 3>> <<set $hostage.boobs += 100>> @@ -607,6 +613,7 @@ Your inter-arcology war with the arcology owner behind the Daughters of Liberty <<set $hostage.pregType = 40>> <<set $hostage.pregKnown = 1>> <<set $hostage.pregWeek = $rivalryDuration>> + <<set WombImpregnate($hostage, $hostage.pregType, 0, $hostage.preg)>> <<SetBellySize $hostage>> <<set $hostage.vagina = 3>> <<set $hostage.boobs += 300>> @@ -859,6 +866,7 @@ Your inter-arcology war with the arcology owner behind the Daughters of Liberty <<set $hostage.pregType = 1>> <<set $hostage.pregKnown = 1>> <<set $hostage.pregWeek = $hostage.preg>> + <<set WombImpregnate($hostage, $hostage.pregType, 0, $hostage.preg)>> <<SetBellySize $hostage>> <</if>> <<if $hostage.vagina < 4>> @@ -890,6 +898,7 @@ Your inter-arcology war with the arcology owner behind the Daughters of Liberty <<set $hostage.pregType = 8>> <<set $hostage.pregKnown = 1>> <<set $hostage.pregWeek = $rivalryDuration>> + <<set WombImpregnate($hostage, $hostage.pregType, 0, $hostage.preg)>> <<SetBellySize $hostage>> <<set $hostage.vagina = 4>> <<set $hostage.boobs += 100>> @@ -908,6 +917,7 @@ Your inter-arcology war with the arcology owner behind the Daughters of Liberty <<set $hostage.pregType = 40>> <<set $hostage.pregKnown = 1>> <<set $hostage.pregWeek = $rivalryDuration>> + <<set WombImpregnate($hostage, $hostage.pregType, 0, $hostage.preg)>> <<SetBellySize $hostage>> <<set $hostage.vagina = 4>> <<set $hostage.boobs += 400>> @@ -1099,6 +1109,7 @@ Your inter-arcology war with the arcology owner behind the Daughters of Liberty <<set $hostage.pregType = 1>> <<set $hostage.pregKnown = 1>> <<set $hostage.pregWeek = $hostage.preg>> + <<set WombImpregnate($hostage, $hostage.pregType, 0, $hostage.preg)>> <<SetBellySize $hostage>> <</if>> <<set $hostage.oralCount += 50>> @@ -1117,37 +1128,39 @@ Your inter-arcology war with the arcology owner behind the Daughters of Liberty giving an interview. She gushes over how important it is for only the best of society to reproduce, and how it is an atrocity that some people bring so many wasted lives into being. <<case "Eugenics">> <<if $seeHyperPreg != 1>> - <<set $hostage.preg = 1>> - <<set $hostage.pregType = 8>> - <<set $hostage.pregKnown = 1>> - <<set $hostage.pregWeek = 1>> - <<SetBellySize $hostage>> - <<set $hostage.vagina = 5>> - <<if $hostage.births < 1>> - <<set $hostage.births = 1>> - <<set $hostage.birthsTotal += 1>> - <</if>> - <<set $hostage.oralCount += 100>> - <<set $hostage.vaginalCount += 100>> - <<set $hostage.analCount += 100>> - <<set $hostage.mammaryCount += 100>> - <<set $activeSlave.bellySag = 2, $activeSlave.bellySagPreg = 2>> + <<set $hostage.preg = 1>> + <<set $hostage.pregType = 8>> + <<set $hostage.pregKnown = 1>> + <<set $hostage.pregWeek = 1>> + <<set WombImpregnate($hostage, $hostage.pregType, 0, $hostage.preg)>> + <<SetBellySize $hostage>> + <<set $hostage.vagina = 5>> + <<if $hostage.births < 1>> + <<set $hostage.births = 1>> + <<set $hostage.birthsTotal += 1>> + <</if>> + <<set $hostage.oralCount += 100>> + <<set $hostage.vaginalCount += 100>> + <<set $hostage.analCount += 100>> + <<set $hostage.mammaryCount += 100>> + <<set $activeSlave.bellySag = 2, $activeSlave.bellySagPreg = 2>> <<else>> - <<set $hostage.preg = 1>> - <<set $hostage.pregType = 40>> - <<set $hostage.pregKnown = 1>> - <<set $hostage.pregWeek = 1>> - <<SetBellySize $hostage>> - <<set $hostage.vagina = 5>> - <<if $hostage.births < 50>> - <<set $hostage.births = 20>> - <<set $hostage.birthsTotal += 20>> - <</if>> - <<set $hostage.oralCount += 100>> - <<set $hostage.vaginalCount += 100>> - <<set $hostage.analCount += 100>> - <<set $hostage.mammaryCount += 100>> - <<set $activeSlave.bellySag = 5, $activeSlave.bellySagPreg = 5>> + <<set $hostage.preg = 1>> + <<set $hostage.pregType = 40>> + <<set $hostage.pregKnown = 1>> + <<set $hostage.pregWeek = 1>> + <<set WombImpregnate($hostage, $hostage.pregType, 0, $hostage.preg)>> + <<SetBellySize $hostage>> + <<set $hostage.vagina = 5>> + <<if $hostage.births < 50>> + <<set $hostage.births = 20>> + <<set $hostage.birthsTotal += 20>> + <</if>> + <<set $hostage.oralCount += 100>> + <<set $hostage.vaginalCount += 100>> + <<set $hostage.analCount += 100>> + <<set $hostage.mammaryCount += 100>> + <<set $activeSlave.bellySag = 5, $activeSlave.bellySagPreg = 5>> <</if>> giving an interview. She gushes over how important it is for women to conceive and carry as many children as they can, as well as how terrible it is that some people strip away a woman's most important purpose. Before she can continue, her water breaks and she drops to the floor. You close the video in disgust of whats coming. <<case "Gender Radicalism">> @@ -1156,6 +1169,7 @@ Your inter-arcology war with the arcology owner behind the Daughters of Liberty <<set $hostage.pregType = 1>> <<set $hostage.pregKnown = 1>> <<set $hostage.pregWeek = 8>> + <<set WombImpregnate($hostage, $hostage.pregType, 0, $hostage.preg)>> <<SetBellySize $hostage>> giving an interview. She gushes over how great it feels knowing that someone is always watching out for her safety and health as a traditional woman, as well as how terrible it is that some people want to blur the lines between the genders. <<case "Gender Fundamentalism">> @@ -1196,6 +1210,7 @@ Your inter-arcology war with the arcology owner behind the Daughters of Liberty <<set $hostage.pregType = 1>> <<set $hostage.pregKnown = 1>> <<set $hostage.pregWeek = 14>> + <<set WombImpregnate($hostage, $hostage.pregType, 0, $hostage.preg)>> <<SetBellySize $hostage>> and her owner at the altar during their wedding. It seems she couldn't wait, since her belly already shows signs of an early pregnancy. <<case "Body Purism">> diff --git a/src/uncategorized/pRivalryVictory.tw b/src/uncategorized/pRivalryVictory.tw index db03712cdc56f5a27c77d4526eb235e4963852e4..0d9b1d83e0e0194508c4a121740fde66f6eead5f 100644 --- a/src/uncategorized/pRivalryVictory.tw +++ b/src/uncategorized/pRivalryVictory.tw @@ -369,12 +369,12 @@ For the first time, you receive a direct call from your rival. You pictured the <<set $activeSlave.preg = 25>> <<if $seeHyperPreg == 1>> <<set $activeSlave.vagina = 10>> - <<set $activeSlave.pregType = random(20,29)>> + <<set $activeSlave.pregType = random(20,35)>> <<set $activeSlave.birthsTotal = random(120,180)>> <<set $activeSlave.bellySag = 30, $activeSlave.bellySagPreg = 30>> <<else>> <<set $activeSlave.vagina = 5>> - <<set $activeSlave.pregType = either(3,3,4,4,4,5)>> + <<set $activeSlave.pregType = either(3,3,4,4,4,5,5,6,6,7,7,8,8,8)>> <<set $activeSlave.birthsTotal = random(18,27)>> <<set $activeSlave.bellySag = 2, $activeSlave.bellySagPreg = 2>> <</if>> diff --git a/src/uncategorized/reRecruit.tw b/src/uncategorized/reRecruit.tw index 8564a187f75ef41591fe5b1b0618045e458fba85..64d30af4228261699342c0023bb5b374df0765be 100644 --- a/src/uncategorized/reRecruit.tw +++ b/src/uncategorized/reRecruit.tw @@ -1076,6 +1076,10 @@ As fate has it, the person calling is the owner of the local race-track, wanting <<set $activeSlave.labia = 1>> <<set $activeSlave.ovaries = 1>> <<set $activeSlave.preg = 1>> +<<set $activeSlave.pregWeek = 1>> +<<set $activeSlave.pregType = 1>> +<<set $activeSlave.pregKnown = 1>> +<<set WombImpregnate($activeSlave, $activeSlave.pregType, $activeSlave.pregSource, $activeSlave.preg)>> <<set $activeSlave.pubicHStyle = "waxed">> <<set $activeSlave.underArmHStyle = "waxed">> <<set $activeSlave.height = random(180,200)>> diff --git a/src/uncategorized/reRelativeRecruiter.tw b/src/uncategorized/reRelativeRecruiter.tw index 2faccffa5c94275c45f0548e059c2be4f63e9a0f..35a3d87062725491d5ae1f11e1c91f07baa535fa 100644 --- a/src/uncategorized/reRelativeRecruiter.tw +++ b/src/uncategorized/reRelativeRecruiter.tw @@ -127,6 +127,7 @@ <<set $activeSlave.pregType = 0>> <<set $activeSlave.pregWeek = 0>> <<set $activeSlave.pregKnown = 0>> + <<set WombFlush($activeSlave)>> <<SetBellySize $activeSlave>> $eventSlave.slaveName requests an interview with you. She's a devoted slave, and you grant it, and are happy you did when you see the troubled expression on her face. She explains<<if !canTalk($eventSlave)>> with desperate gestures<</if>> that diff --git a/src/uncategorized/slaveInteract.tw b/src/uncategorized/slaveInteract.tw index a92531eaaa7b04e02642d0a25b3cf1370dd7e148..a3569b50f6e24951d045de5075999826d48284ea 100644 --- a/src/uncategorized/slaveInteract.tw +++ b/src/uncategorized/slaveInteract.tw @@ -1028,35 +1028,35 @@ Aphrodisiacs: <span id="aphrodisiacs"><strong><<if $activeSlave.aphrodisiacs > 1 <br> <span id="fertilityblock"> <<if $activeSlave.fuckdoll == 0 && ($activeSlave.ovaries == 1 || $activeSlave.mpreg == 1)>> -<<if ($activeSlave.preg < -1)>> - //She is sterile// -<<elseif ($activeSlave.pubertyXX == 0) && $activeSlave.preg < 1>> - //She is not yet fertile// -<<elseif $activeSlave.ovaryAge >= 47 && $activeSlave.preg < 1>> - //She is too old to become pregnant// - <<if $activeSlave.preg == -1>> - <<set $activeSlave.preg = 0>> - <<SetBellySize $activeSlave>> - <</if>> -<<elseif $activeSlave.broodmotherOnHold == 1>> - //Her pregnancy implant is turned off; she expected to be completely emptied of her remaining brood in $activeSlave.broodmotherCountDown week<<if $activeSlave.broodmotherCountDown > 1>>s<</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)>> - <<link "Use contraceptives">><<set $activeSlave.preg = -1>> - <<SlaveInteractFertility>> - <<SlaveInteractImpreg>> - <</link>> -<<elseif $activeSlave.preg == -1>> - <<link "Let her get pregnant">><<set $activeSlave.preg = 0>> - <<SlaveInteractFertility>> - <<SlaveInteractImpreg>> - <</link>> -<<elseif $activeSlave.induce == 1>> - //Hormones are being slipped into her food, she will give birth suddenly and rapidly this week// -<<elseif ($activeSlave.preg > 38) && ($activeSlave.broodmother == 0) && ($activeSlave.labor == 0)>> - [[Induce labor|Slave Interact][$activeSlave.labor = 1,$activeSlave.induce = 1,$birthee = 1]] + <<if ($activeSlave.preg < -1)>> + //She is sterile// + <<elseif ($activeSlave.pubertyXX == 0) && $activeSlave.preg < 1>> + //She is not yet fertile// + <<elseif $activeSlave.ovaryAge >= 47 && $activeSlave.preg < 1>> + //She is too old to become pregnant// + <<if $activeSlave.preg == -1>> + <<set $activeSlave.preg = 0>> + <<SetBellySize $activeSlave>> + <</if>> + <<elseif $activeSlave.broodmotherOnHold == 1>> + //Her pregnancy implant is turned off; she expected to be completely emptied of her remaining brood in $activeSlave.broodmotherCountDown week<<if $activeSlave.broodmotherCountDown > 1>>s<</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)>> + <<link "Use contraceptives">><<set $activeSlave.preg = -1>> + <<SlaveInteractFertility>> + <<SlaveInteractImpreg>> + <</link>> + <<elseif $activeSlave.preg == -1>> + <<link "Let her get pregnant">><<set $activeSlave.preg = 0>> + <<SlaveInteractFertility>> + <<SlaveInteractImpreg>> + <</link>> + <<elseif $activeSlave.induce == 1>> + //Hormones are being slipped into her food, she will give birth suddenly and rapidly this week// + <<elseif ($activeSlave.preg > 38) && ($activeSlave.broodmother == 0) && ($activeSlave.labor == 0)>> + [[Induce labor|Slave Interact][$activeSlave.labor = 1,$activeSlave.induce = 1,$birthee = 1]] | [[Give her a cesarean section|csec]] <<elseif ($activeSlave.broodmother > 0)>> <<if $activeSlave.broodmotherOnHold != 1>> @@ -1068,35 +1068,35 @@ Contraception: <span id="fertility"><strong><<if $activeSlave.preg == -1>><<prin <<elseif ($activeSlave.preg > 35)>> [[Give her a cesarean section|csec]] <<elseif ($activeSlave.preg > 0) && $activeSlave.breedingMark == 1 && $activeSlave.pregSource == -1>> - //You are forbidden from aborting an elite child// + //You are forbidden from aborting an elite child// <<elseif ($activeSlave.preg > 0)>> - [[Abort her pregnancy|Abort]] -<</if>> -<</if>> -<<elseif ($activeSlave.ovaries == 1 || $activeSlave.mpreg == 1)>> -<<if ($activeSlave.preg < -1)>> - //It is sterile// -<<elseif ($activeSlave.pubertyXX == 0)>> - //It is not yet fertile// -<<elseif $activeSlave.ovaryAge >= 47 && $activeSlave.preg < 1>> - //It is too old to become pregnant// - <<if $activeSlave.preg == -1>> - <<set $activeSlave.preg = 0>> - <<SetBellySize $activeSlave>> + [[Abort her pregnancy|Abort]] + <</if>> <</if>> +<<elseif ($activeSlave.ovaries == 1 || $activeSlave.mpreg == 1)>> + <<if ($activeSlave.preg < -1)>> + //It is sterile// + <<elseif ($activeSlave.pubertyXX == 0)>> + //It is not yet fertile// + <<elseif $activeSlave.ovaryAge >= 47 && $activeSlave.preg < 1>> + //It is too old to become pregnant// + <<if $activeSlave.preg == -1>> + <<set $activeSlave.preg = 0>> + <<SetBellySize $activeSlave>> + <</if>> <<elseif $activeSlave.broodmotherOnHold == 1>> //Its pregnancy implant is turned off; it expected to be completely emptied of its remaining brood in $activeSlave.broodmotherCountDown week<<if $activeSlave.broodmotherCountDown > 1>>s<</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)>> - <<link "Use contraceptives">><<set $activeSlave.preg = -1>> - <<SlaveInteractFertility>> - <</link>> -<<elseif ($activeSlave.preg == -1)>> + <<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)>> + <<link "Use contraceptives">><<set $activeSlave.preg = -1>> + <<SlaveInteractFertility>> + <</link>> + <<elseif ($activeSlave.preg == -1)>> <<link "Let it get pregnant">><<set $activeSlave.preg = 0>> - <<SlaveInteractFertility>> - <</link>> + <<SlaveInteractFertility>> + <</link>> <<elseif $activeSlave.induce == 1>> //Hormones are being slipped into its food, it will give birth suddenly and rapidly this week// <<elseif ($activeSlave.preg > 38) && ($activeSlave.broodmother == 0) && ($activeSlave.labor == 0)>> @@ -1115,8 +1115,8 @@ __Contraception__: <span id="fertility"><strong><<if $activeSlave.preg == -1>><< //You are forbidden from aborting an elite child// <<elseif ($activeSlave.preg > 0)>> [[Abort its pregnancy|Abort]] -<</if>> -<</if>> + <</if>> + <</if>> <</if>> <<if ($activeSlave.pregKnown == 1) && ($pregSpeedControl == 1) && ($activeSlave.breedingMark != 1) && ($activeSlave.indentureRestrictions < 1) && ($activeSlave.broodmother == 0) && $seePreg != 0>> <br> diff --git a/src/uncategorized/slaveShelter.tw b/src/uncategorized/slaveShelter.tw index 75788104e472f4cfac847ce638f11965e776ce06..fa7a0e19d6f42ac8aaec7bb96600066334073ad7 100644 --- a/src/uncategorized/slaveShelter.tw +++ b/src/uncategorized/slaveShelter.tw @@ -188,6 +188,7 @@ You contact the Slave Shelter to review the profile of the slave the Shelter is <<if $shelterSlave.preg > 0>> <<set $shelterSlave.pregSource = -2, $shelterSlave.pregKnown = 1>> <<SetPregType $shelterSlave>> + <<set WombImpregnate($shelterSlave, $shelterSlave.pregType, $shelterSlave.pregSource, $shelterSlave.preg)>> <</if>> <</if>> <<if $shelterSlave.vagina > -1>> diff --git a/src/utility/slaveCreationWidgets.tw b/src/utility/slaveCreationWidgets.tw index 023b05c6395ac627f433fcc79f16e0159750a46a..9f8363b69a90c016c7b9653f9455abc5c9070e19 100644 --- a/src/utility/slaveCreationWidgets.tw +++ b/src/utility/slaveCreationWidgets.tw @@ -2366,12 +2366,12 @@ <<if isFertile($activeSlave)>> <<set $activeSlave.vagina = random(1,4)>> <<set $activeSlave.preg = random(21,39)>> - <<SetBellySize $activeSlave>> <<if random(1,2) == 1 && $seeHyperPreg == 1>> <<set $activeSlave.pregType = random(3,29)>> <<else>> <<set $activeSlave.pregType = random(3,8)>> <</if>> + <<SetBellySize $activeSlave>> <</if>> <<set $activeSlave.lactation = random(0,1)>> <<elseif $arcologies[_market].FSRestart > 50>> @@ -2428,6 +2428,7 @@ <<set $activeSlave.mpreg = 1>> <<if isFertile($activeSlave)>> <<set $activeSlave.preg = random(1,39)>> + <<SetPregType $activeSlave>> <<SetBellySize $activeSlave>> <</if>> <</if>> @@ -2459,6 +2460,7 @@ <<set $activeSlave.preg = 0>> /*removing contraception of default slave generation so isFertile can work right*/ <<if isFertile($activeSlave)>> <<set $activeSlave.preg = random(1,40)>> + <<SetPregType $activeSlave>> <<SetBellySize $activeSlave>> <<set $activeSlave.lactation = random(0,1)>> <</if>> @@ -2800,6 +2802,9 @@ <<set $activeSlave.health = random(-80,20)>> <<if $activeSlave.vagina > 1 && isFertile($activeSlave)>> <<set $activeSlave.preg = either(-2, -1, -1, -1, -1, -1, -1, -1, 1, 20, 40)>> + <<if $activeSlave.preg > 0>> + <<SetPregType $activeSlave>> + <</if>> <<SetBellySize $activeSlave>> <</if>> @@ -2833,6 +2838,9 @@ <<if $activeSlave.vagina > -1>> <<set $activeSlave.preg = either(-2, -1, -1, -1, -1, -1, -1, -1, 1, 1)>> <<if $activeSlave.physicalAge < $activeSlave.pubertyAgeXX>><<set $activeSlave.preg = -1>><</if>> + <<if $activeSlave.preg > 0>> + <<SetPregType $activeSlave>> + <</if>> <<SetBellySize $activeSlave>> <<set $activeSlave.vaginalSkill = random(15,100)>> <<set $activeSlave.vagina = random(1,3)>> @@ -3517,6 +3525,8 @@ <<set $activeSlave.preg = random(1,40)>> <</if>> <</if>> + <<set $activeSlave.pregType = 1>> + <<set $activeSlave.pregWeek = $activeSlave.preg>> <</if>> <<SetBellySize $activeSlave>> <<set $activeSlave.intelligenceImplant = 1>> @@ -3804,7 +3814,7 @@ <<set $activeSlave.physicalAge = $activeSlave.actualAge, $activeSlave.visualAge = $activeSlave.actualAge, $activeSlave.ovaryAge = $activeSlave.actualAge>> <<case "Motherly Attendant">> <<set $activeSlave.devotion = 90, $activeSlave.trust = 90, $activeSlave.health = random(80,95), $activeSlave.fetish = "submissive", $activeSlave.fetishStrength = 100, $activeSlave.face = random(60,90)>> - <<set $activeSlave.career = either("a counselor", "a dispatch officer", "a lifeguard", "a masseuse", "a psychologist", "a therapist"), $activeSlave.birthsTotal = random(1,3), $activeSlave.pregKnown = 1, $activeSlave.preg = random(20,35), $activeSlave.pregWeek = $activeSlave.preg>> + <<set $activeSlave.career = either("a counselor", "a dispatch officer", "a lifeguard", "a masseuse", "a psychologist", "a therapist"), $activeSlave.birthsTotal = random(1,3), $activeSlave.pregKnown = 1, $activeSlave.preg = random(20,35), $activeSlave.pregWeek = $activeSlave.preg, $activeSlave.pregType = 1>> <<SetBellySize $activeSlave>> <<set $activeSlave.actualAge = random(36,$retirementAge-3)>> <<set $activeSlave.vagina = random(3,4)>>