From ef0acbcc392d6a3d2ac30556c866373bedc05883 Mon Sep 17 00:00:00 2001 From: klorpa <30924131+klorpa@users.noreply.github.com> Date: Wed, 20 Feb 2019 20:53:17 -0600 Subject: [PATCH] MiscStuff --- src/js/generateGenetics.js | 41 +- src/npc/startingGirls/commitStartingGirl.tw | 129 +- src/utility/extendedFamilyWidgets.tw | 2098 +++++++++---------- 3 files changed, 1134 insertions(+), 1134 deletions(-) diff --git a/src/js/generateGenetics.js b/src/js/generateGenetics.js index 28437dc24a4..c5bf06bf40a 100644 --- a/src/js/generateGenetics.js +++ b/src/js/generateGenetics.js @@ -201,26 +201,27 @@ window.generateGenetics = (function() { //skin function setSkin(father, mother) { let skinToMelanin = { - 'pure black': 22, - ebony: 21, - black: 20, - 'dark brown': 19, - brown: 18, - 'light brown': 17, - dark: 16, + 'pure black': 23, + 'ebony': 22, + 'black': 21, + 'dark brown': 20, + 'brown': 19, + 'light brown': 18, + 'dark': 17, + 'darkened': 16, 'dark olive': 15, - bronzed: 14, - tanned: 13, - natural: 12, - olive: 11, + 'bronzed': 14, + 'tanned': 13, + 'natural': 12, + 'olive': 11, 'light olive': 10, - lightened: 9, - light: 8, - white: 7, - fair: 6, + 'lightened': 9, + 'light': 8, + 'white': 7, + 'fair': 6, 'very fair': 5, 'extremely fair': 4, - pale: 3, + 'pale': 3, 'extremely pale': 2, 'pure white': 1 }; @@ -233,7 +234,7 @@ window.generateGenetics = (function() { if (!skinToMelanin.hasOwnProperty(prop)) continue; if (skinIndex >= skinToMelanin[prop]) return prop; } - return prop; // skinIndex can be zero + return prop; // skinIndex can be zero - now false? } // eyeColor @@ -262,7 +263,7 @@ window.generateGenetics = (function() { eyeColor = jsEither([mother.origEye, father.origEye]); } } else if (actor2 === -2 || actor2 === 0 || actor2 === -5) { - eyeColor = jsEither([mother.origEye, "brown", "blue", "brown", "green", "hazel", "green"]); + eyeColor = jsEither([mother.origEye, "blue", "brown", "brown", "green", "green", "hazel"]); } else { eyeColor = mother.origEye; } @@ -273,7 +274,7 @@ window.generateGenetics = (function() { break; case "milky white": case "implant": - eyeColor = jsEither(["blue", "green", "brown", "hazel", "light blue", "light green", "dark green", "dark blue"]); + eyeColor = jsEither(["blue", "brown", "dark blue", "dark green", "green", "hazel", "light blue", "light green"]); break; } return eyeColor; @@ -301,7 +302,7 @@ window.generateGenetics = (function() { hairColor = jsEither([mother.origHColor, father.origHColor]); } } else if (actor2 === -2 || actor2 === 0 || actor2 === -5) { - hairColor = jsEither([mother.origHColor, "brown", "blonde", "black", "brown", "black", "brown", "black"]); + hairColor = jsEither([mother.origHColor, "black", "black", "black", "blonde", "brown", "brown", "brown"]); } else { hairColor = mother.origHColor; } diff --git a/src/npc/startingGirls/commitStartingGirl.tw b/src/npc/startingGirls/commitStartingGirl.tw index 9007f8afc6e..e7dacaf4bc0 100644 --- a/src/npc/startingGirls/commitStartingGirl.tw +++ b/src/npc/startingGirls/commitStartingGirl.tw @@ -40,82 +40,81 @@ <br>[[Add another slave, based on the previous slave|Starting Girls][$activeSlave = $slaveWithoutBonuses, $activeSlave.relation = 0, $activeSlave.relationTarget = 0, $startingGirlCopied = 1]] <</if>> <<if $createRelatedSlave == 1>> - <br> - //Add another slave, related to the previous slave:// - <br> - <<if $familyTesting == 1>> - /* Not needed due to stuffedanon's work - <<if $activeSlave.actualAge >= $fertilityAge>> - <<if $activeSlave.ovaries>> - <br> - [[Daughter|RG AS Dump][$returnTo = "Starting Girls", $startingGirlRelation = "mother", $startingGirlCopied = 1]] - <</if>> - <</if>> - <<if $activeSlave.actualAge >= $potencyAge>> - <<if $activeSlave.balls>> - <br> - [[Dick-daughter|RG AS Dump][$returnTo = "Starting Girls", $startingGirlRelation = "father", $startingGirlCopied = 1]] - //A slave daughter carried and birthed by another woman, impregnated by $activeSlave.slaveName.// - <</if>> - <</if>> - /% I'm aware this term is ridiculous. If anyone can come up with a better word to reconcile all slaves being female with the act of fatherhood and the masculine nature of the word father, I'm all ears. Wrote myself into a corner on this one. %/ - <<if $seeDicks != 100>> - <<if $activeSlave.actualAge <= ($retirementAge - $fertilityAge)>> - <<if $activeSlave.mother <= 0>> + <br> + //Add another slave, related to the previous slave:// + <br> + <<if $familyTesting == 1>> + /* Not needed due to stuffedanon's work + <<if $activeSlave.actualAge >= $fertilityAge>> + <<if $activeSlave.ovaries>> <br> - [[Mother|RG AS Dump][$returnTo = "Starting Girls", $activeSlave.mother = $IDNumber, $startingGirlRelation = "daughter", $startingGirlCopied = 1]] - <<else>> - //This slave already has a mother.// + [[Daughter|RG AS Dump][$returnTo = "Starting Girls", $startingGirlRelation = "mother", $startingGirlCopied = 1]] <</if>> <</if>> - <</if>> - <<if $seeDicks>> - <<if $activeSlave.actualAge <= ($retirementAge - $potencyAge)>> - <<if $activeSlave.father <= 0>> + <<if $activeSlave.actualAge >= $potencyAge>> + <<if $activeSlave.balls>> <br> - [[Dick-mother|RG AS Dump][$returnTo = "Starting Girls", $activeSlave.father = $IDNumber, $startingGirlRelation = "dickdaughter", $startingGirlCopied = 1]] - //A slave who provided the impregnation to create $activeSlave.slaveName.// - <<else>> - //This slave already has a dick-mother.// + [[Dick-daughter|RG AS Dump][$returnTo = "Starting Girls", $startingGirlRelation = "father", $startingGirlCopied = 1]] + //A slave daughter carried and birthed by another woman, impregnated by $activeSlave.slaveName.// <</if>> <</if>> - <</if>> - <<if $activeSlave.actualAge < $retirementAge>> - <br> - [[Older Sister|RG AS Dump][$returnTo = "Starting Girls", $startingGirlRelation = "older sister", $startingGirlCopied = 1]] - <</if>> - <br> - [[Twin|RG AS Dump][$returnTo = "Starting Girls", $startingGirlRelation = "twin", $startingGirlCopied = 1]] - <<if $activeSlave.actualAge > $minimumSlaveAge>> - <br> - [[Younger Sister|RG AS Dump][$returnTo = "Starting Girls", $startingGirlRelation = "younger sister", $startingGirlCopied = 1]] - <</if>> - */ - <br> //Use "based on the previous slave" and the available .father and .mother controls to create your family// - <<else>> - - <br> - <<if $activeSlave.actualAge >= $fertilityAge>> - <br> - [[Daughter|RG AS Dump][$returnTo = "Starting Girls", $activeSlave.relation = "mother", $startingGirlRelation = "mother", $activeSlave.birthsTotal += 1, $activeSlave.relationTarget = $activeSlave.ID+1, $startingGirlCopied = 1]] - <</if>> - <<if $activeSlave.actualAge <= ($retirementAge - $fertilityAge)>> + /% I'm aware this term is ridiculous. If anyone can come up with a better word to reconcile all slaves being female with the act of fatherhood and the masculine nature of the word father, I'm all ears. Wrote myself into a corner on this one. %/ + <<if $seeDicks != 100>> + <<if $activeSlave.actualAge <= ($retirementAge - $fertilityAge)>> + <<if $activeSlave.mother <= 0>> + <br> + [[Mother|RG AS Dump][$returnTo = "Starting Girls", $activeSlave.mother = $IDNumber, $startingGirlRelation = "daughter", $startingGirlCopied = 1]] + <<else>> + //This slave already has a mother.// + <</if>> + <</if>> + <</if>> + <<if $seeDicks>> + <<if $activeSlave.actualAge <= ($retirementAge - $potencyAge)>> + <<if $activeSlave.father <= 0>> + <br> + [[Dick-mother|RG AS Dump][$returnTo = "Starting Girls", $activeSlave.father = $IDNumber, $startingGirlRelation = "dickdaughter", $startingGirlCopied = 1]] + //A slave who provided the impregnation to create $activeSlave.slaveName.// + <<else>> + //This slave already has a dick-mother.// + <</if>> + <</if>> + <</if>> + <<if $activeSlave.actualAge < $retirementAge>> + <br> + [[Older Sister|RG AS Dump][$returnTo = "Starting Girls", $startingGirlRelation = "older sister", $startingGirlCopied = 1]] + <</if>> <br> - [[Mother|RG AS Dump][$returnTo = "Starting Girls", $activeSlave.relation = "daughter", $startingGirlRelation = "daughter", $activeSlave.relationTarget = $activeSlave.ID+1, $startingGirlCopied = 1]] - <</if>> - <<if $activeSlave.actualAge < $retirementAge>> + [[Twin|RG AS Dump][$returnTo = "Starting Girls", $startingGirlRelation = "twin", $startingGirlCopied = 1]] + <<if $activeSlave.actualAge > $minimumSlaveAge>> + <br> + [[Younger Sister|RG AS Dump][$returnTo = "Starting Girls", $startingGirlRelation = "younger sister", $startingGirlCopied = 1]] + <</if>> + */ + <br> //Use "based on the previous slave" and the available .father and .mother controls to create your family// + <<else>> <br> - [[Older Sister|RG AS Dump][$returnTo = "Starting Girls", $activeSlave.relation = "sister", $startingGirlRelation = "older sister", $activeSlave.relationTarget = $activeSlave.ID+1, $startingGirlCopied = 1]] - <</if>> - <br> - [[Twin|RG AS Dump][$returnTo = "Starting Girls", $activeSlave.relation = "twin", $startingGirlRelation = "twin", $activeSlave.relationTarget = $activeSlave.ID+1, $startingGirlCopied = 1]] - <<if $activeSlave.actualAge > $minimumSlaveAge>> + <<if $activeSlave.actualAge >= $fertilityAge>> + <br> + [[Daughter|RG AS Dump][$returnTo = "Starting Girls", $activeSlave.relation = "mother", $startingGirlRelation = "mother", $activeSlave.birthsTotal += 1, $activeSlave.relationTarget = $activeSlave.ID+1, $startingGirlCopied = 1]] + <</if>> + <<if $activeSlave.actualAge <= ($retirementAge - $fertilityAge)>> + <br> + [[Mother|RG AS Dump][$returnTo = "Starting Girls", $activeSlave.relation = "daughter", $startingGirlRelation = "daughter", $activeSlave.relationTarget = $activeSlave.ID+1, $startingGirlCopied = 1]] + <</if>> + <<if $activeSlave.actualAge < $retirementAge>> + <br> + [[Older Sister|RG AS Dump][$returnTo = "Starting Girls", $activeSlave.relation = "sister", $startingGirlRelation = "older sister", $activeSlave.relationTarget = $activeSlave.ID+1, $startingGirlCopied = 1]] + <</if>> <br> - [[Younger Sister|RG AS Dump][$returnTo = "Starting Girls", $activeSlave.relation = "sister", $startingGirlRelation = "younger sister", $activeSlave.relationTarget = $activeSlave.ID+1, $startingGirlCopied = 1]] + [[Twin|RG AS Dump][$returnTo = "Starting Girls", $activeSlave.relation = "twin", $startingGirlRelation = "twin", $activeSlave.relationTarget = $activeSlave.ID+1, $startingGirlCopied = 1]] + <<if $activeSlave.actualAge > $minimumSlaveAge>> + <br> + [[Younger Sister|RG AS Dump][$returnTo = "Starting Girls", $activeSlave.relation = "sister", $startingGirlRelation = "younger sister", $activeSlave.relationTarget = $activeSlave.ID+1, $startingGirlCopied = 1]] + <</if>> <</if>> - <</if>> <<elseif $activeSlave.relation == 0>> - <br>[[Add another slave, related to the previous slave|Commit Starting Girl][$createRelatedSlave = 1]] + <br>[[Add another slave, related to the previous slave|Commit Starting Girl][$createRelatedSlave = 1]] <</if>> <</if>> <br>[[Stop adding slaves and take control of the arcology|Acquisition]] diff --git a/src/utility/extendedFamilyWidgets.tw b/src/utility/extendedFamilyWidgets.tw index 8b643520401..701a8a75fe7 100644 --- a/src/utility/extendedFamilyWidgets.tw +++ b/src/utility/extendedFamilyWidgets.tw @@ -2,320 +2,757 @@ <<widget "Family">> -/*testtest PC parent passage - determines if the current slave is your mother or father*/ -<<if $activeSlave.ID == $PC.mother && $activeSlave.ID == $PC.father>> - $He @@.lightgreen;is both your mother and father;@@ $he impregnated $himself with you. -<<elseif $activeSlave.ID == $PC.mother>> - $He @@.lightgreen;is your mother.@@ -<<elseif $activeSlave.ID == $PC.father>> - $He @@.lightgreen;is your father.@@ -<</if>> - -<<if $activeSlave.father == -1 && $activeSlave.mother == -1>> - $He's @@.lightgreen;your child;@@ you knocked yourself up and gave birth to $him. -<<elseif $activeSlave.father == $activeSlave.mother && ($activeSlave.father > 0 || ($activeSlave.father in $missingTable && $showMissingSlaves))>> - <<if $activeSlave.father > 0>> - <<set _pName = $slaves[$slaveIndices[$activeSlave.father]].slaveName>> - <<else>> - <<set _pName = "your former slave "+$missingTable[$activeSlave.father].slaveName>> - <</if>> - $He was @@.lightgreen;both fathered and mothered by _pName.@@ -<</if>> - -<<if $activeSlave.father == -1 && $activeSlave.mother != -1>> - $He's @@.lightgreen;your child;@@ you knocked $his mother up. -<<elseif ($activeSlave.father > 0 || ($activeSlave.father in $missingTable && $showMissingSlaves)) && $activeSlave.father != $activeSlave.mother>> - <<if $activeSlave.father > 0>> - <<set _pName = $slaves[$slaveIndices[$activeSlave.father]].slaveName>> - <<else>> - <<set _pName = "your former slave "+$missingTable[$activeSlave.father].slaveName>> - <</if>> - $He was @@.lightgreen;fathered by _pName's@@ virile dick. -<</if>> - -<<if $activeSlave.father != -1 && $activeSlave.mother == -1>> - $He's @@.lightgreen;your child;@@ you gave birth to $him. -<<elseif ($activeSlave.mother > 0 || ($activeSlave.mother in $missingTable && $showMissingSlaves)) && $activeSlave.father != $activeSlave.mother>> - <<if $activeSlave.mother > 0>> - <<set _pName = $slaves[$slaveIndices[$activeSlave.mother]].slaveName>> - <<else>> - <<set _pName = "your former slave "+$missingTable[$activeSlave.mother].slaveName>> + /*testtest PC parent passage - determines if the current slave is your mother or father*/ + <<if $activeSlave.ID == $PC.mother && $activeSlave.ID == $PC.father>> + $He @@.lightgreen;is both your mother and father;@@ $he impregnated $himself with you. + <<elseif $activeSlave.ID == $PC.mother>> + $He @@.lightgreen;is your mother.@@ + <<elseif $activeSlave.ID == $PC.father>> + $He @@.lightgreen;is your father.@@ + <</if>> + + <<if $activeSlave.father == -1 && $activeSlave.mother == -1>> + $He's @@.lightgreen;your child;@@ you knocked yourself up and gave birth to $him. + <<elseif $activeSlave.father == $activeSlave.mother && ($activeSlave.father > 0 || ($activeSlave.father in $missingTable && $showMissingSlaves))>> + <<if $activeSlave.father > 0>> + <<set _pName = $slaves[$slaveIndices[$activeSlave.father]].slaveName>> + <<else>> + <<set _pName = "your former slave "+$missingTable[$activeSlave.father].slaveName>> + <</if>> + $He was @@.lightgreen;both fathered and mothered by _pName.@@ <</if>> - $He was @@.lightgreen;born from _pName's@@ fertile womb. -<</if>> - -<<set _children = $slaves.filter(function(s) { return $activeSlave.ID == s.father; })>> -<<if _children.length > 2>> - $He @@.lightgreen;fathered - <<for _efw = 0; _efw < _children.length; _efw++>> - <<if _efw < _children.length-1>> - _children[_efw].slaveName, + + <<if $activeSlave.father == -1 && $activeSlave.mother != -1>> + $He's @@.lightgreen;your child;@@ you knocked $his mother up. + <<elseif ($activeSlave.father > 0 || ($activeSlave.father in $missingTable && $showMissingSlaves)) && $activeSlave.father != $activeSlave.mother>> + <<if $activeSlave.father > 0>> + <<set _pName = $slaves[$slaveIndices[$activeSlave.father]].slaveName>> <<else>> - and _children[_efw].slaveName.@@ + <<set _pName = "your former slave "+$missingTable[$activeSlave.father].slaveName>> <</if>> - <</for>> -<<elseif _children.length > 1>> - $He @@.lightgreen;fathered a pair of your slaves: _children[0].slaveName, and _children[1].slaveName.@@ -<<elseif _children.length > 0>> - $He @@.lightgreen;fathered a single slave of yours: _children[0].slaveName.@@ -<</if>> - -<<set _children = $slaves.filter(function(s) { return $activeSlave.ID == s.mother; })>> -<<if _children.length > 2>> - $He @@.lightgreen;gave birth to - <<for _efw = 0; _efw < _children.length; _efw++>> - <<if _efw < _children.length-1>> - _children[_efw].slaveName, + $He was @@.lightgreen;fathered by _pName's@@ virile dick. + <</if>> + + <<if $activeSlave.father != -1 && $activeSlave.mother == -1>> + $He's @@.lightgreen;your child;@@ you gave birth to $him. + <<elseif ($activeSlave.mother > 0 || ($activeSlave.mother in $missingTable && $showMissingSlaves)) && $activeSlave.father != $activeSlave.mother>> + <<if $activeSlave.mother > 0>> + <<set _pName = $slaves[$slaveIndices[$activeSlave.mother]].slaveName>> <<else>> - and _children[_efw].slaveName.@@ + <<set _pName = "your former slave "+$missingTable[$activeSlave.mother].slaveName>> <</if>> - <</for>> -<<elseif _children.length > 1>> - $He @@.lightgreen;gave birth to a pair of your slaves: _children[0].slaveName, and _children[1].slaveName.@@ -<<elseif _children.length > 0>> - $He @@.lightgreen;gave birth to a single one of your slaves: _children[0].slaveName.@@ -<</if>> - - -/*testtest maternal grandma passage - determines if the current slave has a maternal grandmother*/ -<<set _mi = $slaveIndices[$activeSlave.mother]>> -<<set _fi = $slaveIndices[$activeSlave.father]>> -<<if def _mi>> - <<set _mmi = $slaveIndices[$slaves[_mi].mother]>> - <<set _fmi = $slaveIndices[$slaves[_mi].father]>> -<<elseif $PC.ID == $activeSlave.mother>> - <<set _mmi = $slaveIndices[$PC.mother]>> - <<set _fmi = $slaveIndices[$PC.father]>> -<</if>> -<<if def _fi>> - <<set _mfi = $slaveIndices[$slaves[_fi].mother]>> - <<set _ffi = $slaveIndices[$slaves[_fi].father]>> -<<elseif $PC.ID == $activeSlave.father>> - <<set _mfi = $slaveIndices[$PC.mother]>> - <<set _ffi = $slaveIndices[$PC.father]>> -<</if>> -<<if (def _mi || def _fi) && ndef _mmi && ndef _fmi && ndef _mfi && ndef _ffi>> + $He was @@.lightgreen;born from _pName's@@ fertile womb. + <</if>> + + <<set _children = $slaves.filter(function(s) { return $activeSlave.ID == s.father; })>> + <<if _children.length > 2>> + $He @@.lightgreen;fathered + <<for _efw = 0; _efw < _children.length; _efw++>> + <<if _efw < _children.length-1>> + _children[_efw].slaveName, + <<else>> + and _children[_efw].slaveName.@@ + <</if>> + <</for>> + <<elseif _children.length > 1>> + $He @@.lightgreen;fathered a pair of your slaves: _children[0].slaveName, and _children[1].slaveName.@@ + <<elseif _children.length > 0>> + $He @@.lightgreen;fathered a single slave of yours: _children[0].slaveName.@@ + <</if>> + + <<set _children = $slaves.filter(function(s) { return $activeSlave.ID == s.mother; })>> + <<if _children.length > 2>> + $He @@.lightgreen;gave birth to + <<for _efw = 0; _efw < _children.length; _efw++>> + <<if _efw < _children.length-1>> + _children[_efw].slaveName, + <<else>> + and _children[_efw].slaveName.@@ + <</if>> + <</for>> + <<elseif _children.length > 1>> + $He @@.lightgreen;gave birth to a pair of your slaves: _children[0].slaveName, and _children[1].slaveName.@@ + <<elseif _children.length > 0>> + $He @@.lightgreen;gave birth to a single one of your slaves: _children[0].slaveName.@@ + <</if>> + + + /*testtest maternal grandma passage - determines if the current slave has a maternal grandmother*/ + <<set _mi = $slaveIndices[$activeSlave.mother]>> + <<set _fi = $slaveIndices[$activeSlave.father]>> <<if def _mi>> - <<if def _fi && _mi == _fi>> - <<if $PC.ID == $slaves[_mi].mother && $PC.ID == $slaves[_fi].father>> - $He is @@.lightgreen;your grandchild.@@ You impregnated yourself with $his sole biological parent. + <<set _mmi = $slaveIndices[$slaves[_mi].mother]>> + <<set _fmi = $slaveIndices[$slaves[_mi].father]>> + <<elseif $PC.ID == $activeSlave.mother>> + <<set _mmi = $slaveIndices[$PC.mother]>> + <<set _fmi = $slaveIndices[$PC.father]>> + <</if>> + <<if def _fi>> + <<set _mfi = $slaveIndices[$slaves[_fi].mother]>> + <<set _ffi = $slaveIndices[$slaves[_fi].father]>> + <<elseif $PC.ID == $activeSlave.father>> + <<set _mfi = $slaveIndices[$PC.mother]>> + <<set _ffi = $slaveIndices[$PC.father]>> + <</if>> + <<if (def _mi || def _fi) && ndef _mmi && ndef _fmi && ndef _mfi && ndef _ffi>> + <<if def _mi>> + <<if def _fi && _mi == _fi>> + <<if $PC.ID == $slaves[_mi].mother && $PC.ID == $slaves[_fi].father>> + $He is @@.lightgreen;your grandchild.@@ You impregnated yourself with $his sole biological parent. + <<elseif $PC.ID == $slaves[_mi].mother>> + $He is @@.lightgreen;your grandchild.@@ You gave birth to $his sole biological parent. + <<elseif $PC.ID == $slaves[_fi].father>> + $He is @@.lightgreen;your grandchild.@@ You fathered $his sole biological parent. + <</if>> + <<elseif def _fi && $PC.ID == $slaves[_mi].mother && $PC.ID == $slaves[_fi].mother>> + $He is @@.lightgreen;your grandchild.@@ You gave birth to both of $his parents. + <<elseif def _fi && $PC.ID == $slaves[_mi].father && $PC.ID == $slaves[_fi].father>> + $He is @@.lightgreen;your grandchild.@@ You fathered both of $his parents. <<elseif $PC.ID == $slaves[_mi].mother>> - $He is @@.lightgreen;your grandchild.@@ You gave birth to $his sole biological parent. + $He is @@.lightgreen;your grandchild.@@ You gave birth to $his mother. + <<elseif $PC.ID == $slaves[_mi].father>> + $He is @@.lightgreen;your grandchild.@@ You fathered $his mother. + <</if>> + <<elseif def _fi>> + <<if $PC.ID == $slaves[_fi].mother>> + $He is @@.lightgreen;your grandchild.@@ You gave birth to $his father. <<elseif $PC.ID == $slaves[_fi].father>> - $He is @@.lightgreen;your grandchild.@@ You fathered $his sole biological parent. + $He is @@.lightgreen;your grandchild.@@ You fathered $his father. <</if>> - <<elseif def _fi && $PC.ID == $slaves[_mi].mother && $PC.ID == $slaves[_fi].mother>> - $He is @@.lightgreen;your grandchild.@@ You gave birth to both of $his parents. - <<elseif def _fi && $PC.ID == $slaves[_mi].father && $PC.ID == $slaves[_fi].father>> - $He is @@.lightgreen;your grandchild.@@ You fathered both of $his parents. - <<elseif $PC.ID == $slaves[_mi].mother>> - $He is @@.lightgreen;your grandchild.@@ You gave birth to $his mother. - <<elseif $PC.ID == $slaves[_mi].father>> - $He is @@.lightgreen;your grandchild.@@ You fathered $his mother. - <</if>> - <<elseif def _fi>> - <<if $PC.ID == $slaves[_fi].mother>> - $He is @@.lightgreen;your grandchild.@@ You gave birth to $his father. - <<elseif $PC.ID == $slaves[_fi].father>> - $He is @@.lightgreen;your grandchild.@@ You fathered $his father. <</if>> - <</if>> -<<else>> - <<if def _mmi && def _ffi && _mmi == _ffi>> - $His sole @@.lightgreen;grandparent is $slaves[_mmi].slaveName.@@ <<else>> - <<if def _mmi && def _mfi && _mmi == _mfi>> - $His sole @@.lightgreen;grandmother is $slaves[_mmi].slaveName.@@ + <<if def _mmi && def _ffi && _mmi == _ffi>> + $His sole @@.lightgreen;grandparent is $slaves[_mmi].slaveName.@@ <<else>> - <<if def _mmi>> - $His maternal @@.lightgreen;grandmother is $slaves[_mmi].slaveName.@@ - <</if>> - <<if def _mfi>> - $His paternal @@.lightgreen;grandmother is $slaves[_mfi].slaveName.@@ - <</if>> - <</if>> - <<if def _fmi && def _ffi && _fmi == _ffi>> - $His sole @@.lightgreen;grandfather is $slaves[_ffi].slaveName.@@ - <<else>> - <<if def _fmi>> - $His maternal @@.lightgreen;grandfather is $slaves[_fmi].slaveName.@@ + <<if def _mmi && def _mfi && _mmi == _mfi>> + $His sole @@.lightgreen;grandmother is $slaves[_mmi].slaveName.@@ + <<else>> + <<if def _mmi>> + $His maternal @@.lightgreen;grandmother is $slaves[_mmi].slaveName.@@ + <</if>> + <<if def _mfi>> + $His paternal @@.lightgreen;grandmother is $slaves[_mfi].slaveName.@@ + <</if>> <</if>> - <<if _ffi>> - $His paternal @@.lightgreen;grandfather is $slaves[_ffi].slaveName.@@ + <<if def _fmi && def _ffi && _fmi == _ffi>> + $His sole @@.lightgreen;grandfather is $slaves[_ffi].slaveName.@@ + <<else>> + <<if def _fmi>> + $His maternal @@.lightgreen;grandfather is $slaves[_fmi].slaveName.@@ + <</if>> + <<if _ffi>> + $His paternal @@.lightgreen;grandfather is $slaves[_ffi].slaveName.@@ + <</if>> <</if>> <</if>> <</if>> -<</if>> -/*testtest PC grandparents passage - determines if the current slave is your grandparent*/ -<<set _pcMother = $slaveIndices[$PC.mother]>> -<<set _pcFather = $slaveIndices[$PC.father]>> -<<if def _pcMother>> - <<if def _pcFather && _pcMother == _pcFather>> - <<if $activeSlave.ID == $slaves[_pcMother].mother && $activeSlave.ID == $slaves[_pcFather].father>> - $He is @@.lightgreen;your sole grandparent.@@ $He impregnated $himself with your mother/father who in turn impregnated themselves with you. + /*testtest PC grandparents passage - determines if the current slave is your grandparent*/ + <<set _pcMother = $slaveIndices[$PC.mother]>> + <<set _pcFather = $slaveIndices[$PC.father]>> + <<if def _pcMother>> + <<if def _pcFather && _pcMother == _pcFather>> + <<if $activeSlave.ID == $slaves[_pcMother].mother && $activeSlave.ID == $slaves[_pcFather].father>> + $He is @@.lightgreen;your sole grandparent.@@ $He impregnated $himself with your mother/father who in turn impregnated themselves with you. + <<elseif $activeSlave.ID == $slaves[_pcMother].mother>> + $He is @@.lightgreen;your sole grandmother.@@ $He gave birth to $slaves[_pcMother].slaveName who in turn impregnated themselves with you. + <<elseif $activeSlave.ID == $slaves[_pcFather].father>> + $He is @@.lightgreen;your sole grandfather.@@ $He fathered $slaves[_pcFather].slaveName who in turn impregnated themselves with you. + <</if>> + <<elseif def _pcFather && $activeSlave.ID == $slaves[_pcMother].mother && $activeSlave.ID == $slaves[_pcFather].mother>> + $He is @@.lightgreen;your sole grandmother.@@ $He gave birth to both of your parents, $slaves[_pcMother].slaveName and $slaves[_pcFather].slaveName. + <<elseif def _pcFather && $activeSlave.ID == $slaves[_pcMother].father && $activeSlave.ID == $slaves[_pcFather].father>> + $He is @@.lightgreen;your sole grandfather.@@ $He fathered both of your parents, $slaves[_pcFather].slaveName and $slaves[_pcMother].slaveName. <<elseif $activeSlave.ID == $slaves[_pcMother].mother>> - $He is @@.lightgreen;your sole grandmother.@@ $He gave birth to $slaves[_pcMother].slaveName who in turn impregnated themselves with you. + $He is @@.lightgreen;your maternal grandmother.@@ + <<elseif $activeSlave.ID == $slaves[_pcMother].father>> + $He is @@.lightgreen;your maternal grandfather.@@ + <</if>> + <<elseif def _pcFather>> + <<if $activeSlave.ID == $slaves[_pcFather].mother>> + $He is @@.lightgreen;your paternal grandmother.@@ <<elseif $activeSlave.ID == $slaves[_pcFather].father>> - $He is @@.lightgreen;your sole grandfather.@@ $He fathered $slaves[_pcFather].slaveName who in turn impregnated themselves with you. - <</if>> - <<elseif def _pcFather && $activeSlave.ID == $slaves[_pcMother].mother && $activeSlave.ID == $slaves[_pcFather].mother>> - $He is @@.lightgreen;your sole grandmother.@@ $He gave birth to both of your parents, $slaves[_pcMother].slaveName and $slaves[_pcFather].slaveName. - <<elseif def _pcFather && $activeSlave.ID == $slaves[_pcMother].father && $activeSlave.ID == $slaves[_pcFather].father>> - $He is @@.lightgreen;your sole grandfather.@@ $He fathered both of your parents, $slaves[_pcFather].slaveName and $slaves[_pcMother].slaveName. - <<elseif $activeSlave.ID == $slaves[_pcMother].mother>> - $He is @@.lightgreen;your maternal grandmother.@@ - <<elseif $activeSlave.ID == $slaves[_pcMother].father>> - $He is @@.lightgreen;your maternal grandfather.@@ - <</if>> -<<elseif def _pcFather>> - <<if $activeSlave.ID == $slaves[_pcFather].mother>> - $He is @@.lightgreen;your paternal grandmother.@@ - <<elseif $activeSlave.ID == $slaves[_pcFather].father>> - $He is @@.lightgreen;your paternal grandfather.@@ - <</if>> -<</if>> - -/*testtest grandchild passage - determines how many grandchildren the current slave has*/ -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $activeSlave.ID>> - <<if $activeSlave.ID == $slaves[$i].mother || $activeSlave.ID == $slaves[$i].father>> - <<for $j = 0; $j < $slaves.length; $j++>> - <<if $slaves[$i].ID != $slaves[$j].ID>> - <<if $slaves[$i].ID == $slaves[$j].mother || $slaves[$i].ID == $slaves[$j].father>> - <<set $children.push($slaves[$j])>> - <</if>> - <</if>> - <</for>> - <</if>> + $He is @@.lightgreen;your paternal grandfather.@@ + <</if>> <</if>> -<</for>> -<<if $children.length > 0>> - $He -<<if $children.length > 2>> - has @@.lightgreen;many grandchildren, - <<for $j = 0; $j < $children.length; $j++>> - <<if $j < $children.length-1>> - $children[$j].slaveName, - <<else>> - and $children[$j].slaveName amongst your slaves.@@ + + /*testtest grandchild passage - determines how many grandchildren the current slave has*/ + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $activeSlave.ID>> + <<if $activeSlave.ID == $slaves[$i].mother || $activeSlave.ID == $slaves[$i].father>> + <<for $j = 0; $j < $slaves.length; $j++>> + <<if $slaves[$i].ID != $slaves[$j].ID>> + <<if $slaves[$i].ID == $slaves[$j].mother || $slaves[$i].ID == $slaves[$j].father>> + <<set $children.push($slaves[$j])>> + <</if>> + <</if>> + <</for>> + <</if>> <</if>> <</for>> -<<elseif $children.length > 1>> - has @@.lightgreen;two grandchildren, $children[0].slaveName, and $children[1].slaveName as your slaves.@@ -<<elseif $children.length > 0>> - has a @@.lightgreen;grandchild, $children[0].slaveName as your slave.@@ -<</if>> -<</if>> -<<set $children = []>> - -/*testtest PC aunt passage - determines how many aunts you have*/ -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $activeSlave.ID>> - <<if areSisters($slaves[$i], $activeSlave) == 1 || areSisters($slaves[$i], $activeSlave) == 2>> - <<if $slaves[$i].ID == $PC.mother || $slaves[$i].ID == $PC.father>> - <<for $j = 0; $j < $slaves.length; $j++>> - <<if $slaves[$i].ID != $slaves[$j].ID>> - <<if $slaves[$j].genes == "XX">> - <<if areSisters($slaves[$j], $activeSlave) == 1 || areSisters($slaves[$j], $activeSlave) == 2>> - <<set $children.push($slaves[$j])>> - <</if>> - <</if>> - <</if>> - <</for>> - <</if>> - <</if>> - <</if>> -<</for>> -<<if $activeSlave.genes == "XX" && $children.length > 0>> - $He + <<if $children.length > 0>> + $He <<if $children.length > 2>> - is @@.lightgreen;your aunt along with + has @@.lightgreen;many grandchildren, <<for $j = 0; $j < $children.length; $j++>> <<if $j < $children.length-1>> $children[$j].slaveName, <<else>> - and $children[$j].slaveName.@@ + and $children[$j].slaveName amongst your slaves.@@ <</if>> <</for>> <<elseif $children.length > 1>> - is @@.lightgreen;your aunt along with $children[0].slaveName.@@ + has @@.lightgreen;two grandchildren, $children[0].slaveName, and $children[1].slaveName as your slaves.@@ <<elseif $children.length > 0>> - <<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $activeSlave.ID && $activeSlave.genes == "XX">> + has a @@.lightgreen;grandchild, $children[0].slaveName as your slave.@@ + <</if>> + <</if>> + <<set $children = []>> + + /*testtest PC aunt passage - determines how many aunts you have*/ + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $activeSlave.ID>> + <<if areSisters($slaves[$i], $activeSlave) == 1 || areSisters($slaves[$i], $activeSlave) == 2>> + <<if $slaves[$i].ID == $PC.mother || $slaves[$i].ID == $PC.father>> + <<for $j = 0; $j < $slaves.length; $j++>> + <<if $slaves[$i].ID != $slaves[$j].ID>> + <<if $slaves[$j].genes == "XX">> + <<if areSisters($slaves[$j], $activeSlave) == 1 || areSisters($slaves[$j], $activeSlave) == 2>> + <<set $children.push($slaves[$j])>> + <</if>> + <</if>> + <</if>> + <</for>> + <</if>> + <</if>> + <</if>> + <</for>> + <<if $activeSlave.genes == "XX" && $children.length > 0>> + $He + <<if $children.length > 2>> + is @@.lightgreen;your aunt along with + <<for $j = 0; $j < $children.length; $j++>> + <<if $j < $children.length-1>> + $children[$j].slaveName, + <<else>> + and $children[$j].slaveName.@@ + <</if>> + <</for>> + <<elseif $children.length > 1>> + is @@.lightgreen;your aunt along with $children[0].slaveName.@@ + <<elseif $children.length > 0>> + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $activeSlave.ID && $activeSlave.genes == "XX">> + <<if areSisters($slaves[$i], $activeSlave) == 1 || areSisters($slaves[$i], $activeSlave) == 2>> + <<if $slaves[$i].ID == $PC.mother || $slaves[$i].ID == $PC.father>> + $He is @@.lightgreen;your aunt.@@ + <</if>> + <</if>> + <</if>> + <</for>> + <</if>> + <</if>> + <<set $children = []>> + + /*testtest PC uncle passage - determines how many uncles you have*/ + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $activeSlave.ID>> <<if areSisters($slaves[$i], $activeSlave) == 1 || areSisters($slaves[$i], $activeSlave) == 2>> - <<if $slaves[$i].ID == $PC.mother || $slaves[$i].ID == $PC.father>> - $He is @@.lightgreen;your aunt.@@ - <</if>> + <<if $slaves[$i].ID == $PC.mother || $slaves[$i].ID == $PC.father>> + <<for $j = 0; $j < $slaves.length; $j++>> + <<if $slaves[$i].ID != $slaves[$j].ID && $slaves[$j].dick > 0 && $slaves[$j].genes == "XY">> + <<if areSisters($slaves[$j], $activeSlave) == 1 || areSisters($slaves[$j], $activeSlave) == 2>> + <<set $children.push($slaves[$j])>> + <</if>> + <</if>> + <</for>> + <</if>> <</if>> + <</if>> + <</for>> + <<if $activeSlave.genes == "XY" && $children.length > 0>> + $He + <<if $children.length > 2>> + is @@.lightgreen;your uncle along with + <<for $j = 0; $j < $children.length; $j++>> + <<if $j < $children.length-1>> + $children[$j].slaveName, + <<else>> + and $children[$j].slaveName.@@ + <</if>> + <</for>> + <<elseif $children.length > 1>> + is @@.lightgreen;your uncle along with $children[0].slaveName.@@ + <<elseif $children.length > 0>> + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $activeSlave.ID && $activeSlave.genes == "XY">> + <<if areSisters($slaves[$i], $activeSlave) == 1 || areSisters($slaves[$i], $activeSlave) == 2>> + <<if $slaves[$i].ID == $PC.mother || $slaves[$i].ID == $PC.father>> + $He is @@.lightgreen;your uncle.@@ + <</if>> + <</if>> + <</if>> + <</for>> + <</if>> + <</if>> + <<set $children = []>> + + /*testtest aunt passage - determines how many aunts a slave has*/ + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $activeSlave.ID>> + <<if $slaves[$i].ID == $activeSlave.mother || $slaves[$i].ID == $activeSlave.father>> + <<for $j = 0; $j < $slaves.length; $j++>> + <<if $slaves[$j].genes == "XX">> + <<if areSisters($slaves[$j], $slaves[$i]) == 1 || areSisters($slaves[$j], $slaves[$i]) == 2>> + <<set $children.push($slaves[$j])>> + <</if>> + <</if>> + <</for>> <</if>> - <</for>> + <</if>> + <</for>> + <<if $children.length > 0>> + $He + <<if $children.length > 2>> + has @@.lightgreen;many aunts, + <<for $j = 0; $j < $children.length; $j++>> + <<if $j < $children.length-1>> + $children[$j].slaveName, + <<else>> + and $children[$j].slaveName.@@ + <</if>> + <</for>> + <<elseif $children.length > 1>> + has @@.lightgreen;two aunts, $children[0].slaveName, and $children[1].slaveName.@@ + <<elseif $children.length > 0>> + has @@.lightgreen;an aunt, $children[0].slaveName.@@ + <</if>> <</if>> -<</if>> -<<set $children = []>> + <<set $children = []>> -/*testtest PC uncle passage - determines how many uncles you have*/ -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $activeSlave.ID>> - <<if areSisters($slaves[$i], $activeSlave) == 1 || areSisters($slaves[$i], $activeSlave) == 2>> - <<if $slaves[$i].ID == $PC.mother || $slaves[$i].ID == $PC.father>> + /*testtest uncle passage - determines how many uncles a slave has*/ + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $activeSlave.ID>> + <<if $slaves[$i].ID == $activeSlave.mother || $slaves[$i].ID == $activeSlave.father>> <<for $j = 0; $j < $slaves.length; $j++>> - <<if $slaves[$i].ID != $slaves[$j].ID && $slaves[$j].dick > 0 && $slaves[$j].genes == "XY">> - <<if areSisters($slaves[$j], $activeSlave) == 1 || areSisters($slaves[$j], $activeSlave) == 2>> + <<if $slaves[$j].genes == "XY">> + <<if areSisters($slaves[$j], $slaves[$i]) == 1 || areSisters($slaves[$j], $slaves[$i]) == 2>> <<set $children.push($slaves[$j])>> <</if>> <</if>> <</for>> <</if>> <</if>> + <</for>> + <<if $children.length > 0>> + $He + <<if $children.length > 2>> + has @@.lightgreen;many uncles, + <<for $j = 0; $j < $children.length; $j++>> + <<if $j < $children.length-1>> + $children[$j].slaveName, + <<else>> + and $children[$j].slaveName.@@ + <</if>> + <</for>> + <<elseif $children.length > 1>> + has @@.lightgreen;two uncles, $children[0].slaveName, and $children[1].slaveName.@@ + <<elseif $children.length > 0>> + has @@.lightgreen;an uncle, $children[0].slaveName.@@ + <</if>> <</if>> -<</for>> -<<if $activeSlave.genes == "XY" && $children.length > 0>> - $He - <<if $children.length > 2>> - is @@.lightgreen;your uncle along with - <<for $j = 0; $j < $children.length; $j++>> - <<if $j < $children.length-1>> - $children[$j].slaveName, - <<else>> - and $children[$j].slaveName.@@ + <<set $children = []>> + + /*testtest PC niece passage - determines how many nieces you have*/ + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $activeSlave.ID>> + <<if areSisters($slaves[$i], $PC) == 1 || areSisters($slaves[$i], $PC) == 2>> + <<if $slaves[$i].ID == $activeSlave.mother || $slaves[$i].ID == $activeSlave.father>> + <<for $j = 0; $j < $slaves.length; $j++>> + <<if $slaves[$i].ID != $slaves[$j].ID && $slaves[$j].ID != $activeSlave.ID && $slaves[$j].genes == "XX">> + <<if $slaves[$i].ID == $slaves[$j].mother || $slaves[$i].ID == $slaves[$j].father>> + <<set $children.push($slaves[$j])>> + <</if>> + <</if>> + <</for>> + <</if>> <</if>> - <</for>> - <<elseif $children.length > 1>> - is @@.lightgreen;your uncle along with $children[0].slaveName.@@ - <<elseif $children.length > 0>> - <<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $activeSlave.ID && $activeSlave.genes == "XY">> - <<if areSisters($slaves[$i], $activeSlave) == 1 || areSisters($slaves[$i], $activeSlave) == 2>> - <<if $slaves[$i].ID == $PC.mother || $slaves[$i].ID == $PC.father>> - $He is @@.lightgreen;your uncle.@@ + <</if>> + <</for>> + <<if $activeSlave.genes == "XX" && $children.length > 0>> + $He + <<if $children.length > 2>> + is @@.lightgreen;your niece along with + <<for $j = 0; $j < $children.length; $j++>> + <<if $j < $children.length-1>> + $children[$j].slaveName, + <<else>> + and $children[$j].slaveName.@@ + <</if>> + <</for>> + <<elseif $children.length > 1>> + is @@.lightgreen;your niece along with $children[0].slaveName.@@ + <<elseif $children.length > 0>> + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $activeSlave.ID && $activeSlave.genes == "XX">> + <<if areSisters($slaves[$i], $PC) == 1 || areSisters($slaves[$i], $PC) == 2>> + <<if $slaves[$i].ID == $activeSlave.mother || $slaves[$i].ID == $activeSlave.father>> + is @@.lightgreen;your niece.@@ + <</if>> + <</if>> + <</if>> + <</for>> + <</if>> + <</if>> + <<set $children = []>> + + /* testtest niece passage - determines how many nieces a slave has*/ + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $activeSlave.ID>> + <<if areSisters($slaves[$i], $activeSlave) == 1 || areSisters($slaves[$i], $activeSlave) == 2>> + <<for $j = 0; $j < $slaves.length; $j++>> + <<if $slaves[$i].ID != $slaves[$j].ID && $slaves[$j].ID != $activeSlave.ID && $slaves[$j].genes == "XX">> + <<if $slaves[$i].ID == $slaves[$j].mother || $slaves[$i].ID == $slaves[$j].father>> + <<set $children.push($slaves[$j])>> + <</if>> <</if>> + <</for>> + <</if>> + <</if>> + <</for>> + <<if $children.length > 0>> + $He + <<if $children.length > 2>> + has @@.lightgreen;many nieces, + <<for $j = 0; $j < $children.length; $j++>> + <<if $j < $children.length-1>> + $children[$j].slaveName, + <<else>> + and $children[$j].slaveName, who are your slaves.@@ + <</if>> + <</for>> + <<elseif $children.length > 1>> + has @@.lightgreen;two nieces, $children[0].slaveName, and $children[1].slaveName, who are your slaves.@@ + <<elseif $children.length > 0>> + has @@.lightgreen;a niece, $children[0].slaveName, who is your slave.@@ + <</if>> + <</if>> + <<set $children = []>> + + /*testtest PC nephew passage - determines how many nephews you have*/ + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $activeSlave.ID>> + <<if areSisters($slaves[$i], $PC) == 1 || areSisters($slaves[$i], $PC) == 2>> + <<if $slaves[$i].ID == $activeSlave.mother || $slaves[$i].ID == $activeSlave.father>> + <<for $j = 0; $j < $slaves.length; $j++>> + <<if $slaves[$i].ID != $slaves[$j].ID && $slaves[$j].ID != $activeSlave.ID && $slaves[$i].genes == "XY">> + <<if $slaves[$i].ID == $slaves[$j].mother || $slaves[$i].ID == $slaves[$j].father>> + <<set $children.push($slaves[$j])>> + <</if>> + <</if>> + <</for>> <</if>> <</if>> - <</for>> + <</if>> + <</for>> + <<if $activeSlave.genes == "XY" && $children.length > 0>> + $He + <<if $children.length > 2>> + is @@.lightgreen;your nephew along with + <<for $j = 0; $j < $children.length; $j++>> + <<if $j < $children.length-1>> + $children[$j].slaveName, + <<else>> + and $children[$j].slaveName.@@ + <</if>> + <</for>> + <<elseif $children.length > 1>> + is @@.lightgreen;your nephew along with $children[0].slaveName.@@ + <<elseif $children.length > 0>> + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $activeSlave.ID && $activeSlave.genes == "XY">> + <<if areSisters($slaves[$i], $PC) == 1 || areSisters($slaves[$i], $PC) == 2>> + <<if $slaves[$i].ID == $activeSlave.mother || $slaves[$i].ID == $activeSlave.father>> + is @@.lightgreen;your nephew.@@ + <</if>> + <</if>> + <</if>> + <</for>> + <</if>> <</if>> -<</if>> -<<set $children = []>> + <<set $children = []>> -/*testtest aunt passage - determines how many aunts a slave has*/ -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $activeSlave.ID>> - <<if $slaves[$i].ID == $activeSlave.mother || $slaves[$i].ID == $activeSlave.father>> - <<for $j = 0; $j < $slaves.length; $j++>> - <<if $slaves[$j].genes == "XX">> - <<if areSisters($slaves[$j], $slaves[$i]) == 1 || areSisters($slaves[$j], $slaves[$i]) == 2>> - <<set $children.push($slaves[$j])>> + /* testtest nephew passage - determines how many nephews a slave has*/ + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $activeSlave.ID>> + <<if areSisters($slaves[$i], $activeSlave) == 1 || areSisters($slaves[$i], $activeSlave) == 2>> + <<for $j = 0; $j < $slaves.length; $j++>> + <<if $slaves[$i].ID != $slaves[$j].ID && $slaves[$j].ID != $activeSlave.ID && $slaves[$j].genes == "XY">> + <<if $slaves[$i].ID == $slaves[$j].mother || $slaves[$i].ID == $slaves[$j].father>> + <<set $children.push($slaves[$j])>> + <</if>> <</if>> + <</for>> + <</if>> + <</if>> + <</for>> + <<if $children.length > 0>> + $He + <<if $children.length > 2>> + has @@.lightgreen;many nephews, + <<for $j = 0; $j < $children.length; $j++>> + <<if $j < $children.length-1>> + $children[$j].slaveName, + <<else>> + and $children[$j].slaveName, who are your slaves.@@ + <</if>> + <</for>> + <<elseif $children.length > 1>> + has @@.lightgreen;two nephews, $children[0].slaveName, and $children[1].slaveName, who are your slaves.@@ + <<elseif $children.length > 0>> + has @@.lightgreen;a nephew, $children[0].slaveName, who is your slave.@@ + <</if>> + <</if>> + <<set $children = []>> + + /*testtest PC sibling passages - determines how many siblings you have + <<set $children = []>> + <<set _rel_num = areSisters($activeSlave, $PC)>> + <<if(_rel_num > 0)>> + <<if ($activeSlave.genes == "XX")>> + <<set _rel_type = "sister">> + <<else>> + <<set _rel_type = "brother">> + <</if>> + <<if (_rel_num == 1)>> + <<set _rel_desc = "your twin">> + <<elseif _rel_num == 2>> + <<set _rel_desc = "your ">> + <<elseif _rel_num == 3>> + <<set _rel_desc = "your half-">> + <</if>> + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $activeSlave.ID>> + <<if _rel_num == areSisters($activeSlave, $slaves[$i]) && ($activeSlave.vagina > -1) == ($slaves[$i].vagina > -1)>> + <<set console.log('sisters', $slaves[$i].birthName)>> + <<set $children.push($slaves[$i])>> + <</if>> + <</if>> + <</for>> + $He + <<if $children.length > 1>> + @@.lightgreen;is _rel_desc _rel_type along with + <<for $j = 0; $j < $children.length; $j++>> + <<if $j < $children.length-1>> + $children[$j].slaveName, + <<else>> + and $children[$j].slaveName.@@ <</if>> <</for>> + <<elseif $children.length > 0>> + is @@.lightgreen;_rel_desc _rel_type with $children[0].slaveName.@@ + <<else>> + is @@.lightgreen;_rel_desc _rel_type.@@ + <</if>> + <</if>> + <<set $children = []>> + */ + + <<set _twins = [], _sisters = [], _brothers = [], _halfsisters = [], _halfbrothers = []>> + <<for _efw = 0; _efw < $slaves.length; _efw++>> + <<set _sisterCheck = areSisters($slaves[_efw], $activeSlave)>> + <<if _sisterCheck == 1>> + <<run _twins.push($slaves[_efw])>> + <</if>> + <<if _sisterCheck == 2>> + <<run ($slaves[_efw].genes == 'XX' ? _sisters : _brothers).push($slaves[_efw])>> + <</if>> + <<if _sisterCheck == 3>> + <<run ($slaves[_efw].genes == 'XX' ? _halfsisters : _halfbrothers).push($slaves[_efw])>> + <</if>> + <</for>> + + /*testtest PC twin passages - determines how many twins you have but not implemented yet*/ + <<if areSisters($activeSlave, $PC) == 1>> + $He + <<if _twins.length > 1>> + @@.lightgreen;shared a cramped womb with you, <<print _twins.reduce(function(res, ch, i, arr) { return (res.slaveName || res) + (i == arr.length - 1 ? ' and ' : ', ') + ch.slaveName; })>>.@@ + <<elseif _twins.length > 0>> + is @@.lightgreen;your twin along with _twins[0].slaveName.@@ + <<else>> + is @@.lightgreen;your twin <<if $activeSlave.genes == "XX">>sister<<else>>brother<</if>>.@@ + <</if>> + <</if>> + + /*testtest PC sister passages - determines how many sisters you have*/ + <<if areSisters($activeSlave, $PC) < 3 && areSisters($activeSlave, $PC) > 0 && $activeSlave.genes == "XX">> + $He + <<if _sisters.length > 1>> + @@.lightgreen;is your sister along with <<print _sisters.reduce(function(res, ch, i, arr) { return (res.slaveName || res) + (i == arr.length - 1 ? ' and ' : ', ') + ch.slaveName; })>>.@@ + <<elseif _sisters.length > 0>> + is @@.lightgreen;your sister along with _sisters[0].slaveName.@@ + <<else>> + is @@.lightgreen;your sister.@@ + <</if>> + <</if>> + + /*testtest PC brother passages - determines how many brothers you have*/ + <<if areSisters($activeSlave, $PC) < 3 && areSisters($activeSlave, $PC) > 0 && $activeSlave.genes == "XY">> + $He + <<if _brothers.length > 1>> + @@.lightgreen;is your brother along with <<print _brothers.reduce(function(res, ch, i, arr) { return (res.slaveName || res) + (i == arr.length - 1 ? ' and ' : ', ') + ch.slaveName; })>>.@@ + <<elseif _brothers.length > 0>> + is @@.lightgreen;your brother along with _brothers[0].slaveName.@@ + <<else>> + is @@.lightgreen;your brother.@@ <</if>> <</if>> -<</for>> -<<if $children.length > 0>> - $He + + /*testtest PC half-sister passages - determines how many half-sisters you have*/ + <<if areSisters($activeSlave, $PC) == 3 && $activeSlave.genes == "XX">> + $He + <<if _halfsisters.length > 1>> + @@.lightgreen;is your half-sister along with <<print _halfsisters.reduce(function(res, ch, i, arr) { return (res.slaveName || res) + (i == arr.length - 1 ? ' and ' : ', ') + ch.slaveName; })>>.@@ + <<elseif _halfsisters.length > 0>> + is @@.lightgreen;your half-sister along with _halfsisters[0].slaveName.@@ + <<else>> + is @@.lightgreen;your half-sister.@@ + <</if>> + <</if>> + + /*testtest PC half-brother passages - determines how many half-brothers you have*/ + <<if areSisters($activeSlave, $PC) == 3 && $activeSlave.genes == "XY">> + $He + <<if _halfbrothers.length > 1>> + @@.lightgreen;is your half-brother along with <<print _halfbrothers.reduce(function(res, ch, i, arr) { return (res.slaveName || res) + (i == arr.length - 1 ? ' and ' : ', ') + ch.slaveName; })>>.@@ + <<elseif _halfbrothers.length > 0>> + is @@.lightgreen;your half-brother along with _halfbrothers[0].slaveName.@@ + <<else>> + is @@.lightgreen;your half-brother.@@ + <</if>> + <</if>> + + /*testtest twins? - determines how many twins a slave has*/ + <<if _twins.length > 0>> + $He + <<if _twins.length > 2>> + @@.lightgreen;shared a cramped womb with <<print _twins.reduce(function(res, ch, i, arr) { return (res.slaveName || res) + (i == arr.length - 1 ? ' and ' : ', ') + ch.slaveName; })>>.@@ + <<elseif _twins.length > 1>> + is @@.lightgreen;one of a set of triplets; _twins[0].slaveName and _twins[1].slaveName@@ complete the trio. + <<else>> + is @@.lightgreen;twins with _twins[0].slaveName.@@ + <</if>> + <</if>> + + /*testtest sister - determines how many sisters a slave has*/ + <<if _sisters.length > 0>> + <<if _sisters.length > 1>> + @@.lightgreen;<<print _sisters.reduce(function(res, ch, i, arr) { return (res.slaveName || res) + (i == arr.length - 1 ? ' and ' : ', ') + ch.slaveName; })>> are $his sisters.@@ + <<else>> + @@.lightgreen; _sisters[0].slaveName is $his sister.@@ + <</if>> + <</if>> + + /*testtest brother - determines how many brothers a slave has*/ + <<if _brothers.length > 0>> + <<if _brothers.length > 1>> + @@.lightgreen;<<print _brothers.reduce(function(res, ch, i, arr) { return (res.slaveName || res) + (i == arr.length - 1 ? ' and ' : ', ') + ch.slaveName; })>> are $his brothers.@@ + <<else>> + @@.lightgreen;_brothers[0].slaveName is $his brother.@@ + <</if>> + <</if>> + + /*testtest half-sister - determines how many half-sisters a slave has*/ + <<set _children = $slaves.filter(function(s) { return s.ID != $activeSlave.ID && areSisters($activeSlave, s) == 3 && s.genes == "XX"; })>> + <<if _children.length > 2>> + @@.lightgreen; + <<for _efw = 0; _efw < _children.length; _efw++>> + <<if _efw < _children.length-1>> + _children[_efw].slaveName, + <<else>> + and _children[_efw].slaveName + <</if>> + <</for>> + are half-sisters to $him.@@ + <<elseif _children.length > 1>> + @@.lightgreen;_children[0].slaveName and _children[1].slaveName are half-sisters to $him.@@ + <<elseif _children.length > 0>> + @@.lightgreen;_children[0].slaveName is a half-sister to $him.@@ + <</if>> + + /*testtest half-brother - determines how many half-brothers a slave has*/ + <<set _children = $slaves.filter(function(s) { return s.ID != $activeSlave.ID && areSisters($activeSlave, s) == 3 && s.genes == "XY"; })>> + <<if _children.length > 2>> + @@.lightgreen; + <<for _efw = 0; _efw < _children.length; _efw++>> + <<if _efw < _children.length-1>> + _children[_efw].slaveName, + <<else>> + and _children[_efw].slaveName + <</if>> + <</for>> + are half-brothers to $him.@@ + <<elseif _children.length > 1>> + @@.lightgreen;_children[0].slaveName and _children[1].slaveName are half-brothers to $him.@@ + <<elseif _children.length > 0>> + @@.lightgreen;_children[0].slaveName is a half-brother to $him.@@ + <</if>> + + <<if $activeSlave.clone != 0>> + $He is + <<if $activeSlave.cloneID == -1>> + your clone. + <<else>> + a clone of $activeSlave.clone. + <</if>> + <</if>> + + <<if $cheatMode == 1>> + $activeSlave.sisters sisters, $activeSlave.daughters daughters. + <</if>> + +<</widget>> + +<<widget PlayerFamily>> + + <br><br>Your present family includes: + + /*Player parents, lists both your parents, or just one.*/ + <<if $showMissingSlaves>> + <<if $PC.mother in $missingTable>> + <<set $children.push($missingTable[$PC.mother])>> + <</if>> + <<if $PC.father in $missingTable && !($PC.father == $PC.mother)>> + <<set $children.push($missingTable[$PC.father])>> + <</if>> + <</if>> + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID == $PC.father || $slaves[$i].ID == $PC.mother>> + <<set $children.push($slaves[$i])>> + <</if>> + <</for>> + <<if $children.length > 1>> + <br>Your parents are @@.lightgreen;<<if $children[0].ID < 0>>your former slave<<if $children[1].ID < 0>>s<</if>><</if>> $children[0].slaveName and <<if $children[1].ID < 0 && $children[0].ID > 0>>your former slave<</if>> $children[1].slaveName@@. + <<elseif $children.length > 0>> + <<if $PC.father == $PC.mother>> + <br>Your parent is @@.lightgreen;<<if $children[0].ID < 0>>your former slave<</if>> $children[0].slaveName,@@ who impregnated $himself with you. + <<else>> + <br>You know one of your parents, @@.lightgreen;<<if $children[0].ID < 0>>your former slave<</if>> $children[0].slaveName@@. + <</if>> + <</if>> + <<set $children = []>> + + /*Twins Test with aresisters*/ + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $PC.ID>> + <<if areSisters($slaves[$i], $PC) == 1 && areSisters($slaves[$i], $slaves[$i]) == 1>> + <<set $children.push($slaves[$i])>> + <</if>> + <</if>> + <</for>> <<if $children.length > 2>> - has @@.lightgreen;many aunts, + <br>You are @@.lightgreen;twins with <<for $j = 0; $j < $children.length; $j++>> <<if $j < $children.length-1>> $children[$j].slaveName, @@ -324,225 +761,161 @@ <</if>> <</for>> <<elseif $children.length > 1>> - has @@.lightgreen;two aunts, $children[0].slaveName, and $children[1].slaveName.@@ + <br>You are twins with @@.lightgreen;$children[0].slaveName and $children[1].slaveName.@@ <<elseif $children.length > 0>> - has @@.lightgreen;an aunt, $children[0].slaveName.@@ + <br>Your twin is @@.lightgreen;$children[0].slaveName.@@ <</if>> -<</if>> -<<set $children = []>> + <<set $children = []>> -/*testtest uncle passage - determines how many uncles a slave has*/ -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $activeSlave.ID>> - <<if $slaves[$i].ID == $activeSlave.mother || $slaves[$i].ID == $activeSlave.father>> - <<for $j = 0; $j < $slaves.length; $j++>> - <<if $slaves[$j].genes == "XY">> - <<if areSisters($slaves[$j], $slaves[$i]) == 1 || areSisters($slaves[$j], $slaves[$i]) == 2>> - <<set $children.push($slaves[$j])>> - <</if>> + /*Sister Test with aresisters*/ + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $PC.ID>> + <<if areSisters($PC, $slaves[$i]) === 2 && areSisters($slaves[$i], $PC) === 2>> + <<if $slaves[$i].genes == "XX">> + <<set $children.push($slaves[$i])>> <</if>> - <</for>> + <</if>> <</if>> - <</if>> -<</for>> -<<if $children.length > 0>> - $He + <</for>> <<if $children.length > 2>> - has @@.lightgreen;many uncles, + <br>@@.lightgreen; <<for $j = 0; $j < $children.length; $j++>> <<if $j < $children.length-1>> $children[$j].slaveName, <<else>> - and $children[$j].slaveName.@@ + and $children[$j].slaveName <</if>> - <</for>> + <</for>>@@ + are your sisters. <<elseif $children.length > 1>> - has @@.lightgreen;two uncles, $children[0].slaveName, and $children[1].slaveName.@@ + <br>@@.lightgreen;$children[0].slaveName and $children[1].slaveName@@ are your sisters. <<elseif $children.length > 0>> - has @@.lightgreen;an uncle, $children[0].slaveName.@@ + <br>Your sister is @@.lightgreen;$children[0].slaveName.@@ <</if>> -<</if>> -<<set $children = []>> - -/*testtest PC niece passage - determines how many nieces you have*/ -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $activeSlave.ID>> - <<if areSisters($slaves[$i], $PC) == 1 || areSisters($slaves[$i], $PC) == 2>> - <<if $slaves[$i].ID == $activeSlave.mother || $slaves[$i].ID == $activeSlave.father>> - <<for $j = 0; $j < $slaves.length; $j++>> - <<if $slaves[$i].ID != $slaves[$j].ID && $slaves[$j].ID != $activeSlave.ID && $slaves[$j].genes == "XX">> - <<if $slaves[$i].ID == $slaves[$j].mother || $slaves[$i].ID == $slaves[$j].father>> - <<set $children.push($slaves[$j])>> - <</if>> - <</if>> - <</for>> + <<set $children = []>> + + /*Brother Test with aresisters*/ + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $PC.ID>> + <<if areSisters($PC, $slaves[$i]) === 2 && areSisters($slaves[$i], $PC) === 2>> + <<if $slaves[$i].genes == "XY">> + <<set $children.push($slaves[$i])>> + <</if>> <</if>> <</if>> - <</if>> -<</for>> -<<if $activeSlave.genes == "XX" && $children.length > 0>> - $He + <</for>> <<if $children.length > 2>> - is @@.lightgreen;your niece along with + <br>@@.lightgreen; <<for $j = 0; $j < $children.length; $j++>> <<if $j < $children.length-1>> $children[$j].slaveName, <<else>> - and $children[$j].slaveName.@@ + and $children[$j].slaveName <</if>> - <</for>> + <</for>>@@ + are your brothers. <<elseif $children.length > 1>> - is @@.lightgreen;your niece along with $children[0].slaveName.@@ + <br>@@.lightgreen;$children[0].slaveName and $children[1].slaveName@@ are your brothers. <<elseif $children.length > 0>> - <<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $activeSlave.ID && $activeSlave.genes == "XX">> - <<if areSisters($slaves[$i], $PC) == 1 || areSisters($slaves[$i], $PC) == 2>> - <<if $slaves[$i].ID == $activeSlave.mother || $slaves[$i].ID == $activeSlave.father>> - is @@.lightgreen;your niece.@@ - <</if>> - <</if>> - <</if>> - <</for>> + <br>Your brother is @@.lightgreen;$children[0].slaveName.@@ <</if>> -<</if>> -<<set $children = []>> + <<set $children = []>> -/* testtest niece passage - determines how many nieces a slave has*/ -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $activeSlave.ID>> - <<if areSisters($slaves[$i], $activeSlave) == 1 || areSisters($slaves[$i], $activeSlave) == 2>> - <<for $j = 0; $j < $slaves.length; $j++>> - <<if $slaves[$i].ID != $slaves[$j].ID && $slaves[$j].ID != $activeSlave.ID && $slaves[$j].genes == "XX">> - <<if $slaves[$i].ID == $slaves[$j].mother || $slaves[$i].ID == $slaves[$j].father>> - <<set $children.push($slaves[$j])>> - <</if>> + /*Half-Sister Test with aresisters */ + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $PC.ID>> + <<if areSisters($slaves[$i], $PC) == 3 && areSisters($PC, $slaves[$i]) == 3>> + <<if $slaves[$i].genes == "XX">> + <<set $children.push($slaves[$i])>> <</if>> - <</for>> + <</if>> <</if>> - <</if>> -<</for>> -<<if $children.length > 0>> - $He + <</for>> <<if $children.length > 2>> - has @@.lightgreen;many nieces, + <br>@@.lightgreen; <<for $j = 0; $j < $children.length; $j++>> <<if $j < $children.length-1>> $children[$j].slaveName, <<else>> - and $children[$j].slaveName, who are your slaves.@@ + and $children[$j].slaveName@@. <</if>> - <</for>> + <</for>>@@ + are your half-sisters. <<elseif $children.length > 1>> - has @@.lightgreen;two nieces, $children[0].slaveName, and $children[1].slaveName, who are your slaves.@@ + <br>@@.lightgreen;$children[0].slaveName and $children[1].slaveName@@ are your half-sisters. <<elseif $children.length > 0>> - has @@.lightgreen;a niece, $children[0].slaveName, who is your slave.@@ + <br>You have one half-sister, @@.lightgreen;$children[0].slaveName.@@ <</if>> -<</if>> -<<set $children = []>> + <<set $children = []>> -/*testtest PC nephew passage - determines how many nephews you have*/ -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $activeSlave.ID>> - <<if areSisters($slaves[$i], $PC) == 1 || areSisters($slaves[$i], $PC) == 2>> - <<if $slaves[$i].ID == $activeSlave.mother || $slaves[$i].ID == $activeSlave.father>> - <<for $j = 0; $j < $slaves.length; $j++>> - <<if $slaves[$i].ID != $slaves[$j].ID && $slaves[$j].ID != $activeSlave.ID && $slaves[$i].genes == "XY">> - <<if $slaves[$i].ID == $slaves[$j].mother || $slaves[$i].ID == $slaves[$j].father>> - <<set $children.push($slaves[$j])>> - <</if>> - <</if>> - <</for>> + /*Half-Brother Test with aresisters */ + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $slaves[$i].ID != $PC.ID>> + <<if areSisters($slaves[$i], $PC) == 3 && areSisters($PC, $slaves[$i]) == 3>> + <<if $slaves[$i].genes == "XY">> + <<set $children.push($slaves[$i])>> + <</if>> <</if>> <</if>> - <</if>> -<</for>> -<<if $activeSlave.genes == "XY" && $children.length > 0>> - $He + <</for>> <<if $children.length > 2>> - is @@.lightgreen;your nephew along with + <br>@@.lightgreen; <<for $j = 0; $j < $children.length; $j++>> <<if $j < $children.length-1>> $children[$j].slaveName, <<else>> - and $children[$j].slaveName.@@ + and $children[$j].slaveName. <</if>> - <</for>> + <</for>>@@ + are your half-brothers. <<elseif $children.length > 1>> - is @@.lightgreen;your nephew along with $children[0].slaveName.@@ + <br>@@.lightgreen;$children[0].slaveName and $children[1].slaveName@@ are your half-brothers. <<elseif $children.length > 0>> - <<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $activeSlave.ID && $activeSlave.genes == "XY">> - <<if areSisters($slaves[$i], $PC) == 1 || areSisters($slaves[$i], $PC) == 2>> - <<if $slaves[$i].ID == $activeSlave.mother || $slaves[$i].ID == $activeSlave.father>> - is @@.lightgreen;your nephew.@@ - <</if>> - <</if>> - <</if>> - <</for>> + <br>You have one half-brother, @@.lightgreen;$children[0].slaveName.@@ <</if>> -<</if>> -<<set $children = []>> + <<set $children = []>> -/* testtest nephew passage - determines how many nephews a slave has*/ -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $activeSlave.ID>> - <<if areSisters($slaves[$i], $activeSlave) == 1 || areSisters($slaves[$i], $activeSlave) == 2>> - <<for $j = 0; $j < $slaves.length; $j++>> - <<if $slaves[$i].ID != $slaves[$j].ID && $slaves[$j].ID != $activeSlave.ID && $slaves[$j].genes == "XY">> - <<if $slaves[$i].ID == $slaves[$j].mother || $slaves[$i].ID == $slaves[$j].father>> - <<set $children.push($slaves[$j])>> - <</if>> - <</if>> - <</for>> + /* + <<if $PC.clone != 0>> + <br>You are a clone of + <<if $activeSlave.cloneID == -1>> + yourself. + <<else>> + $PC.clone. <</if>> <</if>> -<</for>> -<<if $children.length > 0>> - $He + */ + + /*Player is Father, lists children you fathered*/ + <<for $i = 0; $i < $slaves.length; $i++>> + <<if $PC.ID == $slaves[$i].father>> + <<set $children.push($slaves[$i])>> + <</if>> + <</for>> <<if $children.length > 2>> - has @@.lightgreen;many nephews, + <br>You are the father of @@.lightgreen; <<for $j = 0; $j < $children.length; $j++>> <<if $j < $children.length-1>> $children[$j].slaveName, <<else>> - and $children[$j].slaveName, who are your slaves.@@ + and $children[$j].slaveName.@@ <</if>> <</for>> <<elseif $children.length > 1>> - has @@.lightgreen;two nephews, $children[0].slaveName, and $children[1].slaveName, who are your slaves.@@ + <br>You are the father of two of your slaves, @@.lightgreen;$children[0].slaveName, and $children[1].slaveName.@@ <<elseif $children.length > 0>> - has @@.lightgreen;a nephew, $children[0].slaveName, who is your slave.@@ - <</if>> -<</if>> -<<set $children = []>> - -/*testtest PC sibling passages - determines how many siblings you have -<<set $children = []>> -<<set _rel_num = areSisters($activeSlave, $PC)>> -<<if(_rel_num > 0)>> - <<if ($activeSlave.genes == "XX")>> - <<set _rel_type = "sister">> - <<else>> - <<set _rel_type = "brother">> - <</if>> - <<if (_rel_num == 1)>> - <<set _rel_desc = "your twin">> - <<elseif _rel_num == 2>> - <<set _rel_desc = "your ">> - <<elseif _rel_num == 3>> - <<set _rel_desc = "your half-">> + <br>You are the father of one of your slaves, @@.lightgreen;$children[0].slaveName.@@ <</if>> + <<set $children = []>> + + /*Player is Mother, lists birthed children*/ <<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $activeSlave.ID>> - <<if _rel_num == areSisters($activeSlave, $slaves[$i]) && ($activeSlave.vagina > -1) == ($slaves[$i].vagina > -1)>> - <<set console.log('sisters', $slaves[$i].birthName)>> - <<set $children.push($slaves[$i])>> - <</if>> + <<if $PC.ID == $slaves[$i].mother>> + <<set $children.push($slaves[$i])>> <</if>> <</for>> - $He - <<if $children.length > 1>> - @@.lightgreen;is _rel_desc _rel_type along with + <<if $children.length > 2>> + <br>You are the mother of@@.lightgreen; <<for $j = 0; $j < $children.length; $j++>> <<if $j < $children.length-1>> $children[$j].slaveName, @@ -550,633 +923,171 @@ and $children[$j].slaveName.@@ <</if>> <</for>> + <<elseif $children.length > 1>> + <br>You are the mother of two of your slaves, @@.lightgreen;$children[0].slaveName, and $children[1].slaveName.@@ <<elseif $children.length > 0>> - is @@.lightgreen;_rel_desc _rel_type with $children[0].slaveName.@@ - <<else>> - is @@.lightgreen;_rel_desc _rel_type.@@ - <</if>> -<</if>> -<<set $children = []>> -*/ - -<<set _twins = [], _sisters = [], _brothers = [], _halfsisters = [], _halfbrothers = []>> -<<for _efw = 0; _efw < $slaves.length; _efw++>> - <<set _sisterCheck = areSisters($slaves[_efw], $activeSlave)>> - <<if _sisterCheck == 1>> - <<run _twins.push($slaves[_efw])>> + <br>You are the mother of one of your slaves, @@.lightgreen;$children[0].slaveName.@@ <</if>> - <<if _sisterCheck == 2>> - <<run ($slaves[_efw].genes == 'XX' ? _sisters : _brothers).push($slaves[_efw])>> - <</if>> - <<if _sisterCheck == 3>> - <<run ($slaves[_efw].genes == 'XX' ? _halfsisters : _halfbrothers).push($slaves[_efw])>> - <</if>> -<</for>> - -/*testtest PC twin passages - determines how many twins you have but not implemented yet*/ -<<if areSisters($activeSlave, $PC) == 1>> - $He - <<if _twins.length > 1>> - @@.lightgreen;shared a cramped womb with you, <<print _twins.reduce(function(res, ch, i, arr) { return (res.slaveName || res) + (i == arr.length - 1 ? ' and ' : ', ') + ch.slaveName; })>>.@@ - <<elseif _twins.length > 0>> - is @@.lightgreen;your twin along with _twins[0].slaveName.@@ - <<else>> - is @@.lightgreen;your twin <<if $activeSlave.genes == "XX">>sister<<else>>brother<</if>>.@@ - <</if>> -<</if>> - -/*testtest PC sister passages - determines how many sisters you have*/ -<<if areSisters($activeSlave, $PC) < 3 && areSisters($activeSlave, $PC) > 0 && $activeSlave.genes == "XX">> - $He - <<if _sisters.length > 1>> - @@.lightgreen;is your sister along with <<print _sisters.reduce(function(res, ch, i, arr) { return (res.slaveName || res) + (i == arr.length - 1 ? ' and ' : ', ') + ch.slaveName; })>>.@@ - <<elseif _sisters.length > 0>> - is @@.lightgreen;your sister along with _sisters[0].slaveName.@@ - <<else>> - is @@.lightgreen;your sister.@@ - <</if>> -<</if>> - -/*testtest PC brother passages - determines how many brothers you have*/ -<<if areSisters($activeSlave, $PC) < 3 && areSisters($activeSlave, $PC) > 0 && $activeSlave.genes == "XY">> - $He - <<if _brothers.length > 1>> - @@.lightgreen;is your brother along with <<print _brothers.reduce(function(res, ch, i, arr) { return (res.slaveName || res) + (i == arr.length - 1 ? ' and ' : ', ') + ch.slaveName; })>>.@@ - <<elseif _brothers.length > 0>> - is @@.lightgreen;your brother along with _brothers[0].slaveName.@@ - <<else>> - is @@.lightgreen;your brother.@@ - <</if>> -<</if>> - -/*testtest PC half-sister passages - determines how many half-sisters you have*/ -<<if areSisters($activeSlave, $PC) == 3 && $activeSlave.genes == "XX">> - $He - <<if _halfsisters.length > 1>> - @@.lightgreen;is your half-sister along with <<print _halfsisters.reduce(function(res, ch, i, arr) { return (res.slaveName || res) + (i == arr.length - 1 ? ' and ' : ', ') + ch.slaveName; })>>.@@ - <<elseif _halfsisters.length > 0>> - is @@.lightgreen;your half-sister along with _halfsisters[0].slaveName.@@ - <<else>> - is @@.lightgreen;your half-sister.@@ - <</if>> -<</if>> - -/*testtest PC half-brother passages - determines how many half-brothers you have*/ -<<if areSisters($activeSlave, $PC) == 3 && $activeSlave.genes == "XY">> - $He - <<if _halfbrothers.length > 1>> - @@.lightgreen;is your half-brother along with <<print _halfbrothers.reduce(function(res, ch, i, arr) { return (res.slaveName || res) + (i == arr.length - 1 ? ' and ' : ', ') + ch.slaveName; })>>.@@ - <<elseif _halfbrothers.length > 0>> - is @@.lightgreen;your half-brother along with _halfbrothers[0].slaveName.@@ - <<else>> - is @@.lightgreen;your half-brother.@@ - <</if>> -<</if>> - -/*testtest twins? - determines how many twins a slave has*/ -<<if _twins.length > 0>> - $He - <<if _twins.length > 2>> - @@.lightgreen;shared a cramped womb with <<print _twins.reduce(function(res, ch, i, arr) { return (res.slaveName || res) + (i == arr.length - 1 ? ' and ' : ', ') + ch.slaveName; })>>.@@ - <<elseif _twins.length > 1>> - is @@.lightgreen;one of a set of triplets; _twins[0].slaveName and _twins[1].slaveName@@ complete the trio. - <<else>> - is @@.lightgreen;twins with _twins[0].slaveName.@@ - <</if>> -<</if>> + <<set $children = []>> -/*testtest sister - determines how many sisters a slave has*/ -<<if _sisters.length > 0>> - <<if _sisters.length > 1>> - @@.lightgreen;<<print _sisters.reduce(function(res, ch, i, arr) { return (res.slaveName || res) + (i == arr.length - 1 ? ' and ' : ', ') + ch.slaveName; })>> are $his sisters.@@ - <<else>> - @@.lightgreen; _sisters[0].slaveName is $his sister.@@ + <<if $cheatMode == 1>> + $PC.sisters sisters, $PC.daughters daughters. <</if>> -<</if>> -/*testtest brother - determines how many brothers a slave has*/ -<<if _brothers.length > 0>> - <<if _brothers.length > 1>> - @@.lightgreen;<<print _brothers.reduce(function(res, ch, i, arr) { return (res.slaveName || res) + (i == arr.length - 1 ? ' and ' : ', ') + ch.slaveName; })>> are $his brothers.@@ + <</widget>> + + <<widget "parentName">> + <<if $activeSlave[$args[0]] == $PC.ID>> + You <<else>> - @@.lightgreen;_brothers[0].slaveName is $his brother.@@ - <</if>> -<</if>> - -/*testtest half-sister - determines how many half-sisters a slave has*/ -<<set _children = $slaves.filter(function(s) { return s.ID != $activeSlave.ID && areSisters($activeSlave, s) == 3 && s.genes == "XX"; })>> -<<if _children.length > 2>> - @@.lightgreen; - <<for _efw = 0; _efw < _children.length; _efw++>> - <<if _efw < _children.length-1>> - _children[_efw].slaveName, - <<else>> - and _children[_efw].slaveName - <</if>> - <</for>> - are half-sisters to $him.@@ -<<elseif _children.length > 1>> - @@.lightgreen;_children[0].slaveName and _children[1].slaveName are half-sisters to $him.@@ -<<elseif _children.length > 0>> - @@.lightgreen;_children[0].slaveName is a half-sister to $him.@@ -<</if>> - -/*testtest half-brother - determines how many half-brothers a slave has*/ -<<set _children = $slaves.filter(function(s) { return s.ID != $activeSlave.ID && areSisters($activeSlave, s) == 3 && s.genes == "XY"; })>> -<<if _children.length > 2>> - @@.lightgreen; - <<for _efw = 0; _efw < _children.length; _efw++>> - <<if _efw < _children.length-1>> - _children[_efw].slaveName, + <<set _j = $slaveIndices[$activeSlave[$args[0]]]>> + <<if def _j>> + <<print $slaves[_j].slaveName>> <<else>> - and _children[_efw].slaveName + Unknown <</if>> - <</for>> - are half-brothers to $him.@@ -<<elseif _children.length > 1>> - @@.lightgreen;_children[0].slaveName and _children[1].slaveName are half-brothers to $him.@@ -<<elseif _children.length > 0>> - @@.lightgreen;_children[0].slaveName is a half-brother to $him.@@ -<</if>> - -<<if $activeSlave.clone != 0>> - $He is - <<if $activeSlave.cloneID == -1>> - your clone. - <<else>> - a clone of $activeSlave.clone. - <</if>> -<</if>> - -<<if $cheatMode == 1>> - $activeSlave.sisters sisters, $activeSlave.daughters daughters. -<</if>> - -<</widget>> - -<<widget PlayerFamily>> - -<br><br>Your present family includes: - -/*Player parents, lists both your parents, or just one.*/ -<<if $showMissingSlaves>> - <<if $PC.mother in $missingTable>> - <<set $children.push($missingTable[$PC.mother])>> <</if>> - <<if $PC.father in $missingTable && !($PC.father == $PC.mother)>> - <<set $children.push($missingTable[$PC.father])>> - <</if>> -<</if>> -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID == $PC.father || $slaves[$i].ID == $PC.mother>> - <<set $children.push($slaves[$i])>> - <</if>> -<</for>> -<<if $children.length > 1>> - <br>Your parents are @@.lightgreen;<<if $children[0].ID < 0>>your former slave<<if $children[1].ID < 0>>s<</if>><</if>> $children[0].slaveName and <<if $children[1].ID < 0 && $children[0].ID > 0>>your former slave<</if>> $children[1].slaveName@@. -<<elseif $children.length > 0>> - <<if $PC.father == $PC.mother>> - <br>Your parent is @@.lightgreen;<<if $children[0].ID < 0>>your former slave<</if>> $children[0].slaveName,@@ who impregnated $himself with you. - <<else>> - <br>You know one of your parents, @@.lightgreen;<<if $children[0].ID < 0>>your former slave<</if>> $children[0].slaveName@@. - <</if>> -<</if>> -<<set $children = []>> + <</widget>> -/*Twins Test with aresisters*/ -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $PC.ID>> - <<if areSisters($slaves[$i], $PC) == 1 && areSisters($slaves[$i], $slaves[$i]) == 1>> - <<set $children.push($slaves[$i])>> - <</if>> - <</if>> -<</for>> -<<if $children.length > 2>> - <br>You are @@.lightgreen;twins with - <<for $j = 0; $j < $children.length; $j++>> - <<if $j < $children.length-1>> - $children[$j].slaveName, - <<else>> - and $children[$j].slaveName.@@ - <</if>> - <</for>> -<<elseif $children.length > 1>> - <br>You are twins with @@.lightgreen;$children[0].slaveName and $children[1].slaveName.@@ -<<elseif $children.length > 0>> - <br>Your twin is @@.lightgreen;$children[0].slaveName.@@ -<</if>> -<<set $children = []>> - -/*Sister Test with aresisters*/ -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $PC.ID>> - <<if areSisters($PC, $slaves[$i]) === 2 && areSisters($slaves[$i], $PC) === 2>> - <<if $slaves[$i].genes == "XX">> - <<set $children.push($slaves[$i])>> - <</if>> + <<widget "listOfSlavesWithSameParent">> + <<if $activeSlave[$args[0]] != 0>> + <<set _printSeperator = false>> + <<if $activeSlave[$args[0]] == $PC[$args[0]]>> + You + <<set _printSeperator = true>> <</if>> - <</if>> -<</for>> -<<if $children.length > 2>> - <br>@@.lightgreen; - <<for $j = 0; $j < $children.length; $j++>> - <<if $j < $children.length-1>> - $children[$j].slaveName, - <<else>> - and $children[$j].slaveName - <</if>> - <</for>>@@ - are your sisters. -<<elseif $children.length > 1>> - <br>@@.lightgreen;$children[0].slaveName and $children[1].slaveName@@ are your sisters. -<<elseif $children.length > 0>> - <br>Your sister is @@.lightgreen;$children[0].slaveName.@@ -<</if>> -<<set $children = []>> - -/*Brother Test with aresisters*/ -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $PC.ID>> - <<if areSisters($PC, $slaves[$i]) === 2 && areSisters($slaves[$i], $PC) === 2>> - <<if $slaves[$i].genes == "XY">> - <<set $children.push($slaves[$i])>> + <<for _j = 0; _j < $slaves.length; _j++>> + <<if $slaves[_j][$args[0]] == $activeSlave[$args[0]]>> + <<if _printSeperator>> | <</if>> + <<set _printSeperator = true>> + <<print $slaves[_j].slaveName>> <</if>> - <</if>> + <</for>> <</if>> -<</for>> -<<if $children.length > 2>> - <br>@@.lightgreen; - <<for $j = 0; $j < $children.length; $j++>> - <<if $j < $children.length-1>> - $children[$j].slaveName, - <<else>> - and $children[$j].slaveName - <</if>> - <</for>>@@ - are your brothers. -<<elseif $children.length > 1>> - <br>@@.lightgreen;$children[0].slaveName and $children[1].slaveName@@ are your brothers. -<<elseif $children.length > 0>> - <br>Your brother is @@.lightgreen;$children[0].slaveName.@@ -<</if>> -<<set $children = []>> - -/*Half-Sister Test with aresisters */ -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $PC.ID>> - <<if areSisters($slaves[$i], $PC) == 3 && areSisters($PC, $slaves[$i]) == 3>> - <<if $slaves[$i].genes == "XX">> - <<set $children.push($slaves[$i])>> - <</if>> + <</widget>> + + <<widget "redisplayFamily">> + <<replace '#fatheredNames'>><<listOfSlavesWithParent "father" $activeSlave.ID>><</replace>> + <<replace '#motheredNames'>><<listOfSlavesWithParent "mother" $activeSlave.ID>><</replace>> + <<replace '#familySummary'>><<Family>><</replace>> + <<replace '#motherName'>><<parentName "mother">><</replace>> + <<replace '#fatherName'>><<parentName "father">><</replace>> + <<replace '#sameMotherNames'>><<listOfSlavesWithSameParent 'mother'>><</replace>> + <<replace '#sameFatherNames'>><<listOfSlavesWithSameParent 'father'>><</replace>> + /* <<run updateFamilyTree($activeSlave, $slaves, $PC)>> */ + <<set _tSlaveList = [$activeSlave]>> + <<set _tSlaveList.push.apply(_tSlaveList, $slaves)>> + <<run renderFamilyTree(_tSlaveList, $activeSlave.ID)>> + <</widget>> + + /* First parameter is e.g. "father" or "mother" and second parameter is the ID to match */ + <<widget "listOfSlavesWithParent">> + <<if $args[1] != 0>> + <<set _printSeperator = false>> + <<if $args[1] == $PC[$args[0]]>> + You + <<set _printSeperator = true>> <</if>> - <</if>> -<</for>> -<<if $children.length > 2>> - <br>@@.lightgreen; - <<for $j = 0; $j < $children.length; $j++>> - <<if $j < $children.length-1>> - $children[$j].slaveName, - <<else>> - and $children[$j].slaveName@@. - <</if>> - <</for>>@@ - are your half-sisters. -<<elseif $children.length > 1>> - <br>@@.lightgreen;$children[0].slaveName and $children[1].slaveName@@ are your half-sisters. -<<elseif $children.length > 0>> - <br>You have one half-sister, @@.lightgreen;$children[0].slaveName.@@ -<</if>> -<<set $children = []>> - -/*Half-Brother Test with aresisters */ -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $slaves[$i].ID != $PC.ID>> - <<if areSisters($slaves[$i], $PC) == 3 && areSisters($PC, $slaves[$i]) == 3>> - <<if $slaves[$i].genes == "XY">> - <<set $children.push($slaves[$i])>> + <<for _j = 0; _j < $slaves.length; _j++>> + <<if $slaves[_j][$args[0]] == $args[1]>> + <<if _printSeperator>> | <</if>> + <<set _printSeperator = true>> + <<print $slaves[_j].slaveName>> <</if>> - <</if>> - <</if>> -<</for>> -<<if $children.length > 2>> - <br>@@.lightgreen; - <<for $j = 0; $j < $children.length; $j++>> - <<if $j < $children.length-1>> - $children[$j].slaveName, - <<else>> - and $children[$j].slaveName. - <</if>> - <</for>>@@ - are your half-brothers. -<<elseif $children.length > 1>> - <br>@@.lightgreen;$children[0].slaveName and $children[1].slaveName@@ are your half-brothers. -<<elseif $children.length > 0>> - <br>You have one half-brother, @@.lightgreen;$children[0].slaveName.@@ -<</if>> -<<set $children = []>> - -/* -<<if $PC.clone != 0>> - <br>You are a clone of - <<if $activeSlave.cloneID == -1>> - yourself. - <<else>> - $PC.clone. - <</if>> -<</if>> -*/ - -/*Player is Father, lists children you fathered*/ -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $PC.ID == $slaves[$i].father>> - <<set $children.push($slaves[$i])>> - <</if>> -<</for>> -<<if $children.length > 2>> - <br>You are the father of @@.lightgreen; - <<for $j = 0; $j < $children.length; $j++>> - <<if $j < $children.length-1>> - $children[$j].slaveName, - <<else>> - and $children[$j].slaveName.@@ - <</if>> - <</for>> -<<elseif $children.length > 1>> - <br>You are the father of two of your slaves, @@.lightgreen;$children[0].slaveName, and $children[1].slaveName.@@ -<<elseif $children.length > 0>> - <br>You are the father of one of your slaves, @@.lightgreen;$children[0].slaveName.@@ -<</if>> -<<set $children = []>> - -/*Player is Mother, lists birthed children*/ -<<for $i = 0; $i < $slaves.length; $i++>> - <<if $PC.ID == $slaves[$i].mother>> - <<set $children.push($slaves[$i])>> - <</if>> -<</for>> -<<if $children.length > 2>> - <br>You are the mother of@@.lightgreen; - <<for $j = 0; $j < $children.length; $j++>> - <<if $j < $children.length-1>> - $children[$j].slaveName, - <<else>> - and $children[$j].slaveName.@@ - <</if>> - <</for>> -<<elseif $children.length > 1>> - <br>You are the mother of two of your slaves, @@.lightgreen;$children[0].slaveName, and $children[1].slaveName.@@ -<<elseif $children.length > 0>> - <br>You are the mother of one of your slaves, @@.lightgreen;$children[0].slaveName.@@ -<</if>> -<<set $children = []>> - -<<if $cheatMode == 1>> - $PC.sisters sisters, $PC.daughters daughters. -<</if>> - -<</widget>> - -<<widget "parentName">> -<<if $activeSlave[$args[0]] == $PC.ID>> - You -<<else>> - <<set _j = $slaveIndices[$activeSlave[$args[0]]]>> - <<if def _j>> - <<print $slaves[_j].slaveName>> - <<else>> - Unknown - <</if>> -<</if>> -<</widget>> - -<<widget "listOfSlavesWithSameParent">> -<<if $activeSlave[$args[0]] != 0>> - <<set _printSeperator = false>> - <<if $activeSlave[$args[0]] == $PC[$args[0]]>> - You - <<set _printSeperator = true>> + <</for>> <</if>> - <<for _j = 0; _j < $slaves.length; _j++>> - <<if $slaves[_j][$args[0]] == $activeSlave[$args[0]]>> - <<if _printSeperator>> | <</if>> - <<set _printSeperator = true>> - <<print $slaves[_j].slaveName>> - <</if>> - <</for>> -<</if>> -<</widget>> - -<<widget "redisplayFamily">> -<<replace '#fatheredNames'>><<listOfSlavesWithParent "father" $activeSlave.ID>><</replace>> -<<replace '#motheredNames'>><<listOfSlavesWithParent "mother" $activeSlave.ID>><</replace>> -<<replace '#familySummary'>><<Family>><</replace>> -<<replace '#motherName'>><<parentName "mother">><</replace>> -<<replace '#fatherName'>><<parentName "father">><</replace>> -<<replace '#sameMotherNames'>><<listOfSlavesWithSameParent 'mother'>><</replace>> -<<replace '#sameFatherNames'>><<listOfSlavesWithSameParent 'father'>><</replace>> -/* <<run updateFamilyTree($activeSlave, $slaves, $PC)>> */ -<<set _tSlaveList = [$activeSlave]>> -<<set _tSlaveList.push.apply(_tSlaveList, $slaves)>> -<<run renderFamilyTree(_tSlaveList, $activeSlave.ID)>> -<</widget>> + <</widget>> -/* First parameter is e.g. "father" or "mother" and second parameter is the ID to match */ -<<widget "listOfSlavesWithParent">> -<<if $args[1] != 0>> - <<set _printSeperator = false>> - <<if $args[1] == $PC[$args[0]]>> - You - <<set _printSeperator = true>> - <</if>> - <<for _j = 0; _j < $slaves.length; _j++>> - <<if $slaves[_j][$args[0]] == $args[1]>> - <<if _printSeperator>> | <</if>> - <<set _printSeperator = true>> - <<print $slaves[_j].slaveName>> - <</if>> - <</for>> -<</if>> -<</widget>> + <<widget "editFamily">> + <div id="editFamily"><div id="familyTable"> -<<widget "editFamily">> -<div id="editFamily"><div id="familyTable"> - -<br>''Mother:'' <span id="motherName"><<parentName "mother">></span> -<<link "Reset">> - <<set $activeSlave.mother = 0>> - <<redisplayFamily>> -<</link>> -<<if ($PC.vagina == 1) && (($PC.actualAge - $activeSlave.actualAge) >= $fertilityAge) && ($saveImported == 0)>> - | - <<link "You">> - <<set $activeSlave.mother = $PC.ID>> + <br>''Mother:'' <span id="motherName"><<parentName "mother">></span> + <<link "Reset">> + <<set $activeSlave.mother = 0>> <<redisplayFamily>> <</link>> -<</if>> -<<for _efw = 0; _efw < $slaves.length; _efw++>> - <<if $slaves[_efw].vagina > 0 && (($slaves[_efw].actualAge - $activeSlave.actualAge) >= $fertilityAge) && ($slaves[_efw].newGamePlus == 0)>> - | - <<set _id = $slaves[_efw].ID>> - <<set _slaveName = $slaves[_efw].slaveName>> - <<print " - <<link _slaveName>> - <<set $activeSlave.mother = " + _id + ">> + <<if ($PC.vagina == 1) && (($PC.actualAge - $activeSlave.actualAge) >= $fertilityAge) && ($saveImported == 0)>> + | + <<link "You">> + <<set $activeSlave.mother = $PC.ID>> <<redisplayFamily>> <</link>> - ">> <</if>> -<</for>> - -<br>''Father:'' <span id="fatherName"><<parentName "father">></span> -<<link "Reset">> - <<set $activeSlave.father = 0>> - <<redisplayFamily>> -<</link>> -<<if ($PC.dick == 1) && (($PC.actualAge - $activeSlave.actualAge) >= $potencyAge) && ($saveImported == 0)>> - | - <<link "You">> - <<set $activeSlave.father = $PC.ID>> - <<redisplayFamily>> - <</link>> -<</if>> -<<for _efw = 0; _efw < $slaves.length; _efw++>> - <<if ($slaves[_efw].dick > 0) && ((($slaves[_efw].actualAge - $activeSlave.actualAge) >= $potencyAge)) && ($slaves[_efw].newGamePlus == 0)>> + <<for _efw = 0; _efw < $slaves.length; _efw++>> + <<if $slaves[_efw].vagina > 0 && (($slaves[_efw].actualAge - $activeSlave.actualAge) >= $fertilityAge) && ($slaves[_efw].newGamePlus == 0)>> | <<set _id = $slaves[_efw].ID>> <<set _slaveName = $slaves[_efw].slaveName>> <<print " <<link _slaveName>> - <<set $activeSlave.father = " + _id + ">> + <<set $activeSlave.mother = " + _id + ">> <<redisplayFamily>> <</link>> ">> - <</if>> -<</for>> - -<br>''Same mother as:'' <span id="sameMotherNames"><<listOfSlavesWithSameParent 'mother'>></span> -<<link "Reset">> - <<set $activeSlave.mother = 0>> - <<redisplayFamily>> -<</link>> -<<if ($activeSlave.mother != $PC.ID) && ($PC.mother != $activeSlave.ID) && ($saveImported == 0)>> - | - <<link "You">> - <<if $PC.mother != 0>> - <<set $activeSlave.mother = $PC.mother>> - <<elseif $activeSlave.mother != 0>> - <<set $PC.mother = $activeSlave.mother>> - <<else>> - <<set $activeSlave.mother = -5 - 2*$activeSlave.ID>> - <<set $PC.mother = $activeSlave.mother>> <</if>> + <</for>> + + <br>''Father:'' <span id="fatherName"><<parentName "father">></span> + <<link "Reset">> + <<set $activeSlave.father = 0>> <<redisplayFamily>> <</link>> -<</if>> -<<for _efw = 0; _efw < $slaves.length; _efw++>> - <<if $slaves[_efw].newGamePlus == 0>> - <<if $saveImported == 1>>|<</if>> - <<set _slaveName = $slaves[_efw].slaveName>> - <<set _slave = $slaves[_efw]>> - <<if $activeSlave.mother != _slave.ID && _slave.mother != $activeSlave.ID>> - <<print " - <<link _slaveName>> - <<set _slave = $slaves[" + _efw + "]>> - <<if _slave.mother != 0>> - <<set $activeSlave.mother = _slave.mother>> - <<elseif $activeSlave.mother != 0>> - <<set _slave.mother = $activeSlave.mother>> - <<else>> - <<set $activeSlave.mother = -5 - 2*$activeSlave.ID>> - <<set _slave.mother = $activeSlave.mother>> - <</if>> - <<redisplayFamily>> - <</link>> - ">> - <</if>> + <<if ($PC.dick == 1) && (($PC.actualAge - $activeSlave.actualAge) >= $potencyAge) && ($saveImported == 0)>> + | + <<link "You">> + <<set $activeSlave.father = $PC.ID>> + <<redisplayFamily>> + <</link>> <</if>> -<</for>> - -<br>''Same father as:'' <span id="sameFatherNames"><<listOfSlavesWithSameParent 'father'>></span> -<<link "Reset">> - <<set $activeSlave.father = 0>> - <<replace '#fatherName'>><</replace>> - <<replace '#sameFatherNames'>><</replace>> - <<redisplayFamily>> -<</link>> -<<if ($activeSlave.father != $PC.ID) && ($PC.father != $activeSlave.ID) && ($saveImported == 0)>> - | - <<link "You">> - <<if $PC.father != 0>> - <<set $activeSlave.father = $PC.father>> - <<elseif $activeSlave.father != 0>> - <<set $PC.father = $activeSlave.father>> - <<else>> - <<set $activeSlave.father = -5 - 2*$activeSlave.ID -1>> - <<set $PC.father = $activeSlave.father>> - <</if>> - <<redisplayFamily>> - <</link>> -<</if>> -<<for _efw = 0; _efw < $slaves.length; _efw++>> - <<if $slaves[_efw].newGamePlus == 0>> - <<if $saveImported == 1>>|<</if>> - <<set _slaveName = $slaves[_efw].slaveName>> - <<set _slave = $slaves[_efw]>> - <<if $activeSlave.father != _slave.ID && _slave.father != $activeSlave.ID>> + <<for _efw = 0; _efw < $slaves.length; _efw++>> + <<if ($slaves[_efw].dick > 0) && ((($slaves[_efw].actualAge - $activeSlave.actualAge) >= $potencyAge)) && ($slaves[_efw].newGamePlus == 0)>> + | + <<set _id = $slaves[_efw].ID>> + <<set _slaveName = $slaves[_efw].slaveName>> <<print " <<link _slaveName>> - <<set _slave = $slaves[" + _efw + "]>> - <<if _slave.father != 0>> - <<set $activeSlave.father = _slave.father>> - <<elseif $activeSlave.father != 0>> - <<set _slave.father = $activeSlave.father>> - <<else>> - <<set $activeSlave.father = -5 - 2*$activeSlave.ID -1>> - <<set _slave.father = $activeSlave.father>> - <</if>> + <<set $activeSlave.father = " + _id + ">> <<redisplayFamily>> <</link>> ">> <</if>> - <</if>> -<</for>> - -<br>''Mother of the children:'' <span id="motheredNames"><<listOfSlavesWithParent "mother" $activeSlave.ID>></span> -<<link "Reset">> - <<for _efw = 0; _efw < $slaves.length; _efw++>> - <<if $slaves[_efw].mother == $activeSlave.ID && $slaves[_efw].newGamePlus == 0>> - <<set $slaves[_efw].mother = 0>> - <</if>> <</for>> - <<if $PC.mother == $activeSlave.ID && $saveImported == 0>> - <<set $PC.mother = 0>> - <</if>> - <<redisplayFamily>> -<</link>> -<<if $activeSlave.vagina >= 0>> - <<if ($activeSlave.actualAge - $PC.actualAge) >= $fertilityAge && $saveImported == 0>> + + <br>''Same mother as:'' <span id="sameMotherNames"><<listOfSlavesWithSameParent 'mother'>></span> + <<link "Reset">> + <<set $activeSlave.mother = 0>> + <<redisplayFamily>> + <</link>> + <<if ($activeSlave.mother != $PC.ID) && ($PC.mother != $activeSlave.ID) && ($saveImported == 0)>> | <<link "You">> - <<set $PC.mother = $activeSlave.ID>> - <<if $activeSlave.vagina == 0>> - <<set $activeSlave.vagina = 1>> + <<if $PC.mother != 0>> + <<set $activeSlave.mother = $PC.mother>> + <<elseif $activeSlave.mother != 0>> + <<set $PC.mother = $activeSlave.mother>> + <<else>> + <<set $activeSlave.mother = -5 - 2*$activeSlave.ID>> + <<set $PC.mother = $activeSlave.mother>> <</if>> <<redisplayFamily>> <</link>> <</if>> - <<for _efw = 0; _efw < $slaves.length; _efw++>> <<if $slaves[_efw].newGamePlus == 0>> + <<if $saveImported == 1>>|<</if>> <<set _slaveName = $slaves[_efw].slaveName>> <<set _slave = $slaves[_efw]>> - <<if ($activeSlave.actualAge - _slave.actualAge) >= $fertilityAge>> - | + <<if $activeSlave.mother != _slave.ID && _slave.mother != $activeSlave.ID>> <<print " <<link _slaveName>> <<set _slave = $slaves[" + _efw + "]>> - <<set _slave.mother = $activeSlave.ID>> - <<if $activeSlave.vagina == 0>> - <<set $activeSlave.vagina = 1>> + <<if _slave.mother != 0>> + <<set $activeSlave.mother = _slave.mother>> + <<elseif $activeSlave.mother != 0>> + <<set _slave.mother = $activeSlave.mother>> + <<else>> + <<set $activeSlave.mother = -5 - 2*$activeSlave.ID>> + <<set _slave.mother = $activeSlave.mother>> <</if>> <<redisplayFamily>> <</link>> @@ -1184,103 +1095,192 @@ <</if>> <</if>> <</for>> -<</if>> -<br>''Father of the children:'' <span id="fatheredNames"><<listOfSlavesWithParent "father" $activeSlave.ID>></span> -<<link "Reset">> - <<for _efw = 0; _efw < $slaves.length; _efw++>> - <<if $slaves[_efw].father == $activeSlave.ID && $slaves[_efw].newGamePlus == 0>> - <<set $slaves[_efw].father = 0>> - <</if>> - <</for>> - <<if $PC.father == $activeSlave.ID && $saveImported == 0>> - <<set $PC.father = 0>> - <</if>> - <<redisplayFamily>> -<</link>> -<<if $activeSlave.dick > 0>> - <<if ($activeSlave.actualAge - $PC.actualAge) >= $potencyAge && $saveImported == 0>> + <br>''Same father as:'' <span id="sameFatherNames"><<listOfSlavesWithSameParent 'father'>></span> + <<link "Reset">> + <<set $activeSlave.father = 0>> + <<replace '#fatherName'>><</replace>> + <<replace '#sameFatherNames'>><</replace>> + <<redisplayFamily>> + <</link>> + <<if ($activeSlave.father != $PC.ID) && ($PC.father != $activeSlave.ID) && ($saveImported == 0)>> | <<link "You">> - <<set $PC.father = $activeSlave.ID>> + <<if $PC.father != 0>> + <<set $activeSlave.father = $PC.father>> + <<elseif $activeSlave.father != 0>> + <<set $PC.father = $activeSlave.father>> + <<else>> + <<set $activeSlave.father = -5 - 2*$activeSlave.ID -1>> + <<set $PC.father = $activeSlave.father>> + <</if>> <<redisplayFamily>> <</link>> <</if>> - <<for _efw = 0; _efw < $slaves.length; _efw++>> <<if $slaves[_efw].newGamePlus == 0>> + <<if $saveImported == 1>>|<</if>> <<set _slaveName = $slaves[_efw].slaveName>> <<set _slave = $slaves[_efw]>> - <<if ($activeSlave.actualAge - _slave.actualAge) >= $fertilityAge>> - | + <<if $activeSlave.father != _slave.ID && _slave.father != $activeSlave.ID>> <<print " <<link _slaveName>> <<set _slave = $slaves[" + _efw + "]>> - <<set _slave.father = $activeSlave.ID>> + <<if _slave.father != 0>> + <<set $activeSlave.father = _slave.father>> + <<elseif $activeSlave.father != 0>> + <<set _slave.father = $activeSlave.father>> + <<else>> + <<set $activeSlave.father = -5 - 2*$activeSlave.ID -1>> + <<set _slave.father = $activeSlave.father>> + <</if>> <<redisplayFamily>> <</link>> ">> <</if>> <</if>> <</for>> -<</if>> -<br> -<<if $saveImported == 0>> - <<link "Reset ALL PC Relatives">> - <<set _sameMother = 0, _sameFather = 0>> + <br>''Mother of the children:'' <span id="motheredNames"><<listOfSlavesWithParent "mother" $activeSlave.ID>></span> + <<link "Reset">> <<for _efw = 0; _efw < $slaves.length; _efw++>> - <<if $slaves[_efw].newGamePlus == 0>> - <<if $slaves[_efw].mother == $PC.ID>> - <<set $slaves[_efw].mother = 0>> - <</if>> - <<if $slaves[_efw].father == $PC.ID>> - <<set $slaves[_efw].father = 0>> - <</if>> - <<if $slaves[_efw].mother == $PC.mother>> - <<set _sameMother++>> - <</if>> - <<if $slaves[_efw].father == $PC.father>> - <<set _sameFather++>> - <</if>> + <<if $slaves[_efw].mother == $activeSlave.ID && $slaves[_efw].newGamePlus == 0>> + <<set $slaves[_efw].mother = 0>> <</if>> <</for>> - <<if _sameMother == 0 && $activeSlave.mother == $PC.mother>> - <<set $activeSlave.mother = 0>> + <<if $PC.mother == $activeSlave.ID && $saveImported == 0>> + <<set $PC.mother = 0>> <</if>> - <<if _sameFather == 0 && $activeSlave.father == $PC.father>> - <<set $activeSlave.father = 0>> + <<redisplayFamily>> + <</link>> + <<if $activeSlave.vagina >= 0>> + <<if ($activeSlave.actualAge - $PC.actualAge) >= $fertilityAge && $saveImported == 0>> + | + <<link "You">> + <<set $PC.mother = $activeSlave.ID>> + <<if $activeSlave.vagina == 0>> + <<set $activeSlave.vagina = 1>> + <</if>> + <<redisplayFamily>> + <</link>> <</if>> - <<for _efw = 0; (_efw < $slaves.length && (_sameMother == 1 || _sameFather == 1)); _efw++>> + + <<for _efw = 0; _efw < $slaves.length; _efw++>> <<if $slaves[_efw].newGamePlus == 0>> - <<if $slaves[_efw].mother == $PC.mother && _sameMother == 1>> - <<set $slaves[_efw].mother = 0, _sameMother = 0>> - <</if>> - <<if $slaves[_efw].father == $PC.father && _sameFather == 1>> - <<set $slaves[_efw].father = 0, _sameFather = 0>> + <<set _slaveName = $slaves[_efw].slaveName>> + <<set _slave = $slaves[_efw]>> + <<if ($activeSlave.actualAge - _slave.actualAge) >= $fertilityAge>> + | + <<print " + <<link _slaveName>> + <<set _slave = $slaves[" + _efw + "]>> + <<set _slave.mother = $activeSlave.ID>> + <<if $activeSlave.vagina == 0>> + <<set $activeSlave.vagina = 1>> + <</if>> + <<redisplayFamily>> + <</link>> + ">> <</if>> <</if>> <</for>> - <<if $activeSlave.mother == $PC.ID>> - <<set $activeSlave.mother = 0>> - <</if>> - <<if $activeSlave.father == $PC.ID>> - <<set $activeSlave.father = 0>> + <</if>> + + <br>''Father of the children:'' <span id="fatheredNames"><<listOfSlavesWithParent "father" $activeSlave.ID>></span> + <<link "Reset">> + <<for _efw = 0; _efw < $slaves.length; _efw++>> + <<if $slaves[_efw].father == $activeSlave.ID && $slaves[_efw].newGamePlus == 0>> + <<set $slaves[_efw].father = 0>> + <</if>> + <</for>> + <<if $PC.father == $activeSlave.ID && $saveImported == 0>> + <<set $PC.father = 0>> <</if>> - <<set $PC.father = 0>> - <<set $PC.mother = 0>> <<redisplayFamily>> <</link>> -<</if>> - -<br> - <span id="familySummary"><<Family>></span> -<br> -</div> -<div id="familyTree"></div> -<<set _tSlaveList = [$activeSlave]>> -<<set _tSlaveList.push.apply(_tSlaveList, $slaves)>> -<<run renderFamilyTree(_tSlaveList, $activeSlave.ID)>> -</div> + <<if $activeSlave.dick > 0>> + <<if ($activeSlave.actualAge - $PC.actualAge) >= $potencyAge && $saveImported == 0>> + | + <<link "You">> + <<set $PC.father = $activeSlave.ID>> + <<redisplayFamily>> + <</link>> + <</if>> + + <<for _efw = 0; _efw < $slaves.length; _efw++>> + <<if $slaves[_efw].newGamePlus == 0>> + <<set _slaveName = $slaves[_efw].slaveName>> + <<set _slave = $slaves[_efw]>> + <<if ($activeSlave.actualAge - _slave.actualAge) >= $fertilityAge>> + | + <<print " + <<link _slaveName>> + <<set _slave = $slaves[" + _efw + "]>> + <<set _slave.father = $activeSlave.ID>> + <<redisplayFamily>> + <</link>> + ">> + <</if>> + <</if>> + <</for>> + <</if>> + + <br> + <<if $saveImported == 0>> + <<link "Reset ALL PC Relatives">> + <<set _sameMother = 0, _sameFather = 0>> + <<for _efw = 0; _efw < $slaves.length; _efw++>> + <<if $slaves[_efw].newGamePlus == 0>> + <<if $slaves[_efw].mother == $PC.ID>> + <<set $slaves[_efw].mother = 0>> + <</if>> + <<if $slaves[_efw].father == $PC.ID>> + <<set $slaves[_efw].father = 0>> + <</if>> + <<if $slaves[_efw].mother == $PC.mother>> + <<set _sameMother++>> + <</if>> + <<if $slaves[_efw].father == $PC.father>> + <<set _sameFather++>> + <</if>> + <</if>> + <</for>> + <<if _sameMother == 0 && $activeSlave.mother == $PC.mother>> + <<set $activeSlave.mother = 0>> + <</if>> + <<if _sameFather == 0 && $activeSlave.father == $PC.father>> + <<set $activeSlave.father = 0>> + <</if>> + <<for _efw = 0; (_efw < $slaves.length && (_sameMother == 1 || _sameFather == 1)); _efw++>> + <<if $slaves[_efw].newGamePlus == 0>> + <<if $slaves[_efw].mother == $PC.mother && _sameMother == 1>> + <<set $slaves[_efw].mother = 0, _sameMother = 0>> + <</if>> + <<if $slaves[_efw].father == $PC.father && _sameFather == 1>> + <<set $slaves[_efw].father = 0, _sameFather = 0>> + <</if>> + <</if>> + <</for>> + <<if $activeSlave.mother == $PC.ID>> + <<set $activeSlave.mother = 0>> + <</if>> + <<if $activeSlave.father == $PC.ID>> + <<set $activeSlave.father = 0>> + <</if>> + <<set $PC.father = 0>> + <<set $PC.mother = 0>> + <<redisplayFamily>> + <</link>> + <</if>> + + <br> + <span id="familySummary"><<Family>></span> + <br> + </div> + <div id="familyTree"></div> + <<set _tSlaveList = [$activeSlave]>> + <<set _tSlaveList.push.apply(_tSlaveList, $slaves)>> + <<run renderFamilyTree(_tSlaveList, $activeSlave.ID)>> + </div> <</widget>> -- GitLab