diff --git a/src/js/wombJS.tw b/src/js/wombJS.tw index e597fda5b3c3fd923313e8785606e49052d0a042..a1dbe68df29385539f6ec31efcb3fb9a7c4e9467 100644 --- a/src/js/wombJS.tw +++ b/src/js/wombJS.tw @@ -32,10 +32,20 @@ window.WombInit = function(actor) //Init womb system. actor.womb = []; } - if (actor.womb.length != actor.pregType) //backward compatibility setup. Fully accurate for normal pregnancy only, sorry but for already present broodmothers it's too hard to calculate. + if (actor.womb.length != actor.pregType && actor.broodmother == 0) //backward compatibility setup. Fully accurate for normal pregnancy only. { WombImpregnate(actor, actor.pregType, 0, actor.preg); } + elseif (actor.womb.length != actor.pregType && actor.broodmother == 1) //sorry but for already present broodmothers it's impossible to calculate fully, aproximation used. + { + var i, pw = actor.preg; + if (pw > 40) + pw = 40; //to avoid disaster. + for (i=0; i<pw; i++) + { + WombImpregnate(actor, 1, actor.pregSource, i); // setting 1 fetus for every week, up to 40 at max. + } + } } window.WombImpregnate = function(actor, fCount, fatherID, age)