Source:The Beginners Cave (ProDOS)

From Eamon Wiki
Jump to navigation Jump to search
This page is a verbatim reproduction of original source material and should not be edited except for maintenance.
Description

The source code of the ProDOS version of the Eamon adventure The Beginners Cave, written in Applesoft BASIC.

Source

Disk image provided by Eamon Adventurer's Guild Online

Date

Original adventure written circa late 1979; ProDOS version last updated 6 June 1991

Author

Donald Brown

License

The use of this item is permitted on the grounds that it's free or in the public domain.

Other versions

Source:The Beginners Cave (DOS 3.3)

Next item

Source:The Lair of the Minotaur

Leadin Program

2  REM  TEXT ADDED 5/11/91
10  HOME : PRINT "     TIPS FOR NEW EAMON PLAYERS:"
20  PRINT : PRINT "THIS ADVENTURE, 'BEGINNERS.CAVE' IS AN": INVERSE : PRINT "EXTREMELY";: NORMAL : PRINT " SIMPLE ADVENTURE THAT IS ONLY MEANT TO GIVE YOU AN EASY INTRODUCTION  TO EAMON ADVENTURING."
30  PRINT : PRINT "THIS ADVENTURE IS IN 40-COL. UPPER-CASE TEXT.  HOWEVER, EAMON ADVENTURES ARE    AVAILABLE IN 3 FLAVORS:"
40  PRINT : PRINT "  DOS 3.3 40-COL. UPPER-CASE TEXT": PRINT : PRINT "  PRODOS 40-COL. UPPER-CASE TEXT": PRINT : PRINT "  PRODOS 80-COL. MIXED-CASE TEXT": PRINT "    (LOWER-CASE WITH CAPITALIZATION)"
50  GOSUB 500
60  PRINT "YOU WILL FIND THAT YOUR NEW CHARACTER ISPRETTY WEAK WHEN YOU VENTURE OUT INTO   REAL EAMON ADVENTURING. I SUGGEST THAT  YOU PUMP HIM UP TO APPROXIMATELY THESE  LEVELS:"
70  PRINT : PRINT "HARDINESS = 22": PRINT "AGILITY = 22": PRINT "CHARISMA = 22": PRINT "SPELL ABILITIES = 100 (HEAL = 200)": PRINT "WEAPON ABILITIES = 60": PRINT "ARMOR EXPERTISE = 25"
80  PRINT : PRINT "AND GIVE YOURSELF AT LEAST ONE WEAPON OF   2D10 OR BETTER."
90  PRINT : PRINT "THERE IS ALREADY A CHARACTER AT THESE   LEVELS IN THE CHARACTERS FILE.": PRINT "   HIS NAME IS SAM."
100  GOSUB 500
110  PRINT "VARIOUS EAMONS COME WITH A WIDE VARIETY OF FEATURES AND CAPABILITIES, DEPENDING ON HOW OLD IT IS AND HOW TALENTED THE   AUTHOR IS."
120  PRINT : PRINT "EAMON ADVENTURES HAVE THE CAPABILITY OF 'CONCEALING' DOORS AND ARTIFACTS SO THATTHEY WON'T SHOW UP UNTIL YOU 'LOOK'     AROUND THE ROOM."
130  PRINT : PRINT "MORE ADVANCED EAMONS CAN ALSO CONCEAL   ARTIFACTS AND DOORS IN A SECOND MANNER  THAT WON'T SHOW UP WHEN YOU 'LOOK'.     (THESE ARE CALLED 'EMBEDDED ARTIFACTS')"
140  GOSUB 500: PRINT "HOWEVER, THIS SECOND TYPE WILL ALWAYS BEMENTIONED IN THE ROOM DESCRIPTION.  FOR EXAMPLE, A ROOM DESC. MAY MENTION THAT ATORCH IS SET IN A SCONCE ON THE WALL."
150  PRINT "THAT TORCH MAY OR MAY NOT BE AN ACTUAL  ARTIFACT. YOU CAN FIND OUT BY ATTEMPTINGTO EXAMINE IT BY NAME (EG: 'EXAMINE     TORCH')"
180  PRINT : PRINT "MANY ADVANCED EAMONS PERMIT TRUNCATION  OF VERB AND NOUN NAMES WHEN TYPING      COMMANDS (EG: 'AT MON' WILL WORK FOR    'ATTACK MONSTER').  HOWEVER, NEARLY ALL EAMONS REQUIRE THAT YOU TYPE THE"
190  PRINT "COMPLETE NAME WHEN EXAMINING POSSIBLE   EMBEDDED ARTIFACTS (EG: 'EXAMINE TOR'   WON'T WORK--YOU MUST TYPE OUT 'EXAMINE  TORCH')"
200  GOSUB 500: PRINT "THERE IS AN UNDOCUMENTED WAY TO RESTART A SAVED GAME IF YOU ARE KILLED."
210  PRINT : PRINT "WHEN YOU ARE INSTRUCTED TO:             (INSERT THE EAMON MASTER AND TYPE 'C'), LEAVE THE ADVENTURE DISK IN THE DRIVE   AND TYPE <CONTROL-C> INSTEAD, THEN TYPE"
215  PRINT "'RUN'. YOU WILL BE ASKED IF YOU WANT TO RESUME THE SAVED GAME."
220  PRINT : PRINT "NOTE THAT THIS WORKS ->ONLY<- IF YOU    HAVE SAVED THE GAME PREVIOUSLY."
230  PRINT : PRINT "IF YOU DO NOT RESUME A SAVED GAME, IT ISDELETED AND A NEW GAME IS INITIALIZED."
300  GOSUB 500: PRINT : PRINT "FEEL FREE TO DROP US A LINE WITH          QUESTIONS OR COMMENTS:"
310  PRINT : PRINT : PRINT "   TOM ZUCHOWSKI": PRINT "   EAMON ADVENTURER'S GUILD": PRINT "   7625 HAWKHAVEN DR.": PRINT "   CLEMMONS, NC 27012"
320  GOSUB 500
400  PRINT  CHR$ (4)"RUN MAIN.PGM"
499  END
500  VTAB 22: PRINT "     HIT ANY KEY TO CONTINUE: ";: POKE  - 16368,0: GET A$: PRINT A$: HOME : RETURN

