a munch adventure
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

127 lignes
3.6 KiB

  1. (() => {
  2. function devour(state, count) {
  3. state.player.stats.stomach.value += count;
  4. playSfx("sfx/swallows/swallow.ogg")
  5. }
  6. function digest(state, count) {
  7. if (count === undefined) {
  8. count = state.player.stats.stomach.value / 10;
  9. }
  10. state.player.stats.stomach.value -= count;
  11. state.player.stats.gas.value += count;
  12. }
  13. stories.push({
  14. id: "mass-vore",
  15. name: "Mass Vore",
  16. tags: [
  17. "Player Predator",
  18. "Macro/Micro",
  19. "Digestion"
  20. ],
  21. sounds: [
  22. "sfx/belches/belch.ogg",
  23. "sfx/swallows/swallow.ogg"
  24. ],
  25. preload: [
  26. ],
  27. intro: {
  28. start: "city",
  29. setup: state => {
  30. state.player.stats.fullness = {
  31. name: "Fullness",
  32. type: "meter",
  33. get value() {
  34. return state.player.stats.gas.value + state.player.stats.stomach.value;
  35. },
  36. min: 0,
  37. max: 10000,
  38. color: "rgb(200,20,100)"
  39. };
  40. state.player.stats.gas = {
  41. name: "Gas",
  42. type: "meter",
  43. value: 0,
  44. min: 0,
  45. get max() {
  46. return 10000 - state.player.stats.stomach.value;
  47. },
  48. color: "rgb(10,200,100)"
  49. }
  50. state.player.stats.stomach = {
  51. name: "Stomach",
  52. type: "meter",
  53. value: 0,
  54. min: 0,
  55. max: 10000,
  56. color: "rgb(255,10,150)"
  57. }
  58. startTimer({
  59. id: "belch",
  60. func: state => {
  61. if (state.player.stats.gas.value > state.player.stats.gas.max) {
  62. print(["BUURRRRRP!"]);
  63. playSfx("sfx/belches/belch.ogg");
  64. state.player.stats.gas.value /= 3;
  65. }
  66. return true;
  67. },
  68. delay: 100,
  69. loop: true,
  70. classes: [
  71. ]
  72. }, state);
  73. startTimer({
  74. id: "digestion",
  75. func: state => {
  76. digest(state);
  77. return true;
  78. },
  79. delay: 100,
  80. loop: true,
  81. classes: [
  82. ]
  83. }, state);
  84. },
  85. intro: state => {
  86. print(["Munch time"]);
  87. }
  88. },
  89. world: {
  90. "city": {
  91. id: "",
  92. name: "",
  93. desc: "",
  94. move: (room, state) => {
  95. },
  96. enter: (room, state) => {
  97. },
  98. exit: (room, state) => {
  99. },
  100. hooks: [
  101. ],
  102. actions: [
  103. {
  104. name: "Eat",
  105. desc: "Munch!",
  106. execute: (room, state) => {
  107. print(["Munch!"]);
  108. devour(state, 500);
  109. }
  110. }
  111. ],
  112. exits: {
  113. }
  114. }
  115. }
  116. });
  117. })();