a munch adventure
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

114 lines
2.7 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. },
  11. "intro": state => {
  12. print(["don't fall down the stairs ok"]);
  13. }
  14. },
  15. "sounds": [
  16. "sfx/oof.ogg"
  17. ],
  18. "world": {
  19. "Home": {
  20. "id": "Home",
  21. "name": "Home",
  22. "desc": "Where the wifi autoconnects",
  23. "move": (room, state) => {
  24. print(["You go back to your living room"]);
  25. },
  26. "enter": (room, state) => {
  27. print(["*sound of you entering your house*"]);
  28. },
  29. "exit": (room, state) => {
  30. print(["You are exiting your house"]);
  31. },
  32. "actions": [
  33. {
  34. "name": "Squint",
  35. "desc": "Squint in a very aggressive manner",
  36. "execute": (room, state) => {
  37. state.player.rooms[room.id].squinted = true;
  38. print(["You stare at the wall and notice a secret door. But where is the key?"]);
  39. }
  40. },
  41. {
  42. "name": "Find Keys",
  43. "desc": "Find your keys",
  44. "execute": (room, state) => {
  45. state.player.items.keys.push("Locked Room");
  46. print(["You found your keys under the couch cushions"]);
  47. },
  48. "show": [
  49. (room, state) => {
  50. return state.player.rooms[room.id].squinted;
  51. },
  52. (room, state) => {
  53. return !state.player.items.keys.includes("Locked Room");
  54. }
  55. ]
  56. }
  57. ],
  58. "exits": {
  59. "up": {
  60. "target": "Locked Room",
  61. "desc": "It's locked!",
  62. "conditions": [
  63. (room, state) => {
  64. return state.player.items.keys.includes("Locked Room");
  65. }
  66. ],
  67. "show": [
  68. (room, state) => {
  69. return state.player.rooms[room.id].squinted;
  70. }
  71. ]
  72. }
  73. },
  74. "hooks": [
  75. (room, state) => {
  76. print(["This is a test of the hooks"]);
  77. return true;
  78. }
  79. ]
  80. },
  81. "Locked Room": {
  82. "id": "Locked Room",
  83. "name": "Locked Room",
  84. "desc": "Super seecret",
  85. "move": (room, state) => {
  86. print(["You enter the locked room. wowie!"]);
  87. },
  88. "actions": [
  89. {
  90. name: "Oof",
  91. desc: "Oof",
  92. execute: (room, state) => {
  93. print(["Oof"]);
  94. playSfx("sfx/oof.ogg");
  95. }
  96. }
  97. ],
  98. "exits": {
  99. "down": {
  100. "target": "Home",
  101. "desc": "Back to home",
  102. "hooks": [
  103. (room, exit, state) => {
  104. print(["Potato"]);
  105. return true;
  106. }
  107. ]
  108. }
  109. }
  110. }
  111. }
  112. });