From 6177309bc69dead93adadf90add9c2ddc752f2fe Mon Sep 17 00:00:00 2001 From: jsb5468 Date: Sun, 3 Feb 2019 16:13:56 -0500 Subject: [PATCH 1/5] Automatic Growth 1 Added Automatic Growth framework and growth for tail, cock, balls, souls, goo, and overall body. Added periods to manual growth --- features.js | 93 +++++++++++++++++++++++++ game.js | 195 +++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 265 insertions(+), 23 deletions(-) diff --git a/features.js b/features.js index 0fd9a92..bdd5aa0 100644 --- a/features.js +++ b/features.js @@ -647,6 +647,29 @@ options = [ "tooltip": "Actions earn you growth points, which are used to grow bigger.", } ] + }, + { + "name": "Automatic Growth", + "id": "automaticGrowth", + "type": "subcategory", + "entries": + [ + { + "name": "Automatic Growth", + "id": "automaticGrowthEnabled", + "type": "checkbox", + "default": false, + "warning": "Automatic Growth is enabled", + "tooltip": "When checked, you will automaically grow by ingesting/absorbing mass.", + }, + { + "name": "Prey Growth Factor", + "id": "preyGrowthFactor", + "type": "float", + "default": "0.8", + "tooltip": "How much of what you eat gets automatically added to your body. Setting this to [0] disables it. To add half of your prey mass to your own, set to [.5]." + } + ] } ] }, @@ -769,6 +792,13 @@ options = [ "type": "float", "default": "15" }, + { + "name": "Anal autogrowth factor", + "id": "assGrowthFactor", + "type": "float", + "default": "0.01", + "tooltip": "How much this part grows during part specific digestion. This is relative to overall growth, [1]:all mass goes to this part [.2]:20% part growth-80% overall growth." + }, { "name": "Manual digestion", "id": "analDigestManual", @@ -933,6 +963,13 @@ options = [ "type": "float", "default": "3" }, + { + "name": "Tail autogrowth factor", + "id": "tailGrowthFactor", + "type": "float", + "default": "0.01", + "tooltip": "How much this part grows during part specific digestion. This is relative to overall growth, [1]:all mass goes to this part [.2]:20% part growth-80% overall growth." + }, { "name": "Digestion time", "id": "tailDigestTime", @@ -1033,6 +1070,20 @@ options = [ "type": "float", "default": "1" }, + { + "name": "Cock autogrowth factor", + "id": "cockGrowthFactor", + "type": "float", + "default": "0.01", + "tooltip": "How much this part grows during part specific digestion. This is relative to overall growth, [1]:all mass goes to this part [.2]:20% part growth-80% overall growth." + }, + { + "name": "Balls autogrowth factor", + "id": "ballGrowthFactor", + "type": "float", + "default": "0.01", + "tooltip": "How much this part grows during part specific digestion. This is relative to overall growth, [1]:all mass goes to this part [.2]:20% part growth-80% overall growth." + }, { "name": "Cock Vore", "id": "cockVoreEnabled", @@ -1193,6 +1244,13 @@ options = [ "type": "float", "default": "1" }, + { + "name": "Womb autogrowth factor", + "id": "wombGrowthFactor", + "type": "float", + "default": "0.01", + "tooltip": "How much this part grows during part specific digestion. This is relative to overall growth, [1]:all mass goes to this part [.2]:20% part growth-80% overall growth." + }, { "name": "Digestion time", "id": "unbirthDigestTime", @@ -1300,6 +1358,13 @@ options = [ "type": "float", "default": "1" }, + { + "name": "Breast autogrowth factor", + "id": "breastGrowthFactor", + "type": "float", + "default": "0.01", + "tooltip": "How much this part grows during part specific digestion. This is relative to overall growth, [1]:all mass goes to this part [.2]:20% part growth-80% overall growth." + }, { "name": "Digestion time", "id": "breastDigestTime", @@ -1417,6 +1482,13 @@ options = [ "warning": "Soul vore enabled", "entries": [ + { + "name": "Souls autogrowth factor", + "id": "soulGrowthFactor", + "type": "float", + "default": "0.25", + "tooltip": "How much you grow when absorbing souls. [1]-you will gain equal mass to the souls you absorb. [.01]- you will grow by 1% of the mass of the souls you absorb. This does not stack with Prey growth factor" + }, { "name": "Digestion time", "id": "soulDigestTime", @@ -1579,6 +1651,13 @@ options = [ "type": "subcategory", "entries": [ + { + "name": "Goo autogrowth factor", + "id": "gooGrowthFactor", + "type": "float", + "default": "0.8", + "tooltip": "How much you grow when absorbing people via goo. [1]-you will gain equal mass to the souls you absorb. [.01]- you will grow by 1% of the mass of the souls you absorb. This does not stack with Prey growth factor" + }, { "name": "Digestion time", "id": "gooDigestTime", @@ -1601,6 +1680,13 @@ options = [ "buttons": ["paw_vore"], "entries": [ + { + "name": "Paw autogrowth factor", + "id": "PawGrowthFactor", + "type": "float", + "default": "0.01", + "tooltip": "How much this part grows during part specific digestion. This is relative to overall growth, [1]:all mass goes to this part [.2]:20% part growth-80% overall growth." + }, { "name": "Digestion time", "id": "pawDigestTime", @@ -1765,6 +1851,13 @@ options = [ "buttons": ["wings_vore"], "entries": [ + { + "name": "Wing autogrowth factor", + "id": "wingGrowthFactor", + "type": "float", + "default": "0.01", + "tooltip": "How much this part grows during part specific digestion. This is relative to overall growth, [1]:all mass goes to this part [.2]:20% part growth-80% overall growth." + }, { "name": "Digestion time", "id": "wingDigestTime", diff --git a/game.js b/game.js index e93e24c..9e6b67d 100644 --- a/game.js +++ b/game.js @@ -69,6 +69,7 @@ let macro = "dickDensity": 1000, "ballDensity": 1000, "breastDensity": 1000, + "assDensity": 1000, "breathStyle": "cone", @@ -326,26 +327,21 @@ let macro = get tailNoDesc() { return (this.tailCount > 1 ? "tails" : "tail"); }, - - get dickLength() { + get arousalDickFactor() { + //this scales the size of the dick, and is not directly related to arousalFactor let factor = 1; if (!this.arousalEnabled || this.arousal < 25) { factor = 0.5; } else if (this.arousal < 75) { factor = 0.5 + (this.arousal - 25) / 100; } - - return this.scaling(this.baseDickLength * this.dickScale * factor, this.scale, 1); + return factor; + }, + get dickLength() { + return this.scaling(this.baseDickLength * this.dickScale * this.arousalDickFactor, this.scale, 1); }, get dickDiameter() { - let factor = 1; - if (!this.arousalEnabled || this.arousal < 25) { - factor = 0.5; - } else if (this.arousal < 75) { - factor = 0.5 + (this.arousal - 25) / 100; - } - - return this.scaling(this.baseDickDiameter * this.dickScale * factor, this.scale, 1); + return this.scaling(this.baseDickDiameter * this.dickScale * this.arousalDickFactor, this.scale, 1); }, get dickGirth() { return Math.pow((this.dickDiameter/ 2),2) * Math.PI; @@ -354,7 +350,7 @@ let macro = return this.dickGirth * this.dickStretchiness * this.dickStretchiness; }, get dickArea() { - return this.dickLength * this.dickDiameter* Math.PI / 2; + return this.dickLength * this.dickDiameter * Math.PI / 2; }, get dickVolume() { return this.dickLength * Math.pow(this.dickDiameter/2,2) * Math.PI; @@ -1631,7 +1627,7 @@ let macro = state = "erect, throbbing, pre-soaked"; } } - return length(this.dickLength, unit, true) + " long " + state + " " + this.dickType + " cock"; + return length(this.dickLength, unit, true) + " long " + state + " " + this.dickType; }, get describeVagina() { @@ -1955,7 +1951,7 @@ function do_digestion(owner, organ, container, active=false) { update([line, summary, newline], active); return; } - + grow_automatic(container.sum_property("mass"), organ.name); let digested = container.sum(); for (let key in victims[organ.name]) { if (victims[organ.name].hasOwnProperty(key) && digested.hasOwnProperty(key) ) { @@ -2711,6 +2707,10 @@ function sheath_absorb() add_victim_people("sheath-absorb",prey); update([sound,line,linesummary,newline]); + if (preyMass > 0){ + grow_automatic(preyMass, "cock"); + } + macro.arouse(45); } @@ -2801,6 +2801,10 @@ function foreskin_absorb() add_victim_people("foreskin-absorb",prey); update([sound,line,linesummary,newline]); + if (preyMass > 0){ + grow_automatic(preyMass, "cock"); + } + macro.arouse(45); } @@ -4128,7 +4132,152 @@ function pick_move() stomp(); } +//Growth + //Automatic Growth + +function grow_automatic(preyMass, part) { + if (macro.automaticGrowthEnabled == true){ + let preyMassBody = (preyMass * macro.preyGrowthFactor); + + if (part === "tail" && macro.tailGrowthFactor > 0) { + let preyMassBody = ((1 - macro.tailGrowthFactor) * macro.preyGrowthFactor * preyMass); + //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly + let preyMassPart = macro.tailGrowthFactor * preyMass; + + let oldMassPart = macro.tailMass; + let oldLengthPart = macro.tailLength; + + let volumeChangerPart = (macro.tailMass + ((preyMassPart * macro.preyGrowthFactor)/macro.tailCount)) / macro.tailDensity; + //mass=volume*density. Since we know what we want our mass to be, we can figure out how much volume the final tail should have + let scaleChangerPart = (volumeChangerPart/((Math.pow(macro.baseTailDiameter/2, 2)) * Math.PI * macro.baseTailLength * (Math.pow(macro.scale, 3)))); + macro.tailScale = Math.pow(scaleChangerPart, 1/3); + // (tailVolume/((macro.baseTailDiameter/2)^2 * Math.PI * macro.baseTailLength * macro.scale^3)) = macro.tailScale^3 + + let newMassPart = macro.tailMass; + let newLengthPart = macro.tailLength; + let deltaMassPart = newMassPart - oldMassPart; + let deltaLengthPart = newLengthPart - oldLengthPart; + + update(["Power surges through you as your " + macro.tailType + (macro.tailCount > 1 ? " tails grow " : " tail grows ") + length(deltaLengthPart, unit, false) + " longer and gains " + mass(deltaMassPart, unit, false) + " of mass.",newline]); + + } else if (part === "cock" && macro.cockGrowthFactor > 0) { + let preyMassBody = ((1 - macro.cockGrowthFactor) * macro.preyGrowthFactor * preyMass); + //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly + let preyMassPart = macro.cockGrowthFactor * macro.preyGrowthFactor * preyMass; + + let oldMassPart = macro.dickMass; + let oldLengthPart = macro.dickLength; + + let volumeChangerPart = ((macro.dickMass + preyMassPart) / macro.dickDensity); + //mass=volume*density. Since we know what we want our final mass to be, we can figure out how much volume the final part should have + let scaleChangerPart = (volumeChangerPart /( Math.pow(macro.baseDickDiameter/2, 2) *Math.PI * Math.pow(macro.scale, 3) * macro.baseDickLength * Math.pow(macro.arousalDickFactor, 3))); + macro.dickScale = Math.pow(scaleChangerPart, 1/3); + // dickScale^3 = volume/ pi * baseDickRadius^2 * macro.scale^3 * baseDickLength * arousalDickFactor^3 + + let newMassPart = macro.dickMass; + let newLengthPart = macro.dickLength; + let deltaMassPart = newMassPart - oldMassPart; + let deltaLengthPart = newLengthPart - oldLengthPart; + + update(["Power surges through you as your " + macro.dickType + " cock grows " + length(deltaLengthPart, unit, false) + " longer and gains " + mass(deltaMassPart, unit, false) + " of mass.",newline]); + + } else if (part === "balls" && macro.ballGrowthFactor > 0) { + let preyMassBody = (1 - macro.ballGrowthFactor) * macro.preyGrowthFactor * preyMass; + //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly + let preyMassPart = macro.ballGrowthFactor * preyMass; + + let oldMassPart = macro.ballMass; + let oldDiameterPart = macro.ballDiameter; + + let volumeChangerPart = (macro.ballMass + (preyMassPart * macro.preyGrowthFactor)) / macro.ballDensity; + //mass=volume*density. Since we know what we want our mass to be, we can figure out how much volume the final part should have + let scaleChangerPart = Math.pow((6 * volumeChangerPart/ Math.PI), 1/3) + macro.ballScale = scaleChangerPart/(macro.baseBallDiameter * macro.scale); + // (6 * volume / pi)^1/3 = base ball diam * scale *ballScale + + let newMassPart = macro.ballMass; + let newDiameterPart = macro.ballDiameter; + let deltaMassPart = newMassPart - oldMassPart; + let deltaDiameterPart = newDiameterPart - oldDiameterPart; + + update(["Power surges through you as your balls swell by " + length(deltaDiameterPart, unit, false) + ", gaining " + mass(deltaMassPart, unit, false) + " of mass apiece.",newline]); + + } else if (part === "bowels" && macro.assGrowthFactor > 0) { + let preyMassBody = (1 - macro.assGrowthFactor) * macro.preyGrowthFactor * preyMass; + //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly + let preyMassPart = macro.assGrowthFactor * preyMass; + + let oldDiameterPart = Math.pow(macro.assArea,1/2); + + let volumeChangerPart = (macro.assArea + //mass=volume*density. Since we know what we want our mass to be, we can figure out how much volume the final part should have + let scaleChangerPart = Math.pow((6 * volumeChangerPart/ Math.PI), 1/3) + macro.ballScale = scaleChangerPart/(macro.baseBallDiameter * macro.scale); + // (6 * volume / pi)^1/3 = base ball diam * scale *ballScale + + let newDiameterPart = Math.pow(macro.assArea,1/2); + let deltaDiameterPart = newDiameterPart - oldDiameterPart; + + update(["Power surges through you as your ass swells by " + length(deltaDiamterPart, unit, false) + ".",newline]); + + } else if (part === "breasts" && macro.breastGrowthFactor > 0) { + + } else if (part === "womb" && macro.wombGrowthFactor > 0) { + + } else if (part === "paws" && macro.pawsGrowthFactor > 0) { + + } else if (part === "souls") { + let preyMassBody = 0; + if (macro.soulGrowthFactor > 0) { + + let oldHeight = macro.height; + let oldMass = macro.mass; + + let scaleChanger = ((macro.mass + (preyMass * macro.soulGrowthFactor)) / macro.baseMass); + //scale changer works because macro.mass = macro.baseMass * macro.scale^3 + macro.scale = Math.pow(scaleChanger, 1/3); + let newHeight = macro.height; + let newMass = macro.mass; + let deltaHeight = newHeight - oldHeight; + let deltaMass = newMass - oldMass; + + update(["Power surges through you as you grow " + length(deltaHeight, unit, false) + " taller and gain " + mass(deltaMass, unit, false) + " of mass.",newline]); + } + } else if (part === "goo") { + let preyMassBody = 0; + if (macro.gooGrowthFactor > 0) { + let oldHeight = macro.height; + let oldMass = macro.mass; + + let scaleChanger = ((macro.mass + (preyMass * macro.gooGrowthFactor)) / macro.baseMass); + //scale changer works because macro.mass = macro.baseMass * macro.scale^3 + macro.scale = Math.pow(scaleChanger, 1/3); + let newHeight = macro.height; + let newMass = macro.mass; + let deltaHeight = newHeight - oldHeight; + let deltaMass = newMass - oldMass; + + update(["Power surges through you as you grow " + length(deltaHeight, unit, false) + " taller and gain " + mass(deltaMass, unit, false) + " of mass.",newline]); + } + //Body, runs after organ specific growth so organ specific growth factor kicks in. Doesn't run after goo or soul related growth + } if (preyMassBody > 0){ + let oldHeight = macro.height; + let oldMass = macro.mass; + + let scaleChanger = ((macro.mass + preyMassBody) / macro.baseMass); + //scale changer works because macro.mass = macro.baseMass * macro.scale^3 + macro.scale = Math.pow(scaleChanger, 1/3); + let newHeight = macro.height; + let newMass = macro.mass; + let deltaHeight = newHeight - oldHeight; + let deltaMass = newMass - oldMass; + + update(["Power surges through you as you grow " + length(deltaHeight, unit, false) + " taller and gain " + mass(deltaMass, unit, false) + " of mass." + part,newline]); + } + } +} + //Manual Growth function grow_part_pick(id) { document.querySelector(".growth-part-active").classList.remove("growth-part-active"); document.querySelector("#" + id).classList.add("growth-part-active"); @@ -4178,7 +4327,7 @@ function grow(factor=1) let heightStr = length(heightDelta, unit); let massStr = mass(massDelta, unit); - update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass",newline]); + update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass.",newline]); } function grow_paws(factor) @@ -4205,7 +4354,7 @@ function grow_tail(factor) let lengthDelta = macro.tailLength - oldLength; let massDelta = macro.tailMass - oldMass; - update(["Power surges through you as your " + macro.tailType + " tail grows " + length(lengthDelta, unit, false) + " longer and gains " + mass(massDelta, unit, false) + " of mass",newline]); + update(["Power surges through you as your " + macro.tailType + " tail grows " + length(lengthDelta, unit, false) + " longer and gains " + mass(massDelta, unit, false) + " of mass.",newline]); } function grow_dick(factor) @@ -4218,7 +4367,7 @@ function grow_dick(factor) let lengthDelta = macro.dickLength - oldLength; let massDelta = macro.dickMass - oldMass; - update(["Power surges through you as your " + macro.dickType + " cock grows " + length(lengthDelta, unit, false) + " longer and gains " + mass(massDelta, unit, false) + " of mass",newline]); + update(["Power surges through you as your " + macro.dickType + " cock grows " + length(lengthDelta, unit, false) + " longer and gains " + mass(massDelta, unit, false) + " of mass.",newline]); } function grow_balls(factor) @@ -4231,7 +4380,7 @@ function grow_balls(factor) let diameterDelta = macro.ballDiameter - oldDiameter; let massDelta = macro.ballMass - oldMass; - update(["Power surges through you as your balls swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece",newline]); + update(["Power surges through you as your balls swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece.",newline]); } function grow_breasts(factor) @@ -4244,7 +4393,7 @@ function grow_breasts(factor) let diameterDelta = macro.breastDiameter - oldDiameter; let massDelta = macro.breastMass - oldMass; - update(["Power surges through you as your breasts swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece",newline]); + update(["Power surges through you as your breasts swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece.",newline]); } function grow_vagina(factor) @@ -4256,7 +4405,7 @@ function grow_vagina(factor) let lengthDelta = macro.vaginaLength - oldLength; - update(["Power surges through you as your moist slit expands by by " + length(lengthDelta, unit, false),newline]); + update(["Power surges through you as your moist slit expands by by " + length(lengthDelta, unit, false) + ".",newline]); } function grow_womb(factor) @@ -4268,7 +4417,7 @@ function grow_womb(factor) let volumeDelta = macro.wombVolume - oldVolume; - update(["Power surges through you as your womb grows larger, gaining " + volume(volumeDelta, unit, false) + " of capacity",newline]); + update(["Power surges through you as your womb grows larger, gaining " + volume(volumeDelta, unit, false) + " of capacity.",newline]); } @@ -4280,7 +4429,7 @@ function grow_ass(factor) macro.assScale *= factor; let diameterDelta = Math.pow(macro.assArea,1/2) - oldDiameter; - update(["Power surges through you as your ass swells by " + length(diameterDelta, unit, false),newline]); + update(["Power surges through you as your ass swells by " + length(diameterDelta, unit, false) + ".",newline]); } function resetSettings() { From 0b245a8df485bc04beaafed0b00da636c0afb727 Mon Sep 17 00:00:00 2001 From: jsb5468 Date: Mon, 4 Feb 2019 21:43:51 -0500 Subject: [PATCH 2/5] Text Fixes fixed duplicates of cock, and an inside duplicate inside businesses, changed macro.dickDescribe to alterante between cock, shaft, and rod --- game.js | 6 ++++- recursive-desc.js | 58 +++++++++++++++++++++++----------------------- recursive-macro.js | 2 +- 3 files changed, 35 insertions(+), 31 deletions(-) diff --git a/game.js b/game.js index 9e6b67d..17d152b 100644 --- a/game.js +++ b/game.js @@ -1627,7 +1627,11 @@ let macro = state = "erect, throbbing, pre-soaked"; } } - return length(this.dickLength, unit, true) + " long " + state + " " + this.dickType; + + let descDickArray = ["cock", "shaft", "rod"]; + let randomDescDick = descDickArray[(Math.random() * descDickArray.length) | 0]; + + return length(this.dickLength, unit, true) + " long " + state + " " + this.dickType + " " + randomDescDick; }, get describeVagina() { diff --git a/recursive-desc.js b/recursive-desc.js index c3441ec..8ecbd4e 100644 --- a/recursive-desc.js +++ b/recursive-desc.js @@ -391,13 +391,13 @@ function defaultSheathToy(container, macro, verbose, flat) { if (macro.orgasm) { return "You stroke your spurting cock, then reach down to give your sheath a firm squeeze. Anything within has been ground away to nothingness by the force of your orgasm."; } else if (macro.arousal < 25) { - return "You grip your soft sheath and give it a squeeze, feeling " + container.describeSimple(flat) + " within rub against your " + macro.describeDick + " cock."; + return "You grip your soft sheath and give it a squeeze, feeling " + container.describeSimple(flat) + " within rub against your " + macro.describeDick + "."; } else if (macro.arousal < 75) { - return "You grip your swelling sheath and squeeze, feeling " + container.describeSimple(flat) + " within grind against your " + macro.describeDick + " cock."; + return "You grip your swelling sheath and squeeze, feeling " + container.describeSimple(flat) + " within grind against your " + macro.describeDick + "."; } else if (macro.arousal < 150) { - return "You run your fingers down your " + macro.describeDick + " shaft and grip your sheath, squeezing it to feel " + container.describeSimple(flat) + " being smothered against the musky walls by your throbbing cock."; + return "You run your fingers down your " + macro.describeDick + " and grip your sheath, squeezing it to feel " + container.describeSimple(flat) + " being smothered against the musky walls by your throbbing cock."; } else { - return "Trembling with your impending orgasm, your fingers play over your sheath, feeling " + container.describeSimple(flat) + " within rub against your " + macro.describeDick + " cock."; + return "Trembling with your impending orgasm, your fingers play over your sheath, feeling " + container.describeSimple(flat) + " within rub against your " + macro.describeDick + "."; } } else { if (macro.orgasm) { @@ -407,7 +407,7 @@ function defaultSheathToy(container, macro, verbose, flat) { } else if (macro.arousal < 75) { return "You grip your swelling sheath and squeeze."; } else if (macro.arousal < 150) { - return "You run your fingers down your " + macro.describeDick + " shaft and grip your sheath, squeezing it gently."; + return "You run your fingers down your " + macro.describeDick + " and grip your sheath, squeezing it gently."; } else { return "Trembling with your impending orgasm, your fingers play over your sheath."; } @@ -420,20 +420,20 @@ function defaultSheathClench(container, macro, verbose, flat) { else if (isGory(macro)) return "You squeeze your packed sheath, reducing " + container.describeSimple(flat) + " to a gory paste that slickens your throbbing shaft."; else if (isFatal(macro)) - return "Your fingers run over your packed sheath, squeezing on the " + macro.describeDick + " shaft within and smashing " + container.describeSimple(flat); + return "Your fingers run over your packed sheath, squeezing on the " + macro.describeDick + " within and smashing " + container.describeSimple(flat); else return "Your squeeze your sheath, pushing " + container.describeSimple(flat) + " out of your sheath."; } function defaultSheathCrush(container, macro, verbose, flat) { if (container.count == 0) - return "Your orgasm causes your " + macro.describeDick + " cock to swell and surge."; + return "Your orgasm causes your " + macro.describeDick + " to swell and surge."; else if (isGory(macro)) - return "Your powerful orgasm causes your throbbing " + macro.describeDick + " cock to swell and crush the life from everything in your sheath, reducing " + container.describeSimple(flat) + " to a gory paste that slickens your spurting shaft."; + return "Your powerful orgasm causes your throbbing " + macro.describeDick + " to swell and crush the life from everything in your sheath, reducing " + container.describeSimple(flat) + " to a gory paste that slickens your spurting shaft."; else if (isFatal(macro)) - return "Your orgasm causes your " + macro.describeDick + " shaft to throb and swell, smashing " + container.describeSimple(flat) + " trapped in your musky sheath."; + return "Your orgasm causes your " + macro.describeDick + " to throb and swell, smashing " + container.describeSimple(flat) + " trapped in your musky sheath."; else - return "Your orgasm causes your " + macro.describeDick + " cock to swell, squeezing " + container.describeSimple(flat) + " out from your sheath."; + return "Your orgasm causes your " + macro.describeDick + " to swell, squeezing " + container.describeSimple(flat) + " out from your sheath."; } function defaultSheathAbsorb(container, macro, verbose, flat) { @@ -452,7 +452,7 @@ function defaultForeskinToy(container, macro, verbose, flat) { } else if (macro.arousal < 75) { return "You grip your swelling cock and squeeze, feeling " + container.describeSimple(flat) + " between your " + macro.describeDick + " and your foreskin."; } else if (macro.arousal < 150) { - return "You run your fingers down your " + macro.describeDick + " shaft, squeezing it to feel " + container.describeSimple(flat) + " being smothered against your throbbing cock."; + return "You run your fingers down your " + macro.describeDick + ", squeezing it to feel " + container.describeSimple(flat) + " being smothered against your throbbing cock."; } else { return "Trembling with your impending orgasm, your fingers play over your taut foreskin, feeling " + container.describeSimple(flat) + " within rub against your " + macro.describeDick + " cock."; } @@ -464,7 +464,7 @@ function defaultForeskinToy(container, macro, verbose, flat) { } else if (macro.arousal < 75) { return "You grip your swelling cock and squeeze."; } else if (macro.arousal < 150) { - return "You run your fingers over your " + macro.describeDick + " shaft and grip your taut foreskin, squeezing it gently."; + return "You run your fingers over your " + macro.describeDick + " and grip your taut foreskin, squeezing it gently."; } else { return "Trembling with your impending orgasm, your fingers play over your shaft."; } @@ -477,20 +477,20 @@ function defaultForeskinClench(container, macro, verbose, flat) { else if (isGory(macro)) return "You squeeze your foreskin, reducing " + container.describeSimple(flat) + " to a gory paste that slickens your throbbing shaft."; else if (isFatal(macro)) - return "Your fingers run over your packed foreskin, squeezing on the " + macro.describeDick + " shaft within and smashing " + container.describeSimple(flat); + return "Your fingers run over your packed foreskin, squeezing on the " + macro.describeDick + " within and smashing " + container.describeSimple(flat); else return "Your squeeze your foreskin, pushing " + container.describeSimple(flat) + " out of your foreskin."; } function defaultForeskinCrush(container, macro, verbose, flat) { if (container.count == 0) - return "Your orgasm causes your " + macro.describeDick + " cock to swell and surge."; + return "Your orgasm causes your " + macro.describeDick + " to swell and surge."; else if (isGory(macro)) - return "Your powerful orgasm causes your throbbing " + macro.describeDick + " cock to swell and crush the life from everything in your foreskin, reducing " + container.describeSimple(flat) + " to a gory paste that slickens your spurting shaft."; + return "Your powerful orgasm causes your throbbing " + macro.describeDick + " to swell and crush the life from everything in your foreskin, reducing " + container.describeSimple(flat) + " to a gory paste that slickens your spurting shaft."; else if (isFatal(macro)) - return "Your orgasm causes your " + macro.describeDick + " shaft to throb and swell, smashing " + container.describeSimple(flat) + " trapped in your musky foreskin."; + return "Your orgasm causes your " + macro.describeDick + " to throb and swell, smashing " + container.describeSimple(flat) + " trapped in your musky foreskin."; else - return "Your orgasm causes your " + macro.describeDick + " cock to swell, squeezing " + container.describeSimple(flat) + " out from your foreskin."; + return "Your orgasm causes your " + macro.describeDick + " to swell, squeezing " + container.describeSimple(flat) + " out from your foreskin."; } function defaultForeskinAbsorb(container, macro, verbose, flat) { @@ -511,9 +511,9 @@ function defaultCockslap(container, macro, verbose, flat) { if (container.count == 0) return "Your " + macro.describeDick + " swings through the air. Lewd!"; else if (isFatal(macro)) - return "Your swaying " + macro.describeDick + " cock crushes " + container.describe(verbose) + ". "; + return "Your swaying " + macro.describeDick + " crushes " + container.describe(verbose) + ". "; else - return "You smack " + container.describe(verbose) + " with your " + macro.describeDick + " shaft."; + return "You smack " + container.describe(verbose) + " with your " + macro.describeDick + "."; } function defaultBallSmother(container, macro, verbose, flat) { @@ -527,20 +527,20 @@ function defaultBallSmother(container, macro, verbose, flat) { function defaultMaleSpurt(container, macro, verbose, flat) { if (container.count == 0) - return "Your " + macro.describeDick + " cock spews $VOLUME of bitter precum."; + return "Your " + macro.describeDick + " spews $VOLUME of bitter precum."; else if (isFatal(macro)) - return "Your " + macro.describeDick + " cock spurts out bitter precum, drowning " + container.describe(verbose) + " in $VOLUME of slick musky fluid."; + return "Your " + macro.describeDick + " spurts out bitter precum, drowning " + container.describe(verbose) + " in $VOLUME of slick musky fluid."; else - return "Your " + macro.describeDick + " shaft spurts precum, splooging " + container.describe(verbose) + " in $VOLUME of slick musky fluid."; + return "Your " + macro.describeDick + " spurts precum, splooging " + container.describe(verbose) + " in $VOLUME of slick musky fluid."; } function defaultMaleOrgasm(container, macro, verbose, flat) { if (container.count == 0) - return "Your " + macro.describeDick + " cock spurts, gushing out a $VOLUME glob of cum."; + return "Your " + macro.describeDick + " spurts, gushing out a $VOLUME glob of cum."; else if (isFatal(macro)) - return "You're cumming! Your " + macro.describeDick + " cock erupts, obliterating " + container.describe(verbose) + " in a $VOLUME-torrent of cum."; + return "You're cumming! Your " + macro.describeDick + " erupts, obliterating " + container.describe(verbose) + " in a $VOLUME-torrent of cum."; else - return "You're cumming! Your " + macro.describeDick + " shaft spews a thick rope of seed, splooging " + container.describe(verbose) + " in a $VOLUME-torrent of cum."; + return "You're cumming! Your " + macro.describeDick + " spews a thick rope of seed, splooging " + container.describe(verbose) + " in a $VOLUME-torrent of cum."; } function defaultFemaleSpurt(container, macro, verbose, flat) { @@ -904,11 +904,11 @@ function defaultDumpSock(container, macro, verbose, flat) { function defaultPiss(container, macro, verbose, flat) { if (macro.maleParts) { if (container.count == 0) { - return "You sigh with relief as $VOLUME of piss erupts from your " + macro.describeDick + " cock."; + return "You sigh with relief as $VOLUME of piss erupts from your " + macro.describeDick + "."; } else if (isSadistic(macro)) { - return "You sigh with relief as $VOLUME of hot, rancid piss erupts from your " + macro.describeDick + " cock, inundating " + container.describe(verbose) + " in a disgusting tide of yellow death." + return "You sigh with relief as $VOLUME of hot, rancid piss erupts from your " + macro.describeDick + ", inundating " + container.describe(verbose) + " in a disgusting tide of yellow death." } else { - return "You sigh with relief as $VOLUME of piss erupts from your " + macro.describeDick + " cock, spraying down " + container.describe(verbose) + " in a shower of golden, musky fluid."; + return "You sigh with relief as $VOLUME of piss erupts from your " + macro.describeDick + ", spraying down " + container.describe(verbose) + " in a shower of golden, musky fluid."; } } else if (macro.femaleParts) { if (container.count == 0) { @@ -935,7 +935,7 @@ function defaultBladderVore(container, macro, verbose, flat) { } else { if (macro.maleParts) { - return "You snatch up " + container.describe(verbose) + " and stuff them into your " + macro.describeDick + " cock, grinding them to its base and forcing them into your musky bladder."; + return "You snatch up " + container.describe(verbose) + " and stuff them into your " + macro.describeDick + ", grinding them to its base and forcing them into your musky bladder."; } else if (macro.femaleParts) { return "You snatch " + container.describe(verbose) + " in your iron grip, grinding them against your " + macro.describeVagina + " slit before stuffing them into your urethra, sealing them away in your musky bladder."; } else { diff --git a/recursive-macro.js b/recursive-macro.js index d6548a8..0326788 100644 --- a/recursive-macro.js +++ b/recursive-macro.js @@ -1030,7 +1030,7 @@ function Business(count = 1) { } return merge_things(list) + " with " + describe_all(this.contents,verbose); } else { - return this.count + " local business with " + describe_all(this.contents,verbose) + "inside"; + return this.count + " local business containing " + describe_all(this.contents,verbose); } } else { return (this.count > 1 ? this.count + " buildings" : "a local business"); From 4d50aedb3f14415eee000b12a00054401696be6b Mon Sep 17 00:00:00 2001 From: jsb5468 Date: Mon, 4 Feb 2019 23:40:49 -0500 Subject: [PATCH 3/5] Automatic Growth 2 Added basic growth functionaity to vagina, womb and paws --- features.js | 9 +++- game.js | 139 +++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 123 insertions(+), 25 deletions(-) diff --git a/features.js b/features.js index bdd5aa0..64ded69 100644 --- a/features.js +++ b/features.js @@ -1244,6 +1244,13 @@ options = [ "type": "float", "default": "1" }, + { + "name": "Vagina autogrowth factor", + "id": "vaginaGrowthFactor", + "type": "float", + "default": "0.01", + "tooltip": "How much this part grows during part specific digestion. This is relative to overall growth, [1]:all mass goes to this part [.2]:20% part growth-80% overall growth." + }, { "name": "Womb autogrowth factor", "id": "wombGrowthFactor", @@ -1682,7 +1689,7 @@ options = [ [ { "name": "Paw autogrowth factor", - "id": "PawGrowthFactor", + "id": "pawGrowthFactor", "type": "float", "default": "0.01", "tooltip": "How much this part grows during part specific digestion. This is relative to overall growth, [1]:all mass goes to this part [.2]:20% part growth-80% overall growth." diff --git a/game.js b/game.js index 17d152b..d913414 100644 --- a/game.js +++ b/game.js @@ -69,7 +69,9 @@ let macro = "dickDensity": 1000, "ballDensity": 1000, "breastDensity": 1000, - "assDensity": 1000, + "assDensity": 1000, //this is only used for automatic growth function + "wombDensity":1000, //this is only used for automatic growth function + "pawDensity":1000, //this is only used for automatic growth function "breathStyle": "cone", @@ -328,7 +330,7 @@ let macro = return (this.tailCount > 1 ? "tails" : "tail"); }, get arousalDickFactor() { - //this scales the size of the dick, and is not directly related to arousalFactor + //this scales the size of the dick based on arousal, and is not directly related to arousalFactor(muiltiplier on arousal you gain from actions) let factor = 1; if (!this.arousalEnabled || this.arousal < 25) { factor = 0.5; @@ -2492,6 +2494,10 @@ function cleavage_absorb() update([sound,line,linesummary,newline]); macro.arouse((preyMass > 0 ? 15 : 5)); + + if (preyMass > 0){ + grow_automatic(preyMass, "breasts"); + } } function breast_toy() @@ -3860,7 +3866,12 @@ function paw_vore() } if (lines.length == 0) { - update(["Nothing happens...",newline]); + if (macro.footSockWorn){ + update(["Your " + macro.footOnlyDesc(true) + " have no prey to absorb in your socks.",newline]); + } else if (macro.footShoeWorn){ + update(["Your " + macro.footOnlyDesc(true) + " have no prey to absorb in your " + macro.footDesc(true) + ".",newline]); + } + else {update(["Nothing happens...",newline]);} return; } @@ -3879,6 +3890,10 @@ function paw_vore() update([sound].concat(lines).concat([linesummary,newline])); macro.arouse(5); + +// if (preyMass > 0){ + // grow_automatic(preyMass,"paws"); + // } } function breath(type, style) @@ -4144,14 +4159,14 @@ function grow_automatic(preyMass, part) { let preyMassBody = (preyMass * macro.preyGrowthFactor); if (part === "tail" && macro.tailGrowthFactor > 0) { - let preyMassBody = ((1 - macro.tailGrowthFactor) * macro.preyGrowthFactor * preyMass); + preyMassBody = ((1 - macro.tailGrowthFactor) * macro.preyGrowthFactor * preyMass); //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly - let preyMassPart = macro.tailGrowthFactor * preyMass; + let preyMassPart = macro.tailGrowthFactor * macro.preyGrowthFactor * preyMass; let oldMassPart = macro.tailMass; let oldLengthPart = macro.tailLength; - let volumeChangerPart = (macro.tailMass + ((preyMassPart * macro.preyGrowthFactor)/macro.tailCount)) / macro.tailDensity; + let volumeChangerPart = (macro.tailMass + (preyMassPart/macro.tailCount)) / macro.tailDensity; //mass=volume*density. Since we know what we want our mass to be, we can figure out how much volume the final tail should have let scaleChangerPart = (volumeChangerPart/((Math.pow(macro.baseTailDiameter/2, 2)) * Math.PI * macro.baseTailLength * (Math.pow(macro.scale, 3)))); macro.tailScale = Math.pow(scaleChangerPart, 1/3); @@ -4165,7 +4180,7 @@ function grow_automatic(preyMass, part) { update(["Power surges through you as your " + macro.tailType + (macro.tailCount > 1 ? " tails grow " : " tail grows ") + length(deltaLengthPart, unit, false) + " longer and gains " + mass(deltaMassPart, unit, false) + " of mass.",newline]); } else if (part === "cock" && macro.cockGrowthFactor > 0) { - let preyMassBody = ((1 - macro.cockGrowthFactor) * macro.preyGrowthFactor * preyMass); + preyMassBody = ((1 - macro.cockGrowthFactor) * macro.preyGrowthFactor * preyMass); //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly let preyMassPart = macro.cockGrowthFactor * macro.preyGrowthFactor * preyMass; @@ -4186,14 +4201,14 @@ function grow_automatic(preyMass, part) { update(["Power surges through you as your " + macro.dickType + " cock grows " + length(deltaLengthPart, unit, false) + " longer and gains " + mass(deltaMassPart, unit, false) + " of mass.",newline]); } else if (part === "balls" && macro.ballGrowthFactor > 0) { - let preyMassBody = (1 - macro.ballGrowthFactor) * macro.preyGrowthFactor * preyMass; + preyMassBody = (1 - macro.ballGrowthFactor) * macro.preyGrowthFactor * preyMass; //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly - let preyMassPart = macro.ballGrowthFactor * preyMass; + let preyMassPart = macro.ballGrowthFactor * macro.preyGrowthFactor * preyMass; let oldMassPart = macro.ballMass; let oldDiameterPart = macro.ballDiameter; - let volumeChangerPart = (macro.ballMass + (preyMassPart * macro.preyGrowthFactor)) / macro.ballDensity; + let volumeChangerPart = (macro.ballMass + preyMassPart) / macro.ballDensity; //mass=volume*density. Since we know what we want our mass to be, we can figure out how much volume the final part should have let scaleChangerPart = Math.pow((6 * volumeChangerPart/ Math.PI), 1/3) macro.ballScale = scaleChangerPart/(macro.baseBallDiameter * macro.scale); @@ -4207,31 +4222,107 @@ function grow_automatic(preyMass, part) { update(["Power surges through you as your balls swell by " + length(deltaDiameterPart, unit, false) + ", gaining " + mass(deltaMassPart, unit, false) + " of mass apiece.",newline]); } else if (part === "bowels" && macro.assGrowthFactor > 0) { - let preyMassBody = (1 - macro.assGrowthFactor) * macro.preyGrowthFactor * preyMass; + preyMassBody = (1 - macro.assGrowthFactor) * macro.preyGrowthFactor * preyMass; //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly - let preyMassPart = macro.assGrowthFactor * preyMass; + let preyMassPart = macro.assGrowthFactor * macro.preyGrowthFactor * preyMass; - let oldDiameterPart = Math.pow(macro.assArea,1/2); + let oldAreaPart = macro.assArea; - let volumeChangerPart = (macro.assArea - //mass=volume*density. Since we know what we want our mass to be, we can figure out how much volume the final part should have + //this is a hack, but the commented out block below doesn't work + macro.assScale = (macro.assScale + (preyMassPart/macro.mass)); + + //This Code is broken and I dont know why: + //let radiusPart = Math.pow((macro.assArea/(4 * Math.PI)), 1/2); + //let volumeChangerPart = (preyMassPart + (((4 * Math.PI)/3) * Math.pow(radiusPart, 3) * macro.assDensity) / macro.assDensity); + ///volume=(mass1+mass2)/density. Mass2 is calcualted from volume*density this is modeling the ass as a sphere(2 hemispheres) + //let scaleChangerPart = ((Math.pow(((3/(4 * Math.PI)) * volumeChangerPart), 2/3) * 4 * Math.PI) / (macro.baseAssArea * Math.pow(macro.scale, 2))); + //macro.assScale = scaleChangerPart; + ///V=4/3((baseassArea*scale^2*AssScale)/4pi)^3/2 + + let newAreaPart = macro.assArea; + let deltaAreaPart = newAreaPart - oldAreaPart; + + update(["Power surges through you as your ass swells by " + length(deltaAreaPart, unit, false) + ".",newline]); + + } else if (part === "breasts" && macro.breastGrowthFactor > 0) { + let preyMassBody = (1 - macro.breastGrowthFactor) * macro.preyGrowthFactor * preyMass; + //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly + let preyMassPart = macro.breastGrowthFactor * macro.preyGrowthFactor * preyMass; + + let oldMassPart = macro.breastMass; + let oldDiameterPart = macro.breastDiameter; + + let volumeChangerPart = (preyMassPart + macro.breastMass) / macro.breastDensity; + //volume=(mass1+mass2)/density. Mass2 is calcualted from volume*density let scaleChangerPart = Math.pow((6 * volumeChangerPart/ Math.PI), 1/3) - macro.ballScale = scaleChangerPart/(macro.baseBallDiameter * macro.scale); + macro.breastScale = scaleChangerPart/(macro.baseBreastDiameter * macro.scale); // (6 * volume / pi)^1/3 = base ball diam * scale *ballScale - let newDiameterPart = Math.pow(macro.assArea,1/2); + let newMassPart = macro.breastMass; + let newDiameterPart = macro.breastDiameter; + + let deltaMassPart = newMassPart - oldMassPart; let deltaDiameterPart = newDiameterPart - oldDiameterPart; - update(["Power surges through you as your ass swells by " + length(deltaDiamterPart, unit, false) + ".",newline]); + update(["Power surges through you as your breasts swell by " + length(deltaDiameterPart, unit, false) + ", gaining " + mass(deltaMassPart, unit, false) + " of mass apiece.",newline]); - } else if (part === "breasts" && macro.breastGrowthFactor > 0) { + } else if (part === "womb") { + if (macro.wombGrowthFactor > 0){ + preyMassBody = ((1 - macro.wombGrowthFactor) * macro.preyGrowthFactor * preyMass); + //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly + let preyMassPart = macro.wombGrowthFactor * macro.preyGrowthFactor * preyMass; + + let oldVolumeWomb = macro.wombVolume; + + let volumeChangerPart = ((macro.wombVolume * macro.wombDensity) + preyMassPart) / macro.wombDensity; + //mass = volume*density. Since we know what we want our mass to be, we can figure out how much volume the final tail should have + let scaleChangerPart = (volumeChangerPart/macro.baseWombVolume); + macro.wombScale = (Math.pow(scaleChangerPart, 1/3)/macro.scale); + // wombVolume = baseWombVolume * (wombScale * macro.scale)^3 + + let newVolumeWomb = macro.wombVolume; + let deltaVolumeWomb = newVolumeWomb - oldVolumeWomb; + + update(["Power surges through you as your womb grows larger, gaining " + volume(deltaVolumeWomb, unit, false) + " of capacity.",newline]); + } if (macro.vaginaGrowthFactor > 0){ + preyMassBody = ((1 - macro.vaginaGrowthFactor) * macro.preyGrowthFactor * preyMassBody); + //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly + let preyMassPart = macro.vaginaGrowthFactor * macro.preyGrowthFactor * preyMass; + + let oldLengthVagina = macro.vaginaLength; + + let volumeChangerPart = ((macro.vaginaVolume * macro.wombDensity) + preyMassPart) / macro.wombDensity; + //mass = volume*density. Since we know what we want our mass to be, we can figure out how much volume the final tail should have + let scaleChangerPart = (volumeChangerPart/(Math.pow(macro.baseVaginaWidth, 2) * macro.baseVaginaLength)); + macro.vaginaScale = (Math.pow(scaleChangerPart, 1/3)/macro.scale); + // vaginaVolume = baseVaginaWidth^2 * baseVaginaLength * (vaginaScale * macro.scale)^3 + + let newLengthVagina = macro.vaginaLength; + let deltaLengthVagina = newLengthVagina - oldLengthVagina; + + update(["Power surges through you as your moist slit expands by by " + length(deltaLengthVagina, unit, false) + ".",newline]); + } + + } else if (part === "paws" && macro.pawGrowthFactor > 0) { + preyMassBody = ((1 - macro.vaginaGrowthFactor) * macro.preyGrowthFactor * preyMassBody); + //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly + let preyMassPart = macro.pawGrowthFactor * macro.preyGrowthFactor * preyMass; + + let oldAreaPart = macro.pawArea; + + let volumeChangerPart = (((Math.pow(macro.pawWidth, 2) * macro.pawLength * macro.pawDensity) + preyMassPart) / (3 *macro.pawDensity)); + //mass = volume*density. Since we know what we want our mass to be, we can figure out how much volume the final tail should have + let scaleChangerPart = ((3 * volumeChangerPart)/(Math.pow(macro.basePawWidth, 2) * macro.basePawLength)); + macro.pawScale = (Math.pow(scaleChangerPart, 1/3)/macro.scale); + // volume = 1/3 basewidth^2 * baselength *scale^3 *pawscale^3 - } else if (part === "womb" && macro.wombGrowthFactor > 0) { + let newAreaPart = macro.pawArea; + let deltaAreaPart = newAreaPart - oldAreaPart; - } else if (part === "paws" && macro.pawsGrowthFactor > 0) { + update(["Power surges through you as your " + macro.footDesc(true) + " grow, gaining " + area(deltaAreaPart, unit, false) + " of area.",newline]); } else if (part === "souls") { - let preyMassBody = 0; + preyMassBody = 0; if (macro.soulGrowthFactor > 0) { let oldHeight = macro.height; @@ -4248,7 +4339,7 @@ function grow_automatic(preyMass, part) { update(["Power surges through you as you grow " + length(deltaHeight, unit, false) + " taller and gain " + mass(deltaMass, unit, false) + " of mass.",newline]); } } else if (part === "goo") { - let preyMassBody = 0; + preyMassBody = 0; if (macro.gooGrowthFactor > 0) { let oldHeight = macro.height; let oldMass = macro.mass; @@ -4276,7 +4367,7 @@ function grow_automatic(preyMass, part) { let deltaHeight = newHeight - oldHeight; let deltaMass = newMass - oldMass; - update(["Power surges through you as you grow " + length(deltaHeight, unit, false) + " taller and gain " + mass(deltaMass, unit, false) + " of mass." + part,newline]); + update(["Power surges through you as you grow " + length(deltaHeight, unit, false) + " taller and gain " + mass(deltaMass, unit, false) + " of mass.",newline]); } } } From 4f46a4dc03bcf13464d58514e62026264ccc4002 Mon Sep 17 00:00:00 2001 From: jsb5468 Date: Sat, 9 Mar 2019 00:42:57 -0500 Subject: [PATCH 4/5] Mass based Gorwth backend change Added scale based growthfactor, adjsuted mass absed growth to integrate with existing growth system, cleaning up duplicate code, and allowing other ways fo calling mass based growth in the future. Also attempted to add wing growth, but was unablew to get it working --- features.js | 13 +- game.js | 383 ++++++++++++++++++++-------------------------------- 2 files changed, 155 insertions(+), 241 deletions(-) diff --git a/features.js b/features.js index 64ded69..e038fcb 100644 --- a/features.js +++ b/features.js @@ -655,7 +655,7 @@ options = [ "entries": [ { - "name": "Automatic Growth", + "name": "Automatic growth", "id": "automaticGrowthEnabled", "type": "checkbox", "default": false, @@ -663,11 +663,17 @@ options = [ "tooltip": "When checked, you will automaically grow by ingesting/absorbing mass.", }, { - "name": "Prey Growth Factor", - "id": "preyGrowthFactor", + "name": "Prey growth factor", + "id": "basePreyGrowthFactor", "type": "float", "default": "0.8", "tooltip": "How much of what you eat gets automatically added to your body. Setting this to [0] disables it. To add half of your prey mass to your own, set to [.5]." + }, + { + "name": "Scale growth with size", + "id": "growthScaleWithSize", + "type": "checkbox", + "tooltip": "If you're ten times bigger than normal, you gain ten times as much mass when digesting prey" } ] } @@ -1828,6 +1834,7 @@ options = [ "id": "hasWings", "optional": true, "panels": ["misc"], + //"parts": ["wings"], "buttons": ["wings_flap"], "entries": [ diff --git a/game.js b/game.js index d913414..bc9dca7 100644 --- a/game.js +++ b/game.js @@ -299,6 +299,14 @@ let macro = return capital ? result.charAt(0).toUpperCase() + result.slice(1) : result; }, + get preyGrowthFactor() { + if (macro.growthScaleWithSize) { + return this.basePreyGrowthFactor * Math.pow(this.scale, 1); + //this breaks once you get to the size of a planet + } else { + return this.basePreyGrowthFactor; + } + }, get tailLength() { return this.scaling(this.baseTailLength * this.tailScale, this.scale, 1); }, @@ -3890,10 +3898,6 @@ function paw_vore() update([sound].concat(lines).concat([linesummary,newline])); macro.arouse(5); - -// if (preyMass > 0){ - // grow_automatic(preyMass,"paws"); - // } } function breath(type, style) @@ -4159,217 +4163,51 @@ function grow_automatic(preyMass, part) { let preyMassBody = (preyMass * macro.preyGrowthFactor); if (part === "tail" && macro.tailGrowthFactor > 0) { - preyMassBody = ((1 - macro.tailGrowthFactor) * macro.preyGrowthFactor * preyMass); - //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly - let preyMassPart = macro.tailGrowthFactor * macro.preyGrowthFactor * preyMass; - - let oldMassPart = macro.tailMass; - let oldLengthPart = macro.tailLength; - - let volumeChangerPart = (macro.tailMass + (preyMassPart/macro.tailCount)) / macro.tailDensity; - //mass=volume*density. Since we know what we want our mass to be, we can figure out how much volume the final tail should have - let scaleChangerPart = (volumeChangerPart/((Math.pow(macro.baseTailDiameter/2, 2)) * Math.PI * macro.baseTailLength * (Math.pow(macro.scale, 3)))); - macro.tailScale = Math.pow(scaleChangerPart, 1/3); - // (tailVolume/((macro.baseTailDiameter/2)^2 * Math.PI * macro.baseTailLength * macro.scale^3)) = macro.tailScale^3 - - let newMassPart = macro.tailMass; - let newLengthPart = macro.tailLength; - let deltaMassPart = newMassPart - oldMassPart; - let deltaLengthPart = newLengthPart - oldLengthPart; - - update(["Power surges through you as your " + macro.tailType + (macro.tailCount > 1 ? " tails grow " : " tail grows ") + length(deltaLengthPart, unit, false) + " longer and gains " + mass(deltaMassPart, unit, false) + " of mass.",newline]); + preyMassBody = ((1 - macro.tailGrowthFactor) * macro.preyGrowthFactor * preyMass); //if growth factor is greater than 1, this function will behave oddly + grow_tail((macro.tailGrowthFactor * macro.preyGrowthFactor * preyMass), false); } else if (part === "cock" && macro.cockGrowthFactor > 0) { - preyMassBody = ((1 - macro.cockGrowthFactor) * macro.preyGrowthFactor * preyMass); - //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly - let preyMassPart = macro.cockGrowthFactor * macro.preyGrowthFactor * preyMass; - - let oldMassPart = macro.dickMass; - let oldLengthPart = macro.dickLength; - - let volumeChangerPart = ((macro.dickMass + preyMassPart) / macro.dickDensity); - //mass=volume*density. Since we know what we want our final mass to be, we can figure out how much volume the final part should have - let scaleChangerPart = (volumeChangerPart /( Math.pow(macro.baseDickDiameter/2, 2) *Math.PI * Math.pow(macro.scale, 3) * macro.baseDickLength * Math.pow(macro.arousalDickFactor, 3))); - macro.dickScale = Math.pow(scaleChangerPart, 1/3); - // dickScale^3 = volume/ pi * baseDickRadius^2 * macro.scale^3 * baseDickLength * arousalDickFactor^3 - - let newMassPart = macro.dickMass; - let newLengthPart = macro.dickLength; - let deltaMassPart = newMassPart - oldMassPart; - let deltaLengthPart = newLengthPart - oldLengthPart; - - update(["Power surges through you as your " + macro.dickType + " cock grows " + length(deltaLengthPart, unit, false) + " longer and gains " + mass(deltaMassPart, unit, false) + " of mass.",newline]); + preyMassBody = ((1 - macro.cockGrowthFactor) * macro.preyGrowthFactor * preyMass); //if growth factor is greater than 1, this function will behave oddly + grow_dick((macro.cockGrowthFactor * macro.preyGrowthFactor * preyMass), false); } else if (part === "balls" && macro.ballGrowthFactor > 0) { - preyMassBody = (1 - macro.ballGrowthFactor) * macro.preyGrowthFactor * preyMass; - //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly - let preyMassPart = macro.ballGrowthFactor * macro.preyGrowthFactor * preyMass; - - let oldMassPart = macro.ballMass; - let oldDiameterPart = macro.ballDiameter; - - let volumeChangerPart = (macro.ballMass + preyMassPart) / macro.ballDensity; - //mass=volume*density. Since we know what we want our mass to be, we can figure out how much volume the final part should have - let scaleChangerPart = Math.pow((6 * volumeChangerPart/ Math.PI), 1/3) - macro.ballScale = scaleChangerPart/(macro.baseBallDiameter * macro.scale); - // (6 * volume / pi)^1/3 = base ball diam * scale *ballScale - - let newMassPart = macro.ballMass; - let newDiameterPart = macro.ballDiameter; - let deltaMassPart = newMassPart - oldMassPart; - let deltaDiameterPart = newDiameterPart - oldDiameterPart; - - update(["Power surges through you as your balls swell by " + length(deltaDiameterPart, unit, false) + ", gaining " + mass(deltaMassPart, unit, false) + " of mass apiece.",newline]); + preyMassBody = (1 - macro.ballGrowthFactor) * macro.preyGrowthFactor * preyMass; //if growth factor is greater than 1, this function will behave oddly + grow_balls((macro.ballGrowthFactor * macro.preyGrowthFactor * preyMass), false); } else if (part === "bowels" && macro.assGrowthFactor > 0) { - preyMassBody = (1 - macro.assGrowthFactor) * macro.preyGrowthFactor * preyMass; - //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly - let preyMassPart = macro.assGrowthFactor * macro.preyGrowthFactor * preyMass; - - let oldAreaPart = macro.assArea; - - //this is a hack, but the commented out block below doesn't work - macro.assScale = (macro.assScale + (preyMassPart/macro.mass)); - - //This Code is broken and I dont know why: - //let radiusPart = Math.pow((macro.assArea/(4 * Math.PI)), 1/2); - //let volumeChangerPart = (preyMassPart + (((4 * Math.PI)/3) * Math.pow(radiusPart, 3) * macro.assDensity) / macro.assDensity); - ///volume=(mass1+mass2)/density. Mass2 is calcualted from volume*density this is modeling the ass as a sphere(2 hemispheres) - //let scaleChangerPart = ((Math.pow(((3/(4 * Math.PI)) * volumeChangerPart), 2/3) * 4 * Math.PI) / (macro.baseAssArea * Math.pow(macro.scale, 2))); - //macro.assScale = scaleChangerPart; - ///V=4/3((baseassArea*scale^2*AssScale)/4pi)^3/2 - - let newAreaPart = macro.assArea; - let deltaAreaPart = newAreaPart - oldAreaPart; - - update(["Power surges through you as your ass swells by " + length(deltaAreaPart, unit, false) + ".",newline]); + preyMassBody = (1 - macro.assGrowthFactor) * macro.preyGrowthFactor * preyMass; //if growth factor is greater than 1, this function will behave oddly + grow_ass((macro.assGrowthFactor * macro.preyGrowthFactor * preyMass), false); } else if (part === "breasts" && macro.breastGrowthFactor > 0) { - let preyMassBody = (1 - macro.breastGrowthFactor) * macro.preyGrowthFactor * preyMass; - //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly - let preyMassPart = macro.breastGrowthFactor * macro.preyGrowthFactor * preyMass; - - let oldMassPart = macro.breastMass; - let oldDiameterPart = macro.breastDiameter; - - let volumeChangerPart = (preyMassPart + macro.breastMass) / macro.breastDensity; - //volume=(mass1+mass2)/density. Mass2 is calcualted from volume*density - let scaleChangerPart = Math.pow((6 * volumeChangerPart/ Math.PI), 1/3) - macro.breastScale = scaleChangerPart/(macro.baseBreastDiameter * macro.scale); - // (6 * volume / pi)^1/3 = base ball diam * scale *ballScale - - let newMassPart = macro.breastMass; - let newDiameterPart = macro.breastDiameter; - - let deltaMassPart = newMassPart - oldMassPart; - let deltaDiameterPart = newDiameterPart - oldDiameterPart; - - update(["Power surges through you as your breasts swell by " + length(deltaDiameterPart, unit, false) + ", gaining " + mass(deltaMassPart, unit, false) + " of mass apiece.",newline]); + let preyMassBody = (1 - macro.breastGrowthFactor) * macro.preyGrowthFactor * preyMass; //if growth factor is greater than 1, this function will behave oddly + grow_breasts((macro.breastGrowthFactor * macro.preyGrowthFactor * preyMass), false); } else if (part === "womb") { if (macro.wombGrowthFactor > 0){ - preyMassBody = ((1 - macro.wombGrowthFactor) * macro.preyGrowthFactor * preyMass); - //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly - let preyMassPart = macro.wombGrowthFactor * macro.preyGrowthFactor * preyMass; - - let oldVolumeWomb = macro.wombVolume; - - let volumeChangerPart = ((macro.wombVolume * macro.wombDensity) + preyMassPart) / macro.wombDensity; - //mass = volume*density. Since we know what we want our mass to be, we can figure out how much volume the final tail should have - let scaleChangerPart = (volumeChangerPart/macro.baseWombVolume); - macro.wombScale = (Math.pow(scaleChangerPart, 1/3)/macro.scale); - // wombVolume = baseWombVolume * (wombScale * macro.scale)^3 - - let newVolumeWomb = macro.wombVolume; - let deltaVolumeWomb = newVolumeWomb - oldVolumeWomb; - - update(["Power surges through you as your womb grows larger, gaining " + volume(deltaVolumeWomb, unit, false) + " of capacity.",newline]); + preyMassBody = ((1 - macro.wombGrowthFactor) * macro.preyGrowthFactor * preyMass); //if growth factor is greater than 1, this function will behave oddly + grow_womb((macro.wombGrowthFactor * macro.preyGrowthFactor * preyMass), false); + } if (macro.vaginaGrowthFactor > 0){ - preyMassBody = ((1 - macro.vaginaGrowthFactor) * macro.preyGrowthFactor * preyMassBody); - //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly - let preyMassPart = macro.vaginaGrowthFactor * macro.preyGrowthFactor * preyMass; - - let oldLengthVagina = macro.vaginaLength; + preyMassBody = ((1 - macro.vaginaGrowthFactor) * macro.preyGrowthFactor * preyMassBody); //if growth factor is greater than 1, this function will behave oddly + grow_vagina((macro.vaginaGrowthFactor * macro.preyGrowthFactor * preyMass), false); + } + } else if (part === "paws" && macro.pawGrowthFactor > 0) { + preyMassBody = ((1 - macro.pawGrowthFactor) * macro.preyGrowthFactor * preyMassBody); // if growth factor is greater than 1, this function will behave oddly + grow_paws((macro.pawGrowthFactor * macro.preyGrowthFactor * preyMass), false); - let volumeChangerPart = ((macro.vaginaVolume * macro.wombDensity) + preyMassPart) / macro.wombDensity; - //mass = volume*density. Since we know what we want our mass to be, we can figure out how much volume the final tail should have - let scaleChangerPart = (volumeChangerPart/(Math.pow(macro.baseVaginaWidth, 2) * macro.baseVaginaLength)); - macro.vaginaScale = (Math.pow(scaleChangerPart, 1/3)/macro.scale); - // vaginaVolume = baseVaginaWidth^2 * baseVaginaLength * (vaginaScale * macro.scale)^3 + } else if (part === "souls" && macro.soulGrowthFactor > 0) { + preyMassBody = 0; //keeps body growth from running + grow((preyMass * macro.soulGrowthFactor), false); - let newLengthVagina = macro.vaginaLength; - let deltaLengthVagina = newLengthVagina - oldLengthVagina; + } else if (part === "goo" && macro.gooGrowthFactor > 0) { + preyMassBody = 0; //keeps body growth from running + grow((preyMass * macro.gooGrowthFactor), false); - update(["Power surges through you as your moist slit expands by by " + length(deltaLengthVagina, unit, false) + ".",newline]); - } - - } else if (part === "paws" && macro.pawGrowthFactor > 0) { - preyMassBody = ((1 - macro.vaginaGrowthFactor) * macro.preyGrowthFactor * preyMassBody); - //if you rewrite this function to incude multiple part growth based on a single action, this line will break | if growth factor is greater than 1, this function will behave oddly - let preyMassPart = macro.pawGrowthFactor * macro.preyGrowthFactor * preyMass; - - let oldAreaPart = macro.pawArea; - - let volumeChangerPart = (((Math.pow(macro.pawWidth, 2) * macro.pawLength * macro.pawDensity) + preyMassPart) / (3 *macro.pawDensity)); - //mass = volume*density. Since we know what we want our mass to be, we can figure out how much volume the final tail should have - let scaleChangerPart = ((3 * volumeChangerPart)/(Math.pow(macro.basePawWidth, 2) * macro.basePawLength)); - macro.pawScale = (Math.pow(scaleChangerPart, 1/3)/macro.scale); - // volume = 1/3 basewidth^2 * baselength *scale^3 *pawscale^3 - - let newAreaPart = macro.pawArea; - let deltaAreaPart = newAreaPart - oldAreaPart; - - update(["Power surges through you as your " + macro.footDesc(true) + " grow, gaining " + area(deltaAreaPart, unit, false) + " of area.",newline]); - - } else if (part === "souls") { - preyMassBody = 0; - if (macro.soulGrowthFactor > 0) { - - let oldHeight = macro.height; - let oldMass = macro.mass; - - let scaleChanger = ((macro.mass + (preyMass * macro.soulGrowthFactor)) / macro.baseMass); - //scale changer works because macro.mass = macro.baseMass * macro.scale^3 - macro.scale = Math.pow(scaleChanger, 1/3); - let newHeight = macro.height; - let newMass = macro.mass; - let deltaHeight = newHeight - oldHeight; - let deltaMass = newMass - oldMass; - - update(["Power surges through you as you grow " + length(deltaHeight, unit, false) + " taller and gain " + mass(deltaMass, unit, false) + " of mass.",newline]); - } - } else if (part === "goo") { - preyMassBody = 0; - if (macro.gooGrowthFactor > 0) { - let oldHeight = macro.height; - let oldMass = macro.mass; - - let scaleChanger = ((macro.mass + (preyMass * macro.gooGrowthFactor)) / macro.baseMass); - //scale changer works because macro.mass = macro.baseMass * macro.scale^3 - macro.scale = Math.pow(scaleChanger, 1/3); - let newHeight = macro.height; - let newMass = macro.mass; - let deltaHeight = newHeight - oldHeight; - let deltaMass = newMass - oldMass; - - update(["Power surges through you as you grow " + length(deltaHeight, unit, false) + " taller and gain " + mass(deltaMass, unit, false) + " of mass.",newline]); - } //Body, runs after organ specific growth so organ specific growth factor kicks in. Doesn't run after goo or soul related growth } if (preyMassBody > 0){ - let oldHeight = macro.height; - let oldMass = macro.mass; - - let scaleChanger = ((macro.mass + preyMassBody) / macro.baseMass); - //scale changer works because macro.mass = macro.baseMass * macro.scale^3 - macro.scale = Math.pow(scaleChanger, 1/3); - let newHeight = macro.height; - let newMass = macro.mass; - let deltaHeight = newHeight - oldHeight; - let deltaMass = newMass - oldMass; - - update(["Power surges through you as you grow " + length(deltaHeight, unit, false) + " taller and gain " + mass(deltaMass, unit, false) + " of mass.",newline]); - } - } + grow(preyMassBody, false); + } + } } //Manual Growth @@ -4401,132 +4239,201 @@ function grow_pick(times) { case "slit": grow_vagina(times); break; case "womb": grow_womb(times); break; case "breasts": grow_breasts(times); break; + case "wings": grow_wings(times); break; } } } -function grow(factor=1) -{ +function grow(factor=1, simpleCalc=true){ let oldHeight = macro.height; let oldMass = macro.mass; - macro.scale *= factor; - - let newHeight = macro.height; - let newMass = macro.mass; - - let heightDelta = newHeight - oldHeight; - let massDelta = newMass - oldMass; + if (simpleCalc == true){ + macro.scale *= factor; +} else { + macro.scale = Math.pow(((macro.mass + factor) / macro.baseMass), 1/3); + } - let heightStr = length(heightDelta, unit); - let massStr = mass(massDelta, unit); + let heightDelta = macro.height - oldHeight; + let massDelta = macro.mass - oldMass; - update(["Power surges through you as you grow " + heightStr + " taller and gain " + massStr + " of mass.",newline]); + update(["Power surges through you as you grow " + length(heightDelta, unit) + " taller and gain " + mass(massDelta, unit) + " of mass.",newline]); } -function grow_paws(factor) -{ +function grow_paws(factor, simpleCalc=true){ let oldArea = macro.pawArea; - macro.pawScale *= factor; + if (simpleCalc == true){ + macro.pawScale *= factor; +} else { + let volumeChangerPart = (((Math.pow(macro.pawWidth, 2) * macro.pawLength * macro.pawDensity) + factor) / (3 *macro.pawDensity)); + //mass = volume*density. Since we know what we want our mass to be, we can figure out how much volume the final paw should have + let scaleChangerPart = ((3 * volumeChangerPart)/(Math.pow(macro.basePawWidth, 2) * macro.basePawLength)); + macro.pawScale = (Math.pow(scaleChangerPart, 1/3)/macro.scale); + // volume = 1/3 basewidth^2 * baselength *scale^3 *pawscale^3 + } let areaDelta = macro.pawArea - oldArea; - let areaStr = area(areaDelta, unit, false); - - update(["Power surges through you as your " + macro.footDesc(true) + " grow, gaining " + areaStr + " of area.",newline]); + update(["Power surges through you as your " + macro.footDesc(true) + " grow, gaining " + area(areaDelta, unit, false) + " of area.",newline]); } -function grow_tail(factor) -{ +function grow_tail(factor, simpleCalc=true) { let oldLength = macro.tailLength; let oldMass = macro.tailMass; - macro.tailScale *= factor; + if (simpleCalc == true){ + macro.tailScale *= factor; +} else { + let volumeChangerPart = (macro.tailMass + (factor/macro.tailCount)) / macro.tailDensity; + let scaleChangerPart = (volumeChangerPart/((Math.pow(macro.baseTailDiameter/2, 2)) * Math.PI * macro.baseTailLength * (Math.pow(macro.scale, 3)))); + macro.tailScale = Math.pow(scaleChangerPart, 1/3); + // (tailVolume/((macro.baseTailDiameter/2)^2 * Math.PI * macro.baseTailLength * macro.scale^3)) = macro.tailScale^3 + } let lengthDelta = macro.tailLength - oldLength; let massDelta = macro.tailMass - oldMass; + update(["Power surges through you as your " + macro.tailType + " tail grows " + length(lengthDelta, unit, false) + " longer and gains " + mass(massDelta, unit, false) + " of mass.",newline]); } -function grow_dick(factor) -{ +function grow_dick(factor, simpleCalc=true) { let oldLength = macro.dickLength; let oldMass = macro.dickMass; - macro.dickScale *= factor; + if (simpleCalc == true){ + macro.dickScale *= factor; +} else { + let volumeChangerPart = ((macro.dickMass + factor) / macro.dickDensity); + let scaleChangerPart = (volumeChangerPart /( Math.pow(macro.baseDickDiameter/2, 2) *Math.PI * Math.pow(macro.scale, 3) * macro.baseDickLength * Math.pow(macro.arousalDickFactor, 3))); + macro.dickScale = Math.pow(scaleChangerPart, 1/3); + // dickScale^3 = volume/ pi * baseDickRadius^2 * macro.scale^3 * baseDickLength * arousalDickFactor^3 + } let lengthDelta = macro.dickLength - oldLength; let massDelta = macro.dickMass - oldMass; + update(["Power surges through you as your " + macro.dickType + " cock grows " + length(lengthDelta, unit, false) + " longer and gains " + mass(massDelta, unit, false) + " of mass.",newline]); } -function grow_balls(factor) -{ +function grow_balls(factor, simpleCalc=true) { let oldDiameter = macro.ballDiameter; let oldMass = macro.ballMass; - macro.ballScale *= factor; + if (simpleCalc == true){ + macro.ballScale *= factor; +} else { + let volumeChangerPart = (macro.ballMass + factor) / macro.ballDensity; + let scaleChangerPart = Math.pow((6 * volumeChangerPart/ Math.PI), 1/3) + macro.ballScale = scaleChangerPart/(macro.baseBallDiameter * macro.scale); + // (6 * volume / pi)^1/3 = base ball diam * scale *ballScale + } let diameterDelta = macro.ballDiameter - oldDiameter; let massDelta = macro.ballMass - oldMass; + update(["Power surges through you as your balls swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece.",newline]); } -function grow_breasts(factor) -{ +function grow_breasts(factor, simpleCalc=true) { let oldDiameter = macro.breastDiameter; let oldMass = macro.breastMass; - macro.breastScale *= factor; + if (simpleCalc == true){ + macro.breastScale *= factor; +} else { + let volumeChangerPart = (factor + macro.breastMass) / macro.breastDensity; + let scaleChangerPart = Math.pow((6 * volumeChangerPart/ Math.PI), 1/3) + macro.breastScale = scaleChangerPart/(macro.baseBreastDiameter * macro.scale); + // (6 * volume / pi)^1/3 = base ball diam * scale * ballScale + } let diameterDelta = macro.breastDiameter - oldDiameter; let massDelta = macro.breastMass - oldMass; + update(["Power surges through you as your breasts swell by " + length(diameterDelta, unit, false) + ", gaining " + mass(massDelta, unit, false) + " of mass apiece.",newline]); } -function grow_vagina(factor) -{ +function grow_vagina(factor, simpleCalc=true) { let oldLength = macro.vaginaLength; - macro.vaginaScale *= factor; + if (simpleCalc == true){ + macro.vaginaScale *= factor; +} else { + let volumeChangerPart = ((macro.vaginaVolume * macro.wombDensity) + factor) / macro.wombDensity; + let scaleChangerPart = (volumeChangerPart/(Math.pow(macro.baseVaginaWidth, 2) * macro.baseVaginaLength)); + macro.vaginaScale = (Math.pow(scaleChangerPart, 1/3)/macro.scale); + //vaginaVolume = baseVaginaWidth^2 * baseVaginaLength * (vaginaScale * macro.scale)^3 + } let lengthDelta = macro.vaginaLength - oldLength; update(["Power surges through you as your moist slit expands by by " + length(lengthDelta, unit, false) + ".",newline]); } -function grow_womb(factor) -{ +function grow_womb(factor, simpleCalc=true) { let oldVolume = macro.wombVolume; - macro.wombScale *= factor; + if (simpleCalc == true){ + macro.wombScale *= factor; +} else { + let volumeChangerPart = ((macro.wombVolume * macro.wombDensity) + factor) / macro.wombDensity; + let scaleChangerPart = (volumeChangerPart/macro.baseWombVolume); + macro.wombScale = (Math.pow(scaleChangerPart, 1/3)/macro.scale); + //wombVolume = baseWombVolume * (wombScale * macro.scale)^3 + } let volumeDelta = macro.wombVolume - oldVolume; update(["Power surges through you as your womb grows larger, gaining " + volume(volumeDelta, unit, false) + " of capacity.",newline]); } - -function grow_ass(factor) -{ +function grow_ass(factor, simpleCalc=true) { let oldDiameter = Math.pow(macro.assArea,1/2); - macro.assScale *= factor; + if (simpleCalc == true){ + macro.assScale *= factor; +} else { + macro.assScale = (macro.assScale + (factor/macro.mass)); //this is a hack, but the commented out block below doesn't work + + //This Code is broken and I dont know why: + //let radiusPart = Math.pow((macro.assArea/(4 * Math.PI)), 1/2); + //let volumeChangerPart = (preyMassPart + (((4 * Math.PI)/3) * Math.pow(radiusPart, 3) * macro.assDensity) / macro.assDensity); + //volume=(mass1+mass2)/density. Mass2 is calcualted from volume*density this is modeling the ass as a sphere(2 hemispheres) + //let scaleChangerPart = ((Math.pow(((3/(4 * Math.PI)) * volumeChangerPart), 2/3) * 4 * Math.PI) / (macro.baseAssArea * Math.pow(macro.scale, 2))); + //macro.assScale = scaleChangerPart; + //V=4/3((baseassArea*scale^2*AssScale)/4pi)^3/2 + } let diameterDelta = Math.pow(macro.assArea,1/2) - oldDiameter; + update(["Power surges through you as your ass swells by " + length(diameterDelta, unit, false) + ".",newline]); } +function grow_wings(factor, simpleCalc=true){ + + let oldLength = macro.wingLength; + + if (simpleCalc == true){ + macro.pawScale *= factor; +} else { + macro.wingScale = (macro.wingScale + (factor/macro.mass)) + } + + let lengthDelta = macro.wingLength - oldLength; + + update(["Power surges through you as your " + macro.wingDesc(true) + " grow, gaining " + length(2 * lengthDelta, unit, false) + " of wingspan.",newline]); +} + function resetSettings() { document.forms.namedItem("custom-species-form").reset(); updateAllPreviews(); From adc7915b0c6b5f7f28b9e9dd295bcaeb50f4a7c0 Mon Sep 17 00:00:00 2001 From: jsb5468 Date: Sat, 9 Mar 2019 21:03:38 -0500 Subject: [PATCH 5/5] More interactions fixed interaction with eating car, added chewing car custom text, added custom text for stomping parking garage, added eating macro custom text, fixed text errors in anal vore business text,added teethDesc to help with chewing text --- game.js | 13 +++++++++++++ recursive-desc.js | 41 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/game.js b/game.js index bc9dca7..9237f70 100644 --- a/game.js +++ b/game.js @@ -298,6 +298,19 @@ let macro = } return capital ? result.charAt(0).toUpperCase() + result.slice(1) : result; }, + "teethDesc": function(plural=false,capital=false) { + let result = ""; + + switch(this.jawType) { + case "jaw": + result = plural ? "fangs" : "fang"; + break; + case "beak": + result = "beak"; + break; + } + return capital ? result.charAt(0).toUpperCase() + result.slice(1) : result; + }, get preyGrowthFactor() { if (macro.growthScaleWithSize) { diff --git a/recursive-desc.js b/recursive-desc.js index 8ecbd4e..9f6526d 100644 --- a/recursive-desc.js +++ b/recursive-desc.js @@ -1929,12 +1929,21 @@ rules["eat"].push({ rules["eat"].push({ "test": function(container, macro) { - return hasOnly(container, ["Person","Car"]) && - hasExactly(container, "Car", 1) && - hasLessThan(container, "Person", 5); + return hasExactly(container, "Car", 1); }, "desc": function(container, macro, verbose, flat) { - return "You crush " + container.contents["Car"].describe() + " with your tight throat, washing it down with " + container.contents["Person"].describe(); + return "You crush " + container.describe(verbose) + " with your tight throat, washing it down with its former passengers." + } +}); + +rules["eat"].push({ + "test": function(container, macro) { + return hasExactly(container, "Macro", 1) && + nothingLarger(container, "Macro"); + }, + "desc": function(container, macro, verbose, flat) { + return "You spot a smaller macro " + ("staring up at you in awe"||"terrorizing the area"||"running from you"||"that is unaware of your presence") + " and decide it will make a suitable meal. You grab them and stuff them into your " + macro.jawDesc(true) + ". As you slurp\ + them down, you feel them " + ("catch in your throat for a brief moment before being swallowed"||"grab at your tounge for purchase before going down your throat"||"breifly struggle, then go limp"||"pound on the indside of your throat") + ". "; } }); @@ -1992,6 +2001,18 @@ rules["chew"].push({ caught between two fingers and popped back in to be crunched between molars and swallowed."; } }); + +rules["chew"].push({ + "test": function(container, macro) { + return hasExactly(container, "Car", 1); + }, + "desc": function(container, macro, verbose, flat) { + return "You lean down and open your " + macro.jawDesc(true) + " wide, catching "+ container.describe(verbose) + ". Holding onto the car with only your " + macro.teethDesc(true) + ", you tilt your head back, opening wider \ + to let the vehicle fall further your mouth, Once the car settles, you start slowly closing your jaw, feeling glass shatter, metal grind, and tires burst as those trapped inside try to escape. Every time your chew you feel your \ + " + macro.teethDesc(true) + " " + macro.biteDesc(false) + " the vehicle into a smaller and smaller lump. After you are satisfied, you tilt your head back and swallow the debries in a single fluid gulp."; + } +}); + // STOMPING rules["stomp"].push({ @@ -2065,6 +2086,16 @@ rules["stomp"].push({ } }); +rules["stomp"].push({ + "test": function(container, macro) { + return hasExactly(container, "Parking Garage", 1) && + nothingLarger(container, "Parking Garage"); + }, "desc": function(container, macro, verbose, flat) { + return ("You bring your " + macro.footDesc() + " down on "||"You kick your " + macro.footDesc() + " through ") + container.describe(verbose) +" collapsing the structure and setting off car alarms. As the alarms blare, you reposition your " + macro.footDesc() + + " over the structure, and slam it down; silencing the alarms, and completely demolishing the building."; + } +}); + // ANAL VORE @@ -2106,7 +2137,7 @@ rules["anal-vore"].push({ hasOnly(container, ["Business"]); }, "desc": function(container, macro, verbose, flat) { return "You set your weighty rump down on " + container.describe() + " and feel it penerate your hole. Once your weight has settled you clench your sphincter, seperating the building from its foundations with a crCraCHH \ -and pulling it off the groud and inside of your ass. You feel the immense pressure of your anal cavity slowly crushing the building, bringing newfound pleasure with every shift and temour within the structure."; + pulling it off the groud and inside of your ass. You feel the immense pressure of your anal cavity slowly crushing the building, bringing newfound pleasure with every shift and tremour within the structure."; } });