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
95 N$=DR$+"EAMON.DES"
96 OPEN "R",#1,N$,255
97 FIELD 1,255 AS B$
200 '
220 FOR I=0 TO NR
230 CLS
280 '
290 ' NR = # OF ROOMS
300 ' RM = # OF ROOMS CURRENTLY EDITTED
310 '
320 ' RN$(*) = ROOM NAME
330 ' MAP(*,*) = ROOM MOVES (N,S,E,W,U,D)
340 '
380 '
390 '
400 PRINT CHR$(12)
410 '
420 PRINT "ROOM NAME :";RN$(I)
430 PRINT "================================"
440 PRINT:PRINT "DESCRIPTION":PRINT
445 IF I=0 THEN PRINT"EVERYTHING IN THIS ROOM IS NOT SEEN.":GOTO 466
446 A$=""
450 GET#1,I:IF B$<>ZM$ THEN A$=FNX$(B$)
460 PRINT A$
466 IF I=0 THEN 522
470 PRINT "================================"
480 PRINT"ROOM MOVES"
485 PRINT
495 FOR F=1 TO 6
496 PRINT MID$("NORTH SOUTH EAST  WEST  UP   DOWN  ",(F-1)*6+1,5);"  ";
500 PRINT USING " #### ";MAP(I,F);
505 IF MAP(I,F)=-999 THEN PRINT "   EXIT" ELSE PRINT"   ";RN$(MAP(I,F))
510 NEXT F
522 LOCATE 23,1:INPUT "HIT RETURN TO CONTINUE ";A$:CLS
523 '
525 ' /// PRINT OUT ROOMS ARTIFACTS
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)<>I THEN 720
585 PRINT"ARTIFACT #";ART;" AT ROOM #";AD(ART,4)
586 PRINT
590 PRINT "1. NAME       ";AN$(ART)
600 PRINT "2. DESCRIPTION ":PRINT:PRINT AD$(ART)
610 PRINT USING "3. VALUE   ###,###";AD(ART,1);:PRINT " GP"
620 PRINT USING "4. TYPE          #";AD(ART,2);:PRINT " (";TY$(AD(ART,2));")"
630 PRINT USING "5. WEIGHT     #### GRONDS";AD(ART,3)
640 PRINT USING "6. ROOM        ###";AD(ART,4);:PRINT " (";RN$(AD(ART,4));")"
650 PRINT
660 IF AD(ART,2)<2 THEN 710
670 PRINT USING "7. COMPLEXITY ####";AD(ART,5);:PRINT " %"
680 PRINT USING "8. TYPE          #";AD(ART,6);:PRINT " (";WT$(AD(ART,6));")"
690 PRINT USING "9. SIDES        ##";AD(ART,7)
700 PRINT USING "10.DICE         ##";AD(ART,8)
710 PRINT
715 INPUT"HIT RETURN TO CONTINUE ";A$:CLS
720 NEXT ART
725 '
730 ' /// PRINT OUT ROOMS MONSTERS
740 ' MON = # OF MONSTERS CURRENTLY EDITTED
750 '
760 ' MN$(*) = MONSTERS NAME
770 ' MD$(*) = MONSTER DESCRIPTION
780 ' MD(*,*) = MONSTER DATA
790 ' DMD$(*) = DEAD MONSTER DESCRIPTION
800 '
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 R=1 TO NM
850    IF MD(R,5)<>I THEN 1000
860 CLS:PRINT"MONSTER #";R;" IN ROOM #";I
870 PRINT
880 PRINT"Monster's name :";MN$(R)
885 PRINT
890 PRINT "Description"
895 PRINT"--------------------------------"
900 PRINT MD$(R)
905 PRINT
910 PRINT"Dead body description"
915 PRINT"--------------------------------"
920 PRINT DMD$(R)
930 PRINT
940 FOR F=1 TO 11 STEP 2
950 PRINT MID$(D$,(F-1)*12+1,12);"= ";MD(R,F);
960 IF F=9 THEN PRINT "(";AN$(MD(R,9));")";
970 IF F=5 THEN PRINT "(";RN$(MD(R,5));")";
980 PRINT TAB(50);MID$(D$,(F)*12+1,12);"= ";MD(R,F)
990 NEXT F
995 INPUT"HIT RETURN TO CONTINUE ";A$
1000 NEXT R
1010 NEXT I
1015 CLS:RUN"MENU"
1020 '
1030 '
7500 ' ///  LOAD IN DATA
8000 REM /// READ IN DATA FILES
8010 '
8020 CLS
8030 PRINT:PRINT:PRINT"INSERT DISK WITH DUNGEON FILES TO BE LISTED 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
8200 NN(2)=NM
8210 NN(1)=NZ-NM
8220 INPUT#3,NR
8230 NN(3)=NR
8240 NN(4)=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$
8561    FOR J=LEN(A$) TO 1 STEP -1
8562       IF MID$(A$,J,1)<>" " THEN A$=MID$(A$,1,J):GOTO 8565
8563    NEXT J
8565    RN$(I)=A$
8566 '
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"
896