/* use the HTML status line and prompts */
#define USE_HTML_STATUS
#define USE_HTML_PROMPT
/* include the standard TADS libraries */
#include
#include //MODIFIED STD FILE
#include //DISAMBIGUATION ROUTINE WRITTEN BY DAN SCHMIDT & STEPHEN GRANADE
#include //KNOWLEDGE BASE AND OTHER DEFINING BITS OF THE MAESTERS
#include //CONTROL FOR HOW VARIOUS MATERIALS INTERACT
#include //DEEPVERBS AND GLOBAL OBJECTS LIKE WALLS
#include //SECOND PUZZLE - AFTER ANTECHAMBER BIT
#include //THIRD PUZZLE - STRAIGHT FROM SECOND PUZZLE
#include //END GAME - AFTER MEETING GRAND MAESTER
/* at game startup, turn on HTML mode */
replace commonInit: function
{
/* display the special code sequence to turn on HTML recognition */
"\H+";
}
startroom: room
sdesc = "Basement"
ldesc = "You are standing in the depths of the Keep’s basement. Before you, to the south, is a massive
oak door which leads into the Erudition Chamber. Chisled stone steps lead back up into the Keep to
the north. The air is damp and cold this far underground and the slightest sounds echo hollowly
against the stone walls.\n"
north =
{
if (Guard.location = self) //REMNANT CODE FROM WHEN I PLANNED TO LET THE PLAYER CONVINCE THE GUARD TO LEAVE
{
"The guard steps forward to block your path.\n\tMaester Drummond said you were to go into the
Chamber. I’ll not be risking my hide by letting you skip out of your punishment.
\nObviously he
has no intention of allowing you back up the steps.\n";
return nil;
}
}
up = (self.north)
south = OakDoor
;
Basement: decoration
location = startroom
noun = 'basement'
sdesc = "basement"
ldesc -> startroom
;
StoneSteps: fixeditem, hard
location = startroom
noun = 'steps'
adjective = 'chisled' 'stone'
sdesc = "stone steps"
ldesc = "The steps are old and worn with use, they were chisled out of the solid rock that surrounds you
in the days when the Keep was newly made, more than 400 years ago, as the outside world reckons
time. Closer to several thousand years as measured inside the Keep.\n"
;
Guard: Actor
location = startroom
noun = 'guard' 'soldier'
sdesc = "guard"
ldesc = "Large and rather bored would be a decent description. No doubt he would rather be dicing with
his fellows elsewhere in the Keep.\n"
actorDesc = "One of the Keep’s guards is standing here.\n"
verDoTalkTo( actor ) = {}
doTalkTo( actor ) = ( self.disavow )
verDoAttack(actor) = {self.verDoKick(actor);}
verDoKick(actor) =
{
"Seeing as the guard is rather larger than yourself and heavily armored to boot, it is doubtful that
your bare-handed assualt would be especially fruitful. In any case you are already being punished for
one offense, there is no need to add to the list.\n";
}
isHim = true
disavow = "You attempt to start a conversation with the guard, but he is apparently not in a talking mood.\n"
askWord( word, lst ) = //TALKING TO THE GUARD
{
switch( word )
{
case 'guard':
case 'himself':
"So...um...tell me about yourself.
\b\tNice try kid, but if you think small talk is
going to get you out of this I’m afraid you’re mistaken.
\n";
return true;
case 'keep':
"So how long have you been here at the Keep?\b\tI’ve been here my whole life. My
father was captain of the guard for seven years. They say the Keep is the only sane place left in
the world. I’ve never been outside myself, but I don’t doubt the truth of it.
\n";
return true;
case 'me':
"What’s going to happen to me now?
\b\tYou’re going to step through that door
like you were told and I'm going to go back to playing dice. What happens after that I don’t
know and don’t rightly care.
\n";
return true;
case 'door':
case 'chamber':
"Do you know what is on the other side of that door?
\b\tNobody but the Maesters knows the
answer to that, kid. You’re on your own. I’d almost feel sorry for you if it wasn’t
for you killing my favorite ferret.
\n";
return true;
case 'ferret':
"So I guess you heard about the ferret then?
\b\tOh yes, I heard. I used to sneak him bits
of cheese at night. He’d come to visit me at my guard post when I was on duty, he knew I always
kept a bit of cheddar in my pocket for him.
\n";
return true;
}
return nil;
}
;
OakDoor: wood, doorway
location = startroom
noun = 'door'
adjective = 'massive' 'oak' 'oaken' 'south' 'chamber'
sdesc = "massive oak door"
ldesc = "The door is around seven feet tall and banded together with iron straps. \^<>
<>"
doordest =
{
"You take a deep breath and step into the Erudition Chamber. For a moment you feel a slight chill and
the world seems to shift slightly but then the moment has passed and things have returned to normal. You
notice that the door has disappeared behind you.\b";
return( Chamber1 );
}
;
IronStraps: hard, decoration
location = startroom
noun = 'strap' 'straps'
adjective = 'iron'
sdesc = "iron straps"
ldesc = "Blackened iron, designed to add strength to an already imposing door.\n"
;
Chamber1: room
sdesc = "The Chamber"
ldesc = "The best word to describe this room would be stark. It is completely void of any aesthetic
consideration. The room is roughly square and made entirely of stone, a damp mist clings tenuously
to the corners of the chamber and a vaulted archway to the south is the only exit. A long wooden
table stands in the center of the room.\n"
south = Vaulted1
;
Mist: decoration
location = Chamber1
noun = 'mist'
adjective = 'damp'
sdesc = "damp mist"
ldesc = "The translucent whisps are evidence of the depth of the Keep, and a reminder of the vast flight
of stairs you endured to get down this far.\n"
;
Vaulted1: doorway
location = Chamber1
noun = 'archway'
adjective = 'vaulted'
sdesc = "vaulted archway"
ldesc = "There isn’t much noteable about the archway itself. It leads south.\n"
doordest = WarRoom
isopen = true
verDoClose( actor ) =
{
"It is an open archway, there is nothing to close.\n";
}
;
EquipmentTable: wood, surface, fixeditem
location = Chamber1
noun = 'table'
adjective = 'long' 'wooden'
sdesc = "table"
ldesc =
{
"The table is plain and worn with age. The corners have become rounded over the years and the wood has
taken on a weathered look much like an old tree. ";
if ( itemcnt(self.contents) != 0 ) //IF THE TABLE HAS ANYTHING ON IT, LIST WHAT
"On the table you can see <>.\n";
}
broken = BrokenTable
burned = BurnedTable
;
Corners: decoration
location = EquipmentTable
noun = 'corner' 'corners'
adjective = 'rounded'
sdesc = "rounded corners"
ldesc = "The corners of the table have been worn as smooth as polished glass with age.\n"
;
BrokenTable: wood, item
noun = 'table' 'wood'
adjective = 'wooden' 'broken' 'pile'
sdesc = "pile of wood"
ldesc = "A broken pile of old table-bits.\n"
broken = BrokenTable2
burned = BurnedTable
;
BrokenTable2: wood, item
noun = 'table' 'wood'
adjective = 'wooden' 'broken' 'pile'
sdesc = "pile of wood"
ldesc = "A broken pile of old table-bits.\n"
broken = BrokenTable
burned = BurnedTable
;
BurnedTable: earth, item
noun = 'table' 'ashes'
adjective = 'pile' 'table'
sdesc = "table ashes"
ldesc = "There is nothing notable about the pile of ashes.\n"
;
BattleAxe: hard, item
location = EquipmentTable
noun = 'axe' 'battleaxe' 'ax'
adjective = 'battle'
sdesc = "battle axe"
ldesc = "It is a double headed battle axe with a long slender handle wrapped tightly with leather. The
head of the axe weighs a good twenty pounds and the weapon seems to be very well balanced. It is a
warrior’s blade.\n"
;
Journal: qcontainer, readable
location = EquipmentTable
noun = 'journal'
adjective = 'thin'
sdesc = "journal"
ldesc = "A thin journal with fine penmanship in a delicate hand. The name inscribed on the inside of the
cover indicates that this journal was written by Grand Maester Torval himself.\n"
readdesc = "To make reading this journal easier please refer to it in sections, of which there are three.
For example, if you wish to read section one simply type read section one.
\n"
;
Section1: fixeditem, readable
location = Journal
noun = 'one'
adjective = 'section'
sdesc = "section one"
ldesc = self.readdesc
readdesc = "\tGreetings novice, welcome to the Erudition Chamber. As you may surmise by a quick
look around you, the Chamber is not, as you were led to believe, a room for punishment. Rather
it is a testing ground. The deception was necessary so that you would be unable to prepare
for what lies ahead. It is important that all of your reactions be natural and unplanned so
that we may evaluate your skills. Keep in mind as you progress, that every choice you make
will effect the world around you to some extent. There will be consequences for your actions,
consequences that you will be required to deal with as they arise.
\n"
;
Section2: fixeditem, readable
location = Journal
noun = 'two'
adjective = 'section'
sdesc = "section two"
ldesc = self.readdesc
readdesc = "\tI have found over time that each person is especially suited to a certain type of
task. I, for instance, have endeavored for fifteen years to advance to the third level of the
Alchemical order but have been unable to attain the transience required by that sect. I have
seen others though, who could not even attain the most basic level of the Alchemical sect
while they advanced without peer in one of the other three sects and soon became recognized
as the greatest among their chosen order. My particular skills have developed in such a way
that I have attained the basic knowledge of each of the four sects without ever being able to
grasp the higher wisdoms of any of them. At times I regret this shortcoming, if indeed it may
be seen as such, but I also understand the need for an order of Maesters that have an
understanding of each sect so as to see a larger picture than any individual order’s
members may grasp.
\n"
;
Section3: fixeditem, readable
location = Journal
noun = 'three'
adjective = 'section'
sdesc = "section three"
ldesc = self.readdesc
readdesc = "\tThe chief difference, as I see it, between the orders, lies in how a person of a
given order is wont to approach a problem. For instance when faced with an obstacle, a member
of the Warrior sect is likely to attempt to break it down. Their reasoning is that the
quickest and most efficient solution is the best. An Alchemist faced with the same problem
would seek to change the form of the obstacle, reasoning that any object has some form in
which it would no longer present itself as a problem. The approach of a Maester Artisan would
no doubt be to work with the obstacle in some ingenious way so that it would no longer pose a
problem. And finally the accomplished Seer would not attempt to remove the obstacle at all,
but would rather find some other way to arrive at their destination.
\n"
;
OilLamp: firestarter, lightsource
location = EquipmentTable
noun = 'lamp'
adjective = 'oil'
sdesc = "lamp"
ldesc = "An old oil lamp<>\n"
islit = true
verDoSnuff( actor ) = //SNUFF IS DEFINED IN GLOBAL.T IT EXSTINGUISHES FIRESTARTERS
{
if ( not self.islit )
"The flame has already been extinguished.\n";
}
doSnuff( actor ) =
{
"You extinguish the flame.\n";
self.islit := nil;
self.isfire := nil;
}
;
OilFlask: liquidcont
location = EquipmentTable
noun = 'flask' 'bottle'
adjective = 'leather' 'oil'
sdesc = "leather flask"
ldesc = "A small leather flask suitable for holding various liquids. <>"
;
Oil: liquid, item
location = OilFlask
noun = 'oil'
sdesc = "oil"
adesc = "oil"
ldesc = "It looks like the type of oil that the Artisans often use in their machinery. Not much good for
burning, but it does make things move more smoothly.\n"
;
WarRoom: room
sdesc = "War Room"
ldesc = "This room is filled with the decorations of war. A suit of armor occupies one corner and various
weapons and shields are fastened to the walls all around the room. A large tapestry depicting the
Battle of Barnet hangs on the western wall, while an old wooden door leads south.\n"
north = Vaulted2
south =
{
if ( OldDoor.location = self ) //THE PLAYER HASN'T CHANGED ANYTHING - THE DOOR IS AS THEY FOUND IT
return OldDoor;
if ( BurnedDoor.location = self ) //THE PLAYER BURNED DOWN THE DOOR
return BurnedDoor;
if ( BrokenDoor.location = self ) //THE PLAYER BROKE DOWN THE DOOR
return BrokenDoor;
}
west =
{
if ( Passage.location = self ) //THE PLAYER HAS FOUND THE SECRET PASSAGE
{
return Passage;
}
else //THE PLAYER HAS NOT YET FOUND THE PASSAGE
{
"You can’t go that way.\n";
return nil;
}
}
;
Vaulted2: doorway
location = WarRoom
noun = 'archway'
adjective = 'vaulted'
sdesc = "vaulted archway"
ldesc = "There isn’t much noteable about the archway itself. It leads south.\n"
doordest = Chamber1
isopen = true
verDoClose( actor ) =
{
"It is an open archway, there is nothing to close.\n";
}
;
Armor: fixeditem, hard
location = WarRoom
noun = 'armor'
adjective = 'suit'
sdesc = "suit of armor"
ldesc = "It looks to be a 15th century suit of armor. Not much different than those being worn by the men
depicted in the tapestry on the western wall.\n"
;
Weapons: decoration, hard
location = WarRoom
noun = 'weapon' 'weapons' 'shield' 'shields' 'war'
adjective = 'decorations'
sdesc = "weapons and shields"
ldesc = "The weapons and shields that adorn the walls are securly fastened in their places and for the
most part out of reach. None of them look particularly interesting but taken as a whole they give
the room a foreboding atmosphere.\n"
;
Tapestry: fixeditem, earth, behindHider
location = WarRoom
noun = 'tapestry' 'banner' 'battle' 'barnet'
adjective = 'large' 'battle' 'barnet'
sdesc = "tapestry"
ldesc = "\tThe tapestry shows the legendary Battle of Barnet, the decisive and final blow to the ancient
House of York. As the legend goes, there was a thick fog covering the field as the armies prepared
for battle and they badly misjudged each other’s position resulting in battle lines
overlapping on each side. It is generally thought by today’s historians that this fog may
have indeed changed the outcome of the battle had it stayed afield, but alas a stiff wind blew in
from the north, clearing the mist and spelling the doom of everyone who wore the colors of York
save one. Richard of Gloucester was the only man to escape with his life. \n\tSoon after, being
virtually unopposed, the Lancastrians took a firm hand to the Kingdom and turned their greedy eye
toward France. The rest is, as they say, history. Richard fled north to more familiar country and
it was his grandson who later founded the Maester’s Keep. England, in the name of Empire,
soon conquered all the known world. From Russia to the north of Africa they rule without question
and have for near on five hundred years now.\n"
verDoLookbehind( actor ) =
{
if ( self.ismoved )
"You have already moved the tapestry aside revealing the hidden passage.\n";
}
doLookbehind( actor ) =
{
self.doMove( actor );
}
verDoMove( actor ) =
{
if ( self.ismoved )
"You have already moved the tapestry aside revealing the hidden passage.\n";
}
doMove( actor ) = //FINDING THE PASSAGE
{
"You push the tapestry aside revealing a passage in the wall behind it leading west.\n";
Passage.moveInto( WarRoom );
self.ismoved := true;
}
ismoved = nil
;
Passage: doorway
noun = 'passage'
adjective = 'hidden'
sdesc = "hidden passage"
ldesc = "It is a dark rough-hewn passage through the rock of the west wall.\n"
doordest =
{
if ( Me.isCarrying( BattleAxe ) ) //THE AXE CANNOT BE TAKEN THROUGH THE PASSAGE
{
"You step toward the passage but notice as you do that the walls of the exit are apparently made of
some sort of lodestone. <> is pulled violently toward the stone. It
takes all of your effort to maintain your grip on the weapon but it quickly becomes obvious that if
you wish to go that way you’re going to have to leave the axe behind.\n";
return nil;
}
else //PASSAGE LEADS TO THE ANTECHAMBER
{
"You follow the winding passageway finding a brightly lit room at its end. ";
Desc.Seer := Desc.Seer +1;
Desc.current := MaesterSeer;
return Antechamber;
}
}
isopen = true
verDoClose( actor ) =
{
"It is an open passage, there is nothing to close.\n";
}
;
OldDoor: wood, doorway
location = WarRoom
noun = 'door'
adjective = 'old' 'wood' 'wooden' 'south' 'southern'
sdesc = "old door"
adesc = "an old door"
ldesc = "The door is made of old dry wood that has begun to crack and splinter in places. Despite its age,
however, the door remains a sturdy obstacle. There does not seem to be a lock anywhere on it but
the hinges appear to have rusted shut.\n"
verDoOil( actor ) = {}
doOil( actor ) -> Hinges
verDoOpen( actor ) = {}
doOpen( actor ) =
{
if ( Hinges.isoiled ) //IF THE HINGES ARE OILED THE DOOR CAN BE OPENED
{
"The newly oiled hinges still manage to put up some resistance but the door opens.\n";
pass doOpen;
}
else //IF NO OIL IS APPLIED THE DOOR IS STUCK SHUT
{
"There does not appear to be a lock anywhere, but nevertheless the door does not open.\n";
return nil;
}
}
doordest = //IF THE PLAYER GETS THROUGH WITHOUT BURNING OR BREAKING THEY MOVE UP IN THE ARTISAN CATEGORY
{
Desc.Artisan := Desc.Artisan +1;
Desc.current := MaesterArtisan;
return( Antechamber );
}
isopen = nil
isoiled = nil
noAutoOpen = true
burned = BurnedDoor
broken = BrokenDoor
;
Hinges: fixeditem
location = WarRoom
noun = 'hinge' 'hinges'
adjective = 'rusted' 'rusty'
sdesc = "hinges"
ldesc =
{
if ( self.isoiled )
"The old hinges have been freshly oiled and should open easily now.\n";
else
"The hinges are old and rusted.\n";
}
verIoPourOn( actor ) = ( self.verDoOil(actor) )
ioPourOn( actor, dobj ) = ( self.doOil(actor) )
verIoPutOn( actor ) = {}
ioPutOn( actor, dobj ) =
{
if( dobj = Oil )
self.doOil( actor );
else
"There’s no good surface on the hinges.\n";
}
verDoOil( actor ) =
{
if ( self.isoiled )
"You have already oiled the hinges.\n";
else if ( not Me.isCarrying( Oil ) )
"You aren’t carrying anything suitable for oiling the hinges.\n";
}
doOil( actor ) =
{
"You pour a few drops of the oil onto the hinges.\n";
self.isoiled := true;
}
isoiled = nil
;
BurnedDoor: earth, doorway
noun = 'door' 'arch' 'archway'
adjective = 'burned'
sdesc = 'empty archway'
adesc = 'an empty archway'
ldesc = "An empty archway now stands where the old door once was.\n"
isopen = true
verDoOpen( actor ) = {}
doOpen( actor ) =
{
"It is an empty archway, there is nothing to open.\n";
return nil;
}
verDoClose( actor ) = {}
doClose( actor ) =
{
"It is an empty archway, there is nothing to close.\n";
return nil;
}
doordest = //BURNING THE DOOR TO GET THROUGH IT MOVES THE PLAYER UP IN THE ALCHEMIST CATEGORY
{
Desc.Alchemist := Desc.Alchemist +1;
Desc.current := MaesterAlchemist;
return Antechamber;
}
;
BrokenDoor: earth, doorway
noun = 'door' 'arch' 'archway'
adjective = 'broken'
sdesc = 'empty archway'
adesc = 'an empty archway'
ldesc = "An empty archway now stands where the old door once was.\n"
isopen = true
verDoOpen( actor ) = {}
doOpen( actor ) =
{
"It is an empty archway, there is nothing to open.\n";
return nil;
}
verDoClose( actor ) = {}
doClose( actor ) =
{
"It is an empty archway, there is nothing to close.\n";
return nil;
}
doordest = //BREAKING THE DOOR TO GET THROUGH IT MOVES THE PLAYER UP IN THE WARRIOR CATEGORY
{
Desc.Warrior := Desc.Warrior +1;
Desc.current := MaesterWarrior;
return Antechamber;
}
;
//