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.
 
 
 

98 lines
2.9 KiB

  1. function configure(dict) {
  2. foot = dict.foot;
  3. }
  4. function subset(list1,list2) {
  5. for (var i = 0; i < list1.length; i++) {
  6. if (!list2.includes(list1[i])){
  7. return false;
  8. }
  9. }
  10. return true;
  11. }
  12. function seteq(list1,list2) {
  13. return list1.length == list2.length && subset(list1,list2);
  14. }
  15. function getPreyNames(contents) {
  16. prey = [];
  17. for (var key in contents) {
  18. if (contents.hasOwnProperty(key)) {
  19. prey.push(contents[key].name);
  20. }
  21. }
  22. return prey;
  23. }
  24. function getPreyCounts(contents) {
  25. prey = {};
  26. for (var key in contents) {
  27. if (contents.hasOwnProperty(key)) {
  28. prey[contents[key].name] = contents[key].count;
  29. }
  30. }
  31. return prey;
  32. }
  33. function containerEat(container,verbose=true) {
  34. var preyNames = getPreyNames(container.contents);
  35. var preyCounts = getPreyCounts(container.contents);
  36. return "";
  37. }
  38. function personEat(person) {
  39. if (person.count == 1) {
  40. if (Math.random() > 0.5)
  41. return "You hoist " + person.describe() + " into the air and stuff them down your gullet. Delicious!";
  42. }
  43. else if (person.count <= 3) {
  44. if (Math.random() > 0.5)
  45. return "You reach down with both hands, snagging " + (person.count == 2 ? "two" : "three") + " meals. You savor their taste, " + person.describe() + " slipping past your lips and down your throat, one-by-one.";
  46. }
  47. else if (person.count < 5) {
  48. if (Math.random() > 0.5)
  49. return "You reach down and snatch up a fistful of snacks, stuffing " + person.count + " people into your maw and swallowing deeply.";
  50. }
  51. return "";
  52. }
  53. function personStomp(person) {
  54. if (person.count == 1) {
  55. var choice = Math.random();
  56. if (choice < 0.2)
  57. return "Your heavy paw smashes a " + person.describe() + " like a bug. Splat.";
  58. else if (choice < 0.4)
  59. return "A wayward step obliterates a " + person.describe();
  60. else if (choice < 0.6)
  61. return "You lunge at a " + person.describe() + " with your toes outstretched, squashing them flat.";
  62. }
  63. else if (person.count <= 3) {
  64. if (Math.random() > 0.5)
  65. return "Your paw comes down on " + person.describe() + ". " + (person.count == 2 ? "Both" : "All three") + " crunch beneath your heavy toes.";
  66. }
  67. return "";
  68. }
  69. function skyscraperAnalVore(skyscraper,verbose=true,height = 10) {
  70. if (height < 5000) {
  71. if (verbose)
  72. return "You ease yourself down over the skyscraper, spreading your ass wide as you take it to the ground - then, with a powerful clench, snap it from its base. " + describe_all(skyscraper.contents) + " are sealed away in your ass.";
  73. else
  74. return "You ease yourself down over the skyscraper, spreading your ass wide as you take it to the ground - then, with a powerful clench, snap it from its base. ";
  75. } else {
  76. if (verbose)
  77. return "You stuff the skyscraper up your ass with ease. Bad luck for " + describe_all(skyscraper.contents) + " inside.";
  78. else
  79. return "You stuff the skyscraper up your ass with ease.";
  80. }
  81. return "";
  82. }