<<silently>>
HEY PROFESSOR THIS IS FOR YOU
This game follows the introductory events of the popular retro game The Legend of Zelda: A Link to the Past. There is a ''ton'' of content, as the flow of the game depends on a few choices you make. While the story may seem bare at some points, the narrative of this game is the experience that you have. YOU are the hero, and YOU must defeat The Darkness and the evil controlling it, Agahnim. Every choice that you make influences your adventure, so (hopefully) everyone will get a different experience playing this game. I am very proud of the work I put into this, and I truly hope you enjoy it. Now, some notes.
- Anything inclosed in "<< >>" is code. These include variable settings, if statements, links, and functions. The "variables" passage and the "victory" passage are just this and serves the purpose of setting and resetting encounters for the underpass upon death
- There is a battle system in this game, so there are a few "passages" that are just battle commands. "attack", "block", "shoot", "run", "bossMagic", "bossReflect", "bossBlock", "bossShoot", "bossAttack", and "KnightAttack" all fall into this category. "death_screen" is a reset screen for if you die during the game. This resets you to the "true_beginning" passage, which is where the meat of the game takes place.
- Some passages are just a few lines of text and a link, usually with some if statements. These are where you can collect items in the game.
- The beginning and end of the game are the most story-heavy sections, with the exception of "underpass_entrance" which comes directly before the "true_beginning" passage.
- It seems like this proofing copy is VERY out of order for the second half. I'll attack a picture of the twine flow chart so you can get a better idea of how everything ties together.
- There are 3 main endings of the game. One of them, the "reach out to the darkness" ending, can ONLY be obtained if you DO NOT get the lantern in the starting house or the underpass chest1. Inversely, the other 2 endings, which includes a final boss battle, can ONLY be obtained if you HAVE gotten the lantern. One of these is killing the boss, the other is losing to the boss. Do not worry, if you get the "reach out to the darkness" ending, a reset link will pop up after a certain amount of time and you can start from the beginning in order to get the lantern.
- All the images are on the internet, so in order for them to load you need to be connected to the internet. All the audio files are in the music folder and need to be kept there for this to work. **Make sure that the html file and the "music" folder are in the same folder together.**
- The narrative path is mostly linear, with the main variations coming from the battles. There are a few required battles, but the majority are skippable. In the first choice section of the underpass, you can go left to get the lantern if you don't already have it from the house. You have to fight a battle to get there. Behind the chest there is also a fairy fountain to regain all your health. I have it set up that you can backtrack through the whole underpass in order to get here for either the lantern or the health.
- The pokertable's main purpose is to make the final boss easier to fight and to increase your max health. It is not required, but recommended. This is found by moving forward when given the option of going up the stairs, or going right after going up the stairs.
I want to thank you for the opportunity to make this project. I had so much fun doing it and I will probably end up making more of these in the future as a hobby. Thanks for a great year. Peace Out, and enjoy! :)
<<audio "intro" volume 0.5 play loop>>
<</silently>>
(Please click the screen to start music)
!Long ago...
!!!in the beautiful kingdom of Hyrule, surrounded by mountains and forests, legends told of an omnipotenet and omniscient Golden Power that resided in a hidden land. Many people aggresively sought to enter the hidden Golden Land, but no one ever returned. One day, evil power began to flow from the Golden Land, so the king commanded seven wise men to seal the gate to the Land of the Golden Power. That seal should have remained for all time...
!!!...But, when these events were obscured by the mists of time and became legend, a mysterious wizard known as Agahnim came to Hyrule to release the seal. He eliminated the good King of Hyrule and sought out the descendents of the seven wise men. Through evil magic, he began to make them vanish, one after another. Now, the time of destiny for the good Princess Zelda is drawing near...
[[Your Adventure Awaits...|dream]]
//Help me...//
//Please help me...//
//I am a prisoner in the dungeon of the castle. My name is Zelda.//
//The wizard, Agahnim, has done... something to the other missing girls. Now only I remain.//
//Agahnim has seized control of the castle and is now trying to open the seven wise men's seal.//
//The castle should have an ungaurded passage to the underpass.//
//Please help me...//
<<timed 9s>>
[[Come to your senses]]
<</timed>>
<<silently>>
<<audio "intro" stop>>
<<audio "deathscreen" stop>>
<<audio "rain" play volume .5 loop>>
<<set $healthMAX to 8>>
<<set $linkHealth to $healthMAX>>
<<set $money to 0>>
<<set $arrow to 0>>
<<set $magic to 0>>
<<set $bush1 to false>>
<<set $castleGardenBushes to false>>
<<set $lantern to false>>
<<set $house_pots to false>>
<<set $house_chest to false>>
<</silently>>
You jolt awake as a crack of thunder strikes a nearby tree outside your small cottage. You think about the dream you just had, the voice you just heard. It had to be a figment of your imagination, right? You groggily view the room around you as the storm outside rages on. On the other side of the room you see your uncle, your caretaker, hurridly gathering his things. He notices you've awoken.
"Link, I'm going out for a while. I'll be back by morning. Don't leave the house. Go back to sleep, it's late."
You slowly sit up as he walks out the door. It seems you are alone...
[[Get out of bed|house_start]]<img src="https://i.ytimg.com/vi/SDwk59K0KMQ/maxresdefault.jpg" width="480" height="256">
<h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow </h3>
You stand up and look around the room. Despite the small size, it's enough to meet you and your uncle's needs. Beside you is a shelf of clay pots and a table with two chairs. You notice there is a small chest near the front door. The storm is not letting up.
What will you do?
[[Investigate Clay Pots|housePots]]
[[Approach the Table|Table]]
[[Investigate the Chest|getLantern]]
[[Open Front Door|overworld1]]<<if $house_pots is false>>
<<audio "item" play volume .35>>
You eye the multitude of pots lining the walls of your humble abode. As you stare, you begin to feel an acute rage begin to build up inside of you. You do not know where this feeling is coming from, but before you can think about it too long your instincts kick in as you begin attacking the shelf and everything on it.
''From the rubble you find 5 Rupees! You add them to your wallet.''
<<set $money to $money + 5>>
<<set $house_pots to true>>
<<else>>
As you look upon the destruction you caused, you feel a sense of... satisfaction... your work is done, for now.
<</if>>
[[continue|house_start]] <<if $house_chest is false>>
<<audio "item" play volume .35>>
The small chest appears to be unlocked. You lift the lid and inside find a small red lantern. It seems to be powered by magic.
''You got the Lantern! Use it to light torches and find your way through The Darkness.''
<<silently>>
<<set $lantern to true>>
<<set $house_chest to true>>
<<set $magic to 10>>
<</silently>>
<<else>>
The empty chest sits wide open. You have already looted its contents.
<</if>>
[[continue|house_start]]<h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow </h3>
As you step outside, the wind swirls around you and the rain pelts your face. Thunder booms in the distance and flashes of lightning cover the sky, illuminating the dark surrounding you. It is the middle of the night.
Outside your house lies your garden filled with bushes and different paths leading in each direction. However, it seems that royal guards are blocking the southern and western paths. What on earth are they doing out here at this hour?
[[Go Back Inside|house_start]]
[[Investigate the Garden|house_bushes]]
[[Travel the Western Path|house_west]]
[[Travel the Northern Path|castle_approach]]You take a seat at the table. Across from you sits an empty chair, usually occupied from your uncle. It seemed he left in a hurry. I wonder where he might have gone?
[[Continue|house_start]] <<if $bush1 is false>>
<<audio "item" play volume .35>>
You kick through the bushes outside your house, destroying all the hard work your uncle has put into making them look nice. Was it worth it?
''You've found 3 rupees. You add them to your wallet.''
<<set $money to $money + 3>>
<<set $bush1 to true>>
<<else>>
Before you lies a mess of broken twigs and ripped leaves amongst a small garden. Whoever started it must have put a lot of work into it. You wonder who could have done such a thing...
<</if>>
[[Continue|overworld1]] You approach the entrance to the woods. Large trees line the perimeter of the forest. The southern path is blocked by guards, but by wading through some bushes you might be able to find a northern path.
What will you do?
[[Go Back|overworld1]]
[[Find a Northern Path|castle_approach]]<h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow </h3>
<<set $castleGardenBushes to false>>
You follow the path north to the main gates of the castle. These massive gates tower far above your small stature. A single royal guard stands before the gates.
"Hey! You're not allowed in the castle, son! Go home and get some sleep!"
The castle seems much bigger than you remember, or perhaps the storm is just blurring your vision. There are passages to the East and to the West.
What will you do?
[[Go East|castle_garden]]
[[Go West|castle_west]]<h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow </h3>
To the East you find a small garden consisting of a multitude of bushes. Near the far end you see what looks to be a cobblestone design encircling a single bush.
[[Destroy some bushes|castle_garden_bushes]]
[[Approach the Cobblestone|underpass_entrance]]You venture to the West of the castle. Along the path, you see guards stationed at the West bridge, blocking any traversal. Further down you see a large tree with a pile of large rocks laying in front. It seems you've reached a dead end.
[[Go Back|castle_approach]]<<if $castleGardenBushes is false>>
<<audio "item" play volume .35>>
You kick around some bushes and destroy someones precious gardening work. Nothing but carnage remains.
''You've found 6 rupees. You add them to your wallet''
<<set $money to $money + 6>>
<<set $castleGardenBushes to true>>
<<else>>
There are no bushes left to destroy.
<</if>>
[[continue|castle_garden]]<img src="https://legendsoflocalization.com/wp-content/uploads/2013/10/zelda-uncle-lttp-1280x720.png" width="480" height="256">
You approach the bush encircled by cobblestone and notice it is covering what appears to be a passage. You move the bush aside and fall down... and down.... and down...... until you land in a pool of water. You have entered the underpass.
The dim candlelights lining the walls lead you down a narrow hallway. Each step echoes throughout what seems to be an endless maze of brick. As you walk, you begin to hear a soft groan. You cautiously approach a slumped figure in the darkness, and as you pace closer and closer your fears become realized. Your uncle lies leaning against the brick wall of the hallway, fatally injured. In his hands, a steel shortsword and an iron shield with your family's crest on it. He is sitting in a shallow pool of blood, it appears to be a few minutes old. He does not have much time left.
"Unnh... Link, I didn't want you involved in this... I told you not to leave the house... well, you're already here, I suppose it can't be stopped now. Take my sword and shield and listen. As you know our family is one with a great and long history of swordsmasters, the skills are in your blood. You must... have courage... my boy. Save... the princess... Zelda is your ... ... ..."
His final breath leaves his lungs. You softly shut his eyes and take the sword and shield, ready to fulfill his last wish. With newfound courage, you venture forward.
[[Continue down the hallway|variables]]
<<set $battle_tutorial to false>><h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow </h3>
<<audio "rain" stop>>
<<audio "rain" play loop volume .5>>
<<if $start == false>>
You continue down the hallway through a small door. You find yourself in another dimly lit hallway. To your left, you see a long straight passage. Directly in front of you is a small staircase.
<<silently>>
<<set $start to true>>
<</silently>>
What will you do?
[[Venture Left|hallway1]]
[[Venture Forward|underpass1_battle]]
<<elseif $battle1 is false and $battle2 is false>>
You find yourself in another dimly lit hallway. To your left, you see a long straight passage. Directly in front of you is a small staircase.
What will you do?
[[Venture Left|hallway1]]
[[Venture Forward|underpass1_battle]]
<<elseif $battle1 is true and $battle2 is false>>
You find yourself in another dimly lit hallway. To your left, you see a long straight passage. Directly in front of you is a small staircase.
What will you do?
[[Venture Left|hallway1_victory]]
[[Venture Forward|underpass1_battle]]
<<elseif $battle1 is false and $battle2 is true>>
You find yourself in another dimly lit hallway. To your left, you see a long straight passage. Directly in front of you is a small staircase.
What will you do?
[[Venture Left|hallway1]]
[[Venture Forward|underpass1_victory]]
<<else>>
You find yourself in another dimly lit hallway. To your left, you see a long straight passage. Directly in front of you is a small staircase.
What will you do?
[[Venture Left|hallway1_victory]]
[[Venture Forward|underpass1_victory]]
<</if>>As you venture down the left hallway, you begin to hear metallic footsteps. You are not sure how many pairs there are, but it seems to be more than one.
What will you do?
[[Turn Back|true_beginning]]
[[Continue down the Hallway|hallway1_battle]]<<nobr>>
<<audio "rain" stop>>
<<audio "fight" play loop volume .5>>
<<set $move to 0>>
<<set $enemies to [6]>>
<<set $enemytype to ["knight"]>>
As you proceed through the passage, you enter a small, well lit, square room. In the center of the room you see a stone statue depicting a member of the royal guard. Standing nearby, you find a single guard, clad in blue metallic armor. <br>
"Halt! This place is off limits! I'm afraid you'll have to come with me."<br>
You raise your sword and shield and prepare for a fight!<br>
<br>
<<if $battle_tutorial is false>>
''Welcome to your first battle. Battles here will be turn based going between you and your opponent. Due to your small stature and swordmaster's blood, you are very good at evading attacks. In a battle, you have 4 options:''<br>
''Attack:'' //basic sword attack, 2 damage. 1 in 6 chance of missing.//<br>
''Block:'' //half any damage from physical attacks and negate damage from ranged attacks.//<br>
''Shoot:'' //fire an arrow, if you have any, for 4 damage. 2 in 3 chance of missing.//<br>
''Run:'' //take a chance at fleeing the battle. 1 in 4 chance of successfully escaping// <br> <br>
Note: You will always move first in a battle, no matter how many opponents there are. <br>
''Good luck, Link!''<br>
<<set $battle_tutorial to true>>
<</if>>
<</nobr>>
''You engange the knight in battle!''
<<display "battle_start">><<nobr>>
<<audio "rain" stop>>
<<audio "fight" play loop volume .50>>
<<set $enemies to [4, 4]>>
<<set $move to 0>>
<<set $enemytype to ["knight", "knight"]>>
You are approached by 2 knights clad in shining green armor. "What the hell are you doing in here?! This area is off limits!" The knights exchange a look before assuming a battle stance. It does not appear you have any other choice but to fight.<br>
<<if $battle_tutorial is false>>
''Welcome to your first battle. Battles here will be turn based going between you and your opponent. Due to your small stature and swordmaster's blood, you are very good at evading attacks. In a battle, you have 4 options:''<br>
''Attack:'' //basic sword attack, 2 damage. 1 in 6 chance of missing.//<br>
''Block:'' //half any damage from physical attacks and negate damage from ranged attacks.//<br>
''Shoot:'' //fire an arrow, if you have any, for 4 damage. 2 in 3 chance of missing.//<br>
''Run:'' //take a chance at fleeing the battle. 1 in 4 chance of successfully escaping// <br> <br>
Note: You will always move first in a battle, no matter how many opponents there are.<br>
''Good luck, Link!''<br>
<<set $battle_tutorial to true>>
<</if>>
<</nobr>>
''You engange the knights in battle!''
<<display "battle_start">><<audio rain play loop volume 50>>
<<if $chest1 is false>>
As you continue down the hallway, you find a small room with very odd features. In the center of the room lies a single chest. However, sitting behind this chest you see a small pool of water and, for just a second, you think you see a small twinkle flying around it. What would you like to do?
<<nobr>>
[[Open Chest|chest1]]
[[Investigate the water|fairyFountain]]
[[Go Back|true_beginning]]
<</nobr>>
<<else>>
As you continue down the hallway, you find a small room with very odd features. A looted chest sits in the center of the room. However, sitting behind this chest you see a small pool of water and, for just a second, you think you see a small twinkle flying around it. What would you like to do?
[[Investigate the Water|fairyFountain]]
[[Go Back|true_beginning]]
<</if>><<nobr>>
<<set _chance to random(5)>>
<<set $move to $move + 1>>
<h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow <br>
Turn: $move </h3>
''There are $enemies.length enemies left.''<br>
<<if _chance == 0>>
<<timed .5s>>
Your attack narrowly misses it's target.<br>
<</timed>>
<<else>>
<<timed .5s>>
You swing your sword with great force, striking the knight. It takes 2 damage.<br>
<</timed>>
<<for _i to 0; _i lt $enemies.length; _i++>>
<<if $enemies[_i] gt 0>>
<<set $enemies[_i] -= 2>>
<<if $enemies[_i] <= 0>>
<<timed .8s>>
<h4>You've defeated a knight</h4>
<<run $enemies.deleteAt(0)>>
<<run $enemytype.deleteAt(0)>>
<<if $enemies.length == 0>>
<h2>You've defeated all the enemies!</h2>
<<set _vrupe to random(2)>>
<h4>You've been awarded _vrupe rupees</h4>
<<set $money += _vrupe>>
<<set _varro to random(2)>>
<h4>You've been awarded _varro arrows</h4>
<<set $arrow += _varro>>
<<timed 2.5s>>
<<goto "Victory">>
<</timed>>
<</if>>
<</timed>>
<</if>>
<<break>>
<</if>>
<</for>>
<</if>>
<<timed 1.3s>>
<<display "KnightAttack">>
<</timed>>
<</nobr>><<audio "fight" stop>>
<<audio "rain" play volume .5 loop>>
<<set _path to previous()>>
<<set _health to $healthMAX - 2>>
<<switch _path>>
<<case "hallway1_battle">>
<<set $battle1 to true>>
<<if $linkHealth <= _health>>
<<set $linkHealth += 2>>
<</if>>
<<goto "hallway1_victory">>
<<case "underpass1_battle">>
<<if $linkHealth <= _health>>
<<set $linkHealth += 2>>
<</if>>
<<goto "underpass1_victory">>
<<case "underpass2_battle1">>
<<set $battle3 to true>>
<<if $linkHealth <= _health>>
<<set $linkHealth += 2>>
<</if>>
<<goto "underpass3">>
<<case "underpass3_battle">>
<<set $battle4 to true>>
<<if $linkHealth <= _health>>
<<set $linkHealth += 2>>
<</if>>
<<goto "underpass4">>
<<case "underpass4_battle1">>
<<set $battle5 to true>>
<<if $linkHealth <= _health>>
<<set $linkHealth += 2>>
<</if>>
<<goto "underpass4_down">>
<<case "underpass4_battle2">>
<<set $battle6 to true>>
<<if $linkHealth <= _health>>
<<set $linkHealth += 2>>
<</if>>
<<goto "underpass4_down2">>
<<default>>
lol
<</switch>><<nobr>>
<<set $move to $move + 1>>
<h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow <br>
Turn: $move </h3>
''There are $enemies.length enemies left.''<br>
<<timed .5s>>
You raise your shield, prepared to block any attack coming your way.<br>
<<timed 1.5s>>
<<for _i to 0; _i lt $enemytype.length; _i++>>
<<if $enemytype[_i] is "knight">>
A knight swings his sword at you, but your shield softens the blow. You take .5 points of damage.<br>
<<set $linkHealth -= .5>>
''Link's health is now $linkHealth.''<br>
<<if $linkHealth <= 0>>
<br>
<h1>You've lost too much health, you begin to collapse...</h1>
<<timed 3s>>
<<goto death_screen>>
<</timed>>
<<break>>
<</if>>
<<elseif $enemytype[_i] is "archer">>
An archer fires their arrow toward you, but your shield blocks it. You take no damage. <br>
Link's health is now $linkHealth .<br>
<</if>>
<</for>>
<</timed>>
<</timed>>
<<timed 2.5s>>
It is now your turn again.
<<display "battle_start">>
<</timed>>
<</nobr>><<nobr>>
<h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow <br>
Turn: $move </h3>
''There are $enemies.length enemies left.''<br>
<<if $arrow is 0>>
<<timed .5s>>
You have no arrows to shoot. Try something else.<br>
<</timed>>
<<display "battle_start">>
<<else>>
<<set $move to $move + 1>>
<<set _chance to random(2)>>
<<if _chance is 0>>
<<timed .5s>>
You loose an arrow and it misses. Sorry chief.<br>
<<set $arrow -= 1>>
<</timed>>
<<else>>
<<timed .5s>>
Your arrow flies true and strikes an enemy! They take 4 damage.<br>
<<set $arrow -= 1>>
<</timed>>
<<for _i to 0; _i < $enemies.length; _i+1>>
<<if $enemies[_i] > 0>>
<<set $enemies[_i] -= 4>>
<<if $enemies[_i] <= 0>>
<<timed .8s>>
<h4>You've defeated a knight</h4>
<<run $enemies.deleteAt(0)>>
<<run $enemytype.deleteAt(0)>>
<<if $enemies.length == 0>>
<h2>You've defeated all the enemies!</h2>
<<set _vrupe to random(2)>>
<h4>You've been awarded _vrupe rupees</h4>
<<set $money += _vrupe>>
<<set _varro to random(2)>>
<h4>You've been awarded _varro arrows</h4>
<<set $arrow += _varro>>
<<timed 2.5s>>
<<goto "Victory">>
<</timed>>
<</if>>
<</timed>>
<</if>>
<<break>>
<</if>>
<</for>>
<</if>>
<<timed 1.3s>>
<<display "KnightAttack">>
<</timed>>
<</if>>
<</nobr>><<nobr>>
<<timed .5s>>
You attempt to run.<br>
<<set _chance to random(3)>>
<<timed 1.5s>>
<<if _chance is 0>>
You successfully escaped!<br>
<<return>>
<<else>>
No shot. You must fight on!<br>
<<set $move += 1>>
<h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow <br>
Turn: $move </h3>
''There are $enemies.length enemies left.''<br>
<<timed 2.5s>>
<<display "KnightAttack">>
<</timed>>
<</if>>
<</timed>>
<</timed>>
<</nobr>><<nobr>>
<<for _i to 0; _i lt $enemies.length; _i++>>
<<if $enemytype[_i] == "knight">>
<<timed .5s>>
<<set _chance = random(3)>>
<<if _chance == 0>>
A knight swings his sword, and strikes you. You take 1 damage<br>
<<set $linkHealth -= 1>>
''Link's health is now $linkHealth''<br>
<<if $linkHealth <= 0>>
<br>
<h1>You've lost too much health, you begin to collapse..</h1>
<<timed 2s>>
<<goto death_screen>>
<</timed>>
<<break>>
<</if>>
<<else>>
A knight tries to hit you, but you evade!<br>
<</if>>
<</timed>>
<<elseif $enemytype[_i] == "archer">>
<<timed .5s>>
<<set _chance to random(4)>>
<<if _chance == 0>>
An archer knight fires his crossbow, striking you for 2 points of damage.<br>
<<set $linkHealth -= 2>>
''Link's health is now $linkHealth''<br>
<<if $linkHealth <= 0>>
<br>
<h1>You've lost too much health, you begin to collapse..</h1>
<<timed 2s>>
<<goto death_screen>>
<</timed>>
<<break>>
<</if>>
<<else>>
An archer knight shoots a bolt, but it whizzes past you.<br>
<</if>>
<</timed>>
<</if>>
<</for>>
<<timed 2s>>
It is now your turn again.<br>
<<display "battle_start">>
<</timed>>
<</nobr>><<audio "fight" stop>>
<<audio "death" play volume .50>>
<<timed 3s>> <<audio "deathscreen" play loop volume .50>> <</timed>>
<h1>You have fallen at the hands of the Royal Guards.</h1>
<h3>Princess Zelda will surely perish, unless you are there to save her!</h3>
@@#result;@@
<<link 'Try Again?'>>
<<audio "deathscreen" stop>>
<<replace '#result'>>
//Reloading to the underpass...//
<</replace>>
<<set $linkHealth to 8>>
<<set $healthMAX to 8>>
<<timed 3s>>
<<goto "variables">>
<</timed>>
<</link>><<set $start = false>>
<<set $battle1 to false>>
<<set $chest1 to false>> /*hallway1 chest*/
<<set $battle2 to false>>
<<set $battle3 to false>>
<<set $battle4 to false>>
<<set $underpass3_pots to false>>
<<set $battle5 to false>>
<<set $battle6 to false>>
<<set $sageCard to false>>
<<set $UP5_light to false>>
<<set $UP4_up to false>>
<<goto "true_beginning">>
<<silently>> [[true_beginning]] <</silently>><<if $lantern is true>>
<<audio "item" play volume .35>>
The small chest appears to be unlocked. You lift the lid and inside find ''5 rupees! You add them to your wallet.''
<<silently>>
<<set $wallet += 5>>
<<set $chest1 to true>>
<</silently>>
<<elseif $lantern is false>>
<<audio item play>>
The small chest appears to be unlocked. You lift the lid and inside find a small red lantern. It seems to be powered by magic.
''You got the Lantern! Use it to light torches and find your way through The Darkness.''
<<silently>>
<<set $lantern to true>>
<<set $chest1 to true>>
<<set $magic to 10>>
<</silently>>
<</if>>
[[Go Back|hallway1_victory]]<<if $battle2 is false>>
After defeating the knight, he drops a bundle of arrows. You add them to your quiver.
''You received 5 arrows''
<<set $arrow += 5>>
<<set $battle2 to true>>
In front of you lies a wooden door. It appears to be unlocked.
What will you do?
[[Venture forward|underpass2]]
[[Go Back|true_beginning]]
<<else>>
As you proceed through the passage, you enter a small, well lit, square room. In the center of the room you see a stone statue depicting a member of the royal guard. In front of you lies a wooden door. It appears to be unlocked.
What will you do?
[[Venture forward|underpass2]]
[[Go Back|true_beginning]]
<</if>><h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow </h3>
You find yourself in a large, underground fortress. It is fairly well lit, and you can see many guards both close and far. The vastness of this space is almost impossible, though nothing is impossible for the good king of Hyrule. You wonder what he used this space for in the past.
<<if $battle3 is false>>
In front of you is a simple staircase. At the bottom there is a blue-armored guard patrolling back and forth near a seemingly bottomless pit. There appears to be enough space to sneak past him, or you could engage him in a fight.
What will you do?
[[Fight the Guard|underpass2_battle1]]
[[Sneak past|underpass3]]
[[Go Back|underpass1_victory]]
<<else>>
It seems there are no guards present.
[[Move Forward|underpass3]]
[[Go up the Staircase|underpass1_victory]]
<</if>><<silently>>
<<audio "rain" stop>>
<<audio "fight" play loop volume .50>>
<<set $move to 0>>
<<set $enemies to [6]>>
<<set $enemytype to ["knight"]>>
<</silently>>
You approach the guard, sword and shield at the ready.
"W-wh-What the hell are you doing here?! I can't allow you to proceed further!"
''You engange the knight in battle!''
<<display "battle_start">><h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow </h3>
You proceed forward. You find yourself on a square platform with a suspicious lack of railings. The seemingly-bottomless pits are suddenly looking much less seemingly and much more bottomless. In the center of this platform sit two of the royal guard statues you saw before, accompanied by a few small but strong clay pots.
<<if $battle4 is false>>
Patrolling the edges of this platform are two knights clad in blue armor. They appear to be strong, but do not seem to notice you. Each step they take increases your worry little by little, as they are fairly close to the edge and could fall off with one poorly-placed step.
What will you do?
[[Go Back|underpass2]]
[[Sneak Past|underpass4]]
[[Engage Knights|underpass3_battle]]
[[Approach Pots|underpass3_pots]]
<<else>>
What will you do?
[[Venture Forward|underpass4]]
[[Go Back|underpass2]]
<</if>><h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow </h3>
You continue down the path into a new room. Those dreaded pitfalls are behind you. The vastness of this underpass continues to surprise you. Could the princess really be down here?
As you move forward you see what appears to be an overhead path, accessed by a set of stairs to the left. Past the stairs you see a series of tall barriers that are obstructing your view of what lies beyond. You can hear metallic footsteps somewhere in the distance, but you are unsure where.
What will you do?
<<if $battle5 is false>>
[[Use the Stairs|underpass4_up]]
[[Venture forward|underpass4_battle1]]
[[Go Back|underpass3]]
<<elseif $battle5 is true>>
[[Venture forward|underpass4_down]]
[[Go Back|underpass3]]
<</if>><<silently>>
<<audio "rain" stop>>
<<audio "fight" play loop volume .50>>
<<set $move to 0>>
<<set $enemies to [6, 6]>>
<<set $enemytype to ["knight", "knight"]>>
<</silently>>
You use your sword to tap the knight on the shoulder. He screams like a little girl.
"AAAIIEIEEIEIEEEE." He clears his throat. "Ungh, um I mean... You're trespassing! You'll have to come with me, though not without a few scratches."
He readys his sword and calls for his other knight to join him.
''You engange the knights in battle!''
<<display "battle_start">><<if $battle4 is false>>
You walk towards the clay pots, minding their own business, in the center of this platform. Each step you take fills you with some kind of ancestral rage towards these small clay creations. What could they have done in your past?
As you pick up the first, ready to end its unwelcome stay in this world, you hear something behind you.
"It's over for you kid!" The two knights have noticed you.
What will you do?
[[Put down the pot and fight|underpass3_battle]]
[[Throw the pot]]
<<elseif $underpass3_pots is false>>
You walk towards the clay pots, minding their own business, in the center of this platform. Each step you take fills you with some kind of ancestral rage towards these small clay creations. What could they have done in your past?
You throw the first with such power that it flies across the pit and hits a far wall. As it shatters, you see it and a small green tint fall into the darkness. You love seeing the pot suffer, but you also need your reward. The next pot you throw a little softer, so it just barely stays on the platform. It drops a single rupee. You throw another that drops a single heart.
''You've gained 1 Rupee! You add it to your wallet!''
''You've found a heart! Refills your health by up to 2''
<<silently>>
<<set $money += 1>>
<<set $underpass3_pots to true>>
<<if $linkhealth <= 4>>
<<set $linkHealth += 2>>
<<else>>
<<Set $linkHealth to 6>>
<</if>>
<</silently>>
[[Move Forward|underpass4]]
[[Move Back|underpass2]]
<<elseif $underpass3_pots is true>>
You walk towards the pots and see that they have already been dealt with. Your satisfaction is immeasureable. They will not see another day.
[[Move Forward|underpass4]]
[[Move Back|underpass2]]
<</if>><<audio "item" play volume .35>>
As one of the knights approach you, you instinctively throw the pot you're holding into him with full force. Him and that dreaded pot fly towards the edge of the platform.
"AGghhhh, NOOOOooo o o o o o ......"
The knight falls off the edge of the platform, perishing in the endless darkness below. Before the other knight even has time to react you find yourself readying another pot to throw. It smashes into the side of his head as he falls beyond your line of sight.
''You've defeated all the enemies!''
<<nobr>>
<<set _vrupe to random(4)>>
<h4>You've been awarded _vrupe rupees</h4>
<<set $money += _vrupe>>
<</nobr>>
<<silently>>
<<set $battle4 to true>>
<<set $linkHealth to 6>>
<</silently>>
[[continue forward|underpass4]]
<h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow </h3>
You choose to walk along the upper path. Below you you can see what lies beyond the tall stone barriers. 3 knights clad in green armor are patrolling. Your path completely passes over them, avoiding any confrontation. As you proceed you find a set of stairs returning to the floor level. As you walk down you can see that, if you continue straight, you will approach a knight in blue armor carrying a sword, and a knight in green armor carrying what appears to be a crossbow. You could also turn right and face the 3 green-armored knights you saw behind the barriers. It seems you have no choice but to fight.
What will you do?
[[Go Forward|underpass4_battle2]]
[[Go Right|underpass4_down]]
[[Go Back|underpass4]]<<if $battle5 is false>>
<<goto "underpass4_battle1">>
<<elseif $sageCard is false>>
You approach the poker table of the knights. Would you like to loot its contents?
[[Loot the Table]]
[[Continue Forward|underpass4_down2]]
[[Go Back|underpass4]]
<<else>>
The poker table is now completely empty. You take a moment of silence for the poor knights who just lost at least a month's worth of wages, and a very special collectible.
[[Continue Forward|underpass4_down2]]
[[Go Back|underpass4]]
<</if>><<silently>>
<<audio "rain" stop>>
<<audio "fight" play loop volume .50>>
<<set $move to 0>>
<<set $enemies to [4, 6]>>
<<set $enemytype to ["archer", "knight"]>>
<</silently>>
As you take a step towards these two knights, a crossbow bolt flies past your left shoulder and bounces off the brick wall behind you. The archer appears to have a keen eye and could see you coming. "You really shouldn't be here, kid", the archer yells. His blue-armored partner is in his fighting stance. You ready your sword and shield, and prepare for battle.
''You engange the knights in battle!''
<<display "battle_start">><<silently>>
<<audio "rain" stop>>
<<audio "fight" play loop volume .50>>
<<set $move to 0>>
<<set $enemies to [4, 6, 4]>>
<<set $enemytype to ["knight", "knight", "knight"]>>
<</silently>>
You proceed towards the barriers. As you turn the corner around them, You see 3 knights sitting at a small table enjoying a friendly game of poker. Although 'friendly' is left up to interpretation. One of the knights in green armor has a comically large stack of chips in front of him, accompanied by a metallic blue boot and a First Edition Shiny Sage Card from Kakariko Village. Even you can recognize its value. Across from this knight sits a knight in blue armor with a small handful of chips, and a suspicious lack of footwear. The third knight is in green armor and sits perpendicular to them with an average pile of chips. He is laughing hysterically.
As you walk closer the losing knight glances toward you. Upon seeing you, he falls back out of his chair, screaming. "AHHh! Shit, um, Intruder! Battle stations, men!" The other two knights look back at you and quickly shake away their attention to the game. "Yes sir, Captain!" The two knights get in formation. The third knight gets up from the floor, hurridly grabs his boot, and prepares for battle.
''You engange the knights in battle!''
<<display "battle_start">><h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow </h3>
<<if $battle6 is false>>
You arrive at the bottom of the stairs that exit the overhead passage. To your right is the poker table behind the barriers. Looking forward, you can see a knight in blue armor carrying a sword, and a knight in green armor carrying what appears to be a crossbow.
What will you do?
[[Venture Forward|underpass4_battle2]]
[[Go Back Towards the Poker Table|underpass4_down]]
<<else>>
You arrive at the bottom of the stairs that exit the overhead passage. To your right is the poker table hidden behind the barriers. Forward is another room behind the guards you've defeated. It appears to have a staircase leading even further down. As you look down the staircase, you stare into nothing but Darkness. It seems you might not be able to see once you go down. Your gut begins to turn, and you feel that you may not be able to come back up once you go down. Perhaps there is something you could use to light your way into The Darkness...
What will you do?
[[Venture Forward|underpass5]]
[[Go Back Towards the Poker Table|underpass4_down]]
<</if>><h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow </h3>
Through the door and down the staircase you find yourself in a nearly pitch-black room. It's hard to see more than a few feet in front of you. You hear some metal clanking further into the dark, but you do not know what is causing it. You begin to follow along the right wall in order to keep your sense of direction.
A few feet in front of you appears to be a small stone pillar with a strange liquid in the center. You've seen this before when touring the atrium of the castle when you were younger, and you remember it to be a ''Brazier''. When lit, their powerful light could illuminate any space. Just past the Brazier is the corner of the room. It appears you'll have to travel further into the darkness.
What will you do?
<<nobr>>
<<if $lantern is true>>
[[Light the Brazier|UP5_lit]]
[[Continue Through the Darkness|UP5_dark]]
<<else>>
[[Continue Through the Darkness|UP5_dark]]
<</if>>
<</nobr>><<set $UP5_light to true>>
<<set $magic -= 1>>
Using your lantern you light the Brazier, illuminating the room around you. The Darkness dispels, and your path is lit.
You look down the newly lit hallway and realize you are now in the dungeon of the castle. Lined on the left wall are 3 large cells. The first cell is holding a small group of royal guards. There appear to be some of every armor color: green, blue, gold, and even red, the king's personal guards. It seems the majority of them were sleeping, and were awoken by the confusing sudden addition of light to their environment. A gold-armored knight notices you standing there and quickly makes his way to the cell door.
"H-Hey, there's someone here!" he whispers to his cellmates. "Kid, how did you get past the troops? They've been different ever since that horrid Agahnim took control of the castle. He did something to them. Took control of them. Made them crueler and stronger. He tried to do it to us, but we refused. He just waved his hand and our comrades, our friends, captured us and took us here. We just wanted to protect the King, but its too late now. As we were dragged away I saw the evil in Agahnim's eyes. The king was... helpless."
The gold-plated knight looked down in sorrow. From the paleness of their faces you can tell they've been stuck in here for a few days. Another knight approaches the front of the cell.
"Listen, if you've made it this far, maybe theres something you could do about all this. There's a cell at the end of the dungeon. Agahnim was keeping the descendents of the Sages in there, including Princess Zelda. I think she might still be in there. But be careful, Agahnim could be anywhere. He bends Darkness to his own will, it used to cover this room, but you were able to dispel it. If that's the case, I think you have a chance against him."
With newfound courage, you thank the royal guard for their help and turn towards the far end of the dungeon.
[[The Princess Awaits...]]Passing the Brazier, you continue to hug the wall of this dark room. The further you go, the darker it gets, and you can slowly feel the darkness drain any sense of hope you had. Somewhere in this room, you can hear a soft voice, almost like a prayer.
"Help me... Please help me... I'm in a prisoner in the dungeon of the castle. The seal... it's almost broken... you must hurry, whoever you are."
You continue to walk, trying to hone in on the source of the voice, until your hands suddenly land on a soft piece of fabric. It feels like a great tapestry, though you cannot see its design. The change in the feeling of the wall startles you, and a small gasp escapes your lungs. Suddenly the praying stops.
"H-Hello?! Is someone there?!"
The voice is coming from a few feet behind you. You hear the scrambling of feet and what sounds like someone running into iron bars.
"Oh no...You //are// here, aren't you?! You shouldn't be here without the light! Oh God, it wasn't supposed to happen like this. Quickly! You need to get out of here! He's too strong in the darkness!"
Before you get a chance to react, the feeling of the tapestry suddenly disappears, and your hand is now resting on absolutely nothing, as if the wall vanished from existence. You attempt to reach forward and grab it again, but to no avail. The voice chimes in again, somehow now much farther than it was before.
"Whoever you are, I'm so sorry. I never should have called you here. It seems now, we are all doomed."
[[Reach Out to the Darkness...]]<<audio "item" play volume .35>>
You approach the poker table to loot its contents. As you walk up, the First Edition Shiny Sage Card shines brighter and brighter, like it's calling to you. You have a feeling it will be of great use to you soon in the future. You grab it and put it in your pouch. Once it is safely stored, you open your pouch, which seems to be able to fit everything, and shovel in the rest of the contents of the table.
''You've found 20 rupees! You add them to your wallet!''<br>
''You've acquired the First Edition Shiny Sage Card! You add it to your pouch.''<br>
''You've found a Piece of Heart! Increase your health to 12 points!''<br>
<<silently>>
<<set $money += 20>>
<<set $sageCard to true>>
<<set $linkHealth to 12>>
<<set $healthMAX to 12>>
<</silently>>
[[Continue Forward|underpass4_down2]]
<img src="https://64.media.tumblr.com/544058c4c3c479327ee291d30263dc49/f775116e2155f8f9-78/s500x750/8ca4b0efc7f4071d7a9ba4b606662a36c675d5e5.gifv" width="480" height="256">
<<audio "rain" stop>>
<<audio "fairy" play loop volume .5>>
You walk past the chest and into the water. It's warmth soothes you. Once again, for a fraction of a second, you see a bright twinkle fly past you. Behind you, you hear a soft voice whisper. "O great Link, Hero of the Dark, allow me to aid you.'' You suddenly feel as if a great weight has lifted off your shoulders, and your wounds begin to heal. It appears you've found a ''Fairy's Fountain''. You spend a few seconds here before continuing your adventure.
''Your health has been replenished.''
<<set $linkHealth to $healthMAX>>
<<link 'Go Back'>>
<<audio "fairy" stop>>
<<audio "rain" play volume .5 loop>>
<<goto "hallway1_victory">>
<</link>>
<<silently>>
[[Go Back|hallway1_victory]]
<</silently>><<audio "rain" stop>>
<<audio "zelda" play loop volume .50>>
<src="https://upload.wikimedia.org/wikipedia/en/thumb/6/6e/Link_to_the_Past_Zelda.png/220px-Link_to_the_Past_Zelda.png" width="220" height="375">
You approach the cell at the end of the dungeon. Inside sits the good Princess Zelda, calmly kneeling on the floor as if she was praying.
"You. You were the one I spoke to! I knew you could make it here. You are the only one who can dispel this Darkness of Agahnim's. It is an ancient and evil power, from a land far away from here. However, you hold the Lantern, the Light of the Golden Power, a fraction of the ancient power of this land, the ''Triforce''. I could sense it in that Lantern. There is a legend that, after an ancient evil stole the Triforce from its home, a hero of great courage rose up to stop the evil and was granted a piece of its power, the Triforce of ''Courage''. This evil being, who held the Triforce of ''Power'', was defeated and used its power to curse all holders of the Triforce's blessing to be locked in battle for the rest of time. Agahnim, he seeks to steal the Triforce of Power for his own gain by destroying the seal of the Wise Men. But wherever the Triforce is challenged, a Hero of Courage will rise to stop him. Link, you must be that hero. You must have Courage. Agahnim's lair, it lies beyond that wall behind you. That tapestry, its a fake. Now that the darkness is gone, you can walk right through it. I believe in you Link, I believe in your Courage. Good Luck, Link, I will be with you."
You thank the princess and turn around to see a large tapestry covering the far wall. It depicts the legendary battle between Courage and Power that the princess told you about. It shows a third piece of the Triforce, granted to a woman fighting alongside the hero. It is labeled as ''Wisdom''. You place a hand against the tapestry and feel a force behind you pushing you forward. Your hand pushes through the tapestry, and your body follows. You now find yourself in Agahnim's throne room. He sits lounging in his throne at the far end of this open, almost arena-like room.
"So, you dispelled my Darkness, hmm? How interesting. No matter, I will make light work of you."
What will you say to him?
<<textbox "$exclaim" "" "Final Battle">>
<<silently>> [[Final Battle]] <</silently>><<audio "rain" stop>>
<<audio "death" play volume .50>>
<<timed 3s>> <<audio "deathscreen" play loop volume .50>> <</timed>>
You once again try to stumble forward and grab onto something. You take a few steps while grabbing at nothing and stumble onto the ground. As you reach forward, you suddenly find the cloth again. You try to use it to pull yourself back up to your feet, but you notice something. Something very, //very// bad. The cloth has much more resistance that a tapesty hanging on a wall should, and you realize that there isn't any hard surface behind it like there was before. Whatever you just grabbed on to, it certainly isn't an art piece. It feels like a large robe.
"Hello there, little one. I must admit, you certainly thought you had a chance here didn't you? That poor uncle of yours must have taught you a lot, hm?"
You look up in horror as the darkness around you begins to part. It wasn't darkness at all, it was a spell. An ancient and evil spell, definitely not from the land of Hyrule. The surrounding void makes way for a large figure with a flowing cloth robe and a wretched face like that of a nightmare. You have encountered Agahnim.
"If only he taught you not to meddle in the affairs of others, yes? Perhaps, in another life, someone can teach you better. For now, I will have to do."
Agahnim raises his hand out of his robe. His large, blue fingers, each with razor-sharp black nails, are calm and refined, as if he has done this hundreds of times before.
"Goodbye, little Link."
The last thing you see is the soft wave of his hand as you are launched back into the darkness. A sharp pain rushes throughout every last inch of your body as you are ripped apart into nothingness. Your last thought is that of your uncle. His words echo in your mind as your entire being ceases to exist.
//"You must have courage, my boy. The princess... Zelda... is your destiny."//
<h2>You have lost your life at the hands of the evil wizard Agahnim. Perhaps, in another life, you could have done better. If only there was a light to dispel his Darkness.</h2>
<<timed 35s>>
[[Come to your senses]]
<</timed>><<audio "zelda" stop>>
<<audio "boss" play loop volume .50>>
<img src="https://static.wikia.nocookie.net/zelda_gamepedia_en/images/c/cc/ALttP%26FS_Agahnim_Artwork.png/revision/latest/scale-to-width-down/1200?cb=20140125032941" width="256" height="256">
<<set $bossHealth to 20>> <<set $move to 0>>
You muster every ounce of Courage you have and yell at Agahnim. "$exclaim". Agahnim stares you down and rises out of his chair. With a wave of his large hand, it vanishes. You are now able to get a good look at him. Agahnim stands taller than any man or beast you've ever seen. His long, silk red robe flows down concealing his horrid blue skin. All but his face and hands are covered. His face glares at you from behind red silk, and his large, clawed hands reach out, ready to rip you apart. Startled, you stumble back for just a second and your pouch falls and some contents spill.
<<if $sageCard is true>>
Among the contents lies your Lantern First Edition Shiny Sage card that you stole from the poker table. Agahnim's eyes grow wide with amazement. "Holy Shit! Is that a First Edition Limited Shiny Sage Card Series 4 from Kakariko Village?! That's the last one I need for my collection!" Agahnim seems distracted, and you take the opportunity to grab your lantern from the ground and throw it towards him, remembering what the Princess said about its power of Light. It strikes him in the side of his head and he screams in distress. The lantern's Light damaged him! He recoils, and slowly regains his footing. It seems the Light of the lantern had an effect on his power. You have a fighting chance.
<<set $bossHealth to 10>> <<else>>
Among the contents lies your Lantern. You remember what the princess said about the power of its Light, and throw it towards Agahnim. He swiftly dodges it, but it seems slower, less powerful. The presence of light clearly has an effect on him. You have a fighting chance. <</if>>
"You think you can defeat me? I would ''love'' to see you try, little boy. This is where you meet your end!"
You ready your sword and shield, and prepare for your destiny.
''You engage Agahnim, the evil wizard of Darkness, in battle!''
<<display "boss_start">><<nobr>>
<<set _chance to random(4)>>
<<set $move to $move + 1>>
<h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow <br>
Turn: $move </h3>
<<if _chance == 0>>
<<timed .5s>>
You swing your sword, but Agahnim dodges the swift blade.<br>
<</timed>>
<<else>>
<<timed .5s>>
You swing your sword with great force, striking Agahnim. He takes 1 damage.<br>
<</timed>>
<<set $bossHealth -= 1>>
<<if $bossHealth is 0>>
<h1>You've defeated the evil wizard Agahnim!</h1>
<<timed 4s>> <<goto "bossVictory">> <</timed>>
<</if>>
<</if>>
<<timed 1.3s>>
<<display "bossMagic">>
<</timed>>
<</nobr>><<nobr>>
<<set $move to $move + 1>>
<h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow <br>
Turn: $move </h3>
<<timed .5s>>
You raise your shield, imbued with the power of Light, prepared to block any attack coming your way.<br>
<<set $block to true>>
<</timed>>
<<timed 1.3s>>
<<display "bossMagic">>
<</timed>>
<</nobr>><<nobr>>
<h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow <br>
Turn: $move </h3>
<<timed .5s>>
<<if $arrow is 0>>
You have no arrows to shoot.
<<else>>
<<set $move to $move + 1>>
<<set _chance to random(2)>>
<<if _chance is 0>>
You loose an arrow towards Agahnim, but he deflects it with his magic.<br>
<<set $arrow -= 1>>
<<else>>
Your arrow flies true and strikes Agahnim! He takes 2 damage.<br>
<<set $arrow -= 1>>
<<set $bossHealth -= 2>>
<<if $bossHealth <= 0>>
<h1>You've defeated the evil wizard Agahnim!</h1>
<<timed 4s>> <<goto "bossVictory">> <</timed>>
<</if>>
<</if>>
<</if>>
<</timed>>
<<timed 1.3s>>
<<display "bossMagic">>
<</timed>>
<</nobr>><<nobr>>
<h3>Health: $linkHealth Magic: $magic Wallet: $money Arrows: $arrow <br>
Turn: $move </h3>
<<timed .5s>>
You ready your sword, prepare to reflect a magic attack that might be thrown your way.<br>
<<set $reflect to true>>
<</timed>>
<<timed 1.3s>>
<<display "bossMagic">>
<</timed>>
<</nobr>>@@#result;Make your move...
<<nobr>>
<<link 'Attack'>>
<<replace '#result'>>
<<display "attack">>
<</replace>>
<</link>>
<<link 'Block'>>
<<replace '#result'>>
<<display "block">>
<</replace>>
<</link>>
<<link 'Shoot'>>
<<replace '#result'>>
<<display "shoot">>
<</replace>>
<</link>>
<<link 'Run'>>
<<replace '#result'>>
<<display "run">>
<</replace>>
<</link>>
<</nobr>>
@@<<set $block to false>> <<set $reflect to false>>
@@#result;Make your move...
<<nobr>>
<<link 'Attack'>>
<<replace '#result'>>
<<display "bossAttack">>
<</replace>>
<</link>>
<<link 'Block'>>
<<replace '#result'>>
<<display "bossBlock">>
<</replace>>
<</link>>
<<link 'Shoot'>>
<<replace '#result'>>
<<display "bossShoot">>
<</replace>>
<</link>>
<<link 'Reflect'>>
<<replace '#result'>>
<<display "bossReflect">>
<</replace>>
<</link>>
<</nobr>>
@@<<nobr>>
<<timed .5s>>
<<set _attack to random(2)>> /* 0 for reflect ball, 1 for dodge magic, 2 for lightning */
<<if _attack is 0>> /* reflect ball */
<<if $reflect is true>>
Agahnim conjures a ball of Darkness magic and launches it toward you. Right before it hits you, you hit it with your sword and reflect it back at him! Agahnim takes 3 damage!<br>
<<set $bossHealth -= 3>>
<<if $bossHealth <= 0>>
<h1>You've defeated the evil wizard Agahnim!</h1>
<<timed 4s>> <<goto "bossVictory">> <</timed>>
<</if>>
<<elseif $reflect is false>>
<<set _chance to random(4)>>
<<if _chance is 0>>
Agahnim conjures a ball of Darnkess mmagic and launches it at you, striking you in the chest. It drains you. You take 2 damage.<br>
<<set $linkHealth -= 2>>
''Link's health is now $linkHealth''<br>
<<if $linkHealth <= 0>>
<h1>You've lost too much health, you begin to collapse..</h1>
<<timed 3s>>
<<goto bossDeath>>
<</timed>>
<</if>>
<<else>>
Agahnim conjures a ball of Darkness magic and launches it toward you. You quickly sidestep it and dodge, taking no damage.<br>
<</if>>
<</if>>
<<elseif _attack is 1>> /* dodge magic */
<<set _chance to random(7)>>
<<if _chance is 0>>
Agahnim collects an attack of Darkness in the palm of his hand and launches it at you, striking you for 1 damage.<br>
<<set $linkHealth -= 1>>
''Link's health is now $linkHealth''<br>
<<if $linkHealth <= 0>>
<h1>You've lost too much health, you begin to collapse..</h1>
<<timed 3s>>
<<goto bossDeath>>
<</timed>>
<</if>>
<<elseif _chance is 1>>
Agahnim collects an attack of Darkness in the palm of his hand and launches it toward you, but you dodge it. However, it strikes the wall behind you and splits into pieces. You attempt to dodge, but a fragment strikes your back. You take 1 damage.<br>
<<set $linkHealth -= 1>>
''Link's health is now $linkHealth''<br>
<<if $linkHealth <= 0>>
<h1>You've lost too much health, you begin to collapse..</h1>
<<timed 3s>>
<<goto bossDeath>>
<</timed>>
<</if>>
<<else>>
Agahnim collects Darkness energy in the palm of his hand and launches it toward you, but you dodge it. The attack strikes the wall behind you and splits into pieces, but you are able to swiftly dodge those as well. You take no damage.<br>
<</if>>
<<elseif _attack is 2>> /* lightning */
<<if $block is true>>
Agahnim uses the power of Darkness to launch a Dark Lightning attack at you. However, your shield is able to reflect it back at him! Agahnim takes 3 damage.<br>
<<set $bossHealth -= 3>>
<<if $bossHealth <= 0>>
<h1>You've defeated the evil wizard Agahnim!</h1>
<<timed 4s>> <<goto "bossVictory">> <</timed>>
<</if>>
<<elseif $block is false>>
<<set _chance to random(4)>>
<<if _chance is 0>>
Agahnim uses the power of Darkness to launch a Dark Lightning attack at you. You are not quick enough to dodge it this time, and you take 2 damage.<br>
<<set $linkHealth -= 2>>
''Link's health is now $linkHealth''<br>
<<if $linkHealth <= 0>>
<h1>You've lost too much health, you begin to collapse..</h1>
<<timed 3s>>
<<goto bossDeath>>
<</timed>>
<</if>>
<<else>>
Agahnim uses the power of Darkness to launch a Dark Lightning attack towards you, but you are swift and dodge it. You take no damage.<br>
<</if>>
<</if>>
<</if>>
<</timed>>
<<timed 4s>>
It is now your turn again.<br>
<<display "boss_start">>
<</timed>>
<</nobr>><<audio "boss" stop>>
<<audio "ending" play volume .50>>
Agahnim, after suffering your last attack, falls to his knees.
"No! This is impossible! I, the Great Agahnim, could not ''possibly'' fall to the likes of you!"
He tries to stand up again, but falters. You use this chance to rush him with your sword. As you leap towards him, you feel a great power of ''Courage'' fill your body and imbue into your sword. Its power is almost too much for you to handle, but you do not falter. You pierce Agahnim's chest with your sword.
"AAAAGGGGHHHHHHH"
As the last bit of power leaves his body, his skin begins to lose its terrible, blue color. He becomes pale, and as his final breath leaves his lungs, he falls. Agahnim is dead.
The room around you begins to shift and change. It seems that this whole room was nothing but a Dark spell, and you soon find yourself in a humble, dimly lit, blue-brick room. You never left the dungeon. You look around the room and find a passageway back to where the princess and the royal guards were being held. Their iron gates have disappeared, another spell done by Agahnim's Dark power. The royal guards have begun to get up, celebrating their freedom. In front of you sits Princess Zelda, calmly waiting your return.
"I knew you could do it, Link. Thank you, for all you have done. You have truly served your Kingdom."
You approach her and help her rise to her feet, and she warmly embraces you.
"You are a true hero, I cannot thank you enough. Come, now, there is much to do to restore Hyrule."
You follow the Princess out of the dungeon, out of the underpass, and out of the castle. The sky has cleared, the storm has ended, and a new day has started. As the sun shines down on you and the Kingdom, you feel a sense of relief. The evil wizard is dead, your adventure has concluded, and a new life begins for Hyrule.
<h1>The End</h1>
Thanks for playing!<<audio "boss" stop>>
<<audio "death" play volume .50>>
<<timed 3s>> <<audio "deathscreen" play loop volume .50>> <</timed>>
You feel the last bit of energy you have leave your body. As you are consumed in Darkness, the last thing you hear is the evil laugh of Agahnim, taunting you. You have fallen, you have failed.
<h1>You have been consumed by The Darkness of Agahnim.</h1>
@@#result;What will you do?@@
<<link 'Retry the Battle?'>>
<<replace '#result'>>
//Reloading to the Dungeon...//
<</replace>>
<<set $linkHealth to $healthMAX>>
<<timed 3s>>
<<goto "Final Battle">>
<</timed>>
<</link>>
<<link 'Retry from the Underpass, Resetting your Progress?'>>
<<replace '#result'>>
//Reloading to the Underpass...//
<</replace>>
<<set $linkHealth to 8>>
<<set $healthMAX to 8>>
<<timed 3s>>
<<goto "variables">>
<</timed>>
<</link>>
<<set _intro = "music/The Legend of Zelda - A Link To The Past - Opening.mp3">>
<<cacheaudio "intro" _intro>>
<<cacheaudio "rain" "music/The Legend of Zelda - A Link to the Past Soundtrack_ Rainy Night [Extended].mp3">>
<<cacheaudio "ending" "music/29-Epilogue.mp3">>
<<cacheaudio "item" "music/item.mp3">>
<<cacheaudio "zelda" "music/05-Princess Zelda.mp3">>
<<cacheaudio "fight" "music/Final Fantasy VII - Fighting! (Battle Theme) Extended.mp3">>
<<cacheaudio "boss" "music/The Legend of Zelda - A Link to the Past Soundtrack_ Ganon Battle [Extended].mp3">>
<<cacheaudio "fairy" "music/The Legend of Zelda - A Link To The Past - Fairy Fountain.mp3">>
<<cacheaudio "death" "music/link-death.mp3">>
<<cacheaudio "deathscreen" "music/The Legend of Zelda - A Link To The Past - Select Screen.mp3">>