Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
Loading…
<<switch random(1, 3)>>
<<case 1>>You are in a corridor that twists and turns, lined with fake doors and stairs that lead nowhere. But only statues in their niches are watching.
<<case 2>>You are in a passage with low ceiling that presses down on you, dimming the light and amplifying echoes. But it's only your steps ringing.
<<case 3>>You are in a hall of wood and brick, crooked columns strewn about at random, as if to better hide creatures of the dark. But nothing stirs.
<</switch>>
* [[Drink a potion]]
* [[Proceed cautiously]]
* [[Just move on already]]You rummage through your bag for something that can give you a boost.
<<include "Choose potion">>
<<if $potion_count > 0>>
@@text-align:center;
[[Drink -> Drink a potion!]] / [[Think again -> Corridor]]
@@
<<else>>
Unfortunately, you come up empty-handed.
@@text-align:center;
[[Try something else -> Corridor]]
@@
<</if>><<set $player.inventory.potions[$chosen_potion] -= 1>>You uncork the potion of $chosen_potion and gulp it down. Within moments, its power spreads through your body, burning.
<<if buff_attribute($player, $chosen_potion) > 3>>
<<set $player.wounds += random(1, 4, +1)>>In fact, so soon after the last one it burns badly. Power comes at a cost.
<</if>>
@@text-align:center;
<<if $player.wounds >= $player.stamina * $player.size>>
[[You are badly hurt]]
<<else>>
[[Go on now -> Corridor]]
<</if>>
@@Best not to dwell for too long in a place like this. Still better than rushing headlong into whatever dangers may lie ahead. You advance step by step, watching your surroundings.<<set $player.energy -= 7>>
@@text-align:center;
<<if $story_progress >= 100>>
<<link [[Moments later... -> Portal]]>><<set $story_progress -= 100>><</link>>
<<elseif $player.energy > 0>>
<<switch random(1, 3)>>
<<case 1>>[[Moments later... -> Challenge!]]
<<case 2>>[[Moments later... -> Sideroom]]
<<case 3>><<link [[Moments later... -> Corridor]]>><<set $story_progress += roll_dice(1, 4, +1)>><</link>>
<</switch>>
<<else>>
<<link [[Moments later... -> Encounter!]]>><<run refresh_energy($player)>><</link>>
<</if>>
@@Best not to dwell for too long in a place like this. Who knows what might lurk in shadowy corners. You stride forth, towards your destination. Better the danger that lies ahead of you.<<set $player.energy -= 5>>
@@text-align:center;
<<if $story_progress >= 100>>
<<link [[Moments later... -> Portal]]>><<set $story_progress -= 100>><</link>>
<<elseif $player.energy > 0>>
<<switch random(1, 3)>>
<<case 1>><<link [[Moments later... -> Corridor]]>><<set $story_progress += roll_dice(1, 4, +1)>><</link>>
<<default>>[[Moments later... -> Challenge!]]
<</switch>>
<<else>>
<<link [[Moments later... -> Encounter!]]>><<run refresh_energy($player)>><</link>>
<</if>>
@@A discreet doorway in the shadows leads to a room that hasn't seen use in a while. The walls are bare; the floor, cold. An empty coffer is rotting away opposite from a rusty candle holder.
<<switch random(1, 3)>>
<<case 1>>A throrough search fails to turn up anything useful.
@@text-align:center;
[[Continue on your way -> Corridor]]
@@
<<default>>On closer inspection, there is a secret passage in the far corner, going off who knows where.
@@text-align:center;
[[Brave the passage -> Secret passage]]
[[Leave it alone -> Corridor]]
@@
<</switch>><<switch random(1, 3)>>
<<case 1>>The secret passage meanders all over the place, turning and twisting. Somehow, you get the feeling it leads closer to your destination.
@@text-align:center;
<<set $story_progress += roll_dice(1, 6, +4)>>[[Move on -> Corridor]]
@@
<<case 2>>The secret passage meanders all over the place, turning and twisting. You get the impression it leads to a whole other part of the keep.
@@text-align:center;
[[Move on -> Search the place]]
@@
<<case 3>>The secret passage meanders all over the place, turning and twisting. It's enough to make one paranoid about running into something bad.
@@text-align:center;
[[In fact... -> Encounter!]]
@@
<</switch>><<switch random(1, 6)>>
<<case 1>><<include "Portcullis">>
<<case 2>><<include "Icicle patch">>
<<case 3>><<include "Mud bath">>
<<case 4>><<include "Poison cloud">>
<<case 5>><<include "Trapped passage">>
<<case 6>><<include "Dead end">>
<</switch>>Here the way forward narrows into a small doorway, itself barred by a portcullis of wood and iron. There's no obvious way to open it on either side. Brawn alone can prevail here... or is there some other, hidden way?
(Roll muscle against a target of 50 to pass unhurt, or take 1d4+1 damage.)
* [[Lift the portcullis]]
* [[Magic your way through -> Hex portcullis?]]
* [[No way, go back]]You brace yourself and strain against the bars. The gate begins to lift...
<<set _you_roll to roll_challenge($player, "muscle")>>(You roll _you_roll against the target of 50.)
<<if _you_roll >= 50>>
<<set $story_progress += roll_dice(2, 6, +3)>>All of a sudden there's enough room for you to pass underneath. It crashes back down with a resounding clang, but by then you're clear through.
<<else>>
<<set $player.wounds += roll_dice(1, 4, +1)>><<set $player.blessings += 1>><<set $player.experience += 250>>Sharp pains courses through your limbs, and you drop it with a resounding clang. No way you can try again right now. You'll know what to do next time. For now...
<</if>>
<<include "Challenge completed">>With the see-through gate in front of you, taunting, you wonder what sort of spell might be able to get you past it.
<<include "Choose spell">>
<<if $spell_count > 0>>
@@text-align:center;
[[Cast spell -> Hex portcullis!]] / [[Think again -> Portcullis]]
@@
<<else>>
Unfortunately, you draw a blank.
@@text-align:center;
[[Try something else -> Portcullis]]
@@
<</if>><<set $player.spellbook[$chosen_spell].charges -= 1>>\
<<switch $chosen_spell>>
<<case "Undergrowth">>Strong vines sprout from the ground, pushing aside stones, grasping at the bars... and lifting them off the ground. All of a sudden there's enough room for you to pass underneath. You go ahead while the spell holds.<<set $story_progress += roll_dice(2, 6, +3)>><<set $player.experience += 50>>
@@text-align:center;
[[Move on -> Respite]]
@@
<<case "Flamestrike">>A tall flame bursts from the ground in front of you, then surges forward as if carried by a strong wind. It passes straight through the gate, leaving scattered licks of flame on the bars, but the hard wood fails to ignite.
@@text-align:center;
[[Think again -> Portcullis]]
@@
<<default>>You unleash your magic, but it doesn't seem to make much of a difference. It will take more than that to pass.
@@text-align:center;
[[Think again -> Portcullis]]
@@
<</switch>>The air is colder here all of a sudden. There's snow on the floor, and frost on the walls. Countless icicles dangle from the ceiling, clinking with every step you take. To dodge the falling daggers as you run will be a challenge.
(Roll agility against a target of 40 to pass unhurt, or take 1d6+4 damage.)
* [[Brave the icicles]]
* [[Magic your way through -> Hex icicles?]]
* [[No way, go back]]You take a deep breath and dart forward, weaving a path among the translucent daggers. It feels like a long way to the end of the gauntlet, but then...
<<set _you_roll to roll_challenge($player, "agility")>>(You roll _you_roll against the target of 40.)
<<if _you_roll >= 40>>
<<set $story_progress += roll_dice(2, 6, +3)>>You made it through, and unscathed at that. A moment's rest, then onward to your goal!
<<else>>
<<set $player.wounds += roll_dice(1, 6, +4)>><<set $player.blessings += 1>><<set $player.experience += 250>>As you take hit after hit, relief suddenly seems too far away. You turn around, bleeding and battered. You'll know what to do next time. For now...
<</if>>
<<include "Challenge completed">>With the daggers of ice in front of you, taunting, you wonder what sort of spell might be able to get you past them.
<<include "Choose spell">>
<<if $spell_count > 0>>
@@text-align:center;
[[Cast spell -> Hex icicles!]] / [[Think again -> Icicle patch]]
@@
<<else>>
Unfortunately, you draw a blank.
@@text-align:center;
[[Try something else -> Icicle patch]]
@@
<</if>><<set $player.spellbook[$chosen_spell].charges -= 1>>\
<<switch $chosen_spell>>
<<case "Flamestrike">>A tall flame bursts from the ground in front of you, then surges forward as if carried by a strong wind. The rising heat causes most icicles to shake loose, littering the ground. They crinkle under your feet as you walk past.<<set $story_progress += roll_dice(2, 6, +3)>><<set $player.experience += 50>>
<<include "Challenge completed">>
<<case "Windstorm">>At first nothing seems to happen, then a strong wind picks up, and soon grows into a howling gale. Many icicles are shaken loose; enough remain to bruise you on the way through.<<set $story_progress += roll_dice(2, 6, +3)>><<set $player.wounds += roll_dice(1, 4, +1)>><<set $player.experience += 100>>
<<include "Challenge completed">>
<<case "Levitation">>As the spell takes hold, you lift into the air and float away. The air current from your passage still knocks down enough icicles to bruise you.<<set $story_progress += roll_dice(2, 6, +3)>><<set $player.wounds += roll_dice(1, 4, +1)>><<set $player.experience += 100>>
<<include "Challenge completed">>
<<default>>You unleash your magic, but it doesn't seem to make much of a difference. It will take more than that to pass.
@@text-align:center;
[[Think again -> Icicle patch]]
@@
<</switch>>Here the corridor widens into a sort of pool, only it's filled with a stinky mud colored green-brown. Probing with a convenient stick reveals it's about waist-deep, at least near the edge. It will take resilience to cross over.
(Roll stamina against a target of 50 to pass unhurt, or take 1d4+1 damage.)
* [[Brave the mud bath]]
* [[Magic your way through -> Hex mud bath?]]
* [[No way, go back]]You wade into the pool. Strangely enough, the mud does't seem to stick... much.
<<set _you_roll to roll_challenge($player, "stamina")>>(You roll _you_roll against the target of 50.)
<<if _you_roll >= 50>>
<<set $story_progress += roll_dice(2, 6, +3)>>It feels like a never-ending slog, but at long last the other side is right in front of you. It brings the goal that much closer. Well, after some rest.
<<else>>
<<set $player.wounds += roll_dice(1, 4, +1)>><<set $player.blessings += 1>><<set $player.experience += 250>>You're not close to the halfway point, and every muscle aches. Better to return before collapsing in //that//. You'll know what to do next time. For now...
<</if>>
<<include "Challenge completed">>With the wide-open space in front of you, taunting, you wonder what sort of spell might be able to get you past it.
<<include "Choose spell">>
<<if $spell_count > 0>>
@@text-align:center;
[[Cast spell -> Hex mud bath!]] / [[Think again -> Mud bath]]
@@
<<else>>
Unfortunately, you draw a blank.
@@text-align:center;
[[Try something else -> Mud bath]]
@@
<</if>><<set $player.spellbook[$chosen_spell].charges -= 1>>\
<<switch $chosen_spell>>
<<case "Levitation">>As the spell takes hold, you lift into the air and float away over the stinky morass. The fumes rising from it are hard to endure, but you make it.<<set $story_progress += roll_dice(2, 6, +3)>><<set $player.experience += 50>>
<<include "Challenge completed">>
<<case "Snowdrift">>As a cold wind picks up all around you, blowing snow over the pool, the mud covers with a thin sheet of ice. It holds your weight for over half the distance, but then you fall in and have to wade the rest of the way. It hurts.<<set $story_progress += roll_dice(2, 6, +3)>><<set $player.wounds += roll_dice(1, 4, +1)>><<set $player.experience += 100>>
<<include "Challenge completed">>
<<case "Undergrowth">>At first nothing seems to happen, but in the end a few timid vines poke their tips above the mud. They're nowhere near enough to support your weight.
@@text-align:center;
[[Think again -> Mud bath]]
@@
<<default>>You unleash your magic, but it doesn't seem to make much of a difference. It will take more than that to pass.
@@text-align:center;
[[Think again -> Mud bath]]
@@
<</switch>>From wall to wall and from floor to ceiling, the corridor ahead of you is filled with fumes colored a sickly yellow. Best not to breathe it, whatever it is. But can you get to the other side quickly enough?
(Roll speed against a target of 40 to pass unhurt, or take 1d6+4 damage.)
* [[Brave the poison cloud]]
* [[Magic your way through -> Hex poison cloud?]]
* [[No way, go back]]You hold your breath and start running. Soon yellow clouds are all you can see.
<<set _you_roll to roll_challenge($player, "speed")>>(You roll _you_roll against the target of 40.)
<<if _you_roll >= 40>>
<<set $story_progress += roll_dice(2, 6, +3)>>It feels like a never-ending nightmare, but at long last you hit clean air. It brings the goal that much closer. Well, after your lungs stop burning.
<<else>>
<<set $player.wounds += roll_dice(1, 6, +4)>><<set $player.blessings += 1>><<set $player.experience += 250>>You're not close to the halfway point, and your lungs are burning. Better to return before collapsing in //that//. You'll know what to do next time. For now...
<</if>>
<<include "Challenge completed">>With the swirling clouds in front of you, taunting, you wonder what sort of spell might be able to get you past them.
<<include "Choose spell">>
<<if $spell_count > 0>>
@@text-align:center;
[[Cast spell -> Hex poison cloud!]] / [[Think again -> Poison cloud]]
@@
<<else>>
Unfortunately, you draw a blank.
@@text-align:center;
[[Try something else -> Poison cloud]]
@@
<</if>><<set $player.spellbook[$chosen_spell].charges -= 1>>\
<<switch $chosen_spell>>
<<case "Windstorm">>At first nothing seems to happen, then a strong wind picks up, and soon grows into a howling gale. Soon not a trace remains of the yellow clouds.<<set $story_progress += roll_dice(2, 6, +3)>><<set $player.experience += 50>>
<<include "Challenge completed">>
<<case "Flamestrike">>A tall flame bursts from the ground in front of you, then surges forward as if carried by a strong wind. Unfortunately the yellow clouds fail to burn.
@@text-align:center;
[[Think again -> Poison cloud]]
@@
<<default>>You unleash your magic, but it doesn't seem to make much of a difference. It will take more than that to pass.
@@text-align:center;
[[Think again -> Poison cloud]]
@@
<</switch>>The floor going forward is made of multicolored tiles that form an elusive pattern. Many of them seem loose. At either hand, little holes line the walls, countless darts waiting to spring if you take a single wrong step. This one will take keep eyes and concentration to get through.
(Roll focus against a target of 40 to pass unhurt, or take 1d6+4 damage.)
* [[Brave the trapped passage]]
* [[Magic your way through -> Hex traps?]]
* [[No way, go back]]You take a deep breath and dart forward, weaving a path between the trapped floor tiles. It feels like a long way to the end of the gauntlet, but then...
<<set _you_roll to roll_challenge($player, "focus")>>(You roll _you_roll against the target of 40.)
<<if _you_roll >= 40>>
<<set $story_progress += roll_dice(2, 6, +3)>>You made it through, and unscathed at that. A moment's rest, then onward to your goal!
<<else>>
<<set $player.wounds += roll_dice(1, 6, +4)>><<set $player.blessings += 1>><<set $player.experience += 250>>It's a step and a miss. You dodge a dart or two, but others find their mark. Turning around before their sting kills, you'll know what to do next time. For now...
<</if>>
<<include "Challenge completed">>With the mechanical gauntlet in front of you, taunting, you wonder what sort of spell might be able to get you past it.
<<include "Choose spell">>
<<if $spell_count > 0>>
@@text-align:center;
[[Cast spell -> Hex traps!]] / [[Think again -> Trapped passage]]
@@
<<else>>
Unfortunately, you draw a blank.
@@text-align:center;
[[Try something else -> Trapped passage]]
@@
<</if>><<switch $chosen_spell>>
<<case "Levitation">>As the spell takes hold, you lift into the air and float away over the killer floor. It seems to go on for a long time, but now it carries no danger.<<set $story_progress += roll_dice(2, 6, +3)>><<set $player.experience += 50>>
<<include "Challenge completed">>
<<case "Snowdrift">>As a cold wind picks up all around you, blowing snow over the pool, you can hear the deadly mechanisms seizing up. Only a few keep working, as you discover painfully on your way through.<<set $story_progress += roll_dice(2, 6, +3)>><<set $player.wounds += roll_dice(1, 4, +1)>><<set $player.experience += 100>>
<<include "Challenge completed">>
<<case "Undergrowth">>Strong vines sprout from the ground and grow rapidly, pushing aside floor tiles left and right. A few traps are sprung, others jammed, but most remain functional. This is not the way.
@@text-align:center;
[[Think again -> Trapped passage]]
@@
<<default>>You unleash your magic, but it doesn't seem to make much of a difference. It will take more than that to pass.
@@text-align:center;
[[Think again -> Trapped passage]]
@@
<</switch>>The corridor ends abruptly in a blank wall. It lacks even the carvings that decorate other areas. Otherwise there's no sign of new construction work.
<<switch random(1, 3)>>
<<case 1>>A throrough search fails to turn up anything useful.
@@text-align:center;
[[Head back -> Corridor]]
@@
<<default>>On closer inspection, there is a secret passage right in the middle, going off who knows where.
@@text-align:center;
[[Brave the passage -> Secret passage]]
[[Leave it alone -> Corridor]]
@@
<</switch>><<nobr>>
<<set $story_progress -= roll_dice(2, 6, +3)>>
That looks much too dangerous. Best to retrace your steps, even at the cost of losing progress. There must be some other way forward. A safer one.
<</nobr>>
@@text-align:center;
<<if $story_progress > 0>>
[[Retreat, for now->Corridor]]
<<else>>
[[Retreat, for now->A doorway too far]]
<</if>>
@@<<switch random(1, 2)>>
<<case 1>><<include "Monster lair">>
<<case 2>><<include "Kitchen">>
<</switch>>A previous adventurer's equipment is scattered all over the place, but there's no trace of its owner apart from a blood trail leading off somewhere.
<<switch random(1, 3)>>
<<case 1>>On closer inspection, the blood trail leads straight to a solid wall, and stops there.
<<case 2>>On closer inspection, the blood trail leads back in the direction where you came from.
<<case 3>>On closer inspection, the blood trail leads to the edge of a bottomless pit.
<</switch>>
* [[Rummage through the clutter]]
* [[Just move on -> Corridor]]This feels wrong, but then again the previous owner doesn't need their stuff anymore by the looks of it, while in your hands it could help save the land.
<<switch random(1, 6)>>
<<case 1>>Unfortunately, none of it seems to be usable anymore. You leave empty-handed.
<<case 2 3>>With a little patience, you manage to find a potion of <<= give_random_potion($player)>>. Should come in handy.
<<case 4 5>>With a little patience, you manage to find a scroll of <<= give_random_spell($player)>>. Should come in handy.
<<case 6>>With a little patience, you manage to find a potion of <<= give_random_potion($player)>> and a scroll of <<= give_random_spell($player)>>. Both should come in handy.
<</switch>>
@@text-align:center;
[[Go on now -> Corridor]]
@@Pots and pans hang on the brick wall above a stove made to cook for many. Shelves line the other walls, and a long table takes up the middle of the room. The table is rough, wobbly and stained, but otherwise looks clean.
* [[Raid the pantry]]
* [[Just move on -> Corridor]]Well, the place looks deserted. Nobody's going to miss a loaf of bread, right?
<<switch random(1, 3)>>
<<case 1>>Whoa! What was that? You didn't have time to see it well in the shadows, but it looked ready to make a meal out of you instead. Better leave it alone.
<<default>>Most of the food is spoiled by now, if your nose is any indication, but you still scrounge up enough for a meal. It's better than nothing.<<set $player.inventory.rations += 1>>
<</switch>>
@@text-align:center;
[[Go on now -> Corridor]]
@@<<switch random(1, 2)>>
<<case 1>><<include "Drinking fountain">>
<<case 2>><<include "Waiting room">>
<</switch>>Halfway up the richly carved wall, water trickles out of a spigot, filling its basin with agonizing slowness. It's only large enough for two fistfuls of liquid, the excess leaving through an overflow drain.
* [[Drink the water]]
* [[Wash your wounds]]
* [[Leave it alone]]<<nobr>>
<<set $player.wounds += roll_dice(1, 4, +1)>>
<<for _spell range $player.spellbook>>
<<if _spell.charges <= 0>>
<<set _spell.charges = 1>>
<</if>>
<</for>>
The water is so cold it hurts. It hurts badly. Was it poisoned? On the other hand you suddenly remember with clarity all your spells. That will come in handy. But for now...
<</nobr>>
@@text-align:center;
<<if $player.wounds >= $player.stamina * $player.size>>
[[You are badly hurt]]
<<else>>
[[Move on -> Corridor]]
<</if>>
@@<<if $player.wounds > 0>>
<<run heal_wounds($player, roll_dice(1, 4, +1))>>As the clear water passes over bruises and cuts, they appear to get smaller under your eyes. You feel better.
<<else>>
<<set $player.blessings += 1>>As the clear water passes over unblemished skin, you feel your arms lighter. Quicker. Sharp. Truly a blessing.
<</if>>
<<set $player.energy -= 5>>On the other hand, it feels as if the place is darker all of a sudden, and sounds get muffled. Monsters could be just behind the corner.
@@text-align:center;
<<if $player.energy > 0>>
[[Move on -> Corridor]]
<<else>>
<<link [[In fact... -> Encounter!]]>><<run refresh_energy($player)>><</link>>
<</if>>
@@Who knows what kind of water flows through a place like this. Best not to touch it. You march on towards your goal instead.
@@text-align:center;
[[Move on -> Corridor]]
@@A recessed portion of the corridor shelters a stone bench and two small braziers. Iron hooks overhead might have held a curtain or tapestry once. Now only abstract carvings cover the wall.
* [[Eat and rest]]
* [[Refresh your spells]]
* [[Just press onward]]<<if $player.inventory.rations > 0>>
<<set $player.inventory.rations -= 1>><<run heal_wounds($player, roll_dice(1, 6, +4))>>You unpack some of the food from your bag and eat up, forgetting about danger for a few moments. It leaves you feeling much better.
<<else>>
<<run heal_wounds($player, roll_dice(1, 4, +1))>>You rummage in your bag for something to eat, but in vain. Still, a little rest is better than nothing.
<</if>>
@@text-align:center;
[[Go on now -> Corridor]]
@@<<set _refreshed = refresh_spells($player)>>You sit back and try to think which of the spells you know could use a refresher.
<<if _refreshed.length > 0>>
<<for _spell range _refreshed>>\
<<if _spell.success>>\
You recite the words for _spell.name to yourself. They burn bright in your thoughts.
<<else>>\
You try to remember how to cast _spell.name, but can't seem to manage right now.
<</if>>\
<</for>>\
@@text-align:center;
[[Go on now -> Corridor]]
@@
<<else>>
Unfortunately you can't seem to think of any. At least you wasted no time.
@@text-align:center;
[[Choose again -> Eat and rest]]
@@
<</if>>Best not to dawdle in a place like this. Danger could catch up any moment. You march on towards your goal instead.
@@text-align:center;
[[Move on -> Corridor]]
@@@@text-align:center;
<<if $player.wounds >= $player.stamina * $player.size>>
[[You are badly hurt]]
<<elseif $player.experience >= 1000>>
<<link [[You feel more capable]]>><<set $continue_to to "Respite">><</link>>
<<else>>
[[Move on -> Respite]]
<</if>>
@@At the very top of the keep, ample stairs lead up to a round pool with linings of gold and marble. Inside it, a swirling vortex of light blurs glimpses of an unearthly place. It all seems dormant in the light coming in from windows under the ceiling only to bounce off the central dome.
Across the room, a globe of many colors sits atop of a complicated pedestal with pistons encased in its base, that move tirelessly. The globe sparks and spins, sending waves of energy around the edge of the pool such that they appear to drive the vortex before gradually merging into it. Oval stones the size of a fist orbit the device protectively, fast enough to break bones if you tried to reach in.
@@text-align:center;
[[There must be a way to get through -> Break the device]]
@@Well, you can't make an omelette without breaking some eggs, and that globe looks to be the most breakable thing here. The only question is how.
* [[Just smash it]]
* [[Use your magic]]
* [[Examine the room -> Portal]]You watch the orbiting stones carefully, bracing yourself for a well-timed swing that would reach past them at your target.
<<set _you_roll to roll_attack($player, all_monsters["shadows"])>>(You roll _you_roll against a target of 16.)
<<if _you_roll > 16>>
<<set $story_progress += roll_dice(2, 6, +3)>>\
<<if $story_progress >= 50>>
Many defenses now removed, your swing connects. With a deep thumping sound that makes you sick to the stomach, the globe collapses into nothingness, taking with it the tip of your weapon and half the pedestal it's sitting on.
@@text-align:center;
[[A moment passes -> Epilogue]]
@@
<<else>>
And... it connects! One of the stones is knocked out of its orbit and flies off to crash in a corner. A few more to go.
@@text-align:center;
[[Try again -> Break the device]]
@@
<</if>>
<<elseif _you_roll == 16>>
Unfortunately you mistime it ever so slightly, and your blow is just barely deflected. You take a step back.
@@text-align:center;
[[Try again -> Break the device]]
@@
<<else>>
<<set $player.blessings += 1>>Unfortunately you misjudge the timing. Not only your blow is deflected, but one of the stones hits you on the rebound.<<set $player.wounds += roll_dice(1, 4, +1)>>
@@text-align:center;
<<if $player.wounds >= $player.stamina * $player.size>>
[[You are badly hurt]]
<<else>>
[[Try again -> Break the device]]
<</if>>
@@
<</if>>You watch the orbiting stones carefully, wondering what magic could possibly reach past them and strike your target.
<<include "Choose spell">>
<<if $spell_count > 0>>
@@text-align:center;
[[Cast spell -> Hex the device]] / [[Think again -> Break the device]]
@@
<<else>>
Unfortunately, you draw a blank.
@@text-align:center;
[[Try something else -> Break the device]]
@@
<</if>><<set $player.spellbook[$chosen_spell].charges -= 1>>\
<<switch $chosen_spell>>
<<case "Windstorm">>At first nothing seems to happen, then a strong wind picks up, and soon grows into a howling gale. One of the orbiting stones puts up a shimmering barrier, and it's blown across the room as a result. It doesn't come back.
<<case "Snowdrift">>As a cold wind picks up all around you, blowing snow at the orbiting stones, those caught in its path lose speed, weighted down with frost. One falls to the ground and rolls out of the way into a corner. The rest endure somehow.
<<case "Flamestrike">>A tall flame bursts from the ground in front of you, then surges forward as if carried by a strong wind. One stone, caught right in the middle, begins to melt, turning into a shapeless lump that can't seem to stay aloft anymore.
<<case "Undergrowth">>Strong vines sprout from the floor, pushing aside marble tiles... reaching for the orbiting stones. One of the latter gets caught in the green net and dragged down, despite the others fighting back with crushing blows.
<<case "Levitation">>At first nothing seems to happen, then you lift into the air and float straight across the pool at the sphere. The orbiting stones angle upwards clumsily; you easily strike one out of the air before having to back down.
<</switch>>
<<set $story_progress += roll_dice(2, 6, +3)>>\
<<if $story_progress >= 50>>
Many defenses now removed, your hit the sphere. With a deep thumping sound that makes you sick to the stomach, the globe collapses into nothingness, taking with it the tip of your weapon and half the pedestal it's sitting on.
@@text-align:center;
[[A moment passes -> Epilogue]]
@@
<<else>>
@@text-align:center;
[[Redouble your efforts -> Break the device]]
@@
<</if>>As you watch, the vortex in the pool slows down, then fades away, leaving only clear water in its place. It still seems to go very deep indeed.
That's not all, either. You can see more clearly now. Hear more clearly. It's all still, and quiet. Too much so.
By the time you find the strength to head back outside, the keep has stopped shifting, reduced to a sad old pile of masonry. Maybe something can be done about that, too. But it's not the kind of problem a hero can fix alone.
@@text-align:center;
''The End''
@@After much bitter fighting, the mad wizard was defeated and banished to distant shores. But the land is not yet at peace. Every night, terrible things ride forth from the wizard's former home, tormenting peasant and noble alike.
Many have entered the keep of the mad wizard to find and seal away the source of evil. The few who returned at all describe an ever-shifting maze of treachery and danger. Still, what else to do than try again. And it's your turn.
@@text-align:center;
[[Go forth, hero -> Character creation]]
@@No Time To Play, 2019a jumbled gamebookFelix Pleşoianu[[Credits]]
[[Help]]
[[License]]@@text-align:center;
''Keep of the Mad Wizard''
A 2019 game by [[No Time To Play -> https://notimetoplay.org/]].
Made with [[Tweego -> http://www.motoslave.net/tweego/]] and [[Sugarcube 2 -> http://www.motoslave.net/sugarcube/2/]].
Font: [[NovaCut -> https://fontlibrary.org/en/font/nova]],
courtesy of the Open Font Library.
<<back "resume play">>
@@//Keep of the Mad Wizard// uses the [[Battles & Balances -> https://notimetoplay.itch.io/battles-and-balances]] rules. You don't have to know them, the game will roll dice for you as needed. Some details however may be less obvious:
* Your goal is to gather 100 points of progress and trigger the endgame. Mostly you do that by overcoming monsters and obstacles.
* Exploring uses up energy. When you're tired, wandering monsters catch up with you, and then you have a fight on your hands.
* You can run away from a fight (or an obstacle), but you're going to lose progress.
* Lose enough progress and you'll end up running out of the keep altogether, ending the game.
* The one other way to lose is to end up with more wounds than health.
Hope this helps. Have fun!
@@text-align:center;
<<back "resume play">>
@@//Keep of the Mad Wizard// is free and open source software under the [[Artistic License 2.0->https://opensource.org/licenses/Artistic-2.0]]; a copy is included in the source package (where available). Unless you plan to modify or distribute the game, don't worry about it.
The NovaCut font is provided under the SIL Open Font License. You only need to mind that if you extract the font file from the game for other uses.
@@text-align:center;
<<back "resume play">>
@@As the dark fortress looms ahead of you, you reflect on life until this point.
<label>What's your name?
<<textbox "$player_name" "Hero" autofocus>></label>
What do you bring to this battle?
<label><<radiobutton "$player_class" "fighter" checked>> My steel and determination!</label>
<label><<radiobutton "$player_class" "rogue">> Quick wits and nimble limbs!</label>
<label><<radiobutton "$player_class" "mage">> The light of knowledge!
</label>
@@text-align:center;
[[Go on->Backstory]]
@@<<set $player = create_character($player_name, 8)>>\
''<<=$player_name>> the <<=$player_class>>''
<<switch $player_class>>
<<case "fighter">><<run equip_character($player, "fighter")>>\
When evil threatens the well-being of honest, hard working people, you are there to set things right. Brawn and blade are the tools of your trade, that you wield bravely, yet fairly. But will they be enough where better people have failed? Only one way to find out.
(Muscle +1, Stamina +1)<<set $player.muscle += 1>><<set $player.stamina += 1>>
<<case "rogue">><<run equip_character($player, "rogue")>>\
Sometimes the fastest path to the core of things is all the way around. You were never one to follow the rules anyway. What looks right all too often depends on where you stand. Well, except for that place. That looks wrong no matter what. So you'll help... your way.
(Agility +1, Speed +1)<<set $player.agility += 1>><<set $player.speed += 1>>
<<case "mage">><<run equip_character($player, "mage")>>\
One can't fight fire with fire, but who else can figure out how magic can turn out so wrong than another master of the art? Your arcane skills have served you well so far. They should help you get to the bottom of this, too. Maybe people will trust you more then.
(Focus +2)<<set $player.focus += 2>>
<</switch>>\
<<set $player.energy = $player.speed * $player.size>>\
@@text-align:center;
[[Yes, that was it->Title page]] / <<back "No, choose again">>
@@@@text-align:center;
!<<=Story.title>>
<<include "StorySubtitle">>
by
''<<include "StoryAuthor">>''
<<link [[Turn the page -> Prologue]]>><<set $story_progress to 0>><</link>>
@@Royal troops are milling about the conquered castle's courtyard, their job mostly to prevent people and animals from wandering into the keep by mistake. It's not in their power to stop the flying nightmares jumping off its rooftop after sunset, so at those times they hide with everyone else.
In broad daylight, the keep seems perpetually covered by clouds, even when no trace of one can be seen overhead. Otherwise there's no sign of life from within. Yet the mad wizard's power lives on.
The broken doors creak a death song as you walk inside. Soon they remain behind. It's just you and the keep now.
@@text-align:center;
[[Begin your journey -> Corridor]]
@@<<if !tags().contains("meta")>>
<div class="header">
<span class="left">Progress <<=$story_progress>></span>
Health <<= $player.stamina * $player.size - $player.wounds>>
<span class="right">Energy <<=$player.energy>></span>
</div>
<</if>><<if !tags().contains("meta")>>
@@text-align:center;Margin-top: 2em;
<<nobr>>
<<button "Stats">><<script>>
Dialog.setup("Charsheet");
Dialog.wiki(Story.get("Charsheet").processText());
Dialog.open();
<</script>><</button>>
<<button "Stuff">><<script>>
Dialog.setup("Inventory");
Dialog.wiki(Story.get("Inventory").processText());
Dialog.open();
<</script>><</button>>
<<button "Spells">><<script>>
Dialog.setup("Spellbook");
Dialog.wiki(Story.get("Spellbook").processText());
Dialog.open();
<</script>><</button>>
<</nobr>>
@@
<</if>>@@text-align:center;
!! $player_name the $player_class
@@\
<<for _attr range all_buffs>>\
* <<= _attr.toUpperFirst()>>: $player[_attr] <<if $player.buffs[_attr] > 0>>(+1)<</if>>
<</for>>\
@@text-align:center;
Size: d$player.size
Wounds: $player.wounds / <<=$player.stamina * $player.size>>
Blessings: $player.blessings Experience: $player.experience
<<button "close">><<run Dialog.close()>><</button>>
@@@@text-align:center;
''You are carrying''
@@
Rations: $player.inventory.rations
<<for _potion, _count range $player.inventory.potions>>\
<<if _count > 0>>\
* Potion of _potion x<<=_count>>
<</if>>\
<</for>>\
Weapon: $player.weapon.name (+$player.weapon.attack / +$player.weapon.damage)
Armor: $player.armor.name (+$player.armor.protection)
@@text-align:center;
<<button "close">><<run Dialog.close()>><</button>>
@@@@text-align:center;
''Spells you have''
@@
<<for _spell, _data range $player.spellbook>>\
* _spell (level _data.level) x<<=_data.charges>>
<</for>>\
@@text-align:center;
<<button "close">><<run Dialog.close()>><</button>>
@@<<set $spell_count to 0>>\
<<for _spell, _data range $player.spellbook>>\
<<if _data.charges > 0>>\
<label><<radiobutton "$chosen_spell" _spell checked>> _spell</label><<set $spell_count += 1>>
<</if>>\
<</for>>\<<set $potion_count to 0>>\
<<for _potion, _turns range $player.inventory.potions>>\
<<if _turns > 0>>\
<label><<radiobutton "$chosen_potion" _potion checked>> _potion</label><<set $potion_count += 1>>
<</if>>\
<</for>>\With all the recent exertions, your abilities have been growing. Upcoming challenges should be that much easier to deal with. But in what area?
<label><<radiobutton "$chosen_ability" "muscle" checked>> Muscle</label>
<label><<radiobutton "$chosen_ability" "stamina">> Stamina</label>
<label><<radiobutton "$chosen_ability" "agility">> Agility</label>
<label><<radiobutton "$chosen_ability" "speed">> Speed</label>
<label><<radiobutton "$chosen_ability" "focus">> Focus</label>
@@text-align:center;
<<link "Go on now" $continue_to>>
<<set $player[$chosen_ability] += 1>>
<<set $player.experience -= 1000>>
<</link>>
@@As you bleed from one wound too many, a loud buzzing fills your ears, and everything goes dark. The fall that follows feels long indeed.
You wake up much later, in what turns out to be a healer's hut. And the keep is still back there, its evil intact. Waiting. Taunting.
One day you'll be given another chance. But maybe after some rest.
@@text-align:center;
''The End?''
@@Bright light shines from somewhere up ahead as you try to put more distance between yourself and that... that... You run towards the opening only to find yourself outside, in the sun, among overgrown vegetation. Behind you, the stone wall of the keep is blank and smooth. You return the long way around, to join the ranks of those who would have another chance, if deemed worthy.
@@text-align:center;
''The End?''
@@<<switch random(1, 5)>>
<<case 1>><<include "Clockwork armor">>
<<case 2>><<include "Giant cockroaches">>
<<case 3>><<include "Carnivorous plants">>
<<case 4>><<include "Living shadows">>
<<case 5>><<include "Mass of tentacles">>
<</switch>>An armored... something is ambling towards you in the grinding of gears, puffs of steam escaping from various joints now and then. It's big. And has whirling blades for hands. You will have to deal with it to continue, one way or another.
(This is a d12 creature armed with a +6/+6 weapon.)
* [[Attack->Attack clockwork armor]]
* [[Cast spell->Hex clockwork armor?]]
* [[Flee]]<<set _you_roll to roll_attack($player, all_monsters["armor"])>>\
<<set _it_rolls to roll_attack(all_monsters["armor"], $player)>>\
(You roll _you_roll against the opponent's _it_rolls.)
<<if _you_roll > _it_rolls>>\
You watch the approaching monster carefully, weighing your options. A well-timed swing finds a weak point in the armor. It sags to the side, with a horrible grinding noise, and you run past without a second thought.<<set $player.experience += 250>><<set $story_progress += roll_dice(2, 6, +3)>>
@@text-align:center;
<<if $player.experience >= 1000>>
<<link [[You feel more capable]]>><<set $continue_to to "Search the place">><</link>>
<<else>>
[[Move on -> Search the place]]
<</if>>
@@
<<elseif _you_roll == _it_rolls>>\
You watch the approaching monster carefully, weighing your options. A well-timed swing connects with that huge breastplate. It rings hollow.
@@text-align:center;
[[You backpedal in a hurry -> Clockwork armor]]
@@
<<else>>\
<<set $player.wounds += roll_damage(all_monsters["armor"], $player, _it_rolls - _you_roll)>>You swing at the monster. Between its whirling blades and jerky motions, it fails to connect. And then it counter-attacks. You barely have time to see it coming before getting hit.<<set $player.blessings += 1>>
@@text-align:center;
<<if $player.wounds >= $player.stamina * $player.size>>
[[You are badly hurt]]
<<else>>
[[You backpedal in a hurry -> Clockwork armor]]
<</if>>
@@
<</if>>\As the mechanical monstrosity approaches, you frantically wonder what sort of magic might be able to stop such a thing.
<<include "Choose spell">>
<<if $spell_count > 0>>
@@text-align:center;
[[Cast spell -> Hex clockwork armor!]] / [[Think again -> Clockwork armor]]
@@
<<else>>
Unfortunately, you draw a blank.
@@text-align:center;
[[Try something else -> Clockwork armor]]
@@
<</if>><<set $player.spellbook[$chosen_spell].charges -= 1>>\
<<switch $chosen_spell>>
<<case "Snowdrift">>As a cold wind picks up all around you, blowing snow at the walking suit of armor, the grinding of gears becomes more erratic, then ceases entirely. You shuffle past the deadly contraption, now frozen solid.<<set $story_progress += roll_dice(2, 6, +3)>><<set $player.experience += 250>>
@@text-align:center;
<<if $player.experience >= 1000>>
<<link [[You feel more capable]]>><<set $continue_to to "Search the place">><</link>>
<<else>>
[[Move on -> Search the place]]
<</if>>
@@
<<case "Undergrowth">>Strong vines sprout from the ground, pushing aside stones... grasping at the armored legs in their relentless march. They barely slow down the malefic machine, but that gives you enough time to get away.<<set $player.experience += 50>>
<<include "Challenge completed">>
<<default>>You unleash your magic, but the walking suit of armor appears unfazed. You dive to safety in the nick of time, taking a glancing blow in the process.<<set $player.wounds += roll_dice(1, 4, +1)>>
@@text-align:center;
<<if $player.wounds >= $player.stamina * $player.size>>
[[You are badly hurt]]
<<else>>
[[Think again -> Clockwork armor]]
<</if>>
@@
<</switch>>A shifting mass skitters down the corridor, shiny brown carapaces glinting. It's made of cockroaches the size of a shoe, climbing over each other to get ahead faster. Now and then, one stops and wriggles feelers in your direction.
(This is a d4 creature armed with +2/+4 mandibles.)
* [[Attack->Attack giant cockroaches]]
* [[Cast spell->Hex giant cockroaches?]]
* [[Flee]]<<set _you_roll to roll_attack($player, all_monsters["roaches"])>>\
<<set _it_rolls to roll_attack(all_monsters["roaches"], $player)>>\
(You roll _you_roll against the opponent's _it_rolls.)
<<if _you_roll > _it_rolls>>\
You launch into a deadly dance, kicking with your boots and swinging your weapon. Insects without number fall to your attacks. Many more remain, but faced with the onslaught, they scatter every which way.<<set $player.experience += 150>><<set $story_progress += roll_dice(2, 6, +3)>>
@@text-align:center;
<<if $player.experience >= 1000>>
<<link [[You feel more capable]]>><<set $continue_to to "Search the place">><</link>>
<<else>>
[[Move on -> Search the place]]
<</if>>
@@
<<elseif _you_roll == _it_rolls>>\
You hop around, stomping the ground with your boots. No luck hitting anything, but the cockroaches are too busy dodging to bite back.
@@text-align:center;
[[You retreat to safety -> Giant cockroaches]]
@@
<<else>>\
<<set $player.wounds += roll_damage(all_monsters["roaches"], $player, _it_rolls - _you_roll)>>You stomp your boots all over the place, but the insects in front of you scuttle out of reach, while others come from behind to bite. It's all you can do not to get swarmed.<<set $player.blessings += 1>>
@@text-align:center;
<<if $player.wounds >= $player.stamina * $player.size>>
[[You are badly hurt]]
<<else>>
[[You retreat to safety -> Giant cockroaches]]
<</if>>
@@
<</if>>\As the insectoid horde approaches, you frantically wonder what sort of magic might be able to stop that many of them.
<<include "Choose spell">>
<<if $spell_count > 0>>
@@text-align:center;
[[Cast spell -> Hex cockroaches!]] / [[Think again -> Giant cockroaches]]
@@
<<else>>
Unfortunately, you draw a blank.
@@text-align:center;
[[Try something else -> Giant cockroaches]]
@@
<</if>><<set $player.spellbook[$chosen_spell].charges -= 1>>\
<<switch $chosen_spell>>
<<case "Levitation">>At first nothing seems to happen, then you lift into the air and float away over the bulbous mass of chitin. A few daring insects lunge at you in passing, and it's all you can do to stay aloft, but you make it to safety.<<set $story_progress += roll_dice(2, 6, +3)>><<set $player.experience += 150>>
@@text-align:center;
<<if $player.experience >= 1000>>
<<link [[You feel more capable]]>><<set $continue_to to "Search the place">><</link>>
<<else>>
[[Move on -> Search the place]]
<</if>>
@@
<<case "Snowdrift">>As a cold wind picks up all around you, blowing snow over the bulbous mass of chitin, the insects' frenzied skittering grows sluggish. They still never stop coming, but that gives you enough time to get away.<<set $player.experience += 50>>
<<include "Challenge completed">>
<<case "Flamestrike">>A tall flame bursts from the ground in front of you, then surges forward as if carried by a strong wind. Surviving insects scatter desperately every which way. You walk onward as lingering fires nibble at your heels.<<set $story_progress += roll_dice(2, 6, +3)>><<set $player.wounds += roll_dice(1, 4, +1)>><<set $player.experience += 100>>
@@text-align:center;
<<if $player.wounds >= $player.stamina * $player.size>>
[[You are badly hurt]]
<<elseif $player.experience >= 1000>>
<<link [[You feel more capable]]>><<set $continue_to to "Search the place">><</link>>
<<else>>
[[Move on -> Search the place]]
<</if>>
@@
<<default>>You unleash your magic, but the endless parade of chitin appears unfazed. You scamper out of the way in the nick of time, getting bit in the process.<<set $player.wounds += roll_dice(1, 4, +1)>>
@@text-align:center;
<<if $player.wounds >= $player.stamina * $player.size>>
[[You are badly hurt]]
<<else>>
[[Think again -> Giant cockroaches]]
<</if>>
@@
<</switch>>From ceramic pots on either side of the corridor grow two leafy plants as tall as you are. Instead of flowers, they sport a dozen hungry mouths. All turn towards the noise and vibration as you draw near.
(This is a d6 creature armed with a +3/+6 weapon.)
* [[Attack -> Attack carnivorous plants]]
* [[Cast spell -> Hex carnivorous plants?]]
* [[Flee]]<<set _you_roll to roll_attack($player, all_monsters["plants"])>>\
<<set _it_rolls to roll_attack(all_monsters["plants"], $player)>>\
(You roll _you_roll against the opponent's _it_rolls.)
<<if _you_roll > _it_rolls>>\
The plants lash at you with thorny vines, but you parry each of them with ease. A well-timed swing, and one of the toothy flowers falls to the ground. Then another, and another. The plants shrivel under the onslaught.<<set $player.experience += 200>><<set $story_progress += roll_dice(2, 6, +3)>>
@@text-align:center;
<<if $player.experience >= 1000>>
<<link [[You feel more capable]]>><<set $continue_to to "Search the place">><</link>>
<<else>>
[[Move on -> Search the place]]
<</if>>
@@
<<elseif _you_roll == _it_rolls>>\
The plants lash at you with thorny vines, and it's all you can do to keep from being torn to shreds, let alone strike back. This will not be so easy.
@@text-align:center;
[[You retreat to safety -> Carnivorous plants]]
@@
<<else>>\
<<set $player.wounds += roll_damage(all_monsters["plants"], $player, _it_rolls - _you_roll)>>You swing at the plants, but they lash back with thorny vines that grasp and sting. Sooner or later, one of them finds its mark.<<set $player.blessings += 1>>
@@text-align:center;
<<if $player.wounds >= $player.stamina * $player.size>>
[[You are badly hurt]]
<<else>>
[[You retreat to safety -> Carnivorous plants]]
<</if>>
@@
<</if>>\As the leafy beasts bar your way, you doubtfully wonder what sort of magic might be able to carry you past them.
<<include "Choose spell">>
<<if $spell_count > 0>>
@@text-align:center;
[[Cast spell -> Hex plants!]] / [[Think again -> Carnivorous plants]]
@@
<<else>>
Unfortunately, you draw a blank.
@@text-align:center;
[[Try something else -> Carnivorous plants]]
@@
<</if>><<set $player.spellbook[$chosen_spell].charges -= 1>>\
<<switch $chosen_spell>>
<<case "Flamestrike">>A tall flame bursts from the ground in front of you, then surges forward as if carried by a strong wind. The plants burn down in moments, writhing horribly.<<set $story_progress += roll_dice(2, 6, +3)>><<set $player.experience += 50>>
@@text-align:center;
<<if $player.experience >= 1000>>
<<link [[You feel more capable]]>><<set $continue_to to "Search the place">><</link>>
<<else>>
[[Move on -> Search the place]]
<</if>>
@@
<<case "Snowdrift">>As a cold wind picks up all around you, blowing snow over the murderous vines, their writhing grows sluggish. One still finds its mark as you run past.<<set $story_progress += roll_dice(2, 6, +3)>><<set $player.wounds += roll_dice(1, 4, +1)>><<set $player.experience += 100>>
@@text-align:center;
<<if $player.wounds >= $player.stamina * $player.size>>
[[You are badly hurt]]
<<elseif $player.experience >= 1000>>
<<link [[You feel more capable]]>><<set $continue_to to "Search the place">><</link>>
<<else>>
[[Move on -> Search the place]]
<</if>>
@@
<<case "Undergrowth">>Your own strong vines sprout from the ground, pushing aside stones... tangling with those barring the way forward. If anything, they are fraternizing.
@@text-align:center;
[[Think again -> Carnivorous plants]]
@@
<<default>>You unleash your magic, but the chlorophilian creeps appear unfazed. At least they can't reach you to counter-attack.
@@text-align:center;
[[Think again -> Carnivorous plants]]
@@
<</switch>>Deep shadows are dancing on the walls ahead of you, without a source of light that could cause it. Shadows with blood-red eyes and fangs. They peel off as you step closer and bar your way, floating in mid-air.
(This is a d8 creature armed with a +4/+6 weapon.)
* [[Attack -> Attack living shadows]]
* [[Cast spell -> Hex living shadows?]]
* [[Flee]]<<set _you_roll to roll_attack($player, all_monsters["shadows"])>>\
<<set _it_rolls to roll_attack(all_monsters["shadows"], $player)>>\
(You roll _you_roll against the opponent's _it_rolls.)
<<if _you_roll > _it_rolls>>\
You watch the approaching monsters carefully, weighing your options. A well-timed swing shears one of them in half, tatters of shadow soon melting away. The others scatter, and you run past without a second thought.<<set $player.experience += 200>><<set $story_progress += roll_dice(2, 6, +3)>>
@@text-align:center;
<<if $player.experience >= 1000>>
<<link [[You feel more capable]]>><<set $continue_to to "Search the place">><</link>>
<<else>>
[[Move on -> Search the place]]
<</if>>
@@
<<elseif _you_roll == _it_rolls>>\
You watch the approaching monsters carefully, weighing your options. A series of rapid swings meets nothing but air. At least it keeps them busy.
@@text-align:center;
[[You backpedal in a hurry -> Living shadows]]
@@
<<else>>\
<<set $player.wounds += roll_damage(all_monsters["shadows"], $player, _it_rolls - _you_roll)>>You swing at the monsters, but they dance around confusingly. You hit nothing but air. Then they counter-attack, biting and slashing from all sides.<<set $player.blessings += 1>>
@@text-align:center;
<<if $player.wounds >= $player.stamina * $player.size>>
[[You are badly hurt]]
<<else>>
[[You backpedal in a hurry -> Living shadows]]
<</if>>
@@
<</if>>\As the creatures of darkness draw closer, you frantically wonder what sort of magic might be able to stop such things.
<<include "Choose spell">>
<<if $spell_count > 0>>
@@text-align:center;
[[Cast spell -> Hex living shadows!]] / [[Think again -> Living shadows]]
@@
<<else>>
Unfortunately, you draw a blank.
@@text-align:center;
[[Try something else -> Living shadows]]
@@
<</if>><<set $player.spellbook[$chosen_spell].charges -= 1>>\
<<switch $chosen_spell>>
<<case "Windstorm">>At first nothing seems to happen, then a strong wind picks up, and soon grows into a howling gale. The shadows are blown away with a vengeance.<<set $story_progress += roll_dice(2, 6, +3)>><<set $player.experience += 200>>
@@text-align:center;
<<if $player.experience >= 1000>>
<<link [[You feel more capable]]>><<set $continue_to to "Search the place">><</link>>
<<else>>
[[Move on -> Search the place]]
<</if>>
@@
<<case "Flamestrike">>A tall flame bursts from the ground in front of you, then surges forward as if carried by a strong wind. Light from the fire pushes the shadows flat against the walls. They promptly return, but you get enough time to escape.<<set $player.experience += 50>>
<<include "Challenge completed">>
<<default>>You unleash your magic, but the shadows dancing around you appear unfazed. You retreat out of the way in the nick of time, getting bit in the process.<<set $player.wounds += roll_dice(1, 4, +1)>>
@@text-align:center;
<<if $player.wounds >= $player.stamina * $player.size>>
[[You are badly hurt]]
<<else>>
[[Think again -> Living shadows]]
<</if>>
@@
<</switch>>Writhing, wriggling tentacles are feeling their way along the corridor in your direction, squelching wetly. Lots and lots of them, bound together. If there's a body in the middle of it all, you couldn't say.
(This is a d10 creature armed with +6/+4 suction cups.)
* [[Attack -> Attack mass of tentacles]]
* [[Cast spell -> Hex mass of tentacles?]]
* [[Flee]]<<set _you_roll to roll_attack($player, all_monsters["tentacles"])>>\
<<set _it_rolls to roll_attack(all_monsters["tentacles"], $player)>>\
(You roll _you_roll against the opponent's _it_rolls.)
<<if _you_roll > _it_rolls>>\
You watch the approaching monster carefully, weighing your options. A well-timed swing shears off a few tentacles. The rest of it curls up into a ball, writhing horribly, and you run past without a second thought.<<set $player.experience += 200>><<set $story_progress += roll_dice(2, 6, +3)>>
@@text-align:center;
<<if $player.experience >= 1000>>
<<link [[You feel more capable]]>><<set $continue_to to "Search the place">><</link>>
<<else>>
[[Move on -> Search the place]]
<</if>>
@@
<<elseif _you_roll == _it_rolls>>\
You watch the approaching monster carefully, weighing your options. Your swings are slapped out of the air by tentacles. At least it's a stalemate.
@@text-align:center;
[[Think again -> Mass of tentacles]]
@@
<<else>>\
<<set $player.wounds += roll_damage(all_monsters["tentacles"], $player, _it_rolls - _you_roll)>>You swing at the monster, but the confusing dance of tentacles makes you miss. And then it counter-attacks, slapping you around like a ragdoll. It hurts.<<set $player.blessings += 1>>
@@text-align:center;
<<if $player.wounds >= $player.stamina * $player.size>>
[[You are badly hurt]]
<<else>>
[[You backpedal in a hurry -> Mass of tentacles]]
<</if>>
@@
<</if>>\As the pile of flesh squirms closer, you frantically wonder what sort of magic might be able to stop such a thing.
<<include "Choose spell">>
<<if $spell_count > 0>>
@@text-align:center;
[[Cast spell -> Hex tentacles!]] / [[Think again -> Mass of tentacles]]
@@
<<else>>
Unfortunately, you draw a blank.
@@text-align:center;
[[Try something else -> Mass of tentacles]]
@@
<</if>><<set $player.spellbook[$chosen_spell].charges -= 1>>\
<<switch $chosen_spell>>
<<case "Undergrowth">>Strong vines sprout from the ground, pushing aside stones, grasping at the writhing tentacles and pinning them down. You run past while you still can.<<set $story_progress += roll_dice(2, 6, +3)>><<set $player.experience += 200>>
@@text-align:center;
<<if $player.experience >= 1000>>
<<link [[You feel more capable]]>><<set $continue_to to "Search the place">><</link>>
<<else>>
[[Move on -> Search the place]]
<</if>>
@@
<<case "Levitation">>As the spell takes hold, you lift into the air and float away over the quivering pile of flesh. Tentacles whip through the air. You dodge, but still take a glancing blow before reaching safety.<<set $story_progress += roll_dice(2, 6, +3)>><<set $player.wounds += roll_dice(1, 4, +1)>><<set $player.experience += 100>>
@@text-align:center;
<<if $player.wounds >= $player.stamina * $player.size>>
[[You are badly hurt]]
<<elseif $player.experience >= 1000>>
<<link [[You feel more capable]]>><<set $continue_to to "Search the place">><</link>>
<<else>>
[[Move on -> Search the place]]
<</if>>
@@
<<default>>You unleash your magic, but it just washes over the quivering flesh. You dive to safety in the nick of time, taking a glancing blow in the process.<<set $player.wounds += roll_dice(1, 4, +1)>>
@@text-align:center;
<<if $player.wounds >= $player.stamina * $player.size>>
[[You are badly hurt]]
<<else>>
[[Think again -> Living shadows]]
<</if>>
@@
<</switch>><<set $story_progress -= roll_dice(2, 6, +3)>>You'd rather not face such dangers right now. Best to retrace your steps, even at the cost of losing progress. There must be some other way forward. A safer one.
@@text-align:center;
<<if $story_progress > 0>>
[[Retreat, for now -> Respite]]
<<else>>
[[Retreat, for now -> A doorway too far]]
<</if>>
@@