<<nobr>>/% Swoop check %/\n<<set $swoop to random(3)>>\n\n/% Blind check %/\n<<if $isblind>> <<set $swoop -= 2>> <<endif>>\n\n/% Lock check %/\n<<if $swoop > 0>> <<set $lock to true>> <<endif>>\n\n/% Next Lock check %/\n<<if $nextlock>> <<set $lock to true, $nextlock to false>><<endif>><</nobr>><<if $lock>>The dragon has her eyes locked on you, and begins to dive.\n<<else>>The dragon scans the area, trying to find you among the ruins.<<endif>>\n\n[[Bail|S2d]]\n[[Throw|S2b.1]]\n[[Stab|S2b.2]]\n<<if $trex>>[[Stand Still|S2b.3]]<<endif>>
<<nobr>>/% Swoop check %/\n<<set $swoop to random(3)>>\n\n/% Blind check %/\n<<if $isblind>> <<set $swoop -= 2>> <<endif>>\n\n/% Lock check %/\n<<if $swoop > 0>> <<set $lock to true>> <<endif>>\n\n/% Next Lock check %/\n<<if $nextlock>> <<set $lock to true, $nextlock to false>><<endif>><</nobr>><<if $lock>>The dragon has her eyes locked on you, and begins to dive.\n<<else>>The dragon scans the area, trying to find you among the ruins.<<endif>>\n\n[[Bail|S2d]]\n[[Stab|S2c.1]]\n<<if $trex>>[[Stand Still|S2c.2]]<<endif>>
<<nobr>>/% Dodge check (0 fails)%/\n<<set $dodge to random($speed)>>\n\n/% Fire check (>3 fails)%/\n<<set $damage to random((4-$tough), 5)>>\n\n<<set $fail to false>><</nobr>><<if $choice is "head">><<if $isblind>>You're easily able to avoid the dragon's blind thrashing.\n<<elseif $dodge isnot 0>>The dragon snaps at you, but you easily roll to the side.\n<<elseif $garmor>>Razor sharp teeth bite into your armor. You manage to escape the dragon's maw, but @@.info;your armor has been destroyed.@@<<set $garmor to false>>\n<<else>>@@.strike;The dragon's teeth sink into your flesh.@@<<set $strikes -= 1>><<set $fail to true>><<endif>><<else>><<if $dodge isnot 0>>You're able to dodge the wild swinging of the dragon's tail.\n<<elseif $damage <= 3>>The dragon's tail connects with your stomach, but you bounce right back.\n<<else>>@@.strike;The dragon's tail connects with your stomach.@@<<set $strikes -= 1>><<set $fail to true>><<endif>><<endif>>\n\n<<if $strikes <= 0>><<if $choice is "head">>\s\nYou're chomped.\n\n@@.god;Game Over@@\n\n@@.info;Tip@@: Its easier to avoid the dragon's jaws if it's been blinded.\n<<else>> \s\nYou're impaled.\n\n@@.god;Game Over@@\n\n@@.info;Tip@@: Arrows are powerful for bringing the dragon down, but deal less damage than other weapons when it comes to finishing the fight.<<endif>>\n<<elseif $fail>><<display "Stage3">>\n<<else>><<display "S3.2">><<endif>>
You go to the practice arena, hoping to improve your...\n\n[[Archery|Bow Practice]]\n[[Sword play|Sword Practice]]\n[[Spearmanship|Spear Practice]]\n\n[[Back|Hub]]
/* Your story will use the CSS in this passage to style the page.\nGive this passage more tags, and it will only affect passages with those tags.\nExample selectors: */\n\nbody {\n\t/* This affects the entire page */\n\t\n\t\n}\n\n.god {\n\tcolor: red;\n\tfont-size: 2em\n}\n\n.info {\n\tcolor: yellow;\n}\n\n.hit {\n\tcolor: cyan;\n}\n\n.strike {\n\tcolor: red;\n}\n\n.passage {\n\t/* This only affects passages */\n\t\n\t\n}\n.passage a {\n\t/* This affects passage links */\n\t\n\t\n}\n.passage a:hover {\n\t/* This affects links while the cursor is over them */\n\t\n\t\n}\n\n.revision-span-in {\n\topacity: 0;\n}\n.revision-span:not(.revision-span-out) {\n\ttransition: 1s; -webkit-transition: 1s;\n}\n.revision-span-out {\n\tposition:absolute;\n\topacity: 0;\n}
<<nobr>>/% Dodge check (0 fails)%/\n<<set $dodge to random($speed)>>\n\n/% Fire check (>3 fails)%/\n<<set $damage to random(4-$tough, 5)>>\n\n/% Lock check %/\n<<set $dodge -= 1>>\n\n<<set $hasspear to true>><</nobr>><<if $dodge > 0>>You leap to the side, narrowly dodging the dragon as it swoops down.\n<<elseif $damage <= 3>>The dragon nicks you as you try to leap away, but you get right back up.\n<<else>>@@.strike;You try to bail, but fail to escape the path of the dragon's attack.@@<<set $strikes -= 1>><<endif>>\n\n<<if $strikes lte 0>>You're crushed. All those jokes about being clumsy in grade school don't seem so funny now.\n\n@@.god;Game Over@@\n\n@@.info;Tip@@: Investing in either speed or an enchanted shield will offer you the best defensive options.\n<<else>>You manage to grab your spear.<<display "Stage2">><<endif>>
<<set $days -= 1>>\s\n<<if $tough is 0>>You spend the whole day getting knocked around by the trainer. You're not sure what you've gained more of, toughness or resentment.\n\n@@.info;Your toughness has increased.@@<<set $tough += 1>>\n<<elseif $tough is 1>>You feel pretty good about your toughness training, but as you're leaving the gym you spot a mage casting stone skin. You begin to regret that decision you made about magic college.\n\n@@.info;Your toughness has increased.@@<<set $tough += 1>>\n<<elseif $tough is 2>>You decided to try one of those protein potions you've been seeing around. You definitely feel it working, but your tastebuds may never recover.\n\n@@.info;Your toughness has increased.@@<<set $tough += 1>>\n<<else>>@@.info;Your toughness is maxed out.@@<<set $days += 1>>\n\n[[Return to the gym|previous()]]<<endif>>\n\n[[Next day|Day]]
<<set $bless to either(0, 1)>> <<set $strikes += $bless>> <<set $days -= 1>> <<if $bless is 0>>You visit the shrine, but you sense that your words fall on deaf ears. Perhaps the old gods really are gone...\n<<else>>You leave the shrine feeling blessed. Perhaps the old gods really are listening...\n\n@@.info;Your health has increased.@@<<endif>>\n\n[[Next day|Day]]
<<set $days -= 1>>\s\n<<if $bowskill is 0>>You're a couple hours in before you remember to tell the trainer you're left handed. Things go much more smootly after that.\n\n@@.info; Your bow skill has increased.@@<<set $bowskill += 1>>\n<<elseif $bowskill is 1>>As long as the dragon gives you time to aim, doesn't move, and has a brightly colored target on its chest, you should be good.\n\n@@.info; Your bow skill has increased.@@<<set $bowskill += 1>>\n<<elseif $bowskill is 2>>You spend hours hitting the same bullseye before the trainer is able to convince you that you can't split one arrow with another. Still, it was woth a shot.\n\n@@.info; Your bow skill has increased.@@<<set $bowskill += 1>>\n<<else>>@@.info; Your bow skill is maxed out.@@<<set $days += 1>>\n\n[[Return to the arena|previous()]]<<endif>>\n\n[[Next day|Day]]
<<set $hasspear to true>> <<set $hasshield to true>> <<set $isblind to false>><<set $dragonhealth to 3>>\s\nIt's a long trek up the mountain. When you finally reach the temple, you're curious as to why anyone would want it, given its current state of disrepair. You figure it's probably more of a pride thing.\n\nThe path through the temple is littered with stolen treasure and the skeletons of the dragon's prey. Only, the treasure is mostly farm equipment (likely stolen from the nearby peasant villages), and the skeletons are all sheep (likely from the same villages). You're begining to question the "unimaginable riches" part of the deal.\n\nAt last you reach the center of the temple. The ceiling has long since caved in, turning the whole room into a giant ampitheatre, surrounded by pillars of marble that frame the afternoon sky. In the center rests your opponent on a nest of rubble. Sunlight shines off of her scales. The dragon is quite a bit bigger than you expected--not that you've seen many dragons in your lifetime. She notices you immediately, and bares her fangs. Perhaps you shouldn't have dressed so obviously like someone who was trying to kill her. Oh well.\n\nHere goes nothing.\n\n[[Let's do this|Stage1]]
Welcome to ''Fight the Dragon''!\n\nThis game heavily features elements of randomness and contains many potential paths to victory.\n\n[[Begin!|Intro1]]
<<nobr>>/% Swoop check %/\n<<set $swoop to random(3)>>\n\n/% Blind check %/\n<<if $isblind>> <<set $swoop -= 2>> <<endif>>\n\n/% Lock check %/\n<<if $swoop > 0>> <<set $lock to true>> <<endif>>\n\n/% Next Lock check %/\n<<if $nextlock>> <<set $lock to true, $nextlock to false>><<endif>><</nobr>><<if $lock>>The dragon has her eyes locked on you, and begins to dive.\n<<else>>The dragon scans the area, trying to find you among the ruins.<<endif>>\n\n[[Bail|S2d]]\n[[Fire|S2a.1]]\n<<if $trex>>[[Stand Still|S2a.2]]<<endif>>
The dragon rears up, taking in a colossal breath. You've read enough legends to know what happens next.\n\n<<choice [[Dodge|S1a]]>>\n<<choice [[Shield|S1b]]>>\n<<choice [[Run|S1c]]>>
<<if visited("Stage2") is 1>><<set $dragonhealth to 3>>The dragon has had just about enough. You can tell she's frustrated with your persistence. She backs into the center of the room and extends her impressive wings, taking to the air with one massive motion.\n\nYou make your way to the center as well<<if not $hasspear>><<set $hasspear to true>>, collecting your spear on the way<<endif>>. You know she'll be back soon.<<endif>><<set $lock to false>>\n\nThe dragon circles overhead.\n\n[[Ready Bow|S2a]]\n[[Ready Sword and Shield|S2c]]\n<<if $hasspear>>[[Ready Spear|S2b]]<<endif>>
<<if $final>><<set $final to false>><<set $spraycheck to 0>><<set $dragonhealth to 20>>\n\nBattered and bruised, the dragon crashes to the ground. Her descent crashes through multiple pillars, and a large section of the remaining ceiling comes down on top of her.\n\n<<if not $hasspear>><<set $hasspear to true>>You grab your spear as you make your way to her.<<endif>> She's sustained too much damage to fly, but she's far from out.<<endif>>\n\nThere are two approaches to the grounded dragon.\n\n[[Head|S3.1][$choice = "head"]]\n[[Tail|S3.1][$choice = "tail"]]
<<if $choice is "head">>The dragon's finally able to twist herself so that she can push you away. You back up and prepare for another assault.\n<<else>>Finally the dragon manages to shake your grip, bucking you off of her back. You retreat and prepare for another go.<<endif>>\n\n<<display "Stage3">>
<<if $choice is "head">>With one final blow, you puncture the dragon's heart. You quickly retreat as magma streams out of her chest.\n<<else>>With one final blow, you sever the dragon's neck. You quickly retreat as magma streams out of her torso.<<endif>>\n\nYou watch as her body slowly begins to melt. You get the feeling you should probably feel bad for her, but in reality you feel nothing but a mixture of pain, adrenaline and pride. You guess this is what those heroes of legend must have felt like.\n\nYou could definitely get used to it.\n\n@@.god;Congratulations!@@\n\nThanks for playing!
<<if $choice is "head">>You cautiously approach the dragon's head. She snarls out you, then lunges out in an attempt to crush you between her jaws.\n<<else>>You work your way to the dragon's back. She can't turn to face you, but her spiked tail lashes out in your direction.<<endif>>\n\n[[Dodge|S3.2a]]\n[[Block|S3.2b]]
<<print $days>> days left to prepare.\n\n[[Practice|Practice]]\n[[Train|Train]]\n[[Study|Study]]\n[[Work|Work]]\n[[Pray|Pray]]
<<set $days -= 1>>\s\n<<if $spearskill is 0>>Even though you know this is serious stuff, you can't shake the feeling that you're essentially learning advanced poking techniques.\n\n@@.info;Your spear skill has increased.@@<<set $spearskill += 1>>\n<<elseif $spearskill is 1>>Today you learn that the hardest part of throwing a spear is getting it back somehow. You figure this is why archers have multiple arrows.\n\n@@.info;Your spear skill has increased.@@<<set $spearskill += 1>>\n<<elseif $spearskill is 2>>The trainer is impressed with both your combat skills and throwing accuracy. He's less impressed with your idea to tie a string around the end of your spear as a retrieval method.\n\n@@.info;Your spear skill has increased.@@<<set $spearskill += 1>>\n<<else>>@@.info;Your spear skill is maxed out.@@<<set $days += 1>>\n\n[[Return to the arena|previous()]]<<endif>>\n\n[[Next day|Day]]
<<nobr>>/% Hit check sword (3 succeeds)%/\n<<set $hit to random($strength, 3)>>\n\n/% Crit check sword (3 succeeds)%/\n<<set $scrit to random($swordskill, 3)>><</nobr>><<if $hit isnot 3>>When the dragon's head nears your hiding spot, you lash out with your sword. It glances harmlessly off the dragon's scales.\n<<elseif $scrit and $gsword>>@@.hit;When you hear the dragon approaching, you leap up and slash at its eyes. Your enchanted sword pierces them.@@ The dragon rages, flailing around and smashing the pillar.\n\n@@.info;The dragon has been blinded.@@<<set $isblind to true>> <<set $dragonhealth -= 3>>\n<<elseif $scrit or $gsword>>@@.hit;As the dragon's head rounds the corner, you slash at it with your sword.@@ She certainly felt that.<<set $dragonhealth -= 2>>\n<<else>>@@.hit;As the dragon's head rounds the corner, you slash at it with your sword.@@ You barely break skin, but it's something.<<set $dragonhealth -= 1>><<endif>>\n\n<<if $dragonhealth <= 0>> [[Continue|Stage2]]\n<<else>>The dragon turns on you, threatening another jet of flame.\n\n[[Dodge|S1a]]\n[[Shield|S1b]]<<endif>>
<<nobr>>/% Hit check spear (3 succeeds)%/\n<<set $hit to random($spearskill, 3)>>\n\n/% Crit check spear (3 succeeds)%/\n<<set $scrit to random($strength, 3)>><</nobr>><<if $hit isnot 3>>When the dragon's head nears your hiding spot, you strike out with your spear. It glances harmlessly off the dragon's scales.\n<<elseif $scrit and $gspear>>@@.hit;When you hear the dragon approaching, you leap up and strike at its eyes. Your enchanted spear pierces them.@@ The dragon rages, flailing around and smashing the pillar.\n\n@@.info;The dragon has been blinded.@@<<set $isblind to true>><<set $dragonhealth -= 3>>\n<<elseif $scrit or $gspear>>@@.hit;As the dragon's head rounds the corner, you stab it with your spear.@@ Even dragons don't care for sharp objects in their face.<<set $dragonhealth -= 2>>\n<<else>>@@.hit;As the dragon's head rounds the corner, you stab it with your spear.@@ Poking practice is paying off.<<set $dragonhealth -= 1>><<endif>>\n\n<<if $dragonhealth <= 0>> [[Continue|Stage2]]\n<<else>>The dragon turns on you, threatening another jet of flame.\n\n[[Dodge|S1a]]\n[[Shield|S1b]]<<endif>>
<<nobr>>/% Hit check bow (3 succeeds)%/\n<<set $hit to random($bowskill, 3)>>\n\n/% Crit check bow %/\n<<set $crit to (($bowskill is 3) and $gbow)>><</nobr>><<if $hit isnot 3>>When the dragon's head nears your hiding spot, you let loose an arrow. It bounces off the scales of her snout.\n<<elseif $crit>>@@.hit;When you hear the dragon approaching, you fire an enchanted arrow at her eyes. They hit their mark@@ The dragon rages, flailing around and smashing the pillar.\n\n@@.info;The dragon has been blinded.@@<<set $isblind to true>> <<set $dragonhealth -= 3>>\n<<elseif $gbow>>@@.hit;As the dragon's head rounds the corner, you hit her with an enchanted arrow.@@ She takes the shot, and she's not happy about it.<<set $dragonhealth -= 2>>\n<<else>>@@.hit;As the dragon's head rounds the corner, you hit her with an arrow.@@ At very least you're a thorn in her side.<<set $dragonhealth -= 1>><<endif>>\n\n<<if $dragonhealth <= 0>> [[Continue|Stage2]]\n<<else>>The dragon turns on you, threatening another jet of flame.\n\n[[Dodge|S1a]]\n[[Shield|S1b]]<<endif>>
<<set $isblind to true>>When you hear the dragon approaching, you ready your garlic. As soon as you see her snout round the pillar, you leap out and throw it at her.\n\nThe dragon is stunned by your garlic assault. She backs off, shaking her head. @@.info;The garlic has blinded her.@@ Turns out that book was right after all.\n\n[[Continue|Stage2]]
<<nobr>>/% Block check (0-1 for normal, 0-3 for plus) %/\n<<set $block to random(4)>>\n\n/% Fire check (>3 fails)%/\n<<set $damage to random(4-$tough, 5)>>\n\n<<set $fail to false>><</nobr>><<if $choice is "head">><<if $isblind>>You raise your shield, but the dragon's blindness makes its attacks easy to avoid.\n<<elseif $gshield and ($block <= 3)>>Your enchanted shield resists the dragon's fangs, allowing you to advance.\n<<elseif $block <= 1>>The dragon lashes out, but you bash him back with your shield.\n<<elseif $garmor>>Razor sharp teeth bite into your armor. You manage to escape the dragon's maw, but @@.info;your armor has been destroyed.@@<<set $garmor to false>>\n<<else>>@@.strike;The dragon's teeth sink into your flesh.@@<<set $strikes -= 1>><<set $fail to true>><<endif>><<else>><<if $gshield and ($block <= 3)>>Your enchanted shield blocks the dragon's tail strikes.\n<<elseif $block <= 1>>A well timed shield bash protects you from the dragon's tail.\n<<elseif $damage <= 3>>The dragon's tail connects with your stomach, but you bounce right back.\n<<else>>@@.strike;The dragon's tail connects with your stomach.@@<<set $strikes -= 1>><<set $fail to true>><<endif>><<endif>>\n\n<<if $strikes <= 0>><<if $choice is "head">>\s\nYou're chomped.\n\n@@.god;Game Over@@\n\n@@.info;Tip@@: Toughness won't save you from the dragon's jaws, but armor could give you a second chance.\n<<else>> \s\nYou're impaled.\n\n@@.god;Game Over@@\n\n@@.info;Tip@@: The secrets you learn from studying open up special options. Just because you learned something in a previous playthrough doesn't mean you'll have it available to you in the next.<<endif>>\n<<elseif $fail>><<display "Stage3">>\n<<else>><<display "S3.2">><<endif>>
<<nobr>>/% spray %/\n<<set $spraycheck += 1>>\n\n/% Magma check%/\n<<set $melt to random($spraycheck - $tough)>>\n<<if $magma>> <<set $melt -= 2>> <<endif>><</nobr>>\s\n\s\n<<if $spraycheck is 1>>As your hit connects, red hot magma sprays from the dragon's wound.\n\n<<if $magma>>You're fully prepared, and dodge the initial spray.\n<<elseif $garmor>>You're caught unaware, but your armor protects you. Unfortunately it won't be of much use now.<<set $garmor to false>>\n<<else>>@@.strike;You're skin is covered in burning magma.@@<<set $strikes -= 1>><<endif>>\s\n\s\n<<elseif $melt > 0>>@@.strike;The magma eats away at your flesh.@@<<set $strikes -= 1>>\n<<else>>More magma pours from the dragon's flesh, slowly surrounding you.<<endif>>\n\n<<if $strikes <= 0>>You're melted.\n\n@@.god;Game Over@@\n\n@@.info;Tip@@: The longer the fight goes, the more dangerous the magma becomes.\n<<elseif $dragonhealth <= 0>>[[Finish her!|Finish]]\n<<else>>[[Try again|passage()]]<<endif>>
You go to the gym, looking to work on your...\n\n[[Strength|Strength Training]]\n[[Toughness|Tough Training]]\n[[Speed|Speed Training]]\n\n[[Back|Hub]]
<<set $days -= 1>>\s\n<<if not $garlic>><<set $garlic to true>>You read in a book of fables that dragons hate @@.info;''garlic''@@. You could have sworn garlic was for some other mythical creature, but the book seemed pretty credible.\n<<else>>You spend the whole day reading, but you find no useful information.<<endif>>\n\n[[Next day|Day]]
@@.god;''YOU DARE FEIGN IGNORANCE? HAVE YOU NO RESPECT FOR THE GODS?''@@\n\n[[Gods? Like, the ancient mythology kind?|Intro4]]
Fight the Dragon
<<if $days is 9>>''Day 1''\nWith only 9 days to prepare, you have your work cut out for you. Each day you can spend doing one task:\n\n@@.info;Practicing@@ will increase your skill with a weapon. You are able to bring a ''Bow'', a ''Sword'', and a throwing ''Spear'' with you into the final battle.\n@@.info;Training@@ will increase one of your physical attributes. ''Strength'' makes you hit harder, ''Toughness'' lets you take more hits, and ''Speed'' is useful for dodging.\n@@.info;Studying@@ will give you invaluable information that can help in different ways, but with diminishing returns. Each time you study, you're less likely to find information the next time.\n@@.info;Working@@ will earn you money, which you can use to buy enchanted items at the shop before the battle.\n@@.info;Praying@@ can increase your chances of surviving, but there's no guarantee your prayer will be answered.\n\n<<display "Hub">>\n\n<<elseif $days is 8>>''Day 2''\n<<display "Hub">>\n\n<<elseif $days is 7>>''Day3''\n<<display "Hub">>\n\n<<elseif $days is 6>>''Day 4''\n<<display "Hub">>\n\n<<elseif $days is 5>>''Day 5''\n<<display "Hub">>\n\n<<elseif $days is 4>>''Day 6''\n<<display "Hub">>\n\n<<elseif $days is 3>>''Day 7''\n<<display "Hub">>\n\n<<elseif $days is 2>>''Day 8''\n<<display "Hub">>\n\n<<elseif $days is 1>>''Day 9''\n<<display "Hub">>\n\n<<elseif $days is 0>>''Day 10''\nThe final day has arrived. On your way to the mountain, you stop at your local adventurer's shop.\n[[To the shop|Shop]]\n<<endif>>
<<nobr>>/% Hit check bow (3 succeeds)%/\n<<set $hit to random($bowskill, 3)>>\n\n/% Crit check bow %/\n<<set $crit to (($bowskill is 3) and $gbow)>>\n\n/% Fire check (>3 fails)%/\n<<set $damage to random(4-$tough, 5)>><</nobr>><<if $hit isnot 3>>You aim your bow carefully and fire, but the arrow reaches the peak of it's arc long before it connects.\n\n<<if $lock>><<if $damage <= 3>>The dragon rains fire on you from above, but you survive through the barrage.\n<<else>>@@.strike;A fiery airstrike sears your flesh.@@<<set $strikes -= 1>><<endif>>\n<<else>>Your attack attracts attention. The dragon locks onto your location.<<set $nextlock to true>><<endif>>\n<<elseif $crit>>@@.hit;A beautiful shot lands an enchanted arrow into the dragon's eye.@@ She's stunned by the blow, thrashing in midair.\n\n@@.info;The dragon has been blinded.@@<<set $isblind to true>> <<set $dragonhealth -= 3>>\n<<elseif $gbow>>@@.hit;Your enchanted arrow lodges itself in her throat.@@ She stifles her attack, pulling up.<<set $dragonhealth -= 2>>\n<<else>>@@.hit;Your arrow strikes her wing.@@ The hit diverts her flight path enough for her fire to safely miss.<<set $dragonhealth -= 1>><<endif>>\n\n<<if $strikes lte 0>>You're toast. You wonder if there's such a thing as dragon jam.\n\n@@.god;Game Over@@\n\n@@.info;Tip@@: Max bow skill with enchanted arrows allows you to land powerful critical strikes.\n<<elseif $dragonhealth <= 0>> [[Continue|Stage3]]\n<<else>> <<display "Stage2">><<endif>>
<<nobr>>/% Hit check spear throw (6 succeeds) %/\n<<set $hit to random(($spearskill + $strength), 6)>>\n\n/% Crit check spear throw %/\n<<if (($spearskill + $strength) >= 4) and $gspear>><<set $crit to true>><<endif>>\n\n/% Fire check (>3 fails)%/\n<<set $damage to random(4-$tough, 5)>><</nobr>><<set $hasspear to false>><<if $hit isnot 3>>You hurl your spear up into the air, but it falls uselessly by your side.\n\n<<if $lock>><<if $damage <= 3>>The dragon rains fire on you from above, but you survive through the barrage.\n<<else>>@@.strike;A fiery airstrike sears your flesh.@@<<set $strikes -= 1>><<endif>>\n<<else>>Your attack attracts attention. The dragon locks onto your location.<<set $nextlock to true>><<endif>>\n<<elseif $crit>>@@.hit;A beautiful throw sends your enchanted spear into the dragon's eye.@@ She's stunned by the blow, thrashing in midair.\n\n@@.info;The dragon has been blinded.@@<<set $isblind to true>> <<set $dragonhealth -= 3>>\n<<elseif $gspear>>@@.hit;Your enchanted spear pierces the dragon's hide.@@ She spins in the air, throwing your spear to the ground.<<set $dragonhealth -= 2>>\n<<else>>@@.hit;Your spear strikes the dragon's hide.@@ She diverts her attack while your spear falls to the ground.<<set $dragonhealth -= 1>><<endif>>\n\n<<if $strikes lte 0>>You're burnt. Not much subtelty in death by dragon.\n\n@@.god;Game Over@@\n\n@@.info;Tip@@: Strength allows you to throw your spear to greater effect.\n<<elseif $dragonhealth <= 0>> [[Continue|Stage3]]\n<<else>> <<display "Stage2">><<endif>>
<<nobr>>/% Hit check spear (3 succeeds)%/\n<<set $hit to random($spearskill, 3)>>\n\n/% Crit check spear (3 succeeds)%/\n<<set $scrit to random($strength, 3)>>\n\n/% Fire check (>3 fails)%/\n<<set $damage to random(4-$tough, 5)>><</nobr>><<if $lock>><<if $damage <= 3>>The dragon swoops low, lashing at you with her claw. You're battered about but you'll pull through.\n<<else>>@@.strike;The dragon swoops low, slashing you with her claw.@@ You start to taste blood.<<set $strikes -= 1>><<endif>>\n<<else>>The dragon swoops low, narrowly missing you but locking onto you location.<<set $nextlock to true>><<endif>>\n\n<<if $hit isnot 3>>You thrust your spear into the air, but you don't connect.\n<<elseif $scrit and $gspear>>@@.hit;You thrust your enchanted spear into the air, slashing across the dragon's stomach.@@ You can tell the damage is severe as she careens off to the side.<<set $dragonhealth -= 3>>\n<<elseif $scrit or $gspear>>@@.hit;Your spear tears through her wing.@@ A cry of pain escapes her throat.<<set $dragonhealth -= 2>>\n<<else>>@@.hit;Your spear strikes the dragon's shoulder as she flys by.@@<<set $dragonhealth -= 1>><<endif>>\n\n<<if $strikes lte 0>>You're slashed. You finally understand the phrase "cut to ribbons".\n\n@@.god;Game Over@@\n\n@@.info;Tip@@: Throwing your spear takes more strength than simply weilding it.\n<<elseif $dragonhealth <= 0>> [[Continue|Stage3]]\n<<else>> <<display "Stage2">><<endif>>
<<nobr>>/% Hit check spear throw (6 succeeds) %/\n<<set $hit to random(($spearskill + $strength), 6)>>\n\n/% Crit check spear throw %/\n<<if (($spearskill + $strength) >= 4) and $gspear>><<set $crit to true>><<endif>><</nobr>>\s\nYou stand perfectly still, and the dragon can't find you. As she scours the room, you take time to line up your throw...\n\n<<set $hasspear to false>><<if $hit isnot 3>>Somehow, you still manage to miss. Maybe the spear just isn't really your thing.\n<<elseif $crit>> @@.hit;A beautiful throw sends your enchanted spear into the dragon's eye.@@ She's stunned by the blow, thrashing in midair.\n\n@@.info;The dragon has been blinded.@@<<set $isblind to true>><<set $dragonhealth -= 3>>\n<<elseif $gspear>>@@.hit;Your enchanted spear pierces the dragon's hide.@@ She spins in the air, throwing your spear to the ground.<<set $dragonhealth -= 2>>\n<<else>>@@.hit;Your spear strikes the dragon's hide.@@ She diverts her attack while your spear falls to the ground.<<set $dragonhealth -= 1>><<endif>>\n\n<<if $dragonhealth <= 0>> [[Continue|Stage3]]\n<<else>> <<display "Stage2">><<endif>>
<<set $days -= 1>>\s\n<<if $strength is 0>>For the first time, you can tell where all of your muscles are. Mostly due to pain.\n\n@@.info;Your strength has increased.@@<<set $strength += 1>>\n<<elseif $strength is 1>>You spend the whole day pumping iron. You may be dying soon, but at least you'll look awesome while doing it.\n\n@@.info;Your strength has increased.@@<<set $strength += 1>>\n<<elseif $strength is 2>>You used to be confused as to why anyone would skip leg day. You're no longer confused.\n\n@@.info;Your strength has increased.@@<<set $strength += 1>>\n<<else>>@@.info;Your strength is maxed out.@@<<set $days += 1>>\n\n[[Return to the gym|previous()]]<<endif>>\n\n[[Next day|Day]]
<<display "Show Stats">>
<<set $days to 9>>\n<<set $strikes to 3>>\n<<set $money to 3>>\n<<set $bowskill to 0, $spearskill to 0, $swordskill to 0>>\n<<set $speed to 0, $tough to 0, $strength to 0>>\n<<set $garlic to false, $magma to false, $trex to false>>\n<<set $gsword to false, $gspear to false, $gbow to false, $gshield to false, $garmor to false, $ggarlic to false>>\n<<set $trait to either("strong", "fast", "tough")>>\n<<set $skill to either("sword", "bow", "spear")>>\n<<if $trait is "strong">><<set $strength to 2>>\n<<elseif $trait is "fast">><<set $speed to 2>>\n<<elseif $trait is "tough">><<set $tough to 2>><<endif>>\n<<if $skill is "sword">><<set $swordskill to 2>>\n<<elseif $skill is "bow">><<set $bowskill to 2>>\n<<elseif $skill is "spear">><<set $spearskill to 2>><<endif>>\n<<set $final to true>>
You decided to visit the library. Perhaps some ancient text will contain the secret to your survival.\n\n[[Read|either("Garlic", "Magma", "TRex")]]\n\n[[Back|Hub]]
<<set $wage to either(2, 3)>> <<set $money += $wage>> <<set $days -= 1>><<if $wage is 2>>It was a slow day today, and that one old guy who never tips showed up again.\n<<else>>Turns out the secret to getting tips was doing a good job all along!<<endif>>\n\n@@.info;You made <<print $wage>> coins.@@\n\n[[Next day|Day]]
<<nobr>>/% Block check (0-1 for normal, 0-3 for plus) %/\n<<set $block to random(4)>>\n\n/% Fire check (>3 fails)%/\n<<set $damage to random(4-$tough, 5)>>\n\n/% Hit check sword (3 succeeds)%/\n<<set $hit to random($strength, 3)>>\n\n/% Crit check sword (3 succeeds)%/\n<<set $scrit to random($swordskill, 3)>><</nobr>><<if $lock>><<if $gshield and ($block <= 3)>>Dragon fire strikes your shield, but you're able to hold if off.\n<<elseif $block <= 1>>You blocked with normal shield.\n<<elseif $damage <= 3>>The dragon's firebreat overwhelms your shield. You're a little crispier, but you make it through.\n<<else>>@@.strike;Your shield is no match for the dragon's fire.@@<<set $strikes -= 1>><<endif>>\n<<else>>The dragon swoops low, narrowly missing you but locking onto you location.<<set $nextlock to true>><<endif>>\n\n<<if $hit isnot 3>>You swing your sword in the air, but hit only air.\n<<elseif $scrit and $gsword>>@@.hit;You thrust your enchanted sword into the air, slashing across the dragon's stomach.@@ You can tell the damage is severe as she careens off to the side.<<set $dragonhealth -= 3>>\n<<elseif $scrit or $gsword>>@@.hit;Your sword tears through her wing.@@ A cry of pain escapes her throat.<<set $dragonhealth -= 2>>\n<<else>>@@.hit;Your sword strikes the dragon's shoulder as she flys by.@@<<set $dragonhealth -= 1>><<endif>>\n\n<<if $strikes lte 0>>You're baked. At least you fall within Kainos' domain now.\n\n@@.god;Game Over@@\n\n@@.info;Tip@@: High skill and an enchanted sword make your chances of critically striking far greater.\n<<elseif $dragonhealth <= 0>> [[Continue|Stage3]]\n<<else>> <<display "Stage2">><<endif>>
<<nobr>>/% Damage check on bow%/\n<<set $dmg to random($bowskill, 3)>>\n\n/% gbow multiplier %/\n<<if $gbow>><<set $dmg *= 2>><<endif>><</nobr>>\s\n<<if visited() % 4 is 0>><<display "S3.4">>\n<<elseif $dmg <= 0>>You draw your bow and fire, but the arrow fails to pierce her skin.\n\n[[Try again|S3.3a]]\n<<else>><<set $dragonhealth -= $dmg>><<if $choice is "head">>You fire an arrow into the dragon's chest.\n<<else>> You fire an arrow into the dragon's neck.<<endif>>\n\n<<if $dmg <= 3>>@@.hit;The arrow pierces for a small amount of damage.@@\n<<elseif $dmg <= 6>>@@.hit;The arrow pierces for a decent amount of damage.@@<<endif>>\n\n<<display "Spray">><<endif>>
<<nobr>>/% Damage check on spear%/\n<<set $dmg to random($spearskill, ($spearskill + $strength))>>\n\n/% multiplier %/\n<<if $gspear>><<set $dmg *= 2>><<endif>><</nobr>>\s\n\s\n<<if visited() % 4 is 0>><<display "S3.4">>\n<<elseif $dmg <= 0>>You thrust your spear forward, but it glances off the dragon's hide.\n\n[[Try again|S3.3b]]\n<<else>><<set $dragonhealth -= $dmg>><<if $choice is "head">>You stab your spear into the dragon's chest.\n<<else>> You stab your spear into the dragon's neck.<<endif>>\n\n<<if $dmg <= 3>>@@.hit;The spear pierces for a small amount of damage.@@\n<<elseif $dmg <= 6>>@@.hit;The spear pierces for a decent amount of damage.@@\n<<elseif $dmg <= 9>>@@.hit;The spear punctures deeply, dealing a large amount of damage.@@\n<<elseif $dmg <= 12>>@@.hit;The spear plunges deep into the dragon's flesh, dealing a massive amount of damage.@@\n<<endif>>\n\n<<display "Spray">><<endif>>
<<nobr>>/% Hit check sword (3 succeeds)%/\n<<set $hit to random($strength, 3)>>\n\n/% Crit check sword (3 succeeds)%/\n<<set $scrit to random($swordskill, 3)>><</nobr>>\s\nYou stand perfectly still, and the dragon can't find you. As she scours the room, you take time to line up your attack...<<if $hit isnot 3>>You charge at the dragon, but your sword glances off her. She retreats to the sky.\n<<elseif $scrit and $gsword>>@@.hit;You thrust your enchanted sword into the air, slashing across the dragon's stomach.@@ You can tell the damage is severe as she careens off to the side.<<set $dragonhealth -= 3>>\n<<elseif $scrit or $gsword>>@@.hit;Your sword tears through her wing.@@ A cry of pain escapes her throat.<<set $dragonhealth -= 2>>\n<<else>>@@.hit;Your sword strikes the dragon's shoulder as she flys by.@@<<set $dragonhealth -= 1>><<endif>>\n\n<<if $dragonhealth <= 0>> [[Continue|Stage3]]\n<<else>> <<display "Stage2">><<endif>>
@@.god;No, like, the REAL kind. How could you possibly not know of me? There's a ceremonial worship ceremony every Tuesday at sundown.@@\n\n[[Sorry dude, no one's worshiped anyone here for a long time.|Intro5]]
<<nobr>>/% Dodge check (0 fails)%/\n<<set $dodge to random($speed)>>\n\n/% Fire check (>3 fails)%/\n<<set $damage to random(4-$tough, 5)>><</nobr>><<if $dodge isnot 0>>You duck and run, moving just fast enough to avoid the flames that errupt from the dragon's jaws.\n<<elseif $damage <= 3>>Dragon fire singes you as you scamper away, but you're able to survive the flames.\n<<else>>@@.strike;You trip over yourself and are engulfed in flames.@@<<set $strikes -= 1>><<endif>>\n\n<<if $strikes <= 0>>You're seared. You wonder if you'll taste better or worse than a sheep.\n\n@@.god;Game Over@@\n\n@@.info;Tip@@: Toughness increases the chances of resisting an attack.\n<<else>>You make it to one of the pillars that surround the edge of the room. The dragon slowly approaches, and you prepare to strike.\n\n[[Ready sword|S1c.1]]\n[[Ready bow|S1c.3]]\n<<if $hasspear>>[[Ready spear|S1c.2]]<<endif>>\n<<if $ggarlic is true>>[[Ready garlic|S1c.4]]<<endif>><<endif>>
@@.god;Nonsense! You'll do just fine! You look like a pretty <<print $trait>> young lady, and I see you're already decent with a <<print $skill>>.@@\n\n[[Couldn't you find someone else?|Intro7]]
@@.god;''ENOUGH! I TRY TO HONOR YOU WITH THIS HOLY CHALLENGE AND YOU INSULT ME BY REFUSING? I WILL NOT TOLERATE THIS HERESY!\n\nYOU HAVE TEN DAYS TO SLAY THE DRAGON THAT INHABITS MY FORMER TEMPLE UPON THE NEARBY MOUNTAIN. SHOULD YOU REFUSE, I SHALL UNLEASH MY WRATH UPON YOU AND YOUR VILLAGE.''@@\n\n[[If you're so powerful, why can't you just handle the dragon yourself?|Intro8]]
@@.god;''*BOOM*''\n\n''GREETINGS, MORTAL! I AM THE GREAT AND POWERFUL KAINOS, GOD OF FIRE!''@@\n\n[[Zzzzz...|Intro2]]
@@.god;''WAKE UP, FOOL, AND ARISE SO THAT YOU MAY PROPERLY BOW BEFORE ME!''@@\n\n[[Who?|Intro3]]\n[[Wait, I've seen this bit already (skip)|Skip]]
<<nobr>>/% Block check (0-1 for normal, 0-3 for plus) %/\n<<set $block to random(4)>>\n\n/% Fire check (>3 fails)%/\n<<set $damage to random(4-$tough, 5)>><</nobr>>\s\n<<if $gshield and ($block <= 3)>>The dragon unleashes a blast of fire, but your enchanted shield is able to absorb most of the flames.\n<<elseif $block <= 1>>Dragon fire strikes your shield, but you're able to hold if off.\n<<elseif $damage <= 3>>The dragon's firebreat overwhelms your shield. You're a little crispier, but you make it through.\n<<else>>@@.strike;Your shield is no match for the dragon's fire.@@<<set $strikes -= 1>><<endif>>\n\n<<if $strikes lte 0>>You're charred. Unfortunately that "well done" smell is you.\n\n@@.god;Game Over@@\n\n@@.info;Tip@@: You can buy an enchanted shield from the shop to increase your chance of blocking.\n<<else>>\s\nYou manage to close the distance between you and the dragon. \s\n<<if not $hasspear>><<set $hasspear to true>>You're able to grab your spear off the ground nearby.<<endif>>\n\nNow that you're within her reach, the dragon raises a claw and prepares to strike.\n\n[[Ready sword|S1b.1]]\n[[Ready spear|S1b.2]]<<endif>>
<<set $days -= 1>>\s\n<<if $swordskill is 0>>You learn that there's more to a sword than just hitting people with the sharp bit. Your inner child feels betrayed.\n\n@@.info;Your sword skill has increased.@@<<set $swordskill += 1>>\n<<elseif $swordskill is 1>>You've gotten pretty good at sparring. Perhaps the dragon will be civil and challenge you to a duel?\n\n@@.info;Your sword skill has increased.@@<<set $swordskill += 1>>\n<<elseif $swordskill is 2>>Your skills are so impressive that you're offered a position as a town guard. You're not sure if that's a testament to your prowess or the local guard force's lack there of.\n\n@@.info;Your sword skill has increased.@@<<set $swordskill += 1>>\n<<else>>@@.info;Your sword skill is maxed out.@@<<set $days += 1>>\n\n[[Return to the arena|previous()]]<<endif>>\n\n[[Next day|Day]]
<<nobr>>/% Damage check on sword%/\n<<set $dmg to random($swordskill, ($swordskill + $strength))>>\n\n/% multiplier %/\n<<if $gsword>><<set $dmg *= 2>><<endif>><</nobr>>\s\n\s\n<<if visited() % 4 is 0>><<display "S3.4">>\n<<elseif $dmg <= 0>>You drive your sword forward, but you can't break the surface.\n\n[[Try again|S3.3c]]\n<<else>><<set $dragonhealth -= $dmg>><<if $choice is "head">>You stab your sword into the dragon's chest.\n<<else>> You stab your sword into the dragon's neck.<<endif>>\n\n<<if $dmg <= 3>>@@.hit;The sword pierces for a small amount of damage.@@\n<<elseif $dmg <= 6>>@@.hit;The sword pierces for a decent amount of damage.@@\n<<elseif $dmg <= 9>>@@.hit;The sword punctures deeply, dealing a large amount of damage.@@\n<<elseif $dmg <= 12>>@@.hit;The sword plunges deep into the dragon's flesh, dealing a massive amount of damage.@@\n<<endif>>\n\n<<display "Spray">><<endif>>
@@.god;Handle it myself? HA! Clearly you know nothing about the ways of the gods. My domain includes fire, mountains, minotaurs, algae, baking, and papercraft. Dragons are obviously part of my brother Gorbaf's terriroty, but I can't ask him because of that whole noodle ordeal...@@\n\n[[Ok, fine, whatever. Just let me get back to sleep.|Intro9]]
@@.god;''MAY THE FATES BE KIND, MORTAL.''@@\n\nYou'd better get some sleep; you have some long days ahead of you...\n\n[[Let's go!|Day]]
<<set $days -= 1>>\s\n<<if $speed is 0>>You and the trainer have a disagreement about what an average mile time is. And apparently you're supposed to run //all four// laps. Who knew?\n\n@@.info;Your speed has increased.@@<<set $speed += 1>>\n<<elseif $speed is 1>>The trainer hires a local mage to toss fireballs for you to dodge. Either that girl was enjoying herself too much, or she's secretly evil.\n\n@@.info;Your speed has increased.@@<<set $speed += 1>>\n<<elseif $speed is 2>>You've gotten pretty good at gymnastics. You just hope Kainos' temple is decorated with vaults and balance beams.\n\n@@.info;Your speed has increased.@@<<set $speed += 1>>\n<<else>>@@.info;Your speed is maxed out.@@<<set $days += 1>>\n\n[[Return to the gym|previous()]]<<endif>>\n\n[[Next day|Day]]
''Shop''\nCoins: <<print $money>>\n\n<<if $money >= 2>><<if not $gsword>>[[(2) Enchanted Sword|Shop][$gsword = true; $money -= 2]]<<endif>>\n<<if not $gspear>>[[(2) Enchanted Spear|Shop][$gspear = true; $money -= 2]]<<endif>>\n<<if not $gbow>>[[(2) Enchanted Arrows|Shop][$gbow = true; $money -= 2]]<<endif>><<endif>>\n<<if $money >= 3>><<if not $gshield>>[[(3) Enchanted Shield|Shop][$gshield = true; $money -= 3]]<<endif>>\n<<if not $garmor>>[[(3) Enchanted Armor|Shop][$garmor = true; $money -= 3]]<<endif>><<endif>>\n<<if $money >= 1>><<if $garlic and (not $ggarlic)>>[[(1) Enchanted Garlic|Shop][$ggarlic = true; $money -= 1]]<<endif>><<endif>>\n\n[[I'm ready|FightStart]]
<<if $choice is "head">>You make your way past the dragon's head. She struggles to turn on her side in an attempt to reach you, but she exposes her stomach to you. Here's your chance!\n<<else>>You make your way past the dragon's tail, climbing up her back and running along her spine. She struggles to shake you off, but you make it to her neck. Here's your chance!<<endif>>\n\n[[Strike with your bow|S3.3a]]\n[[Strike with your spear|S3.3b]]\n[[Strike with your sword|S3.3c]]
@@.god;Psh, that is just like humans. You leave for a few thousand years and suddenly everyone stops believing in you.\n\nNo matter. ''I, KAINOS, HAVE A HEROIC TASK FOR YOU TO COMPLETE. IT IS A GRAVE MISSION, AND YOU WILL SURELY DIE. BUT IF YOU SUCCEED, UNIMAGINABLE GLORY AND RICHES AWAIT.''@@\n\n[[I'm not really what you'd consider the "hero" type...|Intro6]]
Health: <<print $strikes>>\nMoney: <<print $money>>\nSpeed: <<print $speed>>\nStrength: <<print $strength>>\nToughness: <<print $tough>>\nBow Skill: <<print $bowskill>>\nSword Skill: <<print $swordskill>>\nSpear Skill: <<print $spearskill>>
@@.god;Oh, well, ok then.@@\n\n[[Let's go!|Day]]
<<nobr>>/% Hit check bow (3 succeeds)%/\n<<set $hit to random($bowskill, 3)>>\n\n/% Crit check bow %/\n<<set $crit to (($bowskill is 3) and $gbow)>><</nobr>>\s\nYou stand perfectly still, and the dragon can't find you. As she scours the room, you take time to line up your shot...\n\n<<if $hit isnot 3>>Somehow, you still come up short. Maybe the bow just isn't really your thing.\n<<elseif $crit>>@@.hit;A beautiful shot lands an enchanted arrow into the dragon's eye.@@ She's stunned by the blow, thrashing in midair.\n\n@@.info;The dragon has been blinded.@@<<set $isblind to true>> <<set $dragonhealth -= 3>>\n<<elseif $gbow>>@@.hit;Your enchanted arrow lodges itself in her throat.@@ She stifles her attack, pulling up.<<set $dragonhealth -= 2>>\n<<else>>@@.hit;Your arrow strikes her wing.@@<<set $dragonhealth -= 1>><<endif>>\n\n<<if $dragonhealth <= 0>> [[Continue|Stage3]]\n<<else>> <<display "Stage2">><<endif>>
<<set $days -= 1>><<if not $trex>><<set $trex to true>>You read that the dragon's sight is based on movement. The scroll advises you to @@.info;''stand still''@@ to evade it. While it's a little hard to swallow, you sorta remember hearing about some other large reptiles with movement based vision in the past.\n<<else>>You spend the whole day reading, but you find no useful information.<<endif>>\n\n[[Next Day|Day]]
<<set $days -= 1>><<if not $magma>><<set $magma to true>>While reading an old adventerer's journal, you come across reports that dragon's blood is actually @@.info;''magma''@@. Seems like a good thing to know.\n<<else>>You spend the whole day reading, but you find no useful information.<<endif>>\n\n[[Next day|Day]]
<<nobr>>/% Hit check sword (3 succeeds)%/\n<<set $hit to random($strength, 3)>>\n\n/% Crit check sword (3 succeeds)%/\n<<set $scrit to random($swordskill, 3)>><</nobr>><<if $hit isnot 3>>You stab at the dragon's claw as it comes down, but you fail to break through her hide.\n\n<<if $garmor>>You slam into the ground, but your armor takes the brunt of the force.\n<<else>>@@.strike;You slam into the ground, and you think you felt something break.@@<<set $strikes -= 1>><<endif>>\n<<elseif $scrit and $gsword>>@@.hit;As the dragon's claw comes down, you stab it with your enchanted sword.@@ She reels in pain, filling the air with fire and rage.<<set $dragonhealth -= 3>>\n<<elseif $scrit or $gsword>>@@.hit;You slash at the dragon's claw as it swipes towards you.@@ She pulls back and bares her fangs.<<set $dragonhealth -= 2>>\n<<else>>@@.hit;You slash at the dragon's claw as it swipes towards you.@@ <<set $dragonhealth -= 1>><<endif>>\n\n<<if $strikes lte 0>>You got crushed. Perhaps melee combat just wasn't your thing.\n\n@@.god;Game Over@@\n\n@@.info;Tip@@: Weilding a sword effectively takes both skill and strength.\n<<elseif $dragonhealth <= 0>> [[Continue|Stage2]]\n<<else>>The dragon backs away, readying more fire. Your shield is still hot from the last blast.\n\n[[Dodge|S1a]]\n[[Run|S1c]]<<endif>>
<<nobr>>/% Hit check spear (3 succeeds)%/\n<<set $hit to random($spearskill, 3)>>\n\n/% Crit check spear (3 succeeds)%/\n<<set $scrit to random($strength, 3)>><</nobr>><<if $hit isnot 3>>You ready your spear, but the dragon easily swats you aside.\n\n<<if $garmor>>You slam into the ground, but your armor takes the brunt of the force.\n<<else>>@@.strike;You slam into the ground, and you think you felt something break.@@<<set $strikes -= 1>><<endif>>\n<<elseif $scrit and $gspear>>@@.hit;As the dragon's claw comes down, you ram your enchanted spear into her palm.@@ She reels in pain, filling the air with fire and rage.<<set $dragonhealth -= 3>>\n<<elseif $scrit or $gspear>>@@.hit;You stab at the dragon's claw as it swipes towards you.@@ She pulls back and bares her fangs.<<set $dragonhealth -= 2>>\n<<else>>@@.hit;You stab at the dragon's claw as it swipes towards you.@@ Maybe death by a thousand cuts will get there.<<set $dragonhealth -= 1>><<endif>>\n\n<<if $strikes lte 0>>You got crushed. Perhaps melee combat just wasn't your thing.\n\n@@.god;Game Over@@\n\n@@.info;Tip@@:Enchanted weapons double your potential damage.\n<<elseif $dragonhealth <= 0>> [[Continue|Stage2]]\n<<else>>The dragon backs away, readying more fire. Your shield is still hot from the last blast.\n\n[[Dodge|S1a]]\n[[Run|S1c]]<<endif>>
<<nobr>>/% Hit check spear throw (6 succeeds) %/\n<<set $hit to random(($spearskill + $strength), 6)>>\n\n/% Crit check spear throw %/\n<<if (($spearskill + $strength) >= 4) and $gspear>><<set $crit to true>><<endif>><</nobr>><<set $hasspear to false>><<if $hit < 5>> You hurl your spear towards the dragon, but it clatters to the ground. She's perplexed by your seemingly elaborate distraction.\n<<elseif $crit>>@@.hit;You launch your spear straight into the dragon's eye.@@ She stumbles and shakes it out, but the damage is done.\n\n@@.info;The dragon is blinded.@@<<set $isblind to true>> <<set $dragonhealth -= 3>>\n<<elseif $gspear>>@@.hit;Your enchanted spear lodges in the dragon's shoulder.@@ She removes it with her teeth and spits it out to the side.<<set $dragonhealth -= 2>>\n<<else>>@@.hit;Your spear strikes the dragon's hide.@@ Her scales are strong, and your spear clatters to the ground.<<set $dragonhealth -= 1>><<endif>>\n\n<<if $dragonhealth <= 0>> [[Continue|Stage2]]\n<<else>>You've lost your spear, and will have to shield to close distance if you want to retrieve it.\n\nThe dragon retaliates with another blast of fire. You have a split second to react.\n\n[[Shield|S1b]]\n[[Run|S1c]]<<endif>>
By Chris Mooney
<<nobr>>/% Dodge check (0 fails)%/\n<<set $dodge to random($speed)>>\n\n/% Fire check (>3 fails)%/\n<<set $damage to random((4-$tough), 5)>><</nobr>>\s\n<<if $dodge isnot 0>>A stream of fire erupts from the dragon's maw, but you dodge nimbly to the side.\n<<elseif $damage <= 3>>Fire washes over you, but you're able to shake it off.\n<<else>>@@.strike;You're hit with the full force of the dragon's fire.@@<<set $strikes -= 1>><<endif>>\n\n<<if $strikes <= 0>>You're roasted. Now you know what all those marshmallows feel like.\n\n@@.god;Game Over@@\n\n@@.info;Tip@@: Speed increases your chance of dodging.\n<<else>>You have a brief opening as the dragon prepares her next blast.\n\n[[Arrow|S1a.1]]\n[[Shield|S1b]]\n[[Run|S1c]]\n<<if $hasspear>>[[Spear|S1a.2]]<<endif>><<endif>>
<<nobr>>/% Hit check bow (3 succeeds)%/\n<<set $hit to random($bowskill, 3)>>\n\n/% Crit check bow %/\n<<set $crit to (($bowskill is 3) and $gbow)>><</nobr>><<if $hit isnot 3>> You loose an arrow, but your shot falls wide. It might be your imagination, but you can swear you see the dragon smirk.\n<<elseif $crit>>@@.hit;Your percision sends an enchanted arrow right into the dragon's eye.@@ An earth shattering roar errupts from her throat, strong enough that you can hear parts of the temple collapsing in the distance.\n\n@@.info;The dragon is blinded.@@<<set $isblind to true>> <<set $dragonhealth -= 3>>\n<<elseif $gbow>>@@.hit;You send an enchanted arrow down the dragon's throat.@@ She coughs up a bit, but recovers quickly.<<set $dragonhealth -= 2>>\n<<else>>@@.hit;Your arrow hits its mark.@@ The dragon seems annoyed by the new splinter it's accquired.<<set $dragonhealth -= 1>><<endif>>\n\n<<if $dragonhealth <= 0>> [[Continue|Stage2]]\n<<else>>The dragon retaliates with another blast of fire. You have a split second to react.\n\n[[Shield|S1b]]\n[[Run|S1c]]<<endif>>
(function(){version.extensions.replaceMacrosCombined={major:1,minor:1,revision:5};var nullobj={handler:function(){}};\nfunction showVer(n,notrans){if(!n){return}n.innerHTML="";new Wikifier(n,n.tweecode);n.setAttribute("data-enabled","true");\nn.style.display="inline";n.classList.remove("revision-span-out");if(!notrans){n.classList.add("revision-span-in");\nif(n.timeout){clearTimeout(n.timeout)}n.timeout=setTimeout(function(){n.classList.remove("revision-span-in");\nn=null},1)}}function hideVer(n,notrans){if(!n){return}n.setAttribute("data-enabled","false");n.classList.remove("revision-span-in");\nif(n.timeout){clearTimeout(n.timeout)}if(!notrans){n.classList.add("revision-span-out");n.timeout=setTimeout(function(){if(n.getAttribute("data-enabled")=="false"){n.classList.remove("revision-span-out");\nn.style.display="none";n.innerHTML=""}n=null},1000)}else{n.style.display="none";n.innerHTML="";n=null\n}}function tagcontents(b,starttags,desttags,endtags,k){var l=0,c="",tg,a,i;function tagfound(i,e,endtag){for(var j=0;\nj<e.length;j++){if(a.indexOf("<<"+e[j]+(endtag?">>":""),i)==i){return e[j]}}}a=b.source.slice(k);for(i=0;\ni<a.length;i++){if(tg=tagfound(i,starttags)){l++}else{if((tg=tagfound(i,desttags,true))&&l==0){b.nextMatch=k+i+tg.length+4;\nreturn[c,tg]}else{if(tg=tagfound(i,endtags,true)){l--;if(l<0){return null}}}}c+=a.charAt(i)}return null\n}var begintags=[];var endtags=[];function revisionSpanHandler(g,e,f,b){var k=b.source.indexOf(">>",b.matchStart)+2,vsns=[],vtype=e,flen=f.length,becomes,c,cn,m,h,vsn;\nfunction mkspan(vtype){h=insertElement(m,"span",null,"revision-span "+vtype);h.setAttribute("data-enabled",false);\nh.style.display="none";h.tweecode="";return h}if(this.shorthand&&flen){while(f.length>0){vsns.push([f.shift(),(this.flavour=="insert"?"gains":"becomes")])\n}}else{if(this.flavour=="insert"||(this.flavour=="continue"&&this.trigger=="time")){vsns.push(["","becomes"])\n}}if(this.flavour=="continue"&&flen){b.nextMatch=k+b.source.slice(k).length;vsns.push([b.source.slice(k),vtype])\n}else{becomes=["becomes","gains"];c=tagcontents(b,begintags,becomes.concat(endtags),endtags,k);if(c&&endtags.indexOf(c[1])==-1){while(c){vsns.push(c);\nc=tagcontents(b,begintags,becomes,endtags,b.nextMatch)}c=tagcontents(b,begintags,["end"+e],endtags,b.nextMatch)\n}if(!c){throwError(g,"can't find matching end"+e);return}vsns.push(c);if(this.flavour=="continue"){k=b.nextMatch;\nb.nextMatch=k+b.source.slice(k).length;vsns.push([b.source.slice(k),""])}}if(this.flavour=="remove"){vsns.push(["","becomes"])\n}cn=0;m=insertElement(g,"span",null,e);m.setAttribute("data-flavour",this.flavour);h=mkspan("initial");\nvsn=vsns.shift();h.tweecode=vsn[0];showVer(h,true);while(vsns.length>0){if(vsn){vtype=vsn[1]}vsn=vsns.shift();\nh=mkspan(vtype);h.tweecode=vsn[0]}if(typeof this.setup=="function"){this.setup(m,g,f)}}function quantity(m){return(m.children.length-1)+(m.getAttribute("data-flavour")=="remove")\n}function revisionSetup(m,g,f){m.className+=" "+f[0].replace(" ","_")}function keySetup(m,g,f){var key=f[0];\nm.setEventListener("keydown",function l(e){var done=!revise("revise",m);if(done){m.removeEventListener("keydown",l)\n}})}function timeSetup(m,g,f){function cssTimeUnit(s){if(typeof s=="string"){if(s.slice(-2).toLowerCase()=="ms"){return Number(s.slice(0,-2))||0\n}else{if(s.slice(-1).toLowerCase()=="s"){return Number(s.slice(0,-1))*1000||0}}}throwError(g,s+" isn't a CSS time unit");\nreturn 0}var tm=cssTimeUnit(f[0]);setTimeout(function timefn(){var done=!revise("revise",m);if(!done){setTimeout(timefn,tm)\n}},tm)}function hoverSetup(m){var fn,noMouseEnter=(document.head.onmouseenter!==null),m1=m.children[0],m2=m.children[1],gains=m2.className.indexOf("gains")>-1;\nif(!m1||!m2){return}m1.onmouseenter=function(e){var efp=document.elementFromPoint(e.clientX,e.clientY);\nwhile(efp&&efp!==this){efp=efp.parentNode}if(!efp){return}if(this.getAttribute("data-enabled")!="false"){revise("revise",this.parentNode)\n}};m2.onmouseleave=function(e){var efp=document.elementFromPoint(e.clientX,e.clientY);while(efp&&efp!==this){efp=efp.parentNode\n}if(efp){return}if(this.getAttribute("data-enabled")!="false"){revise("revert",this.parentNode)}};if(gains){m1.onmouseleave=m2.onmouseleave\n}if(noMouseEnter){fn=function(n){return function(e){if(!event.relatedTarget||(event.relatedTarget!=this&&!(this.compareDocumentPosition(event.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY))){this[n]()\n}}};m1.onmouseover=fn("onmouseenter");m2.onmouseout=fn("onmouseleave");if(gains){m1.onmouseout=m2.onmouseout\n}}m=null}function mouseSetup(m){var evt=(document.head.onmouseenter===null?"onmouseenter":"onmouseover");\nm[evt]=function(){var done=!revise("revise",this);if(done){this[evt]=null}};m=null}function linkSetup(m,g,f){var l=Wikifier.createInternalLink(),p=m.parentNode;\nl.className="internalLink replaceLink";p.insertBefore(l,m);l.insertBefore(m,null);l.onclick=function(){var p,done=false;\nif(m&&m.parentNode==this){done=!revise("revise",m);scrollWindowTo(m)}if(done){this.parentNode.insertBefore(m,this);\nthis.parentNode.removeChild(this)}};l=null}function visitedSetup(m,g,f){var i,done,shv=state.history[0].variables,os="once seen",d=(m.firstChild&&(this.flavour=="insert"?m.firstChild.nextSibling:m.firstChild).tweecode);\nshv[os]=shv[os]||{};if(d&&!shv[os].hasOwnProperty(d)){shv[os][d]=1}else{for(i=shv[os][d];i>0&&!done;i--){done=!revise("revise",m,true)\n}if(shv[os].hasOwnProperty(d)){shv[os][d]+=1}}}[{name:"insert",flavour:"insert",trigger:"link",setup:linkSetup},{name:"timedinsert",flavour:"insert",trigger:"time",setup:timeSetup},{name:"insertion",flavour:"insert",trigger:"revisemacro",setup:revisionSetup},{name:"later",flavour:"insert",trigger:"visited",setup:visitedSetup},{name:"keyinsert",flavour:"insert",trigger:"key",setup:keySetup},{name:"replace",flavour:"replace",trigger:"link",setup:linkSetup},{name:"timedreplace",flavour:"replace",trigger:"time",setup:timeSetup},{name:"mousereplace",flavour:"replace",trigger:"mouse",setup:mouseSetup},{name:"hoverreplace",flavour:"replace",trigger:"hover",setup:hoverSetup},{name:"revision",flavour:"replace",trigger:"revisemacro",setup:revisionSetup},{name:"keyreplace",flavour:"replace",trigger:"key",setup:keySetup},{name:"timedremove",flavour:"remove",trigger:"time",setup:timeSetup},{name:"mouseremove",flavour:"remove",trigger:"mouse",setup:mouseSetup},{name:"hoverremove",flavour:"remove",trigger:"hover",setup:hoverSetup},{name:"removal",flavour:"remove",trigger:"revisemacro",setup:revisionSetup},{name:"once",flavour:"remove",trigger:"visited",setup:visitedSetup},{name:"keyremove",flavour:"remove",trigger:"key",setup:keySetup},{name:"continue",flavour:"continue",trigger:"link",setup:linkSetup},{name:"timedcontinue",flavour:"continue",trigger:"time",setup:timeSetup},{name:"mousecontinue",flavour:"continue",trigger:"mouse",setup:mouseSetup},{name:"keycontinue",flavour:"continue",trigger:"key",setup:keySetup},{name:"cycle",flavour:"cycle",trigger:"revisemacro",setup:revisionSetup},{name:"mousecycle",flavour:"cycle",trigger:"mouse",setup:mouseSetup},{name:"timedcycle",flavour:"cycle",trigger:"time",setup:timeSetup},{name:"keycycle",flavour:"replace",trigger:"key",setup:keySetup}].forEach(function(e){e.handler=revisionSpanHandler;\ne.shorthand=(["link","mouse","hover"].indexOf(e.trigger)>-1);macros[e.name]=e;macros["end"+e.name]=nullobj;\nbegintags.push(e.name);endtags.push("end"+e.name)});function insideDepartingSpan(elem){var r=elem.parentNode;\nwhile(!r.classList.contains("passage")){if(r.classList.contains("revision-span-out")){return true}r=r.parentNode\n}}function reviseAll(rt,rname){var rall=document.querySelectorAll(".passage [data-flavour]."+rname),ret=false;\nfor(var i=0;i<rall.length;i++){if(!insideDepartingSpan(rall[i])){ret=revise(rt,rall[i])||ret}}return ret\n}function revise(rt,r,notrans){var ind2,curr,next,ind=-1,rev=(rt=="revert"),rnd=(rt.indexOf("random")>-1),fl=r.getAttribute("data-flavour"),rc=r.childNodes,cyc=(fl=="cycle"),rcl=rc.length-1;\nfunction doToGainerSpans(n,fn){for(var k=n-1;k>=0;k--){if(rc[k+1].classList.contains("gains")){fn(rc[k],notrans)\n}else{break}}}for(var k=0;k<=rcl;k++){if(rc[k].getAttribute("data-enabled")=="true"){ind=k}}if(rev){ind-=1\n}curr=(ind>=0?rc[ind]:(cyc?rc[rcl]:null));ind2=ind;if(rnd){ind2=(ind+(Math.floor(Math.random()*rcl)))%rcl\n}next=((ind2<rcl)?rc[ind2+1]:(cyc?rc[0]:null));var docurr=(rev?showVer:hideVer);var donext=(rev?hideVer:showVer);\nvar currfn=function(){if(!(next&&next.classList.contains("gains"))||rnd){docurr(curr,notrans);doToGainerSpans(ind,docurr,notrans)\n}};var nextfn=function(){donext(next,notrans);if(rnd){doToGainerSpans(ind2+1,donext,notrans)}};if(!rev){currfn();\nnextfn()}else{nextfn();currfn()}return(cyc?true:(rev?(ind>0):(ind2<rcl-1)))}macros.revert=macros.revise=macros.randomise=macros.randomize={handler:function(a,b,c){var l,rev,rname;\nfunction disableLink(l){l.style.display="none"}function enableLink(l){l.style.display="inline"}function updateLink(l){if(l.className.indexOf("random")>-1){enableLink(l);\nreturn}var rall=document.querySelectorAll(".passage [data-flavour]."+rname),cannext,canprev,i,ind,r,fl;\nfor(i=0;i<rall.length;i++){r=rall[i],fl=r.getAttribute("data-flavour");if(insideDepartingSpan(r)){continue\n}if(fl=="cycle"){cannext=canprev=true}else{if(r.firstChild.getAttribute("data-enabled")==!1+""){canprev=true\n}if(r.lastChild.getAttribute("data-enabled")==!1+""){cannext=true}}}var can=(l.classList.contains("revert")?canprev:cannext);\n(can?enableLink:disableLink)(l)}function toggleText(w){w.classList.toggle(rl+"Enabled");w.classList.toggle(rl+"Disabled");\nw.style.display=((w.style.display=="none")?"inline":"none")}var rl="reviseLink";if(c.length<2){throwError(a,b+" macro needs 2 parameters");\nreturn}rname=c.shift().replace(" ","_");l=Wikifier.createInternalLink(a,null);l.className="internalLink "+rl+" "+rl+"_"+rname+" "+b;\nvar v="";var end=false;var out=false;if(c.length>1&&c[0][0]=="$"){v=c[0].slice(1);c.shift()}switch(c[c.length-1]){case"end":end=true;\nc.pop();break;case"out":out=true;c.pop();break}var h=state.history[0].variables;for(var i=0;i<c.length;\ni++){var on=(i==Math.max(c.indexOf(h[v]),0));var d=insertElement(null,"span",null,rl+((on)?"En":"Dis")+"abled");\nif(on){h[v]=c[i];l.setAttribute("data-cycle",i)}else{d.style.display="none"}insertText(d,c[i]);l.appendChild(d)\n}l.onclick=function(){reviseAll(b,rname);var t=this.childNodes,u=this.getAttribute("data-cycle")-0,m=t.length,n,lall,i;\nif((end||out)&&u>=m-(end?2:1)){if(end){n=this.removeChild(t[u+1]||t[u]);n.className=rl+"End";n.style.display="inline";\nthis.parentNode.replaceChild(n,this)}else{this.parentNode.removeChild(this);return}}else{toggleText(t[u]);\nu=(u+1)%m;if(v){h[v]=c[u]}toggleText(t[u]);this.setAttribute("data-cycle",u)}lall=document.getElementsByClassName(rl+"_"+rname);\nfor(i=0;i<lall.length;i++){updateLink(lall[i])}};disableLink(l);setTimeout((function(l){return function(){updateLink(l)\n}}(l)),1);l=null}};macros.mouserevise=macros.hoverrevise={handler:function(a,b,c,d){var endtags=["end"+b],evt=(window.onmouseenter===null?"onmouseenter":"onmouseover"),t=tagcontents(d,[b],endtags,endtags,d.source.indexOf(">>",d.matchStart)+2);\nif(t){var rname=c[0].replace(" ","_"),h=insertElement(a,"span",null,"hoverrevise hoverrevise_"+rname),f=function(){var done=!reviseAll("revise",rname);\nif(b!="hoverrevise"&&done){this[evt]=null}};new Wikifier(h,t[0]);if(b=="hoverrevise"){h.onmouseover=f;\nh.onmouseout=function(){reviseAll("revert",rname)}}else{h[evt]=f}h=null}}};macros.instantrevise={handler:function(a,b,c,d){reviseAll("revise",c[0].replace(" ","_"))\n}};macros.endmouserevise=nullobj;macros.endhoverrevise=nullobj}());