home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 113 / 113.d81 / mts.game (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  10KB  |  340 lines

  1. 10 poke53264,.:goto1870
  2. 20 rem --- game screen ---
  3. 30 poke53281,.:poke53280,.:print"[147][154]";
  4. 40 poke53269,.:poke53265,peek(53265)and191
  5. 50 printtab(20-len(r$(1))/2)r$(1)
  6. 60 print"  @aaaabaaaabaaaabaaaabaaaabaaaabaaaac"
  7. 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
  8. 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]"
  9. 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]!"
  10. 100 print"  @a[146]=>aba[146]=>aba[146]=>aba[146]=>aba[146]=>aba[146]=>aba[146]=>ac"
  11. 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
  12. 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]"
  13. 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]!"
  14. 140 print"  @a[146]=>aba[146]=>aba[146]=>aba[146]=>aba[146]=>aba[146]=>aba[146]=>ac"
  15. 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
  16. 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]"
  17. 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]!"
  18. 180 print"    [192][193]   [192][193]   [192][193]   [192][193]   [192][193]   [192][193]   [192][193]"
  19. 190 printtab(11)"[154]press (g[154]) to guess"
  20. 200 printtab(6)"@aac@aac@aac@aac@aac@aac@aac"
  21. 210 printtab(6)"![160][160][192]![160][160][192]![160][160][192]![160][160][192]![160][160][192]![160][160][192]![160][160][192]"
  22. 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]"
  23. 230 printtab(11)"[154]press (h[154]) for help"
  24. 240 rem --- set up sprites ---
  25. 250 fori=.to7:poke52216+i,48+i:next
  26. 260 poke53248,60:poke53249,98
  27. 270 f=52:fori=53250to53262step2:pokei,fand255:f=f+40:next
  28. 280 fori=53251to53263step2:pokei,164:next
  29. 290 poke53287,1:poke53264,128
  30. 300 rem --- place characters ---
  31. 310 pt=20:fori=1to7:poke214,1:print:printtab((i-1)*5+3)m$(i):gosub1610:next
  32. 320 pt=30:fori=1to7:poke214,7:print:printtab((i-1)*5+3)v$(i):gosub1610:next
  33. 330 pt=40:fori=1to7:poke53287+i,sc(i)
  34. 340 poke53269,peek(53269)+so(i):gosub1610:next
  35. 350 gosub1650:r=1:c=1:poke53269,255
  36. 360 rem --- main ---
  37. 370 pt=40:geta$
  38. 380 ifa$="q"thengosub1610:goto1410
  39. 390 ifa$="g"thengosub1610:goto840
  40. 400 ifa$="h"thengosub1610:gosub2710
  41. 405 ifa$="h"theng(r,c)=m(r,c):gosub700
  42. 410 pt=30:if(peek(jy)and16)=.ora$=chr$(13)thengosub690
  43. 420 pt=20:j=peek(jy)and15
  44. 430 ifj=14ora$="[145]"thengosub490
  45. 440 ifj=13ora$=""thengosub530
  46. 450 ifj=11ora$="[157]"thengosub570
  47. 460 ifj=7ora$=""thengosub630
  48. 470 goto370
  49. 480 rem --- up ---
  50. 490 r=r-1:ifr<1thenr=3
  51. 500 poke53249,50+r*48:gosub1610
  52. 510 forde=1to50:next:return
  53. 520 rem --- down ---
  54. 530 r=r+1:ifr>3thenr=1
  55. 540 poke53249,50+r*48:gosub1610
  56. 550 forde=1to50:next:return
  57. 560 rem --- left ---
  58. 570 c=c-1:ifc<1thenc=7
  59. 580 poke53269,254:poke53264,128-(c>5)
  60. 590 poke53248,c*40+20and255
  61. 600 poke53269,255:gosub1610
  62. 610 forde=1to20:next:return
  63. 620 rem --- right ---
  64. 630 c=c+1:ifc>7thenc=1
  65. 640 poke53269,254:poke53264,128-(c>5)
  66. 650 poke53248,c*40+20and255
  67. 660 poke53269,255:gosub1610
  68. 670 forde=1to20:next:return
  69. 680 rem --- next char or obj ---
  70. 690 g(r,c)=g(r,c)+1:ifg(r,c)>7theng(r,c)=1
  71. 700 onrgoto720,760,800
  72. 710 rem --- the killers ---
  73. 720 poke214,1:print
  74. 730 printtab((c-1)*5+3)m$(g(r,c))
  75. 740 gosub1610:return
  76. 750 rem --- the victims ---
  77. 760 poke214,7:print
  78. 770 printtab((c-1)*5+3)v$(g(r,c))
  79. 780 gosub1610:return
  80. 790 rem --- the weapons ---
  81. 800 poke53269,peek(53269)-so(c)
  82. 810 poke53287+c,sc(g(r,c)):poke52216+c,48+g(r,c)
  83. 820 poke53269,255:gosub1610:return
  84. 830 rem --- guess ---
  85. 840 poke214,21:print
  86. 850 printtab(7)"              "
  87. 860 m1=0:m2=0:m3=0
  88. 870 fori=1to7:f=0:forj=1to7
  89. 880 ifg(1,j)=m(1,i)thenifg(2,j)=m(2,i)thenifg(3,j)=m(3,i)thenf=1:j=7
  90. 890 next:m1=m1+f:next
  91. 900 fori=1to7:f=0:forj=1to3
  92. 910 ifg(j,i)=m(j,i)thenf=f+1
  93. 920 next:iff=2thenm2=m2+1
  94. 930 iff=3thenm3=m3+1:m1=m1-1
  95. 940 next
  96. 950 ifm3=7then1120
  97. 960 poke214,21:print:printtab(7);
  98. 970 pt=40:ifm3thenfori=1tom3:print"[194][195]";:gosub1610:next
  99. 980 pt=30:ifm2thenfori=1tom2:print"[158][194][195]";:gosub1610:next
  100. 990 pt=20:ifm1thenfori=1tom1:print"[194][195]";:gosub1610:next
  101. 1000 print:g=g+1
  102. 1010 rem --- ratings ---
  103. 1020 ifg<31thenr$=r$(1):goto1090
  104. 1030 ifg<41thenr$=r$(2):goto1090
  105. 1040 ifg<51thenr$=r$(3):goto1090
  106. 1050 ifg<61thenr$=r$(4):goto1090
  107. 1060 ifg<71thenr$=r$(5):goto1090
  108. 1070 ifg<81thenr$=r$(6):goto1090
  109. 1080 r$=r$(7)
  110. 1090 print"[154]"tab(20-len(r$)/2)r$
  111. 1100 goto370
  112. 1110 rem --- case closed! ---
  113. 1120 gosub1740:gosub1490
  114. 1130 forde=1to500:next
  115. 1140 poke214,19:print
  116. 1150 printtab(12)"[154]good job pierre!"
  117. 1160 forde=1to1500:next
  118. 1170 r$="you solved it in"+str$(g)+" moves"
  119. 1180 iflen(r$)and1thenr$=r$+"!"
  120. 1190 printtab(20-len(r$)/2)r$
  121. 1200 forde=1to1500:next
  122. 1210 printtab(9)"play again? (y[154]) or (n[154])":pt=40
  123. 1220 geta$:ifa$<>"y"anda$<>"n"then1220
  124. 1230 gosub1610:ifa$="y"thenrun1870
  125. 1240 rem --- let it be as it was ---
  126. 1250 print"[147]":poke53269,0:poke53264,0
  127. 1260 poke56578,peek(56578)or3
  128. 1270 poke56576,(peek(56576)and252)or3
  129. 1280 poke53272,(peek(53272)and15)or16
  130. 1290 poke53272,23:poke648,4
  131. 1300 open15,dv,15,"r0:hello connect=hello connect":input#15,er:close15
  132. 1310 ifer=63then1350
  133. 1320 poke53281,6:poke53280,14:print"[147][154]"
  134. 1330 end
  135. 1340 rem --- back to the tower ---
  136. 1350 a$="hello connect":q$=chr$(34)
  137. 1360 print"[147][144]load"q$a$q$","dv
  138. 1370 print:print:print:print:print"run"
  139. 1380 poke56,160:clr
  140. 1390 poke631,19:poke632,13:poke633,13:poke198,3:end
  141. 1400 rem --- quit ---
  142. 1410 gosub1510:gosub1490
  143. 1420 poke214,20:print
  144. 1430 printtab(5)"[154]quit, are you sure? (y[154]) or (n[154])"
  145. 1440 geta$:ifa$<>"y"anda$<>"n"then1440
  146. 1450 gosub1610:ifa$="n"thengosub1550:poke53269,255:goto370
  147. 1460 gosub1490:poke214,19:print
  148. 1470 goto1210
  149. 1480 rem --- clear screen lines ---
  150. 1490 fori=24to20step-1:poke781,i:sys59903:next:return
  151. 1500 rem --- save screen ---
  152. 1510 sys49152,55296,140*256,1000
  153. 1520 sys49152,51200,136*256,1000
  154. 1530 return
  155. 1540 rem --- restore screen ---
  156. 1550 sys49152,140*256,55296,1000
  157. 1560 sys49152,136*256,51200,1000
  158. 1570 return
  159. 1580 rem --- clear sid chip ---
  160. 1590 fori=stos+24:pokei,.:next:return
  161. 1600 rem --- blip ---
  162. 1610 pokes+1,pt:pokes+5,75:pokes+6,0
  163. 1620 pokes+24,15:pokes+4,33
  164. 1630 forde=1to50:next:pokes+4,32:return
  165. 1640 rem --- up/down ---
  166. 1650 pokes+1,0:pokes+6,252:pokes+24,15
  167. 1660 fori=2to254step2
  168. 1670 pokes+1,i:pokes+4,17
  169. 1680 next
  170. 1690 fori=252to2step-2
  171. 1700 pokes+1,i:pokes+4,17
  172. 1710 next
  173. 1720 pokes+4,32:return
  174. 1730 rem --- winner ---
  175. 1740 fori=1to3:forj=1to3
  176. 1750 pokes+5,62:pokes+6,48:pokes+24,15
  177. 1760 pokes+1,j*3+6:pokes,54
  178. 1770 pokes+4,33:forde=1to108:next
  179. 1780 pokes+4,32::forde=1to10:next
  180. 1790 next:next:return
  181. 1800 rem --- title music ---
  182. 1810 pokes+24,15:pokes+5,9:pokes+6,192:pokes+3,8:de=ti
  183. 1820 ifde>tithen1820
  184. 1830 pokes+4,64:readj:ifj=-1then1850
  185. 1840 readr,c:pokes+1,r:pokes,c:de=de+j*9:pokes+4,65:goto1820
  186. 1850 pokes+4,0:return
  187. 1860 rem --- initialize ---
  188. 1870 dimi,j,f,r,c,x,g,pt,rt,de,m1,m2,m3,er,a$,r$,f$
  189. 1880 dv=peek(186):ifdv<8thendv=8
  190. 1890 s=54272:jy=56320:x=rnd(-ti)
  191. 1900 dimm$(7),v$(7),so(7),sc(7),r$(7),g(3,7),m(3,7)
  192. 1910 fori=1to7:readm$(i):next
  193. 1920 fori=1to7:readv$(i):next
  194. 1930 fori=.to7:readso(i):next
  195. 1940 fori=.to7:readsc(i):next
  196. 1950 fori=1to7:readr$(i):next
  197. 1960 forr=1to3:forc=1to7:g(r,c)=c:m(r,c)=c:next:next
  198. 19