Browse Source

Added magic + shrinking

tags/v0.7.4
Fen Dweller 7 years ago
parent
commit
fce4b1dac9
4 changed files with 60 additions and 3 deletions
  1. +38
    -1
      game.js
  2. +5
    -1
      recursive-desc.js
  3. +3
    -1
      sounds.js
  4. +14
    -0
      stroll.html

+ 38
- 1
game.js View File

@@ -1276,7 +1276,7 @@ let macro =


if (this.orgasm) if (this.orgasm)
amount /= 5; amount /= 5;
this.arousal += amount * this.arousalFactor; this.arousal += amount * this.arousalFactor;


if (this.arousal >= 200) { if (this.arousal >= 200) {
@@ -1558,6 +1558,11 @@ let macro =
return length(this.vaginaLength, unit, true) + " long " + state; return length(this.vaginaLength, unit, true) + " long " + state;
}, },


"droolEnabled": false,

"magicEnabled": false,
"shrunkPrey": null,

"growthPoints": 0, "growthPoints": 0,


// 0 = entirely non-fatal // 0 = entirely non-fatal
@@ -1690,6 +1695,9 @@ function summarize(sum, fatal = true)


function getOnePrey(biome, area, sameSize = true) function getOnePrey(biome, area, sameSize = true)
{ {
if (macro.shrunkPrey != null) {
return getPrey(biome, area, sameSize);
}
let weights = getWeights(biome, area); let weights = getWeights(biome, area);


let potential = []; let potential = [];
@@ -1786,6 +1794,11 @@ function getWeights(region, area) {


function getPrey(region, area, sameSize = false) function getPrey(region, area, sameSize = false)
{ {
if (macro.shrunkPrey != null) {
let prey = macro.shrunkPrey;
macro.shrunkPrey = null;
return prey;
}
let weights = getWeights(region, area); let weights = getWeights(region, area);


var prey = fill_area(area,weights); var prey = fill_area(area,weights);
@@ -3699,6 +3712,25 @@ function breath_cone() {
update(["You prepare to exhale a broad cone of breath!",newline]); update(["You prepare to exhale a broad cone of breath!",newline]);
} }


function magic_shrink()
{
let prey = new Container();

prey = getPrey(biome, macro.height * macro.height * 100, true);

macro.shrunkPrey = prey;
macro.shrunkPrey.mass /= 1000000;

let line = describe("magic-shrink", prey, macro, false);
let linesummary = summarize(prey.sum(), false);
let preyMass = prey.sum_property("mass");
let sound = getSound("magic", preyMass);

update([sound, line, linesummary, newline]);

return;
}

function cooldown_start(name) { function cooldown_start(name) {
let button = document.querySelector("#" + "button-action-" + name); let button = document.querySelector("#" + "button-action-" + name);
let parent = button.parentElement; let parent = button.parentElement;
@@ -4183,6 +4215,11 @@ function startGame(e) {
enable_victim("drool","Drenched in drool"); enable_victim("drool","Drenched in drool");
} }


if (macro.magicEnabled) {
enable_panel("magic");
enable_button("magic_shrink");
}

if (macro.arousalEnabled) { if (macro.arousalEnabled) {
document.querySelector("#arousalMeter").style.display = 'inline-block'; document.querySelector("#arousalMeter").style.display = 'inline-block';
document.querySelector("#orgasmMeter").style.display = 'inline-block'; document.querySelector("#orgasmMeter").style.display = 'inline-block';


+ 5
- 1
recursive-desc.js View File

@@ -31,7 +31,7 @@ var actions = ["eat","chew","vomit","stomp","stomp-wedge","flex-toes","kick","an
"sheath-toy","slit-toy","breast-toy","melt","solidify","flood","stomp-goo","goo-digest","ass-goo","goo-stomach-pull","goo-stomach-push", "sheath-toy","slit-toy","breast-toy","melt","solidify","flood","stomp-goo","goo-digest","ass-goo","goo-stomach-pull","goo-stomach-push",
"goo-bowels-pull","goo-bowels-push","goo-womb-pull","goo-womb-push","goo-balls-pull","goo-balls-push","goo-breasts-pull","goo-breasts-push", "goo-bowels-pull","goo-bowels-push","goo-womb-pull","goo-womb-push","goo-balls-pull","goo-balls-push","goo-breasts-pull","goo-breasts-push",
"goo-tail-pull","goo-tail-push","goo-paws-pull","goo-paws-push","paw-vore","paw-vore-toes","paws","crop-swallow","crop-transfer", "goo-tail-pull","goo-tail-push","goo-paws-pull","goo-paws-push","paw-vore","paw-vore-toes","paws","crop-swallow","crop-transfer",
"breath-fire","breath-ice","breath-electric","breath-smoke","breath-radiation","breath-foul","drool"];
"breath-fire","breath-ice","breath-electric","breath-smoke","breath-radiation","breath-foul","drool","magic-shrink","magic-hypnotize"];


for (let i=0; i<actions.length; i++) { for (let i=0; i<actions.length; i++) {
rules[actions[i]] = []; rules[actions[i]] = [];
@@ -1113,6 +1113,10 @@ function defaultDrool(container, macro, verbose) {
return "$VOLUME of your drool rains down from your " + macro.jawDesc(true) + ", washing over " + container.describe(verbose) + "."; return "$VOLUME of your drool rains down from your " + macro.jawDesc(true) + ", washing over " + container.describe(verbose) + ".";
} }


function defaultMagicShrink(container, macro, verbose) {
return "You envelop " + container.describe(verbose) + " in swirling tendrils of magic, shrinking " + (container.count == 1 ? "it" : "them") + " down!";
}



// EATING // EATING




+ 3
- 1
sounds.js View File

@@ -20,7 +20,9 @@ let sounds = {
"breath": "breath":
[["Woosh."],["Fwoosh."],["FWOOSH."],["FWOOSH!"],["FWOOOOOOSH!"]], [["Woosh."],["Fwoosh."],["FWOOSH."],["FWOOSH!"],["FWOOOOOOSH!"]],
"chew": "chew":
[["Snap.", "Crack."],["Crunch."],["Crack!"],["CRUNCH!"],["CRRRUNCH!"]]
[["Snap.", "Crack."],["Crunch."],["Crack!"],["CRUNCH!"],["CRRRUNCH!"]],
"magic":
[["Zap."],["Zap!"],["Fwoosh!"]]
}; };


function pickByMass(name, mass) { function pickByMass(name, mass) {


+ 14
- 0
stroll.html View File

@@ -210,6 +210,7 @@
<button class="action-part-button" id="action-part-shoes">Shoes</button> <button class="action-part-button" id="action-part-shoes">Shoes</button>
<button class="action-part-button" id="action-part-waste">Waste</button> <button class="action-part-button" id="action-part-waste">Waste</button>
<button class="action-part-button" id="action-part-goo">Goo</button> <button class="action-part-button" id="action-part-goo">Goo</button>
<button class="action-part-button" id="action-part-magic">Magic</button>
<button class="action-part-button" id="action-part-misc">Misc</button> <button class="action-part-button" id="action-part-misc">Misc</button>
<button class="action-part-button" id="action-part-breath">Breath</button> <button class="action-part-button" id="action-part-breath">Breath</button>
<button class="action-part-button" id="action-part-options">Options</button> <button class="action-part-button" id="action-part-options">Options</button>
@@ -339,6 +340,11 @@
<button class="action-button" id="button-action-breath_foul">Foul</button> <button class="action-button" id="button-action-breath_foul">Foul</button>
</div> </div>


<div class="action-tab" id="actions-magic">
<button class="action-button" id="button-action-magic_shrink">Shrink</button>
<button class="action-button" id="button-action-magic_hypnotize">Hypnotize</button>
</div>

<div class="action-tab" id="actions-options"> <div class="action-tab" id="actions-options">
<button class="stat-button" id="button-arousal">Arousal On</button> <button class="stat-button" id="button-arousal">Arousal On</button>
<button class="stat-button" id="button-stroll">Status: Standing</button> <button class="stat-button" id="button-stroll">Status: Standing</button>
@@ -1132,6 +1138,14 @@
</li> </li>
</div> </div>
</div> </div>

<div class="custom-category">
<input autocomplete="off" class="custom-header-checkbox" type="checkbox" id="magicEnabled" name="magicEnabled" />
<label class="custom-header" for="magicEnabled">Magic</label>
<div class="reveal-if-active">

</div>
</div>
</ul> </ul>
</form> </form>
</div> </div>


Loading…
Cancel
Save