From 17ae990850f4cde1c278371768c19769d9a4f7c1 Mon Sep 17 00:00:00 2001 From: DCoded <dsoloha@live.com> Date: Tue, 21 May 2019 00:27:53 -0400 Subject: [PATCH] Revert changes to pregJS.js --- src/js/pregJS.js | 48 ++++++++++++++++-------------------------------- 1 file changed, 16 insertions(+), 32 deletions(-) diff --git a/src/js/pregJS.js b/src/js/pregJS.js index f9417498ebf..177fd0e483b 100644 --- a/src/js/pregJS.js +++ b/src/js/pregJS.js @@ -79,13 +79,11 @@ window.setPregType = function(actor) { */ - if (actor.broodmother < 1) { - // Broodmothers should be not processed here. Necessary now. + if (actor.broodmother < 1) { // Broodmothers should be not processed here. Necessary now. if (typeof actor.readyOva === "number" && actor.readyOva !== 0) { ovum = actor.readyOva; // just single override; for delayed impregnation cases } else if (actor.ID === -1) { - if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { - // Do not mix with sperm + if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm if (actor.fertDrugs === 1) { ovum += jsEither([2, 3, 3, 3, 3, 4, 4, 5]); } else { @@ -94,8 +92,7 @@ window.setPregType = function(actor) { if (actor.forcedFertDrugs > 0) { ovum += jsEither([3, 3, 4, 4, 5]); } - } else if (actor.geneticQuirks.hyperFertility === 2) { - // Predisposed to multiples + } else if (actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples if (actor.fertDrugs === 1) { ovum += jsEither([1, 2, 2, 2, 2, 3, 3, 4]); } else { @@ -104,8 +101,7 @@ window.setPregType = function(actor) { if (actor.forcedFertDrugs > 0) { ovum += jsEither([2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4]); } - } else if (actor.geneticQuirks.fertility === 2) { - // Predisposed to twins + } else if (actor.geneticQuirks.fertility === 2) { // Predisposed to twins if (actor.fertDrugs === 1) { ovum += jsEither([1, 1, 2, 2, 2, 2, 3, 3]); } else { @@ -127,15 +123,12 @@ window.setPregType = function(actor) { ovum = Math.clamp(ovum, 0, 8); } else if (actor.pregType === 0) { if (actor.eggType === "horse" || actor.eggType === "cow") { - if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { - // Do not mix with sperm + if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm ovum += jsEither([0, 0, 0, 0, 0, 0, 1]); fertilityStack += .8; - } else if (actor.geneticQuirks.hyperFertility === 2) { - // Predisposed to multiples + } else if (actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples fertilityStack += .4; - } else if (actor.geneticQuirks.fertility === 2) { - // Predisposed to twins + } else if (actor.geneticQuirks.fertility === 2) { // Predisposed to twins fertilityStack += .2; } if (actor.ovaImplant === "fertility") { @@ -183,19 +176,16 @@ window.setPregType = function(actor) { } } } else if (actor.eggType === "dog") { - if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { - // Do not mix with sperm + if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm ovum += jsEither([1, 2, 2, 3]); fertilityStack++; fertilityStack++; fertilityStack++; - } else if (actor.geneticQuirks.hyperFertility === 2) { - // Predisposed to multiples + } else if (actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples ovum += jsEither([0, 1, 1, 2]); fertilityStack++; fertilityStack++; - } else if (actor.geneticQuirks.fertility === 2) { - // Predisposed to twins + } else if (actor.geneticQuirks.fertility === 2) { // Predisposed to twins ovum += jsEither([0, 0, 0, 0, 1]); fertilityStack++; } @@ -255,16 +245,13 @@ window.setPregType = function(actor) { } } } else if (actor.eggType === "pig") { - if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { - // Do not mix with sperm + if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm ovum += jsRandom(4, 8); fertilityStack += 16; - } else if (actor.geneticQuirks.hyperFertility === 2) { - // Predisposed to multiples + } else if (actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples ovum += jsRandom(2, 6); fertilityStack += 10; - } else if (actor.geneticQuirks.fertility === 2) { - // Predisposed to twins + } else if (actor.geneticQuirks.fertility === 2) { // Predisposed to twins ovum += jsRandom(2, 4); fertilityStack += 6; } @@ -319,20 +306,17 @@ window.setPregType = function(actor) { } } } else { - if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { - // Do not mix with sperm + if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm ovum += jsEither([1, 2, 2, 3]); fertilityStack++; fertilityStack++; fertilityStack++; fertilityStack++; - } else if (actor.geneticQuirks.hyperFertility === 2) { - // Predisposed to multiples + } else if (actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples ovum += jsEither([0, 1, 1, 2]); fertilityStack++; fertilityStack++; - } else if (actor.geneticQuirks.fertility === 2) { - // Predisposed to twins + } else if (actor.geneticQuirks.fertility === 2) { // Predisposed to twins ovum += jsEither([0, 0, 0, 0, 1]); fertilityStack++; } else { -- GitLab