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" },
],
},
};