diff options
Diffstat (limited to 'html/story-teller/js/scenes.js')
-rw-r--r-- | html/story-teller/js/scenes.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/html/story-teller/js/scenes.js b/html/story-teller/js/scenes.js new file mode 100644 index 0000000..7b8db35 --- /dev/null +++ b/html/story-teller/js/scenes.js @@ -0,0 +1,37 @@ +export const scenes = { + start: { + description: "You are standing in a dark cave. There's a faint glimmer in the distance, and a torch on the ground.", + choices: [ + { text: "Explore further", nextScene: "deepCave" }, + { text: "Pick up the torch", action: (state) => state.inventory.add("torch") }, + { + text: "Use a torch to illuminate the cave", + nextScene: "litCave", + condition: (state) => state.inventory.has("torch"), + consume: ["torch"] + }, + ], + }, + deepCave: { + description: "The darkness becomes overwhelming. You can't proceed further.", + choices: [ + { text: "Go back", nextScene: "start" }, + ], + }, + litCave: { + description: "With the torchlight, you see glittering gemstones embedded in the walls.", + choices: [ + { text: "Pick up the key", action: (state) => state.inventory.add("key") }, + { text: "Collect a gemstone", action: (state) => state.inventory.add("gemstone") }, + { text: "Go back", nextScene: "start" }, + { text: "Go deeper into the cave", nextScene: "treasureRoom", condition: (state) => state.inventory.has("key") }, + ], + }, + treasureRoom: { + description: "You find a room filled with treasure. You are rich beyond your wildest dreams.", + choices: [ + { text: "Swim in the treasure", nextScene: "treasureRoom" }, + ], + }, + }; + \ No newline at end of file |