diff --git a/src/js/generateGenetics.js b/src/js/generateGenetics.js index 18edd334bc2c03dbe8bb91d698bc46c634dc85ee..da4e3cf76803f6a6c1c3cf590a27162640d3121d 100644 --- a/src/js/generateGenetics.js +++ b/src/js/generateGenetics.js @@ -825,7 +825,7 @@ window.generateGenetics = (function() { } else { quirks.albinism = 1; } - } else if (mother.geneticQuirks.albinism === 1 + father.geneticQuirks.albinism >= 3) { + } else if (mother.geneticQuirks.albinism + father.geneticQuirks.albinism >= 3) { chance = jsRandom(1, 4); if (chance === 1) { quirks.albinism = 2; @@ -856,7 +856,7 @@ window.generateGenetics = (function() { } else { quirks.heterochromia = 1; } - } else if (mother.geneticQuirks.heterochromia === 1 + father.geneticQuirks.heterochromia >= 3) { + } else if (mother.geneticQuirks.heterochromia + father.geneticQuirks.heterochromia >= 3) { chance = jsRandom(1, 4); if (chance === 1) { quirks.heterochromia = 2; @@ -878,6 +878,39 @@ window.generateGenetics = (function() { } } } + + //rear lipedema + if (father !== 0) { + if (mother.geneticQuirks.rearLipedema === 2 && father.geneticQuirks.rearLipedema === 2) { + if (jsRandom(1, 4) >= 3) { + quirks.rearLipedema = 2; + } else { + quirks.rearLipedema = 1; + } + } else if (mother.geneticQuirks.rearLipedema === 1 + father.geneticQuirks.rearLipedema >= 3) { + chance = jsRandom(1, 4); + if (chance <= 2) { + quirks.rearLipedema = 2; + } else if (chance === 4) { + quirks.rearLipedema = 1; + } + } else if (mother.geneticQuirks.rearLipedema === 1 && father.geneticQuirks.rearLipedema === 1) { + if (jsRandom(1, 4) === 1) { + quirks.rearLipedema = 2; + } else if (chance === 4) { + quirks.rearLipedema = 1; + } + } + } else if (mother.geneticQuirks.rearLipedema >= 1) { + if (jsRandom(0, 40000) >= 35000) { + chance = jsRandom(1, 4); + if (chance <= 2) { + quirks.rearLipedema = 2; + } else if (chance === 4) { + quirks.rearLipedema = 1; + } + } + } return clone(quirks); }