From 80841ed8c620f3c1f046f2723d2e64dd1f7ed921 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Thu, 4 Jun 2020 23:22:47 -0400 Subject: [PATCH] geneticQuirkAssessment --- src/npc/descriptions/descriptionWidgets.js | 176 +++++++++++++++++++-- src/uncategorized/longSlaveDescription.tw | 2 +- src/utility/descriptionWidgets.tw | 151 ------------------ 3 files changed, 168 insertions(+), 161 deletions(-) diff --git a/src/npc/descriptions/descriptionWidgets.js b/src/npc/descriptions/descriptionWidgets.js index 1baf15bd228..f6bded7d417 100644 --- a/src/npc/descriptions/descriptionWidgets.js +++ b/src/npc/descriptions/descriptionWidgets.js @@ -385,7 +385,7 @@ App.Desc.ageAndHealth = function(slave) { if (slave.birthWeek === 51) { birthday = `; ${his} birthday is next week`; } else { - birthday = `; ${his} birthday is in ${52-slave.birthWeek} weeks`; + birthday = `; ${his} birthday is in ${52 - slave.birthWeek} weeks`; } } @@ -469,7 +469,7 @@ App.Desc.ageAndHealth = function(slave) { r += `is an infant, only `; if (V.showAgeDetail) { if (!slave.actualAge) { - r += `${0 + V.week-slave.weekAcquired} weeks old${birthday}. `; + r += `${0 + V.week - slave.weekAcquired} weeks old${birthday}. `; } else if (slave.actualAge) { r += `${num(slave.actualAge)} year old${birthday}. `; } else { @@ -477,7 +477,7 @@ App.Desc.ageAndHealth = function(slave) { } } else { if (!slave.actualAge) { - r += `${0 + V.week-slave.weekAcquired} weeks old. `; + r += `${0 + V.week - slave.weekAcquired} weeks old. `; } else if (slave.actualAge) { r += `${num(slave.actualAge)} year old. `; } else { @@ -1061,8 +1061,8 @@ App.Desc.shortLimbs = function(slave) { } if (getLeftArmID(slave) === getRightArmID(slave) && - getLeftArmID(slave) === getLeftLegID(slave) && - getLeftArmID(slave) === getRightLegID(slave)) { + getLeftArmID(slave) === getLeftLegID(slave) && + getLeftArmID(slave) === getRightLegID(slave)) { r += desc(getLeftArmID(slave), ""); } else { if (getLeftArmID(slave) === getRightArmID(slave)) { @@ -1233,8 +1233,8 @@ App.Desc.sexualHistory = function(slave) { oral: "oral" }; r += sexTypes.filter((t) => slave.counter[t] > 0) - .map((t) => `${num(slave.counter[t])} ${sexNames[t]}`) - .reduce((res, ch, i, arr) => res + (i === arr.length - 1 ? ' and ' : ', ') + ch); + .map((t) => `${num(slave.counter[t])} ${sexNames[t]}`) + .reduce((res, ch, i, arr) => res + (i === arr.length - 1 ? ' and ' : ', ') + ch); r += ` sexual encounters. `; } else { r += `and has had little or no sexual experience ${slave.weekAcquired > 0 ? "as your slave" : "in your new arcology"} yet. `; @@ -1343,14 +1343,14 @@ App.Desc.faceAccessory = function(slave) { App.Desc.mouthAccessory = function(slave) { const {He, His, him, he, his, himself, girl} = getPronouns(slave); let r = ``; - switch (slave.mouthAccessory ) { + switch (slave.mouthAccessory) { case "ball gag": r += `${He} is wearing a mouth filling, `; if (slave.makeup === 3 || slave.makeup === 6 || slave.makeup === 8) { r += `${slave.hColor} `; } else { r += `red `; - } + } r += `ball-shaped gag that prevents ${him} from uttering a word while keeping ${him} uncomfortably aware of ${his} status.`; break; case "bit gag": @@ -1368,3 +1368,161 @@ App.Desc.mouthAccessory = function(slave) { } return r; }; + +/** + * @param {App.Entity.SlaveState} slave + * @returns {string} Description of slave's limbs + */ +App.Desc.geneticQuirkAssessment = function(slave) { + const r = []; + const { + he, him, his, hers, himself, boy, He, His + } = getPronouns(slave); + if (V.geneticMappingUpgrade >= 1) { + if (slave.geneticQuirks.albinism === 2) { + r.push(`${He} is an albino.`); + } else if (slave.geneticQuirks.albinism === 1 && V.geneticMappingUpgrade >= 2) { + r.push(`${He} is a carrier of the albinism gene.`); + } + if (slave.geneticQuirks.dwarfism === 2 && slave.geneticQuirks.gigantism === 2) { + r.push(`${He} has both dwarfism and gigantism.`); + } else if (slave.geneticQuirks.dwarfism === 2) { + r.push(`${He} has dwarfism.`); + } else if (slave.geneticQuirks.gigantism === 2) { + r.push(`${He} has gigantism.`); + } + if (slave.geneticQuirks.dwarfism === 1 && V.geneticMappingUpgrade >= 2) { + r.push(`${He} is a carrier of the dwarfism gene.`); + } + if (slave.geneticQuirks.gigantism === 1 && V.geneticMappingUpgrade >= 2) { + r.push(`${He} is a carrier of the gigantism gene.`); + } + if (slave.geneticQuirks.heterochromia === 2) { + r.push(`${He} carries a gene that allows ${his} eyes to be two different colors.`); + } else if (slave.geneticQuirks.heterochromia === 1 && V.geneticMappingUpgrade >= 2) { + r.push(`${He} is a carrier of the heterochromia gene.`); + } + if (slave.geneticQuirks.androgyny === 2) { + r.push(`${He} has a hormonal condition resulting in androgyny.`); + } else if (slave.geneticQuirks.androgyny === 1 && V.geneticMappingUpgrade >= 2) { + r.push(`${He} is a carrier of a gene that result in androgyny.`); + } + if (slave.geneticQuirks.pFace === 2) { + r.push(`${He} has an exceedingly rare trait associated with perfect facial beauty.`); + if (slave.geneticQuirks.uFace === 2) { + r.push(`Oddly enough, ${he} also possesses a conflicting trait for raw ugliness; the two average each other out.`); + } + } else if (slave.geneticQuirks.uFace === 2) { + r.push(`${He} has an exceedingly rare trait associated with some of the ugliest mugs in history.`); + } + if (slave.geneticQuirks.pFace === 1 && V.geneticMappingUpgrade >= 2) { + r.push(`${He} is a carrier of a combination of traits that can result in perfect facial beauty.`); + } + if (slave.geneticQuirks.uFace === 1 && V.geneticMappingUpgrade >= 2) { + r.push(`${He} is a carrier of a combination of traits that can result in raw ugliness.`); + } + if (slave.geneticQuirks.fertility === 2 && slave.geneticQuirks.hyperFertility === 2) { + r.push(`${He} has a unique genetic condition resulting in inhumanly high`); + if (slave.ovaries === 1 || slave.mpreg === 1) { + r.push(`fertility; risky intercourse will result in multiple pregnancy.`); + } else { + r.push(`fertility.`); + } + } else if (slave.geneticQuirks.hyperFertility === 2) { + r.push(`${He} prone to extreme`); + if (slave.ovaries === 1 || slave.mpreg === 1) { + r.push(`fertility and will likely undergo multiple pregnancy.`); + } else { + r.push(`fertility.`); + } + } else if (slave.geneticQuirks.fertility === 2) { + r.push(`${He} is naturally`); + if (slave.ovaries === 1 || slave.mpreg === 1) { + r.push(`fertile and prone to having twins.`); + } else { + r.push(`fertile.`); + } + } + if (slave.geneticQuirks.hyperFertility === 1 && V.geneticMappingUpgrade >= 2) { + r.push(`${He} is a carrier of a genetic condition resulting in hyper-fertility.`); + } + if (slave.geneticQuirks.fertility === 1 && V.geneticMappingUpgrade >= 2) { + r.push(`${He} is a carrier of a genetic condition resulting in increased fertility.`); + } + if (slave.geneticQuirks.superfetation === 2) { + if (isFertile(slave)) { + r.push(`${He} posses a rare genetic flaw that causes pregnancy to not block ovulation. ${He} is fully capable of getting pregnant while already pregnant.`); + } else { + r.push(`${He} posses a rare genetic flaw that causes pregnancy to not block ovulation; not that it matters when ${he} can't get pregnant.`); + } + } else if (slave.geneticQuirks.superfetation === 1 && V.geneticMappingUpgrade >= 2) { + r.push(`${He} is a carrier of a genetic flaw that causes superfetation.`); + } + if (slave.geneticQuirks.macromastia === 2 && slave.geneticQuirks.gigantomastia === 2) { + r.push(`${He} has an abnormal strain of gigantomastia and will experience constant excessive breast growth.`); + } else if (slave.geneticQuirks.gigantomastia >= 2) { + r.push(`${He} has`); + if (slave.geneticQuirks.gigantomastia === 3) { + r.push(`dormant gigantomastia. Hormonal effects may cause it to become active.`); + } else { + r.push(`gigantomastia and will experience excessive breast growth.`); + } + } else if (slave.geneticQuirks.macromastia >= 2) { + r.push(`${He} has`); + if (slave.geneticQuirks.macromastia === 3) { + r.push(`dormant macromastia. Hormonal effects may cause it to become active.`); + } else { + r.push(`macromastia and will experience excess development of breast tissue.`); + } + } + if (slave.geneticQuirks.gigantomastia === 1 && V.geneticMappingUpgrade >= 2) { + r.push(`${He} is a carrier of a genetic flaw that causes gigantomastia.`); + } + if (slave.geneticQuirks.macromastia === 1 && V.geneticMappingUpgrade >= 2) { + r.push(`${He} is a carrier of a genetic flaw that causes macromastia.`); + } + if (slave.geneticQuirks.wellHung === 2) { + if (slave.physicalAge <= 16 && slave.hormoneBalance < 100 && slave.dick > 0) { + r.push(`${He} is likely to experience an inordinate amount of penile growth during ${his} physical development.`); + } else if (slave.dick > 0) { + r.push(`${He} is predisposed to having an enormous dick, though it is unlikely to naturally grow any larger than it currently is.`); + } else { + r.push(`${He} is predisposed to having an enormous dick, or would, if ${he} had one.`); + } + } else if (slave.geneticQuirks.wellHung === 1 && V.geneticMappingUpgrade >= 2) { + r.push(`${He} is a carrier of a gene that causes enhanced penile development.`); + } + if (slave.geneticQuirks.rearLipedema === 2) { + r.push(`${His} body uncontrollably builds fat on ${his} rear resulting in constant growth.`); + } else if (slave.geneticQuirks.rearLipedema === 1 && V.geneticMappingUpgrade >= 2) { + r.push(`${He} is a carrier of a genetic flaw that causes lipedema.`); + } + if (slave.geneticQuirks.wGain === 2 && slave.geneticQuirks.wLoss === 2) { + r.push(`${He} has irregular leptin production and will undergo shifts in weight.`); + } else if (slave.geneticQuirks.wGain === 2) { + r.push(`${He} has hyperleptinemia and will easily gain weight.`); + } else if (slave.geneticQuirks.wLoss === 2) { + r.push(`${He} has hypoleptinemia and will easily lose weight.`); + } + if (slave.geneticQuirks.wGain === 1 && V.geneticMappingUpgrade >= 2) { + r.push(`${He} is a hyperleptinemia carrier.`); + } + if (slave.geneticQuirks.wLoss === 1 && V.geneticMappingUpgrade >= 2) { + r.push(`${He} is a hypoleptinemia carrier.`); + } + if (slave.geneticQuirks.mGain === 2 && slave.geneticQuirks.mLoss === 2) { + r.push(`${He} has severe genetic flaw resulting in easily replaced, rapidly lost muscle mass.`); + } else if (slave.geneticQuirks.mGain === 2) { + r.push(`${He} has myotonic hypertrophy and will easily gain muscle mass.`); + } else if (slave.geneticQuirks.mLoss === 2) { + r.push(`${He} has myotonic dystrophy and will rapidly lose muscle mass.`); + } + if (slave.geneticQuirks.mGain === 1 && V.geneticMappingUpgrade >= 2) { + r.push(`${He} is a myotonic hypertrophy carrier.`); + } + if (slave.geneticQuirks.mLoss === 1 && V.geneticMappingUpgrade >= 2) { + r.push(`${He} is a myotonic dystrophy carrier.`); + } + } + return r.join(` `); +}; diff --git a/src/uncategorized/longSlaveDescription.tw b/src/uncategorized/longSlaveDescription.tw index 0b87193a62b..ea740610e74 100644 --- a/src/uncategorized/longSlaveDescription.tw +++ b/src/uncategorized/longSlaveDescription.tw @@ -355,7 +355,7 @@ is <</if>> <</if>> - <<geneticQuirkAssessment>> + <<print App.Desc.geneticQuirkAssessment($activeSlave)>> <<if $showSexualHistory == 1 && $ui != "start">> <<= App.Desc.sexualHistory($activeSlave)>> diff --git a/src/utility/descriptionWidgets.tw b/src/utility/descriptionWidgets.tw index eca711ca32a..7ffb58fc5a0 100644 --- a/src/utility/descriptionWidgets.tw +++ b/src/utility/descriptionWidgets.tw @@ -44,154 +44,3 @@ <</if>> <</widget>> - -<<widget "geneticQuirkAssessment">> - -<<if $geneticMappingUpgrade >= 1>> - <<if $activeSlave.geneticQuirks.albinism == 2>> - $He is an albino. - <<elseif $activeSlave.geneticQuirks.albinism == 1 && $geneticMappingUpgrade >= 2>> - $He is a carrier of the albinism gene. - <</if>> - <<if $activeSlave.geneticQuirks.dwarfism == 2 && $activeSlave.geneticQuirks.gigantism == 2>> - $He has both dwarfism and gigantism. - <<elseif $activeSlave.geneticQuirks.dwarfism == 2>> - $He has dwarfism. - <<elseif $activeSlave.geneticQuirks.gigantism == 2>> - $He has gigantism. - <</if>> - <<if $activeSlave.geneticQuirks.dwarfism == 1 && $geneticMappingUpgrade >= 2>> - $He is a carrier of the dwarfism gene. - <</if>> - <<if $activeSlave.geneticQuirks.gigantism == 1 && $geneticMappingUpgrade >= 2>> - $He is a carrier of the gigantism gene. - <</if>> - <<if $activeSlave.geneticQuirks.heterochromia == 2>> - $He carries a gene that allows $his eyes to be two different colors. - <<elseif $activeSlave.geneticQuirks.heterochromia == 1 && $geneticMappingUpgrade >= 2>> - $He is a carrier of the heterochromia gene. - <</if>> - <<if $activeSlave.geneticQuirks.androgyny == 2>> - $He has a hormonal condition resulting in androgyny. - <<elseif $activeSlave.geneticQuirks.androgyny == 1 && $geneticMappingUpgrade >= 2>> - $He is a carrier of a gene that result in androgyny. - <</if>> - <<if $activeSlave.geneticQuirks.pFace == 2>> - $He has an exceedingly rare trait associated with perfect facial beauty. - <<if $activeSlave.geneticQuirks.uFace == 2>> - Oddly enough, $he also possesses a conflicting trait for raw ugliness; the two average each other out. - <</if>> - <<elseif $activeSlave.geneticQuirks.uFace == 2>> - $He has an exceedingly rare trait associated with some of the ugliest mugs in history. - <</if>> - <<if $activeSlave.geneticQuirks.pFace == 1 && $geneticMappingUpgrade >= 2>> - $He is a carrier of a combination of traits that can result in perfect facial beauty. - <</if>> - <<if $activeSlave.geneticQuirks.uFace == 1 && $geneticMappingUpgrade >= 2>> - $He is a carrier of a combination of traits that can result in raw ugliness. - <</if>> - <<if $activeSlave.geneticQuirks.fertility == 2 && $activeSlave.geneticQuirks.hyperFertility == 2>> - $He has a unique genetic condition resulting in inhumanly high - <<if $activeSlave.ovaries == 1 || $activeSlave.mpreg == 1>> - fertility; risky intercourse will result in multiple pregnancy. - <<else>> - fertility. - <</if>> - <<elseif $activeSlave.geneticQuirks.hyperFertility == 2>> - $He prone to extreme - <<if $activeSlave.ovaries == 1 || $activeSlave.mpreg == 1>> - fertility and will likely undergo multiple pregnancy. - <<else>> - fertility. - <</if>> - <<elseif $activeSlave.geneticQuirks.fertility == 2>> - $He is naturally - <<if $activeSlave.ovaries == 1 || $activeSlave.mpreg == 1>> - fertile and prone to having twins. - <<else>> - fertile. - <</if>> - <</if>> - <<if $activeSlave.geneticQuirks.hyperFertility == 1 && $geneticMappingUpgrade >= 2>> - $He is a carrier of a genetic condition resulting in hyper-fertility. - <</if>> - <<if $activeSlave.geneticQuirks.fertility == 1 && $geneticMappingUpgrade >= 2>> - $He is a carrier of a genetic condition resulting in increased fertility. - <</if>> - <<if $activeSlave.geneticQuirks.superfetation == 2>> - <<if isFertile($activeSlave)>> - $He posses a rare genetic flaw that causes pregnancy to not block ovulation. $He is fully capable of getting pregnant while already pregnant. - <<else>> - $He posses a rare genetic flaw that causes pregnancy to not block ovulation; not that it matters when $he can't get pregnant. - <</if>> - <<elseif $activeSlave.geneticQuirks.superfetation == 1 && $geneticMappingUpgrade >= 2>> - $He is a carrier of a genetic flaw that causes superfetation. - <</if>> - <<if $activeSlave.geneticQuirks.macromastia == 2 && $activeSlave.geneticQuirks.gigantomastia == 2>> - $He has an abnormal strain of gigantomastia and will experience constant excessive breast growth. - <<elseif $activeSlave.geneticQuirks.gigantomastia >= 2>> - $He has - <<if $activeSlave.geneticQuirks.gigantomastia == 3>> - dormant gigantomastia. Hormonal effects may cause it to become active. - <<else>> - gigantomastia and will experience excessive breast growth. - <</if>> - <<elseif $activeSlave.geneticQuirks.macromastia >= 2>> - $He has - <<if $activeSlave.geneticQuirks.macromastia == 3>> - dormant macromastia. Hormonal effects may cause it to become active. - <<else>> - macromastia and will experience excess development of breast tissue. - <</if>> - <</if>> - <<if $activeSlave.geneticQuirks.gigantomastia == 1 && $geneticMappingUpgrade >= 2>> - $He is a carrier of a genetic flaw that causes gigantomastia. - <</if>> - <<if $activeSlave.geneticQuirks.macromastia == 1 && $geneticMappingUpgrade >= 2>> - $He is a carrier of a genetic flaw that causes macromastia. - <</if>> - <<if $activeSlave.geneticQuirks.wellHung == 2>> - <<if $activeSlave.physicalAge <= 16 && $activeSlave.hormoneBalance < 100 && $activeSlave.dick > 0>> - $He is likely to experience an inordinate amount of penile growth during $his physical development. - <<elseif $activeSlave.dick > 0>> - $He is predisposed to having an enormous dick, though it is unlikely to naturally grow any larger than it currently is. - <<else>> - $He is predisposed to having an enormous dick, or would, if $he had one. - <</if>> - <<elseif $activeSlave.geneticQuirks.wellHung == 1 && $geneticMappingUpgrade >= 2>> - $He is a carrier of a gene that causes enhanced penile development. - <</if>> - <<if $activeSlave.geneticQuirks.rearLipedema == 2>> - $His body uncontrollably builds fat on $his rear resulting in constant growth. - <<elseif $activeSlave.geneticQuirks.rearLipedema == 1 && $geneticMappingUpgrade >= 2>> - $He is a carrier of a genetic flaw that causes lipedema. - <</if>> - <<if $activeSlave.geneticQuirks.wGain == 2 && $activeSlave.geneticQuirks.wLoss == 2>> - $He has irregular leptin production and will undergo shifts in weight. - <<elseif $activeSlave.geneticQuirks.wGain == 2>> - $He has hyperleptinemia and will easily gain weight. - <<elseif $activeSlave.geneticQuirks.wLoss == 2>> - $He has hypoleptinemia and will easily lose weight. - <</if>> - <<if $activeSlave.geneticQuirks.wGain == 1 && $geneticMappingUpgrade >= 2>> - $He is a hyperleptinemia carrier. - <</if>> - <<if $activeSlave.geneticQuirks.wLoss == 1 && $geneticMappingUpgrade >= 2>> - $He is a hypoleptinemia carrier. - <</if>> - <<if $activeSlave.geneticQuirks.mGain == 2 && $activeSlave.geneticQuirks.mLoss == 2>> - $He has severe genetic flaw resulting in easily replaced, rapidly lost muscle mass. - <<elseif $activeSlave.geneticQuirks.mGain == 2>> - $He has myotonic hypertrophy and will easily gain muscle mass. - <<elseif $activeSlave.geneticQuirks.mLoss == 2>> - $He has myotonic dystrophy and will rapidly lose muscle mass. - <</if>> - <<if $activeSlave.geneticQuirks.mGain == 1 && $geneticMappingUpgrade >= 2>> - $He is a myotonic hypertrophy carrier. - <</if>> - <<if $activeSlave.geneticQuirks.mLoss == 1 && $geneticMappingUpgrade >= 2>> - $He is a myotonic dystrophy carrier. - <</if>> -<</if>> - -<</widget>> -- GitLab