|  | stories.push({
  "id": "demo",
  "name": "Tech Demo",
  "intro": {
    "start": "Home"
  },
  "sounds": [
    "sfx/oof.ogg"
  ],
  "world": {
    "Home": {
      "id": "Home",
      "name": "Home",
      "desc": "Where the wifi autoconnects",
      "move": (room, state) => {
        print(["You go back to your living room"]);
      },
      "enter": (room, state) => {
        print(["*sound of you entering your house*"]);
      },
      "exit": (room, state) => {
        print(["You are exiting your house"]);
      },
      "actions": [
        {
          "name": "Squint",
          "desc": "Squint in a very aggressive manner",
          "execute": (room, state) => {
            state.player.rooms[room.id].squinted = true;
            print(["You stare at the wall and notice a secret door. But where is the key?"]);
          }
        },
        {
          "name": "Find Keys",
          "desc": "Find your keys",
          "execute": (room, state) => {
            state.player.items.keys.push("Locked Room");
            print(["You found your keys under the couch cushions"]);
          },
          "show": [
            (room, state) => {
              return state.player.rooms[room.id].squinted;
            },
            (room, state) => {
              return !state.player.items.keys.includes("Locked Room");
            }
          ]
        }
      ],
      "exits": {
        "up": {
          "target": "Locked Room",
          "desc": "It's locked!",
          "conditions": [
            (room, state) => {
              return state.player.items.keys.includes("Locked Room");
            }
          ],
          "show": [
            (room, state) => {
              return state.player.rooms[room.id].squinted;
            }
          ]
        }
      },
      "hooks": [
        (room, state) => {
          print(["This is a test of the hooks"]);
          return true;
        }
      ]
    },
    "Locked Room": {
      "id": "Locked Room",
      "name": "Locked Room",
      "desc": "Super seecret",
      "move": (room, state) => {
        print(["You enter the locked room. wowie!"]);
      },
      "actions": [
        {
          name: "Oof",
          desc: "Oof",
          execute: (room, state) => {
            print(["Oof"]);
            playSfx("sfx/oof.ogg");
          }
        }
      ],
      "exits": {
        "down": {
          "target": "Home",
          "desc": "Back to home",
          "hooks": [
            (room, exit, state) => {
              print(["Potato"]);
              return true;
            }
          ]
        }
      }
    }
  }
});
 |