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

141 строка
3.6 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. 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. },
  101. "Locked Room": {
  102. "id": "Locked Room",
  103. "name": "Locked Room",
  104. "desc": "Super seecret",
  105. "move": (room, state) => {
  106. print(["You enter the locked room. wowie!"]);
  107. },
  108. "actions": [
  109. {
  110. name: "Oof",
  111. desc: "Oof",
  112. execute: (room, state) => {
  113. state.player.stats.oofs.value += 1;
  114. if (state.player.stats.oofs.value >= state.player.stats.oofs.max) {
  115. state.player.stats.oofs.value = state.player.stats.oofs.max;
  116. print(["Big oof"]);
  117. } else {
  118. print(["Oof"]);
  119. }
  120. playSfx("sfx/oof.ogg");
  121. }
  122. }
  123. ],
  124. "exits": {
  125. "down": {
  126. "target": "Home",
  127. "desc": "Back to home",
  128. "hooks": [
  129. (room, exit, state) => {
  130. print(["Potato"]);
  131. return true;
  132. }
  133. ]
  134. }
  135. }
  136. }
  137. }
  138. });