Skip to content
Snippets Groups Projects
Commit c8a6ac2d authored by Pregmodder's avatar Pregmodder
Browse files

the fix

parent d56d2a36
No related branches found
No related tags found
No related merge requests found
...@@ -12,13 +12,13 @@ window.generateGenetics = (function() { ...@@ -12,13 +12,13 @@ window.generateGenetics = (function() {
function generateGenetics(actor1, actor2, x) { function generateGenetics(actor1, actor2, x) {
V = State.variables; V = State.variables;
genes = {gender: "XX", name: "blank", mother: 0, motherName: "none", father: 0, fatherName: "none", nationality: "Stateless", race: "white", intelligence: 0, face: 0, eyeColor: "brown", hColor: "black", skin: "white", markings: "none", behavioralFlaw: "none", sexualFlaw: "none", pubicHSyle: "bushy", underArmHStyle: "bushy", geneticQuirks: 0}; genes = {gender: "XX", name: "blank", surname: 0, mother: 0, motherName: "none", father: 0, fatherName: "none", nationality: "Stateless", race: "white", intelligence: 0, face: 0, eyeColor: "brown", hColor: "black", skin: "white", markings: "none", behavioralFlaw: "none", sexualFlaw: "none", pubicHSyle: "bushy", underArmHStyle: "bushy", geneticQuirks: 0};
mother = (actor1 > 0) ? V.genePool.findIndex(function(s) { return s.ID == actor1; }) : V.PC; mother = (actor1 > 0) ? V.genePool.findIndex(function(s) { return s.ID == actor1; }) : V.PC;
activeMother = (actor1 > 0) ? V.slaves[actor1] : V.PC; activeMother = (actor1 > 0) ? V.slaves[V.slaveIndices[actor1]] : V.PC;
father = (actor2 > 0) ? V.genePool.findIndex(function(s) { return s.ID == actor2; }) father = (actor2 > 0) ? V.genePool.findIndex(function(s) { return s.ID == actor2; })
: (actor2 == -1) ? V.PC : (actor2 == -1) ? V.PC
: 0; : 0;
activeFather = (father !== 0 && father.ID > 0) ? V.slaves[actor2] activeFather = (father !== 0 && father.ID > 0) ? V.slaves[V.slaveIndices[actor2]]
: (father !== 0 && father.ID == -1) ? V.PC : (father !== 0 && father.ID == -1) ? V.PC
: 0; : 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment