-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstoryData.js
112 lines (111 loc) · 4.38 KB
/
storyData.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// storyData.js
const story = {
"introduction": {
text: "You wake up in a dimly lit room. The door is locked. What will you do?",
image: "images/locked-room.png",
choices: [
{ text: "Search the room", next: "searchRoom" },
{ text: "Call for help", next: "callForHelp" }
]
},
"searchRoom": {
text: "You find a rusty key under the bed. It might open the door.",
image: "images/key-found.png",
choices: [
{ text: "Use the key on the door", next: "hallway" },
{ text: "Keep searching", next: "keepSearching" }
]
},
"callForHelp": {
text: "You call out for help, but no one answers. You feel a chill down your spine.",
image: "images/empty-room.png",
choices: [
{ text: "Search the room", next: "searchRoom" },
{ text: "Wait by the door", next: "waitByDoor" }
]
},
"waitByDoor": {
text: "You wait for hours by the door. Eventually, you hear footsteps, but it's too late. The door opens to reveal a shadowy figure. You’ve met your end.",
image: "images/empty-room.png",
choices: [
{ text: "Restart Game", next: "introduction" }
]
},
"hallway": {
text: "The key works! You step into a dimly lit hallway. There are two paths.",
image: "images/hallway.png",
choices: [
{ text: "Go left", next: "leftPath" },
{ text: "Go right", next: "rightPath" }
]
},
"keepSearching": {
text: "You search some more but find nothing else of interest. You hear strange noises. The mansion is alive.",
image: "images/nothing-found.jpg",
choices: [
{ text: "Use the key on the door", next: "hallway" },
{ text: "Sit and wait", next: "gameOver" }
]
},
"leftPath": {
text: "You find a staircase leading upwards. You climb it and reach the attic. There's something strange in the corner.",
image: "images/attic.png",
choices: [
{ text: "Explore the attic", next: "exploreAttic" },
{ text: "Go back down", next: "hallway" },
{ text: "Knock on the attic door", next: "knockAtticDoor" }
]
},
"knockAtticDoor": {
text: "You knock on the attic door. A voice responds, but it’s a twisted whisper that makes your skin crawl. You open the door to find a mirror. You are pulled inside and lost forever.",
image: "images/mirror.png",
choices: [
{ text: "Restart Game", next: "introduction" }
]
},
"rightPath": {
text: "You stumble upon a trapdoor. It's locked, but there might be a way to open it.",
image: "images/empty-room.png",
choices: [
{ text: "Search for a key", next: "searchKey" },
{ text: "Return to the hallway", next: "hallway" },
{ text: "Try to break the lock", next: "breakLock" }
]
},
"breakLock": {
text: "You try to break the lock, but the trapdoor opens and releases a poisonous gas. You collapse, unable to escape.",
image: "images/poisoned.jpg",
choices: [
{ text: "Restart Game", next: "introduction" }
]
},
"exploreAttic": {
text: "In the attic, you find a chest. You open it and find a cursed artifact. As soon as you touch it, the mansion collapses on you.",
image: "images/attic-collapse.png",
choices: [
{ text: "Restart Game", next: "introduction" }
]
},
"searchKey": {
text: "You find the key hidden behind a loose brick. It fits the trapdoor!",
image: "images/empty-room.png",
choices: [
{ text: "Open the trapdoor", next: "exploreSecretRoom" },
{ text: "Search the room again", next: "keepSearching" }
]
},
"exploreSecretRoom": {
text: "You descend into a hidden room. It's dark, but you hear whispers. Suddenly, a ghostly figure appears, and you are consumed by the darkness.",
image: "images/ghostly-room.png",
choices: [
{ text: "Restart Game", next: "introduction" }
]
},
"gameOver": {
text: "You have died. The mansion claims another soul.",
image: "images/game-over.jpg",
choices: [
{ text: "Restart Game", next: "introduction" }
]
}
};