From b3d68f08f94cf53d2bd6e8ef13b00ae3a3d1baff Mon Sep 17 00:00:00 2001 From: Pregmodder <pregmodder@gmail.com> Date: Fri, 11 May 2018 19:10:07 -0400 Subject: [PATCH] progress and successful birth of identical twins. --- src/js/wombJS.tw | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/js/wombJS.tw b/src/js/wombJS.tw index e481ffbef1f..054018dd62c 100644 --- a/src/js/wombJS.tw +++ b/src/js/wombJS.tw @@ -343,19 +343,17 @@ window.fetalSplit = function(actor) nft.sex = Math.round(Math.random())+1; nft.volume = 1; nft.identical = 0; - - for (i in actor.womb) - { - ft = actor.womb[i]; - if (jsRandom(1,1000) > 900 && ft.identical !== 1) + + actor.womb.forEach(function(s){ + if (jsRandom(1,1000) > 900 && s.identical !== 1) nft = {}; - nft.age = ft.age; - nft.fatherID = ft.fatherID; - nft.sex = ft.sex; - nft.volume = ft.volume; + nft.age = s.age; + nft.fatherID = s.fatherID; + nft.sex = s.sex; + nft.volume = s.volume; actor.womb.push(nft); - ft.identical = 1; - } + s.identical = 1; + }); WombNormalizePreg(actor); } -- GitLab