diff --git a/artTools/README.md b/artTools/README.md index 4af98d40a95959a9a3a0d4a5ee2333f48ccdefa2..b86b302914de57d3822f5e41792559c790a42fe2 100644 --- a/artTools/README.md +++ b/artTools/README.md @@ -15,29 +15,29 @@ Note: This does not actually describe how to be an artist. ## 1. Be an artist -Make changes to the vector_source.svg. -Inkscape was thoroughly tested. -Adobe Illustrator might work decently, too. +Make changes to the vector_source.svg. +Inkscape was thoroughly tested. +Adobe Illustrator might work decently, too. ## 2. Respect the structure -While editing, keep the Layers in mind. +While editing, keep the Layers in mind. -* In Inkscape, Layers are special "Inkscape groups". -* In Illustrator, Layers are groups with user-definded IDs. +* In Inkscape, Layers are special "Inkscape groups". +* In Illustrator, Layers are groups with user-defined IDs. * All Layers should have an ID that is globally unique (not just within their subtree). * Please use anonymous groups only for the ease of editing. Remove all "helper" groups before finally saving the file. -* Anonymous groups can be used for continous scaling (of e.g. boobs). +* Anonymous groups can be used for continuous scaling (of e.g. boobs). -* Every asset that should go into a separate file needs to be in a labelled group +* Every asset that should go into a separate file needs to be in a labelled group (even if that is a group with only one shape). * There are some globally available styles defined as CSS classes (e.g. skin, hair). - Use them if your asset should be changed upon display. + Use them if your asset should be changed upon display. Do not set the style directly in the object. -## 3. Normalise the document (before committing) +## 3. Normalize the document (before committing) **THIS IS IMPORTANT** @@ -46,27 +46,27 @@ Use python3 normalize_svg.py vector_source.svg -before committing to normalise the format so git will not freak out about the changed indentation. +before committing to normalize the format so git will not freak out about the changed indentation. If you use Inkscape, please use in Edit → Settings → Input/Output → SVG-Output → Path Data → Optimized. This is the default. In case your Editor uses another path data style which cannot be changed, please contact the other artists and developers via the issue tracker to find a new common ground. What it does: * Formats the SVG XML according to Pythons lxml module, regardless of editor. -* Adobe Illustrator uses group IDs as layer labels. +* Adobe Illustrator uses group IDs as layer labels. Inkscape however uses layer labels and a separate, auto-generated group ID. - normalize_svg.py overwrites the group ID with the Inkscape layer label - so they are synchronised with Inkscape layer labels. + normalize_svg.py overwrites the group ID with the Inkscape layer label + so they are synchronized with Inkscape layer labels. * Inkscape copies the global style definition into the object *every time* - the object is edited. If an object references a CSS class AND at the same time - has a local style, the local style is removed + the object is edited. If an object references a CSS class AND at the same time + has a local style, the local style is removed so global dynamic styling is possible later on. -Note: Behaviour of Adobe Illustrator is untested. +Note: Behavior of Adobe Illustrator is untested. ## 4. Split the layers -For NoX original, deepurk extensions, execute +For NoX original, deepmurk extensions, execute python3 vector_layer_split.py vector_deepmurk_primary.svg tw ../src/art/vector/layers/ @@ -74,8 +74,8 @@ For faraen revamped art (based on NoX original) python3 vector_revamp_layer_split.py vector_revamp_source.svg tw ../src/art/vector_revamp/layers/ -. This application reads all groups in `vector_source.svg`. -Each group is stored in a separate file in the target directory `/src/art/vector/layers/`. +. This application reads all groups in `vector_source.svg`. +Each group is stored in a separate file in the target directory `/src/art/vector/layers/`. The group ID sets the file name. Therefore, the group ID **must not** contain spaces or any other weird characters. Also consider: @@ -85,14 +85,14 @@ Also consider: * The target directory is not emptied. If a file is no longer needed, you should remove it manually. * This procedure removes global definitions. This means, SVG filters are currently not supported. -Available output formats are `svg` and `tw`. -`svg` output exists for debug reasons. +Available output formats are `svg` and `tw`. +`svg` output exists for debug reasons. `tw` embeds the SVG data into Twine files, but removes the global style definitions so they can be set during display. ## 5. Edit the code -`/src/art/` contains Twine code which shows the assets in the story. -There are many helpful comments in `/src/art/artWidgets.tw`. +`/src/art/` contains Twine code which shows the assets in the story. +There are many helpful comments in `/src/art/artWidgets.tw`. The code also generates the previously removed global style definitions on the fly and per display. ## 6. Compile the story diff --git a/artTools/vector_clothing_replicator.py b/artTools/vector_clothing_replicator.py index 77882ec001027cfce41b831e3e9ba3e8365bc034..537c010361f42f22a1efea8fe3b55668a9836eaa 100644 --- a/artTools/vector_clothing_replicator.py +++ b/artTools/vector_clothing_replicator.py @@ -31,7 +31,7 @@ import lxml.etree as etree import sys REFERENCE_PATH_SAMPLES = 200 -EMBED_REPLICATIONS = True # wether to embed all replications into the input file or output separate files +EMBED_REPLICATIONS = True # whether to embed all replications into the input file or output separate files input_file = sys.argv[1] clothing = sys.argv[2] @@ -60,7 +60,7 @@ for e in canvas.xpath('./svg:g',namespaces=ns)+canvas.xpath('./svg:path',namespa def get_points(xpath_shape): ''' - This funciton extracts reference paths by the given xpath selector. + This function extracts reference paths by the given xpath selector. Each path is used to sample a fixed number of points. ''' paths_data = tree.xpath(xpath_shape,namespaces=ns) @@ -69,7 +69,7 @@ def get_points(xpath_shape): for path_data in paths_data: p = parse_path(path_data) points += [ - p.point(1.0/float(REFERENCE_PATH_SAMPLES)*i) + p.point(1.0/float(REFERENCE_PATH_SAMPLES)*i) for i in range(REFERENCE_PATH_SAMPLES) ] if (not points): diff --git a/artTools/vector_layer_split.py b/artTools/vector_layer_split.py index c598f0e11abd85b287232a5416a92c59f3cb6c5f..7eb690a9b7268dfad2e2631e8f7110a12e3837d7 100644 --- a/artTools/vector_layer_split.py +++ b/artTools/vector_layer_split.py @@ -70,7 +70,7 @@ for layer in layers: i = layer.get('id') if ( # disregard non-content groups i.endswith("_") or # manually suppressed with underscore - i.startswith("XMLID") or # Illustrator generated group + i.startswith("XMLID") or # Illustrator generated group i.startswith("g") # Inkscape generated group ): continue @@ -90,7 +90,7 @@ for layer in layers: canvas.insert(0,defs) # re-generate output svg = etree.tostring(output, pretty_print=False) - + if (output_format == 'tw'): # remove unnecessary attributes # TODO: never generate unnecessary attributes in the first place @@ -98,7 +98,7 @@ for layer in layers: svg = regex_xmlns.sub('',svg) svg = svg.replace(' inkscape:connector-curvature="0"','') # this just saves space svg = svg.replace('\n','').replace('\r','') # print cannot be multi-line - svg = regex_space.sub('><',svg) # remove indentaion + svg = regex_space.sub('><',svg) # remove indentation svg = svg.replace('svg:','') # svg namespace was removed if ("Boob" in i): # internal groups are used for scaling svg = svg.replace('<g ','<g transform="\'+_artTransformBoob+\'"') # boob art uses the boob scaling @@ -107,7 +107,7 @@ for layer in layers: else: svg = svg.replace('<g ','<g transform="\'+_art_transform+\'"') # otherwise use default scaling svg = svg.encode('utf-8') - + # save SVG string to file i = layer.get('id') output_path = os.path.join(output_directory,i+'.'+output_format) diff --git a/artTools/vector_revamp_layer_split.py b/artTools/vector_revamp_layer_split.py index 600a7d358cfb7d05e7da101ee98d3415afb173b7..4f0951b31ca38afd0357303bc37a0ad6d3c61b3a 100644 --- a/artTools/vector_revamp_layer_split.py +++ b/artTools/vector_revamp_layer_split.py @@ -110,7 +110,7 @@ for layer in layers: svg = regex_xmlns.sub('', svg) svg = svg.replace(' inkscape:connector-curvature="0"', '') # this just saves space svg = svg.replace('\n', '').replace('\r', '') # print cannot be multi-line - svg = regex_space.sub('><', svg) # remove indentaion + svg = regex_space.sub('><', svg) # remove indentation svg = svg.replace('svg:', '') # svg namespace was removed transformGroups = regex_transformVar.findall(svg) diff --git a/devNotes/QuickList.txt b/devNotes/QuickList.txt index 03f875b67fa9cd26414ab8beb95a35190c05b94c..664a2072e9bdaa68fa9a4611a77a455a7b5b4e2b 100644 --- a/devNotes/QuickList.txt +++ b/devNotes/QuickList.txt @@ -1,4 +1,3 @@ - QuickList is built from the interaction of six parts. 1] The Quick List option enable/disable control. diff --git a/devNotes/sugarcube stuff/building sugarcube.txt b/devNotes/sugarcube stuff/building sugarcube.txt index c8e4f972b5d1c43286ec19a9c06a2855f6893a59..83a18a070072c414d39537534932aefb07f18d67 100644 --- a/devNotes/sugarcube stuff/building sugarcube.txt +++ b/devNotes/sugarcube stuff/building sugarcube.txt @@ -20,7 +20,7 @@ Retrieving SugarCube sources and preparing build environment for it. run the following command: hg clone https://bitbucket.org/tmedwards/sugarcube Change working directory into the cloned repository. -Now choose the branch. Let's suppose we want the lates officially released version 2. The branch name +Now choose the branch. Let's suppose we want the latest officially released version 2. The branch name is "v2-release" then: hg checkout v2-release Please note that branch switching in Mercurial requires a clean local tree (without modifications). @@ -36,8 +36,7 @@ Run the node package manager (npm) in the repository: npm install CAUTION: dependencies list (located in the package.json file in the repository root) may change from -commit to commit and it differs between branches! Make sure to istall correct dependencies after -switching working brach. +commit to commit and it differs between branches! Make sure to install correct dependencies after switching working branch. Patching and building SugarCube. @@ -61,8 +60,8 @@ Find result files in the dist directory. APPENDIX Lists required steps very briefly. -1. Clone Sugarube repo: hg clone https://bitbucket.org/tmedwards/sugarcube -2. Change active directory into the directory of the suragcube clone. +1. Clone Sugarcube repo: hg clone https://bitbucket.org/tmedwards/sugarcube +2. Change active directory into the directory of the sugarcube clone. 3. Set active branch to "v2-release": hg checkout v2-release 4. Run npm install in the repo dir. diff --git a/devTools/sugarcube.d.ts b/devTools/sugarcube.d.ts index f6a38db9400cebbede89bd298760c5c90d2990b3..955e8b91857211be8ec001c4b2881b407e9f7357 100644 --- a/devTools/sugarcube.d.ts +++ b/devTools/sugarcube.d.ts @@ -91,7 +91,7 @@ declare namespace SugarCubeLib { /** * Determines whether saving is allowed within the current context. The callback is invoked each time a save is - * requested. If its return value is falsy, the save is disallowed. If its return value is truthy, the save is + * requested. If its return value is false, the save is disallowed. If its return value is truthy, the save is * allowed to continue unperturbed. * @default undefined * @since 2.0.0 diff --git a/src/facilities/farmyard/food/pFoodCrisis.tw b/src/facilities/farmyard/food/pFoodCrisis.tw index 9c3817d955547d35e38536ba9ba2eb731fa8b94d..83caafcd75faf2aed7a6f76e8ab363c721c62166 100644 --- a/src/facilities/farmyard/food/pFoodCrisis.tw +++ b/src/facilities/farmyard/food/pFoodCrisis.tw @@ -35,7 +35,7 @@ <br><<link "Give them enough to survive on">> <<replace "#result">> You have your own problems to deal with, but that doesn't mean you don't look out for your own. You have a number of rationing stations set up throughout $arcologies[0].name and announce that each citizen is entitled to two full meals a day, just enough for your citizens not to starve. Your citizens are @@.green;happy@@ to hear that their leader is looking out for them. - <<run repX(2500, "event")>> + <<run repX(2500, "event")>> <<set cashX(forceNeg(_price), "farmyard")>> <<set $rations = 1>> <</replace>> <<if ($PC.trading >= 50) || ($PC.career == "capitalist")>>//This will cost <<print cashFormat(_price)>> and some upkeep, @@.springgreen;reduced by your knowledge of trading@@//<<else>>//This will cost <<print cashFormat(_price)>> and incur significant upkeep costs//<</if>> @@ -43,7 +43,7 @@ <br><<link "They can figure their problem out on their own">> <<replace "#result">> You have your own problems to deal with, and you simply can't afford to drop everything and solve theirs at the moment. That you can't take care of your arcology's citizen @@.red;reflects poorly on you.@@ - <<run repX(-500, "event")>> + <<run repX(-500, "event")>> <</replace>> <</link>> </span> @@ -66,7 +66,7 @@ <br><<link "Provide them with enough sustenance to survive on too">> <<replace "#result">> As much as you'd like to provide them with all of the food in the world, it simply is not feasible in your current situation. Therefore, you announce to the leaders that you will provide them only enough rations to live off of. The leaders understand, and are @@.green;pleased@@ to hear that you would provide for them at all. - <<run repX(2500, "event")>> + <<run repX(2500, "event")>> <<set cashX(forceNeg(_price), "farmyard")>> <<set $rations = 3>> <</replace>> @@ -74,7 +74,7 @@ <br><<link "Change your mind about giving out any rations at all">> <<replace "#result">> Having given the people rations at all was a mistake, you think to yourself. You have a great number of your own problems to deal with, and providing rations to everyone that can't afford food is putting an unnecessary strain on your own situation. With this is mind, you tell the leaders that you simply can't help them at this time, and have decided that you can't help anyone with food at all. The citizens are understandably @@.red;angry@@ that you would go back on your word. - <<run repX(-1000, "event")>> + <<run repX(-1000, "event")>> <<set $rations = 0>> <</replace>> <</link>> @@ -101,7 +101,7 @@ <br><<link "Politely decline their offer, but continue giving them rations">> <<replace "#result">> Things have been going fairly well for you, but not //that// well — setting up an entirely new place to buy, sell, and store food would no doubt be an expensive undertaking. You tell the citizens that while you can't spare the resources to create a new market at the moment, you will honor your past agreement and continue giving them free rations. The people initially seem a bit disappointed that you don't seem to want to expand $arcologies[0].name, but are ultimately @@.green;glad@@ to hear that you'll continue taking care of them. - <<run repX(2500, "event")>> + <<run repX(2500, "event")>> <<set cashX(forceNeg(_price), "farmyard")>> <<set $rations = 5>> <</replace>> @@ -109,7 +109,7 @@ <br><<link "Turn down their offer and end rationing completely">> <<replace "#result">> While a new place to buy, sell, and store food in $arcologies[0].name would most likely come in quite handy in the future, you ultimately decide that you simply cannot spare the resources required. In fact, giving rations at all was a costly venture, and after not having seen any sort of return-on-investment, you decide that you are unable to continue giving out rations anymore. Your citizens are @@.red;angry@@ at the fact that you seem not to care about them at all, but that's their problem. - <<run repX(-1000, "event")>> + <<run repX(-1000, "event")>> <<unset $rations>> <</replace>> <</link>> diff --git a/src/interaction/cyberConfig.tw b/src/interaction/cyberConfig.tw index 4b1b172374d4c49afa4b1b16d992c97ea30c7bb8..afa7d742e44f7a13d1ba75e169397cd3da8255c4 100644 --- a/src/interaction/cyberConfig.tw +++ b/src/interaction/cyberConfig.tw @@ -142,10 +142,10 @@ <<if $activeSlave.PTail == 1>><br><br> $He has a neural tail interface installed. You can assign and adjust $his tail here. - <<if $activeSlave.tail != "none">><br> + <<if $activeSlave.tail != "none">><br> $He currently has a tail attached, if you wish to change it you will first need to detach it.<br> [[Detach|cyberConfig][$temp = 7,$nextButton = "Continue", $nextLink = "cyberConfig"]] - <<else>><br> + <<else>><br> <<if $stockpile.modPTail > 0>>Attach a modular tail designed to look like a:<br> [[Cat's Tail|cyberConfig][$temp = 8, $activeSlave.tail = "mod", $activeSlave.tailShape = "neko", $activeSlave.tailColor = $activeSlave.hColor, $stockpile.modPTail -= 1]] | [[Dog's Tail|cyberConfig][$temp = 8, $activeSlave.tail = "mod", $activeSlave.tailShape = "inu", $activeSlave.tailColor = $activeSlave.hColor, $stockpile.modPTail -= 1]] @@ -155,7 +155,7 @@ | [[Cow's Tail|cyberConfig][$temp = 8, $activeSlave.tail = "mod", $activeSlave.tailColor = "ushi", $activeSlave.tailColor = $activeSlave.hColor, $stockpile.modPTail -= 1]]<br><</if>> <<if $stockpile.warPTail > 0>>[[Attach Combat Tail|cyberConfig][$temp = 8, $activeSlave.tail = "combat", $activeSlave.tailColor = "jet black", $stockpile.warPTail -= 1]]<</if>> <<if $stockpile.sexPTail > 0>>| [[Attach Pleasure Tail|cyberConfig][$temp = 8, $activeSlave.tail = "sex", $activeSlave.tailColor = "pink", $stockpile.sexPTail -= 1]]<</if>> - <</if>> + <</if>> <<else>> $He does not have a neural tail interface installed so you can not attach a tail. <</if>> diff --git a/src/js/extendedFamilyModeJS.js b/src/js/extendedFamilyModeJS.js index e3cce5ea9c61362a12e117d3831da200faa358fa..eab6e9b9c524535197b8280c3867120966e58c91 100644 --- a/src/js/extendedFamilyModeJS.js +++ b/src/js/extendedFamilyModeJS.js @@ -30,9 +30,9 @@ window.sameMom = function(slave1, slave2){ window.isAunt = /** @param {App.Entity.SlaveState} niece, @param {App.Entity.SlaveState} aunt */ function(niece, aunt) { - if (!State.variables.showDistantRelatives) { - return false; - } + if (!State.variables.showDistantRelatives) { + return false; + } if (!niece || !aunt || (niece.ID === aunt.ID)) { return false; @@ -136,9 +136,9 @@ window.areSisters = function(c1, c2) { */ window.areCousins = /** @param {App.Entity.SlaveState} slave1, @param {App.Entity.SlaveState} slave2 */ function(slave1, slave2) { - if (!State.variables.showDistantRelatives) { - return false; - } + if (!State.variables.showDistantRelatives) { + return false; + } if (!slave1 || !slave2 || (slave1.ID === slave2.ID) || areSisters(slave1, slave2) ) { return false; diff --git a/src/uncategorized/longSlaveDescription.tw b/src/uncategorized/longSlaveDescription.tw index fe9ff534247d9763307fe9c819668bd861cd851f..298988b81b1be1f57680c540c183ddc75641b93a 100644 --- a/src/uncategorized/longSlaveDescription.tw +++ b/src/uncategorized/longSlaveDescription.tw @@ -1171,9 +1171,9 @@ is $He is in an @@.lightgreen;incestuous relationship with $his daughter, <<= SlaveFullName(_lover)>>.@@ <<elseif def $showDistantRelatives && $showDistantRelatives == 1>> <<if isAunt($activeSlave, _lover)>> - $He is in an @@.lightgreen;incestuous relationship with $his aunt, <<= SlaveFullName(_lover)>>.@@ + $He is in an @@.lightgreen;incestuous relationship with $his aunt, <<= SlaveFullName(_lover)>>.@@ <<elseif isAunt(_lover, $activeSlave)>> - $He is in an @@.lightgreen;incestuous relationship with $his niece, <<= SlaveFullName(_lover)>>.@@ + $He is in an @@.lightgreen;incestuous relationship with $his niece, <<= SlaveFullName(_lover)>>.@@ <<elseif areCousins($activeSlave, _lover)>> $He is in an @@.lightgreen;incestuous relationship with $his cousin, <<= SlaveFullName(_lover)>>.@ <</if>> @@ -1206,18 +1206,18 @@ is <<elseif def $showDistantRelatives && $showDistantRelatives == 1>> <<if isAunt($activeSlave, $PC)>> <<if $PC.title == 1>> - $He is in an @@.lightgreen;incestuous relationship with $his uncle, you.@@ + $He is in an @@.lightgreen;incestuous relationship with $his uncle, you.@@ <<elseif $PC.title == 0>> - $He is in an @@.lightgreen;incestuous relationship with $his aunt, you.@@ + $He is in an @@.lightgreen;incestuous relationship with $his aunt, you.@@ <</if>> <<elseif isAunt($PC, $activeSlave) && $PC.title == 0>> <<if $PC.title == 1>> - $He is in an @@.lightgreen;incestuous relationship with $his nephew, you.@@ + $He is in an @@.lightgreen;incestuous relationship with $his nephew, you.@@ <<elseif $PC.title == 0>> - $He is in an @@.lightgreen;incestuous relationship with $his niece, you.@@ + $He is in an @@.lightgreen;incestuous relationship with $his niece, you.@@ <</if>> <<elseif areCousins($PC, $activeSlave)>> - $He is in an @@.lightgreen;incestuous relationship with $his cousin, you.@@ + $He is in an @@.lightgreen;incestuous relationship with $his cousin, you.@@ <</if>> <<elseif areSisters($PC, $activeSlave) == 1>> <<if $PC.title == 1>> diff --git a/src/uncategorized/options.tw b/src/uncategorized/options.tw index b1fd975e3ede73851212a1fe3d28dc57407ba332..97d7c37360dfb7c454aee983719e9f93a7b28d11 100644 --- a/src/uncategorized/options.tw +++ b/src/uncategorized/options.tw @@ -348,7 +348,7 @@ Assignment performance vignettes on the end week report are <</if>> <br> - + <<if $familyTesting == 1>> <<if def $showDistantRelatives && $showDistantRelatives == 1>> Distant relatives such as aunts, nieces and cousins ''are'' shown diff --git a/src/utility/extendedFamilyWidgets.tw b/src/utility/extendedFamilyWidgets.tw index f70b61f222c7807f637b18653b85770be377116f..4fe1f9f6c6a64724fbd563ae2e1bbccd0d4d2a51 100644 --- a/src/utility/extendedFamilyWidgets.tw +++ b/src/utility/extendedFamilyWidgets.tw @@ -77,444 +77,444 @@ <</if>> <<if def $showDistantRelatives && $showDistantRelatives == 1>> - /*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>> - <<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 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.@@ - <<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>> - <<if _ffi>> - $His paternal @@.lightgreen;grandfather is $slaves[_ffi].slaveName.@@ - <</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. - <<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 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>> - <</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.@@ - <</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 > 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>> - <<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>> - <</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>> - <<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>> - <</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>> - <<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>> - <</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>> - <</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>> - <<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>> - <</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 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>> + <<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 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.@@ + <<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>> + <<if _ffi>> + $His paternal @@.lightgreen;grandfather is $slaves[_ffi].slaveName.@@ + <</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. + <<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 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>> + <</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.@@ + <</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 > 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>> + <<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>> + <</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>> + <<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>> + <</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>> + <<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>> + <</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>> + <</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>> + <<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>> + <</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 = []>> <</if>> /* end distant relatives toggle check */ /*testtest PC sibling passages - determines how many siblings you have @@ -573,11 +573,11 @@ <<run ($slaves[_efw].genes == 'XX' ? _halfsisters : _halfbrothers).push($slaves[_efw])>> <</if>> <<if def $showDistantRelatives && $showDistantRelatives == 1>> - <<set _cousinCheck = areCousins($slaves[_efw], $activeSlave)>> - <<if _cousinCheck == true>> - <<run _cousins.push($slaves[_efw])>> - <</if>> - <</if>> + <<set _cousinCheck = areCousins($slaves[_efw], $activeSlave)>> + <<if _cousinCheck == true>> + <<run _cousins.push($slaves[_efw])>> + <</if>> + <</if>> <</for>> /*testtest PC twin passages - determines how many twins you have but not implemented yet*/ @@ -707,37 +707,37 @@ <</if>> <<if def $showDistantRelatives && $showDistantRelatives == 1>> - /*testtest PC cousin passage - determines how many cousins you have*/ - <<if areCousins($activeSlave, $PC)>> - $He - <<if _cousins.length > 1>> - @@.lightgreen;is your cousin along with <<print _cousins.reduce(function(res, ch, i, arr) { return (res.slaveName || res) + (i == arr.length - 1 ? ' and ' : ', ') + ch.slaveName; })>>.@@ - <<elseif _cousins.length > 0>> - is @@.lightgreen;your cousin along with _sisters[0].slaveName.@@ - <<else>> - is @@.lightgreen;your cousin.@@ - <</if>> - <</if>> - - /*testtest cousin - determines how many cousins a slave has*/ - <<set _children = $slaves.filter(function(s) { return s.ID != $activeSlave.ID && areCousins($activeSlave, s)})>> - <<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 cousins to $him.@@ - <<elseif _children.length > 1>> - @@.lightgreen;_children[0].slaveName and _children[1].slaveName are cousins to $him.@@ - <<elseif _children.length > 0>> - @@.lightgreen;_children[0].slaveName is a cousin to $him.@@ - <</if>> + /*testtest PC cousin passage - determines how many cousins you have*/ + <<if areCousins($activeSlave, $PC)>> + $He + <<if _cousins.length > 1>> + @@.lightgreen;is your cousin along with <<print _cousins.reduce(function(res, ch, i, arr) { return (res.slaveName || res) + (i == arr.length - 1 ? ' and ' : ', ') + ch.slaveName; })>>.@@ + <<elseif _cousins.length > 0>> + is @@.lightgreen;your cousin along with _sisters[0].slaveName.@@ + <<else>> + is @@.lightgreen;your cousin.@@ + <</if>> + <</if>> + + /*testtest cousin - determines how many cousins a slave has*/ + <<set _children = $slaves.filter(function(s) { return s.ID != $activeSlave.ID && areCousins($activeSlave, s)})>> + <<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 cousins to $him.@@ + <<elseif _children.length > 1>> + @@.lightgreen;_children[0].slaveName and _children[1].slaveName are cousins to $him.@@ + <<elseif _children.length > 0>> + @@.lightgreen;_children[0].slaveName is a cousin to $him.@@ + <</if>> <</if>> /* end distant relatives toggle check */ - + <<if $activeSlave.clone != 0>> $He is <<if $activeSlave.cloneID == -1>>