| @@ -4,8 +4,8 @@ var scale = 1; | |||||
| var strolling = false; | var strolling = false; | ||||
| var stomachDigesting = 0; | |||||
| var bowelsDigesting = 0; | |||||
| var maxStomachDigest = 10; | |||||
| var maxBowelsDigest = 10; | |||||
| victims = {}; | victims = {}; | ||||
| @@ -102,11 +102,9 @@ function feed() | |||||
| stomach.push(prey); | stomach.push(prey); | ||||
| if (stomachDigesting == 0) | |||||
| if (stomach.length == 1) | |||||
| setTimeout(function() { doDigest("stomach"); }, 15000); | setTimeout(function() { doDigest("stomach"); }, 15000); | ||||
| ++stomachDigesting; | |||||
| updateVictims("stomach",prey); | updateVictims("stomach",prey); | ||||
| update([line]); | update([line]); | ||||
| } | } | ||||
| @@ -135,11 +133,9 @@ function anal_vore() | |||||
| bowels.push(prey); | bowels.push(prey); | ||||
| if (bowelsDigesting == 0) | |||||
| if (bowels.length == 1) | |||||
| setTimeout(function() { doDigest("bowels"); }, 15000); | setTimeout(function() { doDigest("bowels"); }, 15000); | ||||
| ++bowelsDigesting; | |||||
| updateVictims("bowels",prey); | updateVictims("bowels",prey); | ||||
| update([line]); | update([line]); | ||||
| } | } | ||||
| @@ -212,14 +208,14 @@ function grow() | |||||
| function doDigest(containerName) | function doDigest(containerName) | ||||
| { | { | ||||
| var digestType = containerName == "stomach" ? stomach : bowels; | var digestType = containerName == "stomach" ? stomach : bowels; | ||||
| var count = 0; | |||||
| var count = 0 | |||||
| if (containerName == "stomach") { | if (containerName == "stomach") { | ||||
| count = stomachDigesting; | |||||
| stomachDigesting = 0; | |||||
| count = stomach.length; | |||||
| count = Math.min(count,maxStomachDigest); | |||||
| } else if (containerName == "bowels") { | } else if (containerName == "bowels") { | ||||
| count = bowelsDigesting; | |||||
| bowelsDigesting = 0; | |||||
| count = bowels.length; | |||||
| count = Math.min(count,maxBowelsDigest); | |||||
| } | } | ||||
| var container = new Container(); | var container = new Container(); | ||||
| @@ -246,6 +242,11 @@ function doDigest(containerName) | |||||
| else if (containerName == "bowels") | else if (containerName == "bowels") | ||||
| update(["Your bowels churn as they absorb " + container.describe() + " " + summarize(container.sum())]); | update(["Your bowels churn as they absorb " + container.describe() + " " + summarize(container.sum())]); | ||||
| if (digestType.length > 0) { | |||||
| setTimeout(function() { | |||||
| doDigest(containerName); | |||||
| }, 15000); | |||||
| } | |||||
| } | } | ||||
| window.addEventListener('load', function(event) { | window.addEventListener('load', function(event) { | ||||