big steppy
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

121 líneas
2.4 KiB

  1. let last_used = {};
  2. let sounds = {
  3. crush: [
  4. ["Thump.", "Thoomp."],
  5. ["Crunch."],
  6. ["Crrruunch."],
  7. ["CRUNCH!"],
  8. ["CRRRUNNCH!"],
  9. ["SKRRRRUNCH!"],
  10. ["SKRRRRRRRSMASH!"],
  11. ],
  12. swallow: [
  13. ["Ulp.", "Glp.", "Slurp."],
  14. ["Glrph.", "Glurk."],
  15. ["Gluuuurrkph!", "Glurp - GLK."],
  16. ["GLRP!", "GULP!", "GLUK!"],
  17. ["GLRRRRPKH!", "GLUUUURK!"],
  18. ["GLUUUUURRPKH!", "GLOOOORPH-GLK!"],
  19. ],
  20. drip: [
  21. ["Drip."],
  22. ["Dribble"],
  23. ["Drip-sploosh"],
  24. ["Dribble-SPLOOSH!"],
  25. ["SPLOOOOOSH!!"],
  26. ],
  27. liquid: [
  28. ["Sploosh."],
  29. ["Gush!"],
  30. ["SPLOOSH!"],
  31. ["SPLOOSH!"],
  32. ["SPLOOOOOOSH!"],
  33. ],
  34. insert: [
  35. ["Slp.", "Shlk."],
  36. ["Shlp.", "Shlrp."],
  37. ["Shlllp."],
  38. ["SHLP!", "SQUELCH!"],
  39. ["SHLLLLRP!"],
  40. ],
  41. drop: [["Thump."], ["Thump!"], ["Splat."], ["Splat!"], ["SPLAT!"]],
  42. belch: [
  43. ["Burp.", "Urp."],
  44. ["Urph.", "Burph."],
  45. ["Urrrrrph."],
  46. ["UuuuuuuRRRRRPPHHHhhhh."],
  47. ["UUUURRRRPHH!"],
  48. ["BUUUURRRRRRRRPPPHHH!"],
  49. ],
  50. fart: [
  51. ["Pft."],
  52. ["Pffft."],
  53. ["Pfffffbt."],
  54. ["Frrrrrrrt."],
  55. ["FRRRRRRRRPBBT!"],
  56. ],
  57. scat: [
  58. ["Clench."],
  59. ["Squeeeeeze."],
  60. ["Squeeeeeeeeeeeze."],
  61. ["Sqlllllch."],
  62. ["SQLLLLLLCH!"],
  63. ],
  64. digest: [
  65. ["Grrgle."],
  66. ["Grrrrgle"],
  67. ["Grrrrlglorp."],
  68. ["GrrrrGLRRRLPH!"],
  69. ["GRRRRRLGPRLHK!"],
  70. ],
  71. goo: [
  72. ["Splat."],
  73. ["Squish."],
  74. ["Squish!"],
  75. ["SQLCH!"],
  76. ["SQLLLLRCH!"],
  77. ["SQQQQUEEEEELLCH!"],
  78. ],
  79. vomit: [
  80. ["Hurk."],
  81. ["Hurrk."],
  82. ["Bleugh."],
  83. ["Bleugh!"],
  84. ["Bleeeugh!"],
  85. ["BLEEEUGHK!"],
  86. ],
  87. breath: [["Woosh."], ["Fwoosh."], ["FWOOSH."], ["FWOOSH!"], ["FWOOOOOOSH!"]],
  88. chew: [
  89. ["Snap.", "Crack."],
  90. ["Crunch."],
  91. ["Crack!"],
  92. ["CRUNCH!"],
  93. ["CRRRUNCH!"],
  94. ],
  95. magic: [["Zap."], ["Zap!"], ["Fwoosh!"]],
  96. };
  97. function pickByMass(name, mass) {
  98. let list = sounds[name];
  99. let index = Math.floor(Math.log10(mass / 100) / 2);
  100. index = Math.max(index, 0);
  101. choice = index < list.length ? list[index] : list[list.length - 1];
  102. let subindex = Math.floor(Math.random() * Math.floor(choice.length));
  103. // less likely to repeat
  104. if (last_used[name] != undefined && last_used[name] == subindex) {
  105. subindex = Math.floor(Math.random() * Math.floor(choice.length));
  106. }
  107. last_used[name] = subindex;
  108. return choice[subindex];
  109. }
  110. function getSound(name, mass) {
  111. return "<i>" + pickByMass(name, mass) + "</i>";
  112. }