10 REM   DRACULA copyright Elizabeth N. Arkush, 1130 E. First St., Bloomington IN
15 REM        created 12/84 (at age 13)
20 REM  may be freely copied for non-commercial purposes
25 DIM RD$(22), C$(10), O$(42), E(22,4), OL(42), OC(42), OD$(42), V$(12), INV(42)
30 BL=3: R=22
35 GOTO 100:REM READ FILE
40 GOTO 200:REM INTRODUCTION
45 GOTO 400:REM NEW ROOM
50 GOTO 500:REM INPUT
55 GOTO 600:REM COMMANDS
60 GOTO 700:REM PARSING
65 GOTO 900:REM ACTION
70 GOTO 50
100 REM ***** READ DATA *****
105 FOR I=1 TO 22
110 READ RD$(I), E(I,1), E(I,2), E(I,3), E(I,4):NEXT
115 FOR I=1 TO 42
120 READ O$(I), OD$(I), OL(I), OC(I) 
125 NEXT
130 FOR I=1 TO 10
135 READ C$(I)
140 NEXT
145 FOR I=1 TO 12
150 READ V$(I)
155 NEXT
160 GOTO 40
200 PRINT CHR$(26):REM  ****** INTRODUCTION ******
210 PRINT:PRINT:PRINT"                D R A C U L A ' S     M A N S I O N "
220 PRINT:PRINT:PRINT TAB(50) "by Elizabeth Arkush, 12/84": PRINT
230 PRINT:PRINT"	In this game you will be inside of Dracula's mansion, searching for":PRINT" the fabled Blood Ruby.  There are only two things that can kill Dracula:":PRINT" a silver bullet, and a wooden stake through the heart."
240 PRINT:PRINT"	Things to keep in mind while playing:":PRINT:PRINT"         *  There are many secret doors in the mansion.":PRINT"	 *  Dracula leaves a trail of bloody footprints wherever he walks."
250 PRINT"         *  The command 'LOOK' and the name of an item will give you a closer":PRINT"	    look at almost anything.":PRINT"         *  Dracula can turn into a bat and can bite necks in that condition."
260 PRINT"         *  Ordinary bats are harmless."
270 PRINT:PRINT:PRINT"                    press any key"  
280 B$=INKEY$:IF B$="" THEN X=X+1:GOTO 280
290 RANDOMIZE X
300 PRINT CHR$(26):PRINT:PRINT"One-word commands you may use are:":PRINT"     NORTH":PRINT"     SOUTH":PRINT"     EAST":PRINT"     WEST":PRINT"     UP":PRINT"     DOWN"    
310 PRINT:PRINT"You will learn some others in the course of the game.  You may also use two-word commands consisting of a verb and a noun, like:"
320 PRINT"     GET RUBY":PRINT"     LOOK RUBY":PRINT"     EAT RUBY"
330 PRINT"       Yuck!!!"
340 PRINT:PRINT"Please type in CAPITALS ONLY."
350 PRINT:PRINT:PRINT"                 press any key"
360 B$= INKEY$:IF B$="" THEN GOTO 360
370 GOTO 45
400  REM     ***** NEW ROOM *****
410 IF R=6 THEN GOTO 440
420 IF R=22 AND T=1 THEN GOTO 4000
430 PRINT CHR$(26)
440 PRINT:PRINT RD$(R):T=1
450 D=0:W=0:V=0
460 IF R=8 AND DRACD=0 THEN D=1:GOSUB 4180:REM DRACULA
470 IF R=17 THEN W=1
480 IF R=17 THEN GOSUB 4140: REM DIALOUGUE
490 IF R=5 OR R=19 THEN V=INT(RND*2+1):IF V=1 AND DRACD=0 THEN D=1
495 GOTO 50
500 REM    ***** INPUT *****
510 A$=""
520 PRINT:INPUT"           COMMAND";A$
530 FOR B=1 TO LEN(A$)-1
540 IF MID$(A$,B,1)=" " THEN GOTO 700
550 NEXT
600 REM     ***** COMMANDS *****
610 V$=A$
620 FOR C=1 TO 10 
630 IF A$=C$(C) THEN GOTO 900
640 NEXT
650 PRINT"I don't understand!!":GOTO 500
700 REM    ***** PARSING *****
710 REM  VERBS
720 V$=LEFT$(A$,B-1)
730 FOR V=1 TO 12
740 IF V$= V$(V) THEN 780
750 NEXT
760 PRINT"I don't know how to ";V$
770 V=0:GOTO 500
780 REM NOUNS
790 L=LEN(A$)
800 N$=MID$(A$,B+1,L)
810 FOR N=1 TO 42
820 IF N$<>O$(N) THEN NEXT:GOTO 850 
830 IF OL(N)=R THEN GOTO 65
840 IF INV(N)=1 THEN GOTO 65
850 PRINT"No ";N$" around here!"
860 N=0:GOTO 50 
900 REM  ****  ACTION  ****
910 IF V$="NORTH" THEN GOTO 1120
920 IF V$="SOUTH" THEN GOTO 1120
930 IF V$="EAST" THEN GOTO 1120
940 IF V$="WEST" THEN GOTO 1120
950 IF V$="UP" THEN GOTO 1460
960 IF V$="DOWN" THEN GOTO 1460
970 IF V$="SHOOT" THEN GOTO 1190
980 IF V$="FLASH" THEN GOTO 1250
990 IF V$="STAB" THEN GOTO 1320
1000 IF V$="GAZE" THEN GOTO 1370
1010 IF V$="LOOK" THEN GOTO 1420
1020 IF V$="GET" THEN GOTO 1490
1030 IF V$="OPEN" THEN GOTO 1560
1040 IF V$="UNLOCK" THEN GOTO 1640
1050 IF V$="STAND" THEN GOTO 1730
1060 IF V$="PUSH"OR V$="PRESS" THEN GOTO 1760
1070 IF V$="EAT" THEN GOTO 1830
1080 IF V$="DROP" THEN GOTO 1860
1090 IF V$="SIT" THEN GOTO 1890
1100 IF V$="WEAR" THEN GOTO 1530
1110 IF V$="LIFT" THEN GOTO 1920
1120 IF V$="NORTH"THEN EN=1
1130 IF V$="SOUTH" THEN EN=2
1140 IF V$="EAST" THEN EN=3	
1150 IF	V$="WEST" THEN EN=4
1160 IF D=1 OR W=1 THEN GOSUB 1940
1170 IF E(R,EN)=0 THEN PRINT"You can't go that way.":GOTO 500
1180 R=E(R,EN):GOTO 45
1190 IF INV(29)<>1 THEN PRINT"You don't have a gun!!":GOTO 500 
1200 IF BL=0 THEN PRINT"You don't have any more bullets!!":GOTO 500
1210 IF D=1 THEN PRINT"YOU KILLED DRACULA!!!!!":DRACD=1:D=0:BL=BL-1:GOTO 500
1220 IF W=1 THEN PRINT"The bullet does not harm the werewolf!":BL=BL-1:GOTO 500
1230 IF V=2 THEN PRINT"You killed the bat...but it wasn't Dracula!!":V=0:BL=BL-1:GOTO 500
1240 PRINT"Good job, you just shot the wall!":BL=BL-1:GOTO 500 				        
1250 IF INV(32) <>1 THEN PRINT"You can't flash without a mirror!":GOTO 500 
1260 IF W<>1 THEN GOTO 1290
1270 PRINT"You blinded the werewolf!!!  He slowly turns human again because he can't see the full moon.
1280 PRINT"He gets up and thanks you, saying that in return he will show you a secret door to the east which is opened by pushing a switch on the wall.":SW=1:W=0:GOTO 500 
1290 IF D=1 THEN PRINT"The only thing that can harm Dracula is a silver bullet or a wooden stake!":GOTO 500
1300 IF V=2 THEN PRINT"You killed the bat...but it wasn't Dracula!":V=0:GOTO 500
1310 PRINT"The only thing you blinded was a beetle on the floor!":GOTO 500
1320 IF INV(36)<>1 THEN PRINT"You can't stab without a stake!":GOTO 500
1330 IF D=1 THEN PRINT"YOU KILLED DRACULA!!!!":DRACD=1:D=0:GOTO 500
1340 IF W=1 THEN PRINT"The stake has no effect on the werewolf!":GOTO 500
1350 IF V=2 THEN PRINT"You killed the bat...but it wasn't Dracula!":V=0:GOTO 500
1360 PRINT"Good job, you just stabbed your big toe!":GOTO 500
1370 IF R<>15 AND INV(34)<>1 THEN PRINT"You can't gaze without a crystal ball!":GOTO 500
1380 CR=INT(RND*3+1)
1390 IF CR=1 THEN PRINT"You see yourself lifting up a blue and green carpet and finding a wooden stake!":GOTO 500
1400 IF CR=2 AND DRACD=0 THEN PRINT"You see Dracula turning into a black bat!":GOTO 500
1410 PRINT"You see a werewolf somewhere in the mansion!":GOTO 500 
1420 GOSUB 1940
1430 IF N$="ROOM" THEN GOTO 400
1440 PRINT O$(N);"--";OD$(N)
1450 N=0:GOTO 500
1460 IF R=10 AND V$="UP" THEN R=14:GOTO 400
1470 IF R=14 AND V$="DOWN" THEN R=10:GOTO 400
1480 PRINT"You can't go that way.":GOTO 500 
1490 GOSUB 1940
1500 IF OC(N)=0 THEN PRINT"You can't carry that!!":N=0:GOTO 500 
1510 INV(N)=1  
1520 PRINT"You got the ";N$".":GOTO 1440:REM  LOOKS AT POSSESION      
1530 IF N$="COAT" THEN PRINT"O.K., you're wearing the coat.":CT=1:GOTO 500
1540 IF N$="BOOTS" THEN PRINT"O.K., you're wearing the boots.":GOTO 500
1550 PRINT"You can't wear that!!":GOTO 500
1560 GOSUB 1940
1570 IF N$="COFFIN" AND ULC=1 THEN PRINT"You opened the coffin and found the Blood Ruby!":OL(23)=8:GOTO 500
1580 IF N$="COFFIN"AND ULC=0 THEN PRINT"It's locked.":GOTO 500
1590 IF N$="BOX" THEN PRINT"You opened the box and found a mirror.  Something seems to be written on it!":OL(32)=16:GOTO 500
1600 IF N$="DRAWER" AND R=12 THEN PRINT"You opened the drawer and found a set of doorkeys.":OL(27)=12:GOTO 500
1610 IF N$="CABINET" AND R=13 AND UL<>1 THEN PRINT"It's locked.":GOTO 500
1620 IF N$="CABINET" AND R=13 AND UL=1 THEN PRINT"You opened the cabinet and found a silver gun.  It has ";BL" bullets.":OL(29)=13:GOTO 500 
1630 PRINT"You can't open that!":GOTO 500
1640 GOSUB 1940
1650 IF INV(27)<>1 THEN PRINT"You can't unlock without a doorkey!":GOTO 500
1660 IF N$="COFFIN" THEN PRINT"You unlocked the coffin.":ULC=1:GOTO 500
1670 IF N$="CABINET"  AND R=13 AND UL<>1 THEN PRINT"You unlocked the cabinet.":UL=1:GOTO 500
1680 IF N$="CABINET" AND R=13 AND UL=1 THEN GOTO 1720
1690 IF N$="DRAWER" AND R=12 THEN GOTO 1720
1700 IF N$="COFFIN" OR N$="BOX" THEN GOTO 1720
1710 PRINT"You can't unlock that!":GOTO 500
1720 PRINT"It's already unlocked.":GOTO 500 
1730 GOSUB 1940
1740 IF N$="SQUARE" THEN PRINT"You stood on the square and...whoops!  Fell down through a trap door into the room below.":R=6:GOTO 400
1750 PRINT"O.K., you stood on the ";N$".":GOTO 500    
1760 GOSUB 1940
1770 IF N$="KEY" THEN PRINT"The organ slides aside to reveal a secret door to the north.":E(3,1)=13:GOTO 500
1780 IF N$="BUTTON" THEN PRINT"The bookcase falls back to reveal a tunnel to the east.":E(6,3)=7:GOTO 500
1790 IF N$="SWITCH" THEN PRINT"A hole appears in the east wall.":E(17,3)=18:GOTO 500
1800 IF N$="STATUE" THEN PRINT"A large section of the wall sinks into the ground, revealing a previously hidden room to the south.":E(11,2)=12:GOTO 500
1810 IF N$="RAILING" THEN PRINT"The railing fell off of the balcony and so did you.  Too bad.":R=22:DD=1:GOTO 400
1820 PRINT"You pushed the ";N$", but it didn't do you a whole lot of good.":GOTO 500
1830 GOSUB 1940
1840 IF N$="FOOD" THEN PRINT"Sorry, but the food was poisoned.  You shouldn't trust other people's food.":R=22:DD=1:GOTO 400
1850 PRINT"It doesn't look very appetizing.":GOTO 500
1860 GOSUB 1940
1870 IF INV(N)=1 THEN PRINT"O.K., you dropped it.":INV(N)=0:OL(N)=R:GOTO 500
1880 PRINT"You didn't have it in the first place.":GOTO 500
1890 GOSUB 1940
1900 IF N$="CHAIR" THEN PRINT"O.K., you sat on the chair.":GOTO 500
1910 PRINT"You can't sit on the ";N$"!":GOTO 500
1920 IF N$="CARPET" THEN PRINT"You lifted up the carpet and found a wooden stake.":OL(36)=18:GOTO 500
1930 PRINT"You can't lift that!":GOTO 500
1940 REM  CHECK
1950 IF D<>1 OR DRACD=1 THEN GOTO 1990
1960 IF CT=1 THEN PRINT"Dracula couldn't bite through your coat!!":CT=2:GOTO 500
1970 IF CT=2 THEN PRINT"Dracula made it through your coat this time!  Sorry!":R=22:DD=1:GOTO 400
1980 PRINT"Sorry! Dracula just bit you!":R=22:DD=1:GOTO 400
1990 IF W=1 THEN PRINT"Sorry, the werewolf just ate you!!!":R=22:DD=1: GOTO 400
2000 IF R=21 THEN N$="RAILING":GOTO 1810
2010 RETURN 
4000 REM   **** CONCLUSION ****
4010 FOR I=1 TO 1000:NEXT: PRINT CHR$(26)
4020 IF DD<>1 THEN GOTO 4040
4030 PRINT"Too bad, you didn't make it through Dracula's mansion.":PRINT:PRINT"At the time of your death you owned:":GOTO 4060
4040 PRINT"YOU MADE IT THROUGH DRACULA'S MANSION!": IF INV(23)<>1 THEN PRINT"However, you didn't find the Blood Ruby."
4050 PRINT:PRINT"You own:"
4060 FOR I=1 TO 41  
4070 IF INV(I)=1 THEN PRINT O$(I)
4080 NEXT
4090 IF INV(23)=1 THEN PRINT"YOU WON!!!":GOTO 4110
4100 PRINT:PRINT"Sorry, but you didn't win.  Oh well, that's life." 
4110 PRINT:INPUT"Want to play again";S$
4120 S$=LEFT$(S$,1):IF S$="Y" THEN RUN
4130 PRINT CHR$(26):END
4140 REM   ** WEREWOLF DIALOGUE **
4150 PRINT"'Hello', he says.  'Listen, I think you'd better not stay in here too long.  You see, whenever I see the full moon, I...'"
4160 PRINT"Suddenly, the moon drifts into view from behind a dark cloud.  The man takes one look and turns into a wolf!"
4170 RETURN      
4180 PRINT"Dracula stands in the middle of the room!"
4190 RETURN
5000  REM      ***** DATA *****
5010 REM ROOMS         
5020 DATA "This is the foyer.  There is a motheaten rug on the floor and an old chair in a corner.  A large oak door to the west leads outside.  There are three other doors; one to the north, one to the south, and one to the east.",3,2,4,22
5030 DATA "This is a coat closet.  One coat and a pair of boots are inside.  There is a door to the north.",1,0,0,0
5040 DATA "This is the dining room.  A long table is in the middle of the room.  The table is set, and food is heaped on the plates.  Bloody footsteps lead to an old organ on the north wall.  There is a door to the south and one to the east.",0,1,11,0
5050 DATA "Here you find the sitting room.  There is an old rug on the floor and several chairs arranged around the room.  Two doors lead north and west.",5,0,0,1
5060 DATA "Here is a large, empty room.  One door goes north and one south.  A huge, black bat wings its way towards you.  It might be Dracula!!",10,4,0,0
5070 DATA "This is the library.  There is a bookcase on the east wall.  Two large leather chairs sit opposite each other.  There are no visible doors anywhere.",0,0,0,0
5080 DATA "Here is a tunnel carved out of rock, going east-west.  The walls are slimy and wet; the floor slippery.  The tunnel slants down to the east.  It is pitch black.",0,0,8,6
5090 DATA "This is Dracula's cave.  It is a huge cavern, lit by flickering candles inserted into nooks in the walls.  Tunnels lead east and south.  A closed coffin lies in the south end of the cave.  ",0,9,0,7
5100 DATA "This is a long tunnel going from an entrance north, and curving to the east where there is another exit.  The tunnel is dimly lit by a soft light from the east exit.  Stalactites and stalagmites protrude from the floor and ceiling.",8,0,22,0
5110 DATA "Here you find an empty room with an Oriental rug on the floor and a large chandelier hanging from the ceiling.  Wide stairs go up to the 2nd story.  There is a door to the south and another to the west.",0,5,0,11
5120 DATA "This is the hall.  It goes north-south.  There are two doors: one to the east, one to the west.  The corridor stops short on the south end, where there is a niche containing a little stone statue.",0,0,10,3 
5130 DATA "This is a tiny room containing a desk with an unlocked drawer.  There is a door to the north.",11,0,0,0
5140 DATA "Here is a smallish room with a chair in one corner and a dresser in another.  The dresser cabinet is locked.  A corpse lies on the floor; there are two bloody puncture marks on its neck.",0,3,0,0
5150 DATA "Here you find a large, empty room with stairs going down to the 1st story.  There is one door to the south and one to the west.",0,15,0,16
5160 DATA "In the middle of this room is a marble pedestal.  On the pedestal is a crystal ball.  There is a door to the north.  If you wish to gaze into the crystal ball, type 'GAZE'.",14,0,0,0
5170 DATA "Here is a large room, bare of all furniture except for a closed box.  There are two doors, one east, one south.",0,17,14,0
5180 DATA "Here you find a large room with a window on the south side.  There is one door to the north.  An ordinary-looking man sits in a chair.",16,0,0,0
5190 DATA "This is the upstairs hall.  There is a blue and green carpet on the floor.  There are doors north, east, and west.",19,0,21,17 
5200 DATA "Here is a small, bare room with one door to the south and one to the north.  There is a trail of bloody footprints leading to the north door.  Suddenly, a huge black bat awakens and flies toward you.  It might be Dracula!",20,18,0,0
5210 DATA "This is a small room with a red square in  one corner.  Above the square is a sign that says, 'DO NOT STAND ON THIS SQUARE!!!'  There is a door to the south.",0,19,0,0
5220 DATA "This is the balcony.  There is a door to the west.  You'd better not stay too long: the railing looks rotten.",0,0,0,18
5230 DATA "You are outside of Dracula's mansion.  Somewhere inside are both the Blood Ruby and Dracula.  The mansion is east of you.",0,0,1,0
5240 REM
5250 REM   OBJECTS
5260 REM
5270 DATA "RUG","an old, motheaten rug that used to be red.",1,0
5280 DATA "CHAIR","woodenbacked, the cushions have large rips in them.",1,0
5290 DATA "COAT","a fur coat with patches coming out.",2,1
5300 DATA "BOOTS","they are old and brown, with the soles coming out.",2,1
5310 DATA "TABLE","there is a tablecloth on it and the table is set.  One table leg is broken.",3,0
5320 DATA "TABLECLOTH","it was once white.",3,0
5330 DATA "PLATE","White, china one, generally in good condition.",3,1
5340 DATA "FORK","sterling silver eating utensil.",3,1
5350 DATA "KNIFE","sharp, sterling silver eating utensil.",3,1
5360 DATA "FOOD","a mouthwatering display of appetizers, entrees, and desserts.",3,1
5370 DATA "CHANDELIER","an elaborate glass structure complete with flickering candles.",10,0
5380 DATA "FOOTPRINTS","the bloody footprints are still wet.",3,0
5390 DATA "ORGAN","there is a key in the middle of the keyboard with a bloody fingerprint on it.",3,0
5400 DATA "KEY","a white organ key that has one bloody fingerprint on it.",3,0
5410 DATA "BOOKCASE","a large wooden bookcase that contains about two hundred horror novels.  There is a large, red button on the side of it.",6,0
5420 DATA "BUTTON","a large, red button that looks like it's made out of plastic.  There is a bloody fingerprint on it.",6,0  
5430 DATA "BOOKS","many of them are about Dracula and have bloody fingerprints on them.",6,1
5440 DATA "STALAGMITES","wet limestone formations protruding from the floor.",7,0
5450 DATA "STALACTITES","dripping limestone formations protruding from the ceiling.",7,0
5460 DATA "CANDLE","white tallow candle set into a nook in the wall.",8,1
5470 DATA "NOOK","a rough hollow carved out of the living rock.  There is a flickering candle inside.",8,0
5480 DATA "COFFIN","a closed, and locked, oak coffin.",8,0
5490 DATA "RUBY","large, deep red, of amazing beauty and perfection.",0,1
5500 DATA "NICHE","a small hollow in the wall. It contains a small stone statue.",11,0
5510 DATA "STATUE","made out of marble, and covered with bloody handprints, it has a circle around the base as if it could be pushed down a small way.",11,0
5520 DATA "DESK","an old, wooden desk with one closed drawer.",12,0   
5530 DATA "DOORKEYS","a set of silver and gold doorkeys on a gold keyring.",0,1
5540 DATA "DRESSER","an antique dresser with one locked cabinet.",13,0
5550 DATA "GUN","the gun is made out of silver and has 3 silver bullets inside.  The command to shoot the gun is 'SHOOT'.",0,1
5560 DATA "CORPSE","it is a man, perhaps in his late 20's.  There are two bloody puncture marks on his neck.  The body is still warm.",13,0
5570 DATA "BOX","an old, cardboard carton.",16,1
5580 DATA "MIRROR","a face-down, silver-backed mirror with an inscription on the back: 'WHOEVER DARES LOOK IN THIS MIRROR SHALL NEVER SEE AGAIN!'  The command to blind someone with the mirror is 'FLASH'.",0,1
5590 DATA "PEDESTAL","a large, marble pedestal holding a crystal ball.",15,0
5600 DATA "BALL","a perfect sphere of clear glass. The command to look into it is 'GAZE'.",15,1
5610 DATA "CARPET","made of blue and green dyed wool.",18,0
5620 DATA "STAKE","made of wood.  The command to kill someone with it is 'STAB'.",0,1
5630 DATA "SQUARE","a red square in one corner.",20,0
5640 DATA "SIGN","the sign is white with letters in blood: ' DO NOT STAND IN THIS SQUARE!! '.",20,0
5650 DATA "RAILING","rotten-looking.",21,0
5660 DATA "DRAWER","it is closed but not locked.",12,0
5670 DATA "CABINET","it is locked.",13,0
5680 DATA "SWITCH","a little switch on the east wall.",17,0 
5690 REM
5700 REM  COMMANDS
5710 REM
5720 DATA "NORTH"
5730 DATA "SOUTH"
5740 DATA "EAST"
5750 DATA "WEST"
5760 DATA "SHOOT"
5770 DATA "FLASH"
5780 DATA "GAZE"
5790 DATA "STAB"
5800 DATA "UP"
5810 DATA "DOWN"
5820 REM
5830 REM  VERBS
5840 REM
5850 DATA "GET"
5860 DATA "LOOK"
5870 DATA "EAT"
5880 DATA "PUSH"
5890 DATA "PRESS"
5900 DATA "STAND"
5910 DATA "DROP"
5920 DATA "OPEN"
5930 DATA "UNLOCK"
5940 DATA "LIFT"
5950 DATA "SIT"
5960 DATA "WEAR"
900 DATA "STAND"
5910 DATA "DROP"
5920 DATA "OPEN"
5930 DATA "UNLOCK"
5940 DATA "LIFT"
5950 DATA "SIT"
