home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 113
/
113.d81
/
mts.game
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
10KB
|
340 lines
10 poke53264,.:goto1870
20 rem --- game screen ---
30 poke53281,.:poke53280,.:print"[147][154]";
40 poke53269,.:poke53265,peek(53265)and191
50 printtab(20-len(r$(1))/2)r$(1)
60 print" @aaaabaaaabaaaabaaaabaaaabaaaabaaaac"
70 fori=1to3:print" ![160][160][160][160]#[160][160][160][160]#[160][160][160][160]#[160][160][160][160]#[160][160][160][160]#[160][160][160][160]#[160][160][160][160][192]":next
80 print" [193][194][195][161][194][162][194][195][161][194][162][194][195][161][194][162][194][195][161][194][162][194][195][161][194][162][194][195][161][194][162][194][195][161][194][163]"
90 print" [192]![160][160][160][192]![160][160][160][192]![160][160][160][192]![160][160][160][192]![160][160][160][192]![160][160][160][192]!"
100 print" @a[146]=>aba[146]=>aba[146]=>aba[146]=>aba[146]=>aba[146]=>aba[146]=>ac"
110 fori=1to3:print" ![160][160][160][160]#[160][160][160][160]#[160][160][160][160]#[160][160][160][160]#[160][160][160][160]#[160][160][160][160]#[160][160][160][160][192]":next
120 print" [193][194][195][161][194][162][194][195][161][194][162][194][195][161][194][162][194][195][161][194][162][194][195][161][194][162][194][195][161][194][162][194][195][161][194][163]"
130 print" [192]![160][160][160][192]![160][160][160][192]![160][160][160][192]![160][160][160][192]![160][160][160][192]![160][160][160][192]!"
140 print" @a[146]=>aba[146]=>aba[146]=>aba[146]=>aba[146]=>aba[146]=>aba[146]=>ac"
150 fori=1to3:print" ![160][160][160][160]#[160][160][160][160]#[160][160][160][160]#[160][160][160][160]#[160][160][160][160]#[160][160][160][160]#[160][160][160][160][192]":next
160 print" [193][194][195][161][194][162][194][195][161][194][162][194][195][161][194][162][194][195][161][194][162][194][195][161][194][162][194][195][161][194][162][194][195][161][194][163]"
170 print" [192]![160][160][160][192]![160][160][160][192]![160][160][160][192]![160][160][160][192]![160][160][160][192]![160][160][160][192]!"
180 print" [192][193] [192][193] [192][193] [192][193] [192][193] [192][193] [192][193]"
190 printtab(11)"[154]press (g[154]) to guess"
200 printtab(6)"@aac@aac@aac@aac@aac@aac@aac"
210 printtab(6)"![160][160][192]![160][160][192]![160][160][192]![160][160][192]![160][160][192]![160][160][192]![160][160][192]"
220 printtab(6)"[193][194][194][163][193][194][194][163][193][194][194][163][193][194][194][163][193][194][194][163][193][194][194][163][193][194][194][163]"
230 printtab(11)"[154]press (h[154]) for help"
240 rem --- set up sprites ---
250 fori=.to7:poke52216+i,48+i:next
260 poke53248,60:poke53249,98
270 f=52:fori=53250to53262step2:pokei,fand255:f=f+40:next
280 fori=53251to53263step2:pokei,164:next
290 poke53287,1:poke53264,128
300 rem --- place characters ---
310 pt=20:fori=1to7:poke214,1:print:printtab((i-1)*5+3)m$(i):gosub1610:next
320 pt=30:fori=1to7:poke214,7:print:printtab((i-1)*5+3)v$(i):gosub1610:next
330 pt=40:fori=1to7:poke53287+i,sc(i)
340 poke53269,peek(53269)+so(i):gosub1610:next
350 gosub1650:r=1:c=1:poke53269,255
360 rem --- main ---
370 pt=40:geta$
380 ifa$="q"thengosub1610:goto1410
390 ifa$="g"thengosub1610:goto840
400 ifa$="h"thengosub1610:gosub2710
405 ifa$="h"theng(r,c)=m(r,c):gosub700
410 pt=30:if(peek(jy)and16)=.ora$=chr$(13)thengosub690
420 pt=20:j=peek(jy)and15
430 ifj=14ora$="[145]"thengosub490
440 ifj=13ora$=""thengosub530
450 ifj=11ora$="[157]"thengosub570
460 ifj=7ora$=""thengosub630
470 goto370
480 rem --- up ---
490 r=r-1:ifr<1thenr=3
500 poke53249,50+r*48:gosub1610
510 forde=1to50:next:return
520 rem --- down ---
530 r=r+1:ifr>3thenr=1
540 poke53249,50+r*48:gosub1610
550 forde=1to50:next:return
560 rem --- left ---
570 c=c-1:ifc<1thenc=7
580 poke53269,254:poke53264,128-(c>5)
590 poke53248,c*40+20and255
600 poke53269,255:gosub1610
610 forde=1to20:next:return
620 rem --- right ---
630 c=c+1:ifc>7thenc=1
640 poke53269,254:poke53264,128-(c>5)
650 poke53248,c*40+20and255
660 poke53269,255:gosub1610
670 forde=1to20:next:return
680 rem --- next char or obj ---
690 g(r,c)=g(r,c)+1:ifg(r,c)>7theng(r,c)=1
700 onrgoto720,760,800
710 rem --- the killers ---
720 poke214,1:print
730 printtab((c-1)*5+3)m$(g(r,c))
740 gosub1610:return
750 rem --- the victims ---
760 poke214,7:print
770 printtab((c-1)*5+3)v$(g(r,c))
780 gosub1610:return
790 rem --- the weapons ---
800 poke53269,peek(53269)-so(c)
810 poke53287+c,sc(g(r,c)):poke52216+c,48+g(r,c)
820 poke53269,255:gosub1610:return
830 rem --- guess ---
840 poke214,21:print
850 printtab(7)" "
860 m1=0:m2=0:m3=0
870 fori=1to7:f=0:forj=1to7
880 ifg(1,j)=m(1,i)thenifg(2,j)=m(2,i)thenifg(3,j)=m(3,i)thenf=1:j=7
890 next:m1=m1+f:next
900 fori=1to7:f=0:forj=1to3
910 ifg(j,i)=m(j,i)thenf=f+1
920 next:iff=2thenm2=m2+1
930 iff=3thenm3=m3+1:m1=m1-1
940 next
950 ifm3=7then1120
960 poke214,21:print:printtab(7);
970 pt=40:ifm3thenfori=1tom3:print"[194][195]";:gosub1610:next
980 pt=30:ifm2thenfori=1tom2:print"[158][194][195]";:gosub1610:next
990 pt=20:ifm1thenfori=1tom1:print"[194][195]";:gosub1610:next
1000 print:g=g+1
1010 rem --- ratings ---
1020 ifg<31thenr$=r$(1):goto1090
1030 ifg<41thenr$=r$(2):goto1090
1040 ifg<51thenr$=r$(3):goto1090
1050 ifg<61thenr$=r$(4):goto1090
1060 ifg<71thenr$=r$(5):goto1090
1070 ifg<81thenr$=r$(6):goto1090
1080 r$=r$(7)
1090 print"[154]"tab(20-len(r$)/2)r$
1100 goto370
1110 rem --- case closed! ---
1120 gosub1740:gosub1490
1130 forde=1to500:next
1140 poke214,19:print
1150 printtab(12)"[154]good job pierre!"
1160 forde=1to1500:next
1170 r$="you solved it in"+str$(g)+" moves"
1180 iflen(r$)and1thenr$=r$+"!"
1190 printtab(20-len(r$)/2)r$
1200 forde=1to1500:next
1210 printtab(9)"play again? (y[154]) or (n[154])":pt=40
1220 geta$:ifa$<>"y"anda$<>"n"then1220
1230 gosub1610:ifa$="y"thenrun1870
1240 rem --- let it be as it was ---
1250 print"[147]":poke53269,0:poke53264,0
1260 poke56578,peek(56578)or3
1270 poke56576,(peek(56576)and252)or3
1280 poke53272,(peek(53272)and15)or16
1290 poke53272,23:poke648,4
1300 open15,dv,15,"r0:hello connect=hello connect":input#15,er:close15
1310 ifer=63then1350
1320 poke53281,6:poke53280,14:print"[147][154]"
1330 end
1340 rem --- back to the tower ---
1350 a$="hello connect":q$=chr$(34)
1360 print"[147][144]load"q$a$q$","dv
1370 print:print:print:print:print"run"
1380 poke56,160:clr
1390 poke631,19:poke632,13:poke633,13:poke198,3:end
1400 rem --- quit ---
1410 gosub1510:gosub1490
1420 poke214,20:print
1430 printtab(5)"[154]quit, are you sure? (y[154]) or (n[154])"
1440 geta$:ifa$<>"y"anda$<>"n"then1440
1450 gosub1610:ifa$="n"thengosub1550:poke53269,255:goto370
1460 gosub1490:poke214,19:print
1470 goto1210
1480 rem --- clear screen lines ---
1490 fori=24to20step-1:poke781,i:sys59903:next:return
1500 rem --- save screen ---
1510 sys49152,55296,140*256,1000
1520 sys49152,51200,136*256,1000
1530 return
1540 rem --- restore screen ---
1550 sys49152,140*256,55296,1000
1560 sys49152,136*256,51200,1000
1570 return
1580 rem --- clear sid chip ---
1590 fori=stos+24:pokei,.:next:return
1600 rem --- blip ---
1610 pokes+1,pt:pokes+5,75:pokes+6,0
1620 pokes+24,15:pokes+4,33
1630 forde=1to50:next:pokes+4,32:return
1640 rem --- up/down ---
1650 pokes+1,0:pokes+6,252:pokes+24,15
1660 fori=2to254step2
1670 pokes+1,i:pokes+4,17
1680 next
1690 fori=252to2step-2
1700 pokes+1,i:pokes+4,17
1710 next
1720 pokes+4,32:return
1730 rem --- winner ---
1740 fori=1to3:forj=1to3
1750 pokes+5,62:pokes+6,48:pokes+24,15
1760 pokes+1,j*3+6:pokes,54
1770 pokes+4,33:forde=1to108:next
1780 pokes+4,32::forde=1to10:next
1790 next:next:return
1800 rem --- title music ---
1810 pokes+24,15:pokes+5,9:pokes+6,192:pokes+3,8:de=ti
1820 ifde>tithen1820
1830 pokes+4,64:readj:ifj=-1then1850
1840 readr,c:pokes+1,r:pokes,c:de=de+j*9:pokes+4,65:goto1820
1850 pokes+4,0:return
1860 rem --- initialize ---
1870 dimi,j,f,r,c,x,g,pt,rt,de,m1,m2,m3,er,a$,r$,f$
1880 dv=peek(186):ifdv<8thendv=8
1890 s=54272:jy=56320:x=rnd(-ti)
1900 dimm$(7),v$(7),so(7),sc(7),r$(7),g(3,7),m(3,7)
1910 fori=1to7:readm$(i):next
1920 fori=1to7:readv$(i):next
1930 fori=.to7:readso(i):next
1940 fori=.to7:readsc(i):next
1950 fori=1to7:readr$(i):next
1960 forr=1to3:forc=1to7:g(r,c)=c:m(r,c)=c:next:next
19