1   REM    EAMON ADVENTURE #1
2   REM -> THE BEGINNERS CAVE <-
3   REM
4   REM     BY DONALD BROWN
5   REM
40   CLS : WIDTH 40: LOCATE 10: PRINT "PLEASE WAIT A SHORT WHILE": PRINT : PRINT "    (WAKING UP THE MONSTERS)"
45  REM
46  REM DIMs needed to be before references or error occurred
47  REM
50  OPEN "EAMON.ART" FOR INPUT AS #1: INPUT #1, NA: DIM AN$(NA + 1), AD%(NA + 1, 8): FOR A = 1 TO NA: INPUT #1, AN$(A): FOR A2 = 1 TO 4: INPUT #1, AD%(A, A2): NEXT A2: IF AD%(A, 2) > 1 THEN FOR A2 = 5 TO 8: INPUT #1, AD%(A, A2): NEXT A2
60  NEXT A: CLOSE #1: OPEN "EAMON.MON" FOR INPUT AS #1: INPUT #1, NM: DIM MN$(NM), MD%(NM, 15): FOR A = 1 TO NM: INPUT #1, MN$(A): FOR A2 = 1 TO 12: INPUT #1, MD%(A, A2): NEXT A2, A: CLOSE #1
62  REM Read in the commands
65  READ NC: DIM C$(NC): FOR C = 1 TO NC: READ C$(C): NEXT
70  DIM V%(26)
99  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 GET #2, ROOM + 1: INPUT #2, A$: PRINT "YOU ARE STANDING IN": PRINT "  "; A$: PRINT
125   IF NOT V%(ROOM) THEN GET #1, ROOM + 1: INPUT #1, A$: 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 GET #1, M + 300 + 1: INPUT #1, A$: PRINT A$: MD%(M, 15) = -1: IF M = 10 THEN GET #1, 202 + 1: INPUT #1, A$: 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 GET #1, A + 100 + 1: INPUT #1, A$: 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$: LOCATE CSRLIN - 1, 17: PRINT A$
175  CZ$ = A$: FOR A = 2 TO LEN(A$): IF MID$(A$, A, 1) = " " THEN EXIT FOR
177  NEXT A
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: FLAG = 0: IF C$(C) = V$ OR C$(C) = S$ THEN FLAG = 1: EXIT FOR
192   NEXT C: IF FLAG = 0 THEN 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%(ABS(NOT MD%(M, 14))) / TD%(ABS(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: FLAG = 0: IF NOT (MD%(M2, 5) = ROOM AND MD%(M2, 14) AND RND(1) < .25) THEN GOTO 380
375  FLAG = 1: DF = M2: GOSUB 3500: EXIT FOR
380   NEXT M2
385  IF FLAG = 0 THEN DF = 0: GOSUB 3500
387  GOTO 430
390  OF = M
400   FOR M2 = 1 TO NM: FLAG = 0: IF NOT (MD%(M2, 5) = ROOM AND NOT MD%(M2, 14)) THEN GOTO 410
405  FLAG = 1: DF = M2: GOSUB 3500: EXIT FOR
410   NEXT M2: IF FLAG THEN GOTO 430 ELSE GOTO 400
420   REM
430  NBTL = (FD%(0) < TD%(0)): IF NOT NBTL THEN EXIT FOR
435  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: FLAG = 0: IF AN$(A) <> S$ OR AD%(A, 4) = ROOM THEN FLAG = 1: EXIT FOR
1082   NEXT A
1085   IF FLAG = 0 THEN 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: FLAG = 0: IF AN$(A) = S$ AND AD%(A, 4) = -1 THEN FLAG = 1: EXIT FOR
2045   NEXT A: IF FLAG = 0 THEN 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: FLAG = 0: IF S$ = MN$(M) AND MD%(M, 5) = ROOM THEN FLAG = 1: EXIT FOR
3055   NEXT M: IF FLAG = 0 THEN 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%(ABS(A)) = FD%(ABS(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 GET #1, 203 + 1: INPUT #1, A$: 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 GET #1, A + 100 + 1: INPUT #1, A$: PRINT : PRINT A$: PRINT : LK = -1
4050   NEXT A: IF LK THEN 300
4060   GET #1, ROOM + 1: INPUT #1, A$: 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 EXIT FOR
5025   NEXT D
5030   GET #3, ROOM + 1: FOR D2 = 1 TO D: INPUT #3, R2: NEXT
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: FLAG = 0: IF S$ = MN$(M) AND MD%(M, 5) = ROOM THEN FLAG = 1: EXIT FOR
8025   NEXT: IF FLAG = 0 THEN 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: FLAG = 0: IF AN$(A) = S$ AND AD%(A, 4) <> -1 THEN FLAG = 1: EXIT FOR
16025   NEXT: IF FLAG = 0 THEN 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   GET #3, ROOM + 1: FOR D = 1 TO 6: INPUT #3, DR%(D): NEXT
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   GET #1, 206 + 1: INPUT #1, A$: PRINT : PRINT A$: PRINT : TR = 0: AD%(10, 8) = 6: IF MD%(0, 9) = 10 THEN MD%(0, 12) = 6
20040   GOTO 300
20500   GET #1, 204 + 1: INPUT #1, 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   GET #1, 201 + 1: INPUT #1, A$: 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
22010   REM Moved to start of file to make DIM's before reference
22020   REM
22030   OPEN "MEAT" FOR INPUT AS #1: INPUT #1, MN$(0), MD%(0, 1), MD%(0, 2), CH: FOR A = 1 TO 4: INPUT #1, SA%(A): NEXT
22040   FOR A = 1 TO 5: INPUT #1, WA%(A): NEXT: INPUT #1, AE, SEX$, GOLD, BANK, AC
22050   FOR A = 1 TO 4: INPUT #1, WN$(A), WT%(A), WO%(A), WD%(A), WS%(A): NEXT: CLOSE #1
22060   OPEN "EAMON.DES" FOR RANDOM AS #1 LEN = 256: OPEN "EAMON.RMN" FOR RANDOM AS #2 LEN = 32: OPEN "EAMON.ROM" FOR RANDOM AS #3 LEN = 64
22070   CLS : 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 : GET #1, 1 + 1: INPUT #1,  _
A$: 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):
22125   NEXT W
22130   PRINT : PRINT "(HIT 1-"; W - 1; ")   ";
22140   A$ = INPUT$(1): 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  REM Moved to start of file
22220   FOR S = 1 TO 4: S2%(S) = SA%(S): NEXT
22230   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)  "; : A$ = INPUT$(1): 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)"; : A$ = INPUT$(1): PRINT
23020   CLOSE #1: CLOSE #2: CLOSE #3
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 EXIT FOR
23065   NEXT W
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: LOCATE 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   A$ = INPUT$(1): 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: CLS : LOCATE 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)  "; : A$ = INPUT$(1): PRINT
23240   KILL "MEAT": PRINT : CLS
23250   IF DIE THEN GOTO 23300
23260   OPEN "MEAT" FOR OUTPUT AS #1: PRINT #1, MN$(0): PRINT #1, MD%(0, 1): PRINT #1, MD%(0, 2): PRINT #1, CH: FOR A = 1 TO 4: PRINT #1, SA%(A): NEXT
23270   FOR A = 1 TO 5: PRINT #1, WA%(A): NEXT: PRINT #1, AE: PRINT #1, SEX$: PRINT #1, GOLD: PRINT #1, BANK: PRINT #1, AC
23280   FOR A = 1 TO 4: PRINT #1, WN$(A): PRINT #1, WT%(A): PRINT #1, WO%(A): PRINT #1, WD%(A): PRINT #1, WS%(A): NEXT A
23300   END

