10 DEFINT A-Z
20 DEF FNX$(X$)=MID$(X$,INSTR(X$,".")+1)
30 ZM$=SPACE$(254)+"."
40 MEFF=100
50 FOR I=1 TO 10:K$(I)="^F"+RIGHT$(STR$(I),1)
60 KEY I,K$(I)+CHR$(13)
70 NEXT I
80 CLS
90 GOSUB 8000
100 CLS
110 LOCATE 5,1
120 PRINT"    F1. LIST ROOMS,ARTIFACTS,MONSTERS"
130 PRINT
140 PRINT"   F10. QUIT"
150 PRINT:PRINT:PRINT
160 INPUT"    CHOOSE ONE ";A$
170 IF A$=K$(10) THEN CLS:RUN"MENU"
180 '
190 IF A$<>K$(1) THEN 100
200 '
205 N$=DR$+"EAMON.DES"
206 OPEN "R",#1,N$,255
207 FIELD 1,255 AS B$
210 '
220 FOR R=0 TO NR
280 '
300 LPRINT CHR$(12)
310 LPRINT "ROOM #";R
420 LPRINT "ROOM NAME :";RN$(R)
430 LPRINT "================================"
440 LPRINT:LPRINT "DESCRIPTION":LPRINT
445 IF R=0 THEN 540
450 GET#1,R:IF B$=ZM$ THEN A$="" ELSE A$=FNX$(B$)
460 LPRINT A$
470 LPRINT "================================"
480 LPRINT:LPRINT"ROOM MOVES":LPRINT
490 LPRINT "NORTH SOUTH  EAST  WEST    UP  DOWN"
500 FOR I=1 TO 6:LPRINT USING " #### ";MAP(R,I);
510 NEXT I
515 LPRINT:LPRINT:LPRINT
520 '
530 '
540 WT$(1)="AXE":WT$(2)="SPEAR":WT$(3)="MACE":WT$(4)="BOW":WT$(5)="SWORD"
550 TY$(0)=" TREASURE OF SET VALUE":TY$(1)=" TREASURE OF VARIABLE VALUE":TY$(2)=" STANDARD WEAPON":TY$(3)=" SPECIAL WEAPON"
560 '
570 FOR ART=1 TO NA
580 IF AD(ART,4)<>R THEN 720
590 LPRINT "1. NAME       ";AN$(ART)
600 LPRINT "2. DESCRIPTION ":LPRINT:LPRINT AD$(ART)
610 LPRINT USING "3. VALUE   ###,###";AD(ART,1);:LPRINT " GP"
620 LPRINT USING "4. TYPE          #";AD(ART,2);:LPRINT TY$(AD(ART,2))
630 LPRINT USING "5. WEIGHT     #### GRONDS";AD(ART,3)
640 LPRINT USING "6. ROOM        ###";AD(ART,4);:LPRINT " ";RN$(AD(ART,4))
650 LPRINT
660 IF AD(ART,2)<2 THEN 710
670 LPRINT USING "7. COMPLEXITY ####";AD(ART,5);:LPRINT " %"
680 LPRINT USING "8. TYPE          #";AD(ART,6);:LPRINT " ";WT$(AD(ART,6))
690 LPRINT USING "9. SIDES        ##";AD(ART,7)
700 LPRINT USING "10.DICE         ##";AD(ART,8)
710 LPRINT
720 NEXT ART
725 LPRINT:LPRINT:LPRINT
730 ' /// LPRINT OUT ROOMS MONSTERS
810 ON ERROR GOTO 0
820 D$="HARDINESS   AGILITY     FRIEND %    COURAGE     ROOM #      WEIGHT      DEF ODDS    ARMOUR      WEAPON #    ODDS TO HIT WEAP. DICE  WEAP. SIDE  "
830 '
840 FOR I=1 TO NM
850    IF MD(I,5)<>R THEN 995
860 CLS:LPRINT"MONSTER #";I
870 LPRINT
880 LPRINT"Monster's name :";MN$(I)
890 LPRINT "-------------------------------"
895 LPRINT "Description:"
896 LPRINT
900 LPRINT MD$(I)
905 PRINT
910 LPRINT "-------------------------------"
915 LPRINT "Dead body description:"
916 LPRINT
920 LPRINT DMD$(I)
925 LPRINT "-------------------------------"
930 LPRINT
940 FOR J=1 TO 12
950 LPRINT "CURRENT   ";MID$(D$,(J-1)*12+1,12);"= ";MD(I,J);
960 IF J=9 THEN LPRINT AN$(MD(I,9))
970 IF J=5 THEN LPRINT RN$(MD(I,5))
980 IF J<>9 AND J<>5 THEN LPRINT
990 NEXT J
991 LPRINT:LPRINT
995 NEXT I
1000 NEXT R
1010 GOTO 100
8000 REM /// READ IN DATA FILES
8010 '
8020 CLS
8030 PRINT:PRINT:PRINT"INSERT DISK WITH DUNGEON FILES TO BE PRINTED INTO DRIVE ";DR$
8040 PRINT:PRINT:INPUT"THEN HIT RETURN.";A$
8050 '
8060 ' ON ERROR GOTO 8760
8070 OPEN "I",#1,"EAMON.NAM"
8080 INPUT #1,A$
8090 INPUT #1,ADNAME$
8100 CLOSE#1
8110 N$=DR$+"EAMON.ART"
8120 OPEN "I",#1,N$
8130 N$=DR$+"EAMON.MON"
8140 OPEN "I",#2,N$
8150 N$=DR$+"EAMON.ROM"
8160 OPEN "I",#3,N$
8170 '
8180 INPUT#1,NZ
8190 INPUT#2,NM
8220 INPUT#3,NR
8250 '
8260 NA=NZ-NM
8270 DIM AN$(NZ),AD(NZ,8),MN$(NM),MD(NM,12),MAP(NR,6)
8280 DIM RN$(NR),MD$(NM),DMD$(NM),AD$(NZ),EFF$(MEFF)
8290 '
8300 FOR I=1 TO NA
8310    INPUT#1,AN$(I)
8320    FOR J=1 TO 4
8330       INPUT#1,AD(I,J)
8340    NEXT J
8350    IF AD(I,2)<2 THEN 8390
8360    FOR J=5 TO 8
8370       INPUT#1,AD(I,J)
8380    NEXT J
8390 NEXT I
8400 '
8410 FOR I=1 TO NM
8420    INPUT#2,MN$(I)
8430    FOR J=1 TO 12
8440       INPUT#2,MD(I,J)
8450    NEXT J
8460 NEXT I
8470 '
8480 CLOSE#1:CLOSE#2
8490 N$=DR$+"ROOM.NAM"
8500 OPEN "R",#1,N$,32
8510 FIELD 1,32 AS NR1$
8520 '
8530 FOR I=1 TO NR
8540    GET#1,I
8550    IF LEFT$(NR1$,3)="   " THEN A$="" ELSE A$=NR1$
8560    RN$(I)=A$
8570    FOR J=1 TO 6
8580       INPUT#3,MAP(I,J)
8590    NEXT J
8600 NEXT I
8610 '
8620 CLOSE#1:CLOSE#3
8630 '
8640 N$=DR$+"EAMON.EFF"
8650 '
8660 OPEN "R",#1,N$,255
8670 FIELD 1,255 AS Z$
8680 IF NA=0 AND NM=0 THEN 8900
8690 FOR I=1 TO NA
8700    GET#1,I
8710    IF Z$=ZM$ THEN AD$(I)="" ELSE AD$(I)=FNX$(Z$)
8720 NEXT I
8730 '
8740 FOR I=1 TO NM
8750    GET#1,NA+I
8760    IF Z$=ZM$ THEN DMD$(I)="" ELSE  DMD$(I)=FNX$(Z$)
8770 NEXT I
8780 '
8790 FOR I=1 TO NM
8800    GET#1,NA+NM+I
8810    IF Z$=ZM$ THEN MD$(I)="" ELSE MD$(I)=FNX$(Z$)
8820 NEXT I
8830 '
8840    NE=NE+1
8850    GET#1,NA+NM+NE
8860 IF LEFT$(Z$,1)=CHR$(30) THEN 8900
8870    IF Z$=ZM$ THEN EFF$="" ELSE EFF$(NE)=FNX$(Z$)
8880 GOTO 8840
8890 '
8900 CLOSE#1
8910 '
8920 RETURN
8930 CLS
8940 PRINT"ERROR TRYING TO OPEN FILE ";N$
8950 PRINT"MAKE SURE THIS IS A PROPERLY FORMATTED DUNGEON DISK"
8960 STOP
8970 NE=I-1
8980 RESUME 8900
 TO OPEN FILE ";N$
8950 PRINT"MAKE SURE THIS IS A PROPERLY FORMATTED DUNGEON DISK"
8960