diff --git a/chapters/ch1.json b/chapters/ch1.json
index c1b0dcc..1712d08 100644
--- a/chapters/ch1.json
+++ b/chapters/ch1.json
@@ -323,7 +323,7 @@
"value": 1
}
},
- "special": ""
+ "special": "saves"
},
{
"code": "Restart game",
@@ -354,7 +354,7 @@
"value": 2
}
},
- "special": ""
+ "special": "saves"
},
{
"code": "Restart game",
@@ -385,7 +385,7 @@
"value": 3
}
},
- "special": ""
+ "special": "saves"
}
]
},
@@ -537,7 +537,6 @@
"target": "Ch2-Intro",
"set_variables": {
"v_current_scene": "Ch2-Intro",
- "v_chapter_save": "1",
"v_chapter_save_counter": "5",
"v_checkpoint_rich": "1"
},
@@ -547,7 +546,7 @@
"value": 1
}
},
- "special": ""
+ "special": "checkpoint_save"
},
{
"code": "Next chapter",
@@ -555,7 +554,6 @@
"target": "Ch2-Intro",
"set_variables": {
"v_current_scene": "Ch2-Intro",
- "v_chapter_save": "1",
"v_chapter_save_counter": "5",
"v_checkpoint_rich": "1"
},
@@ -565,7 +563,7 @@
"value": 1
}
},
- "special": ""
+ "special": "checkpoint_save"
}
]
},
@@ -667,7 +665,6 @@
"target": "Ch2-Intro",
"set_variables": {
"v_current_scene": "Ch2-Intro",
- "v_chapter_save": "1",
"v_chapter_save_counter": "5",
"v_checkpoint_rich": "1"
},
@@ -677,7 +674,7 @@
"value": 1
}
},
- "special": ""
+ "special": "checkpoint_save"
},
{
"code": "Next chapter",
@@ -685,7 +682,6 @@
"target": "Ch2-Intro",
"set_variables": {
"v_current_scene": "Ch2-Intro",
- "v_chapter_save": "1",
"v_chapter_save_counter": "5",
"v_checkpoint_rich": "1"
},
@@ -695,7 +691,7 @@
"value": 1
}
},
- "special": ""
+ "special": "checkpoint_save"
}
]
}
diff --git a/chapters/ch2.json b/chapters/ch2.json
index 427420a..8f74f9c 100644
--- a/chapters/ch2.json
+++ b/chapters/ch2.json
@@ -1,7 +1,7 @@
{
"Ch2-Intro": {
"id": "Ch2-Intro",
- "text": " Both Daren and I turn around at the same time. We see a slim, tall figure standing behind us, with long black hair, fair skin, and a very serious look on her face. She is wearing leather pants, a long sleeved white blouse, and a green, hooded cloak. She appears to be somewhere in her early twenties.
But that's not all there is to this woman. I can also sense a strong magical aura all around her. An aura that couldn't possibly be coming from a regular human. Could she be... a banshee?
My heart starts beating rapidly again. That night from fifteen years ago is coming back to me. I can see it vividly, and I can still hear the laughter. That sinister, high-pitched laughter. Will it never stop haunting me?
I breathe in deeply, and try to calm down. This woman can't be a banshee. The feeling I'm getting now is too different from the one I got back then. Does that mean she's a mage? No, that would be impossible. And yet...
\"Barry,\" whispers Daren. \"Don't be afraid. I know white magic. I can purify her.\"
I realize Daren must have also sensed the magic coming from the woman and concluded that she's been possessed by a banshee. Banshees are parasitic spirits that need to inhabit bodies in order to survive. They usually spend a few weeks inside a body in a dormant state before taking over. During this phase, the host may develop magical powers. Once a banshee is in full control of the body, they say she has awakened. The only way you can save the original host once she's been possessed by a banshee is to use white magic to purify her before the banshee has fully awakened, which basically means killing the banshee without harming the host. However, the purification technique operates on the assumption that a woman cannot have magic powers of her own. They call it purification, but all the technique does in fact is to completely eradicate the aura that gives off the strong magical vibe, with the purpose of also eliminating the banshee along with it. On the other hand, if the aura does not in fact belong to a banshee, but to the woman herself, the purification would be nothing short of a death sentence.
\"No, wait. Listen to me!\" I blurt out. \"This woman isn't a banshee.\"
\"So what, you're suggesting she's a mage, then? Barry, women can't be mages. There hasn't been a single recorded case of a woman mage in all of our world's history. Every time a woman's developed magical powers, it's been because of a banshee. Every single time.\"
\"Don't you think I know that? But this one is different. If you try to purify her, you may well end up killing her!\"
\"How can you be so sure?\" \"Because I've met a banshee before. Up close. Have you met a banshee before, Daren?\"
\"...No,\" he admits.
\"You just said you trusted me enough to tell me your greatest weakness. I'm asking you to trust me on this too. Can you trust me on this, Daren?\"
Daren gives me one long look, and then he sighs deeply.
\"Alright. We'll do it your way. But I'm keeping an eye on her. I swear, Barry, if it turns out you're only saying all of this because of her looks, I'm going to--\"
\"Would you guys mind telling me what you've been whispering about for the past minute?\" the woman asks us.
<% } %> Both Daren and I turn around at the same time. We see a slim, tall figure standing behind us, with long black hair, fair skin, and a very serious look on her face. She is wearing leather pants, a long sleeved white blouse, and a green, hooded cloak. She appears to be somewhere in her early twenties.
But that's not all there is to this woman. I can also sense a strong magical aura all around her. An aura that couldn't possibly be coming from a regular human. Could she be... a banshee?
My heart starts beating rapidly again. That night from fifteen years ago is coming back to me. I can see it vividly, and I can still hear the laughter. That sinister, high-pitched laughter. Will it never stop haunting me?
I breathe in deeply, and try to calm down. This woman can't be a banshee. The feeling I'm getting now is too different from the one I got back then. Does that mean she's a mage? No, that would be impossible. And yet...
\"Barry,\" whispers Daren. \"Don't be afraid. I know white magic. I can purify her.\"
I realize Daren must have also sensed the magic coming from the woman and concluded that she's been possessed by a banshee. Banshees are parasitic spirits that need to inhabit bodies in order to survive. They usually spend a few weeks inside a body in a dormant state before taking over. During this phase, the host may develop magical powers. Once a banshee is in full control of the body, they say she has awakened. The only way you can save the original host once she's been possessed by a banshee is to use white magic to purify her before the banshee has fully awakened, which basically means killing the banshee without harming the host. However, the purification technique operates on the assumption that a woman cannot have magic powers of her own. They call it purification, but all the technique does in fact is to completely eradicate the aura that gives off the strong magical vibe, with the purpose of also eliminating the banshee along with it. On the other hand, if the aura does not in fact belong to a banshee, but to the woman herself, the purification would be nothing short of a death sentence.
\"No, wait. Listen to me!\" I blurt out. \"This woman isn't a banshee.\"
\"So what, you're suggesting she's a mage, then? Barry, women can't be mages. There hasn't been a single recorded case of a woman mage in all of our world's history. Every time a woman's developed magical powers, it's been because of a banshee. Every single time.\"
\"Don't you think I know that? But this one is different. If you try to purify her, you may well end up killing her!\"
\"How can you be so sure?\" \"Because I've met a banshee before. Up close. Have you met a banshee before, Daren?\"
\"...No,\" he admits.
\"You just said you trusted me enough to tell me your greatest weakness. I'm asking you to trust me on this too. Can you trust me on this, Daren?\"
Daren gives me one long look, and then he sighs deeply.
\"Alright. We'll do it your way. But I'm keeping an eye on her. I swear, Barry, if it turns out you're only saying all of this because of her looks, I'm going to--\"
\"Would you guys mind telling me what you've been whispering about for the past minute?\" the woman asks us.
\"And you're planning to use this device to fight the other mages that joined the tournament?\"
\"Correct.\"
Daren, Kate and I are sitting in a circle, on the rocky floor of a cave we found near the northern mountains. Our trip here has been rather uneventful, save for a few more dead bodies we've seen along the way. Daren has gotten out of his heavy armor since we arrived and is now wearing more comfortable clothes.
<% } %><% if((locals.v_ch2_deer_interaction || 0) != 1) {%>\"Kate, I think this afternoon's events have been too much for the poor boy. He's gone completely delirious. You think you could knock some sense into our dear companion, here? \"No,\" Kate answers, curtly.
\"Because you won't be bothered to--\"
\"Because he's right. The device he's carrying is indeed a stat booster, and most of those stats are meant to amplify his physical attributes.\"
\"What?... Weren't you the one saying I shouldn't trust him just a few hours ago? Why are you defending him, now?\"
\"I'm not defending anyone. I've known the true function of these devices for a long time. I don't need to trust him in order to know he's telling the truth.\"
\"Fine, I give up. You win, Barry. So what are these stats of yours, anyway?\"
<% } %><% if((locals.v_ch2_deer_interaction || 0) == 1) {%> \"So, Barry, let me get this straight,\" Daren says. \"You're saying that trinket you're carrying with you is in fact a device that amplifies your physical attributes, which is powered by the magic all around us...\"
\"Right,\" I answer.
\"And this device taught you an ancient language that made you able to communicate with the two deer?\"
\"Correct.\"
Daren, Kate and I are sitting in a circle, on the rocky floor of our deer host's cave. Our trip here has been rather uneventful, save for a few more dead bodies we've seen along the way. Daren has gotten out of his heavy armor since we arrived and is now wearing more comfortable clothes.
\"Barry, there is no such thing as talking to animals. I've heard you 'talk' to them, and it's nothing but weird animal noises. Just because you got lucky and they actually brought us to their lair doesn't prove you right. Kate, could you knock some sense into our dear companion, here?\"
<% } %><% if((locals.v_ch2_deer_interaction || 0) == 1) {%>\"No,\" Kate answers, curtly. \"Because you won't be bothered to--\"
\"Because he's right. The device he's carrying is indeed a stat booster, and one of those stats gives the owner knowledge of the ancient languages.\"
\"What?... Weren't you the one saying I shouldn't trust him just a few hours ago? Why are you defending him, now?\"
\"I'm not defending anyone. I've known the true function of these devices for a long time. I don't need to trust him in order to know he's telling the truth.\"
\"Fine, I give up. You win, Barry. So what are these stats of yours, anyway?\"
<% } %><% if((locals.v_ch2_deer_interaction || 0) != 1) {%> \"So, Barry, let me get this straight,\" Daren says. \"You're saying that trinket you're carrying with you is in fact a device that amplifies your physical attributes, which is powered by the magic all around us...\"
\"Right,\" I answer.
\"And you're planning to use this device to fight the other mages that joined the tournament?\"
\"Correct.\"
Daren, Kate and I are sitting in a circle, on the rocky floor of a cave we found near the northern mountains. Our trip here has been rather uneventful, save for a few more dead bodies we've seen along the way. Daren has gotten out of his heavy armor since we arrived and is now wearing more comfortable clothes.
<% } %><% if((locals.v_ch2_deer_interaction || 0) != 1) {%>\"Kate, I think this afternoon's events have been too much for the poor boy. He's gone completely delirious. You think you could knock some sense into our dear companion, here? \"No,\" Kate answers, curtly.
\"Because you won't be bothered to--\"
\"Because he's right. The device he's carrying is indeed a stat booster, and most of those stats are meant to amplify his physical attributes.\"
\"What?... Weren't you the one saying I shouldn't trust him just a few hours ago? Why are you defending him, now?\"
\"I'm not defending anyone. I've known the true function of these devices for a long time. I don't need to trust him in order to know he's telling the truth.\"
\"Fine, I give up. You win, Barry. So what are these stats of yours, anyway?\"
<% } %><% if((locals.v_ch2_deer_interaction || 0) == 1) {%> \"So, Barry, let me get this straight,\" Daren says. \"You're saying that trinket you're carrying with you is in fact a device that amplifies your physical attributes, which is powered by the magic all around us...\"
\"Right,\" I answer.
\"And this device taught you an ancient language that made you able to communicate with the two deer?\"
\"Correct.\"
Daren, Kate and I are sitting in a circle, on the rocky floor of our deer host's cave. Our trip here has been rather uneventful, save for a few more dead bodies we've seen along the way. Daren has gotten out of his heavy armor since we arrived and is now wearing more comfortable clothes.
\"Barry, there is no such thing as talking to animals. I've heard you 'talk' to them, and it's nothing but weird animal noises. Just because you got lucky and they actually brought us to their lair doesn't prove you right. Kate, could you knock some sense into our dear companion, here?\"
<% } %><% if((locals.v_ch2_deer_interaction || 0) == 1) {%>\"No,\" Kate answers, curtly. \"Because you won't be bothered to--\"
\"Because he's right. The device he's carrying is indeed a stat booster, and one of those stats gives the owner knowledge of the ancient languages.\"
\"What?... Weren't you the one saying I shouldn't trust him just a few hours ago? Why are you defending him, now?\"
\"I'm not defending anyone. I've known the true function of these devices for a long time. I don't need to trust him in order to know he's telling the truth.\"
\"Fine, I give up. You win, Barry. So what are these stats of yours, anyway?\"
Kate simply waved him off, and went inside our cave to get a bit more sleep, after telling him that this morning's events have tired her out. When Daren asked me what she meant, I told him all about the duke of Bagelberry and his merry men, and how they ambushed us.
\"You were lucky that you managed to get out of there alive,\" Daren said to me. \"Why did we even bother to have a strategy meeting yesterday if we were all going to ignore it afterwards anyway?\"
After he's cooled off a bit, the two of us resumed our guard duty, posting ourselves in front of the cave's entrance.
As we stand guard, we start discussing about the tournament, and its organization as we've seen it thus far.
<% } %><% if((locals.v_ch3_kate_badly_hurt || 0) == 0 && (locals.v_ch3_bloodied || 0) == 0) {%>\"I just can't understand it,\" Daren tells me. \"What are the organizers thinking? They're letting people without any trace of magic join this contest, and they don't even bother to enforce a rule that prohibits fighting before they announce the objectives. It's like they don't even care about all the lives that are at stake!\" \"I don't think they do,\" I tell Daren. \"Do you remember what they made us agree to before joining the tournament? Whoever wins this championship will be obligated to come to Varathia's aid in case of an outside invasion. People only agreed to it because there hasn't been an attempt at invading Varathia in thousands of years, but I don't think that's the point. They just want the most powerful mage in the world to serve as their own personal scarecrow. They probably only care about whoever's going to win.\"
\"But even so, if their goal is to get their hands on a powerful mage, why have they still not announced the objectives? Wouldn't it be in their best interest to get this tournament finished as quickly as possible?\"
<% } %><% if((locals.v_ch3_kate_badly_hurt || 0) == 0 && (locals.v_ch3_bloodied || 0) == 1) {%> Daren was waiting for us in front of our cave. The moment we got in hearing range of him, he started to rant about how we shouldn't have gone off on our own, but he stopped mid-sentence when we got closer and he saw all of Kate's cuts and bruises. He immediately rushed to her aid with a healing spell, and after that, she went back inside the cave to get some sleep, without saying another word. When Daren asked me what happened I told him all about the duke of Bagelberry and his merry men, and how they ambushed us.
\"You were lucky that you managed to get out of there alive,\" Daren said to me. \"Why did we even bother to have a strategy meeting yesterday if we were all going to ignore it afterwards anyway?\"
After he's cooled off a bit, the two of us resumed our guard duty, posting ourselves in front of the cave's entrance.
As we stand guard, we start discussing about the tournament, and its organization as we've seen it thus far.
<% } %><% if((locals.v_ch3_kate_badly_hurt || 0) == 0 && (locals.v_ch3_bloodied || 0) == 1) {%>\"I just can't understand it,\" Daren tells me. \"What are the organizers thinking? They're letting people without any trace of magic join this contest, and they don't even bother to enforce a rule that prohibits fighting before they announce the objectives. It's like they don't even care about all the lives that are at stake!\" \"I don't think they do,\" I tell Daren. \"Do you remember what they made us agree to before joining the tournament? Whoever wins this championship will be obligated to come to Varathia's aid in case of an outside invasion. People only agreed to it because there hasn't been an attempt at invading Varathia in thousands of years, but I don't think that's the point. They just want the most powerful mage in the world to serve as their own personal scarecrow. They probably only care about whoever's going to win.\"
\"But even so, if their goal is to get their hands on a powerful mage, why have they still not announced the objectives? Wouldn't it be in their best interest to get this tournament finished as quickly as possible?\"
<% } %><% if((locals.v_ch3_kate_badly_hurt || 0) == 1) {%> Daren and I resumed our guard duty, posting ourselves in front of the cave's entrance.
As we stand guard, we start discussing about the tournament, and its organization as we've seen it thus far.
\"I just can't understand it,\" Daren tells me. \"What are the organizers thinking? They're letting people without any trace of magic join this contest, and they don't even bother to enforce a rule that prohibits fighting before they announce the objectives. It's like they don't even care about all the lives that are at stake!\"
\"I don't think they do,\" I tell Daren. \"Do you remember what they made us agree to before joining the tournament? Whoever wins this championship will be obligated to come to Varathia's aid in case of an outside invasion. People only agreed to it because there hasn't been an attempt at invading Varathia in thousands of years, but I don't think that's the point. They just want the most powerful mage in the world to serve as their own personal scarecrow. They probably only care about whoever's going to win.\"
\"But even so, if their goal is to get their hands on a powerful mage, why have they still not announced the objectives? Wouldn't it be in their best interest to get this tournament finished as quickly as possible?\"
<% } %><% if((locals.v_ch3_kate_badly_hurt || 0) == 0 && (locals.v_ch3_bloodied || 0) == 0) {%> Daren was waiting for us in front of our cave. The moment we got in hearing range of him, he started to rant about how we shouldn't have gone off on our own, and about how we should stick together at all times.
Kate simply waved him off, and went inside our cave to get a bit more sleep, after telling him that this morning's events have tired her out. When Daren asked me what she meant, I told him all about the duke of Bagelberry and his merry men, and how they ambushed us.
\"You were lucky that you managed to get out of there alive,\" Daren said to me. \"Why did we even bother to have a strategy meeting yesterday if we were all going to ignore it afterwards anyway?\"
After he's cooled off a bit, the two of us resumed our guard duty, posting ourselves in front of the cave's entrance.
As we stand guard, we start discussing about the tournament, and its organization as we've seen it thus far.
<% } %><% if((locals.v_ch3_kate_badly_hurt || 0) == 0 && (locals.v_ch3_bloodied || 0) == 0) {%>\"I just can't understand it,\" Daren tells me. \"What are the organizers thinking? They're letting people without any trace of magic join this contest, and they don't even bother to enforce a rule that prohibits fighting before they announce the objectives. It's like they don't even care about all the lives that are at stake!\" \"I don't think they do,\" I tell Daren. \"Do you remember what they made us agree to before joining the tournament? Whoever wins this championship will be obligated to come to Varathia's aid in case of an outside invasion. People only agreed to it because there hasn't been an attempt at invading Varathia in thousands of years, but I don't think that's the point. They just want the most powerful mage in the world to serve as their own personal scarecrow. They probably only care about whoever's going to win.\"
\"But even so, if their goal is to get their hands on a powerful mage, why have they still not announced the objectives? Wouldn't it be in their best interest to get this tournament finished as quickly as possible?\"
<% } %><% if((locals.v_ch3_kate_badly_hurt || 0) == 0 && (locals.v_ch3_bloodied || 0) == 1) {%> Daren was waiting for us in front of our cave. The moment we got in hearing range of him, he started to rant about how we shouldn't have gone off on our own, but he stopped mid-sentence when we got closer and he saw all of Kate's cuts and bruises. He immediately rushed to her aid with a healing spell, and after that, she went back inside the cave to get some sleep, without saying another word. When Daren asked me what happened I told him all about the duke of Bagelberry and his merry men, and how they ambushed us.
\"You were lucky that you managed to get out of there alive,\" Daren said to me. \"Why did we even bother to have a strategy meeting yesterday if we were all going to ignore it afterwards anyway?\"
After he's cooled off a bit, the two of us resumed our guard duty, posting ourselves in front of the cave's entrance.
As we stand guard, we start discussing about the tournament, and its organization as we've seen it thus far.
<% } %><% if((locals.v_ch3_kate_badly_hurt || 0) == 0 && (locals.v_ch3_bloodied || 0) == 1) {%>\"I just can't understand it,\" Daren tells me. \"What are the organizers thinking? They're letting people without any trace of magic join this contest, and they don't even bother to enforce a rule that prohibits fighting before they announce the objectives. It's like they don't even care about all the lives that are at stake!\" \"I don't think they do,\" I tell Daren. \"Do you remember what they made us agree to before joining the tournament? Whoever wins this championship will be obligated to come to Varathia's aid in case of an outside invasion. People only agreed to it because there hasn't been an attempt at invading Varathia in thousands of years, but I don't think that's the point. They just want the most powerful mage in the world to serve as their own personal scarecrow. They probably only care about whoever's going to win.\"
\"But even so, if their goal is to get their hands on a powerful mage, why have they still not announced the objectives? Wouldn't it be in their best interest to get this tournament finished as quickly as possible?\"
<% } %><% if((locals.v_ch3_kate_badly_hurt || 0) == 1) {%> Daren and I resumed our guard duty, posting ourselves in front of the cave's entrance.
As we stand guard, we start discussing about the tournament, and its organization as we've seen it thus far.
\"I just can't understand it,\" Daren tells me. \"What are the organizers thinking? They're letting people without any trace of magic join this contest, and they don't even bother to enforce a rule that prohibits fighting before they announce the objectives. It's like they don't even care about all the lives that are at stake!\"
\"I don't think they do,\" I tell Daren. \"Do you remember what they made us agree to before joining the tournament? Whoever wins this championship will be obligated to come to Varathia's aid in case of an outside invasion. People only agreed to it because there hasn't been an attempt at invading Varathia in thousands of years, but I don't think that's the point. They just want the most powerful mage in the world to serve as their own personal scarecrow. They probably only care about whoever's going to win.\"
\"But even so, if their goal is to get their hands on a powerful mage, why have they still not announced the objectives? Wouldn't it be in their best interest to get this tournament finished as quickly as possible?\"
Well, it's not like I'm going anywhere. My knees still hurt like hell. I've barely even budged from my original position to avoid more pain. Eiden sure did a number on me.
\"Barry! What happened?!\" Daren says when he sees me.
\"Oh, not much. Just a little parting gift from our mutual friend.\"
\"Eiden!\" says Daren, while clenching his fist.
He casts a healing spell on me and I suddenly get enveloped in a warm, soothing light. The pain leaves me completely, and I manage to get back on my feet with no difficulty. I always knew there were healing spells like this, but witnessing one of them first hand is something else. Most healers I've met in my lifetime could barely even heal light bruises or ankle sprains.
<% } %><% if((locals.v_ch4_ending || 0) == 1) {%>\"Where's the stillwater?\" \"Gone. I just saw him kill Cutthroat Dave along with a whole crew of henchmen. Turns out he can cast fire magic, combustive magic and teleportation without even breaking a sweat. Eiden got upset because Cutthroat Dave mistook him for me, and I took advantage of the situation.\"
\"Hah! Serves him right! But how did I end up unconscious on the ground?\"
\"You mean you don't remember? He just waved his hand casually and put you to sleep.\"
\"What?... That can't be right. I have so much protection against sleep spells that I should be almost immune. At the very least I should be able to keep my consciousness! And what was that about him using fire magic? I'm pretty sure he used air magic on me when we first met him. Normally it takes a lifetime to master even a single element!\"
Daren suddenly wakes up and starts looking around him, confused.
\"What happened? Where's the stillwater?\" he asks me.
\"That's the second time you ask me these exact questions. He's gone. He vanished right after he put you to sleep.\"
\"Put me to sleep?... No, that can't be! I have so much protection against sleep spells that I should be almost immune. At the very least I should be able to keep my consciousness!\"
\"Well I'm just telling you what I saw. I don't claim to understand it either.\"
\"So would you two mind telling me who that stillwater was?\" Kate asks us. \"And what was that trade he was going on about?\"
Daren and I start filling her in on the details of our first encounter with Eiden.
<% } %><% if((locals.v_ch4_ending || 0) == 2) {%>After we're done talking, Kate takes a few moments to reflect on our words. \"So, let me see if I got this right...\" she says. \"Barry, you traded our lives for one message.\"
\"Right,\" I say.
\"And we need to deliver this message to any robed men we might encounter that wear a brooch with a picture of a hawk holding the sun in its talons.\"
\"Yeah. Does that description tell you anything?\"
\"Yes...\" she says, and then almost immediately looks towards the ground.
She's hiding something again. I just know it.
\"They're an underground group,\" she continues. \"Most of the time they don't really show themselves in public. Nobody knows exactly who they are, or what they do. Most people don't even know they exist. But there are rumors that they are being backed by the kings of Varathia.\"
\"They're being backed by the kings?\" Daren asks. \"What would Eiden want with these hotshots? You simply have to tell them to remember the still winter, right? I wonder what that's supposed to mean?\"
Daren suddenly wakes up and starts looking around him, confused.
\"What happened? Where's the stillwater?\" he asks me.
\"That's the second time you ask me these exact questions. He's gone. He vanished right after he put you to sleep.\"
\"Put me to sleep?... No, that can't be! I have so much protection against sleep spells that I should be almost immune. At the very least I should be able to keep my consciousness!\"
\"Well I'm just telling you what I saw. I don't claim to understand it either. At any rate, I think we should wake up Kate. She needs to hear what happened, and we could use another strategy meeting right about now.\"
The two of us head for our cave and proceed to wake Kate from her slumber.
<% } %><% if((locals.v_ch4_ending || 0) == 4) {%> \"Barry!\" Daren calls out to me again as he approaches the trees.
\"I'm over here,\" I answer him.
He enters the forest, and starts looking around for Cutthroat Dave.
\"Where's the cutthroat?\"
\"If you look hard enough, you can still see some of his ashes near that rock over there.\"
\"Ashes?... Don't tell me that device of yours gives you fire powers now too.\"
\"It wasn't me, it was the stillwater. Eiden came back and burned Dave to a crisp just as he was about to finish me off. He said it wasn't fitting for a mailman to die before he gets out of the post office.\"
\"Wait, you're saying he used fire magic? Didn't he use air magic that time when he pinned me to the ground? Normally it takes a lifetime to master even a single element!\"
Daren suddenly wakes up and starts looking around him, confused.
\"What happened? Where's the stillwater?\" he asks me.
\"That's the second time you ask me these exact questions. He's gone. He vanished right after he put you to sleep.\"
\"Put me to sleep?... No, that can't be! I have so much protection against sleep spells that I should be almost immune. At the very least I should be able to keep my consciousness!\"
\"Well I'm just telling you what I saw. I don't claim to understand it either. At any rate, I think we should wake up Kate. She needs to hear what happened, and we could use another strategy meeting right about now.\"
The two of us head for our cave and proceed to wake Kate from her slumber.
Daren suddenly wakes up and starts looking around him, confused.
\"What happened? Where's the stillwater?\" he asks me.
\"That's the second time you ask me these exact questions. He's gone. He vanished right after he put you to sleep.\"
\"Put me to sleep?... No, that can't be! I have so much protection against sleep spells that I should be almost immune. At the very least I should be able to keep my consciousness!\"
\"Well I'm just telling you what I saw. I don't claim to understand it either. At any rate, I think we should wake up Kate. She needs to hear what happened, and we could use another strategy meeting right about now.\"
\"Not so fast, Barry. I want to have a look at that stat device of yours, first.\"
\"Huh? What's gotten into you all of a sudden?\"
\"Just hand it over for a second, will you? I want to test something.\"
<% } %><% if((locals.v_ch4_ending || 0) == 5 && (locals.v_ch4_dave_defeat || 0) == 1) {%>I give him the device, and he looks at it intently for a few seconds. \"Are you going to do somethin--\"
\"Shush!\"
He picks up a rock from the ground and throws it at a nearby pine tree. The rock hits its mark and bounces off, leaving a slight dent in the tree's bark.
\"I thought something here was wrong,\" Daren says. \"Look at that dent. You could barely tell I was using a stat device right now. But that throw of yours from earlier... That was insane! It was so strong that it lifted the cutthroat right off the ground and slammed him into a tree. How are you getting so much power out of this?\"
\"I'm... not sure. I thought it was just reacting to the incredible quantity of magical power around us. There must be something about me specifically that makes the stat booster work so well. But without knowing exactly how it functions, it's hard to tell what that might be.\"
\"Hmm...\"
He hands me back the device.
\"I guess there's no use standing here throwing out guesses, then. We'll figure it out later. Let's go get Kate.\"
The two of us head for our cave and proceed to wake Kate from her slumber.
Daren suddenly wakes up and starts looking around him, confused.
\"What happened? Where's the stillwater?\" he asks me.
\"That's the second time you ask me these exact questions. He's gone. He vanished right after he put you to sleep.\"
\"Put me to sleep?... No, that can't be! I have so much protection against sleep spells that I should be almost immune. At the very least I should be able to keep my consciousness!\"
\"Well I'm just telling you what I saw. I don't claim to understand it either.\"
\"Wait a minute... Didn't we just see him cast fire magic too? There's something seriously wrong here. I'm pretty sure he used air magic on me the first time we met. How could he know two types of elemental magic? Normally it takes a lifetime to master even a single element!\"
<% } %><% if((locals.v_ch4_ending || 0) == 1) {%> \"Daren!\" I shout. \"Daren, can you hear me?\"
\"Barry? Wait right there! I'm coming for you!\"
Well, it's not like I'm going anywhere. My knees still hurt like hell. I've barely even budged from my original position to avoid more pain. Eiden sure did a number on me.
\"Barry! What happened?!\" Daren says when he sees me.
\"Oh, not much. Just a little parting gift from our mutual friend.\"
\"Eiden!\" says Daren, while clenching his fist.
He casts a healing spell on me and I suddenly get enveloped in a warm, soothing light. The pain leaves me completely, and I manage to get back on my feet with no difficulty. I always knew there were healing spells like this, but witnessing one of them first hand is something else. Most healers I've met in my lifetime could barely even heal light bruises or ankle sprains.
<% } %><% if((locals.v_ch4_ending || 0) == 1) {%>\"Where's the stillwater?\" \"Gone. I just saw him kill Cutthroat Dave along with a whole crew of henchmen. Turns out he can cast fire magic, combustive magic and teleportation without even breaking a sweat. Eiden got upset because Cutthroat Dave mistook him for me, and I took advantage of the situation.\"
\"Hah! Serves him right! But how did I end up unconscious on the ground?\"
\"You mean you don't remember? He just waved his hand casually and put you to sleep.\"
\"What?... That can't be right. I have so much protection against sleep spells that I should be almost immune. At the very least I should be able to keep my consciousness! And what was that about him using fire magic? I'm pretty sure he used air magic on me when we first met him. Normally it takes a lifetime to master even a single element!\"
Daren suddenly wakes up and starts looking around him, confused.
\"What happened? Where's the stillwater?\" he asks me.
\"That's the second time you ask me these exact questions. He's gone. He vanished right after he put you to sleep.\"
\"Put me to sleep?... No, that can't be! I have so much protection against sleep spells that I should be almost immune. At the very least I should be able to keep my consciousness!\"
\"Well I'm just telling you what I saw. I don't claim to understand it either.\"
\"So would you two mind telling me who that stillwater was?\" Kate asks us. \"And what was that trade he was going on about?\"
Daren and I start filling her in on the details of our first encounter with Eiden.
<% } %><% if((locals.v_ch4_ending || 0) == 2) {%>After we're done talking, Kate takes a few moments to reflect on our words. \"So, let me see if I got this right...\" she says. \"Barry, you traded our lives for one message.\"
\"Right,\" I say.
\"And we need to deliver this message to any robed men we might encounter that wear a brooch with a picture of a hawk holding the sun in its talons.\"
\"Yeah. Does that description tell you anything?\"
\"Yes...\" she says, and then almost immediately looks towards the ground.
She's hiding something again. I just know it.
\"They're an underground group,\" she continues. \"Most of the time they don't really show themselves in public. Nobody knows exactly who they are, or what they do. Most people don't even know they exist. But there are rumors that they are being backed by the kings of Varathia.\"
\"They're being backed by the kings?\" Daren asks. \"What would Eiden want with these hotshots? You simply have to tell them to remember the still winter, right? I wonder what that's supposed to mean?\"
Daren suddenly wakes up and starts looking around him, confused.
\"What happened? Where's the stillwater?\" he asks me.
\"That's the second time you ask me these exact questions. He's gone. He vanished right after he put you to sleep.\"
\"Put me to sleep?... No, that can't be! I have so much protection against sleep spells that I should be almost immune. At the very least I should be able to keep my consciousness!\"
\"Well I'm just telling you what I saw. I don't claim to understand it either. At any rate, I think we should wake up Kate. She needs to hear what happened, and we could use another strategy meeting right about now.\"
The two of us head for our cave and proceed to wake Kate from her slumber.
<% } %><% if((locals.v_ch4_ending || 0) == 4) {%> \"Barry!\" Daren calls out to me again as he approaches the trees.
\"I'm over here,\" I answer him.
He enters the forest, and starts looking around for Cutthroat Dave.
\"Where's the cutthroat?\"
\"If you look hard enough, you can still see some of his ashes near that rock over there.\"
\"Ashes?... Don't tell me that device of yours gives you fire powers now too.\"
\"It wasn't me, it was the stillwater. Eiden came back and burned Dave to a crisp just as he was about to finish me off. He said it wasn't fitting for a mailman to die before he gets out of the post office.\"
\"Wait, you're saying he used fire magic? Didn't he use air magic that time when he pinned me to the ground? Normally it takes a lifetime to master even a single element!\"
Daren suddenly wakes up and starts looking around him, confused.
\"What happened? Where's the stillwater?\" he asks me.
\"That's the second time you ask me these exact questions. He's gone. He vanished right after he put you to sleep.\"
\"Put me to sleep?... No, that can't be! I have so much protection against sleep spells that I should be almost immune. At the very least I should be able to keep my consciousness!\"
\"Well I'm just telling you what I saw. I don't claim to understand it either. At any rate, I think we should wake up Kate. She needs to hear what happened, and we could use another strategy meeting right about now.\"
The two of us head for our cave and proceed to wake Kate from her slumber.
Daren suddenly wakes up and starts looking around him, confused.
\"What happened? Where's the stillwater?\" he asks me.
\"That's the second time you ask me these exact questions. He's gone. He vanished right after he put you to sleep.\"
\"Put me to sleep?... No, that can't be! I have so much protection against sleep spells that I should be almost immune. At the very least I should be able to keep my consciousness!\"
\"Well I'm just telling you what I saw. I don't claim to understand it either. At any rate, I think we should wake up Kate. She needs to hear what happened, and we could use another strategy meeting right about now.\"
\"Not so fast, Barry. I want to have a look at that stat device of yours, first.\"
\"Huh? What's gotten into you all of a sudden?\"
\"Just hand it over for a second, will you? I want to test something.\"
<% } %><% if((locals.v_ch4_ending || 0) == 5 && (locals.v_ch4_dave_defeat || 0) == 1) {%>I give him the device, and he looks at it intently for a few seconds. \"Are you going to do somethin--\"
\"Shush!\"
He picks up a rock from the ground and throws it at a nearby pine tree. The rock hits its mark and bounces off, leaving a slight dent in the tree's bark.
\"I thought something here was wrong,\" Daren says. \"Look at that dent. You could barely tell I was using a stat device right now. But that throw of yours from earlier... That was insane! It was so strong that it lifted the cutthroat right off the ground and slammed him into a tree. How are you getting so much power out of this?\"
\"I'm... not sure. I thought it was just reacting to the incredible quantity of magical power around us. There must be something about me specifically that makes the stat booster work so well. But without knowing exactly how it functions, it's hard to tell what that might be.\"
\"Hmm...\"
He hands me back the device.
\"I guess there's no use standing here throwing out guesses, then. We'll figure it out later. Let's go get Kate.\"
The two of us head for our cave and proceed to wake Kate from her slumber.
Daren suddenly wakes up and starts looking around him, confused.
\"What happened? Where's the stillwater?\" he asks me.
\"That's the second time you ask me these exact questions. He's gone. He vanished right after he put you to sleep.\"
\"Put me to sleep?... No, that can't be! I have so much protection against sleep spells that I should be almost immune. At the very least I should be able to keep my consciousness!\"
\"Well I'm just telling you what I saw. I don't claim to understand it either.\"
\"Wait a minute... Didn't we just see him cast fire magic too? There's something seriously wrong here. I'm pretty sure he used air magic on me the first time we met. How could he know two types of elemental magic? Normally it takes a lifetime to master even a single element!\"
We're currently all sitting in a circle in front of our cave's entrance. The sun is pretty high up in the sky, and there's not a cloud in sight. Luckily, Kate has graciously agreed to use her ice magic to cool the air around us a bit. This way we can enjoy the weather without feeling as if we were inside an oven.
\"Noon is almost upon us,\" Daren continues. \"We should get going as soon as possible. We can't afford to keep travelling once the sun sets, and we have a long road ahead of us. Rose, did you get all of the herbs you were looking for?\"
\"Oh, no... I just remembered, I dropped my bag of herbs when I was being chased by the goblins.\"
\"Don't worry, I doubt anyone would have stolen it, so it must still be where you left it. I'll help you look for it! Come with me.\"
I get up to follow them, but Kate grabs me by the sleeve.
\"Wait,\" she says. \"There's something that's been bothering me since this morning.\" She looks really tense. It seems that she's struggling to get the words out of her mouth.
\"Were you...\"
She pauses.
\"Were you really smitten with me since you first saw me?\"
Of all the things I would have expected her to say to me right now, this was the last of them. Thanks a lot, Daren. What am I supposed to tell her, now?
<% } %> \"Alright, I think that's a wrap!\" says Daren once we finish our strategy meeting.
We're currently all sitting in a circle in front of our cave's entrance. The sun is pretty high up in the sky, and there's not a cloud in sight. Luckily, Kate has graciously agreed to use her ice magic to cool the air around us a bit. This way we can enjoy the weather without feeling as if we were inside an oven.
\"Noon is almost upon us,\" Daren continues. \"We should get going as soon as possible. We can't afford to keep travelling once the sun sets, and we have a long road ahead of us. Rose, did you get all of the herbs you were looking for?\"
\"Oh, no... I just remembered, I dropped my bag of herbs when I was being chased by the goblins.\"
\"Don't worry, I doubt anyone would have stolen it, so it must still be where you left it. I'll help you look for it! Come with me.\"
I get up to follow them, but Kate grabs me by the sleeve.
\"Wait,\" she says. \"There's something that's been bothering me since this morning.\" She looks really tense. It seems that she's struggling to get the words out of her mouth.
\"Were you...\"
She pauses.
\"Were you really smitten with me since you first saw me?\"
Of all the things I would have expected her to say to me right now, this was the last of them. Thanks a lot, Daren. What am I supposed to tell her, now?
",
"responses": [
{
"code": "\"\"Maybe a little.\"\"",
@@ -3026,7 +3026,6 @@
"text": "Load from last checkpoint",
"target": "",
"set_variables": {
- "v_chapter_load": "1",
"v_chapter_save_counter": "5"
},
"conditions": {
@@ -3043,7 +3042,7 @@
"value": 4
}
},
- "special": ""
+ "special": "checkpoint_load"
},
{
"code": "Load game",
@@ -3064,7 +3063,7 @@
"value": 4
}
},
- "special": ""
+ "special": "saves"
},
{
"code": "Continue",
@@ -4103,12 +4102,11 @@
"set_variables": {
"v_next_chapter_crash": "1",
"v_current_scene": "Ch7-Intro",
- "v_chapter_save": "1",
"v_chapter_save_counter": "5",
"v_checkpoint_rich": "1"
},
"conditions": {},
- "special": ""
+ "special": "checkpoint_save"
}
]
}
diff --git a/logic_reader.py b/logic_reader.py
index 4240638..8fc8d98 100644
--- a/logic_reader.py
+++ b/logic_reader.py
@@ -177,6 +177,10 @@ def parse_event(self):
elif match := re.search('Special : Set current scene to "(?P.*)"',current):
event.results["new_scene"] = match.group("scene")
event.results["set_variables"][transform_var_name("current scene")] = match.group("scene")
+ elif match := re.search('Special : Set chapter save to 1',current):
+ event.results["special"] = "checkpoint_save"
+ elif match := re.search('Special : Set chapter load to 1',current):
+ event.results["special"] = "checkpoint_load"
elif match := re.search('Special : Set (?P.*) to (?P.*)',current):
event.results["set_variables"][transform_var_name(match.group("variable"))] = match.group("value")
elif match := re.search('Special : Add (?P.*) to (?P.*)',current):
@@ -190,8 +194,14 @@ def parse_event(self):
elif match := re.search('checks : Set alterable string to (?P.*)',current):
for stat_check in re.findall('"\[.*?\]"',match.group("text")):
event.results["stat_checks"].append(StatsCheck(stat_check.replace('"',"")+"\n","successful" in stat_check))
+ if "Checkpoint reached" in match.group("text"):
+ event.results["stat_checks"].append(StatsCheck("Checkpoint reached: Game saved.",True))
+ event.type = "scene_load"
elif match := re.search('storyboard controls : Jump to frame "Stats"',current):
event.results["special"] = "stats"
+ elif match := re.search('storyboard controls : Jump to frame "Save load game"',current):
+ if event.results.get("special","") == "":
+ event.results["special"] = "saves"
return event
diff --git a/main.js b/main.js
index 1042cb1..79fff66 100644
--- a/main.js
+++ b/main.js
@@ -76,6 +76,11 @@ function render_achievements_menu_chapter(req,achievements_data) {
return ejs.renderFile("templates/achievements_menu_chapter.ejs",Object.assign({},{"achievements":achievements_data},req.cookies))
}
+
+function render_saves(req,achievements_data) {
+ return ejs.renderFile("templates/saves.ejs",req.cookies)
+}
+
let json_data = {}
for (chapter of ["ch1","ch2","ch3","ch4","ch5","ch6"]) {
json_data = Object.assign(json_data,require(`./chapters/${chapter}.json`))
@@ -130,6 +135,10 @@ app.get('/achievements/book/(:idBook)/chapter/(:idChapter)', (req, res) => {
render_full(req,callback,"Achievements").then((rendered) => res.send(rendered))
})
+app.get('/saves', (req, res) => {
+ render_full(req,render_saves,"Save files").then((rendered) => res.send(rendered));
+})
+
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
diff --git a/public/scripts/utils.js b/public/scripts/utils.js
index 673a6fe..130ffae 100644
--- a/public/scripts/utils.js
+++ b/public/scripts/utils.js
@@ -7,6 +7,16 @@ function getCookie(name) {
return null;
}
+var getCookies = function(){
+ var pairs = document.cookie.split(";");
+ var cookies = {};
+ for (var i=0; i {
+ const eqPos = cookie.indexOf('=');
+ const name = eqPos > -1 ? cookie.substring(0, eqPos) : cookie;
+ if (/v_.*/.exec(name)) {
+ document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:00 GMT';
+ }
+ });
+}
+
+
+function loadGameFromLocalStorage(saveName) {
+ if (localStorage) {
+ const data = JSON.parse(localStorage.getItem(saveName));
+ clearState()
+ Object.entries(data).forEach((entry) => storeItem(entry[0],entry[1]))
+ }
+ else {
+ console.log("localStorage not supported");
+ }
+}
diff --git a/public/styles/main2.css b/public/styles/main2.css
index e8b7bd5..0a9031f 100644
--- a/public/styles/main2.css
+++ b/public/styles/main2.css
@@ -164,3 +164,10 @@ button {
.achievement-text {
margin-left: 1em;
}
+
+.save-list {
+ display: flex;
+ flex-direction: column;
+ width: 40%;
+ margin: auto;
+}
diff --git a/templates/main.ejs b/templates/main.ejs
index 279e332..bc45673 100644
--- a/templates/main.ejs
+++ b/templates/main.ejs
@@ -31,6 +31,14 @@
hx-get="/scene/<%= response.target %>"
<% } else if (response.special=="stats") { %>
hx-get="stats"
+ <% } else if (response.special=="checkpoint_load") { %>
+ hx-get="/"
+ hx-on::before-request="loadGameFromLocalStorage('checkpoint')"
+ <% } else if (response.special=="checkpoint_save") { %>
+ hx-get="/"
+ hx-on::before-request="saveGameToLocalStorage('checkpoint')"
+ <% } else if (response.special=="saves") { %>
+ hx-get="/saves"
<% } %>
hx-target="#content"
hx-swap="innerHTML"
diff --git a/templates/menu.ejs b/templates/menu.ejs
index 65a0f45..e75eb23 100644
--- a/templates/menu.ejs
+++ b/templates/menu.ejs
@@ -1,4 +1,14 @@