diff --git a/src/js/wombJS.tw b/src/js/wombJS.tw index e481ffbef1f3f3b9585421351876f996d61c76ae..054018dd62c22e8759a442b6247fa19c0026a969 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); }