//PARSE WITH NORMAL TADS OPERATORS #pragma C- DampRoom: room enterRoom( actor ) = { notify (self, &script, 0); //CHECK WATER-FLOW pass enterRoom; } leaveRoom(actor) = //LET SCRIPT2 RELAX { unnotify(self, &script2); pass leaveRoom; } sdesc = "Damp Room" ldesc = "You are in a damp room carved out of the surrounding earth. <> while another smaller opening leads east. At the south side of the room water <> out of a pipe large enough for you to walk through. Set in the floor below the pipe is a copper drain that the water disappears through.\n" noted = nil east = AcidPool south = Pipe1 north = Grate script = { local WaterName := 'waterA' + cvtstr( self.Waternumber ); if( self.isdry ) //CREATE A WATER OBJECT AND PUT IT IN THE PIPE WHENEVER THE PIPE { WaterName := new Water; //DOESN'T HAVE A WATER OBJECT IN IT WaterName.moveInto( self ); //DEFAULT LOCATION IS PIPE SO IT HAS TO BE MOVED HERE self.Waternumber += 1; } if ( Valve.isopen ) //CHECK TO SEE IF WATER IS FLOWING THROUGH PIPE "You can hear a whirring sound coming through the copper drain in the floor as water rushes through it. "; if ( self.noted ) //IS THE GRATE RAISED? { "The grate to the north has raised and no longer blocks your passage in that direction. "; self.noted := nil; } unnotify(self, &script); } Waternumber = 0 isdry = { if ( self.contents <> nil ) { self.tmpList := self.contents; self.tmpObj := car( tmpList ); while ( tmpObj <> nil ) { if( isclass(tmpObj, Water) ) return nil; tmpList := cdr( tmpList ); tmpObj := car( tmpList ); } return true; } else return true; } ; PipeWalk: hard, fixeditem location = DampRoom noun = 'pipe' sdesc = "pipe" ldesc = "The pipe is set in the southern wall and is large enough for you to walk through. Water is <> out of the pipe.\n" ; CopperDrain: hard, fixeditem, seethruItem location = DampRoom noun = 'drain' adjective = 'copper' sdesc = "copper drain" ldesc = "The copper drain is set in the floor directly below the pipe. Water <> out of the pipe and through the drain.\n" thrudesc = { if( !Valve.isopen ) "You see only darkness below the drain.\n"; else "The rushing water prevents you from looking through the drain.\n"; } verDoOpen( actor ) = { "\^<> is set into the floor, it cannot be opened.\n"; } ioPourOn( actor, dobj ) = { "You pour <> through the copper drain and watch it disappear into the darkness below.\n"; dobj.moveInto( nil ); } ; Grate: doorway noun = 'grate' 'grating' adjective = 'large' 'metal' 'iron' sdesc = "large grate" location = DampRoom ldesc = "There are no hinges on the grate and it appears that it is opened by some sort of mechanism inside the wall that lifts it straight up. There is a small panel in the wall beside the grate. " doordest = //GOING ON TO THE NEXT STAGE OF THE GAME { "You close you eyes and step through the open passage...\n"; "The ground falls away below you and you are engulfed by the sensation of falling through an endless void. After a moment you realize you can once again feel a floor beneath your feet. With a deep breath you open your eyes.\b"; morePrompt(); return( FinalChamber ); } isopen = nil noAutoOpen = true verDoOpen( actor ) = { if ( self.isopen ) "\^<> is already open. "; else "It would be nice if things were that simple. "; } verDoClose( actor ) = { if ( not self.isopen ) "\^<> is already closed. "; else { if ( Desc.current = MaesterAlchemist ) "There is nothing left of the grate to close. "; else "You pull down on the grate but it will not budge. "; } } verDoLift( actor ) = { if ( self.isopen ) "\^<> is already open. "; } doLift( actor ) = //WARRIOR SOLUTION TO THE PUZZLE { "You walk straight up to the large metal grate and attempt to lift it with all of your strength. Amazingly enough it actually works, there is a loud grinding noise but the grate opens. "; Desc.Warrior := Desc.Warrior +1; Desc.current := MaesterWarrior; self.isopen := true; } verIoPutOn( actor ) = {} ioPutOn( actor, dobj ) = { if( isclass(dobj, Acid) ) self.ioPourOn( actor, dobj ); else "There’s no good surface on <>.\n"; } verIoPourOn( actor )= { if( self.isopen ) "\^<> is open. You cannot pour anything on it. "; } ioPourOn( actor, dobj ) = { if( isclass(dobj, Acid) ) //ALCHEMIST SOLUTION TO THE PUZZLE { "You carefully pour <> over <>. As the liquid slides across the grate the metal bars begin to disintigrate until nothing is left to block your passage north.\n"; Desc.Alchemist := Desc.Alchemist +1; Desc.current := MaesterAlchemist; self.isopen := true; Acid.moveInto( nil ); } else pass ioPourOn; } ; Panel: fixeditem, openable location = DampRoom sdesc = "panel" noun = 'panel' adjective = 'small' isopen = nil opendesc = "panel reveals a clamp set into the wall that could be used to hold a small item in place. <>" //IS THE VIAL IN THE CLAMP? ldesc = { if( self.isopen ) "The opened <>"; else "The panel is closed."; } doOpen( actor ) = { "Opening the <>"; self.isopen := true; } verIoPutIn( actor ) = { "You cannot put anything in the panel. "; } ; Clamp: fixeditem, container location = Panel sdesc = "clamp" noun = 'clamp' verIoPutIn( actor ) = {} ioPutIn( actor, dobj ) = { if( dobj = Vial ) { dobj.moveInto( self ); "The vial fits into the clamp with a soft click and two thin copper wires snap out of the wall above the clamp and slide down into the vial. "; Wires.moveInto( Panel ); //CLAMP ACTIVATES WIRES WHICH FIT INTO VIAL AND CONDUCT ELECTRICITY IF THE ACID IS THERE if ( isclass( car(Vial.contents), Acid ) ) //ARTISAN SOLUTION TO THE PUZZLE { "As the wires contact the liquid inside the vial a faint hum begins to emanate from the wall. With a halting lurch the grate moves slowly upward, opening completely. "; Desc.Artisan := Desc.Artisan +1; Desc.current := MaesterArtisan; Grate.isopen := true; } } else { "\^<> is to big to fit in the clamp. "; //ONLY THE VIAL WILL FIT return nil; } } ; Wires: fixeditem noun = 'wire' 'wires' adjective = 'thin' 'copper' 'two' sdesc = "copper wires" ldesc = "The two copper wires come out of the wall and extend about half-way down into the vial. " ; class Acid: liquid, fooditem, lightsource location = Pool noun = 'liquid' 'acid' adjective = 'glowing' 'pool' sdesc = "glowing liquid" ldesc = "The liquid glows with an ethereal light. " isdynamic = true baseDisambigScore = { return self.isIn (Me) ? 150 : 0; } verDoEat( actor ) = {} doEat( actor ) = { "I\'m going to go ahead and assume you meant drink.\b"; self.doDrink( actor ); } verDoDrink( actor ) = {} doDrink( actor ) = { "The glowing liquid has a distinctly acidic taste. You feel a bit odd after swallowing it, but the feeling passes and you don’t seem to have suffered any ill effects.\n"; delete self; //DELETE DYNAMIC OBJECTS } ; AcidPool: room enterRoom( actor ) = { notify (self, &script, 0); //MAKE SURE THE POOL HAS LIQUID IN IT pass enterRoom; } leaveRoom(actor) = //LET THE SCRIPT RELAX { unnotify(self, &script); pass leaveRoom; } sdesc = "Glowing Pool" ldesc = "No one but a Maester Alchemist could have devised this room. The floor and walls are normal enough but in the center of the room is a pool of liquid that glows with an ethereal light. Surrounding the pool a ring of alchemical symbols have been carved into the stone. Hanging on the wall are two large charts, one covered in stars and the other in planets. An exit leads west.\n" west = DampRoom Acidnumber = 0 script = { local AcidName := 'acid' + cvtstr( self.Acidnumber ); if( Pool.isdry ) //CREATE AN ACID OBJECT AND PUT IT IN THE POOL WHENEVER THE POOL AcidName := new Acid; //DOESN'T HAVE AN ACID OBJECT IN IT self.Acidnumber += 1; } ; Vial: liquidcont location = AcidPool noun = 'vial' 'tube' adjective = 'glass' 'test' 'small' sdesc = "glass vial" ldesc = "A small glass vial of the sort used often by alchemists for holding chemicals. <>" doTake( actor ) = { if( self.location = Clamp ) { "There is a soft click as you remove the vial from the clamp and the wires disappear back into the wall.\n"; Wires.moveInto( nil ); } pass doTake; } ; Pool: fixeditem, qcontainer location = AcidPool noun = 'pool' sdesc = "pool" ldesc = "The pool is filled with a glowing liquid. Through the liquid you can see the bottom of the pool which seems to be made of black and white sand swirled together in complex patters. <> " verDoEnter(actor) = { "A misunderdtanding; when I say pool I mean it as a small round structure in the center of the room, not as something you might swim in. It is certainly not large enough to enter.\n"; } ioPutIn( actor, dobj ) = { if( dobj = BattleAxe ) { "You drop <> into the pool and watch as the metal quickly disintegrates, leaving only the leather strip that the handle was wrapped in.\n"; dobj.moveInto( nil ); LeatherStrip.moveInto( self ); } else pass ioPutIn; } isdry = { if ( self.contents <> nil ) { self.tmpList := self.contents; self.tmpObj := car( tmpList ); while ( tmpObj <> nil ) { if( isclass(tmpObj, Acid) ) return nil; tmpList := cdr( tmpList ); tmpObj := car( tmpList ); } return true; } else return true; } ; LeatherStrip: earth, item noun = 'strip' adjective = 'leather' sdesc = "leather strip" ldesc = "A little over two feet of leather a little wider than your thumb and about as thick as a silver mark.\n" ; Sand: decoration location = AcidPool noun = 'sand' adjective = 'black' 'white' sdesc = "sand" ldesc = "The sand is swirled together in complex patterns too intricate for the eye to follow. Taken as a whole it is an unneccesary reminder of your horrible blunder with the time-flow inhibitor.\n" ; PoolSymbols: decoration location = AcidPool noun = 'symbol' 'symbols' 'stone' 'carvings' 'carving' 'serpent' adjective = 'ring' 'alchemical' 'winged' sdesc = "symbols" ldesc = "Carved around the edge of the pool is a winged serpent with the symbols for fire and water on its head. On its wings are carved the symbols of the constellations Cancer and Leo and on its body is the symbol for the planet Mars. " ; Mars: decoration location = AcidPool noun = 'mars' sdesc = "Mars" ldesc = "The symbol for the planet mars is a ring with an arrow pointing upward and to the right. You recognize it from hours spent studying for Alchemy classes.\n" ; Cancer: decoration location = AcidPool noun = 'cancer' sdesc = "Cancer" ldesc = "A crab is carved on the left wing of the serpent, indicating the constellation Cancer.\n" ; Leo: decoration location = AcidPool noun = 'leo' sdesc = "Leo" ldesc = "A lion is carved on the right wing of the serpent, indicating the constellation Leo.\n" ; Wings: decoration location = AcidPool noun = 'wings' sdesc = "wings" ldesc = "A crab is carved on the left wing of the serpent and a lion on the right, symbolizing the constellations Cancer and Leo respectively.\n" ; StarChart: earth, fixeditem location = AcidPool sdesc = "star chart" noun = 'chart' 'charts' adjective = 'star' 'stars' 'large' ldesc = "\tThe Twelve Processes in Zodiacal Time \b\t\tAries:\tCalcination \n\t\tTaurus:\tCongelation \n\t\tGemini:\tFixation \n\t\tCancer:\tSolution \n\t\tLeo:\tDigestion \n\t\tLibra:\tSublimation \n\t\tScorpio:\tSeparation \n\t\tSagittarius:\tCeration \n\t\tCapricorn:\tFermentation \n\t\tAquaries:\tMultiplication " ; PlanetChart: earth, fixeditem location = AcidPool sdesc = "planet chart" noun = 'chart' 'charts' adjective = 'planet' 'planets' 'large' ldesc = "\tThe Seven Planetary Metals \b\t\tSol:\tGold \n\t\tLuna:\tSilver \n\t\tMars:\tIron \n\t\tMercury:\tQuicksilver \n\t\tJupiter:\tTin \n\t\tVenus:\tCopper \n\t\tSaturn:\tLead " ; class pipe: room enterRoom( actor ) = { notify (self, &script, 0); //CHECK WATER-FLOW pass enterRoom; } leaveRoom(actor) = //LET THE SCRIPT RELAX { unnotify(self, &script); pass leaveRoom; } sdesc = "Water Pipe" ldesc = "You are standing in a large water pipe that slants upward to the south. <> A smaller pipe leads off to the east.\n" east = { "You feel the world shift slightly as you step eastward. The room around you disappears leaving you a bit disoriented.\n"; return AcidPool; } Waternumber = 0 script = { local WaterName := 'waterB' + cvtstr( self.Waternumber ); if( self.isdry ) //CREATE A WATER OBJECT AND PUT IT IN THE PIPE WHENEVER THE PIPE { WaterName := new Water; //DOESN'T HAVE A WATER OBJECT IN IT self.Waternumber += 1; } } isdry = { if ( self.contents <> nil ) { self.tmpList := self.contents; self.tmpObj := car( tmpList ); while ( tmpObj <> nil ) { if( isclass(tmpObj, Water) ) return nil; tmpList := cdr( tmpList ); tmpObj := car( tmpList ); } return true; } else return true; } ; Pipe1: pipe north = DampRoom south = Pipe2 ; Pipe2: pipe north = Pipe1 south = Pipe3 ; Pipe3: pipe north = Pipe2 south = Pipe4 ; Pipe4: pipe north = Pipe3 south = Pipe5 ; Pipe5: pipe north = Pipe4 south = WaterSource ; InPipe: hard, decoration, floatingItem location = { if( isclass( Me.location, pipe ) ) return Me.location; else return nil; } noun = 'pipe' sdesc = "pipe" ldesc = "You are standing in it.\n" ; class Water: liquid, fooditem, floatingItem location = { if( isclass( Me.location, pipe ) ) return Me.location; else return nil; } noun = 'water' sdesc = "water" adesc = "water" ldesc = "There’s nothing notable about the water.\n" isListed = { if( isclass( self.location, liquidcont ) ) //SHOULD FIX THE "NOTHING IN VIAL" PROBLEM return true; else return nil; } isdynamic = true baseDisambigScore = { return self.isIn (Me) ? 150 : 0; } verDoEat( actor ) = {} doEat( actor ) = { "I\'m going to go ahead and assume you meant drink.\b"; self.doDrink( actor ); } verDoDrink( actor ) = {} doDrink( actor ) = { "You drink the water; cold and refreshing.\n"; delete self; //DELETE DYNAMIC OBJECTS } ; WaterSource: room enterRoom( actor ) = { notify (self, &script, 0); //CHECK WATER-FLOW pass enterRoom; } leaveRoom(actor) = //LET THE SCRIPT RELAX { unnotify(self, &script); pass leaveRoom; } sdesc = "Water Source" ldesc = "You have come to the end of the pipe. A valve set into the wall here is <> The only exit leads back north.\n" north = Pipe5 Waternumber = 0 script = { local WaterName := 'waterC' + cvtstr( self.Waternumber ); if( self.isdry ) //CREATE A WATER OBJECT AND PUT IT IN THE PIPE WHENEVER THE PIPE { WaterName := new Water; //DOESN'T HAVE A WATER OBJECT IN IT WaterName.moveInto( self ); //DEFAULT LOCATION IS PIPE SO IT HAS TO BE MOVED HERE self.Waternumber += 1; } } isdry = { if ( self.contents <> nil ) { self.tmpList := self.contents; self.tmpObj := car( tmpList ); while ( tmpObj <> nil ) { if( isclass(tmpObj, Water) ) return nil; tmpList := cdr( tmpList ); tmpObj := car( tmpList ); } return true; } else return true; } ; Valve: fixeditem location = WaterSource noun = 'valve' 'faucet' 'spigot' sdesc = "valve" ldesc = "The valve is <> " isopen = nil verDoOpen( actor ) = { if ( self.isopen ) "\^<> is already open. "; } doOpen( actor ) = { "You open the valve and water rushes out flowing down the pipe to the north. "; self.isopen := true; if( !Grate.isopen ) //HAS THE PLAYER ALREADY OPENED THE GRATE? { Grate.isopen := true; Desc.Seer := Desc.Seer +1; //SEER SOLUTION TO THE PUZZLE Desc.current := MaesterSeer; DampRoom.noted := true; self.didopen := true; } } verDoClose( actor ) = { if ( not self.isopen ) "\^<> is already closed. "; } doClose( actor ) = { "You close the valve and the rush of water slows to a steady trickle. "; self.isopen := nil; if( self.didopen ) //DID THE WATER OPEN THE GRATE OR WAS IT OPEN ALREADY? { Grate.isopen := nil; Desc.Seer := Desc.Seer -1; DampRoom.noted := nil; } } didopen = nil ; //