diff options
author | elioat <elioat@tilde.institute> | 2024-12-01 15:00:37 -0500 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2024-12-01 15:00:37 -0500 |
commit | ecff6d35e51ee35dfb34df03acdc9ceb244f7204 (patch) | |
tree | fb4411e2ba51b30b728fa720964e673607ece91b /html/story-teller/js/scenes.js | |
parent | 1768e1fd0ddc4a059869caa8ff4b08b5734e3982 (diff) | |
download | tour-ecff6d35e51ee35dfb34df03acdc9ceb244f7204.tar.gz |
*
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 |