big steppy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

222 lines
8.7 KiB

  1. rules = {};
  2. rules["eat"] = [];
  3. rules["stomp"] = [];
  4. rules["kick"] = [];
  5. rules["anal-vore"] = [];
  6. rules["ass-crush"] = [];
  7. rules["breast-crush"] = [];
  8. rules["unbirth"] = [];
  9. rules["cock-vore"] = [];
  10. rules["cockslap"] = [];
  11. rules["ball-smother"] = [];
  12. rules["male-orgasm"] = [];
  13. rules["female-orgasm"] = [];
  14. rules["grind"] = [];
  15. function isFatal(macro) {
  16. return macro.brutality >= 1;
  17. }
  18. function isGory(macro) {
  19. return macro.brutality >= 2;
  20. }
  21. function hasNothing(container, thing, amount) {
  22. for (var key in container.contents) {
  23. if (container.contents.hasOwnProperty(key))
  24. return false;
  25. }
  26. return true;
  27. }
  28. function hasLessThan(container, thing, amount) {
  29. if (container.contents.hasOwnProperty(thing))
  30. if (container.contents[thing].count < amount && container.contents[thing].count > 0)
  31. return true;
  32. return false;
  33. }
  34. function hasExactly(container, thing, amount) {
  35. if (!container.contents.hasOwnProperty(thing) && amount == 0)
  36. return true;
  37. if (container.contents.hasOwnProperty(thing) && container.contents[thing].count == amount)
  38. return true;
  39. return false;
  40. }
  41. function hasOnly(container, things) {
  42. for (var key in container.contents) {
  43. if (container.contents.hasOwnProperty(key))
  44. if (!things.includes(key))
  45. return false;
  46. }
  47. for (var i=0; i<things.length; i++) {
  48. if (!container.contents.hasOwnProperty(things[i]))
  49. return false;
  50. }
  51. return true;
  52. }
  53. function nothingLarger(container, thing) {
  54. for (var key in container.contents)
  55. if (container.contents.hasOwnProperty(key))
  56. if (areas[key] > areas[thing])
  57. return false;
  58. return true;
  59. }
  60. function describe(action, container, macro, verbose=true) {
  61. options = [];
  62. for (var i = 0; i < rules[action].length; i++) {
  63. if(rules[action][i].test(container,macro)) {
  64. options.push(rules[action][i].desc);
  65. }
  66. }
  67. if (options.length > 0) {
  68. let choice = Math.floor(Math.random() * options.length);
  69. return options[choice](container, macro, verbose);
  70. }
  71. else {
  72. return describeDefault(action, container, macro, verbose);
  73. }
  74. }
  75. function describeDefault(action, container, macro, verbose=true) {
  76. switch(action) {
  77. case "eat": return "You scoop up " + container.describe(verbose) + " and swallow " + (container.count > 1 ? "them" : "it") + " whole.";
  78. case "stomp": return "You crush " + container.describe(verbose) + " underfoot.";
  79. case "kick": return "You punt " + container.describe(verbose) + ", destroying " + (container.count > 1 ? "them" : "it") + ".";
  80. case "anal-vore": return "You sit yourself down on " + container.describe(verbose) + ". " + (container.count > 1 ? "They slide" : "It slides") + " inside with ease.";
  81. case "ass-crush": return "Your heavy ass obliterates " + container.describe(verbose) + ". ";
  82. case "breast-crush": return "Your heavy breasts obliterate " + container.describe(verbose) + ". ";
  83. case "unbirth": return "You gasp as you slide " + container.describe(verbose) + " up your slit. ";
  84. case "cock-vore": return "You stuff " + container.describe(verbose) + " into your throbbing shaft, forcing them down to your heavy balls.";
  85. case "cockslap": return "Your swaying shaft crushes " + container.describe(verbose) + ". ";
  86. case "ball-smother": return "Your weighty balls spread over " + container.describe(verbose) + ", smothering them in musk.";
  87. case "male-orgasm": return "You're cumming! Your thick cock spurts out $VOLUME of seed, splooging " + container.describe(verbose) + ".";
  88. case "female-orgasm": return "You're cumming! Your moist slit sprays $VOLUME of slick femcum, splooging " + container.describe(verbose) + ".";
  89. case "grind":
  90. var end = (macro.arousalEnabled ? ", smashing them to fuel your lust." : ", smashing them to bits.");
  91. if (macro.maleParts && macro.femaleParts) {
  92. return "You grind your " + macro.describeDick + " cock and " + macro.describeVagina + " slit against " + container.describe(verbose) + end;
  93. } else if (macro.maleParts && !macro.femaleParts) {
  94. return "You grind your " + macro.describeDick + " shaft against " + container.describe(verbose) + end;
  95. } else if (!macro.maleParts && macro.femaleParts) {
  96. return "You grind your " + macro.describeVagina + " slit against " + container.describe(verbose) + end;
  97. } else if (!macro.maleParts && !macro.femaleParts) {
  98. return "You grind your hips against " + container.describe(verbose) + end;
  99. }
  100. }
  101. }
  102. // EATING
  103. rules["eat"].push({
  104. "test": function(container, macro) {
  105. return hasNothing(container);
  106. },
  107. "desc": function(container, macro, verbose) {
  108. return "You scoop up...nothing. Oh well.";
  109. }
  110. });
  111. rules["eat"].push({
  112. "test": function(container, macro) {
  113. return hasOnly(container, ["Person"])
  114. && hasLessThan(container, "Person", 6)
  115. && macro.height >= 10;
  116. },
  117. "desc": function(container, macro, verbose) {
  118. return "You pluck up the " + container.describe() + " and stuff them into your mouth, swallowing lightly to drag them down to your bubbling guts.";
  119. }
  120. });
  121. rules["eat"].push({
  122. "test": function(container, macro) {
  123. return hasOnly(container, ["Person"])
  124. && hasExactly(container, "Person", 1)
  125. && macro.height < 10;
  126. },
  127. "desc": function(container, macro, verbose) {
  128. 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.";
  129. }
  130. });
  131. rules["eat"].push({
  132. "test": function(container, macro) {
  133. return hasOnly(container, ["Person","Car"])
  134. && hasExactly(container, "Car", 1)
  135. && hasLessThan(container, "Person", 5);
  136. },
  137. "desc": function(container, macro, verbose) {
  138. return "You crush the " + container.contents["Car"].describe() + " with your tight throat, washing it down with " + container.contents["Person"].describe();
  139. }
  140. });
  141. rules["eat"].push({
  142. "test": function(container, macro) {
  143. return hasExactly(container, "Small Skyscraper", 1)
  144. && nothingLarger(container, "Small Skyscraper")
  145. && macro.height < 500;
  146. },
  147. "desc": function(container, macro, verbose) {
  148. return "You drop onto your hands and knees, jaws opening wide to envelop the skyscraper. It glides into your throat as your snout touches the ground,\
  149. and you suckle on it for a long moment before twisting your head to snap it loose. The entire building and the " + describe_all(container.contents["Small Skyscraper"].contents, verbose) + "\
  150. within plunge into your roiling guts, along with some delicious treats you slurped up along with it - " + describe_all(container.contents, verbose, ["Small Skyscraper"]) + ".";
  151. }
  152. });
  153. rules["eat"].push({
  154. "test": function(container, macro) {
  155. return hasExactly(container, "Small Skyscraper", 2)
  156. && nothingLarger(container, "Small Skyscraper")
  157. && macro.height < 750;
  158. },
  159. "desc": function(container, macro, verbose) {
  160. return "You drop onto your hands and knees, jaws opening wide to envelop the skyscraper. It glides into your throat as your snout touches the ground,\
  161. and you suckle on it for a long moment before twisting your head to snap it loose. Without missing a beat, you rise back up, sloppy tongue slathering over the side \
  162. of the remaining tower, sucking on its tip and roughly shoving it into your maw. It breaks from its foundation, vanishing past your lips as you use two fingers to shove it \
  163. down your sultry throat. Your gut bubbles as " + describe_all(container.contents["Small Skyscraper"].contents, verbose) + " are crunched and crushed within, along with the \
  164. " + describe_all(container.contents, verbose, ["Small Skyscraper"]) + " that were unfortunate enough to be caught up by your slimy tongue.";
  165. }
  166. });
  167. // STOMPING
  168. rules["stomp"].push({
  169. "test": function(container, macro) {
  170. return hasOnly(container, ["Person"])
  171. && hasExactly(container, "Person", 1)
  172. && isFatal(macro);
  173. }, "desc": function(container, macro, verbose) {
  174. return "Your heavy paw slams down on " + container.describe(verbose) + ", smashing the poor thing like an insect.";
  175. }
  176. });
  177. rules["stomp"].push({
  178. "test": function(container, macro) {
  179. return hasOnly(container, ["Person"])
  180. && hasExactly(container, "Person", 1)
  181. && isGory(macro);
  182. }, "desc": function(container, macro, verbose) {
  183. return "Your paw thumps " + container.describe(verbose) + ", shoving your victim to the ground and cracking them open like an egg.";
  184. }
  185. });
  186. rules["stomp"].push({
  187. "test": function(container, macro) {
  188. return hasOnly(container, ["Person"])
  189. && hasExactly(container, "Person", 1)
  190. && isGory(macro);
  191. }, "desc": function(container, macro, verbose) {
  192. return "Your shadow falls over " + container.describe(verbose) + ", and your paw follows, crushing their soft body and reducing them to a heap of broken gore.";
  193. }
  194. });