diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt index 24940631d44baf076a0ccf215161d34468604fc5..19c455f0e9e11703faa0400160313f778cb5193d 100644 --- a/devNotes/twine JS.txt +++ b/devNotes/twine JS.txt @@ -4405,7 +4405,7 @@ if(eventSlave.fetish != "mindbroken") { } } if(eventSlave.ID != State.variables.HeadGirl.ID) { - if(canSee(eventSlave)) { + if(canSee(eventSlave) && canWalk(eventSlave)) { if(eventSlave.speechRules != "restrictive") { if(eventSlave.trust > 75) { if(eventSlave.devotion > 50) { diff --git a/src/js/generateGenetics.tw b/src/js/generateGenetics.tw index 9a0e2c30dcc67f4904c0b26ad5a2e70a9228a362..8d7408ea0cf6d0ad52e8e0df7a8d34270e92812a 100644 --- a/src/js/generateGenetics.tw +++ b/src/js/generateGenetics.tw @@ -452,3 +452,242 @@ window.generateGenetics = (function() { })(); + // this needs to be added for all + <<if $PC.pregSource < 1 && $PC.pregSource != -6 && $PC.reservedChildren > 0>> + <<set $missingParent = $missingParentID>> + <<set $missingParentID-->> + <</if>> + +window.generateChild = function(mother, ova, destination) { + +let V = State.variables; +let child = V.activeSlave; +let genes = ova.genetics; //maybe just argument this? We'll see. +let pregUpgrage = V.pregnancyMonitoringUpgrade; + +if (!destination) { //does extra work for the incubator if defined, otherwise builds a simple object + child.physicalAge = child.actualAge; + child.visualAge = child.actualAge; + child.actualAge = child.actualAge; +} else { + + V.activeSlaveOneTimeMinAge = V.targetAge; + V.activeSlaveOneTimeMaxAge = V.targetAge; + V.one_time_age_overrides_pedo_mode = 1; + V.ageAdjustOverride = 1; + + if (genes.gender = "XX") { + GenerateNewSlave("XX"); + child.slaveSurname = genes.surname; + if (!pregUpgrage) { + if (genes.mother == -1) { + if (genes.father <= 0) { + child.slaveName = "Your daughter"; + } else { + child.slaveName = `Your and ${genes.fatherName}'s daughter`; + } + child.slaveSurname = V.PC.surname; + } else { + if (genes.father == -1) { + child.slaveName = `${genes.motherName} and your daughter`; + child.slaveSurname = V.PC.surname; + } else if (genes.father > 0) { + child.slaveName = `${genes.motherName} and ${genes.fatherName}'s daughter`; + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } else { + let currentFather = getSlave(genes.father); + if (currentFather !== undefined) { + if (currentFather.slaveSurname !== 0 && !== "") { + child.slaveSurname = currentFather.slaveSurname; + } + } + } + } else { + child.slaveName = `${genes.motherName}'s bastard son`; + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } + } + } + } else { + child.slaveName = genes.name; + } + } else { + GenerateNewSlave("XY"); + child.slaveSurname = genes.surname; + if (!pregUpgrage) { + if (genes.mother == -1) { + if (genes.father <= 0) { + child.slaveName = "Your son"; + } else { + child.slaveName = `Your and ${genes.fatherName}'s son`; + } + child.slaveSurname = V.PC.surname; + } else { + if (genes.father == -1) { + child.slaveName = `${genes.motherName} and your son`; + child.slaveSurname = V.PC.surname; + } else if (genes.father > 0) { + child.slaveName = `${genes.motherName} and ${genes.fatherName}'s son`; + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } else { + let currentFather = getSlave(genes.father); + if (currentFather !== undefined) { + if (currentFather.slaveSurname !== 0 && !== "") { + child.slaveSurname = currentFather.slaveSurname; + } + } + } + } else { + child.slaveName = `${genes.motherName}'s bastard son`; + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } + } + } + } else { + child.slaveName = genes.name; + } + } + + child.mother = genes.mother; + child.father = genes.father; + child.nationality = genes.nationality; + child.skin = genes.skin; + child.origSkin = child.skin; + child.race = genes.race; + child.origRace = child.race; + child.intelligence = genes.intelligence; + if (mother.prematureBirth > 0) { + if (child.intelligence >= -90) { + child.intelligence -= jsRandom(0,10) + } + child.premature = 1; + } + child.face = genes.face; + child.eyeColor = genes.eyeColor; + child.origEye = child.eyeColor; + child.hColor = genes.hColor; + child.origHColor = child.HColor; + child.underArmHStyle = genes.underArmHStyle; + child.pubicHStyle = genes.pubicHStyle; + child.markings = genes.markings; + child.sexualFlaw = genes.sexualFlaw; + child.behavioralFlaw = genes.behavioralFlaw; + child.fetish = genes.fetish; + child.pubicHColor = child.hColor; + child.underArmHColor = child.hColor; + child.eyebrowHColor = child.hColor; + child.actualAge = child.actualAge; + child.birthWeek = child.birthWeek; + child.energy = 0; + child.anus = 0; + if (child.vagina > 0) {child.vagina = 0;} + if (child.fetish != "none") {child.fetishStrength = 20;} + if (child.dick > 0) { + child.foreskin = 1; + child.balls = 1; + child.scrotum = 1; + } + if (mother.addict > 0) { + child.addict = Math.trunc(mother.addict/2); + } + child.career = "a slave since birth"; + child.birthName = $activeSlave.slaveName; + child.birthSurname = $activeSlave.slaveSurname; + child.devotion = 0; + child.trust = 0; + child.weekAcquired = V.week; + if (child.nationality == "Stateless") { + if (V.arcologies[0].FSRomanRevivalist > 90) { + child.nationality = "Roman Revivalist"; + } else if (V.arcologies[0].FSAztecRevivalist > 90) { + child.nationality = "Aztec Revivalist"; + } else if (V.arcologies[0].FSEgyptianRevivalist > 90) { + child.nationality = "Ancient Egyptian Revivalist"; + } else if (V.arcologies[0].FSEdoRevivalist > 90) { + child.nationality = "Edo Revivalist"; + } else if (V.arcologies[0].FSArabianRevivalist > 90) { + child.nationality = "Arabian Revivalist"; + } else if (V.arcologies[0].FSChineseRevivalist > 90) { + child.nationality = "Ancient Chinese Revivalist"; + } + } + + child.weight = -100; + child.muscles = -100; + child.boobs = 0; + child.butt = 0; + child.chem = 990; + child.areolaePiercing = 0; + child.corsetPiercing = 0; + child.boobsImplant = 0; + child.boobsImplantType = 0; + child.nipplesPiercing = 0; + child.areolaePiercing = 0; + child.lactation = 0; + child.hipsImplant = 0; + child.buttImplant = 0; + child.buttImplantType = 0; + child.lipsImplant = 0; + child.lipsPiercing = 0; + child.tonguePiercing = 0; + child.vaginaPiercing = 0; + child.preg = 0; + child.pregType = 0; + child.pregKnown = 0; + child.belly = 0; + child.bellyPreg = 0; + child.bellyFluid = 0; + child.bellyImplant = -1; + child.clitPiercing = 0; + child.dickPiercing = 0; + child.makeup = 0; + child.nails = 0; + child.earPiercing = 0; + child.nosePiercing = 0; + child.eyebrowPiercing = 0; + child.stampTat = 0; + child.bellyTat = 0; + child.anusPiercing = 0; + child.anusTat = 0; + child.shouldersTat = 0; + child.armsTat = 0; + child.legsTat = 0; + child.backTat = 0; + child.combatSkill = 0; + child.whoreSkill = 0; + child.entertainSkill = 0; + child.oralSkill = 0; + child.analSkill = 0; + child.vaginalSkill = 0; + child.accent = 4; + child.canRecruit = 0; + child.hStyle = "long"; + child.hLength = 300; + if (V.incubatorImprintSetting == "terror") { + child.origin = "She was conditioned from birth into mindless terror in an aging tank."; + child.tankBaby = 2; + } else { + child.origin = "She was conditioned from birth into trusting obedience in an aging tank."; + child.tankBaby = 1; + } + child.intelligenceImplant = 0; + child.navelPiercing = 0; + + return child; +} \ No newline at end of file