xxxxxxxxxx
90
// if (i.value() == "" && choice == "") {
// createP(":");
// createP("");
// choice = "";
// }
let i;
let choice;
function setup() {
i = createInput();
createP("You look around. You're on a planet. No, maybe a moon, so small you could walk around it in sixty paces. The surface is clean and barren, so white it hurts your eyes to look at your feet. The sky is a deep purple, threatening a storm. Overhead, you hear distant thunder, and quickly scramble around the planet for shelter. You find two doors. A Voice tells you that behind the left one, are riches and power, but that you shouldn't dare go in, because it is very dangerous. Behind the right, is knowledge, it says. The Voice tells you to that the right one drives many insane. Do you go into the POWER door, the KNOWLEDGE door, or try to weather the STORM?");
choice = "POWER, KNOWLEDGE, STORM";
}
function keyPressed() {
if (keyCode === 13) {
if (i.value() == "power" && choice == "POWER, KNOWLEDGE, STORM") {
createP("POWER:");
createP("You feel the first couple of raindrops on your face as your mind races. You check your pockets, seeing if you have anything still with you. Nope. You look for a way off the planet. Nope. Unsure of whether you can trust the Voice or not, you reach out for the silver handle of the 'power' door. You twist it and you hear a click. Behind the door, is... Nothing. Not even a colour. Not white, not black, but void. As you step in, something surges through your body. Not power, but drowsiness.");
choice = "";
}
if (i.value() == "knowledge" && choice == "POWER, KNOWLEDGE, STORM") {
createP("KNOWLEDGE:");
createP("You feel the first couple of raindrops on your face as your mind races. You check your pockets, seeing if you have anything still with you. Nope. You look for a way off the planet. Nope. Unsure of whether you can trust the Voice or not, you reach out for the silver handle of the 'knowledge' door. You twist it and you hear a click. Behind the door, is... Nothing. Not even a colour. Not white, not black, but void. As you step in, something surges through your body. Not knowledge, but drowsiness.");
choice = "";
}
if (i.value() == "storm" && choice == "POWER, KNOWLEDGE, STORM") {
createP("STORM:");
createP("You feel the first couple of raindrops on your face as your mind races. You check your pockets, seeing if you have anything still with you. Nope. You look for a way off the planet. Nope. Unsure of whether you can trust the Voice or not, you stay where you are, not touching the doors. The storm intensifies. A thin layer of water forms all around the planet. The lightning starts, and you jump to the dryest place you can. You have same choice as before: do you go through the POWER door, the KNOWLEDGE door, or STAY on the planet for as long as you can?");
choice = "POWER, KNOWLEDGE, STAY 2";
}
if (i.value() == "power" && choice == "POWER, KNOWLEDGE, STAY 2") {
createP("POWER:");
createP("You sprint across the planet, as thunder attacks your ears. The water keeps rising, now at your ankles. You reach the 'power' door and quickly throw yourself through it. A feeling of calm and drowsiness floods your mind.");
choice = "";
}
if (i.value() == "knowledge" && choice == "POWER, KNOWLEDGE, STAY 2") {
createP("KNOWLEDGE:");
createP("You sprint across the planet, as thunder attacks your ears. The water keeps rising, now at your ankles. You reach the 'knowledge' door and quickly throw yourself through it. A feeling of calm and drowsiness floods your mind.");
choice = "";
}
if (i.value() == "stay" && choice == "POWER, KNOWLEDGE, STAY 2") {
createP("STAY:");
createP("You decide to stay put where you are, a slight hump on the otherwise smooth planet. Water threatens to touch your shoes, too close for comfort as the lightning illuminates everything around you. After a couple of minutes, there's no escaping the water. At least the lightning has stopped, so you won't be electrocuted. But now, rain pours down by the tons and soon, water is up to your hips and you start to panic. You fall and can't get up, feeling like you're stuck in molasses. Water fills your lungs as you black out and sink to the bottom.");
createP("LATER:");
createP("You find yourself awake in a room. Well, maybe not a room. A space. White in every direction, where the floor and the walls blend togethor as if you're nowhere at all. The Voice comes back, telling you that you are resilient, but that you must choose one of the doors. On cue, both doors appear out of nowhere, right in front of you. The Voice warns you that you must choose one of the doors within ten seconds or else. Do you choose the POWER door, the KNOWLEDGE door, or continue down your path of ignorant resiliance and WAIT to see what happens next?");
choice = "POWER, KNOWLEDGE, WAIT";
}
if (i.value() == "wait" && choice == "POWER, KNOWLEDGE, WAIT") {
createP("WAIT:");
createP("'Four, three, two, one...'");
createP("The Voice counts down.");
createP("'Please. I don't want to go.'");
createP("You stand there in silence, trying to figure out what's going on. You float, up and through the walls. You've escaped. Now, you're in a cement room. No windows or doors, the only light source being the white box you just came out of. You turn around to an old man, crying.");
createP("'I tried to warn you. Please, tell them to choose a door. Don't let them suffer my fate.'");
createP("He fades away. You realise that he was the Voice. Now, you're the Voice. A young female, maybe 25, appears in your mind. On a planet. The planet. You tell her that the left door contains power and riches and the right, knowledge. You urge her to pick a door. She picks knowledge. Some time later, a man in his forties appears again in your mind. You tell him to pick the knowledge or power door. He thinks through the rain, till the first strike of lightning, then quickly picks the power door. You check in on the woman. She's crying. You check on the man, who now has a broken leg. A third person appears, who waits till the water's up to his ankles, then chooses the knowledge door. He and the woman meet, and she lashes out, biting him in the neck. The cycle repeats for days, till you can't bear it and decide to change. The next person, you decide to lie to. Do you bias them towards the POWER door, the KNOWLEDGE door, or the STORM?");
choice = "POWER, KNOWLEDGE, STORM 3";
}
if (i.value() == "POWER" && choice == "POWER, KNOWLEDGE, STORM 3") {
createP("POWER:");
createP("");
choice = "";
}
}
}