a munch adventure
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

168 řádky
4.2 KiB

  1. stories.push({
  2. "id": "demo",
  3. "name": "Tech Demo",
  4. "tags": [
  5. "Memes"
  6. ],
  7. "intro": {
  8. "start": "Home",
  9. "setup": state => {
  10. state.info.time.value = 3600;
  11. state.player.stats.oofs = {name: "Oofs", type: "meter", value: 0, max: 10, color: "rgb(255,0,0)"};
  12. state.player.stats.number = {name: "Number", type: "counter", value: 0, max: 10, color: "rgb(255,255,255)"};
  13. },
  14. "intro": state => {
  15. print(["don't fall down the stairs ok"]);
  16. }
  17. },
  18. "sounds": [
  19. "sfx/oof.ogg"
  20. ],
  21. "preload": [
  22. ],
  23. "world": {
  24. "Stairs": {
  25. "id": "Stairs",
  26. "name": "Stairs",
  27. "desc": "You can't actually get here"
  28. },
  29. "Home": {
  30. "id": "Home",
  31. "name": "Home",
  32. "desc": "Where the wifi autoconnects",
  33. "move": (room, state) => {
  34. print(["You go back to your living room"]);
  35. },
  36. "enter": (room, state) => {
  37. print(["*sound of you entering your house*"]);
  38. startTimer({
  39. id: "room-counter",
  40. func: state => {
  41. state.world["Home"].data.stats.number.value += 1;
  42. return true;
  43. },
  44. delay: 1000,
  45. loop: true,
  46. classes: [
  47. ],
  48. room: "Home",
  49. }, state);
  50. },
  51. "exit": (room, state) => {
  52. print(["You are exiting your house"]);
  53. stopRoomTimers("Home", state);
  54. },
  55. "actions": [
  56. {
  57. "name": "Squint",
  58. "desc": "Squint in a very aggressive manner",
  59. "execute": (room, state) => {
  60. state.player.rooms[room.id].squinted = true;
  61. print(["You stare at the wall and notice a secret door. But where is the key?"]);
  62. }
  63. },
  64. {
  65. "name": "Find Keys",
  66. "desc": "Find your keys",
  67. "execute": (room, state) => {
  68. state.player.items.keys.push("Locked Room");
  69. print(["You found your keys under the couch cushions"]);
  70. },
  71. "show": [
  72. (room, state) => {
  73. return state.player.rooms[room.id].squinted;
  74. },
  75. (room, state) => {
  76. return !state.player.items.keys.includes("Locked Room");
  77. }
  78. ]
  79. }
  80. ],
  81. "exits": {
  82. "up": {
  83. "target": "Locked Room",
  84. "desc": "It's locked!",
  85. "conditions": [
  86. (room, state) => {
  87. return state.player.items.keys.includes("Locked Room");
  88. }
  89. ],
  90. "show": [
  91. (room, state) => {
  92. return state.player.rooms[room.id].squinted;
  93. }
  94. ]
  95. },
  96. "descend": {
  97. "target": "Stairs",
  98. "desc": "Dare you go down the stiars?",
  99. "hooks": [
  100. (room, state) => {
  101. print(["You're very concerned that you'll fall down all these stairs."]);
  102. return false;
  103. }
  104. ]
  105. }
  106. },
  107. "hooks": [
  108. (room, state) => {
  109. print(["This is a test of the hooks"]);
  110. return true;
  111. }
  112. ],
  113. "data": {
  114. "stats": {
  115. number: {name: "Seconds In Room", type: "counter", value: 0, color: "rgb(255,0,0)"}
  116. }
  117. }
  118. },
  119. "Locked Room": {
  120. "id": "Locked Room",
  121. "name": "Locked Room",
  122. "desc": "Super seecret",
  123. "move": (room, state) => {
  124. print(["You enter the locked room. wowie!"]);
  125. },
  126. "actions": [
  127. {
  128. name: "Oof",
  129. desc: "Oof",
  130. execute: (room, state) => {
  131. state.player.stats.oofs.value += 1;
  132. if (state.player.stats.oofs.value >= state.player.stats.oofs.max) {
  133. state.player.stats.oofs.value = state.player.stats.oofs.max;
  134. print(["Big oof"]);
  135. } else {
  136. print(["Oof"]);
  137. }
  138. playSfx("sfx/oof.ogg");
  139. }
  140. }
  141. ],
  142. "exits": {
  143. "down": {
  144. "target": "Home",
  145. "desc": "Back to home",
  146. "hooks": [
  147. (room, exit, state) => {
  148. print(["Potato"]);
  149. return true;
  150. }
  151. ]
  152. }
  153. },
  154. "data": {
  155. "stats": {
  156. }
  157. }
  158. }
  159. }
  160. });