diff --git a/src/npc/generate/generateGenetics.js b/src/npc/generate/generateGenetics.js index 8d0e579b0f8b2325afc0e79f6ef0de57d2c94d97..f306ad9d026af3ce3f26f6697f0dc61752345221 100644 --- a/src/npc/generate/generateGenetics.js +++ b/src/npc/generate/generateGenetics.js @@ -103,7 +103,7 @@ globalThis.generateGenetics = (function() { genes.skin = setSkin(father, mother, actor2); genes.race = setRace(father, mother, actor2); genes.intelligence = setIntelligence(father, mother, activeMother, actor2, genes.inbreedingCoeff); - genes.face = setFace(father, mother, activeMother, actor2, genes.geneticQuirks); + genes.face = setFace(father, mother, activeMother, actor2, genes.geneticQuirks, genes.inbreedingCoeff); genes.faceShape = setFaceShape(father, mother, genes.geneticQuirks); genes.eyeColor = setEyeColor(father, mother, actor2); if (genes.geneticQuirks.heterochromia === 2) { @@ -614,7 +614,7 @@ globalThis.generateGenetics = (function() { } // face - function setFace(father, mother, activeMother, actor2, genes) { + function setFace(father, mother, activeMother, actor2, genes, inbreedingCoeff) { let face; if (genes.pFace > 0 && genes.uFace > 0) { face = 0; @@ -644,19 +644,8 @@ globalThis.generateGenetics = (function() { face = mother.face; } if (V.inbreeding === 1 && genes.pFace === 0 && genes.uFace === 0) { - if (mother.ID !== -1) { - if (father !== 0 && father.ID === -1 && activeMother.breedingMark !== 1) { - if (face > -100 && jsRandom(1, 100) > 60) { - face -= jsRandom(2, 20); - } - } else { - if (face > -100 && jsRandom(1, 100) < 50) { - face -= jsRandom(1, 15); - if (face >= -95 && jsRandom(1, 100) < 30) { - face -= jsRandom(5, 20); - } - } - } + if (jsRandom(1, 100) < inbreedingCoeff*200) { + face -= Math.abs(normalRandInt(5*inbreedingCoeff, 35*inbreedingCoeff, -100*coeff, 100*coeff)); } } return Math.clamp(face, -100, 100);