From 804e2ff4ea03f89287587a0aafd1a7b0a72b4091 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sat, 21 Dec 2019 12:37:58 -0500 Subject: [PATCH] Fix descriptions ignoring verbosity settings. Add some new species and vore text --- recursive-desc.js | 15 +++++++++++---- recursive-macro.js | 4 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/recursive-desc.js b/recursive-desc.js index 977f072..6f3a3fc 100644 --- a/recursive-desc.js +++ b/recursive-desc.js @@ -132,10 +132,10 @@ function describe(action, container, macro, verbose=true, flat=false, extra1=0) if (options.length > 0 && Math.random() > (1 / (2 + rules[action].length))) { let choice = Math.floor(Math.random() * options.length); - return options[choice](container, macro, extra1); + return options[choice](container, macro, verbose, flat, extra1); } else { - return getDefault(action)(container, macro, extra1); + return getDefault(action)(container, macro, verbose, flat, extra1); } } @@ -151,10 +151,11 @@ function pickString(...array){ // DEFAULTS function defaultEat(container, macro, verbose, flat) { + console.log(verbose); if (container.count == 0) return "You reach down for a delicious treat and grab - oh, nothing."; else - return [ + return pickString([ "You", pickString("snatch up", "grab", "pluck up", "seize", "catch"), container.describe(verbose) + ",", @@ -162,7 +163,13 @@ function defaultEat(container, macro, verbose, flat) { pickString("swallow", "devour", "consume"), (container.count > 1 ? "them" : "it"), "whole." - ].join(" "); + ], [ + "Your maw envelops", + container.describe(verbose), + "in a tight embrace of flesh.", + (container.count > 1 ? "They sink" : "Your victim sinks"), + "down deep with a little gulp." + ]).join(" "); } function defaultChew(container, macro, verbose, flat) { diff --git a/recursive-macro.js b/recursive-macro.js index d2025f4..68970c5 100644 --- a/recursive-macro.js +++ b/recursive-macro.js @@ -727,9 +727,9 @@ function Person(count = 1) { this.describeOne = function (verbose=true) { var body = random_desc(["skinny","fat","tall","short","stocky","spindly","muscular","fit","multi-colored"], (verbose ? 0.6 : 0)); - var sex = random_desc(["male", "female"], (verbose ? 1 : 0)); + var sex = random_desc(["male", "female"], (verbose ? 0.75 : 0)); var species = ""; - species = random_desc(["wolf","cat","dog","squirrel","horse","hyena","fox","jackal","crux","sergal"]); + species = random_desc(["wolf","cat","dog","squirrel","horse","hyena","fox","jackal","crux","sergal","coyote","rabbit","lizard","avian"]); return "a " + merge_desc([body,sex,species]); };