<!-- Print the Inventory -->
(if: $inv's length > 0)[
(if: (passage:)'s tags contains "noInvDisplay")[]\
(else:)[You are carrying (print: $inv.join(", "))]
(if: (passage:)'s tags contains "noInvLink")[]\
(else:)[Check [[inventory->Inventory]]]
](if: $inv's length > 0)[You are carrying (print: $inv.join(", "))]
(else:)[You are carrying nothing.]
(click: "lantern")[(display: "lantern-item")]
(click: "rusty key")[(display: "rusty-key-item")]
(click: "hammer")[(display: "hammer-item")]
(click: "heartstone")[(display: "heartstone-item")]
(link-goto: "Return", (history:)'s last)A copper, hooded lantern with a small oil burner which easily illuminates a room. It appears to have plenty of oil.An old, rusted iron key.A solid iron sledge hammer.A fist-sized red gem with a low luminescence in its core. The stone is warm to the touch and pulses and jitters in your hand.<!-- Print current sound level message -->\
(if: $heartstone is true)[(print: $sound_msgs[$thud_lvl])]\
(else:)[(print: $panic_msgs[$thud_lvl])]<!-- Set up Initial Variables -->\
<script>pushEvent('Story', 'Start', '');</script>\
(set: $inv to (a: "lantern", "rusty key"))\
(set: $door_locked to true)\
(set: $storeroom_hammer to true)\
(set: $wall_intact to true)\
(set: $heartstone to true)\
(set: $lantern_lit to false)\
(set: $thud_lvl to 0)\
\
(set: $sound_msgs to (a:
"",
"You feel slight tremors in the rock beneath your feet.",
"There is a faint, but deep throbbing sound coming from up ahead.",
"The throbbing sound comes from the rock all around you, permeating your thoughts.",
"*Bu-dum* *Bu-dum*. The walls themselves scream at you with a deafening cacophony.",
))\
(set: $panic_msgs to (a:
"",
"The low thudding is faint now.",
"The beating sound is more distant now. You still feel it in your feet, but can hear your thoughts again.",
"Panicked thudding echoes and shakes the tunnel behind you.",
"*Bu-dum-dum* *Bu-dum-dum*. The rising thrumming shakes the walls, which shower you in gravel in protest.",
))You stand at the bottom of a ladder into a dark cellar.
The air smells stale and dusty like it hasn't been moved in years.
(if: $door_locked is true)[\
There is a [door]<door| with a small, iron lock.
(click: ?door)[(display: "door")]
]\
(else:)[There is an unlocked [[door->Storeroom]].]
(if: $inv contains "heartstone")[[[Escape->Escape]] with the Heartstone!](if: $door_locked is true)[\
(if: $inv contains "rusty key")[\
You unlock the [[door->Storeroom]] with the Rusty Key.
(set: $inv to $inv - (a: "rusty key"))
(set: $door_locked to false)
]\
(else:)[The door is locked and requires a key]
]You stand in a musky Storeroom. The walls are lined with casks and barrels filled with long forgotten wine.
(if: $storeroom_hammer is true)[There is a hammer resting on the table.]<hammer|
(click-replace: ?hammer)[You take the hammer.\
<script>pushEvent('Story', 'Hammer', 'Take')</script>\
(set: $inv to $inv + (a: "hammer"))\
(set: $storeroom_hammer to false)\
]
(if: $wall_intact is true)[Some of the (link-repeat: "bricks")[\
(if: $inv contains "hammer")[\
(replace: ?wallresult)[*Slam* Bricks fly and crumble under your hammer, revealing a [[dark passage->Tunnel1-dark]].]\
(set: $wall_intact to false)\
]\
(else:)[\
(replace: ?wallresult)[The brick wall sounds hollow, but you cannot budge it with your bare hands.]\
]\
] in the wall look loose.]\
(else:)[The broken wall reveals a [[dark passage->Tunnel1]]]\
|wallresult)[]
There is a [[door->Entrance]] back to the entrance.(set: $thud_lvl to 1)
(if: $lantern_lit is true)[(goto: "Tunnel1")]
You crouch in a dark tunnel, unable to see your hand in front of your face.
(display: "CurrentSoundMsg")
(if: $inv contains "lantern")[\
Light your [lantern]<lantern|.
(click: ?lantern)[\
(set: $lantern_lit to true)\
(goto: "Tunnel1")
]
]
[[Turn back->Storeroom]](set: $thud_lvl to 1)
You lantern burns brightly.
The rock walls appears smooth, as if dug by flowing water pressure. The tunnel makes a turn up ahead out of sight.
(display: "CurrentSoundMsg")
[[Follow it.->Tunnel2]]
(if: $heartstone is true)[[[Turn back->Storeroom]]]\
(else:)[[[Escape->Storeroom]]](set: $thud_lvl to 2)
It takes some time to crawl through the narrow tunnel, but you make steady progress. Your lantern sputters but remains strong.
(display: "CurrentSoundMsg")
[[Continue.->Tunnel3]]
(if: $heartstone is true)[[[Turn back->Tunnel1]]]\
(else:)[[[Escape->Tunnel1]]](set: $thud_lvl to 3)
At last the tunnel widens enough for you to nearly stand. You come upon a stone edifice with a worn wooden door with a dull red light leaking under it.
(click: "wooden door")[On closer inspection the door has many thin spindle patterns inlaid in the wood. It once had a \
lacquer finish and a golden handle, but has since decayed from misuse]
(display: "CurrentSoundMsg")
[[Open the door.->Heartroom]]
(if: $heartstone is true)[[[Turn back->Tunnel2]]]\
(else:)[[[Escape->Tunnel2]]](set: $thud_lvl to 4)
Behind the door is a small antechamber with rough hewn stone covering the walls and floor. In each corner is a \
sconce with a luminous crystal casting red light across the floor.
(if: $heartstone is true)[\
In the center is a stone pedestal with a fist-sized blood red gem. Its sparkles seem to shift and \
reverberate with the sound.
(display: "CurrentSoundMsg")
Take the Heartstone\
]<heartstone|\
(else:)[\
(display: "CurrentSoundMsg")
]
[[Flee->Tunnel3]]\
(click: "Take the Heartstone")[\
<script>pushEvent('Story', 'Heartstone', 'Take')</script>\
(set: $inv to $inv + (a: "heartstone"))\
(set: $heartstone to false)\
(replace: ?heartstone)[\
---
The gem feels heavy, and warm in your hand. It seems to jostle and shake on its own accord.
Suddenly, the pulse quickens. slamming your mind with incessant pressure. You must leave!
(display: "CurrentSoundMsg")
]\
]<script>pushEvent('Story', 'Finish', 'Escape')</script>\
You climb out into the night air and run swiftly from the rickety house, still swaying in the wind like a dying animal.
Clutch the Heartstone tightly to your chest. You feel its warmth, and try to forget the Dark Cellar you've left behind.
You Win!Brandon Risberg