Main Program

1  REM    EAMON ADVENTURE #1
2  REM -> THE BEGINNERS CAVE <-
3  REM 
4  REM     BY DONALD BROWN
5  REM 
7  REM 

EAMON ADVENTURER'S GUILD
7625 HAWKHAVEN DR.
CLEMMONS, NC 27012
(919)766-7490


8  REM PRODOS CONVERSION 1/12/90 TJZ

9  REM LAST UPDATE 9/19/90
40  HOME : VTAB 10: PRINT "PLEASE WAIT A SHORT WHILE": PRINT : PRINT "    (WAKING UP THE MONSTERS)"
50 DK$ =  CHR$ (4): GOTO 22000
100  REM ///GIVE ROOM DESC IF NEVER
105  REM ///HERE, THEN GET COMMAND
110  PRINT 
115  IF SPD THEN SPD = SPD - 1: IF  NOT SPD THEN MD%(0,2) = MD%(0,2) / 2:MD%(0,10) = MD%(0,10) - 2 * MD%(0,2)
120  IF V%(ROOM) THEN  PRINT DK$;"READ EAMON.ROOM.NAME,R";ROOM: INPUT A$: PRINT DK$: PRINT "YOU ARE STANDING IN": PRINT "  ";A$: PRINT 
125  IF  NOT V%(ROOM) THEN  PRINT DK$;"READ EAMON.DESC,R";ROOM: INPUT A$: PRINT DK$: PRINT A$: PRINT 
130  FOR M = 1 TO NM: IF MD%(M,5) = ROOM AND MD%(M,15) THEN  PRINT MN$(M);" IS HERE."
135  IF MD%(M,5) = ROOM AND  NOT MD%(M,15) THEN  PRINT DK$;"READ EAMON.DESC,R";M + 300: INPUT A$: PRINT DK$: PRINT A$:MD%(M,15) = 1: IF M = 10 THEN  PRINT DK$;"READ EAMON.DESC,R202": INPUT A$: PRINT DK$: PRINT : PRINT A$: PRINT 
140  NEXT M: FOR A = 1 TO NA - 1: IF AD%(A,4) = ROOM AND (A < NA) AND  NOT V%(ROOM) THEN  PRINT DK$;"READ EAMON.DESC,R";A + 100: INPUT A$: PRINT DK$: PRINT A$
145  IF AD%(A,4) = ROOM AND (A < NA) AND V%(ROOM) THEN  PRINT "YOU SEE ";AN$(A)
150  NEXT A: IF AD%(NA,4) = ROOM THEN  PRINT "YOUR ";AN$(A);" IS HERE."
155 V%(ROOM) = 1
160  PRINT : INPUT "  YOUR COMMAND?";A$
165  IF  LEFT$ (A$,1) = " " THEN A$ =  MID$ (A$,2): GOTO 165
170  IF A$ = "" THEN A$ = CZ$: VTAB  PEEK (37): HTAB 17: PRINT A$
175 CZ$ = A$: FOR A = 2 TO  LEN (A$): IF  MID$ (A$,A,1) <  > " " THEN  NEXT 
180 V$ =  LEFT$ (A$,A - 1):S$ =  MID$ (A$,A + 1)
185  IF  LEFT$ (S$,1) = " " THEN S$ =  MID$ (S$,2): GOTO 185
190  FOR C = 1 TO NC: IF C$(C) <  > V$ AND C$(C) <  > S$ THEN  NEXT : PRINT : PRINT "HUH? I ONLY UNDERSTAND THESE COMMANDS--     ";: FOR C = 1 TO NC: PRINT C$(C); SPC( 20 -  LEN (C$(C)));: NEXT : PRINT : PRINT : GOTO 160
195  IF C$(C) = S$ THEN S$ = V$:V$ = C$(C)
200  ON C GOTO 1000,1000,2000,3000,4000,4000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,6000,7000,8000,10000,11000,12000,13000,14000,15000,16000,17000,17000,17000,18000,18000,19000,20000,21000
300  REM ///COMMANDS RETURN TO HERE
310  IF  NOT NBTL THEN 440
320  FOR M = 1 TO NM: IF MD%(M,5) <  > ROOM THEN 430
330 MR = FD%(MD%(M,14)) / TD%(MD%(M,14)) - FD%( NOT MD%(M,14)) / TD%( NOT MD%(M,14)) / 5 +  INT (41 *  RND (1) - 20)
340  IF MD%(M,4) < MR THEN  PRINT : PRINT MN$(M);" FLEES OUT AN EXIT.": PRINT : GOSUB 17500:MD%(M,5) = R2:TD%(MD%(M,14)) = TD%(MD%(M,14)) - MD%(M,1):FD%(MD%(M,14)) = FD%(MD%(M,14)) - MD%(M,13): GOTO 430
350  IF MD%(M,14) THEN 390
360 OF = M: IF TD%(1) = MD%(0,1) THEN DF = 0: GOSUB 3500: GOTO 430
370  FOR M2 = 1 TO NM: IF MD%(M2,5) = ROOM AND MD%(M2,14) AND  RND (1) < .25 THEN DF = M2: GOSUB 3500:M2 = 200: NEXT M2: GOTO 430
380  NEXT M2:DF = 0: GOSUB 3500: GOTO 430
390 OF = M
400  FOR M2 = 1 TO NM: IF MD%(M2,5) = ROOM AND  NOT MD%(M2,14) THEN DF = M2: GOSUB 3500:M2 = 200: NEXT M2: GOTO 430
410  NEXT M2: GOTO 400
420  REM 
430 NBTL = (FD%(0) < TD%(0)): IF NBTL THEN  NEXT M
440  REM 
450  GOTO 100
1000  REM ///GET COMMAND
1010  GOSUB 1950
1020  IF S$ = "TORCH" THEN  PRINT : PRINT "ALL TORCHES ARE BOLTED TO THE WALL AND": PRINT "CANNOT BE REMOVED.": PRINT : GOTO 300
1030  IF S$ = "ALL" THEN 1120
1040  IF S$ <  > "RAT" THEN 1070
1050  FOR A = 14 TO 16: IF AD%(A,4) = ROOM THEN S$ = AN$(A)
1060  NEXT 
1070  IF S$ = "GOLD" OR S$ = "COINS" THEN S$ = AN$(5)
1080  FOR A = 1 TO NA: IF AN$(A) <  > S$ OR AD%(A,4) <  > ROOM THEN  NEXT : PRINT : PRINT "I SEE NO ";S$;" HERE!": PRINT : GOTO 100
1090  IF WT + AD%(A,3) > 10 * MD%(0,1) THEN  PRINT : PRINT "IT IS TOO HEAVY FOR YOU.": PRINT : GOTO 100
1100  PRINT : PRINT "GOT IT.":AD%(A,4) =  - 1:WT = WT + AD%(A,3): PRINT : IF AD%(A,2) < 2 OR MD%(0,9) <  >  - 1 THEN 300
1110  GOTO 16000
1120  FOR A = 1 TO NA: IF AD%(A,4) <  > ROOM THEN 1150
1130  IF WT + AD%(A,3) > 10 * MD%(0,1) THEN  PRINT AN$(A);" IS TOO HEAVY": GOTO 1150
1140  PRINT AN$(A);" TAKEN.":AD%(A,4) =  - 1:WT = WT + AD%(A,3)
1150  NEXT : PRINT : GOTO 300
1950  IF S$ = "" THEN  PRINT : PRINT C$(C);" WHAT";: INPUT S$: GOTO 1950
1960  RETURN 
2000  REM ///DROP COMMAND
2010  GOSUB 1950
2020  IF NBTL THEN  PRINT : PRINT "YOU CAN'T DO THAT WITH UNFRIENDLIES        ABOUT!": PRINT : GOTO 100
2030  IF S$ = "ALL" THEN 2060
2040  FOR A = 1 TO NA: IF AN$(A) <  > S$ OR AD%(A,4) <  >  - 1 THEN  NEXT : PRINT : PRINT "YOU AREN'T CARRYING A ";S$: PRINT : GOTO 100
2050 WT = WT - AD%(A,3): PRINT : PRINT "DROPPED.":AD%(A,4) = ROOM: PRINT : GOTO 300
2060  FOR A = 1 TO NA: IF AD%(A,4) <  >  - 1 THEN 2080
2070 WT = WT - AD%(A,3):AD%(A,4) = ROOM: PRINT AN$(A);" DROPPED."
2080  NEXT A: GOTO 300
3000  REM ///ATTACK COMMAND
3010  GOSUB 1950
3020  IF S$ <  > "RAT" THEN 3050
3030  FOR M = 1 TO 3: IF MD%(M,5) = ROOM THEN S$ = MN$(M)
3040  NEXT M
3050  FOR M = 1 TO NM: IF S$ <  > MN$(M) OR MD%(M,5) <  > ROOM THEN  NEXT : PRINT : PRINT "ATTACK WHO?": PRINT : GOTO 100
3060  IF MD%(0,9) =  - 1 THEN  PRINT : PRINT "YOU HAVE NO WEAPON READY!": PRINT : GOTO 100
3070 OF = 0:DF = M: GOSUB 3500: IF  NOT HIT THEN 3130
3080  IF INC THEN W2 = AD%(MD%(0,9),6):WA%(W2) = WA%(W2) + 2
3090  IF  - EA <  = AE THEN 300
3100  IF  INT (100 *  RND (1) + 1) <  = MD%(0,10) THEN 3130
3110 A = 2: IF EA + AE = 1 THEN A = 1
3120 AE = AE + A:MD%(0,10) = MD%(0,10) + A
3130  IF  NOT (MD%(DF,14)) OR DF = 0 THEN 300
3140 MD%(DF,3) = MD%(DF,3) / 2: IF NBTL THEN MD%(DF,14) = 0:TD%(0) = TD%(0) + MD%(DF,1):TD%(1) = TD%(1) - MD%(DF,1):FD%(0) = FD%(0) + MD%(DF,13):FD%(1) = FD%(1) - MD%(DF,13): GOTO 300
3150 R2 = ROOM:MD%(DF,14) = 0: GOTO 5100
3500 HIT = 0: IF MD%(OF,9) =  - 1 THEN  RETURN 
3505  PRINT MN$(OF);" ATTACKS ";MN$(DF): PRINT "  --";
3510 RL =  INT (100 *  RND (1) + 1):HIT = 0: IF RL < 5 OR RL < MD%(OF,10) THEN HIT = 1
3515  IF HIT THEN 3600
3520  IF RL < 97 THEN  PRINT "A MISS.": RETURN 
3525  PRINT "A FUMBLE!":FR =  INT (100 *  RND (1) + 1): IF FR <  = 35 + 40 * ( NOT MD%(OF,9)) THEN  PRINT "  FUMBLE RECOVERED.": PRINT : RETURN 
3530  IF FR < 76 THEN  PRINT "   WEAPON DROPPED!":AD%(MD%(OF,9),4) = ROOM:MD%(OF,9) =  - 1: PRINT : RETURN 
3535  IF FR > 95 THEN 3550
3540  PRINT "  WEAPON BROKEN!":AD%(MD%(OF,9),4) = 0:MD%(OF,9) =  - 1: IF  RND (1) > .9 THEN  PRINT : RETURN 
3545  PRINT "  BROKEN WEAPON HURTS USER!"
3550  IF FR = 100 THEN 3560
3555 D = MD%(OF,11):S = MD%(OF,12):DF = OF:A = 1: GOTO 3650
3560 D = MD%(OF,11) * 2:S = MD%(OF,12):DF = OF:A = 0: GOTO 3650
3600 INC = ( INT (100 *  RND (1) + 1) > MD%(OF,10)):MD%(OF,10) = MD%(OF,10) + 2 * INC
3605 D = MD%(OF,11):S = MD%(OF,12):A = 1: IF RL > 5 THEN  PRINT "A HIT!": GOTO 3650
3610  PRINT "A CRITICAL HIT!":R2 =  INT (100 *  RND (1) + 1): IF R2 < 51 THEN A = 0: GOTO 3650
3615  IF R2 < 86 THEN S = 1.5 * S: GOTO 3650
3620  IF R2 < 96 THEN D = 2 * D: GOTO 3650
3625  IF R2 < 100 THEN D = 3 * D: GOTO 3650
3630  GOTO 3700
3650 D2 = 0: FOR D3 = 1 TO D:D2 = D2 +  INT (S *  RND (1) + 1): NEXT :D2 = D2 - A * MD%(DF,8): IF D2 < 1 THEN  PRINT "   BLOW BOUNCES OFF ARMOUR": PRINT : RETURN 
3655 MD%(DF,13) = MD%(DF,13) + D2: IF MD%(DF,13) >  = MD%(DF,1) THEN 3700
3660 A = MD%(DF,14):FD%(A) = FD%(A) + D2
3665  ON  INT (MD%(DF,13) * 5 / MD%(DF,1) + 1) GOTO 3670,3675,3680,3685,3690
3670  PRINT : PRINT MN$(DF);" TAKES DAMAGE BUT": PRINT "   IS STILL IN GOOD SHAPE.": RETURN 
3675  PRINT : PRINT MN$(DF);" IS HURTING.": RETURN 
3680  PRINT : PRINT MN$(DF);" IS IN PAIN.": RETURN 
3685  PRINT : PRINT MN$(DF);" IS VERY BADLY INJURED.": RETURN 
3690  PRINT : PRINT MN$(DF);" IS AT DEATH'S DOOR,": PRINT "   KNOCKING LOUDLY.": RETURN 
3700  PRINT MN$(DF);" IS DEAD!": PRINT :A = MD%(DF,14):FD%(A) = FD%(A) + MD%(DF,1) - MD%(DF,13) + D2:MD%(DF,5) = 0:A2 = NA - 1 - NM + DF:AD%(A2,4) = ROOM: IF MD%(DF,9) > 0 THEN AD%(MD%(DF,9),4) = ROOM
3710  IF FD%(0) >  = TD%(0) THEN NBTL = 0
3720  IF DF = 0 THEN DIE = 1: GOTO 23010
3730  IF MN$(DF) = "PIRATE" THEN  PRINT DK$;"READ EAMON.DESC,R203": INPUT A$: PRINT DK$: PRINT : PRINT A$: PRINT :AD%(10,8) = 6:V%(ROOM) = 0: RETURN 
3740  IF MN$(DF) = "MIMIC" THEN  PRINT : PRINT "AS THE MIMIC DIES, IT ROLLS OVER AND": PRINT "YOU FIND A RING UNDERNEATH IT.":AD%(6,4) = ROOM
3750  PRINT : RETURN 
4000  REM ///LOOK COMMAND
4010  IF NBTL THEN 2020
4020  IF S$ = "LABEL" OR S$ = "BOTTLE" THEN 15000
4030 LK = 0
4040  FOR A = 1 TO NA - 1: IF AN$(A) = S$ AND (AD%(A,4) = ROOM OR AD%(A,4) =  - 1) THEN  PRINT DK$;"READ EAMON.DESC,R";A + 100: INPUT A$: PRINT DK$: PRINT : PRINT A$: PRINT :LK = 1
4050  NEXT A: IF LK THEN 300
4060  PRINT DK$;"READ EAMON.DESC,R";ROOM: INPUT A$: PRINT DK$: PRINT : PRINT A$: PRINT : IF ROOM <  > 15 THEN 300
4070  PRINT "YOU FOUND A HIDDEN TUNNEL GOING OFF TO": PRINT "THE EAST!": PRINT : GOTO 300
5000  REM ///MOVE COMMAND
5010  IF NBTL THEN 2020
5020  FOR D = 1 TO 6: IF  LEFT$ (V$,1) <  >  MID$ ("NSEWUD",D,1) THEN  NEXT 
5030  PRINT DK$;"READ EAMON.ROOMS,R";ROOM: FOR D2 = 1 TO D: INPUT R2: NEXT : PRINT DK$
5040  IF R2 THEN 5100
5050  IF ROOM = 1 AND D = 1 THEN  PRINT : PRINT "YOU SUCCESSFULLY RIDE OFF INTO THE": PRINT "SUNSET.": GOTO 23010
5060  PRINT : PRINT " YOU CAN'T GO THAT WAY!":V%(ROOM) = 0: GOTO 100
5100 R3 = ROOM:ROOM = R2:TD%(0) = 0:TD%(1) = MD%(0,1):FD%(0) = 0:FD%(1) = MD%(0,13)
5110  FOR M = 1 TO NM: IF MD%(M,5) = R3 THEN  IF MD%(M,14) OR 200 *  RND (1) < MD%(M,4) THEN MD%(M,5) = ROOM: GOTO 5150
5120  IF MD%(M,5) <  > ROOM THEN 5160
5130 FR = MD%(M,3): IF FR AND FR <  > 100 THEN FR = FR +  INT ((CH - 10) / 2)
5140 MD%(M,14) = (FR > 100 *  RND (1)): IF  NOT MD%(M,14) THEN NBTL = 1
5150 A = MD%(M,14):FD%(A) = FD%(A) + MD%(M,13):TD%(A) = TD%(A) + MD%(M,1)
5160  NEXT M:NBTL = (TD%(0) > 0)
5170  GOTO 100
6000  REM ///POWER SPELL
6010 S = 4: GOSUB 7500: IF  NOT SUC THEN 300
6020 RAISE = 0: FOR M = 1 TO NM:M2 = 13 + M: IF AD%(M2,4) = ROOM OR AD%(M2,4) =  - 1 THEN RAISE = 1: PRINT MN$(M);" COMES ALIVE!":AD%(M2,4) = 0:MD%(M,5) = ROOM:MD%(M,13) = 0: IF MD%(M,9) > 0 THEN AD%(MD%(M,9),4) = 0: IF MD%(M,9) = MD%(0,9) THEN MD%(0,9) = 0
6030  NEXT M: IF RAISE THEN NBTL = 0:R2 = ROOM: GOTO 5100
6040  FOR A = 1 TO NA: IF AD%(A,4) = ROOM THEN RAISE = 1: PRINT AN$(A);" VANISHES!":AD%(A,4) = 0
6050  NEXT A: IF RAISE THEN  PRINT : GOTO 300
6060 RR =  INT (100 *  RND (1) + 1): IF RR < 11 THEN  PRINT : PRINT "THE SECTION OF TUNNEL YOU ARE IN ": PRINT "  COLLAPSES AND YOU DIE.":DIE = 1: GOTO 23010
6070  IF RR < 31 THEN  PRINT : PRINT "YOU ARE TELEPORTED SOMEWHERE IN THE": PRINT "  DUNGEON": PRINT :R2 =  INT (26 *  RND (1) + 1):NBTL = 0: GOTO 5100
6080  IF RR < 86 THEN  PRINT : PRINT "YOU HEAR A VERY LOUD SONIC BOOM": PRINT "  THAT ECHOES THROUGH THE TUNNELS.": PRINT : GOTO 300
6090  IF RR > 95 THEN  PRINT : PRINT "ALL OF YOUR HITS ARE HEALED.": PRINT :MD%(0,13) = 0: GOTO 300
6100  GOTO 10020
7000  REM ///HEAL SPELL
7010 S = 2: GOSUB 7500: IF SUC THEN 14050
7020  GOTO 300
7500 SUC = 0: IF SA%(S) THEN RL =  INT (100 *  RND (1) + 1):SUC = (((RL <  = S2%(S)) OR (RL < 5)) AND (RL < 95))
7510  IF  NOT SUC THEN  PRINT : PRINT "NOTHING HAPPENED.": RETURN 
7520 RL =  RND (100 *  RND (1) + 1): IF RL > S2%(S) THEN S2%(S) = S2%(S) + 2:SA%(S) = SA%(S) + 2
7530 S2%(S) = S2%(S) / 2
7540  RETURN 
8000  REM ///BLAST SPELL
8010  GOSUB 1950
8020  FOR M = 1 TO NM: IF S$ <  > MN$(M) OR MD%(M,5) <  > ROOM THEN  NEXT : PRINT : PRINT "YOU CAN'T BLAST ";S$;"!": PRINT : GOTO 300
8030 S = 1: GOSUB 7500: IF  NOT SUC THEN 300
8040  PRINT : PRINT "DIRECT HIT!": PRINT :S = 5:D = 1:DF = M: GOSUB 3650: PRINT : GOTO 300
10000  REM ///SPEED SPELL
10010 S = 3: GOSUB 7500: IF  NOT SUC THEN 300
10020  IF  NOT SPD THEN MD%(0,10) = MD%(0,10) + 2 * MD%(0,2):MD%(0,2) = 2 * MD%(0,2)
10030 SPD =  INT (25 *  RND (1) + 1): PRINT : PRINT "YOU CAN FEEL THE NEW AGILITY FLOWING": PRINT "  THROUGH YOU!": PRINT : GOTO 300
11000  PRINT : IF NBTL THEN  PRINT "AS YOU SMILE, THE ENEMY ATTACKS YOU.": PRINT : GOTO 300
11010  PRINT "NOTHING HAPPENS.": PRINT : GOTO 300
12000  PRINT : IF NBTL THEN  PRINT "AS YOU WAVE AT YOUR ENEMY, HE ATTACKS": PRINT "  YOU.": PRINT : GOTO 300
12010  PRINT "NOTHING HAPPENS.": PRINT : GOTO 300
13000  REM ///SAY COMMAND
13010  GOSUB 1950
13020  IF S$ = "TROLLSFIRE" THEN 20000
13030  IF S$ = "POWER" THEN 6000
13040  IF S$ = "HEAL" THEN 7000
13050  IF S$ = "BLAST" THEN 8000
13060  IF S$ = "SPEED" THEN 10000
13070  PRINT : PRINT "OKAY, '";S$;"'": PRINT : GOTO 300
14000  REM ///DRINK COMMAND
14010  GOSUB 1950
14020  IF NBTL THEN 2020
14030  IF  RIGHT$ (S$,6) <  > "POTION" AND  RIGHT$ (S$,6) <  > "BOTTLE" THEN 14500
14040  IF AD%(3,4) <  >  - 1 AND AD%(3,4) <  > ROOM THEN 14500
14050  PRINT : IF MD%(0,13) THEN  PRINT "SOME OF YOUR WOUNDS SEEM TO CLEAR UP.": PRINT 
14060 MD%(0,13) = MD%(0,13) -  INT (10 *  RND (1) + 1): IF MD%(0,13) < 0 THEN MD%(0,13) = 0
14070 H2 = MD%(0,13) +  INT (11 *  RND (1) - 5):H2 =  INT (H2 / 10) + 1: ON H2 GOTO 14080,14090,14100,14110
14080  PRINT "YOU FEEL GREAT!": PRINT : GOTO 14120
14090  PRINT "YOU FEEL BETTER.": PRINT : GOTO 14120
14100  PRINT "THOUGH YOU FEEL BETTER, YOU ARE STILL": PRINT "  VERY, VERY SICK!": PRINT : GOTO 14120
14110  PRINT "THOUGH YOU FEEL BETTER, YOU ARE STILL": PRINT "  AT DEATH'S DOOR, KNOCKING LOUDLY.": PRINT 
14120 AD%(3,4) = 0:AD%(13,4) =  - 1
14130  GOTO 300
14500  IF S$ <  > "WATER" OR  RIGHT$ (S$,3) <  > "SEA" THEN  PRINT : PRINT "A JOB SIMILAR TO GETTING BLOOD FROM A": PRINT "  TURNIP.": PRINT : GOTO 300
14510  PRINT : PRINT "THE WATER TASTED SALTY, BUT IT DOESN'T": PRINT "SEEM TO BE POISONOUS.": PRINT : GOTO 300
15000  REM ///READ COMMAND
15010  GOSUB 1950
15020  IF NBTL THEN 2020
15030  IF S$ = "LABEL" OR S$ = "BOTTLE" THEN  IF AD%(3,4) = ROOM OR AD%(13,4) = ROOM OR AD%(3,4) =  - 1 OR AD%(13,4) =  - 1 THEN  PRINT "THE BOTTLE SAYS, 'HEALING POTION'": PRINT : GOTO 300
15040  IF S$ = "TROLLSFIRE" THEN 20000
15050  IF S$ <  > "BOOK" THEN  PRINT : PRINT "THERE ARE NO MARKINGS TO READ!": PRINT : GOTO 300
15060  IF AD%(9,4) <  >  - 1 AND AD%(9,4) <  > ROOM THEN  PRINT "WHAT BOOK?": PRINT : GOTO 300
15070  PRINT "AS YOU READ THE BOOK, YOU FEEL A WEIRD": PRINT "SENSATION OVERTAKING YOU.  YOU SUDDENLY": PRINT "REALIZE THAT YOU ARE TURNING INTO A": PRINT "SMALL FISH.": PRINT 
15080  IF ROOM = 26 THEN  PRINT "YOU FALL INTO THE SEA AND ARE PROMPTLY": PRINT "EATEN BY A BIG FISH.": PRINT 
15090  IF ROOM < 26 THEN  PRINT "YOU FLOP THREE TIMES THEN DIE.": PRINT 
15100 DIE = 1: GOTO 23010
16000  REM ///READY A WEAPON
16010  GOSUB 1950
16020  FOR A = 1 TO NA: IF AN$(A) <  > S$ OR AD%(A,4) <  >  - 1 THEN  NEXT : PRINT : PRINT "YOU AREN'T CARRYING IT!": PRINT : GOTO 100
16030  IF AD%(A,2) < 2 THEN  PRINT : PRINT "THAT ISN'T A WEAPON!": PRINT : GOTO 100
16040 MD%(0,10) = (EA + AE) * ( - EA > AE) + AD%(A,5) + WA%(AD%(A,6)) + 2 * MD%(0,2):MD%(0,9) = A:MD%(0,11) = AD%(A,7):MD%(0,12) = AD%(A,8)
16050  IF S$ <  > "TROLLSFIRE" THEN  PRINT : PRINT "READIED.": PRINT : GOTO 300
16060 TR = 0:MD%(0,12) = 10: GOTO 20000
17000  REM ///FLEE COMMAND
17010  IF  NOT NBTL THEN  PRINT : PRINT "WHAT ARE YOU FLEEING FROM?": PRINT : GOTO 100
17020  IF MD%(7,5) = ROOM THEN  PRINT : PRINT "YOU ARE HELD FAST BY THE MIMIC AND": PRINT "  CANNOT ";V$: PRINT : GOTO 300
17030 M = 0: GOSUB 17500
17040 NBTL = 0: GOTO 5100
17500  PRINT DK$;"READ EAMON.ROOMS,R";ROOM: FOR D = 1 TO 6: INPUT DR%(D): NEXT : PRINT DK$
17510 R2 = DR%(6 *  RND (1) + 1): IF R2 < 1 THEN 17510
17520  RETURN 
18000  PRINT : PRINT "YOU ARE CARRYING THE FOLLOWING--": FOR A = 1 TO NA: IF AD%(A,4) =  - 1 THEN  PRINT "  ";AN$(A)
18010  NEXT : GOTO 300
19000  IF NBTL THEN 2020
19010  GOSUB 1950
19020  IF S$ <  > "WATER" AND S$ <  > "SEA" THEN 19040
19030  PRINT : PRINT "SORRY, BUT I'M AFRAID TO GO INTO THE": PRINT "   WATER WITHOUT MY LIFE PRESERVER!": PRINT : GOTO 300
19040  IF S$ = "CAVE" AND ROOM = 1 THEN V$ = "S": GOTO 5000
19050  PRINT : PRINT "I'M NOT SURE WHAT YOU MEAN BY THAT.": PRINT "TRY GIVING A DIRECTION TO MOVE.": PRINT : GOTO 100
20000  REM ///TROLLSFIRE ACTIVATION.
20010  IF AD%(10,4) <  >  - 1 THEN  PRINT : PRINT "NOTHING HAPPENS.": PRINT : GOTO 300
20020  IF  NOT TR THEN 20500
20030  PRINT DK$;"READ EAMON.DESC,R206": INPUT A$: PRINT DK$: PRINT : PRINT A$: PRINT :TR = 0:AD%(10,8) = 6: IF MD%(0,9) = 10 THEN MD%(0,12) = 6
20040  GOTO 300
20500  PRINT DK$;"READ EAMON.DESC,R204": INPUT A$: PRINT DK$: PRINT : PRINT A$: PRINT : IF MD%(0,9) <  > 10 THEN  PRINT DK$;"READ EAMON.DESC,R205": INPUT A$: PRINT DK$: PRINT A$: PRINT :S = 5:D = 1:DF = 0:A = 0: GOSUB 3650: GOTO 300
20510 TR = 1:MD%(0,12) = 10:AD%(10,8) = 10: GOTO 300
21000  REM ///OPEN COMMAND
21010  IF NBTL THEN 2020
21020  IF S$ <  > "CHEST" OR ROOM <  > AD%(12,4) THEN 21050
21030  PRINT DK$;"READ EAMON.DESC,R201": INPUT A$: PRINT DK$: PRINT : PRINT A$: PRINT :AD%(12,4) = 0:MD%(7,5) = ROOM
21040 R2 = ROOM: GOTO 5100
21050  IF S$ = "DOOR" THEN  PRINT : PRINT "THE DOOR WILL OPEN WHEN YOU MOVE THROUGH": PRINT "IT.": PRINT : GOTO 100
21060  PRINT : PRINT "MIND TELLING ME HOW?": PRINT : GOTO 100
22000  REM ///INIT THINGS
22002  PRINT DK$;"OPEN EAMON.DESC,L256": PRINT DK$;"READ EAMON.DESC,R0": INPUT NR,NA,NE,NM: DIM AN$(NA + 1),AD%(NA + 1,8),MN$(NM),MD%(NM,15): PRINT DK$"CLOSE"
22004  ONERR  GOTO 22010
22006  PRINT DK$"RESTORE FAST.START": POKE 216,0: GOTO 22030
22010  POKE 216,0: PRINT DK$;"OPEN EAMON.ARTIFACTS,L128": FOR A = 1 TO NA: PRINT DK$;"READ EAMON.ARTIFACTS,R";A
22015  INPUT AN$(A): FOR A2 = 1 TO 4: INPUT AD%(A,A2): NEXT A2: IF AD%(A,2) > 1 THEN  FOR A2 = 5 TO 8: INPUT AD%(A,A2): NEXT A2
22020  NEXT A: PRINT DK$;"OPEN EAMON.MONSTERS,L128": FOR A = 1 TO NM: PRINT DK$;"READ EAMON.MONSTERS,R";A
22025  INPUT MN$(A): FOR A2 = 1 TO 12: INPUT MD%(A,A2): NEXT A2,A: PRINT DK$;"CLOSE"
22030  PRINT DK$;"OPEN FRESH.MEAT": PRINT DK$;"READ FRESH.MEAT": INPUT REC: INPUT MN$(0),MD%(0,1),MD%(0,2),CH: FOR A = 1 TO 4: INPUT SA%(A): NEXT 
22040  FOR A = 1 TO 5: INPUT WA%(A): NEXT : INPUT AE,SEX$,GOLD,BANK,AC
22050  FOR A = 1 TO 4: INPUT WN$(A),WT%(A),WO%(A),WD%(A),WS%(A): NEXT : PRINT DK$;"CLOSE"
22060  PRINT DK$;"OPEN EAMON.DESC,L256": PRINT DK$;"OPEN EAMON.ROOM.NAME,L64": PRINT DK$;"OPEN EAMON.ROOMS,L64"
22070  HOME : PRINT "YOU HAVE NO TROUBLE FINDING A HORSE": PRINT "THAT YOU, WELL, BORROW TO TAKE YOU": PRINT "ON YOUR FIRST ADVENTURE.  YOU FOLLOW": PRINT "SEVERAL SIGNS TO TAKE YOU TO THE": PRINT "BEGINNERS CAVE.": PRINT : PRINT DK$;"READ EAMON.DESC,R1": INPUT A$: PRINT DK$: PRINT A$
22080  PRINT : PRINT "AS YOU STAND THERE, YOU SEE THE LOCAL": PRINT "KNIGHT MARSHAL COME OUT TO INSPECT YOU.": PRINT : PRINT 
22090  IF WN$(1) = "NONE" THEN  PRINT "HE SHAKES HIS HEAD AND SAYS, 'YOU MUST": PRINT "HAVE AT LEAST ONE WEAPON TO ADVENTURE": PRINT "HERE! GO BACK TO THE MAIN HALL.'": GOTO 23010
22100  IF AE OR WA%(1) <  > 5 OR WA%(3) <  > 20 OR WA%(5) <  > 0 THEN  PRINT "HE SHAKES HIS HEAD AND SAYS, 'YOU ARE": PRINT "NOT A BEGINNER! YOU CANNOT ADVENTURE": PRINT "HERE! GO BACK TO THE MAIN HALL.'": GOTO 23010
22110  IF WN$(2) = "NONE" THEN W2 = 1: GOTO 22160
22120  PRINT "HE TELLS YOU, 'YOU MAY ONLY TAKE ONE": PRINT "WEAPON INTO THE CAVE. WHICH SHALL IT BE?": FOR W = 1 TO 4: IF WN$(W) <  > "NONE" THEN  PRINT "   ";WN$(W): NEXT W
22130  PRINT : PRINT "(HIT 1-";W - 1;")   ";
22140  GET A$:W2 =  VAL (A$): IF W2 < 1 OR W2 > W - 1 THEN 22140
22150  PRINT A$: PRINT 
22160 NA = NA + 1:AN$(NA) = WN$(W2):AD%(NA,2) = 2:AD%(NA,3) = 2:AD%(NA,4) =  - 1:AD%(NA,5) = WO%(W2):AD%(NA,6) = WT%(W2):AD%(NA,7) = WD%(W2):AD%(NA,8) = WS%(W2)
22170 EA = 0:MD%(0,8) = 0:A2 =  INT (AC / 2): IF A2 * 2 <  > AC THEN MD%(0,8) = 1:EA =  - 5
22180  IF A2 THEN MD%(0,8) = MD%(0,8) + A2:EA = EA - A2 * 10: IF A2 = 3 THEN MD%(0,8) = MD%(0,8) + 2:EA = EA - 30
22190 MD%(0,10) = (EA + AE) * ( - EA > AE) + WO%(W2) + WA%(WT%(W2)) + 2 * MD%(0,2):MD%(0,7) = 0:MD%(0,9) = NA:MD%(0,11) = WD%(W2):MD%(0,12) = WS%(W2)
22200 MD%(0,14) = 1
22210  READ NC: DIM C$(NC): FOR C = 1 TO NC: READ C$(C): NEXT 
22220  FOR S = 1 TO 4:S2%(S) = SA%(S): NEXT 
22230  DIM V%(26):ROOM = 1
22235  FOR A = 1 TO NA - 1: IF AN$(NA) = AN$(A) THEN AN$(A) = AN$(A) + "#": GOTO 22235
22236  NEXT 
22240  PRINT : PRINT "EVENTUALLY THE KNIGHT MARSHAL SAYS,'YOU": PRINT "MAY NOW PROCEED' AND HE WALKS AWAY.": PRINT : PRINT "(HIT ANY KEY TO CONTINUE)  ";: GET A$: PRINT : PRINT : GOTO 100
22250  DATA  36
22260  DATA GET,PICK,DROP,ATTACK,LOOK,EXAMINE,UP,U,DOWN,D,NORTH,N,EAST,E,WEST,W,SOUTH,S,POWER,HEAL,BLAST,SPEED,SMILE,WAVE,SAY,DRINK,READ,READY,ESCAPE,RETREAT,FLEE,INVENTORY,I,ENTER,TROLLSFIRE,OPEN
22270  END 
23000  REM ///END GAME
23010  PRINT : PRINT "(HIT ANY KEY TO RETURN TO THE MAIN HALL)";: GET A$: PRINT 
23020  PRINT DK$;"CLOSE"
23030 AD%(10,8) = 10
23040  IF SPD THEN MD%(0,2) = MD%(0,2) / 2
23050  IF DIE THEN 23240
23060  FOR W = 2 TO 4: IF WN$(W) <  > "NONE" THEN  NEXT 
23070 W2 = W: FOR W3 = 1 TO NA - 1: IF AD%(W3,2) > 1 AND AD%(W3,4) =  - 1 THEN WN$(W2) = AN$(W3):WP%(W2) = W3:W2 = W2 + 1:AD%(W3,4) = 0
23080  NEXT W3: IF W2 < 6 THEN 23160
23090  HOME : VTAB 5: PRINT "AS YOU TRY TO LEAVE, THE KNIGHT": PRINT "MARSHALL REAPPEARS AND TELLS YOU, 'YOU": PRINT "HAVE TOO MANY WEAPONS--4 IS THE LEGAL": PRINT "LIMIT.'": PRINT : PRINT "YOUR WEAPONS ARE--"
23100  FOR W4 = 1 TO W2 - 1: PRINT  SPC( 4);W4;"--";WN$(W4): NEXT : PRINT : PRINT "HIT THE NUMBER KEY FOR ONE TO THROW": PRINT "   AWAY (1-";W2 - 1;")  ";
23110  GET A$:W5 =  VAL (A$): IF W5 < 1 OR W5 > W2 - 1 THEN 23110
23120  IF WP%(W5) THEN AD%(WP%(W5),4) =  - 1
23130 WN$(W5) = WN$(W2 - 1):WP%(W5) = WP%(W2 - 1):W2 = W2 - 1: IF W2 > 5 THEN 23090
23140  FOR W5 = 1 TO 1: NEXT W5: FOR W4 = 2 TO W2 - 1: FOR W5 = 1 TO W4 - 1: IF WN$(W4) = WN$(W5) THEN WN$(W4) = WN$(W4) + "#": GOTO 23140
23150  NEXT W5,W4
23160  FOR W = 1 TO 4: IF WP%(W) THEN WT%(W) = AD%(WP%(W),6):WO%(W) = AD%(WP%(W),5):WD%(W) = AD%(WP%(W),7):WS%(W) = AD%(WP%(W),8)
23170  NEXT W: HOME : VTAB 5: PRINT "AS YOU DELIVER YOUR TREASURES TO SAM": PRINT "SLICKER, THE LOCAL BUYER FOR SUCH": PRINT "THINGS, HE EXAMINES YOUR GOODS AND": PRINT "PAYS YOU ";
23180 TP = 0: FOR A = 1 TO NA - 1: IF AD%(A,4) <  >  - 1 THEN 23210
23190  IF AD%(A,2) <  > 0 THEN AD%(A,1) = AD%(A,1) * CH / 10
23200 TP = TP + AD%(A,1)
23210  NEXT A: PRINT TP;" GOLD PIECES.": PRINT : IF MD%(9,5) = 1 THEN  PRINT "ADDITIONALLY, YOU RECEIVE ";10 * CH;" GOLD": PRINT "PIECES AS A REWARD FOR THE SAFE RETURN": PRINT "OF CYNTHIA.":TP = TP + 10 * CH
23220 GOLD = GOLD + TP
23230  PRINT : PRINT : PRINT "(HIT ANY KEY TO CONTINUE)  ";: GET A$: PRINT 
23240  PRINT 
23242  HOME : VTAB 5: PRINT "(INSERT EAMON MASTER DISKETTE, THEN": PRINT "   HIT 'C' TO CONTINUE)   ";: POKE  - 16368,0: GET A$: PRINT A$: IF A$ <  > "C" THEN 23242
23244  ONERR  GOTO 23248
23246  PRINT DK$"OPEN EAMON.PREFIX": PRINT DK$"READ EAMON.PREFIX": INPUT PX$: PRINT DK$"CLOSE": GOTO 23252
23248  PRINT DK$"CLOSE": PRINT DK$"PREFIX": INPUT CX$
23250  PRINT : PRINT : PRINT CX$: PRINT "     IS THE CURRENT PREFIX": PRINT "INSERT THE MASTER DISK": INPUT "   AND TYPE ITS PREFIX: ";PX$
23252  PRINT DK$"PREFIX"PX$
23254  PRINT DK$"VERIFY MAIN.HALL": POKE 216,0
23258  IF DIE THEN  PRINT DK$;"DELETE THE.ADVENTURER": GOTO 23300
23260  PRINT DK$;"OPEN CHARACTERS,L150": PRINT DK$;"WRITE CHARACTERS,R";REC: PRINT MN$(0): PRINT MD%(0,1): PRINT MD%(0,2): PRINT CH: FOR A = 1 TO 4: PRINT SA%(A): NEXT 
23270  FOR A = 1 TO 5: PRINT WA%(A): NEXT : PRINT AE: PRINT SEX$: PRINT GOLD: PRINT BANK: PRINT AC
23280  FOR A = 1 TO 4: PRINT WN$(A): PRINT WT%(A): PRINT WO%(A): PRINT WD%(A): PRINT WS%(A): NEXT 
23290  PRINT DK$;"OPEN THE.ADVENTURER": PRINT DK$;"WRITE THE.ADVENTURER": PRINT MN$(0): PRINT REC: PRINT DK$;"CLOSE"
23300  PRINT DK$;"RUN MAIN.HALL"