a munch adventure
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

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