<<nobr>>
<h1>⛏ COLOSSAL CAVE ADVENTURE ⛏</h1>
<br><br>
Somewhere nearby is Colossal Cave, where others have found fortunes in treasure and gold, though it is rumoured that some who enter are never seen again.
<br><br>
Your goal is to collect all the treasures and deposit them at the well-house.
<br><br>
''Treasures to find:'' Large Gold Nugget · Several Diamonds · Bars of Silver · Precious Jewelry · Rare Coins · Treasure Chest · Large Emerald · Platinum Pyramid · String of Pearls · Rare Spices · Stone Tablet
<br><br>
[[Begin your adventure->Road]]
<</nobr>><<set $inventory = []>>
<<set $itemNames = {}>>
<<set $moves = 0>>
<<set $score = 0>>
<<set $lamp_on = false>>
<<set $serpent_gone = false>>
<<set $deposited = []>>
<<set $items_road = []>>
<<set $items_building = ["lamp","keys","food","water"]>>
<<set $items_valley = []>>
<<set $items_forest = []>>
<<set $items_depression = []>>
<<set $items_below_grate= ["cage"]>>
<<set $items_cobble = []>>
<<set $items_debris = ["rod"]>>
<<set $items_awk_canyon = []>>
<<set $items_bird_chamber = ["bird"]>>
<<set $items_top_pit = []>>
<<set $items_hall_mists = []>>
<<set $items_nugget = ["gold"]>>
<<set $items_fissure = []>>
<<set $items_west_bank = []>>
<<set $items_orange_col = ["diamonds"]>>
<<set $items_window_pit = ["silver"]>>
<<set $items_maze1 = []>>
<<set $items_maze2 = ["coins"]>>
<<set $items_dead_end1 = ["jewelry"]>>
<<set $items_plover = ["emerald"]>>
<<set $items_dark_room = ["pyramid"]>>
<<set $items_west_pit = ["pearls"]>>
<<set $items_cavern_wf = ["chest"]>>
<<set $items_large_low = ["spices"]>>
<<set $items_slab_room = ["slab"]>>
<<set $items_mt_king = []>>
<<set $roomItems = {
"Road": $items_road,
"Building": $items_building,
"Valley": $items_valley,
"Forest": $items_forest,
"Depression": $items_depression,
"BelowGrate": $items_below_grate,
"Cobble": $items_cobble,
"Debris": $items_debris,
"AwkCanyon": $items_awk_canyon,
"BirdChamber": $items_bird_chamber,
"TopPit": $items_top_pit,
"HallOfMists": $items_hall_mists,
"NuggetRoom": $items_nugget,
"Fissure": $items_fissure,
"WestBank": $items_west_bank,
"OrangeColumn": $items_orange_col,
"WindowOnPit": $items_window_pit,
"Maze1": $items_maze1,
"Maze2": $items_maze2,
"DeadEnd1": $items_dead_end1,
"PloverRoom": $items_plover,
"DarkRoom": $items_dark_room,
"WestPit": $items_west_pit,
"CavernWaterfall": $items_cavern_wf,
"LargeLowRoom": $items_large_low,
"SlabRoom": $items_slab_room,
"HallMtKing": $items_mt_king
}>>
<<set $deposited = []>>
<<set $lamp_on = true>>
<<set $lamp_life = 350>>
<<set $grate_open = false>>
<<set $bridge_up = false>>
<<set $bird_caged = false>>
<<set $serpent_gone = false>>
<<set $xyzzy_known = false>>
<<set $plugh_known = false>>
<<set $moves = 0>>
<<set $score = 0>><<nobr>>
<h2>Inventory</h2>
<br><br>
<<if $inventory.length === 0>>
You are carrying nothing.
<<else>>
You are carrying:
<<for _i = 0; _i < $inventory.length; _i++>>
* <<= ($itemNames && $itemNames[$inventory[_i]]) ? $itemNames[$inventory[_i]] : $inventory[_i] >>
<</for>>
<</if>>
[[Go Back->Road]]
<</nobr>><<nobr>>
<h2>Score</h2>
<br><br>
You have scored <<= $score>> points out of a possible 350, in <<= $moves>> moves.
<br><br>
''Treasures deposited:'' <<= $deposited.length>> / 11
<br><br>
[[Continue->Road]]
<</nobr>><<nobr>>
<br><br>
<</nobr>><<nobr>>
<h1>⛏ CONGRATULATIONS! ⛏</h1>
<br><br>
You have collected all eleven treasures and returned them safely to the well-house!
<br><br>
''Final Score: <<= $score>> / 350''
''Moves: <<= $moves>>''
<br><br>
You are a true Colossal Cave adventurer. Your name will be remembered in the halls of legend.
<br><br>
[[Play Again->Start]]
<</nobr>><<nobr>>
<<set $moves += 1>>
<h2>End of Road</h2>
<br><br>
You are standing at the end of a road before a small brick building. Around you is a forest. A small stream flows out of the building and down a gully.
<br><br>
<<set _roomItems = $items_road>>
<<include "ItemList">>
<br><br>
''Exits:'' [[East->Building]] | [[South->Valley]] | [[North->Forest]] | [[West->Forest]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<br><br>
<<set $moves += 1>>
<h2>Inside Building</h2>
<br><br>
You are inside a small well-house for a large spring. The stream flows into a pipe here. This is the place to deposit your treasures!
<<include "ItemList">><<include "DepositTreasures">>''Exits:'' [[West->Road]]
<<if $items_building.includes("lamp")>>[[Take Lamp->TakeLamp]]<</if>><<if $items_building.includes("keys")>> | [[Take Keys->TakeKeys]]<</if>><<if $items_building.includes("food")>> | [[Take Food->TakeFood]]<</if>><<if $items_building.includes("water")>> | [[Take Water->TakeWater]]<</if>><<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<h2>Valley</h2>
<br><br>
You are in a valley in the forest beside a stream tumbling along a rocky bed.
<br><br>
<<set _roomItems = $items_valley>>
<<include "ItemList">>
<br><br>
''Exits:'' [[North->Road]] | [[South->Slit]] | [[West->Forest]] | [[East->Forest]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<h2>Forest</h2>
<br><br>
You are in open forest, with a deep valley to one side.
<br><br>
<<set _roomItems = $items_forest>>
<<include "ItemList">>
<br><br>
''Exits:'' [[East->Road]] | [[South->Valley]]
<br><br>
<<include "ActionBar">>
<br><br>
<</nobr>><<nobr>>
<<if $items_building.includes("lamp")>>
<<set $items_building.delete("lamp")>>
<<set $inventory.push("lamp")>>
You pick up the brass lantern.
<<else>>
The lamp isn't here.
<</if>>
[[Back->Building]]
<</nobr>><<nobr>>
<<if $items_building.includes("keys")>>
<<set $items_building.delete("keys")>>
<<set $inventory.push("keys")>>
You pick up the set of keys.
<<else>>
The keys aren't here.
<</if>>
[[Back->Building]]
<</nobr>><<nobr>>
<<if $items_building.includes("food")>>
<<set $items_building.delete("food")>>
<<set $inventory.push("food")>>
You pick up the tasty food.
<<else>>
The food isn't here.
<</if>>
[[Back->Building]]
<</nobr>><<nobr>>
<<if $items_building.includes("water")>>
<<set $items_building.delete("water")>>
<<set $inventory.push("water")>>
You pick up the bottle of water.
<<else>>
The water isn't here.
<</if>>
[[Back->Building]]
<</nobr>><<nobr>>
<<set $moves += 1>>
<h2>Slit in Streambed</h2>
<br><br>
At your feet is a small slit in the streambed. The stream disappears into it. You cannot enter the slit.
<br><br>
''Exits:'' [[North->Valley]] | [[South->Depression]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<h2>Outside Grate</h2>
<br><br>
You are in a 20-foot depression floored with bare dirt. Set into the dirt is a strong steel grate mounted in concrete.
<br><br>
<<if $grate_open>>
The grate is open.
''Exits:'' [[North->Slit]] | [[Down (through grate)->BelowGrate]]
<<else>>
The grate is locked.
''Exits:'' [[North->Slit]]
<<if $inventory.includes("keys")>>
[[Unlock Grate->UnlockGrate]]
<<else>>
//(You need keys to open the grate.)//
<</if>>
<</if>>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Below the Grate</h2>
<br><br>
You are in a small chamber beneath a 3×3 steel grate to the surface. A low crawl over cobbles leads inward to the west.
<br><br>
<<set _roomItems = $items_below_grate>>
<div id="room-ui">
<<include "ItemList">>
<br><br>
<<include "TakeButtons">>
</div>
''Exits:'' [[Up (out through grate)->Depression]] | [[West (crawl)->Cobble]]
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $grate_open = true>>
<<set $moves += 1>>
You unlock the grate with your keys. It swings open.
<br><br>
[[Continue->Depression]]
<br><br>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Cobble Crawl</h2>
<br><br>
You are crawling over cobbles in a low passage. There is a dim light at the east end of the passage.
<br><br>
<<set _roomItems = $items_cobble>>
<<include "ItemList">>
<br><br>
''Exits:'' [[East->BelowGrate]] | [[West->Debris]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Debris Room</h2>
<br><br>
You are in a debris room filled with stuff washed in from the surface. A note on the wall says: ''MAGIC WORD IS XYZZY''
<br><br>
<<set $xyzzy_known = true>>
<br><br>
<<set _roomItems = $items_debris>>
<div id="room-ui">
<<include "ItemList">>
<br><br>
<<include "TakeButtons">>
</div>
''Exits:'' [[East->Cobble]] | [[West->AwkCanyon]]
[[Say XYZZY->Xyzzy]]
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Awkward Canyon</h2>
<br><br>
You are in an awkward sloping canyon.
<br><br>
''Exits:'' [[East->Debris]] | [[West->BirdChamber]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
>>Foof!<<
<br><br>
<<if previous() === "Debris">>
[[Continue->Building]]
<<elseif previous() === "Building">>
[[Continue->Debris]]
<<else>>
Nothing happens.
[[Back->Road]]
<</if>>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Bird Chamber</h2>
<br><br>
You are in a splendid chamber thirty feet high. The walls are frozen rivers of orange stone. A cheerful little bird is sitting here singing.
<br><br>
<<set _roomItems = $items_bird_chamber>>
<<include "ItemList">>
<br><br>
''Exits:'' [[East->AwkCanyon]] | [[West->TopPit]]
<br><br>
<<if $items_bird_chamber.includes("bird")>>
<<if $inventory.includes("cage")>>
[[Catch Bird (using cage)->CatchBird]]
<<else>>
//(The bird is frightened. You need the wicker cage to catch it.)//
<</if>>
<</if>>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Top of Small Pit</h2>
<br><br>
At your feet is a small pit breathing traces of white mist. Rough stone steps lead down the pit.
<br><br>
''Exits:'' [[East->BirdChamber]] | [[Down->HallOfMists]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $bird_caged = true>>
<<set $items_bird_chamber.delete("bird")>>
<<set $inventory.push("bird")>>
<<set $moves += 1>>
You gently coax the bird into the cage. It trills happily.
<br><br>
[[Continue->BirdChamber]]
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Hall of Mists</h2>
<br><br>
You are at one end of a vast hall stretching forward out of sight to the west. The hall is filled with wisps of white mist swaying to and fro almost as if alive.
<br><br>
<<set _roomItems = $items_hall_mists>>
<<include "ItemList">>
<br><br>
''Exits:'' [[East->TopPit]] | [[West->EastBankFissure]] | [[North->NuggetRoom]] | [[South->Fissure]] | [[Down->Staircase]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>East End of Hall of Mists</h2>
<br><br>
You are at the east end of the Hall of Mists. Passages lead further west and north.
<br><br>
''Exits:'' [[East->HallOfMists]] | [[West->OrangeColumn]] | [[North->MistyCavern]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Nugget of Gold Room</h2>
<br><br>
This is a low room with a crude note on the wall. The note says: //You won't get it up the steps.//
<br><br>
<<set _roomItems = $items_nugget>>
<div id="room-ui">
<<include "ItemList">>
<br><br>
<<include "TakeButtons">>
</div>
''Exits:'' [[South->HallOfMists]]
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>East Bank of Fissure</h2>
<br><br>
You are on the east bank of a fissure slicing clear across the hall. The mist is quite thick here.
<br><br>
<<if $bridge_up>>
A crystal bridge spans the fissure!
''Exits:'' [[North->HallOfMists]] | [[West (cross bridge)->WestBank]]
<<else>>
The fissure is too wide to jump.
''Exits:'' [[North->HallOfMists]]
<<if $inventory.includes("rod")>>
[[Wave Rod->WaveRod]]
<<else>>
//(You need the black rod to create a bridge.)//
<</if>>
<</if>>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Staircase</h2>
<br><br>
You are on a stone staircase. Steps lead up and a rough tunnel goes north.
<br><br>
''Exits:'' [[Up->HallOfMists]] | [[North->LowNS]]
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>West Bank of Fissure</h2>
<br><br>
You are on the west side of the fissure in the Hall of Mists.
<br><br>
<<if $bridge_up>>
''Exits:'' [[East (cross bridge)->Fissure]] | [[West->WestEndMists]]
<<else>>
The bridge has gone. You're stranded on this side!
''Exits:'' [[West->WestEndMists]]
<</if>>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $bridge_up = true>>
<<set $moves += 1>>
You wave the black rod over the fissure. A crystal bridge materialises across it!
<br><br>
[[Continue->Fissure]]
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>West End of Hall of Mists</h2>
<br><br>
You are at the west end of the Hall of Mists. A low wide passage continues to the west. There are stairs going up on the north side.
<br><br>
''Exits:'' [[East->WestBank]] | [[West->ComplexJunction]] | [[Up->HallMtKing]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Orange Column Room</h2>
<br><br>
You are in a long room filled with orange stone columns. The passage continues east.
<br><br>
<<set _roomItems = $items_orange_col>>
<div id="room-ui">
<<include "ItemList">>
<br><br>
<<include "TakeButtons">>
</div>
''Exits:'' [[East->EastBankFissure]] | [[West->MistyCavern]]
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Misty Cavern</h2>
<br><br>
You are following a passage through an area of fine mist.
<br><br>
''Exits:'' [[East->OrangeColumn]] | [[South->Alcove]] | [[North->PloverRoom]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Alcove</h2>
<br><br>
You are in an alcove. A small northwest path seems to widen after a short distance. An extremely tight tunnel leads east.
<br><br>
''Exits:'' [[North->MistyCavern]] | [[East (tight squeeze)->PloverRoom]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Plover Room</h2>
<br><br>
You're in a small chamber lit by an eerie green light.
<br><br>
<<set _roomItems = $items_plover>>
<div id="room-ui">
<<include "ItemList">>
<br><br>
<<include "TakeButtons">>
</div>
''Exits:'' [[West->Alcove]] | [[South->MistyCavern]] | [[East->DarkRoom]]
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Dark Room</h2>
<br><br>
You're in the Dark Room. A corridor leads southwest.
<br><br>
<<set _roomItems = $items_dark_room>>
<div id="room-ui">
<<include "ItemList">>
<br><br>
<<include "TakeButtons">>
</div>
''Exits:'' [[West->PloverRoom]]
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Low N/S Passage</h2>
<br><br>
You are in a low N/S passage at a hole in the floor. The hole goes down to an east/west passage.
<br><br>
''Exits:'' [[North->Y2]] | [[South->Staircase]] | [[Down->EastWest]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>"Y2"</h2>
<br><br>
You are in a large room. There is a large ''Y2'' on a rock in the room's centre. The magic word PLUGH is said to work here.
<br><br>
<<set $plugh_known = true>>
<br><br>
''Exits:'' [[South->LowNS]] | [[West->JumbleRock]]
<br><br>
[[Say PLUGH->Plugh]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>East/West Passage</h2>
<br><br>
You are in a long east/west corridor. A sign on the north wall says: ''MAZE ENTRANCE THIS WAY.''
<br><br>
''Exits:'' [[East->LowNS]] | [[West->Maze1]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Jumble of Rock</h2>
<br><br>
You are in a jumble of rock, with cracks everywhere.
<br><br>
''Exits:'' [[East->Y2]] | [[Down->WindowOnPit]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
A hollow voice says "PLUGH".
<br><br>
<<if previous() === "Y2">>
[[Continue->Building]]
<<elseif previous() === "Building">>
[[Continue->Y2]]
<<else>>
Nothing happens.
[[Back->Road]]
<</if>>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Window on Pit</h2>
<br><br>
You're at a low window overlooking a huge pit which extends up out of sight. A floor is 150 feet below. Shadows of large beasts can be seen on the far wall.
<br><br>
<<set _roomItems = $items_window_pit>>
<div id="room-ui">
<<include "ItemList">>
<br><br>
<<include "TakeButtons">>
</div>
''Exits:'' [[East->JumbleRock]]
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Maze of Twisty Passages</h2>
<br><br>
You are in a maze of twisty little passages, all alike.
<br><br>
''Exits:'' [[North->Maze2]] | [[South->Maze3]] | [[East->EastWest]] | [[West->Maze4]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Maze of Twisty Passages</h2>
<br><br>
You are in a maze of twisty little passages, all alike.
<br><br>
<<set _roomItems = $items_maze2>>
<div id="room-ui">
<<include "ItemList">>
<br><br>
<<include "TakeButtons">>
</div>
''Exits:'' [[North->Maze3]] | [[South->Maze1]] | [[East->Maze4]] | [[West->DeadEnd1]]
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Maze of Twisty Passages</h2>
<br><br>
You are in a maze of twisty little passages, all alike.
<br><br>
''Exits:'' [[North->Maze1]] | [[East->Maze2]] | [[West->Maze4]]
<br><br>
<<include "ActionBar">>
<br><br>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Maze of Twisty Passages</h2>
<br><br>
You are in a maze of twisty little passages, all alike.
<br><br>
''Exits:'' [[North->Maze2]] | [[East->Maze1]] | [[West->Maze3]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Dead End</h2>
<br><br>
Dead end.
<br><br>
<<set _roomItems = $items_dead_end1>>
<div id="room-ui">
<<include "ItemList">>
<br><br>
<<include "TakeButtons">>
</div>
''Exits:'' [[East->Maze2]]
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Complex Junction</h2>
<br><br>
You are at a complex junction. Passages join from several directions to make a walking passage going west.
<br><br>
''Exits:'' [[East->WestEndMists]] | [[West->Bedquilt]] | [[Down->Bedquilt]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Hall of the Mountain King</h2>
<br><br>
You are in the Hall of the Mountain King, with passages off in all directions.
<br><br>
<<if $serpent_gone>>
The serpent is gone.
''Exits:'' [[South->SecretCanyon]] | [[West->WestEndMists]] | [[North->LowNS]] | [[East->LowNS]]
<<else>>
A fierce serpent bars the way! You cannot pass to the north, east, or west.
''Exits:'' [[South->SecretCanyon]]
<<if $inventory.includes("bird")>>
[[Release Bird at Serpent->BirdVsSerpent]]
<<else>>
//(You need the caged bird to drive off the serpent.)//
<</if>>
<</if>>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Bedquilt</h2>
<br><br>
You are in Bedquilt, a long east/west passage with holes everywhere. To explore at random select north, south, up or down.
<br><br>
''Exits:'' [[East->ComplexJunction]] | [[West->SwissCheese]] | [[North->SlabRoom]] | [[Up->DustyRock]] | [[Down->Anteroom]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Swiss Cheese Room</h2>
<br><br>
You are in a room whose walls resemble swiss cheese. Obvious passages go west, east, northeast, and southeast.
<br><br>
''Exits:'' [[East->Bedquilt]] | [[West->TwoPit]] | [[Northeast->Bedquilt]] | [[Southeast->Bedquilt]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Slab Room</h2>
<br><br>
You are in a large low circular chamber whose floor is an immense slab fallen from the ceiling.
<br><br>
<<set _roomItems = $items_slab_room>>
<div id="room-ui">
<<include "ItemList">>
<br><br>
<<include "TakeButtons">>
</div>
''Exits:'' [[South->Bedquilt]] | [[Up->SecretCanyon]]
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Dusty Rock Room</h2>
<br><br>
You are in a large room full of dusty rocks. There is a big hole in the floor.
<br><br>
''Exits:'' [[East->Bedquilt]] | [[Down->Anteroom]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Anteroom</h2>
<br><br>
You are in an anteroom. A sign in midair says: ''CAVE UNDER CONSTRUCTION BEYOND THIS POINT. PROCEED AT OWN RISK.''
<br><br>
''Exits:'' [[Up->DustyRock]] | [[West->Bedquilt]] | [[East->WittEnd]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Secret E/W Canyon</h2>
<br><br>
You are in a secret N/S canyon above a large room.
<br><br>
''Exits:'' [[Down->SlabRoom]] | [[East->HallMtKing]] | [[West->SecretCanyon2]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Secret Canyon (West)</h2>
<br><br>
You are in a secret canyon which here runs E/W.
<br><br>
''Exits:'' [[East->SecretCanyon]] | [[West->GiantRoom]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Giant Room</h2>
<br><br>
You are in the Giant Room. The ceiling here is too high up for your lamp to illuminate it. Cavernous passages lead east, north and south.
<br><br>
''Exits:'' [[East->SecretCanyon2]] | [[North->ImmenseNS]] | [[South->GiantRoomSouth]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Immense N/S Passage</h2>
<br><br>
You are at one end of an immense north/south passage.
<br><br>
''Exits:'' [[South->GiantRoom]] | [[North->CavernWaterfall]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Immense South Passage</h2>
<br><br>
You are at the south end of an immense north/south passage.
<br><br>
''Exits:'' [[North->GiantRoom]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Cavern with Waterfall</h2>
<br><br>
You are in a magnificently decorated cavern; the walls drip with flowstone.
<br><br>
<<set _roomItems = $items_cavern_wf>>
<div id="room-ui">
<<include "ItemList">>
<br><br>
<<include "TakeButtons">>
</div>
''Exits:'' [[South->ImmenseNS]] | [[East->LargeLowRoom]] | [[West->LowCrawl]]
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Large Low Room</h2>
<br><br>
You are in a large low room. Crawls lead north, east, south and west. There are holes in the floor everywhere.
<br><br>
<<set _roomItems = $items_large_low>>
<div id="room-ui">
<<include "ItemList">>
<br><br>
<<include "TakeButtons">>
</div>
''Exits:'' [[West->CavernWaterfall]]
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Low Crawl</h2>
<br><br>
You are in a low crawl going west.
<br><br>
''Exits:'' [[East->CavernWaterfall]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Witt's End</h2>
<br><br>
You are at Witt's End. Passages lead off in ALL directions. (They all lead back here.)
<br><br>
''Exits:'' [[Any direction->Anteroom]]
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Two Pit Room</h2>
<br><br>
You are in a large low circular room. There are two pits in the floor, each about two feet in diameter.
<br><br>
''Exits:'' [[East->SwissCheese]] | [[West->TopWestPit]] | [[Down->EastPit]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>Top of West Pit</h2>
<br><br>
You are at the top of a steep incline above a large room. Rough stone leads down.
<br><br>
''Exits:'' [[East->TwoPit]] | [[Down->WestPit]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>East Pit Bottom</h2>
<br><br>
You are at the bottom of a pit. Nothing of interest here.
<br><br>
''Exits:'' [[Up->TwoPit]]
<br><br>
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set $moves += 1>>
<<include "LampCheck">>
<h2>West Pit Bottom</h2>
<br><br>
You are at the bottom of the west pit.
<br><br>
<<set _roomItems = $items_west_pit>>
<div id="room-ui">
<<include "ItemList">>
<br><br>
<<include "TakeButtons">>
</div>
''Exits:'' [[Up->TopWestPit]]
<<include "ActionBar">>
<</nobr>><<nobr>>
<<set _roomItems = $roomItems[State.passage] || []>>
<<if _roomItems.length > 0>>
''You see here:'' <<= _roomItems.join(", ")>>
<<else>>
//Nothing of interest here.//
<</if>>
<</nobr>><<nobr>>
<<set $serpent_gone = true>>
<<set $inventory.delete("bird")>>
<<set $moves += 1>>
You release the bird from the cage. It swoops at the serpent with furious pecking.
<br><br>
The serpent flees in terror!
<br><br>
[[Continue->HallMtKing]]
<</nobr>><<nobr>>
<<if !$inventory.includes("lamp") || !$lamp_on>>
<div class="dark-warning">
⚠ It is pitch dark. You are likely to be eaten by a grue.
</div>
<</if>>
<</nobr>><<nobr>>
<hr>
<<if $inventory.length > 0>>
''Carrying:'' <<= $inventory.join(", ")>>
<<else>>
''Carrying:'' nothing
<</if>>
| ''Moves:'' <<= $moves>> | ''Score:'' <<= $score>>
<<if $inventory.includes("lamp")>>
<<if $lamp_on>>
| [[Turn Lamp Off->LampOff]]
<<else>>
| [[Turn Lamp On->LampOn]]
<</if>>
<</if>>
| [[Check Inventory->Inventory]] | [[Score->Score]]
<</nobr>><<nobr>>
<<set $lamp_on = false>>
<<set $moves += 1>>
The lamp is now off.
[[Back->Road]]
<</nobr>><<nobr>>
<<set $lamp_on = true>>
<<set $moves += 1>>
The lamp is now on.
[[Back->Road]]
<</nobr>><<nobr>>
<<set _treasures = ["gold","diamonds","silver","jewelry","coins","chest","emerald","pyramid","pearls","spices","slab"]>>
<<set _treasureNames = {"gold":"Large Gold Nugget","diamonds":"Several Diamonds","silver":"Bars of Silver","jewelry":"Precious Jewelry","coins":"Rare Coins","chest":"Treasure Chest","emerald":"Large Emerald","pyramid":"Platinum Pyramid","pearls":"String of Pearls","spices":"Rare Spices","slab":"Stone Tablet"}>>
<<set _treasureScores = {"gold":10,"diamonds":10,"silver":10,"jewelry":10,"coins":10,"chest":15,"emerald":10,"pyramid":10,"pearls":10,"spices":10,"slab":5}>>
<<for _i = 0; _i < _treasures.length; _i++>>
<<if $inventory.includes(_treasures[_i]) && !$deposited.includes(_treasures[_i])>>
<div class="deposit-msg">✦ You deposit the <<= _treasureNames[_treasures[_i]]>>! (+<<= _treasureScores[_treasures[_i]]>> points)</div>
<<set $inventory.delete(_treasures[_i])>>
<<set $deposited.push(_treasures[_i])>>
<<set $score += _treasureScores[_treasures[_i]]>>
<</if>>
<</for>>
<<if $deposited.length === 11>>
[[''* YOU WIN! See ending ->Victory]]
<</if>>
<</nobr>><<nobr>>
<<if typeof _roomItems !== 'undefined' && _roomItems.length > 0>>
<<for _i = 0; _i < _roomItems.length; _i++>>
<<set _it = _roomItems[_i]>>
<<set _label = "Take " + _it>>
<<link _label>>
<<script>>
var it = State.temporary.it;
var arr = State.temporary.roomItems;
var inv = State.variables.inventory;
var idx = arr.indexOf(it);
if (idx !== -1) { arr.splice(idx, 1); }
if (inv.indexOf(it) === -1) { inv.push(it); }
<</script>>
<<replace "#room-ui">>
<<include "ItemList">>
<<include "TakeButtons">>
<</replace>>
<</link>>
<<if _i < _roomItems.length - 1>> | <</if>>
<</for>>
<</if>>
<</nobr>>