Monster Combat — BASIC code

from Big Computer Games, David H. Ahl, 1984

works with QBASIC

10 RANDOMIZE
20 REM "GIANT MONSTER ATTACK"
30 REM BY LEE J. CHAPEL 5/1/1980
40 REM MICROSOFT VERSION BY CHRIS VOGELI, QBASIC FIXES BY R. ALAN MONROE
50 PRINT "*** GIANT MONSTER ATTACK"
60 DIM AARR(10,10),BARR(10,10),MARR(11),MARR$(11),NARR(11),T$(11),PARR(11),G$(3)
70 DIM CARR(15),DARR(15)
80 FOR I=1 TO 11 : READ MARR$(I),T$(I),MARR(I),PARR(I) : NEXT I
90 V=INT(RND(1)*3)
100 C=INT(RND(1)*1501+500) : S=INT(RND(1)*6) : R=INT(RND(1)*4)
110 G$(1)="SLEEP SPELL" : G$(2)="CHARM" : G$(3)="INVISIBILITY SPELL"
120 PRINT:PRINT "DO YOU WISH TO USE THE STRENGTH AND MAGIC FROM A"
130 INPUT "PREVIOUS GAME (Y OR N)";X$ : IF X$="Y" THEN 3210
140 D=C : V1=V : S1=S : R1=R : PRINT"PLEASE WAIT"
150 FOR I=1 TO 10 : FOR J=1 TO 10
160 T=INT(RND(1)*10) : IF T<>1 OR CS=15 THEN T=0
170 H=INT(RND(1)*2) : W=INT(RND(1)*10) : P=INT(RND(1)*51)
180 AARR(I,J)=10000*T+100*P+10*W+H
190 IF T=1 THEN CS=CS+1 : CARR(CS)=I : DARR(CS)=J
200 NEXT J : NEXT I : T=0
210 X1=INT(RND(1)*8)+2 : Y1=INT(RND(1)*8)+2
220  X=INT(RND(1)*10)+1 : Y=INT(RND(1)*10)+1
230 IF X1<1 OR X1>10 OR Y1<1 OR Y1>10 THEN 2330
240 FOR I=1 TO 10 : FOR J=1 TO 10 : BARR(I,J)=0 : NEXT J : NEXT I
250 CA=INT(AARR(X1,Y1)/10000) : P=INT(((AARR(X1,Y1)-(10000*CA))/100))
260 W=INT((AARR(X1,Y1)-(10000*CA)-(100*P))/10)
270 H=AARR(X1,Y1)-10000*CA-100*P-10*W : I=0 : J=0
280 IF CA=1 THEN I=INT(RND(1)*10+1) : J=INT(RND(1)*10+1) : BARR(I,J)=7
290 IF CA=1 AND I=X AND Y=J THEN BARR(I,J)=0 : GOTO 280
300 IF H=1 THEN I=INT(RND(1)*10+1) : J=INT(RND(1)*9+1)
310 IF H=1 AND BARR(I,J)<>0 THEN 300
320 IF H=1 THEN BARR(I,J)=3
330 BARR(X,Y)=5 : IF W=0 THEN 380
340 FOR I=1 TO W
350 J=INT(RND(1)*10)+1 : K=INT(RND(1)*10)+1
360 IF BARR(J,K)<>0 THEN 350
370 BARR(J,K)=2 : NEXT I
380 IF P=0 THEN 430
390 FOR I=1 TO P
400 J=INT(RND(1)*10)+1 : K=INT(RND(1)*10)+1
410 IF BARR(J,K)<>0 THEN 400
420 BARR(J,K)=1 : NEXT I
430 FOR I=1 TO 10 :  FOR J=1 TO 10
440 IF BARR(J,I)=0 THEN PRINT "T";
450 IF BARR(J,I)=1 THEN PRINT "-";
460 IF BARR(J,I)=2 THEN PRINT "I";
470 IF BARR(J,I)=3 THEN PRINT "^";
480 IF BARR(J,I)=5 THEN PRINT "O";
490 IF BARR(J,I)=7 THEN PRINT "M";
500 NEXT J: PRINT TAB( 18);
510 IF I=2 THEN PRINT "COMBAT STRENGTH-"; : PRINT TAB( 40);C
520 IF I=3 THEN PRINT "TREASURE TOTAL -"; : PRINT TAB( 40);Q
530 IF I=4 THEN PRINT "MAGIC:"
540 IF I=5 THEN PRINT " SLEEP SPELLS";    : PRINT TAB( 40);S
550 IF I=6 THEN PRINT " CHARMS-"; : PRINT TAB( 40);R
560 IF I=7 THEN PRINT " INVISIBILITY-";   : PRINT TAB( 40);V
570 IF I=9 THEN PRINT "DAYS IN FOREST-";  : PRINT TAB( 40);D1
580 IF I=1 OR I=8 OR I=10 THEN PRINT
590 NEXT I: PRINT : IF T=1 THEN RETURN
600 IF T=2 THEN 1270
610 I=INT(RND(1)*5) : IF I=2 THEN GOSUB 2800
620 IF I=1 AND T<>9 THEN PRINT "THERE WAS NOTHING THERE" : GOTO 1270
630 IF I=1 AND T=9 THEN 1260
640 I=INT(RND(1)*16+1) : N=I : IF I=12 THEN 2040
650 IF I=13 THEN 2080
660 IF I=14 THEN 2120
670 IF I>14 THEN J=100 : GOTO 720
680 J=INT(RND(1)*100/MARR(I)) : N1=J : IF J=0 THEN J=1 : N1=J
690 IF J=1 THEN M$=MARR$(I) : PRINT "A ";M$;" IS GUARDING ";
700 IF J<>1 THEN M$=MARR$(I)+"S" : PRINT J;" ";M$;" ARE GUARDING ";
710 M=MARR(I)*J : I=INT(RND(1)*14+1)
720 IF I>11 AND J=100 THEN 610
730 IF I<12 AND J=100 THEN PRINT "NOTHING IS GUARDING ";
740 IF I>11 THEN 2230
750 IF I>11 THEN PRINT "NOTHING" : P=0 : GOTO 770
760 PRINT T$(I) : P=PARR(I)
770 IF M$=MARR$(11) AND M1=7 THEN 2030
780 IF J=100 THEN PRINT "YOU GET THE TREASURE FREE" : GOTO 1190
790 PRINT "DO YOU WISH TO (1)FIGHT, (2)RUN, (3)BRIBE, OR (4)";
800 INPUT "CAST A SPELL";K 
810 IF K<1 OR K>4 THEN 790
820 ON K GOTO 830,940,1080,1660
830 INPUT "HOW MANY COMBAT POINTS DO YOU WISH TO USE";K
840 IF K>C THEN PRINT "YOU ONLY HAVE";C; "COMBAT POINTS" : GOTO 830
850 I=INT(RND(1)*1001) : L=2 : C=C-K : K=K-.01*Q
860 FOR H=1000 TO 0 STEP -50
870 IF L*M<=K AND H>=I THEN 1170
880 L=L-.1 : NEXT H
890 PRINT "THE ";M$;" KILLED YOU. ";
900 PRINT "YOU LOSE EVERYTHING!"
910 INPUT "WISH TO TRY AGAIN (Y OR N)";X$ : PRINT
920 IF X$="Y" THEN RUN
930 PRINT : PRINT "SO LONG... BETTER LUCK NEXT TIME" : END
940 I=INT(RND(1)*12) : IF I=11 THEN 890
950 FOR H=0 TO 10 : IF H*10>M AND H<=I THEN 970
960 NEXT H: GOTO 1150
970 A=X : B=Y : K=0 : T=0 : C=C-INT((RND(1)*21)+.001*Q)-5
980 X=A+INT(RND(1)*3)-1 : Y=B+INT(RND(1)*3)-1
990 IF X=A AND Y=B THEN 980
1000 D1=D1+.1 : IF X>10 THEN X=1 : X1=X1+1 : K=1
1010 IF Y>10 THEN Y=1 : Y1=Y1+1 : K=1
1020 IF X<1  THEN X=10: X1=X1-1 : K=1
1030 IF Y<1  THEN Y=10 : Y1=Y1-1 : K=1
1040 IF BARR(X,Y)>1 AND K=0 THEN 980
1050 BARR(A,B)=INT(RND(1)*3) : BARR(X,Y)=5 : IF I<>11 THEN Z=Z+1
1060 IF K=1 THEN 230
1070 GOTO 610
1080 INPUT "HOW MUCH DO YOU WISH TO PAY";K
1090 IF K>Q THEN PRINT "YOU ONLY HAVE";Q;"TREASURE POINTS." : GOTO 1080
1100 I=INT(RND(1)*22) : L=0 : IF I=21 OR (I>15 AND K<2) THEN 890
1110 J=(P+(M*.1))*N1 : IF K<2 THEN 1140
1120 FOR H=0 TO 20 : IF K<=J*L AND I>=H THEN 1140
1130 L=L+.1 : NEXT H: GOTO 1160
1140 PRINT "YOUR BRIBE WAS NOT ACCEPTED.";
1150 PRINT "YOU MUST FIGHT" : GOTO 830
1160 P=0 : Q=Q-K : BR=BR+1 : T=0 :  PRINT "YOUR BRIBE WAS ACCEPTED."; : GOTO 1240
1170 NARR(N)=NARR(N)+N1
1180 PRINT "YOU BEAT THE ";M$
1190 IF N<12  THEN I=INT(RND(1)*7) : IF I=3 THEN 2150
1200 IF J=100 THEN I=INT(RND(1)*5) :IF I=3 THEN 2210
1210 Q=Q+P
1220 IF P=25 THEN 1900
1230 IF T>5 AND T<>9 THEN Q=Q-P : GOTO 2250
1240 PRINT "YOU NOW HAVE";Q;"TREASURE POINTS."
1250 IF P=200 THEN 1950
1260 IF T=9 THEN GOSUB 2530
1270 INPUT "WHICH DIRECTION (PRESS 1 FOR THE MAP)";X$
1280 IF X$="1" THEN T=2 : GOTO 430
1290 T=0 : INPUT "WHAT DISTANCE";K : IF K<>INT(K) THEN 1270
1300 GOTO 2500
1310 A1=X1 : B1=Y1 : A=X : B=Y : C=C-INT(7.5*K*RND(1))
1320 IF  LEFT$(X$,1)="N" THEN Y=Y-K
1330 IF  LEFT$(X$,1)="S" THEN Y=Y+K
1340 IF RIGHT$(X$,1)="E" THEN X=X+K
1350 IF RIGHT$(X$,1)="W" THEN X=X-K
1360 IF X>10 THEN X=X-10 : X1=X1+1 : IF X>10 THEN 1360
1370 IF X<1  THEN X=X+10 : X1=X1-1 : IF X<1 THEN 1370
1380 IF Y>10 THEN Y=Y-10 : Y1=Y1+1 : IF Y>10 THEN 1380
1390 IF Y<1  THEN Y=Y+10 : Y1=Y1-1 : IF Y<1 THEN 1390
1400 IF BARR(X,Y)=1 THEN C=C-5
1410 IF BARR(X,Y)=0 THEN C=C-10
1420 IF C<=0 THEN PRINT "YOU DIED FROM LACK OF STRENGTH."; : GOTO 900
1430 IF X1<>A1 OR Y1<>B1 THEN 230
1440 IF BARR(X,Y)=7 THEN T=9
1450 IF BARR(X,Y)=2 THEN 1480
1460 IF BARR(X,Y)=3 THEN 1500
1470 BARR(A,B)=INT(RND(1)*3) : BARR(X,Y)=5 : GOTO 430
1480 PRINT "YOU TRIED TO GO THROUGH A WALL"
1490 C=C-INT(RND(1)*Q*.005)-25 : X=A : Y=B : GOTO 1270
1500 Y=Y+1 : C=D : BARR(A,B)=INT(RND(1)*3) : BARR(X,Y)=5 : T=1 : V=V1
1510 R=R1 : S=S1 : GOSUB 430
1520 PRINT "YOU STOPPED AT AN INN AND REGAINED YOUR STRENGTH"
1530 I=INT(RND(1)*Q*.75) : IF I<5 AND Q>5 THEN I=5
1540 IF I<5 AND Q<=5 THEN I=0
1550 PRINT "YOU PAID";I;"TREASURE POINTS TO SAY THERE" : Q=Q-I
1560 PRINT "YOU NOW HAVE";Q;"TREASURE POINTS"
1570 I=INT(RND(1)*3) : IF I=2 THEN 1270
1580 IF I=1 THEN GOSUB 2670 : GOTO 1270
1590 I=INT(RND(1)*4+1)
1600 PRINT "THE INNKEEPER TOLD YOU THAT THE FOREST EDGE IS LESS THAN"
1610 ON I GOTO 1620,1630,1640,1650
1620 PRINT Y1*100;"YARDS TO THE NORTH" : GOTO 1270
1630 PRINT (11-Y)*100;"YARDS TO THE SOUTH" : GOTO 1270
1640 PRINT X1*100;"YARDS TO THE WEST" : GOTO 1270
1650 PRINT (11-X1)*100;"YARDS TO THE EAST" : GOTO 1270
1660 IF T>5 THEN PRINT "YOU CAN'T USE MAGIC TO GET MAGIC" : GOTO 790
1670 IF S+V+R=0 THEN PRINT "YOU HAVE NO MAGIC" : GOTO 790
1680 PRINT "WHAT TYPE OF SPELL-(1)SLEEP, (2)CHARM, OR (3)INVISIBILITY";
1690 INPUT K : PRINT : IF K<1 OR K>3 THEN 1660
1700 ON K GOTO 1710,1790,1950
1710 IF S=0 THEN PRINT "YOU HAVE NO SLEEP SPELLS."; : GOTO 1150
1720 IF N=4 THEN PRINT "YOU CAN'T PUT ";MARR$(4);"S TO SLEEP."; : S=S-1 : GOTO 1150
1730 I=INT(RND(1)*10) : S=S-1
1740 IF I<3 THEN PRINT "YOUR SPELL WAS UNSUCCESSFUL."; : GOTO 1150
1750 IF I<8 THEN PRINT "YOU GOT THE TREASURE SAFELY" : GOTO 1190
1760 PRINT "THE ";M$;" WOKE TOO SOON"
1770 P=INT(RND(1)*P) : Q=Q+P
1780 PRINT "YOU GOT AWAY WITH";P;"TREASURE POINTS" : GOTO 1270
1790 IF R=0 THEN PRINT "YOU HAVE NO CHARMS."; : GOTO 1150
1800 I=INT(RND(1)*10) : R=R-1
1810 IF M<60 AND I>6 THEN PRINT "YOUR CHARM DIDN'T WORK."; : GOTO 1150
1820 IF M>50 AND I<2 THEN PRINT "YOUR CHARM DIDN'T WORK."; : GOTO 1150
1830 IF I=3 THEN PRINT "THE CHARM WORE OFF TOO SOON." : GOTO 1770
1840 I=3 : GOTO 1750
1850 IF V=0 THEN PRINT "YOU HAVE NO INVISIBILITY SPELLS."; : GOTO 1150
1860 I=INT(RND(1)*10) : V=V-1
1870 IF N>50 AND I>8 THEN PRINT "THE ";M$;" SMELLED YOU!" : GOTO 1770
1880 IF M<60 AND I=0 THEN PRINT "YOUR INVISIBILITY WORE OFF TOO SOON" : GOTO 1770
1890 GOTO 1840
1900 I=INT(RND(1)*2)+1 : ON I GOTO 1910,1930
1910 C=2*C : PRINT "YOU WON AN ENCHANTED SWORD. YOUR COMBAT STRENGTH "
1920 PRINT "IS DOUBLED AND IS NOW";C : GOTO 1240
1930 PRINT "YOU WON AN ORDINARY SWORD. YOUR COMBAT STRENGTH IS NOT"
1940 PRINT "DOUBLED AND REMAINS AT";C : GOTO 1240
1950 J=INT(RND(1)*10) : I=INT(RND(1)*10)
1960 IF J=7 AND M1<>7 THEN M1=7 : GOTO 1990
1970 IF I=1 THEN 2010
1980 GOTO 1260
1990 PRINT "THERE WAS A MIRROR IN THE CHEST. IT WILL PROTECT YOU"
2000 PRINT "AGAINST ANY ";MARR$(11);"S YOU MAY MEET" : M1=7 : GOTO 1270
2010 PRINT "THE TREASURE CHEST WAS A TRAP. YOU WERE KILLED WHEN ";
2020 PRINT "YOU OPENED IT" : GOTO 900
2030 PRINT "YOUR MIRROR KILLED THE ";M$ : NARR(11)=NARR(11)+1 : M=0 : GOTO 1190
2040 PRINT "A GIANT BAT GRABBED YOU AND CARRIED YOU TO A NEW SPOT"
2050 A=X : B=Y : T=0 : D1=D1+.1
2060 X=INT(RND(1)*10)+1 : Y=INT(RND(1)*10+1) : IF BARR(X,Y)>1 THEN 2060
2070 BARR(A,B)=INT(RND(1)*3) : BARR(X,Y)=5 : GOTO 610
2080 PRINT "YOU FELL INTO A PIT."; : I=INT((RND(1)*21)+.001*Q) : C=C-I
2090 IF C<=0 THEN PRINT "YOU DIED TRYING TO GET OUT" : GOTO 900
2100 PRINT "YOU USED";I;"COMBAT POINTS TRYING TO GET OUT" : I=11
2110 FOR J=1 TO 750 : NEXT J : GOTO 970
2120 J=0 : FOR I=1 TO 11 : J=J+NARR(I) : NEXT I : IF J<11 THEN 610
2130 PRINT "A GIANT NEIL CARRIED YOU TO SAFETY.";
2140 FOR I=1 TO 1000 : NEXT I: T=0 : GOTO 2340
2150 I=INT(RND(1)*11)+1 : M=MARR(I) : M$=MARR$(I) : N=I
2160 PRINT "A ";M$;" HEARD THE NOISE OF THE BATTLE AND CAME WANDERING BY"
2170 IF I=11 AND M1=7 THEN 2030
2180 INPUT "DO YOU WISH TO (1)FIGHT, (2)RUN, (3)CAST A SPELL";K
2190 IF K<1 OR K>3 THEN 2180
2200 ON K GOTO 830,940,1660
2210 I=INT(RND(1)*11)+1 : M=MARR(I) : M$=MARR$(I) : N=I
2220 PRINT "A ";M$;" CAME WANDERING BY" : GOTO 2170
2230 IF I<>14 THEN 750
2240 I=INT(RND(1)*3+1) : T=I+5 : PRINT "A ";G$(I) : P=INT(RND(1)*11) : GOTO 770
2250 I=INT(RND(1)*10)
2260 IF I=5 THEN PRINT "YOU WERE UNABLE TO MASTER THE SPELL.";
2270 IF I=5 THEN PRINT "YOU GAIN NO ";G$(T-5);"S" : GOTO 1270
2280 IF T=6 THEN S=S+1 : S1=S1+1
2290 IF T=7 THEN R=R+1 : R1=RA+1
2300 IF T=8 THEN V=V+1 : V1=V1+1
2310 PRINT "YOU WON THE ";G$(T-5) : T=0 : IF S1/5+R1/3+V1/2>6 THEN GOSUB 3280
2320 GOTO 1270
2330 FOR A=1 TO 750 : NEXT A
2340 PRINT "YOU SURVIVED THE FOREST" : FOR I=1 TO 1000 : NEXT I
2350 PRINT "DO YOU WISH TO SEE THE # OF MONSTERS YOU KILLED, RAN FROM,"
2360 INPUT "AND BRIBED (Y OR N)";X$ : IF X$="N" THEN PRINT : GOTO 2420
2370 PRINT "MONSTER";TAB( 11);"# SLAIN";TAB( 32);"MONSTER";TAB( 43);"#SLAIN"
2380 FOR I=1 TO 5 : PRINT MARR$(I);TAB( 14);NARR(I);TAB( 32);MARR$(I+5);
2390 PRINT TAB(46);NARR(I+5)
2400 NEXT I : PRINT TAB( 32); MARR$(11), TAB( 46); NARR(11)
2410 PRINT : PRINT "BRIBED-";BR; TAB( 32); "RAN FROM";Z
2420 PRINT TAB( 10);"TREASURE TOTAL-";Q
2430 IF Q1<>0 THEN GOSUB 3250
2440 PRINT "CONGRATULATIONS"; : IF Q1<>0 AND Q1>Q THEN PRINT " ANYWAY" : PRINT
2450 PRINT : X$=""
2460 IF D1<30 THEN INPUT "DO YOU WISH TO RETURN TO THE FOREST";X$
2470 REM
2480 S=S1 : V=V1 : R=R1 : C=D : IF X$<>"Y" THEN 3080
2490 GOTO 210
2500 D1=D1+K/10 : IF D1<30 THEN 1310
2510 PRINT "YOUR TIME IS UP. 30 DAYS HAVE PASSED"
2520 FOR I=1 TO 1000 : NEXT I : GOTO 2130
2530 FOR I=1 TO 2500 : NEXT I : T=0
2540 PRINT "YOU MADE IT INTO THE ENCHANTED CASTLE"
2550 I=INT(RND(1)*21)*100 : J=INT(RND(1)*9) : AARR(X1,Y1)=AARR(X1,Y1)-10000
2560 GOSUB 2790 : PRINT "YOU FOUND ";I;"TREASURE POINTS THERE" : Q=Q+I
2570 IF J<>7 OR M1=7 THEN 2600
2580 PRINT "YOU ALSO FOUND A MIRROR WHICH WILL KILL ANY ";
2590 PRINT MARR$(11);"S YOU MEET" : M1=7
2600 J=INT(RND(1)*20) : IF J=2 THEN C=2*C
2610 IF J=2 THEN PRINT "YOU ALSO FOUND AN ENCHATED SWORD WHICH DOUBLES ";
2620 IF J=2 THEN PRINT "YOUR STRENGTH"
2630 FOR I=1 TO CS-1 : IF CARR(I)<>X1 THEN 2650
2640 FOR J=I TO CS-1 : CARR(J)=CARR(J+1) : DARR(J)=DARR(J+1) : NEXT J
2650 NEXT I : CS=CS-1 : IF CS=0 THEN PRINT "YOU FOUND THE LAST OF THE CASTLES"
2660 RETURN
2670 IF CS=0 THEN RETURN
2680 I=INT(RND(1)*CS+1)
2690 PRINT "THE INKEEPER TOLD YOU OF A LEGEND OF A CASTLE.";
2700 IF CARR(I)=X1 AND DARR(I)=Y1 THEN PRINT "VERY CLOSE BY" : RETURN
2710 J=X1-CARR(I) : I=Y1-DARR(I)
2720 IF ABS(I)=ABS(J) THEN PRINT "DIRECTLY TO THE "; : GOTO 2740
2730 PRINT "SOMEWHERE TO THE ";
2740 IF I<0 THEN PRINT "SOUTH";
2750 IF I>0 THEN PRINT "NORTH";
2760 IF J>0 THEN PRINT "WEST";
2770 IF J<0 THEN PRINT "EAST";
2780 PRINT : RETURN
2790 REM
2800 I=INT(RND(1)*11+1)
2810 ON I GOTO 2820, 2860, 2840, 2890, 2920, 2950, 2970, 2990, 3010, 3020, 3050
2820 PRINT "YOU STEPPED INTO A TIME WARP AND LOST SEVEN DAYS"
2830 D1=D1+7 : RETURN
2840 I=INT(RND(1)*10+1) : J=D1 : D1=D1-I : IF D1<.1 THEN D1=.1 : I=J-D1
2850 PRINT "YOU STEPPED INTO A TIME WARP AND GAINED";I;"DAYS" : RETURN
2860 IF C>=D THEN RETURN
2870 PRINT "YOU MET AN ELF WITH A MAGIC DRINK THAT GAVE"
2880 PRINT "YOUR COMBAT STRENGTH BACK" : C=D : RETURN
2890 IF V+R+S=V1+R1+S1 THEN RETURN
2900 PRINT "YOU RAN INTO A WIZARD WHO GAVE YOU A POTION THAT"
2910 PRINT "RESTORED ALL YOUR MAGIC" : V=V1 : R=R1 : S=S1 : RETURN
2920 IF Q<2 THEN RETURN
2930 PRINT "YOU FELL INTO SOME QUICKSAND, YOU LOST HALF OF YOUR"
2940 PRINT "TREASURE" : Q=INT(Q/2) : RETURN
2950 PRINT "YOU RAN INTO SOME THICK UNDERBRUSH AND USED UP HALF"
2960 PRINT "YOUR STRENGTH" : C=INT(C/2) : RETURN
2970 I=INT(RND(1)*50+1) : PRINT "YOU FOUND";I;"COINS LYING ON THE";
2980 PRINT " GROUND AND PICKED THEM UP" : Q=Q+I : RETURN
2990 IF M1<>7 THEN RETURN
3000 PRINT "YOU TRIPPED OVER SOME ROOTS AND LOST YOUR MIRROR": M1=0 : RETURN
3010 PRINT "A HERMIT TOLD YOU THAT THERE ARE";CS;"CASTLES LEFT" : RETURN
3020 IF V+S+R=0 THEN RETURN
3030 PRINT "YOU WANDERED INTO AND AREA WHERE MAGIC DOESN'T WORK"
3040 PRINT "YOU LOSE ALL YOUR PRESENT MAGIC" : V=0 : S=0 : R=0 : RETURN
3050 IF CS=0 THEN RETURN
3060 PRINT "YOU MET A HUNTER WHO TOLD YOU OF THE LEGEND OF A"
3070 PRINT "CASTLE "; : I=INT(RND(1)*CS)+I : GOSUB 2700 : RETURN
3080 FOR I=1 TO 2000 : NEXT : PRINT
3090 PRINT "DO YOU WISH TO GO TO A NEW FOREST WITH THE SAME STRENGTH ";
3100 INPUT "AND MAGIC";X$ : IF X$="Y" THEN 3190
3110 PRINT "DO YOU WISH TO GO TO A NEW FOREST WITH A NEW STRENGTH AND ";
3120 INPUT " MAGIC";X$ : IF X$="Y" THEN RUN
3130 PRINT "DO YOU PLAN ON USING THE SAME STRENGTH AND MAGIC AGAIN"
3140 INPUT "SOME OTHER TIME (Y OR N)";X$ : IF X$="Y" THEN GOTO 3350
3150 PRINT : PRINT "ONCE AGAIN, YOUR TREASURE TOTAL WAS";Q
3160 IF Q>Q1 THEN Q1=Q
3170 IF Q1<>0 THEN PRINT "THE LARGEST TREASURE TOTAL YOU GOT WITH THIS";
3180 PRINT "STRENGTH AND MAGIC WAS";Q1 : PRINT : PRINT "BYE NOW" : END
3190 BR=0 : Z=0 : D1=0 : FOR I=1 TO 11 : NARR(I)=0 : NEXT I: IF Q12000 THEN 3210
3230 INPUT "SLEEP SPELLS";S : INPUT "CHARMS:";R : INPUT "INVISIBILITY";V
3240 INPUT "PREVIOUS LARGEST TREASURE TOTAL";Q1 : GOTO 140
3250 IF Q1Q THEN PRINT "YOU DIDN'T OBTAIN AS MUCH TREASURE THIS TIME"
3270 RETURN
3280 PRINT "YOUR MAGIC TOTAL IS RATHER LARGE. DO YOU WISH TO CONVERT IT TO"
3290 INPUT "COMBAT POINTS";X$ : IF X$="N" THEN RETURN
3300 S1=S1-5 : R1=R1-3 : V1=V1-2 : IF S1<=0 THEN S1=1
3310 IF R1<=0 THEN R1=1
3320 IF V1<=0 THEN V1=1
3330 S=S1 : R=R1 : V=V1 : C=C+100 : D=D+100 : PRINT "YOUR COMBAT STRENGTH IS";
3340 PRINT "PERMANENTLY INCREASED BY 100" : RETURN
3350 PRINT "COMBAT STRENGTH-";D : PRINT "SLEEP SPELLS-";S1 : PRINT "CHARMS-";R1
3360 PRINT "INVISIBILITY-";V1 : PRINT : RETURN
3370 DATA GOBLIN, 10 SILVER SPOONS (10 POINTS), 5, 10, MINOTAUR
3380 DATA A SWORD WHICH MIGHT BE ENCHANTED (25 POINTS), 10, 25
3390 DATA CYCLOPS, 50 SILVER COINS (50 POINTS), 20, 50, ZOMBIE
3400 DATA 100 GOLD PIECES (100 POINTS), 30, 100, GIANT
3410 DATA AN ENCHANTED BRACELET (50 POINTS), 40, 50, HARPY
3420 DATA A TREASURE CHEST (200 POINTS), 50, 200, GRIFFIN
3430 DATA A PEARL NECKLACE (50 POINTS), 60, 50, CHIMERA
3440 DATA A JEWELED SWORD (30 POINTS), 70, 30, DRAGON
3450 DATA A JAR OF RUBIES (75 POINTS), 80, 75, WYVERN
3460 DATA A BOX OF JEWELS (100 POINTS), 90, 100, BASILISK
3470 DATA A GOLD GOBLET (50 POINTS), 100, 50
3480 END