diff --git a/src/js/utilJS.js b/src/js/utilJS.js index 5023d1952385d9337d8e258056c970fd538f0821..ab90e35637439342bf7db1a4342ea2be3e0a9125 100644 --- a/src/js/utilJS.js +++ b/src/js/utilJS.js @@ -54,7 +54,7 @@ * There's also limitHeight which you're not using. It's basically limitMult in different units. */ window.Height = (function() { - 'use strict'; + "use strict"; // Global configuration (for different game modes/options/types) let minMult = -3.0; @@ -90,62 +90,62 @@ window.Height = (function() { /* if you can find an average for an undefined, add it in! */ const xxMeanHeight = { - 'Afghan': 155.08, 'Albanian': 161.77, 'Algerian': 159.09, 'American.asian': 158.4, 'American.black': 163.6, 'American.latina': 158.9, 'American.white': 165, 'American': 163.54, - 'Andorran': 162.90, 'Angolan': 157.31, 'Antiguan': 160.65, 'Argentinian': 159.18, 'Armenian': 158.09, 'Aruban': 158, 'Australian': 165.86, 'Austrian': 164.62, 'Azerbaijani': 158.25, - 'Bahamian': 160.68, 'Bahraini': 156.69, 'Bangladeshi': 150.79, 'Barbadian': 165.28, 'Belarusian': 166.35, 'Belgian': 165.49, 'Belizean': 156.88, 'Beninese': 156.16, 'Bermudian': 160.69, - 'Bhutanese': 153.63, 'Bissau-Guinean': 158.24, 'Bolivian': 153.89, 'Bosnian': 165.85, 'Brazilian': 160.86, 'British': 164.40, 'Bruneian': 153.98, 'Bulgarian': 164.80, - 'Burkinabé': 160.19, 'Burmese': 154.37, 'Burundian': 154.02, 'Cambodian': 152.91, 'Cameroonian': 158.82, 'Canadian': 163.91, 'Cape Verdean': 161.65, 'Catalan': 163.4, - 'Central African': 158.04, 'Chadian': 160.17, 'Chilean': 159.36, 'Chinese': 159.71, 'Colombian': 156.85, 'Comorian': 155.58, 'Congolese': 157.57, 'a Cook Islander': 163.19, 'Costa Rican': 156.37, - 'Croatian': 165.63, 'Cuban': 157.98, 'Curaçaoan': 158, 'Cypriot': 162.27, 'Czech': 168.46, 'Danish': 167.21, 'Djiboutian': 156.11, 'Dominican': 159.03, 'Dominiquais': 164.34, 'Dutch': 168.72, 'East Timorese': 151.15, - 'Ecuadorian': 154.23, 'Egyptian': 157.33, 'Emirati': 158.68, 'Equatoguinean': 157.33, 'Eritrean': 156.39, 'Estonian': 168.67, 'Ethiopian': 155.71, 'Fijian': 161.69, 'Filipina': 149.60, - 'Finnish': 165.90, 'French Guianan': 157, 'French Polynesian': 164.52, 'French': 164.88, 'Gabonese': 158.84, 'Gambian': 160.93, 'Georgian': 162.98, 'German': 165.86, 'Ghanan': 157.91, - 'Greek': 164.87, 'Greenlandic': 161.55, 'Grenadian': 164.51, 'Guamanian': 153.7, 'Guatemalan': 149.39, 'Guinean': 157.80, 'Guyanese': 157.92, 'Haitian': 158.72, 'Honduran': 153.84, 'Hungarian': 163.66, - 'I-Kiribati': 157.00, 'Icelandic': 165.95, 'Indian': 152.59, 'Indonesian': 152.80, 'Iranian': 159.67, 'Iraqi': 158.67, 'Irish': 165.11, 'Israeli': 161.80, 'Italian': 164.61, 'Ivorian': 158.07, - 'Jamaican': 163.12, 'Japanese': 158.31, 'Jordanian': 158.83, 'Kazakh': 158.58, 'Kenyan': 158.16, 'Kittitian': 159.20, 'Korean': 160.65, 'Kosovan': 165.7, 'Kurdish': 165, 'Kuwaiti': 159.43, - 'Kyrgyz': 159.35, 'Laotian': 151.28, 'Latvian': 169.80, 'Lebanese': 162.43, 'Liberian': 157.3, 'Libyan': 162.08, 'a Liechtensteiner': 164.3, 'Lithuanian': 166.61, 'Luxembourgian': 164.43, - 'Macedonian': 159.75, 'Malagasy': 151.18, 'Malawian': 154.40, 'Malaysian': 156.30, 'Maldivian': 155.02, 'Malian': 160.47, 'Maltese': 160.85, 'Marshallese': 151.31, 'Mauritanian': 157.72, - 'Mauritian': 157.24, 'Mexican': 156.85, 'Micronesian': 156.09, 'Moldovan': 163.24, 'Monégasque': 164.61, 'Mongolian': 158.22, 'Montenegrin': 164.86, 'Moroccan': 157.82, 'Mosotho': 155.71, - 'Motswana': 161.38, 'Mozambican': 153.96, 'Namibian': 158.78, 'Nauruan': 153.98, 'Nepalese': 150.86, 'New Caledonian': 158.0, 'a New Zealander': 164.94, 'Ni-Vanuatu': 158.17, 'Nicaraguan': 154.39, 'Nigerian': 156.32, - 'Nigerien': 158.25, 'Niuean': 164.80, 'Norwegian': 165.56, 'Omani': 157.19, 'Pakistani': 153.84, 'Palauan': 156.22, 'Palestinian': 158.75, 'Panamanian': 155.47, 'Papua New Guinean': 154.87, - 'Paraguayan': 159.86, 'Peruvian': 152.93, 'Polish': 164.59, 'Portuguese': 163.04, 'Puerto Rican': 159.20, 'Qatari': 159.38, 'Romanian': 162.73, 'Russian': 165.27, 'Rwandan': 154.79, 'Sahrawi': 157.82, - 'Saint Lucian': 162.31, 'Salvadoran': 154.55, 'Sammarinese': 164.61, 'Samoan': 161.97, 'São Toméan': 158.91, 'Saudi': 155.88, 'Scottish': 163, 'Senegalese': 162.52, 'Serbian': 167.69, - 'Seychellois': 162.08, 'Sierra Leonean': 156.60, 'Singaporean': 160.32, 'Slovak': 167.47, 'Slovene': 166.05, 'a Solomon Islander': 154.42, 'Somali': 156.06, 'South African': 158.03, - 'South Sudanese': 169.0, 'Spanish': 163.40, 'Sri Lankan': 154.56, 'Sudanese': 156.04, 'Surinamese': 160.66, 'Swazi': 158.64, 'Swedish': 165.70, 'Swiss': 163.45, 'Syrian': 158.65, 'Taiwanese': 161.45, - 'Tajik': 157.33, 'Tanzanian': 156.6, 'Thai': 157.87, 'Tibetan': 158.75, 'Togolese': 158.30, 'Tongan': 165.52, 'Trinidadian': 160.64, 'Tunisian': 160.35, 'Turkish': 160.50, 'Turkmen': 161.73, - 'Tuvaluan': 158.10, 'Ugandan': 156.72, 'Ukrainian': 166.34, 'Uruguayan': 162.13, 'Uzbek': 157.82, 'Vatican': 162.5, 'Venezuelan': 157.44, 'Vietnamese': 153.59, 'Vincentian': 160.70, 'Yemeni': 153.97, - 'Zairian': 155.25, 'Zambian': 155.82, 'Zimbabwean': 158.22, - '': 159.65, // default + "Afghan": 155.08, "Albanian": 161.77, "Algerian": 159.09, "American.asian": 158.4, "American.black": 163.6, "American.latina": 158.9, "American.white": 165, "American": 163.54, + "Andorran": 162.90, "Angolan": 157.31, "Antiguan": 160.65, "Argentinian": 159.18, "Armenian": 158.09, "Aruban": 158, "Australian": 165.86, "Austrian": 164.62, "Azerbaijani": 158.25, + "Bahamian": 160.68, "Bahraini": 156.69, "Bangladeshi": 150.79, "Barbadian": 165.28, "Belarusian": 166.35, "Belgian": 165.49, "Belizean": 156.88, "Beninese": 156.16, "Bermudian": 160.69, + "Bhutanese": 153.63, "Bissau-Guinean": 158.24, "Bolivian": 153.89, "Bosnian": 165.85, "Brazilian": 160.86, "British": 164.40, "Bruneian": 153.98, "Bulgarian": 164.80, + "Burkinabé": 160.19, "Burmese": 154.37, "Burundian": 154.02, "Cambodian": 152.91, "Cameroonian": 158.82, "Canadian": 163.91, "Cape Verdean": 161.65, "Catalan": 163.4, + "Central African": 158.04, "Chadian": 160.17, "Chilean": 159.36, "Chinese": 159.71, "Colombian": 156.85, "Comorian": 155.58, "Congolese": 157.57, "a Cook Islander": 163.19, "Costa Rican": 156.37, + "Croatian": 165.63, "Cuban": 157.98, "Curaçaoan": 158, "Cypriot": 162.27, "Czech": 168.46, "Danish": 167.21, "Djiboutian": 156.11, "Dominican": 159.03, "Dominiquais": 164.34, "Dutch": 168.72, "East Timorese": 151.15, + "Ecuadorian": 154.23, "Egyptian": 157.33, "Emirati": 158.68, "Equatoguinean": 157.33, "Eritrean": 156.39, "Estonian": 168.67, "Ethiopian": 155.71, "Fijian": 161.69, "Filipina": 149.60, + "Finnish": 165.90, "French Guianan": 157, "French Polynesian": 164.52, "French": 164.88, "Gabonese": 158.84, "Gambian": 160.93, "Georgian": 162.98, "German": 165.86, "Ghanan": 157.91, + "Greek": 164.87, "Greenlandic": 161.55, "Grenadian": 164.51, "Guamanian": 153.7, "Guatemalan": 149.39, "Guinean": 157.80, "Guyanese": 157.92, "Haitian": 158.72, "Honduran": 153.84, "Hungarian": 163.66, + "I-Kiribati": 157.00, "Icelandic": 165.95, "Indian": 152.59, "Indonesian": 152.80, "Iranian": 159.67, "Iraqi": 158.67, "Irish": 165.11, "Israeli": 161.80, "Italian": 164.61, "Ivorian": 158.07, + "Jamaican": 163.12, "Japanese": 158.31, "Jordanian": 158.83, "Kazakh": 158.58, "Kenyan": 158.16, "Kittitian": 159.20, "Korean": 160.65, "Kosovan": 165.7, "Kurdish": 165, "Kuwaiti": 159.43, + "Kyrgyz": 159.35, "Laotian": 151.28, "Latvian": 169.80, "Lebanese": 162.43, "Liberian": 157.3, "Libyan": 162.08, "a Liechtensteiner": 164.3, "Lithuanian": 166.61, "Luxembourgian": 164.43, + "Macedonian": 159.75, "Malagasy": 151.18, "Malawian": 154.40, "Malaysian": 156.30, "Maldivian": 155.02, "Malian": 160.47, "Maltese": 160.85, "Marshallese": 151.31, "Mauritanian": 157.72, + "Mauritian": 157.24, "Mexican": 156.85, "Micronesian": 156.09, "Moldovan": 163.24, "Monégasque": 164.61, "Mongolian": 158.22, "Montenegrin": 164.86, "Moroccan": 157.82, "Mosotho": 155.71, + "Motswana": 161.38, "Mozambican": 153.96, "Namibian": 158.78, "Nauruan": 153.98, "Nepalese": 150.86, "New Caledonian": 158.0, "a New Zealander": 164.94, "Ni-Vanuatu": 158.17, "Nicaraguan": 154.39, "Nigerian": 156.32, + "Nigerien": 158.25, "Niuean": 164.80, "Norwegian": 165.56, "Omani": 157.19, "Pakistani": 153.84, "Palauan": 156.22, "Palestinian": 158.75, "Panamanian": 155.47, "Papua New Guinean": 154.87, + "Paraguayan": 159.86, "Peruvian": 152.93, "Polish": 164.59, "Portuguese": 163.04, "Puerto Rican": 159.20, "Qatari": 159.38, "Romanian": 162.73, "Russian": 165.27, "Rwandan": 154.79, "Sahrawi": 157.82, + "Saint Lucian": 162.31, "Salvadoran": 154.55, "Sammarinese": 164.61, "Samoan": 161.97, "São Toméan": 158.91, "Saudi": 155.88, "Scottish": 163, "Senegalese": 162.52, "Serbian": 167.69, + "Seychellois": 162.08, "Sierra Leonean": 156.60, "Singaporean": 160.32, "Slovak": 167.47, "Slovene": 166.05, "a Solomon Islander": 154.42, "Somali": 156.06, "South African": 158.03, + "South Sudanese": 169.0, "Spanish": 163.40, "Sri Lankan": 154.56, "Sudanese": 156.04, "Surinamese": 160.66, "Swazi": 158.64, "Swedish": 165.70, "Swiss": 163.45, "Syrian": 158.65, "Taiwanese": 161.45, + "Tajik": 157.33, "Tanzanian": 156.6, "Thai": 157.87, "Tibetan": 158.75, "Togolese": 158.30, "Tongan": 165.52, "Trinidadian": 160.64, "Tunisian": 160.35, "Turkish": 160.50, "Turkmen": 161.73, + "Tuvaluan": 158.10, "Ugandan": 156.72, "Ukrainian": 166.34, "Uruguayan": 162.13, "Uzbek": 157.82, "Vatican": 162.5, "Venezuelan": 157.44, "Vietnamese": 153.59, "Vincentian": 160.70, "Yemeni": 153.97, + "Zairian": 155.25, "Zambian": 155.82, "Zimbabwean": 158.22, + "": 159.65, // default }; const xyMeanHeight = { - 'Afghan': 165.26, 'Albanian': 173.39, 'Algerian': 170.07, 'American.asian': 172.5, 'American.black': 177.4, 'American.latina': 172.5, 'American.white': 178.2, 'American': 177.13, - 'Andorran': 176.06, 'Angolan': 167.31, 'Antiguan': 164.8, 'Argentinian': 174.62, 'Armenian': 172.00, 'Aruban': 165.1, 'Australian': 179.20, 'Austrian': 177.41, 'Azerbaijani': 169.75, - 'Bahamian': 172.75, 'Bahraini': 167.74, 'Bangladeshi': 163.81, 'Barbadian': 175.92, 'Belarusian': 178.44, 'Belgian': 181.70, 'Belizean': 168.73, 'Beninese': 167.06, 'Bermudian': 172.69, - 'Bhutanese': 165.31, 'Bissau-Guinean': 167.90, 'Bolivian': 166.85, 'Bosnian': 180.87, 'Brazilian': 173.55, 'British': 177.49, 'Bruneian': 165.01, 'Bulgarian': 178.24, 'Burkinabé': 169.33, - 'Burmese': 164.67, 'Burundian': 166.64, 'Cambodian': 163.33, 'Cameroonian': 167.82, 'Canadian': 178.09, 'Cape Verdean': 173.22, 'Catalan': 175.8, 'Central African': 166.67, - 'Chadian': 170.44, 'Chilean': 171.81, 'Chinese': 171.83, 'Colombian': 169.50, 'Comorian': 166.19, 'Congolese': 167.45, 'a Cook Islander': 174.77, 'Costa Rican': 168.93, 'Croatian': 180.78, - 'Cuban': 172.00, 'Curaçaoan': 165.1, 'Cypriot': 174.99, 'Czech': 180.10, 'Danish': 181.39, 'Djiboutian': 166.57, 'Dominican': 172.75, 'Dominiquais': 176.31, 'Dutch': 182.54, 'East Timorese': 159.79, 'Ecuadorian': 167.08, - 'Egyptian': 166.68, 'Emirati': 170.46, 'Equatoguinean': 167.36, 'Eritrean': 168.36, 'Estonian': 181.59, 'Ethiopian': 166.23, 'Fijian': 173.90, 'Filipina': 163.23, 'Finnish': 179.59, - 'French Guianan': 168, 'French Polynesian': 177.41, 'French': 179.74, 'Gabonese': 167.94, 'Gambian': 165.40, 'Georgian': 174.34, 'German': 179.88, 'Ghanan': 168.85, 'Greek': 177.32, 'Greenlandic': 174.87, - 'Grenadian': 176.97, 'Guamanian': 169.8, 'Guatemalan': 163.41, 'Guinean': 167.54, 'Guyanese': 170.21, 'Haitian': 172.64, 'Honduran': 166.39, 'Hungarian': 177.26, 'I-Kiribati': 169.20, 'Icelandic': 180.49, - 'Indian': 164.95, 'Indonesian': 163.55, 'Iranian': 170.3, 'Iraqi': 170.43, 'Irish': 178.93, 'Israeli': 176.86, 'Italian': 177.77, 'Ivorian': 166.53, 'Jamaican': 174.53, 'Japanese': 170.82, 'Jordanian': 171.03, - 'Kazakh': 171.14, 'Kenyan': 169.64, 'Kittitian': 169.62, 'Korean': 173.46, 'Kosovan': 179.5, 'Kurdish': 175, 'Kuwaiti': 172.07, 'Kyrgyz': 171.24, 'Laotian': 160.52, 'Latvian': 181.42, 'Lebanese': 174.39, - 'Liberian': 163.66, 'Libyan': 173.53, 'a Liechtensteiner': 175.4, 'Lithuanian': 179.03, 'Luxembourgian': 177.86, 'Macedonian': 178.33, 'Malagasy': 161.55, 'Malawian': 166, 'Malaysian': 167.89, - 'Maldivian': 167.68, 'Malian': 171.3, 'Maltese': 173.32, 'Marshallese': 162.81, 'Mauritanian': 163.28, 'Mauritian': 170.50, 'Mexican': 169.01, 'Micronesian': 168.51, 'Moldovan': 175.49, - 'Monégasque': 177.77, 'Mongolian': 169.07, 'Montenegrin': 178.28, 'Moroccan': 170.40, 'Mosotho': 165.59, 'Motswana': 171.63, 'Mozambican': 164.80, 'Namibian': 166.96, 'Nauruan': 167.83, - 'Nepalese': 162.32, 'New Caledonian': 171.0, 'a New Zealander': 177.74, 'Ni-Vanuatu': 168.09, 'Nicaraguan': 166.71, 'Nigerian': 165.91, 'Nigerien': 167.68, 'Niuean': 175.83, 'Norwegian': 179.75, 'Omani': 169.16, 'Pakistani': 166.95, - 'Palauan': 167.69, 'Palestinian': 172.09, 'Panamanian': 168.49, 'Papua New Guinean': 163.57, 'Paraguayan': 172.83, 'Peruvian': 165.23, 'Polish': 177.33, 'Portuguese': 172.93, 'Puerto Rican': 172.08, 'Qatari': 170.48, - 'Romanian': 174.74, 'Russian': 176.46, 'Rwandan': 162.68, 'Sahrawi': 170.40, 'Saint Lucian': 171.95, 'Salvadoran': 169.77, 'Sammarinese': 177.77, 'Samoan': 174.38, 'São Toméan': 167.38, - 'Saudi': 167.67, 'Scottish': 177.6, 'Senegalese': 173.14, 'Serbian': 180.57, 'Seychellois': 174.21, 'Sierra Leonean': 164.41, 'Singaporean': 172.57, 'Slovak': 179.50, 'Slovene': 179.80, - 'a Solomon Islander': 164.14, 'Somali': 166.60, 'South African': 166.68, 'South Sudanese': 175.9, 'Spanish': 176.59, 'Sri Lankan': 165.69, 'Sudanese': 166.63, 'Surinamese': 172.72, 'Swazi': 168.13, - 'Swedish': 179.74, 'Swiss': 178.42, 'Syrian': 170.43, 'Taiwanese': 174.52, 'Tajik': 171.26, 'Tanzanian': 164.80, 'Thai': 169.16, 'Tibetan': 168.91, 'Togolese': 168.33, 'Tongan': 176.76, - 'Trinidadian': 173.74, 'Tunisian': 173.95, 'Turkish': 174.21, 'Turkmen': 171.97, 'Tuvaluan': 169.64, 'Ugandan': 165.62, 'Ukrainian': 178.46, 'Uruguayan': 173.43, 'Uzbek': 169.38, 'Vatican': 176.5, - 'Venezuelan': 171.59, 'Vietnamese': 164.45, 'Vincentian': 172.78, 'Yemeni': 159.89, 'Zairian': 166.80, 'Zambian': 166.52, 'Zimbabwean': 168.59, - '': 171.42, // defaults + "Afghan": 165.26, "Albanian": 173.39, "Algerian": 170.07, "American.asian": 172.5, "American.black": 177.4, "American.latina": 172.5, "American.white": 178.2, "American": 177.13, + "Andorran": 176.06, "Angolan": 167.31, "Antiguan": 164.8, "Argentinian": 174.62, "Armenian": 172.00, "Aruban": 165.1, "Australian": 179.20, "Austrian": 177.41, "Azerbaijani": 169.75, + "Bahamian": 172.75, "Bahraini": 167.74, "Bangladeshi": 163.81, "Barbadian": 175.92, "Belarusian": 178.44, "Belgian": 181.70, "Belizean": 168.73, "Beninese": 167.06, "Bermudian": 172.69, + "Bhutanese": 165.31, "Bissau-Guinean": 167.90, "Bolivian": 166.85, "Bosnian": 180.87, "Brazilian": 173.55, "British": 177.49, "Bruneian": 165.01, "Bulgarian": 178.24, "Burkinabé": 169.33, + "Burmese": 164.67, "Burundian": 166.64, "Cambodian": 163.33, "Cameroonian": 167.82, "Canadian": 178.09, "Cape Verdean": 173.22, "Catalan": 175.8, "Central African": 166.67, + "Chadian": 170.44, "Chilean": 171.81, "Chinese": 171.83, "Colombian": 169.50, "Comorian": 166.19, "Congolese": 167.45, "a Cook Islander": 174.77, "Costa Rican": 168.93, "Croatian": 180.78, + "Cuban": 172.00, "Curaçaoan": 165.1, "Cypriot": 174.99, "Czech": 180.10, "Danish": 181.39, "Djiboutian": 166.57, "Dominican": 172.75, "Dominiquais": 176.31, "Dutch": 182.54, "East Timorese": 159.79, "Ecuadorian": 167.08, + "Egyptian": 166.68, "Emirati": 170.46, "Equatoguinean": 167.36, "Eritrean": 168.36, "Estonian": 181.59, "Ethiopian": 166.23, "Fijian": 173.90, "Filipina": 163.23, "Finnish": 179.59, + "French Guianan": 168, "French Polynesian": 177.41, "French": 179.74, "Gabonese": 167.94, "Gambian": 165.40, "Georgian": 174.34, "German": 179.88, "Ghanan": 168.85, "Greek": 177.32, "Greenlandic": 174.87, + "Grenadian": 176.97, "Guamanian": 169.8, "Guatemalan": 163.41, "Guinean": 167.54, "Guyanese": 170.21, "Haitian": 172.64, "Honduran": 166.39, "Hungarian": 177.26, "I-Kiribati": 169.20, "Icelandic": 180.49, + "Indian": 164.95, "Indonesian": 163.55, "Iranian": 170.3, "Iraqi": 170.43, "Irish": 178.93, "Israeli": 176.86, "Italian": 177.77, "Ivorian": 166.53, "Jamaican": 174.53, "Japanese": 170.82, "Jordanian": 171.03, + "Kazakh": 171.14, "Kenyan": 169.64, "Kittitian": 169.62, "Korean": 173.46, "Kosovan": 179.5, "Kurdish": 175, "Kuwaiti": 172.07, "Kyrgyz": 171.24, "Laotian": 160.52, "Latvian": 181.42, "Lebanese": 174.39, + "Liberian": 163.66, "Libyan": 173.53, "a Liechtensteiner": 175.4, "Lithuanian": 179.03, "Luxembourgian": 177.86, "Macedonian": 178.33, "Malagasy": 161.55, "Malawian": 166, "Malaysian": 167.89, + "Maldivian": 167.68, "Malian": 171.3, "Maltese": 173.32, "Marshallese": 162.81, "Mauritanian": 163.28, "Mauritian": 170.50, "Mexican": 169.01, "Micronesian": 168.51, "Moldovan": 175.49, + "Monégasque": 177.77, "Mongolian": 169.07, "Montenegrin": 178.28, "Moroccan": 170.40, "Mosotho": 165.59, "Motswana": 171.63, "Mozambican": 164.80, "Namibian": 166.96, "Nauruan": 167.83, + "Nepalese": 162.32, "New Caledonian": 171.0, "a New Zealander": 177.74, "Ni-Vanuatu": 168.09, "Nicaraguan": 166.71, "Nigerian": 165.91, "Nigerien": 167.68, "Niuean": 175.83, "Norwegian": 179.75, "Omani": 169.16, "Pakistani": 166.95, + "Palauan": 167.69, "Palestinian": 172.09, "Panamanian": 168.49, "Papua New Guinean": 163.57, "Paraguayan": 172.83, "Peruvian": 165.23, "Polish": 177.33, "Portuguese": 172.93, "Puerto Rican": 172.08, "Qatari": 170.48, + "Romanian": 174.74, "Russian": 176.46, "Rwandan": 162.68, "Sahrawi": 170.40, "Saint Lucian": 171.95, "Salvadoran": 169.77, "Sammarinese": 177.77, "Samoan": 174.38, "São Toméan": 167.38, + "Saudi": 167.67, "Scottish": 177.6, "Senegalese": 173.14, "Serbian": 180.57, "Seychellois": 174.21, "Sierra Leonean": 164.41, "Singaporean": 172.57, "Slovak": 179.50, "Slovene": 179.80, + "a Solomon Islander": 164.14, "Somali": 166.60, "South African": 166.68, "South Sudanese": 175.9, "Spanish": 176.59, "Sri Lankan": 165.69, "Sudanese": 166.63, "Surinamese": 172.72, "Swazi": 168.13, + "Swedish": 179.74, "Swiss": 178.42, "Syrian": 170.43, "Taiwanese": 174.52, "Tajik": 171.26, "Tanzanian": 164.80, "Thai": 169.16, "Tibetan": 168.91, "Togolese": 168.33, "Tongan": 176.76, + "Trinidadian": 173.74, "Tunisian": 173.95, "Turkish": 174.21, "Turkmen": 171.97, "Tuvaluan": 169.64, "Ugandan": 165.62, "Ukrainian": 178.46, "Uruguayan": 173.43, "Uzbek": 169.38, "Vatican": 176.5, + "Venezuelan": 171.59, "Vietnamese": 164.45, "Vincentian": 172.78, "Yemeni": 159.89, "Zairian": 166.80, "Zambian": 166.52, "Zimbabwean": 168.59, + "": 171.42, // defaults }; // Helper method - table lookup for nationality/race combinations const nationalityMeanHeight = function(table, nationality, race, def) { - return table[`${nationality }.${ race}`] || table[nationality] || table[`.${ race}`] || table[''] || def; + return table[`${nationality }.${ race}`] || table[nationality] || table[`.${ race}`] || table[""] || def; }; // Helper method: Generate a skewed normal random variable with the skew s @@ -186,20 +186,20 @@ window.Height = (function() { } let minHeight = 0; let midHeight = 0; let midAge = 15; switch (genes) { - case 'XX': // female - case 'XXX': // Triple X syndrome female + case "XX": // female + case "XXX": // Triple X syndrome female minHeight = 85; midHeight = height * 157 / 164; midAge = 13; break; - case 'XY': // male - case 'XXY': // Klinefelter syndrome male - case 'XYY': // XYY syndrome male + case "XY": // male + case "XXY": // Klinefelter syndrome male + case "XYY": // XYY syndrome male minHeight = 86; midHeight = height * 170 / 178; midAge = 15; break; - case 'X0': case 'X': // Turner syndrome female + case "X0": case "X": // Turner syndrome female minHeight = 85 * 0.93; midHeight = height * 157 / 164; midAge = 13; @@ -226,26 +226,26 @@ window.Height = (function() { } let result = 0; switch (genes) { - case 'XX': // female + case "XX": // female result = nationalityMeanHeight(xxMeanHeight, nationality, race); break; - case 'XY': // male + case "XY": // male result = nationalityMeanHeight(xyMeanHeight, nationality, race); break; // special cases. Extra SHOX genes on X and Y chromosomes make for larger people - case 'X0': case 'X': // Turner syndrome female + case "X0": case "X": // Turner syndrome female result = nationalityMeanHeight(xxMeanHeight, nationality, race) * 0.93; break; - case 'XXX': // Triple X syndrome female + case "XXX": // Triple X syndrome female result = nationalityMeanHeight(xxMeanHeight, nationality, race) * 1.03; break; - case 'XXY': // Klinefelter syndrome male + case "XXY": // Klinefelter syndrome male result = nationalityMeanHeight(xyMeanHeight, nationality, race) * 1.03; break; - case 'XYY': // XYY syndrome male + case "XYY": // XYY syndrome male result = nationalityMeanHeight(xyMeanHeight, nationality, race) * 1.04; break; - case 'Y': case 'Y0': case 'YY': case 'YYY': + case "Y": case "Y0": case "YY": case "YYY": console.log(`Height.mean(): non-viable genes ${ genes}`); break; default: @@ -319,7 +319,7 @@ window.Height = (function() { * This was modeled using the Height generator above. For some more information, see the comments for that. */ window.Intelligence = (function() { - 'use strict'; + "use strict"; // Global configuration (for different game modes/options/types) let mean = 0; @@ -448,7 +448,7 @@ As a categorizer window.Categorizer = function() { this.cats = Array.prototype.slice.call(arguments) .filter(function(e, i, a) { - return e instanceof Array && e.length === 2 && typeof e[0] === 'number' && !isNaN(e[0]) && + return e instanceof Array && e.length === 2 && typeof e[0] === "number" && !isNaN(e[0]) && a.findIndex(function(val) { return e[0] === val[0]; }) === i; /* uniqueness test */ @@ -460,7 +460,7 @@ window.Categorizer = function() { window.Categorizer.prototype.cat = function(val, def) { let result = def; - if (typeof val === 'number' && !isNaN(val)) { + if (typeof val === "number" && !isNaN(val)) { let foundCat = this.cats.find(function(e) { return val >= e[0]; }); @@ -481,18 +481,18 @@ window.num = function(x) { const max = V.showNumbersMax; const ONE_TO_NINETEEN = [ - 'one', 'two', 'three', 'four', 'five', - 'six', 'seven', 'eight', 'nine', 'ten', - 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', - 'sixteen', 'seventeen', 'eighteen', 'nineteen', + "one", "two", "three", "four", "five", + "six", "seven", "eight", "nine", "ten", + "eleven", "twelve", "thirteen", "fourteen", "fifteen", + "sixteen", "seventeen", "eighteen", "nineteen", ]; const TENS = [ - 'ten', 'twenty', 'thirty', 'forty', 'fifty', - 'sixty', 'seventy', 'eighty', 'ninety', + "ten", "twenty", "thirty", "forty", "fifty", + "sixty", "seventy", "eighty", "ninety", ]; - const SCALES = ['thousand', 'million', 'billion', 'trillion']; + const SCALES = ["thousand", "million", "billion", "trillion"]; // helper function for use with Array.filter function isTruthy(item) { @@ -529,15 +529,15 @@ window.num = function(x) { words.push(TENS[tens - 1]); words.push(inEnglish(ones)); - return words.filter(isTruthy).join('-'); + return words.filter(isTruthy).join("-"); } hundreds = number / 100 | 0; words.push(inEnglish(hundreds)); - words.push('hundred'); + words.push("hundred"); words.push(inEnglish(number % 100)); - return words.filter(isTruthy).join(' '); + return words.filter(isTruthy).join(" "); } // append the word for a scale. Made for use with Array.map @@ -547,7 +547,7 @@ window.num = function(x) { return null; } scale = SCALES[exp - 1]; - return [chunk, scale].filter(isTruthy).join(' '); + return [chunk, scale].filter(isTruthy).join(" "); } function commaNum(s) { @@ -557,13 +557,13 @@ window.num = function(x) { if (State.variables.formatNumbers !== 1) { return s; } else { - return s.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); + return s.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } } if (V.showNumbers !== 2) { if (x === 0) { - return 'zero'; + return "zero"; } let string = chunk(x) @@ -571,7 +571,7 @@ window.num = function(x) { .map(appendScale) .filter(isTruthy) .reverse() - .join(' '); + .join(" "); if (V.showNumbers === 1) { if (x <= max) { @@ -604,7 +604,7 @@ window.cashFormat = function(s) { if (s > 0) { return `¤${ num(s)}`; } else { - return `¤${ s.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')}`; + return `¤${ s.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}`; } }; @@ -623,27 +623,27 @@ window.repFormat = function(s) { /* In order to calculate just how much any one category matters so we can show a "fuzzy" symbolic value to the player, we need to know how "busy" reputation was this week. To calculate this, I ADD income to expenses. Why? 100 - 100 and 10000 - 10000 BOTH are 0, but a +50 event matters a lot more in the first case than the second. I exclude overflow from the calculation because it's not a "real" expense for our purposes, and divide by half just to make percentages a bit easier. */ let weight = s/(((V.lastWeeksRepIncome.Total - V.lastWeeksRepExpenses.Total) + V.lastWeeksRepExpenses.overflow)/2); if (weight > 0.60) { - return '@@.green;+++++ rep@@'; + return "@@.green;+++++ rep@@"; } else if (weight > 0.45) { - return '@@.green;++++ rep@@'; + return "@@.green;++++ rep@@"; } else if (weight > 0.30) { - return '@@.green;+++ rep@@'; + return "@@.green;+++ rep@@"; } else if (weight > 0.15) { - return '@@.green;++ rep@@'; + return "@@.green;++ rep@@"; } else if (weight > 0.0) { - return '@@.green;+ rep@@'; + return "@@.green;+ rep@@"; } else if (weight === 0) { - return '0 rep'; + return "0 rep"; } else if (weight < -0.60) { - return '@@.red;----- rep@@'; + return "@@.red;----- rep@@"; } else if (weight < -0.45) { - return '@@.red;---- rep@@'; + return "@@.red;---- rep@@"; } else if (weight < -0.30) { - return '@@.red;--- rep@@'; + return "@@.red;--- rep@@"; } else if (weight < -0.15) { - return '@@.red;-- rep@@'; + return "@@.red;-- rep@@"; } else if (weight < 0) { - return '@@.red;- rep@@'; + return "@@.red;- rep@@"; } /* return weight;*/ } @@ -669,10 +669,10 @@ window.budgetLine = function(category, title) { let income; let expenses; let profits; - if (passage() === 'Rep Budget') { - income = '$lastWeeksRepIncome'; - expenses = '$lastWeeksRepExpenses'; - profits = '$lastWeeksRepProfits'; + if (passage() === "Rep Budget") { + income = "$lastWeeksRepIncome"; + expenses = "$lastWeeksRepExpenses"; + profits = "$lastWeeksRepProfits"; return `<<if ${income}.${category} || ${expenses}.${category}>><tr>\ <td>${title}</td>\ @@ -681,10 +681,10 @@ window.budgetLine = function(category, title) { <<set ${profits}.${category} = (${income}.${category} + ${expenses}.${category})>>\ <td><<print repFormat(${profits}.${category})>></td>\ </tr><</if>>`; - } else if (passage() === 'Costs Budget') { - income = '$lastWeeksCashIncome'; - expenses = '$lastWeeksCashExpenses'; - profits = '$lastWeeksCashProfits'; + } else if (passage() === "Costs Budget") { + income = "$lastWeeksCashIncome"; + expenses = "$lastWeeksCashExpenses"; + profits = "$lastWeeksCashProfits"; return `<<if ${income}.${category} || ${expenses}.${category}>><tr>\ <td>${title}</td>\ @@ -752,7 +752,7 @@ if(typeof Categorizer === 'function') { jQuery(document).one('categorizer.ready', doSomething); } */ -jQuery(document).trigger('categorizer.ready'); +jQuery(document).trigger("categorizer.ready"); window.hashChoice = function hashChoice(obj) { let randint = Math.floor(Math.random()*hashSum(obj)); @@ -811,10 +811,10 @@ window.between = function between(a, low, high) { // generate a random, almost unique ID that is compliant (possibly) with RFC 4122 window.generateNewID = function generateNewID() { let date = Date.now(); // high-precision timer - let uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + let uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) { let r = (date + Math.random()*16)%16 | 0; date = Math.floor(date/16); - return (c==='x' ? r : (r & 0x3 | 0x8)).toString(16); + return (c==="x" ? r : (r & 0x3 | 0x8)).toString(16); }); return uuid; }; @@ -827,12 +827,12 @@ window.arraySwap = function arraySwap(array, a, b) { // circumvents sugarcube, allowing a plain HTML5 UI within it window.html5passage = function html5passage(passageFunction) { - $(document).one(':passagedisplay', (ev) => { - const element = document.createElement('div'); - element.classList.add('passage'); - document.getElementById('passages').appendChild(element); + $(document).one(":passagedisplay", (ev) => { + const element = document.createElement("div"); + element.classList.add("passage"); + document.getElementById("passages").appendChild(element); passageFunction(element); - $(document).off(':passagedisplay'); + $(document).off(":passagedisplay"); }); }; @@ -853,23 +853,23 @@ window.getSlaveDevotionClass = /** @param {App.Entity.SlaveState} slave */ funct if ((!slave) || (!State)) { return undefined; } - if ('mindbroken' === slave.fetish) { - return 'mindbroken'; + if ("mindbroken" === slave.fetish) { + return "mindbroken"; } if (slave.devotion < -95) { - return 'very-hateful'; + return "very-hateful"; } else if (slave.devotion < -50) { - return 'hateful'; + return "hateful"; } else if (slave.devotion < -20) { - return 'resistant'; + return "resistant"; } else if (slave.devotion <= 20) { - return 'ambivalent'; + return "ambivalent"; } else if (slave.devotion <= 50) { - return 'accepting'; + return "accepting"; } else if (slave.devotion <= 95) { - return 'devoted'; + return "devoted"; } else { - return 'worshipful'; + return "worshipful"; } }; @@ -878,27 +878,27 @@ window.getSlaveTrustClass = /** @param {App.Entity.SlaveState} slave */ function return undefined; } - if ('mindbroken' === slave.fetish) { - return ''; + if ("mindbroken" === slave.fetish) { + return ""; } if (slave.trust < -95) { - return 'extremely-terrified'; + return "extremely-terrified"; } else if (slave.trust < -50) { - return 'terrified'; + return "terrified"; } else if (slave.trust < -20) { - return 'frightened'; + return "frightened"; } else if (slave.trust <= 20) { - return 'fearful'; + return "fearful"; } else if (slave.trust <= 50) { - if (slave.devotion < -20) return 'hate-careful'; - else return 'careful'; + if (slave.devotion < -20) return "hate-careful"; + else return "careful"; } else if (slave.trust <= 95) { - if (slave.devotion < -20) return 'bold'; - else return 'trusting'; + if (slave.devotion < -20) return "bold"; + else return "trusting"; } else { - if (slave.devotion < -20) return 'defiant'; - else return 'profoundly-trusting'; + if (slave.devotion < -20) return "defiant"; + else return "profoundly-trusting"; } }; @@ -907,14 +907,14 @@ window.cmToInchString = function(s) { let inches = Math.round(s/2.54); if (inches === 0) { if (s === 0) { - inches += ' inches'; + inches += " inches"; } else { - inches = 'less than an inch'; + inches = "less than an inch"; } } else if (inches === 1) { - inches += ' inch'; + inches += " inch"; } else { - inches += ' inches'; + inches += " inches"; } return inches; }; @@ -1016,7 +1016,7 @@ window.removeDuplicates = function removeDuplicates(array) { window.induceLactation = /** @param {App.Entity.SlaveState} slave */ function induceLactation(slave) { let pronouns = getPronouns(slave); let His = capFirstChar(pronouns.possessive); - let r = ''; + let r = ""; if (slave.induceLactation >= 10) { if (jsRandom(1, 100) < slave.induceLactation) { r += `${His} breasts have been stimulated often enough to @@.lime;induce lactation.@@`; @@ -1050,62 +1050,62 @@ window.ResearchLabStockPile = function() { window.originPronounReplace = /** @param {App.Entity.SlaveState} slave */ function(slave) { let r = slave.origin; switch (r) { - case 'She was the result of unprotected sex with a client. Her mother tracked you down years after her birth to force her upon you.': + case "She was the result of unprotected sex with a client. Her mother tracked you down years after her birth to force her upon you.": return `${capFirstChar(slave.pronoun)} was the result of unprotected sex with a client. ${capFirstChar(slave.possessive)} mother tracked you down years after ${slave.possessive} birth to force ${slave.object} upon you.`; - case 'You kept her after her owner failed to pay your bill for performing surgery on her.': + case "You kept her after her owner failed to pay your bill for performing surgery on her.": return `You kept ${slave.object} after ${slave.possessive} owner failed to pay your bill for performing surgery on ${slave.object}.`; - case 'She comes from old money and sold herself into slavery to satisfy her obsession with the practice, believing her family would buy her back out of slavery later.': + case "She comes from old money and sold herself into slavery to satisfy her obsession with the practice, believing her family would buy her back out of slavery later.": return `${capFirstChar(slave.pronoun)} comes from old money and sold herself into slavery to satisfy ${slave.possessive} obsession with the practice, believing ${slave.possessive} family would buy ${slave.object} back out of slavery later.`; - case 'When you took her from her previous owner, she was locked into a beautiful rosewood box lined with red velvet, crying.': + case "When you took her from her previous owner, she was locked into a beautiful rosewood box lined with red velvet, crying.": return `When you took ${slave.object} from ${slave.possessive} previous owner, ${slave.pronoun} was locked into a beautiful rosewood box lined with red velvet, crying.`; - case 'Her husband sold her into slavery to escape his debts.': + case "Her husband sold her into slavery to escape his debts.": return `${capFirstChar(slave.possessive)} husband sold ${slave.object} into slavery to escape his debts.`; - case 'She was voluntarily enslaved after she decided that your arcology was the best place for her to get the steroids that she\'d allowed to define her life.': + case "She was voluntarily enslaved after she decided that your arcology was the best place for her to get the steroids that she'd allowed to define her life.": return `${capFirstChar(slave.pronoun)} was voluntarily enslaved after ${slave.pronoun} decided that your arcology was the best place for ${slave.object} to get the steroids that ${slave.pronoun}'d allowed to define ${slave.possessive} life.`; - case 'She came to you to escape being sold to a cruel master after her producer informed her of her debt.': + case "She came to you to escape being sold to a cruel master after her producer informed her of her debt.": return `${capFirstChar(slave.pronoun)} came to you to escape being sold to a cruel master after ${slave.possessive} producer informed ${slave.object} of ${slave.possessive} debt.`; - case 'You tricked her into enslavement, manipulating her based on her surgical addiction.': + case "You tricked her into enslavement, manipulating her based on her surgical addiction.": return `You tricked ${slave.object} into enslavement, manipulating ${slave.object} based on ${slave.possessive} surgical addiction.`; - case 'You helped free her from a POW camp after being abandoned by her country, leaving her deeply indebted to you.': + case "You helped free her from a POW camp after being abandoned by her country, leaving her deeply indebted to you.": return `You helped free ${slave.object} from a POW camp after being abandoned by ${slave.possessive} country, leaving ${slave.object} deeply indebted to you.`; - case 'You purchased her in order to pave the way for her brother to take the throne.': + case "You purchased her in order to pave the way for her brother to take the throne.": return `You purchased ${slave.object} in order to pave the way for ${slave.possessive} brother to take the throne.`; - case 'You purchased her as a favor to her father.': + case "You purchased her as a favor to her father.": return `You purchased ${slave.object} as a favor to ${slave.possessive} father.`; - case 'You purchased her from a King after his son put an illegitimate heir in her womb.': + case "You purchased her from a King after his son put an illegitimate heir in her womb.": return `You purchased ${slave.object} from a King after his son put an illegitimate heir in ${slave.possessive} womb.`; - case 'You acquired her in the last stages of your career as a successful venture capitalist.': - case 'Drugs and alcohol can be a potent mix; the night that followed it can sometimes be hard to remember. Needless to say, once your belly began swelling with her, you had to temporarily switch to a desk job for your mercenary group.': - case 'You acquired her in the last stages of your career as a noted private military contractor.': - case 'You never thought you would be capable of impregnating yourself, but years of pleasuring yourself with yourself after missions managed to create her.': - case 'A fresh capture once overpowered you and had his way with you. You kept her as a painful reminder to never lower your guard again.': - case 'Your slaving troop kept several girls as fucktoys; you sired her in your favorite.': - case 'You enslaved her personally during the last stages of your slaving career.': - case 'You sired her in yourself after an arcology owner, impressed by your work, rewarded you with a night you\'ll never forget.': - case 'You conceived her after a male arcology owner, impressed by your work, rewarded you with a night you\'ll never forget.': - case 'You sired her after a female arcology owner, impressed by your work, rewarded you with a night you\'ll never forget.': - case 'You received her as a gift from an arcology owner impressed by your work.': - case 'You captured her during your transition to the arcology': - case 'You won her at cards, a memento from your life as one of the idle rich before you became an arcology owner.': - case 'You brought her into the arcology mindbroken, little more than a walking collection of fuckable holes.': - case 'You brought her into the arcology mindbroken, little more than a human onahole.': - case 'She grew up sheltered and submissive, making her an easy target for enslavement.': - case 'She was fresh from the slave markets when you acquired her.': - case 'She chose to be a slave because the romanticized view of it she had turns her on.': - case 'She was previously owned by a creative sadist, who has left a variety of mental scars on her.': - case 'She was taken as a slave by a Sultan, who presented her as a gift to a surveyor.': - case 'She is the winner of a martial arts slave tournament. You won her in a bet.': - case 'She was homeless and willing to do anything for food, which in the end resulted in her becoming a slave.': - case 'She was sold to you by an anonymous person who wanted her to suffer.': - case 'You received her from a surgeon who botched an implant operation on her and needed to get her out of sight.': - case 'She offered herself to you for enslavement to escape having plastic surgery foisted on her.': - case 'You turned her into a slave girl after she fell into debt to you.': - case 'She was raised in a radical slave school that treated her with drugs and surgery from a very young age.': - case 'She was raised in a radical slave school that treated her from a very young age, up to the point that she never experienced male puberty.': - case 'She was a runaway slave captured by a gang outside your arcology. You bought her cheap after she was harshly used by them.': - case 'She was the private slave of a con artist cult leader before he had to abandon her and flee.': - case 'You helped her give birth, leaving her deeply indebted to you.': - case 'You purchased her from a King after she expressed knowledge of the prince\'s affair with another servant.': + case "You acquired her in the last stages of your career as a successful venture capitalist.": + case "Drugs and alcohol can be a potent mix; the night that followed it can sometimes be hard to remember. Needless to say, once your belly began swelling with her, you had to temporarily switch to a desk job for your mercenary group.": + case "You acquired her in the last stages of your career as a noted private military contractor.": + case "You never thought you would be capable of impregnating yourself, but years of pleasuring yourself with yourself after missions managed to create her.": + case "A fresh capture once overpowered you and had his way with you. You kept her as a painful reminder to never lower your guard again.": + case "Your slaving troop kept several girls as fucktoys; you sired her in your favorite.": + case "You enslaved her personally during the last stages of your slaving career.": + case "You sired her in yourself after an arcology owner, impressed by your work, rewarded you with a night you'll never forget.": + case "You conceived her after a male arcology owner, impressed by your work, rewarded you with a night you'll never forget.": + case "You sired her after a female arcology owner, impressed by your work, rewarded you with a night you'll never forget.": + case "You received her as a gift from an arcology owner impressed by your work.": + case "You captured her during your transition to the arcology": + case "You won her at cards, a memento from your life as one of the idle rich before you became an arcology owner.": + case "You brought her into the arcology mindbroken, little more than a walking collection of fuckable holes.": + case "You brought her into the arcology mindbroken, little more than a human onahole.": + case "She grew up sheltered and submissive, making her an easy target for enslavement.": + case "She was fresh from the slave markets when you acquired her.": + case "She chose to be a slave because the romanticized view of it she had turns her on.": + case "She was previously owned by a creative sadist, who has left a variety of mental scars on her.": + case "She was taken as a slave by a Sultan, who presented her as a gift to a surveyor.": + case "She is the winner of a martial arts slave tournament. You won her in a bet.": + case "She was homeless and willing to do anything for food, which in the end resulted in her becoming a slave.": + case "She was sold to you by an anonymous person who wanted her to suffer.": + case "You received her from a surgeon who botched an implant operation on her and needed to get her out of sight.": + case "She offered herself to you for enslavement to escape having plastic surgery foisted on her.": + case "You turned her into a slave girl after she fell into debt to you.": + case "She was raised in a radical slave school that treated her with drugs and surgery from a very young age.": + case "She was raised in a radical slave school that treated her from a very young age, up to the point that she never experienced male puberty.": + case "She was a runaway slave captured by a gang outside your arcology. You bought her cheap after she was harshly used by them.": + case "She was the private slave of a con artist cult leader before he had to abandon her and flee.": + case "You helped her give birth, leaving her deeply indebted to you.": + case "You purchased her from a King after she expressed knowledge of the prince's affair with another servant.": r = r.replace(/\bherself\b/g, slave.objectReflexive); r = r.replace(/\bHerself\b/g, capFirstChar(slave.objectReflexive)); r = r.replace(/\bshe\b/g, slave.pronoun); @@ -1156,17 +1156,17 @@ window.HackingSkillMultiplier = function() { window.opentab = function(evt, tabName) { const V = State.variables; /* var passage = passage().trim().replace(/ /g,"+");*/ - const tabcontent = document.getElementsByClassName('tabcontent'); + const tabcontent = document.getElementsByClassName("tabcontent"); for (let i = 0; i < tabcontent.length; i++) { - tabcontent[i].style.display = 'none'; + tabcontent[i].style.display = "none"; } - const tablinks = document.getElementsByClassName('tablinks'); + const tablinks = document.getElementsByClassName("tablinks"); for (let i = 0; i < tablinks.length; i++) { - tablinks[i].className = tablinks[i].className.replace(' active', ''); + tablinks[i].className = tablinks[i].className.replace(" active", ""); } - V.tabChoice[passage().trim().replace(/ |'/g, '')] = tabName; /* The regex strips spaces and " ' " from passage names, making "Servants' Quarters" into "ServantsQuarters" and allowing it to be used as a label in this object. */ - document.getElementById(tabName).style.display = 'block'; - evt.currentTarget.className += ' active'; + V.tabChoice[passage().trim().replace(/ |'/g, "")] = tabName; /* The regex strips spaces and " ' " from passage names, making "Servants' Quarters" into "ServantsQuarters" and allowing it to be used as a label in this object. */ + document.getElementById(tabName).style.display = "block"; + evt.currentTarget.className += " active"; }; /** @@ -1186,7 +1186,7 @@ window.opentab = function(evt, tabName) { * App.UI.passageLink("Go to town", "Town") */ App.UI.passageLink = function(linkText, passage, setter, elementType) { - if (!elementType) elementType = 'a'; + if (!elementType) elementType = "a"; let res = `<${elementType} data-passage="${passage}"`; if (setter) { @@ -1210,7 +1210,7 @@ window.SkillIncrease = (function() { function OralSkillIncrease(slave, skillIncrease) { const He = capFirstChar(slave.pronoun); const his = slave.possessivePronoun; - let r = ''; + let r = ""; skillIncrease = skillIncrease || State.variables.skillIncrease || 1; if (slave.oralSkill <= 10) { @@ -1238,7 +1238,7 @@ window.SkillIncrease = (function() { /** @param {App.Entity.SlaveState} slave */ function VaginalSkillIncrease(slave, skillIncrease) { const He = capFirstChar(slave.pronoun); - let r = ''; + let r = ""; skillIncrease = skillIncrease || State.variables.skillIncrease || 1; if (slave.vaginalSkill <= 10) { @@ -1267,7 +1267,7 @@ window.SkillIncrease = (function() { function AnalSkillIncrease(slave, skillIncrease) { const He = capFirstChar(slave.pronoun); const his = slave.possessivePronoun; - let r =''; + let r =""; skillIncrease = skillIncrease || State.variables.skillIncrease || 1; if (slave.analSkill <= 10) { @@ -1296,7 +1296,7 @@ window.SkillIncrease = (function() { function WhoreSkillIncrease(slave, skillIncrease) { const He = capFirstChar(slave.pronoun); const his = slave.possessivePronoun; - let r =''; + let r =""; skillIncrease = skillIncrease || State.variables.skillIncrease || 1; if (slave.whoreSkill <= 10) { @@ -1324,7 +1324,7 @@ window.SkillIncrease = (function() { /** @param {App.Entity.SlaveState} slave */ function EntertainSkillIncrease(slave, skillIncrease) { const He = capFirstChar(slave.pronoun); - let r =''; + let r =""; skillIncrease = skillIncrease || State.variables.skillIncrease || 1; if (slave.entertainSkill <= 10) {