diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt index ec79cb2935bddd140e5add90a315a3f549b0e0ea..aad7ebe8377210b0d1cc2cc92d57e87cdd69c191 100644 --- a/devNotes/twine JS.txt +++ b/devNotes/twine JS.txt @@ -10081,7 +10081,7 @@ window.generateGenetics = (function() { function generateGenetics(actor1, actor2, x) { V = State.variables; - 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}; + genes = {gender: "XX", name: "blank", surname: 0, mother: 0, motherName: "none", father: 0, fatherName: "none", nationality: "Stateless", race: "white", intelligence: 0, face: 0, faceShape: "cute", eyeColor: "brown", hColor: "black", skin: "white", markings: "none", behavioralFlaw: "none", sexualFlaw: "none", pubicHSyle: "bushy", underArmHStyle: "bushy", geneticQuirks: 0}; if (actor1.ID > 0) { mother = V.genePool.find(function(s) { return s.ID == actor1.ID; }); if (mother === undefined) { @@ -11275,6 +11275,59 @@ window.WombSurrogate = function(actor, fCount, mother, fatherID, age) { WombImpregnate(actor, fCount, fatherID, age, mother); }; +window.WombImpregnateClone = function(actor, fCount, mother, motherOriginal, age) { + var i; + var tf; + for (i=0; i<fCount; i++) { + tf = {}; //new Object + tf.age = age; //initial age + tf.fatherID = mother.ID; //We can store who is father too. + tf.volume = 1; //Initial, to create property. Updated with actual data after WombGetVolume call. + tf.reserve = ""; //Initial, to create property. Used later to mark if this child is to be kept. + tf.identical = 0; //Initial, to create property. Updated with actual data during fetalSplit call. + tf.splitted = 0; //marker for already splitted fetus. + tf.motherID = mother.ID; //Initial biological mother ID setup. + tf.genetics = generateGenetics(mother, mother.ID, i+1); //Stored genetic information. + tf.ID = generateNewID(); + + //Welcome to having to set up common relatives for the slave and her clone + if (mother.father === 0 || (mother.father < -1 && mother.father >= -20 && mother.father !== -3)) { + mother.father = State.variables.missingParentID; + State.variables.missingParentID--; + } + if (mother.mother === 0 || (mother.mother < -1 && mother.mother >= -20 && mother.mother !== -3)) { + mother.father = State.variables.missingParentID; + State.variables.missingParentID--; + } + + //gene corrections + tf.genetics.gender = mother.genes; + tf.genetics.mother = mother.mother; + tf.genetics.motherName = mother.slaveName; + tf.genetics.father = mother.father; + tf.genetics.fatherName = mother.slaveName; + tf.genetics.intelligence = motherOriginal.intelligence; + tf.genetics.face = motherOriginal.face; + tf.genetics.faceShape = motherOriginal.faceShape; + tf.genetics.geneticQuirks = clone(motherOriginal.geneticQuirks); + tf.genetics.skin = motherOriginal.skin; + + try { + if (actor.womb.length == 0) { + actor.pregWeek = age; + actor.preg = age; + } + actor.womb.push(tf); + } catch(err){ + WombInit(actor); + actor.womb.push(tf); + alert("WombImpregnate warning - " + actor.slaveName+" "+err); + } + + } + MissingParentIDCorrection(actor); +}; + window.WombProgress = function(actor, ageToAdd) { var i, ft; ageToAdd = Math.ceil(ageToAdd*10)/10; @@ -11679,7 +11732,7 @@ window.WombChangeGene = function(actor, geneName, newValue) window.MissingParentIDCorrection = function(actor) { WombInit(actor); actor.womb - .filter(ft => (ft.genetics.father === 0 || (ft.genetics.father < -1 && ft.genetics.father >= -20))) + .filter(ft => (ft.genetics.father === 0 || (ft.genetics.father < -1 && ft.genetics.father >= -20 && ft.genetics.father !== -3))) .forEach(ft => ft.genetics.father = State.variables.missingParentID); State.variables.missingParentID--; } diff --git a/src/js/generateGenetics.tw b/src/js/generateGenetics.tw index 7de1243a7b0049d50d69f4a2ea2141229a78a6a5..27a865a65ede8ca376bb23ece3b86089ef1bbb0e 100644 --- a/src/js/generateGenetics.tw +++ b/src/js/generateGenetics.tw @@ -12,7 +12,7 @@ window.generateGenetics = (function() { function generateGenetics(actor1, actor2, x) { V = State.variables; - 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}; + genes = {gender: "XX", name: "blank", surname: 0, mother: 0, motherName: "none", father: 0, fatherName: "none", nationality: "Stateless", race: "white", intelligence: 0, face: 0, faceShape: "cute", eyeColor: "brown", hColor: "black", skin: "white", markings: "none", behavioralFlaw: "none", sexualFlaw: "none", pubicHSyle: "bushy", underArmHStyle: "bushy", geneticQuirks: 0}; if (actor1.ID > 0) { mother = V.genePool.find(function(s) { return s.ID == actor1.ID; }); if (mother === undefined) { diff --git a/src/js/wombJS.tw b/src/js/wombJS.tw index ef5f378bf9dcd9e607256481c27611f966b7de1a..d64eb0ad9fa5872535e597d709971fb99cb77018 100644 --- a/src/js/wombJS.tw +++ b/src/js/wombJS.tw @@ -120,6 +120,59 @@ window.WombSurrogate = function(actor, fCount, mother, fatherID, age) { WombImpregnate(actor, fCount, fatherID, age, mother); }; +window.WombImpregnateClone = function(actor, fCount, mother, motherOriginal, age) { + var i; + var tf; + for (i=0; i<fCount; i++) { + tf = {}; //new Object + tf.age = age; //initial age + tf.fatherID = mother.ID; //We can store who is father too. + tf.volume = 1; //Initial, to create property. Updated with actual data after WombGetVolume call. + tf.reserve = ""; //Initial, to create property. Used later to mark if this child is to be kept. + tf.identical = 0; //Initial, to create property. Updated with actual data during fetalSplit call. + tf.splitted = 0; //marker for already splitted fetus. + tf.motherID = mother.ID; //Initial biological mother ID setup. + tf.genetics = generateGenetics(mother, mother.ID, i+1); //Stored genetic information. + tf.ID = generateNewID(); + + //Welcome to having to set up common relatives for the slave and her clone + if (mother.father === 0 || (mother.father < -1 && mother.father >= -20 && mother.father !== -3)) { + mother.father = State.variables.missingParentID; + State.variables.missingParentID--; + } + if (mother.mother === 0 || (mother.mother < -1 && mother.mother >= -20 && mother.mother !== -3)) { + mother.father = State.variables.missingParentID; + State.variables.missingParentID--; + } + + //gene corrections + tf.genetics.gender = mother.genes; + tf.genetics.mother = mother.mother; + tf.genetics.motherName = mother.slaveName; + tf.genetics.father = mother.father; + tf.genetics.fatherName = mother.slaveName; + tf.genetics.intelligence = motherOriginal.intelligence; + tf.genetics.face = motherOriginal.face; + tf.genetics.faceShape = motherOriginal.faceShape; + tf.genetics.geneticQuirks = clone(motherOriginal.geneticQuirks); + tf.genetics.skin = motherOriginal.skin; + + try { + if (actor.womb.length == 0) { + actor.pregWeek = age; + actor.preg = age; + } + actor.womb.push(tf); + } catch(err){ + WombInit(actor); + actor.womb.push(tf); + alert("WombImpregnate warning - " + actor.slaveName+" "+err); + } + + } + MissingParentIDCorrection(actor); +}; + window.WombProgress = function(actor, ageToAdd) { var i, ft; ageToAdd = Math.ceil(ageToAdd*10)/10; @@ -524,7 +577,7 @@ window.WombChangeGene = function(actor, geneName, newValue) window.MissingParentIDCorrection = function(actor) { WombInit(actor); actor.womb - .filter(ft => (ft.genetics.father === 0 || (ft.genetics.father < -1 && ft.genetics.father >= -20))) + .filter(ft => (ft.genetics.father === 0 || (ft.genetics.father < -1 && ft.genetics.father >= -20 && ft.genetics.father !== -3))) .forEach(ft => ft.genetics.father = State.variables.missingParentID); State.variables.missingParentID--; } diff --git a/src/pregmod/cloningWorkaround.tw b/src/pregmod/cloningWorkaround.tw new file mode 100644 index 0000000000000000000000000000000000000000..b1217fc5bab5a3da73800ced6cd600effdc3cba1 --- /dev/null +++ b/src/pregmod/cloningWorkaround.tw @@ -0,0 +1,29 @@ +:: Cloning Workaround [nobr] + +<<set $nextButton = "Cancel", $receptrix = 0, _eligibility = 0>> + +//You've decided to clone <<if $donatrix.ID == -1>>yourself<<else>>$donatrix.slaveName<</if>>.// + +<br><br> + +__Select a slave to serve as the host for the clone__ + +<br> + +<<for _otw = 0; _otw < $slaves.length; _otw++>> +<<capture _otw>> + <<if ($slaves[_otw].ovaries > 0 || $slaves[_otw].mpreg > 0) && isSlaveAvailable($slaves[_otw]) && $slaves[_otw].preg >= 0 && $slaves[_otw].preg < $slaves[_otw].pregData.normalBirth/10 && $slaves[_otw].pregWeek >= 0 && $slaves[_otw].pubertyXX == 1 && $slaves[_otw].pregType < 12 && $slaves[_otw].bellyImplant == -1 && $slaves[_otw].broodmother == 0 && $slaves[_otw].inflation <= 2 && $slaves[_otw].physicalAge < 70>> + <<set _name = SlaveFullName($slaves[_otw])>> + <br><<print "[[_name|Surrogacy][$receptrix = $slaves[" + _otw + "], $cash -= ($surgeryCost*2), $surgeryType = 'clone']]">> <<if $slaves[_otw].pregType >= 4>>//Using a slave carrying multiples is unadvisable//<</if>> + <<set _eligibility = 1>> + <</if>> +<</capture>> +<</for>> +<<if (_eligibility == 0)>> + <br>//You have no slaves capable of acting as an incubator.// +<</if>> + +<<if $PC.vagina == 1 && $donatrix.ID != -1 && $PC.preg >= 0 && $PC.preg < 4 && $PC.pregType < 8 && $PC.physicalAge < 70>> + <br> + [[Use your own womb|Surrogacy][$receptrix = $PC, $cash -= ($surgeryCost*2), $surgeryType = 'clone']] +<</if>> diff --git a/src/pregmod/geneLab.tw b/src/pregmod/geneLab.tw index 62df1dce36729b39206d2fbafbd17b09bb1dd563..6eafad5e682959ee9d2ed54221316394ebe68611 100644 --- a/src/pregmod/geneLab.tw +++ b/src/pregmod/geneLab.tw @@ -7,4 +7,26 @@ The Gene Lab <hr> -//The gene lab is fully operational. It can identify genetic traits in slaves. It can be used to modify a slave's genome should you obtain the data necessary to adjust it.// \ No newline at end of file +//The gene lab is fully operational. It can identify genetic traits in slaves. It can be used to modify a slave's genome should you obtain the data necessary to adjust it.// + +<br> +Genetic Harvesting +<hr> + +<<if ($cloningSystem != 1) && ($rep <= 18000*_PCSkillCheck)>> + //You lack the reputation needed to access methods for human cloning// + <br> +<<elseif ($cloningSystem != 1) && ($rep > 18000*_PCSkillCheck)>> + <<if $organFarmUpgrade == 0>> + //An organ farm is needed to grow the blank embryo to serve as a clone base// + <br> + <<else>> + [[Purchase methods for human cloning|Gene Lab][$cash -= 100000*_PCSkillCheck, $cloningSystem = 1]] + //Costs <<print cashFormat(100000*_PCSkillCheck)>>// + <br> //Will allow children to be created with indentical base genetics as the source DNA// + <br> + <</if>> +<<elseif ($cloningSystem > 0)>> + The gene lab is capable of implanting a slave's genetic sequence into a blank embryo to produce a basic clone. + <br> +<</if>> \ No newline at end of file diff --git a/src/pregmod/organFarm.tw b/src/pregmod/organFarm.tw index a02800325e7007a08fc2c475eb0395ee8ac05620..549c903794f7158d0c022a5ba65fbcb7efa8732b 100644 --- a/src/pregmod/organFarm.tw +++ b/src/pregmod/organFarm.tw @@ -132,19 +132,17 @@ Organ Production <br> <</if>> -<<if $organFarmUpgrade > 0>> - <<if ($youngerOvaries != 1) && ($rep <= 10000*_PCSkillCheck)>> - //You lack the reputation to access designs for cloning fertile ovaries for menopausal slaves.// - <br> - <<elseif ($youngerOvaries != 1) && ($rep > 10000*_PCSkillCheck)>> - [[Purchase designs for cloning fertile ovaries for menopausal slaves|Organ Farm][$cash -= 30000*_PCSkillCheck, $youngerOvaries = 1]] - //Costs <<print cashFormat(30000*_PCSkillCheck)>>// - <br> //Will allow the growth of younger, fertile ovaries for menopausal slaves. Restored fertility will only last for a couple years at most.// - <br> - <<elseif ($youngerOvaries > 0)>> - The organ farm is capable of growing fertile ovaries for postmenopausal slaves. - <br> - <</if>> +<<if ($youngerOvaries != 1) && ($rep <= 10000*_PCSkillCheck)>> + //You lack the reputation to access designs for cloning fertile ovaries for menopausal slaves.// + <br> +<<elseif ($youngerOvaries != 1) && ($rep > 10000*_PCSkillCheck)>> + [[Purchase designs for cloning fertile ovaries for menopausal slaves|Organ Farm][$cash -= 30000*_PCSkillCheck, $youngerOvaries = 1]] + //Costs <<print cashFormat(30000*_PCSkillCheck)>>// + <br> //Will allow the growth of younger, fertile ovaries for menopausal slaves. Restored fertility will only last for a couple years at most.// + <br> +<<elseif ($youngerOvaries > 0)>> + The organ farm is capable of growing fertile ovaries for postmenopausal slaves. + <br> <</if>> /* <<if $seePreg != 0 && $seeBestiality != 0>> diff --git a/src/pregmod/surrogacy.tw b/src/pregmod/surrogacy.tw index f3a6ee56a5d99da4c43efcd2b9c4ac8e2cfc6020..c354345b273996c4a6f23cab0231976142f49c4e 100644 --- a/src/pregmod/surrogacy.tw +++ b/src/pregmod/surrogacy.tw @@ -118,4 +118,56 @@ <</if>> <<set $receptrix = 0, $donatrix = 0, $wombIndex = 0>> +<<case "clone">> + + <<if $receptrix.ID == -1>> + Since the surgery required only a local anesthetic, you remain fully aware of the procedure as the autosurgery carries it out. You slowly rise to your feet, a hand to your lower belly, appreciating the clone growing within you. + <<set $PC.pregKnown = 1>> + <<run WombImpregnate($PC, 1, $donatrix.ID, $impregnatrix.ID, 1)>> + <<run WombNormalizePreg($PC)>> + <<else>> + <<set $receptrix.pregKnown = 1>> + <<run WombSurrogate($receptrix, 1, $donatrix, $impregnatrix.ID, 1)>> + <<run WombNormalizePreg($receptrix)>> + <<setLocalPronouns $receptrix>> + <<if $receptrix.fetish == "mindbroken">> + $receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated. + <<elseif ($receptrix.fetish == "pregnancy") && ($receptrix.fetishStrength > 60) && ($receptrix.fetishKnown == 1)>> + <<if canSee($receptrix)>> + Since the surgery required only a local anesthetic, $receptrix.slaveName remained fully aware throughout the procedure. $He was overjoyed at the sight of the syringe containing $his future child emptying into $his womb. + <<else>> + $receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated. + <</if>> + $He is @@.hotpink; filled with joy@@ over the life settling into $his womb and can't wait to see the result. $He's so pleased that $he now @@.mediumaquamarine;trusts@@ your plans for $his body. + <<set $receptrix.trust += 4, $receptrix.devotion += 10>> + <<elseif ($receptrix.devotion > 50)>> + <<if canSee($receptrix)>> + Since the surgery required only a local anesthetic, $receptrix.slaveName remained fully aware throughout the procedure. $He watched the syringe containing $his new pregnancy empty into $his womb with rapt attention. + <<else>> + $receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated. + <</if>> + $He's @@.hotpink;grateful@@ that you think $him worthy of carrying this child, and a little nervous about how $he'll perform as a surrogate. + <<set $receptrix.devotion += 4>> + <<elseif ($receptrix.devotion >= -20)>> + <<if canSee($receptrix)>> + Since the surgery required only a local anesthetic, $receptrix.slaveName remained fully aware throughout the procedure. From the syringe making contact with $his skin, to the egg's delivery into $his womb and $his subsequent impregnation, $he couldn't look away. + <<else>> + $receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated. + <</if>> + $He understands the realities of $his life as a slave, so it isn't much of a shock. $He is @@.gold;sensibly fearful@@ of your total power over $his body. + <<set $receptrix.trust -= 10>> + <<else>> + <<if canSee($receptrix)>> + Since the surgery required only a local anesthetic, $receptrix.slaveName remained fully aware throughout the procedure. The moment $he realized what was happening, $he shut $his eyes tight, only opening them again as $he feels the slight tingle of the injector exiting $his lower abdomen. + <<else>> + $receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated. + <</if>> + $He does not understand the realities of $his life as a slave at a core level, so $he's @@.mediumorchid;terrified and angry@@ that you have forced $him to bear this child, even more so as $he realizes $he doesn't know who the father is. $He is @@.gold;sensibly fearful@@ of your total power over $his body and the future of the life $he now harbors within $him. + <<set $receptrix.trust -= 15, $receptrix.devotion -= 15>> + <</if>> + <<set _surr = $slaves.findIndex(function(s) { return s.ID == $receptrix.ID; })>> + <<set $slaves[_surr] = $receptrix>> + <</if>> + <<set $receptrix = 0, $impregnatrix = 0, $donatrix = 0>> + <</switch>> \ No newline at end of file