From da14de08b6377b8864bde9c1bcb5148773749cdc Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Thu, 24 May 2018 08:44:02 -0400 Subject: [PATCH] Added melting logic, fixed summarize showing 0 kill --- game.js | 83 +++++++++++++++++++++++++++++++++++++++++++++-- recursive-desc.js | 17 +++++++++- stroll.html | 14 ++++++-- 3 files changed, 108 insertions(+), 6 deletions(-) diff --git a/game.js b/game.js index bad07fc..6357da3 100644 --- a/game.js +++ b/game.js @@ -785,6 +785,49 @@ let macro = "stages" : 2 }, + "gooEnabled": true, + "gooMolten": false, + + "goo": { + "name" : "goo", + "setup": function(owner) { + this.owner = owner; + for (let i = 0; i < this.stages; i++) + this.contents.push(new Container()); + owner.digest(owner,this); + }, + "feed": function(prey) { + this.feedFunc(prey,this,this.owner); + }, + "feedFunc": function(prey,self,owner) { + this.contents[0] = this.contents[0].merge(prey); + }, + "describeDigestion": function(container) { + return describe("goo",container,this.owner,verbose); + }, + "fill": function(owner,container) { + + }, + get description() { + let prey = new Container(); + this.contents.forEach(function(x) { + prey = prey.merge(x); + }); + + if (prey.count == 0) { + return "You contain no prey."; + } else { + if (macro.gooDigestion > 0) { + return "Your gooey body contains " + prey.describe(false) + ", gradually absorbing them into your bulk."; + } else { + return "Your gooey body contains " + prey.describe(false) + "."; + } + } + }, + "contents" : [], + "stages" : 4 + }, + // holding spots hasPouch: true, @@ -1487,11 +1530,11 @@ function summarize(sum, fatal = true) let word; let count = get_living_prey(sum); if (fatal && macro.brutality > 0) - word = count > 1 ? "kills" : "kill"; + word = count == 1 ? "kills" : "kill"; else if (!fatal && macro.brutality > 0) word = "prey"; else - word = count > 1 ? "victims" : "victim"; + word = count == 1 ? "victims" : "victim"; return "(" + count + " " + word + ")"; } @@ -2820,6 +2863,42 @@ function scat(vol) { macro.arouse(50); } +function melt() +{ + macro.gooMolten = true; + + let line = describe("melt", new Container(), macro, verbose); + + update([line, newline]); +} + +function solidify() +{ + let prey = new Container(); + macro.goo.contents.forEach(function(x) { + prey = prey.merge(x); + }); + + let line = describe("solidify", prey, macro, verbose); + + let linesummary = summarize(prey.sum(), true); + + let people = get_living_prey(prey.sum()); + + let preyMass = prey.sum_property("mass"); + + let sound = getSound("insert",preyMass); + + macro.gooMolten = false; + + if (macro.gooDigest) { + update([sound, line, linesummary, newline]); + } else { + update([sound, line, newline]); + } +} + + function transformNumbers(line) { return line.toString().replace(/[0-9]+(\.[0-9]+)?(e\+[0-9]+)?/g, function(text) { return number(text, numbers); }); diff --git a/recursive-desc.js b/recursive-desc.js index 11a5ec2..5179897 100644 --- a/recursive-desc.js +++ b/recursive-desc.js @@ -23,7 +23,7 @@ var actions = ["eat","chew","stomp","stomp-wedge","flex-toes","kick","anal-vore" "female-orgasm","grind","pouch-stuff","pouch-rub","pouch-eat","pouch-absorb","soul-vore","soul-absorb-paw", "paw-stench","ass-stench","belch","fart","stomach","womb","balls","bowels","bowels-to-stomach","breasts","bladder","soul-digest", "wear-shoe","remove-shoe","wear-sock","remove-sock","stuff-shoe","dump-shoe","stuff-sock","dump-sock","piss","bladder-vore","scat", -"sheath-toy","slit-toy","breast-toy",""]; +"sheath-toy","slit-toy","breast-toy","melt","solidify"]; for (let i=0; i 0) { + return "Your body turns solid, pushing out " + container.describe(verbose); + } else { + return "Your body turns solid, swiftly absorbing" + container.describe(verbose); + } +} + + // EATING rules["eat"].push({ diff --git a/stroll.html b/stroll.html index 975756c..4e438a7 100644 --- a/stroll.html +++ b/stroll.html @@ -270,9 +270,11 @@

Stroll is a text-based macro game. Stomp things, eat things, abuse things - then grow larger and do it all over again.

-

Build your Character (leave blank for reasonable normal-scale defaults)

+

Build your Character

+

Leave a box empty for a sane default value

Lengths in meters, areas in square meters, masses in kilograms

-

Click on highlight/darkened titles to enable and disabled features.

+

(but you can preview the customary value)

+

Click on highlight/darkened titles to enable and disable features.

@@ -875,7 +877,13 @@
- + +
+
  • + + +
  • +