a munch adventure
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

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