a munch adventure
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.
 
 
 
 

151 lines
3.8 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. },
  39. "exit": (room, state) => {
  40. print(["You are exiting your house"]);
  41. },
  42. "actions": [
  43. {
  44. "name": "Squint",
  45. "desc": "Squint in a very aggressive manner",
  46. "execute": (room, state) => {
  47. state.player.rooms[room.id].squinted = true;
  48. print(["You stare at the wall and notice a secret door. But where is the key?"]);
  49. }
  50. },
  51. {
  52. "name": "Find Keys",
  53. "desc": "Find your keys",
  54. "execute": (room, state) => {
  55. state.player.items.keys.push("Locked Room");
  56. print(["You found your keys under the couch cushions"]);
  57. },
  58. "show": [
  59. (room, state) => {
  60. return state.player.rooms[room.id].squinted;
  61. },
  62. (room, state) => {
  63. return !state.player.items.keys.includes("Locked Room");
  64. }
  65. ]
  66. }
  67. ],
  68. "exits": {
  69. "up": {
  70. "target": "Locked Room",
  71. "desc": "It's locked!",
  72. "conditions": [
  73. (room, state) => {
  74. return state.player.items.keys.includes("Locked Room");
  75. }
  76. ],
  77. "show": [
  78. (room, state) => {
  79. return state.player.rooms[room.id].squinted;
  80. }
  81. ]
  82. },
  83. "descend": {
  84. "target": "Stairs",
  85. "desc": "Dare you go down the stiars?",
  86. "hooks": [
  87. (room, state) => {
  88. print(["You're very concerned that you'll fall down all these stairs."]);
  89. return false;
  90. }
  91. ]
  92. }
  93. },
  94. "hooks": [
  95. (room, state) => {
  96. print(["This is a test of the hooks"]);
  97. return true;
  98. }
  99. ],
  100. "data": {
  101. "stats": {
  102. number: {name: "Seconds In Room", type: "counter", value: 0, color: "rgb(255,0,0)"}
  103. }
  104. }
  105. },
  106. "Locked Room": {
  107. "id": "Locked Room",
  108. "name": "Locked Room",
  109. "desc": "Super seecret",
  110. "move": (room, state) => {
  111. print(["You enter the locked room. wowie!"]);
  112. },
  113. "actions": [
  114. {
  115. name: "Oof",
  116. desc: "Oof",
  117. execute: (room, state) => {
  118. state.player.stats.oofs.value += 1;
  119. if (state.player.stats.oofs.value >= state.player.stats.oofs.max) {
  120. state.player.stats.oofs.value = state.player.stats.oofs.max;
  121. print(["Big oof"]);
  122. } else {
  123. print(["Oof"]);
  124. }
  125. playSfx("sfx/oof.ogg");
  126. }
  127. }
  128. ],
  129. "exits": {
  130. "down": {
  131. "target": "Home",
  132. "desc": "Back to home",
  133. "hooks": [
  134. (room, exit, state) => {
  135. print(["Potato"]);
  136. return true;
  137. }
  138. ]
  139. }
  140. },
  141. "data": {
  142. "stats": {
  143. }
  144. }
  145. }
  146. }
  147. });