<% window.story.render("init")
s.current_car = "train cart 4"%>
<div class="center">
<%
s.loops = window.visited;
switch(window.visited("Start")){
case 1:
%> ... My head feels a little fuzzy... Where am I? <%
break
case 2:
%> ... What just happened? <%
break
case 3:
%> ... It doesn't seem like this will ever stop... <%
break
}
if (window.visited("Start")>3){ %> Here we go again... <% }
%>
<br>
<br>
[[Open your eyes|train cart 4]]
</div>
# <%= s.hour%>:<%if(s.minute<10){%>0<%}%><%= s.minute%> <%= s.AmPm%>
<link rel="stylesheet" href="https://indestructibletype.com/fonts/Jost.css" type="text/css" charset="utf-8" />
<div id="inventory">
<%= window.story.render("Inventory") %>
</div>
<div id="nar" class="narration">
</div>
<img src="images/eye.png" id="eye" onclick="window.story.change_interact('observe')"></img>
<div class="dialogue">
</div>
<div class="portrait">
</div>
<div class="cart">
<%= s.current_car %>
</div>
<img src="images/minimap.png" class="map">
<%
var name = "Conductor";
s.dialogue.speaking_to = name;
var items = {
"Suitcase":
function(){s.dialogue.speak("This is yours! I have no use for it.")},
"Papers":
function(){s.characters[s.c[name]].inv.push("Papers");
s.inv.remove_item("Papers");s.inv.add_item("Key");
s.dialogue.speak("Appreciation is all mine! These line up wonderfully nice, just my favorite version of events. you certainly do not intend to disappoint. What a beautiful thing to witness! Here is but a small token, a key to your own belongings, I’ve kept for this moment only. Best of luck traveler, now leave me be while I still have a path to follow.");s.dialogue.choices=[];renderToSelector("#inventory","Inventory");
console.log(s.inv.content);
},
"Key":
function(){s.dialogue.speak("I gave this to you! Why would I need it back? I think you will find it... very... useful....");
},
"Magnifying Glass":
function(){s.dialogue.speak("That object looks like it would be very useful to find something most people are unable to see... I don't have any use for it... but you might.");
},
"Recorder":
function(){s.dialogue.speak("I have no need for this.");
},
"Journal":
function(){s.dialogue.speak("I have no need for this.");
},
"Book":
function(){s.dialogue.speak("I have no need for this.");
},
"Cube":
function(){s.dialogue.speak("I have no need for this.");
},
"Toy Gun":
function(){s.dialogue.speak("I have no need for this.");
}
};
s.characters[s.c[name]].items = items;
%>
<div id="choices"></div>
<div class="dialogue" onclick="window.story.skip()">
<div id="dialogue"></div>
</div>
<img src="images/conductor.png" class="character_portrait">
<div class="character_title">
The <%= s.characters[s.c[name]].name %>
</div>
<%
switch(s.characters[s.c[name]].state){
case "initial":
var next = function(){
s.dialogue.choices = [
" Where is the train headed?",
" Why do you talk like that?", " Who is that?"]
s.dialogue.answers = [
function(){s.dialogue.speak(" Headed? Ahead? An ending you mean? Well it depends on your view! What a glorious thing to have different perspectives! We all have our own destinations no doubt! Here and there and to the end we go! I keep track of where who and when, but I am missing part to my purpose! Passenger papers! Maybe it could help you find where you want to go?");
},
function(){s.dialogue.speak(" *his head turns, the smile flashing more gum and clenched teeth seemingly more tense* No secrets here! I'm an open book! Everything I say is my own. I speak my truths!");
},
function(){s.dialogue.speak(" This boy? An interesting little fellow! He’s not much of a talker, but he seems to love staying out of sight! And who am I to not let one follow their desires! their goals! their destined destinations!");
}
]
s.dialogue.speak(" Anything I can do for you?")
}
if (s.characters[s.c[name]].spoken_to == 0){
s.dialogue.next = next;
s.dialogue.choices = ["Thanks?","Will do!"]
s.dialogue.answers = [
function(){s.dialogue.speak("My pleasure.....")
;s.dialogue.is_next = true
renderToSelector("#continue","continue")
} ,
function(){s.dialogue.speak(" Don't hesitate... Every moment could be your last... Have a wonderful trip!")
;s.dialogue.is_next = true
renderToSelector("#continue","continue");
}
]
s.dialogue.speak(" Welcome aboard! I see you have everything with you... make yourself at home! Let me know if you need... Anything! Anything at all... I can be very helpful.....")
}
if (s.characters[s.c[name]].spoken_to > 0){
next();
}
break
case "asleep":
s.dialogue.choices = []
s.dialogue.answers = []
s.dialogue.speak(" The " + name + " is asleep")
break
}
%>
<% s.characters[s.c[name]].spoken_to ++%>
//INTERACTIONS
<%= window.story.render("Interact") %>
//CLOCK
<%= window.story.render("Clock") %>
//DIALOGUE
<%= window.story.render("Dialogue") %>
//INVENTORY
<%= window.story.render("Inv Manager") %>
//CHARACTERS
<%= window.story.render("Characters") %>
//ROOMS
<%= window.story.render("Travel") %><%= window.story.render("Header") %>
<!-- BACKGROUND -->
<img class="background" src="images/train cart 2.jpg" onclick="window.story.observe([
'This car seems very empty...',
'Something feels ominous about this room...',
'I wonder where this train is taking me...'
])">
<!-- CHARACTERS -->
<% if (s.r_place == window.passage.name){%>
<%= window.story.render("report") %>
<% } %>
<image class="character old_crone"
src="images/Old crone1.png"
onclick="window.story.talk_to(
'Old Crone',[
'This woman gives me the chills'
])">
<div id="char">
<% if(s.reset && s.minute == 0){ %>
<%= window.story.render("Death") %>
<% } %>
</div>
<% if(s.can_enter){window.story.think("You reach for the door to the front car but the handle moves on its own. You hear a click and the door slides open.")} %>
<div id="continue"></div>
<div class="marker" style="top:72.3%"> </div>
<div class="move" style="top:58.6%"
onclick="window.story.travel('train cart 2')"><img src="images/up_arrow.png" style="left:15%;top:-15%;position:absolute;"> </div>
<div class="move" style="top:85.5%;width:100px;height:56px; left:132%"
onclick="window.story.travel('front cart')"> <img src="images/down_arrow.png" style="left:15%;top:-15%;position:absolute;"></div>
<span class="under_c">
<div class="button give" onclick="window.story.change_interact('give')">Give</div>
<div class="button leave_convo" onclick="window.story.leave_convo()">Leave</div>
</span>
<span class="choices">
<%
for (let i = 0; i < s.dialogue.choices.length; i++) {
%> <div class="button" onclick="window.story.choose(<%= i %>)"> <%= s.dialogue.choices[i] %> </div> <%
}
%>
</span><div class="items">
<% if (s.inv.content.length == 0){ %>
Nothing.
<br>
<% } else{ for (let i = 0; i < s.inv.content.length; i++) {
%>
<img class="item" src="images/<%= s.inv.content[i] %>.png"
onclick="window.story.select(<%= i %>)">
<br>
<% }} %>
</div>
<%= window.story.render("Header") %>
<!-- BACKGROUND -->
<img class="background" src="images/train cart 2.jpg" onclick="window.story.observe([
'This car seems very empty...',
'Something feels ominous about this room...',
'I wonder where this train is taking me...'
])">
<!-- CHARACTERS -->
<% if (s.r_place == window.passage.name){%>
<%= window.story.render("report") %>
<% } %>
<div id="father">
<image class="character father"
src="images/father figure.png"
onclick="window.story.talk_to(
'Father',[
'This man looks very entranced in his work'
])">
</div>
<div id="daughter">
<image class="character daughter"
src="images/Daughter1.png"
onclick="window.story.talk_to(
'Daughter',[
'A mischievous looking girl'
])">
</div>
<image class="character mother"
src="images/mother figure.png"
onclick="window.story.talk_to(
'Mother',[
'A very dignified looking woman'
])">
<div id="char">
<% if(s.reset && s.minute == 0){ %>
<%= window.story.render("Death") %>
<% } %>
</div>
<div id="continue"></div>
<div class="marker" style="top:58.6%"> </div>
<div class="move" style="top:44.9%"
onclick="window.story.travel('train cart 3')"> <img src="images/up_arrow.png" style="left:15%;top:-15%;position:absolute;"></div>
<div class="move" style="top:72.3%"
onclick="window.story.travel('train cart 1')"><img src="images/down_arrow.png" style="left:15%;top:-15%;position:absolute;"> </div><%= window.story.render("Header") %>
<!-- BACKGROUND -->
<img class="background" src="images/train cart 2.jpg" onclick="window.story.observe([
'This car seems very empty...',
'Something feels ominous about this room...',
'I wonder where this train is taking me...'
])">
<!-- CHARACTERS -->
<% if (s.r_place == window.passage.name){%>
<%= window.story.render("report") %>
<% } %>
<image class="character widow"
src="images/widow1.png"
onclick="window.story.talk_to(
'Widow',[
'A very somber woman'
])">
<image class="character soldier"
src="images/soldier1.png"
onclick="window.story.talk_to(
'Soldier',[
'An unstable looking man'
])">
<div id="char">
<% if(s.reset && s.minute == 0){ %>
<%= window.story.render("Death") %>
<% } %>
</div>
<div id="continue"></div>
<div class="marker" style="top:44.9%"> </div>
<div class="move" style="top:31.2%"
onclick="window.story.travel('train cart 4')"><img src="images/up_arrow.png" style="left:15%;top:-15%;position:absolute;"> </div>
<div class="move" style="top:58.6%"
onclick="window.story.travel('train cart 2')"><img src="images/down_arrow.png" style="left:15%;top:-15%;position:absolute;"> </div><%= window.story.render("Header") %>
<!-- BACKGROUND -->
<img class="background" src="images/train cart 2.jpg" onclick="window.story.observe([
'This car seems very empty...',
'Something feels ominous about this room...',
'I wonder where this train is taking me...'
])">
<!-- CHARACTERS -->
<% if (s.r_place == window.passage.name){%>
<%= window.story.render("report") %>
<% } %>
<div id="wiz">
<%= window.story.render("wiz") %>
</div>
<% renderToSelector("#wiz", "wiz") %>
<div id="char">
<% if(s.reset && s.minute == 0){ %>
<%= window.story.render("Death") %>
<% } %>
</div>
<div id="continue"></div>
<div class="marker" style="top:31.2%"> </div>
<div class="move" style="top:17.5%" onclick="window.story.travel('caboose')"><img src="images/up_arrow.png" style="left:15%;top:-15%;position:absolute;"> </div>
<div class="move" style="top:44.9%"
onclick="window.story.travel('train cart 3')"><img src="images/down_arrow.png" style="left:15%;top:-15%;position:absolute;"> </div><%= window.story.render("Header") %>
<!-- BACKGROUND -->
<img class="background" src="images/caboose.jpg" onclick="window.story.observe([
'This car seems very empty...',
'Something feels ominous about this room...',
'I wonder where this train is taking me...'
])">
<!-- ITEMS -->
<% if(s.inv.items['Toy Gun'].state == false){ %>
<img class="hover papers" src="images/toygun.png" onclick="window.story.take_item('Toy Gun')">
<% } %>
<!-- CHARACTERS -->
<image class="character conductor"
src="images/conductor1.png"
onclick="window.story.talk_to(
'Conductor',[
'This guy seems very familiar...',
'I wonder if we know each other from somewhere...',
'I feel like this guy is hiding something...'
])">
<image class="character little_boy"
src="images/litteboy1.png"
onclick="window.story.talk_to(
'Little Boy',[
'He seems very scared...',
'I wonder what has him so frightened...',
'Where are his parents?'
])">
<div id="char">
<% if(s.reset && s.minute == 0){ %>
<%= window.story.render("Death") %>
<% } %>
</div>
<div id="continue"></div>
<div class="marker" style="top:17.5%"> </div>
<div class="move" style="top:31.5%" onclick="window.story.travel('train cart 4')"><img src="images/down_arrow.png" style="left:15%;top:-15%;position:absolute;"> </div>
<%= window.story.render("Header") %>
<!-- BACKGROUND -->
<img class="background hover" src="images/front room.jpg" onclick="window.story.talk_to(
'Engineer',[
'The room is aglow with unnatural light, and the walls are made of glass, revealing the vast expanse of a starry space between worlds.',
'A dimly lit space that seems to be larger than realistically possible'
])">
<div id="char"></div>
<div id="continue"></div>
<div class="marker" style="top:85.5%;width:100px;height:56px; left:132%"> </div>
<div class="move" style="top:72.3%"
onclick="window.story.travel('train cart 1')"><img src="images/up_arrow.png" style="left:15%;top:-15%;position:absolute;"> </div>
<%
var name = "Little Boy";
s.dialogue.speaking_to = name;
var items = {
"Suitcase":
function(){s.dialogue.speak("")},
"Papers":
function(){s.dialogue.speak(" The boy starts to write: I can hear others' thoughts more than my own, I'm trapped in my own mind and at the end of this train. I don't want to be eaten by the bad man, all he thinks about is eating me and I'm scared. Please don’t let him do that to me, mister.");s.characters[s.c[name]].state="helpful";s.dialogue.choices = ["Follow me, i need you to write down somebody's thoughts", "stay here"]
s.dialogue.answers = [
function(){s.dialogue.speak(" The boy nods his head.")
s.reading=true;s.inv.remove_item("Papers");
window.story.think("The next person I talk to the little boy will write down their thoughts...");
},
function(){s.dialogue.speak(" The boy nods his head.")}
]
},
"Key":
function(){s.dialogue.speak("");
},
"Magnifying Glass":
function(){s.dialogue.speak("");
},
"Recorder":
function(){s.dialogue.speak("");
},
"Journal":
function(){s.dialogue.speak("");
},
"Book":
function(){s.dialogue.speak("");
},
"Cube":
function(){s.dialogue.speak("");
},
"Toy Gun":
function(){s.dialogue.speak("");
}
};
s.characters[s.c[name]].items = items;
%>
<div id="choices"></div>
<div class="dialogue" onclick="window.story.skip()">
<div id="dialogue"></div>
</div>
<img src="images/Boy.png" class="character_portrait">
<div class="character_title">
The <%= s.characters[s.c[name]].name %>
</div>
<%
switch(s.characters[s.c[name]].state){
case "initial":
if (s.characters[s.c[name]].spoken_to == 0){
//2
s.dialogue.next = function(){
s.dialogue.choices = ["Do you not want to talk to me?"]
s.dialogue.answers = [
function(){s.dialogue.speak(" The boy makes motions with his hands as if scribbling on a paper. He points to you then himself.");window.story.think("He wants me to get something for him? Seems he isn’t the talkative type.")}
]
s.dialogue.speak(" He looks from side to side and then steps out from his hiding place.")
}
//1
s.dialogue.choices = ["Hey buddy"]
s.dialogue.answers = [
function(){s.dialogue.speak(" His expression unchanged, he shakes his head more vigorously");s.dialogue.is_next = true;renderToSelector("#continue","continue");}
]
s.dialogue.speak(" The little boy stares at you with a intense fearful gaze, while slowly shaking his head.")
}
if (s.characters[s.c[name]].spoken_to > 0){
s.dialogue.choices = []
s.dialogue.answers = [
function(){s.dialogue.speak("")}
]
s.dialogue.speak(" the boy makes motions with his hands as if scribbling on a paper. He points to you then himself.")
}
break
case "helpful":
s.dialogue.choices = ["Follow me, i need you to write down somebody's thoughts", "stay here, I’ll make sure the bad man won’t see you"]
s.dialogue.answers = [
function(){s.dialogue.speak(" The boy nods his head.")
s.reading=true;s.inv.remove_item("Papers");
window.story.think("The next person I talk to the little boy will write down their thoughts...");
},
function(){s.dialogue.speak(" The boy nods his head.")}
]
s.dialogue.speak(" The boy makes motions with his hands as if scribbling on a paper. He points to you then himself.")
break
case "asleep":
s.dialogue.choices = []
s.dialogue.answers = []
s.dialogue.speak(" The " + name + " is asleep")
break
}
%>
<% s.characters[s.c[name]].spoken_to ++%><%
var name = "Widow";
s.dialogue.speaking_to = name;
var items = {
"Suitcase":
function(){s.dialogue.speak("")},
"Papers":
function(){s.dialogue.speak("");
},
"Key":
function(){s.dialogue.speak("");
},
"Magnifying Glass":
function(){s.dialogue.speak("");
},
"Recorder":
function(){s.dialogue.speak("");
},
"Journal":
function(){s.dialogue.speak("");
},
"Book":
function(){s.dialogue.speak("");
},
"Cube":
function(){s.dialogue.speak("");
},
"Toy Gun":
function(){s.dialogue.speak("");
}
};
s.characters[s.c[name]].items = items;
%>
<div id="choices"></div>
<div class="dialogue" onclick="window.story.skip()">
<div id="dialogue"></div>
</div>
<img src="images/Widow.png" class="character_portrait">
<div class="character_title">
The <%= s.characters[s.c[name]].name %>
</div>
<%
switch(s.characters[s.c[name]].state){
case "initial":
if (s.characters[s.c[name]].spoken_to == 0){
s.dialogue.choices = ["What happened?", "If I may ask, do you know when you boarded this train?"]
s.dialogue.answers = [
function(){
s.dialogue.next= function(){s.dialogue.speak(" The day of the funeral I made up my mind to search for him in the forest. I was chased by something... horrible... until I eventually I made it out... That’s where I saw a train station that I’ve never seen before. I thought maybe he got on this train and never came back, so I decided to leave everything behind to see where it goes.")};
s.dialogue.is_next = true;
renderToSelector("#continue", "continue");
s.dialogue.speak(" ...The gate to our sheep pen broke open and all of our sheep were slaughtered... I begged my husband not to go after them but he did not heed my words. He wanted to hunt down whatever it was that did it. It had been only a week since his disappearance... His mother decided to throw away 'false hopes' and prepare for his funeral.")
},
function(){
s.dialogue.speak(" I boarded this train not too long ago, letting the train take me far away from my mother-in-law...")
}
]
s.dialogue.speak(" ... My husband... He's gone... What will become of me now that he is gone...")
}
if (s.characters[s.c[name]].spoken_to > 0){
s.dialogue.choices = ["What happened?", "If I may ask, do you know when you boarded this train?"]
s.dialogue.answers = [
function(){
s.dialogue.next= function(){s.dialogue.speak(" The day of the funeral I made up my mind to search for him in the forest. I was chased by something... horrible... until I eventually I made it out... That’s where I saw a train station that I’ve never seen before. I thought maybe he got on this train and never came back, so I decided to leave everything behind to see where it goes.")};
s.dialogue.is_next = true;
renderToSelector("#continue", "continue");
s.dialogue.speak(" ...The gate to our sheep pen broke open and all of our sheep were slaughtered... I begged my husband not to go after them but he did not heed my words. He wanted to hunt down whatever it was that did it. It had been only a week since his disappearance... His mother decided to throw away 'false hopes' and prepare for his funeral.")
},
function(){
s.dialogue.speak(" I boarded this train not too long ago, letting the train take me far away from all of those miserable people who think my husband is dead....")
}
]
s.dialogue.speak(" I miss him so much... What shall I do...")
}
break
case "cured":
s.dialogue.speak(" Who are you? Something feels missing... What am I doing on this train?")
s.dialogue.choices["You seem better... Kind of"]
s.dialogue.answers = [
function(){s.dialogue.speak("......")}
]
break
case "asleep":
s.dialogue.choices = []
s.dialogue.answers = []
s.dialogue.speak(" The " + name + " is asleep")
break
}
%>
<% s.characters[s.c[name]].spoken_to ++%><%
var name = "Wizard";
s.dialogue.speaking_to = name;
var items = {
"Suitcase":
function(){ if(s.characters[s.c[name]].state=="Awake"){
s.dialogue.speak("I have no need for this.");}
else{s.dialogue.speak("He is asleep.")}
},
"Papers":
function(){ if(s.characters[s.c[name]].state=="Awake"){
s.dialogue.speak("I have no need for this.");}
else{s.dialogue.speak("He is asleep.")}
},
"Key":
function(){ if(s.characters[s.c[name]].state=="Awake"){
s.dialogue.speak("I have no need for this.");}
else{s.dialogue.speak("He is asleep.")}
},
"Magnifying Glass":
function(){ if(s.characters[s.c[name]].state=="Awake"){
s.dialogue.speak("I have no need for this.");}
else{s.dialogue.speak("He is asleep.")}
},
"Recorder":
function(){ if(s.characters[s.c[name]].state=="Awake"){
s.dialogue.speak("I have no need for this.");}
else{s.dialogue.speak("He is asleep.")}
},
"Journal":
function(){ if(s.characters[s.c[name]].state=="Awake"){
s.dialogue.speak("I have no need for this.");}
else{s.dialogue.speak("He is asleep.")}
},
"Book":
function(){if(s.characters[s.c[name]].state=="Awake"){
s.dialogue.speak(" The wizard excitedly reaches for the book, pauses for a second, then pulls out a strange glowing object. I think you’ll need this more than I will now. It holds both endless power, and potential for frustration. He places it in your hands and grabs the book simultaneously . He falls backwards into his original slouched posed, once again at rest");
s.inv.remove_item("Book");
s.dialogue.choices=[];
s.inv.add_item("Cube");
window.story.wizard="images/wizard1.png";
renderToSelector("#wiz","wiz");
s.characters[s.c[name]].state = "initial";
}
else{s.dialogue.speak("He is asleep.")}
},
"Cube":
function(){
if(s.characters[s.c[name]].state=="Awake"){
s.dialogue.speak("I have no need for this.");}
else{s.dialogue.speak("He is asleep.")}
},
"Toy Gun":
function(){ if(s.characters[s.c[name]].state=="Awake"){
s.dialogue.speak("I have no need for this.");}
else{s.dialogue.speak("He is asleep.")}
}
};
s.characters[s.c[name]].items = items;
%>
<div id="choices"></div>
<div class="dialogue" onclick="window.story.skip()">
<div id="dialogue"></div>
</div>
<img src="images/Wizard.png" class="character_portrait">
<div class="character_title">
The <%= s.characters[s.c[name]].name %>
</div>
<%
switch(s.characters[s.c[name]].state){
case "initial":
if (s.characters[s.c[name]].spoken_to == 0){
s.dialogue.choices = ["Take the grimoire", "Nudge him awake"]
s.dialogue.answers = [function(){s.dialogue.speak("You slowly pry the book from his clutches.The wizard remains asleep, unaware that his preciou item has been pilfered. You flip through the pages but all the writing is in a script you cannot understand. Who knows, this could be useful in the future.");
s.inv.add_item('Book'); s.inv.items['Book'].state=true;},
function(){s.dialogue.speak("You attempt to nudge the wizard awake, but he has no reaction.")}]
s.dialogue.speak(" You watch as his small frame rises and falls in a peaceful rhythm, as if nothing in the world could wake him. His hands are clutching a large esoteric grimoire with unconscious importunity.")
}
if (s.characters[s.c[name]].spoken_to > 0){
if (s.inv.items['Book'].state == false){
s.dialogue.choices = ["Take the grimoire", "Nudge him awake"]
s.dialogue.answers = [function(){s.dialogue.speak("You slowly pry the book from his clutches. The wizard remains asleep, unaware of your presence. You flip through the pages but all the writing is in a script you cannot understand. Who knows, this could be useful in the future.");
s.inv.add_item('Book');
s.characters[s.c[name]].state = "initial";
s.inv.items['Book'].state=true;},
function(){s.dialogue.speak("You attempt to nudge the wizard awake, but he has no reaction.")}]
}else{ s.dialogue.choices = ["Nudge him awake"]
s.dialogue.answers = [function(){s.dialogue.speak("You attempt to nudge the wizard awake, but he has no reaction.")}] }
s.dialogue.speak(" The Wizard is fast asleep.")
}
break
case "Awake":
if (s.characters[s.c[name]].spoken_to == 0){
//3
var next = function(){
s.dialogue.choices = ["I’ll let you know if I see it", "Hey are you a wizard? Like you use magic and stuff?"]
s.dialogue.answers = [
function(){s.dialogue.speak("Please do! The wizard waddles back to his seat.")},
function(){s.dialogue.speak("You could say that... I like the word... Wizard. Yeah I'm a wizard. What else could I be anyways?")}
]
s.dialogue.speak(" Oh shit! Shit shit shit! All this rambling and i forgot my whole purpose here! The grimoire ! A large blue book with an eye on the cover! It must be around here somewhere! I need it in order to ensure that I do not interfere with the events on this train. Using it puts me into a deep sleep, can you help me find it?")
}
//2
s.dialogue.next = function(){
s.dialogue.is_next = true;
s.dialogue.next = next;
s.dialogue.choices = ["My position?", "How do you know this?", "Where are we going?"]
s.dialogue.answers = [
function(){s.dialogue.speak("Oh man you really don’t know anything. Your role isn’t something I'm too informed to speak on. I Just know that we all rely on you to do your job, otherwise, we have to do this all over again. Considering you’re lack of awareness here, this may take longer than I thought.");
s.dialogue.choices = ["My position?", "How do you know this?", "Where are we going?"];},
function(){s.dialogue.speak("I really hope this state of ignorance is of your own design… Most individuals who take this journey are not even aware of where they are going or how they got here. I trained my whole life for this voyage, I know exactly how to arrive safely, and I do so with conscious intention.");
s.dialogue.choices = ["My position?", "How do you know this?", "Where are we going?"];},
function(){s.dialogue.speak("To be honest, I’m not sure where we end up. I only studied the methods on how to assist the journey. I have heard of an engineer who runs this train, he would probably know, but I assume he won't be the easiest bloke to find."); s.dialogue.choices = ["My position?", "How do you know this?", "Where are we going?"];}
]
s.dialogue.speak("I’d expect more from somebody in your position. We’re in your care after all.")
}
//1
s.dialogue.choices = ["hello again?"]
s.dialogue.answers = [
function(){s.dialogue.speak("Uh yeah you’ve been here before, possibly many times. Shouldn’t you know that? "); s.dialogue.is_next = true;
renderToSelector("#continue","continue");}
]
s.dialogue.speak(" Hello again, stranger. You look confused, is everything alright?")
}
if (s.characters[s.c[name]].spoken_to > 0){
s.dialogue.choices = ["I’ll let you know if I see it", "Hey are you a wizard? Like you use magic and stuff?"]
s.dialogue.answers = [
function(){s.dialogue.speak("Please do!” The wizard waddles back to his seat.")},
function(){s.dialogue.speak("You could say that... I like the word... Wizard. Yeah I'm a wizard. What else could I be anyways?")}
]
s.dialogue.speak(" Oh shit! Shit shit shit! All this rambling and i forgot my whole purpose here! The grimoire ! A large blue book with an eye on the cover! It must be around here somewhere! I need it in order to ensure that I do not interfere with the events on this train. Using it puts me into a deep sleep, can you help me find it?")
}
}
%>
<% s.characters[s.c[name]].spoken_to ++%><%
var name = "Reporter";
s.dialogue.speaking_to = name;
var items = {
"Suitcase":
function(){s.dialogue.speak("")},
"Papers":
function(){s.dialogue.speak("");
},
"Key":
function(){s.dialogue.speak("");
},
"Magnifying Glass":
function(){s.dialogue.speak("");
},
"Recorder":
function(){s.dialogue.speak("");
},
"Journal":
function(){s.dialogue.speak("");
},
"Book":
function(){s.dialogue.speak("");
},
"Cube":
function(){s.dialogue.speak("");
},
"Toy Gun":
function(){s.dialogue.speak("");
}
};
s.characters[s.c[name]].items = items;
%>
<div id="choices"></div>
<div class="dialogue" onclick="window.story.skip()">
<div id="dialogue"></div>
</div>
<img src="images/Reporter.png" class="character_portrait">
<div class="character_title">
The <%= s.characters[s.c[name]].name %>
</div>
<%
switch(s.characters[s.c[name]].state){
case "initial":
var next = function(){
s.dialogue.choices = ["uh yeah i’ll let you know"]
s.dialogue.answers = [function(){s.dialogue.speak("The reporter flashes you a quick smile and then moves past you to question somebody else.")}]
s.dialogue.speak(" One last thing I have to say. a personal matter. Have you seen a little boy? My son. He's very precious to me and I’m worried for him you see. Silly boy is always hiding around, I’ve been looking for him for a long time, and I’m tired of this game. I hope he’s not lost somewhere dangerous… definitely would prefer him to be in one piece!")
}
if (s.characters[s.c[name]].spoken_to == 0){
s.dialogue.next = next;
s.dialogue.choices = ["I haven't seen anything yet, but i’ll let you know"]
if(window.visited("Start")>1){s.dialogue.choices.push("somethings going on here, time is repeating itself!")}
s.dialogue.answers = [
function(){s.dialogue.speak(" Interesting… well let me know if anything comes back to you, or anything happens that I am not aware. I have big hopes about this place, you see.");s.dialogue.is_next=true;renderToSelector("#continue","continue");},
function(){s.dialogue.speak("Interesting… I believe you may have something here. Good enough for a meal I see ! Garrrrragh! The buttons on his chest pop off as a heavily teethed mouth emerges from the bulbous stomach. Contracting like a python the jaws easily enveloping your body whole and your consciousness quickly fades from the intense fear.");s.death=true;s.dialogue.choices=["Pass out"];s.dialogue.answers=[function(){window.story.show("Start")}];}
]
s.dialogue.speak(" Greetings, how are you? You’re looking fantastic today! I’d love to get to know you! It’s my job anyway. I’m a reporter for The Times you see. First things first! I have to ask…. have you seen any unusual occurrences around this train? I need to know any details you can provide! I have an Inkling that a great story can be made on. I just have to find it you see!")
}
if (s.characters[s.c[name]].spoken_to > 0){
s.dialogue.choices = ["uh yeah i’ll let you know"]
s.dialogue.answers = [function(){s.dialogue.speak("The reporter flashes you a quick smile and then moves past you to question somebody else.")}]
s.dialogue.speak(" Have you seen my boy? I'm very worried about him...")
}
break
case "asleep":
s.dialogue.choices = []
s.dialogue.answers = []
s.dialogue.speak(" The " + name + " is asleep")
break
}
%>
<% s.characters[s.c[name]].spoken_to ++%><%
var name = "Soldier";
s.dialogue.speaking_to = name;
var items = {
"Suitcase":
function(){s.dialogue.speak("I have no need for this.")},
"Papers":
function(){s.dialogue.speak("I have no need for this.");
},
"Key":
function(){s.dialogue.speak("I have no need for this.");
},
"Magnifying Glass":
function(){s.dialogue.speak("I have no need for this.");
},
"Recorder":
function(){s.dialogue.speak("I have no need for this.");
},
"Journal":
function(){s.dialogue.speak("I have no need for this.");
},
"Book":
function(){s.dialogue.speak("I have no need for this.");
},
"Cube":
function(){s.dialogue.speak("I have no need for this.");
},
"Toy Gun":
function(){s.dialogue.speak("I have no need for this.");
}
};
s.characters[s.c[name]].items = items;
%>
<div id="choices"></div>
<div class="dialogue" onclick="window.story.skip()">
<div id="dialogue"></div>
</div>
<img src="images/Soldier.png" class="character_portrait">
<div class="character_title">
The <%= s.characters[s.c[name]].name %>
</div>
<%
switch(s.characters[s.c[name]].state){
case "initial":
if (s.characters[s.c[name]].spoken_to == 0){
s.dialogue.choices = ["Do you know why we are here?", "Where are you from?"]
s.dialogue.answers = [
function(){s.dialogue.speak("You are nothing but a prop to politics. Don't keep your hopes up recruit. Now go ahead and do your job.")},
function(){s.dialogue.speak("The last thing I remember was that I was in the trenches fighting a war against the Germans, there was blood everywhere, detonations going off in every direction. I saw a blinding light from above and the last thing I remember was my ears ringing and everything went blank... I woke up sitting on this seat.")
s.dialogue.choices=["I see..."];
s.dialogue.answers=[function(){
s.dialogue.speak(" I found these next to my seat. They seem like important documents related to the German spy network. There’s a dossier for everyone on this train. We don’t have clearance to look at these, so make sure you get this to the officer on the far end of the train.");
s.inv.add_item("Papers");
}]
}
]
s.dialogue.speak(" Who do you think your lookin at? Huh? If you need something from me spit it out!")
}
if (s.characters[s.c[name]].spoken_to > 0){
s.dialogue.choices = ["Do you know why we are here?", "Where are you from?"]
s.dialogue.answers = [
function(){s.dialogue.speak("You are nothing but a prop to politics. Don't keep your hopes up recruit. Now go ahead and do your job.")},
function(){s.dialogue.speak("The last thing I remember was that I was in the trenches fighting a war against the Germans, there was blood everywhere, detonations going off in every direction. I saw a blinding light from above and the last thing I remember was my ears ringing and everything went blank... I woke up sitting on this seat.")
s.dialogue.choices=["I see..."];
s.dialogue.answers=[function(){
s.dialogue.speak(" I found these next to my seat. They seem like important documents related to the German spy network. There’s a dossier for everyone on this train. We don’t have clearance to look at these, so make sure you get this to the officer on the far end of the train.");
s.inv.add_item("Papers");
}]
}
]
s.dialogue.speak(" What do you want.")
}
break
case "asleep":
s.dialogue.choices = []
s.dialogue.answers = []
s.dialogue.speak(" The " + name + " is asleep")
break
}
%>
<% s.characters[s.c[name]].spoken_to ++%><%
var name = "Father";
s.dialogue.speaking_to = name;
var items = {
"Suitcase":
function(){s.dialogue.speak("")},
"Papers":
function(){s.dialogue.speak("");
},
"Key":
function(){s.dialogue.speak("");
},
"Magnifying Glass":
function(){s.dialogue.speak("");
},
"Recorder":
function(){s.dialogue.speak("");
},
"Journal":
function(){s.dialogue.speak("What do you think you are doing with my journal! Give it here.");s.dialogue.choices=[]; s.inv.remove_item("Journal");
},
"Book":
function(){s.dialogue.speak("");
},
"Cube":
function(){s.dialogue.speak("");
},
"Toy Gun":
function(){s.dialogue.speak("");
}
};
s.characters[s.c[name]].items = items;
%>
<div id="choices"></div>
<div class="dialogue" onclick="window.story.skip()">
<div id="dialogue""></div>
</div>
<img src="images/Father.png" class="character_portrait">
<div class="character_title">
The <%= s.characters[s.c[name]].name %>
</div>
<%
switch(s.characters[s.c[name]].state){
case "initial":
var next = function(){
s.dialogue.choices=["how do you know she’s a demon?", "Is anyone else on this train a demon?"]
s.dialogue.answers=[function(){
s.dialogue.speak("Nothing escapes my eyes. I once made a deal with a demon myself. I spared their life in exchange for the power to see magical energy. I regret making that trade. It wasn’t worth it. Always better to kill them.");
s.dialogue.choices=[];
},
function(){
s.dialogue.speak("I’ve been too focused on her to take notice of anyone else. Now begone. I must protect my family. he puts his head down and begins writing in his journal");
s.dialogue.choices=[];
}
]
s.dialogue.speak("...Fine. My good eye tells me you’re not one of them. It wouldn’t hurt to warn you. I’m preparing to kill a demon. She is a cunning beast, taking the form of a feeble old woman on the passenger car ahead. She can’t fool me though. Keep your wits about you.")
}
s.dialogue.choices = ["what are you doing that’s so important", "Give your daughter some attention"]
if(s.distract){s.dialogue.choices.push("Distraction...")}
s.dialogue.answers = [function(){next()},
function(){
s.dialogue.speak("Who are you to lecture me on how to raise my family? You don’t understand the kind of life we’ve lived. She needs to learn discipline and restraint. Otherwise she’ll never make it in this world.");
s.dialogue.choices=["then maybe you should teach her"];
s.dialogue.answers=[
function(){
s.dialogue.speak("If she would listen to me then maybe I wouldn’t have to put so much effort into what I’m doing right now.");
s.dialogue.choices=["What are you doing that’s more important than your daughter?"];
s.dialogue.answers=[function(){next()}];
}
];
},
function(){
s.distract = false;
if(s.dis){
s.dialogue.speak("I'm not falling for that again!");
s.dialogue.choices=[];
s.dialogue.answers=[];}
else{
s.distracted = true;
s.dis = true;
window.story.think("You begin discussing the train and its customer service.");
s.dialogue.speak("The service here is abhorrent and- Hold on where is my daughter! You idiot what have you caused...");
s.dialogue.choices=["Sorry?"];
renderToSelector("#daughter","Blank");
s.dialogue.answers=[
function(){
s.dialogue.speak(" He proceeds to storm off looking for her.");
s.dialogue.choices=[];
renderToSelector("#father","journal")
}
];
}
}
]
s.dialogue.speak(" I'm busy, leave me alone.")
break
case "asleep":
s.dialogue.choices = []
s.dialogue.answers = []
s.dialogue.speak(" The " + name + " is asleep")
break
}
%>
<% s.characters[s.c[name]].spoken_to ++%><%
var name = "Daughter";
s.dialogue.speaking_to = name;
if(s.inv.check_item("Toy Gun") || s.inv.check_item("Cube") && s.characters[s.c[name]].state != "has"){
s.characters[s.c[name]].state = "toy"
}
//else{s.characters[s.c[name]].state="initial"}
var items = {
"Suitcase":
function(){s.dialogue.speak(" I don't want this.")},
"Papers":
function(){s.dialogue.speak(" I don't want this.");
},
"Key":
function(){s.dialogue.speak(" I don't want this.");
},
"Magnifying Glass":
function(){s.dialogue.speak(" I don't want this.");
},
"Recorder":
function(){s.dialogue.speak(" I don't want this.");
},
"Journal":
function(){s.dialogue.speak(" I don't want this.");
},
"Book":
function(){s.dialogue.speak(" I don't want this.");
},
"Cube":
function(){s.dialogue.speak("The daughter leans in and whispers: My parents can do magic... Thanks for the toy! Here you can have my father's magnifying glass.");
s.inv.add_item("Magnifying Glass");
s.inv.remove_item("Cube");
s.dead_daughter = true;
s.dialogue.choices = [];
s.characters[s.c[name]].state="has";
},
"Toy Gun":
function(){s.dialogue.speak("The daughter leans in and whispers: My parents can do magic... Thanks for the toy! Here you can have my father's magnifying glass.");
s.inv.add_item("Magnifying Glass");
s.inv.remove_item("Toy Gun");
s.dead_daughter = true;
s.dialogue.choices = [];
s.characters[s.c[name]].state="has";
}
};
s.characters[s.c[name]].items = items;
%>
<div id="choices"></div>
<div class="dialogue" onclick="window.story.skip()">
<div id="dialogue"></div>
</div>
<img src="images/Daughter.png" class="character_portrait">
<div class="character_title">
The <%= s.characters[s.c[name]].name %>
</div>
<%
switch(s.characters[s.c[name]].state){
case "initial":
s.dialogue.choices = ["Do I look like a peasant?"]
s.dialogue.answers = [function(){s.dialogue.speak("If you really want to talk to me so bad, then find me something fun to play with.")}]
s.dialogue.speak(" Sorry I don't talk to peasants.")
break
case "asleep":
s.dialogue.choices = []
s.dialogue.answers = []
s.dialogue.speak(" The " + name + " is asleep")
break
case "toy":
s.dialogue.choices = ["If I give you a toy what do I get in return?"]
s.dialogue.answers = [function(){s.dialogue.speak("Information. and this stupid magnifying glass I stole from dad. ")}]
s.dialogue.speak(" Sorry I don't tal... Are those toys I see? I've been soooo bored, sitting forever on this stupid train. My dad won’t let me go to the other carts and explore because it's not so 'womanly'. I asked him to play with me but he’s too busy...")
case "has":
if(s.characters[s.c[name]].state == "has"){
s.dialogue.choices = ["I'll see what I can do", "No way!"]
s.dialogue.answers = [function(){s.dialogue.speak("Thank you! If you just go over and talk to him that should give me enough time...");s.distract=true;},
function(){s.dialogue.speak("Wow, you are no fun, leave me alone you boring peasant...")}]
s.dialogue.speak(" Now that I have a toy... Could you do me one more favor? Go distract my dad so I can leave this train cart! I can't leave with him there...")
}
}
%>
<% s.characters[s.c[name]].spoken_to ++%><%
var name = "Mother";
s.dialogue.speaking_to = name;
var items = {
"Suitcase":
function(){s.dialogue.speak("I have no need for this.")},
"Papers":
function(){
if (s.inv.items['Papers'].content == "Widow"){
s.dialogue.speak(" Wow! She looks like she is in a lot of pain... This will not do. Show me to her immediately, she needs my help.");
s.characters[s.c["Widow"]].state = "cured";window.story.solve(s.soldier);s.dialogue.choices=[]}
else{s.dialogue.speak("Theres nothing on here that really interests me...")}
},
"Key":
function(){s.dialogue.speak("I have no need for this.");
},
"Magnifying Glass":
function(){s.dialogue.speak("I have no need for this.");
},
"Recorder":
function(){s.dialogue.speak("I have no need for this.");
},
"Journal":
function(){s.dialogue.speak("I have no need for this.");
},
"Book":
function(){
if (s.inv.items['Book'].content == "Widow"){
s.dialogue.speak(" Wow! She looks like she is in a lot of pain... This will not do. Show me to her immediately, she needs my help.");
s.characters[s.c["Widow"]].state = "cured";window.story.solve();s.inv.remove_item("Book")}
else{s.dialogue.speak("Theres nothing on here that really interests me...")}
},
"Cube":
function(){s.dialogue.speak("I have no need for this.");
},
"Toy Gun":
function(){s.dialogue.speak("I have no need for this.");
}
};
s.characters[s.c[name]].items = items;
%>
<div id="choices"></div>
<div class="dialogue" onclick="window.story.skip()">
<div id="dialogue"></div>
</div>
<img src="images/Mother.png" class="character_portrait">
<div class="character_title">
The <%= s.characters[s.c[name]].name %>
</div>
<%
var next = function(){
s.dialogue.choices = [" Do you have any special skills?"]
s.dialogue.answers = [
function(){s.dialogue.speak(" Oh... Well I suppose people find me very convincing... Not a skill per say, but I have an uncanny ability to get rid of more... unpleasant memories... I am a therapist after all, I love helping people and I'm very good at it.")
}
]
s.dialogue.speak(" Is there anything you need from me?")
}
switch(s.characters[s.c[name]].state){
case "initial":
if (s.characters[s.c[name]].spoken_to == 0){
s.dialogue.next = next
s.dialogue.choices = [" Oh, sorry to interrupt" , " What was that about?"]
s.dialogue.answers = [
function(){s.dialogue.speak(" Oh it's fine, I'm sorry if my daughter has caused you any trouble... She still has alot to... unlearn...");
s.dialogue.is_next = true; renderToSelector("#continue","continue");
} ,
function(){s.dialogue.speak(" Well... My daughter isn't the most obedient child... Lets just say she has some very frustrating habits that I can't seem to get rid of... Nothing you need to worry about though...");
s.dialogue.is_next = true; renderToSelector("#continue","continue");
}
]
s.dialogue.speak(" You need to behave young lady! This is a long train ride, and I don't nearly have that much patience.")
}
if (s.characters[s.c[name]].spoken_to > 0){
next();
}
break
case "asleep":
s.dialogue.choices = []
s.dialogue.answers = []
s.dialogue.speak(" The " + name + " is asleep")
break
}
%>
<% s.characters[s.c[name]].spoken_to ++%><%
var name = "Old Crone";
s.dialogue.speaking_to = name;
var items = {
"Suitcase":
function(){s.dialogue.speak("")},
"Papers":
function(){s.dialogue.speak("");
},
"Key":
function(){s.dialogue.speak("");
},
"Magnifying Glass":
function(){s.dialogue.speak("");
},
"Recorder":
function(){s.dialogue.speak("");
},
"Journal":
function(){s.dialogue.speak("");
},
"Book":
function(){s.dialogue.speak("");
},
"Cube":
function(){s.dialogue.speak("What a delightful contraption. I will be sure to make use of this on our way to our destination.");window.story.solve(s.father);s.dialogue.choices=[];s.inv.remove_item("Cube");
},
"Toy Gun":
function(){s.dialogue.speak("");
}
};
s.characters[s.c[name]].items = items;
%>
<div id="choices"></div>
<div class="dialogue" onclick="window.story.skip()">
<div id="dialogue"></div>
</div>
<img src="images/Old crone.png" class="character_portrait">
<div class="character_title">
The <%= s.characters[s.c[name]].name %>
</div>
<%
window.story.think("A thick indescribable scent fills the car.")
switch(s.characters[s.c[name]].state){
case "initial":
s.dialogue.next = function(){
s.dialogue.choices = ["Are you one of these individuals?" ]
s.dialogue.answers = [
function(){s.dialogue.speak("She chuckles and looks up at you with a glint in her eye. For a moment it looks like her pupils have changed colour. “I am one of the things that most are fortunate enough to be spared from.”")}
]
s.dialogue.speak(" It makes for wonderful entertainment. ")
}
if (true){
s.dialogue.choices = ["Do you know where we are headed?", "Do you know anything about this train"]
s.dialogue.answers = [
function(){s.dialogue.speak(" *The old woman chuckles hardily* The better question would be where does this train not go? I’m not sure there’s an answer to that one.");s.dialogue.choices = ["Do you know where we are headed?", "Do you know anything about this train"]},
function(){
s.dialogue.speak(" An old woman like me doesn’t have time to worry about such trivial things. However, I have noticed that this is not your average bunch of country bumpkins. This particular train attracts the more somber and deranged individuals. Those who have seen and experienced things that others were fortunate enough to be spared from. It makes for wonderful entertainment.");
s.dialogue.choices = ["Are you one of these individuals?" ]
s.dialogue.answers = [
function(){s.dialogue.speak("She chuckles and looks up at you with a glint in her eye. For a moment it looks like her pupils have changed colour. “I am one of the things that most are fortunate enough to be spared from.”")}
]
},
]
s.dialogue.speak(" *She looks up at you with an enigmatic smile.* “Hello there, fellow traveler.”")
}
break
case "asleep":
s.dialogue.choices = []
s.dialogue.answers = []
s.dialogue.speak(" The " + name + " is asleep")
break
}
%>
<% s.characters[s.c[name]].spoken_to ++%><%
var name = "Engineer";
s.dialogue.speaking_to = name;
var f = [false,false,false,false]
var final = function(num){
var t = true;
f[num] = true;
if(f[0]==false || f[1]==false || f[2]==false || f[3]==false){
t=false}
if(t){
console.log("WIN!")
s.dialogue.choices= ["Wow..."];
s.dialogue.answers=[
function(){
s.dialogue.speak("The souls are now departing the train. This has been another successful journey, thanks to you, my timeling. Let us set off for our next voyage. Until next time~")
s.dialogue.choices=[]
}
]
}
}
var items = {
"Suitcase":
function(){s.dialogue.speak("")},
"Papers":
function(){s.dialogue.speak("");
},
"Key":
function(){s.dialogue.speak("");
},
"Magnifying Glass":
function(){s.dialogue.speak("");
},
"Recorder":
function(){s.dialogue.speak("");
},
"Journal":
function(){s.dialogue.speak("");
},
"Book":
function(){s.dialogue.speak("");
},
"Cube":
function(){s.dialogue.speak("");
},
"Toy Gun":
function(){s.dialogue.speak("");
}
};
s.characters[s.c[name]].items = items;
%>
<div id="choices"></div>
<div class="dialogue" onclick="window.story.skip()">
<div id="dialogue"></div>
</div>
<div class="character_portrait">
<br>
<br>
The Engineer
<br>
???????????
</div>
<div class="character_title">
The <%= s.characters[s.c[name]].name %>
</div>
<%
switch(s.characters[s.c[name]].state){
case "initial":
var next = function(){
s.dialogue.speak("Ask away")
s.dialogue.choices=["Who are you, what is this place?", "Who am I?", "Who are the passengers?", "Time loop?"]
s.dialogue.answers=[function(){
s.dialogue.speak("I am the Engineer, and this is the Engine Room. I command this train, traversing through space and time in order to act as a guide to lost souls who have departed from the physical world.")
s.dialogue.choices=["Who are you, what is this place?", "Who am I?", "Who are the passengers?", "Time loop?"]
final(0)
},
function(){
window.story.think("The floating eye stops jittering for a moment and focuses on you.")
s.dialogue.speak(" You are my assistant, Your job is to keep these lost souls from falling into darkness until they reach their destination. You seem to have lost a fragment of yourself... I believe it was your choice to do so. To complete your task and prevent a continual fracture in the continuum, you made a request of the mother to remove your memories of this train to save a small child...")
s.dialogue.choices=["Who are you, what is this place?", "Who am I?", "Who are the passengers?", "Time loop?"]
final(1)
},
function(){
s.dialogue.speak("They are lost souls from different times and places. This particular ride includes those who have experienced traumatic deaths and cannot find their way to the next phase of life. For the most part they are unaware that they have died, and if they had not been invited here by the Conductor, they would have been stuck in their own delusional repetition of tragedy.")
s.dialogue.choices=["Who are you, what is this place?", "Who am I?", "Who are the passengers?", "Time loop?"]
final(2)
},
function(){
s.dialogue.speak("This train connects temporal bubbles to all of the passengers, forming what is called a Continuum. When a soul dies their bubble pops causing a fracture in the Continuum. In order to stabilize the Continuum it resets the shared time of the whole train. As my assistant, you are connected to my temporal array, and thus can retain your memories across each timeline.")
s.dialogue.choices=["Who are you, what is this place?", "Who am I?", "Who are the passengers?", "Time loop?"]
final(3)
}]
}
s.dialogue.choices = ["Nothing I couldn’t handle", "It was harder than you could ever know"]
s.dialogue.answers = [
function(){
s.dialogue.speak("I would expect nothing less from you. Now that we’ve reached our destination, you can rest and regain what you have lost.")
s.dialogue.choices = ["I have more quetions..."];
s.dialogue.answers = [function(){
next();
}]
},
function(){
s.dialogue.speak("I know of everything that goes on in this vessel, and much more about you than you could possibly fathom. I am your progenitor after all.")
s.dialogue.choices = ["I have more quetions..."];
s.dialogue.answers = [function(){
next();
}]
}
]
s.dialogue.speak(" Welcome back, my timeling. Was this journey hard on you?")
}
%>
<% s.characters[s.c[name]].spoken_to ++%><%
//DIALOGUE
s.dialogue = {};
window.story.choice = 15;
s.dialogue.speaking_to = "";
s.dialogue.choices = [];
s.dialogue.answers = [];
s.dialogue.index = -1;
s.dialogue.text = "";
s.dialogue.in_convo = false;
s.dialogue.timerReference = 0;
s.dialogue.speed = 1350
s.dialogue.speaking = false;
s.dialogue.hidden = false
s.dialogue.thinking = false;
s.dialogue.next = null;
s.dialogue.is_next = false;
s.dialogue.write = function(){
s.dialogue.in_convo = true;
if (s.dialogue.speaking){
if(s.dialogue.index < s.dialogue.text.length) {
if(s.dialogue.text[s.dialogue.index] != ".")
{s.dialogue.speed = 50;}
else{s.dialogue.speed = 1;}
$("#dialogue").html(
$("#dialogue").html()+s.dialogue.text[s.dialogue.index]);
s.dialogue.index++;
s.dialogue.timerReference =
setTimeout(s.dialogue.write,s.dialogue.speed);}
else { clearTimeout(s.dialogue.timerReference); s.dialogue.index =-1; s.dialogue.speaking=false;%>
<%= window.story.render('choices')%> <%renderToSelector('#choices','choices')}}
else{ $("#dialogue").html(s.dialogue.text); clearTimeout(s.dialogue.timerReference); renderToSelector('#choices','choices');}
}
window.story.think = function(message){
$("#nar").html(message);
}
s.nothing = function(){
window.story.interact_state("default");
window.story.think(
either("This is ineffective", "That doesn't quite work", "Thats not it", "This doesn't work"))
}
window.story.observe = function(thought){
if(s.click == "observe"){window.story.think(either(thought));
window.story.change_interact("default");
}
}
//Skips dialogue animations
window.story.skip = function(){
if(s.dialogue.speaking == false){
if(s.dialogue.is_next == true && s.dialogue.next != null){s.dialogue.is_next=false;s.dialogue.next();renderToSelector("#continue", "Blank");s.dialogue.next = function(){}}
}
else{s.dialogue.speaking = false}
}
window.story.talk_to = function(character, thought){
if(s.death == false){
if (s.reading){window.story.read(character)}
else{
if(s.inv.using != null){
if(s.inv.using == "Suitcase"){window.story.think("A person cannot fit in my suitcase...")}
else{
s.inv.use_on = character;s.inv.items[s.inv.using].use();s.inv.using=null;s.inv.use_on=null;}}
else{
switch(s.click){
case "default":
if(s.dialogue.in_convo == false){
renderToSelector('#char',character);}
break
case "observe":
window.story.think(either(thought));
window.story.change_interact("default");
break
case "use":
window.story.change_interact("default");
break
}}}}}
window.story.leave_convo = function(){
if(s.death){window.story.think("... I can't do that...")}
else{
s.dialogue.in_convo =false;
renderToSelector('#char','Blank');
//renderToSelector('#death','Blank');
}
}
s.dialogue.speak = function(message){
$("#dialogue").html("");
s.dialogue.index = 0;
if(s.dialogue.choices.length==0 || s.click=="give" || s.dialogue.is_next){s.dialogue.index = 0;}
s.dialogue.text = message;
s.dialogue.speaking = true;s.dialogue.write();
}
window.story.choose = function(choice){
s.dialogue.choices = [];
renderToSelector("#choices","Blank");
//s.dialogue.speak(s.dialogue.answers[choice]);
s.dialogue.answers[choice]();
}
%><%
//INTERACTIONS
s.click = "default"
s.current_item = "none"
s.reading = false;
window.story.read = function(character){
renderToSelector("#char", "notes");
window.story.think("The boy writes down the thoughts of the " + character)
s.reading = false
s.inv.add_item("Papers")
s.inv.items["Papers"].content = character
switch(character){
case "Wizard":
s.dialogue.choices = []
s.dialogue.speak("The boy wrote: He is very at peace, he seems to be exactly where he wants to be... He knows a lot about this place.")
break
case "Reporter":
s.dialogue.choices = []
s.dialogue.speak("The boy wrote: Eat eat eat eat. I want to eat. I hunger, I hunger. I see what I see. Let me see a meal, let me find the boy! ")
break
case "Little Boy":
s.dialogue.choices = []
s.dialogue.speak("The boy wrote: I'm thinking about thinking about my thoughts... I didn't really need to do that...")
break
case "Father":
s.dialogue.choices = []
s.dialogue.speak("The boy wrote: This man is determined and reserved. He doesn’t want anyone to know his intentions. He is aware of how it may look, but he is true to his convictions. He will kill the old crone. He will not let another elder demon live, never again, never again.")
break
case "Mother":
s.dialogue.choices = []
s.dialogue.speak("The boy wrote: Her mind is so silent... I'm not sure how she is able to keep it so quiet...")
break
case "Conductor":
s.dialogue.choices = []
s.dialogue.speak("The boy wrote: He doesn’t make sense, it's a whirlwind of ideas and concepts. Overlapping thoughts crossing over each other and looping over different intervals. The loudest thought I barely make out over the rest is: Follow the engineer's track, aid the assistant’s path ")
break
case "Old Crone":
s.dialogue.choices = []
s.dialogue.speak("The boy wrote: Silly of you to think you’d get anything out me...")
break
case "Widow":
s.dialogue.choices = []
s.dialogue.speak("The boy wrote: The sadness of her husband is weighing her down immensely, all I can hear is her repeating her torment in her head over and over again.")
break
case "Soldier":
s.dialogue.choices = []
s.dialogue.speak("The boy wrote: This man's mind is damaged by the war, he keeps going in between a stable mindset to believing he is in a war... I wonder what is causing him to do so.")
break
case "Daughter":
s.dialogue.choices = []
s.dialogue.speak("The boy wrote: Her thoughts are very childish and very mean, I don't think I'd want her to be my friend. She seems very selfish.")
break
}}
window.story.hold_item = function(item){
if(item == "none"){window.story.change_interact("default");}
else{window.story.change_interact("use")}
s.current_item=item
}
window.story.take_item = function(item){
switch(s.click){
case "default":
s.inv.add_item(item);
window.story.think(s.inv.items[item].observe);
s.inv.items[item].state = true
renderToSelector("#inventory","Inventory");
if(item == "Journal"){renderToSelector("#father","Blank");}
else{
window.story.show(passage.name)}
case "observe":
window.story.observe(s.inv.items[item].observe)
}}
window.story.change_interact = function(state){
if(s.death || s.dialogue.speaking_to == "Intercom"){window.story.think("... I can't do that...")}
else{
switch(state){
case "default":
s.current_item="none"
document.getElementById('eye').classList.remove('observing');
s.click = state;
break
case "observe":
if(s.click == "default"){
document.getElementById('eye').classList.add('observing');
window.story.think("Select something to observe");
s.click = state;
}
break
case "use":
s.click = state;
break
case "give":
if(s.inv.content.length > 0){
window.story.think("Select an item to give to the " + s.dialogue.speaking_to); s.click = state; renderToSelector('#choices','Blank');}
else{window.story.think("You don't have anything to give to the " + s.dialogue.speaking_to); window.story.change_interact("default");}
break
}}
}
%><%
//CLOCK
s.hour = 11;
s.minute = 00;
s.AmPm = "AM";
s.loops = 0;
s.death = false;
s.time_added = 0;
s.cart = 2
s.r_place = "train cart 2"
s.reset = false;
s.time_add = function(min){
s.minute += min;
s.time_added += min;
if (s.time_added > 20 && s.characters[s.c["Reporter"]].state != "asleep"){s.time_added = 0;s.cart+=1;s.r_place = "train cart " + s.cart;}
if (s.minute == 60){s.minute=0;s.hour=12;s.AmPm="PM";s.reset=true;s.death=true;}
}
s.time_reset = function(){
//window.story.show("Start");
s.death = true;
renderToSelector("#char","Death")
console.log("triggggggggg")
}
%><%
//INVENTORY
//var inv = {};
if(s.inv == null){s.inv = {}}
s.inv.using = null;
s.inv.use_on = null;
s.inv.content = ["Suitcase"];
if(s.inv.luggage == null){
s.inv.luggage = "Recorder";
//s.inv.luggage = "Book";
}
s.inv.items= {
"Suitcase":{
state: false,
use: function(){
if (this.state){
window.story.think("You take " + s.inv.luggage +" out and put "
+ s.inv.use_on + " in your suitcase.");
s.inv.remove_item(s.inv.use_on);
s.inv.add_item(s.inv.luggage);
s.inv.luggage = s.inv.use_on;
console.log("triggered");
}else{ window.story.think("This suitcase is locked!");}
},
fail: function(){},
observe: ["My suitcase with a " + s.inv.luggage + " in it"]
},
"Magnifying Glass":{
state:false,
use: function(){
if(s.inv.use_on == "Suitcase"){
window.story.think("The suitcase is covered in symbols, among them is an image of a stopwatch spinning in reverse. The suitcase also seems to be protected by a bubble of some sort. I wonder what it protects it from...")}
else{
if(s.inv.use_on == "Book"){
window.story.think("You open the grimoire with the magnifying glass reading the contents carefully. The symbols written on the first page light up and suddenly become legible. “Sleep Spell Incantation”")}
else{window.story.think("I can't see anything useful with this.")}}},
fail: function(){},
observe: ["A handy tool"]
},
"Key":{
state: true,
use: function(){
if(s.inv.use_on == "Suitcase"){
console.log("ussing the key on " + s.inv.use_on)
s.inv.items["Suitcase"].state = true;
window.story.think("The key unlocked the suitcase!")
s.inv.remove_item("Key");
renderToSelector("#inventory","Inventory");
}
else{window.story.thinl("Nothing happened.");
window.story.change_interact("default");}
},
fail: function(){},
observe: ["A strange key"]
},
"Recorder":{
state: true,
use: function(){if(s.inv.check_item(s.inv.use_on)==true){if(s.inv.use_on == "Suitcase"){s.inv.use_on = s.inv.using; s.inv.using = "Suticase";s.inv.items["Suitcase"].use();}else{window.story.think("nothing happened!")}}},
fail: function(){},
observe: ["Someones recorder, I wonder whats on it."]
},
"Journal":{
state: false,
use: function(){if(s.inv.check_item(s.inv.use_on)==true){if(s.inv.use_on == "Suitcase"){s.inv.use_on = s.inv.using; s.inv.using = "Suticase";s.inv.items["Suitcase"].use();}else{window.story.think("nothing happened!")}}},
fail: function(){},
observe: ["Symbols fill the page outlining what appears to be a map of the train with most of them drawn around train cart 1. The title is: Magical Energy Siphon Incantation. 12:00 is underlined at the bottom."]
},
"Book":{
state: false,
use: function(){
if(s.inv.check_item(s.inv.use_on)==true){if(s.inv.use_on == "Suitcase"){s.inv.use_on = s.inv.using; s.inv.using = "Suticase";s.inv.items["Suitcase"].use();}else{window.story.think("nothing happened!")}}
else{
if(s.inv.use_on == "Wizard"){window.story.think("The wizard is fast asleep. The book turns to dust.");s.characters[s.c["Wizard"]].state = "initial";this.state=false;s.inv.remove_item("Book")}
else{s.characters[s.c[s.inv.use_on]].state = "asleep"
window.story.think("The " + s.inv.use_on + " is fast asleep. The book turns to dust.")}
s.inv.remove_item("Book");if(s.inv.use_on=="Reporter"){window.story.solve(s.reporter)};if(s.inv.use_on=="Widow" || s.inv.use_on=="Soldier"){window.story.solve(s.soldier)}
}},
fail: function(){},
observe: ["This book looks quite ominous..."],
content: "empty"
},
"Cube":{
use: function(){if(s.inv.check_item(s.inv.use_on)==true){if(s.inv.use_on == "Suitcase"){s.inv.use_on = s.inv.using; s.inv.using = "Suticase";s.inv.items["Suitcase"].use();}else{window.story.think("nothing happened!")}}},
fail: function(){},
observe: ["A glowing cube... a toy of some sort?"]
},
"Toy Gun":{
state:false,
use: function(){if(s.inv.check_item(s.inv.use_on)==true){if(s.inv.use_on == "Suitcase"){s.inv.use_on = s.inv.using; s.inv.using = "Suticase";s.inv.items["Suitcase"].use();}else{window.story.think("nothing happened!")}}},
fail: function(){},
observe: ["A fake gun"]
},
"Papers":{
state: false,
use: function(){if(s.inv.check_item(s.inv.use_on)==true){if(s.inv.use_on == "Suitcase"){s.inv.use_on = s.inv.using; s.inv.using = "Suticase";s.inv.items["Suitcase"].use();}else{window.story.think("nothing happened!")}}},
fail: function(){},
observe: ["Some very official looking papers...", "Look like a list of all the passengers"],
content: "empty"
}
}
s.inv.check_item = function check_item(item) {
for (let i = 0; i < s.inv.content.length; i++) {
if(s.inv.content[i] == item){return true};
}
return false;
};
s.inv.add_item = function add_item(item) {
if(item == "Book"){window.story.wizard="images/wizard2.png";renderToSelector("#wiz","wiz")}
s.inv.content.push(item);
renderToSelector("#inventory","Inventory");
};
s.inv.remove_item = function remove_item(item) {
for (let i = 0; i < s.inv.content.length; i++) {
if(s.inv.content[i] == item){s.inv.content.splice(i,1);renderToSelector("#inventory","Inventory"); return true};
}
return false
};
s.inv.give = function(item){
s.characters[s.c[s.dialogue.speaking_to]].items[item]();
window.story.change_interact("default");
}
window.story.select = function(item){
item = s.inv.content[item];
switch(s.click){
case "default":
window.story.hold_item(item);
s.inv.use(item);
break
case "use":
s.inv.use(item);
break
case "give":
s.inv.give(item)
break
case "observe":
s.inv.items["Suitcase"].observe = ["My suitcase with a " + s.inv.luggage + " in it"]
window.story.observe(s.inv.items[item].observe);
break
}
}
//s.inv = inv;
s.inv.use = function(item){
if (s.inv.using == null){s.inv.using = item;
window.story.think("Select something to use the "+ item + " on");
console.log(s.inv.using + " recieved");}
else{
if (item == s.inv.using){window.story.change_interact("default");
s.inv.using = null;window.story.think("You can't use that on itself!");} else {
s.inv.use_on = item;s.inv.items[s.inv.using].use();s.inv.using=null;s.inv.use_on=null; console.log(s.inv.use_on + " used_on");window.story.change_interact("default");}}
}
%><%
//CHARACTERS
var chars = ["Conductor","Widow","Little Boy","Wizard","Reporter","Soldier","Father","Daughter","Mother","Old Crone","Engineer"]
s.c = {};
var characters = [];
for (let i = 0; i < chars.length; i++) {
s.c[chars[i]] = i
characters.push({});
characters[i].name = chars[i];
characters[i].state ="initial";
characters[i].spoken_to=0;
characters[i].inv=[];
}
s.characters = characters;
window.story.wizard = "images/wizard1.png"
if(s.inv.luggage == "Book" && s.minute==0)
{s.characters[s.c["Wizard"]].state="Awake";window.story.wizard="images/wizard2.png"}
%><%
//ROOMS
var current_car = "train cart 4";
var cars = ["front cart","train cart 1","train cart 2","train cart 3", "train cart 4","cabosse"]
s.entry = false;
s.can_enter = false;
s.solved = 0;
s.reporter = false;
s.soldier = false;
s.father = false;
s.dead_daughter;
s.distract=false;
s.distracted = false;
s.dis = false;
window.story.solve = function(killer){
if(killer == false){
killer = true;
s.solved += 1;
if(s.solved > 2){s.entry = true}
}}
window.story.travel = function(car){
if(s.death == false){
if (car == "front cart"){
if (s.can_enter){
s.dialogue.in_convo =false;
s.dialogue.speaking =false;
clearTimeout(s.dialogue.timerReference); s.dialogue.index =-1;
s.current_car = car
window.story.show(car);
}
else{window.story.think("This is the front of the train, I don't think I'm allowed to go in there without permission.")}
}
else{
s.dialogue.in_convo =false;
s.dialogue.speaking =false;
clearTimeout(s.dialogue.timerReference); s.dialogue.index =-1;
s.current_car = car
s.time_add(4);
window.story.show(car);
window.story.change_interact("default")
}}
else{window.story.think("I can't do that...")}
}
%><div class="dialogue">
<div id="dialogue" onclick="window.story.skip()"></div>
</div>
<div id="choices"></div>
<%
var name = "Intercom"
s.dialogue.speaking_to=name;
s.death = true;
if(s.entry){
s.dialogue.choices = ["Is he talking about me?"]
s.dialogue.answers = [
function(){s.dialogue.speak("Yes I am talking about you! Hurry up."); s.can_enter = true;s.death = false}
]
s.dialogue.speak(" Over the intercom you here a strangely familiar voice: Please report to the front of the train.")
}
else{
switch(s.current_car){
case "caboose":
s.dialogue.choices = ["I feel... weird..."]
s.dialogue.answers = [
function(){window.story.show("Start")}
]
s.dialogue.speak(" You hear someone being brutally murdered in an adjacent cart.")
break
case "train cart 1":
s.dialogue.choices = ["I feel... weird..."]
s.dialogue.answers = [
function(){window.story.show("Start")}
]
if(s.father == true){
s.dialogue.speak(" You hear someone being brutally murdered in an adjacent cart.")}
else{
%> <img src="images/Old crone.png" class="character_portrait">
<%
s.dialogue.speak(" You hear the bell ring signaling the halt of the train. The car begins to rumble and creak, and suddenly a wormhole opens in front of you. Out of the void extends long tendrils of dark mass, wrapping themselves around the Old Crone. She is not the least bit surprised, she only smiles warmly at you. “See you the next time around.”")}
break
case "train cart 2":
s.dialogue.choices = ["I feel... weird..."]
s.dialogue.answers = [
function(){window.story.show("Start")}
]
s.dialogue.speak(" You hear someone being brutally murdered in an adjacent cart.")
break
case "train cart 3":
s.dialogue.choices = ["I feel... weird..."]
s.dialogue.answers = [
function(){
s.dialogue.speak("")
window.story.show("Start")}
]
if(s.dead_daughter){
%> <img src="images/Daughter.png" class="above">
<img src="images/Soldier.png" class="character_portrait"> <%
s.dialogue.speak(" The daughter approaches the soldier.Daughter: Hey mister, are you a real soldier? Soldier: I am indeed young miss. Daughter: Really? Well I bet you won’t see this coming~ The daughter pulls the toy gun out of her pocket. Daughter: PEW, PEW, PE- The soldier’s eyes go wide with terror. Soldier: German spy! He swiftly disarms the girl and puts her in a choke hold...")
}
else{
if(s.soldier == false){
%> <img src="images/Widow.png" class="above">
<img src="images/Soldier.png" class="character_portrait"> <%
window.story.think("You hear the bell ring signalling the halt of the train. Suddenly you hear what appears to be the voice of the widow, shrieking and wailing fiercely.")
s.dialogue.speak(" He’s not dead! He can’t be! He’s alive! He’s alive!”. *The soldier’s eyes begin to twitch. He raises his hands above his ears, shaking violently. Something in him seems to snap, and he rises from his seat with a cold, calculated demeanor, as if he is no longer sane. He slowly walks over to the widow and pulls out a bayonet* “Death to the Germans” he whispers as he slits her throat.")
}
else{
s.dialogue.speak(" You hear someone being brutally murdered in an adjacent cart.")
}}
break
case "train cart 4":
s.dialogue.choices = ["I feel... weird..."]
s.dialogue.answers = [
function(){window.story.show("Start")}
]
s.dialogue.speak(" You hear someone being brutally murdered in an adjacent cart.")
break
}}
%><image class="character wizard"
src="<%= window.story.wizard %>"
onclick="window.story.talk_to(
'Wizard',[
'A small wizard',
'A small man obscured by an oversized hat'
])"><image class="character reporter"
src="images/reporter1.png"
onclick="window.story.talk_to(
'Reporter',[
'A very creepy looking man'
])"><div id="choices"></div>
<div class="dialogue">
<div id="dialogue" onclick="window.story.skip()"></div>
</div><img src="images/continue.png" class="continue"><% if(s.inv.items['Journal'].state == false){ %>
<img class="hover book" src="images/Journal.png" onclick="window.story.take_item('Journal')">
<% } %>