<h1>Valavorex</h1> <h4>By: Robley Evans</h4> [[START]] [[Credits]]It's the year 297 RGM in the [[City of Flowers]]. The time has come for another calamity beast attack. The [[calamity beasts]] always bring great death and often, a large destructive force onto the city. [[Thera]]Calamity Beasts are the foes that come through the Runic Gate when its power grows weak. Most of them bring about the destruction of what small number of towns and civilizations known. One usually appears each decade, right around the same time. They bring with them a destructive force that kills tens of thousands if not dealt with quickly. The City of Flowers has survived calamity beasts for many years. The people grow stronger, the defenses are repaired and adjusted for the next beats and the Rune Knights do what they can to protect the citizens. [[Back->START]]The City of Flowers is the largest city in all of Understone. The northern city of Luminos is growing but, the City of Flowers is where most of the current Rune Knights are trained and stationed. The City's population is at a boom, the economy is going strong, and the people are relatively happy in everyday life. However, the tension has been high for the last month, knowing that a calamity beast could appear at any given moment. The bunkers have been setup for each section of the city, the garrisons are on full alert and even the farmers are only working in the fields outside of the city for so long each cycle. [[Back->START]]Your name is Thera the Blue, one of the youngest elves to ever take the position of [[Rune Knight]]. You were given the color of blue for your wisdom and ability to respond to events rapidly. This is the first time you will be on the walls during an attack from a calamity beast. The last time, you were still in training and they kept you aside. [[The Walls]]You shake your head realizing that you were gazing out again at the dark eerie landscape that is what the inhabitants of this massive cavern call Understone. The people around are on high alert. Not more than 30 minutes ago, a scout came and reported to have seen the incoming calamity beast. It's supposedly a shadow dragon, although many call them death dragons because of the destruction they sow. "There it is," a human man says standing next to you. He's someone you've grown to know well during training, one of your closest friends and your personal rival, [[Garren]] the Red. You look beyond the ramparts and notice a small bobbing dot in the distance. Not more than a minute later, the beginnings of a horde start to approach. [[Sound the Horns->Horn]]Garren the Red is headstrong human male who you've known for nearly 15 years. You meet him early on in training and he gave you no end of trouble. He at first seemed to bully you with him strength, but it wasn't long before you adapted to his predictable style and fought back against him. From that point on, he had newfound respect for you and treated you more friendly, but as a rival. Contests between you two led through most classes and missions, causing a strange efficiency at the tradeoff of some risky situations. Garren has always been someone who would dive into dangerous situations, hoping for the best outcome. This was mainly the reason he was given the color Red upon graduation from the Runic Academy. [[Back->The Walls]]Rune knights are those that are trained in the fighting of the ancestors. There is an academy that trains them, but it is very exclusive and very rarely do people graduate. Only about 20 Rune Knights are produced in the City of Flowers each decade. The job of a Rune Knight is to be the defenders of mortals by protecting settlements against the calamity beasts, but also to reseal the [[Runic Gate]] after the beats push through it. There are 6 colors that a Rune Knight can be assigned, each based off a certain character trait. Thera's is blue for wisdom, but there's also red for bravery, orange for honor, green for magical abilities, purple for empathy, and yellow for willpower. Each of these attributes allow the whole of the Rune Knights to be rounded out and balanced to handle intense situations. [[Back->Thera]]The Runic Gate is the massive teleportation matrix that serves as the only entrance and exit to Understone. The calamity beasts need to attempt for years to push through it with their strength. It has been almost 300 years since the mortals living in Understone migrated through. Each time a calamity beast fights through, the Rune Knights must repair it using their life forces. [[Back->Rune Knight]](set: $manpower to 10, $timeBeforeAttack to 8, $morale to 100, $dragHealth to 100, $deathRate to 1.0, $damageRate to 1.0, $cityHealth to 100, $playerHealth to 100, $armyHealth to 100, $population to 100, $hasBalista to false, $hasCatapult to false, $magicTraps to false, $gateReinforced to false, $trenches to false, $oil to false, $innerDef to false, $buildString to "", $hasEvacuated to false, $gateTimer to 4, $wallTimer to 3, $turnsIn to 0)"Woah" you hear Garren say with anticipation. "That's a lot of them..." You nod and grab the horn hanging from your side. You put it up to your lips and blow as hard as you can. //TA-TOOO// You hear several responses from different parts of the city. You can feel the negative rush of preemptive panic falling over the citizens, as well as the unease from the defenders on top of the wall. "Here he comes..." Garren points out towards the floating dot as it starts getting bigger. [[Prepare to Fire->archersPreempt]] [[Wait for the dragon's approach->approach]](set: $damageRate to 1.25, $deathRate += .25, $timeBeforeAttack to 3, $manpower to 5)"ARCHERS!" You yell. Following your voice, the sound of hundreds of arrows leaving quivers reach your ears. "FIRE WHEN IT'S IN RANGE," you command. Garren looks at you and nods respectfully to you. "You should go make sure the defenses are ready for their advances." "Of course. I'll whip anyone slacking into shape, don't you worry!" Garren responds with enthusiasm. He gives you a quick salute and then runs off along the walls echoing your commands and making sure all the defenders are ready. There is an air of anticipation as the defenders prepare to launch a volley of projectiles. The dragon comes closer to the range, not slowing down in the slightest. [[In range->fireAtWill]]The dragon's silhuloette gets larger as you and the defenders on top of the wall watch. The only sound to be heard is the flapping of its leathery wings. The dragon eyes you and Garren on its way to the wall. It turns slightly to the two of you and heads in your direction. "He's gonna land! MOVE!" You yell to the people nearby. As if on que, a massive gale from giant flapping wings almost causes you to fall backwards. Your steadfast stance keeps you upright. Garren is struggling a bit, but he's managing to keep his footing. The massive dragon lands in front of you and Garren. "Which of you puny beings are in charge," it says menacingly, eyeing between you and Garren. You eye Garren, he gives you a nod saying that it's your call. (link: "\"I am\"")[(set: $lead to true)(goto: "leader")] (link: "\"He is\"")[(set: $lead to false)(goto: "leader")] [["Neither of us"->neither]](set: $timeBeforeAttack to 5, $morale to 80, $avoid to true)"Neither of us are in charge here, you've found the wrong people," you say hesitantly. Garren eyes you but doesn't say anything. The dragon puts his head directly in front of you, one of his massive eyes looking into both of yours. "You think I am a fool mortal? You try my patience. I could end your existence with a single breath. Now I say again, WHO IS THE LEADER?" His deep, booming voice sends vibrations through your body, leaving a small nervous feeling behind. He once more waits for your answer... (link: "\"I am\"")[(set: $lead to true)(goto: "leader")] (link: "Let Garren respond")[(set: $lead to false)(goto: "leader")](if: $lead is true)[(if: $avoid is true)["I-I am," you say trying to swallow the fear instilled by the previous threat. "I am T-Thera the Blue, I c-command these walls..." The dragon snaps his head back. "I see that these walls will fall faster because of it."](else:)["I command these walls. My name is Thera the Blue, defender of the City of Flowers and one of the Rune Knights in this city. What is your business with me?" You ask defiantly, Garren gives you a nod of respect. "I see," The dragon responds with attention focused on you.]](else:)[(if: $avoid is true)[You can't seem to find your voice to respond to the massive dragon in front of you. After a moment, you hear Garren's voice, stuttering, "M-my n-ame is G-Garren. I a-am in charge h-here..." You can hear a fear that you've never heard in his voice, and it makes you even more unsettled. "If your defenses are as pitiful as you two, then this city is already as good as mine," the dragon states with a snort.](else:)[(set: $morale to 90)You look over to Garren and he gives you a slight nod, then turns back to the dragon. "My name is Garren the Red, I lead the defense of the city here. What do you wish to speak about?" Garren demands sternly. "Ah, so you are this city's protector?" The dragon responds, focus completely on Garren.]] "My name is Valavorex of the Dark Flames clan. I bring with me an army of my kin that I will use to tear through your city. I only wished to hear the name of my adversary, to make sure that they are not forgotten come the fall of this stronghold," Valavorex explains without a hint of pity or remorse. "I will be back soon, then we shall see how you deal with me then.(if: $avoid is true)[ Hopefully you will have regained the composure that a leader should have, too.]" Without another word from either side, Valavorex beats his leathery wings, sending gusts of wind at you and Garren, although not nearly as strong this time. [[Time to prepare->preparation]](if: $timeBeforeAttack >= 1 and $manpower >= 1)[There's $timeBeforeAttack hours before the incoming army attacks. You have $manpower units that are able to be used setup defenses. Time to give orders. $buildString ORDERS:(if: $timeBeforeAttack >= 1 and $manpower >= 1 and $gateReinforced is false)[ [[Reinforce the gates]]](if: $timeBeforeAttack >= 2 and $manpower >= 2 and $hasBalista is false and $hasCatapult is false)[ [[Build Ballistae]]](if: $timeBeforeAttack >= 2 and $manpower >= 2 and $hasBalista is false and $hasCatapult is false)[ [[Build Catapults]]](if: $timeBeforeAttack >= 2 and $manpower >= 1 and $trenches is false and $magicTraps is false)[ [[Set Magic Traps]]](if: $timeBeforeAttack >= 1 and $manpower >= 2 and $trenches is false and $magicTraps is false)[ [[Dig Covered Trenches]]](if: $timeBeforeAttack >= 1 and $manpower >= 2 and $oil is false)[ [[Prepare Defensive Oil and Fire]]](if: $timeBeforeAttack >= 1 and $manpower >= 2 and $innerDef is false)[ [[Setup Inner Wall Defenses]]](if: $manpower >= 1)[ [[Evacuate Civilians]]]](else:)[(set: $turn to 0)Time has run out. You can see the army is beginning to move forward. The siege has officially begun. It's time to protect the city to the last defender... [[Siege]]](set: $dragHealth to 85)The moment passes and the dragon enters the archers' range. A large succession of //twangs// are heard as bowstrings snap and arrows are let loose. The volley soars through the air towards the beast, unbeknownst to it. The moment of impact comes as many arrows impact the beast. "**FOOLISH MORTALS! YOU DARE ATTACK ME ON MY WAY TO PARLEY?**" The dragon roars with anger. The dragon turns towards you as another volley of arrows are launched. "Woman, you have angered me today. I was prepared to act civil before the assault, but it seems you do not have any rationality," it starts to explain, with a dark look in his sharp eyes. Another volley of arrows impact the dragon, causing it to roar once more. "You will suffer the wrath of Valavorex! Prepare while you can mortals! I will be there soon to show you where you went wrong," Valavorex threatens. Another volley launches towards Valavorex. He looks towards the arrows, he blasts a dark purple flame towards the arrows, destroying most of them. A few of the arrows find their mark, but most were destroyed. Valavorex turns and flaps his wings flying away from the walls back towards the opposing army. With little time before the invasion, it's time to start preparation... [[Prepare for invasion->preparation]](set: $buildString += "You've got people working on reinforcing the gate. ", $gateReinforced to true, $manpower -= 1, $timeBeforeAttack -= 1, $gateTimer *= 2)"Alright! It's time to reinforce the gates! They're going to be trying to bust them open and we can't afford to let them in!" you yell to the people by the gates. You hear some agreements and the people at the gates being to work on making them stronger to withstand the battering ram... [[Continue->preparation]](set: $buildString += "Several people are grabbing materials to construct the ballistae. They need to be made all along the walls in order to take down the dragon. ", $hasBalista to true, $manpower -= 2, $timeBeforeAttack -= 2)"Ballistae need to be built and we need them as soon as possible. Send two units of people to help with construction. I want several on the ramparts!" Over fifty defenders all go to get the materials necessary to construct the ballistae. They will be key to helping defeat this incoming invasion... [[Continue->preparation]](set: $buildString += "Two units of men are working on constructing the catapults along the walls. The incoming army will take heavy casualties from them. ", $hasCatapult to true, $manpower -= 2, $timeBeforeAttack -= 2)"We need to get those catapults up now. Take as many men as you need to get it done," you command to one of your captains. She salutes you and begins to get to work on the catapults. With that, the incoming army should suffer heavily due to the massive rocks... [[Continue->preparation]](set: $buildString += "Defenders are working on setting up the massive explosive runes as well as other types of nasty surprises for the invaders outside of the walls that should take out some numbers. ", $magicTraps to true, $manpower -= 1, $timeBeforeAttack -= 2)"Get a group of arcanians to help setup trap runes. Explosive ones will probably work best but they can choose whichever they think will be more effective," you command to those around you. Several people stop their rest and rush to help get the runes set up, any damage that can be done to the army is damage that is going to be needed... [[Continue->preparation]](set: $buildString += "Two units are digging trenches and setting up spikes to hinder the incoming army. ", $trenches to true, $manpower -= 2, $timeBeforeAttack -= 1)"Get people to start digging trenches with wooden spikes at the bottom, then cover them back up. That should slow them down and keep them from attacking all at once." Two units of defenders grab shovels and move to fulfill your wishes... [[Continue->preparation]](set: $buildString += "Oil and fire is on its way back to the walls. With that, the walls should be held longer. ", $oil to true, $manpower -= 2, $timeBeforeAttack -= 1)"Send some people to get casks of oil and extra torches. The moment they start climbing the ladders, we want them burning!" A group of defenders immediately rush to follow your orders, knowing that the more oil they bring, the better their chances... [[Continue->preparation]](set: $buildString += "A unit of defenders have been sent into the city to help create other points to hold the enemy back to protect citizens. ", $innerDef to true, $manpower -= 3, $deathRate -= 0.25, $turnsIn -= 1)"I need a group of people to setup the last line of defense!" Several of the defenders volunteer to setup the defenses. With that out of the way, you can focus more on other tasks... [[Continue->preparation]](if: $hasEvacuated is false)[(set: $buildString += "You've ordered a unit of men to go help citizens evacuate nearby homes and get people off the streets for the incoming army's invasion. ", $hasEvacuated to true)](set: $manpower -= 1, $timeBeforeAttack -= 1, $deathRate -= 0.1)"Take some men and evacuate citizens. This place will become a warzone soon and they shouldn't be here," you command to a nearby officer. He nods and salutes you, then turns to assemble his group and accomplish the task... [[Continue->preparation]](set: _roll to (random: 1,4), _bDamage to (random: 4,8))Health: $playerHealth% City Health: (round: $cityHealth)% Morale: (round: $morale)% City Population: (round: $population)%(if: $turn >= 1 and $turn < 5 and $hasCatapult is true and $onWalls is false)[ The catapults launch a volley of rocks at the oncoming army, killing attackers wherever they land.(set: $armyHealth -= (random: 1, 4))](else-if: $turn >= 2 and $hasBalista is true and $dragonDead is false and $onWalls is false)[ The ballistae target Valavorex and launch a series of bolts in his direction. The dragon is able to dodge some, but a few hit their mark. (set: $dragHealth -= ((random: 1,3)*2))](if: $turn > 2 and $onWalls is false)[ Archers shoot arrow after arrow onto the attackers below, picking off several enemies at once. (set: $armyHealth -= (random: 2,6), $dragHealth -= 2)](if: $turn > 3)[(if: (random: 1,4) is not 1 and $dragonDead is false)[ Valavorex blasts his flame breath into the city, destroying building and burning citizens alive. The roar echoes throughout the walls, letting everyone on the walls know what happened without them needing to look.(set: $morale -= (_bDamage / 2), $cityHealth -= (_bDamage * $damageRate), $population -= (_bDamage * $deathRate), $damageRate -= 0.05, $deathRate -= 0.05)](else-if: $dragonDead is false)[ Valavorex circles the city, preparing to unleash another breath attack onto the inhabitants of the City of Flowers.]] (if: $turn is 0)[You see the dragon lift off of the ground and shoot a pillar of dark flame into the sky. The invading army begins to move in the direction of the city, making slow progress. Valavorex hovers over them and paces his forces. Garren returns to your side. "Everything is as ready as we could make it. The defenders are in position and the equipment laid out. Let's see if it works..." he trails off. You look at him, seeing an expression that he very rarely has. This is no simple mission; this is a life or death battle. The lives of over a million citizens fall on your shoulders as the commander. Failure is //not// an option.(set: $turn to 1, $retreating to false, $shattered to false, $dragonDead to false, $gateBreached to false, $onWalls to false, $hasEnded to false, $end to -1, $garrenDead to false, $playerDead to false, $prepare to false) [[Army Advances->Siege]]](else-if: $turn is 1)[ The army advances with different siege equipment. Many are carrying ladders to scale the walls and take down the defenses that lie on top of them. There is also a battering ram covered by a wooden roof heading in the direction of the city gates.(set: $turn to 2, $oilUse to 0) [[Army Advances->Siege]]](else-if: $turn is 2)[ The army moves into range and the archers on the walls begin firing at the attackers who are preparing to get into formation.(set: $turn to 3, $armyHealth -= (random: 1,4), $dragHealth -= 1) [[Army Advances->Siege]]](else-if: $turn is 3)[ (if: $magicTraps is true)[Explosions are heard as the army reaches the magic runes and traps left by your commands. Bodies rain back down on their living comrades. "You dare use petty tricks against my armies? You shall suffer for this!" the shadow dragon threatens. (set: $armyHealth -= 10)](else-if: $trenches)[A loud amount of screams can be heard from the attackers as they reach the hidden spike trenches. Their advance slows, giving you and the defenders a bit more time to deal with them. "A sneaky trick, but this little hinderance will not save you..." the dragon warns. (set: $armyHealth -= 5, $gateTimer += 3, $wallTimer += 2)]Valavorex flies past you and the walls and turns towards you. "I will burn this city to the ground. You and your defenders will watch the fires of hell kill and burn your friends and family. Forever, those who live will remember the name ''VALAVOREX''!" He once more begins flying over the city. A loud roar is heard, and dark flames engulf several buildings. The attackers below start getting in position to scale the walls and attack the gates.(set: $morale -= 2,$cityHealth -= (_roll * $damageRate), $population -= (_roll * $deathRate), $turn = 4) [[Attack Begins->Siege]]](else-if: $turn is 4)[ The ladders begin to be setup for the attackers to use and scale the walls. The battering ram makes it to the gate and attackers take up positions to start bashing the gates down. (set: $turn to 5, $gateDown to false) [[Attack Continues->Siege]]](else-if: $turnsIn < 2 and $hasEnded is false)[ The attack rages on. (if: $gateTimer is 0)[(set: $gateDown to true, $morale -= 3)The gates have collapsed and the invaders are rushing in. ](else:)[(set: $gateTimer -= 1)There is a loud bang as the gates get hit by the battering ram. ](if: $wallTimer is 0)[(set: $onWalls to true, $morale -= 3)The attackers have scaled the walls and are now fighting the defenders.](else:)[(set: $wallTimer -= 1)Attackers are climbing the ladders trying to get to the top and take over the defenses. There are a few places where the ladders have been scaled, but they haven't managed to thwart the defenders. (if: $oil is true and $onWalls is false)[ (if: $oilUse < 3)[[//Burn the ladders//]<burn|(click: ?burn)[(set: $dragHealth += 1, $wallTimer += 2, $oilUse += 1)(replace: ?burn)["Burn them off their ladders!" you command. Moments later, the first cry goes up as flames start to burn the attackers making the climb. Nearly as fast as they've burned, more ladders start to take their place.]]](else:)[//The defenders have run out of oil to use on the ladders... //]]] [//Retreat to the City//]<retreat|(click: ?retreat)[(if: $innerDef is false)[(set: $innerDef to true, $deathRate -= 0.25)](set: $hasEnded to true, $prepare to true)(replace: ?retreat)[You call for the defenders on the wall to help setup a defense (cond: $gateDown is true, "to hold off the attackers coming into the city. ", $gateDown is false, "to prepare for when the attackers start to get into the city. ")]](if: $onWalls is true)[ [//Help the defenders//]<help|(click: ?help)[(set: $playerHealth -= (random: 1,6), $armyHealth -= 1, $morale += 1, $turnsIn -= 1)(replace: ?help)[You draw your longsword, preparing to fight the oncoming attackers. You rush to the nearest group that made it up the ladders and being an onslaught of attacks. With the defender's help, you quickly dispatch the group. You clean your weapon off and sheathe it, looking at the battle surrounding you as it unfolds. ]]](set: $turn += 1)(if: $onWalls is true)[(set: $turnsIn += 1)](if: $gateDown is true)[(set: $turnsIn += 1)](if: $dragHealth < 0 and $dragonDead is false)[(set: $dragonDead to true, $morale += 25) A loud crash comes from the city. You look over to see the corpse of Valavorex laying where some shops used to be. You shout "''THE DRAGON IS DEAD! HOLD YOU GROUND AND FIGHT! WE WILL PREVAIL!!'' "](else-if: $dragHealth < 40 and $dragonDead is false)[ You see Valavorex abruptly turn towards the walls and blast hit breath on the defenders. You hear the screams of many as they burn alive with and eerie purple flame. (set: $morale -= 3)(if: (random: 1, 4) is 1)[(set: $playerHealth -= 15)You feel a rush of heat coming towards you as dark flames wash over your body. The singeing feeling sticks to you after the flames dissipate. Many of the defenders around you weren't so lucky... ](if: (random: 1,10) is 1 and $garrenDead is false)[(set: $garrenDead to true, $morale -= 7)You look around at the corpses and notice a glint of red. A rush of anxiety passes over you as you make your way to the body the glint came from. The armor was malformed by flames, but you know exactly who it belonged to. Sadness overtakes you for a moment, remembering all the time you spent with Garren. Sounds of fighting bring to back to the present, but you swear to make sure he gets the proper sendoff that he deserves, for all of the service he did to you and this city... ] Valavorex continues on flying back into the city to destroy more of the City of Flowers. ] (if: $hasEnded is false)[[[Attack Continues->Siege]]]](else:)[ (if: $prepare is false)[You watch as the attackers overtake the defenders both on the walls and in the city. There is no way you can win this if you stay spread out like you currently are. ](else:)[You watch as defenders on the wall start to leave their positions, giving the walls to the invaders. ](if: $garrenDead is false)[Garren comes up to you and asks for your orders. He's soaked in blood, hopefully of the enemies. "We need to build up a defense to help protect the citizens. Sound the order to reform ranks in the streets. I want a group of men from the walls to help those blocking off the gates!" You explain while the two of you quickly make your way off the wall. (if: $dragonDead is false)["We're gonna be needed to help take down that dragon sooner rather than later!" Garren laughs, "Now //that's// what I'm talking about!" he exclaims excitedly. "Let's teach him how we greet those who aren't welcome to our city!" ](else:)["Since the dragon is dead, we should focus on expelling the remaining enemies from the city. Let's go back up our forces!" you say. "Good idea, with us there, the invaders don't stand a chance!" Garren says drawing his weapon. "They can't blame us for being impolite!"]](else:)[You rush down the stairs passing the corpses of attackers and defenders. You need to back up the troops before the enemies can get to the citizens. (if: $dragonDead is false)[However, there's no way that you can back up the troops without taking down the dragon first. With that monster wreaking havoc, the city will surely fall...](else:)[With the dragon out of the way, you can focus on rallying the troops against the incoming forces. Hopefully, your men will withstand the army...]] [[Defend the City->Final Defense]]] <audio src="https://people.rit.edu/rde5329/TwineAssets/BattleSoundEffect.mp3" autoplay loop>(set: $strength to false, $gStrength to false, $armor to false, $gArmor to false, $strTimer to -1, $gStrTimer to -1, $armorTimer to -1, $gArmorTimer to -1, $bound to false, $boundTimer to -1)(if: $innerDef is true)[(if: $dragonDead is false)[(set: $defTurns to 3)](else:)[(set: $defTurns to 5)]You see a large line of defense from the men you put on standby to fight when the city defenses started to fall. The gates have collapsed but the defenders still have a grasp on the city for now. (if: $garrenDead is false)["What do you think we should do Thera? We can help back these guys up or setup another defense. Helping out the garrison might make them able to hang on longer than if their leaders are missing. (if: $dragonDead is false)[We also still need to take care of that dragon before it burns everything to the ground...]" Garren explains. Either way, there's going to be plenty of fighting...](else:)[You know that helping to defend the city at the front lines would help with the morale of the troops. But setting up another line of defense might help slow the army even more to allow more people to escape. (if: $dragonDead is false)[There is also Valavorex still destroying parts of the city and those who're hiding in buildings. It might be better to take care of him fist...]] [Line of Defense]<loda|(click: ?loda)[(set: $path to 0, $secDef to 5, $hasFallen to false, $fightDragon to false)(goto: "DefenseA")] [Help Defenders]<hd|(click: ?hd)[(set: $path to 2, $fightDragon to false)(goto: "Defenders")] (if: $dragonDead is false)[[Go After Valavorex]<gava|(click: ?gava)[(set: $path to 1, $fightDragon to true)(goto: "DragonA")]]](else:)[You see invaders flood in through the gates. There are some defenders making a stand, but they won't last long with the way they are grouped up (if: $garrenDead is false)["Those fools need to regroup. We need to setup a new defensive line to hold off the attackers! (if: $dragonDead is false)[There's also still Valavorex to take care of too. ]What's our play Thera?" Garren asks looking at you.](else:)[It might be beneficial to setup a new line of defense to try to slow the attack down. (if: $dragonDead is false)[There's also the dragon attacking the city too. Without getting rid of him, there might not be any city left to protect...]] [Line of Defense]<lodb|(click: ?lodb)[(set: $path to 3, $secDef to 3, $hasFallen to false, $fightDragon to false)(goto: "DefenseB")] (if: $dragonDead is false)[[Go After Valavorex]<gavb|(click: ?gavb)[(set: $path to 4)(goto: "DragonB")]]](set: $updateString to "", $mana to 10, $hasEnded to false, $help to false, $fightDragon to true) <audio src="https://people.rit.edu/rde5329/TwineAssets/BattleSoundEffect.mp3" autoplay loop>(if: $garrenDead is false)["Gather what defenders you can to take from this section. Find a good choke point moving fastest to the center of city. They'll probably start with that." You tell Garren and he nods. He rushes over to collect defenders that are up for the task. ]You think about the best way to setup the line. You know of a spot not far from here that would make a good defensible chokepoint to hold the army at. You start to gather some men to bring with you and lead everyone to the spot. [[Wait for Attackers->Base Update]](set: $first to true)(if: $garrenDead is false)[You and Garren move to the line of defenders. The troops cheer as you enter the fray with the attackers. The two of you have had extensive martial and magical training. "Thera, back me up! I'll keep them busy!" Garren says, drawing his dual longswords. You nod to him and prepare to make a move.](else:)[You make your way to the defenders. They start to cheer when you arrive. You've been trained in many forms of combat, including magical. You prepare to make your move.] [[Battle->Base Update]](if: $garrenDead is false)[You get to the bottom of the stairs and look around. You see Valavorex circling in the air not too far away in the city. "Let's go get him. If we challenge him, he most likely won't deny us." You say to Garren nearby. You both start charging forward to where he is, passing the defensive lines your men have setup.(set: $help to false)](else:)[You get off the wall and see Valavorex circling nearby. You rush to get near him, passing the soldiers in the defensive lines. If you challenge him, he'll probably accept it, you think to yourself. Some defenders start to follow. "I'm chasing down that dragon, I have a score to settle with him. Follow at your own risk," you say to the men following. They nod and continue with you anyways.(set: $help to true)](set: $dragTurn to 0) [[To the Dragon->dragonUpdate]](if: $garrenDead is false)["We need to setup a line of defense! They're rushing the city!" You tell Garren and he nods. "I'll go find some people to bring with up!" he says and rushes to collect defenders that are up for the task. ]You think about the best way to setup the line. You know of a spot not far from here that would make a good defensible chokepoint to hold the army at. You start to gather some men to bring with you and lead the defenders to the chokepoint. [[Wait for Attackers->Base Update]](if: $garrenDead is false)[You get to the bottom of the stairs, attackers and defenders fighting nearly everywhere. The defenders are being pushed back without any sort of defensive line. You and Garren break past the fighting and see Valavorex flying above the city nearby. "We need to crush that dragon if we want to make the attackers retreat faster!" You say while rushing to the dragon's location. "We'll take care of him for sure, we just need to hope the troops can hold out!" Garren says following close behind.](else:)[You get off the wall and see Valavorex circling nearby. There is a massive fight happening in front of the gates. You know that the defenders aren't going to last long, but if you can take down the dragon before they lose, the enemy army will hopefully retreat!](set: $help to false, $dragTurn to 0) [[To the Dragon->dragonUpdate]]$updateString (if: $hasFallen is true)[The line has fallen... ''//See what happens next...//'' [[Ending->LineEnd]]](else-if: $retreating is true)[The enemy army is retreating! ''//See what happens next!//'' [[Ending->LineEnd]]](elseif: $shattered is true)[The defenders' morale has shattered! They are fleeing for their lives... ''//See what happens next...//'' [[Ending->LineEnd]]](else-if: $playerDead is true)[You've been killed. The battle is still happening however... ''//See what happens next...//'' [[Ending->DeadUpdate]]](else:)[(if: $defTurns > 0)[There is a stillness in the air. The anticipation of the attackers making their way to the last line of defense is almost too much to bare... [[Continue to wait for attackers->Base Update]]](else-if: $defTurns is 0)[The attackers surging forward hit the line and the fighting starts. (if: $garrenDead is false)["Thera! Back me up! I'll help fight on the front!" Garren yells moving to join in the fray. ] You can either use your magic or your weapons to continue fighting. [[The final battle begins->Base Update]]](else:)[(if: $garrenDead is false)[You see Garren fighting enemy after enemy, killing them as they come. (set: $armyHealth -= 1)(if: $gStrength is true)[The strength spell you gave him makes him 3 times more efficient while he fights! (set: $armyHealth -= 2)](if: (random: 1,15) is 1 and $gArmor is false)[You hear a groan come from nearby. You look over and see Garren with an enemy's sword through his chest piercing out his back. He catches your eye and smiles a sad smile. In the next moment, another sword swings at him, taking off his head. His body goes limp and falls to the ground. (set: $garrenDead to true, $morale -= 5)]] The defenders are all fighting as hard as they can to make it through this battle. (set: $armyHealth -= 1)(if: $mana < 10)[(set: $mana += 1)] You still have $mana mana left to cast spells. You also are at (round: $playerHealth)% health. Choose what you'll do: (if: $mana >= 2)[[[Cast a spell->spells]]](else:)[//You don't have any mana to cast spells. ''HINT'': You regain 1 mana every turn!//] [[Fight on the front line->FrontLine]]]] <audio src="https://people.rit.edu/rde5329/TwineAssets/BattleSoundEffect.mp3" autoplay loop>$updateString (if: $retreating is true)[The enemy army is retreating! ''//See what happens next!//'' [[Ending->LineEnd]] ](elseif: $shattered is true)[The defenders' morale has shattered! They are fleeing for their lives... ''//See what happens next...//'' [[Ending->LineEnd]]](else-if: $playerDead is true)[You've been killed. The battle is still happening however... ''//See what happens next...//'' [[Ending->DeadUpdate]]](else-if: $first is true)[The attackers surge forward through the gates at the major choke point. Defenders are rushing to help keep them from getting through. (if: $garrenDead is false)["Thera! Back me up! I'll help fight on the front!" Garren yells moving to join in the fray. ] You can either use your magic or your weapons to continue fighting. [[Join the battle->Base Update]](set: $first to false)](else:)[(if: $garrenDead is false)[You see Garren fighting enemy after enemy, killing them as they come. (set: $armyHealth -= 1)(if: $gStrength is true)[The strength spell you gave him makes him 3 times more efficient while he fights! (set: $armyHealth -= 2)](if: (random: 1,15) is 1 and $gArmor is false)[You hear a groan come from nearby. You look over and see Garren with an enemy's sword through his chest piercing out his back. He catches your eye and smiles a sad smile. In the next moment, another sword swings at him, taking off his head. His body goes limp and falls to the ground. (set: $garrenDead to true, $morale -= 5)]] The defenders are all fighting as hard as they can to make it through this battle. (set: $armyHealth -= 1)(if: $mana < 10)[(set: $mana += 1)] You still have $mana mana left to cast spells. You also are at (round: $playerHealth)% health. Choose what you'll do: (if: $mana >= 2)[[[Cast a spell->spells]]](else:)[//You don't have any mana to cast spells. ''HINT'': You regain 1 mana every turn!//] [[Fight on the front line->FrontLine]]] <audio src="https://people.rit.edu/rde5329/TwineAssets/BattleSoundEffect.mp3" autoplay loop>$updateString (if: $retreating is true)[The enemy army is retreating! ''//See what happens next!//'' [[Ending->DragonEnd]]](else-if: $dragonDead is true)[You slice him once more and he falls over, limp. You can tell by looking at his eyes that he was killed. You've defeated Valavorex! ''//See what happens next!//'' [[Ending->DragonEnd]]](else-if: $shattered is true)[You notice defenders fleeing from battle and a wave of attackers pass by. The morale of the defenders has broken and they're fleeing for their lives... "You've lost," Valavorex says looking at the devastation around him. "Your people are fleeing, your homes are burned, and your city in ruins. I'll leave you to pity your defeat..." He then flies off to tend to his army... ''//See what happens next...//'' [[Ending->DragonEnd]]](else-if: $playerDead is true)[You've been killed by Valavorex. The battle is still happening around you... ''//See what happens next...//'' [[Ending->DeadUpdate]]](else-if: $dragTurn is 0)[You begin the rush to find and challenge Valavorex. He can be seen as another attack comes forth from his mouth. (if: $garrenDead is false)[Garren follows behind, trying to keep up. ](else-if: $help is true)[Your small group of defenders follow you in pursuit of the dragon, hoping to become the heroes of the city. ] You eventually get into earshot of Valavorex and shout up to him. "''Valavorex. Hear me and come. I challenge you!''" "You again? I'm surprised you don't lay dead with your men. Very well, I shall accept your challenge. You are bound to die at some point, it might as well be against me. I respect your choice to die fighting, like a true warrior," He says, slowly beginning to land near you. (if: $garrenDead is false)[Garren reaches you shortly after. "This will be a tough battle, even for us. We need to watch each other's back. Let's show him what the City of Flowers is made of!" The two of you prepare for the most intense fight of your lives.](else-if: $help is true)[Your defenders reach you and prepare to fight to the death to defeat the most intense foe of their lives.] [[Fight the dragon->Base Update]](set: $dragTurn to 1, $helpLives to (random: 6, 12))](else:)[(if: $garrenDead is false)[You see Garren charge at Valavorex, going into complicated patterns of attacks that are only so effective on a foe that size. (set: $dragHealth -= 1)(if: $gStrength is true)[The strength spell you gave him makes him much faster and his attacks seem to be dealing wounds that are much deeper than usual. (set: $dragHealth -= 2)](if: (random: 1,10) is 1 and $gArmor is false)["''Foolish human. You cannot kill me with those attacks!''" Valavorex says as Garren moves to make an attack on his claw. You watch, as if in slow motion, as the claw moves to avoid the attack, then counter. The claw pierces through Garrens armor on both sides of his torso. Valavorex swats the arm with Garren impaled, throwing him to the side with the clattering of metal on cobblestone. Before you can even approach him, you already know that he's dead... (set: $garrenDead to true, $morale -= 5)]](else-if: $help is true and $helpLives > 0)[The defenders are all fighting as hard as they can to make it through this battle. You have $helpLives defenders left fighting with you to take down Valavorex. ](set: $armyHealth -= 1)(if: $mana < 10)[(set: $mana += 1)] You still have $mana mana left to cast spells. You also are at (round: $playerHealth)% health. Choose what you'll do: (if: $mana >= 2)[[[Cast a spell->spells]]](else:)[//You don't have any mana to cast spells. ''HINT'': You regain 1 mana every turn!//] [[Attack the dragon->FrontLine]]](set: $updateString to "")(if: $morale <= 0)[(set: $shattered to true)](else-if: $armyHealth <= 20)[(set: $retreating to true)](if: $playerHealth <= 0)[(set: $playerDead to true, $morale -= 15)](if: $cityHealth < 0)[(set: $cityHealth to 0)](if: $population < 0)[(set: $population to 0)](if: $dragHealth <= 0)[(set: $dragonDead to true)] (if: $cityHealth >= 75)[(set: $updateString += "The city has taken damages, but the amount has been relatively light compared to other attacks so far. ")] (else-if: $cityHealth >= 50)[(set: $updateString += "The city has taken substantial damages. There are fires in many areas with damages to nearly every section the city has. The damage is repairable, but it will take effort to bring the city back to what it was. ")] (else-if: $cityHealth >= 30)[(set: $updateString += "The City of Flowers, once a metropolis to behold, is now in shambles. Sections of the city have been burned to the ground. Shops, homes, temples, and even the walls have all taken serious damage. The city's repair efforts will have to work extremely hard to fix the damages is suffered from this invasion. ")] (else-if: $cityHealth > 0)[(set: $updateString += "What once was the City of Flowers now lays charred ruins. Few sections escaped the flames and destruction that this invasion brought with it. What hope that the city would survive died with the Keep at the center of the city. The few standing buildings will remain a reminder of the nature of calamity beasts. The City of Flowers will be no more, even if the remaining population survives... ")] (else:)[(set: $updateString += "The number of buildings that haven't collapsed can be counted on two hands. There is nothing left of what once was a grand city. Nothing remains except a broken shell that was the wall that used to protect its inhabitants. ")] (if: $shattered is true or $retreating is true)[(set: $updateString += "The battle slowly comes to a close. ", $updateString += (cond: $shattered is true, "The defenders lose all morale and start to flee the battle. Without any protection, the army goes through slaughtering the citizens that they find. ", $retreating is true, "The enemy army finally breaks its formation and starts to flee. The defenders give chase up until the walls, then allow the attackers to run for their lives. "))(if: $path is 0 or $path is 3)[(go-to: "lineUpdate")](else-if: $path is 1 or $path is 4)[(go-to: "dragonUpdate")](else:)[(go-to: "DefUpdate")]] (if: $fightDragon is false and $dragonDead is false)[(set: _roll to (random: 4,8))(if: (random: 1, 4) is not 1)[(set: $morale -= (_roll / 2), $cityHealth -= (_roll * $damageRate), $population -= (_roll * $deathRate), $damageRate -= 0.05, $deathRate -= 0.05, $updateString += "A mighty roar is heard from Valavorex, signaling another breath attack has been unleashed on the city. Flames of eerie purple can be seen rising into the sky where the attack landed. ")](else:)[(set: $updateString += "The large wings of the dragon flap as the dragon flies around the city, looking for a new target to attack. ")]](else-if: $fightDragon is true)[(if: $innerDef is true)[(if: $defTurns > 0)[(set: $defTurns -= 1, $morale -= 1, $armyHealth -= (random: 1,3), $updateString += "The first line of defense should still be holding the attackers back, but it will only hold for so long. ")](else-if: $defTurns is 0)[(set: $morale -= 3, $armyHealth -= (random: 1,3), $updateString += "The line of defense must have fallen by now. The attackers will now be attacking the city directly. If Valavorex isn't killed soon, the citizens will all be slaughtered. ", $defTurns -= 1)](else:)[(set: $morale -= 3, $armyHealth -= 1, $population -= ((random: 1,3) * $deathRate), $deathRate -= 0.05, $updateString += "The attackers are in the city. Defenders are trying to stop them wherever they can. The loss of organization has made it very difficult to protect anything. ")]](else:)[(set: $morale -= 3, $armyHealth -= 1, $population -= ((random: 1,3) * $deathRate), $deathRate -= 0.05, $updateString += "The attackers are in the city. Defenders are trying to stop them wherever they can. The loss of organization has made it very difficult to protect anything, especially the citizens. ")]](if: $boundTimer > 0)[(set: $boundTimer -= 1, $updateString += "Valavorex is bound by your magic, unable to move freely. He is struggling to break free. ")](else-if: $boundTimer is 0)[(set: $bound to false, $boundTimer -= 1, $updateString += "Valavorex finally breaks free of the magical chains you put him in. ")](if: $armorTimer > 0)[(set: $armorTimer -= 1, $updateString += "Your magic armor spell glitters slightly in the eerie purple of nearby flames. ")](else-if: $armorTimer is 0)[(set: $armor to false, $armorTimer -= 1, $updateString += "The glitter of your armor spell disappears now that its time is up. ")](if: $gArmorTimer > 0)[(set: $gArmorTimer -= 1, $updateString += "You see the armor you cast on Garren glitter from reflecting nearby light off it. ")](else-if: $gArmorTimer is 0)[(set: $gArmor to false, $gArmorTimer -= 1, $updateString += "You see Garren's armor spell fade as the glitter around him slowly dims into nothing. ")](if: $strTimer > 0)[(set: $strTimer -= 1, $updateString += "You feel the power and energy surge through you from the Strength spell you cast on yourself. ")](else-if: $strTimer is 0)[(set: $strength to false, $strTimer -= 1, $updateString += "You feel the power of your strength spell fade away, putting you back to your original status from before the spell. ")](if: $gStrTimer > 0)[(set: $gStrTimer -= 1, $updateTimer += "You see Garren fighting more intensely and accurately due to your strength spell. ")](else-if: $gStrTimer is 0)[(set: $gStrength to false, $gStrTimer -= 1, $updateString += "You see Garren slow down back to his normal speed. He also starts hitting enemies less hard. You figure that the strength spell you cast on him wore off. ")] (if: $path is 0)[(set: $defTurns -= 1)(if: $defTurns > 0)[(set: $updateString += "You see a few attackers coming towards your defensive line from where they got past the first line of defense. They mostly wait there for more to show up. ", $morale -= 1, $armyHealth -= (random: 1,3))](else-if: $defTurns is 0)[(set: $updateString += "A large group of attackers are surging forward. Your group might be able to hold them back for a bit, but only so long. The attackers rush forward, and your group starts its defense. ")](else:)[(set: $updateString += "The attackers are throwing soldier after soldier to defeat you and your defenders. The defense is slowly faltering against their attacks. ", $armyHealth -= 1, $morale -= 2)(if: $secDef > 0)[(set: $updateString += "The defenders are fighting as hard as they can, trying to stop the attackers from reaching the civilians. ", $secDef -= 1)](else:)[(set: $updateString += "The line will only last another few moments. The attackers will break through the lines before the minute is up. ", $morale -= 3, $hasFallen to true)]](go-to: "lineUpdate")] (else-if: $path is 3)[(set: $defTurns -= 1)(if: $secDef is 3)[(set: $updateString += "You see a large wave of attackers coming to get past your line of defense. It will be a tough fight to stop them, but it's necessary to protect the citizens of the city. ", $secDef -= 1, $morale -= 3)](else-if: $secDef > 0)[(set: $updateString += "Wave after wave of invaders come to the defensive line. The defenders are fighting as hard as they can to keep them back. ", $secDef -= 1, $armyHealth -= 1, $morale -= 2)](else:)[(set: $updateString += "The defense you setup finally crumbles and the attackers start making it passed your defenders. The new momentum surges the other attackers forward causing even more casualties. ", $moarle -= 5, $armyHealth -= 2, $hasFallen to true)](go-to: "lineUpdate")] (else-if: $path is 2)[(set: $updateString += "The attackers are flooding through the gates, making their way to your defenses. They slowly are pushing forward against those protecting the city. The defenders using the chokepoint the gates provide as an easy way to hold back the invaders. ", $armyHealth -= 1, $morale -= (random: 1,3))(go-to: "DefUpdate")] (else-if: $path is 1 or $path is 4)[(set: $updateString += "You hear the signs of battle going on near the gates as the fight rages on. ", $morale -= 2, $armyHealth -= (random: 1,3))(if: $morale <= 20)[(set: $updateString += "The fighting seems to be getting closer minute by minute as the attackers start gaining ground, pushing back the defenders and decreasing their morale. ")](if: $armyHealth <= 30)[(set: $updateString += "You can also hear calls to chase the attackers out, signaling that they're getting close to retreating. ")] (set: _dragRoll to (random: 1,10))(if: _dragRoll >= 8 and $armor is false and $bound is false)[(set: $updateString += "Valavorex roars and blasts his purple flames at you. You are quickly overtaken by flames, burning and singeing you heavily. ", $playerHealth -= (random: 10, 20))](else-if: _dragRoll >= 5 and $bound is false and $armor is false)[(set: $updateString += "The dragon rushes at you and slashes with his claws. He attacks manages to slice a few cuts on you. ", $playerHealth -= (random: 6, 12))](else-if: $help is true and $bound is false and $helpLives > 0)[(set: $helpLives -= 1, $morale -= 1, $updateString += "The dragon lunges at your troops. He brings his jaws down on one of the defenders and eats off most of his upper half. He barely even saw it coming...")](else-if: $bound is false)[(set: $updateString += "You see Valavorex look past you and start moving. You quickly turn to see what's happening and notice some civilians trying to move further into the city. The dragon moves faster than you can, and he gets to them first, slashing and biting at them. Before you could have even gotten there, they were dead. ", $population -= 1)](go-to: "dragonUpdate")](if: $hasFallen is true and $armyHealth > 20)[''DEFEAT'' You fought to protect the city and fight off the enemies, but they overpowered you and managed to get past the defenders. Once past, they quickly looted and sacked the city, murdering any civilians they came across. (if: $garrenDead is false)["Thera! Grab as many citizens as you can and get them north! I'll hold them off here and by you some time!" He offers, knowing full well that his life will most certainly end. You begin to tell him "No", but he cuts you off. "There's no time to argue about it, people are dying! Get a move on!" You nod your head, ingraining the last time you'll see him into your brain.] You move to find remaining citizens; you grab anyone who can move and move them as fast as you can out to the walls. With the army mostly looting, you easily slip out. You then begin the trek to Luminos, the last remaining stronghold in Understone...](elseif: $shattered is true)[''DEFEAT'' You fought to protect the city and fight off the enemies, but the defenders' morale broke too quickly. The people protecting the city left the battlefield allowing the attackers to overtake them as well as the citizens. (if: $garrenDead is false)["We need to get moving, try to round up as many guards and people, we're going to try to find a building and hold out at the keep!" You tell Garren. "Got it! I'll meet you there! Be careful!"](else:)[You decide to try to round up some fleeing defenders and try to protect the citizens in the keep. You might be able to hold them off longer or they might not target the second layer of walls after taking heavy losses the first time. ]You get as many willing defenders to help get to the keep, grabbing and protecting any citizens you come across. You arrive at the keep and see the gates already busted down. You see a large group of enemies already inside. They notice your approach and start to charge at your group. (if: $garrenDead is false)[You hear a sudden charge yell as Garren and his men show up. "I can't believe you were going to start without me!" He accuses with a grin. His group joins together with yours and the fight begins. ]The group slowly gets surrounded and the fighting becomes intense. The battle however was futile, the enemies cut down defender after defender until no one is left, including you...](elseif: $population <= 20 and $cityHealth <= 30)[''DEFEAT'' You fought to protect the city and fight off the enemies, but the defenders couldn't managed to do accomplish the victory. The city is in ruins beyond repair and the population has lost most of its people. The City of Flowers is doomed... You grab any remaining civilians and defenders that are let and start to bring them north to Luminos, the last remaining stronghold in Understone...](elseif: $cityHealth <= 45 or $population <= 35)[''PYRRHIC VICTORY'' You fought to protect the city and fight off the enemies. You ended up winning the battle, but the devastation was too intense. Most of the city was demolished and cannot be repaired. A decent number of citizens survived the onslaught, but they will have to relocate if they stand a chance at living through the next calamity beast's attack. You gather anyone you can into a massive group, you scavenge the ruined city to find food, goods, and materials that will help the large group make it to the City of Luminos in the northern part of Understone, now the last stronghold...](else:)[''VICTORY'' You fought off and protected much of the city and a lot of the civilians. The city will stand a chance at survival now! If there had been more damage or death, it might have fallen, but you've proven that determination can save lives and cities. Now begins the next task for you, sealing the Runic Gate for the next decade! The City of Flowers also needs some repairs from the attack. The lives lost will be hard to carry for the city, but the fact that the City of Flowers survived such a battle is hope to hold onto for the future.] [[Play again?->Title]](set: $armyHealth -= 15, $morale += 10)(if: $morale < $armyHealth)[(set: $shattered to true)](if: $armyHealth > 20 or $shattered is true)[''DEFEAT'' You fought to protect the city, however, Valavorex's forces overpowered your forces and managed to get past. Once past, they quickly looted and sacked the city, murdering any civilians they came across. (if: $garrenDead is false)["Thera! Our forces Grab as many citizens as you can and get them north! I'll hold them off here and by you some time!" He offers, knowing full well that his life will most certainly end. You begin to tell him "No", but he cuts you off. "There's no time to argue about it, people are dying! Get a move on!" You nod your head, ingraining the last time you'll see him into your brain.] You move to find remaining citizens; you grab anyone who can move and move them as fast as you can out to the walls. With the army mostly looting, you easily slip out. You then begin the trek to Luminos, the last remaining stronghold in Understone...](else-if: $population <= 20 and $cityHealth <= 30)[''DEFEAT'' You fought to protect the city and fought off the enemies, but the defenders couldn't manage to accomplish the victory. The city is ruined beyond repair and the population has lost most of its people. The City of Flowers is doomed... You grab any remaining civilians and defenders that are let and start to bring them north to Luminos, the last remaining stronghold in Understone...](else-if: $cityHealth <= 45 or $population <= 35)[''PYRRHIC VICTORY'' You fought to protect the city and fight off the enemies. You ended up winning the battle, but the devastation was too intense. Most of the city was demolished and cannot be repaired. A decent number of citizens survived the onslaught, but they will have to relocate if they stand a chance at living through the next calamity beast's attack. You gather anyone you can into a massive group, you scavenge the ruined city to find food, goods, and materials that will help the large group make it to the City of Luminos in the northern part of Understone, now the last stronghold...](else:)[''VICTORY'' You fought off and protected much of the city and a lot of the civilians. The city will stand a chance at survival now! If there had been more damage or death, it might have fallen, but you've proven that determination can save lives and cities. Now begins the next task for you, sealing the Runic Gate for the next decade! The City of Flowers also needs some repairs from the attack. The lives lost will be hard to carry for the city, but the fact that the City of Flowers survived such a battle is hope to hold onto for the future.] [[Play again?->Title]]You choose to cast a spell. Which spell do you cast? (if: $mana >= 2)[ [[Heal Spell]]](if: $mana >= 3)[ [[Strength Spell]]](if: $mana >= 3)[ [[Armor Spell]]](if: $mana >= 3)[ [[Fireball Spell]]](if: $mana >= 5)[ [[Earthquake Spell]]](if: $mana >= 2 and $fightDragon is false)[ [[Rally Spell]]](if: $mana >= 3 and $fightDragon is true)[ [[Binding Spell]]] (set: $spell to "none")(set: $spell to "none")(if: $fightDragon is false)[(set: $enemyType to (random:0,2), $secDef += 1)You charge into a group of (cond: $enemyType is 0, "quick and skilled", $enemyType is 1, "many regular", $enemyType is 2, "heavily armored") enemies. You need to dispatch of them to make sure they don't flank your troops. They move to counteract you and try to kill you. ](else:)[The toughest opponent is right in front of you. You don't have time to be fearful or wait. Every moment you keep Valavorex alive, more people die. ]You start going through your battle maneuvers. [[Feint with attack->feint]] [[Large powerful swings->power]] [[Defensive counters->counter]] [[Quick precise stabs->stab]]The heal spell allows you to turn your latent mana into a rapid wound closing ability. It can only be used on you. It costs 2 mana to cast and you have $mana mana left. [[Back->spells]] [''Cast spell'']<self|(click: ?self)[(set: $spell to "heal")(goto: "Cast Spell")]The strength spell makes it so that the person using it gets a powerful speed and strength boost. With it, you can be 3x more effective in combat! it costs 3 mana, you have $mana mana left. [[Back->spells]] [''Cast on self'']<self|(click: ?self)[(set: $spell to "strength", $onGarren to false)(goto: "Cast Spell")] (if: $garrenDead is false)[[''Cast on Garren'']<garren|(click: ?garren)[(set: $spell to "strength", $onGarren to true)(goto: "Cast Spell")]]The armor spell makes magical armor surrounding the person it's cast on. It makes the person untouchable for a small amount of time. It costs 3 mana to cast, you have $mana mana left. [[Back->spells]] [''Cast on self'']<self|(click: ?self)[(set: $spell to "armor", $onGarren to false)(goto: "Cast Spell")] (if: $garrenDead is false)[[''Cast on Garren'']<garren|(click: ?garren)[(set: $spell to "armor", $onGarren to true)(goto: "Cast Spell")]]The fireball spell is a classic damage spell. It uses the power of fire to explode enemies in an area you point to. It costs 3 mana to cast and you have $mana mana left. [[Back->spells]] [''Cast at enemies'']<self|(click: ?self)[(set: $spell to "fireball")(goto: "Cast Spell")]The earthquake spell is one of the most powerful spells you know. It causes massive damage in a huge area. It will also do damage to the nearby areas though so be careful! The spell costs 5 mana to cast. You have $mana mana left. [[Back->spells]] [''Cast on nearby area'']<self|(click: ?self)[(set: $spell to "earthquake")(goto: "Cast Spell")]The rally spell is very helpful to artificially increase the morale of your troops. They will be less likely to become shattered while fighting. The rally spell can only be used on allies. It costs 2 mana and raises morale by 5% and makes the troops fight harder. You have $mana mana left. [[Back->spells]] [''Cast on nearby allies'']<self|(click: ?self)[(if: $path is 0 or $path is 3)[(set: $secDef += 3)](set: $spell to "rally")(goto: "Cast Spell")]The binding spell is a powerful way to keep foes from escaping. With it, you can deal more damage to more vital areas of the body. The spell only lasts for a small amount of time, so use it effectively! It costs 3 mana to cast and you have $mana mana left. [[Back->spells]] [''Cast on Valavorex'']<self|(click: ?self)[(set: $spell to "binding")(goto: "Cast Spell")](if: $spell is "armor")[(set: $mana -= 3)(if: $onGarren is true)[(set: $gArmor to true, $gArmorTimer to 2)You cast your magical armor spell on Garren to protect him for battle. It should make him nearly invulnerable for a little bit of time.](else:)[(set: $armor to true, $armorTimer to 2)You cast your magical armor spell on yourself. It will make you nearly invincible for a short while.]](else-if: $spell is "strength")[(set: $mana -= 3)(if: $onGarren is true)[(set: $gStrength to true, $gStrTimer to 2)You cast your strengthening spell on Garren who starts moving faster and attacking harder. His efficiency in combat is making him dominate the enemies at rapid speed.](else:)[(set: $strength to true, $strTimer to 2)You cast the strength spell on yourself to make you much more formidable in battle. You feel the power surging through you, making you feel faster and tougher.]](else-if: $spell is "heal")[(set: $mana -= 2, $playerHealth += 4)You quickly cast a healing spell to rejuvenate your stamina and close your shallow wounds. You now have (round: $playerHealth)% health.](else-if: $spell is "fireball")[(set: $mana -= 3)(if: $fightDragon is false)[(set: $armyHealth -= (random: 2,6))](else:)[(set: $dragHealth -= (random: 2,6))]You point a finger towards (cond: $fightDragon is true, "the dragon", $fightDragon is false, "a group of enemies") and say the activation word. A large burst of flames explode outward from the ground beneath the target. (if: $fightDragon is false)[Charred corpses ragdoll into their nearby allies.]](else-if: $spell is "earthquake")[(set: $mana -= 5, $cityHealth -= (3 * $damageRate))(if: $fightDragon is true)[(set: $dragHealth -= (random: 5,10))](else:)[(set: $armyHealth -= (random: 5,10))]You get down on your knees and place both hands on the ground. You extend your senses into the ground and will it to shake, crack, and tremble. The ground begins quaking intensely. Nearby buildings are damaged as fissures begin to open up underneath them. (cond: $fightDragon is true, "You watch as a building collapses on Valavorex.", $fightDragon is false, "You watch as enemies fall into fissures you created, many not coming back out.")](else-if: $spell is "rally")[(set: $mana -= 2, $armyHealth -= 1, $morale += 5)A wave of invigorating energy bursts outward from you and washes over your defenders. A battle cry comes from one and is taken up by many others. The defenders start pushing back harder and gaining more will to fight.](else-if: $spell is "binding")[(set: $mana -= 3, $bound to true, $boundTimer to 2)You send forth magical tendrils at Valavorex that close around him. He is left unable to move for the moment!] [[Continue->Base Update]](set: _dmg to 1)(if: $fightDragon is false)[You choose to leave a couple openings purposefully giving the enemies false promises. You know that you're going to have to give up a couple scratches to make them think it's a true opening. They rush in to exploit the false weaknesses in your guard and you attack when they get into the proper position. You catch them off guard and dispose of them quickly (if: $strength is true)[and with the strength bonus,(set: _dmg += 2)] they go down fast. ](if: $enemyType is 0)[Their light armors make your attacks even more effective on top of your clever maneuvering.(set: _dmg += 1)](else:)[You move to Valavorex and skillfully maneuver his attacks and blocks into a rhythm you can exploit. He manages to get in a couple of attacks on you as well, however. When the time comes, you score a nice attack, cleaving several of the dragon's scales. (if: $strength is true)[Using the spell you put on yourself, you quickly follow up with another slash at almost inhuman speeds. (set: _dmg += 2)]]You then quickly move back and prepare for your next tactics. (if: $fightDragon is true)[(set: $dragHealth -= _dmg)](else:)[(set: $armyHealth -= _dmg)](if: $armor is true)[Your armor spell managed to take all of the attacks that are thrown at you!](else:)[You dealt a decent amount of damage, but took a bit in return. (set: $playerHealth -= (random: 3,5))] [[Continue->Base Update]](set: _dmg to 2)(if: $fightDragon is false)[You begin to go into a complex maneuver that Garren likes to call the "Spin to Win". You start swinging your sword, moving your feet to carry the blade's momentum forward and then move direction. At first, it can be easy to dodge or reflect, but as time goes on, it gains speed and power. (if: $strength is true)[Your strength spell makes it even easier to cleave your enemies. (set: _dmg += 2)] Many fall to the blade as you shift, moving through them as a blue vortex. ](if: $enemyType is 1)[You greatly out skill the regular enemies. No matter how many they have, they just continually fall to your swinging blade. (set: _dmg += 1)](else:)[You rush to Valavorex and use your rush to swing your blade, dealing a gash through his thick hide. You swing a few more times, putting your every bit of strength into it. (if: $strength is true)[Using the spell you put on yourself, you deal a couple more deep wounds on the dragon. (set: _dmg += 2)]]You then quickly move back and prepare for your next tactics. (if: $fightDragon is true)[(set: $dragHealth -= _dmg)](else:)[(set: $armyHealth -= _dmg)](if: $armor is true)[Your armor spell managed to take all of the attacks that are thrown at you!](else:)[You dealt a decent amount of damage, but took a bit in return. (set: $playerHealth -= (random: 3,5))] [[Continue->Base Update]](set: _dmg to 0)(if: $fightDragon is false)[Start to play defensively, trying to keep up your stamina as best as possible. You use your shield to block most of the incoming attacks, and then counter when you see any opportunity. (if: $strength is true)[You are more able to keep up defenses and throw the opponents off balance when they try to get greedy with their attacks. (set: _dmg += 2)]](else:)[(set: _dmg += 1)You start to raise your shield to try to block Valavorex as best as possible. Being a large dragon, you can easily counter him and deal damage directly after attacking him. IT is slow, but damage gets dealt (if: $strength is true)[Using the spell you put on yourself, you counter more effectively and can deal a bit more damage on the dragon. (set: _dmg += 2)]]You then quickly move back and prepare for your next tactics. (if: $fightDragon is true)[(set: $dragHealth -= _dmg)](else:)[(set: $armyHealth -= _dmg)](if: $armor is true)[Your armor spell managed to take all of the attacks that are thrown at you!](else:)[You dealt a decent amount of damage, but took a bit in return. (set: $playerHealth -= (random: 1,3))] [[Continue->Base Update]](set: _dmg to 1)(if: $fightDragon is false)[You move into several quick motions, aiming for precise spots, chinks in armor, and vulnerable spots in the enemies' defenses. They quickly start to fall, only some managing to get in attacks. (if: $strength is true)[Your strength spell makes you much faster, making it so that you can hit more effectively with such speed. (set: _dmg += 2)]](if: $enemyType is 2)[Your speed and precision makes the enemies' armor nearly useless. They keep getting close but can't dodge the quick stabs you throw at them. (set: _dmg += 1)](else:)[You move to Valavorex and unleash a flurry of blows into him, piercing through his scales and hide where ever your sword meets them. (if: $strength is true)[Using the spell you put on yourself, you stab much deeper and manage to get some serious damage onto him. (set: _dmg += 2)]]You then quickly move back and prepare for your next tactics. (if: $fightDragon is true)[(set: $dragHealth -= _dmg)](else:)[(set: $armyHealth -= _dmg)](if: $armor is true)[Your armor spell managed to take all of the attacks that are thrown at you!](else:)[You dealt a decent amount of damage, but took a bit in return. (set: $playerHealth -= (random: 3,5))] [[Continue->Base Update]]Story and setting by Robley Evans Battle sounds by Michaël Ghelfi Made for an acedemic project under Fair Use This will always be a free, unpaid experience Copyright &copy; Robley Evans 2021 [[Back->Title]](set: $updateString to "")(if: $morale <= 0)[(set: $shattered to true)](else-if: $armyHealth <= 20)[(set: $retreating to true)](if: $cityHealth < 0)[(set: $cityHealth to 0)](if: $population < 0)[(set: $population to 0)] (if: $shattered is false and $retreating is false)[(set: $armyHealth -= (random: 1,3), $morale -= 4)(go-to: "DeadUpdate")](else:)[(go-to: "DeadEnd")](if: $shattered is true)[''DEFEAT'' You and the other defenders all tried to fight off the defenders, but your death created a void in leadership. The defenders' morale immediately began to crumble. After a while, they began to flee for their lives, not being able to protect anything other than themselves. Everyone who died, died in vain. The city collapsed, now one of the new sets of ruins that dot the landscape where other settlements suffered a similar fate. There were very few survivors, and even fewer who found safety at Luminos in the north. Valavorex was content to claim the ruins for himself, planning the next assault on the mortals in Understone.](elseif: $population <= 20 and $cityHealth <= 30)[''DEFEAT'' The defenders manage to drive off the invaders, even with your death. However, the city is in ruins to the point that it would take multiple decades to restore it to what it was. The population is less than a fifth of what it was before the attack. With very little left of the city, including its population, the City of Flowers became a new set of ruins. Only a few of the survivors survived the fight through the harsh environment of Understone and made it to the northern city, Luminos. Now the fate of understone was left to Luminos.](elseif: $cityHealth <= 45 or $population <= 35)[''PYRRHIC VICTORY'' You fought to protect the city and all of its inhabitants. Despite your death, the defenders managed to fight off all of the attackers. The City of Flowers was in ruin, but the populace still had a sizable number. With the help of the guards, they gathered up materials and food and made the trek north to Luminos, the northern city in Understone. The group made it relatively easily and got situated into their new homes. You gave your life to protect them, and without you, they probably couldn't have got that far.](else:)[''VICTORY'' You fought to your bitter end against the attackers and so did everyone else. Together, you managed to push out the attackers and protect the city and its populace. The City of Flowers has a lot of damages, but there is enough time to prepare for the next calamity beast. All of the citizens labeled you as a hero of the city, giving you a monument for your triumph, immortalizing your death in a battle to protect Understone from the invaders of Valavorex.] [[Play again?->Title]]