big steppy
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

93 行
2.9 KiB

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