/* PrintExits, displays the exits
*/
<<widget "PrintExits">>
<<for _i = 0; _i < $exits.length; _i++>>
<<if $exits[_i].location == $player.location.id && $exits[_i].isListed>>
<<if $exits[_i].description == "">>
<<set $main.display += $exits[_i].name + " ">>
<<else>>
<<set $main.display += $exits[_i].description + " ">>
<</if>>
<</if>>
<</for>>
<</widget>>
<<widget "DescribeShaftToBottom">>
<<if $ropeTied == true>>
The <<link "<i>shaft</i>" MainPassage>>
<<set $player.location = $rooms.find(e => e.id == "bottomMain")>>
<</link>> leads down into the darkness.
<<else>>
The <<link "<i>shaft</i>" >>
<<set $main.message = "Jumping in won't do. You'll need a smarter way to get down.">>
<<Refresh>>
<<set $main.message = "">>
<</link>> leads down into the darkness.
<</if>>
<</widget>>
<<widget "DescribeShaftToShack">>
<<if $shedOpen == true>>
Next to it is a
<<link "<i>tool shed</i>" >>
<<set $player.location = $rooms.find(e => e.id == "toolShed")>>
<<goto MainPassage>>
<</link>>.
<<else>>
Next to it is a
<<link "<i>tool shed</i>" >>
<<set $main.message = "Both the door and the padlock look very sturdy. You'll need a key.">>
<<Refresh>>
<<set $main.message = "">>
<</link>>.
<</if>>
<</widget>>
<<widget "DescribeWardrobe">>
<<if $seenWardrobe == -1>>
<<if $helpedWorker == false>>
<br>An injured <<link "<b>man</b>">><<set $player.location = $rooms.find(e => e.id == "sceneWorker")>><<goto MainPassage>><</link>> is stuck under a wardrobe, passed out.
<<else>>
<br>The <<link "<b>man</b>">><<set $player.location = $rooms.find(e => e.id == "sceneWorker")>><<goto MainPassage>><</link>> is lying next to the wardrobe, coughing from time to time. He smiles at you, eyes ready to close any minute.
<</if>>
<<elseif $seenWardrobe == 0>>
<br>Clearing out some of the rubble and boxes, you discover a dwarf-sized hole leading to a <<link "cave" MainPassage>>
<<set $player.location = $rooms.find(e => e.id == "cave")>><</link>>.
<br>
The <<link "<b>worker</b>">><<set $player.location = $rooms.find(e => e.id == "sceneWorker")>><<goto MainPassage>><</link>> is sitting against the wall. He nods at you.
<<elseif $seenWardrobe >= 1>>
<br> A dwarf sized hole leads east into a <<link "<i>cave</i>" MainPassage>>
<<set $player.location = $rooms.find(e => e.id == "cave")>><</link>>.
<br>
The <<link "<b>worker</b>">><<set $player.location = $rooms.find(e => e.id == "sceneWorker")>><<goto MainPassage>><</link>> is sitting against the wall. He closes his eyes to rest.
<</if>>
<<if $seenWardrobe > -1>>
<<set $seenWardrobe ++>>
<</if>>
<</widget>>
<<widget "DescribeBottomSecondToDigSite">>
<<if $plankPlaced == false>>
<<link "<i>Up</i>" >>
<<set $main.message = "You could try to hop over the gaps but this is liable to leave you with broken bones stuck in mud water if you misjudge a jump. Better think of something else.">>
<<Refresh>>
<<set $main.message = "">>
<</link>>
along the rocky walls a series of wooden planks were precariously nailed together as a makeshift staircase. Some of them are
<<link "missing">>
<<set $main.message = " A cursory look at the floor reveals the remains of the planks, now smashed, chewed and charred splinter piles.">>
<<Refresh>>
<<set $main.message = "">>
<</link>>
, leaving uncrossable gaps.
<<else>>
<<link "<i>Up</i>" >>
<<set $player.location = $rooms.find(e => e.id == "digSite")>>
<<goto MainPassage>>
<</link>>
along the rocky walls a series of wooden planks were precariously nailed together as a makeshift staircase. Your plank is placed over the first gap, and you'll have to keep moving it to the next every time you want to climb. Safe, but annoying.
<</if>>
<</widget>>
<<widget "DescribeAssayerSign">>
A
<<link "tiny door">>
<<set $main.message = "It is painted blue and has decorative carvings all over. A little sign next to it reads <<print $assayerSign>>">><<Refresh>><<set $main.message = "">><</link>> is set into the solid rock to the
<<link "<i>north</i>" MainPassage>>
<<set $player.location = $rooms.find(e => e.id == "assayersRoom")>>
<</link>>.
<</widget>>
<<widget "DescribeTombDoorToTomb">>
<<if $spokenGhost == true>>
The
<<link "tomb door">>
<<set $player.location = $rooms.find(e => e.id == "garethTomb")>>
<<goto MainPassage>>
<</link>>
stands fully open now.
<<else>>
There are no hinges on the door, but you can try
<<link "<i>pushing</i>" MainPassage>>
<<set $player.location = $rooms.find(e => e.id == "sceneGhost")>>
<</link>> it.
<</if>>
<</widget>>/*
`To the <<link "south" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "tombDoor")>>` +
`<</link>>. lies a short passage reinforced with a wooden frame. The cries for help come from that direction.`
To the south lies a short passage reinforced with a wooden frame. The cries for help come from that direction.
*/
<<set $exits = [
{
id: "entranceToShaft",
name: "",
description: `The tunnel runs deeper to the <<link "<i>east</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "mainShaft")>>` +
`<</link>>. `,
location: "entranceTunnel",
isListed: true,
},
{
id: "entranceToExit",
name: "",
description: `To the west is the way out, completely <<link "<i>caved in</i>">><<set $main.message = "Hopefully they can actually dig you out. Even better if you are alive when they finish.">><<Refresh>><<set $main.message = "">><</link>>. `,
location: "entranceTunnel",
isListed: true,
},
{
id: "shaftToNarrow",
name: "",
description: `A <<link "narrow tunnel">><<set $main.message = "It is barely tall enough for a dwarf to stand upright. You'll have to crawl.">><<Refresh>><<set $main.message = "">><</link>> branches <<link "<i>north</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "narrowTunnel")>>` +
`<</link>>. `,
location: "mainShaft",
isListed: true,
},
{
id: "shaftToShack",
name: "",
description: "<<DescribeShaftToShack>>",
location: "mainShaft",
isListed: true,
},
{
id: "shaftToTunnel",
name: "",
description: `The <<link "main tunnel">><<set $main.message = "Completely collapsed. You will have to find another way. ">><<Refresh>><<set $main.message = "">><</link>> continues <<link "<i>east</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "caveInPassage")>>` +
`<</link>>. `,
location: "mainShaft",
isListed: true,
},
{
id: "shaftToRest",
name: "",
description: `A crudely fashioned <<link "rest area">><<set $main.message = " It was set up recently, but abandoned in a hurry. ">><<Refresh>><<set $main.message = "">><</link>> is carved into the <<link " <i>southern wall</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "restArea")>>` +
`<</link>>. `,
location: "mainShaft",
isListed: true,
},
{
id: "shaftToExit",
name: "",
description: `To the <<link "<i>west</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "entranceTunnel")>>` +
`<</link>> lies the exit tunnel.`,
location: "mainShaft",
isListed: true,
},
{
id: "shaftToBottom",
name: "",
description: "<<DescribeShaftToBottom>>",
location: "mainShaft",
isListed: true,
},
{
id: "narrowToShaft",
name: "",
description: `To the <<link "<i>south</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "mainShaft")>>` +
`<</link>> awaits a long crawl back to the main shaft.`,
location: "narrowTunnel",
isListed: true,
},
{
id: "toolToShaft",
name: "",
description: `The door behind you leads <<link "<i>out</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "mainShaft")>>` +
`<</link>>. `,
location: "toolShed",
isListed: true,
},
{
id: "caveInToShaft",
name: "",
description: `There is no passing through here. All you can do is <<link "<i>turn back</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "mainShaft")>>` +
`<</link>>. `,
location: "caveInPassage",
isListed: true,
},
{
id: "restToShaft",
name: "",
description: `<<link "<i>Turn back.</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "mainShaft")>>` +
`<</link>> `,
location: "restArea",
isListed: true,
},
{
id: "bottomToMain",
name: "",
description: `You can <<link "<i>climb</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "mainShaft")>>` +
`<</link>> up the rope.`,
location: "bottomMain",
isListed: true,
},
{
id: "bottomToUnderwater",
name: "",
description: `But the only way <<if $seenForward == false>><<link "forward">><<set $seenForward = 1>><<set $main.message = "It should be a short swim, and hopefully the second tunnel has not collapsed. ">><<Refresh>><<set $main.message = "">><</link>><<else>>forward <</if>> is <<link "<i>diving east</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "underwater")>>` +
`<</link>>. `,
location: "bottomMain",
isListed: true,
},
{
id: "underwaterToMain ",
name: "",
description: `You can swim <<link "<i>west</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "bottomMain")>>` +
`<</link>> to the main shaft.`,
location: "underwater",
isListed: true,
},
{
id: "underwaterToSecond",
name: "",
description: `Or <<link "<i>east</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "bottomSecond")>>` +
`<</link>> deeper into the mine.`,
location: "underwater",
isListed: true,
},
{
id: "bottomSecondToDigSite",
name: "",
description: "<<DescribeBottomSecondToDigSite>>",
location: "bottomSecond",
isListed: true,
},
{
id: "bottomSecondToUnderwater",
name: "",
description: `The water leads back <<link "<i>west</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "underwater")>>` +
`<</link>>.`,
location: "bottomSecond",
isListed: true,
},
{
id: "digSiteToAssayer",
name: "",
description: "<<DescribeAssayerSign>>",
location: "digSite",
isListed: true,
},
{
id: "digSiteToStoreroom",
name: "",
description: `To the <<link "<i>south</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "mainStoreroom")>>` +
`<</link>> lies a short passage reinforced with a wooden frame. `,
location: "digSite",
isListed: true,
},
{
id: "digSiteToSecondBottom",
name: "",
description: `The planks lead <<link "<i>down</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "bottomSecond")>>` +
`<</link>> to the second shaft.`,
location: "digSite",
isListed: true,
},
{
id: "digSiteToWest",
name: "",
description: `The western passage is, of course, still blocked.`,
location: "digSite",
isListed: true,
},
{
id: "assayersRoomToDigSite",
name: "",
description: `The door leads <<link "<i>out</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "digSite")>>` +
`<</link>> to the dig site.`,
location: "assayersRoom",
isListed: true,
},
{
id: "mainStoreRoomToDigSite",
name: "",
description: `The <<link "<i>north passage</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "digSite")>>` +
`<</link>> leads back to the dig.`,
location: "mainStoreroom",
isListed: true,
},
{
id: "mainStoreRoomToCave",
name: "",
description: "<<DescribeWardrobe>>",
location: "mainStoreroom",
isListed: true,
},
{
id: "caveToTombDoor",
name: "",
description: `The cave slopes downwards towards <<link "<i>south</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "tombDoor")>>` +
`<</link>>, into darkness. `,
location: "cave",
isListed: true,
},
{
id: "caveToStoreroom",
name: "",
description: `To the <<link "<i>west</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "mainStoreroom")>>` +
`<</link>> is the tiny door leading back to the storeroom. `,
location: "cave",
isListed: true,
},
{
id: "tombDoorToTomb",
name: "",
description: "<<DescribeTombDoorToTomb>>",
location: "tombDoor",
isListed: true,
},
{
id: "tombDoorToCave",
name: "",
description: `The way back leads up <<link "<i>north</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "cave")>>` +
`<</link>>. `,
location: "tombDoor",
isListed: true,
},
{
id: "tombToTombDoor",
name: "",
description: `The exit is to the <<link "<i>west</i>" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "tombDoor")>>` +
`<</link>>. `,
location: "garethTomb",
isListed: true,
},
]>>
/* Exit example
{
id: "kitchenExit",
name: "Dining Room",
description: `A door leads out to the <<link "dining room" MainPassage>>` +
`<<set $player.location = $rooms.find(e => e.id == "diningRoom")>>` +
`<</link>>. `,
location: "kitchen",
isListed: true,
}
*//* PrintHotspots, displays the hotspots */
<<widget "PrintHotspots">>
<<set _itemsDisplayed = false>>
<<for _i = 0; _i < $hotspots.length; _i++>>
<<if $hotspots[_i].location == $player.location.id && $hotspots[_i].isListed>>
<<set $main.display += $hotspots[_i].description + " ">>
<<for _j = 0; _j < $items.length; _j++>>
<<if $items[_j].location == $hotspots[_i].id && $items[_j].isListed && $items[_j].position == 0>>
<<if $items[_j].description == "">>
<<set $main.display += $items[_j].name + " ">>
<<else>>
<<set $main.display += $items[_j].description + " ">>
<</if>>
<</if>>
<</for>>
<<if $hotspots[_i].isContainer == 1>>
<<set $main.display += "<br>">>
<<for _j = 0; _j < $items.length; _j++>>
<<if $items[_j].location == $hotspots[_i].id && $items[_j].isListed && $items[_j].position == 1>>
<<if $items[_j].description == "">>
<<set $main.display += $items[_j].name + " ">>
<<set _itemsDisplayed = true>>
<<else>>
<<set $main.display += $items[_j].description + " ">>
<<set $main.display += "<br>">>
<<set _itemsDisplayed = true>>
<</if>>
<</if>>
<</for>>
<</if>>
<</if>>
<</for>>
<<if _itemsDisplayed == false>>
<<set $main.display += "<br>">>
<</if>>
<</widget>>
/*take hotspot id, flip isContainer to 1 or 0 */
<<widget "Open">>
<<if $hotspots.find(e => e.id == _args[0]).isContainer == 0>>
<<set $hotspots.find(e => e.id == _args[0]).isContainer = 1>>
<<elseif $hotspots.find(e => e.id == _args[0]).isContainer == 1>>
<<set $hotspots.find(e => e.id == _args[0]).isContainer = 0>>
<</if>>
<</widget>>
<<widget "Switch">>
<<if $hotspots.find(e => e.id == _args[0]).isSwitch == 0>>
<<set $hotspots.find(e => e.id == _args[0]).isSwitch = 1>>
<<elseif $hotspots.find(e => e.id == _args[0]).isSwitch == 1>>
<<set $hotspots.find(e => e.id == _args[0]).isSwitch = 0>>
<</if>>
<</widget>>
/*Description widgets*/
<<widget "DescribeEntranceMinecarts">>
<<if $usedHook == -1>>
Several minecarts are overturned, their
<<link "cargo">>
<<set $main.message = `The cart in the back has a
<<link "metal hook">>
<<set $usedHook = 0>>
<<set $items.find(e => e.id == "hook").location = "inventory">>
<<set $main.message = "You take the hook.">>
<<Refresh>>
<<set $main.message = "">>
<</link>> with a short length of rope attached.`>>
<<Refresh>>
<<set $main.message = "">>
<</link>>
spilled to the side.
<<else>>
Several minecarts are overturned, their cargo spilled to the side.
<</if>>
<</widget>>
<<widget "DescribeTools">>
<<if $shedOpen == true>>
<<link "Tools">><<set $main.message = "Basic shovels, pickaxes, ropes and lanterns, and many strange things you can't tell the purpose off. ">><<Refresh>><<set $main.message = "">><</link>> of every shape and size are neatly organized along the walls.
<<if $takenWaterskin == false>>
An
<<link "empty waterskin">>
<<set $items.find(e => e.id == "emptyWaterskin").location = "inventory">>
<<set $main.message = "You take the empty waterskin.">>
<<set $takenWaterskin = true>>
<<Refresh>>
<<set $main.message = "">>
<</link>>
hangs by a long strap on the wall nail.
<</if>>
<</if>>
<</widget>>
<<widget "DescribeOilBarrel">>
<<if $shedOpen == true>>
In the back are a <<link "large oil barrel">><<set $main.message = "A freshly unsealed oil barrel, filled to the top. ">><<Refresh>><<set $main.message = "">><</link>> with a box of <<link "torches">><<set $main.message = "You can cast illumination to no end, it's your main practice spell. You hopefully won't need the torches. ">><<Refresh>><<set $main.message = "">><</link>> next to it.
<</if>>
<</widget>>
<<widget "DescribePlank">>
<<if $boulderLifted == false>>
Just below you can see a <<link "massive boulder">><<set $main.message = "A long, wooden plank that juts out from beneath it, wedged against the wall.
">><<Refresh>><<set $main.message = "">><</link>>.
<<else>>
The huge boulder lies at the bottom, all alone now.
<</if>>
<</widget>>
<<widget "DescribeKoboldSign">>
A <<link "sign">><<set $main.message = ` You recognize human, but the other two are in dwarven runes and in an unfamiliar, angular script. The words you recognize spell "Elkjumist". `>><<Refresh>><<set $main.message = "">><</link>> is painted on the door in three languages. Above the writing is a <<link "spyhole">><<set $player.location = $rooms.find(e => e.id == "sceneKobold")>><<Refresh>> <</link>>.
<</widget>>
<<widget "DescribeDigSiteCarts">>
One of the carts draws your attention. Peering inside reveals a bunch of <<link "geodes">>
<<set $main.message = "Geology was not your favorite subject at school, but you know these have crystals inside. You'll need to know what you are looking for first. ">>
<<Refresh>>
<<set $main.message = "">>
<</link>> of varied shapes, colors and sizes.
<</widget>>
<<widget "DescribeVice">>
To the right side of the table is a large
<<link "vice">>
<<set $main.message = "After placing whatever you need to hold still in the middle all you need to do is to tighten the screws.">>
<<Refresh>>
<<set $main.message = "">>
<</link>>.
<</widget>>
<<widget "DescribeAssayerTable">>
In the center of the room stands a long, sturdy <<link "table">><<set $main.message = "A meticulously organized array of interesting rock samples stretch along it. Each sample is neatly labeled in runic, hinting at the types of ore found within the mine. ">><<Refresh>><<set $main.message = "">><</link>>.
<</widget>>
<<widget "DescribeBear">>
<<set $seenBear++>>
<<if $seenBear == 0>>
Along the eastern wall, where your light does not reach, is a silhouette of a dark <<link "bear-like shape">><<Refresh>><</link>> lying and, you hope, sleeping.
<<elseif $seenBear == 1>>
The silhouette is really just a very <<link " interesting rock formation">><<Refresh>><</link>>, on closer look.
<<elseif $seenBear > 1>>
The "bear" is out, stone cold, and pays no attention to you.
<</if>>
<</widget>>
<<widget "DescribeRelief">>
A <<link "faded relief">><<set $main.message = " A valiant knight in armor, which would probably gleam if it wasn't just a carving, and a ferocious dragon three times the man's size, breathing fire. The details are impressive given the time that must have passed, as you can't recall dragons in this region being a thing in generations.">><<Refresh>><<set $main.message = "">><</link>> on the surface depicts a battle.
<</widget>>
<<widget "DescribeTablet">>
A <<link "stone tablet">><<set $main.message = " In elegant human script an inscription tells the tale of Sir Gareth, who with courage and wit slew the mighty beast. He is buried beyond this door, along with his most treasured possessions, the spear, the shield and the potion brewed from the blood of the dragon. ">><<Refresh>><<set $main.message = "">><</link>> is embedded in the cave wall to the right.
<</widget>>
<<widget "DescribeSarcophagus">>
In the center of the pillars rests a massive sarcophagus, it's surface perfectly smooth. The lid is
<<link "slightly ajar">>
<<set $player.location = $rooms.find(e => e.id == "sceneAssayer")>>
<<goto MainPassage>>
<</link>>.
<</widget>><<set $hotspots = [
{
id: "minecarts",
name: "Minecarts",
description: "<<DescribeEntranceMinecarts>>",
location: "entranceTunnel",
isContainer: 0,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "halfFilledCarts",
name: "Teetering cart",
description: `A
<<link "cart">>
<<set $hotspots.find(e => e.id == "halfFilledCarts").location = "bottomMain">>
<<set $hotspots.find(e => e.id == "halfFilledCarts").name = "Smashed cart">>
<<set $hotspots.find(e => e.id == "halfFilledCarts").description = "The cart that fell from above is completely smashed. ">>
<<set $main.message = "The moment you touch it the cart topples over into the hole. You hear a splash and a somewhat satisfying crash. There is water down there, but it is shallow. ">>
<<Refresh>>
<<set $main.message = "">>
<</link>>
overflowing with rocks is balanced precariously at the edge. `,
location: "mainShaft",
isContainer: -1,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "crank",
name: "Winch",
description: `<<if $ropeTied == false>> Behind the shaft stands a <<link "large winch.">><<set $main.message = "Loose rope is coiled around it and stretches towards the hole. It doesn't reach, and the end is marred with burns. ">><<Refresh>><<set $main.message = "">><</link>> <<else>> The rope is coiled around the winch and secured with the hook. <</if>>`,
location: "mainShaft",
isContainer: -1,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "spyhole",
name: "Spyhole",
description: "",
location: "narrowTunnel",
isContainer: -1,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "shedDoor",
name: "Shed door",
description: "",
location: "mainShaft",
isContainer: -1,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "koboldSign",
name: "Sign",
description: "<<DescribeKoboldSign>>",
location: "narrowTunnel",
isContainer: -1,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "tools",
name: "Tools",
description: "<<DescribeTools>>",
location: "toolShed",
isContainer: -1,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "barrelsOil",
name: "Oil barrel",
description: "<<DescribeOilBarrel>>",
location: "toolShed",
isContainer: -1,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "distantYells",
name: "",
description: `<<if $seenDistantYells == false>><<link "Distant yells">><<set $main.message = "You listen for a while but the yelling has stopped. ">><<Refresh>><<set $main.message = "">><</link>> for help just barely manage to reach you, but are drowned out by a loud crash. <<set $seenDistantYells = true>><</if>> `,
location: "caveInPassage",
isContainer: -1,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "rockPlank",
name: "Long plank",
description: "<<DescribePlank>>",
location: "underwater",
isContainer: -1,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "boulder",
name: "Heavy boulder",
description: "",
location: "underwater",
isContainer: -1,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "bottomBurrow",
name: "Burrow",
description: "The east wall is different, it's rock broken away into a pile revealing the mud behind, as if something the size of a bear burrowed through. ",
location: "bottomSecond",
isContainer: -1,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "gap",
name: "First gap",
description: "",
location: "bottomSecond",
isContainer: -1,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "digSiteCarts",
name: "Geode cart",
description: "<<DescribeDigSiteCarts>>",
location: "digSite",
isContainer: 0,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "assayerTable",
name: "Table",
description: "<<DescribeAssayerTable>>",
location: "assayersRoom",
isContainer: -1,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "vice",
name: "Vice",
description: "<<DescribeVice>>",
location: "assayersRoom",
isContainer: -1,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "fallenWardrobe",
name: "Wardrobe",
description: "",
location: "mainStoreroom",
isContainer: -1,
isSupport: -1,
isLocked: -1,
isSwitch: 0,
isListed: true,
},
{
id: "storeroomBurrow",
name: "Burrow",
description: "Another burrow marks the south wall. ",
location: "mainStoreroom",
isContainer: -1,
isSupport: -1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "bear",
name: "Scary shape",
description: "<<DescribeBear>>",
location: "cave",
isContainer: -1,
isSupport: -1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "relief",
name: "Relief",
description: "<<DescribeRelief>>",
location: "tombDoor",
isContainer: -1,
isSupport: -1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "tombSign",
name: "Tomb sign",
description: "<<DescribeTablet>>" ,
location: "tombDoor",
isContainer: -1,
isSupport: -1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "sacrophagus",
name: "Sarcophagus",
description: `<<DescribeSarcophagus>>`,
location: "garethTomb",
isContainer: 0,
isSupport: -1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "pedestals",
name: "Pedestals",
description: `Next to it are three pedestals. On top of one is Sir Gareth's shield, and the other has his spear. Alas, the spear has been bitten in half. The potion is notably missing from the third pedestal.`,
location: "garethTomb",
isContainer: -1,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "worker",
name: "Injured worker",
description: "",
location: "mainStoreroom",
isContainer: -1,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "hotspotMole",
name: "Douglass",
description: "",
location: "sceneMole",
isContainer: -1,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
{
id: "cage",
name: "Small cage",
description: `<br> A hamster cage lies trashed under the table. Looks like someone's pet ran away. A large ornate "D" is engraved above where the door used to be. `,
location: "assayersRoom",
isContainer: -1,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
},
]>>
/* Hotspots example
{
id: "fridge",
name: "Fridge",
description: "<<DescribeFridge>>",
location: "kitchen",
isContainer: 0,
isSupport: 1,
isLocked: -1,
isSwitch: -1,
isListed: true,
}
*/<<widget "Use">>
// Using key on shed door
<<if $selected1 == "shedKey" && $selected2 == "shedDoor" || $selected1 == "shedDoor" && $selected2 == "shedKey">>
<<set $shedOpen = true>>
<<set $player.inventory = false>>
<<set $items.find(e => e.id == "shedKey").location = "">>
<<set $main.message = "The key fits, and without even a creak the padlock pops open.">>
<</if>>
// Combining rope with hook
<<if $selected1 == "hook" && $selected2 == "longRope" || $selected1 == "longRope" && $selected2 == "hook">>
<<set $ropeTied = true>>
<<set $items.find(e => e.id == "longRope").location = "">>
<<set $items.find(e => e.id == "hook").location = "">>
<<set $items.find(e => e.id == "hookedRope").location = "inventory">>
<<set $player.inventory = false>>
<<set $main.message = "You thread the rope through the hooks hole then tie it around itself. It should hold much better now. ">>
<</if>>
//Attaching hook rope to the winch
<<if $selected1 == "hookedRope" && $selected2 == "crank" || $selected1 == "crank" && $selected2 == "hookedRope">>
<<set $items.find(e => e.id == "hookedRope").location = "">>
<<set $main.message = "You replace the burned rope with the new one and secure it with a hook.">>
<</if>>
//Using telekinesis on boulder
<<if $selected1 == "telekinesisSpell" && $selected2 == "boulder" || $selected1 == "boulder" && $selected2 == "telekinesisSpell">>
<<set $boulderLifted = true>>
<<set $hotspots.find(e => e.id == "boulder").location = "">>
<<set $hotspots.find(e => e.id == "rockPlank").location = "">>
<<set $items.find(e => e.id == "longPlank").location = "inventory">>
<<set $main.message = `You mumble the spell, bubbles hitting your face. The boulder lifts for a second, just enough for the wooden plank to float up into your hands, then sets gently on the ground again. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//Using plank on gap
<<if $selected1 == "longPlank" && $selected2 == "gap" || $selected1 == "gap" && $selected2 == "longPlank">>
<<set $items.find(e => e.id == "longPlank").location = "">>
<<set $plankPlaced = true>>
<<set $main.message = `You set the plank down over the first gap. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
// book + ringNote get raphirePage
<<if $selected1 == "book" && $selected2 == "ringNote" || $selected1 == "ringNote" && $selected2 == "book">>
<<set $items.find(e => e.id == "book").location = "">>
<<set $items.find(e => e.id == "ringNote").location = "">>
<<set $items.find(e => e.id == "raphirePage").location = "inventory">>
<<set $main.message = `You find the page about raphire and rip it out, leaving the book and the note aside. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
// raphirePage + digSiteCarts -> raphire
<<if $selected1 == "raphirePage" && $selected2 == "digSiteCarts" || $selected1 == "digSiteCarts" && $selected2 == "raphirePage">>
<<set $items.find(e => e.id == "raphirePage").location = "">>
<<set $items.find(e => e.id == "geode").location = "inventory">>
<<set $main.message = `After a minute of rummaging about the rock pile you find it, the blue geode. Now to get it open. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//geode + vice
<<if $selected1 == "geode" && $selected2 == "vice" || $selected1 == "vice" && $selected2 == "geode">>
<<set $items.find(e => e.id == "geode").location = "">>
<<set $geodePlaced = true>>
<<set $hotspots.find(e => e.id == "vice").name = "Vice (with Geode inside)">>
<<set $hotspots.find(e => e.id == "vice").description = "The geode is screwed in tight in the vice. ">>
<<set $main.message = `You place the geode in the vice and screw it in tight. It's ready to crack. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//hammer + vice
<<if $selected1 == "smallHammer" && $selected2 == "vice" || $selected1 == "vice" && $selected2 == "smallHammer">>
<<if $geodeBroken == false && $geodePlaced == true>>
<<set $items.find(e => e.id == "smallHammer").location = "">>
<<set $items.find(e => e.id == "raphire").location = "inventory">>
<<set $hotspots.find(e => e.id == "vice").name = "Vice">>
<<set $hotspots.find(e => e.id == "vice").description = "<<DescribeVice>>">>
<<set $main.message = `With a good whack the stone forms a crack. When you unscrew the vice the pieces part way, and your face is illuminated by the soft blue grow of raphire. You take the crystal. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<<else>>
<<set $main.message = `You need to place something in it first. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
<</if>>
// ring + raphire = magicRing
<<if $selected1 == "ring" && $selected2 == "raphire" || $selected1 == "raphire" && $selected2 == "ring">>
<<set $items.find(e => e.id == "ring").location = "">>
<<set $items.find(e => e.id == "raphire").location = "">>
<<set $items.find(e => e.id == "magicRing").location = "inventory">>
<<set $hasMagicRing = true>>
<<set $main.message = `Raphire pops neatly into place. The resulting flash almost blinds you, but after your eyes recover you feel the ring pulsate with immense power. Your telekinesis should work better now. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
// telekinesis + wardrobe , with and without ring
<<if $selected1 == "telekinesisSpell" && $selected2 == "fallenWardrobe" || $selected1 == "fallenWardrobe" && $selected2 == "telekinesisSpell">>
<<if $hasMagicRing == false>>
<<set $player.inventory = false>>
<<set $main.message = `The wardrobe shifts as the poor man groans, but the spell is not strong enough to lift it clear. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<<else>>
<<set $items.find(e => e.id == "magicRing").location = "">>
<<set $helpedWorker = true>>
<<set $main.message = `The wardrobe lifts high enough for the man to crawl out from beneath. The ring becomes unbearably hot and the crystal bursts. You toss the thing away as the wardrobe slams back down and shatters. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
<</if>>
// Filling waterskin emptyWaterskin + barrelsOil => filledWaterskin
<<if $selected1 == "emptyWaterskin" && $selected2 == "barrelsOil" || $selected1 == "barrelsOil" && $selected2 == "emptyWaterskin">>
<<set $items.find(e => e.id == "emptyWaterskin").location = "">>
<<set $items.find(e => e.id == "filledWaterskin").location = "inventory">>
<<set $filledWaterskin = true>>
<<set $main.message = `You dip the skin into the barrel and wait, then pull out. Don't wipe your hand on your pants please. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
// using note on spyhole
<<if $selected1 == "koboldTranslation" && $selected2 == "spyhole" || $selected1 == "spyhole" && $selected2 == "koboldTranslation">>
<<set $shownKoboldsNote = true>>
<<set $player.location = $rooms.find(e => e.id == "sceneKobold")>>
<<Refresh>>
<<set $player.inventory = false>>
<</if>>
//using potion on worker
<<if $selected1 == "healingWater" && $selected2 == "worker" || $selected1 == "worker" && $selected2 == "healingWater">>
<<set $player.location = $rooms.find(e => e.id == "sceneWorker")>>
<<set $items.find(e => e.id == "healingWater").location = "">>
<<set $healedWorker = true>>
<<set $seenWardrobe = 0>>
<<set $player.inventory = false>>
<</if>>
// garethArm + monocle
<<if $selected1 == "garethArm" && $selected2 == "monocle" || $selected1 == "monocle" && $selected2 == "garethArm">>
<<if $monocleReach == true>>
<<if $items.find(e => e.id == "monocle").location == "sceneMole">>
<<set $items.find(e => e.id == "garethArm").location = "">>
<<set $items.find(e => e.id == "monocle").location = "inventory">>
<<set $items.find(e => e.id == "monocle").name = "Monocle">>
<<set $main.message = `With knight's help you reach the glass and pull it over to you. Douglass is shooting fire but bone doesn't mind at all. After taking a closer look, you realize it is a monocle. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
<<else>>
<<set $main.message = `It is too far. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
<</if>>
// telekinesis + monocle
<<if $selected1 == "telekinesisSpell" && $selected2 == "monocle" || $selected1 == "monocle" && $selected2 == "telekinesisSpell">>
<<if $items.find(e => e.id == "monocle").location == "sceneMole">>
<<set $monocleReach = true>>
<<set $items.find(e => e.id == "telekinesisSpell").location = "">>
<<set $main.message = `The spell pulls the glass almost within reach, but fizzles out at the last stretch. You're feeling exhaused.<<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
<</if>>
// use monocle on strengthPotion, trigger $seenLabel
<<if $selected1 == "strengthPotion" && $selected2 == "monocle" || $selected1 == "monocle" && $selected2 == "strengthPotion">>
<<if $items.find(e => e.id == "monocle").location == "inventory">>
<<set $items.find(e => e.id == "monocle").location = "">>
<<set $seenLabel = true>>
<<set $main.message = `With monocle pinched by your eye socket you can make out the fine print in the label. "Do not consume with food. Powerful emetic effect." How many adventurers found that one out the hard way, you wonder. <<set $main.message = "">> `>>
<<set $items.find(e => e.id == "strengthPotion").description = `The small purple bottle with a label attached by a string to the top. The label reads: "Doctor Lubinkov's Elixir of Might. Gives you the power of three men." It's a shame three times your strength is still going to be a wall smear if you try to fight this giant. There is a smaller writing in the corner of the label warning of the <b>emetic side effect.</b>`>>
<<set $player.inventory = false>>
<<else>>
<<set $main.message = `You have to get the glass first somehow. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
<</if>>
//use strengthPotion on munchies
<<if $selected1 == "strengthPotion" && $selected2 == "blindMoleTreats" || $selected1 == "blindMoleTreats" && $selected2 == "strengthPotion">>
<<if $seenLabel == true>>
<<set $items.find(e => e.id == "strengthPotion").location = "">>
<<set $items.find(e => e.id == "blindMoleTreats").description = `Wrapped in thick cloth are some kind of wormy meatballs. A little note says "Sei hai tu Douglas for uz" You can smell the potion fuming off of the wrap.`>>
<<set $treatsSoaked = true>>
<<set $main.message = `You pop the bottle open and pour it over the wrap, letting it all sink into the critter's favorite meal. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<<else>>
<<set $main.message = `Why waste a perfectly good strength potion like that? Do you want to make the beast stronger? <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
<</if>>
//use munchies on mole hotspotMole + blindMoleTreats
<<if $selected1 == "hotspotMole" && $selected2 == "blindMoleTreats" || $selected1 == "blindMoleTreats" && $selected2 == "hotspotMole">>
<<if $treatsSoaked == true>>
<<set $player.inventory = false>>
<<set $items.find(e => e.id == "blindMoleTreats").location == "">>
<<set $player.location = $rooms.find(e => e.id == "sceneEnd")>>
<<else>>
<<set $main.message = `He'd probably enjoy them, but you won't accomplish much. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
<</if>>
// EXTRA INTERACTIONS
//longRope + crank - > message
<<if $selected1 == "longRope" && $selected2 == "crank" || $selected1 == "crank" && $selected2 == "longRope">>
<<set $main.message = `You can tie the rope around the winch easily, but it doesn't feel safe enough when you test it with your weight. There should be a better way to secure it. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//hook + crank - > message
<<if $selected1 == "hook" && $selected2 == "crank" || $selected1 == "crank" && $selected2 == "hook">>
<<set $main.message = `You can attach it easily, but the current rope is too short. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//hook + shedKey - >message
<<if $selected1 == "hook" && $selected2 == "shedKey" || $selected1 == "shedKey" && $selected2 == "hook">>
<<set $main.message = `You could hang the keychain on a hook, if it were attached to a wall. Or you can just toss the keys anywhere after you use them. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//telekinesisSpell + shedDoor if shed locked
<<if $selected1 == "telekinesisSpell" && $selected2 == "shedDoor" || $selected1 == "shedDoor" && $selected2 == "telekinesisSpell">>
<<if $shedOpen == false>>
<<set $main.message = `You are great at telekinesis, but not "rip the door out with power of mind" great. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<<else>>
<<set $main.message = `No need to go Arcane on it, the door is already unlocked. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
<</if>>
//filledWaterskin shedDoor, filledWaterskin crank
<<if $selected1 == "filledWaterskin" && $selected2 == "shedDoor" || $selected1 == "shedDoor" && $selected2 == "filledWaterskin">>
<<set $main.message = `The hinges are actually already oiled. Not that you would want to waste your time doing their job either way. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
// moneyPouch + anything but spyhole - > You don't want to waste gold
<<if $selected1 == "moneyPouch" && $selected2 != "spyhole" || $selected1 != "spyhole" && $selected2 == "moneyPouch">>
<<set $main.message = `You do not intend to waste gold without reason. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
// filledWaterskin + barrelsOil - >it is already full
<<if $selected1 == "filledWaterskin" && $selected2 == "barrelsOil" || $selected1 == "barrelsOil" && $selected2 == "filledWaterskin">>
<<set $main.message = `The waterskin is already full. How much oil does a mage really need? <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
// hook + telekinesisSpell , hook + minecarts
<<if $selected1 == "hook" && $selected2 == "telekinesisSpell" || $selected1 == "telekinesisSpell" && $selected2 == "hook">>
<<set $main.message = `You hold the hook out in your hand, then levitate it for a few seconds, before grabbing it back again. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//longRope +barrelsOil
<<if $selected1 == "longRope" && $selected2 == "barrelsOil" || $selected1 == "barrelsOil" && $selected2 == "longRope">>
<<set $main.message = `There is no way you could climb an oiled rope. You tried before. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
<<if $selected1 == "longRope" && $selected2 == "filledWaterskin" || $selected1 == "filledWaterskin" && $selected2 == "longRope">>
<<set $main.message = `There is no way you could climb an oiled rope. You tried before. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//hook +barrelsOil
<<if $selected1 == "hook" && $selected2 == "filledWaterskin" || $selected1 == "filledWaterskin" && $selected2 == "hook">>
<<set $main.message = `The hook isn't rusty. Better leave it as it is. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
<<if $selected1 == "hook" && $selected2 == "barrelsOil" || $selected1 == "barrelsOil" && $selected2 == "hook">>
<<set $main.message = `The hook isn't rusty. Better leave it as it is. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//telekinesisSpell + barrelsOil
<<if $selected1 == "telekinesisSpell" && $selected2 == "barrelsOil" || $selected1 == "barrelsOil" && $selected2 == "telekinesisSpell">>
<<set $main.message = `You could lift it if you wanted to. You don't, but you could if you did. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//telekinesis minecarts
//telekinesisSpell + barrelsOil
<<if $selected1 == "telekinesisSpell" && $selected2 == "minecarts" || $selected1 == "minecarts" && $selected2 == "telekinesisSpell">>
<<set $main.message = `They are already turned over and open for plunder. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//telekinesis winch
<<if $selected1 == "telekinesisSpell" && $selected2 == "crank" || $selected1 == "crank" && $selected2 == "telekinesisSpell">>
<<set $main.message = `It is easy enough to turn it by hand. Well not for you, but there is still no need to waste magic turning the winch. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//hookedRope + shedDoor
<<if $selected1 == "hookedRope" && $selected2 == "shedDoor" || $selected1 == "shedDoor" && $selected2 == "hookedRope">>
<<set $main.message = `If you attach it to the door the rope will not reach the bottom of the hole. There should be a more convinient spot to place the hook. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
// anything with halfFilledCarts
<<if $selected1 == "halfFilledCarts" || $selected2 == "halfFilledCarts">>
<<set $hotspots.find(e => e.id == "halfFilledCarts").location = "bottomMain">>
<<set $hotspots.find(e => e.id == "halfFilledCarts").name = "Smashed cart">>
<<set $hotspots.find(e => e.id == "halfFilledCarts").description = "The cart that fell from above is completely smashed. ">>
<<set $main.message = `The moment you touch it the cart topples over into the hole. You hear a splash and a somewhat satisfying crash. There is water down there, but it is shallow. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//telekinesisSpell + rockPlank
<<if $selected1 == "telekinesisSpell" && $selected2 == "rockPlank" || $selected1 == "rockPlank" && $selected2 == "telekinesisSpell">>
<<set $main.message = `The plank struggles to get loose, but in vain. You'll need to deal with the rock first. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//telekinesisSpell + bottomBurrow
<<if $selected1 == "telekinesisSpell" && $selected2 == "bottomBurrow" || $selected1 == "bottomBurrow" && $selected2 == "telekinesisSpell">>
<<set $main.message = `You tried digging with telekinesis before, and it is as exhausting as doing it with a shovel. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//Telekinesis + vice - You close and open it a little with your mind. You shoulprobably not be wasting magic like that
<<if $selected1 == "telekinesisSpell" && $selected2 == "vice" || $selected1 == "vice" && $selected2 == "telekinesisSpell">>
<<set $main.message = `You tigthen and untighten the vice without touching it. A complete waste of time. But then again so is most of life. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
// telekinesis worker
<<if $selected1 == "telekinesisSpell" && $selected2 == "worker" || $selected1 == "worker" && $selected2 == "telekinesisSpell">>
<<if $helpedWorker == false>>
<<set $main.message = `Lifting the worker might get him hurt even more. Moving the wardrobe first is safer. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<<else>>
<<set $main.message = `He is out of danger now, no need to toss him about. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
<</if>>
//*Hammer silver ring - You would ruin the engravings if you hit it.
<<if $selected1 == "smallHammer" && $selected2 == "ring" || $selected1 == "ring" && $selected2 == "smallHammer">>
<<set $main.message = `You can't bear to destroy such a work of crafstmanship. That and you need it. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//*hammer geode
<<if $selected1 == "smallHammer" && $selected2 == "geode" || $selected1 == "geode" && $selected2 == "smallHammer">>
<<set $main.message = `You put the geode down and try to break it open, but it keeps shifting. You only chip the surface a bit. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
// hammer fallen wardrobe
<<if $selected1 == "smallHammer" && $selected2 == "fallenWardrobe" || $selected1 == "fallenWardrobe" && $selected2 == "smallHammer">>
<<set $main.message = `The hammer is too small to be of any use here. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//oilskin wardrobe
<<if $selected1 == "filledWaterskin" && $selected2 == "fallenWardrobe" || $selected1 == "fallenWardrobe" && $selected2 == "filledWaterskin">>
<<set $main.message = `You think about pouring oil on the floor then pushing the wardrobe. It would slide off easily but you might crush the poor man in the process. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//*magic ring + magic ring note - The silver ring matches the one in the drawing, but it lacks a crystal to give it power.
<<if $selected1 == "ring" && $selected2 == "ringNote" || $selected1 == "ringNote" && $selected2 == "ring">>
<<set $main.message = `The silver ring matches the one in the drawing, but it lacks a crystal to give it power. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//Ring + guide - You don't need the book to tell you this is silver.
<<if $selected1 == "book" && $selected2 == "ring" || $selected1 == "ring" && $selected2 == "book">>
<<set $main.message = `You don't need the guide to tell you this is silver. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//Telekinesis + geode cart -
<<if $selected1 == "telekinesisSpell" && $selected2 == "digSiteCarts" || $selected1 == "digSiteCarts" && $selected2 == "telekinesisSpell">>
<<set $main.message = `You can search by hand when you know what to look for. No need to tip it over. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//Guide + geode cart -
<<if $selected1 == "book" && $selected2 == "digSiteCarts" || $selected1 == "digSiteCarts" && $selected2 == "book">>
<<set $main.message = `There are about 20 pages on nothing but geodes in the guide. Knowing the exact crystal name would help narrow it down. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//Note + geode cart -
<<if $selected1 == "ringNote" && $selected2 == "digSiteCarts" || $selected1 == "digSiteCarts" && $selected2 == "ringNote">>
<<set $main.message = `You are looking for raphire, but the note doesn't describe what its geode looks like. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//Blue geode + ring -
<<if $selected1 == "ring" && $selected2 == "geode" || $selected1 == "geode" && $selected2 == "ring">>
<<set $main.message = `You need to get the crystal out first. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//hammer plus geode cart
<<if $selected1 == "smallHammer" && $selected2 == "digSiteCarts" || $selected1 == "digSiteCarts" && $selected2 == "smallHammer">>
<<set $main.message = `There is no time to crack all of them. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
//magic ring wardrobe
<<if $selected1 == "magicRing" && $selected2 == "fallenWardrobe" || $selected1 == "fallenWardrobe" && $selected2 == "magicRing">>
<<set $main.message = `Your magic is stronger now. <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
// worker plus treats blindMoleTreats
<<if $selected1 == "blindMoleTreats" && $selected2 == "worker" || $selected1 == "worker" && $selected2 == "blindMoleTreats">>
<<set $main.message = `Creston: "Not my cup of tea, but moles go wild for them. Give it to Doug, he'll love it." <<set $main.message = "">> `>>
<<set $player.inventory = false>>
<</if>>
<<set $selected1 = "">>
<<set $selected2 = "">>
<<Refresh>>
<<set $main.message = "">>
<</widget>>
/*
<<if $selected1 == "beer" && $selected2 == "bottleOpener" ||
$selected1 == "bottleOpener" && $selected2 == "beer"
>>
<<if $beerOpen == false>>
<<set $beerOpen = true>>
<<else>>
<<set $main.message = "It is already open.">>
<</if>>
*//* Print Items, displays the items in room */
<<widget "PrintItems">>
<<for _i = 0; _i < $items.length; _i++>>
<<if $items[_i].location == $player.location.id && $items[_i].isListed>>
<<if $items[_i].description == "">>
<<set $main.display += $items[_i].name + " ">>
<<else>>
<<set $main.display += $items[_i].description + " ">>
<</if>>
<<set $main.display += "<br>">>
<</if>>
<</for>>
<</widget>>
/*Item descriptions */
<<widget "DescribeHook">>
<<if $items.find(e => e.id == "hook").location == "inventory">>
The hook is large and sturdy, but most of the rope is gone.
<</if>>
<</widget>>
<<widget "DescribeShedKey">>
<<if $items.find(e => e.id == "shedKey").location == "restArea">>
<<link "Something">>
<<set $items.find(e => e.id == "shedKey").location = "inventory">>
<<set $main.message = "You pick up a large metal key.">>
<<Refresh>>
<<set $main.message = "">>
<</link>>
is glittering in a pile of dust.
<<elseif $items.find(e => e.id == "shedKey").location == "inventory">>
It is very bulky, as if for a padlock.
<</if>>
<</widget>>
<<widget "DescribeLongRope">>
<<if $items.find(e => e.id == "longRope").location == "toolShed">>
A coiled length of
<<link "rope">>
<<set $items.find(e => e.id == "longRope").location = "inventory">>
<<set $main.message = "You take the rope.">>
<<Refresh>>
<<set $main.message = "">>
<</link>>
is sitting on top of a crate.
<<elseif $items.find(e => e.id == "longRope").location == "inventory">>
It is brand new and of very good quality.
<</if>>
<</widget>>
<<widget "DescribeHookedRope">>
<<if $items.find(e => e.id == "hookedRope").location == "inventory">>
A long piece of rope with a metal hook attached at the end.
<</if>>
<</widget>>
<<widget "DescribeHammer">>
<<if $items.find(e => e.id == "smallHammer").location == "assayersRoom">>
A
<<link "hammer">>
<<set $items.find(e => e.id == "smallHammer").location = "inventory">>
<<set $main.message = "You take the hammer.">>
<<Refresh>>
<<set $main.message = "">>
<</link>>
for breaking down small samples sits on the table.
<<else>>
A hammer for breaking down small samples. The tip is sharp on one end, like a pick.
<</if>>
<</widget>>
<<widget "DescribeNote">>
An engraved ring with a crystal inserted is drawn on one side. The text next to it reads "Boosts magic power. Requires Raphire crystal".
<</widget>>
<<widget "DescribeRing">>
<<if $items.find(e => e.id == "ring").location != "inventory">>
A silver
<<link "ring">>
<<set $items.find(e => e.id == "ring").location = "inventory">>
<<set $main.message = "You take the ring.">>
<<Refresh>>
<<set $main.message = "">>
<</link>>
is lying in the smouldering rubble.
<<else>>
A beautiful silver ring, covered with fine engravings. It has an empty socket for a gem or crystal. You sense magic potential in it, but it is useless in it's current state.
<</if>>
<</widget>>
<<widget "DescribeMagicRing">>
A beautiful silver ring, covered with fine engravings. Raphire has been inserted into the socket and pulsates in light blue glow. Your spells feel more powerful while wearing it.
<</widget>>
<<widget "DescribeBook">>
<<if $items.find(e => e.id == "book").location != "inventory">>
A sizable
<<link "tome">>
<<set $items.find(e => e.id == "book").location = "inventory">>
<<set $main.message = "You take the book.">>
<<Refresh>>
<<set $main.message = "">>
<</link>>
is right next to it.
<<else>>
"Assayer's Guide To Rocks, Gems, Crystals and all things Earthy. By Burndil Huggingmead." Everything you ever didn't want to know about identifying valuables from mud. Better to only look up something specific, no time to read cover to cover.
<</if>>
<</widget>>
<<widget "DescribeRaphirePage">>
The page contains not only an illustration of the crystal but of the geode it is commonly found in. Anyone could be an assayer with this book. Hint: Don't tell the dwarf that.
<</widget>>
<<widget "DescribeGeode">>
A heavy round rock, dotted with light blue specks. You sense the power inside it even as you hold it.
<</widget>>
<<widget "DescribeRaphire">>
The light blue crystal shimmers in your hand. You can't use it's power directly, however, it is used as a power source for enchantments.
<</widget>>
<<widget "DescribeMonocle">>
<<if $items.find(e => e.id == "monocle").location == "sceneMole">>
A small
<<link "piece of glass">>
<<set $main.message = "You reach for it but Douglass singes your hand instantly. His hearing is really good.">>
<<Refresh>>
<<set $main.message = "">>
<</link>>
is just out of reach next to a pillar to the right.
<<else>>
A well polished monocle. It enlarges everything seen through it.
<</if>>
<</widget>>
<<widget "DescribeStrengthPotion">>
<<if $items.find(e => e.id == "strengthPotion").location == "sceneMole">>
A
<<link "purple bottle">>
<<set $items.find(e => e.id == "strengthPotion").location = "inventory">>
<<set $main.message = "You take the potion. ">>
<<Refresh>>
<<set $main.message = "">>
<</link>>
has rolled onto the floor right next to you in the commotion.
<<else>>
The small purple bottle with a label attached by a string to the top. The label reads: "Doctor Lubinkov's Elixir of Might. Gives you the power of three men." It's a shame three times your strength is still going to be a wall smear if you try to fight this giant. There is a smaller writing in the corner of the label you can't make out.
<</if>>
<</widget>>
<<widget "DescribeGarethArm">>
<<if $items.find(e => e.id == "garethArm").location == "sceneMole">>
<<link "Sir Gareth's arm">>
<<set $items.find(e => e.id == "garethArm").location = "inventory">>
<<set $main.message = "You yank at the arm and it pops free. It's yours now.">>
<<Refresh>>
<<set $main.message = "">>
<</link>>
is hanging out next to your face, making you think the ghost is messing with you again.
<<else>>
He's not using it anymore. Might as well lend a hand.
<</if>>
<</widget>><<set $items = [
{
id: "telekinesisSpell",
name: "Telekinesis Spell",
description: "The first one you ever learned. Gives you ability to lift objects with the power of mind. With your current power you can manage three times your own weight. You should not waste it lifting random things to show off. ",
/* 0 = on, 1 = in */
position: -1,
location: "inventory",
isListed: true,
},
{
id: "hook",
name: "Metal hook",
description: "<<DescribeHook>>",
/* 0 = on, 1 = in */
position: -1,
location: "",
isListed: true,
},
{
id: "shedKey",
name: "Key",
description: "<<DescribeShedKey>>",
/* 0 = on, 1 = in */
position: -1,
location: "restArea",
isListed: true,
},
{
id: "longRope",
name: "Long rope",
description: "<<DescribeLongRope>>",
/* 0 = on, 1 = in */
position: -1,
location: "toolShed",
isListed: true,
},
{
id: "hookedRope",
name: "Rope with hook",
description: "<<DescribeHookedRope>>",
/* 0 = on, 1 = in */
position: -1,
location: "",
isListed: true,
},
{
id: "longPlank",
name: "Long Plank",
description: "Damp, but long and sturdy.",
/* 0 = on, 1 = in */
position: -1,
location: "",
isListed: true,
},
{
id: "smallHammer",
name: "Small hammer",
description: "<<DescribeHammer>>",
/* 0 = on, 1 = in */
position: 0,
location: "assayersRoom",
isListed: true,
},
{
id: "ringNote",
name: "Magic Ring note",
description: "<<DescribeNote>>",
/* 0 = on, 1 = in */
position: 0,
location: "",
isListed: true,
},
{
id: "ring",
name: "Silver ring",
description: "<<DescribeRing>>",
/* 0 = on, 1 = in */
position: 0,
location: "mainStoreroom",
isListed: true,
},
{
id: "magicRing",
name: "Magic Ring",
description: "<<DescribeMagicRing>>",
/* 0 = on, 1 = in */
position: 0,
location: "",
isListed: true,
},
{
id: "book",
name: "Assayer's Guide",
description: "<<DescribeBook>>",
/* 0 = on, 1 = in */
position: 0,
location: "assayersRoom",
isListed: true,
},
{
id: "raphirePage",
name: "Raphire page",
description: "<<DescribeRaphirePage>>",
/* 0 = on, 1 = in */
position: 0,
location: "",
isListed: true,
},
{
id: "geode",
name: "Blue Geode",
description: "<<DescribeGeode>>",
/* 0 = on, 1 = in */
position: 0,
location: "",
isListed: true,
},
{
id: "raphire",
name: "Raphire crystal",
description: "<<DescribeRaphire>>",
/* 0 = on, 1 = in */
position: 0,
location: "",
isListed: true,
},
{
id: "koboldTranslation",
name: "Kobold note",
description: `The crumpled parchment has several kobold words for various alchemical products translated into common tongue. Among those is "Bulu akilga", meaning healing water. `,
/* 0 = on, 1 = in */
position: 0,
location: "",
isListed: true,
},
{
id: "moneyPouch",
name: "A large pouch",
description: `The leather bag contains several gold coins. `,
/* 0 = on, 1 = in */
position: 0,
location: "",
isListed: true,
},
{
id: "emptyWaterskin",
name: "Empty waterskin",
description: `A large leather skin. It smells of oil. `,
/* 0 = on, 1 = in */
position: 0,
location: "",
isListed: true,
},
{
id: "filledWaterskin",
name: "Oilskin",
description: `A large leather skin filled to the brim with oil.`,
/* 0 = on, 1 = in */
position: 0,
location: "",
isListed: true,
},
{
id: "healingWater",
name: "Healing water",
description: `The kobold slop smells foul, which probably means the healing is extra fast. `,
/* 0 = on, 1 = in */
position: 0,
location: "",
isListed: true,
},
{
id: "blindMoleTreats",
name: "Molerat Treats",
description: `Wrapped in thick cloth are some kind of wormy meatballs. A little note says "Sei hai tu Douglas for uz" `,
/* 0 = on, 1 = in */
position: 0,
location: "",
isListed: true,
},
{
id: "strengthPotion",
name: "Elixir of Might",
description: `<<DescribeStrengthPotion>>`,
/* 0 = on, 1 = in */
position: 0,
location: "sceneMole",
isListed: true,
},
{
id: "monocle",
name: "Round piece of glass",
description: "<<DescribeMonocle>>" ,
/* 0 = on, 1 = in */
position: 0,
location: "sceneMole",
isListed: true,
},
{
id: "garethArm",
name: "Sir Gareth's Arm",
description: `<<DescribeGarethArm>>`,
/* 0 = on, 1 = in */
position: 0,
location: "sceneMole",
isListed: true,
},
]>><<set $main = {
title: "",
display: "",
message: "",
settings: "",
}
>><div id= "main-screen">
<<MainPrint>>
<div>
<div id="main-passage" >
<h4 id="title">
<<print $main.title>>
</h4>
<div id="display">
<<print $main.display>>
</div>
<<if $main.message != "">>
<br>
<div id="message">
<<print $main.message>>
</div>
<</if>>
</div>
<hr>
<div id="settings">
<<print $main.settings>>
</div>
</div>
</div><<widget "PrintNpcs">>
<<for _i = 0; _i < $npcs.length; _i++>>
<<if $npcs[_i].location == $player.location.id && $npcs[_i].isListed>>
<<if $npcs[_i].description == "">>
<<set $main.display += $npcs[_i].name + " ">>
<<else>>
<<set $main.display += $npcs[_i].description + " ">>
<</if>>
<<set $main.display += "<br>">>
<</if>>
<</for>>
<</widget>>
<<widget "DescribeSally">>
<</widget>>/*this is where I'll be working on npcs once everything else is done*/
<<set $npcs = [
{
id: "Sally",
name: "Sally",
description: "This is Sally.",
location: "livingRoom",
isListed: true,
},
]>><<set $player = {
name: "",
description: "",
location: "",
inventory: false,
conversation: false,
scene:false,
}
>><<widget "MainPrint">>
<<if $player.inventory == true>>
<<PrintInventory>>
<<elseif $player.conversation == false && $player.scene == false>>
<<PrintRoom>>
<<PrintHotspots>>
<<PrintItems>>
<<PrintNpcs>>
<<PrintExits>>
<<PrintSettings>>
<</if>>
<</widget>>
<<widget "PrintInventory">>
<<set $main.title = "Inventory">>
<<set $main.display = "">>
<<set $main.settings = "">>
<<if $selected1 != "">>
<<set $main.display += `<span style="color: Salmon;"><b>Use with? </b></span>`>>
<<PrintUsables>>
<</if>>
<<for _i = 0; _i < $items.length; _i++>>
<<if $items[_i].location == "inventory" && $items[_i].isListed>>
/* the name should be wrapped inside of the use link that sets $selected1 to id of the item then refreshes */
<<if $items[_i].description == "">>
<<set $main.display += `<<link "` + $items[_i].name + `" >><<set $selected1 = "` + $items[_i].id + `">><<Refresh>><</link>>` + "<br>" >>
<<else>>
<<set $main.display += " * " + `<<link "` + $items[_i].name + `" >><<set $selected1 = "` + $items[_i].id + `">><<Refresh>><</link>>` + " - " + $items[_i].description + "<br>">>
<</if>> /* Closes item description check if */
<</if>> /* if item location is inventory and item is listed close */
<</for>> /* closes the main inventory item loop*/
<<set $main.settings += `<<button "Close">><<set $player.inventory = false>><<set $selected1 = "">><<set $selected2 = "">> <<Refresh>><</button>>`>>
<</widget>>
<<widget "PrintSettings">>
<<set $main.settings = `<<button "Inventory">><<set $player.inventory = true>>
<<Refresh>><</button>>
<<button "Save">><<set UI.saves()>><</button>>
<<button "Help">>
<<script>>
Dialog.setup('Help');
Dialog.wiki("Explore by clicking on links. <br> The links in <i>italic</i> are exits. <br> Use objects you discover through the inventory. The list of things you can use an object on will appear at the top of the inventory menu when an item link is clicked. <br> It is possible to speed up text scrolling by holding space. However, interrupting a scrolling text by clicking on a link with more scrolling text will break the messages. Click on REFRESH should this happen, or just enter and exit room. <br> You can save your game, but there are no deaths or dead ends outside of possible bugs. <br> When stuck, you can check hints. Click on them to reveal the text. <br> Good luck!");
Dialog.open();
<</script>>
<</button>>
<<button "Hints">>
<<script>>
Dialog.setup('Hints');
Dialog.wiki("How do I go down the first shaft?
<br>
<details><summary>* Hint</summary>There would normally be a rope tied around a winch, but it is gone. </details>
<details><summary>* Hint</summary>The tool shed should have extra supplies. </details>
<details><summary>* Hint</summary> It is locked, however. If only someone left a key. </details>
<details><summary>* Hint</summary> Examine the rest area thoroughly. </details>
<details><summary>* Hint</summary> The quartermaster dropped the shed keys during evacuation.</details>
<details><summary>* Hint</summary>You can grab the rope from the shed.</details>
<details><summary>* Hint</summary> However, just tying it up won't hold well enough.</details>
<details><summary>* Hint</summary> A hook would help.</details>
<details><summary>* Hint</summary> Like the one you found in the entrance tunnel in the cart.</details> <br>
How do I get up the second shaft?
<br>
<details><summary>* Hint</summary>Climbing up the gangplanks would be easy enough. If only most of them weren't missing. </details>
<details><summary>* Hint</summary> There should be something underwater that could help. </details>
<details><summary>* Hint</summary>For example, a long plank. </details>
<details><summary>* Hint</summary>It's stuck under a big rock however. </details>
<details><summary>* Hint</summary>It's too bad you don't have a way to lift heavy things. </details>
<details><summary>* Hint</summary>You are a mage. </details>
<details><summary>* Hint</summary>Cast your only spell on the boulder. The plank should be in your inventory right away. </details>
<details><summary>* Hint</summary>Place the plank on the first gap and climb up. </details> <br>
How do I lift the wardrobe?
<br>
<details><summary>* Hint</summary> Not by hand obviously. </details>
<details><summary>* Hint</summary> Alas, your magic powers aren't up to snuff either. </details>
<details><summary>* Hint</summary> But there is a way to fix that. Get the ring from the storeroom. </details>
<details><summary>* Hint</summary> North of the dig site is the dwarven assayer's room. </details>
<details><summary>* Hint</summary> She was working on a magic ring. Grab the note from the map and the book on the table. </details>
<details><summary>* Hint</summary> You will need a hammer too. Take note of the vice. </details>
<details><summary>* Hint</summary> There is a cart full of geodes, and one of them has the raphire crystal needed for the ring. </details>
<details><summary>* Hint</summary> You don't know the first thing about geology though. But you have a good book about it. </details>
<details><summary>* Hint</summary> Use the note on the book to look up what the raphire geode looks like. </details>
<details><summary>* Hint</summary> Use the page on the geode cart at the dig site to track down the geode. </details>
<details><summary>* Hint</summary> You can try the hammer on it anywhere but your hand is not practiced enough and it keeps slipping. You'll need to secure it in place. </details>
<details><summary>* Hint</summary> Place the geode in the vice, then use the hammer on it. </details>
<details><summary>* Hint</summary> Place the raphire crystal in the ring. </details>
<details><summary>* Hint</summary> With magic ring in inventory, your spell should work better. </details>
<details><summary>* Hint</summary> Lift the wardrobe with the spell. </details> <br>
How do I get the healing potion?
<br>
<details><summary>* Hint</summary> After speaking with Creston, he will give you the kobold translation. </details>
<details><summary>* Hint</summary> All you have to do is show it to the kobold alchemist. </details>
<details><summary>* Hint</summary> They are down the narrow tunnel leading north from the first shaft. </details>
<details><summary>* Hint</summary> But you still need some gold and oil. There is a chance you found them already. </details>
<details><summary>* Hint</summary> A pouch of gold is in the rest area on the table. </details>
<details><summary>* Hint</summary> There is a barrel of oil in the tool shed. </details>
<details><summary>* Hint</summary> And a skin to fill is hanging from the nail there too. </details>
<details><summary>* Hint</summary> Speaking with kobolds with both of those in the inventory will result in them giving you the healing water. </details>
<details><summary>* Hint</summary> Go back to Creston and give him the potion and molerat treats. Now that he is better he should clear the rubble for you to go into the cave. </details> <br>
How do I enter the tomb?
<br>
<details><summary>* Hint</summary> Just go down the cave to the door. </details>
<details><summary>* Hint</summary> Attempting to enter the tomb will summon Sir Gareth. </details>
<details><summary>* Hint</summary> Just answer his riddle, there are no wrong answers really. </details>
<details><summary>* Hint</summary>Examine the sarcophagus inside his tomb to continue. </details>
<details><summary>* Hint</summary> How do I calm down Doug?
</details>
<details><summary>* Hint</summary> He is an angry boy, but not always mean. </details>
<details><summary>* Hint</summary> He just has a tummy ache. </details>
<details><summary>* Hint</summary> Take the skeletal hand and the potion next to the sarcophagus. </details>
<details><summary>* Hint</summary> There is a label on the potion that is too hard to see. </details>
<details><summary>* Hint</summary> You can't reach the piece of glass. </details>
<details><summary>* Hint</summary> Pull it in with telekinesis. </details>
<details><summary>* Hint</summary> But it falls into a crack. You need to grab it with the hand. </details>
<details><summary>* Hint</summary> It is a monocle. Use it on the potion. </details>
<details><summary>* Hint</summary> Now you know that it has a valuable side effect. Pour the potion on the molerat treats. </details>
<details><summary>* Hint</summary> Feed Doug and enjoy the ending. </details> ");
Dialog.open();
<</script>>
<</button>>
<<button "Refresh">><<goto MainPassage>><</button>>`>>
<</widget>>
/takes id and array to look it up in as args
_args[0] - id
_args[1] -array
*/
<<widget "FindIndex">>
<<set _index = _args[1].findIndex(e => e.id == _args[0])>>
<<print _index>>
<</widget>>
<<widget "PrintUsables">>
<<set _printedSomething = false>>
/*print hotspot names as use links */
<<for _i = 0; _i < $hotspots.length; _i++>>
<<if $hotspots[_i].location == $player.location.id && $hotspots[_i].isListed>>
<<set $main.display += `<<link "` + $hotspots[_i].name + `" >><<set $selected2 = "` + $hotspots[_i].id + `">><<Use>><</link>>` + " | ">>
<<set _printedSomething = true>>
<</if>>
<<for _j = 0; _j < $items.length; _j++>>
<<if $items[_j].location == $hotspots[_i].id && ($hotspots[_i].isContainer == 1 || $items[_j].position == 0) && $hotspots[_i].isListed && $items[_j].isListed && $items[_j].id != $selected1>>
<<set $main.display += `<<link "` + $items[_j].name + `" >><<set $selected2 = "` + $items[_j].id + `">><<Use>><</link>>` + " | ">>
<<set _printedSomething = true>>
<</if>>
<</for>>
<</for>>
<<for _k = 0; _k < $items.length; _k++>>
<<if ($items[_k].location == $player.location.id || $items[_k].location == "inventory") && $items[_k].isListed && $items[_k].id != $selected1>>
<<set $main.display += `<<link "` + $items[_k].name + `" >><<set $selected2 = "` + $items[_k].id + `">><<Use>><</link>>` + " | ">>
<<set _printedSomething = true>>
<</if>>
<</for>>
<<if _printedSomething == true>>
<<set $main.display += "<br>">>
<</if>>
<</widget>><<set $shedOpen = false>>
<<set $usedHook = -1>> // -1 not taken, 0 taken, 1 used
<<set $ropeTied = false>>
<<set $boulderLifted = false>>
<<set $plankPlaced = false>>
<<set $geodePlaced = false>>
<<set $geodeBroken = false>>
<<set $hasMagicRing = false>>
<<set $seenLabel = false>>
<<set $treatsSoaked = false>>
<<set $chosen = false>>
<<set $helpedWorker = false>>
<<set $healedWorker = false>>
<<set $takenTranslation = false>>
<<set $takenGoldPouch = false>>
<<set $takenWaterskin = false>>
<<set $filledWaterskin = false>>
<<set $takenHealingPotion = false>>
<<set $monocleReach = false>>
<<set $cartsFall = false>>
<<set $seenMouse = false>>
<<set $seenDistantYells = false>>
<<set $seenShaftBottom = false>>
<<set $seenDigSite = false>>
<<set $seenAssayersRoom = false>>
<<set $seenTombDoor = false>>
<<set $seenTomb = false>>
<<set $seenWardrobe = -1>>
// -1 worker injured, 0 first time , 1 main description
<<set $seenBear = -1>>
<<set $seenForward = 0>>
//conversations
<<set $spokenGhost = false>>
<<set $spokenKoboldsNoNote = false>>
<<set $spokenKoboldsNote = false>>
<<set $shownKoboldsNote = false>>
<<set $spokenKoboldsIngredients = false>>
<<set $spokenKoboldsAfter = false>>
<<set $spokenWorkerBefore = false>>
<<set $spokenWorkerHelp = false>>
<<set $spokenWorkerHeal = false>>
<<set $ending_scene = 0>>
<<set $assayerSign = `"Hilda van Bergen, Chief Assayer. No entry without permission. Leave the samples outside. "`>>
/* takes room object as args[0]/
<<widget "PrintRoom">>
<<if $player.location.isListed == true>>
<<set $main.title = $player.location.name>>
<<set $main.display = $player.location.description>>
<</if>>
<<set $main.display += "<br>">>
<</widget>>
<<widget "Refresh">>
<<replace "#main-screen">>
<<MainPrint>>
<div>
<div id="main-passage" >
<h4 id="title">
<<print $main.title>>
</h4>
<div id="display">
<<print $main.display>>
</div>
<<if $main.message != "">>
<br>
<div id="message">
<b> <<print $main.message>> </b>
</div>
<</if>>
</div>
<hr>
<div id="settings">
<<print $main.settings>>
</div>
</div>
<</replace>>
<</widget>>
<<widget "FindRoom">>
<<return $rooms.find(e => e.id == _args[0])>>
<</widget>>
<<widget "DescribeShed">>
<<if $shedOpen == false>>
A rusty padlock locks the door, scratched all over from many clumsy openings but nonetheless secure. Through the cracks in the planks you see a glimmer of metal.
<<elseif $shedOpen == true>>
The shed is long, with enough space for two people to walk side by side. The air is incredibly dusty.
<</if>>
<</widget>>
<<widget "DescribeShaftBottom">>
<<if $seenShaftBottom == false >>
The second hole is somewhat smaller than the first, and circular like a well or tower.
<</if>>
<</widget>>
<<widget "DescribeNarrowTunnel">>
The walls are rough-hewn with streaks of pickaxe marks. Patches of ore deposits glint in the light of your spell.
A <<link "strong metal door">><<set $main.message = "It is well-made, rounded at the top, and consists of solid iron. A faint, flickering light filters from beneath the door, with a mixture of acrid and unpleasant odors. Muffled voices chirp and squeak from time to time.">><<Refresh>><<set $main.message = "">><</link>> blocks your way.
<</widget>>
<<widget "DescribeRestArea">>
Upturned boxes are arranged as tables and chairs. On them are playing cards and many mugs of cheap ale. One rolled up to the edge and spilled on the ground, forming a dark wet spot in the dirt.
<<if $takenGoldPouch == false>>
Between the hands of cards is a
<<link "sizable pouch">>
<<set $items.find(e => e.id == "moneyPouch").location = "inventory">>
<<set $main.message = "You feel the coins clink against each other as you pocket the pouch.">>
<<set $takenGoldPouch = true>>
<<Refresh>>
<<set $main.message = "">>
<</link>>
.
<</if>>
<<if $seenMouse == false>>A <<link "mouse">><<set $seenMouse = true>><<set $main.message = "It runs off before you can make a move.">><<Refresh>><<set $main.message = "">><</link>> freezes and turns to you, then runs off with the last bit of cheese. <<set $seenMouse = true>><</if>>
<</widget>>
<<widget "DescribeDigSite">>
This is as far as current excavations have reached, with rails coming to a stop at a large group of <<link "filled carts">><<set $main.message = "Carts and wheelbarrows are loaded with rocks, dirt and ore, waiting for their owners to get back to work. Against the east wall pickaxes, shovels and the like lie scattered after the hurried evacuation. ">><<Refresh>><<set $main.message = "">><</link>> at the eastern wall. A few <<link "lanterns">><<set $main.message = "It is still a good idea to keep your spell on. You don't know how much oil the lanterns have left and you still have places to explore.">><<Refresh>><<set $main.message = "">><</link>> are still flickering, giving off a friendly glow.
<</widget>>
<<widget "DescribeAssayersRoom">>
You find yourself in a small dwarven chamber, a workshop and bedroom all in one.
The walls are lined with sturdy wooden shelves, filled with an assortment of <<link "knick-knacks">><<set $main.message = " There are statues of famous heroes, lumps of especially pure ore, gems, amulets and books written in runic...">><<Refresh>><<set $main.message = "">><</link>> you've seen in dwarven homes. An especially large white gem glows in a sconce.
<<if $items.find(e => e.id == "ringNote").location != "inventory">>
Below it is a
<<link "map">>
<<set $main.message = ` The excavations are very recent, even you won't need help navigating. A
<<link "note">>
<<set $items.find(e => e.id == "ringNote").location = "inventory">>
<<set $main.message = "You take the note.">>
<<Refresh>>
<<set $main.message = "">>
<</link>>
is pinned to a corner. `>>
<<Refresh>>
<<set $main.message = "">>
<</link>>
of tunnels with little labels you don't understand.
<<else>>
Below it is a
<<link "map">>
<<set $main.message = ` The excavations are very recent, even you won't need help navigating. `>>
<<Refresh>>
<<set $main.message = "">>
<</link>>
of tunnels with little labels you don't understand.
<</if>>
<</widget>>
<<widget "DescribeTombDoor">>
<<if $seenTombDoor == false >>
You carefully climb down the passage and into a smaller chamber.
<<set $seenTombDoor = true>>
<</if>>
A massive stone door is set into the eastern wall. It is a masterpiece of old craftsmanship, like the ruins you've heard tales of from traveling adventurers. The stone is dark and polished, smooth despite the age. It stands ten feet tall and eight feet wide.
<</widget>>
<<widget "DescribeTomb">>
<<if $seenTomb == false>>
You enter the tomb. "Good luck" says the spectral voice, as Sir Gareth fades away. <br>
<<set $seenTomb = true>>
<</if>>
The tomb is perfectly circular, and around twice your height. The smooth marble pillars hold up a domed ceiling. A variety of weapons and armor adorns the walls, mostly spears and shields. The only sounds are faint drips of water and distant, muffled scratching somewhere from the north. The northern wall already has a familiar burrow.
<</widget>>
<<widget "DescribeIntro">>
<<set $main.settings = `<<button "Refresh">><<goto MainPassage>><</button>>`>>
Silverton Mine is brand new, and the hopes are high for immense wealth. The owners even hired a legendary dwarven expert in hopes of better finds.
A shame it collapsed this morning, just one month into the exploratory dig. <br>
You were on your way to the city to continue your studies, when you were volunteered to help with the disaster. <br>
<<linkreplace ". . ." t8n>>
Apprentice mage or not, you are a mage, and mages serve their masters. <br>
Most people got out in time, luckily, but two are missing. A worker and the dwarven assayer are still inside. <br>
Teleport in, find survivors, find out what happened and deal with it. <br>
The men will take a day or two to dig out the entrance tunnel, so it's a one way trip for now. <br>
<<linkreplace ". . ." t8n>>
Splendid. <br>
Learn magic they said. Easy work they said. <br>
You stand in the magic circle, close your eyes and take a deep breath. <br>
<<link "Cast teleportation!">><<set $player.location = $rooms.find(e => e.id == "entranceTunnel")>><<goto "MainPassage">><</link>> <br>
<</linkreplace>>
<</linkreplace>>
<</widget>>
<<widget "DescribeWorker">>
<<set $main.settings =`<<button "Refresh">><<goto MainPassage>><</button>>`>>
<<if $helpedWorker == false>>
<<if $spokenWorkerBefore == false>>
<<set $spokenWorkerBefore = true>>
A bunch of clutter along with an unreasonably large wardrobe are on top of a young looking man. <br>
He tries to move and motions you to help, then coughs and passes out. <br>
You push and pull and lift, but it is futile. A troll could not budge this. <br>
You try to awaken him with several slaps, but he just groans. <br>
<<linkreplace ". . ." t8n>>
He is somehow positioned so he is not being actively crushed but that could change with the slightest shift. <br>
Better let him "rest" and find a way to get all of this stuff off of him. <br>
<<link "Head out">><<set $player.location = $rooms.find(e => e.id == "mainStoreroom")>><<goto "MainPassage">><</link>> <br>
<</linkreplace>>
<<elseif $spokenWorkerBefore == true>>
You need a way to lift that wardrobe off the worker before he is crushed.
<<link "Head out">><<set $player.location = $rooms.find(e => e.id == "mainStoreroom")>><<goto "MainPassage">><</link>>
<</if>>
<</if>>
<<if $helpedWorker == true && $healedWorker == false>>
<<if $spokenWorkerHelp == false>>
<<set $hotspots.find(e => e.id == "worker").name = "Creston">>
<<set $spokenWorkerHelp= true>>
<<set $items.find(e => e.id == "koboldTranslation").location = "inventory">>
<<set $takenTranslation = true>>
Worker: "Thanks, stranger. Thought I was done for. " <br>
You: "It was a close call. How are you feeling? " <br>
His gaze wanders for a moment. <br>
Worker: "Horrid. That beast sucks the air out with the flames. Caved the whole place in too!" <br>
You: "A beast? Did you dig a dragon out? " <br>
Worker: "Not sure, I don't think it's a dragon. But it is a fire breather... " <br>
<<linkreplace ". . ." t8n>>
The man chokes and coughs. <br>
Worker: "Look, the name's Creston, Yarney Creston. " <br>
<<set $rooms.find(e => e.id == "sceneWorker").name = "Creston Yarney">>
His hand points in the wrong direction, but you shake it anyway. <br>
Creston: "Take this to the kobolds, if you can. I'll be able to help you reach the caves. There was something there, Helga was really into it. Always 'sploring with that pet of hers. " <br>
<<linkreplace ". . ." t8n>>
He places a piece of paper in your hand. <br>
You: "I think I know what you are talking about. Don't talk anymore, just rest. " <br>
He leans against the wall and closes his eyes. <br>
<<link "Head out">><<set $player.location = $rooms.find(e => e.id == "mainStoreroom")>><<goto "MainPassage">><</link>> <br>
<</linkreplace>>
<</linkreplace>>
<<elseif $spokenWorkerHelp == true>>
He asked you to get something to help from the kobold alchemist. Leave him be for now.
<<link "Head out">><<set $player.location = $rooms.find(e => e.id == "mainStoreroom")>><<goto "MainPassage">><</link>>
<</if>>
<</if>>
<<if $healedWorker == true>>
<<if $spokenWorkerHeal == false>>
<<set $spokenWorkerHeal= true>>
You: "Come on, drink..." <br>
You put the waterskin close to his nose. The smell alone wakes him up. <br>
He grabs at the skin and drinks like there is no tomorrow. By the time he's done, his energy seems to have returned completely. <br>
<<linkreplace ". . . " t8n>>
Creston: "Aaaaa! Let's get it done, then. Get Helga and get out! <br>
By we, he meant himself. The stuff you could not move without magic, Creston tosses about so easily it is making you feel insulted. <br>
Before long, a small passage leading into a cave is open. "Helga dug it out. We kept it blocked, in case something wants to get in. I guess something did anyway. " he says. <br>
<<linkreplace ". . . " t8n>>
You: "Rest up then head out to the entrance. You have to swim. " <br>
Creston: "Are you sure? " <br>
You: "No, but you did more than enough. And I want to make sure the rescuers know where to find us if things go wrong, they are digging out the front. " <br>
Creston: "Aye! " <br>
<<link "Head out">><<set $player.location = $rooms.find(e => e.id == "mainStoreroom")>><<goto "MainPassage">><</link>>
<</linkreplace>>
<</linkreplace>>
<<elseif $spokenWorkerHeal == true>>
Only the assayer is left to find. And the beast, but you prefer not to think about it. <br>
<<link "Head out">><<set $player.location = $rooms.find(e => e.id == "mainStoreroom")>><<goto "MainPassage">><</link>>
<</if>>
<</if>>
<</widget>>
<<widget "DescribeKobold">>
<<set $main.settings =`<<button "Refresh">><<goto MainPassage>><</button>>`>>
<<set _hasItems = ($items.find(e => e.id == "filledWaterskin").location == "inventory" && $items.find(e => e.id == "moneyPouch").location == "inventory" )>>
<<if $items.find(e => e.id == "koboldTranslation").location != "inventory" && $shownKoboldsNote == false && $spokenKoboldsIngredients == false>>
<<if $spokenKoboldsNoNote == false>>
<<set $spokenKoboldsNoNote = true>>
You bang against the metal with your fist, hoping to be heard over the chatter. <br>
A pair of red lizard eyes peer at you with a narrow, vertical slit. <br>
The kobold doorman winks with one, then the other, and hisses. <br>
Doorman: "Enga chi! You buy?" <br>
You: "No, I am here to..." <br>
<<linkreplace ". . ." t8n >>
The spyhole slams shut. <br>
The doorman voice dims as he mutters in kobold walking away. <br>
<<link "Turn back">><<set $player.location = $rooms.find(e => e.id == "narrowTunnel")>><<goto "MainPassage">><</link>>
<</linkreplace>>
<<elseif $spokenKoboldsNoNote == true>>
You bang on the door louder this time. <br>
They just drown you out with explosions. <br>
<<link "Turn back">><<set $player.location = $rooms.find(e => e.id == "narrowTunnel")>>
<<goto "MainPassage">><</link>>
<</if>>
<</if>>
<<if $items.find(e => e.id == "koboldTranslation").location == "inventory" && $shownKoboldsNote == false && $spokenKoboldsIngredients == false>>
They might be more willing to cooperate if you give them the translation from Creston. <br>
<<link "Turn back">><<set $player.location = $rooms.find(e => e.id == "narrowTunnel")>>
<<goto "MainPassage">><</link>>
<</if>>
<<if $shownKoboldsNote == true && _hasItems == false && $spokenKoboldsIngredients == false>>
<<if $spokenKoboldsNote == false>>
<<set $spokenKoboldsNote = true>>
The spyhole jerks open. <br>
You don't speak a word of kobold, but your brain fills in the silence with "What do you want again, hyuuman?" <br>
You hand the doorman Creston's note. <br>
Without closing the shutter, the kobold runs off. <br>
<<linkreplace ". . ." t8n>>
After about a minute of reptillian screeches and the sound of breaking glass, footsteps approach the door. <br>
Doorman: "Briiiing oooooiiil. Briiing..." <br>
The creature coughs, a lot. It must not have practiced human speech a lot. <br>
Doorman: "Briiiing coooin." <br>
<<linkreplace ". . ." t8n>>
The metallic slam echoes through the tunnel. <br>
<<link "Turn back">><<set $player.location = $rooms.find(e => e.id == "narrowTunnel")>>
<<goto "MainPassage">><</link>>
<</linkreplace>>
<</linkreplace>>
<<elseif $spokenKoboldsNote == true>>
You raise your hand to knock, but it just hangs in the air. <br>
You don't have a reason to bother them till you get oil and some money. <br>
<<link "Turn back">><<set $player.location = $rooms.find(e => e.id == "narrowTunnel")>>
<<goto "MainPassage">><</link>>
<</if>>
<</if>>
<<if $shownKoboldsNote == true && $spokenKoboldsIngredients == true>>
<<if $spokenKoboldsAfter == false>>
<<set $spokenKoboldsAfter = true>>
Doorkobold: "Whhhhy heeree gaaain? Throooat baaad." <br>
You: "No reason really. I just wanted to say thank you, from Creston and me too. " <br>
Slam! <br>
<<linkreplace ". . . " t8n>>
The kobold shuffles about and mutters behind the door. <br>
The spyhole oppens again! Lizard eyes peer at you. <br>
Doorkobold: "Giiive haaand! " <br>
You place your hand at the spyhole. Something slimy is placed in your hand. <br>
<<linkreplace ". . . " t8n>>
The shutter is closed again, gently this time. <br>
Doorkobold: "Stuupid cute human... " <br>
You smell, then try the goop. It's honeycomb piece. <br>
<<linkreplace ". . . " t8n>>
It tastes delicious. <br>
<<link "Back">><<set $player.location = $rooms.find(e => e.id == "narrowTunnel")>>
<<goto "MainPassage">><</link>>
<</linkreplace>>
<</linkreplace>>
<</linkreplace>>
<<elseif $spokenKoboldsAfter == true>>
No need to bother them again. You have your own work to do and they have theirs. <br>
<<link "Turn back">><<set $player.location = $rooms.find(e => e.id == "narrowTunnel")>>
<<goto "MainPassage">><</link>>
<</if>>
<</if>>
<<if $shownKoboldsNote == true && _hasItems == true && $spokenKoboldsIngredients == false>>
<<if $spokenKoboldsIngredients == false>>
<<set $spokenKoboldsIngredients = true>>
You hand over the money and the oilskin to the now eager kobold. <br>
Doorman: "Thaaaank youuu..." <br>
You wait for about ten minutes in the cramped passage breathing in the hopefully non-toxic fumes coming from under the door. <br>
You debate if the kobold's voice sounded somewhat feminine or not, when you are interrupted. <br>
Doorwoman?: "Huuman. Heee ling waaa trrrrrrr. Give hand!" <br>
<<linkreplace ". . ." t8n>>
You place the hand in front of the spyhole. Your waterskin is slid back through, smelling quite strange. <br>
Doorkobold: "And treatsss foooor Dooouug!" <br>
Something squishy wrapped in cloth is passed to you. <br>
Slam! <br>
<<linkreplace ". . ." t8n>>
You: "Who in Arcana is Doug?" <br>
<<set $items.find(e => e.id == "filledWaterskin").location = "">>
<<set $items.find(e => e.id == "moneyPouch").location = "">>
<<set $items.find(e => e.id == "koboldTranslation").location = "">>
<<set $items.find(e => e.id == "healingWater").location = "inventory">>
<<set $items.find(e => e.id == "blindMoleTreats").location = "inventory">>
<<set $takenHealingPotion = true>>
<<link "Turn back ">><<set $player.location = $rooms.find(e => e.id == "narrowTunnel")>>
<<goto "MainPassage">><</link>>
<</linkreplace>>
<</linkreplace>>
<</if>>
<</if>>
<</widget>>
<<widget "DescribeGhost">>
<<set $main.settings =`<<button "Refresh">><<goto MainPassage>><</button>>`>>
<<set $spokenGhost = true>>
<<if $chosen == false>>
Your hand touches the stone door, and you push but you find yourself frozen in place. <br>
You cannot move and inch, neither back nor forth. <br>
Your want to panic breathe but cannot. You are trapped within your own mind. <br>
Your surroundings melt away into a dark swirling fog. <br>
<<linkreplace ". . . " t8n>>
A knight, and not just any brigand with a chainmail but a true knight of old in decorated plate and a bucket helm, emerges from the darkness. <br>
He points his sword at you, and with a loud, shrill voice kills any dread you might have felt up to this point. <br>
The Knight: "Who is this raider that dares desecrates the tomb of GARETH THE HUMBLE!" <br>
Since speaking won't work you might as well try thinking. <br>
<<linkreplace ". . . " t8n>>
You: "I am not desecrating anything. And stop yelling, how can you make my ears bleed if we aren't actually speaking, Arcana be..." <br>
His Humbleness: "Aaah, a student of the magical arts. I had a good wizard friend once. Alas, only paladins or those with holy duty are permitted to enter a knight's tomb. " <br>
You: "I am sure a dwarf and a dragon might already be inside. " <br>
Sir Gareth: "Really? Impossible. I'd sense a dragon, for you see... " <br>
Both: "I HAVE SLAIN A DRAGON!" <br>
You enjoy the silence for a while. <br>
<<linkreplace ". . . " t8n>>
Sir Gareth: "Well, if you don't want to hear it. " <br>
You: "I am in a hurry, lives are at stake. Can you help? " <br>
The knight runs his hand along his beard. <br>
Sir Gareth: "Fine. I'll see if I can do anything material but I am a ghost first and foremost. As for letting you in, there has to be at least some effort on your part. A contract of sorts, honor bound. " <br>
You: What do you propose? <br>
Sir Gareth: "How about a riddle? You mages are smart, and I know a good one. " <br>
You try to take a deep breath but just end up more annoyed. <br>
<<linkreplace ". . . " t8n>>
You: "Go on, ask your riddle, Sir Knight. " <br>
Sir Gareth: What walks on all four... <br>
<<linkreplace "Man! " t8n>><<set $chosen = true>><<Refresh>><</linkreplace>> <br>
<<linkreplace "It's a man! " t8n>><<set $chosen = true>><<Refresh>><</linkreplace>> <br>
<<linkreplace "The answer is man. " t8n>><<set $chosen = true>><<Refresh>><</linkreplace>> <br>
<<linkreplace "Woman works too. " t8n>><<set $chosen = true>><<Refresh>><</linkreplace>> <br>
<</linkreplace>>
<</linkreplace>>
<</linkreplace>>
<</linkreplace>>
<</if>>
<<if $chosen == true>>
Sir Gareth: "Fine, fine, well done. For the next hour, I declare that you are an apprentice paladin under my tutelage. Now go show me what you can do. " <br>
You see a smirk on his face as he fades away. There might be more to the man than a blowhard, or so a part of you hopes. <br>
Control returns to your limbs, and the tomb comes into view again. <br>
<<link "The door ahead is open. ">><<set $player.location = $rooms.find(e => e.id == "tombDoor")>><br>
<<goto "MainPassage">><</link>>
<</if>>
<</widget>>
<<widget "DescribeAssayer">>
<<set $main.settings = `<<button "Refresh">><<goto MainPassage>><</button>>`>>
You approach the sarcophagus, and slide your finger over the smooth lid surface. <br>
An eye peers at you from the gap, and the sounds of shuffling feet and clatter follow. <br>
You: Who are you and why did you hide yourself there? <br>
Silence. <br>
<<linkreplace ". . ." t8n>>
After a long sigh, you push against the lid and it scrapes open. <br>
The light reveals two occupants in the rather spacious coffin. <br>
To the left is Sir Gareth, a grinning skeleton in full armor pushed into a squatting position against the edge. <br>
And to the right sits a nervous dwarven woman, looking back with a blank expression. <br>
<<linkreplace ". . ." t8n>>
You: "Are you the assayer?" <br>
Hilda: "Yes, Hilda van Bergen? Und who are you?" <br>
You: "Your rescue team." <br>
Hilda scoffs. <br>
She wipes some dust off her leather apron. The rest of her clothes, though meant for work, show signs of care and style you have noticed in dwarves of noble lineage. <br>
Sounds of scraping echo from somewhere, and she looks around in panic, listening. <br>
<<linkreplace ". . ." t8n>>
You: "What are you so afraid of? " <br>
Hilda: "Douglass... " <br>
You: "Douglass, as in Doug the blind mole? " <br>
Hilda: "Yes, yes! " <br>
You: "One of those ugly eyeless rat things? " <br>
Hilda purses her lips at you, but as you are about to add a sarcastic remark, things begin to click. <br>
<<linkreplace ". . ." t8n>>
You: "How big exactly is Douglass? " <br>
Hilda: "Normally, about two feet, fat too. " <br>
You: "Eats well, nothing but dragon blood potions from sealed tombs? " <br>
Hilda: "He's a rascal, eats anything. I send him out to explore, he knows all the best veins. I can manage him usually, but right now about the size of a bear. " <br>
You: "A bear... " <br>
Hilda: "Yes, a mother right before winter to be precise. " <br>
She scoots back under the lid after hearing more distant digging. <br>
<<linkreplace ". . ." t8n>>
You: "Is there anything else I should know about Douglass? Something that sticks out. " <br>
Hilda rubs her chin. <br>
Hilda: "He breathes fire too now. But it hurts him, he hates it. If I can calm him down, we don't have to harm him... " <br>
The burrow bursts open, gravel and stone spilling over the dusty marble floor. <br>
A fat eyeless tube with two massive chompers both up and down, waddles into the chamber and squeaks thunderously, then belches a short burst of flame. <br>
<<linkreplace ". . ." t8n>>
Amusing, but you can feel the heat even as you hide behind the coffin. <br>
Hilda climbs out the other side, towards the beast, but trips over Sir Gareth and falls, losing her monocle. <br>
Hilda: "Please, Duggy, listen to mommy! I'm here for you." <br>
The mole calms, and it's breathing slows as it is pet. <br>
<<linkreplace ". . ." t8n>>
But another violent belch rushes forth and the scared creature slaps the dwarf into a wall. <br>
Hilda isn't moving, but you see her chest rise. <br>
The mole waddles around in confusion. <br>
You see a trace of dragon scales on it's back. <br>
<<linkreplace ". . ." t8n>>
You: "I wish Sir Gareth was alive right now!" <br>
<<link "Deal with Doug!">><<set $player.location = $rooms.find(e => e.id == "sceneMole")>><<goto "MainPassage">><</link>>
<</linkreplace>>
<</linkreplace>>
<</linkreplace>>
<</linkreplace>>
<</linkreplace>>
<</linkreplace>>
<</linkreplace>>
<</linkreplace>>
<</widget>>
<<widget "DescribeMole">>
The air in the tomb grows thin with each burst of flames. The mole is choking and it's footsteps are slowing, but it is on the prowl. Any attempt to peek out from behind the coffin are met with supressing fire.
<</widget>>
<<widget "DescribeEnd">>
<<set $main.settings = `<<button "Refresh">><<goto MainPassage>><</button>>`>>
<<if $ending_scene == 0>>
You toss the treats in the general direction of Douglass, then hide right away. <br>
He can't see but his sense of smell is superb, especially when it comes to his favorite snack. <br>
You listen to the sound of sloppy chewing, then feel the heat rise after a fiery burp. <br>
He eats it. <br>
And he is four times stronger now. <br>
<<linkreplace ". . . " t8n>>
You take a deep breath and stay still, listening. <br>
Douglass slumps on the ground and moans, his tummy rumbling. <br>
You breathe a sigh of relief as you hear the mole lose his lunch, and hopefully everything he consumed recently. <br>
Peering out, you see a blind mole lying on the ground, breathing slowly. <br>
His size is still the same but the scales are gone. <br>
You approach to pet him. <br>
<<linkreplace ". . . " t8n>>
You: "There, there, doesn't that feel better? " <br>
You didn't know moles can purr, but apparently Doug can. <br>
Hilda is still out, and you don't know how Creston is doing. <br>
And it will take the rest of the day for the workers to dig you out. <br>
<<linkreplace ". . . " t8n>>
It would be much better to get out yourself. <br>
Doug licks your face. <br>
<<link "Escape">> <br>
<<set $ending_scene = 1>> <<goto MainPassage>>
<</link>>
<</linkreplace>>
<</linkreplace>>
<</linkreplace>>
<</if>>
<<if $ending_scene == 1>>
Inisde the entrance shaft, a group of men are working hard opening the tunnel. <br>
They groan as they lift heavier rocks into wheelbarrows, and shovel the rubble into sacks. <br>
An even larger group outside watches as the wheelbarrows are taken out. <br>
Among them is a wizard, several decades your senior, smoking in the shade of a tree with the supervisor. <br>
<<linkreplace ". . ." t8n>>
You: "Clear the way, get out!" <br>
The tunnel shakes and the workers run out. <br>
Douglass is the better digger, and clears all the cave-ins with barely a sweat. <br>
<<linkreplace ". . ." t8n>>
But while tying yourself to him and riding the mole out managed to get you out, you don't get the glorious ride on top of the conquered beast you envisioned. <br>
Instead of Douglass being a valiant steed, the three of you are unceremoniously shaken off completely covered in dirt and choking. <br>
You are woken up with a bucket of water, and ordered to explain yourself. <br>
<<link "Epilogue">>
<<set $ending_scene = 2>> <<goto MainPassage>>
<</link>>
<</linkreplace>>
<</linkreplace>>
<</if>>
<<if $ending_scene == 2>>
For your service, you gain a modest sum of gold, and a letter of recommendation from the Silverton family, hopefully leading to better prospects in the city. <br>
<<linkreplace ". . . " t8n>>
At first the investigation goes hard on both Hilda and her pet, attempting to blame the accident on her disregard for safety and lack of proper animal care. <br>
But with Douglass cured of his temper and fire-breathing burps, he not only helps repair but expanded the mining operation immensely. <br>
He does shrink after a while, and retires as Silverton mascot, Dragon Doug. <br>
<<linkreplace ". . . " t8n>>
Creston moves to the city with you and takes up work as a bricklayer, never to go down a tunnel again. <br>
You have a drink every few months, and he robs you at cards every time. <br>
<<if $spokenKoboldsAgain == true>>
<<linkreplace ". . . " t8n>>
Several months later you receieve a parcel with a message written in kobold. <br>
Since you only ever spoke with one kobold in your life, it is safe to assume it is from her, but you still don't speak a word of the language. <br>
You eat the honeycomb and promise to learn it when you get some spare time. <br>
<</linkreplace>>
<<else>>
<<linkreplace ". . . " t8n>>
As of now this is your small claim to fame, the Savior of Silverton, the one who tamed the dreaded Dragon Mole, and so on. <br>
That story is getting old at the pub, however. <br>
<<link "Better get started on a new one... ">>
<<set $player.location = $rooms.find(e => e.id == "sceneStart")>>
<<goto MainPassage>>
<</link>>
<</linkreplace>>
<</if>>
<</linkreplace>>
<</linkreplace>>
<</if>>
<</widget>>
<<widget "DescribeStart">>
<div style="text-align:center;">
<h1>The Dragon of Silverton Mine</h1>
<<set $main.settings =``>>
<<button "Start">>
<<set $player.location = $rooms.find(e => e.id == "sceneIntro")>>
<<goto MainPassage>>
<</button>> <br>
<<button "Load">><<script>>UI.saves()<<endscript>><</button>> <br>
<<button "About">><<set $main.message = `The Dragon of Silverton, a text adventure game, by Vukašin Davić. <br> Testers: Ana Ciglar, Marko Serafimović, Mina Davić, Miloš Serafimović, Srđan Randjelović, Aleksandar Janjić, Aleksandar Randjelović and Kaitlyn Baker. <br>I thank you all for your support! <<link "Close">><<Refresh>><</link>>`>><<Refresh>><<set $main.message = "">><</button>> <br>
<<button "Quit">><<script>>window.close()<</script>><</button>> <br>
</div>
<</widget>>
<<set $rooms = [
{
id: "entranceTunnel",
name: `Entrance tunnel`,
description: `Rough stone walls, dimly illuminated by your spell, are cracked all over. Rubble and broken rock lie scattered on the <<link "floor">><<set $main.message = "Moving some rubble with your foot, you find a wooden rail. It leads deeper into the mine.">><<Refresh>><<set $main.message = "">><</link>>. Dusty air makes you cough. In the distance you hear falling stones and dripping water. `,
isListed: true,
},
{
id: "mainShaft",
name: "Main Shaft",
description: "Thick wooden pillars hold up the large chamber. They creak under the strain of the mountain. An earthy smell of damp stone and metallic dust lingers in the air. ",
isListed: true,
},
{
id: "narrowTunnel",
name: "Narrow Tunnel",
description: `<<DescribeNarrowTunnel>> `,
isListed: true,
},
{
id: "toolShed",
name: "Tool Shed",
description: "<<DescribeShed>>",
isListed: true,
},
{
id: "caveInPassage",
name: "Caved-in Passage",
description: `The main corridor would lead east, were it not chocked with <<link "debris">><<set $main.message = "The massive wooden beam which held it up is charred black and splintered all over. Dirt and rocks litter the ground right before, as if something big tunneled under. Faint light is visible through the gaps. ">><<Refresh>><<set $main.message = "">><</link>>. `,
isListed: true,
},
{
id: "restArea",
name: "Rest Area",
description: "<<DescribeRestArea>>",
isListed: true,
},
{
id: "bottomMain",
name: "Bottom of First Shaft",
description: `The air is much cooler down here. You are waist deep in <<link "murky water ">><<set $main.message = "Wooden buckets lie scattered about, most of them broken. The walls are damp and somewhat slimy, filling the space with a smell of decaying flora.">><<Refresh>><<set $main.message = "">><</link>> that the light of your spell can barely penetrate. The tunnel support beams disappear into the water ahead. `,
isListed: true,
},
{
id: "underwater",
name: "Underwater",
description: `<<link "Cold water">><<set $main.message = " There is a faint current heading west, but you can swim against it.">><<Refresh>><<set $main.message = "">><</link>> seeps into your clothes. Your light penetrates only the most immediate area, leaving you to swim along the slimy ceiling as you struggle to hold your breath. `,
isListed: true,
},
{
id: "bottomSecond",
name: "Bottom of Second Shaft",
description: "<<DescribeShaftBottom>>",
isListed: true,
},
{
id: "digSite",
name: "Dig Site",
description: "<<DescribeDigSite>>",
isListed: true,
},
{
id: "assayersRoom",
name: "Assayer's Room",
description: "<<DescribeAssayersRoom>>",
isListed: true,
},
{
id: "mainStoreroom",
name: "Main Storeroom",
description: `The storeroom is a <<link "complete mess">><<set $main.message = "Some crates have spilled their contents out and show signs of massive claw marks. There is a smell of spilled oil and burning in the air, but thankfully nothing is on fire right now.">><<Refresh>><<set $main.message = "">><</link>>, a jumble of overturned boxes, shattered crates and tools tossed around madly.`,
isListed: true,
},
{
id: "cave",
name: "Cave",
description: `The round chamber slopes gently towards the natural pillar in the center, over the smooth, damp ground. Cold droplets slide down the stalactites and drip into little puddles. The water has long eroded the rock, making it smooth and pleasant to the touch. `,
isListed: true,
},
{
id: "tombDoor",
name: "Tomb Door",
description: "<<DescribeTombDoor>>",
isListed: true,
},
{
id: "garethTomb",
name: "Sir Gareth's Tomb",
description: "<<DescribeTomb>>",
isListed: true,
},
{
id: "sceneIntro",
name: "Outside Silverton Mine",
description: "<<DescribeIntro>>",
isListed: true,
},
{
id: "sceneWorker",
name: "",
description: "<<DescribeWorker>>",
isListed: true,
},
{
id: "sceneKobold",
name: "",
description: "<<DescribeKobold>>",
isListed: true,
},
{
id: "sceneGhost",
name: "Sir Gareth",
description: "<<DescribeGhost>>",
isListed: true,
},
{
id: "sceneAssayer",
name: "Hilda van Bergen",
description: "<<DescribeAssayer>>",
isListed: true,
},
{
id: "sceneMole",
name: "The Dragon of Silverton Mine",
description: "<<DescribeMole>>",
isListed: true,
},
{
id: "sceneEnd",
name: "",
description: "<<DescribeEnd>>",
isListed: true,
},
{
id: "sceneStart",
name: "",
description: "<<DescribeStart>>",
isListed: true,
},
]>>
/* Example room
{
id: "kitchen",
name: "Kitchen",
description: "You are in the kitchen.",
isListed: true,
},
*/<<set $scenes = [
{
id: "intro",
name: "Intro",
content: [ ],
options: "",
}
]>><<include "Player">>
<<include "Rooms">>
<<include "Exits">>
<<include "Hotspots">>
<<include "Items">>
<<include "NPCs">>
<<include "Scenes">>
<<include "Plot Flags">>
<<set UIBar.destroy()>>
//sceneStart
<<set $player.location = $rooms.find(e => e.id == "sceneStart")>>
<<set $selected1 = "">>
<<set $selected2 = "">>
<<include "MainObject">>
<<goto "MainPassage">>