<%
// create a vars object
s.vars = {};
var vars = s.vars;
// state object has started bool
vars.state = {};
vars.state.started = true;
vars.currentChoice = {};
vars.currentChoice["val"] = "";
%>
<h1 class="title">King Vyslav and the Brave Youth</h1>
<h5 class="credits">by Hassan Mushtaq, Lydia Luna, Niladri Deb, and Maya Canedo</h5>
<div class="initialStart">
<button class="startButton">[[START|darkRoom]]</button>
</div>
<%
$(document).ready(function () {
document.querySelector("body").style.backgroundColor = "black";
})
%><div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "darkRoom";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Try to remember what happened."
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("rememberWhat");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Feel around."
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("feelAround");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[rememberWhat]]
// [[feelAround]]<div id="backDrop"></div>
<%
$(document).ready(function () {
var vars = s.vars;
// No need to check start state, always present.
// check where we are
var img = document.createElement('img');
img.classList.add("backDrop");
var abandonedImg = "https://imgtr.ee/images/2023/04/29/JDC2l.png";
var forestImg = "https://imgtr.ee/images/2023/04/29/JDejL.png";
var bridgeImg = "https://imgtr.ee/images/2023/04/29/JDt00.png";
var castleOnHillImg = "https://imgtr.ee/images/2023/04/29/JDuqU.png";
if (vars.currentChoice.val === "darkRoom" || vars.currentChoice.val === "feelAround" || vars.currentChoice.val === "rememberWhat") {
img.src = "https://imgtr.ee/images/2023/04/22/0HRxU.jpg";
}
if (vars.currentChoice.val === "flashLight" || vars.currentChoice.val === "openDoor") {
img.src ="https://imgtr.ee/images/2023/04/22/0zzBl.jpg";
}
if (vars.currentChoice.val === "investigatePainting") {
img.src = "https://imgtr.ee/images/2023/04/23/8RVFD.png"
}
if (vars.currentChoice.val === "enterTunnel" || vars.currentChoice.val === "continueThrough") {
img.src = "https://imgtr.ee/images/2023/04/23/8R4s1.webp"
}
if (vars.currentChoice.val === "noisyTunnel") {
img.src = "https://imgtr.ee/images/2023/04/23/8REaL.png";
}
if (vars.currentChoice.val === "quietTunnel") {
img.src = "https://imgtr.ee/images/2023/04/24/8QFwV.jpg";
}
if (vars.currentChoice.val === "throughNoisyDoor") {
img.src = "https://imgtr.ee/images/2023/04/24/8QFwV.jpg";
}
if (vars.currentChoice.val === "throughQuietDoor") {
img.src = "https://imgtr.ee/images/2023/04/24/8QFwV.jpg";
}
if (vars.currentChoice.val === "throughWindow" || vars.currentChoice.val === "walkedThrough" ) {
img.src = "https://imgtr.ee/images/2023/04/24/8QwEm.jpg";
}
if (vars.currentChoice.val === "moveSoCantSee") {
img.src = "https://imgtr.ee/images/2023/04/22/0HRxU.jpg";
}
if (vars.currentChoice.val === "runToDoor") {
img.src = "https://imgtr.ee/images/2023/04/24/8QFwV.jpg";
}
if (vars.currentChoice.val === "walkedThrough") {
img.src = "https://imgtr.ee/images/2023/04/24/8QwEm.jpg";
}
if (vars.currentChoice.val === "goAbandoned") {
img.src = abandonedImg;
}
if (vars.currentChoice.val === "goForest") {
img.src = forestImg;
}
if (vars.currentChoice.val === "goBridge") {
img.src = bridgeImg;
}
if (vars.currentChoice.val === "investigateVoiceAbandoned") {
img.src = "https://imgtr.ee/images/2023/04/29/JDBmF.png"
}
if (vars.currentChoice.val === "investigateVoiceForest") {
img.src = forestImg;
}
if (vars.currentChoice.val === "investigateVoiceBridge") {
img.src = bridgeImg;
}
if (vars.currentChoice.val === "continueWayAbandoned") {
img.src = abandonedImg;
}
if (vars.currentChoice.val === "continueWayForest") {
img.src = forestImg;
}
if (vars.currentChoice.val === "continueWayBridge") {
img.src = bridgeImg;
}
if (vars.currentChoice.val === "tryWalkStairs") {
img.src = "https://imgtr.ee/images/2023/04/29/JDBmF.png";
}
if (vars.currentChoice.val === "lookForAnotherWay") {
img.src = "https://imgtr.ee/images/2023/04/29/JDBmF.png";
}
if (vars.currentChoice.val === "investigateCreak") {
img.src = "https://imgtr.ee/images/2023/04/29/JDBmF.png"
}
// split this up somehow? make it cooler
if (vars.currentChoice.val === "ignoreAndLeave") {
img.src = "https://imgtr.ee/images/2023/04/29/JDuqU.png";
}
if (vars.currentChoice.val === "pushThroughBushes") {
img.src = bridgeImg;
}
if (vars.currentChoice.val === "walkThroughWater") {
img.src = bridgeImg;
}
if (vars.currentChoice.val === "crossBridge") {
img.src = "https://imgtr.ee/images/2023/04/29/JDuqU.png";
}
if (vars.currentChoice.val === "tryClimbTreeFront") {
img.src = forestImg;
}
if (vars.currentChoice.val === "tryClimbTreeNext") {
img.src = forestImg;
}
if (vars.currentChoice.val === "ignoreExitForest") {
img.src = castleOnHillImg;
}
if (vars.currentChoice.val === "exploreNoiseBush") {
img.src = forestImg;
}
if (vars.currentChoice.val === "unlockChains") {
img.src = bridgeImg;
}
if (vars.currentChoice.val === "beginJourney") {
// lunch break img
img.src = "https://imgtr.ee/images/2023/04/29/JDgd2.png";
}
if (vars.currentChoice.val === "untieHer") {
img.src = abandonedImg;
}
if (vars.currentChoice.val === "ripFree") {
img.src = forestImg;
}
if (vars.currentChoice.val === "continueForestBaba") {
img.src = castleOnHillImg;
}
if (vars.currentChoice.val === "wait1") {
// lunch break img
img.src = "https://imgtr.ee/images/2023/04/29/JDgd2.png";
}
if (vars.currentChoice.val === "beginJourney2") {
img.src = castleOnHillImg;
}
if (vars.currentChoice.val === "continueWalking") {
// lunch break img
img.src = "https://imgtr.ee/images/2023/04/29/JDgd2.png";
}
if (vars.currentChoice.val === "continueAbandonedBaba") {
img.src = castleOnHillImg;
}
if (vars.currentChoice.val === "continueBridgeBaba") {
img.src = castleOnHillImg;
}
if (vars.currentChoice.val === "runForIt") {
// lunch break img
img.src = "https://imgtr.ee/images/2023/04/29/JDgd2.png";
}
if (vars.currentChoice.val === "wait2") {
// lunch break img
img.src = "https://imgtr.ee/images/2023/04/29/JDgd2.png";
}
if (vars.currentChoice.val === "fight2") {
// lunch break img
img.src = "https://imgtr.ee/images/2023/04/29/JDgd2.png";
}
if (vars.currentChoice.val === "run1") {
// lunch break img
img.src = "https://imgtr.ee/images/2023/04/29/JDgd2.png";
}
if (vars.currentChoice.val === "callHelp") {
// lunch break img
img.src = "https://imgtr.ee/images/2023/04/29/JDgd2.png";
}
if (vars.currentChoice.val === "fight1") {
// lunch break img
img.src = "https://imgtr.ee/images/2023/04/29/JDgd2.png";
}
if (vars.currentChoice.val === "continueCastle1") {
// heavily guarded
img.src = "https://imgtr.ee/images/2023/04/29/JDFDB.png"
}
if (vars.currentChoice.val === "continueCastle2") {
// heavily guarded
img.src = "https://imgtr.ee/images/2023/04/29/JDFDB.png"
}
if (vars.currentChoice.val === "continueUpHill") {
// heavily guarded
img.src = "https://imgtr.ee/images/2023/04/29/JDFDB.png"
}
if (vars.currentChoice.val === "walkGate1") {
img.src = "https://imgtr.ee/images/2023/04/29/JDfCQ.png";
}
if (vars.currentChoice.val === "lookAnotherWay1") {
// heavily guarded
img.src = "https://imgtr.ee/images/2023/04/29/JDFDB.png"
}
if (vars.currentChoice.val === "walkGate2") {
img.src = "https://imgtr.ee/images/2023/04/29/JDFDB.png"
}
if (vars.currentChoice.val === "lookAnotherWay2") {
img.src = "https://imgtr.ee/images/2023/04/29/JDFDB.png"
}
if (vars.currentChoice.val === "walkGate3") {
img.src = "https://imgtr.ee/images/2023/04/29/JDFDB.png"
}
if (vars.currentChoice.val === "lookAnotherWay3") {
img.src = "https://imgtr.ee/images/2023/04/29/JDFDB.png"
}
if (vars.currentChoice.val === "headThrone") {
// grand staircase
img.src = "https://imgtr.ee/images/2023/04/29/JD32I.png"
}
if (vars.currentChoice.val === "runFromThem1") {
img.src = "https://imgtr.ee/images/2023/04/29/JDFDB.png"
}
if (vars.currentChoice.val === "callForHelp1") {
img.src = "https://imgtr.ee/images/2023/04/29/JDFDB.png"
}
if (vars.currentChoice.val === "runFromThem2") {
img.src = "https://imgtr.ee/images/2023/04/29/JDFDB.png"
}
if (vars.currentChoice.val === "fightWithSword") {
img.src = "https://imgtr.ee/images/2023/04/29/JDfCQ.png";
}
if (vars.currentChoice.val === "crawlHole1") {
// crawl tunnel
img.src = "https://imgtr.ee/images/2023/04/29/JDj7R.png"
}
if (vars.currentChoice.val === "crawlHole2") {
// crawl tunnel
img.src = "https://imgtr.ee/images/2023/04/29/JDj7R.png"
}
if (vars.currentChoice.val === "enterRoom") {
// grand staircase
img.src = "https://imgtr.ee/images/2023/04/29/JD32I.png"
}
if (vars.currentChoice.val === "trySneakPast") {
// grand staircase
img.src = "https://imgtr.ee/images/2023/04/29/JD32I.png"
}
if (vars.currentChoice.val === "lookAnotherWayOut1") {
// crawl tunnel
img.src = "https://imgtr.ee/images/2023/04/29/JDj7R.png"
}
if (vars.currentChoice.val === "trySneakOut") {
// grand staircase
img.src = "https://imgtr.ee/images/2023/04/29/JD32I.png"
}
if (vars.currentChoice.val === "enterRoomBaba") {
// throne room
img.src = "https://imgtr.ee/images/2023/04/29/JDP5b.png";
}
if (vars.currentChoice.val === "fightMagicalSword") {
// grand staircase
img.src = "https://imgtr.ee/images/2023/04/29/JD32I.png"
}
if (vars.currentChoice.val === "headThrone2") {
// grand staircase
img.src = "https://imgtr.ee/images/2023/04/29/JD32I.png"
}
if (vars.currentChoice.val === "tryEscape1") {
// throne room
img.src = "https://imgtr.ee/images/2023/04/29/JDP5b.png";
}
if (vars.currentChoice.val === "hideBehindThrone1") {
// throne room
img.src = "https://imgtr.ee/images/2023/04/29/JDP5b.png";
}
if (vars.currentChoice.val === "prepareFight") {
// throne room
img.src = "https://imgtr.ee/images/2023/04/29/JDP5b.png";
}
if (vars.currentChoice.val === "enterRoom1") {
// throne room
img.src = "https://imgtr.ee/images/2023/04/29/JDP5b.png";
}
if (vars.currentChoice.val === "hideBehindThrone2") {
// throne room
img.src = "https://imgtr.ee/images/2023/04/29/JDP5b.png";
}
if (vars.currentChoice.val === "tryEscape2") {
// throne room
img.src = "https://imgtr.ee/images/2023/04/29/JDP5b.png";
}
if (vars.currentChoice.val === "attack2") {
// game over
img.src = "https://imgtr.ee/images/2023/04/29/JDz37.webp";
}
if (vars.currentChoice.val === "seeWhatHeSays2") {
// throne room
img.src = "https://imgtr.ee/images/2023/04/29/JDP5b.png";
}
if (vars.currentChoice.val === "attack1") {
// game over
img.src = "https://imgtr.ee/images/2023/04/29/JDz37.webp";
}
if (vars.currentChoice.val === "seeWhatHeSays1") {
// throne room
img.src = "https://imgtr.ee/images/2023/04/29/JDP5b.png";
}
if (vars.currentChoice.val === "tryRun") {
// game over
img.src = "https://imgtr.ee/images/2023/04/29/JDz37.webp"
}
if (vars.currentChoice.val === "fightWithThem") {
// throne room
img.src = "https://imgtr.ee/images/2023/04/29/JDP5b.png";
}
if (vars.currentChoice.val === "confront") {
// game over
img.src = "https://imgtr.ee/images/2023/04/29/JDz37.webp"
}
if (vars.currentChoice.val === "kill") {
// game over
img.src = "https://imgtr.ee/images/2023/04/29/JDz37.webp"
}
if (vars.currentChoice.val === "lookPrincess") {
img.src = "https://imgtr.ee/images/2023/04/29/JDX0A.png"
}
if (vars.currentChoice.val === "escapeWithPrincess") {
img.src = castleOnHillImg;
}
$("#backDrop").html(img);
});
%><div id="textBox"></div>
<%
$(document).ready(function () {
var vars = s.vars;
// check if we started
if (vars.state.started) {
var el = document.createElement("p");
el.classList.add("text");
var string = "";
// check where we are
// this is where we write the text when we are at a choice
if (vars.currentChoice.val === "darkRoom") {
string = "You find yourself in a dark room.";
}
if (vars.currentChoice.val === "feelAround") {
string = "You cautiously begin to feel around the room. There is no furniture and nothing on the walls. You start to feel hopeless before kicking something over. You pick it up and realize it is a flash light.";
}
if (vars.currentChoice.val === "rememberWhat") {
string = "You try to remember what happened, but you can't remember anything.";
}
if (vars.currentChoice.val === "flashLight") {
string = "You look around the room with the flashlight. The floor and ceiling are made of concrete. There is a door on the wall to your left and a painting on the wall to your right.";
}
if (vars.currentChoice.val === "openDoor") {
string = "You walk to the door and try to open it, but it is locked. ";
}
if (vars.currentChoice.val === "investigatePainting") {
string = "You walk over to the painting and examine it. It is a picture of a woman sitting on a throne. You reach out to touch it and notice that it moves. You push it to the side to reveal a tunnel.";
}
if (vars.currentChoice.val === "enterTunnel") {
string = "You walk through the tunnel for what feels like hours with your flashlight.";
}
if (vars.currentChoice.val === "continueThrough") {
string = "You put it in your pocket and continue walking through the tunnel. Eventually, you reach an opening that is covered by what appears to be another painting. You look ahead and see another opening, once again covered. Behind one, you can hear voices. Behind the other, you hear nothing.";
}
if (vars.currentChoice.val === "noisyTunnel") {
string = "You push the first painting to the side and step out of the opening. You are standing in a dim storage room, surrounded only by boxes. You are not in the room alone, but because of the boxes surrounding you, whoever is speaking can not see you. You can see the door to this room, but can not see the speakers.";
}
if (vars.currentChoice.val === "quietTunnel") {
string = "You push through the second painting and step out into an empty room. In this room, there is a door to your left and a window to the right.";
}
if (vars.currentChoice.val === "throughQuietDoor") {
string = "You walk over to the door and twist the handle. It opens easily and you enter the hallway. No one is out there. You turn and walk down the hall until you reach another door. Natural light shines through the gap at the bottom.";
}
if (vars.currentChoice.val === "throughWindow") {
el.innerHTML = "You walk to the window and tug it open. It is not easy, but eventually you open it wide enough for your body. You crawl through and land softly on the grass outside. You look around at your surroundings. Behind you is the building you came from. It is a massive, stone fortress. To your right, there is a path, lined by creepy, abandoned houses on both sides. To your left, there is a dark and dense forest. In front of you, there is a bridge crossing a violent river.";
}
if (vars.currentChoice.val === "throughNoisyDoor") {
string = "You silently maneuver through the stacks of boxes, being careful not to knock them over. You are close to the door when you can finally see the speakers. You do not know what they are, but they are not human. One of them begins to turn your way. They’re going to see you if you don’t move quickly.";
}
if (vars.currentChoice.val === "moveSoCantSee") {
string = "As you move, you knock over a stack of boxes. The others in the room turn and glare at you before taking out their swords and killing you.";
}
if (vars.currentChoice.val === "runToDoor") {
string = "You run to the door and twist the handle. Luckily, the door easily swings open before anyone has the chance to see you. You emerge into a hallway. No one is out here. You turn and walk down the hall until you reach another door. Natural light shines through the gap at the bottom.";
}
if (vars.currentChoice.val === "walkedThrough") {
string = "You exit the door and you are outside. You look around at your surroundings. Behind you is the building you came from. It is a massive, stone fortress. To your right, there is a path, lined by creepy, abandoned houses on both sides. To your left, there is a dark and dense forest. In front of you, there is a bridge crossing a violent river.";
}
if (vars.currentChoice.val === "goAbandoned") {
string = "You begin to walk toward the abandoned neighborhood. It is eerily quiet except for your footsteps crunching in the grass. You walk for a long time, observing each of the houses as you continue. Each one is broken in its own way and was obviously left behind long ago. Eventually, you hear noises coming from one of the houses. It almost sounds like someone saying 'help.' ";
}
if (vars.currentChoice.val === "goForest") {
string = "You walk into the forest. The trees are so close together that the light never touches the ground. You can hear the noises of birds and bugs around you, but fear that there is more in the forest. You continue walking for a long time. Eventually, you hear a noise. At first, you are afraid, wondering what creature was waiting to eat you. Once you are closer, however, you realize that it sounds like someone saying 'help.' ";
}
if (vars.currentChoice.val === "goBridge") {
string = "You head toward the bridge. You are preparing to cross it when you hear a small voice saying, 'help,' below you.";
}
if (vars.currentChoice.val === "investigateVoiceAbandoned") {
string = "You walk up the porch stairs into the house. They creak underneath your weight. You enter the house and hear that the noise is coming from the floor above you. You notice a massive hole in the stairs. They do not look like they are strong enough to hold you.";
}
if (vars.currentChoice.val === "investigateVoiceForest") {
string = "You turn and walk toward the voice. You get close, but you can not see where it is coming from. You look around before finally seeing that it is coming from up in the tree in front of you. You can not see who is up there, but you can see that they are stuck. The tree does not look very safe, but you think you could reach the stranger from the safer-looking tree next to it.";
}
if (vars.currentChoice.val === "investigateVoiceBridge") {
string = "You walk to the side to see dense bushes covering the shore beneath the bridge. The water in front of you is violent and you do not know if it is safe to go through.";
}
if (vars.currentChoice.val === "continueWayAbandoned") {
string = "You continue through the neighborhood and as you near the end, you hear a house creak. You wonder what could be inside.";
}
if (vars.currentChoice.val === "continueWayForest") {
string = "You continue through the forest for a while. As you near the end of the forest, you hear a rusting in the brush behind you. You wonder what could be hiding.";
}
if (vars.currentChoice.val === "continueWayBridge") {
string = "You continue walking over the bridge.";
}
if (vars.currentChoice.val === "tryWalkStairs") {
string = "You walk up the stairs. As you near the hole, they start to moan with each step. Finally, you step right before the role and the boards beneath you give out. You fall to your death.";
}
if (vars.currentChoice.val === "lookForAnotherWay") {
string = "You explore the house a bit more. You walk through what looks like a kitchen, a living room, and a bathroom before discovering a back door. You tug it open to find a ladder leading up to a window on the second floor. You climb up it and crawl through the window into a room to see Baba Yaga tied to the bed. She says, 'Help me, kind youth! King Vyslav tied me up here. Rip me free! I’m begging you!' ";
}
if (vars.currentChoice.val === "investigateCreak") {
string = "You enter the house. The floorboards creak beneath you. You walk around and step on a board that breaks under your weight. You fall through the floor and onto the floor below, shaking the house. It is not sturdy enough to endure the motion, so it crashes down on top of you, killing you instantly.";
}
// split this up somehow? make it cooler
if (vars.currentChoice.val === "ignoreAndLeave") {
string = "You walk out of the neighborhood to see a castle on the top of a hill in the distance. You recognize this view. You suddenly remember what happened before you woke up in the fortress. Your mother left on a journey to the castle just yesterday afternoon but never returned. You went to the castle to search for her. You arrived to speak to King Vyslav. When in his throne room, he laughed in your face, revealed that he killed her, and demanded his men to put you in jail. They knocked you out and before you knew it, you were waking up alone. It is time for revenge.";
}
if (vars.currentChoice.val === "pushThroughBushes") {
string = "You push through the bushes, feeling each branch and leaf carve into your skin. It hurts, but you continue through, left with only a few scratches. Once through, you notice that the voice belongs to Baba Yaga, chained to the base of the bridge. She looks at you and says, 'Help me, kind youth! King Vyslav trapped me down here. Set me free! I’m begging you!' You notice the key to the lock of the chains lying on the ground, just out of Baba Yaga’s reach.";
}
if (vars.currentChoice.val === "walkThroughWater") {
string = "You walk into the water. Very quickly, you trip over a rock and fall. The water rushes over you and you drown.";
}
if (vars.currentChoice.val === "crossBridge") {
string = "You cross the bridge to see a castle on the top of a hill in the distance. You recognize this view. You suddenly remember what happened before you woke up in the fortress. Your mother left on a journey to the castle just yesterday afternoon but never returned. You went to the castle to search for her. You arrived to speak to King Vyslav. When in his throne room, he laughed in your face. He revealed that he had killed her, and demanded his men to put you in jail. They knocked you out and before you knew it, you were waking up alone. It is time for revenge.";
}
if (vars.currentChoice.val === "tryClimbTreeFront") {
string = "You reach up to begin to climb the tree. The branches don’t feel sturdy but are seeming to hold you. You continue up until you reach the stranger and you see that it is Baba Yaga, tied up with vines from the forest floor. She says, 'Help me, kind youth! King Vyslav trapped me up here. Rip me free! I’m begging you!'";
}
if (vars.currentChoice.val === "tryClimbTreeNext") {
string = "You climb up the tree beside the one with the stranger. Each branch feels secure and you feel confident in your choice. You are nearing the top. You take one last step to try to see the stranger’s face and slip, falling to your death."
}
if (vars.currentChoice.val === "ignoreExitForest") {
string = "You exit the forest to see a castle on the top of a hill in the distance. You recognize this view. You suddenly remember what happened before you woke up in the fortress. Your mother left on a journey to the castle just yesterday afternoon but never returned. You went to the castle to search for her. You arrived to speak to King Vyslav. When in his throne room, he laughed in your face, revealed that he killed her, and demanded his men to put you in jail. They knocked you out and before you knew it, you were waking up alone. It is time for revenge.";
}
if (vars.currentChoice.val === "exploreNoiseBush") {
string = "You veer off to the side to explore the noise in the brush. You look around and do not see anything. You begin to head back to your path when a snake jumps out of a pile of leaves and bites you. You die from its poisonous venom."
}
if (vars.currentChoice.val === "unlockChains") {
string = "You set Baba Yaga free. She says, 'Thank you, brave youth. You helped me, so I will help you. The king must be stopped. You and I were not the first to be trapped and will not be the last. I will lead you over this bridge, but then you must go defeat him, which is no easy task. If you ever need help, just shout ‘Room Room Baba Yaga,’ and I will come to your aid.' ";
}
if (vars.currentChoice.val === "beginJourney") {
string = "You walk up the hill. When you’re about halfway up, you see the guards. You run to a nearby tree and hide behind it. You peek around and see that they are not paying much attention. They seem to be eating lunch and chatting to each other. You wonder if you could run to the other side of the hill without them seeing you. On the other hand, they look like they’re almost done. Maybe they’ll leave soon.";
}
if (vars.currentChoice.val === "untieHer") {
string = "You untie Baba Yaga. She says, 'Thank you, brave youth. You helped me, so I will help you. The king must be stopped. You and I were not the first to be trapped and will not be the last. I will lead you through the rest of this neighborhood, but then you must go defeat him, which is no easy task. If you ever need help, just shout ‘Room Room Baba Yaga,’ and I will come to your aid.' ";
}
if (vars.currentChoice.val === "ripFree") {
string = "You rip Baba Yaga free. She says, 'Thank you, brave youth. You helped me, so I will help you. The king must be stopped. You and I were not the first to be trapped and will not be the last. I will lead you through the rest of this forest, but then you must go defeat him, which is no easy task. If you ever need help, just shout ‘Room Room Baba Yaga,’ and I will come to your aid' ";
}
if (vars.currentChoice.val === "continueForestBaba") {
string = "Baba Yaga leads you through the rest of the forest. At the end, you can see a castle in the distance. She points to it and says, 'Brave youth, there on the hill is the castle of the King Vyslav. You must defeat him or no one will ever be free.'";
}
if (vars.currentChoice.val === "wait1") {
string = "You stay behind the tree for what feels like forever until eventually, you hear them leave. You peek around the tree again to see one remaining guard sitting on the ground. His back is to you. You realize you could still run or you could try to incapacitate the guard and steal his uniform to blend in.";
}
if (vars.currentChoice.val === "beginJourney2") {
string = "As you make your way up the hill to the castle, you feel a new sense of familiarity. You suddenly remember what happened before you woke up in the fortress. Your mother left on a journey to the castle just yesterday afternoon but never returned. You went to the castle to search for her. You arrived to speak to King Vyslav. When in his throne room, he laughed in your face, revealed that he killed her, and demanded his men to put you in jail. They knocked you out and before you knew it, you were waking up alone. It is time for revenge.";
}
if (vars.currentChoice.val === "continueWalking") {
string = "You continue up the hill. When you’re about halfway up, you see guards. You run to a nearby tree and hide behind it. You peek around and see that they are not paying much attention. They seem to be eating lunch and chatting to each other. You wonder if you could run to the other side of the hill without them seeing you. On the other hand, they look like they’re almost done. Maybe they’ll leave soon.";
}
if (vars.currentChoice.val === "continueAbandonedBaba") {
string = "Baba Yaga leads you through the rest of the neighborhood. At the end, you can see a castle in the distance. She points to it and says, 'Brave youth, there on the hill is the castle of the King Vyslav. You must defeat him or no one will ever be free.'";
}
if (vars.currentChoice.val === "continueBridgeBaba") {
string = "Baba Yaga leads you over the bridge. At the end, you can see a castle in the distance. She points to it and says, 'Brave youth, there on the hill is the castle of the King Vyslav. You must defeat him or no one will ever be free.'";
}
if (vars.currentChoice.val === "runForIt") {
string = "You run to your left, hoping to make it out of view before any of the guards turn their heads. Before you know it, you hear clanking metal and shouting behind you. You run faster, but they are gaining on you. You remember that you can get help from Baba Yaga.";
}
if (vars.currentChoice.val === "wait2") {
string = "You stay behind the tree for what feels like forever until eventually, you hear them leave. You peek around the tree again to see one remaining guard sitting on the ground. His back is to you. You realize you could still run or you could try to incapacitate the guard and steal his uniform to blend in.";
}
if (vars.currentChoice.val === "fight2") {
string = "You reach into your pocket and grab your flashlight. You quietly approach the guard. He has not yet noticed you approaching. You lift the flashlight high above your head and smack it down onto his. It knocks him out. You steal his uniform and put it on.";
}
if (vars.currentChoice.val === "run1") {
string = "You run to the left, keeping your eye on the guard. He does not see you. You begin to feel victorious and turn to see where you're running. The guards that you just hid from stand in front of you. They attack you, killing you with their swords.";
}
if (vars.currentChoice.val === "callHelp") {
string = "'Room Room Baba Yaga!' you shout. Baba Yaga emerges from the sky. 'Brave youth, here is a magical sword. Use it for the rest of your journey!' she says, handing you the glowing weapon. You turn around and use it to fight the guards. You kill them all.";
}
if (vars.currentChoice.val === "fight1") {
string = "You reach into your pocket and grab your flashlight. You quietly approach the guard. He has not yet noticed you approaching. You lift the flashlight high above your head and smack it down onto his. It knocks him out. You steal his uniform and put it on.";
}
if (vars.currentChoice.val === "continueCastle1") {
string = "You continue to walk up the hill wearing the guard’s uniform. You are approaching the front gate, which is heavily guarded. You wonder if your disguise is enough to fool them.";
}
if (vars.currentChoice.val === "continueCastle2") {
string = "You continue walking up the hill toward the castle. As you approach the front gate, you notice that it is heavily guarded.";
}
if (vars.currentChoice.val === "continueUpHill") {
string = "You continue to walk up the hill wearing the guard’s uniform. You are approaching the front gate, which is heavily guarded. You wonder if your disguise is enough to fool them.";
}
if (vars.currentChoice.val === "walkGate1") {
string = "You walk up to the gate and smile at the guards. You blend in so well that they barely even notice you, so you walk right in. Now that you remember this place, you know exactly where to go.";
}
if (vars.currentChoice.val === "lookAnotherWay1") {
string = "You walk to the right to look for another entrance into the castle. You find a hole in the wall. You begin to try to wiggle your way in. Behind you, you hear someone say 'What are you doing?' You turn around to see another guard. He looks you up and down, realizes he does not recognize you. He yells for other guards to help capture you. You remember that you can call Baba Yaga for help.";
}
if (vars.currentChoice.val === "walkGate2") {
string = "You walk up the gate and smile at the guards. One guard says, 'What are you doing here?' You respond, 'I came to speak to the king.' The guards exchange looks and then lunge at you.";
}
if (vars.currentChoice.val === "lookAnotherWay2") {
string = "You walk to your right to search for another way in. After a while, you notice a loose brick in the exterior wall. You approach it and wiggle it out to discover a tunnel behind it. You continue fidgeting with bricks until you have made a hole wide enough to crawl through.";
}
if (vars.currentChoice.val === "walkGate3") {
string = "You walk up the gate and smile at the guards. One guard says, 'What are you doing here?' You respond, 'I came to speak to the king.' The guards exchange looks and then lunge at you. They kill you on the spot.";
}
if (vars.currentChoice.val === "lookAnotherWay3") {
string = "You walk to your right to search for another way in. After a while, you notice a loose brick in the exterior wall. You approach it and wiggle it out to discover a tunnel behind it. You continue fidgeting with bricks until you have made a hole wide enough to crawl through.";
}
if (vars.currentChoice.val === "headThrone") {
string = "You walk up the grand staircase and enter a large hallway. You see the doors to the throne room ahead of you. There are no guards on the outside of the door, but you doubt they’d ever leave the room unattended. As you approach, you notice that there is no other way in.";
}
if (vars.currentChoice.val === "runFromThem1") {
string = "You turn to run from the guards, but they are too fast. They catch you and kill you.";
}
if (vars.currentChoice.val === "callForHelp1") {
string = "'Room Room Baba Yaga!' you shout. Baba Yaga emerges and gives you a glowing, magical sword. You turn around and kill the guards chasing you. You then return to the hole in the wall.";
}
if (vars.currentChoice.val === "runFromThem2") {
string = "You turn to run from the guards, but they are too quick. They kill you instantly.";
}
if (vars.currentChoice.val === "fightWithSword") {
string = "You pull out the sword and in one motion, you take off all of their heads. You continue triumphantly into the castle. Now that your memory has been restored, you know exactly where you must go.";
}
if (vars.currentChoice.val === "crawlHole1") {
string = "You emerge and look around at the tunnel. You walk around for a long time before reaching a door. It looks like it leads to the main corridor of the castle. You open the door just enough to peek through and see three guards standing about ten feet away. They are facing away from you, but they are quiet. So any noise will draw their attention to you.";
}
if (vars.currentChoice.val === "crawlHole2") {
string = "You emerge and look around at the tunnel. You walk around for a long time before reaching a door. It looks like it leads to the main corridor of the castle. You open the door just enough to peek through and see three guards standing about ten feet away. They are facing away from you, but they are quiet. So, any noise will draw their attention to you.";
}
if (vars.currentChoice.val === "enterRoom") {
string = "'Room Room Baba Yaga!' you shout. Baba Yaga emerges from the ceiling and hands you a glowing, magical sword. 'Make me proud, brave youth,' she says.";
}
if (vars.currentChoice.val === "trySneakPast1") {
string = "You creep out, walking slowly on the balls of your feet. They have not noticed you yet. You suddenly recognize where you are now that your memory is back. You know where you must go to get revenge.";
}
if (vars.currentChoice.val === "lookAnotherWayOut1") {
string = "You continue down the tunnel and turn a corner to see five guards looking at you.";
}
if (vars.currentChoice.val === "trySneakOut") {
string = "You creep out, walking slowly on the balls of your feet. They have not noticed you yet. You suddenly recognize where you are now that your memory is back. You know where you must go to get revenge.";
}
if (vars.currentChoice.val === "enterRoomBaba") {
string = "You open the door just enough to check the room. You stick your head through and notice that no one is there, which you notice seems odd. You walk in and shut the door behind you. You recognize this room. The floor is tiled with red, white, and gold. The walls are bejeweled. A chandelier hangs overhead, reflecting light all over the space. Most importantly, the gold throne sits triumphantly in front of you, but with no king. You continue looking around until you hear footsteps and voices nearing the room.";
}
if (vars.currentChoice.val === "fightMagicalSword") {
string = "You turn around and stab each guard with the magical sword. You continue through the tunnel until you reach a door. You walk through it and you are in the main corridor of the castle. Because your memory is back, you recognize this place and know where you need to go next.";
}
if (vars.currentChoice.val === "headThrone2") {
string = "You walk up the grand staircase and enter a large hallway. You see the doors to the throne room ahead of you. There are no guards on the outside of the door, but you doubt they’d ever leave the room unattended. As you approach, you notice that there is no other way in.";
}
if (vars.currentChoice.val === "tryEscape1") {
string = "You run toward the door and open it. You find yourself standing in front of four guards and the king. 'Get him!' shouts King Vyslav.";
}
if (vars.currentChoice.val === "hideBehindThrone1") {
string = "You kneel behind the solid gold throne, shaking. The door opens and you hear people enter. You believe you hear multiple sets of footsteps, meaning that the king is actively being guarded. He sits on the throne. You hope he can not hear your heavy breathing. He inhales as if he is about to speak.";
}
if (vars.currentChoice.val === "prepareFight") {
string = "You pull the magical sword and face the door. It opens to reveal four guards and the king. 'Get him!' shouts Vyslav. You lunge toward them, killing the guards. The king turns to run from you. You chase after him, tackle him, and pin him down, your sword pressing into his neck. ";
}
if (vars.currentChoice.val === "enterRoom1") {
string = "You open the door just enough to check the room. You stick your head through and notice that no one is there, which you notice seems odd. You walk in and shut the door behind you. You recognize this room. The floor is tiled with red, white, and gold. The walls are bejeweled. A chandelier hangs overhead, reflecting light all over the space. Most importantly, the massive gold throne sits triumphantly in front of you, but with no king. You continue looking around until you hear footsteps and voices nearing the room.";
}
if (vars.currentChoice.val === "hideBehindThrone2") {
string = "You kneel behind the solid gold throne, shaking. The door opens and you hear people enter. You believe you hear multiple sets of footsteps, meaning that the king is actively being guarded. He sits on the throne. You hope he can not hear your heavy breathing. He inhales as if he is about to speak.";
}
if (vars.currentChoice.val === "tryEscape2") {
string = "You turn and run back out the door to find yourself standing in front of four guards and the king. 'Get him!' shouted King Vyslav. The guards lunge at you, killing you instantly.";
el.classList.add("redText");
}
if (vars.currentChoice.val === "attack2") {
string = "You jump out from behind the king and wrap your hands around his throat, as you have no weapon. The guards notice the commotion and run at you. They pull you off of him and throw you to the ground. You can hear the king laughing as they repeatedly stab you.";
el.classList.add("redText");
}
if (vars.currentChoice.val === "seeWhatHeSays2") {
string = "You listen. King Vyslav exclaims, 'It has been quite the day. I got to kill a couple people and I finally trapped Princess Maria. Now, I get to relax.' You realize that Princess Maria is the king’s daughter. You wonder where she could be and if she is alright.";
}
if (vars.currentChoice.val === "attack1") {
string = "You jump out from behind the throne, slashing the king’s throat with the magical sword. The guards notice and jump at you, only to each be killed as well. You’ve done it. The king is dead and you feel at peace.";
el.classList.add("greenText");
}
if (vars.currentChoice.val === "seeWhatHeSays1") {
string = "You listen. King Vyslav exclaims, 'It has been quite the day. I got to kill a couple people and I finally trapped Princess Maria. Now, I get to relax.' You realize that Princess Maria is the king’s daughter. You wonder where she could be and if she is alright.";
}
if (vars.currentChoice.val === "tryRun") {
string = "You turn around to run from the guards. They quickly catch you and kill you.";
el.classList.add("redText");
}
if (vars.currentChoice.val === "fightWithThem") {
string = "You pull out the magical sword and cut all of their heads off. You turn toward the king and tackle him. You press the sword into his neck.";
}
if (vars.currentChoice.val === "confront") {
string = "'Why did you kill my mother?!' you scream, almost in tears. He responds, 'She deserved it. A woman with no integrity does not deserve to live.' You feel the anger bubble up inside of you. You slash his neck and realize that you did it. You killed the king. You feel at peace.";
el.classList.add("greenText");
}
if (vars.currentChoice.val === "kill") {
string = "You press the sword further into his neck and slash his throat. You feel proud. The evil king is dead and you can go home.";
el.classList.add("greenText");
}
if (vars.currentChoice.val === "lookPrincess") {
string = "You spot a door behind the throne and you run through it. As soon as you are in the hallway it leads to, you hear someone yelling for help. You find the door it is coming from and open it to find Princess Maria tied up. You untie her and she tells you that she knows the way out.";
}
if (vars.currentChoice.val === "escapeWithPrincess") {
string = "The princess leads you through the maze of hallways in the castle and out a side door. As soon as you escape, she embraces you. 'Thank you,' she says. She asks for your hand in marriage. You marry her that very same day.";
el.classList.add("greenText");
}
$("#textBox").html(el);
//typewriter effect
var str = string.split("");
(function animate() {
str.length > 0 ? el.innerHTML += str.shift() : clearTimeout(running);
var running = setTimeout(animate, 50);
})();
}
})
%><div id="gameScreen">
<%
var vars = s.vars;
vars.currentChoice.val = "rememberWhat";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Feel around.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("feelAround");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[feelAround]]<div id="gameScreen">
<%
var vars = s.vars;
vars.currentChoice.val = "feelAround";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Turn it on";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("flashLight");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[flashLight]]<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "flashLight";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Try to open the door.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("openDoor");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Investigate the painting."
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("investigatePainting");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[investigatePainting]]
// [[openDoor]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.currentChoice.val = "openDoor";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Investigate the painting.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("investigatePainting");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[investigatePainting]]<div id="gameScreen">
<%
var vars = s.vars;
vars.currentChoice.val = "investigatePainting";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Enter the tunnel.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("enterTunnel");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[enterTunnel]]<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "enterTunnel";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Continue.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("continueThrough");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[continueThrough]]<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "continueThrough";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Go through the noisy tunnel.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("noisyTunnel");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Go through the quiet tunnel."
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("quietTunnel");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[quietTunnel]]
// [[noisyTunnel]]<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "noisyTunnel";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "go back through the painting you came through and try the other opening";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("quietTunnel");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Try to get to the door without being seen";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("throughNoisyDoor");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[quietTunnel]]
// [[throughNoisyDoor]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "quietTunnel";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Go through the door.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("throughQuietDoor");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Try to escape through the window.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("throughWindow");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[throughQuietDoor]]
// [[throughWindow]]<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "throughQuietDoor";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Walk through it.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("walkedThrough");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[walkedThrough]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "throughNoisyDoor";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Run to the door.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("runToDoor");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Move so they can't see you.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("moveSoCantSee");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[runToDoor]]
// [[moveSoCantSee]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "throughWindow";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Take the path through the abandoned neighborhood.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("goAbandoned");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Head toward the forest.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("goForest");
});
let el3 = document.createElement("button");
el3.classList.add("choiceButton");
el3.innerHTML = "Try the bridge.";
$("#textBox").append(el3);
// clicking changes our choice
el3.addEventListener("click", ()=>{
story.show("goBridge");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[goBridge]]
// [[goForest]]
// [[goAbandoned]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "runToDoor";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Walk through it.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("walkedThrough");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[walkedThrough]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "moveSoCantSee";
%>
<%= window.story.render("Text Box") %>
// END SCREEN HERE
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Go back.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("throughNoisyDoor");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[throughNoisyDoor]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "goBridge";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Investigate the voice under the bridge.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("investigateVoiceBridge");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Cross without exploring.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("continueWayBridge");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[investigateVoiceBridge]]
// [[continueWayBridge]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "goForest";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Investigate the voice.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("investigateVoiceForest");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Continue your way.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("continueWayForest");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[investigateVoiceForest]]
// [[continueWayForest]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "goAbandoned";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Investigate the voice.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("investigateVoiceAbandoned");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Continue your way.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("continueWayAbandoned");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[investigateVoiceAbandoned]]
// [[continueWayAbandoned]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "walkedThrough";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Take the path through the abandoned neighborhood.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("goAbandoned");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Head toward the forest.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("goForest");
});
let el3 = document.createElement("button");
el3.classList.add("choiceButton");
el3.innerHTML = "Try the bridge.";
$("#textBox").append(el3);
// clicking changes our choice
el3.addEventListener("click", ()=>{
story.show("goBridge");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[goForest]]
//[[goAbandoned]]
// [[goBridge]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "investigateVoiceAbandoned";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Try to walk up the stairs.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("tryWalkStairs");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Look for another way up.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("lookForAnotherWay");
});
let el3 = document.createElement("button");
el3.classList.add("choiceButton");
el3.innerHTML = "Turn around and continue your journey.";
$("#textBox").append(el3);
// clicking changes our choice
el3.addEventListener("click", ()=>{
story.show("continueWayAbandoned");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[continueWayAbandoned]]
// [[tryWalkStairs]]
// [[lookForAnotherWay]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "continueWayAbandoned";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Investigate the noise.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("investigateCreak");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Ignore it and leave the neighborhood.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("ignoreAndLeave");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[investigateCreak]]
// [[ignoreAndLeave]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "investigateVoiceForest";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Try climbing the tree in front.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("tryClimbTreeFront");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Try climbing the tree next to it.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("tryClimbTreeNext");
});
let el3 = document.createElement("button");
el3.classList.add("choiceButton");
el3.innerHTML = "Turn around and continue through forest.";
$("#textBox").append(el3);
// clicking changes our choice
el3.addEventListener("click", ()=>{
story.show("continueWayForest");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[tryClimbTreeFront]]
// [[tryClimbTreeNext]]
// [[continueWayForest]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "continueWayForest";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Explore the noise in the bush.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("exploreNoiseBush");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Ignore it and exit the forest.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("ignoreExitForest");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[exploreNoiseBush]]
// [[ignoreExitForest]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "investigateVoiceBridge";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Try to push through the bushes.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("pushThroughBushes");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Walk through water to get to the voice.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("walkThroughWater");
});
let el3 = document.createElement("button");
el3.classList.add("choiceButton");
el3.innerHTML = "Turn around and continue walking over the bridge.";
$("#textBox").append(el3);
// clicking changes our choice
el3.addEventListener("click", ()=>{
story.show("continueWayBridge");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[pushThroughBushes]]
// [[walkThroughWater]]
// [[continueWayBridge]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "continueWayBridge";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Continue.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("crossBridge");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[crossBridge]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Go back.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("investigateVoiceAbandoned");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[investigateVoiceAbandoned]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Untie her.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("untieHer");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Don't help her and continue through the neighborhood.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("continueWayAbandoned")
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[untieHer]]
// [[continueWayAbandoned]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "investigateCreak";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Go back.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("continueWayAbandoned");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[continueWayAbandoned]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "ignoreAndLeave";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Begin your journey to the castle.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("beginJourney");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[beginJourney]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Unlock the chains and free her.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("unlockChains");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Don’t help her and continue through the forest.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("continueWayBridge");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[unlockChains]]
// [[continueWayBridge]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Go back.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("investigateVoiceBridge");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[investigateVoiceBridge]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "tryClimbTreeFront";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Rip her free";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("ripFree");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Don’t help her and continue on your way.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("continueWayForest");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[ripFree]]
// [[continueWayForest]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "tryClimbTreeNext";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Go back.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("investigateVoiceForest");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[investigateVoiceForest]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val =window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Begin your journey to the castle.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("beginJourney");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[beginJourney]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "exploreNoiseBush";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Go back.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("continueWayForest");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[continueWayForest]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = "ignoreExitForest";
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Begin your journey to the castle.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("beginJourney");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[beginJourney]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Continue your journey over the bridge with Baba Yaga.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("continueBridgeBaba");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[continueBridgeBaba]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Wait it out.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("wait1");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[]]
// [[wait1]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Continue on your journey through the abandoned neighborhood with Baba Yaga.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("continueAbandonedBaba");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[continueAbandonedBaba]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Continue on your journey through the forest with Baba Yaga.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("continueForestBaba");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[continueForestBaba]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Begin your journey to the castle.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("beginJourney2");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[beginJourney2]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Run.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("run1");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Fight.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("fight1");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[run1]]
// [[fight1]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Continue walking.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("continueWalking");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[continueWalking]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Begin your journey to the castle.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("beginJourney2");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[beginJourney2]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Begin your journey to the castle.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("beginJourney2");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[beginJourney2]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Call for help.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("callHelp");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[callHelp]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Run";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("runForIt");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Fight.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("fight2");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[runForIt]]
// [[fight2]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Continue towards the castle.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("continueCastle1");
});
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[continueCastle1]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Continue towards the castle.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("continueCastle2");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[continueCastle2]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Go back.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("wait1");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[wait1]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Continue up the hill.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("continueUpHill");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[continueUpHill]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Walk up to the gate and try to enter that way.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("walkGate1");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Look for another way in.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("lookAnotherWay1");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[walkGate1]]
// [[lookAnotherWay1]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Walk up to the gate and try to enter that way.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("walkGate2");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Look for another way in.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("lookAnotherWay2");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[walkGate2]]
// [[lookAnotherWay2]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Walk right up to the gate.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("walkGate3");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Find another way in.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("lookAnotherWay3");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[walkGate3]]
// [[lookAnotherWay3]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Head to the throne room.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("headThrone");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[headThrone]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Run from them.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("runFromThem1");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Call for help.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("callForHelp1");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[runFromThem1]]
// [[callForHelp1]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Fight with the magical sword.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("fightWithSword");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Run from them.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("runFromThem2");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[fightWithSword]]
// [[runFromThem2]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Crawl through the hole.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("crawlHole1");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[crawlHole1]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Go back.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("continueUpHill");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[continueUpHill]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Crawl through the hole.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("crawlHole2");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[crawlHole2]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Enter the room.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("enterRoom");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[enterRoom]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Go back.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("lookAnotherWay1");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[lookAnotherWay1]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Crawl through the hole.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("crawlHole1");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[crawlHole1]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Head to the throne room.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("enterRoomBaba");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[enterRoomBaba]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Go back.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("walkGate2");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[walkGate2]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Try to sneak past them.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("trySneakPast");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Look for another way out.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("lookAnotherWayOut1");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[trySneakPast]]
// [[lookAnotherWayOut1]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Try to sneak out.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("trySneakOut");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[trySneakOut]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Enter.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("enterRoomBaba");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[enterRoomBaba]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Head to the throne room.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("headThrone");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[headThrone]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Fight with the magical sword.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("fightMagicalSword");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[fightMagicalSword]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Head to the throne room.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("headThrone2");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[headThrone2]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Hide behind the throne.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("hideBehindThrone1");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Try to escape.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("tryEscape1");
});
let el3 = document.createElement("button");
el3.classList.add("choiceButton");
el3.innerHTML = "Prepare to fight.";
$("#textBox").append(el3);
// clicking changes our choice
el3.addEventListener("click", ()=>{
story.show("prepareFight");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[hideBehindThrone1]]
// [[tryEscape1]]
// [[prepareFight]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Head to the throne room.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("enterRoomBaba");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[enterRoomBaba]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Enter the room.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("enterRoom1");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[enterRoom1]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Attack the king.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("attack1");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Wait and listen to what he says.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("seeWhatHeSays1");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[seeWhatHeSays1]]
// [[attack1]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Try to run from them.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("tryRun");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Fight with them.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("fightWithThem");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[tryRun]]
// [[fightWithThem]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Confront him about your mother.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("confront");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Kill him with no remorse.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("kill");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[confront]]
// [[kill]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Hide behind the throne.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("hideBehindThrone2");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Try to escape.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("tryEscape2");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[hideBehindThrone2]]
// [[tryEscape2]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Make a run for it.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("runForIt");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Wait it out.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("wait2");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[runForIt]]
// [[wait2]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Attack the king.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("attack2");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Wait and listen to what he says.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("seeWhatHeSays2");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[attack2]]
// [[seeWhatHeSays2]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Play Again.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("Init");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[Init]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Play again.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("Init");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[Init]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Attack the king.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("attack2");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Go look for the princess.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("lookPrincess");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[attack2]]
// [[lookPrincess]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Attack the king.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("attack1");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Go look for the princess.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("lookPrincess");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[attack1]]
// [[lookPrincess]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Play again.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("Init");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[Init]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Play again.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("Init");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[Init]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Confront him about your mother.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("confront");
});
let el2 = document.createElement("button");
el2.classList.add("choiceButton");
el2.innerHTML = "Kill him with no remorse.";
$("#textBox").append(el2);
// clicking changes our choice
el2.addEventListener("click", ()=>{
story.show("kill");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[confront]]
// [[kill]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Play again.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("Init");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[Init]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Play again.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("Init");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[Init]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Escape the castle with the princess.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("escapeWithPrincess");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[escapeWithPrincess]]
// [[]]
<div id="gameScreen">
<%
var vars = s.vars;
vars.state.started = true;
vars.currentChoice.val = window.passage.name;
%>
<%= window.story.render("Text Box") %>
<%
$(document).ready(function () {
var vars = s.vars;
// check if game started
if (vars.state.started) {
let el1 = document.createElement("button");
el1.classList.add("choiceButton");
el1.innerHTML = "Play again.";
$("#textBox").append(el1);
// clicking changes our choice
el1.addEventListener("click", ()=>{
story.show("Init");
});
}
})
%>
<%= window.story.render("Back Drop") %>
</div>
// [[Init]]
// [[]]