From 4b9f119621cce966d4c7b3fd4faa160e0fb125bb Mon Sep 17 00:00:00 2001 From: Pregmodder <pregmodder@gmail.com> Date: Sat, 7 Mar 2020 09:20:11 -0500 Subject: [PATCH] corrective diet --- src/endWeek/saInflation.js | 7 +- src/gui/Encyclopedia/encyclopedia.tw | 6 +- src/js/SlaveState.js | 1 + src/js/slaveSummaryWidgets.js | 6 ++ src/uncategorized/RESS.tw | 10 +-- src/uncategorized/saDiet.tw | 100 +++++++++++++++++++++++++++ src/uncategorized/slaveInteract.tw | 7 ++ 7 files changed, 126 insertions(+), 11 deletions(-) diff --git a/src/endWeek/saInflation.js b/src/endWeek/saInflation.js index 7f7ce49787e..cef3d962878 100644 --- a/src/endWeek/saInflation.js +++ b/src/endWeek/saInflation.js @@ -193,12 +193,7 @@ window.saInflation = (function saInflation() { } slave.chem += 2 * slave.inflation; if (slave.addict > 0) { - if (slave.inflation > 0) { - slave.addict += slave.inflation * 3; - } else if (V.aphrodisiacUpgrade === 1) { - r.push(`Substitutes produced by your advanced pharmaceutical fabricator protect ${him} from the negative effects of aphrodisiac withdrawal but do little to halt the spread of aphrodisiacs through ${his} system from ${his} bowels.`); - slave.addict -= 2; - } + slave.addict += slave.inflation * 3; } else if (jsRandom(1, 100) < 40 + (20 * slave.inflation)) { r.push(`All the aphrodisiacs held within ${his} bowels cause <span class="cyan">${him} to become an aphrodisiac addict.</span>`); slave.addict = 1; diff --git a/src/gui/Encyclopedia/encyclopedia.tw b/src/gui/Encyclopedia/encyclopedia.tw index 37deb257ed0..68d55c1e109 100644 --- a/src/gui/Encyclopedia/encyclopedia.tw +++ b/src/gui/Encyclopedia/encyclopedia.tw @@ -1516,7 +1516,7 @@ THE X-SERIES ARCOLOGY <br><br>''Penthouse Improvements'' <br>The master suite and Head Girl suite options function like facilities. The master suite is the facility for the fucktoy assignment, and the Head Girl suite can house a single slave for her use. - <br> //''Kitchen upgrade'':// this increases the chances of success for dieting. + <br> //''Kitchen upgrade'':// this increases the chances of success for dieting and opens up additional dietary options. <br> //''Feeding phalli'':// unbroken slaves will find this disgusting, but it can cause beneficial oral fetishes to appear. <br> //''Drug fuckmachines'':// unbroken slaves will resent this, but it may cause beneficial anal fetishes to appear. <br> //''Personal armory'':// unlocks bodyguard options on the main menu. @@ -2938,6 +2938,9 @@ LORE: INTERVIEWS <br><br> Under normal circumstances, a slave will likely bear a single child from a pregnancy, but with a little extra help from a number of fertility boosting methods, that count can easily be pushed higher. While each fertility agent will only add a chance of an additional ovum, combining treatments will yield a cumulative effect, greatly enhancing the likelihood of multiples. One must exercise caution, however, as a slave's body can only support so many offspring without complications. Miscarriage, discarded embryos, and even slave death are all possible with excessive misuse of fertility agents. +<<case "Corrective Diet">> + Using the upgraded kitchen to monitor a slave's caloric intake allows for diets to be tailored to slowly increase or decrease their weight without them realizing. + <<case "Fertility Mix">> A simple dietary blend designed to encourage ovulation. Fertile slaves will find themselves subconsciously lusting for loads of cum blasting into their pussies and, once they give in to temptation, will likely find their bellies swelling with twins or even triplets. @@ -3355,6 +3358,7 @@ LORE: INTERVIEWS | <<link "Hedonistic Decadence Research" "Encyclopedia">><<set $encyclopedia = "Hedonistic Decadence Research">><</link>> | <<link "Eugenics Breeding Proposal" "Encyclopedia">><<set $encyclopedia = "Eugenics Breeding Proposal">><</link>> | <<link "Repopulationist Breeding School" "Encyclopedia">><<set $encyclopedia = "Repopulationist Breeding School">><</link>> + | <<link "Corrective Diet" "Encyclopedia">><<set $encyclopedia = "Corrective Diet">><</link>> | <<link "Slave Fertility" "Encyclopedia">><<set $encyclopedia = "Slave Fertility">><</link>> | <<link "Player Pregnancy" "Encyclopedia">><<set $encyclopedia = "Player Pregnancy">><</link>> | <<link "Hyper-pregnancy" "Encyclopedia">><<set $encyclopedia = "Hyper-pregnancy">><</link>> diff --git a/src/js/SlaveState.js b/src/js/SlaveState.js index 05d10d6c768..1eab103681b 100644 --- a/src/js/SlaveState.js +++ b/src/js/SlaveState.js @@ -1590,6 +1590,7 @@ App.Entity.SlaveState = class SlaveState { /** * * "healthy" * * "restricted" + * * "corrective" * * "muscle building" * * "fattening" * * "slimming" diff --git a/src/js/slaveSummaryWidgets.js b/src/js/slaveSummaryWidgets.js index 426c0a6aff9..4416a40672f 100644 --- a/src/js/slaveSummaryWidgets.js +++ b/src/js/slaveSummaryWidgets.js @@ -585,6 +585,9 @@ window.SlaveSummaryUncached = (function() { case "fattening": diet.textContent = "Di:W+"; break; + case "corrective": + diet.textContent = "Di:W="; + break; case "XX": diet.textContent = "Di:XX+"; break; @@ -644,6 +647,9 @@ window.SlaveSummaryUncached = (function() { case "fattening": dietDesc = `Gaining weight.`; break; + case "corrective": + diet.textContent = `Corrective`; + break; case "XX": dietDesc = `Estrogen rich.`; break; diff --git a/src/uncategorized/RESS.tw b/src/uncategorized/RESS.tw index ebebb6f946b..ea59317a982 100644 --- a/src/uncategorized/RESS.tw +++ b/src/uncategorized/RESS.tw @@ -3862,12 +3862,14 @@ Your slaves get dressed in a large wardrobe area adjacent to the dormitory, room apparently bigger today than it was yesterday, which isn't surprising, considering how much $he's being fed. <<elseif $activeSlave.preg > $activeSlave.pregData.normalBirth/5 && $activeSlave.pregKnown == 1>> apparently bigger today than it was yesterday. Pregnancy often causes minor redistributions of weight like this. -<<elseif $activeSlave.hormoneBalance >= 200>> - apparently bigger today than it was yesterday. Intensive female hormone regimens like $hers sometimes cause minor ass expansion. -<<elseif $activeSlave.buttImplantType == "string">> - apparently a little bigger today than it was yesterday. String implants like $hers steadily grow if not regularly drained. <<elseif $geneticMappingUpgrade >= 1 && $activeSlave.geneticQuirks.rearLipedema == 2>> apparently a little bigger today than it was yesterday. $His body is constantly laying fat on $his ass and thighs, so this isn't really unexpected. +<<elseif $activeSlave.buttImplantType == "string">> + apparently a little bigger today than it was yesterday. String implants like $hers steadily grow if not regularly drained. +<<elseif $activeSlave.diet == "corrective" && $activeSlave.weight < -10>> + apparently a little bigger today than it was yesterday. $He is underweight and being slowly plumped up, so this is a sign of progress. +<<elseif $activeSlave.hormoneBalance >= 200>> + apparently bigger today than it was yesterday. Intensive female hormone regimens like $hers sometimes cause minor ass expansion. <<elseif $activeSlave.buttImplant/$activeSlave.butt >= .5>> apparently a little bigger today than it was yesterday. Large implants like $hers normally cause some slight size fluctuations. <<else>> diff --git a/src/uncategorized/saDiet.tw b/src/uncategorized/saDiet.tw index 04cde84484f..9462fe30673 100644 --- a/src/uncategorized/saDiet.tw +++ b/src/uncategorized/saDiet.tw @@ -390,6 +390,106 @@ <<else>> $He doesn't gain any weight this week. <</if>> +<<case "corrective">> /* normalizes weight towards 0 */ + <<if $slaves[$i].weight < -10>> + <<set _weightShift = $feeder+1>> + By carefully adjusting $his intake, $he slowly puts on weight without realizing it. + <<elseif $slaves[$i].weight > 10>> + <<set _weightShift = -($feeder+1)>> + By carefully adjusting $his intake, $he slowly loses on weight without realizing it. + <<else>> + <<set _weightShift = 0>> + <</if>> + <<if $slaves[$i].weightDirection == -1>> + <<set $slaves[$i].weight += (_weightShift-random(0,1))>> + <<elseif $slaves[$i].weightDirection == 1>> + <<set $slaves[$i].weight += (_weightShift+random(0,1))>> + <<else>> + <<set $slaves[$i].weight += _weightShift>> + <</if>> + + <<set _effSize = ($slaves[$i].boobs-$slaves[$i].boobsImplant-$slaves[$i].boobsMilk)>> + <<set _effButtSize = ($slaves[$i].butt-$slaves[$i].buttImplant)>> + <<if _weightShift < 0>> + <<if $slaves[$i].hormoneBalance > 30 && $slaves[$i].geneMods.NCS != 0>> /* 'Expected' breast size based on weight for feminine-bodied slaves */ + <<set _growthgoal = Math.trunc((100 + ($slaves[$i].weight + 100)*5 + 2*$slaves[$i].lactationAdaptation)*(0.85+$slaves[$i].hormoneBalance/400)*_gigantomastiaMod)>> + <<set _roll = 600>> + <<set _target = Math.trunc(Math.clamp(_weightShift*20 + (_effSize - _growthgoal)/5,0,270))>> + <<else>> /* For masculine- and childish-bodied slaves */ + <<set _growthgoal = (($slaves[$i].weight + 100)*2 + $slaves[$i].lactationAdaptation)*_gigantomastiaMod>> + <<set _roll = 200>> + <<set _target = Math.trunc(Math.clamp(_weightShift*2 + (_effSize - _growthgoal)/20,0,68))>> + <</if>> + <<if random(1,_roll) <= _target && (_gigantomastiaMod != 3 && _effSize >= 100)>> + <<if random(1,2) == 1>> + @@.orange;$His breasts get smaller.@@ + <<set $slaves[$i].boobs -= 20>> + <<else>> + @@.orange;$His breasts get a little smaller.@@ + <<set $slaves[$i].boobs -= 10*(1 + $slaves[$i].geneMods.NCS)>> + <</if>> + <</if>> + <<if $slaves[$i].hormoneBalance > 30>> /* 'Expected' butt size based on weight for feminine-bodied slaves, scaled up by 1000 */ + <<set _growthgoal = Math.trunc(($slaves[$i].weight + 100)*25*(0.9+$slaves[$i].hormoneBalance/600)*(_rearQuirk/2 + 1))>> + <<set _roll = 60000>> + <<set _target = Math.trunc(Math.clamp(_weightShift*1000 + (_effButtSize*1000 - _growthgoal)*2,0,36000))>> + <<else>> /* For masculine- and childish-bodied slaves, likewise scaled up */ + <<set _growthgoal = Math.trunc(($slaves[$i].weight + 100)*12.5)*(_rearQuirk/2 + 1)>> + <<set _roll = 100000>> + <<set _target = Math.trunc(Math.clamp(_weightShift*1000 + (_effButtSize*1000 - _growthgoal)*4,0,72000))>> + <</if>> + <<if random(1,_roll) <= _target && $slaves[$i].butt > 0>> + <<if (($slaves[$i].geneMods.NCS == 1) && ($slaves[$i].butt > 2))>> + @@.orange;$His butt gets a little smaller.@@ + <<set $slaves[$i].butt -= 1>> /* leave it be. Needed when butts get range expansion. */ + <<else>> + @@.orange;$His butt gets a little smaller.@@ + <<set $slaves[$i].butt -= 1>> + <</if>> + <</if>> + <<elseif _weightShift > 0>> + <<if $slaves[$i].hormoneBalance > 30 && $slaves[$i].geneMods.NCS != 1>> /* 'Expected' breast size based on weight for feminine-bodied slaves */ + <<set _growthgoal = Math.trunc((100 + ($slaves[$i].weight + 100)*5 + 2*$slaves[$i].lactationAdaptation)*(0.85+$slaves[$i].hormoneBalance/400)*_gigantomastiaMod)>> + <<set _roll = 600>> + <<set _target = Math.trunc(Math.clamp(_weightShift*20 - (_effSize - _growthgoal)/5,0,270))>> + <<else>> /* For masculine- and childish-bodied slaves */ + <<set _growthgoal = (($slaves[$i].weight + 100)*2 + $slaves[$i].lactationAdaptation)*_gigantomastiaMod>> + <<set _roll = 200>> + <<set _target = Math.trunc(Math.clamp(_weightShift*2 - (_effSize - _growthgoal)/20,0,68))>> + <</if>> + <<if ($slaves[$i].geneMods.NCS == 1)>> + <<set _roll = Math.trunc(_roll * 2)>> + <</if>> + <<if random(1,_roll) <= _target>> + <<if random(1,2) == 1>> + @@.lime;$His breasts get bigger.@@ + <<set $slaves[$i].boobs += 40/(1 + $slaves[$i].geneMods.NCS)>> + <<else>> + @@.lime;$His breasts get a little bigger.@@ + <<set $slaves[$i].boobs += 20/(1 + $slaves[$i].geneMods.NCS)>> + <</if>> + <</if>> + <<if $slaves[$i].hormoneBalance > 30>> /* 'Expected' butt size based on weight for feminine-bodied slaves, scaled up by 1000 */ + <<set _growthgoal = Math.trunc(($slaves[$i].weight + 100)*25*(0.9+$slaves[$i].hormoneBalance/600)*(_rearQuirk/2 + 1))>> + <<set _roll = 60000>> + <<set _target = Math.trunc(Math.clamp(_weightShift*1000 - (_effButtSize*1000 - _growthgoal)*2,0,36000))>> + <<else>> /* For masculine- and childish-bodied slaves, likewise scaled up */ + <<set _growthgoal = Math.trunc(($slaves[$i].weight + 100)*12.5)*(_rearQuirk/2 + 1)>> + <<set _roll = 100000>> + <<set _target = Math.trunc(Math.clamp(_weightShift*1000 - (_effButtSize*1000 - _growthgoal)*4,0,72000))>> + <</if>> + <<if ($slaves[$i].geneMods.NCS == 1)>> + <<set _roll = Math.trunc(_roll * 2)>> + <</if>> + <<if random(1,_roll) <= _target>> + @@.lime;$His butt gets a little bigger.@@ + <<set $slaves[$i].butt += 1>> + <</if>> + <</if>> + <<if $slaves[$i].weight >= -10 && $slaves[$i].weight <= 10>> + $He is now a healthy weight, so $his diet @@.yellow;has defaulted to keeping it this way.@@ + <<set $slaves[$i].diet = "healthy">> + <</if>> <<case "muscle building">> /* Muscle Gain */ <<if isAmputee($slaves[$i])>> $He is no longer capable of working out in any plausible way. $His special diet @@.yellow;has ended.@@ diff --git a/src/uncategorized/slaveInteract.tw b/src/uncategorized/slaveInteract.tw index 8ff0623eef4..b58d9fbe9bb 100644 --- a/src/uncategorized/slaveInteract.tw +++ b/src/uncategorized/slaveInteract.tw @@ -338,6 +338,13 @@ | //$He is already extremely overweight// <</if>> <<if $feeder == 1>> + <<if $slaves[_i].fuckdoll == 0 && $slaves[_i].fetish != "mindbroken">> + <<if ($slaves[_i].weight > 10 || $slaves[_i].weight < -10)>> + | <<link "Correct weight">><<set $slaves[_i].diet = "corrective">><<replace "#diet">>$slaves[_i].diet<</replace>><</link>> + <<else>> + //$He is already a healthy weight// + <</if>> + <</if>> | <<link "Estrogen enriched">><<set $slaves[_i].diet = "XX">><<replace "#diet">>$slaves[_i].diet<</replace>><</link>> | <<link "Testosterone enriched">><<set $slaves[_i].diet = "XY">><<replace "#diet">>$slaves[_i].diet<</replace>><</link>> <<if $dietXXY == 1 && $slaves[_i].balls > 0 && ($slaves[_i].ovaries == 1 || $slaves[_i].mpreg == 1)>> -- GitLab