Temple of Apshai (DM Program)(ATASCII Listing).Txt

Temple of Apshai (DM Program)(ATASCII Listing).Txt

10 CLR :READ U1,U2,U3,U4,U5,U6,U7,U8,U10,U14,LS,Q,HUN,MSTR:DATA 1,2,3,4,5,6,7,8,10,14,26,60,100,7000 12 DIM TM(U5),ZA(U3),ZD(U5),A$(24),C$(U1),O$(18),S(U4),P(U4),RF(U3),RN(U3),S$(11),BL$( LS) 13 POKE 1586,U0:FOR I=U0 TO U3:RF(I)=U0:RN(I)=U0:NEXT I:X=USR(1580,53248,U8) 14 BL$=" -------------":FOR I=U1 TO U5:READ J:TM(I)=J:NEXT I:DATA 10,13,2,1,1 16 KA=103*256:NO=KA:NT=U4*Q+KA:D1=U8*Q+KA:D2=12*Q+KA:MT=(U14+U2)*Q+KA:MN=MT+Q:NP=M N+Q:XP=NP+Q:YP=XP+Q:TR=YP+Q 18 XR=TR+Q:YR=XR+Q:KB=KA+2251:Y2=KA+1800:X=USR(1580,KA-Q,Q) 20 ZD(U0)=U3:ZA(U1)=U0:ZD(U1)=U0:ZA(U2)=U3:ZD(U2)=U3:ZA(U3)=-U6:ZD(U3)=- U2:ZD(U4)=U5:ZD(U5)=U5:GOTO 5000 25 DATA FLAME ,DUST ,MOLD ,PIT ,,SPEAR ,NEEDLE ,XBOW ,CAVEIN ,CEILING , 50 PC=PC-U1:POKE KB+U10+U14,PEEK(KB+U10+U14)-U1:POKE KA-92,PEEK(KA-92)- U1:RETURN 55 YY=W1-W2-U5:IF YM>YY THEN YM=YY:GOTO 57 56 IF YM<U5 THEN YM=U5 57 XX=V2-V1-U5:IF XM>XX THEN XM=XX:RETURN 58 IF XM<U5 THEN XM=U5 59 RETURN 60 J=INT(J):POSITION LS,U10+U1:? J;" ARROW";:IF J>U1 THEN ? "S"; 62 RETURN 65 SOUND U0,255,U8,U14:FOR I=20 TO U0 STEP -U1:POKE 712,I:NEXT I:SOUND U0,U0,U0,U0:RETURN 70 GOSUB 500:IF L=U0 OR C$<"0" OR C$>"9" THEN 70 71 J=ASC(C$)-48:? C$;:RETURN 72 POSITION 33,14:? PEEK(KB+13);" ";:RETURN 74 POSITION 35,U14+U1:? PEEK(KB+U14);" ";:RETURN 80 X=USR(1580,KA-Q,Q):RETURN 82 FOR I=U0 TO U3:RN(I)=U0:IF RF(I)>U0 THEN POKE NT+KR+I*Q,U3:POKE KA- 61+KR,U0:RN(I)=U1:RF(I)=U0 84 NEXT I:I=KF+U1:IF I>U3 THEN I=I-U4 85 IF RN(KF-U1)>U0 THEN RF(I)=U1 86 RETURN 90 POSITION LS,U4:? "ROOM NO.:";KR;" ":POSITION LS,U5:? "WOUNDS:";INT(HUN*PC/PH);"% ":POSITION LS,U6:? "FATIGUE:"; 91 ? INT(TA);"% ":POSITION LS,U7:? "WGT:";WC;" LBS":POSITION LS,U1:? BL$:POSITION LS,U14:? "ARROWS:";PEEK(KB+13) 92 POSITION LS,U14+U1:? "MAGIC AR:";PEEK(KB+U14):POSITION LS,U14+U2:? "TOTAL SLAIN:":POSITION LS,U14+U3:? KC 93 POSITION LS,U0:? BL$;A$:RETURN 95 GOSUB 345:GOSUB 82:NB=U0:IN=U0:KR=PEEK(NO+L):GOSUB 800:IB=U2:IF KR=U0 THEN 10000 97 GOTO 5285 100 COLOR U0 101 L1=YY:L2=YY+L-U2:IF L1<U0 THEN L1=U0 102 IF L2>46 THEN L2=46 103 IF L1>46 THEN L1=46 104 IF L1=L2 OR L2<U0 OR XX>46 OR XX<U0 THEN RETURN 111 I=XX:IF I<U0 THEN I=U0 112 IF PEEK(200)<>U0 THEN PLOT I/U2+U2,L1/U2:DRAWTO I/U2+U2,L2/U2:GOTO 115 113 I=I/U2+U2:J=L1/U2:L=(L2-L1)/U2+U1 114 X=USR(ADR(" ©0…Þ© …ß ±Þ…àÈ±Þ…á ±à…Ôȱà…Õ¥Ú¨É ð ©( eÔ…Ô æÕˆÐò¥Ø¨¥Üª±ÔÉ Ð − Ò) @‘Ô©( eÔ…Ô æÕÊÐã`"),I,J,L) 115 COLOR 32:PLOT 28,20:RETURN 120 COLOR 32:GOTO 101 140 COLOR U0 141 L1=XX:L2=XX+L-U2:IK=YY:IF L1<U0 THEN L1=U0 142 IF L1>46 THEN L1=46 143 IF L2>46 THEN L2=46 144 IF L2<U0 OR IK<U0 OR IK>46 THEN RETURN 145 IF PEEK(200)<>U0 THEN PLOT L1/U2+U2,IK/U2:DRAWTO L2/U2+U2,IK/U2:GOTO 149 146 J=L1/U2+U1:L2=L2/U2:I=IK/U2:L=L2-J+1.6:IF ABS(J-L2)<U1 OR L2-J<U0 THEN 149 148 X=USR(ADR(" ©0…Þ© …ß ±Þ…àÈ±Þ…á ±à…Ôȱ à…Õ¥Ú eÔ…Ô¥Õi …Õ¥ØÉ ð ¨©( eÔ…Ô¥Õi …ÕˆÐð¥Ü¨±ÔÉ Ð − Ò) @‘ÔˆÐî`"),I,J,L) 149 COLOR 32:PLOT 28,20:RETURN 150 COLOR 32:GOTO 141 200 J=(XA-XB)*U2+52:K=29168+(U14+U2)*KF:L=29720+(YB-YA)*U4 210 X=USR(1580,29696,255):POKE 53248,J:X=USR(1564,K,L,U14+U2):RETURN 250 RETURN 300 J=(XM-XB+V1+U1)*U2+52:K=31536+16*MQ-256*(I/U2=INT(I/U2)):L=29976+(YB-YM- W2)*U4:POKE 705,PEEK(31488+MQ) 302 X=USR(1580,29952,255):POKE 53249,J:X=USR(1564,K,L,U14+U2):RETURN 345 IF NB=U0 THEN RETURN 350 POKE 1586,U0:X=USR(1580,29952,255):RETURN 450 RETURN 500 POKE 764,255:CLOSE #U1:OPEN #U1,U4,U0,"K":FOR I=U1 TO U4*SE/(U1+U7*NB):IF NB THEN GOSUB 300:GOTO 510 505 FOR L5=U1 TO U10:NEXT L5 510 IF PEEK(764)<>255 THEN GET #U1,A:C$=CHR$(A):L=U1:RETURN 520 NEXT I:L=U0:RETURN 600 IF K=U0 THEN FOR I=U0 TO 16 STEP U2:SOUND U0,U5,U8,U8-ABS(U8-I):NEXT I 605 KF=U2:IF SGN(XL-XM)=U1 THEN KF=U4 610 IF K=U0 THEN XA=XA-SGN(XL-XM):YA=YA-SGN(YL-YM):KF=KF+U4:GOSUB 200:KF=KF- U4:XA=XA+SGN(XL-XM):YA=YA+SGN(YL-YM) 620 RETURN 650 PH=PEEK(KB+24):TA=TA-(ABS(M)/U4*(HUN/PH+U5- U5*PC/PH)*(U1+WC/(AS*AS*HUN)*U3)/U2)+11:IF TA>HUN THEN TA=HUN 660 POSITION 34,U6:? INT(TA);"%þ";:RETURN 670 Y=YB-PEEK(YP+KR)-W2:X=PEEK(XP+KR)+V1-XB:FOR L=U1 TO U10:I=X:IK=Y:IF I<U0 OR I>47 OR IK<U0 OR IK>47 THEN RETURN 672 SOUND U0,85,U10,U10:COLOR 43:PLOT I/U2+U2,IK/U2:SOUND U0,U0,U0,U0:COLOR U2^U5:PLOT I/U2+U2,IK/U2:NEXT L:RETURN 679 IF PEEK(TR+KR)=U0 THEN RETURN 680 IF ABS(V2-V1-PEEK(XR+KR))<U6 THEN POKE XR+KR,PEEK(XR+KR)-U3:IF PEEK(XP+KR)>=U3 THEN POKE XP+KR,PEEK(XP+KR)-U3 682 I=(V1+PEEK(XR+KR)-XB):YY=YB-W2-PEEK(YR+KR):IK=YY:IF YY<U0 THEN RETURN 684 J=PEEK(TR+KR):COLOR U6+26*(J=U0):PLOT I/U2+U1,IK/U2:COLOR U7+25*(J=U0):PLOT I/U2+U2,IK/U2:RETURN 695 N=PEEK(NP+KR):L=U0 697 IF NB>U0 OR N=U0 OR ABS(XL-PEEK(XP+KR))>U3 OR ABS(YL-PEEK(YP+KR))>U3 OR RND(U0)>PEEK(Y2+140+N)/HUN THEN RETURN 700 POSITION LS,U2:RESTORE 25:FOR I=U0 TO (PEEK(Y2+150+N)):READ A$:NEXT I:? A$;"TRAP";:GOSUB 65:GOSUB 65 702 IF PEEK(Y2+120+N)<=U0 THEN 710 704 I=PEEK(Y2+120+N):NB=U1:GOSUB 4830:XM=PEEK(XP+KR):YM=PEEK(YP+KR):POSITION LS,U0:? A$;:GOTO 720 710 IF PEEK(Y2+130+N)>U0 THEN ML=PEEK(Y2+130+N):L=U1:MD=U2*ML 720 POKE NP+KR,U0:RETURN 800 LL=KR:GOTO 850 840 LL=LR 850 V3=PEEK(YR+Q+LL)+128*PEEK(YR+Q+Q+LL):V4=PEEK(YR+180+LL)+128*PEEK(YR+180+Q+LL) 852 W3=PEEK(YR+300+LL)+128*PEEK(YR+300+Q+LL):W4=PEEK(Y2+LL)+128*PEEK(Y2+Q+LL):IF LL<>KR THEN RETURN 860 V1=V3:V2=V4:W1=W3:W2=W4:RETURN 880 K=U0:FOR LL=U1 TO MQ:L=PEEK(K+KA+2121):K=K+L+U1:NEXT LL:K=K-L-U1:A$=" " 882 FOR LL=U1 TO L:A$(LL,LL)=CHR$(PEEK(K+KA+2121+LL)):NEXT LL:IF LL<=13 THEN RETURN 884 FOR I=U1 TO L:IF A$(I,I)<>" " THEN NEXT I 886 I=I-U1:S$=A$(I+U2):A$(I+U1)=" ":FOR I=I+U2 TO U2*I-U2:A$(I,I)="-":NEXT I:A$(I-U1)=S$:RETURN 1200 XA=PEEK(KA+2236):YA=PEEK(KA+2237):KF=PEEK(KA+2238):PW=PEEK(KA+2235) 1202 EX=PEEK(KB+U3)*65536+PEEK(KB+U2)*256+PEEK(KB+U1):FOR I=61 TO 80:POKE KA- I,U0:NEXT I 1210 PH=PEEK(KB+24):PC=PH:PB=PEEK(KB+18):PA=PEEK(KB+19):PS=PEEK(KB):AA=PEEK(KB+U8):T A=HUN 1212 AS=PEEK(KB+23)/U10:WM=PEEK(KB+U7):SE=PEEK(KB+U10- U1):WC=PEEK(KB+U10+U2):SM=PEEK(KB+U10):RETURN 3000 IF PEEK(KA+LR-61)=U1 THEN RETURN 3002 GOSUB 840:XX=V4-XB-U2:IF V3-XB>-U1 AND V4-XB<49 AND YB-W3>-U1 AND YB-W4<49 THEN POKE KA+LR-61,U1 3008 FOR K=U1 TO U3 STEP U2:NN=LR+K*Q:YY=YB-W3:IF NS=K THEN 3014 3009 I1=U3:L=W3-W4:IF PEEK(D2+NN)-PEEK(D1+NN)+U4=L THEN 3014 3010 GOSUB HUN:I1=U5-U2*PEEK(NT+NN) 3012 IF I1>=U0 AND I1<U5 THEN YY=YB-W4-PEEK(D2+NN):L=PEEK(D2+NN)- PEEK(D1+NN):COLOR 32-27*(PEEK(NN+NT)=2):GOSUB 101 3014 XX=V3-XB:NEXT K 3020 YY=YB-W3:FOR K=U0 TO U2 STEP U2:NN=LR+K*Q:IF NS=K THEN 3034 3022 I1=U1:XX=V3-XB:L=V4-V3:IF PEEK(D2+NN)-PEEK(D1+NN)+U4=L THEN 3034 3024 GOSUB 140:I1=U2-PEEK(NT+NN) 3026 IF I1>=0 AND I1<2 THEN XX=V3-XB+PEEK(D1+NN):L=(PEEK(D2+NN)- PEEK(D1+NN)):COLOR 32-28*(PEEK(NN+NT)=2):GOSUB 141 3034 YY=YB-W4-U2:NEXT K:RETURN 4000 POKE 53248,U0:LR=KR:GOSUB 800:IF PEEK(KA+KR-61)=U1 THEN 4010 4001 GOSUB 80:POSITION LS,U10+U2:? BL$ 4002 XB=V1:YB=W1:IF PEEK(NT+LR+U3*Q)=U1 THEN XB=XB-(48-V2+V1)/U2:IF PEEK(NT+LR+Q)=U1 THEN XB=XB+(V1-XB)/U2 4003 IF PEEK(NT+LR)=U1 THEN YB=YB+48-W1+W2:IF PEEK(NT+LR+U2*Q)=U1 THEN YB=YB- (YB-W1)/U2 4004 XL=XA-V1:YL=YA-W2:IF PEEK(MT+KR)>U0 AND PEEK(MN+KR)>U0 THEN GOSUB 4500:NB=U1:GOTO 4010 4005 GOSUB 4800 4010 IF NB>U0 THEN GOSUB 300 4020 NS=U5:IF IB=U3 THEN 4050 4030 X=USR(ADR("h©0…Þ© …ß ±Þ…àÈ±Þ…á ±à…Øȱà…Ù¢# © ‘؈Ðû ¥Øi(…Ø îæÙÊÐé`")) 4032 FOR IR=U0 TO U3:I=KR+IR*Q:IF PEEK(NT+I)=U1 AND PEEK(NO+I)>U0 THEN LR=PEEK(NO+I):GOSUB 3000 4040 NEXT IR 4050 LR=KR:GOSUB 3000:GOSUB 200:GOSUB 679:GOSUB 90:RETURN 4500 MQ=PEEK(MT+KR):ML=PEEK(Y2+200+MQ):MA=PEEK(Y2+212+MQ):MP=PEEK(Y2+224+MQ):MS=PEEK (Y2+308+MQ) 4502 MD=PEEK(Y2+248+MQ):MH=PEEK(Y2+260+MQ):GOSUB 880 4520 XM=(V2-V1-U8-U1)*RND(U0)+U5:YM=(W1-W2-U8-U1)*RND(U0)+U5 4550 MF=U3*RND(U0)+U1:RETURN 4800 L=99*RND(U0)+U1:IF L>PW THEN NB=U0:A$="":RETURN 4810 L=99*RND(U0)+U1:J=U0:NB=U1:FOR I=U1 TO U10+U2:J=J+PEEK(Y2+296+I):IF L<=J THEN 4830 4820 NEXT I 4830 POKE MT+KR,I:POKE MN+KR,U1:MQ=I:ML=PEEK(Y2+200+I):MA=PEEK(Y2+212+I):MP=PEEK(Y2+224+I) 4832 MS=PEEK(Y2+308+I):MD=PEEK(Y2+248+I):MH=PEEK(Y2+260+I):GOSUB 880:GOSUB 4520:RETURN 4850 L=99*RND(U0)+U1:IF L<PW/U6 THEN 4810 4852 RETURN 5000 KR=U1:O$="RLATPFMGEV!HQSYDOI":GOSUB 1200 5020 GRAPHICS U0:POKE 756,120:X=PEEK(560)+256*PEEK(561)+U3:POKE X,68:FOR I=U3 TO 25:POKE X+I,U4:NEXT I:POKE 752,U1 5021 FOR I=U0 TO 9:POKE 704+I,PEEK(31504+I):NEXT I 5022 POKE 54279,112:POKE 53256,U0:POKE 53257,U0:POKE 559,62:POKE 53277,255 5024 POKE 53263,255:POKE 53264,255 5030 GOSUB 4000:S(U1)=W1-W2:S(U2)=V2-V1:S(U3)=U0:S(U4)=U0 5040 P(U1)=XA-V1:P(U2)=YA-W2:P(U3)=P(U1):P(U4)=P(U2):P(U0)=P(U2) 5044 X0=XL:Y0=YL:IA=U0:GOSUB 500:M=U0:POSITION LS,U10:? BL$:POSITION LS,11:? BL$ 5045 POSITION LS,U2:? BL$:IF L=U0 THEN GOTO MSTR 5046 IA=U0:IF ASC(C$)>47 AND ASC(C$)<58 THEN 5100 5047 FOR I=U1 TO U10+U8:IF C$<>O$(I,I) THEN 5050 5048 ON I GOTO 5300,5350,5390,5390,5390,5390,5390,5800,5700,5370,5900,6100,6200,6300,6140,5850 ,5600,8000 5050 NEXT I:GOTO 5044 5100 IF TA<U1 THEN 5390 5102 M=ASC(C$)-48 5110 M1=M:N=PEEK(NP+KR):IB=U0:ON KF GOTO 5120,5210,5164,5250 5120 IF YA+M>W1-U4 THEN M=W1-U4-YA:IB=U1 5150 GOTO 5281 5164 M=-M:M1=M:IF YA+M<W2+U4 THEN M=W2+U4-YA:IB=U1 5180 GOTO 5281 5210 IF XA+M>V2-U4 THEN M=V2-U4-XA:IB=U1 5240 GOTO 5281 5250 M=-M:M1=M:IF XA+M<V1+U3 THEN M=V1+U3-XA:IB=U1 5270 GOTO 5281 5278 IF NB>U0 THEN GOTO MSTR 5279 GOTO 7020 5281 IF IB=U0 THEN 5290 5282 XL=XA-V1:YL=YA-W2:IF PEEK(NT+KR+KF*Q-Q)<>U1 THEN 5290 5283 L=KR+KF*Q-Q:IF P(KF)>PEEK(D1+L) AND P(KF)<PEEK(D2+L) THEN 95 5284 IF IB=U1 THEN 5290 5285 IF V1-XB>-U1 AND V2-XB<49 AND YB-W1>-U1 AND YB-W2<49 THEN IB=U3:S(U1)=W1- W2:S(U2)=V2-V1:GOTO 5290 5286 IF KF=U1 THEN YA=W2+U4:GOTO 5030 5287 IF KF=U3 THEN YA=W1-U4:GOTO 5030 5288 XA=V2-U4:IF KF=U2 THEN XA=V1+U4 5289 GOTO 5030 5290 IF IB=U3 THEN M=M+U6*SGN(M1) 5291 IF M=U0 THEN 5295 5292 FOR I=U1 TO ABS(M):XA=XA+SGN(M)*(KF<>U1 AND KF<>U3):IF

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    5 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us