Skip to content
Snippets Groups Projects
Commit 9b3e0dfb authored by pregmodfan's avatar pregmodfan
Browse files

last fixes, ready to public test

parent 5a492c88
No related branches found
No related tags found
No related merge requests found
......@@ -75,8 +75,10 @@ window.WombImpregnate = function(actor, fCount, fatherID, age)
try {
if (actor.womb.length == 0)
{
actor.pregWeek = age;
actor.preg = age;
}
actor.womb.push(tf);
}catch(err){
......@@ -243,10 +245,14 @@ window.WombNormalizePreg = function(actor)
if (actor.pregWeek < 1 )
actor.pregWeek = 1
if ( max > actor.preg)
if (max < actor.preg)
{
WombProgress(actor, actor.preg - max);
}
else if ( max > actor.preg)
{
actor.preg = max;
else if (max < actor.preg)
WombProgress(actor, max - actor.preg);
}
actor.pregType = actor.womb.length;
......@@ -254,7 +260,7 @@ window.WombNormalizePreg = function(actor)
actor.bellyPreg = WombGetVolume(actor);
}
else if (actor.broodmother < 1)
else if (actor.womb.length == 0 && actor.broodmother < 1)
{
actor.pregType = 0;
actor.pregKnown = 0;
......@@ -268,4 +274,4 @@ window.WombNormalizePreg = function(actor)
if (actor.pregWeek > 0) // We can't properly set postpartum here, but can normalize obvious error with forgotten property.
actor.pregWeek = 0;
}
}
\ No newline at end of file
}
......@@ -50,10 +50,6 @@ PC.pregSource documentation
<</if>>
<</if>>
<<if $Cash4Babies == 1>>
<<set $seed = random(1,10)>>
<</if>>
<<if $PC.pregSource == -1>>
<<set $babyGender = Math.floor(Math.random()*100) < $seeDicks ? 2 : 1>>
Since you are heavily pregnant with a child of the Societal Elite, you are quickly taken to the finest clinic the arcology has to offer. After a quick sedation, you awake to find your belly no longer round with child; that and a note stating your next breeding partner and a notice that <<print cashFormat(50000)>> has been added to your account. The Societal Elite are @@.green;very pleased@@ at their new addition to the ranks. You just wish you could have seen your <<if _curBabies == 1>>little <<if $babyGender == 1>>girl<<else>>boy<</if>> before they took <<if $babyGender == 1>>her<<else>>him<</if>><<else>>babies before they took them<</if>> away to be raised into a proper member of the future world.
......@@ -406,7 +402,7 @@ You arrange yourself to give birth, relaxing until your body urges you to begin
<<if _gaveBirth == 0>>
<<if _curBabies == 1>>
<<if _curBabies > 0>>
<<include "Generate Child">>
......@@ -529,7 +525,7 @@ You arrange yourself to give birth, relaxing until your body urges you to begin
<</if>>
/* -------------------- here curBabies is now will show only babies count remained after reserved ones is paced to incubator. Not all live birthed ones. */
<<set _curBabies = $PC.curBabies.length >>
<<set _curBabies = $PC.curBabies.length>>
<<if _curBabies > 0>>
<br><br>
......@@ -551,6 +547,7 @@ You arrange yourself to give birth, relaxing until your body urges you to begin
<</if>>
<</if>>
<<if $Cash4Babies == 1>>
<<set _seed = random(1,10)>>
Alternatively, since it is @@.orange;legal to sell slave babies@@, your child should be worth quite a pretty ¤ at auction.
<</if>>
<br><br>
......@@ -563,7 +560,7 @@ You arrange yourself to give birth, relaxing until your body urges you to begin
<<if $arcologies[0].FSRepopulationFocus > 40>>
| <<link "Breeding School">><<replace "#choice">><<print "You have decided to send them to be raised into a proper breeder. Perhaps you'll even see them again, though it's unlikely you'll recognize them with their reproduction focused body.">><</replace>><<set $breederOrphanageTotal += _curBabies>><</link>>
<</if>>
<<if $Cash4Babies == 1>> | <<link "Auction Them">><<replace "#choice">><<print "You send the child to be sold at auction amongst other prestigious slaves. The winning bid for your offspring came in at @@.yellowgreen;<<print cashFormat(1000*$seed)>>.@@">><</replace>><<set $cash += 1000*$seed*_curBabies>><</link>><</if>>
<<if $Cash4Babies == 1>> | <<link "Auction Them">><<replace "#choice">><<print "You send the child<<if _curBabies > 1>>ren<</if>> to be sold at auction amongst other prestigious slaves. The winning bid for your offspring came in at @@.yellowgreen;<<print cashFormat(1000*_seed*_curBabies)>>.@@">><</replace>><<set $cash += 1000*_seed*_curBabies>><</link>><</if>>
</span>
<</if>>
......@@ -576,7 +573,7 @@ You arrange yourself to give birth, relaxing until your body urges you to begin
<</if>> /*closes gaveBirth*/
<</if>> /*closes SE*/
<<set $badBirth = 0, $PC.pregSource = 0, $PC.pregType = 0, $seed = 0, $babyGender = 0, $PC.belly = 2000, WombFlush($PC)>>
<<set $badBirth = 0, $PC.pregSource = 0, $PC.pregType = 0, $babyGender = 0, $PC.belly = 2000, WombFlush($PC)>>
<<if $PC.career == "servant">>
<<set $PC.pregWeek = -3>>
<<else>>
......
......@@ -137,7 +137,7 @@
<</if>>
<<if $PC.preg > 0>>
<<set WombProgress($PC, 1)>>
<<set $PC.preg=WombMaxPreg($PC), $PC.pregWeek = $PC.preg>>
<<set WombNormalizePreg($PC), $PC.pregWeek = $PC.preg>>
<<set _newBelly = WombGetVolume($PC)>>
<<if _newBelly >= $PC.belly>>
<<set $PC.belly = _newBelly>>
......
......@@ -317,6 +317,7 @@
<<set $slaves[$i].bellyPain = 0>>
<</if>>
/* preg speed and advance*/
<<if $slaves[$i].preg > 0>>
<<set _pregSpeed = 1>> /*base speed is normal*/
<<if $slaves[$i].pregControl == "slow gestation">>
......@@ -338,15 +339,16 @@
<<set $slaves[$i].broodmotherCountDown = 38 - WombMinPreg($slaves[$i])>>
<</if>>
<</if>>
<<set WombProgress($slaves[$i], _pregSpeed)>>
/* trick to avoid precision lost error showed like week: 29.499999999999998, moved to JS */
/* <<set $slaves[$i].preg = (Math.ceil($slaves[$i].preg*10)/10) >> */
<<set $slaves[$i].pregKnown = 1>>
<<set $slaves[$i].pregWeek++>>
<</if>>
<<if $slaves[$i].pregWeek < 0 >> /*postpartum state*/
<<set $slaves[$i].pregWeek++>>
<</if>>
<<SetBellySize $slaves[$i]>> /* here will be also set through WombGetVolume .bellyPreg, .pregType, to current values. */
/* end of preg speed and advance*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment