rules = {}; rules["eat"] = []; rules["stomp"] = []; rules["kick"] = []; rules["anal-vore"] = []; rules["ass-crush"] = []; rules["breast-crush"] = []; rules["unbirth"] = []; rules["cock-vore"] = []; rules["cockslap"] = []; rules["ball-smother"] = []; rules["male-orgasm"] = []; rules["female-orgasm"] = []; function hasNothing(container, thing, amount) { for (var key in container.contents) { if (container.contents.hasOwnProperty(key)) return false; } return true; } function hasLessThan(container, thing, amount) { if (container.contents.hasOwnProperty(thing)) if (container.contents[thing].count < amount && container.contents[thing].count > 0) return true; return false; } function hasExactly(container, thing, amount) { if (!container.contents.hasOwnProperty(thing) && amount == 0) return true; if (container.contents.hasOwnProperty(thing) && container.contents[thing].count == amount) return true; return false; } function hasOnly(container, things) { for (var key in container.contents) { if (container.contents.hasOwnProperty(key)) if (!things.includes(key)) return false; } for (var i=0; i 0) return options[0](container, macro); else { return describeDefault(action, container, macro, verbose); } } function describeDefault(action, container, macro, verbose=true) { switch(action) { case "eat": return "You scoop up " + container.describe(verbose) + " and swallow " + (container.count > 1 ? "them" : "it") + " whole."; case "stomp": return "You crush " + container.describe(verbose) + " underfoot."; case "kick": return "You punt " + container.describe(verbose) + ", destroying " + (container.count > 1 ? "them" : "it") + "."; case "anal-vore": return "You sit yourself down on " + container.describe(verbose) + ". " + (container.count > 1 ? "They slide" : "It slides") + " inside with ease."; case "ass-crush": return "Your heavy ass obliterates " + container.describe(verbose) + ". "; case "breast-crush": return "Your heavy breasts obliterate " + container.describe(verbose) + ". "; case "unbirth": return "You gasp as you slide " + container.describe(verbose) + " up your slit. "; case "cock-vore": return "You stuff " + container.describe(verbose) + " into your throbbing shaft, forcing them down to your heavy balls."; case "cockslap": return "Your swaying shaft crushes " + container.describe(verbose) + ". "; case "ball-smother": return "Your weighty balls spread over " + container.describe(verbose) + ", smothering them in musk."; case "male-orgasm": return "You're cumming! Your thick cock spurts out $VOLUME of seed, splooging " + container.describe(verbose) + "."; case "female-orgasm": return "You're cumming! Your moist slit sprays $VOLUME of slick femcum, splooging " + container.describe(verbose) + "."; } } // EATING rules["eat"].push({ "test": function(container, macro) { return hasNothing(container); }, "desc": function(container, macro) { return "You scoop up...nothing. Oh well."; } }); rules["eat"].push({ "test": function(container, macro) { return hasOnly(container, ["Person"]) && hasLessThan(container, "Person", 6) && macro.height >= 10; }, "desc": function(container, macro) { return "You pluck up the " + container.describe() + " and stuff them into your mouth, swallowing lightly to drag them down to your bubbling guts."; } }); rules["eat"].push({ "test": function(container, macro) { return hasOnly(container, ["Person"]) && hasExactly(container, "Person", 1) && macro.height < 10; }, "desc": function(container, macro) { return "You grasp " + container.describe() + " and greedily wolf them down, swallowing forcefully to cram them into your bulging stomach. A crass belch escapes your lips as they curl up in your slimy gut."; } }) rules["eat"].push({ "test": function(container, macro) { return hasOnly(container, ["Person","Car"]) && hasExactly(container, "Car", 1) && hasLessThan(container, "Person", 5); }, "desc": function(container, macro) { return "You crush the " + container.contents["Car"].describe() + " with your tight throat, washing it down with " + container.contents["Person"].describe(); } })