Browse Source

Fix descriptions ignoring verbosity settings. Add some new species and vore text

tags/v1.1.1
Fen Dweller 5 years ago
parent
commit
804e2ff4ea
No known key found for this signature in database GPG Key ID: E80B35A6F11C3656
2 changed files with 13 additions and 6 deletions
  1. +11
    -4
      recursive-desc.js
  2. +2
    -2
      recursive-macro.js

+ 11
- 4
recursive-desc.js View File

@@ -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))) { if (options.length > 0 && Math.random() > (1 / (2 + rules[action].length))) {
let choice = Math.floor(Math.random() * options.length); let choice = Math.floor(Math.random() * options.length);
return options[choice](container, macro, extra1);
return options[choice](container, macro, verbose, flat, extra1);
} }
else { else {
return getDefault(action)(container, macro, extra1);
return getDefault(action)(container, macro, verbose, flat, extra1);
} }
} }


@@ -151,10 +151,11 @@ function pickString(...array){
// DEFAULTS // DEFAULTS


function defaultEat(container, macro, verbose, flat) { function defaultEat(container, macro, verbose, flat) {
console.log(verbose);
if (container.count == 0) if (container.count == 0)
return "You reach down for a delicious treat and grab - oh, nothing."; return "You reach down for a delicious treat and grab - oh, nothing.";
else else
return [
return pickString([
"You", "You",
pickString("snatch up", "grab", "pluck up", "seize", "catch"), pickString("snatch up", "grab", "pluck up", "seize", "catch"),
container.describe(verbose) + ",", container.describe(verbose) + ",",
@@ -162,7 +163,13 @@ function defaultEat(container, macro, verbose, flat) {
pickString("swallow", "devour", "consume"), pickString("swallow", "devour", "consume"),
(container.count > 1 ? "them" : "it"), (container.count > 1 ? "them" : "it"),
"whole." "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 <i>gulp</i>."
]).join(" ");
} }


function defaultChew(container, macro, verbose, flat) { function defaultChew(container, macro, verbose, flat) {


+ 2
- 2
recursive-macro.js View File

@@ -727,9 +727,9 @@ function Person(count = 1) {


this.describeOne = function (verbose=true) { this.describeOne = function (verbose=true) {
var body = random_desc(["skinny","fat","tall","short","stocky","spindly","muscular","fit","multi-colored"], (verbose ? 0.6 : 0)); 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 = ""; 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]); return "a " + merge_desc([body,sex,species]);
}; };




Loading…
Cancel
Save